"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[29501,89965],{22169:(e,t,n)=>{n.d(t,{A:()=>s});var r=n(296540),l=n(217439),a=n(699784),i=n(115829),c=n(39705),o=n(294303);const s=({ipv6:e,size:t="inherit",color:n="inherit"})=>{const s=e?.[0];return s?r.createElement(o.A,{width:"100%",justifyContent:"flex-end"},r.createElement(i.A,{flexProps:{justifyContent:"flex-end",alignItems:"center"},color:n,size:t},s),e?.length>1?r.createElement(c.A,{items:e,isInteractive:!0,showListMarkers:!1,getItemKey:e=>e,renderListItem:e=>r.createElement(r.Fragment,null,e),renderMultipleItemsSummary:()=>null}):null):r.createElement(l.A,{size:t,color:n},r.createElement(a.sA,{id:"COMMON_FALLBACK"}))}},39705:(e,t,n)=>{n.d(t,{A:()=>s});var r=n(296540),l=n(705145),a=n(699784),i=n(115829),c=n(424135),o=n(819127);const s=function({items:e,renderMultipleItemsSummary:t,renderListItem:n,renderNoItems:s,getItemKey:m,enabled:d=!0,showListMarkers:E,cursorType:u,isInteractive:A}){const p=d?"inherit":"disabled";return e.length>1?r.createElement(c.A,{tooltip:r.createElement(o.A,{items:e,getItemKey:m,renderItem:n,showListMarkers:E,isInteractive:A,cursorType:u})},r.createElement(i.A,{color:p,cursorType:u},t(e))):1===e.length?r.createElement(i.A,{color:p,cursorType:u},n(e[0])):s?r.createElement(r.Fragment,null,s()):r.createElement(l.A,{isTruncated:!0,color:p},r.createElement(a.sA,{id:"COMMON_FALLBACK"}))}},46119:(e,t,n)=>{n.d(t,{A:()=>r});const r={open:(e,t="_blank",n="noopener,noreferrer")=>window.open(e,t,n)}},71265:(e,t,n)=>{n.d(t,{R:()=>d,k:()=>E});var r=n(280258),l=n(190497),a=n(953048),i=n(175522),c=n(936621),o=n(305988);const s=[...new Set([r.H,i.Q.join(i.A),a.Zt,c.F,l.nc,o.Vr])],m={numeric:!0,sensitivity:"base"},d=(e,t)=>{const n=[];for(let r=e;r<=t;r+=1)n.push({value:r,label:String(r)});return n},E=e=>({value:t,label:n},{value:r,label:l})=>s.includes(t?.toString())||s.includes(r?.toString())?1/0:n?.toString().localeCompare(l?.toString(),e,m)??-1},137625:(e,t,n)=>{n.d(t,{A:()=>s});var r=n(296540),l=n(353899),a=n(132196),i=n(372737),c=n(566723),o=n(699784);const s=({children:e=null,title:t,titleValues:n,message:s,messageValues:m,handleConfirm:d=()=>null,handleClose:E=()=>null,handleCancel:u,isOpen:A,buttonVariant:p="primary",cancelButtonVariant:_="tertiary",cancelButtonMessage:g="COMMON_ACTION_CANCEL",buttonMessage:O="COMMON_ACTION_CONFIRM",buttonDisabled:h=!1,position:C="top",showHeaderClose:I=!1,contentClassName:M="",body:N,titleBody:y,className:v,rootClose:b=!1,footerActions:k})=>{const f=(0,r.useCallback)(e=>{A&&(e.stopPropagation(),e.key===i.U.ENTER?d():e.key===i.U.ESCAPE&&E(!1))},[A,d,E]);(0,r.useEffect)(()=>(window.addEventListener("keydown",f,!0),()=>{window.removeEventListener("keydown",f,!0)}),[f]);const T=(0,r.useCallback)(()=>{E(!1),u?.()},[E,u]),x=(0,r.useCallback)(()=>{E(!1),d()},[E,d]),L=(0,r.useMemo)(()=>[{text:r.createElement(o.sA,{id:g}),variant:_,onClick:T},{text:r.createElement(o.sA,{id:O}),disabled:h,variant:p,onClick:x}],[O,p,g,_,T,x,h]),w=(0,r.useCallback)(()=>{E(!1)},[E]),R=a.AH`
    ${t?"":`margin-top: ${c.xO}`}
  `;return r.createElement(l.A,{title:t?r.createElement(o.sA,{id:t,values:n}):y||null,...s?{body:r.createElement(r.Fragment,null,r.createElement(o.sA,{id:s,values:m}),N)}:{body:N},position:C,portal:!0,actions:k||L,showHeaderClose:I,contentClassName:a.AH`
        ${R}
        ${M}
      `,onRequestClose:w,isOpen:A,allowOverflow:!0,rootClose:b,className:v},e)}},146784:(e,t,n)=>{n.d(t,{A:()=>u});var r=n(296540),l=n(349424),a=n(217439),i=n(383653),c=n(568560),o=n(22169),s=n(294303),m=n(699784),d=n(348466),E=n(360113);const u=(0,r.memo)(({ipv6_address:e=[],wan_dhcpv6_pd_size:t})=>{const{globalAddresses:n,linkLocalAddress:u}=(0,r.useMemo)(()=>{const t=[];let n=null;for(let r=0;r<e.length;r+=1){const a=e[r];new l.Address6(a).isLinkLocal()?n=a?.split(d.Ed)?.[0]:t.push(a.split(d.Ed)?.[0])}return{globalAddresses:t,linkLocalAddress:n}},[e]);return n.length?r.createElement(r.Fragment,null,r.createElement(E.A,null,r.createElement(a.A,{color:"text-2",size:"medium"},r.createElement(m.sA,{id:"COMMON_IPV6_ADDRESS"})),r.createElement(c.A,{ipv6:n,size:"medium",color:"text-3"})),t?r.createElement(E.A,null,r.createElement(a.A,{color:"text-2",size:"medium"},r.createElement(m.sA,{id:"COMMON_IPV6_PREFIX"})),r.createElement(s.A,{flex:"1",minWidth:"0",justifyContent:"flex-end"},r.createElement(o.A,{ipv6:[`${(0,i.Gh)(n[0],t)}/${t}`],color:"text-3",size:"medium"}))):null,u?r.createElement(E.A,null,r.createElement(a.A,{color:"text-2",size:"medium"},r.createElement(m.sA,{id:"COMMON_IPV6_LINK_LOCAL"})),r.createElement(c.A,{ipv6:[u],size:"medium",color:"text-3"})):null):null})},150556:(e,t,n)=>{n.d(t,{A:()=>o});var r=n(296540),l=n(927099),a=n(137298),i=n(699784),c=n(360113);const o=({tx_rate:e})=>e>0?r.createElement(c.A,null,r.createElement(l.A,{color:"secondary",size:"body"},r.createElement(i.sA,{id:"COMMON_TX_RATE"})),r.createElement(l.A,{color:"tertiary",size:"body"},(0,a.Up)(e))):null},151061:(e,t,n)=>{n.d(t,{m:()=>A});var r=n(469733),l=n(296540),a=n(217439),i=n(90757),c=n(398300),o=n(340813),s=n(413146),m=n(845030),d=n(699784),E=n(532419),u=n(675845);const A=({last_uplink_mac:e,last_uplink_name:t,last_uplink_remote_port:n,disconnected_at:A,disabled:p,textSize:_,maxWidth:g})=>{const{formatMessage:O}=(0,d.tz)(),h=(0,r.useDispatch)(),C=(0,r.useSelector)(E.CC),I=(0,u.Z)(e,C),M=(0,u.z)(t,n,I,O);return l.createElement(l.Fragment,null,I?l.createElement("div",null,l.createElement(a.A,{color:"text-3",size:_},l.createElement(d.sA,{id:"COMMON_DEVICE_LAST_CONNECTED_TO",values:{deviceWithPort:l.createElement(o.A,{isFullWidth:!1,disabled:p,maxWidth:g||200,onClick:()=>{p||h((0,m.XP)({type:c.H.DEVICE,id:e}))},size:_},M)}}))):null,A?l.createElement("div",null,l.createElement(a.A,{color:"text-3",size:_},l.createElement(s.A,{date:(0,i.gH)(A)}))):null)}},175522:(e,t,n)=>{n.d(t,{A:()=>l,Q:()=>a});var r=n(416348);const l="_",a=[r.ZM,r.Je]},187550:(e,t,n)=>{n.d(t,{B:()=>k,i:()=>v});var r=n(469733),l=n(296540),a=n(823858),i=n(998837),c=n(614054),o=n(6510),s=n(660950),m=n(533520),d=n(224948),E=n(532419),u=n(71479),A=n(852866),p=n(566723),_=n(294303),g=n(795537),O=n(699784);const h=(0,u.A)("div")`
  margin-bottom: ${p.kc};
