"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[5629],{761047(t,e,i){i.d(e,{A:()=>m});var n=i(602086),o=i(548941),a=i(713035),r=(0,n.memo)(t=>{const{motif:e,width:i=194,left:r=0,top:d=0,hidden:s,topMargin:l,tooltipProps:c={},portal:m,...u}=t,{motif:p}=(0,a.A)(e),h=null!=m?m:c.portal;return n.createElement("div",{style:{position:"absolute",left:r,top:d}},n.createElement(o.A,{motif:p,width:i,animate:!1,isHoverable:!1,offset:l?l+10:c.offset,...u,...c,portal:h,isOpen:h?!s:void 0},n.createElement("div",null)))},(t,e)=>Boolean(e.hidden));function d(t){return null!==t&&("string"==typeof t?"%"===t.slice(-1):!isNaN(t))}(0,i(802548).A)(".tooltipContainer__Q9Q7ZKPc{opacity:1;pointer-events:none}.tooltipContainer__Q9Q7ZKPc.animated__Q9Q7ZKPc{transition-duration:.1s;transition-property:opacity;transition-timing-function:cubic-bezier(.25,0,.25,1)}.tooltipContainer__Q9Q7ZKPc.interactive__Q9Q7ZKPc{pointer-events:auto}.tooltipContainer__Q9Q7ZKPc.interactive__Q9Q7ZKPc.hidden__Q9Q7ZKPc{pointer-events:none}.tooltipContainer__Q9Q7ZKPc.hidden__Q9Q7ZKPc{opacity:0}");var s=i(310749),l=i(797614);const c=(0,s.c)({tooltipContainer:"tooltipContainer__Q9Q7ZKPc",animated:"animated__Q9Q7ZKPc",interactive:"interactive__Q9Q7ZKPc",hidden:"hidden__Q9Q7ZKPc"});var m=(0,n.memo)(n.forwardRef((t,e)=>{const{className:i,isAnimated:o=!0,delay:a,hidden:s=!1,top:m=0,left:u=0,isInteractive:p,message:h,title:g,description:v,children:f,...b}=t,{currentState:A,onStart:_,onComplete:x}=(0,l.T)(s,a),[S,$]=(0,n.useState)(!0),[I,C]=(0,n.useState)({top:m,left:u,message:h,title:g,description:v,children:f});(0,n.useEffect)(()=>{$(!1)},[]),(0,n.useEffect)(()=>{s!==A&&(s?x:_)(s)},[s,A,_,x]),(0,n.useEffect)(()=>{s||C({top:m,left:u,message:h,title:g,description:v,children:f})},[s,m,u,h,g,v,f]);const Q=!A&&d(u)&&d(m)&&!S;return n.createElement("div",{"data-testid":"svgtooltip",ref:e,className:c.concat(i)("tooltipContainer",!Q&&"hidden",p&&"interactive",o&&"animated")},n.createElement(r,{hidden:A,top:I.top,left:I.left,isInteractive:p,message:I.message,title:I.title,description:I.description,...b},I.children))}))},752104(t,e,i){i.d(e,{A:()=>o,Q:()=>a});var n=i(765567);const o="_",a=[n.ZM,n.Je]},535322(t,e,i){i.d(e,{A:()=>h,I:()=>n});var n,o=i(274934),a=i(505817),r=i(753583),d=i(247816),s=i(565527),l=i(309130),c=i(100978),m=i(291508);!function(t){t.ACCORDION="accordion",t.BUTTON_LIST="buttonList"}(n||(n={}));const u=(0,d.A)(c.A,(0,m.A)("marginBottom","isButtonList","margin","flex","width","padding","nested","background"))`
  background-color: ${({background:t,nested:e,theme:{themeName:i}})=>t||a.Ay[i===s.S.DARK?`desktop-color-neutral-${e?"00":"01"}-${s.S.DARK}`:`desktop-color-neutral-${e?"01":"00"}-${s.S.LIGHT}`]};
  ${({nested:t,theme:{themeName:e}})=>t?`border: ${a.Ay[`desktop-border-divider-${e}`]};`:""}
  padding: ${({isButtonList:t,padding:e})=>e||(t?`0 ${l.Ln}`:l.Ln)};
  margin-bottom: ${({marginBottom:t})=>t||l.Ln};
  ${({margin:t})=>t?`margin: ${t};`:""}
  border-radius: 8px;
  flex-direction: column;
  width: ${({width:t="100%"})=>t};
  flex: ${({flex:t=0})=>t};
  > :last-child {
    margin-bottom: 0;
  }
  thead {
    tr {
      height: 32px !important;
    }
    th {
      text-transform: none;
    }
  }
  ${({isButtonList:t})=>t?`\n    > div {\n      display: flex;\n      height: 48px;\n      border-bottom: ${({theme:{themeName:t}})=>a.Ay[`desktop-border-divider-${t}`]};\n      &:last-child {\n        border-bottom: none;\n      }\n    }\n  `:""}
