"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[77599],{697363(e,t,n){n.d(t,{A:()=>r});const r={POWER_CYCLE_ON_AC_RECOVERY:2,POWER_BUZZER:4}},953394(e,t,n){var r;n.d(t,{s:()=>r}),function(e){e.STANDARD="standard",e.USB="usb",e.LAN="lan",e.WAN="wan",e.RJ45="rj45",e.SURGE="surge"}(r||(r={}))},175522(e,t,n){n.d(t,{A:()=>l,Q:()=>a});var r=n(416348);const l="_",a=[r.ZM,r.Je]},532114(e,t,n){n.d(t,{A:()=>o});var r=n(217439),l=n(71479),a=n(311785);const o=(0,l.A)(r.A,(0,a.A)("colorOverride"))`
  ${({colorOverride:e})=>e?`color: ${e} !important`:""};
`},994793(e,t,n){n.d(t,{A:()=>E});var r=n(296540),l=n(469733),a=n(217439),o=n(592563),i=n(46119),c=n(187483),s=n(215454),m=n(765562);const E=(0,r.memo)(({size:e="inherit",children:t})=>{const n=(0,l.useSelector)(c.y$),E=(0,l.useSelector)(s.PO),u=(0,r.useCallback)(()=>{n?n({appId:"network"}):i.A.open(`${m.A.accountSupportForm}?console=${E}&application=network`)},[n,E]);return r.createElement(o.A,{fontSize:"medium",type:"button",onPress:u},r.createElement(a.A,{size:e,color:"inherit"},t))})},242366(e,t,n){n.d(t,{A:()=>o});var r=n(296540),l=n(566723),a=n(294303);const o=(0,r.forwardRef)((e,t)=>r.createElement(a.A,{ref:t,flexDirection:"column",gap:l.kc,width:"100%",...e}))},128736(e,t,n){n.d(t,{A:()=>i});var r=n(822336),l=n(296540),a=n(823858),o=n(382389);const i=e=>{const{themeName:t}=(0,o.u)();return l.createElement(a.A,{size:"original",variant:"fill",color:r.Ay[`desktop-color-orange-06-${t}`],...e})}},819127(e,t,n){n.d(t,{A:()=>o});var r=n(296540),l=n(766624),a=n(530813);const o=function({items:e,getItemKey:t,renderItem:n,maxItemCount:o,renderShowMore:i,showListMarkers:c,title:s,position:m,isInteractive:E,cursorType:u,listGap:A,iconProps:d}){return r.createElement(l.A,{title:s,position:m,isInteractive:E,cursorType:u,description:r.createElement(a.A,{items:e,getItemKey:t,renderItem:n,maxItemCount:o,listGap:A,renderShowMore:i,showListMarkers:c}),iconProps:d})}},424135(e,t,n){n.d(t,{A:()=>o});var r=n(296540),l=n(566723),a=n(294303);const o=({children:e,tooltip:t})=>r.createElement(a.A,{maxWidth:"100%",overflow:"hidden",gap:l.YC,alignItems:"center"},e?r.createElement(a.A,{flex:1,overflow:"hidden"},e):null,t)},373229(e,t,n){n.d(t,{A:()=>m});var r=n(296540),l=n(758649),a=n(71479),o=n(566723),i=n(916537),c=n(311785);const s=(0,a.A)("footer",(0,c.A)("hasFormResetButton"))`
  display: flex;
  justify-content: ${({hasFormResetButton:e})=>e?"space-between":"flex-end"};
  padding: ${o.S2} ${o.fS};
  gap: ${o.kc};
`,m=({allowCancel:e,isDirty:t,isInvalid:n,isSubmitting:a,onFormSubmit:o,onFormReset:c,onFormCancel:m,className:E,submitButtonText:u,customButton:A,applyButton:d,applyButtonFirst:_,hideCancelButton:p,form:I})=>{const C=(0,r.useMemo)(()=>d||r.createElement(l.A,{name:"submit",variant:"primary",type:"submit",onClick:o,disabled:!t||n||a,form:I},r.createElement(i.sA,{id:u||"COMMON_ACTION_APPLY_CHANGES"})),[d,I,t,n,a,o,u]);return r.createElement(s,{className:E,hasFormResetButton:!!c},_?C:A,p?null:r.createElement(l.A,{name:"cancel",variant:"default",type:"button",onClick:m,disabled:!e&&!t},r.createElement(i.sA,{id:"COMMON_ACTION_CANCEL"})),c?r.createElement(l.A,{name:"reset",variant:"default",type:"button",onClick:c,disabled:!t},r.createElement(i.sA,{id:"COMMON_ACTION_RESET_TO_DEFAULT"})):null,_?A:C)}},329109(e,t,n){n.d(t,{A:()=>m});var r=n(296540),l=n(691441),a=n(71479),o=n(132196),i=n(373229);const c=(0,a.A)("div")`
  height: 66px;
`,s=o.AH`
  padding: 0px !important;
`,m=({isDirty:e,onFormSubmit:t,onFormCancel:n,isInvalid:a,...o})=>e?r.createElement(l.A,null,r.createElement(i.A,{isDirty:e,onFormCancel:n,onFormSubmit:t,isInvalid:a,className:s,...o})):r.createElement(c,null)},296704(e,t,n){n.d(t,{A:()=>s});var r=n(469733),l=n(296540),a=n(592563),o=n(895795),i=n(742920),c=n(675359);const s=({value:e})=>{const t=(0,r.useDispatch)(),n=(0,l.useCallback)(()=>navigator.clipboard.writeText(e).then(()=>{t((0,c.ox)({icon:i.C.success,message:"COMMON_COPIED_TO_CLIPBOARD",duration:1e3}))}),[e,t]);return l.createElement(a.A,{onPress:n,variant:"neutral"},l.createElement(o.A,{size:"original"}))}},507976(e,t,n){n.d(t,{A:()=>i});var r=n(296540),l=n(217439),a=n(916537),o=n(360113);const i=({local_uplink_port:e})=>e?r.createElement(o.A,null,r.createElement(l.A,{color:"text-2",size:"medium"},r.createElement(a.sA,{id:"COMMON_CONNECTED_VIA"})),r.createElement(l.A,{color:"text-3",size:"medium"},r.createElement(a.sA,{id:"COMMON_LOCAL_UPLINK_PORT",values:{portIdx:e}}))):null},329708(e,t,n){n.d(t,{A:()=>c});var r=n(296540),l=n(217439),a=n(6510),o=n(916537),i=n(360113);const c=({model:e})=>r.createElement(i.A,null,r.createElement(l.A,{color:"text-2",size:"medium"},r.createElement(o.sA,{id:"COMMON_MODEL"})),r.createElement(l.A,{color:"text-3",size:"medium"},(0,a.Lm)(e)))},559674(e,t,n){n.d(t,{A:()=>s});var r=n(296540),l=n(217439),a=n(115829),o=n(294303),i=n(916537),c=n(360113);const s=({connection_network_name:e})=>e?r.createElement(c.A,null,r.createElement(l.A,{color:"text-2",size:"medium"},r.createElement(i.sA,{id:"COMMON_NETWORK"})),r.createElement(o.A,null,r.createElement(a.A,{color:"text-3",size:"medium"},e))):null},45481(e,t,n){n.d(t,{A:()=>m});var r=n(296540),l=n(271856),a=n(217439),o=n(888170),i=n(823858),c=n(916537),s=n(360113);const m=({has_temperature:e,overheating:t,general_temperature:n})=>e&&Number.isFinite(n)?r.createElement(s.A,null,r.createElement(a.A,{color:"text-2",size:"medium"},r.createElement(c.sA,{id:"COMMON_TEMPERATURE"})),r.createElement(a.A,{color:"text-3",size:"medium"},r.createElement(r.Fragment,null,r.createElement(c.sA,{id:"DEVICE_PROPERTY_OVERVIEW_TEMPERATURE_VALUE",values:{temperature:n}}),t?r.createElement(l.A,{description:r.createElement(c.sA,{id:"DEVICE_PROPERTY_OVERVIEW_TEMPERATURE_OVERHEATING"}),width:180,position:"left",className:"ml-1",style:{display:"inline-block",verticalAlign:"text-bottom"}},r.createElement(i.A,{style:{color:o.Ay["color-danger"]}})):null))):null},258117(e,t,n){n.d(t,{A:()=>A});var r=n(296540),l=n(325898),a=n(217439),o=n(71479),i=n(903216),c=n(294303),s=n(916537),m=n(360113),E=n(863489);const u=(0,o.A)(c.A)`
  .tooltip-position-fixer {
    margin-right: -14px;
  }
