"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[91749],{815879(e,t,i){i.d(t,{A:()=>s});var n=i(602086),r=i(141992);const s=(0,i(272338).w)(e=>(0,n.createElement)("svg",(0,r.d)({viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em"},e),(0,n.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4 3a1 1 0 0 0-1 1v4a1 1 0 0 0 1 1h4a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1H4Zm8 8a1 1 0 0 0-1 1v4a1 1 0 0 0 1 1h4a1 1 0 0 0 1-1v-4a1 1 0 0 0-1-1h-4Z",fill:"currentColor",className:e.twotonedclassname}),(0,n.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4 4h4v4H4V4ZM3 4a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4Zm9 8h4v4h-4v-4Zm-1 0a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-1v-4Zm1.854-4.854L11.707 6H16v3.5a.5.5 0 0 0 1 0v-4a.5.5 0 0 0-.5-.5h-4.793l1.147-1.146a.5.5 0 0 0-.708-.708l-2 2a.5.5 0 0 0 0 .708l2 2a.5.5 0 0 0 .708-.708ZM8.293 15H3.5a.5.5 0 0 1-.5-.5v-4a.5.5 0 0 1 1 0V14h4.293l-1.147-1.146a.5.5 0 0 1 .708-.708l2 2a.5.5 0 0 1 0 .708l-2 2a.5.5 0 0 1-.708-.708L8.293 15Z",fill:"currentColor",className:e.baseclassname}),(0,n.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4 3a1 1 0 0 0-1 1v4a1 1 0 0 0 1 1h4a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1H4Zm7 9a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-1v-4Zm1.854-4.854L11.707 6H16v3.5a.5.5 0 0 0 1 0v-4a.5.5 0 0 0-.5-.5h-4.793l1.147-1.146a.5.5 0 0 0-.708-.708l-2 2a.5.5 0 0 0 0 .708l2 2a.5.5 0 0 0 .708-.708ZM8.293 15H3.5a.5.5 0 0 1-.5-.5v-4a.5.5 0 0 1 1 0V14h4.293l-1.147-1.146a.5.5 0 0 1 .708-.708l2 2a.5.5 0 0 1 0 .708l-2 2a.5.5 0 0 1-.708-.708L8.293 15Z",fill:"currentColor",className:e.fillclassname})))},620627(e,t,i){i.d(t,{A:()=>h});var n=i(274934),r=i(938984),s=i(247816),l=i(309130),a=i(100978),o=i(535322);const d=(0,s.A)("div")`
  margin-right: ${l.kc};
`,c=(0,s.A)("div")`
  margin-left: ${l.kc};
`,h=({icon:e,closeIcon:t,nested:i,children:s,...l})=>(0,n.jsx)(o.A,{nested:i,...l,children:(0,n.jsxs)(a.A,{children:[(0,n.jsx)(d,{children:e}),(0,n.jsx)(r.A,{size:"medium",children:s}),t?(0,n.jsx)(c,{children:t}):null]})})},535322(e,t,i){i.d(t,{A:()=>u,I:()=>n});var n,r=i(274934),s=i(814557),l=i(158885),a=i(247816),o=i(565527),d=i(309130),c=i(100978),h=i(291508);!function(e){e.ACCORDION="accordion",e.BUTTON_LIST="buttonList"}(n||(n={}));const m=(0,a.A)(c.A,(0,h.A)("marginBottom","isButtonList","margin","flex","width","padding","nested","background"))`
  background-color: ${({background:e,nested:t,theme:{themeName:i}})=>e||s.Ay[i===o.S.DARK?`desktop-color-neutral-${t?"00":"01"}-${o.S.DARK}`:`desktop-color-neutral-${t?"01":"00"}-${o.S.LIGHT}`]};
  padding: ${({isButtonList:e,padding:t})=>t||(e?`0 ${d.Ln}`:d.Ln)};
  margin-bottom: ${({marginBottom:e})=>e||d.Ln};
  ${({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}})=>s.Ay[`desktop-border-divider-${e}`]};\n      &:last-child {\n        border-bottom: none;\n      }\n    }\n  `:""}
`,A=(0,a.A)(l.A,(0,h.A)("marginBottom","margin","flex","padding","nested","background"))`
  background-color: ${({background:e,nested:t,theme:{themeName:i}})=>e||s.Ay[i===o.S.DARK?`desktop-color-neutral-${t?"00":"01"}-${o.S.DARK}`:`desktop-color-neutral-${t?"01":"00"}-${o.S.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||s.Ay[t===o.S.DARK?`desktop-color-neutral-01-${o.S.DARK}`:`desktop-color-neutral-00-${o.S.LIGHT}`]};
      height: 48px;
      padding: 0 ${d.Ln};
    }
    > div:nth-child(2) {
      margin-bottom: 0;
      padding: 0;
      > div {
        padding: 0 ${d.Ln} ${d.Ln};
      }
    }
  }
