"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[25885],{21508(e,t,n){n.d(t,{Y:()=>a});const a=(e,t,n)=>t&&e.mac===n},200826(e,t,n){n.d(t,{A:()=>E});var a=n(296540),r=n(469733),i=n(429252),o=n.n(i),l=n(198494),s=n(415246),_=n(742525),c=n(789768),d=n(249304);const m=Object.keys(d.l).reduce((e,t)=>(e[t]=!1,e),{}),E=e=>((e=>{const t=(0,r.useDispatch)(),n=(0,r.useSelector)(l.Bm);(0,a.useEffect)(()=>{if(!m[e]){m[e]=!0;const a=_.W2[s.xz.TABLES][e],r=n[e]||{},i=a?.initialColumnSnapshot;if(i){const n={...r?.initialColumnSnapshot},a=[...r.initialColumns||[]];if(Object.keys(n).length)Object.entries(i).forEach(([e,t])=>{e in n||(n[e]=t)}),Object.entries(n).forEach(([e,t])=>{!a.includes(e)&&t&&a.push(e)}),o()(a,r.initialColumns)||t((0,c.yT)(e,{initialColumns:Array.from(new Set([...a,...r.initialColumns])),initialColumnSnapshot:n}));else if(a.length){const n=a.reduce((e,t)=>(e[t]=!0,e),{});t((0,c.yT)(e,{initialColumnSnapshot:n,initialColumns:Object.keys(n)}))}}}},[t,e,n])})(e),(0,r.useSelector)((0,a.useMemo)(()=>(0,l.h)(e),[e])))},236103(e,t,n){n.d(t,{Ut:()=>c,Kb:()=>d});var a=n(801081),r=n(25553),i=n(87485),o=n(366188),l=n(215454),s=n(551698);const _=(0,r.uh)((0,s.s)()),c=(0,a.Mz)(_,i.kh),d=(0,a.Mz)(c,o.Ct,(e,t)=>e.flatMap(e=>{const n=e.devices.flatMap(e=>e.sites.flatMap(e=>e.networks));return[{subnet:e.tunnelSubnet,networkName:e.name},...n.map(({subnet:e,networkName:n,networkId:a})=>{const r=t.find(({_id:e})=>e===a);return{subnet:r?.ip_subnet||e,networkName:r?.name||n,networkId:a}})]}));(0,a.Mz)(c,l.PO,(e,t)=>e.flatMap(e=>{const n=((e,t)=>(e||[]).filter(e=>(e.sites||[]).some(({deviceId:e})=>e===t)))(e.connections,t)||[];return n.map(e=>((e,t)=>({remoteSiteConnection:(e.sites||[]).find(({deviceId:e})=>e!==t),localSiteConnection:(e.sites||[]).find(({deviceId:e})=>e===t)}))(e,t)?.localSiteConnection?.tunnelIp).filter(Boolean)}))},54789(e,t,n){n.d(t,{LG:()=>a,cP:()=>r,dr:()=>l,v9:()=>i,xp:()=>o,zT:()=>s});const a="any",r=28800,i=3600,o=14,l=1194,s=30},317097(e,t,n){var a,r,i,o;n.d(t,{Dx:()=>r,a9:()=>o,nP:()=>i,sj:()=>a}),function(e){e.NORMAL="normal",e.NSSA="nssa",e.STUB="stub"}(a||(a={})),function(e){e.OFF="off",e.PLAIN_TEXT="plain_text",e.MD5="md5"}(r||(r={})),function(e){e.BROADCAST="broadcast",e.POINT_TO_POINT="point_to_point"}(i||(i={})),function(e){e.E1="e1",e.E2="e2"}(o||(o={}))},742989(e,t,n){n.d(t,{Hv:()=>l,IM:()=>_,Xk:()=>d,eR:()=>o,k8:()=>c,lL:()=>s});var a=n(149133),r=n(959207),i=n(317097);const o={[i.sj.NORMAL]:"SETTINGS_ROUTING_OSPF_FORM_AREAS_AREA_TYPE_NORMAL",[i.sj.NSSA]:"SETTINGS_ROUTING_OSPF_FORM_AREAS_AREA_TYPE_NSSA",[i.sj.STUB]:"SETTINGS_ROUTING_OSPF_FORM_AREAS_AREA_TYPE_STUB"},l={[i.nP.BROADCAST]:"COMMON_STATUS_BROADCAST",[i.nP.POINT_TO_POINT]:"SETTINGS_ROUTING_OSPF_NETWORK_TYPE_POINT_TO_POINT"},s={[i.Dx.OFF]:"COMMON_NONE",[i.Dx.MD5]:"SETTINGS_ROUTING_OSPF_AUTHENTICATION_TYPE_MD5",[i.Dx.PLAIN_TEXT]:"SETTINGS_ROUTING_OSPF_AUTHENTICATION_TYPE_PLAIN_TEXT"},_={[i.a9.E1]:"SETTINGS_ROUTING_OSPF_METRIC_TYPE_E1",[i.a9.E2]:"SETTINGS_ROUTING_OSPF_METRIC_TYPE_E2"},c=e=>{if(e)return(0,r.jp)(e)&&(0,r.dZ)(e)&&e.wan_ip?(0,a.AO)(e.wan_ip,e.wan_netmask):(0,r.mC)(e)},d=e=>(0,r.Qg)(e)||(0,r.MY)(e)||(0,r.u0)(e)?i.nP.POINT_TO_POINT:i.nP.BROADCAST},841564(e,t,n){n.d(t,{U:()=>s});var a=n(801081),r=n(25553),i=n(87485),o=n(837133);const l=(0,r.uh)((0,o.G)()),s=(0,a.Mz)(l,i.kh)},175522(e,t,n){n.d(t,{A:()=>r,Q:()=>i});var a=n(416348);const r="_",i=[a.ZM,a.Je]},55386(e,t,n){n.d(t,{A:()=>E,j:()=>u});var a=n(801081),r=n(149133),i=n(242723),o=n(841564),l=n(959207),s=n(233187),_=n(366188),c=n(633748),d=n(236103),m=n(532419);const E=(0,a.Mz)(_.Ct,o.U,m.fq,(e,t,n)=>e.filter(e=>e.purpose===s.rR.SITE_VPN&&!(0,l.$p)(e)).map(a=>{const o=t.find(({network_id:e})=>e===a._id),_=(0,i.jI)(a),d=(0,i.kx)(a,n),m=(0,i.T$)(a),E=(0,i.at)(a),u=(0,i.nn)(a),A=e.find(({ip_subnet:e})=>(0,r.xX)(e,d));return{_id:a._id,name:a.name,vpn_type:a.vpn_type,protocol:_,local_port:E,ip:d,remote_ip:m,enabled:a.enabled,site:a.remote_site_id,uptime:o?.assoc_time,network_group:a.vpn_type===s.iq.OPEN_VPN?a.openvpn_interface:a.ipsec_interface,isPolicyBased:(0,l.tD)(a),status:(0,i.Qj)(a,o),tunnel_ip:u,localInterface:A?.name||a[c.j[a.vpn_type]],remote_networks:a.remote_vpn_subnets,isMagicS2S:!1,network:a}})),u=(0,a.Mz)(d.Ut,e=>!!e?.length)},465543(e,t,n){n.d(t,{w:()=>o});var a=n(296540),r=n(469733),i=n(845030);const o=e=>{const t=(0,r.useDispatch)();(0,a.useEffect)(()=>{t((0,i.SQ)(e))},[t,e])}},853801(e,t,n){n.d(t,{y:()=>i});var a=n(349785),r=n(465543);const i=e=>{const t=(0,a.lN)(e);return(0,r.w)(t.isDirty)}},263130(e,t,n){n.d(t,{A:()=>d});var a=n(822336),r=n(296540),i=n(217439),o=n(71479),l=n(382389),s=n(566723),_=n(294303);const c=(0,o.A)(i.A)`
  line-height: 20px;
`,d=({icon:e,description:t,action:n,footer:i,background:o,...d})=>{const{themeName:m}=(0,l.u)();return r.createElement(_.A,{flexGrow:1,borderRadius:s.YC,padding:s.kc,background:o||a.Ay[`desktop-color-neutral-01-${m}`],gap:s.kc,flexDirection:"column",...d},r.createElement(_.A,{flexGrow:1,gap:s.kc},e,t?r.createElement(c,{size:"medium"},t):null,n?r.createElement(_.A,{marginLeft:"auto"},r.createElement(c,{size:"medium"},n)):null),i)}},823084(e,t,n){n.d(t,{A:()=>s});var a=n(822336),r=n(296540),i=n(162420),o=n(382389),l=n(263130);const s=({children:e,icon:t,background:n,...s})=>{const{themeName:_}=(0,o.u)();return r.createElement(l.A,{icon:t||r.createElement(i.A,{variant:"fill",size:"original",color:a.Ay[`desktop-color-ublue-06-${_}`]}),description:e,background:n,...s})}},689965(e,t,n){n.d(t,{A:()=>u,I:()=>a});var a,r=n(296540),i=n(822336),o=n(963724),l=n(71479),s=n(825032),_=n(566723),c=n(294303),d=n(311785);!function(e){e.ACCORDION="accordion",e.BUTTON_LIST="buttonList"}(a||(a={}));const m=(0,l.A)(c.A,(0,d.A)("marginBottom","isButtonList","margin","flex","width","padding","nested","background"))`
  background-color: ${({background:e,nested:t,theme:{themeName:n}})=>e||i.Ay[n===s.S.DARK?`desktop-color-neutral-${t?"00":"01"}-dark`:`desktop-color-neutral-${t?"01":"00"}-light`]};
  padding: ${({theme:e,isButtonList:t,padding:n})=>n||(t?`0 ${e.spacing["spacing-l"]}`:e.spacing["spacing-l"])};
  margin-bottom: ${({theme:e,marginBottom:t})=>t||e.spacing["spacing-l"]};
  ${({margin:e})=>e?`margin: ${e};`:""}
  border-radius: 8px;
  flex-direction: column;
  width: ${({width:e="100%"})=>e};
  flex: ${({flex:e=0})=>e};
  > :last-child {
    margin-bottom: 0;
  }
  thead {
    tr {
      height: 32px !important;
    }
    th {
      text-transform: none;
    }
  }
  ${({isButtonList:e})=>e?`\n    > div {\n      display: flex;\n      height: 48px;\n      border-bottom: ${({theme:{themeName:e}})=>i.Ay[`desktop-border-divider-${e}`]};\n      &:last-child {\n        border-bottom: none;\n      }\n    }\n  `:""}
