"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[71239],{112142(e,t,n){n.d(t,{A:()=>u});var i=n(296540),r=n(271856),o=n(325898),a=(0,i.memo)(e=>{const{motif:t,width:n=194,left:a=0,top:c=0,topMargin:l,tooltipProps:d={},...s}=e,{motif:u}=(0,o.A)(t);return i.createElement("div",{style:{position:"absolute",left:a,top:c}},i.createElement(r.A,{motif:u,width:n,animate:!1,isHoverable:!1,offset:l?l+10:d.offset,...s,...d},i.createElement("div",null)))},(e,t)=>Boolean(t.hidden));function c(e){return null!==e&&("string"==typeof e?"%"===e.slice(-1):!isNaN(e))}(0,n(349005).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 l=n(722860),d=n(385941);const s=(0,l.c)({tooltipContainer:"tooltipContainer__Q9Q7ZKPc",animated:"animated__Q9Q7ZKPc",interactive:"interactive__Q9Q7ZKPc",hidden:"hidden__Q9Q7ZKPc"});var u=(0,i.memo)(i.forwardRef((e,t)=>{const{className:n,isAnimated:r=!0,delay:o,hidden:l=!1,top:u=0,left:m=0,isInteractive:h,message:p,title:f,description:g,children:v,...b}=e,{currentState:A,onStart:E,onComplete:S}=(0,d.T)(l,o),[_,x]=(0,i.useState)(!0),[C,I]=(0,i.useState)({top:u,left:m,message:p,title:f,description:g,children:v});(0,i.useEffect)(()=>{x(!1)},[]),(0,i.useEffect)(()=>{l!==A&&(l?S:E)(l)},[l,A,E,S]),(0,i.useEffect)(()=>{l||I({top:u,left:m,message:p,title:f,description:g,children:v})},[l,u,m,p,f,g,v]);const k=!A&&c(m)&&c(u)&&!_;return i.createElement("div",{"data-testid":"svgtooltip",ref:t,className:s.concat(n)("tooltipContainer",!k&&"hidden",h&&"interactive",r&&"animated")},i.createElement(a,{hidden:A,top:C.top,left:C.left,isInteractive:h,message:C.message,title:C.title,description:C.description,...b},C.children))}))},175522(e,t,n){n.d(t,{A:()=>r,Q:()=>o});var i=n(416348);const r="_",o=[i.ZM,i.Je]},689965(e,t,n){n.d(t,{A:()=>p,I:()=>i});var i,r=n(296540),o=n(822336),a=n(963724),c=n(71479),l=n(825032),d=n(566723),s=n(294303),u=n(311785);!function(e){e.ACCORDION="accordion",e.BUTTON_LIST="buttonList"}(i||(i={}));const m=(0,c.A)(s.A,(0,u.A)("marginBottom","isButtonList","margin","flex","width","padding","nested","background"))`
  background-color: ${({background:e,nested:t,theme:{themeName:n}})=>e||o.Ay[n===l.S.DARK?`desktop-color-neutral-${t?"00":"01"}-dark`:`desktop-color-neutral-${t?"01":"00"}-light`]};
  padding: ${({theme:e,isButtonList:t,padding:n})=>n||(t?`0 ${e.spacing["spacing-l"]}`:e.spacing["spacing-l"])};
  margin-bottom: ${({theme:e,marginBottom:t})=>t||e.spacing["spacing-l"]};
  ${({margin:e})=>e?`margin: ${e};`:""}
  border-radius: 8px;
  flex-direction: column;
  width: ${({width:e="100%"})=>e};
  flex: ${({flex:e=0})=>e};
  > :last-child {
    margin-bottom: 0;
  }
  thead {
    tr {
      height: 32px !important;
    }
    th {
      text-transform: none;
    }
  }
  ${({isButtonList:e})=>e?`\n    > div {\n      display: flex;\n      height: 48px;\n      border-bottom: ${({theme:{themeName:e}})=>o.Ay[`desktop-border-divider-${e}`]};\n      &:last-child {\n        border-bottom: none;\n      }\n    }\n  `:""}
`,h=(0,c.A)(a.A,(0,u.A)("marginBottom","margin","flex","padding","nested","background"))`
  background-color: ${({background:e,nested:t,theme:{themeName:n}})=>e||o.Ay[n===l.S.DARK?`desktop-color-neutral-${t?"00":"01"}-dark`:`desktop-color-neutral-${t?"01":"00"}-light`]};
  margin-bottom: ${({theme:e,marginBottom:t})=>t||e.spacing["spacing-l"]};
  ${({margin:e})=>e?`margin: ${e};`:""}
  ${({padding:e})=>e?`padding: ${e};`:""}
  border-radius: 8px;
  flex-direction: column;
  flex: ${({flex:e=0})=>e};
  > :last-child {
    margin-bottom: 0;
  }
  thead {
    tr {
      height: 32px !important;
    }
    th {
      text-transform: none;
    }
  }
  > li {
    > div:first-child {
      background: ${({background:e,theme:{themeName:t}})=>e||o.Ay[t===l.S.DARK?"desktop-color-neutral-01-dark":"desktop-color-neutral-00-light"]};
      height: 48px;
      padding: 0 ${d.Ln};
    }
    > div:nth-child(2) {
      margin-bottom: 0;
      padding: 0;
      > div {
        padding: 0 ${d.Ln} ${d.Ln};
      }
    }
  }
