"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[63144,89965],{38671:(e,t,n)=>{function a(e){return"object"==typeof e&&!!e&&"apiMsg"in e&&"status"in e}n.d(t,{F:()=>a})},55983:(e,t,n)=>{n.d(t,{Ai:()=>r,Ar:()=>s,Qv:()=>o,ZP:()=>c,aY:()=>l,p6:()=>i});var a=n(448547);const i="alarm-manager",l="control-plane",r=`${l}/integrations`,s=`${l}/backups`,o="admins",c=Object.values(a.Kr)},79786:(e,t,n)=>{n.d(t,{m:()=>s});var a=n(349785),i=n(296540),l=n(59116),r=n(870893);function s({schema:e,defaultValues:t,presets:n}){const s=(0,i.useMemo)(()=>n?(0,l.A)(n,e=>e.defaultValues):{},[n]),o=(0,i.useMemo)(()=>({...t,...s}),[s,t]),c=(0,a.mN)({resolver:(0,r.u)(e),shouldFocusError:!0,defaultValues:o,shouldUseNativeValidation:!1,mode:"onTouched"}),m=(0,i.useRef)(o);m.current=o;const d=(0,i.useCallback)((...e)=>{const[t,...n]=e;return c.reset(t?{...t,...s}:m.current,...n)},[s,c]);return{...c,reset:d,formState:{...c.formState,isDirty:!!Object.keys(c.formState.dirtyFields).length,isSubmitting:c.formState.isSubmitting},handleSubmit:(...e)=>c.handleSubmit(e[0],(t,...n)=>{const a=Object.keys(t)[0];if(a)try{const e=document.getElementsByName(a)?.[0];e?.scrollIntoView?.({behavior:"smooth",block:"center"}),e?.focus?.({preventScroll:!0})}catch{}e[1]?.(t,...n)})}}},86571:(e,t,n)=>{n.d(t,{A:()=>r});var a=n(296540),i=n(217439),l=n(699784);const r=({id:e,children:t,values:n})=>a.createElement(i.A,{color:"text-1",weight:"bold",size:"medium"},e?a.createElement(l.sA,{id:e,values:n}):null,t)},94456:(e,t,n)=>{n.d(t,{A:()=>c});var a=n(469733),i=n(296540),l=n(758649),r=n(398300),s=n(845030),o=n(951106);const c=(0,i.memo)(({mac:e,name:t,display_name:n})=>{const c=(0,a.useDispatch)(),m=(0,i.useCallback)(t=>{t.preventDefault(),t.stopPropagation(),c((0,s.XP)({type:r.H.CLIENT,id:e}))},[c,e]);return i.createElement(l.A,{type:"button",variant:"inline",size:"inherit",onClick:m},(0,o.tn)({name:t,display_name:n})||e)})},137625:(e,t,n)=>{n.d(t,{A:()=>c});var a=n(296540),i=n(353899),l=n(132196),r=n(372737),s=n(566723),o=n(699784);const c=({children:e=null,title:t,titleValues:n,message:c,messageValues:m,handleConfirm:d=()=>null,handleClose:u=()=>null,handleCancel:E,isOpen:_,buttonVariant:A="primary",cancelButtonVariant:p="tertiary",cancelButtonMessage:C="COMMON_ACTION_CANCEL",buttonMessage:O="COMMON_ACTION_CONFIRM",buttonDisabled:N=!1,position:h="top",showHeaderClose:g=!1,contentClassName:f="",body:S,titleBody:I,className:b,rootClose:T=!1,footerActions:M})=>{const v=(0,a.useCallback)(e=>{_&&(e.stopPropagation(),e.key===r.U.ENTER?d():e.key===r.U.ESCAPE&&u(!1))},[_,d,u]);(0,a.useEffect)(()=>(window.addEventListener("keydown",v,!0),()=>{window.removeEventListener("keydown",v,!0)}),[v]);const L=(0,a.useCallback)(()=>{u(!1),E?.()},[u,E]),y=(0,a.useCallback)(()=>{u(!1),d()},[u,d]),R=(0,a.useMemo)(()=>[{text:a.createElement(o.sA,{id:C}),variant:p,onClick:L},{text:a.createElement(o.sA,{id:O}),disabled:N,variant:A,onClick:y}],[O,A,C,p,L,y,N]),P=(0,a.useCallback)(()=>{u(!1)},[u]),x=l.AH`
    ${t?"":`margin-top: ${s.xO}`}
  `;return a.createElement(i.A,{title:t?a.createElement(o.sA,{id:t,values:n}):I||null,...c?{body:a.createElement(a.Fragment,null,a.createElement(o.sA,{id:c,values:m}),S)}:{body:S},position:h,portal:!0,actions:M||R,showHeaderClose:g,contentClassName:l.AH`
        ${x}
        ${f}
      `,onRequestClose:P,isOpen:_,allowOverflow:!0,rootClose:T,className:b},e)}},153887:(e,t,n)=>{n.d(t,{v:()=>o});var a=n(801081),i=n(25553),l=n(87485),r=n(218104),s=n(655448);const o=e=>(0,a.Mz)((e=>({models:t})=>(0,i.JC)(s.MODEL,t,{queryParams:{mac:e}},{idField:s.ID_FIELD,compareFunction:r.G}))(e),e=>(0,l.kh)(e)[0]||{})},182847:(e,t,n)=>{var a,i;n.d(t,{X:()=>a,t:()=>i}),function(e){e.START="start",e.STOP="stop"}(a||(a={})),function(e){e.RUNNING="running",e.FINISHED="finished",e.CANCELLED="cancelled",e.FAILED="failed",e.TIMEOUT="timeout"}(i||(i={}))},183970:(e,t,n)=>{var a;n.d(t,{k:()=>a}),function(e){e.CLIENTS="CLIENTS",e.USERS="USERS"}(a||(a={}))},218104:(e,t,n)=>{n.d(t,{G:()=>a});const a=({queryParams:e},{queryParams:t})=>e?.mac===t?.mac},242366:(e,t,n)=>{n.d(t,{A:()=>r});var a=n(296540),i=n(566723),l=n(294303);const r=(0,a.forwardRef)((e,t)=>a.createElement(l.A,{ref:t,flexDirection:"column",gap:i.kc,width:"100%",...e}))},255212:(e,t,n)=>{n.d(t,{A:()=>_});var a=n(469733),i=n(296540),l=n(271856),r=n(834316),s=n(928085),o=n(196010),c=n(349107),m=n(699784),d=n(187483),u=n(556456),E=n(55983);const _=({children:e,isUdmDevice:t})=>{const n=(0,a.useSelector)(u.yE),_=(0,s.A)(E.aY),A=(0,a.useSelector)(d.TP);return i.createElement(l.A,{portal:!0,isInteractive:!0,description:t?i.createElement(m.sA,{id:"DEVICE_PROPERTIES_NAME_LINK_CONTROL_PLANE",values:{link:n?i.createElement(o.A,{to:_},i.createElement(m.sA,{id:"COMMON_CONTROL_PLANE"})):i.createElement(c.A,{href:(0,r.ec)(A),id:"COMMON_CONTROL_PLANE"})}}):null},i.createElement("span",null,e))}},260844:(e,t,n)=>{n.d(t,{A:()=>o});var a=n(886634),i=n(296540),l=n(132196),r=n(566723);const s=(e,t)=>l.AH`
  &-appear,
  &-enter {
    opacity: 0;
    display: flex !important;
    transform: translateY(-${r.xO});
  }
  &-appear-active,
  &-enter-active {
    display: flex !important;
    ${e&&`flex-direction: ${e};`}
    ${t&&`padding: ${t};`}
    opacity: 1;
    transform: translateY(0px);
    transition:
      opacity 150ms ease-in-out,
      transform 300ms cubic-bezier(0.25, 0.1, 0.25, 1);
  }
  &-appear-done,
  &-enter-done {
    display: flex !important;
    ${e&&`flex-direction: ${e};`}
    ${t&&`padding: ${t};`}
    opacity: 1;
  }
  &-exit {
    display: flex !important;
    opacity: 0;
    height: 0;
    box-sizing: border-box;
    margin: ${r.xO} 0 0 !important;
    & > * {
      display: none;
    }
  }
  &-exit-active {
    display: flex !important;
    margin: 0 !important;
    transition: margin 300ms cubic-bezier(0.25, 0.1, 0.25, 1);
  }
  &-exit-done {
    display: none;
  }
`,o=(0,i.memo)(({timeout:e=300,in:t=!1,flexDirection:n,padding:l=`0 0 ${r.fS}`,wrap:o=!1,children:c,...m})=>{const d=(0,i.useMemo)(()=>i.Children.map(c,(l,r)=>i.createElement(a.A,{appear:t,in:t,timeout:e,classNames:s(n,void 0),mountOnEnter:!0,...m},null===l?i.createElement("div",null):l)),[c,n,t,m,e]);return o?i.createElement(a.A,{appear:t,in:t,timeout:e,classNames:s(n,l),mountOnEnter:!0,...m},i.createElement("div",null,c)):i.createElement(i.Fragment,null,d)})},263130:(e,t,n)=>{n.d(t,{A:()=>m});var a=n(296540),i=n(927099),l=n(71479),r=n(998837),s=n(566723),o=n(294303);const c=(0,l.A)(i.A)`
  line-height: 20px;
`,m=({icon:e,description:t,action:n,footer:i,background:l,...m})=>{const d=(0,r.u)().motifPalette.neutral01;return a.createElement(o.A,{flexGrow:1,borderRadius:s.YC,padding:s.kc,background:l||d,gap:s.kc,flexDirection:"column",...m},a.createElement(o.A,{flexGrow:1,gap:s.kc},e,t?a.createElement(c,{size:"body"},t):null,n?a.createElement(o.A,{marginLeft:"auto"},a.createElement(c,{size:"body"},n)):null),i)}},263963:(e,t,n)=>{n.d(t,{L_:()=>m,MS:()=>c,rn:()=>o});var a=n(117958),i=n(215616),l=n(296540),r=n(699784);const s="{::}",o=(e,t)=>`${e}${s}${JSON.stringify(t??{})}`,c=(e,t)=>{if("string"!=typeof t)return;const[n,...a]=t.split(s);if(!n||!a.length)return t;let i={};try{i=Object.fromEntries(Object.entries(JSON.parse(a.join(s))).map(([t,n])=>[t,"string"==typeof n?c(e,n):n]))}catch{0}return e.formatMessage({id:n},i)};function m(){const{formatMessage:e}=(0,r.tz)();return(0,l.useCallback)(t=>c({formatMessage:e},t),[e])}a.pJ((e,t)=>e.message?{message:e.message}:e.code===i.eq.too_small&&"string"===e.type?{message:o("COMMON_MIN_CHARS",{min:Number(e.minimum)})}:e.code===i.eq.too_big&&"string"===e.type?{message:o("COMMON_MAX_CHARS",{name:o("COMMON_VALUE"),max:Number(e.maximum)})}:e.code===i.eq.invalid_type&&"array"===e.expected&&"undefined"===e.received?{message:o("COMMON_SELECT_AT_LEAST_ONE_ITEM")}:e.code===i.eq.too_small&&"array"===e.type?{message:o("COMMON_ADD_AT_LEAST_X_ITEMS",{min:Number(e.minimum)})}:e.code===i.eq.invalid_type&&"undefined"===e.received?{message:o("COMMON_VALIDATION_VALUE_REQUIRED")}:e.code===i.eq.invalid_type&&"number"===e.expected?{message:o("COMMON_VALIDATION_PLEASE_ENTER_A_NUMBER")}:{message:t.defaultError})},313437:(e,t,n)=>{n.d(t,{a:()=>i});var a=n(162420);const i=(0,n(71479).A)(a.A)`
  margin-bottom: 3px;
