"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[3920],{764900:(e,t,n)=>{n.r(t),n.d(t,{default:()=>cl});var l=n(296540),a=n(469733),o=n(956347),c=n(530864),r=n(83344),i=n(592510),s=n(627440),E=n(860923),u=n(745667),m=n(328403),A=n(765268),d=n(457311),_=n(634229),C=n(632169),I=n(582724),O=n(413357),N=n(984652),T=n(834959),S=n(171073),D=n(532419),M=n(126457),p=n(6510);const h=({device:{name:e,model:t,mac:n,upgrade_to_firmware:o},history:c,location:r})=>{const i=(0,a.useDispatch)(),s=(0,l.useCallback)(()=>{c.push(r.pathname.split("/device-upgrade")[0]),i((0,M.AS)())},[c,r.pathname,i]),E=(0,l.useMemo)(()=>(0,p.Q)({name:e,mac:n,model:t}),[e,n,t]),u=(0,l.useCallback)(()=>{i((0,S.xv)({titleValues:{deviceName:E},messageValues:{deviceName:E,toVersion:o},onConfirm:()=>{i((0,S.Pv)(n,E))},onCancel:()=>{s()}}))},[o,n,E,i,s]);return(0,l.useEffect)(()=>(o?u():s(),()=>{s()}),[]),null},g=({history:e,location:t,match:n})=>{const o=(0,a.useSelector)((0,l.useMemo)(()=>(0,D._i)(n.params.id),[n.params.id]));return o?l.createElement(h,{device:o,history:e,location:t,match:n}):null};var f=n(845030),R=n(413786),b=n(249304),v=n(262086),U=n(606388),P=n(601021),V=n(398300),L=n(855019),y=n(635749),B=n(775699),F=n(380584),k=n(197562),w=n(387098),x=n(816271),Y=n(962315),G=n(778851),z=n(187483),W=n(801081),H=n(189601),$=n(211368),K=n(602197);const q=(0,H.WY)()((0,W.Mz)(D.ID,e=>{const t=[],n=e.length;for(let l=0;l<n;l+=1){const{state:n,mac:a}=e[l];$.q[n]===K.g.UPGRADING&&t.push(a)}return t}),e=>e);var j=n(293547);const X=()=>{const e=(0,a.useSelector)(q),t=(0,a.useSelector)(z.W1),n=(0,a.useSelector)(z.YL),o=(0,a.useSelector)(z.TP),c=(0,a.useSelector)(D.bc);(0,l.useEffect)(()=>{if(c){const l=(0,G.ns)(t,n,o);(0,j.UM)((0,Y.A)((0,j.sQ)(l),e),l)}},[c,e,t,n,o])};var Q=n(862296),J=n(959341),Z=n(105540),ee=n(604482),te=n(200826),ne=n(459449),le=n(737509),ae=n(566723),oe=n(71479),ce=n(837612),re=n(602021),ie=n(294303),se=n(902923),Ee=n(598274);const ue=(0,oe.A)("div")`
  position: absolute;
  top: -${ae.xO};
  bottom: -${ae.xO};
  left: calc(100% - 400px); /* The restart confirm dialog width */
  right: 0;
`,me=(0,oe.A)("div")`
  z-index: 1;
`,Ae=(0,l.memo)(({mac:e})=>{const t=(0,a.useSelector)((0,l.useMemo)(()=>(0,D.tG)(e),[e])),[n,o]=(0,l.useState)(!1);return l.createElement(ie.A,{padding:ae.YC,gap:ae.kc,position:"relative",onMouseLeave:n?()=>o(!1):void 0},l.createElement(me,null,l.createElement(Ee.A,{device:t})),l.createElement(me,null,l.createElement(se.i,{device:t,isConfirmOpen:n,setIsConfirmOpen:o})),n?l.createElement(ue,null):null)}),de=({rowId:e})=>l.createElement(Ae,{mac:e}),_e=e=>e.product_line===R.p1.NETWORK&&(0,ce.YP)(e)?{...e,_rowHoverContent:de}:e,Ce=e=>(0,a.useSelector)(re.EL)?e:e.map(_e);var Ie=n(432589),Oe=n(927099),Ne=n(29896),Te=n(318787);const Se=n(984297).E,De={overflow:"visible",padding:"0px"};var Me=n(815297),pe=n(415246);const he=[v.o$.STATUS_BALL,v.o$.TYPE,v.o$.NAME],ge=Me.W2[pe.xz.TABLES][b.l.UNIFI_DEVICE].columns,fe=(0,oe.A)("div")`
  &:not(:first-child) {
    margin-top: ${ae.Ln};
  }
  table {
    margin-top: ${ae.Ln};
  }
