"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[58330],{137625:(e,t,a)=>{a.d(t,{A:()=>s});var l=a(296540),n=a(353899),i=a(132196),d=a(372737),r=a(566723),o=a(699784);const s=({children:e=null,title:t,titleValues:a,message:s,messageValues:c,handleConfirm:m=()=>null,handleClose:u=()=>null,handleCancel:h,isOpen:p,buttonVariant:E="primary",cancelButtonVariant:_="tertiary",cancelButtonMessage:g="COMMON_ACTION_CANCEL",buttonMessage:A="COMMON_ACTION_CONFIRM",buttonDisabled:b=!1,position:w="top",showHeaderClose:f=!1,contentClassName:C="",body:y,titleBody:v,className:T,rootClose:x=!1,footerActions:O})=>{const I=(0,l.useCallback)(e=>{p&&(e.stopPropagation(),e.key===d.U.ENTER?m():e.key===d.U.ESCAPE&&u(!1))},[p,m,u]);(0,l.useEffect)(()=>(window.addEventListener("keydown",I,!0),()=>{window.removeEventListener("keydown",I,!0)}),[I]);const N=(0,l.useCallback)(()=>{u(!1),h?.()},[u,h]),M=(0,l.useCallback)(()=>{u(!1),m()},[u,m]),H=(0,l.useMemo)(()=>[{text:l.createElement(o.sA,{id:g}),variant:_,onClick:N},{text:l.createElement(o.sA,{id:A}),disabled:b,variant:E,onClick:M}],[A,E,g,_,N,M,b]),$=(0,l.useCallback)(()=>{u(!1)},[u]),k=i.AH`
    ${t?"":`margin-top: ${r.xO}`}
  `;return l.createElement(n.A,{title:t?l.createElement(o.sA,{id:t,values:a}):v||null,...s?{body:l.createElement(l.Fragment,null,l.createElement(o.sA,{id:s,values:c}),y)}:{body:y},position:w,portal:!0,actions:O||H,showHeaderClose:f,contentClassName:i.AH`
        ${k}
        ${C}
      `,onRequestClose:$,isOpen:p,allowOverflow:!0,rootClose:x,className:T},e)}},248543:(e,t,a)=>{a.d(t,{J:()=>l,g:()=>n});const l=()=>document.getElementById("modal-container"),n=()=>document.getElementById("modal-settings-container")},305721:(e,t,a)=>{a.d(t,{A:()=>o});var l=a(296540),n=a(784045),i=a(411502),d=a(455155),r=a(143811);const o=({fieldName:e,disabled:t})=>{const a=(0,l.useMemo)(()=>(0,n.A)(i.hS.map(([e,{name:t,iconFileName:a}])=>({label:t,value:e,image:l.createElement(d.A,{iconFileName:a})})),e=>e.label),[]);return l.createElement(r.A,{type:"picklist",options:a,name:e,truncateLabels:!0,maxSelections:i.KW,triggerButtonText:"COMMON_SELECT",isWindowed:!0,disabled:t,isFullWidth:!0})}},324697:(e,t,a)=>{a.d(t,{A:()=>w});var l=a(469733),n=a(296540),i=a(784045),d=a(951272),r=a(271856),o=a(277184),s=a(758649),c=a(79760),m=a(454195),u=a(566723),h=a(854246),p=a(143811),E=a(294303),_=a(699784),g=a(711748),A=a(116653);const b=e=>n.createElement(r.A,{description:e.option.tooltipDescription,portal:!0,position:"left"},n.createElement(o.p,{...e})),w=({types:e,name:t,disabled:a,getDisabledReason:r})=>{const{setFieldValue:o,touched:w,errors:f,submitCount:C}=(0,d.j7)(),y=(0,l.useSelector)(g.O9),[v,T]=(0,n.useState)(!1),x=(0,n.useMemo)(()=>(0,i.A)(y.filter(({group_type:t})=>e.includes(t)),({name:e})=>e,"asc").map(({_id:e,name:t,group_type:a})=>{const l=r?.({group_type:a});return{value:e,label:t,disabled:!!l,tooltipDescription:l}}),[r,y,e]),O=(0,c.t$)(t,f,w,C);return n.createElement(E.A,{flexDirection:"column",width:"100%"},n.createElement(E.A,{gap:u.kc,alignItems:"flex-start"},x.length?n.createElement(E.A,{flexDirection:"column",width:"100%",flex:1},n.createElement(p.A,{type:"dropdown",variant:"secondary",name:t,renderOption:b,searchable:!0,full:!0,options:x})):null,n.createElement(E.A,{height:m.b},n.createElement(s.A,{type:"button",variant:"inline",size:"medium",disabled:a,onClick:()=>{T(!0)}},n.createElement(_.sA,{id:x.length?"COMMON_NEW":"COMMON_CREATE_NEW"})))),O?n.createElement(h.A,{visible:!a},O):null,v?n.createElement(A.A,{hideModal:()=>{T(!1)},handleGroupField:a=>{a?.group_type&&e.includes(a.group_type)&&o(t,a._id)},types:e}):null)}},333422:(e,t,a)=>{a.d(t,{AC:()=>h,D7:()=>p,Ie:()=>C,JL:()=>A,JX:()=>f,KY:()=>E,O2:()=>u,Op:()=>m,Rm:()=>_,e$:()=>b,t7:()=>g,yr:()=>w});var l=a(927099),n=a(822336),i=a(71479),d=a(132196),r=a(311785),o=a(596441),s=a(566723),c=a(294303);const m=(0,i.A)(c.A,(0,r.A)("inline","wrap"))`
  position: relative;
  flex: ${({inline:e})=>e?"1 1 0":"0 0 100%"};
  align-items: flex-start;
  flex-flow: ${({wrap:e})=>"row "+(e?"wrap":"nowrap")};
  gap: ${s.kc};