`,E=(0,l.A)(o.A,(0,d.A)("marginBottom","margin","flex","padding","nested","background"))`
  background-color: ${({background:e,nested:t,theme:{themeName:n}})=>e||i.Ay[n===s.S.DARK?`desktop-color-neutral-${t?"00":"01"}-dark`:`desktop-color-neutral-${t?"01":"00"}-light`]};
  margin-bottom: ${({theme:e,marginBottom:t})=>t||e.spacing["spacing-l"]};
  ${({margin:e})=>e?`margin: ${e};`:""}
  ${({padding:e})=>e?`padding: ${e};`:""}
  border-radius: 8px;
  flex-direction: column;
  flex: ${({flex:e=0})=>e};
  > :last-child {
    margin-bottom: 0;
  }
  thead {
    tr {
      height: 32px !important;
    }
    th {
      text-transform: none;
    }
  }
  > li {
    > div:first-child {
      background: ${({background:e,theme:{themeName:t}})=>e||i.Ay[t===s.S.DARK?"desktop-color-neutral-01-dark":"desktop-color-neutral-00-light"]};
      height: 48px;
      padding: 0 ${_.Ln};
    }
    > div:nth-child(2) {
      margin-bottom: 0;
      padding: 0;
      > div {
        padding: 0 ${_.Ln} ${_.Ln};
      }
    }
  }
`,u=({type:e,marginBottom:t,margin:n,padding:i,flex:o,width:l,nested:s,..._})=>"items"in _?r.createElement(E,{marginBottom:t,margin:n,padding:i,flex:o,nested:s,..._}):r.createElement(m,{nested:s,width:l,marginBottom:t,margin:n,padding:i,flex:o,isButtonList:e===a.BUTTON_LIST,..._},_.children)},821580(e,t,n){n.d(t,{A:()=>l});var a=n(296540),r=n(454195),i=n(566723),o=n(294303);const l=e=>a.createElement(o.A,{paddingTop:i.YC,paddingBottom:i.YC,gap:i.Ln,rowGap:i.YC,flexWrap:"wrap",minHeight:r.b,alignItems:"center",...e})},349665(e,t,n){n.d(t,{A:()=>o});var a=n(296540),r=n(705228),i=n(294303);const o=({maxWidth:e,label:t,children:n,...o})=>a.createElement(i.A,{flexDirection:"column",width:"100%",maxWidth:"settingsGridContent"===e?r.ng:e,...o},t,n)},242366(e,t,n){n.d(t,{A:()=>o});var a=n(296540),r=n(566723),i=n(294303);const o=(0,a.forwardRef)((e,t)=>a.createElement(i.A,{ref:t,flexDirection:"column",gap:r.kc,width:"100%",...e}))},48925(e,t,n){n.d(t,{A:()=>T});var a=n(822336),r=n(296540),i=n(217439),o=n(71479),l=n(566723),s=n(968906),_=n(199582),c=n(311785),d=n(766624),m=n(294303),E=n(689965),u=n(242366);const A=(0,o.A)(E.A,(0,c.A)("isOutlined"))`
  border: ${({theme:{themeName:e},isOutlined:t})=>`1px solid ${t?a.Ay[`desktop-color-ublue-06-${e}`]:"transparent"}`};
`,T=({children:e,title:t,tooltip:n,tooltipProps:a,[_.L]:o,titleAction:c,isOutlined:E})=>{const T=(e=>r.Children.toArray(e).length>0)(e);return r.createElement(A,{marginBottom:"none",...s.A.addDataTestId(o??""),isOutlined:E},r.createElement(m.A,{flexDirection:"column",...T&&{gap:l.Ln},width:"100%"},t?r.createElement(m.A,{alignItems:"center",gap:l.YC,justifyContent:"space-between",width:"100%"},r.createElement(m.A,{gap:l.YC,alignItems:"center"},r.createElement(i.A,{variant:"heading-medium"},t),n?r.createElement(d.A,{description:n,portal:!0,...a}):null),c?r.createElement(m.A,null,c):null):null,T?r.createElement(u.A,null,e):null))}},704025(e,t,n){n.d(t,{i:()=>o});var a=n(296540),r=n(271856),i=n(805837);const o=e=>a.createElement(r.A,{description:e.option&&"tooltipDescription"in e.option?e.option.tooltipDescription:null,position:"left",portal:!0},a.createElement(i.q,{...e}))},329109(e,t,n){n.d(t,{A:()=>c});var a=n(296540),r=n(691441),i=n(71479),o=n(132196),l=n(373229);const s=(0,i.A)("div")`
  height: 66px;
`,_=o.AH`
  padding: 0px !important;
