"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[31520],{32047:(e,t,a)=>{a.d(t,{c:()=>i,y:()=>c});var l=a(801081),r=a(396660),n=a(524936),o=a(366188),s=a(768195);const c=e=>(0,l.Mz)(o.Tn,t=>t.filter(({_id:t})=>t!==e).sort(r.Cv).map(e=>({label:(0,n.gm)(e),value:e._id,additionalInfo:(0,n.mC)(e)}))),i=(e,t,a)=>(0,l.Mz)(o.Tn,l=>l.filter(({_id:l})=>(t.includes(l)||a===s.sg.AUTO)&&e!==l).sort(r.Cv).map(e=>({label:(0,n.gm)(e),value:e._id,additionalInfo:(0,n.mC)(e)})))},48925:(e,t,a)=>{a.d(t,{A:()=>u});var l=a(296540),r=a(217439),n=a(71479),o=a(454195),s=a(566723),c=a(968906),i=a(199582),_=a(311785),d=a(766624),m=a(294303),E=a(689965),A=a(242366);const p=(0,n.A)(E.A,(0,_.A)("isOutlined"))`
  border: ${({theme:e,isOutlined:t})=>`1px solid ${t?e.motifPalette.uBlue06:"transparent"}`};
`,u=({children:e,title:t,tooltip:a,tooltipProps:n,[i.L]:_,titleAction:E,isOutlined:u})=>l.createElement(p,{marginBottom:"none",...c.A.addDataTestId(_),isOutlined:u},l.createElement(m.A,{flexDirection:"column",gap:s.Ln,width:"100%",minHeight:o.b},t?l.createElement(m.A,{alignItems:"center",gap:s.YC,justifyContent:"space-between",width:"100%"},l.createElement(m.A,{gap:s.YC,alignItems:"center"},l.createElement(r.A,{variant:"heading-medium"},t),a?l.createElement(d.A,{description:a,portal:!0,...n}):null),E?l.createElement(m.A,null,E):null):null,e?l.createElement(A.A,null,e):null))},114470:(e,t,a)=>{a.d(t,{A:()=>E});var l=a(296540),r=a(951272),n=a(162420),o=a(566723),s=a(143811),c=a(294303),i=a(263130),_=a(699784),d=a(780811),m=a(987588);const E=({disabled:e,model:t})=>{const{values:a}=(0,r.j7)(),E=a.isolation&&(0,d.CIk)({model:t});return l.createElement(c.A,{flexDirection:"column",gap:o.kc},l.createElement(m.l2,null,l.createElement(s.A,{name:"isolation",type:"realCheckbox",tooltipMessage:l.createElement(_.sA,{id:"COMMON_PORT_ISOLATION_DESC"}),disabled:e},l.createElement(_.sA,{id:"COMMON_DEVICE_CAP_SWITCH_CAP_PORT_ISOLATION"}))),E?l.createElement(i.A,{icon:l.createElement(n.A,{isActive:!0,size:"original",variant:"fill"}),description:l.createElement(_.sA,{id:"COMMON_PORT_ISOLATION_ALERT",values:{hyphen:l.createElement(l.Fragment,null,"‑")}})}):null)}},118835:(e,t,a)=>{var l;a.d(t,{M:()=>l}),function(e){e.MAIN="main",e.DHCP="dhcp",e.HOTSPOT="hotspot"}(l||(l={}))},125234:(e,t,a)=>{a.d(t,{A:()=>Q});var l=a(469733),r=a(296540),n=a(720903),o=a(951272),s=a(162420),c=a(132196),i=a(566723),_=a(854246),d=a(553432),m=a(71479),E=a(393832),A=a(400261),p=a(870443),u=a(294303),O=a(699784),C=a(369596),g=a(532419),T=a(239417),M=a(546391);const b=(0,m.A)(u.A)`
  width: 100%;
`,S=(e,t,a)=>Array.from(e,(e,l)=>({id:`port_security_mac_address-${l}`,port_security_mac_address:e,port_security_mac_address_name:(0,E.K)(t,a,e)})),v=[{id:"port_security_mac_address",label:r.createElement(O.sA,{id:"COMMON_MAC_ADDRESS"}),sortable:!1},{id:"port_security_mac_address_name",label:r.createElement(O.sA,{id:"COMMON_NAME"}),sortable:!1}],f={port_security_mac_addresses:"DEVICE_PORT_FORM_TOPOLOGY_LABEL"},h=({addressList:e,changeAddressListCallback:t,disabled:a})=>{const n=(0,l.useSelector)(g.ID),o=(0,l.useSelector)(T.GB),s=(0,r.useMemo)(()=>({editActive:!1,port_security_mac_address:S(e,n,o),new_port_security_mac_address:""}),[e,n,o]),c=(0,r.useMemo)(()=>S(e,n,o),[e,n,o]),i=(0,r.useMemo)(()=>[{name:"new_port_security_mac_address",type:"text",label:"COMMON_ALLOWED_MAC_ADDRESS",placeholder:"COMMON_PLACEHOLDER_EG",placeholderValues:{value:"ab:cd:ef:12:34:56"},parser:(...e)=>(0,A.Z)(e[0][0].target?.value),editable:!a}],[a]),_=(0,r.useCallback)(e=>{t(e)},[t]),d=(0,r.useCallback)(({port_security_mac_address:e,new_port_security_mac_address:t})=>{t&&_([...e.map(({port_security_mac_address:e})=>e),t])},[_]),m=(0,r.useCallback)(({port_security_mac_address:t})=>{_(e.filter(e=>e!==t))},[e,_]),E=(0,r.useCallback)(e=>{_([...e.map(({port_security_mac_address:e})=>e)])},[_]);return r.createElement(b,{flexWrap:"wrap"},r.createElement(C.A,{fieldName:"port_security_mac_address",items:c,columns:v,fieldLabels:f,newFields:i,onAddItem:d,onRemoveItem:m,onEditSubmit:E,initialValues:s,validationSchema:p.A.lazy(e=>(e=>{const t=()=>p.A.string().label("COMMON_MAC_ADDRESS").matches(M.b8,{message:r.createElement(O.sA,{id:"COMMON_VALIDATION_VALID_MAC"})}),a={arrayFieldName:"port_security_mac_address",stringFieldName:"port_security_mac_address",errorMessage:r.createElement(O.sA,{id:"DEVICE_PORT_FORM_MAC_MUST_BE_UNIQUE"})};return p.A.object().shape({editActive:p.A.bool(),new_port_security_mac_address:t().isMacUnique({formValues:null,...a}),port_security_mac_address:p.A.array().of(p.A.object().shape({port_security_mac_address:t().isMacUnique({formValues:e,...a}).required()}))})})(e)),addButtonText:"COMMON_ACTION_ADD",fieldVariant:"secondary",isWindowTable:!0,isDisabledOverride:a,editable:!a}))};var R=a(349665),L=a(143811),P=a(349107),N=a(263130),I=a(491817),D=a(936621),k=a(366188),y=a(768195),q=a(204751),w=a(949330),F=a(765562),V=a(641777),U=a(317672),x=a(711157),G=a(325898),B=a(757001),$=a(130851),H=a(825032),W=a(963253);const Y=(0,m.A)("div")`
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: 100%;
  gap: ${i.YC};
`,j=(0,m.A)("img")`
  width: 100%;
  max-width: 100%;
  object-fit: contain;
