"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[42119],{35627(e,t,a){a.d(t,{B:()=>c,T:()=>s});var n=a(801081),l=a(25553),r=a(87485),i=a(248951);const o=(0,l.uh)((0,i.P)()),c=(0,n.Mz)(o,r.kh),m=(0,l.uh)((0,i.L)()),s=(0,n.Mz)(m,r.kh)},424285(e,t,a){a.d(t,{A:()=>_,g:()=>s});var n=a(822336),l=a(296540),r=a(217439),i=a(71479),o=a(566723),c=a(916537);const m=(0,i.A)("span")`
  line-height: ${o.Er};
  padding: 2px ${o.kc};
  border-radius: ${o.xO};
  background: ${({theme:{themeName:e}})=>n.Ay[`desktop-color-green-01-${e}`]};
`,s=(0,i.A)("span")`
  margin-left: ${o.kc};
`,_=()=>l.createElement(m,null,l.createElement(r.A,{variant:"caption",color:"green-06"},l.createElement(c.sA,{id:"COMMON_MLO"})))},442728(e,t,a){a.d(t,{A:()=>U});var n=a(822336),l=a(469733),r=a(296540),i=a(271856),o=a(963070),c=a(823858),m=a(382389),s=a(592510),_=a(879905),d=a(596441),E=a(398300),A=a(6176),p=a(703447),u=a(689965),v=a(845030),O=a(6510),N=a(532419),C=a(691294),b=a(239417),y=a(984652),w=a(643633),I=a(573531),M=a(768195);const g=({name:e,mac:t,model:a})=>e===t&&a?a:e,h=e=>{switch(e?.uplink?.type){case M.au.WIRE:return e?.connection_network_name||I.L;case M.au.WIRELESS:return e?.connection_network_name||e?.uplink?.essid||I.L;default:return I.L}};var D,f=a(758649),T=a(396660),k=a(566723),R=a(115829);!function(e){e.NAME="name",e.PORT="port",e.NETWORK="network"}(D||(D={}));const S={[D.NAME]:"COMMON_NAME",[D.PORT]:"COMMON_PORT",[D.NETWORK]:"COMMON_NETWORK"};var x=a(294303),L=a(916537),P=a(216211);const $=({port:e,mac:t})=>{const{handleGoToPortsPage:a}=(0,P.e)();return r.createElement(f.A,{variant:"inline",type:"button",size:"medium",onClick:()=>{a(t,e)}},e)},U=({activeItem:e})=>{const{themeName:t}=(0,m.u)(),a=(0,l.useDispatch)(),I=(0,l.useSelector)(N.ID),M=(0,r.useMemo)(()=>((e,t)=>(e||[]).map(e=>{const a=t.find(({mac:t})=>t===e.mac||t===e.ap_mac);return a?{...e,id:a._id,name:(0,O.Q)(a),activeItem:a,model:(0,O.Lm)(a.model)}:null}).filter(Boolean))(e.downlink_table,I),[e.downlink_table,I]),f=(0,l.useSelector)((0,b.Ax)(e.mac)).filter(e=>e.type===C.sK.WIRED);(0,r.useEffect)(()=>{a((0,y.$3)(void 0,{crudCacheStrategy:{type:s.e.CACHE}}))},[a]);const P=(0,r.useMemo)(()=>f.map(e=>({id:`${e.id}${e.sw_port}`,name:e.display_name,mac:e.mac,network:e.network_name,port:e.sw_port,image:r.createElement(p.A,{client:e}),isClient:!0})),[f]),U=(0,r.useMemo)(()=>M.map(({id:e,name:a,mac:l,port_idx:o,activeItem:m})=>({id:`${e}${o}`,name:g({name:a,mac:m.mac,model:m.model}),mac:l,network:h(m),port:o,image:r.createElement(A.A,{model:m.model}),isClient:!1,warning:m.detailed_states?.negotiated_low_uplink_port_speed?r.createElement(i.A,{portal:!0,description:r.createElement(w.A,{color:"text-1"})},r.createElement(c.A,{size:"medium",color:n.Ay[`desktop-color-orange-06-${t}`]})):void 0})),[M,n.Ay[`desktop-color-orange-06-${t}`]]),W=(0,r.useMemo)(()=>Array.prototype.concat.apply([],[P,U]),[U,P]),B=(0,r.useMemo)(()=>(({mac:e})=>[{id:D.NAME,label:r.createElement(L.sA,{id:S[D.NAME]}),renderCell:({image:e,name:t})=>r.createElement(x.A,{alignItems:"center",justifyContent:"center",width:"100%"},r.createElement(x.A,{alignItems:"center",justifyContent:"center",height:"20px",width:"20px"},e),r.createElement(R.A,{color:"inherit",size:"medium",style:{width:"170px",paddingLeft:"6px",paddingRight:"6px"}},t)),width:170,compare:(0,T.l0)(({name:e})=>e)},{id:D.NETWORK,label:r.createElement(L.sA,{id:S[D.NETWORK]}),renderCell:({network:e})=>r.createElement(R.A,{color:"inherit",size:"medium"},e),width:112,compare:(0,T.l0)(({network:e})=>e)},{id:D.PORT,align:"right",label:r.createElement(L.sA,{id:S[D.PORT]}),renderCell:({port:t,warning:a})=>r.createElement(x.A,{justifyContent:"flex-end",alignItems:"center",flexGrow:1},r.createElement(x.A,{marginTop:-2,marginRight:k.YC},a),r.createElement($,{port:t,mac:e})),width:54,compare:(0,T.l0)(({port:e})=>e)}])({mac:e.mac}),[e.mac]),H=(0,r.useCallback)(({mac:e,isClient:t})=>{a((0,v.XP)({type:t?E.H.CLIENT:E.H.DEVICE,id:e}))},[a]),{rowLimit:G,renderFooter:z}=(0,_.A)(W.length,{defaultCount:10});return W.length?r.createElement(u.A,null,r.createElement(o.A,{items:W,columns:B,idField:"id",initialSortBy:"port",initiallySortAscending:!0,disableColumnFilters:!0,rowOffset:0,disableSelection:!0,onRowClick:H,rowLimit:G,renderFooter:()=>z,rowHeight:d.I.ROW_HEIGHT,truncateHeaderCells:!0})):null}},331642(e,t,a){a.r(t),a.d(t,{default:()=>Y});var n=a(296540),l=a(860631),r=a(617048),i=a(578819),o=a(780811),c=a(837612),m=a(971492),s=a(424285),_=a(927806),d=a(889879),E=a(328787),A=a(442728),p=a(217439),u=a(566723),v=a(86571),O=a(294303),N=a(689965),C=a(916537),b=a(564985),y=a(128195);const w=({activeItem:e})=>{const{radio_table:t}=e,a=t?.some(e=>e.radio===b.sx.RADIO_6E);return n.createElement(N.A,{type:N.I.ACCORDION,items:[{id:"radios",openByDefault:!0,label:n.createElement(v.A,{id:"DEVICE_HEADER_AIR_STATS"}),renderContent:()=>n.createElement(O.A,{flexDirection:"column",gap:u.kc},n.createElement(n.Fragment,null,n.createElement(p.A,{weight:"bold",size:"medium"},n.createElement(C.sA,{id:"COMMON_RADIO_BAND_NA"})),n.createElement(y.A,{activeItem:e,radioType:b.sx.RADIO_NA,hideChUtil:!0,hideRadio:!0})),a?n.createElement(n.Fragment,null,n.createElement(p.A,{weight:"bold",size:"medium"},n.createElement(C.sA,{id:"COMMON_RADIO_BAND_6E"})),n.createElement(y.A,{activeItem:e,radioType:b.sx.RADIO_6E,hideChUtil:!0,hideRadio:!0})):null)}]})};var I=a(812454),M=a(780803),g=a(788576),h=a(48075),D=a(78853),f=a(899551),T=a(768195),k=a(705145),R=a(822336),S=a(71479),x=a(668393),L=a(382389),P=a(596441),$=a(522453);const U=(0,S.A)(O.A)`
  height: ${P.I.ROW_HEIGHT-1}px;
  border-bottom: ${({theme:{themeName:e}})=>R.Ay[`desktop-border-divider-${e}`]};
  align-items: center;
  justify-content: space-between;
