"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[17823],{180533(i,n,e){e.d(n,{Yf:()=>a,oS:()=>T,p1:()=>r,qm:()=>O,xS:()=>I});var t=e(805521),_=e(609553),s=e(631345);const I=[_.Vh,_.Z_,_.Ox,_.k1,_.Wb,_.sX],r=(I.map(i=>(0,t.j9)(i)),{[s.b.OFF]:"COMMON_OFF",[s.b.SHORT]:"SETTINGS_ROUTING_QOS_BURST_SHORT",[s.b.LONG]:"SETTINGS_ROUTING_QOS_BURST_LONG"}),O={[s.f.PRIORITIZE]:"SETTINGS_ROUTING_QOS_OBJECTIVE_PRIORITIZE",[s.f.LIMIT]:"SETTINGS_ROUTING_QOS_LIMIT",[s.f.LIMIT_AND_PRIORITIZE]:"SETTINGS_ROUTING_QOS_OBJECTIVE_PRIORITIZE_AND_LIMIT"},T=1,a=1e8},631345(i,n,e){var t,_;e.d(n,{b:()=>t,f:()=>_}),function(i){i.OFF="OFF",i.SHORT="SHORT",i.LONG="LONG"}(t||(t={})),function(i){i.PRIORITIZE="PRIORITIZE",i.LIMIT="LIMIT",i.LIMIT_AND_PRIORITIZE="LIMIT_AND_PRIORITIZE"}(_||(_={}))},217823(i,n,e){e.r(n),e.d(n,{default:()=>v});var t=e(274934),_=e(977872),s=e(602086),I=e(95032),r=e(320509),O=e(753837),T=e(535322),a=e(470070),d=e(180533),l=e(197571),o=e(709495),c=e(828196),N=e(987964),A=e(559849),S=e(403118),p=e(168026),M=e(139847),h=e(635187),E=e(631345);const R={[E.f.LIMIT]:"SETTINGS_ROUTING_QOS_LIMIT",[E.f.LIMIT_AND_PRIORITIZE]:"SETTINGS_ROUTING_QOS_OBJECTIVE_PRIORITIZE_AND_LIMIT",[E.f.PRIORITIZE]:"SETTINGS_ROUTING_QOS_OBJECTIVE_PRIORITIZE"},j=(0,t.jsx)(a.sA,{id:"COMMON_ANY"}),u=(0,t.jsx)(a.sA,{id:"COMMON_FALLBACK"}),x=(0,t.jsx)(a.sA,{id:"COMMON_MULTIPLE"}),L=(i,n)=>i&&i!==M.rl.ANY?1===n.split(h.KE).length?n:n.split(h.KE).length>1?x:u:j,C=({activeItem:i})=>{const{formatMessage:n}=(0,a.tz)(),e=(0,_.d4)(l.Ct),M=(0,s.useMemo)(()=>(0,O.v)(!!i&&!i.wan_or_vpn_network,e,n,i?.wan_or_vpn_network),[i,e,n]),{objective:h,wan_or_vpn_network:E,source:{port_matching_type:j,port:u="",match_opposite_ips:x,match_opposite_ports:C},source:v,destination:{port_matching_type:G,port:m="",match_opposite_ips:U,match_opposite_ports:P},destination:f}=i,D=L(j,u),b=C?(0,t.jsx)(p.A,{content:D}):D,w=L(G,m),k=P?(0,t.jsx)(p.A,{content:w}):w;return(0,t.jsxs)(T.A,{children:[(0,t.jsx)(c.A,{id:"COMMON_SOURCE",children:(0,t.jsx)(I.A,{variant:"inherit",isTruncated:!0,children:(0,t.jsx)(N.A,{source:v,sourceMatchOppositeIps:Boolean(x)})})}),(0,t.jsx)(c.A,{id:"SETTINGS_SECURITY_SOURCE_PORT",children:(0,t.jsx)(I.A,{variant:"inherit",isTruncated:!0,children:b})}),(0,t.jsx)(c.A,{id:"COMMON_ACTION",children:(0,t.jsx)(I.A,{variant:"inherit",isTruncated:!0,children:(0,t.jsx)(a.sA,{id:R[h]})})}),(0,t.jsx)(c.A,{id:"COMMON_DESTINATION",children:(0,t.jsx)(I.A,{variant:"inherit",isTruncated:!0,children:(0,t.jsx)(A.A,{destination:f,destinationMatchOppositeIps:Boolean(U)})})}),(0,t.jsx)(c.A,{id:"SETTINGS_SECURITY_DESTINATION_PORT",children:(0,t.jsx)(I.A,{variant:"inherit",isTruncated:!0,children:k})}),(0,t.jsx)(c.A,{id:"COMMON_INTERFACE",children:(0,t.jsx)(I.A,{variant:"inherit",isTruncated:!0,children:E?M.find(i=>i.value===E)?.label:(0,t.jsx)(a.sA,{id:"COMMON_ALL_WANS"})})}),(0,t.jsx)(c.A,{id:"COMMON_PROTOCOL",children:(0,t.jsx)(I.A,{variant:"inherit",isTruncated:!0,children:(0,t.jsx)(a.sA,{id:"COMMON_ALL"})})}),i.download_limit_kbps?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(c.A,{id:"COMMON_DOWNLOAD_LIMIT",children:(0,t.jsx)(I.A,{variant:"inherit",isTruncated:!0,children:(0,r.Up)(i.download_limit_kbps)})}),(0,t.jsx)(c.A,{id:"SETTINGS_DOWNLOAD_BURST",children:(0,t.jsx)(I.A,{variant:"inherit",isTruncated:!0,children:(0,t.jsx)(a.sA,{id:d.p1[i.download_burst]})})})]}):null,i.upload_limit_kbps?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(c.A,{id:"COMMON_UPLOAD_LIMIT",children:(0,t.jsx)(I.A,{variant:"inherit",isTruncated:!0,children:(0,r.Up)(i.upload_limit_kbps)})}),(0,t.jsx)(c.A,{id:"SETTINGS_UPLOAD_BURST",children:(0,t.jsx)(I.A,{variant:"inherit",isTruncated:!0,children:(0,t.jsx)(a.sA,{id:d.p1[i.upload_burst]})})})]}):null,(0,t.jsx)(c.A,{id:"COMMON_SCHEDULE",children:(0,t.jsx)(I.A,{variant:"inherit",isTruncated:!0,children:(0,t.jsx)(a.sA,{id:o.e[i.schedule?.mode]})})}),i.origin_type?(0,t.jsx)(S.A,{policy:i}):null]})},v=({activeItem:i})=>(0,t.jsx)(C,{activeItem:i})},753837(i,n,e){e.d(n,{i:()=>r,v:()=>a});var t=e(274934),_=e(892275),s=e(470070),I=e(423564);const r="ALL",O=i=>n=>({label:n.name,value:n._id,wan_networkgroup:n.wan_networkgroup,disabled:(0,I.tD)(n),additionalInfo:(0,_.O7)(n,i),tooltipDescription:(0,I.tD)(n)?(0,t.jsx)(s.sA,{id:"SETTINGS_ROUTING_QOS_POLICY_BASED_VPNS_DISABLED"}):null}),T=(i,n)=>i.map((i,e)=>0===e?{...i,groupLabel:n}:i),a=(i,n,e,t)=>{const _=n.filter(i=>(0,I.jp)(i)&&!(0,I.BA)(i)),s=n.filter(I.MY),a=n.filter(I.u0),d={label:e({id:"COMMON_ALL_WANS"}),value:r},l=[..._.length>1||i?[d]:[],..._.map(O(e))];return[...T(l,"COMMON_INTERNET"),...T(s.map(O(e)),"COMMON_VPN_CLIENT"),...T(a.map(O(e)),"COMMON_SITE_TO_SITE_VPN")]}}}]);