"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[13222],{175522(e,t,r){r.d(t,{A:()=>l,Q:()=>a});var n=r(416348);const l="_",a=[n.ZM,n.Je]},86571(e,t,r){r.d(t,{A:()=>c});var n=r(296540),l=r(217439),a=r(916537);const c=({id:e,children:t,values:r})=>n.createElement(l.A,{color:"text-1",weight:"bold",size:"medium"},e?n.createElement(a.sA,{id:e,values:r}):null,t)},470962(e,t,r){r.d(t,{A:()=>A});var n=r(822336),l=r(296540),a=r(217439),c=r(823858),i=r(382389),o=r(566723),m=r(224948),s=r(349107),E=r(294303),d=r(916537),u=r(765562);const A=(0,l.memo)(({children:e})=>{const{themeName:t}=(0,i.u)();return l.createElement(m.A,{icon:l.createElement(c.A,{size:"original",color:n.Ay[`desktop-color-orange-06-${t}`],variant:"fill"})},l.createElement(E.A,{flexDirection:"column",gap:o.kc},l.createElement(a.A,{size:"medium",color:"text-2"},l.createElement(d.sA,{id:"COMMON_DEVICE_OFFLINE_WARNING",values:{b:d.b,link:l.createElement(s.A,{href:u.A.offlineArticle,id:"COMMON_LEARN_MORE",noWrap:!0})}})),e))})},57759(e,t,r){r.d(t,{A:()=>J});var n=r(296540),l=r(217439),a=r(592563),c=r(517332),i=r(132196),o=r(382389),m=r(469733),s=r(822336),E=r(999589),d=r(916537),u=r(294303),A=r(566723),p=r(212178),_=r(691189),v=r(648549);const g=`${r(771805).w}/device/{mac}/fw-revert-options`,C=(e,t={},r={})=>(0,_.Kd)("firmwareRevertOptions",(0,v.P)(g,{mac:e}),e,t,{idField:"mac",...r});var N=r(801081),h=r(25553),I=r(87485);var O=r(602197),f=r(422969),b=r(442051),w=r(74750),M=r(71479),T=r(180524),D=(r(874734),r(752263)),S=r(6510),R=r(727270),k=r(809893),L=r(778851),x=r(215454),y=r(417378),P=r(187483),H=r(131147),V=r(171073),$=r(90757),z=r(147606),F=r(868456);const G=(0,M.A)(F.A)`
  border-radius: 50%;
  padding: 1px;
  border: ${({theme:{themeName:e}})=>s.Ay[`desktop-border-divider-${e}`]};
  color: ${({theme:{themeName:e}})=>s.Ay[`desktop-color-neutral-08-${e}`]};
`,U=({model:e,version:t})=>{const r=(0,m.useSelector)(P.qf),l=(0,E.coerce)(t)?.version||t,a=(0,n.useCallback)(()=>{l&&r?.(e,l)},[r,e,l]);return n.createElement(T.A,{description:n.createElement(d.sA,{id:"COMMON_RELEASE_NOTES"})},n.createElement("span",null,n.createElement(G,{actionable:!0,onClick:a,size:"original"})))},B=()=>{const{themeName:e}=(0,o.u)();return n.createElement("svg",{viewBox:"0 0 93 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n.createElement("path",{d:"M92.3536 4.03715C92.5488 3.84189 92.5488 3.5253 92.3536 3.33004L89.1716 0.14806C88.9763 -0.0472023 88.6597 -0.0472023 88.4645 0.14806C88.2692 0.343322 88.2692 0.659904 88.4645 0.855167L91.2929 3.68359L88.4645 6.51202C88.2692 6.70728 88.2692 7.02387 88.4645 7.21913C88.6597 7.41439 88.9763 7.41439 89.1716 7.21913L92.3536 4.03715ZM0 3.68359V4.18359H92V3.68359V3.18359H0V3.68359Z",fill:s.Ay[`desktop-color-purple-06-${e}`]}))},W=(0,M.A)(u.A)`
  padding: ${A.xO};
  border: ${({theme:{themeName:e}})=>s.Ay[`desktop-border-divider-${e}`]};
  border-radius: 8px;
  margin-bottom: ${A.kc};
