@techdocs/cli 1.8.12-next.1 → 1.8.12-next.2
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.
- package/CHANGELOG.md +11 -0
- package/dist/embedded-app/.config-schema.json +439 -0
- package/dist/embedded-app/index.html +1 -1
- package/dist/embedded-app/static/124.f1bbb49f.chunk.js +5 -0
- package/dist/embedded-app/static/124.f1bbb49f.chunk.js.map +1 -0
- package/dist/embedded-app/static/2401.41f8afc2.chunk.js +5 -0
- package/dist/embedded-app/static/2401.41f8afc2.chunk.js.map +1 -0
- package/dist/embedded-app/static/2420.79e5ad73.chunk.js +5 -0
- package/dist/embedded-app/static/2420.79e5ad73.chunk.js.map +1 -0
- package/dist/embedded-app/static/287.57364744.chunk.js +5 -0
- package/dist/embedded-app/static/287.57364744.chunk.js.map +1 -0
- package/dist/embedded-app/static/3632.311788b9.chunk.js +5 -0
- package/dist/embedded-app/static/3632.311788b9.chunk.js.map +1 -0
- package/dist/embedded-app/static/5974.3b113fed.chunk.js +3 -0
- package/dist/embedded-app/static/5974.3b113fed.chunk.js.map +1 -0
- package/dist/embedded-app/static/6271.491e4b08.chunk.js +5 -0
- package/dist/embedded-app/static/6271.491e4b08.chunk.js.map +1 -0
- package/dist/embedded-app/static/8384.fba8163d.chunk.js +5 -0
- package/dist/embedded-app/static/8384.fba8163d.chunk.js.map +1 -0
- package/dist/embedded-app/static/9652.c37f1514.chunk.js +5 -0
- package/dist/embedded-app/static/9652.c37f1514.chunk.js.map +1 -0
- package/dist/embedded-app/static/main.a258183d.js +508 -0
- package/dist/embedded-app/static/main.a258183d.js.map +1 -0
- package/dist/embedded-app/static/{runtime.af63ab39.js → runtime.a258183d.js} +2 -2
- package/dist/embedded-app/static/{runtime.af63ab39.js.map → runtime.a258183d.js.map} +1 -1
- package/dist/embedded-app/static/vendor.a258183d.js +155 -0
- package/dist/embedded-app/static/vendor.a258183d.js.map +1 -0
- package/dist/index.cjs.js +1 -1
- package/package.json +4 -4
- package/dist/embedded-app/static/124.2fe45728.chunk.js +0 -5
- package/dist/embedded-app/static/124.2fe45728.chunk.js.map +0 -1
- package/dist/embedded-app/static/2401.b9ecb259.chunk.js +0 -5
- package/dist/embedded-app/static/2401.b9ecb259.chunk.js.map +0 -1
- package/dist/embedded-app/static/2420.8b65f057.chunk.js +0 -5
- package/dist/embedded-app/static/2420.8b65f057.chunk.js.map +0 -1
- package/dist/embedded-app/static/287.e4ea033a.chunk.js +0 -5
- package/dist/embedded-app/static/287.e4ea033a.chunk.js.map +0 -1
- package/dist/embedded-app/static/3632.12b6d8dd.chunk.js +0 -5
- package/dist/embedded-app/static/3632.12b6d8dd.chunk.js.map +0 -1
- package/dist/embedded-app/static/5974.e17fc282.chunk.js +0 -3
- package/dist/embedded-app/static/5974.e17fc282.chunk.js.map +0 -1
- package/dist/embedded-app/static/6271.e14894fd.chunk.js +0 -5
- package/dist/embedded-app/static/6271.e14894fd.chunk.js.map +0 -1
- package/dist/embedded-app/static/8384.f9a38a1a.chunk.js +0 -5
- package/dist/embedded-app/static/8384.f9a38a1a.chunk.js.map +0 -1
- package/dist/embedded-app/static/9652.e5ad523b.chunk.js +0 -5
- package/dist/embedded-app/static/9652.e5ad523b.chunk.js.map +0 -1
- package/dist/embedded-app/static/main.af63ab39.js +0 -508
- package/dist/embedded-app/static/main.af63ab39.js.map +0 -1
- package/dist/embedded-app/static/vendor.af63ab39.js +0 -160
- package/dist/embedded-app/static/vendor.af63ab39.js.map +0 -1
|
@@ -0,0 +1,508 @@
|
|
|
1
|
+
(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[8792],{86519:function(Z,T,t){"use strict";t.d(T,{c:function(){return o}});const o=Symbol.for("CATALOG_FILTER_EXISTS_0e15b590c0b343a2bae3e787e84c2111")},72348:function(Z,T,t){"use strict";t.d(T,{P:function(){return d},_P:function(){return i},oQ:function(){return o}});const o="default",i="backstage.io/view-url",d="backstage.io/edit-url",O="kubernetes.io/api-server",m="kubernetes.io/api-server-certificate-authority",v="kubernetes.io/auth-provider"},6820:function(Z,T,t){"use strict";t.d(T,{KU:function(){return O},U2:function(){return m},sM:function(){return d}});var o=t(72348);function i(v){let f=v.indexOf(":");const c=v.indexOf("/");c!==-1&&c<f&&(f=-1);const C=f===-1?void 0:v.slice(0,f),E=c===-1?void 0:v.slice(f+1,c),w=v.slice(Math.max(f+1,c+1));if(C===""||E===""||w==="")throw new TypeError(`Entity reference "${v}" was not on the form [<kind>:][<namespace>/]<name>`);return{kind:C,namespace:E,name:w}}function d(v){return{kind:v.kind,namespace:v.metadata.namespace||o.oQ,name:v.metadata.name}}function O(v,f){if(!v)throw new Error("Entity reference must not be empty");const c=f==null?void 0:f.defaultKind,C=(f==null?void 0:f.defaultNamespace)||o.oQ;let E,w,h;if(typeof v=="string"){const A=i(v);var S;E=(S=A.kind)!==null&&S!==void 0?S:c;var p;w=(p=A.namespace)!==null&&p!==void 0?p:C,h=A.name}else{var B;E=(B=v.kind)!==null&&B!==void 0?B:c;var P;w=(P=v.namespace)!==null&&P!==void 0?P:C,h=v.name}if(E)if(w){if(!h){const A=JSON.stringify(v);throw new Error(`Entity reference ${A} had missing or empty name`)}}else{const A=JSON.stringify(v);throw new Error(`Entity reference ${A} had missing or empty namespace`)}else{const A=JSON.stringify(v);throw new Error(`Entity reference ${A} had missing or empty kind (e.g. did not start with "component:" or similar)`)}return{kind:E,namespace:w,name:h}}function m(v){let f,c,C;if("metadata"in v){f=v.kind;var E;c=(E=v.metadata.namespace)!==null&&E!==void 0?E:o.oQ,C=v.metadata.name}else{f=v.kind;var w;c=(w=v.namespace)!==null&&w!==void 0?w:o.oQ,C=v.name}return`${f.toLocaleLowerCase("en-US")}:${c.toLocaleLowerCase("en-US")}/${C.toLocaleLowerCase("en-US")}`}},51372:function(Z,T,t){"use strict";t.d(T,{fT:function(){return c},jn:function(){return S},nC:function(){return f},sA:function(){return p},vv:function(){return o}});const o="ownedBy",i="ownerOf",d="consumesApi",O="apiConsumedBy",m="providesApi",v="apiProvidedBy",f="dependsOn",c="dependencyOf",C="parentOf",E="childOf",w="memberOf",h="hasMember",S="partOf",p="hasPart"},17736:function(Z,T,t){"use strict";t.d(T,{Eo:function(){return o},I4:function(){return d}});const o="backstage.io/managed-by-location",i="backstage.io/managed-by-origin-location",d="backstage.io/source-location"},78692:function(Z,T,t){"use strict";t.d(T,{Cr:function(){return v},KL:function(){return m},aY:function(){return O}});var o=t(6820),i=t(17736);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 O(f){if(typeof f!="string")throw new TypeError(`Unable to parse location ref '${f}', unexpected argument ${typeof f}`);const c=f.indexOf(":");if(c<0)throw new TypeError(`Unable to parse location ref '${f}', expected '<type>:<target>', e.g. 'url:https://host/path'`);const C=f.substring(0,c).trim(),E=f.substring(c+1).trim();if(!C||!E)throw new TypeError(`Unable to parse location ref '${f}', expected '<type>:<target>', e.g. 'url:https://host/path'`);if(C==="http"||C==="https")throw new TypeError(`Invalid location ref '${f}', please prefix it with 'url:', e.g. 'url:${f}'`);if(d.test(E))throw new TypeError(`Invalid location ref '${f}', target is a javascript: URL`);return{type:C,target:E}}function m(f){const{type:c,target:C}=f;if(c){if(!C)throw new TypeError("Unable to stringify location ref, empty target")}else throw new TypeError("Unable to stringify location ref, empty type");if(d.test(C))throw new TypeError(`Invalid location ref '${c}:${C}', target is a javascript: URL`);return`${c}:${C}`}function v(f){var c,C,E,w,h;const S=(h=(C=f.metadata)===null||C===void 0||(c=C.annotations)===null||c===void 0?void 0:c[i.I4])!==null&&h!==void 0?h:(w=f.metadata)===null||w===void 0||(E=w.annotations)===null||E===void 0?void 0:E[i.Eo];if(!S)throw new Error(`Entity '${(0,o.U2)(f)}' is missing location`);return O(S)}},77310:function(Z,T,t){"use strict";t.d(T,{z:function(){return C}});var o=t(31085),i=t(10394),d=t(54917),O=t(14041),m=t(69578),v=t(40697),f=t(25577),c=t(37916);function C(E){const{text:w,language:h,showLineNumbers:S=!1,highlightedNumbers:p,customStyle:B,showCopyCodeButton:P=!1}=E,A=(0,d.A)(),U=A.palette.type==="dark"?v.A:f.A,M=A.palette.type==="dark"?"#256bf3":"#e6ffed";return(0,o.jsxs)(i.A,{position:"relative",children:[(0,o.jsx)(m.A,{customStyle:B,language:h,style:U,showLineNumbers:S,wrapLines:!0,lineNumberStyle:{color:A.palette.textVerySubtle},lineProps:x=>p!=null&&p.includes(x)?{style:{backgroundColor:M}}:{},children:w}),P&&(0,o.jsx)(i.A,{position:"absolute",top:0,right:0,children:(0,o.jsx)(c.l,{text:w})})]})}},37916:function(Z,T,t){"use strict";t.d(T,{l:function(){return w}});var o=t(31085),i=t(72427),d=t(39837),O=t(29365),m=t(71677),v=t(99594),f=t(14041),c=t(36338),C=t(10315),E=t(87849);function w(h){const{t:S}=(0,E.i)(C.O),{text:p,tooltipDelay:B=1e3,tooltipText:P=S("copyTextButton.tooltipText"),"aria-label":A="Copy text"}=h,U=(0,i.gf)(d.m),[M,x]=(0,f.useState)(!1),[{error:K},H]=(0,c.A)();(0,f.useEffect)(()=>{K&&U.post(K)},[K,U]);const V=N=>{N.stopPropagation(),x(!0),H(p)};return(0,o.jsx)(o.Fragment,{children:(0,o.jsx)(m.Ay,{id:"copy-test-tooltip",title:P,placement:"top",leaveDelay:B,onClose:()=>x(!1),open:M,children:(0,o.jsx)(O.A,{onClick:V,"aria-label":A,children:(0,o.jsx)(v.A,{})})})})}},44186:function(Z,T,t){"use strict";t.d(T,{p:function(){return S}});var o=t(31085),i=t(42899),d=t(58837),O=t(72501),m=t(14041),v=t.p+"static/missingAnnotation.67f79e98..svg",f=t.p+"static/noInformation.4b426325..svg",c=t.p+"static/createComponent.975d1e1e..svg",C=t.p+"static/noBuild.1715fa71..svg";const E=(0,d.A)({generalImg:{width:"95%",zIndex:2,position:"relative",left:"50%",top:"50%",transform:"translate(-50%, 15%)"}},{name:"BackstageEmptyStateImage"}),w=({missing:p})=>{const B=E();switch(p){case"field":return(0,o.jsx)("img",{src:v,className:B.generalImg,alt:"annotation is missing"});case"info":return(0,o.jsx)("img",{src:f,alt:"no Information",className:B.generalImg});case"content":return(0,o.jsx)("img",{src:c,alt:"create Component",className:B.generalImg});case"data":return(0,o.jsx)("img",{src:C,alt:"no Build",className:B.generalImg});default:return null}},h=(0,d.A)(p=>({root:{backgroundColor:p.palette.background.default,padding:p.spacing(2,0,0,0)},action:{marginTop:p.spacing(2)},imageContainer:{position:"relative"}}),{name:"BackstageEmptyState"});function S(p){const{title:B,description:P,missing:A,action:U}=p,M=h();return(0,o.jsxs)(i.A,{container:!0,direction:"row",justifyContent:"space-around",alignItems:"flex-start",className:M.root,spacing:2,children:[(0,o.jsx)(i.A,{item:!0,xs:12,md:6,children:(0,o.jsxs)(i.A,{container:!0,direction:"column",children:[(0,o.jsx)(i.A,{item:!0,xs:!0,children:(0,o.jsx)(O.A,{variant:"h5",children:B})}),(0,o.jsx)(i.A,{item:!0,xs:!0,children:(0,o.jsx)(O.A,{variant:"body1",children:P})}),(0,o.jsx)(i.A,{item:!0,xs:!0,className:M.action,children:U})]})}),(0,o.jsx)(i.A,{item:!0,xs:12,md:6,className:M.imageContainer,children:typeof A=="string"?(0,o.jsx)(w,{missing:A}):A.customImage})]})}},22020:function(Z,T,t){"use strict";t.d(T,{b:function(){return w}});var o=t(31085),i=t(58837),d=t(58007),O=t(8109),m=t(5951),v=t(14041),f=t(37916),c=t(88640);const C=(0,i.A)(h=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:h.spacing(2)},divider:{margin:h.spacing(2)}}),{name:"BackstageErrorPanel"}),E=({error:h,message:S,stack:p,children:B})=>{const P=C();return(0,o.jsxs)(d.A,{dense:!0,children:[(0,o.jsxs)(O.A,{alignItems:"flex-start",children:[(0,o.jsx)(m.A,{classes:{secondary:P.text},primary:"Error",secondary:h}),(0,o.jsx)(f.l,{text:h})]}),(0,o.jsxs)(O.A,{alignItems:"flex-start",children:[(0,o.jsx)(m.A,{classes:{secondary:P.text},primary:"Message",secondary:S}),(0,o.jsx)(f.l,{text:S})]}),p&&(0,o.jsxs)(O.A,{alignItems:"flex-start",children:[(0,o.jsx)(m.A,{classes:{secondary:P.text},primary:"Stack Trace",secondary:p}),(0,o.jsx)(f.l,{text:p})]}),B]})};function w(h){const{title:S,error:p,defaultExpanded:B,titleFormat:P,children:A}=h;return(0,o.jsx)(c.B,{severity:"error",title:S!=null?S:p.message,defaultExpanded:B,titleFormat:P,children:(0,o.jsx)(E,{error:p.name,message:p.message,stack:p.stack,children:A})})}},72072:function(Z,T,t){"use strict";t.d(T,{N_:function(){return N}});var o=t(31085),i=t(72427),d=t(65461),O=t(93368),m=t(49203),v=t(58837),f=t(72501),c=t(53373),C=t.n(c),E=t(45250),w=t.n(E),h=t(14041),S=t(18690),p=t(73970);function B(){const[z]=(0,S.AV)((0,o.jsx)(S.qh,{index:!0,element:(0,o.jsx)("div",{})}));return!z.index}const P=(0,v.A)({visuallyHidden:{clip:"rect(0 0 0 0)",clipPath:"inset(50%)",overflow:"hidden",position:"absolute",userSelect:"none",whiteSpace:"nowrap",height:1,width:1},externalLink:{position:"relative"}},{name:"Link"}),A=z=>/^([a-z+.-]+):/.test(z),U=/^[\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,M=window.open;if(M&&!M.__backstage){const z=function(..._){const et=String(_[0]);if(U.test(et))throw new Error("Rejected window.open() with a javascript: URL as a security precaution");return M.apply(this,_)};z.__backstage=!0,window.open=z}const x=()=>{try{return(0,i.gf)(d.U).getOptionalString("app.baseUrl")}catch{return}},K=()=>{const z="http://sample.dev";var J;const _=(J=x())!==null&&J!==void 0?J:"/",{pathname:et}=new URL(_,z);return(0,E.trimEnd)(et,"/")},H=z=>{let J=String(z);const _=K(),et=A(J),q=J.startsWith(_);return!et&&!q&&(J=_.concat(J)),J},V=z=>{if(z instanceof Array)return z.map(V).join(" ").trim();if(typeof z=="object"&&z){var J;return V(z==null||(J=z.props)===null||J===void 0?void 0:J.children)}return["string","number"].includes(typeof z)?String(z):""},N=h.forwardRef(({onClick:z,noTrack:J,..._},et)=>{const q=P(),ut=(0,O.s)(),dt=B()?H(_.to):_.to,Ot=V(_.children)||dt,ht=A(dt),ct=ht&&!!/^https?:/.exec(dt);if(U.test(dt))throw new Error("Link component rejected javascript: URL as a security precaution");const lt=ft=>{z==null||z(ft),J||ut.captureEvent("click",Ot,{attributes:{to:dt}})};return ht?(0,o.jsxs)(m.A,{...ct?{target:"_blank",rel:"noopener"}:{},..._,..._["aria-label"]?{"aria-label":`${_["aria-label"]}, Opens in a new window`}:{},ref:et,href:dt,onClick:lt,className:C()(q.externalLink,_.className),children:[_.children,(0,o.jsx)(f.A,{component:"span",className:q.visuallyHidden,children:", Opens in a new window"})]}):(0,o.jsx)(m.A,{..._,ref:et,component:p.N_,to:dt,onClick:lt})})},73896:function(Z,T,t){"use strict";t.d(T,{z:function(){return v}});var o=t(31085),i=t(64947),d=t(14041),O=t(72072);const m=d.forwardRef((c,C)=>(0,o.jsx)(O.N_,{ref:C,...c,color:"initial"})),v=d.forwardRef((c,C)=>(0,o.jsx)(i.A,{ref:C,component:m,...c})),f=null},4650:function(Z,T,t){"use strict";t.d(T,{h:function(){return w}});var o=t(31085),i=t(58837),d=t(45872),O=t(61125),m=t(14041),v=t(77310);const f=(0,i.A)(h=>({markdown:{"& table":{borderCollapse:"collapse",border:`1px solid ${h.palette.border}`},"& th, & td":{border:`1px solid ${h.palette.border}`,padding:h.spacing(1)},"& td":{wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:h.spacing(3,2,3,2.5),borderBottom:0},"& th":{backgroundColor:h.palette.background.paper},"& tr":{backgroundColor:h.palette.background.paper},"& tr:nth-child(odd)":{backgroundColor:h.palette.background.default},"& a":{color:h.palette.link},"& img":{maxWidth:"100%"}}}),{name:"BackstageMarkdownContent"}),c=(h,S)=>S?typeof S=="string"?h+S:m.Children.toArray(S.props.children).reduce(c,h):h,C=({level:h,children:S})=>{const P=m.Children.toArray(S).reduce(c,"").toLocaleLowerCase("en-US").replace(/\W/g,"-");return m.createElement(`h${h}`,{id:P},S)},E={code:({inline:h,className:S,children:p,...B})=>{const P=String(p).replace(/\n+$/,""),A=/language-(\w+)/.exec(S||"");return!h&&A?(0,o.jsx)(v.z,{language:A[1],text:P}):(0,o.jsx)("code",{className:S,...B,children:p})},h1:C,h2:C,h3:C,h4:C,h5:C,h6:C};function w(h){const{content:S,dialect:p="gfm",linkTarget:B,transformLinkUri:P,transformImageUri:A,className:U}=h,M=f();return(0,o.jsx)(d.$,{remarkPlugins:p==="gfm"?[O.A]:[],className:`${M.markdown} ${U!=null?U:""}`.trim(),children:S,components:E,linkTarget:B,transformLinkUri:P,transformImageUri:A})}},68146:function(Z,T,t){"use strict";t.d(T,{k:function(){return v}});var o=t(31085),i=t(10394),d=t(88951),O=t(54917),m=t(14041);function v(f){const c=(0,O.A)(),[C,E]=(0,m.useState)(!1);return(0,m.useEffect)(()=>{const w=setTimeout(()=>E(!0),c.transitions.duration.short);return()=>clearTimeout(w)},[c.transitions.duration.short]),C?(0,o.jsx)(d.A,{...f,"data-testid":"progress"}):(0,o.jsx)(i.A,{display:"none"})}},66917:function(Z,T,t){"use strict";t.d(T,{w:function(){return N}});var o=t(31085),i=t(10394),d=t(69076),O=t(67720),m=t(95061),v=t(41857),f=t(48543),c=t(26343),C=t(81215),E=t(87051),w=t(12398),h=t(58837),S=t(72501),p=t(14041),B=t(10437);const P=(0,h.A)(z=>(0,w.A)({icon:{position:"absolute",right:z.spacing(.5),pointerEvents:"none",color:"#616161"}}),{name:"BackstageClosedDropdown"});var U=()=>{const z=P();return(0,o.jsx)(B.A,{className:z.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:"currentColor"})})};const M=(0,h.A)(z=>(0,w.A)({icon:{position:"absolute",right:z.spacing(.5),pointerEvents:"none",color:"#616161"}}),{name:"BackstageOpenedDropdown"});var K=()=>{const z=M();return(0,o.jsx)(B.A,{className:z.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:"currentColor"})})};const H=(0,E.A)(z=>(0,w.A)({root:{"label + &":{marginTop:z.spacing(3)},"&.Mui-focused > div[role=button]":{borderColor:z.palette.primary.main}},input:{borderRadius:z.shape.borderRadius,position:"relative",backgroundColor:z.palette.background.paper,border:"1px solid #ced4da",fontSize:z.typography.body1.fontSize,padding:z.spacing(1.25,3.25,1.25,1.5),transition:z.transitions.create(["border-color","box-shadow"]),"&:focus":{background:z.palette.background.paper,borderRadius:z.shape.borderRadius}}}),{name:"BackstageSelectInputBase"})(v.A),V=(0,h.A)(z=>(0,w.A)({formControl:{margin:z.spacing(1,0)},label:{transform:"initial",fontWeight:"bold",fontSize:z.typography.body2.fontSize,fontFamily:z.typography.fontFamily,color:z.palette.text.primary,"&.Mui-focused":{color:z.palette.text.primary}},formLabel:{transform:"initial",fontWeight:"bold",fontSize:z.typography.body2.fontSize,fontFamily:z.typography.fontFamily,color:z.palette.text.primary,"&.Mui-focused":{color:z.palette.text.primary}},chips:{display:"flex",flexWrap:"wrap"},chip:{margin:2},checkbox:{},root:{display:"flex",flexDirection:"column"}}),{name:"BackstageSelect"});function N(z){const{multiple:J,items:_,label:et,placeholder:q,selected:ut,onChange:dt,triggerReset:Ot,native:ht=!1,disabled:ct=!1,margin:lt}=z,ft=V(),[Et,mt]=(0,p.useState)(ut||(J?[]:"")),[wt,vt]=(0,p.useState)(!1);(0,p.useEffect)(()=>{mt(J?[]:"")},[Ot,J]),(0,p.useEffect)(()=>{mt(ut||(J?[]:""))},[ut,J]);const it=xt=>{mt(xt.target.value),dt(xt.target.value)},gt=xt=>{if(ct){xt.preventDefault();return}vt(W=>J&&!(xt.target instanceof HTMLElement)?!0:!W)},pt=()=>{vt(!1)},Pt=xt=>()=>{const W=Et.filter(G=>G!==xt);mt(W),dt(W)};return(0,o.jsx)(i.A,{className:ft.root,children:(0,o.jsxs)(m.A,{className:ft.formControl,children:[(0,o.jsx)(f.A,{className:ft.formLabel,children:et}),(0,o.jsxs)(C.A,{"aria-label":et,value:Et,native:ht,disabled:ct,"data-testid":"select",displayEmpty:!0,multiple:J,margin:lt,onChange:it,open:wt,onOpen:gt,onClose:pt,input:(0,o.jsx)(H,{}),label:et,renderValue:xt=>{var W;return J&&Et.length!==0?(0,o.jsx)(i.A,{className:ft.chips,children:xt.map(G=>{const At=_.find(St=>St.value===G);return At?(0,o.jsx)(O.A,{label:At==null?void 0:At.label,clickable:!0,onDelete:Pt(G),className:ft.chip},At==null?void 0:At.value):!1})}):(0,o.jsx)(S.A,{children:Et.length===0?q||"":(W=_.find(G=>G.value===xt))===null||W===void 0?void 0:W.label})},IconComponent:()=>wt?(0,o.jsx)(K,{}):(0,o.jsx)(U,{}),MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},getContentAnchorEl:null},children:[q&&!J&&(0,o.jsx)(c.A,{value:[],children:q}),ht?_&&_.map(xt=>(0,o.jsx)("option",{value:xt.value,children:xt.label},xt.value)):_&&_.map(xt=>(0,o.jsxs)(c.A,{value:xt.value,children:[J&&(0,o.jsx)(d.A,{color:"primary",checked:Et.includes(xt.value)||!1,className:ft.checkbox}),xt.label]},xt.value))]})]})})}},27586:function(Z,T,t){"use strict";t.d(T,{Y:function(){return z}});var o=t(31085),i=t(82266),d=t(10394),O=t(64947),m=t(93453),v=t(29365),f=t(46423),c=t(5951),C=t(26343),E=t(28233),w=t(55197),h=t(58837),S=t(72501),p=t(5893),B=t(14041),P=t(10795),A=t(31129),U=t(72072),M=t(10315),x=t(87849);const K=(0,h.A)({popoverList:{minWidth:260,maxWidth:400},menuItem:{whiteSpace:"normal"}},{name:"BackstageSupportButton"}),H=({icon:J})=>{const _=(0,i.n)();var et;const q=J&&(et=_.getSystemIcon(J))!==null&&et!==void 0?et:A.NT;return(0,o.jsx)(q,{})},V=({link:J})=>{var _;return(0,o.jsx)(U.N_,{to:J.url,children:(_=J.title)!==null&&_!==void 0?_:J.url})},N=({item:J})=>{var _;return(0,o.jsxs)(C.A,{children:[(0,o.jsx)(f.A,{children:(0,o.jsx)(H,{icon:J.icon})}),(0,o.jsx)(c.A,{primary:J.title,secondary:(_=J.links)===null||_===void 0?void 0:_.reduce((et,q,ut)=>[...et,ut>0&&(0,o.jsx)("br",{},ut),(0,o.jsx)(V,{link:q},q.url)],[])})]})};function z(J){const{t:_}=(0,x.i)(M.O),{title:et,items:q,children:ut}=J,{items:dt}=(0,P.l)(),[Ot,ht]=(0,B.useState)(!1),[ct,lt]=(0,B.useState)(null),ft=K(),Et=(0,p.A)(vt=>vt.breakpoints.down("sm")),mt=vt=>{lt(vt.currentTarget),ht(!0)},wt=()=>{ht(!1)};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.A,{display:"flex",ml:1,children:Et?(0,o.jsx)(v.A,{color:"primary",size:"small",onClick:mt,"data-testid":"support-button","aria-label":"Support",children:(0,o.jsx)(A.NT,{})}):(0,o.jsx)(O.A,{"data-testid":"support-button","aria-label":"Support",color:"primary",onClick:mt,startIcon:(0,o.jsx)(A.NT,{}),children:_("supportButton.title")})}),(0,o.jsxs)(w.Ay,{"data-testid":"support-button-popover",open:Ot,anchorEl:ct,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},onClose:wt,children:[(0,o.jsxs)(E.A,{className:ft.popoverList,autoFocusItem:!!ct,children:[et&&(0,o.jsx)(C.A,{button:!1,alignItems:"flex-start",className:ft.menuItem,children:(0,o.jsx)(S.A,{variant:"subtitle1",children:et})}),B.Children.map(ut,(vt,it)=>(0,o.jsx)(C.A,{alignItems:"flex-start",className:ft.menuItem,children:vt},`child-${it}`)),(q!=null?q:dt).map((vt,it)=>(0,o.jsx)(N,{item:vt},`item-${it}`))]}),(0,o.jsx)(m.A,{children:(0,o.jsx)(O.A,{color:"primary",onClick:wt,"aria-label":"Close",children:_("supportButton.close")})})]})]})}},14209:function(Z,T,t){"use strict";t.d(T,{X:function(){return pt}});var o=t(31085),i=t(25301),d=t(10394),O=t(29365),m=t(87051),v=t(58837),f=t(54917),c=t(72501),C=t(83313),E=t(89019),w=t(62461),h=t(68887),S=t(63798),p=t(64704),B=t(6774),P=t(75625),A=t(65859),U=t(5416),M=t(33494),x=t(80113),K=t(26229),H=t(46802),V=t(45250),N=t(14041),z=t(64947),J=t(66917),_=t(10315),et=t(87849);const q=(0,v.A)(W=>({root:{height:"100%",width:"315px",display:"flex",flexDirection:"column",marginRight:W.spacing(3)},value:{fontWeight:"bold",fontSize:18},header:{display:"flex",alignItems:"center",height:W.spacing(7.5),justifyContent:"space-between",borderBottom:`1px solid ${W.palette.grey[500]}`},filters:{display:"flex",flexDirection:"column","& > *":{marginTop:W.spacing(2)}}}),{name:"BackstageTableFilters"}),ut=W=>{var G;const At=q(),{onChangeFilters:St}=W,{t:Ut}=(0,et.i)(_.O),[Tt,It]=(0,N.useState)({...W.selectedFilters}),[Nt,bt]=(0,N.useState)(!1),Ft=()=>{It({}),bt(Jt=>!Jt)};return(0,N.useEffect)(()=>{St(Tt)},[Tt,St]),(0,o.jsxs)(d.A,{className:At.root,children:[(0,o.jsxs)(d.A,{className:At.header,children:[(0,o.jsx)(d.A,{className:At.value,children:Ut("table.filter.title")}),(0,o.jsx)(z.A,{color:"primary",onClick:Ft,children:Ut("table.filter.clearAll")})]}),(0,o.jsx)(d.A,{className:At.filters,children:((G=W.filters)===null||G===void 0?void 0:G.length)&&W.filters.map(Jt=>(0,o.jsx)(J.w,{triggerReset:Nt,...Jt.element,selected:Tt[Jt.element.label],onChange:ge=>It({...Tt,[Jt.element.label]:ge})},Jt.element.label))})]})};var dt=t(78467);function Ot(W){return(0,o.jsx)("tbody",{"data-testid":"loading-indicator",children:(0,o.jsx)("tr",{children:(0,o.jsx)("td",{colSpan:W.colSpan,children:(0,o.jsx)(d.A,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",minHeight:"15rem"},children:(0,o.jsx)(dt.A,{size:"5rem"})})})})})}const ht={Add:(0,N.forwardRef)((W,G)=>(0,o.jsx)(C.A,{...W,ref:G})),Check:(0,N.forwardRef)((W,G)=>(0,o.jsx)(w.A,{...W,ref:G})),Clear:(0,N.forwardRef)((W,G)=>(0,o.jsx)(p.A,{...W,ref:G})),Delete:(0,N.forwardRef)((W,G)=>(0,o.jsx)(B.A,{...W,ref:G})),DetailPanel:(0,N.forwardRef)((W,G)=>(0,o.jsx)(S.A,{...W,ref:G})),Edit:(0,N.forwardRef)((W,G)=>(0,o.jsx)(P.A,{...W,ref:G})),Export:(0,N.forwardRef)((W,G)=>(0,o.jsx)(K.A,{...W,ref:G})),Filter:(0,N.forwardRef)((W,G)=>(0,o.jsx)(A.A,{...W,ref:G})),FirstPage:(0,N.forwardRef)((W,G)=>(0,o.jsx)(U.A,{...W,ref:G})),LastPage:(0,N.forwardRef)((W,G)=>(0,o.jsx)(M.A,{...W,ref:G})),NextPage:(0,N.forwardRef)((W,G)=>(0,o.jsx)(S.A,{...W,ref:G})),PreviousPage:(0,N.forwardRef)((W,G)=>(0,o.jsx)(h.A,{...W,ref:G})),ResetSearch:(0,N.forwardRef)((W,G)=>(0,o.jsx)(p.A,{...W,ref:G})),Search:(0,N.forwardRef)((W,G)=>(0,o.jsx)(A.A,{...W,ref:G})),SortArrow:(0,N.forwardRef)((W,G)=>(0,o.jsx)(E.A,{...W,ref:G})),ThirdStateCheck:(0,N.forwardRef)((W,G)=>(0,o.jsx)(x.A,{...W,ref:G})),ViewColumn:(0,N.forwardRef)((W,G)=>(0,o.jsx)(H.A,{...W,ref:G}))};function ct(W,G){const At=G.split(".");let St=W[At[0]];for(let Ut=1;Ut<At.length;++Ut){if(St===void 0)return St;const Tt=At[Ut];St=St[Tt]}return St}const lt=(0,m.A)(W=>({header:{padding:W.spacing(1,2,1,2.5),borderTop:`1px solid ${W.palette.grey.A100}`,borderBottom:`1px solid ${W.palette.grey.A100}`,fontWeight:W.typography.fontWeightBold,position:"static",wordBreak:"normal",textTransform:"uppercase"}}),{name:"BackstageTableHeader"})(i.rV),ft=(0,m.A)(W=>({root:{padding:W.spacing(3,0,2.5,2.5)},title:{"& > h6":{fontWeight:W.typography.fontWeightBold}},searchField:{paddingRight:W.spacing(2)}}),{name:"BackstageTableToolbar"})(i.Nb),Et=(0,v.A)(W=>({root:{display:"flex",alignItems:"center",justifyContent:"space-between"},title:{fontWeight:W.typography.fontWeightBold,fontSize:18,whiteSpace:"nowrap"}}),{name:"BackstageTableFiltersContainer"}),mt=(0,v.A)(()=>({root:{display:"flex",alignItems:"start"}}),{name:"BackstageTable"});function wt(W,G){return W.map(At=>{var St;const Ut=(St=At.headerStyle)!==null&&St!==void 0?St:{};let Tt=At.cellStyle||{};if(At.highlight)if(Ut.color=G.palette.textContrast,typeof Tt=="object")Tt.fontWeight=G.typography.fontWeightBold;else{const It=Tt;Tt=(Nt,bt,Ft)=>({...It(Nt,bt,Ft),fontWeight:G.typography.fontWeightBold})}return{...At,headerStyle:Ut,cellStyle:Tt}})}function vt(W,G){return(0,V.transform)(W,(At,St,Ut)=>{(0,V.isEqual)(St,G[Ut])||(At[Ut]=St)})}const it={search:"",filtersOpen:!1,filters:{}};function gt(W){const{toolbarRef:G,setSearch:At,hasFilters:St,selectedFiltersLength:Ut,toggleFilters:Tt}=W,It=Et(),Nt=(0,N.useCallback)(bt=>{W.onSearchChanged(bt),At(bt)},[W,At]);return St?(0,o.jsxs)(d.A,{className:It.root,children:[(0,o.jsxs)(d.A,{className:It.root,children:[(0,o.jsx)(O.A,{onClick:Tt,"aria-label":"filter list",children:(0,o.jsx)(A.A,{})}),(0,o.jsxs)(c.A,{className:It.title,children:["Filters (",Ut,")"]})]}),(0,o.jsx)(ft,{...W,ref:G,onSearchChanged:Nt})]}):(0,o.jsx)(ft,{...W,ref:G,onSearchChanged:Nt})}function pt(W){const{data:G,columns:At,emptyContent:St,options:Ut,title:Tt,subtitle:It,localization:Nt,filters:bt,initialState:Ft,onStateChange:Jt,components:ge,isLoading:ce,...de}=W,zt=mt(),Xt=(0,f.A)(),me={...it,...Ft},[Ne,je]=(0,N.useState)(me.filtersOpen),Ge=(0,N.useCallback)(()=>je(pe=>!pe),[je]),[we,an]=(0,N.useState)(me.filters),[en,re]=(0,N.useState)(me.search);(0,N.useEffect)(()=>{if(Jt){const pe=vt({search:en,filtersOpen:Ne,filters:we},it);Jt(pe)}},[en,Ne,we,Jt]);const We=(0,N.useCallback)(pe=>{var De;return(De=At.find(Qe=>Qe.title===pe))===null||De===void 0?void 0:De.field},[At]),ke=(0,N.useMemo)(()=>{if(typeof G=="function"||!we)return G;const pe=Object.values(we);return G&&pe.flat().length?G.filter(Qe=>!!Object.entries(we).filter(([,Ze])=>!!Ze.length).every(([Ze,Be])=>{const Ke=ct(Qe,We(Ze));return Array.isArray(Ke)&&Array.isArray(Be)?Ke.some(un=>Be.includes(un)):Array.isArray(Ke)?Ke.includes(Be):Array.isArray(Be)?Be.includes(Ke):Ke===Be})):G},[G,we,We]),nn=Object.values(we).flat().length,Ye=!!(bt!=null&&bt.length),Ae=(0,N.useCallback)(pe=>(0,o.jsx)(gt,{setSearch:re,hasFilters:Ye,selectedFiltersLength:nn,toggleFilters:Ge,...pe}),[Ge,Ye,nn,re]),ln=typeof G!="function"&&G.length===0,cn=At.length,dn=(0,N.useMemo)(()=>Pt({hasNoRows:ln,emptyContent:St,columnCount:cn,loading:ce}),[ln,St,cn,ce]);return(0,o.jsxs)(d.A,{className:zt.root,children:[Ne&&G&&typeof G!="function"&&(bt==null?void 0:bt.length)&&(0,o.jsx)(ut,{filters:xt(bt,G,At),selectedFilters:we,onChangeFilters:an}),(0,o.jsx)(i.Ay,{components:{Header:lt,Body:dn,Toolbar:Ae,...ge},options:Ut,columns:wt(At,Xt),icons:ht,title:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(c.A,{variant:"h5",component:"h2",children:Tt}),It&&(0,o.jsx)(c.A,{color:"textSecondary",variant:"body1",children:It})]}),data:ke,style:{width:"100%"},localization:{toolbar:{searchPlaceholder:"Filter",searchTooltip:"Filter"},...Nt},...de})]})}pt.icons=Object.freeze(ht);function Pt({columnCount:W,emptyContent:G,hasNoRows:At,loading:St}){return Ut=>St?(0,o.jsx)(Ot,{colSpan:W}):G&&At?(0,o.jsx)("tbody",{children:(0,o.jsx)("tr",{children:(0,o.jsx)("td",{colSpan:W,children:G})})}):(0,o.jsx)(i.C6,{...Ut})}function xt(W,G,At){const St=Tt=>{const It=new Set,Nt=bt=>{bt!=null&&It.add(bt)};return G&&G.forEach(bt=>{var Ft;const Jt=ct(bt,(Ft=At.find(ge=>ge.title===Tt))===null||Ft===void 0?void 0:Ft.field);Array.isArray(Jt)?Jt.forEach(Nt):Nt(Jt)}),It},Ut=Tt=>({placeholder:"All results",label:Tt.column,multiple:Tt.type==="multiple-select",items:[...St(Tt.column)].sort().map(It=>({label:It,value:It}))});return W.map(Tt=>({type:Tt.type,element:Ut(Tt)}))}},88640:function(Z,T,t){"use strict";t.d(T,{B:function(){return x}});var o=t(31085),i=t(268),d=t(58837),O=t(8973),m=t(29655),v=t(91567),f=t(42899),c=t(72501),C=t(9181),E=t(6924),w=t(14041),h=t(4650);const S=(K,H)=>(H.palette.type==="light"?i.e$:i.a)(H.palette[K].light,.6),p=(K,H)=>(H.palette.type==="light"?i.a:i.e$)(H.palette[K].light,.9),B=(0,d.A)(K=>({root:{marginRight:K.spacing(1),fill:({severity:H})=>S(H,K)}})),P=({severity:K})=>{const H=B({severity:K});return(0,o.jsx)(C.A,{classes:H})},A=({severity:K})=>{const H=B({severity:K});return(0,o.jsx)(E.A,{classes:H})},U=(0,d.A)(K=>({panel:{backgroundColor:({severity:H})=>p(H,K),color:({severity:H})=>S(H,K),verticalAlign:"middle"},summary:{display:"flex",flexDirection:"row"},summaryText:{color:({severity:H})=>S(H,K),fontWeight:K.typography.fontWeightBold},markdownContent:{"& p":{display:"inline"}},message:{width:"100%",display:"block",color:({severity:H})=>S(H,K),backgroundColor:({severity:H})=>p(H,K)},details:{width:"100%",display:"block",color:K.palette.textContrast,backgroundColor:K.palette.background.default,border:`1px solid ${K.palette.border}`,padding:K.spacing(2),fontFamily:"sans-serif"}}),{name:"BackstageWarningPanel"}),M=K=>K.charAt(0).toLocaleUpperCase("en-US")+K.slice(1);function x(K){const{severity:H="warning",title:V,titleFormat:N,message:z,children:J,defaultExpanded:_}=K,et=U({severity:H}),q=M(H)+(V?`: ${V}`:"");return(0,o.jsxs)(O.A,{defaultExpanded:_!=null?_:!1,className:et.panel,role:"alert",children:[(0,o.jsxs)(m.A,{expandIcon:(0,o.jsx)(A,{severity:H}),className:et.summary,children:[(0,o.jsx)(P,{severity:H}),(0,o.jsx)(c.A,{className:et.summaryText,variant:"subtitle1",children:N==="markdown"?(0,o.jsx)(h.h,{content:q,className:et.markdownContent}):q})]}),(z||J)&&(0,o.jsx)(v.A,{children:(0,o.jsxs)(f.A,{container:!0,children:[z&&(0,o.jsx)(f.A,{item:!0,xs:12,children:(0,o.jsx)(c.A,{className:et.message,variant:"body1",children:z})}),J&&(0,o.jsx)(f.A,{item:!0,xs:12,className:et.details,children:J})]})})]})}},10795:function(Z,T,t){"use strict";t.d(T,{l:function(){return v}});var o=t(72427),i=t(65461),d=t(10315),O=t(87849);const m=()=>{const{t:f}=(0,O.i)(d.O);return{url:"https://github.com/backstage/backstage/issues",items:[{title:f("supportConfig.default.title"),icon:"warning",links:[{title:f("supportConfig.default.linkTitle"),url:"https://github.com/backstage/backstage/blob/master/app-config.yaml"}]}]}};function v(){const c=(0,o.Q2)().get(i.U),C=c==null?void 0:c.getOptionalConfig("app.support"),E=m();return C?{url:C.getString("url"),items:C.getConfigArray("items").flatMap(w=>{var h;return{title:w.getString("title"),icon:w.getOptionalString("icon"),links:((h=w.getOptionalConfigArray("links"))!==null&&h!==void 0?h:[]).flatMap(S=>({url:S.getString("url"),title:S.getString("title")}))}})}:E}},31129:function(Z,T,t){"use strict";t.d(T,{NT:function(){return p},z9:function(){return m}});var o=t(31085),i=t(82266),d=t(27799),O=t(14041);function m(A){const{id:U,Fallback:M=d.A,...x}=A,K=(0,i.n)();var H;const V=(H=K.getSystemIcon(U))!==null&&H!==void 0?H:M;return(0,o.jsx)(V,{...x})}function v(A){return _jsx(m,{id:"brokenImage",...A})}function f(A){return _jsx(m,{id:"catalog",...A})}function c(A){return _jsx(m,{id:"chat",...A})}function C(A){return _jsx(m,{id:"dashboard",...A})}function E(A){return _jsx(m,{id:"docs",...A})}function w(A){return _jsx(m,{id:"email",...A})}function h(A){return _jsx(m,{id:"github",...A})}function S(A){return _jsx(m,{id:"group",...A})}function p(A){return(0,o.jsx)(m,{id:"help",...A})}function B(A){return _jsx(m,{id:"user",...A})}function P(A){return _jsx(m,{id:"warning",...A})}},26280:function(Z,T,t){"use strict";t.d(T,{U:function(){return f}});var o=t(31085),i=t(58837),d=t(53373),O=t.n(d),m=t(14041);const v=(0,i.A)(c=>({root:{gridArea:"pageContent",minWidth:0,paddingTop:c.spacing(3),paddingBottom:c.spacing(3),paddingLeft:c.spacing(2),paddingRight:c.spacing(2),[c.breakpoints.up("sm")]:{paddingLeft:c.spacing(3),paddingRight:c.spacing(3)}},stretch:{display:"flex",flexDirection:"column",flexGrow:1},noPadding:{padding:0}}),{name:"BackstageContent"});function f(c){const{className:C,stretch:E,noPadding:w,children:h,...S}=c,p=v();return(0,o.jsx)("article",{...S,className:O()(p.root,C,{[p.stretch]:E,[p.noPadding]:w}),children:h})}},59428:function(Z,T,t){"use strict";t.d(T,{d:function(){return C}});var o=t(31085),i=t(10394),d=t(58837),O=t(72501),m=t(14041),v=t(93285);const f=E=>(0,d.A)(w=>({container:{width:"100%",display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-end",alignItems:"center",marginBottom:w.spacing(2),textAlign:E.textAlign},leftItemsBox:{flex:"1 1 auto",minWidth:0,overflow:"visible"},rightItemsBox:{flex:"0 1 auto",display:"flex",flexDirection:"row",flexWrap:"wrap",alignItems:"center",marginLeft:w.spacing(1),minWidth:0,overflow:"visible"},description:{},title:{display:"inline-flex",marginBottom:0}}),{name:"BackstageContentHeader"}),c=({title:E="Unknown page",className:w})=>(0,o.jsx)(O.A,{variant:"h4",component:"h2",className:w,"data-testid":"header-title",children:E});function C(E){const{description:w,title:h,titleComponent:S=void 0,children:p,textAlign:B="left"}=E,P=f({textAlign:B})(),A=S||(0,o.jsx)(c,{title:h,className:P.title});return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(v.m,{title:h}),(0,o.jsxs)(i.A,{className:P.container,children:[(0,o.jsxs)(i.A,{className:P.leftItemsBox,children:[A,w&&(0,o.jsx)(O.A,{className:P.description,variant:"body2",children:w})]}),(0,o.jsx)(i.A,{className:P.rightItemsBox,children:p})]})]})}},12173:function(Z,T,t){"use strict";t.d(T,{M:function(){return U}});var o=t(31085),i=t(42899),d=t(58837),O=t(72501),m=t(14041),v=t(18690),f=t(72072),c=t(10795),C=t.p+"static/mic-drop.fe3ef4d0..svg";const E=(0,d.A)(M=>({micDrop:{maxWidth:"60%",bottom:M.spacing(2),right:M.spacing(2),[M.breakpoints.down("xs")]:{maxWidth:"96%",bottom:"unset",right:"unset",margin:M.spacing(10,"auto",4)}}}),{name:"BackstageErrorPageMicDrop"}),w=()=>{const M=E();return(0,o.jsx)("img",{src:C,className:M.micDrop,alt:"Girl dropping mic from her hands"})};var h=t(77310),S=t(87849),p=t(10315);const B=(0,d.A)(M=>({title:{paddingBottom:M.spacing(5),[M.breakpoints.down("xs")]:{paddingBottom:M.spacing(4),fontSize:M.typography.h3.fontSize}}}),{name:"BackstageErrorPageStackDetails"});function P(M){const{stack:x}=M,K=B(),{t:H}=(0,S.i)(p.O),[V,N]=(0,m.useState)(!1);return V?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(O.A,{variant:"h6",className:K.title,children:(0,o.jsx)(f.N_,{to:"#",onClick:()=>N(!1),children:H("errorPage.showLessDetails")})}),(0,o.jsx)(h.z,{text:x,language:"text",showCopyCodeButton:!0,showLineNumbers:!0})]}):(0,o.jsx)(O.A,{variant:"h6",className:K.title,children:(0,o.jsx)(f.N_,{to:"#",onClick:()=>N(!0),children:H("errorPage.showMoreDetails")})})}const A=(0,d.A)(M=>({container:{padding:M.spacing(8),[M.breakpoints.down("xs")]:{padding:M.spacing(2)}},title:{paddingBottom:M.spacing(5),[M.breakpoints.down("xs")]:{paddingBottom:M.spacing(4),fontSize:M.typography.h3.fontSize}},subtitle:{color:M.palette.textSubtle}}),{name:"BackstageErrorPage"});function U(M){const{status:x="",statusMessage:K,additionalInfo:H,supportUrl:V,stack:N}=M,z=A(),J=(0,v.Zp)(),_=(0,c.l)(),{t:et}=(0,S.i)(p.O);return(0,o.jsxs)(i.A,{container:!0,className:z.container,children:[(0,o.jsxs)(i.A,{item:!0,xs:12,sm:8,md:4,children:[(0,o.jsx)(O.A,{"data-testid":"error",variant:"body1",className:z.subtitle,children:et("errorPage.subtitle",{status:x,statusMessage:K})}),(0,o.jsx)(O.A,{variant:"body1",className:z.subtitle,children:H}),(0,o.jsx)(O.A,{variant:"h2",className:z.title,children:et("errorPage.title")}),(0,o.jsxs)(O.A,{variant:"h6",className:z.title,children:[(0,o.jsx)(f.N_,{to:"#","data-testid":"go-back-link",onClick:()=>J(-1),children:et("errorPage.goBack")}),"... or please"," ",(0,o.jsx)(f.N_,{to:V||_.url,children:"contact support"})," if you think this is a bug."]}),N&&(0,o.jsx)(P,{stack:N})]}),(0,o.jsx)(w,{})]})}},69814:function(Z,T,t){"use strict";t.d(T,{Y:function(){return J}});var o=t(31085),i=t(72427),d=t(65461),O=t(10394),m=t(42899),v=t(58837),f=t(71677),c=t(72501),C=t(14041),E=t(93285),w=t(72072),h=t(45634),S=t(58007),p=t(8109),B=t(55197),P=t(87051);const A=(0,P.A)({root:{textDecoration:"underline",cursor:"pointer"}},{name:"BackstageBreadcrumbsClickableText"})(c.A),U=(0,P.A)({root:{textDecoration:"underline",color:"inherit"}},{name:"BackstageBreadcrumbsStyledBox"})(O.A),M=(0,P.A)({root:{fontStyle:"italic"}},{name:"BreadcrumbsCurrentPage"})(O.A);function x(_){const{children:et,...q}=_,[ut,dt]=C.useState(null),Ot=C.Children.toArray(et),[ht,ct,...lt]=Ot,ft=lt.length?lt.pop():Ot[Ot.length-1],Et=Ot.length>3,mt=it=>{dt(it.currentTarget)},wt=()=>{dt(null)},vt=!!ut;return(0,o.jsxs)(C.Fragment,{children:[(0,o.jsxs)(h.A,{"aria-label":"breadcrumb",...q,children:[Ot.length>1&&(0,o.jsx)(U,{clone:!0,children:ht}),Ot.length>2&&(0,o.jsx)(U,{clone:!0,children:ct}),Et&&(0,o.jsx)(A,{onClick:mt,children:"..."}),(0,o.jsx)(M,{children:ft})]}),(0,o.jsx)(B.Ay,{open:vt,anchorEl:ut,onClose:wt,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},children:(0,o.jsx)(S.A,{children:lt.map((it,gt)=>(0,o.jsx)(p.A,{button:!0,children:(0,o.jsx)(U,{clone:!0,children:it})},gt))})})]})}var K=t(73524);const H=(0,v.A)(_=>({header:{gridArea:"pageHeader",padding:_.spacing(3),width:"100%",boxShadow:_.shadows[4],position:"relative",zIndex:100,display:"flex",flexDirection:"row",alignItems:"center",backgroundImage:_.page.backgroundImage,backgroundPosition:"center",backgroundSize:"cover",[_.breakpoints.down("sm")]:{flexWrap:"wrap"}},leftItemsBox:{maxWidth:"100%",flexGrow:1},rightItemsBox:{width:"auto",alignItems:"center"},title:{color:_.page.fontColor,wordBreak:"break-word",fontSize:_.typography.h3.fontSize,marginBottom:0},subtitle:{color:_.page.fontColor,opacity:.8,display:"inline-block",marginTop:_.spacing(1),maxWidth:"75ch"},type:{textTransform:"uppercase",fontSize:11,opacity:.8,marginBottom:_.spacing(1),color:_.page.fontColor},breadcrumb:{color:_.page.fontColor},breadcrumbType:{fontSize:"inherit",opacity:.7,marginRight:-_.spacing(.3),marginBottom:_.spacing(.3)},breadcrumbTitle:{fontSize:"inherit",marginLeft:-_.spacing(.3),marginBottom:_.spacing(.3)}}),{name:"BackstageHeader"}),V=({type:_,typeLink:et,classes:q,pageTitle:ut})=>_?et?(0,o.jsxs)(x,{className:q.breadcrumb,children:[(0,o.jsx)(w.N_,{to:et,children:_}),(0,o.jsx)(c.A,{children:ut})]}):(0,o.jsx)(c.A,{className:q.type,children:_}):null,N=({pageTitle:_,classes:et,tooltip:q})=>{const{contentRef:ut}=(0,K.H)(),dt=(0,o.jsx)(c.A,{ref:ut,tabIndex:-1,className:et.title,variant:"h1",children:_});return q?(0,o.jsx)(f.Ay,{title:q,placement:"top-start",children:dt}):dt},z=({classes:_,subtitle:et})=>et?typeof et!="string"?(0,o.jsx)(o.Fragment,{children:et}):(0,o.jsx)(c.A,{className:_.subtitle,variant:"subtitle2",component:"span",children:et}):null;function J(_){const{children:et,pageTitleOverride:q,style:ut,subtitle:dt,title:Ot,tooltip:ht,type:ct,typeLink:lt}=_,ft=H(),mt=(0,i.gf)(d.U).getOptionalString("app.title")||"Backstage",wt=q||Ot,vt=Ot||q,it=`${wt} | %s | ${mt}`,gt=`${wt} | ${mt}`;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(E.m,{titleTemplate:it,defaultTitle:gt}),(0,o.jsxs)("header",{style:ut,className:ft.header,children:[(0,o.jsxs)(O.A,{className:ft.leftItemsBox,children:[(0,o.jsx)(V,{classes:ft,type:ct,typeLink:lt,pageTitle:vt}),(0,o.jsx)(N,{classes:ft,pageTitle:vt,tooltip:ht}),(0,o.jsx)(z,{classes:ft,subtitle:dt})]}),(0,o.jsx)(m.A,{container:!0,className:ft.rightItemsBox,spacing:4,children:et})]})]})}},24504:function(Z,T,t){"use strict";t.d(T,{Y:function(){return v}});var o=t(31085),i=t(14041),d=t(58837),O=t(50868);const m=(0,d.A)(f=>({root:{display:"grid",gridTemplateAreas:"'pageHeader pageHeader pageHeader' 'pageSubheader pageSubheader pageSubheader' 'pageNav pageContent pageSidebar'",gridTemplateRows:"max-content auto 1fr",gridTemplateColumns:"auto 1fr auto",overflowY:"auto",height:"100vh",[f.breakpoints.down("xs")]:{height:"100%"},"@media print":{display:"block",height:"auto",overflowY:"inherit"}}}),{name:"BackstagePage"});function v(f){const{themeId:c,children:C}=f,E=m();return(0,o.jsx)(O.A,{theme:w=>({...w,page:w.getPageTheme({themeId:c})}),children:(0,o.jsx)("main",{className:E.root,children:C})})}},27155:function(Z,T,t){"use strict";t.d(T,{d:function(){return m}});var o=t(31085),i=t(14041),d=t(69814),O=t(24504);function m(v){const{themeId:f,children:c,...C}=v;return(0,o.jsxs)(O.Y,{themeId:f,children:[(0,o.jsx)(d.Y,{...C}),c]})}},73524:function(Z,T,t){"use strict";t.d(T,{G:function(){return h},H:function(){return S}});var o=t(31085),i=t(10394),d=t(58837),O=t(5893),m=t(14041),v=t(72664),f;(function(p){p.SIDEBAR_PIN_STATE="sidebarPinState"})(f||(f={}));const c={getSidebarPinState(){let p;try{p=JSON.parse(window.localStorage.getItem("sidebarPinState")||"true")}catch{return!0}return!!p},setSidebarPinState(p){return window.localStorage.setItem("sidebarPinState",JSON.stringify(p))}};var C=t(34435);const E=(0,d.A)(p=>({root:{width:"100%",transition:"padding-left 0.1s ease-out",isolation:"isolate",[p.breakpoints.up("sm")]:{paddingLeft:B=>B.isPinned?B.sidebarConfig.drawerWidthOpen:B.sidebarConfig.drawerWidthClosed},[p.breakpoints.down("xs")]:{paddingBottom:B=>B.sidebarConfig.mobileSidebarHeight},"@media print":{padding:"0px !important"}},content:{zIndex:0,isolation:"isolate","&:focus":{outline:0}}}),{name:"BackstageSidebarPage"}),w=(0,m.createContext)({content:{contentRef:void 0}});function h(p){const[B,P]=(0,m.useState)(()=>c.getSidebarPinState()),{sidebarConfig:A}=(0,m.useContext)(v.yY),U=(0,m.useRef)(null),M=(0,m.useMemo)(()=>({content:{contentRef:U}}),[U]);(0,m.useEffect)(()=>{c.setSidebarPinState(B)},[B]);const x=(0,O.A)(V=>V.breakpoints.down("xs"),{noSsr:!0}),K=()=>P(!B),H=E({isPinned:B,sidebarConfig:A});return(0,o.jsx)(C.qj,{value:{isPinned:B,toggleSidebarPinState:K,isMobile:x},children:(0,o.jsx)(w.Provider,{value:M,children:(0,o.jsx)(i.A,{className:H.root,children:p.children})})})}function S(){const{content:p}=(0,m.useContext)(w);return{focusContent:(0,m.useCallback)(()=>{var P,A;p==null||(A=p.contentRef)===null||A===void 0||(P=A.current)===null||P===void 0||P.focus()},[p]),contentRef:p==null?void 0:p.contentRef}}},34435:function(Z,T,t){"use strict";t.d(T,{Ut:function(){return C},qj:function(){return c}});var o=t(31085),i=t(43836),d=t(10602),O=t(14041);const m={isPinned:!0,toggleSidebarPinState:()=>{},isMobile:!1},v=(0,O.createContext)(m),f=(0,i.tK)("sidebar-pin-state-context");function c(E){const{children:w,value:h}=E;return(0,o.jsx)(v.Provider,{value:h,children:(0,o.jsx)(f.Provider,{value:(0,d.B)({1:h}),children:w})})}const C=()=>{const E=(0,O.useContext)(f),w=(0,O.useContext)(v);if(E===void 0)return w||m;const h=E.atVersion(1);if(h===void 0)throw new Error("No context found for version 1.");return h}},72664:function(Z,T,t){"use strict";t.d(T,{Rv:function(){return v},U1:function(){return w},hC:function(){return m},i8:function(){return c},yY:function(){return E}});var o=t(14041);const i=72,d=24,O=18,m={drawerWidthClosed:i,drawerWidthOpen:224,defaultOpenDelayMs:100,defaultCloseDelayMs:0,defaultFadeDuration:200,logoHeight:32,iconContainerWidth:i,iconSize:i-d*2,iconPadding:d,selectedIndicatorWidth:3,userBadgePadding:O,userBadgeDiameter:i-O*2,mobileSidebarHeight:56},v=h=>({...m,...h,iconContainerWidth:m.drawerWidthClosed,iconSize:m.drawerWidthClosed-m.iconPadding*2,userBadgeDiameter:m.drawerWidthClosed-m.userBadgePadding*2}),f={drawerWidthClosed:0,drawerWidthOpen:202,defaultOpenDelayMs:m.defaultOpenDelayMs+200},c=h=>({...f,...h}),C="@backstage/core/sidebar-intro-dismissed",E=(0,o.createContext)({sidebarConfig:m,submenuConfig:f}),w=(0,o.createContext)({isHoveredOn:!1,setIsHoveredOn:()=>{}})},10315:function(Z,T,t){"use strict";t.d(T,{O:function(){return i}});var o=t(93184);const i=(0,o.h)({id:"core-components",messages:{signIn:{title:"Sign In",loginFailed:"Login failed",customProvider:{title:"Custom User",subtitle:`Enter your own User ID and credentials.
|
|
2
|
+
This selection will not be stored.`,userId:"User ID",tokenInvalid:"Token is not a valid OpenID Connect JWT Token",continue:"Continue",idToken:"ID Token (optional)"},guestProvider:{title:"Guest",subtitle:`Enter as a Guest User.
|
|
3
|
+
You will not have a verified identity, meaning some features might be unavailable.`,enter:"Enter"}},skipToContent:"Skip to content",copyTextButton:{tooltipText:"Text copied to clipboard"},simpleStepper:{reset:"Reset",finish:"Finish",next:"Next",skip:"Skip",back:"Back"},errorPage:{subtitle:"ERROR {{status}}: {{statusMessage}}",title:"Looks like someone dropped the mic!",goBack:"Go back",showMoreDetails:"Show more details",showLessDetails:"Show less details"},emptyState:{missingAnnotation:{title:"Missing Annotation",actionTitle:"Add the annotation to your component YAML as shown in the highlighted example below:",readMore:"Read more"}},supportConfig:{default:{title:"Support Not Configured",linkTitle:"Add `app.support` config key"}},errorBoundary:{title:"Please contact {{slackChannel}} for help."},oauthRequestDialog:{title:"Login Required",authRedirectTitle:"This will trigger a http redirect to OAuth Login.",login:"Log in",rejectAll:"Reject All"},supportButton:{title:"Support",close:"Close"},table:{filter:{title:"Filters",clearAll:"Clear all"}},alertDisplay:{message_one:"({{ count }} older message)",message_other:"({{ count }} older messages)"},autoLogout:{stillTherePrompt:{title:"Logging out due to inactivity",buttonText:"Yes! Don't log me out"}},proxiedSignInPage:{title:"You do not appear to be signed in. Please try reloading the browser page."}}})},25862:function(Z,T,t){"use strict";t.d(T,{Ig:function(){return f},pn:function(){return v}});var o=t(31085),i=t(43836),d=t(10602),O=t(14041);const m=(0,i.tK)("analytics-context"),v=()=>{const C=(0,O.useContext)(m);if(C===void 0)return{routeRef:"unknown",pluginId:"root",extension:"App"};const E=C.atVersion(1);if(E===void 0)throw new Error("No context found for version 1.");return E},f=C=>{const{attributes:E,children:w}=C,S={...v(),...E},p=(0,d.B)({1:S});return(0,o.jsx)(m.Provider,{value:p,children:w})};function c(C,E){const w=h=>_jsx(f,{attributes:E,children:_jsx(C,{...h})});return w.displayName=`WithAnalyticsContext(${C.displayName||C.name||"Component"})`,w}},67237:function(Z,T,t){"use strict";t.d(T,{J:function(){return m},t:function(){return O}});var o=t(18990),i=t(63544);const d=(0,i.Q)("core-plugin-api:analytics-tracker-events",()=>({mostRecentGatheredNavigation:void 0,mostRecentRoutableExtensionRender:void 0,beforeUnloadRegistered:!1})),O="_ROUTABLE-EXTENSION-RENDERED";class m{setContext(f){this.context=f}captureEvent(f,c,{value:C,attributes:E}={}){const{_routeNodeType:w,...h}=this.context;if(f===O){d.mostRecentGatheredNavigation&&(d.mostRecentRoutableExtensionRender={context:{...h,extension:"App"}});return}if(d.mostRecentGatheredNavigation){try{this.analyticsApi.captureEvent({...d.mostRecentGatheredNavigation,...d.mostRecentRoutableExtensionRender})}catch(S){console.warn("Error during analytics event capture. %o",S)}d.mostRecentGatheredNavigation=void 0,d.mostRecentRoutableExtensionRender=void 0}if(f==="navigate"&&w==="gathered"&&h.pluginId==="root"){d.mostRecentGatheredNavigation={action:f,subject:c,value:C,attributes:E,context:h};return}try{this.analyticsApi.captureEvent({action:f,subject:c,value:C,attributes:E,context:h})}catch(S){console.warn("Error during analytics event capture. %o",S)}}constructor(f,c={routeRef:"unknown",pluginId:"root",extension:"App"}){(0,o._)(this,"analyticsApi",void 0),(0,o._)(this,"context",void 0),this.analyticsApi=f,this.context=c,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)}}},93368:function(Z,T,t){"use strict";t.d(T,{s:function(){return f}});var o=t(25862),i=t(72427),d=t(99303),O=t(14041),m=t(67237);function v(){try{return(0,i.gf)(d.c)}catch{return{captureEvent:()=>{}}}}function f(){const c=(0,O.useRef)(null),C=(0,o.pn)(),E=v();function w(){return c.current===null&&(c.current=new m.J(E)),c.current}const h=w();return h.setContext(C),h}},36017:function(Z,T,t){"use strict";t.d(T,{k:function(){return i}});var o=t(55309);const i=(0,o.y)({id:"core.alert"})},99303:function(Z,T,t){"use strict";t.d(T,{c:function(){return i}});var o=t(55309);const i=(0,o.y)({id:"core.analytics"})},65461:function(Z,T,t){"use strict";t.d(T,{U:function(){return i}});var o=t(55309);const i=(0,o.y)({id:"core.config"})},57405:function(Z,T,t){"use strict";t.d(T,{I:function(){return i}});var o=t(55309);const i=(0,o.y)({id:"core.discovery"})},39837:function(Z,T,t){"use strict";t.d(T,{m:function(){return i}});var o=t(55309);const i=(0,o.y)({id:"core.error"})},63636:function(Z,T,t){"use strict";t.d(T,{B:function(){return d},S:function(){return i}});var o=t(55309),i;(function(O){O[O.None=0]="None",O[O.Active=1]="Active"})(i||(i={}));const d=(0,o.y)({id:"core.featureflags"})},70795:function(Z,T,t){"use strict";t.d(T,{a:function(){return i}});var o=t(55309);const i=(0,o.y)({id:"core.fetch"})},16009:function(Z,T,t){"use strict";t.d(T,{K:function(){return i}});var o=t(55309);const i=(0,o.y)({id:"core.identity"})},56038:function(Z,T,t){"use strict";t.d(T,{J:function(){return i}});var o=t(55309);const i=(0,o.y)({id:"core.translation"})},55309:function(Z,T,t){"use strict";t.d(T,{y:function(){return d}});var o=t(18990);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(m){if((0,o._)(this,"config",void 0),this.config=m,!m.id.split(".").flatMap(f=>f.split("-")).every(f=>f.match(/^[a-z][a-z0-9]*$/)))throw new Error(`API id must only contain period separated lowercase alphanum tokens with dashes, got '${m.id}'`)}}function d(O){return new i(O)}},12935:function(Z,T,t){"use strict";t.d(T,{b:function(){return o}});function o(i,d){return"id"in i?{api:i,deps:{},factory:()=>d}:i}},72427:function(Z,T,t){"use strict";t.d(T,{Q2:function(){return m},gf:function(){return v}});var o=t(31085),i=t(14041),d=t(43836),O=t(97142);function m(){const c=(0,d.qO)("api-context");if(!c)throw new O.EH("API context is not available");const C=c.atVersion(1);if(!C)throw new O.EH("ApiContext v1 not available");return C}function v(c){const E=m().get(c);if(!E)throw new O.EH(`No implementation available for ${c}`);return E}function f(c){return function(E){const w=S=>{const p=m(),B={};for(const P in c)if(c.hasOwnProperty(P)){const A=c[P],U=p.get(A);if(!U)throw new NotImplementedError(`No implementation available for ${A}`);B[P]=U}return _jsx(E,{...S,...B})},h=E.displayName||E.name||"Component";return w.displayName=`withApis(${h})`,w}}},82266:function(Z,T,t){"use strict";t.d(T,{n:function(){return i}});var o=t(43836);const i=()=>{const d=(0,o.qO)("app-context");if(!d)throw new Error("App context is not available");const O=d.atVersion(1);if(!O)throw new Error("AppContext v1 not available");return O}},19402:function(Z,T,t){"use strict";t.d(T,{E:function(){return m},h:function(){return O}});var o=t(63544);const i=(0,o.Q)("component-data-store",()=>new WeakMap),d="__backstage_data";function O(v,f,c){const C=v;var E;let w=(E=C[d])!==null&&E!==void 0?E:i.get(v);if(w||(w={map:new Map},Object.defineProperty(C,d,{enumerable:!1,configurable:!0,writable:!1,value:w}),i.set(v,w)),w.map.has(f)){const h=v.displayName||v.name;throw new Error(`Attempted to attach duplicate data "${f}" to component "${h}"`)}w.map.set(f,c)}function m(v,f){if(!v)return;const c=v.type;if(!c)return;var C;const E=(C=c[d])!==null&&C!==void 0?C:i.get(c);if(E)return E.map.get(f)}},88758:function(Z,T,t){"use strict";t.d(T,{NC:function(){return h},zZ:function(){return S},QJ:function(){return w}});var o=t(31085),i=t(14041),d=t(93368),O=t(25862),m=t(82266),v=t(9222),f=t(19402),c=t(18990);class C extends i.Component{static getDerivedStateFromError(B){return{error:B}}render(){const{error:B}=this.state,{app:P,plugin:A}=this.props,{ErrorBoundaryFallback:U}=P.getComponents();return B?(0,o.jsx)(U,{error:B,resetError:this.handleErrorReset,plugin:A}):this.props.children}constructor(...B){super(...B),(0,c._)(this,"state",{error:void 0}),(0,c._)(this,"handleErrorReset",()=>{this.setState({error:void 0})})}}var E=t(67237);function w(p){const{component:B,mountPoint:P,name:A}=p;return S({component:{lazy:()=>B().then(U=>{const M=K=>{const H=(0,d.s)();try{(0,v.S)(P)}catch(V){if(typeof V=="object"&&V!==null){const{message:N}=V;if(typeof N=="string"&&N.startsWith("No path for "))throw new Error(`Routable extension component with mount point ${P} 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 V}return(0,i.useEffect)(()=>{H.captureEvent(E.t,"")},[H]),(0,o.jsx)(U,{...K})},x=A||U.displayName||U.name||"LazyComponent";return M.displayName=`RoutableExtension(${x})`,M},U=>x=>{const K=(0,m.n)(),{BootErrorPage:H}=K.getComponents();return(0,o.jsx)(H,{step:"load-chunk",error:U})})},data:{"core.mountPoint":P},name:A})}function h(p){const{component:B,name:P}=p;return S({component:B,name:P})}function S(p){const{data:B={},name:P}=p;P||console.warn("Declaring extensions without name is DEPRECATED. Make sure that all usages of createReactExtension, createComponentExtension and createRoutableExtension provide a name.");let A;if("lazy"in p.component){const M=p.component.lazy;A=(0,i.lazy)(()=>M().then(x=>({default:x})))}else A=p.component.sync;const U=P||A.displayName||A.name||"Component";return{expose(M){const x=K=>{const H=(0,m.n)(),{Progress:V}=H.getComponents(),N=B==null?void 0:B["core.mountPoint"];return(0,o.jsx)(i.Suspense,{fallback:(0,o.jsx)(V,{}),children:(0,o.jsx)(C,{app:H,plugin:M,children:(0,o.jsx)(O.Ig,{attributes:{pluginId:M.getId(),...P&&{extension:P},...N&&{routeRef:N.id}},children:(0,o.jsx)(A,{...K})})})})};(0,f.h)(x,"core.plugin",M),(0,f.h)(x,"core.extensionName",P);for(const[K,H]of Object.entries(B))(0,f.h)(x,K,H);return x.displayName=`Extension(${U})`,x}}}},82442:function(Z,T,t){"use strict";t.d(T,{O:function(){return c}});var o=t(18990),i=t(14041),d=t(19402),O=t(72427),m=t(63636);function v(C,E,w,h){return i.Children.toArray(C).flatMap(S=>{if(!(0,i.isValidElement)(S))return[];if(S.type===i.Fragment)return v(S.props.children,E,w,h);if((0,d.E)(S,"core.featureFlagged")){const p=S.props;return("with"in p?E.isActive(p.with):!E.isActive(p.without))?v(S.props.children,E,w,h):[]}if(w===void 0||w(S))return[S];if(h)throw new Error(h);return v(S.props.children,E,w,h)})}class f{selectByComponentData(E){const w=v(this.node,this.featureFlagsApi,h=>(0,d.E)(h,E.key)!==void 0,E.withStrictError);return new f(w,this.featureFlagsApi)}findComponentData(E){return v(this.node,this.featureFlagsApi,h=>(0,d.E)(h,E.key)!==void 0).map(h=>(0,d.E)(h,E.key)).filter(h=>h!==void 0)}getElements(){return v(this.node,this.featureFlagsApi)}constructor(E,w){(0,o._)(this,"node",void 0),(0,o._)(this,"featureFlagsApi",void 0),this.node=E,this.featureFlagsApi=w}}function c(C,E,w=[]){const h=(0,O.gf)(m.B),S=new f(C,h);return(0,i.useMemo)(()=>E(S),[C,...w])}},9803:function(Z,T,t){"use strict";t.d(T,{i:function(){return d}});var o=t(18990);class i{getId(){return this.config.id}getApis(){var m;return(m=this.config.apis)!==null&&m!==void 0?m:[]}getFeatureFlags(){var m,v;return(v=(m=this.config.featureFlags)===null||m===void 0?void 0:m.slice())!==null&&v!==void 0?v:[]}get routes(){var m;return(m=this.config.routes)!==null&&m!==void 0?m:{}}get externalRoutes(){var m;return(m=this.config.externalRoutes)!==null&&m!==void 0?m:{}}provide(m){return m.expose(this)}toString(){return`plugin{${this.config.id}}`}constructor(m){(0,o._)(this,"config",void 0),this.config=m}}function d(O){return new i(O)}},34569:function(Z,T,t){"use strict";t.d(T,{H:function(){return v}});var o=t(18990),i=t(59598);let d=i.b,O=d;class m{get title(){return this.id}toString(){return`routeRef{type=absolute,id=${this.id}}`}constructor(c,C){(0,o._)(this,"id",void 0),(0,o._)(this,"params",void 0),(0,o._)(this,O,void 0),this.id=c,this.params=C,this[d]="absolute"}}function v(f){var c;return new m(f.id,(c=f.params)!==null&&c!==void 0?c:[])}},59598:function(Z,T,t){"use strict";t.d(T,{b:function(){return i}});var o=t(63544);const i=(0,o.Q)("route-ref-type",()=>Symbol("route-ref-type"))},9222:function(Z,T,t){"use strict";t.d(T,{S:function(){return O}});var o=t(14041),i=t(18690),d=t(43836);function O(m){const{pathname:v}=(0,i.zy)(),f=(0,d.qO)("routing-context");if(!f)throw new Error("Routing context is not available");const c=f.atVersion(1),C=(0,o.useMemo)(()=>c&&c.resolve(m,{pathname:v}),[c,m,v]);if(!f)throw new Error("useRouteRef used outside of routing context");if(!c)throw new Error("RoutingContext v1 not available");const E="optional"in m&&m.optional;if(!C&&!E)throw new Error(`No path for ${m}`);return C}},93184:function(Z,T,t){"use strict";t.d(T,{h:function(){return w},v:function(){return h}});var o=t(96324),i=t(87081),d=t(33284),O=t(18990),m=t(99833);function v(S){const p=new Array;function B(P,A){for(const[U,M]of Object.entries(P))typeof M=="string"?p.push([A+U,M]):B(M,`${A}${U}.`)}return B(S,""),Object.fromEntries(p)}var f=new WeakMap,c=new WeakMap,C=new WeakMap;class E{get id(){return(0,o._)(this,f)}get T(){throw new Error("Not implemented")}getDefaultMessages(){return(0,o._)(this,c)}setDefaultResource(p){(0,d._)(this,C,p)}getDefaultResource(){return(0,o._)(this,C)}toString(){return`TranslationRef{id=${this.id}}`}constructor(p){(0,i._)(this,f,{writable:!0,value:void 0}),(0,i._)(this,c,{writable:!0,value:void 0}),(0,i._)(this,C,{writable:!0,value:void 0}),(0,O._)(this,"$$type","@backstage/TranslationRef"),(0,O._)(this,"version","v1"),(0,d._)(this,f,p.id),(0,d._)(this,c,v(p.messages))}}function w(S){const p=new E(S);return S.translations&&p.setDefaultResource((0,m.o)({ref:p,translations:S.translations})),p}function h(S){const p=S;if(p.$$type!=="@backstage/TranslationRef")throw new Error(`Invalid translation ref, bad type '${p.$$type}'`);if(p.version!=="v1")throw new Error(`Invalid translation ref, bad version '${p.version}'`);return p}},99833:function(Z,T,t){"use strict";t.d(T,{Y:function(){return o},o:function(){return i}});function o(d){const O=d;if(O.$$type!=="@backstage/TranslationResource")throw new Error(`Invalid translation resource, bad type '${O.$$type}'`);if(O.version!=="v1")throw new Error(`Invalid translation resource, bad version '${O.version}'`);return O}function i(d){return{$$type:"@backstage/TranslationResource",version:"v1",id:d.ref.id,resources:Object.entries(d.translations).map(([O,m])=>({language:O,loader:()=>m().then(v=>{const f=v.default;return{messages:(f==null?void 0:f.$$type)==="@backstage/TranslationMessages"?f.messages:f}})}))}}},87849:function(Z,T,t){"use strict";t.d(T,{i:function(){return v}});var o=t(14041),i=t(72427),d=t(39837),O=t(56038);const m=new WeakSet,v=f=>{const c=(0,i.gf)(d.m),C=(0,i.gf)(O.J),[E,w]=(0,o.useState)(()=>C.getTranslation(f)),h=(0,o.useMemo)(()=>C.translation$(f),[C,f]),S=(0,o.useCallback)(B=>{if(!m.has(f)){const P=`Failed to load translation resource '${f.id}'; caused by ${B}`;console.error(P),c.post(new Error(P)),m.add(f)}},[c,f]);(0,o.useEffect)(()=>{const B=h.subscribe({next(P){P.ready&&w(P)},error(P){S(P)}});return()=>{B.unsubscribe()}},[h,S]);const p=(0,o.useRef)(!0);if((0,o.useEffect)(()=>{p.current?p.current=!1:w(C.getTranslation(f))},[C,f]),!E.ready)throw new Promise(B=>{const P=h.subscribe({next(A){A.ready&&(P.unsubscribe(),B())},error(A){P.unsubscribe(),S(A),B()}})});return{t:E.t}}},70835:function(Z,T,t){"use strict";t.d(T,{o:function(){return O}});var o=t(18990),i=t(59750);async function d(m){try{const f=await m.text();if(f){var v;if(!((v=m.headers.get("content-type"))===null||v===void 0)&&v.startsWith("application/json"))try{const c=JSON.parse(f);if(c.error&&c.response)return c}catch{}return{error:{name:"Error",message:`Request failed with status ${m.status} ${m.statusText}, ${f}`},response:{statusCode:m.status}}}}catch{}return{error:{name:"Error",message:`Request failed with status ${m.status} ${m.statusText}`},response:{statusCode:m.status}}}class O extends Error{static async fromResponse(v){const f=await d(v),c=f.response.statusCode||v.status,C=v.statusText,E=`Request failed with ${c} ${C}`,w=(0,i.cy)(f.error);return new O({message:E,response:v,data:f,cause:w,statusCode:c,statusText:C})}constructor(v){super(v.message),(0,o._)(this,"response",void 0),(0,o._)(this,"body",void 0),(0,o._)(this,"cause",void 0),(0,o._)(this,"statusCode",void 0),(0,o._)(this,"statusText",void 0),this.name="ResponseError",this.response=v.response,this.body=v.data,this.cause=v.cause,this.statusCode=v.statusCode,this.statusText=v.statusText}}},93007:function(Z,T,t){"use strict";t.d(T,{b:function(){return o}});function o(d){if(typeof d!="object"||d===null||Array.isArray(d))return!1;const O=d;return!(typeof O.name!="string"||O.name===""||typeof O.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 O=d;if(typeof O.name!="string"||O.name==="")throw new Error(`Encountered error object without a name, got '${d}'`);if(typeof O.message!="string")throw new Error(`Encountered error object without a message, got '${d}'`)}},97142:function(Z,T,t){"use strict";t.d(T,{m_:function(){return c},EH:function(){return w}});var o=t(18990),i=t(93007),d=t(59750);class O extends Error{constructor(B,P){var A,U;let M=B;if(P!==void 0){const x=(0,d.M5)(P);M?M+=`; caused by ${x}`:M=`caused by ${x}`}super(M),(0,o._)(this,"cause",void 0),(A=(U=Error).captureStackTrace)===null||A===void 0||A.call(U,this,this.constructor),(!this.name||this.name==="Error")&&this.constructor.name!=="Error"&&(this.name=this.constructor.name),this.cause=(0,i.b)(P)?P:void 0}}class m extends O{constructor(...B){super(...B),(0,o._)(this,"name","InputError")}}class v extends O{constructor(...B){super(...B),(0,o._)(this,"name","AuthenticationError")}}class f extends O{constructor(...B){super(...B),(0,o._)(this,"name","NotAllowedError")}}class c extends O{constructor(...B){super(...B),(0,o._)(this,"name","NotFoundError")}}class C extends O{constructor(...B){super(...B),(0,o._)(this,"name","ConflictError")}}class E extends O{constructor(...B){super(...B),(0,o._)(this,"name","NotModifiedError")}}class w extends O{constructor(...B){super(...B),(0,o._)(this,"name","NotImplementedError")}}class h extends null{}class S extends O{constructor(B,P){super(B,P),this.name=(0,i.b)(P)?P.name:"Error"}}},59750:function(Z,T,t){"use strict";t.d(T,{M5:function(){return v},cy:function(){return m}});var o=t(69655),i=t.n(o),d=t(93007);function O(f,c){const E={name:"Unknown",message:"<no reason given>",...serializeErrorInternal(f)};return c!=null&&c.includeStack||delete E.stack,E}function m(f){const c=(0,o.deserializeError)(f);return f.stack||(c.stack=void 0),c}function v(f){if((0,d.b)(f)){const c=String(f);return c!=="[object Object]"?c:`${f.name}: ${f.message}`}return`unknown error '${f}'`}},3347:function(Z,T,t){"use strict";t.d(T,{L:function(){return In},Y:function(){return Dn}});var o=t(18990),i=t(59869);const d="amazonaws.com";function O(L){var u;const I=L.getOptionalString("endpoint");var j;const nt=(j=L.getOptionalBoolean("s3ForcePathStyle"))!==null&&j!==void 0?j:!1;let Y,Rt;if(I){try{const se=new URL(I);Y=se.host,Rt=se.pathname}catch{throw new Error(`invalid awsS3 integration config, endpoint '${I}' is not a valid URL`)}if(Rt!=="/")throw new Error(`invalid awsS3 integration config, endpoints cannot contain path, got '${I}'`)}else Y=d;const qt=L.getOptionalString("accessKeyId"),$t=(u=L.getOptionalString("secretAccessKey"))===null||u===void 0?void 0:u.trim(),he=L.getOptionalString("roleArn"),ue=L.getOptionalString("externalId");return{host:Y,endpoint:I,s3ForcePathStyle:nt,accessKeyId:qt,secretAccessKey:$t,roleArn:he,externalId:ue}}function m(L){const u=L.map(O);return u.some(I=>I.host===d)||u.push({host:d}),u}class v{get type(){return"awsS3"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(u){return(0,i.ku)(u)}resolveEditUrl(u){return u}constructor(u){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=u}}(0,o._)(v,"factory",({config:L})=>{var u;const I=m((u=L.getOptionalConfigArray("integrations.awsS3"))!==null&&u!==void 0?u:[]);return(0,i.oS)(I.map(j=>new v(j)),j=>j.config.host)});const f="console.aws.amazon.com";function c(L){var u;const I=L.getOptionalString("accessKeyId"),j=(u=L.getOptionalString("secretAccessKey"))===null||u===void 0?void 0:u.trim(),nt=L.getOptionalString("roleArn"),Y=L.getOptionalString("externalId");return{host:f,accessKeyId:I,secretAccessKey:j,roleArn:nt,externalId:Y}}function C(L){const u=L.map(c);return u.some(I=>I.host===f)||u.push({host:f}),u}class E{get type(){return"awsCodeCommit"}get config(){return this.integrationConfig}get title(){return this.integrationConfig.host}resolveUrl(u){return(0,i.ku)(u)}resolveEditUrl(u){const j=new URL(u).pathname.match(/^\/codesuite\/codecommit\/repositories\/([^\/]+)\//);if(!j)throw new Error("");const[,nt]=j;return w(u,nt,"edit")}constructor(u){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=u}}(0,o._)(E,"factory",({config:L})=>{var u;const I=C((u=L.getOptionalConfigArray("integrations.awsCodeCommit"))!==null&&u!==void 0?u:[]);return(0,i.oS)(I.map(j=>new E(j)),j=>j.config.host)});function w(L,u,I){const j=I==="edit"?"files/edit":I;return L.replace(new RegExp(`/codesuite/codecommit/repositories/${u}/(browse|files/edit)/`),`/codesuite/codecommit/repositories/${u}/${j}/`)}var h=t(96324),S=t(87081),p=t(33284);const B="GB";var P=new WeakMap,A=new WeakMap,U=new WeakMap,M=new WeakMap,x=new WeakMap,K=new WeakMap,H=new WeakMap;class V{static fromRepoUrl(u){const I=new URL(u);let j,nt,Y;const Rt=I.pathname.split("/").map(se=>decodeURIComponent(se));if(Rt[2]==="_git"?(j=Rt[1],nt=Y=Rt[3]):Rt[3]==="_git"?(j=Rt[1],nt=Rt[2],Y=Rt[4]):Rt[4]==="_git"&&(j=`${Rt[1]}/${Rt[2]}`,nt=Rt[3],Y=Rt[5]),!j||!nt||!Y)throw new Error("Azure URL must point to a git repository");var qt;const $t=(qt=I.searchParams.get("path"))!==null&&qt!==void 0?qt:void 0;let he;const ue=I.searchParams.get("version");if(ue){if(ue.slice(0,2)!=="GB")throw new Error("Azure URL version must point to a git branch");he=ue.slice(2)}return new V(I.origin,j,nt,Y,$t,he)}toRepoUrl(){let u;return(0,h._)(this,U)===(0,h._)(this,M)?u=(0,h._)(this,H).call(this,(0,h._)(this,A),"_git",(0,h._)(this,M)):u=(0,h._)(this,H).call(this,(0,h._)(this,A),(0,h._)(this,U),"_git",(0,h._)(this,M)),(0,h._)(this,x)&&u.searchParams.set("path",(0,h._)(this,x)),(0,h._)(this,K)&&u.searchParams.set("version",B+(0,h._)(this,K)),u.toString()}toFileUrl(){if(!(0,h._)(this,x))throw new Error("Azure URL must point to a specific path to be able to download a file");const u=(0,h._)(this,H).call(this,(0,h._)(this,A),(0,h._)(this,U),"_apis","git","repositories",(0,h._)(this,M),"items");return u.searchParams.set("api-version","6.0"),u.searchParams.set("path",(0,h._)(this,x)),(0,h._)(this,K)&&u.searchParams.set("version",(0,h._)(this,K)),u.toString()}toArchiveUrl(){const u=(0,h._)(this,H).call(this,(0,h._)(this,A),(0,h._)(this,U),"_apis","git","repositories",(0,h._)(this,M),"items");return u.searchParams.set("recursionLevel","full"),u.searchParams.set("download","true"),u.searchParams.set("api-version","6.0"),(0,h._)(this,x)&&u.searchParams.set("scopePath",(0,h._)(this,x)),(0,h._)(this,K)&&u.searchParams.set("version",(0,h._)(this,K)),u.toString()}toCommitsUrl(){const u=(0,h._)(this,H).call(this,(0,h._)(this,A),(0,h._)(this,U),"_apis","git","repositories",(0,h._)(this,M),"commits");return u.searchParams.set("api-version","6.0"),(0,h._)(this,K)&&u.searchParams.set("searchCriteria.itemVersion.version",(0,h._)(this,K)),u.toString()}getOwner(){return(0,h._)(this,A)}getProject(){return(0,h._)(this,U)}getRepo(){return(0,h._)(this,M)}getPath(){return(0,h._)(this,x)}getRef(){return(0,h._)(this,K)}constructor(u,I,j,nt,Y,Rt){(0,S._)(this,P,{writable:!0,value:void 0}),(0,S._)(this,A,{writable:!0,value:void 0}),(0,S._)(this,U,{writable:!0,value:void 0}),(0,S._)(this,M,{writable:!0,value:void 0}),(0,S._)(this,x,{writable:!0,value:void 0}),(0,S._)(this,K,{writable:!0,value:void 0}),(0,S._)(this,H,{writable:!0,value:(...qt)=>{const $t=new URL((0,h._)(this,P));return $t.pathname=qt.map(he=>encodeURIComponent(he)).join("/"),$t}}),(0,p._)(this,P,u),(0,p._)(this,A,I),(0,p._)(this,U,j),(0,p._)(this,M,nt),(0,p._)(this,x,Y),(0,p._)(this,K,Rt)}}const N="dev.azure.com",z=["clientId","clientSecret","tenantId","personalAccessToken"],J=new Map([["ClientSecret",["clientId","clientSecret","tenantId"]],["ManagedIdentity",["clientId"]],["PersonalAccessToken",["personalAccessToken"]]]);function _(L){for(const u of J.entries()){const[I,j]=u,nt=z.filter(Y=>!j.includes(Y));if(j.every(Y=>L[Y]!==void 0)&&nt.every(Y=>L[Y]===void 0))return{kind:I,organizations:L.organizations,...j.reduce((Y,Rt)=>(Y[Rt]=L[Rt],Y),{})}}throw new Error("is not a valid credential")}function et(L){var u,I,j;const nt=(j=L.getOptionalString("host"))!==null&&j!==void 0?j:N;let Y=(u=L.getOptionalConfigArray("credentials"))===null||u===void 0?void 0:u.map(Ht=>{var Vt,ae;return{organizations:Ht.getOptionalStringArray("organizations"),personalAccessToken:(Vt=Ht.getOptionalString("personalAccessToken"))===null||Vt===void 0?void 0:Vt.trim(),tenantId:Ht.getOptionalString("tenantId"),clientId:Ht.getOptionalString("clientId"),clientSecret:(ae=Ht.getOptionalString("clientSecret"))===null||ae===void 0?void 0:ae.trim()}});const Rt=(I=L.getOptionalString("token"))===null||I===void 0?void 0:I.trim();if(L.getOptional("credential")!==void 0&&L.getOptional("credentials")!==void 0)throw new Error("Invalid Azure integration config, 'credential' and 'credentials' cannot be used together. Use 'credentials' instead.");if(L.getOptional("token")!==void 0&&L.getOptional("credentials")!==void 0)throw new Error("Invalid Azure integration config, 'token' and 'credentials' cannot be used together. Use 'credentials' instead.");if(Rt!==void 0){const Ht=[{personalAccessToken:Rt}];var qt;Y=(qt=Y==null?void 0:Y.concat(Ht))!==null&&qt!==void 0?qt:Ht}if(L.getOptional("credential")!==void 0){var $t,he;const Ht=[{organizations:L.getOptionalStringArray("credential.organizations"),token:($t=L.getOptionalString("credential.token"))===null||$t===void 0?void 0:$t.trim(),tenantId:L.getOptionalString("credential.tenantId"),clientId:L.getOptionalString("credential.clientId"),clientSecret:(he=L.getOptionalString("credential.clientSecret"))===null||he===void 0?void 0:he.trim()}];var ue;Y=(ue=Y==null?void 0:Y.concat(Ht))!==null&&ue!==void 0?ue:Ht}if(!(0,i.HO)(nt))throw new Error(`Invalid Azure integration config, '${nt}' is not a valid host`);let se;if(Y!==void 0){const Ht=Y==null?void 0:Y.reduce((Vt,ae,Pe)=>{let Te;try{_(ae)}catch(He){Te=He.message}return Te!==void 0&&Vt.push(`credential at position ${Pe+1} ${Te}`),Vt},Array.of()).concat(Object.entries(Y.filter(Vt=>Vt.organizations!==void 0&&Vt.organizations.length>0).reduce((Vt,ae,Pe)=>{var Te;return(Te=ae.organizations)===null||Te===void 0||Te.forEach(He=>{Vt[He]||(Vt[He]=[]),Vt[He].push(Pe+1)}),Vt},{})).filter(([Vt,ae])=>ae.length>1).reduce((Vt,[ae,Pe])=>(Vt.push(`organization ${ae} is specified multiple times in credentials at positions ${Pe.slice(0,Pe.length-1).join(", ")} and ${Pe[Pe.length-1]}`),Vt),Array.of()));if((Ht==null?void 0:Ht.length)>0)throw new Error(`Invalid Azure integration config for ${nt}: ${Ht.join("; ")}`);if(se=Y.map(Vt=>_(Vt)),se.some(Vt=>Vt.kind!=="PersonalAccessToken")&&nt!==N)throw new Error(`Invalid Azure integration config for ${nt}, only personal access tokens can be used with hosts other than ${N}`);if(se.filter(Vt=>Vt.organizations===void 0||Vt.organizations.length===0).length>1)throw new Error(`Invalid Azure integration config for ${nt}, you cannot specify multiple credentials without organizations`)}return{host:nt,credentials:se}}function q(L){const u=L.map(et);return u.some(I=>I.host===N)||u.push({host:N}),u}class ut{get type(){return"azure"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(u){const{url:I,base:j}=u;if((0,i.AY)(I))return I;try{const Y=V.fromRepoUrl(j),Rt=new URL(j);var nt;const qt=new URL(`https://a.com${(nt=Y.getPath())!==null&&nt!==void 0?nt:""}`),$t=new URL(I,qt).pathname;return Rt.searchParams.set("path",$t),u.lineNumber&&(Rt.searchParams.set("line",String(u.lineNumber)),Rt.searchParams.set("lineEnd",String(u.lineNumber+1)),Rt.searchParams.set("lineStartColumn","1"),Rt.searchParams.set("lineEndColumn","1")),Rt.toString()}catch{return new URL(I,j).toString()}}resolveEditUrl(u){return u}constructor(u){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=u}}(0,o._)(ut,"factory",({config:L})=>{var u;const I=q((u=L.getOptionalConfigArray("integrations.azure"))!==null&&u!==void 0?u:[]);return(0,i.oS)(I.map(j=>new ut(j)),j=>j.config.host)});var dt=t(52536),Ot=t.n(dt);const ht="bitbucket.org",ct="https://api.bitbucket.org/2.0";function lt(L){var u;const I=ht,j=ct,nt=L.getString("username"),Y=(u=L.getString("appPassword"))===null||u===void 0?void 0:u.trim();return{host:I,apiBaseUrl:j,username:nt,appPassword:Y}}function ft(L){const u=L.map(lt);return u.length===0&&u.push({host:ht,apiBaseUrl:ct}),u}class Et{get type(){return"bitbucketCloud"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(u){const I=(0,i.ku)(u);if(u.lineNumber){const j=new URL(I);return j.hash=`lines-${u.lineNumber}`,j.toString()}return I}resolveEditUrl(u){const I=Ot()(u),j=new URL(u);return j.searchParams.set("mode","edit"),j.searchParams.set("at",I.ref),j.toString()}constructor(u){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=u}}(0,o._)(Et,"factory",({config:L})=>{var u;const I=ft((u=L.getOptionalConfigArray("integrations.bitbucketCloud"))!==null&&u!==void 0?u:[]);return(0,i.oS)(I.map(j=>new Et(j)),j=>j.config.host)});var mt=t(45250);const wt="bitbucket.org",vt="https://api.bitbucket.org/2.0";function it(L){var u,I,j;const nt=(j=L.getOptionalString("host"))!==null&&j!==void 0?j:wt;let Y=L.getOptionalString("apiBaseUrl");const Rt=(u=L.getOptionalString("token"))===null||u===void 0?void 0:u.trim(),qt=L.getOptionalString("username"),$t=(I=L.getOptionalString("appPassword"))===null||I===void 0?void 0:I.trim();if(!(0,i.HO)(nt))throw new Error(`Invalid Bitbucket integration config, '${nt}' is not a valid host`);return Y?Y=(0,mt.trimEnd)(Y,"/"):nt===wt?Y=vt:Y=`https://${nt}/rest/api/1.0`,{host:nt,apiBaseUrl:Y,token:Rt,username:qt,appPassword:$t}}function gt(L){const u=L.map(it);return u.some(I=>I.host===wt)||u.push({host:wt,apiBaseUrl:vt}),u}class pt{get type(){return"bitbucket"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(u){const I=(0,i.ku)(u);if(!u.lineNumber)return I;const j=new URL(I);return this.integrationConfig.host==="bitbucket.org"?j.hash=`lines-${u.lineNumber}`:j.hash=`${u.lineNumber}`,j.toString()}resolveEditUrl(u){const I=Ot()(u),j=new URL(u);return j.searchParams.set("mode","edit"),j.searchParams.set("spa","0"),j.searchParams.set("at",I.ref),j.toString()}constructor(u){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=u}}(0,o._)(pt,"factory",({config:L})=>{var u,I,j;const nt=gt((j=L.getOptionalConfigArray("integrations.bitbucket"))!==null&&j!==void 0?j:[...(u=L.getOptionalConfigArray("integrations.bitbucketCloud"))!==null&&u!==void 0?u:[],...(I=L.getOptionalConfigArray("integrations.bitbucketServer"))!==null&&I!==void 0?I:[]]);return(0,i.oS)(nt.map(Y=>new pt(Y)),Y=>Y.config.host)});function Pt(L){var u;const I=L.getString("host");let j=L.getOptionalString("apiBaseUrl");const nt=(u=L.getOptionalString("token"))===null||u===void 0?void 0:u.trim(),Y=L.getOptionalString("username"),Rt=L.getOptionalString("password");if(!(0,i.HO)(I))throw new Error(`Invalid Bitbucket Server integration config, '${I}' is not a valid host`);return j?j=(0,mt.trimEnd)(j,"/"):j=`https://${I}/rest/api/1.0`,{host:I,apiBaseUrl:j,token:nt,username:Y,password:Rt}}function xt(L){return L.map(Pt)}class W{get type(){return"bitbucketServer"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(u){const I=(0,i.ku)(u);if(u.lineNumber){const j=new URL(I);return j.hash=u.lineNumber.toString(),j.toString()}return I}resolveEditUrl(u){return u.includes("?")?u.substring(0,u.indexOf("?")):u}constructor(u){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=u}}(0,o._)(W,"factory",({config:L})=>{var u;const I=xt((u=L.getOptionalConfigArray("integrations.bitbucketServer"))!==null&&u!==void 0?u:[]);return(0,i.oS)(I.map(j=>new W(j)),j=>j.config.host)});function G(L){var u;const I=L.getString("host");let j=L.getOptionalString("baseUrl"),nt=L.getOptionalString("cloneUrl"),Y=L.getOptionalString("gitilesBaseUrl");const Rt=L.getOptionalString("username"),qt=(u=L.getOptionalString("password"))===null||u===void 0?void 0:u.trim();if((0,i.HO)(I)){if(j&&!(0,i.AY)(j))throw new Error(`Invalid Gerrit integration config, '${j}' is not a valid baseUrl`);if(nt&&!(0,i.AY)(nt))throw new Error(`Invalid Gerrit integration config, '${nt}' is not a valid cloneUrl`);if(Y&&!(0,i.AY)(Y))throw new Error(`Invalid Gerrit integration config, '${Y}' is not a valid gitilesBaseUrl`)}else throw new Error(`Invalid Gerrit integration config, '${I}' is not a valid host`);return j?j=(0,mt.trimEnd)(j,"/"):j=`https://${I}`,Y?Y=(0,mt.trimEnd)(Y,"/"):Y=`https://${I}`,nt?nt=(0,mt.trimEnd)(nt,"/"):nt=j,{host:I,baseUrl:j,cloneUrl:nt,gitilesBaseUrl:Y,username:Rt,password:qt}}function At(L){return L.map(G)}var St=t(1048).hp;const Ut=")]}'";function Tt(L,u){const I=new URL(L.gitilesBaseUrl),j=new URL(u),Y=j.pathname.substring(j.pathname.startsWith("/a/")?2:0).replace(I.pathname,"").split("/").filter(se=>!!se),Rt=Y.indexOf("+");if(Rt<=0)throw new Error(`Unable to parse project from url: ${u}`);const qt=(0,mt.trimStart)(Y.slice(0,Rt).join("/"),"/"),$t=Y.indexOf("heads");if($t<=0)throw new Error(`Unable to parse branch from url: ${u}`);const he=Y[$t+1],ue=Y.slice($t+2).join("/");return{branch:he,filePath:ue===""?"/":ue,project:qt}}function It(L,u,I,j){return`${L.gitilesBaseUrl}/${u}/+/refs/heads/${I}/${(0,mt.trimStart)(j,"/")}`}function Nt(L,u,I,j){const nt=j==="/"||j===""?".tar.gz":`/${j}.tar.gz`;return`${Ft(L)}/${u}/+archive/refs/heads/${I}${nt}`}function bt(L){return L.password?"/a/":"/"}function Ft(L){if(!L.baseUrl||!L.gitilesBaseUrl)throw new Error("Unexpected Gerrit config values. baseUrl or gitilesBaseUrl not set.");if(L.gitilesBaseUrl.startsWith(L.baseUrl))return L.gitilesBaseUrl.replace(L.baseUrl.concat("/"),L.baseUrl.concat(bt(L)));if(L.password)throw new Error("Since the baseUrl (Gerrit) is not part of the gitilesBaseUrl, an authentication URL could not be constructed.");return L.gitilesBaseUrl}function Jt(L,u){const{branch:I,project:j}=Tt(L,u);return`${L.baseUrl}${bt(L)}projects/${encodeURIComponent(j)}/branches/${I}`}function ge(L,u){const{project:I}=Tt(L,u);return`${L.cloneUrl}${bt(L)}${I}`}function ce(L,u){const{branch:I,filePath:j,project:nt}=Tt(L,u);return`${L.baseUrl}${bt(L)}projects/${encodeURIComponent(nt)}/branches/${I}/files/${encodeURIComponent(j)}/content`}function de(L){return`${L.baseUrl}${bt(L)}projects/`}function zt(L){const u={};if(!L.password)return u;const I=St.from(`${L.username}:${L.password}`,"utf8");return u.Authorization=`Basic ${I.toString("base64")}`,{headers:u}}async function Xt(L){const u=await L.text();if(u.startsWith(Ut))try{return JSON.parse(u.slice(Ut.length))}catch(I){throw new Error(`Invalid response from Gerrit: ${u.slice(0,10)} - ${I}`)}throw new Error(`Gerrit JSON body prefix missing. Found: ${u.slice(0,10)}`)}class me{get type(){return"gerrit"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(u){const{url:I,base:j,lineNumber:nt}=u;let Y;if(I.startsWith("/")){const{branch:Rt,project:qt}=Tt(this.config,j);return It(this.config,qt,Rt,I)}return I?Y=new URL(I,j):Y=new URL(j),nt&&(Y.hash=nt.toString()),Y.toString()}resolveEditUrl(u){return u}constructor(u){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=u}}(0,o._)(me,"factory",({config:L})=>{var u;const I=At((u=L.getOptionalConfigArray("integrations.gerrit"))!==null&&u!==void 0?u:[]);return(0,i.oS)(I.map(j=>new me(j)),j=>j.config.host)});var Ne=t(36021);const je="gitlab.com",Ge="https://gitlab.com/api/v4";function we(L){var u;const I=L.getString("host");let j=L.getOptionalString("apiBaseUrl");const nt=(u=L.getOptionalString("token"))===null||u===void 0?void 0:u.trim();let Y=L.getOptionalString("baseUrl");if(j?j=(0,mt.trimEnd)(j,"/"):I===je&&(j=Ge),Y?Y=(0,mt.trimEnd)(Y,"/"):Y=`https://${I}`,(0,i.HO)(I)){if(!j||!(0,i.AY)(j))throw new Error(`Invalid GitLab integration config, '${j}' is not a valid apiBaseUrl`);if(!(0,i.AY)(Y))throw new Error(`Invalid GitLab integration config, '${Y}' is not a valid baseUrl`)}else throw new Error(`Invalid GitLab integration config, '${I}' is not a valid host`);return{host:I,token:nt,apiBaseUrl:j,baseUrl:Y}}function an(L){const u=L.map(we);return u.some(I=>I.host===je)||u.push({host:je,apiBaseUrl:Ge,baseUrl:`https://${je}`}),u}function en(L){let u="";return L.host!==je&&(u=new URL(L.baseUrl).pathname),trimEnd(u,"/")}class re{get type(){return"gitlab"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(u){return(0,i.ku)(u)}resolveEditUrl(u){return We(u,"edit")}constructor(u){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=u}}(0,o._)(re,"factory",({config:L})=>{var u;const I=an((u=L.getOptionalConfigArray("integrations.gitlab"))!==null&&u!==void 0?u:[]);return(0,i.oS)(I.map(j=>new re(j)),j=>j.config.host)});function We(L,u){return L.replace(/\/\-\/(blob|tree|edit)\//,`/-/${u}/`)}function ke(L){var u;const I=L.getString("host");let j=L.getOptionalString("baseUrl");const nt=L.getOptionalString("username"),Y=(u=L.getOptionalString("password"))===null||u===void 0?void 0:u.trim();if((0,i.HO)(I)){if(j&&!(0,i.AY)(j))throw new Error(`Invalid Gitea integration config, '${j}' is not a valid baseUrl`)}else throw new Error(`Invalid Gitea integration config, '${I}' is not a valid host`);return j?j=(0,mt.trimEnd)(j,"/"):j=`https://${I}`,{host:I,baseUrl:j,username:nt,password:Y}}var nn=t(1048).hp;function Ye(L,u){const I=pe(L,u);return`${I.url}/${I.owner}/${I.name}/_edit/${I.ref}/${I.path}`}function Ae(L,u){const I=pe(L,u);return`${I.url}/api/v1/repos/${I.owner}/${I.name}/contents/${I.path}?ref=${I.ref}`}function ln(L,u){const I=pe(L,u);return`${I.url}/api/v1/repos/${I.owner}/${I.name}/archive/${I.ref}.tar.gz`}function cn(L,u){const I=pe(L,u);return`${I.url}/api/v1/repos/${I.owner}/${I.name}/git/commits/${I.ref}`}function dn(L){const u={},{username:I,password:j}=L;return j?(I?u.Authorization=`basic ${nn.from(`${I}:${j}`).toString("base64")}`:u.Authorization=`token ${j}`,{headers:u}):u}function pe(L,u){var I;const j=(I=L.baseUrl)!==null&&I!==void 0?I:`https://${L.host}`;try{const[nt,Y,Rt,qt,$t,he,...ue]=u.replace(j,"").split("/"),se=ue.join("/").replace(/^\//,"");return{url:j,owner:Y,name:Rt,ref:he,path:se}}catch(nt){throw new Error(`Incorrect URL: ${u}, ${nt}`)}}class De{get type(){return"gitea"}get title(){return this.config.host}resolveUrl(u){return(0,i.ku)(u)}resolveEditUrl(u){return Ye(this.config,u)}constructor(u){(0,o._)(this,"config",void 0),this.config=u}}(0,o._)(De,"factory",({config:L})=>{var u;const j=((u=L.getOptionalConfigArray("integrations.gitea"))!==null&&u!==void 0?u:[]).map(nt=>ke(nt));return(0,i.oS)(j.map(nt=>new De(nt)),nt=>nt.config.host)});function Qe(L){const u=L.getString("host"),I=L.getOptionalString("token"),j=L.getOptionalString("apiKey");if(!(0,i.HO)(u))throw new Error(`Invalid Harness Code integration config, '${u}' is not a valid host`);return{host:u,apiKey:j,token:I}}function Ze(L,u){const I=on(L,u);return`${I.baseUrl}/ng/account/${I.accountId}/module/code/orgs/${I.orgName}/projects/${I.projectName}/${I.repoName}/files/${I.branch}/~/${I.path}`}function Be(L,u){const I=on(L,u);return`${I.baseUrl}/gateway/code/api/v1/repos/${I.accountId}/${I.orgName}/${I.projectName}/${I.repoName}/+/raw/${I.path}?routingId=${I.accountId}&git_ref=refs/heads/${I.refString}`}function Ke(L,u){const I=on(L,u);return`${I.baseUrl}/gateway/code/api/v1/repos/${I.accountId}/${I.orgName}/${I.projectName}/${I.repoName}/+/archive/${I.branch}.zip?routingId=${I.accountId}`}function un(L,u){const I=on(L,u);return`${I.baseUrl}/gateway/code/api/v1/repos/${I.accountId}/${I.orgName}/${I.projectName}/${I.repoName}/+/content?routingId=${I.accountId}&include_commit=true&git_ref=refs/heads/${I.branch}`}function Tn(L){const u={},{token:I,apiKey:j}=L;return j?u["x-api-key"]=j:I&&(u.Authorization=`Bearer ${I}`),{headers:u}}function on(L,u){const I=`https://${L.host}`;try{const j=new URL(u),nt=j.pathname.split("/").filter(Ue=>Ue!==""),Y=j.pathname.split("/"),[Rt,qt,$t,he,ue,se,Ht,Vt,ae,Pe,Te,He,Gt,Xe,...fn]=nt,ze=Y.slice(Y.findIndex(Ue=>Ue==="files"||Ue==="edit")+1),_e=ze.findIndex(Ue=>Ue==="~"),Mn=ze.slice(0,_e).join("/"),Ln=_e!==-1?ze.slice(_e+1).join("/").replace(/^\//,""):"";return{baseUrl:I,accountId:$t,orgName:Ht,projectName:ae,refString:Mn,path:Ln,repoName:Te,refDashStr:ze.slice(0,_e).join("-"),branch:_e!==-1?ze.slice(0,_e).join("/"):ze.join("/")}}catch(j){throw new Error(`Incorrect URL: ${u}, ${j}`)}}class Je{get type(){return"harness"}get title(){return this.config.host}resolveUrl(u){return(0,i.ku)(u)}resolveEditUrl(u){return Ze(this.config,u)}constructor(u){(0,o._)(this,"config",void 0),this.config=u}}(0,o._)(Je,"factory",({config:L})=>{var u;const j=((u=L.getOptionalConfigArray("integrations.harness"))!==null&&u!==void 0?u:[]).map(nt=>Qe(nt));return(0,i.oS)(j.map(nt=>new Je(nt)),nt=>nt.config.host)});class hn{static fromConfig(u){return new hn({awsS3:v.factory({config:u}),awsCodeCommit:E.factory({config:u}),azure:ut.factory({config:u}),bitbucket:pt.factory({config:u}),bitbucketCloud:Et.factory({config:u}),bitbucketServer:W.factory({config:u}),gerrit:me.factory({config:u}),github:Ne.U.factory({config:u}),gitlab:re.factory({config:u}),gitea:De.factory({config:u}),harness:Je.factory({config:u})})}get awsS3(){return this.byType.awsS3}get awsCodeCommit(){return this.byType.awsCodeCommit}get azure(){return this.byType.azure}get bitbucket(){return this.byType.bitbucket}get bitbucketCloud(){return this.byType.bitbucketCloud}get bitbucketServer(){return this.byType.bitbucketServer}get gerrit(){return this.byType.gerrit}get github(){return this.byType.github}get gitlab(){return this.byType.gitlab}get gitea(){return this.byType.gitea}get harness(){return this.byType.harness}list(){return Object.values(this.byType).flatMap(u=>u.list())}byUrl(u){let I=Object.values(this.byType).map(j=>j.byUrl(u)).filter(Boolean);if(I.length>1){const j=I.filter(nt=>!(nt instanceof pt));j.length!==0&&(I=j)}return I[0]}byHost(u){return Object.values(this.byType).map(I=>I.byHost(u)).find(Boolean)}resolveUrl(u){const I=this.byUrl(u.base);return I?I.resolveUrl(u):(0,i.ku)(u)}resolveEditUrl(u){const I=this.byUrl(u);return I?I.resolveEditUrl(u):u}constructor(u){(0,o._)(this,"byType",void 0),this.byType=u}}var Rn=t(55309);class In{static fromConfig(u){return hn.fromConfig(u)}}const Dn=(0,Rn.y)({id:"integration.scmintegrations"})},36021:function(Z,T,t){"use strict";t.d(T,{U:function(){return C},F:function(){return E}});var o=t(18990),i=t(59869),d=t(45250);const O="github.com",m="https://api.github.com",v="https://raw.githubusercontent.com";function f(w){var h,S,p;const B=(p=w.getOptionalString("host"))!==null&&p!==void 0?p:O;let P=w.getOptionalString("apiBaseUrl"),A=w.getOptionalString("rawBaseUrl");const U=(h=w.getOptionalString("token"))===null||h===void 0?void 0:h.trim(),M=(S=w.getOptionalConfigArray("apps"))===null||S===void 0?void 0:S.map(x=>({appId:x.getNumber("appId"),clientId:x.getString("clientId"),clientSecret:x.getString("clientSecret"),webhookSecret:x.getString("webhookSecret"),privateKey:x.getString("privateKey"),allowedInstallationOwners:x.getOptionalStringArray("allowedInstallationOwners")}));if(!(0,i.HO)(B))throw new Error(`Invalid GitHub integration config, '${B}' is not a valid host`);return P?P=(0,d.trimEnd)(P,"/"):B===O&&(P=m),A?A=(0,d.trimEnd)(A,"/"):B===O&&(A=v),{host:B,apiBaseUrl:P,rawBaseUrl:A,token:U,apps:M}}function c(w){const h=w.map(f);return h.some(S=>S.host===O)||h.push({host:O,apiBaseUrl:m,rawBaseUrl:v}),h}class C{get type(){return"github"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(h){return E((0,i.ku)(h),"tree")}resolveEditUrl(h){return E(h,"edit")}parseRateLimitInfo(h){return{isRateLimited:h.status===429||h.status===403&&h.headers.get("x-ratelimit-remaining")==="0"}}constructor(h){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=h}}(0,o._)(C,"factory",({config:w})=>{var h;const S=c((h=w.getOptionalConfigArray("integrations.github"))!==null&&h!==void 0?h:[]);return(0,i.oS)(S.map(p=>new C(p)),p=>p.config.host)});function E(w,h){return w.replace(/\/\/([^/]+)\/([^/]+)\/([^/]+)\/(blob|tree|edit)\//,(S,p,B,P)=>`//${p}/${B}/${P}/${h}/`)}},59869:function(Z,T,t){"use strict";t.d(T,{AY:function(){return v},HO:function(){return m},ku:function(){return c},oS:function(){return f}});var o=t(52536),i=t.n(o),d=t(45250),O=t.n(d);function m(E){const w=new URL("http://example.com");return w.host=E,w.host===E}function v(E){try{return new URL(E),!0}catch{return!1}}function f(E,w){return{list(){return E},byUrl(h){try{const S=typeof h=="string"?new URL(h):h;return E.find(p=>w(p)===S.host)}catch{return}},byHost(h){return E.find(S=>w(S)===h)}}}function c(E){const{url:w,base:h,lineNumber:S}=E;try{return new URL(w),w}catch{}let p;if(w.startsWith("/")){const{href:B,filepath:P}=i()(h);p=new URL(B);const A=(0,d.trimEnd)(p.pathname.substring(0,p.pathname.length-P.length),"/");p.pathname=`${A}${w}`}else p=new URL(w,h);return p.search=new URL(h).search,S&&(p.hash=`L${S}`),p.toString()}function C(E){beforeAll(()=>E.listen({onUnhandledRequest:"error"})),afterAll(()=>E.close()),afterEach(()=>E.resetHandlers())}},85318:function(Z,T,t){"use strict";var o={};t.r(o),t.d(o,{TechDocsPlugin:function(){return v.Ju}});var i=t(31085),d=t(14041),O=t(25873),m=t(18690),v=t(39278),f=t(85920),c=t(72020),C=t(99730),E=t(64947),w=t(12173),h=t(22020),S=t(68146),p=t(73970);function B({children:r}){return(0,m.Ri)()?(0,i.jsx)(i.Fragment,{children:r}):(0,i.jsx)(m.fS,{children:r})}const P=()=>(0,i.jsx)(w.M,{status:"404",statusMessage:"PAGE NOT FOUND"}),A=({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)(B,{children:(0,i.jsx)(w.M,{statusMessage:n,stack:e.stack})})},U=({error:r,resetError:e,plugin:n})=>(0,i.jsx)(h.b,{title:`Error in ${n==null?void 0:n.getId()}`,defaultExpanded:!0,error:r,children:(0,i.jsx)(E.A,{variant:"outlined",onClick:e,children:"Retry"})}),M={Progress:S.k,Router:p.Kd,NotFoundErrorPage:P,BootErrorPage:A,ErrorBoundaryFallback:U};var x=t(18990);const K="Invalid discovery URL pattern,";class H{static compile(e){const n=e.split(/\{\{\s*pluginId\s*\}\}/),s=n.join("pluginId");let a;try{a=new URL(s)}catch{throw new Error(`${K} URL '${s}' is invalid`)}if(a.hash)throw new Error(`${K} URL must not have a hash`);if(a.search)throw new Error(`${K} URL must not have a query`);if(s.endsWith("/"))throw new Error(`${K} URL must not end with a slash`);return new H(n)}async getBaseUrl(e){return this.parts.join(encodeURIComponent(e))}constructor(e){(0,x._)(this,"parts",void 0),this.parts=e}}var V=t(96403),N=t.n(V);let z=Symbol.observable;class J{[z](){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,x._)(this,"isClosed",!1),(0,x._)(this,"terminatingError",void 0),(0,x._)(this,"observable",new(N())(e=>this.isClosed?(this.terminatingError?e.error(this.terminatingError):e.complete(),()=>{}):(this.subscribers.add(e),()=>{this.subscribers.delete(e)}))),(0,x._)(this,"subscribers",new Set)}}let _=Symbol.observable;class et{[_](){return this}get closed(){return this.isClosed}next(e){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.currentValue=e,this.subscribers.forEach(n=>n.next(e))}error(e){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.terminatingError=e,this.subscribers.forEach(n=>n.error(e))}complete(){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.subscribers.forEach(e=>e.complete())}subscribe(e,n,s){const a=typeof e=="function"?{next:e,error:n,complete:s}:e;return this.observable.subscribe(a)}constructor(e){(0,x._)(this,"isClosed",void 0),(0,x._)(this,"currentValue",void 0),(0,x._)(this,"terminatingError",void 0),(0,x._)(this,"observable",void 0),(0,x._)(this,"subscribers",new Set),this.isClosed=!1,this.currentValue=e,this.terminatingError=void 0,this.observable=new(N())(n=>this.isClosed?(this.terminatingError?n.error(this.terminatingError):n.complete(),()=>{}):(n.next(this.currentValue),this.subscribers.add(n),()=>{this.subscribers.delete(n)}))}}class q{post(e){this.subject.next(e)}alert$(){return this.subject}constructor(){(0,x._)(this,"subject",new J)}}class ut{captureEvent(e){}}class dt{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,x._)(this,"alertApi",void 0),(0,x._)(this,"errorApi",void 0),this.alertApi=e,this.errorApi=n}}class Ot{post(e,n){this.subject.next({error:e,context:n})}error$(){return this.subject}constructor(){(0,x._)(this,"subject",new J)}}class ht{static forward(e,n){window.addEventListener("unhandledrejection",s=>{e.post(s.reason,n)})}}const ct=new Map;class lt{static create(e){var n;return new lt((n=e.namespace)!==null&&n!==void 0?n:"",e.errorApi)}static addStorageEventListener(){window.addEventListener("storage",e=>{for(const[s,a]of ct.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,b)=>(typeof b=="object"&&b!==null&&Object.freeze(b),b)),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 ct.has(n)||ct.set(n,new lt(n,this.errorApi)),ct.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 lt.hasSubscribed||(lt.addStorageEventListener(),lt.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,x._)(this,"namespace",void 0),(0,x._)(this,"errorApi",void 0),(0,x._)(this,"subscribers",void 0),(0,x._)(this,"observable",void 0),this.namespace=e,this.errorApi=n,this.subscribers=new Set,this.observable=new(N())(s=>(this.subscribers.add(s),()=>{this.subscribers.delete(s)}))}}(0,x._)(lt,"hasSubscribed",!1);function ft(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 Et{static create(e){var n,s;const a=mt(e),l=((n=e.header)===null||n===void 0?void 0:n.name)||"authorization",b=((s=e.header)===null||s===void 0?void 0:s.value)||(y=>`Bearer ${y}`);return new Et(e.identityApi,a,l,b)}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,x._)(this,"identityApi",void 0),(0,x._)(this,"allowUrl",void 0),(0,x._)(this,"headerName",void 0),(0,x._)(this,"headerValue",void 0),this.identityApi=e,this.allowUrl=n,this.headerName=s,this.headerValue=a}}function mt(r){return r.allowUrl?r.allowUrl:r.urlPrefixAllowlist?wt(r.urlPrefixAllowlist):r.config?wt([r.config.getString("backend.baseUrl")]):()=>!1}function wt(r){const e=r.map(n=>n.replace(/\/$/,""));return n=>e.some(s=>n===s||n.startsWith(`${s}/`))}function vt(r,e){return!e||e==="/"?r:`${r.replace(/\/$/,"")}/${e.replace(/^\//,"")}`}class it{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:b,pathname:y,search:D,hash:F,username:Q,password:st}=new URL(`http://${a.url.substring(l.length)}`);let ot=await this.discoveryApi.getBaseUrl(b);if(Q||st){const yt=new URL(ot),jt=`${Q}${st?`:${st}`:""}@`;ot=`${yt.protocol}//${jt}${yt.host}${yt.pathname}`}const at=`${vt(ot,y)}${D}${F}`;return e(at,typeof n=="string"||gt(n)?s:n)}}constructor(e){(0,x._)(this,"discoveryApi",void 0),this.discoveryApi=e}}function gt(r){return typeof r=="object"&&(r==null?void 0:r.constructor)===URL}class pt{static resolvePluginProtocol(e){return new it(e.discoveryApi)}static injectIdentityAuth(e){return Et.create(e)}constructor(){}}function Pt(r,e){for(const n of e)if(!r.has(n))return!1;return!0}function xt(r,...e){const n=new Set(r);for(const s of e)for(const a of s)n.add(a);return n}class W{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=>Pt(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)=>xt(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,x._)(this,"requests",[]),(0,x._)(this,"subject",new et(this.getCurrentPending()))}}class G{createAuthRequester(e){const n=new W,s=this.handlerCount;return this.handlerCount++,n.pending().subscribe({next:a=>{const l=this.currentRequests.slice(),b=this.makeAuthRequest(a,e);b?l[s]=b: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,x._)(this,"subject",new et([])),(0,x._)(this,"currentRequests",[]),(0,x._)(this,"handlerCount",0)}}function At(r){return new Promise((e,n)=>{const s=r.width||500,a=r.height||700,l=window.screen.width/2-s/2,b=window.screen.height/2-a/2,y=window.open(r.url,r.name,`menubar=no,location=no,resizable=no,scrollbars=no,status=no,width=${s},height=${a},top=${b},left=${l}`);let D="";if(!y||typeof y.closed=="undefined"||y.closed){const ot=new Error("Failed to open auth popup.");ot.name="PopupRejectedError",n(ot);return}const F=ot=>{if(ot.source!==y||ot.origin!==r.origin)return;const{data:at}=ot;if(at.type==="config_info"){D=at.targetOrigin;return}if(at.type!=="authorization_response")return;const yt=at;if("error"in yt){const jt=new Error(yt.error.message);jt.name=yt.error.name,n(jt)}else e(yt.response);st()},Q=setInterval(()=>{if(y.closed){const ot=`Login failed, ${D&&D!==window.location.origin?`Incorrect app origin, expected ${D}`:"popup was closed"}`,at=new Error(ot);at.name="PopupClosedError",n(at),st()}},100);function st(){window.removeEventListener("message",F),clearInterval(Q)}window.addEventListener("message",F)})}let St=!1;function Ut(r){return[...r].join(" ")}class Tt{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,b,y,D,F;const Q=this.joinScopesFunc(e),st=await this.buildUrl("/start",{scope:Q,origin:window.location.origin,flow:"popup"}),ot=!((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,at=!((y=this.popupOptions)===null||y===void 0||(b=y.size)===null||b===void 0)&&b.fullscreen?window.screen.height:((F=this.popupOptions)===null||F===void 0||(D=F.size)===null||D===void 0?void 0:D.height)||730,yt=await At({url:st,name:`${this.provider.title} Login`,origin:new URL(st).origin,width:ot,height:at});return await this.sessionTransform(yt)}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,x._)(this,"discoveryApi",void 0),(0,x._)(this,"environment",void 0),(0,x._)(this,"provider",void 0),(0,x._)(this,"joinScopesFunc",void 0),(0,x._)(this,"authRequester",void 0),(0,x._)(this,"sessionTransform",void 0),(0,x._)(this,"enableExperimentalRedirectFlow",void 0),(0,x._)(this,"popupOptions",void 0);const{configApi:n,discoveryApi:s,environment:a,provider:l,joinScopes:b=Ut,oauthRequestApi:y,sessionTransform:D=st=>st,popupOptions:F}=e;!St&&!n&&(console.warn("DEPRECATION WARNING: Authentication providers require a configApi instance to configure the authentication flow. Please provide one to the authentication provider constructor."),St=!0);var Q;this.enableExperimentalRedirectFlow=n&&(Q=n.getOptionalBoolean("enableExperimentalRedirectFlow"))!==null&&Q!==void 0?Q:!1,this.authRequester=y.createAuthRequester({provider:l,onAuthRequest:async st=>this.enableExperimentalRedirectFlow?this.executeRedirect(st):this.showPopup(st)}),this.discoveryApi=s,this.environment=a,this.provider=l,this.joinScopesFunc=b,this.sessionTransform=D,this.popupOptions=F}}function It(r,e){for(const n of e)if(!r.has(n))return!1;return!0}class Nt{sessionExistsAndHasScope(e,n){if(!e)return!1;if(!n||this.options.sessionScopes===void 0)return!0;const s=this.options.sessionScopes(e);return It(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,x._)(this,"options",void 0),this.options=e}}var bt=t(55309),Ft;(function(r){r.SignedIn="SignedIn",r.SignedOut="SignedOut"})(Ft||(Ft={}));const Jt=(0,bt.y)({id:"core.auth.google"}),ge=(0,bt.y)({id:"core.auth.github"}),ce=(0,bt.y)({id:"core.auth.okta"}),de=(0,bt.y)({id:"core.auth.gitlab"}),zt=(0,bt.y)({id:"core.auth.microsoft"}),Xt=(0,bt.y)({id:"core.auth.onelogin"}),me=(0,bt.y)({id:"core.auth.bitbucket"}),Ne=(0,bt.y)({id:"core.auth.bitbucket-server"}),je=(0,bt.y)({id:"core.auth.atlassian"}),Ge=(0,bt.y)({id:"core.auth.vmware-cloud"});class we{setIsSignedIn(e){this.signedIn!==e&&(this.signedIn=e,this.subject.next(this.signedIn?Ft.SignedIn:Ft.SignedOut))}sessionState$(){return this.subject}constructor(){(0,x._)(this,"subject",new et(Ft.SignedOut)),(0,x._)(this,"signedIn",!1)}}class an{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 It(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,x._)(this,"connector",void 0),(0,x._)(this,"helper",void 0),(0,x._)(this,"sessionScopesFunc",void 0),(0,x._)(this,"sessionShouldRefreshFunc",void 0),(0,x._)(this,"stateTracker",new we),(0,x._)(this,"refreshPromise",void 0),(0,x._)(this,"currentSession",void 0);const{connector:n,defaultScopes:s=new Set,sessionScopes:a,sessionShouldRefresh:l}=e;this.connector=n,this.sessionScopesFunc=a,this.sessionShouldRefreshFunc=l,this.helper=new Nt({sessionScopes:a,defaultScopes:s})}}const en={id:"oauth2",title:"Your Identity Provider",icon:()=>null};class re{static create(e){const{configApi:n,discoveryApi:s,environment:a="development",provider:l=en,oauthRequestApi:b,defaultScopes:y=[],scopeTransform:D=ot=>ot,popupOptions:F}=e,Q=new Tt({configApi:n,discoveryApi:s,environment:a,provider:l,oauthRequestApi:b,sessionTransform({backstageIdentity:ot,...at}){const yt={...at,providerInfo:{idToken:at.providerInfo.idToken,accessToken:at.providerInfo.accessToken,scopes:re.normalizeScopes(D,at.providerInfo.scope),expiresAt:at.providerInfo.expiresInSeconds?new Date(Date.now()+at.providerInfo.expiresInSeconds*1e3):void 0}};return ot&&(yt.backstageIdentity={token:ot.token,identity:ot.identity,expiresAt:ot.expiresInSeconds?new Date(Date.now()+ot.expiresInSeconds*1e3):void 0}),yt},popupOptions:F}),st=new an({connector:Q,defaultScopes:new Set(y),sessionScopes:ot=>ot.providerInfo.scopes,sessionShouldRefresh:ot=>{var at,yt;let jt=1/0;return!((at=ot.providerInfo)===null||at===void 0)&&at.expiresAt&&(jt=Math.min(jt,(ot.providerInfo.expiresAt.getTime()-Date.now())/1e3)),!((yt=ot.backstageIdentity)===null||yt===void 0)&&yt.expiresAt&&(jt=Math.min(jt,(ot.backstageIdentity.expiresAt.getTime()-Date.now())/1e3)),jt<60*5}});return new re({sessionManager:st,scopeTransform:D})}async signIn(){await this.getAccessToken()}async signOut(){await this.sessionManager.removeSession()}sessionState$(){return this.sessionManager.sessionState$()}async getAccessToken(e,n){const s=re.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,x._)(this,"sessionManager",void 0),(0,x._)(this,"scopeTransform",void 0),this.sessionManager=e.sessionManager,this.scopeTransform=e.scopeTransform}}const We={id:"google",title:"Google",icon:()=>null},ke="https://www.googleapis.com/auth/";class nn{static create(e){const{configApi:n,discoveryApi:s,oauthRequestApi:a,environment:l="development",provider:b=We,defaultScopes:y=["openid",`${ke}userinfo.email`,`${ke}userinfo.profile`]}=e;return re.create({configApi:n,discoveryApi:s,oauthRequestApi:a,provider:b,environment:l,defaultScopes:y,scopeTransform(D){return D.map(F=>F==="openid"?F:F==="profile"||F==="email"?`${ke}userinfo.${F}`:F.startsWith(ke)?F:`${ke}${F}`)}})}}const Ye={id:"microsoft",title:"Microsoft",icon:()=>null};class Ae{static create(e){return new Ae(e)}microsoftGraph(){return this.oauth2[Ae.MicrosoftGraphID]}static resourceForScopes(e){const n=[...new Set(e.split(" ").map(Ae.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:Ae.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 Ae.MicrosoftGraphID}}async getAccessToken(e,n){const s=e===void 0?Ae.MicrosoftGraphID:await Ae.resourceForScopes(Array.isArray(e)?e.join(" "):e);return s in this.oauth2||(this.oauth2[s]=re.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,x._)(this,"oauth2",void 0),(0,x._)(this,"configApi",void 0),(0,x._)(this,"environment",void 0),(0,x._)(this,"provider",void 0),(0,x._)(this,"oauthRequestApi",void 0),(0,x._)(this,"discoveryApi",void 0),(0,x._)(this,"scopeTransform",void 0);const{configApi:n,environment:s="development",provider:a=Ye,oauthRequestApi:l,discoveryApi:b,defaultScopes:y=["openid","offline_access","profile","email","User.Read"],scopeTransform:D=F=>F.concat("offline_access")}=e;this.configApi=n,this.environment=s,this.provider=a,this.oauthRequestApi=l,this.discoveryApi=b,this.scopeTransform=D,this.oauth2={[Ae.MicrosoftGraphID]:re.create({configApi:this.configApi,discoveryApi:this.discoveryApi,oauthRequestApi:this.oauthRequestApi,provider:this.provider,environment:this.environment,scopeTransform:this.scopeTransform,defaultScopes:y})}}}(0,x._)(Ae,"MicrosoftGraphID","00000003-0000-0000-c000-000000000000");const ln={id:"github",title:"GitHub",icon:()=>null};class cn{static create(e){const{configApi:n,discoveryApi:s,environment:a="development",provider:l=ln,oauthRequestApi:b,defaultScopes:y=["read:user"]}=e;return re.create({configApi:n,discoveryApi:s,oauthRequestApi:b,provider:l,environment:a,defaultScopes:y})}}const dn={id:"okta",title:"Okta",icon:()=>null},pe=new Set(["openid","profile","email","phone","address","groups","offline_access"]),De="okta.";class Qe{static create(e){const{configApi:n,discoveryApi:s,environment:a="development",provider:l=dn,oauthRequestApi:b,defaultScopes:y=["openid","email","profile","offline_access"]}=e;return re.create({configApi:n,discoveryApi:s,oauthRequestApi:b,provider:l,environment:a,defaultScopes:y,scopeTransform(D){return D.map(F=>pe.has(F)||F.startsWith(De)?F:`${De}${F}`)}})}}const Ze={id:"gitlab",title:"GitLab",icon:()=>null};class Be{static create(e){const{configApi:n,discoveryApi:s,environment:a="development",provider:l=Ze,oauthRequestApi:b,defaultScopes:y=["read_user"]}=e;return re.create({configApi:n,discoveryApi:s,oauthRequestApi:b,provider:l,environment:a,defaultScopes:y})}}const Ke={id:"onelogin",title:"onelogin",icon:()=>null},un=new Set(["openid","profile","email","phone","address","groups","offline_access"]),Tn="onelogin.";class on{static create(e){const{configApi:n,discoveryApi:s,environment:a="development",provider:l=Ke,oauthRequestApi:b}=e;return re.create({configApi:n,discoveryApi:s,oauthRequestApi:b,provider:l,environment:a,defaultScopes:["openid","email","profile","offline_access"],scopeTransform(y){return y.map(D=>un.has(D)||D.startsWith(Tn)?D:`${Tn}${D}`)}})}}const Je={id:"bitbucket",title:"Bitbucket",icon:()=>null};class hn{static create(e){const{configApi:n,discoveryApi:s,environment:a="development",provider:l=Je,oauthRequestApi:b,defaultScopes:y=["account"]}=e;return re.create({configApi:n,discoveryApi:s,oauthRequestApi:b,provider:l,environment:a,defaultScopes:y})}}const Rn={id:"bitbucketServer",title:"Bitbucket Server",icon:()=>null};class In{static create(e){const{configApi:n,discoveryApi:s,environment:a="development",provider:l=Rn,oauthRequestApi:b,defaultScopes:y=["PROJECT_ADMIN"]}=e;return re.create({configApi:n,discoveryApi:s,oauthRequestApi:b,provider:l,environment:a,defaultScopes:y})}}const Dn={id:"atlassian",title:"Atlassian",icon:()=>null};class L{static create(e){const{configApi:n,discoveryApi:s,environment:a="development",provider:l=Dn,oauthRequestApi:b}=e;return re.create({configApi:n,discoveryApi:s,oauthRequestApi:b,provider:l,environment:a})}}const u={id:"vmwareCloudServices",title:"VMware Cloud",icon:()=>null};class I{static create(e){const{configApi:n,discoveryApi:s,oauthRequestApi:a,environment:l="development",provider:b=u,defaultScopes:y=["openid"]}=e;return re.create({configApi:n,discoveryApi:s,oauthRequestApi:a,provider:b,environment:l,defaultScopes:y})}}var j=t(12935),nt=t(57405),Y=t(65461),Rt=t(36017),qt=t(99303),$t=t(39837);const he=(0,bt.y)({id:"core.storage"});var ue=t(70795),se=t(16009);const Ht=(0,bt.y)({id:"core.oauthrequest"});var Vt=t(96824),ae=t(70835),Pe=t(10288),Te=t.n(Pe),He=t(52964),Gt=t(46195),Xe=t(54241);const fn=Gt.z.lazy(()=>Gt.z.object({rule:Gt.z.string(),resourceType:Gt.z.string(),params:Gt.z.record(Gt.z.any()).optional()}).or(Gt.z.object({anyOf:Gt.z.array(fn).nonempty()})).or(Gt.z.object({allOf:Gt.z.array(fn).nonempty()})).or(Gt.z.object({not:fn}))),ze=Gt.z.object({result:Gt.z.literal(Xe.b.ALLOW).or(Gt.z.literal(Xe.b.DENY))}),_e=Gt.z.union([Gt.z.object({result:Gt.z.literal(Xe.b.ALLOW).or(Gt.z.literal(Xe.b.DENY))}),Gt.z.object({result:Gt.z.literal(Xe.b.CONDITIONAL),pluginId:Gt.z.string(),resourceType:Gt.z.string(),conditions:fn})]),Mn=(r,e)=>Gt.z.object({items:Gt.z.array(Gt.z.intersection(Gt.z.object({id:Gt.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 Ln{async authorize(e,n){return this.makeRequest(e,ze,n)}async authorizeConditional(e,n){return this.makeRequest(e,_e,n)}async makeRequest(e,n,s){if(!this.enabled)return e.map(Q=>({result:Xe.b.ALLOW}));const a={items:e.map(Q=>({id:He.A(),...Q}))},l=await this.discovery.getBaseUrl("permission"),b=await Te()(`${l}/authorize`,{method:"POST",body:JSON.stringify(a),headers:{...this.getAuthorizationHeader(s==null?void 0:s.token),"content-type":"application/json"}});if(!b.ok)throw await ae.o.fromResponse(b);const y=await b.json(),F=Mn(n,new Set(a.items.map(({id:Q})=>Q))).parse(y).items.reduce((Q,st)=>(Q[st.id]=st,Q),{});return a.items.map(Q=>F[Q.id])}getAuthorizationHeader(e){return e?{Authorization:`Bearer ${e}`}:{}}constructor(e){(0,x._)(this,"enabled",void 0),(0,x._)(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 Ue{static create(e){const{config:n,discovery:s,identity:a}=e,l=new Ln({discovery:s,config:n});return new Ue(l,a)}async authorize(e){return(await this.permissionClient.authorize([e],await this.identityApi.getCredentials()))[0]}constructor(e,n){(0,x._)(this,"permissionClient",void 0),(0,x._)(this,"identityApi",void 0),this.permissionClient=e,this.identityApi=n}}const Mo=[(0,j.b)({api:nt.I,deps:{configApi:Y.U},factory:({configApi:r})=>H.compile(`${r.getString("backend.baseUrl")}/api/{{ pluginId }}`)}),(0,j.b)({api:Rt.k,deps:{},factory:()=>new q}),(0,j.b)({api:qt.c,deps:{},factory:()=>new ut}),(0,j.b)({api:$t.m,deps:{alertApi:Rt.k},factory:({alertApi:r})=>{const e=new dt(r,new Ot);return ht.forward(e,{hidden:!1}),e}}),(0,j.b)({api:he,deps:{errorApi:$t.m},factory:({errorApi:r})=>lt.create({errorApi:r})}),(0,j.b)({api:ue.a,deps:{configApi:Y.U,identityApi:se.K,discoveryApi:nt.I},factory:({configApi:r,identityApi:e,discoveryApi:n})=>ft({middleware:[pt.resolvePluginProtocol({discoveryApi:n}),pt.injectIdentityAuth({identityApi:e,config:r})]})}),(0,j.b)({api:Ht,deps:{},factory:()=>new G}),(0,j.b)({api:Jt,deps:{discoveryApi:nt.I,oauthRequestApi:Ht,configApi:Y.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>nn.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,j.b)({api:zt,deps:{discoveryApi:nt.I,oauthRequestApi:Ht,configApi:Y.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>Ae.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,j.b)({api:ge,deps:{discoveryApi:nt.I,oauthRequestApi:Ht,configApi:Y.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>cn.create({configApi:n,discoveryApi:r,oauthRequestApi:e,defaultScopes:["read:user"],environment:n.getOptionalString("auth.environment")})}),(0,j.b)({api:ce,deps:{discoveryApi:nt.I,oauthRequestApi:Ht,configApi:Y.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>Qe.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,j.b)({api:de,deps:{discoveryApi:nt.I,oauthRequestApi:Ht,configApi:Y.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>Be.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,j.b)({api:Xt,deps:{discoveryApi:nt.I,oauthRequestApi:Ht,configApi:Y.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>on.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,j.b)({api:me,deps:{discoveryApi:nt.I,oauthRequestApi:Ht,configApi:Y.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>hn.create({configApi:n,discoveryApi:r,oauthRequestApi:e,defaultScopes:["account"],environment:n.getOptionalString("auth.environment")})}),(0,j.b)({api:Ne,deps:{discoveryApi:nt.I,oauthRequestApi:Ht,configApi:Y.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>In.create({configApi:n,discoveryApi:r,oauthRequestApi:e,defaultScopes:["REPO_READ"]})}),(0,j.b)({api:je,deps:{discoveryApi:nt.I,oauthRequestApi:Ht,configApi:Y.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>L.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,j.b)({api:Ge,deps:{discoveryApi:nt.I,oauthRequestApi:Ht,configApi:Y.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>I.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,j.b)({api:Vt.x,deps:{discovery:nt.I,identity:se.K,config:Y.U},factory:({config:r,discovery:e,identity:n})=>Ue.create({config:r,discovery:e,identity:n})})];var jn=t(14451),Bn=t(27799),qn=t(94389),Lo=t(20947),jo=t(20473),Bo=t(45917),Uo=t(39347),$o=t(63309),Fo=t(82451),No=t(85121),to=t(17400),Wo=t(42226),ko=t(69550),eo=t(52755),no=t(89350),Ko=t(8911),Un=t(33602),$n=t(48108),zo=t(77225),oo=t(55700),ro=t(71865);const so={brokenImage:Bn.A,catalog:Ko.A,scaffolder:Lo.A,techdocs:jo.A,search:Bo.A,chat:Uo.A,dashboard:$o.A,docs:Fo.A,email:No.A,github:Wo.A,group:Un.A,help:ko.A,"kind:api":to.A,"kind:component":no.A,"kind:domain":jn.A,"kind:group":Un.A,"kind:location":eo.A,"kind:system":qn.A,"kind:user":$n.A,"kind:resource":oo.A,"kind:template":ro.A,user:$n.A,warning:zo.A};var Ho=t(58733),_o=t(55288),Vo=t(91360),Go=t(50868),Fn=t(12285),Yo=t(88714),Nn=t(14360);Nn.A.configure(r=>`v5-${r}`);const Qo=(0,_o.A)({productionPrefix:"jss4-"});function io(r){const{children:e,theme:n,noCssBaseline:s=!1}=r,a=n.getTheme("v4"),l=n.getTheme("v5");let b;s||(b=(0,i.jsx)(Ho.Ay,{}));let y=(0,i.jsxs)(i.Fragment,{children:[b,e]});return a&&(y=(0,i.jsx)(Vo.Ay,{generateClassName:Qo,children:(0,i.jsx)(Go.A,{theme:a,children:y})})),l&&(y=(0,i.jsx)(Fn.A,{injectFirst:!0,children:(0,i.jsx)(Yo.A,{theme:l,children:y})})),y}const ao={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 Dt=t(96324),g=t(87081),R=t(33284),$=t(98392),k=t(56558);const X={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")`},tt={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 rt(r){const{colors:e,shape:n,options:s}=r,l=`linear-gradient(90deg, ${(e.length===1?[e[0],e[0]]:e).join(", ")})`,b=`${n}, ${l}`;var y;const D=(y=s==null?void 0:s.fontColor)!==null&&y!==void 0?y:"#FFFFFF";return{colors:e,shape:n,backgroundImage:b,fontColor:D}}const Ct={home:rt({colors:tt.teal,shape:X.wave}),documentation:rt({colors:tt.pinkSea,shape:X.wave2}),tool:rt({colors:tt.purpleSky,shape:X.round}),service:rt({colors:tt.marineBlue,shape:X.wave}),website:rt({colors:tt.veryBlue,shape:X.wave}),library:rt({colors:tt.rubyRed,shape:X.wave}),other:rt({colors:tt.darkGrey,shape:X.wave}),app:rt({colors:tt.toastyOrange,shape:X.wave}),apis:rt({colors:tt.teal,shape:X.wave2}),card:rt({colors:tt.greens,shape:X.wave})},Bt=16,Wt='"Helvetica Neue", Helvetica, Roboto, Arial, sans-serif',Yt="home",kt={htmlFontSize:Bt,fontFamily:Wt,h1:{fontSize:54,fontWeight:700,marginBottom:10},h2:{fontSize:40,fontWeight:700,marginBottom:8},h3:{fontSize:32,fontWeight:700,marginBottom:6},h4:{fontWeight:700,fontSize:28,marginBottom:6},h5:{fontWeight:700,fontSize:24,marginBottom:4},h6:{fontWeight:700,fontSize:20,marginBottom:2}};function Mt(r){const{palette:e,htmlFontSize:n=Bt,fontFamily:s=Wt,defaultPageTheme:a=Yt,pageTheme:l=Ct,typography:b}=r;if(!l[a])throw new Error(`${a} is not defined in pageTheme.`);return kt.htmlFontSize=n,kt.fontFamily=s,{palette:e,typography:b!=null?b:kt,page:l[a],getPageTheme:({themeId:y})=>{var D;return(D=l[y])!==null&&D!==void 0?D:l[a]}}}var te=t(80012);const ye={MuiCssBaseline:{styleOverrides:r=>({html:{height:"100%",fontFamily:r.typography.fontFamily},body:{height:"100%",fontFamily:r.typography.fontFamily,overscrollBehaviorY:"none",fontSize:"0.875rem",lineHeight:1.43,"&::-webkit-scrollbar, & *::-webkit-scrollbar":{backgroundColor:r.palette.background.paper,width:"1em"},"&::-webkit-scrollbar-thumb, & *::-webkit-scrollbar-thumb":{borderRadius:8,backgroundColor:r.palette.textVerySubtle,border:`3px solid ${r.palette.background.paper}`},"&::-webkit-scrollbar-thumb:active, & *::-webkit-scrollbar-thumb:active":{backgroundColor:r.palette.mode==="dark"?(0,te.a)(r.palette.textVerySubtle,.2):(0,te.e$)(r.palette.textVerySubtle,.2)},"&::-webkit-scrollbar-thumb:hover, & *::-webkit-scrollbar-thumb:hover":{backgroundColor:r.palette.mode==="dark"?(0,te.a)(r.palette.textVerySubtle,.2):(0,te.e$)(r.palette.textVerySubtle,.2)}},a:{color:"inherit",textDecoration:"none"}})},MuiGrid:{defaultProps:{spacing:2}},MuiSwitch:{defaultProps:{color:"primary"}},MuiTableRow:{styleOverrides:{root:({theme:r})=>({"&:nth-of-type(odd)":{backgroundColor:r.palette.background.default}}),hover:{"&:hover":{cursor:"pointer"}},head:({theme:r})=>({"&:nth-of-type(odd)":{backgroundColor:r.palette.background.paper}})}},MuiTableCell:{styleOverrides:{root:({theme:r})=>({wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:r.spacing(3,2,3,2.5),borderBottom:0}),sizeSmall:({theme:r})=>({padding:r.spacing(1.5,2,1.5,2.5)}),head:({theme:r})=>({wordBreak:"break-word",overflow:"hidden",color:r.palette.textSubtle,fontWeight:"normal",lineHeight:"1"})}},MuiTabs:{styleOverrides:{root:{minHeight:24}}},MuiTab:{styleOverrides:{root:({theme:r})=>({color:r.palette.link,minHeight:24,textTransform:"initial",letterSpacing:"0.07em","&:hover":{color:(0,te.e$)(r.palette.link,.3),background:(0,te.a)(r.palette.link,.95)},[r.breakpoints.up("md")]:{minWidth:120,fontSize:r.typography.pxToRem(14),fontWeight:500}}),textColorPrimary:({theme:r})=>({color:r.palette.link})}},MuiTableSortLabel:{styleOverrides:{root:{color:"inherit","&:hover":{color:"inherit"},"&:focus":{color:"inherit"},"&.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"}}}},Qt=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 ee(r,e){if(!e||typeof e=="string")return;const n=typeof e=="function"?e(r):e;if(n)return{"@global":n}}function ne(r,e){if(!(!e||typeof e=="string")){if(typeof e=="object"){const n={...r},s=r.spacing(1);return typeof s=="number"&&(n.spacing=Qt(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 Lt(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,b=l.match(le);if(b){const[,y]=b,{[l]:D,...F}=s;D&&(e={...e,[n]:F,[y]:D})}}}return e}function _t(r,e={}){const n={},s={};for(const a of Object.keys(e)){const l=e[a];l&&("styleOverrides"in l&&(a==="MuiCssBaseline"?n[a]=ee(r,l.styleOverrides):n[a]=Lt(ne(r,l.styleOverrides))),"defaultProps"in l&&(s[a]=l.defaultProps))}return{overrides:n,props:s}}var Zt=new WeakMap;class Ee{getTheme(e){return(0,Dt._)(this,Zt).get(e)}constructor(e,n){(0,g._)(this,Zt,{writable:!0,value:new Map}),(0,R._)(this,Zt,new Map),e&&(0,Dt._)(this,Zt).set("v4",e),n&&(0,Dt._)(this,Zt).set("v5",n)}}function Se(r){const e=Mt(r),n={...ye,...r.components},s=(0,k.A)({...e,components:n}),a=_t(s,n),l={...(0,$.A)(e),...a};return new Ee(l,s)}function Ve(r){const e=adaptV4Theme(r),n=createTheme(r);return new Ee(n,createV5Theme(e))}const fe={light:Se({palette:ao.light}),dark:Se({palette:ao.dark})};var Me=t(75962),ie=t(87145);const Wn=[{id:"light",title:"Light Theme",variant:"light",icon:(0,i.jsx)(ie.A,{}),Provider:({children:r})=>(0,i.jsx)(io,{theme:fe.light,children:r})},{id:"dark",title:"Dark Theme",variant:"dark",icon:(0,i.jsx)(Me.A,{}),Provider:({children:r})=>(0,i.jsx)(io,{theme:fe.dark,children:r})}];var kn=t(73466),Zo=t(39067),mn=t.n(Zo);class Kn{get(e){for(const n of this.holders){const s=n.get(e);if(s)return s}}constructor(...e){(0,x._)(this,"holders",void 0),this.holders=e}}var yn=t(43836),lo=t(10602);const yr=(0,yn.tK)("api-context"),Jo=r=>{var e;const{apis:n,children:s}=r,a=(e=(0,d.useContext)(yr))===null||e===void 0?void 0:e.atVersion(1),l=a?new Kn(n,a):n;return(0,i.jsx)(yr.Provider,{value:(0,lo.B)({1:l}),children:s})};Jo.propTypes={apis:mn().shape({get:mn().func.isRequired}).isRequired,children:mn().node};const As=/^[a-z][a-z0-9]*(?:[-_][a-z][a-z0-9]*)*$/i;function co(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}function Xo(r){return typeof r!="object"||r===null?r:Array.isArray(r)?r.map(Xo):Object.fromEntries(Object.entries(r).map(([e,n])=>[e,Xo(n)]))}function zn(r,e){if(r===null)return;if(r===void 0)return e===void 0?void 0:zn(e);if(typeof r!="object"||Array.isArray(r))return r;const n=co(e)?e:{},s={};for(const a of new Set([...Object.keys(r),...Object.keys(n)])){const l=zn(r[a],n[a]);l!==void 0&&(s[a]=l)}return s}function qo(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 $e={type(r,e,n,s){return`Invalid type in config for key '${r}' in '${e}', got ${n}, wanted ${s}`},missing(r,e){return`Missing required config value at '${r}' in '${e}'`},convert(r,e,n){return`Unable to convert config value for key '${r}' in '${e}' to a ${n}`}};class En{static fromConfigs(e){return e.length===0?new En(void 0):e.reduce((n,{data:s,context:a,filteredKeys:l,deprecatedKeys:b})=>{const y=new En(s,a,n);if(y.filteredKeys=l,b)for(const{key:D,description:F}of b)console.warn(`The configuration key '${D}' of ${a} is deprecated and may be removed soon. ${F||""}`);return y},void 0)}has(e){var n;const s=this.readValue(e);if(s===null)return!1;if(s!==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])].filter(l=>{var b;return((b=this.data)===null||b===void 0?void 0:b[l])!==null})}get(e){const n=this.getOptional(e);if(n===void 0)throw new Error($e.missing(this.fullKey(e!=null?e:""),this.context));return n}getOptional(e){var n;const s=Xo(this.readValue(e)),a=(n=this.fallback)===null||n===void 0?void 0:n.getOptional(e);if(s!==null){if(s===void 0){if(0)var l;return zn(a)}else if(a===void 0)return zn(s);return zn(s,a)}}getConfig(e){const n=this.getOptionalConfig(e);if(n===void 0)throw new Error($e.missing(this.fullKey(e),this.context));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(co(s))return this.copy(s,e,a);if(s!==null){if(s!==void 0)throw new TypeError($e.type(this.fullKey(e),this.context,qo(s),"object"));return a}}getConfigArray(e){const n=this.getOptionalConfigArray(e);if(n===void 0)throw new Error($e.missing(this.fullKey(e),this.context));return n}getOptionalConfigArray(e){const n=this.readConfigValue(e,a=>{if(!Array.isArray(a))return{expected:"object-array"};for(const[l,b]of a.entries())if(!co(b))return{expected:"object-array",value:b,key:`${e}[${l}]`};return!0});if(!n){if(0)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($e.missing(this.fullKey(e),this.context));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($e.convert(this.fullKey(e),this.context,"number"));return s}getBoolean(e){const n=this.getOptionalBoolean(e);if(n===void 0)throw new Error($e.missing(this.fullKey(e),this.context));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($e.convert(this.fullKey(e),this.context,"boolean"))}getString(e){const n=this.getOptionalString(e);if(n===void 0)throw new Error($e.missing(this.fullKey(e),this.context));return n}getOptionalString(e){return this.readConfigValue(e,n=>typeof n=="string"&&n!==""||{expected:"string"})}getStringArray(e){const n=this.getOptionalStringArray(e);if(n===void 0)throw new Error($e.missing(this.fullKey(e),this.context));return n}getOptionalStringArray(e){return this.readConfigValue(e,n=>{if(!Array.isArray(n))return{expected:"string-array"};for(const[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 En(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(0)var l;return(a=this.fallback)===null||a===void 0?void 0:a.readConfigValue(e,n)}if(s===null)return;const b=n(s);if(b!==!0){const{key:y=e,value:D=s,expected:F}=b;throw new TypeError($e.type(this.fullKey(y),this.context,qo(D),F))}return s}readValue(e){const n=e?e.split("."):[];for(const a of n)if(!As.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(co(s))s=s[l];else if(s!=null){const b=this.fullKey(n.slice(0,a).join("."));throw new TypeError($e.type(b,this.context,qo(s),"object"))}return s}constructor(e,n="mock-config",s,a=""){(0,x._)(this,"data",void 0),(0,x._)(this,"context",void 0),(0,x._)(this,"fallback",void 0),(0,x._)(this,"prefix",void 0),(0,x._)(this,"filteredKeys",void 0),(0,x._)(this,"notifiedFilteredKeys",void 0),this.data=e,this.context=n,this.fallback=s,this.prefix=a,this.notifiedFilteredKeys=new Set}}const Hn="theme";class uo{static createWithStorage(e){const n=new uo(e);if(!window.localStorage)return n;var s;const a=(s=window.localStorage.getItem(Hn))!==null&&s!==void 0?s:void 0;return n.setActiveThemeId(a),n.activeThemeId$().subscribe(l=>{l?window.localStorage.setItem(Hn,l):window.localStorage.removeItem(Hn)}),window.addEventListener("storage",l=>{if(l.key===Hn){var b;const y=(b=localStorage.getItem(Hn))!==null&&b!==void 0?b:void 0;n.setActiveThemeId(y)}}),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,x._)(this,"themes",void 0),(0,x._)(this,"activeThemeId",void 0),(0,x._)(this,"subject",void 0),this.themes=e,this.subject=new et(void 0)}}var An=t(63636);function Er(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 xs{registerFlag(e){Er(e.name),this.registeredFeatureFlags.push(e)}getRegisteredFlags(){return this.registeredFeatureFlags.slice()}isActive(e){return this.flags||(this.flags=this.load()),this.flags.get(e)===An.S.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===An.S.Active);window.localStorage.setItem("featureFlags",JSON.stringify(Object.fromEntries(n)))}load(){try{const e=window.localStorage.getItem("featureFlags");if(!e)return new Map;const n=JSON.parse(e);if(typeof n!="object"||n===null||Array.isArray(n))return new Map;const s=Object.entries(n).filter(([a,l])=>(Er(a),l===An.S.Active));return new Map(s)}catch{return new Map}}constructor(){(0,x._)(this,"registeredFeatureFlags",[]),(0,x._)(this,"flags",void 0)}}const ho=(0,bt.y)({id:"core.apptheme"}),Ar=(0,bt.y)({id:"core.applanguage"});var Cs=t(56038);class tr{static validateFactories(e,n){for(const s of n){const a=[s],l=new Set;for(;a.length;){const b=a.shift(),y=e.get(b);if(y)for(const D of Object.values(y.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]),b=a.factory(l);return this.apis.set(e.id,b),b}loadDeps(e,n,s){const a={};for(const l in n)if(n.hasOwnProperty(l)){const b=n[l],y=this.load(b,s);if(!y)throw new Error(`No API factory available for dependency ${b} of dependent ${e}`);a[l]=y}return a}constructor(e){(0,x._)(this,"factories",void 0),(0,x._)(this,"apis",void 0),this.factories=e,this.apis=new Map}}var er;(function(r){r[r.default=10]="default",r[r.app=50]="app",r[r.static=100]="static"})(er||(er={}));class bs{register(e,n){const s=er[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,x._)(this,"factories",new Map)}}function Ss(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,b=>{if(!(0,d.isValidElement)(b))return;const y={};for(const D in e)if(e.hasOwnProperty(D)){const F=e[D];y[D]=F.visit(F.accumulator,b,a,l[D])}for(const D of r.discoverers){const F=D(b);F&&n.push({node:F,parent:b,contexts:y})}})}return Object.fromEntries(Object.entries(e).map(([s,a])=>[s,a.accumulator]))}function fo(r,e){return()=>({accumulator:r(),visit:e})}function Os(r){var e;return(e=r.props)===null||e===void 0?void 0:e.children}function ws(r){var e,n;if(!((e=r.props)===null||e===void 0)&&e.path&&(!((n=r.props)===null||n===void 0)&&n.element)){var s;return(s=r.props)===null||s===void 0?void 0:s.element}}var Oe=t(19402);const Ps=fo(()=>new Set,(r,e)=>{const n=(0,Oe.E)(e,"core.plugin");n&&r.add(n)});var _n=t(72427);const xr=r=>{const{children:e}=r,n=(0,_n.gf)(An.B),s="with"in r?n.isActive(r.with):!n.isActive(r.without);return(0,i.jsx)(i.Fragment,{children:s?e:null})};(0,Oe.h)(xr,"core.featureFlagged",!0);const go={caseSensitive:!1,path:"*",element:"match-all",routeRefs:new Set,plugins:new Set};function po(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 Cr=r=>{const e=new Set;return r&&e.add(r),e};function br(r,e=new Array){return d.Children.forEach(r,n=>{if(!(0,d.isValidElement)(n))return;const s=(0,Oe.E)(n,"core.mountPoint");if(s){const a=(0,Oe.E)(n,"core.plugin");e.push({routeRef:s,plugin:a})}br(n.props.children,e)}),e}const Ts=fo(()=>({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 b=(a=e.props)===null||a===void 0?void 0:a.path,y=(0,Oe.E)(e,"core.mountPoint");if(y&&b)throw new Error(`Path property may not be set directly on a routable extension "${po(e)}"`);var D;const F=(D=s==null||(l=s.obj)===null||l===void 0?void 0:l.children)!==null&&D!==void 0?D:r.objects;if(b!==void 0){if(typeof b!="string")throw new Error(`Element path must be a string at "${po(e)}"`);const yt=b.startsWith("/")?b.slice(1):b,jt=e.props.element;if((0,Oe.E)(e,"core.gatherMountPoints")){var Q;if(jt)throw new Error(`Mount point gatherers may not have an element prop "${po(e)}"`);const Kt={path:yt,element:"gathered",routeRefs:new Set,caseSensitive:!!(!((Q=e.props)===null||Q===void 0)&&Q.caseSensitive),children:[go],plugins:new Set};return F.push(Kt),{obj:Kt,gatherPath:yt,routeRef:s==null?void 0:s.routeRef,gatherRouteRef:s==null?void 0:s.routeRef}}if(jt){var st;const[Kt,...ve]=br(jt);if(ve.length>0)throw new Error(`Route element with path "${b}" may not contain multiple routable extensions`);if(!Kt)return s;const{routeRef:oe,plugin:Ie}=Kt,Xn={path:yt,element:"mounted",routeRefs:new Set([oe]),caseSensitive:!!(!((st=e.props)===null||st===void 0)&&st.caseSensitive),children:[go],plugins:Cr(Ie)};return F.push(Xn),r.paths.set(oe,yt),r.parents.set(oe,s==null?void 0:s.routeRef),{obj:Xn,routeRef:oe!=null?oe:s==null?void 0:s.routeRef,gatherPath:yt,gatherRouteRef:s==null?void 0:s.gatherRouteRef}}}if(y){var ot;if((s==null?void 0:s.gatherPath)===void 0)throw new Error(`Routable extension "${po(e)}" with mount point "${y}" must be assigned a path`);s==null||(ot=s.obj)===null||ot===void 0||ot.routeRefs.add(y);const yt=(0,Oe.E)(e,"core.plugin");if(yt){var at;s==null||(at=s.obj)===null||at===void 0||at.plugins.add(yt)}return r.paths.set(y,s.gatherPath),r.parents.set(y,s==null?void 0:s.gatherRouteRef),{...s,routeRef:y}}return s}),Rs=fo(()=>({paths:new Map,parents:new Map,objects:new Array}),(r,e,n,s)=>{var a,l,b;if((n==null?void 0:n.props.element)===e)return s;let y=s==null?void 0:s.obj,D=s==null?void 0:s.routeRef,F=s==null?void 0:s.sticky;const Q=(a=e.props)===null||a===void 0?void 0:a.path;var st;const ot=(st=y==null?void 0:y.children)!==null&&st!==void 0?st:r.objects,at=!!(!((l=e.props)===null||l===void 0)&&l.caseSensitive);let yt=s==null?void 0:s.path;if((0,Oe.E)(e,"core.gatherMountPoints")){if(!Q)throw new Error("Mount point gatherer must have a path");yt=Q}const jt=(b=e.props)===null||b===void 0?void 0:b.element;let Kt=(0,Oe.E)(e,"core.mountPoint");if(!Kt&&(0,d.isValidElement)(jt)&&(Kt=(0,Oe.E)(jt,"core.mountPoint")),Kt){let Ie=Q;if(yt&&(Ie?yt=void 0:Ie=yt),!Ie)throw new Error("Mounted routable extension must have a path");r.paths.set(Kt,Ie),D&&F?(r.parents.set(Kt,D),Q&&(D=Kt,F=!1)):(r.parents.set(Kt,D),D=Kt),Q?(y={caseSensitive:at,path:Q,element:"mounted",routeRefs:new Set([Kt]),children:[go],plugins:Cr((0,Oe.E)(e.props.element,"core.plugin"))},ot.push(y)):y==null||y.routeRefs.add(Kt)}if((0,Oe.E)(e,"core.gatherMountPoints")&&(F=!0),(0,Oe.E)(e,"core.gatherMountPoints")){if(!Q)throw new Error("Mount point gatherer must have a path");if(!Kt){var oe;y={caseSensitive:at,path:Q,element:"gathered",routeRefs:new Set,children:[go],plugins:(s==null||(oe=s.obj)===null||oe===void 0?void 0:oe.plugins)||new Set},ot.push(y)}}return{obj:y,path:yt,routeRef:D,sticky:F}}),Is=fo(()=>new Set,(r,e)=>{if(e.type===xr){const n=e.props;r.add("with"in n?n.with:n.without)}});var Vn=t(74808),Ds=t(63544);const Gn=(0,Ds.Q)("route-ref-type",()=>Symbol("route-ref-type"));function Sr(r){return r[Gn]==="absolute"}function Or(r){return r[Gn]==="sub"}function Ms(r){return r[Gn]==="external"}function vo(...r){const e=r.join("/").replace(/\/\/+/g,"/");return e!=="/"&&e.endsWith("/")?e.slice(0,-1):e}var Ls=t(46155),js=t.n(Ls);function Bs(r,e,n){let s,a="";if(Sr(r))s=r;else if(Or(r))s=r.parent,a=r.path;else if(Ms(r)){const y=n.get(r);if(!y)return[void 0,""];if(Sr(y))s=y;else if(Or(y))s=y.parent,a=y.path;else throw new Error(`ExternalRouteRef was bound to invalid target, ${y}`)}else throw r[Gn]?new Error(`Unknown or invalid route ref type, ${r[Gn]}`):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 b=vo(l,a);return[s,b]}function Us(r,e,n,s,a){var l;const b=(l=(0,Vn.ue)(a,e))!==null&&l!==void 0?l:[],y=Array();let D=-1;for(let st=r;st&&(D=b.findIndex(ot=>ot.route.routeRefs.has(st)),D===-1);st=s.get(st))y.unshift(st);y.length===0&&(D-=1);const F=D===-1?"":b[D].pathname,Q=y.slice(0,-1).map(st=>{const ot=n.get(st);if(ot===void 0)throw new Error(`No path for ${st}`);if(ot.includes(":"))throw new Error(`Cannot route to ${r} with parent ${st} as it has parameters`);return ot});return`${vo(F,...Q)}/`}class $s{resolve(e,n){const[s,a]=Bs(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 b=this.appBasePath+Us(s,l,this.routePaths,this.routeParents,this.routeObjects);return(...[D])=>{const F=D&&js()(D,Q=>typeof Q=="string"?Q.replaceAll(/[&?#;\/]/g,st=>encodeURIComponent(st)):Q);return vo(b,(0,Vn.tW)(a,F))}}trimPath(e){return e&&(e.startsWith(this.appBasePath)?e.slice(this.appBasePath.length):e)}constructor(e,n,s,a,l){(0,x._)(this,"routePaths",void 0),(0,x._)(this,"routeParents",void 0),(0,x._)(this,"routeObjects",void 0),(0,x._)(this,"routeBindings",void 0),(0,x._)(this,"appBasePath",void 0),this.routePaths=e,this.routeParents=n,this.routeObjects=s,this.routeBindings=a,this.appBasePath=l}}const Fs=(0,yn.tK)("routing-context"),Ns=({routePaths:r,routeParents:e,routeObjects:n,routeBindings:s,basePath:a="",children:l})=>{const b=new $s(r,e,n,s,a),y=(0,lo.B)({1:b});return(0,i.jsx)(Fs.Provider,{value:y,children:l})};function Ws(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 y=r.get(a);if(y===void 0)throw new Error(`No path for ${a}`);l=vo(y,l),a=e.get(a)}const b=l.match(/:(\w+)/g);if(b){for(let y=0;y<b.length;y++)for(let D=y+1;D<b.length;D++)if(b[D]===b[y])throw new Error(`Parameter ${b[D]} is duplicated in path ${l}`)}}}function ks(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 Ks=(0,yn.tK)("app-context"),zs=({appContext:r,children:e})=>{const n=(0,lo.B)({1:r});return(0,i.jsx)(Ks.Provider,{value:n,children:e})},wr="app",Hs=`${wr}-auth-cookie-expires-at`,_s=5*6e4,Pr=5e3,Vs=2,Gs=5*6e4;function Ys({discoveryApi:r,fetchApi:e,errorApi:n}){let s=!1,a,l=!0,b=Pr;const y="BroadcastChannel"in window?new BroadcastChannel(Hs):void 0,D=ot=>{const at=(1+3*Math.random())*6e4;return Math.max(ot-Date.now(),_s)-at},F=async()=>{try{const at=`${await r.getBaseUrl(wr)}/.backstage/auth/v1/cookie`,yt=await e.fetch(at,{credentials:"include"});if(!yt.ok)throw new Error(`Request failed with status ${yt.status} ${yt.statusText}, see request towards ${at} for more details`);const jt=await yt.json();if(!jt.expiresAt)throw new Error("No expiration date in response");const Kt=Date.parse(jt.expiresAt);if(Number.isNaN(Kt))throw new Error("Invalid expiration date in response");l=!0,y==null||y.postMessage({action:"COOKIE_REFRESH_SUCCESS",payload:{expiresAt:new Date(Kt).toISOString()}}),st(D(Kt))}catch(ot){l?(l=!1,b=Pr):(b=Math.min(Gs,b*Vs),console.error("Session cookie refresh failed",ot),n.post(new Error("Session refresh failed, see developer console for details"))),st(b)}},Q=ot=>{const{data:at}=ot;if(!(at===null||typeof at!="object")&&"action"in at&&at.action==="COOKIE_REFRESH_SUCCESS"){const yt=Date.parse(at.payload.expiresAt);if(Number.isNaN(yt)){console.warn("Received invalid expiration from session refresh channel");return}st(D(yt))}};function st(ot){s||(a&&clearTimeout(a),a=setTimeout(F,ot))}return y==null||y.addEventListener("message",Q),F(),()=>{s=!0,a&&clearTimeout(a),y==null||y.removeEventListener("message",Q),y==null||y.close()}}function Tr(r){return new Error(`Tried to access IdentityApi ${r} before app was loaded`)}function nr(r){console.warn(`WARNING: Call to ${r} is deprecated and will break in the future`)}var mo=new WeakMap;class Qs{setTarget(e,n){this.target=e,this.signOutTargetUrl=n.signOutTargetUrl,this.resolveTarget(e)}getUserId(){if(!this.target)throw Tr("getUserId");if(!this.target.getUserId)throw new Error("IdentityApi does not implement getUserId");return nr("getUserId"),this.target.getUserId()}getProfile(){if(!this.target)throw Tr("getProfile");if(!this.target.getProfile)throw new Error("IdentityApi does not implement getProfile");return nr("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 nr("getIdToken"),e.getIdToken()})}async signOut(){var e,n,s;await this.waitForTarget.then(a=>a.signOut()),await((e=(0,Dt._)(s=n=this,mo))===null||e===void 0?void 0:e.call(n)),window.location.href=this.signOutTargetUrl}enableCookieAuth(e){if((0,Dt._)(this,mo))return;const n=Ys(e);(0,R._)(this,mo,async()=>{n();const s=await e.discoveryApi.getBaseUrl("app");try{await e.fetchApi.fetch(`${s}/.backstage/auth/v1/cookie`,{method:"DELETE"})}catch{}})}constructor(){(0,x._)(this,"target",void 0),(0,x._)(this,"waitForTarget",void 0),(0,x._)(this,"resolveTarget",()=>{}),(0,x._)(this,"signOutTargetUrl","/"),(0,g._)(this,mo,{writable:!0,value:void 0}),this.waitForTarget=new Promise(e=>{this.resolveTarget=e})}}var Zs=t(1394);function Js(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 Xs=()=>{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 Rr({children:r}){const e=(0,_n.gf)(ho),n=(0,Zs.A)(e.activeThemeId$(),e.getActiveThemeId()),s=window.matchMedia?Xs():!1,a=Js(n,s,e.getInstalledThemes());if(!a)throw new Error("App has no themes");return(0,i.jsx)(a.Provider,{children:r})}const Ir=async()=>qs();function qs(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 ti{add(e,n){return this.apis.push([e.id,n]),n}build(){return new xn(new Map(this.apis))}constructor(){(0,x._)(this,"apis",[])}}class xn{static builder(){return new ti}static from(e){return new xn(new Map(e.map(([n,s])=>[n.id,s])))}static with(e,n){return new xn(new Map([[e.id,n]]))}with(e,n){return new xn(new Map([...this.apis,[e.id,n]]))}get(e){return this.apis.get(e.id)}constructor(e){(0,x._)(this,"apis",void 0),this.apis=e}}function ei(r){const e=new Map,n=new Map;for(const l of r){var s;for(const[b,y]of Object.entries((s=l.routes)!==null&&s!==void 0?s:{})){const D=`${l.getId()}.${b}`;if(e.has(D))throw new Error(`Unexpected duplicate route '${D}'`);e.set(D,y)}var a;for(const[b,y]of Object.entries((a=l.externalRoutes)!==null&&a!==void 0?a:{})){const D=`${l.getId()}.${b}`;if(n.has(D))throw new Error(`Unexpected duplicate external route '${D}'`);n.set(D,y)}}return{routes:e,externalRoutes:n}}function ni(r,e,n){var s;const a=ei(n),l=new Map;r&&r({bind:(D,F)=>{for(const[Q,st]of Object.entries(F)){const ot=D[Q];if(!ot)throw new Error(`Key ${Q} is not an existing external route`);if(!st&&!ot.optional)throw new Error(`External route ${Q} is required but was undefined`);st&&l.set(ot,st)}}});const b=(s=e.getOptionalConfig("app.routes.bindings"))===null||s===void 0?void 0:s.get();if(b)for(const[y,D]of Object.entries(b)){if(typeof D!="string"||D==="")throw new Error(`Invalid config at app.routes.bindings['${y}'], value must be a non-empty string`);const F=a.externalRoutes.get(y);if(!F)throw new Error(`Invalid config at app.routes.bindings, '${y}' is not a valid external route`);if(l.has(F))continue;const Q=a.routes.get(D);if(!Q)throw new Error(`Invalid config at app.routes.bindings['${y}'], '${D}' is not a valid route`);l.set(F,Q)}for(const y of a.externalRoutes.values())if(!l.has(y)){const D="getDefaultTarget"in y?y.getDefaultTarget():void 0;if(D){const F=a.routes.get(D);F&&l.set(y,F)}}return l}function Yn(){const[r]=(0,m.AV)((0,i.jsx)(m.qh,{index:!0,element:(0,i.jsx)("div",{})}));return!r.index}const Dr=(0,d.createContext)(void 0);var Mr=t(82266),Lr=t(93368),oi=t(25862);const ri=(r,e)=>{try{const n=(0,Vn.ue)(e,{pathname:r}),s=n==null?void 0:n.filter(D=>{var F;return(D==null||(F=D.route.routeRefs)===null||F===void 0?void 0:F.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 b;a.plugins.size===1&&(b=a.plugins.values().next().value);const y=Object.entries((s==null?void 0:s.params)||{}).reduce((D,[F,Q])=>(Q!==void 0&&F!=="*"&&(D[F]=Q),D),{});return{extension:"App",pluginId:(b==null?void 0:b.getId())||"root",...l?{routeRef:l.id}:{},_routeNodeType:a.element,params:y}}catch{return}},si=({pathname:r,search:e,hash:n,attributes:s})=>{const a=(0,Lr.s)();return(0,d.useEffect)(()=>{a.captureEvent("navigate",`${r}${e}${n}`,{attributes:s})},[a,r,e,n,s]),null},yo=({routeObjects:r})=>{const{pathname:e,search:n,hash:s}=(0,m.zy)(),{params:a,...l}=ri(e,r)||{params:{}};return(0,i.jsx)(oi.Ig,{attributes:l,children:(0,i.jsx)(si,{pathname:e,search:n,hash:s,attributes:a})})};function ii(r){return Yn()?or(r):""}function or(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 jr({component:r,appIdentityProxy:e,children:n}){const[s,a]=(0,d.useState)(),l=(0,_n.gf)(Y.U),b=or(l);return s?(e.setTarget(s,{signOutTargetUrl:b||"/"}),(0,i.jsx)(i.Fragment,{children:n})):(0,i.jsx)(r,{onSignInSuccess:a})}function Br(r){const{Router:e,SignInPage:n}=(0,Mr.n)().getComponents(),s=(0,_n.gf)(Y.U),a=or(s),l=`${a}/*`,b=(0,d.useContext)(Dr);if(!b)throw new Error("AppRouter must be rendered within the AppProvider");const{routeObjects:y,appIdentityProxy:D}=b;return n?Yn()?(0,i.jsxs)(e,{children:[(0,i.jsx)(yo,{routeObjects:y}),(0,i.jsx)(jr,{component:n,appIdentityProxy:D,children:(0,i.jsx)(m.BV,{children:(0,i.jsx)(m.qh,{path:l,element:(0,i.jsx)(i.Fragment,{children:r.children})})})})]}):(0,i.jsxs)(e,{basename:a,children:[(0,i.jsx)(yo,{routeObjects:y}),(0,i.jsx)(jr,{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||"/"}),Yn()?(0,i.jsxs)(e,{children:[(0,i.jsx)(yo,{routeObjects:y}),(0,i.jsx)(m.BV,{children:(0,i.jsx)(m.qh,{path:l,element:(0,i.jsx)(i.Fragment,{children:r.children})})})]}):(0,i.jsxs)(e,{basename:a,children:[(0,i.jsx)(yo,{routeObjects:y}),r.children]}))}(0,Oe.h)(Br,"core.type","AppRouter");const Qn="language",qe="en";var Zn=new WeakMap,Cn=new WeakMap,Eo=new WeakMap;class Ao{static create(e){var n;const s=(n=e==null?void 0:e.availableLanguages)!==null&&n!==void 0?n:[qe];if(s.length!==new Set(s).size)throw new Error(`Supported languages may not contain duplicates, got '${s.join("', '")}'`);if(!s.includes(qe))throw new Error(`Supported languages must include '${qe}'`);var a;const l=(a=e==null?void 0:e.defaultLanguage)!==null&&a!==void 0?a:qe;if(!s.includes(l))throw new Error(`Initial language must be one of the supported languages, got '${l}'`);return new Ao(s,l)}static createWithStorage(e){const n=Ao.create(e);if(!window.localStorage)return n;const s=window.localStorage.getItem(Qn),{languages:a}=n.getAvailableLanguages();return s&&a.includes(s)&&n.setLanguage(s),n.language$().subscribe(({language:l})=>{l!==window.localStorage.getItem(Qn)&&window.localStorage.setItem(Qn,l)}),window.addEventListener("storage",l=>{if(l.key===Qn){var b;const y=(b=localStorage.getItem(Qn))!==null&&b!==void 0?b:void 0;y&&n.setLanguage(y)}}),n}getAvailableLanguages(){return{languages:(0,Dt._)(this,Zn).slice()}}setLanguage(e){const n=e!=null?e:qe;if(n!==(0,Dt._)(this,Cn)){if(n&&!(0,Dt._)(this,Zn).includes(n))throw new Error(`Failed to change language to '${n}', available languages are '${(0,Dt._)(this,Zn).join("', '")}'`);(0,R._)(this,Cn,n),(0,Dt._)(this,Eo).next({language:n})}}getLanguage(){return{language:(0,Dt._)(this,Cn)}}language$(){return(0,Dt._)(this,Eo)}constructor(e,n){(0,g._)(this,Zn,{writable:!0,value:void 0}),(0,g._)(this,Cn,{writable:!0,value:void 0}),(0,g._)(this,Eo,{writable:!0,value:void 0}),(0,R._)(this,Zn,e),(0,R._)(this,Cn,n),(0,R._)(this,Eo,new et({language:(0,Dt._)(this,Cn)}))}}var Fe=t(75944),gn=t(91196),ai=t(47304),li=t(99833),Ur=t(93184);function $r(r){return Object.fromEntries(Object.entries(r).filter(e=>e[1]!==null))}var bn=new WeakMap,xo=new WeakMap,Sn=new WeakMap,Co=new WeakSet;class ci{addTranslationResource(e){const n=(0,li.Y)(e);for(const s of n.resources){const a=(0,Fe._)(this,Co,rr).call(this,s.language,n.id);(0,Dt._)(this,Sn).has(a)||(0,Dt._)(this,Sn).set(a,s.loader)}}needsLoading(e,n){const s=(0,Fe._)(this,Co,rr).call(this,e,n);return(0,Dt._)(this,Sn).get(s)?!(0,Dt._)(this,bn).has(s):!1}async load(e,n){const s=(0,Fe._)(this,Co,rr).call(this,e,n),a=(0,Dt._)(this,Sn).get(s);if(!a||(0,Dt._)(this,bn).has(s))return;const l=(0,Dt._)(this,xo).get(s);if(l){await l;return}const b=a().then(y=>{this.onLoad({language:e,namespace:n,messages:y.messages}),(0,Dt._)(this,bn).add(s)},y=>{throw(0,Dt._)(this,bn).add(s),y});(0,Dt._)(this,xo).set(s,b),await b}constructor(e){(0,gn._)(this,Co),(0,x._)(this,"onLoad",void 0),(0,g._)(this,bn,{writable:!0,value:void 0}),(0,g._)(this,xo,{writable:!0,value:void 0}),(0,g._)(this,Sn,{writable:!0,value:void 0}),this.onLoad=e,(0,R._)(this,bn,new Set),(0,R._)(this,xo,new Map),(0,R._)(this,Sn,new Map)}}function rr(r,e){return`${r}/${e}`}var Jn=new WeakMap,On=new WeakMap,pn=new WeakMap,sr=new WeakMap,bo=new WeakMap,Fr=new WeakSet,So=new WeakSet,ir=new WeakSet;class ar{static create(e){const{languages:n}=e.languageApi.getAvailableLanguages(),s=(0,ai.Q_)({fallbackLng:qe,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!==qe&&s.changeLanguage(a);const l=new ci(D=>{s.addResourceBundle(D.language,D.namespace,$r(D.messages),!1,!0)}),b=(e==null?void 0:e.resources)||[];for(let D=b.length-1;D>=0;D--){const F=b[D];F.$$type==="@backstage/TranslationResource"?l.addTranslationResource(F):F.$$type==="@backstage/TranslationMessages"&&s.addResourceBundle(qe,F.id,$r(F.messages),!0,!1)}const y=new ar(s,l,e.languageApi.getLanguage().language);return e.languageApi.language$().subscribe(({language:D})=>{(0,Fe._)(y,Fr,di).call(y,D)}),y}getTranslation(e){const n=(0,Ur.v)(e);return(0,Fe._)(this,ir,Nr).call(this,n),(0,Fe._)(this,So,lr).call(this,n)}translation$(e){const n=(0,Ur.v)(e);return(0,Fe._)(this,ir,Nr).call(this,n),new(N())(s=>{let a={};const l=()=>{a={};const y=a;(0,Dt._)(this,On).load((0,Dt._)(this,pn),n.id).then(()=>{if(y===a){const D=(0,Fe._)(this,So,lr).call(this,n);D.ready&&s.next(D)}},D=>{y===a&&s.error(Array.isArray(D)?D[0]:D)})},b=()=>{const y=(0,Fe._)(this,So,lr).call(this,n);y.ready?s.next(y):l()};return(0,Dt._)(this,On).needsLoading((0,Dt._)(this,pn),n.id)&&l(),(0,Dt._)(this,bo).add(b),()=>{(0,Dt._)(this,bo).delete(b)}})}constructor(e,n,s){(0,gn._)(this,Fr),(0,gn._)(this,So),(0,gn._)(this,ir),(0,g._)(this,Jn,{writable:!0,value:void 0}),(0,g._)(this,On,{writable:!0,value:void 0}),(0,g._)(this,pn,{writable:!0,value:void 0}),(0,g._)(this,sr,{writable:!0,value:new Set}),(0,g._)(this,bo,{writable:!0,value:new Set}),(0,R._)(this,Jn,e),(0,R._)(this,On,n),(0,R._)(this,pn,s)}}function di(r){(0,Dt._)(this,pn)!==r&&((0,R._)(this,pn,r),(0,Dt._)(this,Jn).changeLanguage(r),(0,Dt._)(this,bo).forEach(e=>e()))}function lr(r){return(0,Dt._)(this,On).needsLoading((0,Dt._)(this,pn),r.id)?{ready:!1}:{ready:!0,t:(0,Dt._)(this,Jn).getFixedT(null,r.id)}}function Nr(r){if((0,Dt._)(this,sr).has(r.id))return;(0,Dt._)(this,sr).add(r.id);const e=r.getDefaultMessages();(0,Dt._)(this,Jn).addResourceBundle(qe,r.id,e,!0,!1);const n=r.getDefaultResource();n&&(0,Dt._)(this,On).addTranslationResource(n)}function Wr(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 ui(r){const e=En.fromConfigs(r),n=e.getOptionalString("app.baseUrl"),s=e.getOptionalString("backend.baseUrl");let a=r,l,b;if(n&&s){const y=new URL(n).origin,D=new URL(s).origin;if(y===D){const F=Wr(s);s!==F&&(l=F)}}if(n){const y=Wr(n);n!==y&&(b=y)}return(b||l)&&(a=a.concat({data:{app:b&&{baseUrl:b},backend:l&&{baseUrl:l}},context:"relative-resolver"})),a}function hi(){const r=document.querySelector('meta[name="backstage-app-mode"]');var e;return((e=r==null?void 0:r.getAttribute("content"))!==null&&e!==void 0?e:"public")==="protected"}function fi(r,e,n){var s;const a=!!r,l=(0,kn.A)(r||(()=>Promise.resolve([])));let b;if(a&&l.loading){const{Progress:F}=e;b=(0,i.jsx)(F,{})}else if(l.error){const{BootErrorPage:F}=e;b=(0,i.jsx)(F,{step:"load-config",error:l.error})}const{ThemeProvider:y=Rr}=e;return b?{node:(0,i.jsx)(Jo,{apis:xn.with(ho,n),children:(0,i.jsx)(y,{children:b})})}:{api:En.fromConfigs(!((s=l.value)===null||s===void 0)&&s.length?ui(l.value):[])}}class gi{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,x._)(this,"app",void 0),this.app=e}}var cr=new WeakMap;class pi{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,Dt._)(this,cr))throw new Error("app.getProvider() or app.createRoot() has already been called, and can only be called once");(0,R._)(this,cr,!0);const e=new gi(this);let n,s;return({children:l})=>{const b=(0,d.useRef)(!0),y=(0,d.useMemo)(()=>uo.createWithStorage(this.themes),[]),{routing:D,featureFlags:F}=(0,d.useMemo)(()=>{const jt=Yn();jt&&console.warn(`
|
|
4
|
+
DEPRECATION WARNING: React Router Beta is deprecated and support for it will be removed in a future release.
|
|
5
|
+
Please migrate to use React Router v6 stable.
|
|
6
|
+
See https://backstage.io/docs/tutorials/react-router-stable-migration
|
|
7
|
+
`);const Kt=Ss({root:l,discoverers:[Os,ws],collectors:{routing:jt?Rs:Ts,collectedPlugins:Ps,featureFlags:Is}});return Kt.collectedPlugins.forEach(ve=>this.plugins.add(ve)),this.verifyPlugins(this.plugins),this.getApiHolder(),Kt},[l]),Q=fi(this.configLoader,this.components,y),st="api"in Q;if(st){const{api:jt}=Q;this.configApi=jt}if("node"in Q)return Q.node;if(s)throw s;if(!n)try{n=ni(this.bindRoutes,Q.api,this.plugins),Ws(D.paths,D.parents),ks(n,this.plugins)}catch(jt){throw s=jt,jt}if(st&&b.current){b.current=!1;const jt=this.getApiHolder().get(An.B);if(jt){for(const oe of this.featureFlags)jt.registerFlag({...oe,pluginId:""});for(const oe of this.plugins.values())if("getFeatureFlags"in oe)for(const Ie of oe.getFeatureFlags())jt.registerFlag({name:Ie.name,pluginId:oe.getId()});else for(const Ie of oe.output())Ie.type==="feature-flag"&&jt.registerFlag({name:Ie.name,pluginId:oe.getId()});const Kt=jt.getRegisteredFlags(),ve=new Set(Kt.map(oe=>oe.name));for(const oe of F)ve.has(oe)||jt.registerFlag({name:oe,pluginId:""})}}const{ThemeProvider:ot=Rr,Progress:at}=this.components,yt=this.getApiHolder();if(hi()){const jt=yt.get($t.m),Kt=yt.get(ue.a),ve=yt.get(nt.I);if(!jt||!Kt||!ve)throw new Error("App is running in protected mode but missing required APIs");this.appIdentityProxy.enableCookieAuth({errorApi:jt,fetchApi:Kt,discoveryApi:ve})}return(0,i.jsx)(Jo,{apis:yt,children:(0,i.jsx)(zs,{appContext:e,children:(0,i.jsx)(ot,{children:(0,i.jsx)(Ns,{routePaths:D.paths,routeParents:D.parents,routeObjects:D.objects,routeBindings:n,basePath:ii(Q.api),children:(0,i.jsx)(Dr.Provider,{value:{routeObjects:D.objects,appIdentityProxy:this.appIdentityProxy},children:(0,i.jsx)(d.Suspense,{fallback:(0,i.jsx)(at,{}),children:l})})})})})})}}getRouter(){return Br}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 tr.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder}this.apiFactoryRegistry.register("static",{api:ho,deps:{},factory:()=>uo.createWithStorage(this.themes)}),this.apiFactoryRegistry.register("static",{api:Y.U,deps:{},factory:()=>{if(!this.configApi)throw new Error("Tried to access config API before config was loaded");return this.configApi}}),this.apiFactoryRegistry.register("static",{api:se.K,deps:{},factory:()=>this.appIdentityProxy}),this.apiFactoryRegistry.register("static",{api:Ar,deps:{},factory:()=>this.appLanguageApi}),this.apiFactoryRegistry.register("default",{api:Cs.J,deps:{languageApi:Ar},factory:({languageApi:e})=>ar.create({languageApi:e,resources:this.translationResources})}),this.apiFactoryRegistry.register("default",{api:An.B,deps:{},factory:()=>new xs});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 tr.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder=new tr(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,x._)(this,"apiHolder",void 0),(0,x._)(this,"configApi",void 0),(0,x._)(this,"apis",void 0),(0,x._)(this,"icons",void 0),(0,x._)(this,"plugins",void 0),(0,x._)(this,"featureFlags",void 0),(0,x._)(this,"components",void 0),(0,x._)(this,"themes",void 0),(0,x._)(this,"configLoader",void 0),(0,x._)(this,"defaultApis",void 0),(0,x._)(this,"bindRoutes",void 0),(0,x._)(this,"appLanguageApi",void 0),(0,x._)(this,"translationResources",void 0),(0,x._)(this,"appIdentityProxy",new Qs),(0,x._)(this,"apiFactoryRegistry",void 0),(0,g._)(this,cr,{writable:!0,value:!1});var l;this.apis=(l=e.apis)!==null&&l!==void 0?l:[],this.icons=e.icons;var b;this.plugins=new Set((b=e.plugins)!==null&&b!==void 0?b:[]);var y;this.featureFlags=(y=e.featureFlags)!==null&&y!==void 0?y:[],this.components=e.components,this.themes=e.themes;var D;this.configLoader=(D=e.configLoader)!==null&&D!==void 0?D:Ir;var F;this.defaultApis=(F=e.defaultApis)!==null&&F!==void 0?F:[],this.bindRoutes=e.bindRoutes,this.apiFactoryRegistry=new bs,this.appLanguageApi=Ao.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 Q;this.translationResources=(Q=(a=e.__experimentalTranslations)===null||a===void 0?void 0:a.resources)!==null&&Q!==void 0?Q:[]}}function vi(r){return new pi(r)}function mi(r){var e,n,s,a;return vi({...r,apis:(e=r==null?void 0:r.apis)!==null&&e!==void 0?e:[],bindRoutes:r==null?void 0:r.bindRoutes,components:{...M,...r==null?void 0:r.components},configLoader:r==null?void 0:r.configLoader,defaultApis:Mo,icons:{...so,...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:Wn})}var Oo=t(82442);let kr=!1;const Kr=r=>{const e=(0,Mr.n)(),{NotFoundErrorPage:n}=e.getComponents(),s=(0,d.useMemo)(()=>Yn(),[]),l=[...(0,Oo.O)(r.children,b=>b.getElements().flatMap(y=>{let D=y.props.path;if(D==="")return[];var F;D=(F=D==null?void 0:D.replace(/\/\*$/,""))!==null&&F!==void 0?F:"/";let Q=s?y:y.props.element;return!s&&!Q&&(Q=y,kr||(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] />} />."),kr=!0)),[{path:D,element:Q,children:y.props.children?[{path:D==="/"?"/":"*",element:y.props.children}]:void 0}]}).sort((y,D)=>D.path.localeCompare(y.path)).map(y=>({...y,path:y.path==="/"?"/":`${y.path}/*`}))),{path:"*",element:(0,i.jsx)(n,{})}];return(0,m.Ye)(l)};(0,Oe.h)(Kr,"core.type","FlatRoutes");var rn=t(6820),yi=t(78692),Ei=t(86519);function zr(r){return!r.cursor}function Qa(r){return!zr(r)}const xe="catalog";var Ce=t(94214);class Ai{async analyzeLocation(e,n){const s=await this.discoveryApi.getBaseUrl(xe),l=Ce.parse("/analyze-location").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(xe),l=Ce.parse("/locations{?dryRun}").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(xe),l=Ce.parse("/entities/by-uid/{uid}").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(xe),l=Ce.parse("/locations/{id}").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(xe),l=Ce.parse("/entities{?fields,limit,filter*,offset,after,order*}").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(xe),l=Ce.parse("/entities/by-query{?fields,limit,orderField*,cursor,filter*,fullTextFilterTerm,fullTextFilterFields}").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(xe),l=Ce.parse("/entities/by-refs/{?filter*}").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 getEntityAncestryByName(e,n){const s=await this.discoveryApi.getBaseUrl(xe),l=Ce.parse("/entities/by-name/{kind}/{namespace}/{name}/ancestry").expand({kind:e.path.kind,namespace:e.path.namespace,name:e.path.name});return await this.fetchApi.fetch(`${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(xe),l=Ce.parse("/entities/by-name/{kind}/{namespace}/{name}").expand({kind:e.path.kind,namespace:e.path.namespace,name:e.path.name});return await this.fetchApi.fetch(`${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(xe),l=Ce.parse("/entities/by-uid/{uid}").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(xe),l=Ce.parse("/entity-facets{?facet*,filter*}").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(xe),l=Ce.parse("/locations/{id}").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 getLocationByEntity(e,n){const s=await this.discoveryApi.getBaseUrl(xe),l=Ce.parse("/locations/by-entity/{kind}/{namespace}/{name}").expand({kind:e.path.kind,namespace:e.path.namespace,name:e.path.name});return await this.fetchApi.fetch(`${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(xe),l=Ce.parse("/locations").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(xe),l=Ce.parse("/refresh").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(xe),l=Ce.parse("/validate-entity").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,x._)(this,"discoveryApi",void 0),(0,x._)(this,"fetchApi",void 0),this.discoveryApi=e.discoveryApi,this.fetchApi=e.fetchApi||{fetch:Te()}}}class xi{async getEntityAncestors(e,n){return await this.requestRequired(await this.apiClient.getEntityAncestryByName({path:(0,rn.KU)(e.entityRef)},n))}async getLocationById(e,n){return await this.requestOptional(await this.apiClient.getLocation({path:{id:e}},n))}async getLocationByEntity(e,n){return await this.requestOptional(await this.apiClient.getLocationByEntity({path:(0,rn.KU)(e)},n))}async getEntities(e,n){const{filter:s=[],fields:a=[],order:l,offset:b,limit:y,after:D}=e!=null?e:{},F=[];if(l)for(const ot of[l].flat())ot&&F.push(`${ot.order}:${ot.field}`);const Q=await this.requestRequired(await this.apiClient.getEntities({query:{fields:a,limit:y,filter:this.getFilterValue(s),offset:b,after:D,order:l?F:void 0}},n));if(F.length)return{items:Q};const st=(ot,at)=>{var yt,jt;if(((yt=ot.metadata)===null||yt===void 0?void 0:yt.name)===void 0||ot.kind===void 0||((jt=at.metadata)===null||jt===void 0?void 0:jt.name)===void 0||at.kind===void 0)return 0;const Kt=(0,rn.U2)(ot),ve=(0,rn.U2)(at);return Kt<ve?-1:Kt>ve?1:0};return{items:Q.sort(st)}}async getEntitiesByRefs(e,n){const s=await this.apiClient.getEntitiesByRefs({body:{entityRefs:e.entityRefs,fields:e.fields},query:{filter:this.getFilterValue(e.filter)}},n);if(!s.ok)throw await ae.o.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(zr(e)){var a,l;const{fields:b=[],filter:y,limit:D,orderFields:F,fullTextFilter:Q}=e;s.filter=this.getFilterValue(y),D!==void 0&&(s.limit=D),F!==void 0&&(s.orderField=(Array.isArray(F)?F:[F]).map(({field:ot,order:at})=>`${ot},${at}`)),b.length&&(s.fields=b);const st=Q==null||(a=Q.term)===null||a===void 0?void 0:a.trim();st&&(s.fullTextFilterTerm=st),!(Q==null||(l=Q.fields)===null||l===void 0)&&l.length&&(s.fullTextFilterFields=Q.fields)}else{const{fields:b=[],limit:y,cursor:D}=e;s.cursor=D,y!==void 0&&(s.limit=y),b.length&&(s.fields=b)}return this.apiClient.getEntitiesByQuery({query:s},n).then(b=>b.json())}async getEntityByRef(e,n){return this.requestOptional(await this.apiClient.getEntityByName({path:(0,rn.KU)(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,b=await this.apiClient.createLocation({body:{type:s,target:a},query:{dryRun:l?"true":void 0}},n);if(b.status!==201)throw new Error(await b.text());const{location:y,entities:D,exists:F}=await b.json();if(!y)throw new Error(`Location wasn't added: ${a}`);return{location:y,entities:D,exists:F}}async getLocationByRef(e,n){return(await this.requestRequired(await this.apiClient.getLocations({},n))).map(a=>a.data).find(a=>e===(0,yi.KL)(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 ae.o.fromResponse(a);const{errors:l=[]}=await a.json();return{valid:!1,errors:l}}async requestIgnored(e){if(!e.ok)throw await ae.o.fromResponse(e)}async requestRequired(e){if(!e.ok)throw await ae.o.fromResponse(e);return e.json()}async requestOptional(e){if(!e.ok){if(e.status===404)return;throw await ae.o.fromResponse(e)}return await e.json()}getFilterValue(e=[]){const n=[];for(const s of[e].flat()){const a=[];for(const[l,b]of Object.entries(s))for(const y of[b].flat())y===Ei.c?a.push(l):typeof y=="string"&&a.push(`${l}=${y}`);a.length&&n.push(a.join(","))}return n}constructor(e){(0,x._)(this,"apiClient",void 0),this.apiClient=new Ai(e)}}var Hr=t(7341),Ci=t(18),bi=t(82292),_r=t(29207),wn=t(95203),Si=t(9803),Le=t(88758),Oi=t(54560),Pn=t(45250);async function wi({storageApi:r}){const e=r.forBucket("settings"),n=r.forBucket("starredEntities"),s=e.snapshot("starredEntities").value;if(!(0,Pn.isArray)(s))return;var a;const l=new Set((a=n.snapshot("entityRefs").value)!==null&&a!==void 0?a:[]);s.filter(Pn.isString).map(b=>b.split(":")).filter(b=>b.length===4&&b[0]==="entity").map(([b,y,D,F])=>(0,rn.U2)({kind:y,namespace:D,name:F})).forEach(b=>l.add(b)),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,x._)(this,"settingsStore",void 0),(0,x._)(this,"starredEntities",void 0),(0,x._)(this,"subscribers",new Set),(0,x._)(this,"observable",new(N())(s=>(s.next(new Set(this.starredEntities)),this.subscribers.add(s),()=>{this.subscribers.delete(s)}))),wi(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 dr(r){const{years:e=0,months:n=0,weeks:s=0,days:a=0,hours:l=0,minutes:b=0,seconds:y=0,milliseconds:D=0}=r;return((((e*365+n*30+s*7+a)*24+l)*60+b)*60+y)*1e3+D}var Ti=t(25033),Ri=t.n(Ti),Ii=t(25295),Di=t.n(Ii),Mi=t(88083);const Li={seconds:10},ji={milliseconds:50},Bi={api:to.A,component:no.A,system:qn.A,resource:oo.A,domain:jn.A,location:eo.A,user:$n.A,group:Un.A,template:ro.A};function Vr(r){return{async:r.async,render:({entityRef:e,entity:n,context:s})=>({snapshot:(0,Mi.T)(n||e,s),loadEntity:r.async})}}var wo=new WeakMap,ur=new WeakMap,Po=new WeakMap,hr=new WeakMap,To=new WeakMap,Gr=new WeakSet,Yr=new WeakSet,Qr=new WeakSet;class Ro{static createLocal(){return new Ro({renderer:Vr({async:!1})})}static create(e){return new Ro(e)}forEntity(e,n){const{entityRef:s,kind:a,entity:l,needsLoad:b}=(0,Fe._)(this,Gr,Ui).call(this,e),y=ot=>{const{snapshot:at}=(0,Dt._)(this,To).render({entityRef:s,loading:ot.loading,entity:ot.entity,context:n||{}});return{...at,entityRef:s,Icon:(0,Fe._)(this,Qr,Fi).call(this,at.Icon,a)}};let D;try{D=y({loading:b,entity:l})}catch{D={primaryTitle:s,entityRef:s}}if(!b)return{snapshot:D,promise:Promise.resolve(D)};const F=Promise.resolve().then(()=>{var ot;return(ot=(0,Dt._)(this,Po))===null||ot===void 0?void 0:ot.load(s)}).then(ot=>y({loading:!1,entity:ot!=null?ot:l})).catch(()=>{}),Q=new(N())(ot=>{let at=!1;return F.then(yt=>{yt&&ot.next(yt)}).finally(()=>{at||ot.complete()}),()=>{at=!0}}),st=F.then(ot=>ot!=null?ot:D);return{snapshot:D,update$:Q,promise:st}}constructor(e){(0,gn._)(this,Gr),(0,gn._)(this,Yr),(0,gn._)(this,Qr),(0,g._)(this,wo,{writable:!0,value:void 0}),(0,g._)(this,ur,{writable:!0,value:void 0}),(0,g._)(this,Po,{writable:!0,value:void 0}),(0,g._)(this,hr,{writable:!0,value:void 0}),(0,g._)(this,To,{writable:!0,value:void 0});var n;const s=(n=e.cacheTtl)!==null&&n!==void 0?n:Li;var a;const l=(a=e.batchDelay)!==null&&a!==void 0?a:ji;var b;const y=(b=e.renderer)!==null&&b!==void 0?b:Vr({async:!0}),D={};Object.entries(Bi).forEach(([Q,st])=>{D[Q.toLocaleLowerCase("en-US")]=st});var F;if(Object.entries((F=e.kindIcons)!==null&&F!==void 0?F:{}).forEach(([Q,st])=>{D[Q.toLocaleLowerCase("en-US")]=st}),y.async){if(!e.catalogApi)throw new TypeError("Asynchronous rendering requires a catalog API");(0,R._)(this,Po,(0,Fe._)(this,Yr,$i).call(this,{cacheTtl:s,batchDelay:l,renderer:y,catalogApi:e.catalogApi}))}(0,R._)(this,ur,dr(s)),(0,R._)(this,wo,new Map),(0,R._)(this,hr,D),(0,R._)(this,To,y)}}function Ui(r){if(typeof r!="string")return{entity:r,kind:r.kind,entityRef:(0,rn.U2)(r),needsLoad:!1};const e=(0,Dt._)(this,wo).get(r),n=e==null?void 0:e.entity,a=(!e||Date.now()-e.updatedAt>(0,Dt._)(this,ur))&&(0,Dt._)(this,To).async!==!1&&(0,Dt._)(this,Po)!==void 0;return{entity:n,kind:(0,rn.KU)(r).kind,entityRef:r,needsLoad:a}}function $i(r){const e=dr(r.cacheTtl),n=dr(r.batchDelay);return new(Ri())(async s=>{const{items:a}=await r.catalogApi.getEntitiesByRefs({entityRefs:s}),l=Date.now();return s.forEach((b,y)=>{(0,Dt._)(this,wo).set(b,{updatedAt:l,entity:a[y]})}),a},{name:"DefaultEntityPresentationApi",cacheMap:new(Di())(e),maxBatchSize:100,batchScheduleFn:n?s=>setTimeout(s,n):void 0})}function Fi(r,e){return r||(r===!1?!1:(0,Dt._)(this,hr)[e.toLocaleLowerCase("en-US")])}const Re=(0,Si.i)({id:"catalog",apis:[(0,j.b)({api:Hr.v,deps:{discoveryApi:nt.I,fetchApi:ue.a},factory:({discoveryApi:r,fetchApi:e})=>new xi({discoveryApi:r,fetchApi:e})}),(0,j.b)({api:Ci.a,deps:{storageApi:he},factory:({storageApi:r})=>new Pi({storageApi:r})}),(0,j.b)({api:bi.n,deps:{catalogApi:Hr.v},factory:({catalogApi:r})=>Ro.create({catalogApi:r})})],routes:{catalogIndex:wn.rQ,catalogEntity:_r.s},externalRoutes:{createComponent:wn.qP,viewTechDoc:wn.UJ,createFromTemplate:wn.Zg,unregisterRedirect:wn.pS}}),Za=Re.provide((0,Le.QJ)({name:"CatalogIndexPage",component:()=>Promise.all([t.e(3720),t.e(4919),t.e(5974)]).then(t.bind(t,5974)).then(r=>r.CatalogPage),mountPoint:wn.rQ})),Ni=Re.provide((0,Le.QJ)({name:"CatalogEntityPage",component:()=>t.e(4516).then(t.bind(t,54516)).then(r=>r.CatalogEntityPage),mountPoint:_r.s})),Ja=Re.provide((0,Le.NC)({name:"EntityAboutCard",component:{lazy:()=>Promise.all([t.e(3720),t.e(1902),t.e(5724)]).then(t.bind(t,65724)).then(r=>r.AboutCard)}})),Xa=Re.provide((0,Le.NC)({name:"EntityLinksCard",component:{lazy:()=>t.e(8307).then(t.bind(t,18307)).then(r=>r.EntityLinksCard)}})),qa=Re.provide((0,Le.NC)({name:"EntityLabelsCard",component:{lazy:()=>t.e(3182).then(t.bind(t,63182)).then(r=>r.EntityLabelsCard)}})),tl=Re.provide((0,Le.NC)({name:"EntityHasSystemsCard",component:{lazy:()=>t.e(9652).then(t.bind(t,9652)).then(r=>r.HasSystemsCard)}})),el=Re.provide((0,Le.NC)({name:"EntityHasComponentsCard",component:{lazy:()=>t.e(2420).then(t.bind(t,52420)).then(r=>r.HasComponentsCard)}})),nl=Re.provide((0,Le.NC)({name:"EntityHasSubcomponentsCard",component:{lazy:()=>t.e(8384).then(t.bind(t,78384)).then(r=>r.HasSubcomponentsCard)}})),ol=Re.provide((0,Le.NC)({name:"EntityHasResourcesCard",component:{lazy:()=>t.e(6271).then(t.bind(t,56271)).then(r=>r.HasResourcesCard)}})),rl=Re.provide((0,Le.NC)({name:"EntityDependsOnComponentsCard",component:{lazy:()=>t.e(3632).then(t.bind(t,3632)).then(r=>r.DependsOnComponentsCard)}})),sl=Re.provide((0,Le.NC)({name:"EntityDependencyOfComponentsCard",component:{lazy:()=>t.e(124).then(t.bind(t,124)).then(r=>r.DependencyOfComponentsCard)}})),il=Re.provide((0,Le.NC)({name:"EntityDependsOnResourcesCard",component:{lazy:()=>t.e(287).then(t.bind(t,20287)).then(r=>r.DependsOnResourcesCard)}})),al=Re.provide((0,Le.NC)({name:"RelatedEntitiesCard",component:{lazy:()=>t.e(2401).then(t.bind(t,52401)).then(r=>r.RelatedEntitiesCard)}})),ll=Re.provide((0,Oi.ec)({name:"CatalogSearchResultListItem",component:()=>t.e(1297).then(t.bind(t,61297)).then(r=>r.CatalogSearchResultListItem),predicate:r=>r.type==="software-catalog"}));var Zr=t(3347),Jr=t(26679);class Wi{async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getStorageUrl(){return`${await this.discoveryApi.getBaseUrl("techdocs")}/static/docs`}async getBuilder(){return this.configApi.getOptionalString("techdocs.builder")||"local"}async getEntityDocs(e,n){const 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,x._)(this,"configApi",void 0),(0,x._)(this,"discoveryApi",void 0),(0,x._)(this,"identityApi",void 0),this.configApi=e,this.discoveryApi=n,this.identityApi=s}}class ki{async getCookie(){return{expiresAt:new Date(Date.now()+6e5).toISOString()}}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getEntityMetadata(e){return{apiVersion:"backstage.io/v1alpha1",kind:"Component",metadata:{name:"local"},spec:{owner:"test",lifecycle:"experimental"}}}async getTechDocsMetadata(e){return{site_name:"Live preview environment",site_description:""}}constructor({configApi:e,discoveryApi:n,identityApi:s}){(0,x._)(this,"configApi",void 0),(0,x._)(this,"discoveryApi",void 0),(0,x._)(this,"identityApi",void 0),this.configApi=e,this.discoveryApi=n,this.identityApi=s}}const Ki=[(0,j.b)({api:Jr.s,deps:{configApi:Y.U,discoveryApi:nt.I,identityApi:se.K},factory:({configApi:r,discoveryApi:e,identityApi:n})=>new Wi({configApi:r,discoveryApi:e,identityApi:n})}),(0,j.b)({api:Jr.l,deps:{configApi:Y.U,discoveryApi:nt.I,identityApi:se.K},factory:({configApi:r,discoveryApi:e,identityApi:n})=>new ki({configApi:r,discoveryApi:e,identityApi:n})}),(0,j.b)({api:Zr.Y,deps:{configApi:Y.U},factory:({configApi:r})=>Zr.L.fromConfig(r)})],zi={backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}},Hi={backend:{baseUrl:"http://localhost:7007"},techdocs:{builder:"external"}};async function _i(){const r=await fetch("/.detect");return r.ok?(await r.text()).trim()==="techdocs-cli-server":!1}async function Vi(){const r=await Ir(),e=await _i();return[...r,{context:"detected",data:e?zi:Hi}]}var tn=t(58837),Gi=t(3210);const Yi=(0,tn.A)({svg:{width:"auto",height:30},path:{fill:"#7df3e1"}});var Qi=()=>{const r=Yi();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 Zi=(0,tn.A)({svg:{width:"auto",height:28},path:{fill:"#7df3e1"}});var Ji=()=>{const r=Zi();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"})})},be=t(72664);const Xr={isOpen:!1,setOpen:()=>{}},qr=(0,d.createContext)(Xr),ts=(0,yn.tK)("sidebar-open-state-context");function es(r){const{children:e,value:n}=r;return(0,i.jsx)(qr.Provider,{value:n,children:(0,i.jsx)(ts.Provider,{value:(0,lo.B)({1:n}),children:e})})}const fr=()=>{const r=(0,d.useContext)(ts),e=(0,d.useContext)(qr);if(r===void 0)return e||Xr;const n=r.atVersion(1);if(n===void 0)throw new Error("No context found for version 1.");return n};var ns=t(72072),os=t(73524),sn=t(10394),rs=t(5893),Xi=t(53373),vn=t.n(Xi),qi=t(1125),ss=t(29365),ta=t(73845),gr=t(72501),ea=t(32881),na=t(27326),oa=t(13085);const is=(0,d.createContext)({selectedMenuItemIndex:-1,setSelectedMenuItemIndex:()=>{}});var pr=t(34435);const ra=(0,tn.A)(r=>({root:{flexGrow:0,margin:r.spacing(0,2),color:r.palette.navigation.color},selected:e=>({color:`${r.palette.navigation.selectedColor}!important`,borderTop:`solid ${e.sidebarConfig.selectedIndicatorWidth}px ${r.palette.navigation.indicator}`,marginTop:"-1px"}),label:{display:"none"}})),sa=r=>{const{to:e,label:n,icon:s,value:a}=r,{sidebarConfig:l}=(0,d.useContext)(be.yY),b=ra({sidebarConfig:l}),y=(0,m.zy)(),{selectedMenuItemIndex:D,setSelectedMenuItemIndex:F}=(0,d.useContext)(is),Q=(ot,at)=>{F(at===D?-1:at)},st=a===D&&D>=0||a!==D&&!(D>=0)&&e===y.pathname;return(0,i.jsx)(oa.A,{"aria-label":n,label:n,icon:s,component:ns.N_,to:e||y.pathname,onChange:Q,value:a,selected:st,classes:b})},as=r=>{const{children:e,to:n,label:s,icon:a,value:l}=r,{isMobile:b}=(0,pr.Ut)();return b?(0,i.jsx)(sa,{to:n,label:s,icon:a,value:l}):(0,i.jsx)(i.Fragment,{children:e})},ls=(0,tn.A)(r=>({root:{position:"fixed",backgroundColor:r.palette.navigation.background,color:r.palette.navigation.color,bottom:0,left:0,right:0,zIndex:r.zIndex.snackbar,borderTop:"1px solid #383838","@media print":{display:"none"}},overlay:e=>({background:r.palette.navigation.background,width:"100%",bottom:`${e.sidebarConfig.mobileSidebarHeight}px`,height:`calc(100% - ${e.sidebarConfig.mobileSidebarHeight}px)`,flex:"0 1 auto",overflow:"auto"}),overlayHeader:{display:"flex",color:r.palette.navigation.color,alignItems:"center",justifyContent:"space-between",padding:r.spacing(2,3)},overlayHeaderClose:{color:r.palette.navigation.color},marginMobileSidebar:e=>({marginBottom:`${e.sidebarConfig.mobileSidebarHeight}px`})})),ia=r=>(0,Pn.orderBy)(r,({props:{priority:e}})=>Number.isInteger(e)?e:-1,"desc"),aa=d.createElement(as).type,la=({children:r,label:e="Menu",open:n,onClose:s})=>{const{sidebarConfig:a}=(0,d.useContext)(be.yY),l=ls({sidebarConfig:a});return(0,i.jsxs)(ta.Ay,{anchor:"bottom",open:n,onClose:s,ModalProps:{BackdropProps:{classes:{root:l.marginMobileSidebar}}},classes:{root:l.marginMobileSidebar,paperAnchorBottom:l.overlay},children:[(0,i.jsxs)(sn.A,{className:l.overlayHeader,children:[(0,i.jsx)(gr.A,{variant:"h3",children:e}),(0,i.jsx)(ss.A,{onClick:s,classes:{root:l.overlayHeaderClose},children:(0,i.jsx)(ea.A,{})})]}),(0,i.jsx)(sn.A,{component:"nav",children:r})]})},ca=r=>{const{sidebarConfig:e}=(0,d.useContext)(be.yY),{children:n}=r,s=ls({sidebarConfig:e}),a=(0,m.zy)(),[l,b]=(0,d.useState)(-1);(0,d.useEffect)(()=>{b(-1)},[a.pathname]);let y=(0,Oo.O)(n,F=>F.getElements().filter(Q=>Q.type===aa));if(n)y.length?y=ia(y):y.push((0,i.jsx)(as,{icon:(0,i.jsx)(na.A,{}),children:n},"default_menu"));else return null;const D=l>=0&&!y[l].props.to;return(0,i.jsx)(es,{value:{isOpen:!0,setOpen:()=>{}},children:(0,i.jsxs)(is.Provider,{value:{selectedMenuItemIndex:l,setSelectedMenuItemIndex:b},children:[(0,i.jsx)(la,{label:y[l]&&y[l].props.label,open:D,onClose:()=>b(-1),children:y[l]&&y[l].props.children}),(0,i.jsx)(qi.A,{className:s.root,"data-testid":"mobile-sidebar-root",component:"nav",children:y})]})})};var da=t(87849),ua=t(10315);const cs=(0,tn.A)(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 ds;(function(r){r[r.Closed=0]="Closed",r[r.Idle=1]="Idle",r[r.Open=2]="Open"})(ds||(ds={}));const ha=r=>{const{sidebarConfig:e}=(0,d.useContext)(be.yY),{openDelayMs:n=e.defaultOpenDelayMs,closeDelayMs:s=e.defaultCloseDelayMs,disableExpandOnHover:a,children:l}=r,b=cs({sidebarConfig:e}),y=(0,rs.A)(ve=>ve.breakpoints.down("md"),{noSsr:!0}),[D,F]=(0,d.useState)(0),Q=(0,d.useRef)(),{isPinned:st,toggleSidebarPinState:ot}=(0,pr.Ut)(),at=()=>{st||a||(Q.current&&(clearTimeout(Q.current),Q.current=void 0),D!==2&&!y&&(Q.current=window.setTimeout(()=>{Q.current=void 0,F(2)},n),F(1)))},yt=()=>{st||a||(Q.current&&(clearTimeout(Q.current),Q.current=void 0),D===1?F(0):D===2&&(Q.current=window.setTimeout(()=>{Q.current=void 0,F(0)},s)))},jt=D===2&&!y||st,Kt=ve=>{ve?(F(2),ot()):(F(0),ot())};return(0,i.jsxs)("nav",{style:{},"aria-label":"sidebar nav",children:[(0,i.jsx)(ga,{}),(0,i.jsx)(es,{value:{isOpen:jt,setOpen:Kt},children:(0,i.jsx)(sn.A,{className:b.root,"data-testid":"sidebar-root",onMouseEnter:a?()=>{}:at,onFocus:a?()=>{}:at,onMouseLeave:a?()=>{}:yt,onBlur:a?()=>{}:yt,children:(0,i.jsx)(sn.A,{className:vn()(b.drawer,b.drawerWidth,{[b.drawerOpen]:jt}),children:l})})})]})},fa=r=>{var e;const n=(0,be.Rv)((e=r.sidebarOptions)!==null&&e!==void 0?e:{});var s;const a=(0,be.i8)((s=r.submenuOptions)!==null&&s!==void 0?s:{}),{children:l,disableExpandOnHover:b,openDelayMs:y,closeDelayMs:D}=r,{isMobile:F}=(0,pr.Ut)();return F?(0,i.jsx)(ca,{children:l}):(0,i.jsx)(be.yY.Provider,{value:{sidebarConfig:n,submenuConfig:a},children:(0,i.jsx)(ha,{openDelayMs:y,closeDelayMs:D,disableExpandOnHover:b,children:l})})};function ga(){const{sidebarConfig:r}=(0,d.useContext)(be.yY),{focusContent:e,contentRef:n}=(0,os.H)(),s=cs({sidebarConfig:r}),{t:a}=(0,da.i)(ua.O);return n!=null&&n.current?(0,i.jsx)(E.A,{onClick:e,variant:"contained",className:vn()(s.visuallyHidden),children:a("skipToContent")}):null}var pa=t(94509),Io=t(44209),va=t(79065),ma=t(55704),us=t(62248);const ya=(0,tn.A)(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.navigation.color,padding:r.spacing(2.5),[r.breakpoints.down("xs")]:{display:"none"}}}),{name:"BackstageSidebarSubmenu"}),Ea=r=>{const{isOpen:e}=fr(),{sidebarConfig:n,submenuConfig:s}=(0,d.useContext)(be.yY),a=e?n.drawerWidthOpen:n.drawerWidthClosed,l=ya({left:a,submenuConfig:s}),{isHoveredOn:b}=(0,d.useContext)(be.U1),[y,D]=(0,d.useState)(!1);return(0,d.useEffect)(()=>{D(b)},[b]),(0,i.jsxs)(sn.A,{className:vn()(l.drawer,{[l.drawerOpen]:y}),children:[(0,i.jsx)(gr.A,{variant:"h5",component:"span",className:l.title,children:r.title}),r.children]})};var Aa=t(45810),hs=t.n(Aa);function fs(r,e,n=!1){const s=new URLSearchParams(e.search).toString(),a=hs().parse(s),l=new URLSearchParams(r.search).toString(),b=hs().parse(l),y=n?Pn.isEqual:Pn.isMatch;return(0,Pn.isEqual)(e.pathname,r.pathname)&&y(b,a)}const xa=r=>(0,tn.A)(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 Do(r){return(0,d.useMemo)(()=>xa(r),[r])()}const Ca=(r,e)=>(0,Oo.O)(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:b})=>s=s||fs(e,(0,Vn.o1)(b)));return}a&&(s=fs(e,(0,Vn.o1)(a)))}}),s},[e.pathname]);function vr(r){return r.to===void 0}const ba=d.createElement(Ea).type,Sa=d.forwardRef(function({to:e,end:n,style:s,className:a,activeStyle:l,caseSensitive:b,activeClassName:y="active","aria-current":D="page",...F},Q){let{pathname:st}=(0,m.zy)(),{pathname:ot}=(0,m.x$)(e);b||(st=st.toLocaleLowerCase("en-US"),ot=ot.toLocaleLowerCase("en-US"));let at=st===ot;!at&&!n&&(at=st.startsWith(`${ot}/`));const yt=at?D:void 0;return(0,i.jsx)(p.N_,{...F,to:e,ref:Q,"aria-current":yt,style:{...s,...at?l:void 0},className:vn()([typeof a!="function"?a:void 0,at?y:void 0])})}),gs=(0,d.forwardRef)((r,e)=>{const{icon:n,text:s,hasNotifications:a=!1,hasSubmenu:l=!1,disableHighlight:b=!1,onClick:y,noTrack:D,children:F,className:Q,...st}=r,{sidebarConfig:ot}=(0,d.useContext)(be.yY),at=Do(ot),{isOpen:yt}=fr(),jt=!yt&&l?{display:"flex",marginLeft:"20px"}:{lineHeight:"0"},Kt=(0,i.jsxs)(sn.A,{style:jt,children:[(0,i.jsx)(n,{fontSize:"small"}),!yt&&l?(0,i.jsx)(us.A,{fontSize:"small"}):(0,i.jsx)(i.Fragment,{})]}),ve=(0,i.jsx)(pa.A,{color:"secondary",variant:"dot",overlap:"circular",invisible:!a,className:vn()({[at.closedItemIcon]:!yt}),children:Kt}),oe=(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(sn.A,{"data-testid":"login-button",className:at.iconContainer,children:ve}),s&&(0,i.jsx)(gr.A,{variant:"subtitle2",component:"span",className:at.label,children:s}),(0,i.jsx)("div",{className:at.secondaryAction,children:F})]}),Ie=yt?oe:ve,Xn={onClick:y,className:vn()(Q,at.root,yt?at.open:at.closed,vr(r)&&at.buttonItem,{[at.highlightable]:!b})},ys=(0,Lr.s)(),{pathname:mr}=(0,m.x$)(!vr(r)&&r.to?r.to:""),Es=(0,d.useCallback)(_a=>{if(!D){const Va="click",Ga=s!=null?s:"Sidebar Item",Ya=mr?{attributes:{to:mr}}:void 0;ys.captureEvent(Va,Ga,Ya)}y==null||y(_a)},[ys,s,mr,D,y]);return vr(r)?(0,i.jsx)(E.A,{role:"button","aria-label":s,...Xn,ref:e,onClick:Es,children:Ie}):(0,i.jsx)(Sa,{...Xn,activeClassName:at.selected,to:r.to?r.to:"",ref:e,"aria-label":s||r.to,...st,onClick:Es,children:Ie})}),Oa=({children:r,...e})=>{const{sidebarConfig:n}=(0,d.useContext)(be.yY),s=Do(n),[a,l]=(0,d.useState)(!1),b=(0,m.zy)(),y=Ca(r,b),D=(0,rs.A)(ot=>ot.breakpoints.down("sm")),F=()=>{l(!0)},Q=()=>{l(!1)},st=()=>D?a?(0,i.jsx)(ma.A,{fontSize:"small",className:s.submenuArrow}):(0,i.jsx)(va.A,{fontSize:"small",className:s.submenuArrow}):!a&&(0,i.jsx)(us.A,{fontSize:"small",className:s.submenuArrow});return(0,i.jsx)(be.U1.Provider,{value:{isHoveredOn:a,setIsHoveredOn:l},children:(0,i.jsxs)("div",{"data-testid":"item-with-submenu",onMouseLeave:Q,onTouchStart:a?Q:F,onMouseEnter:F,className:vn()(a&&s.highlighted),children:[(0,i.jsx)(gs,{hasSubmenu:!0,className:y?s.selected:"",...e,children:st()}),a&&r]})})},ps=(0,d.forwardRef)((r,e)=>{const[n]=(0,Oo.O)(r.children,s=>s.getElements().filter(a=>a.type===ba));return n?(0,i.jsx)(Oa,{...r,children:n}):(0,i.jsx)(gs,{...r,ref:e})});function ul(r){const{sidebarConfig:e}=useContext(SidebarConfigContext),[n,s]=useState(""),a=Do(e),l=r.icon?r.icon:SearchIcon,b=()=>{r.onSearch(n),s("")},y=st=>{st.key==="Enter"&&(st.preventDefault(),b())},D=st=>{s(st.target.value)},F=st=>{st.preventDefault(),st.stopPropagation()},Q=st=>{b(),st.preventDefault()};return _jsx(Box,{className:a.searchRoot,children:_jsx(ps,{icon:l,to:r.to,onClick:Q,disableHighlight:!0,children:_jsx(TextField,{placeholder:"Search",value:n,onClick:F,onChange:D,onKeyDown:y,className:a.searchContainer,InputProps:{disableUnderline:!0,className:a.searchField},inputProps:{className:a.searchFieldHTMLInput}})})})}const hl=(0,Io.A)("div")({flex:1},{name:"BackstageSidebarSpace"}),fl=(0,Io.A)("div")({height:8},{name:"BackstageSidebarSpacer"}),wa=(0,Io.A)("hr")(({theme:r})=>({height:1,width:"100%",background:"#383838",border:"none",margin:r.spacing(1.2,0)}),{name:"BackstageSidebarDivider"}),Pa=r=>({overflowY:"auto","&::-webkit-scrollbar":{backgroundColor:r.palette.background.default,width:"5px",borderRadius:"5px"},"&::-webkit-scrollbar-thumb":{backgroundColor:r.palette.text.secondary,borderRadius:"5px"}}),gl=(0,Io.A)("div")(({theme:r})=>{const e=Pa(r);return{flex:"0 1 auto",overflowX:"hidden",width:"100%",minHeight:"48px",overflowY:"hidden","@media (hover: none)":e,"&:hover":e}}),pl=()=>{const{sidebarConfig:r}=useContext(SidebarConfigContext),e=Do(r),{isOpen:n,setOpen:s}=useSidebarOpenState();if(useMediaQuery(b=>b.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,{})})})},Ta=(0,tn.A)({root:{width:be.hC.drawerWidthClosed,height:3*be.hC.logoHeight,display:"flex",flexFlow:"row nowrap",alignItems:"center",marginBottom:-14},link:{width:be.hC.drawerWidthClosed,marginLeft:24}}),Ra=()=>{const r=Ta(),{isOpen:e}=fr();return(0,i.jsx)("div",{className:r.root,children:(0,i.jsx)(ns.N_,{to:"/docs/default/component/local/",underline:"none",className:r.link,children:e?(0,i.jsx)(Qi,{}):(0,i.jsx)(Ji,{})})})},Ia=({children:r})=>(0,i.jsxs)(os.G,{children:[(0,i.jsxs)(fa,{children:[(0,i.jsx)(Ra,{}),(0,i.jsx)(wa,{}),(0,i.jsx)(ps,{icon:Gi.A,to:"/docs/default/component/local",text:"Docs Preview"})]}),r]});var Da=t(71677),Ma=t(62437),La=t(55484),ja=t(45061),Ba=t(16203);const Ua=(0,tn.A)(r=>({headerIcon:{color:r.palette.common.white,width:"32px",height:"32px"},content:{backgroundColor:r.palette.background.default},contentToolbar:{display:"flex",justifyContent:"flex-end",padding:0}}));var vs;(function(r){r.LIGHT="light",r.DARK="dark"})(vs||(vs={}));const $a=()=>{const r=(0,_n.gf)(ho),e=Ua(),[n,s]=(0,d.useState)(r.getActiveThemeId()==="dark"?"dark":"light"),a={light:{icon:La.A,title:"Dark theme"},dark:{icon:Ma.A,title:"Light theme"}},{title:l,icon:b}=a[n],y=()=>{s(D=>{const F=D==="light"?"dark":"light";return r.setActiveThemeId(F),F})};return(0,i.jsx)(sn.A,{display:"flex",alignItems:"center",mr:2,children:(0,i.jsx)(Da.Ay,{title:l,arrow:!0,children:(0,i.jsx)(ss.A,{size:"small",onClick:y,children:(0,i.jsx)(b,{className:e.headerIcon})})})})},Fa=()=>(0,i.jsxs)(v.Wj,{children:[(0,i.jsx)(ja.T,{}),(0,i.jsx)(Ba.p,{withSearch:!1})]}),Na=(0,i.jsx)(Fa,{}),ms=mi({apis:Ki,configLoader:Vi,plugins:Object.values(o)}),Wa=ms.getProvider(),ka=ms.getRouter(),Ka=v.Ju.provide((0,c.Hr)({name:"ThemeToggleAddon",component:$a,location:C.e.Header})),za=(0,i.jsxs)(Kr,{children:[(0,i.jsx)(m.C5,{to:"/docs/default/component/local/"},"/"),(0,i.jsx)(m.qh,{path:"/catalog/:namespace/:kind/:name",element:(0,i.jsx)(Ni,{})}),(0,i.jsx)(m.qh,{path:"/docs",element:(0,i.jsx)(v.$j,{}),children:(0,i.jsx)(f.K,{})}),(0,i.jsxs)(m.qh,{path:"/docs/:namespace/:kind/:name/*",element:(0,i.jsx)(v.Wj,{}),children:[Na,(0,i.jsx)(c.po,{children:(0,i.jsx)(Ka,{})})]})]});var Ha=()=>(0,i.jsx)(Wa,{children:(0,i.jsx)(ka,{children:(0,i.jsx)(Ia,{children:za})})});O.createRoot(document.getElementById("root")).render((0,i.jsx)(Ha,{}))},43836:function(Z,T,t){"use strict";t.d(T,{qO:function(){return O},tK:function(){return d}});var o=t(14041),i=t(63544);function d(v){return(0,i.Q)(v,()=>(0,o.createContext)(void 0))}function O(v){return(0,o.useContext)(d(v))}function m(v){return{set(f){globalThis[`__@backstage/${v}__`]=createContext(createVersionedValueMap(f))},reset(){delete globalThis[`__@backstage/${v}__`]}}}},10602:function(Z,T,t){"use strict";t.d(T,{B:function(){return o}});function o(i){Object.freeze(i);const d={atVersion(O){return i[O]}};return Object.defineProperty(d,"$map",{configurable:!0,enumerable:!0,get(){return i}}),d}},63544:function(Z,T,t){"use strict";t.d(T,{Q:function(){return O}});function o(){return typeof window!="undefined"&&window.Math===Math?window:typeof self!="undefined"&&self.Math===Math?self:Function("return this")()}const i=o(),d=m=>`__@backstage/${m}__`;function O(m,v){const f=d(m);let c=i[f];return c||(c=v(),i[f]=c,c)}},7341:function(Z,T,t){"use strict";t.d(T,{v:function(){return i}});var o=t(55309);const i=(0,o.y)({id:"plugin.catalog.service"})},82292:function(Z,T,t){"use strict";t.d(T,{n:function(){return i}});var o=t(55309);const i=(0,o.y)({id:"plugin.catalog.entity-presentation"})},88083:function(Z,T,t){"use strict";t.d(T,{T:function(){return m}});var o=t(6820),i=t(72348),d=t(46123),O=t.n(d);function m(c,C){const{kind:E,namespace:w,name:h,title:S,description:p,displayName:B,type:P}=v(c),A=(0,o.U2)({kind:E||"unknown",namespace:w||i.oQ,name:h||"unknown"}),U=f({kind:E,namespace:w,name:h,context:C}),M=[B,S,U].find(K=>K&&typeof K=="string"),x=[M!==A?A:void 0,P,p].filter(K=>K&&typeof K=="string").join(" | ");return{entityRef:A,primaryTitle:M,secondaryTitle:x||void 0,Icon:void 0}}function v(c){if(typeof c=="string"){let C=c.indexOf(":");const E=c.indexOf("/");E!==-1&&E<C&&(C=-1);const w=C===-1?void 0:c.slice(0,C),h=E===-1?void 0:c.slice(C+1,E),S=c.slice(Math.max(C+1,E+1));return{kind:w,namespace:h,name:S}}if(typeof c=="object"&&c!==null){const C=[O()(c,"kind")].find(P=>P&&typeof P=="string"),E=[O()(c,"metadata.namespace"),O()(c,"namespace")].find(P=>P&&typeof P=="string"),w=[O()(c,"metadata.name"),O()(c,"name")].find(P=>P&&typeof P=="string"),h=[O()(c,"metadata.title")].find(P=>P&&typeof P=="string"),S=[O()(c,"metadata.description")].find(P=>P&&typeof P=="string"),p=[O()(c,"spec.profile.displayName")].find(P=>P&&typeof P=="string"),B=[O()(c,"spec.type")].find(P=>P&&typeof P=="string");return{kind:C,namespace:E,name:w,title:h,description:S,displayName:p,type:B}}return{}}function f(c){var C,E,w,h,S;const p=((C=c.kind)===null||C===void 0?void 0:C.toLocaleLowerCase("en-US"))||"unknown",B=c.namespace||i.oQ,P=c.name||"unknown",A=(w=c.context)===null||w===void 0||(E=w.defaultKind)===null||E===void 0?void 0:E.toLocaleLowerCase("en-US"),U=(S=c.context)===null||S===void 0||(h=S.defaultNamespace)===null||h===void 0?void 0:h.toLocaleLowerCase("en-US");let M=P;return(U&&B.toLocaleLowerCase("en-US")!==U||B!==i.oQ)&&(M=`${B}/${M}`),A&&p.toLocaleLowerCase("en-US")!==A&&(M=`${p}:${M}`),M}},3169:function(Z,T,t){"use strict";t.d(T,{f:function(){return f}});var o=t(6820),i=t(72427),d=t(14041),O=t(82292),m=t(88083);function v(c,C,E){const[w,h]=(0,d.useState)(c);return(0,d.useEffect)(()=>{h(c);const S=C==null?void 0:C.subscribe({next:p=>{h(p)},complete:()=>{S==null||S.unsubscribe()}});return()=>{S==null||S.unsubscribe()}},E),w}function f(c,C){const w=(0,i.Q2)().get(O.n),h=[w,JSON.stringify(c),JSON.stringify(C||null)],S=(0,d.useMemo)(()=>{if(!w){const p=(0,m.T)(c,C);return{snapshot:p,promise:Promise.resolve(p)}}return w.forEntity(typeof c=="string"||"metadata"in c?c:(0,o.U2)(c),C)},h);return v(S.snapshot,S.update$,[S])}},18:function(Z,T,t){"use strict";t.d(T,{a:function(){return i}});var o=t(55309);const i=(0,o.y)({id:"catalog-react.starred-entities"})},54203:function(Z,T,t){"use strict";t.d(T,{GI:function(){return S}});var o=t(31085),i=t(14041),d=t(10394),O=t(64947),m=t(73845),v=t(42899),f=t(72501),c=t(5893),C=t(54917),E=t(65859);const w=p=>{var B;const P=(0,c.A)(K=>{var H,V;return K.breakpoints.down((V=(H=p.options)===null||H===void 0?void 0:H.drawerBreakpoint)!==null&&V!==void 0?V:"md")}),A=(0,C.A)(),[U,M]=(0,i.useState)(!1);var x;return P?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(O.A,{style:{marginTop:A.spacing(1),marginLeft:A.spacing(1)},onClick:()=>M(!0),startIcon:(0,o.jsx)(E.A,{}),children:"Filters"}),(0,o.jsx)(m.Ay,{open:U,onClose:()=>M(!1),anchor:(x=(B=p.options)===null||B===void 0?void 0:B.drawerAnchor)!==null&&x!==void 0?x:"left",disableAutoFocus:!0,keepMounted:!0,variant:"temporary",children:(0,o.jsxs)(d.A,{m:2,children:[(0,o.jsx)(f.A,{variant:"h6",component:"h2",style:{marginBottom:A.spacing(1)},children:"Filters"}),p.children]})})]}):(0,o.jsx)(v.A,{item:!0,lg:2,children:p.children})},h=p=>(0,o.jsx)(v.A,{item:!0,xs:12,lg:10,children:p.children}),S=p=>(0,o.jsx)(v.A,{container:!0,style:{position:"relative"},children:p.children});S.Filters=w,S.Content=h},50207:function(Z,T,t){"use strict";t.d(T,{y:function(){return _}});var o=t(31085),i=t(10394),d=t(72501),O=t(58837),m=t(6924),v=t(20577),f=t(14041),c=t(72427),C=t(73466),E=t(7341),w=t(69076),h=t(86901),S=t(44148),p=t(41260);const B=(0,o.jsx)(p.A,{fontSize:"small"}),P=(0,o.jsx)(S.A,{fontSize:"small"});function A({selected:et}){return(0,o.jsx)(w.A,{icon:B,checkedIcon:P,checked:et})}const U=(0,f.memo)(et=>{const{selected:q,value:ut,availableOptions:dt,showCounts:Ot}=et,ht=Ot?`${ut} (${dt==null?void 0:dt[ut]})`:ut;return(0,o.jsx)(h.A,{control:(0,o.jsx)(A,{selected:q}),label:ht,onClick:ct=>ct.preventDefault()})});var M=t(16249),x=t(53373),K=t.n(x);const H=(0,O.A)({input:{}},{name:"CatalogReactEntityAutocompletePickerInput"});function V(et){const q=H();return(0,o.jsx)(M.A,{variant:"outlined",...et,className:K()(q.input,et.className)})}var N=t(21405),z=t(26796);const J=(0,O.A)({root:{},label:{}},{name:"CatalogReactEntityAutocompletePicker"});function _(et){var q;const{label:ut,name:dt,path:Ot,showCounts:ht,Filter:ct,InputProps:lt,initialSelectedOptions:ft=[],filtersForAvailableValues:Et=["kind"]}=et,mt=J(),{updateFilters:wt,filters:vt,queryParameters:{[dt]:it}}=(0,N.nK)(),gt=(0,c.gf)(E.v),pt=Et.map(It=>vt[It]),{value:Pt}=(0,C.A)(async()=>{const It=Ot,{facets:Nt}=await gt.getEntityFacets({facets:[It],filter:(0,z.Rr)(pt.filter(Boolean))});return Object.fromEntries(Nt[It].map(({value:bt,count:Ft})=>[bt,Ft]))},[...pt]),xt=(0,f.useMemo)(()=>[it].flat().filter(Boolean),[it]);var W;const[G,At]=(0,f.useState)(xt.length?xt:(W=(q=vt[dt])===null||q===void 0?void 0:q.values)!==null&&W!==void 0?W:ft);(0,f.useEffect)(()=>{xt.length&&At(xt)},[xt]);const St=Object.keys(Pt!=null?Pt:{}),Ut=G.length&&St.length;(0,f.useEffect)(()=>{wt({[dt]:Ut?new ct(G):void 0})},[dt,Ut,G,ct,wt]);const Tt=vt[dt];return Tt&&typeof Tt=="object"&&!("values"in Tt)||!St.length?null:(0,o.jsx)(i.A,{className:mt.root,pb:1,pt:1,children:(0,o.jsxs)(d.A,{className:mt.label,variant:"button",component:"label",children:[ut,(0,o.jsx)(v.Ay,{multiple:!0,disableCloseOnSelect:!0,options:St,value:G,onChange:(It,Nt)=>At(Nt),renderOption:(It,{selected:Nt})=>(0,o.jsx)(U,{selected:Nt,value:It,availableOptions:Pt,showCounts:!!ht}),size:"small",popupIcon:(0,o.jsx)(m.A,{"data-testid":`${String(dt)}-picker-expand`}),renderInput:It=>(0,o.jsx)(V,{...It,...lt})})]})})}},72987:function(Z,T,t){"use strict";t.d(T,{t:function(){return vt}});var o=t(31085),i=t(6820),d=t(10394),O=t(69076),m=t(86901),v=t(16249),f=t(72501),c=t(71677),C=t(58837),E=t(44148),w=t(41260),h=t(6924),S=t(20577),p=t(14041),B=t(21405),P=t(92822),A=t(92367),U=t(48108),M=t(47966),x=t(90184),K=t(72427),H=t(87290),V=t(7341);function N({enabled:it}){const gt=(0,K.gf)(V.v),[pt]=(0,p.useState)(async()=>{if(!it)return[];const Pt="relations.ownedBy";return gt.getEntityFacets({facets:[Pt]}).then(xt=>xt.facets[Pt].map(W=>W.value).map(W=>{const{kind:G,name:At,namespace:St}=(0,i.KU)(W);return{apiVersion:"backstage.io/v1beta1",kind:G,metadata:{name:At,namespace:St}}}).sort((W,G)=>(W.metadata.namespace||"").localeCompare(G.metadata.namespace||"","en-US")||W.metadata.name.localeCompare(G.metadata.name,"en-US")||W.kind.localeCompare(G.kind,"en-US"))).catch(()=>[])});return(0,H.A)(async(Pt,xt)=>{const W=await pt;if(!W)return{items:[]};var G;const At=(G=xt==null?void 0:xt.limit)!==null&&G!==void 0?G:20,{text:St,start:Ut}=z(Pt),Tt=W.filter(Nt=>et(St,Nt)),It=Ut+At;return{items:Tt.slice(0,It),..._({entities:Tt,limit:It,payload:{text:St,start:It}})}},[pt],{loading:!0,value:{items:[]}})}function z(it){return J(it)&&it.cursor?JSON.parse(atob(it.cursor)):{text:it.text||"",start:0}}function J(it){return!!it.cursor}function _({entities:it,limit:gt,payload:pt}){return it.length>gt?{cursor:btoa(JSON.stringify(pt))}:{}}function et(it,gt){var pt;const Pt=it.trim();return gt.kind.includes(Pt)||((pt=gt.metadata.namespace)===null||pt===void 0?void 0:pt.includes(Pt))||gt.metadata.name.includes(Pt)}function q(){const it=(0,K.gf)(V.v);return(0,H.A)(async(gt,pt)=>{const Pt=gt,xt=gt;var W;const G=(W=pt==null?void 0:pt.limit)!==null&&W!==void 0?W:20;if(xt.cursor){const St=await it.queryEntities({cursor:xt.cursor,limit:G});return{cursor:St.pageInfo.nextCursor,items:[...xt.items,...St.items]}}const At=await it.queryEntities({fullTextFilter:{term:Pt.text||"",fields:["metadata.name","kind","spec.profile.displayname","metadata.title"]},filter:{kind:["User","Group"]},orderFields:[{field:"metadata.name",order:"asc"}],limit:G});return{cursor:At.pageInfo.nextCursor,items:At.items}},[],{loading:!0})}var ut=t(76842);function dt({mode:it,initialSelectedOwnersRefs:gt}){const pt=it==="owners-only",Pt=q(),xt=N({enabled:pt}),[W,G]=pt?xt:Pt;return[W,G,Ot({enabled:!pt,initialSelectedOwnersRefs:gt})]}function Ot({enabled:it,initialSelectedOwnersRefs:gt}){const pt=(0,p.useRef)({}),Pt=(0,K.gf)(V.v),[,xt]=(0,H.A)(async()=>{(await Pt.getEntitiesByRefs({entityRefs:gt})).items.forEach(G=>{G&&(pt.current[(0,i.U2)(G)]=G)})},[]);return(0,ut.u)(()=>{it&>.length>0&&xt()}),{getEntity:W=>pt.current[W],setEntity:W=>{pt.current[(0,i.U2)(W)]=W}}}var ht=t(87051),ct=t(3169);const lt=(0,C.A)({root:{},label:{},input:{},fullWidth:{width:"100%"},boxLabel:{width:"100%",textOverflow:"ellipsis",overflow:"hidden"}},{name:"CatalogReactEntityOwnerPicker"}),ft=(0,ht.A)(it=>({label:{width:"100%"},root:{width:"90%"}}),{name:"FixedWidthFormControlLabel"})(m.A),Et=(0,o.jsx)(w.A,{fontSize:"small"}),mt=(0,o.jsx)(E.A,{fontSize:"small"});function wt(it){const gt=lt(),pt=it.entity.kind.toLocaleLowerCase("en-US")==="group",{primaryTitle:Pt}=(0,ct.f)(it.entity);return(0,o.jsx)(d.A,{className:gt.fullWidth,children:(0,o.jsx)(ft,{className:gt.fullWidth,control:(0,o.jsx)(O.A,{icon:Et,checkedIcon:mt,checked:it.isSelected}),onClick:xt=>xt.preventDefault(),label:(0,o.jsx)(c.Ay,{title:Pt,children:(0,o.jsxs)(d.A,{display:"flex",alignItems:"center",children:[pt?(0,o.jsx)(M.A,{fontSize:"small"}):(0,o.jsx)(U.A,{fontSize:"small"}),"\xA0",(0,o.jsx)(d.A,{className:gt.boxLabel,children:(0,o.jsx)(f.A,{noWrap:!0,children:Pt})})]})})})})}const vt=it=>{var gt,pt;const Pt=lt(),{mode:xt="owners-only"}=it||{},{updateFilters:W,filters:G,queryParameters:{owners:At}}=(0,B.nK)(),[St,Ut]=(0,p.useState)(""),Tt=(0,p.useMemo)(()=>[At].flat().filter(Boolean),[At]);var It;const[Nt,bt]=(0,p.useState)(Tt.length?Tt:(It=(gt=G.owners)===null||gt===void 0?void 0:gt.values)!==null&&It!==void 0?It:[]),[{value:Ft,loading:Jt},ge,ce]=dt({mode:xt,initialSelectedOwnersRefs:Nt});(0,A.s)(()=>ge({text:St}),[St,ge],250);const de=(Ft==null?void 0:Ft.items)||[];return(0,p.useEffect)(()=>{if(Tt.length){const zt=new P.N9(Tt);bt(zt.values)}},[Tt]),(0,p.useEffect)(()=>{W({owners:Nt.length?new P.N9(Nt):void 0})},[Nt,W]),["user","group"].includes(((pt=G.kind)===null||pt===void 0?void 0:pt.value.toLocaleLowerCase("en-US"))||"")?null:(0,o.jsx)(d.A,{className:Pt.root,pb:1,pt:1,children:(0,o.jsxs)(f.A,{className:Pt.label,variant:"button",component:"label",children:["Owner",(0,o.jsx)(S.Ay,{multiple:!0,disableCloseOnSelect:!0,loading:Jt,options:de,value:Nt,getOptionSelected:(zt,Xt)=>typeof Xt=="string"?(0,i.U2)(zt)===Xt:zt===Xt,getOptionLabel:zt=>{const Xt=typeof zt=="string"?ce.getEntity(zt)||(0,i.KU)(zt,{defaultKind:"group",defaultNamespace:"default"}):zt;return(0,x.Z)(Xt,(0,x.S)(Xt))},onChange:(zt,Xt)=>{Ut(""),bt(Xt.map(me=>{const Ne=typeof me=="string"?me:(0,i.U2)(me);return typeof me!="string"&&ce.setEntity(me),Ne}))},filterOptions:zt=>zt,renderOption:(zt,{selected:Xt})=>(0,o.jsx)(wt,{entity:zt,isSelected:Xt}),size:"small",popupIcon:(0,o.jsx)(h.A,{"data-testid":"owner-picker-expand"}),renderInput:zt=>(0,o.jsx)(v.A,{...zt,className:Pt.input,onChange:Xt=>{Ut(Xt.currentTarget.value)},variant:"outlined"}),ListboxProps:{onScroll:zt=>{const Xt=zt.currentTarget;Math.abs(Xt.scrollHeight-Xt.clientHeight-Xt.scrollTop)<1&&(Ft!=null&&Ft.cursor)&&ge({items:Ft.items,cursor:Ft.cursor})},"data-testid":"owner-picker-listbox"}})]})})}},8859:function(Z,T,t){"use strict";t.d(T,{z:function(){return p}});var o=t(31085),i=t(6820),d=t(72348),O=t(72072),m=t(9222),v=t(14041),f=t(29207),c=t(10394),C=t(71677),E=t(58837),w=t(3169);const h=(0,E.A)(P=>({root:{display:"inline-flex",alignItems:"center"},icon:{marginRight:P.spacing(.5),color:P.palette.text.secondary,lineHeight:0}}),{name:"CatalogReactEntityDisplayName"}),S=P=>{const{entityRef:A,hideIcon:U,disableTooltip:M,defaultKind:x,defaultNamespace:K}=P,H=h(),{primaryTitle:V,secondaryTitle:N,Icon:z}=(0,w.f)(A,{defaultKind:x,defaultNamespace:K});let J=(0,o.jsx)(o.Fragment,{children:V});return J=(0,o.jsxs)(c.A,{component:"span",className:H.root,children:[z&&!U?(0,o.jsx)(c.A,{component:"span",className:H.icon,children:(0,o.jsx)(z,{fontSize:"inherit"})}):null,J]}),N&&!M&&(J=(0,o.jsx)(C.Ay,{enterDelay:1500,title:N,children:J})),J},p=(0,v.forwardRef)((P,A)=>{const{entityRef:U,defaultKind:M,defaultNamespace:x,title:K,children:H,hideIcon:V,...N}=P,z=B(P.entityRef);var J;const _=(J=H!=null?H:K)!==null&&J!==void 0?J:(0,o.jsx)(S,{entityRef:U,defaultKind:M,defaultNamespace:x,hideIcon:V});return(0,o.jsx)(O.N_,{...N,ref:A,to:z,children:_})});function B(P){const A=(0,m.S)(f.s);let U,M,x;if(typeof P=="string"){const V=(0,i.KU)(P);U=V.kind,M=V.namespace,x=V.name}else"metadata"in P?(U=P.kind,M=P.metadata.namespace,x=P.metadata.name):(U=P.kind,M=P.namespace,x=P.name);U=U.toLocaleLowerCase("en-US");var K;M=(K=M==null?void 0:M.toLocaleLowerCase("en-US"))!==null&&K!==void 0?K:d.oQ;const H={kind:encodeURIComponent(U),namespace:encodeURIComponent(M),name:encodeURIComponent(x)};return A(H)}},34428:function(Z,T,t){"use strict";t.d(T,{i:function(){return m}});var o=t(31085),i=t(6820),d=t(14041),O=t(8859);function m(v){const{entityRefs:f,hideIcons:c,...C}=v;return(0,o.jsx)(o.Fragment,{children:f.map((E,w)=>{const h=typeof E=="string"?E:(0,i.U2)(E);return(0,o.jsxs)(d.Fragment,{children:[w>0&&", ",(0,o.jsx)(O.z,{...C,entityRef:E,hideIcon:c})]},`${w}.${h}`)})})}},90184:function(Z,T,t){"use strict";t.d(T,{S:function(){return O},Z:function(){return m}});var o=t(72348),i=t(46123),d=t.n(i);function O(v,f){const c=f==null?void 0:f.defaultKind;let C,E,w;return"metadata"in v?(C=v.kind,E=v.metadata.namespace,w=v.metadata.name):(C=v.kind,E=v.namespace,w=v.name),(E===void 0||E==="")&&(E=o.oQ),(f==null?void 0:f.defaultNamespace)!==void 0?(f==null?void 0:f.defaultNamespace)===E&&(E=void 0):E===o.oQ&&(E=void 0),C=C.toLocaleLowerCase("en-US"),C=c&&c.toLocaleLowerCase("en-US")===C?void 0:C,`${C?`${C}:`:""}${E?`${E}/`:""}${w}`}function m(v,f){for(const c of["spec.profile.displayName","metadata.title"]){const C=d()(v,c);if(C&&typeof C=="string")return C}return f}},91035:function(Z,T,t){"use strict";t.d(T,{m:function(){return f}});var o=t(31085),i=t(58837),d=t(14041),O=t(92822),m=t(50207);const v=(0,i.A)({input:{}},{name:"CatalogReactEntityTagPicker"}),f=c=>{const C=v();return(0,o.jsx)(m.y,{label:"Tags",name:"tags",path:"metadata.tags",Filter:O.q_,showCounts:c.showCounts,InputProps:{className:C.input}})}},67626:function(Z,T,t){"use strict";t.d(T,{y:function(){return Ot}});var o=t(31085),i=t(72427),d=t(65461),O=t(40703),m=t(58007),v=t(46423),f=t(65569),c=t(5951),C=t(26343),E=t(72501),w=t(58837),h=t(9684),S=t(80109),p=t(14041),B=t(92822),P=t(21405),A=t(16009),U=t(45250),M=t(73466),x=t(7341),K=t(26796),H=t(87290),V=t(48899);function N(){const ht=(0,i.gf)(A.K),ct=(0,i.gf)(x.v),{filters:lt}=(0,P.nK)(),{value:ft,loading:Et}=(0,M.A)(async()=>(await ht.getBackstageIdentity()).ownershipEntityRefs,[]),{user:mt,owners:wt,...vt}=lt,it=(0,K.$3)((0,U.compact)(Object.values(vt))),[{value:gt,loading:pt},Pt]=(0,H.A)(async W=>{const G=z(W.owners,W.ownershipEntityRefs);if(G===void 0)return 0;const{["metadata.name"]:At,...St}=W.filter.filter,{totalItems:Ut}=await ct.queryEntities({...W.filter,filter:{...St,"relations.ownedBy":G},limit:0});return Ut},[],{loading:!0});return(0,V.A)(()=>{Object.keys(it.filter).length!==0&&ft!==void 0&&Pt({ownershipEntityRefs:ft,owners:wt,filter:it})},[ft,wt,it]),{count:gt,loading:Et||pt,filter:(0,p.useMemo)(()=>B.tN.owned(ft!=null?ft:[]),[ft]),ownershipEntityRefs:ft}}function z(ht,ct){if(ct===void 0)return;var lt;const ft=(lt=ht==null?void 0:ht.values)!==null&<!==void 0?lt:[];if(ft.length){const Et=(0,U.intersection)(ft,ct);return Et.length===0?void 0:Et}return ct}function J(){const ht=(0,i.gf)(x.v),{filters:ct}=(0,P.nK)(),lt=(0,p.useRef)(),ft=(0,p.useMemo)(()=>{const{user:wt,...vt}=ct,it=(0,U.compact)(Object.values(vt)),gt=(0,K.$3)(it),pt={...gt,limit:0};return Object.keys(gt.filter).length===0?(lt.current=void 0,lt.current):(0,U.isEqual)(pt,lt.current)?lt.current:(lt.current=pt,pt)},[ct]),{value:Et,loading:mt}=(0,M.A)(async()=>{if(ft===void 0)return 0;const{totalItems:wt}=await ht.queryEntities(ft);return wt},[ft]);return{count:Et,loading:mt}}var _=t(6820),et=t(56889);function q(){const ht=(0,i.gf)(x.v),{filters:ct}=(0,P.nK)(),{starredEntities:lt}=(0,et.I)(),ft=(0,p.useRef)(),Et=(0,p.useMemo)(()=>{const{user:it,...gt}=ct,pt=(0,U.compact)(Object.values(gt)),Pt=(0,K.$3)(pt),W={...Pt,filter:{...Pt.filter,["metadata.name"]:Array.from(lt).map(G=>(0,_.KU)(G).name)},limit:1e3};return(0,U.isEqual)(W,ft.current)?ft.current:(ft.current=W,W)},[ct,lt]),{value:mt,loading:wt}=(0,M.A)(async()=>lt.size?(await ht.queryEntities(Et)).items.map(gt=>(0,_.U2)({kind:gt.kind,namespace:gt.metadata.namespace,name:gt.metadata.name})).filter(gt=>lt.has(gt)).length:0,[Et,lt]),vt=(0,p.useMemo)(()=>B.tN.starred(Array.from(lt)),[lt]);return{count:mt,loading:wt,filter:vt}}const ut=(0,w.A)(ht=>({root:{backgroundColor:"rgba(0, 0, 0, .11)",boxShadow:"none",margin:ht.spacing(1,0,1,0)},title:{margin:ht.spacing(1,0,0,1),textTransform:"uppercase",fontSize:12,fontWeight:"bold"},listIcon:{minWidth:30,color:ht.palette.text.primary},menuItem:{minHeight:ht.spacing(6)},groupWrapper:{margin:ht.spacing(1,1,2,1)}}),{name:"CatalogReactUserListPicker"});function dt(ht){return[{name:"Personal",items:[{id:"owned",label:"Owned",icon:h.A},{id:"starred",label:"Starred",icon:S.A}]},{name:ht!=null?ht:"Company",items:[{id:"all",label:"All"}]}]}const Ot=ht=>{const{initialFilter:ct,availableFilters:lt}=ht,ft=ut(),Et=(0,i.gf)(d.U);var mt;const wt=(mt=Et.getOptionalString("organization.name"))!==null&&mt!==void 0?mt:"Company",{filters:vt,updateFilters:it,queryParameters:{kind:gt,user:pt}}=(0,P.nK)(),Pt=["starred","all"],xt=dt(wt).map(ce=>({...ce,items:ce.items.filter(({id:de})=>["group","user"].some(zt=>zt===gt)?Pt.includes(de):!lt||lt.includes(de))})).filter(({items:ce})=>!!ce.length),{count:W,loading:G,filter:At}=N(),{count:St}=J(),{count:Ut,filter:Tt,loading:It}=q(),Nt=(0,p.useMemo)(()=>[pt].flat()[0],[pt]),[bt,Ft]=(0,p.useState)(Nt!=null?Nt:ct),Jt=(0,p.useMemo)(()=>({all:St,starred:Ut,owned:W}),[Ut,W,St]);(0,p.useEffect)(()=>{Nt&&Ft(Nt)},[Nt]);const ge=G||It;return(0,p.useEffect)(()=>{!ge&&bt&&bt!=="all"&&Jt[bt]===0&&Ft("all")},[ge,Jt,bt,Ft]),(0,p.useEffect)(()=>{if(!bt||ge)return;it({user:bt==="owned"?At:bt==="starred"?Tt:B.tN.all()})},[bt,Tt,At,it,ge]),(0,o.jsx)(O.A,{className:ft.root,children:xt.map(ce=>(0,o.jsxs)(p.Fragment,{children:[(0,o.jsx)(E.A,{variant:"subtitle2",component:"span",className:ft.title,children:ce.name}),(0,o.jsx)(O.A,{className:ft.groupWrapper,children:(0,o.jsx)(m.A,{disablePadding:!0,dense:!0,role:"menu","aria-label":ce.name,children:ce.items.map(de=>{var zt,Xt;return(0,o.jsxs)(C.A,{role:"none presentation",divider:!0,onClick:()=>Ft(de.id),selected:de.id===((zt=vt.user)===null||zt===void 0?void 0:zt.value),className:ft.menuItem,disabled:Jt[de.id]===0,"data-testid":`user-picker-${de.id}`,tabIndex:0,ContainerProps:{role:"menuitem"},children:[de.icon&&(0,o.jsx)(v.A,{className:ft.listIcon,children:(0,o.jsx)(de.icon,{fontSize:"small"})}),(0,o.jsx)(c.A,{children:(0,o.jsxs)(E.A,{variant:"body1",children:[de.label," "]})}),(0,o.jsx)(f.A,{children:(Xt=Jt[de.id])!==null&&Xt!==void 0?Xt:"-"})]},de.id)})})})]},ce.name))})}},92822:function(Z,T,t){"use strict";t.d(T,{I5:function(){return E},Kf:function(){return p},N9:function(){return C},V3:function(){return c},gM:function(){return m},gZ:function(){return S},mT:function(){return B},qA:function(){return v},q_:function(){return f},tN:function(){return h},z:function(){return w}});var o=t(18990),i=t(51372),d=t(6820),O=t(67871);class m{getCatalogFilters(){return{kind:this.value}}toQueryValue(){return this.value}constructor(A){(0,o._)(this,"value",void 0),this.value=A}}class v{getTypes(){return Array.isArray(this.value)?this.value:[this.value]}getCatalogFilters(){return{"spec.type":this.getTypes()}}toQueryValue(){return this.getTypes()}constructor(A){(0,o._)(this,"value",void 0),this.value=A}}class f{filterEntity(A){return this.values.every(U=>{var M;return((M=A.metadata.tags)!==null&&M!==void 0?M:[]).includes(U)})}getCatalogFilters(){return{"metadata.tags":this.values}}toQueryValue(){return this.values}constructor(A){(0,o._)(this,"values",void 0),this.values=A}}class c{filterEntity(A){const U=this.toUpperArray(this.value.split(/\s/)),M=this.toUpperArray([A.metadata.tags]),x=this.toUpperArray([A.metadata.name,A.metadata.title]);for(const K of U)if(M.every(H=>H!==K)&&x.every(H=>!H.includes(K)))return!1;return!0}getFullTextFilters(){return{term:this.value,fields:["metadata.name","metadata.title","spec.profile.displayName"]}}toQueryValue(){return this.value}toUpperArray(A){return A.flat().filter(U=>!!U).map(U=>U.toLocaleUpperCase("en-US"))}constructor(A){(0,o._)(this,"value",void 0),this.value=A}}class C{getCatalogFilters(){return{"relations.ownedBy":this.values}}filterEntity(A){return this.values.some(U=>(0,O.t)(A,i.vv).some(M=>(0,d.U2)(M)===U))}toQueryValue(){return this.values}constructor(A){(0,o._)(this,"values",void 0),this.values=A.reduce((U,M)=>{try{return U.push((0,d.U2)((0,d.KU)(M,{defaultKind:"Group"}))),U}catch{return U}},[])}}class E{getCatalogFilters(){return{"spec.lifecycle":this.values}}filterEntity(A){return this.values.some(U=>{var M;return((M=A.spec)===null||M===void 0?void 0:M.lifecycle)===U})}toQueryValue(){return this.values}constructor(A){(0,o._)(this,"values",void 0),this.values=A}}class w{getCatalogFilters(){return{"metadata.namespace":this.values}}filterEntity(A){return this.values.some(U=>A.metadata.namespace===U)}toQueryValue(){return this.values}constructor(A){(0,o._)(this,"values",void 0),this.values=A}}class h{static owned(A){return new h("owned",A)}static all(){return new h("all")}static starred(A){return new h("starred",A)}getCatalogFilters(){if(this.value==="owned"){var A;return{"relations.ownedBy":(A=this.refs)!==null&&A!==void 0?A:[]}}if(this.value==="starred"){var U,M;return{"metadata.name":(M=(U=this.refs)===null||U===void 0?void 0:U.map(x=>(0,d.KU)(x).name))!==null&&M!==void 0?M:[]}}return{}}filterEntity(A){if(this.value==="starred"){var U,M;return(M=(U=this.refs)===null||U===void 0?void 0:U.includes((0,d.U2)(A)))!==null&&M!==void 0?M:!0}if(this.value==="owned"){var x;const H=(0,O.t)(A,i.vv);var K;return(K=(x=this.refs)===null||x===void 0?void 0:x.some(V=>H.some(N=>(0,d.U2)(N)===V)))!==null&&K!==void 0?K:!1}return!0}toQueryValue(){return this.value}constructor(A,U){(0,o._)(this,"value",void 0),(0,o._)(this,"refs",void 0),this.value=A,this.refs=U}}class S{filterEntity(A){switch(this.value){case"owned":return this.isOwnedEntity(A);case"starred":return this.isStarredEntity(A);default:return!0}}toQueryValue(){return this.value}constructor(A,U,M){(0,o._)(this,"value",void 0),(0,o._)(this,"isOwnedEntity",void 0),(0,o._)(this,"isStarredEntity",void 0),this.value=A,this.isOwnedEntity=U,this.isStarredEntity=M}}class p{getCatalogFilters(){return this.value?{"metadata.annotations.backstage.io/orphan":String(this.value)}:{}}filterEntity(A){var U;const M=(U=A.metadata.annotations)===null||U===void 0?void 0:U["backstage.io/orphan"];return M!==void 0&&this.value.toString()===M}constructor(A){(0,o._)(this,"value",void 0),this.value=A}}class B{filterEntity(A){var U,M;const x=(A==null||(M=A.status)===null||M===void 0||(U=M.items)===null||U===void 0?void 0:U.length)>0;return x!==void 0&&this.value===x}constructor(A){(0,o._)(this,"value",void 0),this.value=A}}},21405:function(Z,T,t){"use strict";t.d(T,{B9:function(){return B},nK:function(){return P}});var o=t(31085),i=t(45250),d=t.n(i),O=t(45810),m=t.n(O),v=t(14041),f=t(18690),c=t(87290),C=t(22771),E=t(71581),w=t(7341),h=t(26796),S=t(72427);const p=(0,v.createContext)(void 0),B=A=>{const U=(0,E.A)(),M=(0,S.gf)(w.v),[x,K]=(0,v.useState)({}),H=(0,f.zy)(),V=A.pagination===!0||typeof A.pagination=="object",N=A.pagination&&typeof A.pagination=="object"&&typeof A.pagination.limit=="number"?A.pagination.limit:20,{queryParameters:z,cursor:J}=(0,v.useMemo)(()=>{const Et=m().parse(H.search,{ignoreQueryPrefix:!0});var mt;return{queryParameters:(mt=Et.filters)!==null&&mt!==void 0?mt:{},cursor:typeof Et.cursor=="string"?Et.cursor:void 0}},[H]),[_,et]=(0,v.useState)(J),[q,ut]=(0,v.useState)(()=>({appliedFilters:{},entities:[],backendEntities:[],pageInfo:V?{}:void 0})),[{loading:dt,error:Ot},ht]=(0,c.A)(async()=>{const Et=(0,i.compact)(Object.values(x)),mt=Object.keys(x).reduce((vt,it)=>{const gt=x[it];return gt!=null&>.toQueryValue&&(vt[it]=gt.toQueryValue()),vt},{});if(V)if(_){if(_!==q.appliedCursor){const vt=(0,h.be)(Et),it=await M.queryEntities({cursor:_,limit:N});ut({appliedFilters:x,appliedCursor:_,backendEntities:it.items,entities:it.items.filter(vt),pageInfo:it.pageInfo,totalItems:it.totalItems})}}else{const vt=(0,h.be)(Et),it=(0,h.$3)(Et),gt=(0,h.$3)((0,i.compact)(Object.values(q.appliedFilters)));if(!(0,i.isEqual)(gt,it)){const pt=await M.queryEntities({...it,limit:N,orderFields:[{field:"metadata.name",order:"asc"}]});ut({appliedFilters:x,backendEntities:pt.items,entities:pt.items.filter(vt),pageInfo:pt.pageInfo,totalItems:pt.totalItems})}}else{const vt=(0,h.be)(Et),it=(0,h.Rr)(Et),gt=(0,h.Rr)((0,i.compact)(Object.values(q.appliedFilters)));if((0,i.isEqual)(gt,it)){const pt=q.backendEntities.filter(vt);ut({appliedFilters:x,backendEntities:q.backendEntities,entities:pt,totalItems:pt.length})}else{const pt=await M.getEntities({filter:it}),Pt=pt.items.filter(vt);ut({appliedFilters:x,backendEntities:pt.items,entities:Pt,totalItems:Pt.length})}}if(U()){var wt;const vt=m().parse(H.search,{ignoreQueryPrefix:!0}),it=m().stringify({...vt,filters:mt,cursor:_},{addQueryPrefix:!0,arrayFormat:"repeat"}),gt=`${window.location.pathname}${it}`;(wt=window.history)===null||wt===void 0||wt.replaceState(null,document.title,gt)}},[M,z,x,q,_,V],{loading:!0});(0,C.A)(ht,10,[x,_]);const ct=(0,v.useCallback)(Et=>{et(void 0),K(mt=>{const wt=typeof Et=="function"?Et(mt):Et;return{...mt,...wt}})},[]),lt=(0,v.useMemo)(()=>{var Et,mt;if(!V)return;const wt=(Et=q.pageInfo)===null||Et===void 0?void 0:Et.prevCursor,vt=(mt=q.pageInfo)===null||mt===void 0?void 0:mt.nextCursor;return{prev:wt?()=>et(wt):void 0,next:vt?()=>et(vt):void 0}},[V,q.pageInfo]),ft=(0,v.useMemo)(()=>({filters:q.appliedFilters,entities:q.entities,backendEntities:q.backendEntities,updateFilters:ct,queryParameters:z,loading:dt,error:Ot,pageInfo:lt,totalItems:q.totalItems}),[q,ct,z,dt,Ot,lt]);return(0,o.jsx)(p.Provider,{value:ft,children:A.children})};function P(){const A=(0,v.useContext)(p);if(!A)throw new Error("useEntityList must be used within EntityListProvider");return A}},56889:function(Z,T,t){"use strict";t.d(T,{I:function(){return f}});var o=t(6820),i=t(72427),d=t(14041),O=t(1394),m=t(18);function v(c){return typeof c=="string"?c:(0,o.U2)(c)}function f(){const c=(0,i.gf)(m.a),C=(0,O.A)((0,d.useMemo)(()=>c.starredEntitie$(),[c]),new Set),E=(0,d.useCallback)(h=>C.has(v(h)),[C]),w=(0,d.useCallback)(h=>c.toggleStarred(v(h)).then(),[c]);return{starredEntities:C,toggleStarredEntity:w,isStarredEntity:E}}},29207:function(Z,T,t){"use strict";t.d(T,{s:function(){return d}});var o=t(34569),i=t(63544);const d=(0,i.Q)("catalog:entity-route-ref",()=>(0,o.H)({id:"catalog:entity",params:["namespace","kind","name"]}));function O(m){var v,f;return{kind:m.kind.toLocaleLowerCase("en-US"),namespace:(f=(v=m.metadata.namespace)===null||v===void 0?void 0:v.toLocaleLowerCase("en-US"))!==null&&f!==void 0?f:DEFAULT_NAMESPACE,name:m.metadata.name}}},26796:function(Z,T,t){"use strict";t.d(T,{$3:function(){return d},Rr:function(){return O},be:function(){return m}});var o=t(92822);function i(v){return!!v.getFullTextFilters}function d(v){var f;const c=v.reduce((E,w)=>({...E,...w.getCatalogFilters?w.getCatalogFilters():{}}),{}),C=(f=v.find(i))===null||f===void 0?void 0:f.getFullTextFilters();return{filter:c,fullTextFilter:C}}function O(v){const f={};return v.forEach(c=>{var C;c instanceof o.q_||c instanceof o.N9||c instanceof o.I5||c instanceof o.z||c instanceof o.tN||c instanceof o.Kf||c instanceof o.V3||c instanceof o.gZ||Object.assign(f,((C=c.getCatalogFilters)===null||C===void 0?void 0:C.call(c))||{})}),f}function m(v){return f=>v.every(c=>!c.filterEntity||c.filterEntity(f))}},67871:function(Z,T,t){"use strict";t.d(T,{t:function(){return i}});var o=t(6820);function i(d,O,m){var v;let f=(d==null||(v=d.relations)===null||v===void 0?void 0:v.filter(c=>c.type===O).map(c=>(0,o.KU)(c.targetRef)))||[];return m!=null&&m.kind&&(f=f.filter(c=>c.kind.toLocaleLowerCase("en-US")===m.kind.toLocaleLowerCase("en-US"))),f}},95203:function(Z,T,t){"use strict";t.d(T,{qP:function(){return c},Zg:function(){return E},rQ:function(){return h},pS:function(){return w},UJ:function(){return C}});var o=t(18990),i=t(59598);let d=i.b,O=d;class m{toString(){return`routeRef{type=external,id=${this.id}}`}getDefaultTarget(){return this.defaultTarget}constructor(p,B,P,A){(0,o._)(this,"id",void 0),(0,o._)(this,"params",void 0),(0,o._)(this,"optional",void 0),(0,o._)(this,"defaultTarget",void 0),(0,o._)(this,O,void 0),this.id=p,this.params=B,this.optional=P,this.defaultTarget=A,this[d]="external"}}function v(S){var p;return new m(S.id,(p=S.params)!==null&&p!==void 0?p:[],!!S.optional,S==null?void 0:S.defaultTarget)}var f=t(34569);const c=v({id:"create-component",optional:!0,defaultTarget:"scaffolder.createComponent"}),C=v({id:"view-techdoc",optional:!0,params:["namespace","kind","name"],defaultTarget:"techdocs.docRoot"}),E=v({id:"create-from-template",optional:!0,params:["namespace","templateName"],defaultTarget:"scaffolder.selectedTemplate"}),w=v({id:"catalog:unregister-redirect",optional:!0}),h=(0,f.H)({id:"catalog"})},54241:function(Z,T,t){"use strict";t.d(T,{b:function(){return o}});var o;(function(i){i.DENY="DENY",i.ALLOW="ALLOW",i.CONDITIONAL="CONDITIONAL"})(o||(o={}))},96824:function(Z,T,t){"use strict";t.d(T,{x:function(){return i}});var o=t(55309);const i=(0,o.y)({id:"plugin.permission.api"})},70734:function(Z,T,t){"use strict";t.d(T,{e:function(){return m}});var o=t(31085),i=t(14041),d=t(58837);const O=(0,d.A)(()=>({highlight:{}}),{name:"BackstageHighlightedSearchResultText"}),m=v=>{const{text:f,preTag:c,postTag:C}=v,E=O(),w=(0,i.useMemo)(()=>f.split(new RegExp(`(${c}.+?${C})`)),[C,c,f]);return(0,o.jsx)(o.Fragment,{children:w.map((h,S)=>h.includes(c)?(0,o.jsx)("mark",{className:E.highlight,children:h.replace(new RegExp(`${c}|${C}`,"g"),"")},S):h)})}},54560:function(Z,T,t){"use strict";t.d(T,{ec:function(){return C}});var o=t(31085),i=t(14041),d=t(93368),O=t(88758),m=t(8109);const v="search.results.list.items.extensions.v1",f=(h,S)=>{for(const p of h){if(!isValidElement(p))continue;const B=getComponentData(p,v);if(B!=null&&B(S))return cloneElement(p,{rank:S.rank,highlight:S.highlight,result:S.document,...p.props})}return null},c=h=>{const{rank:S,result:p,noTrack:B,children:P,alignItems:A="flex-start",...U}=h,M=(0,d.s)(),x=(0,i.useCallback)(()=>{B||p&&M.captureEvent("discover",p.title,{attributes:{to:p.location},value:S})},[S,p,B,M]);return(0,o.jsx)(m.A,{divider:!0,alignItems:A,onClickCapture:x,...U,children:P})},C=h=>{const{name:S,component:p,predicate:B=()=>!0}=h;return(0,O.zZ)({name:S,component:{lazy:()=>p().then(P=>A=>(0,o.jsx)(c,{rank:A.rank,result:A.result,noTrack:A.noTrack,children:(0,i.createElement)(P,A)}))},data:{[v]:B}})},E=h=>{const S=useElementFilter(h,p=>p.selectByComponentData({key:v}).getElements(),[h]);return useCallback((p,B)=>{const P=f(S,p);return _jsx(Fragment,{children:P!=null?P:_jsx(c,{rank:p.rank,result:p.document,children:_jsx(DefaultResultListItem,{rank:p.rank,highlight:p.highlight,result:p.document})})},B)},[S])},w=h=>{const{results:S,children:p,...B}=h,P=E(p);return _jsx(List,{...B,children:S.map(P)})}},72020:function(Z,T,t){"use strict";t.d(T,{AF:function(){return c},Hr:function(){return w},Wm:function(){return f},YR:function(){return B},po:function(){return C}});var o=t(31085),i=t(14041),d=t(18690),O=t(19402),m=t(88758),v=t(82442);const f="techdocs.addons.addon.v1",c="techdocs.addons.wrapper.v1",C=()=>null;(0,O.h)(C,c,!0);const E=P=>`${f}.${P.toLocaleLowerCase("en-US")}`;function w(P){const{name:A,component:U}=P;return(0,m.zZ)({name:A,component:{sync:M=>(0,o.jsx)(U,{...M})},data:{[f]:P,[E(A)]:!0}})}const h=(P,A)=>P.selectByComponentData({key:A}).getElements()[0],S=P=>P.selectByComponentData({key:c}).selectByComponentData({key:f}),p=P=>P.selectByComponentData({key:c}).findComponentData({key:f}),B=()=>{const P=(0,d.P1)(),A=(0,v.O)(P,S),U=(0,v.O)(P,p),M=(0,i.useCallback)(H=>{if(!A||!H)return null;const V=E(H.name);var N;return(N=h(A,V))!==null&&N!==void 0?N:null},[A]),x=(0,i.useCallback)(H=>{const V=U.find(N=>N.name===H);return V?M(V):null},[U,M]),K=(0,i.useCallback)(H=>{const V=U.filter(N=>N.location===H);return V.length?V.map(M):null},[U,M]);return{renderComponentByName:x,renderComponentsByLocation:K}}},26679:function(Z,T,t){"use strict";t.d(T,{l:function(){return i},s:function(){return d}});var o=t(55309);const i=(0,o.y)({id:"plugin.techdocs.service"}),d=(0,o.y)({id:"plugin.techdocs.storageservice"})},86892:function(Z,T,t){"use strict";t.d(T,{R:function(){return P},V:function(){return A}});var o=t(31085),i=t(14041),d=t(73466),O=t(28966),m=t(6820),v=t(43836),f=t(10602),c=t(72427),C=t(65461),E=t(25862),w=t(26679);function h(U,M){return M.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")||(U.kind=U.kind.toLocaleLowerCase(),U.name=U.name.toLocaleLowerCase(),U.namespace=U.namespace.toLocaleLowerCase()),U}const S=(U,M)=>(0,m.U2)(U)===(0,m.U2)(M),p={title:"",subtitle:"",setTitle:()=>{},setSubtitle:()=>{},setShadowRoot:()=>{},metadata:{loading:!0},entityMetadata:{loading:!0},entityRef:{kind:"",name:"",namespace:""}},B=(0,v.tK)("techdocs-reader-page-context"),P=(0,i.memo)(U=>{const{entityRef:M,children:x}=U,K=(0,c.gf)(w.l),H=(0,c.gf)(C.U),V=(0,d.A)(async()=>K.getEntityMetadata(M),[M]),N=(0,O.A)(async()=>K.getTechDocsMetadata(M),[M]),[z,J]=(0,i.useState)(p.title),[_,et]=(0,i.useState)(p.subtitle),[q,ut]=(0,i.useState)(p.shadowRoot);(0,i.useEffect)(()=>{q&&!N.value&&!N.loading&&N.retry()},[N.value,N.loading,q,N.retry,N]);const dt={metadata:N,entityRef:h(M,H),entityMetadata:V,shadowRoot:q,setShadowRoot:ut,title:z,setTitle:J,subtitle:_,setSubtitle:et},Ot=(0,f.B)({1:dt});return(0,o.jsx)(E.Ig,{attributes:{entityRef:(0,m.U2)(M)},children:(0,o.jsx)(B.Provider,{value:Ot,children:x instanceof Function?x(dt):x})})},(U,M)=>S(U.entityRef,M.entityRef)),A=()=>{const U=(0,i.useContext)(B);if(U===void 0)return p;const M=U.atVersion(1);if(M===void 0)throw new Error("No context found for version 1.");return M}},99730:function(Z,T,t){"use strict";t.d(T,{e:function(){return o}});const o=Object.freeze({Header:"Header",Subheader:"Subheader",Settings:"Settings",PrimarySidebar:"PrimarySidebar",SecondarySidebar:"SecondarySidebar",Content:"Content"})},95768:function(Z,T,t){"use strict";t.d(T,{V:function(){return o}});function o(i,d){return d.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")?i:i.toLocaleLowerCase("en-US")}},85920:function(Z,T,t){"use strict";t.d(T,{K:function(){return N}});var o=t(31085),i=t(14041),d=t(26280),O=t(59428),m=t(27586),v=t(21405),f=t(54203),c=t(67626),C=t(72987),E=t(91035),w=t(81859),h=t(86519);class S{getCatalogFilters(){return{"metadata.annotations.backstage.io/techdocs-ref":h.c}}}const p=()=>{const{updateFilters:z}=(0,v.nK)();return(0,i.useEffect)(()=>{z({techdocs:new S})},[z]),null};var B=t(36338),P=t(45250),A=t(88640),U=t(77310),M=t(56889),x=t(27125),K=t(84295),H=t(42717);const V=z=>{var J;const{columns:_,actions:et,options:q}=z,{loading:ut,error:dt,entities:Ot,filters:ht}=(0,v.nK)(),{isStarredEntity:ct,toggleStarredEntity:lt}=(0,M.I)(),[,ft]=(0,B.A)();var Et;const mt=(0,P.capitalize)((Et=(J=ht.user)===null||J===void 0?void 0:J.value)!==null&&Et!==void 0?Et:"all"),wt=[K.f.createCopyDocsUrlAction(ft),K.f.createStarEntityAction(ct,lt)];return dt?(0,o.jsx)(A.B,{severity:"error",title:"Could not load available documentation.",children:(0,o.jsx)(U.z,{language:"text",text:dt.toString()})}):(0,o.jsx)(x.o,{title:mt,entities:Ot,loading:ut,actions:et||wt,columns:_,options:q})};V.columns=H.B,V.actions=K.f;const N=z=>{const{initialFilter:J="owned",columns:_,actions:et,ownerPickerMode:q}=z;return(0,o.jsx)(w.S,{children:(0,o.jsxs)(d.U,{children:[(0,o.jsx)(O.d,{title:"",children:(0,o.jsx)(m.Y,{children:"Discover documentation in your ecosystem."})}),(0,o.jsx)(v.B9,{children:(0,o.jsxs)(f.GI,{children:[(0,o.jsxs)(f.GI.Filters,{children:[(0,o.jsx)(p,{}),(0,o.jsx)(c.y,{initialFilter:J}),(0,o.jsx)(C.t,{mode:q}),(0,o.jsx)(E.m,{})]}),(0,o.jsx)(f.GI.Content,{children:(0,o.jsx)(V,{actions:et,columns:_})})]})})]})})}},27125:function(Z,T,t){"use strict";t.d(T,{o:function(){return A}});var o=t(31085),i=t(14041),d=t(36338),O=t(9222),m=t(72427),v=t(65461),f=t(51372),c=t(67871),C=t(90184),E=t(82779),w=t(14209),h=t(44186),S=t(73896),p=t(84295),B=t(42717),P=t(95768);const A=U=>{const{entities:M,title:x,loading:K,columns:H,actions:V,options:N}=U,[,z]=(0,d.A)(),J=(0,O.S)(E.Oc),_=(0,m.gf)(v.U);if(!M)return null;const et=M.map(ht=>{const ct=(0,c.t)(ht,f.vv);var lt;return{entity:ht,resolved:{docsUrl:J({namespace:(0,P.V)((lt=ht.metadata.namespace)!==null&<!==void 0?lt:"default",_),kind:(0,P.V)(ht.kind,_),name:(0,P.V)(ht.metadata.name,_)}),ownedByRelations:ct,ownedByRelationsTitle:ct.map(ft=>(0,C.S)(ft,{defaultKind:"group"})).join(", ")}}}),q=[B.B.createNameColumn(),B.B.createOwnerColumn(),B.B.createKindColumn(),B.B.createTypeColumn()],ut=[p.f.createCopyDocsUrlAction(z)],dt=20,Ot=et&&et.length>dt;return(0,o.jsx)(o.Fragment,{children:K||et&&et.length>0?(0,o.jsx)(w.X,{isLoading:K,options:{paging:Ot,pageSize:dt,search:!0,actionsColumnIndex:-1,...N},data:et,columns:H||q,actions:V||ut,title:x?`${x} (${et.length})`:`All (${et.length})`}):(0,o.jsx)(h.p,{missing:"data",title:"No documents to show",description:"Create your own document. Check out our Getting Started Information",action:(0,o.jsx)(S.z,{color:"primary",to:"https://backstage.io/docs/features/techdocs/getting-started",variant:"contained",children:"DOCS"})})})};A.columns=B.B,A.actions=p.f},84295:function(Z,T,t){"use strict";t.d(T,{f:function(){return c}});var o=t(31085),i=t(14041),d=t(55290),O=t(87051),m=t(80109),v=t(15303);const f=(0,O.A)({root:{color:"#f3ba37"}})(m.A),c={createCopyDocsUrlAction(C){return E=>({icon:()=>(0,o.jsx)(d.A,{fontSize:"small"}),tooltip:"Click to copy documentation link to clipboard",onClick:()=>C(`${window.location.origin}${E.resolved.docsUrl}`)})},createStarEntityAction(C,E){return w=>{const h=w.entity,S=C(h);return{cellStyle:{paddingLeft:"1em"},icon:()=>S?(0,o.jsx)(f,{}):(0,o.jsx)(v.A,{}),tooltip:S?"Remove from favorites":"Add to favorites",onClick:()=>E(h)}}}}},42717:function(Z,T,t){"use strict";t.d(T,{B:function(){return E}});var o=t(31085),i=t(14041),d=t(10394),O=t(58837);const m=(0,O.A)(w=>({value:{marginBottom:w.spacing(.75)},subvalue:{color:w.palette.textSubtle,fontWeight:"normal"}}),{name:"BackstageSubvalueCell"});function v(w){const{value:h,subvalue:S}=w,p=m();return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.A,{className:p.value,children:h}),(0,o.jsx)(d.A,{className:p.subvalue,children:S})]})}var f=t(72072),c=t(34428);function C(w){return w.metadata.title||w.metadata.name}const E={createNameColumn(){return{title:"Document",field:"entity.metadata.name",highlight:!0,render:w=>(0,o.jsx)(v,{value:(0,o.jsx)(f.N_,{to:w.resolved.docsUrl,children:C(w.entity)}),subvalue:w.entity.metadata.description})}},createOwnerColumn(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:w})=>(0,o.jsx)(c.i,{entityRefs:w.ownedByRelations,defaultKind:"group"})}},createKindColumn(){return{title:"Kind",field:"entity.kind"}},createTypeColumn(){return{title:"Type",field:"entity.spec.type"}}}},81859:function(Z,T,t){"use strict";t.d(T,{S:function(){return v}});var o=t(31085),i=t(14041),d=t(27155),O=t(72427),m=t(65461);const v=f=>{const{children:c}=f,C=(0,O.gf)(m.U);var E;const w=`Documentation available in ${(E=C.getOptionalString("organization.name"))!==null&&E!==void 0?E:"Backstage"}`;return(0,o.jsx)(d.d,{title:"Documentation",subtitle:w,themeId:"documentation",children:c})}},39278:function(Z,T,t){"use strict";t.d(T,{$j:function(){return x},Wj:function(){return K},Ju:function(){return P}});var o=t(26679),i=t(18990),d=t(70835),O=t(97142),m=t(92110);class v{async getCookie(){const z=`${await this.getApiOrigin()}/cookie`,J=await this.fetchApi.fetch(`${z}`,{credentials:"include"});if(!J.ok)throw await d.o.fromResponse(J);return await J.json()}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getTechDocsMetadata(N){const{kind:z,namespace:J,name:_}=N,q=`${await this.getApiOrigin()}/metadata/techdocs/${J}/${z}/${_}`,ut=await this.fetchApi.fetch(`${q}`);if(!ut.ok)throw await d.o.fromResponse(ut);return await ut.json()}async getEntityMetadata(N){const{kind:z,namespace:J,name:_}=N,q=`${await this.getApiOrigin()}/metadata/entity/${J}/${z}/${_}`,ut=await this.fetchApi.fetch(`${q}`);if(!ut.ok)throw await d.o.fromResponse(ut);return await ut.json()}constructor(N){(0,i._)(this,"configApi",void 0),(0,i._)(this,"discoveryApi",void 0),(0,i._)(this,"fetchApi",void 0),this.configApi=N.configApi,this.discoveryApi=N.discoveryApi,this.fetchApi=N.fetchApi}}class f{async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getStorageUrl(){var N;return(N=this.configApi.getOptionalString("techdocs.storageUrl"))!==null&&N!==void 0?N:`${await this.discoveryApi.getBaseUrl("techdocs")}/static/docs`}async getBuilder(){return this.configApi.getOptionalString("techdocs.builder")||"local"}async getEntityDocs(N,z){const{kind:J,namespace:_,name:et}=N,ut=`${await this.getStorageUrl()}/${_}/${J}/${et}/${z}`,dt=await this.fetchApi.fetch(`${ut.endsWith("/")?ut:`${ut}/`}index.html`);let Ot="";switch(dt.status){case 404:throw Ot="Page not found. ",z||(Ot+="This could be because there is no index.md file in the root of the docs directory of this repository."),new O.m_(Ot);case 500:throw Ot="Could not generate documentation or an error in the TechDocs backend. ",new Error(Ot);default:break}return dt.text()}async syncEntityDocs(N,z=()=>{}){const{kind:J,namespace:_,name:et}=N,ut=`${await this.getApiOrigin()}/sync/${_}/${J}/${et}`;return new Promise((dt,Ot)=>{const ht=new AbortController;(0,m.y)(ut,{fetch:this.fetchApi.fetch,signal:ht.signal,onmessage(ct){if(ct.event==="log")ct.data&&z(JSON.parse(ct.data));else if(ct.event==="finish"){let lt=!1;ct.data&&({updated:lt}=JSON.parse(ct.data)),dt(lt?"updated":"cached")}else ct.event==="error"&&Ot(new Error(ct.data))},onerror(ct){ht.abort(),Ot(ct)}})})}async getBaseUrl(N,z,J){const{kind:_,namespace:et,name:q}=z,dt=`${await this.getApiOrigin()}/static/docs/${et}/${_}/${q}/${J}`;return new URL(N,dt.endsWith("/")?dt:`${dt}/`).toString()}constructor(N){(0,i._)(this,"configApi",void 0),(0,i._)(this,"discoveryApi",void 0),(0,i._)(this,"fetchApi",void 0),this.configApi=N.configApi,this.discoveryApi=N.discoveryApi,this.fetchApi=N.fetchApi}}var c=t(82779),C=t(9803),E=t(12935),w=t(65461),h=t(57405),S=t(70795),p=t(88758),B=t(54560);const P=(0,C.i)({id:"techdocs",apis:[(0,E.b)({api:o.s,deps:{configApi:w.U,discoveryApi:h.I,fetchApi:S.a},factory:({configApi:V,discoveryApi:N,fetchApi:z})=>new f({configApi:V,discoveryApi:N,fetchApi:z})}),(0,E.b)({api:o.l,deps:{configApi:w.U,discoveryApi:h.I,fetchApi:S.a},factory:({configApi:V,discoveryApi:N,fetchApi:z})=>new v({configApi:V,discoveryApi:N,fetchApi:z})})],routes:{root:c.rQ,docRoot:c.Oc,entityContent:c.Ri}}),A=P.provide((0,p.QJ)({name:"TechdocsPage",component:()=>t.e(9605).then(t.bind(t,29605)).then(V=>V.Router),mountPoint:c.rQ})),U=P.provide((0,p.QJ)({name:"EntityTechdocsContent",component:()=>t.e(9605).then(t.bind(t,29605)).then(V=>V.EmbeddedDocsRouter),mountPoint:c.Ri})),M=P.provide((0,p.QJ)({name:"TechDocsCustomHome",component:()=>t.e(4487).then(t.bind(t,94487)).then(V=>V.TechDocsCustomHome),mountPoint:c.rQ})),x=P.provide((0,p.QJ)({name:"TechDocsIndexPage",component:()=>t.e(5788).then(t.bind(t,85788)).then(V=>V.TechDocsIndexPage),mountPoint:c.rQ})),K=P.provide((0,p.QJ)({name:"TechDocsReaderPage",component:()=>t.e(4036).then(t.bind(t,84036)).then(V=>V.TechDocsReaderPage),mountPoint:c.Oc})),H=P.provide((0,B.ec)({name:"TechDocsSearchResultListItem",component:()=>Promise.resolve().then(t.bind(t,27698)).then(V=>V.TechDocsSearchResultListItem),predicate:V=>V.type==="techdocs"}))},16203:function(Z,T,t){"use strict";t.d(T,{p:function(){return ao}});var o=t(31085),i=t(14041),d=t(42899),O=t(58837),m=t(86892),v=t(9394),f=t(91360),c=t(22856),C=t(68146);const E="TECH_DOCS_SHADOW_DOM_STYLE_LOAD",w=g=>{(0,i.useEffect)(()=>{if(!g)return()=>{};const R=g.querySelectorAll('head > link[rel="stylesheet"]');var $;let k=($=R==null?void 0:R.length)!==null&&$!==void 0?$:0;const X=new CustomEvent(E);if(!k)return g.dispatchEvent(X),()=>{};const tt=()=>{--k===0&&g.dispatchEvent(X)};return R==null||R.forEach(rt=>{rt.addEventListener("load",tt)}),()=>{R==null||R.forEach(rt=>{rt.removeEventListener("load",tt)})}},[g])},h=g=>{const[R,$]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{if(!g)return()=>{};$(!0);const k=g.style;k.setProperty("opacity","0");const X=()=>{$(!1),k.setProperty("opacity","1")};return g.addEventListener(E,X),()=>{g.removeEventListener(E,X)}},[g]),R},S=g=>{const{element:R,onAppend:$,children:k}=g,[X,tt]=(0,i.useState)((0,v.vt)({...(0,c.A)(),insertionPoint:void 0}));w(R);const rt=h(R),Ct=(0,i.useCallback)(Bt=>{if(!R||!Bt)return;tt((0,v.vt)({...(0,c.A)(),insertionPoint:R.querySelector("head")||void 0}));let Wt=Bt.shadowRoot;Wt||(Wt=Bt.attachShadow({mode:"open"})),Wt.replaceChildren(R),typeof $=="function"&&$(Wt)},[R,$]);return(0,o.jsxs)(o.Fragment,{children:[rt&&(0,o.jsx)(C.k,{}),(0,o.jsxs)(f.Ay,{jss:X,sheetsManager:new Map,children:[(0,o.jsx)("div",{ref:Ct,"data-testid":"techdocs-native-shadowroot"}),k]})]})};var p=t(12784);const B=()=>{const{shadowRoot:g}=(0,m.V)();return g},P=g=>{const R=B();return R?g.map($=>R==null?void 0:R.querySelectorAll($)).filter($=>$.length).map($=>Array.from($)).flat():[]},A=g=>g.toString()&&g.rangeCount&&g.getRangeAt(0).getBoundingClientRect().top,U=(g=0)=>{const R=B(),[$,k]=useState(null),X=useMemo(()=>debounce(()=>{const tt=R,rt=tt.getSelection?tt.getSelection():document.getSelection();rt&&A(rt)?k(rt):k(null)},g),[R,k,g]);return useEffect(()=>(window.document.addEventListener("selectionchange",X),()=>{X.cancel(),window.document.removeEventListener("selectionchange",X)}),[X]),$};var M=t(12173),x=t(26280),K=t(45250),H=t(73466),V=t(5877),N=t(43836),z=t(10602),J=t(72427),_=t(93368),et=t(25862),q=t(65461),ut=t(55309);const dt=(0,ut.y)({id:"plugin.search.queryservice"});class Ot{query(){return Promise.resolve(this.mockedResults||{results:[]})}constructor(R){_define_property(this,"mockedResults",void 0),this.mockedResults=R}}const ht=(0,N.tK)("search-context"),ct=()=>{const g=(0,i.useContext)(ht);if(!g)throw new Error("useSearch must be used within a SearchContextProvider");const R=g.atVersion(1);if(!R)throw new Error("No SearchContext v1 found");return R},lt=()=>(0,i.useContext)(ht)!==void 0,ft={term:"",types:[],filters:{},pageLimit:void 0,pageCursor:void 0},Et=(g=ft)=>{var R,$,k,X;const tt=(0,J.gf)(dt),rt=(0,_.s)(),[Ct,Bt]=(0,i.useState)(g.term),[Wt,Yt]=(0,i.useState)(g.types),[kt,Mt]=(0,i.useState)(g.filters),[te,ye]=(0,i.useState)(g.pageLimit),[Qt,ee]=(0,i.useState)(g.pageCursor),ne=(0,V.A)(Ct),le=(0,V.A)(kt),Lt=(0,H.A)(async()=>{const fe=await tt.query({term:Ct,types:Wt,filters:kt,pageLimit:te,pageCursor:Qt});if(Ct){var Me,ie;rt.captureEvent("search",Ct,{value:(ie=(Me=Lt.value)===null||Me===void 0?void 0:Me.numberOfResults)!==null&&ie!==void 0?ie:void 0})}return fe},[Ct,Wt,kt,te,Qt]),_t=!Lt.loading&&!Lt.error&&((R=Lt.value)===null||R===void 0?void 0:R.nextPageCursor),Zt=!Lt.loading&&!Lt.error&&(($=Lt.value)===null||$===void 0?void 0:$.previousPageCursor),Ee=(0,i.useCallback)(()=>{var fe;ee((fe=Lt.value)===null||fe===void 0?void 0:fe.nextPageCursor)},[(k=Lt.value)===null||k===void 0?void 0:k.nextPageCursor]),Se=(0,i.useCallback)(()=>{var fe;ee((fe=Lt.value)===null||fe===void 0?void 0:fe.previousPageCursor)},[(X=Lt.value)===null||X===void 0?void 0:X.previousPageCursor]);return(0,i.useEffect)(()=>{ne!==void 0&&Ct!==ne&&ee(void 0)},[Ct,ne,ee]),(0,i.useEffect)(()=>{le!==void 0&&!(0,K.isEqual)(kt,le)&&ee(void 0)},[kt,le,ee]),{result:Lt,term:Ct,setTerm:Bt,types:Wt,setTypes:Yt,filters:kt,setFilters:Mt,pageLimit:te,setPageLimit:ye,pageCursor:Qt,setPageCursor:ee,fetchNextPage:_t?Ee:void 0,fetchPreviousPage:Zt?Se:void 0}},mt=g=>{const{initialState:R,children:$}=g,k=Et(R);return(0,o.jsx)(et.Ig,{attributes:{searchTypes:k.types.sort().join(",")},children:(0,o.jsx)(ht.Provider,{value:(0,z.B)({1:k}),children:$})})},wt=g=>{const{initialState:R,inheritParentContextIfAvailable:$,children:k}=g,X=lt(),tt=(0,J.gf)(q.U),rt=R!=null?R:{},Ct=tt.has("search.query.pageLimit")?{pageLimit:tt.getNumber("search.query.pageLimit")}:{},Bt={...ft,...rt,...Ct};return X&&$?(0,o.jsx)(o.Fragment,{children:k}):(0,o.jsx)(mt,{initialState:Bt,children:k})};var vt=t(78467),it=t(20577),gt=t(29365),pt=t(34839),Pt=t(16249),xt=t(64947),W=t(45917),G=t(22771);function At(g){return(0,i.forwardRef)((R,$)=>(0,o.jsx)(wt,{inheritParentContextIfAvailable:!0,children:(0,o.jsx)(g,{...R,ref:$})}))}const St=At((0,i.forwardRef)((g,R)=>{const{onChange:$,onKeyDown:k=()=>{},onClear:X=()=>{},onSubmit:tt=()=>{},debounceTime:rt=200,clearButton:Ct=!0,fullWidth:Bt=!0,value:Wt,label:Yt,placeholder:kt,inputProps:Mt={},InputProps:te={},endAdornment:ye,...Qt}=g,ee=(0,J.gf)(q.U),[ne,le]=(0,i.useState)(""),Lt=(0,i.useRef)("");(0,i.useEffect)(()=>{le(ie=>ie===Lt.current?String(Wt):ie)},[Wt,Lt]),(0,G.A)(()=>{Lt.current=ne,$(ne)},rt,[ne]);const _t=(0,i.useCallback)(ie=>{le(ie.target.value)},[le]),Zt=(0,i.useCallback)(ie=>{k&&k(ie),tt&&ie.key==="Enter"&&tt()},[k,tt]),Ee=(0,i.useCallback)(()=>{Lt.current="",$(""),le(""),X&&X()},[$,X]),Se=Yt?void 0:"Search",Ve=kt!=null?kt:`Search in ${ee.getOptionalString("app.title")||"Backstage"}`,fe=(0,o.jsx)(pt.A,{position:"start",children:(0,o.jsx)(gt.A,{"aria-label":"Query",size:"small",disabled:!0,children:(0,o.jsx)(W.A,{})})}),Me=(0,o.jsx)(pt.A,{position:"end",children:(0,o.jsx)(xt.A,{"aria-label":"Clear",size:"small",onClick:Ee,onKeyDown:ie=>{ie.key==="Enter"&&ie.stopPropagation()},children:"Clear"})});return(0,o.jsx)(Pt.A,{id:"search-bar-text-field","data-testid":"search-bar-next",variant:"outlined",margin:"normal",inputRef:R,value:ne,label:Yt,placeholder:Ve,InputProps:{startAdornment:fe,endAdornment:Ct?Me:ye,...te},inputProps:{"aria-label":Se,...Mt},fullWidth:Bt,onChange:_t,onKeyDown:Zt,...Qt})})),Ut=At((0,i.forwardRef)((g,R)=>{const{value:$="",onChange:k,...X}=g,{term:tt,setTerm:rt}=ct();(0,i.useEffect)(()=>{$&&rt(String($))},[$,rt]);const Ct=(0,i.useCallback)(Bt=>{k?k(Bt):rt(Bt)},[k,rt]);return(0,o.jsx)(et.Ig,{attributes:{pluginId:"search",extension:"SearchBar"},children:(0,o.jsx)(St,{...X,ref:R,value:tt,onChange:Ct})})})),Tt=(0,O.A)(g=>({loading:{right:g.spacing(1),position:"absolute"}})),It=g=>R=>(0,o.jsx)(wt,{inheritParentContextIfAvailable:!0,children:(0,o.jsx)(g,{...R})}),Nt=()=>{const g=Tt();return(0,o.jsx)(vt.A,{className:g.loading,"data-testid":"search-autocomplete-progressbar",color:"inherit",size:20})},bt=It(function(R){const{loading:$,value:k,onChange:X=()=>{},options:tt=[],getOptionLabel:rt=Lt=>String(Lt),inputPlaceholder:Ct,inputDebounceTime:Bt,freeSolo:Wt=!0,fullWidth:Yt=!0,clearOnBlur:kt=!1,"data-testid":Mt="search-autocomplete",...te}=R,{setTerm:ye}=ct(),Qt=(0,i.useCallback)(Lt=>Lt?typeof Lt=="string"?Lt:rt(Lt):"",[rt]),ee=(0,i.useMemo)(()=>Qt(k),[k,Qt]),ne=(0,i.useCallback)((Lt,_t,Zt,Ee)=>{ye(Qt(_t)),X(Lt,_t,Zt,Ee)},[Qt,ye,X]),le=(0,i.useCallback)(({InputProps:{ref:Lt,className:_t,endAdornment:Zt},InputLabelProps:Ee,...Se})=>(0,o.jsx)(Ut,{...Se,ref:Lt,clearButton:!1,value:ee,placeholder:Ct,debounceTime:Bt,endAdornment:$?(0,o.jsx)(Nt,{}):Zt,InputProps:{className:_t}}),[$,ee,Ct,Bt]);return(0,o.jsx)(it.Ay,{...te,"data-testid":Mt,value:k,onChange:ne,options:tt,getOptionLabel:rt,renderInput:le,freeSolo:Wt,fullWidth:Yt,clearOnBlur:kt})});var Ft=t(18690),Jt=t(27698);const ge=g=>g==null?void 0:g.document,ce=g=>{const{entityId:R,entityTitle:$,debounceTime:k=150}=g,[X,tt]=(0,i.useState)(!1),rt=(0,Ft.Zp)(),{setFilters:Ct,term:Bt,result:{loading:Wt,value:Yt}}=ct(),[kt,Mt]=(0,i.useState)([]);(0,i.useEffect)(()=>{let ne=!0;if(ne&&Yt){const le=Yt.results.slice(0,10);Mt(le)}return()=>{ne=!1}},[Wt,Yt]);const{kind:te,name:ye,namespace:Qt}=R;(0,i.useEffect)(()=>{Ct(ne=>({...ne,kind:te,namespace:Qt,name:ye}))},[te,Qt,ye,Ct]);const ee=(ne,le)=>{if(ge(le)){const{location:Lt}=le.document;rt(Lt)}};return(0,o.jsx)(bt,{"data-testid":"techdocs-search-bar",size:"small",open:X&&!!Bt,getOptionLabel:()=>"",filterOptions:ne=>ne,onClose:()=>{tt(!1)},onOpen:()=>{tt(!0)},onChange:ee,blurOnSelect:!0,noOptionsText:"No results found",value:null,options:kt,renderOption:({document:ne,highlight:le})=>(0,o.jsx)(Jt.TechDocsSearchResultListItem,{result:ne,lineClamp:3,asListItem:!1,asLink:!1,title:ne.title,highlight:le}),loading:Wt,inputDebounceTime:k,inputPlaceholder:`Search ${$||R.name} docs`,freeSolo:!1})},de=g=>{const R={term:"",types:["techdocs"],pageCursor:"",filters:g.entityId};return(0,o.jsx)(wt,{initialState:R,children:(0,o.jsx)(ce,{...g})})};var zt=t(74219),Xt=t(82266);const me=(0,i.lazy)(()=>Promise.all([t.e(3308),t.e(9234)]).then(t.bind(t,99234)).then(g=>({default:g.RealLogViewer})));function Ne(g){const{Progress:R}=(0,Xt.n)().getComponents();return(0,o.jsx)(i.Suspense,{fallback:(0,o.jsx)(R,{}),children:(0,o.jsx)(me,{...g})})}var je=t(73845),Ge=t(72501),we=t(12398),an=t(32881);const en=(0,O.A)(g=>(0,we.A)({paper:{width:"100%",[g.breakpoints.up("sm")]:{width:"75%"},[g.breakpoints.up("md")]:{width:"50%"},padding:g.spacing(2.5)},root:{height:"100%",overflow:"hidden"},logs:{background:g.palette.background.default}})),re=({buildLog:g,onClose:R})=>{const $=en(),k=g.length===0?"Waiting for logs...":g.join(`
|
|
8
|
+
`);return(0,o.jsxs)(d.A,{container:!0,direction:"column",className:$.root,spacing:0,wrap:"nowrap",children:[(0,o.jsxs)(d.A,{item:!0,container:!0,justifyContent:"space-between",alignItems:"center",spacing:0,wrap:"nowrap",children:[(0,o.jsx)(Ge.A,{variant:"h5",children:"Build Details"}),(0,o.jsx)(gt.A,{title:"Close the drawer",onClick:R,color:"inherit",children:(0,o.jsx)(an.A,{})},"dismiss")]}),(0,o.jsx)(d.A,{item:!0,xs:!0,children:(0,o.jsx)(Ne,{text:k,classes:{root:$.logs}})})]})},We=({buildLog:g})=>{const R=en(),[$,k]=(0,i.useState)(!1);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(xt.A,{color:"inherit",onClick:()=>k(!0),children:"Show Build Logs"}),(0,o.jsx)(je.Ay,{classes:{paper:R.paper},anchor:"right",open:$,onClose:()=>k(!1),children:(0,o.jsx)(re,{buildLog:g,onClose:()=>k(!1)})})]})},ke=({errorMessage:g})=>{const R=(0,J.gf)(q.U).getOptionalString("techdocs.builder"),$=(0,_.s)(),{entityRef:k}=(0,m.V)(),X=(0,Ft.zy)();(0,i.useEffect)(()=>{const{pathname:rt,search:Ct,hash:Bt}=X;$.captureEvent("not-found",`${rt}${Ct}${Bt}`,{attributes:k})},[$,k,X]);let tt="";return[void 0,"local"].includes(R)||(tt="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)(M.M,{status:"404",statusMessage:g||"Documentation not found",additionalInfo:tt})};var nn=t(28966),Ye=t(26679);function Ae({contentLoading:g,content:R,activeSyncState:$}){return g||$==="BUILD_READY_RELOAD"||!R&&$==="CHECKING"?"CHECKING":!R&&$==="BUILDING"?"INITIAL_BUILD":R?$==="BUILDING"?"CONTENT_STALE_REFRESHING":$==="BUILD_READY"?"CONTENT_STALE_READY":$==="ERROR"?"CONTENT_STALE_ERROR":"CONTENT_FRESH":"CONTENT_NOT_FOUND"}function ln(g,R){const $={...g};switch(R.type){case"sync":R.state==="CHECKING"&&($.buildLog=[]),$.activeSyncState=R.state,$.syncError=R.syncError;break;case"contentLoading":$.contentLoading=!0,$.contentError=void 0;break;case"content":typeof R.path=="string"&&($.path=R.path),$.contentLoading=!1,$.content=R.content,$.contentError=R.contentError;break;case"buildLog":$.buildLog=$.buildLog.concat(R.log);break;default:throw new Error}return["BUILD_READY","BUILD_READY_RELOAD"].includes($.activeSyncState)&&["contentLoading","content"].includes(R.type)&&($.activeSyncState="UP_TO_DATE",$.buildLog=[]),$}function cn(g,R,$,k){var X,tt;const[rt,Ct]=(0,i.useReducer)(ln,{activeSyncState:"CHECKING",path:k,contentLoading:!0,buildLog:[]}),Bt=(0,J.gf)(Ye.s),{retry:Wt}=(0,nn.A)(async()=>{Ct({type:"contentLoading"});try{const Mt=await Bt.getEntityDocs({kind:g,namespace:R,name:$},k);return Ct({type:"content",content:Mt,path:k}),Mt}catch(Mt){Ct({type:"content",contentError:Mt,path:k})}},[Bt,g,R,$,k]),Yt=(0,i.useRef)({content:void 0,reload:()=>{}});return Yt.current={content:rt.content,reload:Wt},(0,H.A)(async()=>{Ct({type:"sync",state:"CHECKING"});const Mt=setTimeout(()=>{Ct({type:"sync",state:"BUILDING"})},1e3);try{switch(await Bt.syncEntityDocs({kind:g,namespace:R,name:$},ye=>{Ct({type:"buildLog",log:ye})})){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(te){Ct({type:"sync",state:"ERROR",syncError:te})}finally{clearTimeout(Mt)}},[g,$,R,Bt,Ct,Yt]),{state:(0,i.useMemo)(()=>Ae({activeSyncState:rt.activeSyncState,contentLoading:rt.contentLoading,content:rt.content}),[rt.activeSyncState,rt.content,rt.contentLoading]),contentReload:Wt,path:rt.path,content:rt.content,contentErrorMessage:(X=rt.contentError)===null||X===void 0?void 0:X.toString(),syncErrorMessage:(tt=rt.syncError)===null||tt===void 0?void 0:tt.toString(),buildLog:rt.buildLog}}const dn=(0,i.createContext)({}),pe=()=>(0,i.useContext)(dn),De=g=>{const{children:R}=g,{"*":$=""}=(0,Ft.g)(),{entityRef:k}=(0,m.V)(),{kind:X,namespace:tt,name:rt}=k,Ct=cn(X,tt,rt,$);return(0,o.jsx)(dn.Provider,{value:Ct,children:R instanceof Function?R(Ct):R})},Qe=g=>R=>(0,o.jsx)(De,{children:(0,o.jsx)(g,{...R})}),Ze=(0,O.A)(g=>({root:{marginBottom:g.spacing(2)},message:{wordBreak:"break-word",overflowWrap:"anywhere"}})),Be=()=>{let g=null;const R=Ze(),{state:$,contentReload:k,contentErrorMessage:X,syncErrorMessage:tt,buildLog:rt}=pe();return $==="INITIAL_BUILD"&&(g=(0,o.jsx)(zt.A,{classes:{root:R.root},variant:"outlined",severity:"info",icon:(0,o.jsx)(vt.A,{size:"24px"}),action:(0,o.jsx)(We,{buildLog:rt}),children:"Documentation is accessed for the first time and is being prepared. The subsequent loads are much faster."})),$==="CONTENT_STALE_REFRESHING"&&(g=(0,o.jsx)(zt.A,{variant:"outlined",severity:"info",icon:(0,o.jsx)(vt.A,{size:"24px"}),action:(0,o.jsx)(We,{buildLog:rt}),classes:{root:R.root},children:"A newer version of this documentation is being prepared and will be available shortly."})),$==="CONTENT_STALE_READY"&&(g=(0,o.jsx)(zt.A,{variant:"outlined",severity:"success",action:(0,o.jsx)(xt.A,{color:"inherit",onClick:()=>k(),children:"Refresh"}),classes:{root:R.root},children:"A newer version of this documentation is now available, please refresh to view."})),$==="CONTENT_STALE_ERROR"&&(g=(0,o.jsxs)(zt.A,{variant:"outlined",severity:"error",action:(0,o.jsx)(We,{buildLog:rt}),classes:{root:R.root,message:R.message},children:["Building a newer version of this documentation failed."," ",tt]})),$==="CONTENT_NOT_FOUND"&&(g=(0,o.jsxs)(o.Fragment,{children:[tt&&(0,o.jsxs)(zt.A,{variant:"outlined",severity:"error",action:(0,o.jsx)(We,{buildLog:rt}),classes:{root:R.root,message:R.message},children:["Building a newer version of this documentation failed."," ",tt]}),(0,o.jsx)(ke,{errorMessage:X})]})),g};var Ke=t(5893),un=t(54917),Tn=t(3347),on=t(71651),Je=t.n(on);const hn=/main\.[A-Fa-f0-9]{8}\.min\.css$/,Rn=/^https:\/\/fonts\.googleapis\.com/,In=/^https:\/\/fonts\.gstatic\.com/,Dn=g=>g.nodeName==="LINK",L=g=>{const R=(g==null?void 0:g.getAttribute("href"))||"",$=R.match(hn),k=R.match(Rn),X=R.match(In);return $||k||X},u=g=>(Dn(g)&&!L(g)&&g.remove(),g),I=g=>g.nodeName==="IFRAME",j=(g,R)=>{const $=g.getAttribute("src")||"";try{const{host:k}=new URL($);return R.includes(k)}catch{return!1}},nt=g=>R=>(I(R)&&!j(R,g)&&R.remove(),R),Y=()=>{const g=(0,J.gf)(q.U);return(0,i.useMemo)(()=>g.getOptionalConfig("techdocs.sanitizer"),[g])},Rt=()=>{const g=Y();return(0,i.useCallback)(async R=>{const $=g==null?void 0:g.getOptionalStringArray("allowedIframeHosts");Je().addHook("beforeSanitizeElements",u);const k=["link"];return $&&(k.push("iframe"),Je().addHook("beforeSanitizeElements",nt($))),Je().sanitize(R.outerHTML,{ADD_TAGS:k,FORBID_TAGS:["style"],WHOLE_DOCUMENT:!0,RETURN_DOM:!0})},[g])};var qt=t(34435),$t=t(268),he=({theme:g})=>`
|
|
9
|
+
/*================== Variables ==================*/
|
|
10
|
+
/*
|
|
11
|
+
As the MkDocs output is rendered in shadow DOM, the CSS variable definitions on the root selector are not applied. Instead, they have to be applied on :host.
|
|
12
|
+
As there is no way to transform the served main*.css yet (for example in the backend), we have to copy from main*.css and modify them.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
:host {
|
|
16
|
+
/* FONT */
|
|
17
|
+
--md-default-fg-color: ${g.palette.text.primary};
|
|
18
|
+
--md-default-fg-color--light: ${g.palette.text.secondary};
|
|
19
|
+
--md-default-fg-color--lighter: ${(0,$t.a)(g.palette.text.secondary,.7)};
|
|
20
|
+
--md-default-fg-color--lightest: ${(0,$t.a)(g.palette.text.secondary,.3)};
|
|
21
|
+
|
|
22
|
+
/* BACKGROUND */
|
|
23
|
+
--md-default-bg-color:${g.palette.background.default};
|
|
24
|
+
--md-default-bg-color--light: ${g.palette.background.paper};
|
|
25
|
+
--md-default-bg-color--lighter: ${(0,$t.a)(g.palette.background.paper,.7)};
|
|
26
|
+
--md-default-bg-color--lightest: ${(0,$t.a)(g.palette.background.paper,.3)};
|
|
27
|
+
|
|
28
|
+
/* PRIMARY */
|
|
29
|
+
--md-primary-fg-color: ${g.palette.primary.main};
|
|
30
|
+
--md-primary-fg-color--light: ${g.palette.primary.light};
|
|
31
|
+
--md-primary-fg-color--dark: ${g.palette.primary.dark};
|
|
32
|
+
--md-primary-bg-color: ${g.palette.primary.contrastText};
|
|
33
|
+
--md-primary-bg-color--light: ${(0,$t.a)(g.palette.primary.contrastText,.7)};
|
|
34
|
+
|
|
35
|
+
/* ACCENT */
|
|
36
|
+
--md-accent-fg-color: var(--md-primary-fg-color);
|
|
37
|
+
--md-accent-fg-color--transparent: ${(0,$t.X4)(g.palette.primary.main,.1)};
|
|
38
|
+
--md-accent-bg-color: var(--md-primary-bg-color);
|
|
39
|
+
--md-accent-bg-color--light: var(--md-primary-bg-color--light);
|
|
40
|
+
|
|
41
|
+
/* SHADOW */
|
|
42
|
+
--md-shadow-z1: ${g.shadows[1]};
|
|
43
|
+
--md-shadow-z2: ${g.shadows[2]};
|
|
44
|
+
--md-shadow-z3: ${g.shadows[3]};
|
|
45
|
+
|
|
46
|
+
/* EXTENSIONS */
|
|
47
|
+
--md-admonition-fg-color: var(--md-default-fg-color);
|
|
48
|
+
--md-admonition-bg-color: var(--md-default-bg-color);
|
|
49
|
+
/* Admonitions and others are using SVG masks to define icons. These masks are defined as CSS variables. */
|
|
50
|
+
--md-admonition-icon--note: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20.71 7.04c.39-.39.39-1.04 0-1.41l-2.34-2.34c-.37-.39-1.02-.39-1.41 0l-1.84 1.83 3.75 3.75M3 17.25V21h3.75L17.81 9.93l-3.75-3.75L3 17.25z"/></svg>');
|
|
51
|
+
--md-admonition-icon--abstract: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 5h16v2H4V5m0 4h16v2H4V9m0 4h16v2H4v-2m0 4h10v2H4v-2z"/></svg>');
|
|
52
|
+
--md-admonition-icon--info: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 9h-2V7h2m0 10h-2v-6h2m-1-9A10 10 0 002 12a10 10 0 0010 10 10 10 0 0010-10A10 10 0 0012 2z"/></svg>');
|
|
53
|
+
--md-admonition-icon--tip: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M17.55 11.2c-.23-.3-.5-.56-.76-.82-.65-.6-1.4-1.03-2.03-1.66C13.3 7.26 13 4.85 13.91 3c-.91.23-1.75.75-2.45 1.32-2.54 2.08-3.54 5.75-2.34 8.9.04.1.08.2.08.33 0 .22-.15.42-.35.5-.22.1-.46.04-.64-.12a.83.83 0 01-.15-.17c-1.1-1.43-1.28-3.48-.53-5.12C5.89 10 5 12.3 5.14 14.47c.04.5.1 1 .27 1.5.14.6.4 1.2.72 1.73 1.04 1.73 2.87 2.97 4.84 3.22 2.1.27 4.35-.12 5.96-1.6 1.8-1.66 2.45-4.32 1.5-6.6l-.13-.26c-.2-.46-.47-.87-.8-1.25l.05-.01m-3.1 6.3c-.28.24-.73.5-1.08.6-1.1.4-2.2-.16-2.87-.82 1.19-.28 1.89-1.16 2.09-2.05.17-.8-.14-1.46-.27-2.23-.12-.74-.1-1.37.18-2.06.17.38.37.76.6 1.06.76 1 1.95 1.44 2.2 2.8.04.14.06.28.06.43.03.82-.32 1.72-.92 2.27h.01z"/></svg>');
|
|
54
|
+
--md-admonition-icon--success: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2m-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>');
|
|
55
|
+
--md-admonition-icon--question: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M15.07 11.25l-.9.92C13.45 12.89 13 13.5 13 15h-2v-.5c0-1.11.45-2.11 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41a2 2 0 00-2-2 2 2 0 00-2 2H8a4 4 0 014-4 4 4 0 014 4 3.2 3.2 0 01-.93 2.25M13 19h-2v-2h2M12 2A10 10 0 002 12a10 10 0 0010 10 10 10 0 0010-10c0-5.53-4.5-10-10-10z"/></svg>');
|
|
56
|
+
--md-admonition-icon--warning: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 14h-2v-4h2m0 8h-2v-2h2M1 21h22L12 2 1 21z"/></svg>');
|
|
57
|
+
--md-admonition-icon--failure: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2c5.53 0 10 4.47 10 10s-4.47 10-10 10S2 17.53 2 12 6.47 2 12 2m3.59 5L12 10.59 8.41 7 7 8.41 10.59 12 7 15.59 8.41 17 12 13.41 15.59 17 17 15.59 13.41 12 17 8.41 15.59 7z"/></svg>');
|
|
58
|
+
--md-admonition-icon--danger: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M11.5 20l4.86-9.73H13V4l-5 9.73h3.5V20M12 2c2.75 0 5.1 1 7.05 2.95C21 6.9 22 9.25 22 12s-1 5.1-2.95 7.05C17.1 21 14.75 22 12 22s-5.1-1-7.05-2.95C3 17.1 2 14.75 2 12s1-5.1 2.95-7.05C6.9 3 9.25 2 12 2z"/></svg>');
|
|
59
|
+
--md-admonition-icon--bug: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14 12h-4v-2h4m0 6h-4v-2h4m6-6h-2.81a5.985 5.985 0 00-1.82-1.96L17 4.41 15.59 3l-2.17 2.17a6.002 6.002 0 00-2.83 0L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20V8z"/></svg>');
|
|
60
|
+
--md-admonition-icon--example: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7 13v-2h14v2H7m0 6v-2h14v2H7M7 7V5h14v2H7M3 8V5H2V4h2v4H3m-1 9v-1h3v4H2v-1h2v-.5H3v-1h1V17H2m2.25-7a.75.75 0 01.75.75c0 .2-.08.39-.21.52L3.12 13H5v1H2v-.92L4 11H2v-1h2.25z"/></svg>');
|
|
61
|
+
--md-admonition-icon--quote: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14 17h3l2-4V7h-6v6h3M6 17h3l2-4V7H5v6h3l-2 4z"/></svg>');
|
|
62
|
+
--md-footnotes-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 7v4H5.83l3.58-3.59L8 6l-6 6 6 6 1.41-1.42L5.83 13H21V7h-2z"/></svg>');
|
|
63
|
+
--md-details-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8.59 16.58 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.42z"/></svg>');
|
|
64
|
+
--md-tasklist-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"/></svg>');
|
|
65
|
+
--md-tasklist-icon--checked: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>');
|
|
66
|
+
--md-nav-icon--prev: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>');
|
|
67
|
+
--md-nav-icon--next: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8.59 16.58 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.42z"/></svg>');
|
|
68
|
+
--md-toc-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 9h14V7H3v2m0 4h14v-2H3v2m0 4h14v-2H3v2m16 0h2v-2h-2v2m0-10v2h2V7h-2m0 6h2v-2h-2v2z"/></svg>');
|
|
69
|
+
--md-clipboard-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 21H8V7h11m0-2H8a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2m-3-4H4a2 2 0 0 0-2 2v14h2V3h12V1z"/></svg>');
|
|
70
|
+
--md-search-result-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h7c-.41-.25-.8-.56-1.14-.9-.33-.33-.61-.7-.86-1.1H6V4h7v5h5v1.18c.71.16 1.39.43 2 .82V8l-6-6m6.31 16.9c1.33-2.11.69-4.9-1.4-6.22-2.11-1.33-4.91-.68-6.22 1.4-1.34 2.11-.69 4.89 1.4 6.22 1.46.93 3.32.93 4.79.02L22 23.39 23.39 22l-3.08-3.1m-3.81.1a2.5 2.5 0 0 1-2.5-2.5 2.5 2.5 0 0 1 2.5-2.5 2.5 2.5 0 0 1 2.5 2.5 2.5 2.5 0 0 1-2.5 2.5z"/></svg>');
|
|
71
|
+
--md-source-forks-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M5 3.25a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0zm0 2.122a2.25 2.25 0 1 0-1.5 0v.878A2.25 2.25 0 0 0 5.75 8.5h1.5v2.128a2.251 2.251 0 1 0 1.5 0V8.5h1.5a2.25 2.25 0 0 0 2.25-2.25v-.878a2.25 2.25 0 1 0-1.5 0v.878a.75.75 0 0 1-.75.75h-4.5A.75.75 0 0 1 5 6.25v-.878zm3.75 7.378a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0zm3-8.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5z"/></svg>');
|
|
72
|
+
--md-source-repositories-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 1 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 0 1-1.072 1.05A2.495 2.495 0 0 1 2 11.5v-9zm10.5-1V9h-8c-.356 0-.694.074-1 .208V2.5a1 1 0 0 1 1-1h8zM5 12.25v3.25a.25.25 0 0 0 .4.2l1.45-1.087a.25.25 0 0 1 .3 0L8.6 15.7a.25.25 0 0 0 .4-.2v-3.25a.25.25 0 0 0-.25-.25h-3.5a.25.25 0 0 0-.25.25z"/></svg>');
|
|
73
|
+
--md-source-stars-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.75.75 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25zm0 2.445L6.615 5.5a.75.75 0 0 1-.564.41l-3.097.45 2.24 2.184a.75.75 0 0 1 .216.664l-.528 3.084 2.769-1.456a.75.75 0 0 1 .698 0l2.77 1.456-.53-3.084a.75.75 0 0 1 .216-.664l2.24-2.183-3.096-.45a.75.75 0 0 1-.564-.41L8 2.694v.001z"/></svg>');
|
|
74
|
+
--md-source-version-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M2.5 7.775V2.75a.25.25 0 0 1 .25-.25h5.025a.25.25 0 0 1 .177.073l6.25 6.25a.25.25 0 0 1 0 .354l-5.025 5.025a.25.25 0 0 1-.354 0l-6.25-6.25a.25.25 0 0 1-.073-.177zm-1.5 0V2.75C1 1.784 1.784 1 2.75 1h5.025c.464 0 .91.184 1.238.513l6.25 6.25a1.75 1.75 0 0 1 0 2.474l-5.026 5.026a1.75 1.75 0 0 1-2.474 0l-6.25-6.25A1.75 1.75 0 0 1 1 7.775zM6 5a1 1 0 1 0 0 2 1 1 0 0 0 0-2z"/></svg>');
|
|
75
|
+
--md-version-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!--! Font Awesome Free 6.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2022 Fonticons, Inc.--><path d="m310.6 246.6-127.1 128c-7.1 6.3-15.3 9.4-23.5 9.4s-16.38-3.125-22.63-9.375l-127.1-128C.224 237.5-2.516 223.7 2.438 211.8S19.07 192 32 192h255.1c12.94 0 24.62 7.781 29.58 19.75s3.12 25.75-6.08 34.85z"/></svg>');
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
:host > * {
|
|
79
|
+
/* CODE */
|
|
80
|
+
--md-code-fg-color: ${g.palette.text.primary};
|
|
81
|
+
--md-code-bg-color: ${g.palette.background.paper};
|
|
82
|
+
--md-code-hl-color: ${(0,$t.X4)(g.palette.warning.main,.5)};
|
|
83
|
+
--md-code-hl-color--light: var(--md-code-hl-color);
|
|
84
|
+
--md-code-hl-keyword-color: ${g.palette.type==="dark"?g.palette.primary.light:g.palette.primary.dark};
|
|
85
|
+
--md-code-hl-function-color: ${g.palette.type==="dark"?g.palette.secondary.light:g.palette.secondary.dark};
|
|
86
|
+
--md-code-hl-string-color: ${g.palette.type==="dark"?g.palette.success.light:g.palette.success.dark};
|
|
87
|
+
--md-code-hl-number-color: ${g.palette.type==="dark"?g.palette.error.light:g.palette.error.dark};
|
|
88
|
+
--md-code-hl-constant-color: var(--md-code-hl-function-color);
|
|
89
|
+
--md-code-hl-special-color: var(--md-code-hl-function-color);
|
|
90
|
+
--md-code-hl-name-color: var(--md-code-fg-color);
|
|
91
|
+
--md-code-hl-comment-color: var(--md-default-fg-color--light);
|
|
92
|
+
--md-code-hl-generic-color: var(--md-default-fg-color--light);
|
|
93
|
+
--md-code-hl-variable-color: var(--md-default-fg-color--light);
|
|
94
|
+
--md-code-hl-operator-color: var(--md-default-fg-color--light);
|
|
95
|
+
--md-code-hl-punctuation-color: var(--md-default-fg-color--light);
|
|
96
|
+
|
|
97
|
+
/* TYPESET */
|
|
98
|
+
--md-typeset-font-size: 1rem;
|
|
99
|
+
--md-typeset-color: var(--md-default-fg-color);
|
|
100
|
+
--md-typeset-a-color: ${g.palette.link};
|
|
101
|
+
--md-typeset-table-color: ${g.palette.text.primary};
|
|
102
|
+
--md-typeset-table-color--light: ${(0,$t.X4)(g.palette.text.primary,.5)};
|
|
103
|
+
--md-typeset-del-color: ${g.palette.type==="dark"?(0,$t.X4)(g.palette.error.dark,.5):(0,$t.X4)(g.palette.error.light,.5)};
|
|
104
|
+
--md-typeset-ins-color: ${g.palette.type==="dark"?(0,$t.X4)(g.palette.success.dark,.5):(0,$t.X4)(g.palette.success.light,.5)};
|
|
105
|
+
--md-typeset-mark-color: ${g.palette.type==="dark"?(0,$t.X4)(g.palette.warning.dark,.5):(0,$t.X4)(g.palette.warning.light,.5)};
|
|
106
|
+
--md-typeset-kbd-color: var(--md-code-bg-color);
|
|
107
|
+
--md-typeset-kbd-accent-color var(--md-code-bg-color);
|
|
108
|
+
--md-typeset-kbd-border-color: var(--md-default-fg-color--light);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
@media screen and (max-width: 76.1875em) {
|
|
112
|
+
:host > * {
|
|
113
|
+
/* TYPESET */
|
|
114
|
+
--md-typeset-font-size: .9rem;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
@media screen and (max-width: 600px) {
|
|
119
|
+
:host > * {
|
|
120
|
+
/* TYPESET */
|
|
121
|
+
--md-typeset-font-size: .7rem;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
--md-footer-bg-color: var(--md-default-bg-color);
|
|
126
|
+
--md-footer-bg-color--dark: var(--md-default-bg-color);
|
|
127
|
+
`,ue=({theme:g})=>`
|
|
128
|
+
/*================== Reset ==================*/
|
|
129
|
+
|
|
130
|
+
body {
|
|
131
|
+
--md-text-color: var(--md-default-fg-color);
|
|
132
|
+
--md-text-link-color: var(--md-accent-fg-color);
|
|
133
|
+
--md-text-font-family: ${g.typography.fontFamily};
|
|
134
|
+
font-family: var(--md-text-font-family);
|
|
135
|
+
background-color: unset;
|
|
136
|
+
}
|
|
137
|
+
`;const se="224px";var Ht=({theme:g,sidebar:R})=>`
|
|
138
|
+
/*================== Layout ==================*/
|
|
139
|
+
|
|
140
|
+
/* mkdocs material v9 compat */
|
|
141
|
+
.md-nav__title {
|
|
142
|
+
color: var(--md-default-fg-color);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.md-grid {
|
|
146
|
+
max-width: 100%;
|
|
147
|
+
margin: 0;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.md-nav {
|
|
151
|
+
font-size: calc(var(--md-typeset-font-size) * 0.9);
|
|
152
|
+
}
|
|
153
|
+
.md-nav__link {
|
|
154
|
+
display: flex;
|
|
155
|
+
align-items: center;
|
|
156
|
+
justify-content: space-between;
|
|
157
|
+
}
|
|
158
|
+
.md-nav__icon {
|
|
159
|
+
height: 20px !important;
|
|
160
|
+
width: 20px !important;
|
|
161
|
+
margin-left:${g.spacing(1)}px;
|
|
162
|
+
}
|
|
163
|
+
.md-nav__icon svg {
|
|
164
|
+
margin: 0;
|
|
165
|
+
width: 20px !important;
|
|
166
|
+
height: 20px !important;
|
|
167
|
+
}
|
|
168
|
+
.md-nav__icon:after {
|
|
169
|
+
width: 20px !important;
|
|
170
|
+
height: 20px !important;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.md-nav__item--active > .md-nav__link, a.md-nav__link--active {
|
|
174
|
+
text-decoration: underline;
|
|
175
|
+
color: var(--md-typeset-a-color);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.md-main__inner {
|
|
179
|
+
margin-top: 0;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.md-sidebar {
|
|
183
|
+
bottom: 75px;
|
|
184
|
+
position: fixed;
|
|
185
|
+
width: 16rem;
|
|
186
|
+
overflow-y: auto;
|
|
187
|
+
overflow-x: hidden;
|
|
188
|
+
scrollbar-color: rgb(193, 193, 193) #eee;
|
|
189
|
+
scrollbar-width: thin;
|
|
190
|
+
}
|
|
191
|
+
.md-sidebar .md-sidebar__scrollwrap {
|
|
192
|
+
width: calc(12.1rem);
|
|
193
|
+
}
|
|
194
|
+
.md-sidebar--secondary {
|
|
195
|
+
right: ${g.spacing(3)}px;
|
|
196
|
+
}
|
|
197
|
+
.md-sidebar::-webkit-scrollbar {
|
|
198
|
+
width: 5px;
|
|
199
|
+
}
|
|
200
|
+
.md-sidebar::-webkit-scrollbar-button {
|
|
201
|
+
width: 5px;
|
|
202
|
+
height: 5px;
|
|
203
|
+
}
|
|
204
|
+
.md-sidebar::-webkit-scrollbar-track {
|
|
205
|
+
background: #eee;
|
|
206
|
+
border: 1 px solid rgb(250, 250, 250);
|
|
207
|
+
box-shadow: 0px 0px 3px #dfdfdf inset;
|
|
208
|
+
border-radius: 3px;
|
|
209
|
+
}
|
|
210
|
+
.md-sidebar::-webkit-scrollbar-thumb {
|
|
211
|
+
width: 5px;
|
|
212
|
+
background: rgb(193, 193, 193);
|
|
213
|
+
border: transparent;
|
|
214
|
+
border-radius: 3px;
|
|
215
|
+
}
|
|
216
|
+
.md-sidebar::-webkit-scrollbar-thumb:hover {
|
|
217
|
+
background: rgb(125, 125, 125);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.md-content {
|
|
221
|
+
max-width: calc(100% - 16rem * 2);
|
|
222
|
+
margin-left: 16rem;
|
|
223
|
+
margin-bottom: 50px;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.md-footer {
|
|
227
|
+
position: fixed;
|
|
228
|
+
bottom: 0px;
|
|
229
|
+
pointer-events: none;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.md-footer-nav__link, .md-footer__link {
|
|
233
|
+
pointer-events: all;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.md-footer__title {
|
|
237
|
+
background-color: unset;
|
|
238
|
+
}
|
|
239
|
+
.md-footer-nav__link, .md-footer__link {
|
|
240
|
+
width: 16rem;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.md-dialog {
|
|
244
|
+
background-color: unset;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
@media screen and (min-width: 76.25em) {
|
|
248
|
+
.md-sidebar {
|
|
249
|
+
height: auto;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
@media screen and (max-width: 76.1875em) {
|
|
254
|
+
.md-nav {
|
|
255
|
+
transition: none !important;
|
|
256
|
+
background-color: var(--md-default-bg-color)
|
|
257
|
+
}
|
|
258
|
+
.md-nav--primary .md-nav__title {
|
|
259
|
+
cursor: auto;
|
|
260
|
+
color: var(--md-default-fg-color);
|
|
261
|
+
font-weight: 700;
|
|
262
|
+
white-space: normal;
|
|
263
|
+
line-height: 1rem;
|
|
264
|
+
height: auto;
|
|
265
|
+
display: flex;
|
|
266
|
+
flex-flow: column;
|
|
267
|
+
row-gap: 1.6rem;
|
|
268
|
+
padding: 1.2rem .8rem .8rem;
|
|
269
|
+
background-color: var(--md-default-bg-color);
|
|
270
|
+
}
|
|
271
|
+
.md-nav--primary .md-nav__title~.md-nav__list {
|
|
272
|
+
box-shadow: none;
|
|
273
|
+
}
|
|
274
|
+
.md-nav--primary .md-nav__title ~ .md-nav__list > :first-child {
|
|
275
|
+
border-top: none;
|
|
276
|
+
}
|
|
277
|
+
.md-nav--primary .md-nav__title .md-nav__button {
|
|
278
|
+
display: none;
|
|
279
|
+
}
|
|
280
|
+
.md-nav--primary .md-nav__title .md-nav__icon {
|
|
281
|
+
color: var(--md-default-fg-color);
|
|
282
|
+
position: static;
|
|
283
|
+
height: auto;
|
|
284
|
+
margin: 0 0 0 -0.2rem;
|
|
285
|
+
}
|
|
286
|
+
.md-nav--primary > .md-nav__title [for="none"] {
|
|
287
|
+
padding-top: 0;
|
|
288
|
+
}
|
|
289
|
+
.md-nav--primary .md-nav__item {
|
|
290
|
+
border-top: none;
|
|
291
|
+
}
|
|
292
|
+
.md-nav--primary :is(.md-nav__title,.md-nav__item) {
|
|
293
|
+
font-size : var(--md-typeset-font-size);
|
|
294
|
+
}
|
|
295
|
+
.md-nav .md-source {
|
|
296
|
+
display: none;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.md-sidebar {
|
|
300
|
+
height: 100%;
|
|
301
|
+
}
|
|
302
|
+
.md-sidebar--primary {
|
|
303
|
+
width: 12.1rem !important;
|
|
304
|
+
z-index: 200;
|
|
305
|
+
left: ${R.isPinned?`calc(-12.1rem + ${se})`:"calc(-12.1rem + 72px)"} !important;
|
|
306
|
+
}
|
|
307
|
+
.md-sidebar--secondary:not([hidden]) {
|
|
308
|
+
display: none;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
.md-content {
|
|
312
|
+
max-width: 100%;
|
|
313
|
+
margin-left: 0;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
.md-header__button {
|
|
317
|
+
margin: 0.4rem 0;
|
|
318
|
+
margin-left: 0.4rem;
|
|
319
|
+
padding: 0;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
.md-overlay {
|
|
323
|
+
left: 0;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
.md-footer {
|
|
327
|
+
position: static;
|
|
328
|
+
padding-left: 0;
|
|
329
|
+
}
|
|
330
|
+
.md-footer-nav__link {
|
|
331
|
+
/* footer links begin to overlap at small sizes without setting width */
|
|
332
|
+
width: 50%;
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
@media screen and (max-width: 600px) {
|
|
337
|
+
.md-sidebar--primary {
|
|
338
|
+
left: -12.1rem !important;
|
|
339
|
+
width: 12.1rem;
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
@media print {
|
|
345
|
+
.md-sidebar,
|
|
346
|
+
#toggle-sidebar {
|
|
347
|
+
display: none;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
.md-content {
|
|
351
|
+
margin: 0;
|
|
352
|
+
width: 100%;
|
|
353
|
+
max-width: 100%;
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
`;const Vt=["h1","h2","h3","h4","h5","h6"];var ae=({theme:g})=>`
|
|
357
|
+
/*================== Typeset ==================*/
|
|
358
|
+
|
|
359
|
+
.md-typeset {
|
|
360
|
+
font-size: var(--md-typeset-font-size);
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
${Vt.reduce((R,$)=>{var k;const X=(k=g.typography.htmlFontSize)!==null&&k!==void 0?k:16,tt=g.typography[$],{lineHeight:rt,fontFamily:Ct,fontWeight:Bt,fontSize:Wt}=tt,Yt=kt=>{let Mt=1;return typeof kt=="number"&&(Mt=kt/X*.6),typeof kt=="string"&&(Mt=kt.replace("rem","")),`calc(${Mt} * var(--md-typeset-font-size))`};return R.concat(`
|
|
364
|
+
.md-typeset ${$} {
|
|
365
|
+
color: var(--md-default-fg-color);
|
|
366
|
+
line-height: ${rt};
|
|
367
|
+
font-family: ${Ct};
|
|
368
|
+
font-weight: ${Bt};
|
|
369
|
+
font-size: ${Yt(Wt)};
|
|
370
|
+
}
|
|
371
|
+
`)},"")}
|
|
372
|
+
|
|
373
|
+
.md-typeset .md-content__button {
|
|
374
|
+
color: var(--md-default-fg-color);
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
.md-typeset hr {
|
|
378
|
+
border-bottom: 0.05rem dotted ${g.palette.divider};
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
.md-typeset details {
|
|
382
|
+
font-size: var(--md-typeset-font-size) !important;
|
|
383
|
+
}
|
|
384
|
+
.md-typeset details summary {
|
|
385
|
+
padding-left: 2.5rem !important;
|
|
386
|
+
}
|
|
387
|
+
.md-typeset details summary:before,
|
|
388
|
+
.md-typeset details summary:after {
|
|
389
|
+
top: 50% !important;
|
|
390
|
+
width: 20px !important;
|
|
391
|
+
height: 20px !important;
|
|
392
|
+
transform: rotate(0deg) translateY(-50%) !important;
|
|
393
|
+
}
|
|
394
|
+
.md-typeset details[open] > summary:after {
|
|
395
|
+
transform: rotate(90deg) translateX(-50%) !important;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
.md-typeset blockquote {
|
|
399
|
+
color: var(--md-default-fg-color--light);
|
|
400
|
+
border-left: 0.2rem solid var(--md-default-fg-color--light);
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
.md-typeset table:not([class]) {
|
|
404
|
+
font-size: var(--md-typeset-font-size);
|
|
405
|
+
border: 1px solid var(--md-default-fg-color);
|
|
406
|
+
border-bottom: none;
|
|
407
|
+
border-collapse: collapse;
|
|
408
|
+
}
|
|
409
|
+
.md-typeset table:not([class]) th {
|
|
410
|
+
font-weight: bold;
|
|
411
|
+
}
|
|
412
|
+
.md-typeset table:not([class]) td, .md-typeset table:not([class]) th {
|
|
413
|
+
border-bottom: 1px solid var(--md-default-fg-color);
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
.md-typeset pre > code::-webkit-scrollbar-thumb {
|
|
417
|
+
background-color: hsla(0, 0%, 0%, 0.32);
|
|
418
|
+
}
|
|
419
|
+
.md-typeset pre > code::-webkit-scrollbar-thumb:hover {
|
|
420
|
+
background-color: hsla(0, 0%, 0%, 0.87);
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
.md-typeset code {
|
|
424
|
+
word-break: keep-all;
|
|
425
|
+
}
|
|
426
|
+
`,Pe=()=>`
|
|
427
|
+
/*================== Animations ==================*/
|
|
428
|
+
/*
|
|
429
|
+
Disable CSS animations on link colors as they lead to issues in dark mode.
|
|
430
|
+
The dark mode color theme is applied later and theirfore there is always an animation from light to dark mode when navigation between pages.
|
|
431
|
+
*/
|
|
432
|
+
.md-dialog, .md-nav__link, .md-footer__link, .md-typeset a, .md-typeset a::before, .md-typeset .headerlink {
|
|
433
|
+
transition: none;
|
|
434
|
+
}
|
|
435
|
+
`,Te=({theme:g})=>`
|
|
436
|
+
/*================== Extensions ==================*/
|
|
437
|
+
|
|
438
|
+
/* HIGHLIGHT */
|
|
439
|
+
.highlight .md-clipboard:after {
|
|
440
|
+
content: unset;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
.highlight .nx {
|
|
444
|
+
color: ${g.palette.type==="dark"?"#ff53a3":"#ec407a"};
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
/* CODE HILITE */
|
|
448
|
+
.codehilite .gd {
|
|
449
|
+
background-color: ${g.palette.type==="dark"?"rgba(248,81,73,0.65)":"#fdd"};
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
.codehilite .gi {
|
|
453
|
+
background-color: ${g.palette.type==="dark"?"rgba(46,160,67,0.65)":"#dfd"};
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
/* TABBED */
|
|
457
|
+
.tabbed-set>input:nth-child(1):checked~.tabbed-labels>:nth-child(1),
|
|
458
|
+
.tabbed-set>input:nth-child(2):checked~.tabbed-labels>:nth-child(2),
|
|
459
|
+
.tabbed-set>input:nth-child(3):checked~.tabbed-labels>:nth-child(3),
|
|
460
|
+
.tabbed-set>input:nth-child(4):checked~.tabbed-labels>:nth-child(4),
|
|
461
|
+
.tabbed-set>input:nth-child(5):checked~.tabbed-labels>:nth-child(5),
|
|
462
|
+
.tabbed-set>input:nth-child(6):checked~.tabbed-labels>:nth-child(6),
|
|
463
|
+
.tabbed-set>input:nth-child(7):checked~.tabbed-labels>:nth-child(7),
|
|
464
|
+
.tabbed-set>input:nth-child(8):checked~.tabbed-labels>:nth-child(8),
|
|
465
|
+
.tabbed-set>input:nth-child(9):checked~.tabbed-labels>:nth-child(9),
|
|
466
|
+
.tabbed-set>input:nth-child(10):checked~.tabbed-labels>:nth-child(10),
|
|
467
|
+
.tabbed-set>input:nth-child(11):checked~.tabbed-labels>:nth-child(11),
|
|
468
|
+
.tabbed-set>input:nth-child(12):checked~.tabbed-labels>:nth-child(12),
|
|
469
|
+
.tabbed-set>input:nth-child(13):checked~.tabbed-labels>:nth-child(13),
|
|
470
|
+
.tabbed-set>input:nth-child(14):checked~.tabbed-labels>:nth-child(14),
|
|
471
|
+
.tabbed-set>input:nth-child(15):checked~.tabbed-labels>:nth-child(15),
|
|
472
|
+
.tabbed-set>input:nth-child(16):checked~.tabbed-labels>:nth-child(16),
|
|
473
|
+
.tabbed-set>input:nth-child(17):checked~.tabbed-labels>:nth-child(17),
|
|
474
|
+
.tabbed-set>input:nth-child(18):checked~.tabbed-labels>:nth-child(18),
|
|
475
|
+
.tabbed-set>input:nth-child(19):checked~.tabbed-labels>:nth-child(19),
|
|
476
|
+
.tabbed-set>input:nth-child(20):checked~.tabbed-labels>:nth-child(20) {
|
|
477
|
+
color: var(--md-accent-fg-color);
|
|
478
|
+
border-color: var(--md-accent-fg-color);
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
/* TASK-LIST */
|
|
482
|
+
.task-list-control .task-list-indicator::before {
|
|
483
|
+
background-color: ${g.palette.action.disabledBackground};
|
|
484
|
+
}
|
|
485
|
+
.task-list-control [type="checkbox"]:checked + .task-list-indicator:before {
|
|
486
|
+
background-color: ${g.palette.success.main};
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
/* ADMONITION */
|
|
490
|
+
.admonition {
|
|
491
|
+
font-size: var(--md-typeset-font-size) !important;
|
|
492
|
+
}
|
|
493
|
+
.admonition .admonition-title {
|
|
494
|
+
padding-left: 2.5rem !important;
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
.admonition .admonition-title:before {
|
|
498
|
+
top: 50% !important;
|
|
499
|
+
width: 20px !important;
|
|
500
|
+
height: 20px !important;
|
|
501
|
+
transform: translateY(-50%) !important;
|
|
502
|
+
}
|
|
503
|
+
`;const He=[he,ue,Ht,ae,Pe,Te],Gt=()=>(0,qt.Ut)(),Xe=()=>{const g=Gt(),R=(0,un.A)();return(0,i.useMemo)(()=>{const $={theme:R,sidebar:g};return He.reduce((k,X)=>k+X($),"")},[R,g])},fn=()=>{const g=Xe();return(0,i.useCallback)(R=>(R.getElementsByTagName("head")[0].insertAdjacentHTML("beforeend",`<style>${g}</style>`),R),[g])},ze=async(g,R)=>{let $;if(typeof g=="string")$=new DOMParser().parseFromString(g,"text/html").documentElement;else if(g instanceof Element)$=g;else throw new Error("dom is not a recognized type");for(const k of R)$=await k($);return $},_e=(g,R,$)=>{const k=g==="src"&&R.endsWith(".svg"),X=!R.match(/^([a-z]*:)?\/\//i),tt=R.startsWith($);return k&&(X||tt)},Mn=({techdocsStorageApi:g,entityId:R,path:$})=>async k=>{const X=await g.getApiOrigin(),tt=async(rt,Ct)=>{for(const Bt of rt)if(Bt.hasAttribute(Ct)){const Wt=Bt.getAttribute(Ct);if(!Wt)return;const Yt=await g.getBaseUrl(Wt,R,$);if(_e(Ct,Wt,X))try{const Mt=await(await fetch(Yt,{credentials:"include"})).text();Bt.setAttribute(Ct,`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(Mt)))}`)}catch{Bt.setAttribute("alt",`Error: ${Wt}`)}else Bt.setAttribute(Ct,Yt)}};return await Promise.all([tt(k.querySelectorAll("img"),"src"),tt(k.querySelectorAll("script"),"src"),tt(k.querySelectorAll("source"),"src"),tt(k.querySelectorAll("link"),"href"),tt(k.querySelectorAll("a[download]"),"href")]),k},Ln=()=>g=>((($,k)=>{Array.from($).filter(X=>X.hasAttribute(k)).forEach(X=>{const tt=X.getAttribute(k);if(tt){tt.match(/^https?:\/\//i)&&X.setAttribute("target","_blank");try{const rt=Ue(window.location.href);X.setAttribute(k,new URL(tt,rt).toString())}catch{X.replaceWith(X.textContent||tt)}}})})(Array.from(g.getElementsByTagName("a")),"href"),g);function Ue(g){const R=new URL(g);return!R.pathname.endsWith("/")&&!R.pathname.endsWith(".html")&&(R.pathname+="/"),R.toString()}var Mo=t(27326);let jn;jn=Promise.resolve().then(t.t.bind(t,25873,19));function Bn(g,R){jn.then($=>{"createRoot"in $?$.createRoot(R).render(g):$.render(g,R)})}const qn=()=>g=>{const R=g.querySelector('.md-header label[for="__drawer"]'),$=g.querySelector("article");if(!R||!$)return g;const k=R.cloneNode();return Bn(i.createElement(Mo.A),k),k.id="toggle-sidebar",k.title="Toggle Sidebar",k.classList.add("md-content__button"),k.style.setProperty("padding","0 0 0 5px"),k.style.setProperty("margin","0.4rem 0 0.4rem 0.4rem"),$==null||$.prepend(k),g},Lo=()=>g=>{var R;return(R=g.querySelector(".md-header"))===null||R===void 0||R.remove(),g},jo=()=>g=>{var R,$;return(R=g.querySelector(".md-footer .md-copyright"))===null||R===void 0||R.remove(),($=g.querySelector(".md-footer-copyright"))===null||$===void 0||$.remove(),g};var Bo=t(36021),Uo=t(90292),$o=t(52536),Fo=t.n($o);const No=g=>R=>{var $;const k=R.querySelector('[title="Edit this page"]');if(!k||!k.href)return R;const X=new URL(k.href),tt=g.byUrl(X);if((tt==null?void 0:tt.type)!=="github"&&(tt==null?void 0:tt.type)!=="gitlab")return R;const rt=(($=R.querySelector("article>h1"))===null||$===void 0?void 0:$.childNodes[0].textContent)||"",Ct=encodeURIComponent(`Documentation Feedback: ${rt}`),Bt=encodeURIComponent(`Page source:
|
|
504
|
+
${k.href}
|
|
505
|
+
|
|
506
|
+
Feedback:`),Wt=(tt==null?void 0:tt.type)==="github"?(0,Bo.F)(X.href,"blob"):X.href,Yt=Fo()(Wt),kt=`/${Yt.organization}/${Yt.name}`,Mt=k.cloneNode();switch(tt==null?void 0:tt.type){case"gitlab":Mt.href=`${X.origin}${kt}/issues/new?issue[title]=${Ct}&issue[description]=${Bt}`;break;case"github":Mt.href=`${X.origin}${kt}/issues/new?title=${Ct}&body=${Bt}`;break;default:return R}return Bn(i.createElement(Uo.A),Mt),Mt.style.paddingLeft="5px",Mt.title="Leave feedback for this page",Mt.id="git-feedback-link",k==null||k.insertAdjacentElement("beforebegin",Mt),R},to=()=>g=>(setTimeout(()=>{const R=g==null?void 0:g.querySelectorAll("li.md-nav__item--active");R.length!==0&&(R.forEach(k=>{const X=k==null?void 0:k.querySelector("input");X!=null&&X.checked||X==null||X.click()}),R[R.length-1].scrollIntoView())},200),g);var Wo=t(50868),ko=t(10437),eo=t(71677),no=t(87051),Ko=t(36338);const Un=(0,no.A)(g=>({tooltip:{fontSize:"inherit",color:g.palette.text.primary,margin:0,padding:g.spacing(.5),backgroundColor:"transparent",boxShadow:"none"}}))(eo.Ay),$n=()=>(0,o.jsx)(ko.A,{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"})}),zo=({text:g})=>{const[R,$]=(0,i.useState)(!1),[,k]=(0,Ko.A)(),X=(0,i.useCallback)(()=>{k(g),$(!0)},[g,k]),tt=(0,i.useCallback)(()=>{$(!1)},[$]);return(0,o.jsx)(Un,{title:"Copied to clipboard",placement:"left",open:R,onClose:tt,leaveDelay:1e3,children:(0,o.jsx)(gt.A,{style:{color:"inherit",position:"absolute"},className:"md-clipboard md-icon",onClick:X,children:(0,o.jsx)($n,{})})})},oo=g=>R=>{const $=R.querySelectorAll("pre > code");for(const X of $){var k;const tt=X.textContent||"",rt=document.createElement("div");X==null||(k=X.parentElement)===null||k===void 0||k.prepend(rt),Bn((0,o.jsx)(Wo.A,{theme:g,children:(0,o.jsx)(zo,{text:tt})}),rt)}return R},ro=({baseUrl:g,onClick:R})=>$=>(Array.from($.getElementsByTagName("a")).forEach(k=>{k.addEventListener("click",X=>{const rt=k.getAttribute("href");rt&&rt.startsWith(g)&&!k.hasAttribute("download")&&(X.preventDefault(),R(X,rt))})}),$),so=({onLoading:g,onLoaded:R})=>$=>(g(),$.addEventListener(E,function k(){R(),$.removeEventListener(E,k)}),$);function Ho(g,R){const $=new URL(R),k=`${$.origin}${$.pathname.replace(/\/$/,"")}`,X=g.replace(k,"").replace(/^\/+/,""),tt=new URL(`http://localhost/${X}`);return`${tt.pathname}${tt.search}${tt.hash}`}function _o(){const g=(0,Ft.Zp)(),$=(0,J.gf)(q.U).getOptionalString("app.baseUrl");return(0,i.useCallback)(X=>{let tt=X;if($)try{tt=Ho(X,$)}catch{}g(tt)},[g,$])}const Vo="screen and (max-width: 76.1875em)",Go=g=>{const R=_o(),$=(0,un.A)(),k=(0,Ke.A)(Vo),X=Rt(),tt=fn(),rt=(0,_.s)(),Ct=(0,J.gf)(Ye.s),Bt=(0,J.gf)(Tn.Y),{state:Wt,path:Yt,content:kt}=pe(),[Mt,te]=(0,i.useState)(null),ye=h(Mt),Qt=(0,i.useCallback)(()=>{if(!Mt)return;Mt.querySelectorAll(".md-sidebar").forEach(_t=>{if(k)_t.style.top="0px";else{var Zt;const Me=(Zt=document)===null||Zt===void 0?void 0:Zt.querySelector(".techdocs-reader-page");var Ee;const ie=(Ee=Me==null?void 0:Me.getBoundingClientRect().top)!==null&&Ee!==void 0?Ee:0;var Se;let Wn=(Se=Mt.getBoundingClientRect().top)!==null&&Se!==void 0?Se:0;const kn=Mt.querySelector(".md-container > .md-tabs");var Ve;const Zo=(Ve=kn==null?void 0:kn.getBoundingClientRect().height)!==null&&Ve!==void 0?Ve:0;Wn<ie&&(Wn=ie);const mn=Math.max(Wn,0)+Zo;_t.style.top=`${mn}px`;const Kn=Mt.querySelector(".md-container > .md-footer");var fe;const yn=(fe=Kn==null?void 0:Kn.getBoundingClientRect().top)!==null&&fe!==void 0?fe:window.innerHeight;_t.style.height=`${yn-mn}px`}_t.style.setProperty("opacity","1")})},[Mt,k]);(0,i.useEffect)(()=>(window.addEventListener("resize",Qt),window.addEventListener("scroll",Qt,!0),()=>{window.removeEventListener("resize",Qt),window.removeEventListener("scroll",Qt,!0)}),[Mt,Qt]);const ee=(0,i.useCallback)(()=>{if(!Mt)return;const Lt=Mt.querySelector(".md-footer");Lt&&(Lt.style.width=`${Mt.getBoundingClientRect().width}px`)},[Mt]);(0,i.useEffect)(()=>(window.addEventListener("resize",ee),()=>{window.removeEventListener("resize",ee)}),[Mt,ee]),(0,i.useEffect)(()=>{ye||(ee(),Qt())},[Wt,ye,ee,Qt]);const ne=(0,i.useCallback)((Lt,_t)=>ze(Lt,[X,Mn({techdocsStorageApi:Ct,entityId:g,path:_t}),Ln(),qn(),Lo(),jo(),No(Bt),tt]),[g,Bt,Ct,X,tt]),le=(0,i.useCallback)(async Lt=>ze(Lt,[to(),oo($),ro({baseUrl:window.location.origin,onClick:(_t,Zt)=>{var Ee;const Se=_t.ctrlKey||_t.metaKey,Ve=new URL(Zt),fe=((Ee=_t.target)===null||Ee===void 0?void 0:Ee.innerText)||Zt,Me=Zt.replace(window.location.origin,"");if(rt.captureEvent("click",fe,{attributes:{to:Me}}),Ve.hash)if(Se)window.open(Zt,"_blank");else{var ie;R(Zt),Lt==null||(ie=Lt.querySelector(`[id="${Ve.hash.slice(1)}"]`))===null||ie===void 0||ie.scrollIntoView()}else Se?window.open(Zt,"_blank"):R(Zt)}}),so({onLoading:()=>{},onLoaded:()=>{var _t;(_t=Lt.querySelector(".md-nav__title"))===null||_t===void 0||_t.removeAttribute("for")}}),so({onLoading:()=>{Array.from(Lt.querySelectorAll(".md-sidebar")).forEach(Zt=>{Zt.style.setProperty("opacity","0")})},onLoaded:()=>{}})]),[$,R,rt]);return(0,i.useEffect)(()=>{if(!kt)return()=>{};let Lt=!0;return ne(kt,Yt).then(async _t=>{if(!(_t!=null&&_t.innerHTML)||!Lt)return;window.scroll({top:0});const Zt=await le(_t);te(Zt)}),()=>{Lt=!1}},[kt,Yt,ne,le]),Mt};var Fn=t(41883),Yo=t(72020),Nn=t(99730);const Qo=()=>{const g=(0,Yo.YR)(),{shadowRoot:R}=(0,m.V)(),$=R==null?void 0:R.querySelector('[data-md-component="content"]'),k=R==null?void 0:R.querySelector('div[data-md-component="sidebar"][data-md-type="navigation"], div[data-md-component="navigation"]');let X=k==null?void 0:k.querySelector('[data-techdocs-addons-location="primary sidebar"]');X||(X=document.createElement("div"),X.setAttribute("data-techdocs-addons-location","primary sidebar"),k==null||k.prepend(X));const tt=R==null?void 0:R.querySelector('div[data-md-component="sidebar"][data-md-type="toc"], div[data-md-component="toc"]');let rt=tt==null?void 0:tt.querySelector('[data-techdocs-addons-location="secondary sidebar"]');return rt||(rt=document.createElement("div"),rt.setAttribute("data-techdocs-addons-location","secondary sidebar"),tt==null||tt.prepend(rt)),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fn.A,{container:X,children:g.renderComponentsByLocation(Nn.e.PrimarySidebar)}),(0,o.jsx)(Fn.A,{container:$,children:g.renderComponentsByLocation(Nn.e.Content)}),(0,o.jsx)(Fn.A,{container:rt,children:g.renderComponentsByLocation(Nn.e.SecondarySidebar)})]})},io=(0,O.A)({search:{width:"100%","@media (min-width: 76.1875em)":{width:"calc(100% - 34.4rem)",margin:"0 auto"},"@media print":{display:"none"}}}),ao=Qe(g=>{var R;const{withSearch:$=!0,onReady:k}=g,X=io(),{entityMetadata:{value:tt,loading:rt},entityRef:Ct,setShadowRoot:Bt}=(0,m.V)(),Wt=Go(Ct),Yt=window.location.pathname,kt=window.location.hash,Mt=h(Wt),[te]=P([`[id="${kt.slice(1)}"]`]);(0,i.useEffect)(()=>{if(!Mt)if(kt)te&&te.scrollIntoView();else{var Qt,ee;(ee=document)===null||ee===void 0||(Qt=ee.querySelector("header"))===null||Qt===void 0||Qt.scrollIntoView()}},[Yt,kt,te,Mt]);const ye=(0,i.useCallback)(Qt=>{Bt(Qt),k instanceof Function&&k()},[Bt,k]);return rt===!1&&!tt?(0,o.jsx)(M.M,{status:"404",statusMessage:"PAGE NOT FOUND"}):Wt?(0,o.jsx)(x.U,{children:(0,o.jsxs)(d.A,{container:!0,children:[(0,o.jsx)(d.A,{xs:12,item:!0,children:(0,o.jsx)(Be,{})}),$&&(0,o.jsx)(d.A,{className:X.search,xs:"auto",item:!0,children:(0,o.jsx)(de,{entityId:Ct,entityTitle:tt==null||(R=tt.metadata)===null||R===void 0?void 0:R.title})}),(0,o.jsx)(d.A,{xs:12,item:!0,children:(0,o.jsx)(S,{element:Wt,onAppend:ye,children:(0,o.jsx)(Qo,{})})})]})}):(0,o.jsx)(x.U,{children:(0,o.jsx)(d.A,{container:!0,children:(0,o.jsx)(d.A,{xs:12,item:!0,children:(0,o.jsx)(Be,{})})})})}),Dt=null},45061:function(Z,T,t){"use strict";t.d(T,{T:function(){return et}});var o=t(31085),i=t(14041),d=t(93285),O=t(42899),m=t(4387),v=t(13660),f=t(72020),c=t(86892),C=t(99730),E=t(67871),w=t(8859),h=t(34428),S=t(51372),p=t(58837),B=t(268),P=t(72501),A=t(72072);const U=(0,p.A)(q=>({root:{textAlign:"left"},label:{color:q.page.fontColor,fontWeight:q.typography.fontWeightBold,letterSpacing:0,fontSize:q.typography.fontSize,marginBottom:q.spacing(1)/2,lineHeight:1},value:{color:(0,B.X4)(q.page.fontColor,.8),fontSize:q.typography.fontSize,lineHeight:1}}),{name:"BackstageHeaderLabel"}),M=({value:q,className:ut,typographyRootComponent:dt})=>(0,o.jsx)(P.A,{component:dt!=null?dt:typeof q=="string"?"p":"span",className:ut,children:q});function x(q){const{label:ut,value:dt,url:Ot,contentTypograpyRootComponent:ht}=q,ct=U(),lt=(0,o.jsx)(M,{className:ct.value,value:dt||"<Unknown>",typographyRootComponent:ht});return(0,o.jsx)(O.A,{item:!0,children:(0,o.jsxs)(P.A,{component:"span",className:ct.root,children:[(0,o.jsx)(P.A,{className:ct.label,children:ut}),Ot?(0,o.jsx)(A.N_,{to:Ot,children:lt}):lt]})})}var K=t(69814),H=t(72427),V=t(65461),N=t(9222),z=t(45250),J=t(82779);const _=(0,o.jsx)(m.A,{animation:"wave",variant:"text",height:40}),et=q=>{const{children:ut}=q,dt=(0,f.YR)(),Ot=(0,H.gf)(V.U),{title:ht,setTitle:ct,subtitle:lt,setSubtitle:ft,entityRef:Et,metadata:{value:mt,loading:wt},entityMetadata:{value:vt,loading:it}}=(0,c.V)();(0,i.useEffect)(()=>{mt&&(ct(mt.site_name),ft(()=>{let{site_description:It}=mt;return(!It||It==="None")&&(It=""),It}))},[mt,ct,ft]);const gt=Ot.getOptional("app.title")||"Backstage",pt=[ht,lt,gt].filter(Boolean).join(" | "),{locationMetadata:Pt,spec:xt}=vt||{},W=xt==null?void 0:xt.lifecycle,G=vt?(0,E.t)(vt,S.vv):[],At=(0,N.S)(J.rQ)(),St=(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(x,{label:(0,z.capitalize)((vt==null?void 0:vt.kind)||"entity"),value:(0,o.jsx)(w.z,{color:"inherit",entityRef:Et,title:vt==null?void 0:vt.metadata.title,defaultKind:"Component"})}),G.length>0&&(0,o.jsx)(x,{label:"Owner",value:(0,o.jsx)(h.i,{color:"inherit",entityRefs:G,defaultKind:"group"})}),W?(0,o.jsx)(x,{label:"Lifecycle",value:String(W)}):null,Pt&&Pt.type!=="dir"&&Pt.type!=="file"?(0,o.jsx)(x,{label:"",value:(0,o.jsxs)(O.A,{container:!0,direction:"column",alignItems:"center",children:[(0,o.jsx)(O.A,{style:{padding:0},item:!0,children:(0,o.jsx)(v.A,{style:{marginTop:"-25px"}})}),(0,o.jsx)(O.A,{style:{padding:0},item:!0,children:"Source"})]}),url:Pt.target}):null]});return!it&&vt===void 0||!wt&&mt===void 0?null:(0,o.jsxs)(K.Y,{type:"Documentation",typeLink:At,title:ht||_,subtitle:lt===""?void 0:lt||_,children:[(0,o.jsx)(d.A,{titleTemplate:"%s",children:(0,o.jsx)("title",{children:pt})}),St,ut,dt.renderComponentsByLocation(C.e.Header)]})}},82779:function(Z,T,t){"use strict";t.d(T,{Oc:function(){return d},Ri:function(){return O},rQ:function(){return i}});var o=t(34569);const i=(0,o.H)({id:"techdocs:index-page"}),d=(0,o.H)({id:"techdocs:reader-page",params:["namespace","kind","name"]}),O=(0,o.H)({id:"techdocs:catalog-reader-view"})},27698:function(Z,T,t){"use strict";t.r(T),t.d(T,{TechDocsSearchResultListItem:function(){return E}});var o=t(31085),i=t(14041),d=t(46423),O=t(5951),m=t(58837),v=t(72501),f=t(72072),c=t(70734);const C=(0,m.A)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",marginBottom:"1rem"}}),E=w=>{const{result:h,highlight:S,lineClamp:p=5,asListItem:B=!0,asLink:P=!0,title:A,icon:U}=w,M=C(),x=({children:V})=>P?(0,o.jsx)(f.N_,{noTrack:!0,to:h.location,children:V}):(0,o.jsx)(o.Fragment,{children:V}),K=()=>{const V=S!=null&&S.fields.title?(0,o.jsx)(c.e,{text:S.fields.title,preTag:S.preTag,postTag:S.postTag}):h.title,N=S!=null&&S.fields.entityTitle?(0,o.jsx)(c.e,{text:S.fields.entityTitle,preTag:S.preTag,postTag:S.postTag}):h.entityTitle,z=S!=null&&S.fields.name?(0,o.jsx)(c.e,{text:S.fields.name,preTag:S.preTag,postTag:S.postTag}):h.name;return h?(0,o.jsx)(O.A,{className:M.itemText,primaryTypographyProps:{variant:"h6"},primary:(0,o.jsx)(x,{children:A||(0,o.jsxs)(o.Fragment,{children:[V," | ",N!=null?N:z," docs"]})}),secondary:(0,o.jsx)(v.A,{component:"span",style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:p,overflow:"hidden"},color:"textSecondary",variant:"body2",children:S!=null&&S.fields.text?(0,o.jsx)(c.e,{text:S.fields.text,preTag:S.preTag,postTag:S.postTag}):h.text})}):null},H=({children:V})=>B?(0,o.jsxs)(o.Fragment,{children:[U&&(0,o.jsx)(d.A,{children:typeof U=="function"?U(h):U}),(0,o.jsx)("div",{className:M.flexContainer,children:V})]}):(0,o.jsx)(o.Fragment,{children:V});return(0,o.jsx)(H,{children:(0,o.jsx)(K,{})})}},86973:function(){}},function(Z){var T=function(o){return Z(Z.s=o)};Z.O(0,[1751,1888,5067,1678,235,6587,2754,9669,1975,5042,7400,4121],function(){return T(85318)});var t=Z.O()}]);})();
|
|
507
|
+
|
|
508
|
+
//# sourceMappingURL=main.a258183d.js.map
|