`,W={[T.xv.MAIN]:"DEVICE_USB_MAIN_PORT",[T.xv.AUX]:"DEVICE_USB_AUX_POWER"},B={[T.Db.LOW]:15,[T.Db.NORMAL]:20},H=(e,t,a,n)=>{const{active_port:l,mode:r}=a||{};return t===T.xv.MAIN&&l!==T.xv.MAIN&&n?R.Ay[`desktop-color-data-down-${e}`]:r&&[T.Db.NORMAL,T.Db.LOW].includes(r)?R.Ay[`desktop-color-green-06-${e}`]:void 0},G=({isActive:e,activeColor:t})=>n.createElement(x.A,e?{variant:"fill",color:t}:null),z=({port:e,usb_power_delivery:t,has_connected_data_port:a})=>{const{themeName:l}=(0,L.u)(),r=t?.active_port===e||e===T.xv.MAIN&&a,i=((e,t,a)=>{const{active_port:l,mode:r}=t||{};return e===T.xv.MAIN&&l!==T.xv.MAIN?n.createElement(C.sA,{id:a?"DEVICE_USB_POWER_STATE_DATA_ONLY":"COMMON_NOT_CONNECTED"}):e===T.xv.AUX&&l!==T.xv.AUX?n.createElement(C.sA,{id:"COMMON_NOT_CONNECTED"}):r&&[T.Db.NORMAL,T.Db.LOW].includes(r)?n.createElement(C.sA,{id:"COMMON_UNIT_WATTS_SHORT",values:{value:B[r]}}):null})(e,t,a);return n.createElement($.v$,{disabled:!r},n.createElement(U,{width:"100%"},n.createElement(O.A,{alignItems:"center",gap:u.YC},n.createElement(G,{isActive:r,activeColor:H(l,e,t,a)}),n.createElement(p.A,{variant:"body-primary"},n.createElement(C.sA,{id:W[e]}))),i?n.createElement(k.A,{variant:"body-primary",color:"text-3"},i):null))};var V=a(766624);const F=({usb_power_delivery:e})=>{const t=e?.mode===T.Db.NORMAL;return n.createElement(O.A,{flexDirection:"column"},n.createElement(O.A,{flexDirection:"row",justifyContent:"space-between"},n.createElement(p.A,{variant:"body-primary"},n.createElement(C.sA,{id:"DEVICE_USB_CONNECTION_OPERATING_MODE_LABEL"})),n.createElement(O.A,{flexDirection:"row",alignItems:"center",gap:u.YC},n.createElement(p.A,{variant:"body-primary"},n.createElement(C.sA,{id:t?"COMMON_ENHANCED":"COMMON_STANDARD"})),n.createElement(V.A,{description:n.createElement(C.sA,{id:t?"DEVICE_USB_CONNECTION_OPERATING_MODE_ENHANCED_TOOLTIP":"DEVICE_USB_CONNECTION_OPERATING_MODE_STANDARD_TOOLTIP"})}))),n.createElement(O.A,{flexDirection:"row",justifyContent:"space-between"},n.createElement(p.A,{variant:"caption"},n.createElement(C.sA,{id:t?"DEVICE_USB_CONNECTION_OPERATING_MODE_ENHANCED_STATE":"DEVICE_USB_CONNECTION_OPERATING_MODE_STANDARD_STATE"}))))},K=({port_table:e,usb_power_delivery:t})=>{const a=(e||[]).some(e=>e.up);return n.createElement(O.A,{flexDirection:"column"},[T.xv.MAIN,T.xv.AUX].map(e=>n.createElement(z,{key:e,port:e,usb_power_delivery:t,has_connected_data_port:a})))},X=({port_table:e,usb_power_delivery:t})=>n.createElement(N.A,null,n.createElement(O.A,{flexDirection:"column",gap:u.YC},n.createElement(F,{usb_power_delivery:t}),n.createElement(K,{port_table:e,usb_power_delivery:t}))),Y=({activeItem:e,activeItem:{adopted:t,name:a,ip:p,config_network:u,mac:v,type:O,uplink:N,wifi_caps2:C,uptime:b,radio_table:y,radio_table_stats:T,vap_table:k,deviceState:R,model:S,ipv6:x,lan_ip:L,displayable_version:P,sys_stats:$,"system-stats":U,satisfaction:W,port_table:B,ethernet_overrides:H,detailed_states:{device_near_power_limit:G,device_near_effective_power_limit:z}={device_near_power_limit:!1,device_near_effective_power_limit:!1},total_used_power:V,total_max_power:F,downlink_table:K,shortname:Y}})=>{const j=(0,c.YP)(e),Q=(0,l.CW)(e,m.A.DFS_BACKGROUND_SCAN),Z=(0,n.useMemo)(()=>null==R||(0,o.aK8)(R),[R]),q=(0,n.useMemo)(()=>(0,o.E4T)({model:S}),[S]),J=(0,n.useMemo)(()=>(0,_.Uj)({type:N?.type,mlo_links:N?.mlo_links}),[N?.type,N?.mlo_links]);return n.createElement(n.Fragment,null,n.createElement(I.A,{activeItem:e,showPortOverview:!q,hidePortsButton:0===B?.length||q,overviewChildren:j?n.createElement(M.A,{radio_table:y,radio_table_stats:T,downlink_table:K,isOnlyWirelessMeshClientDevice:!0,isPtmpDevice:!1,uplink:N,isMloUplinkConnection:J||q}):null,badge:J?n.createElement(s.g,null,n.createElement(s.A,null)):null}),n.createElement(E.A,{ip:p,adopted:t,config_network:u}),n.createElement(r.A,{radio_table_stats:T,isZeroWaitDfsSupported:Q}),n.createElement(f.A,{uplink:N,wifi_caps2:C}),q?n.createElement(X,{port_table:B,usb_power_delivery:e.usb_power_delivery}):null,!Z&&(0,o.QQG)(e)?n.createElement(n.Fragment,null,(0,i.b0)(B)?n.createElement(d.A,{type:O,mac:v,model:S,device_near_power_limit:G,device_near_effective_power_limit:z,total_used_power:V,total_max_power:F,isPoeAdapter:(0,l.Y6)(e)}):null,n.createElement(A.A,{activeItem:e})):null,j?n.createElement(n.Fragment,null,n.createElement(h.A,{name:a,model:S,ip:p,ipv6:x,lan_ip:L,mac:v,type:O,displayable_version:P,uptime:b,systemStatsMem:U?.mem,sys_stats:$,satisfaction:W,vap_table:k,radio_table:y,radio_table_stats:T,deviceState:R,ethernet_overrides:H,port_table:B}),n.createElement(g.A,{activeItem:e}),n.createElement(w,{activeItem:e}),n.createElement(D.A,{shortname:Y})):null)}},48075(e,t,a){a.d(t,{A:()=>O});var n=a(296540),l=a(496520),r=a(319736),i=a(999063),o=a(329708),c=a(32753),m=a(723544),s=a(205830),_=a(400242),d=a(589694),E=a(57759),A=a(298523),p=a(146784),u=a(689965),v=a(780811);const O=({model:e,type:t,ip:a,ipv6:O,lan_ip:N,mac:C,displayable_version:b,uptime:y,systemStatsMem:w,sys_stats:I,satisfaction:M,vap_table:g,radio_table:h,radio_table_stats:D,name:f,deviceState:T,ethernet_overrides:k,port_table:R})=>n.createElement(u.A,null,n.createElement(o.A,{model:e}),n.createElement(_.A,{ip:a,lan_ip:N,type:t,ethernet_overrides:k,port_table:R}),n.createElement(p.A,{ipv6_address:O}),n.createElement(m.A,{mac:C}),n.createElement(E.A,{name:f,model:e,mac:C,type:t,displayable_version:b,uptime:y,deviceState:T}),(0,v.r$V)({type:t})?null:n.createElement(l.A,null),n.createElement(r.A,{satisfaction:M,vap_table:g,radio_table:h,radio_table_stats:D}),n.createElement(i.A,{uptime:y}),n.createElement(c.A,{systemStatsMem:w}),n.createElement(s.A,{sys_stats:I}),(0,v.r$V)({type:t})?null:n.createElement(A.A,{mac:C}),n.createElement(d.A,null))},899551(e,t,a){a.d(t,{A:()=>C});var n=a(822336),l=a(296540),r=a(469733),i=a(217439),o=a(823858),c=a(382389),m=a(592563),s=a(224948),_=a(916537),d=a(780811),E=a(96512),A=a(302167),p=a(457311),u=a(860631),v=a(446367),O=a(971492);const N=({connectivitySettings:e})=>{const{themeName:t}=(0,c.u)(),a=(0,r.useDispatch)(),d=(0,E.I)(),[A,u]=(0,l.useState)(!1),v=(0,l.useCallback)(()=>{u(!0),a((0,p.kY)({...e,mlo_mesh_enabled:!0})).catch(d).finally(()=>u(!1))},[a,e,d]);return A?null:l.createElement(s.A,{icon:l.createElement(o.A,{size:"original",variant:"fill",color:n.Ay[`desktop-color-orange-06-${t}`]})},l.createElement(i.A,null,l.createElement(_.sA,{id:"DEVICE_MESH_MLO_ENABLE_SUGGESTION_WARNING",values:{link:l.createElement(m.A,{onClick:v},l.createElement(_.sA,{id:"COMMON_CLICK_TO_ENABLE"})),br:_.br}})))},C=({uplink:e,wifi_caps2:t})=>{const a=(0,r.useSelector)(A.XA);return(0,u.CW)({wifi_caps2:t},O.A.MESH_MLO_CHILD)&&(0,d.Daf)({uplink:e})&&a?.enabled&&!a?.mlo_mesh_enabled&&!(0,v.A)(a)?l.createElement(N,{connectivitySettings:a}):null}},59372(e,t,a){a.d(t,{FH:()=>_,YG:()=>E,ad:()=>s,dA:()=>d});var n=a(801081),l=a(960407),r=a(35627),i=a(294591),o=a(477544),c=a(532419),m=a(180830);const s=(0,n.Mz)(m.K8,o.Ag,l.gm,(e,t,a)=>e.filter(({device_macs:e})=>e.includes(a)).reduce((e,{_id:a})=>[...e,...t.filter(({ap_group_ids:e})=>(e||[]).includes(a))],[])),_=(0,n.Mz)(s,e=>e.every(({enabled:e})=>!1===e)),d=(0,n.Mz)(s,e=>e.some(({enabled:e,wlan_bands:t})=>e&&(t||[]).includes(i._$.AX))),E=(0,n.Mz)(l.gm,c.vh,r.B,m.K8,(e,t,a,n)=>{if(!t.includes(e))return null;const l=n.filter(({device_macs:t})=>t.includes(e));return a.filter(({configuration:{ap_group_ids:e}})=>l.some(({_id:t})=>e?.includes(t))).some(({configuration:{wlan_bands:e}})=>e.includes(i._$.AX))})}}]);