"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[10539,89965],{10539:(e,t,n)=>{n.r(t),n.d(t,{default:()=>ee});var a=n(469733),r=n(296540),o=n(592510),i=n(86571),l=n(689965),s=n(91255),m=n(282556),c=n(294303),d=n(479403),p=n(602021),u=n(198494),h=n(927099),g=n(963070),E=n(249304),A=n(596441),f=n(905410),C=n(860765),b=n(699784);const T=[{value:10,default:!0}];const D=(0,n(71479).A)(c.A)`
  > div {
    width: 100%;
    > div:last-child {
      > svg {
        display: none;
      }
      > span {
        padding-left: 8px;
      }
    }
  }
  th {
    svg {
      width: 16px;
      height: 16px;
    }
  }
`;var S,w=n(396660),O=n(137298),y=n(438369),x=n(670);!function(e){e.DATE="time",e.DOWNLOAD="download_mbps",e.UPLOAD="upload_mbps"}(S||(S={}));const v={[S.DATE]:"COMMON_DATE",[S.DOWNLOAD]:"COMMON_DOWNLOAD",[S.UPLOAD]:"COMMON_UPLOAD"},M=(e,t,n)=>[{id:S.DATE,sortable:!0,label:r.createElement(b.sA,{id:v[S.DATE]}),minWidth:130,renderCell:({time:a})=>r.createElement(h.A,{size:"body",color:"secondary"},new Intl.DateTimeFormat(t,{timeZone:e,month:"short",day:"2-digit",year:"numeric",hour:"numeric",minute:"2-digit",hourCycle:n}).format(a).replace(/,/g,"")),compare:(0,w.l0)(({time:e})=>e)},{id:S.DOWNLOAD,sortable:!0,label:r.createElement(b.sA,{id:v[S.DOWNLOAD]}),minWidth:60,renderCell:({download_mbps:e})=>r.createElement(x.A.Bytes,{size:"medium"},(0,O.ap)(e)),compare:(0,w.l0)(({download_mbps:e})=>e)},{id:S.UPLOAD,sortable:!0,label:r.createElement(b.sA,{id:v[S.UPLOAD]}),minWidth:60,renderCell:({upload_mbps:e})=>r.createElement(y.A.Bytes,{size:"medium"},(0,O.ap)(e)),compare:(0,w.l0)(({upload_mbps:e})=>e)}],I=({ispStatusSpeedTestHistory:e,siteTimezone:t,language:n,selfHourCycle:a})=>{const[o,i]=(0,r.useState)(C.B),l=(0,r.useCallback)(({rowsPerPage:o,from:i})=>r.createElement(D,null,r.createElement(g.A,{items:e,rowLimit:o,rowOffset:i,truncateHeaderCells:!0,columns:M(t,n,a),disableColumnFilters:!0,disableHover:!0,disableSelection:!0,initialSortBy:"time",rowHeight:A.I.ROW_HEIGHT,initiallySortAscending:!1,renderPlaceholder:()=>r.createElement(h.A,{color:"tertiary"},r.createElement(b.sA,{id:"DASHBOARD_ISP_PROPERTY_TABLE_NO_SPEED_TESTS"}))})),[e,a,t,n]);return r.createElement(f.A,{tableType:E.l.ISP_SPEED_TESTS,itemCount:e.length,onRenderTable:l,onPageChanged:i,rowOptions:T,wrapperFlexProps:{marginTop:"12px",padding:"0px"},pageNumber:o})};var _=n(956347),L=n(758649),N=n(928085),H=n(959341);const P=()=>{const e=(0,_.W6)(),t=(0,N.A)(H.wE),n=(0,r.useCallback)(()=>e.push(t),[e,t]);return r.createElement(c.A,{lineHeight:"initial"},r.createElement(L.A,{type:"button",size:"medium",weight:"bold",style:{marginTop:"12px"},variant:"inline",onClick:n},r.createElement(b.sA,{id:"SPEED_TEST_SETTINGS"})))};var k,$=n(340936),B=n(686798),R=n.n(B),z=n(936344),W=n(217439),G=n(998837),F=n(195462),U=n(945132),j=n(566723);!function(e){e.DOWNLOAD="download",e.UPLOAD="upload"}(k||(k={}));var K=n(13994);const V=({value:e,timestamp:t,top:n,left:a,uploadProps:o,chartWidth:i,chartHeight:l,hidden:s,color:m,tooltipRenderCondition:d,siteTimezone:p,language:u,selfHourCycle:g})=>r.createElement(K.A,{width:300,topA:n,leftA:a,topB:o.top,leftB:o.left,chartWidth:i,chartHeight:l,hidden:s,description:r.createElement(c.A,{flexDirection:"column"},r.createElement(c.A,{justifyContent:"space-between",marginBottom:4},r.createElement(h.A,{size:"caption",color:"primary"},r.createElement(b.sA,{id:"COMMON_DATE_TIME"})),r.createElement(h.A,{size:"caption",color:"secondary"},new Intl.DateTimeFormat(u,{day:"numeric",month:"short",year:"numeric",hour:"numeric",minute:"numeric",timeZone:p,hourCycle:g}).format(t))),r.createElement(c.A,{justifyContent:"space-between",marginBottom:4},r.createElement(h.A,{size:"caption",color:"primary"},r.createElement(b.sA,{id:"COMMON_DOWNLOAD"})),r.createElement(c.A,{alignItems:"center"},r.createElement(x.A.Icon,null),r.createElement(x.A.Bytes,{size:"small"},(0,O.ap)(e)))),r.createElement(c.A,{justifyContent:"space-between",marginBottom:4},r.createElement(h.A,{size:"caption",color:"primary"},r.createElement(b.sA,{id:"COMMON_UPLOAD"})),r.createElement(c.A,{alignItems:"center"},r.createElement(y.A.Icon,null),r.createElement(y.A.Bytes,{size:"small"},(0,O.ap)(o.value))))),innerColor:m,tooltipRenderCondition:d,useSideSwapping:!1,tooltipProps:{position:"left",portal:!0}});var Y=n(964238);const Z=e=>`${e}GradientId`,q=({timeSeriesData:e,maxY:t,mouseData:n,getCoordinates:a,ispSpeedTestGraphType:o,motifPalette:i,tooltipContainer:l,renderTooltip:s})=>{const m=((e,{aqua06:t,purple06:n})=>e===k.DOWNLOAD?t:n)(o,i);return r.createElement(Y.A,{data:e,maxY:t,mouseData:n,getCoordinates:a,variant:"gradientArea",interpolation:"curved",lineColor:m,customGradientId:Z(o),renderCustomGradient:(0,r.useCallback)(()=>r.createElement("defs",null,r.createElement("linearGradient",{id:Z(o),x1:"0%",y1:"0%",x2:"0%",y2:"100%"},r.createElement("stop",{offset:"0%",stopColor:m,stopOpacity:.5}),r.createElement("stop",{offset:"100%",stopColor:m,stopOpacity:.1}))),[o,m]),tooltipPortal:l?.current,renderTooltip:s({ispSpeedTestGraphType:o,gradientColor:m})})},Q=({ispStatusSpeedTestHistory:e,siteTimezone:t,language:n,selfHourCycle:a})=>{const o=(0,r.useRef)(null),i=(0,r.useRef)({top:0,left:0,value:0}),l=(0,r.useRef)(null),{ref:s,width:m=0,height:d=0}=(0,$.A)(),{motifPalette:p}=(0,G.u)(),u=(0,r.useMemo)(()=>{const r=Date.now(),o=R()(new Date,6).getTime(),i=e.length>1&&e[0]?.time||o,l=e.length>1&&e[e.length-1]?.time||r,s=l-i<U.jU;return(0,F.v)([i,l],s?3:Math.max(2,Math.min(Math.floor((l-i)/U.jU)+1,7))).map(e=>({value:e,label:new Intl.DateTimeFormat(n,{timeZone:t,hourCycle:a,...s?{hour:"numeric",minute:"2-digit"}:{weekday:"short"}}).format(e)}))},[e,t,a,n]),h=m+20,g=(0,r.useMemo)(()=>e.length?Math.max(...e.map(({download_mbps:e,upload_mbps:t})=>[e,t]).flat(),100):100,[e]),E=(0,r.useMemo)(()=>(0,F.Y)(Math.ceil(g+1/3*g),6),[g]),{downloadTimeSeriesData:A,uploadTimeSeriesData:f}=(0,r.useMemo)(()=>{const t=[],n=[];return e.forEach(({time:e,download_mbps:a,upload_mbps:r})=>{t.push({x:e,y:a}),n.push({x:e,y:r})}),{downloadTimeSeriesData:t,uploadTimeSeriesData:n}},[e]),C=(0,r.useCallback)(({ispSpeedTestGraphType:o,gradientColor:l})=>(({ispSpeedTestGraphType:e,uploadProps:t,chartWidth:n,chartHeight:a,ispStatusSpeedTestHistoryLength:o,gradientColor:i,siteTimezone:l,language:s,selfHourCycle:m})=>({top:c=0,left:d=0,hidden:p,x:u,y:h})=>(e===k.UPLOAD&&(t.current={top:c,left:d,value:h}),r.createElement(V,{value:h,timestamp:u,top:c,left:d,uploadProps:t.current,chartWidth:n,chartHeight:a,hidden:p||o<2,color:i,tooltipRenderCondition:e===k.DOWNLOAD,siteTimezone:l,language:s,selfHourCycle:m})))({ispSpeedTestGraphType:o,gradientColor:l,chartHeight:d,chartWidth:h,uploadProps:i,ispStatusSpeedTestHistoryLength:e.length,siteTimezone:t,language:n,selfHourCycle:a}),[d,h,t,n,a,e.length]),T=(0,r.useCallback)((e,t,n)=>r.createElement(r.Fragment,null,r.createElement(q,{timeSeriesData:A,maxY:n,mouseData:t,getCoordinates:e,ispSpeedTestGraphType:k.DOWNLOAD,motifPalette:p,tooltipContainer:o,renderTooltip:C}),r.createElement(q,{timeSeriesData:f,maxY:n,mouseData:t,getCoordinates:e,ispSpeedTestGraphType:k.UPLOAD,motifPalette:p,tooltipContainer:o,renderTooltip:C})),[A,p,f,C]);return r.createElement(c.A,{width:"100%",height:"100%",flexDirection:"column"},r.createElement(c.A,{width:"100%",justifyContent:"space-between",marginTop:j.Ln},r.createElement(W.A,{size:"small",weight:"bold"},r.createElement(b.sA,{id:"COMMON_SPEED"})," (",r.createElement(b.sA,{id:"COMMON_SPEED_METRICS_MBPS"}),")"),r.createElement(c.A,null,r.createElement(c.A,{alignItems:"center",marginRight:j.xO,gap:j.kc},r.createElement(x.A.Legend,null),r.createElement(W.A,{size:"small",weight:"bold"},r.createElement(b.sA,{id:"COMMON_DOWNLOAD"}))),r.createElement(c.A,{alignItems:"center",gap:j.kc},r.createElement(y.A.Legend,null),r.createElement(W.A,{size:"small",weight:"bold"},r.createElement(b.sA,{id:"COMMON_UPLOAD"}))))),r.createElement(c.A,{ref:l},r.createElement(c.A,{width:"100%",height:"100%",minHeight:190,position:"relative",ref:s},r.createElement(z.A,{xAxis:u,yAxis:E,width:h,height:d,margin:[30,20,30,20]},T),r.createElement("div",{ref:o}))))},J=({latestSpeedTest:{download_mbps:e=0,upload_mbps:t=0}={}})=>r.createElement(c.A,{width:"100%",flexDirection:"column",gap:j.YC},r.createElement(c.A,{justifyContent:"space-between"},r.createElement(h.A,{size:"body",color:"secondary"},r.createElement(b.sA,{id:"COMMON_DOWNLOAD"})),r.createElement(c.A,{alignItems:"center"},r.createElement(x.A.Icon,null),r.createElement(x.A.Bytes,{size:"medium"},(0,O.ap)(e)))),r.createElement(c.A,{justifyContent:"space-between"},r.createElement(h.A,{size:"body",color:"secondary"},r.createElement(b.sA,{id:"COMMON_UPLOAD"})),r.createElement(c.A,{alignItems:"center"},r.createElement(y.A.Icon,null),r.createElement(y.A.Bytes,{size:"medium"},(0,O.ap)(t))))),X=(0,r.memo)(({wanInterfaces:e,networkgroup:t})=>{const n=(0,a.useSelector)((0,r.useMemo)(()=>(0,d.mo)(t),[t])),o=(0,a.useSelector)(p.hq),i=(0,a.useSelector)(m.zi),l=(0,a.useSelector)(u.BQ),s=(0,r.useMemo)(()=>{const a=e.find(e=>t===e.networkgroup);return n.filter(({interface_name:e,wan_networkgroup:n})=>n===t||e.split(".")[0]===a?.ifname)},[e,t,n]);return r.createElement(c.A,{flexDirection:"column",alignItems:"flex-start"},r.createElement(J,{latestSpeedTest:s[s.length-1]}),r.createElement(Q,{ispStatusSpeedTestHistory:s,siteTimezone:o,language:i,selfHourCycle:l}),r.createElement(P,null),r.createElement(I,{ispStatusSpeedTestHistory:s,siteTimezone:o,language:i,selfHourCycle:l}))}),ee=({activeItem:{wan_interfaces:e,networkgroup:t}})=>{const n=(0,a.useDispatch)();(0,r.useEffect)(()=>{n((0,s.T)(t,void 0,{crudCacheStrategy:{type:o.e.CACHE}}))},[n,t]);const m=(0,r.useMemo)(()=>[{id:"ispSpeedTests",label:r.createElement(i.A,{id:"COMMON_SPEED_TEST"}),openByDefault:!0,renderContent:()=>r.createElement(X,{wanInterfaces:e,networkgroup:t})}],[e,t]);return r.createElement(l.A,{type:l.I.ACCORDION,items:m})}},13994:(e,t,n)=>{n.d(t,{A:()=>u});var a=n(296540),r=n(112142),o=n(66706),i=n(71479),l=n(132196),s=n(294303);const m=l.AH`
  overflow: visible;
