"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[23676],{346100(e,t,s){s.d(t,{A:()=>n});const n={POWER_CYCLE_ON_AC_RECOVERY:2,POWER_BUZZER:4,SAFE_SHUTDOWN_AND_POWER_CYCLE_TIME:8}},269984(e,t,s){s.d(t,{A:()=>m,g:()=>u});var n=s(602086),i=s(977872),r=s(237725),o=s(635496),a=s(104997),l=s(101134),c=s(205521),d=s(449339),_=s(542690),A=s(302318);const u=()=>{const e=(0,i.wA)(),t=(0,r.W6)(),s=(0,l.A)(`${a.VO.CLIENTS}/${o.M.MAIN}`);return{navigateToApClients:(0,n.useCallback)((n,i,r)=>{n&&e((0,A.ai)(n)),i&&e((0,A.t6)(i)),r&&e((0,A.BG)([_.Os[r[0]]??_.KM,_.Os[r[1]]??_.Uc])),t.push(s)},[e,t,s]),openClientPropertyPanel:(0,n.useCallback)(t=>{setTimeout(()=>{e((0,c.XP)({type:d.H.CLIENT,id:t}))},250)},[e])}},m=u},177445(e,t,s){s.d(t,{A:()=>a});var n=s(602086),i=s(977872),r=s(223597),o=s(34118);const a=({client:{id:e,type:t,status:s,blocked:a},props:l,children:c})=>{const d=(0,n.useMemo)(()=>t===r.sK.VPN?r.N7.VPN:t===r.sK.TELEPORT?r.N7.TELEPORT:a?r.N7.BLOCKED:s===r.S2.OFFLINE?r.N7.OFFLINE:r.N7.ACTIVE,[t,a,s]),_=(0,i.d4)((0,n.useMemo)(()=>(0,o.kV)(e,l,d),[e,l,d]));return c((0,n.useMemo)(()=>_,[_]))}},54052(e,t,s){s.d(t,{A:()=>o});var n=s(602086),i=s(977872),r=s(670830);const o=({mac:e,props:t,children:s})=>s((0,i.d4)((0,n.useMemo)(()=>(0,r.eu)(e,t),[e,t])))},752104(e,t,s){s.d(t,{A:()=>i,Q:()=>r});var n=s(765567);const i="_",r=[n.ZM,n.Je]},635496(e,t,s){var n;s.d(t,{M:()=>n}),function(e){e.MAIN="main",e.DHCP="dhcp",e.HOTSPOT="hotspot"}(n||(n={}))},453007(e,t,s){s.d(t,{A:()=>o});var n=s(938984),i=s(247816),r=s(291508);const o=(0,i.A)(n.A,(0,r.A)("colorOverride"))`
  ${({colorOverride:e})=>e?`color: ${e} !important`:""};
`},756594(e,t,s){s.d(t,{Ay:()=>E,v$:()=>h});var n=s(274934),i=s(977872),r=s(125799),o=s(247816),a=s(409844),l=s(82939),c=s(408402),d=s(470070),_=s(897166),A=s(309130);const u=(0,o.A)("div")`
  pointer-events: none;
`,m=a.AH`
  opacity: ${A.xN};
`,x=({warning:e,children:t})=>{return e?(0,n.jsx)(c.A,{condition:!!e,wrapper:(s=e,e=>(0,n.jsx)(r.A,{description:(0,l.Kg)(s)?(0,n.jsx)(d.sA,{id:s}):s,portal:!0,isInteractive:!(0,l.Kg)(s),children:(0,n.jsx)(u,{children:e})})),children:t}):(0,n.jsx)(n.Fragment,{children:t});var s},h=({disabled:e,children:t})=>e?(0,n.jsx)(u,{className:m,style:{width:"100%"},children:t}):(0,n.jsx)(n.Fragment,{children:t}),E=({disableWithWarning:e,children:t})=>{const s=(0,i.d4)(_.EL);return(0,n.jsx)(x,{warning:e,children:e?(0,n.jsx)("div",{className:s?void 0:m,children:t}):t})}},809465(e,t,s){s.d(t,{A:()=>A});var n=s(274934),i=s(602086),r=s(977872),o=s(938984),a=s(954702),l=s(613842),c=s(976458),d=s(591256),_=s(726831);const A=(0,i.memo)(({size:e="inherit",children:t})=>{const s=(0,r.d4)(c.y$),A=(0,r.d4)(d.PO),u=(0,i.useCallback)(()=>{s?s({appId:"network"}):l.A.open(`${_.A.accountSupportForm}?console=${A}&application=network`)},[s,A]);return(0,n.jsx)(a.A,{fontSize:"medium",type:"button",onPress:u,children:(0,n.jsx)(o.A,{size:e,color:"inherit",children:t})})})},398658(e,t,s){s.d(t,{A:()=>d});var n=s(274934),i=s(814557),r=s(938984),o=s(897688),a=s(263705),l=s(309130),c=s(470070);const d=()=>{const{themeName:e}=(0,a.u)();return(0,n.jsx)(o.A,{style:{backgroundColor:i.Ay[`desktop-color-green-06-${e}`],marginRight:l.YC},children:(0,n.jsx)(r.A,{size:"small",color:"neutral-inverse",children:(0,n.jsx)(c.sA,{id:"COMMON_MESH"})})})}},348871(e,t,s){s.d(t,{Ay:()=>O,KK:()=>C,gJ:()=>I});var n=s(274934),i=s(938984),r=s(814557),o=s(247816),a=s(586566),l=s(61322),c=s(345272),d=s(756594),_=s(470070),A=s(561614),u=s(726831),m=s(186086),x=s(398658),h=s(793442),E=s(100978),p=s(865655),j=s(421314);const C={CHANNEL:220,MIMO:40,STANDARD:55,CLIENTS:66},I=(0,o.A)(E.A)`
  height: ${l.I.ROW_HEIGHT-1}px;
  border-bottom: ${({theme:{themeName:e}})=>r.Ay[`desktop-border-divider-${e}`]};
  align-items: center;
  justify-content: space-between;
`,O=({channel:e,ht:t,radio:s,mimo:r,standard:o,disabled:l,mac:O,children:N,is_device_afc_supported:g,afc_enabled:v,afc_done:M,afc_initialize_timeout_at:R,is_device_outdoor_mode_supported:b,has_enabled_6Ghz:T,is_disabled_all_6ghz_radios:D,isMesh:S})=>{let y=null;const f=(0,a.gR)({afc_initialize_timeout_at:R});return s===A.sx.RADIO_6E&&b&&g&&l&&D&&T?y=(0,n.jsx)(_.sA,{id:"DEVICE_TRANSMIT_POWER_DISABLED_6GHZ_WARNING",values:{link:(0,n.jsx)(m.A,{mac:O,children:(0,n.jsx)(_.sA,{id:"COMMON_CLICK_TO_ENABLE"})}),br:_.br}}):s===A.sx.RADIO_6E&&b&&g&&v&&void 0!==M&&!M&&!f&&!l&&T?y=(0,n.jsx)(_.sA,{id:"DEVICE_DID_NOT_RECEIVE_AFC_RESPONSE_WARNING",values:{link:(0,n.jsx)(h.A,{id:"COMMON_LEARN_MORE",href:u.A.afcArticle})}}):l&&(y=(0,n.jsx)(_.sA,{id:"DEVICE_RADIO_DISABLED_WARNING",values:{link:(0,n.jsx)(p.A,{mac:O,band:s,children:(0,n.jsx)(_.sA,{id:"COMMON_CLICK_TO_ENABLE"})})}})),(0,n.jsx)(d.Ay,{disableWithWarning:y,children:(0,n.jsxs)(I,{width:"100%",children:[(0,n.jsxs)(E.A,{width:C.CHANNEL,children:[(0,n.jsx)(i.A,{weight:"bold",children:(0,n.jsx)(_.sA,void 0!==e?{id:"COMMON_CHANNEL_RADIO_CHANNEL",values:{channel:e}}:{id:"COMMON_FALLBACK"})}),(0,n.jsxs)(j.A,{size:"medium",children:[" (",s&&c.A[s.toUpperCase()]?.frequency||(0,n.jsx)(_.sA,{id:"COMMON_FALLBACK"}),", ",t||(0,n.jsx)(_.sA,{id:"COMMON_FALLBACK"})," ",(0,n.jsx)(_.sA,{id:"COMMON_UNIT_MHZ"}),")"]}),S?(0,n.jsx)(x.A,{}):null]}),(0,n.jsx)(E.A,{width:C.MIMO,children:(0,n.jsx)(i.A,{children:r||(0,n.jsx)(_.sA,{id:"COMMON_FALLBACK"})})}),(0,n.jsx)(E.A,{width:C.STANDARD,children:(0,n.jsx)(i.A,{children:o||(0,n.jsx)(_.sA,{id:"COMMON_FALLBACK"})})}),N]})})}},420240(e,t,s){s.d(t,{A:()=>o});var n=s(274934),i=s(470070),r=s(927316);const o=({name:e,radio_table:t,radio_table_stats:s})=>{const o=(0,r.ry)({name:e,radio_table:t,radio_table_stats:s});return(0,n.jsx)(n.Fragment,{children:o&&"auto"!==o?o:(0,n.jsx)(i.sA,{id:"COMMON_AUTO"})})}},347500(e,t,s){s.d(t,{A:()=>a});var n=s(274934),i=s(602086),r=s(898809),o=s(254590);const a=({startTimestamp:e,uptimeParams:t})=>{const s=(0,i.useRef)(null),a=(0,i.useRef)(null),l=(0,i.useCallback)(t=>{s.current&&(s.current.innerText=e?(0,r.Ay)(Math.floor(Date.now()/1e3)-e,t).join(" "):o.L,a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{l(t)},1e3))},[e]);return(0,i.useEffect)(()=>(e&&l(t),()=>{a.current&&clearTimeout(a.current)}),[e,t,l]),(0,n.jsx)("span",{ref:s})}},164487(e,t,s){s.d(t,{A:()=>c});var n=s(274934),i=s(632622),r=s(184931),o=s(309130),a=s(304151),l=s(100978);const c=({tooltip:e,htmlFor:t,children:s,labelProps:c,wrapperProps:d,tooltipProps:_})=>{const A=(0,r.iL)();return(0,n.jsxs)(l.A,{alignItems:"center",gap:o.YC,...d,children:[(0,n.jsx)(i.A,{as:"label",htmlFor:t,color:"tertiary",...c,style:{opacity:A?o.xN:void 0,...c?.style},children:s}),e?(0,n.jsx)(a.A,{description:e,..._}):null]})}},89469(e,t,s){s.d(t,{A:()=>a});var n=s(274934),i=s(602086),r=s(309130),o=s(100978);const a=(0,i.forwardRef)((e,t)=>(0,n.jsx)(o.A,{ref:t,flexDirection:"column",gap:r.kc,width:"100%",...e}))},309675(e,t,s){s.d(t,{A:()=>a});var n=s(274934),i=s(814557),r=s(600191),o=s(263705);const a=e=>{const{themeName:t}=(0,o.u)();return(0,n.jsx)(r.A,{size:"original",variant:"fill",color:i.Ay[`desktop-color-orange-06-${t}`],...e})}},594492(e,t,s){s.d(t,{A:()=>_});var n=s(274934),i=s(602086),r=s(599110),o=s(247816),a=s(309130),l=s(470070),c=s(291508);const d=(0,o.A)("footer",(0,c.A)("hasFormResetButton"))`
  display: flex;
  justify-content: ${({hasFormResetButton:e})=>e?"space-between":"flex-end"};
  padding: ${a.S2} ${a.fS};
  gap: ${a.kc};
