"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[78738],{779005(e,t,n){var a;n.d(t,{L:()=>a}),function(e){e.XS="XS",e.S="S",e.SM="SM",e.M="M",e.ML="ML",e.L="L",e.XL="XL",e.XXL="XXL"}(a||(a={}))},572112(e,t,n){n.d(t,{A:()=>r,G:()=>i});var a=n(779005);const l={[a.L.XS]:{FROM:0,TO:374},[a.L.S]:{FROM:375,TO:567},[a.L.SM]:{FROM:568,TO:767},[a.L.M]:{FROM:768,TO:1023},[a.L.ML]:{FROM:1024,TO:1199},[a.L.L]:{FROM:1200,TO:1919},[a.L.XL]:{FROM:1920,TO:2559},[a.L.XXL]:{FROM:2560,TO:1/0}},i=600,r={...l,DASHBOARD:{LAYOUT:{MOBILE:"(max-width: 767px)",DESKTOP:"(min-width: 768px)"},CHART:{MOBILE:"(max-width: 1419px)",DESKTOP:"(min-width: 1420px)"},BAND_SELECTOR:{MOBILE:"(max-width: 1119px)",DESKTOP:"(min-width: 1120px)"}},SIDE_NAVIGATION_BREAKPOINT_UP:`(min-width: ${i+1}px)`,SIDE_NAVIGATION_BREAKPOINT_DOWN:`(max-width: ${i}px)`,VIEWPORT_XS:`(max-width: ${l[a.L.XS].TO}px)`,VIEWPORT_S:`(min-width: ${l[a.L.S].FROM}px) and (max-width: ${l[a.L.S].TO}px)`,VIEWPORT_SM:`(min-width: ${l[a.L.SM].FROM}px) and (max-width: ${l[a.L.SM].TO}px)`,VIEWPORT_M:`(min-width: ${l[a.L.M].FROM}px) and (max-width: ${l[a.L.M].TO}px)`,VIEWPORT_ML:`(min-width: ${l[a.L.ML].FROM}px) and (max-width: ${l[a.L.ML].TO}px)`,VIEWPORT_L:`(min-width: ${l[a.L.L].FROM}px) and (max-width: ${l[a.L.L].TO}px)`,VIEWPORT_XL:`(min-width: ${l[a.L.XL].FROM}px) and (max-width: ${l[a.L.XL].TO}px)`,VIEWPORT_XXL:`(min-width: ${l[a.L.XXL].FROM}px)`,VIEWPORT_XS_UP:`(min-width: ${l[a.L.S].FROM}px)`,VIEWPORT_S_UP:`(min-width: ${l[a.L.SM].FROM}px)`,VIEWPORT_SM_UP:`(min-width: ${l[a.L.M].FROM}px)`,VIEWPORT_M_UP:`(min-width: ${l[a.L.ML].FROM}px)`,VIEWPORT_ML_UP:`(min-width: ${l[a.L.L].FROM}px)`,VIEWPORT_L_UP:`(min-width: ${l[a.L.XL].FROM}px)`,VIEWPORT_XL_UP:`(min-width: ${l[a.L.XXL].FROM}px)`,VIEWPORT_S_DOWN:`(max-width: ${l[a.L.S].TO}px)`,VIEWPORT_SM_DOWN:`(max-width: ${l[a.L.SM].TO}px)`,VIEWPORT_M_DOWN:`(max-width: ${l[a.L.M].TO}px)`,VIEWPORT_ML_DOWN:`(max-width: ${l[a.L.ML].TO}px)`,VIEWPORT_L_DOWN:`(max-width: ${l[a.L.L].TO}px)`,VIEWPORT_XL_DOWN:`(max-width: ${l[a.L.XL].TO}px)`,VIEWPORT_XXL_DOWN:`(max-width: ${l[a.L.XXL].TO}px)`}},126067(e,t,n){n.d(t,{A:()=>s});var a=n(943887),l=n(780811),i=n(170459);const r=({device:e,radio:{radio:t}})=>!(0,a.k_)(e,t),o=({device:e})=>!(0,l.YdF)(e),s={ht:r,channel:r,tx_power_mode:o,tx_power:o,min_rssi_enabled:o,min_rssi:o,hard_noise_floor_enabled:({radio:e})=>(0,i.Wg)(e)}},118835(e,t,n){var a;n.d(t,{M:()=>a}),function(e){e.MAIN="main",e.DHCP="dhcp",e.HOTSPOT="hotspot"}(a||(a={}))},96899(e,t,n){n.d(t,{A:()=>d,n:()=>s});var a=n(296540),l=n(271856),i=n(277184);const r=(0,n(71479).A)("div")`
  white-space: nowrap;
`,o=({option:e,children:t})=>e.disabled&&"message"in e?a.createElement(l.A,{description:e.message,portal:!0,position:"left",width:193,isInteractive:e.isInteractive},t):a.createElement(a.Fragment,null,t),s=({option:e,...t})=>a.createElement(o,{option:e},a.createElement(r,null,a.createElement(i.p,{option:e,...t}))),d=o},875528(e,t,n){n.d(t,{A:()=>i});var a=n(71479),l=n(294303);const i=(0,a.A)(l.A)`
  span.descMessage-secondary {
    display: none;
  }
`},889740(e,t,n){n.d(t,{A:()=>E});var a=n(296540),l=n(217439),i=n(822336),r=n(71479),o=n(294303);const s=(0,r.A)(o.A)`
  background: ${({theme:{themeName:e}})=>i.Ay[`desktop-color-ublue-06-${e}`]};
  color: ${({theme:{themeName:e}})=>i.Ay[`desktop-color-neutral-01-${e}`]};
  border-radius: ${i.Ay["desktop-radius-global"]};
  padding: ${2}px ${6}px ${2}px ${6}px;
  font-weight: ${i.Ay["desktop-font-weight-semibold"]};
`;var d=n(916537);const E=()=>a.createElement(s,{alignItems:"center"},a.createElement(l.A,{weight:"bold",variant:"caption",color:"inherit"},a.createElement(d.sA,{id:"COMMON_LABS"})))},661010(e,t,n){n.d(t,{DQ:()=>i,Wh:()=>r,XN:()=>l});var a=n(768195);const l={MIN:-67,DEFAULT:-80,MAX:-90},i=[{value:a.eF.OFF,label:"DEVICE_PROPERTIES_AP_BAND_STEER_OFF"},{value:a.eF.PREFER_5G,label:"DEVICE_PROPERTIES_AP_BAND_STEER_PREFER_5G"},{value:a.eF.EQUAL,label:"DEVICE_PROPERTIES_AP_BAND_STEER_BALANCED"}],r={MIN:-80,MAX:-60,DEFAULT:-75}},430126(e,t,n){n.d(t,{W:()=>o,k:()=>r});var a=n(860631),l=n(222404),i=n(171073);const r=(e,t)=>{if(!t)return(0,a.mT)(e,l.A.HIDE_CH_WIDTH);const n=e?.hide_ch_width;return!!n&&("all"===n||n===t)},o=(e,t,n,a)=>{e.uplinkPriority1===t.uplinkPriority1&&e.uplinkPriority2===t.uplinkPriority2||a(e.meshingEnabled&&(e.uplinkPriority1||e.uplinkPriority2)?(0,i.A0)(n,e.uplinkPriority1,e.uplinkPriority2):(0,i.Bh)(n))}},563485(e,t,n){n.d(t,{A:()=>p});var a=n(469733),l=n(296540),i=n(928085),r=n(566723),o=n(766624),s=n(329681),d=n(71479),E=n(137625),c=n(294303);const m=(0,d.A)(c.A)`
  div[class*='tooltip-container'] {
    width: 100%;
  }