`,u=(0,i.A)(c.A,{shouldForwardProp:e=>"editMaxHeight"!==e})`
  flex-direction: column;
  max-height: ${({editMaxHeight:e})=>`${e||300}px`};
  overflow-y: auto;
  overflow-x: hidden;
  gap: ${s.YC};
`,h=(0,i.A)("div",{shouldForwardProp:e=>!["isWindowsTable","rows","tableMaxHeight","marginTop"].includes(e)})`
  width: 100%;
  // windows table inherits height from parent container
  height: ${({rows:e,isWindowsTable:t})=>t&&`${o.I.ROW_HEIGHT*e+o.I.HEADER_HEIGHT}`}px;
  max-height: ${({tableMaxHeight:e})=>`${e}px`||"auto"};
  margin-top: ${({marginTop:e})=>e||s.Ln};

  table {
    td {
      max-width: 170px;

      span {
        overflow: hidden;
        text-overflow: ellipsis;
      }
    }
  }
`,p=(0,i.A)(l.A)`
  margin-right: ${s.YC};
`,E=d.AH`
  :first-of-type {
    padding: 0 ${s.fS} 0 0px;
  }
`,_="drag-and-drop-table-row-placeholder",g=(0,i.A)(c.A)`
  flex-direction: column;

  /* Adjust weird padding on the right side for the ID column when right aligned (drag & drop table) */
  table > thead > tr > th:last-of-type {
    padding-right: ${s.kc};
  }

  /* Add missing border between drag and drop groups (tbody elements) */
  table > tbody {
    border-bottom: ${({theme:{themeName:e}})=>n.Ay[`desktop-border-divider-${e}`]};
  }
  /* Last cell in table is hover content which is not used in this table */
  table > tbody[data-rbd-droppable-context-id] td:not(:last-of-type),
  table > thead > tr > th {
    /* Align drag & drop table cell padding to regular table padding */
    padding-right: ${s.kc} !important;
  }
  /* Align drop zone placeholder row when a row is dragged to matched the CSS overrides for drag and drop table we use */
  table .${_} {
    display: flex;
  }
`,A=d.AH`
  /* This is default for the table rows, so we need it for the header. */
  display: flex;
  width: 100%;

  > th:first-child {
    /* Since we flex the header, we must specify this to align with the table rows. */
    width: 24px;
  }
  > th:not(:first-child) {
    /* Something inside UIC sets the padding to 8px for table header and 5px for table rows. This aligns it to make flex work. */
    padding-right: ${s.kc} !important;
  }
`,b=d.AH`
  /* Override the padding-right of the first column to align with manage + drop modes. */
  > th:first-child {
    padding-right: ${s.kc} !important;
  }
  > th:first-child:has(> label) {
    padding-right: 1px !important;
    width: 36px;
  }
`,w=d.AH`
  /* UIC already does this for some table states, like drag and drop and when in manage mode. If we just use this ALWAYS, we're avoiding many issues related to using different alignment techniques in different places. */
  display: flex;
`,f=d.AH`
  tbody {
    display: flex;
    flex-direction: column;
  }