`,_=({allowCancel:e,isDirty:t,isInvalid:s,isSubmitting:o,onFormSubmit:a,onFormReset:c,onFormCancel:_,className:A,submitButtonText:u,customButton:m,applyButton:x,applyButtonFirst:h,hideCancelButton:E,form:p})=>{const j=(0,i.useMemo)(()=>x||(0,n.jsx)(r.A,{name:"submit",variant:"primary",type:"submit",onClick:a,disabled:!t||s||o,form:p,children:(0,n.jsx)(l.sA,{id:u||"COMMON_ACTION_APPLY_CHANGES"})}),[x,p,t,s,o,a,u]);return(0,n.jsxs)(d,{className:A,hasFormResetButton:!!c,children:[h?j:m,E?null:(0,n.jsx)(r.A,{name:"cancel",variant:"default",type:"button",onClick:_,disabled:!e&&!t,children:(0,n.jsx)(l.sA,{id:"COMMON_ACTION_CANCEL"})}),c?(0,n.jsx)(r.A,{name:"reset",variant:"default",type:"button",onClick:c,disabled:!t,children:(0,n.jsx)(l.sA,{id:"COMMON_ACTION_RESET_TO_DEFAULT"})}):null,h?m:j]})}},115114(e,t,s){s.d(t,{A:()=>d});var n=s(274934),i=s(232932),r=s(247816),o=s(409844),a=s(594492);const l=(0,r.A)("div")`
  height: 66px;
`,c=o.AH`
  padding: 0px !important;
`,d=({isDirty:e,onFormSubmit:t,onFormCancel:s,isInvalid:r,...o})=>e?(0,n.jsx)(i.A,{children:(0,n.jsx)(a.A,{isDirty:e,onFormCancel:s,onFormSubmit:t,isInvalid:r,className:c,...o})}):(0,n.jsx)(l,{})},260067(e,t,s){s.d(t,{A:()=>P});var n=s(274934),i=s(814557),r=s(977872),o=s(602086),a=s(938984),l=s(920679),c=s(263705),d=s(954702),_=s(293668),A=s(43506),u=s(309130),m=s(420240),x=s(348871),h=s(577141),E=s(502129),p=s(100978),j=s(470070),C=s(561614),I=s(956978),O=s(434521),N=s(927316),g=s(857780),v=s(754924),M=s(969288),R=s(269984),b=s(309675),T=s(724081),D=s(549059),S=s(244081),y=s(646077);const f=({uplink:e,mac:t,type:s,radio_table:T=[],radio_table_stats:D=[],vap_table:S=[],hideChannelInfo:f,deviceState:P,support_wifi6e:w,hideClientColumn:L,is_device_afc_supported:k,afc_enabled:V,afc_done:W,afc_initialize_timeout_at:U,is_device_outdoor_mode_supported:z,paddingBottom:F,isMloUplinkConnection:B=!1})=>{const{themeName:G}=(0,c.u)(),$=(0,r.d4)(h.YG),H=(0,A.A)(M._L),{navigateToApClients:Y}=(0,R.g)(),K=(0,o.useMemo)(()=>!!P&&(0,O.wk)(P),[P]),X=(0,o.useMemo)(()=>!!P&&(0,O.C1)(P),[P]),Z=(0,o.useMemo)(()=>(0,I.bgh)(T),[T]),q=(0,o.useMemo)(()=>(0,I.v0B)(T),[T]).length===Z.length,Q=(0,r.d4)(h.dA),J=(0,r.d4)((0,o.useMemo)(()=>(0,v.KI)(t),[t])),ee=(0,o.useCallback)(t=>e?.type===g.au.WIRELESS&&t===e?.radio,[e?.type,e?.radio]),te=(0,o.useCallback)(e=>{Y([t],[e])},[t,Y]),se=(0,o.useMemo)(()=>[...T].sort(N.j3).map(({radio:e,ht:s,radio_caps:i,is_11ax:r,is_11be:o,name:a,tx_power_mode:c})=>{if(!e||e===C.sx.RADIO_6E&&!w)return null;const A=c===C.PB.DISABLED,{bw:h,num_sta:E=0}=D.find(e=>e.name===a)||{};return(0,n.jsx)(x.Ay,{radio:e,channel:(0,n.jsx)(m.A,{name:a,radio_table:T,radio_table_stats:D}),ht:(0,N.Aq)({radio:e,ht:s},{bw:h}),mimo:(0,N.e7)(i),standard:(0,_.lT)({radio:e,is_11ax:r,is_11be:o}),disabled:A,mac:t,is_device_afc_supported:k,afc_enabled:V,afc_done:W,afc_initialize_timeout_at:U,is_device_outdoor_mode_supported:z,is_disabled_all_6ghz_radios:q,has_enabled_6Ghz:Q||J,isMesh:ee(e)&&!B,children:L?null:(0,n.jsx)(p.A,{width:x.KK.CLIENTS,flexDirection:"row",gap:u.YC,alignItems:"center",children:(0,n.jsxs)(d.A,{onPress:()=>te(e),children:[(0,n.jsx)(l.A,{size:"original"}),(0,n.jsx)(y.mb,{children:E})]})})},`${e}-${a}`)}),[T,w,D,t,k,V,W,U,z,q,Q,J,ee,L,te,B]);return(0,I.r$V)({type:s})||!(se.length>0)||f&&!1!==$?null:(0,n.jsxs)(p.A,{marginTop:u.Ln,flexDirection:"column",paddingBottom:F,children:[f?null:se,!1===$&&K&&!X&&S.length?(0,n.jsxs)(p.A,{borderBottom:`1px solid ${i.Ay[`desktop-color-neutral-03-${G}`]}`,alignItems:"flex-start",gap:u.kc,paddingTop:u.kc,paddingBottom:u.kc,children:[(0,n.jsx)(b.A,{color:i.Ay[`desktop-color-orange-06-${G}`],variant:"fill",size:"original"}),(0,n.jsx)(a.A,{size:"medium",children:(0,n.jsx)(j.sA,{id:"COMMON_6GHZ_BAND_NOT_UTILIZED",values:{link:(0,n.jsx)(E.A,{to:H,children:(0,n.jsx)(j.sA,{id:"COMMON_LINK_WIFI_SETTINGS"})})}})})]}):null]})},P=e=>(0,T.A)([(0,D.P)(void 0,{crudCacheStrategy:{type:S.e.CACHE}})],(0,n.jsx)(f,{...e}))},646077(e,t,s){s.d(t,{FN:()=>f,XG:()=>T,ZP:()=>D,dC:()=>b,hW:()=>v,kD:()=>P,mb:()=>g,pm:()=>M});var n=s(274934),i=s(814557),r=s(602086),o=s(125799),a=s(367551),l=s(938984),c=s(95032),d=s(247816),_=s(442175),A=s(898809),u=s(455425),m=s(309130),x=s(347500),h=s(907488),E=s(100978),p=s(470070),j=s(54052),C=s(177445),I=s(223597),O=s(128066);const N=(0,d.A)(E.A)`
  > div > div {
    height: 8px;
    margin: 0;
    div {
      height: inherit !important;
    }
  }
`,g=(0,d.A)(c.A)`
  :hover {
    color: ${({theme:{themeName:e}})=>i.Ay[`desktop-color-ublue-06-${e}`]};
  }