`,A=({uplink:e,portSpeed:t})=>{const n=Number(t||e?.speed),{motif:o}=(0,l.A)();return n>0?r.createElement(m.A,null,r.createElement(a.A,{color:"text-2",size:"medium"},r.createElement(s.sA,{id:"COMMON_EXPERIENCE"})),r.createElement(u,{alignItems:"center"},r.createElement(a.A,{style:{color:(0,E.xe)(n,o,!1)},size:"medium"},(0,i.ir)(n)))):null}},13524(e,t,n){n.d(t,{A:()=>R});var r=n(296540),l=n(86571),a=n(689965),o=n(469733),i=n(217439),c=n(705145),s=n(777916),m=n(758649),E=n(968906),u=n(137298),A=n(398300),d=n(294303),_=n(845030),p=n(916537),I=n(927806),C=n(532419),O=n(360113),N=n(258117);const v=({activeItem:e})=>{const{speed:t,rx_packets:n,rx_bytes:l,tx_packets:a,tx_bytes:v}=(0,I.q$)(e)||{},R=(0,o.useSelector)((0,r.useMemo)(()=>(0,C.I4)(e.mac),[e.mac])),{poe_power:g=null,port_poe:T=!1}=(0,I.$Y)({device:e,uplink:R})||{},D=(0,o.useDispatch)(),{formatMessage:M}=(0,p.tz)(),S=(0,r.useCallback)(()=>{D((0,_.XP)({type:A.H.DEVICE,id:R?.mac}))},[D,R?.mac]);return r.createElement(d.A,{height:"100%",flexDirection:"column"},R?.mac?r.createElement(O.A,null,r.createElement(i.A,{size:"medium"},r.createElement(p.sA,{id:"COMMON_DEVICE"})),r.createElement(m.A,{type:"button",variant:"inline",onClick:S,...E.A.addDataTestId(E.A.TestId.SIDE_PANEL_TRIGGER)},r.createElement(c.A,{color:"inherit",size:"medium",isTruncated:!0},(0,I.Jz)(e,R,M)))):null,r.createElement(N.A,{portSpeed:t}),T&&Number(g)>0?r.createElement(O.A,null,r.createElement(i.A,{size:"medium"},r.createElement(p.sA,{id:"DEVICE_PROPERTY_UPLINK_POWER"})),r.createElement(i.A,{size:"medium",color:"text-3"},r.createElement(p.sA,{id:"COMMON_UNIT_WATTS_SHORT",values:{value:g}}))):null,n&&l?r.createElement(O.A,null,r.createElement(i.A,{size:"medium"},r.createElement(p.sA,{id:"COMMON_DOWN_PKTS_BYTES"})),r.createElement(i.A,{size:"medium",color:"text-3"},r.createElement(s.A,{type:"number",input:n,size:"body",color:"tertiary"})," / ",(0,u.z3)(l))):null,a&&v?r.createElement(O.A,null,r.createElement(i.A,{size:"medium"},r.createElement(p.sA,{id:"COMMON_UP_PKTS_BYTES"})),r.createElement(i.A,{size:"medium",color:"text-3"},r.createElement(s.A,{type:"number",input:a,size:"body",color:"tertiary"})," / ",(0,u.z3)(v))):null)},R=({activeItem:e})=>r.createElement(a.A,{type:a.I.ACCORDION,items:[{id:"uplink",openByDefault:!0,label:r.createElement(l.A,{id:"COMMON_PARENT_DEVICE"}),renderContent:()=>r.createElement(v,{activeItem:e})}]})},405639(e,t,n){n.d(t,{A:()=>y});var r=n(296540),l=n(822336),a=n(469733),o=n(405442),i=n(217439),c=n(705145),s=n(668393),m=n(321971),E=n(970847),u=n(699948),A=n(297454),d=n(325882),_=n(808326),p=n(71479),I=n(180524),C=n(968906),O=n(960407),N=n(311785),v=n(860631),R=n(398300),g=n(566723),T=n(855019),D=n(294303),M=n(845030),S=n(916537),b=n(953394),h=n(825032);const P=(0,p.A)("div",(0,N.A)("cellSize","isEnabled","outletType","marginSize","verticalGap","centerIcon"))`
  width: ${({cellSize:e})=>e||"20px"};
  height: ${({cellSize:e})=>e||"20px"};
  align-items: center;
  border-radius: 2px;
  color: ${({theme:{themeName:e}})=>e===h.S.DARK?"#000":"#fff"};
  justify-content: center;
  display: flex;
  position: relative;

  ${({centerIcon:e,verticalGap:t})=>e&&t&&`transform: translateY(calc(50% + ${t} / 2))`};

  &:not(:first-child) {
    margin-left: ${({marginSize:e})=>e||"10px"};
  }

  div:last-child {
    right: -15px;
  }

  ${({outletType:e,isEnabled:t,theme:{themeName:n,motifPalette:{uBlue01:r}}})=>{switch(e){case b.s.RJ45:return`\n          background-color: ${r};\n          border: 1px solid ${l.Ay[`desktop-color-ublue-03-${n}`]};\n        `;case b.s.WAN:return`\n          background-color: ${l.Ay[`desktop-color-neutral-03-${n}`]};\n        `;default:return`\n          background-color: ${t?l.Ay[`desktop-color-green-06-${n}`]:l.Ay[`desktop-color-neutral-05-${n}`]};\n        `}}}
`,f=(0,p.A)("div",(0,N.A)("iconRotation"))`
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;

  svg {
    ${({iconRotation:e})=>e?`transform: rotate(${e});`:""}
    max-width: 100%;
    max-height: 100%;
  }
`,y=({activeItemMac:e,cellData:t,marginSize:n,cellSize:l,verticalGap:p,iconRotation:N,centerIcon:h,showBatteryPowered:y,tooltipPlacement:x,disableOnPortClick:L,iconSize:w,isBatteryMode:z,tooltipOverride:k,disableTooltip:U,isEU:V,offline:W})=>{const G=(0,a.useDispatch)(),B=(0,a.useSelector)(O.oI),$=(0,v.TT)(t,"POWER_METER"),{outletType:F=b.s.STANDARD,index:Y,name:H,outlet_power:j,outlet_current:X,outlet_voltage:K,outlet_power_factor:Z,cycle_enabled:J,relay_state:Q,surgeType:q}=t,ee=[b.s.STANDARD,b.s.USB].includes(F),te=(0,r.useMemo)(()=>{if(!U)return k||(F===b.s.RJ45?q?r.createElement(i.A,{size:"inherit",color:"inherit"},r.createElement(S.sA,{id:q===o.ME.IN?"DEVICE_SURGE_IN":"DEVICE_SURGE_OUT"})):null:F===b.s.WAN?r.createElement(i.A,{size:"inherit",color:"inherit"},r.createElement(S.sA,{id:"DEVICE_PROPERTIES_OUTLET_TOOLTIP_WAN_NO_STATUS_INFO"})):$&&F===b.s.STANDARD?r.createElement(D.A,{flexDirection:"column",justifyContent:"space-between",minWidth:180},r.createElement(D.A,{justifyContent:"space-between"},r.createElement(i.A,{size:"inherit",color:"inherit"},r.createElement(S.sA,{id:"COMMON_AC_OUTLET"})),r.createElement(i.A,{size:"inherit",color:"inherit"},Y)),r.createElement(D.A,{justifyContent:"space-between",alignItems:"center",gap:g.kc},r.createElement(i.A,{size:"inherit",color:"inherit"},r.createElement(S.sA,{id:"COMMON_NAME"})),r.createElement(c.A,{size:"inherit",color:"inherit",isTruncated:!0},H)),r.createElement(D.A,{justifyContent:"space-between"},r.createElement(i.A,{size:"inherit",color:"inherit"},r.createElement(S.sA,{id:"COMMON_POWER"})),r.createElement(i.A,{size:"inherit",color:"inherit"},r.createElement(S.sA,{id:"COMMON_UNIT_WATTS_SHORT",values:{value:Number(j||0).toFixed(2)}}))),r.createElement(D.A,{justifyContent:"space-between"},r.createElement(i.A,{size:"inherit",color:"inherit"},r.createElement(S.sA,{id:"COMMON_CURRENT"})),r.createElement(i.A,{size:"inherit",color:"inherit"},r.createElement(S.sA,{id:"COMMON_UNIT_AMPERES_SHORT",values:{value:Number(X||0).toFixed(2)}}))),r.createElement(D.A,{justifyContent:"space-between"},r.createElement(i.A,{size:"inherit",color:"inherit"},r.createElement(S.sA,{id:"COMMON_VOLTAGE"})),r.createElement(i.A,{size:"inherit",color:"inherit"},r.createElement(S.sA,{id:"COMMON_UNIT_VOLTAGE_SHORT",values:{value:Number(K||0).toFixed(2)}}))),r.createElement(D.A,{justifyContent:"space-between"},r.createElement(i.A,{size:"inherit",color:"inherit"},r.createElement(S.sA,{id:"COMMON_POWER_FACTOR"})),r.createElement(i.A,{size:"inherit",color:"inherit"},Number(Z||0).toFixed(2)))):r.createElement(D.A,{flexDirection:"column",justifyContent:"space-between",minWidth:180},r.createElement(D.A,{justifyContent:"space-between"},r.createElement(i.A,{size:"inherit",color:"inherit"},r.createElement(S.sA,{id:"COMMON_OUTLET"})),r.createElement(i.A,{size:"inherit",color:"inherit"},Y)),r.createElement(D.A,{justifyContent:"space-between",alignItems:"center",gap:g.kc},r.createElement(i.A,{size:"inherit",color:"inherit"},r.createElement(S.sA,{id:"COMMON_NAME"})),r.createElement(c.A,{size:"inherit",color:"inherit",isTruncated:!0},H)),r.createElement(D.A,{justifyContent:"space-between"},r.createElement(i.A,{size:"inherit",color:"inherit"},r.createElement(S.sA,{id:"DEVICE_PROPERTIES_OUTLET_CTL_POWER_CYCLE_ENABLED"})),r.createElement(J?A.A:u.A,null)),r.createElement(D.A,{justifyContent:"space-between"},r.createElement(i.A,{size:"inherit",color:"inherit"},r.createElement(S.sA,{id:"DEVICE_PROPERTIES_OUTLET_RELAY_STATE"})),r.createElement(Q?A.A:u.A,null))))},[U,k,F,$,Y,H,j,X,K,Z,J,Q,q]),ne=(0,r.useMemo)(()=>{const e=V?d.A:m.A;switch(F){case b.s.STANDARD:return r.createElement(y?_.A:e,{size:w});case b.s.SURGE:return r.createElement(e,{size:w});case b.s.USB:return r.createElement(s.A,{size:w});case b.s.LAN:return null;case b.s.WAN:return r.createElement(E.A,{size:w});default:return null}},[V,F,y,w]),re=(0,r.useCallback)(t=>{t?.preventDefault?.(),t?.stopPropagation?.(),L||ee&&G((0,M.XP)({type:R.H.DEVICE,id:e,tab:B,subId:String(Y),subPanel:T.uY.OUTLETS}))},[G,B,e,ee,Y,L]),le=y&&F===b.s.STANDARD;return r.createElement(I.A,{description:te,placement:x},r.createElement(P,{isEnabled:!(!Q||F===b.s.SURGE&&z||W),outletType:F||b.s.STANDARD,marginSize:n,cellSize:l,verticalGap:p,centerIcon:h,onClick:re,...C.A.addDataTestId(C.A.TestId.SIDE_PANEL_TRIGGER)},r.createElement(f,{iconRotation:le?void 0:N},ne)))}},949810(e,t,n){n.d(t,{A:()=>R});var r=n(296540),l=n(217439),a=n(822336),o=n(823858),i=n(618983),c=n(71479),s=n(566723),m=n(294303),E=n(916537),u=n(170163),A=n(780811),d=n(837612),_=n(799552),p=n(377588),I=n(406816);const C=(0,c.A)("div")`
  display: flex;
  flex-direction: column;
