"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[15526,89965],{14129:(e,t,a)=>{a.d(t,{A:()=>b});var n=a(469733),r=a(296540),l=a(951272),i=a(874807),o=a(86571),s=a(689965),c=a(845030),d=a(170459),m=a(430126),u=a(885358),_=a(210514),g=a(94017);const p=({activeItem:e,getSubmitData:t,setFormDirty:a,setFormInvalid:l,values:i,initialValues:o,resetForm:s,dirty:d,isValid:u})=>{const _=(0,n.useDispatch)();return(0,r.useEffect)(()=>{a(g.eD,d)},[d,a]),(0,r.useEffect)(()=>{l(g.eD,!u)},[u,l]),(0,r.useEffect)(()=>(_((0,c.uo)({[g.eD]:()=>t(i)})),_((0,c.Oo)({[g.eD]:t=>{s({values:{...i,...t}});const{mesh_uplink_1:a="",mesh_uplink_2:n=""}=t;(0,m.W)({uplinkPriority1:a,uplinkPriority2:n,...i},o,e,_)}})),_((0,c.rW)({[g.eD]:s})),()=>{_((0,c.uo)({[g.eD]:null})),_((0,c.Oo)({[g.eD]:null})),_((0,c.rW)({[g.eD]:null}))}),[_,s,i,o,t]),null},h=({activeItem:e,setFormDirty:t,setFormInvalid:a,...n})=>{const{initialValues:o,validationSchema:s,getSubmitData:c}=(0,u.J)(e);return r.createElement(l.l1,{initialValues:o,onSubmit:i.P1,enableReinitialize:!0,validationSchema:s},l=>r.createElement(r.Fragment,null,t&&a&&r.createElement(p,{...l,activeItem:e,setFormDirty:t,setFormInvalid:a,getSubmitData:c}),r.createElement(_.A,{activeItem:e,...n})))},b=({activeItem:e,...t})=>{const a=(0,r.useMemo)(()=>e.radio_table?.filter(({radio:e})=>Boolean(e)).sort(d.j3),[e.radio_table]);return r.createElement(s.A,{type:s.I.ACCORDION,items:[{id:g.eD,label:r.createElement(o.A,{id:"COMMON_RADIOS"}),openByDefault:!0,renderContent:()=>r.createElement(h,{activeItem:e,sortedRadios:a,...t})}]})}},86571:(e,t,a)=>{a.d(t,{A:()=>i});var n=a(296540),r=a(217439),l=a(699784);const i=({id:e,children:t,values:a})=>n.createElement(r.A,{color:"text-1",weight:"bold",size:"medium"},e?n.createElement(l.sA,{id:e,values:a}):null,t)},100188:(e,t,a)=>{a.d(t,{A:()=>g});var n=a(296540),r=a(766412),l=a(939703),i=a(294303),o=a(595235),s=a(71479);const c=(0,s.A)(i.A)`
  cursor: pointer;
`,d=(0,s.A)("div",{shouldForwardProp:e=>"color"!==e})`
  background-color: ${({color:e})=>e};
  border-radius: 3px;
  width: 34px;
  height: 20px;
`,m=({color:e})=>n.createElement(c,{width:"55px",height:"24px",padding:"2px 0",alignItems:"center",justifyContent:"space-between",flexShrink:0},n.createElement(d,{color:e}),n.createElement(o.A,null));var u=a(363441);const _=[{id:"hue",channel:"hue"}],g=({value:e,onChange:t})=>{const a=(0,n.useCallback)(e=>{t((0,l.E6)(e.toString())||u.I)},[t]),o=e||u.I;return n.createElement(i.A,{flexDirection:"column"},n.createElement(r.A,{value:o,onChange:a,sliders:_,colorSpace:"hex"},n.createElement("span",null,n.createElement(m,{color:o}))))}},104739:(e,t,a)=>{a.d(t,{v:()=>s});var n=a(296540);(0,a(349005).A)('button.tag__46sVwAu3{-webkit-appearance:button;-moz-appearance:button;appearance:button;border:none;cursor:pointer;outline:none}button.tag__46sVwAu3:disabled{cursor:default}.tag__46sVwAu3{align-items:center;background:var(--tag-background-color);border-radius:20px;color:var(--tag-text-color);display:inline-flex;flex:none;flex-direction:row;font-family:var(--desktop-font-family-default);font-size:var(--desktop-font-size-small);font-weight:600;height:24px;justify-content:space-between;line-height:20px;padding:0 16px;position:relative;text-align:center;text-decoration:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.tag-flushRight__46sVwAu3{padding-right:0}.tag-actionable__46sVwAu3{cursor:pointer}.tag-actionable__46sVwAu3:hover{background:var(--tag-hover-background-color)}.tag-actionable__46sVwAu3:focus{background:var(--tag-focus-background-color);outline:none}.tag-actionable__46sVwAu3:focus.is-accessible__46sVwAu3:after{border:1px solid var(--tag-background-color);bottom:0;content:"";left:0;position:absolute;right:0;top:0}.tag-actionable__46sVwAu3:active{background:var(--tag-active-background-color)}.tag-primary__46sVwAu3{--tag-text-color:#fff}.tag-primary__46sVwAu3.tag-light__46sVwAu3{--tag-background-color:#006fff;--tag-hover-background-color:#338bff;--tag-focus-background-color:#338bff;--tag-active-background-color:#0058cc}.tag-primary__46sVwAu3.tag-dark__46sVwAu3{--tag-background-color:#4797ff;--tag-hover-background-color:#277ff1;--tag-focus-background-color:#277ff1;--tag-active-background-color:#80b7ff}.tag_iconAfter__46sVwAu3{align-items:center;display:flex;height:22px;justify-content:center;margin-left:6px;margin-right:4px;width:22px}.tag_iconAfter__46sVwAu3>svg{float:left}');var r=a(722860),l=a(325898),i=a(917612);const o=(0,r.c)({tag:"tag__46sVwAu3","tag-flushRight":"tag-flushRight__46sVwAu3","tag-actionable":"tag-actionable__46sVwAu3","is-accessible":"is-accessible__46sVwAu3","tag-primary":"tag-primary__46sVwAu3","tag-light":"tag-light__46sVwAu3","tag-dark":"tag-dark__46sVwAu3",tag_iconAfter:"tag_iconAfter__46sVwAu3"});const s=n.forwardRef(function({actionable:e=!1,as:t,children:a,className:r,color:s="primary",iconAfter:c,motif:d,...m},u){const{motif:_}=(0,l.A)(d),{isAccessible:g}=(0,i.G5)(),p=t||(e?"button":"div");return n.createElement(p,{className:o.concat(r)("tag",`tag-${s}`,`tag-${_}`,e&&"tag-actionable",c&&"tag-flushRight",g&&"is-accessible"),ref:u,role:e?"button":void 0,tabIndex:e?0:void 0,...m},a,c&&n.createElement("div",{className:o("tag_iconAfter")},c))});s.displayName="Tag"},123396:(e,t,a)=>{a.d(t,{A:()=>k});var n=a(296540),r=a(813040),l=a(469733),i=a(271856),o=a(927099),s=a(71479),c=a(998837),d=a(132196),m=a(137625),u=a(955161),_=a(734707),g=a(845030),p=a(699784),h=a(691189),b=a(294201);var v=a(83344),A=a(602021),E=a(837612),f=a(602197),w=a(171073),O=a(765268);const C=(0,s.A)(_.Ay,{shouldForwardProp:e=>"disabled"!==e})`
  padding: 0;
  ${({disabled:e})=>e?"pointer-events: none; opacity: 0.4;":""};
  color: ${({theme:{motifPalette:{red05:e,red06:t}},disabled:a})=>a?e:t};
  &:hover {
    color: ${({theme:{motifPalette:{red05:e}}})=>e};
  }
  &:active {
    color: ${({theme:{motifPalette:{red05:e,red07:t}},disabled:a})=>a?e:t};
  }