`,v=({score:e,headerTranslationKey:t,scoreTranslationKey:s,color:i,hideScore:r})=>(0,n.jsxs)(E.A,{justifyContent:"space-between",children:[(0,n.jsx)(l.A,{color:"text-1",size:"medium",weight:"bold",children:(0,n.jsx)(p.sA,{id:t})}),(0,n.jsxs)(l.A,{size:"medium",style:{color:i},children:[(0,n.jsx)(p.sA,{id:s}),e>=0&&e<=100&&!r?(0,n.jsxs)(n.Fragment,{children:[" (",e,"%)"]}):null]})]}),M=({wiredRateMbps:e,motif:t})=>(0,n.jsxs)(E.A,{justifyContent:"space-between",children:[(0,n.jsx)(l.A,{size:"medium",weight:"bold",children:(0,n.jsx)(p.sA,{id:"COMMON_WIRED_EXPERIENCE"})}),(0,n.jsx)(l.A,{size:"medium",...e>0?{style:{color:(0,O.xe)(e,t)}}:{color:"disabled"},children:e>0?(0,_.ir)(e):(0,n.jsx)(p.sA,{id:"COMMON_FALLBACK"})})]}),R=({color:e,tooltipColor:t,labelTranslationKey:s,scoreTranslationKey:i,score:r,hideScore:o=!1,wiredRateMbps:a,not_reported:c,from:d,to:_})=>(0,n.jsxs)(E.A,{flexDirection:"column",whiteSpace:"nowrap",children:[(0,n.jsxs)(E.A,{justifyContent:"space-between",children:[(0,n.jsx)(l.A,{weight:"bold",color:"text-1",children:(0,n.jsx)(p.sA,{id:s})}),(0,n.jsxs)(l.A,{style:{color:t||e},children:[(0,n.jsx)(p.sA,{id:c?"COMMON_NOT_REPORTED":i,values:{value:a?a<1e3?a:a/1e3:0}}),r>=0&&r<=100&&!c&&!o?(0,n.jsxs)(n.Fragment,{children:[" (",r,"%)"]}):null]})]}),(0,n.jsxs)(E.A,{justifyContent:"space-between",children:[(0,n.jsx)(E.A,{marginRight:m.Ln,children:(0,n.jsx)(l.A,{color:"text-1",children:(0,n.jsx)(p.sA,{id:"COMMON_TIME"})})}),(0,n.jsxs)(l.A,{children:[d," - ",_]})]})]}),b=(0,r.memo)(({stackedBarItems:e,siteTimezone:t,language:s,selfHourCycle:i,hideScore:r=!1,wiredRateMbps:o,labelTranslationKey:l})=>(0,n.jsx)(N,{children:(0,n.jsx)(a.A,{items:e,rounded:!0,itemTooltip:({score:e,color:a,tooltipColor:c,translationKey:d,timestamp:_,nextTimestamp:A,not_reported:u})=>({animate:!1,delay:.2,message:(0,n.jsx)(R,{color:a,tooltipColor:c,labelTranslationKey:l,scoreTranslationKey:d,score:e,hideScore:r,not_reported:u,wiredRateMbps:o,from:new Intl.DateTimeFormat(s,{timeZone:t,hourCycle:i,hour:"numeric",minute:"2-digit",day:"numeric",month:"short"}).format(_),to:new Intl.DateTimeFormat(s,{timeZone:t,hourCycle:i,hour:"numeric",minute:"2-digit",day:"numeric",month:"short"}).format(A)}),width:"auto",maxWidth:"auto"})})})),T=({siteTimezone:e,selfHourCycle:t,startTime:s,language:i})=>(0,n.jsxs)(E.A,{justifyContent:"space-between",marginBottom:m.kc,children:[(0,n.jsx)(l.A,{color:"text-3",size:"small",children:new Intl.DateTimeFormat(i,{timeZone:e,hourCycle:t,hour:"numeric",minute:"2-digit"}).format(s||Date.now()-432e5)}),(0,n.jsx)(l.A,{color:"text-3",size:"small",children:new Intl.DateTimeFormat(i,{timeZone:e,hourCycle:t,hour:"numeric",minute:"2-digit"}).format(s?s+432e5:Date.now())}),(0,n.jsx)(l.A,{color:"text-3",size:"small",children:(0,n.jsx)(p.sA,{id:"COMMON_NOW"})})]}),D=({activeItem:e,isUnifiDeviceClient:t=!1})=>{const s=(0,r.useMemo)(()=>t?j.A:C.A,[t]);return(0,n.jsx)(s,{mac:e.mac,client:e,props:["tx_bytes-r","rx_bytes-r"],children:({"tx_bytes-r":e=0,"rx_bytes-r":t=0})=>(0,n.jsxs)(E.A,{children:[(0,n.jsx)(h.A,{style:{marginRight:"6px"},bytesPerSecond:e,direction:"down",size:"medium",iconStyle:{width:"16px",height:"16px",marginRight:"2px"}}),(0,n.jsx)(h.A,{bytesPerSecond:t,direction:"up",size:"medium",iconStyle:{width:"16px",height:"16px",marginRight:"2px"}})]})})},S=e=>[A.Au.HOURS,A.Au.MINUTES,Math.floor((Date.now()-new Date(1e3*e).getTime())/u.jU)<1?A.Au.SECONDS:A.Au.DAYS],y=(0,r.memo)(({id:e,startTimestamp:t})=>(0,n.jsx)(o.A,{width:100,description:(0,n.jsx)(c.A,{size:"small",color:"text-1",isCentered:!0,style:{width:"100%"},children:(0,n.jsx)(p.sA,{id:e})}),children:(0,n.jsx)(l.A,{size:"medium",color:"text-2",children:(0,n.jsx)(x.A,{startTimestamp:t,uptimeParams:S(t)})})})),f=(0,r.memo)(({status:e,assoc_time:t,last_seen:s})=>e===I.S2.ONLINE&&t?(0,n.jsx)(y,{id:"COMMON_UPTIME",startTimestamp:t}):e===I.S2.OFFLINE&&s?(0,n.jsx)(y,{id:"COMMON_LAST_SEEN",startTimestamp:s}):null),P=({uptime:e,last_seen:t})=>e>=0?(0,n.jsx)(o.A,{description:(0,n.jsx)(p.sA,{id:"COMMON_UPTIME"}),children:(0,n.jsx)(l.A,{size:"medium",children:(0,A.Ay)(e)})}):t?(0,n.jsxs)(E.A,{width:"100%",whiteSpace:"nowrap",justifyContent:"flex-end",children:[(0,n.jsx)(l.A,{size:"medium",children:(0,n.jsx)(p.sA,{id:"COMMON_LAST_SEEN"})})," ",(0,n.jsx)(l.A,{size:"medium",color:"inherit",children:(0,n.jsx)(x.A,{startTimestamp:t,uptimeParams:S(t)})})]}):null},254193(e,t,s){s.d(t,{A:()=>l});var n=s(274934),i=s(602086),r=s(954702),o=s(688684),a=s(316628);const l=({value:e})=>{const t=(0,a.A)(),s=(0,i.useCallback)(()=>t(e),[e,t]);return(0,n.jsx)(r.A,{onPress:s,variant:"neutral",children:(0,n.jsx)(o.A,{size:"original"})})}},382583(e,t,s){s.d(t,{A:()=>A});var n=s(274934),i=s(602086),r=s(938984),o=s(95032),a=s(977872),l=s(421314),c=s(470070),d=s(197571),_=s(664092);const A=({connection_network_id:e})=>{const t=(0,a.d4)(d.Tn),s=(0,i.useMemo)(()=>e?t.find(t=>t._id===e):void 0,[t,e]);return s?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(_.A,{children:[(0,n.jsx)(r.A,{color:"text-2",size:"medium",children:(0,n.jsx)(c.sA,{id:"COMMON_NETWORK"})}),(0,n.jsx)(l.A,{color:"text-3",size:"medium",flexProps:{justifyContent:"flex-end"},children:s.name})]}),null!=s.vlan?(0,n.jsxs)(_.A,{children:[(0,n.jsx)(r.A,{color:"text-2",size:"medium",children:(0,n.jsx)(c.sA,{id:"COMMON_VLAN_ID"})}),(0,n.jsx)(o.A,{color:"text-3",size:"medium",isTruncated:!0,children:s.vlan})]}):null]}):null}},446722(e,t,s){s.d(t,{A:()=>d});var n=s(274934),i=s(125799),r=s(938984),o=s(241365),a=s(600191),l=s(470070),c=s(664092);const d=({has_temperature:e=!1,overheating:t=!1,general_temperature:s})=>e&&Number.isFinite(s)?(0,n.jsxs)(c.A,{children:[(0,n.jsx)(r.A,{color:"text-2",size:"medium",children:(0,n.jsx)(l.sA,{id:"COMMON_TEMPERATURE"})}),(0,n.jsx)(r.A,{color:"text-3",size:"medium",children:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.sA,{id:"DEVICE_PROPERTY_OVERVIEW_TEMPERATURE_VALUE",values:{temperature:s}}),t?(0,n.jsx)(i.A,{description:(0,n.jsx)(l.sA,{id:"DEVICE_PROPERTY_OVERVIEW_TEMPERATURE_OVERHEATING"}),width:180,position:"left",className:"ml-1",style:{display:"inline-block",verticalAlign:"text-bottom"},children:(0,n.jsx)(a.A,{style:{color:o.Ay["color-danger"]}})}):null]})})]}):null},773351(e,t,s){s.d(t,{A:()=>N});var n=s(274934),i=s(602086),r=s(938984),o=s(814557),a=s(600191),l=s(343954),c=s(247816),d=s(309130),_=s(100978),A=s(470070),u=s(708861),m=s(956978),x=s(434521),h=s(251323),E=s(332522),p=s(713053);const j=(0,c.A)("div")`
  display: flex;
  flex-direction: column;
`,C=(0,c.A)("div")`
  margin-top: ${d.Ln};
  padding-top: ${d.Ln};
  border-top: ${({theme:{themeName:e}})=>o.Ay[`desktop-border-divider-${e}`]};

  div:first-child {
    margin-bottom: ${d.xO};
  }
`,I=(0,c.A)(a.A)`
  color: ${({theme:{themeName:e}})=>o.Ay[`desktop-color-orange-06-${e}`]};
  height: 18px;
  width: 18px;
  margin-right: 10px;
`,O=(0,c.A)(l.A)`
  color: ${({theme:{themeName:e}})=>o.Ay[`desktop-color-green-06-${e}`]};
  height: 18px;
  width: 18px;
  margin-right: 10px;
`,N=({activeItem:e,activeItem:{outlet_table:t,outlet_ac_power_budget:s,outlet_ac_power_consumption:o,port_table:a},hidePorts:l,noDivider:c,gap:N=d.xO,legend:g,verticalLegend:v,tooltipPlacement:M="bottom end"})=>{const{usedPower:R,maxPower:b}=(0,i.useMemo)(()=>(0,u.hf)({outlet_table:t,outlet_ac_power_budget:s,outlet_ac_power_consumption:o}),[t,s,o]),T=(0,m.Tl7)(e)||(0,m.kYz)(e);return(0,n.jsxs)(j,{children:[(0,n.jsxs)(_.A,{justifyContent:"center",gap:N,alignItems:v?"center":void 0,children:[(0,n.jsx)(_.A,{flexDirection:"column",children:(0,n.jsx)(E.A,{disableOnPortClick:!0,activeItem:e,tooltipPlacement:M,isEU:(0,m.goQ)(e),offline:(0,m.aK8)((0,x.S9)(e))})}),a&&!l?(0,n.jsx)("div",{children:(0,n.jsx)(h.A,{activeItem:e,portSizeOverride:"19px",disableOnPortClick:T})}):null,v]}),v?null:g||(0,n.jsx)(p.Ay,{activeItem:e,noTopBorder:c}),R>b?(0,n.jsxs)(C,{children:[(0,n.jsxs)(_.A,{justifyContent:"space-between",children:[(0,n.jsx)(I,{}),(0,n.jsx)(r.A,{size:"small",children:(0,n.jsx)(A.sA,{id:"DEVICE_PROPERTIES_OUTLET_POWER_OVERLOAD_WARNING"})})]}),(0,n.jsxs)(_.A,{justifyContent:"space-between",children:[(0,n.jsx)(O,{}),(0,n.jsx)(r.A,{size:"small",children:(0,n.jsx)(A.sA,{id:"DEVICE_PROPERTIES_OUTLET_POWER_OVERLOAD_INFO"})})]})]}):null]})}},666461(e,t,s){s.d(t,{Ay:()=>x,u6:()=>m});var n=s(274934),i=s(814557),r=s(245505),o=s(247816),a=s(263705),l=s(309130),c=s(100978),d=s(470070),_=s(713053);const A=()=>{const{themeName:e,motifPalette:{lime06:t,uBlue01:s}}=(0,a.u)();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(_.Jv,{icon:(0,n.jsx)(_.RH,{status:"positive"}),label:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(d.sA,{id:"COMMON_ENABLED"})," / ",(0,n.jsx)(d.sA,{id:"COMMON_MEDIA_GE"})]})}),(0,n.jsx)(_.Jv,{icon:(0,n.jsx)(_.RH,{color:t}),label:(0,n.jsx)(d.sA,{id:"COMMON_MEDIA_FE"})}),(0,n.jsx)(_.Jv,{icon:(0,n.jsx)(_.RH,{color:i.Ay[`desktop-color-neutral-05-${e}`]}),label:(0,n.jsx)(d.sA,{id:"DEVICE_NOT_POWERED"})}),(0,n.jsx)(_.Jv,{icon:(0,n.jsx)(r.A,{color:i.Ay[`desktop-color-neutral-08-${e}`]}),label:(0,n.jsx)(d.sA,{id:"DEVICE_BATTERY_BACKED"})}),(0,n.jsx)(_.Jv,{icon:(0,n.jsx)(_.RH,{borderColor:i.Ay[`desktop-color-ublue-03-${e}`],background:s}),label:(0,n.jsx)(d.sA,{id:"DEVICE_SURGE_NETWORK"})})]})},u=(0,o.A)(_.cs)`
  grid-template-columns: repeat(4, minmax(min-content, 0.5fr));