`,O=(0,c.A)("div")`
  margin-top: ${s.Ln};
  padding-top: ${s.Ln};
  border-top: ${({theme:{themeName:e}})=>a.Ay[`desktop-border-divider-${e}`]};

  div:first-child {
    margin-bottom: ${s.xO};
  }
`,N=(0,c.A)(o.A)`
  color: ${({theme:{themeName:e}})=>a.Ay[`desktop-color-orange-06-${e}`]};
  height: 18px;
  width: 18px;
  margin-right: 10px;
`,v=(0,c.A)(i.A)`
  color: ${({theme:{themeName:e}})=>a.Ay[`desktop-color-green-06-${e}`]};
  height: 18px;
  width: 18px;
  margin-right: 10px;
`,R=({activeItem:e,activeItem:{outlet_table:t,outlet_ac_power_budget:n,outlet_ac_power_consumption:a,port_table:o},hidePorts:i,noDivider:c,gap:R=s.xO,legend:g,verticalLegend:T,tooltipPlacement:D="bottom end"})=>{const{usedPower:M,maxPower:S}=(0,r.useMemo)(()=>(0,u.hf)({outlet_table:t,outlet_ac_power_budget:n,outlet_ac_power_consumption:a}),[t,n,a]),b=(0,A.Tl7)(e)||(0,A.kYz)(e);return r.createElement(C,null,r.createElement(m.A,{justifyContent:"center",gap:R,alignItems:T?"center":void 0},r.createElement(m.A,{flexDirection:"column"},r.createElement(p.A,{disableOnPortClick:!0,activeItem:e,tooltipPlacement:D,isEU:(0,A.goQ)(e),offline:(0,A.aK8)((0,d.S9)(e))})),o&&!i?r.createElement("div",null,r.createElement(_.A,{activeItem:e,portSizeOverride:"19px",disableOnPortClick:b})):null,T),T?null:g||r.createElement(I.Ay,{activeItem:e,noTopBorder:c}),M>S?r.createElement(O,null,r.createElement(m.A,{justifyContent:"space-between"},r.createElement(N,null),r.createElement(l.A,{size:"small"},r.createElement(E.sA,{id:"DEVICE_PROPERTIES_OUTLET_POWER_OVERLOAD_WARNING"}))),r.createElement(m.A,{justifyContent:"space-between"},r.createElement(v,null),r.createElement(l.A,{size:"small"},r.createElement(E.sA,{id:"DEVICE_PROPERTIES_OUTLET_POWER_OVERLOAD_INFO"})))):null)}},863189(e,t,n){n.d(t,{Ay:()=>_,u6:()=>d});var r=n(822336),l=n(296540),a=n(808326),o=n(71479),i=n(382389),c=n(566723),s=n(294303),m=n(916537),E=n(406816);const u=()=>{const{themeName:e,motifPalette:{lime06:t,uBlue01:n}}=(0,i.u)();return l.createElement(l.Fragment,null,l.createElement(E.Jv,{icon:l.createElement(E.RH,{status:"positive"}),label:l.createElement(l.Fragment,null,l.createElement(m.sA,{id:"COMMON_ENABLED"})," / ",l.createElement(m.sA,{id:"COMMON_MEDIA_GE"}))}),l.createElement(E.Jv,{icon:l.createElement(E.RH,{color:t}),label:l.createElement(m.sA,{id:"COMMON_MEDIA_FE"})}),l.createElement(E.Jv,{icon:l.createElement(E.RH,{color:r.Ay[`desktop-color-neutral-05-${e}`]}),label:l.createElement(m.sA,{id:"DEVICE_NOT_POWERED"})}),l.createElement(E.Jv,{icon:l.createElement(a.A,{color:r.Ay[`desktop-color-neutral-08-${e}`]}),label:l.createElement(m.sA,{id:"DEVICE_BATTERY_BACKED"})}),l.createElement(E.Jv,{icon:l.createElement(E.RH,{borderColor:r.Ay[`desktop-color-ublue-03-${e}`],background:n}),label:l.createElement(m.sA,{id:"DEVICE_SURGE_NETWORK"})}))},A=(0,o.A)(E.cs)`
  grid-template-columns: repeat(4, minmax(min-content, 0.5fr));
