"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[72145],{333316(e,t,n){n.d(t,{A:()=>i});const i=(0,n(602086).createContext)({isStandalone:!0,header:[null,()=>{}],footer:[null,()=>{}]})},232932(e,t,n){n.d(t,{A:()=>s});var i=n(602086),o=n(333316);function s(e){const{children:t}=e,{isStandalone:n,footer:[,s]}=(0,i.useContext)(o.A);return(0,i.useLayoutEffect)(()=>{if(!n)return s(t),()=>s(null)},[n,t]),i.createElement(i.Fragment,null,n&&t)}},486061(e,t,n){n.d(t,{VT:()=>r,i9:()=>o,ng:()=>a,nt:()=>s});var i=n(241365);const o=n(409844).AH`
  font-size: ${i.Ay["font-size-m"]};
  font-weight: normal;
  border-radius: 0;
`,s=112,r=20,a=345},597750(e,t,n){n.d(t,{A:()=>r});var i=n(274934),o=n(486061),s=n(100978);const r=({maxWidth:e,label:t,children:n,...r})=>(0,i.jsxs)(s.A,{flexDirection:"column",width:"100%",maxWidth:"settingsGridContent"===e?o.ng:e,...r,children:[t,n]})},164487(e,t,n){n.d(t,{A:()=>d});var i=n(274934),o=n(632622),s=n(184931),r=n(309130),a=n(304151),l=n(100978);const d=({tooltip:e,htmlFor:t,children:n,labelProps:d,wrapperProps:c,tooltipProps:m})=>{const u=(0,s.iL)();return(0,i.jsxs)(l.A,{alignItems:"center",gap:r.YC,...c,children:[(0,i.jsx)(o.A,{as:"label",htmlFor:t,color:"tertiary",...d,style:{opacity:u?r.xN:void 0,...d?.style},children:n}),e?(0,i.jsx)(a.A,{description:e,...m}):null]})}},89469(e,t,n){n.d(t,{A:()=>a});var i=n(274934),o=n(602086),s=n(309130),r=n(100978);const a=(0,o.forwardRef)((e,t)=>(0,i.jsx)(r.A,{ref:t,flexDirection:"column",gap:s.kc,width:"100%",...e}))},787481(e,t,n){n.d(t,{A:()=>a});var i=n(274934),o=n(833466),s=n(309130),r=n(100978);const a=e=>(0,i.jsx)(r.A,{paddingTop:s.YC,paddingBottom:s.YC,gap:s.Ln,rowGap:s.YC,flexWrap:"wrap",minHeight:o.b,alignItems:"center",...e})},756782(e,t,n){n.d(t,{A:()=>g});var i=n(274934),o=n(814557),s=n(602086),r=n(938984),a=n(247816),l=n(309130),d=n(590979),c=n(147045),m=n(291508),u=n(304151),p=n(100978),A=n(535322),h=n(89469);const f=(0,a.A)(A.A,(0,m.A)("isOutlined"))`
  border: ${({theme:{themeName:e},isOutlined:t})=>`1px solid ${t?o.Ay[`desktop-color-ublue-06-${e}`]:"transparent"}`};
`,g=({children:e,title:t,tooltip:n,tooltipProps:o,[c.L]:a,titleAction:m,isOutlined:A})=>{const g=(e=>s.Children.toArray(e).length>0)(e);return(0,i.jsx)(f,{marginBottom:"none",...d.A.addDataTestId(a??""),isOutlined:A,children:(0,i.jsxs)(p.A,{flexDirection:"column",...g&&{gap:l.Ln},width:"100%",children:[t?(0,i.jsxs)(p.A,{alignItems:"center",gap:l.YC,justifyContent:"space-between",width:"100%",children:[(0,i.jsxs)(p.A,{gap:l.YC,alignItems:"center",children:[(0,i.jsx)(r.A,{variant:"heading-medium",children:t}),n?(0,i.jsx)(u.A,{description:n,portal:!0,...o}):null]}),m?(0,i.jsx)(p.A,{children:m}):null]}):null,g?(0,i.jsx)(h.A,{children:e}):null]})})}},480562(e,t,n){n.d(t,{i:()=>r});var i=n(274934),o=n(125799),s=n(767822);const r=e=>(0,i.jsx)(o.A,{description:e.option&&"tooltipDescription"in e.option?e.option.tooltipDescription:null,position:"left",portal:!0,children:(0,i.jsx)(s.q,{...e})})},594492(e,t,n){n.d(t,{A:()=>m});var i=n(274934),o=n(602086),s=n(599110),r=n(247816),a=n(309130),l=n(470070),d=n(291508);const c=(0,r.A)("footer",(0,d.A)("hasFormResetButton"))`
  display: flex;
  justify-content: ${({hasFormResetButton:e})=>e?"space-between":"flex-end"};
  padding: ${a.S2} ${a.fS};
  gap: ${a.kc};