`,m=()=>(0,n.jsx)(u,{noTopBorder:!0,children:(0,n.jsx)(A,{})}),x=()=>(0,n.jsx)(c.A,{flexDirection:"column",gap:l.YC,children:(0,n.jsx)(A,{})})},209466(e,t,s){s.r(t),s.d(t,{default:()=>Os});var n=s(274934),i=s(142757),r=s(347625),o=s(309130),a=s(814557),l=s(938984),c=s(600191),d=s(263705),_=s(470070),A=s(100978);const u=({name:e})=>{const{themeName:t}=(0,d.u)();return(0,n.jsxs)(A.A,{gap:o.kc,children:[(0,n.jsx)(c.A,{size:"original",color:a.Ay[`desktop-color-orange-06-${t}`],variant:"fill"}),(0,n.jsx)(l.A,{size:"medium",color:"text-1",children:(0,n.jsx)(_.sA,{id:"DEVICE_WARNING_BATTERY_IN_USE",values:{device:e}})})]})};var m=s(535322),x=s(956978),h=s(853109),E=s(772609),p=s(900302),j=s(37420),C=s(453007),I=s(857780);const O={[I.W4.USWDA23]:60,[I.W4.USWDA24]:60,[I.W4.USWDA25]:100,[I.W4.USWDA26]:100},N=({current:e,max:t,model:s=""})=>{const{themeName:i}=(0,d.u)(),r=O[s]||0,c=e<r,u=c?r:e,m=t?100*u/t:0,x=a.Ay[`${(e=>{switch(!0){case e<80:return"desktop-color-green-06";case e<110:return"desktop-color-lime-06";case e<120:return"desktop-color-orange-06";case e>=120:return"desktop-color-red-06";default:return"desktop-color-green-06"}})(m)}-${i}`];return(0,n.jsxs)(A.A,{flexDirection:"column",gap:o.kc,children:[(0,n.jsxs)(A.A,{justifyContent:"space-between",children:[(0,n.jsxs)(j.A,{variant:"medium",children:[(0,n.jsx)(_.sA,{id:"DEVICE_SURGE"})," / ",(0,n.jsx)(_.sA,{id:"DEVICE_HEADER_POWER_UTILIZATION"})]}),(0,n.jsx)(A.A,{gap:o.YC,alignItems:"baseline",children:(0,n.jsxs)(A.A,{gap:o.YC,alignItems:"center",children:[(0,n.jsx)(l.A,{size:"medium",color:"text-3",children:(0,n.jsx)(_.sA,{id:"COMMON_UNIT_WATTS_SHORT",values:{value:[c?"<":"",u.toFixed(2),"/",t].join("")}})}),(0,n.jsx)(p.A,{orientation:"vertical",style:{height:16},color:a.Ay[`desktop-color-neutral-03-${i}`]}),(0,n.jsxs)(C.A,{size:"medium",colorOverride:x,children:[c?"0-":"",`${Math.round(m)}%`]})]})})]}),(0,n.jsx)(E.A,{size:8,variant:"success",value:m,color:x})]})};var g=s(773351),v=s(203155),M=s(383550),R=s(977872),b=s(42220),T=s(630849),D=s(436417),S=s(795206),y=s(115114),f=s(325461);const P=f.Ay.object({outlet_power_cycle_on_ac_recovery_enabled:f.Ay.boolean().optional(),outlet_power_cycle_on_ac_recovery_seconds:f.Ay.number().int().min(60).max(600),ups_shutdown_remaining_minutes:f.Ay.number().int().min(2).max(15)}),w="upsTowerOverviewForm",L=({children:e,activeItem:{_id:t,mac:s,outlet_power_cycle_on_ac_recovery_enabled:i,outlet_power_cycle_on_ac_recovery_seconds:r,ups_shutdown_remaining_minutes:o}})=>{const a=(0,R.wA)(),l=(0,T.I)(),c=(0,D.m)({schema:P,defaultValues:{outlet_power_cycle_on_ac_recovery_enabled:i,outlet_power_cycle_on_ac_recovery_seconds:r??60,ups_shutdown_remaining_minutes:o??5}}),{handleSubmit:d,formState:{isDirty:_,isSubmitting:A},reset:u}=c,m=d(async e=>a((0,S.ex)(e,t,s,{extend:!0})).catch(l).then(()=>u(e)));return(0,n.jsxs)("form",{id:w,onSubmit:m,children:[(0,n.jsx)(b.Op,{...c,children:e}),(0,n.jsx)(y.A,{form:w,isDirty:_,onFormCancel:u,isSubmitting:A})]})};var k=s(906701),V=s(893762),W=s(446722),U=s(382583),z=s(948803),F=s(924453),B=s(665367),G=s(597377),$=s(643334),H=s(664092);const Y=({battpool:{device_total_power_output:e,device_output_current:t,device_output_voltage:s,device_total_power_factor:i}})=>(0,n.jsxs)(n.Fragment,{children:[e?(0,n.jsxs)(H.A,{children:[(0,n.jsx)(l.A,{size:"medium",children:(0,n.jsx)(_.sA,{id:"COMMON_POWER"})}),(0,n.jsx)(l.A,{color:"text-3",size:"medium",children:(0,n.jsx)(_.sA,{id:"COMMON_UNIT_WATTS_SHORT",values:{value:Number(e).toFixed(2)}})})]}):null,t?(0,n.jsxs)(H.A,{children:[(0,n.jsx)(l.A,{size:"medium",children:(0,n.jsx)(_.sA,{id:"COMMON_CURRENT"})}),(0,n.jsx)(l.A,{color:"text-3",size:"medium",children:(0,n.jsx)(_.sA,{id:"COMMON_UNIT_AMPERES_SHORT",values:{value:Number(t).toFixed(2)}})})]}):null,s?(0,n.jsxs)(H.A,{children:[(0,n.jsx)(l.A,{size:"medium",children:(0,n.jsx)(_.sA,{id:"COMMON_VOLTAGE"})}),(0,n.jsx)(l.A,{color:"text-3",size:"medium",children:(0,n.jsx)(_.sA,{id:"COMMON_UNIT_VOLTAGE_SHORT",values:{value:Number(s).toFixed(2)}})})]}):null,i?(0,n.jsxs)(H.A,{children:[(0,n.jsx)(l.A,{size:"medium",children:(0,n.jsx)(_.sA,{id:"DEVICE_HEADER_POWER_FACTOR"})}),(0,n.jsx)(l.A,{color:"text-3",size:"medium",children:Number(i).toFixed(2)})]}):null]}),K=({name:e,model:t,ip:s,lan_ip:i,ipv6:r,mac:o,connection_network_id:a,displayable_version:l,uptime:c,has_temperature:d,overheating:_,general_temperature:u,vbms_table:m,type:x,local_uplink_port:h,deviceState:E,ethernet_overrides:p,port_table:j,uplink:C,device_mode_override:I})=>(0,n.jsxs)(A.A,{flexDirection:"column",children:[(0,n.jsx)(z.A,{model:t}),(0,n.jsx)(B.A,{local_uplink_port:h}),(0,n.jsx)(G.A,{ip:s,lan_ip:i,type:x,ethernet_overrides:p,port_table:j,uplink:C,device_mode_override:I}),(0,n.jsx)(k.A,{ipv6_address:r}),(0,n.jsx)(U.A,{connection_network_id:a}),(0,n.jsx)(F.A,{mac:o}),(0,n.jsx)($.A,{name:e,model:t,mac:o,type:x,displayable_version:l,uptime:c,deviceState:E}),(0,n.jsx)(V.A,{uptime:c}),m?.battpool?(0,n.jsx)(Y,{battpool:m.battpool}):null,(0,n.jsx)(W.A,{has_temperature:d,overheating:_,general_temperature:u})]});var X=s(666461),Z=s(294689),q=s(558948),Q=s(136113),J=s(974435),ee=s(566732),te=s(247816),se=s(898809),ne=s(455425);const ie=(0,te.A)(Z.A)`
  width: 16px;
  height: 16px;
`,re=({battpool:e,noBattery:t,isCharging:s})=>t?(0,n.jsx)(_.sA,{id:"COMMON_DISCONNECTED"}):s&&100===e.batteryLevel?(0,n.jsx)(_.sA,{id:"COMMON_READY"}):s?(0,n.jsx)(_.sA,{id:"DEVICE_BATTERY_STATE_CHARGING"}):e.batteryLevel<=0||!e.timeToRemain?(0,n.jsx)(_.sA,{id:"DEVICE_BATTERY_STATE_EMPTY"}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(_.sA,{id:"RPS_BATTERY_TIME_UNITE_EMPTY"}),": ",(0,se.Ay)(e.timeToRemain,e.timeToRemain>ne.gG?[se.Au.DAYS,se.Au.HOURS,se.Au.MINUTES]:[se.Au.SECONDS]).join("")||0]}),oe=({battpool:e,noBattery:t,badBattery:s,isCharging:i=!1})=>{const{themeName:r}=(0,d.u)();return t||s?(0,n.jsx)(J.A,{variant:"fill",color:a.Ay[`desktop-color-red-06-${r}`],size:"original"}):i&&e.batteryLevel<100?(0,n.jsx)(ie,{variant:"success",children:(0,n.jsx)(Q.A,{color:"white"})}):i&&100===e.batteryLevel?(0,n.jsx)(ee.A,{variant:"fill",color:a.Ay[`desktop-color-green-06-${r}`],size:"original"}):null},ae=({battpool:e={},bms_run_anomaly:t=0,isCharging:s=!1})=>{const{themeName:r}=(0,d.u)(),c=0===e.readycnt,u=!!(0,i.g$)(t);return(0,n.jsxs)(A.A,{flexDirection:"column",gap:o.YC,children:[(0,n.jsxs)(A.A,{justifyContent:"space-between",children:[(0,n.jsxs)(A.A,{alignItems:"center",gap:o.YC,children:[(0,n.jsx)(j.A,{variant:"medium",children:(0,n.jsx)(_.sA,{id:"DEVICE_PROPERTY_OVERVIEW_BATTERY"})}),(0,n.jsx)(oe,{battpool:e,noBattery:c,badBattery:u,isCharging:s})]}),u?null:(0,n.jsxs)(A.A,{gap:o.YC,alignItems:"center",children:[(0,n.jsx)(l.A,{size:"medium",color:"text-3",children:(0,n.jsx)(re,{battpool:e,noBattery:c,isCharging:s})}),(0,n.jsx)(q.A,{orientation:"vertical",style:{height:16},color:a.Ay[`desktop-color-neutral-03-${r}`]}),(0,n.jsxs)(l.A,{size:"medium",color:e.batteryLevel<20?"notice":"positive",children:[Math.round(e.batteryLevel||0),"%"]})]})]}),u?(0,n.jsx)(l.A,{size:"medium",color:"text-1",children:(0,n.jsx)(_.sA,{id:"DEVICE_BATTERY_STATE_BAD_BATTERY_WARNING"})}):null]})},le=({battpool:e={},bms_run_anomaly:t=0,isCharging:s=!1})=>(0,n.jsxs)(A.A,{flexDirection:"column",gap:o.kc,children:[(0,n.jsx)(ae,{battpool:e,bms_run_anomaly:t,isCharging:s}),(0,n.jsx)(E.A,{value:e.batteryLevel||0,size:8,variant:e.batteryLevel>=45?"success":"danger"})]});var ce=s(748094),de=s(809465);const _e=({messageId:e,values:t})=>(0,n.jsx)(ce.A,{marginBottom:"none",children:(0,n.jsx)(_.sA,{id:e,values:t})}),Ae=()=>(0,n.jsx)(de.A,{children:(0,n.jsx)(_.sA,{id:"COMMON_CONTACT_SUPPORT"})}),ue=({errorCode:e})=>(0,n.jsxs)(A.A,{flexDirection:"column",gap:o.Ln,children:[(0,i.Yx)(e)?(0,n.jsx)(_e,{messageId:"DEVICE_WARNING_UPS_SHORT_CIRCUIT"}):null,(0,i.rS)(e)||(0,i.hH)(e)||(0,i.uc)(e)?(0,n.jsx)(_e,{messageId:"DEVICE_WARNING_UPS_DEVICE_FAILURE",values:{link:(0,n.jsx)(Ae,{})}}):null]});var me,xe,he,Ee,pe=s(602086),je=s(125799),Ce=s(853777),Ie=s(244081),Oe=s(724081),Ne=s(376892),ge=s(222102),ve=s(656466),Me=s(401042),Re=s(571766),be=s(29472),Te=s(774366);!function(e){e.STATE="state",e.MODEL="model",e.NAME="name",e.CONSOLE_MAC="console_mac",e.UPS_MAC="ups_mac",e.ICON="icon"}(me||(me={})),function(e){e.PAIRED="paired",e.UNPAIRED="unpaired",e.UPGRADE_NEEDED="upgrade_needed",e.TOKEN_INVALID="token_invalid",e.OFFLINE="offline"}(xe||(xe={})),function(e){e.CONSOLE_MAC="console_mac",e.USERNAME="username",e.PASSWORD="password",e.UPS_MAC="ups_mac"}(he||(he={})),function(e){e.CONSOLE_MAC="console_mac"}(Ee||(Ee={}));const De="/v2/api/ups",Se=`${De}/consoles`,ye=`${De}/pair`,fe=`${De}/unpair`,Pe=he.CONSOLE_MAC,we=(e={},t={})=>(0,be.t9)("safeShutdownPairing",Se,e,{idField:Pe,...t}),Le=(0,ve.uh)(we()),ke=(0,ge.Mz)(Le,Me.kh);var Ve=s(167933),We=s(262016),Ue=s(586566),ze=s(346100),Fe=s(725989),Be=s(843615),Ge=s(833466),$e=s(968373),He=s(16805),Ye=s(625133),Ke=s(164487);const Xe=e=>Math.max(1,Math.min(10,e)),Ze=({smart_power_caps:e=0,estimatedRuntimeMinutes:t})=>{const{themeName:s}=(0,d.u)(),{control:i}=(0,b.xW)(),r=(0,b.FH)({control:i,name:"outlet_power_cycle_on_ac_recovery_enabled"}),{field:c}=(0,b.as)({control:i,name:"outlet_power_cycle_on_ac_recovery_seconds"}),u=(0,Ue.TM)({smart_power_caps:e},ze.A.POWER_CYCLE_ON_AC_RECOVERY),m=(0,Ue.TM)({smart_power_caps:e},ze.A.SAFE_SHUTDOWN_AND_POWER_CYCLE_TIME),x=Xe(Math.round((c.value??0)/60)),h=(0,pe.useCallback)(e=>{Number.isFinite(e)&&c.onChange(60*Xe(Math.round(e)))},[c]),E=(0,pe.useCallback)(e=>h(Array.isArray(e)?e[0]:e),[h]),p=(0,pe.useCallback)(e=>h(Number(e.target.value)),[h]);return(0,n.jsxs)(A.A,{flexDirection:"column",gap:o.kc,children:[m?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(Ne.A,{id:"DEVICE_UPS_TRIGGER_POINT"}),(0,n.jsxs)(A.A,{flexDirection:"column",gap:o.kc,children:[(0,n.jsx)(l.A,{variant:"body-primary",children:(0,n.jsx)(_.sA,{id:"DEVICE_UPS_SHUTDOWN_REMAINING"})}),(0,n.jsxs)(A.A,{gap:o.kc,alignItems:"flex-start",children:[(0,n.jsx)(A.A,{height:Ge.b,alignItems:"center",flex:1,children:(0,n.jsx)($e.A,{control:i,name:"ups_shutdown_remaining_minutes",minValue:2,maxValue:15,step:1})}),(0,n.jsx)(A.A,{alignItems:"flex-start",width:120,children:(0,n.jsx)(He.A,{control:i,name:"ups_shutdown_remaining_minutes",min:2,max:15,step:1,contentAfter:(0,n.jsx)(_.sA,{id:"COMMON_MIN"})})})]}),null!=t&&t>0?(0,n.jsx)(A.A,{background:a.Ay[`desktop-color-neutral-01-${s}`],borderRadius:4,padding:`${o.kc} ${o.xO}`,children:(0,n.jsx)(l.A,{size:"medium",children:(0,n.jsx)(_.sA,{id:"DEVICE_UPS_ESTIMATED_RUNTIME_AT_CURRENT_LOAD",values:{minutes:t,value:e=>(0,n.jsx)(l.A,{size:"medium",color:"text-3",children:e})}})})}):null]})]}):null,u?(0,n.jsx)(Ye.A,{control:i,name:"outlet_power_cycle_on_ac_recovery_enabled",tooltip:(0,n.jsx)(_.sA,{id:"DEVICE_AUTO_RECOVERY_POWER_CYCLE_TOOLTIP"}),children:(0,n.jsx)(l.A,{size:"medium",color:"text-2",children:(0,n.jsx)(_.sA,{id:"DEVICE_AUTO_RECOVERY_POWER_CYCLE"})})}):null,m&&r?(0,n.jsxs)(A.A,{flexDirection:"column",gap:o.YC,children:[(0,n.jsx)(Ke.A,{tooltip:(0,n.jsx)(_.sA,{id:"DEVICE_UPS_POWER_RESTORE_DELAY_TOOLTIP"}),children:(0,n.jsx)(_.sA,{id:"DEVICE_UPS_POWER_RESTORE_DELAY"})}),(0,n.jsxs)(A.A,{gap:o.kc,alignItems:"flex-start",children:[(0,n.jsx)(A.A,{height:Ge.b,alignItems:"center",flex:1,children:(0,n.jsx)(Fe.A,{value:x,minValue:1,maxValue:10,step:1,onChange:E,style:{width:"100%"}})}),(0,n.jsx)(A.A,{alignItems:"flex-start",width:120,children:(0,n.jsx)(Be.A,{type:"number",variant:"secondary",width:"100%",value:x,min:1,max:10,step:1,onChange:p,contentAfter:(0,n.jsx)(_.sA,{id:"COMMON_MIN"})})})]})]}):null]})};var qe,Qe=s(954702),Je=s(669439),et=s(656705),tt=s(159469),st=s(700444);!function(e){e.DEVICE_MAC="deviceMac",e.PAIRING_DEVICE="pairingDevice",e.SET_PAIRING_DEVICE="setPairingDevice",e.PAIRING_STEP="pairingStep",e.SET_PAIRING_STEP="setPairingStep",e.ON_PAIR="onPair"}(qe||(qe={}));var nt=s(947414);const it=(0,pe.createContext)({[qe.DEVICE_MAC]:void 0,[qe.PAIRING_DEVICE]:void 0,[qe.SET_PAIRING_DEVICE]:nt.P1,[qe.PAIRING_STEP]:void 0,[qe.SET_PAIRING_STEP]:nt.P1,[qe.ON_PAIR]:nt.P1});var rt=s(570801);const ot=(0,ge.Mz)(rt.IG,rt.fR,(e,t)=>e||t),at=[xe.PAIRED,xe.OFFLINE],lt=(0,te.A)(A.A)`
  width: 100%;
  height: 100%;
  table td:nth-child(3) {
    position: absolute;
    padding: 0;
    top: 0;
    bottom: 0;
    right: ${o.kc};
    display: flex;
    align-items: center;
  }