`},329109:(e,t,n)=>{n.d(t,{A:()=>m});var a=n(296540),i=n(691441),l=n(71479),r=n(132196),s=n(373229);const o=(0,l.A)("div")`
  height: 66px;
`,c=r.AH`
  padding: 0px !important;
`,m=({isDirty:e,onFormSubmit:t,onFormCancel:n,isInvalid:l,...r})=>e?a.createElement(i.A,null,a.createElement(s.A,{isDirty:e,onFormCancel:n,onFormSubmit:t,isInvalid:l,className:c,...r})):a.createElement(o,null)},349665:(e,t,n)=>{n.d(t,{A:()=>r});var a=n(296540),i=n(705228),l=n(294303);const r=({maxWidth:e,...t})=>a.createElement(l.A,{flexDirection:"column",width:"100%",maxWidth:"settingsGridContent"===e?i.ng:e,...t})},359858:(e,t,n)=>{n.d(t,{q:()=>m});var a=n(296540),i=n(149133),l=n(870443),r=n(582e3),s=n(94456),o=n(699784),c=n(546391);const m=(e,t,n,m,d,u)=>l.A.string().when("use_fixedip",{is:!0,then:l.A.string().label("COMMON_IP_ADDRESS").required().matches(c.zF,{message:a.createElement(o.sA,{id:"COMMON_VALIDATION_VALID_IPV4"})}).unifiIpv4InSubnets(e,a.createElement(o.sA,{id:1===e.length?"CLIENTS_PROPERTY_GENERAL_TAB_INPUT_IP_ADDRESS_VALIDATION":"CLIENTS_PROPERTY_GENERAL_TAB_NO_SUBNET_MATCH",values:{value:t,subnet:1===e.length?e[0]:void 0}})).test("isFallbackIp",a.createElement(o.sA,{id:"CLIENTS_PROPERTY_GENERAL_TAB_INPUT_IP_ADDRESS_IS_FALLBACK_IP"}),e=>e&&!(0,i.W5)(e)).test({name:"isFixedIpNotUsedByClient",test:(e,{createError:t})=>{if(!e)return!0;const n=m.filter(e=>!u||"user_id"in e&&e.user_id!==u).find(t=>[t.ip,"use_fixedip"in t&&t.use_fixedip&&"fixed_ip"in t&&t.fixed_ip].includes(e));return!n||t({message:a.createElement(o.sA,{id:"API_ERROR_IP_ALREADY_USED",values:{link:a.createElement(s.A,{mac:"mac"in n&&n.mac,name:n.name,display_name:n.display_name})}})})}}).test("isGatewayIP",a.createElement(o.sA,{id:"CLIENTS_PROPERTY_GENERAL_TAB_INPUT_IP_ADDRESS_USED_BY_GATEWAY"}),e=>e&&!n.includes(e)).test({name:"isHoneypotIp",test:(e,{createError:t})=>!d.includes(e)||t({message:a.createElement(o.sA,{id:"API_ERROR_IP_ALREADY_USED_BY_HONEYPOT",values:{link:a.createElement(r.A,null)}})})})})},372737:(e,t,n)=>{var a;n.d(t,{U:()=>a}),function(e){e.ARROW_DOWN="ArrowDown",e.ARROW_UP="ArrowUp",e.ENTER="Enter",e.ESCAPE="Escape"}(a||(a={}))},373229:(e,t,n)=>{n.d(t,{A:()=>c});var a=n(296540),i=n(758649),l=n(71479),r=n(566723),s=n(699784);const o=(0,l.A)("footer",{shouldForwardProp:e=>"hasFormResetButton"!==e})`
  display: flex;
  justify-content: ${({hasFormResetButton:e})=>e?"space-between":"flex-end"};
  padding: ${r.S2} ${r.fS};
  gap: ${r.kc};
`,c=({allowCancel:e,isDirty:t,isInvalid:n,isSubmitting:l,onFormSubmit:r,onFormReset:c,onFormCancel:m,className:d,submitButtonText:u,customButton:E,applyButton:_,applyButtonFirst:A,hideCancelButton:p,form:C})=>{const O=(0,a.useMemo)(()=>_||a.createElement(i.A,{name:"submit",variant:"primary",type:"submit",onClick:r,disabled:!t||n||l,form:C},a.createElement(s.sA,{id:u||"COMMON_ACTION_APPLY_CHANGES"})),[_,C,t,n,l,r,u]);return a.createElement(o,{className:d,hasFormResetButton:!!c},A?O:E,p?null:a.createElement(i.A,{name:"cancel",variant:"default",type:"button",onClick:m,disabled:!e&&!t},a.createElement(s.sA,{id:"COMMON_ACTION_CANCEL"})),c?a.createElement(i.A,{name:"reset",variant:"default",type:"button",onClick:c,disabled:!t},a.createElement(s.sA,{id:"COMMON_ACTION_RESET_TO_DEFAULTS"})):null,A?E:O)}},391855:(e,t,n)=>{n.d(t,{A:()=>m});var a=n(296540),i=n(271856),l=n(858931),r=n(823858),s=n(71479),o=n(699784);const c=(0,s.A)(r.A)`
  color: #ffffff;