`,q=(0,M.A)(u.A)`
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background-color: ${({theme:{themeName:e}})=>s.Ay[`desktop-color-purple-06-${e}`]};
  z-index: 1;
`,Y=(0,M.A)(u.A)`
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  align-items: center;
`,j=(0,M.A)(u.A)`
  background-color: ${({theme:{themeName:e}})=>s.Ay[`desktop-color-neutral-02-${e}`]};
  border-radius: 4px;

  textarea {
    background-color: transparent;
    resize: none;
  }
`,K=({onCancel:e,onSubmitSuccess:t,name:r,model:a,mac:p,displayable_version:_,uptime:v,revertOptions:g})=>{const C=(0,m.useDispatch)(),{themeName:N}=(0,o.u)(),{formatMessage:h}=(0,d.tz)(),[I,O]=(0,n.useState)(""),f=(0,m.useSelector)(x.Eh),M=(0,m.useSelector)(y.S$),F=(0,L.GO)(M),G=(0,m.useSelector)(P.ap),K=(0,m.useSelector)(P.YL),Q=(0,H.A)("firmware_downgrade_feedback"),Z=(0,S.Lm)(a),X=(0,E.coerce)(_)?.version,J=(0,E.coerce)(g.previous_firmware_version)?.version,ee=(0,n.useCallback)(async(e,t)=>{const r=await Q(),n=`${R.DU}${k.Fx[F]}/v1/firmware-downgrade`;try{await fetch(n,{method:"POST",headers:{"Content-Type":"application/json","X-Captcha":r},mode:"cors",body:JSON.stringify({message:e,applicationName:"Network",applicationVersion:f,deviceModel:Z,deviceFirmwareCurrentVersion:(0,D._)(_),deviceFirmwareNewVersion:t,anonymousId:G})})}catch(e){}},[Q,F,f,_,G,Z]),te=(0,n.useCallback)(()=>{if(C((0,V._1)({name:r,model:a,mac:p},g.previous_firmware_url)),K)return t();I&&ee(I,g.previous_firmware_version),t()},[C,r,a,p,g.previous_firmware_url,g.previous_firmware_version,K,I,t,ee]);return n.createElement(W,{flexDirection:"column",gap:A.Ln},n.createElement(u.A,{gap:A.kc,width:"100%"},n.createElement(u.A,{flexDirection:"column",alignItems:"center",width:"110px",flex:"0 0 110px"},n.createElement(l.A,{color:"text-3",size:"small"},n.createElement(d.sA,{id:"COMMON_CURRENT_VERSION"}),":"),n.createElement(u.A,{gap:A.YC},n.createElement(T.A,{description:n.createElement(n.Fragment,null,n.createElement(d.sA,{id:"DEVICE_TIME_RUNNING"}),": ",(0,$.Ay)(v).join("").trim())},n.createElement(l.A,{color:"text-2",size:"medium"},X)),n.createElement(U,{model:a,version:_}))),n.createElement(u.A,{flex:1,alignItems:"center",justifyContent:"center",position:"relative"},n.createElement(Y,null,n.createElement(B,null)),n.createElement(q,null,n.createElement(c.A,{size:"original",variant:"twoTone",color:"white",twoTonedClassname:i.AH`
                fill: ${s.Ay[`desktop-color-purple-06-${N}`]};
              `}))),n.createElement(u.A,{flexDirection:"column",alignItems:"center",width:"110px",flex:"0 0 110px"},n.createElement(l.A,{color:"text-3",size:"small"},n.createElement(d.sA,{id:"COMMON_REVERT_TO"}),":"),n.createElement(u.A,{gap:A.YC},n.createElement(l.A,{color:"text-2",size:"medium"},J),n.createElement(U,{model:a,version:J||""})))),K?null:n.createElement(j,{flexDirection:"column",gap:A.YC},n.createElement(b.A,{resize:!1,style:{width:"100%"},placeholder:h({id:"COMMON_HELP_UNIFI_UNDERSTAND_REVERT_DESCRIPTION"}),value:I,onChange:e=>{O(e)}})),n.createElement(u.A,{gap:A.YC,width:"100%"},n.createElement(z.A,{title:n.createElement(d.sA,{id:"DEVICE_REVERT_NOW_CONFIRM_TITLE",values:{model:Z}}),message:n.createElement(d.sA,{id:"DEVICE_REVERT_NOW_CONFIRM_MESSAGE",values:{model:Z,version:J||""}}),confirmButtonVariant:"emphasis",onConfirm:te,trigger:n.createElement(w.A,{size:"small"},n.createElement(d.sA,{id:"COMMON_ACTION_REVERT_NOW"}))}),n.createElement(w.A,{size:"small",variant:"neutral",onClick:e},n.createElement(d.sA,{id:"COMMON_ACTION_CANCEL"}))))};var Q=r(360113),Z=r(768195);const X=[Z.bq.USW,Z.bq.UAP,Z.bq.UDB,Z.bq.UBB,Z.bq.UXG,Z.bq.UBLE,Z.bq.UAV,Z.bq.UCI,Z.bq.UACC],J=({name:e,model:t,mac:r,displayable_version:_,uptime:v,type:g,flexProps:b,deviceState:w})=>{const M=(0,m.useDispatch)(),[T,D]=(0,n.useState)(!1),{themeName:S}=(0,o.u)(),R=(0,m.useSelector)((0,n.useMemo)(()=>(e=>(0,N.Mz)((e=>(0,h.uh)(C(e)))(e),I.i6))(r),[r])),k=(0,p.A)(w);(0,n.useEffect)(()=>{k===O.g.UPGRADING&&w!==O.g.UPGRADING&&M(C(r))},[w,k,M,r]);const L=(0,n.useMemo)(()=>{const e=R.previous_firmware_version&&R.previous_firmware_url,t=_!==(0,E.coerce)(R.previous_firmware_version)?.version,r=w===O.g.UPGRADING;return Boolean(e)&&!r&&t&&X.includes(g)},[R.previous_firmware_version,R.previous_firmware_url,_,w,g]),x=(0,f.A)(X.includes(g)?[C(r,{},void 0)]:[],L?n.createElement(a.A,{onPress:()=>{D(!0)},fontSize:"medium"},n.createElement(c.A,{size:"original",variant:"twoTone",color:s.Ay[`desktop-color-ublue-06-${S}`],twoTonedClassname:i.AH`
            fill: ${s.Ay[`desktop-color-ublue-01-${S}`]};
          `}),n.createElement(d.sA,{id:"COMMON_REVERT"})):null);return n.createElement(n.Fragment,null,_?n.createElement(Q.A,{flexProps:b},n.createElement(l.A,{color:"text-2",size:"medium"},n.createElement(d.sA,{id:"COMMON_DEVICE_VERSION"})),n.createElement(u.A,{gap:A.kc,alignItems:"flex-start"},n.createElement(l.A,{color:"text-3",size:"medium"},_),x)):null,T?n.createElement(K,{onCancel:()=>{D(!1)},onSubmitSuccess:()=>{D(!1)},name:e,model:t,mac:r,displayable_version:_,uptime:v,revertOptions:R}):null)}},723544(e,t,r){r.d(t,{A:()=>i});var n=r(296540),l=r(217439),a=r(916537),c=r(360113);const i=({mac:e,compact:t=!1})=>e?n.createElement(c.A,{compact:t},n.createElement(l.A,{color:"text-2",size:"medium"},n.createElement(a.sA,{id:"COMMON_MAC_ADDRESS"})),n.createElement(l.A,{color:"text-3",size:"medium"},e)):null},124092(e,t,r){r.d(t,{A:()=>v});var n=r(469733),l=r(296540),a=r(962926),c=r(705145),i=r(71479),o=r(132196),m=r(6510),s=r(130851),E=r(566723),d=r(294303),u=r(6176);const A=o.AH`
  margin-bottom: ${E.Ln};
  margin-top: ${E.Ln};