`,Re=({tableType:e,icon:t,header:n,data:a,columns:o,columnVisibility:c,activeRows:r,onRowClick:i,onColumnDrop:s})=>{const E=(0,l.useRef)(null),[u,m]=(0,Ne.A)(e),[A,d]=(0,Te.A)(e);return a.length?l.createElement(fe,{ref:E},l.createElement(ie.A,{alignItems:"center",position:"sticky",left:0,width:"fit-content"},t||null,l.createElement(Oe.A,{size:"body",color:"tertiary"},n)),l.createElement(Ie.A,{className:Se,data:a,columns:o,rowStyle:ae.gc,columnVisibility:c,columnPinningLeftState:he,onRowClick:i,activeRows:r,onColumnSizingChange:m,initialColumnSize:u,onSort:d,sorting:A,virtualize:!0,parentRef:E,columnDnD:!0,staticDnD:he,onColumnDrop:s,tableHeight:"100%",virtualizeColumn:!0,overscanColumn:1})):null},be={style:{marginRight:ae.xO},variant:"bgRoundedSquare",size:"large"},ve={[b.l.UNIFI_DEVICE_NETWORK]:{icon:(0,l.createElement)(le.m8[R.p1.NETWORK],be)},[b.l.UNIFI_DEVICE_PROTECT]:{icon:(0,l.createElement)(le.m8[R.p1.PROTECT],be)},[b.l.UNIFI_DEVICE_TALK]:{icon:(0,l.createElement)(le.m8[R.p1.TALK],be)},[b.l.UNIFI_DEVICE_ACCESS]:{icon:(0,l.createElement)(le.m8[R.p1.ACCESS],be)},[b.l.UNIFI_DEVICE_CONNECT]:{icon:(0,l.createElement)(le.m8[R.p1.CONNECT],be)},[b.l.UNIFI_DEVICE_APOLLO]:{icon:(0,l.createElement)(le.m8[R.p1.APOLLO],be)},[b.l.UNIFI_DEVICE_DRIVE]:{icon:(0,l.createElement)(le.m8[R.p1.DRIVE],be)},[b.l.UNIFI_DEVICE_UNMANAGED]:{}},Ue=Object.keys(ve),Pe=({columnVisibility:e,columns:t,activeRows:n,onRowClick:o,onColumnDrop:c})=>{const r=(0,a.useSelector)(F.Q9),i=(0,a.useSelector)(F.L_),s=(0,a.useSelector)(F.mw),E=(0,a.useSelector)(F.yQ),u=(0,a.useSelector)(F.AL),m=(0,a.useSelector)(F.Jz),A=(0,a.useSelector)(F.WT),d=(0,a.useSelector)(F.gi),_=Ce(r),C={[b.l.UNIFI_DEVICE_NETWORK]:_,[b.l.UNIFI_DEVICE_PROTECT]:i,[b.l.UNIFI_DEVICE_TALK]:s,[b.l.UNIFI_DEVICE_ACCESS]:E,[b.l.UNIFI_DEVICE_CONNECT]:u,[b.l.UNIFI_DEVICE_APOLLO]:m,[b.l.UNIFI_DEVICE_DRIVE]:A,[b.l.UNIFI_DEVICE_UNMANAGED]:d},I=(0,l.useMemo)(()=>t.filter(({id:e})=>e!==v.o$.APPLICATION),[t]);return l.createElement(l.Fragment,null,Ue.map(t=>l.createElement(Re,{tableType:t,key:t,icon:ve[t].icon,header:t!==b.l.UNIFI_DEVICE_UNMANAGED?l.createElement(ne.sA,{id:"UNIFI_NUMBER_OF_DEVICES",values:{number:C[t].length}}):l.createElement(ne.sA,{id:"UNIFI_DEVICE_HEADER_UNIFI_UNMANAGED"}),data:C[t],columns:I,columnVisibility:e,activeRows:n,onRowClick:o,onColumnDrop:c})))};var Ve=n(269672),Le=n(838738),ye=n(758649),Be=n(881716),Fe=n(458973),ke=n(59308),we=n(684342),xe=n(674638),Ye=n(760980);const Ge=({searchTags:e,hasAnyDevice:t,handleSearchReset:n,handleResetDisplayOptions:a})=>{switch(!0){case Boolean(e.length):return l.createElement(Be.A,{icon:l.createElement(Le.A,{variant:"fill"}),title:l.createElement(ne.sA,{id:"COMMON_NO_MATCH"}),description:l.createElement(ne.sA,{id:"DEVICE_EMPTY_SEARCH_NO_DEVICES_DETAILS",values:{button:l.createElement(ye.A,{type:"button",variant:"inline",onClick:n},l.createElement(ne.sA,{id:"COMMON_REMOVE_FILTERS_BUTTON_TEXT"}))}})});case t:return l.createElement(Be.A,{icon:l.createElement(Le.A,{variant:"fill"}),title:l.createElement(ne.sA,{id:"COMMON_NO_MATCH"}),description:l.createElement(ne.sA,{id:"DEVICE_EMPTY_FILTER_NO_DEVICES_DETAILS",values:{button:l.createElement(ye.A,{type:"button",variant:"inline",onClick:a},l.createElement(ne.sA,{id:"COMMON_RESET_THEM_BUTTON_TEXT"}))}})});default:return l.createElement(Be.A,{title:l.createElement(ne.sA,{id:"COMMON_NO_DEVICES_TITLE"}),description:l.createElement(ne.sA,{id:"COMMON_NO_DEVICES_DETAILS"})})}},ze=({hasAnyDeviceSelector:e,searchModelName:t})=>{const n=(0,a.useSelector)(e),o=(0,a.useSelector)((0,l.useMemo)(()=>(0,ke.f)(t),[t])),c=(0,a.useDispatch)(),r=(0,l.useCallback)(()=>{c(e=>{e((0,Ye.D6)(xe.R));const t={[b.l.UNIFI_DEVICE]:{columnSize:we.l[b.l.UNIFI_DEVICE],initialColumns:v.GO}};we.t.forEach(e=>{t[e]={columnSize:we.l[b.l.UNIFI_DEVICE]}}),e((0,B.zF)(t))})},[c]),i=(0,l.useCallback)(()=>{const e=document.querySelector("input[role=combobox]");e&&e.focus(),c((0,Fe.sV)(t))},[c,t]);return l.createElement(ie.A,{width:"100%",flexDirection:"column"},l.createElement(Ge,{searchTags:o,hasAnyDevice:n,handleSearchReset:i,handleResetDisplayOptions:r}))},We=(0,oe.A)("div")`
  width: 100%;
  table {
    position: relative;
    &:after {
      content: '';
      display: block;
      position: absolute;
      right: -16px;
      width: 16px;
      height: 1px;
    }
  }
`,He=({children:e,className:t})=>l.createElement(We,{className:t},e),$e=(0,oe.A)(ie.A)`
  justify-content: center;
  align-items: center;
  margin: ${ae.vl} auto 0;
  > div {
    position: absolute;
  }
