"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[73100],{147433(e,t,n){n.d(t,{A:()=>i});const i={PCAP:4194304,HWOFFLOAD_QOS_AND_SMART_QUEUE:2147483648,SUPPORT_FILE:65536}},358935(e,t,n){n.d(t,{X2:()=>A,lX:()=>m,uC:()=>E});var i=n(571766),s=n(29472),a=n(159469),r=n(774366);const o=`${n(290454).w}/device/:mac:`,l=`${o}/replacement-candidates`,d=`${o}/replace?replacementDeviceMac=:replacement-mac:`,c=`${o}/replace`,m=(e={},t={})=>(0,s.Kd)("replacementCandidates",`${l.replace(":mac:",e.queryParams?.mac)}`,e.queryParams?.mac,e,{...t,idField:"mac"}),E=(e,t)=>n=>n((0,s.vB)(i.aC,null,null,r.A.POST,d.replace(":mac:",e).replace(":replacement-mac:",t),{},null,{})),A=e=>t=>t((0,s.vB)(i.aC,null,null,r.A.DELETE,c.replace(":mac:",e),{},null,{failureToast:()=>({icon:a.C.danger,message:"COMMON_UNKNOWN_ERROR"})}))},752104(e,t,n){n.d(t,{A:()=>s,Q:()=>a});var i=n(765567);const s="_",a=[i.ZM,i.Je]},453007(e,t,n){n.d(t,{A:()=>r});var i=n(938984),s=n(247816),a=n(291508);const r=(0,s.A)(i.A,(0,a.A)("colorOverride"))`
  ${({colorOverride:e})=>e?`color: ${e} !important`:""};
`},721398(e,t,n){n.d(t,{A:()=>o});var i=n(274934),s=n(125799),a=n(853777),r=n(470070);const o=({messageId:e,tooltipClassName:t,values:n,isInteractive:o,portal:l,variant:d="twoTone",size:c="medium"})=>(0,i.jsx)(s.A,{description:(0,i.jsx)(r.sA,{id:e,values:n}),width:210,isInteractive:o,portal:l,tooltipClassName:t,children:(0,i.jsx)(a.A,{isActive:!0,omitSvgMargin:!0,variant:d,size:c})})},109700(e,t,n){n.d(t,{A:()=>c});var i=n(274934),s=n(100978),a=n(535322),r=n(376892),o=n(597377),l=n(906701),d=n(924453);const c=({oob_info:{mac:e,v4_address:t,v6_addresses:n}={},type:c,uplink:m,device_mode_override:E})=>e||t||n?(0,i.jsx)(a.A,{type:a.I.ACCORDION,items:[{id:"oob-port-information",label:(0,i.jsx)(r.A,{id:"DEVICE_MANAGEMENT_PORT"}),renderContent:()=>(0,i.jsxs)(s.A,{height:"100%",flexDirection:"column",children:[t?(0,i.jsx)(o.A,{ip:t,lan_ip:t,type:c,uplink:m,device_mode_override:E}):null,e?(0,i.jsx)(d.A,{mac:e}):null,n?(0,i.jsx)(l.A,{ipv6_address:n}):null]}),openByDefault:!0}]}):null},241092(e,t,n){n.d(t,{A:()=>w});var i=n(274934),s=n(558948),a=n(309130),r=n(376892),o=n(100978),l=n(535322),d=n(125799),c=n(814557),m=n(938984),E=n(799329),A=n(600191),_=n(247816),u=n(291508),p=n(470070);var x,C=n(820510);!function(e){e.ORANGE="orange",e.RED="red"}(x||(x={}));const j=(e,t)=>(e.index||0)-(t.index||0),N=(0,_.A)(E.A)`
  color: ${({theme:e})=>c.Ay[`desktop-color-neutral-00-${e.themeName}`]};
`,h=(0,_.A)(A.A,(0,u.A)("color"))`
  color: ${({theme:e,color:t})=>c.Ay[`desktop-color-${t}-06-${e.themeName}`]};