`,C=({uplinkMac:e,uplinkDisplayName:t})=>l.createElement(_.A,{flexDirection:"column",alignItems:"flex-start"},l.createElement(h,null,l.createElement(O.sA,{id:"DEVICE_POE_ALMOST_OUT_OF_POWER",values:{deviceName:l.createElement(g.A,{mac:e},(0,A.c)(t))}})),l.createElement(g.A,{mac:e},l.createElement(O.sA,{id:"DEVICE_POE_VIEW_DETAILS"}))),I=({children:e})=>l.createElement(d.A,{icon:l.createElement(a.A,{size:"original",color:(0,i.u)().motifPalette.warning,variant:"fill"})},e),M=e=>l.createElement(I,null,l.createElement(s.A,{...e})),N=e=>l.createElement(I,null,l.createElement(C,{...e})),y=({uplink:e,mac:t,detailed_states:n})=>{const a=(0,r.useSelector)((0,l.useMemo)(()=>(0,E.tG)(e.uplink_mac),[e.uplink_mac]));return l.createElement(m.x,{mac:t,uplinkMac:a.mac,uplinkDisplayName:(0,o.Q)(a),portNumber:e.uplink_remote_port,detailedStates:n,PortPowerLimitExceededWarning:M,UplinkNearPowerLimitWarning:N})},v=({uplink:e,mac:t,detailed_states:n})=>(0,c.w)(n)?l.createElement(y,{uplink:e,mac:t,detailed_states:n}):null,b=({uplinkMac:e,...t})=>{const n=(0,r.useSelector)((0,l.useMemo)(()=>(0,E.tG)(e),[e]));return l.createElement(m.x,{...t,uplinkMac:e,uplinkDisplayName:(0,o.Q)(n),PortPowerLimitExceededWarning:M,UplinkNearPowerLimitWarning:N})},k=({detailedStates:e,...t})=>(0,c.w)(e)?l.createElement(b,{detailedStates:e,...t}):null},216211:(e,t,n)=>{n.d(t,{e:()=>E});var r=n(956347),l=n(469733),a=n(296540),i=n(15095),c=n(627440),o=n(431247),s=n(293016),m=n(649413),d=n(497470);const E=()=>{const e=(0,l.useDispatch)(),t=(0,r.W6)(),n=(0,i.A)(`${c.VO.PORTS}`);return{handleGoToPortsPage:(0,a.useCallback)((r,l,a)=>{if(r)if(e((0,d.gU)(!0)),e((0,d.U)((0,m.HN)(s.F7.DEVICE,[r]))),a&&(e((0,d.IU)(!0)),e((0,d.E1)(!1))),l){const t=(0,o.FS)(r,l);e((0,d.Ao)([t]))}else e((0,d.Ao)([]));t.push(n)},[n,t,e])}}},224948:(e,t,n)=>{n.d(t,{A:()=>d});var r=n(296540),l=n(217439),a=n(71479),i=n(566723),c=n(294303),o=n(689965);const s=(0,a.A)("div")`
  margin-right: ${i.kc};
`,m=(0,a.A)("div")`
  margin-left: ${i.kc};