`,A=({children:e,isOpen:t,handleClose:n,handleConfirm:a})=>l.createElement(m,{marginBottom:r.Ln},l.createElement(E.A,{title:"ANTENNA_TYPE_CHANGE_WARNING_TITLE",message:"ANTENNA_TYPE_CHANGE_WARNING_DESCRIPTION",buttonMessage:"COMMON_ACTION_PROCEED",isOpen:t,handleClose:n,handleConfirm:a,showHeaderClose:!0},e));var _=n(143811),u=n(196010),O=n(916537),N=n(198494),I=n(170459),C=n(959341);const p=({name:e,device:t,onChangeRadioAntenna:n,configuredAntennaId:d,radio:E})=>{const{formatMessage:c}=(0,O.tz)(),m=(0,i.A)(C.WT),p=(0,a.useSelector)(N.EH),h=(0,I.A4)(t,p),g=(0,I.Ox)(t,E.name,h,c),[M,v]=(0,l.useState)(null);return l.createElement(A,{isOpen:null!==M,handleClose:()=>v(null),handleConfirm:()=>n(M)},l.createElement(_.A,{label:l.createElement("label",{htmlFor:e},l.createElement(s.C,{gap:r.YC,alignItems:"center"},l.createElement(O.sA,{id:"DEVICE_PROPERTIES_LABEL_ANTENNA_TYPE"}),l.createElement(o.A,{description:l.createElement(O.sA,{id:(0,I.p$)(t.model)?"DEVICE_PROPERTIES_LABEL_ANTENNA_ANGLE_TYPE_DESC":"DEVICE_PROPERTIES_LABEL_ANTENNA_TYPE_DESC",values:{link:l.createElement(u.A,{to:m},l.createElement(O.sA,{id:"COMMON_PROFESSIONAL_INSTALLER"}))}}),isInteractive:!0,portal:!0}))),name:e,value:d,type:"dropdown",variant:"secondary",options:g,validated:!0,full:!0,translateLabel:!0,onChange:({value:e})=>{(0,I.kb)({model:t.model},e)?v(e):n(e)}}))}},724090(e,t,n){n.d(t,{A:()=>A});var a=n(296540),l=n(271856),i=n(498577),r=n(162420),o=n(71479),s=n(566723),d=n(294303),E=n(916537);const c=(0,o.A)(d.A)`
  > div {
    display: flex;
    align-items: center;
  }
`,m=({infoId:e})=>a.createElement(l.A,{width:208,description:a.createElement(E.sA,{id:e}),portal:!0},a.createElement(r.A,{isActive:!0,size:"original"})),A=({name:e,infoId:t,info:n,warning:l,children:r})=>a.createElement(i.A,{color:"tertiary",htmlFor:e},a.createElement(c,{alignItems:"center",gap:s.YC},r,t?a.createElement(m,{infoId:t}):null,n,l))},329681(e,t,n){n.d(t,{A:()=>g,C:()=>h});var a=n(469733),l=n(296540),i=n(951272),r=n(271856),o=n(162420),s=n(71479),d=n(928085),E=n(566723),c=n(563485),m=n(143811),A=n(196010),_=n(294303),u=n(916537),O=n(198494),N=n(780811),I=n(170459),C=n(959341),p=n(94017);const h=(0,s.A)(_.A)`
  > div {
    display: flex;
    align-items: center;
  }
`,g=({radioIdx:e,deviceRadio:{device:t,radio:n}})=>{const{formatMessage:s}=(0,u.tz)(),g=(0,d.A)(C.WT),M=(0,a.useSelector)(O.EH),{values:v,setFieldValue:R,errors:D}=(0,i.j7)(),T=(0,I.A4)(t,M),L=(0,I.Ox)(t,n.name,T,s);return l.createElement(l.Fragment,null,t.multi_active_antennas&&!(0,N.ERA)(t)&&L.length>1?l.createElement(c.A,{name:`radios.${e}.antenna_id`,configuredAntennaId:(0,i.O6)(v,`radios.${e}.antenna_id`),radio:n,device:t,onChangeRadioAntenna:t=>{R(`radios.${e}.antenna_id`,t)}}):null,(!t.multi_active_antennas||(0,N.ERA)(t))&&L.length>1?l.createElement(_.A,{marginBottom:E.Ln},l.createElement(m.A,{label:T&&(0,I.p$)(t.model)?"DEVICE_PROPERTIES_LABEL_ANTENNA_GAIN":l.createElement("label",{htmlFor:`radios.${e}.antenna_gain`},l.createElement(h,{gap:E.YC,alignItems:"center"},l.createElement(u.sA,{id:"DEVICE_PROPERTIES_LABEL_ANTENNA_GAIN"}),l.createElement(r.A,{description:l.createElement(u.sA,{id:"DEVICE_PROPERTIES_LABEL_ANTENNA_GAIN_DESC",values:{link:l.createElement(A.A,{to:g},l.createElement(u.sA,{id:"DEVICE_PROPERTIES_LABEL_ANTENNA_GAIN_DESC_LINK"}))}}),isInteractive:!0,portal:!0},l.createElement(o.A,{isActive:!0,size:"original"})))),name:`radios.${e}.antenna_gain`,value:v.radios[e].antenna_gain,min:p.x8,max:p.Pe,type:"number",variant:"secondary",full:!0,disabled:!(0,I.kb)(t,v.radios[e].antenna_id),invalid:(0,i.O6)(D,`radios.${e}.antenna_gain`)})):null)}},376576(e,t,n){n.d(t,{A:()=>I});var a=n(296540),l=n(951272),i=n(271856),r=n(314714),o=n(217439),s=n(162420),d=n(566723),E=n(724090),c=n(137625),m=n(143811),A=n(349107),_=n(294303),u=n(916537),O=n(765562);const N="afc_enabled",I=({isOutdoor:e=!1})=>{const{values:t,setFieldValue:n}=(0,l.j7)(),[I,C]=(0,a.useState)(!1),[p,h]=(0,a.useState)(!1),g=(0,a.useCallback)(()=>{t.afc_enabled?n("afc_enabled",!t.afc_enabled):C(!0)},[t?.afc_enabled,n]),M=(0,a.useMemo)(()=>a.createElement(i.A,{description:a.createElement(u.sA,{id:e?"COMMON_AFC_TOOLTIP_OUTDOOR":"COMMON_AFC_TOOLTIP_INDOOR",values:{link:a.createElement(A.A,{href:O.A.afcArticle,id:"COMMON_LEARN_MORE"})}}),portal:!0,isInteractive:!0},a.createElement(s.A,{isActive:!0,size:"original"})),[e]),v=(0,a.useMemo)(()=>a.createElement(_.A,{flexDirection:"column"},a.createElement(_.A,{flexDirection:"row"},a.createElement(o.A,{size:"medium",variant:"body-primary"},a.createElement(u.sA,{id:e?"DEVICE_ENABLE_AFC_OUTDOOR_CONFIRM_TEXT":"DEVICE_ENABLE_AFC_INDOOR_CONFIRM_TEXT",values:e?{}:{link:a.createElement(A.A,{href:O.A.afcArticle,id:"COMMON_LEARN_MORE"})}}))),a.createElement(_.A,{flexDirection:"row",marginTop:d.kc},a.createElement(r.A,{id:"tos_agreement",checked:p,onClick:()=>h(e=>!e)},a.createElement(o.A,{size:"medium",variant:"body-primary"},a.createElement(u.sA,{id:e?"DEVICE_ENABLE_6GHZ_TOS_AGREE":"DEVICE_ENABLE_EXTEND_6GHZ_RANGE_TOS_AGREE",values:{link:a.createElement(A.A,{noWrap:!0,href:O.A.termsOfServiceUrl,id:"COMMON_TOS"})}}))))),[p,e]);return a.createElement(_.A,{marginBottom:d.Ln,justifyContent:"space-between",alignItems:"center"},a.createElement(c.A,{title:e?"DEVICE_ENABLE_6GHZ":"DEVICE_ENABLE_AFC_CONFIRM_HEADER",body:v,handleClose:C,handleConfirm:()=>n("afc_enabled",!0),buttonMessage:"COMMON_ACTION_ENABLE",buttonDisabled:!p,isOpen:I},a.createElement(m.A,{label:"COMMON_AFC",type:"realCheckbox",name:N,checked:!!t?.[N],onChange:g},a.createElement(_.A,{flexDirection:"row",alignItems:"center",gap:d.YC},a.createElement(u.sA,{id:"COMMON_AFC"}),a.createElement(E.A,{name:N,info:M})))))}},817626(e,t,n){n.d(t,{A:()=>T});var a=n(469733),l=n(296540),i=n(951272),r=n(71479),o=n(874807),s=n(943805),d=n(566723),E=n(96899),c=n(137625),m=n(143811),A=n(294303),_=n(916537),u=n(614164),O=n(532419),N=n(724090),I=n(94017);const C=(0,r.A)(m.A)`
  margin: 0;
  padding: 0 ${d.kc};
