"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[11673],{183989(e,t,a){a.d(t,{aQ:()=>o,bB:()=>l});var r=a(489050),n=a(789768),s=a(953141),i=a(16795);const c=e=>({error:e,type:i.ID}),l=()=>e=>{r.K.post("/api/logout").then(()=>e((0,n.oX)()))},o=e=>async t=>{await t({type:i.V8});try{return await r.K.post("/api/login",{strict:!0,...e}),t(async e=>e({type:i.FE}))}catch(e){const{response:a}=e;if(400===a?.status&&a?.data)switch(a.data?.meta?.msg){case s.ApiString.apiErrUbic2faTokenRequired:return t(((e=!1)=>({type:i.HH,payload:{require2Fa:e}}))(!0));case s.ApiString.apiErrInvalid2FAToken:return t(c("COMMON_VALIDATION_INVALID_2FA_TOKEN"))}return t(c(400===a?.status?"COMMON_VALIDATION_INVALID_USERNAME_OR_PASSWORD":"COMMON_NOTICE_REQUEST_ERROR"))}}},17724(e,t,a){a.r(t),a.d(t,{default:()=>U});var r=a(296540),n=a(469733),s=a(217439),i=a(932837),c=a(758649),l=a(566198),o=a(256126),A=a(451919),E=a(510497),d=a(801081),u=a(139587),O=a(276907),p=a(919952);const m=(0,d.Mz)(e=>e[p.U.SHARED][O.N.LOADER_ADAPTER],e=>e[u.V.REASONS]);var _=a(294303),N=a(183989),T=a(916537),g=a(602021),I=a(968906),R=a(227598),f=a(633620),h=a(427463),S=a(71479),C=a(566723);const k=(0,S.A)(f.A)`
  margin-right: ${C.Ln};
  height: 24px;
  width: 24px;
`,D=(0,S.A)(h.A)`
  margin-right: ${C.kc};
  height: 16px;
  width: 16px;
`,M=(0,S.A)(R.A)`
  left: 50px;
`,U=()=>{const e=(0,n.useDispatch)(),t=(0,n.useSelector)(m),a=(0,n.useSelector)(g.AF),d=(0,n.useSelector)(g.LF),u=(0,r.useCallback)(()=>{a&&E.u.setItem(A.lP.HOTSPOT_LOGOUT_SITE_NAME,d),e((0,N.bB)())},[e,a,d]),O=(0,r.useCallback)(()=>r.createElement(_.A,{...I.A.addDataTestId(I.A.TestId.HEADER_USERICON)},r.createElement(k,{actionable:!0})),[]);return r.createElement(l.A,{size:"classic",title:r.createElement(s.A,{size:"xlarge-1",weight:"regular",color:"text-3"},r.createElement(T.sA,{id:"COMMON_NETWORK"})),icon:r.createElement(o.A,{size:"full"})},t.length?r.createElement(M,{isLoading:!0,placement:"bottom"}):null,r.createElement(_.A,null,r.createElement(i.A,{renderToggle:O,size:"small",align:"bottomCenter",toggleOffset:8},r.createElement(_.A,{alignContent:"center"},r.createElement(D,{isActive:!0}),r.createElement(c.A,{type:"button",variant:"inline",onClick:u,...I.A.addDataTestId(I.A.TestId.HEADER_SIGNOUT_BUTTON)},r.createElement(T.sA,{id:"COMMON_HEADER_USER_PROFILE_SIGN_OUT"}))))))}},489050(e,t,a){a.d(t,{K:()=>c,o:()=>i});var r=a(272505),n=a.n(r);const s=n().create({baseURL:"/",withCredentials:!0,xsrfCookieName:"csrf_token",xsrfHeaderName:"X-Csrf-Token"}),i=n().create();s.interceptors.response.use(e=>e.data&&e.data instanceof ArrayBuffer?e:{...e,data:e.data.data,meta:e.data.meta});const c=s}}]);