"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[46850,89965],{47026:(e,t,n)=>{n.d(t,{$:()=>C,A:()=>M});var a=n(296540),i=n(860631),l=n(941555),o=n(294303),r=n(279675),s=n(956619),d=n(469733),m=n(852866),c=n(6510),_=n(566723),u=n(795537),p=n(444232);const E=({macTable:e})=>{const t=(0,d.useSelector)(p.Ib),n=e.map(({mac:e})=>{const n=t.get(e);return{mac:e,name:(0,c.Q)(n)}});return a.createElement(o.A,{width:"100%",flexDirection:"column",paddingTop:_.kc,paddingLeft:_.Ln},n.map(({mac:e,name:t})=>a.createElement("li",{key:e},a.createElement(u.A,{mac:e},(0,m.c)(t)))))};var g=n(813040),h=n(142208),b=n(699784),A=n(780811),f=n(532419);const v=({activeItem:e})=>{const{active_sta_table:t=[]}=e,n=(0,d.useSelector)((0,f.Jp)(e.mac)),i=(0,A.Ewg)(e),l=i&&t.length>0,o=i&&n.length>0,r=(0,A.Fh5)(e),s=(0,a.useMemo)(()=>{if(l){const e=t.map(e=>({mac:e.mac}));return a.createElement(a.Fragment,null,a.createElement(b.sA,{id:"DEVICE_DENY_REMOVE_PARENT_WITH_CHILD_TOOLTIP_MESSAGE"}),a.createElement(E,{macTable:e}))}if(r&&o){const e=n.map(e=>({mac:e.mac}));return a.createElement(a.Fragment,null,a.createElement(b.sA,{id:"DEVICE_DENY_REMOVE_PARENT_WITH_CHILD_TOOLTIP_MESSAGE"}),a.createElement(E,{macTable:e}))}return!1},[t,o,l,n,r]);return a.createElement(g.R,{flexDirection:"column",disabledTooltip:s,tooltipId:"DEVICE_ACTIONS_REMOVE_INFO"},a.createElement(h.A,{device:e,disabled:!!s}))},C="udbManage",M=({activeItem:e,setFormDirty:t,setFormInvalid:n})=>a.createElement(o.A,{flexDirection:"column"},(0,i.j0)(e)?a.createElement(r.A,{activeItem:e,setFormDirty:t,setFormInvalid:n,hideRackMultiScreenSync:!0}):a.createElement(l.Ay,{activeItem:e,setFormDirty:t}),a.createElement(s.A,{activeItem:e,hideRemove:!0,hideSnmp:!0,additionalItems:a.createElement(v,{activeItem:e})}))},86571:(e,t,n)=>{n.d(t,{A:()=>o});var a=n(296540),i=n(217439),l=n(699784);const o=({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)},130056:(e,t,n)=>{n.d(t,{A:()=>p});var a=n(296540),i=n(927099),l=n(495003),o=n(71479),r=n(143811),s=n(294303),d=n(38937),m=n(566723),c=n(699784);const _=(0,o.A)("li")`
  padding: ${m.kc} ${m.YC};
  display: flex;
  align-items: flex-start;