`,p=({name:e,option:t,value:n,onChange:a,disabled:i})=>l.createElement(E.A,{option:t},l.createElement(C,{name:e,key:t.value,id:`${e}-${t.value}`,type:"radio",variant:"inputless",checked:t.value===n,disabled:i||t.disabled,onChange:o.P1,onClick:()=>a(t)},l.createElement(A.A,{alignItems:"center",justifyContent:"center",height:30,paddingBottom:1},t.value))),h=e=>{const[t,n]=(0,l.useState)(null),{setFieldValue:a}=(0,i.j7)(),{name:r,onChange:o,onChangeCallback:s}=e;return l.createElement(c.A,{title:"AP_CHANNEL_WIDTH_DFS_WARNING_TITLE_IN_PROPERTY_PANEL",message:"AP_CHANNEL_WIDTH_DFS_WARNING_DESC_IN_PROPERTY_PANEL",buttonMessage:"COMMON_ACTION_PROCEED",isOpen:null!==t,handleClose:()=>n(null),handleConfirm:()=>{a(r,t),s?.({value:t})},showHeaderClose:!0},l.createElement(p,{name:r,...e,onChange:e=>{I.mO.includes(e.value)?n(e.value):o(e)}}))},g=e=>{const{formatMessage:t}=(0,_.tz)(),[n,a]=(0,l.useState)(null),{setFieldValue:r}=(0,i.j7)(),{name:o,onChangeCallback:s}=e;return l.createElement(c.A,{title:"AP_CHANNEL_WIDTH_CHANGE_WARNING_TITLE",titleValues:{field:t({id:"COMMON_CHANNEL_WIDTH"}).toLowerCase(),value:n},message:"AP_RADIO_CHANNEL_CHANGE_MESHING_WARNING_DESCRIPTION",messageValues:{appendix:l.createElement(_.sA,{id:"DEVICE_CONFIRM_TO_CONTINUE"})},buttonMessage:"COMMON_ACTION_PROCEED",isOpen:null!==n,handleClose:()=>a(null),handleConfirm:()=>{r(o,n),s?.({value:n})},showHeaderClose:!0},l.createElement(p,{name:o,...e,onChange:e=>{a(e.value)}}))},M=({radioType:e,showMeshingParentWarning:t,...n})=>t?l.createElement(g,{...n}):e!==s.A.NA.type||n.onDfs||I.mO.includes(n.value)?l.createElement(p,{...n}):l.createElement(h,{...n}),v=({name:e,onChange:t,onChangeCallback:n,...a})=>{const{setFieldValue:r,values:o}=(0,i.j7)(),s=a.value||(0,i.O6)(o,e);return l.createElement(M,{...a,value:s,onChange:t=>{r(e,t.value),n?.(t)},name:e,onChangeCallback:n})},R=({options:e,warning:t,fieldLabel:n,...a})=>l.createElement(A.A,{flexDirection:"column"},n||l.createElement(N.A,{name:a.name,warning:t},l.createElement(_.sA,{id:"COMMON_CHANNEL_WIDTH"})),l.createElement(A.A,{width:"100%",gap:d.YC},e.map(e=>l.createElement(v,{option:e,key:e.value,...a})))),D=({device:e,...t})=>{const n=(0,a.useSelector)(O.ID),i=(0,u.T)(e,n);return l.createElement(R,{...t,value:i?.radio?.ht||t.value})},T=({meshingDevice:e,...t})=>e?l.createElement(D,{device:e,...t}):l.createElement(R,{...t})},227902(e,t,n){n.d(t,{qk:()=>at,Hm:()=>tt,sG:()=>nt,eu:()=>Xe});var a=n(469733),l=n(296540),i=n(951272),r=n(271856),o=n(217439),s=n(74750),d=n(71479),E=n(132196),c=n(943887),m=n(874807),A=n(860631),_=n(452167),u=n(566723),O=n(280062),N=n(376576),I=n(94017),C=n(96899),p=n(294303),h=n(955161),g=n(916537),M=n(564985),v=n(302167),R=n(198494),D=n(780811),T=n(170459),L=n(768195),f=n(971492),S=n(252959),x=n(103595),w=n(430126),P=n(533105),b=n(823858),W=n(758649),H=n(6510),F=n(298390),V=n(6176);const B=E.AH`
  justify-content: flex-start !important; // Otherwise button internal styles overwrite the alignment
`,y=({unsupportedDevices:e,onAction:t,captionId:n,actionCaptionId:a="COMMON_DESELECT",children:i})=>{const r=Object.values(e.reduce((e,{device:t})=>(e[t._id]=t,e),{})),s=r.slice(0,F.w),d=r.length-s.length;return l.createElement(p.A,{flexDirection:"column",gap:u.YC},n?l.createElement(o.A,{size:"small"},i||l.createElement(g.sA,{id:n})):null,s.map(({name:e,model:t,mac:n,_id:a})=>l.createElement(p.A,{key:a,flexDirection:"row",gap:u.YC},l.createElement(V.A,{model:t,width:16}),(0,H.Q)({name:e,model:t,mac:n}))),d>0?l.createElement(g.sA,{id:"COMMON_X_MORE",values:{count:d}}):null,t?l.createElement(W.A,{variant:"inline",contentClassName:B,onClick:n=>{n.stopPropagation(),t(e)}},l.createElement(g.sA,{id:a})):null)},$=(0,d.A)(b.A)`
  pointer-events: auto;
  color: #808893;
`,k=e=>l.createElement(r.A,{description:l.createElement(y,{captionId:"COMMON_UNSUPPORTED_DEVICES",...e}),portal:!0,isInteractive:!0},l.createElement($,{height:20,width:20}));var G=n(126067),U=n(314714),X=n(162420),z=n(143811);const Y=(0,d.A)(z.A)`
  margin: 0;
  padding: 0 6px;