`,K=({disabled:e})=>{const{values:t,setFieldValue:a}=(0,o.j7)(),n=(0,l.useSelector)($.p),s=(0,r.useCallback)(e=>{a("avManufacturer",e),a("qos_profile.qos_profile_mode",(w.BR[e]||[])[0])},[a]),c=(0,r.useMemo)(()=>(w.BR[t.avManufacturer]||[]).map(e=>({label:w.XB[e],value:e})),[t.avManufacturer]),{motif:_}=(0,G.A)(),d=_===H.S.DARK?"dark":"light";return r.createElement(u.A,{flexDirection:"column",gap:i.kc,width:"100%"},r.createElement(Y,null,r.createElement(W.A,{onClick:()=>s(q.CC.UNIFI),selected:t.avManufacturer===q.CC.UNIFI,allowGreyscale:!0,width:"100%",disabled:e},r.createElement(B.A,{size:"small"})),r.createElement(W.A,{onClick:()=>s(q.CC.DANTE),selected:t.avManufacturer===q.CC.DANTE,allowGreyscale:!0,noMargin:!0,width:"100%",disabled:e},r.createElement(j,{src:`${n}/avManufacturers/${d}/dante.svg`,height:13})),r.createElement(W.A,{onClick:()=>s(q.CC.QSYS),selected:t.avManufacturer===q.CC.QSYS,allowGreyscale:!0,noMargin:!0,width:"100%",disabled:e},r.createElement(j,{src:`${n}/avManufacturers/${d}/qsys.svg`,height:13})),r.createElement(W.A,{onClick:()=>s(q.CC.NDI),selected:t.avManufacturer===q.CC.NDI,allowGreyscale:!0,noMargin:!0,width:"100%",disabled:e},r.createElement(j,{src:`${n}/avManufacturers/${d}/ndi.svg`,height:11})),r.createElement(W.A,{onClick:()=>s(q.CC.SDVOE),selected:t.avManufacturer===q.CC.SDVOE,allowGreyscale:!0,noMargin:!0,width:"100%",disabled:e},r.createElement(j,{src:`${n}/avManufacturers/${d}/sd.svg`,height:19})),r.createElement(W.A,{onClick:()=>s(q.CC.SHURE),selected:t.avManufacturer===q.CC.SHURE,allowGreyscale:!0,noMargin:!0,width:"100%",disabled:e},r.createElement(j,{src:`${n}/avManufacturers/${d}/shure.svg`,height:9})),r.createElement(W.A,{onClick:()=>s(q.CC.AES67),selected:t.avManufacturer===q.CC.AES67,allowGreyscale:!0,noMargin:!0,width:"100%",disabled:e},r.createElement(j,{src:`${n}/avManufacturers/${d}/aes.svg`,height:16})),r.createElement(W.A,{onClick:()=>s(q.CC.CRESTON),selected:t.avManufacturer===q.CC.CRESTON,allowGreyscale:!0,noMargin:!0,width:"100%",disabled:e},r.createElement(j,{src:`${n}/avManufacturers/${d}/crestron.svg`,height:8}))),c.length>1?r.createElement(L.A,{name:"qos_profile.qos_profile_mode",type:"dropdown",portal:!0,variant:"secondary",options:c,translateOptions:!0,full:!0,disabled:e}):null)},z=c.AH`
  align-items: start;