`,d=({icon:e,closeIcon:t,nested:n,children:a,...i})=>r.createElement(o.A,{nested:n,...i},r.createElement(c.A,null,r.createElement(s,null,e),r.createElement(l.A,{size:"medium"},a),t?r.createElement(m,null,t):null))},284428:(e,t,n)=>{n.d(t,{Im:()=>o,iL:()=>s,mQ:()=>i,pv:()=>a,q:()=>c});var r=n(296540),l=n(451449);function a(){return(0,r.useContext)(l.I)}function i(){return a().fields}function c(){return a().tooltipPopovers}function o(){return a().tooltipIcons}function s(){return a().labels}},360113:(e,t,n)=>{n.d(t,{A:()=>o});var r=n(296540),l=n(71479),a=n(566723),i=n(294303);const c=(0,l.A)(i.A,{shouldForwardProp:e=>!["valueMaxWidth","keyMinWidth","compact"].includes(e)})`
  &:not(:last-child) {
    ${({compact:e})=>e?"":`margin-bottom: ${a.kc};`}
  }
  & > {
    &:nth-child(1) {
      min-width: ${({keyMinWidth:e})=>e}px;
    }
    &:nth-child(2) {
      max-width: ${({valueMaxWidth:e})=>e}px;
    }
  }
`,o=({children:e,valueMaxWidth:t=215,keyMinWidth:n=0,flexProps:l={},compact:i=!1})=>r.createElement(c,{width:"100%",justifyContent:"space-between",gap:a.kc,height:i?void 0:24,valueMaxWidth:t,keyMinWidth:n,compact:i,...l},e)},362412:(e,t,n)=>{n.d(t,{A:()=>d});var r=n(469733),l=n(296540),a=n(436331),i=n(805837),c=n(282556),o=n(71265);const s=e=>l.createElement(a.A,{renderOption:i.q,...e}),m=e=>l.createElement(s,{...e});m.Sorted=e=>{const t=(0,r.useSelector)(c.zi),n=(0,l.useMemo)(()=>(0,o.k)(t),[t]);return l.createElement(s,{...e,sortBy:n})};const d=m},369702:(e,t,n)=>{n.d(t,{A:()=>a});var r=n(74750),l=n(296540);const a=({children:e,...t})=>l.createElement(r.A,{variant:"secondary-emphasis",...t},e)},372737:(e,t,n)=>{var r;n.d(t,{U:()=>r}),function(e){e.ARROW_DOWN="ArrowDown",e.ARROW_UP="ArrowUp",e.ENTER="Enter",e.ESCAPE="Escape"}(r||(r={}))},373934:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(296540),l=n(758649),a=n(216211);const i=({mac:e,port:t,children:n})=>{const{handleGoToPortsPage:i}=(0,a.e)(),c=(0,r.useCallback)(n=>{n.stopPropagation(),i(e,+t)},[i,e,t]);return r.createElement(l.A,{type:"button",size:"inherit",variant:"inline",onClick:c},n)}},424135:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(296540),l=n(566723),a=n(294303);const i=({children:e,tooltip:t})=>r.createElement(a.A,{maxWidth:"100%",overflow:"hidden",gap:l.YC,alignItems:"center"},r.createElement(a.A,{flex:1,overflow:"hidden"},e),t)},429501:(e,t,n)=>{n.r(t),n.d(t,{default:()=>oe});var r=n(296540),l=n(691294),a=n(187550),i=n(743891),c=n(469733),o=n(962926),s=n(217439),m=n(71479),d=n(132196),E=n(523275),u=n(566723),A=n(294303),p=n(611123),_=n(703447),g=n(532419),O=n(239417),h=n(151061),C=n(705145),I=n(718073),M=n(162420),N=n(561173),y=n(776309),v=n(369702),b=n(126457),k=n(699784),f=n(413786),T=n(873010),x=n(187483);const L=(0,m.A)(A.A)`
  > div {
    align-items: center;
    &:first-child {
      flex: 1;
    }
  }
`,w=({activeItem:e})=>{const{formatMessage:t}=(0,k.tz)(),n=(0,c.useSelector)(x.TP),a=(0,c.useDispatch)(),{Icon:i,redirectCallback:o,id:s}=(0,r.useMemo)(()=>({Icon:T.m8[e.product_line],redirectCallback:T.VF[e.product_line],id:T.dn[e.product_line]}),[e.product_line]);return Boolean(e.product_line)&&e.product_line!==f.p1.NETWORK?r.createElement(L,{gap:u.kc},e.unifi_device_info?.view_in_application&&o?r.createElement(v.A,{width:"full",onClick:()=>{window.location.href=n.replace("network",o(e.mac)).replace(/\/$/,"")}},r.createElement(i,{width:20,height:20,variant:"flat"}),r.createElement(C.A,{isTruncated:!0,variant:"inherit"},r.createElement(k.sA,{id:"UNIFI_DEVICE_CLIENT_LABEL_VIEW_IN",values:{application:t({id:s})}}))):null,e.status===l.S2.ONLINE&&e.type===l.sK.WIRELESS?r.createElement(A.A,{justifyContent:"center"},r.createElement(I.A,{description:r.createElement(k.sA,{id:"COMMON_REPORT_AN_ISSUE"})},r.createElement("div",null,r.createElement(v.A,{onClick:()=>a((0,b.to)({modalType:y.A.REPORT_WIFI_EXPERIENCE,modalProps:{item:e,experienceGraphType:N.v.UNIFI_CLIENT}})),style:{paddingRight:u.kc,paddingLeft:u.kc}},r.createElement(M.A,{size:"original",color:"inherit"}))))):null):null},R=d.AH`
  margin-bottom: ${u.Ln};
  margin-top: ${u.Ln};
`,P=(0,m.A)("div")`
  align-self: center;
