@techdocs/cli 1.8.2-next.0 → 1.8.2-next.1

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.
@@ -1,491 +0,0 @@
1
- (()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[179],{88797:function(G,w,t){"use strict";t.d(w,{n:function(){return o}});const o=Symbol.for("CATALOG_FILTER_EXISTS_0e15b590c0b343a2bae3e787e84c2111")},34106:function(G,w,t){"use strict";t.d(w,{Tf:function(){return d},l2:function(){return i},zG:function(){return o}});const o="default",i="backstage.io/view-url",d="backstage.io/edit-url",S="kubernetes.io/api-server",v="kubernetes.io/api-server-certificate-authority",g="kubernetes.io/auth-provider"},74314:function(G,w,t){"use strict";t.d(w,{eE:function(){return v},iB:function(){return d},of:function(){return S}});var o=t(34106);function i(g){let c=g.indexOf(":");const u=g.indexOf("/");u!==-1&&u<c&&(c=-1);const y=c===-1?void 0:g.slice(0,c),x=u===-1?void 0:g.slice(c+1,u),O=g.slice(Math.max(c+1,u+1));if(y===""||x===""||O==="")throw new TypeError(`Entity reference "${g}" was not on the form [<kind>:][<namespace>/]<name>`);return{kind:y,namespace:x,name:O}}function d(g){return{kind:g.kind,namespace:g.metadata.namespace||o.zG,name:g.metadata.name}}function S(g,c){if(!g)throw new Error("Entity reference must not be empty");const u=c==null?void 0:c.defaultKind,y=(c==null?void 0:c.defaultNamespace)||o.zG;let x,O,m;if(typeof g=="string"){const P=i(g);var A;x=(A=P.kind)!==null&&A!==void 0?A:u;var h;O=(h=P.namespace)!==null&&h!==void 0?h:y,m=P.name}else{var M;x=(M=g.kind)!==null&&M!==void 0?M:u;var R;O=(R=g.namespace)!==null&&R!==void 0?R:y,m=g.name}if(x)if(O){if(!m){const P=JSON.stringify(g);throw new Error(`Entity reference ${P} had missing or empty name`)}}else{const P=JSON.stringify(g);throw new Error(`Entity reference ${P} had missing or empty namespace`)}else{const P=JSON.stringify(g);throw new Error(`Entity reference ${P} had missing or empty kind (e.g. did not start with "component:" or similar)`)}return{kind:x,namespace:O,name:m}}function v(g){let c,u,y;if("metadata"in g){c=g.kind;var x;u=(x=g.metadata.namespace)!==null&&x!==void 0?x:o.zG,y=g.metadata.name}else{c=g.kind;var O;u=(O=g.namespace)!==null&&O!==void 0?O:o.zG,y=g.name}return`${c.toLocaleLowerCase("en-US")}:${u.toLocaleLowerCase("en-US")}/${y.toLocaleLowerCase("en-US")}`}},8709:function(G,w,t){"use strict";t.d(w,{S4:function(){return o},aS:function(){return h},cz:function(){return A},nP:function(){return c},w$:function(){return u}});const o="ownedBy",i="ownerOf",d="consumesApi",S="apiConsumedBy",v="providesApi",g="apiProvidedBy",c="dependsOn",u="dependencyOf",y="parentOf",x="childOf",O="memberOf",m="hasMember",A="partOf",h="hasPart"},90663:function(G,w,t){"use strict";t.d(w,{M6:function(){return d},P1:function(){return o}});const o="backstage.io/managed-by-location",i="backstage.io/managed-by-origin-location",d="backstage.io/source-location"},51547:function(G,w,t){"use strict";t.d(w,{CV:function(){return g},NZ:function(){return v},Ou:function(){return S}});var o=t(74314),i=t(90663);const d=/^[\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 S(c){if(typeof c!="string")throw new TypeError(`Unable to parse location ref '${c}', unexpected argument ${typeof c}`);const u=c.indexOf(":");if(u<0)throw new TypeError(`Unable to parse location ref '${c}', expected '<type>:<target>', e.g. 'url:https://host/path'`);const y=c.substring(0,u).trim(),x=c.substring(u+1).trim();if(!y||!x)throw new TypeError(`Unable to parse location ref '${c}', expected '<type>:<target>', e.g. 'url:https://host/path'`);if(y==="http"||y==="https")throw new TypeError(`Invalid location ref '${c}', please prefix it with 'url:', e.g. 'url:${c}'`);if(d.test(x))throw new TypeError(`Invalid location ref '${c}', target is a javascript: URL`);return{type:y,target:x}}function v(c){const{type:u,target:y}=c;if(u){if(!y)throw new TypeError("Unable to stringify location ref, empty target")}else throw new TypeError("Unable to stringify location ref, empty type");if(d.test(y))throw new TypeError(`Invalid location ref '${u}:${y}', target is a javascript: URL`);return`${u}:${y}`}function g(c){var u,y,x,O,m;const A=(m=(y=c.metadata)===null||y===void 0||(u=y.annotations)===null||u===void 0?void 0:u[i.M6])!==null&&m!==void 0?m:(O=c.metadata)===null||O===void 0||(x=O.annotations)===null||x===void 0?void 0:x[i.P1];if(!A)throw new Error(`Entity '${(0,o.eE)(c)}' is missing location`);return S(A)}},9791:function(G,w,t){"use strict";t.d(w,{O:function(){return y}});var o=t(52322),i=t(62774),d=t(60364),S=t(2784),v=t(83229),g=t(26639),c=t(39595),u=t(58033);function y(x){const{text:O,language:m,showLineNumbers:A=!1,highlightedNumbers:h,customStyle:M,showCopyCodeButton:R=!1}=x,P=(0,d.Z)(),j=P.palette.type==="dark"?g.Z:c.Z,I=P.palette.type==="dark"?"#256bf3":"#e6ffed";return(0,o.jsxs)(i.Z,{position:"relative",children:[(0,o.jsx)(v.Z,{customStyle:M,language:m,style:j,showLineNumbers:A,wrapLines:!0,lineNumberStyle:{color:P.palette.textVerySubtle},lineProps:b=>h!=null&&h.includes(b)?{style:{backgroundColor:I}}:{},children:O}),R&&(0,o.jsx)(i.Z,{position:"absolute",top:0,right:0,children:(0,o.jsx)(u.b,{text:O})})]})}},58033:function(G,w,t){"use strict";t.d(w,{b:function(){return y}});var o=t(52322),i=t(44394),d=t(58513),S=t(61837),v=t(80030),g=t(19353),c=t(2784),u=t(95074);function y(x){const{text:O,tooltipDelay:m=1e3,tooltipText:A="Text copied to clipboard","aria-label":h="Copy text"}=x,M=(0,i.h_)(d.V),[R,P]=(0,c.useState)(!1),[{error:j},I]=(0,u.Z)();(0,c.useEffect)(()=>{j&&M.post(j)},[j,M]);const b=K=>{K.stopPropagation(),P(!0),I(O)};return(0,o.jsx)(o.Fragment,{children:(0,o.jsx)(v.ZP,{id:"copy-test-tooltip",title:A,placement:"top",leaveDelay:m,onClose:()=>P(!1),open:R,children:(0,o.jsx)(S.Z,{onClick:b,"aria-label":h,children:(0,o.jsx)(g.Z,{})})})})}},70249:function(G,w,t){"use strict";t.d(w,{u:function(){return A}});var o=t(52322),i=t(60905),d=t(79692),S=t(90436),v=t(2784),g=t.p+"static/missingAnnotation.67f79e98..svg",c=t.p+"static/noInformation.4b426325..svg",u=t.p+"static/createComponent.975d1e1e..svg",y=t.p+"static/noBuild.1715fa71..svg";const x=(0,d.Z)({generalImg:{width:"95%",zIndex:2,position:"relative",left:"50%",top:"50%",transform:"translate(-50%, 15%)"}},{name:"BackstageEmptyStateImage"}),O=({missing:h})=>{const M=x();switch(h){case"field":return(0,o.jsx)("img",{src:g,className:M.generalImg,alt:"annotation is missing"});case"info":return(0,o.jsx)("img",{src:c,alt:"no Information",className:M.generalImg});case"content":return(0,o.jsx)("img",{src:u,alt:"create Component",className:M.generalImg});case"data":return(0,o.jsx)("img",{src:y,alt:"no Build",className:M.generalImg});default:return null}},m=(0,d.Z)(h=>({root:{backgroundColor:h.palette.background.default,padding:h.spacing(2,0,0,0)},action:{marginTop:h.spacing(2)},imageContainer:{position:"relative"}}),{name:"BackstageEmptyState"});function A(h){const{title:M,description:R,missing:P,action:j}=h,I=m();return(0,o.jsxs)(i.Z,{container:!0,direction:"row",justifyContent:"space-around",alignItems:"flex-start",className:I.root,spacing:2,children:[(0,o.jsx)(i.Z,{item:!0,xs:12,md:6,children:(0,o.jsxs)(i.Z,{container:!0,direction:"column",children:[(0,o.jsx)(i.Z,{item:!0,xs:!0,children:(0,o.jsx)(S.Z,{variant:"h5",children:M})}),(0,o.jsx)(i.Z,{item:!0,xs:!0,children:(0,o.jsx)(S.Z,{variant:"body1",children:R})}),(0,o.jsx)(i.Z,{item:!0,xs:!0,className:I.action,children:j})]})}),(0,o.jsx)(i.Z,{item:!0,xs:12,md:6,className:I.imageContainer,children:typeof P=="string"?(0,o.jsx)(O,{missing:P}):P.customImage})]})}},74359:function(G,w,t){"use strict";t.d(w,{y:function(){return O}});var o=t(52322),i=t(79692),d=t(11776),S=t(38402),v=t(49378),g=t(2784),c=t(58033),u=t(538);const y=(0,i.Z)(m=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:m.spacing(2)},divider:{margin:m.spacing(2)}}),{name:"BackstageErrorPanel"}),x=({error:m,message:A,stack:h,children:M})=>{const R=y();return(0,o.jsxs)(d.Z,{dense:!0,children:[(0,o.jsxs)(S.Z,{alignItems:"flex-start",children:[(0,o.jsx)(v.Z,{classes:{secondary:R.text},primary:"Error",secondary:m}),(0,o.jsx)(c.b,{text:m})]}),(0,o.jsxs)(S.Z,{alignItems:"flex-start",children:[(0,o.jsx)(v.Z,{classes:{secondary:R.text},primary:"Message",secondary:A}),(0,o.jsx)(c.b,{text:A})]}),h&&(0,o.jsxs)(S.Z,{alignItems:"flex-start",children:[(0,o.jsx)(v.Z,{classes:{secondary:R.text},primary:"Stack Trace",secondary:h}),(0,o.jsx)(c.b,{text:h})]}),M]})};function O(m){const{title:A,error:h,defaultExpanded:M,titleFormat:R,children:P}=m;return(0,o.jsx)(u.G,{severity:"error",title:A!=null?A:h.message,defaultExpanded:M,titleFormat:R,children:(0,o.jsx)(x,{error:h.name,message:h.message,stack:h.stack,children:P})})}},98864:function(G,w,t){"use strict";t.d(w,{rU:function(){return X}});var o=t(52322),i=t(44394),d=t(6542),S=t(62369),v=t(86689),g=t(79692),c=t(90436),u=t(12524),y=t.n(u),x=t(76635),O=t.n(x),m=t(2784),A=t(73557),h=t(71597);function M(){const[V]=(0,A.is)((0,o.jsx)(A.AW,{index:!0,element:(0,o.jsx)("div",{})}));return!V.index}const R=(0,g.Z)({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"}},{name:"Link"}),P=V=>/^([a-z+.-]+):/.test(V),j=/^[\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,I=window.open;if(I&&!I.__backstage){const V=function(...et){const it=String(et[0]);if(j.test(it))throw new Error("Rejected window.open() with a javascript: URL as a security precaution");return I.apply(this,et)};V.__backstage=!0,window.open=V}const b=()=>{try{return(0,i.h_)(d.D).getOptionalString("app.baseUrl")}catch{return}},K=()=>{const V="http://sample.dev";var z;const et=(z=b())!==null&&z!==void 0?z:"/",{pathname:it}=new URL(et,V);return(0,x.trimEnd)(it,"/")},H=V=>{let z=String(V);const et=K(),it=P(z),ft=z.startsWith(et);return!it&&!ft&&(z=et.concat(z)),z},rt=V=>{if(V instanceof Array)return V.map(rt).join(" ").trim();if(typeof V=="object"&&V){var z;return rt(V==null||(z=V.props)===null||z===void 0?void 0:z.children)}return["string","number"].includes(typeof V)?String(V):""},X=m.forwardRef(({onClick:V,noTrack:z,...et},it)=>{const ft=R(),bt=(0,S.z)(),St=M()?H(et.to):et.to,Tt=rt(et.children)||St,pt=P(St),xt=pt&&!!/^https?:/.exec(St);if(j.test(St))throw new Error("Link component rejected javascript: URL as a security precaution");const Y=F=>{V==null||V(F),z||bt.captureEvent("click",Tt,{attributes:{to:St}})};return pt?(0,o.jsxs)(v.Z,{...xt?{target:"_blank",rel:"noopener"}:{},...et,...et["aria-label"]?{"aria-label":`${et["aria-label"]}, Opens in a new window`}:{},ref:it,href:St,onClick:Y,className:y()(ft.externalLink,et.className),children:[et.children,(0,o.jsx)(c.Z,{component:"span",className:ft.visuallyHidden,children:", Opens in a new window"})]}):(0,o.jsx)(v.Z,{...et,ref:it,component:h.rU,to:St,onClick:Y})})},15929:function(G,w,t){"use strict";t.d(w,{Q:function(){return g}});var o=t(52322),i=t(77277),d=t(2784),S=t(98864);const v=d.forwardRef((u,y)=>(0,o.jsx)(S.rU,{ref:y,...u,color:"initial"})),g=d.forwardRef((u,y)=>(0,o.jsx)(i.Z,{ref:y,component:v,...u})),c=null},78527:function(G,w,t){"use strict";t.d(w,{S:function(){return O}});var o=t(52322),i=t(79692),d=t(28865),S=t(60251),v=t(2784),g=t(9791);const c=(0,i.Z)(m=>({markdown:{"& table":{borderCollapse:"collapse",border:`1px solid ${m.palette.border}`},"& th, & td":{border:`1px solid ${m.palette.border}`,padding:m.spacing(1)},"& td":{wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:m.spacing(3,2,3,2.5),borderBottom:0},"& th":{backgroundColor:m.palette.background.paper},"& tr":{backgroundColor:m.palette.background.paper},"& tr:nth-child(odd)":{backgroundColor:m.palette.background.default},"& a":{color:m.palette.link},"& img":{maxWidth:"100%"}}}),{name:"BackstageMarkdownContent"}),u=(m,A)=>A?typeof A=="string"?m+A:v.Children.toArray(A.props.children).reduce(u,m):m,y=({level:m,children:A})=>{const R=v.Children.toArray(A).reduce(u,"").toLocaleLowerCase("en-US").replace(/\W/g,"-");return v.createElement(`h${m}`,{id:R},A)},x={code:({inline:m,className:A,children:h,...M})=>{const R=String(h).replace(/\n+$/,""),P=/language-(\w+)/.exec(A||"");return!m&&P?(0,o.jsx)(g.O,{language:P[1],text:R}):(0,o.jsx)("code",{className:A,...M,children:h})},h1:y,h2:y,h3:y,h4:y,h5:y,h6:y};function O(m){const{content:A,dialect:h="gfm",linkTarget:M,transformLinkUri:R,transformImageUri:P,className:j}=m,I=c();return(0,o.jsx)(d.D,{remarkPlugins:h==="gfm"?[S.Z]:[],className:`${I.markdown} ${j}`,children:A,components:x,linkTarget:M,transformLinkUri:R,transformImageUri:P})}},55015:function(G,w,t){"use strict";t.d(w,{E:function(){return g}});var o=t(52322),i=t(62774),d=t(67358),S=t(60364),v=t(2784);function g(c){const u=(0,S.Z)(),[y,x]=(0,v.useState)(!1);return(0,v.useEffect)(()=>{const O=setTimeout(()=>x(!0),u.transitions.duration.short);return()=>clearTimeout(O)},[u.transitions.duration.short]),y?(0,o.jsx)(d.Z,{...c,"data-testid":"progress"}):(0,o.jsx)(i.Z,{display:"none"})}},35879:function(G,w,t){"use strict";t.d(w,{H:function(){return X}});var o=t(52322),i=t(62774),d=t(21324),S=t(7089),v=t(30192),g=t(74603),c=t(56939),u=t(12231),y=t(73698),x=t(15459),O=t(42494),m=t(79692),A=t(90436),h=t(2784),M=t(72379);const R=(0,m.Z)(V=>(0,O.Z)({icon:{position:"absolute",right:V.spacing(.5),pointerEvents:"none"}}),{name:"BackstageClosedDropdown"});var j=()=>{const V=R();return(0,o.jsx)(M.Z,{className:V.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,o.jsx)("path",{d:"M7.5 8L6 9.5L12.0703 15.5703L18.1406 9.5L16.6406 8L12.0703 12.5703L7.5 8Z",fill:"#616161"})})};const I=(0,m.Z)(V=>(0,O.Z)({icon:{position:"absolute",right:V.spacing(.5),pointerEvents:"none"}}),{name:"BackstageOpenedDropdown"});var K=()=>{const V=I();return(0,o.jsx)(M.Z,{className:V.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,o.jsx)("path",{d:"M16.5 16L18 14.5L11.9297 8.42969L5.85938 14.5L7.35938 16L11.9297 11.4297L16.5 16Z",fill:"#616161"})})};const H=(0,x.Z)(V=>(0,O.Z)({root:{"label + &":{marginTop:V.spacing(3)},"&.Mui-focused > div[role=button]":{borderColor:V.palette.primary.main}},input:{borderRadius:V.shape.borderRadius,position:"relative",backgroundColor:V.palette.background.paper,border:"1px solid #ced4da",fontSize:V.typography.body1.fontSize,padding:V.spacing(1.25,3.25,1.25,1.5),transition:V.transitions.create(["border-color","box-shadow"]),fontFamily:"Helvetica Neue","&:focus":{background:V.palette.background.paper,borderRadius:V.shape.borderRadius}}}),{name:"BackstageSelectInputBase"})(g.Z),rt=(0,m.Z)(V=>(0,O.Z)({formControl:{margin:V.spacing(1,0),maxWidth:300},label:{transform:"initial",fontWeight:"bold",fontSize:V.typography.body2.fontSize,fontFamily:V.typography.fontFamily,color:V.palette.text.primary,"&.Mui-focused":{color:V.palette.text.primary}},formLabel:{transform:"initial",fontWeight:"bold",fontSize:V.typography.body2.fontSize,fontFamily:V.typography.fontFamily,color:V.palette.text.primary,"&.Mui-focused":{color:V.palette.text.primary}},chips:{display:"flex",flexWrap:"wrap"},chip:{margin:2},checkbox:{},root:{display:"flex",flexDirection:"column"}}),{name:"BackstageSelect"});function X(V){const{multiple:z,items:et,label:it,placeholder:ft,selected:bt,onChange:St,triggerReset:Tt,native:pt=!1,disabled:xt=!1,margin:Y}=V,F=rt(),[Q,ct]=(0,h.useState)(bt||(z?[]:"")),[vt,gt]=(0,h.useState)(!1);(0,h.useEffect)(()=>{ct(z?[]:"")},[Tt,z]),(0,h.useEffect)(()=>{ct(bt||(z?[]:""))},[bt,z]);const st=Z=>{ct(Z.target.value),St(Z.target.value)},q=Z=>{if(xt){Z.preventDefault();return}gt(tt=>z&&!(Z.target instanceof HTMLElement)?!0:!tt)},ut=()=>{gt(!1)},k=Z=>()=>{const tt=Q.filter(nt=>nt!==Z);ct(tt),St(tt)};return(0,o.jsx)(i.Z,{className:F.root,children:(0,o.jsxs)(v.Z,{className:F.formControl,children:[(0,o.jsx)(c.Z,{className:F.formLabel,children:it}),(0,o.jsxs)(y.Z,{"aria-label":it,value:Q,native:pt,disabled:xt,"data-testid":"select",displayEmpty:!0,multiple:z,margin:Y,onChange:st,open:vt,onOpen:q,onClose:ut,input:(0,o.jsx)(H,{}),label:it,renderValue:Z=>{var tt;return z&&Q.length!==0?(0,o.jsx)(i.Z,{className:F.chips,children:Z.map(nt=>{const mt=et.find(yt=>yt.value===nt);return mt?(0,o.jsx)(S.Z,{label:mt==null?void 0:mt.label,clickable:!0,onDelete:k(nt),className:F.chip},mt==null?void 0:mt.value):!1})}):(0,o.jsx)(A.Z,{children:Q.length===0?ft||"":(tt=et.find(nt=>nt.value===Z))===null||tt===void 0?void 0:tt.label})},IconComponent:()=>vt?(0,o.jsx)(K,{}):(0,o.jsx)(j,{}),MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},getContentAnchorEl:null},children:[ft&&!z&&(0,o.jsx)(u.Z,{value:[],children:ft}),pt?et&&et.map(Z=>(0,o.jsx)("option",{value:Z.value,children:Z.label},Z.value)):et&&et.map(Z=>(0,o.jsxs)(u.Z,{value:Z.value,children:[z&&(0,o.jsx)(d.Z,{color:"primary",checked:Q.includes(Z.value)||!1,className:F.checkbox}),Z.label]},Z.value))]})]})})}},13788:function(G,w,t){"use strict";t.d(w,{q:function(){return Y}});var o=t(52322),i=t(80851),d=t(62774),S=t(77277),v=t(49429),g=t(61837),c=t(86136),u=t(49378),y=t(12231),x=t(50758),O=t(79784),m=t(79692),A=t(90436),h=t(41156),M=t(2784),R=t(77770),P=t(80079);function j(F,Q){const vt=(0,i.q)().getSystemIcon(F);return vt?(0,o.jsx)(vt,{...Q}):(0,o.jsx)(P.Z,{...Q})}function I(F){return j("brokenImage",F)}function b(F){return j("catalog",F)}function K(F){return j("chat",F)}function H(F){return j("dashboard",F)}function rt(F){return j("docs",F)}function X(F){return j("email",F)}function V(F){return j("github",F)}function z(F){return j("group",F)}function et(F){return j("help",F)}function it(F){return j("user",F)}function ft(F){return j("warning",F)}var bt=t(98864);const St=(0,m.Z)({popoverList:{minWidth:260,maxWidth:400},menuItem:{whiteSpace:"normal"}},{name:"BackstageSupportButton"}),Tt=({icon:F})=>{const Q=(0,i.q)();var ct;const vt=F&&(ct=Q.getSystemIcon(F))!==null&&ct!==void 0?ct:et;return(0,o.jsx)(vt,{})},pt=({link:F})=>{var Q;return(0,o.jsx)(bt.rU,{to:F.url,children:(Q=F.title)!==null&&Q!==void 0?Q:F.url})},xt=({item:F})=>{var Q;return(0,o.jsxs)(y.Z,{children:[(0,o.jsx)(c.Z,{children:(0,o.jsx)(Tt,{icon:F.icon})}),(0,o.jsx)(u.Z,{primary:F.title,secondary:(Q=F.links)===null||Q===void 0?void 0:Q.reduce((ct,vt,gt)=>[...ct,gt>0&&(0,o.jsx)("br",{},gt),(0,o.jsx)(pt,{link:vt},vt.url)],[])})]})};function Y(F){const{title:Q,items:ct,children:vt}=F,{items:gt}=(0,R.v)(),[st,q]=(0,M.useState)(!1),[ut,k]=(0,M.useState)(null),Z=St(),tt=(0,h.Z)(yt=>yt.breakpoints.down("sm")),nt=yt=>{k(yt.currentTarget),q(!0)},mt=()=>{q(!1)};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.Z,{display:"flex",ml:1,children:tt?(0,o.jsx)(g.Z,{color:"primary",size:"small",onClick:nt,"data-testid":"support-button","aria-label":"Support",children:(0,o.jsx)(et,{})}):(0,o.jsx)(S.Z,{"data-testid":"support-button","aria-label":"Support",color:"primary",onClick:nt,startIcon:(0,o.jsx)(et,{}),children:"Support"})}),(0,o.jsxs)(O.ZP,{"data-testid":"support-button-popover",open:st,anchorEl:ut,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},onClose:mt,children:[(0,o.jsxs)(x.Z,{className:Z.popoverList,autoFocusItem:Boolean(ut),children:[Q&&(0,o.jsx)(y.Z,{alignItems:"flex-start",className:Z.menuItem,children:(0,o.jsx)(A.Z,{variant:"subtitle1",children:Q})}),M.Children.map(vt,(yt,Bt)=>(0,o.jsx)(y.Z,{alignItems:"flex-start",className:Z.menuItem,children:yt},`child-${Bt}`)),(ct!=null?ct:gt).map((yt,Bt)=>(0,o.jsx)(xt,{item:yt},`item-${Bt}`))]}),(0,o.jsx)(v.Z,{children:(0,o.jsx)(S.Z,{color:"primary",onClick:mt,"aria-label":"Close",children:"Close"})})]})]})}},34378:function(G,w,t){"use strict";t.d(w,{i:function(){return st}});var o=t(52322),i=t(67222),d=t(62774),S=t(61837),v=t(15459),g=t(79692),c=t(60364),u=t(90436),y=t(21070),x=t(90324),O=t(98281),m=t(48049),A=t(51209),h=t(33375),M=t(44233),R=t(27604),P=t(36444),j=t(37971),I=t(59709),b=t(17373),K=t(3702),H=t(93111),rt=t(76635),X=t(2784),V=t(77277),z=t(35879);const et=(0,g.Z)(k=>({root:{height:"100%",width:"315px",display:"flex",flexDirection:"column",marginRight:k.spacing(3)},value:{fontWeight:"bold",fontSize:18},header:{display:"flex",alignItems:"center",height:k.spacing(7.5),justifyContent:"space-between",borderBottom:`1px solid ${k.palette.grey[500]}`},filters:{display:"flex",flexDirection:"column","& > *":{marginTop:k.spacing(2)}}}),{name:"BackstageTableFilters"}),it=k=>{var Z;const tt=et(),{onChangeFilters:nt}=k,[mt,yt]=(0,X.useState)({...k.selectedFilters}),[Bt,zt]=(0,X.useState)(!1),Ft=()=>{yt({}),zt(Nt=>!Nt)};return(0,X.useEffect)(()=>{nt(mt)},[mt,nt]),(0,o.jsxs)(d.Z,{className:tt.root,children:[(0,o.jsxs)(d.Z,{className:tt.header,children:[(0,o.jsx)(d.Z,{className:tt.value,children:"Filters"}),(0,o.jsx)(V.Z,{color:"primary",onClick:Ft,children:"Clear all"})]}),(0,o.jsx)(d.Z,{className:tt.filters,children:((Z=k.filters)===null||Z===void 0?void 0:Z.length)&&k.filters.map(Nt=>(0,o.jsx)(z.H,{triggerReset:Bt,...Nt.element,selected:mt[Nt.element.label],onChange:Lt=>yt({...mt,[Nt.element.label]:Lt})},Nt.element.label))})]})};var ft=t(4614);function bt(k){return(0,o.jsx)("tbody",{"data-testid":"loading-indicator",children:(0,o.jsx)("tr",{children:(0,o.jsx)("td",{colSpan:k.colSpan,children:(0,o.jsx)(d.Z,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",minHeight:"15rem"},children:(0,o.jsx)(ft.Z,{size:"5rem"})})})})})}const St={Add:(0,X.forwardRef)((k,Z)=>(0,o.jsx)(y.Z,{...k,ref:Z})),Check:(0,X.forwardRef)((k,Z)=>(0,o.jsx)(O.Z,{...k,ref:Z})),Clear:(0,X.forwardRef)((k,Z)=>(0,o.jsx)(h.Z,{...k,ref:Z})),Delete:(0,X.forwardRef)((k,Z)=>(0,o.jsx)(M.Z,{...k,ref:Z})),DetailPanel:(0,X.forwardRef)((k,Z)=>(0,o.jsx)(A.Z,{...k,ref:Z})),Edit:(0,X.forwardRef)((k,Z)=>(0,o.jsx)(R.Z,{...k,ref:Z})),Export:(0,X.forwardRef)((k,Z)=>(0,o.jsx)(K.Z,{...k,ref:Z})),Filter:(0,X.forwardRef)((k,Z)=>(0,o.jsx)(P.Z,{...k,ref:Z})),FirstPage:(0,X.forwardRef)((k,Z)=>(0,o.jsx)(j.Z,{...k,ref:Z})),LastPage:(0,X.forwardRef)((k,Z)=>(0,o.jsx)(I.Z,{...k,ref:Z})),NextPage:(0,X.forwardRef)((k,Z)=>(0,o.jsx)(A.Z,{...k,ref:Z})),PreviousPage:(0,X.forwardRef)((k,Z)=>(0,o.jsx)(m.Z,{...k,ref:Z})),ResetSearch:(0,X.forwardRef)((k,Z)=>(0,o.jsx)(h.Z,{...k,ref:Z})),Search:(0,X.forwardRef)((k,Z)=>(0,o.jsx)(P.Z,{...k,ref:Z})),SortArrow:(0,X.forwardRef)((k,Z)=>(0,o.jsx)(x.Z,{...k,ref:Z})),ThirdStateCheck:(0,X.forwardRef)((k,Z)=>(0,o.jsx)(b.Z,{...k,ref:Z})),ViewColumn:(0,X.forwardRef)((k,Z)=>(0,o.jsx)(H.Z,{...k,ref:Z}))};function Tt(k,Z){const tt=Z.split(".");let nt=k[tt[0]];for(let mt=1;mt<tt.length;++mt){if(nt===void 0)return nt;const yt=tt[mt];nt=nt[yt]}return nt}const pt=(0,v.Z)(k=>({header:{padding:k.spacing(1,2,1,2.5),borderTop:`1px solid ${k.palette.grey.A100}`,borderBottom:`1px solid ${k.palette.grey.A100}`,fontWeight:k.typography.fontWeightBold,position:"static",wordBreak:"normal"}}),{name:"BackstageTableHeader"})(i.W$),xt=(0,v.Z)(k=>({root:{padding:k.spacing(3,0,2.5,2.5)},title:{"& > h6":{fontWeight:k.typography.fontWeightBold}},searchField:{paddingRight:k.spacing(2)}}),{name:"BackstageTableToolbar"})(i.UW),Y=(0,g.Z)(k=>({root:{display:"flex",alignItems:"center",justifyContent:"space-between"},title:{fontWeight:k.typography.fontWeightBold,fontSize:18,whiteSpace:"nowrap"}}),{name:"BackstageTableFiltersContainer"}),F=(0,g.Z)(()=>({root:{display:"flex",alignItems:"start"}}),{name:"BackstageTable"});function Q(k,Z){return k.map(tt=>{var nt;const mt=(nt=tt.headerStyle)!==null&&nt!==void 0?nt:{};let yt=tt.cellStyle||{};if(tt.highlight)if(mt.color=Z.palette.textContrast,typeof yt=="object")yt.fontWeight=Z.typography.fontWeightBold;else{const Bt=yt;yt=(zt,Ft,Nt)=>({...Bt(zt,Ft,Nt),fontWeight:Z.typography.fontWeightBold})}return{...tt,headerStyle:mt,cellStyle:yt}})}function ct(k,Z){return(0,rt.transform)(k,(tt,nt,mt)=>{(0,rt.isEqual)(nt,Z[mt])||(tt[mt]=nt)})}const vt={search:"",filtersOpen:!1,filters:{}};function gt(k){const{toolbarRef:Z,setSearch:tt,hasFilters:nt,selectedFiltersLength:mt,toggleFilters:yt}=k,Bt=Y(),zt=(0,X.useCallback)(Ft=>{k.onSearchChanged(Ft),tt(Ft)},[k,tt]);return nt?(0,o.jsxs)(d.Z,{className:Bt.root,children:[(0,o.jsxs)(d.Z,{className:Bt.root,children:[(0,o.jsx)(S.Z,{onClick:yt,"aria-label":"filter list",children:(0,o.jsx)(P.Z,{})}),(0,o.jsxs)(u.Z,{className:Bt.title,children:["Filters (",mt,")"]})]}),(0,o.jsx)(xt,{...k,ref:Z,onSearchChanged:zt})]}):(0,o.jsx)(xt,{...k,ref:Z,onSearchChanged:zt})}function st(k){const{data:Z,columns:tt,emptyContent:nt,options:mt,title:yt,subtitle:Bt,localization:zt,filters:Ft,initialState:Nt,onStateChange:Lt,components:Yt,isLoading:Te,...pe}=k,le=F(),_t=(0,c.Z)(),jt={...vt,...Nt},[Vt,Se]=(0,X.useState)(jt.filtersOpen),ke=(0,X.useCallback)(()=>Se(be=>!be),[Se]),[xe,qe]=(0,X.useState)(jt.filters),[Ve,Ye]=(0,X.useState)(jt.search);(0,X.useEffect)(()=>{if(Lt){const be=ct({search:Ve,filtersOpen:Vt,filters:xe},vt);Lt(be)}},[Ve,Vt,xe,Lt]);const se=(0,X.useCallback)(be=>{var $e;return($e=tt.find(Ne=>Ne.title===be))===null||$e===void 0?void 0:$e.field},[tt]),sn=(0,X.useMemo)(()=>{if(typeof Z=="function"||!xe)return Z;const be=Object.values(xe);return Z&&be.flat().length?Z.filter(Ne=>!!Object.entries(xe).filter(([,U])=>!!U.length).every(([U,f])=>{const D=Tt(Ne,se(U));return Array.isArray(D)&&Array.isArray(f)?D.some(W=>f.includes(W)):Array.isArray(D)?D.includes(f):Array.isArray(f)?f.includes(D):D===f})):Z},[Z,xe,se]),Re=Object.values(xe).flat().length,tn=!!(Ft!=null&&Ft.length),an=(0,X.useCallback)(be=>(0,o.jsx)(gt,{setSearch:Ye,hasFilters:tn,selectedFiltersLength:Re,toggleFilters:ke,...be}),[ke,tn,Re,Ye]),ie=typeof Z!="function"&&Z.length===0,Ze=tt.length,ze=(0,X.useMemo)(()=>q({hasNoRows:ie,emptyContent:nt,columnCount:Ze,loading:Te}),[ie,nt,Ze,Te]);return(0,o.jsxs)(d.Z,{className:le.root,children:[Vt&&Z&&typeof Z!="function"&&(Ft==null?void 0:Ft.length)&&(0,o.jsx)(it,{filters:ut(Ft,Z,tt),selectedFilters:xe,onChangeFilters:qe}),(0,o.jsx)(i.ZP,{components:{Header:pt,Body:ze,Toolbar:an,...Yt},options:{headerStyle:{textTransform:"uppercase"},...mt},columns:Q(tt,_t),icons:St,title:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(u.Z,{variant:"h5",component:"h2",children:yt}),Bt&&(0,o.jsx)(u.Z,{color:"textSecondary",variant:"body1",children:Bt})]}),data:sn,style:{width:"100%"},localization:{toolbar:{searchPlaceholder:"Filter",searchTooltip:"Filter"},...zt},...pe})]})}st.icons=Object.freeze(St);function q({columnCount:k,emptyContent:Z,hasNoRows:tt,loading:nt}){return mt=>nt?(0,o.jsx)(bt,{colSpan:k}):Z&&tt?(0,o.jsx)("tbody",{children:(0,o.jsx)("tr",{children:(0,o.jsx)("td",{colSpan:k,children:Z})})}):(0,o.jsx)(i.os,{...mt})}function ut(k,Z,tt){const nt=yt=>{const Bt=new Set,zt=Ft=>{Ft!=null&&Bt.add(Ft)};return Z&&Z.forEach(Ft=>{var Nt;const Lt=Tt(Ft,(Nt=tt.find(Yt=>Yt.title===yt))===null||Nt===void 0?void 0:Nt.field);Array.isArray(Lt)?Lt.forEach(zt):zt(Lt)}),Bt},mt=yt=>({placeholder:"All results",label:yt.column,multiple:yt.type==="multiple-select",items:[...nt(yt.column)].sort().map(Bt=>({label:Bt,value:Bt}))});return k.map(yt=>({type:yt.type,element:mt(yt)}))}},538:function(G,w,t){"use strict";t.d(w,{G:function(){return b}});var o=t(52322),i=t(41128),d=t(79692),S=t(27616),v=t(8284),g=t(70660),c=t(60905),u=t(90436),y=t(91750),x=t(38016),O=t(2784),m=t(78527);const A=(K,H)=>(H.palette.type==="light"?i._j:i.$n)(H.palette[K].light,.6),h=(K,H)=>(H.palette.type==="light"?i.$n:i._j)(H.palette[K].light,.9),M=(0,d.Z)(K=>({root:{marginRight:K.spacing(1),fill:({severity:H})=>A(H,K)}})),R=({severity:K})=>{const H=M({severity:K});return(0,o.jsx)(y.Z,{classes:H})},P=({severity:K})=>{const H=M({severity:K});return(0,o.jsx)(x.Z,{classes:H})},j=(0,d.Z)(K=>({panel:{backgroundColor:({severity:H})=>h(H,K),color:({severity:H})=>A(H,K),verticalAlign:"middle"},summary:{display:"flex",flexDirection:"row"},summaryText:{color:({severity:H})=>A(H,K),fontWeight:K.typography.fontWeightBold},markdownContent:{"& p":{display:"inline"}},message:{width:"100%",display:"block",color:({severity:H})=>A(H,K),backgroundColor:({severity:H})=>h(H,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"}),I=K=>K.charAt(0).toLocaleUpperCase("en-US")+K.slice(1);function b(K){const{severity:H="warning",title:rt,titleFormat:X,message:V,children:z,defaultExpanded:et}=K,it=j({severity:H}),ft=I(H)+(rt?`: ${rt}`:"");return(0,o.jsxs)(S.Z,{defaultExpanded:et!=null?et:!1,className:it.panel,role:"alert",children:[(0,o.jsxs)(v.Z,{expandIcon:(0,o.jsx)(P,{severity:H}),className:it.summary,children:[(0,o.jsx)(R,{severity:H}),(0,o.jsx)(u.Z,{className:it.summaryText,variant:"subtitle1",children:X==="markdown"?(0,o.jsx)(m.S,{content:ft,className:it.markdownContent}):ft})]}),(V||z)&&(0,o.jsx)(g.Z,{children:(0,o.jsxs)(c.Z,{container:!0,children:[V&&(0,o.jsx)(c.Z,{item:!0,xs:12,children:(0,o.jsx)(u.Z,{className:it.message,variant:"body1",children:V})}),z&&(0,o.jsx)(c.Z,{item:!0,xs:12,className:it.details,children:z})]})})]})}},77770:function(G,w,t){"use strict";t.d(w,{v:function(){return S}});var o=t(44394),i=t(6542);const d={url:"https://github.com/backstage/backstage/issues",items:[{title:"Support Not Configured",icon:"warning",links:[{title:"Add `app.support` config key",url:"https://github.com/backstage/backstage/blob/master/app-config.yaml"}]}]};function S(){const g=(0,o.I_)().get(i.D),c=g==null?void 0:g.getOptionalConfig("app.support");return c?{url:c.getString("url"),items:c.getConfigArray("items").flatMap(u=>{var y;return{title:u.getString("title"),icon:u.getOptionalString("icon"),links:((y=u.getOptionalConfigArray("links"))!==null&&y!==void 0?y:[]).flatMap(x=>({url:x.getString("url"),title:x.getString("title")}))}})}:d}},42398:function(G,w,t){"use strict";t.d(w,{V:function(){return c}});var o=t(52322),i=t(79692),d=t(12524),S=t.n(d),v=t(2784);const g=(0,i.Z)(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 c(u){const{className:y,stretch:x,noPadding:O,children:m,...A}=u,h=g();return(0,o.jsx)("article",{...A,className:S()(h.root,y,{[h.stretch]:x,[h.noPadding]:O}),children:m})}},30706:function(G,w,t){"use strict";t.d(w,{y:function(){return y}});var o=t(52322),i=t(62774),d=t(79692),S=t(90436),v=t(2784),g=t(18671);const c=x=>(0,d.Z)(O=>({container:{width:"100%",display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-end",alignItems:"center",marginBottom:O.spacing(2),textAlign:x.textAlign},leftItemsBox:{flex:"1 1 auto",minWidth:0,overflow:"visible"},rightItemsBox:{flex:"0 1 auto",display:"flex",flexDirection:"row",flexWrap:"wrap",alignItems:"center",marginLeft:O.spacing(1),minWidth:0,overflow:"visible"},description:{},title:{display:"inline-flex",marginBottom:0}}),{name:"BackstageContentHeader"}),u=({title:x="Unknown page",className:O})=>(0,o.jsx)(S.Z,{variant:"h4",component:"h2",className:O,"data-testid":"header-title",children:x});function y(x){const{description:O,title:m,titleComponent:A=void 0,children:h,textAlign:M="left"}=x,R=c({textAlign:M})(),P=A||(0,o.jsx)(u,{title:m,className:R.title});return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(g.q,{title:m}),(0,o.jsxs)(i.Z,{className:R.container,children:[(0,o.jsxs)(i.Z,{className:R.leftItemsBox,children:[P,O&&(0,o.jsx)(S.Z,{className:R.description,variant:"body2",children:O})]}),(0,o.jsx)(i.Z,{className:R.rightItemsBox,children:h})]})]})}},87435:function(G,w,t){"use strict";t.d(w,{m:function(){return A}});var o=t(52322),i=t(60905),d=t(79692),S=t(90436),v=t(2784),g=t(73557),c=t(98864),u=t(77770),y=t.p+"static/mic-drop.fe3ef4d0..svg";const x=(0,d.Z)(h=>({micDrop:{maxWidth:"60%",bottom:h.spacing(2),right:h.spacing(2),[h.breakpoints.down("xs")]:{maxWidth:"96%",bottom:"unset",right:"unset",margin:h.spacing(10,"auto",4)}}}),{name:"BackstageErrorPageMicDrop"}),O=()=>{const h=x();return(0,o.jsx)("img",{src:y,className:h.micDrop,alt:"Girl dropping mic from her hands"})},m=(0,d.Z)(h=>({container:{padding:h.spacing(8),[h.breakpoints.down("xs")]:{padding:h.spacing(2)}},title:{paddingBottom:h.spacing(5),[h.breakpoints.down("xs")]:{paddingBottom:h.spacing(4),fontSize:h.typography.h3.fontSize}},subtitle:{color:h.palette.textSubtle}}),{name:"BackstageErrorPage"});function A(h){const{status:M,statusMessage:R,additionalInfo:P,supportUrl:j}=h,I=m(),b=(0,g.s0)(),K=(0,u.v)();return(0,o.jsxs)(i.Z,{container:!0,spacing:0,className:I.container,children:[(0,o.jsxs)(i.Z,{item:!0,xs:12,sm:8,md:4,children:[(0,o.jsxs)(S.Z,{"data-testid":"error",variant:"body1",className:I.subtitle,children:["ERROR ",M,": ",R]}),(0,o.jsx)(S.Z,{variant:"body1",className:I.subtitle,children:P}),(0,o.jsx)(S.Z,{variant:"h2",className:I.title,children:"Looks like someone dropped the mic!"}),(0,o.jsxs)(S.Z,{variant:"h6",children:[(0,o.jsx)(c.rU,{to:"#","data-testid":"go-back-link",onClick:()=>b(-1),children:"Go back"}),"... or please"," ",(0,o.jsx)(c.rU,{to:j||K.url,children:"contact support"})," if you think this is a bug."]})]}),(0,o.jsx)(O,{})]})}},48037:function(G,w,t){"use strict";t.d(w,{h:function(){return V}});var o=t(52322),i=t(44394),d=t(6542),S=t(62774),v=t(60905),g=t(79692),c=t(80030),u=t(90436),y=t(2784),x=t(18671),O=t(98864),m=t(16173),A=t(11776),h=t(38402),M=t(79784),R=t(15459);const P=(0,R.Z)({root:{textDecoration:"underline",cursor:"pointer"}},{name:"BackstageBreadcrumbsClickableText"})(u.Z),j=(0,R.Z)({root:{textDecoration:"underline",color:"inherit"}},{name:"BackstageBreadcrumbsStyledBox"})(S.Z);function I(z){const{children:et,...it}=z,[ft,bt]=y.useState(null),St=y.Children.toArray(et),[Tt,pt,...xt]=St,Y=xt.length?xt.pop():St[St.length-1],F=St.length>3,Q=gt=>{bt(gt.currentTarget)},ct=()=>{bt(null)},vt=Boolean(ft);return(0,o.jsxs)(y.Fragment,{children:[(0,o.jsxs)(m.Z,{"aria-label":"breadcrumb",...it,children:[St.length>1&&(0,o.jsx)(j,{clone:!0,children:Tt}),St.length>2&&(0,o.jsx)(j,{clone:!0,children:pt}),F&&(0,o.jsx)(P,{onClick:Q,children:"..."}),(0,o.jsx)(S.Z,{style:{fontStyle:"italic"},children:Y})]}),(0,o.jsx)(M.ZP,{open:vt,anchorEl:ft,onClose:ct,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},children:(0,o.jsx)(A.Z,{children:xt.map((gt,st)=>(0,o.jsx)(h.Z,{button:!0,children:(0,o.jsx)(j,{clone:!0,children:gt})},st))})})]})}var b=t(44409);const K=(0,g.Z)(z=>({header:{gridArea:"pageHeader",padding:z.spacing(3),width:"100%",boxShadow:z.shadows[4],position:"relative",zIndex:100,display:"flex",flexDirection:"row",alignItems:"center",backgroundImage:z.page.backgroundImage,backgroundPosition:"center",backgroundSize:"cover",[z.breakpoints.down("sm")]:{flexWrap:"wrap"}},leftItemsBox:{maxWidth:"100%",flexGrow:1},rightItemsBox:{width:"auto",alignItems:"center"},title:{color:z.page.fontColor,wordBreak:"break-word",fontSize:z.typography.h3.fontSize,marginBottom:0},subtitle:{color:z.page.fontColor,opacity:.8,display:"inline-block",marginTop:z.spacing(1),maxWidth:"75ch"},type:{textTransform:"uppercase",fontSize:11,opacity:.8,marginBottom:z.spacing(1),color:z.page.fontColor},breadcrumb:{color:z.page.fontColor},breadcrumbType:{fontSize:"inherit",opacity:.7,marginRight:-z.spacing(.3),marginBottom:z.spacing(.3)},breadcrumbTitle:{fontSize:"inherit",marginLeft:-z.spacing(.3),marginBottom:z.spacing(.3)}}),{name:"BackstageHeader"}),H=({type:z,typeLink:et,classes:it,pageTitle:ft})=>z?et?(0,o.jsxs)(I,{className:it.breadcrumb,children:[(0,o.jsx)(O.rU,{to:et,children:z}),(0,o.jsx)(u.Z,{children:ft})]}):(0,o.jsx)(u.Z,{className:it.type,children:z}):null,rt=({pageTitle:z,classes:et,tooltip:it})=>{const{contentRef:ft}=(0,b.r)(),bt=(0,o.jsx)(u.Z,{ref:ft,tabIndex:-1,className:et.title,variant:"h1",children:z});return it?(0,o.jsx)(c.ZP,{title:it,placement:"top-start",children:bt}):bt},X=({classes:z,subtitle:et})=>et?typeof et!="string"?(0,o.jsx)(o.Fragment,{children:et}):(0,o.jsx)(u.Z,{className:z.subtitle,variant:"subtitle2",component:"span",children:et}):null;function V(z){const{children:et,pageTitleOverride:it,style:ft,subtitle:bt,title:St,tooltip:Tt,type:pt,typeLink:xt}=z,Y=K(),Q=(0,i.h_)(d.D).getOptionalString("app.title")||"Backstage",ct=it||St,vt=St||it,gt=`${ct} | %s | ${Q}`,st=`${ct} | ${Q}`;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(x.q,{titleTemplate:gt,defaultTitle:st}),(0,o.jsxs)("header",{style:ft,className:Y.header,children:[(0,o.jsxs)(S.Z,{className:Y.leftItemsBox,children:[(0,o.jsx)(H,{classes:Y,type:pt,typeLink:xt,pageTitle:vt}),(0,o.jsx)(rt,{classes:Y,pageTitle:vt,tooltip:Tt}),(0,o.jsx)(X,{classes:Y,subtitle:bt})]}),(0,o.jsx)(v.Z,{container:!0,className:Y.rightItemsBox,spacing:4,children:et})]})]})}},67880:function(G,w,t){"use strict";t.d(w,{T:function(){return g}});var o=t(52322),i=t(2784),d=t(79692),S=t(41547);const v=(0,d.Z)(c=>({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",[c.breakpoints.down("xs")]:{height:"100%"},"@media print":{display:"block",height:"auto",overflowY:"inherit"}}}),{name:"BackstagePage"});function g(c){const{themeId:u,children:y}=c,x=v();return(0,o.jsx)(S.Z,{theme:O=>({...O,page:O.getPageTheme({themeId:u})}),children:(0,o.jsx)("main",{className:x.root,children:y})})}},32166:function(G,w,t){"use strict";t.d(w,{g:function(){return v}});var o=t(52322),i=t(2784),d=t(48037),S=t(67880);function v(g){const{themeId:c,children:u,...y}=g;return(0,o.jsxs)(S.T,{themeId:c,children:[(0,o.jsx)(d.h,{...y}),u]})}},44409:function(G,w,t){"use strict";t.d(w,{t:function(){return m},r:function(){return A}});var o=t(52322),i=t(62774),d=t(79692),S=t(41156),v=t(2784),g=t(76921),c;(function(h){h.SIDEBAR_PIN_STATE="sidebarPinState"})(c||(c={}));const u={getSidebarPinState(){let h;try{h=JSON.parse(window.localStorage.getItem("sidebarPinState")||"true")}catch{return!0}return!!h},setSidebarPinState(h){return window.localStorage.setItem("sidebarPinState",JSON.stringify(h))}};var y=t(93539);const x=(0,d.Z)(h=>({root:{width:"100%",transition:"padding-left 0.1s ease-out",isolation:"isolate",[h.breakpoints.up("sm")]:{paddingLeft:M=>M.isPinned?M.sidebarConfig.drawerWidthOpen:M.sidebarConfig.drawerWidthClosed},[h.breakpoints.down("xs")]:{paddingBottom:M=>M.sidebarConfig.mobileSidebarHeight},"@media print":{padding:"0px !important"}},content:{zIndex:0,isolation:"isolate","&:focus":{outline:0}}}),{name:"BackstageSidebarPage"}),O=(0,v.createContext)({content:{contentRef:void 0}});function m(h){const[M,R]=(0,v.useState)(()=>u.getSidebarPinState()),{sidebarConfig:P}=(0,v.useContext)(g.kG),j=(0,v.useRef)(null),I=(0,v.useMemo)(()=>({content:{contentRef:j}}),[j]);(0,v.useEffect)(()=>{u.setSidebarPinState(M)},[M]);const b=(0,S.Z)(rt=>rt.breakpoints.down("xs"),{noSsr:!0}),K=()=>R(!M),H=x({isPinned:M,sidebarConfig:P});return(0,o.jsx)(y.lE,{value:{isPinned:M,toggleSidebarPinState:K,isMobile:b},children:(0,o.jsx)(O.Provider,{value:I,children:(0,o.jsx)(i.Z,{className:H.root,children:h.children})})})}function A(){const{content:h}=(0,v.useContext)(O);return{focusContent:(0,v.useCallback)(()=>{var R,P;h==null||(P=h.contentRef)===null||P===void 0||(R=P.current)===null||R===void 0||R.focus()},[h]),contentRef:h==null?void 0:h.contentRef}}},93539:function(G,w,t){"use strict";t.d(w,{Pf:function(){return y},lE:function(){return u}});var o=t(52322),i=t(29651),d=t(68993),S=t(2784);const v={isPinned:!0,toggleSidebarPinState:()=>{},isMobile:!1},g=(0,S.createContext)(v),c=(0,i.CT)("sidebar-pin-state-context");function u(x){const{children:O,value:m}=x;return(0,o.jsx)(g.Provider,{value:m,children:(0,o.jsx)(c.Provider,{value:(0,d.E)({1:m}),children:O})})}const y=()=>{const x=(0,S.useContext)(c),O=(0,S.useContext)(g);if(x===void 0)return O||v;const m=x.atVersion(1);if(m===void 0)throw new Error("No context found for version 1.");return m}},76921:function(G,w,t){"use strict";t.d(w,{$E:function(){return g},Ag:function(){return O},kG:function(){return x},po:function(){return v},rW:function(){return u}});var o=t(2784);const i=72,d=24,S=18,v={drawerWidthClosed:i,drawerWidthOpen:224,defaultOpenDelayMs:100,defaultCloseDelayMs:0,defaultFadeDuration:200,logoHeight:32,iconContainerWidth:i,iconSize:i-d*2,iconPadding:d,selectedIndicatorWidth:3,userBadgePadding:S,userBadgeDiameter:i-S*2,mobileSidebarHeight:56},g=m=>({...v,...m,iconContainerWidth:v.drawerWidthClosed,iconSize:v.drawerWidthClosed-v.iconPadding*2,userBadgeDiameter:v.drawerWidthClosed-v.userBadgePadding*2}),c={drawerWidthClosed:0,drawerWidthOpen:202,defaultOpenDelayMs:v.defaultOpenDelayMs+200},u=m=>({...c,...m}),y="@backstage/core/sidebar-intro-dismissed",x=(0,o.createContext)({sidebarConfig:v,submenuConfig:c}),O=(0,o.createContext)({isHoveredOn:!1,setIsHoveredOn:()=>{}})},72388:function(G,w,t){"use strict";t.d(w,{Os:function(){return g},fC:function(){return c}});var o=t(52322),i=t(29651),d=t(68993),S=t(2784);const v=(0,i.CT)("analytics-context"),g=()=>{const y=(0,S.useContext)(v);if(y===void 0)return{routeRef:"unknown",pluginId:"root",extension:"App"};const x=y.atVersion(1);if(x===void 0)throw new Error("No context found for version 1.");return x},c=y=>{const{attributes:x,children:O}=y,A={...g(),...x},h=(0,d.E)({1:A});return(0,o.jsx)(v.Provider,{value:h,children:O})};function u(y,x){const O=m=>_jsx(c,{attributes:x,children:_jsx(y,{...m})});return O.displayName=`WithAnalyticsContext(${y.displayName||y.name||"Component"})`,O}},7355:function(G,w,t){"use strict";t.d(w,{f:function(){return v},h:function(){return S}});var o=t(87612),i=t(96087);const d=(0,i.u)("core-plugin-api:analytics-tracker-events",()=>({mostRecentGatheredNavigation:void 0,mostRecentRoutableExtensionRender:void 0,beforeUnloadRegistered:!1})),S="_ROUTABLE-EXTENSION-RENDERED";class v{setContext(c){this.context=c}captureEvent(c,u,{value:y,attributes:x}={}){const{_routeNodeType:O,...m}=this.context;if(c===S){d.mostRecentGatheredNavigation&&(d.mostRecentRoutableExtensionRender={context:{...m,extension:"App"}});return}if(d.mostRecentGatheredNavigation){try{this.analyticsApi.captureEvent({...d.mostRecentGatheredNavigation,...d.mostRecentRoutableExtensionRender})}catch(A){console.warn("Error during analytics event capture. %o",A)}d.mostRecentGatheredNavigation=void 0,d.mostRecentRoutableExtensionRender=void 0}if(c==="navigate"&&O==="gathered"&&m.pluginId==="root"){d.mostRecentGatheredNavigation={action:c,subject:u,value:y,attributes:x,context:m};return}try{this.analyticsApi.captureEvent({action:c,subject:u,value:y,attributes:x,context:m})}catch(A){console.warn("Error during analytics event capture. %o",A)}}constructor(c,u={routeRef:"unknown",pluginId:"root",extension:"App"}){(0,o._)(this,"analyticsApi",void 0),(0,o._)(this,"context",void 0),this.analyticsApi=c,this.context=u,d.beforeUnloadRegistered||(addEventListener("beforeunload",()=>{d.mostRecentGatheredNavigation&&(this.analyticsApi.captureEvent({...d.mostRecentGatheredNavigation,...d.mostRecentRoutableExtensionRender}),d.mostRecentGatheredNavigation=void 0,d.mostRecentRoutableExtensionRender=void 0)},{once:!0,passive:!0}),d.beforeUnloadRegistered=!0)}}},62369:function(G,w,t){"use strict";t.d(w,{z:function(){return c}});var o=t(72388),i=t(44394),d=t(86386),S=t(2784),v=t(7355);function g(){try{return(0,i.h_)(d.v)}catch{return{captureEvent:()=>{}}}}function c(){const u=(0,S.useRef)(null),y=(0,o.Os)(),x=g();function O(){return u.current===null&&(u.current=new v.f(x)),u.current}const m=O();return m.setContext(y),m}},78847:function(G,w,t){"use strict";t.d(w,{$:function(){return i}});var o=t(95965);const i=(0,o.T)({id:"core.alert"})},86386:function(G,w,t){"use strict";t.d(w,{v:function(){return i}});var o=t(95965);const i=(0,o.T)({id:"core.analytics"})},6542:function(G,w,t){"use strict";t.d(w,{D:function(){return i}});var o=t(95965);const i=(0,o.T)({id:"core.config"})},96727:function(G,w,t){"use strict";t.d(w,{N:function(){return i}});var o=t(95965);const i=(0,o.T)({id:"core.discovery"})},58513:function(G,w,t){"use strict";t.d(w,{V:function(){return i}});var o=t(95965);const i=(0,o.T)({id:"core.error"})},82723:function(G,w,t){"use strict";t.d(w,{C:function(){return i},W:function(){return d}});var o=t(95965),i;(function(S){S[S.None=0]="None",S[S.Active=1]="Active"})(i||(i={}));const d=(0,o.T)({id:"core.featureflags"})},85094:function(G,w,t){"use strict";t.d(w,{g:function(){return i}});var o=t(95965);const i=(0,o.T)({id:"core.fetch"})},77186:function(G,w,t){"use strict";t.d(w,{$:function(){return i}});var o=t(95965);const i=(0,o.T)({id:"core.identity"})},96253:function(G,w,t){"use strict";t.d(w,{o:function(){return i}});var o=t(95965);const i=(0,o.T)({id:"core.translation"})},95965:function(G,w,t){"use strict";t.d(w,{T:function(){return d}});var o=t(87612);class i{get id(){return this.config.id}get T(){throw new Error(`tried to read ApiRef.T of ${this}`)}toString(){return`apiRef{${this.config.id}}`}constructor(v){if((0,o._)(this,"config",void 0),this.config=v,!v.id.split(".").flatMap(c=>c.split("-")).every(c=>c.match(/^[a-z][a-z0-9]*$/)))throw new Error(`API id must only contain period separated lowercase alphanum tokens with dashes, got '${v.id}'`)}}function d(S){return new i(S)}},42380:function(G,w,t){"use strict";t.d(w,{n:function(){return o}});function o(i,d){return"id"in i?{api:i,deps:{},factory:()=>d}:i}},44394:function(G,w,t){"use strict";t.d(w,{I_:function(){return S},h_:function(){return v}});var o=t(52322),i=t(2784),d=t(29651);function S(){const c=(0,d.Vt)("api-context");if(!c)throw new Error("API context is not available");const u=c.atVersion(1);if(!u)throw new Error("ApiContext v1 not available");return u}function v(c){const y=S().get(c);if(!y)throw new Error(`No implementation available for ${c}`);return y}function g(c){return function(y){const x=m=>{const A=S(),h={};for(const M in c)if(c.hasOwnProperty(M)){const R=c[M],P=A.get(R);if(!P)throw new Error(`No implementation available for ${R}`);h[M]=P}return _jsx(y,{...m,...h})},O=y.displayName||y.name||"Component";return x.displayName=`withApis(${O})`,x}}},80851:function(G,w,t){"use strict";t.d(w,{q:function(){return i}});var o=t(29651);const i=()=>{const d=(0,o.Vt)("app-context");if(!d)throw new Error("App context is not available");const S=d.atVersion(1);if(!S)throw new Error("AppContext v1 not available");return S}},62584:function(G,w,t){"use strict";t.d(w,{I:function(){return v},R:function(){return S}});var o=t(96087);const i=(0,o.u)("component-data-store",()=>new WeakMap),d="__backstage_data";function S(g,c,u){const y=g;var x;let O=(x=y[d])!==null&&x!==void 0?x:i.get(g);if(O||(O={map:new Map},Object.defineProperty(y,d,{enumerable:!1,configurable:!0,writable:!1,value:O}),i.set(g,O)),O.map.has(c)){const m=g.displayName||g.name;throw new Error(`Attempted to attach duplicate data "${c}" to component "${m}"`)}O.map.set(c,u)}function v(g,c){if(!g)return;const u=g.type;if(!u)return;var y;const x=(y=u[d])!==null&&y!==void 0?y:i.get(u);if(x)return x.map.get(c)}},82963:function(G,w,t){"use strict";t.d(w,{CO:function(){return m},YO:function(){return A},P4:function(){return O}});var o=t(52322),i=t(2784),d=t(62369),S=t(72388),v=t(80851),g=t(37321),c=t(62584),u=t(87612);class y extends i.Component{static getDerivedStateFromError(M){return{error:M}}render(){const{error:M}=this.state,{app:R,plugin:P}=this.props,{ErrorBoundaryFallback:j}=R.getComponents();return M?(0,o.jsx)(j,{error:M,resetError:this.handleErrorReset,plugin:P}):this.props.children}constructor(...M){super(...M),(0,u._)(this,"state",{error:void 0}),(0,u._)(this,"handleErrorReset",()=>{this.setState({error:void 0})})}}var x=t(7355);function O(h){const{component:M,mountPoint:R,name:P}=h;return A({component:{lazy:()=>M().then(j=>{const I=K=>{const H=(0,d.z)();try{(0,g.t)(R)}catch(rt){if(typeof rt=="object"&&rt!==null){const{message:X}=rt;if(typeof X=="string"&&X.startsWith("No path for "))throw new Error(`Routable extension component with mount point ${R} 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 rt}return(0,i.useEffect)(()=>{H.captureEvent(x.h,"")},[H]),(0,o.jsx)(j,{...K})},b=P||j.displayName||j.name||"LazyComponent";return I.displayName=`RoutableExtension(${b})`,I},j=>b=>{const K=(0,v.q)(),{BootErrorPage:H}=K.getComponents();return(0,o.jsx)(H,{step:"load-chunk",error:j})})},data:{"core.mountPoint":R},name:P})}function m(h){const{component:M,name:R}=h;return A({component:M,name:R})}function A(h){const{data:M={},name:R}=h;R||console.warn("Declaring extensions without name is DEPRECATED. Make sure that all usages of createReactExtension, createComponentExtension and createRoutableExtension provide a name.");let P;if("lazy"in h.component){const I=h.component.lazy;P=(0,i.lazy)(()=>I().then(b=>({default:b})))}else P=h.component.sync;const j=R||P.displayName||P.name||"Component";return{expose(I){const b=K=>{const H=(0,v.q)(),{Progress:rt}=H.getComponents(),X=M==null?void 0:M["core.mountPoint"];return(0,o.jsx)(i.Suspense,{fallback:(0,o.jsx)(rt,{}),children:(0,o.jsx)(y,{app:H,plugin:I,children:(0,o.jsx)(S.fC,{attributes:{pluginId:I.getId(),...R&&{extension:R},...X&&{routeRef:X.id}},children:(0,o.jsx)(P,{...K})})})})};(0,c.R)(b,"core.plugin",I),(0,c.R)(b,"core.extensionName",R);for(const[K,H]of Object.entries(M))(0,c.R)(b,K,H);return b.displayName=`Extension(${j})`,b}}}},2532:function(G,w,t){"use strict";t.d(w,{v:function(){return u}});var o=t(87612),i=t(2784),d=t(62584),S=t(44394),v=t(82723);function g(y,x,O,m){return i.Children.toArray(y).flatMap(A=>{if(!(0,i.isValidElement)(A))return[];if(A.type===i.Fragment)return g(A.props.children,x,O,m);if((0,d.I)(A,"core.featureFlagged")){const h=A.props;return("with"in h?x.isActive(h.with):!x.isActive(h.without))?g(A.props.children,x,O,m):[]}if(O===void 0||O(A))return[A];if(m)throw new Error(m);return g(A.props.children,x,O,m)})}class c{selectByComponentData(x){const O=g(this.node,this.featureFlagsApi,m=>(0,d.I)(m,x.key)!==void 0,x.withStrictError);return new c(O,this.featureFlagsApi)}findComponentData(x){return g(this.node,this.featureFlagsApi,m=>(0,d.I)(m,x.key)!==void 0).map(m=>(0,d.I)(m,x.key)).filter(m=>m!==void 0)}getElements(){return g(this.node,this.featureFlagsApi)}constructor(x,O){(0,o._)(this,"node",void 0),(0,o._)(this,"featureFlagsApi",void 0),this.node=x,this.featureFlagsApi=O}}function u(y,x,O=[]){const m=(0,S.h_)(v.W),A=new c(y,m);return(0,i.useMemo)(()=>x(A),[y,...O])}},15006:function(G,w,t){"use strict";t.d(w,{r:function(){return d}});var o=t(87612);class i{getId(){return this.config.id}getApis(){var v;return(v=this.config.apis)!==null&&v!==void 0?v:[]}getFeatureFlags(){var v,g;return(g=(v=this.config.featureFlags)===null||v===void 0?void 0:v.slice())!==null&&g!==void 0?g:[]}get routes(){var v;return(v=this.config.routes)!==null&&v!==void 0?v:{}}get externalRoutes(){var v;return(v=this.config.externalRoutes)!==null&&v!==void 0?v:{}}provide(v){return v.expose(this)}toString(){return`plugin{${this.config.id}}`}constructor(v){(0,o._)(this,"config",void 0),this.config=v}}function d(S){return new i(S)}},30283:function(G,w,t){"use strict";t.d(w,{N:function(){return g}});var o=t(87612),i=t(92918);let d=i.K,S=d;class v{get title(){return this.id}toString(){return`routeRef{type=absolute,id=${this.id}}`}constructor(u,y){(0,o._)(this,"id",void 0),(0,o._)(this,"params",void 0),(0,o._)(this,S,void 0),this.id=u,this.params=y,this[d]="absolute"}}function g(c){var u;return new v(c.id,(u=c.params)!==null&&u!==void 0?u:[])}},92918:function(G,w,t){"use strict";t.d(w,{K:function(){return i}});var o=t(96087);const i=(0,o.u)("route-ref-type",()=>Symbol("route-ref-type"))},37321:function(G,w,t){"use strict";t.d(w,{t:function(){return S}});var o=t(2784),i=t(73557),d=t(29651);function S(v){const{pathname:g}=(0,i.TH)(),c=(0,d.Vt)("routing-context");if(!c)throw new Error("Routing context is not available");const u=c.atVersion(1),y=(0,o.useMemo)(()=>u&&u.resolve(v,{pathname:g}),[u,v,g]);if(!c)throw new Error("useRouteRef used outside of routing context");if(!u)throw new Error("RoutingContext v1 not available");const x="optional"in v&&v.optional;if(!y&&!x)throw new Error(`No path for ${v}`);return y}},35304:function(G,w,t){"use strict";t.d(w,{F:function(){return O},y:function(){return m}});var o=t(88412),i=t(52475),d=t(80956),S=t(87612),v=t(18015);function g(A){const h=new Array;function M(R,P){for(const[j,I]of Object.entries(R))typeof I=="string"?h.push([P+j,I]):M(I,`${P}${j}.`)}return M(A,""),Object.fromEntries(h)}var c=new WeakMap,u=new WeakMap,y=new WeakMap;class x{get id(){return(0,o._)(this,c)}get T(){throw new Error("Not implemented")}getDefaultMessages(){return(0,o._)(this,u)}setDefaultResource(h){(0,d._)(this,y,h)}getDefaultResource(){return(0,o._)(this,y)}toString(){return`TranslationRef{id=${this.id}}`}constructor(h){(0,i._)(this,c,{writable:!0,value:void 0}),(0,i._)(this,u,{writable:!0,value:void 0}),(0,i._)(this,y,{writable:!0,value:void 0}),(0,S._)(this,"$$type","@backstage/TranslationRef"),(0,S._)(this,"version","v1"),(0,d._)(this,c,h.id),(0,d._)(this,u,g(h.messages))}}function O(A){const h=new x(A);return A.translations&&h.setDefaultResource((0,v.N)({ref:h,translations:A.translations})),h}function m(A){const h=A;if(h.$$type!=="@backstage/TranslationRef")throw new Error(`Invalid translation ref, bad type '${h.$$type}'`);if(h.version!=="v1")throw new Error(`Invalid translation ref, bad version '${h.version}'`);return h}},18015:function(G,w,t){"use strict";t.d(w,{N:function(){return i},W:function(){return o}});function o(d){const S=d;if(S.$$type!=="@backstage/TranslationResource")throw new Error(`Invalid translation resource, bad type '${S.$$type}'`);if(S.version!=="v1")throw new Error(`Invalid translation resource, bad version '${S.version}'`);return S}function i(d){return{$$type:"@backstage/TranslationResource",version:"v1",id:d.ref.id,resources:Object.entries(d.translations).map(([S,v])=>({language:S,loader:()=>v().then(g=>{const c=g.default;return{messages:(c==null?void 0:c.$$type)==="@backstage/TranslationMessages"?c.messages:c}})}))}}},41385:function(G,w,t){"use strict";t.d(w,{V:function(){return S}});var o=t(87612),i=t(48998);async function d(v){try{const c=await v.text();if(c){var g;if(!((g=v.headers.get("content-type"))===null||g===void 0)&&g.startsWith("application/json"))try{const u=JSON.parse(c);if(u.error&&u.response)return u}catch{}return{error:{name:"Error",message:`Request failed with status ${v.status} ${v.statusText}, ${c}`},response:{statusCode:v.status}}}}catch{}return{error:{name:"Error",message:`Request failed with status ${v.status} ${v.statusText}`},response:{statusCode:v.status}}}class S extends Error{static async fromResponse(g){const c=await d(g),u=c.response.statusCode||g.status,y=c.error.name||g.statusText,x=`Request failed with ${u} ${y}`,O=(0,i.Fq)(c.error);return new S({message:x,response:g,data:c,cause:O})}constructor(g){super(g.message),(0,o._)(this,"response",void 0),(0,o._)(this,"body",void 0),(0,o._)(this,"cause",void 0),this.name="ResponseError",this.response=g.response,this.body=g.data,this.cause=g.cause}}},30474:function(G,w,t){"use strict";t.d(w,{V:function(){return o}});function o(d){if(typeof d!="object"||d===null||Array.isArray(d))return!1;const S=d;return!(typeof S.name!="string"||S.name===""||typeof S.message!="string")}function i(d){if(typeof d!="object"||d===null||Array.isArray(d))throw new Error(`Encountered invalid error, not an object, got '${d}'`);const S=d;if(typeof S.name!="string"||S.name==="")throw new Error(`Encountered error object without a name, got '${d}'`);if(typeof S.message!="string")throw new Error(`Encountered error object without a message, got '${d}'`)}},48998:function(G,w,t){"use strict";t.d(w,{Fq:function(){return v},n:function(){return g}});var o=t(24852),i=t.n(o),d=t(30474);function S(c,u){const x={name:"Unknown",message:"<no reason given>",...serializeErrorInternal(c)};return u!=null&&u.includeStack||delete x.stack,x}function v(c){const u=(0,o.deserializeError)(c);return c.stack||(u.stack=void 0),u}function g(c){if((0,d.V)(c)){const u=String(c);return u!=="[object Object]"?u:`${c.name}: ${c.message}`}return`unknown error '${c}'`}},91657:function(G,w,t){"use strict";t.d(w,{a:function(){return $e},q:function(){return Ne}});var o=t(87612),i=t(38264);const d="amazonaws.com";function S(U){const f=U.getOptionalString("endpoint");var D;const W=(D=U.getOptionalBoolean("s3ForcePathStyle"))!==null&&D!==void 0?D:!1;let lt,Ot;if(f){try{const Ut=new URL(f);lt=Ut.host,Ot=Ut.pathname}catch{throw new Error(`invalid awsS3 integration config, endpoint '${f}' is not a valid URL`)}if(Ot!=="/")throw new Error(`invalid awsS3 integration config, endpoints cannot contain path, got '${f}'`)}else lt=d;const Rt=U.getOptionalString("accessKeyId"),ae=U.getOptionalString("secretAccessKey"),ee=U.getOptionalString("roleArn"),Kt=U.getOptionalString("externalId");return{host:lt,endpoint:f,s3ForcePathStyle:W,accessKeyId:Rt,secretAccessKey:ae,roleArn:ee,externalId:Kt}}function v(U){const f=U.map(S);return f.some(D=>D.host===d)||f.push({host:d}),f}class g{get type(){return"awsS3"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(f){return(0,i.FI)(f)}resolveEditUrl(f){return f}constructor(f){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=f}}(0,o._)(g,"factory",({config:U})=>{var f;const D=v((f=U.getOptionalConfigArray("integrations.awsS3"))!==null&&f!==void 0?f:[]);return(0,i.gz)(D.map(W=>new g(W)),W=>W.config.host)});var c=t(88412),u=t(52475),y=t(80956);const x="GB";var O=new WeakMap,m=new WeakMap,A=new WeakMap,h=new WeakMap,M=new WeakMap,R=new WeakMap,P=new WeakMap;class j{static fromRepoUrl(f){const D=new URL(f);let W,lt,Ot;const Rt=D.pathname.split("/").map(ge=>decodeURIComponent(ge));if(Rt[2]==="_git"?(W=Rt[1],lt=Ot=Rt[3]):Rt[3]==="_git"?(W=Rt[1],lt=Rt[2],Ot=Rt[4]):Rt[4]==="_git"&&(W=`${Rt[1]}/${Rt[2]}`,lt=Rt[3],Ot=Rt[5]),!W||!lt||!Ot)throw new Error("Azure URL must point to a git repository");var ae;const ee=(ae=D.searchParams.get("path"))!==null&&ae!==void 0?ae:void 0;let Kt;const Ut=D.searchParams.get("version");if(Ut){if(Ut.slice(0,2)!=="GB")throw new Error("Azure URL version must point to a git branch");Kt=Ut.slice(2)}return new j(D.origin,W,lt,Ot,ee,Kt)}toRepoUrl(){let f;return(0,c._)(this,A)===(0,c._)(this,h)?f=(0,c._)(this,P).call(this,(0,c._)(this,m),"_git",(0,c._)(this,h)):f=(0,c._)(this,P).call(this,(0,c._)(this,m),(0,c._)(this,A),"_git",(0,c._)(this,h)),(0,c._)(this,M)&&f.searchParams.set("path",(0,c._)(this,M)),(0,c._)(this,R)&&f.searchParams.set("version",x+(0,c._)(this,R)),f.toString()}toFileUrl(){if(!(0,c._)(this,M))throw new Error("Azure URL must point to a specific path to be able to download a file");const f=(0,c._)(this,P).call(this,(0,c._)(this,m),(0,c._)(this,A),"_apis","git","repositories",(0,c._)(this,h),"items");return f.searchParams.set("api-version","6.0"),f.searchParams.set("path",(0,c._)(this,M)),(0,c._)(this,R)&&f.searchParams.set("version",(0,c._)(this,R)),f.toString()}toArchiveUrl(){const f=(0,c._)(this,P).call(this,(0,c._)(this,m),(0,c._)(this,A),"_apis","git","repositories",(0,c._)(this,h),"items");return f.searchParams.set("recursionLevel","full"),f.searchParams.set("download","true"),f.searchParams.set("api-version","6.0"),(0,c._)(this,M)&&f.searchParams.set("scopePath",(0,c._)(this,M)),(0,c._)(this,R)&&f.searchParams.set("version",(0,c._)(this,R)),f.toString()}toCommitsUrl(){const f=(0,c._)(this,P).call(this,(0,c._)(this,m),(0,c._)(this,A),"_apis","git","repositories",(0,c._)(this,h),"commits");return f.searchParams.set("api-version","6.0"),(0,c._)(this,R)&&f.searchParams.set("searchCriteria.itemVersion.version",(0,c._)(this,R)),f.toString()}getOwner(){return(0,c._)(this,m)}getProject(){return(0,c._)(this,A)}getRepo(){return(0,c._)(this,h)}getPath(){return(0,c._)(this,M)}getRef(){return(0,c._)(this,R)}constructor(f,D,W,lt,Ot,Rt){(0,u._)(this,O,{writable:!0,value:void 0}),(0,u._)(this,m,{writable:!0,value:void 0}),(0,u._)(this,A,{writable:!0,value:void 0}),(0,u._)(this,h,{writable:!0,value:void 0}),(0,u._)(this,M,{writable:!0,value:void 0}),(0,u._)(this,R,{writable:!0,value:void 0}),(0,u._)(this,P,{writable:!0,value:(...ae)=>{const ee=new URL((0,c._)(this,O));return ee.pathname=ae.map(Kt=>encodeURIComponent(Kt)).join("/"),ee}}),(0,y._)(this,O,f),(0,y._)(this,m,D),(0,y._)(this,A,W),(0,y._)(this,h,lt),(0,y._)(this,M,Ot),(0,y._)(this,R,Rt)}}const I="dev.azure.com",b=["clientId","clientSecret","tenantId","personalAccessToken"],K=new Map([["ClientSecret",["clientId","clientSecret","tenantId"]],["ManagedIdentity",["clientId"]],["PersonalAccessToken",["personalAccessToken"]]]);function H(U){for(const f of K.entries()){const[D,W]=f,lt=b.filter(Ot=>!W.includes(Ot));if(W.every(Ot=>U[Ot]!==void 0)&&lt.every(Ot=>U[Ot]===void 0))return{kind:D,organizations:U.organizations,...W.reduce((Ot,Rt)=>(Ot[Rt]=U[Rt],Ot),{})}}throw new Error("is not a valid credential")}function rt(U){var f,D;const W=(D=U.getOptionalString("host"))!==null&&D!==void 0?D:I;let lt=(f=U.getOptionalConfigArray("credentials"))===null||f===void 0?void 0:f.map(Kt=>({organizations:Kt.getOptionalStringArray("organizations"),personalAccessToken:Kt.getOptionalString("personalAccessToken"),tenantId:Kt.getOptionalString("tenantId"),clientId:Kt.getOptionalString("clientId"),clientSecret:Kt.getOptionalString("clientSecret")}));const Ot=U.getOptionalString("token");if(U.getOptional("credential")!==void 0&&U.getOptional("credentials")!==void 0)throw new Error("Invalid Azure integration config, 'credential' and 'credentials' cannot be used together. Use 'credentials' instead.");if(U.getOptional("token")!==void 0&&U.getOptional("credentials")!==void 0)throw new Error("Invalid Azure integration config, 'token' and 'credentials' cannot be used together. Use 'credentials' instead.");if(Ot!==void 0){const Kt=[{personalAccessToken:Ot}];var Rt;lt=(Rt=lt==null?void 0:lt.concat(Kt))!==null&&Rt!==void 0?Rt:Kt}if(U.getOptional("credential")!==void 0){const Kt=[{organizations:U.getOptionalStringArray("credential.organizations"),token:U.getOptionalString("credential.token"),tenantId:U.getOptionalString("credential.tenantId"),clientId:U.getOptionalString("credential.clientId"),clientSecret:U.getOptionalString("credential.clientSecret")}];var ae;lt=(ae=lt==null?void 0:lt.concat(Kt))!==null&&ae!==void 0?ae:Kt}if(!(0,i.bK)(W))throw new Error(`Invalid Azure integration config, '${W}' is not a valid host`);let ee;if(lt!==void 0){const Kt=lt==null?void 0:lt.reduce((Ut,ge,Me)=>{let kt;try{H(ge)}catch(oe){kt=oe.message}return kt!==void 0&&Ut.push(`credential at position ${Me+1} ${kt}`),Ut},Array.of()).concat(Object.entries(lt.filter(Ut=>Ut.organizations!==void 0&&Ut.organizations.length>0).reduce((Ut,ge,Me)=>{var kt;return(kt=ge.organizations)===null||kt===void 0||kt.forEach(oe=>{Ut[oe]||(Ut[oe]=[]),Ut[oe].push(Me+1)}),Ut},{})).filter(([Ut,ge])=>ge.length>1).reduce((Ut,[ge,Me])=>(Ut.push(`organization ${ge} is specified multiple times in credentials at positions ${Me.slice(0,Me.length-1).join(", ")} and ${Me[Me.length-1]}`),Ut),Array.of()));if((Kt==null?void 0:Kt.length)>0)throw new Error(`Invalid Azure integration config for ${W}: ${Kt.join("; ")}`);if(ee=lt.map(Ut=>H(Ut)),ee.some(Ut=>Ut.kind!=="PersonalAccessToken")&&W!==I)throw new Error(`Invalid Azure integration config for ${W}, only personal access tokens can be used with hosts other than ${I}`);if(ee.filter(Ut=>Ut.organizations===void 0||Ut.organizations.length===0).length>1)throw new Error(`Invalid Azure integration config for ${W}, you cannot specify multiple credentials without organizations`)}return{host:W,credentials:ee}}function X(U){const f=U.map(rt);return f.some(D=>D.host===I)||f.push({host:I}),f}class V{get type(){return"azure"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(f){const{url:D,base:W}=f;if((0,i.jv)(D))return D;try{const Ot=j.fromRepoUrl(W),Rt=new URL(W);var lt;const ae=new URL(`https://a.com${(lt=Ot.getPath())!==null&&lt!==void 0?lt:""}`),ee=new URL(D,ae).pathname;return Rt.searchParams.set("path",ee),f.lineNumber&&(Rt.searchParams.set("line",String(f.lineNumber)),Rt.searchParams.set("lineEnd",String(f.lineNumber+1)),Rt.searchParams.set("lineStartColumn","1"),Rt.searchParams.set("lineEndColumn","1")),Rt.toString()}catch{return new URL(D,W).toString()}}resolveEditUrl(f){return f}constructor(f){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=f}}(0,o._)(V,"factory",({config:U})=>{var f;const D=X((f=U.getOptionalConfigArray("integrations.azure"))!==null&&f!==void 0?f:[]);return(0,i.gz)(D.map(W=>new V(W)),W=>W.config.host)});var z=t(82717),et=t.n(z);const it="bitbucket.org",ft="https://api.bitbucket.org/2.0";function bt(U){const f=it,D=ft,W=U.getString("username"),lt=U.getString("appPassword");return{host:f,apiBaseUrl:D,username:W,appPassword:lt}}function St(U){const f=U.map(bt);return f.length===0&&f.push({host:it,apiBaseUrl:ft}),f}class Tt{get type(){return"bitbucketCloud"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(f){const D=(0,i.FI)(f);if(f.lineNumber){const W=new URL(D);return W.hash=`lines-${f.lineNumber}`,W.toString()}return D}resolveEditUrl(f){const D=et()(f),W=new URL(f);return W.searchParams.set("mode","edit"),W.searchParams.set("at",D.ref),W.toString()}constructor(f){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=f}}(0,o._)(Tt,"factory",({config:U})=>{var f;const D=St((f=U.getOptionalConfigArray("integrations.bitbucketCloud"))!==null&&f!==void 0?f:[]);return(0,i.gz)(D.map(W=>new Tt(W)),W=>W.config.host)});var pt=t(76635);const xt="bitbucket.org",Y="https://api.bitbucket.org/2.0";function F(U){var f;const D=(f=U.getOptionalString("host"))!==null&&f!==void 0?f:xt;let W=U.getOptionalString("apiBaseUrl");const lt=U.getOptionalString("token"),Ot=U.getOptionalString("username"),Rt=U.getOptionalString("appPassword");if(!(0,i.bK)(D))throw new Error(`Invalid Bitbucket integration config, '${D}' is not a valid host`);return W?W=(0,pt.trimEnd)(W,"/"):D===xt?W=Y:W=`https://${D}/rest/api/1.0`,{host:D,apiBaseUrl:W,token:lt,username:Ot,appPassword:Rt}}function Q(U){const f=U.map(F);return f.some(D=>D.host===xt)||f.push({host:xt,apiBaseUrl:Y}),f}class ct{get type(){return"bitbucket"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(f){const D=(0,i.FI)(f);if(!f.lineNumber)return D;const W=new URL(D);return this.integrationConfig.host==="bitbucket.org"?W.hash=`lines-${f.lineNumber}`:W.hash=`${f.lineNumber}`,W.toString()}resolveEditUrl(f){const D=et()(f),W=new URL(f);return W.searchParams.set("mode","edit"),W.searchParams.set("spa","0"),W.searchParams.set("at",D.ref),W.toString()}constructor(f){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=f}}(0,o._)(ct,"factory",({config:U})=>{var f,D,W;const lt=Q((W=U.getOptionalConfigArray("integrations.bitbucket"))!==null&&W!==void 0?W:[...(f=U.getOptionalConfigArray("integrations.bitbucketCloud"))!==null&&f!==void 0?f:[],...(D=U.getOptionalConfigArray("integrations.bitbucketServer"))!==null&&D!==void 0?D:[]]);return(0,i.gz)(lt.map(Ot=>new ct(Ot)),Ot=>Ot.config.host)});function vt(U){const f=U.getString("host");let D=U.getOptionalString("apiBaseUrl");const W=U.getOptionalString("token"),lt=U.getOptionalString("username"),Ot=U.getOptionalString("password");if(!(0,i.bK)(f))throw new Error(`Invalid Bitbucket Server integration config, '${f}' is not a valid host`);return D?D=(0,pt.trimEnd)(D,"/"):D=`https://${f}/rest/api/1.0`,{host:f,apiBaseUrl:D,token:W,username:lt,password:Ot}}function gt(U){return U.map(vt)}class st{get type(){return"bitbucketServer"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(f){const D=(0,i.FI)(f);if(f.lineNumber){const W=new URL(D);return W.hash=f.lineNumber.toString(),W.toString()}return D}resolveEditUrl(f){return f.includes("?")?f.substring(0,f.indexOf("?")):f}constructor(f){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=f}}(0,o._)(st,"factory",({config:U})=>{var f;const D=gt((f=U.getOptionalConfigArray("integrations.bitbucketServer"))!==null&&f!==void 0?f:[]);return(0,i.gz)(D.map(W=>new st(W)),W=>W.config.host)});function q(U){const f=U.getString("host");let D=U.getOptionalString("baseUrl"),W=U.getOptionalString("cloneUrl"),lt=U.getOptionalString("gitilesBaseUrl");const Ot=U.getOptionalString("username"),Rt=U.getOptionalString("password");if((0,i.bK)(f)){if(D&&!(0,i.jv)(D))throw new Error(`Invalid Gerrit integration config, '${D}' is not a valid baseUrl`);if(W&&!(0,i.jv)(W))throw new Error(`Invalid Gerrit integration config, '${W}' is not a valid cloneUrl`);if(lt&&!(0,i.jv)(lt))throw new Error(`Invalid Gerrit integration config, '${lt}' is not a valid gitilesBaseUrl`)}else throw new Error(`Invalid Gerrit integration config, '${f}' is not a valid host`);return D?D=(0,pt.trimEnd)(D,"/"):D=`https://${f}`,lt?lt=(0,pt.trimEnd)(lt,"/"):lt=`https://${f}`,W?W=(0,pt.trimEnd)(W,"/"):W=D,{host:f,baseUrl:D,cloneUrl:W,gitilesBaseUrl:lt,username:Ot,password:Rt}}function ut(U){return U.map(q)}var k=t(48834).lW;const Z=")]}'";function tt(U,f){const D=new URL(U.gitilesBaseUrl),W=new URL(f),Ot=W.pathname.substring(W.pathname.startsWith("/a/")?2:0).replace(D.pathname,"").split("/").filter(ge=>!!ge),Rt=Ot.indexOf("+");if(Rt<=0)throw new Error(`Unable to parse project from url: ${f}`);const ae=(0,pt.trimStart)(Ot.slice(0,Rt).join("/"),"/"),ee=Ot.indexOf("heads");if(ee<=0)throw new Error(`Unable to parse branch from url: ${f}`);const Kt=Ot[ee+1],Ut=Ot.slice(ee+2).join("/");return{branch:Kt,filePath:Ut===""?"/":Ut,project:ae}}function nt(U,f,D,W){return`${U.gitilesBaseUrl}/${f}/+/refs/heads/${D}/${(0,pt.trimStart)(W,"/")}`}function mt(U,f,D,W){const lt=W==="/"||W===""?".tar.gz":`/${W}.tar.gz`;return`${Bt(U)}/${f}/+archive/refs/heads/${D}${lt}`}function yt(U){return U.password?"/a/":"/"}function Bt(U){if(!U.baseUrl||!U.gitilesBaseUrl)throw new Error("Unexpected Gerrit config values. baseUrl or gitilesBaseUrl not set.");if(U.gitilesBaseUrl.startsWith(U.baseUrl))return U.gitilesBaseUrl.replace(U.baseUrl.concat("/"),U.baseUrl.concat(yt(U)));if(U.password)throw new Error("Since the baseUrl (Gerrit) is not part of the gitilesBaseUrl, an authentication URL could not be constructed.");return U.gitilesBaseUrl}function zt(U,f){const{branch:D,project:W}=tt(U,f);return`${U.baseUrl}${yt(U)}projects/${encodeURIComponent(W)}/branches/${D}`}function Ft(U,f){const{project:D}=tt(U,f);return`${U.cloneUrl}${yt(U)}${D}`}function Nt(U,f){const{branch:D,filePath:W,project:lt}=tt(U,f);return`${U.baseUrl}${yt(U)}projects/${encodeURIComponent(lt)}/branches/${D}/files/${encodeURIComponent(W)}/content`}function Lt(U){return`${U.baseUrl}${yt(U)}projects/`}function Yt(U){const f={};if(!U.password)return f;const D=k.from(`${U.username}:${U.password}`,"utf8");return f.Authorization=`Basic ${D.toString("base64")}`,{headers:f}}async function Te(U){const f=await U.text();if(f.startsWith(Z))try{return JSON.parse(f.slice(Z.length))}catch(D){throw new Error(`Invalid response from Gerrit: ${f.slice(0,10)} - ${D}`)}throw new Error(`Gerrit JSON body prefix missing. Found: ${f.slice(0,10)}`)}class pe{get type(){return"gerrit"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(f){const{url:D,base:W,lineNumber:lt}=f;let Ot;if(D.startsWith("/")){const{branch:Rt,project:ae}=tt(this.config,W);return nt(this.config,ae,Rt,D)}return D?Ot=new URL(D,W):Ot=new URL(W),lt&&(Ot.hash=lt.toString()),Ot.toString()}resolveEditUrl(f){return f}constructor(f){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=f}}(0,o._)(pe,"factory",({config:U})=>{var f;const D=ut((f=U.getOptionalConfigArray("integrations.gerrit"))!==null&&f!==void 0?f:[]);return(0,i.gz)(D.map(W=>new pe(W)),W=>W.config.host)});var le=t(61800);const _t="gitlab.com",jt="https://gitlab.com/api/v4";function Vt(U){const f=U.getString("host");let D=U.getOptionalString("apiBaseUrl");const W=U.getOptionalString("token");let lt=U.getOptionalString("baseUrl");if(D?D=(0,pt.trimEnd)(D,"/"):f===_t&&(D=jt),lt?lt=(0,pt.trimEnd)(lt,"/"):lt=`https://${f}`,(0,i.bK)(f)){if(!D||!(0,i.jv)(D))throw new Error(`Invalid GitLab integration config, '${D}' is not a valid apiBaseUrl`);if(!(0,i.jv)(lt))throw new Error(`Invalid GitLab integration config, '${lt}' is not a valid baseUrl`)}else throw new Error(`Invalid GitLab integration config, '${f}' is not a valid host`);return{host:f,token:W,apiBaseUrl:D,baseUrl:lt}}function Se(U){const f=U.map(Vt);return f.some(D=>D.host===_t)||f.push({host:_t,apiBaseUrl:jt,baseUrl:`https://${_t}`}),f}function ke(U){let f="";return U.host!==_t&&(f=new URL(U.baseUrl).pathname),trimEnd(f,"/")}class xe{get type(){return"gitlab"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(f){return(0,i.FI)(f)}resolveEditUrl(f){return qe(f,"edit")}constructor(f){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=f}}(0,o._)(xe,"factory",({config:U})=>{var f;const D=Se((f=U.getOptionalConfigArray("integrations.gitlab"))!==null&&f!==void 0?f:[]);return(0,i.gz)(D.map(W=>new xe(W)),W=>W.config.host)});function qe(U,f){return U.replace(/\/\-\/(blob|tree|edit)\//,`/-/${f}/`)}function Ve(U){const f=U.getString("host");let D=U.getOptionalString("baseUrl");const W=U.getOptionalString("username"),lt=U.getOptionalString("password");if(!(0,i.bK)(f))throw new Error(`Invalid Gitea integration config, '${f}' is not a valid host`);return D?D=(0,pt.trimEnd)(D,"/"):D=`https://${f}`,{host:f,baseUrl:D,username:W,password:lt}}var Ye=t(48834).lW;function se(U,f){const D=ie(U,f);return`${D.url}/${D.owner}/${D.name}/_edit/${D.ref}/${D.path}`}function sn(U,f){const D=ie(U,f);return`${D.url}/api/v1/repos/${D.owner}/${D.name}/contents/${D.path}?ref=${D.ref}`}function Re(U,f){const D=ie(U,f);return`${D.url}/api/v1/repos/${D.owner}/${D.name}/archive/${D.ref}.tar.gz`}function tn(U,f){const D=ie(U,f);return`${D.url}/api/v1/repos/${D.owner}/${D.name}/git/commits/${D.ref}`}function an(U){const f={},{username:D,password:W}=U;return W?(D?f.Authorization=`basic ${Ye.from(`${D}:${W}`).toString("base64")}`:f.Authorization=`token ${W}`,{headers:f}):f}function ie(U,f){var D;const W=(D=U.baseUrl)!==null&&D!==void 0?D:`https://${U.host}`;try{const[lt,Ot,Rt,ae,ee,Kt,...Ut]=f.replace(W,"").split("/"),ge=Ut.join("/").replace(/^\//,"");return{url:W,owner:Ot,name:Rt,ref:Kt,path:ge}}catch(lt){throw new Error(`Incorrect URL: ${f}, ${lt}`)}}class Ze{get type(){return"gitea"}get title(){return this.config.host}resolveUrl(f){return(0,i.FI)(f)}resolveEditUrl(f){return se(this.config,f)}constructor(f){(0,o._)(this,"config",void 0),this.config=f}}(0,o._)(Ze,"factory",({config:U})=>{var f;const W=((f=U.getOptionalConfigArray("integrations.gitea"))!==null&&f!==void 0?f:[]).map(lt=>Ve(lt));return(0,i.gz)(W.map(lt=>new Ze(lt)),lt=>lt.config.host)});class ze{static fromConfig(f){return new ze({awsS3:g.factory({config:f}),azure:V.factory({config:f}),bitbucket:ct.factory({config:f}),bitbucketCloud:Tt.factory({config:f}),bitbucketServer:st.factory({config:f}),gerrit:pe.factory({config:f}),github:le.X.factory({config:f}),gitlab:xe.factory({config:f}),gitea:Ze.factory({config:f})})}get awsS3(){return this.byType.awsS3}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}list(){return Object.values(this.byType).flatMap(f=>f.list())}byUrl(f){let D=Object.values(this.byType).map(W=>W.byUrl(f)).filter(Boolean);if(D.length>1){const W=D.filter(lt=>!(lt instanceof ct));W.length!==0&&(D=W)}return D[0]}byHost(f){return Object.values(this.byType).map(D=>D.byHost(f)).find(Boolean)}resolveUrl(f){const D=this.byUrl(f.base);return D?D.resolveUrl(f):(0,i.FI)(f)}resolveEditUrl(f){const D=this.byUrl(f);return D?D.resolveEditUrl(f):f}constructor(f){(0,o._)(this,"byType",void 0),this.byType=f}}var be=t(95965);class $e{static fromConfig(f){return ze.fromConfig(f)}}const Ne=(0,be.T)({id:"integration.scmintegrations"})},61800:function(G,w,t){"use strict";t.d(w,{X:function(){return y},B:function(){return x}});var o=t(87612),i=t(38264),d=t(76635);const S="github.com",v="https://api.github.com",g="https://raw.githubusercontent.com";function c(O){var m,A;const h=(A=O.getOptionalString("host"))!==null&&A!==void 0?A:S;let M=O.getOptionalString("apiBaseUrl"),R=O.getOptionalString("rawBaseUrl");const P=O.getOptionalString("token"),j=(m=O.getOptionalConfigArray("apps"))===null||m===void 0?void 0:m.map(I=>({appId:I.getNumber("appId"),clientId:I.getString("clientId"),clientSecret:I.getString("clientSecret"),webhookSecret:I.getString("webhookSecret"),privateKey:I.getString("privateKey"),allowedInstallationOwners:I.getOptionalStringArray("allowedInstallationOwners")}));if(!(0,i.bK)(h))throw new Error(`Invalid GitHub integration config, '${h}' is not a valid host`);return M?M=(0,d.trimEnd)(M,"/"):h===S&&(M=v),R?R=(0,d.trimEnd)(R,"/"):h===S&&(R=g),{host:h,apiBaseUrl:M,rawBaseUrl:R,token:P,apps:j}}function u(O){const m=O.map(c);return m.some(A=>A.host===S)||m.push({host:S,apiBaseUrl:v,rawBaseUrl:g}),m}class y{get type(){return"github"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(m){return x((0,i.FI)(m),"tree")}resolveEditUrl(m){return x(m,"edit")}constructor(m){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=m}}(0,o._)(y,"factory",({config:O})=>{var m;const A=u((m=O.getOptionalConfigArray("integrations.github"))!==null&&m!==void 0?m:[]);return(0,i.gz)(A.map(h=>new y(h)),h=>h.config.host)});function x(O,m){return O.replace(/\/\/([^/]+)\/([^/]+)\/([^/]+)\/(blob|tree|edit)\//,(A,h,M,R)=>`//${h}/${M}/${R}/${m}/`)}},38264:function(G,w,t){"use strict";t.d(w,{FI:function(){return u},bK:function(){return v},gz:function(){return c},jv:function(){return g}});var o=t(82717),i=t.n(o),d=t(76635),S=t.n(d);function v(x){const O=new URL("http://example.com");return O.host=x,O.host===x}function g(x){try{return new URL(x),!0}catch{return!1}}function c(x,O){return{list(){return x},byUrl(m){try{const A=typeof m=="string"?new URL(m):m;return x.find(h=>O(h)===A.host)}catch{return}},byHost(m){return x.find(A=>O(A)===m)}}}function u(x){const{url:O,base:m,lineNumber:A}=x;try{return new URL(O),O}catch{}let h;if(O.startsWith("/")){const{filepath:M}=i()(m);h=new URL(m);const R=(0,d.trimEnd)(h.pathname.substring(0,h.pathname.length-M.length),"/");h.pathname=`${R}${O}`}else h=new URL(O,m);return h.search=new URL(m).search,A&&(h.hash=`L${A}`),h.toString()}function y(x){beforeAll(()=>x.listen({onUnhandledRequest:"error"})),afterAll(()=>x.close()),afterEach(()=>x.resetHandlers())}},51280:function(G,w,t){"use strict";var o={};t.r(o),t.d(o,{TechDocsPlugin:function(){return g.s4}});var i=t(52322),d=t(2784),S=t(17029),v=t(73557),g=t(4577),c=t(29895),u=t(2296),y=t(57058),x=t(77277),O=t(87435),m=t(74359),A=t(55015),h=t(71597);function M({children:r}){return(0,v.GV)()?(0,i.jsx)(i.Fragment,{children:r}):(0,i.jsx)(v.VA,{children:r})}const R=()=>(0,i.jsx)(O.m,{status:"404",statusMessage:"PAGE NOT FOUND"}),P=({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,i.jsx)(M,{children:(0,i.jsx)(O.m,{status:"501",statusMessage:n})})},j=({error:r,resetError:e,plugin:n})=>(0,i.jsx)(m.y,{title:`Error in ${n==null?void 0:n.getId()}`,defaultExpanded:!0,error:r,children:(0,i.jsx)(x.Z,{variant:"outlined",onClick:e,children:"Retry"})}),I={Progress:A.E,Router:h.VK,NotFoundErrorPage:R,BootErrorPage:P,ErrorBoundaryFallback:j};var b=t(87612);const K="Invalid discovery URL pattern,";class H{static compile(e){const n=e.split(/\{\{\s*pluginId\s*\}\}/),s=n.join("pluginId");let a;try{a=new URL(s)}catch{throw new Error(`${K} URL '${s}' is invalid`)}if(a.hash)throw new Error(`${K} URL must not have a hash`);if(a.search)throw new Error(`${K} URL must not have a query`);if(s.endsWith("/"))throw new Error(`${K} URL must not end with a slash`);return new H(n)}async getBaseUrl(e){return this.parts.join(encodeURIComponent(e))}constructor(e){(0,b._)(this,"parts",void 0),this.parts=e}}var rt=t(82394),X=t.n(rt);let V=Symbol.observable;class z{[V](){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,s){const a=typeof e=="function"?{next:e,error:n,complete:s}:e;return this.observable.subscribe(a)}constructor(){(0,b._)(this,"isClosed",!1),(0,b._)(this,"terminatingError",void 0),(0,b._)(this,"observable",new(X())(e=>this.isClosed?(this.terminatingError?e.error(this.terminatingError):e.complete(),()=>{}):(this.subscribers.add(e),()=>{this.subscribers.delete(e)}))),(0,b._)(this,"subscribers",new Set)}}let et=Symbol.observable;class it{[et](){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,s){const a=typeof e=="function"?{next:e,error:n,complete:s}:e;return this.observable.subscribe(a)}constructor(e){(0,b._)(this,"isClosed",void 0),(0,b._)(this,"currentValue",void 0),(0,b._)(this,"terminatingError",void 0),(0,b._)(this,"observable",void 0),(0,b._)(this,"subscribers",new Set),this.isClosed=!1,this.currentValue=e,this.terminatingError=void 0,this.observable=new(X())(n=>this.isClosed?(this.terminatingError?n.error(this.terminatingError):n.complete(),()=>{}):(n.next(this.currentValue),this.subscribers.add(n),()=>{this.subscribers.delete(n)}))}}class ft{post(e){this.subject.next(e)}alert$(){return this.subject}constructor(){(0,b._)(this,"subject",new z)}}class bt{captureEvent(e){}}class St{post(e,n){return n!=null&&n.hidden||this.alertApi.post({message:e.message,severity:"error"}),this.errorApi.post(e,n)}error$(){return this.errorApi.error$()}constructor(e,n){(0,b._)(this,"alertApi",void 0),(0,b._)(this,"errorApi",void 0),this.alertApi=e,this.errorApi=n}}class Tt{post(e,n){this.subject.next({error:e,context:n})}error$(){return this.subject}constructor(){(0,b._)(this,"subject",new z)}}class pt{static forward(e,n){window.addEventListener("unhandledrejection",s=>{e.post(s.reason,n)})}}const xt=new Map;class Y{static create(e){var n;return new Y((n=e.namespace)!==null&&n!==void 0?n:"",e.errorApi)}static addStorageEventListener(){window.addEventListener("storage",e=>{for(const[s,a]of xt.entries()){var n;!((n=e.key)===null||n===void 0)&&n.startsWith(s)&&a.handleStorageChange(e.key)}})}get(e){return this.snapshot(e).value}snapshot(e){let n,s="absent";try{const a=localStorage.getItem(this.getKeyName(e));a&&(n=JSON.parse(a,(l,C)=>(typeof C=="object"&&C!==null&&Object.freeze(C),C)),s="present")}catch{this.errorApi.post(new Error(`Error when parsing JSON config from storage for: ${e}`))}return{key:e,value:n,presence:s}}forBucket(e){const n=`${this.namespace}/${e}`;return xt.has(n)||xt.set(n,new Y(n,this.errorApi)),xt.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 Y.hasSubscribed||(Y.addStorageEventListener(),Y.hasSubscribed=!0),this.observable.filter(({key:n})=>n===e)}handleStorageChange(e){if(!(e!=null&&e.startsWith(this.namespace)))return;const n=e==null?void 0: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 s of this.subscribers)s.next(n)}constructor(e,n){(0,b._)(this,"namespace",void 0),(0,b._)(this,"errorApi",void 0),(0,b._)(this,"subscribers",void 0),(0,b._)(this,"observable",void 0),this.namespace=e,this.errorApi=n,this.subscribers=new Set,this.observable=new(X())(s=>(this.subscribers.add(s),()=>{this.subscribers.delete(s)}))}}(0,b._)(Y,"hasSubscribed",!1);function F(r){let e=r.baseImplementation||t.g.fetch;var n;const s=[(n=r.middleware)!==null&&n!==void 0?n:[]].flat().reverse();for(const a of s)e=a.apply(e);return{fetch:e}}class Q{static create(e){var n,s;const a=ct(e),l=((n=e.header)===null||n===void 0?void 0:n.name)||"authorization",C=((s=e.header)===null||s===void 0?void 0:s.value)||(E=>`Bearer ${E}`);return new Q(e.identityApi,a,l,C)}apply(e){return async(n,s)=>{const a=new Request(n,s),{token:l}=await this.identityApi.getCredentials();return a.headers.get(this.headerName)||typeof l!="string"||!l||!this.allowUrl(a.url)?e(n,s):(a.headers.set(this.headerName,this.headerValue(l)),e(a))}}constructor(e,n,s,a){(0,b._)(this,"identityApi",void 0),(0,b._)(this,"allowUrl",void 0),(0,b._)(this,"headerName",void 0),(0,b._)(this,"headerValue",void 0),this.identityApi=e,this.allowUrl=n,this.headerName=s,this.headerValue=a}}function ct(r){return r.allowUrl?r.allowUrl:r.urlPrefixAllowlist?vt(r.urlPrefixAllowlist):r.config?vt([r.config.getString("backend.baseUrl")]):()=>!1}function vt(r){const e=r.map(n=>n.replace(/\/$/,""));return n=>e.some(s=>n===s||n.startsWith(`${s}/`))}function gt(r,e){return!e||e==="/"?r:`${r.replace(/\/$/,"")}/${e.replace(/^\//,"")}`}class st{apply(e){return async(n,s)=>{const a=new Request(n,s),l="plugin://";if(!a.url.startsWith(l))return e(n,s);const{hostname:C,pathname:E,search:L,hash:N,username:J,password:at}=new URL(`http://${a.url.substring(l.length)}`);let ht=await this.discoveryApi.getBaseUrl(C);if(J||at){const At=new URL(ht),Zt=`${J}${at?`:${at}`:""}@`;ht=`${At.protocol}//${Zt}${At.host}${At.pathname}`}const Et=`${gt(ht,E)}${L}${N}`;return e(Et,typeof n=="string"||q(n)?s:n)}}constructor(e){(0,b._)(this,"discoveryApi",void 0),this.discoveryApi=e}}function q(r){return typeof r=="object"&&(r==null?void 0:r.constructor)===URL}class ut{static resolvePluginProtocol(e){return new st(e.discoveryApi)}static injectIdentityAuth(e){return Q.create(e)}constructor(){}}function k(r,e){for(const n of e)if(!r.has(n))return!1;return!0}function Z(r,...e){const n=new Set(r);for(const s of e)for(const a of s)n.add(a);return n}class tt{request(e){return new Promise((n,s)=>{this.requests.push({scopes:e,resolve:n,reject:s}),this.subject.next(this.getCurrentPending())})}resolve(e,n){this.requests=this.requests.filter(s=>k(e,s.scopes)?(s.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,s)=>Z(n,s.scopes),this.requests[0].scopes);return{scopes:e,resolve:n=>{e&&this.resolve(e,n)},reject:n=>{e&&this.reject(n)}}}constructor(){(0,b._)(this,"requests",[]),(0,b._)(this,"subject",new it(this.getCurrentPending()))}}class nt{createAuthRequester(e){const n=new tt,s=this.handlerCount;return this.handlerCount++,n.pending().subscribe({next:a=>{const l=this.currentRequests.slice(),C=this.makeAuthRequest(a,e);C?l[s]=C:delete l[s],this.currentRequests=l,this.subject.next(l.filter(Boolean))}}),a=>n.request(a)}makeAuthRequest(e,n){const{scopes:s}=e;if(s)return{provider:n.provider,trigger:async()=>{const a=await n.onAuthRequest(s);e.resolve(a)},reject:()=>{const a=new Error("Login failed, rejected by user");a.name="RejectedError",e.reject(a)}}}authRequest$(){return this.subject}constructor(){(0,b._)(this,"subject",new it([])),(0,b._)(this,"currentRequests",[]),(0,b._)(this,"handlerCount",0)}}function mt(r){return new Promise((e,n)=>{const s=r.width||500,a=r.height||700,l=window.screen.width/2-s/2,C=window.screen.height/2-a/2,E=window.open(r.url,r.name,`menubar=no,location=no,resizable=no,scrollbars=no,status=no,width=${s},height=${a},top=${C},left=${l}`);let L="";if(!E||typeof E.closed=="undefined"||E.closed){const ht=new Error("Failed to open auth popup.");ht.name="PopupRejectedError",n(ht);return}const N=ht=>{if(ht.source!==E||ht.origin!==r.origin)return;const{data:Et}=ht;if(Et.type==="config_info"){L=Et.targetOrigin;return}if(Et.type!=="authorization_response")return;const At=Et;if("error"in At){const Zt=new Error(At.error.message);Zt.name=At.error.name,n(Zt)}else e(At.response);at()},J=setInterval(()=>{if(E.closed){const ht=`Login failed, ${L&&L!==window.location.origin?`Incorrect app origin, expected ${L}`:"popup was closed"}`,Et=new Error(ht);Et.name="PopupClosedError",n(Et),at()}},100);function at(){window.removeEventListener("message",N),clearInterval(J)}window.addEventListener("message",N)})}let yt=!1;function Bt(r){return[...r].join(" ")}class zt{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)}}),{headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(a=>{throw new Error(`Auth refresh request failed, ${a}`)});if(!n.ok){const a=new Error(`Auth refresh request failed, ${n.statusText}`);throw a.status=n.status,a}const s=await n.json();if(s.error){const a=new Error(s.error.message);throw s.error.name&&(a.name=s.error.name),a}return await this.sessionTransform(s)}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){var n,s,a,l,C,E,L,N;const J=this.joinScopesFunc(e),at=await this.buildUrl("/start",{scope:J,origin:window.location.origin,flow:"popup"}),ht=!((s=this.popupOptions)===null||s===void 0||(n=s.size)===null||n===void 0)&&n.fullscreen?window.screen.width:((l=this.popupOptions)===null||l===void 0||(a=l.size)===null||a===void 0?void 0:a.width)||450,Et=!((E=this.popupOptions)===null||E===void 0||(C=E.size)===null||C===void 0)&&C.fullscreen?window.screen.height:((N=this.popupOptions)===null||N===void 0||(L=N.size)===null||L===void 0?void 0:L.height)||730,At=await mt({url:at,name:`${this.provider.title} Login`,origin:new URL(at).origin,width:ht,height:Et});return await this.sessionTransform(At)}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 s=await this.discoveryApi.getBaseUrl("auth"),a=this.buildQueryString({...n,env:this.environment});return`${s}/${this.provider.id}${e}${a}`}buildQueryString(e){if(!e)return"";const n=Object.entries(e).map(([s,a])=>{if(typeof a=="string")return`${encodeURIComponent(s)}=${encodeURIComponent(a)}`;if(a)return encodeURIComponent(s)}).filter(Boolean).join("&");return n?`?${n}`:""}constructor(e){(0,b._)(this,"discoveryApi",void 0),(0,b._)(this,"environment",void 0),(0,b._)(this,"provider",void 0),(0,b._)(this,"joinScopesFunc",void 0),(0,b._)(this,"authRequester",void 0),(0,b._)(this,"sessionTransform",void 0),(0,b._)(this,"enableExperimentalRedirectFlow",void 0),(0,b._)(this,"popupOptions",void 0);const{configApi:n,discoveryApi:s,environment:a,provider:l,joinScopes:C=Bt,oauthRequestApi:E,sessionTransform:L=at=>at,popupOptions:N}=e;!yt&&!n&&(console.warn("DEPRECATION WARNING: Authentication providers require a configApi instance to configure the authentication flow. Please provide one to the authentication provider constructor."),yt=!0);var J;this.enableExperimentalRedirectFlow=n&&(J=n.getOptionalBoolean("enableExperimentalRedirectFlow"))!==null&&J!==void 0?J:!1,this.authRequester=E.createAuthRequester({provider:l,onAuthRequest:async at=>this.enableExperimentalRedirectFlow?this.executeRedirect(at):this.showPopup(at)}),this.discoveryApi=s,this.environment=a,this.provider=l,this.joinScopesFunc=C,this.sessionTransform=L,this.popupOptions=N}}function Ft(r,e){for(const n of e)if(!r.has(n))return!1;return!0}class Nt{sessionExistsAndHasScope(e,n){if(!e)return!1;if(!n||this.options.sessionScopes===void 0)return!0;const s=this.options.sessionScopes(e);return Ft(s,n)}getExtendedScope(e,n){const s=new Set(this.options.defaultScopes);if(e&&this.options.sessionScopes!==void 0){const a=this.options.sessionScopes(e);for(const l of a)s.add(l)}if(n)for(const a of n)s.add(a);return s}constructor(e){(0,b._)(this,"options",void 0),this.options=e}}var Lt=t(95965),Yt;(function(r){r.SignedIn="SignedIn",r.SignedOut="SignedOut"})(Yt||(Yt={}));const Te=(0,Lt.T)({id:"core.auth.google"}),pe=(0,Lt.T)({id:"core.auth.github"}),le=(0,Lt.T)({id:"core.auth.okta"}),_t=(0,Lt.T)({id:"core.auth.gitlab"}),jt=(0,Lt.T)({id:"core.auth.microsoft"}),Vt=(0,Lt.T)({id:"core.auth.onelogin"}),Se=(0,Lt.T)({id:"core.auth.bitbucket"}),ke=(0,Lt.T)({id:"core.auth.bitbucket-server"}),xe=(0,Lt.T)({id:"core.auth.atlassian"});class qe{setIsSignedIn(e){this.signedIn!==e&&(this.signedIn=e,this.subject.next(this.signedIn?Yt.SignedIn:Yt.SignedOut))}sessionState$(){return this.subject}constructor(){(0,b._)(this,"subject",new it(Yt.SignedOut)),(0,b._)(this,"signedIn",!1)}}class Ve{async getSession(e){if(this.helper.sessionExistsAndHasScope(this.currentSession,e.scopes)){if(!this.sessionShouldRefreshFunc(this.currentSession))return this.currentSession;try{const s=await this.collapsedSessionRefresh(e.scopes),a=this.sessionScopesFunc(this.currentSession),l=this.sessionScopesFunc(s);return Ft(l,a)&&(this.currentSession=s),s}catch(s){if(e.optional)return;throw s}}if(!this.currentSession&&!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(this.helper.getExtendedScope(this.currentSession,e));try{const n=await this.refreshPromise;return this.stateTracker.setIsSignedIn(!0),n}finally{delete this.refreshPromise}}constructor(e){(0,b._)(this,"connector",void 0),(0,b._)(this,"helper",void 0),(0,b._)(this,"sessionScopesFunc",void 0),(0,b._)(this,"sessionShouldRefreshFunc",void 0),(0,b._)(this,"stateTracker",new qe),(0,b._)(this,"refreshPromise",void 0),(0,b._)(this,"currentSession",void 0);const{connector:n,defaultScopes:s=new Set,sessionScopes:a,sessionShouldRefresh:l}=e;this.connector=n,this.sessionScopesFunc=a,this.sessionShouldRefreshFunc=l,this.helper=new Nt({sessionScopes:a,defaultScopes:s})}}const Ye={id:"oauth2",title:"Your Identity Provider",icon:()=>null};class se{static create(e){const{configApi:n,discoveryApi:s,environment:a="development",provider:l=Ye,oauthRequestApi:C,defaultScopes:E=[],scopeTransform:L=ht=>ht,popupOptions:N}=e,J=new zt({configApi:n,discoveryApi:s,environment:a,provider:l,oauthRequestApi:C,sessionTransform({backstageIdentity:ht,...Et}){const At={...Et,providerInfo:{idToken:Et.providerInfo.idToken,accessToken:Et.providerInfo.accessToken,scopes:se.normalizeScopes(L,Et.providerInfo.scope),expiresAt:Et.providerInfo.expiresInSeconds?new Date(Date.now()+Et.providerInfo.expiresInSeconds*1e3):void 0}};if(ht){var Zt;const Gt=(Zt=ht.expiresInSeconds)!==null&&Zt!==void 0?Zt:Et.providerInfo.expiresInSeconds;At.backstageIdentity={token:ht.token,identity:ht.identity,expiresAt:Gt?new Date(Date.now()+Gt*1e3):void 0}}return At},popupOptions:N}),at=new Ve({connector:J,defaultScopes:new Set(E),sessionScopes:ht=>ht.providerInfo.scopes,sessionShouldRefresh:ht=>{var Et,At;let Zt=1/0;return!((Et=ht.providerInfo)===null||Et===void 0)&&Et.expiresAt&&(Zt=Math.min(Zt,(ht.providerInfo.expiresAt.getTime()-Date.now())/1e3)),!((At=ht.backstageIdentity)===null||At===void 0)&&At.expiresAt&&(Zt=Math.min(Zt,(ht.backstageIdentity.expiresAt.getTime()-Date.now())/1e3)),Zt<60*5}});return new se({sessionManager:at,scopeTransform:L})}async signIn(){await this.getAccessToken()}async signOut(){await this.sessionManager.removeSession()}sessionState$(){return this.sessionManager.sessionState$()}async getAccessToken(e,n){const s=se.normalizeScopes(this.scopeTransform,e),a=await this.sessionManager.getSession({...n,scopes:s});var l;return(l=a==null?void 0:a.providerInfo.accessToken)!==null&&l!==void 0?l:""}async getIdToken(e={}){const n=await this.sessionManager.getSession({...e,scopes:new Set(["openid"])});var s;return(s=n==null?void 0:n.providerInfo.idToken)!==null&&s!==void 0?s:""}async getBackstageIdentity(e={}){const n=await this.sessionManager.getSession(e);return n==null?void 0:n.backstageIdentity}async getProfile(e={}){const n=await this.sessionManager.getSession(e);return n==null?void 0:n.profile}static normalizeScopes(e,n){if(!n)return new Set;const s=Array.isArray(n)?n:n.split(/[\s|,]/).filter(Boolean);return new Set(e(s))}constructor(e){(0,b._)(this,"sessionManager",void 0),(0,b._)(this,"scopeTransform",void 0),this.sessionManager=e.sessionManager,this.scopeTransform=e.scopeTransform}}const sn={id:"google",title:"Google",icon:()=>null},Re="https://www.googleapis.com/auth/";class tn{static create(e){const{configApi:n,discoveryApi:s,oauthRequestApi:a,environment:l="development",provider:C=sn,defaultScopes:E=["openid",`${Re}userinfo.email`,`${Re}userinfo.profile`]}=e;return se.create({configApi:n,discoveryApi:s,oauthRequestApi:a,provider:C,environment:l,defaultScopes:E,scopeTransform(L){return L.map(N=>N==="openid"?N:N==="profile"||N==="email"?`${Re}userinfo.${N}`:N.startsWith(Re)?N:`${Re}${N}`)}})}}const an={id:"microsoft",title:"Microsoft",icon:()=>null};class ie{static create(e){return new ie(e)}microsoftGraph(){return this.oauth2[ie.MicrosoftGraphID]}static resourceForScopes(e){const n=[...new Set(e.split(" ").map(ie.resourceForScope).filter(l=>l!=="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.`));var s;const a=(s=n[0])!==null&&s!==void 0?s:ie.MicrosoftGraphID;return Promise.resolve(a)}static resourceForScope(e){var n;const s=(n=e.match(RegExp("^(?<resourceURI>.*)\\/(?<scp>[^\\/]*)$")))===null||n===void 0?void 0:n.groups;if(s){const{resourceURI:a}=s;return a.replace(/^api:\/\//,"")}switch(e){case"email":case"openid":case"offline_access":case"profile":return"openid";default:return ie.MicrosoftGraphID}}async getAccessToken(e,n){const s=e===void 0?ie.MicrosoftGraphID:await ie.resourceForScopes(Array.isArray(e)?e.join(" "):e);return s in this.oauth2||(this.oauth2[s]=se.create({configApi:this.configApi,discoveryApi:this.discoveryApi,oauthRequestApi:this.oauthRequestApi,provider:this.provider,environment:this.environment,scopeTransform:this.scopeTransform})),this.oauth2[s].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$()}constructor(e){(0,b._)(this,"oauth2",void 0),(0,b._)(this,"configApi",void 0),(0,b._)(this,"environment",void 0),(0,b._)(this,"provider",void 0),(0,b._)(this,"oauthRequestApi",void 0),(0,b._)(this,"discoveryApi",void 0),(0,b._)(this,"scopeTransform",void 0);const{configApi:n,environment:s="development",provider:a=an,oauthRequestApi:l,discoveryApi:C,defaultScopes:E=["openid","offline_access","profile","email","User.Read"],scopeTransform:L=N=>N.concat("offline_access")}=e;this.configApi=n,this.environment=s,this.provider=a,this.oauthRequestApi=l,this.discoveryApi=C,this.scopeTransform=L,this.oauth2={[ie.MicrosoftGraphID]:se.create({configApi:this.configApi,discoveryApi:this.discoveryApi,oauthRequestApi:this.oauthRequestApi,provider:this.provider,environment:this.environment,scopeTransform:this.scopeTransform,defaultScopes:E})}}}(0,b._)(ie,"MicrosoftGraphID","00000003-0000-0000-c000-000000000000");const Ze={id:"github",title:"GitHub",icon:()=>null};class ze{static create(e){const{configApi:n,discoveryApi:s,environment:a="development",provider:l=Ze,oauthRequestApi:C,defaultScopes:E=["read:user"]}=e;return se.create({configApi:n,discoveryApi:s,oauthRequestApi:C,provider:l,environment:a,defaultScopes:E})}}const be={id:"okta",title:"Okta",icon:()=>null},$e=new Set(["openid","profile","email","phone","address","groups","offline_access"]),Ne="okta.";class U{static create(e){const{configApi:n,discoveryApi:s,environment:a="development",provider:l=be,oauthRequestApi:C,defaultScopes:E=["openid","email","profile","offline_access"]}=e;return se.create({configApi:n,discoveryApi:s,oauthRequestApi:C,provider:l,environment:a,defaultScopes:E,scopeTransform(L){return L.map(N=>$e.has(N)||N.startsWith(Ne)?N:`${Ne}${N}`)}})}}const f={id:"gitlab",title:"GitLab",icon:()=>null};class D{static create(e){const{configApi:n,discoveryApi:s,environment:a="development",provider:l=f,oauthRequestApi:C,defaultScopes:E=["read_user"]}=e;return se.create({configApi:n,discoveryApi:s,oauthRequestApi:C,provider:l,environment:a,defaultScopes:E})}}const W={id:"onelogin",title:"onelogin",icon:()=>null},lt=new Set(["openid","profile","email","phone","address","groups","offline_access"]),Ot="onelogin.";class Rt{static create(e){const{configApi:n,discoveryApi:s,environment:a="development",provider:l=W,oauthRequestApi:C}=e;return se.create({configApi:n,discoveryApi:s,oauthRequestApi:C,provider:l,environment:a,defaultScopes:["openid","email","profile","offline_access"],scopeTransform(E){return E.map(L=>lt.has(L)||L.startsWith(Ot)?L:`${Ot}${L}`)}})}}const ae={id:"bitbucket",title:"Bitbucket",icon:()=>null};class ee{static create(e){const{configApi:n,discoveryApi:s,environment:a="development",provider:l=ae,oauthRequestApi:C,defaultScopes:E=["team"]}=e;return se.create({configApi:n,discoveryApi:s,oauthRequestApi:C,provider:l,environment:a,defaultScopes:E})}}const Kt={id:"bitbucketServer",title:"Bitbucket Server",icon:()=>null};class Ut{static create(e){const{configApi:n,discoveryApi:s,environment:a="development",provider:l=Kt,oauthRequestApi:C,defaultScopes:E=["PROJECT_ADMIN"]}=e;return se.create({configApi:n,discoveryApi:s,oauthRequestApi:C,provider:l,environment:a,defaultScopes:E})}}const ge={id:"atlassian",title:"Atlassian",icon:()=>null};class Me{static create(e){const{configApi:n,discoveryApi:s,environment:a="development",provider:l=ge,oauthRequestApi:C}=e;return se.create({configApi:n,discoveryApi:s,oauthRequestApi:C,provider:l,environment:a})}}var kt=t(42380),oe=t(96727),de=t(6542),Mn=t(78847),mo=t(86386),Bn=t(58513);const Un=(0,Lt.T)({id:"core.storage"});var Fn=t(85094),ve=t(77186);const Be=(0,Lt.T)({id:"core.oauthrequest"});var yo=t(98988),Qe=t(41385),Eo=t(96279),$n=t.n(Eo),xo=t(9571),Qt=t(30195),Je=t(51261);const ln=Qt.z.lazy(()=>Qt.z.object({rule:Qt.z.string(),resourceType:Qt.z.string(),params:Qt.z.record(Qt.z.any()).optional()}).or(Qt.z.object({anyOf:Qt.z.array(ln).nonempty()})).or(Qt.z.object({allOf:Qt.z.array(ln).nonempty()})).or(Qt.z.object({not:ln}))),Co=Qt.z.object({result:Qt.z.literal(Je.r.ALLOW).or(Qt.z.literal(Je.r.DENY))}),Ao=Qt.z.union([Qt.z.object({result:Qt.z.literal(Je.r.ALLOW).or(Qt.z.literal(Je.r.DENY))}),Qt.z.object({result:Qt.z.literal(Je.r.CONDITIONAL),pluginId:Qt.z.string(),resourceType:Qt.z.string(),conditions:ln})]),So=(r,e)=>Qt.z.object({items:Qt.z.array(Qt.z.intersection(Qt.z.object({id:Qt.z.string()}),r)).refine(n=>n.length===e.size&&n.every(({id:s})=>e.has(s)),{message:"Items in response do not match request"})});class Nn{async authorize(e,n){return this.makeRequest(e,Co,n)}async authorizeConditional(e,n){return this.makeRequest(e,Ao,n)}async makeRequest(e,n,s){if(!this.enabled)return e.map(J=>({result:Je.r.ALLOW}));const a={items:e.map(J=>({id:xo.Z(),...J}))},l=await this.discovery.getBaseUrl("permission"),C=await $n()(`${l}/authorize`,{method:"POST",body:JSON.stringify(a),headers:{...this.getAuthorizationHeader(s==null?void 0:s.token),"content-type":"application/json"}});if(!C.ok)throw await Qe.V.fromResponse(C);const E=await C.json(),N=So(n,new Set(a.items.map(({id:J})=>J))).parse(E).items.reduce((J,at)=>(J[at.id]=at,J),{});return a.items.map(J=>N[J.id])}getAuthorizationHeader(e){return e?{Authorization:`Bearer ${e}`}:{}}constructor(e){(0,b._)(this,"enabled",void 0),(0,b._)(this,"discovery",void 0),this.discovery=e.discovery;var n;this.enabled=(n=e.config.getOptionalBoolean("permission.enabled"))!==null&&n!==void 0?n:!1}}class xn{static create(e){const{config:n,discovery:s,identity:a}=e,l=new Nn({discovery:s,config:n});return new xn(l,a)}async authorize(e){return(await this.permissionClient.authorize([e],await this.identityApi.getCredentials()))[0]}constructor(e,n){(0,b._)(this,"permissionClient",void 0),(0,b._)(this,"identityApi",void 0),this.permissionClient=e,this.identityApi=n}}const bo=[(0,kt.n)({api:oe.N,deps:{configApi:de.D},factory:({configApi:r})=>H.compile(`${r.getString("backend.baseUrl")}/api/{{ pluginId }}`)}),(0,kt.n)({api:Mn.$,deps:{},factory:()=>new ft}),(0,kt.n)({api:mo.v,deps:{},factory:()=>new bt}),(0,kt.n)({api:Bn.V,deps:{alertApi:Mn.$},factory:({alertApi:r})=>{const e=new St(r,new Tt);return pt.forward(e,{hidden:!1}),e}}),(0,kt.n)({api:Un,deps:{errorApi:Bn.V},factory:({errorApi:r})=>Y.create({errorApi:r})}),(0,kt.n)({api:Fn.g,deps:{configApi:de.D,identityApi:ve.$,discoveryApi:oe.N},factory:({configApi:r,identityApi:e,discoveryApi:n})=>F({middleware:[ut.resolvePluginProtocol({discoveryApi:n}),ut.injectIdentityAuth({identityApi:e,config:r})]})}),(0,kt.n)({api:Be,deps:{},factory:()=>new nt}),(0,kt.n)({api:Te,deps:{discoveryApi:oe.N,oauthRequestApi:Be,configApi:de.D},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>tn.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,kt.n)({api:jt,deps:{discoveryApi:oe.N,oauthRequestApi:Be,configApi:de.D},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>ie.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,kt.n)({api:pe,deps:{discoveryApi:oe.N,oauthRequestApi:Be,configApi:de.D},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>ze.create({configApi:n,discoveryApi:r,oauthRequestApi:e,defaultScopes:["read:user"],environment:n.getOptionalString("auth.environment")})}),(0,kt.n)({api:le,deps:{discoveryApi:oe.N,oauthRequestApi:Be,configApi:de.D},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>U.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,kt.n)({api:_t,deps:{discoveryApi:oe.N,oauthRequestApi:Be,configApi:de.D},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>D.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,kt.n)({api:Vt,deps:{discoveryApi:oe.N,oauthRequestApi:Be,configApi:de.D},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>Rt.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,kt.n)({api:Se,deps:{discoveryApi:oe.N,oauthRequestApi:Be,configApi:de.D},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>ee.create({configApi:n,discoveryApi:r,oauthRequestApi:e,defaultScopes:["team"],environment:n.getOptionalString("auth.environment")})}),(0,kt.n)({api:ke,deps:{discoveryApi:oe.N,oauthRequestApi:Be,configApi:de.D},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>Ut.create({configApi:n,discoveryApi:r,oauthRequestApi:e,defaultScopes:["REPO_READ"]})}),(0,kt.n)({api:xe,deps:{discoveryApi:oe.N,oauthRequestApi:Be,configApi:de.D},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>Me.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,kt.n)({api:yo.R,deps:{discovery:oe.N,identity:ve.$,config:de.D},factory:({config:r,discovery:e,identity:n})=>xn.create({config:r,discovery:e,identity:n})})];var Wn=t(43642),Oo=t(80079),Zn=t(90941),kn=t(32915),Cn=t(40562),wo=t(21853),Po=t(60744),To=t(66569),Ro=t(30254),Io=t(13384),zn=t(15933),Do=t(58838),Lo=t(86737),Kn=t(4989),Hn=t(44407),jo=t(18628),An=t(84219),Sn=t(98685),Mo=t(39781),Gn=t(62607),Vn=t(78258);const Bo={brokenImage:Oo.Z,catalog:jo.Z,scaffolder:kn.Z,techdocs:Cn.Z,search:wo.Z,chat:Po.Z,dashboard:To.Z,docs:Ro.Z,email:Io.Z,github:Do.Z,group:An.Z,help:Lo.Z,"kind:api":zn.Z,"kind:component":Hn.Z,"kind:domain":Wn.Z,"kind:group":An.Z,"kind:location":Kn.Z,"kind:system":Zn.Z,"kind:user":Sn.Z,"kind:resource":Gn.Z,"kind:template":Vn.Z,user:Sn.Z,warning:Mo.Z};var Uo=t(87561),Fo=t(12536),Yn=t(19219),$o=t(41547),No=t(3493),Wo=t(81887);const Zo=(0,Fo.Z)({productionPrefix:"jss4-"});function cn(r){const{children:e,theme:n,noCssBaseline:s=!1}=r,a=n.getTheme("v4"),l=n.getTheme("v5");let C;s||(C=(0,i.jsx)(Uo.ZP,{}));let E=(0,i.jsxs)(i.Fragment,{children:[C,e]});return a&&(E=(0,i.jsx)(Yn.ZP,{generateClassName:Zo,children:(0,i.jsx)($o.Z,{theme:a,children:E})})),l&&(E=(0,i.jsx)(No.Z,{injectFirst:!0,children:(0,i.jsx)(Wo.Z,{theme:l,children:E})})),E}const Qn={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 wt=t(88412),ue=t(52475),he=t(80956),ko=t(73689),cr=t(93606);const p={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")`},T={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 B(r){const{colors:e,shape:n,options:s}=r,l=`linear-gradient(90deg, ${(e.length===1?[e[0],e[0]]:e).join(", ")})`,C=`${n}, ${l}`;var E;const L=(E=s==null?void 0:s.fontColor)!==null&&E!==void 0?E:"#FFFFFF";return{colors:e,shape:n,backgroundImage:C,fontColor:L}}const $={home:B({colors:T.teal,shape:p.wave}),documentation:B({colors:T.pinkSea,shape:p.wave2}),tool:B({colors:T.purpleSky,shape:p.round}),service:B({colors:T.marineBlue,shape:p.wave}),website:B({colors:T.veryBlue,shape:p.wave}),library:B({colors:T.rubyRed,shape:p.wave}),other:B({colors:T.darkGrey,shape:p.wave}),app:B({colors:T.toastyOrange,shape:p.wave}),apis:B({colors:T.teal,shape:p.wave2}),card:B({colors:T.greens,shape:p.wave})},_=16,ot='"Helvetica Neue", Helvetica, Roboto, Arial, sans-serif',dt="home";function Ct(r){const{palette:e,htmlFontSize:n=_,fontFamily:s=ot,defaultPageTheme:a=dt,pageTheme:l=$,typography:C}=r;if(!l[a])throw new Error(`${a} is not defined in pageTheme.`);const E={htmlFontSize:n,fontFamily:s,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}};return{palette:e,typography:C!=null?C:E,page:l[a],getPageTheme:({themeId:L})=>{var N;return(N=l[L])!==null&&N!==void 0?N:l[a]}}}var It=t(32442);const $t={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},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,It._j)(r.palette.link,.3),background:(0,It.$n)(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"},"&.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"}}}},Jt=r=>(...e)=>{const n=e.length===0?[1]:e,s=(a,l)=>typeof a=="string"?a:l*a;return n.map(a=>{const l=s(a,r);return typeof l=="number"?`${l}px`:l}).join(" ")};function Wt(r,e){if(!e||typeof e=="string")return;const n=typeof e=="function"?e(r):e;if(n)return{"@global":n}}function Pt(r,e){if(!(!e||typeof e=="string")){if(typeof e=="object"){const n={...r},s=r.spacing(1);return typeof s=="number"&&(n.spacing=Jt(s)),Object.fromEntries(Object.entries(e).map(([a,l])=>typeof l=="function"?[a,l({theme:n})]:[a,l]))}return e}}const ce=/^&.Mui-([\w-]+)$/;function me(r){let e=r;if(!r||typeof r!="object")return e;for(const n of Object.keys(r)){const s=r[n];if(!(!s||typeof s!="object"))for(const a of Object.keys(s)){const l=a,C=l.match(ce);if(C){const[,E]=C,{[l]:L,...N}=s;L&&(e={...e,[n]:N,[E]:L})}}}return e}function Xt(r,e={}){const n={},s={};for(const a of Object.keys(e)){const l=e[a];l&&("styleOverrides"in l&&(a==="MuiCssBaseline"?n[a]=Wt(r,l.styleOverrides):n[a]=me(Pt(r,l.styleOverrides))),"defaultProps"in l&&(s[a]=l.defaultProps))}return{overrides:n,props:s}}var Mt=new WeakMap;class re{getTheme(e){return(0,wt._)(this,Mt).get(e)}constructor(e,n){(0,ue._)(this,Mt,{writable:!0,value:new Map}),(0,he._)(this,Mt,new Map),e&&(0,wt._)(this,Mt).set("v4",e),n&&(0,wt._)(this,Mt).set("v5",n)}}function ye(r){const e=Ct(r),n={...$t,...r.components},s=(0,cr.Z)({...e,components:n}),a=Xt(s,n),l={...(0,ko.Z)(e),...a};return new re(l,s)}function Dt(r){const e=adaptV4Theme(r),n=createTheme(r);return new re(n,e)}const Ht={light:ye({palette:Qn.light}),dark:ye({palette:Qn.dark})};var qt=t(98192),Ce=t(15222);const Ie=[{id:"light",title:"Light Theme",variant:"light",icon:(0,i.jsx)(Ce.Z,{}),Provider:({children:r})=>(0,i.jsx)(cn,{theme:Ht.light,children:r})},{id:"dark",title:"Dark Theme",variant:"dark",icon:(0,i.jsx)(qt.Z,{}),Provider:({children:r})=>(0,i.jsx)(cn,{theme:Ht.dark,children:r})}];var We=t(64279),fe=t(13980),De=t.n(fe);class ne{get(e){for(const n of this.holders){const s=n.get(e);if(s)return s}}constructor(...e){(0,b._)(this,"holders",void 0),this.holders=e}}var Xe=t(29651),dn=t(68993);const dr=(0,Xe.CT)("api-context"),zo=r=>{var e;const{apis:n,children:s}=r,a=(e=(0,d.useContext)(dr))===null||e===void 0?void 0:e.atVersion(1),l=a?new ne(n,a):n;return(0,i.jsx)(dr.Provider,{value:(0,dn.E)({1:l}),children:s})};zo.propTypes={apis:De().shape({get:De().func.isRequired}).isRequired,children:De().node};var ds=t(9850),us=t.n(ds),hs=t(12782),fs=t.n(hs);const ps=/^[a-z][a-z0-9]*(?:[-_][a-z][a-z0-9]*)*$/i;function bn(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}function Ko(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 Ue={type(r,e,n,s){return`Invalid type in config for key '${r}' in '${e}', got ${n}, wanted ${s}`},missing(r){return`Missing required config value at '${r}'`},convert(r,e,n){return`Unable to convert config value for key '${r}' in '${e}' to a ${n}`}};class un{static fromConfigs(e){return e.length===0?new un(void 0):e.reduce((n,{data:s,context:a,filteredKeys:l,deprecatedKeys:C})=>{const E=new un(s,a,n);if(E.filteredKeys=l,C)for(const{key:L,description:N}of C)console.warn(`The configuration key '${L}' of ${a} is deprecated and may be removed soon. ${N||""}`);return E},void 0)}has(e){var n;if(this.readValue(e)!==void 0)return!0;var a;return(a=(n=this.fallback)===null||n===void 0?void 0:n.has(e))!==null&&a!==void 0?a:!1}keys(){var e;const n=this.data?Object.keys(this.data):[];var s;const a=(s=(e=this.fallback)===null||e===void 0?void 0:e.keys())!==null&&s!==void 0?s:[];return[...new Set([...n,...a])]}get(e){const n=this.getOptional(e);if(n===void 0)throw new Error(Ue.missing(this.fullKey(e!=null?e:"")));return n}getOptional(e){var n;const s=us()(this.readValue(e)),a=(n=this.fallback)===null||n===void 0?void 0:n.getOptional(e);if(s===void 0){if(!1)var l;return a}else if(a===void 0)return s;return fs()({},{value:a},{value:s},(C,E)=>!bn(E)||!bn(C)?E:void 0).value}getConfig(e){const n=this.getOptionalConfig(e);if(n===void 0)throw new Error(Ue.missing(this.fullKey(e)));return n}getOptionalConfig(e){var n;const s=this.readValue(e),a=(n=this.fallback)===null||n===void 0?void 0:n.getOptionalConfig(e);if(bn(s))return this.copy(s,e,a);if(s!==void 0)throw new TypeError(Ue.type(this.fullKey(e),this.context,Ko(s),"object"));return a}getConfigArray(e){const n=this.getOptionalConfigArray(e);if(n===void 0)throw new Error(Ue.missing(this.fullKey(e)));return n}getOptionalConfigArray(e){const n=this.readConfigValue(e,a=>{if(!Array.isArray(a))return{expected:"object-array"};for(const[l,C]of a.entries())if(!bn(C))return{expected:"object-array",value:C,key:`${e}[${l}]`};return!0});if(!n){if(!1)var s;return}return n.map((a,l)=>this.copy(a,`${e}[${l}]`))}getNumber(e){const n=this.getOptionalNumber(e);if(n===void 0)throw new Error(Ue.missing(this.fullKey(e)));return n}getOptionalNumber(e){const n=this.readConfigValue(e,a=>typeof a=="number"||typeof a=="string"||{expected:"number"});if(typeof n=="number"||n===void 0)return n;const s=Number(n);if(!Number.isFinite(s))throw new Error(Ue.convert(this.fullKey(e),this.context,"number"));return s}getBoolean(e){const n=this.getOptionalBoolean(e);if(n===void 0)throw new Error(Ue.missing(this.fullKey(e)));return n}getOptionalBoolean(e){const n=this.readConfigValue(e,a=>typeof a=="boolean"||typeof a=="number"||typeof a=="string"||{expected:"boolean"});if(typeof n=="boolean"||n===void 0)return n;const s=String(n).trim();if(/^(?:y|yes|true|1|on)$/i.test(s))return!0;if(/^(?:n|no|false|0|off)$/i.test(s))return!1;throw new Error(Ue.convert(this.fullKey(e),this.context,"boolean"))}getString(e){const n=this.getOptionalString(e);if(n===void 0)throw new Error(Ue.missing(this.fullKey(e)));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(Ue.missing(this.fullKey(e)));return n}getOptionalStringArray(e){return this.readConfigValue(e,n=>{if(!Array.isArray(n))return{expected:"string-array"};for(const[s,a]of n.entries())if(typeof a!="string"||a==="")return{expected:"string-array",value:a,key:`${e}[${s}]`};return!0})}fullKey(e){return`${this.prefix}${this.prefix?".":""}${e}`}copy(e,n,s){const a=new un(e,this.context,s,this.fullKey(n));return a.filteredKeys=this.filteredKeys,a}readConfigValue(e,n){const s=this.readValue(e);if(s===void 0){var a;if(!1)var l;return(a=this.fallback)===null||a===void 0?void 0:a.readConfigValue(e,n)}const C=n(s);if(C!==!0){const{key:E=e,value:L=s,expected:N}=C;throw new TypeError(Ue.type(this.fullKey(E),this.context,Ko(L),N))}return s}readValue(e){const n=e?e.split("."):[];for(const a of n)if(!ps.test(a))throw new TypeError(`Invalid config key '${e}'`);if(this.data===void 0)return;let s=this.data;for(const[a,l]of n.entries())if(bn(s))s=s[l];else if(s!==void 0){const C=this.fullKey(n.slice(0,a).join("."));throw new TypeError(Ue.type(C,this.context,Ko(s),"object"))}return s}constructor(e,n="mock-config",s,a=""){(0,b._)(this,"data",void 0),(0,b._)(this,"context",void 0),(0,b._)(this,"fallback",void 0),(0,b._)(this,"prefix",void 0),(0,b._)(this,"filteredKeys",void 0),(0,b._)(this,"notifiedFilteredKeys",void 0),this.data=e,this.context=n,this.fallback=s,this.prefix=a,this.notifiedFilteredKeys=new Set}}const On="theme";class Jn{static createWithStorage(e){const n=new Jn(e);if(!window.localStorage)return n;var s;const a=(s=window.localStorage.getItem(On))!==null&&s!==void 0?s:void 0;return n.setActiveThemeId(a),n.activeThemeId$().subscribe(l=>{l?window.localStorage.setItem(On,l):window.localStorage.removeItem(On)}),window.addEventListener("storage",l=>{if(l.key===On){var C;const E=(C=localStorage.getItem(On))!==null&&C!==void 0?C:void 0;n.setActiveThemeId(E)}}),n}getInstalledThemes(){return this.themes.slice()}activeThemeId$(){return this.subject}getActiveThemeId(){return this.activeThemeId}setActiveThemeId(e){this.activeThemeId=e,this.subject.next(e)}constructor(e){(0,b._)(this,"themes",void 0),(0,b._)(this,"activeThemeId",void 0),(0,b._)(this,"subject",void 0),this.themes=e,this.subject=new it(void 0)}}var hn=t(82723);function ur(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 gs{registerFlag(e){ur(e.name),this.registeredFeatureFlags.push(e)}getRegisteredFlags(){return this.registeredFeatureFlags.slice()}isActive(e){return this.flags||(this.flags=this.load()),this.flags.get(e)===hn.C.Active}save(e){this.flags||(this.flags=this.load()),e.merge||this.flags.clear();for(const[s,a]of Object.entries(e.states))this.flags.set(s,a);const n=Array.from(this.flags.entries()).filter(([,s])=>s===hn.C.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 s=Object.entries(n).filter(([a,l])=>(ur(a),l===hn.C.Active));return new Map(s)}catch{return new Map}}constructor(){(0,b._)(this,"registeredFeatureFlags",[]),(0,b._)(this,"flags",void 0)}}const Xn=(0,Lt.T)({id:"core.apptheme"}),hr=(0,Lt.T)({id:"core.applanguage"});var vs=t(96253);class Ho{static validateFactories(e,n){for(const s of n){const a=[s],l=new Set;for(;a.length;){const C=a.shift(),E=e.get(C);if(E)for(const L of Object.values(E.deps)){if(L.id===s.id)throw new Error(`Circular dependency of api factory for ${s}`);l.has(L)||(l.add(L),a.push(L))}}}}get(e){return this.load(e)}load(e,n=[]){const s=this.apis.get(e.id);if(s)return s;const a=this.factories.get(e);if(!a)return;if(n.includes(a.api))throw new Error(`Circular dependency of api factory for ${a.api}`);const l=this.loadDeps(e,a.deps,[...n,a.api]),C=a.factory(l);return this.apis.set(e.id,C),C}loadDeps(e,n,s){const a={};for(const l in n)if(n.hasOwnProperty(l)){const C=n[l],E=this.load(C,s);if(!E)throw new Error(`No API factory available for dependency ${C} of dependent ${e}`);a[l]=E}return a}constructor(e){(0,b._)(this,"factories",void 0),(0,b._)(this,"apis",void 0),this.factories=e,this.apis=new Map}}var Go;(function(r){r[r.default=10]="default",r[r.app=50]="app",r[r.static=100]="static"})(Go||(Go={}));class ms{register(e,n){const s=Go[e],a=this.factories.get(n.api.id);return a&&a.priority>=s?!1:(this.factories.set(n.api.id,{priority:s,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}constructor(){(0,b._)(this,"factories",new Map)}}function ys(r){const e={};for(const s in r.collectors)r.collectors.hasOwnProperty(s)&&(e[s]=r.collectors[s]());const n=[{node:d.Children.toArray(r.root),parent:void 0,contexts:{}}];for(;n.length!==0;){const{node:s,parent:a,contexts:l}=n.shift();d.Children.forEach(s,C=>{if(!(0,d.isValidElement)(C))return;const E={};for(const L in e)if(e.hasOwnProperty(L)){const N=e[L];E[L]=N.visit(N.accumulator,C,a,l[L])}for(const L of r.discoverers){const N=L(C);N&&n.push({node:N,parent:C,contexts:E})}})}return Object.fromEntries(Object.entries(e).map(([s,a])=>[s,a.accumulator]))}function _n(r,e){return()=>({accumulator:r(),visit:e})}function Es(r){var e;return(e=r.props)===null||e===void 0?void 0:e.children}function xs(r){var e,n;if(!((e=r.props)===null||e===void 0)&&e.path&&(!((n=r.props)===null||n===void 0)&&n.element)){var s;return(s=r.props)===null||s===void 0?void 0:s.element}}var Oe=t(62584);const Cs=_n(()=>new Set,(r,e)=>{const n=(0,Oe.I)(e,"core.plugin");n&&r.add(n)});var wn=t(44394);const fr=r=>{const{children:e}=r,n=(0,wn.h_)(hn.W),s="with"in r?n.isActive(r.with):!n.isActive(r.without);return(0,i.jsx)(i.Fragment,{children:s?e:null})};(0,Oe.R)(fr,"core.featureFlagged",!0);const qn={caseSensitive:!1,path:"*",element:"match-all",routeRefs:new Set,plugins:new Set};function to(r){const e=r;if(e!=null&&e.type){var n,s;return(s=(n=e.type.displayName)!==null&&n!==void 0?n:e.type.name)!==null&&s!==void 0?s:String(e.type)}return String(e)}const pr=r=>{const e=new Set;return r&&e.add(r),e};function gr(r,e=new Array){return d.Children.forEach(r,n=>{if(!(0,d.isValidElement)(n))return;const s=(0,Oe.I)(n,"core.mountPoint");if(s){const a=(0,Oe.I)(n,"core.plugin");e.push({routeRef:s,plugin:a})}gr(n.props.children,e)}),e}const As=_n(()=>({paths:new Map,parents:new Map,objects:new Array}),(r,e,n,s)=>{var a,l;if(s!=null&&s.isElementAncestor)return s;if((n==null?void 0:n.props.element)===e)return{...s,isElementAncestor:!0};const C=(a=e.props)===null||a===void 0?void 0:a.path,E=(0,Oe.I)(e,"core.mountPoint");if(E&&C)throw new Error(`Path property may not be set directly on a routable extension "${to(e)}"`);var L;const N=(L=s==null||(l=s.obj)===null||l===void 0?void 0:l.children)!==null&&L!==void 0?L:r.objects;if(C!==void 0){if(typeof C!="string")throw new Error(`Element path must be a string at "${to(e)}"`);const At=C.startsWith("/")?C.slice(1):C,Zt=e.props.element;if((0,Oe.I)(e,"core.gatherMountPoints")){var J;if(Zt)throw new Error(`Mount point gatherers may not have an element prop "${to(e)}"`);const Gt={path:At,element:"gathered",routeRefs:new Set,caseSensitive:Boolean((J=e.props)===null||J===void 0?void 0:J.caseSensitive),children:[qn],plugins:new Set};return N.push(Gt),{obj:Gt,gatherPath:At,routeRef:s==null?void 0:s.routeRef,gatherRouteRef:s==null?void 0:s.routeRef}}if(Zt){var at;const[Gt,...te]=gr(Zt);if(te.length>0)throw new Error(`Route element with path "${C}" may not contain multiple routable extensions`);if(!Gt)return s;const{routeRef:Ee,plugin:Ge}=Gt,jn={path:At,element:"mounted",routeRefs:new Set([Ee]),caseSensitive:Boolean((at=e.props)===null||at===void 0?void 0:at.caseSensitive),children:[qn],plugins:pr(Ge)};return N.push(jn),r.paths.set(Ee,At),r.parents.set(Ee,s==null?void 0:s.routeRef),{obj:jn,routeRef:Ee!=null?Ee:s==null?void 0:s.routeRef,gatherPath:At,gatherRouteRef:s==null?void 0:s.gatherRouteRef}}}if(E){var ht;if((s==null?void 0:s.gatherPath)===void 0)throw new Error(`Routable extension "${to(e)}" with mount point "${E}" must be assigned a path`);s==null||(ht=s.obj)===null||ht===void 0||ht.routeRefs.add(E);const At=(0,Oe.I)(e,"core.plugin");if(At){var Et;s==null||(Et=s.obj)===null||Et===void 0||Et.plugins.add(At)}return r.paths.set(E,s.gatherPath),r.parents.set(E,s==null?void 0:s.gatherRouteRef),{...s,routeRef:E}}return s}),Ss=_n(()=>({paths:new Map,parents:new Map,objects:new Array}),(r,e,n,s)=>{var a,l,C;if((n==null?void 0:n.props.element)===e)return s;let E=s==null?void 0:s.obj,L=s==null?void 0:s.routeRef,N=s==null?void 0:s.sticky;const J=(a=e.props)===null||a===void 0?void 0:a.path;var at;const ht=(at=E==null?void 0:E.children)!==null&&at!==void 0?at:r.objects,Et=Boolean((l=e.props)===null||l===void 0?void 0:l.caseSensitive);let At=s==null?void 0:s.path;if((0,Oe.I)(e,"core.gatherMountPoints")){if(!J)throw new Error("Mount point gatherer must have a path");At=J}const Zt=(C=e.props)===null||C===void 0?void 0:C.element;let Gt=(0,Oe.I)(e,"core.mountPoint");if(!Gt&&(0,d.isValidElement)(Zt)&&(Gt=(0,Oe.I)(Zt,"core.mountPoint")),Gt){let Ge=J;if(At&&(Ge?At=void 0:Ge=At),!Ge)throw new Error("Mounted routable extension must have a path");r.paths.set(Gt,Ge),L&&N?(r.parents.set(Gt,L),J&&(L=Gt,N=!1)):(r.parents.set(Gt,L),L=Gt),J?(E={caseSensitive:Et,path:J,element:"mounted",routeRefs:new Set([Gt]),children:[qn],plugins:pr((0,Oe.I)(e.props.element,"core.plugin"))},ht.push(E)):E==null||E.routeRefs.add(Gt)}if((0,Oe.I)(e,"core.gatherMountPoints")&&(N=!0),(0,Oe.I)(e,"core.gatherMountPoints")){if(!J)throw new Error("Mount point gatherer must have a path");if(!Gt){var Ee;E={caseSensitive:Et,path:J,element:"gathered",routeRefs:new Set,children:[qn],plugins:(s==null||(Ee=s.obj)===null||Ee===void 0?void 0:Ee.plugins)||new Set},ht.push(E)}}return{obj:E,path:At,routeRef:L,sticky:N}}),bs=_n(()=>new Set,(r,e)=>{if(e.type===fr){const n=e.props;r.add("with"in n?n.with:n.without)}});var Pn=t(84800),Os=t(96087);const Tn=(0,Os.u)("route-ref-type",()=>Symbol("route-ref-type"));function vr(r){return r[Tn]==="absolute"}function mr(r){return r[Tn]==="sub"}function ws(r){return r[Tn]==="external"}function eo(...r){const e=r.join("/").replace(/\/\/+/g,"/");return e!=="/"&&e.endsWith("/")?e.slice(0,-1):e}var Ps=t(34519),Ts=t.n(Ps);function Rs(r,e,n){let s,a="";if(vr(r))s=r;else if(mr(r))s=r.parent,a=r.path;else if(ws(r)){const E=n.get(r);if(!E)return[void 0,""];if(vr(E))s=E;else if(mr(E))s=E.parent,a=E.path;else throw new Error(`ExternalRouteRef was bound to invalid target, ${E}`)}else throw r[Tn]?new Error(`Unknown or invalid route ref type, ${r[Tn]}`):new Error(`Unknown object passed to useRouteRef, got ${r}`);if(!s)return[void 0,""];const l=e.get(s);if(l===void 0)return[void 0,""];const C=eo(l,a);return[s,C]}function Is(r,e,n,s,a){var l;const C=(l=(0,Pn.fp)(a,e))!==null&&l!==void 0?l:[],E=Array();let L=-1;for(let at=r;at&&(L=C.findIndex(ht=>ht.route.routeRefs.has(at)),L===-1);at=s.get(at))E.unshift(at);E.length===0&&(L-=1);const N=L===-1?"":C[L].pathname,J=E.slice(0,-1).map(at=>{const ht=n.get(at);if(ht===void 0)throw new Error(`No path for ${at}`);if(ht.includes(":"))throw new Error(`Cannot route to ${r} with parent ${at} as it has parameters`);return ht});return`${eo(N,...J)}/`}class Ds{resolve(e,n){const[s,a]=Rs(e,this.routePaths,this.routeBindings);if(!s)return;let l;typeof n=="string"?l=this.trimPath(n):n.pathname?l={...n,pathname:this.trimPath(n.pathname)}:l=n;const C=this.appBasePath+Is(s,l,this.routePaths,this.routeParents,this.routeObjects);return(...[L])=>{const N=L&&Ts()(L,J=>typeof J=="string"?J.replaceAll(/[&?#;\/]/g,at=>encodeURIComponent(at)):J);return eo(C,(0,Pn.Gn)(a,N))}}trimPath(e){return e&&(e.startsWith(this.appBasePath)?e.slice(this.appBasePath.length):e)}constructor(e,n,s,a,l){(0,b._)(this,"routePaths",void 0),(0,b._)(this,"routeParents",void 0),(0,b._)(this,"routeObjects",void 0),(0,b._)(this,"routeBindings",void 0),(0,b._)(this,"appBasePath",void 0),this.routePaths=e,this.routeParents=n,this.routeObjects=s,this.routeBindings=a,this.appBasePath=l}}const Ls=(0,Xe.CT)("routing-context"),js=({routePaths:r,routeParents:e,routeObjects:n,routeBindings:s,basePath:a="",children:l})=>{const C=new Ds(r,e,n,s,a),E=(0,dn.E)({1:C});return(0,i.jsx)(Ls.Provider,{value:E,children:l})};function Ms(r,e){const n=new Set(e.values());n.delete(void 0);for(const s of e.keys()){if(n.has(s))continue;let a=s,l="";for(;a;){const E=r.get(a);if(E===void 0)throw new Error(`No path for ${a}`);l=eo(E,l),a=e.get(a)}const C=l.match(/:(\w+)/g);if(C){for(let E=0;E<C.length;E++)for(let L=E+1;L<C.length;L++)if(C[L]===C[E])throw new Error(`Parameter ${C[L]} is duplicated in path ${l}`)}}}function Bs(r,e){for(const n of e)if(n.externalRoutes){for(const[s,a]of Object.entries(n.externalRoutes))if(!a.optional&&!r.has(a))throw new Error(`External route '${s}' of the '${n.getId()}' plugin must be bound to a target route. See https://backstage.io/link?bind-routes for details.`)}}const Us=(0,Xe.CT)("app-context"),Fs=({appContext:r,children:e})=>{const n=(0,dn.E)({1:r});return(0,i.jsx)(Us.Provider,{value:n,children:e})};function yr(r){return new Error(`Tried to access IdentityApi ${r} before app was loaded`)}function Vo(r){console.warn(`WARNING: Call to ${r} is deprecated and will break in the future`)}class $s{setTarget(e,n){this.target=e,this.signOutTargetUrl=n.signOutTargetUrl,this.resolveTarget(e)}getUserId(){if(!this.target)throw yr("getUserId");if(!this.target.getUserId)throw new Error("IdentityApi does not implement getUserId");return Vo("getUserId"),this.target.getUserId()}getProfile(){if(!this.target)throw yr("getProfile");if(!this.target.getProfile)throw new Error("IdentityApi does not implement getProfile");return Vo("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 Vo("getIdToken"),e.getIdToken()})}async signOut(){await this.waitForTarget.then(e=>e.signOut()),window.location.href=this.signOutTargetUrl}constructor(){(0,b._)(this,"target",void 0),(0,b._)(this,"waitForTarget",void 0),(0,b._)(this,"resolveTarget",()=>{}),(0,b._)(this,"signOutTargetUrl","/"),this.waitForTarget=new Promise(e=>{this.resolveTarget=e})}}var Ns=t(72164);function Ws(r,e,n){if(r!==void 0){const a=n.find(l=>l.id===r);if(a)return a}if(e){const a=n.find(l=>l.variant==="dark");if(a)return a}const s=n.find(a=>a.variant==="light");return s||n[0]}const Zs=()=>{const r=(0,d.useMemo)(()=>window.matchMedia("(prefers-color-scheme: dark)"),[]),[e,n]=(0,d.useState)(r.matches);return(0,d.useEffect)(()=>{const s=a=>{n(a.matches)};return r.addListener(s),()=>{r.removeListener(s)}},[r]),e};function Er({children:r}){const e=(0,wn.h_)(Xn),n=(0,Ns.Z)(e.activeThemeId$(),e.getActiveThemeId()),s=Boolean(window.matchMedia)?Zs():!1,a=Ws(n,s,e.getInstalledThemes());if(!a)throw new Error("App has no themes");return(0,i.jsx)(a.Provider,{children:r})}const xr=async()=>ks();function ks(r="__APP_INJECTED_RUNTIME_CONFIG__"){const e=[{context:"app-config.yaml",data:{app:{title:"Techdocs Preview App",baseUrl:"http://localhost:3000"},backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}}}];if(!e)throw new Error("No static configuration provided");if(!Array.isArray(e))throw new Error("Static configuration has invalid format");const n=e.slice();if(r!=="__app_injected_runtime_config__".toLocaleUpperCase("en-US"))try{const a=JSON.parse(r);Array.isArray(a)?n.push(...a):n.push({data:a,context:"env"})}catch(a){throw new Error(`Failed to load runtime configuration, ${a}`)}const s=window.__APP_CONFIG__;return s&&n.push({context:"window",data:s}),n}class zs{add(e,n){return this.apis.push([e.id,n]),n}build(){return new fn(new Map(this.apis))}constructor(){(0,b._)(this,"apis",[])}}class fn{static builder(){return new zs}static from(e){return new fn(new Map(e.map(([n,s])=>[n.id,s])))}static with(e,n){return new fn(new Map([[e.id,n]]))}with(e,n){return new fn(new Map([...this.apis,[e.id,n]]))}get(e){return this.apis.get(e.id)}constructor(e){(0,b._)(this,"apis",void 0),this.apis=e}}function Ks(r){const e=new Map;return r&&r({bind:(s,a)=>{for(const[l,C]of Object.entries(a)){const E=s[l];if(!E)throw new Error(`Key ${l} is not an existing external route`);if(!C&&!E.optional)throw new Error(`External route ${l} is required but was undefined`);C&&e.set(E,C)}}}),e}function Rn(){const[r]=(0,v.is)((0,i.jsx)(v.AW,{index:!0,element:(0,i.jsx)("div",{})}));return!r.index}const Cr=(0,d.createContext)(void 0);var Ar=t(80851),Sr=t(62369),Hs=t(72388);const Gs=(r,e)=>{try{const n=(0,Pn.fp)(e,{pathname:r}),s=n==null?void 0:n.filter(L=>{var N;return(L==null||(N=L.route.routeRefs)===null||N===void 0?void 0:N.size)>0}).pop(),a=s==null?void 0:s.route;if(!a||a.path===""&&r!=="/")return;let l;a.routeRefs.size===1&&(l=a.routeRefs.values().next().value);let C;a.plugins.size===1&&(C=a.plugins.values().next().value);const E=Object.entries((s==null?void 0:s.params)||{}).reduce((L,[N,J])=>(J!==void 0&&N!=="*"&&(L[N]=J),L),{});return{extension:"App",pluginId:(C==null?void 0:C.getId())||"root",...l?{routeRef:l.id}:{},_routeNodeType:a.element,params:E}}catch{return}},Vs=({pathname:r,search:e,hash:n,attributes:s})=>{const a=(0,Sr.z)();return(0,d.useEffect)(()=>{a.captureEvent("navigate",`${r}${e}${n}`,{attributes:s})},[a,r,e,n,s]),null},no=({routeObjects:r})=>{const{pathname:e,search:n,hash:s}=(0,v.TH)(),{params:a,...l}=Gs(e,r)||{params:{}};return(0,i.jsx)(Hs.fC,{attributes:l,children:(0,i.jsx)(Vs,{pathname:e,search:n,hash:s,attributes:a})})};function Ys(r){return Rn()?Yo(r):""}function Yo(r){var e;let{pathname:n}=new URL((e=r.getOptionalString("app.baseUrl"))!==null&&e!==void 0?e:"/","http://sample.dev");return n=n.replace(/\/*$/,""),n}function br({component:r,appIdentityProxy:e,children:n}){const[s,a]=(0,d.useState)(),l=(0,wn.h_)(de.D),C=Yo(l);return s?(e.setTarget(s,{signOutTargetUrl:C||"/"}),(0,i.jsx)(i.Fragment,{children:n})):(0,i.jsx)(r,{onSignInSuccess:a})}function Or(r){const{Router:e,SignInPage:n}=(0,Ar.q)().getComponents(),s=(0,wn.h_)(de.D),a=Yo(s),l=`${a}/*`,C=(0,d.useContext)(Cr);if(!C)throw new Error("AppRouter must be rendered within the AppProvider");const{routeObjects:E,appIdentityProxy:L}=C;return n?Rn()?(0,i.jsxs)(e,{children:[(0,i.jsx)(no,{routeObjects:E}),(0,i.jsx)(br,{component:n,appIdentityProxy:L,children:(0,i.jsx)(v.Z5,{children:(0,i.jsx)(v.AW,{path:l,element:(0,i.jsx)(i.Fragment,{children:r.children})})})})]}):(0,i.jsxs)(e,{basename:a,children:[(0,i.jsx)(no,{routeObjects:E}),(0,i.jsx)(br,{component:n,appIdentityProxy:L,children:r.children})]}):(L.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:a||"/"}),Rn()?(0,i.jsxs)(e,{children:[(0,i.jsx)(no,{routeObjects:E}),(0,i.jsx)(v.Z5,{children:(0,i.jsx)(v.AW,{path:l,element:(0,i.jsx)(i.Fragment,{children:r.children})})})]}):(0,i.jsxs)(e,{basename:a,children:[(0,i.jsx)(no,{routeObjects:E}),r.children]}))}(0,Oe.R)(Or,"core.type","AppRouter");const In="language",Ke="en";var Dn=new WeakMap,pn=new WeakMap,oo=new WeakMap;class ro{static create(e){var n;const s=(n=e==null?void 0:e.availableLanguages)!==null&&n!==void 0?n:[Ke];if(s.length!==new Set(s).size)throw new Error(`Supported languages may not contain duplicates, got '${s.join("', '")}'`);if(!s.includes(Ke))throw new Error(`Supported languages must include '${Ke}'`);var a;const l=(a=e==null?void 0:e.defaultLanguage)!==null&&a!==void 0?a:Ke;if(!s.includes(l))throw new Error(`Initial language must be one of the supported languages, got '${l}'`);return new ro(s,l)}static createWithStorage(e){const n=ro.create(e);if(!window.localStorage)return n;const s=window.localStorage.getItem(In),{languages:a}=n.getAvailableLanguages();return s&&a.includes(s)&&n.setLanguage(s),n.language$().subscribe(({language:l})=>{l!==window.localStorage.getItem(In)&&window.localStorage.setItem(In,l)}),window.addEventListener("storage",l=>{if(l.key===In){var C;const E=(C=localStorage.getItem(In))!==null&&C!==void 0?C:void 0;E&&n.setLanguage(E)}}),n}getAvailableLanguages(){return{languages:(0,wt._)(this,Dn).slice()}}setLanguage(e){const n=e!=null?e:Ke;if(n!==(0,wt._)(this,pn)){if(n&&!(0,wt._)(this,Dn).includes(n))throw new Error(`Failed to change language to '${n}', available languages are '${(0,wt._)(this,Dn).join("', '")}'`);(0,he._)(this,pn,n),(0,wt._)(this,oo).next({language:n})}}getLanguage(){return{language:(0,wt._)(this,pn)}}language$(){return(0,wt._)(this,oo)}constructor(e,n){(0,ue._)(this,Dn,{writable:!0,value:void 0}),(0,ue._)(this,pn,{writable:!0,value:void 0}),(0,ue._)(this,oo,{writable:!0,value:void 0}),(0,he._)(this,Dn,e),(0,he._)(this,pn,n),(0,he._)(this,oo,new it({language:(0,wt._)(this,pn)}))}}var Fe=t(29190),en=t(15356),Qs=t(24991),Js=t(18015),wr=t(35304);function Pr(r){return Object.fromEntries(Object.entries(r).filter(e=>e[1]!==null))}var gn=new WeakMap,so=new WeakMap,vn=new WeakMap,io=new WeakSet;class Xs{addTranslationResource(e){const n=(0,Js.W)(e);for(const s of n.resources){const a=(0,Fe._)(this,io,Qo).call(this,s.language,n.id);(0,wt._)(this,vn).has(a)||(0,wt._)(this,vn).set(a,s.loader)}}needsLoading(e,n){const s=(0,Fe._)(this,io,Qo).call(this,e,n);return(0,wt._)(this,vn).get(s)?!(0,wt._)(this,gn).has(s):!1}async load(e,n){const s=(0,Fe._)(this,io,Qo).call(this,e,n),a=(0,wt._)(this,vn).get(s);if(!a||(0,wt._)(this,gn).has(s))return;const l=(0,wt._)(this,so).get(s);if(l){await l;return}const C=a().then(E=>{this.onLoad({language:e,namespace:n,messages:E.messages}),(0,wt._)(this,gn).add(s)},E=>{throw(0,wt._)(this,gn).add(s),E});(0,wt._)(this,so).set(s,C),await C}constructor(e){(0,en._)(this,io),(0,b._)(this,"onLoad",void 0),(0,ue._)(this,gn,{writable:!0,value:void 0}),(0,ue._)(this,so,{writable:!0,value:void 0}),(0,ue._)(this,vn,{writable:!0,value:void 0}),this.onLoad=e,(0,he._)(this,gn,new Set),(0,he._)(this,so,new Map),(0,he._)(this,vn,new Map)}}function Qo(r,e){return`${r}/${e}`}var Ln=new WeakMap,mn=new WeakMap,nn=new WeakMap,Jo=new WeakMap,ao=new WeakMap,Tr=new WeakSet,lo=new WeakSet,Xo=new WeakSet;class _o{static create(e){const{languages:n}=e.languageApi.getAvailableLanguages(),s=(0,Qs.Fs)({fallbackLng:Ke,supportedLngs:n,interpolation:{escapeValue:!1},ns:[],defaultNS:!1,fallbackNS:!1,initImmediate:!1});if(s.init(),!s.isInitialized)throw new Error("i18next was unexpectedly not initialized");const{language:a}=e.languageApi.getLanguage();a!==Ke&&s.changeLanguage(a);const l=new Xs(L=>{s.addResourceBundle(L.language,L.namespace,Pr(L.messages),!1,!0)}),C=(e==null?void 0:e.resources)||[];for(let L=C.length-1;L>=0;L--){const N=C[L];N.$$type==="@backstage/TranslationResource"?l.addTranslationResource(N):N.$$type==="@backstage/TranslationMessages"&&s.addResourceBundle(Ke,N.id,Pr(N.messages),!0,!1)}const E=new _o(s,l,e.languageApi.getLanguage().language);return e.languageApi.language$().subscribe(({language:L})=>{(0,Fe._)(E,Tr,_s).call(E,L)}),E}getTranslation(e){const n=(0,wr.y)(e);return(0,Fe._)(this,Xo,Rr).call(this,n),(0,Fe._)(this,lo,qo).call(this,n)}translation$(e){const n=(0,wr.y)(e);return(0,Fe._)(this,Xo,Rr).call(this,n),new(X())(s=>{let a={};const l=()=>{a={};const E=a;(0,wt._)(this,mn).load((0,wt._)(this,nn),n.id).then(()=>{if(E===a){const L=(0,Fe._)(this,lo,qo).call(this,n);L.ready&&s.next(L)}},L=>{E===a&&s.error(Array.isArray(L)?L[0]:L)})},C=()=>{const E=(0,Fe._)(this,lo,qo).call(this,n);E.ready?s.next(E):l()};return(0,wt._)(this,mn).needsLoading((0,wt._)(this,nn),n.id)&&l(),(0,wt._)(this,ao).add(C),()=>{(0,wt._)(this,ao).delete(C)}})}constructor(e,n,s){(0,en._)(this,Tr),(0,en._)(this,lo),(0,en._)(this,Xo),(0,ue._)(this,Ln,{writable:!0,value:void 0}),(0,ue._)(this,mn,{writable:!0,value:void 0}),(0,ue._)(this,nn,{writable:!0,value:void 0}),(0,ue._)(this,Jo,{writable:!0,value:new Set}),(0,ue._)(this,ao,{writable:!0,value:new Set}),(0,he._)(this,Ln,e),(0,he._)(this,mn,n),(0,he._)(this,nn,s)}}function _s(r){(0,wt._)(this,nn)!==r&&((0,he._)(this,nn,r),(0,wt._)(this,Ln).changeLanguage(r),(0,wt._)(this,ao).forEach(e=>e()))}function qo(r){return(0,wt._)(this,mn).needsLoading((0,wt._)(this,nn),r.id)?{ready:!1}:{ready:!0,t:(0,wt._)(this,Ln).getFixedT(null,r.id)}}function Rr(r){if((0,wt._)(this,Jo).has(r.id))return;(0,wt._)(this,Jo).add(r.id);const e=r.getDefaultMessages();(0,wt._)(this,Ln).addResourceBundle(Ke,r.id,e,!0,!1);const n=r.getDefaultResource();n&&(0,wt._)(this,mn).addTranslationResource(n)}function Ir(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 qs(r){const e=un.fromConfigs(r),n=e.getOptionalString("app.baseUrl"),s=e.getOptionalString("backend.baseUrl");let a=r,l,C;if(n&&s){const E=new URL(n).origin,L=new URL(s).origin;if(E===L){const N=Ir(s);s!==N&&(l=N)}}if(n){const E=Ir(n);n!==E&&(C=E)}return(C||l)&&(a=a.concat({data:{app:C&&{baseUrl:C},backend:l&&{baseUrl:l}},context:"relative-resolver"})),a}function ti(r,e,n){var s;const a=Boolean(r),l=(0,We.default)(r||(()=>Promise.resolve([])));let C;if(a&&l.loading){const{Progress:N}=e;C=(0,i.jsx)(N,{})}else if(l.error){const{BootErrorPage:N}=e;C=(0,i.jsx)(N,{step:"load-config",error:l.error})}const{ThemeProvider:E=Er}=e;return C?{node:(0,i.jsx)(zo,{apis:fn.with(Xn,n),children:(0,i.jsx)(E,{children:C})})}:{api:un.fromConfigs(!((s=l.value)===null||s===void 0)&&s.length?qs(l.value):[])}}class ei{getPlugins(){return this.app.getPlugins()}getSystemIcon(e){return this.app.getSystemIcon(e)}getSystemIcons(){return this.app.getSystemIcons()}getComponents(){return this.app.getComponents()}constructor(e){(0,b._)(this,"app",void 0),this.app=e}}var tr=new WeakMap;class ni{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,i.jsx)(n,{children:e})}getProvider(){if((0,wt._)(this,tr))throw new Error("app.getProvider() or app.createRoot() has already been called, and can only be called once");(0,he._)(this,tr,!0);const e=new ei(this);let n=!1;return({children:a})=>{const l=(0,d.useRef)(!0),C=(0,d.useMemo)(()=>Jn.createWithStorage(this.themes),[]),{routing:E,featureFlags:L,routeBindings:N}=(0,d.useMemo)(()=>{const At=Rn();At&&console.warn(`
2
- DEPRECATION WARNING: React Router Beta is deprecated and support for it will be removed in a future release.
3
- Please migrate to use React Router v6 stable.
4
- See https://backstage.io/docs/tutorials/react-router-stable-migration
5
- `);const Zt=ys({root:a,discoverers:[Es,xs],collectors:{routing:At?Ss:As,collectedPlugins:Cs,featureFlags:bs}});return Zt.collectedPlugins.forEach(Gt=>this.plugins.add(Gt)),this.verifyPlugins(this.plugins),this.getApiHolder(),{...Zt,routeBindings:Ks(this.bindRoutes)}},[a]);n||(n=!0,Ms(E.paths,E.parents),Bs(N,this.plugins));const J=ti(this.configLoader,this.components,C),at="api"in J;if(at){const{api:At}=J;this.configApi=At}if("node"in J)return J.node;if(at&&l.current){l.current=!1;const At=this.getApiHolder().get(hn.W);if(At){for(const te of this.featureFlags)At.registerFlag({...te,pluginId:""});for(const te of this.plugins.values())if("getFeatureFlags"in te)for(const Ee of te.getFeatureFlags())At.registerFlag({name:Ee.name,pluginId:te.getId()});else for(const Ee of te.output())Ee.type==="feature-flag"&&At.registerFlag({name:Ee.name,pluginId:te.getId()});const Zt=At.getRegisteredFlags(),Gt=new Set(Zt.map(te=>te.name));for(const te of L)Gt.has(te)||At.registerFlag({name:te,pluginId:""})}}const{ThemeProvider:ht=Er,Progress:Et}=this.components;return(0,i.jsx)(zo,{apis:this.getApiHolder(),children:(0,i.jsx)(Fs,{appContext:e,children:(0,i.jsx)(ht,{children:(0,i.jsx)(js,{routePaths:E.paths,routeParents:E.parents,routeObjects:E.objects,routeBindings:N,basePath:Ys(J.api),children:(0,i.jsx)(Cr.Provider,{value:{routeObjects:E.objects,appIdentityProxy:this.appIdentityProxy},children:(0,i.jsx)(d.Suspense,{fallback:(0,i.jsx)(Et,{}),children:a})})})})})})}}getRouter(){return Or}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 Ho.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder}this.apiFactoryRegistry.register("static",{api:Xn,deps:{},factory:()=>Jn.createWithStorage(this.themes)}),this.apiFactoryRegistry.register("static",{api:de.D,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:ve.$,deps:{},factory:()=>this.appIdentityProxy}),this.apiFactoryRegistry.register("static",{api:hr,deps:{},factory:()=>this.appLanguageApi}),this.apiFactoryRegistry.register("default",{api:vs.o,deps:{languageApi:hr},factory:({languageApi:e})=>_o.create({languageApi:e,resources:this.translationResources})}),this.apiFactoryRegistry.register("default",{api:hn.W,deps:{},factory:()=>new gs});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 Ho.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder=new Ho(this.apiFactoryRegistry),this.apiHolder}verifyPlugins(e){const n=new Set;for(const s of e){const a=s.getId();if(n.has(a))throw new Error(`Duplicate plugin found '${a}'`);n.add(a)}}constructor(e){var n,s,a;(0,b._)(this,"apiHolder",void 0),(0,b._)(this,"configApi",void 0),(0,b._)(this,"apis",void 0),(0,b._)(this,"icons",void 0),(0,b._)(this,"plugins",void 0),(0,b._)(this,"featureFlags",void 0),(0,b._)(this,"components",void 0),(0,b._)(this,"themes",void 0),(0,b._)(this,"configLoader",void 0),(0,b._)(this,"defaultApis",void 0),(0,b._)(this,"bindRoutes",void 0),(0,b._)(this,"appLanguageApi",void 0),(0,b._)(this,"translationResources",void 0),(0,b._)(this,"appIdentityProxy",new $s),(0,b._)(this,"apiFactoryRegistry",void 0),(0,ue._)(this,tr,{writable:!0,value:!1});var l;this.apis=(l=e.apis)!==null&&l!==void 0?l:[],this.icons=e.icons;var C;this.plugins=new Set((C=e.plugins)!==null&&C!==void 0?C:[]);var E;this.featureFlags=(E=e.featureFlags)!==null&&E!==void 0?E:[],this.components=e.components,this.themes=e.themes;var L;this.configLoader=(L=e.configLoader)!==null&&L!==void 0?L:xr;var N;this.defaultApis=(N=e.defaultApis)!==null&&N!==void 0?N:[],this.bindRoutes=e.bindRoutes,this.apiFactoryRegistry=new ms,this.appLanguageApi=ro.createWithStorage({defaultLanguage:(n=e.__experimentalTranslations)===null||n===void 0?void 0:n.defaultLanguage,availableLanguages:(s=e.__experimentalTranslations)===null||s===void 0?void 0:s.availableLanguages});var J;this.translationResources=(J=(a=e.__experimentalTranslations)===null||a===void 0?void 0:a.resources)!==null&&J!==void 0?J:[]}}function oi(r){return new ni(r)}function ri(r){var e,n,s,a;return oi({...r,apis:(e=r==null?void 0:r.apis)!==null&&e!==void 0?e:[],bindRoutes:r==null?void 0:r.bindRoutes,components:{...I,...r==null?void 0:r.components},configLoader:r==null?void 0:r.configLoader,defaultApis:bo,icons:{...Bo,...r==null?void 0:r.icons},plugins:(n=r==null?void 0:r.plugins)!==null&&n!==void 0?n:[],featureFlags:(s=r==null?void 0:r.featureFlags)!==null&&s!==void 0?s:[],themes:(a=r==null?void 0:r.themes)!==null&&a!==void 0?a:Ie})}var co=t(2532);let Dr=!1;const Lr=r=>{const e=(0,Ar.q)(),{NotFoundErrorPage:n}=e.getComponents(),s=(0,d.useMemo)(()=>Rn(),[]),l=[...(0,co.v)(r.children,C=>C.getElements().flatMap(E=>{let L=E.props.path;if(L==="")return[];var N;L=(N=L==null?void 0:L.replace(/\/\*$/,""))!==null&&N!==void 0?N:"/";let J=s?E:E.props.element;return!s&&!J&&(J=E,Dr||(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] />} />."),Dr=!0)),[{path:L,element:J,children:E.props.children?[{path:L==="/"?"/":"*",element:E.props.children}]:void 0}]}).sort((E,L)=>L.path.localeCompare(E.path)).map(E=>({...E,path:E.path==="/"?"/":`${E.path}/*`}))),{path:"*",element:(0,i.jsx)(n,{})}];return(0,v.V$)(l)};(0,Oe.R)(Lr,"core.type","FlatRoutes");var on=t(74314),si=t(51547),ii=t(88797);function jr(r){return!r.cursor}function Ma(r){return!jr(r)}const we="catalog";var Pe=t(23587);class ai{async analyzeLocation(e,n){const s=await this.discoveryApi.getBaseUrl(we),a="/analyze-location",l=Pe.parse(a).expand({});return await this.fetchApi.fetch(`${s}${l}`,{headers:{"Content-Type":"application/json",...(n==null?void 0:n.token)&&{Authorization:`Bearer ${n==null?void 0:n.token}`}},method:"POST",body:JSON.stringify(e.body)})}async createLocation(e,n){const s=await this.discoveryApi.getBaseUrl(we),a="/locations{?dryRun}",l=Pe.parse(a).expand({...e.query});return await this.fetchApi.fetch(`${s}${l}`,{headers:{"Content-Type":"application/json",...(n==null?void 0:n.token)&&{Authorization:`Bearer ${n==null?void 0:n.token}`}},method:"POST",body:JSON.stringify(e.body)})}async deleteEntityByUid(e,n){const s=await this.discoveryApi.getBaseUrl(we),a="/entities/by-uid/{uid}",l=Pe.parse(a).expand({uid:e.path.uid});return await this.fetchApi.fetch(`${s}${l}`,{headers:{"Content-Type":"application/json",...(n==null?void 0:n.token)&&{Authorization:`Bearer ${n==null?void 0:n.token}`}},method:"DELETE"})}async deleteLocation(e,n){const s=await this.discoveryApi.getBaseUrl(we),a="/locations/{id}",l=Pe.parse(a).expand({id:e.path.id});return await this.fetchApi.fetch(`${s}${l}`,{headers:{"Content-Type":"application/json",...(n==null?void 0:n.token)&&{Authorization:`Bearer ${n==null?void 0:n.token}`}},method:"DELETE"})}async getEntities(e,n){const s=await this.discoveryApi.getBaseUrl(we),a="/entities{?fields,limit,filter*,offset,after,order*}",l=Pe.parse(a).expand({...e.query});return await this.fetchApi.fetch(`${s}${l}`,{headers:{"Content-Type":"application/json",...(n==null?void 0:n.token)&&{Authorization:`Bearer ${n==null?void 0:n.token}`}},method:"GET"})}async getEntitiesByQuery(e,n){const s=await this.discoveryApi.getBaseUrl(we),a="/entities/by-query{?fields,limit,orderField*,cursor,filter*,fullTextFilterTerm,fullTextFilterFields}",l=Pe.parse(a).expand({...e.query});return await this.fetchApi.fetch(`${s}${l}`,{headers:{"Content-Type":"application/json",...(n==null?void 0:n.token)&&{Authorization:`Bearer ${n==null?void 0:n.token}`}},method:"GET"})}async getEntitiesByRefs(e,n){const s=await this.discoveryApi.getBaseUrl(we),a="/entities/by-refs",l=Pe.parse(a).expand({});return await this.fetchApi.fetch(`${s}${l}`,{headers:{"Content-Type":"application/json",...(n==null?void 0:n.token)&&{Authorization:`Bearer ${n==null?void 0:n.token}`}},method:"POST",body:JSON.stringify(e.body)})}async getEntityAncestryByName(e,n){const s=await this.discoveryApi.getBaseUrl(we),a="/entities/by-name/{kind}/{namespace}/{name}/ancestry",l=Pe.parse(a).expand({kind:e.path.kind,namespace:e.path.namespace,name:e.path.name});return await this.fetchApi.fetch(`${s}${l}`,{headers:{"Content-Type":"application/json",...(n==null?void 0:n.token)&&{Authorization:`Bearer ${n==null?void 0:n.token}`}},method:"GET"})}async getEntityByName(e,n){const s=await this.discoveryApi.getBaseUrl(we),a="/entities/by-name/{kind}/{namespace}/{name}",l=Pe.parse(a).expand({kind:e.path.kind,namespace:e.path.namespace,name:e.path.name});return await this.fetchApi.fetch(`${s}${l}`,{headers:{"Content-Type":"application/json",...(n==null?void 0:n.token)&&{Authorization:`Bearer ${n==null?void 0:n.token}`}},method:"GET"})}async getEntityByUid(e,n){const s=await this.discoveryApi.getBaseUrl(we),a="/entities/by-uid/{uid}",l=Pe.parse(a).expand({uid:e.path.uid});return await this.fetchApi.fetch(`${s}${l}`,{headers:{"Content-Type":"application/json",...(n==null?void 0:n.token)&&{Authorization:`Bearer ${n==null?void 0:n.token}`}},method:"GET"})}async getEntityFacets(e,n){const s=await this.discoveryApi.getBaseUrl(we),a="/entity-facets{?facet*,filter*}",l=Pe.parse(a).expand({...e.query});return await this.fetchApi.fetch(`${s}${l}`,{headers:{"Content-Type":"application/json",...(n==null?void 0:n.token)&&{Authorization:`Bearer ${n==null?void 0:n.token}`}},method:"GET"})}async getLocation(e,n){const s=await this.discoveryApi.getBaseUrl(we),a="/locations/{id}",l=Pe.parse(a).expand({id:e.path.id});return await this.fetchApi.fetch(`${s}${l}`,{headers:{"Content-Type":"application/json",...(n==null?void 0:n.token)&&{Authorization:`Bearer ${n==null?void 0:n.token}`}},method:"GET"})}async getLocations(e,n){const s=await this.discoveryApi.getBaseUrl(we),a="/locations",l=Pe.parse(a).expand({});return await this.fetchApi.fetch(`${s}${l}`,{headers:{"Content-Type":"application/json",...(n==null?void 0:n.token)&&{Authorization:`Bearer ${n==null?void 0:n.token}`}},method:"GET"})}async refreshEntity(e,n){const s=await this.discoveryApi.getBaseUrl(we),a="/refresh",l=Pe.parse(a).expand({});return await this.fetchApi.fetch(`${s}${l}`,{headers:{"Content-Type":"application/json",...(n==null?void 0:n.token)&&{Authorization:`Bearer ${n==null?void 0:n.token}`}},method:"POST",body:JSON.stringify(e.body)})}async validateEntity(e,n){const s=await this.discoveryApi.getBaseUrl(we),a="/validate-entity",l=Pe.parse(a).expand({});return await this.fetchApi.fetch(`${s}${l}`,{headers:{"Content-Type":"application/json",...(n==null?void 0:n.token)&&{Authorization:`Bearer ${n==null?void 0:n.token}`}},method:"POST",body:JSON.stringify(e.body)})}constructor(e){(0,b._)(this,"discoveryApi",void 0),(0,b._)(this,"fetchApi",void 0),this.discoveryApi=e.discoveryApi,this.fetchApi=e.fetchApi||{fetch:$n()}}}class li{async getEntityAncestors(e,n){return await this.requestRequired(await this.apiClient.getEntityAncestryByName({path:(0,on.of)(e.entityRef)},n))}async getLocationById(e,n){return await this.requestOptional(await this.apiClient.getLocation({path:{id:e}},n))}async getEntities(e,n){const{filter:s=[],fields:a=[],order:l,offset:C,limit:E,after:L}=e!=null?e:{},N=[];if(l)for(const ht of[l].flat())ht&&N.push(`${ht.order}:${ht.field}`);const J=await this.requestRequired(await this.apiClient.getEntities({query:{fields:a,limit:E,filter:this.getFilterValue(s),offset:C,after:L,order:l?N:void 0}},n)),at=(ht,Et)=>{var At,Zt;if(((At=ht.metadata)===null||At===void 0?void 0:At.name)===void 0||ht.kind===void 0||((Zt=Et.metadata)===null||Zt===void 0?void 0:Zt.name)===void 0||Et.kind===void 0)return 0;const Gt=(0,on.eE)(ht),te=(0,on.eE)(Et);return Gt<te?-1:Gt>te?1:0};return{items:J.sort(at)}}async getEntitiesByRefs(e,n){const s=await this.apiClient.getEntitiesByRefs({body:e},n);if(!s.ok)throw await Qe.V.fromResponse(s);const{items:a}=await s.json();return{items:a.map(l=>l!=null?l:void 0)}}async queryEntities(e={},n){const s={};if(jr(e)){var a,l;const{fields:C=[],filter:E,limit:L,orderFields:N,fullTextFilter:J}=e;s.filter=this.getFilterValue(E),L!==void 0&&(s.limit=L),N!==void 0&&(s.orderField=(Array.isArray(N)?N:[N]).map(({field:ht,order:Et})=>`${ht},${Et}`)),C.length&&(s.fields=C);const at=J==null||(a=J.term)===null||a===void 0?void 0:a.trim();at&&(s.fullTextFilterTerm=at),!(J==null||(l=J.fields)===null||l===void 0)&&l.length&&(s.fullTextFilterFields=J.fields)}else{const{fields:C=[],limit:E,cursor:L}=e;s.cursor=L,E!==void 0&&(s.limit=E),C.length&&(s.fields=C)}return this.apiClient.getEntitiesByQuery({query:s},n).then(C=>C.json())}async getEntityByRef(e,n){return this.requestOptional(await this.apiClient.getEntityByName({path:(0,on.of)(e)},n))}async getEntityByName(e,n){const{kind:s,namespace:a="default",name:l}=e;return this.requestOptional(await this.apiClient.getEntityByName({path:{kind:s,namespace:a,name:l}},n))}async refreshEntity(e,n){const s=await this.apiClient.refreshEntity({body:{entityRef:e}},n);if(s.status!==200)throw new Error(await s.text())}async getEntityFacets(e,n){const{filter:s=[],facets:a}=e;return await this.requestOptional(await this.apiClient.getEntityFacets({query:{facet:a,filter:this.getFilterValue(s)}},n))}async addLocation(e,n){const{type:s="url",target:a,dryRun:l}=e,C=await this.apiClient.createLocation({body:{type:s,target:a},query:{dryRun:l?"true":void 0}},n);if(C.status!==201)throw new Error(await C.text());const{location:E,entities:L,exists:N}=await C.json();if(!E)throw new Error(`Location wasn't added: ${a}`);return{location:E,entities:L,exists:N}}async getLocationByRef(e,n){return(await this.requestRequired(await this.apiClient.getLocations({},n))).map(a=>a.data).find(a=>e===(0,si.NZ)(a))}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,s){const a=await this.apiClient.validateEntity({body:{entity:e,location:n}},s);if(a.ok)return{valid:!0};if(a.status!==400)throw await Qe.V.fromResponse(a);const{errors:l=[]}=await a.json();return{valid:!1,errors:l}}async requestIgnored(e){if(!e.ok)throw await Qe.V.fromResponse(e)}async requestRequired(e){if(!e.ok)throw await Qe.V.fromResponse(e);return e.json()}async requestOptional(e){if(!e.ok){if(e.status===404)return;throw await Qe.V.fromResponse(e)}return await e.json()}getFilterValue(e=[]){const n=[];for(const s of[e].flat()){const a=[];for(const[l,C]of Object.entries(s))for(const E of[C].flat())E===ii.n?a.push(l):typeof E=="string"&&a.push(`${l}=${E}`);a.length&&n.push(a.join(","))}return n}constructor(e){(0,b._)(this,"apiClient",void 0),this.apiClient=new ai(e)}}var Mr=t(88624),ci=t(36802),di=t(51271),Br=t(36434),yn=t(65524),ui=t(15006),je=t(82963),hi=t(53945),En=t(76635);async function fi({storageApi:r}){const e=r.forBucket("settings"),n=r.forBucket("starredEntities"),s=e.snapshot("starredEntities").value;if(!(0,En.isArray)(s))return;var a;const l=new Set((a=n.snapshot("entityRefs").value)!==null&&a!==void 0?a:[]);s.filter(En.isString).map(C=>C.split(":")).filter(C=>C.length===4&&C[0]==="entity").map(([C,E,L,N])=>(0,on.eE)({kind:E,namespace:L,name:N})).forEach(C=>l.add(C)),await n.set("entityRefs",Array.from(l)),await e.remove("starredEntities")}class pi{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}notifyChanges(){for(const e of this.subscribers)e.next(new Set(this.starredEntities))}constructor(e){(0,b._)(this,"settingsStore",void 0),(0,b._)(this,"starredEntities",void 0),(0,b._)(this,"subscribers",new Set),(0,b._)(this,"observable",new(X())(s=>(s.next(new Set(this.starredEntities)),this.subscribers.add(s),()=>{this.subscribers.delete(s)}))),fi(e).then(),this.settingsStore=e.storageApi.forBucket("starredEntities");var n;this.starredEntities=new Set((n=this.settingsStore.snapshot("entityRefs").value)!==null&&n!==void 0?n:[]),this.settingsStore.observe$("entityRefs").subscribe({next:s=>{var a;this.starredEntities=new Set((a=s.value)!==null&&a!==void 0?a:[]),this.notifyChanges()}})}}function er(r){const{years:e=0,months:n=0,weeks:s=0,days:a=0,hours:l=0,minutes:C=0,seconds:E=0,milliseconds:L=0}=r;return((((e*365+n*30+s*7+a)*24+l)*60+C)*60+E)*1e3+L}var gi=t(99798),vi=t.n(gi),mi=t(12830),yi=t.n(mi),Ei=t(68203);const xi={seconds:10},Ci={milliseconds:50},Ai={api:zn.Z,component:Hn.Z,system:Zn.Z,resource:Gn.Z,domain:Wn.Z,location:Kn.Z,user:Sn.Z,group:An.Z,template:Vn.Z};function Ur(r){return{async:r.async,render:({entityRef:e,entity:n,context:s})=>({snapshot:(0,Ei.n)(n||e,s),loadEntity:r.async})}}var uo=new WeakMap,nr=new WeakMap,ho=new WeakMap,or=new WeakMap,fo=new WeakMap,Fr=new WeakSet,$r=new WeakSet,Nr=new WeakSet;class po{static createLocal(){return new po({renderer:Ur({async:!1})})}static create(e){return new po(e)}forEntity(e,n){const{entityRef:s,kind:a,entity:l,needsLoad:C}=(0,Fe._)(this,Fr,Si).call(this,e),E=J=>{const{snapshot:at}=(0,wt._)(this,fo).render({entityRef:s,loading:J.loading,entity:J.entity,context:n||{}});return{...at,entityRef:s,Icon:(0,Fe._)(this,Nr,Oi).call(this,at.Icon,a)}};let L;try{L=E({loading:C,entity:l})}catch{L={primaryTitle:s,entityRef:s}}const N=C?new(X())(J=>{let at=!1;return Promise.resolve().then(()=>{var ht;return(ht=(0,wt._)(this,ho))===null||ht===void 0?void 0:ht.load(s)}).then(ht=>{if(!at&&ht&&ht.metadata.etag!==(l==null?void 0:l.metadata.etag)){const Et=E({loading:!1,entity:ht});J.next(Et)}}).catch(()=>{}).finally(()=>{at||J.complete()}),()=>{at=!0}}):void 0;return{snapshot:L,update$:N}}constructor(e){(0,en._)(this,Fr),(0,en._)(this,$r),(0,en._)(this,Nr),(0,ue._)(this,uo,{writable:!0,value:void 0}),(0,ue._)(this,nr,{writable:!0,value:void 0}),(0,ue._)(this,ho,{writable:!0,value:void 0}),(0,ue._)(this,or,{writable:!0,value:void 0}),(0,ue._)(this,fo,{writable:!0,value:void 0});var n;const s=(n=e.cacheTtl)!==null&&n!==void 0?n:xi;var a;const l=(a=e.batchDelay)!==null&&a!==void 0?a:Ci;var C;const E=(C=e.renderer)!==null&&C!==void 0?C:Ur({async:!0}),L={};Object.entries(Ai).forEach(([J,at])=>{L[J.toLocaleLowerCase("en-US")]=at});var N;if(Object.entries((N=e.kindIcons)!==null&&N!==void 0?N:{}).forEach(([J,at])=>{L[J.toLocaleLowerCase("en-US")]=at}),E.async){if(!e.catalogApi)throw new TypeError("Asynchronous rendering requires a catalog API");(0,he._)(this,ho,(0,Fe._)(this,$r,bi).call(this,{cacheTtl:s,batchDelay:l,renderer:E,catalogApi:e.catalogApi}))}(0,he._)(this,nr,er(s)),(0,he._)(this,uo,new Map),(0,he._)(this,or,L),(0,he._)(this,fo,E)}}function Si(r){if(typeof r!="string")return{entity:r,kind:r.kind,entityRef:(0,on.eE)(r),needsLoad:!1};const e=(0,wt._)(this,uo).get(r),n=e==null?void 0:e.entity,a=(!e||Date.now()-e.updatedAt>(0,wt._)(this,nr))&&(0,wt._)(this,fo).async!==!1&&(0,wt._)(this,ho)!==void 0;return{entity:n,kind:(0,on.of)(r).kind,entityRef:r,needsLoad:a}}function bi(r){const e=er(r.cacheTtl),n=er(r.batchDelay);return new(vi())(async s=>{const{items:a}=await r.catalogApi.getEntitiesByRefs({entityRefs:s}),l=Date.now();return s.forEach((C,E)=>{(0,wt._)(this,uo).set(C,{updatedAt:l,entity:a[E]})}),a},{name:"DefaultEntityPresentationApi",cacheMap:new(yi())(e),maxBatchSize:100,batchScheduleFn:n?s=>setTimeout(s,n):void 0})}function Oi(r,e){return r||(r===!1?!1:(0,wt._)(this,or)[e.toLocaleLowerCase("en-US")])}const Le=(0,ui.r)({id:"catalog",apis:[(0,kt.n)({api:Mr.A,deps:{discoveryApi:oe.N,fetchApi:Fn.g},factory:({discoveryApi:r,fetchApi:e})=>new li({discoveryApi:r,fetchApi:e})}),(0,kt.n)({api:ci.p,deps:{storageApi:Un},factory:({storageApi:r})=>new pi({storageApi:r})}),(0,kt.n)({api:di.X,deps:{catalogApi:Mr.A},factory:({catalogApi:r})=>po.create({catalogApi:r})})],routes:{catalogIndex:yn._Z,catalogEntity:Br.w},externalRoutes:{createComponent:yn.yw,viewTechDoc:yn.jU,createFromTemplate:yn.ql,unregisterRedirect:yn.kR}}),Ba=Le.provide((0,je.P4)({name:"CatalogIndexPage",component:()=>Promise.all([t.e(9993),t.e(6332),t.e(87)]).then(t.bind(t,20087)).then(r=>r.CatalogPage),mountPoint:yn._Z})),wi=Le.provide((0,je.P4)({name:"CatalogEntityPage",component:()=>t.e(8951).then(t.bind(t,78951)).then(r=>r.CatalogEntityPage),mountPoint:Br.w})),Ua=Le.provide((0,je.CO)({name:"EntityAboutCard",component:{lazy:()=>Promise.all([t.e(9993),t.e(8118),t.e(4917)]).then(t.bind(t,34917)).then(r=>r.AboutCard)}})),Fa=Le.provide((0,je.CO)({name:"EntityLinksCard",component:{lazy:()=>t.e(7750).then(t.bind(t,17750)).then(r=>r.EntityLinksCard)}})),$a=Le.provide((0,je.CO)({name:"EntityLabelsCard",component:{lazy:()=>t.e(5877).then(t.bind(t,85877)).then(r=>r.EntityLabelsCard)}})),Na=Le.provide((0,je.CO)({name:"EntityHasSystemsCard",component:{lazy:()=>t.e(5458).then(t.bind(t,5458)).then(r=>r.HasSystemsCard)}})),Wa=Le.provide((0,je.CO)({name:"EntityHasComponentsCard",component:{lazy:()=>t.e(1105).then(t.bind(t,1105)).then(r=>r.HasComponentsCard)}})),Za=Le.provide((0,je.CO)({name:"EntityHasSubcomponentsCard",component:{lazy:()=>t.e(2440).then(t.bind(t,82440)).then(r=>r.HasSubcomponentsCard)}})),ka=Le.provide((0,je.CO)({name:"EntityHasResourcesCard",component:{lazy:()=>t.e(9770).then(t.bind(t,79770)).then(r=>r.HasResourcesCard)}})),za=Le.provide((0,je.CO)({name:"EntityDependsOnComponentsCard",component:{lazy:()=>t.e(9545).then(t.bind(t,19545)).then(r=>r.DependsOnComponentsCard)}})),Ka=Le.provide((0,je.CO)({name:"EntityDependencyOfComponentsCard",component:{lazy:()=>t.e(184).then(t.bind(t,40184)).then(r=>r.DependencyOfComponentsCard)}})),Ha=Le.provide((0,je.CO)({name:"EntityDependsOnResourcesCard",component:{lazy:()=>t.e(1032).then(t.bind(t,81032)).then(r=>r.DependsOnResourcesCard)}})),Ga=Le.provide((0,je.CO)({name:"RelatedEntitiesCard",component:{lazy:()=>t.e(3487).then(t.bind(t,33487)).then(r=>r.RelatedEntitiesCard)}})),Va=Le.provide((0,hi.E5)({name:"CatalogSearchResultListItem",component:()=>t.e(7670).then(t.bind(t,27670)).then(r=>r.CatalogSearchResultListItem),predicate:r=>r.type==="software-catalog"}));var Wr=t(91657),Zr=t(58496);class Pi{async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getStorageUrl(){return`${await this.discoveryApi.getBaseUrl("techdocs")}/static/docs`}async getBuilder(){return this.configApi.getString("techdocs.builder")}async getEntityDocs(e,n){const a=`${await this.getApiOrigin()}/${n}`,l=await fetch(`${a.endsWith("/")?a:`${a}/`}index.html`);if(l.status===404)throw new Error("Page not found");return l.text()}async syncEntityDocs(e){return"cached"}async getBaseUrl(e,n,s){const a=await this.getApiOrigin();return new URL(e,`${a}/${s}`).toString()}constructor({configApi:e,discoveryApi:n,identityApi:s}){(0,b._)(this,"configApi",void 0),(0,b._)(this,"discoveryApi",void 0),(0,b._)(this,"identityApi",void 0),this.configApi=e,this.discoveryApi=n,this.identityApi=s}}class Ti{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:""}}constructor({configApi:e,discoveryApi:n,identityApi:s}){(0,b._)(this,"configApi",void 0),(0,b._)(this,"discoveryApi",void 0),(0,b._)(this,"identityApi",void 0),this.configApi=e,this.discoveryApi=n,this.identityApi=s}}const Ri=[(0,kt.n)({api:Zr.D,deps:{configApi:de.D,discoveryApi:oe.N,identityApi:ve.$},factory:({configApi:r,discoveryApi:e,identityApi:n})=>new Pi({configApi:r,discoveryApi:e,identityApi:n})}),(0,kt.n)({api:Zr.g,deps:{configApi:de.D,discoveryApi:oe.N,identityApi:ve.$},factory:({configApi:r,discoveryApi:e,identityApi:n})=>new Ti({configApi:r,discoveryApi:e,identityApi:n})}),(0,kt.n)({api:Wr.q,deps:{configApi:de.D},factory:({configApi:r})=>Wr.a.fromConfig(r)})],Ii={backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}},Di={backend:{baseUrl:"http://localhost:7007"},techdocs:{builder:"external"}};async function Li(){const r=await fetch("/.detect");return r.ok?(await r.text()).trim()==="techdocs-cli-server":!1}async function ji(){const r=await xr(),e=await Li();return[...r,{context:"detected",data:e?Ii:Di}]}var He=t(79692),Mi=t(58845);const Bi=(0,He.Z)({svg:{width:"auto",height:30},path:{fill:"#7df3e1"}});var Ui=()=>{const r=Bi();return(0,i.jsx)("svg",{className:r.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 2079.95 456.05",children:(0,i.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"})})};const Fi=(0,He.Z)({svg:{width:"auto",height:28},path:{fill:"#7df3e1"}});var $i=()=>{const r=Fi();return(0,i.jsx)("svg",{className:r.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 337.46 428.5",children:(0,i.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"})})},Ae=t(76921);const kr={isOpen:!1,setOpen:()=>{}},zr=(0,d.createContext)(kr),Kr=(0,Xe.CT)("sidebar-open-state-context");function Hr(r){const{children:e,value:n}=r;return(0,i.jsx)(zr.Provider,{value:n,children:(0,i.jsx)(Kr.Provider,{value:(0,dn.E)({1:n}),children:e})})}const rr=()=>{const r=(0,d.useContext)(Kr),e=(0,d.useContext)(zr);if(r===void 0)return e||kr;const n=r.atVersion(1);if(n===void 0)throw new Error("No context found for version 1.");return n};var Gr=t(98864),Vr=t(44409),_e=t(62774),Yr=t(41156),Ni=t(12524),rn=t.n(Ni),Wi=t(50023),Qr=t(61837),Zi=t(4190),sr=t(90436),ki=t(87685),zi=t(44882),Ki=t(57998);const Jr=(0,d.createContext)({selectedMenuItemIndex:-1,setSelectedMenuItemIndex:()=>{}});var ir=t(93539);const Hi=(0,He.Z)(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"}})),Gi=r=>{const{to:e,label:n,icon:s,value:a}=r,{sidebarConfig:l}=(0,d.useContext)(Ae.kG),C=Hi({sidebarConfig:l}),E=(0,v.TH)(),{selectedMenuItemIndex:L,setSelectedMenuItemIndex:N}=(0,d.useContext)(Jr),J=(ht,Et)=>{N(Et===L?-1:Et)},at=a===L&&L>=0||a!==L&&!(L>=0)&&e===E.pathname;return(0,i.jsx)(Ki.Z,{"aria-label":n,label:n,icon:s,component:Gr.rU,to:e||E.pathname,onChange:J,value:a,selected:at,classes:C})},Xr=r=>{const{children:e,to:n,label:s,icon:a,value:l}=r,{isMobile:C}=(0,ir.Pf)();return C?(0,i.jsx)(Gi,{to:n,label:s,icon:a,value:l}):(0,i.jsx)(i.Fragment,{children:e})},_r=(0,He.Z)(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`})})),Vi=r=>(0,En.orderBy)(r,({props:{priority:e}})=>Number.isInteger(e)?e:-1,"desc"),Yi=d.createElement(Xr).type,Qi=({children:r,label:e="Menu",open:n,onClose:s})=>{const{sidebarConfig:a}=(0,d.useContext)(Ae.kG),l=_r({sidebarConfig:a});return(0,i.jsxs)(Zi.ZP,{anchor:"bottom",open:n,onClose:s,ModalProps:{BackdropProps:{classes:{root:l.marginMobileSidebar}}},classes:{root:l.marginMobileSidebar,paperAnchorBottom:l.overlay},children:[(0,i.jsxs)(_e.Z,{className:l.overlayHeader,children:[(0,i.jsx)(sr.Z,{variant:"h3",children:e}),(0,i.jsx)(Qr.Z,{onClick:s,classes:{root:l.overlayHeaderClose},children:(0,i.jsx)(ki.Z,{})})]}),(0,i.jsx)(_e.Z,{component:"nav",children:r})]})},Ji=r=>{const{sidebarConfig:e}=(0,d.useContext)(Ae.kG),{children:n}=r,s=_r({sidebarConfig:e}),a=(0,v.TH)(),[l,C]=(0,d.useState)(-1);(0,d.useEffect)(()=>{C(-1)},[a.pathname]);let E=(0,co.v)(n,N=>N.getElements().filter(J=>J.type===Yi));if(n)E.length?E=Vi(E):E.push((0,i.jsx)(Xr,{icon:(0,i.jsx)(zi.Z,{}),children:n},"default_menu"));else return null;const L=l>=0&&!E[l].props.to;return(0,i.jsx)(Hr,{value:{isOpen:!0,setOpen:()=>{}},children:(0,i.jsxs)(Jr.Provider,{value:{selectedMenuItemIndex:l,setSelectedMenuItemIndex:C},children:[(0,i.jsx)(Qi,{label:E[l]&&E[l].props.label,open:L,onClose:()=>C(-1),children:E[l]&&E[l].props.children}),(0,i.jsx)(Wi.Z,{className:s.root,"data-testid":"mobile-sidebar-root",component:"nav",children:E})]})})},qr=(0,He.Z)(r=>({drawer:{display:"flex",flexFlow:"column nowrap",alignItems:"flex-start",position:"fixed",left:0,top:0,bottom:0,zIndex:r.zIndex.appBar,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 ts;(function(r){r[r.Closed=0]="Closed",r[r.Idle=1]="Idle",r[r.Open=2]="Open"})(ts||(ts={}));const Xi=r=>{const{sidebarConfig:e}=(0,d.useContext)(Ae.kG),{openDelayMs:n=e.defaultOpenDelayMs,closeDelayMs:s=e.defaultCloseDelayMs,disableExpandOnHover:a,children:l}=r,C=qr({sidebarConfig:e}),E=(0,Yr.Z)(te=>te.breakpoints.down("md"),{noSsr:!0}),[L,N]=(0,d.useState)(0),J=(0,d.useRef)(),{isPinned:at,toggleSidebarPinState:ht}=(0,ir.Pf)(),Et=()=>{at||a||(J.current&&(clearTimeout(J.current),J.current=void 0),L!==2&&!E&&(J.current=window.setTimeout(()=>{J.current=void 0,N(2)},n),N(1)))},At=()=>{at||a||(J.current&&(clearTimeout(J.current),J.current=void 0),L===1?N(0):L===2&&(J.current=window.setTimeout(()=>{J.current=void 0,N(0)},s)))},Zt=L===2&&!E||at,Gt=te=>{te?(N(2),ht()):(N(0),ht())};return(0,i.jsxs)("nav",{style:{},"aria-label":"sidebar nav",children:[(0,i.jsx)(qi,{}),(0,i.jsx)(Hr,{value:{isOpen:Zt,setOpen:Gt},children:(0,i.jsx)(_e.Z,{className:C.root,"data-testid":"sidebar-root",onMouseEnter:a?()=>{}:Et,onFocus:a?()=>{}:Et,onMouseLeave:a?()=>{}:At,onBlur:a?()=>{}:At,children:(0,i.jsx)(_e.Z,{className:rn()(C.drawer,C.drawerWidth,{[C.drawerOpen]:Zt}),children:l})})})]})},_i=r=>{var e;const n=(0,Ae.$E)((e=r.sidebarOptions)!==null&&e!==void 0?e:{});var s;const a=(0,Ae.rW)((s=r.submenuOptions)!==null&&s!==void 0?s:{}),{children:l,disableExpandOnHover:C,openDelayMs:E,closeDelayMs:L}=r,{isMobile:N}=(0,ir.Pf)();return N?(0,i.jsx)(Ji,{children:l}):(0,i.jsx)(Ae.kG.Provider,{value:{sidebarConfig:n,submenuConfig:a},children:(0,i.jsx)(Xi,{openDelayMs:E,closeDelayMs:L,disableExpandOnHover:C,children:l})})};function qi(){const{sidebarConfig:r}=(0,d.useContext)(Ae.kG),{focusContent:e,contentRef:n}=(0,Vr.r)(),s=qr({sidebarConfig:r});return n!=null&&n.current?(0,i.jsx)(x.Z,{onClick:e,variant:"contained",className:rn()(s.visuallyHidden),children:"Skip to content"}):null}var ta=t(26739),go=t(1667),ea=t(83543),na=t(59797),es=t(98989);const oa=(0,He.Z)(r=>({root:{zIndex:1e3,position:"relative",overflow:"visible",width:r.spacing(7)+1},drawer:e=>{var n,s;return{display:"flex",flexFlow:"column nowrap",alignItems:"flex-start",position:"fixed",[r.breakpoints.up("sm")]:{marginLeft:e.left,transition:r.transitions.create("margin-left",{easing:r.transitions.easing.sharp,duration:r.transitions.duration.shortest})},top:0,bottom:0,padding:0,background:(s=(n=r.palette.navigation.submenu)===null||n===void 0?void 0:n.background)!==null&&s!==void 0?s:"#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=>({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.common.white,padding:r.spacing(2.5),[r.breakpoints.down("xs")]:{display:"none"}}}),{name:"BackstageSidebarSubmenu"}),ra=r=>{const{isOpen:e}=rr(),{sidebarConfig:n,submenuConfig:s}=(0,d.useContext)(Ae.kG),a=e?n.drawerWidthOpen:n.drawerWidthClosed,l=oa({left:a,submenuConfig:s}),{isHoveredOn:C}=(0,d.useContext)(Ae.Ag),[E,L]=(0,d.useState)(!1);return(0,d.useEffect)(()=>{L(C)},[C]),(0,i.jsxs)(_e.Z,{className:rn()(l.drawer,{[l.drawerOpen]:E}),children:[(0,i.jsx)(sr.Z,{variant:"h5",component:"span",className:l.title,children:r.title}),r.children]})};var sa=t(19126),ns=t.n(sa);function os(r,e,n=!1){const s=new URLSearchParams(e.search).toString(),a=ns().parse(s),l=new URLSearchParams(r.search).toString(),C=ns().parse(l),E=n?En.isEqual:En.isMatch;return(0,En.isEqual)(e.pathname,r.pathname)&&E(C,a)}const ia=r=>(0,He.Z)(e=>{var n,s,a,l;return{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:(a=(n=e.palette.navigation.navItem)===null||n===void 0?void 0:n.hoverBackground)!==null&&a!==void 0?a:"#404040"}},highlighted:{background:(l=(s=e.palette.navigation.navItem)===null||s===void 0?void 0:s.hoverBackground)!==null&&l!==void 0?l:"#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 vo(r){return(0,d.useMemo)(()=>ia(r),[r])()}const aa=(r,e)=>(0,co.v)(r.props.children,n=>{let s=!1;return n.getElements().forEach(({props:{to:a,dropdownItems:l}})=>{if(!s){if(l!=null&&l.length){l.forEach(({to:C})=>s=s||os(e,(0,Pn.i3)(C)));return}a&&(s=os(e,(0,Pn.i3)(a)))}}),s},[e.pathname]);function ar(r){return r.to===void 0}const la=d.createElement(ra).type,ca=d.forwardRef(function({to:e,end:n,style:s,className:a,activeStyle:l,caseSensitive:C,activeClassName:E="active","aria-current":L="page",...N},J){let{pathname:at}=(0,v.TH)(),{pathname:ht}=(0,v.WU)(e);C||(at=at.toLocaleLowerCase("en-US"),ht=ht.toLocaleLowerCase("en-US"));let Et=at===ht;!Et&&!n&&(Et=at.startsWith(`${ht}/`));const At=Et?L:void 0;return(0,i.jsx)(h.rU,{...N,to:e,ref:J,"aria-current":At,style:{...s,...Et?l:void 0},className:rn()([typeof a!="function"?a:void 0,Et?E:void 0])})}),rs=(0,d.forwardRef)((r,e)=>{const{icon:n,text:s,hasNotifications:a=!1,hasSubmenu:l=!1,disableHighlight:C=!1,onClick:E,noTrack:L,children:N,className:J,...at}=r,{sidebarConfig:ht}=(0,d.useContext)(Ae.kG),Et=vo(ht),{isOpen:At}=rr(),Zt=!At&&l?{display:"flex",marginLeft:"20px"}:{lineHeight:"0"},Gt=(0,i.jsxs)(_e.Z,{style:Zt,children:[(0,i.jsx)(n,{fontSize:"small"}),!At&&l?(0,i.jsx)(es.Z,{fontSize:"small"}):(0,i.jsx)(i.Fragment,{})]}),te=(0,i.jsx)(ta.Z,{color:"secondary",variant:"dot",overlap:"circular",invisible:!a,className:rn()({[Et.closedItemIcon]:!At}),children:Gt}),Ee=(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(_e.Z,{"data-testid":"login-button",className:Et.iconContainer,children:te}),s&&(0,i.jsx)(sr.Z,{variant:"subtitle2",component:"span",className:Et.label,children:s}),(0,i.jsx)("div",{className:Et.secondaryAction,children:N})]}),Ge=At?Ee:te,jn={onClick:E,className:rn()(J,Et.root,At?Et.open:Et.closed,ar(r)&&Et.buttonItem,{[Et.highlightable]:!C})},ls=(0,Sr.z)(),{pathname:lr}=(0,v.WU)(!ar(r)&&r.to?r.to:""),cs=(0,d.useCallback)(Ia=>{if(!L){const Da="click",La=s!=null?s:"Sidebar Item",ja=lr?{attributes:{to:lr}}:void 0;ls.captureEvent(Da,La,ja)}E==null||E(Ia)},[ls,s,lr,L,E]);return ar(r)?(0,i.jsx)(x.Z,{role:"button","aria-label":s,...jn,ref:e,onClick:cs,children:Ge}):(0,i.jsx)(ca,{...jn,activeClassName:Et.selected,to:r.to?r.to:"",ref:e,"aria-label":s||r.to,...at,onClick:cs,children:Ge})}),da=({children:r,...e})=>{const{sidebarConfig:n}=(0,d.useContext)(Ae.kG),s=vo(n),[a,l]=(0,d.useState)(!1),C=(0,v.TH)(),E=aa(r,C),L=(0,Yr.Z)(ht=>ht.breakpoints.down("sm")),N=()=>{l(!0)},J=()=>{l(!1)},at=()=>L?a?(0,i.jsx)(na.Z,{fontSize:"small",className:s.submenuArrow}):(0,i.jsx)(ea.Z,{fontSize:"small",className:s.submenuArrow}):!a&&(0,i.jsx)(es.Z,{fontSize:"small",className:s.submenuArrow});return(0,i.jsx)(Ae.Ag.Provider,{value:{isHoveredOn:a,setIsHoveredOn:l},children:(0,i.jsxs)("div",{"data-testid":"item-with-submenu",onMouseLeave:J,onTouchStart:a?J:N,onMouseEnter:N,className:rn()(a&&s.highlighted),children:[(0,i.jsx)(rs,{hasSubmenu:!0,className:E?s.selected:"",...e,children:at()}),a&&r]})})},ss=(0,d.forwardRef)((r,e)=>{const[n]=(0,co.v)(r.children,s=>s.getElements().filter(a=>a.type===la));return n?(0,i.jsx)(da,{...r,children:n}):(0,i.jsx)(rs,{...r,ref:e})});function Ja(r){const{sidebarConfig:e}=useContext(SidebarConfigContext),[n,s]=useState(""),a=vo(e),l=r.icon?r.icon:SearchIcon,C=()=>{r.onSearch(n),s("")},E=at=>{at.key==="Enter"&&(at.preventDefault(),C())},L=at=>{s(at.target.value)},N=at=>{at.preventDefault(),at.stopPropagation()},J=at=>{C(),at.preventDefault()};return _jsx(Box,{className:a.searchRoot,children:_jsx(ss,{icon:l,to:r.to,onClick:J,disableHighlight:!0,children:_jsx(TextField,{placeholder:"Search",value:n,onClick:N,onChange:L,onKeyDown:E,className:a.searchContainer,InputProps:{disableUnderline:!0,className:a.searchField},inputProps:{className:a.searchFieldHTMLInput}})})})}const Xa=(0,go.Z)("div")({flex:1},{name:"BackstageSidebarSpace"}),_a=(0,go.Z)("div")({height:8},{name:"BackstageSidebarSpacer"}),ua=(0,go.Z)("hr")(({theme:r})=>({height:1,width:"100%",background:"#383838",border:"none",margin:r.spacing(1.2,0)}),{name:"BackstageSidebarDivider"}),ha=r=>({overflowY:"auto","&::-webkit-scrollbar":{backgroundColor:r.palette.background.default,width:"5px",borderRadius:"5px"},"&::-webkit-scrollbar-thumb":{backgroundColor:r.palette.text.secondary,borderRadius:"5px"}}),qa=(0,go.Z)("div")(({theme:r})=>{const e=ha(r);return{flex:"0 1 auto",overflowX:"hidden",width:"calc(100% - 5px)",minHeight:"48px",overflowY:"hidden","@media (hover: none)":e,"&:hover":e}}),tl=()=>{const{sidebarConfig:r}=useContext(SidebarConfigContext),e=vo(r),{isOpen:n,setOpen:s}=useSidebarOpenState();if(useMediaQuery(C=>C.breakpoints.down("md"),{noSsr:!0}))return null;const l=()=>{s(!n)};return _jsx(Button,{role:"button",onClick:l,className:e.expandButton,"aria-label":"Expand Sidebar","data-testid":"sidebar-expand-button",children:_jsx(Box,{className:e.arrows,children:n?_jsx(DoubleArrowLeft,{}):_jsx(DoubleArrowRight,{})})})},fa=(0,He.Z)({root:{width:Ae.po.drawerWidthClosed,height:3*Ae.po.logoHeight,display:"flex",flexFlow:"row nowrap",alignItems:"center",marginBottom:-14},link:{width:Ae.po.drawerWidthClosed,marginLeft:24}}),pa=()=>{const r=fa(),{isOpen:e}=rr();return(0,i.jsx)("div",{className:r.root,children:(0,i.jsx)(Gr.rU,{to:"/docs/default/component/local/",underline:"none",className:r.link,children:e?(0,i.jsx)(Ui,{}):(0,i.jsx)($i,{})})})},ga=({children:r})=>(0,i.jsxs)(Vr.t,{children:[(0,i.jsxs)(_i,{children:[(0,i.jsx)(pa,{}),(0,i.jsx)(ua,{}),(0,i.jsx)(ss,{icon:Mi.Z,to:"/docs/default/component/local",text:"Docs Preview"})]}),r]});var va=t(80030),ma=t(32388),ya=t(4142),Ea=t(65386),xa=t(14540);const Ca=(0,He.Z)(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 is;(function(r){r.LIGHT="light",r.DARK="dark"})(is||(is={}));const Aa=()=>{const r=(0,wn.h_)(Xn),e=Ca(),[n,s]=(0,d.useState)(r.getActiveThemeId()==="dark"?"dark":"light"),a={light:{icon:ya.Z,title:"Dark theme"},dark:{icon:ma.Z,title:"Light theme"}},{title:l,icon:C}=a[n],E=()=>{s(L=>{const N=L==="light"?"dark":"light";return r.setActiveThemeId(N),N})};return(0,i.jsx)(_e.Z,{display:"flex",alignItems:"center",mr:2,children:(0,i.jsx)(va.ZP,{title:l,arrow:!0,children:(0,i.jsx)(Qr.Z,{size:"small",onClick:E,children:(0,i.jsx)(C,{className:e.headerIcon})})})})},Sa=()=>(0,i.jsxs)(g.I6,{children:[(0,i.jsx)(Ea.S,{}),(0,i.jsx)(xa.F,{withSearch:!1})]}),ba=(0,i.jsx)(Sa,{}),as=ri({apis:Ri,configLoader:ji,plugins:Object.values(o)}),Oa=as.getProvider(),wa=as.getRouter(),Pa=g.s4.provide((0,u.KY)({name:"ThemeToggleAddon",component:Aa,location:y.o.Header})),Ta=(0,i.jsxs)(Lr,{children:[(0,i.jsx)(v.Fg,{to:"/docs/default/component/local/"},"/"),(0,i.jsx)(v.AW,{path:"/catalog/:namespace/:kind/:name",element:(0,i.jsx)(wi,{})}),(0,i.jsx)(v.AW,{path:"/docs",element:(0,i.jsx)(g.Jl,{}),children:(0,i.jsx)(c.u,{})}),(0,i.jsxs)(v.AW,{path:"/docs/:namespace/:kind/:name/*",element:(0,i.jsx)(g.I6,{}),children:[ba,(0,i.jsx)(u.DR,{children:(0,i.jsx)(Pa,{})})]})]});var Ra=()=>(0,i.jsx)(Oa,{children:(0,i.jsx)(wa,{children:(0,i.jsx)(ga,{children:Ta})})});S.createRoot(document.getElementById("root")).render((0,i.jsx)(Ra,{}))},29651:function(G,w,t){"use strict";t.d(w,{CT:function(){return d},Vt:function(){return S}});var o=t(2784),i=t(96087);function d(g){return(0,i.u)(g,()=>(0,o.createContext)(void 0))}function S(g){return(0,o.useContext)(d(g))}function v(g){return{set(c){globalThis[`__@backstage/${g}__`]=createContext(createVersionedValueMap(c))},reset(){delete globalThis[`__@backstage/${g}__`]}}}},68993:function(G,w,t){"use strict";t.d(w,{E:function(){return o}});function o(i){Object.freeze(i);const d={atVersion(S){return i[S]}};return Object.defineProperty(d,"$map",{configurable:!0,enumerable:!0,get(){return i}}),d}},96087:function(G,w,t){"use strict";t.d(w,{u:function(){return S}});function o(){return typeof window!="undefined"&&window.Math===Math?window:typeof self!="undefined"&&self.Math===Math?self:Function("return this")()}const i=o(),d=v=>`__@backstage/${v}__`;function S(v,g){const c=d(v);let u=i[c];return u||(u=g(),i[c]=u,u)}},88624:function(G,w,t){"use strict";t.d(w,{A:function(){return i}});var o=t(95965);const i=(0,o.T)({id:"plugin.catalog.service"})},51271:function(G,w,t){"use strict";t.d(w,{X:function(){return i}});var o=t(95965);const i=(0,o.T)({id:"plugin.catalog.entity-presentation"})},68203:function(G,w,t){"use strict";t.d(w,{n:function(){return v}});var o=t(74314),i=t(34106),d=t(72579),S=t.n(d);function v(u,y){const{kind:x,namespace:O,name:m,title:A,description:h,displayName:M,type:R}=g(u),P=(0,o.eE)({kind:x||"unknown",namespace:O||i.zG,name:m||"unknown"}),j=c({kind:x,namespace:O,name:m,context:y}),I=[M,A,j].find(K=>K&&typeof K=="string"),b=[I!==P?P:void 0,R,h].filter(K=>K&&typeof K=="string").join(" | ");return{entityRef:P,primaryTitle:I,secondaryTitle:b||void 0,Icon:void 0}}function g(u){if(typeof u=="string"){let y=u.indexOf(":");const x=u.indexOf("/");x!==-1&&x<y&&(y=-1);const O=y===-1?void 0:u.slice(0,y),m=x===-1?void 0:u.slice(y+1,x),A=u.slice(Math.max(y+1,x+1));return{kind:O,namespace:m,name:A}}if(typeof u=="object"&&u!==null){const y=[S()(u,"kind")].find(R=>R&&typeof R=="string"),x=[S()(u,"metadata.namespace"),S()(u,"namespace")].find(R=>R&&typeof R=="string"),O=[S()(u,"metadata.name"),S()(u,"name")].find(R=>R&&typeof R=="string"),m=[S()(u,"metadata.title")].find(R=>R&&typeof R=="string"),A=[S()(u,"metadata.description")].find(R=>R&&typeof R=="string"),h=[S()(u,"spec.profile.displayName")].find(R=>R&&typeof R=="string"),M=[S()(u,"spec.type")].find(R=>R&&typeof R=="string");return{kind:y,namespace:x,name:O,title:m,description:A,displayName:h,type:M}}return{}}function c(u){var y,x,O,m,A;const h=((y=u.kind)===null||y===void 0?void 0:y.toLocaleLowerCase("en-US"))||"unknown",M=u.namespace||i.zG,R=u.name||"unknown",P=(O=u.context)===null||O===void 0||(x=O.defaultKind)===null||x===void 0?void 0:x.toLocaleLowerCase("en-US"),j=(A=u.context)===null||A===void 0||(m=A.defaultNamespace)===null||m===void 0?void 0:m.toLocaleLowerCase("en-US");let I=R;return(j&&M.toLocaleLowerCase("en-US")!==j||M!==i.zG)&&(I=`${M}/${I}`),P&&h.toLocaleLowerCase("en-US")!==P&&(I=`${h}:${I}`),I}},74780:function(G,w,t){"use strict";t.d(w,{V:function(){return c}});var o=t(74314),i=t(44394),d=t(2784),S=t(51271),v=t(68203);function g(u,y,x){const[O,m]=(0,d.useState)(u);return(0,d.useEffect)(()=>{m(u);const A=y==null?void 0:y.subscribe({next:h=>{m(h)},complete:()=>{A==null||A.unsubscribe()}});return()=>{A==null||A.unsubscribe()}},x),O}function c(u,y){const O=(0,i.I_)().get(S.X),m=[O,JSON.stringify(u),JSON.stringify(y||null)],A=(0,d.useMemo)(()=>O?O.forEntity(typeof u=="string"||"metadata"in u?u:(0,o.eE)(u),y):{snapshot:(0,v.n)(u,y)},m);return g(A.snapshot,A.update$,[A])}},36802:function(G,w,t){"use strict";t.d(w,{p:function(){return i}});var o=t(95965);const i=(0,o.T)({id:"catalog-react.starred-entities"})},30389:function(G,w,t){"use strict";t.d(w,{_i:function(){return A}});var o=t(52322),i=t(2784),d=t(41156),S=t(60364),v=t(77277),g=t(4190),c=t(62774),u=t(90436),y=t(60905),x=t(36444);const O=h=>{var M;const R=(0,d.Z)(K=>{var H,rt;return K.breakpoints.down((rt=(H=h.options)===null||H===void 0?void 0:H.drawerBreakpoint)!==null&&rt!==void 0?rt:"md")}),P=(0,S.Z)(),[j,I]=(0,i.useState)(!1);var b;return R?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(v.Z,{style:{marginTop:P.spacing(1),marginLeft:P.spacing(1)},onClick:()=>I(!0),startIcon:(0,o.jsx)(x.Z,{}),children:"Filters"}),(0,o.jsx)(g.ZP,{open:j,onClose:()=>I(!1),anchor:(b=(M=h.options)===null||M===void 0?void 0:M.drawerAnchor)!==null&&b!==void 0?b:"left",disableAutoFocus:!0,keepMounted:!0,variant:"temporary",children:(0,o.jsxs)(c.Z,{m:2,children:[(0,o.jsx)(u.Z,{variant:"h6",component:"h2",style:{marginBottom:P.spacing(1)},children:"Filters"}),h.children]})})]}):(0,o.jsx)(y.Z,{item:!0,lg:2,children:h.children})},m=h=>(0,o.jsx)(y.Z,{item:!0,xs:12,lg:10,children:h.children}),A=h=>(0,o.jsx)(y.Z,{container:!0,style:{position:"relative"},children:h.children});A.Filters=O,A.Content=m},77605:function(G,w,t){"use strict";t.d(w,{K:function(){return V}});var o=t(52322),i=t(62774),d=t(90436),S=t(38016),v=t(88013),g=t(2784),c=t(44394),u=t(64279),y=t(88624),x=t(21324),O=t(5806),m=t(19996),A=t(25505);const h=(0,o.jsx)(A.Z,{fontSize:"small"}),M=(0,o.jsx)(m.Z,{fontSize:"small"});function R({selected:z}){return(0,o.jsx)(x.Z,{icon:h,checkedIcon:M,checked:z})}const P=(0,g.memo)(z=>{const{selected:et,value:it,availableOptions:ft,showCounts:bt}=z,St=bt?`${it} (${ft==null?void 0:ft[it]})`:it;return(0,o.jsx)(O.Z,{control:(0,o.jsx)(R,{selected:et}),label:St,onClick:Tt=>Tt.preventDefault()})});var j=t(79692),I=t(86619),b=t(12524),K=t.n(b);const H=(0,j.Z)({input:{}},{name:"CatalogReactEntityAutocompletePickerInput"});function rt(z){const et=H();return(0,o.jsx)(I.Z,{variant:"outlined",...z,className:K()(et.input,z.className)})}var X=t(25942);function V(z){var et;const{label:it,name:ft,path:bt,showCounts:St,Filter:Tt,InputProps:pt,initialSelectedOptions:xt=[]}=z,{updateFilters:Y,filters:F,queryParameters:{[ft]:Q}}=(0,X.wp)(),ct=(0,c.h_)(y.A),{value:vt}=(0,u.default)(async()=>{var nt;const mt=bt,{facets:yt}=await ct.getEntityFacets({facets:[mt],filter:(nt=F.kind)===null||nt===void 0?void 0:nt.getCatalogFilters()});return Object.fromEntries(yt[mt].map(({value:Bt,count:zt})=>[Bt,zt]))},[F.kind]),gt=(0,g.useMemo)(()=>[Q].flat().filter(Boolean),[Q]);var st;const[q,ut]=(0,g.useState)(gt.length?gt:(st=(et=F[ft])===null||et===void 0?void 0:et.values)!==null&&st!==void 0?st:xt);(0,g.useEffect)(()=>{gt.length&&ut(gt)},[gt]);const k=Object.keys(vt!=null?vt:{}),Z=q.length&&k.length;(0,g.useEffect)(()=>{Y({[ft]:Z?new Tt(q):void 0})},[ft,Z,q,Tt,Y]);const tt=F[ft];return tt&&typeof tt=="object"&&!("values"in tt)||!k.length||k.length<=1?null:(0,o.jsx)(i.Z,{pb:1,pt:1,children:(0,o.jsxs)(d.Z,{variant:"button",component:"label",children:[it,(0,o.jsx)(v.ZP,{multiple:!0,disableCloseOnSelect:!0,options:k,value:q,onChange:(nt,mt)=>ut(mt),renderOption:(nt,{selected:mt})=>(0,o.jsx)(P,{selected:mt,value:nt,availableOptions:vt,showCounts:!!St}),size:"small",popupIcon:(0,o.jsx)(S.Z,{"data-testid":`${String(ft)}-picker-expand`}),renderInput:nt=>(0,o.jsx)(rt,{...nt,...pt})})]})})}},63833:function(G,w,t){"use strict";t.d(w,{d:function(){return gt}});var o=t(52322),i=t(74314),d=t(79692),S=t(5806),v=t(62774),g=t(21324),c=t(80030),u=t(90436),y=t(86619),x=t(19996),O=t(25505),m=t(38016),A=t(88013),h=t(2784),M=t(25942),R=t(4967),P=t(5270),j=t(98685),I=t(62367),b=t(86540),K=t(44394),H=t(69294),rt=t(88624);function X({enabled:st}){const q=(0,K.h_)(rt.A),[ut]=(0,h.useState)(async()=>{if(!st)return[];const k="relations.ownedBy";return q.getEntityFacets({facets:[k]}).then(Z=>Z.facets[k].map(tt=>tt.value).map(tt=>{const{kind:nt,name:mt,namespace:yt}=(0,i.of)(tt);return{apiVersion:"backstage.io/v1beta1",kind:nt,metadata:{name:mt,namespace:yt}}}).sort((tt,nt)=>(tt.metadata.namespace||"").localeCompare(nt.metadata.namespace||"","en-US")||tt.metadata.name.localeCompare(nt.metadata.name,"en-US")||tt.kind.localeCompare(nt.kind,"en-US"))).catch(()=>[])});return(0,H.default)(async(k,Z)=>{const tt=await ut;if(!tt)return{items:[]};var nt;const mt=(nt=Z==null?void 0:Z.limit)!==null&&nt!==void 0?nt:20,{text:yt,start:Bt}=V(k),zt=tt.filter(Nt=>it(yt,Nt)),Ft=Bt+mt;return{items:zt.slice(0,Ft),...et({entities:zt,limit:Ft,payload:{text:yt,start:Ft}})}},[ut],{loading:!0,value:{items:[]}})}function V(st){return z(st)&&st.cursor?JSON.parse(atob(st.cursor)):{text:st.text||"",start:0}}function z(st){return!!st.cursor}function et({entities:st,limit:q,payload:ut}){return st.length>q?{cursor:btoa(JSON.stringify(ut))}:{}}function it(st,q){var ut;const k=st.trim();return q.kind.includes(k)||((ut=q.metadata.namespace)===null||ut===void 0?void 0:ut.includes(k))||q.metadata.name.includes(k)}function ft(){const st=(0,K.h_)(rt.A);return(0,H.default)(async(q,ut)=>{const k=q,Z=q;var tt;const nt=(tt=ut==null?void 0:ut.limit)!==null&&tt!==void 0?tt:20;if(Z.cursor){const yt=await st.queryEntities({cursor:Z.cursor,limit:nt});return{cursor:yt.pageInfo.nextCursor,items:[...Z.items,...yt.items]}}const mt=await st.queryEntities({fullTextFilter:{term:k.text||"",fields:["metadata.name","kind","spec.profile.displayname","metadata.title"]},filter:{kind:["User","Group"]},orderFields:[{field:"metadata.name",order:"asc"}],limit:nt});return{cursor:mt.pageInfo.nextCursor,items:mt.items}},[],{loading:!0})}var bt=t(89586);function St({mode:st,initialSelectedOwnersRefs:q}){const ut=st==="owners-only",k=ft(),Z=X({enabled:ut}),[tt,nt]=ut?Z:k;return[tt,nt,Tt({enabled:!ut,initialSelectedOwnersRefs:q})]}function Tt({enabled:st,initialSelectedOwnersRefs:q}){const ut=(0,h.useRef)({}),k=(0,K.h_)(rt.A),[,Z]=(0,H.default)(async()=>{(await k.getEntitiesByRefs({entityRefs:q})).items.forEach(nt=>{nt&&(ut.current[(0,i.eE)(nt)]=nt)})},[]);return(0,bt.n)(()=>{st&&q.length>0&&Z()}),{getEntity:tt=>ut.current[tt],setEntity:tt=>{ut.current[(0,i.eE)(tt)]=tt}}}var pt=t(15459),xt=t(74780);const Y=(0,d.Z)({input:{},fullWidth:{width:"100%"},boxLabel:{width:"100%",textOverflow:"ellipsis",overflow:"hidden"}},{name:"CatalogReactEntityOwnerPicker"}),F=(0,pt.Z)(st=>({label:{width:"100%"},root:{width:"90%"}}),{name:"FixedWidthFormControlLabel"})(S.Z),Q=(0,o.jsx)(O.Z,{fontSize:"small"}),ct=(0,o.jsx)(x.Z,{fontSize:"small"});function vt(st){const q=Y(),ut=st.entity.kind.toLocaleLowerCase("en-US")==="group",{primaryTitle:k}=(0,xt.V)(st.entity);return(0,o.jsx)(v.Z,{className:q.fullWidth,children:(0,o.jsx)(F,{className:q.fullWidth,control:(0,o.jsx)(g.Z,{icon:Q,checkedIcon:ct,checked:st.isSelected}),onClick:Z=>Z.preventDefault(),label:(0,o.jsx)(c.ZP,{title:k,children:(0,o.jsxs)(v.Z,{display:"flex",alignItems:"center",children:[ut?(0,o.jsx)(I.Z,{fontSize:"small"}):(0,o.jsx)(j.Z,{fontSize:"small"}),"\xA0",(0,o.jsx)(v.Z,{className:q.boxLabel,children:(0,o.jsx)(u.Z,{noWrap:!0,children:k})})]})})})})}const gt=st=>{var q,ut;const k=Y(),{mode:Z="owners-only"}=st||{},{updateFilters:tt,filters:nt,queryParameters:{owners:mt}}=(0,M.wp)(),[yt,Bt]=(0,h.useState)(""),zt=(0,h.useMemo)(()=>[mt].flat().filter(Boolean),[mt]);var Ft;const[Nt,Lt]=(0,h.useState)(zt.length?zt:(Ft=(q=nt.owners)===null||q===void 0?void 0:q.values)!==null&&Ft!==void 0?Ft:[]),[{value:Yt,loading:Te},pe,le]=St({mode:Z,initialSelectedOwnersRefs:Nt});(0,P.b)(()=>pe({text:yt}),[yt,pe],250);const _t=(Yt==null?void 0:Yt.items)||[];return(0,h.useEffect)(()=>{if(zt.length){const jt=new R.rf(zt);Lt(jt.values)}},[zt]),(0,h.useEffect)(()=>{tt({owners:Nt.length?new R.rf(Nt):void 0})},[Nt,tt]),["user","group"].includes(((ut=nt.kind)===null||ut===void 0?void 0:ut.value.toLocaleLowerCase("en-US"))||"")?null:(0,o.jsx)(v.Z,{pb:1,pt:1,children:(0,o.jsxs)(u.Z,{variant:"button",component:"label",children:["Owner",(0,o.jsx)(A.ZP,{multiple:!0,disableCloseOnSelect:!0,loading:Te,options:_t,value:Nt,getOptionSelected:(jt,Vt)=>typeof Vt=="string"?(0,i.eE)(jt)===Vt:jt===Vt,getOptionLabel:jt=>{const Vt=typeof jt=="string"?le.getEntity(jt)||(0,i.of)(jt,{defaultKind:"group",defaultNamespace:"default"}):jt;return(0,b.w)(Vt,(0,b.$)(Vt))},onChange:(jt,Vt)=>{Bt(""),Lt(Vt.map(Se=>{const ke=typeof Se=="string"?Se:(0,i.eE)(Se);return typeof Se!="string"&&le.setEntity(Se),ke}))},filterOptions:jt=>jt,renderOption:(jt,{selected:Vt})=>(0,o.jsx)(vt,{entity:jt,isSelected:Vt}),size:"small",popupIcon:(0,o.jsx)(m.Z,{"data-testid":"owner-picker-expand"}),renderInput:jt=>(0,o.jsx)(y.Z,{...jt,className:k.input,onChange:Vt=>{Bt(Vt.currentTarget.value)},variant:"outlined"}),ListboxProps:{onScroll:jt=>{const Vt=jt.currentTarget;Math.abs(Vt.scrollHeight-Vt.clientHeight-Vt.scrollTop)<1&&(Yt!=null&&Yt.cursor)&&pe({items:Yt.items,cursor:Yt.cursor})},"data-testid":"owner-picker-listbox"}})]})})}},76277:function(G,w,t){"use strict";t.d(w,{d:function(){return h}});var o=t(52322),i=t(74314),d=t(34106),S=t(98864),v=t(37321),g=t(2784),c=t(36434),u=t(79692),y=t(62774),x=t(80030),O=t(74780);const m=(0,u.Z)(R=>({root:{display:"inline-flex",alignItems:"center"},icon:{marginRight:R.spacing(.5),color:R.palette.text.secondary,lineHeight:0}}),{name:"CatalogReactEntityDisplayName"}),A=R=>{const{entityRef:P,hideIcon:j,disableTooltip:I,defaultKind:b,defaultNamespace:K}=R,H=m(),{primaryTitle:rt,secondaryTitle:X,Icon:V}=(0,O.V)(P,{defaultKind:b,defaultNamespace:K});let z=(0,o.jsx)(o.Fragment,{children:rt});return z=(0,o.jsxs)(y.Z,{component:"span",className:H.root,children:[V&&!j?(0,o.jsx)(y.Z,{component:"span",className:H.icon,children:(0,o.jsx)(V,{fontSize:"inherit"})}):null,z]}),X&&!I&&(z=(0,o.jsx)(x.ZP,{enterDelay:1500,title:X,children:z})),z},h=(0,g.forwardRef)((R,P)=>{const{entityRef:j,defaultKind:I,defaultNamespace:b,title:K,children:H,hideIcon:rt,...X}=R,V=M(R.entityRef);var z;const et=(z=H!=null?H:K)!==null&&z!==void 0?z:(0,o.jsx)(A,{entityRef:j,defaultKind:I,defaultNamespace:b,hideIcon:rt});return(0,o.jsx)(S.rU,{...X,ref:P,to:V,children:et})});function M(R){const P=(0,v.t)(c.w);let j,I,b;if(typeof R=="string"){const rt=(0,i.of)(R);j=rt.kind,I=rt.namespace,b=rt.name}else"metadata"in R?(j=R.kind,I=R.metadata.namespace,b=R.metadata.name):(j=R.kind,I=R.namespace,b=R.name);j=j.toLocaleLowerCase("en-US");var K;I=(K=I==null?void 0:I.toLocaleLowerCase("en-US"))!==null&&K!==void 0?K:d.zG;const H={kind:encodeURIComponent(j),namespace:encodeURIComponent(I),name:encodeURIComponent(b)};return P(H)}},51194:function(G,w,t){"use strict";t.d(w,{r:function(){return v}});var o=t(52322),i=t(74314),d=t(2784),S=t(76277);function v(g){const{entityRefs:c,hideIcons:u,...y}=g;return(0,o.jsx)(o.Fragment,{children:c.map((x,O)=>{const m=typeof x=="string"?x:(0,i.eE)(x);return(0,o.jsxs)(d.Fragment,{children:[O>0&&", ",(0,o.jsx)(S.d,{...y,entityRef:x,hideIcon:u})]},`${O}.${m}`)})})}},86540:function(G,w,t){"use strict";t.d(w,{$:function(){return S},w:function(){return v}});var o=t(34106),i=t(72579),d=t.n(i);function S(g,c){const u=c==null?void 0:c.defaultKind;let y,x,O;return"metadata"in g?(y=g.kind,x=g.metadata.namespace,O=g.metadata.name):(y=g.kind,x=g.namespace,O=g.name),(x===void 0||x==="")&&(x=o.zG),(c==null?void 0:c.defaultNamespace)!==void 0?(c==null?void 0:c.defaultNamespace)===x&&(x=void 0):x===o.zG&&(x=void 0),y=y.toLocaleLowerCase("en-US"),y=u&&u.toLocaleLowerCase("en-US")===y?void 0:y,`${y?`${y}:`:""}${x?`${x}/`:""}${O}`}function v(g,c){for(const u of["spec.profile.displayName","metadata.title"]){const y=d()(g,u);if(y&&typeof y=="string")return y}return c}},97894:function(G,w,t){"use strict";t.d(w,{x:function(){return c}});var o=t(52322),i=t(79692),d=t(2784),S=t(4967),v=t(77605);const g=(0,i.Z)({input:{}},{name:"CatalogReactEntityTagPicker"}),c=u=>{const y=g();return(0,o.jsx)(v.K,{label:"Tags",name:"tags",path:"metadata.tags",Filter:S.Cu,showCounts:u.showCounts,InputProps:{className:y.input}})}},32494:function(G,w,t){"use strict";t.d(w,{E:function(){return Tt}});var o=t(52322),i=t(44394),d=t(6542),S=t(79692),v=t(94339),g=t(90436),c=t(11776),u=t(12231),y=t(86136),x=t(49378),O=t(9520),m=t(47603),A=t(11640),h=t(2784),M=t(4967),R=t(25942),P=t(77186),j=t(76635),I=t(64279),b=t(88624),K=t(64039),H=t(69294),rt=t(38408);function X(){const pt=(0,i.h_)(P.$),xt=(0,i.h_)(b.A),{filters:Y}=(0,R.wp)(),{value:F,loading:Q}=(0,I.default)(async()=>(await pt.getBackstageIdentity()).ownershipEntityRefs,[]),{user:ct,owners:vt,...gt}=Y,{["metadata.name"]:st,...q}=(0,K.wq)((0,j.compact)(Object.values(gt))),[{value:ut,loading:k},Z]=(0,H.default)(async nt=>{const mt=V(nt.owners,nt.ownershipEntityRefs);if(mt===void 0)return 0;const{totalItems:yt}=await xt.queryEntities({filter:{...nt.filter,"relations.ownedBy":mt},limit:0});return yt},[],{loading:!0});return(0,rt.Z)(()=>{Object.keys(q).length!==0&&F!==void 0&&Z({ownershipEntityRefs:F,owners:vt,filter:q})},[F,vt,q]),{count:ut,loading:Q||k,filter:(0,h.useMemo)(()=>M.t$.owned(F!=null?F:[]),[F]),ownershipEntityRefs:F}}function V(pt,xt){if(xt===void 0)return;var Y;const F=(Y=pt==null?void 0:pt.values)!==null&&Y!==void 0?Y:[];if(F.length){const Q=(0,j.intersection)(F,xt);return Q.length===0?void 0:Q}return xt}function z(){const pt=(0,i.h_)(b.A),{filters:xt}=(0,R.wp)(),Y=(0,h.useRef)(),F=(0,h.useMemo)(()=>{const{user:vt,...gt}=xt,st=(0,j.compact)(Object.values(gt)),q=(0,K.wq)(st),ut={filter:q,limit:0};return Object.keys(q).length===0?(Y.current=void 0,Y.current):(0,j.isEqual)(ut,Y.current)?Y.current:(Y.current=ut,ut)},[xt]),{value:Q,loading:ct}=(0,I.default)(async()=>{if(F===void 0)return 0;const{totalItems:vt}=await pt.queryEntities(F);return vt},[F]);return{count:Q,loading:ct}}var et=t(74314),it=t(42870);function ft(){const pt=(0,i.h_)(b.A),{filters:xt}=(0,R.wp)(),{starredEntities:Y}=(0,it.C)(),F=(0,h.useRef)(),Q=(0,h.useMemo)(()=>{const{user:st,...q}=xt,ut=(0,j.compact)(Object.values(q)),tt={filter:{...(0,K.wq)(ut),["metadata.name"]:Array.from(Y).map(nt=>(0,et.of)(nt).name)},limit:1e3};return(0,j.isEqual)(tt,F.current)?F.current:(F.current=tt,tt)},[xt,Y]),{value:ct,loading:vt}=(0,I.default)(async()=>Y.size?(await pt.queryEntities(Q)).items.map(q=>(0,et.eE)({kind:q.kind,namespace:q.metadata.namespace,name:q.metadata.name})).filter(q=>Y.has(q)).length:0,[Q,Y]),gt=(0,h.useMemo)(()=>M.t$.starred(Array.from(Y)),[Y]);return{count:ct,loading:vt,filter:gt}}const bt=(0,S.Z)(pt=>({root:{backgroundColor:"rgba(0, 0, 0, .11)",boxShadow:"none",margin:pt.spacing(1,0,1,0)},title:{margin:pt.spacing(1,0,0,1),textTransform:"uppercase",fontSize:12,fontWeight:"bold"},listIcon:{minWidth:30,color:pt.palette.text.primary},menuItem:{minHeight:pt.spacing(6)},groupWrapper:{margin:pt.spacing(1,1,2,1)}}),{name:"CatalogReactUserListPicker"});function St(pt){return[{name:"Personal",items:[{id:"owned",label:"Owned",icon:m.Z},{id:"starred",label:"Starred",icon:A.Z}]},{name:pt!=null?pt:"Company",items:[{id:"all",label:"All"}]}]}const Tt=pt=>{const{initialFilter:xt,availableFilters:Y}=pt,F=bt(),Q=(0,i.h_)(d.D);var ct;const vt=(ct=Q.getOptionalString("organization.name"))!==null&&ct!==void 0?ct:"Company",{filters:gt,updateFilters:st,queryParameters:{kind:q,user:ut}}=(0,R.wp)(),k=["starred","all"],Z=St(vt).map(le=>({...le,items:le.items.filter(({id:_t})=>["group","user"].some(jt=>jt===q)?k.includes(_t):!Y||Y.includes(_t))})).filter(({items:le})=>!!le.length),{count:tt,loading:nt,filter:mt}=X(),{count:yt}=z(),{count:Bt,filter:zt,loading:Ft}=ft(),Nt=(0,h.useMemo)(()=>[ut].flat()[0],[ut]),[Lt,Yt]=(0,h.useState)(Nt!=null?Nt:xt),Te=(0,h.useMemo)(()=>({all:yt,starred:Bt,owned:tt}),[Bt,tt,yt]);(0,h.useEffect)(()=>{Nt&&Yt(Nt)},[Nt]);const pe=nt||Ft;return(0,h.useEffect)(()=>{!pe&&Lt&&Lt!=="all"&&Te[Lt]===0&&Yt("all")},[pe,Te,Lt,Yt]),(0,h.useEffect)(()=>{if(!Lt||pe)return;st({user:(()=>Lt==="owned"?mt:Lt==="starred"?zt:M.t$.all())()})},[Lt,zt,mt,st,pe]),(0,o.jsx)(v.Z,{className:F.root,children:Z.map(le=>(0,o.jsxs)(h.Fragment,{children:[(0,o.jsx)(g.Z,{variant:"subtitle2",component:"span",className:F.title,children:le.name}),(0,o.jsx)(v.Z,{className:F.groupWrapper,children:(0,o.jsx)(c.Z,{disablePadding:!0,dense:!0,role:"menu","aria-label":le.name,children:le.items.map(_t=>{var jt,Vt;return(0,o.jsxs)(u.Z,{role:"none presentation",divider:!0,onClick:()=>Yt(_t.id),selected:_t.id===((jt=gt.user)===null||jt===void 0?void 0:jt.value),className:F.menuItem,disabled:Te[_t.id]===0,"data-testid":`user-picker-${_t.id}`,tabIndex:0,ContainerProps:{role:"menuitem"},children:[_t.icon&&(0,o.jsx)(y.Z,{className:F.listIcon,children:(0,o.jsx)(_t.icon,{fontSize:"small"})}),(0,o.jsx)(x.Z,{children:(0,o.jsxs)(g.Z,{variant:"body1",children:[_t.label," "]})}),(0,o.jsx)(O.Z,{children:(Vt=Te[_t.id])!==null&&Vt!==void 0?Vt:"-"})]},_t.id)})})})]},le.name))})}},4967:function(G,w,t){"use strict";t.d(w,{A5:function(){return M},Bf:function(){return g},Cu:function(){return c},IZ:function(){return A},Qe:function(){return O},SZ:function(){return u},mM:function(){return h},rf:function(){return y},t$:function(){return m},zH:function(){return x},zo:function(){return v}});var o=t(87612),i=t(8709),d=t(74314),S=t(75435);class v{getCatalogFilters(){return{kind:this.value}}toQueryValue(){return this.value}constructor(P){(0,o._)(this,"value",void 0),this.value=P}}class g{getTypes(){return Array.isArray(this.value)?this.value:[this.value]}getCatalogFilters(){return{"spec.type":this.getTypes()}}toQueryValue(){return this.getTypes()}constructor(P){(0,o._)(this,"value",void 0),this.value=P}}class c{filterEntity(P){return this.values.every(j=>{var I;return((I=P.metadata.tags)!==null&&I!==void 0?I:[]).includes(j)})}getCatalogFilters(){return{"metadata.tags":this.values}}toQueryValue(){return this.values}constructor(P){(0,o._)(this,"values",void 0),this.values=P}}class u{filterEntity(P){const j=this.toUpperArray(this.value.split(/\s/)),I=this.toUpperArray([P.metadata.tags]),b=this.toUpperArray([P.metadata.name,P.metadata.title]);for(const K of j)if(I.every(H=>H!==K)&&b.every(H=>!H.includes(K)))return!1;return!0}toUpperArray(P){return P.flat().filter(j=>Boolean(j)).map(j=>j.toLocaleUpperCase("en-US"))}constructor(P){(0,o._)(this,"value",void 0),this.value=P}}class y{getCatalogFilters(){return{"relations.ownedBy":this.values}}filterEntity(P){return this.values.some(j=>(0,S.h)(P,i.S4).some(I=>(0,d.eE)(I)===j))}toQueryValue(){return this.values}constructor(P){(0,o._)(this,"values",void 0),this.values=P.reduce((j,I)=>{try{return j.push((0,d.eE)((0,d.of)(I,{defaultKind:"Group"}))),j}catch{return j}},[])}}class x{getCatalogFilters(){return{"spec.lifecycle":this.values}}filterEntity(P){return this.values.some(j=>{var I;return((I=P.spec)===null||I===void 0?void 0:I.lifecycle)===j})}toQueryValue(){return this.values}constructor(P){(0,o._)(this,"values",void 0),this.values=P}}class O{getCatalogFilters(){return{"metadata.namespace":this.values}}filterEntity(P){return this.values.some(j=>P.metadata.namespace===j)}toQueryValue(){return this.values}constructor(P){(0,o._)(this,"values",void 0),this.values=P}}class m{static owned(P){return new m("owned",P)}static all(){return new m("all")}static starred(P){return new m("starred",P)}getCatalogFilters(){if(this.value==="owned"){var P;return{"relations.ownedBy":(P=this.refs)!==null&&P!==void 0?P:[]}}if(this.value==="starred"){var j,I;return{"metadata.name":(I=(j=this.refs)===null||j===void 0?void 0:j.map(b=>(0,d.of)(b).name))!==null&&I!==void 0?I:[]}}return{}}filterEntity(P){if(this.value==="starred"){var j,I;return(I=(j=this.refs)===null||j===void 0?void 0:j.includes((0,d.eE)(P)))!==null&&I!==void 0?I:!0}if(this.value==="owned"){var b;const H=(0,S.h)(P,i.S4);var K;return(K=(b=this.refs)===null||b===void 0?void 0:b.some(rt=>H.some(X=>(0,d.eE)(X)===rt)))!==null&&K!==void 0?K:!1}return!0}toQueryValue(){return this.value}constructor(P,j){(0,o._)(this,"value",void 0),(0,o._)(this,"refs",void 0),this.value=P,this.refs=j}}class A{filterEntity(P){switch(this.value){case"owned":return this.isOwnedEntity(P);case"starred":return this.isStarredEntity(P);default:return!0}}toQueryValue(){return this.value}constructor(P,j,I){(0,o._)(this,"value",void 0),(0,o._)(this,"isOwnedEntity",void 0),(0,o._)(this,"isStarredEntity",void 0),this.value=P,this.isOwnedEntity=j,this.isStarredEntity=I}}class h{getCatalogFilters(){return this.value?{"metadata.annotations.backstage.io/orphan":String(this.value)}:{}}filterEntity(P){var j;const I=(j=P.metadata.annotations)===null||j===void 0?void 0:j["backstage.io/orphan"];return I!==void 0&&this.value.toString()===I}constructor(P){(0,o._)(this,"value",void 0),this.value=P}}class M{filterEntity(P){var j,I;const b=(P==null||(I=P.status)===null||I===void 0||(j=I.items)===null||j===void 0?void 0:j.length)>0;return b!==void 0&&this.value===b}constructor(P){(0,o._)(this,"value",void 0),this.value=P}}},25942:function(G,w,t){"use strict";t.d(w,{UO:function(){return M},wp:function(){return R}});var o=t(52322),i=t(76635),d=t.n(i),S=t(19126),v=t.n(S),g=t(2784),c=t(73557),u=t(69294),y=t(48760),x=t(90736),O=t(88624),m=t(64039),A=t(44394);const h=(0,g.createContext)(void 0),M=P=>{const j=(0,x.default)(),I=(0,A.h_)(O.A),[b,K]=(0,g.useState)({}),H=(0,c.TH)(),rt=P.pagination===!0||typeof P.pagination=="object",X=P.pagination&&typeof P.pagination=="object"&&typeof P.pagination.limit=="number"?P.pagination.limit:20,{queryParameters:V,cursor:z}=(0,g.useMemo)(()=>{const Q=v().parse(H.search,{ignoreQueryPrefix:!0});var ct;return{queryParameters:(ct=Q.filters)!==null&&ct!==void 0?ct:{},cursor:typeof Q.cursor=="string"?Q.cursor:void 0}},[H]),[et,it]=(0,g.useState)(z),[ft,bt]=(0,g.useState)(()=>({appliedFilters:{},entities:[],backendEntities:[],pageInfo:rt?{}:void 0})),[{loading:St,error:Tt},pt]=(0,u.default)(async()=>{const Q=(0,i.compact)(Object.values(b)),ct=Object.keys(b).reduce((gt,st)=>{const q=b[st];return q!=null&&q.toQueryValue&&(gt[st]=q.toQueryValue()),gt},{});if(rt)if(et){if(et!==ft.appliedCursor){const gt=(0,m.Gz)(Q),st=await I.queryEntities({cursor:et,limit:X});bt({appliedFilters:b,appliedCursor:et,backendEntities:st.items,entities:st.items.filter(gt),pageInfo:st.pageInfo})}}else{const gt=(0,m.Gz)(Q),st=(0,m.wq)(Q),q=(0,m.wq)((0,i.compact)(Object.values(ft.appliedFilters)));if(!(0,i.isEqual)(q,st)){const ut=await I.queryEntities({filter:st,limit:X,orderFields:[{field:"metadata.name",order:"asc"}]});bt({appliedFilters:b,backendEntities:ut.items,entities:ut.items.filter(gt),pageInfo:ut.pageInfo})}}else{const gt=(0,m.Gz)(Q),st=(0,m.Oq)(Q),q=(0,m.Oq)((0,i.compact)(Object.values(ft.appliedFilters)));if((0,i.isEqual)(q,st))bt({appliedFilters:b,backendEntities:ft.backendEntities,entities:ft.backendEntities.filter(gt)});else{const ut=await I.getEntities({filter:st});bt({appliedFilters:b,backendEntities:ut.items,entities:ut.items.filter(gt)})}}if(j()){var vt;const gt=v().parse(H.search,{ignoreQueryPrefix:!0}),st=v().stringify({...gt,filters:ct,cursor:et},{addQueryPrefix:!0,arrayFormat:"repeat"}),q=`${window.location.pathname}${st}`;(vt=window.history)===null||vt===void 0||vt.replaceState(null,document.title,q)}},[I,V,b,ft,et,rt],{loading:!0});(0,y.Z)(pt,10,[b,et]);const xt=(0,g.useCallback)(Q=>{it(void 0),K(ct=>{const vt=typeof Q=="function"?Q(ct):Q;return{...ct,...vt}})},[]),Y=(0,g.useMemo)(()=>{var Q,ct;if(!rt)return;const vt=(Q=ft.pageInfo)===null||Q===void 0?void 0:Q.prevCursor,gt=(ct=ft.pageInfo)===null||ct===void 0?void 0:ct.nextCursor;return{prev:vt?()=>it(vt):void 0,next:gt?()=>it(gt):void 0}},[rt,ft.pageInfo]),F=(0,g.useMemo)(()=>({filters:ft.appliedFilters,entities:ft.entities,backendEntities:ft.backendEntities,updateFilters:xt,queryParameters:V,loading:St,error:Tt,pageInfo:Y}),[ft,xt,V,St,Tt,Y]);return(0,o.jsx)(h.Provider,{value:F,children:P.children})};function R(){const P=(0,g.useContext)(h);if(!P)throw new Error("useEntityList must be used within EntityListProvider");return P}},42870:function(G,w,t){"use strict";t.d(w,{C:function(){return c}});var o=t(74314),i=t(44394),d=t(2784),S=t(72164),v=t(36802);function g(u){return typeof u=="string"?u:(0,o.eE)(u)}function c(){const u=(0,i.h_)(v.p),y=(0,S.Z)((0,d.useMemo)(()=>u.starredEntitie$(),[u]),new Set),x=(0,d.useCallback)(m=>y.has(g(m)),[y]),O=(0,d.useCallback)(m=>u.toggleStarred(g(m)).then(),[u]);return{starredEntities:y,toggleStarredEntity:O,isStarredEntity:x}}},36434:function(G,w,t){"use strict";t.d(w,{w:function(){return d}});var o=t(30283),i=t(96087);const d=(0,i.u)("catalog:entity-route-ref",()=>(0,o.N)({id:"catalog:entity",params:["namespace","kind","name"]}));function S(v){var g,c;return{kind:v.kind.toLocaleLowerCase("en-US"),namespace:(c=(g=v.metadata.namespace)===null||g===void 0?void 0:g.toLocaleLowerCase("en-US"))!==null&&c!==void 0?c:DEFAULT_NAMESPACE,name:v.metadata.name}}},64039:function(G,w,t){"use strict";t.d(w,{Gz:function(){return S},Oq:function(){return d},wq:function(){return i}});var o=t(4967);function i(v){return v.reduce((g,c)=>({...g,...c.getCatalogFilters?c.getCatalogFilters():{}}),{})}function d(v){const g={};return v.forEach(c=>{var u;c instanceof o.Cu||c instanceof o.rf||c instanceof o.zH||c instanceof o.Qe||c instanceof o.t$||c instanceof o.mM||c instanceof o.SZ||c instanceof o.IZ||Object.assign(g,((u=c.getCatalogFilters)===null||u===void 0?void 0:u.call(c))||{})}),g}function S(v){return g=>v.every(c=>!c.filterEntity||c.filterEntity(g))}},75435:function(G,w,t){"use strict";t.d(w,{h:function(){return i}});var o=t(74314);function i(d,S,v){var g;let c=(d==null||(g=d.relations)===null||g===void 0?void 0:g.filter(u=>u.type===S).map(u=>(0,o.of)(u.targetRef)))||[];return v!=null&&v.kind&&(c=c.filter(u=>u.kind.toLocaleLowerCase("en-US")===v.kind.toLocaleLowerCase("en-US"))),c}},65524:function(G,w,t){"use strict";t.d(w,{yw:function(){return u},ql:function(){return x},_Z:function(){return m},kR:function(){return O},jU:function(){return y}});var o=t(87612),i=t(92918);let d=i.K,S=d;class v{toString(){return`routeRef{type=external,id=${this.id}}`}constructor(h,M,R){(0,o._)(this,"id",void 0),(0,o._)(this,"params",void 0),(0,o._)(this,"optional",void 0),(0,o._)(this,S,void 0),this.id=h,this.params=M,this.optional=R,this[d]="external"}}function g(A){var h;return new v(A.id,(h=A.params)!==null&&h!==void 0?h:[],Boolean(A.optional))}var c=t(30283);const u=g({id:"create-component",optional:!0}),y=g({id:"view-techdoc",optional:!0,params:["namespace","kind","name"]}),x=g({id:"create-from-template",optional:!0,params:["namespace","templateName"]}),O=g({id:"catalog:unregister-redirect",optional:!0}),m=(0,c.N)({id:"catalog"})},51261:function(G,w,t){"use strict";t.d(w,{r:function(){return o}});var o;(function(i){i.DENY="DENY",i.ALLOW="ALLOW",i.CONDITIONAL="CONDITIONAL"})(o||(o={}))},98988:function(G,w,t){"use strict";t.d(w,{R:function(){return i}});var o=t(95965);const i=(0,o.T)({id:"plugin.permission.api"})},76079:function(G,w,t){"use strict";t.d(w,{F:function(){return v}});var o=t(52322),i=t(2784),d=t(79692);const S=(0,d.Z)(()=>({highlight:{}}),{name:"BackstageHighlightedSearchResultText"}),v=g=>{const{text:c,preTag:u,postTag:y}=g,x=S(),O=(0,i.useMemo)(()=>c.split(new RegExp(`(${u}.+?${y})`)),[y,u,c]);return(0,o.jsx)(o.Fragment,{children:O.map((m,A)=>m.includes(u)?(0,o.jsx)("mark",{className:x.highlight,children:m.replace(new RegExp(`${u}|${y}`,"g"),"")},A):m)})}},53945:function(G,w,t){"use strict";t.d(w,{E5:function(){return y}});var o=t(52322),i=t(2784),d=t(62369),S=t(82963),v=t(38402);const g="search.results.list.items.extensions.v1",c=(m,A)=>{for(const h of m){if(!isValidElement(h))continue;const M=getComponentData(h,g);if(M!=null&&M(A))return cloneElement(h,{rank:A.rank,highlight:A.highlight,result:A.document,...h.props})}return null},u=m=>{const{rank:A,result:h,noTrack:M,children:R,alignItems:P="flex-start",...j}=m,I=(0,d.z)(),b=(0,i.useCallback)(()=>{M||h&&I.captureEvent("discover",h.title,{attributes:{to:h.location},value:A})},[A,h,M,I]);return(0,o.jsx)(v.Z,{divider:!0,alignItems:P,onClickCapture:b,...j,children:R})},y=m=>{const{name:A,component:h,predicate:M=()=>!0}=m;return(0,S.YO)({name:A,component:{lazy:()=>h().then(R=>P=>(0,o.jsx)(u,{rank:P.rank,result:P.result,noTrack:P.noTrack,children:(0,i.createElement)(R,P)}))},data:{[g]:M}})},x=m=>{const A=useElementFilter(m,h=>h.selectByComponentData({key:g}).getElements(),[m]);return useCallback((h,M)=>{const R=c(A,h);return _jsx(Fragment,{children:R!=null?R:_jsx(u,{rank:h.rank,result:h.document,children:_jsx(DefaultResultListItem,{rank:h.rank,highlight:h.highlight,result:h.document})})},M)},[A])},O=m=>{const{results:A,children:h,...M}=m,R=x(h);return _jsx(List,{...M,children:A.map(R)})}},2296:function(G,w,t){"use strict";t.d(w,{$L:function(){return M},DR:function(){return y},KY:function(){return O},Zz:function(){return u},jM:function(){return c}});var o=t(52322),i=t(2784),d=t(73557),S=t(62584),v=t(82963),g=t(2532);const c="techdocs.addons.addon.v1",u="techdocs.addons.wrapper.v1",y=()=>null;(0,S.R)(y,u,!0);const x=R=>`${c}.${R.toLocaleLowerCase("en-US")}`;function O(R){const{name:P,component:j}=R;return(0,v.YO)({name:P,component:{sync:I=>(0,o.jsx)(j,{...I})},data:{[c]:R,[x(P)]:!0}})}const m=(R,P)=>R.selectByComponentData({key:P}).getElements()[0],A=R=>R.selectByComponentData({key:u}).selectByComponentData({key:c}),h=R=>R.selectByComponentData({key:u}).findComponentData({key:c}),M=()=>{const R=(0,d.pC)(),P=(0,g.v)(R,A),j=(0,g.v)(R,h),I=(0,i.useCallback)(H=>{if(!P||!H)return null;const rt=x(H.name);var X;return(X=m(P,rt))!==null&&X!==void 0?X:null},[P]),b=(0,i.useCallback)(H=>{const rt=j.find(X=>X.name===H);return rt?I(rt):null},[j,I]),K=(0,i.useCallback)(H=>{const rt=j.filter(X=>X.location===H);return rt.length?rt.map(I):null},[j,I]);return{renderComponentByName:b,renderComponentsByLocation:K}}},58496:function(G,w,t){"use strict";t.d(w,{D:function(){return d},g:function(){return i}});var o=t(95965);const i=(0,o.T)({id:"plugin.techdocs.service"}),d=(0,o.T)({id:"plugin.techdocs.storageservice"})},68979:function(G,w,t){"use strict";t.d(w,{Z:function(){return R},x:function(){return P}});var o=t(52322),i=t(2784),d=t(64279),S=t(77446),v=t(74314),g=t(29651),c=t(68993),u=t(44394),y=t(6542),x=t(72388),O=t(58496);function m(j,I){return I.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")||(j.kind=j.kind.toLocaleLowerCase(),j.name=j.name.toLocaleLowerCase(),j.namespace=j.namespace.toLocaleLowerCase()),j}const A=(j,I)=>(0,v.eE)(j)===(0,v.eE)(I),h={title:"",subtitle:"",setTitle:()=>{},setSubtitle:()=>{},setShadowRoot:()=>{},metadata:{loading:!0},entityMetadata:{loading:!0},entityRef:{kind:"",name:"",namespace:""}},M=(0,g.CT)("techdocs-reader-page-context"),R=(0,i.memo)(j=>{const{entityRef:I,children:b}=j,K=(0,u.h_)(O.g),H=(0,u.h_)(y.D),rt=(0,d.default)(async()=>K.getEntityMetadata(I),[I]),X=(0,S.Z)(async()=>K.getTechDocsMetadata(I),[I]),[V,z]=(0,i.useState)(h.title),[et,it]=(0,i.useState)(h.subtitle),[ft,bt]=(0,i.useState)(h.shadowRoot);(0,i.useEffect)(()=>{ft&&!X.value&&!X.loading&&X.retry()},[X.value,X.loading,ft,X.retry,X]);const St={metadata:X,entityRef:m(I,H),entityMetadata:rt,shadowRoot:ft,setShadowRoot:bt,title:V,setTitle:z,subtitle:et,setSubtitle:it},Tt=(0,c.E)({1:St});return(0,o.jsx)(x.fC,{attributes:{entityRef:(0,v.eE)(I)},children:(0,o.jsx)(M.Provider,{value:Tt,children:b instanceof Function?b(St):b})})},(j,I)=>A(j.entityRef,I.entityRef)),P=()=>{const j=(0,i.useContext)(M);if(j===void 0)return h;const I=j.atVersion(1);if(I===void 0)throw new Error("No context found for version 1.");return I}},57058:function(G,w,t){"use strict";t.d(w,{o:function(){return o}});const o=Object.freeze({Header:"Header",Subheader:"Subheader",Settings:"Settings",PrimarySidebar:"PrimarySidebar",SecondarySidebar:"SecondarySidebar",Content:"Content"})},51953:function(G,w,t){"use strict";t.d(w,{D:function(){return o}});function o(i,d){return d.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")?i:i.toLocaleLowerCase("en-US")}},29895:function(G,w,t){"use strict";t.d(w,{u:function(){return X}});var o=t(52322),i=t(2784),d=t(42398),S=t(30706),v=t(13788),g=t(25942),c=t(30389),u=t(32494),y=t(63833),x=t(97894),O=t(42081),m=t(88797);class A{getCatalogFilters(){return{"metadata.annotations.backstage.io/techdocs-ref":m.n}}}const h=()=>{const{updateFilters:V}=(0,g.wp)();return(0,i.useEffect)(()=>{V({techdocs:new A})},[V]),null};var M=t(95074),R=t(76635),P=t(538),j=t(9791),I=t(42870),b=t(16787),K=t(45342),H=t(49079);const rt=V=>{var z;const{columns:et,actions:it,options:ft}=V,{loading:bt,error:St,entities:Tt,filters:pt}=(0,g.wp)(),{isStarredEntity:xt,toggleStarredEntity:Y}=(0,I.C)(),[,F]=(0,M.Z)();var Q;const ct=(0,R.capitalize)((Q=(z=pt.user)===null||z===void 0?void 0:z.value)!==null&&Q!==void 0?Q:"all"),vt=[K.n.createCopyDocsUrlAction(F),K.n.createStarEntityAction(xt,Y)];return St?(0,o.jsx)(P.G,{severity:"error",title:"Could not load available documentation.",children:(0,o.jsx)(j.O,{language:"text",text:St.toString()})}):(0,o.jsx)(b.H,{title:ct,entities:Tt,loading:bt,actions:it||vt,columns:et,options:ft})};rt.columns=H.N,rt.actions=K.n;const X=V=>{const{initialFilter:z="owned",columns:et,actions:it}=V;return(0,o.jsx)(O.j,{children:(0,o.jsxs)(d.V,{children:[(0,o.jsx)(S.y,{title:"",children:(0,o.jsx)(v.q,{children:"Discover documentation in your ecosystem."})}),(0,o.jsx)(g.UO,{children:(0,o.jsxs)(c._i,{children:[(0,o.jsxs)(c._i.Filters,{children:[(0,o.jsx)(h,{}),(0,o.jsx)(u.E,{initialFilter:z}),(0,o.jsx)(y.d,{}),(0,o.jsx)(x.x,{})]}),(0,o.jsx)(c._i.Content,{children:(0,o.jsx)(rt,{actions:it,columns:et})})]})})]})})}},16787:function(G,w,t){"use strict";t.d(w,{H:function(){return P}});var o=t(52322),i=t(2784),d=t(95074),S=t(37321),v=t(44394),g=t(6542),c=t(8709),u=t(75435),y=t(86540),x=t(95573),O=t(34378),m=t(70249),A=t(15929),h=t(45342),M=t(49079),R=t(51953);const P=j=>{const{entities:I,title:b,loading:K,columns:H,actions:rt,options:X}=j,[,V]=(0,d.Z)(),z=(0,S.t)(x.Fw),et=(0,v.h_)(g.D);if(!I)return null;const it=I.map(pt=>{const xt=(0,u.h)(pt,c.S4);var Y;return{entity:pt,resolved:{docsUrl:z({namespace:(0,R.D)((Y=pt.metadata.namespace)!==null&&Y!==void 0?Y:"default",et),kind:(0,R.D)(pt.kind,et),name:(0,R.D)(pt.metadata.name,et)}),ownedByRelations:xt,ownedByRelationsTitle:xt.map(F=>(0,y.$)(F,{defaultKind:"group"})).join(", ")}}}),ft=[M.N.createNameColumn(),M.N.createOwnerColumn(),M.N.createKindColumn(),M.N.createTypeColumn()],bt=[h.n.createCopyDocsUrlAction(V)],St=20,Tt=it&&it.length>St;return(0,o.jsx)(o.Fragment,{children:K||it&&it.length>0?(0,o.jsx)(O.i,{isLoading:K,options:{paging:Tt,pageSize:St,search:!0,actionsColumnIndex:-1,...X},data:it,columns:H||ft,actions:rt||bt,title:b?`${b} (${it.length})`:`All (${it.length})`}):(0,o.jsx)(m.u,{missing:"data",title:"No documents to show",description:"Create your own document. Check out our Getting Started Information",action:(0,o.jsx)(A.Q,{color:"primary",to:"https://backstage.io/docs/features/techdocs/getting-started",variant:"contained",children:"DOCS"})})})};P.columns=M.N,P.actions=h.n},45342:function(G,w,t){"use strict";t.d(w,{n:function(){return u}});var o=t(52322),i=t(2784),d=t(39981),S=t(2337),v=t(11640),g=t(28347);const c=(0,S.Z)({root:{color:"#f3ba37"}})(v.Z),u={createCopyDocsUrlAction(y){return x=>({icon:()=>(0,o.jsx)(d.Z,{fontSize:"small"}),tooltip:"Click to copy documentation link to clipboard",onClick:()=>y(`${window.location.origin}${x.resolved.docsUrl}`)})},createStarEntityAction(y,x){return O=>{const m=O.entity,A=y(m);return{cellStyle:{paddingLeft:"1em"},icon:()=>A?(0,o.jsx)(c,{}):(0,o.jsx)(g.Z,{}),tooltip:A?"Remove from favorites":"Add to favorites",onClick:()=>x(m)}}}}},49079:function(G,w,t){"use strict";t.d(w,{N:function(){return x}});var o=t(52322),i=t(2784),d=t(62774),S=t(79692);const v=(0,S.Z)(O=>({value:{marginBottom:O.spacing(.75)},subvalue:{color:O.palette.textSubtle,fontWeight:"normal"}}),{name:"BackstageSubvalueCell"});function g(O){const{value:m,subvalue:A}=O,h=v();return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.Z,{className:h.value,children:m}),(0,o.jsx)(d.Z,{className:h.subvalue,children:A})]})}var c=t(98864),u=t(51194);function y(O){return O.metadata.title||O.metadata.name}const x={createNameColumn(){return{title:"Document",field:"entity.metadata.name",highlight:!0,render:O=>(0,o.jsx)(g,{value:(0,o.jsx)(c.rU,{to:O.resolved.docsUrl,children:y(O.entity)}),subvalue:O.entity.metadata.description})}},createOwnerColumn(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:O})=>(0,o.jsx)(u.r,{entityRefs:O.ownedByRelations,defaultKind:"group"})}},createKindColumn(){return{title:"Kind",field:"entity.kind"}},createTypeColumn(){return{title:"Type",field:"entity.spec.type"}}}},42081:function(G,w,t){"use strict";t.d(w,{j:function(){return g}});var o=t(52322),i=t(2784),d=t(32166),S=t(44394),v=t(6542);const g=c=>{const{children:u}=c,y=(0,S.h_)(v.D);var x;const O=`Documentation available in ${(x=y.getOptionalString("organization.name"))!==null&&x!==void 0?x:"Backstage"}`;return(0,o.jsx)(d.g,{title:"Documentation",subtitle:O,themeId:"documentation",children:u})}},4577:function(G,w,t){"use strict";t.d(w,{Jl:function(){return Tt},I6:function(){return pt},s4:function(){return it}});var o=t(58496),i=t(87612),d=t(41385),S=t(48998),v=t(30474);class g extends Error{constructor(F,Q){var ct,vt;let gt=F;if(Q!==void 0){const st=(0,S.n)(Q);gt?gt+=`; caused by ${st}`:gt=`caused by ${st}`}super(gt),(0,i._)(this,"cause",void 0),(ct=(vt=Error).captureStackTrace)===null||ct===void 0||ct.call(vt,this,this.constructor),(!this.name||this.name==="Error")&&this.constructor.name!=="Error"&&(this.name=this.constructor.name),this.cause=(0,v.V)(Q)?Q:void 0}}class c extends null{constructor(...F){super(...F),_define_property(this,"name","InputError")}}class u extends null{constructor(...F){super(...F),_define_property(this,"name","AuthenticationError")}}class y extends null{constructor(...F){super(...F),_define_property(this,"name","NotAllowedError")}}class x extends g{constructor(...F){super(...F),(0,i._)(this,"name","NotFoundError")}}class O extends null{constructor(...F){super(...F),_define_property(this,"name","ConflictError")}}class m extends null{constructor(...F){super(...F),_define_property(this,"name","NotModifiedError")}}class A extends null{constructor(...F){super(...F),_define_property(this,"name","NotImplementedError")}}class h extends null{}class M extends null{constructor(F,Q){super(F,Q),this.name=isError(Q)?Q.name:"Error"}}var R=t(54847);class P{async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getTechDocsMetadata(F){const{kind:Q,namespace:ct,name:vt}=F,st=`${await this.getApiOrigin()}/metadata/techdocs/${ct}/${Q}/${vt}`,q=await this.fetchApi.fetch(`${st}`);if(!q.ok)throw await d.V.fromResponse(q);return await q.json()}async getEntityMetadata(F){const{kind:Q,namespace:ct,name:vt}=F,st=`${await this.getApiOrigin()}/metadata/entity/${ct}/${Q}/${vt}`,q=await this.fetchApi.fetch(`${st}`);if(!q.ok)throw await d.V.fromResponse(q);return await q.json()}constructor(F){(0,i._)(this,"configApi",void 0),(0,i._)(this,"discoveryApi",void 0),(0,i._)(this,"fetchApi",void 0),this.configApi=F.configApi,this.discoveryApi=F.discoveryApi,this.fetchApi=F.fetchApi}}class j{async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getStorageUrl(){var F;return(F=this.configApi.getOptionalString("techdocs.storageUrl"))!==null&&F!==void 0?F:`${await this.discoveryApi.getBaseUrl("techdocs")}/static/docs`}async getBuilder(){return this.configApi.getString("techdocs.builder")}async getEntityDocs(F,Q){const{kind:ct,namespace:vt,name:gt}=F,q=`${await this.getStorageUrl()}/${vt}/${ct}/${gt}/${Q}`,ut=await this.fetchApi.fetch(`${q.endsWith("/")?q:`${q}/`}index.html`);let k="";switch(ut.status){case 404:throw k="Page not found. ",Q||(k+="This could be because there is no index.md file in the root of the docs directory of this repository."),new x(k);case 500:throw k="Could not generate documentation or an error in the TechDocs backend. ",new Error(k);default:break}return ut.text()}async syncEntityDocs(F,Q=()=>{}){const{kind:ct,namespace:vt,name:gt}=F,q=`${await this.getApiOrigin()}/sync/${vt}/${ct}/${gt}`,{token:ut}=await this.identityApi.getCredentials();return new Promise((k,Z)=>{const tt=new R.EventSourcePolyfill(q,{withCredentials:!0,headers:ut?{Authorization:`Bearer ${ut}`}:{}});tt.addEventListener("log",nt=>{nt.data&&Q(JSON.parse(nt.data))}),tt.addEventListener("finish",nt=>{let mt=!1;nt.data&&({updated:mt}=JSON.parse(nt.data)),k(mt?"updated":"cached")}),tt.onerror=nt=>{switch(tt.close(),nt.status){case 404:Z(new x(nt.message));return;default:Z(new Error(nt.data));return}}})}async getBaseUrl(F,Q,ct){const{kind:vt,namespace:gt,name:st}=Q,ut=`${await this.getApiOrigin()}/static/docs/${gt}/${vt}/${st}/${ct}`;return new URL(F,ut.endsWith("/")?ut:`${ut}/`).toString()}constructor(F){(0,i._)(this,"configApi",void 0),(0,i._)(this,"discoveryApi",void 0),(0,i._)(this,"identityApi",void 0),(0,i._)(this,"fetchApi",void 0),this.configApi=F.configApi,this.discoveryApi=F.discoveryApi,this.identityApi=F.identityApi,this.fetchApi=F.fetchApi}}var I=t(95573),b=t(15006),K=t(42380),H=t(6542),rt=t(96727),X=t(77186),V=t(85094),z=t(82963),et=t(53945);const it=(0,b.r)({id:"techdocs",apis:[(0,K.n)({api:o.D,deps:{configApi:H.D,discoveryApi:rt.N,identityApi:X.$,fetchApi:V.g},factory:({configApi:Y,discoveryApi:F,identityApi:Q,fetchApi:ct})=>new j({configApi:Y,discoveryApi:F,identityApi:Q,fetchApi:ct})}),(0,K.n)({api:o.g,deps:{configApi:H.D,discoveryApi:rt.N,fetchApi:V.g},factory:({configApi:Y,discoveryApi:F,fetchApi:Q})=>new P({configApi:Y,discoveryApi:F,fetchApi:Q})})],routes:{root:I._Z,docRoot:I.Fw,entityContent:I.pd}}),ft=it.provide((0,z.P4)({name:"TechdocsPage",component:()=>t.e(8096).then(t.bind(t,8096)).then(Y=>Y.Router),mountPoint:I._Z})),bt=it.provide((0,z.P4)({name:"EntityTechdocsContent",component:()=>t.e(8096).then(t.bind(t,8096)).then(Y=>Y.EmbeddedDocsRouter),mountPoint:I.pd})),St=it.provide((0,z.P4)({name:"TechDocsCustomHome",component:()=>t.e(4109).then(t.bind(t,44109)).then(Y=>Y.TechDocsCustomHome),mountPoint:I._Z})),Tt=it.provide((0,z.P4)({name:"TechDocsIndexPage",component:()=>t.e(8662).then(t.bind(t,18662)).then(Y=>Y.TechDocsIndexPage),mountPoint:I._Z})),pt=it.provide((0,z.P4)({name:"TechDocsReaderPage",component:()=>t.e(5914).then(t.bind(t,35914)).then(Y=>Y.TechDocsReaderPage),mountPoint:I.Fw})),xt=it.provide((0,et.E5)({name:"TechDocsSearchResultListItem",component:()=>Promise.resolve().then(t.bind(t,55511)).then(Y=>Y.TechDocsSearchResultListItem),predicate:Y=>Y.type==="techdocs"}))},14540:function(G,w,t){"use strict";t.d(w,{F:function(){return ko}});var o=t(52322),i=t(2784),d=t(79692),S=t(60905),v=t(68979),g=t(70882),c=t(50236),u=t(19219),y=t(55015);const x="TECH_DOCS_SHADOW_DOM_STYLE_LOAD",O=p=>{(0,i.useEffect)(()=>{if(!p)return()=>{};const T=p.querySelectorAll('head > link[rel="stylesheet"]');var B;let $=(B=T==null?void 0:T.length)!==null&&B!==void 0?B:0;const _=new CustomEvent(x);if(!$)return p.dispatchEvent(_),()=>{};const ot=()=>{--$===0&&p.dispatchEvent(_)};return T==null||T.forEach(dt=>{dt.addEventListener("load",ot)}),()=>{T==null||T.forEach(dt=>{dt.removeEventListener("load",ot)})}},[p])},m=p=>{const[T,B]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{if(!p)return()=>{};B(!0);const $=p.style;$.setProperty("opacity","0");const _=()=>{B(!1),$.setProperty("opacity","1")};return p.addEventListener(x,_),()=>{p.removeEventListener(x,_)}},[p]),T},A=p=>{const{element:T,onAppend:B,children:$}=p,[_,ot]=(0,i.useState)((0,g.Ue)({...(0,c.Z)(),insertionPoint:void 0}));O(T);const dt=m(T),Ct=(0,i.useCallback)(It=>{if(!T||!It)return;ot((0,g.Ue)({...(0,c.Z)(),insertionPoint:T.querySelector("head")||void 0}));let $t=It.shadowRoot;$t||($t=It.attachShadow({mode:"open"})),$t.replaceChildren(T),typeof B=="function"&&B($t)},[T,B]);return(0,o.jsxs)(o.Fragment,{children:[dt&&(0,o.jsx)(y.E,{}),(0,o.jsxs)(u.ZP,{jss:_,sheetsManager:new Map,children:[(0,o.jsx)("div",{ref:Ct,"data-testid":"techdocs-native-shadowroot"}),$]})]})};var h=t(54073);const M=()=>{const{shadowRoot:p}=(0,v.x)();return p},R=p=>{const T=M();return T?p.map(B=>T==null?void 0:T.querySelectorAll(B)).filter(B=>B.length).map(B=>Array.from(B)).flat():[]},P=p=>p.toString()&&p.rangeCount&&p.getRangeAt(0).getBoundingClientRect().top,j=(p=0)=>{const T=M(),[B,$]=useState(null),_=useMemo(()=>debounce(()=>{const ot=T,dt=ot.getSelection?ot.getSelection():document.getSelection();dt&&P(dt)?$(dt):$(null)},p),[T,$,p]);return useEffect(()=>(window.document.addEventListener("selectionchange",_),()=>{_.cancel(),window.document.removeEventListener("selectionchange",_)}),[_]),B};var I=t(87435),b=t(42398),K=t(76635),H=t(64279),rt=t(1849),X=t(29651),V=t(68993),z=t(44394),et=t(62369),it=t(72388),ft=t(6542),bt=t(95965);const St=(0,bt.T)({id:"plugin.search.queryservice"});class Tt{query(){return Promise.resolve(this.mockedResults||{results:[]})}constructor(T){_define_property(this,"mockedResults",void 0),this.mockedResults=T}}const pt=(0,X.CT)("search-context"),xt=()=>{const p=(0,i.useContext)(pt);if(!p)throw new Error("useSearch must be used within a SearchContextProvider");const T=p.atVersion(1);if(!T)throw new Error("No SearchContext v1 found");return T},Y=()=>(0,i.useContext)(pt)!==void 0,F={term:"",types:[],filters:{},pageLimit:void 0,pageCursor:void 0},Q=(p=F)=>{var T,B,$,_;const ot=(0,z.h_)(St),dt=(0,et.z)(),[Ct,It]=(0,i.useState)(p.term),[$t,Jt]=(0,i.useState)(p.types),[Wt,Pt]=(0,i.useState)(p.filters),[ce,me]=(0,i.useState)(p.pageLimit),[Xt,Mt]=(0,i.useState)(p.pageCursor),re=(0,rt.Z)(Ct),ye=(0,rt.Z)(Wt),Dt=(0,H.default)(async()=>{const fe=await ot.query({term:Ct,types:$t,filters:Wt,pageLimit:ce,pageCursor:Xt});if(Ct){var De,ne;dt.captureEvent("search",Ct,{value:(ne=(De=Dt.value)===null||De===void 0?void 0:De.numberOfResults)!==null&&ne!==void 0?ne:void 0})}return fe},[Ct,$t,Wt,ce,Xt]),Ht=!Dt.loading&&!Dt.error&&((T=Dt.value)===null||T===void 0?void 0:T.nextPageCursor),qt=!Dt.loading&&!Dt.error&&((B=Dt.value)===null||B===void 0?void 0:B.previousPageCursor),Ce=(0,i.useCallback)(()=>{var fe;Mt((fe=Dt.value)===null||fe===void 0?void 0:fe.nextPageCursor)},[($=Dt.value)===null||$===void 0?void 0:$.nextPageCursor]),Ie=(0,i.useCallback)(()=>{var fe;Mt((fe=Dt.value)===null||fe===void 0?void 0:fe.previousPageCursor)},[(_=Dt.value)===null||_===void 0?void 0:_.previousPageCursor]);return(0,i.useEffect)(()=>{re!==void 0&&Ct!==re&&Mt(void 0)},[Ct,re,Mt]),(0,i.useEffect)(()=>{ye!==void 0&&!(0,K.isEqual)(Wt,ye)&&Mt(void 0)},[Wt,ye,Mt]),{result:Dt,term:Ct,setTerm:It,types:$t,setTypes:Jt,filters:Wt,setFilters:Pt,pageLimit:ce,setPageLimit:me,pageCursor:Xt,setPageCursor:Mt,fetchNextPage:Ht?Ce:void 0,fetchPreviousPage:qt?Ie:void 0}},ct=p=>{const{initialState:T,children:B}=p,$=Q(T);return(0,o.jsx)(it.fC,{attributes:{searchTypes:$.types.sort().join(",")},children:(0,o.jsx)(pt.Provider,{value:(0,V.E)({1:$}),children:B})})},vt=p=>{const{initialState:T,inheritParentContextIfAvailable:B,children:$}=p,_=Y(),ot=(0,z.h_)(ft.D),dt=T!=null?T:{},Ct=ot.has("search.query.pageLimit")?{pageLimit:ot.getNumber("search.query.pageLimit")}:{},It={...F,...dt,...Ct};return _&&B?(0,o.jsx)(o.Fragment,{children:$}):(0,o.jsx)(ct,{initialState:It,children:$})};var gt=t(4614),st=t(88013),q=t(50581),ut=t(61837),k=t(86619),Z=t(77277),tt=t(21853),nt=t(48760);function mt(p){return(0,i.forwardRef)((T,B)=>(0,o.jsx)(vt,{inheritParentContextIfAvailable:!0,children:(0,o.jsx)(p,{...T,ref:B})}))}const yt=mt((0,i.forwardRef)((p,T)=>{const{onChange:B,onKeyDown:$=()=>{},onClear:_=()=>{},onSubmit:ot=()=>{},debounceTime:dt=200,clearButton:Ct=!0,fullWidth:It=!0,value:$t,label:Jt,placeholder:Wt,inputProps:Pt={},InputProps:ce={},endAdornment:me,...Xt}=p,Mt=(0,z.h_)(ft.D),[re,ye]=(0,i.useState)(""),Dt=(0,i.useRef)("");(0,i.useEffect)(()=>{ye(ne=>ne===Dt.current?String($t):ne)},[$t,Dt]),(0,nt.Z)(()=>{Dt.current=re,B(re)},dt,[re]);const Ht=(0,i.useCallback)(ne=>{ye(ne.target.value)},[ye]),qt=(0,i.useCallback)(ne=>{$&&$(ne),ot&&ne.key==="Enter"&&ot()},[$,ot]),Ce=(0,i.useCallback)(()=>{Dt.current="",B(""),ye(""),_&&_()},[B,_]),Ie=Jt?void 0:"Search",We=Wt!=null?Wt:`Search in ${Mt.getOptionalString("app.title")||"Backstage"}`,fe=(0,o.jsx)(q.Z,{position:"start",children:(0,o.jsx)(ut.Z,{"aria-label":"Query",size:"small",disabled:!0,children:(0,o.jsx)(tt.Z,{})})}),De=(0,o.jsx)(q.Z,{position:"end",children:(0,o.jsx)(Z.Z,{"aria-label":"Clear",size:"small",onClick:Ce,onKeyDown:ne=>{ne.key==="Enter"&&ne.stopPropagation()},children:"Clear"})});return(0,o.jsx)(k.Z,{id:"search-bar-text-field","data-testid":"search-bar-next",variant:"outlined",margin:"normal",inputRef:T,value:re,label:Jt,placeholder:We,InputProps:{startAdornment:fe,endAdornment:Ct?De:me,...ce},inputProps:{"aria-label":Ie,...Pt},fullWidth:It,onChange:Ht,onKeyDown:qt,...Xt})})),Bt=mt((0,i.forwardRef)((p,T)=>{const{value:B="",onChange:$,..._}=p,{term:ot,setTerm:dt}=xt();(0,i.useEffect)(()=>{B&&dt(String(B))},[B,dt]);const Ct=(0,i.useCallback)(It=>{$?$(It):dt(It)},[$,dt]);return(0,o.jsx)(it.fC,{attributes:{pluginId:"search",extension:"SearchBar"},children:(0,o.jsx)(yt,{..._,ref:T,value:ot,onChange:Ct})})})),zt=(0,d.Z)(p=>({loading:{right:p.spacing(1),position:"absolute"}})),Ft=p=>T=>(0,o.jsx)(vt,{inheritParentContextIfAvailable:!0,children:(0,o.jsx)(p,{...T})}),Nt=()=>{const p=zt();return(0,o.jsx)(gt.Z,{className:p.loading,"data-testid":"search-autocomplete-progressbar",color:"inherit",size:20})},Lt=Ft(function(T){const{loading:B,value:$,onChange:_=()=>{},options:ot=[],getOptionLabel:dt=Dt=>String(Dt),inputPlaceholder:Ct,inputDebounceTime:It,freeSolo:$t=!0,fullWidth:Jt=!0,clearOnBlur:Wt=!1,"data-testid":Pt="search-autocomplete",...ce}=T,{setTerm:me}=xt(),Xt=(0,i.useCallback)(Dt=>Dt?typeof Dt=="string"?Dt:dt(Dt):"",[dt]),Mt=(0,i.useMemo)(()=>Xt($),[$,Xt]),re=(0,i.useCallback)((Dt,Ht,qt,Ce)=>{me(Xt(Ht)),_(Dt,Ht,qt,Ce)},[Xt,me,_]),ye=(0,i.useCallback)(({InputProps:{ref:Dt,className:Ht,endAdornment:qt},InputLabelProps:Ce,...Ie})=>(0,o.jsx)(Bt,{...Ie,ref:Dt,clearButton:!1,value:Mt,placeholder:Ct,debounceTime:It,endAdornment:B?(0,o.jsx)(Nt,{}):qt,InputProps:{className:Ht}}),[B,Mt,Ct,It]);return(0,o.jsx)(st.ZP,{...ce,"data-testid":Pt,value:$,onChange:re,options:ot,getOptionLabel:dt,renderInput:ye,freeSolo:$t,fullWidth:Jt,clearOnBlur:Wt})});var Yt=t(73557),Te=t(55511);const pe=p=>p==null?void 0:p.document,le=p=>{const{entityId:T,entityTitle:B,debounceTime:$=150}=p,[_,ot]=(0,i.useState)(!1),dt=(0,Yt.s0)(),{setFilters:Ct,result:{loading:It,value:$t}}=xt(),[Jt,Wt]=(0,i.useState)([]);(0,i.useEffect)(()=>{let Mt=!0;if(Mt&&$t){const re=$t.results.slice(0,10);Wt(re)}return()=>{Mt=!1}},[It,$t]);const{kind:Pt,name:ce,namespace:me}=T;(0,i.useEffect)(()=>{Ct(Mt=>({...Mt,kind:Pt,namespace:me,name:ce}))},[Pt,me,ce,Ct]);const Xt=(Mt,re)=>{if(pe(re)){const{location:ye}=re.document;dt(ye)}};return(0,o.jsx)(Lt,{"data-testid":"techdocs-search-bar",size:"small",open:_,getOptionLabel:()=>"",filterOptions:Mt=>Mt,onClose:()=>{ot(!1)},onFocus:()=>{ot(!0)},onChange:Xt,blurOnSelect:!0,noOptionsText:"No results found",value:null,options:Jt,renderOption:({document:Mt,highlight:re})=>(0,o.jsx)(Te.TechDocsSearchResultListItem,{result:Mt,lineClamp:3,asListItem:!1,asLink:!1,title:Mt.title,highlight:re}),loading:It,inputDebounceTime:$,inputPlaceholder:`Search ${B||T.name} docs`,freeSolo:!1})},_t=p=>{const T={term:"",types:["techdocs"],pageCursor:"",filters:p.entityId};return(0,o.jsx)(vt,{initialState:T,children:(0,o.jsx)(le,{...p})})};var jt=t(99688),Vt=t(80851);const Se=(0,i.lazy)(()=>Promise.all([t.e(1113),t.e(6051)]).then(t.bind(t,76051)).then(p=>({default:p.RealLogViewer})));function ke(p){const{Progress:T}=(0,Vt.q)().getComponents();return(0,o.jsx)(i.Suspense,{fallback:(0,o.jsx)(T,{}),children:(0,o.jsx)(Se,{...p})})}var xe=t(42494),qe=t(90436),Ve=t(4190),Ye=t(87685);const se=(0,d.Z)(p=>(0,xe.Z)({paper:{width:"100%",[p.breakpoints.up("sm")]:{width:"75%"},[p.breakpoints.up("md")]:{width:"50%"},padding:p.spacing(2.5)},root:{height:"100%",overflow:"hidden"},logs:{background:p.palette.background.default}})),sn=({buildLog:p,onClose:T})=>{const B=se(),$=p.length===0?"Waiting for logs...":p.join(`
6
- `);return(0,o.jsxs)(S.Z,{container:!0,direction:"column",className:B.root,spacing:0,wrap:"nowrap",children:[(0,o.jsxs)(S.Z,{item:!0,container:!0,justifyContent:"space-between",alignItems:"center",spacing:0,wrap:"nowrap",children:[(0,o.jsx)(qe.Z,{variant:"h5",children:"Build Details"}),(0,o.jsx)(ut.Z,{title:"Close the drawer",onClick:T,color:"inherit",children:(0,o.jsx)(Ye.Z,{})},"dismiss")]}),(0,o.jsx)(S.Z,{item:!0,xs:!0,children:(0,o.jsx)(ke,{text:$,classes:{root:B.logs}})})]})},Re=({buildLog:p})=>{const T=se(),[B,$]=(0,i.useState)(!1);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Z.Z,{color:"inherit",onClick:()=>$(!0),children:"Show Build Logs"}),(0,o.jsx)(Ve.ZP,{classes:{paper:T.paper},anchor:"right",open:B,onClose:()=>$(!1),children:(0,o.jsx)(sn,{buildLog:p,onClose:()=>$(!1)})})]})},tn=({errorMessage:p})=>{const T=(0,z.h_)(ft.D).getOptionalString("techdocs.builder"),B=(0,et.z)(),{entityRef:$}=(0,v.x)(),_=(0,Yt.TH)();(0,i.useEffect)(()=>{const{pathname:dt,search:Ct,hash:It}=_;B.captureEvent("not-found",`${dt}${Ct}${It}`,{attributes:$})},[B,$,_]);let ot="";return T!=="local"&&(ot="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,o.jsx)(I.m,{status:"404",statusMessage:p||"Documentation not found",additionalInfo:ot})};var an=t(77446),ie=t(58496);function Ze({contentLoading:p,content:T,activeSyncState:B}){return p||B==="BUILD_READY_RELOAD"||!T&&B==="CHECKING"?"CHECKING":!T&&B==="BUILDING"?"INITIAL_BUILD":T?B==="BUILDING"?"CONTENT_STALE_REFRESHING":B==="BUILD_READY"?"CONTENT_STALE_READY":B==="ERROR"?"CONTENT_STALE_ERROR":"CONTENT_FRESH":"CONTENT_NOT_FOUND"}function ze(p,T){const B={...p};switch(T.type){case"sync":T.state==="CHECKING"&&(B.buildLog=[]),B.activeSyncState=T.state,B.syncError=T.syncError;break;case"contentLoading":B.contentLoading=!0,B.contentError=void 0;break;case"content":typeof T.path=="string"&&(B.path=T.path),B.contentLoading=!1,B.content=T.content,B.contentError=T.contentError;break;case"buildLog":B.buildLog=B.buildLog.concat(T.log);break;default:throw new Error}return["BUILD_READY","BUILD_READY_RELOAD"].includes(B.activeSyncState)&&["contentLoading","content"].includes(T.type)&&(B.activeSyncState="UP_TO_DATE",B.buildLog=[]),B}function be(p,T,B,$){var _,ot;const[dt,Ct]=(0,i.useReducer)(ze,{activeSyncState:"CHECKING",path:$,contentLoading:!0,buildLog:[]}),It=(0,z.h_)(ie.D),{retry:$t}=(0,an.Z)(async()=>{Ct({type:"contentLoading"});try{const Pt=await It.getEntityDocs({kind:p,namespace:T,name:B},$);return Ct({type:"content",content:Pt,path:$}),Pt}catch(Pt){Ct({type:"content",contentError:Pt,path:$})}},[It,p,T,B,$]),Jt=(0,i.useRef)({content:void 0,reload:()=>{}});return Jt.current={content:dt.content,reload:$t},(0,H.default)(async()=>{Ct({type:"sync",state:"CHECKING"});const Pt=setTimeout(()=>{Ct({type:"sync",state:"BUILDING"})},1e3);try{switch(await It.syncEntityDocs({kind:p,namespace:T,name:B},me=>{Ct({type:"buildLog",log:me})})){case"updated":Jt.current.content?Ct({type:"sync",state:"BUILD_READY"}):(Jt.current.reload(),Ct({type:"sync",state:"BUILD_READY_RELOAD"}));break;case"cached":Ct({type:"sync",state:"UP_TO_DATE"});break;default:Ct({type:"sync",state:"ERROR",syncError:new Error("Unexpected return state")});break}}catch(ce){Ct({type:"sync",state:"ERROR",syncError:ce})}finally{clearTimeout(Pt)}},[p,B,T,It,Ct,Jt]),{state:(0,i.useMemo)(()=>Ze({activeSyncState:dt.activeSyncState,contentLoading:dt.contentLoading,content:dt.content}),[dt.activeSyncState,dt.content,dt.contentLoading]),contentReload:$t,path:dt.path,content:dt.content,contentErrorMessage:(_=dt.contentError)===null||_===void 0?void 0:_.toString(),syncErrorMessage:(ot=dt.syncError)===null||ot===void 0?void 0:ot.toString(),buildLog:dt.buildLog}}const $e=(0,i.createContext)({}),Ne=()=>(0,i.useContext)($e),U=p=>{const{children:T}=p,{"*":B=""}=(0,Yt.UO)(),{entityRef:$}=(0,v.x)(),{kind:_,namespace:ot,name:dt}=$,Ct=be(_,ot,dt,B);return(0,o.jsx)($e.Provider,{value:Ct,children:T instanceof Function?T(Ct):T})},f=p=>T=>(0,o.jsx)(U,{children:(0,o.jsx)(p,{...T})}),D=(0,d.Z)(p=>({root:{marginBottom:p.spacing(2)},message:{wordBreak:"break-word",overflowWrap:"anywhere"}})),W=()=>{let p=null;const T=D(),{state:B,contentReload:$,contentErrorMessage:_,syncErrorMessage:ot,buildLog:dt}=Ne();return B==="INITIAL_BUILD"&&(p=(0,o.jsx)(jt.Z,{classes:{root:T.root},variant:"outlined",severity:"info",icon:(0,o.jsx)(gt.Z,{size:"24px"}),action:(0,o.jsx)(Re,{buildLog:dt}),children:"Documentation is accessed for the first time and is being prepared. The subsequent loads are much faster."})),B==="CONTENT_STALE_REFRESHING"&&(p=(0,o.jsx)(jt.Z,{variant:"outlined",severity:"info",icon:(0,o.jsx)(gt.Z,{size:"24px"}),action:(0,o.jsx)(Re,{buildLog:dt}),classes:{root:T.root},children:"A newer version of this documentation is being prepared and will be available shortly."})),B==="CONTENT_STALE_READY"&&(p=(0,o.jsx)(jt.Z,{variant:"outlined",severity:"success",action:(0,o.jsx)(Z.Z,{color:"inherit",onClick:()=>$(),children:"Refresh"}),classes:{root:T.root},children:"A newer version of this documentation is now available, please refresh to view."})),B==="CONTENT_STALE_ERROR"&&(p=(0,o.jsxs)(jt.Z,{variant:"outlined",severity:"error",action:(0,o.jsx)(Re,{buildLog:dt}),classes:{root:T.root,message:T.message},children:["Building a newer version of this documentation failed."," ",ot]})),B==="CONTENT_NOT_FOUND"&&(p=(0,o.jsxs)(o.Fragment,{children:[ot&&(0,o.jsxs)(jt.Z,{variant:"outlined",severity:"error",action:(0,o.jsx)(Re,{buildLog:dt}),classes:{root:T.root,message:T.message},children:["Building a newer version of this documentation failed."," ",ot]}),(0,o.jsx)(tn,{errorMessage:_})]})),p};var lt=t(60364),Ot=t(41156),Rt=t(91657),ae=t(35368),ee=t.n(ae);const Kt=/main\.[A-Fa-f0-9]{8}\.min\.css$/,Ut=/^https:\/\/fonts\.googleapis\.com/,ge=/^https:\/\/fonts\.gstatic\.com/,Me=p=>p.nodeName==="LINK",kt=p=>{const T=(p==null?void 0:p.getAttribute("href"))||"",B=T.match(Kt),$=T.match(Ut),_=T.match(ge);return B||$||_},oe=p=>(Me(p)&&!kt(p)&&p.remove(),p),de=p=>p.nodeName==="IFRAME",Mn=(p,T)=>{const B=p.getAttribute("src")||"";try{const{host:$}=new URL(B);return T.includes($)}catch{return!1}},mo=p=>T=>(de(T)&&!Mn(T,p)&&T.remove(),T),Bn=()=>{const p=(0,z.h_)(ft.D);return(0,i.useMemo)(()=>p.getOptionalConfig("techdocs.sanitizer"),[p])},Un=()=>{const p=Bn();return(0,i.useCallback)(async T=>{const B=p==null?void 0:p.getOptionalStringArray("allowedIframeHosts");ee().addHook("beforeSanitizeElements",oe);const $=["link"];return B&&($.push("iframe"),ee().addHook("beforeSanitizeElements",mo(B))),ee().sanitize(T.outerHTML,{ADD_TAGS:$,FORBID_TAGS:["style"],WHOLE_DOCUMENT:!0,RETURN_DOM:!0})},[p])};var Fn=t(93539),ve=t(41128),Be=({theme:p})=>`
7
- /*================== Variables ==================*/
8
- /*
9
- 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.
10
- 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.
11
- */
12
-
13
- :host {
14
- /* FONT */
15
- --md-default-fg-color: ${p.palette.text.primary};
16
- --md-default-fg-color--light: ${p.palette.text.secondary};
17
- --md-default-fg-color--lighter: ${(0,ve.$n)(p.palette.text.secondary,.7)};
18
- --md-default-fg-color--lightest: ${(0,ve.$n)(p.palette.text.secondary,.3)};
19
-
20
- /* BACKGROUND */
21
- --md-default-bg-color:${p.palette.background.default};
22
- --md-default-bg-color--light: ${p.palette.background.paper};
23
- --md-default-bg-color--lighter: ${(0,ve.$n)(p.palette.background.paper,.7)};
24
- --md-default-bg-color--lightest: ${(0,ve.$n)(p.palette.background.paper,.3)};
25
-
26
- /* PRIMARY */
27
- --md-primary-fg-color: ${p.palette.primary.main};
28
- --md-primary-fg-color--light: ${p.palette.primary.light};
29
- --md-primary-fg-color--dark: ${p.palette.primary.dark};
30
- --md-primary-bg-color: ${p.palette.primary.contrastText};
31
- --md-primary-bg-color--light: ${(0,ve.$n)(p.palette.primary.contrastText,.7)};
32
-
33
- /* ACCENT */
34
- --md-accent-fg-color: var(--md-primary-fg-color);
35
-
36
- /* SHADOW */
37
- --md-shadow-z1: ${p.shadows[1]};
38
- --md-shadow-z2: ${p.shadows[2]};
39
- --md-shadow-z3: ${p.shadows[3]};
40
-
41
- /* EXTENSIONS */
42
- --md-admonition-fg-color: var(--md-default-fg-color);
43
- --md-admonition-bg-color: var(--md-default-bg-color);
44
- /* Admonitions and others are using SVG masks to define icons. These masks are defined as CSS variables. */
45
- --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>');
46
- --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>');
47
- --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>');
48
- --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>');
49
- --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>');
50
- --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>');
51
- --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>');
52
- --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>');
53
- --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>');
54
- --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>');
55
- --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>');
56
- --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>');
57
- --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>');
58
- --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>');
59
- --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>');
60
- --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>');
61
- --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>');
62
- --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>');
63
- --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>');
64
- --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>');
65
- --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>');
66
- --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>');
67
- --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>');
68
- --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>');
69
- --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>');
70
- --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>');
71
- }
72
-
73
- :host > * {
74
- /* CODE */
75
- --md-code-fg-color: ${p.palette.text.primary};
76
- --md-code-bg-color: ${p.palette.background.paper};
77
- --md-code-hl-color: ${(0,ve.Fq)(p.palette.warning.main,.5)};
78
- --md-code-hl-keyword-color: ${p.palette.type==="dark"?p.palette.primary.light:p.palette.primary.dark};
79
- --md-code-hl-function-color: ${p.palette.type==="dark"?p.palette.secondary.light:p.palette.secondary.dark};
80
- --md-code-hl-string-color: ${p.palette.type==="dark"?p.palette.success.light:p.palette.success.dark};
81
- --md-code-hl-number-color: ${p.palette.type==="dark"?p.palette.error.light:p.palette.error.dark};
82
- --md-code-hl-constant-color: var(--md-code-hl-function-color);
83
- --md-code-hl-special-color: var(--md-code-hl-function-color);
84
- --md-code-hl-name-color: var(--md-code-fg-color);
85
- --md-code-hl-comment-color: var(--md-default-fg-color--light);
86
- --md-code-hl-generic-color: var(--md-default-fg-color--light);
87
- --md-code-hl-variable-color: var(--md-default-fg-color--light);
88
- --md-code-hl-operator-color: var(--md-default-fg-color--light);
89
- --md-code-hl-punctuation-color: var(--md-default-fg-color--light);
90
-
91
- /* TYPESET */
92
- --md-typeset-font-size: 1rem;
93
- --md-typeset-color: var(--md-default-fg-color);
94
- --md-typeset-a-color: ${p.palette.link};
95
- --md-typeset-table-color: ${p.palette.text.primary};
96
- --md-typeset-del-color: ${p.palette.type==="dark"?(0,ve.Fq)(p.palette.error.dark,.5):(0,ve.Fq)(p.palette.error.light,.5)};
97
- --md-typeset-ins-color: ${p.palette.type==="dark"?(0,ve.Fq)(p.palette.success.dark,.5):(0,ve.Fq)(p.palette.success.light,.5)};
98
- --md-typeset-mark-color: ${p.palette.type==="dark"?(0,ve.Fq)(p.palette.warning.dark,.5):(0,ve.Fq)(p.palette.warning.light,.5)};
99
- }
100
-
101
- @media screen and (max-width: 76.1875em) {
102
- :host > * {
103
- /* TYPESET */
104
- --md-typeset-font-size: .9rem;
105
- }
106
- }
107
-
108
- @media screen and (max-width: 600px) {
109
- :host > * {
110
- /* TYPESET */
111
- --md-typeset-font-size: .7rem;
112
- }
113
- }
114
- `,yo=({theme:p})=>`
115
- /*================== Reset ==================*/
116
-
117
- body {
118
- --md-text-color: var(--md-default-fg-color);
119
- --md-text-link-color: var(--md-accent-fg-color);
120
- --md-text-font-family: ${p.typography.fontFamily};
121
- font-family: var(--md-text-font-family);
122
- background-color: unset;
123
- }
124
- `;const Qe="224px";var Eo=({theme:p,sidebar:T})=>`
125
- /*================== Layout ==================*/
126
-
127
- /* mkdocs material v9 compat */
128
- .md-nav__title {
129
- color: var(--md-default-fg-color);
130
- }
131
-
132
- .md-grid {
133
- max-width: 100%;
134
- margin: 0;
135
- }
136
-
137
- .md-nav {
138
- font-size: calc(var(--md-typeset-font-size) * 0.9);
139
- }
140
- .md-nav__link {
141
- display: flex;
142
- align-items: center;
143
- justify-content: space-between;
144
- }
145
- .md-nav__icon {
146
- height: 20px !important;
147
- width: 20px !important;
148
- margin-left:${p.spacing(1)}px;
149
- }
150
- .md-nav__icon svg {
151
- margin: 0;
152
- width: 20px !important;
153
- height: 20px !important;
154
- }
155
- .md-nav__icon:after {
156
- width: 20px !important;
157
- height: 20px !important;
158
- }
159
-
160
- .md-nav__item--active > .md-nav__link, a.md-nav__link--active {
161
- text-decoration: underline;
162
- color: var(--md-typeset-a-color);
163
- }
164
-
165
- .md-main__inner {
166
- margin-top: 0;
167
- }
168
-
169
- .md-sidebar {
170
- bottom: 75px;
171
- position: fixed;
172
- width: 16rem;
173
- overflow-y: auto;
174
- overflow-x: hidden;
175
- scrollbar-color: rgb(193, 193, 193) #eee;
176
- scrollbar-width: thin;
177
- }
178
- .md-sidebar .md-sidebar__scrollwrap {
179
- width: calc(12.1rem);
180
- }
181
- .md-sidebar--secondary {
182
- right: ${p.spacing(3)}px;
183
- }
184
- .md-sidebar::-webkit-scrollbar {
185
- width: 5px;
186
- }
187
- .md-sidebar::-webkit-scrollbar-button {
188
- width: 5px;
189
- height: 5px;
190
- }
191
- .md-sidebar::-webkit-scrollbar-track {
192
- background: #eee;
193
- border: 1 px solid rgb(250, 250, 250);
194
- box-shadow: 0px 0px 3px #dfdfdf inset;
195
- border-radius: 3px;
196
- }
197
- .md-sidebar::-webkit-scrollbar-thumb {
198
- width: 5px;
199
- background: rgb(193, 193, 193);
200
- border: transparent;
201
- border-radius: 3px;
202
- }
203
- .md-sidebar::-webkit-scrollbar-thumb:hover {
204
- background: rgb(125, 125, 125);
205
- }
206
-
207
- .md-content {
208
- max-width: calc(100% - 16rem * 2);
209
- margin-left: 16rem;
210
- margin-bottom: 50px;
211
- }
212
-
213
- .md-footer {
214
- position: fixed;
215
- bottom: 0px;
216
- pointer-events: none;
217
- }
218
-
219
- .md-footer-nav__link, .md-footer__link {
220
- pointer-events: all;
221
- }
222
-
223
- .md-footer__title {
224
- background-color: unset;
225
- }
226
- .md-footer-nav__link, .md-footer__link {
227
- width: 16rem;
228
- }
229
-
230
- .md-dialog {
231
- background-color: unset;
232
- }
233
-
234
- @media screen and (min-width: 76.25em) {
235
- .md-sidebar {
236
- height: auto;
237
- }
238
- }
239
-
240
- @media screen and (max-width: 76.1875em) {
241
- .md-nav {
242
- transition: none !important;
243
- background-color: var(--md-default-bg-color)
244
- }
245
- .md-nav--primary .md-nav__title {
246
- cursor: auto;
247
- color: var(--md-default-fg-color);
248
- font-weight: 700;
249
- white-space: normal;
250
- line-height: 1rem;
251
- height: auto;
252
- display: flex;
253
- flex-flow: column;
254
- row-gap: 1.6rem;
255
- padding: 1.2rem .8rem .8rem;
256
- background-color: var(--md-default-bg-color);
257
- }
258
- .md-nav--primary .md-nav__title~.md-nav__list {
259
- box-shadow: none;
260
- }
261
- .md-nav--primary .md-nav__title ~ .md-nav__list > :first-child {
262
- border-top: none;
263
- }
264
- .md-nav--primary .md-nav__title .md-nav__button {
265
- display: none;
266
- }
267
- .md-nav--primary .md-nav__title .md-nav__icon {
268
- color: var(--md-default-fg-color);
269
- position: static;
270
- height: auto;
271
- margin: 0 0 0 -0.2rem;
272
- }
273
- .md-nav--primary > .md-nav__title [for="none"] {
274
- padding-top: 0;
275
- }
276
- .md-nav--primary .md-nav__item {
277
- border-top: none;
278
- }
279
- .md-nav--primary :is(.md-nav__title,.md-nav__item) {
280
- font-size : var(--md-typeset-font-size);
281
- }
282
- .md-nav .md-source {
283
- display: none;
284
- }
285
-
286
- .md-sidebar {
287
- height: 100%;
288
- }
289
- .md-sidebar--primary {
290
- width: 12.1rem !important;
291
- z-index: 200;
292
- left: ${T.isPinned?`calc(-12.1rem + ${Qe})`:"calc(-12.1rem + 72px)"} !important;
293
- }
294
- .md-sidebar--secondary:not([hidden]) {
295
- display: none;
296
- }
297
-
298
- .md-content {
299
- max-width: 100%;
300
- margin-left: 0;
301
- }
302
-
303
- .md-header__button {
304
- margin: 0.4rem 0;
305
- margin-left: 0.4rem;
306
- padding: 0;
307
- }
308
-
309
- .md-overlay {
310
- left: 0;
311
- }
312
-
313
- .md-footer {
314
- position: static;
315
- padding-left: 0;
316
- }
317
- .md-footer-nav__link {
318
- /* footer links begin to overlap at small sizes without setting width */
319
- width: 50%;
320
- }
321
- }
322
-
323
- @media screen and (max-width: 600px) {
324
- .md-sidebar--primary {
325
- left: -12.1rem !important;
326
- width: 12.1rem;
327
- }
328
- }
329
-
330
-
331
- @media print {
332
- .md-sidebar,
333
- #toggle-sidebar {
334
- display: none;
335
- }
336
-
337
- .md-content {
338
- margin: 0;
339
- width: 100%;
340
- max-width: 100%;
341
- }
342
- }
343
- `;const $n=["h1","h2","h3","h4","h5","h6"];var xo=({theme:p})=>`
344
- /*================== Typeset ==================*/
345
-
346
- .md-typeset {
347
- font-size: var(--md-typeset-font-size);
348
- }
349
-
350
- ${$n.reduce((T,B)=>{var $;const _=($=p.typography.htmlFontSize)!==null&&$!==void 0?$:16,ot=p.typography[B],{lineHeight:dt,fontFamily:Ct,fontWeight:It,fontSize:$t}=ot,Jt=Wt=>{let Pt=1;return typeof Wt=="number"&&(Pt=Wt/_*.6),typeof Wt=="string"&&(Pt=Wt.replace("rem","")),`calc(${Pt} * var(--md-typeset-font-size))`};return T.concat(`
351
- .md-typeset ${B} {
352
- color: var(--md-default-fg-color);
353
- line-height: ${dt};
354
- font-family: ${Ct};
355
- font-weight: ${It};
356
- font-size: ${Jt($t)};
357
- }
358
- `)},"")}
359
-
360
- .md-typeset .md-content__button {
361
- color: var(--md-default-fg-color);
362
- }
363
-
364
- .md-typeset hr {
365
- border-bottom: 0.05rem dotted ${p.palette.divider};
366
- }
367
-
368
- .md-typeset details {
369
- font-size: var(--md-typeset-font-size) !important;
370
- }
371
- .md-typeset details summary {
372
- padding-left: 2.5rem !important;
373
- }
374
- .md-typeset details summary:before,
375
- .md-typeset details summary:after {
376
- top: 50% !important;
377
- width: 20px !important;
378
- height: 20px !important;
379
- transform: rotate(0deg) translateY(-50%) !important;
380
- }
381
- .md-typeset details[open] > summary:after {
382
- transform: rotate(90deg) translateX(-50%) !important;
383
- }
384
-
385
- .md-typeset blockquote {
386
- color: var(--md-default-fg-color--light);
387
- border-left: 0.2rem solid var(--md-default-fg-color--light);
388
- }
389
-
390
- .md-typeset table:not([class]) {
391
- font-size: var(--md-typeset-font-size);
392
- border: 1px solid var(--md-default-fg-color);
393
- border-bottom: none;
394
- border-collapse: collapse;
395
- }
396
- .md-typeset table:not([class]) th {
397
- font-weight: bold;
398
- }
399
- .md-typeset table:not([class]) td, .md-typeset table:not([class]) th {
400
- border-bottom: 1px solid var(--md-default-fg-color);
401
- }
402
-
403
- .md-typeset pre > code::-webkit-scrollbar-thumb {
404
- background-color: hsla(0, 0%, 0%, 0.32);
405
- }
406
- .md-typeset pre > code::-webkit-scrollbar-thumb:hover {
407
- background-color: hsla(0, 0%, 0%, 0.87);
408
- }
409
- `,Qt=()=>`
410
- /*================== Animations ==================*/
411
- /*
412
- Disable CSS animations on link colors as they lead to issues in dark mode.
413
- The dark mode color theme is applied later and theirfore there is always an animation from light to dark mode when navigation between pages.
414
- */
415
- .md-dialog, .md-nav__link, .md-footer__link, .md-typeset a, .md-typeset a::before, .md-typeset .headerlink {
416
- transition: none;
417
- }
418
- `,Je=({theme:p})=>`
419
- /*================== Extensions ==================*/
420
-
421
- /* HIGHLIGHT */
422
- .highlight .md-clipboard:after {
423
- content: unset;
424
- }
425
-
426
- .highlight .nx {
427
- color: ${p.palette.type==="dark"?"#ff53a3":"#ec407a"};
428
- }
429
-
430
- /* CODE HILITE */
431
- .codehilite .gd {
432
- background-color: ${p.palette.type==="dark"?"rgba(248,81,73,0.65)":"#fdd"};
433
- }
434
-
435
- .codehilite .gi {
436
- background-color: ${p.palette.type==="dark"?"rgba(46,160,67,0.65)":"#dfd"};
437
- }
438
-
439
- /* TABBED */
440
- .tabbed-set>input:nth-child(1):checked~.tabbed-labels>:nth-child(1),
441
- .tabbed-set>input:nth-child(2):checked~.tabbed-labels>:nth-child(2),
442
- .tabbed-set>input:nth-child(3):checked~.tabbed-labels>:nth-child(3),
443
- .tabbed-set>input:nth-child(4):checked~.tabbed-labels>:nth-child(4),
444
- .tabbed-set>input:nth-child(5):checked~.tabbed-labels>:nth-child(5),
445
- .tabbed-set>input:nth-child(6):checked~.tabbed-labels>:nth-child(6),
446
- .tabbed-set>input:nth-child(7):checked~.tabbed-labels>:nth-child(7),
447
- .tabbed-set>input:nth-child(8):checked~.tabbed-labels>:nth-child(8),
448
- .tabbed-set>input:nth-child(9):checked~.tabbed-labels>:nth-child(9),
449
- .tabbed-set>input:nth-child(10):checked~.tabbed-labels>:nth-child(10),
450
- .tabbed-set>input:nth-child(11):checked~.tabbed-labels>:nth-child(11),
451
- .tabbed-set>input:nth-child(12):checked~.tabbed-labels>:nth-child(12),
452
- .tabbed-set>input:nth-child(13):checked~.tabbed-labels>:nth-child(13),
453
- .tabbed-set>input:nth-child(14):checked~.tabbed-labels>:nth-child(14),
454
- .tabbed-set>input:nth-child(15):checked~.tabbed-labels>:nth-child(15),
455
- .tabbed-set>input:nth-child(16):checked~.tabbed-labels>:nth-child(16),
456
- .tabbed-set>input:nth-child(17):checked~.tabbed-labels>:nth-child(17),
457
- .tabbed-set>input:nth-child(18):checked~.tabbed-labels>:nth-child(18),
458
- .tabbed-set>input:nth-child(19):checked~.tabbed-labels>:nth-child(19),
459
- .tabbed-set>input:nth-child(20):checked~.tabbed-labels>:nth-child(20) {
460
- color: var(--md-accent-fg-color);
461
- border-color: var(--md-accent-fg-color);
462
- }
463
-
464
- /* TASK-LIST */
465
- .task-list-control .task-list-indicator::before {
466
- background-color: ${p.palette.action.disabledBackground};
467
- }
468
- .task-list-control [type="checkbox"]:checked + .task-list-indicator:before {
469
- background-color: ${p.palette.success.main};
470
- }
471
-
472
- /* ADMONITION */
473
- .admonition {
474
- font-size: var(--md-typeset-font-size) !important;
475
- }
476
- .admonition .admonition-title {
477
- padding-left: 2.5rem !important;
478
- }
479
-
480
- .admonition .admonition-title:before {
481
- top: 50% !important;
482
- width: 20px !important;
483
- height: 20px !important;
484
- transform: translateY(-50%) !important;
485
- }
486
- `;const ln=[Be,yo,Eo,xo,Qt,Je],Co=()=>(0,Fn.Pf)(),Ao=()=>{const p=Co(),T=(0,lt.Z)();return(0,i.useMemo)(()=>{const B={theme:T,sidebar:p};return ln.reduce(($,_)=>$+_(B),"")},[T,p])},So=()=>{const p=Ao();return(0,i.useCallback)(T=>(T.getElementsByTagName("head")[0].insertAdjacentHTML("beforeend",`<style>${p}</style>`),T),[p])},Nn=async(p,T)=>{let B;if(typeof p=="string")B=new DOMParser().parseFromString(p,"text/html").documentElement;else if(p instanceof Element)B=p;else throw new Error("dom is not a recognized type");for(const $ of T)B=await $(B);return B},xn=(p,T,B)=>{const $=p==="src"&&T.endsWith(".svg"),_=!T.match(/^([a-z]*:)?\/\//i),ot=T.startsWith(B);return $&&(_||ot)},bo=({techdocsStorageApi:p,entityId:T,path:B})=>async $=>{const _=await p.getApiOrigin(),ot=async(dt,Ct)=>{for(const It of dt)if(It.hasAttribute(Ct)){const $t=It.getAttribute(Ct);if(!$t)return;const Jt=await p.getBaseUrl($t,T,B);if(xn(Ct,$t,_))try{const Pt=await(await fetch(Jt,{credentials:"include"})).text();It.setAttribute(Ct,`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(Pt)))}`)}catch{It.setAttribute("alt",`Error: ${$t}`)}else It.setAttribute(Ct,Jt)}};return await Promise.all([ot($.querySelectorAll("img"),"src"),ot($.querySelectorAll("script"),"src"),ot($.querySelectorAll("source"),"src"),ot($.querySelectorAll("link"),"href"),ot($.querySelectorAll("a[download]"),"href")]),$},Wn=()=>p=>(((B,$)=>{Array.from(B).filter(_=>_.hasAttribute($)).forEach(_=>{const ot=_.getAttribute($);if(ot){ot.match(/^https?:\/\//i)&&_.setAttribute("target","_blank");try{const dt=Oo(window.location.href);_.setAttribute($,new URL(ot,dt).toString())}catch{_.replaceWith(_.textContent||ot)}}})})(Array.from(p.getElementsByTagName("a")),"href"),p);function Oo(p){const T=new URL(p);return!T.pathname.endsWith("/")&&!T.pathname.endsWith(".html")&&(T.pathname+="/"),T.toString()}var Zn=t(44882);let kn;kn=Promise.resolve().then(t.t.bind(t,17029,19));function Cn(p,T){kn.then(B=>{"createRoot"in B?B.createRoot(T).render(p):B.render(p,T)})}const wo=()=>p=>{const T=p.querySelector('.md-header label[for="__drawer"]'),B=p.querySelector("article");if(!T||!B)return p;const $=T.cloneNode();return Cn(i.createElement(Zn.Z),$),$.id="toggle-sidebar",$.title="Toggle Sidebar",$.classList.add("md-content__button"),$.style.setProperty("padding","0 0 0 5px"),$.style.setProperty("margin","0.4rem 0 0.4rem 0.4rem"),B==null||B.prepend($),p},Po=()=>p=>{var T;return(T=p.querySelector(".md-header"))===null||T===void 0||T.remove(),p},To=()=>p=>{var T,B;return(T=p.querySelector(".md-footer .md-copyright"))===null||T===void 0||T.remove(),(B=p.querySelector(".md-footer-copyright"))===null||B===void 0||B.remove(),p};var Ro=t(61800),Io=t(67097),zn=t(82717),Do=t.n(zn);const Lo=p=>T=>{var B;const $=T.querySelector('[title="Edit this page"]');if(!$||!$.href)return T;const _=new URL($.href),ot=p.byUrl(_);if((ot==null?void 0:ot.type)!=="github"&&(ot==null?void 0:ot.type)!=="gitlab")return T;const dt=((B=T.querySelector("article>h1"))===null||B===void 0?void 0:B.childNodes[0].textContent)||"",Ct=encodeURIComponent(`Documentation Feedback: ${dt}`),It=encodeURIComponent(`Page source:
487
- ${$.href}
488
-
489
- Feedback:`),$t=(ot==null?void 0:ot.type)==="github"?(0,Ro.B)(_.href,"blob"):_.href,Jt=Do()($t),Wt=`/${Jt.organization}/${Jt.name}`,Pt=$.cloneNode();switch(ot==null?void 0:ot.type){case"gitlab":Pt.href=`${_.origin}${Wt}/issues/new?issue[title]=${Ct}&issue[description]=${It}`;break;case"github":Pt.href=`${_.origin}${Wt}/issues/new?title=${Ct}&body=${It}`;break;default:return T}return Cn(i.createElement(Io.Z),Pt),Pt.style.paddingLeft="5px",Pt.title="Leave feedback for this page",Pt.id="git-feedback-link",$==null||$.insertAdjacentElement("beforebegin",Pt),T},Kn=()=>p=>(setTimeout(()=>{const T=p==null?void 0:p.querySelectorAll("li.md-nav__item--active");T.length!==0&&(T.forEach($=>{const _=$==null?void 0:$.querySelector("input");_!=null&&_.checked||_==null||_.click()}),T[T.length-1].scrollIntoView())},200),p);var Hn=t(15459),jo=t(80030),An=t(72379),Sn=t(41547),Mo=t(95074);const Gn=(0,Hn.Z)(p=>({tooltip:{fontSize:"inherit",color:p.palette.text.primary,margin:0,padding:p.spacing(.5),backgroundColor:"transparent",boxShadow:"none"}}))(jo.ZP),Vn=()=>(0,o.jsx)(An.Z,{children:(0,o.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"})}),Bo=({text:p})=>{const[T,B]=(0,i.useState)(!1),[,$]=(0,Mo.Z)(),_=(0,i.useCallback)(()=>{$(p),B(!0)},[p,$]),ot=(0,i.useCallback)(()=>{B(!1)},[B]);return(0,o.jsx)(Gn,{title:"Copied to clipboard",placement:"left",open:T,onClose:ot,leaveDelay:1e3,children:(0,o.jsx)(ut.Z,{style:{color:"inherit"},className:"md-clipboard md-icon",onClick:_,children:(0,o.jsx)(Vn,{})})})},Uo=p=>T=>{const B=T.querySelectorAll("pre > code");for(const _ of B){var $;const ot=_.textContent||"",dt=document.createElement("div");_==null||($=_.parentElement)===null||$===void 0||$.prepend(dt),Cn((0,o.jsx)(Sn.Z,{theme:p,children:(0,o.jsx)(Bo,{text:ot})}),dt)}return T},Fo=({baseUrl:p,onClick:T})=>B=>(Array.from(B.getElementsByTagName("a")).forEach($=>{$.addEventListener("click",_=>{const dt=$.getAttribute("href");dt&&dt.startsWith(p)&&!$.hasAttribute("download")&&(_.preventDefault(),T(_,dt))})}),B),Yn=({onLoading:p,onLoaded:T})=>B=>(p(),B.addEventListener(x,function $(){T(),B.removeEventListener(x,$)}),B);function $o(p,T){const B=new URL(T),$=`${B.origin}${B.pathname.replace(/\/$/,"")}`,_=p.replace($,"").replace(/^\/+/,""),ot=new URL(`http://localhost/${_}`);return`${ot.pathname}${ot.search}${ot.hash}`}function No(){const p=(0,Yt.s0)(),B=(0,z.h_)(ft.D).getOptionalString("app.baseUrl");return(0,i.useCallback)(_=>{let ot=_;if(B)try{ot=$o(_,B)}catch{}p(ot)},[p,B])}const Wo="screen and (max-width: 76.1875em)",Zo=p=>{const T=No(),B=(0,lt.Z)(),$=(0,Ot.Z)(Wo),_=Un(),ot=So(),dt=(0,et.z)(),Ct=(0,z.h_)(ie.D),It=(0,z.h_)(Rt.q),{state:$t,path:Jt,content:Wt}=Ne(),[Pt,ce]=(0,i.useState)(null),me=m(Pt),Xt=(0,i.useCallback)(()=>{if(!Pt)return;Pt.querySelectorAll(".md-sidebar").forEach(Ht=>{if($)Ht.style.top="0px";else{var qt;const fe=(qt=document)===null||qt===void 0?void 0:qt.querySelector(".techdocs-reader-page");var Ce;const De=(Ce=fe==null?void 0:fe.getBoundingClientRect().top)!==null&&Ce!==void 0?Ce:0;var Ie;let ne=(Ie=Pt.getBoundingClientRect().top)!==null&&Ie!==void 0?Ie:0;const Xe=Pt.querySelector(".md-container > .md-tabs");var We;const dn=(We=Xe==null?void 0:Xe.getBoundingClientRect().height)!==null&&We!==void 0?We:0;ne<De&&(ne=De),Ht.style.top=`${Math.max(ne,0)+dn}px`}Ht.style.setProperty("opacity","1")})},[Pt,$]);(0,i.useEffect)(()=>(window.addEventListener("resize",Xt),window.addEventListener("scroll",Xt,!0),()=>{window.removeEventListener("resize",Xt),window.removeEventListener("scroll",Xt,!0)}),[Pt,Xt]);const Mt=(0,i.useCallback)(()=>{if(!Pt)return;const Dt=Pt.querySelector(".md-footer");Dt&&(Dt.style.width=`${Pt.getBoundingClientRect().width}px`)},[Pt]);(0,i.useEffect)(()=>(window.addEventListener("resize",Mt),()=>{window.removeEventListener("resize",Mt)}),[Pt,Mt]),(0,i.useEffect)(()=>{me||(Mt(),Xt())},[$t,me,Mt,Xt]);const re=(0,i.useCallback)((Dt,Ht)=>Nn(Dt,[_,bo({techdocsStorageApi:Ct,entityId:p,path:Ht}),Wn(),wo(),Po(),To(),Lo(It),ot]),[p,It,Ct,_,ot]),ye=(0,i.useCallback)(async Dt=>Nn(Dt,[Kn(),Uo(B),Fo({baseUrl:window.location.origin,onClick:(Ht,qt)=>{var Ce;const Ie=Ht.ctrlKey||Ht.metaKey,We=new URL(qt),fe=((Ce=Ht.target)===null||Ce===void 0?void 0:Ce.innerText)||qt,De=qt.replace(window.location.origin,"");if(dt.captureEvent("click",fe,{attributes:{to:De}}),We.hash)if(Ie)window.open(qt,"_blank");else{var ne;T(qt),Dt==null||(ne=Dt.querySelector(`[id="${We.hash.slice(1)}"]`))===null||ne===void 0||ne.scrollIntoView()}else Ie?window.open(qt,"_blank"):T(qt)}}),Yn({onLoading:()=>{},onLoaded:()=>{var Ht;(Ht=Dt.querySelector(".md-nav__title"))===null||Ht===void 0||Ht.removeAttribute("for")}}),Yn({onLoading:()=>{Array.from(Dt.querySelectorAll(".md-sidebar")).forEach(qt=>{qt.style.setProperty("opacity","0")})},onLoaded:()=>{}})]),[B,T,dt]);return(0,i.useEffect)(()=>{if(!Wt)return()=>{};let Dt=!0;return re(Wt,Jt).then(async Ht=>{if(!(Ht!=null&&Ht.innerHTML)||!Dt)return;window.scroll({top:0});const qt=await ye(Ht);ce(qt)}),()=>{Dt=!1}},[Wt,Jt,re,ye]),Pt};var cn=t(8560),Qn=t(2296),wt=t(57058);const ue=()=>{const p=(0,Qn.$L)(),{shadowRoot:T}=(0,v.x)(),B=T==null?void 0:T.querySelector('[data-md-component="content"]'),$=T==null?void 0:T.querySelector('div[data-md-component="sidebar"][data-md-type="navigation"], div[data-md-component="navigation"]');let _=$==null?void 0:$.querySelector('[data-techdocs-addons-location="primary sidebar"]');_||(_=document.createElement("div"),_.setAttribute("data-techdocs-addons-location","primary sidebar"),$==null||$.prepend(_));const ot=T==null?void 0:T.querySelector('div[data-md-component="sidebar"][data-md-type="toc"], div[data-md-component="toc"]');let dt=ot==null?void 0:ot.querySelector('[data-techdocs-addons-location="secondary sidebar"]');return dt||(dt=document.createElement("div"),dt.setAttribute("data-techdocs-addons-location","secondary sidebar"),ot==null||ot.prepend(dt)),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(cn.Z,{container:_,children:p.renderComponentsByLocation(wt.o.PrimarySidebar)}),(0,o.jsx)(cn.Z,{container:B,children:p.renderComponentsByLocation(wt.o.Content)}),(0,o.jsx)(cn.Z,{container:dt,children:p.renderComponentsByLocation(wt.o.SecondarySidebar)})]})},he=(0,d.Z)({search:{width:"100%","@media (min-width: 76.1875em)":{width:"calc(100% - 34.4rem)",margin:"0 auto"},"@media print":{display:"none"}}}),ko=f(p=>{var T;const{withSearch:B=!0,onReady:$}=p,_=he(),{entityMetadata:{value:ot,loading:dt},entityRef:Ct,setShadowRoot:It}=(0,v.x)(),$t=Zo(Ct),Jt=window.location.pathname,Wt=window.location.hash,Pt=m($t),[ce]=R([`[id="${Wt.slice(1)}"]`]);(0,i.useEffect)(()=>{if(!Pt)if(Wt)ce&&ce.scrollIntoView();else{var Xt,Mt;(Mt=document)===null||Mt===void 0||(Xt=Mt.querySelector("header"))===null||Xt===void 0||Xt.scrollIntoView()}},[Jt,Wt,ce,Pt]);const me=(0,i.useCallback)(Xt=>{It(Xt),$ instanceof Function&&$()},[It,$]);return dt===!1&&!ot?(0,o.jsx)(I.m,{status:"404",statusMessage:"PAGE NOT FOUND"}):$t?(0,o.jsx)(b.V,{children:(0,o.jsxs)(S.Z,{container:!0,children:[(0,o.jsx)(S.Z,{xs:12,item:!0,children:(0,o.jsx)(W,{})}),B&&(0,o.jsx)(S.Z,{className:_.search,xs:"auto",item:!0,children:(0,o.jsx)(_t,{entityId:Ct,entityTitle:ot==null||(T=ot.metadata)===null||T===void 0?void 0:T.title})}),(0,o.jsx)(S.Z,{xs:12,item:!0,children:(0,o.jsx)(A,{element:$t,onAppend:me,children:(0,o.jsx)(ue,{})})})]})}):(0,o.jsx)(b.V,{children:(0,o.jsx)(S.Z,{container:!0,children:(0,o.jsx)(S.Z,{xs:12,item:!0,children:(0,o.jsx)(W,{})})})})}),cr=null},65386:function(G,w,t){"use strict";t.d(w,{S:function(){return ft}});var o=t(52322),i=t(2784),d=t(18671),S=t(60905),v=t(98069),g=t(60364),c=t(73250),u=t(2296),y=t(68979),x=t(57058),O=t(75435),m=t(76277),A=t(51194),h=t(8709),M=t(79692),R=t(41128),P=t(90436),j=t(98864);const I=(0,M.Z)(bt=>({root:{textAlign:"left"},label:{color:bt.page.fontColor,fontWeight:bt.typography.fontWeightBold,letterSpacing:0,fontSize:bt.typography.fontSize,marginBottom:bt.spacing(1)/2,lineHeight:1},value:{color:(0,R.Fq)(bt.page.fontColor,.8),fontSize:bt.typography.fontSize,lineHeight:1}}),{name:"BackstageHeaderLabel"}),b=({value:bt,className:St,typographyRootComponent:Tt})=>(0,o.jsx)(P.Z,{component:Tt!=null?Tt:typeof bt=="string"?"p":"span",className:St,children:bt});function K(bt){const{label:St,value:Tt,url:pt,contentTypograpyRootComponent:xt}=bt,Y=I(),F=(0,o.jsx)(b,{className:Y.value,value:Tt||"<Unknown>",typographyRootComponent:xt});return(0,o.jsx)(S.Z,{item:!0,children:(0,o.jsxs)(P.Z,{component:"span",className:Y.root,children:[(0,o.jsx)(P.Z,{className:Y.label,children:St}),pt?(0,o.jsx)(j.rU,{to:pt,children:F}):F]})})}var H=t(48037),rt=t(44394),X=t(6542),V=t(37321),z=t(76635),et=t(95573);const it=(0,o.jsx)(v.Z,{animation:"wave",variant:"text",height:40}),ft=bt=>{const{palette:{common:{white:St}}}=(0,g.Z)(),{children:Tt}=bt,pt=(0,u.$L)(),xt=(0,rt.h_)(X.D),{title:Y,setTitle:F,subtitle:Q,setSubtitle:ct,entityRef:vt,metadata:{value:gt,loading:st},entityMetadata:{value:q,loading:ut}}=(0,y.x)();(0,i.useEffect)(()=>{gt&&(F(gt.site_name),ct(()=>{let{site_description:Lt}=gt;return(!Lt||Lt==="None")&&(Lt=""),Lt}))},[gt,F,ct]);const k=xt.getOptional("app.title")||"Backstage",Z=[Y,Q,k].filter(Boolean).join(" | "),{locationMetadata:tt,spec:nt}=q||{},mt=nt==null?void 0:nt.lifecycle,yt=q?(0,O.h)(q,h.S4):[],Bt=(0,V.t)(et._Z)(),zt=(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(K,{label:(0,z.capitalize)((q==null?void 0:q.kind)||"entity"),value:(0,o.jsx)(m.d,{color:"inherit",entityRef:vt,title:q==null?void 0:q.metadata.title,defaultKind:"Component"})}),yt.length>0&&(0,o.jsx)(K,{label:"Owner",value:(0,o.jsx)(A.r,{color:"inherit",entityRefs:yt,defaultKind:"group"})}),mt?(0,o.jsx)(K,{label:"Lifecycle",value:String(mt)}):null,tt&&tt.type!=="dir"&&tt.type!=="file"?(0,o.jsx)(K,{label:"",value:(0,o.jsxs)(S.Z,{container:!0,direction:"column",alignItems:"center",style:{color:St},children:[(0,o.jsx)(S.Z,{style:{padding:0},item:!0,children:(0,o.jsx)(c.Z,{style:{marginTop:"-25px"}})}),(0,o.jsx)(S.Z,{style:{padding:0},item:!0,children:"Source"})]}),url:tt.target}):null]});return!ut&&q===void 0||!st&&gt===void 0?null:(0,o.jsxs)(H.h,{type:"Documentation",typeLink:Bt,title:Y||it,subtitle:Q===""?void 0:Q||it,children:[(0,o.jsx)(d.Z,{titleTemplate:"%s",children:(0,o.jsx)("title",{children:Z})}),zt,Tt,pt.renderComponentsByLocation(x.o.Header)]})}},95573:function(G,w,t){"use strict";t.d(w,{Fw:function(){return d},_Z:function(){return i},pd:function(){return S}});var o=t(30283);const i=(0,o.N)({id:"techdocs:index-page"}),d=(0,o.N)({id:"techdocs:reader-page",params:["namespace","kind","name"]}),S=(0,o.N)({id:"techdocs:catalog-reader-view"})},55511:function(G,w,t){"use strict";t.r(w),t.d(w,{TechDocsSearchResultListItem:function(){return x}});var o=t(52322),i=t(2784),d=t(79692),S=t(49378),v=t(86136),g=t(90436),c=t(98864),u=t(76079);const y=(0,d.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",marginBottom:"1rem"}}),x=O=>{const{result:m,highlight:A,lineClamp:h=5,asListItem:M=!0,asLink:R=!0,title:P,icon:j}=O,I=y(),b=({children:rt})=>R?(0,o.jsx)(c.rU,{noTrack:!0,to:m.location,children:rt}):(0,o.jsx)(o.Fragment,{children:rt}),K=()=>{const rt=A!=null&&A.fields.title?(0,o.jsx)(u.F,{text:A.fields.title,preTag:A.preTag,postTag:A.postTag}):m.title,X=A!=null&&A.fields.entityTitle?(0,o.jsx)(u.F,{text:A.fields.entityTitle,preTag:A.preTag,postTag:A.postTag}):m.entityTitle,V=A!=null&&A.fields.name?(0,o.jsx)(u.F,{text:A.fields.name,preTag:A.preTag,postTag:A.postTag}):m.name;return m?(0,o.jsx)(S.Z,{className:I.itemText,primaryTypographyProps:{variant:"h6"},primary:(0,o.jsx)(b,{children:P||(0,o.jsxs)(o.Fragment,{children:[rt," | ",X!=null?X:V," docs"]})}),secondary:(0,o.jsx)(g.Z,{component:"span",style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:h,overflow:"hidden"},color:"textSecondary",variant:"body2",children:A!=null&&A.fields.text?(0,o.jsx)(u.F,{text:A.fields.text,preTag:A.preTag,postTag:A.postTag}):m.text})}):null},H=({children:rt})=>M?(0,o.jsxs)(o.Fragment,{children:[j&&(0,o.jsx)(v.Z,{children:typeof j=="function"?j(m):j}),(0,o.jsx)("div",{className:I.flexContainer,children:rt})]}):(0,o.jsx)(o.Fragment,{children:rt});return(0,o.jsx)(H,{children:(0,o.jsx)(K,{})})}},53260:function(){}},function(G){var w=function(o){return G(G.s=o)};G.O(0,[2370,6202,9284,7012,427,242,5109,5218,6816,1213,4736],function(){return w(51280)});var t=G.O()}]);})();
490
-
491
- //# sourceMappingURL=main.5a486dfb.js.map