"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[225],{42873(e,t,n){n.d(t,{A:()=>r});var a=n(296540),i=n(629318);const r=(0,n(51946).w)(e=>(0,a.createElement)("svg",(0,i.d)({viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em"},e),(0,a.createElement)("circle",{cx:10,cy:10,r:4,fill:"currentColor",className:e.twotonedclassname}),(0,a.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.697 4.696a.53.53 0 0 1 .013.72 6.999 6.999 0 0 0 0 9.166.53.53 0 0 1-.013.72.477.477 0 0 1-.697-.01 7.995 7.995 0 0 1-2-5.293 8 8 0 0 1 2-5.292.477.477 0 0 1 .697-.01ZM10 13a3 3 0 1 0 0-6 3 3 0 0 0 0 6Zm0 1a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm5.29.583a.53.53 0 0 0 .014.72.477.477 0 0 0 .696-.01 7.97 7.97 0 0 0 1.392-2.231A8 8 0 0 0 16 4.708a.477.477 0 0 0-.696-.01.53.53 0 0 0-.013.72 7 7 0 0 1 0 9.165ZM6.115 6.114c.198.197.195.516.019.732a4.99 4.99 0 0 0 0 6.307c.176.216.179.535-.019.732a.474.474 0 0 1-.698-.015 6.03 6.03 0 0 1-.96-1.574 6 6 0 0 1 .96-6.167.474.474 0 0 1 .698-.015Zm7.754 7.04c-.177.216-.179.535.018.732a.474.474 0 0 0 .7-.015 5.996 5.996 0 0 0 .958-6.167 6 6 0 0 0-.959-1.575.474.474 0 0 0-.699-.014c-.197.197-.194.515-.018.732a4.99 4.99 0 0 1 0 6.307Z",fill:"currentColor",className:e.baseclassname}),(0,a.createElement)("path",{d:"M4.71 5.417a.53.53 0 0 0-.013-.72.477.477 0 0 0-.697.01A7.994 7.994 0 0 0 2 10a8 8 0 0 0 2 5.292.477.477 0 0 0 .697.011.53.53 0 0 0 .013-.72 6.999 6.999 0 0 1 0-9.165Zm6.029 8.515a4.001 4.001 0 1 0-1.48-7.865 4.001 4.001 0 0 0 1.48 7.865Zm4.565 1.371a.53.53 0 0 1-.013-.72 7 7 0 0 0 0-9.165.53.53 0 0 1 .013-.72.477.477 0 0 1 .696.01 7.975 7.975 0 0 1 1.392 2.231A8 8 0 0 1 16 15.293a.477.477 0 0 1-.696.01Z",fill:"currentColor",className:e.fillclassname}),(0,a.createElement)("path",{d:"M6.133 6.846c.176-.216.179-.535-.019-.732a.474.474 0 0 0-.698.015 6.004 6.004 0 0 0-.96 6.167 6 6 0 0 0 .96 1.574c.18.214.501.212.698.015.198-.197.195-.515.019-.732a4.99 4.99 0 0 1 0-6.307Zm7.753 7.04c-.197-.197-.194-.516-.018-.732a4.99 4.99 0 0 0 0-6.307c-.177-.217-.179-.535.018-.732a.474.474 0 0 1 .7.014 5.97 5.97 0 0 1 .958 1.575 6 6 0 0 1-.959 6.167.474.474 0 0 1-.699.015Z",fill:"currentColor",className:e.fillclassname})))},517994(e,t,n){n.d(t,{$m:()=>o,ne:()=>c,xt:()=>m});var a=n(691189),i=n(87485),r=n(294201),l=n(751156);const c=({start:e,end:t},n={},i={})=>(0,a.An)([{model:l.A2,payload:(n=[])=>[{hotspotGuests:n,[l.RR]:`${e}_${t}`}]}],l.gI,{queryParams:{start:e,end:t},...n},{idField:l.RR,...i}),o=(e,t,n={})=>(0,a.Xj)(r.A.EXTEND,l.BX,{_id:e},{...(0,i.rk)("HOTSPOT_ACTIONS_EXTEND_ERROR",{guestName:t}),...n}),m=(e,t,n={})=>(0,a.Xj)(r.A.TERMINATE,l.BX,{_id:e},{...(0,i.rk)("HOTSPOT_ACTIONS_UNAUTHORIZE_ERROR",{guestName:t}),...n})},147824(e,t,n){var a;n.d(t,{u:()=>a}),function(e){e.NONE="none",e.VOUCHER="voucher",e.FREE="free",e.CREDIT="credit",e.MERCADOPAGO="mercadopago",e.TWOCHECKOUT="twocheckout",e.PASSWORD="password",e.RADIUS="radius",e.API="api",e.GOOGLE="google",e.FACEBOOK="facebook"}(a||(a={}))},974675(e,t,n){n.d(t,{ol:()=>d,cd:()=>o,A:()=>c,R9:()=>s,xt:()=>u,Ds:()=>m});var a=n(691189),i=n(294201),r=n(87485);const l=`${n(771805).J}/cmd/stamgr`,c=(e,t,n={})=>(0,a.Xj)(i.A.FORGET_STA,l,{macs:e},{...(0,r.rk)("CLIENTS_ACTIONS_REMOVE_ERROR",{clientName:t}),...n}),o=(e,t,n={})=>(0,a.Xj)(i.A.BLOCK_STA,l,{mac:e},{...(0,r.rk)("CLIENTS_ACTIONS_BLOCK_ERROR",{clientName:t}),...n}),m=(e,t,n={})=>(0,a.Xj)(i.A.UNBLOCK_STA,l,{mac:e},{...(0,r.rk)("CLIENTS_ACTIONS_UNBLOCK_ERROR",{clientName:t}),...n}),s=(e,t,n={})=>(0,a.Xj)(i.A.KICK_STA,l,{mac:e},{...(0,r.rk)("CLIENTS_ACTIONS_RECONNECT_ERROR",{clientName:t}),...n}),d=(e,t,n={})=>(0,a.Xj)(i.A.AUTHORIZE_GUEST,l,{mac:e},{...(0,r.rk)("CLIENTS_ACTIONS_AUTHORIZE_ERROR",{clientName:t}),...n}),u=(e,t,n={})=>(0,a.Xj)(i.A.UNAUTHORIZE_GUEST,l,{mac:e},{...(0,r.rk)("CLIENTS_ACTIONS_UNAUTHORIZE_ERROR",{clientName:t}),...n})},243322(e,t,n){n.d(t,{A:()=>i});var a=n(217439);const i=(0,n(71479).A)(a.A)`
  white-space: nowrap;
`},646189(e,t,n){n.d(t,{A:()=>A});var a=n(822336),i=n(296540),r=n(469733),l=n(71479),c=n(132196),o=n(801081),m=n(189601),s=n(609298),d=n(311785);const u=c.i7`
  0% {
    opacity: 0.0;
    transform: scale(0.3);
  }
  // fadein
  20% {
    opacity: 0.8;
  }
  // grow
  70% {
    transform: scale(0.8);
    opacity: 0.6;
  }
  // fadeout
  100% {
    opacity: 0.0;
    transform: scale(1.0);
  }
`,E=(0,l.A)("div",(0,d.A)("size","animationName","delay"))`
  position: absolute;
  border-radius: 50%;
  ${({size:e,theme:{themeName:t},delay:n,animationName:i})=>`\n    width: ${e}px;\n    height: ${e}px;\n    background: ${a.Ay[`desktop-color-ublue-03-${t}`]};\n    animation-delay: ${n}ms;\n    animation-name: ${i};\n  `}
  animation-duration: ${2e3}ms;
  animation-iteration-count: infinite;
  animation-timing-function: cubic-bezier(0, 0.3, 0.1, 0);
  z-index: -1;
  opacity: 0;
  transform: scale(0);
`,A=(0,i.memo)(({size:e,mac:t})=>(0,r.useSelector)((0,i.useMemo)(()=>(e=>(0,m.WY)()((0,o.Mz)(({models:t})=>t[s.G.SESSION_METADATA]?.byId?.[e],e=>Boolean(e)),e=>e))(t),[t]))?i.createElement(i.Fragment,null,i.createElement(E,{size:e,animationName:u,delay:-500}),i.createElement(E,{size:e,animationName:u,delay:-1500})):null)},689965(e,t,n){n.d(t,{A:()=>A,I:()=>a});var a,i=n(296540),r=n(822336),l=n(963724),c=n(71479),o=n(825032),m=n(566723),s=n(294303),d=n(311785);!function(e){e.ACCORDION="accordion",e.BUTTON_LIST="buttonList"}(a||(a={}));const u=(0,c.A)(s.A,(0,d.A)("marginBottom","isButtonList","margin","flex","width","padding","nested","background"))`
  background-color: ${({background:e,nested:t,theme:{themeName:n}})=>e||r.Ay[n===o.S.DARK?`desktop-color-neutral-${t?"00":"01"}-dark`:`desktop-color-neutral-${t?"01":"00"}-light`]};
  padding: ${({theme:e,isButtonList:t,padding:n})=>n||(t?`0 ${e.spacing["spacing-l"]}`:e.spacing["spacing-l"])};
  margin-bottom: ${({theme:e,marginBottom:t})=>t||e.spacing["spacing-l"]};
  ${({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}})=>r.Ay[`desktop-border-divider-${e}`]};\n      &:last-child {\n        border-bottom: none;\n      }\n    }\n  `:""}
`,E=(0,c.A)(l.A,(0,d.A)("marginBottom","margin","flex","padding","nested","background"))`
  background-color: ${({background:e,nested:t,theme:{themeName:n}})=>e||r.Ay[n===o.S.DARK?`desktop-color-neutral-${t?"00":"01"}-dark`:`desktop-color-neutral-${t?"01":"00"}-light`]};
  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,theme:{themeName:t}})=>e||r.Ay[t===o.S.DARK?"desktop-color-neutral-01-dark":"desktop-color-neutral-00-light"]};
      height: 48px;
      padding: 0 ${m.Ln};
    }
    > div:nth-child(2) {
      margin-bottom: 0;
      padding: 0;
      > div {
        padding: 0 ${m.Ln} ${m.Ln};
      }
    }
  }
`,A=({type:e,marginBottom:t,margin:n,padding:r,flex:l,width:c,nested:o,...m})=>"items"in m?i.createElement(E,{marginBottom:t,margin:n,padding:r,flex:l,nested:o,...m}):i.createElement(u,{nested:o,width:c,marginBottom:t,margin:n,padding:r,flex:l,isButtonList:e===a.BUTTON_LIST,...m},m.children)},369702(e,t,n){n.d(t,{A:()=>r});var a=n(296540),i=n(74750);const r=({children:e,...t})=>a.createElement(i.A,{variant:"secondary-emphasis",...t},e)},107748(e,t,n){n.d(t,{A:()=>A});var a=n(296540),i=n(469733),r=n(968906),l=n(398300),c=n(845030),o=n(951106),m=n(691294),s=n(6510),d=n(94313),u=n(623771);const E=({uplinkDevice:e,client:t,maxWidth:n})=>{const m=(0,i.useDispatch)(),E=(0,s.Q)(e),A=(0,o.f2)(t,e),p=(0,a.useCallback)(()=>{m((0,c.XP)({type:l.H.DEVICE,id:e?.mac}))},[m,e?.mac]);return E?a.createElement(d.A,{messageId:"COMMON_CONNECTED_TO",buttonEl:a.createElement(u.A,{...r.A.addDataTestId(r.A.TestId.SIDE_PANEL_TRIGGER),onClick:p,name:E,port:A,size:"medium",maxWidth:n||195,separatePortNumber:!0,isFullWidth:!0})}):null},A=({uplinkDevice:e,client:t,maxWidth:n})=>t.status===m.S2.ONLINE?a.createElement(E,{uplinkDevice:e,client:t,maxWidth:n}):null},86571(e,t,n){n.d(t,{A:()=>l});var a=n(296540),i=n(217439),r=n(916537);const l=({id:e,children:t,values:n})=>a.createElement(i.A,{color:"text-1",weight:"bold",size:"medium"},e?a.createElement(r.sA,{id:e,values:n}):null,t)},643757(e,t,n){n.d(t,{A:()=>o});var a=n(296540),i=n(705145),r=n(180524);var l=n(566723),c=n(294303);const o=(0,a.memo)(({title:e,icon:t,maxWidth:n,disabled:o=!1})=>{const m=(0,a.useRef)(null),s=(e=>{const[t,n]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{e.current&&n(e.current.clientWidth<e.current.scrollWidth)},[e]),t})(m);return a.createElement(r.A,{description:s?e:void 0},a.createElement(c.A,{gap:l.YC,alignItems:"center",maxWidth:n},t,a.createElement(i.A,{isTruncated:!0,size:"medium",weight:"bold",color:o?"text-3":"text-1",ref:m},e)))})},995015(e,t,n){n.d(t,{p:()=>c});var a=n(822336),i=n(71479),r=n(294303),l=n(311785);const c=(0,i.A)(r.A,(0,l.A)("disabled"))`
  height: 48px;
  border-bottom: ${({theme:{themeName:e}})=>a.Ay[`desktop-border-divider-${e}`]};
  ${({disabled:e=!1})=>e&&"\n      opacity: 0.4;\n      pointer-events: none;\n  "}
`},312700(e,t,n){n.d(t,{A:()=>E});var a=n(469733),i=n(296540),r=n(217439),l=n(646189),c=n(703447),o=n(916537),m=n(776309),s=n(126457),d=n(951106),u=n(489146);const E=({activeItem:e,activeItem:{fingerprint:t,unifi_device_info:n,mac:E},size:A=80})=>{const p=(0,a.useDispatch)(),{isFingerprintFromUiDb:h}=(0,i.useMemo)(()=>({fingerprintHasOverride:(0,d.n8)(t),isFingerprintFromUiDb:(0,d.fN)(n)}),[n,t]);return i.createElement(u.qN,{onClick:()=>{p((e=>(0,s.to)({modalType:m.A.REPORT_CLIENT_ICON,modalProps:{activeItem:e}}))(e))}},i.createElement(c.A,{client:e,grid:!0}),i.createElement(l.A,{size:A,mac:E}),h?null:i.createElement(u.XV,{className:"report-icon"},i.createElement(r.A,{color:"inherit"},i.createElement(o.sA,{id:"COMMON_CHANGE_ICON"}))))}},489146(e,t,n){n.d(t,{XV:()=>o,fI:()=>m,qN:()=>c,u0:()=>s});var a=n(822336),i=n(71479),r=n(566723),l=n(294303);const c=(0,i.A)(l.A)`
  position: relative;
  width: 80px;
  min-width: 80px;
  height: 80px;
  border-radius: 8px;
  justify-content: center;
  transition: 0.25s ease;
  &:hover {
    cursor: pointer;
    background-color: ${({theme:{themeName:e}})=>a.Ay[`desktop-color-neutral-01-${e}`]};
    .report-icon {
      opacity: 1;
    }
  }
`,o=(0,i.A)(l.A)`
  width: 100%;
  height: 20px;
  position: absolute;
  opacity: 0;
  border-radius: 0 0 8px 8px;
  color: #ffffff;
  background-color: rgb(14, 14, 14, 0.5);
  bottom: 0;
  justify-content: center;
  transition: 0.25s ease;
`,m=((0,i.A)(l.A)`
  align-items: center;
  gap: ${r.kc};
  margin-top: ${r.kc};
  line-height: initial;
`,(0,i.A)(l.A)`
  align-items: baseline;
  gap: ${r.xO};
`),s=(0,i.A)(l.A)`
  align-items: baseline;
  gap: ${r.YC};
  white-space: nowrap;
`},94313(e,t,n){n.d(t,{A:()=>A});var a=n(296540),i=n(71479),r=n(132196),l=n(311785),c=n(916537),o=n(566723),m=n(294303),s=n(243322);const d=(0,i.A)(m.A,(0,l.A)("alignLeft"))`
  ${({alignLeft:e})=>e?"max-width: 288px;":"max-width: 100%; justify-content: center;"}
  gap: ${o.YC};
  align-items: center;
`,u=r.AH`
  max-width: 50%;
`,E=r.AH`
  flex: 0 1 auto;
  min-width: 0;
`,A=({messageId:e,messageValues:t,buttonEl:n,alignLeft:i=!0,color:r="text-3",variant:l="body-primary"})=>a.createElement(d,{alignLeft:i},a.createElement(s.A,{variant:l,color:r},t?a.createElement(m.A,{maxWidth:288,whiteSpace:"nowrap",paddingRight:o.YC},a.createElement(c.sA,{id:e,values:t})):a.createElement(c.sA,{id:e})),n?a.createElement(m.A,{className:i?E:u},n):null)},360113(e,t,n){n.d(t,{A:()=>m});var a=n(296540),i=n(71479),r=n(566723),l=n(294303),c=n(311785);const o=(0,i.A)(l.A,(0,c.A)("valueMaxWidth","keyMinWidth","compact"))`
  &:not(:last-child) {
    ${({compact:e})=>e?"":`margin-bottom: ${r.kc};`}
  }
  & > {
    &:nth-child(1) {
      min-width: ${({keyMinWidth:e})=>e}px;
    }
    &:nth-child(2) {
      max-width: ${({valueMaxWidth:e})=>e}px;
    }
  }
`,m=({children:e,valueMaxWidth:t=215,keyMinWidth:n=0,flexProps:i={},compact:l=!1})=>a.createElement(o,{width:"100%",justifyContent:"space-between",gap:r.kc,height:l?void 0:24,valueMaxWidth:t,keyMinWidth:n,compact:l,...i},e)},167013(e,t,n){n.r(t),n.d(t,{default:()=>G});var a=n(296540),i=n(469733),r=n(217439),l=n(705145),c=n(573531),o=n(86571),m=n(294303),s=n(689965),d=n(916537),u=n(602021),E=n(532419),A=n(691294),p=n(239417),h=n(360113),g=n(743891),O=n(822336),_=n(271856),T=n(42873),N=n(382389),C=n(566723),f=n(643757),x=n(107748),S=n(312700),v=n(369702),b=n(126457),k=n(86392),I=n(793177),R=n(517994),M=n(147824);const y=(0,a.memo)(({_id:e,display_name:t,authorized:n,authorized_by:r})=>{const l=(0,i.useDispatch)(),{startDate:c,endDate:o}=(0,i.useSelector)(I.K5),s=(0,a.useCallback)(()=>l((0,R.$m)(e,t)).then(()=>l((0,b.AS)())).then(()=>l((0,R.ne)({start:c.getTime(),end:o.getTime()},void 0))),[e,t,o,c,l]),u=(0,a.useCallback)(()=>l((0,k.E)({title:"HOTSPOT_EXTEND_GUEST_TITLE",message:"HOTSPOT_EXTEND_GUEST_MESSAGE",messageValues:{guestName:t},onConfirm:s})),[l,t,s]),E=(0,a.useCallback)(()=>l((0,R.xt)(e,t)).then(()=>l((0,b.AS)())).then(()=>l((0,R.ne)({start:c.getTime(),end:o.getTime()},void 0))),[e,t,c,o,l]),A=(0,a.useCallback)(()=>l((0,k.E)({title:"HOTSPOT_UNAUTHORIZE_GUEST_TITLE",message:"HOTSPOT_UNAUTHORIZE_GUEST_MESSAGE",messageValues:{guestName:t},onConfirm:E})),[E,l,t]);return a.createElement(m.A,{justifyContent:"space-between",marginTop:C.kc,lineHeight:"initial",gap:C.kc},a.createElement(v.A,{onClick:u,width:"full"},a.createElement(d.sA,{id:"COMMON_ACTION_EXTEND"})),(e=>e!==M.u.NONE)(r)&&n?a.createElement(v.A,{onClick:A,width:"full"},a.createElement(d.sA,{id:"COMMON_ACTION_UNAUTHORIZE"})):null)}),$=({_id:e,hotspotClient:t,hotspotClient:{display_name:n,authorized:i},uplinkDevice:r,fingerprintData:l,authorized_by:c})=>{const{themeName:o}=(0,N.u)();return a.createElement(s.A,{marginBottom:C.Ln,padding:C.Ln},a.createElement(m.A,{flexDirection:"row",alignItems:"stretch",justifyContent:"flex-start",gap:C.kc},a.createElement(S.A,{activeItem:t}),a.createElement(m.A,{flexDirection:"column",justifyContent:"space-between",alignItems:"stretch",overflow:"hidden",flex:"1"},a.createElement(m.A,{flexDirection:"column"},a.createElement(f.A,{title:n||l?.fingerprint_device_name,icon:a.createElement(_.A,{portal:!0,description:a.createElement(d.sA,{id:"COMMON_GUEST"})},a.createElement(T.A,{width:20,height:20,color:O.Ay[`desktop-color-neutral-08-${o}`]}))}),a.createElement(x.A,{uplinkDevice:r,client:t})),a.createElement(y,{_id:e,display_name:n,authorized:i,authorized_by:c}))))};var D=n(758649),w=n(995015),U=n(974675),L=n(610783);const z=(0,a.memo)(({mac:e,status:t,display_name:n,blocked:l})=>{const c=(0,i.useDispatch)(),[o,m]=(0,a.useState)(!1),[u,E]=(0,a.useState)(!1),[p,h]=(0,a.useState)(!1),g=(0,a.useCallback)(()=>{m(!0),c((0,U.R9)(e,n)).then(()=>c((0,b.AS)())).finally(()=>{m(!1)})},[c,e,n]),O=(0,a.useCallback)(()=>c((0,k.E)({title:"HOTSPOT_RECONNECT_GUEST_TITLE",titleValues:{guestName:n},message:"HOTSPOT_RECONNECT_GUEST_MESSAGE",messageValues:{guestName:n},onConfirm:g})),[c,n,g]),_=(0,a.useCallback)(()=>{E(!0),c((0,U.cd)(e,n)).then(()=>c((0,b.AS)())).then(()=>c((0,L.s)())).finally(()=>{E(!1)})},[c,n,e]),T=(0,a.useCallback)(()=>c((0,k.E)({title:"HOTSPOT_BLOCK_GUEST_TITLE",message:"HOTSPOT_BLOCK_GUEST_MESSAGE",messageValues:{guestName:n},onConfirm:_})),[c,n,_]),N=(0,a.useCallback)(()=>{h(!0),c((0,U.Ds)(e,n)).then(()=>c((0,b.AS)())).then(()=>c((0,L.s)())).finally(()=>{h(!1)})},[c,n,e]),C=(0,a.useCallback)(()=>c((0,k.E)({title:"HOTSPOT_UNBLOCK_GUEST_TITLE",titleValues:{guestName:n},message:"HOTSPOT_UNBLOCK_GUEST_MESSAGE",messageValues:{guestName:n},onConfirm:N})),[c,N,n]);return a.createElement(s.A,{type:s.I.BUTTON_LIST},a.createElement(w.p,{disabled:o},a.createElement(D.A,{type:"button",variant:"inline",onClick:O,disabled:t!==A.S2.ONLINE},a.createElement(r.A,{size:"medium",color:"inherit"},a.createElement(d.sA,{id:"COMMON_ACTION_RECONNECT"})))),a.createElement(w.p,{disabled:u||p},a.createElement(D.A,{type:"button",variant:"inline",color:"danger",onClick:l?C:T},a.createElement(r.A,{size:"medium",color:"inherit"},a.createElement(d.sA,{id:l?"COMMON_ACTION_UNBLOCK":"COMMON_ACTION_BLOCK"})))))});var H=n(546391);const B=({authorized_by:e,voucher_code:t,activeItemPackage:n})=>{switch(e){case M.u.VOUCHER:return a.createElement(a.Fragment,null,a.createElement(h.A,null,a.createElement(r.A,{color:"text-2",size:"medium"},a.createElement(d.sA,{id:"COMMON_METHOD"})),a.createElement(l.A,{color:"text-3",size:"medium",isTruncated:!0},a.createElement(d.sA,{id:"HOTSPOT_VOUCHER"}))),a.createElement(h.A,null,a.createElement(r.A,{color:"text-2",size:"medium"},a.createElement(d.sA,{id:"HOTSPOT_VOUCHER_CODE"})),a.createElement(l.A,{color:"text-3",size:"medium",isTruncated:!0},t?.replace(H.fe,"$&-"))));case M.u.FREE:return a.createElement(h.A,null,a.createElement(r.A,{color:"text-2",size:"medium"},a.createElement(d.sA,{id:"COMMON_METHOD"})),a.createElement(l.A,{color:"text-3",size:"medium",isTruncated:!0},a.createElement(d.sA,{id:"HOTSPOT_FREE_TRIAL"})));case M.u.CREDIT:return a.createElement(h.A,null,a.createElement(r.A,{color:"text-2",size:"medium"},a.createElement(d.sA,{id:"COMMON_METHOD"})),a.createElement(l.A,{color:"text-3",size:"medium",isTruncated:!0},n));default:return e?a.createElement(h.A,null,a.createElement(r.A,{color:"text-2",size:"medium"},a.createElement(d.sA,{id:"COMMON_METHOD"})),a.createElement(l.A,{color:"text-3",size:"medium",isTruncated:!0},`${e.charAt(0).toUpperCase()}${e.slice(1).toLowerCase()}`)):null}},G=({activeItem:{_id:e,mac:t,authorized_by:n,voucher_code:O,package:_,hotspot_client:T}})=>{const N=(0,i.useSelector)(u.AF),C=(0,i.useSelector)((0,a.useMemo)(()=>T.fingerprint?(0,p.OF)(T.fingerprint):()=>({}),[T.fingerprint])),f=(0,i.useSelector)((0,a.useMemo)(()=>T.uplink_mac?(0,E.bw)(T.uplink_mac,["type","name","model","mac"]):()=>{},[T.uplink_mac])),x=(0,a.useMemo)(()=>[{id:"hotspot_methods",label:a.createElement(o.A,{id:"COMMON_AUTH"}),openByDefault:!0,renderContent:()=>a.createElement(m.A,{width:"100%",flexDirection:"column"},a.createElement(B,{authorized_by:n,voucher_code:O,activeItemPackage:_}),a.createElement(h.A,null,a.createElement(r.A,{color:"text-2",size:"medium"},a.createElement(d.sA,{id:"COMMON_NOTE"})),a.createElement(l.A,{color:"text-3",size:"medium",isTruncated:!0},T.note||c.L)))}],[n,O,_,T.note]);return a.createElement(a.Fragment,null,a.createElement($,{_id:e,hotspotClient:T,fingerprintData:C,uplinkDevice:f,authorized_by:n}),N?null:a.createElement(g.A,{activeItem:T,isWired:T.type===A.sK.WIRED}),a.createElement(s.A,null,t?a.createElement(h.A,null,a.createElement(r.A,{color:"text-2",size:"medium"},a.createElement(d.sA,{id:"COMMON_MAC_ADDRESS"})),a.createElement(r.A,{color:"text-3",size:"medium"},t)):null,C.fingerprint_device_vendor||T.oui?a.createElement(h.A,null,a.createElement(r.A,{color:"text-2",size:"medium"},a.createElement(d.sA,{id:"COMMON_MANUFACTURER"})),a.createElement(l.A,{style:{maxWidth:"250px"},color:"text-3",size:"medium",isTruncated:!0},C.fingerprint_device_vendor||T.oui)):null,C.fingerprint_device_name?a.createElement(h.A,null,a.createElement(r.A,{color:"text-2",size:"medium"},a.createElement(d.sA,{id:"COMMON_MODEL"})),a.createElement(l.A,{style:{maxWidth:"250px"},color:"text-3",size:"medium",isTruncated:!0},C.fingerprint_device_name)):null,C.fingerprint_device_os?a.createElement(h.A,null,a.createElement(r.A,{color:"text-2",size:"medium"},a.createElement(d.sA,{id:"CLIENTS_HEADER_OS"})),a.createElement(l.A,{color:"text-3",size:"medium",isTruncated:!0},C.fingerprint_device_os)):null),a.createElement(s.A,{type:s.I.ACCORDION,items:x}),a.createElement(z,{mac:T.mac,status:T.status,display_name:T.display_name,blocked:T.blocked}))}},383149(e,t,n){n.d(t,{A:()=>i});var a=n(885205);const i=function(e,t){return!(null==e||!e.length)&&(0,a.A)(e,t,0)>-1}},887809(e,t,n){n.d(t,{A:()=>a});const a=function(e,t,n){for(var a=-1,i=null==e?0:e.length;++a<i;)if(n(t,e[a]))return!0;return!1}},458043(e,t,n){n.d(t,{A:()=>m});var a=n(8300),i=n(383149),r=n(887809),l=n(45572),c=n(552789),o=n(764099);const m=function(e,t,n,m){var s=-1,d=i.A,u=!0,E=e.length,A=[],p=t.length;if(!E)return A;n&&(t=(0,l.A)(t,(0,c.A)(n))),m?(d=r.A,u=!1):t.length>=200&&(d=o.A,u=!1,t=new a.A(t));e:for(;++s<E;){var h=e[s],g=null==n?h:n(h);if(h=m||0!==h?h:0,u&&g==g){for(var O=p;O--;)if(t[O]===g)continue e;A.push(h)}else d(t,g,m)||A.push(h)}return A}},144757(e,t,n){n.d(t,{A:()=>c});var a=n(458043),i=n(187671),r=n(224326),l=n(153533);const c=(0,r.A)(function(e,t){return(0,l.A)(e)?(0,a.A)(e,(0,i.A)(t,1,l.A,!0)):[]})}}]);