"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[15372],{84385(e,t,r){r.d(t,{A:()=>o});var n=r(296540),i=r(722860);(0,r(349005).A)(".divider__HJLxc4rP{border:none}.divider-horizontal-light__HJLxc4rP{border-top:1px solid rgba(33,35,39,.07)}.divider-horizontal-dark__HJLxc4rP{border-top:1px solid hsla(214,8%,98%,.07)}.divider-vertical__HJLxc4rP{height:100%;width:1px}.divider-vertical-light__HJLxc4rP{border-left:1px solid rgba(33,35,39,.07)}.divider-vertical-dark__HJLxc4rP{border-left:1px solid hsla(214,8%,98%,.07)}");var a=r(325898);const l=(0,i.c)({divider:"divider__HJLxc4rP","divider-horizontal-light":"divider-horizontal-light__HJLxc4rP","divider-horizontal-dark":"divider-horizontal-dark__HJLxc4rP","divider-vertical":"divider-vertical__HJLxc4rP","divider-vertical-light":"divider-vertical-light__HJLxc4rP","divider-vertical-dark":"divider-vertical-dark__HJLxc4rP"}),o=n.forwardRef((e,t)=>{const{orientation:r="horizontal",style:i,className:o,motif:d,...c}=e,{motif:s}=(0,a.A)(d);return n.createElement("vertical"===r?"div":"hr",{style:i,className:l.concat(o)("divider",`divider-${r}`,`divider-${r}-${s}`),ref:t,...c})})},334188(e,t,r){r.d(t,{A3:()=>s,Fw:()=>m,XH:()=>c,lp:()=>A});var n=r(801081),i=r(860631),a=r(302167),l=r(366188),o=r(776288),d=r(532419);const c=(0,n.Mz)(a.bL,l.a3,(e,t)=>e&&t.every(({wan_smartq_enabled:e})=>!e)),s=(0,n.Mz)(d.U$,e=>(0,i.$F)(e)),A=(0,n.Mz)(d.U$,e=>(0,i.$F)(e)&&(e.hardware_offload??!0)),m=(0,n.Mz)(d.U$,e=>(0,i.WM)(e.fw2_caps,o.A.HWOFFLOAD_QOS_AND_SMART_QUEUE))},889764(e,t,r){r.d(t,{H5:()=>d,Lq:()=>o,n0:()=>l});var n=r(849513),i=r(276907),a=r(919952);const l=e=>e[a.U.SHARED][i.N.PROPERTY_PANEL]?.[n.Io.TAB_GET_DATA_FUNCTION]||{},o=e=>e[a.U.SHARED][i.N.PROPERTY_PANEL]?.[n.Io.TAB_SUBMIT_FUNCTION]||{},d=e=>e[a.U.SHARED][i.N.PROPERTY_PANEL]?.[n.Io.TAB_RESET_FUNCTION]||{}},789367(e,t,r){var n;r.d(t,{K:()=>n}),function(e){e.ALL="all",e.ACL_RULES="acl-rules",e.DNS_RECORDS="dns-records",e.FIREWALL="firewall",e.NAT_RULES="nat-rules",e.POLICY_BASED_ROUTES="policy-based-routes",e.PORT_FORWARDING="port-forwarding",e.QOS_RULES="qos-rules",e.STATIC_ROUTES="static-routes"}(n||(n={}))},689965(e,t,r){r.d(t,{A:()=>u,I:()=>n});var n,i=r(296540),a=r(822336),l=r(963724),o=r(71479),d=r(825032),c=r(566723),s=r(294303),A=r(311785);!function(e){e.ACCORDION="accordion",e.BUTTON_LIST="buttonList"}(n||(n={}));const m=(0,o.A)(s.A,(0,A.A)("marginBottom","isButtonList","margin","flex","width","padding","nested","background"))`
  background-color: ${({background:e,nested:t,theme:{themeName:r}})=>e||a.Ay[r===d.S.DARK?`desktop-color-neutral-${t?"00":"01"}-dark`:`desktop-color-neutral-${t?"01":"00"}-light`]};
  padding: ${({theme:e,isButtonList:t,padding:r})=>r||(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}})=>a.Ay[`desktop-border-divider-${e}`]};\n      &:last-child {\n        border-bottom: none;\n      }\n    }\n  `:""}
`,E=(0,o.A)(l.A,(0,A.A)("marginBottom","margin","flex","padding","nested","background"))`
  background-color: ${({background:e,nested:t,theme:{themeName:r}})=>e||a.Ay[r===d.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||a.Ay[t===d.S.DARK?"desktop-color-neutral-01-dark":"desktop-color-neutral-00-light"]};
      height: 48px;
      padding: 0 ${c.Ln};
    }
    > div:nth-child(2) {
      margin-bottom: 0;
      padding: 0;
      > div {
        padding: 0 ${c.Ln} ${c.Ln};
      }
    }
  }
`,u=({type:e,marginBottom:t,margin:r,padding:a,flex:l,width:o,nested:d,...c})=>"items"in c?i.createElement(E,{marginBottom:t,margin:r,padding:a,flex:l,nested:d,...c}):i.createElement(m,{nested:d,width:o,marginBottom:t,margin:r,padding:a,flex:l,isButtonList:e===n.BUTTON_LIST,...c},c.children)},876773(e,t,r){r.d(t,{A:()=>l});var n=r(296540),i=r(758649),a=r(196010);const l=e=>n.createElement(i.A,{component:a.A,variant:"inline",size:"medium",...e})},363370(e,t,r){r.d(t,{A:()=>l});var n=r(296540),i=r(928085),a=r(876773);const l=e=>{const t=(0,i.A)(e.to);return n.createElement(a.A,{...e,to:t})}},998386(e,t,r){r.d(t,{HV:()=>a,pm:()=>l,vF:()=>i});var n=r(765562);const i=e=>`${n.A.fabricsOrchestration}?orchestrationId=${e?.template_id||""}&orgId=${e?.organization_id||""}`,a=e=>`${n.A.fabricsDeviceTemplates}/${e?.template_id||""}?orgId=${e?.organization_id||""}`,l=()=>`${n.A.fabricsOrchestration}`},152e3(e,t,r){r.d(t,{A:()=>O});var n=r(296540),i=r(436017),a=r(217439),l=r(314714),o=r(592563),d=r(71479),c=r(469733),s=r(180524),A=r(566723),m=r(349107),E=r(294303),u=r(916537),h=r(302167),g=r(457311),_=r(446367),v=r(998386);const p=(0,d.A)("div")`
  width: 100%;
  margin-bottom: ${A.Ln};
`,b=()=>{const e=(0,c.useSelector)(h.zu);return{isOrchestrated:(0,n.useMemo)(()=>(0,_.A)(e),[e]),globalSwitchSettings:e}},S=({globalSwitchSettings:e,children:t})=>{const r=(0,c.useDispatch)(),i=(0,n.useCallback)(()=>{r((0,g.Np)("global_network")).then(e=>{(e?.data?.setting_keys||[]).length>0&&r((0,g.Uc)(void 0,{resolveWithExisting:!1}))})},[r]);return n.createElement(s.A,{placement:"top start",description:n.createElement(E.A,{flexDirection:"column",width:"100%"},n.createElement(u.sA,{id:"COMMON_GLOBAL_SWITCH_SETTINGS_MANAGED_BY_FABRIC"}),n.createElement(E.A,{gap:A.YC,alignItems:"baseline"},n.createElement(m.A,{id:"COMMON_VIEW_IN_SITE_MANAGER",href:(0,v.vF)(e.cloud_template)}),n.createElement(a.A,{style:{textTransform:"lowercase"},size:"small"},n.createElement(u.sA,{id:"COMMON_OR"})),n.createElement(o.A,{variant:"destructive",fontSize:"inherit",onClick:i},n.createElement(u.sA,{id:"COMMON_DETACH"}))))},n.createElement("div",null,t))},O={Toggle:({isGlobalSwitchSettingsEnabled:e,setGlobalSwitchSettingsEnabled:t,noStyledRow:r})=>{const{isOrchestrated:l,globalSwitchSettings:o}=b(),d=(0,n.useCallback)(({target:{checked:e}})=>{t(e)},[t]),c=n.createElement(i.A,{full:!0,checked:e,onChange:d,disabled:l},n.createElement(E.A,{width:"100%",alignItems:"center"},n.createElement(a.A,{size:"medium",color:l?"disabled":void 0},n.createElement(u.sA,{id:"COMMON_GLOBAL_SWITCH_SETTINGS"})))),s=r?c:n.createElement(p,null,c);return l?n.createElement(S,{globalSwitchSettings:o},s):s},Checkbox:({isGlobalSwitchSettingsEnabled:e,setGlobalSwitchSettingsEnabled:t,onChange:r,noStyledRow:i})=>{const{isOrchestrated:o,globalSwitchSettings:d}=b(),c=(0,n.useCallback)(({target:{checked:e}})=>{t(e),r?.(e)},[r,t]),s=n.createElement(l.A,{id:"global-switch-settings-checkbox",checked:e,onChange:c,disabled:o},n.createElement(a.A,{size:"medium",color:o?"disabled":void 0},n.createElement(u.sA,{id:"COMMON_GLOBAL_SWITCH_SETTINGS"}))),A=i?s:n.createElement(p,null,s);return o?n.createElement(S,{globalSwitchSettings:d},A):A}}},896250(e,t,r){r.d(t,{A:()=>M});var n=r(469733),i=r(296540),a=r(951272),l=r(758649),o=r(968906),d=r(180524),c=r(592510),s=r(422969),A=r(398300),m=r(795097),E=r(137625),u=r(143811),h=r(363370),g=r(294303),_=r(845030),v=r(916537),p=r(789367),b=r(302167),S=r(457311),O=r(138155),C=r(551735),f=r(366188),R=r(634229),T=r(583950),N=r(211817),L=r(20284),I=r(334188),k=r(959341);const $="hardware_offload",w=(0,a.bk)({enableReinitialize:!0,mapPropsToValues:({hardware_offload:e=!0})=>({[$]:e}),handleSubmit:(e,{resetForm:t})=>{t({values:e})}}),D=({disabled:e})=>{const[t,r]=(0,i.useState)(!1),{setFieldValue:n,values:l}=(0,a.j7)();return i.createElement(E.A,{title:"DEVICE_HARDWARE_ACCELERATION_PROMPT_TITLE",message:"DEVICE_HARDWARE_ACCELERATION_PROMPT_DESCRIPTION",buttonMessage:"COMMON_ACTION_PROCEED",buttonVariant:"danger",showHeaderClose:!0,rootClose:!0,handleCancel:()=>{r(!1)},handleClose:()=>{r(!1)},handleConfirm:()=>{r(!1),n($,!1)},isOpen:t},i.createElement(u.A,{name:$,type:"realCheckbox",tooltipMessage:i.createElement(v.sA,{id:"DEVICE_HARDWARE_ACCELERATION_TOOLTIP"}),value:l[$],onChange:({target:{checked:e}})=>{e?n($,!0):r(!0)},disabled:e},i.createElement(v.sA,{id:"COMMON_HARDWARE_ACCELERATION"})))},x=()=>{const e=(0,n.useDispatch)(),t=(0,n.useSelector)(f.a3),r=(0,n.useSelector)(b.Dd),a=(0,n.useSelector)(O.l),E=(0,n.useSelector)(I.Fw),u=(0,n.useSelector)(N.K2);(0,i.useEffect)(()=>{e((0,L.uL)(void 0,{crudCacheStrategy:{type:c.e.CACHE}}))},[e]);const $=(0,i.useMemo)(()=>t.find(({wan_smartq_enabled:e})=>e),[t]),w=!!$&&!E,x=a.length>0&&!E,M=r.enabled,P=(0,i.useMemo)(()=>u.some(e=>e.ip_version===T.hz.IPV6),[u]),H=w||x||M||P;return(0,s.A)([(0,C.X6)(void 0,{crudCacheStrategy:{type:c.e.CACHE}}),(0,S.Uc)(void 0,{crudCacheStrategy:{type:c.e.CACHE}}),(0,R.Sk)(void 0,{crudCacheStrategy:{type:c.e.CACHE}})],i.createElement(d.A,{description:H?i.createElement(g.A,{flexDirection:"column"},i.createElement(v.sA,{id:"DEVICE_HARDWARE_ACCELERATION_DISABLED_BY"}),i.createElement(m.A,null,w?i.createElement("li",null,i.createElement(l.A,{variant:"inline",onClick:()=>{e((0,_.XP)({type:A.H.WAN,id:$?._id}))},...o.A.addDataTestId(o.A.TestId.SIDE_PANEL_TRIGGER)},i.createElement(v.sA,{id:"COMMON_SMART_QUEUES"}))):null,x?i.createElement("li",null,i.createElement(h.A,{size:"inherit",to:`${k.E0}?${k.XU}=${p.K.QOS_RULES}`},i.createElement(v.sA,{id:"COMMON_QOS"}))):null,M?i.createElement("li",null,i.createElement(h.A,{size:"inherit",to:`${k.bB}/${k.Uy.TRAFFIC_LOGGING}`},i.createElement(v.sA,{id:"COMMON_NETFLOW"}))):null,P?i.createElement("li",null,i.createElement(h.A,{size:"inherit",to:`${k.E0}?${k.XU}=${p.K.NAT_RULES}`},i.createElement(v.sA,{id:"COMMON_IPV6_NAT"}))):null)):null},i.createElement("span",null,i.createElement(D,{disabled:H}))))},M=w(({dirty:e,isValid:t,values:r,setFormDirty:a,setFormInvalid:l,resetForm:o,formName:d="hardwareAcceleration"})=>{const c=(0,n.useDispatch)();return(0,i.useEffect)(()=>(c((0,_.uo)({[d]:()=>r})),c((0,_.Oo)({[d]:()=>o({values:r})})),c((0,_.rW)({[d]:o})),()=>{c((0,_.uo)({[d]:null})),c((0,_.Oo)({[d]:null})),c((0,_.rW)({[d]:null}))}),[c,o,r,d]),(0,i.useEffect)(()=>{a(d,e),l(d,!t)},[a,e,l,t,d]),i.createElement(x,null)})},372737(e,t,r){var n;r.d(t,{U:()=>n}),function(e){e.ARROW_LEFT="ArrowLeft",e.ARROW_RIGHT="ArrowRight",e.ARROW_DOWN="ArrowDown",e.ARROW_UP="ArrowUp",e.ENTER="Enter",e.ESCAPE="Escape",e.BACKSPACE="Backspace",e.DELETE="Delete",e.TAB="Tab"}(n||(n={}))},449688(e,t,r){r.d(t,{A:()=>i});var n=r(296540);const i=function(e){return t=>r=>{const[i,a]=(0,n.useState)(Object.fromEntries(e.map(e=>[e,!1]))),[l,o]=(0,n.useState)(Object.fromEntries(e.map(e=>[e,!1]))),d=(0,n.useCallback)((e,t)=>{a(r=>({...r,[e]:t}))},[]),c=(0,n.useCallback)((e,t)=>{o(r=>({...r,[e]:t}))},[]),s=!!Object.values(i).find(e=>e),A=!!Object.values(l).find(e=>e);return n.createElement(t,{isDirty:s,isInvalid:A,formStates:i,setFormDirty:d,setFormInvalid:c,...r})}}},383149(e,t,r){r.d(t,{A:()=>i});var n=r(885205);const i=function(e,t){return!(null==e||!e.length)&&(0,n.A)(e,t,0)>-1}},887809(e,t,r){r.d(t,{A:()=>n});const n=function(e,t,r){for(var n=-1,i=null==e?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}},458043(e,t,r){r.d(t,{A:()=>c});var n=r(8300),i=r(383149),a=r(887809),l=r(45572),o=r(552789),d=r(764099);const c=function(e,t,r,c){var s=-1,A=i.A,m=!0,E=e.length,u=[],h=t.length;if(!E)return u;r&&(t=(0,l.A)(t,(0,o.A)(r))),c?(A=a.A,m=!1):t.length>=200&&(A=d.A,m=!1,t=new n.A(t));e:for(;++s<E;){var g=e[s],_=null==r?g:r(g);if(g=c||0!==g?g:0,m&&_==_){for(var v=h;v--;)if(t[v]===_)continue e;u.push(g)}else A(t,_,c)||u.push(g)}return u}},144757(e,t,r){r.d(t,{A:()=>o});var n=r(458043),i=r(187671),a=r(224326),l=r(153533);const o=(0,a.A)(function(e,t){return(0,l.A)(e)?(0,n.A)(e,(0,i.A)(t,1,l.A,!0)):[]})},46996(e,t,r){r.d(t,{A:()=>i});var n=r(874130);const i=function(e,t){return(0,n.A)(e,t)}}}]);