"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[74445],{471567(e,t,n){n.d(t,{A:()=>i});var a=n(602086),o=n(141992);const i=(0,n(272338).w)(e=>(0,a.createElement)("svg",(0,o.d)({viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em"},e),(0,a.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4 3a1 1 0 0 1 1-1h7a1 1 0 0 1 .707.293l3 3A1 1 0 0 1 16 6v11a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V3Z",fill:"currentColor",className:e.twotonedclassname}),(0,a.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5 2a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V6a1 1 0 0 0-.293-.707l-3-3A1 1 0 0 0 12 2H5Zm0 15V3h6.999v2a1 1 0 0 0 1 1h2L15 17H5Z",fill:"currentColor",className:e.baseclassname}),(0,a.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.999 2a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V6a1 1 0 0 0-.293-.707l-3-3A1 1 0 0 0 12 2H5Zm10 4.5h-2.5a1 1 0 0 1-1-1V3L15 6.5Z",fill:"currentColor",className:e.fillclassname})))},789577(e,t,n){n.d(t,{A:()=>i});var a=n(602086),o=n(141992);const i=(0,n(272338).w)(e=>(0,a.createElement)("svg",(0,o.d)({viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em"},e),(0,a.createElement)("rect",{x:5,y:5,width:10,height:12,rx:1,fill:"currentColor",className:e.twotonedclassname}),(0,a.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.5 5V4a1 1 0 0 1 1-1h5a1 1 0 0 1 1 1v1h3a.5.5 0 0 1 0 1h-13a.5.5 0 0 1 0-1h3Zm6 0V4h-5v1h5Z",fill:"currentColor",className:e.baseclassname}),(0,a.createElement)("path",{d:"M14 17H6a1 1 0 0 1-1-1V7.5a.5.5 0 0 1 1 0V16h8V7.5a.5.5 0 0 1 1 0V16a1 1 0 0 1-1 1Z",fill:"currentColor",className:e.baseclassname}),(0,a.createElement)("path",{d:"M8 13.5a.5.5 0 0 0 1 0v-4a.5.5 0 0 0-1 0v4Zm3.5.5a.5.5 0 0 1-.5-.5v-4a.5.5 0 0 1 1 0v4a.5.5 0 0 1-.5.5Z",fill:"currentColor",className:e.baseclassname}),(0,a.createElement)("path",{d:"M16.854 5.854A.502.502 0 0 0 16.5 5h-3V4a1 1 0 0 0-1-1h-5a1 1 0 0 0-1 1v1h-3a.502.502 0 0 0-.5.5.5.5 0 0 0 .5.5h13a.502.502 0 0 0 .354-.146Z",fill:"currentColor",className:e.fillclassname}),(0,a.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 7h8a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1Zm2.5 7a.5.5 0 0 0 .5-.5v-4a.502.502 0 0 0-.5-.5.5.5 0 0 0-.5.5v4a.5.5 0 0 0 .5.5Zm3 0a.5.5 0 0 0 .5-.5v-4a.502.502 0 0 0-.5-.5.5.5 0 0 0-.5.5v4a.5.5 0 0 0 .5.5Z",fill:"currentColor",className:e.fillclassname})))},333316(e,t,n){n.d(t,{A:()=>a});const a=(0,n(602086).createContext)({isStandalone:!0,header:[null,()=>{}],footer:[null,()=>{}]})},232932(e,t,n){n.d(t,{A:()=>i});var a=n(602086),o=n(333316);function i(e){const{children:t}=e,{isStandalone:n,footer:[,i]}=(0,a.useContext)(o.A);return(0,a.useLayoutEffect)(()=>{if(!n)return i(t),()=>i(null)},[n,t]),a.createElement(a.Fragment,null,n&&t)}},765414(e,t,n){n.d(t,{A:()=>r,R:()=>r});var a=n(602086),o=n(862388),i=n(3191);const l=(0,n(999803).c)(i.A),r=a.forwardRef(function(e,t){const{accept:n,multiple:i=!1,id:r="file-upload",name:s="file-upload",className:c="",inputClassName:d="",onChange:m=o.A,children:u,...A}=e,_=(0,a.useRef)(null),T=t||_;return a.createElement("label",{className:c,tabIndex:0,onKeyDown:e=>{var t;"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),e.stopPropagation(),null===(t=T.current)||void 0===t||t.click())}},a.createElement("input",{type:"file",id:r,name:s,accept:n,multiple:i,ref:T,onChange:e=>m(e,T),className:l.concat(d)("input"),...A}),u)})},3191(e,t,n){n.d(t,{A:()=>o});var a=n(455642),o={input:"input__kxWRaesR",uploadButton:"uploadButton__kxWRaesR"};(0,a.A)(".input__kxWRaesR{display:none}.uploadButton__kxWRaesR{-webkit-appearance:none;-moz-appearance:none;appearance:none}")},948866(e,t,n){n.d(t,{A:()=>d});var a=n(602086),o=n(765414),i=n(3191),l=n(999803),r=n(599110),s=n(67076);const c=(0,l.c)(i.A),d=(0,s.A)(({id:e="file",name:t="file",accept:n,multiple:i=!1,motif:l="light",disabled:s,children:d,onChange:m,className:u,buttonClassName:A,forwardedRef:_,...T})=>a.createElement(o.R,{id:e,name:t,accept:n,multiple:i,onChange:m,className:u,disabled:s},a.createElement(r.A,{component:"span",className:c.concat(A)("uploadButton"),motif:l,ref:_,disabled:s,...T},d)))},612389(e,t,n){n.d(t,{A:()=>m});var a=n(274934),o=n(814557),i=n(938984),l=n(247816),r=n(263705),s=n(309130),c=n(100978);const d=(0,l.A)(i.A)`
  line-height: 20px;
`,m=({icon:e,description:t,action:n,footer:i,background:l,...m})=>{const{themeName:u}=(0,r.u)();return(0,a.jsxs)(c.A,{flexGrow:1,borderRadius:s.YC,padding:s.kc,background:l||o.Ay[`desktop-color-neutral-01-${u}`],gap:s.kc,flexDirection:"column",...m,children:[(0,a.jsxs)(c.A,{flexGrow:1,gap:s.kc,children:[e,t?(0,a.jsx)(d,{size:"medium",children:t}):null,n?(0,a.jsx)(c.A,{marginLeft:"auto",children:(0,a.jsx)(d,{size:"medium",children:n})}):null]}),i]})}},753959(e,t,n){n.d(t,{A:()=>s});var a=n(274934),o=n(814557),i=n(853777),l=n(263705),r=n(612389);const s=({children:e,icon:t,background:n,...s})=>{const{themeName:c}=(0,l.u)();return(0,a.jsx)(r.A,{icon:t||(0,a.jsx)(i.A,{variant:"fill",size:"original",color:o.Ay[`desktop-color-ublue-06-${c}`]}),description:e,background:n,...s})}},535322(e,t,n){n.d(t,{A:()=>_,I:()=>a});var a,o=n(274934),i=n(814557),l=n(158885),r=n(247816),s=n(565527),c=n(309130),d=n(100978),m=n(291508);!function(e){e.ACCORDION="accordion",e.BUTTON_LIST="buttonList"}(a||(a={}));const u=(0,r.A)(d.A,(0,m.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"}-${s.S.DARK}`:`desktop-color-neutral-${t?"01":"00"}-${s.S.LIGHT}`]};
  padding: ${({isButtonList:e,padding:t})=>t||(e?`0 ${c.Ln}`:c.Ln)};
  margin-bottom: ${({marginBottom:e})=>e||c.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}})=>i.Ay[`desktop-border-divider-${e}`]};\n      &:last-child {\n        border-bottom: none;\n      }\n    }\n  `:""}
`,A=(0,r.A)(l.A,(0,m.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"}-${s.S.DARK}`:`desktop-color-neutral-${t?"01":"00"}-${s.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||i.Ay[t===s.S.DARK?`desktop-color-neutral-01-${s.S.DARK}`:`desktop-color-neutral-00-${s.S.LIGHT}`]};
      height: 48px;
      padding: 0 ${c.Ln};
    }
    > div:nth-child(2) {
      margin-bottom: 0;
      padding: 0;
      > div {
        padding: 0 ${c.Ln} ${c.Ln};
      }
    }
  }
