@ansible/ansible-ui-framework 2.4.2601 → 2.4.2602
Sign up to get free protection for your applications and to get access to all the features.
- package/index.js +2 -2
- package/index.umd.cjs +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
@@ -43528,7 +43528,7 @@ function Sve() {
|
|
43528
43528
|
(t, n) => {
|
43529
43529
|
let r = e[t] ?? "";
|
43530
43530
|
const i = n == null ? void 0 : n.params, o = n == null ? void 0 : n.query;
|
43531
|
-
return r
|
43531
|
+
return r && (i && (r = Object.keys(i).reduce((a, s) => {
|
43532
43532
|
let l = i[s];
|
43533
43533
|
if (l === void 0) return a;
|
43534
43534
|
l = encodeURIComponent(l.toString());
|
@@ -43537,7 +43537,7 @@ function Sve() {
|
|
43537
43537
|
}, r)), o && (r = `${r}?${Object.keys(o).map((a) => {
|
43538
43538
|
let s = o[a];
|
43539
43539
|
return s === void 0 ? "" : (s = encodeURIComponent(s.toString()), `${a}=${s}`);
|
43540
|
-
}).join("&").replace("/&&/g", "&")}`))
|
43540
|
+
}).join("&").replace("/&&/g", "&")}`)), r;
|
43541
43541
|
},
|
43542
43542
|
[e]
|
43543
43543
|
);
|
package/index.umd.cjs
CHANGED
@@ -493,7 +493,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
493
493
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function m3(e,t){if(e){if(typeof e=="string")return cv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return cv(e,t)}}function cv(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Uge(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,s;try{for(n=n.call(e);!(i=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));i=!0);}catch(l){o=!0,s=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw s}}return r}}function Hge(e){if(Array.isArray(e))return e}function g3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function St(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?g3(Object(n),!0).forEach(function(r){uv(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function uv(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xh(e,t){if(e==null)return{};var n=Gge(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Gge(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var dv=v.forwardRef(function(e,t){var n=e.children,r=xh(e,$ge),i=y3(r),o=i.open,a=xh(i,Lge);return v.useImperativeHandle(t,function(){return{open:o}},[o]),v.createElement(v.Fragment,null,n(St(St({},a),{},{open:o})))});dv.displayName="Dropzone";var p3={disabled:!1,getFilesFromEvent:ige,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};dv.defaultProps=p3,dv.propTypes={children:ut.func,accept:ut.objectOf(ut.arrayOf(ut.string)),multiple:ut.bool,preventDropOnDocument:ut.bool,noClick:ut.bool,noKeyboard:ut.bool,noDrag:ut.bool,noDragEventsBubbling:ut.bool,minSize:ut.number,maxSize:ut.number,maxFiles:ut.number,disabled:ut.bool,getFilesFromEvent:ut.func,onFileDialogCancel:ut.func,onFileDialogOpen:ut.func,useFsAccessApi:ut.bool,autoFocus:ut.bool,onDragEnter:ut.func,onDragLeave:ut.func,onDragOver:ut.func,onDrop:ut.func,onDropAccepted:ut.func,onDropRejected:ut.func,onError:ut.func,validator:ut.func};var fv={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function y3(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=St(St({},p3),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,o=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,c=t.onDragEnter,u=t.onDragLeave,d=t.onDragOver,f=t.onDrop,h=t.onDropAccepted,g=t.onDropRejected,p=t.onFileDialogCancel,y=t.onFileDialogOpen,b=t.useFsAccessApi,x=t.autoFocus,S=t.preventDropOnDocument,C=t.noClick,_=t.noKeyboard,w=t.noDrag,k=t.noDragEventsBubbling,T=t.onError,D=t.validator,P=v.useMemo(function(){return jge(n)},[n]),A=v.useMemo(function(){return Pge(n)},[n]),M=v.useMemo(function(){return typeof y=="function"?y:v3},[y]),j=v.useMemo(function(){return typeof p=="function"?p:v3},[p]),I=v.useRef(null),$=v.useRef(null),R=v.useReducer(qge,fv),G=lv(R,2),H=G[0],z=G[1],N=H.isFocused,U=H.isFileDialogActive,X=v.useRef(typeof window<"u"&&window.isSecureContext&&b&&Dge()),J=function(){!X.current&&U&&setTimeout(function(){if($.current){var le=$.current.files;le.length||(z({type:"closeDialog"}),j())}},300)};v.useEffect(function(){return window.addEventListener("focus",J,!1),function(){window.removeEventListener("focus",J,!1)}},[$,U,j,X]);var Q=v.useRef([]),ee=function(le){I.current&&I.current.contains(le.target)||(le.preventDefault(),Q.current=[])};v.useEffect(function(){return S&&(document.addEventListener("dragover",d3,!1),document.addEventListener("drop",ee,!1)),function(){S&&(document.removeEventListener("dragover",d3),document.removeEventListener("drop",ee))}},[I,S]),v.useEffect(function(){return!r&&x&&I.current&&I.current.focus(),function(){}},[I,x,r]);var ie=v.useCallback(function(Y){T?T(Y):console.error(Y)},[T]),ue=v.useCallback(function(Y){Y.preventDefault(),Y.persist(),q(Y),Q.current=[].concat(Wge(Q.current),[Y.target]),bh(Y)&&Promise.resolve(i(Y)).then(function(le){if(!(vh(Y)&&!k)){var be=le.length,xe=be>0&&Oge({files:le,accept:P,minSize:a,maxSize:o,multiple:s,maxFiles:l,validator:D}),We=be>0&&!xe;z({isDragAccept:xe,isDragReject:We,isDragActive:!0,type:"setDraggedFiles"}),c&&c(Y)}}).catch(function(le){return ie(le)})},[i,c,ie,k,P,a,o,s,l,D]),he=v.useCallback(function(Y){Y.preventDefault(),Y.persist(),q(Y);var le=bh(Y);if(le&&Y.dataTransfer)try{Y.dataTransfer.dropEffect="copy"}catch{}return le&&d&&d(Y),!1},[d,k]),Z=v.useCallback(function(Y){Y.preventDefault(),Y.persist(),q(Y);var le=Q.current.filter(function(xe){return I.current&&I.current.contains(xe)}),be=le.indexOf(Y.target);be!==-1&&le.splice(be,1),Q.current=le,!(le.length>0)&&(z({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),bh(Y)&&u&&u(Y))},[I,u,k]),re=v.useCallback(function(Y,le){var be=[],xe=[];Y.forEach(function(We){var Ve=c3(We,P),rt=lv(Ve,2),Ct=rt[0],At=rt[1],wt=u3(We,a,o),Re=lv(wt,2),Me=Re[0],mt=Re[1],zt=D?D(We):null;if(Ct&&Me&&!zt)be.push(We);else{var Et=[At,mt];zt&&(Et=Et.concat(zt)),xe.push({file:We,errors:Et.filter(function(Wn){return Wn})})}}),(!s&&be.length>1||s&&l>=1&&be.length>l)&&(be.forEach(function(We){xe.push({file:We,errors:[Ege]})}),be.splice(0)),z({acceptedFiles:be,fileRejections:xe,type:"setFiles"}),f&&f(be,xe,le),xe.length>0&&g&&g(xe,le),be.length>0&&h&&h(be,le)},[z,s,P,a,o,l,f,h,g,D]),pe=v.useCallback(function(Y){Y.preventDefault(),Y.persist(),q(Y),Q.current=[],bh(Y)&&Promise.resolve(i(Y)).then(function(le){vh(Y)&&!k||re(le,Y)}).catch(function(le){return ie(le)}),z({type:"reset"})},[i,re,ie,k]),W=v.useCallback(function(){if(X.current){z({type:"openDialog"}),M();var Y={multiple:s,types:A};window.showOpenFilePicker(Y).then(function(le){return i(le)}).then(function(le){re(le,null),z({type:"closeDialog"})}).catch(function(le){Mge(le)?(j(le),z({type:"closeDialog"})):Ige(le)?(X.current=!1,$.current?($.current.value=null,$.current.click()):ie(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):ie(le)});return}$.current&&(z({type:"openDialog"}),M(),$.current.value=null,$.current.click())},[z,M,j,b,re,ie,A,s]),Ae=v.useCallback(function(Y){!I.current||!I.current.isEqualNode(Y.target)||(Y.key===" "||Y.key==="Enter"||Y.keyCode===32||Y.keyCode===13)&&(Y.preventDefault(),W())},[I,W]),ke=v.useCallback(function(){z({type:"focus"})},[]),qe=v.useCallback(function(){z({type:"blur"})},[]),Le=v.useCallback(function(){C||(Age()?setTimeout(W,0):W())},[C,W]),st=function(le){return r?null:le},L=function(le){return _?null:st(le)},V=function(le){return w?null:st(le)},q=function(le){k&&le.stopPropagation()},de=v.useMemo(function(){return function(){var Y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},le=Y.refKey,be=le===void 0?"ref":le,xe=Y.role,We=Y.onKeyDown,Ve=Y.onFocus,rt=Y.onBlur,Ct=Y.onClick,At=Y.onDragEnter,wt=Y.onDragOver,Re=Y.onDragLeave,Me=Y.onDrop,mt=xh(Y,Fge);return St(St(uv({onKeyDown:L(si(We,Ae)),onFocus:L(si(Ve,ke)),onBlur:L(si(rt,qe)),onClick:st(si(Ct,Le)),onDragEnter:V(si(At,ue)),onDragOver:V(si(wt,he)),onDragLeave:V(si(Re,Z)),onDrop:V(si(Me,pe)),role:typeof xe=="string"&&xe!==""?xe:"presentation"},be,I),!r&&!_?{tabIndex:0}:{}),mt)}},[I,Ae,ke,qe,Le,ue,he,Z,pe,_,w,r]),fe=v.useCallback(function(Y){Y.stopPropagation()},[]),oe=v.useMemo(function(){return function(){var Y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},le=Y.refKey,be=le===void 0?"ref":le,xe=Y.onChange,We=Y.onClick,Ve=xh(Y,Nge),rt=uv({accept:P,multiple:s,type:"file",style:{display:"none"},onChange:st(si(xe,pe)),onClick:st(si(We,fe)),tabIndex:-1},be,$);return St(St({},rt),Ve)}},[$,n,s,pe,r]);return St(St({},H),{},{isFocused:N&&!r,getRootProps:de,getInputProps:oe,rootRef:I,inputRef:$,open:st(W)})}function qge(e,t){switch(t.type){case"focus":return St(St({},e),{},{isFocused:!0});case"blur":return St(St({},e),{},{isFocused:!1});case"openDialog":return St(St({},fv),{},{isFileDialogActive:!0});case"closeDialog":return St(St({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return St(St({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return St(St({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return St({},fv);default:return e}}function v3(){}function Yge(e){const{t}=$e(),n=Du(),{onDrop:r}=e,i=v.useCallback(s=>{if(!s||s.length===0)return;const l=s[0],c=new FileReader;c.onload=()=>{const u=c.result;if(typeof u=="string"){const d={variant:"success",title:t("File uploaded"),timeout:!0};n.addAlert(d),r(u)}},c.onerror=()=>{const u={variant:"danger",title:t("Failed to upload file"),children:t("Unable to upload")};n.addAlert(u)},c.readAsText(l)},[t,n,r]),{getRootProps:o,getInputProps:a}=y3({onDrop:i,noClick:!0,accept:e.accept??{"application/json":[".json"],"text/yaml":[".yaml",".yml"]}});return m.jsxs("div",{id:"code-editor-dropzone",...o({disabled:!0}),style:{width:"100%",height:"100%"},children:[m.jsx("input",{id:"code-editor-dropzone-input",...a(),ref:e.inputRef}),e.children]})}function Kge(e){return m.jsx(O.Icon,{size:e.size??"md",children:m.jsx(ve.AngleDownIcon,{"data-cy":"expandable",style:{transform:e.isExpanded?"rotate(0deg)":e.direction==="left"?"rotate(90deg)":"rotate(-90deg)",transition:"transform 0.2s",alignSelf:"center"},onClick:()=>e.setExpanded(!e.isExpanded),"aria-label":e.isExpanded?$c("Collapse"):$c("Expand")})})}function Zge(e,t,n="txt"){const r=new Blob(t.split("/n"),{type:"text/plain"}),i=document.createElement("a");i.href=URL.createObjectURL(r),i.download=e+"."+n,document.body.appendChild(i),i.click(),document.body.removeChild(i)}function Uc(e){const{children:t,helperText:n,helperTextInvalid:r,isRequired:i,labelHelp:o,labelHelpTitle:a,label:s}=e;return m.jsxs(O.FormGroup,{id:`${e.fieldId}-form-group`,fieldId:e.fieldId,label:m.jsxs(m.Fragment,{children:[e.icon,s]}),labelIcon:o?m.jsx(Tu,{title:a,help:o}):void 0,labelInfo:e.additionalControls,isRequired:i,"data-cy":`${e.fieldId}-form-group`,children:[t,(n||r)&&m.jsx(O.FormHelperText,{children:m.jsx(O.HelperText,{children:m.jsx(O.HelperTextItem,{variant:r?"error":void 0,children:r||n})})})]})}function Xge(e){const{t}=$e(),{name:n,format:r,disableCopy:i,disableUpload:o,disableDownload:a,disableExpand:s,validate:l,isArray:c}=e,u=yi(e),{formState:{isSubmitting:d,isValidating:f},setError:h,getValues:g,clearErrors:p,control:y}=ni(),x=qo().dataEditorFormat??"yaml",[S,C]=v.useState(x),[_,w]=v.useState(!e.defaultCollapsed),[k,T]=v.useState(()=>{const J=g(n);return typeof J=="string"?J:li(J,x)}),D=Du(),{writeToClipboard:P}=b5(),A=v.useCallback(()=>P(li(Hi(g(n),c),S)),[g,c,S,n,P]),M=v.useCallback(J=>{T(li(Hi(J,c),S))},[c,S]),j=v.useRef(null),I=v.useCallback(()=>{var J;return(J=j.current)==null?void 0:J.click()},[]),$=v.useCallback(()=>{const J=n||"data",Q=S==="json"?"json":"yaml";Zge(J,li(Hi(g(n),c),S),Q),D.addAlert({variant:"success",title:t("File downloaded"),timeout:!0})},[D,g,c,S,n,t]);v.useLayoutEffect(()=>{const J=li(Hi(g(n),c),S);T(J)},[g,c,S,n]);const[R,G]=v.useState(!1),H=ek({name:n});v.useEffect(()=>{R||T(li(Hi(H,c),S))},[R,H,c,S]);const{setValue:z,formState:{defaultValues:N}}=ni(),U=Lc(e.label,e.isRequired),X=Ws(N,e.name);return m.jsx($s,{name:n,control:y,shouldUnregister:!0,render:({field:{value:J,name:Q,onChange:ee},fieldState:{error:ie}})=>{var he;function ue(Z){try{const re=Hi(Z,c);switch(r){case"object":ee(re);return;default:ee(li(re,r));break}p(Q)}catch(re){re instanceof Error&&h(Q,{message:re.message})}}return m.jsxs(Uc,{fieldId:u,icon:!s&&m.jsx(Kge,{isExpanded:_,setExpanded:w}),label:e.label,labelHelpTitle:e.labelHelpTitle??e.label,labelHelp:e.labelHelp,additionalControls:m.jsx(x3,{handleCopy:!i&&A,handleUpload:!o&&I,handleDownload:!a&&$,language:S,setLanguage:C,children:e.additionalControls}),helperText:e.helperText,helperTextInvalid:!(l&&f)&&((he=ie==null?void 0:ie.message)==null?void 0:he.split(`
|
494
494
|
`)),isRequired:e.isRequired,children:[_&&m.jsxs("div",{style:{display:"flex"},children:[m.jsx(Yge,{onDrop:M,isDisabled:d||e.isReadOnly,inputRef:j,children:m.jsx(Ume,{"data-cy":u,id:u,name:Q,language:S,value:k,onChange:ue,setError:Z=>{Z?h(Q,{message:Z}):p(Q)},isReadOnly:e.isReadOnly||d,className:e.isReadOnly?"pf-v5-c-form-control pf-m-disabled":"pf-v5-c-form-control",onFocus:()=>G(!0),onBlur:()=>G(!1)})}),m.jsx(Yr,{actions:[{label:t("Undo changes"),type:ot.Button,selection:Ye.None,onClick:()=>{z(e.name,X),T(""),setTimeout(()=>{T(li(Hi(X,c),S))},0)},isHidden:()=>!e.enableUndo||Ik(J,X)},{label:t("Reset to default"),type:ot.Button,selection:Ye.None,onClick:()=>{z(e.name,e.defaultValue),T(""),setTimeout(()=>{T(li(Hi(e.defaultValue,c),S))},0)},isHidden:()=>!e.enableReset||Ik(J,e.defaultValue)}],position:"right"})]}),!_&&m.jsx("div",{className:"pf-v5-c-form-control"})]})},rules:{required:U,validate:e.validate}})}function b3(e){const{t}=$e(),{handleCopy:n,handleDownload:r,handleUpload:i}=e;return!n&&!r&&!i?m.jsx(m.Fragment,{}):m.jsxs(O.Flex,{spaceItems:{default:"spaceItemsMd"},children:[n&&m.jsx(O.FlexItem,{children:m.jsx(ku,{id:"copy-button","data-cy":"copy-button","aria-label":t("Copy to clipboard"),type:"button",onClick:n,children:m.jsx(O.Icon,{size:"md",children:m.jsx(ve.CopyIcon,{})})})}),i&&m.jsx(O.FlexItem,{children:m.jsx(ku,{id:"upload-button","data-cy":"upload-button","aria-label":t("Upload from file"),type:"button",onClick:i,children:m.jsx(O.Icon,{size:"md",children:m.jsx(ve.UploadIcon,{})})})}),r&&m.jsx(O.FlexItem,{children:m.jsx(ku,{id:"download-button","data-cy":"download-button","aria-label":t("Download file"),type:"button",onClick:r,children:m.jsx(O.Icon,{size:"md",children:m.jsx(ve.DownloadIcon,{})})})})]})}function x3(e){const{t}=$e(),{handleCopy:n,handleDownload:r,handleUpload:i,language:o,setLanguage:a}=e;return m.jsxs(O.Flex,{spaceItems:{default:"spaceItemsLg"},children:[m.jsx(O.FlexItem,{children:e.children}),m.jsx(b3,{handleCopy:n,handleDownload:r,handleUpload:i}),m.jsx(O.FlexItem,{align:{default:"alignRight"},children:m.jsxs(O.ToggleGroup,{isCompact:!0,children:[m.jsx(O.ToggleGroupItem,{id:"toggle-yaml","data-cy":"toggle-yaml","aria-label":t("Toggle to YAML"),isSelected:o==="yaml",text:"YAML",type:"button",onChange:()=>a("yaml")}),m.jsx(O.ToggleGroupItem,{id:"toggle-json","data-cy":"toggle-json","aria-label":t("Toggle to JSON"),isSelected:o==="json",text:"JSON",type:"button",onChange:()=>a("json")})]})})]})}function Hi(e,t){if(e==null)return t?[]:{};if(typeof e=="string")try{e=JSON.parse(e)}catch{try{e=BT.load(e)}catch(n){return n instanceof Error||n instanceof Zy?new Error(n.message):{}}}return t?Array.isArray(e)?e:[]:Array.isArray(e)?{}:e}function li(e,t){if(e==null)return"";if(e instanceof Error)return e.message;switch(t){case"json":return JSON.stringify(e,null,2);case"yaml":try{const n=BT.dump(e).trimEnd();switch(n){case"null":case"{}":case"[]":return"";default:return n}}catch(n){return n instanceof Error||n instanceof Zy?n.message:""}default:return""}}function Jge(e){const{name:t,label:n,labelHelpTitle:r,labelHelp:i,additionalControls:o,placeholderText:a,options:s,footer:l,helperText:c,isDisabled:u,isReadOnly:d,isRequired:f,validate:h,fieldNameToResetOnFieldChange:g}=e,p=yi(e),{t:y}=$e(),{control:b,setValue:x,getValues:S,formState:{isSubmitting:C,isValidating:_,defaultValues:w},resetField:k}=ni(),[T,D]=v.useState(!1),P=v.useCallback(()=>D(!T),[T]),[A]=Pt(),M=Lc(e.label,e.isRequired),j=Ws(w,e.name);return v.useEffect(()=>{S(e.name)||s.length===1&&f&&x(e.name,s[0].value)},[S,f,s,e.name,x]),m.jsx($s,{name:t,control:b,defaultValue:e.defaultValue,shouldUnregister:!0,render:({field:{onChange:I,value:$},fieldState:{error:R}})=>{const G=(N,U)=>{var J;const X=(J=s.find(Q=>Q.label===U.toString()))==null?void 0:J.value;I(X),g&&k(g),e.onChange&&e.onChange(X),D(!1)},H=R!=null&&R.message?h&&_?A.validating:R==null?void 0:R.message:void 0,z=s.find(N=>N.value===$);return m.jsx(Uc,{fieldId:p,label:n,labelHelpTitle:r??n,labelHelp:i,additionalControls:o,helperText:c,helperTextInvalid:H,isRequired:f,children:m.jsxs("div",{style:{display:"flex"},children:[m.jsx(jo,{id:p,itemID:p,placeholderText:a,variant:"single","aria-describedby":`${p}-form-group`,selections:z==null?void 0:z.label,onSelect:G,isOpen:T,onToggle:P,onClear:f?void 0:()=>{I(null),D(!1)},maxHeight:280,validated:H?"error":void 0,isDisabled:u||d||C,hasPlaceholderStyle:!0,footer:l,ouiaId:"menu-select","data-cy":p,children:s.map(N=>{const U=qr(N);return m.jsx(Ur,{id:U,value:N.label,label:N.label,description:N.description,"data-cy":U,children:N.label},N.label)})}),m.jsx(Yr,{actions:[{label:y("Undo changes"),type:ot.Button,selection:Ye.None,onClick:()=>{x(e.name,j)},isHidden:()=>!e.enableUndo||$===j},{label:y("Reset to default"),type:ot.Button,selection:Ye.None,onClick:()=>{x(e.name,e.defaultValue)},isHidden:()=>!e.enableReset||$===e.defaultValue}],variant:O.ButtonVariant.control,position:"right"})]})})},rules:{required:M,validate:h}})}function Qge(e){const{name:t,helperText:n,validate:r,additionalControls:i,label:o,labelHelp:a,labelHelpTitle:s,labelOn:l,labelOff:c}=e,{control:u,formState:{isSubmitting:d,isValidating:f}}=ni(),h=yi(e);return m.jsx($s,{name:t,control:u,shouldUnregister:!0,render:({field:{onChange:g,value:p},fieldState:{error:y}})=>{const b=r&&f||y==null?void 0:y.message;return m.jsx(Uc,{fieldId:h,"data-cy":h+"-form-group",label:o,labelHelpTitle:s??o,labelHelp:a,helperText:n,helperTextInvalid:b,additionalControls:i,children:m.jsx(O.Switch,{"data-cy":h+"-toggle","aria-label":o,isChecked:p,onChange:x=>g(x),isDisabled:d,label:l,labelOff:c})})}})}function e0e(e){const{type:t,name:n,label:r,labelHelpTitle:i,labelHelp:o,additionalControls:a,placeholder:s,button:l,helperText:c,isDisabled:u,isReadOnly:d,isRequired:f,validate:h,minLength:g,maxLength:p,min:y,max:b,pattern:x,selectTitle:S,selectOpen:C,selectValue:_,autoFocus:w,autoComplete:k,disableAutoResize:T}=e,D=yi(e),{control:P,setValue:A,formState:{isSubmitting:M,isValidating:j}}=ni(),[I,$]=v.useState(!1),[R]=Pt(),G=Lc(e.label,e.isRequired);return m.jsx($s,{name:n,control:P,shouldUnregister:!0,render:({field:{onChange:H,value:z,name:N},fieldState:{error:U}})=>{const X=U!=null&&U.message?h&&j?R.validating:U==null?void 0:U.message:void 0;function J(Q){H(Q.trimStart())}return m.jsx(Uc,{fieldId:D,label:r,labelHelpTitle:i??r,labelHelp:o,additionalControls:a,helperText:c,helperTextInvalid:X,isRequired:f,children:m.jsxs(O.InputGroup,{children:[m.jsx(O.InputGroupItem,{isFill:!0,children:m.jsx(O.TextArea,{id:D,placeholder:s,onChange:(Q,ee)=>J(ee),value:z??"","aria-describedby":D?`${D}-form-group`:void 0,validated:X?"error":void 0,type:t==="password"?I?"text":"password":t,readOnlyVariant:d?"default":void 0,isDisabled:u,autoFocus:w,autoComplete:k||"off","data-cy":D,autoResize:T===void 0?!0:!T,rows:1,resizeOrientation:"vertical"})}),t==="password"&&m.jsx(O.Button,{variant:"control",onClick:()=>$(!I),isDisabled:u||d,children:I?m.jsx(ve.EyeIcon,{}):m.jsx(ve.EyeSlashIcon,{})}),S&&m.jsx(O.Button,{ouiaId:`lookup-${N}-button`,variant:"control",onClick:()=>C==null?void 0:C(Q=>{if(_){const ee=_(Q);A(N,ee,{shouldValidate:!0})}},S),"aria-label":"Options menu",isDisabled:u||M,children:m.jsx(ve.SearchIcon,{})}),l&&l]})})},rules:{required:G,validate:h,minLength:typeof r=="string"&&typeof g=="number"?{value:g,message:`${oi(r.toLocaleLowerCase())} must be at least ${g} characters.`}:g,maxLength:typeof r=="string"&&typeof p=="number"?{value:p,message:`${oi(r.toLocaleLowerCase())} cannot be greater than ${p} characters.`}:p,min:typeof r=="string"&&(typeof y=="number"||typeof y=="string")?{value:y,message:`${oi(r.toLocaleLowerCase())} must be less than ${y}.`}:g,max:typeof r=="string"&&(typeof b=="number"||typeof b=="string")?{value:b,message:`${oi(r.toLocaleLowerCase())} cannot be greater than ${b}.`}:g,pattern:x}})}function t0e(e){const{type:t,name:n,label:r,labelHelpTitle:i,labelHelp:o,additionalControls:a,placeholder:s,button:l,helperText:c,isDisabled:u,isReadOnly:d,isRequired:f,validate:h,minLength:g,maxLength:p,min:y,max:b,pattern:x,selectTitle:S,selectOpen:C,selectValue:_,autoFocus:w,autoComplete:k}=e,T=yi(e),{t:D}=$e(),{control:P,setValue:A,formState:{isSubmitting:M,isValidating:j,defaultValues:I}}=ni(),[$,R]=v.useState(!1),[G]=Pt(),H=Lc(e.label,e.isRequired),z=Ws(I,e.name);return m.jsx($s,{name:n,control:P,shouldUnregister:!0,defaultValue:e.defaultValue,render:({field:{onChange:N,value:U,name:X},fieldState:{error:J}})=>{const Q=J!=null&&J.message?h&&j?G.validating:J==null?void 0:J.message:void 0;let ee=U;switch(t){case"datetime-local":if(U){const ue=new Date(U);ee=new Date(ue.getTime()-ue.getTimezoneOffset()*6e4).toISOString().slice(0,16)}break}function ie(ue){switch(e.type){case"datetime-local":{N(new Date(ue).toISOString());break}case"number":{let he=Number(ue);if(ue===""||isNaN(he)){A(X,null),N(null);return}b!==void 0&&he>Number(b)&&(he=Number(b)),y!==void 0&&he<Number(y)&&(he=Number(y)),A(X,he),N(he);break}default:N(ue.trimStart())}}return m.jsx(Uc,{fieldId:T,label:r,labelHelpTitle:i??r,labelHelp:o,additionalControls:a,helperText:c,helperTextInvalid:Q,isRequired:f,children:m.jsxs(O.InputGroup,{children:[m.jsx(O.InputGroupItem,{isFill:!0,children:m.jsx(O.TextInput,{id:T,placeholder:s,onChange:(ue,he)=>ie(he),value:ee??"","aria-describedby":T?`${T}-form-group`:void 0,validated:Q?"error":void 0,type:t==="password"?$?"text":"password":t,readOnlyVariant:d?"default":void 0,isDisabled:u,autoFocus:w,autoComplete:k||"off","data-cy":T})}),t==="password"&&m.jsx(O.Button,{variant:"control",onClick:()=>R(!$),isDisabled:u||d,children:$?m.jsx(ve.EyeIcon,{}):m.jsx(ve.EyeSlashIcon,{})}),S&&m.jsx(O.Button,{ouiaId:`lookup-${X}-button`,variant:"control",onClick:()=>C==null?void 0:C(ue=>{if(_){const he=_(ue);A(X,he,{shouldValidate:!0})}},S),"aria-label":"Options menu",isDisabled:u||M,children:m.jsx(ve.SearchIcon,{"data-cy":"lookup-button"})}),l,m.jsx(Yr,{actions:[{label:D("Undo changes"),type:ot.Button,selection:Ye.None,onClick:()=>{A(e.name,z)},isHidden:()=>!e.enableUndo||U===z},{label:D("Reset to default"),type:ot.Button,selection:Ye.None,onClick:()=>{A(e.name,e.defaultValue)},isHidden:()=>!e.enableReset||U===e.defaultValue}],variant:O.ButtonVariant.control,position:"right"})]})})},rules:{required:H,validate:h,minLength:typeof r=="string"&&typeof g=="number"?{value:g,message:`${oi(r.toLocaleLowerCase())} must be at least ${g} characters.`}:g,maxLength:typeof r=="string"&&typeof p=="number"?{value:p,message:`${oi(r.toLocaleLowerCase())} cannot be greater than ${p} characters.`}:p,min:typeof r=="string"&&(typeof y=="number"||typeof y=="string")?{value:y,message:`${oi(r.toLocaleLowerCase())} must be greater or equal to ${y}.`}:g,max:typeof r=="string"&&(typeof b=="number"||typeof b=="string")?{value:b,message:`${oi(r.toLocaleLowerCase())} cannot be greater than ${b}.`}:b,pattern:x}})}const hv=v.createContext({isOpen:!1,setState:()=>({})});function _h(){return v.useContext(hv)}function _3(e){const t=fn("xl"),[n,r]=v.useState(()=>t),i=v.useCallback(o=>{o.isOpen!==void 0&&r(o.isOpen)},[]);return v.useEffect(()=>i({isOpen:t}),[t,i]),m.jsx(hv.Provider,{value:{isOpen:n,setState:i},children:e.children})}function S3(){const e=$t.useNavigate(),t=fn("xl"),n=_h();return v.useCallback(i=>{e(i),t||n.setState({isOpen:!n.isOpen})},[e,t,n])}const mv=v.createContext([{},()=>{}]);function n0e(){return v.useContext(mv)[0]}function r0e(){return v.useContext(mv)}function i0e(e){const[t,n]=v.useState({}),r=v.useCallback(o=>{n(C3("",o))},[]),i=v.useMemo(()=>[t,r],[t,r]);return m.jsx(mv.Provider,{value:i,children:e.children})}function C3(e,t){const n={};return t.forEach(r=>{const i=(e+"/"+r.path).replace("//","/");"id"in r&&typeof r.id=="string"&&(n[r.id]=i),"children"in r&&Object.assign(n,C3(i,r.children))}),n}const w3=v.createContext({notificationsDrawerOpen:!1,setNotificationsDrawerOpen:()=>{throw new Error("PageNotificationsContext not implemented")},notificationGroups:{},setNotificationGroups:()=>{throw new Error("PageNotificationsContext not implemented")}});function Sh(){return v.useContext(w3)}function o0e(e){const[t,n]=v.useState(!1),[r,i]=v.useState({});return m.jsx(w3.Provider,{value:{notificationGroups:r,setNotificationGroups:i,notificationsDrawerOpen:t,setNotificationsDrawerOpen:n},children:e.children})}function a0e(e){const{t}=$e(),{notificationsDrawerOpen:n,setNotificationsDrawerOpen:r}=Sh(),i=v.useRef(null);function o(){var s;r(!1),(s=i.current)==null||s.focus()}const{notificationGroups:a}=Sh();return m.jsx(O.Drawer,{isExpanded:n,onExpand:()=>r(!0),children:m.jsx(O.DrawerContent,{panelContent:m.jsx(O.DrawerPanelContent,{children:m.jsxs(O.NotificationDrawer,{"data-cy":"notifications-drawer",children:[m.jsx(O.NotificationDrawerHeader,{title:t("Notifications"),children:m.jsx(O.DrawerCloseButton,{onClick:o})}),m.jsx(O.NotificationDrawerBody,{children:m.jsx(O.NotificationDrawerGroupList,{children:Object.values(a).map((s,l)=>m.jsx(l0e,{group:s},l))})})]})}),children:m.jsx(s0e,{children:e.children})})})}const s0e=Pe(O.DrawerContentBody)`
|
495
495
|
max-height: 100%;
|
496
|
-
`;function l0e(e){const{t}=$e(),[n,r]=v.useState(!0);return m.jsx(O.NotificationDrawerGroup,{title:e.group.title,isExpanded:n,count:e.group.notifications.length,onExpand:(i,o)=>r(o),children:m.jsxs(O.NotificationDrawerList,{isHidden:!n,children:[e.group.notifications.map((i,o)=>m.jsx(c0e,{notification:i},o)),e.group.notifications.length===0&&m.jsxs(O.EmptyState,{variant:O.EmptyStateVariant.full,children:[m.jsx(O.EmptyStateHeader,{headingLevel:"h2",titleText:t("No notifications")}),m.jsx(O.EmptyStateBody,{children:t("There are currently no notifications.")})]})]})})}function c0e(e){const t=e.notification.variant==="info"?void 0:e.notification.variant,n=$t.useNavigate(),{setNotificationsDrawerOpen:r}=Sh(),i=e.notification.timestamp?new Date(e.notification.timestamp):void 0,o=i?`${i.toLocaleDateString()} ${i.toLocaleTimeString()}`:void 0;return m.jsxs(O.NotificationDrawerListItem,{variant:e.notification.variant,onClick:()=>{n(e.notification.to),r(!1)},children:[m.jsx(O.NotificationDrawerListItemHeader,{title:e.notification.title,variant:t}),m.jsx(O.NotificationDrawerListItemBody,{timestamp:o,children:e.notification.description})]})}function u0e(e){return m.jsx(db,{children:m.jsx(ax,{defaultRefreshInterval:e.defaultRefreshInterval,children:m.jsx(i0e,{children:m.jsx(TO,{children:m.jsx(y5,{children:m.jsx(_3,{children:m.jsx(o0e,{children:m.jsx(PD,{children:e.children})})})})})})})})}function E3(e){const[t]=Pt();return m.jsx(v5,{message:t.errorText,children:m.jsx("div",{style:{display:"flex",flexDirection:"column",height:"100%",maxHeight:"100%"},children:e.children})})}function d0e(e){const t=fn("sm");return m.jsxs(O.Masthead,{display:{default:"inline"},style:{borderBottom:"1px solid #fff4",paddingRight:0},children:[m.jsx(O3,{}),t&&m.jsx(O.MastheadMain,{children:m.jsx(O.MastheadBrand,{component:n=>m.jsx($t.Link,{...n,to:"/"}),children:e.brand})}),m.jsx(O.MastheadContent,{style:{marginLeft:0,minHeight:0},children:m.jsx(O.Toolbar,{id:"toolbar","data-cy":"toolbar",inset:{default:"insetNone"},style:{padding:0},children:m.jsx(O.ToolbarContent,{children:e.children})})})]})}function O3(){const e=_h();return m.jsx(O.MastheadToggle,{onClick:()=>e.setState({isOpen:!e.isOpen}),children:m.jsx(O.PageToggleButton,{"data-cy":"nav-toggle",variant:"plain","aria-label":"Global navigation",children:m.jsx(ve.BarsIcon,{})})})}function f0e(){const{setNotificationsDrawerOpen:e,notificationGroups:t}=Sh(),n=Object.values(t).reduce((r,i)=>r+i.notifications.length,0);return m.jsx(O.NotificationBadge,{"data-cy":"notification-badge",variant:n===0?"read":"unread",count:n,onClick:()=>e(r=>!r)})}function h0e(){const[e,t]=v.useContext(Go);return e.activeTheme==="dark"?m.jsx(O.Button,{"data-cy":"settings-icon",variant:"plain",onClick:()=>t({...e,theme:"light"}),children:m.jsx(ve.MoonIcon,{})}):m.jsx(O.Button,{"data-cy":"theme-icon",variant:"plain",onClick:()=>t({...e,theme:"dark"}),children:m.jsx(ve.SunIcon,{})})}function k3(e){const{navigation:t}=e,n=_h();return m.jsx(O.PageSidebar,{isSidebarOpen:n.isOpen,className:"bg-lighten",children:m.jsxs(O.PageSidebarBody,{children:[e.contextSwitcher&&m.jsxs(m.Fragment,{children:[m.jsx(O.PageSection,{style:{background:"transparent",paddingTop:16},children:m.jsx(O.Stack,{hasGutter:!0,children:e.contextSwitcher})}),m.jsx(O.Divider,{})]}),m.jsx(O.Nav,{"data-cy":"page-navigation",className:"side-nav",children:m.jsx(O.NavList,{children:m.jsx(Ch,{baseRoute:e.basename??"",items:t})})})]})})}function Ch(e){return m.jsx(m.Fragment,{children:e.items.filter(t=>"hidden"in t?t.hidden!==!0:!0).map((t,n)=>m.jsx(m0e,{item:t,baseRoute:e.baseRoute},t.id??t.label??n))})}function m0e(e){var u,d;const{item:t}=e,[n,r]=v.useState(()=>localStorage.getItem("default-nav-expanded")==="true"||localStorage.getItem((t.id??t.label)+"-expanded")==="true"),i=f=>{r(f),localStorage.setItem((t.id??t.label)+"-expanded",f?"true":"false")};let o;if("id"in e.item)o=e.item.id;else if("children"in e.item){const f=e.item.children.find(h=>h.path==="");f&&"id"in f&&(o=f.id)}o||(o=(u=e.item.label)==null?void 0:u.split(" ").join("-").toLowerCase());const a=S3();let s=e.baseRoute+"/"+t.path;if(s=s.replace("//","/"),t.path==="/"&&"children"in t)return m.jsx(Ch,{items:t.children,baseRoute:""});const l="children"in t&&((d=t.children)==null?void 0:d.find(f=>f.label)),c={fontSize:"small",opacity:.5,textAlign:"left"};if(!l&&"label"in t){let f=(process.env.ROUTE_PREFIX??"")+s;f=f.replace("//","/");const h=t.href?!1:location.pathname.startsWith(f);return m.jsxs(O.NavItem,{id:o,href:t.href||s,isActive:h,className:h?"bg-lighten":void 0,onClick:()=>t.href?window.open(t.href,"_blank"):a(s),target:t.href?"_blank":"","data-cy":o,style:{display:"flex",alignItems:"stretch",flexDirection:"column"},children:[m.jsxs(O.Flex,{children:[m.jsx(O.FlexItem,{grow:{default:"grow"},children:t.label}),"badge"in t&&t.badge&&m.jsx(O.FlexItem,{children:m.jsx(O.Label,{isCompact:!0,variant:"outline",color:t.badgeColor,children:t.badge})}),"href"in t&&t.href&&m.jsx("span",{className:"pf-v5-c-nav__toggle",children:m.jsx("span",{className:"pf-v5-c-nav__toggle-icon",children:m.jsx(ve.ExternalLinkAltIcon,{})})})]}),t.subtitle&&m.jsx("div",{style:c,children:t.subtitle})]})}return!l||t.label===void 0?null:t.label?m.jsx(O.NavExpandable,{buttonProps:{id:o},title:m.jsxs("div",{children:[m.jsx("div",{style:{textAlign:"left"},children:t.label}),t.subtitle&&m.jsx("div",{style:c,children:t.subtitle})]}),isExpanded:n,onExpand:(f,h)=>i(h),children:m.jsx(Ch,{items:t.children,baseRoute:s})}):m.jsx(Ch,{items:t.children,baseRoute:s})}function g0e(e){const{navigation:t,masthead:n}=e,r=v.useMemo(()=>[{path:e.basename??"/",element:m.jsx(O.Page,{header:n,sidebar:m.jsx(k3,{navigation:t,basename:e.basename,contextSwitcher:e.contextSwitcher}),children:m.jsx(a0e,{children:m.jsxs("div",{style:{maxHeight:"100%",overflow:"hidden",height:"100%",display:"flex",flexDirection:"column"},children:[e.banner,m.jsx("div",{style:{flexGrow:1,overflow:"hidden"},children:m.jsx($t.Outlet,{})})]})})}),children:t.filter(({href:a})=>!a)},{path:"*",element:m.jsx(VO,{})}],[n,t,e.banner,e.basename,e.contextSwitcher]),[i,o]=r0e();return v.useEffect(()=>o(r),[r,o]),m.jsx($t.Routes,{children:r.map(T3)})}function T3(e){var t;return m.jsx($t.Route,{path:e.path,element:e.element,children:(t=e.children)==null?void 0:t.map(T3)},e.path)}function p0e(e){return e.replace(/^\//,"")}function A3(e,t){for(const n of e){if("id"in n&&n.id===t)return n;if("children"in n){const r=A3(n.children,t);if(r)return r}}}function D3(e,t){for(let n=0;n<e.length;n++){const r=e[n];if("id"in r&&r.id===t)return e.splice(n,1),r;if("children"in r){const i=D3(r.children,t);if(i)return i}}}function P3(e,t,n){for(const r of e)if("id"in r&&r.id===t){const i=r;"children"in r||(i.children=[]),i.children.push(n);return}else"children"in r&&P3(r.children,t,n)}function j3(e,t,n){for(let r=0;r<e.length;r++){const i=e[r];if("id"in i&&i.id===t){e.splice(r+1,0,n);return}else"children"in i&&j3(i.children,t,n)}}function M3(e,t,n){for(let r=0;r<e.length;r++){const i=e[r];if("id"in i&&i.id===t){e.splice(r,0,n);return}else"children"in i&&M3(i.children,t,n)}}function I3(){const e=n0e();return v.useCallback((t,n)=>{let r=e[t]??"";const i=n==null?void 0:n.params,o=n==null?void 0:n.query;return r?(i&&(r=Object.keys(i).reduce((a,s)=>{let l=i[s];if(l===void 0)return a;l=encodeURIComponent(l.toString());const c=":"+s,u=new RegExp(c+"(?!.*"+c+")","g");return a.replace(u,l)},r)),o&&(r=`${r}?${Object.keys(o).map(a=>{let s=o[a];return s===void 0?"":(s=encodeURIComponent(s.toString()),`${a}=${s}`)}).join("&").replace("/&&/g","&")}`)):console.error(`Page id ${t} not found`),r},[e])}function y0e(){const e=$t.useNavigate(),t=I3();return v.useCallback((n,r)=>{const i=t(n,r);i&&e(i)},[e,t])}function v0e(e){const{loading:t}=e,[n,r]=v.useState((e==null?void 0:e.initialTabIndex)??0),i=v.useCallback((l,c)=>r(c),[r]),o=v.Children.toArray(e.children),a=o.map((l,c)=>{if(v.isValidElement(l)&&l.type===gv){const u=l.props.label;return m.jsx(O.Tab,{title:u||m.jsx(O.Skeleton,{width:"60px"}),eventKey:c},u??c)}return l}),s=o[n];return t?m.jsx(O.Tabs,{style:{flexShrink:0,backgroundColor:"var(--pf-v5-c-tabs__link--BackgroundColor)"},children:m.jsx(gv,{children:m.jsx(O.PageSection,{variant:"light",children:m.jsx(O.Skeleton,{})})})}):m.jsxs(m.Fragment,{children:[m.jsx(O.Tabs,{activeKey:n,onSelect:i,inset:{default:"insetSm"},isBox:!0,style:{flexShrink:0,backgroundColor:"var(--pf-v5-c-tabs__link--BackgroundColor)"},children:a}),s]})}function gv(e){return m.jsx(m.Fragment,{children:e.children})}function b0e(e,t,n,r){return(i,o)=>{e(a=>{r?r(a):i(a.map(s=>t(s)))},o?o.map(a=>n(a)):[])}}function x0e(e,t,n,r){return(i,o)=>{e(a=>{r?r(a):i(t(a))},o?n(o):void 0)}}function _0e(){const[e,t]=v.useState(!0);return v.useEffect(()=>()=>{t(!1)},[]),e}function S0e(){const e=v.useRef({isMounted:!0});return v.useEffect(()=>()=>{e.current.isMounted=!1},[]),e}function $3(){const e=_0e(),[t,n]=v.useState(e?window.location:void 0),r=v.useCallback(()=>{n(window.location)},[]);v.useEffect(()=>{if(e)return t||r(),window.addEventListener("popstate",r),()=>{window.removeEventListener("popstate",r)}},[e,t,r]);const i=v.useCallback(a=>{window.history.replaceState(null,"",a),r()},[r]),o=v.useCallback(a=>{window.history.replaceState(null,"",a),r()},[r]);return{location:t,push:i,update:o}}function L3(){var i,o;const e=$3(),t=((i=e.location)==null?void 0:i.pathname)||"/",n=v.useMemo(()=>{var s;let a=(s=e.location)==null?void 0:s.search;return a&&a.includes("?specPath=")?a=a.substring(0,a.indexOf("?specPath=")):a&&a.includes("&specPath=")&&(a=a.substring(0,a.indexOf("&specPath="))),new URLSearchParams(a??"/")},[(o=e.location)==null?void 0:o.search]),r=v.useCallback(a=>{const s=a.toString();s?e.update("?"+s):e.update(t)},[e,t]);return[n,r]}const F3=v.createContext({});function va(){return v.useContext(F3)}function C0e(e,t){return!e.hidden||!e.hidden(t)?e:null}function Gi(e){return(e==null?void 0:e.substeps)!==void 0}function w0e(e){const{steps:t,onSubmit:n}=e,[r,i]=v.useState(!1),[o,a]=v.useState(null),[s,l]=v.useState({}),[c,u]=v.useState(e.stepDefaults??{}),[d,f]=v.useState({}),[h,g]=v.useState(),[p,y]=v.useState(!1),[b,x]=L3(),S=v.useMemo(()=>E0e(t),[t]);v.useEffect(()=>{if(process.env.NODE_ENV==="development")for(const k in e.stepDefaults)t.find(T=>T.id===k)||console.warn(`PageWizardProvider: defaultValue key '${k}' not found in steps.`)},[e.stepDefaults,t]),v.useEffect(()=>{const k=wh(t,s);o||!k.length||(k[0].substeps?a(k[0].substeps[0]):a(k[0]))},[o,t,s]);const C=v.useCallback(async(k={})=>{var M;const T=N3(t,{...s,...k});if(o===null)return Promise.resolve();if(!Gi(o)&&o.validate&&await o.validate(k,s),(o==null?void 0:o.id)===((M=T[T.length-1])==null?void 0:M.id)){y(!0);try{await n(s)}catch(j){g(j instanceof Error?j:new Error($c("An error occurred.")))}finally{y(!1)}return}const P=T.findIndex(j=>j.id===(o==null?void 0:o.id)),A=Gi(T[P+1])?T[P+2]:T[P+1];return x(new URLSearchParams("")),l(j=>({...j,...k})),u(j=>({...j,[o==null?void 0:o.id]:k})),a(A),Promise.resolve()},[o,t,n,x,s,g]),_=v.useCallback(()=>{const k=wh(S,s),T=k.findIndex(P=>P.id===(o==null?void 0:o.id)),D=Gi(k[T-1])?k[T-2]:k[T-1];x(new URLSearchParams("")),a(D)},[o==null?void 0:o.id,S,x,s]),w=v.useMemo(()=>({wizardData:s,setWizardData:l,stepData:c,setStepData:u,steps:e.steps,visibleSteps:wh(t,s),visibleStepsFlattened:N3(t,s),activeStep:o,setActiveStep:a,stepError:d,setStepError:f,submitError:h,setSubmitError:g,isToggleExpanded:r,setToggleExpanded:i,onNext:C,onBack:_,isSubmitting:p}),[s,l,c,u,e.steps,t,o,a,d,f,h,g,r,i,C,_,p]);return m.jsx(F3.Provider,{value:w,children:e.children})}function E0e(e){return e.reduce((t,n)=>(t.push(n),Gi(n)&&t.push(...n.substeps),t),[])}function wh(e,t){return e.filter(n=>C0e(n,t))}function N3(e,t){return wh(e,t).reduce((r,i)=>(r.push(i),Gi(i)&&r.push(...i.substeps),r),[])}function W3(e){const{t}=$e(),{activeStep:n,visibleStepsFlattened:r,setSubmitError:i}=va(),o=(n==null?void 0:n.id)===r[r.length-1].id,a=t(o?"Finish":"Next"),s=Gi(r[0])?(n==null?void 0:n.id)===r[1].id:(n==null?void 0:n.id)===r[0].id,l=s?"pf-v5-c-button pf-m-disabled":"pf-v5-c-button pf-m-secondary";return m.jsxs("footer",{className:"pf-v5-c-wizard__footer border-top bg-lighten","data-cy":"wizard-footer",children:[n!==null&&"inputs"in n?m.jsx(Dy,{style:{minWidth:10},children:a}):m.jsx("button",{"data-cy":"wizard-next",className:"pf-v5-c-button pf-m-primary",type:"submit",onClick:()=>{var c;i(void 0),(c=e.onNext)==null||c.call(e)},children:a}),m.jsx("button",{type:"button","data-cy":"wizard-back",className:l,disabled:s,onClick:()=>{var c;i(void 0),(c=e.onBack)==null||c.call(e)},children:t("Back")}),m.jsx("div",{"data-cy":"wizard-cancel",className:"pf-v5-c-wizard__footer-cancel",children:m.jsx("button",{className:"pf-v5-c-button pf-m-link",type:"button",onClick:e.onCancel,children:t("Cancel")})})]})}function O0e({onCancel:e,disableGrid:t,errorAdapter:n,isVertical:r,singleColumn:i}){const o=$t.useNavigate(),{activeStep:a,stepData:s,onNext:l,onBack:c,submitError:u,isSubmitting:d}=va(),f=v.useCallback(()=>{e?e():o(-1)},[o,e]);return d?m.jsx(O.Bullseye,{children:m.jsx(O.Spinner,{})}):m.jsxs(E3,{children:[m.jsx(T0e,{error:u}),a!==null&&("inputs"in a?m.jsxs(bk,{onSubmit:l,footer:m.jsx(W3,{onBack:c,onCancel:f}),defaultValue:s[a.id],errorAdapter:n,disableGrid:t,isVertical:r,singleColumn:i,isWizard:!0,children:[m.jsx(k0e,{}),a.inputs]},a.id):m.jsxs("div",{"data-cy":`wizard-section-${a.id}`,style:{display:"flex",flexDirection:"column",flexGrow:1,overflow:"hidden"},children:[m.jsx(O.PageSection,{"aria-label":$c("Wizard step content"),hasOverflowScroll:!0,isFilled:!0,variant:"light",children:a==null?void 0:a.element}),m.jsx(W3,{onNext:()=>void l({}),onBack:c,onCancel:f})]}))]})}function k0e(){const{activeStep:e,setStepError:t}=va(),{errors:n}=wy(),r=JSON.stringify(n);return v.useEffect(()=>{Object.keys(n).length===0?t({}):e&&t({[e.id]:n})},[n,e,t,r]),null}function T0e(e){const{t}=$e(),n=e.error;if(!e.error)return null;if(!(e.error instanceof Error))return typeof e.error=="string"?m.jsx(O.Alert,{variant:"danger",title:e.error}):m.jsx(O.Alert,{variant:"danger",title:t("An error occurred.")});if("message"in e.error&&!n.json)return m.jsx(O.Alert,{variant:"danger",title:e.error.message});if(n.json)return m.jsx(O.Alert,{variant:"danger",title:n.message,isInline:!0,children:Object.values(n.json).map((r,i)=>m.jsx("div",{children:r},i))})}const A0e=Pe.div`
|
496
|
+
`;function l0e(e){const{t}=$e(),[n,r]=v.useState(!0);return m.jsx(O.NotificationDrawerGroup,{title:e.group.title,isExpanded:n,count:e.group.notifications.length,onExpand:(i,o)=>r(o),children:m.jsxs(O.NotificationDrawerList,{isHidden:!n,children:[e.group.notifications.map((i,o)=>m.jsx(c0e,{notification:i},o)),e.group.notifications.length===0&&m.jsxs(O.EmptyState,{variant:O.EmptyStateVariant.full,children:[m.jsx(O.EmptyStateHeader,{headingLevel:"h2",titleText:t("No notifications")}),m.jsx(O.EmptyStateBody,{children:t("There are currently no notifications.")})]})]})})}function c0e(e){const t=e.notification.variant==="info"?void 0:e.notification.variant,n=$t.useNavigate(),{setNotificationsDrawerOpen:r}=Sh(),i=e.notification.timestamp?new Date(e.notification.timestamp):void 0,o=i?`${i.toLocaleDateString()} ${i.toLocaleTimeString()}`:void 0;return m.jsxs(O.NotificationDrawerListItem,{variant:e.notification.variant,onClick:()=>{n(e.notification.to),r(!1)},children:[m.jsx(O.NotificationDrawerListItemHeader,{title:e.notification.title,variant:t}),m.jsx(O.NotificationDrawerListItemBody,{timestamp:o,children:e.notification.description})]})}function u0e(e){return m.jsx(db,{children:m.jsx(ax,{defaultRefreshInterval:e.defaultRefreshInterval,children:m.jsx(i0e,{children:m.jsx(TO,{children:m.jsx(y5,{children:m.jsx(_3,{children:m.jsx(o0e,{children:m.jsx(PD,{children:e.children})})})})})})})})}function E3(e){const[t]=Pt();return m.jsx(v5,{message:t.errorText,children:m.jsx("div",{style:{display:"flex",flexDirection:"column",height:"100%",maxHeight:"100%"},children:e.children})})}function d0e(e){const t=fn("sm");return m.jsxs(O.Masthead,{display:{default:"inline"},style:{borderBottom:"1px solid #fff4",paddingRight:0},children:[m.jsx(O3,{}),t&&m.jsx(O.MastheadMain,{children:m.jsx(O.MastheadBrand,{component:n=>m.jsx($t.Link,{...n,to:"/"}),children:e.brand})}),m.jsx(O.MastheadContent,{style:{marginLeft:0,minHeight:0},children:m.jsx(O.Toolbar,{id:"toolbar","data-cy":"toolbar",inset:{default:"insetNone"},style:{padding:0},children:m.jsx(O.ToolbarContent,{children:e.children})})})]})}function O3(){const e=_h();return m.jsx(O.MastheadToggle,{onClick:()=>e.setState({isOpen:!e.isOpen}),children:m.jsx(O.PageToggleButton,{"data-cy":"nav-toggle",variant:"plain","aria-label":"Global navigation",children:m.jsx(ve.BarsIcon,{})})})}function f0e(){const{setNotificationsDrawerOpen:e,notificationGroups:t}=Sh(),n=Object.values(t).reduce((r,i)=>r+i.notifications.length,0);return m.jsx(O.NotificationBadge,{"data-cy":"notification-badge",variant:n===0?"read":"unread",count:n,onClick:()=>e(r=>!r)})}function h0e(){const[e,t]=v.useContext(Go);return e.activeTheme==="dark"?m.jsx(O.Button,{"data-cy":"settings-icon",variant:"plain",onClick:()=>t({...e,theme:"light"}),children:m.jsx(ve.MoonIcon,{})}):m.jsx(O.Button,{"data-cy":"theme-icon",variant:"plain",onClick:()=>t({...e,theme:"dark"}),children:m.jsx(ve.SunIcon,{})})}function k3(e){const{navigation:t}=e,n=_h();return m.jsx(O.PageSidebar,{isSidebarOpen:n.isOpen,className:"bg-lighten",children:m.jsxs(O.PageSidebarBody,{children:[e.contextSwitcher&&m.jsxs(m.Fragment,{children:[m.jsx(O.PageSection,{style:{background:"transparent",paddingTop:16},children:m.jsx(O.Stack,{hasGutter:!0,children:e.contextSwitcher})}),m.jsx(O.Divider,{})]}),m.jsx(O.Nav,{"data-cy":"page-navigation",className:"side-nav",children:m.jsx(O.NavList,{children:m.jsx(Ch,{baseRoute:e.basename??"",items:t})})})]})})}function Ch(e){return m.jsx(m.Fragment,{children:e.items.filter(t=>"hidden"in t?t.hidden!==!0:!0).map((t,n)=>m.jsx(m0e,{item:t,baseRoute:e.baseRoute},t.id??t.label??n))})}function m0e(e){var u,d;const{item:t}=e,[n,r]=v.useState(()=>localStorage.getItem("default-nav-expanded")==="true"||localStorage.getItem((t.id??t.label)+"-expanded")==="true"),i=f=>{r(f),localStorage.setItem((t.id??t.label)+"-expanded",f?"true":"false")};let o;if("id"in e.item)o=e.item.id;else if("children"in e.item){const f=e.item.children.find(h=>h.path==="");f&&"id"in f&&(o=f.id)}o||(o=(u=e.item.label)==null?void 0:u.split(" ").join("-").toLowerCase());const a=S3();let s=e.baseRoute+"/"+t.path;if(s=s.replace("//","/"),t.path==="/"&&"children"in t)return m.jsx(Ch,{items:t.children,baseRoute:""});const l="children"in t&&((d=t.children)==null?void 0:d.find(f=>f.label)),c={fontSize:"small",opacity:.5,textAlign:"left"};if(!l&&"label"in t){let f=(process.env.ROUTE_PREFIX??"")+s;f=f.replace("//","/");const h=t.href?!1:location.pathname.startsWith(f);return m.jsxs(O.NavItem,{id:o,href:t.href||s,isActive:h,className:h?"bg-lighten":void 0,onClick:()=>t.href?window.open(t.href,"_blank"):a(s),target:t.href?"_blank":"","data-cy":o,style:{display:"flex",alignItems:"stretch",flexDirection:"column"},children:[m.jsxs(O.Flex,{children:[m.jsx(O.FlexItem,{grow:{default:"grow"},children:t.label}),"badge"in t&&t.badge&&m.jsx(O.FlexItem,{children:m.jsx(O.Label,{isCompact:!0,variant:"outline",color:t.badgeColor,children:t.badge})}),"href"in t&&t.href&&m.jsx("span",{className:"pf-v5-c-nav__toggle",children:m.jsx("span",{className:"pf-v5-c-nav__toggle-icon",children:m.jsx(ve.ExternalLinkAltIcon,{})})})]}),t.subtitle&&m.jsx("div",{style:c,children:t.subtitle})]})}return!l||t.label===void 0?null:t.label?m.jsx(O.NavExpandable,{buttonProps:{id:o},title:m.jsxs("div",{children:[m.jsx("div",{style:{textAlign:"left"},children:t.label}),t.subtitle&&m.jsx("div",{style:c,children:t.subtitle})]}),isExpanded:n,onExpand:(f,h)=>i(h),children:m.jsx(Ch,{items:t.children,baseRoute:s})}):m.jsx(Ch,{items:t.children,baseRoute:s})}function g0e(e){const{navigation:t,masthead:n}=e,r=v.useMemo(()=>[{path:e.basename??"/",element:m.jsx(O.Page,{header:n,sidebar:m.jsx(k3,{navigation:t,basename:e.basename,contextSwitcher:e.contextSwitcher}),children:m.jsx(a0e,{children:m.jsxs("div",{style:{maxHeight:"100%",overflow:"hidden",height:"100%",display:"flex",flexDirection:"column"},children:[e.banner,m.jsx("div",{style:{flexGrow:1,overflow:"hidden"},children:m.jsx($t.Outlet,{})})]})})}),children:t.filter(({href:a})=>!a)},{path:"*",element:m.jsx(VO,{})}],[n,t,e.banner,e.basename,e.contextSwitcher]),[i,o]=r0e();return v.useEffect(()=>o(r),[r,o]),m.jsx($t.Routes,{children:r.map(T3)})}function T3(e){var t;return m.jsx($t.Route,{path:e.path,element:e.element,children:(t=e.children)==null?void 0:t.map(T3)},e.path)}function p0e(e){return e.replace(/^\//,"")}function A3(e,t){for(const n of e){if("id"in n&&n.id===t)return n;if("children"in n){const r=A3(n.children,t);if(r)return r}}}function D3(e,t){for(let n=0;n<e.length;n++){const r=e[n];if("id"in r&&r.id===t)return e.splice(n,1),r;if("children"in r){const i=D3(r.children,t);if(i)return i}}}function P3(e,t,n){for(const r of e)if("id"in r&&r.id===t){const i=r;"children"in r||(i.children=[]),i.children.push(n);return}else"children"in r&&P3(r.children,t,n)}function j3(e,t,n){for(let r=0;r<e.length;r++){const i=e[r];if("id"in i&&i.id===t){e.splice(r+1,0,n);return}else"children"in i&&j3(i.children,t,n)}}function M3(e,t,n){for(let r=0;r<e.length;r++){const i=e[r];if("id"in i&&i.id===t){e.splice(r,0,n);return}else"children"in i&&M3(i.children,t,n)}}function I3(){const e=n0e();return v.useCallback((t,n)=>{let r=e[t]??"";const i=n==null?void 0:n.params,o=n==null?void 0:n.query;return r&&(i&&(r=Object.keys(i).reduce((a,s)=>{let l=i[s];if(l===void 0)return a;l=encodeURIComponent(l.toString());const c=":"+s,u=new RegExp(c+"(?!.*"+c+")","g");return a.replace(u,l)},r)),o&&(r=`${r}?${Object.keys(o).map(a=>{let s=o[a];return s===void 0?"":(s=encodeURIComponent(s.toString()),`${a}=${s}`)}).join("&").replace("/&&/g","&")}`)),r},[e])}function y0e(){const e=$t.useNavigate(),t=I3();return v.useCallback((n,r)=>{const i=t(n,r);i&&e(i)},[e,t])}function v0e(e){const{loading:t}=e,[n,r]=v.useState((e==null?void 0:e.initialTabIndex)??0),i=v.useCallback((l,c)=>r(c),[r]),o=v.Children.toArray(e.children),a=o.map((l,c)=>{if(v.isValidElement(l)&&l.type===gv){const u=l.props.label;return m.jsx(O.Tab,{title:u||m.jsx(O.Skeleton,{width:"60px"}),eventKey:c},u??c)}return l}),s=o[n];return t?m.jsx(O.Tabs,{style:{flexShrink:0,backgroundColor:"var(--pf-v5-c-tabs__link--BackgroundColor)"},children:m.jsx(gv,{children:m.jsx(O.PageSection,{variant:"light",children:m.jsx(O.Skeleton,{})})})}):m.jsxs(m.Fragment,{children:[m.jsx(O.Tabs,{activeKey:n,onSelect:i,inset:{default:"insetSm"},isBox:!0,style:{flexShrink:0,backgroundColor:"var(--pf-v5-c-tabs__link--BackgroundColor)"},children:a}),s]})}function gv(e){return m.jsx(m.Fragment,{children:e.children})}function b0e(e,t,n,r){return(i,o)=>{e(a=>{r?r(a):i(a.map(s=>t(s)))},o?o.map(a=>n(a)):[])}}function x0e(e,t,n,r){return(i,o)=>{e(a=>{r?r(a):i(t(a))},o?n(o):void 0)}}function _0e(){const[e,t]=v.useState(!0);return v.useEffect(()=>()=>{t(!1)},[]),e}function S0e(){const e=v.useRef({isMounted:!0});return v.useEffect(()=>()=>{e.current.isMounted=!1},[]),e}function $3(){const e=_0e(),[t,n]=v.useState(e?window.location:void 0),r=v.useCallback(()=>{n(window.location)},[]);v.useEffect(()=>{if(e)return t||r(),window.addEventListener("popstate",r),()=>{window.removeEventListener("popstate",r)}},[e,t,r]);const i=v.useCallback(a=>{window.history.replaceState(null,"",a),r()},[r]),o=v.useCallback(a=>{window.history.replaceState(null,"",a),r()},[r]);return{location:t,push:i,update:o}}function L3(){var i,o;const e=$3(),t=((i=e.location)==null?void 0:i.pathname)||"/",n=v.useMemo(()=>{var s;let a=(s=e.location)==null?void 0:s.search;return a&&a.includes("?specPath=")?a=a.substring(0,a.indexOf("?specPath=")):a&&a.includes("&specPath=")&&(a=a.substring(0,a.indexOf("&specPath="))),new URLSearchParams(a??"/")},[(o=e.location)==null?void 0:o.search]),r=v.useCallback(a=>{const s=a.toString();s?e.update("?"+s):e.update(t)},[e,t]);return[n,r]}const F3=v.createContext({});function va(){return v.useContext(F3)}function C0e(e,t){return!e.hidden||!e.hidden(t)?e:null}function Gi(e){return(e==null?void 0:e.substeps)!==void 0}function w0e(e){const{steps:t,onSubmit:n}=e,[r,i]=v.useState(!1),[o,a]=v.useState(null),[s,l]=v.useState({}),[c,u]=v.useState(e.stepDefaults??{}),[d,f]=v.useState({}),[h,g]=v.useState(),[p,y]=v.useState(!1),[b,x]=L3(),S=v.useMemo(()=>E0e(t),[t]);v.useEffect(()=>{if(process.env.NODE_ENV==="development")for(const k in e.stepDefaults)t.find(T=>T.id===k)||console.warn(`PageWizardProvider: defaultValue key '${k}' not found in steps.`)},[e.stepDefaults,t]),v.useEffect(()=>{const k=wh(t,s);o||!k.length||(k[0].substeps?a(k[0].substeps[0]):a(k[0]))},[o,t,s]);const C=v.useCallback(async(k={})=>{var M;const T=N3(t,{...s,...k});if(o===null)return Promise.resolve();if(!Gi(o)&&o.validate&&await o.validate(k,s),(o==null?void 0:o.id)===((M=T[T.length-1])==null?void 0:M.id)){y(!0);try{await n(s)}catch(j){g(j instanceof Error?j:new Error($c("An error occurred.")))}finally{y(!1)}return}const P=T.findIndex(j=>j.id===(o==null?void 0:o.id)),A=Gi(T[P+1])?T[P+2]:T[P+1];return x(new URLSearchParams("")),l(j=>({...j,...k})),u(j=>({...j,[o==null?void 0:o.id]:k})),a(A),Promise.resolve()},[o,t,n,x,s,g]),_=v.useCallback(()=>{const k=wh(S,s),T=k.findIndex(P=>P.id===(o==null?void 0:o.id)),D=Gi(k[T-1])?k[T-2]:k[T-1];x(new URLSearchParams("")),a(D)},[o==null?void 0:o.id,S,x,s]),w=v.useMemo(()=>({wizardData:s,setWizardData:l,stepData:c,setStepData:u,steps:e.steps,visibleSteps:wh(t,s),visibleStepsFlattened:N3(t,s),activeStep:o,setActiveStep:a,stepError:d,setStepError:f,submitError:h,setSubmitError:g,isToggleExpanded:r,setToggleExpanded:i,onNext:C,onBack:_,isSubmitting:p}),[s,l,c,u,e.steps,t,o,a,d,f,h,g,r,i,C,_,p]);return m.jsx(F3.Provider,{value:w,children:e.children})}function E0e(e){return e.reduce((t,n)=>(t.push(n),Gi(n)&&t.push(...n.substeps),t),[])}function wh(e,t){return e.filter(n=>C0e(n,t))}function N3(e,t){return wh(e,t).reduce((r,i)=>(r.push(i),Gi(i)&&r.push(...i.substeps),r),[])}function W3(e){const{t}=$e(),{activeStep:n,visibleStepsFlattened:r,setSubmitError:i}=va(),o=(n==null?void 0:n.id)===r[r.length-1].id,a=t(o?"Finish":"Next"),s=Gi(r[0])?(n==null?void 0:n.id)===r[1].id:(n==null?void 0:n.id)===r[0].id,l=s?"pf-v5-c-button pf-m-disabled":"pf-v5-c-button pf-m-secondary";return m.jsxs("footer",{className:"pf-v5-c-wizard__footer border-top bg-lighten","data-cy":"wizard-footer",children:[n!==null&&"inputs"in n?m.jsx(Dy,{style:{minWidth:10},children:a}):m.jsx("button",{"data-cy":"wizard-next",className:"pf-v5-c-button pf-m-primary",type:"submit",onClick:()=>{var c;i(void 0),(c=e.onNext)==null||c.call(e)},children:a}),m.jsx("button",{type:"button","data-cy":"wizard-back",className:l,disabled:s,onClick:()=>{var c;i(void 0),(c=e.onBack)==null||c.call(e)},children:t("Back")}),m.jsx("div",{"data-cy":"wizard-cancel",className:"pf-v5-c-wizard__footer-cancel",children:m.jsx("button",{className:"pf-v5-c-button pf-m-link",type:"button",onClick:e.onCancel,children:t("Cancel")})})]})}function O0e({onCancel:e,disableGrid:t,errorAdapter:n,isVertical:r,singleColumn:i}){const o=$t.useNavigate(),{activeStep:a,stepData:s,onNext:l,onBack:c,submitError:u,isSubmitting:d}=va(),f=v.useCallback(()=>{e?e():o(-1)},[o,e]);return d?m.jsx(O.Bullseye,{children:m.jsx(O.Spinner,{})}):m.jsxs(E3,{children:[m.jsx(T0e,{error:u}),a!==null&&("inputs"in a?m.jsxs(bk,{onSubmit:l,footer:m.jsx(W3,{onBack:c,onCancel:f}),defaultValue:s[a.id],errorAdapter:n,disableGrid:t,isVertical:r,singleColumn:i,isWizard:!0,children:[m.jsx(k0e,{}),a.inputs]},a.id):m.jsxs("div",{"data-cy":`wizard-section-${a.id}`,style:{display:"flex",flexDirection:"column",flexGrow:1,overflow:"hidden"},children:[m.jsx(O.PageSection,{"aria-label":$c("Wizard step content"),hasOverflowScroll:!0,isFilled:!0,variant:"light",children:a==null?void 0:a.element}),m.jsx(W3,{onNext:()=>void l({}),onBack:c,onCancel:f})]}))]})}function k0e(){const{activeStep:e,setStepError:t}=va(),{errors:n}=wy(),r=JSON.stringify(n);return v.useEffect(()=>{Object.keys(n).length===0?t({}):e&&t({[e.id]:n})},[n,e,t,r]),null}function T0e(e){const{t}=$e(),n=e.error;if(!e.error)return null;if(!(e.error instanceof Error))return typeof e.error=="string"?m.jsx(O.Alert,{variant:"danger",title:e.error}):m.jsx(O.Alert,{variant:"danger",title:t("An error occurred.")});if("message"in e.error&&!n.json)return m.jsx(O.Alert,{variant:"danger",title:e.error.message});if(n.json)return m.jsx(O.Alert,{variant:"danger",title:n.message,isInline:!0,children:Object.values(n.json).map((r,i)=>m.jsx("div",{children:r},i))})}const A0e=Pe.div`
|
497
497
|
background-color: var(--pf-v5-global--BackgroundColor--light-100);
|
498
498
|
color: var(--pf-v5-global--Color--dark-100);
|
499
499
|
|