`,u=({className:e,id:t,isSelected:n,onClick:o,option:{label:r,value:u,signal:p,channel:E}})=>a.createElement(_,{id:t,onClick:o,className:e,"aria-selected":n,role:"option"},a.createElement(s.A,{flexDirection:"column",width:m.S2,justifyContent:"flex-start"},n&&a.createElement(l.A,{size:"original"})),a.createElement(s.A,{flexDirection:"column",width:"100%"},a.createElement(s.A,{flexDirection:"row"},a.createElement(i.A,{size:"body",color:"primary"},r)),a.createElement(s.A,{flexDirection:"row"},a.createElement(i.A,{size:"caption",color:"tertiary"},u))),a.createElement(s.A,{flexDirection:"column",width:m.FK,alignItems:"flex-end"},a.createElement(s.A,{flexDirection:"row"},void 0!==p?a.createElement(i.A,{size:"body",color:(0,d.b5)(p)},p,a.createElement(c.sA,{id:"COMMON_UNIT_DBM"})):null),a.createElement(s.A,{flexDirection:"row"},void 0!==E?a.createElement(i.A,{size:"caption",color:"tertiary"},`Ch. ${E}`):null))),p=({options:e,value:t,onChange:n})=>a.createElement(r.A,{full:!0,translateLabel:!0,name:"parentMac",type:"dropdown",variant:"secondary",options:e,value:t,onChange:n,searchable:!0,placeholder:"COMMON_PLACEHOLDER_SELECT_DEVICE",translatePlaceholder:!0,validated:!0,renderOption:u})},137625:(e,t,n)=>{n.d(t,{A:()=>d});var a=n(296540),i=n(353899),l=n(132196),o=n(372737),r=n(566723),s=n(699784);const d=({children:e=null,title:t,titleValues:n,message:d,messageValues:m,handleConfirm:c=()=>null,handleClose:_=()=>null,handleCancel:u,isOpen:p,buttonVariant:E="primary",cancelButtonVariant:g="tertiary",cancelButtonMessage:h="COMMON_ACTION_CANCEL",buttonMessage:b="COMMON_ACTION_CONFIRM",buttonDisabled:A=!1,position:f="top",showHeaderClose:v=!1,contentClassName:C="",body:M,titleBody:O,className:N,rootClose:k=!1,footerActions:I})=>{const w=(0,a.useCallback)(e=>{p&&(e.stopPropagation(),e.key===o.U.ENTER?c():e.key===o.U.ESCAPE&&_(!1))},[p,c,_]);(0,a.useEffect)(()=>(window.addEventListener("keydown",w,!0),()=>{window.removeEventListener("keydown",w,!0)}),[w]);const y=(0,a.useCallback)(()=>{_(!1),u?.()},[_,u]),T=(0,a.useCallback)(()=>{_(!1),c()},[_,c]),x=(0,a.useMemo)(()=>[{text:a.createElement(s.sA,{id:h}),variant:g,onClick:y},{text:a.createElement(s.sA,{id:b}),disabled:A,variant:E,onClick:T}],[b,E,h,g,y,T,A]),S=(0,a.useCallback)(()=>{_(!1)},[_]),D=l.AH`
    ${t?"":`margin-top: ${r.xO}`}
  `;return a.createElement(i.A,{title:t?a.createElement(s.sA,{id:t,values:n}):O||null,...d?{body:a.createElement(a.Fragment,null,a.createElement(s.sA,{id:d,values:m}),M)}:{body:M},position:f,portal:!0,actions:I||x,showHeaderClose:v,contentClassName:l.AH`
        ${D}
        ${C}
      `,onRequestClose:S,isOpen:p,allowOverflow:!0,rootClose:k,className:N},e)}},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={}))},389651:(e,t,n)=>{n.d(t,{A:()=>v});var a=n(469733),i=n(296540),l=n(951272),o=n(271856),r=n(927099),s=n(162420),d=n(71479),m=n(834042),c=n(566723),_=n(143811),u=n(699784),p=n(198494),E=n(294303);const g=(0,d.A)(E.A)`
  margin-bottom: 24px;
`,h=(0,d.A)(o.A)`
  top: 2px;
`,b=(0,d.A)(s.A)`
  margin-left: 6px;
  margin-bottom: 3px;