`,_=({type:e,marginBottom:t,margin:n,padding:i,flex:l,width:r,nested:s,...c})=>"items"in c?(0,o.jsx)(A,{marginBottom:t,margin:n,padding:i,flex:l,nested:s,...c}):(0,o.jsx)(u,{nested:s,width:r,marginBottom:t,margin:n,padding:i,flex:l,isButtonList:e===a.BUTTON_LIST,...c,children:c.children})},89469(e,t,n){n.d(t,{A:()=>r});var a=n(274934),o=n(602086),i=n(309130),l=n(100978);const r=(0,o.forwardRef)((e,t)=>(0,a.jsx)(l.A,{ref:t,flexDirection:"column",gap:i.kc,width:"100%",...e}))},756782(e,t,n){n.d(t,{A:()=>E});var a=n(274934),o=n(814557),i=n(602086),l=n(938984),r=n(247816),s=n(309130),c=n(590979),d=n(147045),m=n(291508),u=n(304151),A=n(100978),_=n(535322),T=n(89469);const p=(0,r.A)(_.A,(0,m.A)("isOutlined"))`
  border: ${({theme:{themeName:e},isOutlined:t})=>`1px solid ${t?o.Ay[`desktop-color-ublue-06-${e}`]:"transparent"}`};
`,E=({children:e,title:t,tooltip:n,tooltipProps:o,[d.L]:r,titleAction:m,isOutlined:_})=>{const E=(e=>i.Children.toArray(e).length>0)(e);return(0,a.jsx)(p,{marginBottom:"none",...c.A.addDataTestId(r??""),isOutlined:_,children:(0,a.jsxs)(A.A,{flexDirection:"column",...E&&{gap:s.Ln},width:"100%",children:[t?(0,a.jsxs)(A.A,{alignItems:"center",gap:s.YC,justifyContent:"space-between",width:"100%",children:[(0,a.jsxs)(A.A,{gap:s.YC,alignItems:"center",children:[(0,a.jsx)(l.A,{variant:"heading-medium",children:t}),n?(0,a.jsx)(u.A,{description:n,portal:!0,...o}):null]}),m?(0,a.jsx)(A.A,{children:m}):null]}):null,E?(0,a.jsx)(T.A,{children:e}):null]})})}},594492(e,t,n){n.d(t,{A:()=>m});var a=n(274934),o=n(602086),i=n(599110),l=n(247816),r=n(309130),s=n(470070),c=n(291508);const d=(0,l.A)("footer",(0,c.A)("hasFormResetButton"))`
  display: flex;
  justify-content: ${({hasFormResetButton:e})=>e?"space-between":"flex-end"};
  padding: ${r.S2} ${r.fS};
  gap: ${r.kc};