`;var ct;!function(e){e.DEVICE="device",e.STATUS="status"}(ct||(ct={}));var dt=s(793442),_t=s(726831);const At=()=>(0,n.jsx)(je.A,{portal:!0,isInteractive:!0,cursorType:"pointer",description:(0,n.jsx)(_.sA,{id:"DEVICE_PAIR_UPGRADE_NEEDED_MESSAGE",values:{update:(0,n.jsx)(dt.A,{href:_t.A.unifiOsUpdateManager,customText:(0,_.tz)().formatMessage({id:"COMMON_ACTION_UPDATE"}).toLowerCase()})}}),children:(0,n.jsx)(Qe.A,{type:"button",fontSize:"medium",isDisabled:!0,children:(0,n.jsx)(_.sA,{id:"DEVICE_CLICK_TO_PAIR"})})});var ut=s(95032);const mt=({safeShutdownPair:e,tokenInvalid:t=!1})=>{const s=(0,R.d4)(ot),{[qe.PAIRING_DEVICE]:i,[qe.ON_PAIR]:r}=(0,pe.useContext)(it),o=(0,pe.useCallback)(()=>{r(e)},[r,e]);return(0,n.jsx)(Je.A,{description:s?void 0:(0,n.jsx)(_.sA,{id:"COMMON_ONLY_OWNER_OR_SUPER_ADMIN_CAN_PERFORM_THIS_ACTION"}),children:(0,n.jsx)(Qe.A,{style:{maxWidth:"100%"},type:"button",fontSize:"medium",onPress:o,isDisabled:Boolean(i?.[me.CONSOLE_MAC])||!s,children:(0,n.jsx)(ut.A,{color:"inherit",size:"inherit",isTruncated:!0,children:(0,n.jsx)(_.sA,{id:t?"DEVICE_AUTHORIZATION_EXPIRED":"DEVICE_CLICK_TO_PAIR"})})})})},xt=({safeShutdownPair:e})=>(0,n.jsx)(mt,{safeShutdownPair:e,tokenInvalid:!0}),ht=()=>(0,n.jsxs)(l.A,{size:"medium",color:"text-3",children:[(0,n.jsx)(_.sA,{id:"DEVICE_PAIRING"}),".."]}),Et=({safeShutdownPair:e})=>{const{[qe.DEVICE_MAC]:t,[qe.ON_PAIR]:s}=(0,pe.useContext)(it),i=(0,pe.useCallback)(()=>{s(e)},[s,e]);return t===e[me.UPS_MAC]?(0,n.jsx)(l.A,{size:"medium",color:"green-06",children:(0,n.jsx)(_.sA,{id:"DEVICE_PAIRED"})}):(0,n.jsx)(Qe.A,{type:"button",fontSize:"medium",onPress:i,children:(0,n.jsx)(_.sA,{id:"DEVICE_TAKE_OVER"})})},pt=()=>(0,n.jsx)(l.A,{size:"medium",color:"text-3",children:(0,n.jsx)(_.sA,{id:"COMMON_CONSOLE_OFFLINE"})});var jt=s(974390),Ct=s(650632);const It=(0,te.A)(A.A)`
  gap: ${o.YC};
  align-items: center;
`,Ot={accessorFn:e=>e,enableResizing:!1,enableSorting:!1},Nt=[{...Ot,id:ct.DEVICE,size:190,header:()=>(0,n.jsx)(_.sA,{id:"COMMON_DEVICE"}),cell:({getValue:e})=>{return t=e(),(0,n.jsxs)(It,{children:[Object.keys(t[me.ICON]||{}).length?(0,n.jsx)(Ct.A,{width:25,height:25,client:t[me.ICON]}):(0,n.jsx)(jt.A,{model:t[me.MODEL],width:25,height:25}),(0,n.jsx)(ut.A,{size:"medium",color:"text-2",isTruncated:!0,children:(0,r.Q)({name:t[me.NAME],model:t[me.MODEL],mac:t[me.CONSOLE_MAC]})})]});var t}},{...Ot,id:ct.STATUS,size:140,header:()=>(0,n.jsx)(_.sA,{id:"COMMON_STATUS"}),cell:({getValue:e})=>((e,{[qe.PAIRING_DEVICE]:t})=>{if(t?.[me.CONSOLE_MAC]===e[me.CONSOLE_MAC])return(0,n.jsx)(ht,{});switch(e[me.STATE]){case xe.PAIRED:return(0,n.jsx)(Et,{safeShutdownPair:e});case xe.UNPAIRED:return(0,n.jsx)(mt,{safeShutdownPair:e});case xe.UPGRADE_NEEDED:return(0,n.jsx)(At,{});case xe.TOKEN_INVALID:return(0,n.jsx)(xt,{safeShutdownPair:e});case xe.OFFLINE:return(0,n.jsx)(pt,{});default:return null}})(e(),(0,pe.useContext)(it))}],gt=({safeShutdownPairs:e})=>{const[t,s]=(0,pe.useState)(!1),i=(0,R.wA)(),{[qe.DEVICE_MAC]:r}=(0,pe.useContext)(it),o=(0,R.d4)(ot),a=(0,pe.useCallback)(e=>()=>{var t;s(!0),i((t={[Ee.CONSOLE_MAC]:e},(0,be.vB)(Re.aC,null,null,Te.A.POST,fe,{},t))).then(()=>{i(we())}).catch(({msg:e})=>{i((0,st.ox)({icon:tt.C.danger,message:e||"COMMON_NOTICE_REQUEST_ERROR"}))}).finally(()=>{s(!1)})},[i]),l=(0,pe.useCallback)(({rowId:e})=>(0,n.jsx)(Je.A,{description:o?void 0:(0,n.jsx)(_.sA,{id:"COMMON_ONLY_OWNER_OR_SUPER_ADMIN_CAN_PERFORM_THIS_ACTION"}),children:(0,n.jsx)(Qe.A,{variant:"destructive",type:"button",fontSize:"medium",onPress:a(e),isDisabled:t||!o,children:(0,n.jsx)(_.sA,{id:"DEVICE_UNPAIR"})})}),[a,t,o]),c=(0,pe.useMemo)(()=>o?e.map(e=>({...e,...at.includes(e[me.STATE])&&e[me.UPS_MAC]===r?{_rowHoverContent:l}:{}})):e,[o,e,r,l]),d=(0,pe.useCallback)(e=>e[me.CONSOLE_MAC],[]);return(0,n.jsx)(lt,{children:(0,n.jsx)(et.A,{data:c,columns:Nt,getRowId:d})})};var vt=s(231843),Mt=s(642687),Rt=s(877840),bt=s(565527);const Tt=(0,te.A)(A.A)`
  gap: ${o.kc};
  background-color: ${({theme:{themeName:e}})=>a.Ay[`desktop-color-neutral-${e===bt.S.DARK?"03":"02"}-${e}`]};
  border-radius: ${a.Ay["desktop-radius-base"]};
  padding: ${o.kc};