`,u=({type:e,marginBottom:t,margin:i,padding:s,flex:l,width:a,nested:o,...d})=>"items"in d?(0,r.jsx)(A,{marginBottom:t,margin:i,padding:s,flex:l,nested:o,...d}):(0,r.jsx)(m,{nested:o,width:a,marginBottom:t,margin:i,padding:s,flex:l,isButtonList:e===n.BUTTON_LIST,...d,children:d.children})},737364(e,t,i){i.d(t,{A:()=>m});var n=i(274934),r=i(599110),s=i(309130),l=i(580988),a=i(100978),o=i(470070),d=i(421314),c=i(300626),h=i(174710);const m=({enabled:e,label:t,tooltipItems:i,neverShowListMarkers:m,limit:A=20,seeMoreCallback:u,isInteractive:x,title:p,showMatchOppositeIcon:g,listGap:v,iconProps:M})=>(0,n.jsxs)(a.A,{flex:1,overflow:"hidden",gap:s.YC,children:[g?(0,n.jsx)(l.A,{enabled:e}):null,(0,n.jsx)(c.A,{tooltip:(0,n.jsx)(h.A,{title:p,position:"top",isInteractive:Boolean(u)||x,items:i,showListMarkers:!m,maxItemCount:A,getItemKey:(e,t)=>t,renderItem:e=>e,listGap:v,renderShowMore:u?()=>(0,n.jsx)(r.A,{variant:"inline",onClick:u,children:(0,n.jsx)(o.sA,{id:"COMMON_SEE_MORE"})}):void 0,iconProps:M}),children:t?(0,n.jsx)(d.A,{color:e?"inherit":"disabled",children:t}):null})]})},174710(e,t,i){i.d(t,{A:()=>l});var n=i(274934),r=i(304151),s=i(158498);const l=function({items:e,getItemKey:t,renderItem:i,maxItemCount:l,renderShowMore:a,showListMarkers:o,title:d,position:c,isInteractive:h,cursorType:m,listGap:A,iconProps:u}){return(0,n.jsx)(r.A,{title:d,position:c,isInteractive:h,cursorType:m,description:(0,n.jsx)(s.A,{items:e,getItemKey:t,renderItem:i,maxItemCount:l,listGap:A,renderShowMore:a,showListMarkers:o}),iconProps:u})}},580988(e,t,i){i.d(t,{A:()=>d});var n=i(274934),r=i(125799),s=i(815879),l=i(309130),a=i(100978),o=i(470070);const d=({enabled:e})=>(0,n.jsx)(a.A,{opacity:e?void 0:l.xN,children:(0,n.jsx)(r.A,{description:(0,n.jsx)(o.sA,{id:"COMMON_MATCH_OPPOSITE"}),portal:!0,children:(0,n.jsx)(s.A,{size:"original"})})})},300626(e,t,i){i.d(t,{A:()=>l});var n=i(274934),r=i(309130),s=i(100978);const l=({children:e,tooltip:t})=>(0,n.jsxs)(s.A,{maxWidth:"100%",overflow:"hidden",gap:r.YC,alignItems:"center",children:[e?(0,n.jsx)(s.A,{flex:1,overflow:"hidden",children:e}):null,t]})},748094(e,t,i){i.d(t,{A:()=>p});var n=i(274934),r=i(814557),s=i(602086),l=i(599110),a=i(938984),o=i(853777),d=i(600191),c=i(847399),h=i(263705),m=i(613842),A=i(470070),u=i(620627),x=i(100978);const p=(0,s.memo)(({children:e,customIcon:t,link:i,nested:p,extra:g,variant:v="warning",...M})=>{const{themeName:j}=(0,h.u)(),f=(0,s.useMemo)(()=>{switch(v){case"warning":return(0,n.jsx)(d.A,{size:"original",color:r.Ay[`desktop-color-orange-06-${j}`],variant:"fill"});case"info":return(0,n.jsx)(o.A,{isActive:!0,size:"original",variant:"fill"});case"custom":return t;default:return(0,n.jsx)(c.A,{size:"medium",color:r.Ay[`desktop-color-red-06-${j}`],variant:"fill"})}},[v,j,t]),C=(0,s.useCallback)(()=>{m.A.open(i)},[i]);return(0,n.jsx)(u.A,{icon:f,nested:p,...M,children:(0,n.jsxs)(x.A,{flexDirection:"column",alignItems:"flex-start",children:[(0,n.jsx)(a.A,{children:e}),(0,n.jsx)(a.A,{children:i?(0,n.jsx)(l.A,{type:"button",variant:"inline",onClick:C,children:(0,n.jsx)(A.sA,{id:"COMMON_LEARN_MORE"})}):null}),g]})})})},828196(e,t,i){i.d(t,{A:()=>c});var n=i(274934),r=i(938984),s=i(95032),l=i(247816),a=i(470070),o=i(664092);const d=(0,l.A)(r.A)`
  white-space: nowrap;