`,Q=({disabled:e,isPortMacFilteringSupported:t,showQos:a})=>{const{values:c,setFieldValue:m,errors:E,submitCount:A,setValues:p}=(0,o.j7)(),C=(0,l.useSelector)(k.nT),g=e=>{const t={};t.portSecurity=e,e===x.r.DISABLED&&(t.port_security_mac_address=[],t.tagged_vlan_mgmt=y.sg.BLOCK_ALL,t.taggedVlans=[],t.voice_networkconf_id=D.F,t.voiceNetworkConfEnabled=!1,t.native_networkconf_id=D.F,t.qos_profile=(0,n.A)(w.a$),t.qosEnabled=!1),c.portSecurity===x.r.DISABLED&&C?._id&&(t.tagged_vlan_mgmt=y.sg.AUTO,t.native_networkconf_id=C._id,t.qos_profile=(0,n.A)(w.a$),t.qosEnabled=!1),e===x.r.ACTIVE&&(t.port_security_mac_address=[],t.avManufacturer=I.m.avManufacturer,t.qos_profile=(0,n.A)(w.a$),t.qosEnabled=!1),e===x.r.AV&&(t.avManufacturer=I.m.avManufacturer,t.qos_profile=(0,n.A)(w.a$),t.qos_profile.qos_profile_mode=q.If.UNIFI_PLAY,t.qosEnabled=!1),p({...c,...t})};return r.createElement(r.Fragment,null,r.createElement(R.A,null,r.createElement(V.A,{isDisabled:e},r.createElement(U.A,null,r.createElement(O.sA,{id:"COMMON_PORT"}))),r.createElement(d.A,{width:"102%"},r.createElement(L.A,{value:x.r.ACTIVE,type:"radio",name:"portSecurity",onChange:()=>g(x.r.ACTIVE),disabled:e},r.createElement(O.sA,{id:"COMMON_ACTIVE"})),r.createElement(L.A,{value:x.r.DISABLED,type:"radio",name:"portSecurity",onChange:()=>g(x.r.DISABLED),disabled:e},r.createElement(O.sA,{id:"COMMON_DISABLED"})),t?r.createElement(L.A,{value:x.r.RESTRICTED,type:"radio",name:"portSecurity",disabled:e,onChange:()=>g(x.r.RESTRICTED)},r.createElement(O.sA,{id:"COMMON_PORTS_FORM_FIELD_PORT_SECURITY_OPTION_RESTRICTED"})):null,a&&r.createElement(L.A,{value:x.r.AV,type:"radio",name:"portSecurity",onChange:()=>g(x.r.AV),disabled:e},r.createElement(O.sA,{id:"COMMON_PRO_AV"})))),c.portSecurity===x.r.RESTRICTED?r.createElement(u.A,{flexDirection:"column",className:z},r.createElement(h,{changeAddressListCallback:e=>{m("port_security_mac_address",e)},addressList:c.port_security_mac_address,disabled:e}),r.createElement(_.A,{visible:E&&!!A&&!!E.port_security_mac_address},E.port_security_mac_address)):null,c.portSecurity===x.r.AV&&a?r.createElement(u.A,{flexDirection:"column",gap:i.kc},r.createElement(N.A,{icon:r.createElement(s.A,{isActive:!0,size:"original",variant:"fill"}),description:r.createElement(O.sA,{id:"PORTS_PRO_AV_TOOLTIP",values:{link:r.createElement(P.A,{href:F.A.avProfilesArticle,id:"COMMON_LEARN_MORE",noWrap:!0})}})}),r.createElement(K,{disabled:e})):null)}},173068:(e,t,a)=>{a.d(t,{A:()=>b});var l=a(296540),r=a(951272),n=a(162420),o=a(566723),s=a(596176),c=a(854246),i=a(143811),_=a(294303),d=a(263130),m=a(699784),E=a(768941),A=a(356927),p=a(457329),u=a(768195),O=a(204751),C=a(641777),g=a(317672),T=a(161374),M=a(987588);const b=({disabled:e,optionsOverride:t,showFec:a,media:b,showMixedSpeedWarning:S})=>{const{values:v,setFieldValue:f,errors:h,setValues:R}=(0,r.j7)(),L=Object.keys(A.A).map(e=>(0,T.MT)(e)),P=v.portconf_id||!t?L:t;(0,l.useEffect)(()=>{if(!P.some(e=>e.value===v.portSpeed)){const{autoneg:e,full_duplex:t,speed:a}=A.A[E.n5.PORTSPEED_AUTO_NEG];R({...v,autoneg:e,full_duplex:t,speed:a,portSpeed:E.n5.PORTSPEED_AUTO_NEG})}},[P,R,v,v.portconf_id]);const N=a&&P.some(e=>p.eX.includes(e.value));return l.createElement(l.Fragment,null,l.createElement(_.A,{flexDirection:"column",width:"100%"},l.createElement(i.A,{name:"portSpeed",options:P,translateOptions:!0,type:"dropdown",full:!0,variant:"secondary",onChange:e=>{const{value:t}=e,{autoneg:a,full_duplex:l,speed:r}=A.A[t],n=p.eX.includes(t)?(0,T.Tg)(r):u._t.DISABLED;R({...v,autoneg:a,full_duplex:l,speed:r,portSpeed:t,fec_mode:n})},disabled:e,label:l.createElement(C.A,{isDisabled:e},l.createElement(g.A,{tooltip:N?l.createElement(m.sA,{id:b===O.kC.QSFP28?"COMMON_PORTS_FORM_FIELD_PORT_SPEED_TOOLTIP_QSFP_FEC":"COMMON_PORTS_FORM_FIELD_PORT_SPEED_TOOLTIP_FEC"}):null},l.createElement(m.sA,{id:"COMMON_LINK_SPEED"})))}),l.createElement(c.A,{visible:!!h.portSpeed},h.portSpeed),S&&v.portSpeed===E.n5.PORTSPEED_FULL_25G?l.createElement(d.A,{marginTop:o.kc,icon:l.createElement(n.A,{isActive:!0,size:"original",variant:"fill"}),description:l.createElement(m.sA,{id:"COMMON_PORT_FORM_LINK_SPEED_SFP28_ALERT"})}):null,v.portSpeed!==E.n5.PORTSPEED_AUTO_NEG?l.createElement(d.A,{marginTop:o.kc,icon:l.createElement(n.A,{isActive:!0,size:"original",variant:"fill"}),description:l.createElement(m.sA,{id:"COMMON_PORT_FORM_LINK_SPEED_NON_AUTO_NEG_ALERT"})}):null),p.eX.includes(v.portSpeed)&&a?l.createElement(_.A,{flexDirection:"column"},l.createElement(M.l2,null,l.createElement(i.A,{name:"fec_mode_enabled",checked:v.fec_mode!==u._t.DISABLED,type:"realCheckbox",disabled:e,onChange:({target:{checked:e}})=>{f("fec_mode",e?(0,T.Tg)(A.A[v.portSpeed].speed):u._t.DISABLED)},tooltipMessage:l.createElement(s.A,{messages:[["COMMON_PORTS_FORM_FIELD_PORT_SPEED_FEC_TOOLTIP_1"],["COMMON_PORTS_FORM_FIELD_PORT_SPEED_FEC_TOOLTIP_2"]]})},l.createElement(m.sA,{id:"COMMON_PORTS_FORM_FIELD_PORT_SPEED_FEC_LABEL"}))),v.fec_mode!==u._t.DISABLED?l.createElement(i.A,{searchable:!0,name:"fec_mode",disabled:e,options:p.pI[v.portSpeed],type:"dropdown",full:!0,variant:"secondary"}):null):null)}},174897:(e,t,a)=>{a.d(t,{A:()=>u,c:()=>p});var l=a(296540),r=a(951272),n=a(718073),o=a(596176),s=a(143811),c=a(699784),i=a(349665),_=a(566723),d=a(294303),m=a(768195),E=a(275988),A=a(987588);const p=l.createElement(o.A,{messages:[["COMMON_SPANNING_TREE_TOOLTIP"],["COMMON_SPANNING_TREE_TOOLTIP_2"]]}),u=({disabled:e,showBpduGuard:t,showAutoEdge:a})=>{const{values:o,setFieldValue:u}=(0,r.j7)(),O=e||o.stable_port_enabled,C=o.stable_port_enabled?E.VI:o;return l.createElement(n.A,{description:o.stable_port_enabled?l.createElement(c.sA,{id:"PORTS_STABLE_PORT_MANAGED_BY_STABLE_PORT"}):void 0},l.createElement(d.A,{flexDirection:"column",gap:_.kc},l.createElement(A.l2,null,l.createElement(s.A,{name:"stp_port_mode",type:"realCheckbox",disabled:O,checked:C.stp_port_mode,tooltipMessage:p,tooltipProps:{portal:!0}},l.createElement(c.sA,{id:"COMMON_DEVICE_CAP_SWITCH_CAP_STP"}))),C.stp_port_mode&&(a||t)?l.createElement(i.A,{gap:_.Ln,paddingLeft:_.S2},a?l.createElement(s.A,{name:"stp_edge_state",type:"realCheckbox",checked:C.stp_edge_state===m.MV.ENABLED,disabled:O,tooltipMessage:l.createElement(c.sA,{id:"PORTS_STP_EDGE_TOOLTIP"}),tooltipProps:{portal:!0},afterChange:e=>{u("stp_edge_state",e?m.MV.ENABLED:m.MV.DISABLED)}},l.createElement(c.sA,{id:"PORTS_STP_EDGE"})):null,t?l.createElement(s.A,{name:"stp_bpdu_guard_enabled",type:"realCheckbox",checked:C.stp_bpdu_guard_enabled,disabled:O,tooltipMessage:l.createElement(c.sA,{id:"PORTS_BPDU_GUARD_TOOLTIP"}),tooltipProps:{portal:!0}},l.createElement(c.sA,{id:"PORTS_BPDU_GUARD"})):null):null))}},185414:(e,t,a)=>{a.d(t,{A:()=>c});var l=a(296540),r=a(951272),n=a(143811),o=a(699784),s=a(987588);const c=({disabled:e})=>{const{values:t,initialValues:a,setFieldValue:c}=(0,r.j7)();return l.createElement(s.l2,{justifyContent:"space-between",width:"100%"},l.createElement(n.A,{name:"egress_rate_limit_kbps_enabled",type:"realCheckbox",disabled:e,onChange:({target:{checked:e}})=>{c("egress_rate_limit_kbps_enabled",e),e||c("egress_rate_limit_kbps",a.egress_rate_limit_kbps)},tooltipMessage:l.createElement(o.sA,{id:"COMMON_EGRESS_TOOLTIP"}),tooltipProps:{portal:!0}},l.createElement(o.sA,{id:"COMMON_DEVICE_CAP_SWITCH_CAP_EGRESS_RATE_LIMIT"})),t.egress_rate_limit_kbps_enabled&&l.createElement(n.A,{name:"egress_rate_limit_kbps",type:"number",variant:"secondary",className:s.rH,contentAfter:l.createElement(o.sA,{id:"COMMON_SPEED_METRICS_MBPS"}),min:1,max:1e3,full:!0}))}},205975:(e,t,a)=>{a.d(t,{Dz:()=>_,JS:()=>i,zN:()=>d});var l=a(189643),r=a(573531),n=a(204751),o=a(949330),s=a(877995);const c=e=>void 0!==e.cos_code?`CoS ${e.cos_code} (${o.e8[e.cos_code]})`:void 0!==e.dscp_code?`DSCP ${e.dscp_code}${o.HH[e.dscp_code]?` (${o.HH[e.dscp_code]})`:""}`:void 0!==e.ip_precedence_code?`IPP ${e.ip_precedence_code} (${o.Dc[e.ip_precedence_code]})`:r.L,i=e=>e.map((e,t)=>({matchProtocol:e.qos_matching.protocol??l.aS.ALL,matchType:c(e.qos_matching),remark:c(e.qos_marking),queue:e.qos_marking.queue,id:t})),_=e=>{const t={qos_marking:{...e.qos_marking},qos_matching:{...e.qos_matching}};switch(e.qos_matching.protocol===l.aS.ALL&&(delete t.qos_matching.src_port,delete t.qos_matching.dst_port,delete t.qos_matching.protocol),e.qos_matching.protocol===l.aS.NUMBER&&(t.qos_matching.protocol=e.protocolNumber),e.enableDestinationPort||delete t.qos_matching.dst_port,e.enableSourcePort||delete t.qos_matching.src_port,e.markingTrafficType){case n.ev.DSCP:delete t.qos_marking.cos_code,delete t.qos_marking.ip_precedence_code;break;case n.ev.COS:delete t.qos_marking.dscp_code,delete t.qos_marking.ip_precedence_code}switch(e.matchingTrafficType){case n.ev.DSCP:delete t.qos_matching.cos_code,delete t.qos_matching.ip_precedence_code;break;case n.ev.IP_PRECEDENCE:delete t.qos_matching.dscp_code,delete t.qos_matching.cos_code;break;case n.AC:delete t.qos_matching.dscp_code,delete t.qos_matching.cos_code,delete t.qos_matching.ip_precedence_code}return e.enableQosMarking||(delete t.qos_marking.cos_code,delete t.qos_marking.dscp_code,delete t.qos_marking.ip_precedence_code),t},d=e=>{const t={qos_marking:{cos_code:e.qos_marking.cos_code||s.L.qos_marking.cos_code,dscp_code:e.qos_marking.dscp_code||s.L.qos_marking.dscp_code,ip_precedence_code:e.qos_marking.ip_precedence_code||s.L.qos_marking.ip_precedence_code,queue:e.qos_marking.queue||s.L.qos_marking.queue},qos_matching:{protocol:"number"==typeof e?.qos_matching?.protocol?l.aS.NUMBER:e.qos_matching.protocol||s.L.qos_matching.protocol,cos_code:e.qos_matching.cos_code||s.L.qos_matching.cos_code,dscp_code:e.qos_matching.dscp_code||s.L.qos_matching.dscp_code,ip_precedence_code:e.qos_matching.ip_precedence_code||s.L.qos_matching.ip_precedence_code,dst_port:e.qos_matching.dst_port||s.L.qos_matching.dst_port,src_port:e.qos_matching.src_port||s.L.qos_matching.src_port}};return t.enableDestinationPort=void 0!==e.qos_matching.dst_port,t.enableSourcePort=void 0!==e.qos_matching.src_port,t.enableQosMarking=void 0!==e.qos_marking.cos_code||void 0!==e.qos_marking.dscp_code||void 0!==e.qos_marking.ip_precedence_code,t.markingTrafficType=void 0!==e.qos_marking.cos_code?n.ev.COS:n.ev.DSCP,t.matchingTrafficType=void 0!==e.qos_matching.dscp_code?n.ev.DSCP:void 0!==e.qos_matching.ip_precedence_code?n.ev.IP_PRECEDENCE:n.AC,t.protocolNumber="number"==typeof e.qos_matching.protocol?e.qos_matching.protocol:0,t}},231347:(e,t,a)=>{a.d(t,{Y:()=>n});var l=a(956347),r=a(296540);function n(e){const t=(0,l.zy)(),a=(0,l.W6)(),n=(0,r.useMemo)(()=>new URLSearchParams(t.search),[t.search]),o=n.get(e),s=(0,r.useCallback)(l=>{const r=new URLSearchParams(n.toString());return l?r.set(e,l):r.delete(e),a.replace({...t,search:r.toString()})},[a,e,t,n]);return(0,r.useMemo)(()=>[o,s],[o,s])}},232832:(e,t,a)=>{a.d(t,{A:()=>R});var l,r=a(469733),n=a(296540),o=a(720903),s=a(951272),c=a(271856),i=a(758649),_=a(86838),d=a(79760),m=a(566723),E=a(776309),A=a(143811),p=a(294303),u=a(126457),O=a(699784),C=a(949330),g=a(987588),T=a(711157),M=a(205975),b=a(963070),S=a(189643);!function(e){e.MATCH_PROTOCOL="matchProtocol",e.MATCH_TYPE="matchType",e.REMARK="remark",e.QUEUE="queue"}(l||(l={}));const v={[l.MATCH_PROTOCOL]:"COMMON_PROTOCOL",[l.MATCH_TYPE]:"PORTS_QOS_POLICY_MATCH_TYPE",[l.REMARK]:"PORTS_QOS_POLICY_REMARK",[l.QUEUE]:"PORTS_QOS_POLICY_QUEUE"},f=[{id:l.MATCH_PROTOCOL,label:n.createElement(O.sA,{id:v[l.MATCH_PROTOCOL]}),minWidth:60,renderCell:({matchProtocol:e})=>"number"==typeof e?e:n.createElement(O.sA,{id:(0,S.Wi)(e)})},{id:l.MATCH_TYPE,label:n.createElement(O.sA,{id:v[l.MATCH_TYPE]}),minWidth:100,renderCell:({matchType:e})=>e},{id:l.REMARK,label:n.createElement(O.sA,{id:v[l.REMARK]}),minWidth:100,renderCell:({remark:e})=>e},{id:l.QUEUE,label:n.createElement(O.sA,{id:v[l.QUEUE]}),minWidth:60,renderCell:({queue:e})=>e}],h=(0,n.memo)(({addCallback:e})=>{const{values:t,setFieldValue:a}=(0,s.j7)(),{qos_profile:l}=t,{qos_policies:o}=l||{},c=(0,M.JS)(o||[]),_=(0,r.useDispatch)(),d=(0,n.useCallback)(e=>{const t=o.filter((t,a)=>a!==e);a("qos_profile.qos_policies",t)},[a,o]),A=(0,n.useCallback)(({id:e})=>n.createElement(p.A,{width:"100%",justifyContent:"flex-end",paddingRight:m.Ln,alignItems:"center"},n.createElement(i.A,{color:"danger",type:"button",variant:"inline",onClick:()=>d(e)},n.createElement(O.sA,{id:"COMMON_ACTION_REMOVE"}))),[d]),C=(0,n.useCallback)(t=>{const a=o[t.id];_((0,u.to)({modalType:E.A.QOS_POLICY_MODAL,modalProps:{addCallback:e,existingItem:a,existingItemIndex:t.id}}))},[e,_,o]);return n.createElement(b.A,{items:c,idField:"id",truncateHeaderCells:!0,columns:f,disableColumnFilters:!0,renderHoverContent:A,onRowClick:C})}),R=({disabled:e})=>{const{values:t,setFieldValue:a,errors:l,submitCount:b,touched:S}=(0,s.j7)(),v=(0,r.useDispatch)(),f=!e&&t.portSecurity===T.r.AV,R=!e&&t.qos_profile?.qos_policies?.length>=C.aW,L=(0,n.useCallback)((e,l)=>{const r=(0,M.Dz)(e),n=(0,o.A)(t.qos_profile?.qos_policies)||[];if(void 0!==l)return n[l]=r,void a("qos_profile.qos_policies",n.sort((e,t)=>(t.qos_marking?.queue||0)-(e.qos_marking?.queue||0)));a("qos_profile.qos_policies",[...n,r].sort((e,t)=>(t.qos_marking?.queue||0)-(e.qos_marking?.queue||0)))},[a,t.qos_profile?.qos_policies]),P=(0,n.useCallback)(()=>{v((0,u.to)({modalType:E.A.QOS_POLICY_MODAL,modalProps:{addCallback:L}}))},[L,v]),N=(0,n.useCallback)(()=>{a("qos_profile",(0,o.A)(C.a$)),a("qosEnabled",!t.qosEnabled)},[a,t.qosEnabled]),I=(0,d.t$)("qosEnabled",l,S,b),D=(0,n.useMemo)(()=>n.createElement(c.A,{description:R?n.createElement(O.sA,{id:"PORTS_QOS_POLICIES_LIMIT_REACHED",values:{limit:C.aW}}):null,portal:!0},n.createElement(i.A,{variant:"inline",onClick:P,type:"button",size:"medium",disabled:e||R},n.createElement(O.sA,{id:"COMMON_CREATE_NEW"}))),[P,e,R]);return n.createElement(p.A,{flexDirection:"column",gap:m.kc},n.createElement(g.l2,{width:"100%",gap:m.kc},n.createElement(c.A,{description:f?n.createElement(O.sA,{id:"PORTS_QOS_SET_BY_AV"}):void 0,portal:!0},n.createElement(A.A,{name:"qosEnabled",type:"realCheckbox",onClick:N,disabled:e||f},n.createElement(O.sA,{id:"COMMON_QOS"}))),!t.qos_profile?.qos_policies?.length&&t.qosEnabled?D:null),t.qos_profile?.qos_policies?.length&&t.qosEnabled?n.createElement(p.A,{gap:m.kc,flexDirection:"column"},n.createElement(h,{addCallback:L}),e?null:D):null,I?n.createElement(_.A,{style:{padding:0},isInvalid:!0,label:I}):null)}},242366:(e,t,a)=>{a.d(t,{A:()=>o});var l=a(296540),r=a(566723),n=a(294303);const o=(0,l.forwardRef)((e,t)=>l.createElement(n.A,{ref:t,flexDirection:"column",gap:r.kc,width:"100%",...e}))},263130:(e,t,a)=>{a.d(t,{A:()=>_});var l=a(296540),r=a(927099),n=a(71479),o=a(998837),s=a(566723),c=a(294303);const i=(0,n.A)(r.A)`
  line-height: 20px;