`,c=(0,i.A)(s.A,{shouldForwardProp:e=>!["innerColor","outerColor"].includes(e)})`
  g {
    transition: unset;
  }
  circle {
    &:first-child {
      ${({outerColor:e})=>e?`fill: ${e};`:""}
    }
    &:last-child {
      ${({innerColor:e})=>e?`fill: ${e};`:""}
    }
  }
`,d=({chartWidth:e,chartHeight:t,top:n,left:r,innerColor:i,outerColor:l="#fff"})=>a.createElement(c,{position:"absolute",top:0,left:0,zIndex:2,innerColor:i,outerColor:l,pointerEvents:"none"},a.createElement("svg",{width:e,height:t,className:m},r&&n&&a.createElement(o.A,{hasAnimation:!1,x:r,y:n}))),p=({topA:e,leftA:t,topB:n,leftB:r})=>a.createElement(s.A,{zIndex:1,borderLeft:"2px dashed white",top:Math.min(e,n),height:Math.max(e,n)-Math.min(e,n),left:(t+r)/2-1,position:"absolute"}),u=({width:e,topA:t,leftA:n,topB:o,leftB:i,chartWidth:l,chartHeight:s,hidden:m,description:c,innerColor:u,tooltipRenderCondition:h,tooltipProps:g={},useSideSwapping:E=!0})=>m?null:a.createElement(a.Fragment,null,h?a.createElement(r.A,{width:e,left:E?n+(n<Math.round(l/2)?8:-8):n-8,top:(t+o)/(o?2:1),description:c,hidden:m,topMargin:4,tooltipProps:{maxWidth:"auto",...!g.position&&E&&n&&l&&{position:n<Math.round(l/2)?"right":"left"},portal:!0,...g}}):null,i&&o?a.createElement(p,{topA:t,topB:o,leftA:n,leftB:i}):null,a.createElement(d,{chartWidth:l,chartHeight:s,top:t,left:n,innerColor:u}))},71265:(e,t,n)=>{n.d(t,{R:()=>d,k:()=>p});var a=n(280258),r=n(190497),o=n(953048),i=n(175522),l=n(936621),s=n(305988);const m=[...new Set([a.H,i.Q.join(i.A),o.Zt,l.F,r.nc,s.Vr])],c={numeric:!0,sensitivity:"base"},d=(e,t)=>{const n=[];for(let a=e;a<=t;a+=1)n.push({value:a,label:String(a)});return n},p=e=>({value:t,label:n},{value:a,label:r})=>m.includes(t?.toString())||m.includes(a?.toString())?1/0:n?.toString().localeCompare(r?.toString(),e,c)??-1},86571:(e,t,n)=>{n.d(t,{A:()=>i});var a=n(296540),r=n(217439),o=n(699784);const i=({id:e,children:t,values:n})=>a.createElement(r.A,{color:"text-1",weight:"bold",size:"medium"},e?a.createElement(o.sA,{id:e,values:n}):null,t)},91255:(e,t,n)=>{n.d(t,{T:()=>l});var a=n(691189);const r=":wanNetworkGroup:",o=`ispStatus${r}`,i=`/v2/api/site/{site}/wan/${r}/isp-status`,l=(e,t={},n={})=>(0,a.Kd)(o.replace(r,e),i.replace(r,e),o,{queryParams:{include_isp_alerts:!1},...t},n)},175522:(e,t,n)=>{n.d(t,{A:()=>r,Q:()=>o});var a=n(416348);const r="_",o=[a.ZM,a.Je]},200826:(e,t,n)=>{n.d(t,{A:()=>h});var a=n(469733),r=n(296540),o=n(429252),i=n.n(o),l=n(198494),s=n(415246),m=n(305988),c=n(789768),d=n(249304);const p=Object.keys(d.l).reduce((e,t)=>(e[t]=!1,e),{}),u=e=>{const t=(0,a.useDispatch)(),n=(0,a.useSelector)(l.Bm);return(0,r.useEffect)(()=>{if(!p[e]){p[e]=!0;const a=m.W2[s.xz.TABLES][e],r=n[e]||{},o=a?.initialColumnSnapshot;if(o){const n={...r?.initialColumnSnapshot},a=[...r.initialColumns||[]];if(Object.keys(n).length)Object.entries(o).forEach(([e,t])=>{e in n||(n[e]=t)}),Object.entries(n).forEach(([e,t])=>{!a.includes(e)&&t&&a.push(e)}),i()(a,r.initialColumns)||t((0,c.yT)(e,{initialColumns:Array.from(new Set([...a,...r.initialColumns])),initialColumnSnapshot:n}));else if(a.length){const n=a.reduce((e,t)=>(e[t]=!0,e),{});t((0,c.yT)(e,{initialColumnSnapshot:n,initialColumns:Object.keys(n)}))}}}},[t,e,n]),null},h=e=>{u(e);return(0,a.useSelector)((0,r.useMemo)(()=>(0,l.h)(e),[e]))}},362412:(e,t,n)=>{n.d(t,{A:()=>d});var a=n(469733),r=n(296540),o=n(436331),i=n(805837),l=n(282556),s=n(71265);const m=e=>r.createElement(o.A,{renderOption:i.q,...e}),c=e=>r.createElement(m,{...e});c.Sorted=e=>{const t=(0,a.useSelector)(l.zi),n=(0,r.useMemo)(()=>(0,s.k)(t),[t]);return r.createElement(m,{...e,sortBy:n})};const d=c},479403:(e,t,n)=>{n.d(t,{IB:()=>d,mo:()=>p,nN:()=>c});var a=n(801081),r=n(25553),o=n(87485),i=n(882675),l=n(91255);const s=e=>(0,r.uh)((0,l.T)(e)),m=e=>(0,a.Mz)(s(e),o.i6),c=e=>(0,a.Mz)(m(e),({wan_status:e})=>e),d=e=>(0,a.Mz)(m(e),({connection_warnings:e})=>e||{[i.L.DOWNTIMES]:[],[i.L.PACKET_LOSS]:[],[i.L.HIGH_LATENCIES]:[]}),p=e=>(0,a.Mz)(m(e),({speedtest_historical:e})=>e||[])},596441:(e,t,n)=>{n.d(t,{I:()=>a});const a={HEADER_HEIGHT:32,ROW_HEIGHT:32,EDIT_FIELD_HEIGHT:36,getHeight(e,t,n,a){return Math.min((a||this.ROW_HEIGHT)*e+(n??this.HEADER_HEIGHT),(a||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)}}},689965:(e,t,n)=>{n.d(t,{A:()=>u,I:()=>a});var a,r=n(296540),o=n(822336),i=n(427853),l=n(71479),s=n(825032),m=n(566723),c=n(294303);!function(e){e.ACCORDION="accordion",e.BUTTON_LIST="buttonList"}(a||(a={}));const d=(0,l.A)(c.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===s.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  `:""}
`,p=(0,l.A)(i.A,{shouldForwardProp:e=>!["marginBottom","margin","flex","padding","nested","background"].includes(e)})`
  background-color: ${({background:e,nested:t,theme:{themeName:n}})=>e||o.Ay[n===s.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===s.S.DARK?"desktop-color-neutral-01-dark":"desktop-color-neutral-00-light"]};
      height: 48px;
      padding: 0 ${m.Ln};
    }
    > div:nth-child(2) {
      margin-bottom: 0;
      padding: 0 ${m.Ln} ${m.Ln};
      > div {
        padding: 0;
      }
    }
  }