`,A=e=>{const[t,n]=e.split(":");return 60*Number(t)+Number(n)},f=e=>`${Math.floor(e/m.t).toString().padStart(2,"0")}:${(e%m.t).toString().padStart(2,"0")}`,v=(0,i.memo)(()=>{const{values:{lcm_night_mode_begins:e,lcm_night_mode_ends:t},setFieldValue:n}=(0,l.j7)(),{formatMessage:o}=(0,u.tz)(),s=(0,a.useSelector)(p.jc),d=(0,i.useMemo)(()=>(0,m.gy)(s,15,o),[s,o]),v=(0,i.useMemo)(()=>"string"==typeof e?A(e):e,[e]),C=(0,i.useMemo)(()=>"string"==typeof t?A(t):t,[t]),M=(0,i.useCallback)(({value:e})=>{n("lcm_night_mode_begins",f(+e))},[n]),O=(0,i.useCallback)(({value:e})=>{n("lcm_night_mode_ends",f(+e))},[n]);return(v||0===v)&&(C||0===C)?i.createElement(i.Fragment,null,i.createElement(E.A,{justifyContent:"flex-start",marginBottom:8},i.createElement(r.A,{color:"primary",size:"body"},i.createElement(u.sA,{id:"DEVICE_PROPERTIES_LABEL_LCM_NIGHT_MODE"})),i.createElement(h,{width:200,description:i.createElement(u.sA,{id:"DEVICE_PROPERTIES_LABEL_LCM_NIGHT_MODE_DESCRIPTION"})},i.createElement(b,{size:"original",isActive:!0}))),i.createElement(g,{justifyContent:"space-between",flexDirection:"column"},i.createElement(E.A,{gap:c.Ln},i.createElement(_.A,{type:"dropdown",variant:"secondary",label:"COMMON_START_TIME",translateLabel:!0,name:"lcm_night_mode_begins",placeholder:d.some(({value:e})=>e===v)?void 0:(0,m.oP)({formatMessage:o,minuteOfDay:v,use24HourFormat:s}),translatePlaceholder:!1,options:d,value:v,onChange:M,full:!0}),i.createElement(_.A,{type:"dropdown",variant:"secondary",label:"COMMON_END_TIME",translateLabel:!0,name:"lcm_night_mode_ends",placeholder:d.some(({value:e})=>e===C)?void 0:(0,m.oP)({formatMessage:o,minuteOfDay:C,use24HourFormat:s}),translatePlaceholder:!1,options:d,value:C,onChange:O,full:!0})))):null})},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]))),[o,r]=(0,a.useState)(Object.fromEntries(e.map(e=>[e,!1]))),s=(0,a.useCallback)((e,t)=>{l(n=>({...n,[e]:t}))},[]),d=(0,a.useCallback)((e,t)=>{r(n=>({...n,[e]:t}))},[]),m=!!Object.values(i).find(e=>e),c=!!Object.values(o).find(e=>e);return a.createElement(t,{isDirty:m,isInvalid:c,formStates:i,setFormDirty:s,setFormInvalid:d,...n})}}},639188:(e,t,n)=>{n.d(t,{VG:()=>a,Vm:()=>l,z7:()=>i});const a=80,i="22:00",l="08:00"},689965:(e,t,n)=>{n.d(t,{A:()=>u,I:()=>a});var a,i=n(296540),l=n(822336),o=n(427853),r=n(71479),s=n(825032),d=n(566723),m=n(294303);!function(e){e.ACCORDION="accordion",e.BUTTON_LIST="buttonList"}(a||(a={}));const c=(0,r.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===s.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  `:""}
`,_=(0,r.A)(o.A,{shouldForwardProp:e=>!["marginBottom","margin","flex","padding","nested","background"].includes(e)})`
  background-color: ${({background:e,nested:t,theme:{themeName:n}})=>e||l.Ay[n===s.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===s.S.DARK?"desktop-color-neutral-01-dark":"desktop-color-neutral-00-light"]};
      height: 48px;
      padding: 0 ${d.Ln};
    }
    > div:nth-child(2) {
      margin-bottom: 0;
      padding: 0 ${d.Ln} ${d.Ln};
      > div {
        padding: 0;
      }
    }
  }