`,j=({label:e,name:t,value:n,options:a,onChange:i})=>l.createElement(p.A,{flexDirection:"column"},l.createElement(p.A,{paddingBottom:1},e),l.createElement(p.A,{width:"100%",gap:u.YC},a.map(e=>l.createElement(r.A,{description:e.disabled&&e?.disabledTooltip?e.disabledTooltip:null,key:e.value,portal:!0},l.createElement(Y,{name:t,id:`${t}-${e.value}`,type:"radio",variant:"inputless",checked:e.value===n,disabled:e.disabled,onChange:m.P1,onClick:()=>i(e)},l.createElement(p.A,{alignItems:"center",justifyContent:"center",height:30,paddingBottom:1},l.createElement(g.sA,{id:e.label})))))));var Z=n(137625),K=n(821580),Q=n(349107),q=n(765562),J=n(724090);const ee=({name:e,warning:t,tx_power_mode:n,onChange:a,filteredRadioPowerOptions:i})=>l.createElement(j,{name:e,label:l.createElement(J.A,{name:e,info:n===M.PB.AUTO?l.createElement(r.A,{width:208,description:l.createElement(g.sA,{id:"DEVICE_RADIO_TRANSMIT_POWER_AUTO"}),portal:!0},l.createElement(X.A,{isActive:!0,size:"original"})):null,warning:t},l.createElement(g.sA,{id:"COMMON_TRANSMIT_POWER"})),type:"dropdown",value:n??I.SZ,onChange:a,options:i}),te=({name:e,warning:t,hideCustomPower:n=!1,isAllowedToDisableRadio:a=!0,isRequiredToConfirmAfcTos:r=!1})=>{const{values:s,setFieldValue:d}=(0,i.j7)(),E=(0,i.O6)(s,e),[c,m]=(0,l.useState)(!1),[A,_]=(0,l.useState)(null),[O,N]=(0,l.useState)(!1);(0,l.useEffect)(()=>{_(null)},[E]);const I=(0,l.useMemo)(()=>l.createElement(l.Fragment,null,l.createElement(o.A,{size:"medium",variant:"body-primary"},l.createElement(g.sA,{id:"DEVICE_ENABLE_6GHZ_RADIO_CONFIRM_TEXT_BODY",values:{link:l.createElement(Q.A,{href:q.A.afcArticle,id:"COMMON_LEARN_MORE"}),br:g.br}})),l.createElement(K.A,{paddingTop:u.kc},l.createElement(U.A,{id:"tos_agreement",checked:O,onChange:()=>N(!O)},l.createElement(o.A,{size:"medium",variant:"body-primary"},l.createElement(g.sA,{id:"DEVICE_ENABLE_6GHZ_RADIO_CONFIRM_TOS_AGREE",values:{link:l.createElement(Q.A,{href:q.A.termsOfServiceUrl,id:"COMMON_TOS"})}}))))),[O]),C=(0,l.useMemo)(()=>(e=>[{value:M.PB.AUTO,label:"COMMON_VALUE_AUTO"},{value:M.PB.HIGH,label:"COMMON_HIGH"},{value:M.PB.MEDIUM,label:"COMMON_MEDIUM"},{value:M.PB.LOW,label:"COMMON_LOW"},{value:M.PB.CUSTOM,label:"COMMON_CUSTOM"},{value:M.PB.DISABLED,label:"COMMON_DISABLED",disabled:!e,disabledTooltip:e?null:l.createElement(g.sA,{id:"DEVICE_RADIO_TRANSMIT_POWER_DISABLE_NOT_ALLOWED_TOOLTIP"})}])(a),[a]),p=(0,l.useMemo)(()=>n?C.filter(({value:e})=>e!==M.PB.CUSTOM):C,[n,C]),h=(0,l.useCallback)(({value:t})=>{d(e,t)},[d,e]);if(r&&E===M.PB.DISABLED){const n=A??E;return l.createElement(Z.A,{title:"DEVICE_ENABLE_6GHZ",body:I,isOpen:c,handleClose:()=>{m(!1),_(null)},showHeaderClose:!0,footerActions:[{text:l.createElement(g.sA,{id:"COMMON_ACTION_ENABLE"}),disabled:!O,variant:"primary",onClick:()=>{d(e,A),d("afc_enabled",!0),m(!1)}}]},l.createElement(ee,{name:e,warning:t,tx_power_mode:n,filteredRadioPowerOptions:p,onChange:e=>{n!==e.value&&(m(!0),_(e.value))}}))}return l.createElement(ee,{name:e,warning:t,tx_power_mode:E,onChange:h,filteredRadioPowerOptions:p})},ne=({name:e,min:t,max:n})=>{const{values:a,setFieldValue:r,errors:o}=(0,i.j7)(),s=(0,i.O6)(a,e);return l.createElement(z.A,{name:e,value:(0,i.O6)(a,e)??I.SZ,onConfirm:t=>{r(e,t)},min:t,max:n,type:"number",variant:"secondary",full:!0,validated:!0,placeholder:void 0===s?"COMMON_SELECT":void 0,contentAfter:l.createElement(g.sA,{id:"COMMON_UNIT_DBM"}),invalid:(0,i.O6)(o,e),width:u.o0})},ae=({radioType:e,radioIdx:t,deviceRadios:n,warning:a,hasWirelessConnection:r,isAfcSupportedDevice:o,isOutdoorSupportedDevice:s})=>{const{values:d}=(0,i.j7)(),E=d.radios[t],c=E?.tx_power_mode===M.PB.CUSTOM,m=n.filter(e=>G.A.tx_power(e)),A=Math.max(...m.map(({radio:{min_txpower:e}})=>e)),_=Math.min(...m.map(({radio:{max_txpower:e}})=>e)),O=e!==M.sx.RADIO_NA||!r&&e===M.sx.RADIO_NA,N=o&&e===M.sx.RADIO_6E,I=N&&!d?.afc_enabled&&s;return l.createElement(l.Fragment,null,l.createElement(p.A,{marginBottom:u.Ln},l.createElement(p.A,{width:"100%"},l.createElement(te,{name:`radios.${t}.tx_power_mode`,warning:a,hideCustomPower:N&&s||!s&&d?.afc_enabled&&e===M.sx.RADIO_6E,isAllowedToDisableRadio:O,isRequiredToConfirmAfcTos:I}))),c?l.createElement(p.A,{marginBottom:u.Ln},l.createElement(p.A,{width:u.o0},l.createElement(ne,{name:`radios.${t}.tx_power`,min:A,max:_,radioType:e}))):null)};var le=n(661010),ie=n(311785);const re=(0,d.A)(o.A)`
  flex: 1;
  margin-right: ${u.xO};
`,oe=(0,d.A)("div",(0,ie.A)("marginBottom","marginTop"))`
  margin-bottom: ${({marginBottom:e})=>e||0};
  margin-top: ${({marginTop:e})=>e||0};

  & > :last-child {
    margin-bottom: 0;
  }
`,se=e=>l.createElement(o.A,{color:"text-2"},"-",e),de=({radioIdx:e,warning:t})=>{const{values:n,setFieldValue:a}=(0,i.j7)(),r=n.radios[e],o=`radios.${e}.min_rssi_enabled`;return l.createElement(l.Fragment,null,l.createElement(p.A,{marginBottom:u.Ln,justifyContent:"space-between",alignItems:"center"},l.createElement(z.A,{name:o,type:"realCheckbox",checked:r.min_rssi_enabled??I.SZ},l.createElement(p.A,{flexDirection:"row",alignItems:"center",gap:u.YC},l.createElement(g.sA,{id:"COMMON_MINIMUM_RSSI"}),l.createElement(J.A,{name:o,infoId:"DEVICE_PROPERTIES_LABEL_ENABLE_MIN_RSSI_DESC",warning:t})))),r.min_rssi_enabled?l.createElement(oe,{marginBottom:u.Ln},l.createElement(re,{size:"small",color:"text-3"},l.createElement(g.sA,{id:"DEVICE_PROPERTIES_LABEL_MIN_RSSI"})),l.createElement(z.A,{type:"slider",name:`radios.${e}.min_rssi`,min:-le.XN.MIN,max:-le.XN.MAX,segments:1,value:-(r.min_rssi??le.XN.MIN),withValueIndicator:void 0!==r.min_rssi,valueIndicatorPosition:"right",formatValueIndicatorContent:se,onChange:({target:{value:t}})=>{a(`radios.${e}.min_rssi`,-t)}})):null)};var Ee=n(802),ce=n(86838),me=n(79760),Ae=n(766624),_e=n(889740),ue=n(875528);const Oe=({radioIdx:e})=>{const{values:t,setFieldValue:n,errors:a,touched:r,submitCount:s}=(0,i.j7)(),d=t.radios[e],E=`radios.${e}.assisted_roaming_enabled`,c=`radios.${e}.assisted_roaming_rssi`,m=(0,l.useCallback)(()=>{n(E,!d.assisted_roaming_enabled)},[E,d.assisted_roaming_enabled,n]),A=(0,me.t$)(c,a,r,s);return l.createElement(l.Fragment,null,l.createElement(p.A,{marginBottom:u.Ln},l.createElement(p.A,{width:"100%"},l.createElement(z.A,{label:"COMMON_ROAMING_ASSISTANT",type:"realCheckbox",name:E,checked:d.assisted_roaming_enabled,onChange:m},l.createElement(p.A,{flexDirection:"row",alignItems:"center",gap:u.YC},l.createElement(g.sA,{id:"COMMON_ROAMING_ASSISTANT"}),l.createElement(J.A,{name:E,info:l.createElement(Ae.A,{description:l.createElement(g.sA,{id:"COMMON_ROAMING_ASSISTANT_TOOLTIP"}),portal:!0,isInteractive:!0,iconProps:{isActive:!0,size:"original"}})}),l.createElement(_e.A,null))))),d.assisted_roaming_enabled?l.createElement(p.A,{marginBottom:u.Ln,gap:u.kc},l.createElement(p.A,null,l.createElement(o.A,{size:"medium",color:"text-3"},l.createElement(g.sA,{id:"COMMON_ROAMING_ASSISTANT_THRESHOLD",values:{unit:l.createElement(g.sA,{id:"COMMON_UNIT_DBM"})}}))),l.createElement(p.A,{flexDirection:"column"},l.createElement(p.A,{flexDirection:"row"},l.createElement(p.A,null,l.createElement(Ee.A,{min:le.Wh.MIN,max:le.Wh.MAX,step:1,value:d.assisted_roaming_rssi||0,onChange:({target:{value:e}})=>{n(c,+e)}})),l.createElement(ue.A,{width:u.OF},l.createElement(z.A,{name:c,value:(0,i.O6)(t,c),min:le.Wh.MIN,max:le.Wh.MAX,type:"number",variant:"secondary",full:!0}))),A?l.createElement(p.A,{flexDirection:"row",margin:"0 6px"},l.createElement(ce.A,{isInvalid:!0,label:A})):null)):null)},Ne=({radioIdx:e,deviceRadios:t,warning:n,onRemoveDeviceRadio:a})=>{const r=(0,l.useMemo)(()=>t.filter(({radio:e})=>!(0,T.Wg)(e)),[t]),o=r.length?l.createElement(k,{unsupportedDevices:r,onAction:a}):null,s=`radios.${e}.hard_noise_floor_enabled`,{values:d}=(0,i.j7)();return t.length>r.length?l.createElement(p.A,{marginBottom:u.Ln,justifyContent:"space-between",alignItems:"center"},l.createElement(z.A,{label:"COMMON_INTERFERENCE_BLOCKER",name:s,type:"realCheckbox",checked:d.radios[e].hard_noise_floor_enabled??I.SZ},l.createElement(p.A,{flexDirection:"row",alignItems:"center",gap:u.YC},l.createElement(g.sA,{id:"COMMON_INTERFERENCE_BLOCKER"}),l.createElement(J.A,{name:s,warning:o??n})))):null};var Ie=n(515289);const Ce=(0,d.A)(Ie.A)`
  padding: ${u.YC};