`,c=({id:e,color:t,values:i,children:r})=>(0,n.jsxs)(o.A,{children:[(0,n.jsx)(d,{color:"text-2",size:"medium",children:(0,n.jsx)(a.sA,{id:e,values:i})}),(0,n.jsx)(s.A,{color:t||"text-3",size:"medium",isTruncated:!0,children:r})]})},664092(e,t,i){i.d(t,{A:()=>d});var n=i(274934),r=i(247816),s=i(309130),l=i(100978),a=i(291508);const o=(0,r.A)(l.A,(0,a.A)("valueMaxWidth","keyMinWidth","compact"))`
  &:not(:last-child) {
    ${({compact:e})=>e?"":`margin-bottom: ${s.kc};`}
  }
  & > {
    &:nth-child(1) {
      min-width: ${({keyMinWidth:e})=>e}px;
    }
    &:nth-child(2) {
      max-width: ${({valueMaxWidth:e})=>e}px;
    }
  }
`,d=({children:e,valueMaxWidth:t=215,keyMinWidth:i=0,flexProps:r={},compact:l=!1})=>(0,n.jsx)(o,{width:"100%",justifyContent:"space-between",gap:s.kc,height:l?void 0:24,valueMaxWidth:t,keyMinWidth:i,compact:l,...r,children:e})},191749(e,t,i){i.r(t),i.d(t,{default:()=>M});var n=i(274934),r=i(977872),s=i(602086),l=i(792929),a=i(976888),o=i(834700),d=i(182978),c=i(748094),h=i(535322),m=i(470070),A=i(423564),u=i(197571),x=i(615019),p=i(839089),g=i(828196);const v=[{id:"subnet",label:(0,n.jsx)(m.sA,{id:"COMMON_SUBNET"}),renderCell:({subnet:e})=>e}],M=({activeItem:e})=>{const t=(0,r.d4)(u.Ct),i=(0,s.useMemo)(()=>e.source_filter?.filter_type===x.cu.NETWORK_CONF?t.filter(({_id:t})=>e.source_filter.network_conf_ids?.includes(t)):[],[e.source_filter,t]),M=(0,s.useMemo)(()=>i.map(e=>(0,A.mC)(e)).filter(a.z),[i]),j=e.type===x.UC.DNAT?e.in_interface:e.out_interface,f=(0,s.useMemo)(()=>t.find(({_id:e})=>e===j),[t,j]),C=(0,s.useMemo)(()=>M.map(e=>({subnet:e})),[M]);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(c.A,{variant:"info",children:(0,n.jsx)(m.sA,{id:e.type===x.UC.MASQUERADE?"SETTINGS_ROUTING_NAT_RULE_PREDEFINED_MASQUERADE_INFO":"SETTINGS_ROUTING_NAT_RULE_PREDEFINED_SOURCE_INFO",values:{subnet:M.join(", ")}})}),(0,n.jsxs)(h.A,{children:[(0,n.jsx)(g.A,{id:"COMMON_TYPE",children:(0,n.jsx)(m.sA,{id:p.ks[e.type]})}),(0,n.jsx)(g.A,{id:"COMMON_PROTOCOL",children:(0,n.jsx)(m.sA,{id:(0,o.Wi)(e.protocol)||"COMMON_FALLBACK"})}),(0,n.jsx)(g.A,{id:"COMMON_INTERFACE",children:f?.name||(0,n.jsx)(m.sA,{id:"COMMON_FALLBACK"})}),(0,n.jsx)(g.A,{id:"COMMON_IP_ADDRESS",children:(0,n.jsx)(d.A,{items:e.ip_addresses,renderMultipleItemsLabel:({count:e})=>(0,n.jsx)(m.sA,{id:"COMMON_IP_COUNT",values:{count:e}})})}),(0,n.jsx)(g.A,{id:"SETTINGS_SECURITY_SOURCE_IP_ADDRESS",children:M.length>1?(0,n.jsx)(m.sA,{id:"COMMON_MULTIPLE"}):M[0]||(0,n.jsx)(m.sA,{id:"COMMON_FALLBACK"})})]}),M.length>1?(0,n.jsx)(h.A,{type:h.I.ACCORDION,items:[{id:"source-networks",label:(0,n.jsx)(m.sA,{id:"COMMON_SOURCE_NETWORKS"}),openByDefault:!0,renderContent:()=>(0,n.jsx)(l.A,{idField:"subnet",truncateHeaderCells:!0,disableColumnFilters:!0,columns:v,items:C})}]}):null]})}},638644(e,t,i){i.d(t,{A:()=>s});var n=i(274934),r=i(938984);const s=({enabled:e,color:t,children:i,...s})=>(0,n.jsx)(r.A,{color:!1===e?"disabled":t||"inherit",size:"inherit",...s,children:i})},182978(e,t,i){i.d(t,{A:()=>a});var n=i(274934),r=i(254590),s=i(638644),l=i(737364);const a=({items:e,noItemsLabel:t=r.L,renderMultipleItemsLabel:i,enabled:a,isInteractive:o})=>e?.length?1===e.length?"string"==typeof e[0]?(0,n.jsx)(s.A,{enabled:a,isTruncated:!0,children:e[0]}):(0,n.jsx)(n.Fragment,{children:e[0]}):(0,n.jsx)(l.A,{enabled:a,label:i({count:e.length}),tooltipItems:e,neverShowListMarkers:!0,isInteractive:o}):(0,n.jsx)(s.A,{enabled:a,isTruncated:!0,children:t})},976888(e,t,i){function n(e){return Boolean(e)}i.d(t,{z:()=>n})}}]);