`,S=({activeItem:e})=>{const t=(0,c.useSelector)((0,r.useMemo)(()=>(0,O.OF)(e.fingerprint),[e.fingerprint])),n=(0,c.useSelector)((0,r.useMemo)(()=>e.uplink_mac?(0,g.bw)(e.uplink_mac,["type","name","model","mac"]):E.A,[e.uplink_mac]));return r.createElement(o.A,{className:R,sections:[r.createElement(A.A,{flexDirection:"column",gap:u.kc},r.createElement(A.A,{gap:u.kc},r.createElement(_.A,{client:e,grid:!0,width:40,height:40}),r.createElement(P,null,r.createElement("div",null,r.createElement(s.A,{color:e.status===l.S2.ONLINE?"text-1":"text-3",weight:"bold"},e.display_name||e.name||t?.fingerprint_device_name)),e.status===l.S2.ONLINE?r.createElement(p.A,{client:e,uplinkDevice:n}):e.last_seen?r.createElement(h.m,{last_uplink_mac:e.last_uplink?.uplink_mac,last_uplink_name:e.last_uplink?.uplink_device_name,last_uplink_remote_port:e.last_uplink?.uplink_remote_port,disconnected_at:e.last_seen,disabled:e.disabled}):null)),r.createElement(w,{activeItem:e}))]})};var D=n(927099),z=n(777916),$=n(943887),W=n(38937),F=n(146784),U=n(689965),B=n(907157),V=n(951106),H=n(150556),K=n(782558),G=n(360113);const X=({activeItem:e})=>{const{formatMessage:t}=(0,k.tz)(),n=(0,c.useSelector)((0,r.useMemo)(()=>(0,O.OF)(e.fingerprint),[e.fingerprint]));return r.createElement(U.A,null,e.network_name?r.createElement(G.A,null,r.createElement(D.A,{color:"secondary",size:"body"},r.createElement(k.sA,{id:"COMMON_NETWORK"})),r.createElement(D.A,{color:"tertiary",size:"body"},e.network_name)):null,e.type===l.sK.WIRELESS&&e.essid?r.createElement(G.A,null,r.createElement(D.A,{color:"secondary",size:"body"},r.createElement(k.sA,{id:"COMMON_WIFI_NAME"})),r.createElement(D.A,{color:"tertiary",size:"body"},e.essid)):null,e.type===l.sK.WIRELESS&&(e.radio||e.channel||e.channel_width)?r.createElement(G.A,null,r.createElement(D.A,{color:"secondary",size:"body"},r.createElement(k.sA,{id:"COMMON_CHANNEL"})),r.createElement(D.A,{color:"tertiary",size:"body"},e.channel,e.radio||e.channel_width?` (${[e.radio?t({id:(0,$.dI)(e.radio)}):null,e.channel_width?`${e.channel_width} ${t({id:"COMMON_UNIT_MHZ"})}`:null].filter(Boolean).join(", ")})`:null)):null,r.createElement(B.A,{mac:e.mac,props:["signal"]},({signal:e=null})=>e?r.createElement(G.A,null,r.createElement(D.A,{color:"secondary",size:"body"},r.createElement(k.sA,{id:"COMMON_SIGNAL"})),r.createElement(A.A,{alignItems:"center"},r.createElement(D.A,{size:"body",color:(0,W.b5)(e)},e," ",r.createElement(k.sA,{id:"COMMON_UNIT_DBM"})))):null),e.type===l.sK.WIRELESS&&Number.isInteger(e.rate_imbalance)?r.createElement(G.A,null,r.createElement(D.A,{color:"secondary",size:"body"},r.createElement(k.sA,{id:"CLIENTS_HEADER_AP_SIGNAL_BALANCE"})),r.createElement(D.A,{color:"tertiary",size:"body"},r.createElement(k.sA,{id:Math.abs(e.rate_imbalance)<=40?"COMMON_GOOD":"COMMON_POOR"}))):null,e.type===l.sK.WIRELESS&&e.radio_proto?r.createElement(G.A,null,r.createElement(D.A,{color:"secondary",size:"body"},r.createElement(k.sA,{id:"COMMON_STANDARD"})),r.createElement(D.A,{color:"tertiary",size:"body"},(0,V.z0)(e.radio_proto))):null,e.type===l.sK.WIRELESS&&e.mimo?r.createElement(G.A,null,r.createElement(D.A,{color:"secondary",size:"body"},r.createElement(k.sA,{id:"COMMON_MIMO"})," ",r.createElement(k.sA,{id:"COMMON_CONFIGURATION"})),r.createElement(D.A,{color:"tertiary",size:"body"},(0,V.iP)(e.mimo))):null,r.createElement(B.A,{mac:e.mac,props:["tx_rate"]},({tx_rate:e=0})=>r.createElement(H.A,{tx_rate:e})),r.createElement(B.A,{mac:e.mac,props:["rx_rate"]},({rx_rate:e=0})=>r.createElement(K.A,{rx_rate:e})),e.ip?r.createElement(G.A,null,r.createElement(D.A,{color:"secondary",size:"body"},r.createElement(k.sA,{id:"COMMON_IP_ADDRESS"})),r.createElement(D.A,{color:"tertiary",size:"body"},e.ip)):null,r.createElement(F.A,{ipv6_address:e.ipv6_address}),e.mac?r.createElement(G.A,null,r.createElement(D.A,{color:"secondary",size:"body"},r.createElement(k.sA,{id:"COMMON_MAC_ADDRESS"})),r.createElement(D.A,{color:"tertiary",size:"body"},e.mac)):null,n?.fingerprint_device_name?r.createElement(G.A,null,r.createElement(D.A,{color:"secondary",size:"body"},r.createElement(k.sA,{id:"COMMON_MODEL"})),r.createElement(D.A,{style:{maxWidth:"250px"},color:"tertiary",size:"body",truncate:!0},n.fingerprint_device_name)):null,n?.fingerprint_device_os?r.createElement(G.A,null,r.createElement(D.A,{color:"secondary",size:"body"},r.createElement(k.sA,{id:"CLIENTS_HEADER_OS"})),r.createElement(D.A,{color:"tertiary",size:"body",truncate:!0},n.fingerprint_device_os)):null,r.createElement(B.A,{mac:e.mac,props:["tx_packets","tx_bytes"]},({tx_packets:e=0,tx_bytes:t=0})=>e&&t?r.createElement(G.A,null,r.createElement(D.A,{color:"secondary",size:"body"},r.createElement(k.sA,{id:"COMMON_ACTIVITY_DOWN_PKTS_BYTES"})),r.createElement(D.A,{color:"tertiary",size:"body"},e," / ",r.createElement(z.A,{type:"bytes",size:"body",input:t,color:"tertiary"}))):null),r.createElement(B.A,{mac:e.mac,props:["rx_packets","rx_bytes"]},({rx_packets:e=0,rx_bytes:t=0})=>e&&t?r.createElement(G.A,null,r.createElement(D.A,{color:"secondary",size:"body"},r.createElement(k.sA,{id:"COMMON_ACTIVITY_UP_PKTS_BYTES"})),r.createElement(D.A,{color:"tertiary",size:"body"},e," / ",r.createElement(z.A,{type:"bytes",size:"body",input:t,color:"tertiary"}))):null))};var j=n(822336),Y=n(592563),Q=n(624070),q=n(998837),Z=n(6510),J=n(691189),ee=n(742920),te=n(551753),ne=n(137625),re=n(675359),le=n(54087),ae=n(294201);const ie=({uplink_remote_port:e,name:t,mac:n,model:l,ups_device:a})=>{const i=(0,c.useDispatch)(),[o,s]=(0,r.useState)(!1),m=(0,r.useCallback)(()=>{i((0,J.Xj)(ae.A.OUTLET_CTL,le.CMD_PATH,{mac:a.mac,outlet_table:[{index:e}]})).catch(({msg:e})=>{i((0,re.ox)({icon:ee.C.danger,message:e||"COMMON_NOTICE_REQUEST_ERROR"}))})},[i,a.mac,e]),d=(0,r.useCallback)(()=>{s(!1)},[]),E=(0,r.useCallback)(()=>{s(!0)},[]),u=(0,r.useMemo)(()=>(0,Z.Q)({name:t,mac:n,model:l}),[t,l,n]),A=(0,c.useSelector)((0,r.useMemo)(()=>(0,g.uC)(a.mac),[a.mac]));return r.createElement(te.A,{variant:"custom",customIcon:r.createElement(Q.A,{color:j.Ay[`desktop-color-aqua-06-${(0,q.u)().themeName}`],variant:"fill",size:"original"})},r.createElement(k.sA,{id:A?"DEVICE_SAFE_SHUTDOWN_PAIRING_NOTIFICATION_ON_BATTERY_POWER":"DEVICE_SAFE_SHUTDOWN_PAIRING_NOTIFICATION_ON_AC_POWER",values:{deviceName:u,action:r.createElement(ne.A,{title:"DEVICE_SAFE_SHUTDOWN_PAIRING_NOTIFICATION_TITLE",titleValues:{deviceName:u},message:"DEVICE_SAFE_SHUTDOWN_PAIRING_NOTIFICATION_MESSAGE",handleClose:d,handleConfirm:m,buttonVariant:"danger",buttonMessage:"COMMON_ACTION_PROCEED",isOpen:o},r.createElement(Y.A,{type:"button",fontSize:"medium",onPress:E},r.createElement(k.sA,{id:"COMMON_CLICK_HERE"})))}}))},ce=(0,r.memo)(({uplink_remote_port:e,name:t,mac:n,model:l,ups_device:a,graceful_shutdown_triggered_at:i})=>i&&e&&a&&Object.keys(a).length?r.createElement(ie,{uplink_remote_port:e,name:t,mac:n,model:l,ups_device:a,graceful_shutdown_triggered_at:i}):null),oe=({activeItem:e})=>r.createElement(r.Fragment,null,r.createElement(S,{activeItem:e}),r.createElement(ce,{name:e.name,mac:e.mac,model:e.model,graceful_shutdown_triggered_at:e.graceful_shutdown_triggered_at,ups_device:e.ups_device,uplink_remote_port:e.last_uplink?.uplink_remote_port}),e.type===l.sK.WIRED&&e.detailed_states?r.createElement(a.B,{mac:e.mac,uplinkMac:e.uplink_mac,portNumber:e.sw_port,detailedStates:e.detailed_states}):null,r.createElement(i.A,{activeItem:e,isWired:e.type===l.sK.WIRED||e.is_wired}),r.createElement(X,{activeItem:e}))},451449:(e,t,n)=>{n.d(t,{I:()=>r});const r=(0,n(296540).createContext)({fields:!1,labels:!1,tooltipPopovers:!1,tooltipIcons:!1})},530813:(e,t,n)=>{n.d(t,{A:()=>u,d:()=>E});var r=n(296540),l=n(217439),a=n(705145),i=n(71479),c=n(311785),o=n(566723),s=n(699784),m=n(795097),d=n(294303);const E=(0,i.A)(m.A,(0,c.A)("showListMarkers","gap"))`
  padding-left: ${({showListMarkers:e})=>e?o.Ln:0};
  display: flex;
  flex-direction: column;
  gap: ${({gap:e})=>e??o.YC};

  > li {
    list-style-type: ${({showListMarkers:e})=>e?"disc":"none"};
  }