`,u=({type:e,marginBottom:t,margin:n,padding:o,flex:i,width:l,nested:s,...m})=>"items"in m?r.createElement(p,{marginBottom:t,margin:n,padding:o,flex:i,nested:s,...m}):r.createElement(d,{nested:s,width:l,marginBottom:t,margin:n,padding:o,flex:i,isButtonList:e===a.BUTTON_LIST,...m},m.children)},878237:(e,t,n)=>{n.d(t,{A:()=>p});var a,r=n(296540),o=n(758649),i=n(71479),l=n(825032);!function(e){e.DEFAULT="default",e.HOVER="hover",e.DISABLED="disabled",e.ACTIVE="active"}(a||(a={}));const s={[a.DEFAULT]:{[l.S.LIGHT]:"#d6d9e2",[l.S.DARK]:"#3f3f3f"},[a.HOVER]:{[l.S.LIGHT]:"#7e8190",[l.S.DARK]:"#9d9d9d"},[a.DISABLED]:{[l.S.LIGHT]:"#eeeff3",[l.S.DARK]:"#1e1e1e"},[a.ACTIVE]:{[l.S.LIGHT]:"#a4a7b5",[l.S.DARK]:"#2f2f2f"}},m=(e,t)=>s[t][e],c=(e,t)=>`1px 0px 0px 0px ${m(e,t)}`,d=(0,i.A)(o.A,{shouldForwardProp:e=>"rotate"!==e})`
  margin: 0;
  padding: 0;
  width: 26px;
  height: 24px;
  color: inherit;
  background-color: transparent;
  box-sizing: border-box;
  border-radius: 4px 0 0 4px;
  border-right: 0;
  border-color: transparent;
  border-color: ${({theme:{themeName:e}})=>`${m(e,a.DEFAULT)}`};
  box-shadow: ${({theme:{themeName:e}})=>`${c(e,a.DEFAULT)}`};
  ${({rotate:e=!1})=>e?"\n    transform: rotate(-180deg);\n  ":"\n  position: relative; \n  left: -1px;\n  margin-left: 1px;\n    "}
  > span {
    display: flex;
    align-items: center;
    justify-content: center;
    > div {
      display: flex;
    }
  }
  &:disabled {
    z-index: 0;
    box-shadow: ${({theme:{themeName:e}})=>`${c(e,a.DISABLED)} !important`};
    border-color: ${({theme:{themeName:e}})=>`${m(e,a.DISABLED)} !important`};
  }
  &:hover {
    z-index: 1;
    box-shadow: ${({theme:{themeName:e}})=>`${c(e,a.HOVER)} !important`};
    border-color: ${({theme:{themeName:e}})=>`${m(e,a.HOVER)} !important`};
    border-right: 0;
    background-color: transparent !important;
  }
  &:active {
    box-shadow: ${({theme:{themeName:e}})=>`${c(e,a.ACTIVE)} !important`};
    border-color: ${({theme:{themeName:e}})=>`${m(e,a.ACTIVE)} !important`};
  }