`,p=(0,d.A)(r.A,(0,m.A)("marginBottom","margin","flex","padding","nested","background"))`
  background-color: ${({background:t,nested:e,theme:{themeName:i}})=>t||a.Ay[i===s.S.DARK?`desktop-color-neutral-${e?"00":"01"}-${s.S.DARK}`:`desktop-color-neutral-${e?"01":"00"}-${s.S.LIGHT}`]};
  ${({nested:t,theme:{themeName:e}})=>t?`border: ${a.Ay[`desktop-border-divider-${e}`]};`:""}
  margin-bottom: ${({theme:t,marginBottom:e})=>e||t.spacing["spacing-l"]};
  ${({margin:t})=>t?`margin: ${t};`:""}
  ${({padding:t})=>t?`padding: ${t};`:""}
  border-radius: 8px;
  flex-direction: column;
  flex: ${({flex:t=0})=>t};
  > :last-child {
    margin-bottom: 0;
  }
  thead {
    tr {
      height: 32px !important;
    }
    th {
      text-transform: none;
    }
  }
  > li {
    > div:first-child {
      background: ${({background:t,nested:e,theme:{themeName:i}})=>t||a.Ay[i===s.S.DARK?`desktop-color-neutral-${e?"00":"01"}-${s.S.DARK}`:`desktop-color-neutral-${e?"01":"00"}-${s.S.LIGHT}`]};
      height: 48px;
      padding: 0 ${l.Ln};
    }
    > div:nth-child(2) {
      margin-bottom: 0;
      padding: 0;
      > div {
        padding: 0 ${l.Ln} ${l.Ln};
      }
    }
  }
`,h=({type:t,marginBottom:e,margin:i,padding:a,flex:r,width:d,nested:s,...l})=>"items"in l?(0,o.jsx)(p,{marginBottom:e,margin:i,padding:a,flex:r,nested:s,...l}):(0,o.jsx)(u,{nested:s,width:d,marginBottom:e,margin:i,padding:a,flex:r,isButtonList:t===n.BUTTON_LIST,...l,children:l.children})},539082(t,e,i){i.d(e,{t8:()=>g,Ay:()=>v});var n=i(274934),o=i(602086),a=i(684935),r=i(179102),d=i(409844),s=i(237887),l=i(309130),c=i(100978),m=i(535322),u=i(470070),p=i(262457);const h=d.AH`
  width: unset;