`,c=({isDirty:e,onFormSubmit:t,onFormCancel:n,isInvalid:i,...o})=>e?a.createElement(r.A,null,a.createElement(l.A,{isDirty:e,onFormCancel:n,onFormSubmit:t,isInvalid:i,className:_,...o})):a.createElement(s,null)},883245(e,t,n){n.r(t),n.d(t,{default:()=>We});var a=n(956347),r=n(469733),i=n(296540),o=n(349785),l=n(742920),s=n(853801),_=n(928085),c=n(523265),d=n(464265),m=n(641777),E=n(79786),u=n(398300),A=n(566723),T=n(48925),p=n(294303),O=n(845030),I=n(675359),N=n(55386),S=n(317097),R=n(271751),g=n(688767),b=n(366188),f=n(602021),h=n(598796),C=n(959341),v=n(649594),M=n(532419),D=n(705145),P=n(895424),F=n(916537);const y="192.168.1.1",G="0.0.0.0",L=({form:e})=>{const{formatMessage:t}=(0,F.tz)();return i.createElement(P.A,{tooltip:i.createElement(p.A,{flexDirection:"column",gap:A.kc},i.createElement(D.A,{variant:"inherit"},i.createElement(F.sA,{id:"SETTINGS_ROUTING_OSPF_FORM_ROUTER_ID_TOOLTIP_PART_ONE"})),i.createElement(D.A,{variant:"inherit"},i.createElement(F.sA,{id:"SETTINGS_ROUTING_OSPF_FORM_ROUTER_ID_TOOLTIP_PART_TWO"}))),control:e.control,name:"router_id",label:i.createElement(F.sA,{id:"SETTINGS_ROUTING_OSPF_ROUTER_ID"}),placeholder:t({id:"COMMON_PLACEHOLDER_EG"},{value:y})})};var k=n(329109),w=n(784045),U=n(959207),x=n(21508);const z=(e,t,n,a,r,i)=>{const o=t.find(U.nz),l=o?.ip_subnet?.split("/")[0]||"",s=(0,w.A)(r.filter(t=>e&&(e.device_mac??a)===t.mac||(0,x.Y)(t,i,a)&&!n.some(e=>(e.device_mac??a)===t.mac)),e=>a===e.mac?0:1,"asc");return{device_mac:e?e.device_mac??a:s[0]?.mac??"",router_id:e?.router_id??l??"",announce_default_route:e?.announce_default_route??!1,redistribute_static_routes:{enabled:e?.redistribute_static_routes??!1,type:e?.redistribute_static_routes_metric_type??S.a9.E1},redistribute_connected_routes:{enabled:e?.redistribute_connected_routes??!1,type:e?.redistribute_connected_routes_metric_type??S.a9.E1},redistribute_bgp_routes:{enabled:e?.redistribute_bgp_routes??!1,type:e?.redistribute_bgp_routes_metric_type??S.a9.E1},areas:e?.areas.filter(({network_ids:e})=>e.length)||[],interface_configs:Object.fromEntries((e?.interfaces||[]).map(e=>[e.network_id,{passive:e.passive_interface||!1,authentication:e.authentication_type===S.Dx.OFF?{type:S.Dx.OFF}:e.authentication_type===S.Dx.PLAIN_TEXT?{type:S.Dx.PLAIN_TEXT,authentication_key:e.plain_text_authentication_key||""}:{type:S.Dx.MD5,authentication_keys:e.md5_authentication_keys||[]},hello_interval:e.hello_interval??R.kd,dead_interval:e.dead_interval??R.WV,cost:e.cost??R.Bq,priority:e.priority??R.wv}]))}};var V=n(614476),B=n(263963),H=n(546391),j=n(271856),$=n(74750),W=n(362412),K=n(222190),Y=n(188738),X=n(897502),q=n(242366),Q=n(821580),Z=n(742989),J=n(870443),ee=n(369596);const te=[{name:"id",type:"number",label:"SETTINGS_ROUTING_OSPF_INTERFACE_KEY_ID",tooltip:"SETTINGS_ROUTING_OSPF_INTERFACE_MD5_KEY_DESCRIPTION",tooltipProps:{portal:!0},inline:!0,containerFlexProps:{flex:1},hideMainFormInvalidState:!0},{name:"key",type:"text",label:"SETTINGS_ROUTING_OSPF_INTERFACE_KEY",tooltip:"SETTINGS_ROUTING_OSPF_INTERFACE_MD5_PASSWORD_DESCRIPTION",tooltipProps:{portal:!0},inline:!0,containerFlexProps:{flex:3},hideMainFormInvalidState:!0}],ne=[{id:"id",minWidth:30,label:i.createElement(F.sA,{id:"COMMON_ID"})},{id:"key",minWidth:100,label:i.createElement(F.sA,{id:"SETTINGS_ROUTING_OSPF_INTERFACE_KEY"})}],ae=({value:e,onChange:t,error:n})=>{return i.createElement(p.A,{flexDirection:"column"},i.createElement(ee.A,{fieldName:"md5_authentication_keys",items:e,invalid:n,columns:ne,newFields:te,initialValues:{editActive:!1,id:void 0,key:"",md5_authentication_keys:e},validationSchema:(a=e,J.A.object().shape({id:J.A.number().label("COMMON_ID").required(i.createElement(F.sA,{id:"SETTINGS_ROUTING_OSPF_INTERFACE_MD5_ID_VALIDATION_EXISTS"})).integer(i.createElement(F.sA,{id:"SETTINGS_ROUTING_OSPF_INTERFACE_MD5_ID_VALIDATION_EXISTS"})).min(R.o_,i.createElement(F.sA,{id:"COMMON_VALIDATION_INVALID_RANGE",values:{min:R.o_,max:R.KC}})).max(R.KC,i.createElement(F.sA,{id:"COMMON_VALIDATION_INVALID_RANGE",values:{min:R.o_,max:R.KC}})).test({name:"isUnique",test:(e,t)=>!a.some(({id:t})=>t===e)||t.createError({message:i.createElement(F.sA,{id:"SETTINGS_ROUTING_OSPF_INTERFACE_MD5_ID_VALIDATION_UNIQUE"})})}),key:J.A.string().label("SETTINGS_ROUTING_OSPF_INTERFACE_KEY").required(i.createElement(F.sA,{id:"SETTINGS_ROUTING_OSPF_INTERFACE_MD5_KEY_VALIDATION_EXISTS"})).min(R.pz,i.createElement(F.sA,{id:"SETTINGS_ROUTING_OSPF_INTERFACE_MD5_KEY_VALIDATION_EXISTS"})).max(R.ly,i.createElement(F.sA,{id:"SETTINGS_ROUTING_OSPF_INTERFACE_PASSWORD_VALIDATION_LENGTH",values:{maxLength:R.ly}})).test("doesNotContainSpaces",i.createElement(F.sA,{id:"SETTINGS_ROUTING_OSPF_INTERFACE_MD5_KEY_VALIDATION_SPACE"}),e=>!e?.match(H.$z))})),isWindowTable:!0,editable:!1,onAddItem:n=>t([...e,{id:n.id,key:n.key}]),onRemoveItem:n=>t(e.filter(({id:e})=>e!==n.id))}));var a},re=()=>V.z.discriminatedUnion("passive",[V.z.object({passive:V.z.literal(!0)}),V.z.object({passive:V.z.literal(!1),cost:V.z.number({message:(0,B.rn)("SETTINGS_ROUTING_OSPF_COST_VALIDATION_REQUIRED")}).int().min(R.mA).max(R.wG),priority:V.z.number({message:(0,B.rn)("SETTINGS_ROUTING_OSPF_INTERFACE_PRIORITY_VALIDATION_REQUIRED")}).int().min(R.n$).max(R.rK),hello_interval:V.z.number({message:(0,B.rn)("SETTINGS_ROUTING_OSPF_INTERFACE_HELLO_INTERVAL_VALIDATION_REQUIRED")}).int().min(R.dA).max(R.$s),dead_interval:V.z.number({message:(0,B.rn)("SETTINGS_ROUTING_OSPF_INTERFACE_DEAD_INTERVAL_VALIDATION_REQUIRED")}).int().min(R.dR).max(R.Ju),authentication:V.z.discriminatedUnion("type",[V.z.object({type:V.z.literal(S.Dx.OFF)}),V.z.object({type:V.z.literal(S.Dx.MD5),authentication_keys:V.z.array(V.z.object({id:V.z.number(),key:V.z.string()}),{message:(0,B.rn)("SETTINGS_ROUTING_OSPF_INTERFACE_MD5_VALIDATION_MIN")}).min(1,(0,B.rn)("SETTINGS_ROUTING_OSPF_INTERFACE_MD5_VALIDATION_MIN"))}),V.z.object({type:V.z.literal(S.Dx.PLAIN_TEXT),authentication_key:V.z.string({message:(0,B.rn)("SETTINGS_ROUTING_OSPF_AUTHENTICATION_TYPE_PLAIN_TEXT_VALIDATION_EXISTS")}).min(R.$w,{message:(0,B.rn)("SETTINGS_ROUTING_OSPF_AUTHENTICATION_TYPE_PLAIN_TEXT_VALIDATION_EXISTS")}).max(R.hq,{message:(0,B.rn)("SETTINGS_ROUTING_OSPF_INTERFACE_PASSWORD_VALIDATION_LENGTH",{maxLength:R.hq})}).refine(e=>!e.match(H.$z),{message:(0,B.rn)("SETTINGS_ROUTING_OSPF_INTERFACE_PASSWORD_VALIDATION_SPACE")})})])})]).refine(e=>!("dead_interval"in e)||!("hello_interval"in e)||e.dead_interval>e.hello_interval,{message:(0,B.rn)("SETTINGS_ROUTING_OSPF_INTERFACE_DEAD_INTERVAL_GREATER_THAN_HELLO_INTERVAL"),path:["dead_interval"]}),ie=({existingInterfaceConfigs:e,interfaceId:t,onDismiss:n,onSubmit:a})=>{const{formatMessage:l}=(0,F.tz)(),s=(0,B.L_)(),_=(0,d.A)(h.Xj.OSPF_ROUTING_INTERFACE_PRIORITY),c=(0,r.useSelector)(b.Ct).find(({_id:e})=>e===t),m=(0,i.useMemo)(()=>e[t],[e,t]),u=(0,i.useMemo)(()=>re(),[]),T=(0,E.m)({schema:u,defaultValues:{authentication:{type:S.Dx.OFF},cost:R.Bq,hello_interval:R.kd,dead_interval:R.WV,priority:R.wv,...m,passive:m?.passive||!1}}),O=(0,o.FH)({control:T.control,name:"passive"}),I=(0,o.FH)({control:T.control,name:"authentication.type"}),N=c?(0,Z.Xk)(c):S.nP.BROADCAST,g=Object.values(S.nP).map(e=>({value:e,label:l({id:Z.Hv[e]})})),f=Object.values(S.Dx).map(e=>({label:l({id:Z.lL[e]}),value:e}));return i.createElement(q.A,null,i.createElement(j.A,{description:i.createElement(F.sA,{id:"SETTINGS_ROUTING_OSPF_INTERFACE_NETWORK_TYPE_DISABLED"})},i.createElement(p.A,null,i.createElement(W.A,{disabled:!0,width:"100%",variant:"secondary",options:g,value:N,label:i.createElement(F.sA,{id:"COMMON_NETWORK_TYPE"}),placeholder:l({id:"COMMON_PLACEHOLDER_EG"},{value:G})}))),i.createElement(Q.A,null,i.createElement(X.A,{control:T.control,name:"passive",tooltip:i.createElement(p.A,{gap:A.kc,flexDirection:"column"},i.createElement(D.A,{variant:"inherit"},i.createElement(F.sA,{id:"SETTINGS_ROUTING_OSPF_INTERFACE_PASSIVE_TOOLTIP_PART_ONE"})),i.createElement(D.A,{variant:"inherit"},i.createElement(F.sA,{id:"SETTINGS_ROUTING_OSPF_INTERFACE_PASSIVE_TOOLTIP_PART_TWO"})))},i.createElement(F.sA,{id:"SETTINGS_ROUTING_OSPF_INTERFACE_PASSIVE"}))),O?null:i.createElement(i.Fragment,null,i.createElement(p.A,{gap:A.Ln,flex:1},i.createElement(K.A,{control:T.control,name:"cost",label:i.createElement(F.sA,{id:"SETTINGS_ROUTING_OSPF_COST"}),tooltip:i.createElement(F.sA,{id:"SETTINGS_ROUTING_OSPF_COST_DESCRIPTION"})}),_?i.createElement(K.A,{control:T.control,name:"priority",label:i.createElement(F.sA,{id:"COMMON_PRIORITY"}),tooltip:i.createElement(F.sA,{id:"SETTINGS_ROUTING_OSPF_INTERFACE_PRIORITY_DESCRIPTION"})}):null),i.createElement(Y.A,{label:i.createElement(F.sA,{id:"COMMON_AUTH"}),options:f,control:T.control,name:"authentication.type"}),I===S.Dx.MD5?i.createElement(o.xI,{control:T.control,name:"authentication.authentication_keys",render:({field:e,fieldState:t})=>i.createElement(ae,{value:(e.value||[]).map(({id:e,key:t})=>({id:e,key:t})),onChange:t=>e.onChange(t),error:t.invalid&&t.error?.message?s(t.error.message):null})}):null,I===S.Dx.PLAIN_TEXT?i.createElement(P.A,{control:T.control,name:"authentication.authentication_key",label:i.createElement(F.sA,{id:"COMMON_PASSWORD"})}):null,i.createElement(p.A,{gap:A.Ln,flex:1},i.createElement(K.A,{control:T.control,name:"hello_interval",label:i.createElement(F.sA,{id:"SETTINGS_ROUTING_OSPF_INTERFACE_HELLO_INTERVAL"})}),i.createElement(K.A,{control:T.control,name:"dead_interval",label:i.createElement(F.sA,{id:"SETTINGS_ROUTING_OSPF_INTERFACE_DEAD_INTERVAL"})}))),i.createElement(p.A,{justifyContent:"space-between",alignItems:"center",gap:A.kc},i.createElement(p.A,{gap:A.kc},i.createElement($.A,{size:"small",type:"button",onPress:()=>{T.handleSubmit(a)()}},i.createElement(F.sA,{id:"COMMON_ACTION_SAVE"})),i.createElement($.A,{size:"small",type:"button",variant:"tertiary-neutral",onPress:n},i.createElement(F.sA,{id:"COMMON_ACTION_CANCEL"})))))},oe=V.z.object({device_mac:V.z.string({message:(0,B.rn)("COMMON_VALIDATION_SELECT_A_DEVICE")}).nonempty({message:(0,B.rn)("COMMON_VALIDATION_SELECT_A_DEVICE")}),router_id:V.z.string({message:(0,B.rn)("SETTINGS_ROUTING_OSPF_FORM_AREAS_AREA_ID_VALIDATION_DOTTED_DECIMAL",{example:y})}).refine(e=>H.zF.test(e),{message:(0,B.rn)("SETTINGS_ROUTING_OSPF_FORM_AREAS_AREA_ID_VALIDATION_DOTTED_DECIMAL",{example:y})}),announce_default_route:V.z.boolean(),redistribute_static_routes:V.z.union([V.z.object({enabled:V.z.literal(!1)}),V.z.object({enabled:V.z.literal(!0),type:V.z.nativeEnum(S.a9)})]),redistribute_bgp_routes:V.z.union([V.z.object({enabled:V.z.literal(!1)}),V.z.object({enabled:V.z.literal(!0),type:V.z.nativeEnum(S.a9)})]),redistribute_connected_routes:V.z.union([V.z.object({enabled:V.z.literal(!1)}),V.z.object({enabled:V.z.literal(!0),type:V.z.nativeEnum(S.a9)})]),areas:V.z.array(V.z.object({area_id:V.z.string(),area_type:V.z.nativeEnum(S.sj),network_ids:V.z.array(V.z.string())})).min(1,{message:(0,B.rn)("SETTINGS_ROUTING_OSPF_FORM_AREAS_VALIDATION_MIN_ONE")}),interface_configs:V.z.record(re())}),le=({form:e})=>{const{formatMessage:t}=(0,F.tz)(),n=(0,o.FH)({control:e.control,name:"redistribute_static_routes.enabled"}),a=(0,i.useMemo)(()=>[S.a9.E1,S.a9.E2].map(e=>({value:e,label:t({id:Z.IM[e]})})),[t]);return i.createElement(p.A,{alignItems:"flex-start",justifyContent:"space-between"},i.createElement(Q.A,null,i.createElement(X.A,{tooltip:i.createElement(F.sA,{id:"SETTINGS_ROUTING_OSPF_FORM_REDISTRIBUTE_STATIC_ROUTES_TOOLTIP"}),control:e.control,name:"redistribute_static_routes.enabled"},i.createElement(F.sA,{id:"SETTINGS_ROUTING_OSPF_FORM_REDISTRIBUTE_STATIC_ROUTES"}))),n?i.createElement(p.A,{width:72},i.createElement(Y.A,{control:e.control,name:"redistribute_static_routes.type",options:a})):null)},se=({form:e})=>{const{formatMessage:t}=(0,F.tz)(),n=(0,o.FH)({control:e.control,name:"redistribute_connected_routes.enabled"}),a=(0,i.useMemo)(()=>[S.a9.E1,S.a9.E2].map(e=>({value:e,label:t({id:Z.IM[e]})})),[t]);return i.createElement(p.A,{alignItems:"flex-start",justifyContent:"space-between"},i.createElement(Q.A,null,i.createElement(X.A,{tooltip:i.createElement(F.sA,{id:"SETTINGS_ROUTING_OSPF_FORM_REDISTRIBUTE_CONNECTED_ROUTES_TOOLTIP"}),control:e.control,name:"redistribute_connected_routes.enabled"},i.createElement(F.sA,{id:"SETTINGS_ROUTING_OSPF_FORM_REDISTRIBUTE_CONNECTED_ROUTES"}))),n?i.createElement(p.A,{width:72},i.createElement(Y.A,{control:e.control,name:"redistribute_connected_routes.type",options:a})):null)};var _e=n(823084),ce=n(349107),de=n(765562);const me=()=>{const e=(0,r.useSelector)(N.j),t=!!(0,c.A)(h.Xj.SDWAN_MESH)?.enabled,n=!!(0,c.A)(h.Xj.SDWAN_HUB_SPOKE)?.enabled;return i.createElement(_e.A,null,i.createElement(F.sA,t||n?{id:"SETTINGS_ROUTING_OSPF_SDWAN_INFO_WARNING",values:{learnMoreLink:i.createElement(ce.A,{id:"COMMON_LEARN_MORE",href:de.A.ospfArticle,noWrap:!0})}}:e?{id:"SETTINGS_ROUTING_OSPF_SITE_MAGIC_INFO_WARNING",values:{learnMoreLink:i.createElement(ce.A,{id:"COMMON_LEARN_MORE",href:de.A.ospfArticle,noWrap:!0})}}:{id:"SETTINGS_ROUTING_OSPF_SITE_MAGIC_INFO_MESSAGE",values:{learnMoreLink:i.createElement(ce.A,{id:"COMMON_LEARN_MORE",href:de.A.unifiSiteMagic,noWrap:!0})}}))};var Ee=n(689965),ue=n(963070),Ae=n(822336),Te=n(71479),pe=n(382389),Oe=n(132196),Ie=n(284428),Ne=n(413089),Se=n(573531),Re=n(115829);const ge=(0,Te.A)(p.A)`
  > div {
    overflow: auto;
  }