`,m=({allowCancel:e,isDirty:t,isInvalid:n,isSubmitting:l,onFormSubmit:r,onFormReset:c,onFormCancel:m,className:u,submitButtonText:A,customButton:_,applyButton:T,applyButtonFirst:p,hideCancelButton:E,form:S})=>{const h=(0,o.useMemo)(()=>T||(0,a.jsx)(i.A,{name:"submit",variant:"primary",type:"submit",onClick:r,disabled:!t||n||l,form:S,children:(0,a.jsx)(s.sA,{id:A||"COMMON_ACTION_APPLY_CHANGES"})}),[T,S,t,n,l,r,A]);return(0,a.jsxs)(d,{className:u,hasFormResetButton:!!c,children:[p?h:_,E?null:(0,a.jsx)(i.A,{name:"cancel",variant:"default",type:"button",onClick:m,disabled:!e&&!t,children:(0,a.jsx)(s.sA,{id:"COMMON_ACTION_CANCEL"})}),c?(0,a.jsx)(i.A,{name:"reset",variant:"default",type:"button",onClick:c,disabled:!t,children:(0,a.jsx)(s.sA,{id:"COMMON_ACTION_RESET_TO_DEFAULT"})}):null,p?_:h]})}},115114(e,t,n){n.d(t,{A:()=>d});var a=n(274934),o=n(232932),i=n(247816),l=n(409844),r=n(594492);const s=(0,i.A)("div")`
  height: 66px;