`,g=({activeItem:t,addGroupOption:e})=>{const{formatMessage:i}=(0,u.tz)(),{switchId:r,setSwitchId:d}=(0,p.y)(),l=(0,o.useCallback)(t=>d(t.id),[d]),c=t.device.stacking?.members?.length?t.device.stacking.members:Object.values(t.unitsRuntimeData).sort((t,e)=>t.unit_id-e.unit_id),m=[...e?[{id:"group",label:i({id:"COMMON_GROUP"})}]:[],...c.map(({unit_id:t},e)=>({id:String(t),label:i({id:"COMMON_UNIT_N"},{n:e+1})}))];return m.length>5?(0,n.jsx)(s.A,{variant:"secondary",width:"100%",portal:!0,options:m.map(({id:t,label:e})=>({value:t,label:e})),value:r,onChange:({value:t})=>{d(t)},placeholder:i({id:"SETTINGS_TRAFFIC_ROUTES_INTERFACE_SELECT"})}):(0,n.jsx)(a.A,{tabs:m,onSelectTab:l,selectedTab:r,variant:"filter",className:h})},v=t=>(0,n.jsx)(m.A,{children:(0,n.jsxs)(c.A,{flexDirection:"column",height:"100%",gap:l.Ln,alignItems:"start",children:[(0,n.jsx)(r.A,{weight:"bold",size:"medium",children:(0,n.jsx)(u.sA,{id:"COMMON_STACKED_UNITS"})}),(0,n.jsx)(g,{...t})]})})},613851(t,e,i){i.r(e),i.d(e,{default:()=>b});var n=i(274934),o=i(412160),a=i(113592),r=i(320018),d=i(602086),s=i(376892),l=i(535322),c=i(532565),m=i(100978),u=i(869744),p=i(309130),h=i(560151),g=i(539082),v=i(262457);const f=(0,d.memo)(({activeItem:t})=>{const{switchId:e}=(0,v.y)(),i=(0,u.lV)(t.unitsRuntimeData),o=t.unitsRuntimeData[Number(e)];return o?(0,n.jsx)(l.A,{type:l.I.ACCORDION,items:[{id:"systemPerformance",openByDefault:!1,label:(0,n.jsx)(s.A,{id:"DEVICE_PROPERTY_SYSTEM_STATISTICS"}),renderContent:()=>(0,n.jsxs)(m.A,{flexDirection:"column",gap:p.kc,alignItems:"start",children:[i?null:(0,n.jsx)(g.t8,{activeItem:t}),(0,n.jsx)(h.A,{mac:o.mac,object:c.qv.SW})]})}]}):null}),b=({activeItem:t})=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.A,{mac:t.device.mac,model:t.device.model,logType:a.F.DEVICE,ignoreActionableValues:[o.dl.DEVICE],label:"COMMON_HISTORY"}),(0,n.jsx)(f,{activeItem:t})]})},262457(t,e,i){i.d(e,{u:()=>r,y:()=>d});var n=i(274934),o=i(602086);const a=(0,o.createContext)({}),r=({children:t,initialSwitchId:e})=>{const[i,r]=(0,o.useState)(e),d=(0,o.useMemo)(()=>({switchId:i,setSwitchId:r}),[i]);return(0,n.jsx)(a.Provider,{value:d,children:t})},d=()=>(0,o.useContext)(a)},696049(t,e,i){i.d(e,{H:()=>n});const n=""},237887(t,e,i){i.d(e,{A:()=>u});var n=i(274934),o=i(602086),a=i(977872),r=i(310075),d=i(711892),s=i(820633),l=i(308111);const c=t=>(0,n.jsx)(r.A,{renderOption:d.q,...t}),m=t=>(0,n.jsx)(c,{...t});m.Sorted=t=>{const e=(0,a.d4)(s.zi),i=(0,o.useMemo)(()=>(0,l.k)(e),[e]);return(0,n.jsx)(c,{...t,sortBy:i})};const u=m},308111(t,e,i){i.d(e,{R:()=>m,k:()=>u});var n=i(696049),o=i(350068),a=i(177173),r=i(752104),d=i(64222),s=i(230853);const l=[...new Set([n.H,r.Q.join(r.A),a.Zt,d.F,o.nc,s.Vr])],c={numeric:!0,sensitivity:"base"},m=(t,e)=>{const i=[];for(let n=t;n<=e;n+=1)i.push({value:n,label:String(n)});return i},u=t=>({value:e,label:i},{value:n,label:o})=>l.includes(e?.toString())||l.includes(n?.toString())?1/0:i?.toString().localeCompare(o?.toString(),t,c)??-1}}]);