`,d=()=>l.createElement(A,{noTopBorder:!0},l.createElement(u,null)),_=()=>l.createElement(s.A,{flexDirection:"column",gap:c.YC},l.createElement(u,null))},474555(e,t,n){n.r(t),n.d(t,{default:()=>pn});var r=n(296540),l=n(885414),a=n(6510),o=n(566723),i=n(822336),c=n(217439),s=n(823858),m=n(382389),E=n(916537),u=n(294303);const A=({name:e})=>{const{themeName:t}=(0,m.u)();return r.createElement(u.A,{gap:o.kc},r.createElement(s.A,{size:"original",color:i.Ay[`desktop-color-orange-06-${t}`],variant:"fill"}),r.createElement(c.A,{size:"medium",color:"text-1"},r.createElement(E.sA,{id:"DEVICE_WARNING_BATTERY_IN_USE",values:{device:e}})))};var d=n(689965),_=n(780811),p=n(927806),I=n(930662),C=n(84385),O=n(67753),N=n(532114),v=n(768195);const R={[v.W4.USWDA23]:60,[v.W4.USWDA24]:60,[v.W4.USWDA25]:100,[v.W4.USWDA26]:100},g=({current:e,max:t,model:n=""})=>{const{themeName:l}=(0,m.u)(),a=R[n]||0,s=e<a,A=s?a:e,d=t?100*A/t:0,_=i.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"}})(d)}-${l}`];return r.createElement(u.A,{flexDirection:"column",gap:o.kc},r.createElement(u.A,{justifyContent:"space-between"},r.createElement(O.A,{variant:"medium"},r.createElement(E.sA,{id:"DEVICE_SURGE"})," / ",r.createElement(E.sA,{id:"DEVICE_HEADER_POWER_UTILIZATION"})),r.createElement(u.A,{gap:o.YC,alignItems:"baseline"},r.createElement(u.A,{gap:o.YC,alignItems:"center"},r.createElement(c.A,{size:"medium",color:"text-3"},r.createElement(E.sA,{id:"COMMON_UNIT_WATTS_SHORT",values:{value:[s?"<":"",A.toFixed(2),"/",t].join("")}})),r.createElement(C.A,{orientation:"vertical",style:{height:16},color:i.Ay[`desktop-color-neutral-03-${l}`]}),r.createElement(N.A,{size:"medium",colorOverride:_},s?"0-":"",`${Math.round(d)}%`)))),r.createElement(I.A,{size:8,variant:"success",value:d,color:_}))};var T=n(949810),D=n(13524),M=n(812454),S=n(469733),b=n(349785),h=n(96512),P=n(79786),f=n(171073),y=n(329109),x=n(614476),L=n(897502);const w=x.Ay.object({outlet_power_cycle_on_ac_recovery_enabled:x.Ay.boolean()}),z=()=>r.createElement(L.A,{control:(0,b.xW)().control,name:"outlet_power_cycle_on_ac_recovery_enabled"},r.createElement(c.A,{size:"medium",color:"text-2"},r.createElement(E.sA,{id:"DEVICE_AUTO_RECOVERY_POWER_CYCLE"}))),k="upsTowerOverviewForm",U=({children:e,activeItem:{_id:t,mac:n,outlet_power_cycle_on_ac_recovery_enabled:l}})=>{const a=(0,S.useDispatch)(),o=(0,h.I)(),i=(0,P.m)({schema:w,defaultValues:{outlet_power_cycle_on_ac_recovery_enabled:l}}),{handleSubmit:c,formState:{isDirty:s,isSubmitting:m},reset:E}=i,u=c(async e=>a((0,f.ex)(e,t,n,{extend:!0})).catch(o).then(()=>E(e)));return r.createElement("form",{id:k,onSubmit:u},r.createElement(b.Op,{...i},e),r.createElement(y.A,{form:k,isDirty:s,onFormCancel:E,isSubmitting:m}))};var V=n(146784),W=n(999063),G=n(45481),B=n(559674),$=n(329708),F=n(723544),Y=n(507976),H=n(400242),j=n(57759),X=n(360113);const K=({battpool:{device_total_power_output:e,device_output_current:t,device_output_voltage:n,device_total_power_factor:l}})=>r.createElement(r.Fragment,null,e?r.createElement(X.A,null,r.createElement(c.A,{size:"medium"},r.createElement(E.sA,{id:"COMMON_POWER"})),r.createElement(c.A,{color:"text-3",size:"medium"},r.createElement(E.sA,{id:"COMMON_UNIT_WATTS_SHORT",values:{value:Number(e).toFixed(2)}}))):null,t?r.createElement(X.A,null,r.createElement(c.A,{size:"medium"},r.createElement(E.sA,{id:"COMMON_CURRENT"})),r.createElement(c.A,{color:"text-3",size:"medium"},r.createElement(E.sA,{id:"COMMON_UNIT_AMPERES_SHORT",values:{value:Number(t).toFixed(2)}}))):null,n?r.createElement(X.A,null,r.createElement(c.A,{size:"medium"},r.createElement(E.sA,{id:"COMMON_VOLTAGE"})),r.createElement(c.A,{color:"text-3",size:"medium"},r.createElement(E.sA,{id:"COMMON_UNIT_VOLTAGE_SHORT",values:{value:Number(n).toFixed(2)}}))):null,l?r.createElement(X.A,null,r.createElement(c.A,{size:"medium"},r.createElement(E.sA,{id:"DEVICE_HEADER_POWER_FACTOR"})),r.createElement(c.A,{color:"text-3",size:"medium"},Number(l).toFixed(2))):null),Z=({name:e,model:t,ip:n,lan_ip:l,ipv6:a,mac:o,displayable_version:i,uptime:c,has_temperature:s,overheating:m,general_temperature:E,connection_network_name:A,vbms_table:d,type:_,local_uplink_port:p,deviceState:I,ethernet_overrides:C,port_table:O})=>r.createElement(u.A,{flexDirection:"column"},r.createElement($.A,{model:t}),r.createElement(Y.A,{local_uplink_port:p}),r.createElement(H.A,{ip:n,lan_ip:l,type:_,ethernet_overrides:C,port_table:O}),r.createElement(V.A,{ipv6_address:a}),r.createElement(F.A,{mac:o}),r.createElement(j.A,{name:e,model:t,mac:o,type:_,displayable_version:i,uptime:c,deviceState:I}),r.createElement(B.A,{connection_network_name:A}),r.createElement(W.A,{uptime:c}),d?.battpool?r.createElement(K,{battpool:d.battpool}):null,r.createElement(G.A,{has_temperature:s,overheating:m,general_temperature:E}));var J=n(863189),Q=n(194912),q=n(231755),ee=n(423646),te=n(400374),ne=n(27075),re=n(71479),le=n(90757),ae=n(945132);const oe=(0,re.A)(Q.A)`
  width: 16px;
  height: 16px;
`,ie=({battpool:e,noBattery:t,isCharging:n})=>t?r.createElement(E.sA,{id:"COMMON_DISCONNECTED"}):n&&100===e.batteryLevel?r.createElement(E.sA,{id:"COMMON_READY"}):n?r.createElement(E.sA,{id:"DEVICE_BATTERY_STATE_CHARGING"}):e.batteryLevel<=0||!e.timeToRemain?r.createElement(E.sA,{id:"DEVICE_BATTERY_STATE_EMPTY"}):r.createElement(r.Fragment,null,r.createElement(E.sA,{id:"RPS_BATTERY_TIME_UNITE_EMPTY"}),": ",(0,le.Ay)(e.timeToRemain,e.timeToRemain>ae.gG?[le.Au.DAYS,le.Au.HOURS,le.Au.MINUTES]:[le.Au.SECONDS]).join("")||0),ce=({battpool:e,noBattery:t,badBattery:n,isCharging:l=!1})=>{const{themeName:a}=(0,m.u)();return t||n?r.createElement(te.A,{variant:"fill",color:i.Ay[`desktop-color-red-06-${a}`],size:"original"}):l&&e.batteryLevel<100?r.createElement(oe,{variant:"success"},r.createElement(ee.A,{color:"white"})):l&&100===e.batteryLevel?r.createElement(ne.A,{variant:"fill",color:i.Ay[`desktop-color-green-06-${a}`],size:"original"}):null},se=({battpool:e={},bms_run_anomaly:t=0,isCharging:n=!1})=>{const{themeName:a}=(0,m.u)(),s=0===e.readycnt,A=!!(0,l.g$)(t);return r.createElement(u.A,{flexDirection:"column",gap:o.YC},r.createElement(u.A,{justifyContent:"space-between"},r.createElement(u.A,{alignItems:"center",gap:o.YC},r.createElement(O.A,{variant:"medium"},r.createElement(E.sA,{id:"DEVICE_PROPERTY_OVERVIEW_BATTERY"})),r.createElement(ce,{battpool:e,noBattery:s,badBattery:A,isCharging:n})),A?null:r.createElement(u.A,{gap:o.YC,alignItems:"center"},r.createElement(c.A,{size:"medium",color:"text-3"},r.createElement(ie,{battpool:e,noBattery:s,isCharging:n})),r.createElement(q.A,{orientation:"vertical",style:{height:16},color:i.Ay[`desktop-color-neutral-03-${a}`]}),r.createElement(c.A,{size:"medium",color:e.batteryLevel<20?"notice":"positive"},Math.round(e.batteryLevel||0),"%"))),A?r.createElement(c.A,{size:"medium",color:"text-1"},r.createElement(E.sA,{id:"DEVICE_BATTERY_STATE_BAD_BATTERY_WARNING"})):null)},me=({battpool:e={},bms_run_anomaly:t=0,isCharging:n=!1})=>r.createElement(u.A,{flexDirection:"column",gap:o.kc},r.createElement(se,{battpool:e,bms_run_anomaly:t,isCharging:n}),r.createElement(I.A,{value:e.batteryLevel||0,size:8,variant:e.batteryLevel>=45?"success":"danger"}));var Ee=n(551753),ue=n(994793);const Ae=({messageId:e,values:t})=>r.createElement(Ee.A,{marginBottom:"none"},r.createElement(E.sA,{id:e,values:t})),de=()=>r.createElement(ue.A,null,r.createElement(E.sA,{id:"COMMON_CONTACT_SUPPORT"})),_e=({errorCode:e})=>r.createElement(u.A,{flexDirection:"column",gap:o.Ln},(0,l.Yx)(e)?r.createElement(Ae,{messageId:"DEVICE_WARNING_UPS_SHORT_CIRCUIT"}):null,(0,l.rS)(e)||(0,l.hH)(e)||(0,l.uc)(e)?r.createElement(Ae,{messageId:"DEVICE_WARNING_UPS_DEVICE_FAILURE",values:{link:r.createElement(de,null)}}):null);var pe,Ie,Ce,Oe,Ne=n(271856),ve=n(758649),Re=n(162420),ge=n(968906),Te=n(592510),De=n(422969),Me=n(398300),Se=n(855019),be=n(86571),he=n(845030),Pe=n(801081),fe=n(25553),ye=n(87485),xe=n(516693),Le=n(691189),we=n(887831);!function(e){e.STATE="state",e.MODEL="model",e.NAME="name",e.CONSOLE_MAC="console_mac",e.UPS_MAC="ups_mac",e.ICON="icon"}(pe||(pe={})),function(e){e.PAIRED="paired",e.UNPAIRED="unpaired",e.UPGRADE_NEEDED="upgrade_needed",e.TOKEN_INVALID="token_invalid",e.OFFLINE="offline"}(Ie||(Ie={})),function(e){e.CONSOLE_MAC="console_mac",e.USERNAME="username",e.PASSWORD="password",e.UPS_MAC="ups_mac"}(Ce||(Ce={})),function(e){e.CONSOLE_MAC="console_mac"}(Oe||(Oe={}));const ze="/v2/api/ups",ke=`${ze}/consoles`,Ue=`${ze}/pair`,Ve=`${ze}/unpair`,We=Ce.CONSOLE_MAC,Ge=(e={},t={})=>(0,Le.t9)("safeShutdownPairing",ke,e,{idField:We,...t}),Be=(0,fe.uh)(Ge()),$e=(0,Pe.Mz)(Be,ye.kh);var Fe,Ye=n(792072),He=n(71177),je=n(592563),Xe=n(180524),Ke=n(511752),Ze=n(742920),Je=n(675359);!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"}(Fe||(Fe={}));var Qe=n(874807);const qe=(0,r.createContext)({[Fe.DEVICE_MAC]:void 0,[Fe.PAIRING_DEVICE]:void 0,[Fe.SET_PAIRING_DEVICE]:Qe.P1,[Fe.PAIRING_STEP]:void 0,[Fe.SET_PAIRING_STEP]:Qe.P1,[Fe.ON_PAIR]:Qe.P1});var et=n(198494);const tt=(0,Pe.Mz)(et.IG,et.fR,(e,t)=>e||t),nt=[Ie.PAIRED,Ie.OFFLINE],rt=(0,re.A)(u.A)`
  width: 100%;
  height: 100%;
  table td:nth-child(3) {
    position: absolute;
    padding: 0;
  }