`;function C(e,t){return d.AH`
    width: ${t.width?`${t.width}px`:"auto"};
    min-width: ${t.minWidth?`${t.minWidth}px`:"0px"};
    flex: ${t.growthFactor||0} !important;
    padding-left: ${s.kc} !important;
    padding-right: ${s.kc} !important;
  `}},335928:(e,t,a)=>{a.d(t,{A:()=>i});var l=a(951272),n=a(465543);const i=()=>{const{dirty:e}=(0,l.j7)();return(0,n.w)(e),null}},352466:(e,t,a)=>{a.d(t,{A:()=>c});var l=a(469733),n=a(296540),i=a(294303),d=a(699784),r=a(610006),o=a(198494),s=a(679783);const c=()=>{const e=(0,l.useSelector)(o.jc);return n.createElement(i.A,{flexDirection:"column",width:"100%"},n.createElement(s.A,{label:n.createElement(d.sA,{id:"COMMON_SCHEDULE"}),tooltip:n.createElement(d.sA,{id:"SETTINGS_SECURITY_SCHEDULE_DESCRIPTION"})}),n.createElement(r.A,{stackTimeInputs:!e}))}},372737:(e,t,a)=>{var l;a.d(t,{U:()=>l}),function(e){e.ARROW_DOWN="ArrowDown",e.ARROW_UP="ArrowUp",e.ENTER="Enter",e.ESCAPE="Escape"}(l||(l={}))},379509:(e,t,a)=>{a.d(t,{A:()=>i});var l=a(296540),n=a(143811);const i=({disabled:e,name:t})=>l.createElement(n.A,{full:!0,variant:"secondary",name:t,disabled:e,placeholder:"SETTINGS_SECURITY_ZONE_IPV6_INTERFACE_ID_PLACEHOLDER"})},455155:(e,t,a)=>{a.d(t,{A:()=>s});var l=a(469733),n=a(296540),i=a(130851),d=a(765562);const r={};const o=(0,a(71479).A)("img",{shouldForwardProp:e=>"dimension"!==e})`
  ${({dimension:e=22})=>`\n    height: ${e}px;\n    width: ${e}px;\n  `}