`,I=(0,_.A)(o.A)`
  width: ${a.S2};
  height: ${a.S2};
  border-radius: 4px;
  background-color: ${({theme:e})=>c.Ay[`desktop-color-green-06-${e.themeName}`]};
`,v=(0,_.A)(I)`
  background-color: ${({theme:e})=>c.Ay[`desktop-color-neutral-03-${e.themeName}`]};
`,M=({fan:{index:e,speed:t}})=>(0,i.jsxs)(C.m,{children:[(0,i.jsx)(C.Y,{id:"DEVICE_FAN",children:e}),(0,i.jsx)(C.Y,{id:"DEVICE_LEVEL",children:t})]}),T=({fan:e})=>(0,i.jsx)(d.A,{description:(0,i.jsx)(M,{fan:e}),width:100,children:(0,i.jsx)(I,{justifyContent:"center",alignItems:"center",children:(0,i.jsx)(N,{})})}),g=({index:e,messageId:t,color:n=x.ORANGE})=>(0,i.jsx)(d.A,{description:(0,i.jsx)(p.sA,{id:t,values:{index:e}}),width:199,children:(0,i.jsx)(v,{justifyContent:"center",alignItems:"center",children:(0,i.jsx)(h,{color:n,size:"original",variant:"fill"})})}),O=({fan:e})=>{switch(!0){case!e.present:return(0,i.jsx)(g,{index:e.index,messageId:"DEVICE_FAN_UNAVAILABLE",color:x.RED});case!!(1&e.critical_state):return(0,i.jsx)(g,{index:e.index,messageId:"DEVICE_FAN_SPEED_TOO_HIGH"});case!!(2&e.critical_state):return(0,i.jsx)(g,{index:e.index,messageId:"DEVICE_FAN_STOPPED"});case!!(4&e.critical_state):return(0,i.jsx)(g,{index:e.index,messageId:"DEVICE_FAN_UNAVAILABLE",color:x.RED});default:return(0,i.jsx)(T,{fan:e})}},R=({fan:e})=>(0,i.jsxs)(o.A,{flexDirection:"column",justifyContent:"center",alignItems:"center",children:[(0,i.jsx)(O,{fan:e}),(0,i.jsx)(m.A,{size:"small",color:"text-3",children:e.present&&void 0!==e.speed?e.speed:(0,i.jsx)(p.sA,{id:"COMMON_FALLBACK"})})]}),S=({fan_table:e})=>(0,i.jsx)(o.A,{flexDirection:"row",justifyContent:"center",gap:a.S2,children:e.sort(j).map(e=>(0,i.jsx)(R,{fan:e},e.index))});var D=n(203071);const w=({psu_table:e=[],fan_table:t=[]})=>e.length>0?(0,i.jsx)(l.A,{type:l.I.ACCORDION,items:[{id:"powerSource",openByDefault:!0,label:(0,i.jsx)(r.A,{id:t.length?"DEVICE_HEADER_POWER_AND_FAN_UTILIZATION":"DEVICE_HEADER_POWER_UTILIZATION"}),renderContent:()=>(0,i.jsxs)(o.A,{flexDirection:"column",gap:a.Ln,children:[(0,i.jsx)(D.A,{psuTable:e,marginBottom:0}),t.length?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.A,{}),(0,i.jsx)(S,{fan_table:t})]}):null]})}]}):null},948803(e,t,n){n.d(t,{A:()=>l});var i=n(274934),s=n(938984),a=n(347625),r=n(470070),o=n(664092);const l=({model:e})=>(0,i.jsxs)(o.A,{children:[(0,i.jsx)(s.A,{color:"text-2",size:"medium",children:(0,i.jsx)(r.sA,{id:"COMMON_MODEL"})}),(0,i.jsx)(s.A,{color:"text-3",size:"medium",children:(0,a.Lm)(e)})]})},203071(e,t,n){n.d(t,{A:()=>T});var i=n(274934),s=n(602086),a=n(43009),r=n(125799),o=n(814557),l=n(367551),d=n(900302),c=n(938984),m=n(600191),E=n(247816),A=n(263705),_=n(662986),u=n(309130),p=n(100978),x=n(453007),C=n(470070),j=n(314229),N=n(820510);const h=(0,E.A)(p.A)`
  justify-content: space-between;
