"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[31550],{815879(e,i,t){t.d(i,{A:()=>a});var n=t(602086),r=t(141992);const a=(0,t(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})))},48021(e,i,t){var n,r;t.d(i,{C:()=>n}),function(e){e.ACTIVE="active",e.INACTIVE="inactive"}(n||(n={})),function(e){e.GENERATED="generated",e.UPLOADED="uploaded"}(r||(r={}))},92385(e,i,t){t.d(i,{EX:()=>l,Wm:()=>o,nU:()=>a});var n=t(264570),r=t(48021);const a={[r.C.ACTIVE]:"COMMON_ACTIVE",[r.C.INACTIVE]:"COMMON_INACTIVE"},l=({certificate:e},i)=>{const t=Uint8Array.from(atob(e),e=>e.charCodeAt(0));(0,n.P)(i?.fileName??"UniFi Certificate.crt",new Blob([t],{type:"application/x-x509-ca-cert"}),"certificate-download-link")},o=({status:e})=>e===r.C.INACTIVE},752104(e,i,t){t.d(i,{A:()=>r,Q:()=>a});var n=t(765567);const r="_",a=[n.ZM,n.Je]},398693(e,i,t){t.d(i,{v:()=>s});var n=t(274934),r=t(125799),a=t(938984);const l={size:"inherit",color:"inherit"},o={portal:!0,maxWidth:"unset",width:"auto",style:{display:"flex",alignItems:"center"}},s=({text:e,textElement:i,textProps:t,tooltipProps:s,isTooltipDisabled:d=!1})=>{const c=i||(0,n.jsx)(a.A,{...l,...t,children:e});return d?c:(0,n.jsx)(r.A,{...o,description:e,...s,children:c})}},535322(e,i,t){t.d(i,{A:()=>m,I:()=>n});var n,r=t(274934),a=t(814557),l=t(158885),o=t(247816),s=t(565527),d=t(309130),c=t(100978),h=t(291508);!function(e){e.ACCORDION="accordion",e.BUTTON_LIST="buttonList"}(n||(n={}));const A=(0,o.A)(c.A,(0,h.A)("marginBottom","isButtonList","margin","flex","width","padding","nested","background"))`
  background-color: ${({background:e,nested:i,theme:{themeName:t}})=>e||a.Ay[t===s.S.DARK?`desktop-color-neutral-${i?"00":"01"}-${s.S.DARK}`:`desktop-color-neutral-${i?"01":"00"}-${s.S.LIGHT}`]};
  padding: ${({isButtonList:e,padding:i})=>i||(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}})=>a.Ay[`desktop-border-divider-${e}`]};\n      &:last-child {\n        border-bottom: none;\n      }\n    }\n  `:""}
`,T=(0,o.A)(l.A,(0,h.A)("marginBottom","margin","flex","padding","nested","background"))`
  background-color: ${({background:e,nested:i,theme:{themeName:t}})=>e||a.Ay[t===s.S.DARK?`desktop-color-neutral-${i?"00":"01"}-${s.S.DARK}`:`desktop-color-neutral-${i?"01":"00"}-${s.S.LIGHT}`]};
  margin-bottom: ${({theme:e,marginBottom:i})=>i||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:i}})=>e||a.Ay[i===s.S.DARK?`desktop-color-neutral-01-${s.S.DARK}`:`desktop-color-neutral-00-${s.S.LIGHT}`]};
      height: 48px;
      padding: 0 ${d.Ln};
    }
    > div:nth-child(2) {
      margin-bottom: 0;
      padding: 0;
      > div {
        padding: 0 ${d.Ln} ${d.Ln};
      }
    }
  }
`,m=({type:e,marginBottom:i,margin:t,padding:a,flex:l,width:o,nested:s,...d})=>"items"in d?(0,r.jsx)(T,{marginBottom:i,margin:t,padding:a,flex:l,nested:s,...d}):(0,r.jsx)(A,{nested:s,width:o,marginBottom:i,margin:t,padding:a,flex:l,isButtonList:e===n.BUTTON_LIST,...d,children:d.children})},737364(e,i,t){t.d(i,{A:()=>A});var n=t(274934),r=t(599110),a=t(309130),l=t(580988),o=t(100978),s=t(470070),d=t(421314),c=t(300626),h=t(174710);const A=({enabled:e,label:i,tooltipItems:t,neverShowListMarkers:A,limit:T=20,seeMoreCallback:m,isInteractive:x,title:p,showMatchOppositeIcon:C,listGap:I,iconProps:_})=>(0,n.jsxs)(o.A,{flex:1,overflow:"hidden",gap:a.YC,children:[C?(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(m)||x,items:t,showListMarkers:!A,maxItemCount:T,getItemKey:(e,i)=>i,renderItem:e=>e,listGap:I,renderShowMore:m?()=>(0,n.jsx)(r.A,{variant:"inline",onClick:m,children:(0,n.jsx)(s.sA,{id:"COMMON_SEE_MORE"})}):void 0,iconProps:_}),children:i?(0,n.jsx)(d.A,{color:e?"inherit":"disabled",children:i}):null})]})},174710(e,i,t){t.d(i,{A:()=>l});var n=t(274934),r=t(304151),a=t(158498);const l=function({items:e,getItemKey:i,renderItem:t,maxItemCount:l,renderShowMore:o,showListMarkers:s,title:d,position:c,isInteractive:h,cursorType:A,listGap:T,iconProps:m}){return(0,n.jsx)(r.A,{title:d,position:c,isInteractive:h,cursorType:A,description:(0,n.jsx)(a.A,{items:e,getItemKey:i,renderItem:t,maxItemCount:l,listGap:T,renderShowMore:o,showListMarkers:s}),iconProps:m})}},580988(e,i,t){t.d(i,{A:()=>d});var n=t(274934),r=t(125799),a=t(815879),l=t(309130),o=t(100978),s=t(470070);const d=({enabled:e})=>(0,n.jsx)(o.A,{opacity:e?void 0:l.xN,children:(0,n.jsx)(r.A,{description:(0,n.jsx)(s.sA,{id:"COMMON_MATCH_OPPOSITE"}),portal:!0,children:(0,n.jsx)(a.A,{size:"original"})})})},300626(e,i,t){t.d(i,{A:()=>l});var n=t(274934),r=t(309130),a=t(100978);const l=({children:e,tooltip:i})=>(0,n.jsxs)(a.A,{maxWidth:"100%",overflow:"hidden",gap:r.YC,alignItems:"center",children:[e?(0,n.jsx)(a.A,{flex:1,overflow:"hidden",children:e}):null,i]})},721398(e,i,t){t.d(i,{A:()=>o});var n=t(274934),r=t(125799),a=t(853777),l=t(470070);const o=({messageId:e,tooltipClassName:i,values:t,isInteractive:o,portal:s,variant:d="twoTone",size:c="medium"})=>(0,n.jsx)(r.A,{description:(0,n.jsx)(l.sA,{id:e,values:t}),width:210,isInteractive:o,portal:s,tooltipClassName:i,children:(0,n.jsx)(a.A,{isActive:!0,omitSvgMargin:!0,variant:d,size:c})})},956731(e,i,t){t.d(i,{A:()=>A,R:()=>h});var n=t(274934),r=t(814557),a=t(247816),l=t(669439),o=t(309130),s=t(100978),d=t(721398);const c=(0,a.A)(s.A)`
  flex-direction: column;
  height: ${48}px;
  border-bottom: ${({theme:{themeName:e}})=>r.Ay[`desktop-border-divider-${e}`]};
  padding: ${o.xO} 0;
  position: relative;
  .tooltip-position-fixer {
    margin-right: -${o.Ln};
  }
`,h=({tooltipId:e,disabledTooltip:i,children:t,tooltipProps:r={},...a})=>(0,n.jsx)(c,{...a,children:(0,n.jsxs)(s.A,{justifyContent:"space-between",alignItems:"center",children:[(0,n.jsx)(l.A,{description:i,placement:"left",children:(0,n.jsx)("span",{children:t})}),e?(0,n.jsx)(d.A,{messageId:e,tooltipClassName:"tooltip-position-fixer",variant:"outline",...r}):null]})}),A=h},828196(e,i,t){t.d(i,{A:()=>c});var n=t(274934),r=t(938984),a=t(95032),l=t(247816),o=t(470070),s=t(664092);const d=(0,l.A)(r.A)`
  white-space: nowrap;
`,c=({id:e,color:i,values:t,children:r})=>(0,n.jsxs)(s.A,{children:[(0,n.jsx)(d,{color:"text-2",size:"medium",children:(0,n.jsx)(o.sA,{id:e,values:t})}),(0,n.jsx)(a.A,{color:i||"text-3",size:"medium",isTruncated:!0,children:r})]})},664092(e,i,t){t.d(i,{A:()=>d});var n=t(274934),r=t(247816),a=t(309130),l=t(100978),o=t(291508);const s=(0,r.A)(l.A,(0,o.A)("valueMaxWidth","keyMinWidth","compact"))`
  &:not(:last-child) {
    ${({compact:e})=>e?"":`margin-bottom: ${a.kc};`}
  }
  & > {
    &:nth-child(1) {
      min-width: ${({keyMinWidth:e})=>e}px;
    }
    &:nth-child(2) {
      max-width: ${({valueMaxWidth:e})=>e}px;
    }
  }
`,d=({children:e,valueMaxWidth:i=215,keyMinWidth:t=0,flexProps:r={},compact:l=!1})=>(0,n.jsx)(s,{width:"100%",justifyContent:"space-between",gap:a.kc,height:l?void 0:24,valueMaxWidth:i,keyMinWidth:t,compact:l,...r,children:e})},931550(e,i,t){t.r(i),t.d(i,{default:()=>M});var n=t(274934),r=t(602086),a=t(864308),l=t(938984),o=t(95032),s=t(237887),d=t(600416),c=t(487362),h=t(408402),A=t(648576),T=t(535322),m=t(470070),x=t(92385),p=t(828196),C=t(956731),I=t(125799),_=t(853777),v=t(309130),E=t(100978);const u=({id:e,children:i})=>(0,n.jsx)(p.A,{id:e,children:(0,n.jsxs)(E.A,{gap:v.YC,alignItems:"center",children:[(0,n.jsx)(o.A,{isTruncated:!0,color:"inherit",children:i||(0,n.jsx)(m.sA,{id:"COMMON_FALLBACK"})}),i?(0,n.jsx)(I.A,{description:(0,n.jsx)(l.A,{style:{wordBreak:"break-word"},children:i}),portal:!0,isInteractive:!0,children:(0,n.jsx)(_.A,{style:{marginBottom:"2px"},isActive:!0,size:"original"})}):null]})}),S=e=>e.children?(0,n.jsx)(p.A,{...e}):null,j=({children:e,label:i})=>(0,n.jsx)(T.A,{multiOpen:!0,type:T.I.ACCORDION,items:[{id:"section",openByDefault:!0,label:i,renderContent:()=>e}]}),M=({activeItem:{intermediate_certificates:e,root_certificate:i,status:t,valid:I,name:_}})=>{const{formatMessage:v}=(0,m.tz)(),[E,M]=(0,r.useState)(0),g=[{certificate:i,label:v({id:"SETTINGS_SYSTEM_CTRL_CERTIFICATES_ROOT_CERTIFICATE"})},...e.map(e=>({certificate:e,label:v({id:"SETTINGS_SYSTEM_CTRL_CERTIFICATES_INTERMEDIATE_CERTIFICATE"})}))],N=g[E]?.certificate||g[0]?.certificate,O=N.details?.overview,R=N?.details?.subject,L=N?.details?.issuer;return(0,n.jsxs)(n.Fragment,{children:[g.length>1?(0,n.jsx)(T.A,{children:(0,n.jsx)(s.A,{label:(0,n.jsx)(m.sA,{id:"COMMON_CERTIFICATE"}),width:"100%",variant:"secondary",options:g.map(({label:e},i)=>({value:i,label:e})),value:E,onChange:({value:e})=>M(Number(e))})}):null,(0,n.jsxs)(j,{label:(0,n.jsx)(m.sA,{id:"COMMON_OVERVIEW"}),children:[(0,n.jsx)(p.A,{id:"COMMON_STATUS",children:(0,n.jsx)(m.sA,{id:x.nU[t]})}),(0,n.jsx)(S,{id:"COMMON_VERSION",children:O?.version}),(0,n.jsx)(p.A,{id:"SETTINGS_SYSTEM_CTRL_CERTIFICATE_SERIAL_NUMBER",children:(0,n.jsx)(h.A,{condition:!!O?.serial_number,wrapper:(0,d.rR)(void 0,(0,n.jsx)(l.A,{style:{wordBreak:"break-word"},children:O?.serial_number}),{isInteractive:!0,portal:!0,noWrap:!0}),children:(0,n.jsx)(o.A,{isTruncated:!0,color:"inherit",size:"inherit",style:{maxWidth:"100%"},children:O?.serial_number||(0,n.jsx)(m.sA,{id:"COMMON_FALLBACK"})})})}),(0,n.jsx)(S,{id:"SETTINGS_SYSTEM_CTRL_CERTIFICATE_ALGORITHM",children:O?.algorithm}),(0,n.jsx)(u,{id:"SETTINGS_SYSTEM_CTRL_CERTIFICATE_FINGERPRINT",children:O?.fingerprint}),(0,n.jsx)(p.A,{id:"SETTINGS_SYSTEM_CTRL_CERTIFICATE_VALID_FROM",children:O?.valid_from&&N.details?.overview?.valid_from?(0,n.jsx)(c.A,{date:N.details.overview.valid_from}):(0,n.jsx)(m.sA,{id:"COMMON_FALLBACK"})}),(0,n.jsx)(p.A,{id:"SETTINGS_SYSTEM_CTRL_CERTIFICATE_VALID_TO",children:O?.valid_to&&N.details?.overview?.valid_to?(0,n.jsx)(c.A,{date:N.details.overview.valid_to}):(0,n.jsx)(m.sA,{id:"COMMON_FALLBACK"})}),(0,n.jsx)(p.A,{id:"SETTINGS_COMMON_VALID",color:I?"positive":"destructive",children:(0,n.jsx)(m.sA,{id:I?"COMMON_YES":"COMMON_NO"})})]}),(0,a.A)(R)?null:(0,n.jsxs)(j,{label:(0,n.jsx)(m.sA,{id:"SETTINGS_SYSTEM_CTRL_CERTIFICATE_SUBJECT"}),children:[(0,n.jsx)(p.A,{id:"SETTINGS_SYSTEM_CTRL_CERTIFICATES_COMMON_NAME",children:R.common_name||(0,n.jsx)(m.sA,{id:"COMMON_FALLBACK"})}),(0,n.jsx)(S,{id:"SETTINGS_SYSTEM_CTRL_CERTIFICATE_ORG_UNIT",children:R.organization_unit}),(0,n.jsx)(S,{id:"SETTINGS_SYSTEM_CTRL_CERTIFICATE_ORG",children:R.organization}),(0,n.jsx)(S,{id:"SETTINGS_SYSTEM_CTRL_CERTIFICATE_LOCALITY",children:R.locality}),(0,n.jsx)(S,{id:"SETTINGS_SYSTEM_CTRL_CERTIFICATE_STATE",children:R.state}),(0,n.jsx)(S,{id:"COMMON_COUNTRY",children:R.country}),(0,n.jsx)(S,{id:"COMMON_EMAIL",children:R.email})]}),(0,a.A)(L)?null:(0,n.jsxs)(j,{label:(0,n.jsx)(m.sA,{id:"SETTINGS_SYSTEM_CTRL_ISSUER"}),children:[(0,n.jsx)(p.A,{id:"SETTINGS_SYSTEM_CTRL_CERTIFICATES_COMMON_NAME",children:N?.details?.issuer?.common_name||(0,n.jsx)(m.sA,{id:"COMMON_FALLBACK"})}),(0,n.jsx)(S,{id:"SETTINGS_SYSTEM_CTRL_CERTIFICATE_ORG_UNIT",children:L?.organization_unit}),(0,n.jsx)(S,{id:"SETTINGS_SYSTEM_CTRL_CERTIFICATE_ORG",children:L?.organization}),(0,n.jsx)(S,{id:"SETTINGS_SYSTEM_CTRL_CERTIFICATE_LOCALITY",children:L?.locality}),(0,n.jsx)(S,{id:"SETTINGS_SYSTEM_CTRL_CERTIFICATE_STATE",children:L?.state}),(0,n.jsx)(S,{id:"COMMON_COUNTRY",children:L?.country}),(0,n.jsx)(S,{id:"COMMON_EMAIL",children:L?.email})]}),(0,n.jsx)(T.A,{type:T.I.BUTTON_LIST,children:(0,n.jsx)(C.R,{children:(0,n.jsx)(A.Ay,{type:"button",variant:"link",onClick:()=>(0,x.EX)(N,{fileName:_}),children:(0,n.jsx)(m.sA,{id:"SETTINGS_COMMON_DOWNLOAD_CERTIFICATE"})})})})]})}},638644(e,i,t){t.d(i,{A:()=>a});var n=t(274934),r=t(938984);const a=({enabled:e,color:i,children:t,...a})=>(0,n.jsx)(r.A,{color:!1===e?"disabled":i||"inherit",size:"inherit",...a,children:t})},218333(e,i,t){t.d(i,{p:()=>r});var n=t(247816);t(409844).AH`
  th {
    span {
      font-size: 14px;
      font-weight: 600;
    }
    svg {
      width: 16px;
      height: 16px;
    }
  }
`;const r=(0,n.A)("div")`
  width: 100%;
  .${"truncate-text-tooltip"} {
    display: flex;
  }
`},600416(e,i,t){t.d(i,{Po:()=>A,eX:()=>h,rR:()=>c});var n=t(274934),r=t(125799),a=t(470070),l=t(398693),o=t(218333),s=t(638644),d=t(737364);const c=(e,i,t={},l={})=>o=>(0,n.jsx)(r.A,{portal:!0,description:e?(0,n.jsx)(a.sA,{id:e,values:l}):i,...t,children:o}),h=(e,i,t,r="default",a=!1)=>{const c=(0,n.jsx)(l.v,{text:i,textElement:(0,n.jsx)(s.A,{enabled:t,isTruncated:!0,children:i}),tooltipProps:{cursorType:r}});return(0,n.jsx)(o.p,{children:(0,n.jsx)(d.A,{label:c,tooltipItems:e,enabled:t,showMatchOppositeIcon:a})})},A=(e,i,t="default")=>(0,n.jsx)(l.v,{text:e,tooltipProps:{cursorType:t,style:{display:"grid"}},textProps:{isTruncated:!0,color:i?"inherit":"disabled",size:"inherit"}})},696049(e,i,t){t.d(i,{H:()=>n});const n=""},264570(e,i,t){t.d(i,{P:()=>r});var n=t(635187);function r(e,i,t){const r=URL.createObjectURL(i),a=document.createElement("a");a.id=t,a.href=r,a.download=e.replaceAll(/[^A-Za-z0-9_\-.]/g,n.jr),document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(r)}},237887(e,i,t){t.d(i,{A:()=>A});var n=t(274934),r=t(602086),a=t(977872),l=t(693371),o=t(767822),s=t(820633),d=t(308111);const c=e=>(0,n.jsx)(l.A,{renderOption:o.q,...e}),h=e=>(0,n.jsx)(c,{...e});h.Sorted=e=>{const i=(0,a.d4)(s.zi),t=(0,r.useMemo)(()=>(0,d.k)(i),[i]);return(0,n.jsx)(c,{...e,sortBy:t})};const A=h},308111(e,i,t){t.d(i,{R:()=>h,k:()=>A});var n=t(696049),r=t(350068),a=t(177173),l=t(752104),o=t(64222),s=t(332530);const d=[...new Set([n.H,l.Q.join(l.A),a.Zt,o.F,r.nc,s.Vr])],c={numeric:!0,sensitivity:"base"},h=(e,i)=>{const t=[];for(let n=e;n<=i;n+=1)t.push({value:n,label:String(n)});return t},A=e=>({value:i,label:t},{value:n,label:r})=>d.includes(i?.toString())||d.includes(n?.toString())?1/0:t?.toString().localeCompare(r?.toString(),e,c)??-1}}]);