`,p=({disabled:e,onClick:t,rotate:n})=>r.createElement(d,{variant:"secondary",rotate:n,disabled:e,onClick:t,type:"button"},r.createElement("svg",{width:"4",height:"8",viewBox:"0 0 4 8",fill:"none"},r.createElement("path",{d:"M3.75026 0.999386C3.75026 1.11739 3.70826 1.23639 3.62426 1.33138L1.25026 3.99939L1.27026 4.02039L3.62326 6.66739C3.80726 6.87339 3.78826 7.18939 3.58226 7.37339C3.37626 7.55739 3.06026 7.53839 2.87626 7.33239L0.530256 4.69439C0.156256 4.30739 0.156256 3.69139 0.530256 3.30439L2.87526 0.667385C3.05826 0.461386 3.37526 0.442385 3.58126 0.626385C3.69326 0.724385 3.75026 0.861386 3.75026 0.999386Z",fill:"#A4A7B5"})))},882675:(e,t,n)=>{var a;n.d(t,{L:()=>a}),function(e){e.DOWNTIMES="downtimes",e.PACKET_LOSS="packet_loss",e.HIGH_LATENCIES="high_latencies"}(a||(a={}))},905410:(e,t,n)=>{n.d(t,{A:()=>E});var a=n(469733),r=n(296540),o=n(217439),i=n(362412),l=n(566723),s=n(294303),m=n(699784),c=n(200826),d=n(789768),p=n(878237),u=n(860765);const h=(0,n(71479).A)("div")`
  overflow: auto;
  width: 100%;
  height: 100%;