`,c=l.AH`
  padding: 0px !important;
`,d=({isDirty:e,onFormSubmit:t,onFormCancel:n,isInvalid:i,...l})=>e?(0,a.jsx)(o.A,{children:(0,a.jsx)(r.A,{isDirty:e,onFormCancel:n,onFormSubmit:t,isInvalid:i,className:c,...l})}):(0,a.jsx)(s,{})},174445(e,t,n){n.r(t),n.d(t,{default:()=>H});var a=n(274934),o=n(977872),i=n(159469),l=n(464920),r=n(436417),s=n(205521),c=n(700444),d=n(427017),m=n(115114),u=n(115378),A=n(241792),_=n(260334);const T=A.E$(A.Ik({name:A.Yj({message:(0,_.rn)("SETTINGS_SYSTEM_CTRL_CERTIFICATES_NAME_VALIDATION")}).min(1,{message:(0,_.rn)("SETTINGS_SYSTEM_CTRL_CERTIFICATES_NAME_VALIDATION")}).max(64,{message:(0,_.rn)("SETTINGS_COMMON_FIELD_SHOULD_NOT_EXCEED_MAX_LENGTH",{limit:64,name:(0,_.rn)("COMMON_NAME")})})}),A.KC([A.Ik({type:A.eu(u.M.SELF_SIGNED),commonName:A.Yj().min(1,{message:(0,_.rn)("SETTINGS_SYSTEM_CTRL_CERTIFICATES_COMMON_NAME_VALIDATION")}),alternativeName:A.Yj()}),A.Ik({type:A.eu(u.M.UPLOAD),certificate:A.Yj().min(1,{message:(0,_.rn)("SETTINGS_SYSTEM_CTRL_CERTIFICATES_UPLOAD_CERTIFICATE_VALIDATION")}),private_key:A.Yj().min(1,{message:(0,_.rn)("SETTINGS_SYSTEM_CTRL_CERTIFICATES_UPLOAD_PRIVATE_KEY_VALIDATION")}),certificateFileName:A.Yj().min(1),private_keyFileName:A.Yj().min(1)})]));var p=n(42220),E=n(383061),S=n(938984),h=n(409844),g=n(635891),N=n(309130),C=n(753959),f=n(756782),I=n(89469),x=n(793442),v=n(100978),b=n(470070),R=n(726831),M=n(814557),L=n(948866),O=n(599110),j=n(95032),y=n(104669),F=n(789577),k=n(471567),D=n(263705),w=n(296261),$=n(304151);const G=h.AH`
  padding: 0;
