@techdocs/cli 1.8.0-next.1 → 1.8.0-next.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (24) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/embedded-app/index.html +1 -1
  3. package/dist/embedded-app/static/{4109.703c7257.chunk.js → 4109.02fdecdd.chunk.js} +2 -2
  4. package/dist/embedded-app/static/4109.02fdecdd.chunk.js.map +1 -0
  5. package/dist/embedded-app/static/{main.58e94ce8.js → main.2d90956b.js} +3 -3
  6. package/dist/embedded-app/static/main.2d90956b.js.map +1 -0
  7. package/dist/embedded-app/static/module-react-router-dom.8011e8db.js +22 -0
  8. package/dist/embedded-app/static/module-react-router-dom.8011e8db.js.map +1 -0
  9. package/dist/embedded-app/static/module-react-router.5b9ed471.js +22 -0
  10. package/dist/embedded-app/static/module-react-router.5b9ed471.js.map +1 -0
  11. package/dist/embedded-app/static/{runtime.58e94ce8.js → runtime.2d90956b.js} +2 -2
  12. package/dist/embedded-app/static/{runtime.58e94ce8.js.map → runtime.2d90956b.js.map} +1 -1
  13. package/dist/embedded-app/static/vendor.2d90956b.js +164 -0
  14. package/dist/embedded-app/static/vendor.2d90956b.js.map +1 -0
  15. package/dist/index.cjs.js +1 -1
  16. package/package.json +4 -4
  17. package/dist/embedded-app/static/4109.703c7257.chunk.js.map +0 -1
  18. package/dist/embedded-app/static/main.58e94ce8.js.map +0 -1
  19. package/dist/embedded-app/static/module-react-router-dom.48ea1f60.js +0 -22
  20. package/dist/embedded-app/static/module-react-router-dom.48ea1f60.js.map +0 -1
  21. package/dist/embedded-app/static/module-react-router.67245b2c.js +0 -22
  22. package/dist/embedded-app/static/module-react-router.67245b2c.js.map +0 -1
  23. package/dist/embedded-app/static/vendor.58e94ce8.js +0 -164
  24. package/dist/embedded-app/static/vendor.58e94ce8.js.map +0 -1
@@ -1,8 +1,8 @@
1
- (()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[179],{88797:function(J,T,t){"use strict";t.d(T,{n:function(){return o}});const o=Symbol.for("CATALOG_FILTER_EXISTS_0e15b590c0b343a2bae3e787e84c2111")},34106:function(J,T,t){"use strict";t.d(T,{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",p="kubernetes.io/auth-provider"},74314:function(J,T,t){"use strict";t.d(T,{eE:function(){return v},iB:function(){return d},of:function(){return S}});var o=t(34106);function i(p){let c=p.indexOf(":");const u=p.indexOf("/");u!==-1&&u<c&&(c=-1);const A=c===-1?void 0:p.slice(0,c),x=u===-1?void 0:p.slice(c+1,u),O=p.slice(Math.max(c+1,u+1));if(A===""||x===""||O==="")throw new TypeError(`Entity reference "${p}" was not on the form [<kind>:][<namespace>/]<name>`);return{kind:A,namespace:x,name:O}}function d(p){return{kind:p.kind,namespace:p.metadata.namespace||o.zG,name:p.metadata.name}}function S(p,c){if(!p)throw new Error("Entity reference must not be empty");const u=c==null?void 0:c.defaultKind,A=(c==null?void 0:c.defaultNamespace)||o.zG;let x,O,m;if(typeof p=="string"){const P=i(p);var b;x=(b=P.kind)!==null&&b!==void 0?b:u;var g;O=(g=P.namespace)!==null&&g!==void 0?g:A,m=P.name}else{var M;x=(M=p.kind)!==null&&M!==void 0?M:u;var R;O=(R=p.namespace)!==null&&R!==void 0?R:A,m=p.name}if(x)if(O){if(!m){const P=JSON.stringify(p);throw new Error(`Entity reference ${P} had missing or empty name`)}}else{const P=JSON.stringify(p);throw new Error(`Entity reference ${P} had missing or empty namespace`)}else{const P=JSON.stringify(p);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(p){let c,u,A;if("metadata"in p){c=p.kind;var x;u=(x=p.metadata.namespace)!==null&&x!==void 0?x:o.zG,A=p.metadata.name}else{c=p.kind;var O;u=(O=p.namespace)!==null&&O!==void 0?O:o.zG,A=p.name}return`${c.toLocaleLowerCase("en-US")}:${u.toLocaleLowerCase("en-US")}/${A.toLocaleLowerCase("en-US")}`}},8709:function(J,T,t){"use strict";t.d(T,{S4:function(){return o},aS:function(){return g},cz:function(){return b},nP:function(){return c},w$:function(){return u}});const o="ownedBy",i="ownerOf",d="consumesApi",S="apiConsumedBy",v="providesApi",p="apiProvidedBy",c="dependsOn",u="dependencyOf",A="parentOf",x="childOf",O="memberOf",m="hasMember",b="partOf",g="hasPart"},90663:function(J,T,t){"use strict";t.d(T,{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(J,T,t){"use strict";t.d(T,{CV:function(){return p},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 A=c.substring(0,u).trim(),x=c.substring(u+1).trim();if(!A||!x)throw new TypeError(`Unable to parse location ref '${c}', expected '<type>:<target>', e.g. 'url:https://host/path'`);if(A==="http"||A==="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:A,target:x}}function v(c){const{type:u,target:A}=c;if(u){if(!A)throw new TypeError("Unable to stringify location ref, empty target")}else throw new TypeError("Unable to stringify location ref, empty type");if(d.test(A))throw new TypeError(`Invalid location ref '${u}:${A}', target is a javascript: URL`);return`${u}:${A}`}function p(c){var u,A,x,O,m;const b=(m=(A=c.metadata)===null||A===void 0||(u=A.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(!b)throw new Error(`Entity '${(0,o.eE)(c)}' is missing location`);return S(b)}},9791:function(J,T,t){"use strict";t.d(T,{O:function(){return A}});var o=t(52322),i=t(62774),d=t(60364),S=t(2784),v=t(83229),p=t(26639),c=t(39595),u=t(58033);function A(x){const{text:O,language:m,showLineNumbers:b=!1,highlightedNumbers:g,customStyle:M,showCopyCodeButton:R=!1}=x,P=(0,d.Z)(),$=P.palette.type==="dark"?p.Z:c.Z,L=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:$,showLineNumbers:b,wrapLines:!0,lineNumberStyle:{color:P.palette.textVerySubtle},lineProps:y=>g!=null&&g.includes(y)?{style:{backgroundColor:L}}:{},children:O}),R&&(0,o.jsx)(i.Z,{position:"absolute",top:0,right:0,children:(0,o.jsx)(u.b,{text:O})})]})}},58033:function(J,T,t){"use strict";t.d(T,{b:function(){return A}});var o=t(52322),i=t(44394),d=t(58513),S=t(61837),v=t(80030),p=t(19353),c=t(2784),u=t(95074);function A(x){const{text:O,tooltipDelay:m=1e3,tooltipText:b="Text copied to clipboard","aria-label":g="Copy text"}=x,M=(0,i.h_)(d.V),[R,P]=(0,c.useState)(!1),[{error:$},L]=(0,u.Z)();(0,c.useEffect)(()=>{$&&M.post($)},[$,M]);const y=Z=>{Z.stopPropagation(),P(!0),L(O)};return(0,o.jsx)(o.Fragment,{children:(0,o.jsx)(v.ZP,{id:"copy-test-tooltip",title:b,placement:"top",leaveDelay:m,onClose:()=>P(!1),open:R,children:(0,o.jsx)(S.Z,{onClick:y,"aria-label":g,children:(0,o.jsx)(p.Z,{})})})})}},70249:function(J,T,t){"use strict";t.d(T,{u:function(){return b}});var o=t(52322),i=t(60905),d=t(79692),S=t(90436),v=t(2784),p=t.p+"static/missingAnnotation.67f79e98..svg",c=t.p+"static/noInformation.4b426325..svg",u=t.p+"static/createComponent.975d1e1e..svg",A=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:g})=>{const M=x();switch(g){case"field":return(0,o.jsx)("img",{src:p,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:A,alt:"no Build",className:M.generalImg});default:return null}},m=(0,d.Z)(g=>({root:{backgroundColor:g.palette.background.default,padding:g.spacing(2,0,0,0)},action:{marginTop:g.spacing(2)},imageContainer:{position:"relative"}}),{name:"BackstageEmptyState"});function b(g){const{title:M,description:R,missing:P,action:$}=g,L=m();return(0,o.jsxs)(i.Z,{container:!0,direction:"row",justifyContent:"space-around",alignItems:"flex-start",className:L.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:L.action,children:$})]})}),(0,o.jsx)(i.Z,{item:!0,xs:12,md:6,className:L.imageContainer,children:typeof P=="string"?(0,o.jsx)(O,{missing:P}):P.customImage})]})}},74359:function(J,T,t){"use strict";t.d(T,{y:function(){return O}});var o=t(52322),i=t(79692),d=t(11776),S=t(38402),v=t(49378),p=t(2784),c=t(58033),u=t(538);const A=(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:b,stack:g,children:M})=>{const R=A();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:b}),(0,o.jsx)(c.b,{text:b})]}),g&&(0,o.jsxs)(S.Z,{alignItems:"flex-start",children:[(0,o.jsx)(v.Z,{classes:{secondary:R.text},primary:"Stack Trace",secondary:g}),(0,o.jsx)(c.b,{text:g})]}),M]})};function O(m){const{title:b,error:g,defaultExpanded:M,titleFormat:R,children:P}=m;return(0,o.jsx)(u.G,{severity:"error",title:b!=null?b:g.message,defaultExpanded:M,titleFormat:R,children:(0,o.jsx)(x,{error:g.name,message:g.message,stack:g.stack,children:P})})}},98864:function(J,T,t){"use strict";t.d(T,{rU:function(){return Y}});var o=t(52322),i=t(44394),d=t(6542),S=t(62369),v=t(86689),p=t(79692),c=t(90436),u=t(72779),A=t.n(u),x=t(76635),O=t.n(x),m=t(2784),b=t(73557),g=t(71597);function M(){const[K]=(0,b.is)((0,o.jsx)(b.AW,{index:!0,element:(0,o.jsx)("div",{})}));return!K.index}const R=(0,p.Z)({visuallyHidden:{clip:"rect(0 0 0 0)",clipPath:"inset(50%)",overflow:"hidden",position:"absolute",whiteSpace:"nowrap",height:1,width:1},externalLink:{position:"relative"}},{name:"Link"}),P=K=>/^([a-z+.-]+):/.test(K),$=/^[\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,L=window.open;if(L&&!L.__backstage){const K=function(..._){const rt=String(_[0]);if($.test(rt))throw new Error("Rejected window.open() with a javascript: URL as a security precaution");return L.apply(this,_)};K.__backstage=!0,window.open=K}const y=()=>{try{return(0,i.h_)(d.D).getOptionalString("app.baseUrl")}catch{return}},Z=()=>{const K="http://sample.dev";var k;const _=(k=y())!==null&&k!==void 0?k:"/",{pathname:rt}=new URL(_,K);return(0,x.trimEnd)(rt,"/")},V=K=>{let k=String(K);const _=Z(),rt=P(k),dt=k.startsWith(_);return!rt&&!dt&&(k=_.concat(k)),k},et=K=>{if(K instanceof Array)return K.map(et).join(" ").trim();if(typeof K=="object"&&K){var k;return et(K==null||(k=K.props)===null||k===void 0?void 0:k.children)}return["string","number"].includes(typeof K)?String(K):""},Y=m.forwardRef(({onClick:K,noTrack:k,..._},rt)=>{const dt=R(),vt=(0,S.z)(),Et=M()?V(_.to):_.to,Tt=et(_.children)||Et,gt=P(Et),xt=gt&&!!/^https?:/.exec(Et);if($.test(Et))throw new Error("Link component rejected javascript: URL as a security precaution");const Q=j=>{K==null||K(j),k||vt.captureEvent("click",Tt,{attributes:{to:Et}})};return gt?(0,o.jsxs)(v.Z,{...xt?{target:"_blank",rel:"noopener"}:{},..._,..._["aria-label"]?{"aria-label":`${_["aria-label"]}, Opens in a new window`}:{},ref:rt,href:Et,onClick:Q,className:A()(dt.externalLink,_.className),children:[_.children,(0,o.jsx)(c.Z,{component:"span",className:dt.visuallyHidden,children:", Opens in a new window"})]}):(0,o.jsx)(v.Z,{..._,ref:rt,component:g.rU,to:Et,onClick:Q})})},15929:function(J,T,t){"use strict";t.d(T,{Q:function(){return p}});var o=t(52322),i=t(77277),d=t(2784),S=t(98864);const v=d.forwardRef((u,A)=>(0,o.jsx)(S.rU,{ref:A,...u,color:"initial"})),p=d.forwardRef((u,A)=>(0,o.jsx)(i.Z,{ref:A,component:v,...u})),c=null},78527:function(J,T,t){"use strict";t.d(T,{S:function(){return O}});var o=t(52322),i=t(79692),d=t(28865),S=t(60251),v=t(2784),p=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,b)=>b?typeof b=="string"?m+b:v.Children.toArray(b.props.children).reduce(u,m):m,A=({level:m,children:b})=>{const R=v.Children.toArray(b).reduce(u,"").toLocaleLowerCase("en-US").replace(/\W/g,"-");return v.createElement(`h${m}`,{id:R},b)},x={code:({inline:m,className:b,children:g,...M})=>{const R=String(g).replace(/\n+$/,""),P=/language-(\w+)/.exec(b||"");return!m&&P?(0,o.jsx)(p.O,{language:P[1],text:R}):(0,o.jsx)("code",{className:b,...M,children:g})},h1:A,h2:A,h3:A,h4:A,h5:A,h6:A};function O(m){const{content:b,dialect:g="gfm",linkTarget:M,transformLinkUri:R,transformImageUri:P,className:$}=m,L=c();return(0,o.jsx)(d.D,{remarkPlugins:g==="gfm"?[S.Z]:[],className:`${L.markdown} ${$}`,children:b,components:x,linkTarget:M,transformLinkUri:R,transformImageUri:P})}},55015:function(J,T,t){"use strict";t.d(T,{E:function(){return p}});var o=t(52322),i=t(62774),d=t(67358),S=t(60364),v=t(2784);function p(c){const u=(0,S.Z)(),[A,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]),A?(0,o.jsx)(d.Z,{...c,"data-testid":"progress"}):(0,o.jsx)(i.Z,{display:"none"})}},35879:function(J,T,t){"use strict";t.d(T,{H:function(){return Y}});var o=t(52322),i=t(62774),d=t(21324),S=t(7089),v=t(30192),p=t(74603),c=t(56939),u=t(12231),A=t(73698),x=t(15459),O=t(42494),m=t(79692),b=t(90436),g=t(2784),M=t(72379);const R=(0,m.Z)(K=>(0,O.Z)({icon:{position:"absolute",right:K.spacing(.5),pointerEvents:"none"}}),{name:"BackstageClosedDropdown"});var $=()=>{const K=R();return(0,o.jsx)(M.Z,{className:K.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 L=(0,m.Z)(K=>(0,O.Z)({icon:{position:"absolute",right:K.spacing(.5),pointerEvents:"none"}}),{name:"BackstageOpenedDropdown"});var Z=()=>{const K=L();return(0,o.jsx)(M.Z,{className:K.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 V=(0,x.Z)(K=>(0,O.Z)({root:{"label + &":{marginTop:K.spacing(3)},"&.Mui-focused > div[role=button]":{borderColor:K.palette.primary.main}},input:{borderRadius:K.shape.borderRadius,position:"relative",backgroundColor:K.palette.background.paper,border:"1px solid #ced4da",fontSize:K.typography.body1.fontSize,padding:K.spacing(1.25,3.25,1.25,1.5),transition:K.transitions.create(["border-color","box-shadow"]),fontFamily:"Helvetica Neue","&:focus":{background:K.palette.background.paper,borderRadius:K.shape.borderRadius}}}),{name:"BackstageSelectInputBase"})(p.Z),et=(0,m.Z)(K=>(0,O.Z)({formControl:{margin:K.spacing(1,0),maxWidth:300},label:{transform:"initial",fontWeight:"bold",fontSize:K.typography.body2.fontSize,fontFamily:K.typography.fontFamily,color:K.palette.text.primary,"&.Mui-focused":{color:K.palette.text.primary}},formLabel:{transform:"initial",fontWeight:"bold",fontSize:K.typography.body2.fontSize,fontFamily:K.typography.fontFamily,color:K.palette.text.primary,"&.Mui-focused":{color:K.palette.text.primary}},chips:{display:"flex",flexWrap:"wrap"},chip:{margin:2},checkbox:{},root:{display:"flex",flexDirection:"column"}}),{name:"BackstageSelect"});function Y(K){const{multiple:k,items:_,label:rt,placeholder:dt,selected:vt,onChange:Et,triggerReset:Tt,native:gt=!1,disabled:xt=!1,margin:Q}=K,j=et(),[z,q]=(0,g.useState)(vt||(k?[]:"")),[st,it]=(0,g.useState)(!1);(0,g.useEffect)(()=>{q(k?[]:"")},[Tt,k]),(0,g.useEffect)(()=>{q(vt||(k?[]:""))},[vt,k]);const at=H=>{q(H.target.value),Et(H.target.value)},nt=H=>{if(xt){H.preventDefault();return}it(ut=>k&&!(H.target instanceof HTMLElement)?!0:!ut)},St=()=>{it(!1)},G=H=>()=>{const ut=z.filter(ht=>ht!==H);q(ut),Et(ut)};return(0,o.jsx)(i.Z,{className:j.root,children:(0,o.jsxs)(v.Z,{className:j.formControl,children:[(0,o.jsx)(c.Z,{className:j.formLabel,children:rt}),(0,o.jsxs)(A.Z,{"aria-label":rt,value:z,native:gt,disabled:xt,"data-testid":"select",displayEmpty:!0,multiple:k,margin:Q,onChange:at,open:st,onOpen:nt,onClose:St,input:(0,o.jsx)(V,{}),label:rt,renderValue:H=>{var ut;return k&&z.length!==0?(0,o.jsx)(i.Z,{className:j.chips,children:H.map(ht=>{const mt=_.find(bt=>bt.value===ht);return mt?(0,o.jsx)(S.Z,{label:mt==null?void 0:mt.label,clickable:!0,onDelete:G(ht),className:j.chip},mt==null?void 0:mt.value):!1})}):(0,o.jsx)(b.Z,{children:z.length===0?dt||"":(ut=_.find(ht=>ht.value===H))===null||ut===void 0?void 0:ut.label})},IconComponent:()=>st?(0,o.jsx)(Z,{}):(0,o.jsx)($,{}),MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},getContentAnchorEl:null},children:[dt&&!k&&(0,o.jsx)(u.Z,{value:[],children:dt}),gt?_&&_.map(H=>(0,o.jsx)("option",{value:H.value,children:H.label},H.value)):_&&_.map(H=>(0,o.jsxs)(u.Z,{value:H.value,children:[k&&(0,o.jsx)(d.Z,{color:"primary",checked:z.includes(H.value)||!1,className:j.checkbox}),H.label]},H.value))]})]})})}},13788:function(J,T,t){"use strict";t.d(T,{q:function(){return Q}});var o=t(52322),i=t(80851),d=t(62774),S=t(77277),v=t(49429),p=t(61837),c=t(86136),u=t(49378),A=t(12231),x=t(50758),O=t(79784),m=t(79692),b=t(90436),g=t(41156),M=t(2784),R=t(77770),P=t(80079);function $(j,z){const st=(0,i.q)().getSystemIcon(j);return st?(0,o.jsx)(st,{...z}):(0,o.jsx)(P.Z,{...z})}function L(j){return $("brokenImage",j)}function y(j){return $("catalog",j)}function Z(j){return $("chat",j)}function V(j){return $("dashboard",j)}function et(j){return $("docs",j)}function Y(j){return $("email",j)}function K(j){return $("github",j)}function k(j){return $("group",j)}function _(j){return $("help",j)}function rt(j){return $("user",j)}function dt(j){return $("warning",j)}var vt=t(98864);const Et=(0,m.Z)({popoverList:{minWidth:260,maxWidth:400},menuItem:{whiteSpace:"normal"}},{name:"BackstageSupportButton"}),Tt=({icon:j})=>{const z=(0,i.q)();var q;const st=j&&(q=z.getSystemIcon(j))!==null&&q!==void 0?q:_;return(0,o.jsx)(st,{})},gt=({link:j})=>{var z;return(0,o.jsx)(vt.rU,{to:j.url,children:(z=j.title)!==null&&z!==void 0?z:j.url})},xt=({item:j})=>{var z;return(0,o.jsxs)(A.Z,{children:[(0,o.jsx)(c.Z,{children:(0,o.jsx)(Tt,{icon:j.icon})}),(0,o.jsx)(u.Z,{primary:j.title,secondary:(z=j.links)===null||z===void 0?void 0:z.reduce((q,st,it)=>[...q,it>0&&(0,o.jsx)("br",{},it),(0,o.jsx)(gt,{link:st},st.url)],[])})]})};function Q(j){const{title:z,items:q,children:st}=j,{items:it}=(0,R.v)(),[at,nt]=(0,M.useState)(!1),[St,G]=(0,M.useState)(null),H=Et(),ut=(0,g.Z)(bt=>bt.breakpoints.down("sm")),ht=bt=>{G(bt.currentTarget),nt(!0)},mt=()=>{nt(!1)};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.Z,{display:"flex",ml:1,children:ut?(0,o.jsx)(p.Z,{color:"primary",size:"small",onClick:ht,"data-testid":"support-button","aria-label":"Support",children:(0,o.jsx)(_,{})}):(0,o.jsx)(S.Z,{"data-testid":"support-button","aria-label":"Support",color:"primary",onClick:ht,startIcon:(0,o.jsx)(_,{}),children:"Support"})}),(0,o.jsxs)(O.ZP,{"data-testid":"support-button-popover",open:at,anchorEl:St,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},onClose:mt,children:[(0,o.jsxs)(x.Z,{className:H.popoverList,autoFocusItem:Boolean(St),children:[z&&(0,o.jsx)(A.Z,{alignItems:"flex-start",className:H.menuItem,children:(0,o.jsx)(b.Z,{variant:"subtitle1",children:z})}),M.Children.map(st,(bt,jt)=>(0,o.jsx)(A.Z,{alignItems:"flex-start",className:H.menuItem,children:bt},`child-${jt}`)),(q!=null?q:it).map((bt,jt)=>(0,o.jsx)(xt,{item:bt},`item-${jt}`))]}),(0,o.jsx)(v.Z,{children:(0,o.jsx)(S.Z,{color:"primary",onClick:mt,"aria-label":"Close",children:"Close"})})]})]})}},34378:function(J,T,t){"use strict";t.d(T,{i:function(){return at}});var o=t(52322),i=t(67222),d=t(62774),S=t(61837),v=t(15459),p=t(79692),c=t(60364),u=t(90436),A=t(21070),x=t(90324),O=t(98281),m=t(48049),b=t(51209),g=t(33375),M=t(44233),R=t(27604),P=t(36444),$=t(37971),L=t(59709),y=t(17373),Z=t(3702),V=t(93111),et=t(76635),Y=t(2784),K=t(77277),k=t(35879);const _=(0,p.Z)(G=>({root:{height:"100%",width:"315px",display:"flex",flexDirection:"column",marginRight:G.spacing(3)},value:{fontWeight:"bold",fontSize:18},header:{display:"flex",alignItems:"center",height:G.spacing(7.5),justifyContent:"space-between",borderBottom:`1px solid ${G.palette.grey[500]}`},filters:{display:"flex",flexDirection:"column","& > *":{marginTop:G.spacing(2)}}}),{name:"BackstageTableFilters"}),rt=G=>{var H;const ut=_(),{onChangeFilters:ht}=G,[mt,bt]=(0,Y.useState)({...G.selectedFilters}),[jt,Jt]=(0,Y.useState)(!1),Wt=()=>{bt({}),Jt(Ht=>!Ht)};return(0,Y.useEffect)(()=>{ht(mt)},[mt,ht]),(0,o.jsxs)(d.Z,{className:ut.root,children:[(0,o.jsxs)(d.Z,{className:ut.header,children:[(0,o.jsx)(d.Z,{className:ut.value,children:"Filters"}),(0,o.jsx)(K.Z,{color:"primary",onClick:Wt,children:"Clear all"})]}),(0,o.jsx)(d.Z,{className:ut.filters,children:((H=G.filters)===null||H===void 0?void 0:H.length)&&G.filters.map(Ht=>(0,o.jsx)(k.H,{triggerReset:jt,...Ht.element,selected:mt[Ht.element.label],onChange:Dt=>bt({...mt,[Ht.element.label]:Dt})},Ht.element.label))})]})};var dt=t(4614);function vt(G){return(0,o.jsx)("tbody",{"data-testid":"loading-indicator",children:(0,o.jsx)("tr",{children:(0,o.jsx)("td",{colSpan:G.colSpan,children:(0,o.jsx)(d.Z,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",minHeight:"15rem"},children:(0,o.jsx)(dt.Z,{size:"5rem"})})})})})}const Et={Add:(0,Y.forwardRef)((G,H)=>(0,o.jsx)(A.Z,{...G,ref:H})),Check:(0,Y.forwardRef)((G,H)=>(0,o.jsx)(O.Z,{...G,ref:H})),Clear:(0,Y.forwardRef)((G,H)=>(0,o.jsx)(g.Z,{...G,ref:H})),Delete:(0,Y.forwardRef)((G,H)=>(0,o.jsx)(M.Z,{...G,ref:H})),DetailPanel:(0,Y.forwardRef)((G,H)=>(0,o.jsx)(b.Z,{...G,ref:H})),Edit:(0,Y.forwardRef)((G,H)=>(0,o.jsx)(R.Z,{...G,ref:H})),Export:(0,Y.forwardRef)((G,H)=>(0,o.jsx)(Z.Z,{...G,ref:H})),Filter:(0,Y.forwardRef)((G,H)=>(0,o.jsx)(P.Z,{...G,ref:H})),FirstPage:(0,Y.forwardRef)((G,H)=>(0,o.jsx)($.Z,{...G,ref:H})),LastPage:(0,Y.forwardRef)((G,H)=>(0,o.jsx)(L.Z,{...G,ref:H})),NextPage:(0,Y.forwardRef)((G,H)=>(0,o.jsx)(b.Z,{...G,ref:H})),PreviousPage:(0,Y.forwardRef)((G,H)=>(0,o.jsx)(m.Z,{...G,ref:H})),ResetSearch:(0,Y.forwardRef)((G,H)=>(0,o.jsx)(g.Z,{...G,ref:H})),Search:(0,Y.forwardRef)((G,H)=>(0,o.jsx)(P.Z,{...G,ref:H})),SortArrow:(0,Y.forwardRef)((G,H)=>(0,o.jsx)(x.Z,{...G,ref:H})),ThirdStateCheck:(0,Y.forwardRef)((G,H)=>(0,o.jsx)(y.Z,{...G,ref:H})),ViewColumn:(0,Y.forwardRef)((G,H)=>(0,o.jsx)(V.Z,{...G,ref:H}))};function Tt(G,H){const ut=H.split(".");let ht=G[ut[0]];for(let mt=1;mt<ut.length;++mt){if(ht===void 0)return ht;const bt=ut[mt];ht=ht[bt]}return ht}const gt=(0,v.Z)(G=>({header:{padding:G.spacing(1,2,1,2.5),borderTop:`1px solid ${G.palette.grey.A100}`,borderBottom:`1px solid ${G.palette.grey.A100}`,fontWeight:G.typography.fontWeightBold,position:"static",wordBreak:"normal"}}),{name:"BackstageTableHeader"})(i.W$),xt=(0,v.Z)(G=>({root:{padding:G.spacing(3,0,2.5,2.5)},title:{"& > h6":{fontWeight:G.typography.fontWeightBold}},searchField:{paddingRight:G.spacing(2)}}),{name:"BackstageTableToolbar"})(i.UW),Q=(0,p.Z)(G=>({root:{display:"flex",alignItems:"center",justifyContent:"space-between"},title:{fontWeight:G.typography.fontWeightBold,fontSize:18,whiteSpace:"nowrap"}}),{name:"BackstageTableFiltersContainer"}),j=(0,p.Z)(()=>({root:{display:"flex",alignItems:"start"}}),{name:"BackstageTable"});function z(G,H){return G.map(ut=>{var ht;const mt=(ht=ut.headerStyle)!==null&&ht!==void 0?ht:{};let bt=ut.cellStyle||{};if(ut.highlight)if(mt.color=H.palette.textContrast,typeof bt=="object")bt.fontWeight=H.typography.fontWeightBold;else{const jt=bt;bt=(Jt,Wt,Ht)=>({...jt(Jt,Wt,Ht),fontWeight:H.typography.fontWeightBold})}return{...ut,headerStyle:mt,cellStyle:bt}})}function q(G,H){return(0,et.transform)(G,(ut,ht,mt)=>{(0,et.isEqual)(ht,H[mt])||(ut[mt]=ht)})}const st={search:"",filtersOpen:!1,filters:{}};function it(G){const{toolbarRef:H,setSearch:ut,hasFilters:ht,selectedFiltersLength:mt,toggleFilters:bt}=G,jt=Q(),Jt=(0,Y.useCallback)(Wt=>{G.onSearchChanged(Wt),ut(Wt)},[G,ut]);return ht?(0,o.jsxs)(d.Z,{className:jt.root,children:[(0,o.jsxs)(d.Z,{className:jt.root,children:[(0,o.jsx)(S.Z,{onClick:bt,"aria-label":"filter list",children:(0,o.jsx)(P.Z,{})}),(0,o.jsxs)(u.Z,{className:jt.title,children:["Filters (",mt,")"]})]}),(0,o.jsx)(xt,{...G,ref:H,onSearchChanged:Jt})]}):(0,o.jsx)(xt,{...G,ref:H,onSearchChanged:Jt})}function at(G){const{data:H,columns:ut,emptyContent:ht,options:mt,title:bt,subtitle:jt,localization:Jt,filters:Wt,initialState:Ht,onStateChange:Dt,components:Mt,isLoading:Gt,...ee}=G,re=j(),qt=(0,c.Z)(),de={...st,...Ht},[Ie,Ge]=(0,Y.useState)(de.filtersOpen),_e=(0,Y.useCallback)(()=>Ge(Se=>!Se),[Ge]),[xe,qe]=(0,Y.useState)(de.filters),[Ve,Ye]=(0,Y.useState)(de.search);(0,Y.useEffect)(()=>{if(Dt){const Se=q({search:Ve,filtersOpen:Ie,filters:xe},st);Dt(Se)}},[Ve,Ie,xe,Dt]);const se=(0,Y.useCallback)(Se=>{var Ue;return(Ue=ut.find($e=>$e.title===Se))===null||Ue===void 0?void 0:Ue.field},[ut]),sn=(0,Y.useMemo)(()=>{if(typeof H=="function"||!xe)return H;const Se=Object.values(xe);return H&&Se.flat().length?H.filter($e=>!!Object.entries(xe).filter(([,U])=>!!U.length).every(([U,h])=>{const I=Tt($e,se(U));return Array.isArray(I)&&Array.isArray(h)?I.some(W=>h.includes(W)):Array.isArray(I)?I.includes(h):Array.isArray(h)?h.includes(I):I===h})):H},[H,xe,se]),Pe=Object.values(xe).flat().length,tn=!!(Wt!=null&&Wt.length),an=(0,Y.useCallback)(Se=>(0,o.jsx)(it,{setSearch:Ye,hasFilters:tn,selectedFiltersLength:Pe,toggleFilters:_e,...Se}),[_e,tn,Pe,Ye]),ie=typeof H!="function"&&H.length===0,Ne=ut.length,ke=(0,Y.useMemo)(()=>nt({hasNoRows:ie,emptyContent:ht,columnCount:Ne,loading:Gt}),[ie,ht,Ne,Gt]);return(0,o.jsxs)(d.Z,{className:re.root,children:[Ie&&H&&typeof H!="function"&&(Wt==null?void 0:Wt.length)&&(0,o.jsx)(rt,{filters:St(Wt,H,ut),selectedFilters:xe,onChangeFilters:qe}),(0,o.jsx)(i.ZP,{components:{Header:gt,Body:ke,Toolbar:an,...Mt},options:{headerStyle:{textTransform:"uppercase"},...mt},columns:z(ut,qt),icons:Et,title:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(u.Z,{variant:"h5",component:"h2",children:bt}),jt&&(0,o.jsx)(u.Z,{color:"textSecondary",variant:"body1",children:jt})]}),data:sn,style:{width:"100%"},localization:{toolbar:{searchPlaceholder:"Filter",searchTooltip:"Filter"},...Jt},...ee})]})}at.icons=Object.freeze(Et);function nt({columnCount:G,emptyContent:H,hasNoRows:ut,loading:ht}){return mt=>ht?(0,o.jsx)(vt,{colSpan:G}):H&&ut?(0,o.jsx)("tbody",{children:(0,o.jsx)("tr",{children:(0,o.jsx)("td",{colSpan:G,children:H})})}):(0,o.jsx)(i.os,{...mt})}function St(G,H,ut){const ht=bt=>{const jt=new Set,Jt=Wt=>{Wt!=null&&jt.add(Wt)};return H&&H.forEach(Wt=>{var Ht;const Dt=Tt(Wt,(Ht=ut.find(Mt=>Mt.title===bt))===null||Ht===void 0?void 0:Ht.field);Array.isArray(Dt)?Dt.forEach(Jt):Jt(Dt)}),jt},mt=bt=>({placeholder:"All results",label:bt.column,multiple:bt.type==="multiple-select",items:[...ht(bt.column)].sort().map(jt=>({label:jt,value:jt}))});return G.map(bt=>({type:bt.type,element:mt(bt)}))}},538:function(J,T,t){"use strict";t.d(T,{G:function(){return y}});var o=t(52322),i=t(41128),d=t(79692),S=t(27616),v=t(8284),p=t(70660),c=t(60905),u=t(90436),A=t(91750),x=t(38016),O=t(2784),m=t(78527);const b=(Z,V)=>(V.palette.type==="light"?i._j:i.$n)(V.palette[Z].light,.6),g=(Z,V)=>(V.palette.type==="light"?i.$n:i._j)(V.palette[Z].light,.9),M=(0,d.Z)(Z=>({root:{marginRight:Z.spacing(1),fill:({severity:V})=>b(V,Z)}})),R=({severity:Z})=>{const V=M({severity:Z});return(0,o.jsx)(A.Z,{classes:V})},P=({severity:Z})=>{const V=M({severity:Z});return(0,o.jsx)(x.Z,{classes:V})},$=(0,d.Z)(Z=>({panel:{backgroundColor:({severity:V})=>g(V,Z),color:({severity:V})=>b(V,Z),verticalAlign:"middle"},summary:{display:"flex",flexDirection:"row"},summaryText:{color:({severity:V})=>b(V,Z),fontWeight:Z.typography.fontWeightBold},markdownContent:{"& p":{display:"inline"}},message:{width:"100%",display:"block",color:({severity:V})=>b(V,Z),backgroundColor:({severity:V})=>g(V,Z)},details:{width:"100%",display:"block",color:Z.palette.textContrast,backgroundColor:Z.palette.background.default,border:`1px solid ${Z.palette.border}`,padding:Z.spacing(2),fontFamily:"sans-serif"}}),{name:"BackstageWarningPanel"}),L=Z=>Z.charAt(0).toLocaleUpperCase("en-US")+Z.slice(1);function y(Z){const{severity:V="warning",title:et,titleFormat:Y,message:K,children:k,defaultExpanded:_}=Z,rt=$({severity:V}),dt=L(V)+(et?`: ${et}`:"");return(0,o.jsxs)(S.Z,{defaultExpanded:_!=null?_:!1,className:rt.panel,role:"alert",children:[(0,o.jsxs)(v.Z,{expandIcon:(0,o.jsx)(P,{severity:V}),className:rt.summary,children:[(0,o.jsx)(R,{severity:V}),(0,o.jsx)(u.Z,{className:rt.summaryText,variant:"subtitle1",children:Y==="markdown"?(0,o.jsx)(m.S,{content:dt,className:rt.markdownContent}):dt})]}),(K||k)&&(0,o.jsx)(p.Z,{children:(0,o.jsxs)(c.Z,{container:!0,children:[K&&(0,o.jsx)(c.Z,{item:!0,xs:12,children:(0,o.jsx)(u.Z,{className:rt.message,variant:"body1",children:K})}),k&&(0,o.jsx)(c.Z,{item:!0,xs:12,className:rt.details,children:k})]})})]})}},77770:function(J,T,t){"use strict";t.d(T,{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 p=(0,o.I_)().get(i.D),c=p==null?void 0:p.getOptionalConfig("app.support");return c?{url:c.getString("url"),items:c.getConfigArray("items").flatMap(u=>{var A;return{title:u.getString("title"),icon:u.getOptionalString("icon"),links:((A=u.getOptionalConfigArray("links"))!==null&&A!==void 0?A:[]).flatMap(x=>({url:x.getString("url"),title:x.getString("title")}))}})}:d}},42398:function(J,T,t){"use strict";t.d(T,{V:function(){return c}});var o=t(52322),i=t(79692),d=t(72779),S=t.n(d),v=t(2784);const p=(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:A,stretch:x,noPadding:O,children:m,...b}=u,g=p();return(0,o.jsx)("article",{...b,className:S()(g.root,A,{[g.stretch]:x,[g.noPadding]:O}),children:m})}},30706:function(J,T,t){"use strict";t.d(T,{y:function(){return A}});var o=t(52322),i=t(62774),d=t(79692),S=t(90436),v=t(2784),p=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 A(x){const{description:O,title:m,titleComponent:b=void 0,children:g,textAlign:M="left"}=x,R=c({textAlign:M})(),P=b||(0,o.jsx)(u,{title:m,className:R.title});return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(p.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:g})]})]})}},87435:function(J,T,t){"use strict";t.d(T,{m:function(){return b}});var o=t(52322),i=t(60905),d=t(79692),S=t(90436),v=t(2784),p=t(73557),c=t(98864),u=t(77770),A=t.p+"static/mic-drop.fe3ef4d0..svg";const x=(0,d.Z)(g=>({micDrop:{maxWidth:"60%",bottom:g.spacing(2),right:g.spacing(2),[g.breakpoints.down("xs")]:{maxWidth:"96%",bottom:"unset",right:"unset",margin:g.spacing(10,"auto",4)}}}),{name:"BackstageErrorPageMicDrop"}),O=()=>{const g=x();return(0,o.jsx)("img",{src:A,className:g.micDrop,alt:"Girl dropping mic from her hands"})},m=(0,d.Z)(g=>({container:{padding:g.spacing(8),[g.breakpoints.down("xs")]:{padding:g.spacing(2)}},title:{paddingBottom:g.spacing(5),[g.breakpoints.down("xs")]:{paddingBottom:g.spacing(4),fontSize:g.typography.h3.fontSize}},subtitle:{color:g.palette.textSubtle}}),{name:"BackstageErrorPage"});function b(g){const{status:M,statusMessage:R,additionalInfo:P,supportUrl:$}=g,L=m(),y=(0,p.s0)(),Z=(0,u.v)();return(0,o.jsxs)(i.Z,{container:!0,spacing:0,className:L.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:L.subtitle,children:["ERROR ",M,": ",R]}),(0,o.jsx)(S.Z,{variant:"body1",className:L.subtitle,children:P}),(0,o.jsx)(S.Z,{variant:"h2",className:L.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:()=>y(-1),children:"Go back"}),"... or please"," ",(0,o.jsx)(c.rU,{to:$||Z.url,children:"contact support"})," if you think this is a bug."]})]}),(0,o.jsx)(O,{})]})}},48037:function(J,T,t){"use strict";t.d(T,{h:function(){return K}});var o=t(52322),i=t(44394),d=t(6542),S=t(62774),v=t(60905),p=t(79692),c=t(80030),u=t(90436),A=t(2784),x=t(18671),O=t(98864),m=t(16173),b=t(11776),g=t(38402),M=t(79784),R=t(15459);const P=(0,R.Z)({root:{textDecoration:"underline",cursor:"pointer"}},{name:"BackstageBreadcrumbsClickableText"})(u.Z),$=(0,R.Z)({root:{textDecoration:"underline",color:"inherit"}},{name:"BackstageBreadcrumbsStyledBox"})(S.Z);function L(k){const{children:_,...rt}=k,[dt,vt]=A.useState(null),Et=A.Children.toArray(_),[Tt,gt,...xt]=Et,Q=xt.length?xt.pop():Et[Et.length-1],j=Et.length>3,z=it=>{vt(it.currentTarget)},q=()=>{vt(null)},st=Boolean(dt);return(0,o.jsxs)(A.Fragment,{children:[(0,o.jsxs)(m.Z,{"aria-label":"breadcrumb",...rt,children:[Et.length>1&&(0,o.jsx)($,{clone:!0,children:Tt}),Et.length>2&&(0,o.jsx)($,{clone:!0,children:gt}),j&&(0,o.jsx)(P,{onClick:z,children:"..."}),(0,o.jsx)(S.Z,{style:{fontStyle:"italic"},children:Q})]}),(0,o.jsx)(M.ZP,{open:st,anchorEl:dt,onClose:q,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},children:(0,o.jsx)(b.Z,{children:xt.map((it,at)=>(0,o.jsx)(g.Z,{button:!0,children:(0,o.jsx)($,{clone:!0,children:it})},at))})})]})}var y=t(44409);const Z=(0,p.Z)(k=>({header:{gridArea:"pageHeader",padding:k.spacing(3),width:"100%",boxShadow:k.shadows[4],position:"relative",zIndex:100,display:"flex",flexDirection:"row",alignItems:"center",backgroundImage:k.page.backgroundImage,backgroundPosition:"center",backgroundSize:"cover",[k.breakpoints.down("sm")]:{flexWrap:"wrap"}},leftItemsBox:{maxWidth:"100%",flexGrow:1},rightItemsBox:{width:"auto",alignItems:"center"},title:{color:k.page.fontColor,wordBreak:"break-word",fontSize:k.typography.h3.fontSize,marginBottom:0},subtitle:{color:k.page.fontColor,opacity:.8,display:"inline-block",marginTop:k.spacing(1),maxWidth:"75ch"},type:{textTransform:"uppercase",fontSize:11,opacity:.8,marginBottom:k.spacing(1),color:k.page.fontColor},breadcrumb:{color:k.page.fontColor},breadcrumbType:{fontSize:"inherit",opacity:.7,marginRight:-k.spacing(.3),marginBottom:k.spacing(.3)},breadcrumbTitle:{fontSize:"inherit",marginLeft:-k.spacing(.3),marginBottom:k.spacing(.3)}}),{name:"BackstageHeader"}),V=({type:k,typeLink:_,classes:rt,pageTitle:dt})=>k?_?(0,o.jsxs)(L,{className:rt.breadcrumb,children:[(0,o.jsx)(O.rU,{to:_,children:k}),(0,o.jsx)(u.Z,{children:dt})]}):(0,o.jsx)(u.Z,{className:rt.type,children:k}):null,et=({pageTitle:k,classes:_,tooltip:rt})=>{const{contentRef:dt}=(0,y.r)(),vt=(0,o.jsx)(u.Z,{ref:dt,tabIndex:-1,className:_.title,variant:"h1",children:k});return rt?(0,o.jsx)(c.ZP,{title:rt,placement:"top-start",children:vt}):vt},Y=({classes:k,subtitle:_})=>_?typeof _!="string"?(0,o.jsx)(o.Fragment,{children:_}):(0,o.jsx)(u.Z,{className:k.subtitle,variant:"subtitle2",component:"span",children:_}):null;function K(k){const{children:_,pageTitleOverride:rt,style:dt,subtitle:vt,title:Et,tooltip:Tt,type:gt,typeLink:xt}=k,Q=Z(),z=(0,i.h_)(d.D).getOptionalString("app.title")||"Backstage",q=rt||Et,st=Et||rt,it=`${q} | %s | ${z}`,at=`${q} | ${z}`;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(x.q,{titleTemplate:it,defaultTitle:at}),(0,o.jsxs)("header",{style:dt,className:Q.header,children:[(0,o.jsxs)(S.Z,{className:Q.leftItemsBox,children:[(0,o.jsx)(V,{classes:Q,type:gt,typeLink:xt,pageTitle:st}),(0,o.jsx)(et,{classes:Q,pageTitle:st,tooltip:Tt}),(0,o.jsx)(Y,{classes:Q,subtitle:vt})]}),(0,o.jsx)(v.Z,{container:!0,className:Q.rightItemsBox,spacing:4,children:_})]})]})}},67880:function(J,T,t){"use strict";t.d(T,{T:function(){return p}});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 p(c){const{themeId:u,children:A}=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:A})})}},32166:function(J,T,t){"use strict";t.d(T,{g:function(){return v}});var o=t(52322),i=t(2784),d=t(48037),S=t(67880);function v(p){const{themeId:c,children:u,...A}=p;return(0,o.jsxs)(S.T,{themeId:c,children:[(0,o.jsx)(d.h,{...A}),u]})}},44409:function(J,T,t){"use strict";t.d(T,{t:function(){return m},r:function(){return b}});var o=t(52322),i=t(62774),d=t(79692),S=t(41156),v=t(2784),p=t(76921),c;(function(g){g.SIDEBAR_PIN_STATE="sidebarPinState"})(c||(c={}));const u={getSidebarPinState(){let g;try{g=JSON.parse(window.localStorage.getItem("sidebarPinState")||"true")}catch{return!0}return!!g},setSidebarPinState(g){return window.localStorage.setItem("sidebarPinState",JSON.stringify(g))}};var A=t(93539);const x=(0,d.Z)(g=>({root:{width:"100%",transition:"padding-left 0.1s ease-out",isolation:"isolate",[g.breakpoints.up("sm")]:{paddingLeft:M=>M.isPinned?M.sidebarConfig.drawerWidthOpen:M.sidebarConfig.drawerWidthClosed},[g.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(g){const[M,R]=(0,v.useState)(()=>u.getSidebarPinState()),{sidebarConfig:P}=(0,v.useContext)(p.kG),$=(0,v.useRef)(null),L=(0,v.useMemo)(()=>({content:{contentRef:$}}),[$]);(0,v.useEffect)(()=>{u.setSidebarPinState(M)},[M]);const y=(0,S.Z)(et=>et.breakpoints.down("xs"),{noSsr:!0}),Z=()=>R(!M),V=x({isPinned:M,sidebarConfig:P});return(0,o.jsx)(A.lE,{value:{isPinned:M,toggleSidebarPinState:Z,isMobile:y},children:(0,o.jsx)(O.Provider,{value:L,children:(0,o.jsx)(i.Z,{className:V.root,children:g.children})})})}function b(){const{content:g}=(0,v.useContext)(O);return{focusContent:(0,v.useCallback)(()=>{var R,P;g==null||(P=g.contentRef)===null||P===void 0||(R=P.current)===null||R===void 0||R.focus()},[g]),contentRef:g==null?void 0:g.contentRef}}},93539:function(J,T,t){"use strict";t.d(T,{Pf:function(){return A},lE:function(){return u}});var o=t(52322),i=t(29651),d=t(68993),S=t(2784);const v={isPinned:!0,toggleSidebarPinState:()=>{},isMobile:!1},p=(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)(p.Provider,{value:m,children:(0,o.jsx)(c.Provider,{value:(0,d.E)({1:m}),children:O})})}const A=()=>{const x=(0,S.useContext)(c),O=(0,S.useContext)(p);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(J,T,t){"use strict";t.d(T,{$E:function(){return p},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},p=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}),A="@backstage/core/sidebar-intro-dismissed",x=(0,o.createContext)({sidebarConfig:v,submenuConfig:c}),O=(0,o.createContext)({isHoveredOn:!1,setIsHoveredOn:()=>{}})},72388:function(J,T,t){"use strict";t.d(T,{Os:function(){return p},fC:function(){return c}});var o=t(52322),i=t(29651),d=t(68993),S=t(2784);const v=(0,i.CT)("analytics-context"),p=()=>{const A=(0,S.useContext)(v);if(A===void 0)return{routeRef:"unknown",pluginId:"root",extension:"App"};const x=A.atVersion(1);if(x===void 0)throw new Error("No context found for version 1.");return x},c=A=>{const{attributes:x,children:O}=A,b={...p(),...x},g=(0,d.E)({1:b});return(0,o.jsx)(v.Provider,{value:g,children:O})};function u(A,x){const O=m=>_jsx(c,{attributes:x,children:_jsx(A,{...m})});return O.displayName=`WithAnalyticsContext(${A.displayName||A.name||"Component"})`,O}},7355:function(J,T,t){"use strict";t.d(T,{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:A,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(b){console.warn("Error during analytics event capture. %o",b)}d.mostRecentGatheredNavigation=void 0,d.mostRecentRoutableExtensionRender=void 0}if(c==="navigate"&&O==="gathered"&&m.pluginId==="root"){d.mostRecentGatheredNavigation={action:c,subject:u,value:A,attributes:x,context:m};return}try{this.analyticsApi.captureEvent({action:c,subject:u,value:A,attributes:x,context:m})}catch(b){console.warn("Error during analytics event capture. %o",b)}}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(J,T,t){"use strict";t.d(T,{z:function(){return c}});var o=t(72388),i=t(44394),d=t(86386),S=t(2784),v=t(7355);function p(){try{return(0,i.h_)(d.v)}catch{return{captureEvent:()=>{}}}}function c(){const u=(0,S.useRef)(null),A=(0,o.Os)(),x=p();function O(){return u.current===null&&(u.current=new v.f(x)),u.current}const m=O();return m.setContext(A),m}},78847:function(J,T,t){"use strict";t.d(T,{$:function(){return i}});var o=t(95965);const i=(0,o.T)({id:"core.alert"})},86386:function(J,T,t){"use strict";t.d(T,{v:function(){return i}});var o=t(95965);const i=(0,o.T)({id:"core.analytics"})},6542:function(J,T,t){"use strict";t.d(T,{D:function(){return i}});var o=t(95965);const i=(0,o.T)({id:"core.config"})},96727:function(J,T,t){"use strict";t.d(T,{N:function(){return i}});var o=t(95965);const i=(0,o.T)({id:"core.discovery"})},58513:function(J,T,t){"use strict";t.d(T,{V:function(){return i}});var o=t(95965);const i=(0,o.T)({id:"core.error"})},82723:function(J,T,t){"use strict";t.d(T,{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(J,T,t){"use strict";t.d(T,{g:function(){return i}});var o=t(95965);const i=(0,o.T)({id:"core.fetch"})},77186:function(J,T,t){"use strict";t.d(T,{$:function(){return i}});var o=t(95965);const i=(0,o.T)({id:"core.identity"})},96253:function(J,T,t){"use strict";t.d(T,{o:function(){return i}});var o=t(95965);const i=(0,o.T)({id:"core.translation"})},95965:function(J,T,t){"use strict";t.d(T,{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(J,T,t){"use strict";t.d(T,{n:function(){return o}});function o(i,d){return"id"in i?{api:i,deps:{},factory:()=>d}:i}},44394:function(J,T,t){"use strict";t.d(T,{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 A=S().get(c);if(!A)throw new Error(`No implementation available for ${c}`);return A}function p(c){return function(A){const x=m=>{const b=S(),g={};for(const M in c)if(c.hasOwnProperty(M)){const R=c[M],P=b.get(R);if(!P)throw new Error(`No implementation available for ${R}`);g[M]=P}return _jsx(A,{...m,...g})},O=A.displayName||A.name||"Component";return x.displayName=`withApis(${O})`,x}}},80851:function(J,T,t){"use strict";t.d(T,{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(J,T,t){"use strict";t.d(T,{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(p,c,u){const A=p;var x;let O=(x=A[d])!==null&&x!==void 0?x:i.get(p);if(O||(O={map:new Map},Object.defineProperty(A,d,{enumerable:!1,configurable:!0,writable:!1,value:O}),i.set(p,O)),O.map.has(c)){const m=p.displayName||p.name;throw new Error(`Attempted to attach duplicate data "${c}" to component "${m}"`)}O.map.set(c,u)}function v(p,c){if(!p)return;const u=p.type;if(!u)return;var A;const x=(A=u[d])!==null&&A!==void 0?A:i.get(u);if(x)return x.map.get(c)}},82963:function(J,T,t){"use strict";t.d(T,{CO:function(){return m},YO:function(){return b},P4:function(){return O}});var o=t(52322),i=t(2784),d=t(62369),S=t(72388),v=t(80851),p=t(37321),c=t(62584),u=t(87612);class A extends i.Component{static getDerivedStateFromError(M){return{error:M}}render(){const{error:M}=this.state,{app:R,plugin:P}=this.props,{ErrorBoundaryFallback:$}=R.getComponents();return M?(0,o.jsx)($,{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(g){const{component:M,mountPoint:R,name:P}=g;return b({component:{lazy:()=>M().then($=>{const L=Z=>{const V=(0,d.z)();try{(0,p.t)(R)}catch(et){if(typeof et=="object"&&et!==null){const{message:Y}=et;if(typeof Y=="string"&&Y.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 et}return(0,i.useEffect)(()=>{V.captureEvent(x.h,"")},[V]),(0,o.jsx)($,{...Z})},y=P||$.displayName||$.name||"LazyComponent";return L.displayName=`RoutableExtension(${y})`,L},$=>y=>{const Z=(0,v.q)(),{BootErrorPage:V}=Z.getComponents();return(0,o.jsx)(V,{step:"load-chunk",error:$})})},data:{"core.mountPoint":R},name:P})}function m(g){const{component:M,name:R}=g;return b({component:M,name:R})}function b(g){const{data:M={},name:R}=g;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 g.component){const L=g.component.lazy;P=(0,i.lazy)(()=>L().then(y=>({default:y})))}else P=g.component.sync;const $=R||P.displayName||P.name||"Component";return{expose(L){const y=Z=>{const V=(0,v.q)(),{Progress:et}=V.getComponents(),Y=M==null?void 0:M["core.mountPoint"];return(0,o.jsx)(i.Suspense,{fallback:(0,o.jsx)(et,{}),children:(0,o.jsx)(A,{app:V,plugin:L,children:(0,o.jsx)(S.fC,{attributes:{pluginId:L.getId(),...R&&{extension:R},...Y&&{routeRef:Y.id}},children:(0,o.jsx)(P,{...Z})})})})};(0,c.R)(y,"core.plugin",L),(0,c.R)(y,"core.extensionName",R);for(const[Z,V]of Object.entries(M))(0,c.R)(y,Z,V);return y.displayName=`Extension(${$})`,y}}}},2532:function(J,T,t){"use strict";t.d(T,{v:function(){return u}});var o=t(87612),i=t(2784),d=t(62584),S=t(44394),v=t(82723);function p(A,x,O,m){return i.Children.toArray(A).flatMap(b=>{if(!(0,i.isValidElement)(b))return[];if(b.type===i.Fragment)return p(b.props.children,x,O,m);if((0,d.I)(b,"core.featureFlagged")){const g=b.props;return("with"in g?x.isActive(g.with):!x.isActive(g.without))?p(b.props.children,x,O,m):[]}if(O===void 0||O(b))return[b];if(m)throw new Error(m);return p(b.props.children,x,O,m)})}class c{selectByComponentData(x){const O=p(this.node,this.featureFlagsApi,m=>(0,d.I)(m,x.key)!==void 0,x.withStrictError);return new c(O,this.featureFlagsApi)}findComponentData(x){return p(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 p(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(A,x,O=[]){const m=(0,S.h_)(v.W),b=new c(A,m);return(0,i.useMemo)(()=>x(b),[A,...O])}},15006:function(J,T,t){"use strict";t.d(T,{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,p;return(p=(v=this.config.featureFlags)===null||v===void 0?void 0:v.slice())!==null&&p!==void 0?p:[]}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(J,T,t){"use strict";t.d(T,{N:function(){return p}});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,A){(0,o._)(this,"id",void 0),(0,o._)(this,"params",void 0),(0,o._)(this,S,void 0),this.id=u,this.params=A,this[d]="absolute"}}function p(c){var u;return new v(c.id,(u=c.params)!==null&&u!==void 0?u:[])}},92918:function(J,T,t){"use strict";t.d(T,{K:function(){return i}});var o=t(96087);const i=(0,o.u)("route-ref-type",()=>Symbol("route-ref-type"))},37321:function(J,T,t){"use strict";t.d(T,{t:function(){return S}});var o=t(2784),i=t(73557),d=t(29651);function S(v){const{pathname:p}=(0,i.TH)(),c=(0,d.Vt)("routing-context");if(!c)throw new Error("Routing context is not available");const u=c.atVersion(1),A=(0,o.useMemo)(()=>u&&u.resolve(v,{pathname:p}),[u,v,p]);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(!A&&!x)throw new Error(`No path for ${v}`);return A}},35304:function(J,T,t){"use strict";t.d(T,{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 p(b){const g=new Array;function M(R,P){for(const[$,L]of Object.entries(R))typeof L=="string"?g.push([P+$,L]):M(L,`${P}${$}.`)}return M(b,""),Object.fromEntries(g)}var c=new WeakMap,u=new WeakMap,A=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(g){(0,d._)(this,A,g)}getDefaultResource(){return(0,o._)(this,A)}toString(){return`TranslationRef{id=${this.id}}`}constructor(g){(0,i._)(this,c,{writable:!0,value:void 0}),(0,i._)(this,u,{writable:!0,value:void 0}),(0,i._)(this,A,{writable:!0,value:void 0}),(0,S._)(this,"$$type","@backstage/TranslationRef"),(0,S._)(this,"version","v1"),(0,d._)(this,c,g.id),(0,d._)(this,u,p(g.messages))}}function O(b){const g=new x(b);return b.translations&&g.setDefaultResource((0,v.N)({ref:g,translations:b.translations})),g}function m(b){const g=b;if(g.$$type!=="@backstage/TranslationRef")throw new Error(`Invalid translation ref, bad type '${g.$$type}'`);if(g.version!=="v1")throw new Error(`Invalid translation ref, bad version '${g.version}'`);return g}},18015:function(J,T,t){"use strict";t.d(T,{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(p=>{const c=p.default;return{messages:(c==null?void 0:c.$$type)==="@backstage/TranslationMessages"?c.messages:c}})}))}}},41385:function(J,T,t){"use strict";t.d(T,{V:function(){return S}});var o=t(87612),i=t(48998);async function d(v){try{const c=await v.text();if(c){var p;if(!((p=v.headers.get("content-type"))===null||p===void 0)&&p.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(p){const c=await d(p),u=c.response.statusCode||p.status,A=c.error.name||p.statusText,x=`Request failed with ${u} ${A}`,O=(0,i.Fq)(c.error);return new S({message:x,response:p,data:c,cause:O})}constructor(p){super(p.message),(0,o._)(this,"response",void 0),(0,o._)(this,"body",void 0),(0,o._)(this,"cause",void 0),this.name="ResponseError",this.response=p.response,this.body=p.data,this.cause=p.cause}}},30474:function(J,T,t){"use strict";t.d(T,{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(J,T,t){"use strict";t.d(T,{Fq:function(){return v},n:function(){return p}});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 p(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(J,T,t){"use strict";t.d(T,{a:function(){return Ue},q:function(){return $e}});var o=t(87612),i=t(38264);const d="amazonaws.com";function S(U){const h=U.getOptionalString("endpoint");var I;const W=(I=U.getOptionalBoolean("s3ForcePathStyle"))!==null&&I!==void 0?I:!1;let ct,Ot;if(h){try{const Ut=new URL(h);ct=Ut.host,Ot=Ut.pathname}catch{throw new Error(`invalid awsS3 integration config, endpoint '${h}' is not a valid URL`)}if(Ot!=="/")throw new Error(`invalid awsS3 integration config, endpoints cannot contain path, got '${h}'`)}else ct=d;const Rt=U.getOptionalString("accessKeyId"),ae=U.getOptionalString("secretAccessKey"),te=U.getOptionalString("roleArn"),kt=U.getOptionalString("externalId");return{host:ct,endpoint:h,s3ForcePathStyle:W,accessKeyId:Rt,secretAccessKey:ae,roleArn:te,externalId:kt}}function v(U){const h=U.map(S);return h.some(I=>I.host===d)||h.push({host:d}),h}class p{get type(){return"awsS3"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(h){return(0,i.FI)(h)}resolveEditUrl(h){return h}constructor(h){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=h}}(0,o._)(p,"factory",({config:U})=>{var h;const I=v((h=U.getOptionalConfigArray("integrations.awsS3"))!==null&&h!==void 0?h:[]);return(0,i.gz)(I.map(W=>new p(W)),W=>W.config.host)});var c=t(88412),u=t(52475),A=t(80956);const x="GB";var O=new WeakMap,m=new WeakMap,b=new WeakMap,g=new WeakMap,M=new WeakMap,R=new WeakMap,P=new WeakMap;class ${static fromRepoUrl(h){const I=new URL(h);let W,ct,Ot;const Rt=I.pathname.split("/").map(ge=>decodeURIComponent(ge));if(Rt[2]==="_git"?(W=Rt[1],ct=Ot=Rt[3]):Rt[3]==="_git"?(W=Rt[1],ct=Rt[2],Ot=Rt[4]):Rt[4]==="_git"&&(W=`${Rt[1]}/${Rt[2]}`,ct=Rt[3],Ot=Rt[5]),!W||!ct||!Ot)throw new Error("Azure URL must point to a git repository");var ae;const te=(ae=I.searchParams.get("path"))!==null&&ae!==void 0?ae:void 0;let kt;const Ut=I.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 $(I.origin,W,ct,Ot,te,kt)}toRepoUrl(){let h;return(0,c._)(this,b)===(0,c._)(this,g)?h=(0,c._)(this,P).call(this,(0,c._)(this,m),"_git",(0,c._)(this,g)):h=(0,c._)(this,P).call(this,(0,c._)(this,m),(0,c._)(this,b),"_git",(0,c._)(this,g)),(0,c._)(this,M)&&h.searchParams.set("path",(0,c._)(this,M)),(0,c._)(this,R)&&h.searchParams.set("version",x+(0,c._)(this,R)),h.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 h=(0,c._)(this,P).call(this,(0,c._)(this,m),(0,c._)(this,b),"_apis","git","repositories",(0,c._)(this,g),"items");return h.searchParams.set("api-version","6.0"),h.searchParams.set("path",(0,c._)(this,M)),(0,c._)(this,R)&&h.searchParams.set("version",(0,c._)(this,R)),h.toString()}toArchiveUrl(){const h=(0,c._)(this,P).call(this,(0,c._)(this,m),(0,c._)(this,b),"_apis","git","repositories",(0,c._)(this,g),"items");return h.searchParams.set("recursionLevel","full"),h.searchParams.set("download","true"),h.searchParams.set("api-version","6.0"),(0,c._)(this,M)&&h.searchParams.set("scopePath",(0,c._)(this,M)),(0,c._)(this,R)&&h.searchParams.set("version",(0,c._)(this,R)),h.toString()}toCommitsUrl(){const h=(0,c._)(this,P).call(this,(0,c._)(this,m),(0,c._)(this,b),"_apis","git","repositories",(0,c._)(this,g),"commits");return h.searchParams.set("api-version","6.0"),(0,c._)(this,R)&&h.searchParams.set("searchCriteria.itemVersion.version",(0,c._)(this,R)),h.toString()}getOwner(){return(0,c._)(this,m)}getProject(){return(0,c._)(this,b)}getRepo(){return(0,c._)(this,g)}getPath(){return(0,c._)(this,M)}getRef(){return(0,c._)(this,R)}constructor(h,I,W,ct,Ot,Rt){(0,u._)(this,O,{writable:!0,value:void 0}),(0,u._)(this,m,{writable:!0,value:void 0}),(0,u._)(this,b,{writable:!0,value:void 0}),(0,u._)(this,g,{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 te=new URL((0,c._)(this,O));return te.pathname=ae.map(kt=>encodeURIComponent(kt)).join("/"),te}}),(0,A._)(this,O,h),(0,A._)(this,m,I),(0,A._)(this,b,W),(0,A._)(this,g,ct),(0,A._)(this,M,Ot),(0,A._)(this,R,Rt)}}const L="dev.azure.com",y=["clientId","clientSecret","tenantId","personalAccessToken"],Z=new Map([["ClientSecret",["clientId","clientSecret","tenantId"]],["ManagedIdentity",["clientId"]],["PersonalAccessToken",["personalAccessToken"]]]);function V(U){for(const h of Z.entries()){const[I,W]=h,ct=y.filter(Ot=>!W.includes(Ot));if(W.every(Ot=>U[Ot]!==void 0)&&ct.every(Ot=>U[Ot]===void 0))return{kind:I,organizations:U.organizations,...W.reduce((Ot,Rt)=>(Ot[Rt]=U[Rt],Ot),{})}}throw new Error("is not a valid credential")}function et(U){var h,I;const W=(I=U.getOptionalString("host"))!==null&&I!==void 0?I:L;let ct=(h=U.getOptionalConfigArray("credentials"))===null||h===void 0?void 0:h.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;ct=(Rt=ct==null?void 0:ct.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;ct=(ae=ct==null?void 0:ct.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 te;if(ct!==void 0){const kt=ct==null?void 0:ct.reduce((Ut,ge,Le)=>{let Zt;try{V(ge)}catch(ne){Zt=ne.message}return Zt!==void 0&&Ut.push(`credential at position ${Le+1} ${Zt}`),Ut},Array.of()).concat(Object.entries(ct.filter(Ut=>Ut.organizations!==void 0&&Ut.organizations.length>0).reduce((Ut,ge,Le)=>{var Zt;return(Zt=ge.organizations)===null||Zt===void 0||Zt.forEach(ne=>{Ut[ne]||(Ut[ne]=[]),Ut[ne].push(Le+1)}),Ut},{})).filter(([Ut,ge])=>ge.length>1).reduce((Ut,[ge,Le])=>(Ut.push(`organization ${ge} is specified multiple times in credentials at positions ${Le.slice(0,Le.length-1).join(", ")} and ${Le[Le.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(te=ct.map(Ut=>V(Ut)),te.some(Ut=>Ut.kind!=="PersonalAccessToken")&&W!==L)throw new Error(`Invalid Azure integration config for ${W}, only personal access tokens can be used with hosts other than ${L}`);if(te.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:te}}function Y(U){const h=U.map(et);return h.some(I=>I.host===L)||h.push({host:L}),h}class K{get type(){return"azure"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(h){const{url:I,base:W}=h;if((0,i.jv)(I))return I;try{const Ot=$.fromRepoUrl(W),Rt=new URL(W);var ct;const ae=new URL(`https://a.com${(ct=Ot.getPath())!==null&&ct!==void 0?ct:""}`),te=new URL(I,ae).pathname;return Rt.searchParams.set("path",te),h.lineNumber&&(Rt.searchParams.set("line",String(h.lineNumber)),Rt.searchParams.set("lineEnd",String(h.lineNumber+1)),Rt.searchParams.set("lineStartColumn","1"),Rt.searchParams.set("lineEndColumn","1")),Rt.toString()}catch{return new URL(I,W).toString()}}resolveEditUrl(h){return h}constructor(h){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=h}}(0,o._)(K,"factory",({config:U})=>{var h;const I=Y((h=U.getOptionalConfigArray("integrations.azure"))!==null&&h!==void 0?h:[]);return(0,i.gz)(I.map(W=>new K(W)),W=>W.config.host)});var k=t(82717),_=t.n(k);const rt="bitbucket.org",dt="https://api.bitbucket.org/2.0";function vt(U){const h=rt,I=dt,W=U.getString("username"),ct=U.getString("appPassword");return{host:h,apiBaseUrl:I,username:W,appPassword:ct}}function Et(U){const h=U.map(vt);return h.length===0&&h.push({host:rt,apiBaseUrl:dt}),h}class Tt{get type(){return"bitbucketCloud"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(h){const I=(0,i.FI)(h);if(h.lineNumber){const W=new URL(I);return W.hash=`lines-${h.lineNumber}`,W.toString()}return I}resolveEditUrl(h){const I=_()(h),W=new URL(h);return W.searchParams.set("mode","edit"),W.searchParams.set("at",I.ref),W.toString()}constructor(h){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=h}}(0,o._)(Tt,"factory",({config:U})=>{var h;const I=Et((h=U.getOptionalConfigArray("integrations.bitbucketCloud"))!==null&&h!==void 0?h:[]);return(0,i.gz)(I.map(W=>new Tt(W)),W=>W.config.host)});var gt=t(76635);const xt="bitbucket.org",Q="https://api.bitbucket.org/2.0";function j(U){var h;const I=(h=U.getOptionalString("host"))!==null&&h!==void 0?h:xt;let W=U.getOptionalString("apiBaseUrl");const ct=U.getOptionalString("token"),Ot=U.getOptionalString("username"),Rt=U.getOptionalString("appPassword");if(!(0,i.bK)(I))throw new Error(`Invalid Bitbucket integration config, '${I}' is not a valid host`);return W?W=(0,gt.trimEnd)(W,"/"):I===xt?W=Q:W=`https://${I}/rest/api/1.0`,{host:I,apiBaseUrl:W,token:ct,username:Ot,appPassword:Rt}}function z(U){const h=U.map(j);return h.some(I=>I.host===xt)||h.push({host:xt,apiBaseUrl:Q}),h}class q{get type(){return"bitbucket"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(h){const I=(0,i.FI)(h);if(!h.lineNumber)return I;const W=new URL(I);return this.integrationConfig.host==="bitbucket.org"?W.hash=`lines-${h.lineNumber}`:W.hash=`${h.lineNumber}`,W.toString()}resolveEditUrl(h){const I=_()(h),W=new URL(h);return W.searchParams.set("mode","edit"),W.searchParams.set("spa","0"),W.searchParams.set("at",I.ref),W.toString()}constructor(h){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=h}}(0,o._)(q,"factory",({config:U})=>{var h,I,W;const ct=z((W=U.getOptionalConfigArray("integrations.bitbucket"))!==null&&W!==void 0?W:[...(h=U.getOptionalConfigArray("integrations.bitbucketCloud"))!==null&&h!==void 0?h:[],...(I=U.getOptionalConfigArray("integrations.bitbucketServer"))!==null&&I!==void 0?I:[]]);return(0,i.gz)(ct.map(Ot=>new q(Ot)),Ot=>Ot.config.host)});function st(U){const h=U.getString("host");let I=U.getOptionalString("apiBaseUrl");const W=U.getOptionalString("token"),ct=U.getOptionalString("username"),Ot=U.getOptionalString("password");if(!(0,i.bK)(h))throw new Error(`Invalid Bitbucket Server integration config, '${h}' is not a valid host`);return I?I=(0,gt.trimEnd)(I,"/"):I=`https://${h}/rest/api/1.0`,{host:h,apiBaseUrl:I,token:W,username:ct,password:Ot}}function it(U){return U.map(st)}class at{get type(){return"bitbucketServer"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(h){const I=(0,i.FI)(h);if(h.lineNumber){const W=new URL(I);return W.hash=h.lineNumber.toString(),W.toString()}return I}resolveEditUrl(h){return h.includes("?")?h.substring(0,h.indexOf("?")):h}constructor(h){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=h}}(0,o._)(at,"factory",({config:U})=>{var h;const I=it((h=U.getOptionalConfigArray("integrations.bitbucketServer"))!==null&&h!==void 0?h:[]);return(0,i.gz)(I.map(W=>new at(W)),W=>W.config.host)});function nt(U){const h=U.getString("host");let I=U.getOptionalString("baseUrl"),W=U.getOptionalString("cloneUrl"),ct=U.getOptionalString("gitilesBaseUrl");const Ot=U.getOptionalString("username"),Rt=U.getOptionalString("password");if((0,i.bK)(h)){if(I&&!(0,i.jv)(I))throw new Error(`Invalid Gerrit integration config, '${I}' 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(ct&&!(0,i.jv)(ct))throw new Error(`Invalid Gerrit integration config, '${ct}' is not a valid gitilesBaseUrl`)}else throw new Error(`Invalid Gerrit integration config, '${h}' is not a valid host`);return I?I=(0,gt.trimEnd)(I,"/"):I=`https://${h}`,ct?ct=(0,gt.trimEnd)(ct,"/"):ct=`https://${h}`,W?W=(0,gt.trimEnd)(W,"/"):W=I,{host:h,baseUrl:I,cloneUrl:W,gitilesBaseUrl:ct,username:Ot,password:Rt}}function St(U){return U.map(nt)}var G=t(48834).lW;const H=")]}'";function ut(U,h){const I=new URL(U.gitilesBaseUrl),W=new URL(h),Ot=W.pathname.substring(W.pathname.startsWith("/a/")?2:0).replace(I.pathname,"").split("/").filter(ge=>!!ge),Rt=Ot.indexOf("+");if(Rt<=0)throw new Error(`Unable to parse project from url: ${h}`);const ae=(0,gt.trimStart)(Ot.slice(0,Rt).join("/"),"/"),te=Ot.indexOf("heads");if(te<=0)throw new Error(`Unable to parse branch from url: ${h}`);const kt=Ot[te+1],Ut=Ot.slice(te+2).join("/");return{branch:kt,filePath:Ut===""?"/":Ut,project:ae}}function ht(U,h,I,W){return`${U.gitilesBaseUrl}/${h}/+/refs/heads/${I}/${(0,gt.trimStart)(W,"/")}`}function mt(U,h,I,W){const ct=W==="/"||W===""?".tar.gz":`/${W}.tar.gz`;return`${jt(U)}/${h}/+archive/refs/heads/${I}${ct}`}function bt(U){return U.password?"/a/":"/"}function jt(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(bt(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 Jt(U,h){const{branch:I,project:W}=ut(U,h);return`${U.baseUrl}${bt(U)}projects/${encodeURIComponent(W)}/branches/${I}`}function Wt(U,h){const{project:I}=ut(U,h);return`${U.cloneUrl}${bt(U)}${I}`}function Ht(U,h){const{branch:I,filePath:W,project:ct}=ut(U,h);return`${U.baseUrl}${bt(U)}projects/${encodeURIComponent(ct)}/branches/${I}/files/${encodeURIComponent(W)}/content`}function Dt(U){return`${U.baseUrl}${bt(U)}projects/`}function Mt(U){const h={};if(!U.password)return h;const I=G.from(`${U.username}:${U.password}`,"utf8");return h.Authorization=`Basic ${I.toString("base64")}`,{headers:h}}async function Gt(U){const h=await U.text();if(h.startsWith(H))try{return JSON.parse(h.slice(H.length))}catch(I){throw new Error(`Invalid response from Gerrit: ${h.slice(0,10)} - ${I}`)}throw new Error(`Gerrit JSON body prefix missing. Found: ${h.slice(0,10)}`)}class ee{get type(){return"gerrit"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(h){const{url:I,base:W,lineNumber:ct}=h;let Ot;if(I.startsWith("/")){const{branch:Rt,project:ae}=ut(this.config,W);return ht(this.config,ae,Rt,I)}return I?Ot=new URL(I,W):Ot=new URL(W),ct&&(Ot.hash=ct.toString()),Ot.toString()}resolveEditUrl(h){return h}constructor(h){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=h}}(0,o._)(ee,"factory",({config:U})=>{var h;const I=St((h=U.getOptionalConfigArray("integrations.gerrit"))!==null&&h!==void 0?h:[]);return(0,i.gz)(I.map(W=>new ee(W)),W=>W.config.host)});var re=t(61800);const qt="gitlab.com",de="https://gitlab.com/api/v4";function Ie(U){const h=U.getString("host");let I=U.getOptionalString("apiBaseUrl");const W=U.getOptionalString("token");let ct=U.getOptionalString("baseUrl");if(I?I=(0,gt.trimEnd)(I,"/"):h===qt&&(I=de),ct?ct=(0,gt.trimEnd)(ct,"/"):ct=`https://${h}`,(0,i.bK)(h)){if(!I||!(0,i.jv)(I))throw new Error(`Invalid GitLab integration config, '${I}' is not a valid apiBaseUrl`);if(!(0,i.jv)(ct))throw new Error(`Invalid GitLab integration config, '${ct}' is not a valid baseUrl`)}else throw new Error(`Invalid GitLab integration config, '${h}' is not a valid host`);return{host:h,token:W,apiBaseUrl:I,baseUrl:ct}}function Ge(U){const h=U.map(Ie);return h.some(I=>I.host===qt)||h.push({host:qt,apiBaseUrl:de,baseUrl:`https://${qt}`}),h}function _e(U){let h="";return U.host!==qt&&(h=new URL(U.baseUrl).pathname),trimEnd(h,"/")}class xe{get type(){return"gitlab"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(h){return(0,i.FI)(h)}resolveEditUrl(h){return qe(h,"edit")}constructor(h){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=h}}(0,o._)(xe,"factory",({config:U})=>{var h;const I=Ge((h=U.getOptionalConfigArray("integrations.gitlab"))!==null&&h!==void 0?h:[]);return(0,i.gz)(I.map(W=>new xe(W)),W=>W.config.host)});function qe(U,h){return U.replace(/\/\-\/(blob|tree|edit)\//,`/-/${h}/`)}function Ve(U){const h=U.getString("host");let I=U.getOptionalString("baseUrl");const W=U.getOptionalString("username"),ct=U.getOptionalString("password");if(!(0,i.bK)(h))throw new Error(`Invalid Gitea integration config, '${h}' is not a valid host`);return I?I=(0,gt.trimEnd)(I,"/"):I=`https://${h}`,{host:h,baseUrl:I,username:W,password:ct}}var Ye=t(48834).lW;function se(U,h){const I=ie(U,h);return`${I.url}/${I.owner}/${I.name}/_edit/${I.ref}/${I.path}`}function sn(U,h){const I=ie(U,h);return`${I.url}/api/v1/repos/${I.owner}/${I.name}/contents/${I.path}?ref=${I.ref}`}function Pe(U,h){const I=ie(U,h);return`${I.url}/api/v1/repos/${I.owner}/${I.name}/archive/${I.ref}.tar.gz`}function tn(U,h){const I=ie(U,h);return`${I.url}/api/v1/repos/${I.owner}/${I.name}/git/commits/${I.ref}`}function an(U){const h={},{username:I,password:W}=U;return W?(I?h.Authorization=`basic ${Ye.from(`${I}:${W}`).toString("base64")}`:h.Authorization=`token ${W}`,{headers:h}):h}function ie(U,h){var I;const W=(I=U.baseUrl)!==null&&I!==void 0?I:`https://${U.host}`;try{const[ct,Ot,Rt,ae,te,kt,...Ut]=h.replace(W,"").split("/"),ge=Ut.join("/").replace(/^\//,"");return{url:W,owner:Ot,name:Rt,ref:kt,path:ge}}catch(ct){throw new Error(`Incorrect URL: ${h}, ${ct}`)}}class Ne{get type(){return"gitea"}get title(){return this.config.host}resolveUrl(h){return(0,i.FI)(h)}resolveEditUrl(h){return se(this.config,h)}constructor(h){(0,o._)(this,"config",void 0),this.config=h}}(0,o._)(Ne,"factory",({config:U})=>{var h;const W=((h=U.getOptionalConfigArray("integrations.gitea"))!==null&&h!==void 0?h:[]).map(ct=>Ve(ct));return(0,i.gz)(W.map(ct=>new Ne(ct)),ct=>ct.config.host)});class ke{static fromConfig(h){return new ke({awsS3:p.factory({config:h}),azure:K.factory({config:h}),bitbucket:q.factory({config:h}),bitbucketCloud:Tt.factory({config:h}),bitbucketServer:at.factory({config:h}),gerrit:ee.factory({config:h}),github:re.X.factory({config:h}),gitlab:xe.factory({config:h}),gitea:Ne.factory({config:h})})}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(h=>h.list())}byUrl(h){let I=Object.values(this.byType).map(W=>W.byUrl(h)).filter(Boolean);if(I.length>1){const W=I.filter(ct=>!(ct instanceof q));W.length!==0&&(I=W)}return I[0]}byHost(h){return Object.values(this.byType).map(I=>I.byHost(h)).find(Boolean)}resolveUrl(h){const I=this.byUrl(h.base);return I?I.resolveUrl(h):(0,i.FI)(h)}resolveEditUrl(h){const I=this.byUrl(h);return I?I.resolveEditUrl(h):h}constructor(h){(0,o._)(this,"byType",void 0),this.byType=h}}var Se=t(95965);class Ue{static fromConfig(h){return ke.fromConfig(h)}}const $e=(0,Se.T)({id:"integration.scmintegrations"})},61800:function(J,T,t){"use strict";t.d(T,{X:function(){return A},B:function(){return x}});var o=t(87612),i=t(38264),d=t(76635);const S="github.com",v="https://api.github.com",p="https://raw.githubusercontent.com";function c(O){var m,b;const g=(b=O.getOptionalString("host"))!==null&&b!==void 0?b:S;let M=O.getOptionalString("apiBaseUrl"),R=O.getOptionalString("rawBaseUrl");const P=O.getOptionalString("token"),$=(m=O.getOptionalConfigArray("apps"))===null||m===void 0?void 0:m.map(L=>({appId:L.getNumber("appId"),clientId:L.getString("clientId"),clientSecret:L.getString("clientSecret"),webhookSecret:L.getString("webhookSecret"),privateKey:L.getString("privateKey"),allowedInstallationOwners:L.getOptionalStringArray("allowedInstallationOwners")}));if(!(0,i.bK)(g))throw new Error(`Invalid GitHub integration config, '${g}' is not a valid host`);return M?M=(0,d.trimEnd)(M,"/"):g===S&&(M=v),R?R=(0,d.trimEnd)(R,"/"):g===S&&(R=p),{host:g,apiBaseUrl:M,rawBaseUrl:R,token:P,apps:$}}function u(O){const m=O.map(c);return m.some(b=>b.host===S)||m.push({host:S,apiBaseUrl:v,rawBaseUrl:p}),m}class A{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._)(A,"factory",({config:O})=>{var m;const b=u((m=O.getOptionalConfigArray("integrations.github"))!==null&&m!==void 0?m:[]);return(0,i.gz)(b.map(g=>new A(g)),g=>g.config.host)});function x(O,m){return O.replace(/\/\/([^/]+)\/([^/]+)\/([^/]+)\/(blob|tree|edit)\//,(b,g,M,R)=>`//${g}/${M}/${R}/${m}/`)}},38264:function(J,T,t){"use strict";t.d(T,{FI:function(){return u},bK:function(){return v},gz:function(){return c},jv:function(){return p}});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 p(x){try{return new URL(x),!0}catch{return!1}}function c(x,O){return{list(){return x},byUrl(m){try{const b=typeof m=="string"?new URL(m):m;return x.find(g=>O(g)===b.host)}catch{return}},byHost(m){return x.find(b=>O(b)===m)}}}function u(x){const{url:O,base:m,lineNumber:b}=x;try{return new URL(O),O}catch{}let g;if(O.startsWith("/")){const{filepath:M}=i()(m);g=new URL(m);const R=(0,d.trimEnd)(g.pathname.substring(0,g.pathname.length-M.length),"/");g.pathname=`${R}${O}`}else g=new URL(O,m);return g.search=new URL(m).search,b&&(g.hash=`L${b}`),g.toString()}function A(x){beforeAll(()=>x.listen({onUnhandledRequest:"error"})),afterAll(()=>x.close()),afterEach(()=>x.resetHandlers())}},17363:function(J,T,t){"use strict";var o={};t.r(o),t.d(o,{TechDocsPlugin:function(){return p.s4}});var i=t(52322),d=t(2784),S=t(17029),v=t(73557),p=t(4577),c=t(29895),u=t(2296),A=t(57058),x=t(77277),O=t(87435),m=t(74359),b=t(55015),g=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})})},$=({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"})}),L={Progress:b.E,Router:g.VK,NotFoundErrorPage:R,BootErrorPage:P,ErrorBoundaryFallback:$};var y=t(87612);const Z="Invalid discovery URL pattern,";class V{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(`${Z} URL '${s}' is invalid`)}if(a.hash)throw new Error(`${Z} URL must not have a hash`);if(a.search)throw new Error(`${Z} URL must not have a query`);if(s.endsWith("/"))throw new Error(`${Z} URL must not end with a slash`);return new V(n)}async getBaseUrl(e){return this.parts.join(encodeURIComponent(e))}constructor(e){(0,y._)(this,"parts",void 0),this.parts=e}}var et=t(82394),Y=t.n(et);let K=Symbol.observable;class k{[K](){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,y._)(this,"isClosed",!1),(0,y._)(this,"terminatingError",void 0),(0,y._)(this,"observable",new(Y())(e=>this.isClosed?(this.terminatingError?e.error(this.terminatingError):e.complete(),()=>{}):(this.subscribers.add(e),()=>{this.subscribers.delete(e)}))),(0,y._)(this,"subscribers",new Set)}}let _=Symbol.observable;class rt{[_](){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,y._)(this,"isClosed",void 0),(0,y._)(this,"currentValue",void 0),(0,y._)(this,"terminatingError",void 0),(0,y._)(this,"observable",void 0),(0,y._)(this,"subscribers",new Set),this.isClosed=!1,this.currentValue=e,this.terminatingError=void 0,this.observable=new(Y())(n=>this.isClosed?(this.terminatingError?n.error(this.terminatingError):n.complete(),()=>{}):(n.next(this.currentValue),this.subscribers.add(n),()=>{this.subscribers.delete(n)}))}}class dt{post(e){this.subject.next(e)}alert$(){return this.subject}constructor(){(0,y._)(this,"subject",new k)}}class vt{captureEvent(e){}}class Et{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,y._)(this,"alertApi",void 0),(0,y._)(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,y._)(this,"subject",new k)}}class gt{static forward(e,n){window.addEventListener("unhandledrejection",s=>{e.post(s.reason,n)})}}const xt=new Map;class Q{static create(e){var n;return new Q((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 Q(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 Q.hasSubscribed||(Q.addStorageEventListener(),Q.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,y._)(this,"namespace",void 0),(0,y._)(this,"errorApi",void 0),(0,y._)(this,"subscribers",void 0),(0,y._)(this,"observable",void 0),this.namespace=e,this.errorApi=n,this.subscribers=new Set,this.observable=new(Y())(s=>(this.subscribers.add(s),()=>{this.subscribers.delete(s)}))}}(0,y._)(Q,"hasSubscribed",!1);function j(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 z{static create(e){var n,s;const a=q(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 z(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,y._)(this,"identityApi",void 0),(0,y._)(this,"allowUrl",void 0),(0,y._)(this,"headerName",void 0),(0,y._)(this,"headerValue",void 0),this.identityApi=e,this.allowUrl=n,this.headerName=s,this.headerValue=a}}function q(r){return r.allowUrl?r.allowUrl:r.urlPrefixAllowlist?st(r.urlPrefixAllowlist):r.config?st([r.config.getString("backend.baseUrl")]):()=>!1}function st(r){const e=r.map(n=>n.replace(/\/$/,""));return n=>e.some(s=>n===s||n.startsWith(`${s}/`))}function it(r,e){return!e||e==="/"?r:`${r.replace(/\/$/,"")}/${e.replace(/^\//,"")}`}class at{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:D,hash:N,username:X,password:lt}=new URL(`http://${a.url.substring(l.length)}`);let pt=await this.discoveryApi.getBaseUrl(C);if(X||lt){const At=new URL(pt),Nt=`${X}${lt?`:${lt}`:""}@`;pt=`${At.protocol}//${Nt}${At.host}${At.pathname}`}const yt=`${it(pt,E)}${D}${N}`;return e(yt,typeof n=="string"||nt(n)?s:n)}}constructor(e){(0,y._)(this,"discoveryApi",void 0),this.discoveryApi=e}}function nt(r){return typeof r=="object"&&(r==null?void 0:r.constructor)===URL}class St{static resolvePluginProtocol(e){return new at(e.discoveryApi)}static injectIdentityAuth(e){return z.create(e)}constructor(){}}function G(r,e){for(const n of e)if(!r.has(n))return!1;return!0}function H(r,...e){const n=new Set(r);for(const s of e)for(const a of s)n.add(a);return n}class ut{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=>G(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)=>H(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,y._)(this,"requests",[]),(0,y._)(this,"subject",new rt(this.getCurrentPending()))}}class ht{createAuthRequester(e){const n=new ut,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,y._)(this,"subject",new rt([])),(0,y._)(this,"currentRequests",[]),(0,y._)(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 D="";if(!E||typeof E.closed=="undefined"||E.closed){const pt=new Error("Failed to open auth popup.");pt.name="PopupRejectedError",n(pt);return}const N=pt=>{if(pt.source!==E||pt.origin!==r.origin)return;const{data:yt}=pt;if(yt.type==="config_info"){D=yt.targetOrigin;return}if(yt.type!=="authorization_response")return;const At=yt;if("error"in At){const Nt=new Error(At.error.message);Nt.name=At.error.name,n(Nt)}else e(At.response);lt()},X=setInterval(()=>{if(E.closed){const pt=`Login failed, ${D&&D!==window.location.origin?`Incorrect app origin, expected ${D}`:"popup was closed"}`,yt=new Error(pt);yt.name="PopupClosedError",n(yt),lt()}},100);function lt(){window.removeEventListener("message",N),clearInterval(X)}window.addEventListener("message",N)})}let bt=!1;function jt(r){return[...r].join(" ")}class Jt{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,D,N;const X=this.joinScopesFunc(e),lt=await this.buildUrl("/start",{scope:X,origin:window.location.origin,flow:"popup"}),pt=!((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,yt=!((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||(D=N.size)===null||D===void 0?void 0:D.height)||730,At=await mt({url:lt,name:`${this.provider.title} Login`,origin:new URL(lt).origin,width:pt,height:yt});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,y._)(this,"discoveryApi",void 0),(0,y._)(this,"environment",void 0),(0,y._)(this,"provider",void 0),(0,y._)(this,"joinScopesFunc",void 0),(0,y._)(this,"authRequester",void 0),(0,y._)(this,"sessionTransform",void 0),(0,y._)(this,"enableExperimentalRedirectFlow",void 0),(0,y._)(this,"popupOptions",void 0);const{configApi:n,discoveryApi:s,environment:a,provider:l,joinScopes:C=jt,oauthRequestApi:E,sessionTransform:D=lt=>lt,popupOptions:N}=e;!bt&&!n&&(console.warn("DEPRECATION WARNING: Authentication providers require a configApi instance to configure the authentication flow. Please provide one to the authentication provider constructor."),bt=!0);var X;this.enableExperimentalRedirectFlow=n&&(X=n.getOptionalBoolean("enableExperimentalRedirectFlow"))!==null&&X!==void 0?X:!1,this.authRequester=E.createAuthRequester({provider:l,onAuthRequest:async lt=>this.enableExperimentalRedirectFlow?this.executeRedirect(lt):this.showPopup(lt)}),this.discoveryApi=s,this.environment=a,this.provider=l,this.joinScopesFunc=C,this.sessionTransform=D,this.popupOptions=N}}function Wt(r,e){for(const n of e)if(!r.has(n))return!1;return!0}class Ht{sessionExistsAndHasScope(e,n){if(!e)return!1;if(!n||this.options.sessionScopes===void 0)return!0;const s=this.options.sessionScopes(e);return Wt(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,y._)(this,"options",void 0),this.options=e}}var Dt=t(95965),Mt;(function(r){r.SignedIn="SignedIn",r.SignedOut="SignedOut"})(Mt||(Mt={}));const Gt=(0,Dt.T)({id:"core.auth.google"}),ee=(0,Dt.T)({id:"core.auth.github"}),re=(0,Dt.T)({id:"core.auth.okta"}),qt=(0,Dt.T)({id:"core.auth.gitlab"}),de=(0,Dt.T)({id:"core.auth.microsoft"}),Ie=(0,Dt.T)({id:"core.auth.onelogin"}),Ge=(0,Dt.T)({id:"core.auth.bitbucket"}),_e=(0,Dt.T)({id:"core.auth.bitbucket-server"}),xe=(0,Dt.T)({id:"core.auth.atlassian"});class qe{setIsSignedIn(e){this.signedIn!==e&&(this.signedIn=e,this.subject.next(this.signedIn?Mt.SignedIn:Mt.SignedOut))}sessionState$(){return this.subject}constructor(){(0,y._)(this,"subject",new rt(Mt.SignedOut)),(0,y._)(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 Wt(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,y._)(this,"connector",void 0),(0,y._)(this,"helper",void 0),(0,y._)(this,"sessionScopesFunc",void 0),(0,y._)(this,"sessionShouldRefreshFunc",void 0),(0,y._)(this,"stateTracker",new qe),(0,y._)(this,"refreshPromise",void 0),(0,y._)(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 Ht({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:D=pt=>pt,popupOptions:N}=e,X=new Jt({configApi:n,discoveryApi:s,environment:a,provider:l,oauthRequestApi:C,sessionTransform({backstageIdentity:pt,...yt}){const At={...yt,providerInfo:{idToken:yt.providerInfo.idToken,accessToken:yt.providerInfo.accessToken,scopes:se.normalizeScopes(D,yt.providerInfo.scope),expiresAt:yt.providerInfo.expiresInSeconds?new Date(Date.now()+yt.providerInfo.expiresInSeconds*1e3):void 0}};if(pt){var Nt;const Kt=(Nt=pt.expiresInSeconds)!==null&&Nt!==void 0?Nt:yt.providerInfo.expiresInSeconds;At.backstageIdentity={token:pt.token,identity:pt.identity,expiresAt:Kt?new Date(Date.now()+Kt*1e3):void 0}}return At},popupOptions:N}),lt=new Ve({connector:X,defaultScopes:new Set(E),sessionScopes:pt=>pt.providerInfo.scopes,sessionShouldRefresh:pt=>{var yt,At;let Nt=1/0;return!((yt=pt.providerInfo)===null||yt===void 0)&&yt.expiresAt&&(Nt=Math.min(Nt,(pt.providerInfo.expiresAt.getTime()-Date.now())/1e3)),!((At=pt.backstageIdentity)===null||At===void 0)&&At.expiresAt&&(Nt=Math.min(Nt,(pt.backstageIdentity.expiresAt.getTime()-Date.now())/1e3)),Nt<60*5}});return new se({sessionManager:lt,scopeTransform:D})}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,y._)(this,"sessionManager",void 0),(0,y._)(this,"scopeTransform",void 0),this.sessionManager=e.sessionManager,this.scopeTransform=e.scopeTransform}}const sn={id:"google",title:"Google",icon:()=>null},Pe="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",`${Pe}userinfo.email`,`${Pe}userinfo.profile`]}=e;return se.create({configApi:n,discoveryApi:s,oauthRequestApi:a,provider:C,environment:l,defaultScopes:E,scopeTransform(D){return D.map(N=>N==="openid"?N:N==="profile"||N==="email"?`${Pe}userinfo.${N}`:N.startsWith(Pe)?N:`${Pe}${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,y._)(this,"oauth2",void 0),(0,y._)(this,"configApi",void 0),(0,y._)(this,"environment",void 0),(0,y._)(this,"provider",void 0),(0,y._)(this,"oauthRequestApi",void 0),(0,y._)(this,"discoveryApi",void 0),(0,y._)(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:D=N=>N.concat("offline_access")}=e;this.configApi=n,this.environment=s,this.provider=a,this.oauthRequestApi=l,this.discoveryApi=C,this.scopeTransform=D,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,y._)(ie,"MicrosoftGraphID","00000003-0000-0000-c000-000000000000");const Ne={id:"github",title:"GitHub",icon:()=>null};class ke{static create(e){const{configApi:n,discoveryApi:s,environment:a="development",provider:l=Ne,oauthRequestApi:C,defaultScopes:E=["read:user"]}=e;return se.create({configApi:n,discoveryApi:s,oauthRequestApi:C,provider:l,environment:a,defaultScopes:E})}}const Se={id:"okta",title:"Okta",icon:()=>null},Ue=new Set(["openid","profile","email","phone","address","groups","offline_access"]),$e="okta.";class U{static create(e){const{configApi:n,discoveryApi:s,environment:a="development",provider:l=Se,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(D){return D.map(N=>Ue.has(N)||N.startsWith($e)?N:`${$e}${N}`)}})}}const h={id:"gitlab",title:"GitLab",icon:()=>null};class I{static create(e){const{configApi:n,discoveryApi:s,environment:a="development",provider:l=h,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},ct=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(D=>ct.has(D)||D.startsWith(Ot)?D:`${Ot}${D}`)}})}}const ae={id:"bitbucket",title:"Bitbucket",icon:()=>null};class te{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 Le{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 Zt=t(42380),ne=t(96727),ue=t(6542),Mn=t(78847),vo=t(86386),Bn=t(58513);const Un=(0,Dt.T)({id:"core.storage"});var $n=t(85094),ve=t(77186);const je=(0,Dt.T)({id:"core.oauthrequest"}),mo=(0,Dt.T)({id:"plugin.permission.api"});var Qe=t(41385),yo=t(96279),Fn=t.n(yo),Eo=t(9571),Vt=t(30195),We;(function(r){r.DENY="DENY",r.ALLOW="ALLOW",r.CONDITIONAL="CONDITIONAL"})(We||(We={}));const ln=Vt.z.lazy(()=>Vt.z.object({rule:Vt.z.string(),resourceType:Vt.z.string(),params:Vt.z.record(Vt.z.any()).optional()}).or(Vt.z.object({anyOf:Vt.z.array(ln).nonempty()})).or(Vt.z.object({allOf:Vt.z.array(ln).nonempty()})).or(Vt.z.object({not:ln}))),xo=Vt.z.object({result:Vt.z.literal(We.ALLOW).or(Vt.z.literal(We.DENY))}),Co=Vt.z.union([Vt.z.object({result:Vt.z.literal(We.ALLOW).or(Vt.z.literal(We.DENY))}),Vt.z.object({result:Vt.z.literal(We.CONDITIONAL),pluginId:Vt.z.string(),resourceType:Vt.z.string(),conditions:ln})]),Ao=(r,e)=>Vt.z.object({items:Vt.z.array(Vt.z.intersection(Vt.z.object({id:Vt.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,xo,n)}async authorizeConditional(e,n){return this.makeRequest(e,Co,n)}async makeRequest(e,n,s){if(!this.enabled)return e.map(X=>({result:We.ALLOW}));const a={items:e.map(X=>({id:Eo.Z(),...X}))},l=await this.discovery.getBaseUrl("permission"),C=await Fn()(`${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=Ao(n,new Set(a.items.map(({id:X})=>X))).parse(E).items.reduce((X,lt)=>(X[lt.id]=lt,X),{});return a.items.map(X=>N[X.id])}getAuthorizationHeader(e){return e?{Authorization:`Bearer ${e}`}:{}}constructor(e){(0,y._)(this,"enabled",void 0),(0,y._)(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,y._)(this,"permissionClient",void 0),(0,y._)(this,"identityApi",void 0),this.permissionClient=e,this.identityApi=n}}const So=[(0,Zt.n)({api:ne.N,deps:{configApi:ue.D},factory:({configApi:r})=>V.compile(`${r.getString("backend.baseUrl")}/api/{{ pluginId }}`)}),(0,Zt.n)({api:Mn.$,deps:{},factory:()=>new dt}),(0,Zt.n)({api:vo.v,deps:{},factory:()=>new vt}),(0,Zt.n)({api:Bn.V,deps:{alertApi:Mn.$},factory:({alertApi:r})=>{const e=new Et(r,new Tt);return gt.forward(e,{hidden:!1}),e}}),(0,Zt.n)({api:Un,deps:{errorApi:Bn.V},factory:({errorApi:r})=>Q.create({errorApi:r})}),(0,Zt.n)({api:$n.g,deps:{configApi:ue.D,identityApi:ve.$,discoveryApi:ne.N},factory:({configApi:r,identityApi:e,discoveryApi:n})=>j({middleware:[St.resolvePluginProtocol({discoveryApi:n}),St.injectIdentityAuth({identityApi:e,config:r})]})}),(0,Zt.n)({api:je,deps:{},factory:()=>new ht}),(0,Zt.n)({api:Gt,deps:{discoveryApi:ne.N,oauthRequestApi:je,configApi:ue.D},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>tn.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,Zt.n)({api:de,deps:{discoveryApi:ne.N,oauthRequestApi:je,configApi:ue.D},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>ie.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,Zt.n)({api:ee,deps:{discoveryApi:ne.N,oauthRequestApi:je,configApi:ue.D},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>ke.create({configApi:n,discoveryApi:r,oauthRequestApi:e,defaultScopes:["read:user"],environment:n.getOptionalString("auth.environment")})}),(0,Zt.n)({api:re,deps:{discoveryApi:ne.N,oauthRequestApi:je,configApi:ue.D},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>U.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,Zt.n)({api:qt,deps:{discoveryApi:ne.N,oauthRequestApi:je,configApi:ue.D},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>I.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,Zt.n)({api:Ie,deps:{discoveryApi:ne.N,oauthRequestApi:je,configApi:ue.D},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>Rt.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,Zt.n)({api:Ge,deps:{discoveryApi:ne.N,oauthRequestApi:je,configApi:ue.D},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>te.create({configApi:n,discoveryApi:r,oauthRequestApi:e,defaultScopes:["team"],environment:n.getOptionalString("auth.environment")})}),(0,Zt.n)({api:_e,deps:{discoveryApi:ne.N,oauthRequestApi:je,configApi:ue.D},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>Ut.create({configApi:n,discoveryApi:r,oauthRequestApi:e,defaultScopes:["REPO_READ"]})}),(0,Zt.n)({api:xe,deps:{discoveryApi:ne.N,oauthRequestApi:je,configApi:ue.D},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>Le.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,Zt.n)({api:mo,deps:{discovery:ne.N,identity:ve.$,config:ue.D},factory:({config:r,discovery:e,identity:n})=>xn.create({config:r,discovery:e,identity:n})})];var Wn=t(43642),bo=t(80079),Oo=t(90941),Zn=t(32915),Cn=t(40562),wo=t(21853),Po=t(60744),To=t(66569),Ro=t(30254),Io=t(13384),kn=t(15933),Do=t(58838),zn=t(86737),Kn=t(4989),Hn=t(44407),Lo=t(18628),An=t(84219),Sn=t(98685),jo=t(39781),Gn=t(39412),Mo=t(78258);const Bo={brokenImage:bo.Z,catalog:Lo.Z,scaffolder:Zn.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:zn.Z,"kind:api":kn.Z,"kind:component":Hn.Z,"kind:domain":Wn.Z,"kind:group":An.Z,"kind:location":Kn.Z,"kind:system":Oo.Z,"kind:user":Sn.Z,"kind:resource":Gn.Z,"kind:template":Mo.Z,user:Sn.Z,warning:jo.Z};var Uo=t(87561),$o=t(12536),Vn=t(19219),Fo=t(41547),No=t(3493),Wo=t(81887);const Zo=(0,$o.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)(Vn.ZP,{generateClassName:Zo,children:(0,i.jsx)(Fo.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 Yn={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),he=t(52475),fe=t(80956),ko=t(73689),cr=t(93606);const f={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")`},w={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 D=(E=s==null?void 0:s.fontColor)!==null&&E!==void 0?E:"#FFFFFF";return{colors:e,shape:n,backgroundImage:C,fontColor:D}}const F={home:B({colors:w.teal,shape:f.wave}),documentation:B({colors:w.pinkSea,shape:f.wave2}),tool:B({colors:w.purpleSky,shape:f.round}),service:B({colors:w.marineBlue,shape:f.wave}),website:B({colors:w.veryBlue,shape:f.wave}),library:B({colors:w.rubyRed,shape:f.wave}),other:B({colors:w.darkGrey,shape:f.wave}),app:B({colors:w.toastyOrange,shape:f.wave}),apis:B({colors:w.teal,shape:f.wave2}),card:B({colors:w.greens,shape:f.wave})},tt=16,ot='"Helvetica Neue", Helvetica, Roboto, Arial, sans-serif',ft="home";function Ct(r){const{palette:e,htmlFontSize:n=tt,fontFamily:s=ot,defaultPageTheme:a=ft,pageTheme:l=F,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:D})=>{var N;return(N=l[D])!==null&&N!==void 0?N:l[a]}}}var It=t(47591);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"}}},Yt=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 Ft(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=Yt(s)),Object.fromEntries(Object.entries(e).map(([a,l])=>typeof l=="function"?[a,l({theme:n})]:[a,l]))}return e}}const le=/^&.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(le);if(C){const[,E]=C,{[l]:D,...N}=s;D&&(e={...e,[n]:N,[E]:D})}}}return e}function Qt(r,e={}){const n={},s={};for(const a of Object.keys(e)){const l=e[a];l&&("styleOverrides"in l&&(a==="MuiCssBaseline"?n[a]=Ft(r,l.styleOverrides):n[a]=me(Pt(r,l.styleOverrides))),"defaultProps"in l&&(s[a]=l.defaultProps))}return{overrides:n,props:s}}var Bt=new WeakMap;class oe{getTheme(e){return(0,wt._)(this,Bt).get(e)}constructor(e,n){(0,he._)(this,Bt,{writable:!0,value:new Map}),(0,fe._)(this,Bt,new Map),e&&(0,wt._)(this,Bt).set("v4",e),n&&(0,wt._)(this,Bt).set("v5",n)}}function ye(r){const e=Ct(r),n={...$t,...r.components},s=(0,cr.Z)({...e,components:n}),a=Qt(s,n),l={...(0,ko.Z)(e),...a};return new oe(l,s)}function Lt(r){const e=adaptV4Theme(r),n=createTheme(r);return new oe(n,e)}const zt={light:ye({palette:Yn.light}),dark:ye({palette:Yn.dark})};var Xt=t(98192),Ce=t(15222);const Te=[{id:"light",title:"Light Theme",variant:"light",icon:(0,i.jsx)(Ce.Z,{}),Provider:({children:r})=>(0,i.jsx)(cn,{theme:zt.light,children:r})},{id:"dark",title:"Dark Theme",variant:"dark",icon:(0,i.jsx)(Xt.Z,{}),Provider:({children:r})=>(0,i.jsx)(cn,{theme:zt.dark,children:r})}];var Fe=t(64279),ce=t(13980),Ze=t.n(ce);class pe{get(e){for(const n of this.holders){const s=n.get(e);if(s)return s}}constructor(...e){(0,y._)(this,"holders",void 0),this.holders=e}}var Je=t(29651),dn=t(68993);const dr=(0,Je.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 pe(n,a):n;return(0,i.jsx)(dr.Provider,{value:(0,dn.E)({1:l}),children:s})};zo.propTypes={apis:Ze().shape({get:Ze().func.isRequired}).isRequired,children:Ze().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 Me={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:D,description:N}of C)console.warn(`The configuration key '${D}' 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(Me.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(Me.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(Me.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(Me.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(Me.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(Me.convert(this.fullKey(e),this.context,"number"));return s}getBoolean(e){const n=this.getOptionalBoolean(e);if(n===void 0)throw new Error(Me.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(Me.convert(this.fullKey(e),this.context,"boolean"))}getString(e){const n=this.getOptionalString(e);if(n===void 0)throw new Error(Me.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(Me.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:D=s,expected:N}=C;throw new TypeError(Me.type(this.fullKey(E),this.context,Ko(D),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(Me.type(C,this.context,Ko(s),"object"))}return s}constructor(e,n="mock-config",s,a=""){(0,y._)(this,"data",void 0),(0,y._)(this,"context",void 0),(0,y._)(this,"fallback",void 0),(0,y._)(this,"prefix",void 0),(0,y._)(this,"filteredKeys",void 0),(0,y._)(this,"notifiedFilteredKeys",void 0),this.data=e,this.context=n,this.fallback=s,this.prefix=a,this.notifiedFilteredKeys=new Set}}const On="theme";class Qn{static createWithStorage(e){const n=new Qn(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,y._)(this,"themes",void 0),(0,y._)(this,"activeThemeId",void 0),(0,y._)(this,"subject",void 0),this.themes=e,this.subject=new rt(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,y._)(this,"registeredFeatureFlags",[]),(0,y._)(this,"flags",void 0)}}const Jn=(0,Dt.T)({id:"core.apptheme"}),hr=(0,Dt.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 D of Object.values(E.deps)){if(D.id===s.id)throw new Error(`Circular dependency of api factory for ${s}`);l.has(D)||(l.add(D),a.push(D))}}}}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,y._)(this,"factories",void 0),(0,y._)(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,y._)(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 D in e)if(e.hasOwnProperty(D)){const N=e[D];E[D]=N.visit(N.accumulator,C,a,l[D])}for(const D of r.discoverers){const N=D(C);N&&n.push({node:N,parent:C,contexts:E})}})}return Object.fromEntries(Object.entries(e).map(([s,a])=>[s,a.accumulator]))}function Xn(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 be=t(62584);const Cs=Xn(()=>new Set,(r,e)=>{const n=(0,be.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,be.R)(fr,"core.featureFlagged",!0);const _n={caseSensitive:!1,path:"*",element:"match-all",routeRefs:new Set,plugins:new Set};function qn(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,be.I)(n,"core.mountPoint");if(s){const a=(0,be.I)(n,"core.plugin");e.push({routeRef:s,plugin:a})}gr(n.props.children,e)}),e}const As=Xn(()=>({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,be.I)(e,"core.mountPoint");if(E&&C)throw new Error(`Path property may not be set directly on a routable extension "${qn(e)}"`);var D;const N=(D=s==null||(l=s.obj)===null||l===void 0?void 0:l.children)!==null&&D!==void 0?D:r.objects;if(C!==void 0){if(typeof C!="string")throw new Error(`Element path must be a string at "${qn(e)}"`);const At=C.startsWith("/")?C.slice(1):C,Nt=e.props.element;if((0,be.I)(e,"core.gatherMountPoints")){var X;if(Nt)throw new Error(`Mount point gatherers may not have an element prop "${qn(e)}"`);const Kt={path:At,element:"gathered",routeRefs:new Set,caseSensitive:Boolean((X=e.props)===null||X===void 0?void 0:X.caseSensitive),children:[_n],plugins:new Set};return N.push(Kt),{obj:Kt,gatherPath:At,routeRef:s==null?void 0:s.routeRef,gatherRouteRef:s==null?void 0:s.routeRef}}if(Nt){var lt;const[Kt,..._t]=gr(Nt);if(_t.length>0)throw new Error(`Route element with path "${C}" may not contain multiple routable extensions`);if(!Kt)return s;const{routeRef:Ee,plugin:He}=Kt,jn={path:At,element:"mounted",routeRefs:new Set([Ee]),caseSensitive:Boolean((lt=e.props)===null||lt===void 0?void 0:lt.caseSensitive),children:[_n],plugins:pr(He)};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 pt;if((s==null?void 0:s.gatherPath)===void 0)throw new Error(`Routable extension "${qn(e)}" with mount point "${E}" must be assigned a path`);s==null||(pt=s.obj)===null||pt===void 0||pt.routeRefs.add(E);const At=(0,be.I)(e,"core.plugin");if(At){var yt;s==null||(yt=s.obj)===null||yt===void 0||yt.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=Xn(()=>({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,D=s==null?void 0:s.routeRef,N=s==null?void 0:s.sticky;const X=(a=e.props)===null||a===void 0?void 0:a.path;var lt;const pt=(lt=E==null?void 0:E.children)!==null&&lt!==void 0?lt:r.objects,yt=Boolean((l=e.props)===null||l===void 0?void 0:l.caseSensitive);let At=s==null?void 0:s.path;if((0,be.I)(e,"core.gatherMountPoints")){if(!X)throw new Error("Mount point gatherer must have a path");At=X}const Nt=(C=e.props)===null||C===void 0?void 0:C.element;let Kt=(0,be.I)(e,"core.mountPoint");if(!Kt&&(0,d.isValidElement)(Nt)&&(Kt=(0,be.I)(Nt,"core.mountPoint")),Kt){let He=X;if(At&&(He?At=void 0:He=At),!He)throw new Error("Mounted routable extension must have a path");r.paths.set(Kt,He),D&&N?(r.parents.set(Kt,D),X&&(D=Kt,N=!1)):(r.parents.set(Kt,D),D=Kt),X?(E={caseSensitive:yt,path:X,element:"mounted",routeRefs:new Set([Kt]),children:[_n],plugins:pr((0,be.I)(e.props.element,"core.plugin"))},pt.push(E)):E==null||E.routeRefs.add(Kt)}if((0,be.I)(e,"core.gatherMountPoints")&&(N=!0),(0,be.I)(e,"core.gatherMountPoints")){if(!X)throw new Error("Mount point gatherer must have a path");if(!Kt){var Ee;E={caseSensitive:yt,path:X,element:"gathered",routeRefs:new Set,children:[_n],plugins:(s==null||(Ee=s.obj)===null||Ee===void 0?void 0:Ee.plugins)||new Set},pt.push(E)}}return{obj:E,path:At,routeRef:D,sticky:N}}),bs=Xn(()=>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 to(...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=to(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 D=-1;for(let lt=r;lt&&(D=C.findIndex(pt=>pt.route.routeRefs.has(lt)),D===-1);lt=s.get(lt))E.unshift(lt);E.length===0&&(D-=1);const N=D===-1?"":C[D].pathname,X=E.slice(0,-1).map(lt=>{const pt=n.get(lt);if(pt===void 0)throw new Error(`No path for ${lt}`);if(pt.includes(":"))throw new Error(`Cannot route to ${r} with parent ${lt} as it has parameters`);return pt});return`${to(N,...X)}/`}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(...[D])=>{const N=D&&Ts()(D,X=>typeof X=="string"?X.replaceAll(/[&?#;\/]/g,lt=>encodeURIComponent(lt)):X);return to(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,y._)(this,"routePaths",void 0),(0,y._)(this,"routeParents",void 0),(0,y._)(this,"routeObjects",void 0),(0,y._)(this,"routeBindings",void 0),(0,y._)(this,"appBasePath",void 0),this.routePaths=e,this.routeParents=n,this.routeObjects=s,this.routeBindings=a,this.appBasePath=l}}const Ls=(0,Je.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=to(E,l),a=e.get(a)}const C=l.match(/:(\w+)/g);if(C){for(let E=0;E<C.length;E++)for(let D=E+1;D<C.length;D++)if(C[D]===C[E])throw new Error(`Parameter ${C[D]} 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,Je.CT)("app-context"),$s=({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 Fs{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,y._)(this,"target",void 0),(0,y._)(this,"waitForTarget",void 0),(0,y._)(this,"resolveTarget",()=>{}),(0,y._)(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_)(Jn),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,y._)(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,y._)(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(D=>{var N;return(D==null||(N=D.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((D,[N,X])=>(X!==void 0&&N!=="*"&&(D[N]=X),D),{});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},eo=({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_)(ue.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_)(ue.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:D}=C;return n?Rn()?(0,i.jsxs)(e,{children:[(0,i.jsx)(eo,{routeObjects:E}),(0,i.jsx)(br,{component:n,appIdentityProxy:D,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)(eo,{routeObjects:E}),(0,i.jsx)(br,{component:n,appIdentityProxy:D,children:r.children})]}):(D.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)(eo,{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)(eo,{routeObjects:E}),r.children]}))}(0,be.R)(Or,"core.type","AppRouter");const In="language",ze="en";var Dn=new WeakMap,pn=new WeakMap,no=new WeakMap;class oo{static create(e){var n;const s=(n=e==null?void 0:e.availableLanguages)!==null&&n!==void 0?n:[ze];if(s.length!==new Set(s).size)throw new Error(`Supported languages may not contain duplicates, got '${s.join("', '")}'`);if(!s.includes(ze))throw new Error(`Supported languages must include '${ze}'`);var a;const l=(a=e==null?void 0:e.defaultLanguage)!==null&&a!==void 0?a:ze;if(!s.includes(l))throw new Error(`Initial language must be one of the supported languages, got '${l}'`);return new oo(s,l)}static createWithStorage(e){const n=oo.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:ze;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,fe._)(this,pn,n),(0,wt._)(this,no).next({language:n})}}getLanguage(){return{language:(0,wt._)(this,pn)}}language$(){return(0,wt._)(this,no)}constructor(e,n){(0,he._)(this,Dn,{writable:!0,value:void 0}),(0,he._)(this,pn,{writable:!0,value:void 0}),(0,he._)(this,no,{writable:!0,value:void 0}),(0,fe._)(this,Dn,e),(0,fe._)(this,pn,n),(0,fe._)(this,no,new rt({language:(0,wt._)(this,pn)}))}}var Be=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,ro=new WeakMap,vn=new WeakMap,so=new WeakSet;class Xs{addTranslationResource(e){const n=(0,Js.W)(e);for(const s of n.resources){const a=(0,Be._)(this,so,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,Be._)(this,so,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,Be._)(this,so,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,ro).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,ro).set(s,C),await C}constructor(e){(0,en._)(this,so),(0,y._)(this,"onLoad",void 0),(0,he._)(this,gn,{writable:!0,value:void 0}),(0,he._)(this,ro,{writable:!0,value:void 0}),(0,he._)(this,vn,{writable:!0,value:void 0}),this.onLoad=e,(0,fe._)(this,gn,new Set),(0,fe._)(this,ro,new Map),(0,fe._)(this,vn,new Map)}}function Qo(r,e){return`${r}/${e}`}var Ln=new WeakMap,mn=new WeakMap,nn=new WeakMap,Jo=new WeakMap,io=new WeakMap,Tr=new WeakSet,ao=new WeakSet,Xo=new WeakSet;class _o{static create(e){const{languages:n}=e.languageApi.getAvailableLanguages(),s=(0,Qs.Fs)({fallbackLng:ze,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!==ze&&s.changeLanguage(a);const l=new Xs(D=>{s.addResourceBundle(D.language,D.namespace,Pr(D.messages),!1,!0)}),C=(e==null?void 0:e.resources)||[];for(let D=C.length-1;D>=0;D--){const N=C[D];N.$$type==="@backstage/TranslationResource"?l.addTranslationResource(N):N.$$type==="@backstage/TranslationMessages"&&s.addResourceBundle(ze,N.id,Pr(N.messages),!0,!1)}const E=new _o(s,l,e.languageApi.getLanguage().language);return e.languageApi.language$().subscribe(({language:D})=>{(0,Be._)(E,Tr,_s).call(E,D)}),E}getTranslation(e){const n=(0,wr.y)(e);return(0,Be._)(this,Xo,Rr).call(this,n),(0,Be._)(this,ao,qo).call(this,n)}translation$(e){const n=(0,wr.y)(e);return(0,Be._)(this,Xo,Rr).call(this,n),new(Y())(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 D=(0,Be._)(this,ao,qo).call(this,n);D.ready&&s.next(D)}},D=>{E===a&&s.error(Array.isArray(D)?D[0]:D)})},C=()=>{const E=(0,Be._)(this,ao,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,io).add(C),()=>{(0,wt._)(this,io).delete(C)}})}constructor(e,n,s){(0,en._)(this,Tr),(0,en._)(this,ao),(0,en._)(this,Xo),(0,he._)(this,Ln,{writable:!0,value:void 0}),(0,he._)(this,mn,{writable:!0,value:void 0}),(0,he._)(this,nn,{writable:!0,value:void 0}),(0,he._)(this,Jo,{writable:!0,value:new Set}),(0,he._)(this,io,{writable:!0,value:new Set}),(0,fe._)(this,Ln,e),(0,fe._)(this,mn,n),(0,fe._)(this,nn,s)}}function _s(r){(0,wt._)(this,nn)!==r&&((0,fe._)(this,nn,r),(0,wt._)(this,Ln).changeLanguage(r),(0,wt._)(this,io).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(ze,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,D=new URL(s).origin;if(E===D){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,Fe.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(Jn,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,y._)(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,fe._)(this,tr,!0);const e=new ei(this);let n=!1;return({children:a})=>{const l=(0,d.useRef)(!0),C=(0,d.useMemo)(()=>Qn.createWithStorage(this.themes),[]),{routing:E,featureFlags:D,routeBindings:N}=(0,d.useMemo)(()=>{const At=Rn();At&&console.warn(`
1
+ (()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[179],{88797:function(J,T,t){"use strict";t.d(T,{n:function(){return o}});const o=Symbol.for("CATALOG_FILTER_EXISTS_0e15b590c0b343a2bae3e787e84c2111")},34106:function(J,T,t){"use strict";t.d(T,{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",p="kubernetes.io/auth-provider"},74314:function(J,T,t){"use strict";t.d(T,{eE:function(){return v},iB:function(){return d},of:function(){return S}});var o=t(34106);function i(p){let c=p.indexOf(":");const u=p.indexOf("/");u!==-1&&u<c&&(c=-1);const A=c===-1?void 0:p.slice(0,c),x=u===-1?void 0:p.slice(c+1,u),O=p.slice(Math.max(c+1,u+1));if(A===""||x===""||O==="")throw new TypeError(`Entity reference "${p}" was not on the form [<kind>:][<namespace>/]<name>`);return{kind:A,namespace:x,name:O}}function d(p){return{kind:p.kind,namespace:p.metadata.namespace||o.zG,name:p.metadata.name}}function S(p,c){if(!p)throw new Error("Entity reference must not be empty");const u=c==null?void 0:c.defaultKind,A=(c==null?void 0:c.defaultNamespace)||o.zG;let x,O,m;if(typeof p=="string"){const P=i(p);var b;x=(b=P.kind)!==null&&b!==void 0?b:u;var g;O=(g=P.namespace)!==null&&g!==void 0?g:A,m=P.name}else{var M;x=(M=p.kind)!==null&&M!==void 0?M:u;var R;O=(R=p.namespace)!==null&&R!==void 0?R:A,m=p.name}if(x)if(O){if(!m){const P=JSON.stringify(p);throw new Error(`Entity reference ${P} had missing or empty name`)}}else{const P=JSON.stringify(p);throw new Error(`Entity reference ${P} had missing or empty namespace`)}else{const P=JSON.stringify(p);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(p){let c,u,A;if("metadata"in p){c=p.kind;var x;u=(x=p.metadata.namespace)!==null&&x!==void 0?x:o.zG,A=p.metadata.name}else{c=p.kind;var O;u=(O=p.namespace)!==null&&O!==void 0?O:o.zG,A=p.name}return`${c.toLocaleLowerCase("en-US")}:${u.toLocaleLowerCase("en-US")}/${A.toLocaleLowerCase("en-US")}`}},8709:function(J,T,t){"use strict";t.d(T,{S4:function(){return o},aS:function(){return g},cz:function(){return b},nP:function(){return c},w$:function(){return u}});const o="ownedBy",i="ownerOf",d="consumesApi",S="apiConsumedBy",v="providesApi",p="apiProvidedBy",c="dependsOn",u="dependencyOf",A="parentOf",x="childOf",O="memberOf",m="hasMember",b="partOf",g="hasPart"},90663:function(J,T,t){"use strict";t.d(T,{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(J,T,t){"use strict";t.d(T,{CV:function(){return p},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 A=c.substring(0,u).trim(),x=c.substring(u+1).trim();if(!A||!x)throw new TypeError(`Unable to parse location ref '${c}', expected '<type>:<target>', e.g. 'url:https://host/path'`);if(A==="http"||A==="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:A,target:x}}function v(c){const{type:u,target:A}=c;if(u){if(!A)throw new TypeError("Unable to stringify location ref, empty target")}else throw new TypeError("Unable to stringify location ref, empty type");if(d.test(A))throw new TypeError(`Invalid location ref '${u}:${A}', target is a javascript: URL`);return`${u}:${A}`}function p(c){var u,A,x,O,m;const b=(m=(A=c.metadata)===null||A===void 0||(u=A.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(!b)throw new Error(`Entity '${(0,o.eE)(c)}' is missing location`);return S(b)}},9791:function(J,T,t){"use strict";t.d(T,{O:function(){return A}});var o=t(52322),i=t(62774),d=t(60364),S=t(2784),v=t(83229),p=t(26639),c=t(39595),u=t(58033);function A(x){const{text:O,language:m,showLineNumbers:b=!1,highlightedNumbers:g,customStyle:M,showCopyCodeButton:R=!1}=x,P=(0,d.Z)(),$=P.palette.type==="dark"?p.Z:c.Z,L=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:$,showLineNumbers:b,wrapLines:!0,lineNumberStyle:{color:P.palette.textVerySubtle},lineProps:y=>g!=null&&g.includes(y)?{style:{backgroundColor:L}}:{},children:O}),R&&(0,o.jsx)(i.Z,{position:"absolute",top:0,right:0,children:(0,o.jsx)(u.b,{text:O})})]})}},58033:function(J,T,t){"use strict";t.d(T,{b:function(){return A}});var o=t(52322),i=t(44394),d=t(58513),S=t(61837),v=t(80030),p=t(19353),c=t(2784),u=t(95074);function A(x){const{text:O,tooltipDelay:m=1e3,tooltipText:b="Text copied to clipboard","aria-label":g="Copy text"}=x,M=(0,i.h_)(d.V),[R,P]=(0,c.useState)(!1),[{error:$},L]=(0,u.Z)();(0,c.useEffect)(()=>{$&&M.post($)},[$,M]);const y=Z=>{Z.stopPropagation(),P(!0),L(O)};return(0,o.jsx)(o.Fragment,{children:(0,o.jsx)(v.ZP,{id:"copy-test-tooltip",title:b,placement:"top",leaveDelay:m,onClose:()=>P(!1),open:R,children:(0,o.jsx)(S.Z,{onClick:y,"aria-label":g,children:(0,o.jsx)(p.Z,{})})})})}},70249:function(J,T,t){"use strict";t.d(T,{u:function(){return b}});var o=t(52322),i=t(60905),d=t(79692),S=t(90436),v=t(2784),p=t.p+"static/missingAnnotation.67f79e98..svg",c=t.p+"static/noInformation.4b426325..svg",u=t.p+"static/createComponent.975d1e1e..svg",A=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:g})=>{const M=x();switch(g){case"field":return(0,o.jsx)("img",{src:p,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:A,alt:"no Build",className:M.generalImg});default:return null}},m=(0,d.Z)(g=>({root:{backgroundColor:g.palette.background.default,padding:g.spacing(2,0,0,0)},action:{marginTop:g.spacing(2)},imageContainer:{position:"relative"}}),{name:"BackstageEmptyState"});function b(g){const{title:M,description:R,missing:P,action:$}=g,L=m();return(0,o.jsxs)(i.Z,{container:!0,direction:"row",justifyContent:"space-around",alignItems:"flex-start",className:L.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:L.action,children:$})]})}),(0,o.jsx)(i.Z,{item:!0,xs:12,md:6,className:L.imageContainer,children:typeof P=="string"?(0,o.jsx)(O,{missing:P}):P.customImage})]})}},74359:function(J,T,t){"use strict";t.d(T,{y:function(){return O}});var o=t(52322),i=t(79692),d=t(11776),S=t(38402),v=t(49378),p=t(2784),c=t(58033),u=t(538);const A=(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:b,stack:g,children:M})=>{const R=A();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:b}),(0,o.jsx)(c.b,{text:b})]}),g&&(0,o.jsxs)(S.Z,{alignItems:"flex-start",children:[(0,o.jsx)(v.Z,{classes:{secondary:R.text},primary:"Stack Trace",secondary:g}),(0,o.jsx)(c.b,{text:g})]}),M]})};function O(m){const{title:b,error:g,defaultExpanded:M,titleFormat:R,children:P}=m;return(0,o.jsx)(u.G,{severity:"error",title:b!=null?b:g.message,defaultExpanded:M,titleFormat:R,children:(0,o.jsx)(x,{error:g.name,message:g.message,stack:g.stack,children:P})})}},98864:function(J,T,t){"use strict";t.d(T,{rU:function(){return Y}});var o=t(52322),i=t(44394),d=t(6542),S=t(62369),v=t(86689),p=t(79692),c=t(90436),u=t(72779),A=t.n(u),x=t(76635),O=t.n(x),m=t(2784),b=t(73557),g=t(71597);function M(){const[K]=(0,b.is)((0,o.jsx)(b.AW,{index:!0,element:(0,o.jsx)("div",{})}));return!K.index}const R=(0,p.Z)({visuallyHidden:{clip:"rect(0 0 0 0)",clipPath:"inset(50%)",overflow:"hidden",position:"absolute",whiteSpace:"nowrap",height:1,width:1},externalLink:{position:"relative"}},{name:"Link"}),P=K=>/^([a-z+.-]+):/.test(K),$=/^[\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,L=window.open;if(L&&!L.__backstage){const K=function(..._){const rt=String(_[0]);if($.test(rt))throw new Error("Rejected window.open() with a javascript: URL as a security precaution");return L.apply(this,_)};K.__backstage=!0,window.open=K}const y=()=>{try{return(0,i.h_)(d.D).getOptionalString("app.baseUrl")}catch{return}},Z=()=>{const K="http://sample.dev";var k;const _=(k=y())!==null&&k!==void 0?k:"/",{pathname:rt}=new URL(_,K);return(0,x.trimEnd)(rt,"/")},V=K=>{let k=String(K);const _=Z(),rt=P(k),dt=k.startsWith(_);return!rt&&!dt&&(k=_.concat(k)),k},et=K=>{if(K instanceof Array)return K.map(et).join(" ").trim();if(typeof K=="object"&&K){var k;return et(K==null||(k=K.props)===null||k===void 0?void 0:k.children)}return["string","number"].includes(typeof K)?String(K):""},Y=m.forwardRef(({onClick:K,noTrack:k,..._},rt)=>{const dt=R(),vt=(0,S.z)(),Et=M()?V(_.to):_.to,Tt=et(_.children)||Et,gt=P(Et),xt=gt&&!!/^https?:/.exec(Et);if($.test(Et))throw new Error("Link component rejected javascript: URL as a security precaution");const Q=j=>{K==null||K(j),k||vt.captureEvent("click",Tt,{attributes:{to:Et}})};return gt?(0,o.jsxs)(v.Z,{...xt?{target:"_blank",rel:"noopener"}:{},..._,..._["aria-label"]?{"aria-label":`${_["aria-label"]}, Opens in a new window`}:{},ref:rt,href:Et,onClick:Q,className:A()(dt.externalLink,_.className),children:[_.children,(0,o.jsx)(c.Z,{component:"span",className:dt.visuallyHidden,children:", Opens in a new window"})]}):(0,o.jsx)(v.Z,{..._,ref:rt,component:g.rU,to:Et,onClick:Q})})},15929:function(J,T,t){"use strict";t.d(T,{Q:function(){return p}});var o=t(52322),i=t(77277),d=t(2784),S=t(98864);const v=d.forwardRef((u,A)=>(0,o.jsx)(S.rU,{ref:A,...u,color:"initial"})),p=d.forwardRef((u,A)=>(0,o.jsx)(i.Z,{ref:A,component:v,...u})),c=null},78527:function(J,T,t){"use strict";t.d(T,{S:function(){return O}});var o=t(52322),i=t(79692),d=t(28865),S=t(60251),v=t(2784),p=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,b)=>b?typeof b=="string"?m+b:v.Children.toArray(b.props.children).reduce(u,m):m,A=({level:m,children:b})=>{const R=v.Children.toArray(b).reduce(u,"").toLocaleLowerCase("en-US").replace(/\W/g,"-");return v.createElement(`h${m}`,{id:R},b)},x={code:({inline:m,className:b,children:g,...M})=>{const R=String(g).replace(/\n+$/,""),P=/language-(\w+)/.exec(b||"");return!m&&P?(0,o.jsx)(p.O,{language:P[1],text:R}):(0,o.jsx)("code",{className:b,...M,children:g})},h1:A,h2:A,h3:A,h4:A,h5:A,h6:A};function O(m){const{content:b,dialect:g="gfm",linkTarget:M,transformLinkUri:R,transformImageUri:P,className:$}=m,L=c();return(0,o.jsx)(d.D,{remarkPlugins:g==="gfm"?[S.Z]:[],className:`${L.markdown} ${$}`,children:b,components:x,linkTarget:M,transformLinkUri:R,transformImageUri:P})}},55015:function(J,T,t){"use strict";t.d(T,{E:function(){return p}});var o=t(52322),i=t(62774),d=t(67358),S=t(60364),v=t(2784);function p(c){const u=(0,S.Z)(),[A,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]),A?(0,o.jsx)(d.Z,{...c,"data-testid":"progress"}):(0,o.jsx)(i.Z,{display:"none"})}},35879:function(J,T,t){"use strict";t.d(T,{H:function(){return Y}});var o=t(52322),i=t(62774),d=t(21324),S=t(7089),v=t(30192),p=t(74603),c=t(56939),u=t(12231),A=t(73698),x=t(15459),O=t(42494),m=t(79692),b=t(90436),g=t(2784),M=t(72379);const R=(0,m.Z)(K=>(0,O.Z)({icon:{position:"absolute",right:K.spacing(.5),pointerEvents:"none"}}),{name:"BackstageClosedDropdown"});var $=()=>{const K=R();return(0,o.jsx)(M.Z,{className:K.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 L=(0,m.Z)(K=>(0,O.Z)({icon:{position:"absolute",right:K.spacing(.5),pointerEvents:"none"}}),{name:"BackstageOpenedDropdown"});var Z=()=>{const K=L();return(0,o.jsx)(M.Z,{className:K.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 V=(0,x.Z)(K=>(0,O.Z)({root:{"label + &":{marginTop:K.spacing(3)},"&.Mui-focused > div[role=button]":{borderColor:K.palette.primary.main}},input:{borderRadius:K.shape.borderRadius,position:"relative",backgroundColor:K.palette.background.paper,border:"1px solid #ced4da",fontSize:K.typography.body1.fontSize,padding:K.spacing(1.25,3.25,1.25,1.5),transition:K.transitions.create(["border-color","box-shadow"]),fontFamily:"Helvetica Neue","&:focus":{background:K.palette.background.paper,borderRadius:K.shape.borderRadius}}}),{name:"BackstageSelectInputBase"})(p.Z),et=(0,m.Z)(K=>(0,O.Z)({formControl:{margin:K.spacing(1,0),maxWidth:300},label:{transform:"initial",fontWeight:"bold",fontSize:K.typography.body2.fontSize,fontFamily:K.typography.fontFamily,color:K.palette.text.primary,"&.Mui-focused":{color:K.palette.text.primary}},formLabel:{transform:"initial",fontWeight:"bold",fontSize:K.typography.body2.fontSize,fontFamily:K.typography.fontFamily,color:K.palette.text.primary,"&.Mui-focused":{color:K.palette.text.primary}},chips:{display:"flex",flexWrap:"wrap"},chip:{margin:2},checkbox:{},root:{display:"flex",flexDirection:"column"}}),{name:"BackstageSelect"});function Y(K){const{multiple:k,items:_,label:rt,placeholder:dt,selected:vt,onChange:Et,triggerReset:Tt,native:gt=!1,disabled:xt=!1,margin:Q}=K,j=et(),[z,q]=(0,g.useState)(vt||(k?[]:"")),[st,it]=(0,g.useState)(!1);(0,g.useEffect)(()=>{q(k?[]:"")},[Tt,k]),(0,g.useEffect)(()=>{q(vt||(k?[]:""))},[vt,k]);const at=H=>{q(H.target.value),Et(H.target.value)},nt=H=>{if(xt){H.preventDefault();return}it(ut=>k&&!(H.target instanceof HTMLElement)?!0:!ut)},St=()=>{it(!1)},G=H=>()=>{const ut=z.filter(ht=>ht!==H);q(ut),Et(ut)};return(0,o.jsx)(i.Z,{className:j.root,children:(0,o.jsxs)(v.Z,{className:j.formControl,children:[(0,o.jsx)(c.Z,{className:j.formLabel,children:rt}),(0,o.jsxs)(A.Z,{"aria-label":rt,value:z,native:gt,disabled:xt,"data-testid":"select",displayEmpty:!0,multiple:k,margin:Q,onChange:at,open:st,onOpen:nt,onClose:St,input:(0,o.jsx)(V,{}),label:rt,renderValue:H=>{var ut;return k&&z.length!==0?(0,o.jsx)(i.Z,{className:j.chips,children:H.map(ht=>{const mt=_.find(bt=>bt.value===ht);return mt?(0,o.jsx)(S.Z,{label:mt==null?void 0:mt.label,clickable:!0,onDelete:G(ht),className:j.chip},mt==null?void 0:mt.value):!1})}):(0,o.jsx)(b.Z,{children:z.length===0?dt||"":(ut=_.find(ht=>ht.value===H))===null||ut===void 0?void 0:ut.label})},IconComponent:()=>st?(0,o.jsx)(Z,{}):(0,o.jsx)($,{}),MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},getContentAnchorEl:null},children:[dt&&!k&&(0,o.jsx)(u.Z,{value:[],children:dt}),gt?_&&_.map(H=>(0,o.jsx)("option",{value:H.value,children:H.label},H.value)):_&&_.map(H=>(0,o.jsxs)(u.Z,{value:H.value,children:[k&&(0,o.jsx)(d.Z,{color:"primary",checked:z.includes(H.value)||!1,className:j.checkbox}),H.label]},H.value))]})]})})}},13788:function(J,T,t){"use strict";t.d(T,{q:function(){return Q}});var o=t(52322),i=t(80851),d=t(62774),S=t(77277),v=t(49429),p=t(61837),c=t(86136),u=t(49378),A=t(12231),x=t(50758),O=t(79784),m=t(79692),b=t(90436),g=t(41156),M=t(2784),R=t(77770),P=t(80079);function $(j,z){const st=(0,i.q)().getSystemIcon(j);return st?(0,o.jsx)(st,{...z}):(0,o.jsx)(P.Z,{...z})}function L(j){return $("brokenImage",j)}function y(j){return $("catalog",j)}function Z(j){return $("chat",j)}function V(j){return $("dashboard",j)}function et(j){return $("docs",j)}function Y(j){return $("email",j)}function K(j){return $("github",j)}function k(j){return $("group",j)}function _(j){return $("help",j)}function rt(j){return $("user",j)}function dt(j){return $("warning",j)}var vt=t(98864);const Et=(0,m.Z)({popoverList:{minWidth:260,maxWidth:400},menuItem:{whiteSpace:"normal"}},{name:"BackstageSupportButton"}),Tt=({icon:j})=>{const z=(0,i.q)();var q;const st=j&&(q=z.getSystemIcon(j))!==null&&q!==void 0?q:_;return(0,o.jsx)(st,{})},gt=({link:j})=>{var z;return(0,o.jsx)(vt.rU,{to:j.url,children:(z=j.title)!==null&&z!==void 0?z:j.url})},xt=({item:j})=>{var z;return(0,o.jsxs)(A.Z,{children:[(0,o.jsx)(c.Z,{children:(0,o.jsx)(Tt,{icon:j.icon})}),(0,o.jsx)(u.Z,{primary:j.title,secondary:(z=j.links)===null||z===void 0?void 0:z.reduce((q,st,it)=>[...q,it>0&&(0,o.jsx)("br",{},it),(0,o.jsx)(gt,{link:st},st.url)],[])})]})};function Q(j){const{title:z,items:q,children:st}=j,{items:it}=(0,R.v)(),[at,nt]=(0,M.useState)(!1),[St,G]=(0,M.useState)(null),H=Et(),ut=(0,g.Z)(bt=>bt.breakpoints.down("sm")),ht=bt=>{G(bt.currentTarget),nt(!0)},mt=()=>{nt(!1)};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.Z,{display:"flex",ml:1,children:ut?(0,o.jsx)(p.Z,{color:"primary",size:"small",onClick:ht,"data-testid":"support-button","aria-label":"Support",children:(0,o.jsx)(_,{})}):(0,o.jsx)(S.Z,{"data-testid":"support-button","aria-label":"Support",color:"primary",onClick:ht,startIcon:(0,o.jsx)(_,{}),children:"Support"})}),(0,o.jsxs)(O.ZP,{"data-testid":"support-button-popover",open:at,anchorEl:St,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},onClose:mt,children:[(0,o.jsxs)(x.Z,{className:H.popoverList,autoFocusItem:Boolean(St),children:[z&&(0,o.jsx)(A.Z,{alignItems:"flex-start",className:H.menuItem,children:(0,o.jsx)(b.Z,{variant:"subtitle1",children:z})}),M.Children.map(st,(bt,jt)=>(0,o.jsx)(A.Z,{alignItems:"flex-start",className:H.menuItem,children:bt},`child-${jt}`)),(q!=null?q:it).map((bt,jt)=>(0,o.jsx)(xt,{item:bt},`item-${jt}`))]}),(0,o.jsx)(v.Z,{children:(0,o.jsx)(S.Z,{color:"primary",onClick:mt,"aria-label":"Close",children:"Close"})})]})]})}},34378:function(J,T,t){"use strict";t.d(T,{i:function(){return at}});var o=t(52322),i=t(67222),d=t(62774),S=t(61837),v=t(15459),p=t(79692),c=t(60364),u=t(90436),A=t(21070),x=t(90324),O=t(98281),m=t(48049),b=t(51209),g=t(33375),M=t(44233),R=t(27604),P=t(36444),$=t(37971),L=t(59709),y=t(17373),Z=t(3702),V=t(93111),et=t(76635),Y=t(2784),K=t(77277),k=t(35879);const _=(0,p.Z)(G=>({root:{height:"100%",width:"315px",display:"flex",flexDirection:"column",marginRight:G.spacing(3)},value:{fontWeight:"bold",fontSize:18},header:{display:"flex",alignItems:"center",height:G.spacing(7.5),justifyContent:"space-between",borderBottom:`1px solid ${G.palette.grey[500]}`},filters:{display:"flex",flexDirection:"column","& > *":{marginTop:G.spacing(2)}}}),{name:"BackstageTableFilters"}),rt=G=>{var H;const ut=_(),{onChangeFilters:ht}=G,[mt,bt]=(0,Y.useState)({...G.selectedFilters}),[jt,Jt]=(0,Y.useState)(!1),Wt=()=>{bt({}),Jt(Ht=>!Ht)};return(0,Y.useEffect)(()=>{ht(mt)},[mt,ht]),(0,o.jsxs)(d.Z,{className:ut.root,children:[(0,o.jsxs)(d.Z,{className:ut.header,children:[(0,o.jsx)(d.Z,{className:ut.value,children:"Filters"}),(0,o.jsx)(K.Z,{color:"primary",onClick:Wt,children:"Clear all"})]}),(0,o.jsx)(d.Z,{className:ut.filters,children:((H=G.filters)===null||H===void 0?void 0:H.length)&&G.filters.map(Ht=>(0,o.jsx)(k.H,{triggerReset:jt,...Ht.element,selected:mt[Ht.element.label],onChange:Dt=>bt({...mt,[Ht.element.label]:Dt})},Ht.element.label))})]})};var dt=t(4614);function vt(G){return(0,o.jsx)("tbody",{"data-testid":"loading-indicator",children:(0,o.jsx)("tr",{children:(0,o.jsx)("td",{colSpan:G.colSpan,children:(0,o.jsx)(d.Z,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",minHeight:"15rem"},children:(0,o.jsx)(dt.Z,{size:"5rem"})})})})})}const Et={Add:(0,Y.forwardRef)((G,H)=>(0,o.jsx)(A.Z,{...G,ref:H})),Check:(0,Y.forwardRef)((G,H)=>(0,o.jsx)(O.Z,{...G,ref:H})),Clear:(0,Y.forwardRef)((G,H)=>(0,o.jsx)(g.Z,{...G,ref:H})),Delete:(0,Y.forwardRef)((G,H)=>(0,o.jsx)(M.Z,{...G,ref:H})),DetailPanel:(0,Y.forwardRef)((G,H)=>(0,o.jsx)(b.Z,{...G,ref:H})),Edit:(0,Y.forwardRef)((G,H)=>(0,o.jsx)(R.Z,{...G,ref:H})),Export:(0,Y.forwardRef)((G,H)=>(0,o.jsx)(Z.Z,{...G,ref:H})),Filter:(0,Y.forwardRef)((G,H)=>(0,o.jsx)(P.Z,{...G,ref:H})),FirstPage:(0,Y.forwardRef)((G,H)=>(0,o.jsx)($.Z,{...G,ref:H})),LastPage:(0,Y.forwardRef)((G,H)=>(0,o.jsx)(L.Z,{...G,ref:H})),NextPage:(0,Y.forwardRef)((G,H)=>(0,o.jsx)(b.Z,{...G,ref:H})),PreviousPage:(0,Y.forwardRef)((G,H)=>(0,o.jsx)(m.Z,{...G,ref:H})),ResetSearch:(0,Y.forwardRef)((G,H)=>(0,o.jsx)(g.Z,{...G,ref:H})),Search:(0,Y.forwardRef)((G,H)=>(0,o.jsx)(P.Z,{...G,ref:H})),SortArrow:(0,Y.forwardRef)((G,H)=>(0,o.jsx)(x.Z,{...G,ref:H})),ThirdStateCheck:(0,Y.forwardRef)((G,H)=>(0,o.jsx)(y.Z,{...G,ref:H})),ViewColumn:(0,Y.forwardRef)((G,H)=>(0,o.jsx)(V.Z,{...G,ref:H}))};function Tt(G,H){const ut=H.split(".");let ht=G[ut[0]];for(let mt=1;mt<ut.length;++mt){if(ht===void 0)return ht;const bt=ut[mt];ht=ht[bt]}return ht}const gt=(0,v.Z)(G=>({header:{padding:G.spacing(1,2,1,2.5),borderTop:`1px solid ${G.palette.grey.A100}`,borderBottom:`1px solid ${G.palette.grey.A100}`,fontWeight:G.typography.fontWeightBold,position:"static",wordBreak:"normal"}}),{name:"BackstageTableHeader"})(i.W$),xt=(0,v.Z)(G=>({root:{padding:G.spacing(3,0,2.5,2.5)},title:{"& > h6":{fontWeight:G.typography.fontWeightBold}},searchField:{paddingRight:G.spacing(2)}}),{name:"BackstageTableToolbar"})(i.UW),Q=(0,p.Z)(G=>({root:{display:"flex",alignItems:"center",justifyContent:"space-between"},title:{fontWeight:G.typography.fontWeightBold,fontSize:18,whiteSpace:"nowrap"}}),{name:"BackstageTableFiltersContainer"}),j=(0,p.Z)(()=>({root:{display:"flex",alignItems:"start"}}),{name:"BackstageTable"});function z(G,H){return G.map(ut=>{var ht;const mt=(ht=ut.headerStyle)!==null&&ht!==void 0?ht:{};let bt=ut.cellStyle||{};if(ut.highlight)if(mt.color=H.palette.textContrast,typeof bt=="object")bt.fontWeight=H.typography.fontWeightBold;else{const jt=bt;bt=(Jt,Wt,Ht)=>({...jt(Jt,Wt,Ht),fontWeight:H.typography.fontWeightBold})}return{...ut,headerStyle:mt,cellStyle:bt}})}function q(G,H){return(0,et.transform)(G,(ut,ht,mt)=>{(0,et.isEqual)(ht,H[mt])||(ut[mt]=ht)})}const st={search:"",filtersOpen:!1,filters:{}};function it(G){const{toolbarRef:H,setSearch:ut,hasFilters:ht,selectedFiltersLength:mt,toggleFilters:bt}=G,jt=Q(),Jt=(0,Y.useCallback)(Wt=>{G.onSearchChanged(Wt),ut(Wt)},[G,ut]);return ht?(0,o.jsxs)(d.Z,{className:jt.root,children:[(0,o.jsxs)(d.Z,{className:jt.root,children:[(0,o.jsx)(S.Z,{onClick:bt,"aria-label":"filter list",children:(0,o.jsx)(P.Z,{})}),(0,o.jsxs)(u.Z,{className:jt.title,children:["Filters (",mt,")"]})]}),(0,o.jsx)(xt,{...G,ref:H,onSearchChanged:Jt})]}):(0,o.jsx)(xt,{...G,ref:H,onSearchChanged:Jt})}function at(G){const{data:H,columns:ut,emptyContent:ht,options:mt,title:bt,subtitle:jt,localization:Jt,filters:Wt,initialState:Ht,onStateChange:Dt,components:Mt,isLoading:Gt,...ee}=G,re=j(),qt=(0,c.Z)(),de={...st,...Ht},[Ie,Ge]=(0,Y.useState)(de.filtersOpen),_e=(0,Y.useCallback)(()=>Ge(Se=>!Se),[Ge]),[xe,qe]=(0,Y.useState)(de.filters),[Ve,Ye]=(0,Y.useState)(de.search);(0,Y.useEffect)(()=>{if(Dt){const Se=q({search:Ve,filtersOpen:Ie,filters:xe},st);Dt(Se)}},[Ve,Ie,xe,Dt]);const se=(0,Y.useCallback)(Se=>{var Ue;return(Ue=ut.find($e=>$e.title===Se))===null||Ue===void 0?void 0:Ue.field},[ut]),sn=(0,Y.useMemo)(()=>{if(typeof H=="function"||!xe)return H;const Se=Object.values(xe);return H&&Se.flat().length?H.filter($e=>!!Object.entries(xe).filter(([,U])=>!!U.length).every(([U,h])=>{const I=Tt($e,se(U));return Array.isArray(I)&&Array.isArray(h)?I.some(W=>h.includes(W)):Array.isArray(I)?I.includes(h):Array.isArray(h)?h.includes(I):I===h})):H},[H,xe,se]),Pe=Object.values(xe).flat().length,tn=!!(Wt!=null&&Wt.length),an=(0,Y.useCallback)(Se=>(0,o.jsx)(it,{setSearch:Ye,hasFilters:tn,selectedFiltersLength:Pe,toggleFilters:_e,...Se}),[_e,tn,Pe,Ye]),ie=typeof H!="function"&&H.length===0,Ne=ut.length,ke=(0,Y.useMemo)(()=>nt({hasNoRows:ie,emptyContent:ht,columnCount:Ne,loading:Gt}),[ie,ht,Ne,Gt]);return(0,o.jsxs)(d.Z,{className:re.root,children:[Ie&&H&&typeof H!="function"&&(Wt==null?void 0:Wt.length)&&(0,o.jsx)(rt,{filters:St(Wt,H,ut),selectedFilters:xe,onChangeFilters:qe}),(0,o.jsx)(i.ZP,{components:{Header:gt,Body:ke,Toolbar:an,...Mt},options:{headerStyle:{textTransform:"uppercase"},...mt},columns:z(ut,qt),icons:Et,title:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(u.Z,{variant:"h5",component:"h2",children:bt}),jt&&(0,o.jsx)(u.Z,{color:"textSecondary",variant:"body1",children:jt})]}),data:sn,style:{width:"100%"},localization:{toolbar:{searchPlaceholder:"Filter",searchTooltip:"Filter"},...Jt},...ee})]})}at.icons=Object.freeze(Et);function nt({columnCount:G,emptyContent:H,hasNoRows:ut,loading:ht}){return mt=>ht?(0,o.jsx)(vt,{colSpan:G}):H&&ut?(0,o.jsx)("tbody",{children:(0,o.jsx)("tr",{children:(0,o.jsx)("td",{colSpan:G,children:H})})}):(0,o.jsx)(i.os,{...mt})}function St(G,H,ut){const ht=bt=>{const jt=new Set,Jt=Wt=>{Wt!=null&&jt.add(Wt)};return H&&H.forEach(Wt=>{var Ht;const Dt=Tt(Wt,(Ht=ut.find(Mt=>Mt.title===bt))===null||Ht===void 0?void 0:Ht.field);Array.isArray(Dt)?Dt.forEach(Jt):Jt(Dt)}),jt},mt=bt=>({placeholder:"All results",label:bt.column,multiple:bt.type==="multiple-select",items:[...ht(bt.column)].sort().map(jt=>({label:jt,value:jt}))});return G.map(bt=>({type:bt.type,element:mt(bt)}))}},538:function(J,T,t){"use strict";t.d(T,{G:function(){return y}});var o=t(52322),i=t(41128),d=t(79692),S=t(27616),v=t(8284),p=t(70660),c=t(60905),u=t(90436),A=t(91750),x=t(38016),O=t(2784),m=t(78527);const b=(Z,V)=>(V.palette.type==="light"?i._j:i.$n)(V.palette[Z].light,.6),g=(Z,V)=>(V.palette.type==="light"?i.$n:i._j)(V.palette[Z].light,.9),M=(0,d.Z)(Z=>({root:{marginRight:Z.spacing(1),fill:({severity:V})=>b(V,Z)}})),R=({severity:Z})=>{const V=M({severity:Z});return(0,o.jsx)(A.Z,{classes:V})},P=({severity:Z})=>{const V=M({severity:Z});return(0,o.jsx)(x.Z,{classes:V})},$=(0,d.Z)(Z=>({panel:{backgroundColor:({severity:V})=>g(V,Z),color:({severity:V})=>b(V,Z),verticalAlign:"middle"},summary:{display:"flex",flexDirection:"row"},summaryText:{color:({severity:V})=>b(V,Z),fontWeight:Z.typography.fontWeightBold},markdownContent:{"& p":{display:"inline"}},message:{width:"100%",display:"block",color:({severity:V})=>b(V,Z),backgroundColor:({severity:V})=>g(V,Z)},details:{width:"100%",display:"block",color:Z.palette.textContrast,backgroundColor:Z.palette.background.default,border:`1px solid ${Z.palette.border}`,padding:Z.spacing(2),fontFamily:"sans-serif"}}),{name:"BackstageWarningPanel"}),L=Z=>Z.charAt(0).toLocaleUpperCase("en-US")+Z.slice(1);function y(Z){const{severity:V="warning",title:et,titleFormat:Y,message:K,children:k,defaultExpanded:_}=Z,rt=$({severity:V}),dt=L(V)+(et?`: ${et}`:"");return(0,o.jsxs)(S.Z,{defaultExpanded:_!=null?_:!1,className:rt.panel,role:"alert",children:[(0,o.jsxs)(v.Z,{expandIcon:(0,o.jsx)(P,{severity:V}),className:rt.summary,children:[(0,o.jsx)(R,{severity:V}),(0,o.jsx)(u.Z,{className:rt.summaryText,variant:"subtitle1",children:Y==="markdown"?(0,o.jsx)(m.S,{content:dt,className:rt.markdownContent}):dt})]}),(K||k)&&(0,o.jsx)(p.Z,{children:(0,o.jsxs)(c.Z,{container:!0,children:[K&&(0,o.jsx)(c.Z,{item:!0,xs:12,children:(0,o.jsx)(u.Z,{className:rt.message,variant:"body1",children:K})}),k&&(0,o.jsx)(c.Z,{item:!0,xs:12,className:rt.details,children:k})]})})]})}},77770:function(J,T,t){"use strict";t.d(T,{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 p=(0,o.I_)().get(i.D),c=p==null?void 0:p.getOptionalConfig("app.support");return c?{url:c.getString("url"),items:c.getConfigArray("items").flatMap(u=>{var A;return{title:u.getString("title"),icon:u.getOptionalString("icon"),links:((A=u.getOptionalConfigArray("links"))!==null&&A!==void 0?A:[]).flatMap(x=>({url:x.getString("url"),title:x.getString("title")}))}})}:d}},42398:function(J,T,t){"use strict";t.d(T,{V:function(){return c}});var o=t(52322),i=t(79692),d=t(72779),S=t.n(d),v=t(2784);const p=(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:A,stretch:x,noPadding:O,children:m,...b}=u,g=p();return(0,o.jsx)("article",{...b,className:S()(g.root,A,{[g.stretch]:x,[g.noPadding]:O}),children:m})}},30706:function(J,T,t){"use strict";t.d(T,{y:function(){return A}});var o=t(52322),i=t(62774),d=t(79692),S=t(90436),v=t(2784),p=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 A(x){const{description:O,title:m,titleComponent:b=void 0,children:g,textAlign:M="left"}=x,R=c({textAlign:M})(),P=b||(0,o.jsx)(u,{title:m,className:R.title});return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(p.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:g})]})]})}},87435:function(J,T,t){"use strict";t.d(T,{m:function(){return b}});var o=t(52322),i=t(60905),d=t(79692),S=t(90436),v=t(2784),p=t(73557),c=t(98864),u=t(77770),A=t.p+"static/mic-drop.fe3ef4d0..svg";const x=(0,d.Z)(g=>({micDrop:{maxWidth:"60%",bottom:g.spacing(2),right:g.spacing(2),[g.breakpoints.down("xs")]:{maxWidth:"96%",bottom:"unset",right:"unset",margin:g.spacing(10,"auto",4)}}}),{name:"BackstageErrorPageMicDrop"}),O=()=>{const g=x();return(0,o.jsx)("img",{src:A,className:g.micDrop,alt:"Girl dropping mic from her hands"})},m=(0,d.Z)(g=>({container:{padding:g.spacing(8),[g.breakpoints.down("xs")]:{padding:g.spacing(2)}},title:{paddingBottom:g.spacing(5),[g.breakpoints.down("xs")]:{paddingBottom:g.spacing(4),fontSize:g.typography.h3.fontSize}},subtitle:{color:g.palette.textSubtle}}),{name:"BackstageErrorPage"});function b(g){const{status:M,statusMessage:R,additionalInfo:P,supportUrl:$}=g,L=m(),y=(0,p.s0)(),Z=(0,u.v)();return(0,o.jsxs)(i.Z,{container:!0,spacing:0,className:L.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:L.subtitle,children:["ERROR ",M,": ",R]}),(0,o.jsx)(S.Z,{variant:"body1",className:L.subtitle,children:P}),(0,o.jsx)(S.Z,{variant:"h2",className:L.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:()=>y(-1),children:"Go back"}),"... or please"," ",(0,o.jsx)(c.rU,{to:$||Z.url,children:"contact support"})," if you think this is a bug."]})]}),(0,o.jsx)(O,{})]})}},48037:function(J,T,t){"use strict";t.d(T,{h:function(){return K}});var o=t(52322),i=t(44394),d=t(6542),S=t(62774),v=t(60905),p=t(79692),c=t(80030),u=t(90436),A=t(2784),x=t(18671),O=t(98864),m=t(16173),b=t(11776),g=t(38402),M=t(79784),R=t(15459);const P=(0,R.Z)({root:{textDecoration:"underline",cursor:"pointer"}},{name:"BackstageBreadcrumbsClickableText"})(u.Z),$=(0,R.Z)({root:{textDecoration:"underline",color:"inherit"}},{name:"BackstageBreadcrumbsStyledBox"})(S.Z);function L(k){const{children:_,...rt}=k,[dt,vt]=A.useState(null),Et=A.Children.toArray(_),[Tt,gt,...xt]=Et,Q=xt.length?xt.pop():Et[Et.length-1],j=Et.length>3,z=it=>{vt(it.currentTarget)},q=()=>{vt(null)},st=Boolean(dt);return(0,o.jsxs)(A.Fragment,{children:[(0,o.jsxs)(m.Z,{"aria-label":"breadcrumb",...rt,children:[Et.length>1&&(0,o.jsx)($,{clone:!0,children:Tt}),Et.length>2&&(0,o.jsx)($,{clone:!0,children:gt}),j&&(0,o.jsx)(P,{onClick:z,children:"..."}),(0,o.jsx)(S.Z,{style:{fontStyle:"italic"},children:Q})]}),(0,o.jsx)(M.ZP,{open:st,anchorEl:dt,onClose:q,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},children:(0,o.jsx)(b.Z,{children:xt.map((it,at)=>(0,o.jsx)(g.Z,{button:!0,children:(0,o.jsx)($,{clone:!0,children:it})},at))})})]})}var y=t(44409);const Z=(0,p.Z)(k=>({header:{gridArea:"pageHeader",padding:k.spacing(3),width:"100%",boxShadow:k.shadows[4],position:"relative",zIndex:100,display:"flex",flexDirection:"row",alignItems:"center",backgroundImage:k.page.backgroundImage,backgroundPosition:"center",backgroundSize:"cover",[k.breakpoints.down("sm")]:{flexWrap:"wrap"}},leftItemsBox:{maxWidth:"100%",flexGrow:1},rightItemsBox:{width:"auto",alignItems:"center"},title:{color:k.page.fontColor,wordBreak:"break-word",fontSize:k.typography.h3.fontSize,marginBottom:0},subtitle:{color:k.page.fontColor,opacity:.8,display:"inline-block",marginTop:k.spacing(1),maxWidth:"75ch"},type:{textTransform:"uppercase",fontSize:11,opacity:.8,marginBottom:k.spacing(1),color:k.page.fontColor},breadcrumb:{color:k.page.fontColor},breadcrumbType:{fontSize:"inherit",opacity:.7,marginRight:-k.spacing(.3),marginBottom:k.spacing(.3)},breadcrumbTitle:{fontSize:"inherit",marginLeft:-k.spacing(.3),marginBottom:k.spacing(.3)}}),{name:"BackstageHeader"}),V=({type:k,typeLink:_,classes:rt,pageTitle:dt})=>k?_?(0,o.jsxs)(L,{className:rt.breadcrumb,children:[(0,o.jsx)(O.rU,{to:_,children:k}),(0,o.jsx)(u.Z,{children:dt})]}):(0,o.jsx)(u.Z,{className:rt.type,children:k}):null,et=({pageTitle:k,classes:_,tooltip:rt})=>{const{contentRef:dt}=(0,y.r)(),vt=(0,o.jsx)(u.Z,{ref:dt,tabIndex:-1,className:_.title,variant:"h1",children:k});return rt?(0,o.jsx)(c.ZP,{title:rt,placement:"top-start",children:vt}):vt},Y=({classes:k,subtitle:_})=>_?typeof _!="string"?(0,o.jsx)(o.Fragment,{children:_}):(0,o.jsx)(u.Z,{className:k.subtitle,variant:"subtitle2",component:"span",children:_}):null;function K(k){const{children:_,pageTitleOverride:rt,style:dt,subtitle:vt,title:Et,tooltip:Tt,type:gt,typeLink:xt}=k,Q=Z(),z=(0,i.h_)(d.D).getOptionalString("app.title")||"Backstage",q=rt||Et,st=Et||rt,it=`${q} | %s | ${z}`,at=`${q} | ${z}`;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(x.q,{titleTemplate:it,defaultTitle:at}),(0,o.jsxs)("header",{style:dt,className:Q.header,children:[(0,o.jsxs)(S.Z,{className:Q.leftItemsBox,children:[(0,o.jsx)(V,{classes:Q,type:gt,typeLink:xt,pageTitle:st}),(0,o.jsx)(et,{classes:Q,pageTitle:st,tooltip:Tt}),(0,o.jsx)(Y,{classes:Q,subtitle:vt})]}),(0,o.jsx)(v.Z,{container:!0,className:Q.rightItemsBox,spacing:4,children:_})]})]})}},67880:function(J,T,t){"use strict";t.d(T,{T:function(){return p}});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 p(c){const{themeId:u,children:A}=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:A})})}},32166:function(J,T,t){"use strict";t.d(T,{g:function(){return v}});var o=t(52322),i=t(2784),d=t(48037),S=t(67880);function v(p){const{themeId:c,children:u,...A}=p;return(0,o.jsxs)(S.T,{themeId:c,children:[(0,o.jsx)(d.h,{...A}),u]})}},44409:function(J,T,t){"use strict";t.d(T,{t:function(){return m},r:function(){return b}});var o=t(52322),i=t(62774),d=t(79692),S=t(41156),v=t(2784),p=t(76921),c;(function(g){g.SIDEBAR_PIN_STATE="sidebarPinState"})(c||(c={}));const u={getSidebarPinState(){let g;try{g=JSON.parse(window.localStorage.getItem("sidebarPinState")||"true")}catch{return!0}return!!g},setSidebarPinState(g){return window.localStorage.setItem("sidebarPinState",JSON.stringify(g))}};var A=t(93539);const x=(0,d.Z)(g=>({root:{width:"100%",transition:"padding-left 0.1s ease-out",isolation:"isolate",[g.breakpoints.up("sm")]:{paddingLeft:M=>M.isPinned?M.sidebarConfig.drawerWidthOpen:M.sidebarConfig.drawerWidthClosed},[g.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(g){const[M,R]=(0,v.useState)(()=>u.getSidebarPinState()),{sidebarConfig:P}=(0,v.useContext)(p.kG),$=(0,v.useRef)(null),L=(0,v.useMemo)(()=>({content:{contentRef:$}}),[$]);(0,v.useEffect)(()=>{u.setSidebarPinState(M)},[M]);const y=(0,S.Z)(et=>et.breakpoints.down("xs"),{noSsr:!0}),Z=()=>R(!M),V=x({isPinned:M,sidebarConfig:P});return(0,o.jsx)(A.lE,{value:{isPinned:M,toggleSidebarPinState:Z,isMobile:y},children:(0,o.jsx)(O.Provider,{value:L,children:(0,o.jsx)(i.Z,{className:V.root,children:g.children})})})}function b(){const{content:g}=(0,v.useContext)(O);return{focusContent:(0,v.useCallback)(()=>{var R,P;g==null||(P=g.contentRef)===null||P===void 0||(R=P.current)===null||R===void 0||R.focus()},[g]),contentRef:g==null?void 0:g.contentRef}}},93539:function(J,T,t){"use strict";t.d(T,{Pf:function(){return A},lE:function(){return u}});var o=t(52322),i=t(29651),d=t(68993),S=t(2784);const v={isPinned:!0,toggleSidebarPinState:()=>{},isMobile:!1},p=(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)(p.Provider,{value:m,children:(0,o.jsx)(c.Provider,{value:(0,d.E)({1:m}),children:O})})}const A=()=>{const x=(0,S.useContext)(c),O=(0,S.useContext)(p);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(J,T,t){"use strict";t.d(T,{$E:function(){return p},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},p=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}),A="@backstage/core/sidebar-intro-dismissed",x=(0,o.createContext)({sidebarConfig:v,submenuConfig:c}),O=(0,o.createContext)({isHoveredOn:!1,setIsHoveredOn:()=>{}})},72388:function(J,T,t){"use strict";t.d(T,{Os:function(){return p},fC:function(){return c}});var o=t(52322),i=t(29651),d=t(68993),S=t(2784);const v=(0,i.CT)("analytics-context"),p=()=>{const A=(0,S.useContext)(v);if(A===void 0)return{routeRef:"unknown",pluginId:"root",extension:"App"};const x=A.atVersion(1);if(x===void 0)throw new Error("No context found for version 1.");return x},c=A=>{const{attributes:x,children:O}=A,b={...p(),...x},g=(0,d.E)({1:b});return(0,o.jsx)(v.Provider,{value:g,children:O})};function u(A,x){const O=m=>_jsx(c,{attributes:x,children:_jsx(A,{...m})});return O.displayName=`WithAnalyticsContext(${A.displayName||A.name||"Component"})`,O}},7355:function(J,T,t){"use strict";t.d(T,{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:A,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(b){console.warn("Error during analytics event capture. %o",b)}d.mostRecentGatheredNavigation=void 0,d.mostRecentRoutableExtensionRender=void 0}if(c==="navigate"&&O==="gathered"&&m.pluginId==="root"){d.mostRecentGatheredNavigation={action:c,subject:u,value:A,attributes:x,context:m};return}try{this.analyticsApi.captureEvent({action:c,subject:u,value:A,attributes:x,context:m})}catch(b){console.warn("Error during analytics event capture. %o",b)}}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(J,T,t){"use strict";t.d(T,{z:function(){return c}});var o=t(72388),i=t(44394),d=t(86386),S=t(2784),v=t(7355);function p(){try{return(0,i.h_)(d.v)}catch{return{captureEvent:()=>{}}}}function c(){const u=(0,S.useRef)(null),A=(0,o.Os)(),x=p();function O(){return u.current===null&&(u.current=new v.f(x)),u.current}const m=O();return m.setContext(A),m}},78847:function(J,T,t){"use strict";t.d(T,{$:function(){return i}});var o=t(95965);const i=(0,o.T)({id:"core.alert"})},86386:function(J,T,t){"use strict";t.d(T,{v:function(){return i}});var o=t(95965);const i=(0,o.T)({id:"core.analytics"})},6542:function(J,T,t){"use strict";t.d(T,{D:function(){return i}});var o=t(95965);const i=(0,o.T)({id:"core.config"})},96727:function(J,T,t){"use strict";t.d(T,{N:function(){return i}});var o=t(95965);const i=(0,o.T)({id:"core.discovery"})},58513:function(J,T,t){"use strict";t.d(T,{V:function(){return i}});var o=t(95965);const i=(0,o.T)({id:"core.error"})},82723:function(J,T,t){"use strict";t.d(T,{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(J,T,t){"use strict";t.d(T,{g:function(){return i}});var o=t(95965);const i=(0,o.T)({id:"core.fetch"})},77186:function(J,T,t){"use strict";t.d(T,{$:function(){return i}});var o=t(95965);const i=(0,o.T)({id:"core.identity"})},96253:function(J,T,t){"use strict";t.d(T,{o:function(){return i}});var o=t(95965);const i=(0,o.T)({id:"core.translation"})},95965:function(J,T,t){"use strict";t.d(T,{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(J,T,t){"use strict";t.d(T,{n:function(){return o}});function o(i,d){return"id"in i?{api:i,deps:{},factory:()=>d}:i}},44394:function(J,T,t){"use strict";t.d(T,{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 A=S().get(c);if(!A)throw new Error(`No implementation available for ${c}`);return A}function p(c){return function(A){const x=m=>{const b=S(),g={};for(const M in c)if(c.hasOwnProperty(M)){const R=c[M],P=b.get(R);if(!P)throw new Error(`No implementation available for ${R}`);g[M]=P}return _jsx(A,{...m,...g})},O=A.displayName||A.name||"Component";return x.displayName=`withApis(${O})`,x}}},80851:function(J,T,t){"use strict";t.d(T,{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(J,T,t){"use strict";t.d(T,{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(p,c,u){const A=p;var x;let O=(x=A[d])!==null&&x!==void 0?x:i.get(p);if(O||(O={map:new Map},Object.defineProperty(A,d,{enumerable:!1,configurable:!0,writable:!1,value:O}),i.set(p,O)),O.map.has(c)){const m=p.displayName||p.name;throw new Error(`Attempted to attach duplicate data "${c}" to component "${m}"`)}O.map.set(c,u)}function v(p,c){if(!p)return;const u=p.type;if(!u)return;var A;const x=(A=u[d])!==null&&A!==void 0?A:i.get(u);if(x)return x.map.get(c)}},82963:function(J,T,t){"use strict";t.d(T,{CO:function(){return m},YO:function(){return b},P4:function(){return O}});var o=t(52322),i=t(2784),d=t(62369),S=t(72388),v=t(80851),p=t(37321),c=t(62584),u=t(87612);class A extends i.Component{static getDerivedStateFromError(M){return{error:M}}render(){const{error:M}=this.state,{app:R,plugin:P}=this.props,{ErrorBoundaryFallback:$}=R.getComponents();return M?(0,o.jsx)($,{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(g){const{component:M,mountPoint:R,name:P}=g;return b({component:{lazy:()=>M().then($=>{const L=Z=>{const V=(0,d.z)();try{(0,p.t)(R)}catch(et){if(typeof et=="object"&&et!==null){const{message:Y}=et;if(typeof Y=="string"&&Y.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 et}return(0,i.useEffect)(()=>{V.captureEvent(x.h,"")},[V]),(0,o.jsx)($,{...Z})},y=P||$.displayName||$.name||"LazyComponent";return L.displayName=`RoutableExtension(${y})`,L},$=>y=>{const Z=(0,v.q)(),{BootErrorPage:V}=Z.getComponents();return(0,o.jsx)(V,{step:"load-chunk",error:$})})},data:{"core.mountPoint":R},name:P})}function m(g){const{component:M,name:R}=g;return b({component:M,name:R})}function b(g){const{data:M={},name:R}=g;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 g.component){const L=g.component.lazy;P=(0,i.lazy)(()=>L().then(y=>({default:y})))}else P=g.component.sync;const $=R||P.displayName||P.name||"Component";return{expose(L){const y=Z=>{const V=(0,v.q)(),{Progress:et}=V.getComponents(),Y=M==null?void 0:M["core.mountPoint"];return(0,o.jsx)(i.Suspense,{fallback:(0,o.jsx)(et,{}),children:(0,o.jsx)(A,{app:V,plugin:L,children:(0,o.jsx)(S.fC,{attributes:{pluginId:L.getId(),...R&&{extension:R},...Y&&{routeRef:Y.id}},children:(0,o.jsx)(P,{...Z})})})})};(0,c.R)(y,"core.plugin",L),(0,c.R)(y,"core.extensionName",R);for(const[Z,V]of Object.entries(M))(0,c.R)(y,Z,V);return y.displayName=`Extension(${$})`,y}}}},2532:function(J,T,t){"use strict";t.d(T,{v:function(){return u}});var o=t(87612),i=t(2784),d=t(62584),S=t(44394),v=t(82723);function p(A,x,O,m){return i.Children.toArray(A).flatMap(b=>{if(!(0,i.isValidElement)(b))return[];if(b.type===i.Fragment)return p(b.props.children,x,O,m);if((0,d.I)(b,"core.featureFlagged")){const g=b.props;return("with"in g?x.isActive(g.with):!x.isActive(g.without))?p(b.props.children,x,O,m):[]}if(O===void 0||O(b))return[b];if(m)throw new Error(m);return p(b.props.children,x,O,m)})}class c{selectByComponentData(x){const O=p(this.node,this.featureFlagsApi,m=>(0,d.I)(m,x.key)!==void 0,x.withStrictError);return new c(O,this.featureFlagsApi)}findComponentData(x){return p(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 p(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(A,x,O=[]){const m=(0,S.h_)(v.W),b=new c(A,m);return(0,i.useMemo)(()=>x(b),[A,...O])}},15006:function(J,T,t){"use strict";t.d(T,{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,p;return(p=(v=this.config.featureFlags)===null||v===void 0?void 0:v.slice())!==null&&p!==void 0?p:[]}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(J,T,t){"use strict";t.d(T,{N:function(){return p}});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,A){(0,o._)(this,"id",void 0),(0,o._)(this,"params",void 0),(0,o._)(this,S,void 0),this.id=u,this.params=A,this[d]="absolute"}}function p(c){var u;return new v(c.id,(u=c.params)!==null&&u!==void 0?u:[])}},92918:function(J,T,t){"use strict";t.d(T,{K:function(){return i}});var o=t(96087);const i=(0,o.u)("route-ref-type",()=>Symbol("route-ref-type"))},37321:function(J,T,t){"use strict";t.d(T,{t:function(){return S}});var o=t(2784),i=t(73557),d=t(29651);function S(v){const{pathname:p}=(0,i.TH)(),c=(0,d.Vt)("routing-context");if(!c)throw new Error("Routing context is not available");const u=c.atVersion(1),A=(0,o.useMemo)(()=>u&&u.resolve(v,{pathname:p}),[u,v,p]);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(!A&&!x)throw new Error(`No path for ${v}`);return A}},35304:function(J,T,t){"use strict";t.d(T,{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 p(b){const g=new Array;function M(R,P){for(const[$,L]of Object.entries(R))typeof L=="string"?g.push([P+$,L]):M(L,`${P}${$}.`)}return M(b,""),Object.fromEntries(g)}var c=new WeakMap,u=new WeakMap,A=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(g){(0,d._)(this,A,g)}getDefaultResource(){return(0,o._)(this,A)}toString(){return`TranslationRef{id=${this.id}}`}constructor(g){(0,i._)(this,c,{writable:!0,value:void 0}),(0,i._)(this,u,{writable:!0,value:void 0}),(0,i._)(this,A,{writable:!0,value:void 0}),(0,S._)(this,"$$type","@backstage/TranslationRef"),(0,S._)(this,"version","v1"),(0,d._)(this,c,g.id),(0,d._)(this,u,p(g.messages))}}function O(b){const g=new x(b);return b.translations&&g.setDefaultResource((0,v.N)({ref:g,translations:b.translations})),g}function m(b){const g=b;if(g.$$type!=="@backstage/TranslationRef")throw new Error(`Invalid translation ref, bad type '${g.$$type}'`);if(g.version!=="v1")throw new Error(`Invalid translation ref, bad version '${g.version}'`);return g}},18015:function(J,T,t){"use strict";t.d(T,{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(p=>{const c=p.default;return{messages:(c==null?void 0:c.$$type)==="@backstage/TranslationMessages"?c.messages:c}})}))}}},41385:function(J,T,t){"use strict";t.d(T,{V:function(){return S}});var o=t(87612),i=t(48998);async function d(v){try{const c=await v.text();if(c){var p;if(!((p=v.headers.get("content-type"))===null||p===void 0)&&p.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(p){const c=await d(p),u=c.response.statusCode||p.status,A=c.error.name||p.statusText,x=`Request failed with ${u} ${A}`,O=(0,i.Fq)(c.error);return new S({message:x,response:p,data:c,cause:O})}constructor(p){super(p.message),(0,o._)(this,"response",void 0),(0,o._)(this,"body",void 0),(0,o._)(this,"cause",void 0),this.name="ResponseError",this.response=p.response,this.body=p.data,this.cause=p.cause}}},30474:function(J,T,t){"use strict";t.d(T,{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(J,T,t){"use strict";t.d(T,{Fq:function(){return v},n:function(){return p}});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 p(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(J,T,t){"use strict";t.d(T,{a:function(){return Ue},q:function(){return $e}});var o=t(87612),i=t(38264);const d="amazonaws.com";function S(U){const h=U.getOptionalString("endpoint");var I;const W=(I=U.getOptionalBoolean("s3ForcePathStyle"))!==null&&I!==void 0?I:!1;let ct,Ot;if(h){try{const Ut=new URL(h);ct=Ut.host,Ot=Ut.pathname}catch{throw new Error(`invalid awsS3 integration config, endpoint '${h}' is not a valid URL`)}if(Ot!=="/")throw new Error(`invalid awsS3 integration config, endpoints cannot contain path, got '${h}'`)}else ct=d;const Rt=U.getOptionalString("accessKeyId"),ae=U.getOptionalString("secretAccessKey"),te=U.getOptionalString("roleArn"),kt=U.getOptionalString("externalId");return{host:ct,endpoint:h,s3ForcePathStyle:W,accessKeyId:Rt,secretAccessKey:ae,roleArn:te,externalId:kt}}function v(U){const h=U.map(S);return h.some(I=>I.host===d)||h.push({host:d}),h}class p{get type(){return"awsS3"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(h){return(0,i.FI)(h)}resolveEditUrl(h){return h}constructor(h){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=h}}(0,o._)(p,"factory",({config:U})=>{var h;const I=v((h=U.getOptionalConfigArray("integrations.awsS3"))!==null&&h!==void 0?h:[]);return(0,i.gz)(I.map(W=>new p(W)),W=>W.config.host)});var c=t(88412),u=t(52475),A=t(80956);const x="GB";var O=new WeakMap,m=new WeakMap,b=new WeakMap,g=new WeakMap,M=new WeakMap,R=new WeakMap,P=new WeakMap;class ${static fromRepoUrl(h){const I=new URL(h);let W,ct,Ot;const Rt=I.pathname.split("/").map(ge=>decodeURIComponent(ge));if(Rt[2]==="_git"?(W=Rt[1],ct=Ot=Rt[3]):Rt[3]==="_git"?(W=Rt[1],ct=Rt[2],Ot=Rt[4]):Rt[4]==="_git"&&(W=`${Rt[1]}/${Rt[2]}`,ct=Rt[3],Ot=Rt[5]),!W||!ct||!Ot)throw new Error("Azure URL must point to a git repository");var ae;const te=(ae=I.searchParams.get("path"))!==null&&ae!==void 0?ae:void 0;let kt;const Ut=I.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 $(I.origin,W,ct,Ot,te,kt)}toRepoUrl(){let h;return(0,c._)(this,b)===(0,c._)(this,g)?h=(0,c._)(this,P).call(this,(0,c._)(this,m),"_git",(0,c._)(this,g)):h=(0,c._)(this,P).call(this,(0,c._)(this,m),(0,c._)(this,b),"_git",(0,c._)(this,g)),(0,c._)(this,M)&&h.searchParams.set("path",(0,c._)(this,M)),(0,c._)(this,R)&&h.searchParams.set("version",x+(0,c._)(this,R)),h.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 h=(0,c._)(this,P).call(this,(0,c._)(this,m),(0,c._)(this,b),"_apis","git","repositories",(0,c._)(this,g),"items");return h.searchParams.set("api-version","6.0"),h.searchParams.set("path",(0,c._)(this,M)),(0,c._)(this,R)&&h.searchParams.set("version",(0,c._)(this,R)),h.toString()}toArchiveUrl(){const h=(0,c._)(this,P).call(this,(0,c._)(this,m),(0,c._)(this,b),"_apis","git","repositories",(0,c._)(this,g),"items");return h.searchParams.set("recursionLevel","full"),h.searchParams.set("download","true"),h.searchParams.set("api-version","6.0"),(0,c._)(this,M)&&h.searchParams.set("scopePath",(0,c._)(this,M)),(0,c._)(this,R)&&h.searchParams.set("version",(0,c._)(this,R)),h.toString()}toCommitsUrl(){const h=(0,c._)(this,P).call(this,(0,c._)(this,m),(0,c._)(this,b),"_apis","git","repositories",(0,c._)(this,g),"commits");return h.searchParams.set("api-version","6.0"),(0,c._)(this,R)&&h.searchParams.set("searchCriteria.itemVersion.version",(0,c._)(this,R)),h.toString()}getOwner(){return(0,c._)(this,m)}getProject(){return(0,c._)(this,b)}getRepo(){return(0,c._)(this,g)}getPath(){return(0,c._)(this,M)}getRef(){return(0,c._)(this,R)}constructor(h,I,W,ct,Ot,Rt){(0,u._)(this,O,{writable:!0,value:void 0}),(0,u._)(this,m,{writable:!0,value:void 0}),(0,u._)(this,b,{writable:!0,value:void 0}),(0,u._)(this,g,{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 te=new URL((0,c._)(this,O));return te.pathname=ae.map(kt=>encodeURIComponent(kt)).join("/"),te}}),(0,A._)(this,O,h),(0,A._)(this,m,I),(0,A._)(this,b,W),(0,A._)(this,g,ct),(0,A._)(this,M,Ot),(0,A._)(this,R,Rt)}}const L="dev.azure.com",y=["clientId","clientSecret","tenantId","personalAccessToken"],Z=new Map([["ClientSecret",["clientId","clientSecret","tenantId"]],["ManagedIdentity",["clientId"]],["PersonalAccessToken",["personalAccessToken"]]]);function V(U){for(const h of Z.entries()){const[I,W]=h,ct=y.filter(Ot=>!W.includes(Ot));if(W.every(Ot=>U[Ot]!==void 0)&&ct.every(Ot=>U[Ot]===void 0))return{kind:I,organizations:U.organizations,...W.reduce((Ot,Rt)=>(Ot[Rt]=U[Rt],Ot),{})}}throw new Error("is not a valid credential")}function et(U){var h,I;const W=(I=U.getOptionalString("host"))!==null&&I!==void 0?I:L;let ct=(h=U.getOptionalConfigArray("credentials"))===null||h===void 0?void 0:h.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;ct=(Rt=ct==null?void 0:ct.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;ct=(ae=ct==null?void 0:ct.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 te;if(ct!==void 0){const kt=ct==null?void 0:ct.reduce((Ut,ge,Le)=>{let Zt;try{V(ge)}catch(ne){Zt=ne.message}return Zt!==void 0&&Ut.push(`credential at position ${Le+1} ${Zt}`),Ut},Array.of()).concat(Object.entries(ct.filter(Ut=>Ut.organizations!==void 0&&Ut.organizations.length>0).reduce((Ut,ge,Le)=>{var Zt;return(Zt=ge.organizations)===null||Zt===void 0||Zt.forEach(ne=>{Ut[ne]||(Ut[ne]=[]),Ut[ne].push(Le+1)}),Ut},{})).filter(([Ut,ge])=>ge.length>1).reduce((Ut,[ge,Le])=>(Ut.push(`organization ${ge} is specified multiple times in credentials at positions ${Le.slice(0,Le.length-1).join(", ")} and ${Le[Le.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(te=ct.map(Ut=>V(Ut)),te.some(Ut=>Ut.kind!=="PersonalAccessToken")&&W!==L)throw new Error(`Invalid Azure integration config for ${W}, only personal access tokens can be used with hosts other than ${L}`);if(te.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:te}}function Y(U){const h=U.map(et);return h.some(I=>I.host===L)||h.push({host:L}),h}class K{get type(){return"azure"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(h){const{url:I,base:W}=h;if((0,i.jv)(I))return I;try{const Ot=$.fromRepoUrl(W),Rt=new URL(W);var ct;const ae=new URL(`https://a.com${(ct=Ot.getPath())!==null&&ct!==void 0?ct:""}`),te=new URL(I,ae).pathname;return Rt.searchParams.set("path",te),h.lineNumber&&(Rt.searchParams.set("line",String(h.lineNumber)),Rt.searchParams.set("lineEnd",String(h.lineNumber+1)),Rt.searchParams.set("lineStartColumn","1"),Rt.searchParams.set("lineEndColumn","1")),Rt.toString()}catch{return new URL(I,W).toString()}}resolveEditUrl(h){return h}constructor(h){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=h}}(0,o._)(K,"factory",({config:U})=>{var h;const I=Y((h=U.getOptionalConfigArray("integrations.azure"))!==null&&h!==void 0?h:[]);return(0,i.gz)(I.map(W=>new K(W)),W=>W.config.host)});var k=t(82717),_=t.n(k);const rt="bitbucket.org",dt="https://api.bitbucket.org/2.0";function vt(U){const h=rt,I=dt,W=U.getString("username"),ct=U.getString("appPassword");return{host:h,apiBaseUrl:I,username:W,appPassword:ct}}function Et(U){const h=U.map(vt);return h.length===0&&h.push({host:rt,apiBaseUrl:dt}),h}class Tt{get type(){return"bitbucketCloud"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(h){const I=(0,i.FI)(h);if(h.lineNumber){const W=new URL(I);return W.hash=`lines-${h.lineNumber}`,W.toString()}return I}resolveEditUrl(h){const I=_()(h),W=new URL(h);return W.searchParams.set("mode","edit"),W.searchParams.set("at",I.ref),W.toString()}constructor(h){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=h}}(0,o._)(Tt,"factory",({config:U})=>{var h;const I=Et((h=U.getOptionalConfigArray("integrations.bitbucketCloud"))!==null&&h!==void 0?h:[]);return(0,i.gz)(I.map(W=>new Tt(W)),W=>W.config.host)});var gt=t(76635);const xt="bitbucket.org",Q="https://api.bitbucket.org/2.0";function j(U){var h;const I=(h=U.getOptionalString("host"))!==null&&h!==void 0?h:xt;let W=U.getOptionalString("apiBaseUrl");const ct=U.getOptionalString("token"),Ot=U.getOptionalString("username"),Rt=U.getOptionalString("appPassword");if(!(0,i.bK)(I))throw new Error(`Invalid Bitbucket integration config, '${I}' is not a valid host`);return W?W=(0,gt.trimEnd)(W,"/"):I===xt?W=Q:W=`https://${I}/rest/api/1.0`,{host:I,apiBaseUrl:W,token:ct,username:Ot,appPassword:Rt}}function z(U){const h=U.map(j);return h.some(I=>I.host===xt)||h.push({host:xt,apiBaseUrl:Q}),h}class q{get type(){return"bitbucket"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(h){const I=(0,i.FI)(h);if(!h.lineNumber)return I;const W=new URL(I);return this.integrationConfig.host==="bitbucket.org"?W.hash=`lines-${h.lineNumber}`:W.hash=`${h.lineNumber}`,W.toString()}resolveEditUrl(h){const I=_()(h),W=new URL(h);return W.searchParams.set("mode","edit"),W.searchParams.set("spa","0"),W.searchParams.set("at",I.ref),W.toString()}constructor(h){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=h}}(0,o._)(q,"factory",({config:U})=>{var h,I,W;const ct=z((W=U.getOptionalConfigArray("integrations.bitbucket"))!==null&&W!==void 0?W:[...(h=U.getOptionalConfigArray("integrations.bitbucketCloud"))!==null&&h!==void 0?h:[],...(I=U.getOptionalConfigArray("integrations.bitbucketServer"))!==null&&I!==void 0?I:[]]);return(0,i.gz)(ct.map(Ot=>new q(Ot)),Ot=>Ot.config.host)});function st(U){const h=U.getString("host");let I=U.getOptionalString("apiBaseUrl");const W=U.getOptionalString("token"),ct=U.getOptionalString("username"),Ot=U.getOptionalString("password");if(!(0,i.bK)(h))throw new Error(`Invalid Bitbucket Server integration config, '${h}' is not a valid host`);return I?I=(0,gt.trimEnd)(I,"/"):I=`https://${h}/rest/api/1.0`,{host:h,apiBaseUrl:I,token:W,username:ct,password:Ot}}function it(U){return U.map(st)}class at{get type(){return"bitbucketServer"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(h){const I=(0,i.FI)(h);if(h.lineNumber){const W=new URL(I);return W.hash=h.lineNumber.toString(),W.toString()}return I}resolveEditUrl(h){return h.includes("?")?h.substring(0,h.indexOf("?")):h}constructor(h){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=h}}(0,o._)(at,"factory",({config:U})=>{var h;const I=it((h=U.getOptionalConfigArray("integrations.bitbucketServer"))!==null&&h!==void 0?h:[]);return(0,i.gz)(I.map(W=>new at(W)),W=>W.config.host)});function nt(U){const h=U.getString("host");let I=U.getOptionalString("baseUrl"),W=U.getOptionalString("cloneUrl"),ct=U.getOptionalString("gitilesBaseUrl");const Ot=U.getOptionalString("username"),Rt=U.getOptionalString("password");if((0,i.bK)(h)){if(I&&!(0,i.jv)(I))throw new Error(`Invalid Gerrit integration config, '${I}' 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(ct&&!(0,i.jv)(ct))throw new Error(`Invalid Gerrit integration config, '${ct}' is not a valid gitilesBaseUrl`)}else throw new Error(`Invalid Gerrit integration config, '${h}' is not a valid host`);return I?I=(0,gt.trimEnd)(I,"/"):I=`https://${h}`,ct?ct=(0,gt.trimEnd)(ct,"/"):ct=`https://${h}`,W?W=(0,gt.trimEnd)(W,"/"):W=I,{host:h,baseUrl:I,cloneUrl:W,gitilesBaseUrl:ct,username:Ot,password:Rt}}function St(U){return U.map(nt)}var G=t(48834).lW;const H=")]}'";function ut(U,h){const I=new URL(U.gitilesBaseUrl),W=new URL(h),Ot=W.pathname.substring(W.pathname.startsWith("/a/")?2:0).replace(I.pathname,"").split("/").filter(ge=>!!ge),Rt=Ot.indexOf("+");if(Rt<=0)throw new Error(`Unable to parse project from url: ${h}`);const ae=(0,gt.trimStart)(Ot.slice(0,Rt).join("/"),"/"),te=Ot.indexOf("heads");if(te<=0)throw new Error(`Unable to parse branch from url: ${h}`);const kt=Ot[te+1],Ut=Ot.slice(te+2).join("/");return{branch:kt,filePath:Ut===""?"/":Ut,project:ae}}function ht(U,h,I,W){return`${U.gitilesBaseUrl}/${h}/+/refs/heads/${I}/${(0,gt.trimStart)(W,"/")}`}function mt(U,h,I,W){const ct=W==="/"||W===""?".tar.gz":`/${W}.tar.gz`;return`${jt(U)}/${h}/+archive/refs/heads/${I}${ct}`}function bt(U){return U.password?"/a/":"/"}function jt(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(bt(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 Jt(U,h){const{branch:I,project:W}=ut(U,h);return`${U.baseUrl}${bt(U)}projects/${encodeURIComponent(W)}/branches/${I}`}function Wt(U,h){const{project:I}=ut(U,h);return`${U.cloneUrl}${bt(U)}${I}`}function Ht(U,h){const{branch:I,filePath:W,project:ct}=ut(U,h);return`${U.baseUrl}${bt(U)}projects/${encodeURIComponent(ct)}/branches/${I}/files/${encodeURIComponent(W)}/content`}function Dt(U){return`${U.baseUrl}${bt(U)}projects/`}function Mt(U){const h={};if(!U.password)return h;const I=G.from(`${U.username}:${U.password}`,"utf8");return h.Authorization=`Basic ${I.toString("base64")}`,{headers:h}}async function Gt(U){const h=await U.text();if(h.startsWith(H))try{return JSON.parse(h.slice(H.length))}catch(I){throw new Error(`Invalid response from Gerrit: ${h.slice(0,10)} - ${I}`)}throw new Error(`Gerrit JSON body prefix missing. Found: ${h.slice(0,10)}`)}class ee{get type(){return"gerrit"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(h){const{url:I,base:W,lineNumber:ct}=h;let Ot;if(I.startsWith("/")){const{branch:Rt,project:ae}=ut(this.config,W);return ht(this.config,ae,Rt,I)}return I?Ot=new URL(I,W):Ot=new URL(W),ct&&(Ot.hash=ct.toString()),Ot.toString()}resolveEditUrl(h){return h}constructor(h){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=h}}(0,o._)(ee,"factory",({config:U})=>{var h;const I=St((h=U.getOptionalConfigArray("integrations.gerrit"))!==null&&h!==void 0?h:[]);return(0,i.gz)(I.map(W=>new ee(W)),W=>W.config.host)});var re=t(61800);const qt="gitlab.com",de="https://gitlab.com/api/v4";function Ie(U){const h=U.getString("host");let I=U.getOptionalString("apiBaseUrl");const W=U.getOptionalString("token");let ct=U.getOptionalString("baseUrl");if(I?I=(0,gt.trimEnd)(I,"/"):h===qt&&(I=de),ct?ct=(0,gt.trimEnd)(ct,"/"):ct=`https://${h}`,(0,i.bK)(h)){if(!I||!(0,i.jv)(I))throw new Error(`Invalid GitLab integration config, '${I}' is not a valid apiBaseUrl`);if(!(0,i.jv)(ct))throw new Error(`Invalid GitLab integration config, '${ct}' is not a valid baseUrl`)}else throw new Error(`Invalid GitLab integration config, '${h}' is not a valid host`);return{host:h,token:W,apiBaseUrl:I,baseUrl:ct}}function Ge(U){const h=U.map(Ie);return h.some(I=>I.host===qt)||h.push({host:qt,apiBaseUrl:de,baseUrl:`https://${qt}`}),h}function _e(U){let h="";return U.host!==qt&&(h=new URL(U.baseUrl).pathname),trimEnd(h,"/")}class xe{get type(){return"gitlab"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(h){return(0,i.FI)(h)}resolveEditUrl(h){return qe(h,"edit")}constructor(h){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=h}}(0,o._)(xe,"factory",({config:U})=>{var h;const I=Ge((h=U.getOptionalConfigArray("integrations.gitlab"))!==null&&h!==void 0?h:[]);return(0,i.gz)(I.map(W=>new xe(W)),W=>W.config.host)});function qe(U,h){return U.replace(/\/\-\/(blob|tree|edit)\//,`/-/${h}/`)}function Ve(U){const h=U.getString("host");let I=U.getOptionalString("baseUrl");const W=U.getOptionalString("username"),ct=U.getOptionalString("password");if(!(0,i.bK)(h))throw new Error(`Invalid Gitea integration config, '${h}' is not a valid host`);return I?I=(0,gt.trimEnd)(I,"/"):I=`https://${h}`,{host:h,baseUrl:I,username:W,password:ct}}var Ye=t(48834).lW;function se(U,h){const I=ie(U,h);return`${I.url}/${I.owner}/${I.name}/_edit/${I.ref}/${I.path}`}function sn(U,h){const I=ie(U,h);return`${I.url}/api/v1/repos/${I.owner}/${I.name}/contents/${I.path}?ref=${I.ref}`}function Pe(U,h){const I=ie(U,h);return`${I.url}/api/v1/repos/${I.owner}/${I.name}/archive/${I.ref}.tar.gz`}function tn(U,h){const I=ie(U,h);return`${I.url}/api/v1/repos/${I.owner}/${I.name}/git/commits/${I.ref}`}function an(U){const h={},{username:I,password:W}=U;return W?(I?h.Authorization=`basic ${Ye.from(`${I}:${W}`).toString("base64")}`:h.Authorization=`token ${W}`,{headers:h}):h}function ie(U,h){var I;const W=(I=U.baseUrl)!==null&&I!==void 0?I:`https://${U.host}`;try{const[ct,Ot,Rt,ae,te,kt,...Ut]=h.replace(W,"").split("/"),ge=Ut.join("/").replace(/^\//,"");return{url:W,owner:Ot,name:Rt,ref:kt,path:ge}}catch(ct){throw new Error(`Incorrect URL: ${h}, ${ct}`)}}class Ne{get type(){return"gitea"}get title(){return this.config.host}resolveUrl(h){return(0,i.FI)(h)}resolveEditUrl(h){return se(this.config,h)}constructor(h){(0,o._)(this,"config",void 0),this.config=h}}(0,o._)(Ne,"factory",({config:U})=>{var h;const W=((h=U.getOptionalConfigArray("integrations.gitea"))!==null&&h!==void 0?h:[]).map(ct=>Ve(ct));return(0,i.gz)(W.map(ct=>new Ne(ct)),ct=>ct.config.host)});class ke{static fromConfig(h){return new ke({awsS3:p.factory({config:h}),azure:K.factory({config:h}),bitbucket:q.factory({config:h}),bitbucketCloud:Tt.factory({config:h}),bitbucketServer:at.factory({config:h}),gerrit:ee.factory({config:h}),github:re.X.factory({config:h}),gitlab:xe.factory({config:h}),gitea:Ne.factory({config:h})})}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(h=>h.list())}byUrl(h){let I=Object.values(this.byType).map(W=>W.byUrl(h)).filter(Boolean);if(I.length>1){const W=I.filter(ct=>!(ct instanceof q));W.length!==0&&(I=W)}return I[0]}byHost(h){return Object.values(this.byType).map(I=>I.byHost(h)).find(Boolean)}resolveUrl(h){const I=this.byUrl(h.base);return I?I.resolveUrl(h):(0,i.FI)(h)}resolveEditUrl(h){const I=this.byUrl(h);return I?I.resolveEditUrl(h):h}constructor(h){(0,o._)(this,"byType",void 0),this.byType=h}}var Se=t(95965);class Ue{static fromConfig(h){return ke.fromConfig(h)}}const $e=(0,Se.T)({id:"integration.scmintegrations"})},61800:function(J,T,t){"use strict";t.d(T,{X:function(){return A},B:function(){return x}});var o=t(87612),i=t(38264),d=t(76635);const S="github.com",v="https://api.github.com",p="https://raw.githubusercontent.com";function c(O){var m,b;const g=(b=O.getOptionalString("host"))!==null&&b!==void 0?b:S;let M=O.getOptionalString("apiBaseUrl"),R=O.getOptionalString("rawBaseUrl");const P=O.getOptionalString("token"),$=(m=O.getOptionalConfigArray("apps"))===null||m===void 0?void 0:m.map(L=>({appId:L.getNumber("appId"),clientId:L.getString("clientId"),clientSecret:L.getString("clientSecret"),webhookSecret:L.getString("webhookSecret"),privateKey:L.getString("privateKey"),allowedInstallationOwners:L.getOptionalStringArray("allowedInstallationOwners")}));if(!(0,i.bK)(g))throw new Error(`Invalid GitHub integration config, '${g}' is not a valid host`);return M?M=(0,d.trimEnd)(M,"/"):g===S&&(M=v),R?R=(0,d.trimEnd)(R,"/"):g===S&&(R=p),{host:g,apiBaseUrl:M,rawBaseUrl:R,token:P,apps:$}}function u(O){const m=O.map(c);return m.some(b=>b.host===S)||m.push({host:S,apiBaseUrl:v,rawBaseUrl:p}),m}class A{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._)(A,"factory",({config:O})=>{var m;const b=u((m=O.getOptionalConfigArray("integrations.github"))!==null&&m!==void 0?m:[]);return(0,i.gz)(b.map(g=>new A(g)),g=>g.config.host)});function x(O,m){return O.replace(/\/\/([^/]+)\/([^/]+)\/([^/]+)\/(blob|tree|edit)\//,(b,g,M,R)=>`//${g}/${M}/${R}/${m}/`)}},38264:function(J,T,t){"use strict";t.d(T,{FI:function(){return u},bK:function(){return v},gz:function(){return c},jv:function(){return p}});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 p(x){try{return new URL(x),!0}catch{return!1}}function c(x,O){return{list(){return x},byUrl(m){try{const b=typeof m=="string"?new URL(m):m;return x.find(g=>O(g)===b.host)}catch{return}},byHost(m){return x.find(b=>O(b)===m)}}}function u(x){const{url:O,base:m,lineNumber:b}=x;try{return new URL(O),O}catch{}let g;if(O.startsWith("/")){const{filepath:M}=i()(m);g=new URL(m);const R=(0,d.trimEnd)(g.pathname.substring(0,g.pathname.length-M.length),"/");g.pathname=`${R}${O}`}else g=new URL(O,m);return g.search=new URL(m).search,b&&(g.hash=`L${b}`),g.toString()}function A(x){beforeAll(()=>x.listen({onUnhandledRequest:"error"})),afterAll(()=>x.close()),afterEach(()=>x.resetHandlers())}},17363:function(J,T,t){"use strict";var o={};t.r(o),t.d(o,{TechDocsPlugin:function(){return p.s4}});var i=t(52322),d=t(2784),S=t(17029),v=t(73557),p=t(4577),c=t(29895),u=t(2296),A=t(57058),x=t(77277),O=t(87435),m=t(74359),b=t(55015),g=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})})},$=({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"})}),L={Progress:b.E,Router:g.VK,NotFoundErrorPage:R,BootErrorPage:P,ErrorBoundaryFallback:$};var y=t(87612);const Z="Invalid discovery URL pattern,";class V{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(`${Z} URL '${s}' is invalid`)}if(a.hash)throw new Error(`${Z} URL must not have a hash`);if(a.search)throw new Error(`${Z} URL must not have a query`);if(s.endsWith("/"))throw new Error(`${Z} URL must not end with a slash`);return new V(n)}async getBaseUrl(e){return this.parts.join(encodeURIComponent(e))}constructor(e){(0,y._)(this,"parts",void 0),this.parts=e}}var et=t(82394),Y=t.n(et);let K=Symbol.observable;class k{[K](){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,y._)(this,"isClosed",!1),(0,y._)(this,"terminatingError",void 0),(0,y._)(this,"observable",new(Y())(e=>this.isClosed?(this.terminatingError?e.error(this.terminatingError):e.complete(),()=>{}):(this.subscribers.add(e),()=>{this.subscribers.delete(e)}))),(0,y._)(this,"subscribers",new Set)}}let _=Symbol.observable;class rt{[_](){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,y._)(this,"isClosed",void 0),(0,y._)(this,"currentValue",void 0),(0,y._)(this,"terminatingError",void 0),(0,y._)(this,"observable",void 0),(0,y._)(this,"subscribers",new Set),this.isClosed=!1,this.currentValue=e,this.terminatingError=void 0,this.observable=new(Y())(n=>this.isClosed?(this.terminatingError?n.error(this.terminatingError):n.complete(),()=>{}):(n.next(this.currentValue),this.subscribers.add(n),()=>{this.subscribers.delete(n)}))}}class dt{post(e){this.subject.next(e)}alert$(){return this.subject}constructor(){(0,y._)(this,"subject",new k)}}class vt{captureEvent(e){}}class Et{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,y._)(this,"alertApi",void 0),(0,y._)(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,y._)(this,"subject",new k)}}class gt{static forward(e,n){window.addEventListener("unhandledrejection",s=>{e.post(s.reason,n)})}}const xt=new Map;class Q{static create(e){var n;return new Q((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 Q(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 Q.hasSubscribed||(Q.addStorageEventListener(),Q.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,y._)(this,"namespace",void 0),(0,y._)(this,"errorApi",void 0),(0,y._)(this,"subscribers",void 0),(0,y._)(this,"observable",void 0),this.namespace=e,this.errorApi=n,this.subscribers=new Set,this.observable=new(Y())(s=>(this.subscribers.add(s),()=>{this.subscribers.delete(s)}))}}(0,y._)(Q,"hasSubscribed",!1);function j(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 z{static create(e){var n,s;const a=q(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 z(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,y._)(this,"identityApi",void 0),(0,y._)(this,"allowUrl",void 0),(0,y._)(this,"headerName",void 0),(0,y._)(this,"headerValue",void 0),this.identityApi=e,this.allowUrl=n,this.headerName=s,this.headerValue=a}}function q(r){return r.allowUrl?r.allowUrl:r.urlPrefixAllowlist?st(r.urlPrefixAllowlist):r.config?st([r.config.getString("backend.baseUrl")]):()=>!1}function st(r){const e=r.map(n=>n.replace(/\/$/,""));return n=>e.some(s=>n===s||n.startsWith(`${s}/`))}function it(r,e){return!e||e==="/"?r:`${r.replace(/\/$/,"")}/${e.replace(/^\//,"")}`}class at{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:D,hash:N,username:X,password:lt}=new URL(`http://${a.url.substring(l.length)}`);let pt=await this.discoveryApi.getBaseUrl(C);if(X||lt){const At=new URL(pt),Nt=`${X}${lt?`:${lt}`:""}@`;pt=`${At.protocol}//${Nt}${At.host}${At.pathname}`}const yt=`${it(pt,E)}${D}${N}`;return e(yt,typeof n=="string"||nt(n)?s:n)}}constructor(e){(0,y._)(this,"discoveryApi",void 0),this.discoveryApi=e}}function nt(r){return typeof r=="object"&&(r==null?void 0:r.constructor)===URL}class St{static resolvePluginProtocol(e){return new at(e.discoveryApi)}static injectIdentityAuth(e){return z.create(e)}constructor(){}}function G(r,e){for(const n of e)if(!r.has(n))return!1;return!0}function H(r,...e){const n=new Set(r);for(const s of e)for(const a of s)n.add(a);return n}class ut{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=>G(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)=>H(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,y._)(this,"requests",[]),(0,y._)(this,"subject",new rt(this.getCurrentPending()))}}class ht{createAuthRequester(e){const n=new ut,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,y._)(this,"subject",new rt([])),(0,y._)(this,"currentRequests",[]),(0,y._)(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 D="";if(!E||typeof E.closed=="undefined"||E.closed){const pt=new Error("Failed to open auth popup.");pt.name="PopupRejectedError",n(pt);return}const N=pt=>{if(pt.source!==E||pt.origin!==r.origin)return;const{data:yt}=pt;if(yt.type==="config_info"){D=yt.targetOrigin;return}if(yt.type!=="authorization_response")return;const At=yt;if("error"in At){const Nt=new Error(At.error.message);Nt.name=At.error.name,n(Nt)}else e(At.response);lt()},X=setInterval(()=>{if(E.closed){const pt=`Login failed, ${D&&D!==window.location.origin?`Incorrect app origin, expected ${D}`:"popup was closed"}`,yt=new Error(pt);yt.name="PopupClosedError",n(yt),lt()}},100);function lt(){window.removeEventListener("message",N),clearInterval(X)}window.addEventListener("message",N)})}let bt=!1;function jt(r){return[...r].join(" ")}class Jt{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,D,N;const X=this.joinScopesFunc(e),lt=await this.buildUrl("/start",{scope:X,origin:window.location.origin,flow:"popup"}),pt=!((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,yt=!((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||(D=N.size)===null||D===void 0?void 0:D.height)||730,At=await mt({url:lt,name:`${this.provider.title} Login`,origin:new URL(lt).origin,width:pt,height:yt});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,y._)(this,"discoveryApi",void 0),(0,y._)(this,"environment",void 0),(0,y._)(this,"provider",void 0),(0,y._)(this,"joinScopesFunc",void 0),(0,y._)(this,"authRequester",void 0),(0,y._)(this,"sessionTransform",void 0),(0,y._)(this,"enableExperimentalRedirectFlow",void 0),(0,y._)(this,"popupOptions",void 0);const{configApi:n,discoveryApi:s,environment:a,provider:l,joinScopes:C=jt,oauthRequestApi:E,sessionTransform:D=lt=>lt,popupOptions:N}=e;!bt&&!n&&(console.warn("DEPRECATION WARNING: Authentication providers require a configApi instance to configure the authentication flow. Please provide one to the authentication provider constructor."),bt=!0);var X;this.enableExperimentalRedirectFlow=n&&(X=n.getOptionalBoolean("enableExperimentalRedirectFlow"))!==null&&X!==void 0?X:!1,this.authRequester=E.createAuthRequester({provider:l,onAuthRequest:async lt=>this.enableExperimentalRedirectFlow?this.executeRedirect(lt):this.showPopup(lt)}),this.discoveryApi=s,this.environment=a,this.provider=l,this.joinScopesFunc=C,this.sessionTransform=D,this.popupOptions=N}}function Wt(r,e){for(const n of e)if(!r.has(n))return!1;return!0}class Ht{sessionExistsAndHasScope(e,n){if(!e)return!1;if(!n||this.options.sessionScopes===void 0)return!0;const s=this.options.sessionScopes(e);return Wt(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,y._)(this,"options",void 0),this.options=e}}var Dt=t(95965),Mt;(function(r){r.SignedIn="SignedIn",r.SignedOut="SignedOut"})(Mt||(Mt={}));const Gt=(0,Dt.T)({id:"core.auth.google"}),ee=(0,Dt.T)({id:"core.auth.github"}),re=(0,Dt.T)({id:"core.auth.okta"}),qt=(0,Dt.T)({id:"core.auth.gitlab"}),de=(0,Dt.T)({id:"core.auth.microsoft"}),Ie=(0,Dt.T)({id:"core.auth.onelogin"}),Ge=(0,Dt.T)({id:"core.auth.bitbucket"}),_e=(0,Dt.T)({id:"core.auth.bitbucket-server"}),xe=(0,Dt.T)({id:"core.auth.atlassian"});class qe{setIsSignedIn(e){this.signedIn!==e&&(this.signedIn=e,this.subject.next(this.signedIn?Mt.SignedIn:Mt.SignedOut))}sessionState$(){return this.subject}constructor(){(0,y._)(this,"subject",new rt(Mt.SignedOut)),(0,y._)(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 Wt(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,y._)(this,"connector",void 0),(0,y._)(this,"helper",void 0),(0,y._)(this,"sessionScopesFunc",void 0),(0,y._)(this,"sessionShouldRefreshFunc",void 0),(0,y._)(this,"stateTracker",new qe),(0,y._)(this,"refreshPromise",void 0),(0,y._)(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 Ht({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:D=pt=>pt,popupOptions:N}=e,X=new Jt({configApi:n,discoveryApi:s,environment:a,provider:l,oauthRequestApi:C,sessionTransform({backstageIdentity:pt,...yt}){const At={...yt,providerInfo:{idToken:yt.providerInfo.idToken,accessToken:yt.providerInfo.accessToken,scopes:se.normalizeScopes(D,yt.providerInfo.scope),expiresAt:yt.providerInfo.expiresInSeconds?new Date(Date.now()+yt.providerInfo.expiresInSeconds*1e3):void 0}};if(pt){var Nt;const Kt=(Nt=pt.expiresInSeconds)!==null&&Nt!==void 0?Nt:yt.providerInfo.expiresInSeconds;At.backstageIdentity={token:pt.token,identity:pt.identity,expiresAt:Kt?new Date(Date.now()+Kt*1e3):void 0}}return At},popupOptions:N}),lt=new Ve({connector:X,defaultScopes:new Set(E),sessionScopes:pt=>pt.providerInfo.scopes,sessionShouldRefresh:pt=>{var yt,At;let Nt=1/0;return!((yt=pt.providerInfo)===null||yt===void 0)&&yt.expiresAt&&(Nt=Math.min(Nt,(pt.providerInfo.expiresAt.getTime()-Date.now())/1e3)),!((At=pt.backstageIdentity)===null||At===void 0)&&At.expiresAt&&(Nt=Math.min(Nt,(pt.backstageIdentity.expiresAt.getTime()-Date.now())/1e3)),Nt<60*5}});return new se({sessionManager:lt,scopeTransform:D})}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,y._)(this,"sessionManager",void 0),(0,y._)(this,"scopeTransform",void 0),this.sessionManager=e.sessionManager,this.scopeTransform=e.scopeTransform}}const sn={id:"google",title:"Google",icon:()=>null},Pe="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",`${Pe}userinfo.email`,`${Pe}userinfo.profile`]}=e;return se.create({configApi:n,discoveryApi:s,oauthRequestApi:a,provider:C,environment:l,defaultScopes:E,scopeTransform(D){return D.map(N=>N==="openid"?N:N==="profile"||N==="email"?`${Pe}userinfo.${N}`:N.startsWith(Pe)?N:`${Pe}${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,y._)(this,"oauth2",void 0),(0,y._)(this,"configApi",void 0),(0,y._)(this,"environment",void 0),(0,y._)(this,"provider",void 0),(0,y._)(this,"oauthRequestApi",void 0),(0,y._)(this,"discoveryApi",void 0),(0,y._)(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:D=N=>N.concat("offline_access")}=e;this.configApi=n,this.environment=s,this.provider=a,this.oauthRequestApi=l,this.discoveryApi=C,this.scopeTransform=D,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,y._)(ie,"MicrosoftGraphID","00000003-0000-0000-c000-000000000000");const Ne={id:"github",title:"GitHub",icon:()=>null};class ke{static create(e){const{configApi:n,discoveryApi:s,environment:a="development",provider:l=Ne,oauthRequestApi:C,defaultScopes:E=["read:user"]}=e;return se.create({configApi:n,discoveryApi:s,oauthRequestApi:C,provider:l,environment:a,defaultScopes:E})}}const Se={id:"okta",title:"Okta",icon:()=>null},Ue=new Set(["openid","profile","email","phone","address","groups","offline_access"]),$e="okta.";class U{static create(e){const{configApi:n,discoveryApi:s,environment:a="development",provider:l=Se,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(D){return D.map(N=>Ue.has(N)||N.startsWith($e)?N:`${$e}${N}`)}})}}const h={id:"gitlab",title:"GitLab",icon:()=>null};class I{static create(e){const{configApi:n,discoveryApi:s,environment:a="development",provider:l=h,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},ct=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(D=>ct.has(D)||D.startsWith(Ot)?D:`${Ot}${D}`)}})}}const ae={id:"bitbucket",title:"Bitbucket",icon:()=>null};class te{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 Le{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 Zt=t(42380),ne=t(96727),ue=t(6542),Mn=t(78847),vo=t(86386),Bn=t(58513);const Un=(0,Dt.T)({id:"core.storage"});var $n=t(85094),ve=t(77186);const je=(0,Dt.T)({id:"core.oauthrequest"}),mo=(0,Dt.T)({id:"plugin.permission.api"});var Qe=t(41385),yo=t(96279),Fn=t.n(yo),Eo=t(9571),Vt=t(30195),We;(function(r){r.DENY="DENY",r.ALLOW="ALLOW",r.CONDITIONAL="CONDITIONAL"})(We||(We={}));const ln=Vt.z.lazy(()=>Vt.z.object({rule:Vt.z.string(),resourceType:Vt.z.string(),params:Vt.z.record(Vt.z.any()).optional()}).or(Vt.z.object({anyOf:Vt.z.array(ln).nonempty()})).or(Vt.z.object({allOf:Vt.z.array(ln).nonempty()})).or(Vt.z.object({not:ln}))),xo=Vt.z.object({result:Vt.z.literal(We.ALLOW).or(Vt.z.literal(We.DENY))}),Co=Vt.z.union([Vt.z.object({result:Vt.z.literal(We.ALLOW).or(Vt.z.literal(We.DENY))}),Vt.z.object({result:Vt.z.literal(We.CONDITIONAL),pluginId:Vt.z.string(),resourceType:Vt.z.string(),conditions:ln})]),Ao=(r,e)=>Vt.z.object({items:Vt.z.array(Vt.z.intersection(Vt.z.object({id:Vt.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,xo,n)}async authorizeConditional(e,n){return this.makeRequest(e,Co,n)}async makeRequest(e,n,s){if(!this.enabled)return e.map(X=>({result:We.ALLOW}));const a={items:e.map(X=>({id:Eo.Z(),...X}))},l=await this.discovery.getBaseUrl("permission"),C=await Fn()(`${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=Ao(n,new Set(a.items.map(({id:X})=>X))).parse(E).items.reduce((X,lt)=>(X[lt.id]=lt,X),{});return a.items.map(X=>N[X.id])}getAuthorizationHeader(e){return e?{Authorization:`Bearer ${e}`}:{}}constructor(e){(0,y._)(this,"enabled",void 0),(0,y._)(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,y._)(this,"permissionClient",void 0),(0,y._)(this,"identityApi",void 0),this.permissionClient=e,this.identityApi=n}}const So=[(0,Zt.n)({api:ne.N,deps:{configApi:ue.D},factory:({configApi:r})=>V.compile(`${r.getString("backend.baseUrl")}/api/{{ pluginId }}`)}),(0,Zt.n)({api:Mn.$,deps:{},factory:()=>new dt}),(0,Zt.n)({api:vo.v,deps:{},factory:()=>new vt}),(0,Zt.n)({api:Bn.V,deps:{alertApi:Mn.$},factory:({alertApi:r})=>{const e=new Et(r,new Tt);return gt.forward(e,{hidden:!1}),e}}),(0,Zt.n)({api:Un,deps:{errorApi:Bn.V},factory:({errorApi:r})=>Q.create({errorApi:r})}),(0,Zt.n)({api:$n.g,deps:{configApi:ue.D,identityApi:ve.$,discoveryApi:ne.N},factory:({configApi:r,identityApi:e,discoveryApi:n})=>j({middleware:[St.resolvePluginProtocol({discoveryApi:n}),St.injectIdentityAuth({identityApi:e,config:r})]})}),(0,Zt.n)({api:je,deps:{},factory:()=>new ht}),(0,Zt.n)({api:Gt,deps:{discoveryApi:ne.N,oauthRequestApi:je,configApi:ue.D},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>tn.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,Zt.n)({api:de,deps:{discoveryApi:ne.N,oauthRequestApi:je,configApi:ue.D},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>ie.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,Zt.n)({api:ee,deps:{discoveryApi:ne.N,oauthRequestApi:je,configApi:ue.D},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>ke.create({configApi:n,discoveryApi:r,oauthRequestApi:e,defaultScopes:["read:user"],environment:n.getOptionalString("auth.environment")})}),(0,Zt.n)({api:re,deps:{discoveryApi:ne.N,oauthRequestApi:je,configApi:ue.D},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>U.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,Zt.n)({api:qt,deps:{discoveryApi:ne.N,oauthRequestApi:je,configApi:ue.D},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>I.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,Zt.n)({api:Ie,deps:{discoveryApi:ne.N,oauthRequestApi:je,configApi:ue.D},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>Rt.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,Zt.n)({api:Ge,deps:{discoveryApi:ne.N,oauthRequestApi:je,configApi:ue.D},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>te.create({configApi:n,discoveryApi:r,oauthRequestApi:e,defaultScopes:["team"],environment:n.getOptionalString("auth.environment")})}),(0,Zt.n)({api:_e,deps:{discoveryApi:ne.N,oauthRequestApi:je,configApi:ue.D},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>Ut.create({configApi:n,discoveryApi:r,oauthRequestApi:e,defaultScopes:["REPO_READ"]})}),(0,Zt.n)({api:xe,deps:{discoveryApi:ne.N,oauthRequestApi:je,configApi:ue.D},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>Le.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,Zt.n)({api:mo,deps:{discovery:ne.N,identity:ve.$,config:ue.D},factory:({config:r,discovery:e,identity:n})=>xn.create({config:r,discovery:e,identity:n})})];var Wn=t(43642),bo=t(80079),Oo=t(90941),Zn=t(32915),Cn=t(40562),wo=t(21853),Po=t(60744),To=t(66569),Ro=t(30254),Io=t(13384),kn=t(15933),Do=t(58838),zn=t(86737),Kn=t(4989),Hn=t(44407),Lo=t(18628),An=t(84219),Sn=t(98685),jo=t(39781),Gn=t(39412),Mo=t(78258);const Bo={brokenImage:bo.Z,catalog:Lo.Z,scaffolder:Zn.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:zn.Z,"kind:api":kn.Z,"kind:component":Hn.Z,"kind:domain":Wn.Z,"kind:group":An.Z,"kind:location":Kn.Z,"kind:system":Oo.Z,"kind:user":Sn.Z,"kind:resource":Gn.Z,"kind:template":Mo.Z,user:Sn.Z,warning:jo.Z};var Uo=t(87561),$o=t(12536),Vn=t(19219),Fo=t(41547),No=t(3493),Wo=t(81887);const Zo=(0,$o.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)(Vn.ZP,{generateClassName:Zo,children:(0,i.jsx)(Fo.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 Yn={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),he=t(52475),fe=t(80956),ko=t(73689),cr=t(93606);const f={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")`},w={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 D=(E=s==null?void 0:s.fontColor)!==null&&E!==void 0?E:"#FFFFFF";return{colors:e,shape:n,backgroundImage:C,fontColor:D}}const F={home:B({colors:w.teal,shape:f.wave}),documentation:B({colors:w.pinkSea,shape:f.wave2}),tool:B({colors:w.purpleSky,shape:f.round}),service:B({colors:w.marineBlue,shape:f.wave}),website:B({colors:w.veryBlue,shape:f.wave}),library:B({colors:w.rubyRed,shape:f.wave}),other:B({colors:w.darkGrey,shape:f.wave}),app:B({colors:w.toastyOrange,shape:f.wave}),apis:B({colors:w.teal,shape:f.wave2}),card:B({colors:w.greens,shape:f.wave})},tt=16,ot='"Helvetica Neue", Helvetica, Roboto, Arial, sans-serif',ft="home";function Ct(r){const{palette:e,htmlFontSize:n=tt,fontFamily:s=ot,defaultPageTheme:a=ft,pageTheme:l=F,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:D})=>{var N;return(N=l[D])!==null&&N!==void 0?N:l[a]}}}var It=t(47591);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"}}}},Yt=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 Ft(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=Yt(s)),Object.fromEntries(Object.entries(e).map(([a,l])=>typeof l=="function"?[a,l({theme:n})]:[a,l]))}return e}}const le=/^&.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(le);if(C){const[,E]=C,{[l]:D,...N}=s;D&&(e={...e,[n]:N,[E]:D})}}}return e}function Qt(r,e={}){const n={},s={};for(const a of Object.keys(e)){const l=e[a];l&&("styleOverrides"in l&&(a==="MuiCssBaseline"?n[a]=Ft(r,l.styleOverrides):n[a]=me(Pt(r,l.styleOverrides))),"defaultProps"in l&&(s[a]=l.defaultProps))}return{overrides:n,props:s}}var Bt=new WeakMap;class oe{getTheme(e){return(0,wt._)(this,Bt).get(e)}constructor(e,n){(0,he._)(this,Bt,{writable:!0,value:new Map}),(0,fe._)(this,Bt,new Map),e&&(0,wt._)(this,Bt).set("v4",e),n&&(0,wt._)(this,Bt).set("v5",n)}}function ye(r){const e=Ct(r),n={...$t,...r.components},s=(0,cr.Z)({...e,components:n}),a=Qt(s,n),l={...(0,ko.Z)(e),...a};return new oe(l,s)}function Lt(r){const e=adaptV4Theme(r),n=createTheme(r);return new oe(n,e)}const zt={light:ye({palette:Yn.light}),dark:ye({palette:Yn.dark})};var Xt=t(98192),Ce=t(15222);const Te=[{id:"light",title:"Light Theme",variant:"light",icon:(0,i.jsx)(Ce.Z,{}),Provider:({children:r})=>(0,i.jsx)(cn,{theme:zt.light,children:r})},{id:"dark",title:"Dark Theme",variant:"dark",icon:(0,i.jsx)(Xt.Z,{}),Provider:({children:r})=>(0,i.jsx)(cn,{theme:zt.dark,children:r})}];var Fe=t(64279),ce=t(13980),Ze=t.n(ce);class pe{get(e){for(const n of this.holders){const s=n.get(e);if(s)return s}}constructor(...e){(0,y._)(this,"holders",void 0),this.holders=e}}var Je=t(29651),dn=t(68993);const dr=(0,Je.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 pe(n,a):n;return(0,i.jsx)(dr.Provider,{value:(0,dn.E)({1:l}),children:s})};zo.propTypes={apis:Ze().shape({get:Ze().func.isRequired}).isRequired,children:Ze().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 Me={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:D,description:N}of C)console.warn(`The configuration key '${D}' 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(Me.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(Me.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(Me.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(Me.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(Me.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(Me.convert(this.fullKey(e),this.context,"number"));return s}getBoolean(e){const n=this.getOptionalBoolean(e);if(n===void 0)throw new Error(Me.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(Me.convert(this.fullKey(e),this.context,"boolean"))}getString(e){const n=this.getOptionalString(e);if(n===void 0)throw new Error(Me.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(Me.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:D=s,expected:N}=C;throw new TypeError(Me.type(this.fullKey(E),this.context,Ko(D),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(Me.type(C,this.context,Ko(s),"object"))}return s}constructor(e,n="mock-config",s,a=""){(0,y._)(this,"data",void 0),(0,y._)(this,"context",void 0),(0,y._)(this,"fallback",void 0),(0,y._)(this,"prefix",void 0),(0,y._)(this,"filteredKeys",void 0),(0,y._)(this,"notifiedFilteredKeys",void 0),this.data=e,this.context=n,this.fallback=s,this.prefix=a,this.notifiedFilteredKeys=new Set}}const On="theme";class Qn{static createWithStorage(e){const n=new Qn(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,y._)(this,"themes",void 0),(0,y._)(this,"activeThemeId",void 0),(0,y._)(this,"subject",void 0),this.themes=e,this.subject=new rt(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,y._)(this,"registeredFeatureFlags",[]),(0,y._)(this,"flags",void 0)}}const Jn=(0,Dt.T)({id:"core.apptheme"}),hr=(0,Dt.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 D of Object.values(E.deps)){if(D.id===s.id)throw new Error(`Circular dependency of api factory for ${s}`);l.has(D)||(l.add(D),a.push(D))}}}}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,y._)(this,"factories",void 0),(0,y._)(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,y._)(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 D in e)if(e.hasOwnProperty(D)){const N=e[D];E[D]=N.visit(N.accumulator,C,a,l[D])}for(const D of r.discoverers){const N=D(C);N&&n.push({node:N,parent:C,contexts:E})}})}return Object.fromEntries(Object.entries(e).map(([s,a])=>[s,a.accumulator]))}function Xn(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 be=t(62584);const Cs=Xn(()=>new Set,(r,e)=>{const n=(0,be.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,be.R)(fr,"core.featureFlagged",!0);const _n={caseSensitive:!1,path:"*",element:"match-all",routeRefs:new Set,plugins:new Set};function qn(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,be.I)(n,"core.mountPoint");if(s){const a=(0,be.I)(n,"core.plugin");e.push({routeRef:s,plugin:a})}gr(n.props.children,e)}),e}const As=Xn(()=>({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,be.I)(e,"core.mountPoint");if(E&&C)throw new Error(`Path property may not be set directly on a routable extension "${qn(e)}"`);var D;const N=(D=s==null||(l=s.obj)===null||l===void 0?void 0:l.children)!==null&&D!==void 0?D:r.objects;if(C!==void 0){if(typeof C!="string")throw new Error(`Element path must be a string at "${qn(e)}"`);const At=C.startsWith("/")?C.slice(1):C,Nt=e.props.element;if((0,be.I)(e,"core.gatherMountPoints")){var X;if(Nt)throw new Error(`Mount point gatherers may not have an element prop "${qn(e)}"`);const Kt={path:At,element:"gathered",routeRefs:new Set,caseSensitive:Boolean((X=e.props)===null||X===void 0?void 0:X.caseSensitive),children:[_n],plugins:new Set};return N.push(Kt),{obj:Kt,gatherPath:At,routeRef:s==null?void 0:s.routeRef,gatherRouteRef:s==null?void 0:s.routeRef}}if(Nt){var lt;const[Kt,..._t]=gr(Nt);if(_t.length>0)throw new Error(`Route element with path "${C}" may not contain multiple routable extensions`);if(!Kt)return s;const{routeRef:Ee,plugin:He}=Kt,jn={path:At,element:"mounted",routeRefs:new Set([Ee]),caseSensitive:Boolean((lt=e.props)===null||lt===void 0?void 0:lt.caseSensitive),children:[_n],plugins:pr(He)};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 pt;if((s==null?void 0:s.gatherPath)===void 0)throw new Error(`Routable extension "${qn(e)}" with mount point "${E}" must be assigned a path`);s==null||(pt=s.obj)===null||pt===void 0||pt.routeRefs.add(E);const At=(0,be.I)(e,"core.plugin");if(At){var yt;s==null||(yt=s.obj)===null||yt===void 0||yt.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=Xn(()=>({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,D=s==null?void 0:s.routeRef,N=s==null?void 0:s.sticky;const X=(a=e.props)===null||a===void 0?void 0:a.path;var lt;const pt=(lt=E==null?void 0:E.children)!==null&&lt!==void 0?lt:r.objects,yt=Boolean((l=e.props)===null||l===void 0?void 0:l.caseSensitive);let At=s==null?void 0:s.path;if((0,be.I)(e,"core.gatherMountPoints")){if(!X)throw new Error("Mount point gatherer must have a path");At=X}const Nt=(C=e.props)===null||C===void 0?void 0:C.element;let Kt=(0,be.I)(e,"core.mountPoint");if(!Kt&&(0,d.isValidElement)(Nt)&&(Kt=(0,be.I)(Nt,"core.mountPoint")),Kt){let He=X;if(At&&(He?At=void 0:He=At),!He)throw new Error("Mounted routable extension must have a path");r.paths.set(Kt,He),D&&N?(r.parents.set(Kt,D),X&&(D=Kt,N=!1)):(r.parents.set(Kt,D),D=Kt),X?(E={caseSensitive:yt,path:X,element:"mounted",routeRefs:new Set([Kt]),children:[_n],plugins:pr((0,be.I)(e.props.element,"core.plugin"))},pt.push(E)):E==null||E.routeRefs.add(Kt)}if((0,be.I)(e,"core.gatherMountPoints")&&(N=!0),(0,be.I)(e,"core.gatherMountPoints")){if(!X)throw new Error("Mount point gatherer must have a path");if(!Kt){var Ee;E={caseSensitive:yt,path:X,element:"gathered",routeRefs:new Set,children:[_n],plugins:(s==null||(Ee=s.obj)===null||Ee===void 0?void 0:Ee.plugins)||new Set},pt.push(E)}}return{obj:E,path:At,routeRef:D,sticky:N}}),bs=Xn(()=>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 to(...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=to(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 D=-1;for(let lt=r;lt&&(D=C.findIndex(pt=>pt.route.routeRefs.has(lt)),D===-1);lt=s.get(lt))E.unshift(lt);E.length===0&&(D-=1);const N=D===-1?"":C[D].pathname,X=E.slice(0,-1).map(lt=>{const pt=n.get(lt);if(pt===void 0)throw new Error(`No path for ${lt}`);if(pt.includes(":"))throw new Error(`Cannot route to ${r} with parent ${lt} as it has parameters`);return pt});return`${to(N,...X)}/`}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(...[D])=>{const N=D&&Ts()(D,X=>typeof X=="string"?X.replaceAll(/[&?#;\/]/g,lt=>encodeURIComponent(lt)):X);return to(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,y._)(this,"routePaths",void 0),(0,y._)(this,"routeParents",void 0),(0,y._)(this,"routeObjects",void 0),(0,y._)(this,"routeBindings",void 0),(0,y._)(this,"appBasePath",void 0),this.routePaths=e,this.routeParents=n,this.routeObjects=s,this.routeBindings=a,this.appBasePath=l}}const Ls=(0,Je.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=to(E,l),a=e.get(a)}const C=l.match(/:(\w+)/g);if(C){for(let E=0;E<C.length;E++)for(let D=E+1;D<C.length;D++)if(C[D]===C[E])throw new Error(`Parameter ${C[D]} 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,Je.CT)("app-context"),$s=({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 Fs{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,y._)(this,"target",void 0),(0,y._)(this,"waitForTarget",void 0),(0,y._)(this,"resolveTarget",()=>{}),(0,y._)(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_)(Jn),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,y._)(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,y._)(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(D=>{var N;return(D==null||(N=D.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((D,[N,X])=>(X!==void 0&&N!=="*"&&(D[N]=X),D),{});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},eo=({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_)(ue.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_)(ue.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:D}=C;return n?Rn()?(0,i.jsxs)(e,{children:[(0,i.jsx)(eo,{routeObjects:E}),(0,i.jsx)(br,{component:n,appIdentityProxy:D,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)(eo,{routeObjects:E}),(0,i.jsx)(br,{component:n,appIdentityProxy:D,children:r.children})]}):(D.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)(eo,{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)(eo,{routeObjects:E}),r.children]}))}(0,be.R)(Or,"core.type","AppRouter");const In="language",ze="en";var Dn=new WeakMap,pn=new WeakMap,no=new WeakMap;class oo{static create(e){var n;const s=(n=e==null?void 0:e.availableLanguages)!==null&&n!==void 0?n:[ze];if(s.length!==new Set(s).size)throw new Error(`Supported languages may not contain duplicates, got '${s.join("', '")}'`);if(!s.includes(ze))throw new Error(`Supported languages must include '${ze}'`);var a;const l=(a=e==null?void 0:e.defaultLanguage)!==null&&a!==void 0?a:ze;if(!s.includes(l))throw new Error(`Initial language must be one of the supported languages, got '${l}'`);return new oo(s,l)}static createWithStorage(e){const n=oo.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:ze;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,fe._)(this,pn,n),(0,wt._)(this,no).next({language:n})}}getLanguage(){return{language:(0,wt._)(this,pn)}}language$(){return(0,wt._)(this,no)}constructor(e,n){(0,he._)(this,Dn,{writable:!0,value:void 0}),(0,he._)(this,pn,{writable:!0,value:void 0}),(0,he._)(this,no,{writable:!0,value:void 0}),(0,fe._)(this,Dn,e),(0,fe._)(this,pn,n),(0,fe._)(this,no,new rt({language:(0,wt._)(this,pn)}))}}var Be=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,ro=new WeakMap,vn=new WeakMap,so=new WeakSet;class Xs{addTranslationResource(e){const n=(0,Js.W)(e);for(const s of n.resources){const a=(0,Be._)(this,so,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,Be._)(this,so,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,Be._)(this,so,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,ro).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,ro).set(s,C),await C}constructor(e){(0,en._)(this,so),(0,y._)(this,"onLoad",void 0),(0,he._)(this,gn,{writable:!0,value:void 0}),(0,he._)(this,ro,{writable:!0,value:void 0}),(0,he._)(this,vn,{writable:!0,value:void 0}),this.onLoad=e,(0,fe._)(this,gn,new Set),(0,fe._)(this,ro,new Map),(0,fe._)(this,vn,new Map)}}function Qo(r,e){return`${r}/${e}`}var Ln=new WeakMap,mn=new WeakMap,nn=new WeakMap,Jo=new WeakMap,io=new WeakMap,Tr=new WeakSet,ao=new WeakSet,Xo=new WeakSet;class _o{static create(e){const{languages:n}=e.languageApi.getAvailableLanguages(),s=(0,Qs.Fs)({fallbackLng:ze,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!==ze&&s.changeLanguage(a);const l=new Xs(D=>{s.addResourceBundle(D.language,D.namespace,Pr(D.messages),!1,!0)}),C=(e==null?void 0:e.resources)||[];for(let D=C.length-1;D>=0;D--){const N=C[D];N.$$type==="@backstage/TranslationResource"?l.addTranslationResource(N):N.$$type==="@backstage/TranslationMessages"&&s.addResourceBundle(ze,N.id,Pr(N.messages),!0,!1)}const E=new _o(s,l,e.languageApi.getLanguage().language);return e.languageApi.language$().subscribe(({language:D})=>{(0,Be._)(E,Tr,_s).call(E,D)}),E}getTranslation(e){const n=(0,wr.y)(e);return(0,Be._)(this,Xo,Rr).call(this,n),(0,Be._)(this,ao,qo).call(this,n)}translation$(e){const n=(0,wr.y)(e);return(0,Be._)(this,Xo,Rr).call(this,n),new(Y())(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 D=(0,Be._)(this,ao,qo).call(this,n);D.ready&&s.next(D)}},D=>{E===a&&s.error(Array.isArray(D)?D[0]:D)})},C=()=>{const E=(0,Be._)(this,ao,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,io).add(C),()=>{(0,wt._)(this,io).delete(C)}})}constructor(e,n,s){(0,en._)(this,Tr),(0,en._)(this,ao),(0,en._)(this,Xo),(0,he._)(this,Ln,{writable:!0,value:void 0}),(0,he._)(this,mn,{writable:!0,value:void 0}),(0,he._)(this,nn,{writable:!0,value:void 0}),(0,he._)(this,Jo,{writable:!0,value:new Set}),(0,he._)(this,io,{writable:!0,value:new Set}),(0,fe._)(this,Ln,e),(0,fe._)(this,mn,n),(0,fe._)(this,nn,s)}}function _s(r){(0,wt._)(this,nn)!==r&&((0,fe._)(this,nn,r),(0,wt._)(this,Ln).changeLanguage(r),(0,wt._)(this,io).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(ze,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,D=new URL(s).origin;if(E===D){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,Fe.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(Jn,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,y._)(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,fe._)(this,tr,!0);const e=new ei(this);let n=!1;return({children:a})=>{const l=(0,d.useRef)(!0),C=(0,d.useMemo)(()=>Qn.createWithStorage(this.themes),[]),{routing:E,featureFlags:D,routeBindings:N}=(0,d.useMemo)(()=>{const At=Rn();At&&console.warn(`
2
2
  DEPRECATION WARNING: React Router Beta is deprecated and support for it will be removed in a future release.
3
3
  Please migrate to use React Router v6 stable.
4
4
  See https://backstage.io/docs/tutorials/react-router-stable-migration
5
- `);const Nt=ys({root:a,discoverers:[Es,xs],collectors:{routing:At?Ss:As,collectedPlugins:Cs,featureFlags:bs}});return Nt.collectedPlugins.forEach(Kt=>this.plugins.add(Kt)),this.verifyPlugins(this.plugins),this.getApiHolder(),{...Nt,routeBindings:Ks(this.bindRoutes)}},[a]);n||(n=!0,Ms(E.paths,E.parents),Bs(N,this.plugins));const X=ti(this.configLoader,this.components,C),lt="api"in X;if(lt){const{api:At}=X;this.configApi=At}if("node"in X)return X.node;if(lt&&l.current){l.current=!1;const At=this.getApiHolder().get(hn.W);if(At){for(const _t of this.featureFlags)At.registerFlag({..._t,pluginId:""});for(const _t of this.plugins.values())if("getFeatureFlags"in _t)for(const Ee of _t.getFeatureFlags())At.registerFlag({name:Ee.name,pluginId:_t.getId()});else for(const Ee of _t.output())Ee.type==="feature-flag"&&At.registerFlag({name:Ee.name,pluginId:_t.getId()});const Nt=At.getRegisteredFlags(),Kt=new Set(Nt.map(_t=>_t.name));for(const _t of D)Kt.has(_t)||At.registerFlag({name:_t,pluginId:""})}}const{ThemeProvider:pt=Er,Progress:yt}=this.components;return(0,i.jsx)(zo,{apis:this.getApiHolder(),children:(0,i.jsx)($s,{appContext:e,children:(0,i.jsx)(pt,{children:(0,i.jsx)(js,{routePaths:E.paths,routeParents:E.parents,routeObjects:E.objects,routeBindings:N,basePath:Ys(X.api),children:(0,i.jsx)(Cr.Provider,{value:{routeObjects:E.objects,appIdentityProxy:this.appIdentityProxy},children:(0,i.jsx)(d.Suspense,{fallback:(0,i.jsx)(yt,{}),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:Jn,deps:{},factory:()=>Qn.createWithStorage(this.themes)}),this.apiFactoryRegistry.register("static",{api:ue.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,y._)(this,"apiHolder",void 0),(0,y._)(this,"configApi",void 0),(0,y._)(this,"apis",void 0),(0,y._)(this,"icons",void 0),(0,y._)(this,"plugins",void 0),(0,y._)(this,"featureFlags",void 0),(0,y._)(this,"components",void 0),(0,y._)(this,"themes",void 0),(0,y._)(this,"configLoader",void 0),(0,y._)(this,"defaultApis",void 0),(0,y._)(this,"bindRoutes",void 0),(0,y._)(this,"appLanguageApi",void 0),(0,y._)(this,"translationResources",void 0),(0,y._)(this,"appIdentityProxy",new Fs),(0,y._)(this,"apiFactoryRegistry",void 0),(0,he._)(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 D;this.configLoader=(D=e.configLoader)!==null&&D!==void 0?D:xr;var N;this.defaultApis=(N=e.defaultApis)!==null&&N!==void 0?N:[],this.bindRoutes=e.bindRoutes,this.apiFactoryRegistry=new ms,this.appLanguageApi=oo.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 X;this.translationResources=(X=(a=e.__experimentalTranslations)===null||a===void 0?void 0:a.resources)!==null&&X!==void 0?X:[]}}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:{...L,...r==null?void 0:r.components},configLoader:r==null?void 0:r.configLoader,defaultApis:So,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:Te})}var lo=t(2532);let Dr=!1;const Lr=r=>{const e=(0,Ar.q)(),{NotFoundErrorPage:n}=e.getComponents(),s=(0,d.useMemo)(()=>Rn(),[]),l=[...(0,lo.v)(r.children,C=>C.getElements().flatMap(E=>{let D=E.props.path;if(D==="")return[];var N;D=(N=D==null?void 0:D.replace(/\/\*$/,""))!==null&&N!==void 0?N:"/";let X=s?E:E.props.element;return!s&&!X&&(X=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:D,element:X,children:E.props.children?[{path:D==="/"?"/":"*",element:E.props.children}]:void 0}]}).sort((E,D)=>D.path.localeCompare(E.path)).map(E=>({...E,path:E.path==="/"?"/":`${E.path}/*`}))),{path:"*",element:(0,i.jsx)(n,{})}];return(0,v.V$)(l)};(0,be.R)(Lr,"core.type","FlatRoutes");var on=t(74314),si=t(51547),ii=t(88797);function jr(r){return!r.cursor}function $a(r){return!jr(r)}const Oe="catalog";var we=t(23587);class ai{async analyzeLocation(e,n){const s=await this.discoveryApi.getBaseUrl(Oe),a="/analyze-location",l=we.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(Oe),a="/locations{?dryRun}",l=we.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(Oe),a="/entities/by-uid/{uid}",l=we.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(Oe),a="/locations/{id}",l=we.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(Oe),a="/entities{?fields,limit,filter*,offset,after,order*}",l=we.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(Oe),a="/entities/by-query{?fields,limit,orderField*,cursor,filter*,fullTextFilterTerm,fullTextFilterFields}",l=we.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(Oe),a="/entities/by-refs",l=we.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(Oe),a="/entities/by-name/{kind}/{namespace}/{name}/ancestry",l=we.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(Oe),a="/entities/by-name/{kind}/{namespace}/{name}",l=we.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(Oe),a="/entities/by-uid/{uid}",l=we.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(Oe),a="/entity-facets{?facet*,filter*}",l=we.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(Oe),a="/locations/{id}",l=we.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(Oe),a="/locations",l=we.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(Oe),a="/refresh",l=we.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(Oe),a="/validate-entity",l=we.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,y._)(this,"discoveryApi",void 0),(0,y._)(this,"fetchApi",void 0),this.discoveryApi=e.discoveryApi,this.fetchApi=e.fetchApi||{fetch:Fn()}}}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:D}=e!=null?e:{},N=[];if(l)for(const pt of[l].flat())pt&&N.push(`${encodeURIComponent(pt.order)}:${encodeURIComponent(pt.field)}`);const X=await this.requestRequired(await this.apiClient.getEntities({query:{fields:a.map(encodeURIComponent),limit:E,filter:this.getFilterValue(s),offset:C,after:D,order:l?N:void 0}},n)),lt=(pt,yt)=>{var At,Nt;if(((At=pt.metadata)===null||At===void 0?void 0:At.name)===void 0||pt.kind===void 0||((Nt=yt.metadata)===null||Nt===void 0?void 0:Nt.name)===void 0||yt.kind===void 0)return 0;const Kt=(0,on.eE)(pt),_t=(0,on.eE)(yt);return Kt<_t?-1:Kt>_t?1:0};return{items:X.sort(lt)}}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:D,orderFields:N,fullTextFilter:X}=e;s.filter=this.getFilterValue(E),D!==void 0&&(s.limit=D),N!==void 0&&(s.orderField=(Array.isArray(N)?N:[N]).map(({field:pt,order:yt})=>encodeURIComponent(`${pt},${yt}`))),C.length&&(s.fields=C.map(encodeURIComponent));const lt=X==null||(a=X.term)===null||a===void 0?void 0:a.trim();lt&&(s.fullTextFilterTerm=lt),!(X==null||(l=X.fields)===null||l===void 0)&&l.length&&(s.fullTextFilterFields=X.fields)}else{const{fields:C=[],limit:E,cursor:D}=e;s.cursor=D,E!==void 0&&(s.limit=E),C.length&&(s.fields=C.map(encodeURIComponent))}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:D,exists:N}=await C.json();if(!E)throw new Error(`Location wasn't added: ${a}`);return{location:E,entities:D,exists:N}}async getLocationByRef(e,n){return(await this.requestRequired(await this.apiClient.getLocation({path:{id:e}},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(encodeURIComponent(l)):typeof E=="string"&&a.push(`${encodeURIComponent(l)}=${encodeURIComponent(E)}`);a.length&&n.push(a.join(","))}return n}constructor(e){(0,y._)(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),De=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,D,N])=>(0,on.eE)({kind:E,namespace:D,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,y._)(this,"settingsStore",void 0),(0,y._)(this,"starredEntities",void 0),(0,y._)(this,"subscribers",new Set),(0,y._)(this,"observable",new(Y())(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:D=0}=r;return((((e*365+n*30+s*7+a)*24+l)*60+C)*60+E)*1e3+D}var gi=t(99798),vi=t.n(gi),mi=t(12830),yi=t.n(mi),Ei=t(68203),xi=t(77224),Ci=t(78898);const Ai={seconds:10},Si={milliseconds:50},bi=zn.Z,Oi={api:kn.Z,component:Hn.Z,system:xi.Z,resource:Gn.Z,domain:Wn.Z,location:Kn.Z,user:Sn.Z,group:An.Z,template:Ci.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 co=new WeakMap,nr=new WeakMap,uo=new WeakMap,or=new WeakMap,ho=new WeakMap,$r=new WeakSet,Fr=new WeakSet,Nr=new WeakSet;class fo{static createLocal(){return new fo({renderer:Ur({async:!1})})}static create(e){return new fo(e)}forEntity(e,n){const{entityRef:s,kind:a,entity:l,needsLoad:C}=(0,Be._)(this,$r,wi).call(this,e),E=X=>{const{snapshot:lt}=(0,wt._)(this,ho).render({entityRef:s,loading:X.loading,entity:X.entity,context:n||{}});return{...lt,entityRef:s,Icon:(0,Be._)(this,Nr,Ti).call(this,lt.Icon,a)}};let D;try{D=E({loading:C,entity:l})}catch{D={primaryTitle:s,entityRef:s}}const N=C?new(Y())(X=>{let lt=!1;return Promise.resolve().then(()=>{var pt;return(pt=(0,wt._)(this,uo))===null||pt===void 0?void 0:pt.load(s)}).then(pt=>{if(!lt&&pt&&pt.metadata.etag!==(l==null?void 0:l.metadata.etag)){const yt=E({loading:!1,entity:pt});X.next(yt)}}).catch(()=>{}).finally(()=>{lt||X.complete()}),()=>{lt=!0}}):void 0;return{snapshot:D,update$:N}}constructor(e){(0,en._)(this,$r),(0,en._)(this,Fr),(0,en._)(this,Nr),(0,he._)(this,co,{writable:!0,value:void 0}),(0,he._)(this,nr,{writable:!0,value:void 0}),(0,he._)(this,uo,{writable:!0,value:void 0}),(0,he._)(this,or,{writable:!0,value:void 0}),(0,he._)(this,ho,{writable:!0,value:void 0});var n;const s=(n=e.cacheTtl)!==null&&n!==void 0?n:Ai;var a;const l=(a=e.batchDelay)!==null&&a!==void 0?a:Si;var C;const E=(C=e.renderer)!==null&&C!==void 0?C:Ur({async:!0}),D={};Object.entries(Oi).forEach(([X,lt])=>{D[X.toLocaleLowerCase("en-US")]=lt});var N;if(Object.entries((N=e.kindIcons)!==null&&N!==void 0?N:{}).forEach(([X,lt])=>{D[X.toLocaleLowerCase("en-US")]=lt}),E.async){if(!e.catalogApi)throw new TypeError("Asynchronous rendering requires a catalog API");(0,fe._)(this,uo,(0,Be._)(this,Fr,Pi).call(this,{cacheTtl:s,batchDelay:l,renderer:E,catalogApi:e.catalogApi}))}(0,fe._)(this,nr,er(s)),(0,fe._)(this,co,new Map),(0,fe._)(this,or,D),(0,fe._)(this,ho,E)}}function wi(r){if(typeof r!="string")return{entity:r,kind:r.kind,entityRef:(0,on.eE)(r),needsLoad:!1};const e=(0,wt._)(this,co).get(r),n=e==null?void 0:e.entity,a=(!e||Date.now()-e.updatedAt>(0,wt._)(this,nr))&&(0,wt._)(this,ho).async!==!1&&(0,wt._)(this,uo)!==void 0;return{entity:n,kind:(0,on.of)(r).kind,entityRef:r,needsLoad:a}}function Pi(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,co).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 Ti(r,e){if(r)return r;if(r===!1)return!1;var n;return(n=(0,wt._)(this,or)[e.toLocaleLowerCase("en-US")])!==null&&n!==void 0?n:bi}const Re=(0,ui.r)({id:"catalog",apis:[(0,Zt.n)({api:Mr.A,deps:{discoveryApi:ne.N,fetchApi:$n.g},factory:({discoveryApi:r,fetchApi:e})=>new li({discoveryApi:r,fetchApi:e})}),(0,Zt.n)({api:ci.p,deps:{storageApi:Un},factory:({storageApi:r})=>new pi({storageApi:r})}),(0,Zt.n)({api:di.X,deps:{catalogApi:Mr.A},factory:({catalogApi:r})=>fo.create({catalogApi:r})})],routes:{catalogIndex:yn._Z,catalogEntity:Br.w},externalRoutes:{createComponent:yn.yw,viewTechDoc:yn.jU,createFromTemplate:yn.ql,unregisterRedirect:yn.kR}}),Fa=Re.provide((0,De.P4)({name:"CatalogIndexPage",component:()=>Promise.all([t.e(192),t.e(9814)]).then(t.bind(t,39814)).then(r=>r.CatalogPage),mountPoint:yn._Z})),Ri=Re.provide((0,De.P4)({name:"CatalogEntityPage",component:()=>t.e(8951).then(t.bind(t,78951)).then(r=>r.CatalogEntityPage),mountPoint:Br.w})),Na=Re.provide((0,De.CO)({name:"EntityAboutCard",component:{lazy:()=>Promise.all([t.e(1059),t.e(3510)]).then(t.bind(t,43510)).then(r=>r.AboutCard)}})),Wa=Re.provide((0,De.CO)({name:"EntityLinksCard",component:{lazy:()=>t.e(7750).then(t.bind(t,17750)).then(r=>r.EntityLinksCard)}})),Za=Re.provide((0,De.CO)({name:"EntityLabelsCard",component:{lazy:()=>t.e(5877).then(t.bind(t,85877)).then(r=>r.EntityLabelsCard)}})),ka=Re.provide((0,De.CO)({name:"EntityHasSystemsCard",component:{lazy:()=>t.e(5458).then(t.bind(t,5458)).then(r=>r.HasSystemsCard)}})),za=Re.provide((0,De.CO)({name:"EntityHasComponentsCard",component:{lazy:()=>t.e(1105).then(t.bind(t,1105)).then(r=>r.HasComponentsCard)}})),Ka=Re.provide((0,De.CO)({name:"EntityHasSubcomponentsCard",component:{lazy:()=>t.e(2440).then(t.bind(t,82440)).then(r=>r.HasSubcomponentsCard)}})),Ha=Re.provide((0,De.CO)({name:"EntityHasResourcesCard",component:{lazy:()=>t.e(9770).then(t.bind(t,79770)).then(r=>r.HasResourcesCard)}})),Ga=Re.provide((0,De.CO)({name:"EntityDependsOnComponentsCard",component:{lazy:()=>t.e(9545).then(t.bind(t,19545)).then(r=>r.DependsOnComponentsCard)}})),Va=Re.provide((0,De.CO)({name:"EntityDependencyOfComponentsCard",component:{lazy:()=>t.e(184).then(t.bind(t,40184)).then(r=>r.DependencyOfComponentsCard)}})),Ya=Re.provide((0,De.CO)({name:"EntityDependsOnResourcesCard",component:{lazy:()=>t.e(1032).then(t.bind(t,81032)).then(r=>r.DependsOnResourcesCard)}})),Qa=Re.provide((0,De.CO)({name:"RelatedEntitiesCard",component:{lazy:()=>t.e(3487).then(t.bind(t,33487)).then(r=>r.RelatedEntitiesCard)}})),Ja=Re.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 Ii{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,y._)(this,"configApi",void 0),(0,y._)(this,"discoveryApi",void 0),(0,y._)(this,"identityApi",void 0),this.configApi=e,this.discoveryApi=n,this.identityApi=s}}class Di{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,y._)(this,"configApi",void 0),(0,y._)(this,"discoveryApi",void 0),(0,y._)(this,"identityApi",void 0),this.configApi=e,this.discoveryApi=n,this.identityApi=s}}const Li=[(0,Zt.n)({api:Zr.D,deps:{configApi:ue.D,discoveryApi:ne.N,identityApi:ve.$},factory:({configApi:r,discoveryApi:e,identityApi:n})=>new Ii({configApi:r,discoveryApi:e,identityApi:n})}),(0,Zt.n)({api:Zr.g,deps:{configApi:ue.D,discoveryApi:ne.N,identityApi:ve.$},factory:({configApi:r,discoveryApi:e,identityApi:n})=>new Di({configApi:r,discoveryApi:e,identityApi:n})}),(0,Zt.n)({api:Wr.q,deps:{configApi:ue.D},factory:({configApi:r})=>Wr.a.fromConfig(r)})],ji={backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}},Mi={backend:{baseUrl:"http://localhost:7007"},techdocs:{builder:"external"}};async function Bi(){const r=await fetch("/.detect");return r.ok?(await r.text()).trim()==="techdocs-cli-server":!1}async function Ui(){const r=await xr(),e=await Bi();return[...r,{context:"detected",data:e?ji:Mi}]}var Ke=t(79692),$i=t(58845);const Fi=(0,Ke.Z)({svg:{width:"auto",height:30},path:{fill:"#7df3e1"}});var Ni=()=>{const r=Fi();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 Wi=(0,Ke.Z)({svg:{width:"auto",height:28},path:{fill:"#7df3e1"}});var Zi=()=>{const r=Wi();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,Je.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),Xe=t(62774),Yr=t(41156),ki=t(72779),rn=t.n(ki),zi=t(50023),Qr=t(61837),Ki=t(4190),sr=t(90436),Hi=t(87685),Gi=t(44882),Vi=t(57998);const Jr=(0,d.createContext)({selectedMenuItemIndex:-1,setSelectedMenuItemIndex:()=>{}});var ir=t(93539);const Yi=(0,Ke.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"}})),Qi=r=>{const{to:e,label:n,icon:s,value:a}=r,{sidebarConfig:l}=(0,d.useContext)(Ae.kG),C=Yi({sidebarConfig:l}),E=(0,v.TH)(),{selectedMenuItemIndex:D,setSelectedMenuItemIndex:N}=(0,d.useContext)(Jr),X=(pt,yt)=>{N(yt===D?-1:yt)},lt=a===D&&D>=0||a!==D&&!(D>=0)&&e===E.pathname;return(0,i.jsx)(Vi.Z,{"aria-label":n,label:n,icon:s,component:Gr.rU,to:e||E.pathname,onChange:X,value:a,selected:lt,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)(Qi,{to:n,label:s,icon:a,value:l}):(0,i.jsx)(i.Fragment,{children:e})},_r=(0,Ke.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`})})),Ji=r=>(0,En.orderBy)(r,({props:{priority:e}})=>Number.isInteger(e)?e:-1,"desc"),Xi=d.createElement(Xr).type,_i=({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)(Ki.ZP,{anchor:"bottom",open:n,onClose:s,ModalProps:{BackdropProps:{classes:{root:l.marginMobileSidebar}}},classes:{root:l.marginMobileSidebar,paperAnchorBottom:l.overlay},children:[(0,i.jsxs)(Xe.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)(Hi.Z,{})})]}),(0,i.jsx)(Xe.Z,{component:"nav",children:r})]})},qi=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,lo.v)(n,N=>N.getElements().filter(X=>X.type===Xi));if(n)E.length?E=Ji(E):E.push((0,i.jsx)(Xr,{icon:(0,i.jsx)(Gi.Z,{}),children:n},"default_menu"));else return null;const D=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)(_i,{label:E[l]&&E[l].props.label,open:D,onClose:()=>C(-1),children:E[l]&&E[l].props.children}),(0,i.jsx)(zi.Z,{className:s.root,"data-testid":"mobile-sidebar-root",component:"nav",children:E})]})})},qr=(0,Ke.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 ta=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)(_t=>_t.breakpoints.down("md"),{noSsr:!0}),[D,N]=(0,d.useState)(0),X=(0,d.useRef)(),{isPinned:lt,toggleSidebarPinState:pt}=(0,ir.Pf)(),yt=()=>{lt||a||(X.current&&(clearTimeout(X.current),X.current=void 0),D!==2&&!E&&(X.current=window.setTimeout(()=>{X.current=void 0,N(2)},n),N(1)))},At=()=>{lt||a||(X.current&&(clearTimeout(X.current),X.current=void 0),D===1?N(0):D===2&&(X.current=window.setTimeout(()=>{X.current=void 0,N(0)},s)))},Nt=D===2&&!E||lt,Kt=_t=>{_t?(N(2),pt()):(N(0),pt())};return(0,i.jsxs)("nav",{style:{},"aria-label":"sidebar nav",children:[(0,i.jsx)(na,{}),(0,i.jsx)(Hr,{value:{isOpen:Nt,setOpen:Kt},children:(0,i.jsx)(Xe.Z,{className:C.root,"data-testid":"sidebar-root",onMouseEnter:a?()=>{}:yt,onFocus:a?()=>{}:yt,onMouseLeave:a?()=>{}:At,onBlur:a?()=>{}:At,children:(0,i.jsx)(Xe.Z,{className:rn()(C.drawer,C.drawerWidth,{[C.drawerOpen]:Nt}),children:l})})})]})},ea=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:D}=r,{isMobile:N}=(0,ir.Pf)();return N?(0,i.jsx)(qi,{children:l}):(0,i.jsx)(Ae.kG.Provider,{value:{sidebarConfig:n,submenuConfig:a},children:(0,i.jsx)(ta,{openDelayMs:E,closeDelayMs:D,disableExpandOnHover:C,children:l})})};function na(){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 oa=t(26739),po=t(1667),ra=t(83543),sa=t(59797),es=t(98989);const ia=(0,Ke.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"}),aa=r=>{const{isOpen:e}=rr(),{sidebarConfig:n,submenuConfig:s}=(0,d.useContext)(Ae.kG),a=e?n.drawerWidthOpen:n.drawerWidthClosed,l=ia({left:a,submenuConfig:s}),{isHoveredOn:C}=(0,d.useContext)(Ae.Ag),[E,D]=(0,d.useState)(!1);return(0,d.useEffect)(()=>{D(C)},[C]),(0,i.jsxs)(Xe.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 la=t(19126),ns=t.n(la);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 ca=r=>(0,Ke.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 go(r){return(0,d.useMemo)(()=>ca(r),[r])()}const da=(r,e)=>(0,lo.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 ua=d.createElement(aa).type,ha=d.forwardRef(function({to:e,end:n,style:s,className:a,activeStyle:l,caseSensitive:C,activeClassName:E="active","aria-current":D="page",...N},X){let{pathname:lt}=(0,v.TH)(),{pathname:pt}=(0,v.WU)(e);C||(lt=lt.toLocaleLowerCase("en-US"),pt=pt.toLocaleLowerCase("en-US"));let yt=lt===pt;!yt&&!n&&(yt=lt.startsWith(`${pt}/`));const At=yt?D:void 0;return(0,i.jsx)(g.rU,{...N,to:e,ref:X,"aria-current":At,style:{...s,...yt?l:void 0},className:rn()([typeof a!="function"?a:void 0,yt?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:D,children:N,className:X,...lt}=r,{sidebarConfig:pt}=(0,d.useContext)(Ae.kG),yt=go(pt),{isOpen:At}=rr(),Nt=!At&&l?{display:"flex",marginLeft:"20px"}:{lineHeight:"0"},Kt=(0,i.jsxs)(Xe.Z,{style:Nt,children:[(0,i.jsx)(n,{fontSize:"small"}),!At&&l?(0,i.jsx)(es.Z,{fontSize:"small"}):(0,i.jsx)(i.Fragment,{})]}),_t=(0,i.jsx)(oa.Z,{color:"secondary",variant:"dot",overlap:"circular",invisible:!a,className:rn()({[yt.closedItemIcon]:!At}),children:Kt}),Ee=(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Xe.Z,{"data-testid":"login-button",className:yt.iconContainer,children:_t}),s&&(0,i.jsx)(sr.Z,{variant:"subtitle2",component:"span",className:yt.label,children:s}),(0,i.jsx)("div",{className:yt.secondaryAction,children:N})]}),He=At?Ee:_t,jn={onClick:E,className:rn()(X,yt.root,At?yt.open:yt.closed,ar(r)&&yt.buttonItem,{[yt.highlightable]:!C})},ls=(0,Sr.z)(),{pathname:lr}=(0,v.WU)(!ar(r)&&r.to?r.to:""),cs=(0,d.useCallback)(ja=>{if(!D){const Ma="click",Ba=s!=null?s:"Sidebar Item",Ua=lr?{attributes:{to:lr}}:void 0;ls.captureEvent(Ma,Ba,Ua)}E==null||E(ja)},[ls,s,lr,D,E]);return ar(r)?(0,i.jsx)(x.Z,{role:"button","aria-label":s,...jn,ref:e,onClick:cs,children:He}):(0,i.jsx)(ha,{...jn,activeClassName:yt.selected,to:r.to?r.to:"",ref:e,"aria-label":s||r.to,...lt,onClick:cs,children:He})}),fa=({children:r,...e})=>{const{sidebarConfig:n}=(0,d.useContext)(Ae.kG),s=go(n),[a,l]=(0,d.useState)(!1),C=(0,v.TH)(),E=da(r,C),D=(0,Yr.Z)(pt=>pt.breakpoints.down("sm")),N=()=>{l(!0)},X=()=>{l(!1)},lt=()=>D?a?(0,i.jsx)(sa.Z,{fontSize:"small",className:s.submenuArrow}):(0,i.jsx)(ra.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:X,onTouchStart:a?X:N,onMouseEnter:N,className:rn()(a&&s.highlighted),children:[(0,i.jsx)(rs,{hasSubmenu:!0,className:E?s.selected:"",...e,children:lt()}),a&&r]})})},ss=(0,d.forwardRef)((r,e)=>{const[n]=(0,lo.v)(r.children,s=>s.getElements().filter(a=>a.type===ua));return n?(0,i.jsx)(fa,{...r,children:n}):(0,i.jsx)(rs,{...r,ref:e})});function qa(r){const{sidebarConfig:e}=useContext(SidebarConfigContext),[n,s]=useState(""),a=go(e),l=r.icon?r.icon:SearchIcon,C=()=>{r.onSearch(n),s("")},E=lt=>{lt.key==="Enter"&&(lt.preventDefault(),C())},D=lt=>{s(lt.target.value)},N=lt=>{lt.preventDefault(),lt.stopPropagation()},X=lt=>{C(),lt.preventDefault()};return _jsx(Box,{className:a.searchRoot,children:_jsx(ss,{icon:l,to:r.to,onClick:X,disableHighlight:!0,children:_jsx(TextField,{placeholder:"Search",value:n,onClick:N,onChange:D,onKeyDown:E,className:a.searchContainer,InputProps:{disableUnderline:!0,className:a.searchField},inputProps:{className:a.searchFieldHTMLInput}})})})}const tl=(0,po.Z)("div")({flex:1},{name:"BackstageSidebarSpace"}),el=(0,po.Z)("div")({height:8},{name:"BackstageSidebarSpacer"}),pa=(0,po.Z)("hr")(({theme:r})=>({height:1,width:"100%",background:"#383838",border:"none",margin:r.spacing(1.2,0)}),{name:"BackstageSidebarDivider"}),ga=r=>({overflowY:"auto","&::-webkit-scrollbar":{backgroundColor:r.palette.background.default,width:"5px",borderRadius:"5px"},"&::-webkit-scrollbar-thumb":{backgroundColor:r.palette.text.secondary,borderRadius:"5px"}}),nl=(0,po.Z)("div")(({theme:r})=>{const e=ga(r);return{flex:"0 1 auto",overflowX:"hidden",width:"calc(100% - 5px)",minHeight:"48px",overflowY:"hidden","@media (hover: none)":e,"&:hover":e}}),ol=()=>{const{sidebarConfig:r}=useContext(SidebarConfigContext),e=go(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,{})})})},va=(0,Ke.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}}),ma=()=>{const r=va(),{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)(Ni,{}):(0,i.jsx)(Zi,{})})})},ya=({children:r})=>(0,i.jsxs)(Vr.t,{children:[(0,i.jsxs)(ea,{children:[(0,i.jsx)(ma,{}),(0,i.jsx)(pa,{}),(0,i.jsx)(ss,{icon:$i.Z,to:"/docs/default/component/local",text:"Docs Preview"})]}),r]});var Ea=t(80030),xa=t(32388),Ca=t(4142),Aa=t(65386),Sa=t(14540);const ba=(0,Ke.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 Oa=()=>{const r=(0,wn.h_)(Jn),e=ba(),[n,s]=(0,d.useState)(r.getActiveThemeId()==="dark"?"dark":"light"),a={light:{icon:Ca.Z,title:"Dark theme"},dark:{icon:xa.Z,title:"Light theme"}},{title:l,icon:C}=a[n],E=()=>{s(D=>{const N=D==="light"?"dark":"light";return r.setActiveThemeId(N),N})};return(0,i.jsx)(Xe.Z,{display:"flex",alignItems:"center",mr:2,children:(0,i.jsx)(Ea.ZP,{title:l,arrow:!0,children:(0,i.jsx)(Qr.Z,{size:"small",onClick:E,children:(0,i.jsx)(C,{className:e.headerIcon})})})})},wa=()=>(0,i.jsxs)(p.I6,{children:[(0,i.jsx)(Aa.S,{}),(0,i.jsx)(Sa.F,{withSearch:!1})]}),Pa=(0,i.jsx)(wa,{}),as=ri({apis:Li,configLoader:Ui,plugins:Object.values(o)}),Ta=as.getProvider(),Ra=as.getRouter(),Ia=p.s4.provide((0,u.KY)({name:"ThemeToggleAddon",component:Oa,location:A.o.Header})),Da=(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)(Ri,{})}),(0,i.jsx)(v.AW,{path:"/docs",element:(0,i.jsx)(p.Jl,{}),children:(0,i.jsx)(c.u,{})}),(0,i.jsxs)(v.AW,{path:"/docs/:namespace/:kind/:name/*",element:(0,i.jsx)(p.I6,{}),children:[Pa,(0,i.jsx)(u.DR,{children:(0,i.jsx)(Ia,{})})]})]});var La=()=>(0,i.jsx)(Ta,{children:(0,i.jsx)(Ra,{children:(0,i.jsx)(ya,{children:Da})})});S.createRoot(document.getElementById("root")).render((0,i.jsx)(La,{}))},29651:function(J,T,t){"use strict";t.d(T,{CT:function(){return d},Vt:function(){return S}});var o=t(2784),i=t(96087);function d(p){return(0,i.u)(p,()=>(0,o.createContext)(void 0))}function S(p){return(0,o.useContext)(d(p))}function v(p){return{set(c){globalThis[`__@backstage/${p}__`]=createContext(createVersionedValueMap(c))},reset(){delete globalThis[`__@backstage/${p}__`]}}}},68993:function(J,T,t){"use strict";t.d(T,{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(J,T,t){"use strict";t.d(T,{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,p){const c=d(v);let u=i[c];return u||(u=p(),i[c]=u,u)}},88624:function(J,T,t){"use strict";t.d(T,{A:function(){return i}});var o=t(95965);const i=(0,o.T)({id:"plugin.catalog.service"})},51271:function(J,T,t){"use strict";t.d(T,{X:function(){return i}});var o=t(95965);const i=(0,o.T)({id:"plugin.catalog.entity-presentation"})},68203:function(J,T,t){"use strict";t.d(T,{n:function(){return v}});var o=t(74314),i=t(34106),d=t(72579),S=t.n(d);function v(u,A){const{kind:x,namespace:O,name:m,title:b,description:g,displayName:M,type:R}=p(u),P=(0,o.eE)({kind:x||"unknown",namespace:O||i.zG,name:m||"unknown"}),$=c({kind:x,namespace:O,name:m,context:A}),L=[M,b,$].find(Z=>Z&&typeof Z=="string"),y=[L!==P?P:void 0,R,g].filter(Z=>Z&&typeof Z=="string").join(" | ");return{entityRef:P,primaryTitle:L,secondaryTitle:y||void 0,Icon:void 0}}function p(u){if(typeof u=="string"){let A=u.indexOf(":");const x=u.indexOf("/");x!==-1&&x<A&&(A=-1);const O=A===-1?void 0:u.slice(0,A),m=x===-1?void 0:u.slice(A+1,x),b=u.slice(Math.max(A+1,x+1));return{kind:O,namespace:m,name:b}}if(typeof u=="object"&&u!==null){const A=[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"),b=[S()(u,"metadata.description")].find(R=>R&&typeof R=="string"),g=[S()(u,"spec.profile.displayName")].find(R=>R&&typeof R=="string"),M=[S()(u,"spec.type")].find(R=>R&&typeof R=="string");return{kind:A,namespace:x,name:O,title:m,description:b,displayName:g,type:M}}return{}}function c(u){var A,x,O,m,b;const g=((A=u.kind)===null||A===void 0?void 0:A.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"),$=(b=u.context)===null||b===void 0||(m=b.defaultNamespace)===null||m===void 0?void 0:m.toLocaleLowerCase("en-US");let L=R;return($&&M.toLocaleLowerCase("en-US")!==$||M!==i.zG)&&(L=`${M}/${L}`),P&&g.toLocaleLowerCase("en-US")!==P&&(L=`${g}:${L}`),L}},36802:function(J,T,t){"use strict";t.d(T,{p:function(){return i}});var o=t(95965);const i=(0,o.T)({id:"catalog-react.starred-entities"})},30389:function(J,T,t){"use strict";t.d(T,{_i:function(){return b}});var o=t(52322),i=t(2784),d=t(41156),S=t(60364),v=t(77277),p=t(4190),c=t(62774),u=t(90436),A=t(60905),x=t(36444);const O=g=>{var M;const R=(0,d.Z)(Z=>{var V,et;return Z.breakpoints.down((et=(V=g.options)===null||V===void 0?void 0:V.drawerBreakpoint)!==null&&et!==void 0?et:"md")}),P=(0,S.Z)(),[$,L]=(0,i.useState)(!1);var y;return R?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(v.Z,{style:{marginTop:P.spacing(1),marginLeft:P.spacing(1)},onClick:()=>L(!0),startIcon:(0,o.jsx)(x.Z,{}),children:"Filters"}),(0,o.jsx)(p.ZP,{open:$,onClose:()=>L(!1),anchor:(y=(M=g.options)===null||M===void 0?void 0:M.drawerAnchor)!==null&&y!==void 0?y:"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"}),g.children]})})]}):(0,o.jsx)(A.Z,{item:!0,lg:2,children:g.children})},m=g=>(0,o.jsx)(A.Z,{item:!0,xs:12,lg:10,children:g.children}),b=g=>(0,o.jsx)(A.Z,{container:!0,style:{position:"relative"},children:g.children});b.Filters=O,b.Content=m},77605:function(J,T,t){"use strict";t.d(T,{K:function(){return K}});var o=t(52322),i=t(62774),d=t(90436),S=t(38016),v=t(88013),p=t(2784),c=t(44394),u=t(64279),A=t(88624),x=t(21324),O=t(5806),m=t(19996),b=t(25505);const g=(0,o.jsx)(b.Z,{fontSize:"small"}),M=(0,o.jsx)(m.Z,{fontSize:"small"});function R({selected:k}){return(0,o.jsx)(x.Z,{icon:g,checkedIcon:M,checked:k})}const P=(0,p.memo)(k=>{const{selected:_,value:rt,availableOptions:dt,showCounts:vt}=k,Et=vt?`${rt} (${dt==null?void 0:dt[rt]})`:rt;return(0,o.jsx)(O.Z,{control:(0,o.jsx)(R,{selected:_}),label:Et,onClick:Tt=>Tt.preventDefault()})});var $=t(79692),L=t(86619),y=t(72779),Z=t.n(y);const V=(0,$.Z)({input:{}},{name:"CatalogReactEntityAutocompletePickerInput"});function et(k){const _=V();return(0,o.jsx)(L.Z,{variant:"outlined",...k,className:Z()(_.input,k.className)})}var Y=t(25942);function K(k){var _;const{label:rt,name:dt,path:vt,showCounts:Et,Filter:Tt,InputProps:gt,initialSelectedOptions:xt=[]}=k,{updateFilters:Q,filters:j,queryParameters:{[dt]:z}}=(0,Y.wp)(),q=(0,c.h_)(A.A),{value:st}=(0,u.default)(async()=>{var ht;const mt=vt,{facets:bt}=await q.getEntityFacets({facets:[mt],filter:(ht=j.kind)===null||ht===void 0?void 0:ht.getCatalogFilters()});return Object.fromEntries(bt[mt].map(({value:jt,count:Jt})=>[jt,Jt]))},[j.kind]),it=(0,p.useMemo)(()=>[z].flat().filter(Boolean),[z]);var at;const[nt,St]=(0,p.useState)(it.length?it:(at=(_=j[dt])===null||_===void 0?void 0:_.values)!==null&&at!==void 0?at:xt);(0,p.useEffect)(()=>{it.length&&St(it)},[it]);const G=Object.keys(st!=null?st:{}),H=nt.length&&G.length;(0,p.useEffect)(()=>{Q({[dt]:H?new Tt(nt):void 0})},[dt,H,nt,Tt,Q]);const ut=j[dt];return ut&&typeof ut=="object"&&!("values"in ut)||!G.length||G.length<=1?null:(0,o.jsx)(i.Z,{pb:1,pt:1,children:(0,o.jsxs)(d.Z,{variant:"button",component:"label",children:[rt,(0,o.jsx)(v.ZP,{multiple:!0,disableCloseOnSelect:!0,options:G,value:nt,onChange:(ht,mt)=>St(mt),renderOption:(ht,{selected:mt})=>(0,o.jsx)(P,{selected:mt,value:ht,availableOptions:st,showCounts:!!Et}),size:"small",popupIcon:(0,o.jsx)(S.Z,{"data-testid":`${String(dt)}-picker-expand`}),renderInput:ht=>(0,o.jsx)(et,{...ht,...gt})})]})})}},63833:function(J,T,t){"use strict";t.d(T,{d:function(){return Q}});var o=t(52322),i=t(74314),d=t(79692),S=t(62774),v=t(90436),p=t(5806),c=t(21324),u=t(86619),A=t(19996),x=t(25505),O=t(38016),m=t(88013),b=t(2784),g=t(25942),M=t(4967),R=t(5270),P=t(98685),$=t(62367),L=t(86540),y=t(44394),Z=t(69294),V=t(88624);function et({enabled:j}){const z=(0,y.h_)(V.A),[q]=(0,b.useState)(async()=>{if(!j)return[];const st="relations.ownedBy";return z.getEntityFacets({facets:[st]}).then(it=>it.facets[st].map(at=>at.value).map(at=>{const{kind:nt,name:St,namespace:G}=(0,i.of)(at);return{apiVersion:"backstage.io/v1beta1",kind:nt,metadata:{name:St,namespace:G}}}).sort((at,nt)=>(at.metadata.namespace||"").localeCompare(nt.metadata.namespace||"","en-US")||at.metadata.name.localeCompare(nt.metadata.name,"en-US")||at.kind.localeCompare(nt.kind,"en-US"))).catch(()=>[])});return(0,Z.default)(async(st,it)=>{const at=await q;if(!at)return{items:[]};var nt;const St=(nt=it==null?void 0:it.limit)!==null&&nt!==void 0?nt:20,{text:G,start:H}=Y(st),ut=at.filter(mt=>_(G,mt)),ht=H+St;return{items:ut.slice(0,ht),...k({entities:ut,limit:ht,payload:{text:G,start:ht}})}},[q],{loading:!0,value:{items:[]}})}function Y(j){return K(j)&&j.cursor?JSON.parse(atob(j.cursor)):{text:j.text||"",start:0}}function K(j){return!!j.cursor}function k({entities:j,limit:z,payload:q}){return j.length>z?{cursor:btoa(JSON.stringify(q))}:{}}function _(j,z){var q;const st=j.trim();return z.kind.includes(st)||((q=z.metadata.namespace)===null||q===void 0?void 0:q.includes(st))||z.metadata.name.includes(st)}function rt(){const j=(0,y.h_)(V.A);return(0,Z.default)(async(z,q)=>{const st=z,it=z;var at;const nt=(at=q==null?void 0:q.limit)!==null&&at!==void 0?at:20;if(it.cursor){const G=await j.queryEntities({cursor:it.cursor,limit:nt});return{cursor:G.pageInfo.nextCursor,items:[...it.items,...G.items]}}const St=await j.queryEntities({fullTextFilter:{term:st.text||"",fields:["metadata.name","kind","spec.profile.displayname","metadata.title"]},filter:{kind:["User","Group"]},orderFields:[{field:"metadata.name",order:"asc"}],limit:nt});return{cursor:St.pageInfo.nextCursor,items:St.items}},[],{loading:!0})}var dt=t(89586);function vt({mode:j,initialSelectedOwnersRefs:z}){const q=j==="owners-only",st=rt(),it=et({enabled:q}),[at,nt]=q?it:st;return[at,nt,Et({enabled:!q,initialSelectedOwnersRefs:z})]}function Et({enabled:j,initialSelectedOwnersRefs:z}){const q=(0,b.useRef)({}),st=(0,y.h_)(V.A),[,it]=(0,Z.default)(async()=>{(await st.getEntitiesByRefs({entityRefs:z})).items.forEach(nt=>{nt&&(q.current[(0,i.eE)(nt)]=nt)})},[]);return(0,dt.n)(()=>{j&&z.length>0&&it()}),{getEntity:at=>q.current[at],setEntity:at=>{q.current[(0,i.eE)(at)]=at}}}const Tt=(0,d.Z)({input:{}},{name:"CatalogReactEntityOwnerPicker"}),gt=(0,o.jsx)(x.Z,{fontSize:"small"}),xt=(0,o.jsx)(A.Z,{fontSize:"small"}),Q=j=>{var z,q;const st=Tt(),{mode:it="owners-only"}=j||{},{updateFilters:at,filters:nt,queryParameters:{owners:St}}=(0,g.wp)(),[G,H]=(0,b.useState)(""),ut=(0,b.useMemo)(()=>[St].flat().filter(Boolean),[St]);var ht;const[mt,bt]=(0,b.useState)(ut.length?ut:(ht=(z=nt.owners)===null||z===void 0?void 0:z.values)!==null&&ht!==void 0?ht:[]),[{value:jt,loading:Jt},Wt,Ht]=vt({mode:it,initialSelectedOwnersRefs:mt});(0,R.b)(()=>Wt({text:G}),[G,Wt],250);const Dt=(jt==null?void 0:jt.items)||[];return(0,b.useEffect)(()=>{if(ut.length){const Mt=new M.rf(ut);bt(Mt.values)}},[ut]),(0,b.useEffect)(()=>{at({owners:mt.length?new M.rf(mt):void 0})},[mt,at]),["user","group"].includes(((q=nt.kind)===null||q===void 0?void 0:q.value.toLocaleLowerCase("en-US"))||"")?null:(0,o.jsx)(S.Z,{pb:1,pt:1,children:(0,o.jsxs)(v.Z,{variant:"button",component:"label",children:["Owner",(0,o.jsx)(m.ZP,{multiple:!0,disableCloseOnSelect:!0,loading:Jt,options:Dt,value:mt,getOptionSelected:(Mt,Gt)=>typeof Gt=="string"?(0,i.eE)(Mt)===Gt:Mt===Gt,getOptionLabel:Mt=>{const Gt=typeof Mt=="string"?Ht.getEntity(Mt)||(0,i.of)(Mt,{defaultKind:"group",defaultNamespace:"default"}):Mt;return(0,L.w)(Gt,(0,L.$)(Gt))},onChange:(Mt,Gt)=>{H(""),bt(Gt.map(ee=>{const re=typeof ee=="string"?ee:(0,i.eE)(ee);return typeof ee!="string"&&Ht.setEntity(ee),re}))},filterOptions:Mt=>Mt,renderOption:(Mt,{selected:Gt})=>{const ee=Mt.kind.toLocaleLowerCase("en-US")==="group";return(0,o.jsx)(p.Z,{control:(0,o.jsx)(c.Z,{icon:gt,checkedIcon:xt,checked:Gt}),onClick:re=>re.preventDefault(),label:(0,o.jsxs)(S.Z,{display:"flex",flexWrap:"wrap",alignItems:"center",children:[ee?(0,o.jsx)($.Z,{fontSize:"small"}):(0,o.jsx)(P.Z,{fontSize:"small"}),"\xA0",(0,L.w)(Mt,(0,L.$)(Mt,{defaultKind:Mt.kind}))]})})},size:"small",popupIcon:(0,o.jsx)(O.Z,{"data-testid":"owner-picker-expand"}),renderInput:Mt=>(0,o.jsx)(u.Z,{...Mt,className:st.input,onChange:Gt=>{H(Gt.currentTarget.value)},variant:"outlined"}),ListboxProps:{onScroll:Mt=>{const Gt=Mt.currentTarget;Math.abs(Gt.scrollHeight-Gt.clientHeight-Gt.scrollTop)<1&&(jt!=null&&jt.cursor)&&Wt({items:jt.items,cursor:jt.cursor})},"data-testid":"owner-picker-listbox"}})]})})}},84719:function(J,T,t){"use strict";t.d(T,{d:function(){return $}});var o=t(52322),i=t(74314),d=t(34106),S=t(98864),v=t(37321),p=t(2784),c=t(36434),u=t(79692),A=t(62774),x=t(80030),O=t(44394),m=t(51271),b=t(68203);function g(y,Z,V){const[et,Y]=(0,p.useState)(y);return(0,p.useEffect)(()=>{Y(y);const K=Z==null?void 0:Z.subscribe({next:k=>{Y(k)},complete:()=>{K==null||K.unsubscribe()}});return()=>{K==null||K.unsubscribe()}},V),et}function M(y,Z){const et=(0,O.I_)().get(m.X),Y=[et,JSON.stringify(y),JSON.stringify(Z||null)],K=(0,p.useMemo)(()=>et?et.forEntity(typeof y=="string"||"metadata"in y?y:(0,i.eE)(y),Z):{snapshot:(0,b.n)(y,Z)},Y);return g(K.snapshot,K.update$,[K])}const R=(0,u.Z)(y=>({root:{display:"inline-flex",alignItems:"center"},icon:{marginRight:y.spacing(.5),color:y.palette.text.secondary,lineHeight:0}}),{name:"CatalogReactEntityDisplayName"}),P=y=>{const{entityRef:Z,hideIcon:V,disableTooltip:et,defaultKind:Y,defaultNamespace:K}=y,k=R(),{primaryTitle:_,secondaryTitle:rt,Icon:dt}=M(Z,{defaultKind:Y,defaultNamespace:K});let vt=(0,o.jsx)(o.Fragment,{children:_});return vt=(0,o.jsxs)(A.Z,{component:"span",className:k.root,children:[dt&&!V?(0,o.jsx)(A.Z,{component:"span",className:k.icon,children:(0,o.jsx)(dt,{fontSize:"inherit"})}):null,vt]}),rt&&!et&&(vt=(0,o.jsx)(x.ZP,{enterDelay:1500,title:rt,children:vt})),vt},$=(0,p.forwardRef)((y,Z)=>{const{entityRef:V,defaultKind:et,defaultNamespace:Y,title:K,children:k,hideIcon:_,...rt}=y,dt=L(y.entityRef);var vt;const Et=(vt=k!=null?k:K)!==null&&vt!==void 0?vt:(0,o.jsx)(P,{entityRef:V,defaultKind:et,defaultNamespace:Y,hideIcon:_});return(0,o.jsx)(S.rU,{...rt,ref:Z,to:dt,children:Et})});function L(y){const Z=(0,v.t)(c.w);let V,et,Y;if(typeof y=="string"){const _=(0,i.of)(y);V=_.kind,et=_.namespace,Y=_.name}else"metadata"in y?(V=y.kind,et=y.metadata.namespace,Y=y.metadata.name):(V=y.kind,et=y.namespace,Y=y.name);V=V.toLocaleLowerCase("en-US");var K;et=(K=et==null?void 0:et.toLocaleLowerCase("en-US"))!==null&&K!==void 0?K:d.zG;const k={kind:encodeURIComponent(V),namespace:encodeURIComponent(et),name:encodeURIComponent(Y)};return Z(k)}},51194:function(J,T,t){"use strict";t.d(T,{r:function(){return v}});var o=t(52322),i=t(74314),d=t(2784),S=t(84719);function v(p){const{entityRefs:c,hideIcons:u,...A}=p;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,{...A,entityRef:x,hideIcon:u})]},`${O}.${m}`)})})}},86540:function(J,T,t){"use strict";t.d(T,{$:function(){return S},w:function(){return v}});var o=t(34106),i=t(72579),d=t.n(i);function S(p,c){const u=c==null?void 0:c.defaultKind;let A,x,O;return"metadata"in p?(A=p.kind,x=p.metadata.namespace,O=p.metadata.name):(A=p.kind,x=p.namespace,O=p.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),A=A.toLocaleLowerCase("en-US"),A=u&&u.toLocaleLowerCase("en-US")===A?void 0:A,`${A?`${A}:`:""}${x?`${x}/`:""}${O}`}function v(p,c){for(const u of["spec.profile.displayName","metadata.title"]){const A=d()(p,u);if(A&&typeof A=="string")return A}return c}},97894:function(J,T,t){"use strict";t.d(T,{x:function(){return c}});var o=t(52322),i=t(79692),d=t(2784),S=t(4967),v=t(77605);const p=(0,i.Z)({input:{}},{name:"CatalogReactEntityTagPicker"}),c=u=>{const A=p();return(0,o.jsx)(v.K,{label:"Tags",name:"tags",path:"metadata.tags",Filter:S.Cu,showCounts:u.showCounts,InputProps:{className:A.input}})}},32494:function(J,T,t){"use strict";t.d(T,{E:function(){return Tt}});var o=t(52322),i=t(44394),d=t(6542),S=t(79692),v=t(94339),p=t(90436),c=t(11776),u=t(12231),A=t(86136),x=t(49378),O=t(9520),m=t(47603),b=t(11640),g=t(2784),M=t(4967),R=t(25942),P=t(77186),$=t(76635),L=t(64279),y=t(88624),Z=t(64039),V=t(69294),et=t(38408);function Y(){const gt=(0,i.h_)(P.$),xt=(0,i.h_)(y.A),{filters:Q}=(0,R.wp)(),{value:j,loading:z}=(0,L.default)(async()=>(await gt.getBackstageIdentity()).ownershipEntityRefs,[]),{user:q,owners:st,...it}=Q,{["metadata.name"]:at,...nt}=(0,Z.wq)((0,$.compact)(Object.values(it))),[{value:St,loading:G},H]=(0,V.default)(async ht=>{const mt=K(ht.owners,ht.ownershipEntityRefs);if(mt===void 0)return 0;const{totalItems:bt}=await xt.queryEntities({filter:{...ht.filter,"relations.ownedBy":mt},limit:0});return bt},[],{loading:!0});return(0,et.Z)(()=>{Object.keys(nt).length!==0&&j!==void 0&&H({ownershipEntityRefs:j,owners:st,filter:nt})},[j,st,nt]),{count:St,loading:z||G,filter:(0,g.useMemo)(()=>M.t$.owned(j!=null?j:[]),[j]),ownershipEntityRefs:j}}function K(gt,xt){if(xt===void 0)return;var Q;const j=(Q=gt==null?void 0:gt.values)!==null&&Q!==void 0?Q:[];if(j.length){const z=(0,$.intersection)(j,xt);return z.length===0?void 0:z}return xt}function k(){const gt=(0,i.h_)(y.A),{filters:xt}=(0,R.wp)(),Q=(0,g.useRef)(),j=(0,g.useMemo)(()=>{const{user:st,...it}=xt,at=(0,$.compact)(Object.values(it)),nt=(0,Z.wq)(at),St={filter:nt,limit:0};return Object.keys(nt).length===0?(Q.current=void 0,Q.current):(0,$.isEqual)(St,Q.current)?Q.current:(Q.current=St,St)},[xt]),{value:z,loading:q}=(0,L.default)(async()=>{if(j===void 0)return 0;const{totalItems:st}=await gt.queryEntities(j);return st},[j]);return{count:z,loading:q}}var _=t(74314),rt=t(42870);function dt(){const gt=(0,i.h_)(y.A),{filters:xt}=(0,R.wp)(),{starredEntities:Q}=(0,rt.C)(),j=(0,g.useRef)(),z=(0,g.useMemo)(()=>{const{user:at,...nt}=xt,St=(0,$.compact)(Object.values(nt)),ut={filter:{...(0,Z.wq)(St),["metadata.name"]:Array.from(Q).map(ht=>(0,_.of)(ht).name)},limit:1e3};return(0,$.isEqual)(ut,j.current)?j.current:(j.current=ut,ut)},[xt,Q]),{value:q,loading:st}=(0,L.default)(async()=>Q.size?(await gt.queryEntities(z)).items.map(nt=>(0,_.eE)({kind:nt.kind,namespace:nt.metadata.namespace,name:nt.metadata.name})).filter(nt=>Q.has(nt)).length:0,[z,Q]),it=(0,g.useMemo)(()=>M.t$.starred(Array.from(Q)),[Q]);return{count:q,loading:st,filter:it}}const vt=(0,S.Z)(gt=>({root:{backgroundColor:"rgba(0, 0, 0, .11)",boxShadow:"none",margin:gt.spacing(1,0,1,0)},title:{margin:gt.spacing(1,0,0,1),textTransform:"uppercase",fontSize:12,fontWeight:"bold"},listIcon:{minWidth:30,color:gt.palette.text.primary},menuItem:{minHeight:gt.spacing(6)},groupWrapper:{margin:gt.spacing(1,1,2,1)}}),{name:"CatalogReactUserListPicker"});function Et(gt){return[{name:"Personal",items:[{id:"owned",label:"Owned",icon:m.Z},{id:"starred",label:"Starred",icon:b.Z}]},{name:gt!=null?gt:"Company",items:[{id:"all",label:"All"}]}]}const Tt=gt=>{const{initialFilter:xt,availableFilters:Q}=gt,j=vt(),z=(0,i.h_)(d.D);var q;const st=(q=z.getOptionalString("organization.name"))!==null&&q!==void 0?q:"Company",{filters:it,updateFilters:at,queryParameters:{kind:nt,user:St}}=(0,R.wp)(),G=["starred","all"],H=Et(st).map(re=>({...re,items:re.items.filter(({id:qt})=>["group","user"].some(de=>de===nt)?G.includes(qt):!Q||Q.includes(qt))})).filter(({items:re})=>!!re.length),{count:ut,loading:ht,filter:mt}=Y(),{count:bt}=k(),{count:jt,filter:Jt,loading:Wt}=dt(),Ht=(0,g.useMemo)(()=>[St].flat()[0],[St]),[Dt,Mt]=(0,g.useState)(Ht!=null?Ht:xt),Gt=(0,g.useMemo)(()=>({all:bt,starred:jt,owned:ut}),[jt,ut,bt]);(0,g.useEffect)(()=>{Ht&&Mt(Ht)},[Ht]);const ee=ht||Wt;return(0,g.useEffect)(()=>{!ee&&Dt&&Dt!=="all"&&Gt[Dt]===0&&Mt("all")},[ee,Gt,Dt,Mt]),(0,g.useEffect)(()=>{if(!Dt||ee)return;at({user:(()=>Dt==="owned"?mt:Dt==="starred"?Jt:M.t$.all())()})},[Dt,Jt,mt,at,ee]),(0,o.jsx)(v.Z,{className:j.root,children:H.map(re=>(0,o.jsxs)(g.Fragment,{children:[(0,o.jsx)(p.Z,{variant:"subtitle2",component:"span",className:j.title,children:re.name}),(0,o.jsx)(v.Z,{className:j.groupWrapper,children:(0,o.jsx)(c.Z,{disablePadding:!0,dense:!0,role:"menu","aria-label":re.name,children:re.items.map(qt=>{var de,Ie;return(0,o.jsxs)(u.Z,{role:"none presentation",divider:!0,onClick:()=>Mt(qt.id),selected:qt.id===((de=it.user)===null||de===void 0?void 0:de.value),className:j.menuItem,disabled:Gt[qt.id]===0,"data-testid":`user-picker-${qt.id}`,tabIndex:0,ContainerProps:{role:"menuitem"},children:[qt.icon&&(0,o.jsx)(A.Z,{className:j.listIcon,children:(0,o.jsx)(qt.icon,{fontSize:"small"})}),(0,o.jsx)(x.Z,{children:(0,o.jsxs)(p.Z,{variant:"body1",children:[qt.label," "]})}),(0,o.jsx)(O.Z,{children:(Ie=Gt[qt.id])!==null&&Ie!==void 0?Ie:"-"})]},qt.id)})})})]},re.name))})}},4967:function(J,T,t){"use strict";t.d(T,{A5:function(){return M},Bf:function(){return p},Cu:function(){return c},IZ:function(){return b},Qe:function(){return O},SZ:function(){return u},mM:function(){return g},rf:function(){return A},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 p{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($=>{var L;return((L=P.metadata.tags)!==null&&L!==void 0?L:[]).includes($)})}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 $=this.toUpperArray(this.value.split(/\s/)),L=this.toUpperArray([P.metadata.tags]),y=this.toUpperArray([P.metadata.name,P.metadata.title]);for(const Z of $)if(L.every(V=>V!==Z)&&y.every(V=>!V.includes(Z)))return!1;return!0}toUpperArray(P){return P.flat().filter($=>Boolean($)).map($=>$.toLocaleUpperCase("en-US"))}constructor(P){(0,o._)(this,"value",void 0),this.value=P}}class A{getCatalogFilters(){return{"relations.ownedBy":this.values}}filterEntity(P){return this.values.some($=>(0,S.h)(P,i.S4).some(L=>(0,d.eE)(L)===$))}toQueryValue(){return this.values}constructor(P){(0,o._)(this,"values",void 0),this.values=P.reduce(($,L)=>{try{return $.push((0,d.eE)((0,d.of)(L,{defaultKind:"Group"}))),$}catch{return $}},[])}}class x{getCatalogFilters(){return{"spec.lifecycle":this.values}}filterEntity(P){return this.values.some($=>{var L;return((L=P.spec)===null||L===void 0?void 0:L.lifecycle)===$})}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($=>P.metadata.namespace===$)}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 $,L;return{"metadata.name":(L=($=this.refs)===null||$===void 0?void 0:$.map(y=>(0,d.of)(y).name))!==null&&L!==void 0?L:[]}}return{}}filterEntity(P){if(this.value==="starred"){var $,L;return(L=($=this.refs)===null||$===void 0?void 0:$.includes((0,d.eE)(P)))!==null&&L!==void 0?L:!0}if(this.value==="owned"){var y;const V=(0,S.h)(P,i.S4);var Z;return(Z=(y=this.refs)===null||y===void 0?void 0:y.some(et=>V.some(Y=>(0,d.eE)(Y)===et)))!==null&&Z!==void 0?Z:!1}return!0}toQueryValue(){return this.value}constructor(P,$){(0,o._)(this,"value",void 0),(0,o._)(this,"refs",void 0),this.value=P,this.refs=$}}class b{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,$,L){(0,o._)(this,"value",void 0),(0,o._)(this,"isOwnedEntity",void 0),(0,o._)(this,"isStarredEntity",void 0),this.value=P,this.isOwnedEntity=$,this.isStarredEntity=L}}class g{getCatalogFilters(){return this.value?{"metadata.annotations.backstage.io/orphan":String(this.value)}:{}}filterEntity(P){var $;const L=($=P.metadata.annotations)===null||$===void 0?void 0:$["backstage.io/orphan"];return L!==void 0&&this.value.toString()===L}constructor(P){(0,o._)(this,"value",void 0),this.value=P}}class M{filterEntity(P){var $,L;const y=(P==null||(L=P.status)===null||L===void 0||($=L.items)===null||$===void 0?void 0:$.length)>0;return y!==void 0&&this.value===y}constructor(P){(0,o._)(this,"value",void 0),this.value=P}}},25942:function(J,T,t){"use strict";t.d(T,{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),p=t(2784),c=t(73557),u=t(69294),A=t(48760),x=t(90736),O=t(88624),m=t(64039),b=t(44394);const g=(0,p.createContext)(void 0),M=P=>{const $=(0,x.default)(),L=(0,b.h_)(O.A),[y,Z]=(0,p.useState)({}),V=(0,c.TH)(),et=P.pagination===!0||typeof P.pagination=="object",Y=P.pagination&&typeof P.pagination=="object"&&typeof P.pagination.limit=="number"?P.pagination.limit:20,{queryParameters:K,cursor:k}=(0,p.useMemo)(()=>{const z=v().parse(V.search,{ignoreQueryPrefix:!0});var q;return{queryParameters:(q=z.filters)!==null&&q!==void 0?q:{},cursor:typeof z.cursor=="string"?z.cursor:void 0}},[V]),[_,rt]=(0,p.useState)(k),[dt,vt]=(0,p.useState)(()=>({appliedFilters:{},entities:[],backendEntities:[],pageInfo:et?{}:void 0})),[{loading:Et,error:Tt},gt]=(0,u.default)(async()=>{const z=(0,i.compact)(Object.values(y)),q=Object.keys(y).reduce((it,at)=>{const nt=y[at];return nt!=null&&nt.toQueryValue&&(it[at]=nt.toQueryValue()),it},{});if(et)if(_){if(_!==dt.appliedCursor){const it=(0,m.Gz)(z),at=await L.queryEntities({cursor:_,limit:Y});vt({appliedFilters:y,appliedCursor:_,backendEntities:at.items,entities:at.items.filter(it),pageInfo:at.pageInfo})}}else{const it=(0,m.Gz)(z),at=(0,m.wq)(z),nt=(0,m.wq)((0,i.compact)(Object.values(dt.appliedFilters)));if(!(0,i.isEqual)(nt,at)){const St=await L.queryEntities({filter:at,limit:Y,orderFields:[{field:"metadata.name",order:"asc"}]});vt({appliedFilters:y,backendEntities:St.items,entities:St.items.filter(it),pageInfo:St.pageInfo})}}else{const it=(0,m.Gz)(z),at=(0,m.Oq)(z),nt=(0,m.Oq)((0,i.compact)(Object.values(dt.appliedFilters)));if((0,i.isEqual)(nt,at))vt({appliedFilters:y,backendEntities:dt.backendEntities,entities:dt.backendEntities.filter(it)});else{const St=await L.getEntities({filter:at});vt({appliedFilters:y,backendEntities:St.items,entities:St.items.filter(it)})}}if($()){var st;const it=v().parse(V.search,{ignoreQueryPrefix:!0}),at=v().stringify({...it,filters:q,cursor:_},{addQueryPrefix:!0,arrayFormat:"repeat"}),nt=`${window.location.pathname}${at}`;(st=window.history)===null||st===void 0||st.replaceState(null,document.title,nt)}},[L,K,y,dt,_,et],{loading:!0});(0,A.Z)(gt,10,[y,_]);const xt=(0,p.useCallback)(z=>{rt(void 0),Z(q=>{const st=typeof z=="function"?z(q):z;return{...q,...st}})},[]),Q=(0,p.useMemo)(()=>{var z,q;if(!et)return;const st=(z=dt.pageInfo)===null||z===void 0?void 0:z.prevCursor,it=(q=dt.pageInfo)===null||q===void 0?void 0:q.nextCursor;return{prev:st?()=>rt(st):void 0,next:it?()=>rt(it):void 0}},[et,dt.pageInfo]),j=(0,p.useMemo)(()=>({filters:dt.appliedFilters,entities:dt.entities,backendEntities:dt.backendEntities,updateFilters:xt,queryParameters:K,loading:Et,error:Tt,pageInfo:Q}),[dt,xt,K,Et,Tt,Q]);return(0,o.jsx)(g.Provider,{value:j,children:P.children})};function R(){const P=(0,p.useContext)(g);if(!P)throw new Error("useEntityList must be used within EntityListProvider");return P}},42870:function(J,T,t){"use strict";t.d(T,{C:function(){return c}});var o=t(74314),i=t(44394),d=t(2784),S=t(72164),v=t(36802);function p(u){return typeof u=="string"?u:(0,o.eE)(u)}function c(){const u=(0,i.h_)(v.p),A=(0,S.Z)((0,d.useMemo)(()=>u.starredEntitie$(),[u]),new Set),x=(0,d.useCallback)(m=>A.has(p(m)),[A]),O=(0,d.useCallback)(m=>u.toggleStarred(p(m)).then(),[u]);return{starredEntities:A,toggleStarredEntity:O,isStarredEntity:x}}},36434:function(J,T,t){"use strict";t.d(T,{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 p,c;return{kind:v.kind.toLocaleLowerCase("en-US"),namespace:(c=(p=v.metadata.namespace)===null||p===void 0?void 0:p.toLocaleLowerCase("en-US"))!==null&&c!==void 0?c:DEFAULT_NAMESPACE,name:v.metadata.name}}},64039:function(J,T,t){"use strict";t.d(T,{Gz:function(){return S},Oq:function(){return d},wq:function(){return i}});var o=t(4967);function i(v){return v.reduce((p,c)=>({...p,...c.getCatalogFilters?c.getCatalogFilters():{}}),{})}function d(v){const p={};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(p,((u=c.getCatalogFilters)===null||u===void 0?void 0:u.call(c))||{})}),p}function S(v){return p=>v.every(c=>!c.filterEntity||c.filterEntity(p))}},75435:function(J,T,t){"use strict";t.d(T,{h:function(){return i}});var o=t(74314);function i(d,S,v){var p;let c=(d==null||(p=d.relations)===null||p===void 0?void 0:p.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(J,T,t){"use strict";t.d(T,{yw:function(){return u},ql:function(){return x},_Z:function(){return m},kR:function(){return O},jU:function(){return A}});var o=t(87612),i=t(92918);let d=i.K,S=d;class v{toString(){return`routeRef{type=external,id=${this.id}}`}constructor(g,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=g,this.params=M,this.optional=R,this[d]="external"}}function p(b){var g;return new v(b.id,(g=b.params)!==null&&g!==void 0?g:[],Boolean(b.optional))}var c=t(30283);const u=p({id:"create-component",optional:!0}),A=p({id:"view-techdoc",optional:!0,params:["namespace","kind","name"]}),x=p({id:"create-from-template",optional:!0,params:["namespace","templateName"]}),O=p({id:"catalog:unregister-redirect",optional:!0}),m=(0,c.N)({id:"catalog"})},76079:function(J,T,t){"use strict";t.d(T,{F:function(){return v}});var o=t(52322),i=t(2784),d=t(79692);const S=(0,d.Z)(()=>({highlight:{}}),{name:"BackstageHighlightedSearchResultText"}),v=p=>{const{text:c,preTag:u,postTag:A}=p,x=S(),O=(0,i.useMemo)(()=>c.split(new RegExp(`(${u}.+?${A})`)),[A,u,c]);return(0,o.jsx)(o.Fragment,{children:O.map((m,b)=>m.includes(u)?(0,o.jsx)("mark",{className:x.highlight,children:m.replace(new RegExp(`${u}|${A}`,"g"),"")},b):m)})}},53945:function(J,T,t){"use strict";t.d(T,{E5:function(){return A}});var o=t(52322),i=t(2784),d=t(62369),S=t(82963),v=t(38402);const p="search.results.list.items.extensions.v1",c=(m,b)=>{for(const g of m){if(!isValidElement(g))continue;const M=getComponentData(g,p);if(M!=null&&M(b))return cloneElement(g,{rank:b.rank,highlight:b.highlight,result:b.document,...g.props})}return null},u=m=>{const{rank:b,result:g,noTrack:M,children:R,alignItems:P="flex-start",...$}=m,L=(0,d.z)(),y=(0,i.useCallback)(()=>{M||g&&L.captureEvent("discover",g.title,{attributes:{to:g.location},value:b})},[b,g,M,L]);return(0,o.jsx)(v.Z,{divider:!0,alignItems:P,onClickCapture:y,...$,children:R})},A=m=>{const{name:b,component:g,predicate:M=()=>!0}=m;return(0,S.YO)({name:b,component:{lazy:()=>g().then(R=>P=>(0,o.jsx)(u,{rank:P.rank,result:P.result,noTrack:P.noTrack,children:(0,i.createElement)(R,P)}))},data:{[p]:M}})},x=m=>{const b=useElementFilter(m,g=>g.selectByComponentData({key:p}).getElements(),[m]);return useCallback((g,M)=>{const R=c(b,g);return _jsx(Fragment,{children:R!=null?R:_jsx(u,{rank:g.rank,result:g.document,children:_jsx(DefaultResultListItem,{rank:g.rank,highlight:g.highlight,result:g.document})})},M)},[b])},O=m=>{const{results:b,children:g,...M}=m,R=x(g);return _jsx(List,{...M,children:b.map(R)})}},2296:function(J,T,t){"use strict";t.d(T,{$L:function(){return M},DR:function(){return A},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),p=t(2532);const c="techdocs.addons.addon.v1",u="techdocs.addons.wrapper.v1",A=()=>null;(0,S.R)(A,u,!0);const x=R=>`${c}.${R.toLocaleLowerCase("en-US")}`;function O(R){const{name:P,component:$}=R;return(0,v.YO)({name:P,component:{sync:L=>(0,o.jsx)($,{...L})},data:{[c]:R,[x(P)]:!0}})}const m=(R,P)=>R.selectByComponentData({key:P}).getElements()[0],b=R=>R.selectByComponentData({key:u}).selectByComponentData({key:c}),g=R=>R.selectByComponentData({key:u}).findComponentData({key:c}),M=()=>{const R=(0,d.pC)(),P=(0,p.v)(R,b),$=(0,p.v)(R,g),L=(0,i.useCallback)(V=>{if(!P||!V)return null;const et=x(V.name);var Y;return(Y=m(P,et))!==null&&Y!==void 0?Y:null},[P]),y=(0,i.useCallback)(V=>{const et=$.find(Y=>Y.name===V);return et?L(et):null},[$,L]),Z=(0,i.useCallback)(V=>{const et=$.filter(Y=>Y.location===V);return et.length?et.map(L):null},[$,L]);return{renderComponentByName:y,renderComponentsByLocation:Z}}},58496:function(J,T,t){"use strict";t.d(T,{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(J,T,t){"use strict";t.d(T,{Z:function(){return R},x:function(){return P}});var o=t(52322),i=t(2784),d=t(64279),S=t(77446),v=t(74314),p=t(29651),c=t(68993),u=t(44394),A=t(6542),x=t(72388),O=t(58496);function m($,L){return L.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")||($.kind=$.kind.toLocaleLowerCase(),$.name=$.name.toLocaleLowerCase(),$.namespace=$.namespace.toLocaleLowerCase()),$}const b=($,L)=>(0,v.eE)($)===(0,v.eE)(L),g={title:"",subtitle:"",setTitle:()=>{},setSubtitle:()=>{},setShadowRoot:()=>{},metadata:{loading:!0},entityMetadata:{loading:!0},entityRef:{kind:"",name:"",namespace:""}},M=(0,p.CT)("techdocs-reader-page-context"),R=(0,i.memo)($=>{const{entityRef:L,children:y}=$,Z=(0,u.h_)(O.g),V=(0,u.h_)(A.D),et=(0,d.default)(async()=>Z.getEntityMetadata(L),[L]),Y=(0,S.Z)(async()=>Z.getTechDocsMetadata(L),[L]),[K,k]=(0,i.useState)(g.title),[_,rt]=(0,i.useState)(g.subtitle),[dt,vt]=(0,i.useState)(g.shadowRoot);(0,i.useEffect)(()=>{dt&&!Y.value&&!Y.loading&&Y.retry()},[Y.value,Y.loading,dt,Y.retry,Y]);const Et={metadata:Y,entityRef:m(L,V),entityMetadata:et,shadowRoot:dt,setShadowRoot:vt,title:K,setTitle:k,subtitle:_,setSubtitle:rt},Tt=(0,c.E)({1:Et});return(0,o.jsx)(x.fC,{attributes:{entityRef:(0,v.eE)(L)},children:(0,o.jsx)(M.Provider,{value:Tt,children:y instanceof Function?y(Et):y})})},($,L)=>b($.entityRef,L.entityRef)),P=()=>{const $=(0,i.useContext)(M);if($===void 0)return g;const L=$.atVersion(1);if(L===void 0)throw new Error("No context found for version 1.");return L}},57058:function(J,T,t){"use strict";t.d(T,{o:function(){return o}});const o=Object.freeze({Header:"Header",Subheader:"Subheader",Settings:"Settings",PrimarySidebar:"PrimarySidebar",SecondarySidebar:"SecondarySidebar",Content:"Content"})},51953:function(J,T,t){"use strict";t.d(T,{D:function(){return o}});function o(i,d){return d.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")?i:i.toLocaleLowerCase("en-US")}},29895:function(J,T,t){"use strict";t.d(T,{u:function(){return Y}});var o=t(52322),i=t(2784),d=t(42398),S=t(30706),v=t(13788),p=t(25942),c=t(30389),u=t(32494),A=t(63833),x=t(97894),O=t(42081),m=t(88797);class b{getCatalogFilters(){return{"metadata.annotations.backstage.io/techdocs-ref":m.n}}}const g=()=>{const{updateFilters:K}=(0,p.wp)();return(0,i.useEffect)(()=>{K({techdocs:new b})},[K]),null};var M=t(95074),R=t(76635),P=t(538),$=t(9791),L=t(42870),y=t(16787),Z=t(45342),V=t(49079);const et=K=>{var k;const{columns:_,actions:rt,options:dt}=K,{loading:vt,error:Et,entities:Tt,filters:gt}=(0,p.wp)(),{isStarredEntity:xt,toggleStarredEntity:Q}=(0,L.C)(),[,j]=(0,M.Z)();var z;const q=(0,R.capitalize)((z=(k=gt.user)===null||k===void 0?void 0:k.value)!==null&&z!==void 0?z:"all"),st=[Z.n.createCopyDocsUrlAction(j),Z.n.createStarEntityAction(xt,Q)];return Et?(0,o.jsx)(P.G,{severity:"error",title:"Could not load available documentation.",children:(0,o.jsx)($.O,{language:"text",text:Et.toString()})}):(0,o.jsx)(y.H,{title:q,entities:Tt,loading:vt,actions:rt||st,columns:_,options:dt})};et.columns=V.N,et.actions=Z.n;const Y=K=>{const{initialFilter:k="owned",columns:_,actions:rt}=K;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)(p.UO,{children:(0,o.jsxs)(c._i,{children:[(0,o.jsxs)(c._i.Filters,{children:[(0,o.jsx)(g,{}),(0,o.jsx)(u.E,{initialFilter:k}),(0,o.jsx)(A.d,{}),(0,o.jsx)(x.x,{})]}),(0,o.jsx)(c._i.Content,{children:(0,o.jsx)(et,{actions:rt,columns:_})})]})})]})})}},16787:function(J,T,t){"use strict";t.d(T,{H:function(){return P}});var o=t(52322),i=t(2784),d=t(95074),S=t(37321),v=t(44394),p=t(6542),c=t(8709),u=t(75435),A=t(86540),x=t(95573),O=t(34378),m=t(70249),b=t(15929),g=t(45342),M=t(49079),R=t(51953);const P=$=>{const{entities:L,title:y,loading:Z,columns:V,actions:et,options:Y}=$,[,K]=(0,d.Z)(),k=(0,S.t)(x.Fw),_=(0,v.h_)(p.D);if(!L)return null;const rt=L.map(gt=>{const xt=(0,u.h)(gt,c.S4);var Q;return{entity:gt,resolved:{docsUrl:k({namespace:(0,R.D)((Q=gt.metadata.namespace)!==null&&Q!==void 0?Q:"default",_),kind:(0,R.D)(gt.kind,_),name:(0,R.D)(gt.metadata.name,_)}),ownedByRelations:xt,ownedByRelationsTitle:xt.map(j=>(0,A.$)(j,{defaultKind:"group"})).join(", ")}}}),dt=[M.N.createNameColumn(),M.N.createOwnerColumn(),M.N.createKindColumn(),M.N.createTypeColumn()],vt=[g.n.createCopyDocsUrlAction(K)],Et=20,Tt=rt&&rt.length>Et;return(0,o.jsx)(o.Fragment,{children:Z||rt&&rt.length>0?(0,o.jsx)(O.i,{isLoading:Z,options:{paging:Tt,pageSize:Et,search:!0,actionsColumnIndex:-1,...Y},data:rt,columns:V||dt,actions:et||vt,title:y?`${y} (${rt.length})`:`All (${rt.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)(b.Q,{color:"primary",to:"https://backstage.io/docs/features/techdocs/getting-started",variant:"contained",children:"DOCS"})})})};P.columns=M.N,P.actions=g.n},45342:function(J,T,t){"use strict";t.d(T,{n:function(){return u}});var o=t(52322),i=t(2784),d=t(39981),S=t(2337),v=t(11640),p=t(28347);const c=(0,S.Z)({root:{color:"#f3ba37"}})(v.Z),u={createCopyDocsUrlAction(A){return x=>({icon:()=>(0,o.jsx)(d.Z,{fontSize:"small"}),tooltip:"Click to copy documentation link to clipboard",onClick:()=>A(`${window.location.origin}${x.resolved.docsUrl}`)})},createStarEntityAction(A,x){return O=>{const m=O.entity,b=A(m);return{cellStyle:{paddingLeft:"1em"},icon:()=>b?(0,o.jsx)(c,{}):(0,o.jsx)(p.Z,{}),tooltip:b?"Remove from favorites":"Add to favorites",onClick:()=>x(m)}}}}},49079:function(J,T,t){"use strict";t.d(T,{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 p(O){const{value:m,subvalue:b}=O,g=v();return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.Z,{className:g.value,children:m}),(0,o.jsx)(d.Z,{className:g.subvalue,children:b})]})}var c=t(98864),u=t(51194);function A(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)(p,{value:(0,o.jsx)(c.rU,{to:O.resolved.docsUrl,children:A(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(J,T,t){"use strict";t.d(T,{j:function(){return p}});var o=t(52322),i=t(2784),d=t(32166),S=t(44394),v=t(6542);const p=c=>{const{children:u}=c,A=(0,S.h_)(v.D);var x;const O=`Documentation available in ${(x=A.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(J,T,t){"use strict";t.d(T,{Jl:function(){return Tt},I6:function(){return gt},s4:function(){return rt}});var o=t(58496),i=t(87612),d=t(41385),S=t(48998),v=t(30474);class p extends Error{constructor(j,z){var q,st;let it=j;if(z!==void 0){const at=(0,S.n)(z);it?it+=`; caused by ${at}`:it=`caused by ${at}`}super(it),(0,i._)(this,"cause",void 0),(q=(st=Error).captureStackTrace)===null||q===void 0||q.call(st,this,this.constructor),(!this.name||this.name==="Error")&&this.constructor.name!=="Error"&&(this.name=this.constructor.name),this.cause=(0,v.V)(z)?z:void 0}}class c extends null{constructor(...j){super(...j),_define_property(this,"name","InputError")}}class u extends null{constructor(...j){super(...j),_define_property(this,"name","AuthenticationError")}}class A extends null{constructor(...j){super(...j),_define_property(this,"name","NotAllowedError")}}class x extends p{constructor(...j){super(...j),(0,i._)(this,"name","NotFoundError")}}class O extends null{constructor(...j){super(...j),_define_property(this,"name","ConflictError")}}class m extends null{constructor(...j){super(...j),_define_property(this,"name","NotModifiedError")}}class b extends null{constructor(...j){super(...j),_define_property(this,"name","NotImplementedError")}}class g extends null{}class M extends null{constructor(j,z){super(j,z),this.name=isError(z)?z.name:"Error"}}var R=t(54847);class P{async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getTechDocsMetadata(j){const{kind:z,namespace:q,name:st}=j,at=`${await this.getApiOrigin()}/metadata/techdocs/${q}/${z}/${st}`,nt=await this.fetchApi.fetch(`${at}`);if(!nt.ok)throw await d.V.fromResponse(nt);return await nt.json()}async getEntityMetadata(j){const{kind:z,namespace:q,name:st}=j,at=`${await this.getApiOrigin()}/metadata/entity/${q}/${z}/${st}`,nt=await this.fetchApi.fetch(`${at}`);if(!nt.ok)throw await d.V.fromResponse(nt);return await nt.json()}constructor(j){(0,i._)(this,"configApi",void 0),(0,i._)(this,"discoveryApi",void 0),(0,i._)(this,"fetchApi",void 0),this.configApi=j.configApi,this.discoveryApi=j.discoveryApi,this.fetchApi=j.fetchApi}}class ${async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getStorageUrl(){var j;return(j=this.configApi.getOptionalString("techdocs.storageUrl"))!==null&&j!==void 0?j:`${await this.discoveryApi.getBaseUrl("techdocs")}/static/docs`}async getBuilder(){return this.configApi.getString("techdocs.builder")}async getEntityDocs(j,z){const{kind:q,namespace:st,name:it}=j,nt=`${await this.getStorageUrl()}/${st}/${q}/${it}/${z}`,St=await this.fetchApi.fetch(`${nt.endsWith("/")?nt:`${nt}/`}index.html`);let G="";switch(St.status){case 404:throw G="Page not found. ",z||(G+="This could be because there is no index.md file in the root of the docs directory of this repository."),new x(G);case 500:throw G="Could not generate documentation or an error in the TechDocs backend. ",new Error(G);default:break}return St.text()}async syncEntityDocs(j,z=()=>{}){const{kind:q,namespace:st,name:it}=j,nt=`${await this.getApiOrigin()}/sync/${st}/${q}/${it}`,{token:St}=await this.identityApi.getCredentials();return new Promise((G,H)=>{const ut=new R.EventSourcePolyfill(nt,{withCredentials:!0,headers:St?{Authorization:`Bearer ${St}`}:{}});ut.addEventListener("log",ht=>{ht.data&&z(JSON.parse(ht.data))}),ut.addEventListener("finish",ht=>{let mt=!1;ht.data&&({updated:mt}=JSON.parse(ht.data)),G(mt?"updated":"cached")}),ut.onerror=ht=>{switch(ut.close(),ht.status){case 404:H(new x(ht.message));return;default:H(new Error(ht.data));return}}})}async getBaseUrl(j,z,q){const{kind:st,namespace:it,name:at}=z,St=`${await this.getApiOrigin()}/static/docs/${it}/${st}/${at}/${q}`;return new URL(j,St.endsWith("/")?St:`${St}/`).toString()}constructor(j){(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=j.configApi,this.discoveryApi=j.discoveryApi,this.identityApi=j.identityApi,this.fetchApi=j.fetchApi}}var L=t(95573),y=t(15006),Z=t(42380),V=t(6542),et=t(96727),Y=t(77186),K=t(85094),k=t(82963),_=t(53945);const rt=(0,y.r)({id:"techdocs",apis:[(0,Z.n)({api:o.D,deps:{configApi:V.D,discoveryApi:et.N,identityApi:Y.$,fetchApi:K.g},factory:({configApi:Q,discoveryApi:j,identityApi:z,fetchApi:q})=>new $({configApi:Q,discoveryApi:j,identityApi:z,fetchApi:q})}),(0,Z.n)({api:o.g,deps:{configApi:V.D,discoveryApi:et.N,fetchApi:K.g},factory:({configApi:Q,discoveryApi:j,fetchApi:z})=>new P({configApi:Q,discoveryApi:j,fetchApi:z})})],routes:{root:L._Z,docRoot:L.Fw,entityContent:L.pd}}),dt=rt.provide((0,k.P4)({name:"TechdocsPage",component:()=>t.e(8096).then(t.bind(t,8096)).then(Q=>Q.Router),mountPoint:L._Z})),vt=rt.provide((0,k.P4)({name:"EntityTechdocsContent",component:()=>t.e(8096).then(t.bind(t,8096)).then(Q=>Q.EmbeddedDocsRouter),mountPoint:L.pd})),Et=rt.provide((0,k.P4)({name:"TechDocsCustomHome",component:()=>t.e(4109).then(t.bind(t,44109)).then(Q=>Q.TechDocsCustomHome),mountPoint:L._Z})),Tt=rt.provide((0,k.P4)({name:"TechDocsIndexPage",component:()=>t.e(8662).then(t.bind(t,18662)).then(Q=>Q.TechDocsIndexPage),mountPoint:L._Z})),gt=rt.provide((0,k.P4)({name:"TechDocsReaderPage",component:()=>t.e(5914).then(t.bind(t,35914)).then(Q=>Q.TechDocsReaderPage),mountPoint:L.Fw})),xt=rt.provide((0,_.E5)({name:"TechDocsSearchResultListItem",component:()=>Promise.resolve().then(t.bind(t,55511)).then(Q=>Q.TechDocsSearchResultListItem),predicate:Q=>Q.type==="techdocs"}))},14540:function(J,T,t){"use strict";t.d(T,{F:function(){return ko}});var o=t(52322),i=t(2784),d=t(79692),S=t(60905),v=t(68979),p=t(70882),c=t(50236),u=t(19219),A=t(55015);const x="TECH_DOCS_SHADOW_DOM_STYLE_LOAD",O=f=>{(0,i.useEffect)(()=>{if(!f)return()=>{};const w=f.querySelectorAll('head > link[rel="stylesheet"]');var B;let F=(B=w==null?void 0:w.length)!==null&&B!==void 0?B:0;const tt=new CustomEvent(x);if(!F)return f.dispatchEvent(tt),()=>{};const ot=()=>{--F===0&&f.dispatchEvent(tt)};return w==null||w.forEach(ft=>{ft.addEventListener("load",ot)}),()=>{w==null||w.forEach(ft=>{ft.removeEventListener("load",ot)})}},[f])},m=f=>{const[w,B]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{if(!f)return()=>{};B(!0);const F=f.style;F.setProperty("opacity","0");const tt=()=>{B(!1),F.setProperty("opacity","1")};return f.addEventListener(x,tt),()=>{f.removeEventListener(x,tt)}},[f]),w},b=f=>{const{element:w,onAppend:B,children:F}=f,[tt,ot]=(0,i.useState)((0,p.Ue)({...(0,c.Z)(),insertionPoint:void 0}));O(w);const ft=m(w),Ct=(0,i.useCallback)(It=>{if(!w||!It)return;ot((0,p.Ue)({...(0,c.Z)(),insertionPoint:w.querySelector("head")||void 0}));let $t=It.shadowRoot;$t||($t=It.attachShadow({mode:"open"})),$t.replaceChildren(w),typeof B=="function"&&B($t)},[w,B]);return(0,o.jsxs)(o.Fragment,{children:[ft&&(0,o.jsx)(A.E,{}),(0,o.jsxs)(u.ZP,{jss:tt,sheetsManager:new Map,children:[(0,o.jsx)("div",{ref:Ct,"data-testid":"techdocs-native-shadowroot"}),F]})]})};var g=t(54073);const M=()=>{const{shadowRoot:f}=(0,v.x)();return f},R=f=>{const w=M();return w?f.map(B=>w==null?void 0:w.querySelectorAll(B)).filter(B=>B.length).map(B=>Array.from(B)).flat():[]},P=f=>f.toString()&&f.rangeCount&&f.getRangeAt(0).getBoundingClientRect().top,$=(f=0)=>{const w=M(),[B,F]=useState(null),tt=useMemo(()=>debounce(()=>{const ot=w,ft=ot.getSelection?ot.getSelection():document.getSelection();ft&&P(ft)?F(ft):F(null)},f),[w,F,f]);return useEffect(()=>(window.document.addEventListener("selectionchange",tt),()=>{tt.cancel(),window.document.removeEventListener("selectionchange",tt)}),[tt]),B};var L=t(87435),y=t(42398),Z=t(76635),V=t(64279),et=t(1849),Y=t(29651),K=t(68993),k=t(44394),_=t(62369),rt=t(72388),dt=t(6542),vt=t(95965);const Et=(0,vt.T)({id:"plugin.search.queryservice"});class Tt{query(){return Promise.resolve(this.mockedResults||{results:[]})}constructor(w){_define_property(this,"mockedResults",void 0),this.mockedResults=w}}const gt=(0,Y.CT)("search-context"),xt=()=>{const f=(0,i.useContext)(gt);if(!f)throw new Error("useSearch must be used within a SearchContextProvider");const w=f.atVersion(1);if(!w)throw new Error("No SearchContext v1 found");return w},Q=()=>(0,i.useContext)(gt)!==void 0,j={term:"",types:[],filters:{},pageLimit:void 0,pageCursor:void 0},z=(f=j)=>{var w,B,F,tt;const ot=(0,k.h_)(Et),ft=(0,_.z)(),[Ct,It]=(0,i.useState)(f.term),[$t,Yt]=(0,i.useState)(f.types),[Ft,Pt]=(0,i.useState)(f.filters),[le,me]=(0,i.useState)(f.pageLimit),[Qt,Bt]=(0,i.useState)(f.pageCursor),oe=(0,et.Z)(Ct),ye=(0,et.Z)(Ft),Lt=(0,V.default)(async()=>{const ce=await ot.query({term:Ct,types:$t,filters:Ft,pageLimit:le,pageCursor:Qt});return Ct&&ce.numberOfResults!==void 0&&ft.captureEvent("search",Ct,{value:ce.numberOfResults}),ce},[Ct,$t,Ft,le,Qt]),zt=!Lt.loading&&!Lt.error&&((w=Lt.value)===null||w===void 0?void 0:w.nextPageCursor),Xt=!Lt.loading&&!Lt.error&&((B=Lt.value)===null||B===void 0?void 0:B.previousPageCursor),Ce=(0,i.useCallback)(()=>{var ce;Bt((ce=Lt.value)===null||ce===void 0?void 0:ce.nextPageCursor)},[(F=Lt.value)===null||F===void 0?void 0:F.nextPageCursor]),Te=(0,i.useCallback)(()=>{var ce;Bt((ce=Lt.value)===null||ce===void 0?void 0:ce.previousPageCursor)},[(tt=Lt.value)===null||tt===void 0?void 0:tt.previousPageCursor]);return(0,i.useEffect)(()=>{oe!==void 0&&Ct!==oe&&Bt(void 0)},[Ct,oe,Bt]),(0,i.useEffect)(()=>{ye!==void 0&&!(0,Z.isEqual)(Ft,ye)&&Bt(void 0)},[Ft,ye,Bt]),{result:Lt,term:Ct,setTerm:It,types:$t,setTypes:Yt,filters:Ft,setFilters:Pt,pageLimit:le,setPageLimit:me,pageCursor:Qt,setPageCursor:Bt,fetchNextPage:zt?Ce:void 0,fetchPreviousPage:Xt?Te:void 0}},q=f=>{const{initialState:w,children:B}=f,F=z(w);return(0,o.jsx)(rt.fC,{attributes:{searchTypes:F.types.sort().join(",")},children:(0,o.jsx)(gt.Provider,{value:(0,K.E)({1:F}),children:B})})},st=f=>{const{initialState:w,inheritParentContextIfAvailable:B,children:F}=f,tt=Q(),ot=(0,k.h_)(dt.D),ft=w!=null?w:{},Ct=ot.has("search.query.pageLimit")?{pageLimit:ot.getNumber("search.query.pageLimit")}:{},It={...j,...ft,...Ct};return tt&&B?(0,o.jsx)(o.Fragment,{children:F}):(0,o.jsx)(q,{initialState:It,children:F})};var it=t(4614),at=t(88013),nt=t(50581),St=t(61837),G=t(86619),H=t(77277),ut=t(21853),ht=t(48760);function mt(f){return(0,i.forwardRef)((w,B)=>(0,o.jsx)(st,{inheritParentContextIfAvailable:!0,children:(0,o.jsx)(f,{...w,ref:B})}))}const bt=mt((0,i.forwardRef)((f,w)=>{const{onChange:B,onKeyDown:F=()=>{},onClear:tt=()=>{},onSubmit:ot=()=>{},debounceTime:ft=200,clearButton:Ct=!0,fullWidth:It=!0,value:$t,label:Yt,placeholder:Ft,inputProps:Pt={},InputProps:le={},endAdornment:me,...Qt}=f,Bt=(0,k.h_)(dt.D),[oe,ye]=(0,i.useState)(""),Lt=(0,i.useRef)("");(0,i.useEffect)(()=>{ye(pe=>pe===Lt.current?String($t):pe)},[$t,Lt]),(0,ht.Z)(()=>{Lt.current=oe,B(oe)},ft,[oe]);const zt=(0,i.useCallback)(pe=>{ye(pe.target.value)},[ye]),Xt=(0,i.useCallback)(pe=>{F&&F(pe),ot&&pe.key==="Enter"&&ot()},[F,ot]),Ce=(0,i.useCallback)(()=>{Lt.current="",B(""),ye(""),tt&&tt()},[B,tt]),Te=Yt?void 0:"Search",Fe=Ft!=null?Ft:`Search in ${Bt.getOptionalString("app.title")||"Backstage"}`,ce=(0,o.jsx)(nt.Z,{position:"start",children:(0,o.jsx)(St.Z,{"aria-label":"Query",size:"small",disabled:!0,children:(0,o.jsx)(ut.Z,{})})}),Ze=(0,o.jsx)(nt.Z,{position:"end",children:(0,o.jsx)(H.Z,{"aria-label":"Clear",size:"small",onClick:Ce,onKeyDown:pe=>{pe.key==="Enter"&&pe.stopPropagation()},children:"Clear"})});return(0,o.jsx)(G.Z,{id:"search-bar-text-field","data-testid":"search-bar-next",variant:"outlined",margin:"normal",inputRef:w,value:oe,label:Yt,placeholder:Fe,InputProps:{startAdornment:ce,endAdornment:Ct?Ze:me,...le},inputProps:{"aria-label":Te,...Pt},fullWidth:It,onChange:zt,onKeyDown:Xt,...Qt})})),jt=mt((0,i.forwardRef)((f,w)=>{const{value:B="",onChange:F,...tt}=f,{term:ot,setTerm:ft}=xt();(0,i.useEffect)(()=>{B&&ft(String(B))},[B,ft]);const Ct=(0,i.useCallback)(It=>{F?F(It):ft(It)},[F,ft]);return(0,o.jsx)(rt.fC,{attributes:{pluginId:"search",extension:"SearchBar"},children:(0,o.jsx)(bt,{...tt,ref:w,value:ot,onChange:Ct})})})),Jt=(0,d.Z)(f=>({loading:{right:f.spacing(1),position:"absolute"}})),Wt=f=>w=>(0,o.jsx)(st,{inheritParentContextIfAvailable:!0,children:(0,o.jsx)(f,{...w})}),Ht=()=>{const f=Jt();return(0,o.jsx)(it.Z,{className:f.loading,"data-testid":"search-autocomplete-progressbar",color:"inherit",size:20})},Dt=Wt(function(w){const{loading:B,value:F,onChange:tt=()=>{},options:ot=[],getOptionLabel:ft=Lt=>String(Lt),inputPlaceholder:Ct,inputDebounceTime:It,freeSolo:$t=!0,fullWidth:Yt=!0,clearOnBlur:Ft=!1,"data-testid":Pt="search-autocomplete",...le}=w,{setTerm:me}=xt(),Qt=(0,i.useCallback)(Lt=>Lt?typeof Lt=="string"?Lt:ft(Lt):"",[ft]),Bt=(0,i.useMemo)(()=>Qt(F),[F,Qt]),oe=(0,i.useCallback)((Lt,zt,Xt,Ce)=>{me(Qt(zt)),tt(Lt,zt,Xt,Ce)},[Qt,me,tt]),ye=(0,i.useCallback)(({InputProps:{ref:Lt,className:zt,endAdornment:Xt},InputLabelProps:Ce,...Te})=>(0,o.jsx)(jt,{...Te,ref:Lt,clearButton:!1,value:Bt,placeholder:Ct,debounceTime:It,endAdornment:B?(0,o.jsx)(Ht,{}):Xt,InputProps:{className:zt}}),[B,Bt,Ct,It]);return(0,o.jsx)(at.ZP,{...le,"data-testid":Pt,value:F,onChange:oe,options:ot,getOptionLabel:ft,renderInput:ye,freeSolo:$t,fullWidth:Yt,clearOnBlur:Ft})});var Mt=t(73557),Gt=t(55511);const ee=f=>f==null?void 0:f.document,re=f=>{const{entityId:w,entityTitle:B,debounceTime:F=150}=f,[tt,ot]=(0,i.useState)(!1),ft=(0,Mt.s0)(),{setFilters:Ct,result:{loading:It,value:$t}}=xt(),[Yt,Ft]=(0,i.useState)([]);(0,i.useEffect)(()=>{let Bt=!0;if(Bt&&$t){const oe=$t.results.slice(0,10);Ft(oe)}return()=>{Bt=!1}},[It,$t]);const{kind:Pt,name:le,namespace:me}=w;(0,i.useEffect)(()=>{Ct(Bt=>({...Bt,kind:Pt,namespace:me,name:le}))},[Pt,me,le,Ct]);const Qt=(Bt,oe)=>{if(ee(oe)){const{location:ye}=oe.document;ft(ye)}};return(0,o.jsx)(Dt,{"data-testid":"techdocs-search-bar",size:"small",open:tt,getOptionLabel:()=>"",filterOptions:Bt=>Bt,onClose:()=>{ot(!1)},onFocus:()=>{ot(!0)},onChange:Qt,blurOnSelect:!0,noOptionsText:"No results found",value:null,options:Yt,renderOption:({document:Bt,highlight:oe})=>(0,o.jsx)(Gt.TechDocsSearchResultListItem,{result:Bt,lineClamp:3,asListItem:!1,asLink:!1,title:Bt.title,highlight:oe}),loading:It,inputDebounceTime:F,inputPlaceholder:`Search ${B||w.name} docs`,freeSolo:!1})},qt=f=>{const w={term:"",types:["techdocs"],pageCursor:"",filters:f.entityId};return(0,o.jsx)(st,{initialState:w,children:(0,o.jsx)(re,{...f})})};var de=t(99688),Ie=t(80851);const Ge=(0,i.lazy)(()=>Promise.all([t.e(1113),t.e(6051)]).then(t.bind(t,76051)).then(f=>({default:f.RealLogViewer})));function _e(f){const{Progress:w}=(0,Ie.q)().getComponents();return(0,o.jsx)(i.Suspense,{fallback:(0,o.jsx)(w,{}),children:(0,o.jsx)(Ge,{...f})})}var xe=t(42494),qe=t(90436),Ve=t(4190),Ye=t(87685);const se=(0,d.Z)(f=>(0,xe.Z)({paper:{width:"100%",[f.breakpoints.up("sm")]:{width:"75%"},[f.breakpoints.up("md")]:{width:"50%"},padding:f.spacing(2.5)},root:{height:"100%",overflow:"hidden"},logs:{background:f.palette.background.default}})),sn=({buildLog:f,onClose:w})=>{const B=se(),F=f.length===0?"Waiting for logs...":f.join(`
5
+ `);const Nt=ys({root:a,discoverers:[Es,xs],collectors:{routing:At?Ss:As,collectedPlugins:Cs,featureFlags:bs}});return Nt.collectedPlugins.forEach(Kt=>this.plugins.add(Kt)),this.verifyPlugins(this.plugins),this.getApiHolder(),{...Nt,routeBindings:Ks(this.bindRoutes)}},[a]);n||(n=!0,Ms(E.paths,E.parents),Bs(N,this.plugins));const X=ti(this.configLoader,this.components,C),lt="api"in X;if(lt){const{api:At}=X;this.configApi=At}if("node"in X)return X.node;if(lt&&l.current){l.current=!1;const At=this.getApiHolder().get(hn.W);if(At){for(const _t of this.featureFlags)At.registerFlag({..._t,pluginId:""});for(const _t of this.plugins.values())if("getFeatureFlags"in _t)for(const Ee of _t.getFeatureFlags())At.registerFlag({name:Ee.name,pluginId:_t.getId()});else for(const Ee of _t.output())Ee.type==="feature-flag"&&At.registerFlag({name:Ee.name,pluginId:_t.getId()});const Nt=At.getRegisteredFlags(),Kt=new Set(Nt.map(_t=>_t.name));for(const _t of D)Kt.has(_t)||At.registerFlag({name:_t,pluginId:""})}}const{ThemeProvider:pt=Er,Progress:yt}=this.components;return(0,i.jsx)(zo,{apis:this.getApiHolder(),children:(0,i.jsx)($s,{appContext:e,children:(0,i.jsx)(pt,{children:(0,i.jsx)(js,{routePaths:E.paths,routeParents:E.parents,routeObjects:E.objects,routeBindings:N,basePath:Ys(X.api),children:(0,i.jsx)(Cr.Provider,{value:{routeObjects:E.objects,appIdentityProxy:this.appIdentityProxy},children:(0,i.jsx)(d.Suspense,{fallback:(0,i.jsx)(yt,{}),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:Jn,deps:{},factory:()=>Qn.createWithStorage(this.themes)}),this.apiFactoryRegistry.register("static",{api:ue.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,y._)(this,"apiHolder",void 0),(0,y._)(this,"configApi",void 0),(0,y._)(this,"apis",void 0),(0,y._)(this,"icons",void 0),(0,y._)(this,"plugins",void 0),(0,y._)(this,"featureFlags",void 0),(0,y._)(this,"components",void 0),(0,y._)(this,"themes",void 0),(0,y._)(this,"configLoader",void 0),(0,y._)(this,"defaultApis",void 0),(0,y._)(this,"bindRoutes",void 0),(0,y._)(this,"appLanguageApi",void 0),(0,y._)(this,"translationResources",void 0),(0,y._)(this,"appIdentityProxy",new Fs),(0,y._)(this,"apiFactoryRegistry",void 0),(0,he._)(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 D;this.configLoader=(D=e.configLoader)!==null&&D!==void 0?D:xr;var N;this.defaultApis=(N=e.defaultApis)!==null&&N!==void 0?N:[],this.bindRoutes=e.bindRoutes,this.apiFactoryRegistry=new ms,this.appLanguageApi=oo.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 X;this.translationResources=(X=(a=e.__experimentalTranslations)===null||a===void 0?void 0:a.resources)!==null&&X!==void 0?X:[]}}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:{...L,...r==null?void 0:r.components},configLoader:r==null?void 0:r.configLoader,defaultApis:So,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:Te})}var lo=t(2532);let Dr=!1;const Lr=r=>{const e=(0,Ar.q)(),{NotFoundErrorPage:n}=e.getComponents(),s=(0,d.useMemo)(()=>Rn(),[]),l=[...(0,lo.v)(r.children,C=>C.getElements().flatMap(E=>{let D=E.props.path;if(D==="")return[];var N;D=(N=D==null?void 0:D.replace(/\/\*$/,""))!==null&&N!==void 0?N:"/";let X=s?E:E.props.element;return!s&&!X&&(X=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:D,element:X,children:E.props.children?[{path:D==="/"?"/":"*",element:E.props.children}]:void 0}]}).sort((E,D)=>D.path.localeCompare(E.path)).map(E=>({...E,path:E.path==="/"?"/":`${E.path}/*`}))),{path:"*",element:(0,i.jsx)(n,{})}];return(0,v.V$)(l)};(0,be.R)(Lr,"core.type","FlatRoutes");var on=t(74314),si=t(51547),ii=t(88797);function jr(r){return!r.cursor}function $a(r){return!jr(r)}const Oe="catalog";var we=t(23587);class ai{async analyzeLocation(e,n){const s=await this.discoveryApi.getBaseUrl(Oe),a="/analyze-location",l=we.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(Oe),a="/locations{?dryRun}",l=we.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(Oe),a="/entities/by-uid/{uid}",l=we.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(Oe),a="/locations/{id}",l=we.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(Oe),a="/entities{?fields,limit,filter*,offset,after,order*}",l=we.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(Oe),a="/entities/by-query{?fields,limit,orderField*,cursor,filter*,fullTextFilterTerm,fullTextFilterFields}",l=we.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(Oe),a="/entities/by-refs",l=we.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(Oe),a="/entities/by-name/{kind}/{namespace}/{name}/ancestry",l=we.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(Oe),a="/entities/by-name/{kind}/{namespace}/{name}",l=we.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(Oe),a="/entities/by-uid/{uid}",l=we.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(Oe),a="/entity-facets{?facet*,filter*}",l=we.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(Oe),a="/locations/{id}",l=we.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(Oe),a="/locations",l=we.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(Oe),a="/refresh",l=we.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(Oe),a="/validate-entity",l=we.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,y._)(this,"discoveryApi",void 0),(0,y._)(this,"fetchApi",void 0),this.discoveryApi=e.discoveryApi,this.fetchApi=e.fetchApi||{fetch:Fn()}}}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:D}=e!=null?e:{},N=[];if(l)for(const pt of[l].flat())pt&&N.push(`${pt.order}:${pt.field}`);const X=await this.requestRequired(await this.apiClient.getEntities({query:{fields:a,limit:E,filter:this.getFilterValue(s),offset:C,after:D,order:l?N:void 0}},n)),lt=(pt,yt)=>{var At,Nt;if(((At=pt.metadata)===null||At===void 0?void 0:At.name)===void 0||pt.kind===void 0||((Nt=yt.metadata)===null||Nt===void 0?void 0:Nt.name)===void 0||yt.kind===void 0)return 0;const Kt=(0,on.eE)(pt),_t=(0,on.eE)(yt);return Kt<_t?-1:Kt>_t?1:0};return{items:X.sort(lt)}}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:D,orderFields:N,fullTextFilter:X}=e;s.filter=this.getFilterValue(E),D!==void 0&&(s.limit=D),N!==void 0&&(s.orderField=(Array.isArray(N)?N:[N]).map(({field:pt,order:yt})=>`${pt},${yt}`)),C.length&&(s.fields=C);const lt=X==null||(a=X.term)===null||a===void 0?void 0:a.trim();lt&&(s.fullTextFilterTerm=lt),!(X==null||(l=X.fields)===null||l===void 0)&&l.length&&(s.fullTextFilterFields=X.fields)}else{const{fields:C=[],limit:E,cursor:D}=e;s.cursor=D,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:D,exists:N}=await C.json();if(!E)throw new Error(`Location wasn't added: ${a}`);return{location:E,entities:D,exists:N}}async getLocationByRef(e,n){return(await this.requestRequired(await this.apiClient.getLocation({path:{id:e}},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,y._)(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),De=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,D,N])=>(0,on.eE)({kind:E,namespace:D,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,y._)(this,"settingsStore",void 0),(0,y._)(this,"starredEntities",void 0),(0,y._)(this,"subscribers",new Set),(0,y._)(this,"observable",new(Y())(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:D=0}=r;return((((e*365+n*30+s*7+a)*24+l)*60+C)*60+E)*1e3+D}var gi=t(99798),vi=t.n(gi),mi=t(12830),yi=t.n(mi),Ei=t(68203),xi=t(77224),Ci=t(78898);const Ai={seconds:10},Si={milliseconds:50},bi=zn.Z,Oi={api:kn.Z,component:Hn.Z,system:xi.Z,resource:Gn.Z,domain:Wn.Z,location:Kn.Z,user:Sn.Z,group:An.Z,template:Ci.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 co=new WeakMap,nr=new WeakMap,uo=new WeakMap,or=new WeakMap,ho=new WeakMap,$r=new WeakSet,Fr=new WeakSet,Nr=new WeakSet;class fo{static createLocal(){return new fo({renderer:Ur({async:!1})})}static create(e){return new fo(e)}forEntity(e,n){const{entityRef:s,kind:a,entity:l,needsLoad:C}=(0,Be._)(this,$r,wi).call(this,e),E=X=>{const{snapshot:lt}=(0,wt._)(this,ho).render({entityRef:s,loading:X.loading,entity:X.entity,context:n||{}});return{...lt,entityRef:s,Icon:(0,Be._)(this,Nr,Ti).call(this,lt.Icon,a)}};let D;try{D=E({loading:C,entity:l})}catch{D={primaryTitle:s,entityRef:s}}const N=C?new(Y())(X=>{let lt=!1;return Promise.resolve().then(()=>{var pt;return(pt=(0,wt._)(this,uo))===null||pt===void 0?void 0:pt.load(s)}).then(pt=>{if(!lt&&pt&&pt.metadata.etag!==(l==null?void 0:l.metadata.etag)){const yt=E({loading:!1,entity:pt});X.next(yt)}}).catch(()=>{}).finally(()=>{lt||X.complete()}),()=>{lt=!0}}):void 0;return{snapshot:D,update$:N}}constructor(e){(0,en._)(this,$r),(0,en._)(this,Fr),(0,en._)(this,Nr),(0,he._)(this,co,{writable:!0,value:void 0}),(0,he._)(this,nr,{writable:!0,value:void 0}),(0,he._)(this,uo,{writable:!0,value:void 0}),(0,he._)(this,or,{writable:!0,value:void 0}),(0,he._)(this,ho,{writable:!0,value:void 0});var n;const s=(n=e.cacheTtl)!==null&&n!==void 0?n:Ai;var a;const l=(a=e.batchDelay)!==null&&a!==void 0?a:Si;var C;const E=(C=e.renderer)!==null&&C!==void 0?C:Ur({async:!0}),D={};Object.entries(Oi).forEach(([X,lt])=>{D[X.toLocaleLowerCase("en-US")]=lt});var N;if(Object.entries((N=e.kindIcons)!==null&&N!==void 0?N:{}).forEach(([X,lt])=>{D[X.toLocaleLowerCase("en-US")]=lt}),E.async){if(!e.catalogApi)throw new TypeError("Asynchronous rendering requires a catalog API");(0,fe._)(this,uo,(0,Be._)(this,Fr,Pi).call(this,{cacheTtl:s,batchDelay:l,renderer:E,catalogApi:e.catalogApi}))}(0,fe._)(this,nr,er(s)),(0,fe._)(this,co,new Map),(0,fe._)(this,or,D),(0,fe._)(this,ho,E)}}function wi(r){if(typeof r!="string")return{entity:r,kind:r.kind,entityRef:(0,on.eE)(r),needsLoad:!1};const e=(0,wt._)(this,co).get(r),n=e==null?void 0:e.entity,a=(!e||Date.now()-e.updatedAt>(0,wt._)(this,nr))&&(0,wt._)(this,ho).async!==!1&&(0,wt._)(this,uo)!==void 0;return{entity:n,kind:(0,on.of)(r).kind,entityRef:r,needsLoad:a}}function Pi(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,co).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 Ti(r,e){if(r)return r;if(r===!1)return!1;var n;return(n=(0,wt._)(this,or)[e.toLocaleLowerCase("en-US")])!==null&&n!==void 0?n:bi}const Re=(0,ui.r)({id:"catalog",apis:[(0,Zt.n)({api:Mr.A,deps:{discoveryApi:ne.N,fetchApi:$n.g},factory:({discoveryApi:r,fetchApi:e})=>new li({discoveryApi:r,fetchApi:e})}),(0,Zt.n)({api:ci.p,deps:{storageApi:Un},factory:({storageApi:r})=>new pi({storageApi:r})}),(0,Zt.n)({api:di.X,deps:{catalogApi:Mr.A},factory:({catalogApi:r})=>fo.create({catalogApi:r})})],routes:{catalogIndex:yn._Z,catalogEntity:Br.w},externalRoutes:{createComponent:yn.yw,viewTechDoc:yn.jU,createFromTemplate:yn.ql,unregisterRedirect:yn.kR}}),Fa=Re.provide((0,De.P4)({name:"CatalogIndexPage",component:()=>Promise.all([t.e(192),t.e(9814)]).then(t.bind(t,39814)).then(r=>r.CatalogPage),mountPoint:yn._Z})),Ri=Re.provide((0,De.P4)({name:"CatalogEntityPage",component:()=>t.e(8951).then(t.bind(t,78951)).then(r=>r.CatalogEntityPage),mountPoint:Br.w})),Na=Re.provide((0,De.CO)({name:"EntityAboutCard",component:{lazy:()=>Promise.all([t.e(1059),t.e(3510)]).then(t.bind(t,43510)).then(r=>r.AboutCard)}})),Wa=Re.provide((0,De.CO)({name:"EntityLinksCard",component:{lazy:()=>t.e(7750).then(t.bind(t,17750)).then(r=>r.EntityLinksCard)}})),Za=Re.provide((0,De.CO)({name:"EntityLabelsCard",component:{lazy:()=>t.e(5877).then(t.bind(t,85877)).then(r=>r.EntityLabelsCard)}})),ka=Re.provide((0,De.CO)({name:"EntityHasSystemsCard",component:{lazy:()=>t.e(5458).then(t.bind(t,5458)).then(r=>r.HasSystemsCard)}})),za=Re.provide((0,De.CO)({name:"EntityHasComponentsCard",component:{lazy:()=>t.e(1105).then(t.bind(t,1105)).then(r=>r.HasComponentsCard)}})),Ka=Re.provide((0,De.CO)({name:"EntityHasSubcomponentsCard",component:{lazy:()=>t.e(2440).then(t.bind(t,82440)).then(r=>r.HasSubcomponentsCard)}})),Ha=Re.provide((0,De.CO)({name:"EntityHasResourcesCard",component:{lazy:()=>t.e(9770).then(t.bind(t,79770)).then(r=>r.HasResourcesCard)}})),Ga=Re.provide((0,De.CO)({name:"EntityDependsOnComponentsCard",component:{lazy:()=>t.e(9545).then(t.bind(t,19545)).then(r=>r.DependsOnComponentsCard)}})),Va=Re.provide((0,De.CO)({name:"EntityDependencyOfComponentsCard",component:{lazy:()=>t.e(184).then(t.bind(t,40184)).then(r=>r.DependencyOfComponentsCard)}})),Ya=Re.provide((0,De.CO)({name:"EntityDependsOnResourcesCard",component:{lazy:()=>t.e(1032).then(t.bind(t,81032)).then(r=>r.DependsOnResourcesCard)}})),Qa=Re.provide((0,De.CO)({name:"RelatedEntitiesCard",component:{lazy:()=>t.e(3487).then(t.bind(t,33487)).then(r=>r.RelatedEntitiesCard)}})),Ja=Re.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 Ii{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,y._)(this,"configApi",void 0),(0,y._)(this,"discoveryApi",void 0),(0,y._)(this,"identityApi",void 0),this.configApi=e,this.discoveryApi=n,this.identityApi=s}}class Di{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,y._)(this,"configApi",void 0),(0,y._)(this,"discoveryApi",void 0),(0,y._)(this,"identityApi",void 0),this.configApi=e,this.discoveryApi=n,this.identityApi=s}}const Li=[(0,Zt.n)({api:Zr.D,deps:{configApi:ue.D,discoveryApi:ne.N,identityApi:ve.$},factory:({configApi:r,discoveryApi:e,identityApi:n})=>new Ii({configApi:r,discoveryApi:e,identityApi:n})}),(0,Zt.n)({api:Zr.g,deps:{configApi:ue.D,discoveryApi:ne.N,identityApi:ve.$},factory:({configApi:r,discoveryApi:e,identityApi:n})=>new Di({configApi:r,discoveryApi:e,identityApi:n})}),(0,Zt.n)({api:Wr.q,deps:{configApi:ue.D},factory:({configApi:r})=>Wr.a.fromConfig(r)})],ji={backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}},Mi={backend:{baseUrl:"http://localhost:7007"},techdocs:{builder:"external"}};async function Bi(){const r=await fetch("/.detect");return r.ok?(await r.text()).trim()==="techdocs-cli-server":!1}async function Ui(){const r=await xr(),e=await Bi();return[...r,{context:"detected",data:e?ji:Mi}]}var Ke=t(79692),$i=t(58845);const Fi=(0,Ke.Z)({svg:{width:"auto",height:30},path:{fill:"#7df3e1"}});var Ni=()=>{const r=Fi();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 Wi=(0,Ke.Z)({svg:{width:"auto",height:28},path:{fill:"#7df3e1"}});var Zi=()=>{const r=Wi();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,Je.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),Xe=t(62774),Yr=t(41156),ki=t(72779),rn=t.n(ki),zi=t(50023),Qr=t(61837),Ki=t(4190),sr=t(90436),Hi=t(87685),Gi=t(44882),Vi=t(57998);const Jr=(0,d.createContext)({selectedMenuItemIndex:-1,setSelectedMenuItemIndex:()=>{}});var ir=t(93539);const Yi=(0,Ke.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"}})),Qi=r=>{const{to:e,label:n,icon:s,value:a}=r,{sidebarConfig:l}=(0,d.useContext)(Ae.kG),C=Yi({sidebarConfig:l}),E=(0,v.TH)(),{selectedMenuItemIndex:D,setSelectedMenuItemIndex:N}=(0,d.useContext)(Jr),X=(pt,yt)=>{N(yt===D?-1:yt)},lt=a===D&&D>=0||a!==D&&!(D>=0)&&e===E.pathname;return(0,i.jsx)(Vi.Z,{"aria-label":n,label:n,icon:s,component:Gr.rU,to:e||E.pathname,onChange:X,value:a,selected:lt,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)(Qi,{to:n,label:s,icon:a,value:l}):(0,i.jsx)(i.Fragment,{children:e})},_r=(0,Ke.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`})})),Ji=r=>(0,En.orderBy)(r,({props:{priority:e}})=>Number.isInteger(e)?e:-1,"desc"),Xi=d.createElement(Xr).type,_i=({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)(Ki.ZP,{anchor:"bottom",open:n,onClose:s,ModalProps:{BackdropProps:{classes:{root:l.marginMobileSidebar}}},classes:{root:l.marginMobileSidebar,paperAnchorBottom:l.overlay},children:[(0,i.jsxs)(Xe.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)(Hi.Z,{})})]}),(0,i.jsx)(Xe.Z,{component:"nav",children:r})]})},qi=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,lo.v)(n,N=>N.getElements().filter(X=>X.type===Xi));if(n)E.length?E=Ji(E):E.push((0,i.jsx)(Xr,{icon:(0,i.jsx)(Gi.Z,{}),children:n},"default_menu"));else return null;const D=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)(_i,{label:E[l]&&E[l].props.label,open:D,onClose:()=>C(-1),children:E[l]&&E[l].props.children}),(0,i.jsx)(zi.Z,{className:s.root,"data-testid":"mobile-sidebar-root",component:"nav",children:E})]})})},qr=(0,Ke.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 ta=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)(_t=>_t.breakpoints.down("md"),{noSsr:!0}),[D,N]=(0,d.useState)(0),X=(0,d.useRef)(),{isPinned:lt,toggleSidebarPinState:pt}=(0,ir.Pf)(),yt=()=>{lt||a||(X.current&&(clearTimeout(X.current),X.current=void 0),D!==2&&!E&&(X.current=window.setTimeout(()=>{X.current=void 0,N(2)},n),N(1)))},At=()=>{lt||a||(X.current&&(clearTimeout(X.current),X.current=void 0),D===1?N(0):D===2&&(X.current=window.setTimeout(()=>{X.current=void 0,N(0)},s)))},Nt=D===2&&!E||lt,Kt=_t=>{_t?(N(2),pt()):(N(0),pt())};return(0,i.jsxs)("nav",{style:{},"aria-label":"sidebar nav",children:[(0,i.jsx)(na,{}),(0,i.jsx)(Hr,{value:{isOpen:Nt,setOpen:Kt},children:(0,i.jsx)(Xe.Z,{className:C.root,"data-testid":"sidebar-root",onMouseEnter:a?()=>{}:yt,onFocus:a?()=>{}:yt,onMouseLeave:a?()=>{}:At,onBlur:a?()=>{}:At,children:(0,i.jsx)(Xe.Z,{className:rn()(C.drawer,C.drawerWidth,{[C.drawerOpen]:Nt}),children:l})})})]})},ea=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:D}=r,{isMobile:N}=(0,ir.Pf)();return N?(0,i.jsx)(qi,{children:l}):(0,i.jsx)(Ae.kG.Provider,{value:{sidebarConfig:n,submenuConfig:a},children:(0,i.jsx)(ta,{openDelayMs:E,closeDelayMs:D,disableExpandOnHover:C,children:l})})};function na(){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 oa=t(26739),po=t(1667),ra=t(83543),sa=t(59797),es=t(98989);const ia=(0,Ke.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"}),aa=r=>{const{isOpen:e}=rr(),{sidebarConfig:n,submenuConfig:s}=(0,d.useContext)(Ae.kG),a=e?n.drawerWidthOpen:n.drawerWidthClosed,l=ia({left:a,submenuConfig:s}),{isHoveredOn:C}=(0,d.useContext)(Ae.Ag),[E,D]=(0,d.useState)(!1);return(0,d.useEffect)(()=>{D(C)},[C]),(0,i.jsxs)(Xe.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 la=t(19126),ns=t.n(la);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 ca=r=>(0,Ke.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 go(r){return(0,d.useMemo)(()=>ca(r),[r])()}const da=(r,e)=>(0,lo.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 ua=d.createElement(aa).type,ha=d.forwardRef(function({to:e,end:n,style:s,className:a,activeStyle:l,caseSensitive:C,activeClassName:E="active","aria-current":D="page",...N},X){let{pathname:lt}=(0,v.TH)(),{pathname:pt}=(0,v.WU)(e);C||(lt=lt.toLocaleLowerCase("en-US"),pt=pt.toLocaleLowerCase("en-US"));let yt=lt===pt;!yt&&!n&&(yt=lt.startsWith(`${pt}/`));const At=yt?D:void 0;return(0,i.jsx)(g.rU,{...N,to:e,ref:X,"aria-current":At,style:{...s,...yt?l:void 0},className:rn()([typeof a!="function"?a:void 0,yt?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:D,children:N,className:X,...lt}=r,{sidebarConfig:pt}=(0,d.useContext)(Ae.kG),yt=go(pt),{isOpen:At}=rr(),Nt=!At&&l?{display:"flex",marginLeft:"20px"}:{lineHeight:"0"},Kt=(0,i.jsxs)(Xe.Z,{style:Nt,children:[(0,i.jsx)(n,{fontSize:"small"}),!At&&l?(0,i.jsx)(es.Z,{fontSize:"small"}):(0,i.jsx)(i.Fragment,{})]}),_t=(0,i.jsx)(oa.Z,{color:"secondary",variant:"dot",overlap:"circular",invisible:!a,className:rn()({[yt.closedItemIcon]:!At}),children:Kt}),Ee=(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Xe.Z,{"data-testid":"login-button",className:yt.iconContainer,children:_t}),s&&(0,i.jsx)(sr.Z,{variant:"subtitle2",component:"span",className:yt.label,children:s}),(0,i.jsx)("div",{className:yt.secondaryAction,children:N})]}),He=At?Ee:_t,jn={onClick:E,className:rn()(X,yt.root,At?yt.open:yt.closed,ar(r)&&yt.buttonItem,{[yt.highlightable]:!C})},ls=(0,Sr.z)(),{pathname:lr}=(0,v.WU)(!ar(r)&&r.to?r.to:""),cs=(0,d.useCallback)(ja=>{if(!D){const Ma="click",Ba=s!=null?s:"Sidebar Item",Ua=lr?{attributes:{to:lr}}:void 0;ls.captureEvent(Ma,Ba,Ua)}E==null||E(ja)},[ls,s,lr,D,E]);return ar(r)?(0,i.jsx)(x.Z,{role:"button","aria-label":s,...jn,ref:e,onClick:cs,children:He}):(0,i.jsx)(ha,{...jn,activeClassName:yt.selected,to:r.to?r.to:"",ref:e,"aria-label":s||r.to,...lt,onClick:cs,children:He})}),fa=({children:r,...e})=>{const{sidebarConfig:n}=(0,d.useContext)(Ae.kG),s=go(n),[a,l]=(0,d.useState)(!1),C=(0,v.TH)(),E=da(r,C),D=(0,Yr.Z)(pt=>pt.breakpoints.down("sm")),N=()=>{l(!0)},X=()=>{l(!1)},lt=()=>D?a?(0,i.jsx)(sa.Z,{fontSize:"small",className:s.submenuArrow}):(0,i.jsx)(ra.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:X,onTouchStart:a?X:N,onMouseEnter:N,className:rn()(a&&s.highlighted),children:[(0,i.jsx)(rs,{hasSubmenu:!0,className:E?s.selected:"",...e,children:lt()}),a&&r]})})},ss=(0,d.forwardRef)((r,e)=>{const[n]=(0,lo.v)(r.children,s=>s.getElements().filter(a=>a.type===ua));return n?(0,i.jsx)(fa,{...r,children:n}):(0,i.jsx)(rs,{...r,ref:e})});function qa(r){const{sidebarConfig:e}=useContext(SidebarConfigContext),[n,s]=useState(""),a=go(e),l=r.icon?r.icon:SearchIcon,C=()=>{r.onSearch(n),s("")},E=lt=>{lt.key==="Enter"&&(lt.preventDefault(),C())},D=lt=>{s(lt.target.value)},N=lt=>{lt.preventDefault(),lt.stopPropagation()},X=lt=>{C(),lt.preventDefault()};return _jsx(Box,{className:a.searchRoot,children:_jsx(ss,{icon:l,to:r.to,onClick:X,disableHighlight:!0,children:_jsx(TextField,{placeholder:"Search",value:n,onClick:N,onChange:D,onKeyDown:E,className:a.searchContainer,InputProps:{disableUnderline:!0,className:a.searchField},inputProps:{className:a.searchFieldHTMLInput}})})})}const tl=(0,po.Z)("div")({flex:1},{name:"BackstageSidebarSpace"}),el=(0,po.Z)("div")({height:8},{name:"BackstageSidebarSpacer"}),pa=(0,po.Z)("hr")(({theme:r})=>({height:1,width:"100%",background:"#383838",border:"none",margin:r.spacing(1.2,0)}),{name:"BackstageSidebarDivider"}),ga=r=>({overflowY:"auto","&::-webkit-scrollbar":{backgroundColor:r.palette.background.default,width:"5px",borderRadius:"5px"},"&::-webkit-scrollbar-thumb":{backgroundColor:r.palette.text.secondary,borderRadius:"5px"}}),nl=(0,po.Z)("div")(({theme:r})=>{const e=ga(r);return{flex:"0 1 auto",overflowX:"hidden",width:"calc(100% - 5px)",minHeight:"48px",overflowY:"hidden","@media (hover: none)":e,"&:hover":e}}),ol=()=>{const{sidebarConfig:r}=useContext(SidebarConfigContext),e=go(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,{})})})},va=(0,Ke.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}}),ma=()=>{const r=va(),{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)(Ni,{}):(0,i.jsx)(Zi,{})})})},ya=({children:r})=>(0,i.jsxs)(Vr.t,{children:[(0,i.jsxs)(ea,{children:[(0,i.jsx)(ma,{}),(0,i.jsx)(pa,{}),(0,i.jsx)(ss,{icon:$i.Z,to:"/docs/default/component/local",text:"Docs Preview"})]}),r]});var Ea=t(80030),xa=t(32388),Ca=t(4142),Aa=t(65386),Sa=t(14540);const ba=(0,Ke.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 Oa=()=>{const r=(0,wn.h_)(Jn),e=ba(),[n,s]=(0,d.useState)(r.getActiveThemeId()==="dark"?"dark":"light"),a={light:{icon:Ca.Z,title:"Dark theme"},dark:{icon:xa.Z,title:"Light theme"}},{title:l,icon:C}=a[n],E=()=>{s(D=>{const N=D==="light"?"dark":"light";return r.setActiveThemeId(N),N})};return(0,i.jsx)(Xe.Z,{display:"flex",alignItems:"center",mr:2,children:(0,i.jsx)(Ea.ZP,{title:l,arrow:!0,children:(0,i.jsx)(Qr.Z,{size:"small",onClick:E,children:(0,i.jsx)(C,{className:e.headerIcon})})})})},wa=()=>(0,i.jsxs)(p.I6,{children:[(0,i.jsx)(Aa.S,{}),(0,i.jsx)(Sa.F,{withSearch:!1})]}),Pa=(0,i.jsx)(wa,{}),as=ri({apis:Li,configLoader:Ui,plugins:Object.values(o)}),Ta=as.getProvider(),Ra=as.getRouter(),Ia=p.s4.provide((0,u.KY)({name:"ThemeToggleAddon",component:Oa,location:A.o.Header})),Da=(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)(Ri,{})}),(0,i.jsx)(v.AW,{path:"/docs",element:(0,i.jsx)(p.Jl,{}),children:(0,i.jsx)(c.u,{})}),(0,i.jsxs)(v.AW,{path:"/docs/:namespace/:kind/:name/*",element:(0,i.jsx)(p.I6,{}),children:[Pa,(0,i.jsx)(u.DR,{children:(0,i.jsx)(Ia,{})})]})]});var La=()=>(0,i.jsx)(Ta,{children:(0,i.jsx)(Ra,{children:(0,i.jsx)(ya,{children:Da})})});S.createRoot(document.getElementById("root")).render((0,i.jsx)(La,{}))},29651:function(J,T,t){"use strict";t.d(T,{CT:function(){return d},Vt:function(){return S}});var o=t(2784),i=t(96087);function d(p){return(0,i.u)(p,()=>(0,o.createContext)(void 0))}function S(p){return(0,o.useContext)(d(p))}function v(p){return{set(c){globalThis[`__@backstage/${p}__`]=createContext(createVersionedValueMap(c))},reset(){delete globalThis[`__@backstage/${p}__`]}}}},68993:function(J,T,t){"use strict";t.d(T,{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(J,T,t){"use strict";t.d(T,{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,p){const c=d(v);let u=i[c];return u||(u=p(),i[c]=u,u)}},88624:function(J,T,t){"use strict";t.d(T,{A:function(){return i}});var o=t(95965);const i=(0,o.T)({id:"plugin.catalog.service"})},51271:function(J,T,t){"use strict";t.d(T,{X:function(){return i}});var o=t(95965);const i=(0,o.T)({id:"plugin.catalog.entity-presentation"})},68203:function(J,T,t){"use strict";t.d(T,{n:function(){return v}});var o=t(74314),i=t(34106),d=t(72579),S=t.n(d);function v(u,A){const{kind:x,namespace:O,name:m,title:b,description:g,displayName:M,type:R}=p(u),P=(0,o.eE)({kind:x||"unknown",namespace:O||i.zG,name:m||"unknown"}),$=c({kind:x,namespace:O,name:m,context:A}),L=[M,b,$].find(Z=>Z&&typeof Z=="string"),y=[L!==P?P:void 0,R,g].filter(Z=>Z&&typeof Z=="string").join(" | ");return{entityRef:P,primaryTitle:L,secondaryTitle:y||void 0,Icon:void 0}}function p(u){if(typeof u=="string"){let A=u.indexOf(":");const x=u.indexOf("/");x!==-1&&x<A&&(A=-1);const O=A===-1?void 0:u.slice(0,A),m=x===-1?void 0:u.slice(A+1,x),b=u.slice(Math.max(A+1,x+1));return{kind:O,namespace:m,name:b}}if(typeof u=="object"&&u!==null){const A=[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"),b=[S()(u,"metadata.description")].find(R=>R&&typeof R=="string"),g=[S()(u,"spec.profile.displayName")].find(R=>R&&typeof R=="string"),M=[S()(u,"spec.type")].find(R=>R&&typeof R=="string");return{kind:A,namespace:x,name:O,title:m,description:b,displayName:g,type:M}}return{}}function c(u){var A,x,O,m,b;const g=((A=u.kind)===null||A===void 0?void 0:A.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"),$=(b=u.context)===null||b===void 0||(m=b.defaultNamespace)===null||m===void 0?void 0:m.toLocaleLowerCase("en-US");let L=R;return($&&M.toLocaleLowerCase("en-US")!==$||M!==i.zG)&&(L=`${M}/${L}`),P&&g.toLocaleLowerCase("en-US")!==P&&(L=`${g}:${L}`),L}},36802:function(J,T,t){"use strict";t.d(T,{p:function(){return i}});var o=t(95965);const i=(0,o.T)({id:"catalog-react.starred-entities"})},30389:function(J,T,t){"use strict";t.d(T,{_i:function(){return b}});var o=t(52322),i=t(2784),d=t(41156),S=t(60364),v=t(77277),p=t(4190),c=t(62774),u=t(90436),A=t(60905),x=t(36444);const O=g=>{var M;const R=(0,d.Z)(Z=>{var V,et;return Z.breakpoints.down((et=(V=g.options)===null||V===void 0?void 0:V.drawerBreakpoint)!==null&&et!==void 0?et:"md")}),P=(0,S.Z)(),[$,L]=(0,i.useState)(!1);var y;return R?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(v.Z,{style:{marginTop:P.spacing(1),marginLeft:P.spacing(1)},onClick:()=>L(!0),startIcon:(0,o.jsx)(x.Z,{}),children:"Filters"}),(0,o.jsx)(p.ZP,{open:$,onClose:()=>L(!1),anchor:(y=(M=g.options)===null||M===void 0?void 0:M.drawerAnchor)!==null&&y!==void 0?y:"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"}),g.children]})})]}):(0,o.jsx)(A.Z,{item:!0,lg:2,children:g.children})},m=g=>(0,o.jsx)(A.Z,{item:!0,xs:12,lg:10,children:g.children}),b=g=>(0,o.jsx)(A.Z,{container:!0,style:{position:"relative"},children:g.children});b.Filters=O,b.Content=m},77605:function(J,T,t){"use strict";t.d(T,{K:function(){return K}});var o=t(52322),i=t(62774),d=t(90436),S=t(38016),v=t(88013),p=t(2784),c=t(44394),u=t(64279),A=t(88624),x=t(21324),O=t(5806),m=t(19996),b=t(25505);const g=(0,o.jsx)(b.Z,{fontSize:"small"}),M=(0,o.jsx)(m.Z,{fontSize:"small"});function R({selected:k}){return(0,o.jsx)(x.Z,{icon:g,checkedIcon:M,checked:k})}const P=(0,p.memo)(k=>{const{selected:_,value:rt,availableOptions:dt,showCounts:vt}=k,Et=vt?`${rt} (${dt==null?void 0:dt[rt]})`:rt;return(0,o.jsx)(O.Z,{control:(0,o.jsx)(R,{selected:_}),label:Et,onClick:Tt=>Tt.preventDefault()})});var $=t(79692),L=t(86619),y=t(72779),Z=t.n(y);const V=(0,$.Z)({input:{}},{name:"CatalogReactEntityAutocompletePickerInput"});function et(k){const _=V();return(0,o.jsx)(L.Z,{variant:"outlined",...k,className:Z()(_.input,k.className)})}var Y=t(25942);function K(k){var _;const{label:rt,name:dt,path:vt,showCounts:Et,Filter:Tt,InputProps:gt,initialSelectedOptions:xt=[]}=k,{updateFilters:Q,filters:j,queryParameters:{[dt]:z}}=(0,Y.wp)(),q=(0,c.h_)(A.A),{value:st}=(0,u.default)(async()=>{var ht;const mt=vt,{facets:bt}=await q.getEntityFacets({facets:[mt],filter:(ht=j.kind)===null||ht===void 0?void 0:ht.getCatalogFilters()});return Object.fromEntries(bt[mt].map(({value:jt,count:Jt})=>[jt,Jt]))},[j.kind]),it=(0,p.useMemo)(()=>[z].flat().filter(Boolean),[z]);var at;const[nt,St]=(0,p.useState)(it.length?it:(at=(_=j[dt])===null||_===void 0?void 0:_.values)!==null&&at!==void 0?at:xt);(0,p.useEffect)(()=>{it.length&&St(it)},[it]);const G=Object.keys(st!=null?st:{}),H=nt.length&&G.length;(0,p.useEffect)(()=>{Q({[dt]:H?new Tt(nt):void 0})},[dt,H,nt,Tt,Q]);const ut=j[dt];return ut&&typeof ut=="object"&&!("values"in ut)||!G.length||G.length<=1?null:(0,o.jsx)(i.Z,{pb:1,pt:1,children:(0,o.jsxs)(d.Z,{variant:"button",component:"label",children:[rt,(0,o.jsx)(v.ZP,{multiple:!0,disableCloseOnSelect:!0,options:G,value:nt,onChange:(ht,mt)=>St(mt),renderOption:(ht,{selected:mt})=>(0,o.jsx)(P,{selected:mt,value:ht,availableOptions:st,showCounts:!!Et}),size:"small",popupIcon:(0,o.jsx)(S.Z,{"data-testid":`${String(dt)}-picker-expand`}),renderInput:ht=>(0,o.jsx)(et,{...ht,...gt})})]})})}},63833:function(J,T,t){"use strict";t.d(T,{d:function(){return Q}});var o=t(52322),i=t(74314),d=t(79692),S=t(62774),v=t(90436),p=t(5806),c=t(21324),u=t(86619),A=t(19996),x=t(25505),O=t(38016),m=t(88013),b=t(2784),g=t(25942),M=t(4967),R=t(5270),P=t(98685),$=t(62367),L=t(86540),y=t(44394),Z=t(69294),V=t(88624);function et({enabled:j}){const z=(0,y.h_)(V.A),[q]=(0,b.useState)(async()=>{if(!j)return[];const st="relations.ownedBy";return z.getEntityFacets({facets:[st]}).then(it=>it.facets[st].map(at=>at.value).map(at=>{const{kind:nt,name:St,namespace:G}=(0,i.of)(at);return{apiVersion:"backstage.io/v1beta1",kind:nt,metadata:{name:St,namespace:G}}}).sort((at,nt)=>(at.metadata.namespace||"").localeCompare(nt.metadata.namespace||"","en-US")||at.metadata.name.localeCompare(nt.metadata.name,"en-US")||at.kind.localeCompare(nt.kind,"en-US"))).catch(()=>[])});return(0,Z.default)(async(st,it)=>{const at=await q;if(!at)return{items:[]};var nt;const St=(nt=it==null?void 0:it.limit)!==null&&nt!==void 0?nt:20,{text:G,start:H}=Y(st),ut=at.filter(mt=>_(G,mt)),ht=H+St;return{items:ut.slice(0,ht),...k({entities:ut,limit:ht,payload:{text:G,start:ht}})}},[q],{loading:!0,value:{items:[]}})}function Y(j){return K(j)&&j.cursor?JSON.parse(atob(j.cursor)):{text:j.text||"",start:0}}function K(j){return!!j.cursor}function k({entities:j,limit:z,payload:q}){return j.length>z?{cursor:btoa(JSON.stringify(q))}:{}}function _(j,z){var q;const st=j.trim();return z.kind.includes(st)||((q=z.metadata.namespace)===null||q===void 0?void 0:q.includes(st))||z.metadata.name.includes(st)}function rt(){const j=(0,y.h_)(V.A);return(0,Z.default)(async(z,q)=>{const st=z,it=z;var at;const nt=(at=q==null?void 0:q.limit)!==null&&at!==void 0?at:20;if(it.cursor){const G=await j.queryEntities({cursor:it.cursor,limit:nt});return{cursor:G.pageInfo.nextCursor,items:[...it.items,...G.items]}}const St=await j.queryEntities({fullTextFilter:{term:st.text||"",fields:["metadata.name","kind","spec.profile.displayname","metadata.title"]},filter:{kind:["User","Group"]},orderFields:[{field:"metadata.name",order:"asc"}],limit:nt});return{cursor:St.pageInfo.nextCursor,items:St.items}},[],{loading:!0})}var dt=t(89586);function vt({mode:j,initialSelectedOwnersRefs:z}){const q=j==="owners-only",st=rt(),it=et({enabled:q}),[at,nt]=q?it:st;return[at,nt,Et({enabled:!q,initialSelectedOwnersRefs:z})]}function Et({enabled:j,initialSelectedOwnersRefs:z}){const q=(0,b.useRef)({}),st=(0,y.h_)(V.A),[,it]=(0,Z.default)(async()=>{(await st.getEntitiesByRefs({entityRefs:z})).items.forEach(nt=>{nt&&(q.current[(0,i.eE)(nt)]=nt)})},[]);return(0,dt.n)(()=>{j&&z.length>0&&it()}),{getEntity:at=>q.current[at],setEntity:at=>{q.current[(0,i.eE)(at)]=at}}}const Tt=(0,d.Z)({input:{}},{name:"CatalogReactEntityOwnerPicker"}),gt=(0,o.jsx)(x.Z,{fontSize:"small"}),xt=(0,o.jsx)(A.Z,{fontSize:"small"}),Q=j=>{var z,q;const st=Tt(),{mode:it="owners-only"}=j||{},{updateFilters:at,filters:nt,queryParameters:{owners:St}}=(0,g.wp)(),[G,H]=(0,b.useState)(""),ut=(0,b.useMemo)(()=>[St].flat().filter(Boolean),[St]);var ht;const[mt,bt]=(0,b.useState)(ut.length?ut:(ht=(z=nt.owners)===null||z===void 0?void 0:z.values)!==null&&ht!==void 0?ht:[]),[{value:jt,loading:Jt},Wt,Ht]=vt({mode:it,initialSelectedOwnersRefs:mt});(0,R.b)(()=>Wt({text:G}),[G,Wt],250);const Dt=(jt==null?void 0:jt.items)||[];return(0,b.useEffect)(()=>{if(ut.length){const Mt=new M.rf(ut);bt(Mt.values)}},[ut]),(0,b.useEffect)(()=>{at({owners:mt.length?new M.rf(mt):void 0})},[mt,at]),["user","group"].includes(((q=nt.kind)===null||q===void 0?void 0:q.value.toLocaleLowerCase("en-US"))||"")?null:(0,o.jsx)(S.Z,{pb:1,pt:1,children:(0,o.jsxs)(v.Z,{variant:"button",component:"label",children:["Owner",(0,o.jsx)(m.ZP,{multiple:!0,disableCloseOnSelect:!0,loading:Jt,options:Dt,value:mt,getOptionSelected:(Mt,Gt)=>typeof Gt=="string"?(0,i.eE)(Mt)===Gt:Mt===Gt,getOptionLabel:Mt=>{const Gt=typeof Mt=="string"?Ht.getEntity(Mt)||(0,i.of)(Mt,{defaultKind:"group",defaultNamespace:"default"}):Mt;return(0,L.w)(Gt,(0,L.$)(Gt))},onChange:(Mt,Gt)=>{H(""),bt(Gt.map(ee=>{const re=typeof ee=="string"?ee:(0,i.eE)(ee);return typeof ee!="string"&&Ht.setEntity(ee),re}))},filterOptions:Mt=>Mt,renderOption:(Mt,{selected:Gt})=>{const ee=Mt.kind.toLocaleLowerCase("en-US")==="group";return(0,o.jsx)(p.Z,{control:(0,o.jsx)(c.Z,{icon:gt,checkedIcon:xt,checked:Gt}),onClick:re=>re.preventDefault(),label:(0,o.jsxs)(S.Z,{display:"flex",flexWrap:"wrap",alignItems:"center",children:[ee?(0,o.jsx)($.Z,{fontSize:"small"}):(0,o.jsx)(P.Z,{fontSize:"small"}),"\xA0",(0,L.w)(Mt,(0,L.$)(Mt,{defaultKind:Mt.kind}))]})})},size:"small",popupIcon:(0,o.jsx)(O.Z,{"data-testid":"owner-picker-expand"}),renderInput:Mt=>(0,o.jsx)(u.Z,{...Mt,className:st.input,onChange:Gt=>{H(Gt.currentTarget.value)},variant:"outlined"}),ListboxProps:{onScroll:Mt=>{const Gt=Mt.currentTarget;Math.abs(Gt.scrollHeight-Gt.clientHeight-Gt.scrollTop)<1&&(jt!=null&&jt.cursor)&&Wt({items:jt.items,cursor:jt.cursor})},"data-testid":"owner-picker-listbox"}})]})})}},84719:function(J,T,t){"use strict";t.d(T,{d:function(){return $}});var o=t(52322),i=t(74314),d=t(34106),S=t(98864),v=t(37321),p=t(2784),c=t(36434),u=t(79692),A=t(62774),x=t(80030),O=t(44394),m=t(51271),b=t(68203);function g(y,Z,V){const[et,Y]=(0,p.useState)(y);return(0,p.useEffect)(()=>{Y(y);const K=Z==null?void 0:Z.subscribe({next:k=>{Y(k)},complete:()=>{K==null||K.unsubscribe()}});return()=>{K==null||K.unsubscribe()}},V),et}function M(y,Z){const et=(0,O.I_)().get(m.X),Y=[et,JSON.stringify(y),JSON.stringify(Z||null)],K=(0,p.useMemo)(()=>et?et.forEntity(typeof y=="string"||"metadata"in y?y:(0,i.eE)(y),Z):{snapshot:(0,b.n)(y,Z)},Y);return g(K.snapshot,K.update$,[K])}const R=(0,u.Z)(y=>({root:{display:"inline-flex",alignItems:"center"},icon:{marginRight:y.spacing(.5),color:y.palette.text.secondary,lineHeight:0}}),{name:"CatalogReactEntityDisplayName"}),P=y=>{const{entityRef:Z,hideIcon:V,disableTooltip:et,defaultKind:Y,defaultNamespace:K}=y,k=R(),{primaryTitle:_,secondaryTitle:rt,Icon:dt}=M(Z,{defaultKind:Y,defaultNamespace:K});let vt=(0,o.jsx)(o.Fragment,{children:_});return vt=(0,o.jsxs)(A.Z,{component:"span",className:k.root,children:[dt&&!V?(0,o.jsx)(A.Z,{component:"span",className:k.icon,children:(0,o.jsx)(dt,{fontSize:"inherit"})}):null,vt]}),rt&&!et&&(vt=(0,o.jsx)(x.ZP,{enterDelay:1500,title:rt,children:vt})),vt},$=(0,p.forwardRef)((y,Z)=>{const{entityRef:V,defaultKind:et,defaultNamespace:Y,title:K,children:k,hideIcon:_,...rt}=y,dt=L(y.entityRef);var vt;const Et=(vt=k!=null?k:K)!==null&&vt!==void 0?vt:(0,o.jsx)(P,{entityRef:V,defaultKind:et,defaultNamespace:Y,hideIcon:_});return(0,o.jsx)(S.rU,{...rt,ref:Z,to:dt,children:Et})});function L(y){const Z=(0,v.t)(c.w);let V,et,Y;if(typeof y=="string"){const _=(0,i.of)(y);V=_.kind,et=_.namespace,Y=_.name}else"metadata"in y?(V=y.kind,et=y.metadata.namespace,Y=y.metadata.name):(V=y.kind,et=y.namespace,Y=y.name);V=V.toLocaleLowerCase("en-US");var K;et=(K=et==null?void 0:et.toLocaleLowerCase("en-US"))!==null&&K!==void 0?K:d.zG;const k={kind:encodeURIComponent(V),namespace:encodeURIComponent(et),name:encodeURIComponent(Y)};return Z(k)}},51194:function(J,T,t){"use strict";t.d(T,{r:function(){return v}});var o=t(52322),i=t(74314),d=t(2784),S=t(84719);function v(p){const{entityRefs:c,hideIcons:u,...A}=p;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,{...A,entityRef:x,hideIcon:u})]},`${O}.${m}`)})})}},86540:function(J,T,t){"use strict";t.d(T,{$:function(){return S},w:function(){return v}});var o=t(34106),i=t(72579),d=t.n(i);function S(p,c){const u=c==null?void 0:c.defaultKind;let A,x,O;return"metadata"in p?(A=p.kind,x=p.metadata.namespace,O=p.metadata.name):(A=p.kind,x=p.namespace,O=p.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),A=A.toLocaleLowerCase("en-US"),A=u&&u.toLocaleLowerCase("en-US")===A?void 0:A,`${A?`${A}:`:""}${x?`${x}/`:""}${O}`}function v(p,c){for(const u of["spec.profile.displayName","metadata.title"]){const A=d()(p,u);if(A&&typeof A=="string")return A}return c}},97894:function(J,T,t){"use strict";t.d(T,{x:function(){return c}});var o=t(52322),i=t(79692),d=t(2784),S=t(4967),v=t(77605);const p=(0,i.Z)({input:{}},{name:"CatalogReactEntityTagPicker"}),c=u=>{const A=p();return(0,o.jsx)(v.K,{label:"Tags",name:"tags",path:"metadata.tags",Filter:S.Cu,showCounts:u.showCounts,InputProps:{className:A.input}})}},32494:function(J,T,t){"use strict";t.d(T,{E:function(){return Tt}});var o=t(52322),i=t(44394),d=t(6542),S=t(79692),v=t(94339),p=t(90436),c=t(11776),u=t(12231),A=t(86136),x=t(49378),O=t(9520),m=t(47603),b=t(11640),g=t(2784),M=t(4967),R=t(25942),P=t(77186),$=t(76635),L=t(64279),y=t(88624),Z=t(64039),V=t(69294),et=t(38408);function Y(){const gt=(0,i.h_)(P.$),xt=(0,i.h_)(y.A),{filters:Q}=(0,R.wp)(),{value:j,loading:z}=(0,L.default)(async()=>(await gt.getBackstageIdentity()).ownershipEntityRefs,[]),{user:q,owners:st,...it}=Q,{["metadata.name"]:at,...nt}=(0,Z.wq)((0,$.compact)(Object.values(it))),[{value:St,loading:G},H]=(0,V.default)(async ht=>{const mt=K(ht.owners,ht.ownershipEntityRefs);if(mt===void 0)return 0;const{totalItems:bt}=await xt.queryEntities({filter:{...ht.filter,"relations.ownedBy":mt},limit:0});return bt},[],{loading:!0});return(0,et.Z)(()=>{Object.keys(nt).length!==0&&j!==void 0&&H({ownershipEntityRefs:j,owners:st,filter:nt})},[j,st,nt]),{count:St,loading:z||G,filter:(0,g.useMemo)(()=>M.t$.owned(j!=null?j:[]),[j]),ownershipEntityRefs:j}}function K(gt,xt){if(xt===void 0)return;var Q;const j=(Q=gt==null?void 0:gt.values)!==null&&Q!==void 0?Q:[];if(j.length){const z=(0,$.intersection)(j,xt);return z.length===0?void 0:z}return xt}function k(){const gt=(0,i.h_)(y.A),{filters:xt}=(0,R.wp)(),Q=(0,g.useRef)(),j=(0,g.useMemo)(()=>{const{user:st,...it}=xt,at=(0,$.compact)(Object.values(it)),nt=(0,Z.wq)(at),St={filter:nt,limit:0};return Object.keys(nt).length===0?(Q.current=void 0,Q.current):(0,$.isEqual)(St,Q.current)?Q.current:(Q.current=St,St)},[xt]),{value:z,loading:q}=(0,L.default)(async()=>{if(j===void 0)return 0;const{totalItems:st}=await gt.queryEntities(j);return st},[j]);return{count:z,loading:q}}var _=t(74314),rt=t(42870);function dt(){const gt=(0,i.h_)(y.A),{filters:xt}=(0,R.wp)(),{starredEntities:Q}=(0,rt.C)(),j=(0,g.useRef)(),z=(0,g.useMemo)(()=>{const{user:at,...nt}=xt,St=(0,$.compact)(Object.values(nt)),ut={filter:{...(0,Z.wq)(St),["metadata.name"]:Array.from(Q).map(ht=>(0,_.of)(ht).name)},limit:1e3};return(0,$.isEqual)(ut,j.current)?j.current:(j.current=ut,ut)},[xt,Q]),{value:q,loading:st}=(0,L.default)(async()=>Q.size?(await gt.queryEntities(z)).items.map(nt=>(0,_.eE)({kind:nt.kind,namespace:nt.metadata.namespace,name:nt.metadata.name})).filter(nt=>Q.has(nt)).length:0,[z,Q]),it=(0,g.useMemo)(()=>M.t$.starred(Array.from(Q)),[Q]);return{count:q,loading:st,filter:it}}const vt=(0,S.Z)(gt=>({root:{backgroundColor:"rgba(0, 0, 0, .11)",boxShadow:"none",margin:gt.spacing(1,0,1,0)},title:{margin:gt.spacing(1,0,0,1),textTransform:"uppercase",fontSize:12,fontWeight:"bold"},listIcon:{minWidth:30,color:gt.palette.text.primary},menuItem:{minHeight:gt.spacing(6)},groupWrapper:{margin:gt.spacing(1,1,2,1)}}),{name:"CatalogReactUserListPicker"});function Et(gt){return[{name:"Personal",items:[{id:"owned",label:"Owned",icon:m.Z},{id:"starred",label:"Starred",icon:b.Z}]},{name:gt!=null?gt:"Company",items:[{id:"all",label:"All"}]}]}const Tt=gt=>{const{initialFilter:xt,availableFilters:Q}=gt,j=vt(),z=(0,i.h_)(d.D);var q;const st=(q=z.getOptionalString("organization.name"))!==null&&q!==void 0?q:"Company",{filters:it,updateFilters:at,queryParameters:{kind:nt,user:St}}=(0,R.wp)(),G=["starred","all"],H=Et(st).map(re=>({...re,items:re.items.filter(({id:qt})=>["group","user"].some(de=>de===nt)?G.includes(qt):!Q||Q.includes(qt))})).filter(({items:re})=>!!re.length),{count:ut,loading:ht,filter:mt}=Y(),{count:bt}=k(),{count:jt,filter:Jt,loading:Wt}=dt(),Ht=(0,g.useMemo)(()=>[St].flat()[0],[St]),[Dt,Mt]=(0,g.useState)(Ht!=null?Ht:xt),Gt=(0,g.useMemo)(()=>({all:bt,starred:jt,owned:ut}),[jt,ut,bt]);(0,g.useEffect)(()=>{Ht&&Mt(Ht)},[Ht]);const ee=ht||Wt;return(0,g.useEffect)(()=>{!ee&&Dt&&Dt!=="all"&&Gt[Dt]===0&&Mt("all")},[ee,Gt,Dt,Mt]),(0,g.useEffect)(()=>{if(!Dt||ee)return;at({user:(()=>Dt==="owned"?mt:Dt==="starred"?Jt:M.t$.all())()})},[Dt,Jt,mt,at,ee]),(0,o.jsx)(v.Z,{className:j.root,children:H.map(re=>(0,o.jsxs)(g.Fragment,{children:[(0,o.jsx)(p.Z,{variant:"subtitle2",component:"span",className:j.title,children:re.name}),(0,o.jsx)(v.Z,{className:j.groupWrapper,children:(0,o.jsx)(c.Z,{disablePadding:!0,dense:!0,role:"menu","aria-label":re.name,children:re.items.map(qt=>{var de,Ie;return(0,o.jsxs)(u.Z,{role:"none presentation",divider:!0,onClick:()=>Mt(qt.id),selected:qt.id===((de=it.user)===null||de===void 0?void 0:de.value),className:j.menuItem,disabled:Gt[qt.id]===0,"data-testid":`user-picker-${qt.id}`,tabIndex:0,ContainerProps:{role:"menuitem"},children:[qt.icon&&(0,o.jsx)(A.Z,{className:j.listIcon,children:(0,o.jsx)(qt.icon,{fontSize:"small"})}),(0,o.jsx)(x.Z,{children:(0,o.jsxs)(p.Z,{variant:"body1",children:[qt.label," "]})}),(0,o.jsx)(O.Z,{children:(Ie=Gt[qt.id])!==null&&Ie!==void 0?Ie:"-"})]},qt.id)})})})]},re.name))})}},4967:function(J,T,t){"use strict";t.d(T,{A5:function(){return M},Bf:function(){return p},Cu:function(){return c},IZ:function(){return b},Qe:function(){return O},SZ:function(){return u},mM:function(){return g},rf:function(){return A},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 p{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($=>{var L;return((L=P.metadata.tags)!==null&&L!==void 0?L:[]).includes($)})}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 $=this.toUpperArray(this.value.split(/\s/)),L=this.toUpperArray([P.metadata.tags]),y=this.toUpperArray([P.metadata.name,P.metadata.title]);for(const Z of $)if(L.every(V=>V!==Z)&&y.every(V=>!V.includes(Z)))return!1;return!0}toUpperArray(P){return P.flat().filter($=>Boolean($)).map($=>$.toLocaleUpperCase("en-US"))}constructor(P){(0,o._)(this,"value",void 0),this.value=P}}class A{getCatalogFilters(){return{"relations.ownedBy":this.values}}filterEntity(P){return this.values.some($=>(0,S.h)(P,i.S4).some(L=>(0,d.eE)(L)===$))}toQueryValue(){return this.values}constructor(P){(0,o._)(this,"values",void 0),this.values=P.reduce(($,L)=>{try{return $.push((0,d.eE)((0,d.of)(L,{defaultKind:"Group"}))),$}catch{return $}},[])}}class x{getCatalogFilters(){return{"spec.lifecycle":this.values}}filterEntity(P){return this.values.some($=>{var L;return((L=P.spec)===null||L===void 0?void 0:L.lifecycle)===$})}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($=>P.metadata.namespace===$)}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 $,L;return{"metadata.name":(L=($=this.refs)===null||$===void 0?void 0:$.map(y=>(0,d.of)(y).name))!==null&&L!==void 0?L:[]}}return{}}filterEntity(P){if(this.value==="starred"){var $,L;return(L=($=this.refs)===null||$===void 0?void 0:$.includes((0,d.eE)(P)))!==null&&L!==void 0?L:!0}if(this.value==="owned"){var y;const V=(0,S.h)(P,i.S4);var Z;return(Z=(y=this.refs)===null||y===void 0?void 0:y.some(et=>V.some(Y=>(0,d.eE)(Y)===et)))!==null&&Z!==void 0?Z:!1}return!0}toQueryValue(){return this.value}constructor(P,$){(0,o._)(this,"value",void 0),(0,o._)(this,"refs",void 0),this.value=P,this.refs=$}}class b{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,$,L){(0,o._)(this,"value",void 0),(0,o._)(this,"isOwnedEntity",void 0),(0,o._)(this,"isStarredEntity",void 0),this.value=P,this.isOwnedEntity=$,this.isStarredEntity=L}}class g{getCatalogFilters(){return this.value?{"metadata.annotations.backstage.io/orphan":String(this.value)}:{}}filterEntity(P){var $;const L=($=P.metadata.annotations)===null||$===void 0?void 0:$["backstage.io/orphan"];return L!==void 0&&this.value.toString()===L}constructor(P){(0,o._)(this,"value",void 0),this.value=P}}class M{filterEntity(P){var $,L;const y=(P==null||(L=P.status)===null||L===void 0||($=L.items)===null||$===void 0?void 0:$.length)>0;return y!==void 0&&this.value===y}constructor(P){(0,o._)(this,"value",void 0),this.value=P}}},25942:function(J,T,t){"use strict";t.d(T,{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),p=t(2784),c=t(73557),u=t(69294),A=t(48760),x=t(90736),O=t(88624),m=t(64039),b=t(44394);const g=(0,p.createContext)(void 0),M=P=>{const $=(0,x.default)(),L=(0,b.h_)(O.A),[y,Z]=(0,p.useState)({}),V=(0,c.TH)(),et=P.pagination===!0||typeof P.pagination=="object",Y=P.pagination&&typeof P.pagination=="object"&&typeof P.pagination.limit=="number"?P.pagination.limit:20,{queryParameters:K,cursor:k}=(0,p.useMemo)(()=>{const z=v().parse(V.search,{ignoreQueryPrefix:!0});var q;return{queryParameters:(q=z.filters)!==null&&q!==void 0?q:{},cursor:typeof z.cursor=="string"?z.cursor:void 0}},[V]),[_,rt]=(0,p.useState)(k),[dt,vt]=(0,p.useState)(()=>({appliedFilters:{},entities:[],backendEntities:[],pageInfo:et?{}:void 0})),[{loading:Et,error:Tt},gt]=(0,u.default)(async()=>{const z=(0,i.compact)(Object.values(y)),q=Object.keys(y).reduce((it,at)=>{const nt=y[at];return nt!=null&&nt.toQueryValue&&(it[at]=nt.toQueryValue()),it},{});if(et)if(_){if(_!==dt.appliedCursor){const it=(0,m.Gz)(z),at=await L.queryEntities({cursor:_,limit:Y});vt({appliedFilters:y,appliedCursor:_,backendEntities:at.items,entities:at.items.filter(it),pageInfo:at.pageInfo})}}else{const it=(0,m.Gz)(z),at=(0,m.wq)(z),nt=(0,m.wq)((0,i.compact)(Object.values(dt.appliedFilters)));if(!(0,i.isEqual)(nt,at)){const St=await L.queryEntities({filter:at,limit:Y,orderFields:[{field:"metadata.name",order:"asc"}]});vt({appliedFilters:y,backendEntities:St.items,entities:St.items.filter(it),pageInfo:St.pageInfo})}}else{const it=(0,m.Gz)(z),at=(0,m.Oq)(z),nt=(0,m.Oq)((0,i.compact)(Object.values(dt.appliedFilters)));if((0,i.isEqual)(nt,at))vt({appliedFilters:y,backendEntities:dt.backendEntities,entities:dt.backendEntities.filter(it)});else{const St=await L.getEntities({filter:at});vt({appliedFilters:y,backendEntities:St.items,entities:St.items.filter(it)})}}if($()){var st;const it=v().parse(V.search,{ignoreQueryPrefix:!0}),at=v().stringify({...it,filters:q,cursor:_},{addQueryPrefix:!0,arrayFormat:"repeat"}),nt=`${window.location.pathname}${at}`;(st=window.history)===null||st===void 0||st.replaceState(null,document.title,nt)}},[L,K,y,dt,_,et],{loading:!0});(0,A.Z)(gt,10,[y,_]);const xt=(0,p.useCallback)(z=>{rt(void 0),Z(q=>{const st=typeof z=="function"?z(q):z;return{...q,...st}})},[]),Q=(0,p.useMemo)(()=>{var z,q;if(!et)return;const st=(z=dt.pageInfo)===null||z===void 0?void 0:z.prevCursor,it=(q=dt.pageInfo)===null||q===void 0?void 0:q.nextCursor;return{prev:st?()=>rt(st):void 0,next:it?()=>rt(it):void 0}},[et,dt.pageInfo]),j=(0,p.useMemo)(()=>({filters:dt.appliedFilters,entities:dt.entities,backendEntities:dt.backendEntities,updateFilters:xt,queryParameters:K,loading:Et,error:Tt,pageInfo:Q}),[dt,xt,K,Et,Tt,Q]);return(0,o.jsx)(g.Provider,{value:j,children:P.children})};function R(){const P=(0,p.useContext)(g);if(!P)throw new Error("useEntityList must be used within EntityListProvider");return P}},42870:function(J,T,t){"use strict";t.d(T,{C:function(){return c}});var o=t(74314),i=t(44394),d=t(2784),S=t(72164),v=t(36802);function p(u){return typeof u=="string"?u:(0,o.eE)(u)}function c(){const u=(0,i.h_)(v.p),A=(0,S.Z)((0,d.useMemo)(()=>u.starredEntitie$(),[u]),new Set),x=(0,d.useCallback)(m=>A.has(p(m)),[A]),O=(0,d.useCallback)(m=>u.toggleStarred(p(m)).then(),[u]);return{starredEntities:A,toggleStarredEntity:O,isStarredEntity:x}}},36434:function(J,T,t){"use strict";t.d(T,{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 p,c;return{kind:v.kind.toLocaleLowerCase("en-US"),namespace:(c=(p=v.metadata.namespace)===null||p===void 0?void 0:p.toLocaleLowerCase("en-US"))!==null&&c!==void 0?c:DEFAULT_NAMESPACE,name:v.metadata.name}}},64039:function(J,T,t){"use strict";t.d(T,{Gz:function(){return S},Oq:function(){return d},wq:function(){return i}});var o=t(4967);function i(v){return v.reduce((p,c)=>({...p,...c.getCatalogFilters?c.getCatalogFilters():{}}),{})}function d(v){const p={};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(p,((u=c.getCatalogFilters)===null||u===void 0?void 0:u.call(c))||{})}),p}function S(v){return p=>v.every(c=>!c.filterEntity||c.filterEntity(p))}},75435:function(J,T,t){"use strict";t.d(T,{h:function(){return i}});var o=t(74314);function i(d,S,v){var p;let c=(d==null||(p=d.relations)===null||p===void 0?void 0:p.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(J,T,t){"use strict";t.d(T,{yw:function(){return u},ql:function(){return x},_Z:function(){return m},kR:function(){return O},jU:function(){return A}});var o=t(87612),i=t(92918);let d=i.K,S=d;class v{toString(){return`routeRef{type=external,id=${this.id}}`}constructor(g,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=g,this.params=M,this.optional=R,this[d]="external"}}function p(b){var g;return new v(b.id,(g=b.params)!==null&&g!==void 0?g:[],Boolean(b.optional))}var c=t(30283);const u=p({id:"create-component",optional:!0}),A=p({id:"view-techdoc",optional:!0,params:["namespace","kind","name"]}),x=p({id:"create-from-template",optional:!0,params:["namespace","templateName"]}),O=p({id:"catalog:unregister-redirect",optional:!0}),m=(0,c.N)({id:"catalog"})},76079:function(J,T,t){"use strict";t.d(T,{F:function(){return v}});var o=t(52322),i=t(2784),d=t(79692);const S=(0,d.Z)(()=>({highlight:{}}),{name:"BackstageHighlightedSearchResultText"}),v=p=>{const{text:c,preTag:u,postTag:A}=p,x=S(),O=(0,i.useMemo)(()=>c.split(new RegExp(`(${u}.+?${A})`)),[A,u,c]);return(0,o.jsx)(o.Fragment,{children:O.map((m,b)=>m.includes(u)?(0,o.jsx)("mark",{className:x.highlight,children:m.replace(new RegExp(`${u}|${A}`,"g"),"")},b):m)})}},53945:function(J,T,t){"use strict";t.d(T,{E5:function(){return A}});var o=t(52322),i=t(2784),d=t(62369),S=t(82963),v=t(38402);const p="search.results.list.items.extensions.v1",c=(m,b)=>{for(const g of m){if(!isValidElement(g))continue;const M=getComponentData(g,p);if(M!=null&&M(b))return cloneElement(g,{rank:b.rank,highlight:b.highlight,result:b.document,...g.props})}return null},u=m=>{const{rank:b,result:g,noTrack:M,children:R,alignItems:P="flex-start",...$}=m,L=(0,d.z)(),y=(0,i.useCallback)(()=>{M||g&&L.captureEvent("discover",g.title,{attributes:{to:g.location},value:b})},[b,g,M,L]);return(0,o.jsx)(v.Z,{divider:!0,alignItems:P,onClickCapture:y,...$,children:R})},A=m=>{const{name:b,component:g,predicate:M=()=>!0}=m;return(0,S.YO)({name:b,component:{lazy:()=>g().then(R=>P=>(0,o.jsx)(u,{rank:P.rank,result:P.result,noTrack:P.noTrack,children:(0,i.createElement)(R,P)}))},data:{[p]:M}})},x=m=>{const b=useElementFilter(m,g=>g.selectByComponentData({key:p}).getElements(),[m]);return useCallback((g,M)=>{const R=c(b,g);return _jsx(Fragment,{children:R!=null?R:_jsx(u,{rank:g.rank,result:g.document,children:_jsx(DefaultResultListItem,{rank:g.rank,highlight:g.highlight,result:g.document})})},M)},[b])},O=m=>{const{results:b,children:g,...M}=m,R=x(g);return _jsx(List,{...M,children:b.map(R)})}},2296:function(J,T,t){"use strict";t.d(T,{$L:function(){return M},DR:function(){return A},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),p=t(2532);const c="techdocs.addons.addon.v1",u="techdocs.addons.wrapper.v1",A=()=>null;(0,S.R)(A,u,!0);const x=R=>`${c}.${R.toLocaleLowerCase("en-US")}`;function O(R){const{name:P,component:$}=R;return(0,v.YO)({name:P,component:{sync:L=>(0,o.jsx)($,{...L})},data:{[c]:R,[x(P)]:!0}})}const m=(R,P)=>R.selectByComponentData({key:P}).getElements()[0],b=R=>R.selectByComponentData({key:u}).selectByComponentData({key:c}),g=R=>R.selectByComponentData({key:u}).findComponentData({key:c}),M=()=>{const R=(0,d.pC)(),P=(0,p.v)(R,b),$=(0,p.v)(R,g),L=(0,i.useCallback)(V=>{if(!P||!V)return null;const et=x(V.name);var Y;return(Y=m(P,et))!==null&&Y!==void 0?Y:null},[P]),y=(0,i.useCallback)(V=>{const et=$.find(Y=>Y.name===V);return et?L(et):null},[$,L]),Z=(0,i.useCallback)(V=>{const et=$.filter(Y=>Y.location===V);return et.length?et.map(L):null},[$,L]);return{renderComponentByName:y,renderComponentsByLocation:Z}}},58496:function(J,T,t){"use strict";t.d(T,{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(J,T,t){"use strict";t.d(T,{Z:function(){return R},x:function(){return P}});var o=t(52322),i=t(2784),d=t(64279),S=t(77446),v=t(74314),p=t(29651),c=t(68993),u=t(44394),A=t(6542),x=t(72388),O=t(58496);function m($,L){return L.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")||($.kind=$.kind.toLocaleLowerCase(),$.name=$.name.toLocaleLowerCase(),$.namespace=$.namespace.toLocaleLowerCase()),$}const b=($,L)=>(0,v.eE)($)===(0,v.eE)(L),g={title:"",subtitle:"",setTitle:()=>{},setSubtitle:()=>{},setShadowRoot:()=>{},metadata:{loading:!0},entityMetadata:{loading:!0},entityRef:{kind:"",name:"",namespace:""}},M=(0,p.CT)("techdocs-reader-page-context"),R=(0,i.memo)($=>{const{entityRef:L,children:y}=$,Z=(0,u.h_)(O.g),V=(0,u.h_)(A.D),et=(0,d.default)(async()=>Z.getEntityMetadata(L),[L]),Y=(0,S.Z)(async()=>Z.getTechDocsMetadata(L),[L]),[K,k]=(0,i.useState)(g.title),[_,rt]=(0,i.useState)(g.subtitle),[dt,vt]=(0,i.useState)(g.shadowRoot);(0,i.useEffect)(()=>{dt&&!Y.value&&!Y.loading&&Y.retry()},[Y.value,Y.loading,dt,Y.retry,Y]);const Et={metadata:Y,entityRef:m(L,V),entityMetadata:et,shadowRoot:dt,setShadowRoot:vt,title:K,setTitle:k,subtitle:_,setSubtitle:rt},Tt=(0,c.E)({1:Et});return(0,o.jsx)(x.fC,{attributes:{entityRef:(0,v.eE)(L)},children:(0,o.jsx)(M.Provider,{value:Tt,children:y instanceof Function?y(Et):y})})},($,L)=>b($.entityRef,L.entityRef)),P=()=>{const $=(0,i.useContext)(M);if($===void 0)return g;const L=$.atVersion(1);if(L===void 0)throw new Error("No context found for version 1.");return L}},57058:function(J,T,t){"use strict";t.d(T,{o:function(){return o}});const o=Object.freeze({Header:"Header",Subheader:"Subheader",Settings:"Settings",PrimarySidebar:"PrimarySidebar",SecondarySidebar:"SecondarySidebar",Content:"Content"})},51953:function(J,T,t){"use strict";t.d(T,{D:function(){return o}});function o(i,d){return d.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")?i:i.toLocaleLowerCase("en-US")}},29895:function(J,T,t){"use strict";t.d(T,{u:function(){return Y}});var o=t(52322),i=t(2784),d=t(42398),S=t(30706),v=t(13788),p=t(25942),c=t(30389),u=t(32494),A=t(63833),x=t(97894),O=t(42081),m=t(88797);class b{getCatalogFilters(){return{"metadata.annotations.backstage.io/techdocs-ref":m.n}}}const g=()=>{const{updateFilters:K}=(0,p.wp)();return(0,i.useEffect)(()=>{K({techdocs:new b})},[K]),null};var M=t(95074),R=t(76635),P=t(538),$=t(9791),L=t(42870),y=t(16787),Z=t(45342),V=t(49079);const et=K=>{var k;const{columns:_,actions:rt,options:dt}=K,{loading:vt,error:Et,entities:Tt,filters:gt}=(0,p.wp)(),{isStarredEntity:xt,toggleStarredEntity:Q}=(0,L.C)(),[,j]=(0,M.Z)();var z;const q=(0,R.capitalize)((z=(k=gt.user)===null||k===void 0?void 0:k.value)!==null&&z!==void 0?z:"all"),st=[Z.n.createCopyDocsUrlAction(j),Z.n.createStarEntityAction(xt,Q)];return Et?(0,o.jsx)(P.G,{severity:"error",title:"Could not load available documentation.",children:(0,o.jsx)($.O,{language:"text",text:Et.toString()})}):(0,o.jsx)(y.H,{title:q,entities:Tt,loading:vt,actions:rt||st,columns:_,options:dt})};et.columns=V.N,et.actions=Z.n;const Y=K=>{const{initialFilter:k="owned",columns:_,actions:rt}=K;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)(p.UO,{children:(0,o.jsxs)(c._i,{children:[(0,o.jsxs)(c._i.Filters,{children:[(0,o.jsx)(g,{}),(0,o.jsx)(u.E,{initialFilter:k}),(0,o.jsx)(A.d,{}),(0,o.jsx)(x.x,{})]}),(0,o.jsx)(c._i.Content,{children:(0,o.jsx)(et,{actions:rt,columns:_})})]})})]})})}},16787:function(J,T,t){"use strict";t.d(T,{H:function(){return P}});var o=t(52322),i=t(2784),d=t(95074),S=t(37321),v=t(44394),p=t(6542),c=t(8709),u=t(75435),A=t(86540),x=t(95573),O=t(34378),m=t(70249),b=t(15929),g=t(45342),M=t(49079),R=t(51953);const P=$=>{const{entities:L,title:y,loading:Z,columns:V,actions:et,options:Y}=$,[,K]=(0,d.Z)(),k=(0,S.t)(x.Fw),_=(0,v.h_)(p.D);if(!L)return null;const rt=L.map(gt=>{const xt=(0,u.h)(gt,c.S4);var Q;return{entity:gt,resolved:{docsUrl:k({namespace:(0,R.D)((Q=gt.metadata.namespace)!==null&&Q!==void 0?Q:"default",_),kind:(0,R.D)(gt.kind,_),name:(0,R.D)(gt.metadata.name,_)}),ownedByRelations:xt,ownedByRelationsTitle:xt.map(j=>(0,A.$)(j,{defaultKind:"group"})).join(", ")}}}),dt=[M.N.createNameColumn(),M.N.createOwnerColumn(),M.N.createKindColumn(),M.N.createTypeColumn()],vt=[g.n.createCopyDocsUrlAction(K)],Et=20,Tt=rt&&rt.length>Et;return(0,o.jsx)(o.Fragment,{children:Z||rt&&rt.length>0?(0,o.jsx)(O.i,{isLoading:Z,options:{paging:Tt,pageSize:Et,search:!0,actionsColumnIndex:-1,...Y},data:rt,columns:V||dt,actions:et||vt,title:y?`${y} (${rt.length})`:`All (${rt.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)(b.Q,{color:"primary",to:"https://backstage.io/docs/features/techdocs/getting-started",variant:"contained",children:"DOCS"})})})};P.columns=M.N,P.actions=g.n},45342:function(J,T,t){"use strict";t.d(T,{n:function(){return u}});var o=t(52322),i=t(2784),d=t(39981),S=t(2337),v=t(11640),p=t(28347);const c=(0,S.Z)({root:{color:"#f3ba37"}})(v.Z),u={createCopyDocsUrlAction(A){return x=>({icon:()=>(0,o.jsx)(d.Z,{fontSize:"small"}),tooltip:"Click to copy documentation link to clipboard",onClick:()=>A(`${window.location.origin}${x.resolved.docsUrl}`)})},createStarEntityAction(A,x){return O=>{const m=O.entity,b=A(m);return{cellStyle:{paddingLeft:"1em"},icon:()=>b?(0,o.jsx)(c,{}):(0,o.jsx)(p.Z,{}),tooltip:b?"Remove from favorites":"Add to favorites",onClick:()=>x(m)}}}}},49079:function(J,T,t){"use strict";t.d(T,{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 p(O){const{value:m,subvalue:b}=O,g=v();return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.Z,{className:g.value,children:m}),(0,o.jsx)(d.Z,{className:g.subvalue,children:b})]})}var c=t(98864),u=t(51194);function A(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)(p,{value:(0,o.jsx)(c.rU,{to:O.resolved.docsUrl,children:A(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(J,T,t){"use strict";t.d(T,{j:function(){return p}});var o=t(52322),i=t(2784),d=t(32166),S=t(44394),v=t(6542);const p=c=>{const{children:u}=c,A=(0,S.h_)(v.D);var x;const O=`Documentation available in ${(x=A.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(J,T,t){"use strict";t.d(T,{Jl:function(){return Tt},I6:function(){return gt},s4:function(){return rt}});var o=t(58496),i=t(87612),d=t(41385),S=t(48998),v=t(30474);class p extends Error{constructor(j,z){var q,st;let it=j;if(z!==void 0){const at=(0,S.n)(z);it?it+=`; caused by ${at}`:it=`caused by ${at}`}super(it),(0,i._)(this,"cause",void 0),(q=(st=Error).captureStackTrace)===null||q===void 0||q.call(st,this,this.constructor),(!this.name||this.name==="Error")&&this.constructor.name!=="Error"&&(this.name=this.constructor.name),this.cause=(0,v.V)(z)?z:void 0}}class c extends null{constructor(...j){super(...j),_define_property(this,"name","InputError")}}class u extends null{constructor(...j){super(...j),_define_property(this,"name","AuthenticationError")}}class A extends null{constructor(...j){super(...j),_define_property(this,"name","NotAllowedError")}}class x extends p{constructor(...j){super(...j),(0,i._)(this,"name","NotFoundError")}}class O extends null{constructor(...j){super(...j),_define_property(this,"name","ConflictError")}}class m extends null{constructor(...j){super(...j),_define_property(this,"name","NotModifiedError")}}class b extends null{constructor(...j){super(...j),_define_property(this,"name","NotImplementedError")}}class g extends null{}class M extends null{constructor(j,z){super(j,z),this.name=isError(z)?z.name:"Error"}}var R=t(54847);class P{async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getTechDocsMetadata(j){const{kind:z,namespace:q,name:st}=j,at=`${await this.getApiOrigin()}/metadata/techdocs/${q}/${z}/${st}`,nt=await this.fetchApi.fetch(`${at}`);if(!nt.ok)throw await d.V.fromResponse(nt);return await nt.json()}async getEntityMetadata(j){const{kind:z,namespace:q,name:st}=j,at=`${await this.getApiOrigin()}/metadata/entity/${q}/${z}/${st}`,nt=await this.fetchApi.fetch(`${at}`);if(!nt.ok)throw await d.V.fromResponse(nt);return await nt.json()}constructor(j){(0,i._)(this,"configApi",void 0),(0,i._)(this,"discoveryApi",void 0),(0,i._)(this,"fetchApi",void 0),this.configApi=j.configApi,this.discoveryApi=j.discoveryApi,this.fetchApi=j.fetchApi}}class ${async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getStorageUrl(){var j;return(j=this.configApi.getOptionalString("techdocs.storageUrl"))!==null&&j!==void 0?j:`${await this.discoveryApi.getBaseUrl("techdocs")}/static/docs`}async getBuilder(){return this.configApi.getString("techdocs.builder")}async getEntityDocs(j,z){const{kind:q,namespace:st,name:it}=j,nt=`${await this.getStorageUrl()}/${st}/${q}/${it}/${z}`,St=await this.fetchApi.fetch(`${nt.endsWith("/")?nt:`${nt}/`}index.html`);let G="";switch(St.status){case 404:throw G="Page not found. ",z||(G+="This could be because there is no index.md file in the root of the docs directory of this repository."),new x(G);case 500:throw G="Could not generate documentation or an error in the TechDocs backend. ",new Error(G);default:break}return St.text()}async syncEntityDocs(j,z=()=>{}){const{kind:q,namespace:st,name:it}=j,nt=`${await this.getApiOrigin()}/sync/${st}/${q}/${it}`,{token:St}=await this.identityApi.getCredentials();return new Promise((G,H)=>{const ut=new R.EventSourcePolyfill(nt,{withCredentials:!0,headers:St?{Authorization:`Bearer ${St}`}:{}});ut.addEventListener("log",ht=>{ht.data&&z(JSON.parse(ht.data))}),ut.addEventListener("finish",ht=>{let mt=!1;ht.data&&({updated:mt}=JSON.parse(ht.data)),G(mt?"updated":"cached")}),ut.onerror=ht=>{switch(ut.close(),ht.status){case 404:H(new x(ht.message));return;default:H(new Error(ht.data));return}}})}async getBaseUrl(j,z,q){const{kind:st,namespace:it,name:at}=z,St=`${await this.getApiOrigin()}/static/docs/${it}/${st}/${at}/${q}`;return new URL(j,St.endsWith("/")?St:`${St}/`).toString()}constructor(j){(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=j.configApi,this.discoveryApi=j.discoveryApi,this.identityApi=j.identityApi,this.fetchApi=j.fetchApi}}var L=t(95573),y=t(15006),Z=t(42380),V=t(6542),et=t(96727),Y=t(77186),K=t(85094),k=t(82963),_=t(53945);const rt=(0,y.r)({id:"techdocs",apis:[(0,Z.n)({api:o.D,deps:{configApi:V.D,discoveryApi:et.N,identityApi:Y.$,fetchApi:K.g},factory:({configApi:Q,discoveryApi:j,identityApi:z,fetchApi:q})=>new $({configApi:Q,discoveryApi:j,identityApi:z,fetchApi:q})}),(0,Z.n)({api:o.g,deps:{configApi:V.D,discoveryApi:et.N,fetchApi:K.g},factory:({configApi:Q,discoveryApi:j,fetchApi:z})=>new P({configApi:Q,discoveryApi:j,fetchApi:z})})],routes:{root:L._Z,docRoot:L.Fw,entityContent:L.pd}}),dt=rt.provide((0,k.P4)({name:"TechdocsPage",component:()=>t.e(8096).then(t.bind(t,8096)).then(Q=>Q.Router),mountPoint:L._Z})),vt=rt.provide((0,k.P4)({name:"EntityTechdocsContent",component:()=>t.e(8096).then(t.bind(t,8096)).then(Q=>Q.EmbeddedDocsRouter),mountPoint:L.pd})),Et=rt.provide((0,k.P4)({name:"TechDocsCustomHome",component:()=>t.e(4109).then(t.bind(t,44109)).then(Q=>Q.TechDocsCustomHome),mountPoint:L._Z})),Tt=rt.provide((0,k.P4)({name:"TechDocsIndexPage",component:()=>t.e(8662).then(t.bind(t,18662)).then(Q=>Q.TechDocsIndexPage),mountPoint:L._Z})),gt=rt.provide((0,k.P4)({name:"TechDocsReaderPage",component:()=>t.e(5914).then(t.bind(t,35914)).then(Q=>Q.TechDocsReaderPage),mountPoint:L.Fw})),xt=rt.provide((0,_.E5)({name:"TechDocsSearchResultListItem",component:()=>Promise.resolve().then(t.bind(t,55511)).then(Q=>Q.TechDocsSearchResultListItem),predicate:Q=>Q.type==="techdocs"}))},14540:function(J,T,t){"use strict";t.d(T,{F:function(){return ko}});var o=t(52322),i=t(2784),d=t(79692),S=t(60905),v=t(68979),p=t(70882),c=t(50236),u=t(19219),A=t(55015);const x="TECH_DOCS_SHADOW_DOM_STYLE_LOAD",O=f=>{(0,i.useEffect)(()=>{if(!f)return()=>{};const w=f.querySelectorAll('head > link[rel="stylesheet"]');var B;let F=(B=w==null?void 0:w.length)!==null&&B!==void 0?B:0;const tt=new CustomEvent(x);if(!F)return f.dispatchEvent(tt),()=>{};const ot=()=>{--F===0&&f.dispatchEvent(tt)};return w==null||w.forEach(ft=>{ft.addEventListener("load",ot)}),()=>{w==null||w.forEach(ft=>{ft.removeEventListener("load",ot)})}},[f])},m=f=>{const[w,B]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{if(!f)return()=>{};B(!0);const F=f.style;F.setProperty("opacity","0");const tt=()=>{B(!1),F.setProperty("opacity","1")};return f.addEventListener(x,tt),()=>{f.removeEventListener(x,tt)}},[f]),w},b=f=>{const{element:w,onAppend:B,children:F}=f,[tt,ot]=(0,i.useState)((0,p.Ue)({...(0,c.Z)(),insertionPoint:void 0}));O(w);const ft=m(w),Ct=(0,i.useCallback)(It=>{if(!w||!It)return;ot((0,p.Ue)({...(0,c.Z)(),insertionPoint:w.querySelector("head")||void 0}));let $t=It.shadowRoot;$t||($t=It.attachShadow({mode:"open"})),$t.replaceChildren(w),typeof B=="function"&&B($t)},[w,B]);return(0,o.jsxs)(o.Fragment,{children:[ft&&(0,o.jsx)(A.E,{}),(0,o.jsxs)(u.ZP,{jss:tt,sheetsManager:new Map,children:[(0,o.jsx)("div",{ref:Ct,"data-testid":"techdocs-native-shadowroot"}),F]})]})};var g=t(54073);const M=()=>{const{shadowRoot:f}=(0,v.x)();return f},R=f=>{const w=M();return w?f.map(B=>w==null?void 0:w.querySelectorAll(B)).filter(B=>B.length).map(B=>Array.from(B)).flat():[]},P=f=>f.toString()&&f.rangeCount&&f.getRangeAt(0).getBoundingClientRect().top,$=(f=0)=>{const w=M(),[B,F]=useState(null),tt=useMemo(()=>debounce(()=>{const ot=w,ft=ot.getSelection?ot.getSelection():document.getSelection();ft&&P(ft)?F(ft):F(null)},f),[w,F,f]);return useEffect(()=>(window.document.addEventListener("selectionchange",tt),()=>{tt.cancel(),window.document.removeEventListener("selectionchange",tt)}),[tt]),B};var L=t(87435),y=t(42398),Z=t(76635),V=t(64279),et=t(1849),Y=t(29651),K=t(68993),k=t(44394),_=t(62369),rt=t(72388),dt=t(6542),vt=t(95965);const Et=(0,vt.T)({id:"plugin.search.queryservice"});class Tt{query(){return Promise.resolve(this.mockedResults||{results:[]})}constructor(w){_define_property(this,"mockedResults",void 0),this.mockedResults=w}}const gt=(0,Y.CT)("search-context"),xt=()=>{const f=(0,i.useContext)(gt);if(!f)throw new Error("useSearch must be used within a SearchContextProvider");const w=f.atVersion(1);if(!w)throw new Error("No SearchContext v1 found");return w},Q=()=>(0,i.useContext)(gt)!==void 0,j={term:"",types:[],filters:{},pageLimit:void 0,pageCursor:void 0},z=(f=j)=>{var w,B,F,tt;const ot=(0,k.h_)(Et),ft=(0,_.z)(),[Ct,It]=(0,i.useState)(f.term),[$t,Yt]=(0,i.useState)(f.types),[Ft,Pt]=(0,i.useState)(f.filters),[le,me]=(0,i.useState)(f.pageLimit),[Qt,Bt]=(0,i.useState)(f.pageCursor),oe=(0,et.Z)(Ct),ye=(0,et.Z)(Ft),Lt=(0,V.default)(async()=>{const ce=await ot.query({term:Ct,types:$t,filters:Ft,pageLimit:le,pageCursor:Qt});return Ct&&ce.numberOfResults!==void 0&&ft.captureEvent("search",Ct,{value:ce.numberOfResults}),ce},[Ct,$t,Ft,le,Qt]),zt=!Lt.loading&&!Lt.error&&((w=Lt.value)===null||w===void 0?void 0:w.nextPageCursor),Xt=!Lt.loading&&!Lt.error&&((B=Lt.value)===null||B===void 0?void 0:B.previousPageCursor),Ce=(0,i.useCallback)(()=>{var ce;Bt((ce=Lt.value)===null||ce===void 0?void 0:ce.nextPageCursor)},[(F=Lt.value)===null||F===void 0?void 0:F.nextPageCursor]),Te=(0,i.useCallback)(()=>{var ce;Bt((ce=Lt.value)===null||ce===void 0?void 0:ce.previousPageCursor)},[(tt=Lt.value)===null||tt===void 0?void 0:tt.previousPageCursor]);return(0,i.useEffect)(()=>{oe!==void 0&&Ct!==oe&&Bt(void 0)},[Ct,oe,Bt]),(0,i.useEffect)(()=>{ye!==void 0&&!(0,Z.isEqual)(Ft,ye)&&Bt(void 0)},[Ft,ye,Bt]),{result:Lt,term:Ct,setTerm:It,types:$t,setTypes:Yt,filters:Ft,setFilters:Pt,pageLimit:le,setPageLimit:me,pageCursor:Qt,setPageCursor:Bt,fetchNextPage:zt?Ce:void 0,fetchPreviousPage:Xt?Te:void 0}},q=f=>{const{initialState:w,children:B}=f,F=z(w);return(0,o.jsx)(rt.fC,{attributes:{searchTypes:F.types.sort().join(",")},children:(0,o.jsx)(gt.Provider,{value:(0,K.E)({1:F}),children:B})})},st=f=>{const{initialState:w,inheritParentContextIfAvailable:B,children:F}=f,tt=Q(),ot=(0,k.h_)(dt.D),ft=w!=null?w:{},Ct=ot.has("search.query.pageLimit")?{pageLimit:ot.getNumber("search.query.pageLimit")}:{},It={...j,...ft,...Ct};return tt&&B?(0,o.jsx)(o.Fragment,{children:F}):(0,o.jsx)(q,{initialState:It,children:F})};var it=t(4614),at=t(88013),nt=t(50581),St=t(61837),G=t(86619),H=t(77277),ut=t(21853),ht=t(48760);function mt(f){return(0,i.forwardRef)((w,B)=>(0,o.jsx)(st,{inheritParentContextIfAvailable:!0,children:(0,o.jsx)(f,{...w,ref:B})}))}const bt=mt((0,i.forwardRef)((f,w)=>{const{onChange:B,onKeyDown:F=()=>{},onClear:tt=()=>{},onSubmit:ot=()=>{},debounceTime:ft=200,clearButton:Ct=!0,fullWidth:It=!0,value:$t,label:Yt,placeholder:Ft,inputProps:Pt={},InputProps:le={},endAdornment:me,...Qt}=f,Bt=(0,k.h_)(dt.D),[oe,ye]=(0,i.useState)(""),Lt=(0,i.useRef)("");(0,i.useEffect)(()=>{ye(pe=>pe===Lt.current?String($t):pe)},[$t,Lt]),(0,ht.Z)(()=>{Lt.current=oe,B(oe)},ft,[oe]);const zt=(0,i.useCallback)(pe=>{ye(pe.target.value)},[ye]),Xt=(0,i.useCallback)(pe=>{F&&F(pe),ot&&pe.key==="Enter"&&ot()},[F,ot]),Ce=(0,i.useCallback)(()=>{Lt.current="",B(""),ye(""),tt&&tt()},[B,tt]),Te=Yt?void 0:"Search",Fe=Ft!=null?Ft:`Search in ${Bt.getOptionalString("app.title")||"Backstage"}`,ce=(0,o.jsx)(nt.Z,{position:"start",children:(0,o.jsx)(St.Z,{"aria-label":"Query",size:"small",disabled:!0,children:(0,o.jsx)(ut.Z,{})})}),Ze=(0,o.jsx)(nt.Z,{position:"end",children:(0,o.jsx)(H.Z,{"aria-label":"Clear",size:"small",onClick:Ce,onKeyDown:pe=>{pe.key==="Enter"&&pe.stopPropagation()},children:"Clear"})});return(0,o.jsx)(G.Z,{id:"search-bar-text-field","data-testid":"search-bar-next",variant:"outlined",margin:"normal",inputRef:w,value:oe,label:Yt,placeholder:Fe,InputProps:{startAdornment:ce,endAdornment:Ct?Ze:me,...le},inputProps:{"aria-label":Te,...Pt},fullWidth:It,onChange:zt,onKeyDown:Xt,...Qt})})),jt=mt((0,i.forwardRef)((f,w)=>{const{value:B="",onChange:F,...tt}=f,{term:ot,setTerm:ft}=xt();(0,i.useEffect)(()=>{B&&ft(String(B))},[B,ft]);const Ct=(0,i.useCallback)(It=>{F?F(It):ft(It)},[F,ft]);return(0,o.jsx)(rt.fC,{attributes:{pluginId:"search",extension:"SearchBar"},children:(0,o.jsx)(bt,{...tt,ref:w,value:ot,onChange:Ct})})})),Jt=(0,d.Z)(f=>({loading:{right:f.spacing(1),position:"absolute"}})),Wt=f=>w=>(0,o.jsx)(st,{inheritParentContextIfAvailable:!0,children:(0,o.jsx)(f,{...w})}),Ht=()=>{const f=Jt();return(0,o.jsx)(it.Z,{className:f.loading,"data-testid":"search-autocomplete-progressbar",color:"inherit",size:20})},Dt=Wt(function(w){const{loading:B,value:F,onChange:tt=()=>{},options:ot=[],getOptionLabel:ft=Lt=>String(Lt),inputPlaceholder:Ct,inputDebounceTime:It,freeSolo:$t=!0,fullWidth:Yt=!0,clearOnBlur:Ft=!1,"data-testid":Pt="search-autocomplete",...le}=w,{setTerm:me}=xt(),Qt=(0,i.useCallback)(Lt=>Lt?typeof Lt=="string"?Lt:ft(Lt):"",[ft]),Bt=(0,i.useMemo)(()=>Qt(F),[F,Qt]),oe=(0,i.useCallback)((Lt,zt,Xt,Ce)=>{me(Qt(zt)),tt(Lt,zt,Xt,Ce)},[Qt,me,tt]),ye=(0,i.useCallback)(({InputProps:{ref:Lt,className:zt,endAdornment:Xt},InputLabelProps:Ce,...Te})=>(0,o.jsx)(jt,{...Te,ref:Lt,clearButton:!1,value:Bt,placeholder:Ct,debounceTime:It,endAdornment:B?(0,o.jsx)(Ht,{}):Xt,InputProps:{className:zt}}),[B,Bt,Ct,It]);return(0,o.jsx)(at.ZP,{...le,"data-testid":Pt,value:F,onChange:oe,options:ot,getOptionLabel:ft,renderInput:ye,freeSolo:$t,fullWidth:Yt,clearOnBlur:Ft})});var Mt=t(73557),Gt=t(55511);const ee=f=>f==null?void 0:f.document,re=f=>{const{entityId:w,entityTitle:B,debounceTime:F=150}=f,[tt,ot]=(0,i.useState)(!1),ft=(0,Mt.s0)(),{setFilters:Ct,result:{loading:It,value:$t}}=xt(),[Yt,Ft]=(0,i.useState)([]);(0,i.useEffect)(()=>{let Bt=!0;if(Bt&&$t){const oe=$t.results.slice(0,10);Ft(oe)}return()=>{Bt=!1}},[It,$t]);const{kind:Pt,name:le,namespace:me}=w;(0,i.useEffect)(()=>{Ct(Bt=>({...Bt,kind:Pt,namespace:me,name:le}))},[Pt,me,le,Ct]);const Qt=(Bt,oe)=>{if(ee(oe)){const{location:ye}=oe.document;ft(ye)}};return(0,o.jsx)(Dt,{"data-testid":"techdocs-search-bar",size:"small",open:tt,getOptionLabel:()=>"",filterOptions:Bt=>Bt,onClose:()=>{ot(!1)},onFocus:()=>{ot(!0)},onChange:Qt,blurOnSelect:!0,noOptionsText:"No results found",value:null,options:Yt,renderOption:({document:Bt,highlight:oe})=>(0,o.jsx)(Gt.TechDocsSearchResultListItem,{result:Bt,lineClamp:3,asListItem:!1,asLink:!1,title:Bt.title,highlight:oe}),loading:It,inputDebounceTime:F,inputPlaceholder:`Search ${B||w.name} docs`,freeSolo:!1})},qt=f=>{const w={term:"",types:["techdocs"],pageCursor:"",filters:f.entityId};return(0,o.jsx)(st,{initialState:w,children:(0,o.jsx)(re,{...f})})};var de=t(99688),Ie=t(80851);const Ge=(0,i.lazy)(()=>Promise.all([t.e(1113),t.e(6051)]).then(t.bind(t,76051)).then(f=>({default:f.RealLogViewer})));function _e(f){const{Progress:w}=(0,Ie.q)().getComponents();return(0,o.jsx)(i.Suspense,{fallback:(0,o.jsx)(w,{}),children:(0,o.jsx)(Ge,{...f})})}var xe=t(42494),qe=t(90436),Ve=t(4190),Ye=t(87685);const se=(0,d.Z)(f=>(0,xe.Z)({paper:{width:"100%",[f.breakpoints.up("sm")]:{width:"75%"},[f.breakpoints.up("md")]:{width:"50%"},padding:f.spacing(2.5)},root:{height:"100%",overflow:"hidden"},logs:{background:f.palette.background.default}})),sn=({buildLog:f,onClose:w})=>{const B=se(),F=f.length===0?"Waiting for logs...":f.join(`
6
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)(St.Z,{title:"Close the drawer",onClick:w,color:"inherit",children:(0,o.jsx)(Ye.Z,{})},"dismiss")]}),(0,o.jsx)(S.Z,{item:!0,xs:!0,children:(0,o.jsx)(_e,{text:F,classes:{root:B.logs}})})]})},Pe=({buildLog:f})=>{const w=se(),[B,F]=(0,i.useState)(!1);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(H.Z,{color:"inherit",onClick:()=>F(!0),children:"Show Build Logs"}),(0,o.jsx)(Ve.ZP,{classes:{paper:w.paper},anchor:"right",open:B,onClose:()=>F(!1),children:(0,o.jsx)(sn,{buildLog:f,onClose:()=>F(!1)})})]})},tn=({errorMessage:f})=>{const w=(0,k.h_)(dt.D).getOptionalString("techdocs.builder"),B=(0,_.z)(),{entityRef:F}=(0,v.x)(),tt=(0,Mt.TH)();(0,i.useEffect)(()=>{const{pathname:ft,search:Ct,hash:It}=tt;B.captureEvent("not-found",`${ft}${Ct}${It}`,{attributes:F})},[B,F,tt]);let ot="";return w!=="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)(L.m,{status:"404",statusMessage:f||"Documentation not found",additionalInfo:ot})};var an=t(77446),ie=t(58496);function Ne({contentLoading:f,content:w,activeSyncState:B}){return f||B==="BUILD_READY_RELOAD"||!w&&B==="CHECKING"?"CHECKING":!w&&B==="BUILDING"?"INITIAL_BUILD":w?B==="BUILDING"?"CONTENT_STALE_REFRESHING":B==="BUILD_READY"?"CONTENT_STALE_READY":B==="ERROR"?"CONTENT_STALE_ERROR":"CONTENT_FRESH":"CONTENT_NOT_FOUND"}function ke(f,w){const B={...f};switch(w.type){case"sync":w.state==="CHECKING"&&(B.buildLog=[]),B.activeSyncState=w.state,B.syncError=w.syncError;break;case"contentLoading":B.contentLoading=!0,B.contentError=void 0;break;case"content":typeof w.path=="string"&&(B.path=w.path),B.contentLoading=!1,B.content=w.content,B.contentError=w.contentError;break;case"buildLog":B.buildLog=B.buildLog.concat(w.log);break;default:throw new Error}return["BUILD_READY","BUILD_READY_RELOAD"].includes(B.activeSyncState)&&["contentLoading","content"].includes(w.type)&&(B.activeSyncState="UP_TO_DATE",B.buildLog=[]),B}function Se(f,w,B,F){var tt,ot;const[ft,Ct]=(0,i.useReducer)(ke,{activeSyncState:"CHECKING",path:F,contentLoading:!0,buildLog:[]}),It=(0,k.h_)(ie.D),{retry:$t}=(0,an.Z)(async()=>{Ct({type:"contentLoading"});try{const Pt=await It.getEntityDocs({kind:f,namespace:w,name:B},F);return Ct({type:"content",content:Pt,path:F}),Pt}catch(Pt){Ct({type:"content",contentError:Pt,path:F})}},[It,f,w,B,F]),Yt=(0,i.useRef)({content:void 0,reload:()=>{}});return Yt.current={content:ft.content,reload:$t},(0,V.default)(async()=>{Ct({type:"sync",state:"CHECKING"});const Pt=setTimeout(()=>{Ct({type:"sync",state:"BUILDING"})},1e3);try{switch(await It.syncEntityDocs({kind:f,namespace:w,name:B},me=>{Ct({type:"buildLog",log:me})})){case"updated":Yt.current.content?Ct({type:"sync",state:"BUILD_READY"}):(Yt.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(le){Ct({type:"sync",state:"ERROR",syncError:le})}finally{clearTimeout(Pt)}},[f,B,w,It,Ct,Yt]),{state:(0,i.useMemo)(()=>Ne({activeSyncState:ft.activeSyncState,contentLoading:ft.contentLoading,content:ft.content}),[ft.activeSyncState,ft.content,ft.contentLoading]),contentReload:$t,path:ft.path,content:ft.content,contentErrorMessage:(tt=ft.contentError)===null||tt===void 0?void 0:tt.toString(),syncErrorMessage:(ot=ft.syncError)===null||ot===void 0?void 0:ot.toString(),buildLog:ft.buildLog}}const Ue=(0,i.createContext)({}),$e=()=>(0,i.useContext)(Ue),U=f=>{const{children:w}=f,{"*":B=""}=(0,Mt.UO)(),{entityRef:F}=(0,v.x)(),{kind:tt,namespace:ot,name:ft}=F,Ct=Se(tt,ot,ft,B);return(0,o.jsx)(Ue.Provider,{value:Ct,children:w instanceof Function?w(Ct):w})},h=f=>w=>(0,o.jsx)(U,{children:(0,o.jsx)(f,{...w})}),I=(0,d.Z)(f=>({root:{marginBottom:f.spacing(2)},message:{wordBreak:"break-word",overflowWrap:"anywhere"}})),W=()=>{let f=null;const w=I(),{state:B,contentReload:F,contentErrorMessage:tt,syncErrorMessage:ot,buildLog:ft}=$e();return B==="INITIAL_BUILD"&&(f=(0,o.jsx)(de.Z,{classes:{root:w.root},variant:"outlined",severity:"info",icon:(0,o.jsx)(it.Z,{size:"24px"}),action:(0,o.jsx)(Pe,{buildLog:ft}),children:"Documentation is accessed for the first time and is being prepared. The subsequent loads are much faster."})),B==="CONTENT_STALE_REFRESHING"&&(f=(0,o.jsx)(de.Z,{variant:"outlined",severity:"info",icon:(0,o.jsx)(it.Z,{size:"24px"}),action:(0,o.jsx)(Pe,{buildLog:ft}),classes:{root:w.root},children:"A newer version of this documentation is being prepared and will be available shortly."})),B==="CONTENT_STALE_READY"&&(f=(0,o.jsx)(de.Z,{variant:"outlined",severity:"success",action:(0,o.jsx)(H.Z,{color:"inherit",onClick:()=>F(),children:"Refresh"}),classes:{root:w.root},children:"A newer version of this documentation is now available, please refresh to view."})),B==="CONTENT_STALE_ERROR"&&(f=(0,o.jsxs)(de.Z,{variant:"outlined",severity:"error",action:(0,o.jsx)(Pe,{buildLog:ft}),classes:{root:w.root,message:w.message},children:["Building a newer version of this documentation failed."," ",ot]})),B==="CONTENT_NOT_FOUND"&&(f=(0,o.jsxs)(o.Fragment,{children:[ot&&(0,o.jsxs)(de.Z,{variant:"outlined",severity:"error",action:(0,o.jsx)(Pe,{buildLog:ft}),classes:{root:w.root,message:w.message},children:["Building a newer version of this documentation failed."," ",ot]}),(0,o.jsx)(tn,{errorMessage:tt})]})),f};var ct=t(60364),Ot=t(41156),Rt=t(91657),ae=t(35368),te=t.n(ae);const kt=/main\.[A-Fa-f0-9]{8}\.min\.css$/,Ut=/^https:\/\/fonts\.googleapis\.com/,ge=/^https:\/\/fonts\.gstatic\.com/,Le=f=>f.nodeName==="LINK",Zt=f=>{const w=(f==null?void 0:f.getAttribute("href"))||"",B=w.match(kt),F=w.match(Ut),tt=w.match(ge);return B||F||tt},ne=f=>(Le(f)&&!Zt(f)&&f.remove(),f),ue=f=>f.nodeName==="IFRAME",Mn=(f,w)=>{const B=f.getAttribute("src")||"";try{const{host:F}=new URL(B);return w.includes(F)}catch{return!1}},vo=f=>w=>(ue(w)&&!Mn(w,f)&&w.remove(),w),Bn=()=>{const f=(0,k.h_)(dt.D);return(0,i.useMemo)(()=>f.getOptionalConfig("techdocs.sanitizer"),[f])},Un=()=>{const f=Bn();return(0,i.useCallback)(async w=>{const B=f==null?void 0:f.getOptionalStringArray("allowedIframeHosts");te().addHook("beforeSanitizeElements",ne);const F=["link"];return B&&(F.push("iframe"),te().addHook("beforeSanitizeElements",vo(B))),te().sanitize(w.outerHTML,{ADD_TAGS:F,FORBID_TAGS:["style"],WHOLE_DOCUMENT:!0,RETURN_DOM:!0})},[f])};var $n=t(93539),ve=t(41128),je=({theme:f})=>`
7
7
  /*================== Variables ==================*/
8
8
  /*
@@ -488,4 +488,4 @@ ${F.href}
488
488
 
489
489
  Feedback:`),$t=(ot==null?void 0:ot.type)==="github"?(0,Ro.B)(tt.href,"blob"):tt.href,Yt=Do()($t),Ft=`/${Yt.organization}/${Yt.name}`,Pt=F.cloneNode();switch(ot==null?void 0:ot.type){case"gitlab":Pt.href=`${tt.origin}${Ft}/issues/new?issue[title]=${Ct}&issue[description]=${It}`;break;case"github":Pt.href=`${tt.origin}${Ft}/issues/new?title=${Ct}&body=${It}`;break;default:return w}return Cn(i.createElement(Io.Z),Pt),Pt.style.paddingLeft="5px",Pt.title="Leave feedback for this page",Pt.id="git-feedback-link",F==null||F.insertAdjacentElement("beforebegin",Pt),w},Kn=()=>f=>(setTimeout(()=>{const w=f==null?void 0:f.querySelectorAll("li.md-nav__item--active");w.length!==0&&(w.forEach(F=>{const tt=F==null?void 0:F.querySelector("input");tt!=null&&tt.checked||tt==null||tt.click()}),w[w.length-1].scrollIntoView())},200),f);var Hn=t(15459),Lo=t(80030),An=t(72379),Sn=t(41547),jo=t(95074);const Gn=(0,Hn.Z)(f=>({tooltip:{fontSize:"inherit",color:f.palette.text.primary,margin:0,padding:f.spacing(.5),backgroundColor:"transparent",boxShadow:"none"}}))(Lo.ZP),Mo=()=>(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:f})=>{const[w,B]=(0,i.useState)(!1),[,F]=(0,jo.Z)(),tt=(0,i.useCallback)(()=>{F(f),B(!0)},[f,F]),ot=(0,i.useCallback)(()=>{B(!1)},[B]);return(0,o.jsx)(Gn,{title:"Copied to clipboard",placement:"left",open:w,onClose:ot,leaveDelay:1e3,children:(0,o.jsx)(St.Z,{style:{color:"inherit"},className:"md-clipboard md-icon",onClick:tt,children:(0,o.jsx)(Mo,{})})})},Uo=f=>w=>{const B=w.querySelectorAll("pre > code");for(const tt of B){var F;const ot=tt.textContent||"",ft=document.createElement("div");tt==null||(F=tt.parentElement)===null||F===void 0||F.prepend(ft),Cn((0,o.jsx)(Sn.Z,{theme:f,children:(0,o.jsx)(Bo,{text:ot})}),ft)}return w},$o=({baseUrl:f,onClick:w})=>B=>(Array.from(B.getElementsByTagName("a")).forEach(F=>{F.addEventListener("click",tt=>{const ft=F.getAttribute("href");ft&&ft.startsWith(f)&&!F.hasAttribute("download")&&(tt.preventDefault(),w(tt,ft))})}),B),Vn=({onLoading:f,onLoaded:w})=>B=>(f(),B.addEventListener(x,function F(){w(),B.removeEventListener(x,F)}),B);function Fo(f,w){const B=new URL(w),F=`${B.origin}${B.pathname.replace(/\/$/,"")}`,tt=f.replace(F,"").replace(/^\/+/,""),ot=new URL(`http://localhost/${tt}`);return`${ot.pathname}${ot.search}${ot.hash}`}function No(){const f=(0,Mt.s0)(),B=(0,k.h_)(dt.D).getOptionalString("app.baseUrl");return(0,i.useCallback)(tt=>{let ot=tt;if(B)try{ot=Fo(tt,B)}catch{}f(ot)},[f,B])}const Wo="screen and (max-width: 76.1875em)",Zo=f=>{const w=No(),B=(0,ct.Z)(),F=(0,Ot.Z)(Wo),tt=Un(),ot=Ao(),ft=(0,_.z)(),Ct=(0,k.h_)(ie.D),It=(0,k.h_)(Rt.q),{state:$t,path:Yt,content:Ft}=$e(),[Pt,le]=(0,i.useState)(null),me=m(Pt),Qt=(0,i.useCallback)(()=>{if(!Pt)return;Pt.querySelectorAll(".md-sidebar").forEach(zt=>{if(F)zt.style.top="0px";else{var Xt;const ce=(Xt=document)===null||Xt===void 0?void 0:Xt.querySelector(".techdocs-reader-page");var Ce;const Ze=(Ce=ce==null?void 0:ce.getBoundingClientRect().top)!==null&&Ce!==void 0?Ce:0;var Te;let pe=(Te=Pt.getBoundingClientRect().top)!==null&&Te!==void 0?Te:0;const Je=Pt.querySelector(".md-container > .md-tabs");var Fe;const dn=(Fe=Je==null?void 0:Je.getBoundingClientRect().height)!==null&&Fe!==void 0?Fe:0;pe<Ze&&(pe=Ze),zt.style.top=`${Math.max(pe,0)+dn}px`}zt.style.setProperty("opacity","1")})},[Pt,F]);(0,i.useEffect)(()=>(window.addEventListener("resize",Qt),window.addEventListener("scroll",Qt,!0),()=>{window.removeEventListener("resize",Qt),window.removeEventListener("scroll",Qt,!0)}),[Pt,Qt]);const Bt=(0,i.useCallback)(()=>{if(!Pt)return;const Lt=Pt.querySelector(".md-footer");Lt&&(Lt.style.width=`${Pt.getBoundingClientRect().width}px`)},[Pt]);(0,i.useEffect)(()=>(window.addEventListener("resize",Bt),()=>{window.removeEventListener("resize",Bt)}),[Pt,Bt]),(0,i.useEffect)(()=>{me||(Bt(),Qt())},[$t,me,Bt,Qt]);const oe=(0,i.useCallback)((Lt,zt)=>Nn(Lt,[tt,So({techdocsStorageApi:Ct,entityId:f,path:zt}),Wn(),wo(),Po(),To(),zn(It),ot]),[f,It,Ct,tt,ot]),ye=(0,i.useCallback)(async Lt=>Nn(Lt,[Kn(),Uo(B),$o({baseUrl:window.location.origin,onClick:(zt,Xt)=>{var Ce;const Te=zt.ctrlKey||zt.metaKey,Fe=new URL(Xt),ce=((Ce=zt.target)===null||Ce===void 0?void 0:Ce.innerText)||Xt,Ze=Xt.replace(window.location.origin,"");if(ft.captureEvent("click",ce,{attributes:{to:Ze}}),Fe.hash)if(Te)window.open(Xt,"_blank");else{var pe;w(Xt),Lt==null||(pe=Lt.querySelector(`[id="${Fe.hash.slice(1)}"]`))===null||pe===void 0||pe.scrollIntoView()}else Te?window.open(Xt,"_blank"):w(Xt)}}),Vn({onLoading:()=>{},onLoaded:()=>{var zt;(zt=Lt.querySelector(".md-nav__title"))===null||zt===void 0||zt.removeAttribute("for")}}),Vn({onLoading:()=>{Array.from(Lt.querySelectorAll(".md-sidebar")).forEach(Xt=>{Xt.style.setProperty("opacity","0")})},onLoaded:()=>{}})]),[B,w,ft]);return(0,i.useEffect)(()=>{if(!Ft)return()=>{};let Lt=!0;return oe(Ft,Yt).then(async zt=>{if(!(zt!=null&&zt.innerHTML)||!Lt)return;window.scroll({top:0});const Xt=await ye(zt);le(Xt)}),()=>{Lt=!1}},[Ft,Yt,oe,ye]),Pt};var cn=t(8560),Yn=t(2296),wt=t(57058);const he=()=>{const f=(0,Yn.$L)(),{shadowRoot:w}=(0,v.x)(),B=w==null?void 0:w.querySelector('[data-md-component="content"]'),F=w==null?void 0:w.querySelector('div[data-md-component="sidebar"][data-md-type="navigation"], div[data-md-component="navigation"]');let tt=F==null?void 0:F.querySelector('[data-techdocs-addons-location="primary sidebar"]');tt||(tt=document.createElement("div"),tt.setAttribute("data-techdocs-addons-location","primary sidebar"),F==null||F.prepend(tt));const ot=w==null?void 0:w.querySelector('div[data-md-component="sidebar"][data-md-type="toc"], div[data-md-component="toc"]');let ft=ot==null?void 0:ot.querySelector('[data-techdocs-addons-location="secondary sidebar"]');return ft||(ft=document.createElement("div"),ft.setAttribute("data-techdocs-addons-location","secondary sidebar"),ot==null||ot.prepend(ft)),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(cn.Z,{container:tt,children:f.renderComponentsByLocation(wt.o.PrimarySidebar)}),(0,o.jsx)(cn.Z,{container:B,children:f.renderComponentsByLocation(wt.o.Content)}),(0,o.jsx)(cn.Z,{container:ft,children:f.renderComponentsByLocation(wt.o.SecondarySidebar)})]})},fe=(0,d.Z)({search:{width:"100%","@media (min-width: 76.1875em)":{width:"calc(100% - 34.4rem)",margin:"0 auto"},"@media print":{display:"none"}}}),ko=h(f=>{var w;const{withSearch:B=!0,onReady:F}=f,tt=fe(),{entityMetadata:{value:ot,loading:ft},entityRef:Ct,setShadowRoot:It}=(0,v.x)(),$t=Zo(Ct),Yt=window.location.pathname,Ft=window.location.hash,Pt=m($t),[le]=R([`[id="${Ft.slice(1)}"]`]);(0,i.useEffect)(()=>{if(!Pt)if(Ft)le&&le.scrollIntoView();else{var Qt,Bt;(Bt=document)===null||Bt===void 0||(Qt=Bt.querySelector("header"))===null||Qt===void 0||Qt.scrollIntoView()}},[Yt,Ft,le,Pt]);const me=(0,i.useCallback)(Qt=>{It(Qt),F instanceof Function&&F()},[It,F]);return ft===!1&&!ot?(0,o.jsx)(L.m,{status:"404",statusMessage:"PAGE NOT FOUND"}):$t?(0,o.jsx)(y.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:tt.search,xs:"auto",item:!0,children:(0,o.jsx)(qt,{entityId:Ct,entityTitle:ot==null||(w=ot.metadata)===null||w===void 0?void 0:w.title})}),(0,o.jsx)(S.Z,{xs:12,item:!0,children:(0,o.jsx)(b,{element:$t,onAppend:me,children:(0,o.jsx)(he,{})})})]})}):(0,o.jsx)(y.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(J,T,t){"use strict";t.d(T,{S:function(){return dt}});var o=t(52322),i=t(2784),d=t(18671),S=t(60905),v=t(98069),p=t(60364),c=t(73250),u=t(2296),A=t(68979),x=t(57058),O=t(75435),m=t(84719),b=t(51194),g=t(8709),M=t(79692),R=t(41128),P=t(90436),$=t(98864);const L=(0,M.Z)(vt=>({root:{textAlign:"left"},label:{color:vt.page.fontColor,fontWeight:vt.typography.fontWeightBold,letterSpacing:0,fontSize:vt.typography.fontSize,marginBottom:vt.spacing(1)/2,lineHeight:1},value:{color:(0,R.Fq)(vt.page.fontColor,.8),fontSize:vt.typography.fontSize,lineHeight:1}}),{name:"BackstageHeaderLabel"}),y=({value:vt,className:Et,typographyRootComponent:Tt})=>(0,o.jsx)(P.Z,{component:Tt!=null?Tt:typeof vt=="string"?"p":"span",className:Et,children:vt});function Z(vt){const{label:Et,value:Tt,url:gt,contentTypograpyRootComponent:xt}=vt,Q=L(),j=(0,o.jsx)(y,{className:Q.value,value:Tt||"<Unknown>",typographyRootComponent:xt});return(0,o.jsx)(S.Z,{item:!0,children:(0,o.jsxs)(P.Z,{component:"span",className:Q.root,children:[(0,o.jsx)(P.Z,{className:Q.label,children:Et}),gt?(0,o.jsx)($.rU,{to:gt,children:j}):j]})})}var V=t(48037),et=t(44394),Y=t(6542),K=t(37321),k=t(76635),_=t(95573);const rt=(0,o.jsx)(v.Z,{animation:"wave",variant:"text",height:40}),dt=vt=>{const{palette:{common:{white:Et}}}=(0,p.Z)(),{children:Tt}=vt,gt=(0,u.$L)(),xt=(0,et.h_)(Y.D),{title:Q,setTitle:j,subtitle:z,setSubtitle:q,entityRef:st,metadata:{value:it,loading:at},entityMetadata:{value:nt,loading:St}}=(0,A.x)();(0,i.useEffect)(()=>{it&&(j(it.site_name),q(()=>{let{site_description:Dt}=it;return(!Dt||Dt==="None")&&(Dt=""),Dt}))},[it,j,q]);const G=xt.getOptional("app.title")||"Backstage",H=[Q,z,G].filter(Boolean).join(" | "),{locationMetadata:ut,spec:ht}=nt||{},mt=ht==null?void 0:ht.lifecycle,bt=nt?(0,O.h)(nt,g.S4):[],jt=(0,K.t)(_._Z)(),Jt=(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Z,{label:(0,k.capitalize)((nt==null?void 0:nt.kind)||"entity"),value:(0,o.jsx)(m.d,{color:"inherit",entityRef:st,title:nt==null?void 0:nt.metadata.title,defaultKind:"Component"})}),bt.length>0&&(0,o.jsx)(Z,{label:"Owner",value:(0,o.jsx)(b.r,{color:"inherit",entityRefs:bt,defaultKind:"group"})}),mt?(0,o.jsx)(Z,{label:"Lifecycle",value:String(mt)}):null,ut&&ut.type!=="dir"&&ut.type!=="file"?(0,o.jsx)(Z,{label:"",value:(0,o.jsxs)(S.Z,{container:!0,direction:"column",alignItems:"center",style:{color:Et},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:ut.target}):null]});return!St&&nt===void 0||!at&&it===void 0?null:(0,o.jsxs)(V.h,{type:"Documentation",typeLink:jt,title:Q||rt,subtitle:z===""?void 0:z||rt,children:[(0,o.jsx)(d.Z,{titleTemplate:"%s",children:(0,o.jsx)("title",{children:H})}),Jt,Tt,gt.renderComponentsByLocation(x.o.Header)]})}},95573:function(J,T,t){"use strict";t.d(T,{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(J,T,t){"use strict";t.r(T),t.d(T,{TechDocsSearchResultListItem:function(){return x}});var o=t(52322),i=t(2784),d=t(79692),S=t(49378),v=t(86136),p=t(90436),c=t(98864),u=t(76079);const A=(0,d.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",marginBottom:"1rem"}}),x=O=>{const{result:m,highlight:b,lineClamp:g=5,asListItem:M=!0,asLink:R=!0,title:P,icon:$}=O,L=A(),y=({children:et})=>R?(0,o.jsx)(c.rU,{noTrack:!0,to:m.location,children:et}):(0,o.jsx)(o.Fragment,{children:et}),Z=()=>{const et=b!=null&&b.fields.title?(0,o.jsx)(u.F,{text:b.fields.title,preTag:b.preTag,postTag:b.postTag}):m.title,Y=b!=null&&b.fields.entityTitle?(0,o.jsx)(u.F,{text:b.fields.entityTitle,preTag:b.preTag,postTag:b.postTag}):m.entityTitle,K=b!=null&&b.fields.name?(0,o.jsx)(u.F,{text:b.fields.name,preTag:b.preTag,postTag:b.postTag}):m.name;return m?(0,o.jsx)(S.Z,{className:L.itemText,primaryTypographyProps:{variant:"h6"},primary:(0,o.jsx)(y,{children:P||(0,o.jsxs)(o.Fragment,{children:[et," | ",Y!=null?Y:K," docs"]})}),secondary:(0,o.jsx)(p.Z,{component:"span",style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:g,overflow:"hidden"},color:"textSecondary",variant:"body2",children:b!=null&&b.fields.text?(0,o.jsx)(u.F,{text:b.fields.text,preTag:b.preTag,postTag:b.postTag}):m.text})}):null},V=({children:et})=>M?(0,o.jsxs)(o.Fragment,{children:[$&&(0,o.jsx)(v.Z,{children:typeof $=="function"?$(m):$}),(0,o.jsx)("div",{className:L.flexContainer,children:et})]}):(0,o.jsx)(o.Fragment,{children:et});return(0,o.jsx)(V,{children:(0,o.jsx)(Z,{})})}},53260:function(){}},function(J){var T=function(o){return J(J.s=o)};J.O(0,[2370,6202,9284,7012,427,242,5109,6816,1213,5218,4736],function(){return T(17363)});var t=J.O()}]);})();
490
490
 
491
- //# sourceMappingURL=main.58e94ce8.js.map
491
+ //# sourceMappingURL=main.2d90956b.js.map