`,pe=(0,d.A)("div")`
  margin-right: ${u.YC};
`,he=e=>({className:t})=>l.createElement(pe,{className:t},l.createElement(V.A,{model:e.model,width:20,height:20,className:t})),ge=({deviceRadios:e,onRemoveDeviceRadio:t})=>{const n=e.slice(0,2),a=e.slice(2);return l.createElement(p.A,{marginBottom:u.Ln,gap:u.kc},n.map(e=>l.createElement(Ce,{key:`${e.device._id}-${e.radio.name}`,symbol:he(e.device),label:(0,H.Q)(e.device),onClose:()=>{t([e])}})),a.length>0?l.createElement(p.A,{padding:u.YC,flex:"0 0 auto"},l.createElement(r.A,{portal:!0,isInteractive:!0,description:l.createElement(y,{unsupportedDevices:a,actionCaptionId:"COMMON_DESELECT",onAction:()=>t(a)})},l.createElement(o.A,{size:"medium"},"+",l.createElement(g.sA,{id:"DEVICE_PLUS_N_SELECTED",values:{n:a.length}})))):null)};var Me=n(817626),ve=n(943805),Re=n(614164),De=n(532419);const Te=E.AH`
  display: inline-block;
`,Le=({name:e,options:t,warning:n,...a})=>{const{values:r,errors:o}=(0,i.j7)(),s=a.value||(0,i.O6)(r,e);return l.createElement(p.A,{flexDirection:"column",width:"100%"},l.createElement(z.A,{label:l.createElement(J.A,{name:e,infoId:a.disabled||s!==I.YQ?void 0:"DEVICE_RADIO_CHANNEL_AUTO",warning:n},l.createElement(g.sA,{id:"COMMON_CHANNEL"})),name:e,type:"dropdown",variant:"secondary",options:t,translateLabel:!0,validated:!0,invalid:(0,i.O6)(o,e),value:s??I.SZ,full:!0,portal:!0,...a}))},fe=e=>{const{setFieldValue:t}=(0,i.j7)(),{name:n}=e;return l.createElement(Le,{...e,onChange:(e,a)=>{t(n,a)}})};var Se;!function(e){e[e.NONE=0]="NONE",e[e.DFS=1]="DFS",e[e.MESHING=2]="MESHING"}(Se||(Se={}));const xe=e=>{const[t,n]=(0,l.useState)(null),[a,r]=(0,l.useState)(Se.NONE),{setFieldValue:o}=(0,i.j7)(),{name:s,radioIdx:d,showMeshingParentWarning:E,showZeroWaitDfsWarning:c,onMeshingRadioChange:m,show6GhzNotAgreedTosWarning:A,..._}=e,u={[Se.NONE]:{title:""},[Se.DFS]:{title:"SET_DFS_CHANNEL_CONFIRM_TITLE",message:c?"SET_DFS_CHANNEL_CONFIRM_ON_ZERO_WAIT_DFS_DEVICE_DESCRIPTION":"SET_DFS_CHANNEL_CONFIRM_DESCRIPTION",messageValues:{link:l.createElement("a",{href:q.A.optimizingWirelessConnectivity,target:"_blank",rel:"noopener noreferrer"},l.createElement(g.sA,{id:"COMMON_DFS_CHANNELS"})),appendix:E?l.createElement(g.sA,{id:"AP_RADIO_CHANNEL_CHANGE_MESHING_WARNING_DESCRIPTION",values:{appendix:""}}):""}},[Se.MESHING]:{title:"AP_RADIO_CHANNEL_CHANGE_WARNING_TITLE",message:"AP_RADIO_CHANNEL_CHANGE_MESHING_WARNING_DESCRIPTION",messageValues:{appendix:l.createElement(g.sA,{id:"DEVICE_CONFIRM_TO_CONTINUE"})}}}[a];return l.createElement(Z.A,{titleValues:{channel:t?.value},...u,buttonMessage:"COMMON_ACTION_PROCEED",isOpen:!!t,handleClose:()=>n(null),handleConfirm:()=>{o(s,t?.value)},contentClassName:Te,showHeaderClose:!0},l.createElement(Le,{..._,name:s,onChange:(e,t)=>{e.isDfs?(r(Se.DFS),n(e)):E?(r(Se.MESHING),n(e)):(r(Se.NONE),o(s,t),n(null))}}))},we=e=>{const[t,n]=(0,l.useState)(null),[a,r]=(0,l.useState)(!1),{setFieldValue:s}=(0,i.j7)(),{name:d,radioIdx:E,showMeshingParentWarning:c,showZeroWaitDfsWarning:m,onMeshingRadioChange:A,show6GhzNotAgreedTosWarning:_,...O}=e;return l.createElement(Z.A,{title:"DEVICE_ENABLE_6GHZ",body:l.createElement(l.Fragment,null,l.createElement(o.A,{size:"medium",variant:"body-primary"},l.createElement(g.sA,{id:"DEVICE_ENABLE_6GHZ_RADIO_CONFIRM_TEXT_BODY",values:{link:l.createElement(Q.A,{href:q.A.afcArticle,id:"COMMON_LEARN_MORE"}),br:g.br}})),l.createElement(K.A,{paddingTop:u.kc},l.createElement(U.A,{id:"tos_agreement",checked:a,onChange:()=>r(!a)},l.createElement(o.A,{size:"medium",variant:"body-primary"},l.createElement(g.sA,{id:"DEVICE_ENABLE_6GHZ_RADIO_CONFIRM_TOS_AGREE",values:{link:l.createElement(Q.A,{href:q.A.termsOfServiceUrl,id:"COMMON_TOS"})}}))))),footerActions:[{text:l.createElement(g.sA,{id:"COMMON_ACTION_ENABLE"}),disabled:!a,variant:"primary",onClick:()=>{s(d,t?.value),s("afc_enabled",!0),s(`radios.${E}.tx_power_mode`,M.PB.AUTO),n(null)}}],isOpen:!!t,handleClose:()=>n(null),contentClassName:Te,showHeaderClose:!0},l.createElement(Le,{...O,name:d,onChange:e=>{n(e)}}))},Pe=e=>{const[t,n]=(0,l.useState)(null),{setFieldValue:a}=(0,i.j7)(),{name:r}=e;return l.createElement(Z.A,{title:"AP_RADIO_CHANNEL_CHANGE_WARNING_TITLE",titleValues:{channel:t?.value},message:"AP_RADIO_CHANNEL_CHANGE_WARNING_DESCRIPTION",messageValues:{link:l.createElement("a",{href:q.A.optimizingWirelessConnectivity,target:"_blank",rel:"noopener noreferrer"},l.createElement(g.sA,{id:"AP_RADIO_MAXIMIZE_CON_AND_PERF"}))},handleClose:()=>n(null),handleConfirm:()=>{a(r,t?.value)},buttonMessage:"COMMON_ACTION_PROCEED",showHeaderClose:!0,isOpen:!!t,contentClassName:Te},l.createElement(Le,{...e,onChange:(e,t)=>{[1,6,11,I.YQ].includes(e.value)?(a(r,t),n(null)):n(e)}}))},be=({name:e,onMeshingRadioChange:t,...n})=>{const{formatMessage:a}=(0,g.tz)(),[r,o]=(0,l.useState)(null),{setFieldValue:s}=(0,i.j7)();return l.createElement(Z.A,{title:"AP_CHANNEL_WIDTH_CHANGE_WARNING_TITLE",titleValues:{field:a({id:"COMMON_CHANNEL"}).toLowerCase(),value:r},message:"AP_RADIO_CHANNEL_CHANGE_MESHING_WARNING_DESCRIPTION",messageValues:{appendix:l.createElement(g.sA,{id:"DEVICE_CONFIRM_TO_CONTINUE"})},buttonMessage:"COMMON_ACTION_PROCEED",isOpen:null!==r,handleClose:()=>o(null),handleConfirm:()=>{s(e,r),t?.({[e]:r})},showHeaderClose:!0},l.createElement(Le,{name:e,...n,onChange:e=>{o(e.value)}}))},We=({radioType:e,ignoreWarnings:t,showMeshingParentWarning:n,showZeroWaitDfsWarning:a,show6GhzNotAgreedTosWarning:i,...r})=>{if(!t){if(r.options.some(({isDfs:e})=>e))return l.createElement(xe,{showMeshingParentWarning:n,showZeroWaitDfsWarning:a,...r});if(n)return l.createElement(be,{...r});if(e===ve.A.NG.type)return l.createElement(Pe,{...r});if(i&&e===M.sx.RADIO_6E)return l.createElement(we,{show6GhzNotAgreedTosWarning:i,...r})}return l.createElement(fe,{...r})},He=({device:e,...t})=>{const n=(0,a.useSelector)(De.ID),i=(0,Re.T)(e,n);return l.createElement(We,{...t,value:i?.radio?.channel||t.value})},Fe=({meshingDevice:e,...t})=>e?l.createElement(He,{device:e,...t}):l.createElement(We,{...t});var Ve=n(329681);function Be(e,t,n){return Object.values(e.reduce((e,n)=>{const{device:a}=n;return t(n).forEach(t=>{const n=t.value,l=e[n];e[n]=l?{...l,supported:[...l.supported||[],a]}:{...t,supported:[a]}}),e},{})).map(t=>{if(!t.supported||t.supported.length===e.length)return t;let a=e;return t.supported?.length>0&&(a=a.filter(({device:e})=>!t.supported?.find(t=>e.mac===t.mac))),a.length?{...t,disabled:!0,message:l.createElement(y,{unsupportedDevices:a,captionId:"COMMON_UNSUPPORTED_DEVICES",onAction:n}),isInteractive:!0}:t})}const ye=({device:e})=>(0,A.lr)(e)?l.createElement(p.A,{marginBottom:u.Ln,justifyContent:"space-between",alignItems:"center"},l.createElement(z.A,{label:"DEVICE_PROPERTIES_LABEL_AIRTIME_FAIRNESS",name:"atf_enabled",type:"realCheckbox",disabled:(0,D.KKO)(e.model,"atfDisabled")},l.createElement(g.sA,{id:"DEVICE_PROPERTIES_LABEL_AIRTIME_FAIRNESS"}))):null;var $e=n(769444),ke=n(231755),Ge=n(343964);const Ue=({deviceRadios:e,defaultExpanded:t=!1})=>{const[n,a]=(0,l.useState)(t),[i,r]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{i||a(t)},[t]),l.createElement($e.A,{label:l.createElement(g.sA,{id:"DEVICE_KEY_METRICS"}),hasDivider:!1,isExpanded:n,onExpandedChange:()=>{r(!0),a(!n)}},l.createElement(p.A,{flexDirection:"column",gap:u.Ln,marginTop:u.Ln},e.filter(e=>e.device&&e.radio).map((e,t,n)=>l.createElement(l.Fragment,null,l.createElement(Ge.default,{key:`${e.device._id}-${e.radio.name}`,radioTableEntry:e.radio,device:e.device,showDeviceHeader:!0}),t!==n.length-1?l.createElement(ke.A,null):null))))},Xe=["antenna_gain","antenna_id","atf_enabled","afc_enabled"],ze="auto",Ye=(0,d.A)("div",(0,ie.A)("marginBottom","marginTop"))`
  margin-bottom: ${({marginBottom:e})=>e||0}px;
  margin-top: ${({marginTop:e})=>e||0}px;

  & > :last-child {
    margin-bottom: 0;
  }