`,g=({onRenderTable:e,itemCount:t,section:n="COMMON_RECORDS",rowOptions:g,onRowsChanged:E,onPageChanged:A,onOffsetChanged:f,tableType:C,pageNumber:b,paginationFlexProps:T={},paginationDropdownProps:D={},unknownCount:S=!1,paginationTableContainerClassName:w})=>{const O=(0,a.useDispatch)(),y=(0,r.useMemo)(()=>g||u.o,[g]),x=(0,r.useMemo)(()=>y.map(({value:e})=>({label:String(e),value:e})),[y]),v=(0,c.A)(C),M=(0,r.useMemo)(()=>Number(v?.rowsPerPage&&x.some(({value:e})=>Number(e)===v.rowsPerPage)?v.rowsPerPage:y.find(e=>e?.default)?.value||y?.[0]?.value),[v,x,y]),I=(0,r.useMemo)(()=>Math.max(u.B,b||u.B),[b]),_=(0,r.useCallback)(e=>{A?.(e)},[A]),L=(0,r.useCallback)(()=>{_(I-1)},[I,_]),N=(0,r.useCallback)(()=>{_(I+1)},[I,_]),H=(0,r.useCallback)(({value:e})=>{const t=Number(e);O((0,d.yT)(C,{rowsPerPage:t})),E?.(t)},[O,E,C]),P=(0,r.useMemo)(()=>{let e=I*M;return e>t&&(e=t-M,_(Math.ceil(Math.ceil(e)/M))),e},[_,I,M,t]),k=(0,r.useMemo)(()=>{let e=P+M;return e>=t&&(e=t),e},[P,M,t]),$=(0,r.useMemo)(()=>{const e={pageNumber:b,from:P,rowsPerPage:M};return f?.(e),e},[b,P,M,f]),B=(0,r.useMemo)(()=>I===u.B,[I]),R=(0,r.useMemo)(()=>k>=t,[k,t]);return r.createElement(r.Fragment,null,r.createElement(h,{className:w},e($)),r.createElement(s.A,{justifyContent:"space-between",...T},void 0!==P&&void 0!==k&&void 0!==t?r.createElement(s.A,{alignItems:"center"},r.createElement(s.A,null,r.createElement(p.A,{disabled:B,onClick:L}),r.createElement(p.A,{disabled:R,rotate:!0,onClick:N})),r.createElement(s.A,{marginLeft:l.kc,marginRight:l.S2},r.createElement(o.A,{size:"small",color:"text-2"},r.createElement(m.sA,{id:"PAGINATION_FROM_TO",values:{from:P+1,to:k,total:`${t}${S?"+":""}`,section:r.createElement(m.sA,{id:n})}}))),x.length>1?r.createElement(s.A,{alignItems:"center"},r.createElement(s.A,{marginRight:l.kc},r.createElement(o.A,{size:"small",color:"text-2"},r.createElement(m.sA,{id:"PAGINATION_ROWS_PER_PAGE"}))),r.createElement("div",{style:{width:"75px"}},r.createElement(i.A.Sorted,{value:M,options:x,onChange:H,variant:"secondary",direction:"top",width:"100%",portal:!0,...D}))):null):null))},E=({itemCount:e,rowOptions:t,onRenderTable:n,wrapperFlexProps:a,paginationTableContainerClassName:o,keepPaginationWhileLoading:i=!1,...m})=>{const c=(0,r.useMemo)(()=>e>Math.min(...(t||u.o).map(({value:e})=>e)),[e,t]);return r.createElement(s.A,{padding:l.Ln,gap:l.Ln,width:"100%",height:"100%",flexDirection:"column",overflow:"hidden",...a},i||c?r.createElement(g,{itemCount:e,rowOptions:t,onRenderTable:n,wrapperFlexProps:a,paginationTableContainerClassName:o,...m}):r.createElement(h,{className:o},n({pageNumber:0,from:0,rowsPerPage:e})))}}}]);