"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[11673,83102],{17724:(e,t,a)=>{a.r(t),a.d(t,{default:()=>D});var r=a(469733),n=a(296540),l=a(927099),c=a(832914),s=a(758649),o=a(566198),i=a(256126),E=a(451919),u=a(510497),A=a(801081),m=a(139587),d=a(276907),O=a(919952);const T=(0,A.Mz)(e=>e[O.U.SHARED][d.N.LOADER_ADAPTER],e=>e[m.V.REASONS]);var S=a(294303),f=a(183989),p=a(699784),N=a(602021),I=a(968906),_=a(227598),g=a(633620),h=a(427463),C=a(71479),k=a(566723);const M=(0,C.A)(g.A)`
  margin-right: ${k.Ln};
  height: 24px;
  width: 24px;
`,R=(0,C.A)(h.A)`
  margin-right: ${k.kc};
  height: 16px;
  width: 16px;
`,b=(0,C.A)(_.A)`
  left: 50px;
`,D=()=>{const e=(0,r.useDispatch)(),t=(0,r.useSelector)(T),a=(0,r.useSelector)(N.AF),A=(0,r.useSelector)(N.LF),m=(0,n.useCallback)(()=>{a&&u.u.setItem(E.lP.HOTSPOT_LOGOUT_SITE_NAME,A),e((0,f.bB)())},[e,a,A]),d=(0,n.useCallback)(()=>n.createElement(S.A,{...I.A.addDataTestId(I.A.TestId.HEADER_USERICON)},n.createElement(M,{actionable:!0})),[]);return n.createElement(o.A,{size:"classic",title:n.createElement(l.A,{size:"header-s",weight:"normal",color:"tertiary"},n.createElement(p.sA,{id:"COMMON_NETWORK"})),icon:n.createElement(i.A,{size:"full"})},t.length?n.createElement(b,{isLoading:!0,placement:"bottom"}):null,n.createElement(S.A,null,n.createElement(c.A,{renderToggle:d,size:"small",align:"bottomCenter",toggleOffset:8},n.createElement(S.A,{alignContent:"center"},n.createElement(R,{isActive:!0}),n.createElement(s.A,{type:"button",variant:"inline",onClick:m,...I.A.addDataTestId(I.A.TestId.HEADER_SIGNOUT_BUTTON)},n.createElement(p.sA,{id:"COMMON_HEADER_USER_PROFILE_SIGN_OUT"}))))))}},183989:(e,t,a)=>{a.d(t,{aQ:()=>i,bB:()=>o});var r=a(489050),n=a(789768),l=a(953141),c=a(16795);const s=e=>({error:e,type:c.ID}),o=()=>e=>{r.K.post("/api/logout").then(()=>e((0,n.oX)()))},i=e=>async t=>{await t({type:c.V8});try{return await r.K.post("/api/login",{strict:!0,...e}),t(async e=>e({type:c.FE}))}catch(e){const{response:a}=e;if(400===a?.status&&a?.data)switch(a.data?.meta?.msg){case l.U.apiErrUbic2faTokenRequired:return t(((e=!1)=>({type:c.HH,payload:{require2Fa:e}}))(!0));case l.U.apiErrInvalid2FAToken:return t(s("COMMON_VALIDATION_INVALID_2FA_TOKEN"))}return t(s(400===a?.status?"COMMON_VALIDATION_INVALID_USERNAME_OR_PASSWORD":"COMMON_NOTICE_REQUEST_ERROR"))}}},489050:(e,t,a)=>{a.d(t,{K:()=>s,o:()=>c});var r=a(272505),n=a.n(r);const l=n().create({baseURL:"/",withCredentials:!0,xsrfCookieName:"csrf_token",xsrfHeaderName:"X-Csrf-Token"}),c=n().create();l.interceptors.response.use(e=>e.data&&e.data instanceof ArrayBuffer?e:{...e,data:e.data.data,meta:e.data.meta});const s=l},762934:(e,t,a)=>{a.r(t),a.d(t,{default:()=>F});var r=a(956347),n=a(296540),l=a(136048),c=a(589195),s=a(156548),o=a(98160),i=a(17724),E=a(627440),u=a(596731),A=a(118835),m=a(616660),d=a(864768),O=a(260183),T=a(144463);const S=`${u.eu}/${E.VO.CLIENTS}/${A.M.HOTSPOT}/${u.hH}`,{footer:f,columns:p,editor:N,children:I}=T.O[A.M.HOTSPOT]||{},_=f,g=p,h=N,C=I;var k=a(469733),M=a(834959),R=a(604482),b=a(413357),D=a(165758),H=a(793177),L=a(105540),U=a(736388),w=a(582724),y=a(194381);const P=e=>{const t=(0,k.useSelector)(H.j7),a=(0,n.useMemo)(()=>(0,D.Z)(A.M.HOTSPOT,t),[t]);return(0,w.A)([(0,b.Zi)(M.B.HOTSPOT),(0,b.Zi)(M.B.CLIENTS)],n.createElement(n.Suspense,{fallback:null},n.createElement(L.A,{leftFilterPageId:R.g1.ISOLATED_HOTSPOT_MANAGER,content:n.createElement(U.A,{leftFilterPageId:R.g1.CLIENTS,leftFilterColumnsId:a,footer:_,columns:g,editor:h},C)},n.createElement(y.A,null))))},F=({location:{key:e},match:{params:t},showNetworkServerHeader:a})=>{(0,n.useEffect)(()=>{d.A.captureMessage(d.A.NetworkSentryMessage.hotspotManagerRedirect)},[]);const T=(0,n.useCallback)(()=>(0,r.tW)(u.Si[E.VO.CLIENTS],{...t,section:A.M.HOTSPOT,subSection:m.z.GUESTS}),[t]);return n.createElement(n.Fragment,null,a?n.createElement(i.default,null):null,n.createElement(o.A,null,n.createElement(O.N,null,n.createElement(n.Suspense,{fallback:null},n.createElement(r.dO,null,n.createElement(l.F,{path:S,component:P}),n.createElement(r.rd,{from:"*",to:T()}))),n.createElement(s.default,{key:e}),n.createElement(c.default,null))))}}}]);