`,je=E.AH`
  width: 100%;
`,Ze=(0,d.A)("div")`
  pointer-events: none;
`,Ke=l.createElement(l.Fragment,null,"(",l.createElement(g.sA,{id:"COMMON_RADIO_BAND_LOW_BAND"}),")"),Qe=l.createElement(l.Fragment,null,"(",l.createElement(g.sA,{id:"COMMON_RADIO_BAND_HIGH_BAND"}),")"),qe=(e,t)=>n=>l.createElement(r.A,{position:"top",width:200,portal:!0,description:l.createElement(o.A,{size:"small",color:"inherit"},l.createElement(g.sA,{id:e,values:t})),className:je},l.createElement(Ze,null,n)),Je=(0,d.A)(p.A)`
  div[class*='tooltip-container'] {
    width: 100%;
  }
`,et=({Wrapper:e,children:t,showWarning:n,warning:a,warningValues:i,...r})=>l.createElement(e,{...r},l.createElement(h.A,{condition:n,wrapper:qe(a,i)},t));var tt;!function(e){e[e.DEVICE_AND_RADIO=0]="DEVICE_AND_RADIO",e[e.ONLY_RADIO=1]="ONLY_RADIO"}(tt||(tt={}));const nt=({radioType:e,deviceRadios:t,radioIdx:n,isLastNa:r,radio6gCount:d,hideTitle:E,showDeviceList:h,onRemoveDeviceRadio:b=m.P1,onSelectMeshingParents:W,mode:H,ignoreMeshingWarnings:F,showZeroWaitDfsWarning:V,showKeyRadioMetrics:B,defaultKeyRadioMetricsExpanded:y})=>{const{formatMessage:$}=(0,g.tz)(),{values:G,setFieldValue:U}=(0,i.j7)(),X=(0,a.useSelector)(S.H),{outdoor_mode_enabled:z}=(0,a.useSelector)(v.$5),Y=(0,a.useSelector)(v.ZZ),j=(0,a.useSelector)(R.EH),Z=(0,a.useDispatch)();(0,l.useEffect)(()=>{Z((0,x.v)())},[Z]);const K=t.length>1,Q=G.radios[n],q=t.filter(({device:e})=>(0,D.YdF)(e)||(0,D.CB0)(e)),J=t.filter(({device:e})=>(0,D.KKO)(e.model,"outdoorModeSupport")),ee=t.filter(({device:e})=>(0,A.X5)(e,Y)).length===t.length,te=t.filter(({device:e})=>(0,A.CW)(e,f.A.ROAMING_ASSISTANT)).length===t.length,ne=0===J.length,le=q.length>0,ie=q.length===t.length,re=t.every(({device:e})=>(0,D.CB0)(e)),oe=q.length?l.createElement(k,{unsupportedDevices:q,onAction:b}):null,se=le&&!re,Ee=H===tt.DEVICE_AND_RADIO,ce=(0,l.useCallback)(e=>{const t=Ee?G:e;return t?.outdoor_mode_override===L.Gi.ON},[Ee,G]),me=(0,l.useMemo)(()=>Be(t,({device:e,radio:t})=>(0,T.Gi)(e,t,X,ce(e),$),b),[X,t,$,ce,b]),Ae=t.every(({device:t})=>(0,w.k)(t,e)),_e=(0,l.useMemo)(()=>e===_.A&&!le&&t.some(({device:t})=>t?.downlink_table?.some(t=>t.radio===e)),[t,le,e]),ue=t.filter(({device:e,radio:t})=>(0,c.k_)(e,t.radio)),Ie=ue.length===t.length,Ce=ue.length>0&&!Ie,pe=Ce?l.createElement(k,{unsupportedDevices:ue,actionCaptionId:"DEVICE_SELECT_UPLINK_RADIO",onAction:W},l.createElement(g.sA,{id:"DEVICE_MESHED_CHILDREN_WARNING"})):null,he=me.reduce((e,{value:n})=>{const a=Be(t,({device:e,radio:t})=>(0,c.r1)({countryChannels:X,formatMessage:$,deviceData:{model:e.model,radio_table:e.radio_table,type:e.type,outdoor_mode_override:ce(e)?L.Gi.ON:L.Gi.OFF,supported_afc_regions:e.supported_afc_regions},radioData:{radio:t.radio,name:t.name,ht:n},options:{isOutdoorModeEnabled:z,isProfessionalInstaller:j}}),b);return{...e,[n]:a.sort((e,t)=>e.value-t.value)}},{}),ve=t.filter(({device:e})=>(0,D.SDT)({model:e.model})).length===t.length,Re=t.filter(({device:e})=>(0,D.aFj)({model:e.model})).length===t.length,De=(0,l.useMemo)(()=>ve&&e===M.sx.RADIO_6E&&d&&d>1&&1===n?Ke:ve&&e===M.sx.RADIO_6E&&d&&d>1&&2===n?Qe:Re&&e===M.sx.RADIO_NA&&1===n?Ke:Re&&e===M.sx.RADIO_NA&&2===n?Qe:void 0,[ve,Re,e,d,n]),Te=(0,l.useCallback)((e,t)=>void 0===Q?.channel||t===ze||(he?.[e]||[]).some(({value:e})=>e===t),[Q?.channel,he]),Le=(e,t)=>t===ze||(he?.[e]||[]).some(({value:e})=>e===t),fe=[{value:ze,label:$({id:"COMMON_VALUE_AUTO"})},...Object.values(he).flat().filter((e,t,n)=>t===n.findIndex(t=>t.value===e.value))],Se=fe.map(t=>{return{...t,...Q?.ht&&(n=Q.ht,a=t.value,i=t.label,a!==ze&&e===M.sx.RADIO_NA&&I.mO.includes(n)&&!i.includes($({id:"COMMON_DEVICE_RADIO_CHANNEL_DFS"})))?{label:`${t.label} (${$({id:"COMMON_DEVICE_RADIO_CHANNEL_DFS"})})`,isDfs:!0}:{},...!Q?.ht||Le(Q?.ht,t.value)?{}:{disabled:!0,message:l.createElement(g.sA,{id:"DEVICE_RADIO_CHANNEL_NOT_SUPPORTED",values:{width:Q?.ht}})}};var n,a,i}),xe=Ie&&!F,we=(0,i.O6)(G,`radios.${n}.channel`),Pe=fe.find(({value:e})=>e===we)?.isDfs,be=(0,l.useCallback)(e=>{xe||Te(e.value,we)||U(`radios.${n}.channel`,void 0)},[xe,Te,we,U,n]);return Q&&t.length?0===me.length?l.createElement(P.A,{radioType:e,radioSuffix:De}):l.createElement(Ye,null,E?null:l.createElement(o.A,{size:"medium",style:{marginBottom:u.kc}},l.createElement(O.A,{radio:e,suffix:De})),h?l.createElement(ge,{deviceRadios:t,onRemoveDeviceRadio:b}):null,Ae?null:l.createElement(p.A,{marginBottom:u.Ln,gap:u.Ln},l.createElement(et,{Wrapper:p.A,showWarning:xe,warning:"DEVICE_MESHED_RADIO_CHANNEL_WIDTH_DISABLED_TOOLTIP",warningValues:{radio:l.createElement(g.sA,{id:(0,c.dI)(e)})},flex:1},l.createElement(Me.A,{name:`radios.${n}.ht`,radioType:e,options:me.map(t=>{return{...t,...Te(t.value,Q?.channel)?{}:{disabled:!0,message:l.createElement(g.sA,{id:"DEVICE_RADIO_CHANNEL_WIDTH_NOT_SUPPORTED",values:{channel:Q?.channel}})},disabled:(n=t.value,e===M.sx.RADIO_6E&&void 0!==n&&0===he?.[n]?.length)};var n}),disabled:xe,showMeshingParentWarning:_e,meshingDevice:1===ue.length?ue[0]?.device:void 0,warning:Ce?pe:null,onDfs:Pe,onChangeCallback:be})),l.createElement(et,{Wrapper:Je,showWarning:xe,warning:"DEVICE_MESHED_RADIO_CHANNEL_DISABLED_TOOLTIP",warningValues:{radio:l.createElement(g.sA,{id:(0,c.dI)(e)})},width:116},l.createElement(Fe,{name:`radios.${n}.channel`,options:xe?fe:Se,radioType:e,radioIdx:n,renderOption:C.n,disabled:xe,ignoreWarnings:se,showMeshingParentWarning:_e,meshingDevice:1===ue.length?ue[0]?.device:void 0,showZeroWaitDfsWarning:V,warning:Ce?pe:null,show6GhzNotAgreedTosWarning:ee&&!G?.afc_enabled&&Q?.tx_power_mode===M.PB.DISABLED&&!ne}))),Ie&&W?l.createElement(p.A,{marginBottom:u.Ln,gap:u.kc,flexDirection:"column"},l.createElement(o.A,{size:"small",color:"text-3"},l.createElement(g.sA,{id:"DEVICE_MESHED_CHANNEL_HT_CONTROLLED"})),l.createElement(s.A,{variant:"secondary-emphasis",width:"full",onClick:W},l.createElement(g.sA,{id:H===tt.ONLY_RADIO?"DEVICE_MESHING_SELECT_UPLINK":"DEVICE_MESHING_EDIT_UPLINK"}))):null,ie?null:l.createElement(ae,{radioType:e,radioIdx:n,deviceRadios:t,warning:le&&oe,hasWirelessConnection:Ie||Ce||_e,isAfcSupportedDevice:ee,isOutdoorSupportedDevice:!ne}),e===M.sx.RADIO_NA&&te?l.createElement(Oe,{radioIdx:n}):null,H!==tt.DEVICE_AND_RADIO||le?null:l.createElement(Ve.A,{radioIdx:n,deviceRadio:t[0]}),!K&&e===M.sx.RADIO_6E&&ee&&1===d&&ne?l.createElement(N.A,null):null,ie?null:l.createElement(de,{radioIdx:n,warning:le&&oe}),!ie&&Q.min_rssi_enabled?l.createElement(Ne,{radioIdx:n,deviceRadios:t,onRemoveDeviceRadio:b}):null,!K&&r?l.createElement(ye,{device:t[0].device}):null,B?l.createElement(Ue,{deviceRadios:t,defaultExpanded:y}):null):null},at=({device:e,radio:t,...n})=>{const{values:{radios:a}}=(0,i.j7)(),r=a.findIndex(e=>e.type===t.radio&&e.name===t.name);return a[r]?l.createElement(nt,{radioType:t.radio,deviceRadios:[{device:e,radio:t}],radioIdx:r,showZeroWaitDfsWarning:(0,A.CW)(e,f.A.DFS_BACKGROUND_SCAN),...n}):null}},533105(e,t,n){n.d(t,{A:()=>g});var a=n(469733),l=n(296540),i=n(271856),r=n(217439),o=n(162420),s=n(566723),d=n(888170),E=n(469628),c=n(491877),m=n(835908),A=n(71479);(0,A.A)(m.A)`
  color: ${({theme:{motifPalette:{aqua08:e}}})=>e};
