"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[89965,92870],{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(305988);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},86571:(e,t,n)=>{n.d(t,{A:()=>a});var i=n(296540),r=n(217439),o=n(699784);const a=({id:e,children:t,values:n})=>i.createElement(r.A,{color:"text-1",weight:"bold",size:"medium"},e?i.createElement(o.sA,{id:e,values:n}):null,t)},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),m=l?l+10:d.offset;return i.createElement("div",{style:{position:"absolute",left:a,top:c}},i.createElement(r.A,{motif:u,width:n,animate:!1,isHoverable:!1,offset:m,...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:g,description:f,children:v,...b}=e,{currentState:E,onStart:A,onComplete:S}=(0,d.T)(l,o),[x,_]=(0,i.useState)(!0),[w,C]=(0,i.useState)({top:u,left:m,message:p,title:g,description:f,children:v});(0,i.useEffect)(()=>{_(!1)},[]),(0,i.useEffect)(()=>{l!==E&&(l?S:A)(l)},[l,E,A,S]),(0,i.useEffect)(()=>{l||C({top:u,left:m,message:p,title:g,description:f,children:v})},[l,u,m,p,g,f,v]);const k=!E&&c(m)&&c(u)&&!x;return i.createElement("div",{"data-testid":"svgtooltip",ref:t,className:s.concat(n)("tooltipContainer",!k&&"hidden",h&&"interactive",r&&"animated")},i.createElement(a,{hidden:E,top:w.top,left:w.left,isInteractive:h,message:w.message,title:w.title,description:w.description,...b},w.children))}))},167308:(e,t,n)=>{n.d(t,{Ay:()=>v,eY:()=>g,t8:()=>f});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(699784),m=n(506698),h=n(436540);const p=a.AH`
  width: unset;
`,g="group",f=({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:g,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(f,{...e})))},175522:(e,t,n)=>{n.d(t,{A:()=>r,Q:()=>o});var i=n(416348);const r="_",o=[i.ZM,i.Je]},216211:(e,t,n)=>{n.d(t,{e:()=>m});var i=n(956347),r=n(469733),o=n(296540),a=n(15095),c=n(627440),l=n(431247),d=n(293016),s=n(649413),u=n(497470);const m=()=>{const e=(0,r.useDispatch)(),t=(0,i.W6)(),n=(0,a.A)(`${c.VO.PORTS}`);return{handleGoToPortsPage:(0,o.useCallback)((i,r,o)=>{if(i)if(e((0,u.gU)(!0)),e((0,u.U)((0,s.HN)(d.F7.DEVICE,[i]))),o&&(e((0,u.IU)(!0)),e((0,u.E1)(!1))),r){const t=(0,l.FS)(i,r);e((0,u.Ao)([t]))}else e((0,u.Ao)([]));t.push(n)},[n,t,e])}}},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=o.current,i=r.current,a=t||(i?i instanceof Element?i:i.current:null);n.current&&n.current.element===a&&n.current.subscriber===e||(n.current&&n.current.cleanup&&n.current.cleanup(),n.current={element:a,subscriber:e,cleanup:a?e(a):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])}},362412:(e,t,n)=>{n.d(t,{A:()=>u});var i=n(469733),r=n(296540),o=n(436331),a=n(805837),c=n(282556),l=n(71265);const d=e=>r.createElement(o.A,{renderOption:a.q,...e}),s=e=>r.createElement(d,{...e});s.Sorted=e=>{const t=(0,i.useSelector)(c.zi),n=(0,r.useMemo)(()=>(0,l.k)(t),[t]);return r.createElement(d,{...e,sortBy:n})};const u=s},436540:(e,t,n)=>{n.d(t,{e:()=>i});const i=5},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)},689965:(e,t,n)=>{n.d(t,{A:()=>h,I:()=>i});var i,r=n(296540),o=n(822336),a=n(427853),c=n(71479),l=n(825032),d=n(566723),s=n(294303);!function(e){e.ACCORDION="accordion",e.BUTTON_LIST="buttonList"}(i||(i={}));const u=(0,c.A)(s.A,{shouldForwardProp:e=>!["marginBottom","isButtonList","margin","flex","width","padding","nested","background"].includes(e)})`
  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  `:""}
`,m=(0,c.A)(a.A,{shouldForwardProp:e=>!["marginBottom","margin","flex","padding","nested","background"].includes(e)})`
  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 ${d.Ln} ${d.Ln};
      > div {
        padding: 0;
      }
    }
  }
`,h=({type:e,marginBottom:t,margin:n,padding:o,flex:a,width:c,nested:l,...d})=>"items"in d?r.createElement(m,{marginBottom:t,margin:n,padding:o,flex:a,nested:l,...d}):r.createElement(u,{nested:l,width:c,marginBottom:t,margin:n,padding:o,flex:a,isButtonList:e===i.BUTTON_LIST,...d},d.children)},938410:(e,t,n)=>{n.r(t),n.d(t,{default:()=>m});var i=n(296540),r=n(87250),o=n(275357),a=n(506698),c=n(167308),l=n(540739),d=n(525901),s=n(470995);const u=({activeItem:e})=>{const t=e.devicesData[(0,a.y)().switchId];return i.createElement(i.Fragment,null,i.createElement(c.Ay,{activeItem:e}),i.createElement(d.A,{mac:t.mac,model:t.model,logType:l.F.DEVICE,ignoreActionableValues:[o.dl.DEVICE],label:"COMMON_HISTORY"}),i.createElement(s.A,{mac:t.mac,object:r.qv.SW}))},m=({activeItem:e})=>i.createElement(a.u,{initialSwitchId:Object.keys(e.devicesData)[0]},i.createElement(u,{activeItem:e}))}}]);