`,Y=({form:e,name:t,fileNameField:n,label:o,tooltip:i,accept:l})=>{const{themeName:r}=(0,D.u)(),s=(0,_.L_)(),c=(0,p.FH)({control:e.control,name:n});return(0,a.jsx)(p.xI,{control:e.control,name:t,render:({field:d,fieldState:m})=>{const u=Boolean(d.value&&c);return(0,a.jsxs)(v.A,u?{flexDirection:"column",alignItems:"flex-start",children:[(0,a.jsxs)(v.A,{borderRadius:N.YC,padding:N.YC,gap:N.kc,width:"100%",background:M.Ay[`desktop-color-neutral-01-${r}`],minHeight:N.fS,alignItems:"center",children:[(0,a.jsx)(k.A,{size:"original",variant:"fill",color:M.Ay[`desktop-color-neutral-08-${r}`]}),(0,a.jsx)(j.A,{isTruncated:!0,style:{flex:1},color:"text-2",children:c}),(0,a.jsx)(p.xI,{control:e.control,name:n,render:({field:e})=>(0,a.jsx)(O.A,{variant:"inline",onClick:()=>{d.onChange(""),e.onChange("")},children:(0,a.jsx)(F.A,{size:"original",color:M.Ay[`desktop-color-neutral-08-${r}`]})})})]}),m.error?(0,a.jsx)(y.A,{isInvalid:!0,label:s(m.error.message)}):null]}:{flexDirection:"column",alignItems:"flex-start",children:[(0,a.jsxs)(v.A,{minHeight:N.fS,alignItems:"center",gap:N.kc,children:[(0,a.jsx)(p.xI,{control:e.control,name:n,render:({field:e})=>(0,a.jsx)(L.A,{name:t,variant:"link",accept:l,buttonClassName:h.AH`
                      ${G}
                    `,onChange:async({target:t})=>{const n=t.files?.[0];if(n)try{const t=await(0,w.Gu)(n);e.onChange(n.name),d.onChange(t)}catch{}else e.onChange(""),d.onChange("")},children:o})}),i?(0,a.jsx)($.A,{description:i,portal:!0}):null]}),m.error?(0,a.jsx)(y.A,{isInvalid:!0,label:s(m.error.message)}):null]})}})},B=[{id:u.M.SELF_SIGNED,label:(0,a.jsx)(b.sA,{id:"SETTINGS_SYSTEM_CTRL_CERTIFICATES_SELF_SIGNED"})},{id:u.M.UPLOAD,label:(0,a.jsx)(b.sA,{id:"COMMON_UPLOAD"})}],V=({form:e,isContentFiltering:t})=>{const n=(0,p.FH)({control:e.control,name:"type"}),{formatMessage:o}=(0,b.tz)();return(0,a.jsx)(f.A,{children:(0,a.jsxs)(v.A,{flexDirection:"column",width:"100%",gap:N.Ln,children:[(0,a.jsx)(C.A,{children:(0,a.jsx)(b.sA,{id:n===u.M.SELF_SIGNED?t?"SETTINGS_SYSTEM_CTRL_CERTIFICATES_SELF_SIGNED_INFO_CONTENT_FILTERING":"SETTINGS_SYSTEM_CTRL_CERTIFICATES_SELF_SIGNED_INFO":t?"SETTINGS_SYSTEM_CTRL_CERTIFICATES_ADD_NEW_INFO_CONTENT_FILTERING":"SETTINGS_SYSTEM_CTRL_CERTIFICATES_ADD_NEW_INFO",values:{link:(0,a.jsx)(x.A,{id:"COMMON_LEARN_MORE",href:R.A.sslInspectionArticle,noWrap:!0})}})}),(0,a.jsx)(g.A,{control:e.control,name:"name",label:(0,a.jsx)(b.sA,{id:"COMMON_NAME"})}),(0,a.jsx)(p.xI,{control:e.control,name:"type",render:({field:e})=>(0,a.jsx)(E.A,{tabsClassName:h.AH`
                flex: 1;
              `,variant:"capsule",tabs:B,selectedTab:e.value,onSelectTab:({id:t})=>e.onChange(t)})}),(0,a.jsxs)(I.A,n===u.M.SELF_SIGNED?{children:[(0,a.jsx)(g.A,{control:e.control,name:"commonName",label:(0,a.jsx)(b.sA,{id:"SETTINGS_SYSTEM_CTRL_CERTIFICATES_COMMON_NAME"}),tooltip:(0,a.jsx)(b.sA,{id:"SETTINGS_SYSTEM_CTRL_CERTIFICATES_COMMON_NAME_TOOLTIP"}),placeholder:o({id:"SETTINGS_SYSTEM_CTRL_CERTIFICATES_COMMON_NAME_PLACEHOLDER"})}),(0,a.jsx)(g.A,{control:e.control,name:"alternativeName",label:(0,a.jsx)(b.sA,{id:"SETTINGS_SYSTEM_CTRL_CERTIFICATES_ALTERNATIVE_NAME"}),tooltip:(0,a.jsx)(b.sA,{id:"SETTINGS_SYSTEM_CTRL_CERTIFICATES_ALTERNATIVE_NAME_TOOLTIP"})}),(0,a.jsx)(S.A,{size:"small",color:"text-3",children:(0,a.jsx)(b.sA,{id:"SETTINGS_SYSTEM_CTRL_CERTIFICATE_EXPIRES_AT"})})]}:{alignItems:"flex-start",children:[(0,a.jsx)(Y,{form:e,name:"certificate",fileNameField:"certificateFileName",label:(0,a.jsx)(b.sA,{id:"SETTINGS_SYSTEM_CTRL_CERTIFICATES_UPLOAD"}),tooltip:(0,a.jsx)(b.sA,{id:"SETTINGS_SYSTEM_CTRL_CERTIFICATES_UPLOAD_TOOLTIP"}),accept:".crt,.cer,.ca-bundle,.p7b,.p7c,.p7s,.pem"}),(0,a.jsx)(Y,{form:e,name:"private_key",fileNameField:"private_keyFileName",label:(0,a.jsx)(b.sA,{id:"SETTINGS_SYSTEM_CTRL_CERTIFICATES_UPLOAD_PRIVATE_KEY"}),tooltip:(0,a.jsx)(b.sA,{id:"SETTINGS_SYSTEM_CTRL_CERTIFICATES_UPLOAD_PRIVATE_KEY_TOOLTIP"}),accept:".pfx,p12"})]})]})})},P={type:u.M.SELF_SIGNED,name:"",commonName:"",alternativeName:"",certificate:"",private_key:"",certificateFileName:"",private_keyFileName:""},H=({activeItem:e})=>{const t=(0,o.wA)(),n=(0,r.m)({schema:T,defaultValues:P}),A=n.handleSubmit(async e=>{try{await(async e=>{const n=e.type===u.M.SELF_SIGNED?(0,d.pY)({name:e.name,common_name:e.commonName||"",alternative_name:e.alternativeName||""}):(0,d.GX)({name:e.name,certificate:btoa(e.certificate||""),private_key:btoa(e.private_key||"")});return t(n)})(e),t((0,d.d6)()),t((0,s.K5)()),n.reset()}catch(e){const n=(0,l.F)(e)?e:void 0;t((0,c.ox)({type:i.C.danger,message:"SETTINGS_SYSTEM_CTRL_CERTIFICATES_ADD_ERROR",errorMessage:n?.msg}))}});return(0,a.jsxs)("form",{onSubmit:A,style:{height:"100%"},children:[(0,a.jsx)(V,{form:n,isContentFiltering:e.id===u.I.CONTENT_FILTERING}),(0,a.jsx)(m.A,{onFormSubmit:A,onFormCancel:()=>n.reset(),isDirty:n.formState.isDirty,isSubmitting:n.formState.isSubmitting,submitButtonText:"SETTINGS_SYSTEM_CTRL_CERTIFICATE_ADD"})]})}},115378(e,t,n){var a,o;n.d(t,{I:()=>o,M:()=>a}),function(e){e.SELF_SIGNED="SELF_SIGNED",e.UPLOAD="UPLOAD"}(a||(a={})),function(e){e.SSL_INSPECTION="sslInspection",e.CONTENT_FILTERING="contentFiltering"}(o||(o={}))},436417(e,t,n){n.d(t,{m:()=>r});var a=n(602086),o=n(42220),i=n(369289),l=n(721533);function r({schema:e,defaultValues:t,presets:n}){const r=(0,a.useMemo)(()=>n?(0,i.A)(n,e=>e.defaultValues):{},[n]),s=(0,a.useMemo)(()=>({...t,...r}),[r,t]),c=(0,o.mN)({resolver:(0,l.u)(e),shouldFocusError:!0,defaultValues:s,shouldUseNativeValidation:!1,mode:"onTouched"}),d=(0,a.useRef)(s);d.current=s;const m=(0,a.useCallback)((...e)=>{const[t,...n]=e;return c.reset(t?{...t,...r}:d.current,...n)},[r,c]);return{...c,reset:m,formState:{...c.formState,isDirty:!!Object.keys(c.formState.dirtyFields).length,isSubmitting:c.formState.isSubmitting},handleSubmit:(...e)=>c.handleSubmit(e[0],(t,...n)=>{const a=Object.keys(t)[0];if(a)try{const e=document.getElementsByName(a)?.[0];e?.scrollIntoView?.({behavior:"smooth",block:"center"}),e?.focus?.({preventScroll:!0})}catch{}e[1]?.(t,...n)})}}},260334(e,t,n){n.d(t,{L_:()=>d,MS:()=>c,rn:()=>s});var a=n(602086),o=n(949812),i=n(765282),l=n(470070);const r="{::}",s=(e,t)=>`${e}${r}${JSON.stringify(t??{})}`,c=(e,t)=>{if("string"!=typeof t)return;const[n,...a]=t.split(r);if(!n||!a.length)return t;let o={};try{o=Object.fromEntries(Object.entries(JSON.parse(a.join(r))).map(([t,n])=>[t,"string"==typeof n?c(e,n):n]))}catch{}return e.formatMessage({id:n},o)};function d(){const{formatMessage:e}=(0,l.tz)();return(0,a.useCallback)(t=>c({formatMessage:e},t),[e])}o.pJ((e,t)=>e.message?{message:e.message}:e.code===i.eq.too_small&&"string"===e.type?{message:s("COMMON_MIN_CHARS",{min:Number(e.minimum)})}:e.code===i.eq.too_big&&"string"===e.type?{message:s("COMMON_MAX_CHARS",{name:s("COMMON_VALUE"),max:Number(e.maximum)})}:e.code===i.eq.invalid_type&&"array"===e.expected&&"undefined"===e.received?{message:s("COMMON_SELECT_AT_LEAST_ONE_ITEM")}:e.code===i.eq.too_small&&"array"===e.type?{message:s("COMMON_ADD_AT_LEAST_X_ITEMS",{min:Number(e.minimum)})}:e.code===i.eq.invalid_type&&"undefined"===e.received?{message:s("COMMON_VALIDATION_VALUE_REQUIRED")}:e.code===i.eq.invalid_type&&"number"===e.expected?{message:s("COMMON_VALIDATION_PLEASE_ENTER_A_NUMBER")}:{message:t.defaultError})},635891(e,t,n){n.d(t,{A:()=>d});var a=n(274934),o=n(42220),i=n(843615),l=n(95032),r=n(309130),s=n(260334),c=n(184931);const d=function({control:e,name:t,label:n,placeholder:d,tooltip:m,tooltipProps:u,autoFocus:A,motif:_,onChange:T,onBlur:p,onAfterChange:E,onPaste:S,onKeyDown:h,passwordToggle:g,type:N,helperMessage:C,autoComplete:f,contentBefore:I,contentAfter:x,onFocus:v,value:b,invalid:R}){const M=(0,c.mQ)(),L=(0,c.Im)(),O=(0,c.q)(),j=(0,s.L_)();return(0,a.jsx)(o.xI,{control:e,name:t,render:({field:e,fieldState:s,formState:c})=>(0,a.jsx)(i.A,{type:N||(g?"password":"text"),variant:"secondary",width:"100%",autoFocus:A,...e,onChange:t=>{T?T(t,e,c):e.onChange(t),E?.(t)},onBlur:t=>{p?p(t,e,c):e.onBlur()},onFocus:v,onPaste:S,disabled:M,value:b??e.value?.toString(),invalid:R||(s.invalid?(0,a.jsxs)(l.A,{variant:"inherit",style:{overflowWrap:"break-word"},children:[j((0,o.Jt)(c.errors,t)?.message)||!0," "]}):void 0),label:n,placeholder:d,labelTooltip:m,labelTooltipProps:{style:{opacity:L?r.xN:void 0,pointerEvents:O?"none":void 0,...u?.style},...u},motif:_,passwordToggle:g,helperMessage:C,autoComplete:f,onKeyDown:h,contentBefore:I,contentAfter:x})})}}}]);