`,(0,A.A)(c.A)`
  color: ${({theme:{motifPalette:{aqua07:e}}})=>e};
`;const _=(0,A.A)(E.A)`
  color: ${d.Ay["purple-1"]};
`;var u=n(349107),O=n(294303),N=n(916537),I=n(564985),C=n(302167),p=n(765562);const h={[I.sx.RADIO_NA]:{message:"DEVICE_PROPERTIES_SECTION_CONFIGURE_RADIOS_SUBSECTION_NA"},[I.sx.RADIO_6E]:{message:"DEVICE_PROPERTIES_SECTION_CONFIGURE_RADIOS_SUBSECTION_6E",tooltip:"DEVICE_PROPERTIES_SECTION_CONFIGURE_RADIOS_SUBSECTION_6E_TOOLTIP",link:p.A.wifi6GHzRegions}},g=({radioType:e,radioSuffix:t})=>{const n=(0,a.useSelector)(C._B),{message:d,tooltip:E,link:c}=h[e]||{};return l.createElement(O.A,{justifyContent:"space-between"},l.createElement(O.A,{gap:s.YC,opacity:.5},l.createElement(_,{height:"20",width:"20"}),l.createElement(r.A,{weight:"bold",size:"small"},l.createElement(N.sA,{id:d,values:{suffix:t?l.createElement(l.Fragment,null," ",t):""}}))),l.createElement(O.A,{gap:s.YC},l.createElement(r.A,{size:"small"},l.createElement(N.sA,{id:"COMMON_PROHIBITED_IN_COUNTRY",values:{country:n}})),E?l.createElement(i.A,{portal:!0,isInteractive:!0,description:l.createElement(r.A,null,l.createElement(N.sA,{id:E})," ",c?l.createElement(u.A,{href:c,id:"COMMON_LEARN_MORE",noWrap:!0}):null)},l.createElement(o.A,{isActive:!0,size:"original"})):null))}},605689(e,t,n){n.d(t,{m:()=>c});var a=n(296540),l=n(870443),i=n(916537),r=n(255029),o=n(564985),s=n(661010),d=n(94017);const E=(e,t,n)=>t?.filter(t=>t.radio===e).map(e=>+e[n]),c=(e,t)=>{const n=Object.values(o.sx).reduce((t,n)=>(t[n]={min_txpower:E(n,e,"min_txpower")?.sort((e,t)=>t-e)?.[0],max_txpower:E(n,e,"max_txpower")?.sort((e,t)=>e-t)?.[0]},t),{}),c=e=>{const t=n[e]||{};return[`txPowerLimit${e}`,a.createElement(i.sA,{id:"COMMON_VALIDATION_HINT_RANGE",values:{min:t.min_txpower,max:t.max_txpower}}),function(n){return this.parent?.type!==e||n===r.Q||((e,t,n)=>(void 0===n.min_txpower||t>=n.min_txpower)&&(void 0===n.max_txpower||t<=n.max_txpower))(0,n,t)}]};return{radios:l.A.array().of(l.A.object().shape({tx_power_mode:l.A.string(),tx_power:l.A.mixed(e=>"number"==typeof e||e===r.Q).nullable().when(["tx_power_mode"],{is:e=>e===o.PB.CUSTOM,then:l.A.number().integer().nullable().label("COMMON_TRANSMIT_POWER").test(...c(o.sx.RADIO_NG)).test(...c(o.sx.RADIO_NA)).test(...c(o.sx.RADIO_6E))}),antenna_gain:l.A.number().nullable().default(null).label("COMMON_ANTENNA_GAIN").minOrEmpty(d.x8).max(d.Pe),assisted_roaming_enabled:l.A.boolean(),assisted_roaming_rssi:l.A.number().when("assisted_roaming_enabled",{is:!0,then:l.A.number().integer().label("COMMON_ROAMING_ASSISTANT_THRESHOLD_NAME").min(s.Wh.MIN,a.createElement(i.sA,{id:"COMMON_VALIDATION_INVALID_RANGE",values:{min:s.Wh.MIN,max:s.Wh.MAX}})).max(s.Wh.MAX,a.createElement(i.sA,{id:"COMMON_VALIDATION_INVALID_RANGE",values:{min:s.Wh.MIN,max:s.Wh.MAX}})).required()}),channel:t?l.A.string().nullable():l.A.string().required(a.createElement(i.sA,{id:"COMMON_VALIDATION_REQUIRED",values:{name:a.createElement(i.sA,{id:"COMMON_CHANNEL"})}}))}))}}},280062(e,t,n){n.d(t,{A:()=>r});var a=n(296540),l=n(916537),i=n(842916);const r=({radio:e,suffix:t})=>i.U[e]?a.createElement(a.Fragment,null,a.createElement(l.sA,{id:i.U[e]}),t?a.createElement("span",null," ",t):null):a.createElement(l.sA,{id:"COMMON_FALLBACK"})},8795(e,t,n){n.d(t,{A:()=>I});var a=n(296540),l=n(112142),i=n(66706),r=n(71479),o=n(294303),s=n(311785);const d=(0,r.A)(o.A,(0,s.A)("innerColor","outerColor"))`
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  pointer-events: none;
  g {
    transition: unset;
  }
  circle {
    &:first-child {
      ${({outerColor:e})=>e?`fill: ${e};`:""}
    }
    &:last-child {
      ${({innerColor:e})=>e?`fill: ${e};`:""}
      r: 4.5;
    }
  }