`;const u=function({items:e,getItemKey:t,renderItem:n,maxItemCount:i=20,renderShowMore:c,showListMarkers:m,listGap:u}){return r.createElement(d.A,{flexDirection:"column",gap:o.YC},r.createElement(E,{showListMarkers:m,gap:u},e.slice(0,i).map((e,l)=>r.createElement("li",{key:t(e,l)},r.createElement(a.A,{variant:"inherit",isTruncated:!0},n(e))))),i&&e.length>i?c?c(e):r.createElement(l.A,{variant:"inherit"},r.createElement(s.sA,{id:"COMMON_X_MORE",values:{count:e.length-i}})):null)}},533520:(e,t,n)=>{n.d(t,{x:()=>l});var r=n(296540);const l=({mac:e,detailedStates:t,uplinkDisplayName:n,portNumber:l,uplinkMac:a,PortPowerLimitExceededWarning:i,UplinkNearPowerLimitWarning:c,DeviceNearPowerLimitWarning:o=null})=>{switch(!0){case t.port_power_limit_exceeded:return r.createElement(i,{uplinkDisplayName:n,portNumber:l,uplinkMac:a});case t.uplink_near_power_limit:return r.createElement(c,{uplinkMac:a,uplinkDisplayName:n});case t.device_near_power_limit:return!!o&&r.createElement(o,{mac:e});default:return null}}},551753:(e,t,n)=>{n.d(t,{A:()=>A});var r=n(296540),l=n(758649),a=n(217439),i=n(162420),c=n(823858),o=n(793336),s=n(998837),m=n(46119),d=n(699784),E=n(224948),u=n(294303);const A=(0,r.memo)(({children:e,customIcon:t,link:n,nested:A,extra:p,variant:_="warning",...g})=>{const{motifPalette:{warning:O,danger:h}}=(0,s.u)(),C=(0,r.useMemo)(()=>{switch(_){case"warning":return r.createElement(c.A,{size:"original",color:O,variant:"fill"});case"info":return r.createElement(i.A,{isActive:!0,size:"original",variant:"fill"});case"custom":return t;default:return r.createElement(o.A,{size:"medium",color:h,variant:"fill"})}},[_,O,h,t]),I=(0,r.useCallback)(()=>{m.A.open(n)},[n]);return r.createElement(E.A,{icon:C,nested:A,...g},r.createElement(u.A,{flexDirection:"column",alignItems:"flex-start"},r.createElement(a.A,null,e),r.createElement(a.A,null,n?r.createElement(l.A,{type:"button",variant:"inline",onClick:I},r.createElement(d.sA,{id:"COMMON_LEARN_MORE"})):null),p))})},561173:(e,t,n)=>{n.d(t,{v:()=>V,A:()=>G});var r=n(469733),l=n(296540),a=n(951272),i=n(325898),c=n(23835),o=n(927099),s=n(888170),m=n(617147),d=n(618983),E=n(71479),u=n(852866),A=n(628291),p=n(38937),_=n(6510),g=n(362412),O=n(825032),h=n(566723),C=n(801081),I=n(962315),M=n(429252),N=n.n(M),y=n(189601),v=n(532419);const b=["satisfaction"],k=(e,t)=>(0,y.WY)((e,t)=>N()((0,I.A)(e,b),(0,I.A)(t,b)))((0,C.Mz)((0,v.bw)(e,["port_table"]),e=>e?.port_table?.[t]||{}),e=>e);var f=n(294303),T=n(6176),x=n(703447),L=n(699784),w=n(857301),R=n(951106),P=n(765562);const S=(0,E.A)(o.A)`
  margin-top: ${h.Ln};
  line-height: 20px;