`,I=(0,E.A)(d.A)`
  margin: 0 6px;
  height: 10px;
`,v=(0,E.A)(m.A)`
  margin: 0 6px;
`,M=({index:e,item:t})=>(0,i.jsxs)(N.m,{children:[(0,i.jsx)(N.Y,{id:"COMMON_POWER_SUPPLY_UNIT",values:{psuIndex:""},children:e+1}),t.temp?Object.entries(t.temp).map(([e,t])=>(0,i.jsxs)(N.Y,{id:"DEVICE_TEMPERATURE_SENSOR",values:{index:+e+1},children:[t?.toFixed(1)||(0,i.jsx)(C.sA,{id:"COMMON_FALLBACK"})," ",(0,i.jsx)(C.sA,{id:"COMMON_UNIT_CELSIUS"})]},e)):null,t.fanSpeed?(0,i.jsxs)(N.Y,{id:"DEVICE_FAN_SPEED",children:[t.fanSpeed," ",(0,i.jsx)(C.sA,{id:"COMMON_UNIT_RPM"})]}):null]}),T=({psuTable:e=[],marginBottom:t})=>{const{themeName:n,motifPalette:d}=(0,A.u)(),{motif:m}=(0,a.A)(),{formatMessage:E}=(0,C.tz)(),N=(0,s.useMemo)(()=>e.map(({power:t,power_capacity:s,temp:a,fan:A,present:u,online:N,label:T},g)=>{const O=s||550,R=Math.ceil(Number.parseFloat(t)/O*100),S={variant:(0,j.NH)(R),value:R,temp:a,fanSpeed:A?.[0],online:N,present:u},D=e?.[g]?.power;return(0,i.jsxs)(p.A,{flexDirection:"column",children:[(0,i.jsxs)(h,{children:[(0,i.jsx)(c.A,{color:"text-2",size:"medium",children:(0,i.jsx)(C.sA,{id:"COMMON_POWER_SUPPLY_UNIT",values:{psuIndex:g+1}})}),(0,i.jsx)(p.A,{justifyContent:"space-between",alignItems:"center",children:S.present?(0,i.jsxs)(i.Fragment,{children:[S.online||S.value?null:(0,i.jsx)(r.A,{description:E({id:"DEVICE_USW_MC_PSU_OFFLINE_TOOLTIP"},{index:g+1}),portal:!0,children:(0,i.jsx)(v,{size:"original",variant:"fill",color:o.Ay[`desktop-color-orange-06-${n}`],fill:o.Ay[`desktop-color-neutral-00-${n}`]})}),S.online?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(c.A,{color:"text-3",size:"medium",children:(0,i.jsx)(C.sA,{id:"COMMON_UNIT_WATTS_SHORT",values:{value:`${Math.ceil(Number.parseFloat(D))}/${O}`}})}),(0,i.jsx)(I,{orientation:"vertical",color:o.Ay[`desktop-color-neutral-04-${n}`]}),(0,i.jsx)(x.A,{size:"medium",colorOverride:S.value?d[S.variant]:o.Ay[`desktop-color-text-3-${m}`],children:(0,_.A)(S.value)})]}):null]}):(0,i.jsx)(c.A,{color:"text-3",size:"medium",children:(0,i.jsx)(C.sA,{id:"DEVICE_NOT_INSTALLED"})})})]}),(0,i.jsx)(r.A,{description:S.present?(0,i.jsx)(M,{index:g,item:S}):null,width:250,children:(0,i.jsx)(l.A,{items:[S],rounded:!0})})]},T)}),[e]);return(0,i.jsx)(p.A,{flexDirection:"column",marginBottom:t??u.kI,gap:u.kc,children:N})}},999837(e,t,n){n.d(t,{A:()=>U});var i=n(274934),s=n(977872),a=n(602086),r=n(696264),o=n(599110),l=n(159469),d=n(706925),c=n(700444),m=n(470070),E=n(222102),A=n(656466),_=n(401042),u=n(358935);var p,x,C=n(857780),j=n(570866);!function(e){e.EXISTING="existing",e.NEW="new"}(p||(p={})),function(e){e.MAC="mac",e.TYPE="type",e.MODEL="model"}(x||(x={}));var N,h=n(990330),I=n(125799),v=n(843615),M=n(853777),T=n(489714),g=n(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"}(N||(N={}));const O=(0,a.createContext)({[N.DEVICE_REPLACEMENT_MODE]:void 0,[N.SET_DEVICE_REPLACEMENT_MODE]:g.P1,[N.NEW_MAC]:void 0,[N.SET_NEW_MAC]:g.P1,[N.EXISTING_MAC]:void 0,[N.SET_EXISTING_MAC]:g.P1,[N.REPLACEMENT_CANDIDATES]:[],[N.ERROR]:void 0,[N.RESET_ERROR]:g.P1}),R=n(409844).AH`
  height: 54px;