`,m=({allowCancel:e,isDirty:t,isInvalid:n,isSubmitting:r,onFormSubmit:a,onFormReset:d,onFormCancel:m,className:u,submitButtonText:p,customButton:A,applyButton:h,applyButtonFirst:f,hideCancelButton:g,form:x})=>{const b=(0,o.useMemo)(()=>h||(0,i.jsx)(s.A,{name:"submit",variant:"primary",type:"submit",onClick:a,disabled:!t||n||r,form:x,children:(0,i.jsx)(l.sA,{id:p||"COMMON_ACTION_APPLY_CHANGES"})}),[h,x,t,n,r,a,p]);return(0,i.jsxs)(c,{className:u,hasFormResetButton:!!d,children:[f?b:A,g?null:(0,i.jsx)(s.A,{name:"cancel",variant:"default",type:"button",onClick:m,disabled:!e&&!t,children:(0,i.jsx)(l.sA,{id:"COMMON_ACTION_CANCEL"})}),d?(0,i.jsx)(s.A,{name:"reset",variant:"default",type:"button",onClick:d,disabled:!t,children:(0,i.jsx)(l.sA,{id:"COMMON_ACTION_RESET_TO_DEFAULT"})}):null,f?A:b]})}},115114(e,t,n){n.d(t,{A:()=>c});var i=n(274934),o=n(232932),s=n(247816),r=n(409844),a=n(594492);const l=(0,s.A)("div")`
  height: 66px;
`,d=r.AH`
  padding: 0px !important;
`,c=({isDirty:e,onFormSubmit:t,onFormCancel:n,isInvalid:s,...r})=>e?(0,i.jsx)(o.A,{children:(0,i.jsx)(a.A,{isDirty:e,onFormCancel:n,onFormSubmit:t,isInvalid:s,className:d,...r})}):(0,i.jsx)(l,{})},783920(e,t,n){n.r(t),n.d(t,{default:()=>s});var i=n(274934),o=n(129401);const s=({activeItem:e})=>(0,i.jsx)(o.A,{activeItem:e},e?._id)},833466(e,t,n){n.d(t,{b:()=>i});const i=32},436417(e,t,n){n.d(t,{m:()=>a});var i=n(602086),o=n(42220),s=n(369289),r=n(721533);function a({schema:e,defaultValues:t,presets:n}){const a=(0,i.useMemo)(()=>n?(0,s.A)(n,e=>e.defaultValues):{},[n]),l=(0,i.useMemo)(()=>({...t,...a}),[a,t]),d=(0,o.mN)({resolver:(0,r.u)(e),shouldFocusError:!0,defaultValues:l,shouldUseNativeValidation:!1,mode:"onTouched"}),c=(0,i.useRef)(l);c.current=l;const m=(0,i.useCallback)((...e)=>{const[t,...n]=e;return d.reset(t?{...t,...a}:c.current,...n)},[a,d]);return{...d,reset:m,formState:{...d.formState,isDirty:!!Object.keys(d.formState.dirtyFields).length,isSubmitting:d.formState.isSubmitting},handleSubmit:(...e)=>d.handleSubmit(e[0],(t,...n)=>{const i=Object.keys(t)[0];if(i)try{const e=document.getElementsByName(i)?.[0];e?.scrollIntoView?.({behavior:"smooth",block:"center"}),e?.focus?.({preventScroll:!0})}catch{}e[1]?.(t,...n)})}}},846294(e,t,n){n.d(t,{A:()=>d});var i=n(274934),o=n(125799),s=n(409844),r=n(184931),a=n(877840);const l=s.AH`
  width: fit-content;