`,p=(0,i.A)("div")`
  align-self: center;
  overflow: hidden;
  word-break: break-word;
`,_=(0,i.A)("img")`
  width: 40px;
  height: 40px;
  object-fit: contain;
`,v=({children:e,description:t,meshingDescription:r,isOffline:i,activeItem:v,style:g,className:C,isStacking:N,badge:h})=>{const I=(0,n.useSelector)(s.p);return l.createElement(a.A,{className:(0,o.cx)(A,C),sections:[l.createElement("div",null,l.createElement(d.A,{gap:E.kc},N?l.createElement(_,{src:`${I}/topology/stacking.png`,alt:"stacked"}):l.createElement(u.A,{model:v.model,width:40,height:40}),l.createElement(p,{style:g},l.createElement(c.A,{color:i?"text-3":"text-1",weight:"bold",isTruncated:!0},(0,m.Lm)(v.model),h),t)),r,e)]})}},812454(e,t,r){r.d(t,{A:()=>z});var n=r(296540),l=r(71479),a=r(566723),c=r(218234),i=r(294303),o=r(217439),m=r(382389),s=r(842630),E=r(224948),d=r(916537),u=r(469733),A=r(824182),p=r(264963),_=r(822336),v=r(705145);const g=(0,l.A)(i.A)`
  flex-direction: column;
  margin-top: ${a.kc};
  padding-top: ${a.kc};
  border-top: ${({theme:{themeName:e}})=>_.Ay[`desktop-border-divider-${e}`]};