`,be=({form:e,onEdit:t,editingId:n})=>{const a=(0,o.FH)({control:e.control,name:"areas"}),l=(0,o.FH)({control:e.control,name:"interface_configs"}),s=(0,pe.u)(),_=(0,r.useSelector)(b.Ct),c=(0,Ie.mQ)(),m=(0,d.A)(h.Xj.OSPF_ROUTING_INTERFACE_PRIORITY),E=(0,i.useMemo)(()=>function({interfaceConfigs:e,routerAreas:t,networks:n}){return[...new Set(t.flatMap(e=>e.network_ids??[]))].map(e=>n.find(({_id:t})=>t===e)).filter(Ne.z).map(n=>{const a=e[n._id]||{};return{...n,network_id:n._id,interface:n.name,networkType:n?(0,Z.Xk)(n):void 0,authentication_type:!a.passive&&"authentication"in a?a.authentication.type:S.Dx.OFF,cost:!a.passive&&"cost"in a?a.cost:R.Bq,priority:!a.passive&&"priority"in a?a.priority:R.wv,numberOfAreas:t.filter(e=>e.network_ids?.includes(n._id)).length,passive_interface:a.passive||!1}})}({interfaceConfigs:l,routerAreas:a,networks:_}),[a,l,_]),u=(0,i.useMemo)(()=>(e=>[{id:"interface",label:i.createElement(F.sA,{id:"COMMON_NAME"}),growthFactor:4,renderCell:e=>i.createElement(Re.A,null,e.interface||i.createElement(F.sA,{id:"COMMON_FALLBACK"}))},{id:"authentication_type",label:i.createElement(F.sA,{id:"SETTINGS_AUTHENTICATION_SHORT"}),growthFactor:1,renderCell:({authentication_type:e})=>i.createElement(Re.A,null,i.createElement(F.sA,{id:Z.lL[e]||" COMMON_FALLBACK"}))},{id:"cost",label:i.createElement(F.sA,{id:"SETTINGS_ROUTING_OSPF_COST"}),growthFactor:1,renderCell:e=>i.createElement(Re.A,null,e.cost||Se.L)},...e?[{id:"priority",label:i.createElement(F.sA,{id:"COMMON_PRIORITY"}),growthFactor:1,renderCell:({priority:e})=>i.createElement(Re.A,null,e||0)}]:[]])(m),[m]),A=(0,i.useMemo)(()=>Oe.AH`
      &,
      &:hover {
        background: ${Ae.Ay[`desktop-color-table-cell-selected-${s.themeName}`]} !important;
      }
    `,[s.themeName]);return i.createElement(ge,null,i.createElement(ue.A,{selectedIds:n?[n]:[],rowSelectedClassName:A,columns:u,items:E,idField:"network_id",truncateHeaderCells:!0,disableColumnFilters:!0,onRowClick:e=>{c||t(e.network_id)}}))},fe=({form:e})=>{const t=(0,o.FH)({control:e.control,name:"interface_configs"}),n=(0,o.FH)({control:e.control,name:"areas"}),[a,l]=(0,i.useState)(null),s=(0,r.useSelector)(b.Ct).find(({_id:e})=>e===a);return(0,i.useMemo)(()=>new Set(n.flatMap(({network_ids:e})=>e)),[n]).size?i.createElement(Ee.A,{type:Ee.I.ACCORDION,marginBottom:"none",items:[{id:"areas",label:i.createElement(F.sA,{id:"SETTINGS_ROUTING_OSPF_INTERFACES"}),openByDefault:!0,renderContent:()=>i.createElement(p.A,{flexDirection:"column",gap:A.Ln},i.createElement(be,{form:e,onEdit:e=>l(e),editingId:a}),s?i.createElement(ie,{key:s._id,existingInterfaceConfigs:t,interfaceId:s._id,onSubmit:n=>{l(null),e.setValue("interface_configs",{...t,[s._id]:n},{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0})},onDismiss:()=>{l(null)}}):null)}]}):null};var he,Ce=n(592563),ve=n(180524),Me=n(332431),De=n(250503),Pe=n(249304),Fe=n(153933),ye=n(905410);!function(e){e[e.AREA=0]="AREA",e[e.NETWORK=1]="NETWORK"}(he||(he={}));const Ge=[{value:15,default:!0}],Le=[{id:"id",label:i.createElement(F.sA,{id:"SETTINGS_ROUTING_OSPF_AREA_ID_SUBNET"}),growthFactor:2,renderCell:e=>i.createElement(Re.A,null,e.type===he.AREA?e.area_id:(0,Z.k8)(e.network)||i.createElement(F.sA,{id:"COMMON_FALLBACK"}))},{id:"area_type",label:i.createElement(F.sA,{id:"COMMON_TYPE"}),growthFactor:1,renderCell:({area_type:e})=>i.createElement(Re.A,null,i.createElement(F.sA,{id:Z.eR[e]||"COMMON_FALLBACK"}))},{id:"name",label:i.createElement(F.sA,{id:"COMMON_NETWORK"}),growthFactor:2,renderCell:({type:e,name:t})=>i.createElement(Re.A,null,e===he.AREA?i.createElement(F.sA,{id:"COMMON_FALLBACK"}):t||i.createElement(F.sA,{id:"COMMON_FALLBACK"}))}],ke=({form:e,onEdit:t})=>{const n=(0,o.FH)({control:e.control,name:"areas"}),a=(0,r.useSelector)(b.Ct),l=(0,Ie.mQ)(),[s,_]=(0,i.useState)(0),c=(0,i.useMemo)(()=>function(e,t){return e.map(e=>({type:he.AREA,area_id:e.area_id,area_type:e.area_type,children:e.network_ids.flatMap(n=>{const a=t.find(({_id:e})=>e===n);return a?[{type:he.NETWORK,area_id:`${e.area_id}${a._id}`,network_id:a._id,network:a,name:a.name}]:[]})}))}(n,a),[n,a]),d=(0,i.useCallback)(({from:a,rowsPerPage:r})=>i.createElement(Fe.Ay,{columns:Le,items:c,idField:"area_id",isRemovable:()=>!1,getName:e=>e?.area_id,isPauseable:()=>!1,isResumable:()=>!1,includeParentInSelection:()=>!0,disableChildrenSelection:!0,disableColumnFilters:!0,rowLimit:r,rowOffset:a,onRowClick:({area_id:e})=>{l||t(e)},renderRow:e=>i.createElement(De.A,{...e,style:e?.row?.type!==he.AREA?{...e.rowStyle,cursor:"default"}:e.style}),removeItems:async t=>{e.setValue("areas",n.filter(({area_id:e})=>!t.some(t=>e===t?.area_id)))},removeMessage:"SETTINGS_ROUTING_OSPF_FORM_AREAS_REMOVE_WARNING"}),[c,n,e,l,t]);return c.length?i.createElement(ye.A,{itemCount:c.length,tableType:Pe.l.SETTINGS_ROUTING_OSPF_AREAS,onRenderTable:d,rowOptions:Ge,onPageChanged:_,pageNumber:s,wrapperFlexProps:{padding:"0"},section:"SETTINGS_ROUTING_OSPF_AREAS"}):null};var we=n(712050),Ue=n(754731),xe=n(974388);const ze=e=>V.z.object({area_id:V.z.string({message:(0,B.rn)("SETTINGS_ROUTING_OSPF_FORM_AREAS_AREA_ID_VALIDATION_DOTTED_DECIMAL",{example:G})}).refine(e=>H.zF.test(e),{message:(0,B.rn)("SETTINGS_ROUTING_OSPF_FORM_AREAS_AREA_ID_VALIDATION_DOTTED_DECIMAL",{example:G})}).refine(t=>!e.some(e=>e.area_id===t),{message:(0,B.rn)("SETTINGS_ROUTING_OSPF_FORM_AREAS_AREA_ID_VALIDATION_UNIQUE")}),area_type:V.z.nativeEnum(S.sj),network_ids:V.z.array(V.z.string(),{message:(0,B.rn)("COMMON_VALIDATION_NETWORK")}).min(1,{message:(0,B.rn)("COMMON_VALIDATION_NETWORK")})}).refine(e=>![S.sj.NSSA,S.sj.STUB].includes(e.area_type)||e.area_id!==G,{path:["area_id"],message:(0,B.rn)("SETTINGS_ROUTING_OSPF_FORM_AREAS_AREA_ID_VALIDATION_NOT_ZERO")}),Ve=({switchDeviceMac:e,existingAreas:t,areaId:n,onDismiss:a,onSubmit:l,onDelete:s})=>{const{formatMessage:_}=(0,F.tz)(),c=(0,r.useSelector)(b.Ct),[[d],m]=(0,i.useMemo)(()=>(0,we.A)(t,({area_id:e})=>e===n),[t,n]),u=(0,E.m)({schema:ze(m),defaultValues:{area_id:d?.area_id||"",area_type:d?.area_type||S.sj.NORMAL,network_ids:d?.network_ids||[]}}),T=(0,o.FH)({control:u.control,name:"network_ids"}),O=(0,i.useMemo)(()=>{const n=t.filter(({area_id:e})=>e!==d?.area_id).flatMap(({network_ids:e})=>e);return c.filter(t=>(0,U.h)(t,e)||!e&&(0,U.Mc)(t)||d?.network_ids.includes(t._id)).filter(({_id:e})=>!n.includes(e)).map(t=>{const n=(0,U.h)(t,e)||d?.network_ids.includes(t._id);return{type:"CHECKBOX",title:(0,U.gm)(t),id:t._id,children:[],checkboxProps:{data:(0,U.Mc)(t)?(0,Ue.O7)(t,_):(0,Z.k8)(t),isDisabled:!n,tooltipProps:!n&&(0,U.Mc)(t)?{description:i.createElement(F.sA,{id:"SETTINGS_ROUTING_OSPF_FORM_AREAS_TUNNEL_IP"}),placement:"left"}:void 0}}})},[t,c,d?.area_id,d?.network_ids,e,_]),I=Object.values(S.sj).map(e=>({label:_({id:Z.eR[e]}),value:e}));return i.createElement(q.A,null,i.createElement(P.A,{control:u.control,name:"area_id",label:i.createElement(F.sA,{id:"COMMON_ID"}),placeholder:_({id:"COMMON_PLACEHOLDER_EG"},{value:G})}),i.createElement(Y.A,{name:"area_type",control:u.control,label:i.createElement(F.sA,{id:"COMMON_AREA_TYPE"}),options:I,onAfterChange:()=>u.trigger("area_id")}),i.createElement(xe.A,{control:u.control,name:"network_ids",label:i.createElement(F.sA,{id:"COMMON_NETWORK"}),options:O,isAllSelected:()=>O.every(e=>e.checkboxProps.isDisabled||T.includes(e.id)),onSelectAll:()=>{u.setValue("network_ids",O.filter(e=>!e.checkboxProps.isDisabled).map(e=>e.id))}}),i.createElement(p.A,{justifyContent:"space-between",alignItems:"center",gap:A.kc},i.createElement(p.A,{gap:A.kc},i.createElement($.A,{size:"small",type:"button",onPress:()=>{u.handleSubmit(e=>l(e))()}},i.createElement(F.sA,d?{id:"COMMON_ACTION_SAVE"}:{id:"SETTINGS_ROUTING_OSPF_FORM_AREAS_ADD_AREA"})),i.createElement($.A,{size:"small",type:"button",variant:"tertiary-neutral",onPress:a},i.createElement(F.sA,{id:"COMMON_ACTION_CANCEL"}))),s?i.createElement($.A,{size:"small",type:"button",variant:"tertiary-destructive",onPress:s},i.createElement(F.sA,{id:"COMMON_ACTION_REMOVE"})):null))},Be=({form:e})=>{const[t,n]=(0,i.useState)(!1),[a,l]=(0,i.useState)(null),s=(0,o.FH)({control:e.control,name:"areas"}),_=(0,o.FH)({control:e.control,name:"device_mac"}),c=a?s?.find(e=>e.area_id===a):void 0,d=(0,r.useSelector)(b.Ct),m=_!==(0,r.useSelector)(f.vc)&&_?_:void 0,E=!d.some(e=>(0,U.h)(e,m)&&!s.some(({network_ids:t})=>t.includes(e._id))),u=i.createElement(ve.A,{description:E?i.createElement(F.sA,{id:"SETTINGS_ROUTING_OSPF_AREAS_CREATE_NEW_DISABLED"}):null},i.createElement(p.A,null,i.createElement(Ce.A,{type:"button",fontSize:"medium",onPress:()=>{n(!0),l(null)},isDisabled:E},i.createElement(F.sA,{id:"SETTINGS_CREATE_NEW_AREA"})))),T=i.createElement(Ve,{switchDeviceMac:m,existingAreas:s,areaId:void 0,onSubmit:t=>{n(!1),e.setValue("areas",[...s||[],{area_id:t.area_id,area_type:t.area_type,network_ids:t.network_ids}],{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0})},onDismiss:()=>{n(!1),l(null)}});return s?.length?i.createElement(Ee.A,{type:Ee.I.ACCORDION,marginBottom:"none",items:[{id:"areas",label:i.createElement(F.sA,{id:"SETTINGS_ROUTING_OSPF_AREAS"}),openByDefault:!0,renderContent:()=>i.createElement(p.A,{flexDirection:"column",gap:A.Ln},i.createElement(ke,{form:e,onEdit:e=>{l(e),n(!1)}}),c?i.createElement(Ve,{key:c.area_id,switchDeviceMac:m,existingAreas:s,areaId:c.area_id,onSubmit:t=>{l(null),e.setValue("areas",[...(s||[]).filter(e=>e.area_id!==c.area_id),{area_id:t.area_id,area_type:t.area_type,network_ids:t.network_ids}],{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0})},onDismiss:()=>l(null),onDelete:()=>{e.setValue("areas",(s||[]).filter(e=>e.area_id!==c.area_id),{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0})}}):t?T:i.createElement(p.A,null,u))}]}):i.createElement(Ee.A,{marginBottom:"none"},i.createElement(p.A,{flexDirection:"column",gap:A.YC},t?T:u,i.createElement(Me.Ay,{noMargin:!0,form:e,name:"areas"})))},He=({form:e})=>i.createElement(Q.A,null,i.createElement(X.A,{tooltip:i.createElement(F.sA,{id:"SETTINGS_ROUTING_OSPF_FORM_ANNOUNCE_DEFAULT_ROUTE_TOOLTIP"}),control:e.control,name:"announce_default_route"},i.createElement(F.sA,{id:"SETTINGS_ROUTING_OSPF_FORM_ANNOUNCE_DEFAULT_ROUTE"}))),je=({form:e})=>{const{formatMessage:t}=(0,F.tz)(),n=(0,o.FH)({control:e.control,name:"redistribute_bgp_routes.enabled"}),a=(0,i.useMemo)(()=>[S.a9.E1,S.a9.E2].map(e=>({value:e,label:t({id:Z.IM[e]})})),[t]);return i.createElement(p.A,{alignItems:"flex-start",justifyContent:"space-between"},i.createElement(Q.A,null,i.createElement(X.A,{tooltip:i.createElement(F.sA,{id:"SETTINGS_ROUTING_OSPF_FORM_REDISTRIBUTE_BGP_ROUTES_TOOLTIP"}),control:e.control,name:"redistribute_bgp_routes.enabled"},i.createElement(F.sA,{id:"SETTINGS_ROUTING_OSPF_FORM_REDISTRIBUTE_BGP_ROUTES"}))),n?i.createElement(p.A,{width:72},i.createElement(Y.A,{control:e.control,name:"redistribute_bgp_routes.type",options:a})):null)},$e="ospf-settings-form",We=({activeItem:e,typeSelector:t})=>{const n=(0,r.useDispatch)(),D=(0,a.W6)(),P=!e?._id||e._id?.startsWith(C.R6)?void 0:e,F=(0,_.A)(C.jE),y=(0,r.useSelector)(v.Z0),G=(0,r.useSelector)(M.n_),w=(0,r.useSelector)(f.vc),U=(0,r.useSelector)(b.Ct),x=(0,r.useSelector)(f.EL),V=(0,r.useSelector)(N.j),B=!!(0,c.A)(h.Xj.SDWAN_MESH)?.enabled,H=!!(0,c.A)(h.Xj.SDWAN_HUB_SPOKE)?.enabled,j=(0,d.A)(h.Xj.OSPF_ROUTING),$=(0,d.A)(h.Xj.OSPF_DEFAULT_ROUTE_ANNOUNCEMENT),W=B||H,K=(0,E.m)({schema:oe,defaultValues:z(P,U,y,w,G,j)});(0,s.y)(K);const Y=(0,i.useMemo)(()=>K.handleSubmit(async e=>{const t=new Set(e.areas.flatMap(({network_ids:e})=>e)),a=U.filter(({_id:e})=>t.has(e)).map(t=>{const n=e.interface_configs[t._id];return{network_id:t._id,authentication_type:n&&!n.passive&&"authentication"in n?n.authentication.type:S.Dx.OFF,md5_authentication_keys:n&&!n.passive&&"authentication"in n&&n?.authentication.type===S.Dx.MD5?n.authentication.authentication_keys.map(({id:e,key:t})=>({id:e,key:t})):void 0,plain_text_authentication_key:n&&!n.passive&&"authentication"in n&&n?.authentication.type===S.Dx.PLAIN_TEXT?n.authentication.authentication_key:void 0,passive_interface:n?.passive||!1,hello_interval:n&&"hello_interval"in n?n.hello_interval:R.kd,dead_interval:n&&"dead_interval"in n?n.dead_interval:R.WV,cost:n&&"cost"in n?n.cost:R.Bq,priority:n&&"priority"in n?n.priority:R.wv}}),r={enabled:!0,...P,device_mac:e.device_mac===w?void 0:e.device_mac,router_id:e.router_id,announce_default_route:e.announce_default_route,redistribute_connected_routes:e.redistribute_connected_routes.enabled,redistribute_connected_routes_metric_type:(e.redistribute_connected_routes.enabled?e.redistribute_connected_routes.type:null)||S.a9.E1,redistribute_static_routes:e.redistribute_static_routes.enabled,redistribute_static_routes_metric_type:(e.redistribute_static_routes.enabled?e.redistribute_static_routes.type:null)||S.a9.E1,redistribute_bgp_routes:e.device_mac===w?e.redistribute_bgp_routes.enabled:void 0,redistribute_bgp_routes_metric_type:e.device_mac===w&&e.redistribute_bgp_routes.enabled?e.redistribute_bgp_routes.type:void 0,areas:e.areas.map(e=>({name:e.area_id,area_id:e.area_id,area_type:e.area_type,network_ids:e.network_ids})),interfaces:a};try{const e=await n((0,g.p8)(r));n((0,O.SQ)(!1)),await n((0,g.fi)(void 0,{resolveWithExisting:!1})),K.reset(),n((0,O.XP)({type:u.H.OSPF_ROUTER,id:e?._id})),P||D.push(F)}catch{n((0,I.ox)({icon:l.C.danger,message:"SETTINGS_ROUTING_OSPF_FORM_ERROR"}))}}),[K,U,P,w,n,D,F]),X=(0,o.FH)({control:K.control,name:"device_mac"});return i.createElement("form",{onSubmit:Y,id:$e,key:e._id},i.createElement(m.A,{isDisabled:V||W||x},i.createElement(p.A,{gap:A.Ln,flexDirection:"column"},i.createElement(T.A,null,t,i.createElement(me,null),i.createElement(L,{form:K}),$?i.createElement(He,{form:K}):null,i.createElement(le,{form:K}),i.createElement(se,{form:K}),X&&X!==w?null:i.createElement(je,{form:K})),i.createElement(Be,{form:K}),i.createElement(fe,{form:K})),W||V?null:i.createElement(k.A,{onFormSubmit:Y,onFormCancel:()=>K.reset(),isDirty:K.formState.isDirty||!P,hideCancelButton:!K.formState.isDirty,submitButtonText:P?void 0:"COMMON_ACTION_ADD",form:$e,isSubmitting:K.formState.isSubmitting})))}},905410(e,t,n){n.d(t,{A:()=>T});var a=n(296540),r=n(469733),i=n(217439),o=n(362412),l=n(566723),s=n(294303),_=n(916537),c=n(200826),d=n(789768),m=n(878237),E=n(860765);const u=(0,n(71479).A)("div")`
  overflow: auto;
  width: 100%;
  height: 100%;