`,D=(0,E.A)(f.A)`
  background: ${({theme:e})=>s.Ay[e.themeName===O.S.DARK?"grey-1":"white-10"]};
  border-radius: 8px;
  padding: ${h.kc};
`,z=(0,E.A)(o.A)`
  margin-left: ${h.YC};
`,$=(0,E.A)(x.A)`
  vertical-align: middle;
  width: 40px;
  height: 40px;
`,W=(0,E.A)(T.A)`
  vertical-align: middle;
`,F=(0,E.A)(f.A)`
  justify-content: center;
  align-items: center;
  flex-direction: column;
  padding-bottom: ${({theme:{spacing:e}})=>e["spacing-s"]};
`,U=(0,E.A)(g.A)`
  margin-top: ${h.Ln};
`,B=(0,E.A)(c.A)`
  margin-top: ${h.Ln};
`;var V;!function(e){e.UNIFI_CLIENT="unifiClient",e.CLIENT="client",e.AP="ap"}(V||(V={}));const H=(e,t)=>{switch(e){case V.CLIENT:case V.UNIFI_CLIENT:return(0,R.tn)(t);case V.AP:return(0,_.Q)(t);default:return null}},K=({isSuccess:e,isError:t})=>e?l.createElement(f.A,{gap:h.YC,alignItems:"center",justifyContent:"center",marginBottom:h.Ln},l.createElement(d.A,{size:"original",variant:"fill",color:s.Ay["color-success"]}),l.createElement(o.A,{size:"body"},l.createElement(L.sA,{id:"COMMON_REPORT_WIFI_EXPERIENCE_MODAL_SUBMIT_SUCCESS"}))):t?l.createElement(f.A,{gap:h.YC,alignItems:"center",justifyContent:"center",marginBottom:h.Ln},l.createElement(d.A,{size:"original",variant:"fill",color:s.Ay["color-danger"]}),l.createElement(o.A,{size:"body"},l.createElement(L.sA,{id:"COMMON_REPORT_WIFI_EXPERIENCE_MODAL_SUBMIT_ERROR"}))):null,G=({item:e,experienceGraphType:t,hideModal:n})=>{const{formatMessage:c}=(0,L.tz)(),{motif:s}=(0,i.A)(),{dirty:d,errors:E,isSubmitting:_,handleSubmit:g,setFieldValue:O,status:C={},values:I}=(0,a.j7)(),{isSuccess:M,isError:N}=C,y=w.D.map(({value:e,label:t})=>({value:e,label:c({id:t})})),v=(0,l.useCallback)((e,t)=>{O("reason",t)},[O]),b=(0,l.useCallback)((e,t)=>{O(e.target.name,t)},[O]),T=(0,l.useCallback)(e=>{g?.(e)},[g]),x="uplink_mac"in e&&e.uplink_mac,G="sw_port"in e&&e.sw_port,X=(0,l.useMemo)(()=>x&&G?k(x,G):()=>{},[x,G]),j=(0,r.useSelector)(X),Y=(0,l.useMemo)(()=>{const{satisfaction:t}="type"in e?(0,R.FX)(j,e.type,"wifi_experience_score"in e?e.wifi_experience_score:void 0):e;return t},[e,j]);return l.createElement(m.A,{isOpen:!0,onRequestClose:n,title:l.createElement(L.sA,{id:"COMMON_REPORT_WIFI_EXPERIENCE_MODAL_HEADER"}),size:"small",actions:M||N?[]:[{text:l.createElement(L.sA,{id:"COMMON_ACTION_CANCEL"}),onClick:n},{text:l.createElement(L.sA,{id:"COMMON_ACTION_SUBMIT"}),variant:"primary",onClick:T,disabled:!d||_,loader:_?"spinner":null}],...M||N?{footer:l.createElement(K,{isSuccess:M,isError:N})}:{}},l.createElement("iframe",{title:"unifi-experts-corner",width:"100%",height:"200",src:P.A.wifiPerformanceTipsVideo,frameBorder:"0"}),l.createElement(S,{color:"tertiary",size:"body"},l.createElement(L.sA,{id:"COMMON_REPORT_WIFI_EXPERIENCE_MODAL_SUBTITLE"})),l.createElement(D,{marginTop:h.Ln,gap:h.kc},l.createElement(f.A,{justifyContent:"center",alignItems:"center",flexShrink:0,flexGrow:0},((e,t)=>{switch(e){case V.CLIENT:case V.UNIFI_CLIENT:return l.createElement($,{client:t,alt:H(e,t)});case V.AP:return l.createElement(W,{model:t.model});default:return null}})(t,e)),l.createElement(f.A,{flexDirection:"column",overflow:"hidden"},l.createElement(o.A,{size:"body",truncate:!0},(0,u.c)(H(t,e),30)),Y&&-1!==Y?l.createElement(o.A,{size:"body"},l.createElement(L.sA,{id:"COMMON_WIFI_EXP"}),":",l.createElement(z,{weight:"bold",size:"body",style:{color:(0,A.L)(Y,s)}},l.createElement(L.sA,{id:(0,p.gd)(Y)}))):null)),l.createElement(F,null,l.createElement(U,{width:"100%",placeholder:c({id:"COMMON_REPORT_WIFI_EXPERIENCE_MODAL_PROBLEM_LABEL"}),options:y,variant:"secondary",onChange:v,value:I.reason}),l.createElement(B,{variant:"secondary",name:"comment",height:80,maxHeight:200,maxWidth:"100%",minWidth:349,full:!0,value:I.comment,onChange:b,placeholder:c({id:"COMMON_REPORT_WIFI_EXPERIENCE_MODAL_COMMENT_LABEL"}),invalid:E&&E.comment})))}},568560:(e,t,n)=>{n.d(t,{A:()=>p});var r=n(469733),l=n(296540),a=n(217439),i=n(895795),c=n(383653),o=n(742920),s=n(115829),m=n(39705),d=n(294303),E=n(675359),u=n(699784),A=n(348466);const p=({ipv6:e=[],enabled:t=!0,size:n="inherit",color:p="inherit",showOnlyPrefix:_=!1})=>{const g=(0,r.useDispatch)(),O=(0,l.useCallback)(e=>{navigator.clipboard.writeText(e).then(()=>{g((0,E.ox)({icon:o.C.success,message:"COMMON_COPIED_TO_CLIPBOARD"}))})},[g]),h=(0,l.useCallback)((e,t)=>{t.stopPropagation(),t.preventDefault(),O(e)},[O]),C=(0,l.useMemo)(()=>(e=>{const t=e=>(0,c.G8)(e)?0:(0,c.ZV)(e)?1:2;return e.sort((e,n)=>t(e)-t(n))})(e||[]).map(e=>{const[t,n]=e.split(A.Ed);return _?`${(0,c.Gh)(t,Number(n))}/${n}`:(0,c.z2)(e)}),[e,_]),I=C?.[0];return I?l.createElement(d.A,{maxWidth:"100%",justifyContent:"flex-end"},l.createElement(s.A,{enabled:t,flexProps:{justifyContent:"flex-end",alignItems:"center"},color:t?p:"disabled",size:n},I),C?.length>1?l.createElement(m.A,{items:C,isInteractive:!0,showListMarkers:!1,getItemKey:e=>e,renderListItem:e=>l.createElement(l.Fragment,null,e,l.createElement(i.A,{size:"original",actionable:!0,onClick:t=>h(e,t)})),renderMultipleItemsSummary:()=>null}):l.createElement(i.A,{size:"original",actionable:!0,onClick:e=>h(I,e)})):l.createElement(a.A,{size:n,color:t?p:"disabled"},l.createElement(u.sA,{id:"COMMON_FALLBACK"}))}},611123:(e,t,n)=>{n.d(t,{A:()=>g});var r=n(469733),l=n(296540),a=n(271856),i=n(758649),c=n(217439),o=n(705145),s=n(398300),m=n(566723),d=n(845030),E=n(699784),u=n(951106),A=n(691294),p=n(294303);const _=({uplinkDevice:e,client:t})=>{const n=(0,r.useDispatch)(),{formatMessage:A}=(0,E.tz)(),_=(0,u.fU)(e,t,A),g=(0,l.useCallback)(()=>{n((0,d.XP)({type:s.H.DEVICE,id:e?.mac}))},[n,e?.mac]);return _?l.createElement(p.A,{whiteSpace:"nowrap",lineHeight:"initial",gap:m.YC},l.createElement(c.A,{color:"text-3"},l.createElement(E.sA,{id:"COMMON_CONNECTED_TO"}),":"),l.createElement(a.A,{description:_,portal:!0,width:"auto"},l.createElement(p.A,{flexDirection:"column",alignItems:"stretch",overflowX:"hidden"},l.createElement(i.A,{type:"button",style:{maxWidth:"176px"},variant:"inline",size:"medium",onClick:g},l.createElement(o.A,{color:"inherit",isTruncated:!0},_))))):null},g=({uplinkDevice:e,client:t})=>t.status===A.S2.ONLINE?l.createElement(_,{uplinkDevice:e,client:t}):null},614054:(e,t,n)=>{n.d(t,{w:()=>r});const r=e=>!!e&&Object.values(e).some(Boolean)},660950:(e,t,n)=>{n.d(t,{A:()=>c});var r=n(296540),l=n(852866),a=n(699784),i=n(373934);const c=({uplinkMac:e,portNumber:t,uplinkDisplayName:n})=>r.createElement(a.sA,{id:"DEVICE_POE_PORT_OUT_OF_POWER",values:{portName:r.createElement(i.A,{mac:e,port:t},`${(0,l.c)(n)} ${(0,a.tz)().formatMessage({id:"COMMON_PORT"})} ${t}`)}})},675845:(e,t,n)=>{n.d(t,{Z:()=>l,z:()=>a});var r=n(6510);const l=(e,t)=>e?t.find(({mac:t})=>t===e):void 0,a=(e,t,n,l)=>{const a=t?` ${l({id:"DEVICE_PROPERTIES_PORT_WITH_NUMBER"},{port:t})}`:"";return e?`${e}${a}`:n?`${(0,r.Q)(n)}${a}`:l({id:"COMMON_FALLBACK"})}},689965:(e,t,n)=>{n.d(t,{A:()=>u,I:()=>r});var r,l=n(296540),a=n(822336),i=n(427853),c=n(71479),o=n(825032),s=n(566723),m=n(294303);!function(e){e.ACCORDION="accordion",e.BUTTON_LIST="buttonList"}(r||(r={}));const d=(0,c.A)(m.A,{shouldForwardProp:e=>!["marginBottom","isButtonList","margin","flex","width","padding","nested","background"].includes(e)})`
  background-color: ${({background:e,nested:t,theme:{themeName:n}})=>e||a.Ay[n===o.S.DARK?`desktop-color-neutral-${t?"00":"01"}-dark`:`desktop-color-neutral-${t?"01":"00"}-light`]};
  padding: ${({theme:e,isButtonList:t,padding:n})=>n||(t?`0 ${e.spacing["spacing-l"]}`:e.spacing["spacing-l"])};
  margin-bottom: ${({theme:e,marginBottom:t})=>t||e.spacing["spacing-l"]};
  ${({margin:e})=>e?`margin: ${e};`:""}
  border-radius: 8px;
  flex-direction: column;
  width: ${({width:e="100%"})=>e};
  flex: ${({flex:e=0})=>e};
  > :last-child {
    margin-bottom: 0;
  }
  thead {
    tr {
      height: 32px !important;
    }
    th {
      text-transform: none;
    }
  }
  ${({isButtonList:e})=>e?`\n    > div {\n      display: flex;\n      height: 48px;\n      border-bottom: ${({theme:{themeName:e}})=>a.Ay[`desktop-border-divider-${e}`]};\n      &:last-child {\n        border-bottom: none;\n      }\n    }\n  `:""}