`,C=(0,l.A)(i.A)`
  width: 100%;
  justify-content: space-between;
`,N=(0,l.A)(i.A)`
  gap: ${a.Ln};
  align-items: center;
`,h=(0,l.A)(v.A)`
  max-width: 150px;
`,I=(0,n.memo)(({mac:e,replacementMac:t})=>{const r=(0,u.useDispatch)(),[l,a]=(0,n.useState)(!1),c=(0,n.useCallback)(()=>{a(!0),r((0,p.X2)(e)).finally(()=>{a(!1)})},[r,e]);return n.createElement(g,null,n.createElement(C,null,n.createElement(h,{isTruncated:!0,size:"medium",color:"text-2"},n.createElement(d.sA,{id:"DEVICE_REPLACEMENT_DEVICE"})),n.createElement(N,null,n.createElement(o.A,{size:"medium",color:"text-3"},t),n.createElement(A.A,{actionable:!0,onClick:c,disabled:l}))))}),O=(0,l.A)(i.A)`
  flex-direction: column;
  gap: ${a.kc};
`;var f=r(709690),b=r(823858),w=r(768195);const M=({state:e},{uBlue06:t,orange06:r})=>e===w.gQ.WAITING_FOR_REPLACEMENT?n.createElement(f.A,{size:"original",color:t,variant:"fill"}):n.createElement(b.A,{size:"original",color:r,variant:"fill"}),T=({state:e})=>{switch(e){case w.gQ.WAITING_FOR_REPLACEMENT:return"DEVICE_REPLACEMENT_PENDING_WAITING_FOR_REPLACEMENT";case w.gQ.WAITING_FOR_REPLACED_DEVICE_DISCONNECT:return"DEVICE_REPLACEMENT_PENDING_WAITING_FOR_REPLACED_DEVICE_DISCONNECT";case w.gQ.INCOMPATIBLE_REPLACEMENT:return"DEVICE_REPLACEMENT_PENDING_INCOMPATIBLE_REPLACEMENT";default:return"DEVICE_REPLACEMENT_PENDING_CANNOT_REPLACE"}},D=(0,n.memo)(({mac:e,replacement:t})=>{const{motifPalette:r}=(0,m.u)();return t?.device_mac?n.createElement(s.A,null,n.createElement(E.A,{icon:M(t,r)},n.createElement(O,null,n.createElement(o.A,{size:"medium",color:"text-2"},n.createElement(d.sA,{id:T(t),values:{b:d.b}}))),n.createElement(I,{mac:e,replacementMac:t.device_mac}))):null});var S=r(211908),R=r(129361),k=r(470962),L=r(281884),x=r(451632),y=r(392699),P=r(124092),H=r(236037),V=r(683086);const $=(0,l.A)(i.A)`
  & > :first-child {
    margin-top: ${a.kc};
  }