`,Dt=({messageId:e})=>(0,n.jsxs)(Tt,{children:[(0,n.jsx)(Ce.A,{size:"original",isActive:!0,variant:"fill"}),(0,n.jsx)(l.A,{size:"medium",color:"text-2",children:(0,n.jsx)(_.sA,{id:e,values:{name:(0,pe.useContext)(it)[qe.PAIRING_DEVICE]?.[me.NAME]}})})]});var St;!function(e){e.SIX_DIGIT_CODE="sixDigitCode"}(St||(St={}));var yt=s(241792);const ft=yt.Ik({[St.SIX_DIGIT_CODE]:yt.Yj().min(6)}),Pt={[St.SIX_DIGIT_CODE]:""},wt=(0,te.A)(A.A)`
  flex-direction: column;
  gap: ${o.tr};
  padding: ${o.kc};
`,Lt=(0,te.A)(A.A)`
  gap: ${o.kc};
`,kt=()=>{const[e,t]=(0,pe.useState)(!1),{[qe.SET_PAIRING_DEVICE]:s}=(0,pe.useContext)(it),{control:i}=(0,D.m)({schema:ft,defaultValues:Pt}),{isValid:r}=(0,b.lN)({control:i}),o=(0,pe.useCallback)(()=>{t(!0)},[]),a=(0,pe.useCallback)(()=>{s(void 0)},[s]),l=(0,pe.useCallback)(e=>t=>{e(t)},[]),c=(0,pe.useCallback)(({field:{value:e,onChange:t,onBlur:s},fieldState:{invalid:i}})=>(0,n.jsx)(vt.A,{tokens:6,type:"number",value:e,onChange:l(t),invalid:i,onBlur:s}),[l]);return(0,n.jsx)(Rt.A,{isDisabled:e,children:(0,n.jsxs)(wt,{children:[(0,n.jsx)(Dt,{messageId:"SHARED_MFA_DESCRIPTION_TOTP"}),(0,n.jsx)(b.xI,{control:i,name:St.SIX_DIGIT_CODE,render:c}),(0,n.jsxs)(Lt,{children:[(0,n.jsx)(Mt.A,{size:"small",type:"button",onPress:o,isDisabled:!r||e,children:(0,n.jsx)(_.sA,{id:"COMMON_ACTION_CONFIRM"})}),(0,n.jsx)(Mt.A,{size:"small",variant:"tertiary-neutral",type:"button",onPress:a,children:(0,n.jsx)(_.sA,{id:"COMMON_ACTION_CANCEL"})})]})]})})};var Vt,Wt=s(635891),Ut=s(260334),zt=s(570866);!function(e){e.EMAIL="email",e.PASSWORD="password"}(Vt||(Vt={}));const Ft={[Vt.EMAIL]:"",[Vt.PASSWORD]:""},Bt=(0,te.A)(A.A)`
  flex-direction: column;
  gap: ${o.kc};
  padding: ${o.kc};
`,Gt=(0,te.A)(A.A)`
  gap: ${o.kc};
`,$t=()=>{const e=(0,R.wA)(),{formatMessage:t}=(0,_.tz)(),[s,i]=(0,pe.useState)(!1),{[qe.DEVICE_MAC]:r,[qe.PAIRING_DEVICE]:o,[qe.SET_PAIRING_DEVICE]:a,[qe.SET_PAIRING_STEP]:l}=(0,pe.useContext)(it),c=(0,pe.useMemo)(()=>(e=>yt.Ik({[Vt.EMAIL]:yt.Yj().regex(zt.Xw,{message:(0,Ut.rn)("COMMON_VALIDATION_EMAIL",{name:e({id:"COMMON_EMAIL"})})}),[Vt.PASSWORD]:yt.Yj({message:(0,Ut.rn)("COMMON_MIN_CHARS",{min:3})}).min(3)}))(t),[t]),{control:d,trigger:A}=(0,D.m)({schema:c,defaultValues:Ft}),{isValid:u}=(0,b.lN)({control:d}),m=(0,b.FH)({control:d,name:Vt.EMAIL}),x=(0,b.FH)({control:d,name:Vt.PASSWORD}),h=(0,pe.useCallback)(()=>{var t;i(!0),e((t={[he.CONSOLE_MAC]:(o||{})?.[me.CONSOLE_MAC],[he.USERNAME]:m,[he.PASSWORD]:x,[he.UPS_MAC]:r},(0,be.vB)(Re.aC,null,null,Te.A.POST,ye,{},t))).then(()=>{e(we()),l(void 0),a(void 0)}).catch(({msg:t})=>{e((0,st.ox)({icon:tt.C.danger,message:t||"COMMON_NOTICE_REQUEST_ERROR"}))}).finally(()=>{i(!1)})},[e,r,o,m,x,l,a]),E=(0,pe.useCallback)(()=>{a(void 0)},[a]),p=(0,pe.useCallback)(async(e,t)=>{t.onChange(e),await A(t.name)},[A]);return(0,n.jsx)(Rt.A,{isDisabled:s,children:(0,n.jsxs)(Bt,{children:[(0,n.jsx)(Dt,{messageId:"DEVICE_PAIRING_LOGIN_FORM_BANNER"}),(0,n.jsx)(Wt.A,{control:d,name:Vt.EMAIL,label:(0,n.jsx)(_.sA,{id:"COMMON_EMAIL"}),onChange:p}),(0,n.jsx)(Wt.A,{control:d,name:Vt.PASSWORD,label:(0,n.jsx)(_.sA,{id:"COMMON_PASSWORD"}),onChange:p,passwordToggle:!0}),(0,n.jsxs)(Gt,{children:[(0,n.jsx)(Mt.A,{size:"small",type:"button",onPress:h,isDisabled:!u||s,children:(0,n.jsx)(_.sA,{id:"DEVICE_PAIR"})}),(0,n.jsx)(Mt.A,{size:"small",variant:"tertiary-neutral",type:"button",onPress:E,children:(0,n.jsx)(_.sA,{id:"COMMON_ACTION_CANCEL"})})]})]})})};var Ht;!function(e){e.LOGIN="login",e.MFA="mfa"}(Ht||(Ht={}));const Yt=(0,te.A)(A.A)`
  background-color: ${({theme:{themeName:e}})=>a.Ay[`desktop-color-neutral-${e===bt.S.DARK?"02":"01"}-${e}`]};
`,Kt=()=>{const{[qe.PAIRING_DEVICE]:e,[qe.PAIRING_STEP]:t}=(0,pe.useContext)(it),s=(0,pe.useMemo)(()=>{switch(t){case Ht.LOGIN:return(0,n.jsx)($t,{});case Ht.MFA:return(0,n.jsx)(kt,{});default:return null}},[t]);return e&&s?(0,n.jsx)(Yt,{children:s}):null},Xt=(0,te.A)(A.A)`
  flex-direction: column;
  gap: ${o.kc};
`,Zt=(0,te.A)(A.A)`
  flex-direction: column;
  gap: ${o.Ln};
`,qt=(0,te.A)(A.A)`
  align-items: center;
  gap: ${o.YC};
`,Qt=({mac:e,safeShutdownPairs:t})=>{const{themeName:s}=(0,d.u)(),[i,r]=(0,pe.useState)(void 0),[c,u]=(0,pe.useState)(void 0),m=(0,pe.useCallback)(e=>{r(e),u(Ht.LOGIN)},[r,u]),x=(0,pe.useMemo)(()=>({[qe.DEVICE_MAC]:e,[qe.PAIRING_DEVICE]:i,[qe.SET_PAIRING_DEVICE]:r,[qe.PAIRING_STEP]:c,[qe.SET_PAIRING_STEP]:u,[qe.ON_PAIR]:m}),[i,c,e,m]);return(0,n.jsx)(it.Provider,{value:x,children:(0,n.jsxs)(Xt,{children:[t.length>0?(0,n.jsx)(gt,{safeShutdownPairs:t}):(0,n.jsx)(A.A,{background:a.Ay[`desktop-color-neutral-01-${s}`],borderRadius:4,padding:`${o.kc} ${o.xO}`,children:(0,n.jsx)(l.A,{size:"medium",children:(0,n.jsx)(_.sA,{id:"DEVICE_UPS_NO_PAIRABLE_DEVICES"})})}),(0,n.jsx)(Kt,{})]})})},Jt=(0,pe.memo)(({mac:e,smart_power_caps:t,estimatedRuntimeMinutes:s})=>{const i=(0,R.d4)(Ve.rQ),r=(0,R.d4)(ke),o=(0,Ue.TM)({smart_power_caps:t},ze.A.SAFE_SHUTDOWN_AND_POWER_CYCLE_TIME),a=(0,pe.useMemo)(()=>[{id:Qt.toString(),openByDefault:!0,label:(0,n.jsxs)(qt,{children:[(0,n.jsx)(Ne.A,{id:"DEVICE_SAFE_SHUTDOWN_PAIRING"}),(0,n.jsx)(je.A,{portal:!0,isInteractive:!0,description:(0,n.jsx)(_.sA,{id:o?"DEVICE_SAFE_SHUTDOWN_PAIRING_TOOLTIP_TRIGGER_POINT":"DEVICE_SAFE_SHUTDOWN_PAIRING_TOOLTIP"}),children:(0,n.jsx)("span",{children:(0,n.jsx)(Ce.A,{isActive:!0,size:"original"})})})]}),renderContent:()=>(0,n.jsxs)(Zt,{children:[(0,n.jsx)(Qt,{mac:e,safeShutdownPairs:r}),(0,n.jsx)(Ze,{smart_power_caps:t,estimatedRuntimeMinutes:s})]})}],[o,e,r,t,s]);return(0,Oe.A)([(0,We.m)(void 0,{crudCacheStrategy:{type:Ie.e.CACHE}}),we(void 0,{crudCacheStrategy:{type:Ie.e.CACHE}})],i?(0,n.jsx)(m.A,{type:m.I.ACCORDION,items:a}):null)});var es=s(890932);const ts={[I.W4.USWDA23]:"/device/upsTower/reset.png",[I.W4.USWDA24]:"/device/upsTower/reset.png",[I.W4.USWDA25]:"/device/ups2U/reset.png",[I.W4.USWDA26]:"/device/ups2U/reset.png"},ss=({model:e})=>{const{themeName:t}=(0,d.u)();return(0,n.jsxs)(A.A,{flexDirection:"column",alignItems:"center",children:[(0,n.jsx)(ce.A,{variant:"warning",flex:1,padding:`${o.Ln} 0`,children:(0,n.jsx)(_.sA,{id:"DEVICE_WARNING_UPS_DEVICE_OVERLOAD"})}),(0,n.jsx)(A.A,{justifyContent:"center",alignItems:"center",children:(0,n.jsx)(A.A,{width:"104px",height:"104px",justifyContent:"center",alignItems:"center",borderRadius:"50%",overflow:"hidden",background:a.Ay[`desktop-color-neutral-01-${t}`],border:`solid 1px ${a.Ay[`desktop-color-neutral-03-${t}`]}`,children:(0,n.jsx)("img",{src:`${(0,R.d4)(es.p)}${ts[e]||"/device/upsTower/reset.png"}`,height:104,alt:"reset"})})})]})};var ns=s(462440),is=s(215202),rs=s(590979),os=s(449339),as=s(589650),ls=s(205521),cs=s(89469),ds=s(254193);const _s=({username:e})=>(0,n.jsxs)(H.A,{children:[(0,n.jsx)(l.A,{color:"text-2",size:"medium",children:(0,n.jsx)(_.sA,{id:"COMMON_LABEL_USERNAME"})}),(0,n.jsxs)(A.A,{alignItems:"center",gap:o.YC,children:[(0,n.jsx)(ut.A,{color:"text-3",size:"medium",isTruncated:!0,children:e}),(0,n.jsx)(ds.A,{value:e})]})]});var As=s(920391),us=s(804987);const ms=(0,te.A)(ut.A)`
  -webkit-text-security: disc;
  text-security: disc;