`,I=d.AH`
  flex: 1;
  width: 100%;
`,N=e=>n.createElement(i.A,{portal:!0,description:n.createElement(o.A,{whiteSpacePreWrap:!0},n.createElement(p.sA,{id:"DEVICE_ACTIONS_REMOVE_TOOLTIP"})),className:I},e),y=({device:e,disabled:t,variant:a})=>{const r=(0,l.useDispatch)(),i=(0,c.u)(),[s,d]=(0,n.useState)(!1),[y,k]=(0,n.useState)(!1),D=(0,l.useSelector)(A.EL),x=(0,E.S9)(e),{isDeviceDisconnected:S,isDeviceAdoptionFailed:T,deviceBusy:R}=(0,n.useMemo)(()=>({isDeviceDisconnected:x===f.g.DISCONNECTED,isDeviceAdoptionFailed:x===f.g.ADOPTION_FAILED,deviceBusy:(0,E.C1)(x)}),[x]),M=(0,n.useMemo)(()=>t||R||D||S||T,[t,R,D,S,T]),L=(0,n.useMemo)(()=>"tertiary"===a,[a]);return n.createElement(u.A,{condition:R,wrapper:N},n.createElement(m.A,{isOpen:y,title:"DEVICE_ACTIONS_UNPAIR_CONFIRM_TITLE",message:"DEVICE_ACTIONS_UNPAIR_CONFIRM_MESSAGE",buttonMessage:"COMMON_ACTION_PROCEED",buttonVariant:"danger",handleConfirm:async()=>{var t;d(!0),r((t=e.mac,(0,h.Xj)(b.A.UBB_UNPAIR,"/api/s/{site}/cmd/devmgr/ubb-unpair",{mac:t}))).then(()=>{r((0,v.W)(e.mac)),r((0,w.XL)(e.mac)),d(!1),k(!1),r((0,g.K5)()),r((0,O.O)())}).finally(()=>{d(!1),k(!1)})},handleClose:()=>{d(!1),k(!1)},className:L?I:""},n.createElement(C,{disabled:M,variant:L?void 0:"link",className:L?(0,_.sC)(i):"",onClick:e=>{e.preventDefault(),e.stopPropagation(),k(!0)},loader:s?"spinner":null,type:"button"},n.createElement(o.A,{color:"danger",size:"body"},n.createElement(p.sA,{id:"COMMON_ACTION_UNPAIR"})))))},k=({activeItem:e})=>n.createElement(r.R,{tooltipId:"DEVICE_ACTIONS_UNPAIR_INFO",tooltipProps:{tooltipClassName:"tooltip-position-fixer",variant:"outline"}},n.createElement(y,{device:e}))},137625:(e,t,a)=>{a.d(t,{A:()=>c});var n=a(296540),r=a(353899),l=a(132196),i=a(372737),o=a(566723),s=a(699784);const c=({children:e=null,title:t,titleValues:a,message:c,messageValues:d,handleConfirm:m=()=>null,handleClose:u=()=>null,handleCancel:_,isOpen:g,buttonVariant:p="primary",cancelButtonVariant:h="tertiary",cancelButtonMessage:b="COMMON_ACTION_CANCEL",buttonMessage:v="COMMON_ACTION_CONFIRM",buttonDisabled:A=!1,position:E="top",showHeaderClose:f=!1,contentClassName:w="",body:O,titleBody:C,className:I,rootClose:N=!1,footerActions:y})=>{const k=(0,n.useCallback)(e=>{g&&(e.stopPropagation(),e.key===i.U.ENTER?m():e.key===i.U.ESCAPE&&u(!1))},[g,m,u]);(0,n.useEffect)(()=>(window.addEventListener("keydown",k,!0),()=>{window.removeEventListener("keydown",k,!0)}),[k]);const D=(0,n.useCallback)(()=>{u(!1),_?.()},[u,_]),x=(0,n.useCallback)(()=>{u(!1),m()},[u,m]),S=(0,n.useMemo)(()=>[{text:n.createElement(s.sA,{id:b}),variant:h,onClick:D},{text:n.createElement(s.sA,{id:v}),disabled:A,variant:p,onClick:x}],[v,p,b,h,D,x,A]),T=(0,n.useCallback)(()=>{u(!1)},[u]),R=l.AH`
    ${t?"":`margin-top: ${o.xO}`}
  `;return n.createElement(r.A,{title:t?n.createElement(s.sA,{id:t,values:a}):C||null,...c?{body:n.createElement(n.Fragment,null,n.createElement(s.sA,{id:c,values:d}),O)}:{body:O},position:E,portal:!0,actions:y||S,showHeaderClose:f,contentClassName:l.AH`
        ${R}
        ${w}
      `,onRequestClose:T,isOpen:g,allowOverflow:!0,rootClose:N,className:I},e)}},210514:(e,t,a)=>{a.d(t,{A:()=>P});var n=a(469733),r=a(296540),l=a(84385),i=a(860631),o=a(943805),s=a(398300),c=a(566723),d=a(855019),m=a(951272),u=a(252093),_=a(515219),g=a(553432),p=a(143811),h=a(349107),b=a(294303),v=a(699784),A=a(768195),E=a(765562);const f=({is6GhzSupported:e})=>{const{setFieldValue:t}=(0,m.j7)();return r.createElement(b.A,{marginBottom:c.Ln,alignItems:"center"},r.createElement(g.A,{gap:c.kc},[A.Dd.INDOOR,A.Dd.OUTDOOR].map(a=>r.createElement(p.A,{key:a,name:"outdoor_install_mode",type:"radio",value:a,onChange:()=>(e=>{switch(t("outdoor_install_mode",e),e){case A.Dd.OUTDOOR:t("outdoor_mode_override",A.Gi.ON);break;case A.Dd.INDOOR:t("outdoor_mode_override",A.Gi.OFF)}})(a)},r.createElement(b.A,{alignItems:"center",gap:c.YC},r.createElement(v.sA,{id:_.J[a]}),a===A.Dd.OUTDOOR?r.createElement(u.A,{messageId:e?"DEVICE_ENABLE_AFC_MODAL_INSTALL_MODE_OUTDOOR_6GHZ_TOOLTIP":"DEVICE_ENABLE_AFC_MODAL_INSTALL_MODE_OUTDOOR_TOOLTIP",values:{link:r.createElement(h.A,{id:"COMMON_LEARN_MORE",href:E.A.afcArticle})},variant:"outline",isInteractive:!0,portal:!0}):null)))))};var w=a(376576),O=a(845030),C=a(614164),I=a(564985),N=a(302167),y=a(457311),k=a(780811),D=a(532419),x=a(533105),S=a(875962),T=a(227902),R=a(329681),M=a(563485),L=a(198494),F=a(170459);const V=({device:e,radios:t})=>{const{formatMessage:a}=(0,v.tz)(),l=(0,n.useSelector)(L.EH),{values:{radios:i},setFieldValue:o}=(0,m.j7)(),[s]=t,c=(0,F.A4)(e,l);return(0,F.Ox)(e,s.name,c,a).length<=1?null:r.createElement(M.A,{name:"radios.0.antenna_id",configuredAntennaId:i[0].antenna_id,onChangeRadioAntenna:a=>{const n=(0,F.Sb)(e.antenna_table||[],a);t.forEach((t,r)=>{const l=t.name;(void 0!==(n?.[`${l}_gain`]??void 0)||(0,F.kb)(e,a))&&(o(`radios.${r}.antenna_id`,a),o(`radios.${r}.antenna_gain`,(0,F.pK)(n,l)))})},radio:s,device:e})},P=({activeItem:e,sortedRadios:t,hideMeshing:a})=>{const m=(0,n.useDispatch)(),u=(0,n.useSelector)(N.Zc),_=(0,n.useSelector)(D.ID),g=(0,n.useSelector)(N.ZZ),p=(0,k.KKO)(e.model,"outdoorModeSupport"),h=(0,i.X5)(e,g),b=(0,r.useMemo)(()=>t.map(({radio:e})=>t.some(({radio:e})=>e===I.sx.RADIO_6E)?e===o.A[I.sx.RADIO_6E.toUpperCase()].type:e===o.A.NA.type).lastIndexOf(!0),[t]),v=(0,k.zg4)(e)?I.sx.RADIO_NG:I.sx.RADIO_NA,A=t.findIndex(e=>e.radio===v),E=t.filter(({radio:e})=>e&&e===I.sx.RADIO_6E).length;return(0,r.useEffect)(()=>{m((0,y.Uc)())},[m]),r.createElement(r.Fragment,null,p&&r.createElement(f,{is6GhzSupported:E>0}),(!e.multi_active_antennas||(0,k.ERA)(e))&&r.createElement(V,{device:e,radios:t}),(0,k.r$V)(e)?r.createElement(R.A,{radioIdx:A,deviceRadio:{device:e,radio:t[A]}}):t.map((a,n)=>{const i=n===t.length-1,o=n===b;return r.createElement(r.Fragment,{key:`${a.radio}-${a.name}`},a.radio!==I.sx.RADIO_6E||e.support_wifi6e||h?r.createElement(T.qk,{device:e,radio:a,isLastNa:o,radio6gCount:E,mode:T.Hm.DEVICE_AND_RADIO,onSelectMeshingParents:()=>{const t=(0,C.T)(e,_);t?.device&&m((0,O.XP)({type:s.H.DEVICE,id:t.device.mac,tab:d.BC.SETTINGS}))}}):r.createElement(x.A,{radioType:a.radio}),!i&&r.createElement(l.A,{style:{margin:`${c.Ln} 0`}}))}),(!a&&u||h&&E>1)&&!(0,k.E4T)(e)&&r.createElement(l.A,{style:{margin:`${c.Ln} 0`}}),h&&E>1&&!p&&r.createElement(w.A,{isOutdoor:!0}),!a&&u&&r.createElement(S.A,{device:e}))}},363441:(e,t,a)=>{a.d(t,{I:()=>r,U:()=>l});var n=a(888170);const r=(0,a(939703).Wj)(n.Ay["blue-0"]),l=100},372737:(e,t,a)=>{var n;a.d(t,{U:()=>n}),function(e){e.ARROW_DOWN="ArrowDown",e.ARROW_UP="ArrowUp",e.ENTER="Enter",e.ESCAPE="Escape"}(n||(n={}))},400270:(e,t,a)=>{a.d(t,{A:()=>l});var n=a(296540),r=a(629318);const l=(0,a(51946).w)(e=>(0,n.createElement)("svg",(0,r.d)({viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em"},e),(0,n.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4 3a1 1 0 0 0-1 1v4a1 1 0 0 0 1 1h4a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1H4Zm8 8a1 1 0 0 0-1 1v4a1 1 0 0 0 1 1h4a1 1 0 0 0 1-1v-4a1 1 0 0 0-1-1h-4Z",fill:"currentColor",className:e.twotonedclassname}),(0,n.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4 4h4v4H4V4ZM3 4a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4Zm9 8h4v4h-4v-4Zm-1 0a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-1v-4Zm1.854-4.854L11.707 6H16v3.5a.5.5 0 0 0 1 0v-4a.5.5 0 0 0-.5-.5h-4.793l1.147-1.146a.5.5 0 0 0-.708-.708l-2 2a.5.5 0 0 0 0 .708l2 2a.5.5 0 0 0 .708-.708ZM8.293 15H3.5a.5.5 0 0 1-.5-.5v-4a.5.5 0 0 1 1 0V14h4.293l-1.147-1.146a.5.5 0 0 1 .708-.708l2 2a.5.5 0 0 1 0 .708l-2 2a.5.5 0 0 1-.708-.708L8.293 15Z",fill:"currentColor",className:e.baseclassname}),(0,n.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4 3a1 1 0 0 0-1 1v4a1 1 0 0 0 1 1h4a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1H4Zm7 9a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-1v-4Zm1.854-4.854L11.707 6H16v3.5a.5.5 0 0 0 1 0v-4a.5.5 0 0 0-.5-.5h-4.793l1.147-1.146a.5.5 0 0 0-.708-.708l-2 2a.5.5 0 0 0 0 .708l2 2a.5.5 0 0 0 .708-.708ZM8.293 15H3.5a.5.5 0 0 1-.5-.5v-4a.5.5 0 0 1 1 0V14h4.293l-1.147-1.146a.5.5 0 0 1 .708-.708l2 2a.5.5 0 0 1 0 .708l-2 2a.5.5 0 0 1-.708-.708L8.293 15Z",fill:"currentColor",className:e.fillclassname})))},418573:(e,t,a)=>{a.r(t),a.d(t,{default:()=>X});var n=a(868238),r=a(469733),l=a(296540),i=a(165126),o=a(449688),s=a(96512),c=a(860631),d=a(566723),m=a(86571),u=a(294303),_=a(689965),g=a(889764),p=a(780811),h=a(171073),b=a(123396),v=a(329109),A=a(951272),E=a(870443),f=a(845030),w=a(366188),O=a(785146);const C="vlan",I=(0,A.bk)({enableReinitialize:!0,mapPropsToValues:({activeItem:{mgmt_network_id:e},nativeNetworks:t})=>({mgmt_network_id:(0,p.ewD)(t,e)}),validationSchema:E.A.object().shape({mgmt_network_id:E.A.string()}),handleSubmit:()=>null}),N=(0,n.Zz)((0,r.connect)(e=>({nativeNetworks:(0,w.Tn)(e)}),{}),I)(({nativeNetworks:e=[],values:t,resetForm:a,dirty:n,setFormDirty:i,setFormInvalid:o,isValid:s})=>{const c=(0,r.useDispatch)();return(0,l.useEffect)(()=>(c((0,f.uo)({[C]:()=>t})),c((0,f.Oo)({[C]:()=>a({values:t})})),c((0,f.rW)({[C]:a})),()=>{c((0,f.uo)({[C]:null})),c((0,f.Oo)({[C]:null})),c((0,f.rW)({[C]:null}))}),[c,a,t.mgmt_network_id]),(0,l.useEffect)(()=>{i(C,n),o(C,!s)},[i,o,n,s]),e.length>1&&l.createElement(O.A,{nativeNetworks:e})});var y,k=a(941555),D=a(94017),x=a(14129),S=a(956619),T=a(89124),R=a(979106),M=a(71479),L=a(699784);!function(e){e.ACCESS_POINT="ap",e.STATION="sta"}(y||(y={}));const F=(0,M.A)("div",{shouldForwardProp:e=>"visible"!==e})`
  ${({visible:e})=>e?"":"display: none;"}