`;var S=n(247816),D=n(309130),w=n(100978);const f=(0,S.A)(w.A)`
  align-items: center;
  gap: ${D.YC};
`,P=(0,a.memo)(()=>{const{newMac:e,setNewMac:t,error:n,resetError:s}=(0,a.useContext)(O),r=(0,a.useCallback)(({target:{value:e}})=>{t((0,T.Z)(e)),s()},[t,s]);return(0,i.jsx)(v.A,{className:R,value:e,onChange:r,onFocus:s,variant:"secondary",label:(0,i.jsxs)(f,{children:[(0,i.jsx)(m.sA,{id:"COMMON_MAC_ADDRESS"}),(0,i.jsx)(I.A,{portal:!0,width:"100%",maxWidth:248,description:(0,i.jsx)(m.sA,{id:"DEVICE_REPLACEMENT_MAC_LOCATION"}),children:(0,i.jsx)(M.A,{isActive:!0})})]}),width:"100%",invalid:n})});var y=n(237887),k=n(974390);const b=(0,a.memo)(()=>{const{replacementCandidates:e,existingMac:t,setExistingMac:n,error:s,resetError:r}=(0,a.useContext)(O),o=(0,a.useMemo)(()=>e.map(({mac:e,model:t,name:n})=>({label:n,value:e,image:(0,i.jsx)(k.A,{model:t}),additionalInfo:e})),[e]),l=(0,a.useCallback)(({value:e})=>{n(String(e)),r()},[n,r]);return(0,i.jsx)(y.A.Sorted,{value:t,label:(0,i.jsx)(m.sA,{id:"COMMON_DEVICE"}),width:"100%",searchable:!0,onChange:l,onFocus:r,maxHeight:228,options:o,invalid:s})}),L=(0,S.A)(w.A)`
  flex-direction: column;
  gap: ${D.kc};
`,V=(0,a.memo)(()=>{const{replacementCandidates:e,deviceReplacementMode:t,setDeviceReplacementMode:n,resetError:s}=(0,a.useContext)(O),r=(0,a.useMemo)(()=>e.length?[{id:p.EXISTING,children:(0,i.jsx)(m.sA,{id:"COMMON_EXISTING"}),onChange:()=>{n(p.EXISTING),s()},checked:t===p.EXISTING},{id:p.NEW,children:(0,i.jsx)(m.sA,{id:"COMMON_NEW"}),onChange:()=>{n(p.NEW),s()},checked:t===p.NEW}]:[],[e.length,t,n,s]);return(0,i.jsxs)(L,{children:[(0,i.jsx)(h.A,{direction:"row",items:r}),t===p.EXISTING?(0,i.jsx)(b,{}):null,t===p.NEW?(0,i.jsx)(P,{}):null]})}),W=(0,S.A)(w.A)`
  align-items: center;
  gap: ${D.YC};
  width: fit-content;