`,_=({icon:e,description:t,action:a,footer:r,background:n,..._})=>{const d=(0,o.u)().motifPalette.neutral01;return l.createElement(c.A,{flexGrow:1,borderRadius:s.YC,padding:s.kc,background:n||d,gap:s.kc,flexDirection:"column",..._},l.createElement(c.A,{flexGrow:1,gap:s.kc},e,t?l.createElement(i,{size:"body"},t):null,a?l.createElement(c.A,{marginLeft:"auto"},l.createElement(i,{size:"body"},a)):null),r)}},269333:(e,t,a)=>{a.d(t,{A:()=>o});var l=a(296540),r=a(152480),n=a(353942);const o=({htmlFor:e,searchHtmlFor:t,searchIgnore:a,searchIsApplicable:o,searchTags:s,searchText:c,...i})=>{const _=(0,n.A)(),d=(0,l.useRef)(null),m=_===e||_===t;return(0,l.useEffect)(()=>{if(m&&d.current){const{y:e}=d.current.getBoundingClientRect?.()||{y:0};(e<150||e+200>window.innerHeight)&&setTimeout(()=>{d.current?.scrollIntoView?.({behavior:"smooth",block:"center"})},50)}},[m]),l.createElement(r.A,{highlight:m,highlightType:"spotlight",htmlFor:t||e,forwardedRef:d,highlightNoAutoScroll:!0,...i})}},329109:(e,t,a)=>{a.d(t,{A:()=>_});var l=a(296540),r=a(691441),n=a(71479),o=a(132196),s=a(373229);const c=(0,n.A)("div")`
  height: 66px;