`,Ke=(0,l.memo)(()=>l.createElement(ie.A,{height:"100%",padding:`${ae.Ln} ${ae.Ln} ${ae.S2}`,overflow:"auto",flexDirection:"column"},l.createElement(He,null,l.createElement(Ie.A,{data:[],columns:(0,y.D)()})),l.createElement($e,null,l.createElement(ze,{hasAnyDeviceSelector:F.yW,searchModelName:Ve.U4.UNIFI_DEVICES}))));var qe=n(905410),je=n(439059);var Xe=n(919952),Qe=n(731128);const Je=(0,W.Mz)(e=>e[Xe.U.DEVICE_PAGE],e=>e[Qe.u.PAGE_NUMBER]),Ze=[{value:25,default:!0},{value:50},{value:100}],et=({columns:e,columnVisibility:t,activeRows:n,onRowClick:o,onColumnDrop:c})=>{const r=(0,l.useRef)(null),i=(0,a.useDispatch)(),s=(0,a.useSelector)(F.b2),E=Ce(s),u=(0,a.useSelector)(Je),[m,A]=(0,Ne.A)(b.l.UNIFI_DEVICE),[d,_]=(0,Te.A)(b.l.UNIFI_DEVICE),C=(0,l.useCallback)(e=>{i((e=>({type:je.o,pageNumber:e}))(e))},[i]);return l.createElement(ie.A,{width:"100%",height:"100%",ref:r},l.createElement(qe.A,{section:"COMMON_DEVICES",itemCount:s.length,tableType:b.l.UNIFI_DEVICE,onRenderTable:({rowsPerPage:a,pageNumber:i})=>l.createElement(Ie.A,{className:Se,data:E,columns:e,rowStyle:ae.gc,columnVisibility:t,columnPinningLeftState:he,activeRows:n,onRowClick:o,onColumnSizingChange:A,initialColumnSize:m,onSort:_,sorting:d,parentRef:r,pageIndex:i,pageSize:a,columnDnD:!0,staticDnD:he,onColumnDrop:c,withOverflow:!0,tableHeight:"100%",virtualizeColumn:!0,overscanColumn:1}),onPageChanged:C,pageNumber:u,wrapperFlexProps:De,rowOptions:Ze}))},tt=(0,W.Mz)(z.W1,F.Hj,(e,t)=>!(e||t>50));var nt=n(550495),lt=n(282556),at=n(974546),ot=n(879077),ct=n(451919),rt=n(639775),it=n(840279),st=n(451860);const Et=["mac","search_type","search_status","search_name","search_model_name","search_ip","search_connection","search_network","search_experience","search_product_line",...st.r],ut=new at.A.Document({tokenize:"full",cache:500,encode:rt.Rd,document:{store:Et,id:"mac",index:Et}}),mt=(0,l.memo)(()=>{const{location:{state:e}}=(0,o.W6)(),t=(0,l.useRef)(e?.[Ve.Gd.SEARCH_INITIAL_TAGS]),{formatMessage:n}=(0,ne.tz)(),[c,r]=(0,l.useState)(!1),i=(0,l.useCallback)(()=>r(!0),[]),s=(0,l.useCallback)(()=>r(!1),[]),E=(0,a.useSelector)((0,l.useMemo)(()=>(0,ke.f)(Ve.U4.UNIFI_DEVICES),[])),u=(0,a.useSelector)((0,l.useMemo)(()=>Boolean(E.length)||Boolean(t.current)||c?(0,F.X$)(n):it.A,[n,c,t,E.length])),m=(0,l.useMemo)(()=>((e,t)=>[(0,rt.Vj)(e,[["search_type",t({id:"COMMON_ACCESS_POINT"})],["search_type",t({id:"COMMON_GATEWAY"})],["search_type",t({id:"COMMON_SWITCH"})]]),(0,rt.Vj)(e,[["search_status",t({id:"COMMON_ONLINE"})],["search_status",t({id:"COMMON_OFFLINE"})],["search_status",t({id:"COMMON_DEVICE_STATE_PENDING"})]]),(0,rt.Vj)(e,[["search_connection",t({id:"COMMON_WIRED"})]]),(0,rt.Vj)(e,[["search_product_line","UniFi Protect"],["search_product_line","UniFi Access"],["search_product_line","UniFi Network"]])].filter(Boolean))(u,n),[u,n]);return l.createElement(ot.A,{lsKey:ct.UZ.UNIFI_DEVICES_SEARCH,getInitialSuggestions:m,searchModelName:Ve.U4.UNIFI_DEVICES,searchIndex:ut,enabledColumns:Et,recordIdKey:"mac",onFocus:i,onBlur:s,initialTags:t.current,records:u})});var At,dt=n(200658),_t=n(198494),Ct=n(231226),It=n(302167),Ot=n(796140);!function(e){e.READY_TO_ADOPT="READY_TO_ADOPT",e.READY_TO_UPDATE="READY_TO_UPDATE",e.SMART_BATTERY_ASSIGNMENT="SMART_BATTERY_ASSIGNMENT",e.SMART_BATTERY_ADOPTION="SMART_BATTERY_ADOPTION"}(At||(At={}));const Nt=(0,W.Mz)(Ct.Eo,D.X7,(e,t)=>e?e.limit>=e.adopted+t.length:t.length>0),Tt=(0,W.Mz)(It.$5,D.J1,({auto_upgrade:e},t)=>!e&&t>0),St=(0,W.Mz)(D.G7,D.Vo,(e,t)=>Boolean(e)&&Boolean(t)),Dt=(0,W.Mz)(D.F4,D.Vo,(e,t)=>Boolean(e)&&Boolean(t)),Mt=(0,W.Mz)(Nt,(0,_t.Qp)(Ot.d.DEVICES_READY_TO_ADOPT_BANNER),Tt,(0,_t.Qp)(Ot.d.DEVICES_READY_TO_UPDATE_BANNER),St,(0,_t.Qp)(Ot.d.SMART_BATTERY_ADOPTION_BANNER),Dt,(0,_t.Qp)(Ot.d.SMART_BATTERY_ASSIGNMENT_BANNER),(e,t,n,l,a,o,c,r)=>({[At.READY_TO_ADOPT]:e&&!t,[At.READY_TO_UPDATE]:n&&!l,[At.SMART_BATTERY_ADOPTION]:a&&!o,[At.SMART_BATTERY_ASSIGNMENT]:c&&!r}));var pt=n(822336),ht=n(217439),gt=n(75585),ft=n(592563),Rt=n(465860);const bt=(0,l.memo)(({onClick:e})=>{const t=(0,a.useDispatch)(),n=(0,a.useSelector)(D.X7),o=(0,l.useCallback)(()=>{(0,Rt.A)(n,{dispatch:t}).then(()=>{e(At.READY_TO_ADOPT),t((0,S.At)(n,!0))})},[t,n,e]);return l.createElement(l.Fragment,null,l.createElement(gt.A,{size:"original",className:Wt}),l.createElement(qt,null,l.createElement(ht.A,{size:"medium",color:"text-2"},l.createElement(ne.sA,{id:"DEVICE_ACTIONS_BULK_ADOPT",values:{count:n.length}})),l.createElement(ft.A,{type:"button",fontSize:"medium",onPress:o},l.createElement(ne.sA,{id:n.length>1?"COMMON_ACTION_ADOPT_ALL":"COMMON_ADOPT"}))))});var vt=n(951272),Ut=n(673582),Pt=n(271856),Vt=n(945362);const Lt=(0,l.memo)(({onClick:e})=>{const t=(0,a.useDispatch)(),n=(0,a.useSelector)(D.J1),o=(0,a.useSelector)(It.$5),c={initialValues:{...o},onSubmit:n=>{o.auto_upgrade!==n.auto_upgrade&&t((0,d.G2)(n)),e(At.READY_TO_UPDATE),t((0,Vt.O)())}},r=(0,l.useCallback)(e=>()=>{e()},[]),i=(0,l.useCallback)((e,t)=>()=>{e("auto_upgrade",!0),t()},[]);return l.createElement(l.Fragment,null,l.createElement(Ut.A,{size:"original",className:Wt}),l.createElement(qt,null,l.createElement(ht.A,{size:"medium"},l.createElement(ne.sA,{id:"DEVICE_ACTIONS_BULK_UPDATE",values:{count:n}})),l.createElement(vt.l1,{...c},({handleSubmit:e,setFieldValue:t})=>l.createElement(ie.A,{justifyContent:"center",alignItems:"flex-start",flexDirection:"column"},l.createElement(Pt.A,{cursorType:"pointer",noWrap:!0,description:l.createElement(ne.sA,{id:"DEVICE_UPDATE_ALL_TOOLTIP"})},l.createElement(ft.A,{type:"button",fontSize:"medium",onPress:r(e)},l.createElement(ne.sA,{id:n>1?"COMMON_ACTION_UPDATE_ALL":"COMMON_ACTION_UPDATE"}))),l.createElement(ft.A,{type:"button",fontSize:"medium",onPress:i(t,e)},l.createElement(ne.sA,{id:"COMMON_ENABLE_AUTO_UPDATE"}))))))});var yt,Bt=n(776309),Ft=n(6176);!function(e){e.ADOPTION="adoption",e.ASSIGNMENT="assignment"}(yt||(yt={}));const kt={[yt.ADOPTION]:{smartBatteriesSelector:D.Nz,smartBatteriesMacsSelector:D.RL,title:"DEVICE_ACTIONS_ADOPT_DEVICE_READY_TO_ADOPT",actionLabel:"COMMON_ADOPT"},[yt.ASSIGNMENT]:{smartBatteriesSelector:D.CH,smartBatteriesMacsSelector:D.k,title:"DEVICE_ACTIONS_ADOPT_DEVICE_READY_TO_ASSIGN",actionLabel:"COMMON_ASSIGN"}},wt=({smartBatteryNotificationType:e,onClick:t})=>{const n=(0,a.useDispatch)(),{smartBatteriesSelector:o,smartBatteriesMacsSelector:c,title:r,actionLabel:i}=(0,l.useMemo)(()=>kt[e],[e]),s=(0,a.useSelector)(o),E=(0,a.useSelector)(c),u=(0,l.useCallback)(()=>{t({[yt.ADOPTION]:At.SMART_BATTERY_ADOPTION,[yt.ASSIGNMENT]:At.SMART_BATTERY_ASSIGNMENT}[e]),n((0,M.to)({modalType:Bt.A.ASSIGN_SMART_BATTERY,modalProps:{activeMacs:E}}))},[n,E,t,e]);return l.createElement(l.Fragment,null,l.createElement(Ft.A,{model:s[0].model,width:24,height:24,className:Wt}),l.createElement(qt,null,l.createElement(ht.A,null,l.createElement(ne.sA,{id:r,values:{deviceName:(0,p.Q)(s[0]),count:s.length,b:ne.b}})),l.createElement(ft.A,{type:"button",fontSize:"medium",onPress:u},l.createElement(ne.sA,{id:i}))))},xt=({onClick:e})=>l.createElement(wt,{smartBatteryNotificationType:yt.ADOPTION,onClick:e}),Yt=({onClick:e})=>l.createElement(wt,{smartBatteryNotificationType:yt.ASSIGNMENT,onClick:e}),Gt={[At.READY_TO_ADOPT]:bt,[At.READY_TO_UPDATE]:Lt,[At.SMART_BATTERY_ADOPTION]:xt,[At.SMART_BATTERY_ASSIGNMENT]:Yt},zt={[At.READY_TO_ADOPT]:Ot.d.DEVICES_READY_TO_ADOPT_BANNER,[At.READY_TO_UPDATE]:Ot.d.DEVICES_READY_TO_UPDATE_BANNER,[At.SMART_BATTERY_ADOPTION]:Ot.d.SMART_BATTERY_ADOPTION_BANNER,[At.SMART_BATTERY_ASSIGNMENT]:Ot.d.SMART_BATTERY_ASSIGNMENT_BANNER},Wt="DEVICE_BANNER_MAIN_ICON_CLASSNAME",Ht="DEVICE_BANNER_CLOSE_ICON_CLASSNAME",$t=(0,oe.A)(ie.A)`
  flex-direction: column;
  gap: ${ae.kc};
  .${Wt} {
    margin-right: ${ae.kc};
  }
  .${Ht} {
    margin-left: ${ae.YC};
  }