`,A=({onRenderTable:e,itemCount:t,section:n="COMMON_RECORDS",rowOptions:A,onRowsChanged:T,onPageChanged:p,onOffsetChanged:O,tableType:I,pageNumber:N,paginationFlexProps:S={},paginationDropdownProps:R={},unknownCount:g=!1,paginationTableContainerClassName:b})=>{const f=(0,r.useDispatch)(),h=(0,a.useMemo)(()=>A||E.o,[A]),C=(0,a.useMemo)(()=>h.map(({value:e})=>({label:String(e),value:e})),[h]),v=(0,c.A)(I),M=(0,a.useMemo)(()=>Number(v?.rowsPerPage&&C.some(({value:e})=>Number(e)===v.rowsPerPage)?v.rowsPerPage:h.find(e=>e?.default)?.value||h?.[0]?.value),[v,C,h]),D=(0,a.useMemo)(()=>Math.max(E.B,N||E.B),[N]),P=(0,a.useCallback)(e=>{p?.(e)},[p]),F=(0,a.useCallback)(()=>{P(D-1)},[D,P]),y=(0,a.useCallback)(()=>{P(D+1)},[D,P]),G=(0,a.useCallback)(({value:e})=>{const t=Number(e);f((0,d.yT)(I,{rowsPerPage:t})),T?.(t)},[f,T,I]),L=(0,a.useMemo)(()=>{let e=D*M;return e>t&&(e=t-M,P(Math.ceil(Math.ceil(e)/M))),e},[P,D,M,t]),k=(0,a.useMemo)(()=>{let e=L+M;return e>=t&&(e=t),e},[L,M,t]),w=(0,a.useMemo)(()=>{const e={pageNumber:N,from:L,rowsPerPage:M};return O?.(e),e},[N,L,M,O]),U=(0,a.useMemo)(()=>D===E.B,[D]),x=(0,a.useMemo)(()=>k>=t,[k,t]);return a.createElement(a.Fragment,null,a.createElement(u,{className:b},e(w)),a.createElement(s.A,{justifyContent:"space-between",...S},void 0!==L&&void 0!==k&&void 0!==t?a.createElement(s.A,{alignItems:"center"},a.createElement(s.A,null,a.createElement(m.A,{disabled:U,onClick:F}),a.createElement(m.A,{disabled:x,rotate:!0,onClick:y})),a.createElement(s.A,{marginLeft:l.kc,marginRight:l.S2},a.createElement(i.A,{size:"small",color:"text-2"},a.createElement(_.sA,{id:"PAGINATION_FROM_TO",values:{from:L+1,to:k,total:`${t}${g?"+":""}`,section:a.createElement(_.sA,{id:n})}}))),C.length>1?a.createElement(s.A,{alignItems:"center"},a.createElement(s.A,{marginRight:l.kc},a.createElement(i.A,{size:"small",color:"text-2"},a.createElement(_.sA,{id:"PAGINATION_ROWS_PER_PAGE"}))),a.createElement("div",{style:{width:"75px"}},a.createElement(o.A.Sorted,{value:M,options:C,onChange:G,variant:"secondary",direction:"top",width:"100%",portal:!0,...R}))):null):null))},T=({itemCount:e,rowOptions:t,onRenderTable:n,wrapperFlexProps:r,paginationTableContainerClassName:i,keepPaginationWhileLoading:o=!1,..._})=>{const c=(0,a.useMemo)(()=>e>Math.min(...(t||E.o).map(({value:e})=>e)),[e,t]);return a.createElement(s.A,{padding:l.Ln,gap:l.Ln,width:"100%",height:"100%",flexDirection:"column",overflow:"hidden",...r},o||c?a.createElement(A,{itemCount:e,rowOptions:t,onRenderTable:n,wrapperFlexProps:r,paginationTableContainerClassName:i,..._}):a.createElement(u,{className:i},n({pageNumber:0,from:0,rowsPerPage:e})))}},878237(e,t,n){n.d(t,{A:()=>E});var a,r=n(296540),i=n(758649),o=n(71479),l=n(825032);!function(e){e.DEFAULT="default",e.HOVER="hover",e.DISABLED="disabled",e.ACTIVE="active"}(a||(a={}));const s={[a.DEFAULT]:{[l.S.LIGHT]:"#d6d9e2",[l.S.DARK]:"#3f3f3f"},[a.HOVER]:{[l.S.LIGHT]:"#7e8190",[l.S.DARK]:"#9d9d9d"},[a.DISABLED]:{[l.S.LIGHT]:"#eeeff3",[l.S.DARK]:"#1e1e1e"},[a.ACTIVE]:{[l.S.LIGHT]:"#a4a7b5",[l.S.DARK]:"#2f2f2f"}},_=(e,t)=>s[t][e],c=(e,t)=>`1px 0px 0px 0px ${_(e,t)}`;var d=n(311785);const m=(0,o.A)(i.A,(0,d.A)("rotate"))`
  margin: 0;
  padding: 0;
  width: 26px;
  height: 24px;
  color: inherit;
  background-color: transparent;
  box-sizing: border-box;
  border-radius: 4px 0 0 4px;
  border-right: 0;
  border-color: transparent;
  border-color: ${({theme:{themeName:e}})=>`${_(e,a.DEFAULT)}`};
  box-shadow: ${({theme:{themeName:e}})=>`${c(e,a.DEFAULT)}`};
  ${({rotate:e=!1})=>e?"\n    transform: rotate(-180deg);\n  ":"\n  position: relative; \n  left: -1px;\n  margin-left: 1px;\n    "}
  > span {
    display: flex;
    align-items: center;
    justify-content: center;
    > div {
      display: flex;
    }
  }
  &:disabled {
    z-index: 0;
    box-shadow: ${({theme:{themeName:e}})=>`${c(e,a.DISABLED)} !important`};
    border-color: ${({theme:{themeName:e}})=>`${_(e,a.DISABLED)} !important`};
  }
  &:hover {
    z-index: 1;
    box-shadow: ${({theme:{themeName:e}})=>`${c(e,a.HOVER)} !important`};
    border-color: ${({theme:{themeName:e}})=>`${_(e,a.HOVER)} !important`};
    border-right: 0;
    background-color: transparent !important;
  }
  &:active {
    box-shadow: ${({theme:{themeName:e}})=>`${c(e,a.ACTIVE)} !important`};
    border-color: ${({theme:{themeName:e}})=>`${_(e,a.ACTIVE)} !important`};
  }