`,xs=({password:e})=>{const[t,s]=(0,pe.useState)(!1);return(0,n.jsxs)(H.A,{children:[(0,n.jsx)(l.A,{color:"text-2",size:"medium",children:(0,n.jsx)(_.sA,{id:"COMMON_PASSWORD"})}),(0,n.jsxs)(A.A,{alignItems:"center",gap:o.YC,children:[(0,n.jsx)(t?ut.A:ms,{color:"text-3",size:"medium",isTruncated:!0,children:e}),(0,n.jsx)(Qe.A,{onPress:()=>s(!t),variant:"neutral",children:(0,n.jsx)(t?us.A:As.A,{size:"original"})})]})]})},hs=({id:e,port:t})=>{const s=e&&t?`${e}:${t}`:void 0;return(0,n.jsxs)(H.A,{children:[(0,n.jsxs)(l.A,{color:"text-2",size:"medium",children:[(0,n.jsx)(_.sA,{id:"COMMON_ID"})," / ",(0,n.jsx)(_.sA,{id:"COMMON_PORT"})]}),(0,n.jsx)(A.A,{alignItems:"center",gap:o.YC,children:s?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(ut.A,{color:"text-3",size:"medium",isTruncated:!0,children:s}),(0,n.jsx)(ds.A,{value:s})]}):null})]})},Es=({label:e,children:t})=>(0,n.jsxs)(H.A,{children:[(0,n.jsx)(l.A,{color:"text-2",size:"medium",children:e}),(0,n.jsxs)(A.A,{alignItems:"center",gap:o.YC,children:[(0,n.jsx)(ut.A,{color:"text-3",size:"medium",isTruncated:!0,children:t}),(0,n.jsx)(ds.A,{value:t})]})]}),ps=({nut_server:e,nut_client_table:t=[],mac:s})=>{const i=(0,R.wA)(),{id:r,port:a,credential_required:c,username:d,password:u}=e,x=(0,pe.useCallback)(()=>{i((0,ls.XP)({type:os.H.DEVICE,id:s,tab:as.BC.SETTINGS}))},[i,s]);return(0,n.jsx)(m.A,{type:m.I.ACCORDION,items:[{id:"nutServer",openByDefault:!0,renderLabel:()=>(0,n.jsxs)(A.A,{gap:o.YC,alignItems:"center",children:[(0,n.jsx)(l.A,{variant:"heading-medium",children:(0,n.jsx)(_.sA,{id:"DEVICE_HEADER_NUTSERVER"})}),(0,n.jsx)(Qe.A,{onPress:x,...rs.A.addDataTestId(rs.A.TestId.SIDE_PANEL_TRIGGER),children:(0,n.jsx)(ns.A,{size:"original"})})]}),renderContent:()=>(0,n.jsxs)(A.A,{flexDirection:"column",children:[(0,n.jsx)(hs,{id:r,port:a}),c?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(_s,{username:d}),(0,n.jsx)(xs,{password:u})]}):null,t?.length?(0,n.jsxs)(cs.A,{children:[(0,n.jsx)(is.A,{size:"medium",children:(0,n.jsx)(_.sA,{id:"DEVICE_NUT_CLIENTS"})}),(0,n.jsx)(A.A,{flexDirection:"column",children:t.slice().sort((e,t)=>(e.index||0)-(t.index||0)).map(({index:e,name:t,ip:s})=>(0,n.jsx)(Es,{label:t,children:s},e))})]}):null]})}]})},js=()=>(0,n.jsxs)(A.A,{gap:o.kc,children:[(0,n.jsx)(c.A,{size:"original",color:a.Ay[`desktop-color-orange-06-${(0,d.u)().themeName}`],variant:"fill"}),(0,n.jsx)(l.A,{size:"medium",color:"text-1",children:(0,n.jsx)(_.sA,{id:"DEVICE_UPS_TOWER_BUZZ_WARNING",values:{b:_.b}})})]});var Cs=s(216082),Is=s(260067);const Os=({activeItem:e,activeItem:{name:t,type:s,model:a,ip:l,lan_ip:c,ipv6:d,mac:_,displayable_version:E,uptime:p,vbms_table:j={},nut_server:C={},nut_client_table:I=[],_id:O,outlet_power_cycle_on_ac_recovery_enabled:R,shortname:b,radio_table:T,radio_table_stats:D,vap_table:S,support_wifi6e:y,deviceState:f,ethernet_overrides:P,port_table:w,uplink:k,device_mode_override:V}})=>(0,n.jsxs)(L,{activeItem:{_id:O,mac:_,outlet_power_cycle_on_ac_recovery_enabled:R,outlet_power_cycle_on_ac_recovery_seconds:e.outlet_power_cycle_on_ac_recovery_seconds,ups_shutdown_remaining_minutes:e.ups_shutdown_remaining_minutes},children:[j?.is_battery_mode?(0,n.jsx)(m.A,{children:(0,x.Snx)(e)?(0,n.jsx)(js,{}):(0,n.jsx)(u,{name:(0,r.Q)(e)})}):null,j?.bms_run_anomaly?(0,n.jsx)(ue,{errorCode:j.bms_run_anomaly}):null,(0,n.jsx)(M.A,{activeItem:e,hidePortsButton:!0,overviewChildren:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(Is.A,{type:e.type,mac:e.mac,radio_table:T,radio_table_stats:D,vap_table:S,support_wifi6e:y,deviceState:f}),(0,n.jsx)(A.A,{marginTop:o.Ln,alignItems:"center",justifyContent:"center",children:(0,i.Md)(j?.bms_run_anomaly||0)?(0,n.jsx)(ss,{model:a}):(0,n.jsx)(A.A,{flexDirection:"column",gap:o.Ln,children:(0,n.jsx)(g.A,{activeItem:e,gap:o.Yc,hidePorts:!0,tooltipPlacement:"top",noDivider:!0,...(0,x.Snx)(e)?{verticalLegend:(0,n.jsx)(X.Ay,{})}:{},...(0,x.uaO)(e)||(0,x.vqp)(e)?{legend:(0,n.jsx)(X.u6,{})}:{}})})})]})}),C?.enabled?(0,n.jsx)(ps,{mac:_,nut_server:C,nut_client_table:I}):null,j?.battpool?(0,n.jsx)(m.A,{children:(0,n.jsxs)(A.A,{flexDirection:"column",gap:o.kc,children:[(0,n.jsx)(N,{current:j.battpool.device_total_power_output||0,max:j.battpool.device_total_power_budget||0,model:a}),(0,n.jsx)(le,{battpool:j.battpool||{},bms_run_anomaly:j.bms_run_anomaly||0,isCharging:!j.is_battery_mode})]})}):null,(0,n.jsx)(Jt,{mac:e.mac,smart_power_caps:e.smart_power_caps,estimatedRuntimeMinutes:j?.battpool?.timeToRemain?Math.round(j.battpool.timeToRemain/60):void 0}),(0,n.jsx)(m.A,{children:(0,n.jsx)(K,{name:t,ethernet_overrides:P,port_table:w,type:s,model:a,ip:l,lan_ip:c,ipv6:d,mac:_,connection_network_id:e.connection_network_id,displayable_version:E,uptime:p,vbms_table:j,local_uplink_port:(0,h.q$)(e)?.port_idx,uplink:k,device_mode_override:V})}),(0,n.jsx)(v.A,{activeItem:e}),(0,n.jsx)(Cs.A,{shortname:b})]})},696049(e,t,s){s.d(t,{H:()=>n});const n=""},833466(e,t,s){s.d(t,{b:()=>n});const n=32},61322(e,t,s){s.d(t,{I:()=>n});const n={HEADER_HEIGHT:32,ROW_HEIGHT:32,EDIT_FIELD_HEIGHT:36,getHeight(e,t,s,n){return Math.min((n||this.ROW_HEIGHT)*e+(s??this.HEADER_HEIGHT),(n||this.ROW_HEIGHT)*t+(s??this.HEADER_HEIGHT))},getEditContainerHeight(e,t,s){return Math.min((s||this.EDIT_FIELD_HEIGHT)*e,(s||this.EDIT_FIELD_HEIGHT)*t)}}},436417(e,t,s){s.d(t,{m:()=>a});var n=s(602086),i=s(42220),r=s(369289),o=s(721533);function a({schema:e,defaultValues:t,presets:s}){const a=(0,n.useMemo)(()=>s?(0,r.A)(s,e=>e.defaultValues):{},[s]),l=(0,n.useMemo)(()=>({...t,...a}),[a,t]),c=(0,i.mN)({resolver:(0,o.u)(e),shouldFocusError:!0,defaultValues:l,shouldUseNativeValidation:!1,mode:"onTouched"}),d=(0,n.useRef)(l);d.current=l;const _=(0,n.useCallback)((...e)=>{const[t,...s]=e;return c.reset(t?{...t,...a}:d.current,...s)},[a,c]);return{...c,reset:_,formState:{...c.formState,isDirty:!!Object.keys(c.formState.dirtyFields).length,isSubmitting:c.formState.isSubmitting},handleSubmit:(...e)=>c.handleSubmit(e[0],(t,...s)=>{const n=Object.keys(t)[0];if(n)try{const e=document.getElementsByName(n)?.[0];e?.scrollIntoView?.({behavior:"smooth",block:"center"}),e?.focus?.({preventScroll:!0})}catch{}e[1]?.(t,...s)})}}},877840(e,t,s){s.d(t,{A:()=>a});var n=s(274934),i=s(602086),r=s(184931),o=s(712642);const a=({isDisabled:e,isAdditive:t=!0,children:s})=>{const a=(0,r.pv)(),l=(0,i.useMemo)(()=>"boolean"==typeof e?{fields:e,labels:e,tooltipIcons:e,tooltipPopovers:!1}:e,[e]),c=(0,i.useMemo)(()=>({fields:t?l.fields||a.fields:l.fields,labels:t?l.labels||a.labels:l.labels,tooltipIcons:t?l.tooltipIcons||a.tooltipIcons:l.tooltipIcons,tooltipPopovers:t?l.tooltipPopovers||a.tooltipPopovers:l.tooltipPopovers}),[t,l.fields,l.labels,l.tooltipIcons,l.tooltipPopovers,a.fields,a.labels,a.tooltipIcons,a.tooltipPopovers]);return(0,n.jsx)(o.I.Provider,{value:c,children:s})}},260334(e,t,s){s.d(t,{L_:()=>d,MS:()=>c,rn:()=>l});var n=s(602086),i=s(949812),r=s(765282),o=s(470070);const a="{::}",l=(e,t)=>`${e}${a}${JSON.stringify(t??{})}`,c=(e,t)=>{if("string"!=typeof t)return;const[s,...n]=t.split(a);if(!s||!n.length)return t;let i={};try{i=Object.fromEntries(Object.entries(JSON.parse(n.join(a))).map(([t,s])=>[t,"string"==typeof s?c(e,s):s]))}catch{}return e.formatMessage({id:s},i)};function d(){const{formatMessage:e}=(0,o.tz)();return(0,n.useCallback)(t=>c({formatMessage:e},t),[e])}i.pJ((e,t)=>e.message?{message:e.message}:e.code===r.eq.too_small&&"string"===e.type?{message:l("COMMON_MIN_CHARS",{min:Number(e.minimum)})}:e.code===r.eq.too_big&&"string"===e.type?{message:l("COMMON_MAX_CHARS",{name:l("COMMON_VALUE"),max:Number(e.maximum)})}:e.code===r.eq.invalid_type&&"array"===e.expected&&"undefined"===e.received?{message:l("COMMON_SELECT_AT_LEAST_ONE_ITEM")}:e.code===r.eq.too_small&&"array"===e.type?{message:l("COMMON_ADD_AT_LEAST_X_ITEMS",{min:Number(e.minimum)})}:e.code===r.eq.invalid_type&&"undefined"===e.received?{message:l("COMMON_VALIDATION_VALUE_REQUIRED")}:e.code===r.eq.invalid_type&&"number"===e.expected?{message:l("COMMON_VALIDATION_PLEASE_ENTER_A_NUMBER")}:{message:t.defaultError})},625133(e,t,s){s.d(t,{A:()=>d});var n=s(274934),i=s(42220),r=s(762705),o=s(309130),a=s(304151),l=s(100978),c=s(184931);const d=function({control:e,name:t,children:s,tooltip:d,tooltipProps:_,onToggle:A,renderCheckbox:u,inputClassName:m}){const x=(0,c.mQ)();return(0,n.jsx)(i.xI,{control:e,name:t,render:({field:e})=>{const t=(0,n.jsx)(r.A,{id:e.name,onChange:({target:{checked:t}})=>{e.onChange(t),A?.(t)},checked:!!e.value,disabled:x,inputClassName:m,children:s});return(0,n.jsxs)(l.A,{gap:o.YC,alignItems:"center",children:[u?u(t,e):t,d?(0,n.jsx)(a.A,{description:d,..._}):null]})}})}},16805(e,t,s){s.d(t,{A:()=>c});var n=s(274934),i=s(42220),r=s(843615),o=s(309130),a=s(260334),l=s(184931);const c=function({control:e,name:t,label:s,placeholder:c,tooltip:d,tooltipProps:_,contentAfter:A,arrowSize:u,min:m,max:x,step:h,value:E,iconBefore:p,onAfterChange:j,onChange:C}){const I=(0,l.mQ)(),O=(0,a.L_)();return(0,n.jsx)(i.xI,{control:e,name:t,render:({field:{ref:e,...a},fieldState:l,formState:N})=>(0,n.jsx)(r.A,{type:"number",variant:"secondary",width:"100%",...a,value:E??a.value??"",onChange:e=>{C?C(e,N):a.onChange(e.target.value?.length?+e.target.value:null),j?.(e)},disabled:I,invalid:l.invalid?O((0,i.Jt)(N.errors,t)?.message)||!0:void 0,labelTooltip:d,labelTooltipProps:{style:{opacity:I?o.xN:void 0,..._?.style},..._},label:s,placeholder:c,arrowSize:u,contentAfter:A,iconBefore:p,step:h,min:m,max:x})})}},968373(e,t,s){s.d(t,{A:()=>a});var n=s(274934),i=s(725989),r=s(42220),o=s(184931);const a=({control:e,name:t,...s})=>{const{field:a}=(0,r.as)({control:e,name:t}),l=(0,o.mQ)(),c="number"==typeof s.minValue&&"number"==typeof a.value?Math.max(s.minValue,a.value):a.value,d="number"==typeof s.maxValue&&"number"==typeof c?Math.min(s.maxValue,c):c;return(0,n.jsx)(i.A,{...s,style:{width:"100%"},value:d,onChange:e=>{const t=Array.isArray(e)?e[0]:e;"number"!=typeof t||t===a.value||Number.isNaN(t)||a.onChange(t)},isDisabled:l})}},635891(e,t,s){s.d(t,{A:()=>d});var n=s(274934),i=s(42220),r=s(843615),o=s(95032),a=s(309130),l=s(260334),c=s(184931);const d=function({control:e,name:t,label:s,placeholder:d,tooltip:_,tooltipProps:A,autoFocus:u,motif:m,onChange:x,onBlur:h,onAfterChange:E,onPaste:p,onKeyDown:j,passwordToggle:C,type:I,helperMessage:O,autoComplete:N,contentBefore:g,contentAfter:v,onFocus:M,value:R,invalid:b}){const T=(0,c.mQ)(),D=(0,c.Im)(),S=(0,c.q)(),y=(0,l.L_)();return(0,n.jsx)(i.xI,{control:e,name:t,render:({field:e,fieldState:l,formState:c})=>(0,n.jsx)(r.A,{type:I||(C?"password":"text"),variant:"secondary",width:"100%",autoFocus:u,...e,onChange:t=>{x?x(t,e,c):e.onChange(t),E?.(t)},onBlur:t=>{h?h(t,e,c):e.onBlur()},onFocus:M,onPaste:p,disabled:T,value:R??e.value?.toString(),invalid:b||(l.invalid?(0,n.jsxs)(o.A,{variant:"inherit",style:{overflowWrap:"break-word"},children:[y((0,i.Jt)(c.errors,t)?.message)||!0," "]}):void 0),label:s,placeholder:d,labelTooltip:_,labelTooltipProps:{style:{opacity:D?a.xN:void 0,pointerEvents:S?"none":void 0,...A?.style},...A},motif:m,passwordToggle:C,helperMessage:O,autoComplete:N,onKeyDown:j,contentBefore:g,contentAfter:v})})}},237887(e,t,s){s.d(t,{A:()=>A});var n=s(274934),i=s(602086),r=s(977872),o=s(693371),a=s(767822),l=s(820633),c=s(308111);const d=e=>(0,n.jsx)(o.A,{renderOption:a.q,...e}),_=e=>(0,n.jsx)(d,{...e});_.Sorted=e=>{const t=(0,r.d4)(l.zi),s=(0,i.useMemo)(()=>(0,c.k)(t),[t]);return(0,n.jsx)(d,{...e,sortBy:s})};const A=_},308111(e,t,s){s.d(t,{R:()=>_,k:()=>A});var n=s(696049),i=s(350068),r=s(177173),o=s(752104),a=s(64222),l=s(332530);const c=[...new Set([n.H,o.Q.join(o.A),r.Zt,a.F,i.nc,l.Vr])],d={numeric:!0,sensitivity:"base"},_=(e,t)=>{const s=[];for(let n=e;n<=t;n+=1)s.push({value:n,label:String(n)});return s},A=e=>({value:t,label:s},{value:n,label:i})=>c.includes(t?.toString())||c.includes(n?.toString())?1/0:s?.toString().localeCompare(i?.toString(),e,d)??-1},656705(e,t,s){s.d(t,{A:()=>E});var n,i,r,o,a,l=s(274934),c=s(602086);!function(e){e.TABLE="table"}(n||(n={})),function(e){e.ROW_ID_MAP_BY_INDEX="rowIdMapByIndex",e.INDEX_MAP_BY_ROW_ID="indexMapByRowId"}(i||(i={})),function(e){e.ON_KEY_DOWN="onKeyDown",e.INCOMING_ROW_PROPS="incomingRowProps",e.HAS_ON_ROW_CLICK="hasOnRowClick"}(r||(r={})),function(e){e.INCOMING_ON_ROW_CLICK="incomingOnRowClick",e.LOCAL_CURRENT_INDEX="localCurrentIndex"}(o||(o={})),function(e){e.DATA_MAP_REFERENCE="dataMapReference",e.ROW_ID_MAP_BY_INDEX="rowIdMapByIndex",e.INDEX_MAP_BY_ROW_ID="indexMapByRowId",e.INCOMING_ON_ROW_CLICK="incomingOnRowClick",e.LOCAL_CURRENT_INDEX="localCurrentIndex",e.MULTI_SELECT_MODE="multiSelectMode"}(a||(a={}));const d="data-row-id";var _=s(202730),A=s(147045);var u=s(521376);const m=e=>e?.children?.[1]?.children;var x=s(587389);const h=(0,s(247816).A)(x.A)`
  tr {
    outline: none;
  }