`;var lt;!function(e){e.DEVICE="device",e.STATUS="status"}(lt||(lt={}));var at=n(349107),ot=n(765562);const it=()=>r.createElement(Ne.A,{portal:!0,isInteractive:!0,cursorType:"pointer",description:r.createElement(E.sA,{id:"DEVICE_PAIR_UPGRADE_NEEDED_MESSAGE",values:{update:r.createElement(at.A,{href:ot.A.unifiOsUpdateManager,customText:(0,E.tz)().formatMessage({id:"COMMON_ACTION_UPDATE"}).toLowerCase()})}})},r.createElement(je.A,{type:"button",fontSize:"medium",isDisabled:!0},r.createElement(E.sA,{id:"DEVICE_CLICK_TO_PAIR"})));var ct=n(705145);const st=({safeShutdownPair:e,tokenInvalid:t=!1})=>{const n=(0,S.useSelector)(tt),{[Fe.PAIRING_DEVICE]:l,[Fe.ON_PAIR]:a}=(0,r.useContext)(qe),o=(0,r.useCallback)(()=>{a(e)},[a,e]);return r.createElement(Xe.A,{description:n?void 0:r.createElement(E.sA,{id:"COMMON_ONLY_OWNER_OR_SUPER_ADMIN_CAN_PERFORM_THIS_ACTION"})},r.createElement(je.A,{style:{maxWidth:"100%"},type:"button",fontSize:"medium",onPress:o,isDisabled:Boolean(l?.[pe.CONSOLE_MAC])||!n},r.createElement(ct.A,{color:"inherit",size:"inherit",isTruncated:!0},r.createElement(E.sA,{id:t?"DEVICE_AUTHORIZATION_EXPIRED":"DEVICE_CLICK_TO_PAIR"}))))},mt=({safeShutdownPair:e})=>r.createElement(st,{safeShutdownPair:e,tokenInvalid:!0}),Et=()=>r.createElement(c.A,{size:"medium",color:"text-3"},r.createElement(E.sA,{id:"DEVICE_PAIRING"}),".."),ut=({safeShutdownPair:e})=>{const{[Fe.DEVICE_MAC]:t,[Fe.ON_PAIR]:n}=(0,r.useContext)(qe),l=(0,r.useCallback)(()=>{n(e)},[n,e]);return t===e[pe.UPS_MAC]?r.createElement(c.A,{size:"medium",color:"green-06"},r.createElement(E.sA,{id:"DEVICE_PAIRED"})):r.createElement(je.A,{type:"button",fontSize:"medium",onPress:l},r.createElement(E.sA,{id:"DEVICE_TAKE_OVER"}))},At=()=>r.createElement(c.A,{size:"medium",color:"text-3"},r.createElement(E.sA,{id:"COMMON_CONSOLE_OFFLINE"}));var dt=n(6176),_t=n(703447);const pt=(0,re.A)(u.A)`
  gap: ${o.YC};
  align-items: center;
`,It={accessorFn:e=>e,enableResizing:!1,enableSorting:!1},Ct=[{...It,id:lt.DEVICE,size:190,header:()=>r.createElement(E.sA,{id:"COMMON_DEVICE"}),cell:({getValue:e})=>{return t=e(),r.createElement(pt,null,Object.keys(t[pe.ICON]||{}).length?r.createElement(_t.A,{width:25,height:25,client:t[pe.ICON]}):r.createElement(dt.A,{model:t[pe.MODEL],width:25,height:25}),r.createElement(ct.A,{size:"medium",color:"text-2",isTruncated:!0},(0,a.Q)({name:t[pe.NAME],model:t[pe.MODEL],mac:t[pe.CONSOLE_MAC]})));var t}},{...It,id:lt.STATUS,size:140,header:()=>r.createElement(E.sA,{id:"COMMON_STATUS"}),cell:({getValue:e})=>((e,{[Fe.PAIRING_DEVICE]:t})=>{if(t?.[pe.CONSOLE_MAC]===e[pe.CONSOLE_MAC])return r.createElement(Et,null);switch(e[pe.STATE]){case Ie.PAIRED:return r.createElement(ut,{safeShutdownPair:e});case Ie.UNPAIRED:return r.createElement(st,{safeShutdownPair:e});case Ie.UPGRADE_NEEDED:return r.createElement(it,null);case Ie.TOKEN_INVALID:return r.createElement(mt,{safeShutdownPair:e});case Ie.OFFLINE:return r.createElement(At,null);default:return null}})(e(),(0,r.useContext)(qe))}],Ot=({safeShutdownPairs:e})=>{const[t,n]=(0,r.useState)(!1),l=(0,S.useDispatch)(),{[Fe.DEVICE_MAC]:a}=(0,r.useContext)(qe),o=(0,S.useSelector)(tt),i=(0,r.useCallback)(e=>()=>{var t;n(!0),l((t={[Oe.CONSOLE_MAC]:e},(0,Le.vB)(xe.aC,null,null,we.A.POST,Ve,{},t))).then(()=>{l(Ge())}).catch(({msg:e})=>{l((0,Je.ox)({icon:Ze.C.danger,message:e||"COMMON_NOTICE_REQUEST_ERROR"}))}).finally(()=>{n(!1)})},[l]),c=(0,r.useCallback)(({rowId:e})=>r.createElement(Xe.A,{description:o?void 0:r.createElement(E.sA,{id:"COMMON_ONLY_OWNER_OR_SUPER_ADMIN_CAN_PERFORM_THIS_ACTION"})},r.createElement(je.A,{variant:"destructive",type:"button",fontSize:"medium",onPress:i(e),isDisabled:t||!o},r.createElement(E.sA,{id:"DEVICE_UNPAIR"}))),[i,t,o]),s=(0,r.useMemo)(()=>o?e.map(e=>({...e,...nt.includes(e[pe.STATE])&&e[pe.UPS_MAC]===a?{_rowHoverContent:c}:{}})):e,[o,e,a,c]),m=(0,r.useCallback)(e=>e[pe.CONSOLE_MAC],[]);return r.createElement(rt,null,r.createElement(Ke.A,{data:s,columns:Ct,getRowId:m}))};var Nt=n(860631),vt=n(697363);const Rt=(0,r.memo)(({smart_power_caps:e=0})=>(0,r.useMemo)(()=>(0,Nt.TM)({smart_power_caps:e},vt.A.POWER_CYCLE_ON_AC_RECOVERY),[e])?r.createElement(z,null):null);var gt=n(918636),Tt=n(74750),Dt=n(641777),Mt=n(825032);const St=(0,re.A)(u.A)`
  gap: ${o.kc};
  background-color: ${({theme:{themeName:e}})=>i.Ay[`desktop-color-neutral-${e===Mt.S.DARK?"03":"02"}-${e}`]};
  border-radius: ${i.Ay["desktop-radius-base"]};
  padding: ${o.kc};
`,bt=({messageId:e})=>r.createElement(St,null,r.createElement(Re.A,{size:"original",isActive:!0,variant:"fill"}),r.createElement(c.A,{size:"medium",color:"text-2"},r.createElement(E.sA,{id:e,values:{name:(0,r.useContext)(qe)[Fe.PAIRING_DEVICE]?.[pe.NAME]}})));var ht;!function(e){e.SIX_DIGIT_CODE="sixDigitCode"}(ht||(ht={}));const Pt=x.z.object({[ht.SIX_DIGIT_CODE]:x.z.string().min(6)}),ft={[ht.SIX_DIGIT_CODE]:""},yt=(0,re.A)(u.A)`
  flex-direction: column;
  gap: ${o.tr};
  padding: ${o.kc};
`,xt=(0,re.A)(u.A)`
  gap: ${o.kc};
`,Lt=()=>{const[e,t]=(0,r.useState)(!1),{[Fe.SET_PAIRING_DEVICE]:n}=(0,r.useContext)(qe),{control:l}=(0,P.m)({schema:Pt,defaultValues:ft}),{isValid:a}=(0,b.lN)({control:l}),o=(0,r.useCallback)(()=>{t(!0)},[]),i=(0,r.useCallback)(()=>{n(void 0)},[n]),c=(0,r.useCallback)(e=>t=>{e(t)},[]),s=(0,r.useCallback)(({field:{value:e,onChange:t,onBlur:n},fieldState:{invalid:l}})=>r.createElement(gt.A,{tokens:6,type:"number",value:e,onChange:c(t),invalid:l,onBlur:n}),[c]);return r.createElement(Dt.A,{isDisabled:e},r.createElement(yt,null,r.createElement(bt,{messageId:"SHARED_MFA_DESCRIPTION_TOTP"}),r.createElement(b.xI,{control:l,name:ht.SIX_DIGIT_CODE,render:s}),r.createElement(xt,null,r.createElement(Tt.A,{size:"small",type:"button",onPress:o,isDisabled:!a||e},r.createElement(E.sA,{id:"COMMON_ACTION_CONFIRM"})),r.createElement(Tt.A,{size:"small",variant:"tertiary-neutral",type:"button",onPress:i},r.createElement(E.sA,{id:"COMMON_ACTION_CANCEL"})))))};var wt,zt=n(895424),kt=n(263963),Ut=n(546391);!function(e){e.EMAIL="email",e.PASSWORD="password"}(wt||(wt={}));const Vt={[wt.EMAIL]:"",[wt.PASSWORD]:""},Wt=(0,re.A)(u.A)`
  flex-direction: column;
  gap: ${o.kc};
  padding: ${o.kc};