`,E=({disabled:e,onClick:t,rotate:n})=>r.createElement(m,{variant:"secondary",rotate:n,disabled:e,onClick:t,type:"button"},r.createElement("svg",{width:"4",height:"8",viewBox:"0 0 4 8",fill:"none"},r.createElement("path",{d:"M3.75026 0.999386C3.75026 1.11739 3.70826 1.23639 3.62426 1.33138L1.25026 3.99939L1.27026 4.02039L3.62326 6.66739C3.80726 6.87339 3.78826 7.18939 3.58226 7.37339C3.37626 7.55739 3.06026 7.53839 2.87626 7.33239L0.530256 4.69439C0.156256 4.30739 0.156256 3.69139 0.530256 3.30439L2.87526 0.667385C3.05826 0.461386 3.37526 0.442385 3.58126 0.626385C3.69326 0.724385 3.75026 0.861386 3.75026 0.999386Z",fill:"#A4A7B5"})))},622965(e,t,n){n.d(t,{Pd:()=>d,YA:()=>_,tj:()=>c});var a=n(959207),r=n(233187),i=n(54789),o=n(517940),l=n(28536),s=(n(817518),n(117900));const _=e=>e===r._z.WAN?l.s.WAN1:e,c=({l2tp_local_wan_ip:e,l2tp_interface:t,wireguard_local_wan_ip:n,wireguard_interface:r,wireguard_interface_binding_mode_ip_version:c,openvpn_local_wan_ip:d,openvpn_interface:m},E,u=[])=>{const A=r||t||m||l.ju.WAN1,T=n||e||d||i.LG;if(T!==i.LG)return T;const p=_(A),O=u.find(e=>(0,a.Dh)(e.wan_networkgroup)===A);return O?.wan_type===o.mR.STATIC&&O.wan_ip||(c===s.k.v6?E?.[p]?.ipv6?.[0]:E?.[p]?.ip)},d=({l2tp_interface:e,wireguard_interface:t,openvpn_interface:n})=>_(t||e||n||l.ju.WAN1)},401015(e,t,n){var a;n.d(t,{p:()=>a}),function(e){e.ONLINE="online",e.OFFLINE="offline",e.UNKNOWN="unknown"}(a||(a={}))},242723(e,t,n){n.d(t,{Qj:()=>m,T$:()=>c,at:()=>_,cp:()=>A,g8:()=>u,jI:()=>E,kx:()=>s,nn:()=>d});var a=n(573531),r=n(315099),i=n(233187),o=n(622965),l=n(401015);const s=(e,t)=>{if(e.vpn_type===i.iq.OPEN_VPN)return e.openvpn_local_address;if("any"===e.ipsec_local_ip&&t){const n=t?.[(0,o.YA)(e.ipsec_interface)];return n?.ip||a.L}return e.ipsec_local_ip||a.L},_=e=>e.vpn_type===i.iq.OPEN_VPN?e.openvpn_local_port:void 0,c=e=>e.vpn_type===i.iq.OPEN_VPN?e.openvpn_remote_host:e.ipsec_peer_ip,d=e=>e.vpn_type===i.iq.OPEN_VPN?e.openvpn_remote_address:void 0,m=(e,t)=>e.enabled?t?.status===r.T.CONNECTED?l.p.ONLINE:[r.T.CONNECTION_FAILED,r.T.DISCONNECTED].includes(t?.status)?l.p.OFFLINE:l.p.UNKNOWN:l.p.OFFLINE,E=e=>{switch(e.vpn_type){case i.iq.OPEN_VPN:return"COMMON_OPEN_VPN";case i.iq.WIREGUARD:return"COMMON_WIREGUARD";case i.iq.AUTO_IPSEC_VTI:return"SETTINGS_VPN_UNIFI_TO_UNIFI_CREATE_VALUE_AUTO_IPSEC_VTI";case i.iq.MANUAL_IPSEC:return"SETTINGS_VPN_UNIFI_TO_UNIFI_CREATE_VALUE_MANUAL_IPSEC";default:return"COMMON_FALLBACK"}},u={[i.vl.AES_256_CBC]:"AES-256-CBC",[i.vl.BF_CBC]:"BF-CBC"},A=e=>{switch(e){case l.p.ONLINE:return"COMMON_ONLINE";case l.p.OFFLINE:return"COMMON_OFFLINE";default:return"COMMON_FALLBACK"}}},280258(e,t,n){n.d(t,{H:()=>a});const a=""},596441(e,t,n){n.d(t,{I:()=>a});const a={HEADER_HEIGHT:32,ROW_HEIGHT:32,EDIT_FIELD_HEIGHT:36,getHeight(e,t,n,a){return Math.min((a||this.ROW_HEIGHT)*e+(n??this.HEADER_HEIGHT),(a||this.ROW_HEIGHT)*t+(n??this.HEADER_HEIGHT))},getEditContainerHeight(e,t,n){return Math.min((n||this.EDIT_FIELD_HEIGHT)*e,(n||this.EDIT_FIELD_HEIGHT)*t)}}},332431(e,t,n){n.d(t,{Ay:()=>_});var a=n(296540),r=n(349785),i=n(86838),o=n(413089),l=n(263963);const s=e=>{if(!e)return[];const t=Object.values(e).map(e=>(e=>"object"==typeof e&&null!==e&&"type"in e&&"string"==typeof e.type)(e)?s(e):[]);return[e.message,...t.flat()].filter(o.z)},_=function({name:e,form:t,noMargin:n}){const o=(0,l.L_)();return a.createElement(r.xI,{name:e,control:t.control,render:({fieldState:e})=>{const t=s(e.error)[0];return a.createElement(a.Fragment,null,e.invalid&&t?a.createElement(i.A,{isInvalid:!0,style:n?{paddingTop:0,paddingBottom:0}:void 0,label:o(t)}):null)}})}},641777(e,t,n){n.d(t,{A:()=>o});var a=n(296540),r=n(284428),i=n(451449);const o=({isDisabled:e,isAdditive:t=!0,children:n})=>{const o=(0,r.pv)(),l=(0,a.useMemo)(()=>"boolean"==typeof e?{fields:e,labels:e,tooltipIcons:e,tooltipPopovers:!1}:e,[e]),s=(0,a.useMemo)(()=>({fields:t?l.fields||o.fields:l.fields,labels:t?l.labels||o.labels:l.labels,tooltipIcons:t?l.tooltipIcons||o.tooltipIcons:l.tooltipIcons,tooltipPopovers:t?l.tooltipPopovers||o.tooltipPopovers:l.tooltipPopovers}),[t,l.fields,l.labels,l.tooltipIcons,l.tooltipPopovers,o.fields,o.labels,o.tooltipIcons,o.tooltipPopovers]);return a.createElement(i.I.Provider,{value:s},n)}},263963(e,t,n){n.d(t,{L_:()=>_,MS:()=>s,rn:()=>l});var a=n(296540),r=n(614476),i=n(916537);const o="{::}",l=(e,t)=>`${e}${o}${JSON.stringify(t??{})}`,s=(e,t)=>{if("string"!=typeof t)return;const[n,...a]=t.split(o);if(!n||!a.length)return t;let r={};try{r=Object.fromEntries(Object.entries(JSON.parse(a.join(o))).map(([t,n])=>[t,"string"==typeof n?s(e,n):n]))}catch{}return e.formatMessage({id:n},r)};function _(){const{formatMessage:e}=(0,i.tz)();return(0,a.useCallback)(t=>s({formatMessage:e},t),[e])}r.z.setErrorMap((e,t)=>e.message?{message:e.message}:e.code===r.z.ZodIssueCode.too_small&&"string"===e.type?{message:l("COMMON_MIN_CHARS",{min:Number(e.minimum)})}:e.code===r.z.ZodIssueCode.too_big&&"string"===e.type?{message:l("COMMON_MAX_CHARS",{name:l("COMMON_VALUE"),max:Number(e.maximum)})}:e.code===r.z.ZodIssueCode.invalid_type&&"array"===e.expected&&"undefined"===e.received?{message:l("COMMON_SELECT_AT_LEAST_ONE_ITEM")}:e.code===r.z.ZodIssueCode.too_small&&"array"===e.type?{message:l("COMMON_ADD_AT_LEAST_X_ITEMS",{min:Number(e.minimum)})}:e.code===r.z.ZodIssueCode.invalid_type&&"undefined"===e.received?{message:l("COMMON_VALIDATION_VALUE_REQUIRED")}:e.code===r.z.ZodIssueCode.invalid_type&&"number"===e.expected?{message:l("COMMON_VALIDATION_PLEASE_ENTER_A_NUMBER")}:{message:t.defaultError})},897502(e,t,n){n.d(t,{A:()=>c});var a=n(296540),r=n(349785),i=n(314714),o=n(566723),l=n(766624),s=n(294303),_=n(284428);const c=function({control:e,name:t,children:n,tooltip:c,tooltipProps:d,onToggle:m,renderCheckbox:E,inputClassName:u}){const A=(0,_.mQ)();return a.createElement(r.xI,{control:e,name:t,render:({field:e})=>{const t=a.createElement(i.A,{id:e.name,onChange:({target:{checked:t}})=>{e.onChange(t),m?.(t)},checked:!!e.value,disabled:A,inputClassName:u},n);return a.createElement(s.A,{gap:o.YC,alignItems:"center"},E?E(t,e):t,c?a.createElement(l.A,{description:c,...d}):null)}})}},188738(e,t,n){n.d(t,{A:()=>m});var a=n(296540),r=n(436331),i=n(349785),o=n(704025),l=n(317672),s=n(349665),_=n(199582),c=n(263963),d=n(284428);const m=function({control:e,name:t,label:n,options:m,tooltip:E,tooltipProps:u,placeholder:A,renderOption:T,onChange:p,onAfterChange:O,searchable:I,searchableProps:N,portal:S,maxHeight:R,disableValidationMessage:g,isReadOnly:b,[_.L]:f}){const h=(0,d.mQ)(),C=(0,c.L_)();return a.createElement(i.xI,{control:e,name:t,render:({field:e,fieldState:_,formState:c})=>a.createElement(s.A,{gap:2},n?a.createElement(l.A,{htmlFor:t,tooltip:E,tooltipProps:{portal:!0,...u}},n):null,a.createElement(r.A,{variant:"secondary",width:"100%",renderOption:T??o.i,options:m,...e,readOnly:b,disabled:h,onChange:(t,n)=>{const a=p?p(n,{field:e,fieldState:_,formState:c}):e.onChange(n);return O?.(n),a},value:e.value??"",invalid:_.invalid&&!g?C((0,i.Jt)(c.errors,t)?.message)||!0:void 0,placeholder:A,searchable:I,searchableProps:N,portal:S,"data-testid":f,maxHeight:R}))})}},222190(e,t,n){n.d(t,{A:()=>_});var a=n(296540),r=n(349785),i=n(438628),o=n(566723),l=n(263963),s=n(284428);const _=function({control:e,name:t,label:n,placeholder:_,tooltip:c,tooltipProps:d,contentAfter:m,arrowSize:E,min:u,max:A,step:T,value:p,iconBefore:O,onAfterChange:I,onChange:N}){const S=(0,s.mQ)(),R=(0,l.L_)();return a.createElement(r.xI,{control:e,name:t,render:({field:{ref:e,...l},fieldState:s,formState:g})=>a.createElement(i.A,{type:"number",variant:"secondary",width:"100%",...l,value:p??l.value??"",onChange:e=>{N?N(e,g):l.onChange(e.target.value?.length?+e.target.value:null),I?.(e)},disabled:S,invalid:s.invalid?R((0,r.Jt)(g.errors,t)?.message)||!0:void 0,labelTooltip:c,labelTooltipProps:{style:{opacity:S?o.xN:void 0,...d?.style},...d},label:n,placeholder:_,arrowSize:E,contentAfter:m,iconBefore:O,step:T,min:u,max:A})})}},974388(e,t,n){n.d(t,{A:()=>d});var a=n(296540),r=n(349785),i=n(86838),o=n(75622),l=n(317672),s=n(349665),_=n(263963),c=n(284428);const d=function({control:e,name:t,tooltip:n,label:d,options:m,isVirtualized:E,isAllSelected:u,onSelectAll:A,disabledKeys:T}){const p=(0,c.mQ)(),O=(0,_.L_)(),I=(0,a.useMemo)(()=>T||m.flatMap(e=>"CHECKBOX"===e.type&&e.checkboxProps?.isDisabled?[e.id]:[]),[T,m]);return a.createElement(r.xI,{control:e,name:t,render:({field:e,fieldState:_,formState:c})=>a.createElement(s.A,null,d?a.createElement(l.A,{tooltip:n},d):null,a.createElement(o.A,{onSelectionChange:t=>e.onChange([...t]),"aria-disabled":p,selectedKeys:new Set(e.value),treeProps:{disabledKeys:I},items:m,isVirtualized:E,setSelectedKeys:()=>{},onSelectAll:A,onDeselectAll:()=>e.onChange([]),isAllSelected:u}),_.invalid?a.createElement(i.A,{isInvalid:!0,label:O((0,r.Jt)(c.errors,t)?.message)}):void 0)})}},464265(e,t,n){n.d(t,{A:()=>o});var a=n(296540),r=n(469733),i=n(792072);const o=e=>(0,r.useSelector)((0,a.useMemo)(()=>(0,i.jN)(e),[e]))},523265(e,t,n){n.d(t,{A:()=>o});var a=n(296540),r=n(469733),i=n(792072);const o=e=>(0,r.useSelector)((0,a.useMemo)(()=>(0,i.z7)(e),[e]))},413089(e,t,n){function a(e){return Boolean(e)}n.d(t,{z:()=>a})},362412(e,t,n){n.d(t,{A:()=>d});var a=n(296540),r=n(469733),i=n(436331),o=n(805837),l=n(282556),s=n(71265);const _=e=>a.createElement(i.A,{renderOption:o.q,...e}),c=e=>a.createElement(_,{...e});c.Sorted=e=>{const t=(0,r.useSelector)(l.zi),n=(0,a.useMemo)(()=>(0,s.k)(t),[t]);return a.createElement(_,{...e,sortBy:n})};const d=c},71265(e,t,n){n.d(t,{R:()=>d,k:()=>m});var a=n(280258),r=n(190497),i=n(953048),o=n(175522),l=n(936621),s=n(742525);const _=[...new Set([a.H,o.Q.join(o.A),i.Zt,l.F,r.nc,s.Vr])],c={numeric:!0,sensitivity:"base"},d=(e,t)=>{const n=[];for(let a=e;a<=t;a+=1)n.push({value:a,label:String(a)});return n},m=e=>({value:t,label:n},{value:a,label:r})=>_.includes(t?.toString())||_.includes(a?.toString())?1/0:n?.toString().localeCompare(r?.toString(),e,c)??-1}}]);