`,Kt=(0,oe.A)(ie.A)`
  background: ${({theme:{themeName:e}})=>pt.Ay[`desktop-color-neutral-01-${e}`]};
  padding: 6px ${ae.kc};
  width: 100%;
`,qt=(0,oe.A)(ie.A)`
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
`,jt=(0,l.memo)(()=>{const e=(0,a.useDispatch)(),t=(0,a.useSelector)(_t.Jg),n=(0,a.useSelector)(Mt),o=(0,l.useMemo)(()=>Object.entries(n).find(([e,t])=>t)?.[0],[n]),[c,r]=(0,l.useState)({[At.READY_TO_ADOPT]:!1,[At.READY_TO_UPDATE]:!1,[At.SMART_BATTERY_ADOPTION]:!1,[At.SMART_BATTERY_ASSIGNMENT]:!1}),s=(0,l.useCallback)(e=>{r(t=>({...t,[e]:!0}))},[]),E=(0,l.useCallback)(()=>{e((0,B.i4)({[pe.Lv.DEVICES_DISMISSED_MESSAGES]:[...t,zt[o]]}))},[t,o,e]),u=(0,l.useMemo)(()=>Gt[o],[o]);return(0,I.A)([(0,d.Uc)(void 0,{crudCacheStrategy:{type:i.e.CACHE}}),(0,A.O)(void 0,{crudCacheStrategy:{type:i.e.CACHE}})],u&&!c[o]?l.createElement($t,null,l.createElement(Kt,null,l.createElement(u,{onClick:s}),l.createElement(dt.A,{size:"original",actionable:!0,onClick:E,className:Ht}))):null)});var Xt=n(436017),Qt=n(445535);const Jt=(0,l.memo)(()=>{const e=(0,a.useDispatch)(),t=(0,a.useSelector)(tt),{custom:n}=(0,te.A)(b.l.UNIFI_DEVICE),o=(0,l.useCallback)(({target:{checked:t}})=>{e((0,B.yT)(b.l.UNIFI_DEVICE,{custom:{groupByApplication:t}}))},[e]);return t?l.createElement(Qt.A,null,l.createElement(Xt.A,{onChange:o,checked:n?.groupByApplication,full:!0,size:"small"},l.createElement(ht.A,{style:{paddingLeft:ae.kc},size:"medium",color:"text-2"},l.createElement(ne.sA,{id:"COMMON_GROUP_BY_APPLICATION"})))):null});var Zt,en=n(727678),tn=n(118033),nn=n(918060),ln=n(773033),an=n(291357);!function(e){e.ID="id",e.NAME="name",e.COUNT="count"}(Zt||(Zt={}));var on=n(886374);const cn={[an.dI.ONLINE]:{id:an.dI.ONLINE,condition:on.I0,label:"COMMON_ONLINE",sortIndex:0},[an.dI.ISOLATED]:{id:an.dI.ISOLATED,condition:on.aR,label:"COMMON_ISOLATED",sortIndex:1},[an.dI.UPDATE_AVAILABLE]:{id:an.dI.UPDATE_AVAILABLE,condition:on.NE,label:"COMMON_UPDATE_AVAILABLE",sortIndex:2},[an.dI.PENDING_ADOPTION]:{id:an.dI.PENDING_ADOPTION,condition:on.CS,label:"COMMON_DEVICE_STATE_PENDING",sortIndex:3},[an.dI.MANAGED_BY_ANOTHER_CONSOLE]:{id:an.dI.MANAGED_BY_ANOTHER_CONSOLE,condition:on.Br,label:"COMMON_DEVICE_STATE_MANAGED_BY_OTHER",sortIndex:4},[an.dI.OFFLINE]:{id:an.dI.OFFLINE,condition:on.gf,label:"COMMON_OFFLINE",sortIndex:5}},rn=(e,t)=>cn[e[Zt.ID]].sortIndex-cn[t[Zt.ID]].sortIndex;var sn;!function(e){e.NUMBER_FORMAT="numberFormat"}(sn||(sn={}));const En={[sn.NUMBER_FORMAT]:void 0},un=(0,l.createContext)(En),mn=(0,l.memo)(()=>{const e=(0,a.useDispatch)(),{formatMessage:t}=(0,ne.tz)(),{numberFormat:n}=(0,l.useContext)(un),o=(0,a.useSelector)((0,l.useMemo)(()=>(e=>(0,H.WY)()((0,W.Mz)(F.Qi,(0,F.a5)([an.Kq.STATUS]),(t,n)=>{const l={},a=Object.values(cn),o=t.length;for(let n=0;n<o;n+=1){const o=t[n],c=a.filter(({condition:e})=>e(o));for(let t=0;t<c.length;t+=1){const{id:n,label:a}=c[t];n&&!l[n]&&(l[n]={[Zt.ID]:n,[Zt.NAME]:e({id:a}),[Zt.COUNT]:0})}}const c=n.length;for(let e=0;e<c;e+=1){const t=n[e],o=a.filter(({condition:e})=>e(t));for(let e=0;e<o.length;e+=1){const{id:t}=o[e];t&&l[t]&&(l[t]={...l[t],[Zt.COUNT]:l[t][Zt.COUNT]+1})}}return l}),e=>e))(t),[t])),c=(0,a.useSelector)(tn.gm),r=(0,l.useMemo)(()=>Object.values(o),[o]),i=(0,l.useMemo)(()=>r.map(e=>e[Zt.ID]),[r]),s=(0,l.useMemo)(()=>r.sort(rn).map(e=>({id:e[Zt.ID],type:"CHECKBOX",title:`${e[Zt.NAME]} (${n.format(e[Zt.COUNT])})`,children:[]})),[r,n]),E=(0,l.useMemo)(()=>new Set(c),[c]),u=(0,l.useMemo)(()=>new Set(r.filter(e=>!c.includes(e[Zt.ID])&&!o[e[Zt.ID]][Zt.COUNT]).map(e=>e[Zt.ID])),[c,o,r]),m=(0,l.useCallback)(t=>{e((0,Ye.ym)(Array.from(t)))},[e]);return(0,ln.A)(c,i,Ye.ym),r.length?l.createElement(en.A,{label:l.createElement(ne.sA,{id:"COMMON_STATUS"}),isSingleColumn:!0},l.createElement(nn.A.Simplified,{items:s,selectedKeys:E,disabledKeys:u,onSelectionChange:m})):null});var An;!function(e){e.ID="id",e.NAME="name",e.COUNT="count"}(An||(An={}));var dn=n(241212);const _n={[an.bq.GATEWAY]:{id:an.bq.GATEWAY,condition:dn.xi,label:"COMMON_GATEWAY",sortIndex:0},[an.bq.SWITCH]:{id:an.bq.SWITCH,condition:dn.JM,label:"COMMON_SWITCH",sortIndex:1},[an.bq.ACCESS_POINT]:{id:an.bq.ACCESS_POINT,condition:dn.xn,label:"COMMON_ACCESS_POINT",sortIndex:2},[an.bq.MODEM]:{id:an.bq.MODEM,condition:dn.pI,label:"COMMON_MODEM",sortIndex:3},[an.bq.CLOUD_KEY]:{id:an.bq.CLOUD_KEY,condition:dn.FY,label:"COMMON_CLOUD_KEY",sortIndex:4},[an.bq.SMART_POWER]:{id:an.bq.SMART_POWER,condition:dn.LW,label:"COMMON_SMART_POWER",sortIndex:5},[an.bq.BUILDING_BRIDGE]:{id:an.bq.BUILDING_BRIDGE,condition:dn.CS,label:"COMMON_BUILDING_BRIDGE",sortIndex:6},[an.bq.CELLULAR_MODEM]:{id:an.bq.CELLULAR_MODEM,condition:dn.pJ,label:"COMMON_CELLULAR_MODEM",sortIndex:7},[an.bq.NON_NETWORK_DEVICES]:{id:an.bq.NON_NETWORK_DEVICES,condition:dn.hg,label:"COMMON_NON_NETWORK_DEVICES",sortIndex:8}},Cn=(e,t)=>_n[e[An.ID]].sortIndex-_n[t[An.ID]].sortIndex,In=(0,l.memo)(()=>{const e=(0,a.useDispatch)(),{formatMessage:t}=(0,ne.tz)(),{numberFormat:n}=(0,l.useContext)(un),o=(0,a.useSelector)((0,l.useMemo)(()=>(e=>(0,H.WY)()((0,W.Mz)(F.Qi,(0,F.a5)([an.Kq.TYPE]),(t,n)=>{const l={},a=Object.values(_n),o=t.length;for(let n=0;n<o;n+=1){const o=t[n],c=a.filter(({condition:e})=>e(o));for(let t=0;t<c.length;t+=1){const{id:n,label:a}=c[t];n&&!l[n]&&(l[n]={[An.ID]:n,[An.NAME]:e({id:a}),[An.COUNT]:0})}}const c=n.length;for(let e=0;e<c;e+=1){const t=n[e],o=a.filter(({condition:e})=>e(t));for(let e=0;e<o.length;e+=1){const{id:t}=o[e];t&&l[t]&&(l[t]={...l[t],[An.COUNT]:l[t][An.COUNT]+1})}}return l}),e=>e))(t),[t])),c=(0,a.useSelector)(tn.Vs),r=(0,l.useMemo)(()=>Object.values(o),[o]),i=(0,l.useMemo)(()=>r.map(e=>e[An.ID]),[r]),s=(0,l.useMemo)(()=>new Set(c),[c]),E=(0,l.useMemo)(()=>new Set(r.filter(e=>!c.includes(e[An.ID])&&!o[e[An.ID]][An.COUNT]).map(e=>e[An.ID])),[r,o,c]),u=(0,l.useCallback)(t=>{e((0,Ye.ME)(Array.from(t)))},[e]),m=(0,l.useMemo)(()=>r.sort(Cn).map(e=>({id:e[An.ID],type:"CHECKBOX",title:`${e[An.NAME]} (${n.format(e[An.COUNT])})`,children:[]})),[r,n]);return(0,ln.A)(c,i,Ye.ME),r.length?l.createElement(en.A,{label:l.createElement(ne.sA,{id:"COMMON_SIDE_NAV_DEVICES"}),isSingleColumn:!0},l.createElement(nn.A.Simplified,{items:m,selectedKeys:s,disabledKeys:E,onSelectionChange:u})):null});var On;!function(e){e.ID="id",e.NAME="name",e.COUNT="count"}(On||(On={}));const Nn=(0,H.WY)()((0,W.Mz)(F.Qi,(0,F.a5)([an.Kq.MODEL]),(e,t)=>{const n={},l=e.length;for(let t=0;t<l;t+=1){const l=e[t];l.model&&!n[l.model]&&(n[l.model]={[On.ID]:l.model,[On.NAME]:(0,p.Lm)(l.model),[On.COUNT]:0})}const a=t.length;for(let e=0;e<a;e+=1){const l=t[e];l.model&&n[l.model]&&(n[l.model]={...n[l.model],[On.COUNT]:n[l.model][On.COUNT]+1})}return n}),e=>e),Tn=(0,l.memo)(()=>{const e=(0,a.useDispatch)(),t=(0,a.useSelector)(Nn),n=(0,a.useSelector)(tn.Kt),{numberFormat:o}=(0,l.useContext)(un),c=(0,l.useMemo)(()=>Object.values(t),[t]),r=(0,l.useMemo)(()=>c.map(e=>e[On.ID]),[c]),i=(0,l.useMemo)(()=>n.length===c.length?"all":new Set(n),[n,c]),s=(0,l.useMemo)(()=>new Set(c.filter(e=>!n.includes(e[On.ID])&&!t[e[On.ID]][On.COUNT]).map(e=>e[On.ID])),[c,t,n]),E=(0,l.useCallback)(t=>{e((0,Ye.nM)(Array.from(t)))},[e]),u=(0,l.useMemo)(()=>c.sort((e,t)=>t[On.COUNT]-e[On.COUNT]).map(e=>({id:e[On.ID],type:"CHECKBOX",title:`${e[On.NAME]} (${o.format(e[On.COUNT])})`,children:[]})),[c,o]),m=(0,l.useCallback)(()=>{e((0,Ye.nM)(Object.keys(t)))},[e,t]),A=(0,l.useCallback)(()=>{e((0,Ye.nM)([]))},[e]);return(0,ln.A)(n,r,Ye.nM),c.length?l.createElement(en.A,{label:l.createElement(ne.sA,{id:"COMMON_MODELS"}),isSingleColumn:!0},l.createElement(nn.A,{items:u,selectedKeys:i,disabledKeys:s,onSelectionChange:E,onSelectAll:m,onDeselectAll:A})):null});var Sn=n(66804),Dn=n(615786),Mn=n(15365);const pn=(0,l.memo)(()=>{const e=(0,a.useDispatch)(),t=(0,a.useSelector)(tn.O2),n=(0,a.useSelector)(D.BS),o=(0,l.useCallback)(t=>{Array.isArray(t)&&e((0,Ye.ml)(t))},[e]),c=(0,l.useMemo)(()=>t[0]!==t[1]?l.createElement(ne.sA,{id:"COMMON_GENERIC_FROM_TO",values:{from:Dn.DL[t[0]],to:Dn.DL[t[1]]}}):(()=>{switch(t[0]){case Dn.WV[Mn.v.MIN].value:return l.createElement(ne.sA,{id:"COMMON_NONE"});case Dn.WV[Mn.v.ONE_DAY].value:case Dn.WV[Mn.v.THREE_DAYS].value:case Dn.WV[Mn.v.ONE_WEEK].value:case Dn.WV[Mn.v.ONE_MONTH].value:return Dn.DL[t[0]];case Dn.WV[Mn.v.ALL].value:return l.createElement(ne.sA,{id:"COMMON_ALL"});default:return null}})(),[t]);return n?l.createElement(Qt.A,{label:l.createElement(ne.sA,{id:"COMMON_UPTIME"})},l.createElement(Sn.A,{value:t,onChange:o,minValue:Dn.KP,maxValue:Dn.SQ,marks:Dn.E7,step:Dn.m7,labelEnd:c,caption:l.createElement(ne.sA,{id:"COMMON_MIN"}),captionEnd:l.createElement(ne.sA,{id:"COMMON_ALL"})})):null});var hn=n(281486),gn=n(939065);const fn=(0,l.memo)(()=>{const e=(0,a.useDispatch)(),t=(0,a.useSelector)(tn.EZ),n=(0,a.useSelector)(D.BS),o=(0,l.useCallback)(t=>{Array.isArray(t)&&e((0,Ye.Es)(t))},[e]),c=(0,l.useMemo)(()=>t[0]!==t[1]?l.createElement(ne.sA,{id:"COMMON_GENERIC_FROM_TO",values:{from:hn.lc[t[0]],to:hn.lc[t[1]]}}):(()=>{switch(t[0]){case hn.el[gn.f.MIN].value:return l.createElement(ne.sA,{id:"COMMON_NONE"});case hn.el[gn.f.THREE_DAYS].value:case hn.el[gn.f.ONE_WEEK].value:case hn.el[gn.f.ONE_MONTH].value:case hn.el[gn.f.SIX_MONTHS].value:case hn.el[gn.f.ONE_YEAR].value:return hn.lc[t[0]];case hn.el[gn.f.ALL].value:return l.createElement(ne.sA,{id:"COMMON_ALL"});default:return null}})(),[t]);return n?l.createElement(Qt.A,{label:l.createElement(ne.sA,{id:"DEVICE_INSTALL_DATE"})},l.createElement(Sn.A,{value:t,onChange:o,minValue:hn.Ao,maxValue:hn.gv,marks:hn.mi,step:hn.CX,labelEnd:c,caption:l.createElement(ne.sA,{id:"COMMON_MIN"}),captionEnd:l.createElement(ne.sA,{id:"COMMON_ALL"})})):null});var Rn=n(9535),bn=n(861878),vn=n(580176),Un=n(445054);const Pn=(0,oe.A)(ie.A)`
  flex-direction: column;
  gap: ${ae.kc};
  margin-bottom: ${ae.Ln};