`,u=({type:e,marginBottom:t,margin:n,padding:l,flex:o,width:r,nested:s,...d})=>"items"in d?i.createElement(_,{marginBottom:t,margin:n,padding:l,flex:o,nested:s,...d}):i.createElement(c,{nested:s,width:r,marginBottom:t,margin:n,padding:l,flex:o,isButtonList:e===a.BUTTON_LIST,...d},d.children)},703634:(e,t,n)=>{n.d(t,{E:()=>i,l:()=>l});var a=n(768195);const i=e=>e.peer_to_peer_mode===a.tO.STATION&&e.station_mode===a.tM.UAP_COMPATIBLE,l=(e,t)=>e.stationMode!==t.stationMode?e.stationMode.localeCompare(t.stationMode):e.signal!==t.signal?(t.signal||0)-(e.signal||0):e.label.localeCompare(t.label)},834042:(e,t,n)=>{n.d(t,{EJ:()=>d,gy:()=>r,oP:()=>o,pi:()=>l,q8:()=>s,t:()=>i});var a=n(621690);const i=60,l=24,o=({minuteOfDay:e,use24HourFormat:t,formatMessage:n})=>{const a=Math.floor(e/60);return`${String(t?a:a%12||12).padStart(2,"0")}:${String(e%i).padStart(2,"0")}${t?"":` ${n({id:a>=12?"COMMON_PM":"COMMON_AM"})}`}`},r=(e,t,n)=>{const l=Math.max(1,Math.min(60,Math.floor(60/t))),r=Math.floor(60/l);return(0,a.A)(0,24).map(t=>(0,a.A)(l).map(a=>{const l=a*r;return{label:o({use24HourFormat:e,formatMessage:n,minuteOfDay:t*i+l}),value:60*t+ +l}})).flat()},s=e=>6e4*Math.round(e/6e4),d=(e,t)=>{const n=+(e/1e3).toFixed(1),a=+(n/1e3).toFixed(1),i=+(n/6e4).toFixed(1);return n<1e3?`${n} ${t({id:"COMMON_UNIT_MS"})}`:a<60?`${a} ${t({id:"COMMON_UNIT_S"})}`:`${i} ${t({id:"COMMON_UNIT_MIN"})}`}},885358:(e,t,n)=>{n.d(t,{J:()=>u,S:()=>_});var a=n(296540),i=n(943805),l=n(564985),o=n(170459),r=n(803167),s=n(430126),d=n(661010),m=n(605689),c=n(94017);const _=({antenna_id:e,antenna_gain:t,name:n,radio:a,ht:i,channel:o,tx_power_mode:s,tx_power:m,min_txpower:_,vwire_enabled:u,min_rssi_enabled:p,min_rssi:E,hard_noise_floor_enabled:g,sens_level_enabled:h,sens_level:b,assisted_roaming_enabled:A,assisted_roaming_rssi:f})=>({antenna_id:e,antenna_gain:t,name:n,type:a,ht:+i||r.L[a],channel:Number(o)||c.YQ,tx_power_mode:s||l.PB.AUTO,tx_power:m||_||0,vwire_enabled:u??!0,min_rssi_enabled:p||!1,min_rssi:+E||d.XN.DEFAULT,assisted_roaming_enabled:A||!1,assisted_roaming_rssi:f??d.Wh.DEFAULT,hard_noise_floor_enabled:g||!1,sens_level_enabled:h,sens_level:b}),u=e=>{const t=(0,a.useMemo)(()=>({...(()=>{const t=(e.radio_table||[]).find(({radio:e})=>e===i.A.NA.type)?.vwire_enabled??!0,n=e.mesh_sta_vap_enabled??!0,a=t||n;return{radios:(e.support_wifi6e?e.radio_table:e.radio_table?.filter(({radio:e})=>e!==l.sx.RADIO_6E))?.map(_)?.sort(o.j3),atf_enabled:e.atf_enabled||!1,meshingEnabled:a,uplinkMeshEnable:n,uplinkPriority1:e.mesh_uplink_1||"",uplinkPriority2:e.mesh_uplink_2||""}})()}),[e.radio_table,e.mesh_sta_vap_enabled,e.mesh_uplink_1,e.mesh_uplink_2,e.atf_enabled,e.support_wifi6e]),n=(0,a.useMemo)(()=>e.radio_table?.reduce((t,{radio:n})=>(t[n]=(0,s.k)({wifi_caps:e.wifi_caps,hide_ch_width:e.hide_ch_width},n),t),{}),[e.radio_table,e.wifi_caps,e.hide_ch_width]);return{initialValues:t,getSubmitData:(0,a.useCallback)(t=>{const{meshingEnabled:a,uplinkMeshEnable:i,uplinkPriority1:l,uplinkPriority2:r,radios:s,...d}=t,m={...d};return l&&(m.mesh_uplink_1=l,r&&(m.mesh_uplink_2=r)),m.mesh_sta_vap_enabled=t.uplinkMeshEnable,m.radio_table=s.map(t=>{const a=(e.radio_table||[]).find(({name:e})=>e===t.name),i=(0,o.kb)({model:e.model},a.antenna_id)?null:(0,o.Sb)(e.antenna_table||[],a.antenna_id);return(({isChannelWidthHidden:e,antenna:t,minRssiStrictModeSupported:n},a)=>{const{name:i,type:l,sens_level:r,sens_level_enabled:s,...d}=a,m={...d,sens_level_enabled:s,sens_level:r,radio:l,name:i};return"custom"!==d.tx_power_mode&&delete m.tx_power,m.antenna_id&&t?m.antenna_gain=(0,o.pK)(t,i):delete m.antenna_id,n||m.min_rssi_enabled||delete m.hard_noise_floor_enabled,m.min_rssi_enabled||delete m.min_rssi,m.assisted_roaming_enabled||delete m.assisted_roaming_rssi,m.sens_level_enabled||delete m.sens_level,e&&(delete m.channel,delete m.ht),m})({isChannelWidthHidden:n[t.type],antenna:(0,o.Jj)(i,a.name)?i:null,minRssiStrictModeSupported:(0,o.Wg)(a)},t)}),m},[e.radio_table,e.model,e.antenna_table,n]),validationSchema:(0,m.m)(e.radio_table)}}},889764:(e,t,n)=>{n.d(t,{H5:()=>s,Lq:()=>r,n0:()=>o});var a=n(849513),i=n(276907),l=n(919952);const o=e=>e[l.U.SHARED][i.N.PROPERTY_PANEL]?.[a.Io.TAB_GET_DATA_FUNCTION]||{},r=e=>e[l.U.SHARED][i.N.PROPERTY_PANEL]?.[a.Io.TAB_SUBMIT_FUNCTION]||{},s=e=>e[l.U.SHARED][i.N.PROPERTY_PANEL]?.[a.Io.TAB_RESET_FUNCTION]||{}}}]);