`,Gt=(0,re.A)(u.A)`
  gap: ${o.kc};
`,Bt=()=>{const e=(0,S.useDispatch)(),{formatMessage:t}=(0,E.tz)(),[n,l]=(0,r.useState)(!1),{[Fe.DEVICE_MAC]:a,[Fe.PAIRING_DEVICE]:o,[Fe.SET_PAIRING_DEVICE]:i,[Fe.SET_PAIRING_STEP]:c}=(0,r.useContext)(qe),s=(0,r.useMemo)(()=>(e=>x.z.object({[wt.EMAIL]:x.z.string().regex(Ut.Xw,{message:(0,kt.rn)("COMMON_VALIDATION_EMAIL",{name:e({id:"COMMON_EMAIL"})})}),[wt.PASSWORD]:x.z.string({message:(0,kt.rn)("COMMON_MIN_CHARS",{min:3})}).min(3)}))(t),[t]),{control:m,trigger:u}=(0,P.m)({schema:s,defaultValues:Vt}),{isValid:A}=(0,b.lN)({control:m}),d=(0,b.FH)({control:m,name:wt.EMAIL}),_=(0,b.FH)({control:m,name:wt.PASSWORD}),p=(0,r.useCallback)(()=>{var t;l(!0),e((t={[Ce.CONSOLE_MAC]:(o||{})?.[pe.CONSOLE_MAC],[Ce.USERNAME]:d,[Ce.PASSWORD]:_,[Ce.UPS_MAC]:a},(0,Le.vB)(xe.aC,null,null,we.A.POST,Ue,{},t))).then(()=>{e(Ge()),c(void 0),i(void 0)}).catch(({msg:t})=>{e((0,Je.ox)({icon:Ze.C.danger,message:t||"COMMON_NOTICE_REQUEST_ERROR"}))}).finally(()=>{l(!1)})},[e,a,o,d,_,c,i]),I=(0,r.useCallback)(()=>{i(void 0)},[i]),C=(0,r.useCallback)(async(e,t)=>{t.onChange(e),await u(t.name)},[u]);return r.createElement(Dt.A,{isDisabled:n},r.createElement(Wt,null,r.createElement(bt,{messageId:"DEVICE_PAIRING_LOGIN_FORM_BANNER"}),r.createElement(zt.A,{control:m,name:wt.EMAIL,label:r.createElement(E.sA,{id:"COMMON_EMAIL"}),onChange:C}),r.createElement(zt.A,{control:m,name:wt.PASSWORD,label:r.createElement(E.sA,{id:"COMMON_PASSWORD"}),onChange:C,passwordToggle:!0}),r.createElement(Gt,null,r.createElement(Tt.A,{size:"small",type:"button",onPress:p,isDisabled:!A||n},r.createElement(E.sA,{id:"DEVICE_PAIR"})),r.createElement(Tt.A,{size:"small",variant:"tertiary-neutral",type:"button",onPress:I},r.createElement(E.sA,{id:"COMMON_ACTION_CANCEL"})))))};var $t;!function(e){e.LOGIN="login",e.MFA="mfa"}($t||($t={}));const Ft=(0,re.A)(u.A)`
  background-color: ${({theme:{themeName:e}})=>i.Ay[`desktop-color-neutral-${e===Mt.S.DARK?"02":"01"}-${e}`]};
`,Yt=()=>{const{[Fe.PAIRING_DEVICE]:e,[Fe.PAIRING_STEP]:t}=(0,r.useContext)(qe),n=(0,r.useMemo)(()=>{switch(t){case $t.LOGIN:return r.createElement(Bt,null);case $t.MFA:return r.createElement(Lt,null);default:return null}},[t]);return e&&n?r.createElement(Ft,null,n):null},Ht=(0,re.A)(u.A)`
  flex-direction: column;
  gap: ${o.kc};
`,jt=(0,re.A)(u.A)`
  flex-direction: column;
  gap: ${o.Ln};
`,Xt=(0,re.A)(u.A)`
  align-items: center;
  gap: ${o.YC};
`,Kt=({mac:e,safeShutdownPairs:t})=>{const[n,l]=(0,r.useState)(void 0),[a,o]=(0,r.useState)(void 0),i=(0,r.useCallback)(e=>{l(e),o($t.LOGIN)},[l,o]),c=(0,r.useMemo)(()=>({[Fe.DEVICE_MAC]:e,[Fe.PAIRING_DEVICE]:n,[Fe.SET_PAIRING_DEVICE]:l,[Fe.PAIRING_STEP]:a,[Fe.SET_PAIRING_STEP]:o,[Fe.ON_PAIR]:i}),[n,a,e,i]);return r.createElement(qe.Provider,{value:c},r.createElement(Ht,null,r.createElement(Ot,{safeShutdownPairs:t}),r.createElement(Yt,null)))},Zt=(0,r.memo)(({mac:e,smart_power_caps:t=0})=>{const n=(0,S.useDispatch)(),l=(0,S.useSelector)(Ye.rQ),a=(0,S.useSelector)($e),o=(0,r.useCallback)(()=>{n((0,he.XP)({type:Me.H.DEVICE,id:e,tab:Se.BC.SETTINGS}))},[n,e]),i=(0,r.useMemo)(()=>[{id:Kt.toString(),openByDefault:!0,label:r.createElement(Xt,null,r.createElement(be.A,{id:"DEVICE_SAFE_SHUTDOWN_PAIRING"}),r.createElement(Ne.A,{portal:!0,isInteractive:!0,description:r.createElement(E.sA,{id:"DEVICE_SAFE_SHUTDOWN_PAIRING_TOOLTIP",values:{settings:r.createElement(ve.A,{type:"button",variant:"inline",onClick:o,...ge.A.addDataTestId(ge.A.TestId.SIDE_PANEL_TRIGGER)},r.createElement(E.sA,{id:"DEVICE_UPS_SETTINGS"}))}})},r.createElement("span",null,r.createElement(Re.A,{isActive:!0,size:"original"})))),renderContent:()=>r.createElement(jt,null,r.createElement(Kt,{mac:e,safeShutdownPairs:a}),r.createElement(Rt,{smart_power_caps:t}))}],[e,a,o,t]);return(0,De.A)([(0,He.m)(void 0,{crudCacheStrategy:{type:Te.e.CACHE}}),Ge(void 0,{crudCacheStrategy:{type:Te.e.CACHE}})],l&&a.length?r.createElement(d.A,{type:d.I.ACCORDION,items:i}):null)});var Jt=n(130851);const Qt={[v.W4.USWDA23]:"/device/upsTower/reset.png",[v.W4.USWDA24]:"/device/upsTower/reset.png",[v.W4.USWDA25]:"/device/ups2U/reset.png",[v.W4.USWDA26]:"/device/ups2U/reset.png"},qt=({model:e})=>{const{themeName:t}=(0,m.u)();return r.createElement(u.A,{flexDirection:"column",alignItems:"center"},r.createElement(Ee.A,{variant:"warning",flex:1,padding:`${o.Ln} 0`},r.createElement(E.sA,{id:"DEVICE_WARNING_UPS_DEVICE_OVERLOAD"})),r.createElement(u.A,{justifyContent:"center",alignItems:"center"},r.createElement(u.A,{width:"104px",height:"104px",justifyContent:"center",alignItems:"center",borderRadius:"50%",overflow:"hidden",background:i.Ay[`desktop-color-neutral-01-${t}`],border:`solid 1px ${i.Ay[`desktop-color-neutral-03-${t}`]}`},r.createElement("img",{src:`${(0,S.useSelector)(Jt.p)}${Qt[e]||"/device/upsTower/reset.png"}`,height:104,alt:"reset"}))))};var en=n(478211),tn=n(170121),nn=n(242366),rn=n(296704);const ln=({username:e})=>r.createElement(X.A,null,r.createElement(c.A,{color:"text-2",size:"medium"},r.createElement(E.sA,{id:"COMMON_LABEL_USERNAME"})),r.createElement(u.A,{alignItems:"center",gap:o.YC},r.createElement(ct.A,{color:"text-3",size:"medium",isTruncated:!0},e),r.createElement(rn.A,{value:e})));var an=n(363334),on=n(784224);const cn=(0,re.A)(ct.A)`
  -webkit-text-security: disc;
  text-security: disc;