`,p=({type:e,marginBottom:t,margin:n,padding:o,flex:a,width:c,nested:l,...d})=>"items"in d?r.createElement(h,{marginBottom:t,margin:n,padding:o,flex:a,nested:l,...d}):r.createElement(m,{nested:l,width:c,marginBottom:t,margin:n,padding:o,flex:a,isButtonList:e===i.BUTTON_LIST,...d},d.children)},167308(e,t,n){n.d(t,{Ay:()=>v,eY:()=>f,t8:()=>g});var i=n(296540),r=n(979106),o=n(217439),a=n(132196),c=n(362412),l=n(566723),d=n(294303),s=n(689965),u=n(916537),m=n(506698),h=n(436540);const p=a.AH`
  width: unset;
`,f="group",g=({activeItem:e,addGroupOption:t})=>{const{formatMessage:n}=(0,u.tz)(),{switchId:o,setSwitchId:a}=(0,m.y)(),l=(0,i.useCallback)(e=>a(e.id),[a]),d=[...t?[{id:f,label:n({id:"COMMON_GROUP"})}]:[],...Object.keys(e.devicesData).map((e,t)=>({id:e,label:n({id:"COMMON_SWITCH_N"},{n:t+1})}))];return d.length>h.e?i.createElement(c.A,{variant:"secondary",width:"100%",portal:!0,options:d.map(({id:e,label:t})=>({value:e,label:t})),value:o,onChange:({value:e})=>{a(e)},placeholder:n({id:"SETTINGS_TRAFFIC_ROUTES_INTERFACE_SELECT"})}):i.createElement(r.A,{tabs:d,onSelectTab:l,selectedTab:o,variant:"filter",className:p})},v=e=>i.createElement(s.A,null,i.createElement(d.A,{flexDirection:"column",height:"100%",gap:l.Ln,alignItems:"start"},i.createElement(o.A,{weight:"bold",size:"medium"},i.createElement(u.sA,{id:"COMMON_STACKED_SWITCHES"})),i.createElement(g,{...e})))},436540(e,t,n){n.d(t,{e:()=>i});const i=5},721409(e,t,n){n.r(t),n.d(t,{default:()=>v});var i=n(296540),r=n(275357),o=n(506698),a=n(540739),c=n(13739),l=n(86571),d=n(689965),s=n(87250),u=n(294303),m=n(566723),h=n(346241),p=n(167308);const f=(0,i.memo)(({activeItem:e})=>{const{switchId:t}=(0,o.y)(),n=e.devicesData[t];return n?i.createElement(d.A,{type:d.I.ACCORDION,items:[{id:"systemPerformance",openByDefault:!1,label:i.createElement(l.A,{id:"DEVICE_PROPERTY_SYSTEM_STATISTICS"}),renderContent:()=>i.createElement(u.A,{flexDirection:"column",gap:m.kc,alignItems:"start"},i.createElement(p.t8,{activeItem:e}),i.createElement(h.A,{mac:n.mac,object:s.qv.SW}))}]}):null}),g=({activeItem:e})=>{const{switchId:t}=(0,o.y)(),n=e.devicesData[t],l=(0,i.useMemo)(()=>Object.keys(e.devicesData).filter(t=>e.devicesData[t]),[e.devicesData]);return i.createElement(i.Fragment,null,i.createElement(c.A,{mac:n?.mac,model:n?.model,logType:a.F.DEVICE,ignoreActionableValues:[r.dl.DEVICE],label:"COMMON_HISTORY",macs:l}),i.createElement(f,{activeItem:e}))},v=({activeItem:e})=>i.createElement(o.u,{initialSwitchId:Object.keys(e.devicesData)[0]},i.createElement(g,{activeItem:e}))},506698(e,t,n){n.d(t,{u:()=>o,y:()=>a});var i=n(296540);const r=(0,i.createContext)({}),o=({children:e,initialSwitchId:t})=>{const[n,o]=(0,i.useState)(t),a=(0,i.useMemo)(()=>({switchId:n,setSwitchId:o}),[n]);return i.createElement(r.Provider,{value:a},e)},a=()=>(0,i.useContext)(r)},280258(e,t,n){n.d(t,{H:()=>i});const i=""},362412(e,t,n){n.d(t,{A:()=>u});var i=n(296540),r=n(469733),o=n(436331),a=n(805837),c=n(282556),l=n(71265);const d=e=>i.createElement(o.A,{renderOption:a.q,...e}),s=e=>i.createElement(d,{...e});s.Sorted=e=>{const t=(0,r.useSelector)(c.zi),n=(0,i.useMemo)(()=>(0,l.k)(t),[t]);return i.createElement(d,{...e,sortBy:n})};const u=s},71265(e,t,n){n.d(t,{R:()=>u,k:()=>m});var i=n(280258),r=n(190497),o=n(953048),a=n(175522),c=n(936621),l=n(742525);const d=[...new Set([i.H,a.Q.join(a.A),o.Zt,c.F,r.nc,l.Vr])],s={numeric:!0,sensitivity:"base"},u=(e,t)=>{const n=[];for(let i=e;i<=t;i+=1)n.push({value:i,label:String(i)});return n},m=e=>({value:t,label:n},{value:i,label:r})=>d.includes(t?.toString())||d.includes(i?.toString())?1/0:n?.toString().localeCompare(r?.toString(),e,s)??-1},340936(e,t,n){n.d(t,{A:()=>o});var i=n(296540);function r(e,t,n){return e[t]?e[t][0]?e[t][0][n]:e[t][n]:"contentBoxSize"===t?e.contentRect["inlineSize"===n?"width":"height"]:void 0}function o(e){void 0===e&&(e={});var t=e.onResize,n=(0,i.useRef)(void 0);n.current=t;var o=e.round||Math.round,a=(0,i.useRef)(),c=(0,i.useState)({width:void 0,height:void 0}),l=c[0],d=c[1],s=(0,i.useRef)(!1);(0,i.useEffect)(function(){return s.current=!1,function(){s.current=!0}},[]);var u=(0,i.useRef)({width:void 0,height:void 0}),m=function(e,t){var n=(0,i.useRef)(null),r=(0,i.useRef)(null);r.current=t;var o=(0,i.useRef)(null);(0,i.useEffect)(function(){a()});var a=(0,i.useCallback)(function(){var t=r.current,i=o.current||(t?t instanceof Element?t:t.current:null);n.current&&n.current.element===i&&n.current.subscriber===e||(n.current&&n.current.cleanup&&n.current.cleanup(),n.current={element:i,subscriber:e,cleanup:i?e(i):void 0})},[e]);return(0,i.useEffect)(function(){return function(){n.current&&n.current.cleanup&&(n.current.cleanup(),n.current=null)}},[]),(0,i.useCallback)(function(e){o.current=e,a()},[a])}((0,i.useCallback)(function(t){return a.current&&a.current.box===e.box&&a.current.round===o||(a.current={box:e.box,round:o,instance:new ResizeObserver(function(t){var i=t[0],a="border-box"===e.box?"borderBoxSize":"device-pixel-content-box"===e.box?"devicePixelContentBoxSize":"contentBoxSize",c=r(i,a,"inlineSize"),l=r(i,a,"blockSize"),m=c?o(c):void 0,h=l?o(l):void 0;if(u.current.width!==m||u.current.height!==h){var p={width:m,height:h};u.current.width=m,u.current.height=h,n.current?n.current(p):s.current||d(p)}})}),a.current.instance.observe(t,{box:e.box}),function(){a.current&&a.current.instance.unobserve(t)}},[e.box,o]),e.ref);return(0,i.useMemo)(function(){return{ref:m,width:l.width,height:l.height}},[m,l.width,l.height])}},383149(e,t,n){n.d(t,{A:()=>r});var i=n(885205);const r=function(e,t){return!(null==e||!e.length)&&(0,i.A)(e,t,0)>-1}},887809(e,t,n){n.d(t,{A:()=>i});const i=function(e,t,n){for(var i=-1,r=null==e?0:e.length;++i<r;)if(n(t,e[i]))return!0;return!1}},458043(e,t,n){n.d(t,{A:()=>d});var i=n(8300),r=n(383149),o=n(887809),a=n(45572),c=n(552789),l=n(764099);const d=function(e,t,n,d){var s=-1,u=r.A,m=!0,h=e.length,p=[],f=t.length;if(!h)return p;n&&(t=(0,a.A)(t,(0,c.A)(n))),d?(u=o.A,m=!1):t.length>=200&&(u=l.A,m=!1,t=new i.A(t));e:for(;++s<h;){var g=e[s],v=null==n?g:n(g);if(g=d||0!==g?g:0,m&&v==v){for(var b=f;b--;)if(t[b]===v)continue e;p.push(g)}else u(t,v,d)||p.push(g)}return p}},144757(e,t,n){n.d(t,{A:()=>c});var i=n(458043),r=n(187671),o=n(224326),a=n(153533);const c=(0,o.A)(function(e,t){return(0,a.A)(e)?(0,i.A)(e,(0,r.A)(t,1,a.A,!0)):[]})}}]);