@techdocs/cli 1.9.3-next.2 → 1.9.3-next.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,553 @@
1
+ (()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[8792],{86519:(H,S,t)=>{"use strict";t.d(S,{c:()=>s});const s=Symbol.for("CATALOG_FILTER_EXISTS_0e15b590c0b343a2bae3e787e84c2111")},72348:(H,S,t)=>{"use strict";t.d(S,{P:()=>x,_P:()=>a,oQ:()=>s});const s="default",a="backstage.io/view-url",x="backstage.io/edit-url",p="kubernetes.io/api-server",b="kubernetes.io/api-server-certificate-authority",g="kubernetes.io/auth-provider"},6820:(H,S,t)=>{"use strict";t.d(S,{KU:()=>p,U2:()=>b,sM:()=>x});var s=t(72348);function a(g){let u=g.indexOf(":");const f=g.indexOf("/");f!==-1&&f<u&&(u=-1);const d=u===-1?void 0:g.slice(0,u),v=f===-1?void 0:g.slice(u+1,f),h=g.slice(Math.max(u+1,f+1));if(d===""||v===""||h==="")throw new TypeError(`Entity reference "${g}" was not on the form [<kind>:][<namespace>/]<name>`);return{kind:d,namespace:v,name:h}}function x(g){return{kind:g.kind,namespace:g.metadata.namespace||s.oQ,name:g.metadata.name}}function p(g,u){if(!g)throw new Error("Entity reference must not be empty");const f=u?.defaultKind,d=u?.defaultNamespace||s.oQ;let v,h,C;if(typeof g=="string"){const O=a(g);v=O.kind??f,h=O.namespace??d,C=O.name}else v=g.kind??f,h=g.namespace??d,C=g.name;if(v)if(h){if(!C){const O=JSON.stringify(g);throw new Error(`Entity reference ${O} had missing or empty name`)}}else{const O=JSON.stringify(g);throw new Error(`Entity reference ${O} had missing or empty namespace`)}else{const O=JSON.stringify(g);throw new Error(`Entity reference ${O} had missing or empty kind (e.g. did not start with "component:" or similar)`)}return{kind:v,namespace:h,name:C}}function b(g){let u,f,d;return"metadata"in g?(u=g.kind,f=g.metadata.namespace??s.oQ,d=g.metadata.name):(u=g.kind,f=g.namespace??s.oQ,d=g.name),`${u.toLocaleLowerCase("en-US")}:${f.toLocaleLowerCase("en-US")}/${d.toLocaleLowerCase("en-US")}`}},51372:(H,S,t)=>{"use strict";t.d(S,{fT:()=>f,jn:()=>O,nC:()=>u,sA:()=>P,vv:()=>s});const s="ownedBy",a="ownerOf",x="consumesApi",p="apiConsumedBy",b="providesApi",g="apiProvidedBy",u="dependsOn",f="dependencyOf",d="parentOf",v="childOf",h="memberOf",C="hasMember",O="partOf",P="hasPart"},17736:(H,S,t)=>{"use strict";t.d(S,{Eo:()=>s,I4:()=>x});const s="backstage.io/managed-by-location",a="backstage.io/managed-by-origin-location",x="backstage.io/source-location"},78692:(H,S,t)=>{"use strict";t.d(S,{Cr:()=>g,KL:()=>b,aY:()=>p});var s=t(6820),a=t(17736);const x=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i;function p(u){if(typeof u!="string")throw new TypeError(`Unable to parse location ref '${u}', unexpected argument ${typeof u}`);const f=u.indexOf(":");if(f<0)throw new TypeError(`Unable to parse location ref '${u}', expected '<type>:<target>', e.g. 'url:https://host/path'`);const d=u.substring(0,f).trim(),v=u.substring(f+1).trim();if(!d||!v)throw new TypeError(`Unable to parse location ref '${u}', expected '<type>:<target>', e.g. 'url:https://host/path'`);if(d==="http"||d==="https")throw new TypeError(`Invalid location ref '${u}', please prefix it with 'url:', e.g. 'url:${u}'`);if(x.test(v))throw new TypeError(`Invalid location ref '${u}', target is a javascript: URL`);return{type:d,target:v}}function b(u){const{type:f,target:d}=u;if(f){if(!d)throw new TypeError("Unable to stringify location ref, empty target")}else throw new TypeError("Unable to stringify location ref, empty type");if(x.test(d))throw new TypeError(`Invalid location ref '${f}:${d}', target is a javascript: URL`);return`${f}:${d}`}function g(u){const f=u.metadata?.annotations?.[a.I4]??u.metadata?.annotations?.[a.Eo];if(!f)throw new Error(`Entity '${(0,s.U2)(u)}' is missing location`);return p(f)}},77310:(H,S,t)=>{"use strict";t.d(S,{z:()=>f});var s=t(31085),a=t(10394),x=t(54917),p=t(69578),b=t(40697),g=t(25577),u=t(37916);function f(d){const{text:v,language:h,showLineNumbers:C=!1,highlightedNumbers:O,customStyle:P,showCopyCodeButton:B=!1}=d,M=(0,x.A)(),I=M.palette.type==="dark"?b.A:g.A,D=M.palette.type==="dark"?"#256bf3":"#e6ffed";return(0,s.jsxs)(a.A,{position:"relative",children:[(0,s.jsx)(p.A,{customStyle:P,language:h,style:I,showLineNumbers:C,wrapLines:!0,lineNumberStyle:{color:M.palette.textVerySubtle},lineProps:$=>O?.includes($)?{style:{backgroundColor:D}}:{},children:v}),B&&(0,s.jsx)(a.A,{position:"absolute",top:0,right:0,children:(0,s.jsx)(u.l,{text:v})})]})}},37916:(H,S,t)=>{"use strict";t.d(S,{l:()=>h});var s=t(31085),a=t(72427),x=t(39837),p=t(29365),b=t(71677),g=t(99594),u=t(14041),f=t(36338),d=t(10315),v=t(87849);function h(C){const{t:O}=(0,v.i)(d.O),{text:P,tooltipDelay:B=1e3,tooltipText:M=O("copyTextButton.tooltipText"),"aria-label":I="Copy text"}=C,D=(0,a.gf)(x.m),[$,k]=(0,u.useState)(!1),[{error:X},z]=(0,f.A)();(0,u.useEffect)(()=>{X&&D.post(X)},[X,D]);const Y=K=>{K.stopPropagation(),k(!0),z(P)};return(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(b.Ay,{id:"copy-test-tooltip",title:M,placement:"top",leaveDelay:B,onClose:()=>k(!1),open:$,children:(0,s.jsx)(p.A,{onClick:Y,"aria-label":I,children:(0,s.jsx)(g.A,{})})})})}},44186:(H,S,t)=>{"use strict";t.d(S,{p:()=>C});var s=t(31085),a=t(42899),x=t(58837),p=t(72501);const b=t.p+"static/missingAnnotation.67f79e98.svg",g=t.p+"static/noInformation.4b426325.svg",u=t.p+"static/createComponent.975d1e1e.svg",f=t.p+"static/noBuild.1715fa71.svg",d=(0,x.A)({generalImg:{width:"95%",zIndex:2,position:"relative",left:"50%",top:"50%",transform:"translate(-50%, 15%)"}},{name:"BackstageEmptyStateImage"}),v=({missing:O})=>{const P=d();switch(O){case"field":return(0,s.jsx)("img",{src:b,className:P.generalImg,alt:"annotation is missing"});case"info":return(0,s.jsx)("img",{src:g,alt:"no Information",className:P.generalImg});case"content":return(0,s.jsx)("img",{src:u,alt:"create Component",className:P.generalImg});case"data":return(0,s.jsx)("img",{src:f,alt:"no Build",className:P.generalImg});default:return null}},h=(0,x.A)(O=>({root:{backgroundColor:O.palette.background.default,padding:O.spacing(2,0,0,0)},action:{marginTop:O.spacing(2)},imageContainer:{position:"relative"}}),{name:"BackstageEmptyState"});function C(O){const{title:P,description:B,missing:M,action:I}=O,D=h();return(0,s.jsxs)(a.A,{container:!0,direction:"row",justifyContent:"space-around",alignItems:"flex-start",className:D.root,spacing:2,children:[(0,s.jsx)(a.A,{item:!0,xs:12,md:6,children:(0,s.jsxs)(a.A,{container:!0,direction:"column",children:[(0,s.jsx)(a.A,{item:!0,xs:!0,children:(0,s.jsx)(p.A,{variant:"h5",children:P})}),(0,s.jsx)(a.A,{item:!0,xs:!0,children:(0,s.jsx)(p.A,{variant:"body1",children:B})}),(0,s.jsx)(a.A,{item:!0,xs:!0,className:D.action,children:I})]})}),(0,s.jsx)(a.A,{item:!0,xs:12,md:6,className:D.imageContainer,children:typeof M=="string"?(0,s.jsx)(v,{missing:M}):M.customImage})]})}},22020:(H,S,t)=>{"use strict";t.d(S,{b:()=>v});var s=t(31085),a=t(58837),x=t(58007),p=t(8109),b=t(5951),g=t(37916),u=t(88640);const f=(0,a.A)(h=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:h.spacing(2)},divider:{margin:h.spacing(2)}}),{name:"BackstageErrorPanel"}),d=({error:h,message:C,stack:O,children:P})=>{const B=f();return(0,s.jsxs)(x.A,{dense:!0,children:[(0,s.jsxs)(p.A,{alignItems:"flex-start",children:[(0,s.jsx)(b.A,{classes:{secondary:B.text},primary:"Error",secondary:h}),(0,s.jsx)(g.l,{text:h})]}),(0,s.jsxs)(p.A,{alignItems:"flex-start",children:[(0,s.jsx)(b.A,{classes:{secondary:B.text},primary:"Message",secondary:C}),(0,s.jsx)(g.l,{text:C})]}),O&&(0,s.jsxs)(p.A,{alignItems:"flex-start",children:[(0,s.jsx)(b.A,{classes:{secondary:B.text},primary:"Stack Trace",secondary:O}),(0,s.jsx)(g.l,{text:O})]}),P]})};function v(h){const{title:C,error:O,defaultExpanded:P,titleFormat:B,children:M}=h;return(0,s.jsx)(u.B,{severity:"error",title:C??O.message,defaultExpanded:P,titleFormat:B,children:(0,s.jsx)(d,{error:O.name,message:O.message,stack:O.stack,children:M})})}},18956:(H,S,t)=>{"use strict";t.d(S,{m:()=>g});var s=t(31085),a=t(72501),x=t(58837),p=t(31129);const b=(0,x.A)(()=>({icon:{color:"#f3ba37",cursor:"pointer",display:"inline-flex"},iconBorder:{color:"inherit",cursor:"pointer",display:"inline-flex"}}),{name:"BackstageFavoriteToggleIcon"});function g(f){const{isFavorite:d}=f,v=b();return(0,s.jsx)(a.A,{component:"span",className:d?v.icon:v.iconBorder,children:d?(0,s.jsx)(p.Gg,{}):(0,s.jsx)(p.KG,{})})}function u(f){const{id:d,title:v,isFavorite:h,onToggle:C,...O}=f;return _jsx(Tooltip,{id:d,title:v,children:_jsx(IconButton,{"aria-label":v,id:d,onClick:()=>C(!h),color:"inherit",...O,children:_jsx(g,{isFavorite:h})})})}},72072:(H,S,t)=>{"use strict";t.d(S,{N_:()=>Q});var s=t(31085),a=t(82266),x=t(72427),p=t(65461),b=t(93368),g=t(49203),u=t(58837),f=t(72501),d=t(53373),v=t.n(d),h=t(45250),C=t.n(h),O=t(14041),P=t(18690),B=t(73657),M=t(39330);function I(){const[J]=(0,P.AV)((0,s.jsx)(P.qh,{index:!0,element:(0,s.jsx)("div",{})}));return!J.index}const D=(0,u.A)(J=>({visuallyHidden:{clip:"rect(0 0 0 0)",clipPath:"inset(50%)",overflow:"hidden",position:"absolute",userSelect:"none",whiteSpace:"nowrap",height:1,width:1},externalLink:{position:"relative"},externalLinkIcon:{verticalAlign:"bottom",marginLeft:J.spacing(.5)}}),{name:"Link"}),$=()=>{const it=(0,a.n)().getSystemIcon("externalLink")||M.A,ht=D();return(0,s.jsx)(it,{className:ht.externalLinkIcon})},k=J=>/^([a-z+.-]+):/.test(J),X=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i,z=window.open;if(z&&!z.__backstage){const J=function(...ht){const yt=String(ht[0]);if(X.test(yt))throw new Error("Rejected window.open() with a javascript: URL as a security precaution");return z.apply(this,ht)};J.__backstage=!0,window.open=J}const Y=()=>{try{return(0,x.gf)(p.U).getOptionalString("app.baseUrl")}catch{return}},K=()=>{const J="http://sample.dev",it=Y()??"/",{pathname:ht}=new URL(it,J);return(0,h.trimEnd)(ht,"/")},lt=J=>{let it=String(J);const ht=K(),yt=k(it),At=it.startsWith(ht);return!yt&&!At&&(it=ht.concat(it)),it},G=J=>J instanceof Array?J.map(G).join(" ").trim():typeof J=="object"&&J?G(J?.props?.children):["string","number"].includes(typeof J)?String(J):"",Q=(0,O.forwardRef)(({onClick:J,noTrack:it,externalLinkIcon:ht,...yt},At)=>{const Ot=D(),Rt=(0,b.s)(),dt=I()?lt(yt.to):yt.to,ct=G(yt.children)||dt,xt=k(dt),pt=xt&&!!/^https?:/.exec(dt);if(X.test(dt))throw new Error("Link component rejected javascript: URL as a security precaution");const bt=wt=>{J?.(wt),it||Rt.captureEvent("click",ct,{attributes:{to:dt}})};return xt?(0,s.jsxs)(g.A,{...pt?{target:"_blank",rel:"noopener"}:{},...yt,...yt["aria-label"]?{"aria-label":`${yt["aria-label"]}, Opens in a new window`}:{},ref:At,href:dt,onClick:bt,className:v()(Ot.externalLink,yt.className),children:[yt.children,ht&&(0,s.jsx)($,{}),(0,s.jsx)(f.A,{component:"span",className:Ot.visuallyHidden,children:", Opens in a new window"})]}):(0,s.jsx)(g.A,{...yt,ref:At,component:B.N_,to:dt,onClick:bt})})},73896:(H,S,t)=>{"use strict";t.d(S,{z:()=>g});var s=t(31085),a=t(64947),x=t(14041),p=t(72072);const b=(0,x.forwardRef)((f,d)=>(0,s.jsx)(p.N_,{ref:d,...f,color:"initial"})),g=(0,x.forwardRef)((f,d)=>(0,s.jsx)(a.A,{ref:d,component:b,...f})),u=null},4650:(H,S,t)=>{"use strict";t.d(S,{h:()=>h});var s=t(31085),a=t(58837),x=t(45872),p=t(61125),b=t(14041),g=t(77310);const u=(0,a.A)(C=>({markdown:{"& table":{borderCollapse:"collapse",border:`1px solid ${C.palette.border}`},"& th, & td":{border:`1px solid ${C.palette.border}`,padding:C.spacing(1)},"& td":{wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:C.spacing(3,2,3,2.5),borderBottom:0},"& th":{backgroundColor:C.palette.background.paper},"& tr":{backgroundColor:C.palette.background.paper},"& tr:nth-child(odd)":{backgroundColor:C.palette.background.default},"& a":{color:C.palette.link},"& img":{maxWidth:"100%"}}}),{name:"BackstageMarkdownContent"}),f=(C,O)=>O?typeof O=="string"?C+O:b.Children.toArray(O.props.children).reduce(f,C):C,d=({level:C,children:O})=>{const M=b.Children.toArray(O).reduce(f,"").toLocaleLowerCase("en-US").replace(/\W/g,"-");return(0,b.createElement)(`h${C}`,{id:M},O)},v={code:({inline:C,className:O,children:P,...B})=>{const M=String(P).replace(/\n+$/,""),I=/language-(\w+)/.exec(O||"");return!C&&I?(0,s.jsx)(g.z,{language:I[1],text:M}):(0,s.jsx)("code",{className:O,...B,children:P})},h1:d,h2:d,h3:d,h4:d,h5:d,h6:d};function h(C){const{content:O,dialect:P="gfm",linkTarget:B,transformLinkUri:M,transformImageUri:I,className:D}=C,$=u();return(0,s.jsx)(x.$,{remarkPlugins:P==="gfm"?[p.A]:[],className:`${$.markdown} ${D??""}`.trim(),children:O,components:v,linkTarget:B,transformLinkUri:M,transformImageUri:I})}},68146:(H,S,t)=>{"use strict";t.d(S,{k:()=>g});var s=t(31085),a=t(10394),x=t(88951),p=t(54917),b=t(14041);function g(u){const f=(0,p.A)(),[d,v]=(0,b.useState)(!1);return(0,b.useEffect)(()=>{const h=setTimeout(()=>v(!0),f.transitions.duration.short);return()=>clearTimeout(h)},[f.transitions.duration.short]),d?(0,s.jsx)(x.A,{...u,"data-testid":"progress"}):(0,s.jsx)(a.A,{display:"none","data-testid":"progress"})}},66917:(H,S,t)=>{"use strict";t.d(S,{w:()=>lt});var s=t(31085),a=t(10394),x=t(69076),p=t(67720),b=t(95061),g=t(41857),u=t(48543),f=t(26343),d=t(81215),v=t(87051),h=t(12398),C=t(58837),O=t(72501),P=t(92399),B=t(14041),M=t(10437);const I=(0,C.A)(G=>(0,h.A)({icon:{position:"absolute",right:G.spacing(.5),pointerEvents:"none",color:"#616161"}}),{name:"BackstageClosedDropdown"}),$=()=>{const G=I();return(0,s.jsx)(M.A,{className:G.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("path",{d:"M7.5 8L6 9.5L12.0703 15.5703L18.1406 9.5L16.6406 8L12.0703 12.5703L7.5 8Z",fill:"currentColor"})})},k=(0,C.A)(G=>(0,h.A)({icon:{position:"absolute",right:G.spacing(.5),pointerEvents:"none",color:"#616161"}}),{name:"BackstageOpenedDropdown"}),z=()=>{const G=k();return(0,s.jsx)(M.A,{className:G.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("path",{d:"M16.5 16L18 14.5L11.9297 8.42969L5.85938 14.5L7.35938 16L11.9297 11.4297L16.5 16Z",fill:"currentColor"})})},Y=(0,v.A)(G=>(0,h.A)({root:{"label + &":{marginTop:G.spacing(3)},"&.Mui-focused > div[role=button]":{borderColor:G.palette.primary.main}},input:{borderRadius:G.shape.borderRadius,position:"relative",backgroundColor:G.palette.background.paper,border:"1px solid #ced4da",fontSize:G.typography.body1.fontSize,padding:G.spacing(1.25,3.25,1.25,1.5),transition:G.transitions.create(["border-color","box-shadow"]),"&:focus":{background:G.palette.background.paper,borderRadius:G.shape.borderRadius}}}),{name:"BackstageSelectInputBase"})(g.A),K=(0,C.A)(G=>(0,h.A)({formControl:{margin:G.spacing(1,0)},label:{transform:"initial",fontWeight:"bold",fontSize:G.typography.body2.fontSize,fontFamily:G.typography.fontFamily,color:G.palette.text.primary,"&.Mui-focused":{color:G.palette.text.primary}},formLabel:{transform:"initial",fontWeight:"bold",fontSize:G.typography.body2.fontSize,fontFamily:G.typography.fontFamily,color:G.palette.text.primary,"&.Mui-focused":{color:G.palette.text.primary}},chips:{display:"flex",flexWrap:"wrap"},chip:{margin:2},checkbox:{},root:{display:"flex",flexDirection:"column"}}),{name:"BackstageSelect"});function lt(G){const{multiple:Q,items:J,label:it,placeholder:ht,selected:yt,onChange:At,triggerReset:Ot,native:Rt=!1,disabled:dt=!1,margin:ct,"data-testid":xt="select"}=G,pt=K(),[bt,wt]=(0,B.useState)(yt||(Q?[]:"")),[at,gt]=(0,B.useState)(!1);(0,B.useEffect)(()=>{wt(Q?[]:"")},[Ot,Q]),(0,B.useEffect)(()=>{wt(yt||(Q?[]:""))},[yt,Q]);const vt=U=>{wt(U.target.value),At(U.target.value)},et=U=>{if(dt){U.preventDefault();return}gt(V=>Q&&!(U.target instanceof HTMLElement)?!0:!V)},Et=()=>{gt(!1)},ot=U=>()=>{const V=bt.filter(nt=>nt!==U);wt(V),At(V)};return(0,s.jsx)(a.A,{className:pt.root,children:(0,s.jsxs)(b.A,{className:pt.formControl,children:[(0,s.jsx)(u.A,{className:pt.formLabel,children:it}),(0,s.jsxs)(d.A,{"aria-label":it,value:bt,native:Rt,disabled:dt,"data-testid":xt,displayEmpty:!0,multiple:Q,margin:ct,onChange:vt,open:at,onOpen:et,onClose:Et,input:(0,s.jsx)(Y,{}),label:it,renderValue:U=>Q&&bt.length!==0?(0,s.jsx)(a.A,{className:pt.chips,children:U.map(V=>{const nt=J.find(Ct=>Ct.value===V);return nt?(0,s.jsx)(p.A,{"data-testid":"chip",label:nt?.label,clickable:!0,deleteIcon:(0,s.jsx)(P.A,{"data-testid":"cancel-icon",onMouseDown:Ct=>Ct.stopPropagation()}),onDelete:ot(V),className:pt.chip},nt?.value):!1})}):(0,s.jsx)(O.A,{children:bt.length===0?ht||"":J.find(V=>V.value===U)?.label}),IconComponent:()=>at?(0,s.jsx)(z,{}):(0,s.jsx)($,{}),MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},getContentAnchorEl:null},children:[!!ht&&!Q&&(0,s.jsx)(f.A,{value:[],children:ht}),Rt?J&&J.map(U=>(0,s.jsx)("option",{value:U.value,children:U.label},U.value)):J&&J.map(U=>(0,s.jsxs)(f.A,{value:U.value,children:[Q&&(0,s.jsx)(x.A,{color:"primary",checked:bt.includes(U.value)||!1,className:pt.checkbox}),U.label]},U.value))]})]})})}},27586:(H,S,t)=>{"use strict";t.d(S,{Y:()=>Q});var s=t(31085),a=t(82266),x=t(72427),p=t(65461),b=t(10394),g=t(64947),u=t(93453),f=t(29365),d=t(68804),v=t(5951),h=t(26343),C=t(28233),O=t(55197),P=t(58837),B=t(72501),M=t(5893),I=t(14041),D=t(10795),$=t(31129),k=t(72072),X=t(10315),z=t(87849);const Y=(0,P.A)({popoverList:{minWidth:260,maxWidth:400},menuItem:{whiteSpace:"normal"}},{name:"BackstageSupportButton"}),K=({icon:J})=>{const it=(0,a.n)(),ht=J?it.getSystemIcon(J)??$.NT:$.NT;return(0,s.jsx)(ht,{})},lt=({link:J})=>(0,s.jsx)(k.N_,{to:J.url,children:J.title??J.url}),G=({item:J})=>(0,s.jsxs)(h.A,{button:!1,children:[(0,s.jsx)(d.A,{children:(0,s.jsx)(K,{icon:J.icon})}),(0,s.jsx)(v.A,{primary:J.title,secondary:J.links?.reduce((it,ht,yt)=>[...it,yt>0&&(0,s.jsx)("br",{},yt),(0,s.jsx)(lt,{link:ht},ht.url)],[])})]});function Q(J){const{t:it}=(0,z.i)(X.O),{title:ht,items:yt,children:At}=J,{items:Ot}=(0,D.l)(),[Rt,dt]=(0,I.useState)(!1),[ct,xt]=(0,I.useState)(null),pt=Y(),bt=(0,x.gf)(p.U).getOptionalConfig("app.support"),wt=(0,M.A)(vt=>vt.breakpoints.down("sm")),at=vt=>{xt(vt.currentTarget),dt(!0)},gt=()=>{dt(!1)};return bt?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(b.A,{display:"flex",ml:1,children:wt?(0,s.jsx)(f.A,{color:"primary",size:"small",onClick:at,"data-testid":"support-button","aria-label":"Support",children:(0,s.jsx)($.NT,{})}):(0,s.jsx)(g.A,{"data-testid":"support-button","aria-label":"Support",color:"primary",onClick:at,startIcon:(0,s.jsx)($.NT,{}),children:it("supportButton.title")})}),(0,s.jsxs)(O.Ay,{"data-testid":"support-button-popover",open:Rt,anchorEl:ct,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},onClose:gt,children:[(0,s.jsxs)(C.A,{className:pt.popoverList,autoFocusItem:!!ct,children:[ht&&(0,s.jsx)(h.A,{button:!1,alignItems:"flex-start",className:pt.menuItem,children:(0,s.jsx)(B.A,{variant:"subtitle1",children:ht})}),I.Children.map(At,(vt,et)=>(0,s.jsx)(h.A,{button:!1,alignItems:"flex-start",className:pt.menuItem,children:vt},`child-${et}`)),(yt??Ot).map((vt,et)=>(0,s.jsx)(G,{item:vt},`item-${et}`))]}),(0,s.jsx)(u.A,{children:(0,s.jsx)(g.A,{color:"primary",onClick:gt,"aria-label":"Close",children:it("supportButton.close")})})]})]}):null}},14209:(H,S,t)=>{"use strict";t.d(S,{X:()=>et});var s=t(31085),a=t(87849),x=t(25301),p=t(10394),b=t(29365),g=t(87051),u=t(58837),f=t(54917),d=t(72501),v=t(83313),h=t(89019),C=t(62461),O=t(68887),P=t(63798),B=t(64704),M=t(6774),I=t(75625),D=t(65859),$=t(45917),k=t(5416),X=t(33494),z=t(80113),Y=t(26229),K=t(46802),lt=t(45250),G=t(14041),Q=t(10315),J=t(64947),it=t(66917);const ht=(0,u.A)(U=>({root:{height:"100%",width:"315px",display:"flex",flexDirection:"column",marginRight:U.spacing(3)},value:{fontWeight:"bold",fontSize:18},header:{display:"flex",alignItems:"center",height:U.spacing(7.5),justifyContent:"space-between",borderBottom:`1px solid ${U.palette.grey[500]}`},filters:{display:"flex",flexDirection:"column","& > *":{marginTop:U.spacing(2)}}}),{name:"BackstageTableFilters"}),yt=U=>{const V=ht(),{onChangeFilters:nt}=U,{t:Ct}=(0,a.i)(Q.O),[ut,Bt]=(0,G.useState)({...U.selectedFilters}),[Nt,Kt]=(0,G.useState)(!1),Xt=()=>{Bt({}),Kt(kt=>!kt)};return(0,G.useEffect)(()=>{nt(ut)},[ut,nt]),(0,s.jsxs)(p.A,{className:V.root,children:[(0,s.jsxs)(p.A,{className:V.header,children:[(0,s.jsx)(p.A,{className:V.value,children:Ct("table.filter.title")}),(0,s.jsx)(J.A,{color:"primary",onClick:Xt,children:Ct("table.filter.clearAll")})]}),(0,s.jsx)(p.A,{className:V.filters,children:U.filters?.length&&U.filters.map(kt=>(0,s.jsx)(it.w,{triggerReset:Nt,...kt.element,selected:ut[kt.element.label],onChange:Qt=>Bt({...ut,[kt.element.label]:Qt})},kt.element.label))})]})};var At=t(78467);function Ot(U){return(0,s.jsx)("tbody",{"data-testid":"loading-indicator",children:(0,s.jsx)("tr",{children:(0,s.jsx)("td",{colSpan:U.colSpan,children:(0,s.jsx)(p.A,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",minHeight:"15rem"},children:(0,s.jsx)(At.A,{size:"5rem"})})})})})}const Rt={Add:(0,G.forwardRef)((U,V)=>(0,s.jsx)(v.A,{...U,ref:V})),Check:(0,G.forwardRef)((U,V)=>(0,s.jsx)(C.A,{...U,ref:V})),Clear:(0,G.forwardRef)((U,V)=>(0,s.jsx)(B.A,{...U,ref:V})),Delete:(0,G.forwardRef)((U,V)=>(0,s.jsx)(M.A,{...U,ref:V})),DetailPanel:(0,G.forwardRef)((U,V)=>(0,s.jsx)(P.A,{...U,ref:V})),Edit:(0,G.forwardRef)((U,V)=>(0,s.jsx)(I.A,{...U,ref:V})),Export:(0,G.forwardRef)((U,V)=>(0,s.jsx)(Y.A,{...U,ref:V})),Filter:(0,G.forwardRef)((U,V)=>(0,s.jsx)(D.A,{...U,ref:V})),FirstPage:(0,G.forwardRef)((U,V)=>(0,s.jsx)(k.A,{...U,ref:V})),LastPage:(0,G.forwardRef)((U,V)=>(0,s.jsx)(X.A,{...U,ref:V})),NextPage:(0,G.forwardRef)((U,V)=>(0,s.jsx)(P.A,{...U,ref:V})),PreviousPage:(0,G.forwardRef)((U,V)=>(0,s.jsx)(O.A,{...U,ref:V})),ResetSearch:(0,G.forwardRef)((U,V)=>(0,s.jsx)(B.A,{...U,ref:V})),Search:(0,G.forwardRef)((U,V)=>(0,s.jsx)($.A,{...U,ref:V})),SortArrow:(0,G.forwardRef)((U,V)=>(0,s.jsx)(h.A,{...U,ref:V})),ThirdStateCheck:(0,G.forwardRef)((U,V)=>(0,s.jsx)(z.A,{...U,ref:V})),ViewColumn:(0,G.forwardRef)((U,V)=>(0,s.jsx)(K.A,{...U,ref:V}))};function dt(U,V){const nt=V.split(".");let Ct=U[nt[0]];for(let ut=1;ut<nt.length;++ut){if(Ct===void 0)return Ct;const Bt=nt[ut];Ct=Ct[Bt]}return Ct}const ct=(0,g.A)(U=>({header:{padding:U.spacing(1,2,1,2.5),borderTop:`1px solid ${U.palette.grey.A100}`,borderBottom:`1px solid ${U.palette.grey.A100}`,fontWeight:U.typography.fontWeightBold,position:"static",wordBreak:"normal",textTransform:"uppercase"}}),{name:"BackstageTableHeader"})(x.rV),xt=(0,g.A)(U=>({root:{padding:U.spacing(3,0,2.5,2.5)},title:{"& > h6":{fontWeight:U.typography.fontWeightBold}},searchField:{paddingRight:U.spacing(2)}}),{name:"BackstageTableToolbar"})(x.Nb),pt=(0,u.A)(U=>({root:{display:"flex",alignItems:"center",justifyContent:"space-between"},title:{fontWeight:U.typography.fontWeightBold,fontSize:18,whiteSpace:"nowrap"}}),{name:"BackstageTableFiltersContainer"}),bt=(0,u.A)(()=>({root:{display:"flex",alignItems:"start"}}),{name:"BackstageTable"});function wt(U,V){return U.map(nt=>{const Ct=nt.headerStyle??{};let ut=nt.cellStyle||{};if(nt.highlight)if(Ct.color=V.palette.textContrast,typeof ut=="object")ut.fontWeight=V.typography.fontWeightBold;else{const Bt=ut;ut=(Nt,Kt,Xt)=>({...Bt(Nt,Kt,Xt),fontWeight:V.typography.fontWeightBold})}return{...nt,headerStyle:Ct,cellStyle:ut}})}function at(U,V){return(0,lt.transform)(U,(nt,Ct,ut)=>{(0,lt.isEqual)(Ct,V[ut])||(nt[ut]=Ct)})}const gt={search:"",filtersOpen:!1,filters:{}};function vt(U){const{toolbarRef:V,setSearch:nt,hasFilters:Ct,selectedFiltersLength:ut,toggleFilters:Bt}=U,{t:Nt}=(0,a.i)(Q.O),Kt=pt(),Xt=(0,G.useCallback)(kt=>{U.onSearchChanged(kt),nt(kt)},[U,nt]);return Ct?(0,s.jsxs)(p.A,{className:Kt.root,children:[(0,s.jsxs)(p.A,{className:Kt.root,children:[(0,s.jsx)(b.A,{onClick:Bt,"aria-label":"filter list",children:(0,s.jsx)(D.A,{})}),(0,s.jsxs)(d.A,{className:Kt.title,children:[Nt("table.filter.title")," (",ut,")"]})]}),(0,s.jsx)(xt,{...U,ref:V,onSearchChanged:Xt})]}):(0,s.jsx)(xt,{...U,ref:V,onSearchChanged:Xt})}function et(U){const{data:V,columns:nt,emptyContent:Ct,options:ut,title:Bt,subtitle:Nt,localization:Kt,filters:Xt,initialState:kt,onStateChange:Qt,components:jt,isLoading:Ht,style:le,...he}=U,{t:zt}=(0,a.i)(Q.O),oe=bt(),de=(0,f.A)(),Ye={...gt,...kt},[re,on]=(0,G.useState)(Ye.filtersOpen),ke=(0,G.useCallback)(()=>on(be=>!be),[on]),[Te,He]=(0,G.useState)(Ye.filters),[ae,_e]=(0,G.useState)(Ye.search);(0,G.useEffect)(()=>{if(Qt){const be=at({search:ae,filtersOpen:re,filters:Te},gt);Qt(be)}},[ae,re,Te,Qt]);const qe=(0,G.useCallback)(be=>nt.find(Qe=>Qe.title===be)?.field,[nt]),dn=(0,G.useMemo)(()=>{if(typeof V=="function"||!Te)return V;const be=Object.values(Te);return V&&be.flat().length?V.filter(Ze=>!!Object.entries(Te).filter(([,je])=>!!je.length).every(([je,Ue])=>{const Le=dt(Ze,qe(je));return Array.isArray(Le)&&Array.isArray(Ue)?Le.some(an=>Ue.includes(an)):Array.isArray(Le)?Le.includes(Ue):Array.isArray(Ue)?Ue.includes(Le):Le===Ue})):V},[V,Te,qe]),tn=Object.values(Te).flat().length,en=!!Xt?.length,un=(0,G.useCallback)(be=>(0,s.jsx)(vt,{setSearch:_e,hasFilters:en,selectedFiltersLength:tn,toggleFilters:ke,...be}),[ke,en,tn,_e]),We=typeof V!="function"&&V.length===0,Ke=nt.length,ze=(0,G.useMemo)(()=>Et({hasNoRows:We,emptyContent:Ct,columnCount:Ke,loading:Ht}),[We,Ct,Ke,Ht]);return(0,s.jsxs)(p.A,{className:oe.root,children:[re&&V&&typeof V!="function"&&Xt?.length&&(0,s.jsx)(yt,{filters:ot(Xt,V,nt,zt),selectedFilters:Te,onChangeFilters:He}),(0,s.jsx)(x.Ay,{components:{Header:ct,Body:ze,Toolbar:un,...jt},options:ut,columns:wt(nt,de),icons:Rt,title:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d.A,{variant:"h5",component:"h2",children:Bt}),Nt&&(0,s.jsx)(d.A,{color:"textSecondary",variant:"body1",children:Nt})]}),data:dn,style:{width:"100%",...le},localization:{...Kt,body:{emptyDataSourceMessage:zt("table.body.emptyDataSourceMessage"),...Kt?.body},pagination:{firstTooltip:zt("table.pagination.firstTooltip"),labelDisplayedRows:zt("table.pagination.labelDisplayedRows"),labelRowsSelect:zt("table.pagination.labelRowsSelect"),lastTooltip:zt("table.pagination.lastTooltip"),nextTooltip:zt("table.pagination.nextTooltip"),previousTooltip:zt("table.pagination.previousTooltip"),...Kt?.pagination},toolbar:{searchPlaceholder:zt("table.toolbar.search"),searchTooltip:zt("table.toolbar.search"),...Kt?.toolbar}},...he})]})}et.icons=Object.freeze(Rt);function Et({columnCount:U,emptyContent:V,hasNoRows:nt,loading:Ct}){return ut=>Ct?(0,s.jsx)(Ot,{colSpan:U}):V&&nt?(0,s.jsx)("tbody",{children:(0,s.jsx)("tr",{children:(0,s.jsx)("td",{colSpan:U,children:V})})}):(0,s.jsx)(x.C6,{...ut})}function ot(U,V,nt,Ct){const ut=Nt=>{const Kt=new Set,Xt=kt=>{kt!=null&&Kt.add(kt)};return V&&V.forEach(kt=>{const Qt=dt(kt,nt.find(jt=>jt.title===Nt)?.field);Array.isArray(Qt)?Qt.forEach(Xt):Xt(Qt)}),Kt},Bt=Nt=>({placeholder:Ct("table.filter.placeholder"),label:Nt.column,multiple:Nt.type==="multiple-select",items:[...ut(Nt.column)].sort().map(Kt=>({label:Kt,value:Kt}))});return U.map(Nt=>({type:Nt.type,element:Bt(Nt)}))}},88640:(H,S,t)=>{"use strict";t.d(S,{B:()=>$});var s=t(31085),a=t(268),x=t(58837),p=t(8973),b=t(29655),g=t(91567),u=t(42899),f=t(72501),d=t(9181),v=t(6924),h=t(4650);const C=(k,X)=>(X.palette.type==="light"?a.e$:a.a)(X.palette[k].light,.6),O=(k,X)=>(X.palette.type==="light"?a.a:a.e$)(X.palette[k].light,.9),P=(0,x.A)(k=>({root:{marginRight:k.spacing(1),fill:({severity:X})=>C(X,k)}})),B=({severity:k})=>{const X=P({severity:k});return(0,s.jsx)(d.A,{classes:X})},M=({severity:k})=>{const X=P({severity:k});return(0,s.jsx)(v.A,{classes:X})},I=(0,x.A)(k=>({panel:{backgroundColor:({severity:X})=>O(X,k),color:({severity:X})=>C(X,k),verticalAlign:"middle"},summary:{display:"flex",flexDirection:"row"},summaryText:{color:({severity:X})=>C(X,k),fontWeight:k.typography.fontWeightBold},markdownContent:{"& p":{display:"inline"}},message:{width:"100%",display:"block",color:({severity:X})=>C(X,k),backgroundColor:({severity:X})=>O(X,k)},details:{width:"100%",display:"block",color:k.palette.textContrast,backgroundColor:k.palette.background.default,border:`1px solid ${k.palette.border}`,padding:k.spacing(2),fontFamily:"sans-serif"}}),{name:"BackstageWarningPanel"}),D=k=>k.charAt(0).toLocaleUpperCase("en-US")+k.slice(1);function $(k){const{severity:X="warning",title:z,titleFormat:Y,message:K,children:lt,defaultExpanded:G}=k,Q=I({severity:X}),J=D(X)+(z?`: ${z}`:"");return(0,s.jsxs)(p.A,{defaultExpanded:G??!1,className:Q.panel,role:"alert",children:[(0,s.jsxs)(b.A,{expandIcon:(0,s.jsx)(M,{severity:X}),className:Q.summary,children:[(0,s.jsx)(B,{severity:X}),(0,s.jsx)(f.A,{className:Q.summaryText,variant:"subtitle1",children:Y==="markdown"?(0,s.jsx)(h.h,{content:J,className:Q.markdownContent}):J})]}),(K||lt)&&(0,s.jsx)(g.A,{children:(0,s.jsxs)(u.A,{container:!0,children:[K&&(0,s.jsx)(u.A,{item:!0,xs:12,children:(0,s.jsx)(f.A,{className:Q.message,variant:"body1",children:K})}),lt&&(0,s.jsx)(u.A,{item:!0,xs:12,className:Q.details,children:lt})]})})]})}},10795:(H,S,t)=>{"use strict";t.d(S,{l:()=>g});var s=t(72427),a=t(65461),x=t(10315),p=t(87849);const b=()=>{const{t:u}=(0,p.i)(x.O);return{url:"https://github.com/backstage/backstage/issues",items:[{title:u("supportConfig.default.title"),icon:"warning",links:[{title:u("supportConfig.default.linkTitle"),url:"https://github.com/backstage/backstage/blob/master/app-config.yaml"}]}]}};function g(){const d=(0,s.Q2)().get(a.U)?.getOptionalConfig("app.support"),v=b();return d?{url:d.getString("url"),items:d.getConfigArray("items").flatMap(h=>({title:h.getString("title"),icon:h.getOptionalString("icon"),links:(h.getOptionalConfigArray("links")??[]).flatMap(C=>({url:C.getString("url"),title:C.getOptionalString("title")??""}))}))}:v}},31129:(H,S,t)=>{"use strict";t.d(S,{Gg:()=>M,KG:()=>I,NT:()=>O,z9:()=>p});var s=t(31085),a=t(82266),x=t(27799);function p(D){const{id:$,Fallback:k=x.A,...X}=D,Y=(0,a.n)().getSystemIcon($)??k;return(0,s.jsx)(Y,{...X})}function b(D){return _jsx(p,{id:"brokenImage",...D})}function g(D){return _jsx(p,{id:"catalog",...D})}function u(D){return _jsx(p,{id:"chat",...D})}function f(D){return _jsx(p,{id:"dashboard",...D})}function d(D){return _jsx(p,{id:"docs",...D})}function v(D){return _jsx(p,{id:"email",...D})}function h(D){return _jsx(p,{id:"github",...D})}function C(D){return _jsx(p,{id:"group",...D})}function O(D){return(0,s.jsx)(p,{id:"help",...D})}function P(D){return _jsx(p,{id:"user",...D})}function B(D){return _jsx(p,{id:"warning",...D})}function M(D){return(0,s.jsx)(p,{id:"star",...D})}function I(D){return(0,s.jsx)(p,{id:"unstarred",...D})}},26280:(H,S,t)=>{"use strict";t.d(S,{U:()=>g});var s=t(31085),a=t(58837),x=t(53373),p=t.n(x);const b=(0,a.A)(u=>({root:{gridArea:"pageContent",minWidth:0,paddingTop:u.spacing(3),paddingBottom:u.spacing(3),paddingLeft:u.spacing(2),paddingRight:u.spacing(2),[u.breakpoints.up("sm")]:{paddingLeft:u.spacing(3),paddingRight:u.spacing(3)}},stretch:{display:"flex",flexDirection:"column",flexGrow:1},noPadding:{padding:0}}),{name:"BackstageContent"});function g(u){const{className:f,stretch:d,noPadding:v,children:h,...C}=u,O=b();return(0,s.jsx)("article",{...C,className:p()(O.root,f,{[O.stretch]:d,[O.noPadding]:v}),children:h})}},59428:(H,S,t)=>{"use strict";t.d(S,{d:()=>d});var s=t(31085),a=t(10394),x=t(58837),p=t(72501),b=t(93285);const g=v=>(0,x.A)(h=>({container:{width:"100%",display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-end",alignItems:"center",marginBottom:h.spacing(2),textAlign:v.textAlign},leftItemsBox:{flex:"1 1 auto",minWidth:0,overflow:"visible"},rightItemsBox:{flex:"0 1 auto",display:"flex",flexDirection:"row",flexWrap:"wrap",alignItems:"center",marginLeft:h.spacing(1),minWidth:0,overflow:"visible"},description:{},title:{display:"inline-flex",marginBottom:0}}),{name:"BackstageContentHeader"}),u=({title:v,className:h})=>(0,s.jsx)(p.A,{variant:"h4",component:"h2",className:h,"data-testid":"header-title",children:v}),f=({description:v,className:h})=>v?(0,s.jsx)(p.A,{variant:"body2",className:h,"data-testid":"header-description",children:v}):null;function d(v){const{description:h,title:C,titleComponent:O=void 0,children:P,descriptionComponent:B=void 0,textAlign:M="left"}=v,I=g({textAlign:M})(),D=O||(0,s.jsx)(u,{title:C,className:I.title}),$=B||(0,s.jsx)(f,{description:h,className:I.description});return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(b.m,{title:C}),(0,s.jsxs)(a.A,{className:I.container,children:[(0,s.jsxs)(a.A,{className:I.leftItemsBox,children:[D,$]}),(0,s.jsx)(a.A,{className:I.rightItemsBox,children:P})]})]})}},12173:(H,S,t)=>{"use strict";t.d(S,{M:()=>D});var s=t(31085),a=t(42899),x=t(58837),p=t(72501),b=t(18690),g=t(72072),u=t(10795);const f=t.p+"static/mic-drop.fe3ef4d0.svg",d=(0,x.A)($=>({micDrop:{maxWidth:"60%",bottom:$.spacing(2),right:$.spacing(2),[$.breakpoints.down("xs")]:{maxWidth:"96%",bottom:"unset",right:"unset",margin:$.spacing(10,"auto",4)}}}),{name:"BackstageErrorPageMicDrop"}),v=()=>{const $=d();return(0,s.jsx)("img",{src:f,className:$.micDrop,alt:"Girl dropping mic from her hands"})};var h=t(14041),C=t(77310),O=t(87849),P=t(10315);const B=(0,x.A)($=>({title:{paddingBottom:$.spacing(5),[$.breakpoints.down("xs")]:{paddingBottom:$.spacing(4),fontSize:$.typography.h3.fontSize}}}),{name:"BackstageErrorPageStackDetails"});function M($){const{stack:k}=$,X=B(),{t:z}=(0,O.i)(P.O),[Y,K]=(0,h.useState)(!1);return Y?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(p.A,{variant:"h6",className:X.title,children:(0,s.jsx)(g.N_,{to:"#",onClick:()=>K(!1),children:z("errorPage.showLessDetails")})}),(0,s.jsx)(C.z,{text:k,language:"text",showCopyCodeButton:!0,showLineNumbers:!0})]}):(0,s.jsx)(p.A,{variant:"h6",className:X.title,children:(0,s.jsx)(g.N_,{to:"#",onClick:()=>K(!0),children:z("errorPage.showMoreDetails")})})}const I=(0,x.A)($=>({container:{padding:$.spacing(8),[$.breakpoints.down("xs")]:{padding:$.spacing(2)}},title:{paddingBottom:$.spacing(5),[$.breakpoints.down("xs")]:{paddingBottom:$.spacing(4),fontSize:$.typography.h3.fontSize}},subtitle:{color:$.palette.textSubtle}}),{name:"BackstageErrorPage"});function D($){const{status:k="",statusMessage:X,additionalInfo:z,supportUrl:Y,stack:K}=$,lt=I(),G=(0,b.Zp)(),Q=(0,u.l)(),{t:J}=(0,O.i)(P.O);return(0,s.jsxs)(a.A,{container:!0,className:lt.container,children:[(0,s.jsxs)(a.A,{item:!0,xs:12,sm:8,md:4,children:[(0,s.jsx)(p.A,{"data-testid":"error",variant:"body1",className:lt.subtitle,children:J("errorPage.subtitle",{status:k,statusMessage:X})}),(0,s.jsx)(p.A,{variant:"body1",className:lt.subtitle,children:z}),(0,s.jsx)(p.A,{variant:"h2",className:lt.title,children:J("errorPage.title")}),(0,s.jsxs)(p.A,{variant:"h6",className:lt.title,children:[(0,s.jsx)(g.N_,{to:"#","data-testid":"go-back-link",onClick:()=>G(-1),children:J("errorPage.goBack")}),"... or please"," ",(0,s.jsx)(g.N_,{to:Y||Q.url,children:"contact support"})," if you think this is a bug."]}),K&&(0,s.jsx)(M,{stack:K})]}),(0,s.jsx)(v,{})]})}},69814:(H,S,t)=>{"use strict";t.d(S,{Y:()=>G});var s=t(31085),a=t(72427),x=t(65461),p=t(10394),b=t(42899),g=t(58837),u=t(71677),f=t(72501),d=t(93285),v=t(72072),h=t(45634),C=t(58007),O=t(8109),P=t(55197),B=t(87051),M=t(14041);const I=(0,B.A)({root:{textDecoration:"underline",cursor:"pointer"}},{name:"BackstageBreadcrumbsClickableText"})(f.A),D=(0,B.A)({root:{textDecoration:"underline",color:"inherit"}},{name:"BackstageBreadcrumbsStyledBox"})(p.A),$=(0,B.A)({root:{fontStyle:"italic"}},{name:"BreadcrumbsCurrentPage"})(p.A);function k(Q){const{children:J,...it}=Q,[ht,yt]=(0,M.useState)(null),At=M.Children.toArray(J),[Ot,Rt,...dt]=At,ct=dt.length?dt.pop():At[At.length-1],xt=At.length>3,pt=at=>{yt(at.currentTarget)},bt=()=>{yt(null)},wt=!!ht;return(0,s.jsxs)(M.Fragment,{children:[(0,s.jsxs)(h.A,{"aria-label":"breadcrumb",...it,children:[At.length>1&&(0,s.jsx)(D,{clone:!0,children:Ot}),At.length>2&&(0,s.jsx)(D,{clone:!0,children:Rt}),xt&&(0,s.jsx)(I,{onClick:pt,children:"..."}),(0,s.jsx)($,{children:ct})]}),(0,s.jsx)(P.Ay,{open:wt,anchorEl:ht,onClose:bt,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},children:(0,s.jsx)(C.A,{children:dt.map((at,gt)=>(0,s.jsx)(O.A,{button:!0,children:(0,s.jsx)(D,{clone:!0,children:at})},gt))})})]})}var X=t(73524);const z=(0,g.A)(Q=>({header:{gridArea:"pageHeader",padding:Q.spacing(3),width:"100%",boxShadow:Q.shadows[4],position:"relative",zIndex:100,display:"flex",flexDirection:"row",alignItems:"center",backgroundImage:Q.page.backgroundImage,backgroundPosition:"center",backgroundSize:"cover",[Q.breakpoints.down("sm")]:{flexWrap:"wrap"}},leftItemsBox:{maxWidth:"100%",flexGrow:1},rightItemsBox:{width:"auto",alignItems:"center"},title:{color:Q.page.fontColor,wordBreak:"break-word",fontSize:Q.typography.h3.fontSize,marginBottom:0},subtitle:{color:Q.page.fontColor,opacity:.8,display:"inline-block",marginTop:Q.spacing(1),maxWidth:"75ch"},type:{textTransform:"uppercase",fontSize:11,opacity:.8,marginBottom:Q.spacing(1),color:Q.page.fontColor},breadcrumb:{color:Q.page.fontColor},breadcrumbType:{fontSize:"inherit",opacity:.7,marginRight:-Q.spacing(.3),marginBottom:Q.spacing(.3)},breadcrumbTitle:{fontSize:"inherit",marginLeft:-Q.spacing(.3),marginBottom:Q.spacing(.3)}}),{name:"BackstageHeader"}),Y=({type:Q,typeLink:J,classes:it,pageTitle:ht})=>Q?J?(0,s.jsxs)(k,{className:it.breadcrumb,children:[(0,s.jsx)(v.N_,{to:J,children:Q}),(0,s.jsx)(f.A,{children:ht})]}):(0,s.jsx)(f.A,{className:it.type,children:Q}):null,K=({pageTitle:Q,classes:J,tooltip:it})=>{const{contentRef:ht}=(0,X.H)(),yt=(0,s.jsx)(f.A,{ref:ht,tabIndex:-1,className:J.title,variant:"h1",children:Q});return it?(0,s.jsx)(u.Ay,{title:it,placement:"top-start",children:yt}):yt},lt=({classes:Q,subtitle:J})=>J?typeof J!="string"?(0,s.jsx)(s.Fragment,{children:J}):(0,s.jsx)(f.A,{className:Q.subtitle,variant:"subtitle2",component:"span",children:J}):null;function G(Q){const{children:J,pageTitleOverride:it,style:ht,subtitle:yt,title:At,tooltip:Ot,type:Rt,typeLink:dt}=Q,ct=z(),pt=(0,a.gf)(x.U).getOptionalString("app.title")||"Backstage",bt=it||At,wt=At||it,at=`${bt} | %s | ${pt}`,gt=`${bt} | ${pt}`;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d.m,{titleTemplate:at,defaultTitle:gt}),(0,s.jsxs)("header",{style:ht,className:ct.header,children:[(0,s.jsxs)(p.A,{className:ct.leftItemsBox,children:[(0,s.jsx)(Y,{classes:ct,type:Rt,typeLink:dt,pageTitle:wt}),(0,s.jsx)(K,{classes:ct,pageTitle:wt,tooltip:Ot}),(0,s.jsx)(lt,{classes:ct,subtitle:yt})]}),(0,s.jsx)(b.A,{container:!0,className:ct.rightItemsBox,spacing:4,children:J})]})]})}},24504:(H,S,t)=>{"use strict";t.d(S,{Y:()=>u});var s=t(31085),a=t(58837),x=t(50868),p=t(53373),b=t.n(p);const g=(0,a.A)(f=>({root:{display:"grid",gridTemplateAreas:"'pageHeader pageHeader pageHeader' 'pageSubheader pageSubheader pageSubheader' 'pageNav pageContent pageSidebar'",gridTemplateRows:"max-content auto 1fr",gridTemplateColumns:"auto 1fr auto",overflowY:"auto",height:"100vh",[f.breakpoints.down("xs")]:{height:"100%"},"@media print":{display:"block",height:"auto",overflowY:"inherit"}}}),{name:"BackstagePage"});function u(f){const{themeId:d,className:v,children:h}=f,C=g();return(0,s.jsx)(x.A,{theme:O=>({...O,page:O.getPageTheme({themeId:d})}),children:(0,s.jsx)("main",{className:b()(C.root,v),children:h})})}},27155:(H,S,t)=>{"use strict";t.d(S,{d:()=>p});var s=t(31085),a=t(69814),x=t(24504);function p(b){const{themeId:g,children:u,...f}=b;return(0,s.jsxs)(x.Y,{themeId:g,children:[(0,s.jsx)(a.Y,{...f}),u]})}},73524:(H,S,t)=>{"use strict";t.d(S,{G:()=>C,H:()=>O});var s=t(31085),a=t(10394),x=t(58837),p=t(5893),b=t(14041),g=t(72664),u=function(P){return P.SIDEBAR_PIN_STATE="sidebarPinState",P}(u||{});const f={getSidebarPinState(){let P;try{P=JSON.parse(window.localStorage.getItem("sidebarPinState")||"true")}catch{return!0}return!!P},setSidebarPinState(P){return window.localStorage.setItem("sidebarPinState",JSON.stringify(P))}};var d=t(34435);const v=(0,x.A)(P=>({root:{width:"100%",transition:"padding-left 0.1s ease-out",isolation:"isolate",[P.breakpoints.up("sm")]:{paddingLeft:B=>B.isPinned?B.sidebarConfig.drawerWidthOpen:B.sidebarConfig.drawerWidthClosed},[P.breakpoints.down("xs")]:{paddingBottom:B=>B.sidebarConfig.mobileSidebarHeight},"@media print":{padding:"0px !important"}},content:{zIndex:0,isolation:"isolate","&:focus":{outline:0}}}),{name:"BackstageSidebarPage"}),h=(0,b.createContext)({content:{contentRef:void 0}});function C(P){const[B,M]=(0,b.useState)(()=>f.getSidebarPinState()),{sidebarConfig:I}=(0,b.useContext)(g.yY),D=(0,b.useRef)(null),$=(0,b.useMemo)(()=>({content:{contentRef:D}}),[D]);(0,b.useEffect)(()=>{f.setSidebarPinState(B)},[B]);const k=(0,p.A)(Y=>Y.breakpoints.down("xs"),{noSsr:!0}),X=()=>M(!B),z=v({isPinned:B,sidebarConfig:I});return(0,s.jsx)(d.qj,{value:{isPinned:B,toggleSidebarPinState:X,isMobile:k},children:(0,s.jsx)(h.Provider,{value:$,children:(0,s.jsx)(a.A,{className:z.root,children:P.children})})})}function O(){const{content:P}=(0,b.useContext)(h);return{focusContent:(0,b.useCallback)(()=>{P?.contentRef?.current?.focus()},[P]),contentRef:P?.contentRef}}},34435:(H,S,t)=>{"use strict";t.d(S,{Ut:()=>d,qj:()=>f});var s=t(31085),a=t(43836),x=t(10602),p=t(14041);const b={isPinned:!0,toggleSidebarPinState:()=>{},isMobile:!1},g=(0,p.createContext)(b),u=(0,a.tK)("sidebar-pin-state-context");function f(v){const{children:h,value:C}=v;return(0,s.jsx)(g.Provider,{value:C,children:(0,s.jsx)(u.Provider,{value:(0,x.B)({1:C}),children:h})})}const d=()=>{const v=(0,p.useContext)(u),h=(0,p.useContext)(g);if(v===void 0)return h||b;const C=v.atVersion(1);if(C===void 0)throw new Error("No context found for version 1.");return C}},72664:(H,S,t)=>{"use strict";t.d(S,{Rv:()=>g,U1:()=>h,hC:()=>b,i8:()=>f,yY:()=>v});var s=t(14041);const a=72,x=24,p=18,b={drawerWidthClosed:a,drawerWidthOpen:224,defaultOpenDelayMs:100,defaultCloseDelayMs:0,defaultFadeDuration:200,logoHeight:32,iconContainerWidth:a,iconSize:a-x*2,iconPadding:x,selectedIndicatorWidth:3,userBadgePadding:p,userBadgeDiameter:a-p*2,mobileSidebarHeight:56},g=C=>({...b,...C,iconContainerWidth:b.drawerWidthClosed,iconSize:b.drawerWidthClosed-b.iconPadding*2,userBadgeDiameter:b.drawerWidthClosed-b.userBadgePadding*2}),u={drawerWidthClosed:0,drawerWidthOpen:202,defaultOpenDelayMs:b.defaultOpenDelayMs+200},f=C=>({...u,...C}),d="@backstage/core/sidebar-intro-dismissed",v=(0,s.createContext)({sidebarConfig:b,submenuConfig:u}),h=(0,s.createContext)({isHoveredOn:!1,setIsHoveredOn:()=>{}})},10315:(H,S,t)=>{"use strict";t.d(S,{O:()=>a});var s=t(93184);const a=(0,s.h)({id:"core-components",messages:{signIn:{title:"Sign In",loginFailed:"Login failed",customProvider:{title:"Custom User",subtitle:`Enter your own User ID and credentials.
2
+ This selection will not be stored.`,userId:"User ID",tokenInvalid:"Token is not a valid OpenID Connect JWT Token",continue:"Continue",idToken:"ID Token (optional)"},guestProvider:{title:"Guest",subtitle:`Enter as a Guest User.
3
+ You will not have a verified identity, meaning some features might be unavailable.`,enter:"Enter"}},skipToContent:"Skip to content",copyTextButton:{tooltipText:"Text copied to clipboard"},simpleStepper:{reset:"Reset",finish:"Finish",next:"Next",skip:"Skip",back:"Back"},errorPage:{subtitle:"ERROR {{status}}: {{statusMessage}}",title:"Looks like someone dropped the mic!",goBack:"Go back",showMoreDetails:"Show more details",showLessDetails:"Show less details"},emptyState:{missingAnnotation:{title:"Missing Annotation",actionTitle:"Add the annotation to your component YAML as shown in the highlighted example below:",readMore:"Read more"}},supportConfig:{default:{title:"Support Not Configured",linkTitle:"Add `app.support` config key"}},errorBoundary:{title:"Please contact {{slackChannel}} for help."},oauthRequestDialog:{title:"Login Required",authRedirectTitle:"This will trigger a http redirect to OAuth Login.",login:"Log in",rejectAll:"Reject All"},supportButton:{title:"Support",close:"Close"},table:{filter:{title:"Filters",clearAll:"Clear all",placeholder:"All results"},body:{emptyDataSourceMessage:"No records to display"},pagination:{firstTooltip:"First Page",labelDisplayedRows:"{from}-{to} of {count}",labelRowsSelect:"rows",lastTooltip:"Last Page",nextTooltip:"Next Page",previousTooltip:"Previous Page"},toolbar:{search:"Filter"}},alertDisplay:{message_one:"({{ count }} newer message)",message_other:"({{ count }} newer messages)"},autoLogout:{stillTherePrompt:{title:"Logging out due to inactivity",buttonText:"Yes! Don't log me out"}},proxiedSignInPage:{title:"You do not appear to be signed in. Please try reloading the browser page."}}})},25862:(H,S,t)=>{"use strict";t.d(S,{Ig:()=>u,pn:()=>g});var s=t(31085),a=t(43836),x=t(10602),p=t(14041);const b=(0,a.tK)("analytics-context"),g=()=>{const d=(0,p.useContext)(b);if(d===void 0)return{routeRef:"unknown",pluginId:"root",extension:"App"};const v=d.atVersion(1);if(v===void 0)throw new Error("No context found for version 1.");return v},u=d=>{const{attributes:v,children:h}=d,O={...g(),...v},P=(0,x.B)({1:O});return(0,s.jsx)(b.Provider,{value:P,children:h})};function f(d,v){const h=C=>_jsx(u,{attributes:v,children:_jsx(d,{...C})});return h.displayName=`WithAnalyticsContext(${d.displayName||d.name||"Component"})`,h}},67237:(H,S,t)=>{"use strict";t.d(S,{J:()=>p,t:()=>x});var s=t(63544);const a=(0,s.Q)("core-plugin-api:analytics-tracker-events",()=>({mostRecentGatheredNavigation:void 0,mostRecentRoutableExtensionRender:void 0,beforeUnloadRegistered:!1})),x="_ROUTABLE-EXTENSION-RENDERED";class p{analyticsApi;context;constructor(g,u={routeRef:"unknown",pluginId:"root",extension:"App"}){this.analyticsApi=g,this.context=u,a.beforeUnloadRegistered||(addEventListener("beforeunload",()=>{a.mostRecentGatheredNavigation&&(this.analyticsApi.captureEvent({...a.mostRecentGatheredNavigation,...a.mostRecentRoutableExtensionRender}),a.mostRecentGatheredNavigation=void 0,a.mostRecentRoutableExtensionRender=void 0)},{once:!0,passive:!0}),a.beforeUnloadRegistered=!0)}setContext(g){this.context=g}captureEvent(g,u,{value:f,attributes:d}={}){const{_routeNodeType:v,...h}=this.context;if(g===x){a.mostRecentGatheredNavigation&&(a.mostRecentRoutableExtensionRender={context:{...h,extension:"App"}});return}if(a.mostRecentGatheredNavigation){try{this.analyticsApi.captureEvent({...a.mostRecentGatheredNavigation,...a.mostRecentRoutableExtensionRender})}catch(C){console.warn("Error during analytics event capture. %o",C)}a.mostRecentGatheredNavigation=void 0,a.mostRecentRoutableExtensionRender=void 0}if(g==="navigate"&&v==="gathered"&&h.pluginId==="root"){a.mostRecentGatheredNavigation={action:g,subject:u,value:f,attributes:d,context:h};return}try{this.analyticsApi.captureEvent({action:g,subject:u,value:f,attributes:d,context:h})}catch(C){console.warn("Error during analytics event capture. %o",C)}}}},93368:(H,S,t)=>{"use strict";t.d(S,{s:()=>u});var s=t(25862),a=t(72427),x=t(99303),p=t(14041),b=t(67237);function g(){try{return(0,a.gf)(x.c)}catch{return{captureEvent:()=>{}}}}function u(){const f=(0,p.useRef)(null),d=(0,s.pn)(),v=g();function h(){return f.current===null&&(f.current=new b.J(v)),f.current}const C=h();return C.setContext(d),C}},36017:(H,S,t)=>{"use strict";t.d(S,{k:()=>a});var s=t(55309);const a=(0,s.y)({id:"core.alert"})},99303:(H,S,t)=>{"use strict";t.d(S,{c:()=>a});var s=t(55309);const a=(0,s.y)({id:"core.analytics"})},65461:(H,S,t)=>{"use strict";t.d(S,{U:()=>a});var s=t(55309);const a=(0,s.y)({id:"core.config"})},57405:(H,S,t)=>{"use strict";t.d(S,{I:()=>a});var s=t(55309);const a=(0,s.y)({id:"core.discovery"})},39837:(H,S,t)=>{"use strict";t.d(S,{m:()=>a});var s=t(55309);const a=(0,s.y)({id:"core.error"})},63636:(H,S,t)=>{"use strict";t.d(S,{B:()=>x,S:()=>a});var s=t(55309),a=function(p){return p[p.None=0]="None",p[p.Active=1]="Active",p}({});const x=(0,s.y)({id:"core.featureflags"})},70795:(H,S,t)=>{"use strict";t.d(S,{a:()=>a});var s=t(55309);const a=(0,s.y)({id:"core.fetch"})},16009:(H,S,t)=>{"use strict";t.d(S,{K:()=>a});var s=t(55309);const a=(0,s.y)({id:"core.identity"})},56038:(H,S,t)=>{"use strict";t.d(S,{J:()=>a});var s=t(55309);const a=(0,s.y)({id:"core.translation"})},55309:(H,S,t)=>{"use strict";t.d(S,{y:()=>a});class s{config;constructor(p){if(this.config=p,!p.id.split(".").flatMap(g=>g.split("-")).every(g=>g.match(/^[a-z][a-z0-9]*$/)))throw new Error(`API id must only contain period separated lowercase alphanum tokens with dashes, got '${p.id}'`)}get id(){return this.config.id}get T(){throw new Error(`tried to read ApiRef.T of ${this}`)}toString(){return`apiRef{${this.config.id}}`}}function a(x){return new s(x)}},12935:(H,S,t)=>{"use strict";t.d(S,{b:()=>s});function s(a,x){return"id"in a?{api:a,deps:{},factory:()=>x}:a}},72427:(H,S,t)=>{"use strict";t.d(S,{Q2:()=>p,gf:()=>b});var s=t(31085),a=t(43836),x=t(97142);function p(){const u=(0,a.qO)("api-context");if(!u)throw new x.EH("API context is not available");const f=u.atVersion(1);if(!f)throw new x.EH("ApiContext v1 not available");return f}function b(u){const d=p().get(u);if(!d)throw new x.EH(`No implementation available for ${u}`);return d}function g(u){return function(d){const v=C=>{const O=p(),P={};for(const B in u)if(u.hasOwnProperty(B)){const M=u[B],I=O.get(M);if(!I)throw new NotImplementedError(`No implementation available for ${M}`);P[B]=I}return _jsx(d,{...C,...P})},h=d.displayName||d.name||"Component";return v.displayName=`withApis(${h})`,v}}},82266:(H,S,t)=>{"use strict";t.d(S,{n:()=>a});var s=t(43836);const a=()=>{const x=(0,s.qO)("app-context");if(!x)throw new Error("App context is not available");const p=x.atVersion(1);if(!p)throw new Error("AppContext v1 not available");return p}},19402:(H,S,t)=>{"use strict";t.d(S,{E:()=>b,h:()=>p});var s=t(63544);const a=(0,s.Q)("component-data-store",()=>new WeakMap),x="__backstage_data";function p(g,u,f){const d=g;let v=d[x]??a.get(g);if(v||(v={map:new Map},Object.defineProperty(d,x,{enumerable:!1,configurable:!0,writable:!1,value:v}),a.set(g,v)),v.map.has(u)){const h=g.displayName||g.name;throw new Error(`Attempted to attach duplicate data "${u}" to component "${h}"`)}v.map.set(u,f)}function b(g,u){if(!g)return;const f=g.type;if(!f)return;const d=f[x]??a.get(f);if(d)return d.map.get(u)}},88758:(H,S,t)=>{"use strict";t.d(S,{NC:()=>C,zZ:()=>O,QJ:()=>h});var s=t(31085),a=t(14041),x=t(93368),p=t(25862),b=t(82266),g=t(9222),u=t(19402);class f extends a.Component{static getDerivedStateFromError(B){return{error:B}}state={error:void 0};handleErrorReset=()=>{this.setState({error:void 0})};render(){const{error:B}=this.state,{app:M,plugin:I}=this.props,{ErrorBoundaryFallback:D}=M.getComponents();return B?(0,s.jsx)(D,{error:B,resetError:this.handleErrorReset,plugin:I}):this.props.children}}var d=t(67237),v=t(97142);function h(P){const{component:B,mountPoint:M,name:I}=P;return O({component:{lazy:()=>B().then(D=>{const $=X=>{const z=(0,x.s)();try{(0,g.S)(M)}catch(Y){if(typeof Y=="object"&&Y!==null){const{message:K}=Y;if(typeof K=="string"&&K.startsWith("No path for "))throw new Error(`Routable extension component with mount point ${M} was not discovered in the app element tree. Routable extension components may not be rendered by other components and must be directly available as an element within the App provider component.`)}throw Y}return(0,a.useEffect)(()=>{z.captureEvent(d.t,"")},[z]),(0,s.jsx)(D,{...X})},k=I||D.displayName||D.name||"LazyComponent";return $.displayName=`RoutableExtension(${k})`,$})},data:{"core.mountPoint":M},name:I})}function C(P){const{component:B,name:M}=P;return O({component:B,name:M})}function O(P){const{data:B={},name:M}=P;M||console.warn("Declaring extensions without name is DEPRECATED. Make sure that all usages of createReactExtension, createComponentExtension and createRoutableExtension provide a name.");let I;if("lazy"in P.component){const $=P.component.lazy;I=(0,a.lazy)(()=>$().then(k=>({default:k}),k=>{const X=M?` of the ${M} extension`:"";throw new v.HK(`Failed lazy loading${X}, try to reload the page`,k)}))}else I=P.component.sync;const D=M||I.displayName||I.name||"Component";return{expose($){const k=X=>{const z=(0,b.n)(),{Progress:Y}=z.getComponents(),K=B?.["core.mountPoint"];return(0,s.jsx)(a.Suspense,{fallback:(0,s.jsx)(Y,{}),children:(0,s.jsx)(f,{app:z,plugin:$,children:(0,s.jsx)(p.Ig,{attributes:{pluginId:$.getId(),...M&&{extension:M},...K&&{routeRef:K.id}},children:(0,s.jsx)(I,{...X})})})})};(0,u.h)(k,"core.plugin",$),(0,u.h)(k,"core.extensionName",M);for(const[X,z]of Object.entries(B))(0,u.h)(k,X,z);return k.displayName=`Extension(${D})`,k}}}},82442:(H,S,t)=>{"use strict";t.d(S,{O:()=>u});var s=t(14041),a=t(19402),x=t(72427),p=t(63636);function b(f,d,v,h){return s.Children.toArray(f).flatMap(C=>{if(!(0,s.isValidElement)(C))return[];if(C.type===s.Fragment)return b(C.props.children,d,v,h);if((0,a.E)(C,"core.featureFlagged")){const O=C.props;return("with"in O?d.isActive(O.with):!d.isActive(O.without))?b(C.props.children,d,v,h):[]}if(v===void 0||v(C))return[C];if(h)throw new Error(h);return b(C.props.children,d,v,h)})}class g{node;featureFlagsApi;constructor(d,v){this.node=d,this.featureFlagsApi=v}selectByComponentData(d){const v=b(this.node,this.featureFlagsApi,h=>(0,a.E)(h,d.key)!==void 0,d.withStrictError);return new g(v,this.featureFlagsApi)}findComponentData(d){return b(this.node,this.featureFlagsApi,h=>(0,a.E)(h,d.key)!==void 0).map(h=>(0,a.E)(h,d.key)).filter(h=>h!==void 0)}getElements(){return b(this.node,this.featureFlagsApi)}}function u(f,d,v=[]){const h=(0,x.gf)(p.B),C=new g(f,h);return(0,s.useMemo)(()=>d(C),[f,...v])}},9803:(H,S,t)=>{"use strict";t.d(S,{i:()=>a});class s{config;constructor(p){this.config=p}getId(){return this.config.id}getApis(){return this.config.apis??[]}getFeatureFlags(){return this.config.featureFlags?.slice()??[]}get routes(){return this.config.routes??{}}get externalRoutes(){return this.config.externalRoutes??{}}provide(p){return p.expose(this)}toString(){return`plugin{${this.config.id}}`}}function a(x){return new s(x)}},34569:(H,S,t)=>{"use strict";t.d(S,{H:()=>x});var s=t(59598);class a{id;params;[p=s.b];constructor(g,u){this.id=g,this.params=u,this[p]="absolute"}get title(){return this.id}toString(){return`routeRef{type=absolute,id=${this.id}}`}}function x(b){return new a(b.id,b.params??[])}var p},59598:(H,S,t)=>{"use strict";t.d(S,{b:()=>a});var s=t(63544);const a=(0,s.Q)("route-ref-type",()=>Symbol("route-ref-type"))},9222:(H,S,t)=>{"use strict";t.d(S,{S:()=>p});var s=t(14041),a=t(18690),x=t(43836);function p(b){const{pathname:g}=(0,a.zy)(),u=(0,x.qO)("routing-context");if(!u)throw new Error("Routing context is not available");const f=u.atVersion(1),d=(0,s.useMemo)(()=>f&&f.resolve(b,{pathname:g}),[f,b,g]);if(!u)throw new Error("useRouteRef used outside of routing context");if(!f)throw new Error("RoutingContext v1 not available");const v="optional"in b&&b.optional;if(!d&&!v)throw new Error(`No path for ${b}`);return d}},93184:(H,S,t)=>{"use strict";t.d(S,{h:()=>p,v:()=>b});var s=t(99833);function a(g){const u=new Array;function f(d,v){for(const[h,C]of Object.entries(d))typeof C=="string"?u.push([v+h,C]):f(C,`${v}${h}.`)}return f(g,""),Object.fromEntries(u)}class x{#t;#e;#n;constructor(u){this.#t=u.id,this.#e=a(u.messages)}$$type="@backstage/TranslationRef";version="v1";get id(){return this.#t}get T(){throw new Error("Not implemented")}getDefaultMessages(){return this.#e}setDefaultResource(u){this.#n=u}getDefaultResource(){return this.#n}toString(){return`TranslationRef{id=${this.id}}`}}function p(g){const u=new x(g);return g.translations&&u.setDefaultResource((0,s.o)({ref:u,translations:g.translations})),u}function b(g){const u=g;if(u.$$type!=="@backstage/TranslationRef")throw new Error(`Invalid translation ref, bad type '${u.$$type}'`);if(u.version!=="v1")throw new Error(`Invalid translation ref, bad version '${u.version}'`);return u}},99833:(H,S,t)=>{"use strict";t.d(S,{Y:()=>s,o:()=>a});function s(x){const p=x;if(p.$$type!=="@backstage/TranslationResource")throw new Error(`Invalid translation resource, bad type '${p.$$type}'`);if(p.version!=="v1")throw new Error(`Invalid translation resource, bad version '${p.version}'`);return p}function a(x){return{$$type:"@backstage/TranslationResource",version:"v1",id:x.ref.id,resources:Object.entries(x.translations).map(([p,b])=>({language:p,loader:()=>b().then(g=>{const u=g.default;return{messages:u?.$$type==="@backstage/TranslationMessages"?u.messages:u}})}))}}},87849:(H,S,t)=>{"use strict";t.d(S,{i:()=>g});var s=t(14041),a=t(72427),x=t(39837),p=t(56038);const b=new WeakSet,g=u=>{const f=(0,a.gf)(x.m),d=(0,a.gf)(p.J),[v,h]=(0,s.useState)(()=>d.getTranslation(u)),C=(0,s.useMemo)(()=>d.translation$(u),[d,u]),O=(0,s.useCallback)(B=>{if(!b.has(u)){const M=`Failed to load translation resource '${u.id}'; caused by ${B}`;console.error(M),f.post(new Error(M)),b.add(u)}},[f,u]);(0,s.useEffect)(()=>{const B=C.subscribe({next(M){M.ready&&h(M)},error(M){O(M)}});return()=>{B.unsubscribe()}},[C,O]);const P=(0,s.useRef)(!0);if((0,s.useEffect)(()=>{P.current?P.current=!1:h(d.getTranslation(u))},[d,u]),!v.ready)throw new Promise(B=>{const M=C.subscribe({next(I){I.ready&&(M.unsubscribe(),B())},error(I){M.unsubscribe(),O(I),B()}})});return{t:v.t}}},70835:(H,S,t)=>{"use strict";t.d(S,{o:()=>x});var s=t(59750);async function a(p){try{const b=await p.text();if(b){if(p.headers.get("content-type")?.startsWith("application/json"))try{const g=JSON.parse(b);if(g.error&&g.response)return g}catch{}return{error:{name:"Error",message:`Request failed with status ${p.status} ${p.statusText}, ${b}`},response:{statusCode:p.status}}}}catch{}return{error:{name:"Error",message:`Request failed with status ${p.status} ${p.statusText}`},response:{statusCode:p.status}}}class x extends Error{response;body;cause;statusCode;statusText;static async fromResponse(b){const g=await a(b),u=g.response.statusCode||b.status,f=b.statusText,d=`Request failed with ${u} ${f}`,v=(0,s.cy)(g.error);return new x({message:d,response:b,data:g,cause:v,statusCode:u,statusText:f})}constructor(b){super(b.message),this.name="ResponseError",this.response=b.response,this.body=b.data,this.cause=b.cause,this.statusCode=b.statusCode,this.statusText=b.statusText}}},93007:(H,S,t)=>{"use strict";t.d(S,{b:()=>s});function s(x){if(typeof x!="object"||x===null||Array.isArray(x))return!1;const p=x;return!(typeof p.name!="string"||p.name===""||typeof p.message!="string")}function a(x){if(typeof x!="object"||x===null||Array.isArray(x))throw new Error(`Encountered invalid error, not an object, got '${x}'`);const p=x;if(typeof p.name!="string"||p.name==="")throw new Error(`Encountered error object without a name, got '${x}'`);if(typeof p.message!="string")throw new Error(`Encountered error object without a message, got '${x}'`)}},97142:(H,S,t)=>{"use strict";t.d(S,{HK:()=>C,m_:()=>u,EH:()=>v});var s=t(93007),a=t(59750);class x extends Error{cause;constructor(P,B){let M=P;if(B!==void 0){const I=(0,a.M5)(B);M?M+=`; caused by ${I}`:M=`caused by ${I}`}super(M),Error.captureStackTrace?.(this,this.constructor),(!this.name||this.name==="Error")&&this.constructor.name!=="Error"&&(this.name=this.constructor.name),this.cause=(0,s.b)(B)?B:void 0}}class p extends null{name="InputError"}class b extends null{name="AuthenticationError"}class g extends null{name="NotAllowedError"}class u extends x{name="NotFoundError"}class f extends null{name="ConflictError"}class d extends null{name="NotModifiedError"}class v extends x{name="NotImplementedError"}class h extends null{}class C extends x{constructor(P,B){super(P,B),this.name=(0,s.b)(B)?B.name:"Error"}}},59750:(H,S,t)=>{"use strict";t.d(S,{M5:()=>g,cy:()=>b});var s=t(69655),a=t.n(s),x=t(93007);function p(u,f){const v={name:"Unknown",message:"<no reason given>",...serializeErrorInternal(u)};return f?.includeStack||(delete v.stack,v.cause&&typeof v.cause=="object"&&"stack"in v.cause&&delete v.cause.stack),v}function b(u){const f=(0,s.deserializeError)(u);return u.stack||(f.stack=void 0),f}function g(u){if((0,x.b)(u)){const f=String(u);return f!=="[object Object]"?f:`${u.name}: ${u.message}`}return`unknown error '${u}'`}},96726:(H,S,t)=>{"use strict";t.d(S,{L:()=>Le,Y:()=>an});var s=t(59869);const a="amazonaws.com";function x(T){const l=T.getOptionalString("endpoint"),E=T.getOptionalBoolean("s3ForcePathStyle")??!1;let R,Z;if(l){try{const Vt=new URL(l);R=Vt.host,Z=Vt.pathname}catch{throw new Error(`invalid awsS3 integration config, endpoint '${l}' is not a valid URL`)}if(Z!=="/")throw new Error(`invalid awsS3 integration config, endpoints cannot contain path, got '${l}'`)}else R=a;const _=T.getOptionalString("accessKeyId"),st=T.getOptionalString("secretAccessKey")?.trim(),Mt=T.getOptionalString("roleArn"),Wt=T.getOptionalString("externalId");return{host:R,endpoint:l,s3ForcePathStyle:E,accessKeyId:_,secretAccessKey:st,roleArn:Mt,externalId:Wt}}function p(T){const l=T.map(x);return l.some(E=>E.host===a)||l.push({host:a}),l}class b{integrationConfig;static factory=({config:l})=>{const E=p(l.getOptionalConfigArray("integrations.awsS3")??[]);return(0,s.oS)(E.map(R=>new b(R)),R=>R.config.host)};get type(){return"awsS3"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}constructor(l){this.integrationConfig=l}resolveUrl(l){return(0,s.ku)(l)}resolveEditUrl(l){return l}}const g="console.aws.amazon.com";function u(T){const l=T.getOptionalString("accessKeyId"),E=T.getOptionalString("secretAccessKey")?.trim(),R=T.getOptionalString("roleArn"),Z=T.getOptionalString("externalId"),_=T.getString("region");return{host:T.getOptionalString("host")||`${_}.${g}`,accessKeyId:l,secretAccessKey:E,roleArn:R,externalId:Z,region:_}}function f(T){return T.map(u)}class d{integrationConfig;static factory=({config:l})=>{const E=f(l.getOptionalConfigArray("integrations.awsCodeCommit")??[]);return(0,s.oS)(E.map(R=>new d(R)),R=>R.config.host)};get type(){return"awsCodeCommit"}get config(){return this.integrationConfig}get title(){return this.integrationConfig.host}constructor(l){this.integrationConfig=l}resolveUrl(l){return(0,s.ku)(l)}resolveEditUrl(l){const R=new URL(l).pathname.match(/^\/codesuite\/codecommit\/repositories\/([^\/]+)\//);if(!R)throw new Error("");const[,Z]=R;return v(l,Z,"edit")}}function v(T,l,E){const R=E==="edit"?"files/edit":E;return T.replace(new RegExp(`/codesuite/codecommit/repositories/${l}/(browse|files/edit)/`),`/codesuite/codecommit/repositories/${l}/${R}/`)}const h="GB";class C{static fromRepoUrl(l){const E=new URL(l);let R,Z,_;const st=E.pathname.split("/").map(ie=>decodeURIComponent(ie));if(st[2]==="_git"?(R=st[1],Z=_=st[3]):st[3]==="_git"?(R=st[1],Z=st[2],_=st[4]):st[4]==="_git"&&(R=`${st[1]}/${st[2]}`,Z=st[3],_=st[5]),!R||!Z||!_)throw new Error("Azure URL must point to a git repository");const Mt=E.searchParams.get("path")??void 0;let Wt;const Vt=E.searchParams.get("version");if(Vt){if(Vt.slice(0,2)!=="GB")throw new Error("Azure URL version must point to a git branch");Wt=Vt.slice(2)}return new C(E.origin,R,Z,_,Mt,Wt)}#t;#e;#n;#s;#o;#r;constructor(l,E,R,Z,_,st){this.#t=l,this.#e=E,this.#n=R,this.#s=Z,this.#o=_,this.#r=st}#a=(...l)=>{const E=new URL(this.#t);return E.pathname=l.map(R=>encodeURIComponent(R)).join("/"),E};toRepoUrl(){let l;return this.#n===this.#s?l=this.#a(this.#e,"_git",this.#s):l=this.#a(this.#e,this.#n,"_git",this.#s),this.#o&&l.searchParams.set("path",this.#o),this.#r&&l.searchParams.set("version",h+this.#r),l.toString()}toFileUrl(){if(!this.#o)throw new Error("Azure URL must point to a specific path to be able to download a file");const l=this.#a(this.#e,this.#n,"_apis","git","repositories",this.#s,"items");return l.searchParams.set("api-version","6.0"),l.searchParams.set("path",this.#o),this.#r&&l.searchParams.set("version",this.#r),l.toString()}toArchiveUrl(){const l=this.#a(this.#e,this.#n,"_apis","git","repositories",this.#s,"items");return l.searchParams.set("recursionLevel","full"),l.searchParams.set("download","true"),l.searchParams.set("api-version","6.0"),this.#o&&l.searchParams.set("scopePath",this.#o),this.#r&&l.searchParams.set("version",this.#r),l.toString()}toCommitsUrl(){const l=this.#a(this.#e,this.#n,"_apis","git","repositories",this.#s,"commits");return l.searchParams.set("api-version","6.0"),this.#r&&l.searchParams.set("searchCriteria.itemVersion.version",this.#r),l.toString()}getOwner(){return this.#e}getProject(){return this.#n}getRepo(){return this.#s}getPath(){return this.#o}getRef(){return this.#r}}const O="dev.azure.com",P=["clientId","clientSecret","managedIdentityClientId","tenantId","personalAccessToken"],B=new Map([["ClientSecret",["clientId","clientSecret","tenantId"]],["ManagedIdentity",["clientId"]],["ManagedIdentityClientAssertion",["clientId","managedIdentityClientId","tenantId"]],["PersonalAccessToken",["personalAccessToken"]]]);function M(T){for(const l of B.entries()){const[E,R]=l,Z=P.filter(_=>!R.includes(_));if(R.every(_=>T[_]!==void 0)&&Z.every(_=>T[_]===void 0))return{kind:E,organizations:T.organizations,...R.reduce((_,st)=>(_[st]=T[st],_),{})}}throw new Error("is not a valid credential")}function I(T){const l=T.getOptionalString("host")??O;let E=T.getOptionalConfigArray("credentials")?.map(_=>({organizations:_.getOptionalStringArray("organizations"),personalAccessToken:_.getOptionalString("personalAccessToken")?.trim(),tenantId:_.getOptionalString("tenantId")?.trim(),clientId:_.getOptionalString("clientId")?.trim(),clientSecret:_.getOptionalString("clientSecret")?.trim(),managedIdentityClientId:_.getOptionalString("managedIdentityClientId")?.trim()}));const R=T.getOptionalString("token")?.trim();if(T.getOptional("credential")!==void 0&&T.getOptional("credentials")!==void 0)throw new Error("Invalid Azure integration config, 'credential' and 'credentials' cannot be used together. Use 'credentials' instead.");if(T.getOptional("token")!==void 0&&T.getOptional("credentials")!==void 0)throw new Error("Invalid Azure integration config, 'token' and 'credentials' cannot be used together. Use 'credentials' instead.");if(R!==void 0){const _=[{personalAccessToken:R}];E=E?.concat(_)??_}if(T.getOptional("credential")!==void 0){const _=[{organizations:T.getOptionalStringArray("credential.organizations"),token:T.getOptionalString("credential.token")?.trim(),tenantId:T.getOptionalString("credential.tenantId"),clientId:T.getOptionalString("credential.clientId"),clientSecret:T.getOptionalString("credential.clientSecret")?.trim()}];E=E?.concat(_)??_}if(!(0,s.HO)(l))throw new Error(`Invalid Azure integration config, '${l}' is not a valid host`);let Z;if(E!==void 0){const _=E?.reduce((st,Mt,Wt)=>{let Vt;try{M(Mt)}catch(ie){Vt=ie.message}return Vt!==void 0&&st.push(`credential at position ${Wt+1} ${Vt}`),st},Array.of()).concat(Object.entries(E.filter(st=>st.organizations!==void 0&&st.organizations.length>0).reduce((st,Mt,Wt)=>(Mt.organizations?.forEach(Vt=>{st[Vt]||(st[Vt]=[]),st[Vt].push(Wt+1)}),st),{})).filter(([st,Mt])=>Mt.length>1).reduce((st,[Mt,Wt])=>(st.push(`organization ${Mt} is specified multiple times in credentials at positions ${Wt.slice(0,Wt.length-1).join(", ")} and ${Wt[Wt.length-1]}`),st),Array.of()));if(_?.length>0)throw new Error(`Invalid Azure integration config for ${l}: ${_.join("; ")}`);if(Z=E.map(st=>M(st)),Z.some(st=>st.kind!=="PersonalAccessToken")&&l!==O)throw new Error(`Invalid Azure integration config for ${l}, only personal access tokens can be used with hosts other than ${O}`);if(Z.filter(st=>st.organizations===void 0||st.organizations.length===0).length>1)throw new Error(`Invalid Azure integration config for ${l}, you cannot specify multiple credentials without organizations`)}return{host:l,credentials:Z,commitSigningKey:T.getOptionalString("commitSigningKey")}}function D(T){const l=T.map(I);return l.some(E=>E.host===O)||l.push({host:O}),l}class ${integrationConfig;static factory=({config:l})=>{const E=D(l.getOptionalConfigArray("integrations.azure")??[]);return(0,s.oS)(E.map(R=>new $(R)),R=>R.config.host)};constructor(l){this.integrationConfig=l}get type(){return"azure"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(l){const{url:E,base:R}=l;if((0,s.AY)(E))return E;try{const Z=C.fromRepoUrl(R),_=new URL(R),st=new URL(`https://a.com${Z.getPath()??""}`),Mt=new URL(E,st).pathname;return _.searchParams.set("path",Mt),l.lineNumber&&(_.searchParams.set("line",String(l.lineNumber)),_.searchParams.set("lineEnd",String(l.lineNumber+1)),_.searchParams.set("lineStartColumn","1"),_.searchParams.set("lineEndColumn","1")),_.toString()}catch{return new URL(E,R).toString()}}resolveEditUrl(l){return l}}var k=t(52536),X=t.n(k);const z="bitbucket.org",Y="https://api.bitbucket.org/2.0";function K(T){const l=z,E=Y,R=T.getString("username"),Z=T.getString("appPassword")?.trim();return{host:l,apiBaseUrl:E,username:R,appPassword:Z,commitSigningKey:T.getOptionalString("commitSigningKey")}}function lt(T){const l=T.map(K);return l.length===0&&l.push({host:z,apiBaseUrl:Y}),l}class G{integrationConfig;static factory=({config:l})=>{const E=lt(l.getOptionalConfigArray("integrations.bitbucketCloud")??[]);return(0,s.oS)(E.map(R=>new G(R)),R=>R.config.host)};constructor(l){this.integrationConfig=l}get type(){return"bitbucketCloud"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(l){const E=(0,s.ku)(l);if(l.lineNumber){const R=new URL(E);return R.hash=`lines-${l.lineNumber}`,R.toString()}return E}resolveEditUrl(l){const E=X()(l),R=new URL(l);return R.searchParams.set("mode","edit"),R.searchParams.set("at",E.ref),R.toString()}}var Q=t(45250);const J="bitbucket.org",it="https://api.bitbucket.org/2.0";function ht(T){const l=T.getOptionalString("host")??J;let E=T.getOptionalString("apiBaseUrl");const R=T.getOptionalString("token")?.trim(),Z=T.getOptionalString("username"),_=T.getOptionalString("appPassword")?.trim();if(!(0,s.HO)(l))throw new Error(`Invalid Bitbucket integration config, '${l}' is not a valid host`);return E?E=(0,Q.trimEnd)(E,"/"):l===J?E=it:E=`https://${l}/rest/api/1.0`,{host:l,apiBaseUrl:E,token:R,username:Z,appPassword:_,commitSigningKey:T.getOptionalString("commitSigningKey")}}function yt(T){const l=T.map(ht);return l.some(E=>E.host===J)||l.push({host:J,apiBaseUrl:it}),l}class At{integrationConfig;static factory=({config:l})=>{const E=yt(l.getOptionalConfigArray("integrations.bitbucket")??[...l.getOptionalConfigArray("integrations.bitbucketCloud")??[],...l.getOptionalConfigArray("integrations.bitbucketServer")??[]]);return(0,s.oS)(E.map(R=>new At(R)),R=>R.config.host)};constructor(l){this.integrationConfig=l}get type(){return"bitbucket"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(l){const E=(0,s.ku)(l);if(!l.lineNumber)return E;const R=new URL(E);return this.integrationConfig.host==="bitbucket.org"?R.hash=`lines-${l.lineNumber}`:R.hash=`${l.lineNumber}`,R.toString()}resolveEditUrl(l){const E=X()(l),R=new URL(l);return R.searchParams.set("mode","edit"),R.searchParams.set("spa","0"),R.searchParams.set("at",E.ref),R.toString()}}function Ot(T){const l=T.getString("host");let E=T.getOptionalString("apiBaseUrl");const R=T.getOptionalString("token")?.trim(),Z=T.getOptionalString("username"),_=T.getOptionalString("password");if(!(0,s.HO)(l))throw new Error(`Invalid Bitbucket Server integration config, '${l}' is not a valid host`);return E?E=(0,Q.trimEnd)(E,"/"):E=`https://${l}/rest/api/1.0`,{host:l,apiBaseUrl:E,token:R,username:Z,password:_,commitSigningKey:T.getOptionalString("commitSigningKey")}}function Rt(T){return T.map(Ot)}class dt{integrationConfig;static factory=({config:l})=>{const E=Rt(l.getOptionalConfigArray("integrations.bitbucketServer")??[]);return(0,s.oS)(E.map(R=>new dt(R)),R=>R.config.host)};constructor(l){this.integrationConfig=l}get type(){return"bitbucketServer"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(l){const E=(0,s.ku)(l);if(l.lineNumber){const R=new URL(E);return R.hash=l.lineNumber.toString(),R.toString()}return E}resolveEditUrl(l){return l.includes("?")?l.substring(0,l.indexOf("?")):l}}function ct(T){const l=T.getString("host");let E=T.getOptionalString("baseUrl"),R=T.getOptionalString("cloneUrl");const Z=T.getOptionalBoolean("disableEditUrl");let _=T.getString("gitilesBaseUrl");const st=T.getOptionalString("username"),Mt=T.getOptionalString("password")?.trim();if((0,s.HO)(l)){if(E&&!(0,s.AY)(E))throw new Error(`Invalid Gerrit integration config, '${E}' is not a valid baseUrl`);if(R&&!(0,s.AY)(R))throw new Error(`Invalid Gerrit integration config, '${R}' is not a valid cloneUrl`);if(!(0,s.AY)(_))throw new Error(`Invalid Gerrit integration config, '${_}' is not a valid gitilesBaseUrl`)}else throw new Error(`Invalid Gerrit integration config, '${l}' is not a valid host`);return E?E=(0,Q.trimEnd)(E,"/"):E=`https://${l}`,R?R=(0,Q.trimEnd)(R,"/"):R=E,_=(0,Q.trimEnd)(_,"/"),{host:l,baseUrl:E,cloneUrl:R,disableEditUrl:Z,gitilesBaseUrl:_,username:st,password:Mt,commitSigningKey:T.getOptionalString("commitSigningKey")}}function xt(T){return T.map(ct)}var pt=t(1048).hp;const bt=")]}'";function wt(T,l){const E=new URL(T.gitilesBaseUrl),R=new URL(l),_=R.pathname.substring(R.pathname.startsWith("/a/")?2:0).replace(E.pathname,"").split("/").filter(Me=>!!Me),st=_.indexOf("+");if(st<=0)throw new Error(`Unable to parse project from url: ${l}`);const Mt=trimStart(_.slice(0,st).join("/"),"/"),Wt=_.indexOf("heads");if(Wt<=0)throw new Error(`Unable to parse branch from url: ${l}`);const Vt=_[Wt+1],ie=_.slice(Wt+2).join("/");return{branch:Vt,filePath:ie===""?"/":ie,project:Mt}}function at(T,l){const E=new URL(T.gitilesBaseUrl),R=new URL(l),_=(0,Q.trimStart)(R.pathname.substring(R.pathname.startsWith("/a/")?2:0).replace(E.pathname,""),"/").split("/").filter(pe=>!!pe),st=(0,Q.takeWhile)(_,pe=>pe!=="+");if(st.length===0)throw new Error(`Unable to parse gitiles url: ${l}`);const Mt=_.slice(st.length+1),Wt=(0,Q.join)(st,"/");if(Mt.length>0&&Mt[0]==="HEAD"){const pe=Mt.shift(),te=(0,Q.join)(Mt,"/");return{project:Wt,ref:pe,refType:"head",path:te||"/",basePath:(0,Q.trimEnd)(l.replace(te,""),"/")}}if(Mt.length>0&&Mt[0].length===40){const pe=Mt.shift(),te=(0,Q.join)(Mt,"/");return{project:Wt,ref:pe,refType:"sha",path:te||"/",basePath:(0,Q.trimEnd)(l.replace(te,""),"/")}}const Vt=(0,Q.join)(Mt,"/"),Me=/^refs\/(?<refsReference>heads|tags)\/(?<ref>.*?)(\/|$)/.exec(Vt);if(Me){const pe=Me[0];let te;const{refsReference:ee,ref:ye}=Me.groups||{},nn=Vt.replace(pe,"");switch(ee){case"heads":te="branch";break;case"tags":te="tag";break;default:throw new Error(`Unable to parse gitiles url: ${l}`)}return{project:Wt,ref:ye,refType:te,path:nn||"/",basePath:(0,Q.trimEnd)(l.replace(nn,""),"/")}}throw new Error(`Unable to parse gitiles : ${l}`)}function gt(T,l,E,R){return`${T.gitilesBaseUrl}/${l}/+/refs/heads/${E}/${trimStart(R,"/")}`}function vt(T,l,E,R){return`${T.baseUrl}/admin/repos/edit/repo/${l}/branch/refs/heads/${E}/file/${(0,Q.trimStart)(R,"/")}`}function et(T,l,E,R){const Z=R==="/"||R===""?".tar.gz":`/${R}.tar.gz`;return`${U(T)}/${l}/+archive/refs/heads/${E}${Z}`}function Et(T,l){const{path:E,ref:R,project:Z,refType:_}=at(T,l),st=E==="/"||E===""?".tar.gz":`/${E}.tar.gz`;if(_==="branch")return`${U(T)}/${Z}/+archive/refs/heads/${R}${st}`;if(_==="sha")return`${U(T)}/${Z}/+archive/${R}${st}`;throw new Error(`Unsupported gitiles ref type: ${_}`)}function ot(T){return T.password?"/a/":"/"}function U(T){if(!T.baseUrl||!T.gitilesBaseUrl)throw new Error("Unexpected Gerrit config values. baseUrl or gitilesBaseUrl not set.");if(T.gitilesBaseUrl.startsWith(T.baseUrl))return T.gitilesBaseUrl.replace(T.baseUrl.concat("/"),T.baseUrl.concat(ot(T)));if(T.password)throw new Error("Since the baseUrl (Gerrit) is not part of the gitilesBaseUrl, an authentication URL could not be constructed.");return T.gitilesBaseUrl}function V(T,l){const{branch:E,project:R}=wt(T,l);return`${T.baseUrl}${ot(T)}projects/${encodeURIComponent(R)}/branches/${E}`}function nt(T,l){const{project:E}=wt(T,l);return`${T.cloneUrl}${ot(T)}${E}`}function Ct(T,l){const{ref:E,refType:R,path:Z,project:_}=at(T,l);if(R==="branch")return`${T.baseUrl}${ot(T)}projects/${encodeURIComponent(_)}/branches/${E}/files/${encodeURIComponent(Z)}/content`;if(R==="sha")return`${T.baseUrl}${ot(T)}projects/${encodeURIComponent(_)}/commits/${E}/files/${encodeURIComponent(Z)}/content`;throw new Error(`Unsupported gitiles ref type: ${R}`)}function ut(T){return`${T.baseUrl}${ot(T)}projects/`}function Bt(T){const l={};if(!T.password)return l;const E=pt.from(`${T.username}:${T.password}`,"utf8");return l.Authorization=`Basic ${E.toString("base64")}`,{headers:l}}async function Nt(T){const l=await T.text();if(l.startsWith(bt))try{return JSON.parse(l.slice(bt.length))}catch(E){throw new Error(`Invalid response from Gerrit: ${l.slice(0,10)} - ${E}`)}throw new Error(`Gerrit JSON body prefix missing. Found: ${l.slice(0,10)}`)}class Kt{integrationConfig;static factory=({config:l})=>{const E=xt(l.getOptionalConfigArray("integrations.gerrit")??[]);return(0,s.oS)(E.map(R=>new Kt(R)),R=>R.config.host)};constructor(l){this.integrationConfig=l}get type(){return"gerrit"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(l){const{url:E,base:R,lineNumber:Z}=l;let _;if(E.startsWith("/")){const{basePath:st}=at(this.config,R);return st+E}return E?_=new URL(E,R):_=new URL(R),Z&&(_.hash=Z.toString()),_.toString()}resolveEditUrl(l){if(this.config.disableEditUrl)return l;const E=at(this.config,l);return vt(this.config,E.project,E.ref,E.path)}}var Xt=t(36021);const kt="gitlab.com",Qt="https://gitlab.com/api/v4";function jt(T){const l=T.getString("host");let E=T.getOptionalString("apiBaseUrl");const R=T.getOptionalString("token")?.trim();let Z=T.getOptionalString("baseUrl");if(E?E=(0,Q.trimEnd)(E,"/"):l===kt&&(E=Qt),Z?Z=(0,Q.trimEnd)(Z,"/"):Z=`https://${l}`,(0,s.HO)(l)){if(!E||!(0,s.AY)(E))throw new Error(`Invalid GitLab integration config, '${E}' is not a valid apiBaseUrl`);if(!(0,s.AY)(Z))throw new Error(`Invalid GitLab integration config, '${Z}' is not a valid baseUrl`)}else throw new Error(`Invalid GitLab integration config, '${l}' is not a valid host`);return{host:l,token:R,apiBaseUrl:E,baseUrl:Z,commitSigningKey:T.getOptionalString("commitSigningKey")}}function Ht(T){const l=T.map(jt);return l.some(E=>E.host===kt)||l.push({host:kt,apiBaseUrl:Qt,baseUrl:`https://${kt}`}),l}function le(T){let l="";return T.host!==kt&&(l=new URL(T.baseUrl).pathname),trimEnd(l,"/")}class he{integrationConfig;static factory=({config:l})=>{const E=Ht(l.getOptionalConfigArray("integrations.gitlab")??[]);return(0,s.oS)(E.map(R=>new he(R)),R=>R.config.host)};constructor(l){this.integrationConfig=l}get type(){return"gitlab"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(l){return(0,s.ku)(l)}resolveEditUrl(l){return zt(l,"edit")}}function zt(T,l){return T.replace(/\/\-\/(blob|tree|edit)\//,`/-/${l}/`)}function oe(T){const l=T.getString("host");let E=T.getOptionalString("baseUrl");const R=T.getOptionalString("username"),Z=T.getOptionalString("password")?.trim();if((0,s.HO)(l)){if(E&&!(0,s.AY)(E))throw new Error(`Invalid Gitea integration config, '${E}' is not a valid baseUrl`)}else throw new Error(`Invalid Gitea integration config, '${l}' is not a valid host`);return E?E=(0,Q.trimEnd)(E,"/"):E=`https://${l}`,{host:l,baseUrl:E,username:R,password:Z,commitSigningKey:T.getOptionalString("commitSigningKey")}}var de=t(1048).hp;function Ye(T,l){const E=He(T,l);return`${E.url}/${E.owner}/${E.name}/_edit/${E.ref}/${E.path}`}function re(T,l){const E=He(T,l);return`${E.url}/api/v1/repos/${E.owner}/${E.name}/contents/${E.path}?ref=${E.ref}`}function on(T,l){const E=He(T,l);return`${E.url}/api/v1/repos/${E.owner}/${E.name}/archive/${E.ref}.tar.gz`}function ke(T,l){const E=He(T,l);return`${E.url}/api/v1/repos/${E.owner}/${E.name}/git/commits/${E.ref}`}function Te(T){const l={},{username:E,password:R}=T;return R?(E?l.Authorization=`basic ${de.from(`${E}:${R}`).toString("base64")}`:l.Authorization=`token ${R}`,{headers:l}):l}function He(T,l){const E=T.baseUrl??`https://${T.host}`;try{const[R,Z,_,st,Mt,Wt,...Vt]=l.replace(E,"").split("/"),ie=Vt.join("/").replace(/^\//,"");return{url:E,owner:Z,name:_,ref:Wt,path:ie}}catch(R){throw new Error(`Incorrect URL: ${l}, ${R}`)}}class ae{config;static factory=({config:l})=>{const R=(l.getOptionalConfigArray("integrations.gitea")??[]).map(Z=>oe(Z));return(0,s.oS)(R.map(Z=>new ae(Z)),Z=>Z.config.host)};constructor(l){this.config=l}get type(){return"gitea"}get title(){return this.config.host}resolveUrl(l){return(0,s.ku)(l)}resolveEditUrl(l){return Ye(this.config,l)}}function _e(T){const l=T.getString("host"),E=T.getOptionalString("token"),R=T.getOptionalString("apiKey");if(!(0,s.HO)(l))throw new Error(`Invalid Harness Code integration config, '${l}' is not a valid host`);return{host:l,apiKey:R,token:E}}function qe(T,l){const E=We(T,l);return`${E.baseUrl}/ng/account/${E.accountId}/module/code${E.orgName!==""?`/orgs/${E.orgName}`:""}${E.projectName!==""?`/projects/${E.projectName}`:""}/repos/${E.repoName}/files/${E.branch}/~/${E.path}`}function dn(T,l){const E=We(T,l);let R=`${E.baseUrl}/gateway/code/api/v1/repos/${E.accountId}`;return E.orgName&&(R+=`/${E.orgName}`),E.projectName&&(R+=`/${E.projectName}`),R+=`/${E.repoName}/+/raw/${E.path}?routingId=${E.accountId}&git_ref=refs/heads/${E.refString}`,R}function tn(T,l){const E=We(T,l);let R=`${E.baseUrl}/gateway/code/api/v1/repos/${E.accountId}`;return E.orgName&&(R+=`/${E.orgName}`),E.projectName&&(R+=`/${E.projectName}`),R+=`/${E.repoName}/+/archive/${E.branch}.zip?routingId=${E.accountId}`,R}function en(T,l){const E=We(T,l);let R=`${E.baseUrl}/gateway/code/api/v1/repos/${E.accountId}`;return E.orgName&&(R+=`/${E.orgName}`),E.projectName&&(R+=`/${E.projectName}`),R+=`/${E.repoName}/+/content?routingId=${E.accountId}&include_commit=true&git_ref=refs/heads/${E.branch}`,R}function un(T){const l={},{token:E,apiKey:R}=T;return R?l["x-api-key"]=R:E&&(l.Authorization=`Bearer ${E}`),{headers:l}}function We(T,l){const E=`https://${T.host}`;try{const R=new URL(l),Z=R.pathname.split("/").filter(ue=>ue!==""),_=R.pathname.split("/"),st=Z.findIndex(ue=>ue==="account")+1,Mt=Z[st],Wt=Z.findIndex(ue=>ue==="orgs"),Vt=Wt!==-1?Z[Wt+1]:"",ie=Z.findIndex(ue=>ue==="projects"),Me=ie!==-1?Z[ie+1]:"",pe=Z.findIndex((ue,Ft)=>ue==="repos"&&Ft>Math.max(st,Wt,ie))+1,te=Z[pe],ee=_.slice(_.findIndex(ue=>ue==="files"||ue==="edit")+1),ye=ee.findIndex(ue=>ue==="~"),nn=ee.slice(0,ye).join("/"),hn=ye!==-1?ee.slice(ye+1).join("/").replace(/^\//,""):"";return{baseUrl:E,accountId:Mt,orgName:Vt,projectName:Me,refString:nn,path:hn,repoName:te,refDashStr:ee.slice(0,ye).join("-"),branch:ye!==-1?ee.slice(0,ye).join("/"):ee.join("/")}}catch(R){throw new Error(`Incorrect URL: ${l}, ${R}`)}}class Ke{config;static factory=({config:l})=>{const R=(l.getOptionalConfigArray("integrations.harness")??[]).map(Z=>_e(Z));return(0,s.oS)(R.map(Z=>new Ke(Z)),Z=>Z.config.host)};constructor(l){this.config=l}get type(){return"harness"}get title(){return this.config.host}resolveUrl(l){return(0,s.ku)(l)}resolveEditUrl(l){return qe(this.config,l)}}const ze="blob.core.windows.net";function be(T){const l=T.getOptionalString("endpoint"),E=T.getString("accountName"),R=T.getOptionalString("accountKey")?.trim(),Z=T.getOptionalString("sasToken")?.trim(),_=T.getOptionalString("connectionString")?.trim(),st=T.getOptionalString("endpointSuffix")?.trim();let Mt,Wt;if(l){try{const ie=new URL(l);Mt=ie.host,Wt=ie.pathname}catch{throw new Error(`invalid azureBlobStorage integration config, endpoint '${l}' is not a valid URL`)}if(Wt!=="/")throw new Error(`invalid azureBlobStorage integration config, endpoints cannot contain path, got '${l}'`)}else Mt=ze;const Vt=T.has("aadCredential")?{clientId:T.getString("aadCredential.clientId"),tenantId:T.getString("aadCredential.tenantId"),clientSecret:T.getString("aadCredential.clientSecret")?.trim()}:void 0;if(R&&Z)throw new Error(`Invalid Azure Blob Storage config for ${E}: Both account key and SAS token cannot be used simultaneously.`);if(Vt&&(R||Z))throw new Error(`Invalid Azure Blob Storage config for ${E}: Cannot use both Azure AD credentials and account keys/SAS tokens for the same account.`);return{host:Mt,endpoint:l,accountName:E,accountKey:R,sasToken:Z,connectionString:_,endpointSuffix:st,aadCredential:Vt}}function Qe(T){const l=T.map(be);return l.some(E=>E.host===ze)||l.push({host:ze}),l}class Ze{integrationConfig;static factory=({config:l})=>{const E=Qe(l.getOptionalConfigArray("integrations.azureBlobStorage")??[]);return(0,s.oS)(E.map(R=>new Ze(R)),R=>R.config.host)};get type(){return"azureBlobStorage"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}constructor(l){this.integrationConfig=l}resolveUrl(l){return(0,s.ku)(l)}resolveEditUrl(l){return l}}class je{byType;static fromConfig(l){return new je({awsS3:b.factory({config:l}),awsCodeCommit:d.factory({config:l}),azureBlobStorage:Ze.factory({config:l}),azure:$.factory({config:l}),bitbucket:At.factory({config:l}),bitbucketCloud:G.factory({config:l}),bitbucketServer:dt.factory({config:l}),gerrit:Kt.factory({config:l}),github:Xt.U.factory({config:l}),gitlab:he.factory({config:l}),gitea:ae.factory({config:l}),harness:Ke.factory({config:l})})}constructor(l){this.byType=l}get awsS3(){return this.byType.awsS3}get awsCodeCommit(){return this.byType.awsCodeCommit}get azureBlobStorage(){return this.byType.azureBlobStorage}get azure(){return this.byType.azure}get bitbucket(){return this.byType.bitbucket}get bitbucketCloud(){return this.byType.bitbucketCloud}get bitbucketServer(){return this.byType.bitbucketServer}get gerrit(){return this.byType.gerrit}get github(){return this.byType.github}get gitlab(){return this.byType.gitlab}get gitea(){return this.byType.gitea}get harness(){return this.byType.harness}list(){return Object.values(this.byType).flatMap(l=>l.list())}byUrl(l){let E=Object.values(this.byType).map(R=>R.byUrl(l)).filter(Boolean);if(E.length>1){const R=E.filter(Z=>!(Z instanceof At));R.length!==0&&(E=R)}return E[0]}byHost(l){return Object.values(this.byType).map(E=>E.byHost(l)).find(Boolean)}resolveUrl(l){const E=this.byUrl(l.base);return E?E.resolveUrl(l):(0,s.ku)(l)}resolveEditUrl(l){const E=this.byUrl(l);return E?E.resolveEditUrl(l):l}}var Ue=t(55309);class Le{static fromConfig(l){return je.fromConfig(l)}}const an=(0,Ue.y)({id:"integration.scmintegrations"})},36021:(H,S,t)=>{"use strict";t.d(S,{U:()=>f,F:()=>d});var s=t(59869),a=t(45250);const x="github.com",p="https://api.github.com",b="https://raw.githubusercontent.com";function g(v){const h=v.getOptionalString("host")??x;let C=v.getOptionalString("apiBaseUrl"),O=v.getOptionalString("rawBaseUrl");const P=v.getOptionalString("token")?.trim(),B=v.getOptionalConfigArray("apps")?.map(M=>({appId:M.getNumber("appId"),clientId:M.getString("clientId"),clientSecret:M.getString("clientSecret"),webhookSecret:M.getOptionalString("webhookSecret"),privateKey:M.getString("privateKey"),allowedInstallationOwners:M.getOptionalStringArray("allowedInstallationOwners")}));if(!(0,s.HO)(h))throw new Error(`Invalid GitHub integration config, '${h}' is not a valid host`);return C?C=(0,a.trimEnd)(C,"/"):h===x&&(C=p),O?O=(0,a.trimEnd)(O,"/"):h===x&&(O=b),{host:h,apiBaseUrl:C,rawBaseUrl:O,token:P,apps:B}}function u(v){const h=v.map(g);return h.some(C=>C.host===x)||h.push({host:x,apiBaseUrl:p,rawBaseUrl:b}),h}class f{integrationConfig;static factory=({config:h})=>{const C=u(h.getOptionalConfigArray("integrations.github")??[]);return(0,s.oS)(C.map(O=>new f(O)),O=>O.config.host)};constructor(h){this.integrationConfig=h}get type(){return"github"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(h){return d((0,s.ku)(h),"tree")}resolveEditUrl(h){return d(h,"edit")}parseRateLimitInfo(h){return{isRateLimited:h.status===429||h.status===403&&h.headers.get("x-ratelimit-remaining")==="0"}}}function d(v,h){return v.replace(/\/\/([^/]+)\/([^/]+)\/([^/]+)\/(blob|tree|edit)\//,(C,O,P,B)=>`//${O}/${P}/${B}/${h}/`)}},59869:(H,S,t)=>{"use strict";t.d(S,{AY:()=>g,HO:()=>b,ku:()=>f,oS:()=>u});var s=t(52536),a=t.n(s),x=t(45250),p=t.n(x);function b(v){const h=new URL("http://example.com");return h.host=v,h.host===v}function g(v){try{return new URL(v),!0}catch{return!1}}function u(v,h){return{list(){return v},byUrl(C){try{const O=typeof C=="string"?new URL(C):C;return v.find(P=>h(P)===O.host)}catch{return}},byHost(C){return v.find(O=>h(O)===C)}}}function f(v){const{url:h,base:C,lineNumber:O}=v;try{return new URL(h),h}catch{}let P;if(h.startsWith("/")){const{href:B,filepath:M}=a()(C);P=new URL(B);const I=(0,x.trimEnd)(P.pathname.substring(0,P.pathname.length-M.length),"/");P.pathname=`${I}${h}`}else P=new URL(h,C);return P.search=new URL(C).search,O&&(P.hash=`L${O}`),P.toString()}function d(v){beforeAll(()=>v.listen({onUnhandledRequest:"error"})),afterAll(()=>v.close()),afterEach(()=>v.resetHandlers())}},71543:(H,S,t)=>{"use strict";var s={};t.r(s),t.d(s,{TechDocsPlugin:()=>b.Ju});var a=t(31085),x=t(25873),p=t(18690),b=t(39278),g=t(8915),u=t(72020),f=t(99730),d=t(64947),v=t(12173),h=t(22020),C=t(68146),O=t(73657);function P({children:r}){return(0,p.Ri)()?(0,a.jsx)(a.Fragment,{children:r}):(0,a.jsx)(p.fS,{children:r})}const B=()=>(0,a.jsx)(v.M,{status:"404",statusMessage:"PAGE NOT FOUND"}),M=({step:r,error:e})=>{let n="";return r==="load-config"?n=`The configuration failed to load, someone should have a look at this error: ${e.message}`:r==="load-chunk"&&(n=`Lazy loaded chunk failed to load, try to reload the page: ${e.message}`),(0,a.jsx)(P,{children:(0,a.jsx)(v.M,{statusMessage:n,stack:e.stack})})},I=({error:r,resetError:e,plugin:n})=>(0,a.jsx)(h.b,{title:`Error in ${n?.getId()}`,defaultExpanded:!0,error:r,children:(0,a.jsx)(d.A,{variant:"outlined",onClick:e,children:"Retry"})}),D={Progress:C.k,Router:O.Kd,NotFoundErrorPage:B,BootErrorPage:M,ErrorBoundaryFallback:I},$="Invalid discovery URL pattern,";class k{parts;static compile(e){const n=e.split(/\{\{\s*pluginId\s*\}\}/),o=n.join("pluginId");let i;try{i=new URL(o)}catch{throw new Error(`${$} URL '${o}' is invalid`)}if(i.hash)throw new Error(`${$} URL must not have a hash`);if(i.search)throw new Error(`${$} URL must not have a query`);if(o.endsWith("/"))throw new Error(`${$} URL must not end with a slash`);return new k(n)}constructor(e){this.parts=e}async getBaseUrl(e){return this.parts.join(encodeURIComponent(e))}}class X{endpoints;defaultEndpoint;static fromConfig(e,n){const o=n?.pathPattern??"/api/{{ pluginId }}",i=e.getString("backend.baseUrl"),c=e.getOptionalConfigArray("discovery.endpoints")?.flatMap(A=>{const y=typeof A.get("target")=="object"?A.getOptionalString("target.external"):A.getString("target");if(!y)return[];const w=k.compile(y);return A.getStringArray("plugins").map(F=>[F,w])});return new X(new Map(c),k.compile(`${i}${o}`))}constructor(e,n){this.endpoints=e,this.defaultEndpoint=n}async getBaseUrl(e){const n=this.endpoints.get(e);return n?n.getBaseUrl(e):this.defaultEndpoint.getBaseUrl(e)}}var z=t(96403),Y=t.n(z);class K{isClosed=!1;terminatingError;observable=new(Y())(e=>this.isClosed?(this.terminatingError?e.error(this.terminatingError):e.complete(),()=>{}):(this.subscribers.add(e),()=>{this.subscribers.delete(e)}));subscribers=new Set;[Symbol.observable](){return this}get closed(){return this.isClosed}next(e){if(this.isClosed)throw new Error("PublishSubject is closed");this.subscribers.forEach(n=>n.next(e))}error(e){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.terminatingError=e,this.subscribers.forEach(n=>n.error(e))}complete(){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.subscribers.forEach(e=>e.complete())}subscribe(e,n,o){const i=typeof e=="function"?{next:e,error:n,complete:o}:e;return this.observable.subscribe(i)}}class lt{isClosed;currentValue;terminatingError;observable;constructor(e){this.isClosed=!1,this.currentValue=e,this.terminatingError=void 0,this.observable=new(Y())(n=>this.isClosed?(this.terminatingError?n.error(this.terminatingError):n.complete(),()=>{}):(n.next(this.currentValue),this.subscribers.add(n),()=>{this.subscribers.delete(n)}))}subscribers=new Set;[Symbol.observable](){return this}get closed(){return this.isClosed}next(e){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.currentValue=e,this.subscribers.forEach(n=>n.next(e))}error(e){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.terminatingError=e,this.subscribers.forEach(n=>n.error(e))}complete(){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.subscribers.forEach(e=>e.complete())}subscribe(e,n,o){const i=typeof e=="function"?{next:e,error:n,complete:o}:e;return this.observable.subscribe(i)}}class G{subject=new K;post(e){this.subject.next(e)}alert$(){return this.subject}}class Q{captureEvent(e){}}class J{alertApi;errorApi;constructor(e,n){this.alertApi=e,this.errorApi=n}post(e,n){return n?.hidden||this.alertApi.post({message:e.message,severity:"error"}),this.errorApi.post(e,n)}error$(){return this.errorApi.error$()}}class it{subject=new K;post(e,n){this.subject.next({error:e,context:n})}error$(){return this.subject}}class ht{static forward(e,n){window.addEventListener("unhandledrejection",o=>{e.post(o.reason,n)})}}const yt=new Map;class At{namespace;errorApi;constructor(e,n){this.namespace=e,this.errorApi=n,this.subscribers=new Set,this.observable=new(Y())(o=>(this.subscribers.add(o),()=>{this.subscribers.delete(o)}))}static hasSubscribed=!1;static create(e){return new At(e.namespace??"",e.errorApi)}static addStorageEventListener(){window.addEventListener("storage",e=>{for(const[n,o]of yt.entries())e.key?.startsWith(n)&&o.handleStorageChange(e.key)})}get(e){return this.snapshot(e).value}snapshot(e){let n,o="absent";try{const i=localStorage.getItem(this.getKeyName(e));i&&(n=JSON.parse(i,(c,A)=>(typeof A=="object"&&A!==null&&Object.freeze(A),A)),o="present")}catch{this.errorApi.post(new Error(`Error when parsing JSON config from storage for: ${e}`))}return{key:e,value:n,presence:o}}forBucket(e){const n=`${this.namespace}/${e}`;return yt.has(n)||yt.set(n,new At(n,this.errorApi)),yt.get(n)}async set(e,n){localStorage.setItem(this.getKeyName(e),JSON.stringify(n)),this.notifyChanges(e)}async remove(e){localStorage.removeItem(this.getKeyName(e)),this.notifyChanges(e)}observe$(e){return At.hasSubscribed||(At.addStorageEventListener(),At.hasSubscribed=!0),this.observable.filter(({key:n})=>n===e)}handleStorageChange(e){if(!e?.startsWith(this.namespace))return;const n=e?.slice(`${this.namespace}/`.length);n.includes("/")||this.notifyChanges(decodeURIComponent(n))}getKeyName(e){return`${this.namespace}/${encodeURIComponent(e)}`}notifyChanges(e){const n=this.snapshot(e);for(const o of this.subscribers)o.next(n)}subscribers;observable}function Ot(r){let e=r.baseImplementation||t.g.fetch;const n=[r.middleware??[]].flat().reverse();for(const o of n)e=o.apply(e);return{fetch:e}}class Rt{identityApi;allowUrl;headerName;headerValue;static create(e){const n=dt(e),o=e.header?.name||"authorization",i=e.header?.value||(c=>`Bearer ${c}`);return new Rt(e.identityApi,n,o,i)}static getDiscoveryUrlPrefixes(e){return(e.getOptionalConfigArray("discovery.endpoints")||[]).flatMap(o=>{const i=typeof o.get("target")=="object"?o.getString("target.external"):o.getString("target");return o.getStringArray("plugins").map(A=>i.replace(/\{\{\s*pluginId\s*\}\}/g,A))})}constructor(e,n,o,i){this.identityApi=e,this.allowUrl=n,this.headerName=o,this.headerValue=i}apply(e){return async(n,o)=>{const i=new Request(n,o),{token:c}=await this.identityApi.getCredentials();return i.headers.get(this.headerName)||typeof c!="string"||!c||!this.allowUrl(i.url)?e(n,o):(i.headers.set(this.headerName,this.headerValue(c)),e(i))}}}function dt(r){return r.allowUrl?r.allowUrl:r.urlPrefixAllowlist?ct(r.urlPrefixAllowlist):r.config?ct([r.config.getString("backend.baseUrl"),...Rt.getDiscoveryUrlPrefixes(r.config)]):()=>!1}function ct(r){const e=r.map(n=>n.replace(/\/$/,""));return n=>e.some(o=>n===o||n.startsWith(`${o}/`))}function xt(r,e){return!e||e==="/"?r:`${r.replace(/\/$/,"")}/${e.replace(/^\//,"")}`}class pt{discoveryApi;constructor(e){this.discoveryApi=e}apply(e){return async(n,o)=>{const i=new Request(n,o),c="plugin://";if(!i.url.startsWith(c))return e(n,o);const{hostname:A,pathname:y,search:w,hash:F,username:tt,password:mt}=new URL(`http://${i.url.substring(c.length)}`);let St=await this.discoveryApi.getBaseUrl(A);if(tt||mt){const Dt=new URL(St),Yt=`${tt}${mt?`:${mt}`:""}@`;St=`${Dt.protocol}//${Yt}${Dt.host}${Dt.pathname}`}const Tt=`${xt(St,y)}${w}${F}`;return e(Tt,typeof n=="string"||bt(n)?o:n)}}}function bt(r){return typeof r=="object"&&r?.constructor===URL}class wt{static resolvePluginProtocol(e){return new pt(e.discoveryApi)}static injectIdentityAuth(e){return Rt.create(e)}constructor(){}}function at(r,e){for(const n of e)if(!r.has(n))return!1;return!0}function gt(r,...e){const n=new Set(r);for(const o of e)for(const i of o)n.add(i);return n}class vt{requests=[];subject=new lt(this.getCurrentPending());request(e){return new Promise((n,o)=>{this.requests.push({scopes:e,resolve:n,reject:o}),this.subject.next(this.getCurrentPending())})}resolve(e,n){this.requests=this.requests.filter(o=>at(e,o.scopes)?(o.resolve(n),!1):!0),this.subject.next(this.getCurrentPending())}reject(e){this.requests.forEach(n=>n.reject(e)),this.requests=[],this.subject.next(this.getCurrentPending())}pending(){return this.subject}getCurrentPending(){const e=this.requests.length===0?void 0:this.requests.slice(1).reduce((n,o)=>gt(n,o.scopes),this.requests[0].scopes);return{scopes:e,resolve:n=>{e&&this.resolve(e,n)},reject:n=>{e&&this.reject(n)}}}}class et{subject=new K;currentRequests=[];handlerCount=0;createAuthRequester(e){const n=new vt,o=this.handlerCount;return this.handlerCount++,n.pending().subscribe({next:i=>{const c=this.currentRequests.slice(),A=this.makeAuthRequest(i,e);A?c[o]=A:delete c[o],this.currentRequests=c,this.subject.next(c.filter(Boolean))}}),i=>n.request(i)}makeAuthRequest(e,n){const{scopes:o}=e;if(o)return{provider:n.provider,trigger:async()=>{const i=await n.onAuthRequest(o);e.resolve(i)},reject:()=>{const i=new Error("Login failed, rejected by user");i.name="RejectedError",e.reject(i)}}}authRequest$(){return this.subject}}function Et(r){return new Promise((e,n)=>{const o=r.width||500,i=r.height||700,c=window.screen.width/2-o/2,A=window.screen.height/2-i/2,y=new URL(r.url).origin,w=window.open(r.url,r.name,`menubar=no,location=no,resizable=no,scrollbars=no,status=no,width=${o},height=${i},top=${A},left=${c}`);let F="";if(!w||typeof w.closed>"u"||w.closed){const Tt=new Error("Failed to open auth popup.");Tt.name="PopupRejectedError",n(Tt);return}const tt=Tt=>{if(Tt.source!==w||Tt.origin!==y)return;const{data:Dt}=Tt;if(Dt.type==="config_info"){F=Dt.targetOrigin;return}if(Dt.type!=="authorization_response")return;const Yt=Dt;if("error"in Yt){const me=new Error(Yt.error.message);me.name=Yt.error.name,n(me)}else e(Yt.response);St()},mt=setInterval(()=>{if(w.closed){const Tt=`Login failed, ${F&&F!==window.location.origin?`Incorrect app origin, expected ${F}`:"popup was closed"}`,Dt=new Error(Tt);Dt.name="PopupClosedError",n(Dt),St()}},100);function St(){window.removeEventListener("message",tt),clearInterval(mt)}window.addEventListener("message",tt)})}let ot=!1;function U(r){return[...r].join(" ")}class V{discoveryApi;environment;provider;joinScopesFunc;authRequester;sessionTransform;enableExperimentalRedirectFlow;popupOptions;constructor(e){const{configApi:n,discoveryApi:o,environment:i,provider:c,joinScopes:A=U,oauthRequestApi:y,sessionTransform:w=tt=>tt,popupOptions:F}=e;!ot&&!n&&(console.warn("DEPRECATION WARNING: Authentication providers require a configApi instance to configure the authentication flow. Please provide one to the authentication provider constructor."),ot=!0),this.enableExperimentalRedirectFlow=n?n.getOptionalBoolean("enableExperimentalRedirectFlow")??!1:!1,this.authRequester=y.createAuthRequester({provider:c,onAuthRequest:async tt=>this.enableExperimentalRedirectFlow?this.executeRedirect(tt):this.showPopup(tt)}),this.discoveryApi=o,this.environment=i,this.provider=c,this.joinScopesFunc=A,this.sessionTransform=w,this.popupOptions=F}async createSession(e){return e.instantPopup?this.enableExperimentalRedirectFlow?this.executeRedirect(e.scopes):this.showPopup(e.scopes):this.authRequester(e.scopes)}async refreshSession(e){const n=await fetch(await this.buildUrl("/refresh",{optional:!0,...e&&{scope:this.joinScopesFunc(e.scopes)}}),{headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(i=>{throw new Error(`Auth refresh request failed, ${i}`)});if(!n.ok){const i=new Error(`Auth refresh request failed, ${n.statusText}`);throw i.status=n.status,i}const o=await n.json();if(o.error){const i=new Error(o.error.message);throw o.error.name&&(i.name=o.error.name),i}return await this.sessionTransform(o)}async removeSession(){const e=await fetch(await this.buildUrl("/logout"),{method:"POST",headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(n=>{throw new Error(`Logout request failed, ${n}`)});if(!e.ok){const n=new Error(`Logout request failed, ${e.statusText}`);throw n.status=e.status,n}}async showPopup(e){const n=this.joinScopesFunc(e),o=await this.buildUrl("/start",{scope:n,origin:window.location.origin,flow:"popup"}),i=this.popupOptions?.size?.fullscreen?window.screen.width:this.popupOptions?.size?.width||450,c=this.popupOptions?.size?.fullscreen?window.screen.height:this.popupOptions?.size?.height||730,A=await Et({url:o,name:`${this.provider.title} Login`,width:i,height:c});return await this.sessionTransform(A)}async executeRedirect(e){const n=this.joinScopesFunc(e);return window.location.href=await this.buildUrl("/start",{scope:n,origin:window.location.origin,redirectUrl:window.location.href,flow:"redirect"}),new Promise(()=>{})}async buildUrl(e,n){const o=await this.discoveryApi.getBaseUrl("auth"),i=this.buildQueryString({...n,env:this.environment});return`${o}/${this.provider.id}${e}${i}`}buildQueryString(e){if(!e)return"";const n=Object.entries(e).map(([o,i])=>{if(typeof i=="string")return`${encodeURIComponent(o)}=${encodeURIComponent(i)}`;if(i)return encodeURIComponent(o)}).filter(Boolean).join("&");return n?`?${n}`:""}}function nt(r,e){for(const n of e)if(!r.has(n))return!1;return!0}class Ct{options;constructor(e){this.options=e}sessionExistsAndHasScope(e,n){if(!e)return!1;if(!n||this.options.sessionScopes===void 0)return!0;const o=this.options.sessionScopes(e);return nt(o,n)}getExtendedScope(e,n){const o=new Set(this.options.defaultScopes);if(e&&this.options.sessionScopes!==void 0){const i=this.options.sessionScopes(e);for(const c of i)o.add(c)}if(n)for(const i of n)o.add(i);return o}}var ut=t(55309),Bt=function(r){return r.SignedIn="SignedIn",r.SignedOut="SignedOut",r}({});const Nt=(0,ut.y)({id:"core.auth.google"}),Kt=(0,ut.y)({id:"core.auth.github"}),Xt=(0,ut.y)({id:"core.auth.okta"}),kt=(0,ut.y)({id:"core.auth.gitlab"}),Qt=(0,ut.y)({id:"core.auth.microsoft"}),jt=(0,ut.y)({id:"core.auth.onelogin"}),Ht=(0,ut.y)({id:"core.auth.bitbucket"}),le=(0,ut.y)({id:"core.auth.bitbucket-server"}),he=(0,ut.y)({id:"core.auth.atlassian"}),zt=(0,ut.y)({id:"core.auth.vmware-cloud"});class oe{subject=new lt(Bt.SignedOut);signedIn=!1;setIsSignedIn(e){this.signedIn!==e&&(this.signedIn=e,this.subject.next(this.signedIn?Bt.SignedIn:Bt.SignedOut))}sessionState$(){return this.subject}}class de{connector;helper;sessionScopesFunc;sessionShouldRefreshFunc;stateTracker=new oe;refreshPromise;currentSession;constructor(e){const{connector:n,defaultScopes:o=new Set,sessionScopes:i,sessionShouldRefresh:c}=e;this.connector=n,this.sessionScopesFunc=i,this.sessionShouldRefreshFunc=c,this.helper=new Ct({sessionScopes:i,defaultScopes:o})}async getSession(e){if(this.helper.sessionExistsAndHasScope(this.currentSession,e.scopes)){if(!this.sessionShouldRefreshFunc(this.currentSession))return this.currentSession;try{const o=await this.collapsedSessionRefresh(e.scopes),i=this.sessionScopesFunc(this.currentSession),c=this.sessionScopesFunc(o);return nt(c,i)&&(this.currentSession=o),o}catch(o){if(e.optional)return;throw o}}if(!e.instantPopup)try{const n=await this.collapsedSessionRefresh(e.scopes);return this.currentSession=n,this.getSession(e)}catch{}if(!e.optional)return this.currentSession=await this.connector.createSession({...e,scopes:this.helper.getExtendedScope(this.currentSession,e.scopes)}),this.stateTracker.setIsSignedIn(!0),this.currentSession}async removeSession(){this.currentSession=void 0,await this.connector.removeSession(),this.stateTracker.setIsSignedIn(!1)}sessionState$(){return this.stateTracker.sessionState$()}async collapsedSessionRefresh(e){if(this.refreshPromise)return this.refreshPromise;this.refreshPromise=this.connector.refreshSession({scopes:this.helper.getExtendedScope(this.currentSession,e)});try{const n=await this.refreshPromise;if(!this.helper.sessionExistsAndHasScope(n,e))throw new Error("Refreshed session did not receive the required scopes");return this.stateTracker.setIsSignedIn(!0),n}finally{delete this.refreshPromise}}}const Ye={id:"oauth2",title:"Your Identity Provider",icon:()=>null};class re{static createAuthConnector(e){if("authConnector"in e)return e.authConnector;const{scopeTransform:n=F=>F,configApi:o,discoveryApi:i,environment:c="development",provider:A=Ye,oauthRequestApi:y,popupOptions:w}=e;return new V({configApi:o,discoveryApi:i,environment:c,provider:A,oauthRequestApi:y,sessionTransform({backstageIdentity:F,...tt}){const mt={...tt,providerInfo:{idToken:tt.providerInfo.idToken,accessToken:tt.providerInfo.accessToken,scopes:re.normalizeScopes(tt.providerInfo.scope,{scopeTransform:n}),expiresAt:tt.providerInfo.expiresInSeconds?new Date(Date.now()+tt.providerInfo.expiresInSeconds*1e3):void 0}};return F&&(mt.backstageIdentity={token:F.token,identity:F.identity,expiresAt:F.expiresInSeconds?new Date(Date.now()+F.expiresInSeconds*1e3):void 0}),mt},popupOptions:w})}static create(e){const{defaultScopes:n=[],scopeTransform:o=A=>A}=e,i=re.createAuthConnector(e),c=new de({connector:i,defaultScopes:new Set(n),sessionScopes:A=>A.providerInfo.scopes,sessionShouldRefresh:A=>{let y=1/0;return A.providerInfo?.expiresAt&&(y=Math.min(y,(A.providerInfo.expiresAt.getTime()-Date.now())/1e3)),A.backstageIdentity?.expiresAt&&(y=Math.min(y,(A.backstageIdentity.expiresAt.getTime()-Date.now())/1e3)),y<60*3}});return new re({sessionManager:c,scopeTransform:o})}sessionManager;scopeTransform;constructor(e){this.sessionManager=e.sessionManager,this.scopeTransform=e.scopeTransform}async signIn(){await this.getAccessToken()}async signOut(){await this.sessionManager.removeSession()}sessionState$(){return this.sessionManager.sessionState$()}async getAccessToken(e,n){const o=re.normalizeScopes(e,{scopeTransform:this.scopeTransform});return(await this.sessionManager.getSession({...n,scopes:o}))?.providerInfo.accessToken??""}async getIdToken(e={}){return(await this.sessionManager.getSession({...e,scopes:new Set(["openid"])}))?.providerInfo.idToken??""}async getBackstageIdentity(e={}){return(await this.sessionManager.getSession(e))?.backstageIdentity}async getProfile(e={}){return(await this.sessionManager.getSession(e))?.profile}static normalizeScopes(e,n){if(!e)return new Set;const o=Array.isArray(e)?e:e.split(/[\s|,]/).filter(Boolean),i=n?n.scopeTransform(o):o;return new Set(i)}}const on={id:"google",title:"Google",icon:()=>null},ke="https://www.googleapis.com/auth/";class Te{static create(e){const{configApi:n,discoveryApi:o,oauthRequestApi:i,environment:c="development",provider:A=on,defaultScopes:y=["openid",`${ke}userinfo.email`,`${ke}userinfo.profile`]}=e;return re.create({configApi:n,discoveryApi:o,oauthRequestApi:i,provider:A,environment:c,defaultScopes:y,scopeTransform(w){return w.map(F=>F==="openid"?F:F==="profile"||F==="email"?`${ke}userinfo.${F}`:F.startsWith(ke)?F:`${ke}${F}`)}})}}const He={id:"microsoft",title:"Microsoft",icon:()=>null};class ae{oauth2;configApi;environment;provider;oauthRequestApi;discoveryApi;scopeTransform;static MicrosoftGraphID="00000003-0000-0000-c000-000000000000";static create(e){return new ae(e)}constructor(e){const{configApi:n,environment:o="development",provider:i=He,oauthRequestApi:c,discoveryApi:A,defaultScopes:y=["openid","offline_access","profile","email","User.Read"],scopeTransform:w=F=>F.concat("offline_access")}=e;this.configApi=n,this.environment=o,this.provider=i,this.oauthRequestApi=c,this.discoveryApi=A,this.scopeTransform=w,this.oauth2={[ae.MicrosoftGraphID]:re.create({configApi:this.configApi,discoveryApi:this.discoveryApi,oauthRequestApi:this.oauthRequestApi,provider:this.provider,environment:this.environment,scopeTransform:this.scopeTransform,defaultScopes:y})}}microsoftGraph(){return this.oauth2[ae.MicrosoftGraphID]}static resourceForScopes(e){const n=[...new Set(e.split(" ").map(ae.resourceForScope).filter(i=>i!=="openid"))];if(n.length>1)return Promise.reject(new Error(`Requested access token with scopes from multiple Azure resources: ${n.join(", ")}. Access tokens can only have a single audience.`));const o=n[0]??ae.MicrosoftGraphID;return Promise.resolve(o)}static resourceForScope(e){const n=e.match(/^(?<resourceURI>.*)\/(?<scp>[^\/]*)$/)?.groups;if(n){const{resourceURI:o}=n;return o.replace(/^api:\/\//,"")}switch(e){case"email":case"openid":case"offline_access":case"profile":return"openid";default:return ae.MicrosoftGraphID}}async getAccessToken(e,n){const o=e===void 0?ae.MicrosoftGraphID:await ae.resourceForScopes(Array.isArray(e)?e.join(" "):e);return o in this.oauth2||(this.oauth2[o]=re.create({configApi:this.configApi,discoveryApi:this.discoveryApi,oauthRequestApi:this.oauthRequestApi,provider:this.provider,environment:this.environment,scopeTransform:this.scopeTransform})),this.oauth2[o].getAccessToken(e,n)}getIdToken(e){return this.microsoftGraph().getIdToken(e)}getProfile(e){return this.microsoftGraph().getProfile(e)}getBackstageIdentity(e){return this.microsoftGraph().getBackstageIdentity(e)}signIn(){return this.microsoftGraph().signIn()}signOut(){return this.microsoftGraph().signOut()}sessionState$(){return this.microsoftGraph().sessionState$()}}const _e={id:"github",title:"GitHub",icon:()=>null};class qe{static create(e){const{configApi:n,discoveryApi:o,environment:i="development",provider:c=_e,oauthRequestApi:A,defaultScopes:y=["read:user"]}=e;return re.create({configApi:n,discoveryApi:o,oauthRequestApi:A,provider:c,environment:i,defaultScopes:y})}}const dn={id:"okta",title:"Okta",icon:()=>null},tn=new Set(["openid","profile","email","phone","address","groups","offline_access"]),en="okta.";class un{static create(e){const{configApi:n,discoveryApi:o,environment:i="development",provider:c=dn,oauthRequestApi:A,defaultScopes:y=["openid","email","profile","offline_access"]}=e;return re.create({configApi:n,discoveryApi:o,oauthRequestApi:A,provider:c,environment:i,defaultScopes:y,scopeTransform(w){return w.map(F=>tn.has(F)||F.startsWith(en)?F:`${en}${F}`)}})}}const We={id:"gitlab",title:"GitLab",icon:()=>null};class Ke{static create(e){const{configApi:n,discoveryApi:o,environment:i="development",provider:c=We,oauthRequestApi:A,defaultScopes:y=["read_user"]}=e;return re.create({configApi:n,discoveryApi:o,oauthRequestApi:A,provider:c,environment:i,defaultScopes:y})}}const ze={id:"onelogin",title:"onelogin",icon:()=>null},be=new Set(["openid","profile","email","phone","address","groups","offline_access"]),Qe="onelogin.";class Ze{static create(e){const{configApi:n,discoveryApi:o,environment:i="development",provider:c=ze,oauthRequestApi:A}=e;return re.create({configApi:n,discoveryApi:o,oauthRequestApi:A,provider:c,environment:i,defaultScopes:["openid","email","profile","offline_access"],scopeTransform(y){return y.map(w=>be.has(w)||w.startsWith(Qe)?w:`${Qe}${w}`)}})}}const je={id:"bitbucket",title:"Bitbucket",icon:()=>null};class Ue{static create(e){const{configApi:n,discoveryApi:o,environment:i="development",provider:c=je,oauthRequestApi:A,defaultScopes:y=["account"]}=e;return re.create({configApi:n,discoveryApi:o,oauthRequestApi:A,provider:c,environment:i,defaultScopes:y})}}const Le={id:"bitbucketServer",title:"Bitbucket Server",icon:()=>null};class an{static create(e){const{configApi:n,discoveryApi:o,environment:i="development",provider:c=Le,oauthRequestApi:A,defaultScopes:y=["PROJECT_ADMIN"]}=e;return re.create({configApi:n,discoveryApi:o,oauthRequestApi:A,provider:c,environment:i,defaultScopes:y})}}const T={id:"atlassian",title:"Atlassian",icon:()=>null};class l{static create(e){const{configApi:n,discoveryApi:o,environment:i="development",provider:c=T,oauthRequestApi:A}=e;return re.create({configApi:n,discoveryApi:o,oauthRequestApi:A,provider:c,environment:i})}}const E={id:"vmwareCloudServices",title:"VMware Cloud",icon:()=>null};class R{static create(e){const{configApi:n,discoveryApi:o,oauthRequestApi:i,environment:c="development",provider:A=E,defaultScopes:y=["openid"]}=e;return re.create({configApi:n,discoveryApi:o,oauthRequestApi:i,provider:A,environment:c,defaultScopes:y})}}var Z=t(12935),_=t(57405),st=t(65461),Mt=t(36017),Wt=t(99303),Vt=t(39837);const ie=(0,ut.y)({id:"core.storage"});var Me=t(70795),pe=t(16009);const te=(0,ut.y)({id:"core.oauthrequest"});var ee=t(96824),ye=t(70835),nn=t(10288),hn=t.n(nn),ue=t(20938),Ft=t(46195),$e=t(54241),Ln=t(13646);const pn=Ft.z.lazy(()=>Ft.z.object({rule:Ft.z.string(),resourceType:Ft.z.string(),params:Ft.z.record(Ft.z.any()).optional()}).or(Ft.z.object({anyOf:Ft.z.array(pn).nonempty()})).or(Ft.z.object({allOf:Ft.z.array(pn).nonempty()})).or(Ft.z.object({not:pn}))),as=Ft.z.object({result:Ft.z.literal($e.b.ALLOW).or(Ft.z.literal($e.b.DENY))}),is=Ft.z.object({result:Ft.z.array(Ft.z.union([Ft.z.literal($e.b.ALLOW),Ft.z.literal($e.b.DENY)]))}),cs=Ft.z.union([Ft.z.object({result:Ft.z.literal($e.b.ALLOW).or(Ft.z.literal($e.b.DENY))}),Ft.z.object({result:Ft.z.literal($e.b.CONDITIONAL),pluginId:Ft.z.string(),resourceType:Ft.z.string(),conditions:pn})]),Hs=(r,e)=>Ft.z.object({items:Ft.z.array(Ft.z.intersection(Ft.z.object({id:Ft.z.string()}),r)).refine(n=>n.length===e.size&&n.every(({id:o})=>e.has(o)),{message:"Items in response do not match request"})});class ls{enabled;discovery;enableBatchedRequests;constructor(e){this.discovery=e.discovery,this.enabled=e.config.getOptionalBoolean("permission.enabled")??!1,this.enableBatchedRequests=e.config.getOptionalBoolean("permission.EXPERIMENTAL_enableBatchedRequests")??!1}async authorize(e,n){return this.enabled?this.enableBatchedRequests?this.makeBatchedRequest(e,n):this.makeRequest(e,as,n):e.map(o=>({result:$e.b.ALLOW}))}async authorizeConditional(e,n){return this.enabled?this.makeRequest(e,cs,n):e.map(o=>({result:$e.b.ALLOW}))}async makeRequest(e,n,o){const i={items:e.map(y=>({id:ue.A(),...y}))},A=(await this.makeRawRequest(i,n,o)).items.reduce((y,w)=>(y[w.id]=w,y),{});return i.items.map(y=>A[y.id])}async makeBatchedRequest(e,n){const o={};for(const A of e){const{permission:y,resourceRef:w}=A;(0,Ln.OL)(y)?(o[y.name]||={permission:y,resourceRef:[],id:ue.A()},w&&o[y.name].resourceRef?.push(w)):o[y.name]||={permission:y,id:ue.A()}}const c=(await this.makeRawRequest({items:Object.values(o)},is,n)).items.reduce((A,y)=>(A[y.id]=y,A),{});return e.map(A=>{const{id:y}=o[A.permission.name],w=c[y];return{result:A.resourceRef?w.result.shift():w.result[0]}})}async makeRawRequest(e,n,o){const i=await this.discovery.getBaseUrl("permission"),c=await hn()(`${i}/authorize`,{method:"POST",body:JSON.stringify(e),headers:{...this.getAuthorizationHeader(o?.token),"content-type":"application/json"}});if(!c.ok)throw await ye.o.fromResponse(c);const A=await c.json();return Hs(n,new Set(e.items.map(({id:y})=>y))).parse(A)}getAuthorizationHeader(e){return e?{Authorization:`Bearer ${e}`}:{}}}class Cn{permissionClient;identityApi;constructor(e,n){this.permissionClient=e,this.identityApi=n}static create(e){const{config:n,discovery:o,identity:i}=e,c=new ls({discovery:o,config:n});return new Cn(c,i)}async authorize(e){return(await this.permissionClient.authorize([e],await this.identityApi.getCredentials()))[0]}}const ds=[(0,Z.b)({api:_.I,deps:{configApi:st.U},factory:({configApi:r})=>X.fromConfig(r)}),(0,Z.b)({api:Mt.k,deps:{},factory:()=>new G}),(0,Z.b)({api:Wt.c,deps:{},factory:()=>new Q}),(0,Z.b)({api:Vt.m,deps:{alertApi:Mt.k},factory:({alertApi:r})=>{const e=new J(r,new it);return ht.forward(e,{hidden:!1}),e}}),(0,Z.b)({api:ie,deps:{errorApi:Vt.m},factory:({errorApi:r})=>At.create({errorApi:r})}),(0,Z.b)({api:Me.a,deps:{configApi:st.U,identityApi:pe.K,discoveryApi:_.I},factory:({configApi:r,identityApi:e,discoveryApi:n})=>Ot({middleware:[wt.resolvePluginProtocol({discoveryApi:n}),wt.injectIdentityAuth({identityApi:e,config:r})]})}),(0,Z.b)({api:te,deps:{},factory:()=>new et}),(0,Z.b)({api:Nt,deps:{discoveryApi:_.I,oauthRequestApi:te,configApi:st.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>Te.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,Z.b)({api:Qt,deps:{discoveryApi:_.I,oauthRequestApi:te,configApi:st.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>ae.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,Z.b)({api:Kt,deps:{discoveryApi:_.I,oauthRequestApi:te,configApi:st.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>qe.create({configApi:n,discoveryApi:r,oauthRequestApi:e,defaultScopes:["read:user"],environment:n.getOptionalString("auth.environment")})}),(0,Z.b)({api:Xt,deps:{discoveryApi:_.I,oauthRequestApi:te,configApi:st.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>un.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,Z.b)({api:kt,deps:{discoveryApi:_.I,oauthRequestApi:te,configApi:st.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>Ke.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,Z.b)({api:jt,deps:{discoveryApi:_.I,oauthRequestApi:te,configApi:st.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>Ze.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,Z.b)({api:Ht,deps:{discoveryApi:_.I,oauthRequestApi:te,configApi:st.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>Ue.create({configApi:n,discoveryApi:r,oauthRequestApi:e,defaultScopes:["account"],environment:n.getOptionalString("auth.environment")})}),(0,Z.b)({api:le,deps:{discoveryApi:_.I,oauthRequestApi:te,configApi:st.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>an.create({configApi:n,discoveryApi:r,oauthRequestApi:e,defaultScopes:["REPO_READ"],environment:n.getOptionalString("auth.environment")})}),(0,Z.b)({api:he,deps:{discoveryApi:_.I,oauthRequestApi:te,configApi:st.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>l.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,Z.b)({api:zt,deps:{discoveryApi:_.I,oauthRequestApi:te,configApi:st.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>R.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,Z.b)({api:ee.x,deps:{discovery:_.I,identity:pe.K,config:st.U},factory:({config:r,discovery:e,identity:n})=>Cn.create({config:r,discovery:e,identity:n})})];var Mn=t(14451),Bn=t(27799),jn=t(94389),us=t(20947),hs=t(20473),Un=t(45917),ps=t(39347),$n=t(63309),gn=t(82451),gs=t(85121),Fn=t(17400),fs=t(42226),ms=t(69550),Nn=t(52755),kn=t(89350),ys=t(8911),bn=t(33602),Sn=t(48108),vs=t(77225),Wn=t(55700),Kn=t(71865),Es=t(80109),As=t(15303),xs=t(39330);const Cs={brokenImage:Bn.A,catalog:ys.A,scaffolder:us.A,techdocs:hs.A,search:Un.A,chat:ps.A,dashboard:$n.A,docs:gn.A,email:gs.A,github:fs.A,group:bn.A,help:ms.A,"kind:api":Fn.A,"kind:component":kn.A,"kind:domain":Mn.A,"kind:group":bn.A,"kind:location":Nn.A,"kind:system":jn.A,"kind:user":Sn.A,"kind:resource":Wn.A,"kind:template":Kn.A,user:Sn.A,warning:vs.A,star:Es.A,unstarred:As.A,externalLink:xs.A};var bs=t(58733),Ss=t(55288),Os=t(91360),Ps=t(50868),Ts=t(12285),ws=t(87271),Rs=t(64636);Rs.A.configure(r=>`v5-${r}`);const zn=(0,Ss.A)({productionPrefix:"jss4-"});function Hn(r){const{children:e,theme:n,noCssBaseline:o=!1}=r,i=n.getTheme("v4"),c=n.getTheme("v5");let A;o||(A=(0,a.jsx)(bs.Ay,{}));let y=(0,a.jsxs)(a.Fragment,{children:[A,e]});return i&&(y=(0,a.jsx)(Os.Ay,{generateClassName:zn,children:(0,a.jsx)(Ps.A,{theme:i,children:y})})),c&&(y=(0,a.jsx)(Ts.A,{injectFirst:!0,children:(0,a.jsx)(ws.A,{theme:c,children:y})})),y}const Vn={light:{type:"light",mode:"light",background:{default:"#F8F8F8",paper:"#FFFFFF"},status:{ok:"#1DB954",warning:"#FF9800",error:"#E22134",running:"#1F5493",pending:"#FFED51",aborted:"#757575"},bursts:{fontColor:"#FEFEFE",slackChannelText:"#ddd",backgroundColor:{default:"#7C3699"},gradient:{linear:"linear-gradient(-137deg, #4BB8A5 0%, #187656 100%)"}},primary:{main:"#1F5493"},banner:{info:"#2E77D0",error:"#E22134",text:"#FFFFFF",link:"#000000",closeButtonColor:"#FFFFFF",warning:"#FF9800"},border:"#E6E6E6",textContrast:"#000000",textVerySubtle:"#DDD",textSubtle:"#6E6E6E",highlight:"#FFFBCC",errorBackground:"#FFEBEE",warningBackground:"#F59B23",infoBackground:"#ebf5ff",errorText:"#CA001B",infoText:"#004e8a",warningText:"#000000",linkHover:"#2196F3",link:"#0A6EBE",gold:"#FFD600",navigation:{background:"#171717",indicator:"#9BF0E1",color:"#b5b5b5",selectedColor:"#FFF",navItem:{hoverBackground:"#404040"},submenu:{background:"#404040"}},pinSidebarButton:{icon:"#181818",background:"#BDBDBD"},tabbar:{indicator:"#9BF0E1"}},dark:{type:"dark",mode:"dark",background:{default:"#333333",paper:"#424242"},status:{ok:"#71CF88",warning:"#FFB84D",error:"#F84C55",running:"#3488E3",pending:"#FEF071",aborted:"#9E9E9E"},bursts:{fontColor:"#FEFEFE",slackChannelText:"#ddd",backgroundColor:{default:"#7C3699"},gradient:{linear:"linear-gradient(-137deg, #4BB8A5 0%, #187656 100%)"}},primary:{main:"#9CC9FF",dark:"#82BAFD"},secondary:{main:"#FF88B2"},banner:{info:"#2E77D0",error:"#E22134",text:"#FFFFFF",link:"#000000",closeButtonColor:"#FFFFFF",warning:"#FF9800"},border:"#E6E6E6",textContrast:"#FFFFFF",textVerySubtle:"#727272",textSubtle:"#CCCCCC",highlight:"#FFFBCC",errorBackground:"#FFEBEE",warningBackground:"#F59B23",infoBackground:"#ebf5ff",errorText:"#CA001B",infoText:"#004e8a",warningText:"#000000",linkHover:"#82BAFD",link:"#9CC9FF",gold:"#FFD600",navigation:{background:"#424242",indicator:"#9BF0E1",color:"#b5b5b5",selectedColor:"#FFF",navItem:{hoverBackground:"#404040"},submenu:{background:"#404040"}},pinSidebarButton:{icon:"#404040",background:"#BDBDBD"},tabbar:{indicator:"#9BF0E1"}}};var Is=t(98392),Ds=t(17161);const we={wave:`url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='1368' height='400' fill='none'%3e%3cmask id='a' width='1368' height='401' x='0' y='0' maskUnits='userSpaceOnUse'%3e%3cpath fill='url(%23paint0_linear)' d='M437 116C223 116 112 0 112 0h1256v400c-82 0-225-21-282-109-112-175-436-175-649-175z'/%3e%3cpath fill='url(%23paint1_linear)' d='M1368 400V282C891-29 788 40 711 161 608 324 121 372 0 361v39h1368z'/%3e%3cpath fill='url(%23paint2_linear)' d='M1368 244v156H0V94c92-24 198-46 375 0l135 41c176 51 195 109 858 109z'/%3e%3cpath fill='url(%23paint3_linear)' d='M1252 400h116c-14-7-35-14-116-16-663-14-837-128-1013-258l-85-61C98 28 46 8 0 0v400h1252z'/%3e%3c/mask%3e%3cg mask='url(%23a)'%3e%3cpath fill='white' d='M-172-98h1671v601H-172z'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient id='paint0_linear' x1='602' x2='1093.5' y1='-960.5' y2='272' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint1_linear' x1='482' x2='480' y1='1058.5' y2='70.5' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint2_linear' x1='424' x2='446.1' y1='-587.5' y2='274.6' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint3_linear' x1='587' x2='349' y1='-1120.5' y2='341' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e")`,wave2:`url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='1368' height='400' fill='none'%3e%3cmask id='a' width='1764' height='479' x='-229' y='-6' maskUnits='userSpaceOnUse'%3e%3cpath fill='url(%23paint0_linear)' d='M0 400h1350C1321 336 525 33 179-2c-345-34-395 236-408 402H0z'/%3e%3cpath fill='url(%23paint1_linear)' d='M1378 177v223H0V217s219 75 327 52C436 246 717-35 965 45s254 144 413 132z'/%3e%3cpath fill='url(%23paint2_linear)' d='M26 400l-78-16c-170 205-44-6-137-30l-4-1 4 1 137 30c37-45 89-110 159-201 399-514-45 238 1176-50 275-65 354-39 91 267H26z'/%3e%3c/mask%3e%3cg mask='url(%23a)'%3e%3cpath fill='white' d='M0 0h1368v400H0z'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient id='paint0_linear' x1='431' x2='397.3' y1='-599' y2='372.8' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint1_linear' x1='236.5' x2='446.6' y1='-586' y2='381.5' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint2_linear' x1='851.8' x2='640.4' y1='-867.2' y2='363.7' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e")`,round:`url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='1368' height='400' fill='none'%3e%3cmask id='a' width='2269' height='1408' x='-610' y='-509' maskUnits='userSpaceOnUse'%3e%3ccircle cx='1212.8' cy='74.8' r='317.5' fill='url(%23paint0_linear)' transform='rotate(-52 1213 75)'/%3e%3ccircle cx='737.8' cy='445.8' r='317.5' fill='url(%23paint1_linear)' transform='rotate(-116 738 446)'/%3e%3ccircle cx='601.8' cy='52.8' r='418.6' fill='url(%23paint2_linear)' transform='rotate(-117 602 53)'/%3e%3ccircle cx='999.8' cy='364' r='389.1' fill='url(%23paint3_linear)' transform='rotate(31 1000 364)'/%3e%3cellipse cx='-109.2' cy='263.5' fill='url(%23paint4_linear)' rx='429.2' ry='465.8' transform='rotate(-85 -109 264)'/%3e%3c/mask%3e%3cg mask='url(%23a)'%3e%3cpath fill='white' d='M0 0h1368v400H0z'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient id='paint0_linear' x1='1301.2' x2='161.4' y1='-1879.7' y2='-969.6' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint1_linear' x1='826.2' x2='-313.6' y1='-1508.7' y2='-598.6' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint2_linear' x1='718.4' x2='-784.3' y1='-2524' y2='-1324.2' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint3_linear' x1='1108.2' x2='-288.6' y1='-2031.1' y2='-915.9' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint4_linear' x1='10.4' x2='-1626.5' y1='-2603.8' y2='-1399.5' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e")`},Fe={darkGrey:["#171717","#383838"],marineBlue:["#006D8F","#0049A1"],veryBlue:["#0027AF","#270094"],rubyRed:["#98002B","#8D1134"],toastyOrange:["#BE2200","#A41D00"],purpleSky:["#8912CA","#3E00EA"],eveningSea:["#00FFF2","#035355"],teal:["#005B4B"],pinkSea:["#C8077A","#C2297D"],greens:["#4BB8A5","#187656"]};function Re(r){const{colors:e,shape:n,options:o}=r,c=`linear-gradient(90deg, ${(e.length===1?[e[0],e[0]]:e).join(", ")})`,A=`${n}, ${c}`,y=o?.fontColor??"#FFFFFF";return{colors:e,shape:n,backgroundImage:A,fontColor:y}}const Ls={home:Re({colors:Fe.teal,shape:we.wave}),documentation:Re({colors:Fe.pinkSea,shape:we.wave2}),tool:Re({colors:Fe.purpleSky,shape:we.round}),service:Re({colors:Fe.marineBlue,shape:we.wave}),website:Re({colors:Fe.veryBlue,shape:we.wave}),library:Re({colors:Fe.rubyRed,shape:we.wave}),other:Re({colors:Fe.darkGrey,shape:we.wave}),app:Re({colors:Fe.toastyOrange,shape:we.wave}),apis:Re({colors:Fe.teal,shape:we.wave2}),card:Re({colors:Fe.greens,shape:we.wave})},Gn=16,Yn='"Helvetica Neue", Helvetica, Roboto, Arial, sans-serif',Vs="home",m={htmlFontSize:Gn,fontFamily:Yn,h1:{fontSize:54,fontWeight:700,marginBottom:10},h2:{fontSize:40,fontWeight:700,marginBottom:8},h3:{fontSize:32,fontWeight:700,marginBottom:6},h4:{fontWeight:700,fontSize:28,marginBottom:6},h5:{fontWeight:700,fontSize:24,marginBottom:4},h6:{fontWeight:700,fontSize:20,marginBottom:2}};function L(r){const{palette:e,htmlFontSize:n=Gn,fontFamily:o=Yn,defaultPageTheme:i=Vs,pageTheme:c=Ls,typography:A}=r;if(!c[i])throw new Error(`${i} is not defined in pageTheme.`);return m.htmlFontSize=n,m.fontFamily=o,{palette:e,typography:A??m,page:c[i],getPageTheme:({themeId:y})=>c[y]??c[i]}}var j=t(80012);const N={MuiCssBaseline:{styleOverrides:r=>({html:{height:"100%",fontFamily:r.typography.fontFamily},body:{height:"100%",fontFamily:r.typography.fontFamily,overscrollBehaviorY:"none",fontSize:"0.875rem",lineHeight:1.43,"&::-webkit-scrollbar, & *::-webkit-scrollbar":{backgroundColor:r.palette.background.paper,width:"1em"},"&::-webkit-scrollbar-thumb, & *::-webkit-scrollbar-thumb":{borderRadius:8,backgroundColor:r.palette.textVerySubtle,border:`3px solid ${r.palette.background.paper}`},"&::-webkit-scrollbar-thumb:active, & *::-webkit-scrollbar-thumb:active":{backgroundColor:r.palette.mode==="dark"?(0,j.a)(r.palette.textVerySubtle,.2):(0,j.e$)(r.palette.textVerySubtle,.2)},"&::-webkit-scrollbar-thumb:hover, & *::-webkit-scrollbar-thumb:hover":{backgroundColor:r.palette.mode==="dark"?(0,j.a)(r.palette.textVerySubtle,.2):(0,j.e$)(r.palette.textVerySubtle,.2)}},a:{color:"inherit",textDecoration:"none"}})},MuiGrid:{defaultProps:{spacing:2}},MuiSwitch:{defaultProps:{color:"primary"}},MuiTableRow:{styleOverrides:{root:({theme:r})=>({"&:nth-of-type(odd)":{backgroundColor:r.palette.background.default}}),hover:{"&:hover":{cursor:"pointer"}},head:({theme:r})=>({"&:nth-of-type(odd)":{backgroundColor:r.palette.background.paper}})}},MuiTableCell:{styleOverrides:{root:({theme:r})=>({wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:r.spacing(3,2,3,2.5),borderBottom:0}),sizeSmall:({theme:r})=>({padding:r.spacing(1.5,2,1.5,2.5)}),head:({theme:r})=>({wordBreak:"break-word",overflow:"hidden",color:r.palette.textSubtle,fontWeight:"normal",lineHeight:"1"})}},MuiTabs:{styleOverrides:{root:{minHeight:24}}},MuiTab:{styleOverrides:{root:({theme:r})=>({color:r.palette.link,minHeight:24,textTransform:"initial",letterSpacing:"0.07em","&:hover":{color:(0,j.e$)(r.palette.link,.3),background:(0,j.a)(r.palette.link,.95)},[r.breakpoints.up("md")]:{minWidth:120,fontSize:r.typography.pxToRem(14),fontWeight:500}}),textColorPrimary:({theme:r})=>({color:r.palette.link})}},MuiTableSortLabel:{styleOverrides:{root:{color:"inherit","&:hover":{color:"inherit"},"&:focus":{color:"inherit"},"&:focus svg":{opacity:.5},"&.Mui-active":{fontWeight:"bold",color:"inherit"}}}},MuiListItemText:{styleOverrides:{dense:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}}},MuiButton:{styleOverrides:{text:{padding:void 0}}},MuiChip:{styleOverrides:{root:({theme:r})=>({marginRight:r.spacing(1),marginBottom:r.spacing(1)}),label:({theme:r})=>({lineHeight:r.spacing(2.5),fontWeight:r.typography.fontWeightMedium,fontSize:r.spacing(1.75)}),labelSmall:({theme:r})=>({fontSize:r.spacing(1.5)}),deleteIcon:({theme:r})=>({width:r.spacing(3),height:r.spacing(3),margin:r.spacing(0,.75,0,-.75)}),deleteIconSmall:({theme:r})=>({width:r.spacing(2),height:r.spacing(2),margin:r.spacing(0,.5,0,-.5)})}},MuiCard:{styleOverrides:{root:{display:"flex",flexDirection:"column"}}},MuiCardHeader:{styleOverrides:{root:{paddingBottom:0}}},MuiCardContent:{styleOverrides:{root:{flexGrow:1,"&:last-child":{paddingBottom:void 0}}}},MuiCardActions:{styleOverrides:{root:{justifyContent:"flex-end"}}},MuiLink:{defaultProps:{underline:"hover"}},MuiPaper:{styleOverrides:{root:{backgroundImage:"unset"}}}},W=r=>(...e)=>{const n=e.length===0?[1]:e,o=(i,c)=>typeof i=="string"?i:c*i;return n.map(i=>{const c=o(i,r);return typeof c=="number"?`${c}px`:c}).join(" ")};function q(r,e){if(!e||typeof e=="string")return;const n=typeof e=="function"?e(r):e;if(n)return{"@global":n}}function rt(r,e){if(!(!e||typeof e=="string")){if(typeof e=="object"){const n={...r},o=r.spacing(1);return typeof o=="number"&&(n.spacing=W(o)),Object.fromEntries(Object.entries(e).map(([i,c])=>typeof c=="function"?[i,c({theme:n})]:[i,c]))}return e}}const Pt=/^&.Mui-([\w-]+)$/;function It(r){let e=r;if(!r||typeof r!="object")return e;for(const n of Object.keys(r)){const o=r[n];if(!(!o||typeof o!="object"))for(const i of Object.keys(o)){const c=i,A=c.match(Pt);if(A){const[,y]=A,{[c]:w,...F}=o;w&&(e={...e,[n]:F,[y]:w})}}}return e}function Ut(r,e={}){const n={},o={};for(const i of Object.keys(e)){const c=e[i];c&&("styleOverrides"in c&&(i==="MuiCssBaseline"?n[i]=q(r,c.styleOverrides):n[i]=It(rt(r,c.styleOverrides))),"defaultProps"in c&&(o[i]=c.defaultProps))}return{overrides:n,props:o}}class Lt{#t=new Map;constructor(e,n){this.#t=new Map,e&&this.#t.set("v4",e),n&&this.#t.set("v5",n)}getTheme(e){return this.#t.get(e)}}function $t(r){const e=L(r),n={...N,...r.components},o=(0,Ds.A)({...e,components:n}),i=Ut(o,n),c={...(0,Is.A)(e),...i};return new Lt(c,o)}function qt(r){const e=adaptV4Theme(r),n=createTheme(r);return new Lt(n,createV5Theme(e))}const ge={light:$t({palette:Vn.light}),dark:$t({palette:Vn.dark})};var Gt=t(75962),_t=t(87145);const Ee=[{id:"light",title:"Light Theme",variant:"light",icon:(0,a.jsx)(_t.A,{}),Provider:({children:r})=>(0,a.jsx)(Hn,{theme:ge.light,children:r})},{id:"dark",title:"Dark Theme",variant:"dark",icon:(0,a.jsx)(Gt.A,{}),Provider:({children:r})=>(0,a.jsx)(Hn,{theme:ge.dark,children:r})}];var ft=t(14041),Zt=t(73466),Jt=t(39067),fe=t.n(Jt);class ne{holders;constructor(...e){this.holders=e}get(e){for(const n of this.holders){const o=n.get(e);if(o)return o}}}var se=t(43836),ce=t(10602);const Ve=(0,se.tK)("api-context"),Se=r=>{const{apis:e,children:n}=r,o=(0,ft.useContext)(Ve)?.atVersion(1),i=o?new ne(e,o):e;return(0,a.jsx)(Ve.Provider,{value:(0,ce.B)({1:i}),children:n})};Se.propTypes={apis:fe().shape({get:fe().func.isRequired}).isRequired,children:fe().node};const fn=/^[a-z][a-z0-9]*(?:[-_][a-z][a-z0-9]*)*$/i;function Ge(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}function sn(r){return typeof r!="object"||r===null?r:Array.isArray(r)?r.map(sn):Object.fromEntries(Object.entries(r).map(([e,n])=>[e,sn(n)]))}function ve(r,e){if(r===null)return;if(r===void 0)return e===void 0?void 0:ve(e);if(typeof r!="object"||Array.isArray(r))return r;const n=Ge(e)?e:{},o={};for(const i of new Set([...Object.keys(r),...Object.keys(n)])){const c=ve(r[i],n[i]);c!==void 0&&(o[i]=c)}return o}function On(r){if(r===null)return"null";if(Array.isArray(r))return"array";const e=typeof r;return e==="number"&&isNaN(r)?"nan":e==="string"&&r===""?"empty-string":e}const Ne={type(r,e,n,o){return`Invalid type in config for key '${r}' in '${e}', got ${n}, wanted ${o}`},missing(r,e){return`Missing required config value at '${r}' in '${e}'`},convert(r,e,n){return`Unable to convert config value for key '${r}' in '${e}' to a ${n}`}};class mn{data;context;fallback;prefix;filteredKeys;notifiedFilteredKeys;static fromConfigs(e){return e.length===0?new mn(void 0):e.reduce((n,{data:o,context:i,filteredKeys:c,deprecatedKeys:A})=>{const y=new mn(o,i,n);if(y.filteredKeys=c,A)for(const{key:w,description:F}of A)console.warn(`The configuration key '${w}' of ${i} is deprecated and may be removed soon. ${F||""}`);return y},void 0)}constructor(e,n="mock-config",o,i=""){this.data=e,this.context=n,this.fallback=o,this.prefix=i,this.notifiedFilteredKeys=new Set}has(e){const n=this.readValue(e);return n===null?!1:n!==void 0?!0:this.fallback?.has(e)??!1}keys(){const e=this.data?Object.keys(this.data):[],n=this.fallback?.keys()??[];return[...new Set([...e,...n])].filter(o=>this.data?.[o]!==null)}get(e){const n=this.getOptional(e);if(n===void 0)throw new Error(Ne.missing(this.fullKey(e??""),this.context));return n}getOptional(e){const n=sn(this.readValue(e)),o=this.fallback?.getOptional(e);if(n!==null)return n===void 0?ve(o):o===void 0?ve(n):ve(n,o)}getConfig(e){const n=this.getOptionalConfig(e);if(n===void 0)throw new Error(Ne.missing(this.fullKey(e),this.context));return n}getOptionalConfig(e){const n=this.readValue(e),o=this.fallback?.getOptionalConfig(e);if(Ge(n))return this.copy(n,e,o);if(n!==null){if(n!==void 0)throw new TypeError(Ne.type(this.fullKey(e),this.context,On(n),"object"));return o}}getConfigArray(e){const n=this.getOptionalConfigArray(e);if(n===void 0)throw new Error(Ne.missing(this.fullKey(e),this.context));return n}getOptionalConfigArray(e){const n=this.readConfigValue(e,o=>{if(!Array.isArray(o))return{expected:"object-array"};for(const[i,c]of o.entries())if(!Ge(c))return{expected:"object-array",value:c,key:`${e}[${i}]`};return!0});if(n)return n.map((o,i)=>this.copy(o,`${e}[${i}]`))}getNumber(e){const n=this.getOptionalNumber(e);if(n===void 0)throw new Error(Ne.missing(this.fullKey(e),this.context));return n}getOptionalNumber(e){const n=this.readConfigValue(e,i=>typeof i=="number"||typeof i=="string"||{expected:"number"});if(typeof n=="number"||n===void 0)return n;const o=Number(n);if(!Number.isFinite(o))throw new Error(Ne.convert(this.fullKey(e),this.context,"number"));return o}getBoolean(e){const n=this.getOptionalBoolean(e);if(n===void 0)throw new Error(Ne.missing(this.fullKey(e),this.context));return n}getOptionalBoolean(e){const n=this.readConfigValue(e,i=>typeof i=="boolean"||typeof i=="number"||typeof i=="string"||{expected:"boolean"});if(typeof n=="boolean"||n===void 0)return n;const o=String(n).trim();if(/^(?:y|yes|true|1|on)$/i.test(o))return!0;if(/^(?:n|no|false|0|off)$/i.test(o))return!1;throw new Error(Ne.convert(this.fullKey(e),this.context,"boolean"))}getString(e){const n=this.getOptionalString(e);if(n===void 0)throw new Error(Ne.missing(this.fullKey(e),this.context));return n}getOptionalString(e){return this.readConfigValue(e,n=>typeof n=="string"&&n!==""||{expected:"string"})}getStringArray(e){const n=this.getOptionalStringArray(e);if(n===void 0)throw new Error(Ne.missing(this.fullKey(e),this.context));return n}getOptionalStringArray(e){return this.readConfigValue(e,n=>{if(!Array.isArray(n))return{expected:"string-array"};for(const[o,i]of n.entries())if(typeof i!="string"||i==="")return{expected:"string-array",value:i,key:`${e}[${o}]`};return!0})}fullKey(e){return`${this.prefix}${this.prefix?".":""}${e}`}copy(e,n,o){const i=new mn(e,this.context,o,this.fullKey(n));return i.filteredKeys=this.filteredKeys,i}readConfigValue(e,n){const o=this.readValue(e);if(o===void 0)return this.fallback?.readConfigValue(e,n);if(o===null)return;const i=n(o);if(i!==!0){const{key:c=e,value:A=o,expected:y}=i;throw new TypeError(Ne.type(this.fullKey(c),this.context,On(A),y))}return o}readValue(e){const n=e?e.split("."):[];for(const i of n)if(!fn.test(i))throw new TypeError(`Invalid config key '${e}'`);if(this.data===void 0)return;let o=this.data;for(const[i,c]of n.entries())if(Ge(o))o=o[c];else if(o!=null){const A=this.fullKey(n.slice(0,i).join("."));throw new TypeError(Ne.type(A,this.context,On(o),"object"))}return o}}const Pn="theme";class Qn{themes;static createWithStorage(e){const n=new Qn(e);if(!window.localStorage)return n;const o=window.localStorage.getItem(Pn)??void 0;return n.setActiveThemeId(o),n.activeThemeId$().subscribe(i=>{i?window.localStorage.setItem(Pn,i):window.localStorage.removeItem(Pn)}),window.addEventListener("storage",i=>{if(i.key===Pn){const c=localStorage.getItem(Pn)??void 0;n.setActiveThemeId(c)}}),n}activeThemeId;subject;constructor(e){this.themes=e,this.subject=new lt(void 0)}getInstalledThemes(){return this.themes.slice()}activeThemeId$(){return this.subject}getActiveThemeId(){return this.activeThemeId}setActiveThemeId(e){this.activeThemeId=e,this.subject.next(e)}}var yn=t(63636);function Gs(r){if(r.length<3)throw new Error(`The '${r}' feature flag must have a minimum length of three characters.`);if(r.length>150)throw new Error(`The '${r}' feature flag must not exceed 150 characters.`);if(!r.match(/^[a-z]+[a-z0-9-]+$/))throw new Error(`The '${r}' feature flag must start with a lowercase letter and only contain lowercase letters, numbers and hyphens. Examples: feature-flag-one, alpha, release-2020`)}class Wr{registeredFeatureFlags=[];flags;registerFlag(e){Gs(e.name),this.registeredFeatureFlags.push(e)}getRegisteredFlags(){return this.registeredFeatureFlags.slice()}isActive(e){return this.flags||(this.flags=this.load()),this.flags.get(e)===yn.S.Active}save(e){this.flags||(this.flags=this.load()),e.merge||this.flags.clear();for(const[o,i]of Object.entries(e.states))this.flags.set(o,i);const n=Array.from(this.flags.entries()).filter(([,o])=>o===yn.S.Active);window.localStorage.setItem("featureFlags",JSON.stringify(Object.fromEntries(n)))}load(){try{const e=window.localStorage.getItem("featureFlags");if(!e)return new Map;const n=JSON.parse(e);if(typeof n!="object"||n===null||Array.isArray(n))return new Map;const o=Object.entries(n).filter(([i,c])=>(Gs(i),c===yn.S.Active));return new Map(o)}catch{return new Map}}}const Zn=(0,ut.y)({id:"core.apptheme"}),Ys=(0,ut.y)({id:"core.applanguage"});var Kr=t(56038),Qs=function(r){return r[r.default=10]="default",r[r.app=50]="app",r[r.static=100]="static",r}(Qs||{});class zr{factories=new Map;register(e,n){const o=Qs[e],i=this.factories.get(n.api.id);return i&&i.priority>=o?!1:(this.factories.set(n.api.id,{priority:o,factory:n}),!0)}get(e){const n=this.factories.get(e.id);if(n)return n.factory}getAllApis(){const e=new Set;for(const{factory:n}of this.factories.values())e.add(n.api);return e}}class Ms{factories;static validateFactories(e,n){for(const o of n){const i=[o],c=new Set;for(;i.length;){const A=i.shift(),y=e.get(A);if(y)for(const w of Object.values(y.deps)){if(w.id===o.id)throw new Error(`Circular dependency of api factory for ${o}`);c.has(w)||(c.add(w),i.push(w))}}}}apis;constructor(e){this.factories=e,this.apis=new Map}get(e){return this.load(e)}load(e,n=[]){const o=this.apis.get(e.id);if(o)return o;const i=this.factories.get(e);if(!i)return;if(n.includes(i.api))throw new Error(`Circular dependency of api factory for ${i.api}`);const c=this.loadDeps(e,i.deps,[...n,i.api]),A=i.factory(c);return this.apis.set(e.id,A),A}loadDeps(e,n,o){const i={};for(const c in n)if(n.hasOwnProperty(c)){const A=n[c],y=this.load(A,o);if(!y)throw new Error(`No API factory available for dependency ${A} of dependent ${e}`);i[c]=y}return i}}function Hr(r){const e={};for(const o in r.collectors)r.collectors.hasOwnProperty(o)&&(e[o]=r.collectors[o]());const n=[{node:ft.Children.toArray(r.root),parent:void 0,contexts:{}}];for(;n.length!==0;){const{node:o,parent:i,contexts:c}=n.shift();ft.Children.forEach(o,A=>{if(!(0,ft.isValidElement)(A))return;const y={};for(const w in e)if(e.hasOwnProperty(w)){const F=e[w];y[w]=F.visit(F.accumulator,A,i,c[w])}for(const w of r.discoverers){const F=w(A);F&&n.push({node:F,parent:A,contexts:y})}})}return Object.fromEntries(Object.entries(e).map(([o,i])=>[o,i.accumulator]))}function Jn(r,e){return()=>({accumulator:r(),visit:e})}function Vr(r){return r.props?.children}function Gr(r){if(r.props?.path&&r.props?.element)return r.props?.element}var Oe=t(19402);const Yr=Jn(()=>new Set,(r,e)=>{const n=(0,Oe.E)(e,"core.plugin");n&&r.add(n)});var Tn=t(72427);const Zs=r=>{const{children:e}=r,n=(0,Tn.gf)(yn.B),o="with"in r?n.isActive(r.with):!n.isActive(r.without);return(0,a.jsx)(a.Fragment,{children:o?e:null})};(0,Oe.h)(Zs,"core.featureFlagged",!0);const Xn={caseSensitive:!1,path:"*",element:"match-all",routeRefs:new Set,plugins:new Set};function _n(r){const e=r;return e?.type?e.type.displayName??e.type.name??String(e.type):String(e)}const Js=r=>{const e=new Set;return r&&e.add(r),e};function Xs(r,e=new Array){return ft.Children.forEach(r,n=>{if(!(0,ft.isValidElement)(n))return;const o=(0,Oe.E)(n,"core.mountPoint");if(o){const i=(0,Oe.E)(n,"core.plugin");e.push({routeRef:o,plugin:i})}Xs(n.props.children,e)}),e}const Qr=Jn(()=>({paths:new Map,parents:new Map,objects:new Array}),(r,e,n,o)=>{if(o?.isElementAncestor)return o;if(n?.props.element===e)return{...o,isElementAncestor:!0};const i=e.props?.path,c=(0,Oe.E)(e,"core.mountPoint");if(c&&i)throw new Error(`Path property may not be set directly on a routable extension "${_n(e)}"`);const A=o?.obj?.children??r.objects;if(i!==void 0){if(typeof i!="string")throw new Error(`Element path must be a string at "${_n(e)}"`);const y=i.startsWith("/")?i.slice(1):i,w=e.props.element;if((0,Oe.E)(e,"core.gatherMountPoints")){if(w)throw new Error(`Mount point gatherers may not have an element prop "${_n(e)}"`);const F={path:y,element:"gathered",routeRefs:new Set,caseSensitive:!!e.props?.caseSensitive,children:[Xn],plugins:new Set};return A.push(F),{obj:F,gatherPath:y,routeRef:o?.routeRef,gatherRouteRef:o?.routeRef}}if(w){const[F,...tt]=Xs(w);if(tt.length>0)throw new Error(`Route element with path "${i}" may not contain multiple routable extensions`);if(!F)return o;const{routeRef:mt,plugin:St}=F,Tt={path:y,element:"mounted",routeRefs:new Set([mt]),caseSensitive:!!e.props?.caseSensitive,children:[Xn],plugins:Js(St)};return A.push(Tt),r.paths.set(mt,y),r.parents.set(mt,o?.routeRef),{obj:Tt,routeRef:mt??o?.routeRef,gatherPath:y,gatherRouteRef:o?.gatherRouteRef}}}if(c){if(o?.gatherPath===void 0)throw new Error(`Routable extension "${_n(e)}" with mount point "${c}" must be assigned a path`);o?.obj?.routeRefs.add(c);const y=(0,Oe.E)(e,"core.plugin");return y&&o?.obj?.plugins.add(y),r.paths.set(c,o.gatherPath),r.parents.set(c,o?.gatherRouteRef),{...o,routeRef:c}}return o}),Zr=Jn(()=>({paths:new Map,parents:new Map,objects:new Array}),(r,e,n,o)=>{if(n?.props.element===e)return o;let i=o?.obj,c=o?.routeRef,A=o?.sticky;const y=e.props?.path,w=i?.children??r.objects,F=!!e.props?.caseSensitive;let tt=o?.path;if((0,Oe.E)(e,"core.gatherMountPoints")){if(!y)throw new Error("Mount point gatherer must have a path");tt=y}const mt=e.props?.element;let St=(0,Oe.E)(e,"core.mountPoint");if(!St&&(0,ft.isValidElement)(mt)&&(St=(0,Oe.E)(mt,"core.mountPoint")),St){let Dt=y;if(tt&&(Dt?tt=void 0:Dt=tt),!Dt)throw new Error("Mounted routable extension must have a path");r.paths.set(St,Dt),c&&A?(r.parents.set(St,c),y&&(c=St,A=!1)):(r.parents.set(St,c),c=St),y?(i={caseSensitive:F,path:y,element:"mounted",routeRefs:new Set([St]),children:[Xn],plugins:Js((0,Oe.E)(e.props.element,"core.plugin"))},w.push(i)):i?.routeRefs.add(St)}if((0,Oe.E)(e,"core.gatherMountPoints")&&(A=!0),(0,Oe.E)(e,"core.gatherMountPoints")){if(!y)throw new Error("Mount point gatherer must have a path");St||(i={caseSensitive:F,path:y,element:"gathered",routeRefs:new Set,children:[Xn],plugins:o?.obj?.plugins||new Set},w.push(i))}return{obj:i,path:tt,routeRef:c,sticky:A}}),Jr=Jn(()=>new Set,(r,e)=>{if(e.type===Zs){const n=e.props;r.add("with"in n?n.with:n.without)}});var wn=t(21613),Xr=t(63544);const Rn=(0,Xr.Q)("route-ref-type",()=>Symbol("route-ref-type"));function _s(r){return r[Rn]==="absolute"}function qs(r){return r[Rn]==="sub"}function _r(r){return r[Rn]==="external"}function qn(...r){const e=r.join("/").replace(/\/\/+/g,"/");return e!=="/"&&e.endsWith("/")?e.slice(0,-1):e}var qr=t(46155),to=t.n(qr);function eo(r,e,n){let o,i="";if(_s(r))o=r;else if(qs(r))o=r.parent,i=r.path;else if(_r(r)){const y=n.get(r);if(!y)return[void 0,""];if(_s(y))o=y;else if(qs(y))o=y.parent,i=y.path;else throw new Error(`ExternalRouteRef was bound to invalid target, ${y}`)}else throw r[Rn]?new Error(`Unknown or invalid route ref type, ${r[Rn]}`):new Error(`Unknown object passed to useRouteRef, got ${r}`);if(!o)return[void 0,""];const c=e.get(o);if(c===void 0)return[void 0,""];const A=qn(c,i);return[o,A]}function no(r,e,n,o,i){const c=(0,wn.ue)(i,e)??[],A=Array();let y=-1;for(let tt=r;tt&&(y=c.findIndex(mt=>mt.route.routeRefs.has(tt)),y===-1);tt=o.get(tt))A.unshift(tt);A.length===0&&(y-=1);const w=y===-1?"":c[y].pathname,F=A.slice(0,-1).map(tt=>{const mt=n.get(tt);if(mt===void 0)throw new Error(`No path for ${tt}`);if(mt.includes(":"))throw new Error(`Cannot route to ${r} with parent ${tt} as it has parameters`);return mt});return`${qn(w,...F)}/`}class so{routePaths;routeParents;routeObjects;routeBindings;appBasePath;constructor(e,n,o,i,c){this.routePaths=e,this.routeParents=n,this.routeObjects=o,this.routeBindings=i,this.appBasePath=c}resolve(e,n){const[o,i]=eo(e,this.routePaths,this.routeBindings);if(!o)return;let c;typeof n=="string"?c=this.trimPath(n):n.pathname?c={...n,pathname:this.trimPath(n.pathname)}:c=n;const A=this.appBasePath+no(o,c,this.routePaths,this.routeParents,this.routeObjects);return(...[w])=>{const F=w&&to()(w,tt=>typeof tt=="string"?tt.replaceAll(/[&?#;\/]/g,mt=>encodeURIComponent(mt)):tt);return qn(A,(0,wn.tW)(i,F))}}trimPath(e){return e&&(e.startsWith(this.appBasePath)?e.slice(this.appBasePath.length):e)}}const ro=(0,se.tK)("routing-context"),oo=({routePaths:r,routeParents:e,routeObjects:n,routeBindings:o,basePath:i="",children:c})=>{const A=new so(r,e,n,o,i),y=(0,ce.B)({1:A});return(0,a.jsx)(ro.Provider,{value:y,children:c})};function ao(r,e){const n=new Set(e.values());n.delete(void 0);for(const o of e.keys()){if(n.has(o))continue;let i=o,c="";for(;i;){const y=r.get(i);if(y===void 0)throw new Error(`No path for ${i}`);c=qn(y,c),i=e.get(i)}const A=c.match(/:(\w+)/g);if(A){for(let y=0;y<A.length;y++)for(let w=y+1;w<A.length;w++)if(A[w]===A[y])throw new Error(`Parameter ${A[w]} is duplicated in path ${c}`)}}}function io(r,e){for(const n of e)if(n.externalRoutes){for(const[o,i]of Object.entries(n.externalRoutes))if(!i.optional&&!r.has(i))throw new Error(`External route '${o}' of the '${n.getId()}' plugin must be bound to a target route. See https://backstage.io/link?bind-routes for details.`)}}const co=(0,se.tK)("app-context"),lo=({appContext:r,children:e})=>{const n=(0,ce.B)({1:r});return(0,a.jsx)(co.Provider,{value:n,children:e})},tr="app",uo=`${tr}-auth-cookie-expires-at`,ho=5*6e4,er=5e3,po=2,go=5*6e4;function fo({discoveryApi:r,fetchApi:e,errorApi:n}){let o=!1,i,c=!0,A=er;const y="BroadcastChannel"in window?new BroadcastChannel(uo):void 0,w=St=>{const Tt=(1+3*Math.random())*6e4;return Math.max(St-Date.now(),ho)-Tt},F=async()=>{try{const Tt=`${await r.getBaseUrl(tr)}/.backstage/auth/v1/cookie`,Dt=await e.fetch(Tt,{credentials:"include"});if(!Dt.ok)throw new Error(`Request failed with status ${Dt.status} ${Dt.statusText}, see request towards ${Tt} for more details`);const Yt=await Dt.json();if(!Yt.expiresAt)throw new Error("No expiration date in response");const me=Date.parse(Yt.expiresAt);if(Number.isNaN(me))throw new Error("Invalid expiration date in response");c=!0,y?.postMessage({action:"COOKIE_REFRESH_SUCCESS",payload:{expiresAt:new Date(me).toISOString()}}),mt(w(me))}catch(St){c?(c=!1,A=er):(A=Math.min(go,A*po),console.error("Session cookie refresh failed",St),n.post(new Error("Session refresh failed, see developer console for details"))),mt(A)}},tt=St=>{const{data:Tt}=St;if(!(Tt===null||typeof Tt!="object")&&"action"in Tt&&Tt.action==="COOKIE_REFRESH_SUCCESS"){const Dt=Date.parse(Tt.payload.expiresAt);if(Number.isNaN(Dt)){console.warn("Received invalid expiration from session refresh channel");return}mt(w(Dt))}};function mt(St){o||(i&&clearTimeout(i),i=setTimeout(F,St))}return y?.addEventListener("message",tt),F(),()=>{o=!0,i&&clearTimeout(i),y?.removeEventListener("message",tt),y?.close()}}function nr(r){return new Error(`Tried to access IdentityApi ${r} before app was loaded`)}function Bs(r){console.warn(`WARNING: Call to ${r} is deprecated and will break in the future`)}class mo{target;waitForTarget;resolveTarget=()=>{};signOutTargetUrl="/";#t;constructor(){this.waitForTarget=new Promise(e=>{this.resolveTarget=e})}setTarget(e,n){this.target=e,this.signOutTargetUrl=n.signOutTargetUrl,this.resolveTarget(e)}getUserId(){if(!this.target)throw nr("getUserId");if(!this.target.getUserId)throw new Error("IdentityApi does not implement getUserId");return Bs("getUserId"),this.target.getUserId()}getProfile(){if(!this.target)throw nr("getProfile");if(!this.target.getProfile)throw new Error("IdentityApi does not implement getProfile");return Bs("getProfile"),this.target.getProfile()}async getProfileInfo(){return this.waitForTarget.then(e=>e.getProfileInfo())}async getBackstageIdentity(){const e=await this.waitForTarget.then(n=>n.getBackstageIdentity());return e.userEntityRef.match(/^.*:.*\/.*$/)||console.warn(`WARNING: The App IdentityApi provided an invalid userEntityRef, '${e.userEntityRef}'. It must be a full Entity Reference of the form '<kind>:<namespace>/<name>'.`),e}async getCredentials(){return this.waitForTarget.then(e=>e.getCredentials())}async getIdToken(){return this.waitForTarget.then(e=>{if(!e.getIdToken)throw new Error("IdentityApi does not implement getIdToken");return Bs("getIdToken"),e.getIdToken()})}async signOut(){await this.waitForTarget.then(e=>e.signOut()),await this.#t?.(),window.location.href=this.signOutTargetUrl}enableCookieAuth(e){if(this.#t)return;const n=fo(e);this.#t=async()=>{n();const o=await e.discoveryApi.getBaseUrl("app");try{await fetch(`${o}/.backstage/auth/v1/cookie`,{method:"DELETE",credentials:"include"})}catch{}}}}var yo=t(1394);function vo(r,e,n){if(r!==void 0){const i=n.find(c=>c.id===r);if(i)return i}if(e){const i=n.find(c=>c.variant==="dark");if(i)return i}const o=n.find(i=>i.variant==="light");return o||n[0]}const Eo=()=>{const r=(0,ft.useMemo)(()=>window.matchMedia("(prefers-color-scheme: dark)"),[]),[e,n]=(0,ft.useState)(r.matches);return(0,ft.useEffect)(()=>{const o=i=>{n(i.matches)};return r.addListener(o),()=>{r.removeListener(o)}},[r]),e};function sr({children:r}){const e=(0,Tn.gf)(Zn),n=(0,yo.A)(e.activeThemeId$(),e.getActiveThemeId()),o=window.matchMedia?Eo():!1,i=vo(n,o,e.getInstalledThemes());if(!i)throw new Error("App has no themes");return(0,a.jsx)(i.Provider,{children:r})}const rr=async()=>Ao();function Ao(r="__APP_INJECTED_RUNTIME_CONFIG__"){const e=new Array,n=[{context:"app-config.yaml",data:{app:{title:"Techdocs Preview App",baseUrl:"http://localhost:3000"},backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}}}];if(n){if(!Array.isArray(n))throw new Error("Static configuration has invalid format");e.push(...n)}const o=document.querySelectorAll('script[type="backstage.io/config"]');if(o.length>0)for(const c of o)try{const A=c.textContent;if(!A)throw new Error("tag is empty");let y;try{y=JSON.parse(A)}catch(w){throw new Error(`failed to parse config; ${w}`)}if(!Array.isArray(y))throw new Error("data is not an array");e.push(...y)}catch(A){throw new Error(`Failed to load config from script tag, ${A.message}`)}else if(r!=="__app_injected_runtime_config__".toLocaleUpperCase("en-US"))try{const c=JSON.parse(r);Array.isArray(c)?e.push(...c):e.push({data:c,context:"env"})}catch(c){throw new Error(`Failed to load runtime configuration, ${c}`)}const i=window.__APP_CONFIG__;return i&&e.push({context:"window",data:i}),e}class xo{apis=[];add(e,n){return this.apis.push([e.id,n]),n}build(){return new vn(new Map(this.apis))}}class vn{apis;static builder(){return new xo}static from(e){return new vn(new Map(e.map(([n,o])=>[n.id,o])))}static with(e,n){return new vn(new Map([[e.id,n]]))}constructor(e){this.apis=e}with(e,n){return new vn(new Map([...this.apis,[e.id,n]]))}get(e){return this.apis.get(e.id)}}function Co(r){const e=new Map,n=new Map;for(const o of r){for(const[i,c]of Object.entries(o.routes??{})){const A=`${o.getId()}.${i}`;if(e.has(A))throw new Error(`Unexpected duplicate route '${A}'`);e.set(A,c)}for(const[i,c]of Object.entries(o.externalRoutes??{})){const A=`${o.getId()}.${i}`;if(n.has(A))throw new Error(`Unexpected duplicate external route '${A}'`);n.set(A,c)}}return{routes:e,externalRoutes:n}}function bo(r,e,n){const o=Co(n),i=new Map,c=new Set;r&&r({bind:(w,F)=>{for(const[tt,mt]of Object.entries(F)){const St=w[tt];if(!St)throw new Error(`Key ${tt} is not an existing external route`);if(!mt&&!St.optional)throw new Error(`External route ${tt} is required but was ${mt===!1?"disabled":"not provided"}`);mt?i.set(St,mt):mt===!1&&c.add(St)}}});const A=e.getOptionalConfig("app.routes.bindings")?.get();if(A)for(const[y,w]of Object.entries(A)){if(!So(w))throw new Error(`Invalid config at app.routes.bindings['${y}'], value must be a non-empty string or false`);const F=o.externalRoutes.get(y);if(!F)throw new Error(`Invalid config at app.routes.bindings, '${y}' is not a valid external route`);if(!(i.has(F)||c.has(F)))if(w===!1)c.add(F);else{const tt=o.routes.get(w);if(!tt)throw new Error(`Invalid config at app.routes.bindings['${y}'], '${w}' is not a valid route`);i.set(F,tt)}}for(const y of o.externalRoutes.values())if(!i.has(y)&&!c.has(y)){const w="getDefaultTarget"in y?y.getDefaultTarget():void 0;if(w){const F=o.routes.get(w);F&&i.set(y,F)}}return i}function So(r){return!!(r===!1||typeof r=="string"&&r)}function In(){const[r]=(0,p.AV)((0,a.jsx)(p.qh,{index:!0,element:(0,a.jsx)("div",{})}));return!r.index}const or=(0,ft.createContext)(void 0);var ar=t(82266),ir=t(93368),Oo=t(25862);const Po=(r,e)=>{try{const o=(0,wn.ue)(e,{pathname:r})?.filter(w=>w?.route.routeRefs?.size>0).pop(),i=o?.route;if(!i||i.path===""&&r!=="/")return;let c;i.routeRefs.size===1&&(c=i.routeRefs.values().next().value);let A;i.plugins.size===1&&(A=i.plugins.values().next().value);const y=Object.entries(o?.params||{}).reduce((w,[F,tt])=>(tt!==void 0&&F!=="*"&&(w[F]=tt),w),{});return{extension:"App",pluginId:A?.getId()||"root",...c?{routeRef:c.id}:{},_routeNodeType:i.element,params:y}}catch{return}},To=({pathname:r,search:e,hash:n,attributes:o})=>{const i=(0,ir.s)();return(0,ft.useEffect)(()=>{i.captureEvent("navigate",`${r}${e}${n}`,{attributes:o})},[i,r,e,n,o]),null},ts=({routeObjects:r})=>{const{pathname:e,search:n,hash:o}=(0,p.zy)(),{params:i,...c}=Po(e,r)||{params:{}};return(0,a.jsx)(Oo.Ig,{attributes:c,children:(0,a.jsx)(To,{pathname:e,search:n,hash:o,attributes:i})})};function wo(r){return In()?js(r):""}function js(r){let{pathname:e}=new URL(r.getOptionalString("app.baseUrl")??"/","http://sample.dev");return e=e.replace(/\/*$/,""),e}function cr({component:r,appIdentityProxy:e,children:n}){const[o,i]=(0,ft.useState)(),c=(0,Tn.gf)(st.U),A=js(c);return o?(e.setTarget(o,{signOutTargetUrl:A||"/"}),(0,a.jsx)(a.Fragment,{children:n})):(0,a.jsx)(r,{onSignInSuccess:i})}function lr(r){const{Router:e,SignInPage:n}=(0,ar.n)().getComponents(),o=(0,Tn.gf)(st.U),i=js(o),c=`${i}/*`,A=(0,ft.useContext)(or);if(!A)throw new Error("AppRouter must be rendered within the AppProvider");const{routeObjects:y,appIdentityProxy:w}=A;return n?In()?(0,a.jsxs)(e,{children:[(0,a.jsx)(ts,{routeObjects:y}),(0,a.jsx)(cr,{component:n,appIdentityProxy:w,children:(0,a.jsx)(p.BV,{children:(0,a.jsx)(p.qh,{path:c,element:(0,a.jsx)(a.Fragment,{children:r.children})})})})]}):(0,a.jsxs)(e,{basename:i,children:[(0,a.jsx)(ts,{routeObjects:y}),(0,a.jsx)(cr,{component:n,appIdentityProxy:w,children:r.children})]}):(w.setTarget({getUserId:()=>"guest",getIdToken:async()=>{},getProfile:()=>({email:"guest@example.com",displayName:"Guest"}),getProfileInfo:async()=>({email:"guest@example.com",displayName:"Guest"}),getBackstageIdentity:async()=>({type:"user",userEntityRef:"user:default/guest",ownershipEntityRefs:["user:default/guest"]}),getCredentials:async()=>({}),signOut:async()=>{}},{signOutTargetUrl:i||"/"}),In()?(0,a.jsxs)(e,{children:[(0,a.jsx)(ts,{routeObjects:y}),(0,a.jsx)(p.BV,{children:(0,a.jsx)(p.qh,{path:c,element:(0,a.jsx)(a.Fragment,{children:r.children})})})]}):(0,a.jsxs)(e,{basename:i,children:[(0,a.jsx)(ts,{routeObjects:y}),r.children]}))}(0,Oe.h)(lr,"core.type","AppRouter");const Dn="language",Je="en";class es{static create(e){const n=e?.availableLanguages??[Je];if(n.length!==new Set(n).size)throw new Error(`Supported languages may not contain duplicates, got '${n.join("', '")}'`);if(!n.includes(Je))throw new Error(`Supported languages must include '${Je}'`);const o=e?.defaultLanguage??Je;if(!n.includes(o))throw new Error(`Initial language must be one of the supported languages, got '${o}'`);return new es(n,o)}static createWithStorage(e){const n=es.create(e);if(!window.localStorage)return n;const o=window.localStorage.getItem(Dn),{languages:i}=n.getAvailableLanguages();return o&&i.includes(o)&&n.setLanguage(o),n.language$().subscribe(({language:c})=>{c!==window.localStorage.getItem(Dn)&&window.localStorage.setItem(Dn,c)}),window.addEventListener("storage",c=>{if(c.key===Dn){const A=localStorage.getItem(Dn)??void 0;A&&n.setLanguage(A)}}),n}#t;#e;#n;constructor(e,n){this.#t=e,this.#e=n,this.#n=new lt({language:this.#e})}getAvailableLanguages(){return{languages:this.#t.slice()}}setLanguage(e){const n=e??Je;if(n!==this.#e){if(n&&!this.#t.includes(n))throw new Error(`Failed to change language to '${n}', available languages are '${this.#t.join("', '")}'`);this.#e=n,this.#n.next({language:n})}}getLanguage(){return{language:this.#e}}language$(){return this.#n}}var Ro=t(47304),Io=t(99833),dr=t(93184);function ur(r){return Object.fromEntries(Object.entries(r).filter(e=>e[1]!==null))}class Do{onLoad;#t;#e;#n;constructor(e){this.onLoad=e,this.#t=new Set,this.#e=new Map,this.#n=new Map}addTranslationResource(e){const n=(0,Io.Y)(e);for(const o of n.resources){const i=this.#s(o.language,n.id);this.#n.has(i)||this.#n.set(i,o.loader)}}#s(e,n){return`${e}/${n}`}needsLoading(e,n){const o=this.#s(e,n);return this.#n.get(o)?!this.#t.has(o):!1}async load(e,n){const o=this.#s(e,n),i=this.#n.get(o);if(!i||this.#t.has(o))return;const c=this.#e.get(o);if(c){await c;return}const A=i().then(y=>{this.onLoad({language:e,namespace:n,messages:y.messages}),this.#t.add(o)},y=>{throw this.#t.add(o),y});this.#e.set(o,A),await A}}class Us{#t;#e;#n;static fromI18n(e){const n=e.services.interpolator,o=n.format;let i;return n.format=(c,A,y,w)=>A?o(c,A,y,w):i?.(c,A,y,w)??c,new Us(Math.random().toString(36).substring(2,8),c=>{i=c})}constructor(e,n){this.#t=n,this.#e=e,this.#n=new RegExp(`\\$${e}\\(([^)]+)\\)`)}wrapT(e){return(n,o)=>{let i;this.#t(y=>{if((0,ft.isValidElement)(y)){i||(i=new Map);const w=i.size.toString();return i.set(w,y),`$${this.#e}(${w})`}return y});const c=e(n,o);if(!i)return c;const A=c.split(this.#n);return(0,ft.createElement)(ft.Fragment,null,...A.map((y,w)=>w%2===0?y:i?.get(y)).filter(Boolean))}}}class $s{static create(e){const{languages:n}=e.languageApi.getAvailableLanguages(),o=(0,Ro.Q_)({fallbackLng:Je,supportedLngs:n,interpolation:{escapeValue:!1,alwaysFormat:!0},ns:[],defaultNS:!1,fallbackNS:!1,initImmediate:!1});if(o.init(),!o.isInitialized)throw new Error("i18next was unexpectedly not initialized");const i=Us.fromI18n(o),{language:c}=e.languageApi.getLanguage();c!==Je&&o.changeLanguage(c);const A=new Do(F=>{o.addResourceBundle(F.language,F.namespace,ur(F.messages),!1,!0)}),y=e?.resources||[];for(let F=y.length-1;F>=0;F--){const tt=y[F];tt.$$type==="@backstage/TranslationResource"?A.addTranslationResource(tt):tt.$$type==="@backstage/TranslationMessages"&&o.addResourceBundle(Je,tt.id,ur(tt.messages),!0,!1)}const w=new $s(o,A,e.languageApi.getLanguage().language,i);return e.languageApi.language$().subscribe(({language:F})=>{w.#a(F)}),w}#t;#e;#n;#s;#o=new Set;#r=new Set;constructor(e,n,o,i){this.#t=e,this.#e=n,this.#n=o,this.#s=i}getTranslation(e){const n=(0,dr.v)(e);return this.#c(n),this.#i(n)}translation$(e){const n=(0,dr.v)(e);return this.#c(n),new(Y())(o=>{let i={};const c=()=>{i={};const y=i;this.#e.load(this.#n,n.id).then(()=>{if(y===i){const w=this.#i(n);w.ready&&o.next(w)}},w=>{y===i&&o.error(Array.isArray(w)?w[0]:w)})},A=()=>{const y=this.#i(n);y.ready?o.next(y):c()};return this.#e.needsLoading(this.#n,n.id)&&c(),this.#r.add(A),()=>{this.#r.delete(A)}})}#a(e){this.#n!==e&&(this.#n=e,this.#t.changeLanguage(e),this.#r.forEach(n=>n()))}#i(e){if(this.#e.needsLoading(this.#n,e.id))return{ready:!1};const n=this.#t.getFixedT(null,e.id);return{ready:!0,t:this.#s.wrapT(n)}}#c(e){if(this.#o.has(e.id))return;this.#o.add(e.id);const n=e.getDefaultMessages();this.#t.addResourceBundle(Je,e.id,n,!0,!1);const o=e.getDefaultResource();o&&this.#e.addTranslationResource(o)}}function hr(r){const e=new URL(r);return e.protocol=document.location.protocol,e.hostname=document.location.hostname,e.port=document.location.port,e.toString().replace(/\/$/,"")}function Lo(r){const e=mn.fromConfigs(r),n=e.getOptionalString("app.baseUrl"),o=e.getOptionalString("backend.baseUrl");let i=r,c,A;if(n&&o){const y=new URL(n).origin,w=new URL(o).origin;if(y===w){const F=hr(o);o!==F&&(c=F)}}if(n){const y=hr(n);n!==y&&(A=y)}return(A||c)&&(i=i.concat({data:{app:A&&{baseUrl:A},backend:c&&{baseUrl:c}},context:"relative-resolver"})),i}function Mo(){return(document.querySelector('meta[name="backstage-app-mode"]')?.getAttribute("content")??"public")==="protected"}function Bo(r,e,n){const o=!!r,i=(0,Zt.A)(r||(()=>Promise.resolve([])));let c;if(o&&i.loading){const{Progress:w}=e;c=(0,a.jsx)(w,{})}else if(i.error){const{BootErrorPage:w}=e;c=(0,a.jsx)(w,{step:"load-config",error:i.error})}const{ThemeProvider:A=sr}=e;return c?{node:(0,a.jsx)(Se,{apis:vn.with(Zn,n),children:(0,a.jsx)(A,{children:c})})}:{api:mn.fromConfigs(i.value?.length?Lo(i.value):[])}}class jo{app;constructor(e){this.app=e}getPlugins(){return this.app.getPlugins()}getSystemIcon(e){return this.app.getSystemIcon(e)}getSystemIcons(){return this.app.getSystemIcons()}getComponents(){return this.app.getComponents()}}class Uo{apiHolder;configApi;apis;icons;plugins;featureFlags;components;themes;configLoader;defaultApis;bindRoutes;appLanguageApi;translationResources;appIdentityProxy=new mo;apiFactoryRegistry;constructor(e){this.apis=e.apis??[],this.icons=e.icons,this.plugins=new Set(e.plugins??[]),this.featureFlags=e.featureFlags??[],this.components=e.components,this.themes=e.themes,this.configLoader=e.configLoader??rr,this.defaultApis=e.defaultApis??[],this.bindRoutes=e.bindRoutes,this.apiFactoryRegistry=new zr,this.appLanguageApi=es.createWithStorage({defaultLanguage:e.__experimentalTranslations?.defaultLanguage,availableLanguages:e.__experimentalTranslations?.availableLanguages}),this.translationResources=e.__experimentalTranslations?.resources??[]}getPlugins(){return Array.from(this.plugins)}getSystemIcon(e){return this.icons[e]}getSystemIcons(){return this.icons}getComponents(){return this.components}createRoot(e){const n=this.getProvider();return()=>(0,a.jsx)(n,{children:e})}#t=!1;getProvider(){if(this.#t)throw new Error("app.getProvider() or app.createRoot() has already been called, and can only be called once");this.#t=!0;const e=new jo(this);let n,o;return({children:c})=>{const A=(0,ft.useRef)(!0),y=(0,ft.useMemo)(()=>Qn.createWithStorage(this.themes),[]),{routing:w,featureFlags:F}=(0,ft.useMemo)(()=>{const Yt=In();Yt&&console.warn(`
4
+ DEPRECATION WARNING: React Router Beta is deprecated and support for it will be removed in a future release.
5
+ Please migrate to use React Router v6 stable.
6
+ See https://backstage.io/docs/tutorials/react-router-stable-migration
7
+ `);const me=Hr({root:c,discoverers:[Vr,Gr],collectors:{routing:Yt?Zr:Qr,collectedPlugins:Yr,featureFlags:Jr}});return me.collectedPlugins.forEach(Be=>this.plugins.add(Be)),this.verifyPlugins(this.plugins),this.getApiHolder(),me},[c]),tt=Bo(this.configLoader,this.components,y),mt="api"in tt;if(mt){const{api:Yt}=tt;this.configApi=Yt}if("node"in tt)return tt.node;if(o)throw o;if(!n)try{n=bo(this.bindRoutes,tt.api,this.plugins),ao(w.paths,w.parents),io(n,this.plugins)}catch(Yt){throw o=Yt,Yt}if(mt&&A.current){A.current=!1;const Yt=this.getApiHolder().get(yn.B);if(Yt){for(const De of this.featureFlags)Yt.registerFlag({...De,pluginId:""});for(const De of this.plugins.values())if("getFeatureFlags"in De)for(const ln of De.getFeatureFlags())Yt.registerFlag({name:ln.name,pluginId:De.getId()});else for(const ln of De.output())ln.type==="feature-flag"&&Yt.registerFlag({name:ln.name,pluginId:De.getId()});const me=Yt.getRegisteredFlags(),Be=new Set(me.map(De=>De.name));for(const De of F)Be.has(De)||Yt.registerFlag({name:De,pluginId:""})}}const{ThemeProvider:St=sr,Progress:Tt}=this.components,Dt=this.getApiHolder();if(Mo()){const Yt=Dt.get(Vt.m),me=Dt.get(Me.a),Be=Dt.get(_.I);if(!Yt||!me||!Be)throw new Error("App is running in protected mode but missing required APIs");this.appIdentityProxy.enableCookieAuth({errorApi:Yt,fetchApi:me,discoveryApi:Be})}return(0,a.jsx)(Se,{apis:Dt,children:(0,a.jsx)(lo,{appContext:e,children:(0,a.jsx)(St,{children:(0,a.jsx)(oo,{routePaths:w.paths,routeParents:w.parents,routeObjects:w.objects,routeBindings:n,basePath:wo(tt.api),children:(0,a.jsx)(or.Provider,{value:{routeObjects:w.objects,appIdentityProxy:this.appIdentityProxy},children:(0,a.jsx)(ft.Suspense,{fallback:(0,a.jsx)(Tt,{}),children:c})})})})})})}}getRouter(){return lr}getApiHolder(){if(this.apiHolder){for(const e of this.plugins)for(const n of e.getApis())this.apiFactoryRegistry.get(n.api)||this.apiFactoryRegistry.register("default",n);return Ms.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder}this.apiFactoryRegistry.register("static",{api:Zn,deps:{},factory:()=>Qn.createWithStorage(this.themes)}),this.apiFactoryRegistry.register("static",{api:st.U,deps:{},factory:()=>{if(!this.configApi)throw new Error("Tried to access config API before config was loaded");return this.configApi}}),this.apiFactoryRegistry.register("static",{api:pe.K,deps:{},factory:()=>this.appIdentityProxy}),this.apiFactoryRegistry.register("static",{api:Ys,deps:{},factory:()=>this.appLanguageApi}),this.apiFactoryRegistry.register("default",{api:Kr.J,deps:{languageApi:Ys},factory:({languageApi:e})=>$s.create({languageApi:e,resources:this.translationResources})}),this.apiFactoryRegistry.register("default",{api:yn.B,deps:{},factory:()=>new Wr});for(const e of this.defaultApis)this.apiFactoryRegistry.register("default",e);for(const e of this.plugins)for(const n of e.getApis())if(!this.apiFactoryRegistry.register("default",n))throw new Error(`Plugin ${e.getId()} tried to register duplicate or forbidden API factory for ${n.api}`);for(const e of this.apis)if(!this.apiFactoryRegistry.register("app",e))throw new Error(`Duplicate or forbidden API factory for ${e.api} in app`);return Ms.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder=new Ms(this.apiFactoryRegistry),this.apiHolder}verifyPlugins(e){const n=new Set;for(const o of e){const i=o.getId();if(n.has(i))throw new Error(`Duplicate plugin found '${i}'`);n.add(i)}}}function $o(r){return new Uo(r)}function Fo(r){return $o({...r,apis:r?.apis??[],bindRoutes:r?.bindRoutes,components:{...D,...r?.components},configLoader:r?.configLoader,defaultApis:ds,icons:{...Cs,...r?.icons},plugins:r?.plugins??[],featureFlags:r?.featureFlags??[],themes:r?.themes??Ee})}var ns=t(82442);let pr=!1;const gr=r=>{const e=(0,ar.n)(),{NotFoundErrorPage:n}=e.getComponents(),o=(0,ft.useMemo)(()=>In(),[]),c=[...(0,ns.O)(r.children,A=>A.getElements().flatMap(y=>{let w=y.props.path;if(w==="")return[];w=w?.replace(/\/\*$/,"")??"/";let F=o?y:y.props.element;return!o&&!F&&(F=y,pr||(console.warn("DEPRECATION WARNING: All elements within <FlatRoutes> must be of type <Route> with an element prop. Existing usages of <Navigate key=[path] to=[to] /> should be replaced with <Route path=[path] element={<Navigate to=[to] />} />."),pr=!0)),[{path:w,element:F,children:y.props.children?[{path:w==="/"?"/":"*",element:y.props.children}]:void 0}]}).sort((y,w)=>w.path.localeCompare(y.path)).map(y=>({...y,path:y.path==="/"?"/":`${y.path}/*`}))),{path:"*",element:(0,a.jsx)(n,{})}];return(0,p.Ye)(c)};(0,Oe.h)(gr,"core.type","FlatRoutes");var En=t(6820),No=t(78692),ko=t(86519);function Wo(r){return!r.cursor}function Ko(r,e){if(!r.length)return[];const{maxCountPerChunk:n=1e3,maxStringLengthPerChunk:o=90*2**10,extraStringLengthPerRef:i=3}=e??{},c=[];let A=0,y=0,w=0;for(let F=0;F<r.length;++F){const tt=r[F].length+i;w>0&&(y+tt>o||w+1>n)&&(c.push(r.slice(A,F)),A=F,y=0,w=0),y+=tt,w+=1}return c.push(r.slice(A,r.length)),c}const Ae="catalog";var xe=t(94214);class zo{discoveryApi;fetchApi;constructor(e){this.discoveryApi=e.discoveryApi,this.fetchApi=e.fetchApi||{fetch:hn()}}async deleteEntityByUid(e,n){const o=await this.discoveryApi.getBaseUrl(Ae),c=xe.parse("/entities/by-uid/{uid}").expand({uid:e.path.uid});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"DELETE"})}async getEntities(e,n){const o=await this.discoveryApi.getBaseUrl(Ae),c=xe.parse("/entities{?fields,limit,filter*,offset,after,order*}").expand({...e.query});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"GET"})}async getEntitiesByQuery(e,n){const o=await this.discoveryApi.getBaseUrl(Ae),c=xe.parse("/entities/by-query{?fields,limit,offset,orderField*,cursor,filter*,fullTextFilterTerm,fullTextFilterFields}").expand({...e.query});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"GET"})}async getEntitiesByRefs(e,n){const o=await this.discoveryApi.getBaseUrl(Ae),c=xe.parse("/entities/by-refs{?filter*}").expand({...e.query});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"POST",body:JSON.stringify(e.body)})}async getEntityAncestryByName(e,n){const o=await this.discoveryApi.getBaseUrl(Ae),c=xe.parse("/entities/by-name/{kind}/{namespace}/{name}/ancestry").expand({kind:e.path.kind,namespace:e.path.namespace,name:e.path.name});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"GET"})}async getEntityByName(e,n){const o=await this.discoveryApi.getBaseUrl(Ae),c=xe.parse("/entities/by-name/{kind}/{namespace}/{name}").expand({kind:e.path.kind,namespace:e.path.namespace,name:e.path.name});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"GET"})}async getEntityByUid(e,n){const o=await this.discoveryApi.getBaseUrl(Ae),c=xe.parse("/entities/by-uid/{uid}").expand({uid:e.path.uid});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"GET"})}async getEntityFacets(e,n){const o=await this.discoveryApi.getBaseUrl(Ae),c=xe.parse("/entity-facets{?facet*,filter*}").expand({...e.query});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"GET"})}async refreshEntity(e,n){const o=await this.discoveryApi.getBaseUrl(Ae),c=xe.parse("/refresh").expand({});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"POST",body:JSON.stringify(e.body)})}async validateEntity(e,n){const o=await this.discoveryApi.getBaseUrl(Ae),c=xe.parse("/validate-entity").expand({});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"POST",body:JSON.stringify(e.body)})}async analyzeLocation(e,n){const o=await this.discoveryApi.getBaseUrl(Ae),c=xe.parse("/analyze-location").expand({});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"POST",body:JSON.stringify(e.body)})}async createLocation(e,n){const o=await this.discoveryApi.getBaseUrl(Ae),c=xe.parse("/locations{?dryRun}").expand({...e.query});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"POST",body:JSON.stringify(e.body)})}async deleteLocation(e,n){const o=await this.discoveryApi.getBaseUrl(Ae),c=xe.parse("/locations/{id}").expand({id:e.path.id});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"DELETE"})}async getLocation(e,n){const o=await this.discoveryApi.getBaseUrl(Ae),c=xe.parse("/locations/{id}").expand({id:e.path.id});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"GET"})}async getLocationByEntity(e,n){const o=await this.discoveryApi.getBaseUrl(Ae),c=xe.parse("/locations/by-entity/{kind}/{namespace}/{name}").expand({kind:e.path.kind,namespace:e.path.namespace,name:e.path.name});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"GET"})}async getLocations(e,n){const o=await this.discoveryApi.getBaseUrl(Ae),c=xe.parse("/locations").expand({});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"GET"})}}class Ho{apiClient;constructor(e){this.apiClient=new zo(e)}async getEntityAncestors(e,n){return await this.requestRequired(await this.apiClient.getEntityAncestryByName({path:(0,En.KU)(e.entityRef)},n))}async getLocations(e,n){return{items:(await this.requestRequired(await this.apiClient.getLocations(e??{},n))).map(i=>i.data)}}async getLocationById(e,n){return await this.requestOptional(await this.apiClient.getLocation({path:{id:e}},n))}async getLocationByEntity(e,n){return await this.requestOptional(await this.apiClient.getLocationByEntity({path:(0,En.KU)(e)},n))}async getEntities(e,n){const{filter:o=[],fields:i=[],order:c,offset:A,limit:y,after:w}=e??{},F=[];if(c)for(const mt of[c].flat())mt&&F.push(`${mt.order}:${mt.field}`);return{items:await this.requestRequired(await this.apiClient.getEntities({query:{fields:i,limit:y,filter:this.getFilterValue(o),offset:A,after:w,order:c?F:void 0}},n))}}async getEntitiesByRefs(e,n){const o=async c=>{const A=await this.apiClient.getEntitiesByRefs({body:{entityRefs:c,fields:e.fields},query:{filter:this.getFilterValue(e.filter)}},n);if(!A.ok)throw await ye.o.fromResponse(A);return(await A.json()).items.map(w=>w??void 0)};let i;for(const c of Ko(e.entityRefs)){const A=await o(c);i?i.push(...A):i=A}return{items:i??[]}}async queryEntities(e={},n){const o={};if(Wo(e)){const{fields:i=[],filter:c,limit:A,offset:y,orderFields:w,fullTextFilter:F}=e;o.filter=this.getFilterValue(c),A!==void 0&&(o.limit=A),y!==void 0&&(o.offset=y),w!==void 0&&(o.orderField=(Array.isArray(w)?w:[w]).map(({field:mt,order:St})=>`${mt},${St}`)),i.length&&(o.fields=i);const tt=F?.term?.trim();tt&&(o.fullTextFilterTerm=tt),F?.fields?.length&&(o.fullTextFilterFields=F.fields)}else{const{fields:i=[],limit:c,cursor:A}=e;o.cursor=A,c!==void 0&&(o.limit=c),i.length&&(o.fields=i)}return this.requestRequired(await this.apiClient.getEntitiesByQuery({query:o},n))}async getEntityByRef(e,n){return this.requestOptional(await this.apiClient.getEntityByName({path:(0,En.KU)(e)},n))}async getEntityByName(e,n){const{kind:o,namespace:i="default",name:c}=e;return this.requestOptional(await this.apiClient.getEntityByName({path:{kind:o,namespace:i,name:c}},n))}async refreshEntity(e,n){const o=await this.apiClient.refreshEntity({body:{entityRef:e}},n);if(o.status!==200)throw new Error(await o.text())}async getEntityFacets(e,n){const{filter:o=[],facets:i}=e;return await this.requestOptional(await this.apiClient.getEntityFacets({query:{facet:i,filter:this.getFilterValue(o)}},n))}async addLocation(e,n){const{type:o="url",target:i,dryRun:c}=e,A=await this.apiClient.createLocation({body:{type:o,target:i},query:{dryRun:c?"true":void 0}},n);if(A.status!==201)throw new Error(await A.text());const{location:y,entities:w,exists:F}=await A.json();if(!y)throw new Error(`Location wasn't added: ${i}`);return{location:y,entities:w,exists:F}}async getLocationByRef(e,n){return(await this.requestRequired(await this.apiClient.getLocations({},n))).map(i=>i.data).find(i=>e===(0,No.KL)(i))}async removeLocationById(e,n){await this.requestIgnored(await this.apiClient.deleteLocation({path:{id:e}},n))}async removeEntityByUid(e,n){await this.requestIgnored(await this.apiClient.deleteEntityByUid({path:{uid:e}},n))}async validateEntity(e,n,o){const i=await this.apiClient.validateEntity({body:{entity:e,location:n}},o);if(i.ok)return{valid:!0};if(i.status!==400)throw await ye.o.fromResponse(i);const{errors:c=[]}=await i.json();return{valid:!1,errors:c}}async requestIgnored(e){if(!e.ok)throw await ye.o.fromResponse(e)}async requestRequired(e){if(!e.ok)throw await ye.o.fromResponse(e);return e.json()}async requestOptional(e){if(!e.ok){if(e.status===404)return;throw await ye.o.fromResponse(e)}return await e.json()}getFilterValue(e=[]){const n=[];for(const o of[e].flat()){const i=[];for(const[c,A]of Object.entries(o))for(const y of[A].flat())y===ko.c?i.push(c):typeof y=="string"&&i.push(`${c}=${y}`);i.length&&n.push(i.join(","))}return n}}var fr=t(7341),Vo=t(18),Go=t(82292),mr=t(29207),An=t(95203),Yo=t(9803),Ie=t(88758),Qo=t(54560),xn=t(45250);async function Zo({storageApi:r}){const e=r.forBucket("settings"),n=r.forBucket("starredEntities"),o=e.snapshot("starredEntities").value;if(!(0,xn.isArray)(o))return;const i=new Set(n.snapshot("entityRefs").value??[]);o.filter(xn.isString).map(c=>c.split(":")).filter(c=>c.length===4&&c[0]==="entity").map(([c,A,y,w])=>(0,En.U2)({kind:A,namespace:y,name:w})).forEach(c=>i.add(c)),await n.set("entityRefs",Array.from(i)),await e.remove("starredEntities")}class Jo{settingsStore;starredEntities;constructor(e){Zo(e).then(),this.settingsStore=e.storageApi.forBucket("starredEntities"),this.starredEntities=new Set(this.settingsStore.snapshot("entityRefs").value??[]),this.settingsStore.observe$("entityRefs").subscribe({next:n=>{this.starredEntities=new Set(n.value??[]),this.notifyChanges()}})}async toggleStarred(e){this.starredEntities.has(e)?this.starredEntities.delete(e):this.starredEntities.add(e),await this.settingsStore.set("entityRefs",Array.from(this.starredEntities))}starredEntitie$(){return this.observable}subscribers=new Set;observable=new(Y())(e=>(e.next(new Set(this.starredEntities)),this.subscribers.add(e),()=>{this.subscribers.delete(e)}));notifyChanges(){for(const e of this.subscribers)e.next(new Set(this.starredEntities))}}function Fs(r){const{years:e=0,months:n=0,weeks:o=0,days:i=0,hours:c=0,minutes:A=0,seconds:y=0,milliseconds:w=0}=r;return((((e*365+n*30+o*7+i)*24+c)*60+A)*60+y)*1e3+w}var Xo=t(25033),_o=t.n(Xo),qo=t(88083);const ta={seconds:10},ea={milliseconds:50},na={api:Fn.A,component:kn.A,system:jn.A,resource:Wn.A,domain:Mn.A,location:Nn.A,user:Sn.A,group:bn.A,template:Kn.A};function yr(r){return{async:r.async,render:({entityRef:e,entity:n,context:o})=>({snapshot:(0,qo.T)(n||e,o),loadEntity:r.async})}}class sa extends Map{#t;#e=new Map;constructor(e){super(),this.#t=e}set(e,n){const o=super.set(e,n);return this.#e.set(e,Date.now()),o}get(e){if(!this.has(e))return;const n=this.#e.get(e);if(Date.now()-n>this.#t){this.delete(e);return}return super.get(e)}delete(e){return this.#e.delete(e),super.delete(e)}clear(){return this.#e.clear(),super.clear()}}class ss{static createLocal(){return new ss({renderer:yr({async:!1})})}static create(e){return new ss(e)}#t;#e;#n;#s;#o;constructor(e){const n=e.cacheTtl??ta,o=e.batchDelay??ea,i=e.renderer??yr({async:!0}),c={};if(Object.entries(na).forEach(([A,y])=>{c[A.toLocaleLowerCase("en-US")]=y}),Object.entries(e.kindIcons??{}).forEach(([A,y])=>{c[A.toLocaleLowerCase("en-US")]=y}),i.async){if(!e.catalogApi)throw new TypeError("Asynchronous rendering requires a catalog API");this.#n=this.#a({cacheTtl:n,batchDelay:o,renderer:i,catalogApi:e.catalogApi})}this.#e=Fs(n),this.#t=new Map,this.#s=c,this.#o=i}forEntity(e,n){const{entityRef:o,kind:i,entity:c,needsLoad:A}=this.#r(e),y=St=>{const{snapshot:Tt}=this.#o.render({entityRef:o,loading:St.loading,entity:St.entity,context:n||{}});return{...Tt,entityRef:o,Icon:this.#i(Tt.Icon,i)}};let w;try{w=y({loading:A,entity:c})}catch{w={primaryTitle:o,entityRef:o}}if(!A)return{snapshot:w,promise:Promise.resolve(w)};const F=Promise.resolve().then(()=>this.#n?.load(o)).then(St=>y({loading:!1,entity:St??c})).catch(()=>{}),tt=new(Y())(St=>{let Tt=!1;return F.then(Dt=>{Dt&&St.next(Dt)}).finally(()=>{Tt||St.complete()}),()=>{Tt=!0}}),mt=F.then(St=>St??w);return{snapshot:w,update$:tt,promise:mt}}#r(e){if(typeof e!="string")return{entity:e,kind:e.kind,entityRef:(0,En.U2)(e),needsLoad:!1};const n=this.#t.get(e),o=n?.entity,c=(!n||Date.now()-n.updatedAt>this.#e)&&this.#o.async!==!1&&this.#n!==void 0;return{entity:o,kind:(0,En.KU)(e).kind,entityRef:e,needsLoad:c}}#a(e){const n=Fs(e.cacheTtl),o=Fs(e.batchDelay);return new(_o())(async i=>{const{items:c}=await e.catalogApi.getEntitiesByRefs({entityRefs:i,fields:["kind","metadata.name","metadata.namespace","metadata.title","metadata.description","spec.profile.displayName","spec.type"]}),A=Date.now();return i.forEach((y,w)=>{this.#t.set(y,{updatedAt:A,entity:c[w]})}),c},{name:"DefaultEntityPresentationApi",cacheMap:new sa(n),maxBatchSize:100,batchScheduleFn:o?i=>setTimeout(i,o):void 0})}#i(e,n){return e||(e===!1?!1:this.#s[n.toLocaleLowerCase("en-US")])}}const Pe=(0,Yo.i)({id:"catalog",apis:[(0,Z.b)({api:fr.v,deps:{discoveryApi:_.I,fetchApi:Me.a},factory:({discoveryApi:r,fetchApi:e})=>new Ho({discoveryApi:r,fetchApi:e})}),(0,Z.b)({api:Vo.a,deps:{storageApi:ie},factory:({storageApi:r})=>new Jo({storageApi:r})}),(0,Z.b)({api:Go.n,deps:{catalogApi:fr.v},factory:({catalogApi:r})=>ss.create({catalogApi:r})})],routes:{catalogIndex:An.rQ,catalogEntity:mr.s},externalRoutes:{createComponent:An.qP,viewTechDoc:An.UJ,createFromTemplate:An.Zg,unregisterRedirect:An.pS}}),mi=Pe.provide((0,Ie.QJ)({name:"CatalogIndexPage",component:()=>Promise.all([t.e(3720),t.e(5184),t.e(2177)]).then(t.bind(t,62177)).then(r=>r.CatalogPage),mountPoint:An.rQ})),ra=Pe.provide((0,Ie.QJ)({name:"CatalogEntityPage",component:()=>t.e(4516).then(t.bind(t,54516)).then(r=>r.CatalogEntityPage),mountPoint:mr.s})),yi=Pe.provide((0,Ie.NC)({name:"EntityAboutCard",component:{lazy:()=>Promise.all([t.e(3720),t.e(1902),t.e(5724)]).then(t.bind(t,65724)).then(r=>r.AboutCard)}})),vi=Pe.provide((0,Ie.NC)({name:"EntityLinksCard",component:{lazy:()=>t.e(8307).then(t.bind(t,18307)).then(r=>r.EntityLinksCard)}})),Ei=Pe.provide((0,Ie.NC)({name:"EntityLabelsCard",component:{lazy:()=>t.e(3182).then(t.bind(t,63182)).then(r=>r.EntityLabelsCard)}})),Ai=Pe.provide((0,Ie.NC)({name:"EntityHasSystemsCard",component:{lazy:()=>t.e(9652).then(t.bind(t,9652)).then(r=>r.HasSystemsCard)}})),xi=Pe.provide((0,Ie.NC)({name:"EntityHasComponentsCard",component:{lazy:()=>t.e(2420).then(t.bind(t,52420)).then(r=>r.HasComponentsCard)}})),Ci=Pe.provide((0,Ie.NC)({name:"EntityHasSubcomponentsCard",component:{lazy:()=>t.e(8384).then(t.bind(t,78384)).then(r=>r.HasSubcomponentsCard)}})),bi=Pe.provide((0,Ie.NC)({name:"EntityHasSubdomainsCard",component:{lazy:()=>t.e(6415).then(t.bind(t,46415)).then(r=>r.HasSubdomainsCard)}})),Si=Pe.provide((0,Ie.NC)({name:"EntityHasResourcesCard",component:{lazy:()=>t.e(6271).then(t.bind(t,56271)).then(r=>r.HasResourcesCard)}})),Oi=Pe.provide((0,Ie.NC)({name:"EntityDependsOnComponentsCard",component:{lazy:()=>t.e(3632).then(t.bind(t,3632)).then(r=>r.DependsOnComponentsCard)}})),Pi=Pe.provide((0,Ie.NC)({name:"EntityDependencyOfComponentsCard",component:{lazy:()=>t.e(124).then(t.bind(t,124)).then(r=>r.DependencyOfComponentsCard)}})),Ti=Pe.provide((0,Ie.NC)({name:"EntityDependsOnResourcesCard",component:{lazy:()=>t.e(287).then(t.bind(t,20287)).then(r=>r.DependsOnResourcesCard)}})),wi=Pe.provide((0,Ie.NC)({name:"RelatedEntitiesCard",component:{lazy:()=>t.e(2401).then(t.bind(t,52401)).then(r=>r.RelatedEntitiesCard)}})),Ri=Pe.provide((0,Qo.ec)({name:"CatalogSearchResultListItem",component:()=>t.e(1297).then(t.bind(t,61297)).then(r=>r.CatalogSearchResultListItem),predicate:r=>r.type==="software-catalog"}));var vr=t(96726),Er=t(26679);class oa{configApi;discoveryApi;identityApi;constructor({configApi:e,discoveryApi:n,identityApi:o}){this.configApi=e,this.discoveryApi=n,this.identityApi=o}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getStorageUrl(){return`${await this.discoveryApi.getBaseUrl("techdocs")}/static/docs`}async getBuilder(){return this.configApi.getOptionalString("techdocs.builder")||"local"}async getEntityDocs(e,n){const i=`${await this.getApiOrigin()}/${n}`,c=await fetch(`${i.endsWith("/")?i:`${i}/`}index.html`);if(c.status===404)throw new Error("Page not found");return c.text()}async syncEntityDocs(e){return"cached"}async getBaseUrl(e,n,o){const i=await this.getApiOrigin();return new URL(e,`${i}/${o}`).toString()}}class aa{configApi;discoveryApi;identityApi;constructor({configApi:e,discoveryApi:n,identityApi:o}){this.configApi=e,this.discoveryApi=n,this.identityApi=o}async getCookie(){return{expiresAt:new Date(Date.now()+6e5).toISOString()}}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getEntityMetadata(e){return{apiVersion:"backstage.io/v1alpha1",kind:"Component",metadata:{name:"local"},spec:{owner:"test",lifecycle:"experimental"}}}async getTechDocsMetadata(e){return{site_name:"Live preview environment",site_description:""}}}const ia=[(0,Z.b)({api:Er.s,deps:{configApi:st.U,discoveryApi:_.I,identityApi:pe.K},factory:({configApi:r,discoveryApi:e,identityApi:n})=>new oa({configApi:r,discoveryApi:e,identityApi:n})}),(0,Z.b)({api:Er.l,deps:{configApi:st.U,discoveryApi:_.I,identityApi:pe.K},factory:({configApi:r,discoveryApi:e,identityApi:n})=>new aa({configApi:r,discoveryApi:e,identityApi:n})}),(0,Z.b)({api:vr.Y,deps:{configApi:st.U},factory:({configApi:r})=>vr.L.fromConfig(r)})],ca={backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}},la={backend:{baseUrl:"http://localhost:7007"},techdocs:{builder:"external"}};async function da(){const r=await fetch("/.detect");return r.ok?(await r.text()).trim()==="techdocs-cli-server":!1}async function ua(){const r=await rr(),e=await da();return[...r,{context:"detected",data:e?ca:la}]}var Xe=t(58837),ha=t(3210);const pa=(0,Xe.A)({svg:{width:"auto",height:30},path:{fill:"#7df3e1"}}),ga=()=>{const r=pa();return(0,a.jsx)("svg",{className:r.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 2079.95 456.05",children:(0,a.jsx)("path",{className:r.path,d:"M302.9,180a80.62,80.62,0,0,0,13.44-10.37c.8-.77,1.55-1.54,2.31-2.31a81.89,81.89,0,0,0,7.92-9.37,62.37,62.37,0,0,0,6.27-10.77,48.6,48.6,0,0,0,4.36-16.4c1.49-19.39-10-38.67-35.62-54.22L198.42,14,78.16,129.22l-78.29,75,108.6,65.9a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.8,66.42-25.69,19.16-18.36,25.52-42.12,13.7-61.87a49.69,49.69,0,0,0-6.8-8.87,89.78,89.78,0,0,0,19.28,2.15H259a85.09,85.09,0,0,0,31-5.79A80.88,80.88,0,0,0,302.9,180Zm-100.59,59.8c-19.32,18.51-50.4,21.24-75.7,5.9l-75.13-45.6,67.44-64.65,76.42,46.39C222.88,198.57,221.36,221.6,202.31,239.84Zm8.94-82.21L140.6,114.74,205,53l69.37,42.11c25.94,15.73,29.31,37.05,10.55,55A60.71,60.71,0,0,1,211.25,157.63Zm29.86,190c-19.57,18.75-46.17,29.08-74.88,29.08a123.84,123.84,0,0,1-64.11-18.19L-.13,296.51v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.85,87.85,0,0,1,241.11,347.67Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,257.52V282.2l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.68,12.88-12.35,20-27.13,19.68-41.5v-1.79A86.86,86.86,0,0,1,241.11,308.68Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,218.54v24.68l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.69,12.88-12.34,20-27.12,19.68-41.49v-1.82A87.14,87.14,0,0,1,241.11,269.7Zm83.69,25.74a94.16,94.16,0,0,1-60.19,25.86h0V348a81.6,81.6,0,0,0,51.73-22.37c14-13.38,21.15-28.11,21-42.64v-2.2A95.14,95.14,0,0,1,324.8,295.44Zm-83.69,91.21c-19.57,18.75-46.17,29.09-74.88,29.09a123.76,123.76,0,0,1-64.11-18.2L-.13,335.49v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.35,87.35,0,0,1,241.11,386.65Zm85.75-210.21c-.68.69-1.35,1.38-2.06,2.05a99.19,99.19,0,0,1-22.23,15.69,94.53,94.53,0,0,1-26.24,8.71,97.84,97.84,0,0,1-14.16,1.57c.5,1.61.9,3.25,1.25,4.9a52.7,52.7,0,0,1,1.13,12V231h.05A84.48,84.48,0,0,0,290,225.47a80.83,80.83,0,0,0,26.38-16.82c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,62.85,62.85,0,0,0,6.29-10.78,48.5,48.5,0,0,0,4.32-16.44c.09-1.23.2-2.47.19-3.7v-2c-.72,1-1.48,2.06-2.26,3.09A98,98,0,0,1,326.86,176.44Zm0,77.92c-.68.7-1.3,1.41-2,2.1a94.09,94.09,0,0,1-60.19,25.85h0V309h0a81.65,81.65,0,0,0,51.73-22.37,73.51,73.51,0,0,0,16.48-22.49,48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.48.19-3.71v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A95.81,95.81,0,0,1,326.82,254.36Zm0-39c-.68.7-1.3,1.41-2,2.1a92.22,92.22,0,0,1-10.62,8.65,93.53,93.53,0,0,1-11.63,7,95.63,95.63,0,0,1-37.94,10.18h-.05l0,26.67h0a81.63,81.63,0,0,0,51.73-22.37c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,63.16,63.16,0,0,0,6.29-10.77,48.55,48.55,0,0,0,4.32-16.45c.09-1.23.2-2.47.19-3.7v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A98.19,98.19,0,0,1,326.82,215.38Zm241-88.84q7.94,0,17.09.17t18.12,1a139.3,139.3,0,0,1,16.74,2.57,42.78,42.78,0,0,1,13.3,5.14,64.27,64.27,0,0,1,20.54,19.89Q662,168,662,186.54q0,19.54-9.49,33.78t-27.1,21.09v.68q22.78,4.82,34.87,20.58t12.08,38.4a72.62,72.62,0,0,1-4.83,26.06,65.29,65.29,0,0,1-14.33,22.46,71.57,71.57,0,0,1-23.47,15.78q-14,6-32.28,6H478.38V126.54Zm9,105.27q28,0,40.21-9.78t12.26-29.31q0-13-4.14-20.58a29.47,29.47,0,0,0-11.4-11.66A45,45,0,0,0,597,155.17a161.2,161.2,0,0,0-20.19-1.2h-65.6v77.84Zm16.57,112.13q21.74,0,34-11.66T639.59,300q0-12-4.48-19.88a34.85,34.85,0,0,0-11.91-12.52,50.14,50.14,0,0,0-17.09-6.52,105,105,0,0,0-20-1.88H511.17v84.7Zm274.79,26.74q-7.61,4.45-21.06,4.46-11.4,0-18.12-6.34t-6.74-20.75a70.17,70.17,0,0,1-28.13,20.75,97.87,97.87,0,0,1-57.65,3.6,53.51,53.51,0,0,1-18.82-8.58A41.19,41.19,0,0,1,705,348.56q-4.65-9.42-4.66-22.8,0-15.09,5.18-24.69a44.92,44.92,0,0,1,13.64-15.6,62.63,62.63,0,0,1,19.33-9.09q10.88-3.08,22.27-5.14,12.08-2.4,23-3.6a128,128,0,0,0,19.16-3.43c5.53-1.48,9.89-3.65,13.12-6.51s4.83-7,4.83-12.52q0-9.6-3.62-15.43a24.94,24.94,0,0,0-9.32-8.92,38.38,38.38,0,0,0-12.78-4.11,96.54,96.54,0,0,0-14-1q-18.63,0-31.07,7T736.6,249.29H707.26q.69-16.46,6.9-27.77a52.21,52.21,0,0,1,16.57-18.35,70,70,0,0,1,23.65-10.11A125.51,125.51,0,0,1,782.86,190a168.63,168.63,0,0,1,24,1.72,63.26,63.26,0,0,1,21.58,7A41.23,41.23,0,0,1,844,213.59q5.87,9.57,5.87,25v91q0,10.26,1.21,15.05t8.11,4.79a35.57,35.57,0,0,0,9-1.37Zm-47.64-90.87c-3.69,2.74-8.52,4.72-14.5,6s-12.26,2.27-18.82,3.07-13.17,1.71-19.85,2.73a73.7,73.7,0,0,0-18,4.94,32.62,32.62,0,0,0-12.94,9.73q-5,6.32-5,17.23a23.31,23.31,0,0,0,2.94,12.11,24.11,24.11,0,0,0,7.59,8,32,32,0,0,0,10.88,4.44,60.94,60.94,0,0,0,13.11,1.36q14.5,0,24.86-3.92a52.49,52.49,0,0,0,16.91-9.9,39.1,39.1,0,0,0,9.67-13,32.53,32.53,0,0,0,3.11-13.14ZM1002.07,225q-11.05-9.25-29.69-9.26-15.89,0-26.58,5.83A47.29,47.29,0,0,0,928.71,237a64.66,64.66,0,0,0-9.15,22.12A119.83,119.83,0,0,0,916.8,285a98.22,98.22,0,0,0,2.93,24,64.18,64.18,0,0,0,9.15,20.74,46.2,46.2,0,0,0,16.23,14.58q10,5.49,23.82,5.48,21.75,0,34-11.31t15-31.89h30q-4.83,32.91-24.68,50.75t-54,17.83q-20.37,0-36.07-6.52A69.86,69.86,0,0,1,907,350.11a79.92,79.92,0,0,1-15.88-28.63A118.64,118.64,0,0,1,885.73,285a129.41,129.41,0,0,1,5.18-37.21,85.63,85.63,0,0,1,15.71-30.17A73.46,73.46,0,0,1,933,197.35Q948.91,190,970,190a108.54,108.54,0,0,1,28.48,3.6,69.59,69.59,0,0,1,23.48,11.15,61,61,0,0,1,16.74,19q6.55,11.49,8.29,27.26h-30.38Q1013.11,234.21,1002.07,225Zm109.77-98.41v145l81.47-77.49h39.36l-70.77,64.46,75.95,112.82h-37.29l-61.1-92.59-27.62,25.38v67.21H1082.5V126.54Zm170.54,205.22a31.07,31.07,0,0,0,10.87,10.63,49,49,0,0,0,15.19,5.66,87.06,87.06,0,0,0,17.44,1.71,109.18,109.18,0,0,0,14.5-1,53.22,53.22,0,0,0,14-3.78,26.27,26.27,0,0,0,10.53-8q4.14-5.32,4.14-13.55,0-11.31-8.63-17.14a73.69,73.69,0,0,0-21.58-9.43q-12.94-3.6-28.13-6.52a146,146,0,0,1-28.14-8.23A58.16,58.16,0,0,1,1261,267.13q-8.64-9.6-8.63-26.75,0-13.38,6-23a49.26,49.26,0,0,1,15.53-15.61,71.76,71.76,0,0,1,21.4-8.91A99.41,99.41,0,0,1,1319,190a141.31,141.31,0,0,1,28,2.58,64.85,64.85,0,0,1,22.62,8.91,46.16,46.16,0,0,1,15.7,17.15q5.87,10.8,6.91,26.91h-29.35q-.69-8.57-4.48-14.23a29.36,29.36,0,0,0-9.67-9.08,44.16,44.16,0,0,0-12.94-5,67.68,67.68,0,0,0-14.33-1.54,87.29,87.29,0,0,0-13.29,1,45.28,45.28,0,0,0-12.26,3.6,24.49,24.49,0,0,0-9,6.86q-3.46,4.29-3.46,11.14a16.32,16.32,0,0,0,5.36,12.52,42.75,42.75,0,0,0,13.63,8.23,120,120,0,0,0,18.64,5.48q10.37,2.24,20.72,4.63,11,2.4,21.57,5.83A70.74,70.74,0,0,1,1382,284.1a44.55,44.55,0,0,1,13.12,14.23q5,8.58,5,21.26,0,16.13-6.73,26.75a52.5,52.5,0,0,1-17.61,17.14,73.89,73.89,0,0,1-24.51,9.09,146.3,146.3,0,0,1-27.1,2.57,126.24,126.24,0,0,1-28.31-3.09A69.56,69.56,0,0,1,1272,361.94a51.74,51.74,0,0,1-16.57-18.52q-6.21-11.49-6.9-27.95h29.34A32.65,32.65,0,0,0,1282.38,331.76Zm226.46-137.67v25.72h-35.56V329.88a31.37,31.37,0,0,0,.87,8.23,8.42,8.42,0,0,0,3.28,4.8,14.61,14.61,0,0,0,6.73,2.23,99.19,99.19,0,0,0,11.22.51h13.46v25.72H1486.4a105.8,105.8,0,0,1-19.5-1.55,28.65,28.65,0,0,1-13.12-5.65,24.09,24.09,0,0,1-7.42-11.66q-2.43-7.54-2.42-19.89V219.81h-30.38V194.09h30.38V140.94h29.34v53.15ZM1699.4,370.68q-7.61,4.45-21.06,4.46-11.4,0-18.12-6.34t-6.74-20.75a70.17,70.17,0,0,1-28.13,20.75,97.87,97.87,0,0,1-57.65,3.6,53.51,53.51,0,0,1-18.82-8.58,41.19,41.19,0,0,1-12.6-15.26q-4.65-9.42-4.66-22.8,0-15.09,5.18-24.69a44.92,44.92,0,0,1,13.64-15.6,62.63,62.63,0,0,1,19.33-9.09q10.88-3.08,22.27-5.14,12.07-2.4,23-3.6a128,128,0,0,0,19.16-3.43c5.53-1.48,9.89-3.65,13.12-6.51s4.83-7,4.83-12.52q0-9.6-3.62-15.43a24.94,24.94,0,0,0-9.32-8.92,38.38,38.38,0,0,0-12.78-4.11,96.54,96.54,0,0,0-14-1q-18.63,0-31.07,7t-13.46,26.57h-29.34q.67-16.46,6.9-27.77A52.21,52.21,0,0,1,1562,203.17a70,70,0,0,1,23.65-10.11,125.51,125.51,0,0,1,28.48-3.09,168.63,168.63,0,0,1,24,1.72,63.26,63.26,0,0,1,21.58,7,41.23,41.23,0,0,1,15.53,14.89q5.87,9.57,5.87,25v91q0,10.26,1.21,15.05t8.11,4.79a35.57,35.57,0,0,0,9-1.37Zm-47.64-90.87c-3.69,2.74-8.52,4.72-14.5,6s-12.26,2.27-18.82,3.07-13.17,1.71-19.85,2.73a73.7,73.7,0,0,0-17.95,4.94,32.62,32.62,0,0,0-12.94,9.73q-5,6.32-5,17.23a23.31,23.31,0,0,0,2.94,12.11,24.11,24.11,0,0,0,7.59,8,32,32,0,0,0,10.88,4.44,60.94,60.94,0,0,0,13.11,1.36q14.51,0,24.86-3.92a52.49,52.49,0,0,0,16.91-9.9,39.1,39.1,0,0,0,9.67-13,32.53,32.53,0,0,0,3.11-13.14Zm208.85,141.62q-20,21.6-62.83,21.6a122.11,122.11,0,0,1-25.37-2.74,78,78,0,0,1-23.48-8.92,54.41,54.41,0,0,1-17.43-16.11q-6.91-10-7.6-24.35h29.35a21.47,21.47,0,0,0,5,13.38,36.67,36.67,0,0,0,11.4,8.91,55.52,55.52,0,0,0,14.67,5,79.51,79.51,0,0,0,15.19,1.55q14.49,0,24.51-5A46,46,0,0,0,1840.59,401a56.53,56.53,0,0,0,9.49-21.09,117.46,117.46,0,0,0,2.94-27.09V341.19h-.7q-7.59,16.46-23,24.18a71.8,71.8,0,0,1-32.63,7.71q-20,0-34.86-7.2A72.88,72.88,0,0,1,1737,346.51a82.13,82.13,0,0,1-15-28.46,116.62,116.62,0,0,1-5-34.47,133.92,133.92,0,0,1,4.14-32.4A88.17,88.17,0,0,1,1735,221a75.49,75.49,0,0,1,25.55-22.29q15.87-8.75,39-8.75a66.21,66.21,0,0,1,31.07,7.38,52.13,52.13,0,0,1,22.09,22.11h.35V194.09h27.61V356.28Q1880.63,399.83,1860.61,421.43Zm-37.46-79.72a47.94,47.94,0,0,0,16.4-15.78,71.89,71.89,0,0,0,9.15-22.11,106.77,106.77,0,0,0,2.93-24.69,96.71,96.71,0,0,0-2.76-23,64,64,0,0,0-8.8-20.4,45.76,45.76,0,0,0-15.71-14.57q-9.66-5.49-23.47-5.49-14.16,0-24.17,5.32a46.77,46.77,0,0,0-16.4,14.23,60.14,60.14,0,0,0-9.32,20.57,99.69,99.69,0,0,0-2.93,24.35,120.63,120.63,0,0,0,2.42,24,67.5,67.5,0,0,0,8.28,21.77,46.37,46.37,0,0,0,15.54,15.78q9.66,6,24.16,6T1823.15,341.71Zm228,18.34q-20,15.09-50.41,15.09-21.4,0-37.11-6.86a73.16,73.16,0,0,1-26.41-19.2,81.52,81.52,0,0,1-16-29.49,141.12,141.12,0,0,1-6-37.38,106.1,106.1,0,0,1,6.21-37A88.56,88.56,0,0,1,1938.8,216a79.09,79.09,0,0,1,26.58-19.2A81.66,81.66,0,0,1,1999,190q23.82,0,39.53,9.78a78,78,0,0,1,25.2,24.86,98.18,98.18,0,0,1,13.12,32.91,140.6,140.6,0,0,1,2.93,34h-133.6a70,70,0,0,0,2.76,22.12,49.9,49.9,0,0,0,10,18.51A49.1,49.1,0,0,0,1976.6,345q10.7,4.82,25.2,4.8,18.65,0,30.55-8.57t15.71-26.06h29Q2071.18,345,2051.17,360.05Zm-7.08-113.84a50,50,0,0,0-10.7-16,53.1,53.1,0,0,0-56.62-10.63,47.48,47.48,0,0,0-15.71,10.81,51.69,51.69,0,0,0-10.35,15.94,60.18,60.18,0,0,0-4.49,19.37h102.53A59.47,59.47,0,0,0,2044.09,246.21ZM302.9,180a80.62,80.62,0,0,0,13.44-10.37c.8-.77,1.55-1.54,2.31-2.31a81.89,81.89,0,0,0,7.92-9.37,62.37,62.37,0,0,0,6.27-10.77,48.6,48.6,0,0,0,4.36-16.4c1.49-19.39-10-38.67-35.62-54.22L198.42,14,78.16,129.22l-78.29,75,108.6,65.9a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.8,66.42-25.69,19.16-18.36,25.52-42.12,13.7-61.87a49.69,49.69,0,0,0-6.8-8.87,89.78,89.78,0,0,0,19.28,2.15H259a85.09,85.09,0,0,0,31-5.79A80.88,80.88,0,0,0,302.9,180Zm-100.59,59.8c-19.32,18.51-50.4,21.24-75.7,5.9l-75.13-45.6,67.44-64.65,76.42,46.39C222.88,198.57,221.36,221.6,202.31,239.84Zm8.94-82.21L140.6,114.74,205,53l69.37,42.11c25.94,15.73,29.31,37.05,10.55,55A60.71,60.71,0,0,1,211.25,157.63Zm29.86,190c-19.57,18.75-46.17,29.08-74.88,29.08a123.84,123.84,0,0,1-64.11-18.19L-.13,296.51v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.85,87.85,0,0,1,241.11,347.67Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,257.52V282.2l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.68,12.88-12.35,20-27.13,19.68-41.5v-1.79A86.86,86.86,0,0,1,241.11,308.68Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,218.54v24.68l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.69,12.88-12.34,20-27.12,19.68-41.49v-1.82A87.14,87.14,0,0,1,241.11,269.7Zm83.69,25.74a94.16,94.16,0,0,1-60.19,25.86h0V348a81.6,81.6,0,0,0,51.73-22.37c14-13.38,21.15-28.11,21-42.64v-2.2A95.14,95.14,0,0,1,324.8,295.44Zm-83.69,91.21c-19.57,18.75-46.17,29.09-74.88,29.09a123.76,123.76,0,0,1-64.11-18.2L-.13,335.49v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.35,87.35,0,0,1,241.11,386.65Zm85.75-210.21c-.68.69-1.35,1.38-2.06,2.05a99.19,99.19,0,0,1-22.23,15.69,94.53,94.53,0,0,1-26.24,8.71,97.84,97.84,0,0,1-14.16,1.57c.5,1.61.9,3.25,1.25,4.9a52.7,52.7,0,0,1,1.13,12V231h.05A84.48,84.48,0,0,0,290,225.47a80.83,80.83,0,0,0,26.38-16.82c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,62.85,62.85,0,0,0,6.29-10.78,48.5,48.5,0,0,0,4.32-16.44c.09-1.23.2-2.47.19-3.7v-2c-.72,1-1.48,2.06-2.26,3.09A98,98,0,0,1,326.86,176.44Zm0,77.92c-.68.7-1.3,1.41-2,2.1a94.09,94.09,0,0,1-60.19,25.85h0V309h0a81.65,81.65,0,0,0,51.73-22.37,73.51,73.51,0,0,0,16.48-22.49,48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.48.19-3.71v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A95.81,95.81,0,0,1,326.82,254.36Zm0-39c-.68.7-1.3,1.41-2,2.1a92.22,92.22,0,0,1-10.62,8.65,93.53,93.53,0,0,1-11.63,7,95.63,95.63,0,0,1-37.94,10.18h-.05l0,26.67h0a81.63,81.63,0,0,0,51.73-22.37c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,63.16,63.16,0,0,0,6.29-10.77,48.55,48.55,0,0,0,4.32-16.45c.09-1.23.2-2.47.19-3.7v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A98.19,98.19,0,0,1,326.82,215.38Z"})})},fa=(0,Xe.A)({svg:{width:"auto",height:28},path:{fill:"#7df3e1"}}),ma=()=>{const r=fa();return(0,a.jsx)("svg",{className:r.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 337.46 428.5",children:(0,a.jsx)("path",{className:r.path,d:"M303,166.05a80.69,80.69,0,0,0,13.45-10.37c.79-.77,1.55-1.53,2.3-2.3a83.12,83.12,0,0,0,7.93-9.38A63.69,63.69,0,0,0,333,133.23a48.58,48.58,0,0,0,4.35-16.4c1.49-19.39-10-38.67-35.62-54.22L198.56,0,78.3,115.23,0,190.25l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.69,19.16-18.36,25.52-42.12,13.7-61.87a49.22,49.22,0,0,0-6.8-8.87A89.17,89.17,0,0,0,259,178.29h.15a85.08,85.08,0,0,0,31-5.79A80.88,80.88,0,0,0,303,166.05ZM202.45,225.86c-19.32,18.51-50.4,21.23-75.7,5.9L51.61,186.15l67.45-64.64,76.41,46.38C223,184.58,221.49,207.61,202.45,225.86Zm8.93-82.22-70.65-42.89L205.14,39,274.51,81.1c25.94,15.72,29.31,37,10.55,55A60.69,60.69,0,0,1,211.38,143.64Zm29.86,190c-19.57,18.75-46.17,29.09-74.88,29.09a123.73,123.73,0,0,1-64.1-18.2L0,282.52v24.67L108.6,373.1a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.27,87.27,0,0,1,241.24,333.68Zm0-39c-19.57,18.75-46.17,29.08-74.88,29.08a123.81,123.81,0,0,1-64.1-18.19L0,243.53v24.68l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.5v-1.78A87.27,87.27,0,0,1,241.24,294.7Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.81,123.81,0,0,1-64.1-18.19L0,204.55v24.68l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.68,12.88-12.35,20-27.13,19.68-41.5v-1.82A86.09,86.09,0,0,1,241.24,255.71Zm83.7,25.74a94.15,94.15,0,0,1-60.2,25.86h0V334a81.6,81.6,0,0,0,51.74-22.37c14-13.38,21.14-28.11,21-42.64v-2.19A94.92,94.92,0,0,1,324.94,281.45Zm-83.7,91.21c-19.57,18.76-46.17,29.09-74.88,29.09a123.73,123.73,0,0,1-64.1-18.2L0,321.5v24.68l108.6,65.9a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.8,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A86.29,86.29,0,0,1,241.24,372.66ZM327,162.45c-.68.69-1.35,1.38-2.05,2.06a94.37,94.37,0,0,1-10.64,8.65,91.35,91.35,0,0,1-11.6,7,94.53,94.53,0,0,1-26.24,8.71,97.69,97.69,0,0,1-14.16,1.57c.5,1.61.9,3.25,1.25,4.9a53.27,53.27,0,0,1,1.14,12V217h.05a84.41,84.41,0,0,0,25.35-5.55,81,81,0,0,0,26.39-16.82c.8-.77,1.5-1.56,2.26-2.34a82.08,82.08,0,0,0,7.93-9.38A63.76,63.76,0,0,0,333,172.17a48.55,48.55,0,0,0,4.32-16.45c.09-1.23.2-2.47.19-3.7V150q-1.08,1.54-2.25,3.09A96.73,96.73,0,0,1,327,162.45Zm0,77.92c-.69.7-1.31,1.41-2,2.1a94.2,94.2,0,0,1-60.2,25.86h0l0,26.67h0a81.6,81.6,0,0,0,51.74-22.37A73.51,73.51,0,0,0,333,250.13a48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.47.19-3.71v-2.19c-.74,1.07-1.46,2.15-2.27,3.21A95.68,95.68,0,0,1,327,240.37Zm0-39c-.69.7-1.31,1.41-2,2.1a93.18,93.18,0,0,1-10.63,8.65,91.63,91.63,0,0,1-11.63,7,95.47,95.47,0,0,1-37.94,10.18h0V256h0a81.65,81.65,0,0,0,51.74-22.37c.8-.77,1.5-1.56,2.26-2.34a82.08,82.08,0,0,0,7.93-9.38A63.76,63.76,0,0,0,333,211.15a48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.48.19-3.71v-2.2c-.74,1.08-1.46,2.16-2.27,3.22A95.68,95.68,0,0,1,327,201.39Z"})})};var Ce=t(72664);const Ar={isOpen:!1,setOpen:()=>{}},xr=(0,ft.createContext)(Ar),Cr=(0,se.tK)("sidebar-open-state-context");function br(r){const{children:e,value:n}=r;return(0,a.jsx)(xr.Provider,{value:n,children:(0,a.jsx)(Cr.Provider,{value:(0,ce.B)({1:n}),children:e})})}const Ns=()=>{const r=(0,ft.useContext)(Cr),e=(0,ft.useContext)(xr);if(r===void 0)return e||Ar;const n=r.atVersion(1);if(n===void 0)throw new Error("No context found for version 1.");return n};var Sr=t(72072),Or=t(73524),rn=t(10394),Pr=t(5893),ya=t(53373),cn=t.n(ya),va=t(1125),Tr=t(29365),Ea=t(73845),ks=t(72501),Aa=t(32881),xa=t(27326),Ca=t(13085);const wr=(0,ft.createContext)({selectedMenuItemIndex:-1,setSelectedMenuItemIndex:()=>{}});var Ws=t(34435);const ba=(0,Xe.A)(r=>({root:{flexGrow:0,margin:r.spacing(0,2),color:r.palette.navigation.color},selected:e=>({color:`${r.palette.navigation.selectedColor}!important`,borderTop:`solid ${e.sidebarConfig.selectedIndicatorWidth}px ${r.palette.navigation.indicator}`,marginTop:"-1px"}),label:{display:"none"}})),Sa=r=>{const{to:e,label:n,icon:o,value:i}=r,{sidebarConfig:c}=(0,ft.useContext)(Ce.yY),A=ba({sidebarConfig:c}),y=(0,p.zy)(),{selectedMenuItemIndex:w,setSelectedMenuItemIndex:F}=(0,ft.useContext)(wr),tt=(St,Tt)=>{F(Tt===w?-1:Tt)},mt=i===w&&w>=0||i!==w&&!(w>=0)&&e===y.pathname;return(0,a.jsx)(Ca.A,{"aria-label":n,label:n,icon:o,component:Sr.N_,to:e||y.pathname,onChange:tt,value:i,selected:mt,classes:A})},Rr=r=>{const{children:e,to:n,label:o,icon:i,value:c}=r,{isMobile:A}=(0,Ws.Ut)();return A?(0,a.jsx)(Sa,{to:n,label:o,icon:i,value:c}):(0,a.jsx)(a.Fragment,{children:e})},Ir=(0,Xe.A)(r=>({root:{position:"fixed",backgroundColor:r.palette.navigation.background,color:r.palette.navigation.color,bottom:0,left:0,right:0,zIndex:r.zIndex.snackbar,borderTop:"1px solid #383838","@media print":{display:"none"}},overlay:e=>({background:r.palette.navigation.background,width:"100%",bottom:`${e.sidebarConfig.mobileSidebarHeight}px`,height:`calc(100% - ${e.sidebarConfig.mobileSidebarHeight}px)`,flex:"0 1 auto",overflow:"auto"}),overlayHeader:{display:"flex",color:r.palette.navigation.color,alignItems:"center",justifyContent:"space-between",padding:r.spacing(2,3)},overlayHeaderClose:{color:r.palette.navigation.color},marginMobileSidebar:e=>({marginBottom:`${e.sidebarConfig.mobileSidebarHeight}px`})})),Oa=r=>(0,xn.orderBy)(r,({props:{priority:e}})=>Number.isInteger(e)?e:-1,"desc"),Pa=(0,ft.createElement)(Rr).type,Ta=({children:r,label:e="Menu",open:n,onClose:o})=>{const{sidebarConfig:i}=(0,ft.useContext)(Ce.yY),c=Ir({sidebarConfig:i});return(0,a.jsxs)(Ea.Ay,{anchor:"bottom",open:n,onClose:o,ModalProps:{BackdropProps:{classes:{root:c.marginMobileSidebar}}},classes:{root:c.marginMobileSidebar,paperAnchorBottom:c.overlay},children:[(0,a.jsxs)(rn.A,{className:c.overlayHeader,children:[(0,a.jsx)(ks.A,{variant:"h3",children:e}),(0,a.jsx)(Tr.A,{onClick:o,classes:{root:c.overlayHeaderClose},children:(0,a.jsx)(Aa.A,{})})]}),(0,a.jsx)(rn.A,{component:"nav",children:r})]})},wa=r=>{const{sidebarConfig:e}=(0,ft.useContext)(Ce.yY),{children:n}=r,o=Ir({sidebarConfig:e}),i=(0,p.zy)(),[c,A]=(0,ft.useState)(-1);(0,ft.useEffect)(()=>{A(-1)},[i.pathname]);let y=(0,ns.O)(n,F=>F.getElements().filter(tt=>tt.type===Pa));if(n)y.length?y=Oa(y):y.push((0,a.jsx)(Rr,{icon:(0,a.jsx)(xa.A,{}),children:n},"default_menu"));else return null;const w=c>=0&&!y[c].props.to;return(0,a.jsx)(br,{value:{isOpen:!0,setOpen:()=>{}},children:(0,a.jsxs)(wr.Provider,{value:{selectedMenuItemIndex:c,setSelectedMenuItemIndex:A},children:[(0,a.jsx)(Ta,{label:y[c]&&y[c].props.label,open:w,onClose:()=>A(-1),children:y[c]&&y[c].props.children}),(0,a.jsx)(va.A,{className:o.root,"data-testid":"mobile-sidebar-root",component:"nav",children:y})]})})};var Ra=t(87849),Ia=t(10315);const Dr=(0,Xe.A)(r=>({root:{left:0,top:0,bottom:0,zIndex:r.zIndex.appBar,position:"fixed"},drawer:{display:"flex",flexFlow:"column nowrap",alignItems:"flex-start",left:0,top:0,bottom:0,position:"absolute",background:r.palette.navigation.background,overflowX:"hidden",msOverflowStyle:"none",scrollbarWidth:"none",transition:r.transitions.create("width",{easing:r.transitions.easing.sharp,duration:r.transitions.duration.shortest}),"& > *":{flexShrink:0},"&::-webkit-scrollbar":{display:"none"},"@media print":{display:"none"}},drawerWidth:e=>({width:e.sidebarConfig.drawerWidthClosed}),drawerOpen:e=>({width:e.sidebarConfig.drawerWidthOpen,transition:r.transitions.create("width",{easing:r.transitions.easing.sharp,duration:r.transitions.duration.shorter})}),visuallyHidden:{top:0,position:"absolute",zIndex:1e3,transform:"translateY(-200%)","&:focus":{transform:"translateY(5px)"}}}),{name:"BackstageSidebar"});var Da=function(r){return r[r.Closed=0]="Closed",r[r.Idle=1]="Idle",r[r.Open=2]="Open",r}(Da||{});const La=r=>{const{sidebarConfig:e}=(0,ft.useContext)(Ce.yY),{openDelayMs:n=e.defaultOpenDelayMs,closeDelayMs:o=e.defaultCloseDelayMs,disableExpandOnHover:i,children:c}=r,A=Dr({sidebarConfig:e}),y=(0,Pr.A)(Be=>Be.breakpoints.down("md"),{noSsr:!0}),[w,F]=(0,ft.useState)(0),tt=(0,ft.useRef)(),{isPinned:mt,toggleSidebarPinState:St}=(0,Ws.Ut)(),Tt=()=>{mt||i||(tt.current&&(clearTimeout(tt.current),tt.current=void 0),w!==2&&!y&&(tt.current=window.setTimeout(()=>{tt.current=void 0,F(2)},n),F(1)))},Dt=()=>{mt||i||(tt.current&&(clearTimeout(tt.current),tt.current=void 0),w===1?F(0):w===2&&(tt.current=window.setTimeout(()=>{tt.current=void 0,F(0)},o)))},Yt=w===2&&!y||mt,me=Be=>{Be?(F(2),St()):(F(0),St())};return(0,a.jsxs)("nav",{style:{},"aria-label":"sidebar nav",children:[(0,a.jsx)(Ba,{}),(0,a.jsx)(br,{value:{isOpen:Yt,setOpen:me},children:(0,a.jsx)(rn.A,{className:A.root,"data-testid":"sidebar-root",onMouseEnter:i?()=>{}:Tt,onFocus:i?()=>{}:Tt,onMouseLeave:i?()=>{}:Dt,onBlur:i?()=>{}:Dt,children:(0,a.jsx)(rn.A,{className:cn()(A.drawer,A.drawerWidth,{[A.drawerOpen]:Yt}),children:c})})})]})},Ma=r=>{const e=(0,Ce.Rv)(r.sidebarOptions??{}),n=(0,Ce.i8)(r.submenuOptions??{}),{children:o,disableExpandOnHover:i,openDelayMs:c,closeDelayMs:A}=r,{isMobile:y}=(0,Ws.Ut)();return y?(0,a.jsx)(wa,{children:o}):(0,a.jsx)(Ce.yY.Provider,{value:{sidebarConfig:e,submenuConfig:n},children:(0,a.jsx)(La,{openDelayMs:c,closeDelayMs:A,disableExpandOnHover:i,children:o})})};function Ba(){const{sidebarConfig:r}=(0,ft.useContext)(Ce.yY),{focusContent:e,contentRef:n}=(0,Or.H)(),o=Dr({sidebarConfig:r}),{t:i}=(0,Ra.i)(Ia.O);return n?.current?(0,a.jsx)(d.A,{onClick:e,variant:"contained",className:cn()(o.visuallyHidden),children:i("skipToContent")}):null}var ja=t(94509),rs=t(58502),Ua=t(79065),$a=t(55704),Lr=t(62248);const Fa=(0,Xe.A)(r=>({root:{zIndex:1e3,position:"relative",overflow:"visible",width:r.spacing(7)+1},drawer:e=>({display:"flex",flexFlow:"column nowrap",alignItems:"flex-start",position:"fixed",opacity:0,[r.breakpoints.up("sm")]:{marginLeft:e.left,transition:r.transitions.create(["margin-left","opacity"],{easing:r.transitions.easing.sharp,duration:e.submenuConfig.defaultOpenDelayMs})},top:0,bottom:0,padding:0,background:r.palette.navigation.submenu?.background??"#404040",overflowX:"hidden",msOverflowStyle:"none",scrollbarWidth:"none",cursor:"default",width:e.submenuConfig.drawerWidthClosed,transitionDelay:`${e.submenuConfig.defaultOpenDelayMs}ms`,"& > *":{flexShrink:0},"&::-webkit-scrollbar":{display:"none"}}),drawerOpen:e=>({marginLeft:e.left,opacity:1,width:e.submenuConfig.drawerWidthOpen,[r.breakpoints.down("xs")]:{width:"100%",position:"relative",paddingLeft:r.spacing(3),left:0,top:0}}),title:{fontSize:r.typography.h5.fontSize,fontWeight:r.typography.fontWeightMedium,color:r.palette.navigation.color,padding:r.spacing(2.5),[r.breakpoints.down("xs")]:{display:"none"}}}),{name:"BackstageSidebarSubmenu"}),Na=r=>{const{isOpen:e}=Ns(),{sidebarConfig:n,submenuConfig:o}=(0,ft.useContext)(Ce.yY),i=e?n.drawerWidthOpen:n.drawerWidthClosed,c=Fa({left:i,submenuConfig:o}),{isHoveredOn:A}=(0,ft.useContext)(Ce.U1),[y,w]=(0,ft.useState)(!1);return(0,ft.useEffect)(()=>{w(A)},[A]),(0,a.jsxs)(rn.A,{className:cn()(c.drawer,{[c.drawerOpen]:y}),children:[(0,a.jsx)(ks.A,{variant:"h5",component:"span",className:c.title,children:r.title}),r.children]})};var ka=t(45810),Mr=t.n(ka);function Br(r,e,n=!1){const o=new URLSearchParams(e.search).toString(),i=Mr().parse(o),c=new URLSearchParams(r.search).toString(),A=Mr().parse(c),y=n?xn.isEqual:xn.isMatch;return(0,xn.isEqual)(e.pathname,r.pathname)&&y(A,i)}const Wa=r=>(0,Xe.A)(e=>({root:{color:e.palette.navigation.color,display:"flex",flexFlow:"row nowrap",alignItems:"center",height:48,cursor:"pointer"},buttonItem:{background:"none",border:"none",width:"100%",margin:0,padding:0,textAlign:"inherit",font:"inherit",textTransform:"none"},closed:{width:r.drawerWidthClosed,justifyContent:"center"},open:{[e.breakpoints.up("sm")]:{width:r.drawerWidthOpen}},highlightable:{"&:hover":{background:e.palette.navigation.navItem?.hoverBackground??"#404040"}},highlighted:{background:e.palette.navigation.navItem?.hoverBackground??"#404040"},label:{fontWeight:"bold",whiteSpace:"nowrap",lineHeight:"auto",flex:"3 1 auto",width:"110px",overflow:"hidden","text-overflow":"ellipsis"},iconContainer:{boxSizing:"border-box",height:"100%",width:r.iconContainerWidth,marginRight:-e.spacing(2),display:"flex",alignItems:"center",justifyContent:"center",lineHeight:"0"},searchRoot:{marginBottom:12},searchField:{color:"#b5b5b5",fontWeight:e.typography.fontWeightBold,fontSize:e.typography.fontSize},searchFieldHTMLInput:{padding:e.spacing(2,0,2)},searchContainer:{width:r.drawerWidthOpen-r.iconContainerWidth},secondaryAction:{width:e.spacing(6),textAlign:"center",marginRight:e.spacing(1)},closedItemIcon:{width:"100%",justifyContent:"center"},submenuArrow:{display:"flex"},expandButton:{background:"none",border:"none",color:e.palette.navigation.color,width:"100%",cursor:"pointer",position:"relative",height:48},arrows:{position:"absolute",right:10},selected:{"&$root":{borderLeft:`solid ${r.selectedIndicatorWidth}px ${e.palette.navigation.indicator}`,color:e.palette.navigation.selectedColor},"&$closed":{width:r.drawerWidthClosed},"& $closedItemIcon":{paddingRight:r.selectedIndicatorWidth},"& $iconContainer":{marginLeft:-r.selectedIndicatorWidth}}}),{name:"BackstageSidebarItem"});function os(r){return(0,ft.useMemo)(()=>Wa(r),[r])()}const Ka=(r,e)=>(0,ns.O)(r.props.children,n=>{let o=!1;return n.getElements().forEach(({props:{to:i,dropdownItems:c}})=>{if(!o){if(c?.length){c.forEach(({to:A})=>o=o||Br(e,(0,wn.o1)(A)));return}i&&(o=Br(e,(0,wn.o1)(i)))}}),o},[e.pathname]);function Ks(r){return r.to===void 0}const za=(0,ft.createElement)(Na).type,Ha=(0,ft.forwardRef)(function({to:e,end:n,style:o,className:i,activeStyle:c,caseSensitive:A,activeClassName:y="active","aria-current":w="page",...F},tt){let{pathname:mt}=(0,p.zy)(),{pathname:St}=(0,p.x$)(e);A||(mt=mt.toLocaleLowerCase("en-US"),St=St.toLocaleLowerCase("en-US"));let Tt=mt===St;!Tt&&!n&&(Tt=mt.startsWith(`${St}/`));const Dt=Tt?w:void 0;return(0,a.jsx)(O.N_,{...F,to:e,ref:tt,"aria-current":Dt,style:{...o,...Tt?c:void 0},className:cn()([typeof i!="function"?i:void 0,Tt?y:void 0])})}),jr=(0,ft.forwardRef)((r,e)=>{const{icon:n,text:o,hasNotifications:i=!1,hasSubmenu:c=!1,disableHighlight:A=!1,onClick:y,noTrack:w,children:F,className:tt,...mt}=r,{sidebarConfig:St}=(0,ft.useContext)(Ce.yY),Tt=os(St),{isOpen:Dt}=Ns(),Yt=!Dt&&c?{display:"flex",marginLeft:"20px"}:{lineHeight:"0"},me=(0,a.jsxs)(rn.A,{style:Yt,children:[(0,a.jsx)(n,{fontSize:"small"}),!Dt&&c?(0,a.jsx)(Lr.A,{fontSize:"small"}):(0,a.jsx)(a.Fragment,{})]}),Be=(0,a.jsx)(ja.A,{color:"secondary",variant:"dot",overlap:"circular",invisible:!i,className:cn()({[Tt.closedItemIcon]:!Dt}),children:me}),De=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(rn.A,{"data-testid":"login-button",className:Tt.iconContainer,children:Be}),o&&(0,a.jsx)(ks.A,{variant:"subtitle2",component:"span",className:Tt.label,children:o}),(0,a.jsx)("div",{className:Tt.secondaryAction,children:F})]}),ln=Dt?De:Be,Fr={onClick:y,className:cn()(tt,Tt.root,Dt?Tt.open:Tt.closed,Ks(r)&&Tt.buttonItem,{[Tt.highlightable]:!A})},Nr=(0,ir.s)(),{pathname:zs}=(0,p.x$)(!Ks(r)&&r.to?r.to:""),kr=(0,ft.useCallback)(hi=>{if(!w){const pi="click",gi=o??"Sidebar Item",fi=zs?{attributes:{to:zs}}:void 0;Nr.captureEvent(pi,gi,fi)}y?.(hi)},[Nr,o,zs,w,y]);return Ks(r)?(0,a.jsx)(d.A,{role:"button","aria-label":o,...Fr,ref:e,onClick:kr,children:ln}):(0,a.jsx)(Ha,{...Fr,activeClassName:Tt.selected,to:r.to?r.to:"",ref:e,"aria-label":o||r.to,...mt,onClick:kr,children:ln})}),Va=({children:r,...e})=>{const{sidebarConfig:n}=(0,ft.useContext)(Ce.yY),o=os(n),[i,c]=(0,ft.useState)(!1),A=(0,p.zy)(),y=Ka(r,A),w=(0,Pr.A)(St=>St.breakpoints.down("sm")),F=()=>{c(!0)},tt=()=>{c(!1)},mt=()=>w?i?(0,a.jsx)($a.A,{fontSize:"small",className:o.submenuArrow}):(0,a.jsx)(Ua.A,{fontSize:"small",className:o.submenuArrow}):!i&&(0,a.jsx)(Lr.A,{fontSize:"small",className:o.submenuArrow});return(0,a.jsx)(Ce.U1.Provider,{value:{isHoveredOn:i,setIsHoveredOn:c},children:(0,a.jsxs)("div",{"data-testid":"item-with-submenu",onMouseLeave:tt,onTouchStart:i?tt:F,onMouseEnter:F,className:cn()(i&&o.highlighted),children:[(0,a.jsx)(jr,{hasSubmenu:!0,className:y?o.selected:"",...e,children:mt()}),i&&r]})})},Ur=(0,ft.forwardRef)((r,e)=>{const[n]=(0,ns.O)(r.children,o=>o.getElements().filter(i=>i.type===za));return n?(0,a.jsx)(Va,{...r,children:n}):(0,a.jsx)(jr,{...r,ref:e})});function Li(r){const{sidebarConfig:e}=useContext(SidebarConfigContext),[n,o]=useState(""),i=os(e),c=r.icon?r.icon:SearchIcon,A=()=>{r.onSearch(n),o("")},y=mt=>{mt.key==="Enter"&&(mt.preventDefault(),A())},w=mt=>{o(mt.target.value)},F=mt=>{mt.preventDefault(),mt.stopPropagation()},tt=mt=>{A(),mt.preventDefault()};return _jsx(Box,{className:i.searchRoot,children:_jsx(Ur,{icon:c,to:r.to,onClick:tt,disableHighlight:!0,children:_jsx(TextField,{placeholder:"Search",value:n,onClick:F,onChange:w,onKeyDown:y,className:i.searchContainer,InputProps:{disableUnderline:!0,className:i.searchField},inputProps:{className:i.searchFieldHTMLInput}})})})}const Mi=(0,rs.A)("div")({flex:1},{name:"BackstageSidebarSpace"}),Bi=(0,rs.A)("div")({height:8},{name:"BackstageSidebarSpacer"}),Ga=(0,rs.A)("hr")(({theme:r})=>({height:1,width:"100%",background:"#383838",border:"none",margin:r.spacing(1.2,0)}),{name:"BackstageSidebarDivider"}),Ya=r=>({overflowY:"auto","&::-webkit-scrollbar":{backgroundColor:r.palette.background.default,width:"5px",borderRadius:"5px"},"&::-webkit-scrollbar-thumb":{backgroundColor:r.palette.text.secondary,borderRadius:"5px"}}),ji=(0,rs.A)("div")(({theme:r})=>{const e=Ya(r);return{flex:"0 1 auto",overflowX:"hidden",width:"100%",minHeight:"48px",overflowY:"hidden","@media (hover: none)":e,"&:hover":e}}),Ui=()=>{const{sidebarConfig:r}=useContext(SidebarConfigContext),e=os(r),{isOpen:n,setOpen:o}=useSidebarOpenState();if(useMediaQuery(A=>A.breakpoints.down("md"),{noSsr:!0}))return null;const c=()=>{o(!n)};return _jsx(Button,{role:"button",onClick:c,className:e.expandButton,"aria-label":"Expand Sidebar","data-testid":"sidebar-expand-button",children:_jsx(Box,{className:e.arrows,children:n?_jsx(DoubleArrowLeft,{}):_jsx(DoubleArrowRight,{})})})},Qa=(0,Xe.A)({root:{width:Ce.hC.drawerWidthClosed,height:3*Ce.hC.logoHeight,display:"flex",flexFlow:"row nowrap",alignItems:"center",marginBottom:-14},link:{width:Ce.hC.drawerWidthClosed,marginLeft:24}}),Za=()=>{const r=Qa(),{isOpen:e}=Ns();return(0,a.jsx)("div",{className:r.root,children:(0,a.jsx)(Sr.N_,{to:"/docs/default/component/local/",underline:"none",className:r.link,children:e?(0,a.jsx)(ga,{}):(0,a.jsx)(ma,{})})})},Ja=({children:r})=>(0,a.jsxs)(Or.G,{children:[(0,a.jsxs)(Ma,{children:[(0,a.jsx)(Za,{}),(0,a.jsx)(Ga,{}),(0,a.jsx)(Ur,{icon:ha.A,to:"/docs/default/component/local",text:"Docs Preview"})]}),r]});var Xa=t(71677),_a=t(62437),qa=t(55484),ti=t(45061),ei=t(29729);const ni=(0,Xe.A)(r=>({headerIcon:{color:r.palette.common.white,width:"32px",height:"32px"},content:{backgroundColor:r.palette.background.default},contentToolbar:{display:"flex",justifyContent:"flex-end",padding:0}}));var si=function(r){return r.LIGHT="light",r.DARK="dark",r}(si||{});const ri=()=>{const r=(0,Tn.gf)(Zn),e=ni(),[n,o]=(0,ft.useState)(r.getActiveThemeId()==="dark"?"dark":"light"),i={light:{icon:qa.A,title:"Dark theme"},dark:{icon:_a.A,title:"Light theme"}},{title:c,icon:A}=i[n],y=()=>{o(w=>{const F=w==="light"?"dark":"light";return r.setActiveThemeId(F),F})};return(0,a.jsx)(rn.A,{display:"flex",alignItems:"center",mr:2,children:(0,a.jsx)(Xa.Ay,{title:c,arrow:!0,children:(0,a.jsx)(Tr.A,{size:"small",onClick:y,children:(0,a.jsx)(A,{className:e.headerIcon})})})})},oi=()=>(0,a.jsxs)(b.Wj,{children:[(0,a.jsx)(ti.T,{}),(0,a.jsx)(ei.p,{withSearch:!1})]}),ai=(0,a.jsx)(oi,{}),$r=Fo({apis:ia,configLoader:ua,plugins:Object.values(s)}),ii=$r.getProvider(),ci=$r.getRouter(),li=b.Ju.provide((0,u.Hr)({name:"ThemeToggleAddon",component:ri,location:f.e.Header})),di=(0,a.jsxs)(gr,{children:[(0,a.jsx)(p.C5,{to:"/docs/default/component/local/"},"/"),(0,a.jsx)(p.qh,{path:"/catalog/:namespace/:kind/:name",element:(0,a.jsx)(ra,{})}),(0,a.jsx)(p.qh,{path:"/docs",element:(0,a.jsx)(b.$j,{}),children:(0,a.jsx)(g.K,{})}),(0,a.jsxs)(p.qh,{path:"/docs/:namespace/:kind/:name/*",element:(0,a.jsx)(b.Wj,{}),children:[ai,(0,a.jsx)(u.po,{children:(0,a.jsx)(li,{})})]})]}),ui=()=>(0,a.jsx)(ii,{children:(0,a.jsx)(ci,{children:(0,a.jsx)(Ja,{children:di})})});x.createRoot(document.getElementById("root")).render((0,a.jsx)(ui,{}))},43836:(H,S,t)=>{"use strict";t.d(S,{qO:()=>p,tK:()=>x});var s=t(14041),a=t(63544);function x(g){return(0,a.Q)(g,()=>(0,s.createContext)(void 0))}function p(g){return(0,s.useContext)(x(g))}function b(g){return{set(u){globalThis[`__@backstage/${g}__`]=createContext(createVersionedValueMap(u))},reset(){delete globalThis[`__@backstage/${g}__`]}}}},10602:(H,S,t)=>{"use strict";t.d(S,{B:()=>s});function s(a){Object.freeze(a);const x={atVersion(p){return a[p]}};return Object.defineProperty(x,"$map",{configurable:!0,enumerable:!0,get(){return a}}),x}},63544:(H,S,t)=>{"use strict";t.d(S,{Q:()=>p});function s(){return typeof window<"u"&&window.Math===Math?window:typeof self<"u"&&self.Math===Math?self:Function("return this")()}const a=s(),x=b=>`__@backstage/${b}__`;function p(b,g){const u=x(b);let f=a[u];return f||(f=g(),a[u]=f,f)}},7341:(H,S,t)=>{"use strict";t.d(S,{v:()=>a});var s=t(55309);const a=(0,s.y)({id:"plugin.catalog.service"})},82292:(H,S,t)=>{"use strict";t.d(S,{n:()=>a});var s=t(55309);const a=(0,s.y)({id:"plugin.catalog.entity-presentation"})},88083:(H,S,t)=>{"use strict";t.d(S,{T:()=>b});var s=t(6820),a=t(72348),x=t(46123),p=t.n(x);function b(d,v){const{kind:h,namespace:C,name:O,title:P,description:B,displayName:M,type:I}=u(d),D=(0,s.U2)({kind:h||"unknown",namespace:C||a.oQ,name:O||"unknown"}),$=f({kind:h,namespace:C,name:O,context:v}),k=[M,P,$].find(z=>z&&typeof z=="string"),X=[k!==D?D:void 0,I,B].filter(z=>z&&typeof z=="string").join(" | ");return{entityRef:D,primaryTitle:k,secondaryTitle:X||void 0,Icon:void 0}}const g=d=>!!d&&typeof d=="string";function u(d){if(typeof d=="string"){let v=d.indexOf(":");const h=d.indexOf("/");h!==-1&&h<v&&(v=-1);const C=v===-1?void 0:d.slice(0,v),O=h===-1?void 0:d.slice(v+1,h),P=d.slice(Math.max(v+1,h+1));return{kind:C,namespace:O,name:P}}if(typeof d=="object"&&d!==null){const v=[p()(d,"kind")].find(g),h=[p()(d,"metadata.namespace"),p()(d,"namespace")].find(g),C=[p()(d,"metadata.name"),p()(d,"name")].find(g),O=[p()(d,"metadata.title")].find(g),P=[p()(d,"metadata.description")].find(g),B=[p()(d,"spec.profile.displayName")].find(g),M=[p()(d,"spec.type")].find(g);return{kind:v,namespace:h,name:C,title:O,description:P,displayName:B,type:M}}return{}}function f(d){const v=d.kind?.toLocaleLowerCase("en-US")||"unknown",h=d.namespace||a.oQ,C=d.name||"unknown",O=d.context?.defaultKind?.toLocaleLowerCase("en-US"),P=d.context?.defaultNamespace?.toLocaleLowerCase("en-US");let B=C;return(P&&h.toLocaleLowerCase("en-US")!==P||h!==a.oQ)&&(B=`${h}/${B}`),O&&v.toLocaleLowerCase("en-US")!==O&&(B=`${v}:${B}`),B}},3169:(H,S,t)=>{"use strict";t.d(S,{f:()=>u});var s=t(6820),a=t(72427),x=t(14041),p=t(82292),b=t(88083);function g(f,d,v){const[h,C]=(0,x.useState)(f);return(0,x.useEffect)(()=>{C(f);const O=d?.subscribe({next:P=>{C(P)},complete:()=>{O?.unsubscribe()}});return()=>{O?.unsubscribe()}},v),h}function u(f,d){const h=(0,a.Q2)().get(p.n),C=[h,JSON.stringify(f),JSON.stringify(d||null)],O=(0,x.useMemo)(()=>{if(!h){const P=(0,b.T)(f,d);return{snapshot:P,promise:Promise.resolve(P)}}return h.forEntity(typeof f=="string"||"metadata"in f?f:(0,s.U2)(f),d)},C);return g(O.snapshot,O.update$,[O])}},18:(H,S,t)=>{"use strict";t.d(S,{a:()=>a});var s=t(55309);const a=(0,s.y)({id:"catalog-react.starred-entities"})},22995:(H,S,t)=>{"use strict";t.d(S,{Q:()=>z});var s=t(31085),a=t(10394),x=t(72501),p=t(4321),b=t(87263),g=t(16249),u=t(33145),f=t(58837),d=t(87051),v=t(12398),h=t(6924),C=t(20577),O=t(14041),P=t(45250),B=t.n(P),M=t(53373),I=t.n(M);const D=(0,f.A)(Y=>({root:{margin:Y.spacing(1,0)},label:{position:"relative",fontWeight:"bold",fontSize:Y.typography.body2.fontSize,fontFamily:Y.typography.fontFamily,color:Y.palette.text.primary,"& > span":{top:0,left:0,position:"absolute"}}}),{name:"BackstageAutocomplete"}),$=(0,d.A)(Y=>(0,v.A)({root:{},paper:{margin:0},hasClearIcon:{},hasPopupIcon:{},focused:{},inputRoot:{marginTop:24,backgroundColor:Y.palette.background.paper,"$root$hasClearIcon$hasPopupIcon &":{paddingBlock:Y.spacing(.75),paddingInlineStart:Y.spacing(.75)},"$root$focused &":{outline:"none"},"$root &:hover > fieldset":{borderColor:"#ced4da"},"$root$focused & > fieldset":{borderWidth:1,borderColor:Y.palette.primary.main}},popupIndicator:{padding:0,margin:0,color:"#616161","&:hover":{backgroundColor:"unset"},'& [class*="MuiTouchRipple-root"]':{display:"none"}},endAdornment:{"$root$hasClearIcon$hasPopupIcon &":{right:4}},input:{"$root$hasClearIcon$hasPopupIcon &":{fontSize:Y.typography.body1.fontSize,paddingBlock:Y.spacing(.8125)}}}),{name:"BackstageAutocompleteBase"})(C.Ay),k=Y=>(0,s.jsx)(b.A,{...Y,transition:!0,placement:"bottom-start",children:({TransitionProps:K})=>(0,s.jsx)(u.A,{...K,style:{transformOrigin:"0 0 0"},children:(0,s.jsx)(a.A,{children:Y.children})})}),X=Y=>(0,s.jsx)(p.A,{...Y,elevation:8});function z(Y){const{label:K,name:lt,LabelProps:G,TextFieldProps:Q,...J}=Y,it=D(),ht=(0,O.useCallback)(At=>(0,s.jsx)(g.A,{...(0,P.merge)(At,Q),variant:"outlined"}),[Q]),yt=(0,s.jsx)($,{size:"small",...J,renderInput:J.renderInput??ht,popupIcon:(0,s.jsx)(h.A,{"data-testid":`${lt}-expand`}),PaperComponent:X,PopperComponent:k});return(0,s.jsx)(a.A,{className:it.root,children:K?(0,s.jsxs)(x.A,{...G,className:I()(it.label,G?.className),component:"label",children:[(0,s.jsx)(a.A,{component:"span",children:K}),yt]}):yt})}},54203:(H,S,t)=>{"use strict";t.d(S,{GI:()=>B});var s=t(31085),a=t(14041),x=t(10394),p=t(64947),b=t(73845),g=t(42899),u=t(72501),f=t(5893),d=t(54917),v=t(65859),h=t(64630),C=t(87849);const O=M=>{const I=(0,f.A)(z=>z.breakpoints.down(M.options?.drawerBreakpoint??"md"),{noSsr:!0}),D=(0,d.A)(),[$,k]=(0,a.useState)(!1),{t:X}=(0,C.i)(h.j);return I?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(p.A,{style:{marginTop:D.spacing(1),marginLeft:D.spacing(1)},onClick:()=>k(!0),startIcon:(0,s.jsx)(v.A,{}),children:X("catalogFilter.buttonTitle")}),(0,s.jsx)(b.Ay,{open:$,onClose:()=>k(!1),anchor:M.options?.drawerAnchor??"left",disableAutoFocus:!0,keepMounted:!0,variant:"temporary",children:(0,s.jsxs)(x.A,{m:2,children:[(0,s.jsx)(u.A,{variant:"h6",component:"h2",style:{marginBottom:D.spacing(1)},children:X("catalogFilter.title")}),M.children]})})]}):(0,s.jsx)(g.A,{item:!0,lg:2,children:M.children})},P=M=>(0,s.jsx)(g.A,{item:!0,xs:12,lg:10,children:M.children}),B=M=>(0,s.jsx)(g.A,{container:!0,style:{position:"relative"},children:M.children});B.Filters=O,B.Content=P},47144:(H,S,t)=>{"use strict";t.d(S,{y:()=>X});var s=t(31085),a=t(10394),x=t(58837),p=t(14041),b=t(72427),g=t(73466),u=t(7341),f=t(69076),d=t(86901),v=t(44148),h=t(41260);const C=(0,s.jsx)(h.A,{fontSize:"small"}),O=(0,s.jsx)(v.A,{fontSize:"small"});function P({selected:z}){return(0,s.jsx)(f.A,{icon:C,checkedIcon:O,checked:z})}const B=(0,p.memo)(z=>{const{selected:Y,value:K,availableOptions:lt,showCounts:G}=z,Q=G?`${K} (${lt?.[K]})`:K;return(0,s.jsx)(d.A,{control:(0,s.jsx)(P,{selected:Y}),label:Q,onClick:J=>J.preventDefault()})});var M=t(21405),I=t(26796),D=t(22995),$=t(45250);const k=(0,x.A)({root:{},label:{textTransform:"none",fontWeight:"bold"}},{name:"CatalogReactEntityAutocompletePicker"});function X(z){const{label:Y,name:K,path:lt,showCounts:G,Filter:Q,InputProps:J,initialSelectedOptions:it=[],filtersForAvailableValues:ht=["kind"],hidden:yt}=z,At=k(),{updateFilters:Ot,filters:Rt,queryParameters:{[K]:dt}}=(0,M.nK)(),ct=(0,b.gf)(u.v),xt=ht.map(ot=>Rt[ot]),{value:pt}=(0,g.A)(async()=>{const ot=lt,{facets:U}=await ct.getEntityFacets({facets:[ot],filter:(0,I.Rr)(xt.filter(Boolean))});return Object.fromEntries(U[ot].map(({value:V,count:nt})=>[V,nt]))},[...xt]),bt=(0,p.useMemo)(()=>[dt].flat().filter(Boolean),[dt]),wt=Rt[K]?.values,[at,gt]=(0,p.useState)(bt.length?bt:wt??it);(0,p.useEffect)(()=>{bt.length&&gt(bt)},[bt]);const vt=Object.keys(pt??{}),et=at.length&&vt.length;(0,p.useEffect)(()=>{Ot({[K]:et?new Q(at):void 0})},[K,et,at,Q,Ot]),(0,p.useEffect)(()=>{if(!et)return;const ot=wt??[];(0,$.isEqual)(ot,at)||gt(ot)},[wt]);const Et=Rt[K];return Et&&typeof Et=="object"&&!("values"in Et)||!vt.length||yt?null:(0,s.jsx)(a.A,{className:At.root,pb:1,pt:1,children:(0,s.jsx)(D.Q,{multiple:!0,disableCloseOnSelect:!0,label:Y,name:`${String(K)}-picker`,options:vt,value:at,TextFieldProps:J,onChange:(ot,U)=>gt(U),renderOption:(ot,{selected:U})=>(0,s.jsx)(B,{selected:U,value:ot,availableOptions:pt,showCounts:!!G})})})}},72987:(H,S,t)=>{"use strict";t.d(S,{t:()=>wt});var s=t(31085),a=t(6820),x=t(10394),p=t(69076),b=t(86901),g=t(72501),u=t(71677),f=t(58837),d=t(44148),v=t(41260),h=t(14041),C=t(21405),O=t(92822),P=t(92367),B=t(48108),M=t(47966),I=t(90184),D=t(72427),$=t(87290),k=t(7341);function X({enabled:at}){const gt=(0,D.gf)(k.v),[vt]=(0,h.useState)(async()=>{if(!at)return[];const et="relations.ownedBy";return gt.getEntityFacets({facets:[et]}).then(Et=>Et.facets[et].map(ot=>ot.value).map(ot=>{const{kind:U,name:V,namespace:nt}=(0,a.KU)(ot);return{apiVersion:"backstage.io/v1beta1",kind:U,metadata:{name:V,namespace:nt}}}).sort((ot,U)=>ot.kind.localeCompare(U.kind,"en-US")||ot.metadata.namespace.localeCompare(U.metadata.namespace,"en-US")||ot.metadata.name.localeCompare(U.metadata.name,"en-US"))).catch(()=>[])});return(0,$.A)(async(et,Et)=>{const ot=await vt;if(!ot)return{items:[]};const U=Et?.limit??20,{text:V,start:nt}=z(et),Ct=ot.filter(Bt=>lt(V,Bt)),ut=nt+U;return{items:Ct.slice(0,ut),...K({entities:Ct,limit:ut,payload:{text:V,start:ut}})}},[vt],{loading:!0,value:{items:[]}})}function z(at){return Y(at)&&at.cursor?JSON.parse(atob(at.cursor)):{text:at.text||"",start:0}}function Y(at){return!!at.cursor}function K({entities:at,limit:gt,payload:vt}){return at.length>gt?{cursor:btoa(JSON.stringify(vt))}:{}}function lt(at,gt){const vt=at.trim();return gt.kind.includes(vt)||gt.metadata.namespace?.includes(vt)||gt.metadata.name.includes(vt)}function G(){const at=(0,D.gf)(k.v);return(0,$.A)(async(gt,vt)=>{const et=gt,Et=gt,ot=vt?.limit??20;if(Et.cursor){const V=await at.queryEntities({cursor:Et.cursor,limit:ot});return{cursor:V.pageInfo.nextCursor,items:[...Et.items,...V.items]}}const U=await at.queryEntities({fullTextFilter:{term:et.text||"",fields:["metadata.name","kind","spec.profile.displayname","metadata.title"]},filter:{kind:["User","Group"]},orderFields:[{field:"metadata.name",order:"asc"}],limit:ot});return{cursor:U.pageInfo.nextCursor,items:U.items}},[],{loading:!0})}var Q=t(76842);function J({mode:at,initialSelectedOwnersRefs:gt}){const vt=at==="owners-only",et=G(),Et=X({enabled:vt}),[ot,U]=vt?Et:et;return[ot,U,it({enabled:!vt,initialSelectedOwnersRefs:gt})]}function it({enabled:at,initialSelectedOwnersRefs:gt}){const vt=(0,h.useRef)({}),et=(0,D.gf)(k.v),[,Et]=(0,$.A)(async()=>{(await et.getEntitiesByRefs({entityRefs:gt})).items.forEach(U=>{U&&(vt.current[(0,a.U2)(U)]=U)})},[]);return(0,Q.u)(()=>{at&&gt.length>0&&Et()}),{getEntity:ot=>vt.current[ot],setEntity:ot=>{vt.current[(0,a.U2)(ot)]=ot}}}var ht=t(87051),yt=t(3169),At=t(64630),Ot=t(87849),Rt=t(22995);const dt=(0,f.A)({root:{},label:{},input:{},fullWidth:{width:"100%"},boxLabel:{width:"100%",textOverflow:"ellipsis",overflow:"hidden"}},{name:"CatalogReactEntityOwnerPicker"}),ct=(0,ht.A)(at=>({label:{width:"100%"},root:{width:"90%"}}),{name:"FixedWidthFormControlLabel"})(b.A),xt=(0,s.jsx)(v.A,{fontSize:"small"}),pt=(0,s.jsx)(d.A,{fontSize:"small"});function bt(at){const gt=dt(),vt=at.entity.kind.toLocaleLowerCase("en-US")==="group",{primaryTitle:et}=(0,yt.f)(at.entity);return(0,s.jsx)(x.A,{className:gt.fullWidth,children:(0,s.jsx)(ct,{className:gt.fullWidth,control:(0,s.jsx)(p.A,{icon:xt,checkedIcon:pt,checked:at.isSelected}),onClick:Et=>Et.preventDefault(),label:(0,s.jsx)(u.Ay,{title:et,children:(0,s.jsxs)(x.A,{display:"flex",alignItems:"center",children:[vt?(0,s.jsx)(M.A,{fontSize:"small"}):(0,s.jsx)(B.A,{fontSize:"small"}),"\xA0",(0,s.jsx)(x.A,{className:gt.boxLabel,children:(0,s.jsx)(g.A,{noWrap:!0,children:et})})]})})})})}const wt=at=>{const gt=dt(),{mode:vt="owners-only"}=at||{},{updateFilters:et,filters:Et,queryParameters:{owners:ot}}=(0,C.nK)(),[U,V]=(0,h.useState)(""),{t:nt}=(0,Ot.i)(At.j),Ct=(0,h.useMemo)(()=>[ot].flat().filter(Boolean),[ot]),[ut,Bt]=(0,h.useState)(Ct.length?Ct:Et.owners?.values??[]),[{value:Nt,loading:Kt},Xt,kt]=J({mode:vt,initialSelectedOwnersRefs:ut});(0,P.s)(()=>Xt({text:U}),[U,Xt],250);const Qt=Nt?.items||[];return(0,h.useEffect)(()=>{if(Ct.length){const jt=new O.N9(Ct);Bt(jt.values)}},[Ct]),(0,h.useEffect)(()=>{et({owners:ut.length?new O.N9(ut):void 0})},[ut,et]),["user","group"].includes(Et.kind?.value.toLocaleLowerCase("en-US")||"")?null:(0,s.jsx)(x.A,{className:gt.root,pb:1,pt:1,children:(0,s.jsx)(Rt.Q,{label:nt("entityOwnerPicker.title"),multiple:!0,disableCloseOnSelect:!0,loading:Kt,options:Qt,value:ut,getOptionSelected:(jt,Ht)=>typeof Ht=="string"?(0,a.U2)(jt)===Ht:jt===Ht,getOptionLabel:jt=>{const Ht=typeof jt=="string"?kt.getEntity(jt)||(0,a.KU)(jt,{defaultKind:"group",defaultNamespace:"default"}):jt;return(0,I.Z)(Ht,(0,I.S)(Ht))},onChange:(jt,Ht)=>{V(""),Bt(Ht.map(le=>{const he=typeof le=="string"?le:(0,a.U2)(le);return typeof le!="string"&&kt.setEntity(le),he}))},filterOptions:jt=>jt,renderOption:(jt,{selected:Ht})=>(0,s.jsx)(bt,{entity:jt,isSelected:Ht}),name:"owner-picker",onInputChange:(jt,Ht)=>{V(Ht)},ListboxProps:{onScroll:jt=>{const Ht=jt.currentTarget;Math.abs(Ht.scrollHeight-Ht.clientHeight-Ht.scrollTop)<1&&Nt?.cursor&&Xt({items:Nt.items,cursor:Nt.cursor})},"data-testid":"owner-picker-listbox"},LabelProps:{className:gt.label},TextFieldProps:{className:gt.input}})})}},8859:(H,S,t)=>{"use strict";t.d(S,{z:()=>C});var s=t(31085),a=t(72072),x=t(9222),p=t(14041),b=t(29207),g=t(10394),u=t(71677),f=t(58837),d=t(3169);const v=(0,f.A)(P=>({root:{display:"inline-flex",alignItems:"center",textDecoration:"inherit"},icon:{marginRight:P.spacing(.5),color:P.palette.text.secondary,"& svg":{verticalAlign:"middle"}}}),{name:"CatalogReactEntityDisplayName"}),h=P=>{const{entityRef:B,hideIcon:M,disableTooltip:I,defaultKind:D,defaultNamespace:$}=P,k=v(),{primaryTitle:X,secondaryTitle:z,Icon:Y}=(0,d.f)(B,{defaultKind:D,defaultNamespace:$});let K=(0,s.jsx)(s.Fragment,{children:X});return K=(0,s.jsxs)(g.A,{component:"span",className:k.root,children:[Y&&!M?(0,s.jsx)(g.A,{component:"span",className:k.icon,children:(0,s.jsx)(Y,{fontSize:"inherit"})}):null,K]}),z&&!I&&(K=(0,s.jsx)(u.Ay,{enterDelay:1500,title:z,children:K})),K},C=(0,p.forwardRef)((P,B)=>{const{entityRef:M,defaultKind:I,defaultNamespace:D,title:$,children:k,hideIcon:X,disableTooltip:z,...Y}=P,K=O(P.entityRef),lt=k??$??(0,s.jsx)(h,{entityRef:M,defaultKind:I,defaultNamespace:D,hideIcon:X,disableTooltip:z});return(0,s.jsx)(a.N_,{...Y,ref:B,to:K,children:lt})});function O(P){const B=(0,x.S)(b.s),M=(0,b.$)(P,{encodeParams:!0});return B(M)}},34428:(H,S,t)=>{"use strict";t.d(S,{i:()=>b});var s=t(31085),a=t(6820),x=t(14041),p=t(8859);function b(g){const{entityRefs:u,hideIcons:f,...d}=g;return(0,s.jsx)(s.Fragment,{children:u.map((v,h)=>{const C=typeof v=="string"?v:(0,a.U2)(v);return(0,s.jsxs)(x.Fragment,{children:[h>0&&", ",(0,s.jsx)(p.z,{...d,entityRef:v,hideIcon:f})]},`${h}.${C}`)})})}},90184:(H,S,t)=>{"use strict";t.d(S,{S:()=>p,Z:()=>b});var s=t(72348),a=t(46123),x=t.n(a);function p(g,u){const f=u?.defaultKind;let d,v,h;return"metadata"in g?(d=g.kind,v=g.metadata.namespace,h=g.metadata.name):(d=g.kind,v=g.namespace,h=g.name),(v===void 0||v==="")&&(v=s.oQ),u?.defaultNamespace!==void 0?u?.defaultNamespace===v&&(v=void 0):v===s.oQ&&(v=void 0),d=d.toLocaleLowerCase("en-US"),d=f&&f.toLocaleLowerCase("en-US")===d?void 0:d,`${d?`${d}:`:""}${v?`${v}/`:""}${h}`}function b(g,u){for(const f of["spec.profile.displayName","metadata.title"]){const d=x()(g,f);if(d&&typeof d=="string")return d}return u}},91035:(H,S,t)=>{"use strict";t.d(S,{m:()=>f});var s=t(31085),a=t(58837),x=t(92822),p=t(47144),b=t(64630),g=t(87849);const u=(0,a.A)({input:{}},{name:"CatalogReactEntityTagPicker"}),f=d=>{const v=u(),{t:h}=(0,g.i)(b.j);return(0,s.jsx)(p.y,{label:h("entityTagPicker.title"),name:"tags",path:"metadata.tags",Filter:x.q_,showCounts:d.showCounts,InputProps:{className:v.input},initialSelectedOptions:d.initialFilter?d.initialFilter:[],hidden:d.hidden})}},67626:(H,S,t)=>{"use strict";t.d(S,{y:()=>Rt});var s=t(31085),a=t(72427),x=t(65461),p=t(40703),b=t(58007),g=t(68804),u=t(65569),f=t(5951),d=t(26343),v=t(72501),h=t(58837),C=t(9684),O=t(31129),P=t(14041),B=t(92822),M=t(21405),I=t(16009),D=t(45250),$=t(73466),k=t(7341),X=t(26796),z=t(87290),Y=t(48899);function K(){const dt=(0,a.gf)(I.K),ct=(0,a.gf)(k.v),{filters:xt}=(0,M.nK)(),{value:pt,loading:bt}=(0,$.A)(async()=>(await dt.getBackstageIdentity()).ownershipEntityRefs,[]),{user:wt,owners:at,...gt}=xt,{orderFields:vt,...et}=(0,X.$3)((0,D.compact)(Object.values(gt))),[{value:Et,loading:ot},U]=(0,z.A)(async nt=>{const Ct=lt(nt.owners,nt.ownershipEntityRefs);if(Ct===void 0)return 0;const{["metadata.name"]:ut,...Bt}=nt.filter.filter,{totalItems:Nt}=await ct.queryEntities({...nt.filter,filter:{...Bt,"relations.ownedBy":Ct},limit:0});return Nt},[],{loading:!0});return(0,Y.A)(()=>{Object.keys(et.filter).length!==0&&pt!==void 0&&U({ownershipEntityRefs:pt,owners:at,filter:et})},[pt,at,et]),{count:Et,loading:bt||ot,filter:(0,P.useMemo)(()=>B.tN.owned(pt??[]),[pt]),ownershipEntityRefs:pt}}function lt(dt,ct){if(ct===void 0)return;const xt=dt?.values??[];if(xt.length){const pt=(0,D.intersection)(xt,ct);return pt.length===0?void 0:pt}return ct}function G(){const dt=(0,a.gf)(k.v),{filters:ct}=(0,M.nK)(),xt=(0,P.useRef)(),pt=(0,P.useMemo)(()=>{const{user:at,...gt}=ct,vt=(0,D.compact)(Object.values(gt)),{orderFields:et,...Et}=(0,X.$3)(vt),ot={...Et,limit:0};return Object.keys(Et.filter).length===0?(xt.current=void 0,xt.current):(0,D.isEqual)(ot,xt.current)?xt.current:(xt.current=ot,ot)},[ct]),{value:bt,loading:wt}=(0,$.A)(async()=>{if(pt===void 0)return 0;const{totalItems:at}=await dt.queryEntities(pt);return at},[pt]);return{count:bt,loading:wt}}var Q=t(6820),J=t(56889);function it(){const dt=(0,a.gf)(k.v),{filters:ct}=(0,M.nK)(),{starredEntities:xt}=(0,J.I)(),pt=(0,P.useRef)(),bt=(0,P.useMemo)(()=>{const{user:vt,...et}=ct,Et=(0,D.compact)(Object.values(et)),{orderFields:ot,...U}=(0,X.$3)(Et),nt={...U,filter:{...U.filter,["metadata.name"]:Array.from(xt).map(Ct=>(0,Q.KU)(Ct).name)},limit:1e3};return(0,D.isEqual)(nt,pt.current)?pt.current:(pt.current=nt,nt)},[ct,xt]),{value:wt,loading:at}=(0,$.A)(async()=>xt.size?(await dt.queryEntities(bt)).items.map(et=>(0,Q.U2)({kind:et.kind,namespace:et.metadata.namespace,name:et.metadata.name})).filter(et=>xt.has(et)).length:0,[bt,xt]),gt=(0,P.useMemo)(()=>B.tN.starred(Array.from(xt)),[xt]);return{count:wt,loading:at,filter:gt}}var ht=t(87849),yt=t(64630);const At=(0,h.A)(dt=>({root:{backgroundColor:"rgba(0, 0, 0, .11)",boxShadow:"none",margin:dt.spacing(1,0,1,0)},title:{margin:dt.spacing(1,0,0,1),textTransform:"uppercase",fontSize:12,fontWeight:"bold"},listIcon:{minWidth:30,color:dt.palette.text.primary},menuItem:{minHeight:dt.spacing(6)},groupWrapper:{margin:dt.spacing(1,1,2,1)}}),{name:"CatalogReactUserListPicker"});function Ot(dt,ct){return[{name:ct("userListPicker.personalFilter.title"),items:[{id:"owned",label:ct("userListPicker.personalFilter.ownedLabel"),icon:C.A},{id:"starred",label:ct("userListPicker.personalFilter.starredLabel"),icon:O.Gg}]},{name:dt,items:[{id:"all",label:ct("userListPicker.orgFilterAllLabel")}]}]}const Rt=dt=>{const{initialFilter:ct,availableFilters:xt,hidden:pt,alwaysKeepFilters:bt}=dt,wt=At(),at=(0,a.gf)(x.U),{t:gt}=(0,ht.i)(yt.j),vt=at.getOptionalString("organization.name")??gt("userListPicker.defaultOrgName"),{filters:et,updateFilters:Et,queryParameters:{kind:ot,user:U}}=(0,M.nK)(),V=["starred","all"],nt=Ot(vt,gt).map(zt=>({...zt,items:zt.items.filter(({id:oe})=>["group","user"].some(de=>de===ot)?V.includes(oe):!xt||xt.includes(oe))})).filter(({items:zt})=>!!zt.length),{count:Ct,loading:ut,filter:Bt}=K(),{count:Nt}=G(),{count:Kt,filter:Xt,loading:kt}=it(),Qt=(0,P.useMemo)(()=>[U].flat()[0],[U]),[jt,Ht]=(0,P.useState)(Qt??ct),le=(0,P.useMemo)(()=>({all:Nt,starred:Kt,owned:Ct}),[Kt,Ct,Nt]);(0,P.useEffect)(()=>{Qt&&Ht(Qt)},[Qt]);const he=ut||kt;return(0,P.useEffect)(()=>{!he&&jt&&jt!=="all"&&le[jt]===0&&!bt&&Ht("all")},[he,le,jt,Ht,bt]),(0,P.useEffect)(()=>{if(!jt||he)return;Et({user:jt==="owned"?Bt:jt==="starred"?Xt:B.tN.all()})},[jt,Xt,Bt,Et,he]),pt?null:(0,s.jsx)(p.A,{className:wt.root,children:nt.map(zt=>(0,s.jsxs)(P.Fragment,{children:[(0,s.jsx)(v.A,{variant:"subtitle2",component:"span",className:wt.title,children:zt.name}),(0,s.jsx)(p.A,{className:wt.groupWrapper,children:(0,s.jsx)(b.A,{disablePadding:!0,dense:!0,role:"menu","aria-label":zt.name,children:zt.items.map((oe,de)=>(0,s.jsxs)(d.A,{role:"none presentation",divider:de!==zt.items.length-1,onClick:()=>Ht(oe.id),selected:oe.id===et.user?.value,className:wt.menuItem,disabled:le[oe.id]===0,"data-testid":`user-picker-${oe.id}`,tabIndex:0,ContainerProps:{role:"menuitem"},children:[oe.icon&&(0,s.jsx)(g.A,{className:wt.listIcon,children:(0,s.jsx)(oe.icon,{fontSize:"small"})}),(0,s.jsx)(f.A,{children:(0,s.jsxs)(v.A,{variant:"body1",children:[oe.label," "]})}),(0,s.jsx)(u.A,{children:le[oe.id]??"-"})]},oe.id))})})]},zt.name))})}},92822:(H,S,t)=>{"use strict";t.d(S,{I5:()=>d,Kf:()=>O,N9:()=>f,V3:()=>u,gM:()=>p,gZ:()=>C,mT:()=>P,qA:()=>b,q_:()=>g,tN:()=>h,z:()=>v});var s=t(6820),a=t(51372),x=t(67871);class p{value;label;constructor(I,D){this.value=I,this.label=D}getCatalogFilters(){return{kind:this.value}}toQueryValue(){return this.value}}class b{value;constructor(I){this.value=I}getTypes(){return Array.isArray(this.value)?this.value:[this.value]}getCatalogFilters(){return{"spec.type":this.getTypes()}}toQueryValue(){return this.getTypes()}}class g{values;constructor(I){this.values=I}filterEntity(I){return this.values.every(D=>(I.metadata.tags??[]).includes(D))}getCatalogFilters(){return{"metadata.tags":this.values}}toQueryValue(){return this.values}}class u{value;constructor(I){this.value=I}filterEntity(I){const D=this.toUpperArray(this.value.split(/\s/)),$=this.toUpperArray([I.metadata.tags]),k=this.toUpperArray([I.metadata.name,I.metadata.title,I.spec?.profile?.displayName]);for(const X of D)if($.every(z=>z!==X)&&k.every(z=>!z.includes(X)))return!1;return!0}getFullTextFilters(){return{term:this.value,fields:["metadata.name","metadata.title","spec.profile.displayName"]}}toQueryValue(){return this.value}toUpperArray(I){return I.flat().filter(D=>!!D).map(D=>D.toLocaleUpperCase("en-US"))}}class f{values;constructor(I){this.values=I.reduce((D,$)=>{try{return D.push((0,s.U2)((0,s.KU)($,{defaultKind:"Group"}))),D}catch{return D}},[])}getCatalogFilters(){return{"relations.ownedBy":this.values}}filterEntity(I){return this.values.some(D=>(0,x.t)(I,a.vv).some($=>(0,s.U2)($)===D))}toQueryValue(){return this.values}}class d{values;constructor(I){this.values=I}getCatalogFilters(){return{"spec.lifecycle":this.values}}filterEntity(I){return this.values.some(D=>I.spec?.lifecycle===D)}toQueryValue(){return this.values}}class v{values;constructor(I){this.values=I}getCatalogFilters(){return{"metadata.namespace":this.values}}filterEntity(I){return this.values.some(D=>I.metadata.namespace===D)}toQueryValue(){return this.values}}class h{value;refs;constructor(I,D){this.value=I,this.refs=D}static owned(I){return new h("owned",I)}static all(){return new h("all")}static starred(I){return new h("starred",I)}getCatalogFilters(){return this.value==="owned"?{"relations.ownedBy":this.refs??[]}:this.value==="starred"?{"metadata.name":this.refs?.map(I=>(0,s.KU)(I).name)??[]}:{}}filterEntity(I){if(this.value==="starred")return this.refs?.includes((0,s.U2)(I))??!0;if(this.value==="owned"){const D=(0,x.t)(I,a.vv);return this.refs?.some($=>D.some(k=>(0,s.U2)(k)===$))??!1}return!0}toQueryValue(){return this.value}}class C{value;isOwnedEntity;isStarredEntity;constructor(I,D,$){this.value=I,this.isOwnedEntity=D,this.isStarredEntity=$}filterEntity(I){switch(this.value){case"owned":return this.isOwnedEntity(I);case"starred":return this.isStarredEntity(I);default:return!0}}toQueryValue(){return this.value}}class O{value;constructor(I){this.value=I}getCatalogFilters(){return this.value?{"metadata.annotations.backstage.io/orphan":String(this.value)}:{}}filterEntity(I){const D=I.metadata.annotations?.["backstage.io/orphan"];return D!==void 0&&this.value.toString()===D}}class P{value;constructor(I){this.value=I}filterEntity(I){const D=I?.status?.items?.length>0;return D!==void 0&&this.value===D}}class B{values;constructor(I){this.values=I}getOrderFilters(){return this.values.map(([I,D])=>({field:I,order:D}))}toQueryValue(){return this.values.flat()}}},21405:(H,S,t)=>{"use strict";t.d(S,{B9:()=>B,nK:()=>M});var s=t(31085),a=t(45250),x=t.n(a),p=t(45810),b=t.n(p),g=t(14041),u=t(18690),f=t(87290),d=t(22771),v=t(71581),h=t(7341),C=t(26796),O=t(72427);const P=(0,g.createContext)(void 0),B=I=>{const D=(0,v.A)(),$=(0,O.gf)(h.v),[k,X]=(0,g.useState)({}),z=(0,u.zy)(),K=I.pagination===!0?"cursor":typeof I.pagination=="object"?I.pagination.mode??"cursor":"none",lt=typeof I.pagination=="object"?I.pagination.limit??20:20,{queryParameters:G,cursor:Q,offset:J,limit:it}=(0,g.useMemo)(()=>{const et=b().parse(z.search,{ignoreQueryPrefix:!0});let Et=lt;if(typeof et.limit=="string"){const U=Number.parseInt(et.limit,10);isNaN(U)||(Et=U)}const ot=typeof et.offset=="string"&&K==="offset"?Number.parseInt(et.offset,10):void 0;return{queryParameters:et.filters??{},cursor:typeof et.cursor=="string"&&K==="cursor"?et.cursor:void 0,offset:K==="offset"&&ot&&!isNaN(ot)?ot:void 0,limit:Et}},[K,z.search,lt]),[ht,yt]=(0,g.useState)(Q),[At,Ot]=(0,g.useState)(J),[Rt,dt]=(0,g.useState)(it),[ct,xt]=(0,g.useState)(()=>({appliedFilters:{},entities:[],backendEntities:[],pageInfo:{},offset:At,limit:Rt})),[{loading:pt,error:bt},wt]=(0,f.A)(async()=>{const et=k.kind?.value?.toLocaleLowerCase("en-US"),Et=et==="user"||et==="group"?{...k,owners:void 0}:k,ot=(0,a.compact)(Object.values(Et)),U=Object.keys(k).reduce((V,nt)=>{const Ct=k[nt];return Ct?.toQueryValue&&(V[nt]=Ct.toQueryValue()),V},{});if(K!=="none")if(ht){if(ht!==ct.appliedCursor){const V=(0,C.be)(ot),nt=await $.queryEntities({cursor:ht,limit:Rt});xt({appliedFilters:k,appliedCursor:ht,backendEntities:nt.items,entities:nt.items.filter(V),pageInfo:nt.pageInfo,totalItems:nt.totalItems})}}else{const V=(0,C.be)(ot),nt=(0,C.$3)(ot),Ct=(0,C.$3)((0,a.compact)(Object.values(ct.appliedFilters)));if(K==="offset"&&(ct.limit!==Rt||ct.offset!==At)||!(0,a.isEqual)(Ct,nt)){const ut=await $.queryEntities({...nt,limit:Rt,offset:At});xt({appliedFilters:k,backendEntities:ut.items,entities:ut.items.filter(V),pageInfo:ut.pageInfo,totalItems:ut.totalItems,limit:Rt,offset:At})}}else{const V=(0,C.be)(ot),nt=(0,C.Rr)(ot),Ct=(0,C.Rr)((0,a.compact)(Object.values(ct.appliedFilters)));if((0,a.isEqual)(Ct,nt)){const ut=ct.backendEntities.filter(V);xt({appliedFilters:k,backendEntities:ct.backendEntities,entities:ut,totalItems:ut.length})}else{const ut=await $.getEntities({filter:nt}),Bt=ut.items.filter(V);xt({appliedFilters:k,backendEntities:ut.items,entities:Bt,totalItems:Bt.length})}}if(D()){const V=b().parse(z.search,{ignoreQueryPrefix:!0}),nt=b().stringify({...V,filters:U,cursor:ht,offset:At,limit:Rt},{addQueryPrefix:!0,arrayFormat:"repeat"}),Ct=`${window.location.pathname}${nt}`;window.history?.replaceState(null,document.title,Ct)}},[$,G,k,ct,ht,K,Rt,At],{loading:!0});(0,d.A)(wt,10,[k,ht,Rt,At]);const at=(0,g.useCallback)(et=>{K==="cursor"?yt(void 0):K==="offset"&&Ot(0),X(Et=>{const ot=typeof et=="function"?et(Et):et;return{...Et,...ot}})},[K]),gt=(0,g.useMemo)(()=>{if(K!=="cursor")return;const et=ct.pageInfo?.prevCursor,Et=ct.pageInfo?.nextCursor;return{prev:et?()=>yt(et):void 0,next:Et?()=>yt(Et):void 0}},[K,ct.pageInfo]),vt=(0,g.useMemo)(()=>({filters:ct.appliedFilters,entities:ct.entities,backendEntities:ct.backendEntities,updateFilters:at,queryParameters:G,loading:pt,error:bt,pageInfo:gt,totalItems:ct.totalItems,limit:Rt,offset:At,setLimit:dt,setOffset:Ot,paginationMode:K}),[ct,at,G,pt,bt,gt,Rt,At,K,dt,Ot]);return(0,s.jsx)(P.Provider,{value:vt,children:I.children})};function M(){const I=(0,g.useContext)(P);if(!I)throw new Error("useEntityList must be used within EntityListProvider");return I}},56889:(H,S,t)=>{"use strict";t.d(S,{I:()=>u});var s=t(6820),a=t(72427),x=t(14041),p=t(1394),b=t(18);function g(f){return typeof f=="string"?f:(0,s.U2)(f)}function u(){const f=(0,a.gf)(b.a),d=(0,p.A)((0,x.useMemo)(()=>f.starredEntitie$(),[f]),new Set),v=(0,x.useCallback)(C=>d.has(g(C)),[d]),h=(0,x.useCallback)(C=>f.toggleStarred(g(C)).then(),[f]);return{starredEntities:d,toggleStarredEntity:h,isStarredEntity:v}}},29207:(H,S,t)=>{"use strict";t.d(S,{$:()=>g,s:()=>b});var s=t(6820),a=t(72348),x=t(34569),p=t(63544);const b=(0,p.Q)("catalog:entity-route-ref",()=>(0,x.H)({id:"catalog:entity",params:["namespace","kind","name"]}));function g(u,f){let d,v,h;if(typeof u=="string"){const O=(0,s.KU)(u);d=O.kind,v=O.namespace,h=O.name}else"metadata"in u?(d=u.kind,v=u.metadata.namespace,h=u.metadata.name):(d=u.kind,v=u.namespace,h=u.name);d=d.toLocaleLowerCase("en-US"),v=v?.toLocaleLowerCase("en-US")??a.oQ;const{encodeParams:C=!1}=f||{};return C&&(d=encodeURIComponent(d),v=encodeURIComponent(v),h=encodeURIComponent(h)),{kind:d,namespace:v,name:h}}},64630:(H,S,t)=>{"use strict";t.d(S,{j:()=>a});var s=t(93184);const a=(0,s.h)({id:"catalog-react",messages:{catalogFilter:{title:"Filters",buttonTitle:"Filters"},entityKindPicker:{title:"Kind",errorMessage:"Failed to load entity kinds"},entityLifecyclePicker:{title:"Lifecycle"},entityNamespacePicker:{title:"Namespace"},entityOwnerPicker:{title:"Owner"},entityProcessingStatusPicker:{title:"Processing Status"},entityTagPicker:{title:"Tags"},entityPeekAheadPopover:{title:"Drill into the entity to see all of the tags.",emailCardAction:{title:"Email {{email}}",subTitle:"mailto {{email}}"},entityCardActionsTitle:"Show details"},entitySearchBar:{placeholder:"Search"},entityTypePicker:{title:"Type",errorMessage:"Failed to load entity types",optionAllTitle:"all"},favoriteEntity:{addToFavorites:"Add to favorites",removeFromFavorites:"Remove from favorites"},inspectEntityDialog:{title:"Entity Inspector",closeButtonTitle:"Close",ancestryPage:{title:"Ancestry"},colocatedPage:{title:"Colocated",description:"These are the entities that are colocated with this entity - as in, they originated from the same data source (e.g. came from the same YAML file), or from the same origin (e.g. the originally registered URL).",alertNoLocation:"Entity had no location information.",alertNoEntity:"There were no other entities on this location."},jsonPage:{title:"Entity as JSON",description:"This is the raw entity data as received from the catalog, on JSON form."},overviewPage:{title:"Overview"},yamlPage:{title:"Entity as YAML",description:"This is the raw entity data as received from the catalog, on YAML form."}},unregisterEntityDialog:{title:"Are you sure you want to unregister this entity?",cancelButtonTitle:"Cancel",deleteButtonTitle:"Delete Entity",deleteEntitySuccessMessage:"Removed entity {{entityName}}",bootstrapState:{title:'You cannot unregister this entity, since it originates from a protected Backstage configuration (location "{{location}}"). If you believe this is in error, please contact the {{appTitle}} integrator.',advancedDescription:"You have the option to delete the entity itself from the catalog. Note that this should only be done if you know that the catalog file has been deleted at, or moved from, its origin location. If that is not the case, the entity will reappear shortly as the next refresh round is performed by the catalog.",advancedOptions:"Advanced Options"},onlyDeleteStateTitle:"This entity does not seem to originate from a registered location. You therefore only have the option to delete it outright from the catalog.",unregisterState:{title:"This action will unregister the following entities:",subTitle:"Located at the following location:",description:"To undo, just re-register the entity in {{appTitle}}.",unregisterButtonTitle:"Unregister Location",advancedOptions:"Advanced Options",advancedDescription:"You also have the option to delete the entity itself from the catalog. Note that this should only be done if you know that the catalog file has been deleted at, or moved from, its origin location. If that is not the case, the entity will reappear shortly as the next refresh round is performed by the catalog."},errorStateTitle:"Internal error: Unknown state"},userListPicker:{defaultOrgName:"Company",personalFilter:{title:"Personal",ownedLabel:"Owned",starredLabel:"Starred"},orgFilterAllLabel:"All"}}})},26796:(H,S,t)=>{"use strict";t.d(S,{$3:()=>p,Rr:()=>b,be:()=>g});var s=t(92822);function a(u){return!!u.getFullTextFilters}function x(u){return!!u.getOrderFilters}function p(u){const f=u.reduce((h,C)=>({...h,...C.getCatalogFilters?C.getCatalogFilters():{}}),{}),d=u.find(a)?.getFullTextFilters(),v=u.find(x)?.getOrderFilters()||[{field:"metadata.name",order:"asc"}];return{filter:f,fullTextFilter:d,orderFields:v}}function b(u){const f={};return u.forEach(d=>{d instanceof s.q_||d instanceof s.N9||d instanceof s.I5||d instanceof s.z||d instanceof s.tN||d instanceof s.Kf||d instanceof s.V3||d instanceof s.gZ||Object.assign(f,d.getCatalogFilters?.()||{})}),f}function g(u){return f=>u.every(d=>!d.filterEntity||d.filterEntity(f))}},67871:(H,S,t)=>{"use strict";t.d(S,{t:()=>a});var s=t(6820);function a(x,p,b){let g=x?.relations?.filter(u=>u.type===p).map(u=>(0,s.KU)(u.targetRef))||[];return b?.kind&&(g=g.filter(u=>u.kind.toLocaleLowerCase("en-US")===b.kind.toLocaleLowerCase("en-US"))),g}},95203:(H,S,t)=>{"use strict";t.d(S,{qP:()=>g,Zg:()=>f,rQ:()=>v,pS:()=>d,UJ:()=>u});var s=t(59598);class a{id;params;optional;defaultTarget;[p=s.b];constructor(C,O,P,B){this.id=C,this.params=O,this.optional=P,this.defaultTarget=B,this[p]="external"}toString(){return`routeRef{type=external,id=${this.id}}`}getDefaultTarget(){return this.defaultTarget}}function x(h){return new a(h.id,h.params??[],!!h.optional,h?.defaultTarget)}var p,b=t(34569);const g=x({id:"create-component",optional:!0,defaultTarget:"scaffolder.createComponent"}),u=x({id:"view-techdoc",optional:!0,params:["namespace","kind","name"],defaultTarget:"techdocs.docRoot"}),f=x({id:"create-from-template",optional:!0,params:["namespace","templateName"],defaultTarget:"scaffolder.selectedTemplate"}),d=x({id:"catalog:unregister-redirect",optional:!0}),v=(0,b.H)({id:"catalog"})},13646:(H,S,t)=>{"use strict";t.d(S,{OL:()=>a});function s(f,d){return f.name===d.name}function a(f,d){return"resourceType"in f?!d||f.resourceType===d:!1}function x(f){return f.attributes.action==="create"}function p(f){return f.attributes.action==="read"}function b(f){return f.attributes.action==="update"}function g(f){return f.attributes.action==="delete"}function u(f){return{authorize:async(d,v)=>await f.authorize(d,v),authorizeConditional(d,v){const h=d;return f.authorize(h,v)}}}},54241:(H,S,t)=>{"use strict";t.d(S,{b:()=>s});var s=function(a){return a.DENY="DENY",a.ALLOW="ALLOW",a.CONDITIONAL="CONDITIONAL",a}({})},96824:(H,S,t)=>{"use strict";t.d(S,{x:()=>a});var s=t(55309);const a=(0,s.y)({id:"plugin.permission.api"})},70734:(H,S,t)=>{"use strict";t.d(S,{e:()=>b});var s=t(31085),a=t(14041),x=t(58837);const p=(0,x.A)(()=>({highlight:{}}),{name:"BackstageHighlightedSearchResultText"}),b=g=>{const{text:u,preTag:f,postTag:d}=g,v=p(),h=(0,a.useMemo)(()=>u.split(new RegExp(`(${f}.+?${d})`)),[d,f,u]);return(0,s.jsx)(s.Fragment,{children:h.map((C,O)=>C.includes(f)?(0,s.jsx)("mark",{className:v.highlight,children:C.replace(new RegExp(`${f}|${d}`,"g"),"")},O):C)})}},54560:(H,S,t)=>{"use strict";t.d(S,{ec:()=>d});var s=t(31085),a=t(14041),x=t(93368),p=t(88758),b=t(8109);const g="search.results.list.items.extensions.v1",u=(C,O)=>{for(const P of C)if(!(!isValidElement(P)||!getComponentData(P,g)?.(O)))return cloneElement(P,{rank:O.rank,highlight:O.highlight,result:O.document,...P.props});return null},f=C=>{const{rank:O,result:P,noTrack:B,children:M,alignItems:I="flex-start",...D}=C,$=(0,x.s)(),k=(0,a.useCallback)(()=>{B||P&&$.captureEvent("discover",P.title,{attributes:{to:P.location},value:O})},[O,P,B,$]);return(0,s.jsx)(b.A,{divider:!0,alignItems:I,onClickCapture:k,...D,children:M})},d=C=>{const{name:O,component:P,predicate:B=()=>!0}=C;return(0,p.zZ)({name:O,component:{lazy:()=>P().then(M=>I=>(0,s.jsx)(f,{rank:I.rank,result:I.result,noTrack:I.noTrack,children:(0,a.createElement)(M,I)}))},data:{[g]:B}})},v=C=>{const O=useElementFilter(C,P=>P.selectByComponentData({key:g}).getElements(),[C]);return useCallback((P,B)=>{const M=u(O,P);return _jsx(Fragment,{children:M??_jsx(f,{rank:P.rank,result:P.document,children:_jsx(DefaultResultListItem,{rank:P.rank,highlight:P.highlight,result:P.document})})},B)},[O])},h=C=>{const{results:O,children:P,...B}=C,M=v(P);return _jsx(List,{...B,children:O.map(M)})}},86202:(H,S,t)=>{"use strict";t.d(S,{A:()=>s,G:()=>a});const s="backstage.io/techdocs-ref",a="backstage.io/techdocs-entity"},72020:(H,S,t)=>{"use strict";t.d(S,{AF:()=>f,Hr:()=>h,Wm:()=>u,YR:()=>B,po:()=>d});var s=t(31085),a=t(14041),x=t(18690),p=t(19402),b=t(88758),g=t(82442);const u="techdocs.addons.addon.v1",f="techdocs.addons.wrapper.v1",d=()=>null;(0,p.h)(d,f,!0);const v=M=>`${u}.${M.toLocaleLowerCase("en-US")}`;function h(M){const{name:I,component:D}=M;return(0,b.zZ)({name:I,component:{sync:$=>(0,s.jsx)(D,{...$})},data:{[u]:M,[v(I)]:!0}})}const C=(M,I)=>M.selectByComponentData({key:I}).getElements()[0],O=M=>M.selectByComponentData({key:f}).selectByComponentData({key:u}),P=M=>M.selectByComponentData({key:f}).findComponentData({key:u}),B=()=>{const M=(0,x.P1)(),I=(0,g.O)(M,O),D=(0,g.O)(M,P),$=(0,a.useCallback)(z=>{if(!I||!z)return null;const Y=v(z.name);return C(I,Y)??null},[I]),k=(0,a.useCallback)(z=>{const Y=D.find(K=>K.name===z);return Y?$(Y):null},[D,$]),X=(0,a.useCallback)(z=>{const Y=D.filter(K=>K.location===z);return Y.length?Y.map($):null},[D,$]);return{renderComponentByName:k,renderComponentsByLocation:X}}},26679:(H,S,t)=>{"use strict";t.d(S,{l:()=>a,s:()=>x});var s=t(55309);const a=(0,s.y)({id:"plugin.techdocs.service"}),x=(0,s.y)({id:"plugin.techdocs.storageservice"})},86892:(H,S,t)=>{"use strict";t.d(S,{R:()=>M,V:()=>I});var s=t(31085),a=t(14041),x=t(73466),p=t(28966),b=t(6820),g=t(43836),u=t(10602),f=t(72427),d=t(65461),v=t(25862),h=t(26679);function C(D,$){return $.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")||(D.kind=D.kind.toLocaleLowerCase(),D.name=D.name.toLocaleLowerCase(),D.namespace=D.namespace.toLocaleLowerCase()),D}const O=(D,$)=>(0,b.U2)(D)===(0,b.U2)($),P={title:"",subtitle:"",setTitle:()=>{},setSubtitle:()=>{},setShadowRoot:()=>{},metadata:{loading:!0},entityMetadata:{loading:!0},entityRef:{kind:"",name:"",namespace:""}},B=(0,g.tK)("techdocs-reader-page-context"),M=(0,a.memo)(D=>{const{entityRef:$,children:k}=D,X=(0,f.gf)(h.l),z=(0,f.gf)(d.U),Y=(0,x.A)(async()=>X.getEntityMetadata($),[$]),K=(0,p.A)(async()=>X.getTechDocsMetadata($),[$]),[lt,G]=(0,a.useState)(P.title),[Q,J]=(0,a.useState)(P.subtitle),[it,ht]=(0,a.useState)(P.shadowRoot);(0,a.useEffect)(()=>{it&&!K.value&&!K.loading&&K.retry()},[K.value,K.loading,it,K.retry,K]);const yt={metadata:K,entityRef:C($,z),entityMetadata:Y,shadowRoot:it,setShadowRoot:ht,title:lt,setTitle:G,subtitle:Q,setSubtitle:J},At=(0,u.B)({1:yt});return(0,s.jsx)(v.Ig,{attributes:{entityRef:(0,b.U2)($)},children:(0,s.jsx)(B.Provider,{value:At,children:k instanceof Function?k(yt):k})})},(D,$)=>O(D.entityRef,$.entityRef)),I=()=>{const D=(0,a.useContext)(B);if(D===void 0)return P;const $=D.atVersion(1);if($===void 0)throw new Error("No context found for version 1.");return $}},99730:(H,S,t)=>{"use strict";t.d(S,{e:()=>s});const s=Object.freeze({Header:"Header",Subheader:"Subheader",Settings:"Settings",PrimarySidebar:"PrimarySidebar",SecondarySidebar:"SecondarySidebar",Content:"Content"})},95768:(H,S,t)=>{"use strict";t.d(S,{V:()=>s});function s(a,x){return x.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")?a:a.toLocaleLowerCase("en-US")}},8915:(H,S,t)=>{"use strict";t.d(S,{K:()=>Rt});var s=t(31085),a=t(59428),x=t(27586),p=t(26280),b=t(21405),g=t(54203),u=t(67626),f=t(72987),d=t(91035),v=t(81859),h=t(14041),C=t(86519),O=t(86202);class P{getCatalogFilters(){return{[`metadata.annotations.${O.A}`]:C.c}}}const B=()=>{const{updateFilters:dt}=(0,b.nK)();return(0,h.useEffect)(()=>{dt({techdocs:new P})},[dt]),null};var M=t(36338),I=t(45250),D=t(88640),$=t(77310),k=t(9222),X=t(72427),z=t(65461),Y=t(56889),K=t(27125),lt=t(14209),G=t(92822);function Q(dt){const{actions:ct,columns:xt,data:pt,isLoading:bt,options:wt}=dt,{updateFilters:at,setLimit:gt,setOffset:vt,limit:et,totalItems:Et,offset:ot}=(0,b.nK)(),[U,V]=(0,h.useState)(ot&&et?Math.floor(ot/et):0);return(0,h.useEffect)(()=>{Et&&U*et>=Et?vt(Math.max(0,Et-et)):vt(Math.max(0,U*et))},[vt,U,et,Et]),(0,s.jsx)(lt.X,{columns:xt,data:pt,options:{paginationPosition:"both",pageSizeOptions:[5,10,20,50,100],pageSize:et,emptyRowsWhenPaging:!1,actionsColumnIndex:-1,...wt},actions:ct,onSearchChange:nt=>at({text:nt?new G.V3(nt):void 0}),page:U,onPageChange:nt=>{V(nt)},onRowsPerPageChange:nt=>{gt(nt)},totalCount:Et,localization:{pagination:{labelDisplayedRows:""}},isLoading:bt})}function J(dt){const{actions:ct,columns:xt,data:pt,next:bt,prev:wt,title:at,isLoading:gt,options:vt,...et}=dt;return(0,s.jsx)(lt.X,{title:gt?"":at,columns:xt,data:pt,options:{paginationPosition:"both",...vt,pageSizeOptions:[],showFirstLastPageButtons:!1,pageSize:Number.MAX_SAFE_INTEGER,emptyRowsWhenPaging:!1,actionsColumnIndex:-1},onPageChange:Et=>{Et>0?bt?.():wt?.()},page:wt?1:0,totalCount:bt?Number.MAX_VALUE:Number.MAX_SAFE_INTEGER,localization:{pagination:{labelDisplayedRows:""}},isLoading:gt,...et})}var it=t(84295),ht=t(42717),yt=t(82779),At=t(23747);const Ot=dt=>{const{columns:ct,actions:xt,options:pt}=dt,{loading:bt,error:wt,entities:at,filters:gt,paginationMode:vt,pageInfo:et}=(0,b.nK)(),{isStarredEntity:Et,toggleStarredEntity:ot}=(0,Y.I)(),[,U]=(0,M.A)(),V=(0,k.S)(yt.Oc),nt=(0,X.gf)(z.U),Ct=(0,I.capitalize)(gt.user?.value??"all"),ut=[it.f.createCopyDocsUrlAction(U),it.f.createStarEntityAction(Et,ot)],Bt=(0,At.H)(at,V,nt);return vt==="cursor"?(0,s.jsx)(J,{columns:ct||ht.F,isLoading:bt,title:Ct,actions:xt||ut,options:pt,data:Bt,next:et?.next,prev:et?.prev}):vt==="offset"?(0,s.jsx)(Q,{columns:ct||ht.F,isLoading:bt,title:Ct,actions:xt||ut,options:pt,data:Bt}):wt?(0,s.jsx)(D.B,{severity:"error",title:"Could not load available documentation.",children:(0,s.jsx)($.z,{language:"text",text:wt.toString()})}):(0,s.jsx)(K.o,{title:Ct,entities:at,loading:bt,actions:xt||ut,columns:ct,options:pt})};Ot.columns=ht.B,Ot.actions=it.f;const Rt=dt=>{const{initialFilter:ct="owned",columns:xt,actions:pt,ownerPickerMode:bt,pagination:wt,options:at,PageWrapper:gt,CustomHeader:vt}=dt,et=gt||v.S,Et=vt||(()=>(0,s.jsx)(a.d,{title:"",children:(0,s.jsx)(x.Y,{children:"Discover documentation in your ecosystem."})}));return(0,s.jsx)(et,{children:(0,s.jsxs)(p.U,{children:[(0,s.jsx)(Et,{}),(0,s.jsx)(b.B9,{pagination:wt,children:(0,s.jsxs)(g.GI,{children:[(0,s.jsxs)(g.GI.Filters,{children:[(0,s.jsx)(B,{}),(0,s.jsx)(u.y,{initialFilter:ct}),(0,s.jsx)(f.t,{mode:bt}),(0,s.jsx)(d.m,{})]}),(0,s.jsx)(g.GI.Content,{children:(0,s.jsx)(Ot,{actions:pt,columns:xt,options:at})})]})})]})})}},27125:(H,S,t)=>{"use strict";t.d(S,{o:()=>O});var s=t(31085),a=t(36338),x=t(9222),p=t(72427),b=t(65461),g=t(82779),u=t(14209),f=t(44186),d=t(73896),v=t(84295),h=t(42717),C=t(23747);const O=P=>{const{entities:B,title:M,loading:I,columns:D,actions:$,options:k}=P,[,X]=(0,a.A)(),z=(0,x.S)(g.Oc),Y=(0,p.gf)(b.U);if(!B)return null;const K=(0,C.H)(B,z,Y),lt=[v.f.createCopyDocsUrlAction(X)],G=20,Q=K&&K.length>G;return(0,s.jsx)(s.Fragment,{children:I||K&&K.length>0?(0,s.jsx)(u.X,{isLoading:I,options:{paging:Q,pageSize:G,search:!0,actionsColumnIndex:-1,...k},data:K,columns:D||h.F,actions:$||lt,title:M?`${M} (${K.length})`:`All (${K.length})`}):(0,s.jsx)(f.p,{missing:"data",title:"No documents to show",description:"Create your own document. Check out our Getting Started Information",action:(0,s.jsx)(d.z,{color:"primary",to:"https://backstage.io/docs/features/techdocs/getting-started",variant:"contained",children:"DOCS"})})})};O.columns=h.B,O.actions=v.f},84295:(H,S,t)=>{"use strict";t.d(S,{f:()=>p});var s=t(31085),a=t(55290),x=t(18956);const p={createCopyDocsUrlAction(b){return g=>({icon:()=>(0,s.jsx)(a.A,{fontSize:"small"}),tooltip:"Click to copy documentation link to clipboard",onClick:()=>b(`${window.location.origin}${g.resolved.docsUrl}`)})},createStarEntityAction(b,g){return u=>{const f=u.entity,d=b(f);return{cellStyle:{paddingLeft:"1em"},icon:()=>(0,s.jsx)(x.m,{isFavorite:d}),tooltip:d?"Remove from favorites":"Add to favorites",onClick:()=>g(f)}}}}},42717:(H,S,t)=>{"use strict";t.d(S,{B:()=>d,F:()=>v});var s=t(31085),a=t(10394),x=t(58837);const p=(0,x.A)(h=>({value:{marginBottom:h.spacing(.75)},subvalue:{color:h.palette.textSubtle,fontWeight:"normal"}}),{name:"BackstageSubvalueCell"});function b(h){const{value:C,subvalue:O}=h,P=p();return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.A,{className:P.value,children:C}),(0,s.jsx)(a.A,{className:P.subvalue,children:O})]})}var g=t(72072),u=t(34428);function f(h){return h.metadata.title||h.metadata.name}const d={createTitleColumn(h){return{...d.createNameColumn(),field:"entity.metadata.title",hidden:h?.hidden}},createNameColumn(){return{title:"Document",field:"entity.metadata.name",highlight:!0,searchable:!0,defaultSort:"asc",customSort:(h,C)=>{const O=f(h.entity).toLocaleLowerCase(),P=f(C.entity).toLocaleLowerCase();return O.localeCompare(P)},render:h=>(0,s.jsx)(b,{value:(0,s.jsx)(g.N_,{to:h.resolved.docsUrl,children:f(h.entity)}),subvalue:h.entity.metadata.description})}},createOwnerColumn(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:h})=>(0,s.jsx)(u.i,{entityRefs:h.ownedByRelations,defaultKind:"group"})}},createKindColumn(){return{title:"Kind",field:"entity.kind"}},createTypeColumn(){return{title:"Type",field:"entity.spec.type"}}},v=[d.createTitleColumn({hidden:!0}),d.createNameColumn(),d.createOwnerColumn(),d.createKindColumn(),d.createTypeColumn()]},23747:(H,S,t)=>{"use strict";t.d(S,{H:()=>b});var s=t(51372),a=t(67871),x=t(90184),p=t(95768);function b(g,u,f){return g.map(d=>{const v=(0,a.t)(d,s.vv);return{entity:d,resolved:{docsUrl:u({namespace:(0,p.V)(d.metadata.namespace??"default",f),kind:(0,p.V)(d.kind,f),name:(0,p.V)(d.metadata.name,f)}),ownedByRelations:v,ownedByRelationsTitle:v.map(h=>(0,x.S)(h,{defaultKind:"group"})).join(", ")}}})}},81859:(H,S,t)=>{"use strict";t.d(S,{S:()=>b});var s=t(31085),a=t(27155),x=t(72427),p=t(65461);const b=g=>{const{children:u,CustomPageWrapper:f}=g,v=`Documentation available in ${(0,x.gf)(p.U).getOptionalString("organization.name")??"Backstage"}`;return(0,s.jsx)(s.Fragment,{children:f?(0,s.jsx)(f,{children:u}):(0,s.jsx)(a.d,{title:"Documentation",subtitle:v,themeId:"documentation",children:u})})}},39278:(H,S,t)=>{"use strict";t.d(S,{$j:()=>$,Wj:()=>k,Ju:()=>B});var s=t(26679),a=t(70835),x=t(97142),p=t(92110);class b{configApi;discoveryApi;fetchApi;constructor(Y){this.configApi=Y.configApi,this.discoveryApi=Y.discoveryApi,this.fetchApi=Y.fetchApi}async getCookie(){const K=`${await this.getApiOrigin()}/cookie`,lt=await this.fetchApi.fetch(`${K}`,{credentials:"include"});if(!lt.ok)throw await a.o.fromResponse(lt);return await lt.json()}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getTechDocsMetadata(Y){const{kind:K,namespace:lt,name:G}=Y,J=`${await this.getApiOrigin()}/metadata/techdocs/${lt}/${K}/${G}`,it=await this.fetchApi.fetch(`${J}`);if(!it.ok)throw await a.o.fromResponse(it);return await it.json()}async getEntityMetadata(Y){const{kind:K,namespace:lt,name:G}=Y,J=`${await this.getApiOrigin()}/metadata/entity/${lt}/${K}/${G}`,it=await this.fetchApi.fetch(`${J}`);if(!it.ok)throw await a.o.fromResponse(it);return await it.json()}}class g{configApi;discoveryApi;fetchApi;constructor(Y){this.configApi=Y.configApi,this.discoveryApi=Y.discoveryApi,this.fetchApi=Y.fetchApi}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getStorageUrl(){return this.configApi.getOptionalString("techdocs.storageUrl")??`${await this.discoveryApi.getBaseUrl("techdocs")}/static/docs`}async getBuilder(){return this.configApi.getOptionalString("techdocs.builder")||"local"}async getEntityDocs(Y,K){const{kind:lt,namespace:G,name:Q}=Y,it=`${await this.getStorageUrl()}/${G}/${lt}/${Q}/${K}`,ht=await this.fetchApi.fetch(`${it.endsWith("/")?it:`${it}/`}index.html`);let yt="";switch(ht.status){case 404:throw yt="Page not found. ",K||(yt+="This could be because there is no index.md file in the root of the docs directory of this repository."),new x.m_(yt);case 500:throw yt="Could not generate documentation or an error in the TechDocs backend. ",new Error(yt);default:break}return ht.text()}async syncEntityDocs(Y,K=()=>{}){const{kind:lt,namespace:G,name:Q}=Y,it=`${await this.getApiOrigin()}/sync/${G}/${lt}/${Q}`;return new Promise((ht,yt)=>{const At=new AbortController;(0,p.y)(it,{fetch:this.fetchApi.fetch,signal:At.signal,onmessage(Ot){if(Ot.event==="log")Ot.data&&K(JSON.parse(Ot.data));else if(Ot.event==="finish"){let Rt=!1;Ot.data&&({updated:Rt}=JSON.parse(Ot.data)),ht(Rt?"updated":"cached")}else Ot.event==="error"&&yt(new Error(Ot.data))},onerror(Ot){throw At.abort(),yt(Ot),Ot}})})}async getBaseUrl(Y,K,lt){const{kind:G,namespace:Q,name:J}=K,ht=`${await this.getApiOrigin()}/static/docs/${Q}/${G}/${J}/${lt}`;return new URL(Y,ht.endsWith("/")?ht:`${ht}/`).toString()}}var u=t(82779),f=t(9803),d=t(12935),v=t(65461),h=t(57405),C=t(70795),O=t(88758),P=t(54560);const B=(0,f.i)({id:"techdocs",apis:[(0,d.b)({api:s.s,deps:{configApi:v.U,discoveryApi:h.I,fetchApi:C.a},factory:({configApi:z,discoveryApi:Y,fetchApi:K})=>new g({configApi:z,discoveryApi:Y,fetchApi:K})}),(0,d.b)({api:s.l,deps:{configApi:v.U,discoveryApi:h.I,fetchApi:C.a},factory:({configApi:z,discoveryApi:Y,fetchApi:K})=>new b({configApi:z,discoveryApi:Y,fetchApi:K})})],routes:{root:u.rQ,docRoot:u.Oc,entityContent:u.Ri}}),M=B.provide((0,O.QJ)({name:"TechdocsPage",component:()=>t.e(8803).then(t.bind(t,38803)).then(z=>z.Router),mountPoint:u.rQ})),I=B.provide((0,O.QJ)({name:"EntityTechdocsContent",component:()=>t.e(8803).then(t.bind(t,38803)).then(z=>z.LegacyEmbeddedDocsRouter),mountPoint:u.Ri})),D=B.provide((0,O.QJ)({name:"TechDocsCustomHome",component:()=>t.e(5470).then(t.bind(t,25470)).then(z=>z.TechDocsCustomHome),mountPoint:u.rQ})),$=B.provide((0,O.QJ)({name:"TechDocsIndexPage",component:()=>t.e(5788).then(t.bind(t,85788)).then(z=>z.TechDocsIndexPage),mountPoint:u.rQ})),k=B.provide((0,O.QJ)({name:"TechDocsReaderPage",component:()=>t.e(4036).then(t.bind(t,84036)).then(z=>z.TechDocsReaderPage),mountPoint:u.Oc})),X=B.provide((0,P.ec)({name:"TechDocsSearchResultListItem",component:()=>Promise.resolve().then(t.bind(t,27698)).then(z=>z.TechDocsSearchResultListItem),predicate:z=>z.type==="techdocs"}))},29729:(H,S,t)=>{"use strict";t.d(S,{p:()=>Yn});var s=t(31085),a=t(14041),x=t(42899),p=t(58837),b=t(86892),g=t(9394),u=t(91360),f=t(22856);const d="TECH_DOCS_SHADOW_DOM_STYLE_LOAD",v=m=>{(0,a.useEffect)(()=>{if(!m)return()=>{};const L=m.querySelectorAll('head > link[rel="stylesheet"]');let j=L?.length??0;const N=new CustomEvent(d);if(!j)return m.dispatchEvent(N),()=>{};const W=()=>{--j===0&&m.dispatchEvent(N)};return L?.forEach(q=>{q.addEventListener("load",W)}),()=>{L?.forEach(q=>{q.removeEventListener("load",W)})}},[m])},h=m=>{const[L,j]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{if(!m)return()=>{};j(!0);const N=m.style;N.setProperty("opacity","0");const W=()=>{j(!1),N.setProperty("opacity","1")};return m.addEventListener(d,W),()=>{m.removeEventListener(d,W)}},[m]),L},C=m=>{const{element:L,onAppend:j,children:N}=m,[W,q]=(0,a.useState)((0,g.vt)({...(0,f.A)(),insertionPoint:void 0}));v(L);const rt=(0,a.useCallback)(Pt=>{if(!L||!Pt)return;q((0,g.vt)({...(0,f.A)(),insertionPoint:L.querySelector("head")||void 0}));let It=Pt.shadowRoot;It||(It=Pt.attachShadow({mode:"open"})),It.replaceChildren(L),typeof j=="function"&&j(It)},[L,j]);return(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)(u.Ay,{jss:W,sheetsManager:new Map,children:[(0,s.jsx)("div",{ref:rt,"data-testid":"techdocs-native-shadowroot"}),N]})})};var O=t(12784);const P=()=>{const{shadowRoot:m}=(0,b.V)();return m},B=m=>{const L=P(),[j,N]=(0,a.useState)(L?.firstChild);return(0,a.useEffect)(()=>{let W;return L&&(W=new MutationObserver(()=>{N(L?.firstChild)}),W.observe(L,{attributes:!0,characterData:!0,childList:!0,subtree:!0})),()=>W?.disconnect()},[L]),!j||!(j instanceof HTMLElement)?[]:m.map(W=>j.querySelectorAll(W)).filter(W=>W.length).map(W=>Array.from(W)).flat()},M=m=>m.toString()&&m.rangeCount&&m.getRangeAt(0).getBoundingClientRect().top,I=(m=0)=>{const L=P(),[j,N]=useState(null),W=useMemo(()=>debounce(()=>{const q=L,rt=q.getSelection?q.getSelection():document.getSelection();rt&&M(rt)?N(rt):N(null)},m),[L,N,m]);return useEffect(()=>(window.document.addEventListener("selectionchange",W),()=>{W.cancel(),window.document.removeEventListener("selectionchange",W)}),[W]),j};var D=t(26280),$=t(68146),k=t(45250),X=t(73466),z=t(5877),Y=t(43836),K=t(10602),lt=t(72427),G=t(93368),Q=t(25862),J=t(65461),it=t(55309);const ht=(0,it.y)({id:"plugin.search.queryservice"});class yt{mockedResults;constructor(L){this.mockedResults=L}query(){return Promise.resolve(this.mockedResults||{results:[]})}}const At=(0,Y.tK)("search-context"),Ot=()=>{const m=(0,a.useContext)(At);if(!m)throw new Error("useSearch must be used within a SearchContextProvider");const L=m.atVersion(1);if(!L)throw new Error("No SearchContext v1 found");return L},Rt=()=>(0,a.useContext)(At)!==void 0,dt={term:"",types:[],filters:{},pageLimit:void 0,pageCursor:void 0},ct=(m=dt)=>{const L=(0,lt.gf)(ht),j=(0,G.s)(),[N,W]=(0,a.useState)(m.term),[q,rt]=(0,a.useState)(m.types),[Pt,It]=(0,a.useState)(m.filters),[Ut,Lt]=(0,a.useState)(m.pageLimit),[$t,qt]=(0,a.useState)(m.pageCursor),ge=(0,z.A)(N),Gt=(0,z.A)(Pt),_t=(0,X.A)(async()=>{const ne=await L.query({term:N,types:q,filters:Pt,pageLimit:Ut,pageCursor:$t});return N&&j.captureEvent("search",N,{value:ne.numberOfResults}),ne},[N,q,Pt,Ut,$t]),Ee=!_t.loading&&!_t.error&&_t.value?.nextPageCursor,ft=!_t.loading&&!_t.error&&_t.value?.previousPageCursor,Zt=(0,a.useCallback)(()=>{qt(_t.value?.nextPageCursor)},[_t.value?.nextPageCursor]),Jt=(0,a.useCallback)(()=>{qt(_t.value?.previousPageCursor)},[_t.value?.previousPageCursor]);return(0,a.useEffect)(()=>{ge!==void 0&&N!==ge&&qt(void 0)},[N,ge,qt]),(0,a.useEffect)(()=>{Gt!==void 0&&!(0,k.isEqual)(Pt,Gt)&&qt(void 0)},[Pt,Gt,qt]),{result:_t,term:N,setTerm:W,types:q,setTypes:rt,filters:Pt,setFilters:It,pageLimit:Ut,setPageLimit:Lt,pageCursor:$t,setPageCursor:qt,fetchNextPage:Ee?Zt:void 0,fetchPreviousPage:ft?Jt:void 0}},xt=m=>{const{initialState:L,children:j}=m,N=ct(L);return(0,s.jsx)(Q.Ig,{attributes:{searchTypes:N.types.sort().join(",")},children:(0,s.jsx)(At.Provider,{value:(0,K.B)({1:N}),children:j})})},pt=m=>{const{initialState:L,inheritParentContextIfAvailable:j,children:N}=m,W=Rt(),q=(0,lt.gf)(J.U),rt=L??{},Pt=q.has("search.query.pageLimit")?{pageLimit:q.getNumber("search.query.pageLimit")}:{},It={...dt,...rt,...Pt};return W&&j?(0,s.jsx)(s.Fragment,{children:N}):(0,s.jsx)(xt,{initialState:It,children:N})};var bt=t(78467),wt=t(20577),at=t(82266),gt=t(29365),vt=t(34839),et=t(16249),Et=t(64947),ot=t(45917),U=t(22771),V=t(87849),nt=t(93184);const Ct=(0,nt.h)({id:"search-react",messages:{searchBar:{title:"Search",placeholder:"Search in {{org}}"},searchFilter:{allOptionTitle:"All"},searchPagination:{limitLabel:"Results per page:",limitText:"of {{num}}"},noResultsDescription:"Sorry, no results were found",searchResultGroup:{linkTitle:"See All",addFilterButtonTitle:"Add filter"},searchResultPager:{previous:"Previous",next:"Next"}}}),ut=(0,a.forwardRef)((m,L)=>{const{onChange:j,onKeyDown:N=()=>{},onClear:W=()=>{},onSubmit:q=()=>{},debounceTime:rt=200,clearButton:Pt=!0,fullWidth:It=!0,value:Ut,label:Lt,placeholder:$t,inputProps:qt={},InputProps:ge={},endAdornment:Gt,..._t}=m,Ee=(0,lt.gf)(J.U),[ft,Zt]=(0,a.useState)(""),Jt=(0,a.useRef)(""),{t:fe}=(0,V.i)(Ct);(0,a.useEffect)(()=>{Zt(ve=>ve===Jt.current?String(Ut):ve)},[Ut,Jt]),(0,U.A)(()=>{Jt.current=ft,j(ft)},rt,[ft]);const ne=(0,a.useCallback)(ve=>{Zt(ve.target.value)},[Zt]),se=(0,a.useCallback)(ve=>{N&&N(ve),q&&ve.key==="Enter"&&q()},[N,q]),ce=(0,a.useCallback)(()=>{Jt.current="",j(""),Zt(""),W&&W()},[j,W]),Ve=Lt?void 0:fe("searchBar.title"),Se=$t??fe("searchBar.placeholder",{org:Ee.getOptionalString("app.title")||"Backstage"}),fn=(0,at.n)().getSystemIcon("search")||ot.A,Ge=(0,s.jsx)(vt.A,{position:"start",children:(0,s.jsx)(gt.A,{"aria-label":"Query",size:"small",disabled:!0,children:(0,s.jsx)(fn,{})})}),sn=(0,s.jsx)(vt.A,{position:"end",children:(0,s.jsx)(Et.A,{"aria-label":"Clear",size:"small",onClick:ce,onKeyDown:ve=>{ve.key==="Enter"&&ve.stopPropagation()},children:"Clear"})});return(0,s.jsx)(pt,{inheritParentContextIfAvailable:!0,children:(0,s.jsx)(et.A,{id:"search-bar-text-field","data-testid":"search-bar-next",variant:"outlined",margin:"normal",inputRef:L,value:ft,label:Lt,placeholder:Se,InputProps:{startAdornment:Ge,endAdornment:Pt?sn:Gt,...ge},inputProps:{"aria-label":Ve,...qt},fullWidth:It,onChange:ne,onKeyDown:se,..._t})})}),Bt=(0,a.forwardRef)((m,L)=>{const{value:j="",onChange:N,...W}=m,{term:q,setTerm:rt}=Ot();(0,a.useEffect)(()=>{j&&rt(String(j))},[j,rt]);const Pt=(0,a.useCallback)(It=>{N?N(It):rt(It)},[N,rt]);return(0,s.jsx)(pt,{inheritParentContextIfAvailable:!0,children:(0,s.jsx)(Q.Ig,{attributes:{pluginId:"search",extension:"SearchBar"},children:(0,s.jsx)(ut,{...W,ref:L,value:q,onChange:Pt})})})}),Nt=(0,p.A)(m=>({loading:{right:m.spacing(1),position:"absolute"}})),Kt=m=>L=>(0,s.jsx)(pt,{inheritParentContextIfAvailable:!0,children:(0,s.jsx)(m,{...L})}),Xt=()=>{const m=Nt();return(0,s.jsx)(bt.A,{className:m.loading,"data-testid":"search-autocomplete-progressbar",color:"inherit",size:20})},kt=Kt(function(L){const{loading:j,value:N,onChange:W=()=>{},options:q=[],getOptionLabel:rt=Jt=>String(Jt),inputPlaceholder:Pt,inputDebounceTime:It,freeSolo:Ut=!0,fullWidth:Lt=!0,clearOnBlur:$t=!1,"data-testid":qt="search-autocomplete",...ge}=L,{setTerm:Gt}=Ot(),_t=(0,a.useCallback)(Jt=>Jt?typeof Jt=="string"?Jt:rt(Jt):"",[rt]),Ee=(0,a.useMemo)(()=>_t(N),[N,_t]),ft=(0,a.useCallback)((Jt,fe,ne,se)=>{Gt(_t(fe)),W(Jt,fe,ne,se)},[_t,Gt,W]),Zt=(0,a.useCallback)(({InputProps:{ref:Jt,className:fe,endAdornment:ne},InputLabelProps:se,...ce})=>(0,s.jsx)(Bt,{...ce,ref:Jt,clearButton:!1,value:Ee,placeholder:Pt,debounceTime:It,endAdornment:j?(0,s.jsx)(Xt,{}):ne,InputProps:{className:fe}}),[j,Ee,Pt,It]);return(0,s.jsx)(wt.Ay,{...ge,"data-testid":qt,value:N,onChange:ft,options:q,getOptionLabel:rt,renderInput:Zt,freeSolo:Ut,fullWidth:Lt,clearOnBlur:$t})});var Qt=t(18690),jt=t(27698);const Ht=m=>m?.document,le=m=>{const{entityId:L,entityTitle:j,debounceTime:N=150,searchResultUrlMapper:W}=m,[q,rt]=(0,a.useState)(!1),Pt=(0,Qt.Zp)(),{setFilters:It,term:Ut,result:{loading:Lt,value:$t}}=Ot(),[qt,ge]=(0,a.useState)([]);(0,a.useEffect)(()=>{let Zt=!0;if(Zt&&$t){const Jt=$t.results.slice(0,10);ge(Jt)}return()=>{Zt=!1}},[Lt,$t]);const{kind:Gt,name:_t,namespace:Ee}=L;(0,a.useEffect)(()=>{It(Zt=>({...Zt,kind:Gt,namespace:Ee,name:_t}))},[Gt,Ee,_t,It]);const ft=(Zt,Jt)=>{if(Ht(Jt)){const{location:fe}=Jt.document;Pt(W?W(fe):fe)}};return(0,s.jsx)(kt,{"data-testid":"techdocs-search-bar",size:"small",open:q&&!!Ut,getOptionLabel:()=>"",filterOptions:Zt=>Zt,onClose:()=>{rt(!1)},onOpen:()=>{rt(!0)},onChange:ft,blurOnSelect:!0,noOptionsText:"No results found",value:null,options:qt,renderOption:({document:Zt,highlight:Jt})=>(0,s.jsx)(jt.TechDocsSearchResultListItem,{result:Zt,lineClamp:3,asListItem:!1,asLink:!1,title:Zt.title,highlight:Jt}),loading:Lt,inputDebounceTime:N,inputPlaceholder:`Search ${j||L.name} docs`,freeSolo:!1})},he=m=>{const L={term:"",types:["techdocs"],pageCursor:"",filters:m.entityId};return(0,s.jsx)(pt,{initialState:L,children:(0,s.jsx)(le,{...m})})};var zt=t(74219);const oe=(0,a.lazy)(()=>Promise.all([t.e(3308),t.e(9234)]).then(t.bind(t,99234)).then(m=>({default:m.RealLogViewer})));function de(m){const{Progress:L}=(0,at.n)().getComponents();return(0,s.jsx)(a.Suspense,{fallback:(0,s.jsx)(L,{}),children:(0,s.jsx)(oe,{...m})})}var Ye=t(73845),re=t(72501),on=t(12398),ke=t(32881);const Te=(0,p.A)(m=>(0,on.A)({paper:{width:"100%",[m.breakpoints.up("sm")]:{width:"75%"},[m.breakpoints.up("md")]:{width:"50%"},padding:m.spacing(2.5)},root:{height:"100%",overflow:"hidden"},logs:{background:m.palette.background.default}})),He=({buildLog:m,onClose:L})=>{const j=Te(),N=m.length===0?"Waiting for logs...":m.join(`
8
+ `);return(0,s.jsxs)(x.A,{container:!0,direction:"column",className:j.root,spacing:0,wrap:"nowrap",children:[(0,s.jsxs)(x.A,{item:!0,container:!0,justifyContent:"space-between",alignItems:"center",spacing:0,wrap:"nowrap",children:[(0,s.jsx)(re.A,{variant:"h5",children:"Build Details"}),(0,s.jsx)(gt.A,{title:"Close the drawer",onClick:L,color:"inherit",children:(0,s.jsx)(ke.A,{})},"dismiss")]}),(0,s.jsx)(x.A,{item:!0,xs:!0,children:(0,s.jsx)(de,{text:N,classes:{root:j.logs}})})]})},ae=({buildLog:m})=>{const L=Te(),[j,N]=(0,a.useState)(!1);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Et.A,{color:"inherit",onClick:()=>N(!0),children:"Show Build Logs"}),(0,s.jsx)(Ye.Ay,{classes:{paper:L.paper},anchor:"right",open:j,onClose:()=>N(!1),children:(0,s.jsx)(He,{buildLog:m,onClose:()=>N(!1)})})]})};var _e=t(12173);const qe=({errorMessage:m})=>{const L=(0,lt.gf)(J.U).getOptionalString("techdocs.builder"),j=(0,G.s)(),{entityRef:N}=(0,b.V)(),W=(0,Qt.zy)();(0,a.useEffect)(()=>{const{pathname:rt,search:Pt,hash:It}=W;j.captureEvent("not-found",`${rt}${Pt}${It}`,{attributes:N})},[j,N,W]);let q="";return[void 0,"local"].includes(L)||(q="Note that techdocs.builder is not set to 'local' in your config, which means this Backstage app will not generate docs if they are not found. Make sure the project's docs are generated and published by some external process (e.g. CI/CD pipeline). Or change techdocs.builder to 'local' to generate docs from this Backstage instance."),(0,s.jsx)(_e.M,{status:"404",statusMessage:m||"Documentation not found",additionalInfo:q})};var dn=t(28966),tn=t(26679);function en({contentLoading:m,content:L,activeSyncState:j}){return m||j==="BUILD_READY_RELOAD"||!L&&j==="CHECKING"?"CHECKING":!L&&j==="BUILDING"?"INITIAL_BUILD":L?j==="BUILDING"?"CONTENT_STALE_REFRESHING":j==="BUILD_READY"?"CONTENT_STALE_READY":j==="ERROR"?"CONTENT_STALE_ERROR":"CONTENT_FRESH":"CONTENT_NOT_FOUND"}function un(m,L){const j={...m};switch(L.type){case"sync":L.state==="CHECKING"&&(j.buildLog=[]),j.activeSyncState=L.state,j.syncError=L.syncError;break;case"contentLoading":j.contentLoading=!0,j.contentError=void 0;break;case"content":typeof L.path=="string"&&(j.path=L.path),j.contentLoading=!1,j.content=L.content,j.contentError=L.contentError;break;case"buildLog":j.buildLog=j.buildLog.concat(L.log);break;default:throw new Error}return["BUILD_READY","BUILD_READY_RELOAD"].includes(j.activeSyncState)&&["contentLoading","content"].includes(L.type)&&(j.activeSyncState="UP_TO_DATE",j.buildLog=[]),j}function We(m,L,j,N){const[W,q]=(0,a.useReducer)(un,{activeSyncState:"CHECKING",path:N,contentLoading:!0,buildLog:[]}),rt=(0,lt.gf)(tn.s),{retry:Pt}=(0,dn.A)(async()=>{q({type:"contentLoading"});try{const Lt=await rt.getEntityDocs({kind:m,namespace:L,name:j},N);return q({type:"content",content:Lt,path:N}),Lt}catch(Lt){q({type:"content",contentError:Lt,path:N})}},[rt,m,L,j,N]),It=(0,a.useRef)({content:void 0,reload:()=>{}});It.current={content:W.content,reload:Pt},(0,X.A)(async()=>{q({type:"sync",state:"CHECKING"});const Lt=setTimeout(()=>{q({type:"sync",state:"BUILDING"})},1e3);try{switch(await rt.syncEntityDocs({kind:m,namespace:L,name:j},qt=>{q({type:"buildLog",log:qt})})){case"updated":It.current.content?q({type:"sync",state:"BUILD_READY"}):(It.current.reload(),q({type:"sync",state:"BUILD_READY_RELOAD"}));break;case"cached":q({type:"sync",state:"UP_TO_DATE"});break;default:q({type:"sync",state:"ERROR",syncError:new Error("Unexpected return state")});break}}catch($t){q({type:"sync",state:"ERROR",syncError:$t})}finally{clearTimeout(Lt)}},[m,j,L,rt,q,It]);const Ut=(0,a.useMemo)(()=>en({activeSyncState:W.activeSyncState,contentLoading:W.contentLoading,content:W.content}),[W.activeSyncState,W.content,W.contentLoading]);return(0,a.useMemo)(()=>({state:Ut,contentReload:Pt,path:W.path,content:W.content,contentErrorMessage:W.contentError?.toString(),syncErrorMessage:W.syncError?.toString(),buildLog:W.buildLog}),[Ut,Pt,W.path,W.content,W.contentError,W.syncError,W.buildLog])}const Ke=(0,a.createContext)({}),ze=()=>(0,a.useContext)(Ke),be=m=>{const{children:L}=m,{"*":j=""}=(0,Qt.g)(),{entityRef:N}=(0,b.V)(),{kind:W,namespace:q,name:rt}=N,Pt=We(W,q,rt,j);return(0,s.jsx)(Ke.Provider,{value:Pt,children:L instanceof Function?L(Pt):L})},Qe=m=>L=>(0,s.jsx)(be,{children:(0,s.jsx)(m,{...L})}),Ze=(0,p.A)(m=>({root:{marginBottom:m.spacing(2)},message:{wordBreak:"break-word",overflowWrap:"anywhere"}})),je=()=>{let m=null;const L=Ze(),{state:j,contentReload:N,contentErrorMessage:W,syncErrorMessage:q,buildLog:rt}=ze();return j==="INITIAL_BUILD"&&(m=(0,s.jsx)(zt.A,{classes:{root:L.root},variant:"outlined",severity:"info",icon:(0,s.jsx)(bt.A,{size:"24px"}),action:(0,s.jsx)(ae,{buildLog:rt}),children:"Documentation is accessed for the first time and is being prepared. The subsequent loads are much faster."})),j==="CONTENT_STALE_REFRESHING"&&(m=(0,s.jsx)(zt.A,{variant:"outlined",severity:"info",icon:(0,s.jsx)(bt.A,{size:"24px"}),action:(0,s.jsx)(ae,{buildLog:rt}),classes:{root:L.root},children:"A newer version of this documentation is being prepared and will be available shortly."})),j==="CONTENT_STALE_READY"&&(m=(0,s.jsx)(zt.A,{variant:"outlined",severity:"success",action:(0,s.jsx)(Et.A,{color:"inherit",onClick:()=>N(),children:"Refresh"}),classes:{root:L.root},children:"A newer version of this documentation is now available, please refresh to view."})),j==="CONTENT_STALE_ERROR"&&(m=(0,s.jsxs)(zt.A,{variant:"outlined",severity:"error",action:(0,s.jsx)(ae,{buildLog:rt}),classes:{root:L.root,message:L.message},children:["Building a newer version of this documentation failed."," ",q]})),j==="CONTENT_NOT_FOUND"&&(m=(0,s.jsxs)(s.Fragment,{children:[q&&(0,s.jsxs)(zt.A,{variant:"outlined",severity:"error",action:(0,s.jsx)(ae,{buildLog:rt}),classes:{root:L.root,message:L.message},children:["Building a newer version of this documentation failed."," ",q]}),(0,s.jsx)(qe,{errorMessage:W})]})),m};var Ue=t(5893),Le=t(54917),an=t(96726),T=t(71651),l=t.n(T);const E=/main\.[A-Fa-f0-9]{8}\.min\.css$/,R=/^https:\/\/fonts\.googleapis\.com/,Z=/^https:\/\/fonts\.gstatic\.com/,_=m=>m.nodeName==="LINK",st=m=>{const L=m?.getAttribute("href")||"",j=L.match(E),N=L.match(R),W=L.match(Z);return j||N||W},Mt=m=>(_(m)&&!st(m)&&m.remove(),m),Wt=m=>m.nodeName==="IFRAME",Vt=(m,L)=>{const j=m.getAttribute("src")||"";try{const{host:N}=new URL(j);return L.includes(N)}catch{return!1}},ie=m=>L=>(Wt(L)&&!Vt(L,m)&&L.remove(),L),Me=()=>{const m=(0,lt.gf)(J.U);return(0,a.useMemo)(()=>m.getOptionalConfig("techdocs.sanitizer"),[m])},pe=()=>{const m=Me();return(0,a.useCallback)(async L=>{const j=m?.getOptionalStringArray("allowedIframeHosts");l().addHook("beforeSanitizeElements",Mt);const N=["link","meta"];j&&(N.push("iframe"),l().addHook("beforeSanitizeElements",ie(j))),l().addHook("uponSanitizeElement",(rt,Pt)=>{Pt.tagName==="meta"&&(rt.getAttribute("http-equiv")==="refresh"&&rt.getAttribute("content")?.includes("url=")||rt.parentNode?.removeChild(rt))}),l().addHook("uponSanitizeAttribute",(rt,Pt)=>{rt.tagName!=="meta"&&(Pt.attrName==="http-equiv"||Pt.attrName==="content")&&rt.removeAttribute(Pt.attrName)});const W=m?.getOptionalString("allowedCustomElementTagNameRegExp"),q=m?.getOptionalString("allowedCustomElementAttributeNameRegExp");return l().sanitize(L.outerHTML,{ADD_TAGS:N,FORBID_TAGS:["style"],ADD_ATTR:["http-equiv","content","dominant-baseline"],WHOLE_DOCUMENT:!0,RETURN_DOM:!0,CUSTOM_ELEMENT_HANDLING:{tagNameCheck:W?new RegExp(W):void 0,attributeNameCheck:q?new RegExp(q):void 0}})},[m])};var te=t(34435),ee=t(268);const ye=({theme:m})=>`
9
+ /*================== Variables ==================*/
10
+ /*
11
+ As the MkDocs output is rendered in shadow DOM, the CSS variable definitions on the root selector are not applied. Instead, they have to be applied on :host.
12
+ As there is no way to transform the served main*.css yet (for example in the backend), we have to copy from main*.css and modify them.
13
+ */
14
+
15
+ :host {
16
+ /* FONT */
17
+ --md-default-fg-color: ${m.palette.text.primary};
18
+ --md-default-fg-color--light: ${m.palette.text.secondary};
19
+ --md-default-fg-color--lighter: ${(0,ee.a)(m.palette.text.secondary,.7)};
20
+ --md-default-fg-color--lightest: ${(0,ee.a)(m.palette.text.secondary,.3)};
21
+
22
+ /* BACKGROUND */
23
+ --md-default-bg-color:${m.palette.background.default};
24
+ --md-default-bg-color--light: ${m.palette.background.paper};
25
+ --md-default-bg-color--lighter: ${(0,ee.a)(m.palette.background.paper,.7)};
26
+ --md-default-bg-color--lightest: ${(0,ee.a)(m.palette.background.paper,.3)};
27
+
28
+ /* PRIMARY */
29
+ --md-primary-fg-color: ${m.palette.primary.main};
30
+ --md-primary-fg-color--light: ${m.palette.primary.light};
31
+ --md-primary-fg-color--dark: ${m.palette.primary.dark};
32
+ --md-primary-bg-color: ${m.palette.primary.contrastText};
33
+ --md-primary-bg-color--light: ${(0,ee.a)(m.palette.primary.contrastText,.7)};
34
+
35
+ /* ACCENT */
36
+ --md-accent-fg-color: var(--md-primary-fg-color);
37
+ --md-accent-fg-color--transparent: ${(0,ee.X4)(m.palette.primary.main,.1)};
38
+ --md-accent-bg-color: var(--md-primary-bg-color);
39
+ --md-accent-bg-color--light: var(--md-primary-bg-color--light);
40
+
41
+ /* SHADOW */
42
+ --md-shadow-z1: ${m.shadows[1]};
43
+ --md-shadow-z2: ${m.shadows[2]};
44
+ --md-shadow-z3: ${m.shadows[3]};
45
+
46
+ /* EXTENSIONS */
47
+ --md-admonition-fg-color: var(--md-default-fg-color);
48
+ --md-admonition-bg-color: var(--md-default-bg-color);
49
+ /* Admonitions and others are using SVG masks to define icons. These masks are defined as CSS variables. */
50
+ --md-admonition-icon--note: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20.71 7.04c.39-.39.39-1.04 0-1.41l-2.34-2.34c-.37-.39-1.02-.39-1.41 0l-1.84 1.83 3.75 3.75M3 17.25V21h3.75L17.81 9.93l-3.75-3.75L3 17.25z"/></svg>');
51
+ --md-admonition-icon--abstract: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 5h16v2H4V5m0 4h16v2H4V9m0 4h16v2H4v-2m0 4h10v2H4v-2z"/></svg>');
52
+ --md-admonition-icon--info: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 9h-2V7h2m0 10h-2v-6h2m-1-9A10 10 0 002 12a10 10 0 0010 10 10 10 0 0010-10A10 10 0 0012 2z"/></svg>');
53
+ --md-admonition-icon--tip: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M17.55 11.2c-.23-.3-.5-.56-.76-.82-.65-.6-1.4-1.03-2.03-1.66C13.3 7.26 13 4.85 13.91 3c-.91.23-1.75.75-2.45 1.32-2.54 2.08-3.54 5.75-2.34 8.9.04.1.08.2.08.33 0 .22-.15.42-.35.5-.22.1-.46.04-.64-.12a.83.83 0 01-.15-.17c-1.1-1.43-1.28-3.48-.53-5.12C5.89 10 5 12.3 5.14 14.47c.04.5.1 1 .27 1.5.14.6.4 1.2.72 1.73 1.04 1.73 2.87 2.97 4.84 3.22 2.1.27 4.35-.12 5.96-1.6 1.8-1.66 2.45-4.32 1.5-6.6l-.13-.26c-.2-.46-.47-.87-.8-1.25l.05-.01m-3.1 6.3c-.28.24-.73.5-1.08.6-1.1.4-2.2-.16-2.87-.82 1.19-.28 1.89-1.16 2.09-2.05.17-.8-.14-1.46-.27-2.23-.12-.74-.1-1.37.18-2.06.17.38.37.76.6 1.06.76 1 1.95 1.44 2.2 2.8.04.14.06.28.06.43.03.82-.32 1.72-.92 2.27h.01z"/></svg>');
54
+ --md-admonition-icon--success: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2m-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>');
55
+ --md-admonition-icon--question: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M15.07 11.25l-.9.92C13.45 12.89 13 13.5 13 15h-2v-.5c0-1.11.45-2.11 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41a2 2 0 00-2-2 2 2 0 00-2 2H8a4 4 0 014-4 4 4 0 014 4 3.2 3.2 0 01-.93 2.25M13 19h-2v-2h2M12 2A10 10 0 002 12a10 10 0 0010 10 10 10 0 0010-10c0-5.53-4.5-10-10-10z"/></svg>');
56
+ --md-admonition-icon--warning: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 14h-2v-4h2m0 8h-2v-2h2M1 21h22L12 2 1 21z"/></svg>');
57
+ --md-admonition-icon--failure: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2c5.53 0 10 4.47 10 10s-4.47 10-10 10S2 17.53 2 12 6.47 2 12 2m3.59 5L12 10.59 8.41 7 7 8.41 10.59 12 7 15.59 8.41 17 12 13.41 15.59 17 17 15.59 13.41 12 17 8.41 15.59 7z"/></svg>');
58
+ --md-admonition-icon--danger: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M11.5 20l4.86-9.73H13V4l-5 9.73h3.5V20M12 2c2.75 0 5.1 1 7.05 2.95C21 6.9 22 9.25 22 12s-1 5.1-2.95 7.05C17.1 21 14.75 22 12 22s-5.1-1-7.05-2.95C3 17.1 2 14.75 2 12s1-5.1 2.95-7.05C6.9 3 9.25 2 12 2z"/></svg>');
59
+ --md-admonition-icon--bug: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14 12h-4v-2h4m0 6h-4v-2h4m6-6h-2.81a5.985 5.985 0 00-1.82-1.96L17 4.41 15.59 3l-2.17 2.17a6.002 6.002 0 00-2.83 0L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20V8z"/></svg>');
60
+ --md-admonition-icon--example: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7 13v-2h14v2H7m0 6v-2h14v2H7M7 7V5h14v2H7M3 8V5H2V4h2v4H3m-1 9v-1h3v4H2v-1h2v-.5H3v-1h1V17H2m2.25-7a.75.75 0 01.75.75c0 .2-.08.39-.21.52L3.12 13H5v1H2v-.92L4 11H2v-1h2.25z"/></svg>');
61
+ --md-admonition-icon--quote: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14 17h3l2-4V7h-6v6h3M6 17h3l2-4V7H5v6h3l-2 4z"/></svg>');
62
+ --md-footnotes-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 7v4H5.83l3.58-3.59L8 6l-6 6 6 6 1.41-1.42L5.83 13H21V7h-2z"/></svg>');
63
+ --md-details-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8.59 16.58 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.42z"/></svg>');
64
+ --md-tasklist-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"/></svg>');
65
+ --md-tasklist-icon--checked: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>');
66
+ --md-nav-icon--prev: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>');
67
+ --md-nav-icon--next: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8.59 16.58 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.42z"/></svg>');
68
+ --md-toc-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 9h14V7H3v2m0 4h14v-2H3v2m0 4h14v-2H3v2m16 0h2v-2h-2v2m0-10v2h2V7h-2m0 6h2v-2h-2v2z"/></svg>');
69
+ --md-clipboard-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 21H8V7h11m0-2H8a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2m-3-4H4a2 2 0 0 0-2 2v14h2V3h12V1z"/></svg>');
70
+ --md-search-result-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h7c-.41-.25-.8-.56-1.14-.9-.33-.33-.61-.7-.86-1.1H6V4h7v5h5v1.18c.71.16 1.39.43 2 .82V8l-6-6m6.31 16.9c1.33-2.11.69-4.9-1.4-6.22-2.11-1.33-4.91-.68-6.22 1.4-1.34 2.11-.69 4.89 1.4 6.22 1.46.93 3.32.93 4.79.02L22 23.39 23.39 22l-3.08-3.1m-3.81.1a2.5 2.5 0 0 1-2.5-2.5 2.5 2.5 0 0 1 2.5-2.5 2.5 2.5 0 0 1 2.5 2.5 2.5 2.5 0 0 1-2.5 2.5z"/></svg>');
71
+ --md-source-forks-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M5 3.25a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0zm0 2.122a2.25 2.25 0 1 0-1.5 0v.878A2.25 2.25 0 0 0 5.75 8.5h1.5v2.128a2.251 2.251 0 1 0 1.5 0V8.5h1.5a2.25 2.25 0 0 0 2.25-2.25v-.878a2.25 2.25 0 1 0-1.5 0v.878a.75.75 0 0 1-.75.75h-4.5A.75.75 0 0 1 5 6.25v-.878zm3.75 7.378a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0zm3-8.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5z"/></svg>');
72
+ --md-source-repositories-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 1 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 0 1-1.072 1.05A2.495 2.495 0 0 1 2 11.5v-9zm10.5-1V9h-8c-.356 0-.694.074-1 .208V2.5a1 1 0 0 1 1-1h8zM5 12.25v3.25a.25.25 0 0 0 .4.2l1.45-1.087a.25.25 0 0 1 .3 0L8.6 15.7a.25.25 0 0 0 .4-.2v-3.25a.25.25 0 0 0-.25-.25h-3.5a.25.25 0 0 0-.25.25z"/></svg>');
73
+ --md-source-stars-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.75.75 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25zm0 2.445L6.615 5.5a.75.75 0 0 1-.564.41l-3.097.45 2.24 2.184a.75.75 0 0 1 .216.664l-.528 3.084 2.769-1.456a.75.75 0 0 1 .698 0l2.77 1.456-.53-3.084a.75.75 0 0 1 .216-.664l2.24-2.183-3.096-.45a.75.75 0 0 1-.564-.41L8 2.694v.001z"/></svg>');
74
+ --md-source-version-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M2.5 7.775V2.75a.25.25 0 0 1 .25-.25h5.025a.25.25 0 0 1 .177.073l6.25 6.25a.25.25 0 0 1 0 .354l-5.025 5.025a.25.25 0 0 1-.354 0l-6.25-6.25a.25.25 0 0 1-.073-.177zm-1.5 0V2.75C1 1.784 1.784 1 2.75 1h5.025c.464 0 .91.184 1.238.513l6.25 6.25a1.75 1.75 0 0 1 0 2.474l-5.026 5.026a1.75 1.75 0 0 1-2.474 0l-6.25-6.25A1.75 1.75 0 0 1 1 7.775zM6 5a1 1 0 1 0 0 2 1 1 0 0 0 0-2z"/></svg>');
75
+ --md-version-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!--! Font Awesome Free 6.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2022 Fonticons, Inc.--><path d="m310.6 246.6-127.1 128c-7.1 6.3-15.3 9.4-23.5 9.4s-16.38-3.125-22.63-9.375l-127.1-128C.224 237.5-2.516 223.7 2.438 211.8S19.07 192 32 192h255.1c12.94 0 24.62 7.781 29.58 19.75s3.12 25.75-6.08 34.85z"/></svg>');
76
+
77
+ --md-status--updated: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><title>cellphone-arrow-down</title><path d="M17,1H7A2,2 0 0,0 5,3V21A2,2 0 0,0 7,23H17A2,2 0 0,0 19,21V3A2,2 0 0,0 17,1M17,19H7V5H17V19M16,13H13V8H11V13H8L12,17L16,13Z" /></svg>');
78
+ --md-status: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M11 9h2V7h-2m1 13c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-18A10 10 0 0 0 2 12a10 10 0 0 0 10 10 10 10 0 0 0 10-10A10 10 0 0 0 12 2m-1 15h2v-6h-2v6Z"/></svg>');
79
+ --md-status--new: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m23 12-2.44-2.78.34-3.68-3.61-.82-1.89-3.18L12 3 8.6 1.54 6.71 4.72l-3.61.81.34 3.68L1 12l2.44 2.78-.34 3.69 3.61.82 1.89 3.18L12 21l3.4 1.46 1.89-3.18 3.61-.82-.34-3.68L23 12m-10 5h-2v-2h2v2m0-4h-2V7h2v6Z"/></svg>');
80
+ --md-status--deprecated: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9 3v1H4v2h1v13a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6h1V4h-5V3H9m0 5h2v9H9V8m4 0h2v9h-2V8Z"/></svg>');
81
+ --md-status--encrypted: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 1 3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4m0 6c1.4 0 2.8 1.1 2.8 2.5V11c.6 0 1.2.6 1.2 1.3v3.5c0 .6-.6 1.2-1.3 1.2H9.2c-.6 0-1.2-.6-1.2-1.3v-3.5c0-.6.6-1.2 1.2-1.2V9.5C9.2 8.1 10.6 7 12 7m0 1.2c-.8 0-1.5.5-1.5 1.3V11h3V9.5c0-.8-.7-1.3-1.5-1.3Z"/></svg>');
82
+ }
83
+
84
+ :host > * {
85
+ /* CODE */
86
+ --md-code-fg-color: ${m.palette.text.primary};
87
+ --md-code-bg-color: ${m.palette.code?.background??m.palette.background.paper};
88
+ --md-code-hl-color: ${(0,ee.X4)(m.palette.warning.main,.5)};
89
+ --md-code-hl-color--light: var(--md-code-hl-color);
90
+ --md-code-hl-keyword-color: ${m.palette.type==="dark"?m.palette.primary.light:m.palette.primary.dark};
91
+ --md-code-hl-function-color: ${m.palette.type==="dark"?m.palette.secondary.light:m.palette.secondary.dark};
92
+ --md-code-hl-string-color: ${m.palette.type==="dark"?m.palette.success.light:m.palette.success.dark};
93
+ --md-code-hl-number-color: ${m.palette.type==="dark"?m.palette.error.light:m.palette.error.dark};
94
+ --md-code-hl-constant-color: var(--md-code-hl-function-color);
95
+ --md-code-hl-special-color: var(--md-code-hl-function-color);
96
+ --md-code-hl-name-color: var(--md-code-fg-color);
97
+ --md-code-hl-comment-color: var(--md-default-fg-color--light);
98
+ --md-code-hl-generic-color: var(--md-default-fg-color--light);
99
+ --md-code-hl-variable-color: var(--md-default-fg-color--light);
100
+ --md-code-hl-operator-color: var(--md-default-fg-color--light);
101
+ --md-code-hl-punctuation-color: var(--md-default-fg-color--light);
102
+
103
+ /* TYPESET */
104
+ --md-typeset-font-size: 1rem;
105
+ --md-typeset-color: var(--md-default-fg-color);
106
+ --md-typeset-a-color: ${m.palette.link};
107
+ --md-typeset-table-color: ${m.palette.text.primary};
108
+ --md-typeset-table-color--light: ${(0,ee.X4)(m.palette.text.primary,.05)};
109
+ --md-typeset-del-color: ${m.palette.type==="dark"?(0,ee.X4)(m.palette.error.dark,.5):(0,ee.X4)(m.palette.error.light,.5)};
110
+ --md-typeset-ins-color: ${m.palette.type==="dark"?(0,ee.X4)(m.palette.success.dark,.5):(0,ee.X4)(m.palette.success.light,.5)};
111
+ --md-typeset-mark-color: ${m.palette.type==="dark"?(0,ee.X4)(m.palette.warning.dark,.5):(0,ee.X4)(m.palette.warning.light,.5)};
112
+ --md-typeset-kbd-color: var(--md-code-bg-color);
113
+ --md-typeset-kbd-accent-color var(--md-code-bg-color);
114
+ --md-typeset-kbd-border-color: var(--md-default-fg-color--light);
115
+ }
116
+
117
+ @media screen and (max-width: 76.1875em) {
118
+ :host > * {
119
+ /* TYPESET */
120
+ --md-typeset-font-size: .9rem;
121
+ }
122
+ }
123
+
124
+ @media screen and (max-width: 600px) {
125
+ :host > * {
126
+ /* TYPESET */
127
+ --md-typeset-font-size: .7rem;
128
+ }
129
+ }
130
+
131
+ --md-footer-bg-color: var(--md-default-bg-color);
132
+ --md-footer-bg-color--dark: var(--md-default-bg-color);
133
+ `,nn=({theme:m})=>`
134
+ /*================== Reset ==================*/
135
+
136
+ body {
137
+ --md-text-color: var(--md-default-fg-color);
138
+ --md-text-link-color: var(--md-accent-fg-color);
139
+ --md-text-font-family: ${m.typography.fontFamily};
140
+ font-family: var(--md-text-font-family);
141
+ background-color: unset;
142
+ }
143
+ `,hn="224px",ue=({theme:m,sidebar:L})=>`
144
+ /*================== Layout ==================*/
145
+
146
+ /* mkdocs material v9 compat */
147
+ .md-nav__title {
148
+ color: var(--md-default-fg-color);
149
+ }
150
+
151
+ .md-grid {
152
+ max-width: 100%;
153
+ margin: 0;
154
+ }
155
+
156
+ .md-nav {
157
+ font-size: calc(var(--md-typeset-font-size) * 0.9);
158
+ }
159
+ .md-nav__link:not(:has(svg)) {
160
+ display: flex;
161
+ align-items: center;
162
+ justify-content: space-between;
163
+ }
164
+ .md-nav__link:has(svg) > .md-ellipsis {
165
+ flex-grow: 1;
166
+ }
167
+ .md-nav__icon {
168
+ height: 20px !important;
169
+ width: 20px !important;
170
+ margin-left:${m.spacing(1)}px;
171
+ }
172
+ .md-nav__icon svg {
173
+ margin: 0;
174
+ width: 20px !important;
175
+ height: 20px !important;
176
+ }
177
+ .md-nav__icon:after {
178
+ width: 20px !important;
179
+ height: 20px !important;
180
+ }
181
+ .md-status--updated::after {
182
+ -webkit-mask-image: var(--md-status--updated);
183
+ mask-image: var(--md-status--updated);
184
+ }
185
+
186
+ .md-nav__item--active > .md-nav__link, a.md-nav__link--active {
187
+ text-decoration: underline;
188
+ color: var(--md-typeset-a-color);
189
+ }
190
+ .md-nav__link--active > .md-status:after {
191
+ background-color: var(--md-typeset-a-color);
192
+ }
193
+ .md-nav__link[href]:hover > .md-status:after {
194
+ background-color: var(--md-accent-fg-color);
195
+ }
196
+
197
+ .md-main__inner {
198
+ margin-top: 0;
199
+ }
200
+
201
+ .md-sidebar {
202
+ bottom: 75px;
203
+ position: fixed;
204
+ width: 16rem;
205
+ overflow-y: auto;
206
+ overflow-x: hidden;
207
+ scrollbar-color: rgb(193, 193, 193) #eee;
208
+ scrollbar-width: thin;
209
+ }
210
+ .md-sidebar .md-sidebar__scrollwrap {
211
+ width: calc(16rem);
212
+ overflow-y: hidden;
213
+ }
214
+ @supports selector(::-webkit-scrollbar) {
215
+ [dir=ltr] .md-sidebar__inner {
216
+ padding-right: calc(100% - 15.1rem);
217
+ }
218
+ }
219
+ .md-sidebar--secondary {
220
+ right: ${m.spacing(3)}px;
221
+ }
222
+ .md-sidebar::-webkit-scrollbar {
223
+ width: 5px;
224
+ }
225
+ .md-sidebar::-webkit-scrollbar-button {
226
+ width: 5px;
227
+ height: 5px;
228
+ }
229
+ .md-sidebar::-webkit-scrollbar-track {
230
+ background: #eee;
231
+ border: 1 px solid rgb(250, 250, 250);
232
+ box-shadow: 0px 0px 3px #dfdfdf inset;
233
+ border-radius: 3px;
234
+ }
235
+ .md-sidebar::-webkit-scrollbar-thumb {
236
+ width: 5px;
237
+ background: rgb(193, 193, 193);
238
+ border: transparent;
239
+ border-radius: 3px;
240
+ }
241
+ .md-sidebar::-webkit-scrollbar-thumb:hover {
242
+ background: rgb(125, 125, 125);
243
+ }
244
+
245
+ .md-content {
246
+ max-width: calc(100% - 16rem * 2);
247
+ margin-left: 16rem;
248
+ margin-bottom: 50px;
249
+ }
250
+
251
+ .md-content > .md-sidebar {
252
+ left: 16rem;
253
+ }
254
+
255
+ .md-footer {
256
+ position: fixed;
257
+ bottom: 0px;
258
+ pointer-events: none;
259
+ }
260
+
261
+ .md-footer-nav__link, .md-footer__link {
262
+ pointer-events: all;
263
+ }
264
+
265
+ .md-footer__title {
266
+ background-color: unset;
267
+ }
268
+ .md-footer-nav__link, .md-footer__link {
269
+ width: 16rem;
270
+ }
271
+
272
+ .md-dialog {
273
+ background-color: unset;
274
+ }
275
+
276
+ @media screen and (min-width: 76.25em) {
277
+ .md-sidebar {
278
+ height: auto;
279
+ }
280
+ }
281
+
282
+ @media screen and (max-width: 76.1875em) {
283
+ .md-nav {
284
+ transition: none !important;
285
+ background-color: var(--md-default-bg-color)
286
+ }
287
+ .md-nav--primary .md-nav__title {
288
+ cursor: auto;
289
+ color: var(--md-default-fg-color);
290
+ font-weight: 700;
291
+ white-space: normal;
292
+ line-height: 1rem;
293
+ height: auto;
294
+ display: flex;
295
+ flex-flow: column;
296
+ row-gap: 1.6rem;
297
+ padding: 1.2rem .8rem .8rem;
298
+ background-color: var(--md-default-bg-color);
299
+ }
300
+ .md-nav--primary .md-nav__title~.md-nav__list {
301
+ box-shadow: none;
302
+ }
303
+ .md-nav--primary .md-nav__title ~ .md-nav__list > :first-child {
304
+ border-top: none;
305
+ }
306
+ .md-nav--primary .md-nav__title .md-nav__button {
307
+ display: none;
308
+ }
309
+ .md-nav--primary .md-nav__title .md-nav__icon {
310
+ color: var(--md-default-fg-color);
311
+ position: static;
312
+ height: auto;
313
+ margin: 0 0 0 -0.2rem;
314
+ }
315
+ .md-nav--primary > .md-nav__title [for="none"] {
316
+ padding-top: 0;
317
+ }
318
+ .md-nav--primary .md-nav__item {
319
+ border-top: none;
320
+ }
321
+ .md-nav--primary :is(.md-nav__title,.md-nav__item) {
322
+ font-size : var(--md-typeset-font-size);
323
+ }
324
+ .md-nav .md-source {
325
+ display: none;
326
+ }
327
+
328
+ .md-sidebar {
329
+ height: 100%;
330
+ }
331
+ .md-sidebar--primary {
332
+ width: 16rem !important;
333
+ z-index: 200;
334
+ left: ${L.isPinned?`calc(-16rem + ${hn})`:"calc(-16rem + 72px)"} !important;
335
+ }
336
+ .md-sidebar--secondary:not([hidden]) {
337
+ display: none;
338
+ }
339
+
340
+ [data-md-toggle=drawer]:checked~.md-container .md-sidebar--primary {
341
+ transform: translateX(16rem);
342
+ }
343
+
344
+ .md-content {
345
+ max-width: 100%;
346
+ margin-left: 0;
347
+ }
348
+
349
+ .md-header__button {
350
+ margin: 0.4rem 0;
351
+ margin-left: 0.4rem;
352
+ padding: 0;
353
+ }
354
+
355
+ .md-overlay {
356
+ left: 0;
357
+ }
358
+
359
+ .md-footer {
360
+ position: static;
361
+ padding-left: 0;
362
+ }
363
+ .md-footer-nav__link {
364
+ /* footer links begin to overlap at small sizes without setting width */
365
+ width: 50%;
366
+ }
367
+ }
368
+
369
+ @media screen and (max-width: 600px) {
370
+ .md-sidebar--primary {
371
+ left: -16rem !important;
372
+ width: 16rem;
373
+ }
374
+ }
375
+
376
+
377
+ @media print {
378
+ .md-sidebar,
379
+ #toggle-sidebar {
380
+ display: none;
381
+ }
382
+
383
+ .md-content {
384
+ margin: 0;
385
+ width: 100%;
386
+ max-width: 100%;
387
+ }
388
+ }
389
+ `,Ft=["h1","h2","h3","h4","h5","h6"],$e=/(em)|(rem)/gi,Ln=/var\(|\)/gi,pn=({theme:m})=>`
390
+ /*================== Typeset ==================*/
391
+
392
+ .md-typeset {
393
+ font-size: var(--md-typeset-font-size);
394
+ }
395
+
396
+ ${Ft.reduce((L,j)=>{const N=m.typography.htmlFontSize??16,W=m.typography[j],{lineHeight:q,fontFamily:rt,fontWeight:Pt,fontSize:It}=W,Ut=Lt=>{if(typeof Lt=="number")return Ut(`${Lt/N*.6}rem`);if(typeof Lt=="string"){if(Lt.match(Ln)){const $t=window.getComputedStyle(document.body).getPropertyValue(Lt.replaceAll(Ln,""));if($t!=="")return Ut($t)}else if(Lt.match($e))return`calc(${Lt.replace($e,"")} * var(--md-typeset-font-size))`}return Lt};return L.concat(`
397
+ .md-typeset ${j} {
398
+ color: var(--md-default-fg-color);
399
+ line-height: ${q};
400
+ font-family: ${rt};
401
+ font-weight: ${Pt};
402
+ font-size: ${Ut(It)};
403
+ }
404
+ `)},"")}
405
+
406
+ .md-typeset .md-content__button {
407
+ color: var(--md-default-fg-color);
408
+ }
409
+
410
+ .md-typeset hr {
411
+ border-bottom: 0.05rem dotted ${m.palette.divider};
412
+ }
413
+
414
+ .md-typeset details {
415
+ font-size: var(--md-typeset-font-size) !important;
416
+ }
417
+ .md-typeset details summary {
418
+ padding-left: 2.5rem !important;
419
+ }
420
+ .md-typeset details summary:before,
421
+ .md-typeset details summary:after {
422
+ top: 50% !important;
423
+ width: 20px !important;
424
+ height: 20px !important;
425
+ transform: rotate(0deg) translateY(-50%) !important;
426
+ }
427
+ .md-typeset details[open] > summary:after {
428
+ transform: rotate(90deg) translateX(-50%) !important;
429
+ }
430
+
431
+ .md-typeset blockquote {
432
+ color: var(--md-default-fg-color--light);
433
+ border-left: 0.2rem solid var(--md-default-fg-color--light);
434
+ }
435
+
436
+ .md-typeset table:not([class]) {
437
+ font-size: var(--md-typeset-font-size);
438
+ border: 1px solid var(--md-default-fg-color);
439
+ border-bottom: none;
440
+ border-collapse: collapse;
441
+ border-radius: ${m.shape.borderRadius}px;
442
+ }
443
+ .md-typeset table:not([class]) th {
444
+ font-weight: bold;
445
+ }
446
+ .md-typeset table:not([class]) td, .md-typeset table:not([class]) th {
447
+ border-bottom: 1px solid var(--md-default-fg-color);
448
+ }
449
+
450
+ .md-typeset pre > code::-webkit-scrollbar-thumb {
451
+ background-color: hsla(0, 0%, 0%, 0.32);
452
+ }
453
+ .md-typeset pre > code::-webkit-scrollbar-thumb:hover {
454
+ background-color: hsla(0, 0%, 0%, 0.87);
455
+ }
456
+
457
+ .md-typeset code {
458
+ word-break: keep-all;
459
+ }
460
+ `,as=()=>`
461
+ /*================== Animations ==================*/
462
+ /*
463
+ Disable CSS animations on link colors as they lead to issues in dark mode.
464
+ The dark mode color theme is applied later and theirfore there is always an animation from light to dark mode when navigation between pages.
465
+ */
466
+ .md-dialog, .md-nav__link, .md-footer__link, .md-typeset a, .md-typeset a::before, .md-typeset .headerlink {
467
+ transition: none;
468
+ }
469
+ `,is=({theme:m})=>`
470
+ /*================== Extensions ==================*/
471
+
472
+ /* HIGHLIGHT */
473
+ .highlight .md-clipboard:after {
474
+ content: unset;
475
+ }
476
+
477
+ .highlight .nx {
478
+ color: ${m.palette.type==="dark"?"#ff53a3":"#ec407a"};
479
+ }
480
+
481
+ /* CODE HILITE */
482
+ .codehilite .gd {
483
+ background-color: ${m.palette.type==="dark"?"rgba(248,81,73,0.65)":"#fdd"};
484
+ }
485
+
486
+ .codehilite .gi {
487
+ background-color: ${m.palette.type==="dark"?"rgba(46,160,67,0.65)":"#dfd"};
488
+ }
489
+
490
+ /* TABBED */
491
+ .tabbed-set>input:nth-child(1):checked~.tabbed-labels>:nth-child(1),
492
+ .tabbed-set>input:nth-child(2):checked~.tabbed-labels>:nth-child(2),
493
+ .tabbed-set>input:nth-child(3):checked~.tabbed-labels>:nth-child(3),
494
+ .tabbed-set>input:nth-child(4):checked~.tabbed-labels>:nth-child(4),
495
+ .tabbed-set>input:nth-child(5):checked~.tabbed-labels>:nth-child(5),
496
+ .tabbed-set>input:nth-child(6):checked~.tabbed-labels>:nth-child(6),
497
+ .tabbed-set>input:nth-child(7):checked~.tabbed-labels>:nth-child(7),
498
+ .tabbed-set>input:nth-child(8):checked~.tabbed-labels>:nth-child(8),
499
+ .tabbed-set>input:nth-child(9):checked~.tabbed-labels>:nth-child(9),
500
+ .tabbed-set>input:nth-child(10):checked~.tabbed-labels>:nth-child(10),
501
+ .tabbed-set>input:nth-child(11):checked~.tabbed-labels>:nth-child(11),
502
+ .tabbed-set>input:nth-child(12):checked~.tabbed-labels>:nth-child(12),
503
+ .tabbed-set>input:nth-child(13):checked~.tabbed-labels>:nth-child(13),
504
+ .tabbed-set>input:nth-child(14):checked~.tabbed-labels>:nth-child(14),
505
+ .tabbed-set>input:nth-child(15):checked~.tabbed-labels>:nth-child(15),
506
+ .tabbed-set>input:nth-child(16):checked~.tabbed-labels>:nth-child(16),
507
+ .tabbed-set>input:nth-child(17):checked~.tabbed-labels>:nth-child(17),
508
+ .tabbed-set>input:nth-child(18):checked~.tabbed-labels>:nth-child(18),
509
+ .tabbed-set>input:nth-child(19):checked~.tabbed-labels>:nth-child(19),
510
+ .tabbed-set>input:nth-child(20):checked~.tabbed-labels>:nth-child(20) {
511
+ color: var(--md-accent-fg-color);
512
+ border-color: var(--md-accent-fg-color);
513
+ }
514
+
515
+ /* TASK-LIST */
516
+ .task-list-control .task-list-indicator::before {
517
+ background-color: ${m.palette.action.disabledBackground};
518
+ }
519
+ .task-list-control [type="checkbox"]:checked + .task-list-indicator:before {
520
+ background-color: ${m.palette.success.main};
521
+ }
522
+
523
+ /* ADMONITION */
524
+ .admonition {
525
+ font-size: var(--md-typeset-font-size) !important;
526
+ }
527
+ .admonition .admonition-title {
528
+ padding-left: 2.5rem !important;
529
+ }
530
+
531
+ .admonition .admonition-title:before {
532
+ top: 50% !important;
533
+ width: 20px !important;
534
+ height: 20px !important;
535
+ transform: translateY(-50%) !important;
536
+ }
537
+ `,cs={dark:["#only-light","#gh-light-mode-only"],light:["#only-dark","#gh-dark-mode-only"]},ls=[ye,nn,ue,pn,as,is,({theme:m})=>`
538
+ /*================== Palette ==================*/
539
+ /*
540
+ When color palette toggle is enabled in material theme for Mkdocs, there is a possibility to show conditionally
541
+ images by adding #only-dark or #only-light to resource hash. Backstage doesn't use mkdocs color palette mechanism,
542
+ so there is a need to add css rules from palette*.css manually.
543
+ */
544
+
545
+ ${cs[m.palette.type].map(L=>`img[src$="${L}"]`).join(", ")} {
546
+ display: none;
547
+ }
548
+ `],Cn=()=>(0,te.Ut)(),ds=()=>{const m=Cn(),L=(0,Le.A)();return(0,a.useMemo)(()=>{const j={theme:L,sidebar:m};return ls.reduce((N,W)=>N+W(j),"")},[L,m])},Mn=()=>{const m=ds();return(0,a.useCallback)(L=>(L.getElementsByTagName("head")[0].insertAdjacentHTML("beforeend",`<style>${m}</style>`),L),[m])},Bn=async(m,L)=>{let j;if(typeof m=="string")j=new DOMParser().parseFromString(m,"text/html").documentElement;else if(m instanceof Element)j=m;else throw new Error("dom is not a recognized type");for(const N of L)j=await N(j);return j},jn=(m,L,j)=>{const N=new URL(L,"https://ignored.com").pathname,W=m==="src"&&N.endsWith(".svg"),q=!L.match(/^([a-z]*:)?\/\//i),rt=L.startsWith(j);return W&&(q||rt)},us=({techdocsStorageApi:m,entityId:L,path:j})=>async N=>{const W=await m.getApiOrigin(),q=async(rt,Pt)=>{for(const It of rt)if(It.hasAttribute(Pt)){const Ut=It.getAttribute(Pt);if(!Ut)return;const Lt=await m.getBaseUrl(Ut,L,j);if(jn(Pt,Ut,W))try{const qt=await(await fetch(Lt,{credentials:"include"})).text();It.setAttribute(Pt,`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(qt)))}`)}catch{It.setAttribute("alt",`Error: ${Ut}`)}else It.setAttribute(Pt,Lt)}};return await Promise.all([q(N.querySelectorAll("img"),"src"),q(N.querySelectorAll("script"),"src"),q(N.querySelectorAll("source"),"src"),q(N.querySelectorAll("link"),"href"),q(N.querySelectorAll("a[download]"),"href")]),N},hs=()=>m=>(((j,N)=>{Array.from(j).filter(W=>W.hasAttribute(N)).forEach(W=>{const q=W.getAttribute(N);if(q){q.match(/^https?:\/\//i)&&W.setAttribute("target","_blank");try{const rt=Un(window.location.href);W.setAttribute(N,new URL(q,rt).toString())}catch{W.replaceWith(W.textContent||q)}}})})(Array.from(m.getElementsByTagName("a")),"href"),m);function Un(m){const L=new URL(m);return!L.pathname.endsWith("/")&&!L.pathname.endsWith(".html")&&(L.pathname+="/"),L.toString()}var ps=t(27326);let $n;$n=Promise.resolve().then(t.t.bind(t,25873,19));function gn(m,L){$n.then(j=>{"createRoot"in j?j.createRoot(L).render(m):j.render(m,L)})}const gs=()=>m=>{const L=m.querySelector('.md-header label[for="__drawer"]'),j=m.querySelector("article");if(!L||!j)return m;const N=L.cloneNode();return gn((0,a.createElement)(ps.A),N),N.id="toggle-sidebar",N.title="Toggle Sidebar",N.classList.add("md-content__button"),N.style.setProperty("padding","0 0 0 5px"),N.style.setProperty("margin","0.4rem 0 0.4rem 0.4rem"),j?.prepend(N),m},Fn=()=>m=>(m.querySelector(".md-header")?.remove(),m),fs=()=>m=>(m.querySelector(".md-footer .md-copyright")?.remove(),m.querySelector(".md-footer-copyright")?.remove(),m);var ms=t(36021),Nn=t(90292),kn=t(52536),ys=t.n(kn);const bn=m=>L=>{const j=L.querySelector('[title="Edit this page"]');if(!j||!j.href)return L;const N=new URL(j.href),W=m.byUrl(N);if(W?.type!=="github"&&W?.type!=="gitlab")return L;const q=L.querySelector("article>h1")?.childNodes[0].textContent||"",rt=encodeURIComponent(`Documentation Feedback: ${q}`),Pt=encodeURIComponent(`Page source:
549
+ ${j.href}
550
+
551
+ Feedback:`),It=W?.type==="github"?(0,ms.F)(N.href,"blob"):N.href,Ut=ys()(It),Lt=`/${Ut.organization}/${Ut.name}`,$t=j.cloneNode();switch(W?.type){case"gitlab":$t.href=`${N.origin}${Lt}/issues/new?issue[title]=${rt}&issue[description]=${Pt}`;break;case"github":$t.href=`${N.origin}${Lt}/issues/new?title=${rt}&body=${Pt}`;break;default:return L}return gn((0,a.createElement)(Nn.A),$t),$t.style.paddingLeft="5px",$t.title="Leave feedback for this page",$t.id="git-feedback-link",j?.insertAdjacentElement("beforebegin",$t),L};var Sn=t(38097);const vs=(0,p.A)(m=>({button:{color:m.palette.primary.light,textDecoration:"underline"}})),Wn=({message:m,handleButtonClick:L,autoHideDuration:j})=>{const N=vs(),[W,q]=(0,a.useState)(!0),rt=()=>q(!1);return(0,s.jsx)(Sn.A,{open:W,anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:j,color:"primary",onClose:rt,message:m,action:(0,s.jsx)(Et.A,{classes:{root:N.button},size:"small",onClick:()=>{rt(),L()},children:"Redirect now"})})},Kn=(m,L)=>{const N=W=>{const q=Un(window.location.href),rt=new URL(W,q);if(rt.hostname!==window.location.hostname){const It=window.location.pathname,Ut=It.indexOf(L),Lt=It.slice(0,Ut+L.length);return new URL(Lt,q).href}return rt.href};return W=>{for(const q of Array.from(W.querySelectorAll("meta")))if(q.getAttribute("http-equiv")==="refresh"){const rt=q.getAttribute("content")?.split("url=");if(!rt||rt.length<2)return W;const Pt=rt[1],It=N(Pt);if(window.location.href===It)return W;const Ut=document.createElement("div");return gn((0,s.jsx)(Wn,{message:"This TechDocs page is no longer maintained. Will automatically redirect to the designated replacement.",handleButtonClick:()=>m(It),autoHideDuration:3e3}),Ut),document.body.appendChild(Ut),setTimeout(()=>{m(It)},3e3),W}return W}},Es=()=>m=>(setTimeout(()=>{const L=m?.querySelectorAll("li.md-nav__item--active");L.length!==0&&(L.forEach(N=>{const W=N?.querySelector("input");W?.checked||W?.click()}),L[L.length-1].scrollIntoView())},200),m);var As=t(50868),xs=t(10437),Cs=t(71677),bs=t(87051),Ss=t(36338);const Os=(0,bs.A)(m=>({tooltip:{fontSize:"inherit",color:m.palette.text.primary,margin:0,padding:m.spacing(.5),backgroundColor:"transparent",boxShadow:"none"}}))(Cs.Ay),Ps=()=>(0,s.jsx)(xs.A,{children:(0,s.jsx)("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"})}),Ts=({text:m})=>{const[L,j]=(0,a.useState)(!1),[,N]=(0,Ss.A)(),W=(0,a.useCallback)(()=>{N(m),j(!0)},[m,N]),q=(0,a.useCallback)(()=>{j(!1)},[j]);return(0,s.jsx)(Os,{title:"Copied to clipboard",placement:"left",open:L,onClose:q,leaveDelay:1e3,children:(0,s.jsx)(gt.A,{style:{position:"absolute"},className:"md-clipboard md-icon",onClick:W,"aria-label":"Copy to clipboard",children:(0,s.jsx)(Ps,{})})})},ws=m=>L=>{const j=L.querySelectorAll("pre > code");for(const N of j){const W=N.textContent||"",q=document.createElement("div");N?.parentElement?.prepend(q),gn((0,s.jsx)(As.A,{theme:m,children:(0,s.jsx)(Ts,{text:W})}),q)}return L},Rs=({baseUrl:m,onClick:L})=>j=>(Array.from(j.getElementsByTagName("a")).forEach(N=>{N.addEventListener("click",W=>{const rt=N.getAttribute("href");rt&&rt.startsWith(m)&&!N.hasAttribute("download")&&(W.preventDefault(),L(W,rt))})}),j),zn=({onLoading:m,onLoaded:L})=>j=>(m(),j.addEventListener(d,function N(){L(),j.removeEventListener(d,N)}),j);function Hn(m,L){const j=new URL(L),N=`${j.origin}${j.pathname.replace(/\/$/,"")}`,W=m.replace(N,"").replace(/^\/+/,""),q=new URL(`http://localhost/${W}`);return`${q.pathname}${q.search}${q.hash}`}function Vn(){const m=(0,a.useRef)((0,Qt.Zp)()),j=(0,lt.gf)(J.U).getOptionalString("app.baseUrl");return(0,a.useCallback)(W=>{let q=W;if(j)try{q=Hn(W,j)}catch{}m.current(q)},[j])}const Is="screen and (max-width: 76.1875em)",Ds=m=>{const L=Vn(),j=(0,Le.A)(),N=(0,Ue.A)(Is),W=pe(),q=Mn(),rt=(0,G.s)(),Pt=(0,lt.gf)(tn.s),It=(0,lt.gf)(an.Y),Ut=(0,lt.gf)(J.U),{state:Lt,path:$t,content:qt}=ze(),{"*":ge=""}=(0,Qt.g)(),[Gt,_t]=(0,a.useState)(null),Ee=h(Gt),ft=(0,a.useCallback)(()=>{if(!Gt)return;Gt.querySelectorAll(".md-sidebar").forEach(se=>{if(N)se.style.top="0px";else{const Ve=document?.querySelector(".techdocs-reader-page")?.getBoundingClientRect().top??0;let Se=Gt.getBoundingClientRect().top??0;const Ge=Gt.querySelector(".md-container > .md-tabs")?.getBoundingClientRect().height??0;Se<Ve&&(Se=Ve);const sn=Math.max(Se,0)+Ge;se.style.top=`${sn}px`;const On=Gt.querySelector(".md-container > .md-footer")?.getBoundingClientRect().top??window.innerHeight;se.style.height=`${On-sn}px`}se.style.setProperty("opacity","1")})},[Gt,N]);(0,a.useEffect)(()=>(window.addEventListener("resize",ft),window.addEventListener("scroll",ft,!0),()=>{window.removeEventListener("resize",ft),window.removeEventListener("scroll",ft,!0)}),[Gt,ft]);const Zt=(0,a.useCallback)(()=>{if(!Gt)return;const ne=Gt.querySelector(".md-footer");ne&&(ne.style.width=`${Gt.getBoundingClientRect().width}px`)},[Gt]);(0,a.useEffect)(()=>(window.addEventListener("resize",Zt),()=>{window.removeEventListener("resize",Zt)}),[Gt,Zt]),(0,a.useEffect)(()=>{Ee||(Zt(),ft())},[Lt,Ee,Zt,ft]);const Jt=(0,a.useCallback)((ne,se)=>Bn(ne,[W,us({techdocsStorageApi:Pt,entityId:m,path:se}),hs(),gs(),Fn(),fs(),bn(It),q]),[m,It,Pt,W,q]),fe=(0,a.useCallback)(async ne=>Bn(ne,[Kn(L,m.name),Es(),ws(j),Rs({baseUrl:Ut.getOptionalString("app.baseUrl")||window.location.origin,onClick:(se,ce)=>{const Ve=se.ctrlKey||se.metaKey,Se=new URL(ce),fn=se.target?.innerText||ce,Ge=ce.replace(window.location.origin,"");rt.captureEvent("click",fn,{attributes:{to:Ge}}),Se.hash?Ve?window.open(ce,"_blank"):(window.location.pathname!==Se.pathname?L(ce):window.history.pushState(null,document.title,Se.hash),ne?.querySelector(`[id="${Se.hash.slice(1)}"]`)?.scrollIntoView(),ne?.querySelector(`[id="${Se.hash.slice(1)}"]`)?.querySelector("a, button, [tabindex]")?.focus()):Ve?window.open(ce,"_blank"):L(ce)}}),zn({onLoading:()=>{},onLoaded:()=>{ne.querySelector(".md-nav__title")?.removeAttribute("for")}}),zn({onLoading:()=>{Array.from(ne.querySelectorAll(".md-sidebar")).forEach(ce=>{ce.style.setProperty("opacity","0")})},onLoaded:()=>{}})]),[j,L,rt,m.name,Ut]);return(0,a.useEffect)(()=>{if(!qt)return()=>{};let ne=!0;return Jt(qt,$t).then(async se=>{if(!se?.innerHTML||!ne||ge!==$t)return;window.scroll({top:0});const ce=await fe(se);_t(ce)}),()=>{ne=!1}},[qt,ge,$t,Jt,fe]),Gt};var we=t(41883),Fe=t(72020),Re=t(99730);const Ls=()=>{const m=(0,Fe.YR)(),{shadowRoot:L}=(0,b.V)(),j=L?.querySelector('[data-md-component="content"]'),N=L?.querySelector('div[data-md-component="sidebar"][data-md-type="navigation"], div[data-md-component="navigation"]');let W=N?.querySelector('[data-techdocs-addons-location="primary sidebar"]');W||(W=document.createElement("div"),W.setAttribute("data-techdocs-addons-location","primary sidebar"),N?.prepend(W));const q=L?.querySelector('div[data-md-component="sidebar"][data-md-type="toc"], div[data-md-component="toc"]');let rt=q?.querySelector('[data-techdocs-addons-location="secondary sidebar"]');return rt||(rt=document.createElement("div"),rt.setAttribute("data-techdocs-addons-location","secondary sidebar"),q?.prepend(rt)),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(we.A,{container:W,children:m.renderComponentsByLocation(Re.e.PrimarySidebar)}),(0,s.jsx)(we.A,{container:j,children:m.renderComponentsByLocation(Re.e.Content)}),(0,s.jsx)(we.A,{container:rt,children:m.renderComponentsByLocation(Re.e.SecondarySidebar)})]})},Gn=(0,p.A)({search:{width:"100%","@media (min-width: 76.1875em)":{width:"calc(100% - 34.4rem)",margin:"0 auto"},"@media print":{display:"none"}}}),Yn=Qe(m=>{const{withSearch:L=!0,searchResultUrlMapper:j,onReady:N}=m,W=Gn(),{entityMetadata:{value:q,loading:rt},entityRef:Pt,setShadowRoot:It}=(0,b.V)(),{state:Ut}=ze(),Lt=Ds(Pt),$t=window.location.pathname,qt=window.location.hash,ge=h(Lt),[Gt]=B([`[id="${qt.slice(1)}"]`]),_t=(0,at.n)(),{NotFoundErrorPage:Ee}=_t.getComponents();(0,a.useEffect)(()=>{ge||(qt?Gt&&Gt.scrollIntoView():document?.querySelector("header")?.scrollIntoView())},[$t,qt,Gt,ge]);const ft=(0,a.useCallback)(Zt=>{It(Zt),N instanceof Function&&N()},[It,N]);return rt===!1&&!q?(0,s.jsx)(Ee,{}):Lt?(0,s.jsx)(D.U,{children:(0,s.jsxs)(x.A,{container:!0,children:[(0,s.jsx)(x.A,{xs:12,item:!0,children:(0,s.jsx)(je,{})}),L&&(0,s.jsx)(x.A,{className:W.search,xs:"auto",item:!0,children:(0,s.jsx)(he,{entityId:Pt,entityTitle:q?.metadata?.title,searchResultUrlMapper:j})}),(0,s.jsxs)(x.A,{xs:12,item:!0,children:[(Ut==="CHECKING"||ge)&&(0,s.jsx)($.k,{}),(0,s.jsx)(C,{element:Lt,onAppend:ft,children:(0,s.jsx)(Ls,{})})]})]})}):(0,s.jsx)(D.U,{children:(0,s.jsx)(x.A,{container:!0,children:(0,s.jsx)(x.A,{xs:12,item:!0,children:(0,s.jsx)(je,{})})})})}),Vs=null},45061:(H,S,t)=>{"use strict";t.d(S,{T:()=>At});var s=t(31085),a=t(14041),x=t(93285),p=t(42899),b=t(4387),g=t(13660),u=t(72020),f=t(86892),d=t(99730),v=t(82292),h=t(67871),C=t(8859),O=t(34428),P=t(51372),B=t(6820),M=t(58837),I=t(268),D=t(72501),$=t(72072);const k=(0,M.A)(Ot=>({root:{textAlign:"left"},label:{color:Ot.page.fontColor,fontWeight:Ot.typography.fontWeightBold,letterSpacing:0,fontSize:Ot.typography.fontSize,marginBottom:Ot.spacing(1)/2,lineHeight:1},value:{color:(0,I.X4)(Ot.page.fontColor,.8),fontSize:Ot.typography.fontSize,lineHeight:1}}),{name:"BackstageHeaderLabel"}),X=({value:Ot,className:Rt,typographyRootComponent:dt})=>(0,s.jsx)(D.A,{component:dt??(typeof Ot=="string"?"p":"span"),className:Rt,children:Ot});function z(Ot){const{label:Rt,value:dt,url:ct,contentTypograpyRootComponent:xt}=Ot,pt=k(),bt=(0,s.jsx)(X,{className:pt.value,value:dt||"<Unknown>",typographyRootComponent:xt});return(0,s.jsx)(p.A,{item:!0,children:(0,s.jsxs)(D.A,{component:"span",className:pt.root,children:[(0,s.jsx)(D.A,{className:pt.label,children:Rt}),ct?(0,s.jsx)($.N_,{to:ct,children:bt}):bt]})})}var Y=t(69814),K=t(72427),lt=t(65461),G=t(9222),Q=t(56005),J=t.n(Q),it=t(82779),ht=t(18690);const yt=(0,s.jsx)(b.A,{animation:"wave",variant:"text",height:40}),At=Ot=>{const{children:Rt}=Ot,dt=(0,u.YR)(),ct=(0,K.gf)(lt.U),xt=(0,K.gf)(v.n),{"*":pt=""}=(0,ht.g)(),{title:bt,setTitle:wt,subtitle:at,setSubtitle:gt,entityRef:vt,metadata:{value:et,loading:Et},entityMetadata:{value:ot,loading:U}}=(0,f.V)();(0,a.useEffect)(()=>{et&&(wt(et.site_name),gt(()=>{let{site_description:de}=et;return(!de||de==="None")&&(de=""),de}))},[et,wt,gt]);const V=ct.getOptional("app.title")||"Backstage",{locationMetadata:nt,spec:Ct}=ot||{},ut=Ct?.lifecycle,Bt=ot?(0,h.t)(ot,P.vv):[],Nt=(0,G.S)(it.rQ)(),Kt=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(z,{label:J()(ot?.kind||"entity"),value:(0,s.jsx)(C.z,{color:"inherit",entityRef:vt,title:ot?.metadata.title,defaultKind:"Component"})}),Bt.length>0&&(0,s.jsx)(z,{label:"Owner",value:(0,s.jsx)(O.i,{color:"inherit",entityRefs:Bt,defaultKind:"group"})}),ut?(0,s.jsx)(z,{label:"Lifecycle",value:String(ut)}):null,nt&&nt.type!=="dir"&&nt.type!=="file"?(0,s.jsx)(z,{label:"",value:(0,s.jsxs)(p.A,{container:!0,direction:"column",alignItems:"center",children:[(0,s.jsx)(p.A,{style:{padding:0},item:!0,children:(0,s.jsx)(g.A,{style:{marginTop:"-25px"}})}),(0,s.jsx)(p.A,{style:{padding:0},item:!0,children:"Source"})]}),url:nt.target}):null]});if(!U&&ot===void 0||!Et&&et===void 0)return null;const Qt=(0,B.U2)(vt),jt=xt.forEntity(Qt).snapshot.primaryTitle,Ht=de=>de.replace(/\/$/,""),le=de=>de.replace(/-/g," ").split(" ").map(J()).join(" ");let he=[];pt!==""&&(he=Ht(pt).split("/").slice(0,3).map(le));const oe=[V,jt,...he].join(" | ");return(0,s.jsxs)(Y.Y,{type:"Documentation",typeLink:Nt,title:bt||yt,subtitle:at===""?void 0:at||yt,children:[(0,s.jsx)(x.A,{titleTemplate:"%s",children:(0,s.jsx)("title",{children:oe})}),Kt,Rt,dt.renderComponentsByLocation(d.e.Header)]})}},82779:(H,S,t)=>{"use strict";t.d(S,{Oc:()=>x,Ri:()=>p,rQ:()=>a});var s=t(34569);const a=(0,s.H)({id:"techdocs:index-page"}),x=(0,s.H)({id:"techdocs:reader-page",params:["namespace","kind","name"]}),p=(0,s.H)({id:"techdocs:catalog-reader-view"})},27698:(H,S,t)=>{"use strict";t.r(S),t.d(S,{TechDocsSearchResultListItem:()=>d});var s=t(31085),a=t(68804),x=t(5951),p=t(58837),b=t(72501),g=t(72072),u=t(70734);const f=(0,p.A)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",marginBottom:"1rem"}}),d=v=>{const{result:h,highlight:C,lineClamp:O=5,asListItem:P=!0,asLink:B=!0,title:M,icon:I}=v,D=f(),$=({children:z})=>B?(0,s.jsx)(g.N_,{noTrack:!0,to:h.location,children:z}):(0,s.jsx)(s.Fragment,{children:z}),k=()=>{const z=C?.fields.title?(0,s.jsx)(u.e,{text:C.fields.title,preTag:C.preTag,postTag:C.postTag}):h.title,Y=C?.fields.entityTitle?(0,s.jsx)(u.e,{text:C.fields.entityTitle,preTag:C.preTag,postTag:C.postTag}):h.entityTitle,K=C?.fields.name?(0,s.jsx)(u.e,{text:C.fields.name,preTag:C.preTag,postTag:C.postTag}):h.name;return h?(0,s.jsx)(x.A,{className:D.itemText,primaryTypographyProps:{variant:"h6"},primary:(0,s.jsx)($,{children:M||(0,s.jsxs)(s.Fragment,{children:[z," | ",Y??K," docs"]})}),secondary:(0,s.jsx)(b.A,{component:"span",style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:O,overflow:"hidden"},color:"textSecondary",variant:"body2",children:C?.fields.text?(0,s.jsx)(u.e,{text:C.fields.text,preTag:C.preTag,postTag:C.postTag}):h.text})}):null},X=({children:z})=>P?(0,s.jsxs)(s.Fragment,{children:[I&&(0,s.jsx)(a.A,{children:typeof I=="function"?I(h):I}),(0,s.jsx)("div",{className:D.flexContainer,children:z})]}):(0,s.jsx)(s.Fragment,{children:z});return(0,s.jsx)(X,{children:(0,s.jsx)(k,{})})}},97184:(H,S,t)=>{const a=document.querySelector('meta[name="backstage-public-path"]')?.getAttribute("content");a&&(t.p=a)},86973:()=>{}},H=>{var S=s=>H(H.s=s);H.O(0,[1751,1888,5067,1678,235,6587,5042,7400,1975,4538,4121],()=>(S(97184),S(71543)));var t=H.O()}]);})();
552
+
553
+ //# sourceMappingURL=main.3832940c.js.map