`,E=(0,c.A)(i.A,{shouldForwardProp:e=>!["marginBottom","margin","flex","padding","nested","background"].includes(e)})`
  background-color: ${({background:e,nested:t,theme:{themeName:n}})=>e||a.Ay[n===o.S.DARK?`desktop-color-neutral-${t?"00":"01"}-dark`:`desktop-color-neutral-${t?"01":"00"}-light`]};
  margin-bottom: ${({theme:e,marginBottom:t})=>t||e.spacing["spacing-l"]};
  ${({margin:e})=>e?`margin: ${e};`:""}
  ${({padding:e})=>e?`padding: ${e};`:""}
  border-radius: 8px;
  flex-direction: column;
  flex: ${({flex:e=0})=>e};
  > :last-child {
    margin-bottom: 0;
  }
  thead {
    tr {
      height: 32px !important;
    }
    th {
      text-transform: none;
    }
  }
  > li {
    > div:first-child {
      background: ${({background:e,theme:{themeName:t}})=>e||a.Ay[t===o.S.DARK?"desktop-color-neutral-01-dark":"desktop-color-neutral-00-light"]};
      height: 48px;
      padding: 0 ${s.Ln};
    }
    > div:nth-child(2) {
      margin-bottom: 0;
      padding: 0 ${s.Ln} ${s.Ln};
      > div {
        padding: 0;
      }
    }
  }