`,sn=({password:e})=>{const[t,n]=(0,r.useState)(!1);return r.createElement(X.A,null,r.createElement(c.A,{color:"text-2",size:"medium"},r.createElement(E.sA,{id:"COMMON_PASSWORD"})),r.createElement(u.A,{alignItems:"center",gap:o.YC},r.createElement(t?ct.A:cn,{color:"text-3",size:"medium",isTruncated:!0},e),r.createElement(je.A,{onPress:()=>n(!t),variant:"neutral"},r.createElement(t?on.A:an.A,{size:"original"}))))},mn=({id:e,port:t})=>{const n=e&&t?`${e}:${t}`:void 0;return r.createElement(X.A,null,r.createElement(c.A,{color:"text-2",size:"medium"},r.createElement(E.sA,{id:"COMMON_ID"})," / ",r.createElement(E.sA,{id:"COMMON_PORT"})),r.createElement(u.A,{alignItems:"center",gap:o.YC},n?r.createElement(r.Fragment,null,r.createElement(ct.A,{color:"text-3",size:"medium",isTruncated:!0},n),r.createElement(rn.A,{value:n})):null))},En=({label:e,children:t})=>r.createElement(X.A,null,r.createElement(c.A,{color:"text-2",size:"medium"},e),r.createElement(u.A,{alignItems:"center",gap:o.YC},r.createElement(ct.A,{color:"text-3",size:"medium",isTruncated:!0},t),r.createElement(rn.A,{value:t}))),un=({nut_server:e,nut_client_table:t=[],mac:n})=>{const l=(0,S.useDispatch)(),{id:a,port:i,credential_required:s,username:m,password:A}=e,_=(0,r.useCallback)(()=>{l((0,he.XP)({type:Me.H.DEVICE,id:n,tab:Se.BC.SETTINGS}))},[l,n]);return r.createElement(d.A,{type:d.I.ACCORDION,items:[{id:"nutServer",openByDefault:!0,renderLabel:()=>r.createElement(u.A,{gap:o.YC,alignItems:"center"},r.createElement(c.A,{variant:"heading-medium"},r.createElement(E.sA,{id:"DEVICE_HEADER_NUTSERVER"})),r.createElement(je.A,{onPress:_,...ge.A.addDataTestId(ge.A.TestId.SIDE_PANEL_TRIGGER)},r.createElement(en.A,{size:"original"}))),renderContent:()=>r.createElement(u.A,{flexDirection:"column"},r.createElement(mn,{id:a,port:i}),s?r.createElement(r.Fragment,null,r.createElement(ln,{username:m}),r.createElement(sn,{password:A})):null,t?.length?r.createElement(nn.A,null,r.createElement(tn.A,{size:"medium"},r.createElement(E.sA,{id:"DEVICE_NUT_CLIENTS"})),r.createElement(u.A,{flexDirection:"column"},t.slice().sort((e,t)=>(e.index||0)-(t.index||0)).map(({index:e,name:t,ip:n})=>r.createElement(En,{key:e,label:t},n)))):null)}]})},An=()=>r.createElement(u.A,{gap:o.kc},r.createElement(s.A,{size:"original",color:i.Ay[`desktop-color-orange-06-${(0,m.u)().themeName}`],variant:"fill"}),r.createElement(c.A,{size:"medium",color:"text-1"},r.createElement(E.sA,{id:"DEVICE_UPS_TOWER_BUZZ_WARNING",values:{b:E.b}})));var dn=n(78853),_n=n(757760);const pn=({activeItem:e,activeItem:{name:t,type:n,model:i,ip:c,lan_ip:s,ipv6:m,mac:E,displayable_version:I,uptime:C,connection_network_name:O,vbms_table:N={},nut_server:v={},nut_client_table:R=[],_id:S,outlet_power_cycle_on_ac_recovery_enabled:b,shortname:h,radio_table:P,radio_table_stats:f,vap_table:y,support_wifi6e:x,deviceState:L,ethernet_overrides:w,port_table:z}})=>r.createElement(U,{activeItem:{_id:S,mac:E,outlet_power_cycle_on_ac_recovery_enabled:b}},N?.is_battery_mode?r.createElement(d.A,null,(0,_.Snx)(e)?r.createElement(An,null):r.createElement(A,{name:(0,a.Q)(e)})):null,N?.bms_run_anomaly?r.createElement(_e,{errorCode:N.bms_run_anomaly}):null,r.createElement(M.A,{activeItem:e,hidePortsButton:!0,overviewChildren:r.createElement(r.Fragment,null,r.createElement(_n.A,{type:e.type,mac:e.mac,radio_table:P,radio_table_stats:f,vap_table:y,support_wifi6e:x,deviceState:L}),r.createElement(u.A,{marginTop:o.Ln,alignItems:"center",justifyContent:"center"},(0,l.Md)(N?.bms_run_anomaly||0)?r.createElement(qt,{model:i}):r.createElement(u.A,{flexDirection:"column",gap:o.Ln},r.createElement(T.A,{activeItem:e,gap:o.Yc,hidePorts:!0,tooltipPlacement:"top",noDivider:!0,...(0,_.Snx)(e)?{verticalLegend:r.createElement(J.Ay,null)}:{},...(0,_.uaO)(e)||(0,_.vqp)(e)?{legend:r.createElement(J.u6,null)}:{}}))))}),v?.enabled?r.createElement(un,{mac:E,nut_server:v,nut_client_table:R}):null,N?.battpool?r.createElement(d.A,null,r.createElement(u.A,{flexDirection:"column",gap:o.kc},r.createElement(g,{current:N.battpool.device_total_power_output||0,max:N.battpool.device_total_power_budget||0,model:i}),r.createElement(me,{battpool:N.battpool||{},bms_run_anomaly:N.bms_run_anomaly||0,isCharging:!N.is_battery_mode}))):null,r.createElement(Zt,{mac:e.mac,smart_power_caps:e.smart_power_caps||0}),r.createElement(d.A,null,r.createElement(Z,{name:t,ethernet_overrides:w,port_table:z,type:n,model:i,ip:c,lan_ip:s,ipv6:m,mac:E,displayable_version:I,uptime:C,connection_network_name:O,vbms_table:N,local_uplink_port:(0,p.q$)(e)?.port_idx})),r.createElement(D.A,{activeItem:e}),r.createElement(dn.A,{shortname:h}))},766624(e,t,n){n.d(t,{A:()=>c});var r=n(296540),l=n(271856),a=n(709690),o=n(284428),i=n(566723);const c=({description:e,isInteractive:t,portal:n=!0,cursorType:c,title:s,position:m,width:E,iconProps:u,disabled:A=!1})=>{const d=(0,o.Im)()||A,_=(0,o.q)();return r.createElement(l.A,{description:e,portal:n,isInteractive:t,style:{display:"flex",alignItems:"center"},cursorType:c,title:s,position:m,width:E,disableHover:_},r.createElement(a.A,{isActive:!0,size:"original",opacity:d?i.xN:void 0,...u}))}},280258(e,t,n){n.d(t,{H:()=>r});const r=""},596441(e,t,n){n.d(t,{I:()=>r});const r={HEADER_HEIGHT:32,ROW_HEIGHT:32,EDIT_FIELD_HEIGHT:36,getHeight(e,t,n,r){return Math.min((r||this.ROW_HEIGHT)*e+(n??this.HEADER_HEIGHT),(r||this.ROW_HEIGHT)*t+(n??this.HEADER_HEIGHT))},getEditContainerHeight(e,t,n){return Math.min((n||this.EDIT_FIELD_HEIGHT)*e,(n||this.EDIT_FIELD_HEIGHT)*t)}}},79786(e,t,n){n.d(t,{m:()=>i});var r=n(296540),l=n(349785),a=n(59116),o=n(870893);function i({schema:e,defaultValues:t,presets:n}){const i=(0,r.useMemo)(()=>n?(0,a.A)(n,e=>e.defaultValues):{},[n]),c=(0,r.useMemo)(()=>({...t,...i}),[i,t]),s=(0,l.mN)({resolver:(0,o.u)(e),shouldFocusError:!0,defaultValues:c,shouldUseNativeValidation:!1,mode:"onTouched"}),m=(0,r.useRef)(c);m.current=c;const E=(0,r.useCallback)((...e)=>{const[t,...n]=e;return s.reset(t?{...t,...i}:m.current,...n)},[i,s]);return{...s,reset:E,formState:{...s.formState,isDirty:!!Object.keys(s.formState.dirtyFields).length,isSubmitting:s.formState.isSubmitting},handleSubmit:(...e)=>s.handleSubmit(e[0],(t,...n)=>{const r=Object.keys(t)[0];if(r)try{const e=document.getElementsByName(r)?.[0];e?.scrollIntoView?.({behavior:"smooth",block:"center"}),e?.focus?.({preventScroll:!0})}catch{}e[1]?.(t,...n)})}}},451449(e,t,n){n.d(t,{I:()=>r});const r=(0,n(296540).createContext)({fields:!1,labels:!1,tooltipPopovers:!1,tooltipIcons:!1})},641777(e,t,n){n.d(t,{A:()=>o});var r=n(296540),l=n(284428),a=n(451449);const o=({isDisabled:e,isAdditive:t=!0,children:n})=>{const o=(0,l.pv)(),i=(0,r.useMemo)(()=>"boolean"==typeof e?{fields:e,labels:e,tooltipIcons:e,tooltipPopovers:!1}:e,[e]),c=(0,r.useMemo)(()=>({fields:t?i.fields||o.fields:i.fields,labels:t?i.labels||o.labels:i.labels,tooltipIcons:t?i.tooltipIcons||o.tooltipIcons:i.tooltipIcons,tooltipPopovers:t?i.tooltipPopovers||o.tooltipPopovers:i.tooltipPopovers}),[t,i.fields,i.labels,i.tooltipIcons,i.tooltipPopovers,o.fields,o.labels,o.tooltipIcons,o.tooltipPopovers]);return r.createElement(a.I.Provider,{value:c},n)}},284428(e,t,n){n.d(t,{Im:()=>c,iL:()=>s,mQ:()=>o,pv:()=>a,q:()=>i});var r=n(296540),l=n(451449);function a(){return(0,r.useContext)(l.I)}function o(){return a().fields}function i(){return a().tooltipPopovers}function c(){return a().tooltipIcons}function s(){return a().labels}},263963(e,t,n){n.d(t,{L_:()=>s,MS:()=>c,rn:()=>i});var r=n(296540),l=n(614476),a=n(916537);const o="{::}",i=(e,t)=>`${e}${o}${JSON.stringify(t??{})}`,c=(e,t)=>{if("string"!=typeof t)return;const[n,...r]=t.split(o);if(!n||!r.length)return t;let l={};try{l=Object.fromEntries(Object.entries(JSON.parse(r.join(o))).map(([t,n])=>[t,"string"==typeof n?c(e,n):n]))}catch{}return e.formatMessage({id:n},l)};function s(){const{formatMessage:e}=(0,a.tz)();return(0,r.useCallback)(t=>c({formatMessage:e},t),[e])}l.z.setErrorMap((e,t)=>e.message?{message:e.message}:e.code===l.z.ZodIssueCode.too_small&&"string"===e.type?{message:i("COMMON_MIN_CHARS",{min:Number(e.minimum)})}:e.code===l.z.ZodIssueCode.too_big&&"string"===e.type?{message:i("COMMON_MAX_CHARS",{name:i("COMMON_VALUE"),max:Number(e.maximum)})}:e.code===l.z.ZodIssueCode.invalid_type&&"array"===e.expected&&"undefined"===e.received?{message:i("COMMON_SELECT_AT_LEAST_ONE_ITEM")}:e.code===l.z.ZodIssueCode.too_small&&"array"===e.type?{message:i("COMMON_ADD_AT_LEAST_X_ITEMS",{min:Number(e.minimum)})}:e.code===l.z.ZodIssueCode.invalid_type&&"undefined"===e.received?{message:i("COMMON_VALIDATION_VALUE_REQUIRED")}:e.code===l.z.ZodIssueCode.invalid_type&&"number"===e.expected?{message:i("COMMON_VALIDATION_PLEASE_ENTER_A_NUMBER")}:{message:t.defaultError})},897502(e,t,n){n.d(t,{A:()=>m});var r=n(296540),l=n(349785),a=n(314714),o=n(566723),i=n(766624),c=n(294303),s=n(284428);const m=function({control:e,name:t,children:n,tooltip:m,tooltipProps:E,onToggle:u,renderCheckbox:A,inputClassName:d}){const _=(0,s.mQ)();return r.createElement(l.xI,{control:e,name:t,render:({field:e})=>{const t=r.createElement(a.A,{id:e.name,onChange:({target:{checked:t}})=>{e.onChange(t),u?.(t)},checked:!!e.value,disabled:_,inputClassName:d},n);return r.createElement(c.A,{gap:o.YC,alignItems:"center"},A?A(t,e):t,m?r.createElement(i.A,{description:m,...E}):null)}})}},895424(e,t,n){n.d(t,{A:()=>m});var r=n(296540),l=n(349785),a=n(438628),o=n(705145),i=n(566723),c=n(263963),s=n(284428);const m=function({control:e,name:t,label:n,placeholder:m,tooltip:E,tooltipProps:u,autoFocus:A,motif:d,onChange:_,onBlur:p,onAfterChange:I,onPaste:C,onKeyDown:O,passwordToggle:N,type:v,helperMessage:R,autoComplete:g,contentBefore:T,contentAfter:D,onFocus:M,value:S,invalid:b}){const h=(0,s.mQ)(),P=(0,s.Im)(),f=(0,s.q)(),y=(0,c.L_)();return r.createElement(l.xI,{control:e,name:t,render:({field:e,fieldState:c,formState:s})=>r.createElement(a.A,{type:v||(N?"password":"text"),variant:"secondary",width:"100%",autoFocus:A,...e,onChange:t=>{_?_(t,e,s):e.onChange(t),I?.(t)},onBlur:t=>{p?p(t,e,s):e.onBlur()},onFocus:M,onPaste:C,disabled:h,value:S??e.value?.toString(),invalid:b||(c.invalid?r.createElement(o.A,{variant:"inherit",style:{overflowWrap:"break-word"}},y((0,l.Jt)(s.errors,t)?.message)||!0," "):void 0),label:n,placeholder:m,labelTooltip:E,labelTooltipProps:{style:{opacity:P?i.xN:void 0,pointerEvents:f?"none":void 0,...u?.style},...u},motif:d,passwordToggle:N,helperMessage:R,autoComplete:g,onKeyDown:O,contentBefore:T,contentAfter:D})})}},362412(e,t,n){n.d(t,{A:()=>E});var r=n(296540),l=n(469733),a=n(436331),o=n(805837),i=n(282556),c=n(71265);const s=e=>r.createElement(a.A,{renderOption:o.q,...e}),m=e=>r.createElement(s,{...e});m.Sorted=e=>{const t=(0,l.useSelector)(i.zi),n=(0,r.useMemo)(()=>(0,c.k)(t),[t]);return r.createElement(s,{...e,sortBy:n})};const E=m},71265(e,t,n){n.d(t,{R:()=>E,k:()=>u});var r=n(280258),l=n(190497),a=n(953048),o=n(175522),i=n(936621),c=n(742525);const s=[...new Set([r.H,o.Q.join(o.A),a.Zt,i.F,l.nc,c.Vr])],m={numeric:!0,sensitivity:"base"},E=(e,t)=>{const n=[];for(let r=e;r<=t;r+=1)n.push({value:r,label:String(r)});return n},u=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},511752(e,t,n){n.d(t,{A:()=>d});var r,l,a,o,i,c=n(296540);!function(e){e.TABLE="table"}(r||(r={})),function(e){e.ROW_ID_MAP_BY_INDEX="rowIdMapByIndex",e.INDEX_MAP_BY_ROW_ID="indexMapByRowId"}(l||(l={})),function(e){e.ON_KEY_DOWN="onKeyDown",e.INCOMING_ROW_PROPS="incomingRowProps"}(a||(a={})),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"}(i||(i={}));const s="data-row-id";var m=n(372737);const E=e=>e?.children?.[1]?.children;var u=n(762319);const A=(0,n(71479).A)(u.A)`
  tr {
    outline: none;
  }
