"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[99953],{761047(e,t,i){i.d(t,{A:()=>u});var r=i(602086),a=i(548941),n=i(713035),s=(0,r.memo)(e=>{const{motif:t,width:i=194,left:s=0,top:o=0,hidden:l,topMargin:d,tooltipProps:c={},portal:u,...A}=e,{motif:_}=(0,n.A)(t),m=null!=u?u:c.portal;return r.createElement("div",{style:{position:"absolute",left:s,top:o}},r.createElement(a.A,{motif:_,width:i,animate:!1,isHoverable:!1,offset:d?d+10:c.offset,...A,...c,portal:m,isOpen:m?!l:void 0},r.createElement("div",null)))},(e,t)=>Boolean(t.hidden));function o(e){return null!==e&&("string"==typeof e?"%"===e.slice(-1):!isNaN(e))}(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 l=i(310749),d=i(797614);const c=(0,l.c)({tooltipContainer:"tooltipContainer__Q9Q7ZKPc",animated:"animated__Q9Q7ZKPc",interactive:"interactive__Q9Q7ZKPc",hidden:"hidden__Q9Q7ZKPc"});var u=(0,r.memo)(r.forwardRef((e,t)=>{const{className:i,isAnimated:a=!0,delay:n,hidden:l=!1,top:u=0,left:A=0,isInteractive:_,message:m,title:h,description:p,children:x,...T}=e,{currentState:I,onStart:C,onComplete:M}=(0,d.T)(l,n),[S,R]=(0,r.useState)(!0),[g,N]=(0,r.useState)({top:u,left:A,message:m,title:h,description:p,children:x});(0,r.useEffect)(()=>{R(!1)},[]),(0,r.useEffect)(()=>{l!==I&&(l?M:C)(l)},[l,I,C,M]),(0,r.useEffect)(()=>{l||N({top:u,left:A,message:m,title:h,description:p,children:x})},[l,u,A,m,h,p,x]);const O=!I&&o(A)&&o(u)&&!S;return r.createElement("div",{"data-testid":"svgtooltip",ref:t,className:c.concat(i)("tooltipContainer",!O&&"hidden",_&&"interactive",a&&"animated")},r.createElement(s,{hidden:I,top:g.top,left:g.left,isInteractive:_,message:g.message,title:g.title,description:g.description,...T},g.children))}))},535322(e,t,i){i.d(t,{A:()=>m,I:()=>r});var r,a=i(274934),n=i(505817),s=i(753583),o=i(247816),l=i(565527),d=i(309130),c=i(100978),u=i(291508);!function(e){e.ACCORDION="accordion",e.BUTTON_LIST="buttonList"}(r||(r={}));const A=(0,o.A)(c.A,(0,u.A)("marginBottom","isButtonList","margin","flex","width","padding","nested","background"))`
  background-color: ${({background:e,nested:t,theme:{themeName:i}})=>e||n.Ay[i===l.S.DARK?`desktop-color-neutral-${t?"00":"01"}-${l.S.DARK}`:`desktop-color-neutral-${t?"01":"00"}-${l.S.LIGHT}`]};
  ${({nested:e,theme:{themeName:t}})=>e?`border: ${n.Ay[`desktop-border-divider-${t}`]};`:""}
  padding: ${({isButtonList:e,padding:t})=>t||(e?`0 ${d.Ln}`:d.Ln)};
  margin-bottom: ${({marginBottom:e})=>e||d.Ln};
  ${({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}})=>n.Ay[`desktop-border-divider-${e}`]};\n      &:last-child {\n        border-bottom: none;\n      }\n    }\n  `:""}
`,_=(0,o.A)(s.A,(0,u.A)("marginBottom","margin","flex","padding","nested","background"))`
  background-color: ${({background:e,nested:t,theme:{themeName:i}})=>e||n.Ay[i===l.S.DARK?`desktop-color-neutral-${t?"00":"01"}-${l.S.DARK}`:`desktop-color-neutral-${t?"01":"00"}-${l.S.LIGHT}`]};
  ${({nested:e,theme:{themeName:t}})=>e?`border: ${n.Ay[`desktop-border-divider-${t}`]};`:""}
  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,nested:t,theme:{themeName:i}})=>e||n.Ay[i===l.S.DARK?`desktop-color-neutral-${t?"00":"01"}-${l.S.DARK}`:`desktop-color-neutral-${t?"01":"00"}-${l.S.LIGHT}`]};
      height: 48px;
      padding: 0 ${d.Ln};
    }
    > div:nth-child(2) {
      margin-bottom: 0;
      padding: 0;
      > div {
        padding: 0 ${d.Ln} ${d.Ln};
      }
    }
  }
`,m=({type:e,marginBottom:t,margin:i,padding:n,flex:s,width:o,nested:l,...d})=>"items"in d?(0,a.jsx)(_,{marginBottom:t,margin:i,padding:n,flex:s,nested:l,...d}):(0,a.jsx)(A,{nested:l,width:o,marginBottom:t,margin:i,padding:n,flex:s,isButtonList:e===r.BUTTON_LIST,...d,children:d.children})},756893(e,t,i){i.d(t,{A:()=>p});var r=i(274934),a=i(179102),n=i(247816),s=i(505817),o=i(309130),l=i(345973),d=i(100978),c=i(291508),u=i(117983);const A=(0,n.A)("div",(0,c.A)("dotColor","variant"))`
  margin-top: 7px;
  margin-right: ${o.Ln};
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  box-sizing: border-box;
  ${({theme:{themeName:e},dotColor:t,variant:i})=>{const r=t||s.Ay[`desktop-color-neutral-04-${e}`];return"partial"===i?`\n        background: transparent;\n        border: 2px solid ${r};\n      `:`background: ${r};`}}
  z-index: 1;
`,_=(0,n.A)(d.A,(0,c.A)("active"))`
  position: relative;
  padding-bottom: ${o.kc};
  ${({active:e,theme:{themeName:t}})=>e&&`background: ${s.Ay[`desktop-color-ublue-01-${t}`]};`}
`,m=(0,n.A)("div")`
  position: absolute;
  left: ${o.YC};
  top: 10px;
  height: 100%;
  width: 1px;
  background: ${({theme:{themeName:e}})=>s.Ay[`desktop-color-neutral-04-${e}`]};
`,h=e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(u.cG,{}),(0,r.jsx)(a.A,{color:"text-3",size:"small",children:e})]}),p=({header:e,main:t,content:i,footer:n,timestamp:s,showLine:d,active:c=!1,dotColor:u,dotVariant:p="full"})=>(0,r.jsxs)(_,{active:c,children:[(0,r.jsx)(A,{dotColor:u,variant:p}),d?(0,r.jsx)(m,{}):null,(0,r.jsxs)("div",{children:[e?(0,r.jsx)("div",{children:e}):null,(0,r.jsx)("div",{children:(0,r.jsx)(a.A,{variant:"body-primary",children:t})}),i?(0,r.jsx)("div",{children:(0,r.jsx)(a.A,{color:"text-3",size:"small",children:i})}):null,(0,r.jsxs)("div",{style:{marginTop:o.YC,display:"flex",alignItems:"center",whiteSpace:"nowrap"},children:[(0,r.jsx)(l.A,{timestamp:s}),n?Array.isArray(n)?n.filter(Boolean).map(h):h(n):null]})]})]})},117983(e,t,i){i.d(t,{Hq:()=>O,ak:()=>M,cG:()=>C,fX:()=>N,lg:()=>S,pF:()=>g,v5:()=>R});var r=i(274934),a=i(505817),n=i(602086),s=i(977872),o=i(526744),l=i(247816),d=i(590979),c=i(449339),u=i(309130),A=i(100978),_=i(964978),m=i(122109),h=i(205521),p=i(470070),x=i(850352),T=i(581814),I=i(412160);const C=(0,l.A)("span")`
  &::before {
    content: '|';
    margin-right: ${u.kc};
    margin-left: ${u.kc};
    color: ${({theme:{themeName:e}})=>a.Ay[`desktop-color-neutral-03-${e}`]};
  }
`,M=({parameters:e})=>{const{handleGoToPortsPage:t}=(0,x.e)(),i=(0,n.useCallback)(()=>{t(e[I.dl.DEVICE_WITH_PORT]?.id,Number(e[I.dl.PORT]?.id))},[t,e]);return(0,r.jsx)(o.A,{type:"button",variant:"inline",onClick:i,children:e[I.dl.DEVICE_WITH_PORT]?.name})},S=({parameters:e})=>{const t=(0,s.wA)(),i=(0,n.useCallback)(()=>{switch(e[I.dl.NETWORK]?.network_purpose){case T.rR.SITE_VPN:t((0,h.XP)({type:c.H.SITE_TO_SITE_VPN,id:e[I.dl.NETWORK]?.id}));break;case T.rR.REMOTE_USER_VPN:t((0,h.XP)({type:c.H.VPN_SERVER,id:e[I.dl.NETWORK]?.id??""}));break;default:t((0,h.XP)({type:c.H.NETWORK,id:e[I.dl.NETWORK]?.id}))}},[t,e]);return(0,r.jsx)(o.A,{type:"button",variant:"inline",onClick:i,...d.A.addDataTestId(d.A.TestId.SIDE_PANEL_TRIGGER),children:e[I.cr.NETWORK]?.name})},R=({parameters:e})=>{const t=(0,s.wA)(),i=(0,n.useCallback)(()=>{t((0,h.XP)({type:c.H.WIFI,id:e[I.dl.WLAN]?.id}))},[t,e]);return(0,r.jsx)(o.A,{type:"button",variant:"inline",onClick:i,...d.A.addDataTestId(d.A.TestId.SIDE_PANEL_TRIGGER),children:e[I.cr.WLAN]?.name})},g=({parameter:e})=>{const t=(0,s.wA)(),i=(0,n.useCallback)(()=>{t((0,h.XP)({type:c.H.DEVICE,id:e?.id}))},[t,e?.id]);return(0,r.jsx)(o.A,{type:"button",variant:"inline",onClick:i,...d.A.addDataTestId(d.A.TestId.SIDE_PANEL_TRIGGER),children:e?.name})},N=({parameters:e})=>(0,r.jsxs)(A.A,{gap:u.YC,inline:!0,children:[(0,r.jsxs)(A.A,{alignItems:"center",children:[(0,r.jsx)(m.A.Icon,{size:"small"})," ",(0,r.jsx)(m.A.Bytes,{size:"small",children:e[I.cr.DATA_DOWN]?.name})]}),(0,r.jsxs)(A.A,{alignItems:"center",children:[(0,r.jsx)(_.A.Icon,{size:"small"})," ",(0,r.jsx)(_.A.Bytes,{size:"small",children:e[I.cr.DATA_UP]?.name})]})]}),O=({parameters:e})=>(0,r.jsxs)(r.Fragment,{children:[e[I.cr.WIFI_STATS]?.name,(0,r.jsx)(C,{}),e[I.cr.SIGNAL_STRENGTH]?.name," ",(0,p.tz)().formatMessage({id:"COMMON_UNIT_DBM"})]})},345973(e,t,i){i.d(t,{A:()=>u});var r=i(274934),a=i(602086),n=i(179102),s=i(977872),o=i(470070),l=i(897166),d=i(570801),c=i(820633);const u=(0,a.memo)(({timestamp:e})=>{const{formatMessage:t}=(0,o.tz)(),i=(0,s.d4)(d.BQ),a=(0,s.d4)(l.hq),u=(0,s.d4)(c.zi);return(0,r.jsx)(n.A,{size:"small",color:"text-3",children:new Intl.DateTimeFormat(u,{month:"short",day:"numeric",hour:"numeric",minute:"numeric",hourCycle:i,timeZone:a}).format(e).replace(",",` ${t({id:"COMMON_AT"}).toLowerCase()}`)})})},299953(e,t,i){i.r(t),i.d(t,{default:()=>ui});var r,a,n,s=i(274934),o=i(602086),l=i(396489),d=i.n(l),c=i(977872),u=i(329067),A=i(697038),_=i(820633),m=i(897166),h=i(570801),p=i(455425),x=i(52685),T=i(697500),I=i(535322),C=i(833881),M=i(179102),S=i(263705),R=i(239875),g=i(927027),N=i(470070),O=i(947414),E=i(247816),D=i(100978),P=i(309130);!function(e){e.NR="nr",e.LTE="lte"}(r||(r={})),function(e){e.RSRP="rsrp",e.SINR="sinr",e.RSRQ="rsrq"}(a||(a={})),function(e){e.AVG_NR_RSRP_DBM="avg_nr_rsrp_dbm",e.AVG_NR_SINR_DB="avg_nr_sinr_db",e.AVG_NR_RSRQ_DB="avg_nr_rsrq_db",e.AVG_LTE_RSRP_DBM="avg_lte_rsrp_dbm",e.AVG_LTE_SINR_DB="avg_lte_sinr_db",e.AVG_LTE_RSRQ_DB="avg_lte_rsrq_db"}(n||(n={}));var f=i(505817);const j=(e,t)=>f.Ay[`desktop-color-${(()=>{switch(e){case a.RSRP:return"ublue";case a.SINR:return"green";case a.RSRQ:return"orange"}})()}-06-${t}`],v=(0,E.A)(D.A)`
  flex-direction: column;
  position: relative;
`,L=(0,E.A)(D.A)`
  flex-direction: column;
  position: relative;
  &:not(:first-child):not(:last-child) {
    margin-top: ${P.Yc};
  }
`,b=(0,E.A)(D.A)`
  flex-direction: column;
  position: relative;
`,y=(0,E.A)(D.A)`
  width: 8px;
  height: 3px;
`,w=(0,E.A)(y)`
  background: ${({theme:{themeName:e}})=>j(a.RSRP,e)};
`,B=(0,E.A)(y)`
  background: ${({theme:{themeName:e}})=>j(a.SINR,e)};
`,k=(0,E.A)(y)`
  background: ${({theme:{themeName:e}})=>j(a.RSRQ,e)};
`,G=-120,H=Object.values(r),Y=Object.values(a),$={value:0,left:0,top:0},W=[{value:-210,label:"-210"},{value:-180,label:"-180"},{value:-150,label:"-150"},{value:-120,label:"-120"},{value:-90,label:"-90"},{value:-60,label:"-60"},{value:-30,label:"-30"},{value:0,label:"0"},{value:30,label:"30"},{value:60,label:"60"},{value:90,label:"90"},{value:120,label:"120"},{value:150,label:"150"},{value:180,label:"180"},{value:210,label:"210"}];var F=i(702381);const z=({data:e,maxY:t,mouseData:i,getCoordinates:r,yAxisMax:a,yAxisMin:n,ispCellularSignalChartGraph:l,showTooltip:d,tooltipPortal:c,renderTooltip:u,ispCellularSignalChartType:A})=>{const{themeName:_}=(0,S.u)(),m=(0,o.useMemo)(()=>j(l,_),[_,l]),h=(0,o.useCallback)(e=>u(e,l,A),[u,l,A]);return(0,s.jsx)(F.A,{data:e,maxY:t,mouseData:i,getCoordinates:r,interpolation:"curved",allowCustomDots:!0,yAxisMax:a,yAxisMin:n,tooltipPortal:c,lineColor:m,renderTooltip:h,showTooltip:d,hideMissingData:!0,hideMissingDataLine:!0})};var V=i(808601),U=i(833388);const K=(0,E.A)(D.A)`
  flex-direction: column;
  gap: ${P.YC};
`,Q=(0,E.A)(D.A)`
  justify-content: space-between;
  align-items: center;
`,X=(0,E.A)(D.A)`
  align-items: center;
  gap: ${P.YC};
`,q=({ispCellularSignalChartType:e,intlDateTimeFormat:t,timestamp:i,interval:a,[n.AVG_NR_RSRP_DBM]:o,[n.AVG_NR_SINR_DB]:l,[n.AVG_NR_RSRQ_DB]:d,[n.AVG_LTE_RSRP_DBM]:c,[n.AVG_LTE_SINR_DB]:u,[n.AVG_LTE_RSRQ_DB]:A})=>{const _=((e,t,i)=>{switch(e){case r.NR:return t;case r.LTE:return i;default:return}})(e,o,c),m=((e,t,i)=>{switch(e){case r.NR:return t;case r.LTE:return i;default:return}})(e,l,u),h=((e,t,i)=>{switch(e){case r.NR:return t;case r.LTE:return i;default:return}})(e,d,A);return(0,s.jsxs)(K,{children:[(0,s.jsx)(Q,{marginBottom:P.YC,children:(0,s.jsxs)(M.A,{size:"small",color:"text-2",children:[t.format(i)," - ",t.format(i+a)]})}),(0,s.jsxs)(Q,{children:[(0,s.jsxs)(X,{children:[(0,s.jsx)(w,{}),(0,s.jsx)(M.A,{size:"small",color:"text-2",children:(0,s.jsx)(N.sA,{id:"COMMON_RSRP"})})]}),(0,s.jsx)(M.A,{size:"small",color:"text-2",children:_?(0,s.jsxs)(s.Fragment,{children:[(0,U.i)(_)," ",(0,s.jsx)(N.sA,{id:"COMMON_UNIT_DBM"})]}):(0,s.jsx)(N.sA,{id:"COMMON_FALLBACK"})})]}),(0,s.jsxs)(Q,{children:[(0,s.jsxs)(X,{children:[(0,s.jsx)(B,{}),(0,s.jsx)(M.A,{size:"small",color:"text-2",children:(0,s.jsx)(N.sA,{id:"COMMON_SINR"})})]}),(0,s.jsx)(M.A,{size:"small",color:"text-2",children:m?(0,s.jsxs)(s.Fragment,{children:[(0,U.i)(m)," ",(0,s.jsx)(N.sA,{id:"COMMON_UNIT_DB"})]}):(0,s.jsx)(N.sA,{id:"COMMON_FALLBACK"})})]}),(0,s.jsxs)(Q,{children:[(0,s.jsxs)(X,{children:[(0,s.jsx)(k,{}),(0,s.jsx)(M.A,{size:"small",color:"text-2",children:(0,s.jsx)(N.sA,{id:"COMMON_RSRQ"})})]}),(0,s.jsx)(M.A,{size:"small",color:"text-2",children:h?(0,s.jsxs)(s.Fragment,{children:[(0,U.i)(h)," ",(0,s.jsx)(N.sA,{id:"COMMON_UNIT_DB"})]}):(0,s.jsx)(N.sA,{id:"COMMON_FALLBACK"})})]})]})},Z=({top:e,left:t,tooltipProps:i,chartWidth:r,chartHeight:a,hidden:n,innerColor:o,tooltipRenderCondition:l,ispCellularSignalChartType:d,intlDateTimeFormat:c,timestamp:u,interval:A,avg_nr_rsrp_dbm:_,avg_nr_sinr_db:m,avg_nr_rsrq_db:h,avg_lte_rsrp_dbm:p,avg_lte_sinr_db:x,avg_lte_rsrq_db:T})=>(0,s.jsx)(V.A,{width:230,topA:e,leftA:t,topB:i.top,leftB:i.left,chartWidth:r,chartHeight:a,hidden:n,description:(0,s.jsx)(q,{ispCellularSignalChartType:d,intlDateTimeFormat:c,timestamp:u,interval:A,avg_nr_rsrp_dbm:_,avg_nr_sinr_db:m,avg_nr_rsrq_db:h,avg_lte_rsrp_dbm:p,avg_lte_sinr_db:x,avg_lte_rsrq_db:T}),innerColor:o,tooltipRenderCondition:l}),J=(0,E.A)(D.A)`
  gap: ${P.YC};
  flex-wrap: wrap;
  margin-top: ${P.Yc};
`,ee=(0,E.A)(D.A)`
  align-items: center;
  gap: ${P.YC};
  white-space: nowrap;
  &:not(:last-child) {
    margin-right: ${P.xO};
  }
`,te={[a.RSRP]:{labelId:"COMMON_SIGNAL_STRENGTH",descriptionId:"COMMON_RSRP",legend:(0,s.jsx)(w,{})},[a.SINR]:{labelId:"ISP_SIGNAL_STABILITY",descriptionId:"COMMON_SINR",legend:(0,s.jsx)(B,{})},[a.RSRQ]:{labelId:"ISP_CHANNEL_EFFICIENCY",descriptionId:"COMMON_RSRQ",legend:(0,s.jsx)(k,{})}},ie=()=>(0,s.jsx)(J,{children:Y.map(e=>(({labelId:t,descriptionId:i,legend:r})=>(0,s.jsxs)(ee,{children:[r,(0,s.jsx)(M.A,{size:"small",color:"text-2",children:(0,s.jsx)(N.sA,{id:t})}),(0,s.jsxs)(M.A,{size:"small",color:"text-3",children:["(",(0,s.jsx)(N.sA,{id:i}),")"]})]},e))(te[e]))}),re=[20,0,0,24];var ae;!function(e){e.TOOLTIP_INTL_DATE_TIME_FORMAT="tooltipIntlDateTimeFormat",e.ISP_PERIOD="ispPeriod",e.ISP_INTERVAL="ispInterval",e.ISP_HISTORY_FIRST_TIMESTAMP="ispHistoryFirstTimestamp",e.ISP_HISTORY_LAST_TIMESTAMP="ispHistoryLastTimestamp",e.ISP_SPEED_TEST_FIRST_TIMESTAMP="ispSpeedTestFirstTimestamp",e.ISP_SPEED_TEST_LAST_TIMESTAMP="ispSpeedTestLastTimestamp",e.ISP_PERIOD_INTL_DATE_TIME_FORMAT_MAP="ispPeriodIntlDateTimeFormatMap"}(ae||(ae={}));const ne=(0,o.createContext)({[ae.TOOLTIP_INTL_DATE_TIME_FORMAT]:void 0,[ae.ISP_PERIOD]:void 0,[ae.ISP_INTERVAL]:void 0,[ae.ISP_HISTORY_FIRST_TIMESTAMP]:void 0,[ae.ISP_HISTORY_LAST_TIMESTAMP]:void 0,[ae.ISP_SPEED_TEST_FIRST_TIMESTAMP]:void 0,[ae.ISP_SPEED_TEST_LAST_TIMESTAMP]:void 0,[ae.ISP_PERIOD_INTL_DATE_TIME_FORMAT_MAP]:void 0}),se=(e,t)=>{const i=({value:e})=>"number"==typeof e?e:Number(e),r=[...W.map(i)].sort((e,t)=>e-t),a=r.findLastIndex(t=>t<=e),n=r.findIndex(e=>e>=t),s=r[Math.max(a-1,0)],o=r[Math.min(n+1,r.length-1)];return W.filter(e=>{const t=i(e);return t>=s&&t<=o})},oe=({[u.G.HISTORY]:e})=>{const{themeName:t}=(0,S.u)(),{ref:i,width:l=0}=(0,R.A)(),d=(0,o.useRef)(null),c=(0,o.useRef)(null),A=(0,o.useRef)($),_=(0,o.useRef)($),{formatMessage:m}=(0,N.tz)(),{[ae.TOOLTIP_INTL_DATE_TIME_FORMAT]:h,[ae.ISP_PERIOD]:p,[ae.ISP_HISTORY_FIRST_TIMESTAMP]:x,[ae.ISP_HISTORY_LAST_TIMESTAMP]:T,[ae.ISP_INTERVAL]:I,[ae.ISP_PERIOD_INTL_DATE_TIME_FORMAT_MAP]:E}=(0,o.useContext)(ne),{nrRsrpData:D,nrSinrData:P,nrRsrqData:f,lteRsrpData:y,lteSinrData:w,lteRsrqData:B,highestLteSinrValue:k,highestNrSinrValue:Y,lowestLteRsrpValue:W,lowestLteRsrqValue:F,lowestNrRsrpValue:V,lowestNrRsrqValue:U}=(0,o.useMemo)(()=>{const t=[],i=[],r=[],a=[],s=[],o=[];let l=0,d=0,c=0,A=0,_=0,m=0;for(let h=0;h<e.length;h+=1){const{[u.I.TIMESTAMP]:p,[u.I.AVG_NR_RSRP_DBM]:x,[u.I.AVG_NR_SINR_DB]:T,[u.I.AVG_NR_RSRQ_DB]:I,[u.I.AVG_LTE_RSRP_DBM]:C,[u.I.AVG_LTE_SINR_DB]:M,[u.I.AVG_LTE_RSRQ_DB]:S}=e[h],R={[n.AVG_NR_RSRP_DBM]:x,[n.AVG_NR_SINR_DB]:T,[n.AVG_NR_RSRQ_DB]:I,[n.AVG_LTE_RSRP_DBM]:C,[n.AVG_LTE_SINR_DB]:M,[n.AVG_LTE_RSRQ_DB]:S};t.push({x:p,y:x,custom:R}),c=Math.min(c,x||0),i.push({x:p,y:T}),l=Math.max(l,T||0),r.push({x:p,y:I}),A=Math.min(A,I||0),a.push({x:p,y:C,custom:R}),_=Math.min(_,C||0),s.push({x:p,y:M}),d=Math.max(d,M||0),o.push({x:p,y:S}),m=Math.min(m,S||0)}return{nrRsrpData:t,nrSinrData:i,nrRsrqData:r,lteRsrpData:a,lteSinrData:s,lteRsrqData:o,highestLteSinrValue:d,lowestLteRsrpValue:_,lowestLteRsrqValue:m,highestNrSinrValue:l,lowestNrRsrpValue:c,lowestNrRsrqValue:A}},[e]),K=(0,o.useMemo)(()=>se(Math.min(Math.min(Number.isFinite(V)?V:G,Number.isFinite(U)?U:G),G),Math.max(Y,60)),[V,U,Y]),Q=(0,o.useMemo)(()=>se(Math.min(Math.min(Number.isFinite(W)?W:G,Number.isFinite(F)?F:G),G),Math.max(k,60)),[W,F,k]),X=(0,o.useMemo)(()=>(0,g.v)([x,T],7).map((e,t,i)=>({value:e,label:t+1===i.length?m({id:"COMMON_NOW"}):t%2==0?E[p].format(e):void 0})),[x,T,E,p,m]),q=(0,o.useCallback)(e=>e===a.RSRP,[]),J=(0,o.useCallback)(e=>{switch(e){case r.NR:return d.current||void 0;case r.LTE:return c.current||void 0;default:return}},[]),ee=(0,o.useCallback)(e=>{switch(e){case r.NR:return A;case r.LTE:return _;default:return{current:$}}},[]),te=(0,o.useCallback)(e=>ee(e).current,[ee]),oe=(0,o.useCallback)(({top:e,left:i,hidden:r,x:a,y:o,custom:{[n.AVG_NR_RSRP_DBM]:d=0,[n.AVG_NR_SINR_DB]:c=0,[n.AVG_NR_RSRQ_DB]:u=0,[n.AVG_LTE_RSRP_DBM]:A=0,[n.AVG_LTE_SINR_DB]:_=0,[n.AVG_LTE_RSRQ_DB]:m=0}={}},p,x)=>{const T=q(p);return T&&(ee(x).current={value:o,left:i,top:e}),(0,s.jsx)(Z,{top:e,left:i,tooltipProps:te(x),chartWidth:l,chartHeight:180,hidden:r,innerColor:j(p,t),tooltipRenderCondition:T,ispCellularSignalChartType:x,intlDateTimeFormat:h,timestamp:a,interval:I,avg_nr_rsrp_dbm:d,avg_nr_sinr_db:c,avg_nr_rsrq_db:u,avg_lte_rsrp_dbm:A,avg_lte_sinr_db:_,avg_lte_rsrq_db:m})},[t,I,h,l,q,te,ee]),le=(0,o.useCallback)(({getCoordinates:e,mouseData:t,maxY:i,yAxisMax:r,yAxisMin:n,chartHovered:o,ispCellularSignalChartType:l})=>(0,s.jsx)(z,{data:D,maxY:i,mouseData:t,getCoordinates:e,yAxisMax:r,yAxisMin:n,ispCellularSignalChartGraph:a.RSRP,showTooltip:o,renderTooltip:oe,tooltipPortal:J(l),ispCellularSignalChartType:l}),[D,oe,J]),de=(0,o.useCallback)(({getCoordinates:e,mouseData:t,maxY:i,yAxisMax:r,yAxisMin:n,chartHovered:o,ispCellularSignalChartType:l})=>(0,s.jsx)(z,{data:P,ispCellularSignalChartGraph:a.SINR,maxY:i,mouseData:t,getCoordinates:e,yAxisMax:r,yAxisMin:n,renderTooltip:oe,showTooltip:o,tooltipPortal:J(l),ispCellularSignalChartType:l}),[P,oe,J]),ce=(0,o.useCallback)(({getCoordinates:e,mouseData:t,maxY:i,yAxisMax:r,yAxisMin:n,chartHovered:o,ispCellularSignalChartType:l})=>(0,s.jsx)(z,{data:f,ispCellularSignalChartGraph:a.RSRQ,maxY:i,mouseData:t,getCoordinates:e,yAxisMax:r,yAxisMin:n,renderTooltip:oe,showTooltip:o,tooltipPortal:J(l),ispCellularSignalChartType:l}),[f,oe,J]),ue=(0,o.useCallback)(({getCoordinates:e,mouseData:t,maxY:i,yAxisMax:r,yAxisMin:n,chartHovered:o,ispCellularSignalChartType:l})=>(0,s.jsx)(z,{data:y,ispCellularSignalChartGraph:a.RSRP,maxY:i,mouseData:t,getCoordinates:e,yAxisMax:r,yAxisMin:n,renderTooltip:oe,showTooltip:o,tooltipPortal:J(l),ispCellularSignalChartType:l}),[y,oe,J]),Ae=(0,o.useCallback)(({getCoordinates:e,mouseData:t,maxY:i,yAxisMax:r,yAxisMin:n,chartHovered:o,ispCellularSignalChartType:l})=>(0,s.jsx)(z,{data:w,ispCellularSignalChartGraph:a.SINR,maxY:i,mouseData:t,getCoordinates:e,yAxisMax:r,yAxisMin:n,renderTooltip:oe,showTooltip:o,tooltipPortal:J(l),ispCellularSignalChartType:l}),[w,oe,J]),_e=(0,o.useCallback)(({getCoordinates:e,mouseData:t,maxY:i,yAxisMax:r,yAxisMin:n,chartHovered:o,ispCellularSignalChartType:l})=>(0,s.jsx)(z,{data:B,ispCellularSignalChartGraph:a.RSRQ,maxY:i,mouseData:t,getCoordinates:e,yAxisMax:r,yAxisMin:n,renderTooltip:oe,showTooltip:o,tooltipPortal:J(l),ispCellularSignalChartType:l}),[B,oe,J]),me=(0,o.useCallback)((e,t,i,r,a,n,o)=>(0,s.jsxs)(s.Fragment,{children:[le({getCoordinates:e,mouseData:t,maxY:i,yAxisMax:r,yAxisMin:a,chartHovered:n,ispCellularSignalChartType:o}),de({getCoordinates:e,mouseData:t,maxY:i,yAxisMax:r,yAxisMin:a,chartHovered:n,ispCellularSignalChartType:o}),ce({getCoordinates:e,mouseData:t,maxY:i,yAxisMax:r,yAxisMin:a,chartHovered:n,ispCellularSignalChartType:o})]}),[le,de,ce]),he=(0,o.useCallback)((e,t,i,r,a,n,o)=>(0,s.jsxs)(s.Fragment,{children:[ue({getCoordinates:e,mouseData:t,maxY:i,yAxisMax:r,yAxisMin:a,chartHovered:n,ispCellularSignalChartType:o}),Ae({getCoordinates:e,mouseData:t,maxY:i,yAxisMax:r,yAxisMin:a,chartHovered:n,ispCellularSignalChartType:o}),_e({getCoordinates:e,mouseData:t,maxY:i,yAxisMax:r,yAxisMin:a,chartHovered:n,ispCellularSignalChartType:o})]}),[ue,Ae,_e]),pe=(0,o.useCallback)(e=>(t,i,a,n,s,o,l,d,c,u)=>(()=>{switch(e){case r.NR:return me;case r.LTE:return he;default:return O.P1}})()(t,i,a,o,l,u,e),[me,he]),xe=(0,o.useCallback)(e=>{switch(e){case r.NR:return"ISP_5G_SIGNAL";case r.LTE:return"ISP_LTE_SIGNAL";default:return"COMMON_FALLBACK"}},[]),Te=(0,o.useCallback)(e=>{switch(e){case r.NR:return K;case r.LTE:return Q;default:return[]}},[K,Q]),Ie=(0,o.useCallback)(e=>{switch(e){case r.NR:return d;case r.LTE:return c;default:return null}},[]);return(0,s.jsxs)(v,{ref:i,children:[H.map(e=>(0,s.jsxs)(L,{children:[(0,s.jsx)(M.A,{size:"medium",color:"text-2",children:(0,s.jsx)(N.sA,{id:xe(e)})}),(0,s.jsxs)(b,{children:[(0,s.jsx)(C.A,{yAxis:Te(e),xAxis:X,width:l,height:180,margin:re,children:pe(e)},e),(0,s.jsx)("div",{ref:Ie(e)})]})]},e)),(0,s.jsx)(ie,{})]})},le=(0,E.A)(D.A)`
  flex-direction: column;
  gap: ${P.xO};
`,de=({[u.G.HISTORY]:e,children:t})=>(0,s.jsx)(I.A,{children:(0,s.jsxs)(le,{children:[t,(0,s.jsx)(oe,{history:e})]})});var ce=i(761047);const ue=(0,E.A)(D.A)`
  width: 100%;
  height: 148px;
  flex-direction: column;
  position: relative;
  margin-bottom: ${P.fS};
`;var Ae;!function(e){e.HEALTHY="healthy",e.WARNING="warning",e.CRITICAL="critical"}(Ae||(Ae={}));const _e="ISP_LATENCY_GRAPH_GRADIENT_ID",me={[Ae.HEALTHY]:"green-06",[Ae.WARNING]:"orange-06",[Ae.CRITICAL]:"red-06"},he={[A.c9.WIRED]:{[Ae.HEALTHY]:0,[Ae.WARNING]:40,[Ae.CRITICAL]:80},[A.c9.MBB]:{[Ae.HEALTHY]:0,[Ae.WARNING]:100,[Ae.CRITICAL]:150}},pe={portal:!0},xe=(0,E.A)(D.A)`
  flex-direction: column;
  gap: ${P.YC};
`,Te=(0,E.A)(D.A)`
  justify-content: space-between;
  align-items: center;
`,Ie=({intlDateTimeFormat:e,timestamp:t,avg_latency_ms:i,max_latency_ms:r,interval:a})=>(0,s.jsxs)(xe,{children:[(0,s.jsxs)(Te,{marginBottom:P.YC,children:[e.format(t)," - ",e.format(t+a)]}),Number.isFinite(i)?(0,s.jsxs)(Te,{children:[(0,s.jsx)(M.A,{size:"inherit",color:"inherit",children:(0,s.jsx)(N.sA,{id:"COMMON_AVERAGE"})}),(0,U.i)(i||0)," ",(0,s.jsx)(N.sA,{id:"COMMON_UNIT_MS"})]}):null,Number.isFinite(r)?(0,s.jsxs)(Te,{children:[(0,s.jsx)(M.A,{size:"inherit",color:"inherit",children:(0,s.jsx)(N.sA,{id:"COMMON_MAXIMUM"})}),(0,U.i)(r||0)," ",(0,s.jsx)(N.sA,{id:"COMMON_UNIT_MS"})]}):null]}),Ce=({[u.G.HISTORY]:e,[A.p5.TYPE]:t})=>{const{formatMessage:i}=(0,N.tz)(),{[ae.TOOLTIP_INTL_DATE_TIME_FORMAT]:r,[ae.ISP_PERIOD]:a,[ae.ISP_HISTORY_FIRST_TIMESTAMP]:n,[ae.ISP_HISTORY_LAST_TIMESTAMP]:l,[ae.ISP_INTERVAL]:d,[ae.ISP_PERIOD_INTL_DATE_TIME_FORMAT_MAP]:c}=(0,o.useContext)(ne),{ref:_,width:m=0,height:h=0}=(0,R.A)(),{themeName:p}=(0,S.u)(),x=(0,o.useRef)(null),{data:T,highestYAxis:I}=(0,o.useMemo)(()=>{const t=[];let i=0;for(let r=0;r<e.length;r+=1){const{[u.I.TIMESTAMP]:a,[u.I.AVG_LATENCY_MS]:n,[u.I.MAX_LATENCY_MS]:s}=e[r];t.push({x:a,y:n,custom:{[u.I.MAX_LATENCY_MS]:s}}),i=Math.max(i,n||0)}return{data:t,highestYAxis:i}},[e]),M=(0,o.useMemo)(()=>(0,g.Y)(Math.max(I,60),5).map(({value:e,label:t},r)=>({value:e,label:0===r?i({id:"COMMON_UNIT_MS"}):t})),[I,i]),O=(0,o.useCallback)((e,t,r)=>t+1===r?i({id:"COMMON_NOW"}):t%2==0?c[a].format(e):void 0,[a,i,c]),E=(0,o.useMemo)(()=>(0,g.v)([n,l],7).map((e,t,i)=>({value:e,label:O(e,t,i.length)})),[n,l,O]),D=(0,o.useCallback)(({top:e,left:t,hidden:i,x:a,y:n,custom:o})=>e&&t&&n?(0,s.jsx)(ce.A,{width:240,left:t,top:e,description:(0,s.jsx)(Ie,{intlDateTimeFormat:r,timestamp:a,avg_latency_ms:n,max_latency_ms:o?.[u.I.MAX_LATENCY_MS],interval:d}),hidden:i,tooltipProps:pe}):null,[r,d]),P=(0,o.useCallback)(e=>D(e),[D]),{[Ae.CRITICAL]:j,[Ae.WARNING]:v,[Ae.HEALTHY]:L}=(0,o.useMemo)(()=>({[Ae.CRITICAL]:f.Ay[`desktop-color-${me[Ae.CRITICAL]}-${p}`],[Ae.WARNING]:f.Ay[`desktop-color-${me[Ae.WARNING]}-${p}`],[Ae.HEALTHY]:f.Ay[`desktop-color-${me[Ae.HEALTHY]}-${p}`]}),[p]),b=(0,o.useCallback)(()=>{const e=100*Math.min(Math.max(I,0),I)/I,i=e-100*Math.min(he[t]?.[Ae.CRITICAL],I)/I,r=e-100*Math.min(he[t]?.[Ae.WARNING],I)/I;return(0,s.jsx)("defs",{children:(0,s.jsxs)("linearGradient",{id:_e,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[i>0?(0,s.jsx)("stop",{offset:`${i}%`,stopColor:j,stopOpacity:.7}):null,r>0?(0,s.jsx)("stop",{offset:`${r}%`,stopColor:v,stopOpacity:.7}):null,(0,s.jsx)("stop",{offset:"100%",stopColor:L,stopOpacity:.7})]})})},[I,t,j,v,L]),y=(0,o.useCallback)((e,t,i,r,a,n,o,l,d,c)=>(0,s.jsx)(F.A,{data:T,maxY:i,mouseData:t,getCoordinates:e,lineColor:"transparent",variant:"gradientArea",interpolation:"curved",customGradientId:_e,allowCustomDots:!0,renderCustomGradient:b,yAxisMax:n,yAxisMin:o,y2AxisMax:l,y2AxisMin:d,showTooltip:c,renderTooltip:P,tooltipPortal:x?.current||void 0,hideMissingDataLine:!0}),[T,P,b]);return(0,s.jsxs)(ue,{ref:_,children:[(0,s.jsx)(C.A,{xAxis:E,yAxis:M,width:m,height:h,margin:re,children:y}),(0,s.jsx)("div",{ref:x})]})},Me=(0,E.A)(D.A)`
  flex-direction: column;
`,Se=(0,E.A)(D.A)`
  width: 100%;
  justify-content: space-between;
  position: relative;
`,Re=(0,E.A)(D.A)`
  flex-direction: column;
  gap: ${P.YC};
  max-width: 45%;
  &:last-child {
    img {
      margin-left: auto;
    }
  }
`;var ge=i(579902),Ne=i(156007);const Oe=(0,o.memo)(({[A.p5.ISP]:{[A.rs.NAME]:e,[A.rs.ASN]:t}})=>(0,s.jsxs)(Re,{children:[(0,s.jsx)(ge.A,{asn:t,name:e,style:{width:32,height:32},useFallback:!0}),(0,s.jsx)(Ne.A,{size:"small",weight:"bold",children:e||(0,s.jsx)(N.sA,{id:"COMMON_ISP"})})]}));var Ee=i(974390),De=i(754924),Pe=i(347625),fe=i(795206),je=i(541819);const ve=(0,o.memo)(()=>{const e=(0,c.wA)(),t=(0,c.d4)(m.vc),i=(0,c.d4)(De.$x),r=(0,c.d4)(De.hp),[a,n]=(0,o.useState)(r),[l,d]=(0,o.useState)(i);return(0,o.useEffect)(()=>{i&&r||e((0,fe.pI)(t)).then(({data:e})=>{const t=Array.isArray(e)?e[0]:e;n(t.name||""),d(t.model||"")})},[e,t,i,r]),(0,s.jsxs)(Re,{children:[(0,s.jsx)(Ee.A,{variant:je.Hx.NOPADDING,model:l,width:32,height:32}),(0,s.jsx)(Ne.A,{size:"small",weight:"bold",children:(0,Pe.Q)({name:a,model:l,mac:t})})]})});var Le=i(291508);const be=(0,E.A)(D.A)`
  position: absolute;
  width: 100%;
  height: 100%;
`,ye=(0,E.A)(D.A,(0,Le.A)("ispLatencyGraphState"))`
  width: 100%;
  height: 1px;
  background: ${({theme:{themeName:e},ispLatencyGraphState:t})=>f.Ay[`desktop-color-${me[t]}-${e}`]};
  position: absolute;
  top: ${P.Ln};
  clip-path: inset(0 ${32}px 0 ${32}px);
`;var we=i(669439);const Be=(0,E.A)(D.A)`
  svg {
    position: absolute;
    left: 50%;
    top: 80%;
    transform: translate(-50%, -50%);
  }
`,ke=(0,E.A)("span")`
  white-space: nowrap;
`;var Ge=i(711950),He=i(377067);const Ye={[Ae.HEALTHY]:"ISP_LATENCY_LOOKS_GOOD",[Ae.WARNING]:"ISP_LATENCY_BRIEFLY_HIGH",[Ae.CRITICAL]:"ISP_LATENCY_SPIKED"},$e={[Ae.HEALTHY]:He.A,[Ae.WARNING]:Ge.A,[Ae.CRITICAL]:Ge.A},We=({[A.p5.AVG_LATENCY_MS]:e,ispLatencyGraphState:t})=>{const{themeName:i}=(0,S.u)(),{[ae.ISP_PERIOD]:r}=(0,o.useContext)(ne),a=(0,o.useMemo)(()=>$e[t],[t]),n=(0,o.useMemo)(()=>f.Ay[`desktop-color-${me[t]}-${i}`],[t,i]);return a?(0,s.jsx)(Be,{children:(0,s.jsx)(we.A,{description:(0,s.jsx)(ke,{children:(0,s.jsx)(N.sA,{id:Ye[t],values:{ispPeriod:r,latency:(0,s.jsxs)(M.A,{size:"inherit",style:{color:n},children:[(0,U.i)(e)," ",(0,s.jsx)(N.sA,{id:"COMMON_UNIT_MS"})]})}})}),children:(0,s.jsx)(a,{color:n,size:"original"})})}):null},Fe=(0,o.memo)(({[A.p5.TYPE]:e,[A.p5.AVG_LATENCY_MS]:t})=>{const i=(0,o.useMemo)(()=>{const i=he[e];return t>=i?.[Ae.CRITICAL]?Ae.CRITICAL:t>=i?.[Ae.WARNING]?Ae.WARNING:Ae.HEALTHY},[e,t]);return(0,s.jsxs)(be,{children:[(0,s.jsx)(ye,{ispLatencyGraphState:i}),(0,s.jsx)(We,{avg_latency_ms:t,ispLatencyGraphState:i})]})}),ze=({[A.p5.ISP]:e,[A.p5.TYPE]:t,[A.p5.AVG_LATENCY_MS]:i})=>Number.isFinite(i)?(0,s.jsxs)(Se,{children:[(0,s.jsx)(Oe,{isp:e}),(0,s.jsx)(Fe,{type:t,avg_latency_ms:i}),(0,s.jsx)(ve,{})]}):null,Ve=({[u.G.HISTORY]:e,[A.p5.ISP]:t,[A.p5.TYPE]:i,children:r})=>{const a=e.reduce((e,{[u.I.AVG_LATENCY_MS]:t=0})=>e+t,0)/e.length,n=(0,o.useMemo)(()=>(0,s.jsxs)(Me,{children:[r,(0,s.jsx)(Ce,{history:e,type:i}),(0,s.jsx)(ze,{isp:t,type:i,avg_latency_ms:a})]}),[r,e,i,t,a]),l=(0,o.useMemo)(()=>[{id:"latency",label:(0,s.jsx)(N.sA,{id:"COMMON_INTERNET_QUALITY"}),openByDefault:!0,renderContent:()=>n}],[n]);return(0,s.jsx)(I.A,r?{children:n}:{type:I.I.ACCORDION,items:l})},Ue=(0,E.A)(D.A)`
  flex-direction: column;
`;var Ke=i(745702),Qe=i(684935);const Xe=Object.entries({[T.a.HOUR]:"COMMON_DATE_RANGE_SHORT_1H",[T.a.DAY]:"COMMON_DATE_RANGE_SHORT_1D",[T.a.WEEK]:"COMMON_DATE_RANGE_SHORT_1W",[T.a.MONTH]:"COMMON_DATE_RANGE_SHORT_1M"}).map(([e,t])=>({id:e,label:(0,s.jsx)(N.sA,{id:t})})),qe="ISP_PERIOD_UPDATER_TABS_CLASSNAME",Ze=(0,E.A)(D.A)`
  align-items: center;
  justify-content: space-between;
  width: 100%;
  .${qe} {
    justify-content: flex-end;
    > div:first-child {
      margin: unset;
    }
  }
`;var Je=i(878639),et=i(369430);const tt=(0,o.memo)(({titleId:e})=>{const t=(0,c.wA)(),i=(0,c.d4)(Je.U),r=(0,o.useCallback)(({id:e})=>{t((0,et.C)(e))},[t]);return(0,s.jsxs)(Ze,{children:[(0,s.jsx)(M.A,{size:"medium",color:"text-1",weight:"bold",children:(0,s.jsx)(N.sA,{id:e})}),(0,s.jsx)(Qe.A,{tabs:Xe,onSelectTab:r,selectedTab:i,variant:"filter",className:qe})]})}),it=(0,E.A)(D.A)`
  flex-direction: column;
  position: relative;
`;var rt,at,nt=i(70582);!function(e){e.DOWNLOAD="download",e.UPLOAD="upload"}(rt||(rt={})),function(e){e.DOWNLOAD_BPS="download_bps",e.UPLOAD_BPS="upload_bps"}(at||(at={}));const st=(e,t)=>f.Ay[`desktop-color-${(()=>{switch(e){case rt.DOWNLOAD:return"aqua-06";case rt.UPLOAD:return"purple-06"}})()}-${t}`],ot=(0,E.A)(D.A)`
  flex-direction: column;
  position: relative;
`,lt=(0,E.A)(D.A)`
  flex-direction: column;
  position: relative;
`,dt=(0,E.A)(D.A)`
  width: 8px;
  height: 3px;
`,ct=(0,E.A)(dt)`
  background: ${({theme:{themeName:e}})=>st(rt.DOWNLOAD,e)};
`,ut=(0,E.A)(dt)`
  background: ${({theme:{themeName:e}})=>st(rt.UPLOAD,e)};
`,At=Object.values(rt),_t={value:0,left:0,top:0},mt=({data:e,maxY:t,mouseData:i,getCoordinates:r,yAxisMax:a,yAxisMin:n,ispSpeedTestGraphType:l,showTooltip:d,tooltipPortal:c,renderTooltip:u})=>{const{themeName:A}=(0,S.u)(),_=(0,o.useMemo)(()=>st(l,A),[A,l]),m=(0,o.useCallback)(e=>u(e,l),[u,l]),h=(0,o.useMemo)(()=>`${l}GradientId`,[l]),p=(0,o.useCallback)(()=>(0,s.jsx)("defs",{children:(0,s.jsxs)("linearGradient",{id:h,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[(0,s.jsx)("stop",{offset:"0%",stopColor:_,stopOpacity:.5}),(0,s.jsx)("stop",{offset:"100%",stopColor:_,stopOpacity:.1})]})}),[_,h]);return(0,s.jsx)(F.A,{data:e,maxY:t,yAxisMax:a,yAxisMin:n,mouseData:i,getCoordinates:r,lineColor:_,variant:"gradientArea",interpolation:"curved",allowCustomDots:!0,tooltipPortal:c,customGradientId:h,renderCustomGradient:p,renderTooltip:m,showTooltip:d,hideMissingData:!0,hideMissingDataLine:!0})};var ht=i(320509);const pt=(0,E.A)(D.A)`
  flex-direction: column;
  gap: ${P.YC};
`,xt=(0,E.A)(D.A)`
  justify-content: space-between;
  align-items: center;
`,Tt=(0,E.A)(D.A)`
  align-items: center;
  gap: ${P.YC};
`,It=({intlDateTimeFormat:e,timestamp:t,...i})=>{const r=(({[at.DOWNLOAD_BPS]:e})=>e)(i),a=(({[at.UPLOAD_BPS]:e})=>e)(i);return(0,s.jsxs)(pt,{children:[(0,s.jsx)(xt,{marginBottom:P.YC,children:(0,s.jsx)(M.A,{size:"small",color:"text-2",children:e.format(t)})}),(0,s.jsxs)(xt,{children:[(0,s.jsxs)(Tt,{children:[(0,s.jsx)(ct,{}),(0,s.jsx)(M.A,{size:"small",color:"text-2",children:(0,s.jsx)(N.sA,{id:"COMMON_DOWNLOAD"})})]}),(0,s.jsx)(M.A,{size:"small",color:"text-2",children:r?(0,ht.zX)(r):(0,s.jsx)(N.sA,{id:"COMMON_FALLBACK"})})]}),(0,s.jsxs)(xt,{children:[(0,s.jsxs)(Tt,{children:[(0,s.jsx)(ut,{}),(0,s.jsx)(M.A,{size:"small",color:"text-2",children:(0,s.jsx)(N.sA,{id:"COMMON_UPLOAD"})})]}),(0,s.jsx)(M.A,{size:"small",color:"text-2",children:a?(0,ht.zX)(a):(0,s.jsx)(N.sA,{id:"COMMON_FALLBACK"})})]})]})},Ct=({top:e,left:t,tooltipProps:i,chartWidth:r,chartHeight:a,hidden:n,innerColor:o,tooltipRenderCondition:l,intlDateTimeFormat:d,timestamp:c,download_bps:u,upload_bps:A})=>(0,s.jsx)(V.A,{width:230,topA:e,leftA:t,topB:i.top,leftB:i.left,chartWidth:r,chartHeight:a,hidden:n,description:(0,s.jsx)(It,{intlDateTimeFormat:d,timestamp:c,download_bps:u,upload_bps:A}),innerColor:o,tooltipRenderCondition:l}),Mt=(0,E.A)(D.A)`
  gap: ${P.YC};
  flex-wrap: wrap;
  margin-top: ${P.Yc};
`,St=(0,E.A)(D.A)`
  align-items: center;
  gap: ${P.YC};
  white-space: nowrap;
  &:not(:last-child) {
    margin-right: ${P.xO};
  }
`,Rt={[rt.DOWNLOAD]:{labelId:"COMMON_DOWNLOAD",legend:(0,s.jsx)(ct,{})},[rt.UPLOAD]:{labelId:"COMMON_UPLOAD",legend:(0,s.jsx)(ut,{})}},gt=()=>(0,s.jsx)(Mt,{children:At.map(e=>(({labelId:t,legend:i})=>(0,s.jsxs)(St,{children:[i,(0,s.jsx)(M.A,{size:"small",color:"text-2",children:(0,s.jsx)(N.sA,{id:t})})]},e))(Rt[e]))}),Nt=({[x.iD.SPEED_TESTS]:e})=>{const{formatMessage:t}=(0,N.tz)(),{themeName:i}=(0,S.u)(),{ref:r,width:a=0}=(0,R.A)(),n=(0,o.useRef)(null),l=(0,o.useRef)(_t),{[ae.TOOLTIP_INTL_DATE_TIME_FORMAT]:d,[ae.ISP_PERIOD]:c,[ae.ISP_SPEED_TEST_FIRST_TIMESTAMP]:u,[ae.ISP_SPEED_TEST_LAST_TIMESTAMP]:A,[ae.ISP_PERIOD_INTL_DATE_TIME_FORMAT_MAP]:_}=(0,o.useContext)(ne),{downloadData:m,uploadData:h,highestDownloadValue:p,highestUploadValue:T}=(0,o.useMemo)(()=>{const t=[],i=[];let r=0,a=0;for(let n=0;n<e.length;n+=1){const{[x.Tj.TIMESTAMP]:s,[x.Tj.DOWNLOAD_BPS]:o=0,[x.Tj.UPLOAD_BPS]:l=0}=e[n];t.push({x:s,y:o,custom:{[at.DOWNLOAD_BPS]:o,[at.UPLOAD_BPS]:l}}),r=Math.max(r,o||0),i.push({x:s,y:l}),a=Math.max(a,l||0)}return{downloadData:t,uploadData:i,highestDownloadValue:r,highestUploadValue:a}},[e]),I=(0,o.useMemo)(()=>Math.max(p,T),[p,T]),M=(0,o.useMemo)(()=>(0,nt.cS)(I,"bitrate","SI"),[I]),O=(0,o.useCallback)((e,t,i)=>0===i?M.unit:(e=>0===e?String(t):Number.isInteger(e)?e:Number.isFinite(e)?e.toFixed(1):e)((0,nt.cS)(+e,"bitrate","SI",M.power).value),[M.unit,M.power]),E=(0,o.useMemo)(()=>(0,g.Y)(I>120?I+.1*I:120,7).map(({value:e,label:t},i)=>({value:e,label:O(e,t,i)})),[I,O]),D=(0,o.useCallback)((e,i,r)=>i+1===r?t({id:"COMMON_NOW"}):i%2==0?_[c].format(e):void 0,[c,_,t]),P=(0,o.useMemo)(()=>(0,g.v)([u,A],7).map((e,t,i)=>({value:e,label:D(e,t,i.length)})),[u,A,D]),f=(0,o.useCallback)(e=>e===rt.DOWNLOAD,[]),j=(0,o.useCallback)(({top:e,left:t,hidden:r,x:n,y:o,custom:{[at.DOWNLOAD_BPS]:c=0,[at.UPLOAD_BPS]:u=0}={}},A)=>{const _=f(A);return _&&(l.current={value:o,left:t,top:e}),(0,s.jsx)(Ct,{top:e,left:t,tooltipProps:l.current,chartWidth:a,chartHeight:180,hidden:r,innerColor:st(A,i),tooltipRenderCondition:_,intlDateTimeFormat:d,timestamp:n,download_bps:c,upload_bps:u})},[i,d,a,f]),v=(0,o.useCallback)(({getCoordinates:e,mouseData:t,maxY:i,yAxisMax:r,yAxisMin:a,chartHovered:o})=>(0,s.jsx)(mt,{data:m,maxY:i,mouseData:t,getCoordinates:e,yAxisMax:r,yAxisMin:a,ispSpeedTestGraphType:rt.DOWNLOAD,showTooltip:o,renderTooltip:j,tooltipPortal:n.current||void 0}),[m,j]),L=(0,o.useCallback)(({getCoordinates:e,mouseData:t,maxY:i,yAxisMax:r,yAxisMin:a,chartHovered:o})=>(0,s.jsx)(mt,{data:h,ispSpeedTestGraphType:rt.UPLOAD,maxY:i,mouseData:t,getCoordinates:e,yAxisMax:r,yAxisMin:a,renderTooltip:j,showTooltip:o,tooltipPortal:n.current||void 0}),[h,j]),b=(0,o.useCallback)((e,t,i,r,a,n,o,l,d,c)=>(0,s.jsxs)(s.Fragment,{children:[v({getCoordinates:e,mouseData:t,maxY:i,yAxisMax:n,yAxisMin:o,chartHovered:c}),L({getCoordinates:e,mouseData:t,maxY:i,yAxisMax:n,yAxisMin:o,chartHovered:c})]}),[v,L]);return(0,s.jsxs)(ot,{ref:r,children:[(0,s.jsxs)(lt,{children:[(0,s.jsx)(C.A,{yAxis:E,xAxis:P,width:a,height:180,margin:re,children:b}),(0,s.jsx)("div",{ref:n})]}),(0,s.jsx)(gt,{})]})};var Ot=i(969288),Et=i(502129),Dt=i(43506),Pt=i(715320);const ft=(0,E.A)(D.A)`
  margin: ${P.xO} 0 ${P.kc} 0;
`,jt=(0,o.memo)(()=>{const e=(0,Dt.A)(`${Ot.wE}?${Pt.Qj}`);return(0,s.jsx)(ft,{children:(0,s.jsx)(Et.A,{to:e,children:(0,s.jsx)(M.A,{color:"inherit",size:"medium",children:(0,s.jsx)(N.sA,{id:"ISP_SPEED_TEST_SETTINGS"})})})})});var vt,Lt=i(372261);!function(e){e.DATE="date",e.DOWNLOAD="download",e.UPLOAD="upload"}(vt||(vt={}));const bt=e=>(0,s.jsx)(N.sA,{id:wt[e]});var yt=i(119425);const wt={[vt.DATE]:"COMMON_DATE",[vt.DOWNLOAD]:"COMMON_DOWNLOAD",[vt.UPLOAD]:"COMMON_UPLOAD"},Bt={[vt.DATE]:e=>bt(e),[vt.DOWNLOAD]:e=>bt(e),[vt.UPLOAD]:e=>bt(e)},kt={[vt.DATE]:{size:140,minSize:140,maxSize:1/0},[vt.DOWNLOAD]:{size:100,minSize:100,maxSize:1/0},[vt.UPLOAD]:{size:80,minSize:80,maxSize:1/0}},Gt={[vt.DATE]:({[x.Tj.TIMESTAMP]:e})=>(0,s.jsx)(Ne.A,{size:"medium",children:(0,s.jsx)(yt.A,{date:new Date(e)})}),[vt.DOWNLOAD]:({[x.Tj.DOWNLOAD_BPS]:e})=>(0,s.jsx)(Ne.A,{size:"medium",color:"traffic-down",children:(0,ht.zX)(e)}),[vt.UPLOAD]:({[x.Tj.UPLOAD_BPS]:e})=>(0,s.jsx)(Ne.A,{size:"medium",color:"traffic-up",children:(0,ht.zX)(e)})},Ht={[vt.DATE]:({[x.Tj.TIMESTAMP]:e})=>e,[vt.DOWNLOAD]:({[x.Tj.DOWNLOAD_BPS]:e})=>e,[vt.UPLOAD]:({[x.Tj.UPLOAD_BPS]:e})=>e},Yt=Object.values(vt);var $t=i(594005);const Wt=e=>e,Ft=({header:{id:e}})=>Bt[e](e),zt=e=>kt[e],Vt=({column:{id:e},getValue:t})=>Gt[e](t()),Ut=Yt.map(e=>{return{id:e,accessorFn:Wt,header:Ft,cell:Vt,...zt(e),compare:(t=e,(0,$t.l0)(e=>Ht[t](e))),enableResizing:!1,enableSorting:!0};var t});var Kt=i(565527);const Qt=(0,E.A)(D.A)`
  flex-direction: column;
  max-height: 320px;
  overflow: auto;
  thead {
    background: ${({theme:{themeName:e}})=>f.Ay[e===Kt.S.DARK?"desktop-color-neutral-01-dark":"desktop-color-neutral-00-light"]};
  }
`,Xt={id:vt.DATE,isAscending:!1},qt=({[x.iD.SPEED_TESTS]:e})=>(0,s.jsx)(Qt,{children:(0,s.jsx)(Lt.A,{data:e,columns:Ut,width:"100%",stickyHeader:!0,sorting:Xt})}),Zt=(0,o.memo)(({[x.iD.SPEED_TESTS]:e})=>{const t=(0,o.useMemo)(()=>[{id:"speed-tests",label:(0,s.jsx)(N.sA,{id:"ISP_SPEED_TESTS"}),openByDefault:!0,renderContent:()=>(0,s.jsx)(it,{children:e.length?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Nt,{speed_tests:e}),(0,s.jsx)(jt,{}),(0,s.jsx)(qt,{speed_tests:e})]}):(0,s.jsx)(M.A,{color:"text-3",size:"medium",children:(0,s.jsx)(N.sA,{id:"ISP_NO_SPEED_TESTS"})})})}],[e]);return(0,s.jsx)(I.A,{type:I.I.ACCORDION,items:t})});var Jt=i(999633),ei=i(205521),ti=i(449339);const ii={maxHeight:"calc(100vh - 245px)",minHeight:0,overflowX:"hidden",scrollbarGutter:"stable",width:"100%"};var ri=i(266824),ai=i(756893),ni=i(130682),si=i(576111);const oi=({index:e,ispLogs:t,style:i,theme:r,onClick:a})=>{const n=t[e];return(0,s.jsx)("div",{style:i,children:(0,s.jsx)(ai.A,{dotColor:f.Ay[`desktop-color-${ni.fh[n.severity]}-${r}`],timestamp:n.timestamp,content:(0,s.jsx)(si.A,{log:n}),footer:(0,s.jsx)(ri.A,{type:"button",fontSize:"small",onClick:a(n.id),children:(0,s.jsx)(N.sA,{id:"ISP_REVIEW"})})})},n.id)},li=(0,E.A)(D.A)`
  max-height: 296px;
`,di=(0,o.memo)(({[Ke.c.LOGS]:e})=>{const{themeName:t}=(0,S.u)(),i=(0,c.wA)(),r=(0,o.useCallback)(e=>()=>{i((0,ei.XP)({type:ti.H.LOG,id:e}))},[i]),{logsKey:a,rowProps:n}=(0,o.useMemo)(()=>({logsKey:e.map(({id:e})=>e).join(","),rowProps:{ispLogs:e,theme:t,onClick:r}}),[e,t,r]),l=(0,Jt.gr)({defaultRowHeight:120,key:a}),d=(0,o.useMemo)(()=>[{id:"ispLogs",label:(0,s.jsx)(N.sA,{id:"ISP_INTERNET_EVENT_LOGS"}),openByDefault:!0,renderContent:()=>(0,s.jsx)(li,{children:e.length?(0,s.jsx)(Jt.B8,{defaultHeight:120,overscanCount:3,rowComponent:oi,rowCount:e.length,rowHeight:l,rowProps:n,style:ii}):(0,s.jsx)(M.A,{color:"text-3",size:"medium",children:(0,s.jsx)(N.sA,{id:"ISP_NO_LOGS"})})})}],[e,l,n]);return(0,s.jsx)(I.A,{type:I.I.ACCORDION,items:d})}),ci=(0,o.memo)(({[A.p5.ISP]:e,[A.p5.TYPE]:t,[u.G.HISTORY]:i=[],[x.iD.SPEED_TESTS]:r=[],[Ke.c.LOGS]:a=[]})=>{const n=(0,c.d4)(_.zi),l=(0,c.d4)(m.hq),d=(0,c.d4)(h.BQ),I=(0,c.d4)(h.jc),C=(0,c.d4)(Je.U),{interval:M,firstHistoryTimestamp:S,lastHistoryTimestamp:R,firstSpeedTestTimestamp:g,lastSpeedTestTimestamp:N}=(0,o.useMemo)(()=>{const e=i[0]?.timestamp||0,t=i.at(-1)?.timestamp||0;return{interval:(i[1]?.timestamp||0)-(i[0]?.timestamp||0),firstHistoryTimestamp:e,lastHistoryTimestamp:t,firstSpeedTestTimestamp:Math.min(r[0]?.timestamp||0,e),lastSpeedTestTimestamp:Math.max(r.at(-1)?.timestamp||0,t)}},[i,r]),O=(0,o.useMemo)(()=>M===5*p.ti&&C===T.a.HOUR?T.a.HOUR:M===5*p.ti&&C===T.a.DAY?T.a.DAY:M===p.$_&&C===T.a.WEEK?T.a.WEEK:M===p.jU&&C===T.a.MONTH?T.a.MONTH:T.a.HOUR,[M,C]),E=(0,o.useMemo)(()=>({[ae.TOOLTIP_INTL_DATE_TIME_FORMAT]:new Intl.DateTimeFormat(n,{timeZone:l,hourCycle:d,hour:"numeric",minute:"numeric",day:"numeric",month:"short"}),[ae.ISP_PERIOD]:O,[ae.ISP_INTERVAL]:M,[ae.ISP_HISTORY_FIRST_TIMESTAMP]:S,[ae.ISP_HISTORY_LAST_TIMESTAMP]:R,[ae.ISP_SPEED_TEST_FIRST_TIMESTAMP]:g,[ae.ISP_SPEED_TEST_LAST_TIMESTAMP]:N,[ae.ISP_PERIOD_INTL_DATE_TIME_FORMAT_MAP]:{[T.a.HOUR]:new Intl.DateTimeFormat(n,{timeZone:l,hourCycle:d,hour:"numeric",minute:"2-digit"}),[T.a.DAY]:new Intl.DateTimeFormat(n,{timeZone:l,hourCycle:d,hour:"numeric",...I&&{minute:"numeric"}}),[T.a.WEEK]:new Intl.DateTimeFormat(n,{timeZone:l,hourCycle:d,weekday:"short"}),[T.a.MONTH]:new Intl.DateTimeFormat(n,{timeZone:l,hourCycle:d})}}),[n,l,d,I,O,M,S,R,g,N]);return(0,s.jsx)(ne.Provider,{value:E,children:(0,s.jsxs)(Ue,{children:[t===A.c9.MBB?(0,s.jsx)(de,{history:i,children:(0,s.jsx)(tt,{titleId:"COMMON_CELLULAR_SIGNAL"})}):null,(0,s.jsx)(Ve,{history:i,isp:e,type:t,children:t===A.c9.WIRED?(0,s.jsx)(tt,{titleId:"COMMON_INTERNET_QUALITY"}):null}),(0,s.jsx)(Zt,{speed_tests:r}),(0,s.jsx)(di,{logs:a})]})})},d()),ui=({activeItem:{[Ke.c.OVERVIEW]:{[A.p5.ISP]:e,[A.p5.TYPE]:t},[Ke.c.HISTORY]:{[u.G.HISTORY]:i=[]},[Ke.c.SPEED_TESTS]:{[x.iD.SPEED_TESTS]:r=[]},[Ke.c.LOGS]:a=[]}})=>(0,s.jsx)(ci,{isp:e,type:t,history:i,speed_tests:r,logs:a})},808601(e,t,i){i.d(t,{A:()=>I});var r=i(274934),a=i(761047),n=i(141651),s=i(247816),o=i(100978),l=i(291508);const d=(0,s.A)(o.A,(0,l.A)("innerColor","outerColor"))`
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  pointer-events: none;
  g {
    transition: unset;
  }
  circle {
    &:first-child {
      ${({outerColor:e})=>e?`fill: ${e};`:""}
    }
    &:last-child {
      ${({innerColor:e})=>e?`fill: ${e};`:""}
      r: 4.5;
    }
  }
`,c=i(409844).AH`
  overflow: visible;
`,u=({chartWidth:e,chartHeight:t,top:i,left:a,innerColor:s,outerColor:o="#fff"})=>(0,r.jsx)(d,{innerColor:s,outerColor:o,children:(0,r.jsx)("svg",{width:e,height:t,className:c,children:a&&i?(0,r.jsx)(n.A,{hasAnimation:!1,x:a,y:i}):null})});var A=i(505817);const _=[20,10,30,50],m=(0,s.A)(o.A,(0,l.A)("topA","topB","leftA","leftB","chartHeight","useFullHeightConnector","chartMargin"))`
  z-index: 1;
  border-left: 1px dashed
    ${({theme:{themeName:e}})=>A.Ay[`desktop-color-neutral-10-${e}`]};
  position: absolute;
  ${({topA:e,topB:t,leftA:i,leftB:r,chartHeight:a,useFullHeightConnector:n,chartMargin:s})=>`\n     top: ${n&&a?20-(s?(_?.[0]||0)-(s?.[0]||0):0):Math.min(e||0,t)}px;\n     height: ${n&&a?a-(50-(s?(_?.[0]||0)-(s?.[0]||0)+((_?.[2]||0)-(s?.[2]||0)):0)):Math.max(e||0,t)-Math.min(e||0,t)}px;\n     left: ${((i||0)+r)/2-1}px;\n   `}
`,h=({topA:e,leftA:t,topB:i,leftB:a,chartHeight:n,useFullHeightConnector:s,chartMargin:o})=>(0,r.jsx)(m,{topA:e,topB:i,leftA:t,leftB:a,chartHeight:n,useFullHeightConnector:s,chartMargin:o}),p=(e,t,i)=>i?(e||0)+((e||0)<Math.round(t/2)?8:-8):(e||0)-8,x=(e,t)=>((e||0)+(t||0))/(t?2:1),T=(e,t,i,r)=>({maxWidth:"auto",...!r?.position&&i&&e&&t&&{position:e<Math.round(t/2)?"right":"left"},portal:!0,...r}),I=({width:e=258,topA:t,leftA:i,topB:n,leftB:s,chartWidth:o,chartHeight:l,hidden:d,description:c,innerColor:A,tooltipRenderCondition:_,tooltipProps:m={},useSideSwapping:I=!0,useFullHeightConnector:C=!1,chartMargin:M})=>d?null:(0,r.jsxs)(r.Fragment,{children:[_?(0,r.jsx)(a.A,{width:e,left:p(i,o,I),top:x(t,n),description:c,hidden:d,topMargin:4,tooltipProps:T(i,o,I,m)}):null,s&&n?(0,r.jsx)(h,{topA:t,topB:n,leftA:i,leftB:s,chartHeight:l,useFullHeightConnector:C,chartMargin:M}):null,(0,r.jsx)(u,{chartWidth:o,chartHeight:l,top:t,left:i,innerColor:A})]})},521376(e,t,i){var r;i.d(t,{U:()=>r}),function(e){e.ARROW_LEFT="ArrowLeft",e.ARROW_RIGHT="ArrowRight",e.ARROW_DOWN="ArrowDown",e.ARROW_UP="ArrowUp",e.ENTER="Enter",e.ESCAPE="Escape",e.BACKSPACE="Backspace",e.DELETE="Delete",e.TAB="Tab"}(r||(r={}))},239875(e,t,i){i.d(t,{A:()=>n});var r=i(602086);function a(e,t,i){return e[t]?e[t][0]?e[t][0][i]:e[t][i]:"contentBoxSize"===t?e.contentRect["inlineSize"===i?"width":"height"]:void 0}const n=function(e={}){const t=e.onResize,i=(0,r.useRef)(void 0);i.current=t;const n=e.round||Math.round,s=(0,r.useRef)(void 0),[o,l]=(0,r.useState)({width:void 0,height:void 0}),d=(0,r.useRef)(!1);(0,r.useEffect)(()=>(d.current=!1,()=>{d.current=!0}),[]);const c=(0,r.useRef)({width:void 0,height:void 0}),u=function(e,t){const i=(0,r.useRef)(null),a=(0,r.useRef)(null);a.current=t;const n=(0,r.useRef)(null),s=(0,r.useCallback)(()=>{const t=a.current,r=n.current||(t?t instanceof Element?t:t.current:null);i.current&&i.current.element===r&&i.current.subscriber===e||(i.current&&i.current.cleanup&&i.current.cleanup(),i.current={element:r,subscriber:e,cleanup:r?e(r):void 0})},[e]);return(0,r.useEffect)(()=>{s()},[s]),(0,r.useEffect)(()=>()=>{i.current&&i.current.cleanup&&(i.current.cleanup(),i.current=null)},[]),(0,r.useCallback)(e=>{n.current=e,s()},[s])}((0,r.useCallback)(t=>(s.current&&s.current.box===e.box&&s.current.round===n||(s.current={box:e.box,round:n,instance:new ResizeObserver(t=>{const r=t[0],s="border-box"===e.box?"borderBoxSize":"device-pixel-content-box"===e.box?"devicePixelContentBoxSize":"contentBoxSize",o=a(r,s,"inlineSize"),u=a(r,s,"blockSize"),A=o?n(o):void 0,_=u?n(u):void 0;if(c.current.width!==A||c.current.height!==_){const e={width:A,height:_};c.current.width=A,c.current.height=_,i.current?i.current(e):d.current||l(e)}})}),s.current.instance.observe(t,{box:e.box}),()=>{s.current&&s.current.instance.unobserve(t)}),[e.box,n]),e.ref);return(0,r.useMemo)(()=>({ref:u,width:o.width,height:o.height}),[u,o.width,o.height])}},372261(e,t,i){i.d(t,{A:()=>x});var r,a,n,s,o,l=i(274934),d=i(602086);!function(e){e.TABLE="table"}(r||(r={})),function(e){e.ROW_ID_MAP_BY_INDEX="rowIdMapByIndex",e.INDEX_MAP_BY_ROW_ID="indexMapByRowId"}(a||(a={})),function(e){e.ON_KEY_DOWN="onKeyDown",e.INCOMING_ROW_PROPS="incomingRowProps",e.HAS_ON_ROW_CLICK="hasOnRowClick"}(n||(n={})),function(e){e.INCOMING_ON_ROW_CLICK="incomingOnRowClick",e.LOCAL_CURRENT_INDEX="localCurrentIndex"}(s||(s={})),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"}(o||(o={}));var c=i(199244),u=i(202730),A=i(147045);var _=i(521376);const m=e=>e?.children?.[1]?.children;var h=i(884144);const p=(0,i(247816).A)(h.A)`
  tr {
    outline: none;
  }
`,x=({data:e=[],rowProps:t,onRowClick:i,...h})=>{const x=(0,d.useRef)(null),T=(0,d.useRef)(null),{[a.ROW_ID_MAP_BY_INDEX]:I,[a.INDEX_MAP_BY_ROW_ID]:C}=(({[r.TABLE]:e})=>{const[t,i]=(0,d.useState)(()=>e?m(e):void 0);(0,d.useEffect)(()=>{e&&i(m(e))},[e]);const{[a.ROW_ID_MAP_BY_INDEX]:n,[a.INDEX_MAP_BY_ROW_ID]:s}=(0,d.useMemo)(()=>{const e=new Map,i=new Map,r=t?.length;if(t&&r)for(let a=0;a<r;a+=1){const r=t[a].getAttribute(c.i);r&&(e.set(r,a),i.set(a,r))}return{[a.ROW_ID_MAP_BY_INDEX]:e,[a.INDEX_MAP_BY_ROW_ID]:i}},[t]);return{[a.ROW_ID_MAP_BY_INDEX]:n,[a.INDEX_MAP_BY_ROW_ID]:s}})({[r.TABLE]:x.current}),M=(e=>{const t=(0,d.useRef)(new Map),i=(0,d.useRef)(void 0);if(i.current!==e){i.current=e,t.current.clear();const r=e.length;for(let i=0;i<r;i+=1)t.current.set(e[i].id,e[i])}return t})(e),S=(({[o.DATA_MAP_REFERENCE]:e,[o.ROW_ID_MAP_BY_INDEX]:t,[o.INDEX_MAP_BY_ROW_ID]:i,[o.INCOMING_ON_ROW_CLICK]:r,[o.LOCAL_CURRENT_INDEX]:a,[o.MULTI_SELECT_MODE]:n})=>{const s=(0,d.useCallback)(e=>{e.preventDefault()},[]),l=(0,d.useCallback)(()=>{const t=e.current.get(i.get(a.current+1));t&&(r?.(t),a.current+=1)},[i,a,r,e]),c=(0,d.useCallback)(()=>{const t=e.current.get(i.get(a.current-1));t&&(r?.(t),a.current-=1)},[i,a,r,e]);return(0,d.useCallback)((e,{id:i})=>e=>{if(!n&&r){const r=t.get(i);if(Number.isFinite(r))switch(null===a.current&&(a.current=r),e.key){case _.U.ARROW_DOWN:s(e),l();break;case _.U.ARROW_UP:s(e),c()}}},[r,a,n,s,t,l,c])})({[o.DATA_MAP_REFERENCE]:M,[o.ROW_ID_MAP_BY_INDEX]:I,[o.INDEX_MAP_BY_ROW_ID]:C,[o.INCOMING_ON_ROW_CLICK]:i,[o.LOCAL_CURRENT_INDEX]:T,[o.MULTI_SELECT_MODE]:h.multiSelectMode}),R=(({[n.INCOMING_ROW_PROPS]:e,[n.ON_KEY_DOWN]:t,[n.HAS_ON_ROW_CLICK]:i})=>(0,d.useCallback)((r,a)=>({...i?{[A.L]:u.b.SIDE_PANEL_TRIGGER}:{},...e?.(r,a),[c.i]:r.id,tabIndex:0,onKeyDown:t(r,a)}),[e,t,i]))({[n.INCOMING_ROW_PROPS]:t,[n.ON_KEY_DOWN]:S,[n.HAS_ON_ROW_CLICK]:Boolean(i)}),g=(({[s.INCOMING_ON_ROW_CLICK]:e,[s.LOCAL_CURRENT_INDEX]:t})=>{const i=(0,d.useCallback)(i=>{t.current=null,e?.(i)},[e,t]);return e?i:void 0})({[s.INCOMING_ON_ROW_CLICK]:i,[s.LOCAL_CURRENT_INDEX]:T});return(0,l.jsx)(p,{ref:x,data:e,rowProps:R,onRowClick:g,tableHeight:e.length?"100%":void 0,virtualize:!0,virtualizeColumn:!0,overscan:7,overscanColumn:1,stickyHeader:!0,...h})}},199244(e,t,i){i.d(t,{i:()=>r});const r="data-row-id"},927027(e,t,i){i.d(t,{Y:()=>a,v:()=>n});var r=i(752572);const a=(e,t,i=!1)=>{const a=t-1;let n=Math.ceil(e);if(Number.isNaN(n))return[];const s=n%a;return 0!==s&&(n+=a-s),(0,r.A)(t,e=>{return{value:t=e?Math.ceil(e*(n/a)):0,label:i?e%2==0&&String(t)||null:String(t)};var t}).reverse()},n=(e,t)=>{const[i]=e,r=[i],a=e.length-1;for(let i=1;i<t-1;i+=1){const n=i*a/(t-1),s=Math.floor(n).toFixed();r[i]=Math.round(e[s]+(e[Math.ceil(n).toFixed()]-e[s])*(+n-+s))}return r[t-1]=e[a],r}}}]);