`,d=({reasons:e,reason:t,children:n,isInteractive:s,noWrap:d,position:c,fitContent:m})=>{const u=(0,r.pv)(),p=[t,...e||[]].filter(Boolean)[0]||null,A=!!p;return(0,i.jsx)(a.A,{isDisabled:{fields:A,labels:A,tooltipIcons:A,tooltipPopovers:!u.fields&&A},children:(0,i.jsx)(o.A,{description:u.fields?null:p,portal:!0,isInteractive:s,noWrap:d,position:c,className:m?l:void 0,children:n})})}},260334(e,t,n){n.d(t,{L_:()=>c,MS:()=>d,rn:()=>l});var i=n(602086),o=n(949812),s=n(765282),r=n(470070);const a="{::}",l=(e,t)=>`${e}${a}${JSON.stringify(t??{})}`,d=(e,t)=>{if("string"!=typeof t)return;const[n,...i]=t.split(a);if(!n||!i.length)return t;let o={};try{o=Object.fromEntries(Object.entries(JSON.parse(i.join(a))).map(([t,n])=>[t,"string"==typeof n?d(e,n):n]))}catch{}return e.formatMessage({id:n},o)};function c(){const{formatMessage:e}=(0,r.tz)();return(0,i.useCallback)(t=>d({formatMessage:e},t),[e])}o.pJ((e,t)=>e.message?{message:e.message}:e.code===s.eq.too_small&&"string"===e.type?{message:l("COMMON_MIN_CHARS",{min:Number(e.minimum)})}:e.code===s.eq.too_big&&"string"===e.type?{message:l("COMMON_MAX_CHARS",{name:l("COMMON_VALUE"),max:Number(e.maximum)})}:e.code===s.eq.invalid_type&&"array"===e.expected&&"undefined"===e.received?{message:l("COMMON_SELECT_AT_LEAST_ONE_ITEM")}:e.code===s.eq.too_small&&"array"===e.type?{message:l("COMMON_ADD_AT_LEAST_X_ITEMS",{min:Number(e.minimum)})}:e.code===s.eq.invalid_type&&"undefined"===e.received?{message:l("COMMON_VALIDATION_VALUE_REQUIRED")}:e.code===s.eq.invalid_type&&"number"===e.expected?{message:l("COMMON_VALIDATION_PLEASE_ENTER_A_NUMBER")}:{message:t.defaultError})},689941(e,t,n){n.d(t,{A:()=>u});var i=n(274934),o=n(693371),s=n(42220),r=n(480562),a=n(164487),l=n(597750),d=n(147045),c=n(260334),m=n(184931);const u=function({control:e,name:t,label:n,options:u,tooltip:p,tooltipProps:A,placeholder:h,renderOption:f,onChange:g,onAfterChange:x,searchable:b,searchableProps:C,portal:v,maxHeight:y,disableValidationMessage:O,isReadOnly:_,[d.L]:j}){const N=(0,m.mQ)(),M=(0,c.L_)();return(0,i.jsx)(s.xI,{control:e,name:t,render:({field:e,fieldState:d,formState:c})=>(0,i.jsxs)(l.A,{gap:2,children:[n?(0,i.jsx)(a.A,{htmlFor:t,tooltip:p,tooltipProps:{portal:!0,...A},children:n}):null,(0,i.jsx)(o.A,{variant:"secondary",width:"100%",renderOption:f??r.i,options:u,...e,readOnly:_,disabled:N,onChange:(t,n)=>{const i=g?g(n,{field:e,fieldState:d,formState:c}):e.onChange(n);return x?.(n),i},value:e.value??"",invalid:d.invalid&&!O?M((0,s.Jt)(c.errors,t)?.message)||!0:void 0,placeholder:h,searchable:b,searchableProps:C,portal:v,"data-testid":j,maxHeight:y})]})})}}}]);