`,i=o.AH`
  padding: 0px !important;
`,_=({isDirty:e,onFormSubmit:t,onFormCancel:a,isInvalid:n,...o})=>e?l.createElement(r.A,null,l.createElement(s.A,{isDirty:e,onFormCancel:a,onFormSubmit:t,isInvalid:n,className:i,...o})):l.createElement(c,null)},349665:(e,t,a)=>{a.d(t,{A:()=>o});var l=a(296540),r=a(705228),n=a(294303);const o=({maxWidth:e,...t})=>l.createElement(n.A,{flexDirection:"column",width:"100%",maxWidth:"settingsGridContent"===e?r.ng:e,...t})},353942:(e,t,a)=>{a.d(t,{A:()=>n});var l=a(231347),r=a(583286);const n=()=>(0,l.Y)(r.mv)[0]||null},391855:(e,t,a)=>{a.d(t,{A:()=>_});var l=a(296540),r=a(271856),n=a(858931),o=a(823858),s=a(71479),c=a(699784);const i=(0,s.A)(o.A)`
  color: #ffffff;
`,_=(0,l.memo)(({isDisabled:e,showLoader:t,showWarning:a,showWarningIcon:o,warning:s,label:_="COMMON_ACTION_APPLY_CHANGES",onSubmit:d,form:m})=>l.createElement(r.A,{description:a?s??l.createElement(c.sA,{id:"COMMON_FORM_CHANGES_TRIGGER_PROVISION"}):null,portal:!0,width:240},l.createElement(n.A,{disabled:e,type:"submit",onClick:d,variant:"primary",Icon:a||o?l.createElement(i,{variant:"fill"}):null,loader:t?"loading":void 0,form:m},l.createElement(c.sA,{id:_}))))},400261:(e,t,a)=>{a.d(t,{Z:()=>r});var l=a(546391);const r=e=>e?e.replace(l.SD,"").replace(l.fA,"$&:").substring(0,17).toLowerCase():e},439247:(e,t,a)=>{a.d(t,{A:()=>E});var l=a(296540),r=a(951272),n=a(566723),o=a(143811),s=a(294303),c=a(699784),i=a(768941),_=a(112707),d=a(987588);const m=[{label:"COMMON_PORTS_FORM_FIELD_DOT1X_CTRL_OPTION_AUTO",value:i.Je.AUTO},{label:"COMMON_PORTS_FORM_FIELD_DOT1X_CTRL_OPTION_FORCE_AUTHORIZED",value:i.Je.FORCE_AUTHORIZED},{label:"COMMON_PORTS_FORM_FIELD_DOT1X_CTRL_OPTION_FORCE_UNAUTHORIZED",value:i.Je.FORCE_UNAUTHORIZED},{label:"COMMON_PORTS_FORM_FIELD_DOT1X_CTRL_OPTION_MAC_BASED",value:i.Je.MAC_BASED},{label:"COMMON_PORTS_FORM_FIELD_DOT1X_CTRL_OPTION_MULTI_HOST",value:i.Je.MULTI_HOST}],E=({disabled:e})=>{const{values:{dot1x_ctrl:t},setFieldValue:a,initialValues:E}=(0,r.j7)();return l.createElement(s.A,{flexDirection:"column",gap:n.Ln},l.createElement(o.A,{name:"dot1x_ctrl",checked:t,label:"COMMON_DEVICE_CAP_SWITCH_CAP_DOT1X",translateLabel:!0,type:"dropdown",options:m,translateOptions:!0,disabled:e,variant:"secondary",onChange:(e,t)=>{a("dot1x_ctrl",t),t!==i.Je.MAC_BASED&&a("dot1x_idle_timeout",E.dot1x_idle_timeout)},full:!0}),t===i.Je.MAC_BASED?l.createElement(o.A,{name:"dot1x_idle_timeout",type:"number",variant:"secondary",contentAfter:l.createElement(c.sA,{id:"COMMON_UNIT_SEC"}),min:_.S.MIN,max:_.S.MAX,full:!0,className:d.rH,disabled:e}):null)}},461983:(e,t,a)=>{a.d(t,{A:()=>c});var l=a(296540),r=a(596176),n=a(143811),o=a(699784),s=a(987588);const c=({disabled:e})=>l.createElement(s.l2,null,l.createElement(n.A,{name:"port_keepalive_enabled",type:"realCheckbox",disabled:e,tooltipMessage:l.createElement(r.A,{messages:[["COMMON_KEEP_ALIVE_TOOLTIP"],["COMMON_KEEP_ALIVE_TOOLTIP_2"]]}),tooltipProps:{portal:!0}},l.createElement(o.sA,{id:"COMMON_LOOP_PROTECTION"})))},553432:(e,t,a)=>{a.d(t,{A:()=>s});var l=a(296540),r=a(454195),n=a(566723),o=a(294303);const s=e=>l.createElement(o.A,{paddingTop:n.YC,paddingBottom:n.YC,gap:n.Ln,rowGap:n.YC,flexWrap:"wrap",minHeight:r.b,alignItems:"center",...e})},596176:(e,t,a)=>{a.d(t,{A:()=>c});var l=a(296540),r=a(217439),n=a(566723),o=a(699784),s=a(294303);const c=({messages:e=[]})=>e.length?l.createElement(s.A,{flexDirection:"column",gap:n.kc},e.map(([e,t={}])=>l.createElement(r.A,{key:e,color:"inherit",size:"inherit"},l.createElement(o.sA,{id:e,values:t})))):null},605452:(e,t,a)=>{a.d(t,{A:()=>A});var l=a(469733),r=a(296540),n=a(951272),o=a(718073),s=a(566723),c=a(143811),i=a(294303),_=a(699784),d=a(936621),m=a(32047),E=a(987588);const A=({disabled:e})=>{const{values:t,setFieldValue:a}=(0,n.j7)(),A=(0,l.useSelector)((0,m.c)(t.native_networkconf_id,t.taggedVlans,t.tagged_vlan_mgmt)),p=!e&&0===A.length&&t.voice_networkconf_id===d.F,u=!e&&!t.lldpmed_enabled,{disableMessage:O,fieldDisabled:C}=(0,r.useMemo)(()=>{const t=p||u||e;return{disableMessage:(()=>{if(p)return r.createElement(_.sA,{id:"COMMON_PORTS_FORM_FIELD_VOICE_NETWORKCONF_ID_DISABLED_NO_OPTIONS"})})(),fieldDisabled:t}},[e,p,u]);return r.createElement(i.A,{flexDirection:"column",gap:s.kc},r.createElement(E.l2,{width:"100%"},r.createElement(o.A,{description:O},r.createElement("span",null,r.createElement(c.A,{name:"voiceNetworkConfEnabled",type:"realCheckbox",disabled:C,onChange:({target:{checked:e}})=>{a("voiceNetworkConfEnabled",e),e||a("voice_networkconf_id",d.F)},tooltipMessage:C?void 0:r.createElement(_.sA,{id:"COMMON_PORTS_FORM_FIELD_VOICE_NETWORKCONF_ID_LABEL_DESC_1"}),tooltipProps:{portal:!0},checked:t.voiceNetworkConfEnabled},r.createElement(_.sA,{id:"COMMON_PORTS_FORM_FIELD_VOICE_NETWORKCONF_ID_LABEL"}))))),t.voiceNetworkConfEnabled&&r.createElement(c.A,{searchable:!0,name:"voice_networkconf_id",options:A,type:"dropdown",sortedOptions:!0,full:!0,variant:"secondary"}))}},609519:(e,t,a)=>{a.d(t,{A:()=>M});var l=a(469733),r=a(296540),n=a(951272),o=a(271856),s=a(396660),c=a(79760),i=a(15095),_=a(566723),d=a(836645),m=a(143811),E=a(196010),A=a(294303),p=a(627440),u=a(699784),O=a(524936),C=a(366188),g=a(959341),T=a(987588);const M=({disabled:e})=>{const t=(0,l.useSelector)(C.Ct),a=(0,i.A)(`${p.VO.SETTINGS}/${g.Cs}`),{values:{multicast_router_networkconf_ids:M,multicastRouterEnabled:b},setFieldValue:S,errors:v,touched:f,submitCount:h}=(0,n.j7)(),R=(0,r.useMemo)(()=>t.every(e=>!e.igmp_snooping),[t]),L=(0,r.useMemo)(()=>t.filter(O.H2).sort(s.Cv).map(e=>({label:(0,O.gm)(e),additionalInfo:(0,O.mC)(e),value:e._id,disabled:!e.igmp_snooping,tooltipDescription:e.igmp_snooping?null:r.createElement(u.sA,{id:"PORTS_IGMP_MULTICAST_ROUTER_PORT_NETWORK_DISABLED_DESCRIPTION"}),tooltipPortal:!0,tooltipPosition:"left"})),[t]),P=(0,c.t$)("multicast_router_networkconf_ids",v,f,h);return r.createElement(A.A,{flexDirection:"column",gap:_.kc,width:"100%"},r.createElement(o.A,{description:R?r.createElement(u.sA,{id:"PORTS_IGMP_MULTICAST_ROUTER_PORT_DISABLED_DESCRIPTION",values:{link:r.createElement(E.A,{to:a},r.createElement(u.sA,{id:"COMMON_IGMP_SNOOPING"}))}}):null,portal:!0,isInteractive:!0},r.createElement(T.l2,{justifyContent:"space-between",width:"100%"},r.createElement(m.A,{type:"realCheckbox",full:!0,disabled:R||e,name:"multicastRouterEnabled",label:"COMMON_MULTICAST_ROUTER_PORT",tooltipMessage:r.createElement(u.sA,{id:"COMMON_MULTICAST_ROUTER_PORT_DESCRIPTION"}),tooltipProps:{portal:!0},afterChange:e=>{!M&&e&&S("multicast_router_networkconf_ids",[])}},r.createElement(u.sA,{id:"COMMON_MULTICAST_ROUTER_PORT"})))),b?r.createElement(A.A,{width:"100%",flexDirection:"column"},r.createElement(d.A,{options:L,disabled:e,isDefaultOpen:0===M?.length,list:M,onChange:e=>{S("multicast_router_networkconf_ids",e)},validationMessage:P,isFullWidth:!0,truncateLabels:!0,triggerButtonText:"COMMON_ACTION_SELECT_NETWORKS"})):null)}},634610:(e,t,a)=>{a.d(t,{A:()=>l});const l=function(e,t){const a={...e.advancedConfigSwap},l={...e,advancedConfigSwap:{}};return Object.keys(a).forEach(e=>{const t=a[e];a[e]=l[e],l[e]=t}),l.advancedConfigSwap=a,l.setting_preference=t,l}},641777:(e,t,a)=>{a.d(t,{A:()=>o});var l=a(296540),r=a(284428),n=a(451449);const o=({isDisabled:e,isAdditive:t=!0,children:a})=>{const o=(0,r.pv)(),s=(0,l.useMemo)(()=>"boolean"==typeof e?{fields:e,labels:e,tooltipIcons:e,tooltipPopovers:!1}:e,[e]),c=(0,l.useMemo)(()=>({fields:t?s.fields||o.fields:s.fields,labels:t?s.labels||o.labels:s.labels,tooltipIcons:t?s.tooltipIcons||o.tooltipIcons:s.tooltipIcons,tooltipPopovers:t?s.tooltipPopovers||o.tooltipPopovers:s.tooltipPopovers}),[t,s.fields,s.labels,s.tooltipIcons,s.tooltipPopovers,o.fields,o.labels,o.tooltipIcons,o.tooltipPopovers]);return l.createElement(n.I.Provider,{value:c},a)}},649705:(e,t,a)=>{a.d(t,{A:()=>m});var l=a(469733),r=a(296540),n=a(951272),o=a(979106),s=a(132196),c=a(634610),i=a(736014),_=a(602021);const d=s.AH`
  margin: unset;