`,E=({data:e=[],rowProps:t,onRowClick:s,...x})=>{const E=(0,c.useRef)(null),p=(0,c.useRef)(null),{[i.ROW_ID_MAP_BY_INDEX]:j,[i.INDEX_MAP_BY_ROW_ID]:C}=(({[n.TABLE]:e})=>{const[t,s]=(0,c.useState)(()=>e?m(e):void 0);(0,c.useEffect)(()=>{e&&s(m(e))},[e]);const{[i.ROW_ID_MAP_BY_INDEX]:r,[i.INDEX_MAP_BY_ROW_ID]:o}=(0,c.useMemo)(()=>{const e=new Map,s=new Map,n=t?.length;if(t&&n)for(let i=0;i<n;i+=1){const n=t[i].getAttribute(d);n&&(e.set(n,i),s.set(i,n))}return{[i.ROW_ID_MAP_BY_INDEX]:e,[i.INDEX_MAP_BY_ROW_ID]:s}},[t]);return{[i.ROW_ID_MAP_BY_INDEX]:r,[i.INDEX_MAP_BY_ROW_ID]:o}})({[n.TABLE]:E.current}),I=(e=>{const t=(0,c.useRef)(new Map),s=(0,c.useRef)(void 0);if(s.current!==e){s.current=e,t.current.clear();const n=e.length;for(let s=0;s<n;s+=1)t.current.set(e[s].id,e[s])}return t})(e),O=(({[a.DATA_MAP_REFERENCE]:e,[a.ROW_ID_MAP_BY_INDEX]:t,[a.INDEX_MAP_BY_ROW_ID]:s,[a.INCOMING_ON_ROW_CLICK]:n,[a.LOCAL_CURRENT_INDEX]:i,[a.MULTI_SELECT_MODE]:r})=>{const o=(0,c.useCallback)(e=>{e.preventDefault()},[]),l=(0,c.useCallback)(()=>{const t=e.current.get(s.get(i.current+1));t&&(n?.(t),i.current+=1)},[s,i,n,e]),d=(0,c.useCallback)(()=>{const t=e.current.get(s.get(i.current-1));t&&(n?.(t),i.current-=1)},[s,i,n,e]);return(0,c.useCallback)((e,{id:s})=>e=>{if(!r&&n){const n=t.get(s);if(Number.isFinite(n))switch(null===i.current&&(i.current=n),e.key){case u.U.ARROW_DOWN:o(e),l();break;case u.U.ARROW_UP:o(e),d()}}},[n,i,r,o,t,l,d])})({[a.DATA_MAP_REFERENCE]:I,[a.ROW_ID_MAP_BY_INDEX]:j,[a.INDEX_MAP_BY_ROW_ID]:C,[a.INCOMING_ON_ROW_CLICK]:s,[a.LOCAL_CURRENT_INDEX]:p,[a.MULTI_SELECT_MODE]:x.multiSelectMode}),N=(({[r.INCOMING_ROW_PROPS]:e,[r.ON_KEY_DOWN]:t,[r.HAS_ON_ROW_CLICK]:s})=>(0,c.useCallback)((n,i)=>({...s?{[A.L]:_.b.SIDE_PANEL_TRIGGER}:{},...e?.(n,i),[d]:n.id,tabIndex:0,onKeyDown:t(n,i)}),[e,t,s]))({[r.INCOMING_ROW_PROPS]:t,[r.ON_KEY_DOWN]:O,[r.HAS_ON_ROW_CLICK]:Boolean(s)}),g=(({[o.INCOMING_ON_ROW_CLICK]:e,[o.LOCAL_CURRENT_INDEX]:t})=>{const s=(0,c.useCallback)(s=>{t.current=null,e?.(s)},[e,t]);return e?s:void 0})({[o.INCOMING_ON_ROW_CLICK]:s,[o.LOCAL_CURRENT_INDEX]:p});return(0,l.jsx)(h,{ref:E,data:e,rowProps:N,onRowClick:g,tableHeight:e.length?"100%":void 0,virtualize:!0,virtualizeColumn:!0,overscan:6,overscanColumn:1,stickyHeader:!0,...x})}}}]);