`,V=[{id:y.ACCESS_POINT,label:l.createElement(L.sA,{id:"COMMON_AP"})},{id:y.STATION,label:l.createElement(L.sA,{id:"DEVICE_TYPE_UBB_STATION"})}],P=({ap:e,sta:t})=>{const[a,n]=(0,l.useState)(y.ACCESS_POINT);return l.createElement(u.A,{flexDirection:"column",gap:d.Ln},l.createElement(u.A,{width:"fit-content"},l.createElement(R.A,{variant:"filter",tabs:V,onSelectTab:({id:e})=>n(e)})),l.createElement(F,{visible:a===y.ACCESS_POINT},e),l.createElement(F,{visible:a===y.STATION},t))};var $=a(855019),B=a(62227),U=a(143811),H=a(302167),Z=a(239417),j=a(31208);const W="network",G=[{value:"dhcp",label:"DEVICE_PROPERTIES_VALUES_NETWORK_USING_DHCP"},{value:"static",label:"COMMON_STATIC_IP"}],z=(0,A.bk)({isInitialValid:!0,mapPropsToValues:({activeItem:e})=>{const{config_network:t,peer_ubb:a,ip:n}=e,{type:r=$.NL.DHCP,ip:l=n||"",netmask:i="",gateway:o="",dns1:s="",dns2:c="",dnssuffix:d=""}=t,{type:m=$.NL.DHCP,ip:u=a.ip||"",netmask:_="",gateway:g="",dns1:p="",dns2:h="",dnssuffix:b=""}=a.config_network;return{config_network:{type:r,ip:l,netmask:i,gateway:o,dns1:s,dns2:c,dnssuffix:d},peer_ubb:{config_network:{type:m,ip:u,netmask:_,gateway:g,dns1:p,dns2:h,dnssuffix:b}}}},handleSubmit:(e,{resetForm:t})=>{t({values:e})},validationSchema:({honeypotNetworksIps:e,combinedClients:t})=>E.A.object().shape({config_network:(0,B.d)(e,t),peer_ubb:E.A.object().shape({config_network:(0,B.d)(e,t)})})});const Y=(0,n.Zz)((0,r.connect)(e=>({honeypotNetworksIps:(0,H.Yk)(e),combinedClients:(0,Z.GB)(e)})),z)(function({setFormDirty:e,setFormInvalid:t,dirty:a,values:n,resetForm:i,isValid:o,children:s}){const c=(0,r.useDispatch)();return(0,l.useEffect)(()=>(c((0,f.uo)({[W]:()=>{const{config_network:e,peer_ubb:{config_network:t}}=n,a={config_network:{type:e.type},peer_ubb:{config_network:{type:t.type}}};return e.type!==$.NL.DHCP&&(a.config_network={...e}),t.type!==$.NL.DHCP&&(a.peer_ubb.config_network={...t}),a}})),c((0,f.Oo)({[W]:()=>i({values:n})})),c((0,f.rW)({[W]:i})),()=>{c((0,f.uo)({[W]:null})),c((0,f.Oo)({[W]:null})),c((0,f.rW)({[W]:null}))}),[c,i,n]),(0,l.useEffect)(()=>{e(W,a),t(W,!o)},[e,t,a,o]),l.createElement(P,{ap:l.createElement(u.A,{flexDirection:"column",gap:d.Ln},s,l.createElement(U.A,{label:"COMMON_IP_CONFIGURATION",name:"config_network.type",type:"dropdown",variant:"secondary",full:!0,translateLabel:!0,translateOptions:!0,options:G}),n.config_network.type===$.NL.STATIC&&l.createElement(j.A,null)),sta:l.createElement(u.A,{flexDirection:"column",gap:d.Ln},s,l.createElement(U.A,{label:"COMMON_IP_CONFIGURATION",name:"peer_ubb.config_network.type",type:"dropdown",variant:"secondary",full:!0,translateLabel:!0,translateOptions:!0,options:G}),n.peer_ubb.config_network.type===$.NL.STATIC&&l.createElement(j.A,{prefix:"peer_ubb."}))})}),K="peerUbbScreen",X=(0,n.Zz)((0,o.A)([T.UH,"tags",k.Cg,K,W,C,D.eD]))(({activeItem:e,setFormDirty:t,setFormInvalid:a,isDirty:n,isInvalid:o,formStates:A})=>{const E=(0,r.useSelector)(g.n0),f=(0,r.useSelector)(g.Lq),w=(0,r.useSelector)(g.H5),{_id:O,mac:C}=e,I=(0,r.useDispatch)(),y=(0,s.I)(),D=(0,p.X6b)(e),R=(0,c.UA)(e),M=(0,l.useCallback)(async()=>{const e=Object.entries(E).reduce((e,[t,a])=>{if("function"==typeof a){const n=a();if("object"==typeof n&&Object.keys(n).length&&A[t])return t===K?{[K]:n,...e}:{...e,...n}}return e},{}),t=(0,i.A)(e,K),a={...t,peer_ubb:{name:e.name,...t.peer_ubb,...e[K],...t.mgmt_network_id?{mgmt_network_id:t.mgmt_network_id}:{}}};I((0,h.ex)(a,O,C,{extend:!0})).then(({data:e})=>{Object.values(f).forEach(t=>{"function"==typeof t&&t(e?.[0])})}).catch(y)},[E,I,O,C,y,A,f]),L=(0,l.useCallback)(()=>{Object.values(w).forEach(e=>{"function"==typeof e&&e()})},[w]);return l.createElement(l.Fragment,null,l.createElement(T.Ay,{activeItem:e,setFormDirty:t,setFormInvalid:a}),l.createElement(x.A,{activeItem:e,setFormDirty:t,setFormInvalid:a,hideMeshing:!0}),l.createElement(_.A,{type:_.I.ACCORDION,items:[{id:"network",openByDefault:!0,label:l.createElement(m.A,{id:"COMMON_IP_SETTINGS"}),renderContent:()=>l.createElement(Y,{activeItem:e,setFormDirty:t,setFormInvalid:a},l.createElement(N,{activeItem:e,setFormDirty:t,setFormInvalid:a}))}]}),l.createElement(_.A,{type:_.I.ACCORDION,items:[{id:"manage",openByDefault:!0,label:l.createElement(m.A,{id:"COMMON_ACTION_MANAGE"}),renderContent:()=>l.createElement(u.A,{flexDirection:"column",gap:d.Ln},l.createElement(P,{ap:l.createElement(k.Ay,{activeItem:e,setFormDirty:t}),sta:e.peer_ubb?l.createElement(k.Ay,{activeItem:e.peer_ubb,formName:K,setFormDirty:t}):null}),l.createElement(S.A,{activeItem:e,unpairItem:D&&R?l.createElement(b.A,{activeItem:e}):null}))}]}),l.createElement(v.A,{isDirty:n,isInvalid:o,onFormSubmit:M,onFormCancel:L}))})},449688:(e,t,a)=>{a.d(t,{A:()=>r});var n=a(296540);const r=function(e){return t=>a=>{const[r,l]=(0,n.useState)(Object.fromEntries(e.map(e=>[e,!1]))),[i,o]=(0,n.useState)(Object.fromEntries(e.map(e=>[e,!1]))),s=(0,n.useCallback)((e,t)=>{l(a=>({...a,[e]:t}))},[]),c=(0,n.useCallback)((e,t)=>{o(a=>({...a,[e]:t}))},[]),d=!!Object.values(r).find(e=>e),m=!!Object.values(i).find(e=>e);return n.createElement(t,{isDirty:d,isInvalid:m,formStates:r,setFormDirty:s,setFormInvalid:c,...a})}}},469628:(e,t,a)=>{a.d(t,{A:()=>l});var n=a(296540),r=a(629318);const l=(0,a(51946).w)(e=>(0,n.createElement)("svg",(0,r.d)({viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em"},e),(0,n.createElement)("rect",{x:9,y:7,width:1,height:6,rx:.5,fill:"currentColor",className:e.baseclassname}),(0,n.createElement)("rect",{x:7,y:8,width:1,height:4,rx:.5,fill:"currentColor",className:e.baseclassname}),(0,n.createElement)("rect",{x:11,y:8,width:1,height:4,rx:.5,fill:"currentColor",className:e.baseclassname}),(0,n.createElement)("rect",{x:5,y:7,width:1,height:6,rx:.5,fill:"currentColor",className:e.baseclassname}),(0,n.createElement)("rect",{x:13,y:7,width:1,height:6,rx:.5,fill:"currentColor",className:e.baseclassname}),(0,n.createElement)("rect",{x:3,y:8,width:1,height:4,rx:.5,fill:"currentColor",className:e.baseclassname}),(0,n.createElement)("rect",{x:1,y:9,width:1,height:2,rx:.5,fill:"currentColor",className:e.baseclassname}),(0,n.createElement)("rect",{x:15,y:8,width:1,height:4,rx:.5,fill:"currentColor",className:e.baseclassname}),(0,n.createElement)("rect",{x:17,y:9,width:1,height:2,rx:.5,fill:"currentColor",className:e.baseclassname})))},470591:(e,t,a)=>{a.d(t,{A:()=>n});const n=(0,a(296540).createContext)({isStandalone:!0,header:[null,()=>{}],footer:[null,()=>{}]})},491877:(e,t,a)=>{a.d(t,{A:()=>l});var n=a(296540),r=a(629318);const l=(0,a(51946).w)(e=>(0,n.createElement)("svg",(0,r.d)({viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em"},e),(0,n.createElement)("rect",{x:9.5,y:5,width:1,height:10,rx:.5,fill:"currentColor",className:e.baseclassname}),(0,n.createElement)("rect",{x:7,y:6,width:1,height:8,rx:.5,fill:"currentColor",className:e.baseclassname}),(0,n.createElement)("rect",{x:12,y:6,width:1,height:8,rx:.5,fill:"currentColor",className:e.baseclassname}),(0,n.createElement)("rect",{x:4.5,y:7,width:1,height:6,rx:.5,fill:"currentColor",className:e.baseclassname}),(0,n.createElement)("rect",{x:14.5,y:7,width:1,height:6,rx:.5,fill:"currentColor",className:e.baseclassname}),(0,n.createElement)("rect",{x:2,y:8,width:1,height:4,rx:.5,fill:"currentColor",className:e.baseclassname}),(0,n.createElement)("rect",{x:17,y:8,width:1,height:4,rx:.5,fill:"currentColor",className:e.baseclassname})))},515219:(e,t,a)=>{a.d(t,{J:()=>r});var n=a(768195);const r={[n.Dd.INDOOR]:"DEVICE_ENABLE_AFC_MODAL_INSTALL_MODE_INDOOR",[n.Dd.OUTDOOR]:"DEVICE_ENABLE_AFC_MODAL_INSTALL_MODE_OUTDOOR"}},553432:(e,t,a)=>{a.d(t,{A:()=>o});var n=a(296540),r=a(454195),l=a(566723),i=a(294303);const o=e=>n.createElement(i.A,{paddingTop:l.YC,paddingBottom:l.YC,gap:l.Ln,rowGap:l.YC,flexWrap:"wrap",minHeight:r.b,alignItems:"center",...e})},661065:(e,t,a)=>{a.d(t,{A:()=>d});var n=a(296540),r=a(1758),l=a(217439),i=a(699784),o=a(294303),s=a(363441),c=a(178233);const d=({value:e=s.U,onChange:t})=>n.createElement(n.Fragment,null,n.createElement(o.A,{flexDirection:"column",width:"100%"},n.createElement(o.A,{flexDirection:"row",alignItems:"center"},n.createElement(l.A,{variant:"caption"},n.createElement(i.sA,{id:"COMMON_BRIGHTNESS"}))),n.createElement(r.A,{value:e,minValue:1,onChange:t})),n.createElement(o.A,{flexDirection:"column"},n.createElement(l.A,{variant:"body-primary"},(0,c.A)(e))))},689965:(e,t,a)=>{a.d(t,{A:()=>_,I:()=>n});var n,r=a(296540),l=a(822336),i=a(427853),o=a(71479),s=a(825032),c=a(566723),d=a(294303);!function(e){e.ACCORDION="accordion",e.BUTTON_LIST="buttonList"}(n||(n={}));const m=(0,o.A)(d.A,{shouldForwardProp:e=>!["marginBottom","isButtonList","margin","flex","width","padding","nested","background"].includes(e)})`
  background-color: ${({background:e,nested:t,theme:{themeName:a}})=>e||l.Ay[a===s.S.DARK?`desktop-color-neutral-${t?"00":"01"}-dark`:`desktop-color-neutral-${t?"01":"00"}-light`]};
  padding: ${({theme:e,isButtonList:t,padding:a})=>a||(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,o.A)(i.A,{shouldForwardProp:e=>!["marginBottom","margin","flex","padding","nested","background"].includes(e)})`
  background-color: ${({background:e,nested:t,theme:{themeName:a}})=>e||l.Ay[a===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 ${c.Ln};
    }
    > div:nth-child(2) {
      margin-bottom: 0;
      padding: 0 ${c.Ln} ${c.Ln};
      > div {
        padding: 0;
      }
    }
  }
`,_=({type:e,marginBottom:t,margin:a,padding:l,flex:i,width:o,nested:s,...c})=>"items"in c?r.createElement(u,{marginBottom:t,margin:a,padding:l,flex:i,nested:s,...c}):r.createElement(m,{nested:s,width:o,marginBottom:t,margin:a,padding:l,flex:i,isButtonList:e===n.BUTTON_LIST,...c},c.children)},691441:(e,t,a)=>{a.d(t,{A:()=>l});var n=a(296540),r=a(470591);function l(e){const{children:t}=e,{isStandalone:a,footer:[,l]}=(0,n.useContext)(r.A);return(0,n.useLayoutEffect)(()=>{if(!a)return l(t),()=>l(null)},[a,t]),n.createElement(n.Fragment,null,a&&t)}},835908:(e,t,a)=>{a.d(t,{A:()=>l});var n=a(296540),r=a(629318);const l=(0,a(51946).w)(e=>(0,n.createElement)("svg",(0,r.d)({viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em"},e),(0,n.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.5 2.5a.5.5 0 0 1 1 0v15a.5.5 0 0 1-1 0v-15Zm-4 3a.5.5 0 0 1 1 0v9a.5.5 0 0 1-1 0v-9ZM14 5a.5.5 0 0 0-.5.5v9a.5.5 0 0 0 1 0v-9A.5.5 0 0 0 14 5ZM1.5 7.5a.5.5 0 0 1 1 0v5a.5.5 0 0 1-1 0v-5ZM18 7a.5.5 0 0 0-.5.5v5a.5.5 0 0 0 1 0v-5A.5.5 0 0 0 18 7Z",fill:"currentColor",className:e.baseclassname})))},885358:(e,t,a)=>{a.d(t,{J:()=>_,S:()=>u});var n=a(296540),r=a(943805),l=a(564985),i=a(170459),o=a(803167),s=a(430126),c=a(661010),d=a(605689),m=a(94017);const u=({antenna_id:e,antenna_gain:t,name:a,radio:n,ht:r,channel:i,tx_power_mode:s,tx_power:d,min_txpower:u,vwire_enabled:_,min_rssi_enabled:g,min_rssi:p,hard_noise_floor_enabled:h,sens_level_enabled:b,sens_level:v,assisted_roaming_enabled:A,assisted_roaming_rssi:E})=>({antenna_id:e,antenna_gain:t,name:a,type:n,ht:+r||o.L[n],channel:Number(i)||m.YQ,tx_power_mode:s||l.PB.AUTO,tx_power:d||u||0,vwire_enabled:_??!0,min_rssi_enabled:g||!1,min_rssi:+p||c.XN.DEFAULT,assisted_roaming_enabled:A||!1,assisted_roaming_rssi:E??c.Wh.DEFAULT,hard_noise_floor_enabled:h||!1,sens_level_enabled:b,sens_level:v}),_=e=>{const t=(0,n.useMemo)(()=>({...(()=>{const t=(e.radio_table||[]).find(({radio:e})=>e===r.A.NA.type)?.vwire_enabled??!0,a=e.mesh_sta_vap_enabled??!0,n=t||a;return{radios:(e.support_wifi6e?e.radio_table:e.radio_table?.filter(({radio:e})=>e!==l.sx.RADIO_6E))?.map(u)?.sort(i.j3),atf_enabled:e.atf_enabled||!1,meshingEnabled:n,uplinkMeshEnable:a,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]),a=(0,n.useMemo)(()=>e.radio_table?.reduce((t,{radio:a})=>(t[a]=(0,s.k)({wifi_caps:e.wifi_caps,hide_ch_width:e.hide_ch_width},a),t),{}),[e.radio_table,e.wifi_caps,e.hide_ch_width]);return{initialValues:t,getSubmitData:(0,n.useCallback)(t=>{const{meshingEnabled:n,uplinkMeshEnable:r,uplinkPriority1:l,uplinkPriority2:o,radios:s,...c}=t,d={...c};return l&&(d.mesh_uplink_1=l,o&&(d.mesh_uplink_2=o)),d.mesh_sta_vap_enabled=t.uplinkMeshEnable,d.radio_table=s.map(t=>{const n=(e.radio_table||[]).find(({name:e})=>e===t.name),r=(0,i.kb)({model:e.model},n.antenna_id)?null:(0,i.Sb)(e.antenna_table||[],n.antenna_id);return(({isChannelWidthHidden:e,antenna:t,minRssiStrictModeSupported:a},n)=>{const{name:r,type:l,sens_level:o,sens_level_enabled:s,...c}=n,d={...c,sens_level_enabled:s,sens_level:o,radio:l,name:r};return"custom"!==c.tx_power_mode&&delete d.tx_power,d.antenna_id&&t?d.antenna_gain=(0,i.pK)(t,r):delete d.antenna_id,a||d.min_rssi_enabled||delete d.hard_noise_floor_enabled,d.min_rssi_enabled||delete d.min_rssi,d.assisted_roaming_enabled||delete d.assisted_roaming_rssi,d.sens_level_enabled||delete d.sens_level,e&&(delete d.channel,delete d.ht),d})({isChannelWidthHidden:a[t.type],antenna:(0,i.Jj)(r,n.name)?r:null,minRssiStrictModeSupported:(0,i.Wg)(n)},t)}),d},[e.radio_table,e.model,e.antenna_table,a]),validationSchema:(0,d.m)(e.radio_table)}}},889764:(e,t,a)=>{a.d(t,{H5:()=>s,Lq:()=>o,n0:()=>i});var n=a(849513),r=a(276907),l=a(919952);const i=e=>e[l.U.SHARED][r.N.PROPERTY_PANEL]?.[n.Io.TAB_GET_DATA_FUNCTION]||{},o=e=>e[l.U.SHARED][r.N.PROPERTY_PANEL]?.[n.Io.TAB_SUBMIT_FUNCTION]||{},s=e=>e[l.U.SHARED][r.N.PROPERTY_PANEL]?.[n.Io.TAB_RESET_FUNCTION]||{}},941555:(e,t,a)=>{a.d(t,{Ay:()=>f,Cg:()=>A});var n=a(868238),r=a(469733),l=a(296540),i=a(165126),o=a(951272),s=a(870443),c=a(860631),d=a(566723),m=a(143811),u=a(294303),_=a(845030),g=a(699784),p=a(768195),h=a(363441),b=a(661065),v=a(100188);const A="screen",E=(0,o.bk)({enableReinitialize:!0,isInitialValid:!0,mapPropsToValues:({activeItem:e,formName:t=A})=>({[t]:{led_override:e.led_override||p.c_.ON,led_override_color_brightness:e.led_override_color_brightness||h.U,led_override_color:e.led_override_color||h.I}}),validationSchema:s.A.object().shape({led_override:s.A.string(),led_override_color_brightness:s.A.number(),led_override_color:s.A.string()}),handleSubmit:(e,{resetForm:t})=>{t({values:e})}}),f=(0,n.Zz)(E)(({activeItem:e,setFormDirty:t,values:a,dirty:n,resetForm:o,setFieldValue:s,formName:E=A,disableLedOverrideColor:f,disableLedBrightnessField:w})=>{const O=(0,r.useDispatch)(),C=(0,c.lp)(e);(0,l.useEffect)(()=>{t(E,n)},[t,n,E]),(0,l.useEffect)(()=>(O((0,_.uo)({[E]:()=>{const e=(0,i.A)(a,E);return{...a[E],...e}}})),O((0,_.Oo)({[E]:()=>{o({values:a})}})),O((0,_.rW)({[E]:o})),()=>{O((0,_.uo)({[E]:null})),O((0,_.Oo)({[E]:null})),O((0,_.rW)({[E]:null}))}),[O,E,o,a]);const I=(0,l.useCallback)(e=>{s(`${E}.led_override_color`,e)},[s,E]);return l.createElement(u.A,{alignItems:"center",marginBottom:d.Ln,gap:d.Ln},l.createElement(u.A,null,l.createElement(m.A,{name:"led_override",type:"realCheckbox",checked:a[E].led_override===p.c_.ON,onChange:({target:{checked:e}})=>{s(`${E}.led_override`,e?p.c_.ON:p.c_.OFF)}},l.createElement(g.sA,{id:"COMMON_LED"}))),C&&!f?l.createElement(v.A,{value:a[E].led_override_color||h.I,onChange:I}):null,!w&&C?l.createElement(b.A,{value:a[E].led_override_color_brightness??h.U,onChange:e=>{s(`${E}.led_override_color_brightness`,e)}}):null)})}}]);