`;var Vn=n(864155);const Ln=(0,l.memo)(()=>{const e=(0,o.W6)(),{search:t}=(0,o.zy)(),n=(0,a.useDispatch)(),c=(0,a.useSelector)(re.EL),r=(0,a.useSelector)(Vn.LK),i=(0,l.useCallback)(()=>{n((0,f.XP)({type:V.H.DEVICE_UPDATES,id:"any"}))},[n]);return(0,l.useEffect)(()=>{const n=new URLSearchParams(t);n.has(J.Ej)&&(setTimeout(i,100),n.delete(J.Ej),e.push({search:n.toString()}))},[e,t,i]),c?null:l.createElement(bn.A,{onPress:i,labelId:"COMMON_DEVICE_UPDATES_AND_SETTINGS",disabled:r===V.H.DEVICE_UPDATES})}),yn=(0,l.memo)(()=>{const e=(0,a.useDispatch)(),t=(0,a.useSelector)(tn.fG),n=(0,l.useCallback)(()=>{e((0,Ye.D6)(xe.R))},[e]),o=(0,Un.A)(ee.g1.DEVICES),c=(0,l.useCallback)(()=>{e((0,vn.GD)(ee.g1.DEVICES))},[e]);return l.createElement(Pn,null,l.createElement(Rn.A,{onClear:n,disabled:t}),l.createElement(Ln,null),l.createElement(bn.A,{onPress:c,labelId:"COMMON_CUSTOMIZE_COLUMNS",disabled:o}))});var Bn=n(312583);const Fn=Object.values(v.o$).filter(e=>e!==v.o$.STATUS_BALL),kn=(0,l.memo)(()=>(0,Un.A)(ee.g1.DEVICES)?l.createElement(Bn.A,{leftFilterPageId:ee.g1.DEVICES,columns:Fn,columnLabels:v.xJ,tableType:b.l.UNIFI_DEVICE}):null),wn=(0,l.memo)(()=>{const e=(0,a.useSelector)(lt.zi),t=(0,l.useMemo)(()=>new Intl.NumberFormat(e,{notation:"standard"}),[e]),n=(0,l.useMemo)(()=>({[sn.NUMBER_FORMAT]:t}),[t]);return l.createElement(nt.A,{leftFilterPageId:ee.g1.DEVICES,footer:l.createElement(yn,null),columns:l.createElement(kn,null)},l.createElement(un.Provider,{value:n},l.createElement(mt,null),l.createElement(jt,null),l.createElement(Jt,null),l.createElement(mn,null),l.createElement(In,null),l.createElement(Tn,null),l.createElement(pn,null),l.createElement(fn,null)))}),xn=(0,l.memo)(()=>{const e=(0,o.W6)(),{search:t}=(0,o.zy)(),n=(0,a.useSelector)(D.U$),c=(0,a.useSelector)(Q.RE),r=(0,a.useSelector)(F.hm),i=(0,a.useDispatch)();X();const s=(0,a.useSelector)(tt),{initialColumns:E=[],custom:u,columnOrder:m}=(0,te.A)(b.l.UNIFI_DEVICE);(0,l.useEffect)(()=>{const l=new URLSearchParams(t);l.has(J.zs)&&n&&(setTimeout(()=>{i((0,f.XP)({type:V.H.DEVICE,id:n.mac,tab:L.BC.SETTINGS}))},100),l.delete(J.zs),e.push({search:l.toString()}))},[i,e,t,n]);const A=(0,l.useCallback)(({device_type:e,product_line:t,mac:n,stacking_group_id:l})=>{i((0,P.p)(!1)),i((0,f.XP)({type:l?V.H.STACKING:(0,U.cW)({device_type:e,product_line:t})?e===R.iU.CLIENT&&V.H.UNIFI_DEVICE_CLIENT||V.H.DEVICE:V.H.UNIFI_DEVICE_CLIENT,id:l||n}))},[i]),d=(0,l.useCallback)(e=>{i((0,B.yT)(b.l.UNIFI_DEVICE,{columnOrder:(0,w.F)((0,y.D)(c),e,m)}))},[i,m,c]),_=(0,l.useMemo)(()=>(0,y.D)(c).sort((e,t)=>m.findIndex(t=>t===e.id)-m.findIndex(e=>e===t.id)),[m,c]),C=(0,l.useMemo)(()=>E.length?ge.reduce((e,t)=>(e[t]=t===v.o$.STATUS_BALL||E.includes(t),e),{}):{},[E]);(0,l.useEffect)(()=>{if(e.location.state){const{id:t,openSidePanel:n,type:l,tab:a}=e.location.state;t&&n&&l&&(i((0,f.XP)({type:l,id:t,tab:a})),delete e.location.state.openSidePanel,delete e.location.state.id,delete e.location.state.type)}},[i,e.location.state]);const I=(0,l.useMemo)(()=>!!s&&u?.groupByApplication,[s,u?.groupByApplication]),O=(0,x.A)([V.H.DEVICE,V.H.UNIFI_DEVICE_CLIENT]);return l.createElement(Z.A,{leftFilterPageId:ee.g1.DEVICES,content:l.createElement(wn,null),overflow:"hidden"},r&&E.length?l.createElement(k.A,null,I?l.createElement(Pe,{columns:_,columnVisibility:C,onRowClick:A,onColumnDrop:d,activeRows:O}):l.createElement(et,{columns:_,columnVisibility:C,onRowClick:A,onColumnDrop:d,activeRows:O})):l.createElement(Ke,null))});var Yn=n(418562),Gn=n(780811),zn=n(675359),Wn=n(742920),Hn=n(477544),$n=n(928085),Kn=n(573363),qn=n(130851),jn=n(765562),Xn=n(691189);var Qn=n(349107),Jn=n(215454),Zn=n(851681);const el=/[^\\\\]*$/g,tl={"java.exe":"COMMON_JAVA","javaw.exe":"COMMON_JAVAW"},nl=()=>{const e=(0,a.useDispatch)(),{formatMessage:t,formatList:n}=(0,ne.tz)(),o=(0,a.useSelector)(Jn.iP);(0,l.useEffect)(()=>{o===Zn.gy.WINDOWS&&e((0,Xn.Kd)("warnings","/v2/api/site/{site}/warnings")).then(({data:a})=>{const o=a.missing_windows_defender_firewall_rules?.map(({is_enabled:e,is_present:t,program:n})=>(!e||!t)&&tl[n?.match(el)?.[0]]).filter(Boolean);o.length&&e((0,zn.ox)({id:"DEVICE_ADOPTION_UPDATE_NETWORK_RULES",icon:Wn.C.warning,title:t({id:"DEVICE_ADOPTION_ACCESS_NEEDED"}),details:l.createElement(ie.A,{marginBottom:ae.YC},l.createElement("div",null,t({id:"DEVICE_ADOPTION_UPDATE_NETWORK_RULES"},{applications:n(o.map(e=>t({id:e}))),link:l.createElement(Qn.A.Simplified,{href:jn.A.windowsFirewallRules,message:t({id:"COMMON_LEARN_MORE"})})}))),duration:0,onClose:()=>e((0,zn.uU)("DEVICE_ADOPTION_UPDATE_NETWORK_RULES"))}))})},[])},ll=(0,H.WY)()((0,W.Mz)(D.ID,e=>e.map(({mac:e,adopted:t})=>({mac:e,adopted:t}))),e=>e),al=/:/g,ol=()=>{const{formatMessage:e}=(0,ne.tz)(),t=(0,o.W6)(),n=(0,a.useDispatch)(),c=(0,a.useSelector)(_t.GP),r=(0,a.useSelector)(ll),{devicesToAdopt:i}=t.location.state||{devicesToAdopt:null},s=(0,a.useSelector)(Hn.hX),E=(0,a.useSelector)(qn.p),u=(0,a.useSelector)(Kn.A),m=(0,a.useSelector)(_t.ay),A=(0,$n.A)(J._L);return nl(),(0,l.useEffect)(()=>{if(c&&i&&r.length)try{const a=JSON.parse(window.atob(i)).map(({mac:e})=>r.find(({mac:t,adopted:n})=>!n&&t.replace(al,"").toUpperCase()===e.replace(al,"").toUpperCase())).filter(Boolean);if(!a.length)throw new Error("ON_LOAD_BATCH_ADOPT_NO_DEVICES");{const o=a.map(({mac:e})=>e);(0,Rt.A)(o,{dispatch:n}).then(()=>{if(!s){const o=a.filter(Gn.G5);o.length&&n((({device:e,history:t,dispatch:n,imagePath:a,deviceModelMap:o,selfTheme:c,formatMessage:r,wifiSettingsPath:i})=>{const s=(0,Yn.A)();return(0,zn.ox)({icon:l.createElement("div",null,l.createElement(Ft.C,{model:e?.model,width:53,height:53,imagePath:a,deviceModelMap:o,theme:c})),title:"DEVICE_ACTIONS_ADOPT_ACCESS_POINT_TITLE",message:"DEVICE_ACTIONS_ADOPT_ACCESS_POINT_MESSAGE",primaryButton:{label:r({id:"DEVICE_ACTIONS_ADOPT_ACCESS_POINT_ACTION"}),onClick:()=>{t.push(i),n((0,zn.uU)(s))}},translateTitle:!0},s)})({device:o[0],history:t,imagePath:E,deviceModelMap:u,selfTheme:m,dispatch:n,formatMessage:e,wifiSettingsPath:A}))}n((0,S.At)(o,!0))})}}catch(e){n((0,zn.ox)({icon:Wn.C.danger,message:"ON_LOAD_BATCH_ADOPT_NO_DEVICES"}))}finally{t.replace({pathname:t.location.pathname,state:Object.assign(t.location.state,{devicesToAdopt:null})})}},[c,i,n,s,E,u,m,A,t,r,e]),null},cl=(0,l.memo)(({path:e})=>{const t=(0,a.useDispatch)();return(0,l.useEffect)(()=>{t((0,A.O)()),t((0,S.Uc)(void 0,{crudCacheStrategy:{type:i.e.CACHE}})),t((0,m.a5)(void 0,{crudCacheStrategy:{type:i.e.CACHE}})),t((0,C.uy)(void 0,{crudCacheStrategy:{type:i.e.CACHE}})),t((0,_.Sk)(void 0,{crudCacheStrategy:{type:i.e.CACHE}})),t((0,d.Uc)(void 0,{crudCacheStrategy:{type:i.e.CACHE}})),t((0,N.$3)(void 0,{crudCacheStrategy:{type:i.e.CACHE}})),t((0,u.hh)(void 0,{crudCacheStrategy:{type:i.e.CACHE}}))},[t]),(0,I.A)([(0,r.T)(void 0,{crudCacheStrategy:{type:i.e.CACHE}}),(0,O.Zi)(T.B.DEVICES),(0,O.Zi)(T.B.CLIENTS),(0,O.Zi)(T.B.UNIFI_DEVICES)],l.createElement(E.A,null,l.createElement(o.dO,null,l.createElement(c.F,null,l.createElement(xn,null)),l.createElement(c.F,{path:`${e}/device-upgrade/:id/`,render:e=>l.createElement(g,{...e})})),l.createElement(ol,null)),{trackingName:s.VO.DEVICES})})},197562:(e,t,n)=>{n.d(t,{A:()=>o});var l=n(71479),a=n(566723);const o=(0,l.A)("div")`
  height: 100%;
  flex: 1;
  overflow: scroll;
  margin-left: ${a.Ln};
  padding: ${a.Ln} 0 0 0;