`,d=({data:e=[],rowProps:t,onRowClick:n,...u})=>{const d=(0,c.useRef)(null),_=(0,c.useRef)(null),{[l.ROW_ID_MAP_BY_INDEX]:p,[l.INDEX_MAP_BY_ROW_ID]:I}=(({[r.TABLE]:e})=>{const[t,n]=(0,c.useState)(()=>e?E(e):void 0);(0,c.useEffect)(()=>{e&&n(E(e))},[e]);const{[l.ROW_ID_MAP_BY_INDEX]:a,[l.INDEX_MAP_BY_ROW_ID]:o}=(0,c.useMemo)(()=>{const e=new Map,n=new Map,r=t?.length;if(t&&r)for(let l=0;l<r;l+=1){const r=t[l].getAttribute(s);r&&(e.set(r,l),n.set(l,r))}return{[l.ROW_ID_MAP_BY_INDEX]:e,[l.INDEX_MAP_BY_ROW_ID]:n}},[t]);return{[l.ROW_ID_MAP_BY_INDEX]:a,[l.INDEX_MAP_BY_ROW_ID]:o}})({[r.TABLE]:d.current}),C=(e=>{const t=(0,c.useRef)(new Map),n=(0,c.useRef)();if(n.current!==e){n.current=e,t.current.clear();const r=e.length;for(let n=0;n<r;n+=1)t.current.set(e[n].id,e[n])}return t})(e),O=(({[i.DATA_MAP_REFERENCE]:e,[i.ROW_ID_MAP_BY_INDEX]:t,[i.INDEX_MAP_BY_ROW_ID]:n,[i.INCOMING_ON_ROW_CLICK]:r,[i.LOCAL_CURRENT_INDEX]:l,[i.MULTI_SELECT_MODE]:a})=>{const o=(0,c.useCallback)(e=>{e.preventDefault()},[]),s=(0,c.useCallback)(()=>{const t=e.current.get(n.get(l.current+1));t&&(r?.(t),l.current+=1)},[n,l,r,e]),E=(0,c.useCallback)(()=>{const t=e.current.get(n.get(l.current-1));t&&(r?.(t),l.current-=1)},[n,l,r,e]);return(0,c.useCallback)((e,{id:n})=>e=>{if(!a&&r){const r=t.get(n);if(Number.isFinite(r))switch(null===l.current&&(l.current=r),e.key){case m.U.ARROW_DOWN:o(e),s();break;case m.U.ARROW_UP:o(e),E()}}},[r,l,a,o,t,s,E])})({[i.DATA_MAP_REFERENCE]:C,[i.ROW_ID_MAP_BY_INDEX]:p,[i.INDEX_MAP_BY_ROW_ID]:I,[i.INCOMING_ON_ROW_CLICK]:n,[i.LOCAL_CURRENT_INDEX]:_,[i.MULTI_SELECT_MODE]:u.multiSelectMode}),N=(({[a.INCOMING_ROW_PROPS]:e,[a.ON_KEY_DOWN]:t})=>(0,c.useCallback)((n,r)=>({...e?.(n,r),[s]:n.id,tabIndex:0,onKeyDown:t(n,r)}),[e,t]))({[a.INCOMING_ROW_PROPS]:t,[a.ON_KEY_DOWN]:O}),v=(({[o.INCOMING_ON_ROW_CLICK]:e,[o.LOCAL_CURRENT_INDEX]:t})=>{const n=(0,c.useCallback)(n=>{t.current=null,e?.(n)},[e,t]);return e?n:void 0})({[o.INCOMING_ON_ROW_CLICK]:n,[o.LOCAL_CURRENT_INDEX]:_});return c.createElement(A,{ref:d,data:e,rowProps:N,onRowClick:v,tableHeight:e.length?"100%":void 0,virtualize:!0,virtualizeColumn:!0,overscan:6,overscanColumn:1,...u})}}}]);