`,z=({activeItem:e,activeItem:{deviceState:t,uplink:r,mac:l,model:i,type:o,replacement:m},showPortOverview:s,hidePortsButton:E,isStacking:d,multipleDisplayedDevicesData:u,overviewChildren:A,children:p,badge:_})=>{const v=(0,n.useMemo)(()=>(0,L.H)(t,r?.type),[t,r?.type]),g=Boolean(e?.port_table?.length),C=s&&g;return n.createElement(n.Fragment,null,n.createElement(P.A,{activeItem:e,isOffline:v===y.v.OFFLINE,description:n.createElement(R.A,{activeItem:e,connectionStatus:v}),meshingDescription:n.createElement(x.A,{activeItem:e,connectionStatus:v}),isStacking:d,badge:_},A,C?n.createElement("div",{style:{marginTop:a.Ln}},n.createElement(c.A,{activeItem:e,disableOnPortClick:!0,showFullScreenDiagramButton:!1,useBubbleWrapper:!1,multipleDisplayedDevicesData:u,isStacking:d})):null,n.createElement($,{gap:a.kc,flexDirection:"column"},n.createElement(H.A,{activeItem:e}),!E&&g?n.createElement(V.A,{mac:l}):null),p),v===y.v.OFFLINE?n.createElement(k.A,null,m?.device_mac?null:n.createElement(S.A,{mac:l,model:i,type:o})):null,n.createElement(D,{mac:l,replacement:m}))}},643633(e,t,r){r.d(t,{A:()=>i});var n=r(296540),l=r(217439),a=r(294303),c=r(916537);const i=({color:e})=>n.createElement(n.Fragment,null,n.createElement(a.A,null,n.createElement(l.A,{weight:"bold",color:e},n.createElement(c.sA,{id:"AP_LOW_UPLINK_SPEED_NOTIFICATION_TITLE"}))),n.createElement(a.A,null,n.createElement(l.A,{color:e},n.createElement(c.sA,{id:"AP_LOW_UPLINK_SPEED_NOTIFICATION_BODY"}))))},280258(e,t,r){r.d(t,{H:()=>n});const n=""},596441(e,t,r){r.d(t,{I:()=>n});const n={HEADER_HEIGHT:32,ROW_HEIGHT:32,EDIT_FIELD_HEIGHT:36,getHeight(e,t,r,n){return Math.min((n||this.ROW_HEIGHT)*e+(r??this.HEADER_HEIGHT),(n||this.ROW_HEIGHT)*t+(r??this.HEADER_HEIGHT))},getEditContainerHeight(e,t,r){return Math.min((r||this.EDIT_FIELD_HEIGHT)*e,(r||this.EDIT_FIELD_HEIGHT)*t)}}},879905(e,t,r){r.d(t,{A:()=>m});var n=r(296540),l=r(217439),a=r(758649),c=r(566723),i=r(294303),o=r(916537);const m=(e,t={})=>{const{formatMessage:r}=(0,o.tz)(),[m,s]=(0,n.useState)(!1),{defaultCount:E,label:{singular:d,plural:u}}=(0,n.useMemo)(()=>({defaultCount:t.defaultCount||6,label:{singular:r({id:t.label?.singular||"COMMON_DEVICE"}),plural:r({id:t.label?.plural||"COMMON_DEVICES"})}}),[t,r]),A=(0,n.useCallback)(()=>{s(e=>!e)},[]);return{rowLimit:e>E&&!m?E:e,renderFooter:e>E?n.createElement(i.A,{marginTop:c.kc},n.createElement(l.A,{size:"medium"},n.createElement(o.sA,{id:"COMMON_ADV_TABLE_FOOTER",values:{length:e>E&&!m?E:e,total:e,singular:d,plural:u}}),n.createElement(n.Fragment,null," ",n.createElement(a.A,{type:"button",variant:"inline",onClick:A},n.createElement(o.sA,{id:"COMMON_SHOW"})," ",n.createElement(o.sA,{id:m?"COMMON_LESS":"COMMON_ALL"}))))):null,setExpand:s}}},212178(e,t,r){r.d(t,{A:()=>l});var n=r(296540);const l=e=>{const t=(0,n.useRef)();return(0,n.useEffect)(()=>{t.current=e},[e]),t.current}},362412(e,t,r){r.d(t,{A:()=>E});var n=r(296540),l=r(469733),a=r(436331),c=r(805837),i=r(282556),o=r(71265);const m=e=>n.createElement(a.A,{renderOption:c.q,...e}),s=e=>n.createElement(m,{...e});s.Sorted=e=>{const t=(0,l.useSelector)(i.zi),r=(0,n.useMemo)(()=>(0,o.k)(t),[t]);return n.createElement(m,{...e,sortBy:r})};const E=s},71265(e,t,r){r.d(t,{R:()=>E,k:()=>d});var n=r(280258),l=r(190497),a=r(953048),c=r(175522),i=r(936621),o=r(742525);const m=[...new Set([n.H,c.Q.join(c.A),a.Zt,i.F,l.nc,o.Vr])],s={numeric:!0,sensitivity:"base"},E=(e,t)=>{const r=[];for(let n=e;n<=t;n+=1)r.push({value:n,label:String(n)});return r},d=e=>({value:t,label:r},{value:n,label:l})=>m.includes(t?.toString())||m.includes(n?.toString())?1/0:r?.toString().localeCompare(l?.toString(),e,s)??-1},131147(e,t,r){r.d(t,{A:()=>m});var n=r(296540),l=r(469733),a=r(874734),c=r(417378),i=r(778851);const o={[a.OH.PRD]:"6Ld47OUpAAAAALQ4AgR1gfk-hnSw27y3zIMKLOSw",[a.OH.STG]:"6LeKc-UpAAAAAN6YqRab29cPCbU-cfe7_EvchSvc",[a.OH.DEV]:"6LeocOUpAAAAANmIju4N9DzlkK4UNYdYThrUkK3y"},m=e=>{const[t,r]=(0,n.useState)(),a=(0,n.useRef)(),m=(0,l.useSelector)(c.S$),s=(0,i.GO)(m);return(0,n.useEffect)(()=>{const t=()=>{const{grecaptcha:n}=window;n?.enterprise.ready(()=>r(()=>()=>n.enterprise.execute(o[s],{action:e}))),a.current?.removeEventListener("load",t)};return"grecaptcha"in window?t():(a.current=document.createElement("script"),a.current.src=(e=>`https://www.google.com/recaptcha/enterprise.js?render=${o[e]}`)(s),a.current.addEventListener("load",t),document.body.appendChild(a.current),(()=>{const e="hide-grecaptcha-badge";if(document.getElementById(e))return;const t=document.createElement("style");t.id=e,t.innerText=".grecaptcha-badge { visibility: hidden; }",document.head.appendChild(t)})()),()=>{a.current?.removeEventListener("load",t)}},[]),t}}}]);