"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[69824],{154843(e,t,_){_.d(t,{E:()=>a,I:()=>n});const n=31536e3,a=1},930122(e,t,_){_.d(t,{_:()=>a});var n=_(233187);const a={[n.A3.NONE]:"COMMON_NONE",[n.A3.ENABLED]:"COMMON_SERVER",[n.A3.RELAY]:"SETTINGS_RELAY"}},175522(e,t,_){_.d(t,{A:()=>a,Q:()=>l});var n=_(416348);const a="_",l=[n.ZM,n.Je]},335928(e,t,_){_.d(t,{A:()=>l});var n=_(951272),a=_(465543);const l=()=>{const{dirty:e}=(0,n.j7)();return(0,a.w)(e),null}},465543(e,t,_){_.d(t,{w:()=>d});var n=_(296540),a=_(469733),l=_(845030);const d=e=>{const t=(0,a.useDispatch)();(0,n.useEffect)(()=>{t((0,l.SQ)(e))},[t,e])}},263130(e,t,_){_.d(t,{A:()=>E});var n=_(822336),a=_(296540),l=_(217439),d=_(71479),r=_(382389),s=_(566723),i=_(294303);const c=(0,d.A)(l.A)`
  line-height: 20px;
`,E=({icon:e,description:t,action:_,footer:l,background:d,...E})=>{const{themeName:o}=(0,r.u)();return a.createElement(i.A,{flexGrow:1,borderRadius:s.YC,padding:s.kc,background:d||n.Ay[`desktop-color-neutral-01-${o}`],gap:s.kc,flexDirection:"column",...E},a.createElement(i.A,{flexGrow:1,gap:s.kc},e,t?a.createElement(c,{size:"medium"},t):null,_?a.createElement(i.A,{marginLeft:"auto"},a.createElement(c,{size:"medium"},_)):null),l)}},823084(e,t,_){_.d(t,{A:()=>s});var n=_(822336),a=_(296540),l=_(162420),d=_(382389),r=_(263130);const s=({children:e,icon:t,background:_,...s})=>{const{themeName:i}=(0,d.u)();return a.createElement(r.A,{icon:t||a.createElement(l.A,{variant:"fill",size:"original",color:n.Ay[`desktop-color-ublue-06-${i}`]}),description:e,background:_,...s})}},975280(e,t,_){_.d(t,{A:()=>s});var n=_(822336),a=_(296540),l=_(823858),d=_(382389),r=_(263130);const s=({children:e,...t})=>{const{themeName:_}=(0,d.u)();return a.createElement(r.A,{icon:a.createElement(l.A,{variant:"fill",size:"original",color:n.Ay[`desktop-color-orange-06-${_}`]}),description:e,...t})}},689965(e,t,_){_.d(t,{A:()=>m,I:()=>n});var n,a=_(296540),l=_(822336),d=_(963724),r=_(71479),s=_(825032),i=_(566723),c=_(294303),E=_(311785);!function(e){e.ACCORDION="accordion",e.BUTTON_LIST="buttonList"}(n||(n={}));const o=(0,r.A)(c.A,(0,E.A)("marginBottom","isButtonList","margin","flex","width","padding","nested","background"))`
  background-color: ${({background:e,nested:t,theme:{themeName:_}})=>e||l.Ay[_===s.S.DARK?`desktop-color-neutral-${t?"00":"01"}-dark`:`desktop-color-neutral-${t?"01":"00"}-light`]};
  padding: ${({theme:e,isButtonList:t,padding:_})=>_||(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  `:""}
`,A=(0,r.A)(d.A,(0,E.A)("marginBottom","margin","flex","padding","nested","background"))`
  background-color: ${({background:e,nested:t,theme:{themeName:_}})=>e||l.Ay[_===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 ${i.Ln};
    }
    > div:nth-child(2) {
      margin-bottom: 0;
      padding: 0;
      > div {
        padding: 0 ${i.Ln} ${i.Ln};
      }
    }
  }
`,m=({type:e,marginBottom:t,margin:_,padding:l,flex:d,width:r,nested:s,...i})=>"items"in i?a.createElement(A,{marginBottom:t,margin:_,padding:l,flex:d,nested:s,...i}):a.createElement(o,{nested:s,width:r,marginBottom:t,margin:_,padding:l,flex:d,isButtonList:e===n.BUTTON_LIST,...i},i.children)},821580(e,t,_){_.d(t,{A:()=>r});var n=_(296540),a=_(454195),l=_(566723),d=_(294303);const r=e=>n.createElement(d.A,{paddingTop:l.YC,paddingBottom:l.YC,gap:l.Ln,rowGap:l.YC,flexWrap:"wrap",minHeight:a.b,alignItems:"center",...e})},349665(e,t,_){_.d(t,{A:()=>d});var n=_(296540),a=_(705228),l=_(294303);const d=({maxWidth:e,label:t,children:_,...d})=>n.createElement(l.A,{flexDirection:"column",width:"100%",maxWidth:"settingsGridContent"===e?a.ng:e,...d},t,_)},242366(e,t,_){_.d(t,{A:()=>d});var n=_(296540),a=_(566723),l=_(294303);const d=(0,n.forwardRef)((e,t)=>n.createElement(l.A,{ref:t,flexDirection:"column",gap:a.kc,width:"100%",...e}))},553432(e,t,_){_.d(t,{A:()=>r});var n=_(296540),a=_(454195),l=_(566723),d=_(294303);const r=e=>n.createElement(d.A,{paddingTop:l.YC,paddingBottom:l.YC,gap:l.Ln,rowGap:l.YC,flexWrap:"wrap",minHeight:a.b,alignItems:"center",...e})},48925(e,t,_){_.d(t,{A:()=>h});var n=_(822336),a=_(296540),l=_(217439),d=_(71479),r=_(566723),s=_(968906),i=_(199582),c=_(311785),E=_(766624),o=_(294303),A=_(689965),m=_(242366);const p=(0,d.A)(A.A,(0,c.A)("isOutlined"))`
  border: ${({theme:{themeName:e},isOutlined:t})=>`1px solid ${t?n.Ay[`desktop-color-ublue-06-${e}`]:"transparent"}`};
`,h=({children:e,title:t,tooltip:_,tooltipProps:n,[i.L]:d,titleAction:c,isOutlined:A})=>{const h=(e=>a.Children.toArray(e).length>0)(e);return a.createElement(p,{marginBottom:"none",...s.A.addDataTestId(d??""),isOutlined:A},a.createElement(o.A,{flexDirection:"column",...h&&{gap:r.Ln},width:"100%"},t?a.createElement(o.A,{alignItems:"center",gap:r.YC,justifyContent:"space-between",width:"100%"},a.createElement(o.A,{gap:r.YC,alignItems:"center"},a.createElement(l.A,{variant:"heading-medium"},t),_?a.createElement(E.A,{description:_,portal:!0,...n}):null),c?a.createElement(o.A,null,c):null):null,h?a.createElement(m.A,null,e):null))}},998386(e,t,_){_.d(t,{H:()=>l,v:()=>a});var n=_(765562);const a=e=>`${n.A.fabricsOrchestration}?orchestrationId=${e?.template_id||""}&orgId=${e?.organization_id||""}`,l=e=>`${n.A.fabricsDeviceTemplates}/${e?.template_id||""}?orgId=${e?.organization_id||""}`},329109(e,t,_){_.d(t,{A:()=>c});var n=_(296540),a=_(691441),l=_(71479),d=_(132196),r=_(373229);const s=(0,l.A)("div")`
  height: 66px;
`,i=d.AH`
  padding: 0px !important;
`,c=({isDirty:e,onFormSubmit:t,onFormCancel:_,isInvalid:l,...d})=>e?n.createElement(a.A,null,n.createElement(r.A,{isDirty:e,onFormCancel:_,onFormSubmit:t,isInvalid:l,className:i,...d})):n.createElement(s,null)},604341(e,t,_){_.d(t,{i0:()=>A,Zm:()=>c,ph:()=>E,U0:()=>o,BQ:()=>r,Uz:()=>b,vP:()=>s,Iy:()=>d,Md:()=>l,uu:()=>i,gn:()=>p,se:()=>m,WX:()=>u,eM:()=>h,aC:()=>N,Ei:()=>T,R5:()=>O,_t:()=>I});var n=_(233187);const a={[n.eK.LOW]:"COMMON_LOW",[n.eK.MEDIUM]:"COMMON_MEDIUM",[n.eK.HIGH]:"COMMON_HIGH"},l=[{value:n.eK.LOW,label:a[n.eK.LOW]},{value:n.eK.MEDIUM,label:a[n.eK.MEDIUM]},{value:n.eK.HIGH,label:a[n.eK.HIGH]}],d=164,r=4,s=4,i="169.254.0.0/30",c="::2",E="::7d1",o="64",A="24",m=8,p=30,h=64,u=127,N=/\//,I={minHopCount:1,minDhcpRelayMaxSize:64,minDhcpRelayPort:1,maxDhcpRelayPort:65536,maxHopCount:255,maxDhcpRelayMaxSize:1400,relayAgentOptionsHandling:[{value:"",label:"COMMON_DEFAULT"},{value:"append",label:"SETTINGS_INTERNET_GENERAL_ADV_GW_DHCP_RELAY_HANDLING_OPTION_APPEND"},{value:"discard",label:"SETTINGS_INTERNET_GENERAL_ADV_GW_DHCP_RELAY_HANDLING_OPTION_DISCARD"},{value:"forward",label:"SETTINGS_INTERNET_GENERAL_ADV_GW_DHCP_RELAY_HANDLING_OPTION_FORWARD"},{value:"replace",label:"SETTINGS_INTERNET_GENERAL_ADV_GW_DHCP_RELAY_HANDLING_OPTION_REPLACE"}]},b=119,T=128,O=128},519269(e,t,_){_.r(t),_.d(t,{default:()=>ve});var n=_(469733),a=_(296540),l=_(951272),d=_(353507),r=_(742920),s=_(413089),i=_(38671),c=_(335928),E=_(883840),o=_(566723),A=_(329109),m=_(294303),p=_(675359),h=_(302167),u=_(457311),N=_(959207),I=_(233187),b=_(634229),T=_(158160),O=_(602021),D=_(149133),S=_(870443),g=_(945132),R=_(916537),v=_(154843),L=_(546391),C=_(446367),M=_(823084),f=_(349107),P=_(48925),w=_(998386),G=_(641777),y=_(242366),F=_(317672),V=_(349665),H=_(143811),k=_(821580);const W=({disabled:e})=>{const{values:t}=(0,l.j7)();return a.createElement(y.A,null,a.createElement(V.A,null,a.createElement(F.A,{htmlFor:"default_gateway_auto_enabled",tooltip:a.createElement(R.sA,{id:"SETTINGS_NETWORKS_FORM_FIELD_DHCP_GATEWAY_IP_ENABLED_DESCRIPTION"})},a.createElement(R.sA,{id:"SETTINGS_NETWORKS_FORM_FIELD_DHCP_GATEWAY_IP_ENABLED"})),a.createElement(k.A,null,a.createElement(H.A,{type:"realCheckbox",name:"default_gateway_auto_enabled",disabled:e},a.createElement(R.sA,{id:"COMMON_AUTO"})))),t.default_gateway_auto_enabled?null:a.createElement(H.A,{full:!0,name:"default_gateway",variant:"secondary",placeholder:"COMMON_IP_ADDRESS"}))};var B=_(79760),x=_(369596);const K=[{id:"dhcpd_ip",label:a.createElement(R.sA,{id:"SETTINGS_GATEWAY_DHCP_LABEL_SERVER_IP"}),sortable:!1}],U={dhcpd_ip:"SETTINGS_GATEWAY_DHCP_LABEL_SERVER_IP"},$=[{name:"new_dhcpd_ip",placeholder:"SETTINGS_NETWORKS_FORM_FIELD_DHCP_GUARD_SERVER_IP"}],Y=S.A.string().label("SETTINGS_NETWORKS_FORM_FIELD_DHCP_GUARD_SERVER_IP").matches(L.zF,{message:a.createElement(R.sA,{id:"COMMON_VALIDATION_VALID_IPV4"})}),z=S.A.lazy(e=>S.A.object().shape({editActive:S.A.bool(),new_dhcpd_ip:S.A.string().when("editActive",{is:!1,then:Y.required().test("isIpUnique",a.createElement(R.sA,{id:"SETTINGS_DUPLICATE_IP_VALIDATION"}),t=>!e.dhcp_guarding_ips.some(({dhcpd_ip:e})=>e===t))}),dhcp_guarding_ips:S.A.array().when("editActive",{is:!0,then:S.A.array().of(S.A.object().shape({dhcpd_ip:Y.required().test("isIpUnique",a.createElement(R.sA,{id:"SETTINGS_DUPLICATE_IP_VALIDATION"}),t=>e.dhcp_guarding_ips.filter(({dhcpd_ip:e})=>e===t).length<2)}))})})),q=({disabled:e,name:t})=>{const{values:_,setFieldValue:n,errors:d,touched:r,submitCount:s}=(0,l.j7)(),i=(0,a.useMemo)(()=>({editActive:!1,dhcp_guarding_ips:((0,l.O6)(_,t)||[]).map(e=>({id:e,dhcpd_ip:e})),new_dhcpd_ip:""}),[t,_]),c=(0,a.useCallback)(e=>n(t,e),[t,n]),E=(0,a.useCallback)(({new_dhcpd_ip:e,dhcp_guarding_ips:t})=>c([...t.map(({dhcpd_ip:e})=>e),e]),[c]),o=(0,a.useCallback)(({dhcpd_ip:e})=>{c(((0,l.O6)(_,t)||[]).filter(t=>t!==e))},[c,t,_]),A=(0,a.useCallback)(e=>c([...e.map(({dhcpd_ip:e})=>e)]),[c]);return a.createElement(x.A,{fieldName:"dhcp_guarding_ips",columns:K,fieldLabels:U,newFields:$,onAddItem:E,onRemoveItem:o,onEditSubmit:A,initialValues:i,validationSchema:z,invalid:(0,B.t$)(t,d,r,s),max:3,isDisabledOverride:e})},j=({disabled:e})=>{const{values:t}=(0,l.j7)();return a.createElement(y.A,null,a.createElement(k.A,null,a.createElement(H.A,{type:"realCheckbox",name:"dhcp_guarding_enabled",disabled:e,tooltipMessage:a.createElement(R.sA,{id:"SETTINGS_NETWORKS_FORM_FIELD_DHCP_GUARDING_DESCRIPTION"})},a.createElement(R.sA,{id:"COMMON_DHCP_GUARDING"}))),t.dhcp_guarding_enabled?a.createElement(m.A,{flexDirection:"column",width:"100%"},a.createElement(q,{name:"dhcp_guarding_ips",disabled:e})):null)};var Q=_(553432),Z=_(930122);const J=[I.A3.ENABLED,I.A3.RELAY,I.A3.NONE],X=({disabled:e})=>a.createElement(V.A,null,a.createElement(F.A,{htmlFor:"dhcp_mode"},a.createElement(R.sA,{id:"SETTINGS_NETWORKS_FORM_FIELD_DHCP_MODE"})),a.createElement(Q.A,null,J.map(t=>a.createElement(H.A,{type:"radio",name:"dhcp_mode",value:t,key:t,disabled:e},a.createElement(R.sA,{id:Z._[t]}))))),ee=[{id:"dhcp_relay_server",label:a.createElement(R.sA,{id:"SETTINGS_GATEWAY_DHCP_LABEL_SERVER_IP"}),sortable:!1}],te={dhcp_relay_server:"SETTINGS_GATEWAY_DHCP_LABEL_SERVER_IP"},_e=[{name:"new_dhcp_relay_server",placeholder:"SETTINGS_GATEWAY_DHCP_PLACEHOLDER_DHCP_SERVER"}],ne=S.A.string().label("SETTINGS_GATEWAY_DHCP_PLACEHOLDER_DHCP_SERVER").matches(L.zF,{message:a.createElement(R.sA,{id:"COMMON_VALIDATION_VALID_IPV4"})}),ae=S.A.lazy(e=>{const t={arrayFieldName:"dhcp_relay_servers",stringFieldName:"dhcp_relay_server",errorMessage:a.createElement(R.sA,{id:"SETTINGS_GATEWAY_DHCP_PLACEHOLDER_DHCP_SERVER_UNIQUE"})};return S.A.object().shape({editActive:S.A.bool(),new_dhcp_relay_server:ne.isIPUnique({formValues:null,...t}),dhcp_relay_servers:S.A.array().of(S.A.object().shape({dhcp_relay_server:ne.isIPUnique({formValues:e,...t}).required()}))})}),le=e=>e.map((e,t)=>({id:t.toString(),dhcp_relay_server:e})),de=()=>{const{values:e,setFieldValue:t,errors:_,touched:n,submitCount:d}=(0,l.j7)(),r=(0,a.useMemo)(()=>({editActive:!1,dhcp_relay_servers:le(e.dhcp_relay_servers||[]),new_dhcp_relay_server:""}),[e.dhcp_relay_servers]),s=(0,a.useMemo)(()=>le(e.dhcp_relay_servers),[e.dhcp_relay_servers]),i=(0,a.useCallback)(e=>t("dhcp_relay_servers",e),[t]),c=(0,a.useCallback)(({new_dhcp_relay_server:e,dhcp_relay_servers:t})=>{e&&i([...t.map(({dhcp_relay_server:e})=>e),e])},[i]),E=(0,a.useCallback)(({dhcp_relay_server:t})=>{i(e.dhcp_relay_servers.filter(e=>e!==t))},[i,e.dhcp_relay_servers]),o=(0,a.useCallback)(e=>{i([...e.map(({dhcp_relay_server:e})=>e)])},[i]);return a.createElement(V.A,null,a.createElement(F.A,{htmlFor:"dhcp_relay_servers"},a.createElement(R.sA,{id:"SETTINGS_GATEWAY_DHCP_LABEL_SERVER"})),a.createElement(x.A,{fieldName:"dhcp_relay_servers",items:s,columns:ee,fieldLabels:te,newFields:_e,onAddItem:c,onRemoveItem:E,onEditSubmit:o,initialValues:r,validationSchema:ae,invalid:(0,B.If)("dhcp_relay_servers",_,n,d)?a.createElement(R.sA,{id:"SETTINGS_GATEWAY_DHCP_LABEL_SERVER_REQUIRED"}):null,max:5}))};var re=_(847439),se=_(604341);const ie=({disabled:e})=>{const{values:t}=(0,l.j7)();return a.createElement(y.A,null,a.createElement(V.A,null,a.createElement(F.A,{htmlFor:"dns_server_auto_enabled",tooltip:a.createElement(R.sA,{id:"SETTINGS_NETWORKS_FORM_FIELD_DHCP_DNS_SERVER_DESCRIPTION"})},a.createElement(R.sA,{id:"COMMON_DNS_SERVERS",values:{count:1}})),a.createElement(k.A,null,a.createElement(H.A,{type:"realCheckbox",name:"dns_server_auto_enabled",disabled:e},a.createElement(R.sA,{id:"COMMON_AUTO"})))),t.dns_server_auto_enabled?null:(0,re.A)(se.vP,t=>a.createElement(H.A,{full:!0,name:`dns_server_${t+1}`,disabled:e,label:a.createElement(R.sA,{id:"SETTINGS_NETWORKS_FORM_FIELD_DNS_SERVER",values:{number:t+1}}),placeholder:"COMMON_IPV4_ADDRESS",variant:"secondary"})))};var ce=_(975280);const Ee=({disabled:e})=>{const{values:t}=(0,l.j7)();return a.createElement(y.A,null,a.createElement(H.A,{disabled:e,full:!0,type:"text",name:"domain_name",variant:"secondary",label:a.createElement(F.A,{htmlFor:"domain_name",tooltip:a.createElement(R.sA,{id:"SETTINGS_NETWORKS_FORM_FIELD_DOMAIN_NAME_DESCRIPTION"})},a.createElement(R.sA,{id:"COMMON_DOMAIN_NAME"}))}),L.PN.test(t.domain_name)?a.createElement(ce.A,null,a.createElement(R.sA,{id:"COMMON_LOCAL_DNS_RESERVED_FOR_MDNS"})):null)};var oe=_(758649),Ae=_(454195);const me=({disabled:e})=>{const{setFieldValue:t,values:_}=(0,l.j7)();return a.createElement(y.A,null,a.createElement(m.A,{alignItems:"flex-start",gap:o.kc},a.createElement(m.A,{maxWidth:140},a.createElement(H.A,{disabled:e,full:!0,type:"number",name:"dhcp_lease_time",variant:"secondary",label:a.createElement(F.A,{htmlFor:"dhcp_lease_time",tooltip:a.createElement(R.sA,{id:"SETTINGS_NETWORKS_FORM_FIELD_DHCP_LEASE_TIME_DESC"})},a.createElement(R.sA,{id:"SETTINGS_NETWORKS_FORM_FIELD_DHCP_LEASE_TIME"})),contentAfter:a.createElement(R.sA,{id:"COMMON_UNIT_SECONDS_SHORT"})})),_.dhcp_lease_time<=g.KU?a.createElement(m.A,{paddingTop:o.Er},a.createElement(m.A,{height:Ae.b,alignItems:"center"},a.createElement(oe.A,{type:"button",variant:"inline",size:"medium",onClick:()=>{t("dhcp_lease_time",g.CW)}},a.createElement(R.sA,{id:"COMMON_ACTION_RESET"})))):null),_.dhcp_lease_time<=g.KU?a.createElement(ce.A,null,a.createElement(R.sA,{id:"SETTINGS_NETWORKS_FORM_FIELD_DHCP_LEASE_TIME_WARNING"})):null)},pe=({disabled:e})=>{const{values:t}=(0,l.j7)();return a.createElement(y.A,null,a.createElement(k.A,null,a.createElement(H.A,{type:"realCheckbox",name:"network_boot_enabled",disabled:e,tooltipMessage:a.createElement(R.sA,{id:"SETTINGS_NETWORKS_FORM_FIELD_DHCP_BOOT_DESCRIPTION"}),tooltipProps:{isInteractive:!0,portal:!0}},a.createElement(R.sA,{id:"COMMON_NETWORK_BOOT"}))),t.network_boot_enabled?a.createElement(m.A,{gap:o.kc,alignItems:"flex-start"},a.createElement(H.A,{full:!0,name:"network_boot_server",label:"COMMON_SERVER_IP",variant:"secondary"}),a.createElement(H.A,{full:!0,name:"network_boot_filename",label:"COMMON_FILENAME",variant:"secondary"})):null)};var he=_(701683);const ue=({disabled:e})=>{const{values:t}=(0,l.j7)();return a.createElement(y.A,null,a.createElement(k.A,null,a.createElement(H.A,{type:"realCheckbox",name:"ntp_server_enabled",disabled:e,tooltipMessage:a.createElement(R.sA,{id:"SETTINGS_NETWORKS_FORM_FIELD_DHCP_NTP_SERVER_DESCRIPTION"})},a.createElement(R.sA,{id:"COMMON_NTP_SERVER"}))),t.ntp_server_enabled?a.createElement(m.A,{alignItems:"flex-start",gap:o.kc},(0,re.A)(he.$k,t=>a.createElement(H.A,{full:!0,name:`ntp_server_${t+1}`,label:"SETTINGS_NETWORKS_FORM_FIELD_DHCP_NTP_SERVER_ITEM",labelValues:{number:t+1},placeholder:"COMMON_IPV4_ADDRESS",variant:"secondary",disabled:e}))):null)},Ne=({disabled:e})=>{const{values:t}=(0,l.j7)();return a.createElement(y.A,null,a.createElement(k.A,null,a.createElement(H.A,{type:"realCheckbox",name:"option_43_enabled",disabled:e,tooltipMessage:a.createElement(R.sA,{id:"SETTINGS_NETWORKS_FORM_FIELD_DHCP_UNIFI_CTRL_DESCRIPTION"})},a.createElement(R.sA,{id:"SETTINGS_NETWORKS_FORM_FIELD_DHCP_UNIFI_CTRL"}))),t.option_43_enabled?a.createElement(H.A,{full:!0,name:"option_43_value",placeholder:"COMMON_IP_ADDRESS",variant:"secondary",disabled:e}):null)};var Ie=_(765562);const be=({disabled:e})=>a.createElement(k.A,null,a.createElement(H.A,{type:"realCheckbox",name:"ping_conflict_detection_enabled",disabled:e,tooltipMessage:a.createElement(R.sA,{id:"SETTINGS_NETWORKS_FORM_FIELD_DHCP_CONFLICT_CHECKING_DESCRIPTION",values:{link:a.createElement(f.A,{href:Ie.A.dhcpOptionsArticle,id:"COMMON_LEARN_MORE",noWrap:!0})}}),tooltipProps:{isInteractive:!0,portal:!0}},a.createElement(R.sA,{id:"COMMON_PING_CONFLICT_DETECTION"}))),Te=({disabled:e})=>a.createElement(V.A,null,a.createElement(m.A,{width:"100%",gap:o.kc},a.createElement(H.A,{type:"input",variant:"secondary",name:"dhcp_range_start",label:"SETTINGS_RANGE_START",placeholder:"COMMON_IPV4_ADDRESS",disabled:e}),a.createElement(H.A,{type:"input",variant:"secondary",name:"dhcp_range_stop",label:"SETTINGS_RANGE_STOP",placeholder:"COMMON_IPV4_ADDRESS",disabled:e}))),Oe=({disabled:e})=>{const{values:t}=(0,l.j7)();return a.createElement(y.A,null,a.createElement(k.A,null,a.createElement(H.A,{type:"realCheckbox",name:"tftp_server_enabled",disabled:e,tooltipMessage:a.createElement(R.sA,{id:"SETTINGS_NETWORKS_FORM_FIELD_DHCP_TFTP_SERVER_DESCRIPTION"})},a.createElement(R.sA,{id:"COMMON_TFTP_SERVER"}))),t.tftp_server_enabled?a.createElement(H.A,{full:!0,name:"tftp_server",placeholder:"COMMON_TFTP_SERVER",variant:"secondary",disabled:e}):null)},De=({disabled:e})=>{const{values:t}=(0,l.j7)();return a.createElement(y.A,null,a.createElement(k.A,null,a.createElement(H.A,{type:"realCheckbox",name:"time_offset_enabled",disabled:e,tooltipMessage:a.createElement(R.sA,{id:"SETTINGS_NETWORKS_FORM_FIELD_DHCP_TIME_OFFSET_ENABLED_DESCRIPTION"})},a.createElement(R.sA,{id:"COMMON_TIME_OFFSET"}))),t.time_offset_enabled?a.createElement(m.A,{width:140},a.createElement(H.A,{full:!0,name:"time_offset",variant:"secondary",type:"number",contentAfter:a.createElement(R.sA,{id:"COMMON_UNIT_SECONDS_SHORT"}),min:-g.CW,max:g.CW,disabled:e})):null)},Se=({disabled:e})=>{const{values:t}=(0,l.j7)();return a.createElement(y.A,null,a.createElement(k.A,null,a.createElement(H.A,{type:"realCheckbox",name:"wins_server_enabled",disabled:e,tooltipMessage:a.createElement(R.sA,{id:"SETTINGS_NETWORKS_FORM_FIELD_DHCP_WINS_SERVER_DESCRIPTION"})},a.createElement(R.sA,{id:"COMMON_WINS_SERVER"}))),t.wins_server_enabled?a.createElement(m.A,{alignItems:"flex-start",width:"100%",gap:o.kc},a.createElement(H.A,{full:!0,name:"wins_server_1",label:"COMMON_WINS_SERVER_N",labelValues:{n:1},variant:"secondary"}),a.createElement(H.A,{full:!0,name:"wins_server_2",label:"COMMON_WINS_SERVER_N",labelValues:{n:2},variant:"secondary"})):null)},ge=({disabled:e})=>{const{values:t}=(0,l.j7)();return a.createElement(y.A,null,a.createElement(k.A,null,a.createElement(H.A,{type:"realCheckbox",name:"wpad_url_enabled",disabled:e,tooltipMessage:a.createElement(R.sA,{id:"SETTINGS_NETWORKS_FORM_FIELD_DHCP_WPAD_URL_DESCRIPTION"})},a.createElement(R.sA,{id:"COMMON_WPAD_URL"}))),t.wpad_url_enabled?a.createElement(H.A,{full:!0,name:"wpad_url",variant:"secondary",placeholder:"COMMON_URL",disabled:e}):null)},Re=({disabled:e,network:t})=>{const{values:_}=(0,l.j7)(),n=_.dhcp_mode===I.A3.ENABLED&&!(0,N.uH)(t)&&!(0,N.sp)(t),d=(0,N.$q)(t),r=(0,C.A)(t);return a.createElement(G.A,{isDisabled:r||e},a.createElement(P.A,null,r?a.createElement(M.A,null,a.createElement(m.A,{flexDirection:"column"},a.createElement(R.sA,{id:"COMMON_MANAGED_BY_FABRIC",values:{feature:a.createElement(R.sA,{id:"COMMON_NETWORK"})}}),a.createElement(f.A,{id:"COMMON_VIEW_IN_SITE_MANAGER",href:(0,w.v)(t.cloud_template)}))):null,a.createElement(X,{disabled:e}),_.dhcp_mode===I.A3.RELAY?a.createElement(de,null):null,_.dhcp_mode===I.A3.ENABLED?a.createElement(Te,{disabled:e}):null,(0,N.uH)(t)?null:a.createElement(j,{disabled:e}),n?a.createElement(W,{disabled:e}):null,n?a.createElement(ie,{disabled:e}):null,n?a.createElement(me,{disabled:e}):null,n?a.createElement(Ee,{disabled:e}):null,n&&!d?a.createElement(be,{disabled:e}):null,n&&!d?a.createElement(pe,{disabled:e}):null,n&&!d?a.createElement(ue,{disabled:e}):null,n&&!d?a.createElement(Ne,{disabled:e}):null,n&&!d?a.createElement(Oe,{disabled:e}):null,n&&!d?a.createElement(De,{disabled:e}):null,n&&!d?a.createElement(ge,{disabled:e}):null,n&&!d?a.createElement(Se,{disabled:e}):null))},ve=({activeItem:e})=>{const t=(0,n.useDispatch)(),_=(0,n.useSelector)(O.EL),C=(0,n.useSelector)(h.Yk),M=(0,n.useSelector)(h.oP),f=(0,n.useSelector)(T._),P=(0,a.useMemo)(()=>({dhcp_mode:(0,N.kS)(e),dhcp_guarding_enabled:e.dhcpguard_enabled||!1,dhcp_guarding_ips:[e.dhcpd_ip_1,e.dhcpd_ip_2,e.dhcpd_ip_3].filter(s.z),dhcp_range_start:e.dhcpd_start||"",dhcp_range_stop:e.dhcpd_stop||"",default_gateway_auto_enabled:!e.dhcpd_gateway_enabled,default_gateway:e.dhcpd_gateway||"",dns_server_auto_enabled:!e.dhcpd_dns_enabled,dns_server_1:e.dhcpd_dns_1||"",dns_server_2:e.dhcpd_dns_2||"",dns_server_3:e.dhcpd_dns_3||"",dns_server_4:e.dhcpd_dns_4||"",dhcp_lease_time:e.dhcpd_leasetime||f.dhcpd_leasetime||0,domain_name:e.domain_name||f.domain_name||"",ping_conflict_detection_enabled:e.dhcpd_conflict_checking||!1,network_boot_enabled:e.dhcpd_boot_enabled||!1,network_boot_filename:e.dhcpd_boot_filename||"",network_boot_server:e.dhcpd_boot_server||"",ntp_server_enabled:e.dhcpd_ntp_enabled||!1,ntp_server_1:e.dhcpd_ntp_1||"",ntp_server_2:e.dhcpd_ntp_2||"",option_43_enabled:!!e.dhcpd_unifi_controller,option_43_value:e.dhcpd_unifi_controller||"",tftp_server_enabled:!!e.dhcpd_tftp_server,tftp_server:e.dhcpd_tftp_server||"",time_offset_enabled:e.dhcpd_time_offset_enabled||f.dhcpd_time_offset_enabled||!1,time_offset:e.dhcpd_time_offset||0,wpad_url_enabled:!!e.dhcpd_wpad_url,wpad_url:e.dhcpd_wpad_url||"",wins_server_enabled:e.dhcpd_wins_enabled||!1,wins_server_1:e.dhcpd_wins_1||"",wins_server_2:e.dhcpd_wins_2||"",dhcp_relay_servers:(0,d.Os)(M,"dhcp_relay_server_")}),[f.dhcpd_leasetime,f.dhcpd_time_offset_enabled,f.domain_name,e,M]),w=(0,a.useCallback)(async(_,{setSubmitting:n,resetForm:a})=>{n(!0);const{dhcpd_ip_1:l,dhcpd_ip_2:s,dhcpd_ip_3:c,...o}=e,A={...o,setting_preference:E.C.MANUAL,dhcpd_enabled:_.dhcp_mode===I.A3.ENABLED,dhcp_relay_enabled:_.dhcp_mode===I.A3.RELAY,dhcpd_start:_.dhcp_mode===I.A3.ENABLED?_.dhcp_range_start:o.dhcpd_start,dhcpd_stop:_.dhcp_mode===I.A3.ENABLED?_.dhcp_range_stop:o.dhcpd_stop,dhcpguard_enabled:_.dhcp_guarding_enabled,dhcpd_ip_1:_.dhcp_guarding_enabled?_.dhcp_guarding_ips[0]:l,dhcpd_ip_2:_.dhcp_guarding_enabled?_.dhcp_guarding_ips[1]:s,dhcpd_ip_3:_.dhcp_guarding_enabled?_.dhcp_guarding_ips[2]:c,dhcpd_gateway_enabled:_.dhcp_mode===I.A3.ENABLED&&!_.default_gateway_auto_enabled,dhcpd_gateway:_.dhcp_mode===I.A3.ENABLED?_.default_gateway:o.dhcpd_gateway,dhcpd_dns_enabled:_.dhcp_mode===I.A3.ENABLED&&!_.dns_server_auto_enabled,dhcpd_dns_1:_.dns_server_auto_enabled||_.dhcp_mode!==I.A3.ENABLED?o.dhcpd_dns_1:_.dns_server_1,dhcpd_dns_2:_.dns_server_auto_enabled||_.dhcp_mode!==I.A3.ENABLED?o.dhcpd_dns_2:_.dns_server_2,dhcpd_dns_3:_.dns_server_auto_enabled||_.dhcp_mode!==I.A3.ENABLED?o.dhcpd_dns_3:_.dns_server_3,dhcpd_dns_4:_.dns_server_auto_enabled||_.dhcp_mode!==I.A3.ENABLED?o.dhcpd_dns_4:_.dns_server_4,dhcpd_leasetime:_.dhcp_mode===I.A3.ENABLED?_.dhcp_lease_time:o.dhcpd_leasetime,domain_name:_.dhcp_mode===I.A3.ENABLED?_.domain_name:o.domain_name,dhcpd_conflict_checking:_.dhcp_mode===I.A3.ENABLED&&!(0,N.$q)(e)&&_.ping_conflict_detection_enabled,dhcpd_boot_enabled:_.dhcp_mode===I.A3.ENABLED&&!(0,N.$q)(e)&&_.network_boot_enabled,dhcpd_boot_filename:_.dhcp_mode===I.A3.ENABLED&&!(0,N.$q)(e)&&_.network_boot_enabled?_.network_boot_filename:o.dhcpd_boot_filename,dhcpd_boot_server:_.dhcp_mode===I.A3.ENABLED&&!(0,N.$q)(e)&&_.network_boot_enabled?_.network_boot_server:o.dhcpd_boot_server,dhcpd_ntp_enabled:_.dhcp_mode===I.A3.ENABLED&&_.ntp_server_enabled,dhcpd_ntp_1:_.dhcp_mode===I.A3.ENABLED&&_.ntp_server_enabled?_.ntp_server_1:o.dhcpd_ntp_1,dhcpd_ntp_2:_.dhcp_mode===I.A3.ENABLED&&_.ntp_server_enabled?_.ntp_server_2:o.dhcpd_ntp_2,dhcpd_unifi_controller:_.dhcp_mode===I.A3.ENABLED&&_.option_43_enabled?_.option_43_value:"",dhcpd_tftp_server:_.dhcp_mode===I.A3.ENABLED&&_.tftp_server_enabled?_.tftp_server:"",dhcpd_time_offset_enabled:_.dhcp_mode===I.A3.ENABLED&&_.time_offset_enabled,dhcpd_time_offset:_.dhcp_mode===I.A3.ENABLED&&_.time_offset_enabled?_.time_offset:o.dhcpd_time_offset,dhcpd_wpad_url:_.dhcp_mode===I.A3.ENABLED&&_.wpad_url_enabled?_.wpad_url:"",dhcpd_wins_enabled:_.dhcp_mode===I.A3.ENABLED&&_.wins_server_enabled,dhcpd_wins_1:_.dhcp_mode===I.A3.ENABLED&&_.wins_server_enabled?_.wins_server_1:o.dhcpd_wins_1,dhcpd_wins_2:_.dhcp_mode===I.A3.ENABLED&&_.wins_server_enabled?_.wins_server_2:o.dhcpd_wins_2};if(_.dhcp_mode===I.A3.RELAY){const e=(0,d.W0)(_.dhcp_relay_servers,"dhcp_relay_server_",(0,d.Gm)(M,"dhcp_relay_server_"));await t((0,u.fU)({...(0,d.dq)(M,"dhcp_relay_servers"),...e}))}return t((0,b.ux)(A,void 0,{})).then(()=>t((0,b.Sk)())).then(()=>a()).catch(e=>{const _=(0,i.F)(e)?e:void 0;t((0,p.ox)({errorMessage:_?.msg,errorValues:_,icon:r.C.danger,message:"SETTINGS_GATEWAY_DHCP_SAVE_ERROR"}))}).finally(()=>n(!1))},[t,e,M]),G=(0,a.useMemo)(()=>((e,t)=>S.A.object().shape({dhcp_mode:S.A.string().oneOf(Object.values(I.A3)).required(),dhcp_guarding_enabled:S.A.boolean(),dhcp_guarding_ips:S.A.array().when("dhcp_guarding_enabled",{is:!0,then:S.A.array().required(a.createElement(R.sA,{id:"SETTINGS_GATEWAY_DHCP_LABEL_SERVER_REQUIRED"})).min(1,a.createElement(R.sA,{id:"SETTINGS_GATEWAY_DHCP_LABEL_SERVER_REQUIRED"}))}),dhcp_range_start:S.A.string().when("dhcp_mode",{is:I.A3.ENABLED,then:S.A.string().matches(L.zF,{message:a.createElement(R.sA,{id:"SETTINGS_IP_INVALID"})}).label("SETTINGS_NETWORKS_CREATE_FIELD_LABEL_DHCP_RANGE_START").required().test("isIpInNetworkSubnet",a.createElement(R.sA,{id:"SETTINGS_NETWORK_DHCP_GATEWAY_IN_IP_SUBNET_SAME_AS_NETWORK",values:{subnet:e.ip_subnet}}),t=>e.ip_subnet&&t&&(0,D.xc)(e.ip_subnet,t)).test("isNotNetworkAddress",a.createElement(R.sA,{id:"COMMON_VALIDATION_VALID_IP_SUBNET"}),t=>(0,D.HP)(e.ip_subnet)!==t).test("isNotHoneypotIp",a.createElement(R.sA,{id:"COMMON_VALIDATION_FIELD_HONEYPOT_IP"}),e=>!t.includes(e))}),dhcp_range_stop:S.A.string().when("dhcp_mode",{is:I.A3.ENABLED,then:S.A.string().matches(L.zF,{message:a.createElement(R.sA,{id:"SETTINGS_IP_INVALID"})}).label("COMMON_STOP").required().test("isIpInNetworkSubnet",a.createElement(R.sA,{id:"SETTINGS_NETWORK_DHCP_GATEWAY_IN_IP_SUBNET_SAME_AS_NETWORK",values:{subnet:e.ip_subnet}}),t=>e.ip_subnet&&t&&(0,D.xc)(e.ip_subnet,t)).test("isNotBroadcastAddress",a.createElement(R.sA,{id:"COMMON_VALIDATION_VALID_IP_SUBNET"}),t=>(0,D.GV)(e.ip_subnet)!==t).test("isNotHoneypotIp",a.createElement(R.sA,{id:"COMMON_VALIDATION_FIELD_HONEYPOT_IP"}),e=>!t.includes(e)).test("isGreaterThanStartIp",a.createElement(R.sA,{id:"SETTINGS_NETWORK_DHCP_RANGE_NOT_ORDERED_VALIDATION"}),(t,_)=>{if(!t||!_.parent?.dhcp_range_start)return!0;const n=_.parent.dhcp_range_start;return 30===(0,D.Vy)(e.ip_subnet)?(0,D.GQ)(t)>=(0,D.GQ)(n):(0,D.GQ)(t)>(0,D.GQ)(n)})}),default_gateway_auto_enabled:S.A.boolean(),default_gateway:S.A.string().when(["dhcp_mode","default_gateway_auto_enabled"],{is:(e,t)=>e===I.A3.ENABLED&&!t,then:S.A.string().label("SETTINGS_NETWORK_LABEL_DHCP_GATEWAY_INPUT").required(a.createElement(R.sA,{id:"COMMON_VALIDATION_VALID_IPV4"})).matches(L.zF,{message:a.createElement(R.sA,{id:"COMMON_VALIDATION_VALID_IPV4"})}).test("isIpInNetworkSubnet",a.createElement(R.sA,{id:"SETTINGS_NETWORK_DHCP_GATEWAY_IN_IP_SUBNET_SAME_AS_NETWORK",values:{subnet:e.ip_subnet}}),t=>e.ip_subnet&&t&&(0,D.xc)(e.ip_subnet,t))}),dns_server_auto_enabled:S.A.bool(),dns_server_1:S.A.string().when(["dhcp_mode","dns_server_auto_enabled"],{is:(e,t)=>e===I.A3.ENABLED&&!t,then:S.A.string().matches(L.zF,{message:a.createElement(R.sA,{id:"COMMON_VALIDATION_VALID_IPV4"})}).required(a.createElement(R.sA,{id:"SETTINGS_NETWORKS_FORM_FIELD_DHCP_DNS_SERVER_VALIDATION"}))}),dns_server_2:S.A.string().when(["dhcp_mode","dns_server_auto_enabled"],{is:(e,t)=>e===I.A3.ENABLED&&!t,then:S.A.string().matches(L.zF,{message:a.createElement(R.sA,{id:"COMMON_VALIDATION_VALID_IPV4"})})}),dns_server_3:S.A.string().when(["dhcp_mode","dns_server_auto_enabled"],{is:(e,t)=>e===I.A3.ENABLED&&!t,then:S.A.string().matches(L.zF,{message:a.createElement(R.sA,{id:"COMMON_VALIDATION_VALID_IPV4"})})}),dns_server_4:S.A.string().when(["dhcp_mode","dns_server_auto_enabled"],{is:(e,t)=>e===I.A3.ENABLED&&!t,then:S.A.string().matches(L.zF,{message:a.createElement(R.sA,{id:"COMMON_VALIDATION_VALID_IPV4"})})}),dhcp_lease_time:S.A.number().when(["dhcp_mode"],{is:e=>e===I.A3.ENABLED,then:S.A.number().label("SETTINGS_NETWORKS_CREATE_FIELD_TITLE_DHCP_LEASETIME").required().max(v.I).min(v.E)}),domain_name:S.A.string().when("dhcp_mode",{is:I.A3.ENABLED,then:S.A.string().matches(L.RE,{message:a.createElement(R.sA,{id:"COMMON_DOMAIN_VALIDATION"})})}),network_boot_enabled:S.A.bool(),network_boot_server:S.A.string().when(["dhcp_mode","network_boot_enabled"],{is:(e,t)=>e===I.A3.ENABLED&&t,then:S.A.string().required(a.createElement(R.sA,{id:"COMMON_VALIDATION_FIELD_REQUIRED"})).matches(L.zF,{message:a.createElement(R.sA,{id:"SETTINGS_IP_INVALID"})})}),network_boot_filename:S.A.string().when(["dhcp_mode","network_boot_enabled"],{is:(e,t)=>e===I.A3.ENABLED&&t,then:S.A.string().required(a.createElement(R.sA,{id:"COMMON_VALIDATION_FIELD_REQUIRED"}))}),ntp_server_enabled:S.A.boolean(),ntp_server_1:S.A.string().when(["dhcp_mode","ntp_server_enabled"],{is:(e,t)=>e===I.A3.ENABLED&&t,then:S.A.string().matches(L.zF,{message:a.createElement(R.sA,{id:"SETTINGS_NETWORKS_DHCP_UNIFI_CONTROLLER_INVALID"})}).required(a.createElement(R.sA,{id:"SETTINGS_NETWORKS_FORM_FIELD_DHCP_NTP_SERVER_VALIDATION"}))}),ntp_server_2:S.A.string().when(["dhcp_mode","ntp_server_enabled"],{is:(e,t)=>e===I.A3.ENABLED&&t,then:S.A.string().matches(L.zF,{message:a.createElement(R.sA,{id:"SETTINGS_NETWORKS_DHCP_UNIFI_CONTROLLER_INVALID"})})}),option_43_enabled:S.A.bool(),option_43_value:S.A.string().when(["dhcp_mode","option_43_enabled"],{is:(e,t)=>e===I.A3.ENABLED&&t,then:S.A.string().label("SETTINGS_NETWORKS_FORM_FIELD_DHCP_UNIFI_CTRL").matches(L.zF,{message:a.createElement(R.sA,{id:"SETTINGS_NETWORKS_DHCP_UNIFI_CONTROLLER_INVALID"})}).required()}),tftp_server_enabled:S.A.bool(),tftp_server:S.A.string().when(["dhcp_mode","tftp_server_enabled"],{is:(e,t)=>e===I.A3.ENABLED&&t,then:S.A.string().label("COMMON_TFTP_SERVER").required().matches((0,L.nD)(L.zF,L.Ug),{message:a.createElement(R.sA,{id:"COMMON_VALIDATION_VALID_IP_HOSTNAME"})})}),time_offset_enabled:S.A.bool(),time_offset:S.A.number().when(["dhcp_mode","time_offset_enabled"],{is:(e,t)=>e===I.A3.ENABLED&&t,then:S.A.number().label("COMMON_TIME_OFFSET").required(a.createElement(R.sA,{id:"COMMON_VALIDATION_FIELD_REQUIRED"})).max(g.CW).min(-g.CW)}),wpad_url_enabled:S.A.bool(),wpad_url:S.A.string().when(["dhcp_mode","wpad_url_enabled"],{is:(e,t)=>e===I.A3.ENABLED&&t,then:S.A.string().required(a.createElement(R.sA,{id:"SETTINGS_NETWORKS_DHCP_WPAD_URL_INVALID"})).matches(L.k,{message:a.createElement(R.sA,{id:"SETTINGS_NETWORKS_DHCP_WPAD_URL_INVALID"})})}),wins_server_enabled:S.A.boolean(),wins_server_1:S.A.string().when(["dhcp_mode","wins_server_enabled"],{is:(e,t)=>e===I.A3.ENABLED&&t,then:S.A.string().required(a.createElement(R.sA,{id:"COMMON_VALIDATION_EMPTY",values:{name:a.createElement(R.sA,{id:"COMMON_WINS_SERVER_N",values:{n:1}})}})).matches(L.zF,{message:a.createElement(R.sA,{id:"COMMON_VALIDATION_VALID_IPV4"})})}),wins_server_2:S.A.string().when(["dhcp_mode","wins_server_enabled"],{is:(e,t)=>e===I.A3.ENABLED&&t,then:S.A.string().matches(L.zF,{message:a.createElement(R.sA,{id:"COMMON_VALIDATION_VALID_IPV4"})})})}))(e,C),[C,e]);return a.createElement(l.l1,{initialValues:P,onSubmit:w,enableReinitialize:!0,validationSchema:G,key:e?._id},({dirty:t,resetForm:n,submitForm:l})=>a.createElement("form",{onSubmit:l,style:{height:"100%"}},a.createElement(c.A,null),a.createElement(m.A,{flexDirection:"column",gap:o.Ln},a.createElement(Re,{network:e,disabled:_})),a.createElement(A.A,{onFormCancel:n,isDirty:t,onFormSubmit:l,hideCancelButton:!t})))}},280258(e,t,_){_.d(t,{H:()=>n});const n=""},596441(e,t,_){_.d(t,{I:()=>n});const n={HEADER_HEIGHT:32,ROW_HEIGHT:32,EDIT_FIELD_HEIGHT:36,getHeight(e,t,_,n){return Math.min((n||this.ROW_HEIGHT)*e+(_??this.HEADER_HEIGHT),(n||this.ROW_HEIGHT)*t+(_??this.HEADER_HEIGHT))},getEditContainerHeight(e,t,_){return Math.min((_||this.EDIT_FIELD_HEIGHT)*e,(_||this.EDIT_FIELD_HEIGHT)*t)}}},641777(e,t,_){_.d(t,{A:()=>d});var n=_(296540),a=_(284428),l=_(451449);const d=({isDisabled:e,isAdditive:t=!0,children:_})=>{const d=(0,a.pv)(),r=(0,n.useMemo)(()=>"boolean"==typeof e?{fields:e,labels:e,tooltipIcons:e,tooltipPopovers:!1}:e,[e]),s=(0,n.useMemo)(()=>({fields:t?r.fields||d.fields:r.fields,labels:t?r.labels||d.labels:r.labels,tooltipIcons:t?r.tooltipIcons||d.tooltipIcons:r.tooltipIcons,tooltipPopovers:t?r.tooltipPopovers||d.tooltipPopovers:r.tooltipPopovers}),[t,r.fields,r.labels,r.tooltipIcons,r.tooltipPopovers,d.fields,d.labels,d.tooltipIcons,d.tooltipPopovers]);return n.createElement(l.I.Provider,{value:s},_)}},413089(e,t,_){function n(e){return Boolean(e)}_.d(t,{z:()=>n})},362412(e,t,_){_.d(t,{A:()=>E});var n=_(296540),a=_(469733),l=_(436331),d=_(805837),r=_(282556),s=_(71265);const i=e=>n.createElement(l.A,{renderOption:d.q,...e}),c=e=>n.createElement(i,{...e});c.Sorted=e=>{const t=(0,a.useSelector)(r.zi),_=(0,n.useMemo)(()=>(0,s.k)(t),[t]);return n.createElement(i,{...e,sortBy:_})};const E=c},71265(e,t,_){_.d(t,{R:()=>E,k:()=>o});var n=_(280258),a=_(190497),l=_(953048),d=_(175522),r=_(936621),s=_(742525);const i=[...new Set([n.H,d.Q.join(d.A),l.Zt,r.F,a.nc,s.Vr])],c={numeric:!0,sensitivity:"base"},E=(e,t)=>{const _=[];for(let n=e;n<=t;n+=1)_.push({value:n,label:String(n)});return _},o=e=>({value:t,label:_},{value:n,label:a})=>i.includes(t?.toString())||i.includes(n?.toString())?1/0:_?.toString().localeCompare(a?.toString(),e,c)??-1}}]);