`,u=({type:e,marginBottom:t,margin:n,padding:a,flex:i,width:c,nested:o,...s})=>"items"in s?l.createElement(E,{marginBottom:t,margin:n,padding:a,flex:i,nested:o,...s}):l.createElement(d,{nested:o,width:c,marginBottom:t,margin:n,padding:a,flex:i,isButtonList:e===r.BUTTON_LIST,...s},s.children)},766624:(e,t,n)=>{n.d(t,{A:()=>o});var r=n(296540),l=n(271856),a=n(709690),i=n(284428),c=n(566723);const o=({description:e,isInteractive:t,portal:n=!0,cursorType:o,title:s,position:m,width:d,iconProps:E,disabled:u=!1})=>{const A=(0,i.Im)()||u,p=(0,i.q)();return r.createElement(l.A,{description:e,portal:n,isInteractive:t,style:{display:"flex",alignItems:"center"},cursorType:o,title:s,position:m,width:d,disableHover:p},r.createElement(a.A,{isActive:!0,size:"original",opacity:A?c.xN:void 0,...E}))}},782558:(e,t,n)=>{n.d(t,{A:()=>o});var r=n(296540),l=n(927099),a=n(137298),i=n(699784),c=n(360113);const o=({rx_rate:e})=>e>0?r.createElement(c.A,null,r.createElement(l.A,{color:"secondary",size:"body"},r.createElement(i.sA,{id:"COMMON_RX_RATE"})),r.createElement(l.A,{color:"tertiary",size:"body"},(0,a.Up)(e))):null},795097:(e,t,n)=>{n.d(t,{A:()=>a});var r=n(71479),l=n(566723);const a=(0,r.A)("ul")`
  padding-left: ${l.Er};
  margin-bottom: 0;
  margin-top: 0;
`},819127:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(296540),l=n(766624),a=n(530813);const i=function({items:e,getItemKey:t,renderItem:n,maxItemCount:i,renderShowMore:c,showListMarkers:o,title:s,position:m,isInteractive:d,cursorType:E,listGap:u}){return r.createElement(l.A,{title:s,position:m,isInteractive:d,cursorType:E,description:r.createElement(a.A,{items:e,getItemKey:t,renderItem:n,maxItemCount:i,listGap:u,renderShowMore:c,showListMarkers:o})})}},857301:(e,t,n)=>{n.d(t,{$:()=>r,D:()=>l});const r="reportWifiExperience",l=[{value:"DROPPED_CONNECTIVITY",label:"COMMON_REPORT_WIFI_EXPERIENCE_MODAL_REASON_DROPPED_CONNECTIVITY"},{value:"POOR_LATENCY",label:"COMMON_REPORT_WIFI_EXPERIENCE_MODAL_REASON_POOR_LATENCY"},{value:"POOR_THROUGHPUT",label:"COMMON_REPORT_WIFI_EXPERIENCE_MODAL_REASON_POOR_THROUGHPUT"}]}}]);