`,m=({disabled:e})=>{const{values:t,setValues:a}=(0,n.j7)(),s=(0,l.useSelector)(_.EL),m=(0,r.useCallback)(e=>{const l=(0,c.A)(t,e);l.qos_profile.qos_profile_mode=t.qos_profile.qos_profile_mode,l.avManufacturer=t.avManufacturer,a(l)},[a,t]);return r.createElement(o.A,{variant:"capsule",tabs:i.r,selectedTab:t.setting_preference,onSelectTab:e=>m(e.id),disabled:e||s,tabsClassName:d})}},699736:(e,t,a)=>{a.d(t,{A:()=>P});var l=a(956347),r=a(469733),n=a(296540),o=a(951272),s=a(758649),c=a(217439),i=a(162420),_=a(79760),d=a(566723),m=a(596176),E=a(553432),A=a(836645),p=a(317672),u=a(143811),O=a(294303),C=a(263130),g=a(627440),T=a(699784),M=a(187483),b=a(936621),S=a(366188),v=a(768195),f=a(242281),h=a(959341),R=a(641777),L=a(32047);const P=({disabled:e,isVlanTaggingSupported:t,showSwitchVlanLimit:a,showApVlanLimit:P})=>{const N=(0,l.W6)(),{site:I}=(0,l.g)(),D=(0,r.useSelector)(M.Xt),k=(0,l.tW)(D,{site:I}),{values:{native_networkconf_id:y,tagged_vlan_mgmt:q,voice_networkconf_id:w,taggedVlans:F,portconf_id:V},setFieldValue:U,errors:x,touched:G,submitCount:B,values:$,setValues:H}=(0,o.j7)(),W=(0,r.useSelector)((0,S.lq)(y)),Y=(0,r.useSelector)((0,L.y)(y)),j=(0,n.useCallback)(e=>{const t={};t.tagged_vlan_mgmt=e,t.taggedVlans=[],t.voice_networkconf_id=b.F,t.voiceNetworkConfEnabled=!1,H({...$,...t})},[H,$]),K=(0,n.useCallback)(e=>{j(e)},[j]),z=(0,n.useCallback)(()=>{N.push(`${k}/${g.VO.SETTINGS}/${h.E5}`)},[N,k]),Q=0===Y?.length||!t;return(0,n.useEffect)(()=>{q===v.sg.CUSTOM&&Q&&!V&&j(v.sg.AUTO)},[q,Q,j,V]),(0,n.useEffect)(()=>{t||V||W||U("tagged_vlan_mgmt",v.sg.BLOCK_ALL)},[t,W,U,V,y]),n.createElement(n.Fragment,null,t?null:n.createElement(C.A,{icon:n.createElement(i.A,{isActive:!0,size:"original",variant:"fill"}),description:n.createElement(T.sA,{id:"PORTS_FORM_VLAN_TAGGING_NOT_SUPPORTED"})}),n.createElement(O.A,{flexDirection:"column"},n.createElement(R.A,{isDisabled:e},n.createElement(p.A,{tooltip:n.createElement(m.A,{messages:[["PORTS_FORM_TAGGED_VLAN_MODE_DESC"],["PORTS_FORM_TAGGED_VLAN_MODE_DESC_2"],["PORTS_FORM_TAGGED_VLAN_MODE_DESC_3"]]})},n.createElement(T.sA,{id:"COMMON_PORTS_TAGGED_VLAN_MANAGEMENT"}))),n.createElement(E.A,null,n.createElement(u.A,{value:v.sg.AUTO,type:"radio",name:"tagged_vlan_mgmt",onChange:()=>K(v.sg.AUTO),disabled:e||!t&&!W},n.createElement(T.sA,{id:"COMMON_ALLOW_ALL"})),n.createElement(u.A,{value:v.sg.BLOCK_ALL,type:"radio",name:"tagged_vlan_mgmt",onChange:()=>K(v.sg.BLOCK_ALL),disabled:e},n.createElement(T.sA,{id:"COMMON_BLOCK_ALL"})),n.createElement(u.A,{value:v.sg.CUSTOM,type:"radio",name:"tagged_vlan_mgmt",disabled:e||Q,onChange:()=>K(v.sg.CUSTOM)},n.createElement(T.sA,{id:"COMMON_CUSTOM"}))),a?n.createElement(C.A,{marginTop:d.kc,icon:n.createElement(i.A,{isActive:!0,size:"original",variant:"fill"}),description:n.createElement(T.sA,{id:"PORTS_DEVICE_VLAN_LIMIT_INFO",values:{limit:f.Oz}})}):null,P?n.createElement(C.A,{marginTop:d.kc,icon:n.createElement(i.A,{isActive:!0,size:"original",variant:"fill"}),description:n.createElement(T.sA,{id:"PORTS_DEVICE_VLAN_LIMIT_INFO",values:{limit:f.pC}})}):null),q===v.sg.CUSTOM?n.createElement(O.A,{flexDirection:"column"},n.createElement(A.A,{options:Y,list:F,onChange:e=>{const t={};t.taggedVlans=e,e.includes(w)||(t.voice_networkconf_id=b.F,t.voiceNetworkConfEnabled=!1),H({...$,...t})},disabled:e,triggerButtonText:"COMMON_SELECT",validationMessage:(0,_.t$)("taggedVlans",x,G,B),label:n.createElement(T.sA,{id:"PORTS_FORM_TAGGED_VLANS"}),tooltipDescription:n.createElement(O.A,{flexDirection:"column",gap:d.xO},n.createElement(c.A,{color:"text-1",size:"small"},n.createElement(T.sA,{id:"PORTS_FORM_TAGGED_VLANS_DESC"})),n.createElement(c.A,{color:"text-1",size:"small"},n.createElement(T.sA,{id:"PORTS_FORM_TAGGED_VLANS_DESC_2",values:{link:n.createElement(s.A,{type:"button",variant:"inline",onClick:z},n.createElement(T.sA,{id:"COMMON_ETHERNET_PORT_PROFILE"}))}}))),tooltipProps:{portal:!0,isInteractive:!0}})):null)}},736014:(e,t,a)=>{a.d(t,{r:()=>o});var l=a(296540),r=a(883840),n=a(699784);const o=[{id:r.C.AUTO,label:l.createElement(n.sA,{id:"COMMON_VALUE_AUTO"})},{id:r.C.MANUAL,label:l.createElement(n.sA,{id:"COMMON_VALUE_MANUAL"})}]},789367:(e,t,a)=>{var l;a.d(t,{K:()=>l}),function(e){e.ALL="all",e.ACL_RULES="acl-rules",e.DNS_RECORDS="dns-records",e.FIREWALL="firewall",e.NAT_RULES="nat-rules",e.POLICY_BASED_ROUTES="policy-based-routes",e.PORT_FORWARDING="port-forwarding",e.QOS_RULES="qos-rules",e.STATIC_ROUTES="static-routes"}(l||(l={}))},854246:(e,t,a)=>{a.d(t,{A:()=>c});var l=a(296540),r=a(71479),n=a(132196),o=a(699784);const s=(0,r.A)("div",{shouldForwardProp:e=>"align"!==e})`
  ${({align:e})=>e&&`text-align: ${e}`};
  color: ${({theme:{motifPalette:{red06:e}}})=>e};
  font-size: ${({theme:{fontSizes:e}})=>e[0]}px;
  line-height: 20px;