`},727678:(e,t,n)=>{n.d(t,{A:()=>E});var l=n(296540),a=n(445535),o=n(71479),c=n(294303),r=n(566723);const i=(0,o.A)(c.A)`
  display: grid;
  grid-template-columns: calc(50% - ${r.YC}) calc(50% - ${r.YC});
  user-select: none;
  column-gap: ${r.kc};
  max-width: 100%;
`,s=(0,o.A)(c.A)`
  display: flex;
  flex-direction: column;
  user-select: none;
  max-width: 100%;
`,E=({label:e,height:t,isSingleColumn:n=!1,initialExpanded:o=!0,children:c})=>{const r=n?s:i;return l.createElement(a.A,{label:e,initialExpanded:o},l.createElement(r,{height:t},c))}},773033:(e,t,n)=>{n.d(t,{A:()=>c});var l=n(296540),a=n(469733),o=n(212178);const c=(e,t,n)=>{const c=(0,a.useDispatch)(),r=[JSON.stringify(e),JSON.stringify(t)].join(),i=(0,o.A)(r);return(0,l.useEffect)(()=>{if(r!==i){const l=[],a=e.length;for(let n=0;n<a;n+=1){const a=e[n];t.includes(a)||l.push(a)}l.length&&c(n(e.filter(e=>!l.includes(e))))}},[r,i,e,t,n,c]),null}},387098:(e,t,n)=>{n.d(t,{F:()=>l});const l=(e,t,n)=>e.sort(({id:e},{id:l})=>{const a=t.findIndex(t=>t===e),o=t.findIndex(e=>e===l),c=n.findIndex(t=>t===e),r=n.findIndex(e=>e===l);return-1===a&&-1===o?0:-1===a||-1===o?c-r:a-o}).map(({id:e})=>e)},212178:(e,t,n)=>{n.d(t,{A:()=>a});var l=n(296540);const a=e=>{const t=(0,l.useRef)();return(0,l.useEffect)(()=>{t.current=e},[e]),t.current}},318787:(e,t,n)=>{n.d(t,{A:()=>u});var l=n(296540),a=n(469733),o=n(64741),c=n(429252),r=n.n(c),i=n(775699),s=n(200826);const E=(e,t)=>e?{id:e,isAscending:t}:void 0,u=e=>{const t=(0,a.useDispatch)(),{sortBy:n,isAscending:c}=(0,s.A)(e),[u,m]=(0,l.useState)(E(n,c)),A=(0,l.useMemo)(()=>(0,o.A)((n,l)=>{r()(n,l)||t((0,i.yT)(e,{sortBy:n?.id,isAscending:n?.isAscending}))},2e3),[t,e]);(0,l.useEffect)(()=>{A(u,E(n,c))},[u,A,n,c]);const d=(0,l.useCallback)((e,t)=>{m(E(e?.id,t))},[]);return(0,l.useMemo)(()=>[u,d],[u,d])}}}]);