`,m=(0,a.memo)(({isDisabled:e,showLoader:t,showWarning:n,showWarningIcon:r,warning:s,label:m="COMMON_ACTION_APPLY_CHANGES",onSubmit:d,form:u})=>a.createElement(i.A,{description:n?s??a.createElement(o.sA,{id:"COMMON_FORM_CHANGES_TRIGGER_PROVISION"}):null,portal:!0,width:240},a.createElement(l.A,{disabled:e,type:"submit",onClick:d,variant:"primary",Icon:n||r?a.createElement(c,{variant:"fill"}):null,loader:t?"loading":void 0,form:u},a.createElement(o.sA,{id:m}))))},421574:(e,t,n)=>{n.d(t,{V:()=>m,z:()=>c});var a=n(516693),i=n(691189),l=n(887831),r=n(218104),s=n(655448),o=n(182847);const c=(e={},t={})=>(0,i.An)([{model:s.MODEL,payload:t=>[{...t,[s.ID_FIELD]:e.queryParams.mac}]}],s.GET_PATH.replace(":mac",e.queryParams.mac),e,{idField:s.ID_FIELD,compareFunction:r.G,...t}),m=(e,t={},n={})=>r=>r((0,i.vB)(a.aC,null,null,l.A.POST,(e===o.X.START?s.START_PATH:s.STOP_PATH).replace(":mac",t.queryParams.mac),t,null,n))},449688:(e,t,n)=>{n.d(t,{A:()=>i});var a=n(296540);const i=function(e){return t=>n=>{const[i,l]=(0,a.useState)(Object.fromEntries(e.map(e=>[e,!1]))),[r,s]=(0,a.useState)(Object.fromEntries(e.map(e=>[e,!1]))),o=(0,a.useCallback)((e,t)=>{l(n=>({...n,[e]:t}))},[]),c=(0,a.useCallback)((e,t)=>{s(n=>({...n,[e]:t}))},[]),m=!!Object.values(i).find(e=>e),d=!!Object.values(r).find(e=>e);return a.createElement(t,{isDirty:m,isInvalid:d,formStates:i,setFormDirty:o,setFormInvalid:c,...n})}}},501524:(e,t,n)=>{n.d(t,{Zx:()=>m,nC:()=>c,nd:()=>o});var a=n(801081),i=n(524936),l=n(366188),r=n(780811),s=n(532419);const o=(0,a.Mz)(l.Ct,e=>e.filter(e=>!(0,i.nz)(e)&&(0,i.uN)(e)).map(({name:e,_id:t,ip_subnet:n})=>({label:e,value:t,ipSubnet:n}))),c=(0,a.Mz)(l.L4,e=>e.filter(({dhcpd_enabled:e})=>e)),m=(0,a.Mz)(c,s.U$,s.n_,(e,t,n)=>e.length>0&&((0,r.moU)(t)&&t.adopted||e.some(({gateway_device:e})=>n.find(t=>t.mac===e))))},556456:(e,t,n)=>{n.d(t,{XU:()=>E,YQ:()=>_,aB:()=>u,g0:()=>N,jO:()=>A,tx:()=>d,yB:()=>m,yE:()=>C,zn:()=>O});var a=n(801081),i=n(874807),l=n(187483),r=n(448547),s=n(524332),o=n(55983);const c=(0,a.Mz)(l.kb,e=>e[r.C2.SWAI_ROUTES]||[]),m=(0,a.Mz)(c,e=>e.filter(e=>o.ZP.every(t=>!e[s.rR.PATH].startsWith(t)))),d=(0,a.Mz)(m,e=>e.filter(e=>!e[s.rR.IS_HIDDEN])),u=(0,a.Mz)(c,e=>e.filter(e=>e[s.rR.PATH].startsWith(r.Kr.SETTINGS))),E=(0,a.Mz)(u,e=>e.filter(e=>!e[s.rR.IS_HIDDEN])),_=(0,a.Mz)(c,e=>e.filter(e=>e[s.rR.PATH].startsWith(r.Kr.SYSLOG))),A=(0,a.Mz)(_,e=>e.filter(e=>!e[s.rR.IS_HIDDEN])),p=e=>(0,a.Mz)(c,t=>t.some(t=>t[s.rR.PATH].includes(e)&&!t[s.rR.IS_HIDDEN])),C=(0,a.Mz)(p(o.aY),e=>e),O=(0,a.Mz)(p(o.p6),e=>e),N=(0,a.Mz)(l.nx,e=>e[r.Y7.ROUTES_ADAPTER]||{[s.bh.ROUTES]:[],[s.bh.ADD_ROUTES_LISTENER]:i.P1,[s.bh.REMOVE_ROUTES_LISTENER]:i.P1,[s.bh.ON_ROUTE_CONTAINER_ADDED]:i.P1,[s.bh.ON_ROUTE_CONTAINER_REMOVED]:i.P1})},564328:(e,t,n)=>{n.d(t,{Fw:()=>l,Ql:()=>a,pN:()=>i,vB:()=>r});const a="createSimpleAppBlock",i="mac",l="appId",r="simpleAppBlockId"},582e3:(e,t,n)=>{n.d(t,{A:()=>c});var a=n(956347),i=n(296540),l=n(758649),r=n(928085),s=n(699784),o=n(959341);const c=(0,i.memo)(()=>{const e=(0,a.W6)(),t=(0,r.A)(o.bB),n=(0,i.useCallback)(()=>e.push(t),[e,t]);return i.createElement(l.A,{type:"button",style:{textTransform:"lowercase"},variant:"inline",size:"inherit",onClick:n},i.createElement(s.sA,{id:"COMMON_HONEYPOT"}))})},596441:(e,t,n)=>{n.d(t,{I:()=>a});const a={HEADER_HEIGHT:32,ROW_HEIGHT:32,EDIT_FIELD_HEIGHT:36,getHeight(e,t,n,a){return Math.min((a||this.ROW_HEIGHT)*e+(n??this.HEADER_HEIGHT),(a||this.ROW_HEIGHT)*t+(n??this.HEADER_HEIGHT))},getEditContainerHeight(e,t,n){return Math.min((n||this.EDIT_FIELD_HEIGHT)*e,(n||this.EDIT_FIELD_HEIGHT)*t)}}},606187:(e,t,n)=>{n.d(t,{fw:()=>s,GB:()=>o,q_:()=>c});var a=n(516693),i=n(691189),l=n(887831);const r="/v2/api/site/{site}/active-leases",s=(e,t={},n={})=>(0,i.Kd)("dhcpLeases",(e=>e?`${r}/${e}`:r)(e),e,t,n),o=(e={},t={})=>(0,i.t9)("vendorIds","/v2/api/site/{site}/vendor-ids",e,{idField:e=>e,...t}),c=e=>(0,i.vB)(a.aC,null,null,l.A.POST,"/v2/api/site/{site}/dhcp-import",{},e)},689965:(e,t,n)=>{n.d(t,{A:()=>E,I:()=>a});var a,i=n(296540),l=n(822336),r=n(427853),s=n(71479),o=n(825032),c=n(566723),m=n(294303);!function(e){e.ACCORDION="accordion",e.BUTTON_LIST="buttonList"}(a||(a={}));const d=(0,s.A)(m.A,{shouldForwardProp:e=>!["marginBottom","isButtonList","margin","flex","width","padding","nested","background"].includes(e)})`
  background-color: ${({background:e,nested:t,theme:{themeName:n}})=>e||l.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}})=>l.Ay[`desktop-border-divider-${e}`]};\n      &:last-child {\n        border-bottom: none;\n      }\n    }\n  `:""}
`,u=(0,s.A)(r.A,{shouldForwardProp:e=>!["marginBottom","margin","flex","padding","nested","background"].includes(e)})`
  background-color: ${({background:e,nested:t,theme:{themeName:n}})=>e||l.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||l.Ay[t===o.S.DARK?"desktop-color-neutral-01-dark":"desktop-color-neutral-00-light"]};
      height: 48px;
      padding: 0 ${c.Ln};
    }
    > div:nth-child(2) {
      margin-bottom: 0;
      padding: 0 ${c.Ln} ${c.Ln};
      > div {
        padding: 0;
      }
    }
  }
`,E=({type:e,marginBottom:t,margin:n,padding:l,flex:r,width:s,nested:o,...c})=>"items"in c?i.createElement(u,{marginBottom:t,margin:n,padding:l,flex:r,nested:o,...c}):i.createElement(d,{nested:o,width:s,marginBottom:t,margin:n,padding:l,flex:r,isButtonList:e===a.BUTTON_LIST,...c},c.children)},705483:(e,t,n)=>{n.d(t,{c:()=>r,z:()=>l});var a=n(407814),i=n(263963);const l=e=>a.Yj().min(1).max(32).refine(t=>!e.some(e=>e.name===t),{message:(0,i.rn)("COMMON_PLEASE_ENTER_UNIQUE_NAME")}),r=e=>a.Ik({name:l(e),member_macs:a.YO(a.Yj()).min(1)})},747065:(e,t,n)=>{n.d(t,{A:()=>o});var a=n(296540),i=n(876250),l=n(6176),r=n(768195),s=n(971550);const o=(0,a.memo)(({model:e,type:t,size:n,flexProps:o={}})=>a.createElement(s.A,{size:n,flexProps:o},a.createElement(s.N,{alignContent:"center",justifyContent:"center",isPortrait:!1,isGatewayType:t===r.bq.UGW,isUdm:e===r.W4.UDM},a.createElement(l.A,{height:"100%",width:"100%",size:i.Xh.MEDIUM,variant:i.Hx.NOPADDING,model:e}))))},763144:(e,t,n)=>{n.r(t),n.d(t,{default:()=>Pn});var a=n(296540),i=n(449688),l=n(868238),r=n(956347),s=n(469733),o=n(951272),c=n(592510),m=n(742920),d=n(870443),u=n(790543),E=n(96512),_=n(845030),A=n(675359),p=n(627440),C=n(699784),O=n(359858),N=n(501524),h=n(511975),g=n(187483),f=n(413477),S=n(302167),I=n(366188),b=n(634229),T=n(642597),M=n(602021),v=n(606187),L=n(444232),y=n(951106),R=n(691294),P=n(239417),x=n(984652),k=n(959341),w=n(546391),D=n(953141),F=n(271856),$=n(438628),z=n(217439),B=n(162420),U=n(132196),H=n(566723),G=n(822336),V=n(758649),W=n(71479),K=n(6510),Y=n(435325),j=n(974675),q=n(602197),X=n(718073),Q=n(592563),Z=n(137625),J=n(83344),ee=n(995015);const te=({clientActionProps:{name:e,display_name:t,mac:n,status:i,blocked:l},isUnifiClient:r})=>{const o=(0,s.useDispatch)(),[c,m]=(0,a.useState)(!1),d=(0,a.useMemo)(()=>(0,y.tn)({name:e,display_name:t}),[e,t]),u=(0,a.useCallback)(()=>{o(r?(0,J.W)(n):(0,x.oO)(n,i===R.S2.ONLINE?R.N7.ACTIVE:R.N7.OFFLINE))},[i,n,o,r]),E=(0,a.useCallback)(()=>{n&&(m(!1),u(),o((0,j.A)([n],d)))},[n,o,d,u]),_=(0,a.useCallback)(()=>{m(!0)},[]),A=(0,a.useCallback)(()=>{m(!1)},[]);return a.createElement(ee.p,null,a.createElement(X.A,{description:l?a.createElement(C.sA,{id:"CLIENTS_DISABLED_REMOVE_TOOLTIP"}):void 0},a.createElement(Q.A,{type:"button",fontSize:"medium",variant:"destructive",onClick:_,isDisabled:l},a.createElement(Z.A,{isOpen:c,title:"COMMON_ACTION_REMOVE_CONFIRM_TITLE",titleValues:{deviceName:d},message:"CLIENTS_ACTIONS_REMOVE_CONFIRM_MESSAGE",messageValues:{clientName:d},buttonMessage:"COMMON_ACTION_REMOVE",buttonVariant:"danger",handleConfirm:E,handleClose:A},a.createElement(z.A,{style:l?{}:{cursor:"pointer"},size:"medium",color:"inherit"},a.createElement(C.sA,{id:"COMMON_ACTION_REMOVE"}))))))};var ne=n(842630),ae=n(294303);const ie=(0,W.A)(ae.A)`
  height: 48px;
  border-bottom: ${({theme:{themeName:e}})=>G.Ay[`desktop-border-divider-${e}`]};
  button {
    font-size: ${({theme:{fontSize:e}})=>e["font-size-body"]};
    font-weight: 600;
  }
`,le=(0,W.A)(z.A,{shouldForwardProp:e=>"isPending"!==e})`
  ${({isPending:e,theme:{motifPalette:{blueDisabled:t}}})=>e&&`color: ${t}`};
`;var re;!function(e){e.RECONNECTION="reconnection"}(re||(re={}));const se=({actionPending:e,onClick:t,label:n})=>a.createElement(ie,null,a.createElement(V.A,{type:"button",variant:"inline",disabled:e,onClick:t},a.createElement(le,{size:"medium",color:"ublue-06",isPending:e},a.createElement(C.sA,{id:n})))),oe=({activeItem:e})=>{const t=(0,s.useDispatch)(),[n,i]=(0,a.useReducer)((e,t)=>({...e,[t.type]:t.pending}),{[re.RECONNECTION]:!1}),l=(0,s.useSelector)((0,a.useMemo)(()=>(0,Y.eu)(e.mac,["uptime"]),[e.mac])),r=e.type===R.sK.WIRELESS&&!!l,o=!e.unifi_device_info?.view_in_application&&e.deviceState===q.g.DISCONNECTED,c=(0,a.useMemo)(()=>({mac:e.mac,gw_mac:"",type:e.type,is_guest:!1,is_wired:e.is_wired,display_name:e.display_name,name:e.name,status:e.status,authorized:!1,blocked:!1}),[e.mac,e.type,e.is_wired,e.display_name,e.name,e.status]);return a.createElement(ne.A,null,r?a.createElement(se,{actionPending:n[re.RECONNECTION],label:"COMMON_ACTION_RECONNECT",onClick:()=>{t((0,j.R9)(e.mac,(0,K.Q)(e))),i({type:re.RECONNECTION,pending:!0})}}):null,o?a.createElement(te,{isUnifiClient:!0,clientActionProps:c}):null)};var ce=n(86571),me=n(198494);const de=({clientActionProps:{name:e,display_name:t,mac:n,status:i},selfOfflineClientTimeFrame:l})=>{const r=(0,s.useDispatch)(),[o,c]=(0,a.useState)(!1),m=(0,a.useMemo)(()=>(0,y.tn)({name:e,display_name:t}),[e,t]),d=(0,a.useCallback)(e=>{r((0,x.hw)(e,{blocked:!1},i===R.S2.ONLINE?R.N7.ACTIVE:R.N7.OFFLINE))},[r,i]),u=(0,a.useCallback)(()=>{n&&(c(!1),d(n),r((0,j.Ds)(n,m)).then(()=>{r((0,x.oO)(n,R.N7.BLOCKED)),r((0,x.QG)({queryParams:{withinHours:l}})),r((0,x.bk)())}))},[r,l,n,d,m]),E=(0,a.useCallback)(()=>{c(!0)},[]),_=(0,a.useCallback)(()=>{c(!1)},[]);return a.createElement(ee.p,null,a.createElement(Q.A,{type:"button",variant:"emphasis",fontSize:"medium",onClick:E},a.createElement(Z.A,{isOpen:o,title:"CLIENTS_ACTIONS_UNBLOCK_CONFIRM_TITLE",titleValues:{clientName:m},message:"CLIENTS_ACTIONS_UNBLOCK_CONFIRM_MESSAGE",messageValues:{clientName:m},buttonMessage:"COMMON_ACTION_UNBLOCK",buttonVariant:"danger",handleConfirm:u,handleClose:_},a.createElement(z.A,{style:{cursor:"pointer"},size:"medium",color:"inherit"},a.createElement(C.sA,{id:"COMMON_ACTION_UNBLOCK"})))))},ue=({clientActionProps:e})=>{const t=(0,s.useDispatch)(),[n,i]=(0,a.useState)(!1),l=(0,a.useCallback)(e=>{const n="mac"in e?e.mac:void 0;n&&(i(!0),t((0,j.xt)(n,(0,y.tn)(e))).finally(()=>{i(!1)}))},[t]),r=(0,a.useCallback)(()=>{l(e)},[l,e]);return a.createElement(ee.p,{disabled:n},a.createElement(Q.A,{type:"button",variant:"emphasis",fontSize:"medium",onClick:r},a.createElement(z.A,{size:"medium",color:"inherit"},a.createElement(C.sA,{id:"COMMON_ACTION_UNAUTHORIZE"}))))};var Ee=n(126457),_e=n(86392);const Ae=({clientActionProps:e})=>{const t=(0,s.useDispatch)(),[n,i]=(0,a.useState)(!1),l=(0,a.useCallback)(e=>{const n="mac"in e?e.mac:void 0;if(n){const a=(0,y.tn)(e);i(!0),t((0,_e.E)({title:"CLIENTS_ACTIONS_RECONNECT_CONFIRM_TITLE",titleValues:{clientName:a},message:"CLIENTS_ACTIONS_RECONNECT_CONFIRM_MESSAGE",messageValues:{clientName:a},onConfirm:()=>{t((0,j.R9)(n,a)).finally(()=>{i(!1)}),t((0,Ee.AS)())}}))}},[t]),r=(0,a.useCallback)(()=>l(e),[l,e]);return e.status===R.S2.ONLINE&&e.type===R.sK.WIRELESS?a.createElement(ee.p,{disabled:n},a.createElement(Q.A,{type:"button",variant:"emphasis",fontSize:"medium",onClick:r},a.createElement(z.A,{size:"medium",color:"inherit"},a.createElement(C.sA,{id:"COMMON_ACTION_RECONNECT"})))):null},pe=({clientActionProps:{mac:e,name:t,display_name:n,status:i},selfOfflineClientTimeFrame:l})=>{const r=(0,s.useDispatch)(),[o,c]=(0,a.useState)(!1),m=(0,a.useMemo)(()=>(0,y.tn)({name:t,display_name:n}),[t,n]),d=(0,a.useCallback)(e=>{const t=i===R.S2.ONLINE?R.N7.ACTIVE:R.N7.OFFLINE;r((0,x.oO)(e,t)),r((0,x.hw)(e,{blocked:!0},t))},[r,i]),u=(0,a.useCallback)(()=>{e&&(c(!1),d(e),r((0,j.cd)(e,m)).then(()=>{r((0,x.bk)()),r((0,x.QG)({queryParams:{withinHours:l}}))}))},[r,d,l,e,m]),E=(0,a.useCallback)(()=>{c(!0)},[]),_=(0,a.useCallback)(()=>{c(!1)},[]);return a.createElement(ee.p,null,a.createElement(Q.A,{type:"button",fontSize:"medium",variant:"destructive",onClick:E},a.createElement(Z.A,{isOpen:o,title:"CLIENTS_ACTIONS_BLOCK_CONFIRM_TITLE",titleValues:{clientName:m},message:"CLIENTS_ACTIONS_BLOCK_CONFIRM_MESSAGE",messageValues:{clientName:m},buttonMessage:"COMMON_ACTION_BLOCK",buttonVariant:"danger",handleConfirm:u,handleClose:_},a.createElement(z.A,{style:{cursor:"pointer"},size:"medium",color:"inherit"},a.createElement(C.sA,{id:"COMMON_ACTION_BLOCK"})))))},Ce=({clientActionProps:e})=>{const t=(0,s.useDispatch)(),[n,i]=(0,a.useState)(!1),l=(0,a.useCallback)(e=>{const n="mac"in e?e.mac:void 0;n&&(i(!0),t((0,j.ol)(n,(0,y.tn)(e))).finally(()=>{i(!1)}))},[t]),r=(0,a.useCallback)(()=>{l(e)},[l,e]);return a.createElement(ee.p,{disabled:n},a.createElement(Q.A,{type:"button",variant:"emphasis",fontSize:"medium",onClick:r},a.createElement(z.A,{size:"medium",color:"inherit"},a.createElement(C.sA,{id:"COMMON_ACTION_AUTHORIZE"}))))},Oe=({activeItem:e})=>{const t=(0,s.useSelector)(me.lW),n=(0,a.useMemo)(()=>({mac:e.mac,gw_mac:e.gw_mac,type:e.type,is_guest:e.is_guest,is_wired:e.is_wired,display_name:e.display_name,name:e.name,status:e.status,authorized:e.authorized,blocked:e.blocked}),[e.mac,e.gw_mac,e.type,e.is_guest,e.is_wired,e.display_name,e.name,e.status,e.authorized,e.blocked]);return a.createElement(ne.A,null,a.createElement(Ae,{clientActionProps:n}),n.status===R.S2.ONLINE&&(0,y.SI)(n)&&(n.authorized?a.createElement(ue,{clientActionProps:n}):a.createElement(Ce,{clientActionProps:n})),n.blocked?a.createElement(de,{clientActionProps:n,selfOfflineClientTimeFrame:t}):a.createElement(pe,{clientActionProps:n,selfOfflineClientTimeFrame:t}),a.createElement(te,{clientActionProps:n}))};var Ne=n(143811),he=n(391855),ge=n(349107),fe=n(955161),Se=n(689965),Ie=n(260844),be=n(263130),Te=n(413786),Me=n(873010),ve=n(215454),Le=n(792072),ye=n(598796),Re=n(532419),Pe=n(765562),xe=n(255212),ke=n(329109),we=n(454195),De=n(317672),Fe=n(349665),$e=n(861509),ze=n(407814),Be=n(732881),Ue=n(117982),He=n(900956),Ge=n(74750),Ve=n(834959),We=n(38671),Ke=n(413357),Ye=n(582724),je=n(895424),qe=n(79786),Xe=n(242366),Qe=n(183970),Ze=n(705483);const Je=()=>{const{values:e,setFieldValue:t}=(0,o.j7)(),n=(0,s.useDispatch)(),i=(0,s.useSelector)($e.y),l=(0,a.useMemo)(()=>(e=>ze.Ik({name:(0,Ze.z)(e)}))(i),[i]),r=(0,qe.m)({schema:l}),c=(0,s.useSelector)(M.EL),[d,u]=(0,a.useState)(!1),E=r.handleSubmit(a=>n((0,T.Ls)({members:[],name:a.name,type:Qe.k.CLIENTS})).then(n=>{n?.id&&t("network_members_group_ids",[...e.network_members_group_ids||[],n.id])}).then(()=>{n((0,T.O$)(void 0,{resolveWithExisting:!1}))}).then(()=>{r.reset(),u(!1)}).catch(e=>{const t=(0,We.F)(e)?e:void 0;n((0,A.ox)({icon:m.C.danger,message:"CLIENTS_FAILED_TO_CREATE_GROUP",errorMessage:t?.msg,errorValues:t?.details}))}));return(0,Ye.A)([(0,Ke.Zi)(Ve.B.SETTINGS)],a.createElement(He.A,{isOpen:d,onOpenChange:e=>{e||r.reset(),u(e)}},a.createElement(Ue.A,null,a.createElement(Q.A,{fontSize:"medium",isDisabled:c},a.createElement(C.sA,{id:"CLIENTS_CREATE_A_GROUP"}))),a.createElement(Be.A,{placement:"bottom left",actionButtons:({close:e})=>a.createElement(ae.A,{gap:H.Ln},a.createElement(Ge.A,{motif:"dark",variant:"tertiary-neutral",onPress:e},a.createElement(C.sA,{id:"COMMON_ACTION_CANCEL"})),a.createElement(Ge.A,{motif:"dark",onPress:()=>{E()}},a.createElement(C.sA,{id:"COMMON_ACTION_SAVE"}))),onClear:()=>{r.reset()}},a.createElement(Xe.A,{width:300},a.createElement(je.A,{motif:"dark",control:r.control,name:"name",label:a.createElement(C.sA,{id:"COMMON_GROUP_NAME"})})))))},et=()=>{const e=(0,s.useDispatch)(),t=(0,s.useSelector)($e.y),n=(0,s.useSelector)(M.EL),i=(0,a.useMemo)(()=>t.map(({id:e,name:t})=>({value:e,label:t})),[t]);return(0,a.useEffect)(()=>{e((0,T.O$)(void 0,{crudCacheStrategy:{type:c.e.CACHE}}))},[e]),t.length?a.createElement(ae.A,{width:"100%",flexDirection:"column",gap:H.YC},a.createElement(Ne.A,{type:"picklist",options:i,name:"network_members_group_ids",label:a.createElement(C.sA,{id:"COMMON_GROUPS"}),triggerButtonText:"COMMON_ACTION_EDIT",isFullWidth:!0,disabled:n}),a.createElement(ae.A,null,a.createElement(Je,null))):a.createElement(Fe.A,null,a.createElement(De.A,{htmlFor:"network_members_group_ids"},a.createElement(C.sA,{id:"COMMON_GROUPS"})),a.createElement(ae.A,{height:we.b},a.createElement(Je,null)))};var tt=n(984576),nt=n(11041),at=n(655524);const it=(0,a.memo)(()=>{const{formatMessage:e}=(0,C.tz)(),t=(0,s.useSelector)(nt.xX),n=(0,a.useMemo)(()=>[{label:e({id:"COMMON_NONE"}),value:""},...t],[t,e]);return(0,Ye.A)([(0,at.Ik)(void 0,{crudCacheStrategy:{type:c.e.CACHE}})],a.createElement(ae.A,{flexDirection:"column",gap:2},a.createElement(ae.A,{gap:6,alignItems:"center"},a.createElement(z.A,{size:"small",color:"text-3"},a.createElement(C.sA,{id:"COMMON_WIFI_SPEED_LIMIT"})),a.createElement(F.A,{width:250,description:a.createElement(C.sA,{id:"CLIENTS_PROPERTY_GENERAL_TAB_WIFI_SPEED_LIMIT_PROFILE_TOOLTIP"}),portal:!0},a.createElement(B.A,{isActive:!0,size:"original"}))),a.createElement(tt.i2,{variant:"secondary",name:"usergroup_id",type:"dropdown",full:!0,validated:!0,translateLabel:!0,options:n})))});var lt=n(776309);const rt=({setSelectAccessPoint:e,setFieldValue:t,fixed_ap_mac:n,newFixedApMac:i,submitForm:l,dispatch:r,setNewFixedApMac:s})=>a.createElement(ae.A,{justifyContent:"flex-end",gap:H.kc},a.createElement(V.A,{onClick:()=>{s(n),e(!1)}},a.createElement(C.sA,{id:"COMMON_ACTION_CANCEL"})),a.createElement(V.A,{variant:"primary",onClick:()=>{t("fixed_ap_mac",i),r((0,Ee.to)({modalType:lt.A.LOCK_CLIENT_TO_THIS_AP,modalProps:{onClose:()=>{t("fixed_ap_mac",n),r((0,Ee.AS)())},onContinue:()=>{r((0,Ee.AS)()),e(!1),l()}}}))},disabled:!i||i===n},a.createElement(C.sA,{id:"COMMON_ACTION_SAVE_SELECTION"})));var st=n(313437),ot=n(801081),ct=n(429252),mt=n.n(ct),dt=n(189601),ut=n(180830);const Et=(0,dt.WY)((e,t)=>mt()(e.map(e=>(({name:e,radio_table:t,apGroups:n})=>({name:e,radio_table:t,apGroups:n}))(e)),t.map(e=>(({name:e,radio_table:t,apGroups:n})=>({name:e,radio_table:t,apGroups:n}))(e))))((0,ot.Mz)(Re.kx,ut.K8,(e,t)=>e.map(({name:e,type:n,model:a,mac:i,radio_table:l,radio_table_stats:r})=>({name:e,type:n,model:a,mac:i,radio_table:l,radio_table_stats:r,apGroups:t.filter(e=>e.device_macs.includes(i)).map(({name:e})=>e)}))),e=>e);var _t,At=n(963070),pt=n(596441),Ct=n(328403);!function(e){e.NAME="name",e.CHANNEL="radio_table",e.AP_GROUPS="apGroups"}(_t||(_t={}));const Ot={[_t.NAME]:"COMMON_NAME",[_t.CHANNEL]:"COMMON_CHANNEL",[_t.AP_GROUPS]:"COMMON_AP_GROUPS"};var Nt=n(705145),ht=n(939701),gt=n(6176),ft=n(170459);const St=e=>[{id:_t.NAME,minWidth:100,label:a.createElement(ae.A,{position:"absolute",left:-36,top:-10},a.createElement(z.A,{color:"inherit",size:"medium",weight:"bold"},a.createElement(C.sA,{id:Ot[_t.NAME]}))),renderCell:e=>a.createElement(ae.A,{alignItems:"center",width:"100%",gap:H.YC},a.createElement(ae.A,{width:25,height:25,alignItems:"center"},a.createElement(gt.A,{width:25,height:25,model:e.model})),a.createElement(X.A,{description:(0,K.Q)(e)},a.createElement(Nt.A,{size:"medium",color:"text-2",isTruncated:!0},(0,K.Q)(e))))},{id:_t.CHANNEL,minWidth:50,label:a.createElement(C.sA,{id:Ot[_t.CHANNEL]}),renderCell:({radio_table:t,radio_table_stats:n})=>a.createElement(z.A,{color:"text-2",size:"medium"},e.type===R.sK.WIRELESS?a.createElement(ht.A,{name:(0,ft.Jb)(t,e.radio)?.name,radio_table:t,radio_table_stats:n}):a.createElement(C.sA,{id:"COMMON_FALLBACK"}))},{id:_t.AP_GROUPS,minWidth:60,label:a.createElement(C.sA,{id:Ot[_t.AP_GROUPS]}),renderCell:({apGroups:e})=>e?.length?a.createElement(z.A,{color:"text-2",size:"medium"},e.length>1?a.createElement(X.A,{description:a.createElement(ae.A,{flexDirection:"column"},e.map(e=>a.createElement(z.A,{key:e},e)))},a.createElement(ae.A,{whiteSpace:"nowrap"},a.createElement(C.sA,{id:"CLIENTS_LOCK_AP_AP_GROUPS",values:{length:e.length}}))):e[0]):a.createElement(z.A,{color:"text-1",size:"medium"},a.createElement(C.sA,{id:"COMMON_FALLBACK"}))}],It=({activeItem:e,lockAccessPoints:t,setSelectAccessPoint:n,setNewFixedApMac:i})=>{const{values:{fixed_ap_mac:l}}=(0,o.j7)(),[r,s]=(0,a.useState)(!1),m=t.length>10&&!r?10:t.length,d=(0,a.useCallback)(e=>{i(e?.[0]||null)},[i]);return(0,Ye.A)([(0,Ct.Yo)(void 0,{crudCacheStrategy:{type:c.e.CACHE}})],a.createElement(At.A,{items:t,columns:St(e),disableColumnFilters:!0,disableSort:!0,hideCellOverflow:!1,idField:"mac",rowHeight:pt.I.ROW_HEIGHT,multiSelectMode:!0,initialSortBy:_t.NAME,truncateHeaderCells:!0,initialSelectedIds:[l||e.uplink_mac],maximumSelections:1,onChangeSelection:d,renderFooter:()=>t.length>1?a.createElement(ae.A,{flexDirection:"column",alignItems:"baseline",marginTop:16},a.createElement(ae.A,null,a.createElement(C.sA,{id:t.length>10?"CLIENTS_LOCK_AP_TABLE_FOOTER_ADV":"CLIENTS_LOCK_AP_TABLE_FOOTER",values:{length:m,total:t.length}}),t.length>10?a.createElement(a.Fragment,null," ",a.createElement(V.A,{type:"button",variant:"inline",size:"small",onClick:()=>{s(!r)}},a.createElement(C.sA,{id:"COMMON_SHOW"})," ",a.createElement(C.sA,{id:r?"COMMON_LESS":"COMMON_ALL"}))):null),a.createElement(V.A,{variant:"inline",size:"medium",onClick:()=>{n(!1)}},a.createElement(C.sA,{id:"CLIENTS_LOCK_AP_KEEP_CURRENT_AP"}))):null,rowLimit:m}))};var bt,Tt=n(927099),Mt=n(38937);!function(e){e.NAME="name",e.CHANNEL="radio_table",e.SIGNAL="clientSignal"}(bt||(bt={}));const vt={[bt.NAME]:"COMMON_NAME",[bt.CHANNEL]:"COMMON_CHANNEL",[bt.SIGNAL]:"COMMON_SIGNAL"},Lt=[{id:bt.NAME,minWidth:80,label:a.createElement(C.sA,{id:vt[bt.NAME]}),renderCell:e=>a.createElement(ae.A,{alignItems:"center",width:"100%",gap:H.YC},a.createElement(ae.A,{minWidth:25,width:25,height:25,alignItems:"center"},a.createElement(gt.A,{model:e.model})),a.createElement(X.A,{description:(0,K.Q)(e)},a.createElement(Nt.A,{size:"medium",color:"text-2",isTruncated:!0},(0,K.Q)(e))))},{id:bt.CHANNEL,minWidth:50,label:a.createElement(C.sA,{id:vt[bt.CHANNEL]}),renderCell:({clientRadio:e,radio_table:t,radio_table_stats:n})=>a.createElement(Tt.A,{color:"inherit",size:"body"},a.createElement(ht.A,{name:(0,ft.Jb)(t,e)?.name,radio_table:t,radio_table_stats:n}))},{id:bt.SIGNAL,minWidth:60,label:a.createElement(C.sA,{id:vt[bt.SIGNAL]}),renderCell:({clientSignal:e})=>a.createElement(ae.A,{alignItems:"center",width:"100%",height:"100%"},e?a.createElement(Tt.A,{size:"body",color:(0,Mt.b5)(e)},e," ",a.createElement(C.sA,{id:"COMMON_UNIT_DBM"})):a.createElement(C.sA,{id:"COMMON_FALLBACK"}))}],yt=({fixed_ap_enabled:e,fixed_ap_mac:t,clientUplinkMac:n,clientSignal:i,clientRadio:l,allowSelectingDifferentAp:r,setSelectAccessPoint:o})=>{const c=(0,a.useMemo)(()=>e&&(t||n)?(0,Re.bw)(t||n,["name","type","model","mac","radio_table","radio_table_stats"]):()=>{},[e,t,n]),m=(0,s.useSelector)(c);return a.createElement(At.A,{items:[{...m,clientSignal:i,clientRadio:l}],disableColumnFilters:!0,truncateHeaderCells:!0,disableHover:!0,disableSelection:!0,disableTextPointer:!0,disableSort:!0,idField:"mac",columns:Lt,rowHeight:pt.I.ROW_HEIGHT,renderFooter:()=>r?a.createElement(ae.A,null,a.createElement(tt.$n,{type:"button",variant:"inline",size:"medium",onClick:()=>o(!0)},a.createElement(C.sA,{id:"CLIENTS_LOCK_AP_SELECT_DIFF_AP"}))):null})},Rt=({unsupportedApList:e})=>a.createElement(tt.u9,null,a.createElement(tt.k0,{variant:"twoTone",size:"original"}),a.createElement(Tt.A,null,a.createElement(C.sA,{id:"CLIENTS_LOCK_AP_ALREADY_CONFIGURED_SYSTEM",values:{unsupportedApList:a.createElement("strong",null,"(",e,")")}}))),Pt=({activeItem:e,values:t,selectAccessPoint:n,setSelectAccessPoint:i,setNewFixedApMac:l})=>{const{formatMessage:r}=(0,C.tz)(),o=(0,s.useSelector)(Et),c=(0,s.useSelector)((0,Le.jN)(ye.Xj.LOCK_AP)),m=(0,s.useSelector)((0,Le.gq)(ye.Xj.LOCK_AP,ye.l4.NOT_ALL_DEVICES_SUPPORT_FEATURE)),d=(0,s.useSelector)((0,Le.gq)(ye.Xj.LOCK_AP,ye.l4.NO_SUPPORTED_DEVICES_IN_SETUP)),u=!c&&!!m,E=c&&!!m,_=!c&&!!d,A=!t.fixed_ap_enabled&&e.status===R.S2.OFFLINE,p=(0,a.useMemo)(()=>m?.required_versions?.map(({min_firmware_version:e,type:t})=>`${t} ${e} ${r({id:"COMMON_OR"}).toLowerCase()} ${r({id:"COMMON_LATER"}).toLowerCase()}`).join(", "),[m?.required_versions,r]);return E?a.createElement(Rt,{unsupportedApList:p}):e.type===R.sK.WIRELESS?a.createElement(a.Fragment,null,a.createElement(fe.A,{condition:u||_||A,wrapper:(0,tt.Bm)(A,p)},a.createElement(Ne.A,{type:"realCheckbox",id:"fixed_ap_enabled",name:"fixed_ap_enabled",disabled:u||_||A},a.createElement(ae.A,{alignItems:"center",gap:6},a.createElement(C.sA,{id:"COMMON_LOCK_TO_ACCESS_POINT"}),a.createElement(F.A,{width:200,description:a.createElement(C.sA,{id:"CLIENTS_LOCK_AP_LOCK_TO_AP_TOOLTIP"})},a.createElement(st.a,{isActive:!0,size:"original"}))))),n?a.createElement(It,{activeItem:e,lockAccessPoints:o,setSelectAccessPoint:i,setNewFixedApMac:l}):t.fixed_ap_enabled&&!u&&!_&&!A&&a.createElement(yt,{fixed_ap_enabled:t.fixed_ap_enabled,fixed_ap_mac:t.fixed_ap_mac,clientUplinkMac:e.uplink_mac,clientRadio:e.radio,clientSignal:e.signal,setSelectAccessPoint:i,allowSelectingDifferentAp:o.length>1})||null):null};var xt=n(259902),kt=n(779518),wt=n(564328),Dt=n(928085),Ft=n(966376),$t=n(421574),zt=n(182847),Bt=n(153887),Ut=n(568777),Ht=n(703447),Gt=n(747065);const Vt=e=>String(Math.floor(e)<1?"<1":Math.round(e)),Wt=(0,W.A)(ae.A,{shouldForwardProp:e=>"hasAccessPoint"!==e})`
  align-items: center;
  justify-content: space-between;
  position: relative;
  right: 8px;
  > div {
    ${({hasAccessPoint:e})=>e?"\n        &:nth-child(2) {\n          left: 50px;\n          width: 60px;\n        }\n        &:nth-child(4) {\n          left: 130px;\n          width: 60px;\n        }\n        &:nth-child(6) {\n          left: 203px;\n          width: 65px;\n        }\n   ":"\n        &:nth-child(2) {\n          left: 54px;\n          width: 100px;\n        }\n        &:nth-child(4) {\n          left: 174px;\n          width: 100px;\n        }\n   "}
  }
`,Kt=(0,W.A)(ae.A,{shouldForwardProp:e=>!["dotted","value"].includes(e)})`
  top: 50%;
  position: absolute;
  border-bottom: 1px
    ${({dotted:e=!1,theme:{motifPalette:{uBlue06:t}}})=>`${e?"dotted":"solid"} ${t}`};
  &:after {
    position: absolute;
    content: '${({value:e})=>e}';
    font-size: 11px;
    color: ${({theme:{motifPalette:{text02:e}}})=>e};
    left: calc(50% - 11px);
    top: -25px;
  }
`,Yt=(0,W.A)(ae.A)`
  z-index: 1;
  width: 84.25px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
`,jt=(0,W.A)(ae.A)`
  justify-content: center;
  align-items: center;
  width: 30px;
  height: 30px;
`,qt=(0,a.memo)(({mac:e,ap_mac:t,avg_latency:n,avg_ap_latency:i,avg_isp_latency:l,ms:r,isp_name:o,isp_asn:c})=>{const{name:m,model:d,type:u}=(0,s.useSelector)(Re.U$),E=(0,s.useSelector)((0,a.useMemo)(()=>(0,Re.tG)(t),[t])),_=(0,s.useSelector)((0,a.useMemo)(()=>(0,P.kV)(e,["fingerprint","display_name","unifi_device_info"]),[e])),A=Boolean(Object.keys(E).length);return a.createElement(Wt,{hasAccessPoint:A},a.createElement(Yt,null,a.createElement(X.A,{description:o},a.createElement(jt,null,a.createElement(ae.A,{width:25,maxWidth:25,minWidth:25},a.createElement(Ut.A,{asn:c,style:{width:"100%",objectFit:"contain"},name:o,useFallback:!0}))))),a.createElement(Kt,{value:Boolean(l)&&l>-1?`${Vt(l)}${r}`:null}),a.createElement(Yt,null,a.createElement(X.A,{description:m},a.createElement(jt,null,a.createElement(Gt.A,{model:d,type:u,size:30,flexProps:{justifyContent:"center"}})))),A?a.createElement(a.Fragment,null,a.createElement(Kt,{value:Boolean(i)&&i>-1?`${Vt(i)}${r}`:null}),a.createElement(Yt,null,a.createElement(X.A,{description:E.name},a.createElement(jt,null,a.createElement(gt.A,{model:E.model,width:25,height:25}))))):null,a.createElement(Kt,{dotted:!0,value:Boolean(n)&&n>-1?`${Vt(n-(A&&Boolean(i)&&i>-1?i:0))}${r}`:null}),a.createElement(Yt,{alignItems:"end"},a.createElement(X.A,{description:_.display_name},a.createElement(jt,null,a.createElement(Ht.A,{client:_,size:"2x",topology:!0,width:"30px",height:"30px"})))))}),Xt=(0,W.A)(ae.A)`
  width: 100%;
  border-radius: ${G.Ay["desktop-radius-base"]};
  background: ${({theme:{themeName:e}})=>G.Ay[`desktop-color-neutral-01-${e}`]};
  padding: ${H.S2} ${H.kc} ${H.kc};
  margin-top: ${H.kc};
`,Qt=[zt.t.FINISHED,zt.t.TIMEOUT,zt.t.FAILED,zt.t.CANCELLED],Zt=(0,W.A)(ae.A)`
  justify-content: center;
  > span:not(:last-child) {
    margin-right: ${H.kc};
  }
`,Jt="-- ",en=(0,a.memo)(({min_latency:e,avg_latency:t,max_latency:n,ms:i})=>a.createElement(Zt,null,a.createElement("span",null,a.createElement(z.A,{variant:"caption",color:"text-1"},a.createElement(C.sA,{id:"COMMON_MIN"}))," ",a.createElement(z.A,{variant:"caption",color:"text-3"},e&&e>-1?e.toFixed(1):Jt,i)),a.createElement("span",null,a.createElement(z.A,{variant:"caption",color:"text-1"},a.createElement(C.sA,{id:"COMMON_AVG"}))," ",a.createElement(z.A,{variant:"caption",color:"text-3"},t&&t>-1?t.toFixed(1):Jt,i)),a.createElement("span",null,a.createElement(z.A,{variant:"caption",color:"text-1"},a.createElement(C.sA,{id:"COMMON_MAX"}))," ",a.createElement(z.A,{variant:"caption",color:"text-3"},n&&n>-1?n.toFixed(1):Jt,i))));var tn=n(340936),nn=n(112142),an=n(936344),ln=n(195462),rn=n(282556),sn=n(885529);const on=(e,t,n,a=!1)=>{return i=t.map(({x:e})=>e),[...t.map(e=>e.packetLost?{...e,y:n}:e),...e.filter(({x:e})=>!i.includes(e)).map(e=>({...e,queued:!a}))];var i},cn=({interpolatedPingTestBarsData:e,getCoordinates:t,size:{width:n,height:i},renderTooltip:l,highestYAxisValue:r,showPacketLossWarning:s,setShowPacketLossWarning:o,isFinished:c})=>{const m=(0,a.useRef)(null),d=(0,a.useRef)(on(e,[],r,!0)),[u,E]=(0,a.useState)(e);(0,a.useEffect)(()=>{d.current=on(e,d.current,r)},[e,r]);const _=(0,a.useCallback)(()=>{const e=d.current.find(({queued:e})=>e);e&&(d.current=((e,t)=>{const n=[...e],a=n.findIndex(({x:e})=>e===t);return n[a]={...n[a],queued:!1},n})(d.current,e.x),E(d.current.filter(({queued:e})=>!e))),m&&clearTimeout(m.current),m.current=setTimeout(_,250)},[]);return(0,a.useEffect)(()=>{if(!s){let e=0;for(let t=0;t<u.length;t+=1)if(u[t].packetLost?e+=1:e=0,e>=3){o(!0);break}}},[s,o,u]),(0,a.useEffect)(()=>{m.current&&clearTimeout(m.current)},[c]),(0,a.useEffect)(()=>(_(),()=>{m.current&&clearTimeout(m.current)}),[]),a.createElement(sn.A,{data:c?e:u.length>1&&u||[],getCoordinates:t,hideStroke:!0,width:n,height:i,renderTooltip:l,stackedBarSpacing:1,variant:"grouped",barFullWidth:!0,continuous:!0,transitionDuration:250})};var mn=n(998837);const dn=[{value:1,label:1},{value:45,label:15},{value:88,label:30}],un=e=>{const{motifPalette:{uBlue06:t,neutral03:n}}=(0,mn.u)(),i=(0,a.useCallback)(e=>{const a=((e=[])=>{const t=[];for(let n=0;n<e.length;n+=1){const a=e[n],i=e[n+1];if(i){const e=i.time>a.time?1:0,n=1===e?i.time-a.time:a.time-i.time;t.push(a);for(let l=1;l<=2;l+=1)t.push({...a,time:-1===a.time||-1===i.time?-1:Math.round(1===e&&a.time+n/3*l||a.time-n/3*l)})}else t.push(a)}return t})(e),i=a.slice(0,a.length-1),l=Math.max(4,...i.map(({time:e})=>e)),r=[];for(let e=0;e<i.length;e+=1){const{time:a}=i[e],s=-1===a;r.push({x:e+1,y:s?l:a,color:s?n:t,packetLost:s})}return{interpolatedPingTestBarsData:r,highestYAxisValue:l}},[n,t]);return i(e)},En=(0,W.A)(ae.A,{shouldForwardProp:e=>"showXLabels"!==e})`
  #x-grid-lines > g {
    &:not(:first-child):not(:last-child) {
      display: none;
    }
  }
  ${({showXLabels:e})=>e?"":"\n    #x-labels {\n      display: none;\n    }\n  "}
`,_n=({replies:e,timestamp:t,isFinished:n,showPacketLossWarning:i,setShowPacketLossWarning:l})=>{const{formatMessage:r}=(0,C.tz)(),o=(0,s.useSelector)(rn.zi),c=(0,s.useSelector)(M.hq),m=(0,s.useSelector)(me.BQ),{ref:d,width:u=0,height:E=0}=(0,tn.A)(),_=(0,a.useRef)(null),{interpolatedPingTestBarsData:A,highestYAxisValue:p}=un(e),O=(0,a.useMemo)(()=>{const e=(0,ln.Y)(p,5);return e.length>0&&(e[0]={...e[0],label:r({id:"COMMON_UNIT_MS"})}),e},[p,r]),N=(0,a.useMemo)(()=>{return e=r({id:"COMMON_UNIT_S"}),dn.map(({value:t,label:n})=>({value:t,label:`${n}${e}`}));var e},[r]),h=(0,a.useMemo)(()=>new Intl.DateTimeFormat(o,{hour:"numeric",minute:"2-digit",second:"2-digit",hourCycle:m,timeZone:c}),[o,m,c]),g=(0,a.useCallback)(({left:e,y:n,x:i,top:l,hidden:r},s)=>a.createElement(nn.A,{width:168,left:e,top:l,description:a.createElement(ae.A,{flexDirection:"column"},i?a.createElement(ae.A,{justifyContent:"space-between",marginBottom:H.YC},a.createElement(z.A,{color:"text-1",size:"small"},a.createElement(C.sA,{id:"COMMON_TIME"})),a.createElement(z.A,{color:"text-2",size:"small"},h.format(t+1e3*Math.round(i/3)))):null,a.createElement(ae.A,{justifyContent:"space-between",marginBottom:H.YC},a.createElement(a.Fragment,null,a.createElement(z.A,{color:"text-1",size:"small"},a.createElement(C.sA,{id:"COMMON_LATENCY"})),a.createElement(z.A,{color:"text-2",size:"small"},n>0&&!s?.packetLost?a.createElement(C.sA,{id:"COMMON_UNIT_MILLISECONDS_SHORT",values:{value:n.toFixed(1)}}):a.createElement(C.sA,{id:"CLIENTS_PING_TEST_LATENCY_REQUEST_TIMEOUT"}))))),hidden:r,tooltipProps:{maxWidth:"auto",offset:16*(n>0?1:2)}}),[h,t]),f=(0,a.useCallback)((e,t,r,s,o)=>a.createElement(cn,{interpolatedPingTestBarsData:A,getCoordinates:e,size:o,renderTooltip:g,highestYAxisValue:p,showPacketLossWarning:i,setShowPacketLossWarning:l,isFinished:n}),[p,A,n,g,l,i]);return a.createElement(ae.A,{width:"100%",height:"100%",minHeight:180,position:"relative",ref:d,flexDirection:"column"},a.createElement(En,{showXLabels:n&&Boolean(e.length)},a.createElement(an.A,{xAxis:N,yAxis:O,yLabelsOnRight:!0,width:u,height:E,margin:[20,20,20,0]},f)),a.createElement("div",{ref:_}))},An=(0,a.memo)(()=>a.createElement(Se.A,{marginBottom:"0"},a.createElement(ae.A,{gap:H.kc},a.createElement(B.A,{color:(0,mn.u)().motifPalette.uBlue05,size:"original",variant:"fill"}),a.createElement(Tt.A,{color:"secondary",size:"caption"},a.createElement(C.sA,{id:"CLIENTS_PING_TEST_LATENCY_NOTIFICATION"}))))),pn=({mac:e,setShowPingTestPanel:t})=>{const n=(0,s.useDispatch)(),[i,l]=(0,a.useState)(!1),[r,o]=(0,a.useState)(!1),{formatMessage:c}=(0,C.tz)(),{ap_mac:m,status:d,replies:u=[],min_latency:E,avg_latency:_,max_latency:A,avg_ap_latency:p,avg_isp_latency:O,timestamp:N,isp_name:h,isp_asn:g}=(0,s.useSelector)((0,a.useMemo)(()=>(0,Bt.v)(e),[e])),{isRunning:f,isFinished:S}=(0,a.useMemo)(()=>({isRunning:d===zt.t.RUNNING,isFinished:Qt.includes(d?.toLowerCase())}),[d]),I=(0,a.useMemo)(()=>c({id:"COMMON_UNIT_MS"}),[c]),b=(0,a.useCallback)(()=>{l(!0),n((0,$t.V)(zt.X.START,{queryParams:{mac:e}})),o(!1)},[e,n]),T=(0,a.useCallback)(()=>{l(!0),n((0,$t.V)(zt.X.STOP,{queryParams:{mac:e}}))},[e,n]),M=(0,a.useCallback)(()=>{t()},[t]);return(0,a.useEffect)(()=>{l(!1)},[d]),(0,a.useEffect)(()=>{f||b()},[]),a.createElement(Xt,{flexDirection:"column",gap:H.kc},a.createElement(qt,{ap_mac:m,mac:e,avg_latency:_,avg_ap_latency:p,avg_isp_latency:O,ms:I,isp_name:h,isp_asn:g}),a.createElement(en,{min_latency:E,avg_latency:_,max_latency:A,ms:I}),a.createElement(_n,{key:N,replies:u,timestamp:N,isFinished:S,showPacketLossWarning:r,setShowPacketLossWarning:o}),r?a.createElement(An,null):null,a.createElement(ae.A,{flexDirection:"row",gap:H.kc},d?a.createElement(Ge.A,{size:"small",isDisabled:i,onClick:f?T:b},a.createElement(C.sA,{id:f?"COMMON_STOP":"SPEED_TEST_TEST_AGAIN"})):null,a.createElement(Ge.A,{size:"small",variant:"neutral",isDisabled:i,onClick:M},a.createElement(C.sA,{id:"COMMON_ACTION_CLOSE"}))))},Cn=U.AH`
  min-width: ${82}px;
  min-height: ${54}px;
`,On=({id:e,onPress:t,Icon:n,isDisabled:i})=>a.createElement(Ge.A,{size:"small",className:Cn,variant:"secondary-neutral",onPress:t,isDisabled:i},a.createElement(ae.A,{flexDirection:"column",alignItems:"center",justifyContent:"center",overflow:"hidden"},a.createElement(n,{size:"large"}),a.createElement(z.A,{size:"small",color:"inherit"},a.createElement(C.sA,{id:e})))),Nn=({online:e=!1,setShowPingTestPanel:t})=>a.createElement(On,{id:"CLIENTS_PING_TEST",onPress:t,Icon:kt.A,isDisabled:!e}),hn=({mac:e})=>{const t=(0,r.W6)(),n=(0,Dt.A)(`${k.bB}/${k.Uy.CYBERSECURE}`),i=(0,a.useCallback)(()=>{t.push(`${n}?${wt.Ql}&${wt.pN}=${e}`)},[t,n,e]);return a.createElement(On,{id:"COMMON_ACTION_BLOCK_APP",onPress:i,Icon:xt.A,isDisabled:(0,s.useSelector)(M.EL)})},gn=({mac:e})=>{const t=(0,r.W6)(),n=(0,Dt.A)(`${k.tz}/${Ft.D.TRAFFIC_RULES}/${k.fW}/${k.R6}`),i=(0,a.useCallback)(()=>{t.push(`${n}?target=${e}`)},[t,n,e]),l=(0,s.useSelector)(M.EL);return a.createElement(On,{id:"COMMON_ACTION_BLOCK_APP",onPress:i,Icon:xt.A,isDisabled:l})},fn=({mac:e})=>(0,s.useSelector)(Le.JP)?a.createElement(hn,{mac:e}):a.createElement(gn,{mac:e}),Sn=({mac:e,showAppBlock:t,online:n})=>{const[i,l]=(0,a.useState)(!1);return a.createElement(a.Fragment,null,a.createElement(ae.A,{flexDirection:"row",gap:H.kc,width:"100%"},a.createElement(Nn,{online:n,setShowPingTestPanel:()=>l(!i)}),t?a.createElement(fn,{mac:e}):null),i?a.createElement(pn,{mac:e,setShowPingTestPanel:()=>l(!i)}):null)},In=(0,a.memo)(e=>{const t=(0,s.useDispatch)();(0,a.useEffect)(()=>{t((0,$t.z)({queryParams:{mac:e.mac}},{crudCacheStrategy:{type:c.e.CACHE}}))},[t,e.mac]);const n=(0,a.useMemo)(()=>[{id:"quick-actions",openByDefault:!0,label:a.createElement(C.sA,{id:"CLIENTS_QUICK_ACTIONS"}),renderContent:()=>a.createElement(Sn,{...e})}],[e]);return a.createElement(Se.A,{type:Se.I.ACCORDION,items:n})}),bn=["virtual_network_override_id","virtual_network_override_enabled"],Tn=e=>a.createElement(F.A,{portal:!0,width:220,description:a.createElement(C.sA,{id:"COMMON_LOCAL_DNS_UNAVAILABLE"}),className:U.AH`
      width: fit-content;
    `},e),Mn=e=>a.createElement(F.A,{portal:!0,width:200,description:a.createElement(C.sA,{id:"CLIENTS_PROPERTY_GENERAL_TAB_FIXED_IP_TOOLTIP"}),className:U.AH`
      width: fit-content;
    `},e),vn=({resetForm:e,submitForm:t,setFormDirty:n,setFieldValue:i,dirty:l,isDirty:r,activeItem:o,initialValues:c,values:m,canAssignFixedIp:d})=>{const{formatMessage:u}=(0,C.tz)(),E=(0,s.useDispatch)(),[_,A]=(0,a.useState)(!1),[p,O]=(0,a.useState)(m.fixed_ap_mac||""),[g,f]=(0,a.useState)(!1),S=(0,s.useSelector)(Re.C$),I=(0,s.useSelector)(Re.jY),b=(0,s.useSelector)(N.nd),T=(0,s.useSelector)((0,a.useMemo)(()=>(0,Le.jN)(ye.Xj.VISUAL_PROGRAMMING),[]));(0,a.useEffect)(()=>{n("clientSettings",l)},[l,n]);const M="product_line"in o?o.product_line:null,v=Boolean(M),L=v&&M!==Te.p1.NETWORK,y=(0,s.useSelector)(ve.K8)===(o.type===R.sK.WIRED&&"model"in o?o.model:null),P=m.use_fixedip||d,x=L&&M,k=y?e=>a.createElement(xe.A,null,e):x?((e,t)=>n=>a.createElement(F.A,{portal:!0,width:300,offset:-20,description:a.createElement(C.sA,{id:"CLIENTS_PROPERTY_GENERAL_TAB_DETAILS_NAME_TOOLTIP",values:{product_line:t({id:Me.dn[e]})}})},n))(M,u):void 0,D=!r&&!T&&m.use_fixedip&&m.fixed_ip&&m.fixed_ip!==o.ip,U=(0,a.useCallback)(e=>{e&&b[0]&&!m.virtual_network_override_id&&i("virtual_network_override_id",b[0].value),e||i("virtual_network_override_id",h.T),i("virtual_network_override_enabled",e)},[b,i,m.virtual_network_override_id]);return a.createElement(a.Fragment,null,a.createElement(Se.A,null,a.createElement(ae.A,{flexDirection:"column",gap:H.Ln},!v&&o.hostname?a.createElement($.A,{value:o.hostname,label:a.createElement(C.sA,{id:"COMMON_HOSTNAME"}),disabled:!0,variant:"secondary",size:"body",full:!0}):null,a.createElement(fe.A,{condition:Boolean(k),wrapper:k},a.createElement(Ne.A,{name:"name",label:"CLIENTS_NAME_ALIAS",labelTooltip:a.createElement(C.sA,{id:"CLIENTS_ALIAS_TOOLTIP"}),disabled:Boolean(k),variant:"secondary",autoComplete:"off",size:"body",full:!0,labelTooltipProps:{disableHover:x}})),a.createElement(et,null),v?null:a.createElement(Ne.A,{name:"note",label:"COMMON_NOTE",tooltipMessage:"COMMON_NOTE",variant:"secondary",autoComplete:"off",size:"body",full:!0}),o.is_wired?null:a.createElement(it,null),o.type===R.sK.WIRELESS?a.createElement(Pt,{selectAccessPoint:_,setSelectAccessPoint:A,setNewFixedApMac:O,values:m,activeItem:o}):null,_?a.createElement(rt,{fixed_ap_mac:m.fixed_ap_mac||"",newFixedApMac:p,setFieldValue:i,setNewFixedApMac:O,setSelectAccessPoint:A,dispatch:E,submitForm:t}):null)),a.createElement(Se.A,{type:Se.I.ACCORDION,items:[{id:"ip-settings",openByDefault:!0,label:a.createElement(ce.A,{id:"COMMON_IP_SETTINGS"}),renderContent:()=>a.createElement(ae.A,{flexDirection:"column",gap:H.kc},o.is_allowed_in_visual_programming&&T&&b.length>0?a.createElement(a.Fragment,null,a.createElement(ae.A,null,a.createElement(Z.A,{title:"COMMON_ACTIONS_PROCEED_CONFIRM_TITLE",buttonMessage:"COMMON_ACTION_PROCEED",handleClose:f,handleConfirm:()=>U(!0),isOpen:g,body:a.createElement(z.A,{size:"inherit"},a.createElement(C.sA,{id:"COMMON_IP_NETWORK_OVERRIDE_CONFIRM_MESSAGE",values:{link:a.createElement(ge.A,{href:Pe.A.virtualNetworkCreateGuide,id:"COMMON_LEARN_MORE",noWrap:!0})}}))},a.createElement(Ne.A,{type:"realCheckbox",name:"virtual_network_override_enabled",full:!0,onChange:({target:{checked:e}})=>{e?f(!0):U(e)}},a.createElement(C.sA,{id:"CLIENTS_VIRTUAL_NETWORK_OVERRIDE_ENABLED"})))),m.virtual_network_override_enabled?a.createElement(Ne.A,{type:"dropdown",variant:"secondary",full:!0,name:"virtual_network_override_id",label:"COMMON_NETWORK",translateLabel:!0,options:b}):null):null,a.createElement(fe.A,{condition:!P,wrapper:Mn},a.createElement(Ne.A,{type:"realCheckbox",name:"use_fixedip",onChange:({target:{checked:e}})=>{i("use_fixedip",e),e||i("local_dns_record_enabled",!1)},disabled:!P},a.createElement(C.sA,{id:"COMMON_FIXED_IP_ADDRESS"}))),m.use_fixedip?a.createElement(a.Fragment,null,a.createElement(Ne.A,{label:"COMMON_IP_ADDRESS",size:"body",full:!0,name:"fixed_ip",variant:"secondary"}),D?a.createElement(tt.rf,null,a.createElement(tt.k0,{variant:"fill",size:"medium"}),a.createElement(z.A,null,a.createElement(C.sA,{id:o.is_wired?"COMMON_FIXED_IP_RESERVATION_NOTICE_WIRED":"COMMON_FIXED_IP_RESERVATION_NOTICE_WIRELESS"}))):null):null,S?null:a.createElement(a.Fragment,null,a.createElement(fe.A,{condition:!m.use_fixedip,wrapper:Tn},a.createElement(Ne.A,{type:"realCheckbox",name:"local_dns_record_enabled",disabled:!m.use_fixedip},a.createElement(C.sA,{id:"COMMON_LOCAL_DNS_RECORD"}))),m.local_dns_record_enabled?a.createElement(a.Fragment,null,a.createElement(Ne.A,{size:"body",name:"local_dns_record",variant:"secondary",helperMessage:"COMMON_LOCAL_DNS_RECORD_HELPER",full:!0}),w.PN.test(m.local_dns_record)?a.createElement(Ie.A,{in:!0},a.createElement(be.A,{icon:a.createElement(B.A,{isActive:!0,size:"original",variant:"fill"}),description:a.createElement(C.sA,{id:"COMMON_LOCAL_DNS_RESERVED_FOR_MDNS"})})):null):null))}]}),a.createElement(In,{mac:o.mac,showAppBlock:I&&!v,online:o.status===R.S2.ONLINE}),a.createElement(Se.A,{type:Se.I.BUTTON_LIST},v?a.createElement(oe,{activeItem:o}):a.createElement(Oe,{activeItem:o})),_?null:a.createElement(ke.A,{isDirty:r,onFormSubmit:t,onFormCancel:e,applyButton:a.createElement(he.A,{showWarning:bn.some(e=>c[e]!==m[e]),onSubmit:t})}))},Ln=(0,o.bk)({enableReinitialize:!0,mapPropsToValues:({activeItem:{name:e,display_name:t,usergroup_id:n,use_fixedip:a,local_dns_record:i,local_dns_record_enabled:l,fixed_ip:r,ip:s,virtual_network_override_enabled:o,virtual_network_override_id:c,network_members_group_ids:m,note:d},activeItem:u})=>({local_dns_record_enabled:l||!1,local_dns_record:i||"",name:e,display_name:t,note:d,virtual_network_override_enabled:o||!1,virtual_network_override_id:c||h.T,network_members_group_ids:m||[],usergroup_id:n||"",use_fixedip:!!a,fixed_ip:r||s,...u.type===R.sK.WIRELESS&&{fixed_ap_enabled:u.fixed_ap_enabled??!1,fixed_ap_mac:u.fixed_ap_mac||u.uplink_mac}}),validationSchema:({fixedIpNetworks:e,activeItem:{user_id:t,type:n},combinedClients:i,honeypotNetworksIps:l=[]})=>d.A.lazy(({fixed_ip:r,virtual_network_override_id:s,virtual_network_override_enabled:o})=>{let c=[];if(s&&o){const t=(e||[]).find(e=>e?._id===s)?.ip_subnet;c=t?[t]:[]}else c=(e||[]).map(e=>e?.ip_subnet).filter(Boolean);c=c.filter(Boolean);const m=c.map(e=>e.split("/").shift()).filter(Boolean);return d.A.object().shape({name:d.A.string().label("COMMON_NAME").test("cannotBeEmptySpace",a.createElement(C.sA,{id:"CLIENTS_NAME_CANNOT_BE_EMPTY_SPACE"}),e=>""!==e?.trim()).min(1).max(128),note:d.A.string(),usergroup_id:d.A.string(),use_fixedip:d.A.bool(),local_dns_record_enabled:d.A.bool(),local_dns_record:d.A.string().when("local_dns_record_enabled",{is:!0,then:d.A.string().label("COMMON_LOCAL_DNS_RECORD").matches(w.V2,{message:a.createElement(C.sA,{id:"COMMON_LOCAL_DNS_RECORD_HOSTNAME"})}).required().test("isDNSRecordUnique",a.createElement(C.sA,{id:"CLIENTS_PROPERTY_GENERAL_TAB_INPUT_DNS_RECORD_UNIQUE"}),e=>!e||i.filter(e=>!t||"user_id"in e&&e.user_id!==t).every(t=>!("local_dns_record"in t&&t.local_dns_record&&t.local_dns_record_enabled)||e!==t.local_dns_record))}),virtual_network_override_enabled:d.A.bool(),virtual_network_override_id:d.A.string(),fixed_ip:(0,O.q)(c,r,m,i,l,t),...n===R.sK.WIRELESS&&{fixed_ap_enabled:d.A.bool(),fixed_ap_mac:d.A.string().when("fixed_ap_enabled",{is:!0,then:d.A.string().matches(w.b8,{message:a.createElement(C.sA,{id:"COMMON_VALIDATION_VALID_MAC"})}).required()})}})}),handleSubmit:(e,{props:{activeItem:{user_id:t,mac:n,blocked:a,status:i,hostname:l,network_id:r},devices:s,combinedClients:o,createToast:c,removeToast:d,updateClient:u,updateClientDataInStore:_,showPropertyPanel:A,fetchDeviceDnsRecords:C,fetchNetworkMembersGroups:O,fetchDhcpLeases:N,intl:{formatMessage:h},history:g,routeUrlPrefix:f,allTimeOfflineClientDataLength:S},setSubmitting:I,resetForm:b})=>{const T=(e=>e.fixed_ap_enabled?e:(({fixed_ap_mac:e,name:t,display_name:n,...a})=>({name:t,display_name:t||l||n,...a}))(e))(e);u(T,n,t).then(()=>{b({values:e}),_(n,T,(0,y.hq)(a,i,S)),C(),O(),N(null),N(r)}).catch(e=>{(0,E.A)(e,{formatMessage:h,createToast:c,removeToast:d,showPropertyPanel:A,devices:s,combinedClients:o,showHoneypotSettings:()=>g.push(`${f}/${p.VO.SETTINGS}/${k.bB}`)})||c({icon:m.C.danger,message:D.r[e.apiMsg]||"CLIENTS_NOTICE_SAVE_ERROR"}),b()}).finally(()=>{I(!1)})}}),yn={createToast:A.ox,removeToast:A.uU,updateClient:x.zO,fetchNetworks:b.Sk,fetchDeviceDnsRecords:f.cA,fetchNetworkMembersGroups:T.O$,fetchDhcpLeases:v.fw,tabSubmitFunction:_.Oo,tabResetFunction:_.rW,updateClientDataInStore:x.hw,showPropertyPanel:_.XP},Rn=(0,l.Zz)(C.j4,r.y,(0,s.connect)(e=>({canAssignFixedIp:(0,N.Zx)(e),combinedClients:(0,P.GB)(e),devices:(0,L.G$)(e),fixedIpNetworks:(0,N.nC)(e),defaultNetwork:(0,I.nT)(e),honeypotNetworksIps:(0,S.Yk)(e),routeUrlPrefix:(0,g.pP)((0,M.LF)(e))(e),allTimeOfflineClientDataLength:(0,P.mM)(e)}),yn),Ln,(0,u.A)(({fetchNetworks:e})=>Promise.all([e(void 0,{crudCacheStrategy:{type:c.e.CACHE}})])))(vn),Pn=(0,i.A)(["clientSettings"])(({activeItem:e,isDirty:t,setFormDirty:n})=>a.createElement(Rn,{activeItem:e,isDirty:t,setFormDirty:n}))},790543:(e,t,n)=>{n.d(t,{A:()=>i});var a=n(296540);const i=(e,t=()=>null,n=null,i=!1)=>l=>class extends a.Component{constructor(){super(...arguments),this.isCanceled=!1,this.state={loaded:!1}}UNSAFE_componentWillMount(){n&&performance.mark(`ufsdn.${n}:start`)}componentDidMount(){Promise.resolve(e(this.props)).then(()=>{this.isCanceled||(this.setState({loaded:!0}),n&&performance.measure(`ufsdn.${n}-rendered`,`ufsdn.${n}:start`))})}componentWillUnmount(){this.isCanceled=!0}render(){return i?a.createElement(l,{...this.props,isLoaded:this.state.loaded}):this.state.loaded?a.createElement(l,{...this.props}):a.createElement(t,null)}}},834316:(e,t,n)=>{n.d(t,{$H:()=>i,SK:()=>a,ec:()=>l});const a=e=>e.replace("network","ADMINS"),i=e=>e.replace("network","applications"),l=e=>e.replace("network","console-settings")},842630:(e,t,n)=>{n.d(t,{A:()=>r});var a=n(469733),i=n(296540),l=n(602021);const r=({children:e=null})=>(0,a.useSelector)(l.EL)?null:i.createElement(i.Fragment,null,e)},895424:(e,t,n)=>{n.d(t,{A:()=>m});var a=n(349785),i=n(296540),l=n(438628),r=n(705145),s=n(566723),o=n(263963),c=n(284428);const m=function({control:e,name:t,label:n,placeholder:m,tooltip:d,tooltipProps:u,autoFocus:E,motif:_,onChange:A,onBlur:p,onAfterChange:C,onPaste:O,onKeyDown:N,passwordToggle:h,type:g,helperMessage:f,autoComplete:S,contentBefore:I,contentAfter:b,onFocus:T,value:M,invalid:v}){const L=(0,c.mQ)(),y=(0,c.Im)(),R=(0,c.q)(),P=(0,o.L_)();return i.createElement(a.xI,{control:e,name:t,render:({field:e,fieldState:o,formState:c})=>i.createElement(l.A,{type:g||(h?"password":"text"),variant:"secondary",width:"100%",autoFocus:E,...e,onChange:t=>{A?A(t,e,c):e.onChange(t),C?.(t)},onBlur:t=>{p?p(t,e,c):e.onBlur()},onFocus:T,onPaste:O,disabled:L,value:M??e.value?.toString(),invalid:v||(o.invalid?i.createElement(r.A,{variant:"inherit",style:{overflowWrap:"break-word"}},P((0,a.Jt)(c.errors,t)?.message)||!0," "):void 0),label:n,placeholder:m,labelTooltip:d,labelTooltipProps:{style:{opacity:y?s.xN:void 0,pointerEvents:R?"none":void 0,...u?.style},...u},motif:_,passwordToggle:h,helperMessage:f,autoComplete:S,onKeyDown:N,contentBefore:I,contentAfter:b})})}},939701:(e,t,n)=>{n.d(t,{A:()=>r});var a=n(296540),i=n(699784),l=n(170459);const r=({name:e,radio_table:t,radio_table_stats:n})=>{const r=(0,l.ry)({name:e,radio_table:t,radio_table_stats:n});return a.createElement(a.Fragment,null,r&&"auto"!==r?r:a.createElement(i.sA,{id:"COMMON_AUTO"}))}},966376:(e,t,n)=>{var a;n.d(t,{D:()=>a}),function(e){e.TRAFFIC_RULES="traffic-rules",e.FIREWALL_RULES="firewall-rules"}(a||(a={}))},971550:(e,t,n)=>{n.d(t,{A:()=>o,N:()=>s});var a=n(296540),i=n(71479),l=n(566723),r=n(294303);const s=(0,i.A)(r.A,{shouldForwardProp:e=>!["isPortrait","isGateway","isUdm"].includes(e)})`
  ${({isPortrait:e,isGatewayType:t,isUdm:n})=>`\n      padding-bottom: ${e?l.kc:"initial"};\n      height: ${e?"100%":"auto"};\n      display: flex;\n      align-items: center;\n      img {\n        width: ${(n?"20px":t&&"70%")||"inherit"};\n        height: ${(n?"40px":e&&"inherit")||"unset"} !important;\n      }  \n    `}
`,o=({children:e,size:t=60,flexProps:n={}})=>a.createElement(r.A,{justifyContent:"flex-end",width:t,maxWidth:t,minWidth:t,height:t,maxHeight:t,minHeight:t,overflow:"hidden",zIndex:1,...n},e)},974675:(e,t,n)=>{n.d(t,{ol:()=>d,cd:()=>o,A:()=>s,R9:()=>m,xt:()=>u,Ds:()=>c});var a=n(691189),i=n(294201),l=n(87485);const r="/api/s/{site}/cmd/stamgr",s=(e,t,n={})=>(0,a.Xj)(i.A.FORGET_STA,r,{macs:e},{...(0,l.rk)("CLIENTS_ACTIONS_REMOVE_ERROR",{clientName:t}),...n}),o=(e,t,n={})=>(0,a.Xj)(i.A.BLOCK_STA,r,{mac:e},{...(0,l.rk)("CLIENTS_ACTIONS_BLOCK_ERROR",{clientName:t}),...n}),c=(e,t,n={})=>(0,a.Xj)(i.A.UNBLOCK_STA,r,{mac:e},{...(0,l.rk)("CLIENTS_ACTIONS_UNBLOCK_ERROR",{clientName:t}),...n}),m=(e,t,n={})=>(0,a.Xj)(i.A.KICK_STA,r,{mac:e},{...(0,l.rk)("CLIENTS_ACTIONS_RECONNECT_ERROR",{clientName:t}),...n}),d=(e,t,n={})=>(0,a.Xj)(i.A.AUTHORIZE_GUEST,r,{mac:e},{...(0,l.rk)("CLIENTS_ACTIONS_AUTHORIZE_ERROR",{clientName:t}),...n}),u=(e,t,n={})=>(0,a.Xj)(i.A.UNAUTHORIZE_GUEST,r,{mac:e},{...(0,l.rk)("CLIENTS_ACTIONS_UNAUTHORIZE_ERROR",{clientName:t}),...n})},984576:(e,t,n)=>{n.d(t,{$n:()=>C,Bm:()=>N,i2:()=>A,k0:()=>p,rf:()=>h,u9:()=>O});var a=n(296540),i=n(271856),l=n(927099),r=n(822336),s=n(758649),o=n(823858),c=n(71479),m=n(825032),d=n(566723),u=n(143811),E=n(294303),_=n(699784);const A=(0,c.A)(u.A)`
  div > div > div {
    [for='usergroup_id'] {
      font-size: ${({theme:e})=>e.fontSize["font-size-caption"]};
    }
    > div {
      font-size: ${({theme:e})=>e.fontSize["font-size-body"]};
    }
  }
`,p=(0,c.A)(o.A)`
  color: ${({theme:{motifPalette:{warning:e}}})=>e};
  margin-right: 12px;
`,C=(0,c.A)(s.A)`
  font-size: ${({theme:e})=>e.fontSize["font-size-body"]};
  font-weight: 600;
`,O=(0,c.A)(E.A)`
  width: 100%;
  padding: 16px 22px;
  background-color: ${({theme:{motifPalette:{neutral01:e}}})=>e};
`,N=(e,t)=>n=>a.createElement(i.A,{portal:!0,width:208,description:a.createElement(l.A,null,e?a.createElement(_.sA,{id:"CLIENTS_LOCK_AP_DISCONNECTED"}):a.createElement(_.sA,{id:"CLIENTS_LOCK_AP_FIRST_TIME_CONFIGURATION",values:{unsupportedApList:a.createElement("strong",null,a.createElement(_.sA,{id:"COMMON_VERSION"}),t)}}))},n),h=(0,c.A)(E.A)`
  padding: ${d.kc};
  background: ${({theme:{themeName:e}})=>r.Ay[e===m.S.DARK?"desktop-color-neutral-01-dark":"desktop-color-neutral-00-light"]};
  border-radius: ${r.Ay["desktop-radius-base"]};
`;(0,c.A)(E.A)`
  flex-direction: column;
  gap: ${d.kc};
  align-items: start;
  max-width: 100%;
  width: 100%;
  overflow: hidden;
`},995015:(e,t,n)=>{n.d(t,{p:()=>r});var a=n(822336),i=n(71479),l=n(294303);const r=(0,i.A)(l.A,{shouldForwardProp:e=>"disabled"!==e})`
  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  "}
`}}]);