`,c=({align:e="left",children:t=null,className:a=null,translation:r=null,visible:c=!1})=>c?l.createElement(s,{align:e,className:(0,n.cx)(a)},r&&l.createElement(o.sA,{id:r}),t):null},872352:(e,t,a)=>{a.d(t,{A:()=>_});var l=a(296540),r=a(951272),n=a(596176),o=a(143811),s=a(699784),c=a(936621),i=a(987588);const _=({disabled:e})=>{const{setFieldValue:t,values:a}=(0,r.j7)(),_=(0,l.useCallback)(({target:{checked:e}})=>{t("lldpmed_enabled",e),a.lldpmed_enabled&&(t("voiceNetworkConfEnabled",!1),t("voice_networkconf_id",c.F))},[t,a.lldpmed_enabled]);return l.createElement(i.l2,{width:"100%"},l.createElement(o.A,{name:"lldpmed_enabled",type:"realCheckbox",disabled:e,onChange:_,tooltipMessage:l.createElement(n.A,{messages:[["COMMON_LLDP_MED_TOOLTIP_1"],["COMMON_LLDP_MED_TOOLTIP_2"]]}),tooltipProps:{portal:!0}},l.createElement(s.sA,{id:"COMMON_DEVICE_CAP_SWITCH_CAP_LLDP_MED"})))}},877995:(e,t,a)=>{a.d(t,{L:()=>n});var l=a(189643),r=a(204751);const n={qos_marking:{cos_code:r.hQ.BACKGROUND,dscp_code:r.ee.DEFAULT,ip_precedence_code:r.lF.ROUTINE,queue:0},qos_matching:{cos_code:r.hQ.BACKGROUND,dscp_code:r.ee.DEFAULT,ip_precedence_code:r.lF.ROUTINE,protocol:l.aS.ALL},enableDestinationPort:!1,enableSourcePort:!1,enableQosMarking:!1,matchingTrafficType:r.ev.DSCP,markingTrafficType:r.ev.DSCP,protocolNumber:0}},883554:(e,t,a)=>{a.d(t,{A:()=>T});var l=a(296540),r=a(951272),n=a(86838),o=a(718073),s=a(79760),c=a(566723),i=a(143811),_=a(294303),d=a(699784),m=a(349665),E=a(317672),A=a(553432),p=a(368476),u=a(641777),O=a(275988),C=a(204751),g=a(987588);const T=({disabled:e,showQos:t,showPercentage:a})=>{const{values:T,setFieldValue:M,initialValues:b,errors:S,touched:v,submitCount:f}=(0,r.j7)(),h=a&&T.stable_port_enabled?{stormControlEnabled:!0,...O.jk}:T,R=(0,s.t$)("stormControlEnabled",S,v,f),L=T.stable_port_enabled||e,P=t&&T.qos_profile?.qos_profile_mode!==C.If.CUSTOM;return l.createElement(o.A,{description:T.stable_port_enabled?l.createElement(d.sA,{id:"PORTS_STABLE_PORT_MANAGED_BY_STABLE_PORT"}):void 0},l.createElement(_.A,{flexDirection:"column",gap:c.kc},l.createElement(g.l2,null,l.createElement(i.A,{name:"stormControlEnabled",type:"realCheckbox",checked:h.stormControlEnabled,onChange:({target:{checked:e}})=>{M("stormControlEnabled",e),e||(M("stormctrl_ucast_enabled",!1),M("stormctrl_mcast_enabled",!1),M("stormctrl_bcast_enabled",!1),M("stormctrl_ucast_rate",b.stormctrl_ucast_rate),M("stormctrl_mcast_rate",b.stormctrl_mcast_rate),M("stormctrl_bcast_rate",b.stormctrl_bcast_rate),M("stormctrl_ucast_level",b.stormctrl_ucast_level),M("stormctrl_mcast_level",b.stormctrl_mcast_level),M("stormctrl_bcast_level",b.stormctrl_bcast_level))},tooltipMessage:l.createElement(d.sA,{id:"COMMON_STORM_CONTROL_TOOLTIP"}),disabled:L},l.createElement(d.sA,{id:"COMMON_DEVICE_CAP_SWITCH_CAP_STORM_CONTROL"}))),h.stormControlEnabled?l.createElement(l.Fragment,null,a?l.createElement(m.A,{paddingLeft:c.S2},l.createElement(u.A,{isDisabled:L},l.createElement(E.A,{htmlFor:"stormctrl_type",tooltip:l.createElement(d.sA,{id:"PORTS_STORM_CONTROL_MODE_TOOLTIP"})},l.createElement(d.sA,{id:"COMMON_MODE"}))),l.createElement(A.A,null,l.createElement(i.A,{value:p.d5.LEVEL,type:"radio",name:"stormctrl_type",checked:h.stormctrl_type===p.d5.LEVEL,disabled:L},l.createElement(d.sA,{id:"COMMON_PERCENTAGE"})),l.createElement(i.A,{value:p.d5.RATE,type:"radio",name:"stormctrl_type",checked:h.stormctrl_type===p.d5.RATE,disabled:L},l.createElement(d.sA,{id:"COMMON_RATE"})))):null,l.createElement(_.A,{gap:c.Ln,justifyContent:"space-between",paddingLeft:c.S2},l.createElement(g.l2,null,l.createElement(i.A,{disabled:L,name:"stormctrl_ucast_enabled",type:"realCheckbox",checked:h.stormctrl_ucast_enabled,onChange:({target:{checked:e}})=>{M("stormctrl_ucast_enabled",e),e||(M("stormctrl_ucast_rate",b.stormctrl_ucast_rate),M("stormctrl_ucast_level",b.stormctrl_ucast_level))},tooltipMessage:l.createElement(d.sA,{id:"COMMON_STORM_CONTROL_UNICAST_TOOLTIP"}),tooltipProps:{portal:!0}},l.createElement(d.sA,{id:"COMMON_PORTS_FORM_FIELD_STORMCTRL_UCAST_LABEL"}))),h.stormctrl_ucast_enabled?a&&h.stormctrl_type===p.d5.LEVEL?l.createElement(i.A,{name:"stormctrl_ucast_level",type:"number",value:h.stormctrl_ucast_level,variant:"secondary",contentAfter:"%",min:1,max:100,full:!0,className:g.rH,disabled:L}):l.createElement(i.A,{name:"stormctrl_ucast_rate",type:"number",variant:"secondary",contentAfter:l.createElement(d.sA,{id:"COMMON_PORTS_FORM_FIELD_STORMCTRL_UNIT"}),full:!0,className:g.rH,disabled:L}):null),l.createElement(_.A,{gap:c.Ln,justifyContent:"space-between",paddingLeft:c.S2},l.createElement(g.l2,null,l.createElement(o.A,{description:P&&!L?l.createElement(d.sA,{id:"PORTS_MULTICAST_SET_BY_AV"}):void 0},l.createElement(_.A,null,l.createElement(i.A,{disabled:L||P,name:"stormctrl_mcast_enabled",type:"realCheckbox",checked:h.stormctrl_mcast_enabled&&!P,onChange:({target:{checked:e}})=>{M("stormctrl_mcast_enabled",e),e||(M("stormctrl_mcast_rate",b.stormctrl_mcast_rate),M("stormctrl_mcast_level",b.stormctrl_mcast_level))},tooltipMessage:l.createElement(d.sA,{id:"COMMON_STORM_CONTROL_MULTICAST_TOOLTIP"}),tooltipProps:{portal:!0}},l.createElement(d.sA,{id:"COMMON_PORTS_FORM_FIELD_STORMCTRL_MCAST_LABEL"}))))),h.stormctrl_mcast_enabled&&!P?a&&h.stormctrl_type===p.d5.LEVEL?l.createElement(i.A,{name:"stormctrl_mcast_level",type:"number",value:h.stormctrl_mcast_level,variant:"secondary",contentAfter:"%",min:1,max:100,full:!0,className:g.rH,disabled:L}):l.createElement(i.A,{name:"stormctrl_mcast_rate",type:"number",variant:"secondary",contentAfter:l.createElement(d.sA,{id:"COMMON_PORTS_FORM_FIELD_STORMCTRL_UNIT"}),full:!0,className:g.rH,disabled:L}):null),l.createElement(_.A,{gap:c.Ln,justifyContent:"space-between",paddingLeft:c.S2},l.createElement(g.l2,null,l.createElement(i.A,{disabled:L,name:"stormctrl_bcast_enabled",checked:h.stormctrl_bcast_enabled,type:"realCheckbox",onChange:({target:{checked:e}})=>{M("stormctrl_bcast_enabled",e),e||(M("stormctrl_bcast_rate",b.stormctrl_bcast_rate),M("stormctrl_bcast_level",b.stormctrl_bcast_level))},tooltipMessage:l.createElement(d.sA,{id:"COMMON_STORM_CONTROL_BROADCAST_TOOLTIP"}),tooltipProps:{portal:!0}},l.createElement(d.sA,{id:"COMMON_PORTS_FORM_FIELD_STORMCTRL_BCAST_LABEL"}))),h.stormctrl_bcast_enabled?a&&h.stormctrl_type===p.d5.LEVEL?l.createElement(i.A,{name:"stormctrl_bcast_level",type:"number",value:h.stormctrl_bcast_level,variant:"secondary",contentAfter:"%",min:1,max:100,full:!0,className:g.rH,disabled:L}):l.createElement(i.A,{name:"stormctrl_bcast_rate",type:"number",variant:"secondary",contentAfter:l.createElement(d.sA,{id:"COMMON_PORTS_FORM_FIELD_STORMCTRL_UNIT"}),full:!0,className:g.rH,disabled:L}):null)):null,R&&T.stormControlEnabled?l.createElement(n.A,{isInvalid:!0,label:R}):null))}},898257:(e,t,a)=>{a.d(t,{A:()=>c});var l=a(296540),r=a(594827),n=a(774570),o=a(143811),s=a(699784);const c=({disabled:e,networkGroup:t})=>{const{formatMessage:a}=(0,s.tz)(),c=!!t&&(0,r.pg)(t),i=t?"PORTS_NAME_WITH_INTERFACE":"COMMON_NAME",_=t?{networkGroup:c?(0,r.qY)(t,a):(0,n.bR)(t,a)}:{};return l.createElement(o.A,{disabled:e,full:!0,name:"name",placeholder:"COMMON_DEFAULT",variant:"secondary",label:i,labelValues:_,translateLabel:!0})}},961863:(e,t,a)=>{a.d(t,{A:()=>O});var l=a(469733),r=a(296540),n=a(720903),o=a(951272),s=a(805837),c=a(396660),i=a(641777),_=a(596176),d=a(317672),m=a(143811),E=a(699784),A=a(936621),p=a(524936),u=a(366188);const O=({disabled:e,hideTooltip:t})=>{const{formatMessage:a}=(0,E.tz)(),O=(0,l.useSelector)(u.SB),{values:C,setFieldValue:g}=(0,o.j7)(),T=(0,r.useMemo)(()=>[...(0,n.A)(O).sort(c.Cv).map(e=>({label:(0,p.gm)(e),value:e._id,additionalInfo:(0,p.mC)(e)})),{label:a({id:"COMMON_NONE"}),value:A.F}],[O,a]);return r.createElement(m.A,{disabled:e,full:!0,name:"native_networkconf_id",onChange:({value:e})=>{g("native_networkconf_id",e),C.taggedVlans?.includes(e)&&g("taggedVlans",C.taggedVlans?.filter(t=>t!==e)),C.voice_networkconf_id===e&&(g("voice_networkconf_id",A.F),g("voiceNetworkConfEnabled",!1))},options:T,renderOption:s.q,searchable:!0,type:"dropdown",variant:"secondary",label:r.createElement(i.A,{isDisabled:e},r.createElement(d.A,{tooltip:!t&&r.createElement(_.A,{messages:[["PORTS_FORM_NATIVE_LABEL_DESC"],["PORTS_FORM_NATIVE_LABEL_DESC_2"]]})},r.createElement(E.sA,{id:"COMMON_PORTS_NATIVE_VLAN_NETWORKS"})))})}},963253:(e,t,a)=>{a.d(t,{A:()=>s});var l=a(822336),r=a(71479),n=a(566723),o=a(294303);const s=(0,r.A)(o.A,{shouldForwardProp:e=>!["selected","disabled","allowGreyscale","noMargin"].includes(e)})`
  height: 32px;
  border-radius: ${l.Ay["desktop-radius-base"]};
  padding: ${n.YC} ${n.kc};
  margin-right: ${({noMargin:e})=>e?0:n.kc};
  border: ${({theme:{themeName:e}})=>l.Ay[`desktop-border-divider-${e}`]};
  align-items: center;
  justify-content: center;
  cursor: pointer;
  gap: ${n.kc};
  user-select: none;

  ${({selected:e,theme:{motifPalette:{uBlue06:t}}})=>e&&`border-color: ${t};`}
  ${({disabled:e,allowGreyscale:t,selected:a})=>e||t&&!a?`> * { opacity: ${n.xN}; }`:void 0}
  ${({disabled:e})=>e&&"pointer-events: none;"}
  ${({allowGreyscale:e,selected:t})=>e&&!t&&"filter: grayscale(100%);"}
`},987588:(e,t,a)=>{a.d(t,{EV:()=>m,K_:()=>c,l2:()=>i,rH:()=>d,tk:()=>_});a(296540);var l=a(71479),r=a(132196),n=a(269333),o=a(566723),s=a(294303);const c=(0,l.A)(n.A)`
  width: 100%;
  align-items: center;
  align-self: flex-start;
  min-height: ${o.fS};
`,i=(0,l.A)(s.A)`
  min-height: ${o.fS};
  align-items: center;
  align-self: flex-start;
`,_=r.AH`
  /* align label */
  > div:first-child {
    align-self: center;
  }

  /* align icon */
  > div:last-child {
    height: 24px;
  }
`,d=r.AH`
  max-width: 130px;
  width: 130px;
`,m=r.AH`
  > div {
    margin: 0 !important;
  }
`;(0,l.A)(s.A)`
  flex: 0 2 256px;
  pointer-events: auto;
`}}]);