`,E=n(132196).AH`
  overflow: visible;
`,c=({chartWidth:e,chartHeight:t,top:n,left:l,innerColor:r,outerColor:o="#fff"})=>a.createElement(d,{innerColor:r,outerColor:o},a.createElement("svg",{width:e,height:t,className:E},l&&n?a.createElement(i.A,{hasAnimation:!1,x:l,y:n}):null));var m=n(822336);const A=(0,r.A)(o.A,(0,s.A)("topA","topB","leftA","leftB","chartHeight","useFullHeightConnector"))`
  z-index: 1;
  border-left: 1px dashed ${({theme:{themeName:e}})=>m.Ay[`desktop-color-neutral-10-${e}`]};
  position: absolute;
  ${({topA:e,topB:t,leftA:n,leftB:a,chartHeight:l,useFullHeightConnector:i})=>`\n     top: ${i&&l?20:Math.min(e||0,t)}px;\n     height: ${i&&l?l-50:Math.max(e||0,t)-Math.min(e||0,t)}px;\n     left: ${((n||0)+a)/2-1}px;\n   `}
`,_=({topA:e,leftA:t,topB:n,leftB:l,chartHeight:i,useFullHeightConnector:r})=>a.createElement(A,{topA:e,topB:n,leftA:t,leftB:l,chartHeight:i,useFullHeightConnector:r}),u=(e,t,n)=>n?(e||0)+((e||0)<Math.round(t/2)?8:-8):(e||0)-8,O=(e,t)=>((e||0)+(t||0))/(t?2:1),N=(e,t,n,a)=>({maxWidth:"auto",...!a?.position&&n&&e&&t&&{position:e<Math.round(t/2)?"right":"left"},portal:!0,...a}),I=({width:e,topA:t,leftA:n,topB:i,leftB:r,chartWidth:o,chartHeight:s,hidden:d,description:E,innerColor:m,tooltipRenderCondition:A,tooltipProps:I={},useSideSwapping:C=!0,useFullHeightConnector:p=!1})=>d?null:a.createElement(a.Fragment,null,A?a.createElement(l.A,{width:e,left:u(n,o,C),top:O(t,i),description:E,hidden:d,topMargin:4,tooltipProps:N(n,o,C,I)}):null,r&&i?a.createElement(_,{topA:t,topB:i,leftA:n,leftB:r,chartHeight:s,useFullHeightConnector:p}):null,a.createElement(c,{chartWidth:o,chartHeight:s,top:t,left:n,innerColor:m}))},668763(e,t,n){var a;n.d(t,{Z:()=>a}),function(e){e.AIRVIEW="AIRVIEW"}(a||(a={}))},298390(e,t,n){n.d(t,{w:()=>a});const a=12},195462(e,t,n){n.d(t,{Y:()=>l,v:()=>i});var a=n(847439);const l=(e,t,n=!1)=>{const l=t-1;let i=Math.ceil(e);if(Number.isNaN(i))return[];const r=i%l;return 0!==r&&(i+=l-r),(0,a.A)(t,e=>{return{value:t=e?Math.ceil(e*(i/l)):0,label:n?e%2==0&&String(t)||null:String(t)};var t}).reverse()},i=(e,t)=>{const[n]=e,a=[n],l=e.length-1;for(let n=1;n<t-1;n+=1){const i=n*l/(t-1),r=Math.floor(i).toFixed();a[n]=Math.round(e[r]+(e[Math.ceil(i).toFixed()]-e[r])*(+i-+r))}return a[t-1]=e[l],a}}}]);