`,s=(0,n.memo)(({iconFileName:e,dimension:t,style:a={}})=>{const s=(0,l.useSelector)(i.p);return n.createElement(o,{src:r[e]||encodeURI(`${d.A.dpiPath}${e}`),dimension:t,onLoad:({target:t})=>{r[e]=t.src},onError:({currentTarget:e})=>{e.src=`${s}/dpiFallback.svg`},style:a})})},586371:(e,t,a)=>{var l;a.d(t,{EE:()=>i,Uh:()=>l,Vf:()=>n}),function(e){e.SINGLE="single",e.PLURAL="plural"}(l||(l={}));const n="editActive",i=20},596441:(e,t,a)=>{a.d(t,{I:()=>l});const l={HEADER_HEIGHT:32,ROW_HEIGHT:32,EDIT_FIELD_HEIGHT:36,getHeight(e,t,a,l){return Math.min((l||this.ROW_HEIGHT)*e+(a??this.HEADER_HEIGHT),(l||this.ROW_HEIGHT)*t+(a??this.HEADER_HEIGHT))},getEditContainerHeight(e,t,a){return Math.min((a||this.EDIT_FIELD_HEIGHT)*e,(a||this.EDIT_FIELD_HEIGHT)*t)}}},610006:(e,t,a)=>{a.d(t,{A:()=>N});var l=a(469733),n=a(296540),i=a(951272),d=a(596221),r=a.n(d),o=a(208288),s=a(86838),c=a(696281),m=a(446400),u=a(79760),h=a(464265),p=a(564981),E=a(660989),_=a(566723),g=a(553432),A=a(242366),b=a(317672),w=a(349665),f=a(143811),C=a(294303),y=a(699784),v=a(198494),T=a(16914),x=a(598796),O=a(406664);const I=({baseName:e,label:t,width:a=O.Kg})=>{const i=(0,l.useSelector)(v.jc);return n.createElement(C.A,{gap:_.YC},n.createElement(f.A,{type:"timeInput",variant:"secondary",use24h:i,name:e,width:a,label:t}))},N=({disabled:e,stackTimeInputs:t})=>{const{formatMessage:a}=(0,y.tz)(),{values:l,setFieldValue:d,errors:v,touched:N,submitCount:M}=(0,i.j7)(),H=(0,h.A)(x.Xj.FIREWALL_SCHEDULING_AFTER_2038),$=(0,u.t$)("schedule_repeat_on_days",v,N,M),k=(0,u.t$)("schedule_date_range_start",v,N,M)||(0,u.t$)("schedule_date_range_end",v,N,M),D=(0,u.t$)("schedule_date",v,N,M),R=(0,n.useCallback)(e=>t=>{d("schedule_repeat_on_days",!t&&l.schedule_repeat_on_days.includes(e)?l.schedule_repeat_on_days.filter(t=>t!==e):[...l.schedule_repeat_on_days,e])},[l.schedule_repeat_on_days,d]);return n.createElement(A.A,null,n.createElement(g.A,null,O.z3.map(t=>n.createElement(f.A,{name:"schedule_mode",type:"radio",value:t,key:t,disabled:e},n.createElement(y.sA,{id:O.Lr[t]})))),l.schedule_mode===T.Td.CUSTOM?n.createElement(C.A,{flexDirection:"column",width:"100%"},n.createElement(c.A,{minValue:(0,o.A)(new Date,"CalendarDate"),maxValue:H?void 0:(0,o.A)(E.R,"CalendarDate"),label:a({id:"COMMON_DATE_RANGE"}),value:{start:(0,o.A)(r()(l.schedule_date_range_start),"CalendarDate"),end:(0,o.A)(r()(l.schedule_date_range_end),"CalendarDate")},onChange:e=>{e?(d("schedule_date_range_start",e.start),d("schedule_date_range_end",e.end)):(d("schedule_date_range_start",void 0),d("schedule_date_range_end",void 0))},isInvalid:!!k||void 0}),k?n.createElement(s.A,{isInvalid:!0,style:{padding:0},label:k}):null):null,l.schedule_mode===T.Td.EVERY_WEEK||l.schedule_mode===T.Td.CUSTOM?n.createElement(w.A,null,n.createElement(b.A,{htmlFor:"schedule_repeat_on_days"},n.createElement(y.sA,{id:"COMMON_REPEAT_ON"})),n.createElement(C.A,{gap:_.kc,alignItems:"center"},n.createElement(C.A,{gap:_.YC},Object.values(p.g).map(e=>n.createElement(f.A,{key:e,value:e,type:"toggleBox",name:"schedule_repeat_on_days",checked:l.schedule_repeat_on_days.includes(e),onChange:R(e)},n.createElement(y.sA,{id:O.p0[e]})))),n.createElement(C.A,{minHeight:24,alignItems:"center"},n.createElement(f.A,{type:"realCheckbox",name:"schedule_weekly_all_day"},n.createElement(y.sA,{id:"COMMON_ALL_DAY"})))),$?n.createElement(s.A,{isInvalid:!0,label:$}):null):null,l.schedule_mode===T.Td.ONE_TIME_ONLY?n.createElement(C.A,{flexDirection:"column",width:"100%"},n.createElement(m.A,{minValue:(0,o.A)(new Date,"CalendarDate"),maxValue:H?void 0:(0,o.A)(E.R,"CalendarDate"),label:a({id:"COMMON_DATE"}),value:(0,o.A)(r()(l.schedule_date),"CalendarDate"),onChange:e=>d("schedule_date",e?.toString()),name:"schedule_date",isInvalid:!!D||void 0}),D?n.createElement(s.A,{isInvalid:!0,style:{padding:0},label:D}):null):null,l.schedule_mode===T.Td.EVERY_DAY||l.schedule_mode===T.Td.EVERY_WEEK&&!l.schedule_weekly_all_day||l.schedule_mode===T.Td.ONE_TIME_ONLY||l.schedule_mode===T.Td.CUSTOM&&!l.schedule_weekly_all_day?n.createElement(C.A,{flexDirection:t?"column":"row",gap:t?_.kc:_.Ln},n.createElement(I,{label:"COMMON_START_TIME",baseName:"schedule_day_start",width:"full"}),n.createElement(I,{label:"COMMON_END_TIME",baseName:"schedule_day_end",width:"full"})):null)}},705426:(e,t,a)=>{a.d(t,{A:()=>d});var l=a(296540),n=a(617147),i=a(248543);const d=({children:e=null,hideModal:t,onRequestClose:a,portalSelector:d=i.J,forwardedRef:r=null,...o})=>l.createElement(n.A,{isOpen:!0,shouldCloseOnEsc:!0,onRequestClose:a||t,parentSelector:d,ref:r,...o},e)},854246:(e,t,a)=>{a.d(t,{A:()=>o});var l=a(296540),n=a(71479),i=a(132196),d=a(699784);const r=(0,n.A)("div",{shouldForwardProp:e=>"align"!==e})`
  ${({align:e})=>e&&`text-align: ${e}`};
  color: ${({theme:{motifPalette:{red06:e}}})=>e};
  font-size: ${({theme:{fontSizes:e}})=>e[0]}px;
  line-height: 20px;
`,o=({align:e="left",children:t=null,className:a=null,translation:n=null,visible:o=!1})=>o?l.createElement(r,{align:e,className:(0,i.cx)(a)},n&&l.createElement(d.sA,{id:n}),t):null},915752:(e,t,a)=>{a.d(t,{A:()=>o});var l=a(296540),n=a(784045),i=a(143811),d=a(212545),r=a(699784);const o=({fieldName:e,disabled:t})=>{const{formatMessage:a}=(0,r.tz)(),o=(0,l.useMemo)(()=>(0,n.A)(d._O.map(e=>({label:a({id:d.QK[e]}),value:e})),({label:e})=>e),[a]);return l.createElement(i.A,{type:"picklist",options:o,name:e,truncateLabels:!0,triggerButtonText:"COMMON_SELECT",isWindowed:!0,disabled:t,isFullWidth:!0})}}}]);