`;var $=n(721398);const F={[C.gQ.INCOMPATIBLE_REPLACEMENT]:"DEVICE_REPLACEMENT_DEVICE_INCOMPATIBLE_REPLACEMENT_ERROR",[C.gQ.REPLACEMENT_ALREADY_ASSIGNED]:"DEVICE_REPLACEMENT_DEVICE_REPLACEMENT_ALREADY_ASSIGNED_ERROR"},G=({mac:e,hideTooltip:t=!1})=>{const{formatMessage:n}=(0,m.tz)(),d=(0,s.wA)(),[x,h]=(0,a.useState)(!1),[I,v]=(0,a.useState)(!1),[M,T]=(0,a.useState)(p.NEW),[g,R]=(0,a.useState)(""),[S,D]=(0,a.useState)(""),[w,f]=(0,a.useState)(void 0),P=(0,s.d4)((0,a.useMemo)(()=>(e=>(0,E.Mz)((e=>(0,A.uh)((0,u.lX)({queryParams:{mac:e}})))(e),e=>(0,_.i6)(e)?.devices||[]))(e),[e])),y=(0,a.useCallback)(()=>{h(!0)},[]),k=(0,a.useCallback)(()=>{h(!1),R(""),D(""),v(!1),T(p.NEW),f(void 0)},[]),b=(0,a.useCallback)(()=>{switch(M){case p.EXISTING:return S;case p.NEW:return g;default:return}},[M,S,g]),L=(0,a.useCallback)(()=>{d((0,c.ox)({icon:l.C.success,message:"DEVICE_REPLACEMENT_DEVICE_SET",duration:3e3})),k()},[d,k]),G=(0,a.useCallback)(e=>{switch(e.apiData?.replacement_state){case C.gQ.INCOMPATIBLE_REPLACEMENT:case C.gQ.REPLACEMENT_ALREADY_ASSIGNED:f(n({id:F[e.apiData.replacement_state]}));break;default:d((0,c.ox)({icon:l.C.danger,message:"DEVICE_FAILED_TO_SET_REPLACEMENT_DEVICE",duration:3e3}))}},[d,n]),U=(0,a.useCallback)(()=>{v(!1)},[]),B=(0,a.useCallback)(()=>{v(!0),d((0,u.uC)(e,b())).then(L).catch(G).finally(U)},[d,L,G,e,b,U]),z=(0,a.useMemo)(()=>Boolean(b().match(j.b8)),[b]),H=(0,a.useMemo)(()=>[{text:(0,i.jsx)(m.sA,{id:"COMMON_ACTION_CANCEL"}),variant:"tertiary",onClick:k},{text:(0,i.jsx)(m.sA,{id:"COMMON_ACTION_APPLY"}),variant:"primary",onClick:B,disabled:!z||I,loader:I?"spinner":void 0}],[k,B,z,I]),X=(0,a.useCallback)(()=>{f(void 0)},[f]),Y=(0,a.useMemo)(()=>({[N.DEVICE_REPLACEMENT_MODE]:M,[N.SET_DEVICE_REPLACEMENT_MODE]:T,[N.NEW_MAC]:g,[N.SET_NEW_MAC]:R,[N.EXISTING_MAC]:S,[N.SET_EXISTING_MAC]:D,[N.REPLACEMENT_CANDIDATES]:P,[N.ERROR]:w,[N.RESET_ERROR]:X}),[M,g,S,P,w,X]);return(0,a.useEffect)(()=>{d((0,u.lX)({queryParams:{mac:e}}))},[d,e]),(0,i.jsx)(O.Provider,{value:Y,children:(0,i.jsx)(r.A,{allowOverflow:!0,title:(0,i.jsx)(m.sA,{id:"DEVICE_SET_REPLACEMENT_DEVICE"}),body:(0,i.jsx)(V,{}),position:"top",portal:!0,actions:H,isOpen:x,onRequestClose:k,children:(0,i.jsxs)(W,{children:[(0,i.jsx)(o.A,{type:"button",variant:"inline",size:"medium",onClick:y,children:(0,i.jsx)(m.sA,{id:"DEVICE_SET_REPLACEMENT_DEVICE"})}),t?null:(0,i.jsx)($.A,{messageId:"DEVICE_SET_REPLACEMENT_DEVICE_DESCRIPTION",variant:"outline"})]})})})},U=(0,a.memo)(({model:e,type:t,...n})=>(0,d.G)({type:t,model:e})?(0,i.jsx)(G,{type:t,model:e,...n}):null)},384780(e,t,n){n.d(t,{A:()=>W});var i=n(274934),s=n(814557),a=n(977872),r=n(602086),o=n(125799),l=n(792929),d=n(600191),c=n(263705),m=n(244081),E=n(112104),A=n(61322),_=n(449339),u=n(974390),p=n(650632),x=n(535322),C=n(205521),j=n(347625),N=n(754924),h=n(223597),I=n(34118),v=n(239627),M=n(645682),T=n(254590),g=n(857780);const O=({name:e,mac:t,model:n})=>e===t&&n?n:e,R=e=>{switch(e?.uplink?.type){case g.au.WIRE:return e?.connection_network_name||T.L;case g.au.WIRELESS:return e?.connection_network_name||e?.uplink?.essid||T.L;default:return T.L}};var S,D=n(599110),w=n(594005),f=n(309130),P=n(421314);!function(e){e.NAME="name",e.PORT="port",e.NETWORK="network"}(S||(S={}));const y={[S.NAME]:"COMMON_NAME",[S.PORT]:"COMMON_PORT",[S.NETWORK]:"COMMON_NETWORK"};var k=n(100978),b=n(470070),L=n(850352);const V=({port:e,mac:t})=>{const{handleGoToPortsPage:n}=(0,L.e)();return(0,i.jsx)(D.A,{variant:"inline",type:"button",size:"medium",onClick:()=>{n(t,e)},children:e})},W=({activeItem:e})=>{const{themeName:t}=(0,c.u)(),n=(0,a.wA)(),T=(0,a.d4)(N.ID),g=(0,r.useMemo)(()=>((e,t)=>(e||[]).map(e=>{const n=t.find(({mac:t})=>t===e.mac||t===e.ap_mac);return n?{...e,id:n._id,name:(0,j.Q)(n),activeItem:n,model:(0,j.Lm)(n.model)}:null}).filter(Boolean))(e.downlink_table,T),[e.downlink_table,T]),D=(0,a.d4)((0,I.Ax)(e.mac)).filter(e=>e.type===h.sK.WIRED);(0,r.useEffect)(()=>{n((0,v.$3)(void 0,{crudCacheStrategy:{type:m.e.CACHE}}))},[n]);const L=(0,r.useMemo)(()=>D.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)(p.A,{client:e}),isClient:!0})),[D]),W=(0,r.useMemo)(()=>g.map(({id:e,name:n,mac:a,port_idx:r,activeItem:l})=>({id:`${e}${r}`,name:O({name:n,mac:l.mac,model:l.model}),mac:a,network:R(l),port:r,image:(0,i.jsx)(u.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)(M.A,{color:"text-1"}),children:(0,i.jsx)(d.A,{size:"medium",color:s.Ay[`desktop-color-orange-06-${t}`]})}):void 0,stacking_group_id:l.stacking_group_id})),[g,s.Ay[`desktop-color-orange-06-${t}`]]),$=(0,r.useMemo)(()=>Array.prototype.concat.apply([],[L,W]),[W,L]),F=(0,r.useMemo)(()=>(({mac:e})=>[{id:S.NAME,label:(0,i.jsx)(b.sA,{id:y[S.NAME]}),renderCell:({image:e,name:t})=>(0,i.jsxs)(k.A,{alignItems:"center",justifyContent:"center",width:"100%",children:[(0,i.jsx)(k.A,{alignItems:"center",justifyContent:"center",height:"20px",width:"20px",children:e}),(0,i.jsx)(P.A,{color:"inherit",size:"medium",style:{width:"170px",paddingLeft:"6px",paddingRight:"6px"},children:t})]}),width:170,compare:(0,w.l0)(({name:e})=>e)},{id:S.NETWORK,label:(0,i.jsx)(b.sA,{id:y[S.NETWORK]}),renderCell:({network:e})=>(0,i.jsx)(P.A,{color:"inherit",size:"medium",children:e}),width:112,compare:(0,w.l0)(({network:e})=>e)},{id:S.PORT,align:"right",label:(0,i.jsx)(b.sA,{id:y[S.PORT]}),renderCell:({port:t,warning:n})=>(0,i.jsxs)(k.A,{justifyContent:"flex-end",alignItems:"center",flexGrow:1,children:[(0,i.jsx)(k.A,{marginTop:-2,marginRight:f.YC,children:n}),(0,i.jsx)(V,{port:t,mac:e})]}),width:54,compare:(0,w.l0)(({port:e})=>e)}])({mac:e.mac}),[e.mac]),G=(0,r.useCallback)(({mac:e,isClient:t,stacking_group_id:i})=>{n((0,C.XP)({type:t?_.H.CLIENT:i?_.H.STACKING:_.H.DEVICE,id:i||e}))},[n]),{rowLimit:U,renderFooter:B}=(0,E.A)($.length,{defaultCount:10});return $.length?(0,i.jsx)(x.A,{children:(0,i.jsx)(l.A,{items:$,columns:F,idField:"id",initialSortBy:"port",initiallySortAscending:!0,disableColumnFilters:!0,rowOffset:0,disableSelection:!0,onRowClick:G,rowLimit:U,renderFooter:()=>B,rowHeight:A.I.ROW_HEIGHT,truncateHeaderCells:!0})}):null}},718968(e,t,n){n.r(t),n.d(t,{default:()=>_});var i=n(274934),s=n(241092),a=n(979653),r=n(808202),o=n(872926),l=n(23377),d=n(189042),c=n(384780),m=n(383550),E=n(216082),A=n(109700);const _=({activeItem:e,activeItem:{name:t,adopted:n,mac:_,type:u,model:p,ethernet_overrides:x,port_table:C,lan_ip:j,ipv6:N,displayable_version:h,uptime:I,sys_stats:v,ip:M,detailed_states:{device_near_power_limit:T}={device_near_power_limit:!1},total_used_power:g,total_max_power:O,config_network:R,"system-stats":S,psu_table:D,shortname:w,uplink:f,oob_info:P,device_mode_override:y}})=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(m.A,{activeItem:e,showPortOverview:!0,hidePortsButton:!0,children:(0,i.jsx)(d.A,{activeItem:e,showPortsButton:!0,showCaptureButton:!0})}),(0,i.jsx)(o.A,{ip:M,adopted:n,config_network:R}),(0,i.jsx)(r.A,{mac:_,type:u,model:p,device_near_power_limit:T,total_used_power:g,total_max_power:O}),(0,i.jsx)(c.A,{activeItem:e}),(0,i.jsx)(s.A,{psu_table:D}),(0,i.jsx)(a.A,{name:t,model:p,type:u,ip:M,uplink:f,lan_ip:j,ipv6:N,mac:_,displayable_version:h,connection_network_id:e.connection_network_id,uptime:I,sys_stats:v,systemStatsMem:S?.mem,total_used_power:g,ethernet_overrides:x,port_table:C,device_mode_override:y}),(0,i.jsx)(l.A,{activeItem:e}),(0,i.jsx)(A.A,{oob_info:P,type:u,uplink:f,device_mode_override:y}),(0,i.jsx)(E.A,{shortname:w})]})},979653(e,t,n){n.d(t,{A:()=>x});var i=n(274934),s=n(906701),a=n(100978),r=n(535322),o=n(857780),l=n(893762),d=n(766022),c=n(382583),m=n(948803),E=n(725870),A=n(924453),_=n(664613),u=n(597377),p=n(643334);const x=({name:e,model:t,ip:n,lan_ip:x,ipv6:C,mac:j,connection_network_id:N,displayable_version:h,uptime:I,sys_stats:v,systemStatsMem:M,type:T,total_used_power:g,device_mode_override:O,deviceState:R,ethernet_overrides:S,port_table:D,uplink:w})=>{const f=O===o.Yp.MANAGED_SHADOW_GATEWAY;return(0,i.jsx)(r.A,{children:(0,i.jsxs)(a.A,{height:"100%",flexDirection:"column",children:[(0,i.jsx)(m.A,{model:t}),f?null:(0,i.jsx)(u.A,{ip:n,lan_ip:x,type:T,ethernet_overrides:S,port_table:D,uplink:w,device_mode_override:O}),f?null:(0,i.jsx)(s.A,{ipv6_address:C}),f?null:(0,i.jsx)(c.A,{connection_network_id:N}),(0,i.jsx)(A.A,{mac:j}),(0,i.jsx)(p.A,{displayable_version:h,mac:j,name:e,model:t,type:T,uptime:I,deviceState:R}),(0,i.jsx)(l.A,{uptime:I}),f?null:(0,i.jsx)(E.A,{systemStatsMem:M}),f?null:(0,i.jsx)(_.A,{sys_stats:v}),f?null:(0,i.jsx)(d.A,{totalPower:g})]})})}},696049(e,t,n){n.d(t,{H:()=>i});const i=""},706925(e,t,n){n.d(t,{G:()=>o});var i=n(956978),s=n(857780);const a=[s.bq.USW,s.bq.UAP,s.bq.USP],r=[s.W4.UDBA69F],o=({type:e,model:t})=>(a.includes(e)||r.includes(t))&&!(0,i.tNJ)({model:t})},237887(e,t,n){n.d(t,{A:()=>E});var i=n(274934),s=n(602086),a=n(977872),r=n(693371),o=n(767822),l=n(820633),d=n(308111);const c=e=>(0,i.jsx)(r.A,{renderOption:o.q,...e}),m=e=>(0,i.jsx)(c,{...e});m.Sorted=e=>{const t=(0,a.d4)(l.zi),n=(0,s.useMemo)(()=>(0,d.k)(t),[t]);return(0,i.jsx)(c,{...e,sortBy:n})};const E=m},308111(e,t,n){n.d(t,{R:()=>m,k:()=>E});var i=n(696049),s=n(350068),a=n(177173),r=n(752104),o=n(64222),l=n(332530);const d=[...new Set([i.H,r.Q.join(r.A),a.Zt,o.F,s.nc,l.Vr])],c={numeric:!0,sensitivity:"base"},m=(e,t)=>{const n=[];for(let i=e;i<=t;i+=1)n.push({value:i,label:String(i)});return n},E=e=>({value:t,label:n},{value:i,label:s})=>d.includes(t?.toString())||d.includes(i?.toString())?1/0:n?.toString().localeCompare(s?.toString(),e,c)??-1},489714(e,t,n){n.d(t,{Z:()=>s});var i=n(570866);const s=e=>e?e.replace(i.SD,"").replace(i.fA,"$&:").substring(0,17).toLowerCase():e}}]);