@techdocs/cli 1.8.17-next.0 → 1.8.17-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 +22 -0
- package/dist/embedded-app/.config-schema.json +96 -1
- package/dist/embedded-app/index.html +1 -1
- package/dist/embedded-app/static/124.a0a572f3.chunk.js +6 -0
- package/dist/embedded-app/static/124.a0a572f3.chunk.js.map +1 -0
- package/dist/embedded-app/static/{1297.f8916d08.chunk.js → 1297.b4799570.chunk.js} +3 -3
- package/dist/embedded-app/static/1297.b4799570.chunk.js.map +1 -0
- package/dist/embedded-app/static/1902.6f404f8c.chunk.js +10 -0
- package/dist/embedded-app/static/1902.6f404f8c.chunk.js.map +1 -0
- package/dist/embedded-app/static/2401.14631655.chunk.js +6 -0
- package/dist/embedded-app/static/2401.14631655.chunk.js.map +1 -0
- package/dist/embedded-app/static/2420.f9fbc916.chunk.js +6 -0
- package/dist/embedded-app/static/2420.f9fbc916.chunk.js.map +1 -0
- package/dist/embedded-app/static/287.961ccb08.chunk.js +6 -0
- package/dist/embedded-app/static/287.961ccb08.chunk.js.map +1 -0
- package/dist/embedded-app/static/3182.3cbe56e4.chunk.js +7 -0
- package/dist/embedded-app/static/3182.3cbe56e4.chunk.js.map +1 -0
- package/dist/embedded-app/static/3632.681a005c.chunk.js +6 -0
- package/dist/embedded-app/static/3632.681a005c.chunk.js.map +1 -0
- package/dist/embedded-app/static/3720.1978cecb.chunk.js +11 -0
- package/dist/embedded-app/static/3720.1978cecb.chunk.js.map +1 -0
- package/dist/embedded-app/static/4036.a029793d.chunk.js +3 -0
- package/dist/embedded-app/static/4036.a029793d.chunk.js.map +1 -0
- package/dist/embedded-app/static/4487.f9cc6633.chunk.js +3 -0
- package/dist/embedded-app/static/4487.f9cc6633.chunk.js.map +1 -0
- package/dist/embedded-app/static/4516.b1a92d53.chunk.js +3 -0
- package/dist/embedded-app/static/4516.b1a92d53.chunk.js.map +1 -0
- package/dist/embedded-app/static/4919.e2124196.chunk.js +3 -0
- package/dist/embedded-app/static/4919.e2124196.chunk.js.map +1 -0
- package/dist/embedded-app/static/5724.8c459ffd.chunk.js +4 -0
- package/dist/embedded-app/static/5724.8c459ffd.chunk.js.map +1 -0
- package/dist/embedded-app/static/6271.1952ce76.chunk.js +6 -0
- package/dist/embedded-app/static/6271.1952ce76.chunk.js.map +1 -0
- package/dist/embedded-app/static/6415.3f0e01a6.chunk.js +6 -0
- package/dist/embedded-app/static/6415.3f0e01a6.chunk.js.map +1 -0
- package/dist/embedded-app/static/8307.fd2c3bf0.chunk.js +9 -0
- package/dist/embedded-app/static/8307.fd2c3bf0.chunk.js.map +1 -0
- package/dist/embedded-app/static/8384.96619c53.chunk.js +6 -0
- package/dist/embedded-app/static/8384.96619c53.chunk.js.map +1 -0
- package/dist/embedded-app/static/898.815b96f0.chunk.js +4 -0
- package/dist/embedded-app/static/898.815b96f0.chunk.js.map +1 -0
- package/dist/embedded-app/static/{9234.ac5ee4d5.chunk.js → 9234.ad94610e.chunk.js} +2 -2
- package/dist/embedded-app/static/{9234.ac5ee4d5.chunk.js.map → 9234.ad94610e.chunk.js.map} +1 -1
- package/dist/embedded-app/static/9605.18e9db70.chunk.js +11 -0
- package/dist/embedded-app/static/9605.18e9db70.chunk.js.map +1 -0
- package/dist/embedded-app/static/9652.8daa9515.chunk.js +6 -0
- package/dist/embedded-app/static/9652.8daa9515.chunk.js.map +1 -0
- package/dist/embedded-app/static/main.6518d659.js +509 -0
- package/dist/embedded-app/static/main.6518d659.js.map +1 -0
- package/dist/embedded-app/static/{module-material-table.60f080a9.js → module-material-table.695896b2.js} +2 -2
- package/dist/embedded-app/static/{module-material-table.60f080a9.js.map → module-material-table.695896b2.js.map} +1 -1
- package/dist/embedded-app/static/module-material-ui.3807a580.js +24 -0
- package/dist/embedded-app/static/module-material-ui.3807a580.js.map +1 -0
- package/dist/embedded-app/static/module-zod.9a0df421.js +3 -0
- package/dist/embedded-app/static/{module-zod.18508a39.js.map → module-zod.9a0df421.js.map} +1 -1
- package/dist/embedded-app/static/{react-syntax-highlighter_languages_highlight_lisp.4a81e0ae.chunk.js → react-syntax-highlighter_languages_highlight_lisp.e1c07c6d.chunk.js} +2 -2
- package/dist/embedded-app/static/{react-syntax-highlighter_languages_highlight_lisp.4a81e0ae.chunk.js.map → react-syntax-highlighter_languages_highlight_lisp.e1c07c6d.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{runtime.c21a7aa4.js → runtime.6518d659.js} +2 -2
- package/dist/embedded-app/static/runtime.6518d659.js.map +1 -0
- package/dist/embedded-app/static/vendor.6518d659.js +155 -0
- package/dist/embedded-app/static/vendor.6518d659.js.map +1 -0
- package/dist/index.cjs.js +1 -1
- package/package.json +4 -4
- package/dist/embedded-app/static/124.5ba6885f.chunk.js +0 -6
- package/dist/embedded-app/static/124.5ba6885f.chunk.js.map +0 -1
- package/dist/embedded-app/static/1297.f8916d08.chunk.js.map +0 -1
- package/dist/embedded-app/static/2401.d309433f.chunk.js +0 -6
- package/dist/embedded-app/static/2401.d309433f.chunk.js.map +0 -1
- package/dist/embedded-app/static/2420.037cfc15.chunk.js +0 -6
- package/dist/embedded-app/static/2420.037cfc15.chunk.js.map +0 -1
- package/dist/embedded-app/static/2745.5b1c08b3.chunk.js +0 -6
- package/dist/embedded-app/static/2745.5b1c08b3.chunk.js.map +0 -1
- package/dist/embedded-app/static/2772.bdf6f4ac.chunk.js +0 -168
- package/dist/embedded-app/static/2772.bdf6f4ac.chunk.js.map +0 -1
- package/dist/embedded-app/static/287.0d76734a.chunk.js +0 -6
- package/dist/embedded-app/static/287.0d76734a.chunk.js.map +0 -1
- package/dist/embedded-app/static/3182.690c18de.chunk.js +0 -7
- package/dist/embedded-app/static/3182.690c18de.chunk.js.map +0 -1
- package/dist/embedded-app/static/3632.c54686af.chunk.js +0 -6
- package/dist/embedded-app/static/3632.c54686af.chunk.js.map +0 -1
- package/dist/embedded-app/static/4036.6d4f48ee.chunk.js +0 -3
- package/dist/embedded-app/static/4036.6d4f48ee.chunk.js.map +0 -1
- package/dist/embedded-app/static/4400.74f2ff55.chunk.js +0 -6
- package/dist/embedded-app/static/4400.74f2ff55.chunk.js.map +0 -1
- package/dist/embedded-app/static/4943.f9ffc89d.chunk.js +0 -4
- package/dist/embedded-app/static/4943.f9ffc89d.chunk.js.map +0 -1
- package/dist/embedded-app/static/5502.59e5e2d7.chunk.js +0 -3
- package/dist/embedded-app/static/5502.59e5e2d7.chunk.js.map +0 -1
- package/dist/embedded-app/static/5580.aad136c2.chunk.js +0 -4
- package/dist/embedded-app/static/5580.aad136c2.chunk.js.map +0 -1
- package/dist/embedded-app/static/6066.c5fcf8d3.chunk.js +0 -3
- package/dist/embedded-app/static/6066.c5fcf8d3.chunk.js.map +0 -1
- package/dist/embedded-app/static/6271.50d6fc37.chunk.js +0 -6
- package/dist/embedded-app/static/6271.50d6fc37.chunk.js.map +0 -1
- package/dist/embedded-app/static/6545.f37f8e2b.chunk.js +0 -3
- package/dist/embedded-app/static/6545.f37f8e2b.chunk.js.map +0 -1
- package/dist/embedded-app/static/7137.9e328e07.chunk.js +0 -3
- package/dist/embedded-app/static/7137.9e328e07.chunk.js.map +0 -1
- package/dist/embedded-app/static/8307.0cba06d7.chunk.js +0 -9
- package/dist/embedded-app/static/8307.0cba06d7.chunk.js.map +0 -1
- package/dist/embedded-app/static/8384.e32c3b89.chunk.js +0 -6
- package/dist/embedded-app/static/8384.e32c3b89.chunk.js.map +0 -1
- package/dist/embedded-app/static/8721.77fdaf76.chunk.js +0 -11
- package/dist/embedded-app/static/8721.77fdaf76.chunk.js.map +0 -1
- package/dist/embedded-app/static/9605.57f9f1ff.chunk.js +0 -11
- package/dist/embedded-app/static/9605.57f9f1ff.chunk.js.map +0 -1
- package/dist/embedded-app/static/9652.f79c63a2.chunk.js +0 -6
- package/dist/embedded-app/static/9652.f79c63a2.chunk.js.map +0 -1
- package/dist/embedded-app/static/9797.047c7087.chunk.js +0 -10
- package/dist/embedded-app/static/9797.047c7087.chunk.js.map +0 -1
- package/dist/embedded-app/static/main.c21a7aa4.js +0 -513
- package/dist/embedded-app/static/main.c21a7aa4.js.map +0 -1
- package/dist/embedded-app/static/module-material-ui.b719b7fa.js +0 -24
- package/dist/embedded-app/static/module-material-ui.b719b7fa.js.map +0 -1
- package/dist/embedded-app/static/module-zod.18508a39.js +0 -3
- package/dist/embedded-app/static/runtime.c21a7aa4.js.map +0 -1
- package/dist/embedded-app/static/vendor.c21a7aa4.js +0 -155
- package/dist/embedded-app/static/vendor.c21a7aa4.js.map +0 -1
|
@@ -1,513 +0,0 @@
|
|
|
1
|
-
(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[8792],{45843:(z,P,t)=>{"use strict";t.d(P,{d:()=>m});var n=t(6820),o=t(78692),l=t(70835),y=t(86519);function v(A){return!A.cursor}function g(A){return!v(A)}var u=t(10288),c=t.n(u);const h="catalog";var E=t(94214);class p{discoveryApi;fetchApi;constructor(i){this.discoveryApi=i.discoveryApi,this.fetchApi=i.fetchApi||{fetch:c()}}async analyzeLocation(i,C){const f=await this.discoveryApi.getBaseUrl(h),S=E.parse("/analyze-location").expand({});return await this.fetchApi.fetch(`${f}${S}`,{headers:{"Content-Type":"application/json",...C?.token&&{Authorization:`Bearer ${C?.token}`}},method:"POST",body:JSON.stringify(i.body)})}async createLocation(i,C){const f=await this.discoveryApi.getBaseUrl(h),S=E.parse("/locations{?dryRun}").expand({...i.query});return await this.fetchApi.fetch(`${f}${S}`,{headers:{"Content-Type":"application/json",...C?.token&&{Authorization:`Bearer ${C?.token}`}},method:"POST",body:JSON.stringify(i.body)})}async deleteEntityByUid(i,C){const f=await this.discoveryApi.getBaseUrl(h),S=E.parse("/entities/by-uid/{uid}").expand({uid:i.path.uid});return await this.fetchApi.fetch(`${f}${S}`,{headers:{"Content-Type":"application/json",...C?.token&&{Authorization:`Bearer ${C?.token}`}},method:"DELETE"})}async deleteLocation(i,C){const f=await this.discoveryApi.getBaseUrl(h),S=E.parse("/locations/{id}").expand({id:i.path.id});return await this.fetchApi.fetch(`${f}${S}`,{headers:{"Content-Type":"application/json",...C?.token&&{Authorization:`Bearer ${C?.token}`}},method:"DELETE"})}async getEntities(i,C){const f=await this.discoveryApi.getBaseUrl(h),S=E.parse("/entities{?fields,limit,filter*,offset,after,order*}").expand({...i.query});return await this.fetchApi.fetch(`${f}${S}`,{headers:{"Content-Type":"application/json",...C?.token&&{Authorization:`Bearer ${C?.token}`}},method:"GET"})}async getEntitiesByQuery(i,C){const f=await this.discoveryApi.getBaseUrl(h),S=E.parse("/entities/by-query{?fields,limit,orderField*,cursor,filter*,fullTextFilterTerm,fullTextFilterFields}").expand({...i.query});return await this.fetchApi.fetch(`${f}${S}`,{headers:{"Content-Type":"application/json",...C?.token&&{Authorization:`Bearer ${C?.token}`}},method:"GET"})}async getEntitiesByRefs(i,C){const f=await this.discoveryApi.getBaseUrl(h),S=E.parse("/entities/by-refs/{?filter*}").expand({...i.query});return await this.fetchApi.fetch(`${f}${S}`,{headers:{"Content-Type":"application/json",...C?.token&&{Authorization:`Bearer ${C?.token}`}},method:"POST",body:JSON.stringify(i.body)})}async getEntityAncestryByName(i,C){const f=await this.discoveryApi.getBaseUrl(h),S=E.parse("/entities/by-name/{kind}/{namespace}/{name}/ancestry").expand({kind:i.path.kind,namespace:i.path.namespace,name:i.path.name});return await this.fetchApi.fetch(`${f}${S}`,{headers:{"Content-Type":"application/json",...C?.token&&{Authorization:`Bearer ${C?.token}`}},method:"GET"})}async getEntityByName(i,C){const f=await this.discoveryApi.getBaseUrl(h),S=E.parse("/entities/by-name/{kind}/{namespace}/{name}").expand({kind:i.path.kind,namespace:i.path.namespace,name:i.path.name});return await this.fetchApi.fetch(`${f}${S}`,{headers:{"Content-Type":"application/json",...C?.token&&{Authorization:`Bearer ${C?.token}`}},method:"GET"})}async getEntityByUid(i,C){const f=await this.discoveryApi.getBaseUrl(h),S=E.parse("/entities/by-uid/{uid}").expand({uid:i.path.uid});return await this.fetchApi.fetch(`${f}${S}`,{headers:{"Content-Type":"application/json",...C?.token&&{Authorization:`Bearer ${C?.token}`}},method:"GET"})}async getEntityFacets(i,C){const f=await this.discoveryApi.getBaseUrl(h),S=E.parse("/entity-facets{?facet*,filter*}").expand({...i.query});return await this.fetchApi.fetch(`${f}${S}`,{headers:{"Content-Type":"application/json",...C?.token&&{Authorization:`Bearer ${C?.token}`}},method:"GET"})}async getLocation(i,C){const f=await this.discoveryApi.getBaseUrl(h),S=E.parse("/locations/{id}").expand({id:i.path.id});return await this.fetchApi.fetch(`${f}${S}`,{headers:{"Content-Type":"application/json",...C?.token&&{Authorization:`Bearer ${C?.token}`}},method:"GET"})}async getLocationByEntity(i,C){const f=await this.discoveryApi.getBaseUrl(h),S=E.parse("/locations/by-entity/{kind}/{namespace}/{name}").expand({kind:i.path.kind,namespace:i.path.namespace,name:i.path.name});return await this.fetchApi.fetch(`${f}${S}`,{headers:{"Content-Type":"application/json",...C?.token&&{Authorization:`Bearer ${C?.token}`}},method:"GET"})}async getLocations(i,C){const f=await this.discoveryApi.getBaseUrl(h),S=E.parse("/locations").expand({});return await this.fetchApi.fetch(`${f}${S}`,{headers:{"Content-Type":"application/json",...C?.token&&{Authorization:`Bearer ${C?.token}`}},method:"GET"})}async refreshEntity(i,C){const f=await this.discoveryApi.getBaseUrl(h),S=E.parse("/refresh").expand({});return await this.fetchApi.fetch(`${f}${S}`,{headers:{"Content-Type":"application/json",...C?.token&&{Authorization:`Bearer ${C?.token}`}},method:"POST",body:JSON.stringify(i.body)})}async validateEntity(i,C){const f=await this.discoveryApi.getBaseUrl(h),S=E.parse("/validate-entity").expand({});return await this.fetchApi.fetch(`${f}${S}`,{headers:{"Content-Type":"application/json",...C?.token&&{Authorization:`Bearer ${C?.token}`}},method:"POST",body:JSON.stringify(i.body)})}}class m{apiClient;constructor(i){this.apiClient=new p(i)}async getEntityAncestors(i,C){return await this.requestRequired(await this.apiClient.getEntityAncestryByName({path:(0,n.KU)(i.entityRef)},C))}async getLocationById(i,C){return await this.requestOptional(await this.apiClient.getLocation({path:{id:i}},C))}async getLocationByEntity(i,C){return await this.requestOptional(await this.apiClient.getLocationByEntity({path:(0,n.KU)(i)},C))}async getEntities(i,C){const{filter:f=[],fields:O=[],order:S,offset:I,limit:D,after:w}=i??{},$=[];if(S)for(const F of[S].flat())F&&$.push(`${F.order}:${F.field}`);const H=await this.requestRequired(await this.apiClient.getEntities({query:{fields:O,limit:D,filter:this.getFilterValue(f),offset:I,after:w,order:S?$:void 0}},C));if($.length)return{items:H};const G=(F,Q)=>{if(F.metadata?.name===void 0||F.kind===void 0||Q.metadata?.name===void 0||Q.kind===void 0)return 0;const B=(0,n.U2)(F),V=(0,n.U2)(Q);return B<V?-1:B>V?1:0};return{items:H.sort(G)}}async getEntitiesByRefs(i,C){const f=await this.apiClient.getEntitiesByRefs({body:{entityRefs:i.entityRefs,fields:i.fields},query:{filter:this.getFilterValue(i.filter)}},C);if(!f.ok)throw await l.o.fromResponse(f);const{items:O}=await f.json();return{items:O.map(S=>S??void 0)}}async queryEntities(i={},C){const f={};if(v(i)){const{fields:O=[],filter:S,limit:I,orderFields:D,fullTextFilter:w}=i;f.filter=this.getFilterValue(S),I!==void 0&&(f.limit=I),D!==void 0&&(f.orderField=(Array.isArray(D)?D:[D]).map(({field:H,order:G})=>`${H},${G}`)),O.length&&(f.fields=O);const $=w?.term?.trim();$&&(f.fullTextFilterTerm=$),w?.fields?.length&&(f.fullTextFilterFields=w.fields)}else{const{fields:O=[],limit:S,cursor:I}=i;f.cursor=I,S!==void 0&&(f.limit=S),O.length&&(f.fields=O)}return this.apiClient.getEntitiesByQuery({query:f},C).then(O=>O.json())}async getEntityByRef(i,C){return this.requestOptional(await this.apiClient.getEntityByName({path:(0,n.KU)(i)},C))}async getEntityByName(i,C){const{kind:f,namespace:O="default",name:S}=i;return this.requestOptional(await this.apiClient.getEntityByName({path:{kind:f,namespace:O,name:S}},C))}async refreshEntity(i,C){const f=await this.apiClient.refreshEntity({body:{entityRef:i}},C);if(f.status!==200)throw new Error(await f.text())}async getEntityFacets(i,C){const{filter:f=[],facets:O}=i;return await this.requestOptional(await this.apiClient.getEntityFacets({query:{facet:O,filter:this.getFilterValue(f)}},C))}async addLocation(i,C){const{type:f="url",target:O,dryRun:S}=i,I=await this.apiClient.createLocation({body:{type:f,target:O},query:{dryRun:S?"true":void 0}},C);if(I.status!==201)throw new Error(await I.text());const{location:D,entities:w,exists:$}=await I.json();if(!D)throw new Error(`Location wasn't added: ${O}`);return{location:D,entities:w,exists:$}}async getLocationByRef(i,C){return(await this.requestRequired(await this.apiClient.getLocations({},C))).map(O=>O.data).find(O=>i===(0,o.KL)(O))}async removeLocationById(i,C){await this.requestIgnored(await this.apiClient.deleteLocation({path:{id:i}},C))}async removeEntityByUid(i,C){await this.requestIgnored(await this.apiClient.deleteEntityByUid({path:{uid:i}},C))}async validateEntity(i,C,f){const O=await this.apiClient.validateEntity({body:{entity:i,location:C}},f);if(O.ok)return{valid:!0};if(O.status!==400)throw await l.o.fromResponse(O);const{errors:S=[]}=await O.json();return{valid:!1,errors:S}}async requestIgnored(i){if(!i.ok)throw await l.o.fromResponse(i)}async requestRequired(i){if(!i.ok)throw await l.o.fromResponse(i);return i.json()}async requestOptional(i){if(!i.ok){if(i.status===404)return;throw await l.o.fromResponse(i)}return await i.json()}getFilterValue(i=[]){const C=[];for(const f of[i].flat()){const O=[];for(const[S,I]of Object.entries(f))for(const D of[I].flat())D===y.c?O.push(S):typeof D=="string"&&O.push(`${S}=${D}`);O.length&&C.push(O.join(","))}return C}}},86519:(z,P,t)=>{"use strict";t.d(P,{c:()=>n});const n=Symbol.for("CATALOG_FILTER_EXISTS_0e15b590c0b343a2bae3e787e84c2111")},72348:(z,P,t)=>{"use strict";t.d(P,{P:()=>l,_P:()=>o,oQ:()=>n});const n="default",o="backstage.io/view-url",l="backstage.io/edit-url",y="kubernetes.io/api-server",v="kubernetes.io/api-server-certificate-authority",g="kubernetes.io/auth-provider"},6820:(z,P,t)=>{"use strict";t.d(P,{KU:()=>y,U2:()=>v,sM:()=>l});var n=t(72348);function o(g){let u=g.indexOf(":");const c=g.indexOf("/");c!==-1&&c<u&&(u=-1);const h=u===-1?void 0:g.slice(0,u),E=c===-1?void 0:g.slice(u+1,c),p=g.slice(Math.max(u+1,c+1));if(h===""||E===""||p==="")throw new TypeError(`Entity reference "${g}" was not on the form [<kind>:][<namespace>/]<name>`);return{kind:h,namespace:E,name:p}}function l(g){return{kind:g.kind,namespace:g.metadata.namespace||n.oQ,name:g.metadata.name}}function y(g,u){if(!g)throw new Error("Entity reference must not be empty");const c=u?.defaultKind,h=u?.defaultNamespace||n.oQ;let E,p,m;if(typeof g=="string"){const A=o(g);E=A.kind??c,p=A.namespace??h,m=A.name}else E=g.kind??c,p=g.namespace??h,m=g.name;if(E)if(p){if(!m){const A=JSON.stringify(g);throw new Error(`Entity reference ${A} had missing or empty name`)}}else{const A=JSON.stringify(g);throw new Error(`Entity reference ${A} had missing or empty namespace`)}else{const A=JSON.stringify(g);throw new Error(`Entity reference ${A} had missing or empty kind (e.g. did not start with "component:" or similar)`)}return{kind:E,namespace:p,name:m}}function v(g){let u,c,h;return"metadata"in g?(u=g.kind,c=g.metadata.namespace??n.oQ,h=g.metadata.name):(u=g.kind,c=g.namespace??n.oQ,h=g.name),`${u.toLocaleLowerCase("en-US")}:${c.toLocaleLowerCase("en-US")}/${h.toLocaleLowerCase("en-US")}`}},51372:(z,P,t)=>{"use strict";t.d(P,{fT:()=>c,jn:()=>A,nC:()=>u,sA:()=>i,vv:()=>n});const n="ownedBy",o="ownerOf",l="consumesApi",y="apiConsumedBy",v="providesApi",g="apiProvidedBy",u="dependsOn",c="dependencyOf",h="parentOf",E="childOf",p="memberOf",m="hasMember",A="partOf",i="hasPart"},17736:(z,P,t)=>{"use strict";t.d(P,{Eo:()=>n,I4:()=>l,r2:()=>o});const n="backstage.io/managed-by-location",o="backstage.io/managed-by-origin-location",l="backstage.io/source-location"},78692:(z,P,t)=>{"use strict";t.d(P,{Cr:()=>g,KL:()=>v,aY:()=>y});var n=t(6820),o=t(17736);const l=/^[\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 y(u){if(typeof u!="string")throw new TypeError(`Unable to parse location ref '${u}', unexpected argument ${typeof u}`);const c=u.indexOf(":");if(c<0)throw new TypeError(`Unable to parse location ref '${u}', expected '<type>:<target>', e.g. 'url:https://host/path'`);const h=u.substring(0,c).trim(),E=u.substring(c+1).trim();if(!h||!E)throw new TypeError(`Unable to parse location ref '${u}', expected '<type>:<target>', e.g. 'url:https://host/path'`);if(h==="http"||h==="https")throw new TypeError(`Invalid location ref '${u}', please prefix it with 'url:', e.g. 'url:${u}'`);if(l.test(E))throw new TypeError(`Invalid location ref '${u}', target is a javascript: URL`);return{type:h,target:E}}function v(u){const{type:c,target:h}=u;if(c){if(!h)throw new TypeError("Unable to stringify location ref, empty target")}else throw new TypeError("Unable to stringify location ref, empty type");if(l.test(h))throw new TypeError(`Invalid location ref '${c}:${h}', target is a javascript: URL`);return`${c}:${h}`}function g(u){const c=u.metadata?.annotations?.[o.I4]??u.metadata?.annotations?.[o.Eo];if(!c)throw new Error(`Entity '${(0,n.U2)(u)}' is missing location`);return y(c)}},46828:(z,P,t)=>{"use strict";t.d(P,{Q:()=>g});var n=t(31085),o=t(14041),l=t(43836),y=t(10602);const v=(0,l.tK)("app-context"),g=({appContext:u,children:c})=>{const h=(0,y.B)({1:u});return(0,n.jsx)(v.Provider,{value:h,children:c})}},71087:(z,P,t)=>{"use strict";t.d(P,{I:()=>F});var n=t(31085),o=t(14041),l=t(43836),y=t(46828),v=t(70621),g=t(72427),u=t(55309);const c=(0,u.y)({id:"core.app-tree"});var h=t(98932);const E=(0,u.y)({id:"core.icons"});var p=t(60993);const m=(0,u.y)({id:"core.route-resolution"});var A=t(63544),i=t(10602),C=t(8539);const f=(0,A.Q)("legacy-plugin-compatibility-store",()=>new WeakMap);function O(Q){let B=f.get(Q);if(B)return B;const V="Not implemented in legacy plugin compatibility layer",J=()=>{throw new Error(V)};return B={getId(){return Q.id},get routes(){return{}},get externalRoutes(){return{}},getApis:J,getFeatureFlags:J,provide:J},f.set(Q,B),B}function S(Q){return(0,v.i)({id:Q.getId()})}function I(Q){const B=(0,g.gf)(c),V=(0,g.gf)(h.K),J=(0,g.gf)(E),rt=(0,o.useMemo)(()=>{const{tree:lt}=B.getTree();let ht;const Ct=V.getComponent(p.r.errorBoundaryFallback),Rt=({plugin:st,...at})=>(0,n.jsx)(Ct,{...at,plugin:st&&S(st)});return{getPlugins(){if(ht)return ht;const st=new Set;for(const at of lt.nodes.values()){const ot=at.spec.source;ot&&st.add(O(ot))}return ht=Array.from(st),ht},getSystemIcon(st){return J.getIcon(st)},getSystemIcons(){return Object.fromEntries(J.listIconKeys().map(st=>[st,J.getIcon(st)]))},getComponents(){return{NotFoundErrorPage:V.getComponent(p.r.notFoundErrorPage),BootErrorPage(){throw new Error("The BootErrorPage app component should not be accessed by plugins")},Progress:V.getComponent(p.r.progress),Router(){throw new Error("The Router app component should not be accessed by plugins")},ErrorBoundaryFallback:Rt}}}},[B,V,J]);return(0,n.jsx)(y.Q,{appContext:rt,children:Q.children})}const D=(0,l.tK)("routing-context");function w(Q){const B=(0,g.gf)(m),V=(0,o.useMemo)(()=>(0,i.B)({1:{resolve(J,rt){const lt=typeof rt=="string"?rt:rt.pathname??"";return B.resolve((0,C.D)(J),{sourcePath:lt})}}}),[B]);return(0,n.jsx)(D.Provider,{value:V,children:Q.children})}function $(Q){return(0,n.jsx)(w,{children:(0,n.jsx)(I,{children:Q.children})})}function H(Q){return(0,n.jsx)(n.Fragment,{children:Q.children})}function G(Q){return(0,l.qO)("app-context")?(0,n.jsx)(H,{...Q}):(0,n.jsx)($,{...Q})}function F(Q){return(0,n.jsx)(G,{children:Q})}},8539:(z,P,t)=>{"use strict";t.d(P,{D:()=>S,o:()=>O});var n=t(59598);const o="eHgtF5hmbrXyiEvo";function l(I=Error){const{stack:D}=new I(o);if(!D)return"<unknown>";const w=D.includes(o)?D.indexOf(`
|
|
2
|
-
`)+1:0,$=D.indexOf(`
|
|
3
|
-
`,D.indexOf(`
|
|
4
|
-
`,w)+1)+1,H=D.indexOf(`
|
|
5
|
-
`,$),G=D.substring($,H).trim();return G?G.includes("(")?G.substring(G.indexOf("(")+1,G.indexOf(")")):G.includes("@")?G.substring(G.indexOf("@")+1):G:"unknown"}function y(I){const D=I;if(D.$$type!=="@backstage/RouteRef")throw new Error(`Invalid RouteRef, bad type '${D.$$type}'`);return D}function v(I){return I.$$type==="@backstage/RouteRef"}class g{params;$$type;version;#t;#e;#n;constructor(D=[],w){this.params=D,this.$$type="@backstage/RouteRef",this.version="v1",this.#e=D,this.#n=w}getParams(){return this.#e}getDescription(){return this.#t?this.#t:`created at '${this.#n}'`}get#s(){return this.$$type.slice(11)}setId(D){if(!D)throw new Error(`${this.#s} id must be a non-empty string`);if(this.#t)throw new Error(`${this.#s} was referenced twice as both '${this.#t}' and '${D}'`);this.#t=D}toString(){return`${this.#s}{${this.getDescription()}}`}}function u(I){return new g(I?.params,l())}const c=/^\w+$/;function h(I){const D=I;if(D.$$type!=="@backstage/SubRouteRef")throw new Error(`Invalid SubRouteRef, bad type '${D.$$type}'`);return D}function E(I){return I.$$type==="@backstage/SubRouteRef"}class p{path;$$type;version;#t;#e;constructor(D,w,$){this.path=D,this.$$type="@backstage/SubRouteRef",this.version="v1",this.#t=w,this.#e=$}getParams(){return this.#t}getParent(){return this.#e}getDescription(){const D=y(this.#e);return`at ${this.path} with parent ${D.getDescription()}`}toString(){return`SubRouteRef{${this.getDescription()}}`}}function m(I){const{path:D,parent:w}=I,H=y(w).getParams(),G=D.split("/").filter(B=>B.startsWith(":")).map(B=>B.substring(1)),F=[...H,...G];if(H.some(B=>G.includes(B)))throw new Error("SubRouteRef may not have params that overlap with its parent");if(!D.startsWith("/"))throw new Error(`SubRouteRef path must start with '/', got '${D}'`);if(D.endsWith("/"))throw new Error(`SubRouteRef path must not end with '/', got '${D}'`);for(const B of G)if(!c.test(B))throw new Error(`SubRouteRef path has invalid param, got '${B}'`);return new p(D,F,w)}function A(I){const D=I;if(D.$$type!=="@backstage/ExternalRouteRef")throw new Error(`Invalid ExternalRouteRef, bad type '${D.$$type}'`);return D}function i(I){return I.$$type==="@backstage/ExternalRouteRef"}class C extends g{optional;params;defaultTarget;$$type;constructor(D,w=[],$,H){super(w,H),this.optional=D,this.params=w,this.defaultTarget=$,this.$$type="@backstage/ExternalRouteRef"}getDefaultTarget(){return this.defaultTarget}}function f(I){return new C(!!I?.optional,I?.params,I?.defaultTarget,l())}function O(I){return Object.fromEntries(Object.entries(I).map(([D,w])=>[D,S(w)]))}function S(I){if("$$type"in I)return I;const D=I[n.b];if(D==="absolute"){const w=I,$=String(w),H=y(u({params:w.params}));return Object.assign(w,{$$type:"@backstage/RouteRef",version:"v1",T:H.T,getParams(){return H.getParams()},getDescription(){return $},setId(G){H.setId(G)},toString(){return $}})}if(D==="sub"){const w=I,$=String(w),H=h(m({path:w.path,parent:S(w.parent)}));return Object.assign(w,{$$type:"@backstage/SubRouteRef",version:"v1",T:H.T,getParams(){return H.getParams()},getParent(){return H.getParent()},getDescription(){return $},toString(){return $}})}if(D==="external"){const w=I,$=String(w),H=A(f({params:w.params,optional:w.optional,defaultTarget:"getDefaultTarget"in w?w.getDefaultTarget():void 0}));return Object.assign(w,{$$type:"@backstage/ExternalRouteRef",version:"v1",T:H.T,optional:H.optional,getParams(){return H.getParams()},getDescription(){return $},getDefaultTarget(){return H.getDefaultTarget()},setId(G){H.setId(G)},toString(){return $}})}throw new Error(`Failed to convert legacy route ref, unknown type '${D}'`)}},77310:(z,P,t)=>{"use strict";t.d(P,{z:()=>h});var n=t(31085),o=t(77125),l=t(54917),y=t(14041),v=t(69578),g=t(40697),u=t(25577),c=t(37916);function h(E){const{text:p,language:m,showLineNumbers:A=!1,highlightedNumbers:i,customStyle:C,showCopyCodeButton:f=!1}=E,O=(0,l.A)(),S=O.palette.type==="dark"?g.A:u.A,I=O.palette.type==="dark"?"#256bf3":"#e6ffed";return(0,n.jsxs)(o.A,{position:"relative",children:[(0,n.jsx)(v.A,{customStyle:C,language:m,style:S,showLineNumbers:A,wrapLines:!0,lineNumberStyle:{color:O.palette.textVerySubtle},lineProps:D=>i?.includes(D)?{style:{backgroundColor:I}}:{},children:p}),f&&(0,n.jsx)(o.A,{position:"absolute",top:0,right:0,children:(0,n.jsx)(c.l,{text:p})})]})}},37916:(z,P,t)=>{"use strict";t.d(P,{l:()=>p});var n=t(31085),o=t(72427),l=t(39837),y=t(29365),v=t(71677),g=t(99594),u=t(14041),c=t(36338),h=t(10315),E=t(87849);function p(m){const{t:A}=(0,E.i)(h.O),{text:i,tooltipDelay:C=1e3,tooltipText:f=A("copyTextButton.tooltipText"),"aria-label":O="Copy text"}=m,S=(0,o.gf)(l.m),[I,D]=(0,u.useState)(!1),[{error:w},$]=(0,c.A)();(0,u.useEffect)(()=>{w&&S.post(w)},[w,S]);const H=G=>{G.stopPropagation(),D(!0),$(i)};return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(v.Ay,{id:"copy-test-tooltip",title:f,placement:"top",leaveDelay:C,onClose:()=>D(!1),open:I,children:(0,n.jsx)(y.A,{onClick:H,"aria-label":O,children:(0,n.jsx)(g.A,{})})})})}},44186:(z,P,t)=>{"use strict";t.d(P,{p:()=>A});var n=t(31085),o=t(42899),l=t(58837),y=t(72501),v=t(14041);const g=t.p+"static/missingAnnotation.67f79e98..svg",u=t.p+"static/noInformation.4b426325..svg",c=t.p+"static/createComponent.975d1e1e..svg",h=t.p+"static/noBuild.1715fa71..svg",E=(0,l.A)({generalImg:{width:"95%",zIndex:2,position:"relative",left:"50%",top:"50%",transform:"translate(-50%, 15%)"}},{name:"BackstageEmptyStateImage"}),p=({missing:i})=>{const C=E();switch(i){case"field":return(0,n.jsx)("img",{src:g,className:C.generalImg,alt:"annotation is missing"});case"info":return(0,n.jsx)("img",{src:u,alt:"no Information",className:C.generalImg});case"content":return(0,n.jsx)("img",{src:c,alt:"create Component",className:C.generalImg});case"data":return(0,n.jsx)("img",{src:h,alt:"no Build",className:C.generalImg});default:return null}},m=(0,l.A)(i=>({root:{backgroundColor:i.palette.background.default,padding:i.spacing(2,0,0,0)},action:{marginTop:i.spacing(2)},imageContainer:{position:"relative"}}),{name:"BackstageEmptyState"});function A(i){const{title:C,description:f,missing:O,action:S}=i,I=m();return(0,n.jsxs)(o.A,{container:!0,direction:"row",justifyContent:"space-around",alignItems:"flex-start",className:I.root,spacing:2,children:[(0,n.jsx)(o.A,{item:!0,xs:12,md:6,children:(0,n.jsxs)(o.A,{container:!0,direction:"column",children:[(0,n.jsx)(o.A,{item:!0,xs:!0,children:(0,n.jsx)(y.A,{variant:"h5",children:C})}),(0,n.jsx)(o.A,{item:!0,xs:!0,children:(0,n.jsx)(y.A,{variant:"body1",children:f})}),(0,n.jsx)(o.A,{item:!0,xs:!0,className:I.action,children:S})]})}),(0,n.jsx)(o.A,{item:!0,xs:12,md:6,className:I.imageContainer,children:typeof O=="string"?(0,n.jsx)(p,{missing:O}):O.customImage})]})}},22020:(z,P,t)=>{"use strict";t.d(P,{b:()=>p});var n=t(31085),o=t(58837),l=t(58007),y=t(8109),v=t(5951),g=t(14041),u=t(37916),c=t(88640);const h=(0,o.A)(m=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:m.spacing(2)},divider:{margin:m.spacing(2)}}),{name:"BackstageErrorPanel"}),E=({error:m,message:A,stack:i,children:C})=>{const f=h();return(0,n.jsxs)(l.A,{dense:!0,children:[(0,n.jsxs)(y.A,{alignItems:"flex-start",children:[(0,n.jsx)(v.A,{classes:{secondary:f.text},primary:"Error",secondary:m}),(0,n.jsx)(u.l,{text:m})]}),(0,n.jsxs)(y.A,{alignItems:"flex-start",children:[(0,n.jsx)(v.A,{classes:{secondary:f.text},primary:"Message",secondary:A}),(0,n.jsx)(u.l,{text:A})]}),i&&(0,n.jsxs)(y.A,{alignItems:"flex-start",children:[(0,n.jsx)(v.A,{classes:{secondary:f.text},primary:"Stack Trace",secondary:i}),(0,n.jsx)(u.l,{text:i})]}),C]})};function p(m){const{title:A,error:i,defaultExpanded:C,titleFormat:f,children:O}=m;return(0,n.jsx)(c.B,{severity:"error",title:A??i.message,defaultExpanded:C,titleFormat:f,children:(0,n.jsx)(E,{error:i.name,message:i.message,stack:i.stack,children:O})})}},72072:(z,P,t)=>{"use strict";t.d(P,{N_:()=>G});var n=t(31085),o=t(72427),l=t(65461),y=t(93368),v=t(49203),g=t(58837),u=t(72501),c=t(53373),h=t.n(c),E=t(45250),p=t.n(E),m=t(14041),A=t(18690),i=t(73970);function C(){const[F]=(0,A.AV)((0,n.jsx)(A.qh,{index:!0,element:(0,n.jsx)("div",{})}));return!F.index}const f=(0,g.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"}),O=F=>/^([a-z+.-]+):/.test(F),S=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i,I=window.open;if(I&&!I.__backstage){const F=function(...B){const V=String(B[0]);if(S.test(V))throw new Error("Rejected window.open() with a javascript: URL as a security precaution");return I.apply(this,B)};F.__backstage=!0,window.open=F}const D=()=>{try{return(0,o.gf)(l.U).getOptionalString("app.baseUrl")}catch{return}},w=()=>{const F="http://sample.dev",Q=D()??"/",{pathname:B}=new URL(Q,F);return(0,E.trimEnd)(B,"/")},$=F=>{let Q=String(F);const B=w(),V=O(Q),J=Q.startsWith(B);return!V&&!J&&(Q=B.concat(Q)),Q},H=F=>F instanceof Array?F.map(H).join(" ").trim():typeof F=="object"&&F?H(F?.props?.children):["string","number"].includes(typeof F)?String(F):"",G=m.forwardRef(({onClick:F,noTrack:Q,...B},V)=>{const J=f(),rt=(0,y.s)(),lt=C()?$(B.to):B.to,ht=H(B.children)||lt,Ct=O(lt),Rt=Ct&&!!/^https?:/.exec(lt);if(S.test(lt))throw new Error("Link component rejected javascript: URL as a security precaution");const st=at=>{F?.(at),Q||rt.captureEvent("click",ht,{attributes:{to:lt}})};return Ct?(0,n.jsxs)(v.A,{...Rt?{target:"_blank",rel:"noopener"}:{},...B,...B["aria-label"]?{"aria-label":`${B["aria-label"]}, Opens in a new window`}:{},ref:V,href:lt,onClick:st,className:h()(J.externalLink,B.className),children:[B.children,(0,n.jsx)(u.A,{component:"span",className:J.visuallyHidden,children:", Opens in a new window"})]}):(0,n.jsx)(v.A,{...B,ref:V,component:i.N_,to:lt,onClick:st})})},73896:(z,P,t)=>{"use strict";t.d(P,{z:()=>g});var n=t(31085),o=t(64947),l=t(14041),y=t(72072);const v=l.forwardRef((c,h)=>(0,n.jsx)(y.N_,{ref:h,...c,color:"initial"})),g=l.forwardRef((c,h)=>(0,n.jsx)(o.A,{ref:h,component:v,...c})),u=null},4650:(z,P,t)=>{"use strict";t.d(P,{h:()=>p});var n=t(31085),o=t(58837),l=t(45872),y=t(61125),v=t(14041),g=t(77310);const u=(0,o.A)(m=>({markdown:{"& table":{borderCollapse:"collapse",border:`1px solid ${m.palette.border}`},"& th, & td":{border:`1px solid ${m.palette.border}`,padding:m.spacing(1)},"& td":{wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:m.spacing(3,2,3,2.5),borderBottom:0},"& th":{backgroundColor:m.palette.background.paper},"& tr":{backgroundColor:m.palette.background.paper},"& tr:nth-child(odd)":{backgroundColor:m.palette.background.default},"& a":{color:m.palette.link},"& img":{maxWidth:"100%"}}}),{name:"BackstageMarkdownContent"}),c=(m,A)=>A?typeof A=="string"?m+A:v.Children.toArray(A.props.children).reduce(c,m):m,h=({level:m,children:A})=>{const f=v.Children.toArray(A).reduce(c,"").toLocaleLowerCase("en-US").replace(/\W/g,"-");return v.createElement(`h${m}`,{id:f},A)},E={code:({inline:m,className:A,children:i,...C})=>{const f=String(i).replace(/\n+$/,""),O=/language-(\w+)/.exec(A||"");return!m&&O?(0,n.jsx)(g.z,{language:O[1],text:f}):(0,n.jsx)("code",{className:A,...C,children:i})},h1:h,h2:h,h3:h,h4:h,h5:h,h6:h};function p(m){const{content:A,dialect:i="gfm",linkTarget:C,transformLinkUri:f,transformImageUri:O,className:S}=m,I=u();return(0,n.jsx)(l.$,{remarkPlugins:i==="gfm"?[y.A]:[],className:`${I.markdown} ${S??""}`.trim(),children:A,components:E,linkTarget:C,transformLinkUri:f,transformImageUri:O})}},68146:(z,P,t)=>{"use strict";t.d(P,{k:()=>g});var n=t(31085),o=t(77125),l=t(88951),y=t(54917),v=t(14041);function g(u){const c=(0,y.A)(),[h,E]=(0,v.useState)(!1);return(0,v.useEffect)(()=>{const p=setTimeout(()=>E(!0),c.transitions.duration.short);return()=>clearTimeout(p)},[c.transitions.duration.short]),h?(0,n.jsx)(l.A,{...u,"data-testid":"progress"}):(0,n.jsx)(o.A,{display:"none"})}},66917:(z,P,t)=>{"use strict";t.d(P,{w:()=>G});var n=t(31085),o=t(77125),l=t(69076),y=t(67720),v=t(95061),g=t(41857),u=t(48543),c=t(26343),h=t(81215),E=t(7031),p=t(99703),m=t(58837),A=t(72501),i=t(14041),C=t(10437);const f=(0,m.A)(F=>(0,p.A)({icon:{position:"absolute",right:F.spacing(.5),pointerEvents:"none",color:"#616161"}}),{name:"BackstageClosedDropdown"}),S=()=>{const F=f();return(0,n.jsx)(C.A,{className:F.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{d:"M7.5 8L6 9.5L12.0703 15.5703L18.1406 9.5L16.6406 8L12.0703 12.5703L7.5 8Z",fill:"currentColor"})})},I=(0,m.A)(F=>(0,p.A)({icon:{position:"absolute",right:F.spacing(.5),pointerEvents:"none",color:"#616161"}}),{name:"BackstageOpenedDropdown"}),w=()=>{const F=I();return(0,n.jsx)(C.A,{className:F.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{d:"M16.5 16L18 14.5L11.9297 8.42969L5.85938 14.5L7.35938 16L11.9297 11.4297L16.5 16Z",fill:"currentColor"})})},$=(0,E.A)(F=>(0,p.A)({root:{"label + &":{marginTop:F.spacing(3)},"&.Mui-focused > div[role=button]":{borderColor:F.palette.primary.main}},input:{borderRadius:F.shape.borderRadius,position:"relative",backgroundColor:F.palette.background.paper,border:"1px solid #ced4da",fontSize:F.typography.body1.fontSize,padding:F.spacing(1.25,3.25,1.25,1.5),transition:F.transitions.create(["border-color","box-shadow"]),"&:focus":{background:F.palette.background.paper,borderRadius:F.shape.borderRadius}}}),{name:"BackstageSelectInputBase"})(g.A),H=(0,m.A)(F=>(0,p.A)({formControl:{margin:F.spacing(1,0)},label:{transform:"initial",fontWeight:"bold",fontSize:F.typography.body2.fontSize,fontFamily:F.typography.fontFamily,color:F.palette.text.primary,"&.Mui-focused":{color:F.palette.text.primary}},formLabel:{transform:"initial",fontWeight:"bold",fontSize:F.typography.body2.fontSize,fontFamily:F.typography.fontFamily,color:F.palette.text.primary,"&.Mui-focused":{color:F.palette.text.primary}},chips:{display:"flex",flexWrap:"wrap"},chip:{margin:2},checkbox:{},root:{display:"flex",flexDirection:"column"}}),{name:"BackstageSelect"});function G(F){const{multiple:Q,items:B,label:V,placeholder:J,selected:rt,onChange:lt,triggerReset:ht,native:Ct=!1,disabled:Rt=!1,margin:st,"data-testid":at="select"}=F,ot=H(),[ft,At]=(0,i.useState)(rt||(Q?[]:"")),[yt,St]=(0,i.useState)(!1);(0,i.useEffect)(()=>{At(Q?[]:"")},[ht,Q]),(0,i.useEffect)(()=>{At(rt||(Q?[]:""))},[rt,Q]);const Tt=k=>{At(k.target.value),lt(k.target.value)},wt=k=>{if(Rt){k.preventDefault();return}St(Z=>Q&&!(k.target instanceof HTMLElement)?!0:!Z)},$t=()=>{St(!1)},Pt=k=>()=>{const Z=ft.filter(ct=>ct!==k);At(Z),lt(Z)};return(0,n.jsx)(o.A,{className:ot.root,children:(0,n.jsxs)(v.A,{className:ot.formControl,children:[(0,n.jsx)(u.A,{className:ot.formLabel,children:V}),(0,n.jsxs)(h.A,{"aria-label":V,value:ft,native:Ct,disabled:Rt,"data-testid":at,displayEmpty:!0,multiple:Q,margin:st,onChange:Tt,open:yt,onOpen:wt,onClose:$t,input:(0,n.jsx)($,{}),label:V,renderValue:k=>Q&&ft.length!==0?(0,n.jsx)(o.A,{className:ot.chips,children:k.map(Z=>{const ct=B.find(xt=>xt.value===Z);return ct?(0,n.jsx)(y.A,{label:ct?.label,clickable:!0,onDelete:Pt(Z),className:ot.chip},ct?.value):!1})}):(0,n.jsx)(A.A,{children:ft.length===0?J||"":B.find(Z=>Z.value===k)?.label}),IconComponent:()=>yt?(0,n.jsx)(w,{}):(0,n.jsx)(S,{}),MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},getContentAnchorEl:null},children:[!!J&&!Q&&(0,n.jsx)(c.A,{value:[],children:J}),Ct?B&&B.map(k=>(0,n.jsx)("option",{value:k.value,children:k.label},k.value)):B&&B.map(k=>(0,n.jsxs)(c.A,{value:k.value,children:[Q&&(0,n.jsx)(l.A,{color:"primary",checked:ft.includes(k.value)||!1,className:ot.checkbox}),k.label]},k.value))]})]})})}},27586:(z,P,t)=>{"use strict";t.d(P,{Y:()=>F});var n=t(31085),o=t(82266),l=t(77125),y=t(64947),v=t(93453),g=t(29365),u=t(46423),c=t(5951),h=t(26343),E=t(28233),p=t(55197),m=t(58837),A=t(72501),i=t(5893),C=t(14041),f=t(10795),O=t(31129),S=t(72072),I=t(10315),D=t(87849);const w=(0,m.A)({popoverList:{minWidth:260,maxWidth:400},menuItem:{whiteSpace:"normal"}},{name:"BackstageSupportButton"}),$=({icon:Q})=>{const B=(0,o.n)(),V=Q?B.getSystemIcon(Q)??O.NT:O.NT;return(0,n.jsx)(V,{})},H=({link:Q})=>(0,n.jsx)(S.N_,{to:Q.url,children:Q.title??Q.url}),G=({item:Q})=>(0,n.jsxs)(h.A,{children:[(0,n.jsx)(u.A,{children:(0,n.jsx)($,{icon:Q.icon})}),(0,n.jsx)(c.A,{primary:Q.title,secondary:Q.links?.reduce((B,V,J)=>[...B,J>0&&(0,n.jsx)("br",{},J),(0,n.jsx)(H,{link:V},V.url)],[])})]});function F(Q){const{t:B}=(0,D.i)(I.O),{title:V,items:J,children:rt}=Q,{items:lt}=(0,f.l)(),[ht,Ct]=(0,C.useState)(!1),[Rt,st]=(0,C.useState)(null),at=w(),ot=(0,i.A)(yt=>yt.breakpoints.down("sm")),ft=yt=>{st(yt.currentTarget),Ct(!0)},At=()=>{Ct(!1)};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.A,{display:"flex",ml:1,children:ot?(0,n.jsx)(g.A,{color:"primary",size:"small",onClick:ft,"data-testid":"support-button","aria-label":"Support",children:(0,n.jsx)(O.NT,{})}):(0,n.jsx)(y.A,{"data-testid":"support-button","aria-label":"Support",color:"primary",onClick:ft,startIcon:(0,n.jsx)(O.NT,{}),children:B("supportButton.title")})}),(0,n.jsxs)(p.Ay,{"data-testid":"support-button-popover",open:ht,anchorEl:Rt,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},onClose:At,children:[(0,n.jsxs)(E.A,{className:at.popoverList,autoFocusItem:!!Rt,children:[V&&(0,n.jsx)(h.A,{button:!1,alignItems:"flex-start",className:at.menuItem,children:(0,n.jsx)(A.A,{variant:"subtitle1",children:V})}),C.Children.map(rt,(yt,St)=>(0,n.jsx)(h.A,{alignItems:"flex-start",className:at.menuItem,children:yt},`child-${St}`)),(J??lt).map((yt,St)=>(0,n.jsx)(G,{item:yt},`item-${St}`))]}),(0,n.jsx)(v.A,{children:(0,n.jsx)(y.A,{color:"primary",onClick:At,"aria-label":"Close",children:B("supportButton.close")})})]})]})}},14209:(z,P,t)=>{"use strict";t.d(P,{X:()=>wt});var n=t(31085),o=t(25301),l=t(77125),y=t(29365),v=t(7031),g=t(58837),u=t(54917),c=t(72501),h=t(83313),E=t(89019),p=t(62461),m=t(68887),A=t(63798),i=t(64704),C=t(6774),f=t(75625),O=t(65859),S=t(5416),I=t(33494),D=t(80113),w=t(26229),$=t(46802),H=t(45250),G=t(14041),F=t(64947),Q=t(66917),B=t(10315),V=t(87849);const J=(0,g.A)(k=>({root:{height:"100%",width:"315px",display:"flex",flexDirection:"column",marginRight:k.spacing(3)},value:{fontWeight:"bold",fontSize:18},header:{display:"flex",alignItems:"center",height:k.spacing(7.5),justifyContent:"space-between",borderBottom:`1px solid ${k.palette.grey[500]}`},filters:{display:"flex",flexDirection:"column","& > *":{marginTop:k.spacing(2)}}}),{name:"BackstageTableFilters"}),rt=k=>{const Z=J(),{onChangeFilters:ct}=k,{t:xt}=(0,V.i)(B.O),[gt,it]=(0,G.useState)({...k.selectedFilters}),[Ot,Lt]=(0,G.useState)(!1),Ft=()=>{it({}),Lt(Mt=>!Mt)};return(0,G.useEffect)(()=>{ct(gt)},[gt,ct]),(0,n.jsxs)(l.A,{className:Z.root,children:[(0,n.jsxs)(l.A,{className:Z.header,children:[(0,n.jsx)(l.A,{className:Z.value,children:xt("table.filter.title")}),(0,n.jsx)(F.A,{color:"primary",onClick:Ft,children:xt("table.filter.clearAll")})]}),(0,n.jsx)(l.A,{className:Z.filters,children:k.filters?.length&&k.filters.map(Mt=>(0,n.jsx)(Q.w,{triggerReset:Ot,...Mt.element,selected:gt[Mt.element.label],onChange:Gt=>it({...gt,[Mt.element.label]:Gt})},Mt.element.label))})]})};var lt=t(78467);function ht(k){return(0,n.jsx)("tbody",{"data-testid":"loading-indicator",children:(0,n.jsx)("tr",{children:(0,n.jsx)("td",{colSpan:k.colSpan,children:(0,n.jsx)(l.A,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",minHeight:"15rem"},children:(0,n.jsx)(lt.A,{size:"5rem"})})})})})}const Ct={Add:(0,G.forwardRef)((k,Z)=>(0,n.jsx)(h.A,{...k,ref:Z})),Check:(0,G.forwardRef)((k,Z)=>(0,n.jsx)(p.A,{...k,ref:Z})),Clear:(0,G.forwardRef)((k,Z)=>(0,n.jsx)(i.A,{...k,ref:Z})),Delete:(0,G.forwardRef)((k,Z)=>(0,n.jsx)(C.A,{...k,ref:Z})),DetailPanel:(0,G.forwardRef)((k,Z)=>(0,n.jsx)(A.A,{...k,ref:Z})),Edit:(0,G.forwardRef)((k,Z)=>(0,n.jsx)(f.A,{...k,ref:Z})),Export:(0,G.forwardRef)((k,Z)=>(0,n.jsx)(w.A,{...k,ref:Z})),Filter:(0,G.forwardRef)((k,Z)=>(0,n.jsx)(O.A,{...k,ref:Z})),FirstPage:(0,G.forwardRef)((k,Z)=>(0,n.jsx)(S.A,{...k,ref:Z})),LastPage:(0,G.forwardRef)((k,Z)=>(0,n.jsx)(I.A,{...k,ref:Z})),NextPage:(0,G.forwardRef)((k,Z)=>(0,n.jsx)(A.A,{...k,ref:Z})),PreviousPage:(0,G.forwardRef)((k,Z)=>(0,n.jsx)(m.A,{...k,ref:Z})),ResetSearch:(0,G.forwardRef)((k,Z)=>(0,n.jsx)(i.A,{...k,ref:Z})),Search:(0,G.forwardRef)((k,Z)=>(0,n.jsx)(O.A,{...k,ref:Z})),SortArrow:(0,G.forwardRef)((k,Z)=>(0,n.jsx)(E.A,{...k,ref:Z})),ThirdStateCheck:(0,G.forwardRef)((k,Z)=>(0,n.jsx)(D.A,{...k,ref:Z})),ViewColumn:(0,G.forwardRef)((k,Z)=>(0,n.jsx)($.A,{...k,ref:Z}))};function Rt(k,Z){const ct=Z.split(".");let xt=k[ct[0]];for(let gt=1;gt<ct.length;++gt){if(xt===void 0)return xt;const it=ct[gt];xt=xt[it]}return xt}const st=(0,v.A)(k=>({header:{padding:k.spacing(1,2,1,2.5),borderTop:`1px solid ${k.palette.grey.A100}`,borderBottom:`1px solid ${k.palette.grey.A100}`,fontWeight:k.typography.fontWeightBold,position:"static",wordBreak:"normal",textTransform:"uppercase"}}),{name:"BackstageTableHeader"})(o.rV),at=(0,v.A)(k=>({root:{padding:k.spacing(3,0,2.5,2.5)},title:{"& > h6":{fontWeight:k.typography.fontWeightBold}},searchField:{paddingRight:k.spacing(2)}}),{name:"BackstageTableToolbar"})(o.Nb),ot=(0,g.A)(k=>({root:{display:"flex",alignItems:"center",justifyContent:"space-between"},title:{fontWeight:k.typography.fontWeightBold,fontSize:18,whiteSpace:"nowrap"}}),{name:"BackstageTableFiltersContainer"}),ft=(0,g.A)(()=>({root:{display:"flex",alignItems:"start"}}),{name:"BackstageTable"});function At(k,Z){return k.map(ct=>{const xt=ct.headerStyle??{};let gt=ct.cellStyle||{};if(ct.highlight)if(xt.color=Z.palette.textContrast,typeof gt=="object")gt.fontWeight=Z.typography.fontWeightBold;else{const it=gt;gt=(Ot,Lt,Ft)=>({...it(Ot,Lt,Ft),fontWeight:Z.typography.fontWeightBold})}return{...ct,headerStyle:xt,cellStyle:gt}})}function yt(k,Z){return(0,H.transform)(k,(ct,xt,gt)=>{(0,H.isEqual)(xt,Z[gt])||(ct[gt]=xt)})}const St={search:"",filtersOpen:!1,filters:{}};function Tt(k){const{toolbarRef:Z,setSearch:ct,hasFilters:xt,selectedFiltersLength:gt,toggleFilters:it}=k,Ot=ot(),Lt=(0,G.useCallback)(Ft=>{k.onSearchChanged(Ft),ct(Ft)},[k,ct]);return xt?(0,n.jsxs)(l.A,{className:Ot.root,children:[(0,n.jsxs)(l.A,{className:Ot.root,children:[(0,n.jsx)(y.A,{onClick:it,"aria-label":"filter list",children:(0,n.jsx)(O.A,{})}),(0,n.jsxs)(c.A,{className:Ot.title,children:["Filters (",gt,")"]})]}),(0,n.jsx)(at,{...k,ref:Z,onSearchChanged:Lt})]}):(0,n.jsx)(at,{...k,ref:Z,onSearchChanged:Lt})}function wt(k){const{data:Z,columns:ct,emptyContent:xt,options:gt,title:it,subtitle:Ot,localization:Lt,filters:Ft,initialState:Mt,onStateChange:Gt,components:ue,isLoading:le,...he}=k,Qt=ft(),Xt=(0,u.A)(),jt={...St,...Mt},[Zt,pe]=(0,G.useState)(jt.filtersOpen),Be=(0,G.useCallback)(()=>pe(me=>!me),[pe]),[q,zt]=(0,G.useState)(jt.filters),[ee,de]=(0,G.useState)(jt.search);(0,G.useEffect)(()=>{if(Gt){const me=yt({search:ee,filtersOpen:Zt,filters:q},St);Gt(me)}},[ee,Zt,q,Gt]);const Re=(0,G.useCallback)(me=>ct.find(He=>He.title===me)?.field,[ct]),Ae=(0,G.useMemo)(()=>{if(typeof Z=="function"||!q)return Z;const me=Object.values(q);return Z&&me.flat().length?Z.filter(Ze=>!!Object.entries(q).filter(([,U])=>!!U.length).every(([U,x])=>{const T=Rt(Ze,Re(U));return Array.isArray(T)&&Array.isArray(x)?T.some(W=>x.includes(W)):Array.isArray(T)?T.includes(x):Array.isArray(x)?x.includes(T):T===x})):Z},[Z,q,Re]),Qe=Object.values(q).flat().length,ze=!!Ft?.length,en=(0,G.useCallback)(me=>(0,n.jsx)(Tt,{setSearch:de,hasFilters:ze,selectedFiltersLength:Qe,toggleFilters:Be,...me}),[Be,ze,Qe,de]),je=typeof Z!="function"&&Z.length===0,Ue=ct.length,We=(0,G.useMemo)(()=>$t({hasNoRows:je,emptyContent:xt,columnCount:Ue,loading:le}),[je,xt,Ue,le]);return(0,n.jsxs)(l.A,{className:Qt.root,children:[Zt&&Z&&typeof Z!="function"&&Ft?.length&&(0,n.jsx)(rt,{filters:Pt(Ft,Z,ct),selectedFilters:q,onChangeFilters:zt}),(0,n.jsx)(o.Ay,{components:{Header:st,Body:We,Toolbar:en,...ue},options:gt,columns:At(ct,Xt),icons:Ct,title:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(c.A,{variant:"h5",component:"h2",children:it}),Ot&&(0,n.jsx)(c.A,{color:"textSecondary",variant:"body1",children:Ot})]}),data:Ae,style:{width:"100%"},localization:{toolbar:{searchPlaceholder:"Filter",searchTooltip:"Filter"},...Lt},...he})]})}wt.icons=Object.freeze(Ct);function $t({columnCount:k,emptyContent:Z,hasNoRows:ct,loading:xt}){return gt=>xt?(0,n.jsx)(ht,{colSpan:k}):Z&&ct?(0,n.jsx)("tbody",{children:(0,n.jsx)("tr",{children:(0,n.jsx)("td",{colSpan:k,children:Z})})}):(0,n.jsx)(o.C6,{...gt})}function Pt(k,Z,ct){const xt=it=>{const Ot=new Set,Lt=Ft=>{Ft!=null&&Ot.add(Ft)};return Z&&Z.forEach(Ft=>{const Mt=Rt(Ft,ct.find(Gt=>Gt.title===it)?.field);Array.isArray(Mt)?Mt.forEach(Lt):Lt(Mt)}),Ot},gt=it=>({placeholder:"All results",label:it.column,multiple:it.type==="multiple-select",items:[...xt(it.column)].sort().map(Ot=>({label:Ot,value:Ot}))});return k.map(it=>({type:it.type,element:gt(it)}))}},88640:(z,P,t)=>{"use strict";t.d(P,{B:()=>D});var n=t(31085),o=t(268),l=t(58837),y=t(8973),v=t(29655),g=t(91567),u=t(42899),c=t(72501),h=t(9181),E=t(6924),p=t(14041),m=t(4650);const A=(w,$)=>($.palette.type==="light"?o.e$:o.a)($.palette[w].light,.6),i=(w,$)=>($.palette.type==="light"?o.a:o.e$)($.palette[w].light,.9),C=(0,l.A)(w=>({root:{marginRight:w.spacing(1),fill:({severity:$})=>A($,w)}})),f=({severity:w})=>{const $=C({severity:w});return(0,n.jsx)(h.A,{classes:$})},O=({severity:w})=>{const $=C({severity:w});return(0,n.jsx)(E.A,{classes:$})},S=(0,l.A)(w=>({panel:{backgroundColor:({severity:$})=>i($,w),color:({severity:$})=>A($,w),verticalAlign:"middle"},summary:{display:"flex",flexDirection:"row"},summaryText:{color:({severity:$})=>A($,w),fontWeight:w.typography.fontWeightBold},markdownContent:{"& p":{display:"inline"}},message:{width:"100%",display:"block",color:({severity:$})=>A($,w),backgroundColor:({severity:$})=>i($,w)},details:{width:"100%",display:"block",color:w.palette.textContrast,backgroundColor:w.palette.background.default,border:`1px solid ${w.palette.border}`,padding:w.spacing(2),fontFamily:"sans-serif"}}),{name:"BackstageWarningPanel"}),I=w=>w.charAt(0).toLocaleUpperCase("en-US")+w.slice(1);function D(w){const{severity:$="warning",title:H,titleFormat:G,message:F,children:Q,defaultExpanded:B}=w,V=S({severity:$}),J=I($)+(H?`: ${H}`:"");return(0,n.jsxs)(y.A,{defaultExpanded:B??!1,className:V.panel,role:"alert",children:[(0,n.jsxs)(v.A,{expandIcon:(0,n.jsx)(O,{severity:$}),className:V.summary,children:[(0,n.jsx)(f,{severity:$}),(0,n.jsx)(c.A,{className:V.summaryText,variant:"subtitle1",children:G==="markdown"?(0,n.jsx)(m.h,{content:J,className:V.markdownContent}):J})]}),(F||Q)&&(0,n.jsx)(g.A,{children:(0,n.jsxs)(u.A,{container:!0,children:[F&&(0,n.jsx)(u.A,{item:!0,xs:12,children:(0,n.jsx)(c.A,{className:V.message,variant:"body1",children:F})}),Q&&(0,n.jsx)(u.A,{item:!0,xs:12,className:V.details,children:Q})]})})]})}},10795:(z,P,t)=>{"use strict";t.d(P,{l:()=>g});var n=t(72427),o=t(65461),l=t(10315),y=t(87849);const v=()=>{const{t:u}=(0,y.i)(l.O);return{url:"https://github.com/backstage/backstage/issues",items:[{title:u("supportConfig.default.title"),icon:"warning",links:[{title:u("supportConfig.default.linkTitle"),url:"https://github.com/backstage/backstage/blob/master/app-config.yaml"}]}]}};function g(){const h=(0,n.Q2)().get(o.U)?.getOptionalConfig("app.support"),E=v();return h?{url:h.getString("url"),items:h.getConfigArray("items").flatMap(p=>({title:p.getString("title"),icon:p.getOptionalString("icon"),links:(p.getOptionalConfigArray("links")??[]).flatMap(m=>({url:m.getString("url"),title:m.getString("title")}))}))}:E}},31129:(z,P,t)=>{"use strict";t.d(P,{NT:()=>i,z9:()=>v});var n=t(31085),o=t(82266),l=t(27799),y=t(14041);function v(O){const{id:S,Fallback:I=l.A,...D}=O,$=(0,o.n)().getSystemIcon(S)??I;return(0,n.jsx)($,{...D})}function g(O){return _jsx(v,{id:"brokenImage",...O})}function u(O){return _jsx(v,{id:"catalog",...O})}function c(O){return _jsx(v,{id:"chat",...O})}function h(O){return _jsx(v,{id:"dashboard",...O})}function E(O){return _jsx(v,{id:"docs",...O})}function p(O){return _jsx(v,{id:"email",...O})}function m(O){return _jsx(v,{id:"github",...O})}function A(O){return _jsx(v,{id:"group",...O})}function i(O){return(0,n.jsx)(v,{id:"help",...O})}function C(O){return _jsx(v,{id:"user",...O})}function f(O){return _jsx(v,{id:"warning",...O})}},26280:(z,P,t)=>{"use strict";t.d(P,{U:()=>u});var n=t(31085),o=t(58837),l=t(53373),y=t.n(l),v=t(14041);const g=(0,o.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 u(c){const{className:h,stretch:E,noPadding:p,children:m,...A}=c,i=g();return(0,n.jsx)("article",{...A,className:y()(i.root,h,{[i.stretch]:E,[i.noPadding]:p}),children:m})}},59428:(z,P,t)=>{"use strict";t.d(P,{d:()=>h});var n=t(31085),o=t(77125),l=t(58837),y=t(72501),v=t(14041),g=t(93285);const u=E=>(0,l.A)(p=>({container:{width:"100%",display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-end",alignItems:"center",marginBottom:p.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:p.spacing(1),minWidth:0,overflow:"visible"},description:{},title:{display:"inline-flex",marginBottom:0}}),{name:"BackstageContentHeader"}),c=({title:E="Unknown page",className:p})=>(0,n.jsx)(y.A,{variant:"h4",component:"h2",className:p,"data-testid":"header-title",children:E});function h(E){const{description:p,title:m,titleComponent:A=void 0,children:i,textAlign:C="left"}=E,f=u({textAlign:C})(),O=A||(0,n.jsx)(c,{title:m,className:f.title});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(g.m,{title:m}),(0,n.jsxs)(o.A,{className:f.container,children:[(0,n.jsxs)(o.A,{className:f.leftItemsBox,children:[O,p&&(0,n.jsx)(y.A,{className:f.description,variant:"body2",children:p})]}),(0,n.jsx)(o.A,{className:f.rightItemsBox,children:i})]})]})}},12173:(z,P,t)=>{"use strict";t.d(P,{M:()=>S});var n=t(31085),o=t(42899),l=t(58837),y=t(72501),v=t(14041),g=t(18690),u=t(72072),c=t(10795);const h=t.p+"static/mic-drop.fe3ef4d0..svg",E=(0,l.A)(I=>({micDrop:{maxWidth:"60%",bottom:I.spacing(2),right:I.spacing(2),[I.breakpoints.down("xs")]:{maxWidth:"96%",bottom:"unset",right:"unset",margin:I.spacing(10,"auto",4)}}}),{name:"BackstageErrorPageMicDrop"}),p=()=>{const I=E();return(0,n.jsx)("img",{src:h,className:I.micDrop,alt:"Girl dropping mic from her hands"})};var m=t(77310),A=t(87849),i=t(10315);const C=(0,l.A)(I=>({title:{paddingBottom:I.spacing(5),[I.breakpoints.down("xs")]:{paddingBottom:I.spacing(4),fontSize:I.typography.h3.fontSize}}}),{name:"BackstageErrorPageStackDetails"});function f(I){const{stack:D}=I,w=C(),{t:$}=(0,A.i)(i.O),[H,G]=(0,v.useState)(!1);return H?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(y.A,{variant:"h6",className:w.title,children:(0,n.jsx)(u.N_,{to:"#",onClick:()=>G(!1),children:$("errorPage.showLessDetails")})}),(0,n.jsx)(m.z,{text:D,language:"text",showCopyCodeButton:!0,showLineNumbers:!0})]}):(0,n.jsx)(y.A,{variant:"h6",className:w.title,children:(0,n.jsx)(u.N_,{to:"#",onClick:()=>G(!0),children:$("errorPage.showMoreDetails")})})}const O=(0,l.A)(I=>({container:{padding:I.spacing(8),[I.breakpoints.down("xs")]:{padding:I.spacing(2)}},title:{paddingBottom:I.spacing(5),[I.breakpoints.down("xs")]:{paddingBottom:I.spacing(4),fontSize:I.typography.h3.fontSize}},subtitle:{color:I.palette.textSubtle}}),{name:"BackstageErrorPage"});function S(I){const{status:D="",statusMessage:w,additionalInfo:$,supportUrl:H,stack:G}=I,F=O(),Q=(0,g.Zp)(),B=(0,c.l)(),{t:V}=(0,A.i)(i.O);return(0,n.jsxs)(o.A,{container:!0,className:F.container,children:[(0,n.jsxs)(o.A,{item:!0,xs:12,sm:8,md:4,children:[(0,n.jsx)(y.A,{"data-testid":"error",variant:"body1",className:F.subtitle,children:V("errorPage.subtitle",{status:D,statusMessage:w})}),(0,n.jsx)(y.A,{variant:"body1",className:F.subtitle,children:$}),(0,n.jsx)(y.A,{variant:"h2",className:F.title,children:V("errorPage.title")}),(0,n.jsxs)(y.A,{variant:"h6",className:F.title,children:[(0,n.jsx)(u.N_,{to:"#","data-testid":"go-back-link",onClick:()=>Q(-1),children:V("errorPage.goBack")}),"... or please"," ",(0,n.jsx)(u.N_,{to:H||B.url,children:"contact support"})," if you think this is a bug."]}),G&&(0,n.jsx)(f,{stack:G})]}),(0,n.jsx)(p,{})]})}},69814:(z,P,t)=>{"use strict";t.d(P,{Y:()=>Q});var n=t(31085),o=t(72427),l=t(65461),y=t(77125),v=t(42899),g=t(58837),u=t(71677),c=t(72501),h=t(14041),E=t(93285),p=t(72072),m=t(45634),A=t(58007),i=t(8109),C=t(55197),f=t(7031);const O=(0,f.A)({root:{textDecoration:"underline",cursor:"pointer"}},{name:"BackstageBreadcrumbsClickableText"})(c.A),S=(0,f.A)({root:{textDecoration:"underline",color:"inherit"}},{name:"BackstageBreadcrumbsStyledBox"})(y.A),I=(0,f.A)({root:{fontStyle:"italic"}},{name:"BreadcrumbsCurrentPage"})(y.A);function D(B){const{children:V,...J}=B,[rt,lt]=h.useState(null),ht=h.Children.toArray(V),[Ct,Rt,...st]=ht,at=st.length?st.pop():ht[ht.length-1],ot=ht.length>3,ft=St=>{lt(St.currentTarget)},At=()=>{lt(null)},yt=!!rt;return(0,n.jsxs)(h.Fragment,{children:[(0,n.jsxs)(m.A,{"aria-label":"breadcrumb",...J,children:[ht.length>1&&(0,n.jsx)(S,{clone:!0,children:Ct}),ht.length>2&&(0,n.jsx)(S,{clone:!0,children:Rt}),ot&&(0,n.jsx)(O,{onClick:ft,children:"..."}),(0,n.jsx)(I,{children:at})]}),(0,n.jsx)(C.Ay,{open:yt,anchorEl:rt,onClose:At,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},children:(0,n.jsx)(A.A,{children:st.map((St,Tt)=>(0,n.jsx)(i.A,{button:!0,children:(0,n.jsx)(S,{clone:!0,children:St})},Tt))})})]})}var w=t(73524);const $=(0,g.A)(B=>({header:{gridArea:"pageHeader",padding:B.spacing(3),width:"100%",boxShadow:B.shadows[4],position:"relative",zIndex:100,display:"flex",flexDirection:"row",alignItems:"center",backgroundImage:B.page.backgroundImage,backgroundPosition:"center",backgroundSize:"cover",[B.breakpoints.down("sm")]:{flexWrap:"wrap"}},leftItemsBox:{maxWidth:"100%",flexGrow:1},rightItemsBox:{width:"auto",alignItems:"center"},title:{color:B.page.fontColor,wordBreak:"break-word",fontSize:B.typography.h3.fontSize,marginBottom:0},subtitle:{color:B.page.fontColor,opacity:.8,display:"inline-block",marginTop:B.spacing(1),maxWidth:"75ch"},type:{textTransform:"uppercase",fontSize:11,opacity:.8,marginBottom:B.spacing(1),color:B.page.fontColor},breadcrumb:{color:B.page.fontColor},breadcrumbType:{fontSize:"inherit",opacity:.7,marginRight:-B.spacing(.3),marginBottom:B.spacing(.3)},breadcrumbTitle:{fontSize:"inherit",marginLeft:-B.spacing(.3),marginBottom:B.spacing(.3)}}),{name:"BackstageHeader"}),H=({type:B,typeLink:V,classes:J,pageTitle:rt})=>B?V?(0,n.jsxs)(D,{className:J.breadcrumb,children:[(0,n.jsx)(p.N_,{to:V,children:B}),(0,n.jsx)(c.A,{children:rt})]}):(0,n.jsx)(c.A,{className:J.type,children:B}):null,G=({pageTitle:B,classes:V,tooltip:J})=>{const{contentRef:rt}=(0,w.H)(),lt=(0,n.jsx)(c.A,{ref:rt,tabIndex:-1,className:V.title,variant:"h1",children:B});return J?(0,n.jsx)(u.Ay,{title:J,placement:"top-start",children:lt}):lt},F=({classes:B,subtitle:V})=>V?typeof V!="string"?(0,n.jsx)(n.Fragment,{children:V}):(0,n.jsx)(c.A,{className:B.subtitle,variant:"subtitle2",component:"span",children:V}):null;function Q(B){const{children:V,pageTitleOverride:J,style:rt,subtitle:lt,title:ht,tooltip:Ct,type:Rt,typeLink:st}=B,at=$(),ft=(0,o.gf)(l.U).getOptionalString("app.title")||"Backstage",At=J||ht,yt=ht||J,St=`${At} | %s | ${ft}`,Tt=`${At} | ${ft}`;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(E.m,{titleTemplate:St,defaultTitle:Tt}),(0,n.jsxs)("header",{style:rt,className:at.header,children:[(0,n.jsxs)(y.A,{className:at.leftItemsBox,children:[(0,n.jsx)(H,{classes:at,type:Rt,typeLink:st,pageTitle:yt}),(0,n.jsx)(G,{classes:at,pageTitle:yt,tooltip:Ct}),(0,n.jsx)(F,{classes:at,subtitle:lt})]}),(0,n.jsx)(v.A,{container:!0,className:at.rightItemsBox,spacing:4,children:V})]})]})}},72792:(z,P,t)=>{"use strict";t.d(P,{S:()=>E});var n=t(31085),o=t(42899),l=t(58837),y=t(268),v=t(72501),g=t(14041),u=t(72072);const c=(0,l.A)(p=>({root:{textAlign:"left"},label:{color:p.page.fontColor,fontWeight:p.typography.fontWeightBold,letterSpacing:0,fontSize:p.typography.fontSize,marginBottom:p.spacing(1)/2,lineHeight:1},value:{color:(0,y.X4)(p.page.fontColor,.8),fontSize:p.typography.fontSize,lineHeight:1}}),{name:"BackstageHeaderLabel"}),h=({value:p,className:m,typographyRootComponent:A})=>(0,n.jsx)(v.A,{component:A??(typeof p=="string"?"p":"span"),className:m,children:p});function E(p){const{label:m,value:A,url:i,contentTypograpyRootComponent:C}=p,f=c(),O=(0,n.jsx)(h,{className:f.value,value:A||"<Unknown>",typographyRootComponent:C});return(0,n.jsx)(o.A,{item:!0,children:(0,n.jsxs)(v.A,{component:"span",className:f.root,children:[(0,n.jsx)(v.A,{className:f.label,children:m}),i?(0,n.jsx)(u.N_,{to:i,children:O}):O]})})}},24504:(z,P,t)=>{"use strict";t.d(P,{Y:()=>g});var n=t(31085),o=t(14041),l=t(58837),y=t(50868);const v=(0,l.A)(u=>({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",[u.breakpoints.down("xs")]:{height:"100%"},"@media print":{display:"block",height:"auto",overflowY:"inherit"}}}),{name:"BackstagePage"});function g(u){const{themeId:c,children:h}=u,E=v();return(0,n.jsx)(y.A,{theme:p=>({...p,page:p.getPageTheme({themeId:c})}),children:(0,n.jsx)("main",{className:E.root,children:h})})}},27155:(z,P,t)=>{"use strict";t.d(P,{d:()=>v});var n=t(31085),o=t(14041),l=t(69814),y=t(24504);function v(g){const{themeId:u,children:c,...h}=g;return(0,n.jsxs)(y.Y,{themeId:u,children:[(0,n.jsx)(l.Y,{...h}),c]})}},73524:(z,P,t)=>{"use strict";t.d(P,{G:()=>m,H:()=>A});var n=t(31085),o=t(77125),l=t(58837),y=t(5893),v=t(14041),g=t(72664),u;(function(i){i.SIDEBAR_PIN_STATE="sidebarPinState"})(u||(u={}));const c={getSidebarPinState(){let i;try{i=JSON.parse(window.localStorage.getItem("sidebarPinState")||"true")}catch{return!0}return!!i},setSidebarPinState(i){return window.localStorage.setItem("sidebarPinState",JSON.stringify(i))}};var h=t(34435);const E=(0,l.A)(i=>({root:{width:"100%",transition:"padding-left 0.1s ease-out",isolation:"isolate",[i.breakpoints.up("sm")]:{paddingLeft:C=>C.isPinned?C.sidebarConfig.drawerWidthOpen:C.sidebarConfig.drawerWidthClosed},[i.breakpoints.down("xs")]:{paddingBottom:C=>C.sidebarConfig.mobileSidebarHeight},"@media print":{padding:"0px !important"}},content:{zIndex:0,isolation:"isolate","&:focus":{outline:0}}}),{name:"BackstageSidebarPage"}),p=(0,v.createContext)({content:{contentRef:void 0}});function m(i){const[C,f]=(0,v.useState)(()=>c.getSidebarPinState()),{sidebarConfig:O}=(0,v.useContext)(g.yY),S=(0,v.useRef)(null),I=(0,v.useMemo)(()=>({content:{contentRef:S}}),[S]);(0,v.useEffect)(()=>{c.setSidebarPinState(C)},[C]);const D=(0,y.A)(H=>H.breakpoints.down("xs"),{noSsr:!0}),w=()=>f(!C),$=E({isPinned:C,sidebarConfig:O});return(0,n.jsx)(h.qj,{value:{isPinned:C,toggleSidebarPinState:w,isMobile:D},children:(0,n.jsx)(p.Provider,{value:I,children:(0,n.jsx)(o.A,{className:$.root,children:i.children})})})}function A(){const{content:i}=(0,v.useContext)(p);return{focusContent:(0,v.useCallback)(()=>{i?.contentRef?.current?.focus()},[i]),contentRef:i?.contentRef}}},34435:(z,P,t)=>{"use strict";t.d(P,{Ut:()=>h,qj:()=>c});var n=t(31085),o=t(43836),l=t(10602),y=t(14041);const v={isPinned:!0,toggleSidebarPinState:()=>{},isMobile:!1},g=(0,y.createContext)(v),u=(0,o.tK)("sidebar-pin-state-context");function c(E){const{children:p,value:m}=E;return(0,n.jsx)(g.Provider,{value:m,children:(0,n.jsx)(u.Provider,{value:(0,l.B)({1:m}),children:p})})}const h=()=>{const E=(0,y.useContext)(u),p=(0,y.useContext)(g);if(E===void 0)return p||v;const m=E.atVersion(1);if(m===void 0)throw new Error("No context found for version 1.");return m}},72664:(z,P,t)=>{"use strict";t.d(P,{Rv:()=>g,U1:()=>p,hC:()=>v,i8:()=>c,yY:()=>E});var n=t(14041);const o=72,l=24,y=18,v={drawerWidthClosed:o,drawerWidthOpen:224,defaultOpenDelayMs:100,defaultCloseDelayMs:0,defaultFadeDuration:200,logoHeight:32,iconContainerWidth:o,iconSize:o-l*2,iconPadding:l,selectedIndicatorWidth:3,userBadgePadding:y,userBadgeDiameter:o-y*2,mobileSidebarHeight:56},g=m=>({...v,...m,iconContainerWidth:v.drawerWidthClosed,iconSize:v.drawerWidthClosed-v.iconPadding*2,userBadgeDiameter:v.drawerWidthClosed-v.userBadgePadding*2}),u={drawerWidthClosed:0,drawerWidthOpen:202,defaultOpenDelayMs:v.defaultOpenDelayMs+200},c=m=>({...u,...m}),h="@backstage/core/sidebar-intro-dismissed",E=(0,n.createContext)({sidebarConfig:v,submenuConfig:u}),p=(0,n.createContext)({isHoveredOn:!1,setIsHoveredOn:()=>{}})},10315:(z,P,t)=>{"use strict";t.d(P,{O:()=>o});var n=t(93184);const o=(0,n.h)({id:"core-components",messages:{signIn:{title:"Sign In",loginFailed:"Login failed",customProvider:{title:"Custom User",subtitle:`Enter your own User ID and credentials.
|
|
6
|
-
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.
|
|
7
|
-
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:(z,P,t)=>{"use strict";t.d(P,{Ig:()=>u,pn:()=>g});var n=t(31085),o=t(43836),l=t(10602),y=t(14041);const v=(0,o.tK)("analytics-context"),g=()=>{const h=(0,y.useContext)(v);if(h===void 0)return{routeRef:"unknown",pluginId:"root",extension:"App"};const E=h.atVersion(1);if(E===void 0)throw new Error("No context found for version 1.");return E},u=h=>{const{attributes:E,children:p}=h,A={...g(),...E},i=(0,l.B)({1:A});return(0,n.jsx)(v.Provider,{value:i,children:p})};function c(h,E){const p=m=>_jsx(u,{attributes:E,children:_jsx(h,{...m})});return p.displayName=`WithAnalyticsContext(${h.displayName||h.name||"Component"})`,p}},67237:(z,P,t)=>{"use strict";t.d(P,{J:()=>y,t:()=>l});var n=t(63544);const o=(0,n.Q)("core-plugin-api:analytics-tracker-events",()=>({mostRecentGatheredNavigation:void 0,mostRecentRoutableExtensionRender:void 0,beforeUnloadRegistered:!1})),l="_ROUTABLE-EXTENSION-RENDERED";class y{analyticsApi;context;constructor(g,u={routeRef:"unknown",pluginId:"root",extension:"App"}){this.analyticsApi=g,this.context=u,o.beforeUnloadRegistered||(addEventListener("beforeunload",()=>{o.mostRecentGatheredNavigation&&(this.analyticsApi.captureEvent({...o.mostRecentGatheredNavigation,...o.mostRecentRoutableExtensionRender}),o.mostRecentGatheredNavigation=void 0,o.mostRecentRoutableExtensionRender=void 0)},{once:!0,passive:!0}),o.beforeUnloadRegistered=!0)}setContext(g){this.context=g}captureEvent(g,u,{value:c,attributes:h}={}){const{_routeNodeType:E,...p}=this.context;if(g===l){o.mostRecentGatheredNavigation&&(o.mostRecentRoutableExtensionRender={context:{...p,extension:"App"}});return}if(o.mostRecentGatheredNavigation){try{this.analyticsApi.captureEvent({...o.mostRecentGatheredNavigation,...o.mostRecentRoutableExtensionRender})}catch(m){console.warn("Error during analytics event capture. %o",m)}o.mostRecentGatheredNavigation=void 0,o.mostRecentRoutableExtensionRender=void 0}if(g==="navigate"&&E==="gathered"&&p.pluginId==="root"){o.mostRecentGatheredNavigation={action:g,subject:u,value:c,attributes:h,context:p};return}try{this.analyticsApi.captureEvent({action:g,subject:u,value:c,attributes:h,context:p})}catch(m){console.warn("Error during analytics event capture. %o",m)}}}},93368:(z,P,t)=>{"use strict";t.d(P,{s:()=>u});var n=t(25862),o=t(72427),l=t(99303),y=t(14041),v=t(67237);function g(){try{return(0,o.gf)(l.c)}catch{return{captureEvent:()=>{}}}}function u(){const c=(0,y.useRef)(null),h=(0,n.pn)(),E=g();function p(){return c.current===null&&(c.current=new v.J(E)),c.current}const m=p();return m.setContext(h),m}},36017:(z,P,t)=>{"use strict";t.d(P,{k:()=>o});var n=t(55309);const o=(0,n.y)({id:"core.alert"})},99303:(z,P,t)=>{"use strict";t.d(P,{c:()=>o});var n=t(55309);const o=(0,n.y)({id:"core.analytics"})},65461:(z,P,t)=>{"use strict";t.d(P,{U:()=>o});var n=t(55309);const o=(0,n.y)({id:"core.config"})},57405:(z,P,t)=>{"use strict";t.d(P,{I:()=>o});var n=t(55309);const o=(0,n.y)({id:"core.discovery"})},39837:(z,P,t)=>{"use strict";t.d(P,{m:()=>o});var n=t(55309);const o=(0,n.y)({id:"core.error"})},63636:(z,P,t)=>{"use strict";t.d(P,{B:()=>l,S:()=>o});var n=t(55309),o;(function(y){y[y.None=0]="None",y[y.Active=1]="Active"})(o||(o={}));const l=(0,n.y)({id:"core.featureflags"})},70795:(z,P,t)=>{"use strict";t.d(P,{a:()=>o});var n=t(55309);const o=(0,n.y)({id:"core.fetch"})},16009:(z,P,t)=>{"use strict";t.d(P,{K:()=>o});var n=t(55309);const o=(0,n.y)({id:"core.identity"})},38932:(z,P,t)=>{"use strict";t.d(P,{F:()=>o});var n=t(55309);const o=(0,n.y)({id:"core.storage"})},56038:(z,P,t)=>{"use strict";t.d(P,{J:()=>o});var n=t(55309);const o=(0,n.y)({id:"core.translation"})},55309:(z,P,t)=>{"use strict";t.d(P,{y:()=>o});class n{config;constructor(y){if(this.config=y,!y.id.split(".").flatMap(g=>g.split("-")).every(g=>g.match(/^[a-z][a-z0-9]*$/)))throw new Error(`API id must only contain period separated lowercase alphanum tokens with dashes, got '${y.id}'`)}get id(){return this.config.id}get T(){throw new Error(`tried to read ApiRef.T of ${this}`)}toString(){return`apiRef{${this.config.id}}`}}function o(l){return new n(l)}},12935:(z,P,t)=>{"use strict";t.d(P,{b:()=>n});function n(o,l){return"id"in o?{api:o,deps:{},factory:()=>l}:o}},72427:(z,P,t)=>{"use strict";t.d(P,{Q2:()=>v,gf:()=>g});var n=t(31085),o=t(14041),l=t(43836),y=t(97142);function v(){const c=(0,l.qO)("api-context");if(!c)throw new y.EH("API context is not available");const h=c.atVersion(1);if(!h)throw new y.EH("ApiContext v1 not available");return h}function g(c){const E=v().get(c);if(!E)throw new y.EH(`No implementation available for ${c}`);return E}function u(c){return function(E){const p=A=>{const i=v(),C={};for(const f in c)if(c.hasOwnProperty(f)){const O=c[f],S=i.get(O);if(!S)throw new NotImplementedError(`No implementation available for ${O}`);C[f]=S}return _jsx(E,{...A,...C})},m=E.displayName||E.name||"Component";return p.displayName=`withApis(${m})`,p}}},82266:(z,P,t)=>{"use strict";t.d(P,{n:()=>o});var n=t(43836);const o=()=>{const l=(0,n.qO)("app-context");if(!l)throw new Error("App context is not available");const y=l.atVersion(1);if(!y)throw new Error("AppContext v1 not available");return y}},19402:(z,P,t)=>{"use strict";t.d(P,{E:()=>v,h:()=>y});var n=t(63544);const o=(0,n.Q)("component-data-store",()=>new WeakMap),l="__backstage_data";function y(g,u,c){const h=g;let E=h[l]??o.get(g);if(E||(E={map:new Map},Object.defineProperty(h,l,{enumerable:!1,configurable:!0,writable:!1,value:E}),o.set(g,E)),E.map.has(u)){const p=g.displayName||g.name;throw new Error(`Attempted to attach duplicate data "${u}" to component "${p}"`)}E.map.set(u,c)}function v(g,u){if(!g)return;const c=g.type;if(!c)return;const h=c[l]??o.get(c);if(h)return h.map.get(u)}},88758:(z,P,t)=>{"use strict";t.d(P,{NC:()=>p,zZ:()=>m,QJ:()=>E});var n=t(31085),o=t(14041),l=t(93368),y=t(25862),v=t(82266),g=t(9222),u=t(19402);class c extends o.Component{static getDerivedStateFromError(i){return{error:i}}state={error:void 0};handleErrorReset=()=>{this.setState({error:void 0})};render(){const{error:i}=this.state,{app:C,plugin:f}=this.props,{ErrorBoundaryFallback:O}=C.getComponents();return i?(0,n.jsx)(O,{error:i,resetError:this.handleErrorReset,plugin:f}):this.props.children}}var h=t(67237);function E(A){const{component:i,mountPoint:C,name:f}=A;return m({component:{lazy:()=>i().then(O=>{const S=D=>{const w=(0,l.s)();try{(0,g.S)(C)}catch($){if(typeof $=="object"&&$!==null){const{message:H}=$;if(typeof H=="string"&&H.startsWith("No path for "))throw new Error(`Routable extension component with mount point ${C} 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 $}return(0,o.useEffect)(()=>{w.captureEvent(h.t,"")},[w]),(0,n.jsx)(O,{...D})},I=f||O.displayName||O.name||"LazyComponent";return S.displayName=`RoutableExtension(${I})`,S},O=>I=>{const D=(0,v.n)(),{BootErrorPage:w}=D.getComponents();return(0,n.jsx)(w,{step:"load-chunk",error:O})})},data:{"core.mountPoint":C},name:f})}function p(A){const{component:i,name:C}=A;return m({component:i,name:C})}function m(A){const{data:i={},name:C}=A;C||console.warn("Declaring extensions without name is DEPRECATED. Make sure that all usages of createReactExtension, createComponentExtension and createRoutableExtension provide a name.");let f;if("lazy"in A.component){const S=A.component.lazy;f=(0,o.lazy)(()=>S().then(I=>({default:I})))}else f=A.component.sync;const O=C||f.displayName||f.name||"Component";return{expose(S){const I=D=>{const w=(0,v.n)(),{Progress:$}=w.getComponents(),H=i?.["core.mountPoint"];return(0,n.jsx)(o.Suspense,{fallback:(0,n.jsx)($,{}),children:(0,n.jsx)(c,{app:w,plugin:S,children:(0,n.jsx)(y.Ig,{attributes:{pluginId:S.getId(),...C&&{extension:C},...H&&{routeRef:H.id}},children:(0,n.jsx)(f,{...D})})})})};(0,u.h)(I,"core.plugin",S),(0,u.h)(I,"core.extensionName",C);for(const[D,w]of Object.entries(i))(0,u.h)(I,D,w);return I.displayName=`Extension(${O})`,I}}}},82442:(z,P,t)=>{"use strict";t.d(P,{O:()=>u});var n=t(14041),o=t(19402),l=t(72427),y=t(63636);function v(c,h,E,p){return n.Children.toArray(c).flatMap(m=>{if(!(0,n.isValidElement)(m))return[];if(m.type===n.Fragment)return v(m.props.children,h,E,p);if((0,o.E)(m,"core.featureFlagged")){const A=m.props;return("with"in A?h.isActive(A.with):!h.isActive(A.without))?v(m.props.children,h,E,p):[]}if(E===void 0||E(m))return[m];if(p)throw new Error(p);return v(m.props.children,h,E,p)})}class g{node;featureFlagsApi;constructor(h,E){this.node=h,this.featureFlagsApi=E}selectByComponentData(h){const E=v(this.node,this.featureFlagsApi,p=>(0,o.E)(p,h.key)!==void 0,h.withStrictError);return new g(E,this.featureFlagsApi)}findComponentData(h){return v(this.node,this.featureFlagsApi,p=>(0,o.E)(p,h.key)!==void 0).map(p=>(0,o.E)(p,h.key)).filter(p=>p!==void 0)}getElements(){return v(this.node,this.featureFlagsApi)}}function u(c,h,E=[]){const p=(0,l.gf)(y.B),m=new g(c,p);return(0,n.useMemo)(()=>h(m),[c,...E])}},9803:(z,P,t)=>{"use strict";t.d(P,{i:()=>o});class n{config;constructor(y){this.config=y}getId(){return this.config.id}getApis(){return this.config.apis??[]}getFeatureFlags(){return this.config.featureFlags?.slice()??[]}get routes(){return this.config.routes??{}}get externalRoutes(){return this.config.externalRoutes??{}}provide(y){return y.expose(this)}toString(){return`plugin{${this.config.id}}`}}function o(l){return new n(l)}},34569:(z,P,t)=>{"use strict";t.d(P,{H:()=>y});var n=t(59598);let o=n.b;class l{id;params;[o];constructor(g,u){this.id=g,this.params=u,this[o]="absolute"}get title(){return this.id}toString(){return`routeRef{type=absolute,id=${this.id}}`}}function y(v){return new l(v.id,v.params??[])}},59598:(z,P,t)=>{"use strict";t.d(P,{b:()=>o});var n=t(63544);const o=(0,n.Q)("route-ref-type",()=>Symbol("route-ref-type"))},9222:(z,P,t)=>{"use strict";t.d(P,{S:()=>y});var n=t(14041),o=t(18690),l=t(43836);function y(v){const{pathname:g}=(0,o.zy)(),u=(0,l.qO)("routing-context");if(!u)throw new Error("Routing context is not available");const c=u.atVersion(1),h=(0,n.useMemo)(()=>c&&c.resolve(v,{pathname:g}),[c,v,g]);if(!u)throw new Error("useRouteRef used outside of routing context");if(!c)throw new Error("RoutingContext v1 not available");const E="optional"in v&&v.optional;if(!h&&!E)throw new Error(`No path for ${v}`);return h}},70048:(z,P,t)=>{"use strict";t.d(P,{K:()=>o});var n=t(18690);function o(l){return(0,n.g)()}},93184:(z,P,t)=>{"use strict";t.d(P,{h:()=>y,v:()=>v});var n=t(99833);function o(g){const u=new Array;function c(h,E){for(const[p,m]of Object.entries(h))typeof m=="string"?u.push([E+p,m]):c(m,`${E}${p}.`)}return c(g,""),Object.fromEntries(u)}class l{#t;#e;#n;constructor(u){this.#t=u.id,this.#e=o(u.messages)}$$type="@backstage/TranslationRef";version="v1";get id(){return this.#t}get T(){throw new Error("Not implemented")}getDefaultMessages(){return this.#e}setDefaultResource(u){this.#n=u}getDefaultResource(){return this.#n}toString(){return`TranslationRef{id=${this.id}}`}}function y(g){const u=new l(g);return g.translations&&u.setDefaultResource((0,n.o)({ref:u,translations:g.translations})),u}function v(g){const u=g;if(u.$$type!=="@backstage/TranslationRef")throw new Error(`Invalid translation ref, bad type '${u.$$type}'`);if(u.version!=="v1")throw new Error(`Invalid translation ref, bad version '${u.version}'`);return u}},99833:(z,P,t)=>{"use strict";t.d(P,{Y:()=>n,o:()=>o});function n(l){const y=l;if(y.$$type!=="@backstage/TranslationResource")throw new Error(`Invalid translation resource, bad type '${y.$$type}'`);if(y.version!=="v1")throw new Error(`Invalid translation resource, bad version '${y.version}'`);return y}function o(l){return{$$type:"@backstage/TranslationResource",version:"v1",id:l.ref.id,resources:Object.entries(l.translations).map(([y,v])=>({language:y,loader:()=>v().then(g=>{const u=g.default;return{messages:u?.$$type==="@backstage/TranslationMessages"?u.messages:u}})}))}}},87849:(z,P,t)=>{"use strict";t.d(P,{i:()=>g});var n=t(14041),o=t(72427),l=t(39837),y=t(56038);const v=new WeakSet,g=u=>{const c=(0,o.gf)(l.m),h=(0,o.gf)(y.J),[E,p]=(0,n.useState)(()=>h.getTranslation(u)),m=(0,n.useMemo)(()=>h.translation$(u),[h,u]),A=(0,n.useCallback)(C=>{if(!v.has(u)){const f=`Failed to load translation resource '${u.id}'; caused by ${C}`;console.error(f),c.post(new Error(f)),v.add(u)}},[c,u]);(0,n.useEffect)(()=>{const C=m.subscribe({next(f){f.ready&&p(f)},error(f){A(f)}});return()=>{C.unsubscribe()}},[m,A]);const i=(0,n.useRef)(!0);if((0,n.useEffect)(()=>{i.current?i.current=!1:p(h.getTranslation(u))},[h,u]),!E.ready)throw new Promise(C=>{const f=m.subscribe({next(O){O.ready&&(f.unsubscribe(),C())},error(O){f.unsubscribe(),A(O),C()}})});return{t:E.t}}},70835:(z,P,t)=>{"use strict";t.d(P,{o:()=>l});var n=t(59750);async function o(y){try{const v=await y.text();if(v){if(y.headers.get("content-type")?.startsWith("application/json"))try{const g=JSON.parse(v);if(g.error&&g.response)return g}catch{}return{error:{name:"Error",message:`Request failed with status ${y.status} ${y.statusText}, ${v}`},response:{statusCode:y.status}}}}catch{}return{error:{name:"Error",message:`Request failed with status ${y.status} ${y.statusText}`},response:{statusCode:y.status}}}class l extends Error{response;body;cause;statusCode;statusText;static async fromResponse(v){const g=await o(v),u=g.response.statusCode||v.status,c=v.statusText,h=`Request failed with ${u} ${c}`,E=(0,n.cy)(g.error);return new l({message:h,response:v,data:g,cause:E,statusCode:u,statusText:c})}constructor(v){super(v.message),this.name="ResponseError",this.response=v.response,this.body=v.data,this.cause=v.cause,this.statusCode=v.statusCode,this.statusText=v.statusText}}},93007:(z,P,t)=>{"use strict";t.d(P,{b:()=>n,t:()=>o});function n(l){if(typeof l!="object"||l===null||Array.isArray(l))return!1;const y=l;return!(typeof y.name!="string"||y.name===""||typeof y.message!="string")}function o(l){if(typeof l!="object"||l===null||Array.isArray(l))throw new Error(`Encountered invalid error, not an object, got '${l}'`);const y=l;if(typeof y.name!="string"||y.name==="")throw new Error(`Encountered error object without a name, got '${l}'`);if(typeof y.message!="string")throw new Error(`Encountered error object without a message, got '${l}'`)}},97142:(z,P,t)=>{"use strict";t.d(P,{dz:()=>y,m_:()=>u,EH:()=>E});var n=t(93007),o=t(59750);class l extends Error{cause;constructor(i,C){let f=i;if(C!==void 0){const O=(0,o.M5)(C);f?f+=`; caused by ${O}`:f=`caused by ${O}`}super(f),Error.captureStackTrace?.(this,this.constructor),(!this.name||this.name==="Error")&&this.constructor.name!=="Error"&&(this.name=this.constructor.name),this.cause=(0,n.b)(C)?C:void 0}}class y extends l{name="InputError"}class v extends null{name="AuthenticationError"}class g extends null{name="NotAllowedError"}class u extends l{name="NotFoundError"}class c extends null{name="ConflictError"}class h extends null{name="NotModifiedError"}class E extends l{name="NotImplementedError"}class p extends null{}class m extends l{constructor(i,C){super(i,C),this.name=(0,n.b)(C)?C.name:"Error"}}},59750:(z,P,t)=>{"use strict";t.d(P,{M5:()=>g,cy:()=>v});var n=t(69655),o=t.n(n),l=t(93007);function y(u,c){const E={name:"Unknown",message:"<no reason given>",...serializeErrorInternal(u)};return c?.includeStack||delete E.stack,E}function v(u){const c=(0,n.deserializeError)(u);return u.stack||(c.stack=void 0),c}function g(u){if((0,l.b)(u)){const c=String(u);return c!=="[object Object]"?c:`${u.name}: ${u.message}`}return`unknown error '${u}'`}},98932:(z,P,t)=>{"use strict";t.d(P,{K:()=>l,m:()=>y});var n=t(55309),o=t(72427);const l=(0,n.y)({id:"core.components"});function y(v){return(0,o.gf)(l).getComponent(v)}},32696:(z,P,t)=>{"use strict";t.d(P,{u:()=>p});var n=t(31085),o=t(14041),l=t(93368),y=t(25862);class v extends o.Component{static getDerivedStateFromError(A){return{error:A}}state={error:void 0};handleErrorReset=()=>{this.setState({error:void 0})};render(){const{error:A}=this.state,{plugin:i,children:C,Fallback:f}=this.props;return A?(0,n.jsx)(f,{plugin:i,error:A,resetError:this.handleErrorReset}):C}}var g=t(67237),u=t(98932),c=t(60993),h=t(66574);const E=m=>{const{disableTracking:A,children:i}=m,C=(0,l.s)();return(0,o.useEffect)(()=>{A||C.captureEvent(g.t,"")},[C,A]),(0,n.jsx)(n.Fragment,{children:i})};function p(m){const{node:A,routable:i,children:C}=m,f=!!A.instance?.getData(h.X.routePath),O=A.spec.source,S=(0,u.m)(c.r.progress),I=(0,u.m)(c.r.errorBoundaryFallback),D={extensionId:A.spec.id,pluginId:A.spec.source?.id??"app"};return(0,n.jsx)(o.Suspense,{fallback:(0,n.jsx)(S,{}),children:(0,n.jsx)(v,{plugin:O,Fallback:I,children:(0,n.jsx)(y.Ig,{attributes:D,children:(0,n.jsx)(E,{disableTracking:!(i??f),children:C})})})})}},60993:(z,P,t)=>{"use strict";t.d(P,{r:()=>v});function n(g){const{id:u}=g;return{id:u,toString(){return`ComponentRef{id=${u}}`}}}const o=n({id:"core.components.progress"}),l=n({id:"core.components.notFoundErrorPage"}),y=n({id:"core.components.errorBoundaryFallback"}),v={progress:o,notFoundErrorPage:l,errorBoundaryFallback:y}},59817:(z,P,t)=>{"use strict";t.d(P,{k:()=>l});var n=t(66243),o=t(39066);function l(y){const{factory:v,configSchema:g,inputs:u}=y,c="api"in y?y.api:v.api;return(0,n.w)({kind:"api",namespace:c.id,attachTo:{id:"app",input:"apis"},inputs:u,configSchema:g,output:{api:l.factoryDataRef},factory({config:h,inputs:E}){return typeof v=="function"?{api:v({config:h,inputs:E})}:{api:v}}})}(function(y){y.factoryDataRef=(0,o.T)().with({id:"core.api.factory"})})(l||(l={}))},50893:(z,P,t)=>{"use strict";t.d(P,{Q:()=>y});var n=t(83839),o=t(66243),l=t(39066);function y(v){const{routeRef:g,title:u,icon:c,namespace:h,name:E}=v;return(0,o.w)({namespace:h,name:E,kind:"nav-item",attachTo:{id:"app/nav",input:"items"},configSchema:(0,n.Z)(p=>p.object({title:p.string().default(u)})),output:{navTarget:y.targetDataRef},factory:({config:p})=>({navTarget:{title:p.title,icon:c,routeRef:g}})})}(function(v){v.targetDataRef=(0,l.T)().with({id:"core.nav-item.target"})})(y||(y={}))},73602:(z,P,t)=>{"use strict";t.d(P,{R:()=>u});var n=t(31085),o=t(14041),l=t(32696),y=t(83839),v=t(66243),g=t(66574);function u(c){const h="configSchema"in c?c.configSchema:(0,y.Z)(E=>E.object({path:E.string().default(c.defaultPath)}));return(0,v.w)({kind:"page",namespace:c.namespace,name:c.name,attachTo:c.attachTo??{id:"app/routes",input:"routes"},configSchema:h,inputs:c.inputs,disabled:c.disabled,output:{element:g.X.reactElement,path:g.X.routePath,routeRef:g.X.routeRef.optional()},factory({config:E,inputs:p,node:m}){const A=(0,o.lazy)(()=>c.loader({config:E,inputs:p}).then(i=>({default:()=>i})));return{path:E.path,routeRef:c.routeRef,element:(0,n.jsx)(l.u,{node:m,children:(0,n.jsx)(A,{})})}}})}},83839:(z,P,t)=>{"use strict";t.d(P,{Z:()=>l});var n=t(46195),o=t(63177);function l(v){const g=v(n.z);return{parse:u=>{const c=g.safeParse(u);if(c.success)return c.data;throw new Error(c.error.issues.map(y).join("; "))},schema:(0,o.Ay)(g)}}function y(v){if(v.code==="invalid_union")return y(v.unionErrors[0].issues[0]);let g=v.message;return g==="Required"&&(g="Missing required value"),v.path.length&&(g+=` at '${v.path.join(".")}'`),g}},66574:(z,P,t)=>{"use strict";t.d(P,{X:()=>o});var n=t(39066);const o={reactElement:(0,n.T)().with({id:"core.reactElement"}),routePath:(0,n.T)().with({id:"core.routing.path"}),routeRef:(0,n.T)().with({id:"core.routing.ref"})}},66243:(z,P,t)=>{"use strict";t.d(P,{T:()=>n,w:()=>o});function n(l){const y=l;if(y.$$type!=="@backstage/ExtensionDefinition")throw new Error(`Invalid extension definition instance, bad type '${y.$$type}'`);if(y.version!=="v1")throw new Error(`Invalid extension definition instance, bad version '${y.version}'`);return y}function o(l){return{$$type:"@backstage/ExtensionDefinition",version:"v1",kind:l.kind,namespace:l.namespace,name:l.name,attachTo:l.attachTo,disabled:l.disabled??!1,inputs:l.inputs??{},output:l.output,configSchema:l.configSchema,factory({inputs:y,...v}){return l.factory({inputs:y,...v})},toString(){const y=[];return l.kind&&y.push(`kind=${l.kind}`),l.namespace&&y.push(`namespace=${l.namespace}`),l.name&&y.push(`name=${l.name}`),y.push(`attachTo=${l.attachTo.id}@${l.attachTo.input}`),`ExtensionDefinition{${y.join(",")}}`}}}},39066:(z,P,t)=>{"use strict";t.d(P,{T:()=>n});function n(o){const l=y=>({id:y,$$type:"@backstage/ExtensionDataRef",config:{},optional(){return{...this,config:{...this.config,optional:!0}}},toString(){const v=!!this.config.optional;return`ExtensionDataRef{id=${y},optional=${v}}`}});return o?l(o):{with(y){return l(y.id)}}}},70621:(z,P,t)=>{"use strict";t.d(P,{i:()=>y});var n=t(66243);function o(g){const u=g;if(u.$$type!=="@backstage/Extension")throw new Error(`Invalid extension instance, bad type '${u.$$type}'`);if(u.version!=="v1")throw new Error(`Invalid extension instance, bad version '${u.version}'`);return u}function l(g,u){const c=(0,n.T)(g),{name:h,kind:E,namespace:p,...m}=c,A=c.namespace??u?.namespace,i=h&&A?`${A}/${h}`:A||h;if(!i)throw new Error(`Extension must declare an explicit namespace or name as it could not be resolved from context, kind=${E} namespace=${A} name=${h}`);const C=E?`${E}:${i}`:i;return{...m,$$type:"@backstage/Extension",version:"v1",id:C,toString(){return`Extension{id=${C}}`}}}function y(g){const u=(g.extensions??[]).map(h=>l(h,{namespace:g.id})),c=u.map(h=>h.id);if(c.length!==new Set(c).size){const h=Array.from(new Set(c.filter((E,p)=>c.indexOf(E)!==p)));throw new Error(`Plugin '${g.id}' provided duplicate extensions: ${h.join(", ")}`)}return{$$type:"@backstage/BackstagePlugin",version:"v1",id:g.id,routes:g.routes??{},externalRoutes:g.externalRoutes??{},featureFlags:g.featureFlags??[],extensions:u,toString(){return`Plugin{id=${g.id}}`}}}function v(g){const u=g;if(u.$$type!=="@backstage/BackstagePlugin")throw new Error(`Invalid plugin instance, bad type '${u.$$type}'`);if(u.version!=="v1")throw new Error(`Invalid plugin instance, bad version '${u.version}'`);return u}},3347:(z,P,t)=>{"use strict";t.d(P,{L:()=>He,Y:()=>Ze});var n=t(59869);const o="amazonaws.com";function l(U){const x=U.getOptionalString("endpoint"),T=U.getOptionalBoolean("s3ForcePathStyle")??!1;let W,nt;if(x){try{const qt=new URL(x);W=qt.host,nt=qt.pathname}catch{throw new Error(`invalid awsS3 integration config, endpoint '${x}' is not a valid URL`)}if(nt!=="/")throw new Error(`invalid awsS3 integration config, endpoints cannot contain path, got '${x}'`)}else W=o;const dt=U.getOptionalString("accessKeyId"),Et=U.getOptionalString("secretAccessKey")?.trim(),_t=U.getOptionalString("roleArn"),Jt=U.getOptionalString("externalId");return{host:W,endpoint:x,s3ForcePathStyle:T,accessKeyId:dt,secretAccessKey:Et,roleArn:_t,externalId:Jt}}function y(U){const x=U.map(l);return x.some(T=>T.host===o)||x.push({host:o}),x}class v{integrationConfig;static factory=({config:x})=>{const T=y(x.getOptionalConfigArray("integrations.awsS3")??[]);return(0,n.oS)(T.map(W=>new v(W)),W=>W.config.host)};get type(){return"awsS3"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}constructor(x){this.integrationConfig=x}resolveUrl(x){return(0,n.ku)(x)}resolveEditUrl(x){return x}}const g="console.aws.amazon.com";function u(U){const x=U.getOptionalString("accessKeyId"),T=U.getOptionalString("secretAccessKey")?.trim(),W=U.getOptionalString("roleArn"),nt=U.getOptionalString("externalId"),dt=U.getString("region");return{host:U.getOptionalString("host")||`${dt}.${g}`,accessKeyId:x,secretAccessKey:T,roleArn:W,externalId:nt,region:dt}}function c(U){return U.map(u)}class h{integrationConfig;static factory=({config:x})=>{const T=c(x.getOptionalConfigArray("integrations.awsCodeCommit")??[]);return(0,n.oS)(T.map(W=>new h(W)),W=>W.config.host)};get type(){return"awsCodeCommit"}get config(){return this.integrationConfig}get title(){return this.integrationConfig.host}constructor(x){this.integrationConfig=x}resolveUrl(x){return(0,n.ku)(x)}resolveEditUrl(x){const W=new URL(x).pathname.match(/^\/codesuite\/codecommit\/repositories\/([^\/]+)\//);if(!W)throw new Error("");const[,nt]=W;return E(x,nt,"edit")}}function E(U,x,T){const W=T==="edit"?"files/edit":T;return U.replace(new RegExp(`/codesuite/codecommit/repositories/${x}/(browse|files/edit)/`),`/codesuite/codecommit/repositories/${x}/${W}/`)}const p="GB";class m{static fromRepoUrl(x){const T=new URL(x);let W,nt,dt;const Et=T.pathname.split("/").map(ye=>decodeURIComponent(ye));if(Et[2]==="_git"?(W=Et[1],nt=dt=Et[3]):Et[3]==="_git"?(W=Et[1],nt=Et[2],dt=Et[4]):Et[4]==="_git"&&(W=`${Et[1]}/${Et[2]}`,nt=Et[3],dt=Et[5]),!W||!nt||!dt)throw new Error("Azure URL must point to a git repository");const _t=T.searchParams.get("path")??void 0;let Jt;const qt=T.searchParams.get("version");if(qt){if(qt.slice(0,2)!=="GB")throw new Error("Azure URL version must point to a git branch");Jt=qt.slice(2)}return new m(T.origin,W,nt,dt,_t,Jt)}#t;#e;#n;#s;#r;#o;constructor(x,T,W,nt,dt,Et){this.#t=x,this.#e=T,this.#n=W,this.#s=nt,this.#r=dt,this.#o=Et}#a=(...x)=>{const T=new URL(this.#t);return T.pathname=x.map(W=>encodeURIComponent(W)).join("/"),T};toRepoUrl(){let x;return this.#n===this.#s?x=this.#a(this.#e,"_git",this.#s):x=this.#a(this.#e,this.#n,"_git",this.#s),this.#r&&x.searchParams.set("path",this.#r),this.#o&&x.searchParams.set("version",p+this.#o),x.toString()}toFileUrl(){if(!this.#r)throw new Error("Azure URL must point to a specific path to be able to download a file");const x=this.#a(this.#e,this.#n,"_apis","git","repositories",this.#s,"items");return x.searchParams.set("api-version","6.0"),x.searchParams.set("path",this.#r),this.#o&&x.searchParams.set("version",this.#o),x.toString()}toArchiveUrl(){const x=this.#a(this.#e,this.#n,"_apis","git","repositories",this.#s,"items");return x.searchParams.set("recursionLevel","full"),x.searchParams.set("download","true"),x.searchParams.set("api-version","6.0"),this.#r&&x.searchParams.set("scopePath",this.#r),this.#o&&x.searchParams.set("version",this.#o),x.toString()}toCommitsUrl(){const x=this.#a(this.#e,this.#n,"_apis","git","repositories",this.#s,"commits");return x.searchParams.set("api-version","6.0"),this.#o&&x.searchParams.set("searchCriteria.itemVersion.version",this.#o),x.toString()}getOwner(){return this.#e}getProject(){return this.#n}getRepo(){return this.#s}getPath(){return this.#r}getRef(){return this.#o}}const A="dev.azure.com",i=["clientId","clientSecret","tenantId","personalAccessToken"],C=new Map([["ClientSecret",["clientId","clientSecret","tenantId"]],["ManagedIdentity",["clientId"]],["PersonalAccessToken",["personalAccessToken"]]]);function f(U){for(const x of C.entries()){const[T,W]=x,nt=i.filter(dt=>!W.includes(dt));if(W.every(dt=>U[dt]!==void 0)&&nt.every(dt=>U[dt]===void 0))return{kind:T,organizations:U.organizations,...W.reduce((dt,Et)=>(dt[Et]=U[Et],dt),{})}}throw new Error("is not a valid credential")}function O(U){const x=U.getOptionalString("host")??A;let T=U.getOptionalConfigArray("credentials")?.map(dt=>({organizations:dt.getOptionalStringArray("organizations"),personalAccessToken:dt.getOptionalString("personalAccessToken")?.trim(),tenantId:dt.getOptionalString("tenantId"),clientId:dt.getOptionalString("clientId"),clientSecret:dt.getOptionalString("clientSecret")?.trim()}));const W=U.getOptionalString("token")?.trim();if(U.getOptional("credential")!==void 0&&U.getOptional("credentials")!==void 0)throw new Error("Invalid Azure integration config, 'credential' and 'credentials' cannot be used together. Use 'credentials' instead.");if(U.getOptional("token")!==void 0&&U.getOptional("credentials")!==void 0)throw new Error("Invalid Azure integration config, 'token' and 'credentials' cannot be used together. Use 'credentials' instead.");if(W!==void 0){const dt=[{personalAccessToken:W}];T=T?.concat(dt)??dt}if(U.getOptional("credential")!==void 0){const dt=[{organizations:U.getOptionalStringArray("credential.organizations"),token:U.getOptionalString("credential.token")?.trim(),tenantId:U.getOptionalString("credential.tenantId"),clientId:U.getOptionalString("credential.clientId"),clientSecret:U.getOptionalString("credential.clientSecret")?.trim()}];T=T?.concat(dt)??dt}if(!(0,n.HO)(x))throw new Error(`Invalid Azure integration config, '${x}' is not a valid host`);let nt;if(T!==void 0){const dt=T?.reduce((Et,_t,Jt)=>{let qt;try{f(_t)}catch(ye){qt=ye.message}return qt!==void 0&&Et.push(`credential at position ${Jt+1} ${qt}`),Et},Array.of()).concat(Object.entries(T.filter(Et=>Et.organizations!==void 0&&Et.organizations.length>0).reduce((Et,_t,Jt)=>(_t.organizations?.forEach(qt=>{Et[qt]||(Et[qt]=[]),Et[qt].push(Jt+1)}),Et),{})).filter(([Et,_t])=>_t.length>1).reduce((Et,[_t,Jt])=>(Et.push(`organization ${_t} is specified multiple times in credentials at positions ${Jt.slice(0,Jt.length-1).join(", ")} and ${Jt[Jt.length-1]}`),Et),Array.of()));if(dt?.length>0)throw new Error(`Invalid Azure integration config for ${x}: ${dt.join("; ")}`);if(nt=T.map(Et=>f(Et)),nt.some(Et=>Et.kind!=="PersonalAccessToken")&&x!==A)throw new Error(`Invalid Azure integration config for ${x}, only personal access tokens can be used with hosts other than ${A}`);if(nt.filter(Et=>Et.organizations===void 0||Et.organizations.length===0).length>1)throw new Error(`Invalid Azure integration config for ${x}, you cannot specify multiple credentials without organizations`)}return{host:x,credentials:nt}}function S(U){const x=U.map(O);return x.some(T=>T.host===A)||x.push({host:A}),x}class I{integrationConfig;static factory=({config:x})=>{const T=S(x.getOptionalConfigArray("integrations.azure")??[]);return(0,n.oS)(T.map(W=>new I(W)),W=>W.config.host)};constructor(x){this.integrationConfig=x}get type(){return"azure"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(x){const{url:T,base:W}=x;if((0,n.AY)(T))return T;try{const nt=m.fromRepoUrl(W),dt=new URL(W),Et=new URL(`https://a.com${nt.getPath()??""}`),_t=new URL(T,Et).pathname;return dt.searchParams.set("path",_t),x.lineNumber&&(dt.searchParams.set("line",String(x.lineNumber)),dt.searchParams.set("lineEnd",String(x.lineNumber+1)),dt.searchParams.set("lineStartColumn","1"),dt.searchParams.set("lineEndColumn","1")),dt.toString()}catch{return new URL(T,W).toString()}}resolveEditUrl(x){return x}}var D=t(52536),w=t.n(D);const $="bitbucket.org",H="https://api.bitbucket.org/2.0";function G(U){const x=$,T=H,W=U.getString("username"),nt=U.getString("appPassword")?.trim();return{host:x,apiBaseUrl:T,username:W,appPassword:nt}}function F(U){const x=U.map(G);return x.length===0&&x.push({host:$,apiBaseUrl:H}),x}class Q{integrationConfig;static factory=({config:x})=>{const T=F(x.getOptionalConfigArray("integrations.bitbucketCloud")??[]);return(0,n.oS)(T.map(W=>new Q(W)),W=>W.config.host)};constructor(x){this.integrationConfig=x}get type(){return"bitbucketCloud"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(x){const T=(0,n.ku)(x);if(x.lineNumber){const W=new URL(T);return W.hash=`lines-${x.lineNumber}`,W.toString()}return T}resolveEditUrl(x){const T=w()(x),W=new URL(x);return W.searchParams.set("mode","edit"),W.searchParams.set("at",T.ref),W.toString()}}var B=t(45250);const V="bitbucket.org",J="https://api.bitbucket.org/2.0";function rt(U){const x=U.getOptionalString("host")??V;let T=U.getOptionalString("apiBaseUrl");const W=U.getOptionalString("token")?.trim(),nt=U.getOptionalString("username"),dt=U.getOptionalString("appPassword")?.trim();if(!(0,n.HO)(x))throw new Error(`Invalid Bitbucket integration config, '${x}' is not a valid host`);return T?T=(0,B.trimEnd)(T,"/"):x===V?T=J:T=`https://${x}/rest/api/1.0`,{host:x,apiBaseUrl:T,token:W,username:nt,appPassword:dt}}function lt(U){const x=U.map(rt);return x.some(T=>T.host===V)||x.push({host:V,apiBaseUrl:J}),x}class ht{integrationConfig;static factory=({config:x})=>{const T=lt(x.getOptionalConfigArray("integrations.bitbucket")??[...x.getOptionalConfigArray("integrations.bitbucketCloud")??[],...x.getOptionalConfigArray("integrations.bitbucketServer")??[]]);return(0,n.oS)(T.map(W=>new ht(W)),W=>W.config.host)};constructor(x){this.integrationConfig=x}get type(){return"bitbucket"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(x){const T=(0,n.ku)(x);if(!x.lineNumber)return T;const W=new URL(T);return this.integrationConfig.host==="bitbucket.org"?W.hash=`lines-${x.lineNumber}`:W.hash=`${x.lineNumber}`,W.toString()}resolveEditUrl(x){const T=w()(x),W=new URL(x);return W.searchParams.set("mode","edit"),W.searchParams.set("spa","0"),W.searchParams.set("at",T.ref),W.toString()}}function Ct(U){const x=U.getString("host");let T=U.getOptionalString("apiBaseUrl");const W=U.getOptionalString("token")?.trim(),nt=U.getOptionalString("username"),dt=U.getOptionalString("password");if(!(0,n.HO)(x))throw new Error(`Invalid Bitbucket Server integration config, '${x}' is not a valid host`);return T?T=(0,B.trimEnd)(T,"/"):T=`https://${x}/rest/api/1.0`,{host:x,apiBaseUrl:T,token:W,username:nt,password:dt}}function Rt(U){return U.map(Ct)}class st{integrationConfig;static factory=({config:x})=>{const T=Rt(x.getOptionalConfigArray("integrations.bitbucketServer")??[]);return(0,n.oS)(T.map(W=>new st(W)),W=>W.config.host)};constructor(x){this.integrationConfig=x}get type(){return"bitbucketServer"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(x){const T=(0,n.ku)(x);if(x.lineNumber){const W=new URL(T);return W.hash=x.lineNumber.toString(),W.toString()}return T}resolveEditUrl(x){return x.includes("?")?x.substring(0,x.indexOf("?")):x}}function at(U){const x=U.getString("host");let T=U.getOptionalString("baseUrl"),W=U.getOptionalString("cloneUrl"),nt=U.getString("gitilesBaseUrl");const dt=U.getOptionalString("username"),Et=U.getOptionalString("password")?.trim();if((0,n.HO)(x)){if(T&&!(0,n.AY)(T))throw new Error(`Invalid Gerrit integration config, '${T}' is not a valid baseUrl`);if(W&&!(0,n.AY)(W))throw new Error(`Invalid Gerrit integration config, '${W}' is not a valid cloneUrl`);if(!(0,n.AY)(nt))throw new Error(`Invalid Gerrit integration config, '${nt}' is not a valid gitilesBaseUrl`)}else throw new Error(`Invalid Gerrit integration config, '${x}' is not a valid host`);return T?T=(0,B.trimEnd)(T,"/"):T=`https://${x}`,nt?nt=(0,B.trimEnd)(nt,"/"):nt=`https://${x}`,W?W=(0,B.trimEnd)(W,"/"):W=T,{host:x,baseUrl:T,cloneUrl:W,gitilesBaseUrl:nt,username:dt,password:Et}}function ot(U){return U.map(at)}var ft=t(1048).hp;const At=")]}'";function yt(U,x){const T=new URL(U.gitilesBaseUrl),W=new URL(x),dt=W.pathname.substring(W.pathname.startsWith("/a/")?2:0).replace(T.pathname,"").split("/").filter(Ht=>!!Ht),Et=dt.indexOf("+");if(Et<=0)throw new Error(`Unable to parse project from url: ${x}`);const _t=(0,B.trimStart)(dt.slice(0,Et).join("/"),"/"),Jt=dt.indexOf("heads");if(Jt<=0)throw new Error(`Unable to parse branch from url: ${x}`);const qt=dt[Jt+1],ye=dt.slice(Jt+2).join("/");return{branch:qt,filePath:ye===""?"/":ye,project:_t}}function St(U,x,T,W){return`${U.gitilesBaseUrl}/${x}/+/refs/heads/${T}/${(0,B.trimStart)(W,"/")}`}function Tt(U,x,T,W){const nt=W==="/"||W===""?".tar.gz":`/${W}.tar.gz`;return`${$t(U)}/${x}/+archive/refs/heads/${T}${nt}`}function wt(U){return U.password?"/a/":"/"}function $t(U){if(!U.baseUrl||!U.gitilesBaseUrl)throw new Error("Unexpected Gerrit config values. baseUrl or gitilesBaseUrl not set.");if(U.gitilesBaseUrl.startsWith(U.baseUrl))return U.gitilesBaseUrl.replace(U.baseUrl.concat("/"),U.baseUrl.concat(wt(U)));if(U.password)throw new Error("Since the baseUrl (Gerrit) is not part of the gitilesBaseUrl, an authentication URL could not be constructed.");return U.gitilesBaseUrl}function Pt(U,x){const{branch:T,project:W}=yt(U,x);return`${U.baseUrl}${wt(U)}projects/${encodeURIComponent(W)}/branches/${T}`}function k(U,x){const{project:T}=yt(U,x);return`${U.cloneUrl}${wt(U)}${T}`}function Z(U,x){const{branch:T,filePath:W,project:nt}=yt(U,x);return`${U.baseUrl}${wt(U)}projects/${encodeURIComponent(nt)}/branches/${T}/files/${encodeURIComponent(W)}/content`}function ct(U){return`${U.baseUrl}${wt(U)}projects/`}function xt(U){const x={};if(!U.password)return x;const T=ft.from(`${U.username}:${U.password}`,"utf8");return x.Authorization=`Basic ${T.toString("base64")}`,{headers:x}}async function gt(U){const x=await U.text();if(x.startsWith(At))try{return JSON.parse(x.slice(At.length))}catch(T){throw new Error(`Invalid response from Gerrit: ${x.slice(0,10)} - ${T}`)}throw new Error(`Gerrit JSON body prefix missing. Found: ${x.slice(0,10)}`)}class it{integrationConfig;static factory=({config:x})=>{const T=ot(x.getOptionalConfigArray("integrations.gerrit")??[]);return(0,n.oS)(T.map(W=>new it(W)),W=>W.config.host)};constructor(x){this.integrationConfig=x}get type(){return"gerrit"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(x){const{url:T,base:W,lineNumber:nt}=x;let dt;if(T.startsWith("/")){const{branch:Et,project:_t}=yt(this.config,W);return St(this.config,_t,Et,T)}return T?dt=new URL(T,W):dt=new URL(W),nt&&(dt.hash=nt.toString()),dt.toString()}resolveEditUrl(x){return x}}var Ot=t(36021);const Lt="gitlab.com",Ft="https://gitlab.com/api/v4";function Mt(U){const x=U.getString("host");let T=U.getOptionalString("apiBaseUrl");const W=U.getOptionalString("token")?.trim();let nt=U.getOptionalString("baseUrl");if(T?T=(0,B.trimEnd)(T,"/"):x===Lt&&(T=Ft),nt?nt=(0,B.trimEnd)(nt,"/"):nt=`https://${x}`,(0,n.HO)(x)){if(!T||!(0,n.AY)(T))throw new Error(`Invalid GitLab integration config, '${T}' is not a valid apiBaseUrl`);if(!(0,n.AY)(nt))throw new Error(`Invalid GitLab integration config, '${nt}' is not a valid baseUrl`)}else throw new Error(`Invalid GitLab integration config, '${x}' is not a valid host`);return{host:x,token:W,apiBaseUrl:T,baseUrl:nt}}function Gt(U){const x=U.map(Mt);return x.some(T=>T.host===Lt)||x.push({host:Lt,apiBaseUrl:Ft,baseUrl:`https://${Lt}`}),x}function ue(U){let x="";return U.host!==Lt&&(x=new URL(U.baseUrl).pathname),trimEnd(x,"/")}class le{integrationConfig;static factory=({config:x})=>{const T=Gt(x.getOptionalConfigArray("integrations.gitlab")??[]);return(0,n.oS)(T.map(W=>new le(W)),W=>W.config.host)};constructor(x){this.integrationConfig=x}get type(){return"gitlab"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(x){return(0,n.ku)(x)}resolveEditUrl(x){return he(x,"edit")}}function he(U,x){return U.replace(/\/\-\/(blob|tree|edit)\//,`/-/${x}/`)}function Qt(U){const x=U.getString("host");let T=U.getOptionalString("baseUrl");const W=U.getOptionalString("username"),nt=U.getOptionalString("password")?.trim();if((0,n.HO)(x)){if(T&&!(0,n.AY)(T))throw new Error(`Invalid Gitea integration config, '${T}' is not a valid baseUrl`)}else throw new Error(`Invalid Gitea integration config, '${x}' is not a valid host`);return T?T=(0,B.trimEnd)(T,"/"):T=`https://${x}`,{host:x,baseUrl:T,username:W,password:nt}}var Xt=t(1048).hp;function jt(U,x){const T=zt(U,x);return`${T.url}/${T.owner}/${T.name}/_edit/${T.ref}/${T.path}`}function Zt(U,x){const T=zt(U,x);return`${T.url}/api/v1/repos/${T.owner}/${T.name}/contents/${T.path}?ref=${T.ref}`}function pe(U,x){const T=zt(U,x);return`${T.url}/api/v1/repos/${T.owner}/${T.name}/archive/${T.ref}.tar.gz`}function Be(U,x){const T=zt(U,x);return`${T.url}/api/v1/repos/${T.owner}/${T.name}/git/commits/${T.ref}`}function q(U){const x={},{username:T,password:W}=U;return W?(T?x.Authorization=`basic ${Xt.from(`${T}:${W}`).toString("base64")}`:x.Authorization=`token ${W}`,{headers:x}):x}function zt(U,x){const T=U.baseUrl??`https://${U.host}`;try{const[W,nt,dt,Et,_t,Jt,...qt]=x.replace(T,"").split("/"),ye=qt.join("/").replace(/^\//,"");return{url:T,owner:nt,name:dt,ref:Jt,path:ye}}catch(W){throw new Error(`Incorrect URL: ${x}, ${W}`)}}class ee{config;static factory=({config:x})=>{const W=(x.getOptionalConfigArray("integrations.gitea")??[]).map(nt=>Qt(nt));return(0,n.oS)(W.map(nt=>new ee(nt)),nt=>nt.config.host)};constructor(x){this.config=x}get type(){return"gitea"}get title(){return this.config.host}resolveUrl(x){return(0,n.ku)(x)}resolveEditUrl(x){return jt(this.config,x)}}function de(U){const x=U.getString("host"),T=U.getOptionalString("token"),W=U.getOptionalString("apiKey");if(!(0,n.HO)(x))throw new Error(`Invalid Harness Code integration config, '${x}' is not a valid host`);return{host:x,apiKey:W,token:T}}function Re(U,x){const T=je(U,x);return`${T.baseUrl}/ng/account/${T.accountId}/module/code${T.orgName!==""?`/orgs/${T.orgName}`:""}${T.projectName!==""?`/projects/${T.projectName}`:""}/repos/${T.repoName}/files/${T.branch}/~/${T.path}`}function Ae(U,x){const T=je(U,x);return`${T.baseUrl}/gateway/code/api/v1/repos/${T.accountId}/${T.orgName}${T.projectName!==""?`/${T.projectName}/`:"/"}${T.repoName}/+/raw/${T.path}?routingId=${T.accountId}&git_ref=refs/heads/${T.refString}`}function Qe(U,x){const T=je(U,x);return`${T.baseUrl}/gateway/code/api/v1/repos/${T.accountId}/${T.orgName}${T.projectName!==""?`/${T.projectName}/`:"/"}${T.repoName}/+/archive/${T.branch}.zip?routingId=${T.accountId}`}function ze(U,x){const T=je(U,x);return`${T.baseUrl}/gateway/code/api/v1/repos/${T.accountId}/${T.orgName}${T.projectName!==""?`/${T.projectName}/`:"/"}${T.repoName}/+/content?routingId=${T.accountId}&include_commit=true&git_ref=refs/heads/${T.branch}`}function en(U){const x={},{token:T,apiKey:W}=U;return W?x["x-api-key"]=W:T&&(x.Authorization=`Bearer ${T}`),{headers:x}}function je(U,x){const T=`https://${U.host}`;try{const W=new URL(x),nt=W.pathname.split("/").filter(ie=>ie!==""),dt=W.pathname.split("/"),Et=nt.findIndex(ie=>ie==="account")+1,_t=nt[Et],Jt=nt.findIndex(ie=>ie==="orgs"),qt=Jt!==-1?nt[Jt+1]:"",ye=nt.findIndex(ie=>ie==="projects"),Ht=ye!==-1?nt[ye+1]:"",oe=nt.findIndex(ie=>ie==="repos")+1,ne=nt[oe],$e=dt.slice(dt.findIndex(ie=>ie==="files"||ie==="edit")+1),Ne=$e.findIndex(ie=>ie==="~"),Je=$e.slice(0,Ne).join("/"),nn=Ne!==-1?$e.slice(Ne+1).join("/").replace(/^\//,""):"";return{baseUrl:T,accountId:_t,orgName:qt,projectName:Ht,refString:Je,path:nn,repoName:ne,refDashStr:$e.slice(0,Ne).join("-"),branch:Ne!==-1?$e.slice(0,Ne).join("/"):$e.join("/")}}catch(W){throw new Error(`Incorrect URL: ${x}, ${W}`)}}class Ue{config;static factory=({config:x})=>{const W=(x.getOptionalConfigArray("integrations.harness")??[]).map(nt=>de(nt));return(0,n.oS)(W.map(nt=>new Ue(nt)),nt=>nt.config.host)};constructor(x){this.config=x}get type(){return"harness"}get title(){return this.config.host}resolveUrl(x){return(0,n.ku)(x)}resolveEditUrl(x){return Re(this.config,x)}}class We{byType;static fromConfig(x){return new We({awsS3:v.factory({config:x}),awsCodeCommit:h.factory({config:x}),azure:I.factory({config:x}),bitbucket:ht.factory({config:x}),bitbucketCloud:Q.factory({config:x}),bitbucketServer:st.factory({config:x}),gerrit:it.factory({config:x}),github:Ot.U.factory({config:x}),gitlab:le.factory({config:x}),gitea:ee.factory({config:x}),harness:Ue.factory({config:x})})}constructor(x){this.byType=x}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(x=>x.list())}byUrl(x){let T=Object.values(this.byType).map(W=>W.byUrl(x)).filter(Boolean);if(T.length>1){const W=T.filter(nt=>!(nt instanceof ht));W.length!==0&&(T=W)}return T[0]}byHost(x){return Object.values(this.byType).map(T=>T.byHost(x)).find(Boolean)}resolveUrl(x){const T=this.byUrl(x.base);return T?T.resolveUrl(x):(0,n.ku)(x)}resolveEditUrl(x){const T=this.byUrl(x);return T?T.resolveEditUrl(x):x}}var me=t(55309);class He{static fromConfig(x){return We.fromConfig(x)}}const Ze=(0,me.y)({id:"integration.scmintegrations"})},36021:(z,P,t)=>{"use strict";t.d(P,{U:()=>c,F:()=>h});var n=t(59869),o=t(45250);const l="github.com",y="https://api.github.com",v="https://raw.githubusercontent.com";function g(E){const p=E.getOptionalString("host")??l;let m=E.getOptionalString("apiBaseUrl"),A=E.getOptionalString("rawBaseUrl");const i=E.getOptionalString("token")?.trim(),C=E.getOptionalConfigArray("apps")?.map(f=>({appId:f.getNumber("appId"),clientId:f.getString("clientId"),clientSecret:f.getString("clientSecret"),webhookSecret:f.getString("webhookSecret"),privateKey:f.getString("privateKey"),allowedInstallationOwners:f.getOptionalStringArray("allowedInstallationOwners")}));if(!(0,n.HO)(p))throw new Error(`Invalid GitHub integration config, '${p}' is not a valid host`);return m?m=(0,o.trimEnd)(m,"/"):p===l&&(m=y),A?A=(0,o.trimEnd)(A,"/"):p===l&&(A=v),{host:p,apiBaseUrl:m,rawBaseUrl:A,token:i,apps:C}}function u(E){const p=E.map(g);return p.some(m=>m.host===l)||p.push({host:l,apiBaseUrl:y,rawBaseUrl:v}),p}class c{integrationConfig;static factory=({config:p})=>{const m=u(p.getOptionalConfigArray("integrations.github")??[]);return(0,n.oS)(m.map(A=>new c(A)),A=>A.config.host)};constructor(p){this.integrationConfig=p}get type(){return"github"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(p){return h((0,n.ku)(p),"tree")}resolveEditUrl(p){return h(p,"edit")}parseRateLimitInfo(p){return{isRateLimited:p.status===429||p.status===403&&p.headers.get("x-ratelimit-remaining")==="0"}}}function h(E,p){return E.replace(/\/\/([^/]+)\/([^/]+)\/([^/]+)\/(blob|tree|edit)\//,(m,A,i,C)=>`//${A}/${i}/${C}/${p}/`)}},59869:(z,P,t)=>{"use strict";t.d(P,{AY:()=>g,HO:()=>v,ku:()=>c,oS:()=>u});var n=t(52536),o=t.n(n),l=t(45250),y=t.n(l);function v(E){const p=new URL("http://example.com");return p.host=E,p.host===E}function g(E){try{return new URL(E),!0}catch{return!1}}function u(E,p){return{list(){return E},byUrl(m){try{const A=typeof m=="string"?new URL(m):m;return E.find(i=>p(i)===A.host)}catch{return}},byHost(m){return E.find(A=>p(A)===m)}}}function c(E){const{url:p,base:m,lineNumber:A}=E;try{return new URL(p),p}catch{}let i;if(p.startsWith("/")){const{href:C,filepath:f}=o()(m);i=new URL(C);const O=(0,l.trimEnd)(i.pathname.substring(0,i.pathname.length-f.length),"/");i.pathname=`${O}${p}`}else i=new URL(p,m);return i.search=new URL(m).search,A&&(i.hash=`L${A}`),i.toString()}function h(E){beforeAll(()=>E.listen({onUnhandledRequest:"error"})),afterAll(()=>E.close()),afterEach(()=>E.resetHandlers())}},33911:(z,P,t)=>{"use strict";var n={};t.r(n),t.d(n,{TechDocsPlugin:()=>g.Ju});var o=t(31085),l=t(14041),y=t(25873),v=t(18690),g=t(69954),u=t(85920),c=t(72020),h=t(99730),E=t(64947),p=t(12173),m=t(22020),A=t(68146),i=t(73970);function C({children:r}){return(0,v.Ri)()?(0,o.jsx)(o.Fragment,{children:r}):(0,o.jsx)(v.fS,{children:r})}const f=()=>(0,o.jsx)(p.M,{status:"404",statusMessage:"PAGE NOT FOUND"}),O=({step:r,error:e})=>{let s="";return r==="load-config"?s=`The configuration failed to load, someone should have a look at this error: ${e.message}`:r==="load-chunk"&&(s=`Lazy loaded chunk failed to load, try to reload the page: ${e.message}`),(0,o.jsx)(C,{children:(0,o.jsx)(p.M,{statusMessage:s,stack:e.stack})})},S=({error:r,resetError:e,plugin:s})=>(0,o.jsx)(m.b,{title:`Error in ${s?.getId()}`,defaultExpanded:!0,error:r,children:(0,o.jsx)(E.A,{variant:"outlined",onClick:e,children:"Retry"})}),I={Progress:A.k,Router:i.Kd,NotFoundErrorPage:f,BootErrorPage:O,ErrorBoundaryFallback:S},D="Invalid discovery URL pattern,";class w{parts;static compile(e){const s=e.split(/\{\{\s*pluginId\s*\}\}/),a=s.join("pluginId");let d;try{d=new URL(a)}catch{throw new Error(`${D} URL '${a}' is invalid`)}if(d.hash)throw new Error(`${D} URL must not have a hash`);if(d.search)throw new Error(`${D} URL must not have a query`);if(a.endsWith("/"))throw new Error(`${D} URL must not end with a slash`);return new w(s)}constructor(e){this.parts=e}async getBaseUrl(e){return this.parts.join(encodeURIComponent(e))}}var $=t(96403),H=t.n($);class G{isClosed=!1;terminatingError;observable=new(H())(e=>this.isClosed?(this.terminatingError?e.error(this.terminatingError):e.complete(),()=>{}):(this.subscribers.add(e),()=>{this.subscribers.delete(e)}));subscribers=new Set;[Symbol.observable](){return this}get closed(){return this.isClosed}next(e){if(this.isClosed)throw new Error("PublishSubject is closed");this.subscribers.forEach(s=>s.next(e))}error(e){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.terminatingError=e,this.subscribers.forEach(s=>s.error(e))}complete(){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.subscribers.forEach(e=>e.complete())}subscribe(e,s,a){const d=typeof e=="function"?{next:e,error:s,complete:a}:e;return this.observable.subscribe(d)}}class F{isClosed;currentValue;terminatingError;observable;constructor(e){this.isClosed=!1,this.currentValue=e,this.terminatingError=void 0,this.observable=new(H())(s=>this.isClosed?(this.terminatingError?s.error(this.terminatingError):s.complete(),()=>{}):(s.next(this.currentValue),this.subscribers.add(s),()=>{this.subscribers.delete(s)}))}subscribers=new Set;[Symbol.observable](){return this}get closed(){return this.isClosed}next(e){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.currentValue=e,this.subscribers.forEach(s=>s.next(e))}error(e){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.terminatingError=e,this.subscribers.forEach(s=>s.error(e))}complete(){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.subscribers.forEach(e=>e.complete())}subscribe(e,s,a){const d=typeof e=="function"?{next:e,error:s,complete:a}:e;return this.observable.subscribe(d)}}class Q{subject=new G;post(e){this.subject.next(e)}alert$(){return this.subject}}class B{captureEvent(e){}}class V{alertApi;errorApi;constructor(e,s){this.alertApi=e,this.errorApi=s}post(e,s){return s?.hidden||this.alertApi.post({message:e.message,severity:"error"}),this.errorApi.post(e,s)}error$(){return this.errorApi.error$()}}class J{subject=new G;post(e,s){this.subject.next({error:e,context:s})}error$(){return this.subject}}class rt{static forward(e,s){window.addEventListener("unhandledrejection",a=>{e.post(a.reason,s)})}}const lt=new Map;class ht{namespace;errorApi;constructor(e,s){this.namespace=e,this.errorApi=s,this.subscribers=new Set,this.observable=new(H())(a=>(this.subscribers.add(a),()=>{this.subscribers.delete(a)}))}static hasSubscribed=!1;static create(e){return new ht(e.namespace??"",e.errorApi)}static addStorageEventListener(){window.addEventListener("storage",e=>{for(const[s,a]of lt.entries())e.key?.startsWith(s)&&a.handleStorageChange(e.key)})}get(e){return this.snapshot(e).value}snapshot(e){let s,a="absent";try{const d=localStorage.getItem(this.getKeyName(e));d&&(s=JSON.parse(d,(R,L)=>(typeof L=="object"&&L!==null&&Object.freeze(L),L)),a="present")}catch{this.errorApi.post(new Error(`Error when parsing JSON config from storage for: ${e}`))}return{key:e,value:s,presence:a}}forBucket(e){const s=`${this.namespace}/${e}`;return lt.has(s)||lt.set(s,new ht(s,this.errorApi)),lt.get(s)}async set(e,s){localStorage.setItem(this.getKeyName(e),JSON.stringify(s)),this.notifyChanges(e)}async remove(e){localStorage.removeItem(this.getKeyName(e)),this.notifyChanges(e)}observe$(e){return ht.hasSubscribed||(ht.addStorageEventListener(),ht.hasSubscribed=!0),this.observable.filter(({key:s})=>s===e)}handleStorageChange(e){if(!e?.startsWith(this.namespace))return;const s=e?.slice(`${this.namespace}/`.length);s.includes("/")||this.notifyChanges(decodeURIComponent(s))}getKeyName(e){return`${this.namespace}/${encodeURIComponent(e)}`}notifyChanges(e){const s=this.snapshot(e);for(const a of this.subscribers)a.next(s)}subscribers;observable}function Ct(r){let e=r.baseImplementation||t.g.fetch;const s=[r.middleware??[]].flat().reverse();for(const a of s)e=a.apply(e);return{fetch:e}}class Rt{identityApi;allowUrl;headerName;headerValue;static create(e){const s=st(e),a=e.header?.name||"authorization",d=e.header?.value||(R=>`Bearer ${R}`);return new Rt(e.identityApi,s,a,d)}constructor(e,s,a,d){this.identityApi=e,this.allowUrl=s,this.headerName=a,this.headerValue=d}apply(e){return async(s,a)=>{const d=new Request(s,a),{token:R}=await this.identityApi.getCredentials();return d.headers.get(this.headerName)||typeof R!="string"||!R||!this.allowUrl(d.url)?e(s,a):(d.headers.set(this.headerName,this.headerValue(R)),e(d))}}}function st(r){return r.allowUrl?r.allowUrl:r.urlPrefixAllowlist?at(r.urlPrefixAllowlist):r.config?at([r.config.getString("backend.baseUrl")]):()=>!1}function at(r){const e=r.map(s=>s.replace(/\/$/,""));return s=>e.some(a=>s===a||s.startsWith(`${a}/`))}function ot(r,e){return!e||e==="/"?r:`${r.replace(/\/$/,"")}/${e.replace(/^\//,"")}`}class ft{discoveryApi;constructor(e){this.discoveryApi=e}apply(e){return async(s,a)=>{const d=new Request(s,a),R="plugin://";if(!d.url.startsWith(R))return e(s,a);const{hostname:L,pathname:M,search:K,hash:_,username:et,password:mt}=new URL(`http://${d.url.substring(R.length)}`);let ut=await this.discoveryApi.getBaseUrl(L);if(et||mt){const Dt=new URL(ut),Vt=`${et}${mt?`:${mt}`:""}@`;ut=`${Dt.protocol}//${Vt}${Dt.host}${Dt.pathname}`}const vt=`${ot(ut,M)}${K}${_}`;return e(vt,typeof s=="string"||At(s)?a:s)}}}function At(r){return typeof r=="object"&&r?.constructor===URL}class yt{static resolvePluginProtocol(e){return new ft(e.discoveryApi)}static injectIdentityAuth(e){return Rt.create(e)}constructor(){}}function St(r,e){for(const s of e)if(!r.has(s))return!1;return!0}function Tt(r,...e){const s=new Set(r);for(const a of e)for(const d of a)s.add(d);return s}class wt{requests=[];subject=new F(this.getCurrentPending());request(e){return new Promise((s,a)=>{this.requests.push({scopes:e,resolve:s,reject:a}),this.subject.next(this.getCurrentPending())})}resolve(e,s){this.requests=this.requests.filter(a=>St(e,a.scopes)?(a.resolve(s),!1):!0),this.subject.next(this.getCurrentPending())}reject(e){this.requests.forEach(s=>s.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((s,a)=>Tt(s,a.scopes),this.requests[0].scopes);return{scopes:e,resolve:s=>{e&&this.resolve(e,s)},reject:s=>{e&&this.reject(s)}}}}class $t{subject=new F([]);currentRequests=[];handlerCount=0;createAuthRequester(e){const s=new wt,a=this.handlerCount;return this.handlerCount++,s.pending().subscribe({next:d=>{const R=this.currentRequests.slice(),L=this.makeAuthRequest(d,e);L?R[a]=L:delete R[a],this.currentRequests=R,this.subject.next(R.filter(Boolean))}}),d=>s.request(d)}makeAuthRequest(e,s){const{scopes:a}=e;if(a)return{provider:s.provider,trigger:async()=>{const d=await s.onAuthRequest(a);e.resolve(d)},reject:()=>{const d=new Error("Login failed, rejected by user");d.name="RejectedError",e.reject(d)}}}authRequest$(){return this.subject}}function Pt(r){return new Promise((e,s)=>{const a=r.width||500,d=r.height||700,R=window.screen.width/2-a/2,L=window.screen.height/2-d/2,M=window.open(r.url,r.name,`menubar=no,location=no,resizable=no,scrollbars=no,status=no,width=${a},height=${d},top=${L},left=${R}`);let K="";if(!M||typeof M.closed>"u"||M.closed){const ut=new Error("Failed to open auth popup.");ut.name="PopupRejectedError",s(ut);return}const _=ut=>{if(ut.source!==M||ut.origin!==r.origin)return;const{data:vt}=ut;if(vt.type==="config_info"){K=vt.targetOrigin;return}if(vt.type!=="authorization_response")return;const Dt=vt;if("error"in Dt){const Vt=new Error(Dt.error.message);Vt.name=Dt.error.name,s(Vt)}else e(Dt.response);mt()},et=setInterval(()=>{if(M.closed){const ut=`Login failed, ${K&&K!==window.location.origin?`Incorrect app origin, expected ${K}`:"popup was closed"}`,vt=new Error(ut);vt.name="PopupClosedError",s(vt),mt()}},100);function mt(){window.removeEventListener("message",_),clearInterval(et)}window.addEventListener("message",_)})}let k=!1;function Z(r){return[...r].join(" ")}class ct{discoveryApi;environment;provider;joinScopesFunc;authRequester;sessionTransform;enableExperimentalRedirectFlow;popupOptions;constructor(e){const{configApi:s,discoveryApi:a,environment:d,provider:R,joinScopes:L=Z,oauthRequestApi:M,sessionTransform:K=et=>et,popupOptions:_}=e;!k&&!s&&(console.warn("DEPRECATION WARNING: Authentication providers require a configApi instance to configure the authentication flow. Please provide one to the authentication provider constructor."),k=!0),this.enableExperimentalRedirectFlow=s?s.getOptionalBoolean("enableExperimentalRedirectFlow")??!1:!1,this.authRequester=M.createAuthRequester({provider:R,onAuthRequest:async et=>this.enableExperimentalRedirectFlow?this.executeRedirect(et):this.showPopup(et)}),this.discoveryApi=a,this.environment=d,this.provider=R,this.joinScopesFunc=L,this.sessionTransform=K,this.popupOptions=_}async createSession(e){return e.instantPopup?this.enableExperimentalRedirectFlow?this.executeRedirect(e.scopes):this.showPopup(e.scopes):this.authRequester(e.scopes)}async refreshSession(e){const s=await fetch(await this.buildUrl("/refresh",{optional:!0,...e&&{scope:this.joinScopesFunc(e)}}),{headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(d=>{throw new Error(`Auth refresh request failed, ${d}`)});if(!s.ok){const d=new Error(`Auth refresh request failed, ${s.statusText}`);throw d.status=s.status,d}const a=await s.json();if(a.error){const d=new Error(a.error.message);throw a.error.name&&(d.name=a.error.name),d}return await this.sessionTransform(a)}async removeSession(){const e=await fetch(await this.buildUrl("/logout"),{method:"POST",headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(s=>{throw new Error(`Logout request failed, ${s}`)});if(!e.ok){const s=new Error(`Logout request failed, ${e.statusText}`);throw s.status=e.status,s}}async showPopup(e){const s=this.joinScopesFunc(e),a=await this.buildUrl("/start",{scope:s,origin:window.location.origin,flow:"popup"}),d=this.popupOptions?.size?.fullscreen?window.screen.width:this.popupOptions?.size?.width||450,R=this.popupOptions?.size?.fullscreen?window.screen.height:this.popupOptions?.size?.height||730,L=await Pt({url:a,name:`${this.provider.title} Login`,origin:new URL(a).origin,width:d,height:R});return await this.sessionTransform(L)}async executeRedirect(e){const s=this.joinScopesFunc(e);return window.location.href=await this.buildUrl("/start",{scope:s,origin:window.location.origin,redirectUrl:window.location.href,flow:"redirect"}),new Promise(()=>{})}async buildUrl(e,s){const a=await this.discoveryApi.getBaseUrl("auth"),d=this.buildQueryString({...s,env:this.environment});return`${a}/${this.provider.id}${e}${d}`}buildQueryString(e){if(!e)return"";const s=Object.entries(e).map(([a,d])=>{if(typeof d=="string")return`${encodeURIComponent(a)}=${encodeURIComponent(d)}`;if(d)return encodeURIComponent(a)}).filter(Boolean).join("&");return s?`?${s}`:""}}function xt(r,e){for(const s of e)if(!r.has(s))return!1;return!0}class gt{options;constructor(e){this.options=e}sessionExistsAndHasScope(e,s){if(!e)return!1;if(!s||this.options.sessionScopes===void 0)return!0;const a=this.options.sessionScopes(e);return xt(a,s)}getExtendedScope(e,s){const a=new Set(this.options.defaultScopes);if(e&&this.options.sessionScopes!==void 0){const d=this.options.sessionScopes(e);for(const R of d)a.add(R)}if(s)for(const d of s)a.add(d);return a}}var it=t(55309),Ot;(function(r){r.SignedIn="SignedIn",r.SignedOut="SignedOut"})(Ot||(Ot={}));const Lt=(0,it.y)({id:"core.auth.google"}),Ft=(0,it.y)({id:"core.auth.github"}),Mt=(0,it.y)({id:"core.auth.okta"}),Gt=(0,it.y)({id:"core.auth.gitlab"}),ue=(0,it.y)({id:"core.auth.microsoft"}),le=(0,it.y)({id:"core.auth.onelogin"}),he=(0,it.y)({id:"core.auth.bitbucket"}),Qt=(0,it.y)({id:"core.auth.bitbucket-server"}),Xt=(0,it.y)({id:"core.auth.atlassian"}),jt=(0,it.y)({id:"core.auth.vmware-cloud"});class Zt{subject=new F(Ot.SignedOut);signedIn=!1;setIsSignedIn(e){this.signedIn!==e&&(this.signedIn=e,this.subject.next(this.signedIn?Ot.SignedIn:Ot.SignedOut))}sessionState$(){return this.subject}}class pe{connector;helper;sessionScopesFunc;sessionShouldRefreshFunc;stateTracker=new Zt;refreshPromise;currentSession;constructor(e){const{connector:s,defaultScopes:a=new Set,sessionScopes:d,sessionShouldRefresh:R}=e;this.connector=s,this.sessionScopesFunc=d,this.sessionShouldRefreshFunc=R,this.helper=new gt({sessionScopes:d,defaultScopes:a})}async getSession(e){if(this.helper.sessionExistsAndHasScope(this.currentSession,e.scopes)){if(!this.sessionShouldRefreshFunc(this.currentSession))return this.currentSession;try{const a=await this.collapsedSessionRefresh(e.scopes),d=this.sessionScopesFunc(this.currentSession),R=this.sessionScopesFunc(a);return xt(R,d)&&(this.currentSession=a),a}catch(a){if(e.optional)return;throw a}}if(!this.currentSession&&!e.instantPopup)try{const s=await this.collapsedSessionRefresh(e.scopes);return this.currentSession=s,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 s=await this.refreshPromise;return this.stateTracker.setIsSignedIn(!0),s}finally{delete this.refreshPromise}}}const Be={id:"oauth2",title:"Your Identity Provider",icon:()=>null};class q{static create(e){const{configApi:s,discoveryApi:a,environment:d="development",provider:R=Be,oauthRequestApi:L,defaultScopes:M=[],scopeTransform:K=ut=>ut,popupOptions:_}=e,et=new ct({configApi:s,discoveryApi:a,environment:d,provider:R,oauthRequestApi:L,sessionTransform({backstageIdentity:ut,...vt}){const Dt={...vt,providerInfo:{idToken:vt.providerInfo.idToken,accessToken:vt.providerInfo.accessToken,scopes:q.normalizeScopes(K,vt.providerInfo.scope),expiresAt:vt.providerInfo.expiresInSeconds?new Date(Date.now()+vt.providerInfo.expiresInSeconds*1e3):void 0}};return ut&&(Dt.backstageIdentity={token:ut.token,identity:ut.identity,expiresAt:ut.expiresInSeconds?new Date(Date.now()+ut.expiresInSeconds*1e3):void 0}),Dt},popupOptions:_}),mt=new pe({connector:et,defaultScopes:new Set(M),sessionScopes:ut=>ut.providerInfo.scopes,sessionShouldRefresh:ut=>{let vt=1/0;return ut.providerInfo?.expiresAt&&(vt=Math.min(vt,(ut.providerInfo.expiresAt.getTime()-Date.now())/1e3)),ut.backstageIdentity?.expiresAt&&(vt=Math.min(vt,(ut.backstageIdentity.expiresAt.getTime()-Date.now())/1e3)),vt<60*5}});return new q({sessionManager:mt,scopeTransform:K})}sessionManager;scopeTransform;constructor(e){this.sessionManager=e.sessionManager,this.scopeTransform=e.scopeTransform}async signIn(){await this.getAccessToken()}async signOut(){await this.sessionManager.removeSession()}sessionState$(){return this.sessionManager.sessionState$()}async getAccessToken(e,s){const a=q.normalizeScopes(this.scopeTransform,e);return(await this.sessionManager.getSession({...s,scopes:a}))?.providerInfo.accessToken??""}async getIdToken(e={}){return(await this.sessionManager.getSession({...e,scopes:new Set(["openid"])}))?.providerInfo.idToken??""}async getBackstageIdentity(e={}){return(await this.sessionManager.getSession(e))?.backstageIdentity}async getProfile(e={}){return(await this.sessionManager.getSession(e))?.profile}static normalizeScopes(e,s){if(!s)return new Set;const a=Array.isArray(s)?s:s.split(/[\s|,]/).filter(Boolean);return new Set(e(a))}}const zt={id:"google",title:"Google",icon:()=>null},ee="https://www.googleapis.com/auth/";class de{static create(e){const{configApi:s,discoveryApi:a,oauthRequestApi:d,environment:R="development",provider:L=zt,defaultScopes:M=["openid",`${ee}userinfo.email`,`${ee}userinfo.profile`]}=e;return q.create({configApi:s,discoveryApi:a,oauthRequestApi:d,provider:L,environment:R,defaultScopes:M,scopeTransform(K){return K.map(_=>_==="openid"?_:_==="profile"||_==="email"?`${ee}userinfo.${_}`:_.startsWith(ee)?_:`${ee}${_}`)}})}}const Re={id:"microsoft",title:"Microsoft",icon:()=>null};class Ae{oauth2;configApi;environment;provider;oauthRequestApi;discoveryApi;scopeTransform;static MicrosoftGraphID="00000003-0000-0000-c000-000000000000";static create(e){return new Ae(e)}constructor(e){const{configApi:s,environment:a="development",provider:d=Re,oauthRequestApi:R,discoveryApi:L,defaultScopes:M=["openid","offline_access","profile","email","User.Read"],scopeTransform:K=_=>_.concat("offline_access")}=e;this.configApi=s,this.environment=a,this.provider=d,this.oauthRequestApi=R,this.discoveryApi=L,this.scopeTransform=K,this.oauth2={[Ae.MicrosoftGraphID]:q.create({configApi:this.configApi,discoveryApi:this.discoveryApi,oauthRequestApi:this.oauthRequestApi,provider:this.provider,environment:this.environment,scopeTransform:this.scopeTransform,defaultScopes:M})}}microsoftGraph(){return this.oauth2[Ae.MicrosoftGraphID]}static resourceForScopes(e){const s=[...new Set(e.split(" ").map(Ae.resourceForScope).filter(d=>d!=="openid"))];if(s.length>1)return Promise.reject(new Error(`Requested access token with scopes from multiple Azure resources: ${s.join(", ")}. Access tokens can only have a single audience.`));const a=s[0]??Ae.MicrosoftGraphID;return Promise.resolve(a)}static resourceForScope(e){const s=e.match(/^(?<resourceURI>.*)\/(?<scp>[^\/]*)$/)?.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,s){const a=e===void 0?Ae.MicrosoftGraphID:await Ae.resourceForScopes(Array.isArray(e)?e.join(" "):e);return a in this.oauth2||(this.oauth2[a]=q.create({configApi:this.configApi,discoveryApi:this.discoveryApi,oauthRequestApi:this.oauthRequestApi,provider:this.provider,environment:this.environment,scopeTransform:this.scopeTransform})),this.oauth2[a].getAccessToken(e,s)}getIdToken(e){return this.microsoftGraph().getIdToken(e)}getProfile(e){return this.microsoftGraph().getProfile(e)}getBackstageIdentity(e){return this.microsoftGraph().getBackstageIdentity(e)}signIn(){return this.microsoftGraph().signIn()}signOut(){return this.microsoftGraph().signOut()}sessionState$(){return this.microsoftGraph().sessionState$()}}const Qe={id:"github",title:"GitHub",icon:()=>null};class ze{static create(e){const{configApi:s,discoveryApi:a,environment:d="development",provider:R=Qe,oauthRequestApi:L,defaultScopes:M=["read:user"]}=e;return q.create({configApi:s,discoveryApi:a,oauthRequestApi:L,provider:R,environment:d,defaultScopes:M})}}const en={id:"okta",title:"Okta",icon:()=>null},je=new Set(["openid","profile","email","phone","address","groups","offline_access"]),Ue="okta.";class We{static create(e){const{configApi:s,discoveryApi:a,environment:d="development",provider:R=en,oauthRequestApi:L,defaultScopes:M=["openid","email","profile","offline_access"]}=e;return q.create({configApi:s,discoveryApi:a,oauthRequestApi:L,provider:R,environment:d,defaultScopes:M,scopeTransform(K){return K.map(_=>je.has(_)||_.startsWith(Ue)?_:`${Ue}${_}`)}})}}const me={id:"gitlab",title:"GitLab",icon:()=>null};class He{static create(e){const{configApi:s,discoveryApi:a,environment:d="development",provider:R=me,oauthRequestApi:L,defaultScopes:M=["read_user"]}=e;return q.create({configApi:s,discoveryApi:a,oauthRequestApi:L,provider:R,environment:d,defaultScopes:M})}}const Ze={id:"onelogin",title:"onelogin",icon:()=>null},U=new Set(["openid","profile","email","phone","address","groups","offline_access"]),x="onelogin.";class T{static create(e){const{configApi:s,discoveryApi:a,environment:d="development",provider:R=Ze,oauthRequestApi:L}=e;return q.create({configApi:s,discoveryApi:a,oauthRequestApi:L,provider:R,environment:d,defaultScopes:["openid","email","profile","offline_access"],scopeTransform(M){return M.map(K=>U.has(K)||K.startsWith(x)?K:`${x}${K}`)}})}}const W={id:"bitbucket",title:"Bitbucket",icon:()=>null};class nt{static create(e){const{configApi:s,discoveryApi:a,environment:d="development",provider:R=W,oauthRequestApi:L,defaultScopes:M=["account"]}=e;return q.create({configApi:s,discoveryApi:a,oauthRequestApi:L,provider:R,environment:d,defaultScopes:M})}}const dt={id:"bitbucketServer",title:"Bitbucket Server",icon:()=>null};class Et{static create(e){const{configApi:s,discoveryApi:a,environment:d="development",provider:R=dt,oauthRequestApi:L,defaultScopes:M=["PROJECT_ADMIN"]}=e;return q.create({configApi:s,discoveryApi:a,oauthRequestApi:L,provider:R,environment:d,defaultScopes:M})}}const _t={id:"atlassian",title:"Atlassian",icon:()=>null};class Jt{static create(e){const{configApi:s,discoveryApi:a,environment:d="development",provider:R=_t,oauthRequestApi:L}=e;return q.create({configApi:s,discoveryApi:a,oauthRequestApi:L,provider:R,environment:d})}}const qt={id:"vmwareCloudServices",title:"VMware Cloud",icon:()=>null};class ye{static create(e){const{configApi:s,discoveryApi:a,oauthRequestApi:d,environment:R="development",provider:L=qt,defaultScopes:M=["openid"]}=e;return q.create({configApi:s,discoveryApi:a,oauthRequestApi:d,provider:L,environment:R,defaultScopes:M})}}var Ht=t(12935),oe=t(57405),ne=t(65461),$e=t(36017),Ne=t(99303),Je=t(39837),nn=t(38932),ie=t(70795),ce=t(16009);const Se=(0,it.y)({id:"core.oauthrequest"});var Nn=t(96824),Kn=t(70835),kn=t(10288),zn=t.n(kn),Ls=t(52964),Yt=t(46195),Xe=t(54241);const sn=Yt.z.lazy(()=>Yt.z.object({rule:Yt.z.string(),resourceType:Yt.z.string(),params:Yt.z.record(Yt.z.any()).optional()}).or(Yt.z.object({anyOf:Yt.z.array(sn).nonempty()})).or(Yt.z.object({allOf:Yt.z.array(sn).nonempty()})).or(Yt.z.object({not:sn}))),Hn=Yt.z.object({result:Yt.z.literal(Xe.b.ALLOW).or(Yt.z.literal(Xe.b.DENY))}),Vn=Yt.z.union([Yt.z.object({result:Yt.z.literal(Xe.b.ALLOW).or(Yt.z.literal(Xe.b.DENY))}),Yt.z.object({result:Yt.z.literal(Xe.b.CONDITIONAL),pluginId:Yt.z.string(),resourceType:Yt.z.string(),conditions:sn})]),Gn=(r,e)=>Yt.z.object({items:Yt.z.array(Yt.z.intersection(Yt.z.object({id:Yt.z.string()}),r)).refine(s=>s.length===e.size&&s.every(({id:a})=>e.has(a)),{message:"Items in response do not match request"})});class An{enabled;discovery;constructor(e){this.discovery=e.discovery,this.enabled=e.config.getOptionalBoolean("permission.enabled")??!1}async authorize(e,s){return this.makeRequest(e,Hn,s)}async authorizeConditional(e,s){return this.makeRequest(e,Vn,s)}async makeRequest(e,s,a){if(!this.enabled)return e.map(et=>({result:Xe.b.ALLOW}));const d={items:e.map(et=>({id:Ls.A(),...et}))},R=await this.discovery.getBaseUrl("permission"),L=await zn()(`${R}/authorize`,{method:"POST",body:JSON.stringify(d),headers:{...this.getAuthorizationHeader(a?.token),"content-type":"application/json"}});if(!L.ok)throw await Kn.o.fromResponse(L);const M=await L.json(),_=Gn(s,new Set(d.items.map(({id:et})=>et))).parse(M).items.reduce((et,mt)=>(et[mt.id]=mt,et),{});return d.items.map(et=>_[et.id])}getAuthorizationHeader(e){return e?{Authorization:`Bearer ${e}`}:{}}}class dn{permissionClient;identityApi;constructor(e,s){this.permissionClient=e,this.identityApi=s}static create(e){const{config:s,discovery:a,identity:d}=e,R=new An({discovery:a,config:s});return new dn(R,d)}async authorize(e){return(await this.permissionClient.authorize([e],await this.identityApi.getCredentials()))[0]}}const Yn=[(0,Ht.b)({api:oe.I,deps:{configApi:ne.U},factory:({configApi:r})=>w.compile(`${r.getString("backend.baseUrl")}/api/{{ pluginId }}`)}),(0,Ht.b)({api:$e.k,deps:{},factory:()=>new Q}),(0,Ht.b)({api:Ne.c,deps:{},factory:()=>new B}),(0,Ht.b)({api:Je.m,deps:{alertApi:$e.k},factory:({alertApi:r})=>{const e=new V(r,new J);return rt.forward(e,{hidden:!1}),e}}),(0,Ht.b)({api:nn.F,deps:{errorApi:Je.m},factory:({errorApi:r})=>ht.create({errorApi:r})}),(0,Ht.b)({api:ie.a,deps:{configApi:ne.U,identityApi:ce.K,discoveryApi:oe.I},factory:({configApi:r,identityApi:e,discoveryApi:s})=>Ct({middleware:[yt.resolvePluginProtocol({discoveryApi:s}),yt.injectIdentityAuth({identityApi:e,config:r})]})}),(0,Ht.b)({api:Se,deps:{},factory:()=>new $t}),(0,Ht.b)({api:Lt,deps:{discoveryApi:oe.I,oauthRequestApi:Se,configApi:ne.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>de.create({configApi:s,discoveryApi:r,oauthRequestApi:e,environment:s.getOptionalString("auth.environment")})}),(0,Ht.b)({api:ue,deps:{discoveryApi:oe.I,oauthRequestApi:Se,configApi:ne.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>Ae.create({configApi:s,discoveryApi:r,oauthRequestApi:e,environment:s.getOptionalString("auth.environment")})}),(0,Ht.b)({api:Ft,deps:{discoveryApi:oe.I,oauthRequestApi:Se,configApi:ne.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>ze.create({configApi:s,discoveryApi:r,oauthRequestApi:e,defaultScopes:["read:user"],environment:s.getOptionalString("auth.environment")})}),(0,Ht.b)({api:Mt,deps:{discoveryApi:oe.I,oauthRequestApi:Se,configApi:ne.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>We.create({configApi:s,discoveryApi:r,oauthRequestApi:e,environment:s.getOptionalString("auth.environment")})}),(0,Ht.b)({api:Gt,deps:{discoveryApi:oe.I,oauthRequestApi:Se,configApi:ne.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>He.create({configApi:s,discoveryApi:r,oauthRequestApi:e,environment:s.getOptionalString("auth.environment")})}),(0,Ht.b)({api:le,deps:{discoveryApi:oe.I,oauthRequestApi:Se,configApi:ne.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>T.create({configApi:s,discoveryApi:r,oauthRequestApi:e,environment:s.getOptionalString("auth.environment")})}),(0,Ht.b)({api:he,deps:{discoveryApi:oe.I,oauthRequestApi:Se,configApi:ne.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>nt.create({configApi:s,discoveryApi:r,oauthRequestApi:e,defaultScopes:["account"],environment:s.getOptionalString("auth.environment")})}),(0,Ht.b)({api:Qt,deps:{discoveryApi:oe.I,oauthRequestApi:Se,configApi:ne.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>Et.create({configApi:s,discoveryApi:r,oauthRequestApi:e,defaultScopes:["REPO_READ"]})}),(0,Ht.b)({api:Xt,deps:{discoveryApi:oe.I,oauthRequestApi:Se,configApi:ne.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>Jt.create({configApi:s,discoveryApi:r,oauthRequestApi:e,environment:s.getOptionalString("auth.environment")})}),(0,Ht.b)({api:jt,deps:{discoveryApi:oe.I,oauthRequestApi:Se,configApi:ne.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>ye.create({configApi:s,discoveryApi:r,oauthRequestApi:e,environment:s.getOptionalString("auth.environment")})}),(0,Ht.b)({api:Nn.x,deps:{discovery:oe.I,identity:ce.K,config:ne.U},factory:({config:r,discovery:e,identity:s})=>dn.create({config:r,discovery:e,identity:s})})];var Qn=t(14451),Zn=t(27799),Jn=t(94389),xn=t(20947),un=t(20473),Xn=t(45917),_n=t(39347),qn=t(63309),ts=t(82451),es=t(85121),ns=t(17400),ss=t(42226),rs=t(69550),os=t(52755),as=t(89350),is=t(8911),Cn=t(33602),Pn=t(48108),cs=t(77225),ls=t(55700),ds=t(71865);const us={brokenImage:Zn.A,catalog:is.A,scaffolder:xn.A,techdocs:un.A,search:Xn.A,chat:_n.A,dashboard:qn.A,docs:ts.A,email:es.A,github:ss.A,group:Cn.A,help:rs.A,"kind:api":ns.A,"kind:component":as.A,"kind:domain":Qn.A,"kind:group":Cn.A,"kind:location":os.A,"kind:system":Jn.A,"kind:user":Pn.A,"kind:resource":ls.A,"kind:template":ds.A,user:Pn.A,warning:cs.A};var hs=t(58733),gs=t(55288),On=t(91360),fs=t(50868),ps=t(12285),ms=t(88714),ys=t(14360);ys.A.configure(r=>`v5-${r}`);const hn=(0,gs.A)({productionPrefix:"jss4-"});function bn(r){const{children:e,theme:s,noCssBaseline:a=!1}=r,d=s.getTheme("v4"),R=s.getTheme("v5");let L;a||(L=(0,o.jsx)(hs.Ay,{}));let M=(0,o.jsxs)(o.Fragment,{children:[L,e]});return d&&(M=(0,o.jsx)(On.Ay,{generateClassName:hn,children:(0,o.jsx)(fs.A,{theme:d,children:M})})),R&&(M=(0,o.jsx)(ps.A,{injectFirst:!0,children:(0,o.jsx)(ms.A,{theme:R,children:M})})),M}const rn={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 vs=t(98392),Es=t(56558);const De={wave:`url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='1368' height='400' fill='none'%3e%3cmask id='a' width='1368' height='401' x='0' y='0' maskUnits='userSpaceOnUse'%3e%3cpath fill='url(%23paint0_linear)' d='M437 116C223 116 112 0 112 0h1256v400c-82 0-225-21-282-109-112-175-436-175-649-175z'/%3e%3cpath fill='url(%23paint1_linear)' d='M1368 400V282C891-29 788 40 711 161 608 324 121 372 0 361v39h1368z'/%3e%3cpath fill='url(%23paint2_linear)' d='M1368 244v156H0V94c92-24 198-46 375 0l135 41c176 51 195 109 858 109z'/%3e%3cpath fill='url(%23paint3_linear)' d='M1252 400h116c-14-7-35-14-116-16-663-14-837-128-1013-258l-85-61C98 28 46 8 0 0v400h1252z'/%3e%3c/mask%3e%3cg mask='url(%23a)'%3e%3cpath fill='white' d='M-172-98h1671v601H-172z'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient id='paint0_linear' x1='602' x2='1093.5' y1='-960.5' y2='272' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint1_linear' x1='482' x2='480' y1='1058.5' y2='70.5' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint2_linear' x1='424' x2='446.1' y1='-587.5' y2='274.6' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint3_linear' x1='587' x2='349' y1='-1120.5' y2='341' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e")`,wave2:`url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='1368' height='400' fill='none'%3e%3cmask id='a' width='1764' height='479' x='-229' y='-6' maskUnits='userSpaceOnUse'%3e%3cpath fill='url(%23paint0_linear)' d='M0 400h1350C1321 336 525 33 179-2c-345-34-395 236-408 402H0z'/%3e%3cpath fill='url(%23paint1_linear)' d='M1378 177v223H0V217s219 75 327 52C436 246 717-35 965 45s254 144 413 132z'/%3e%3cpath fill='url(%23paint2_linear)' d='M26 400l-78-16c-170 205-44-6-137-30l-4-1 4 1 137 30c37-45 89-110 159-201 399-514-45 238 1176-50 275-65 354-39 91 267H26z'/%3e%3c/mask%3e%3cg mask='url(%23a)'%3e%3cpath fill='white' d='M0 0h1368v400H0z'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient id='paint0_linear' x1='431' x2='397.3' y1='-599' y2='372.8' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint1_linear' x1='236.5' x2='446.6' y1='-586' y2='381.5' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint2_linear' x1='851.8' x2='640.4' y1='-867.2' y2='363.7' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e")`,round:`url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='1368' height='400' fill='none'%3e%3cmask id='a' width='2269' height='1408' x='-610' y='-509' maskUnits='userSpaceOnUse'%3e%3ccircle cx='1212.8' cy='74.8' r='317.5' fill='url(%23paint0_linear)' transform='rotate(-52 1213 75)'/%3e%3ccircle cx='737.8' cy='445.8' r='317.5' fill='url(%23paint1_linear)' transform='rotate(-116 738 446)'/%3e%3ccircle cx='601.8' cy='52.8' r='418.6' fill='url(%23paint2_linear)' transform='rotate(-117 602 53)'/%3e%3ccircle cx='999.8' cy='364' r='389.1' fill='url(%23paint3_linear)' transform='rotate(31 1000 364)'/%3e%3cellipse cx='-109.2' cy='263.5' fill='url(%23paint4_linear)' rx='429.2' ry='465.8' transform='rotate(-85 -109 264)'/%3e%3c/mask%3e%3cg mask='url(%23a)'%3e%3cpath fill='white' d='M0 0h1368v400H0z'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient id='paint0_linear' x1='1301.2' x2='161.4' y1='-1879.7' y2='-969.6' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint1_linear' x1='826.2' x2='-313.6' y1='-1508.7' y2='-598.6' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint2_linear' x1='718.4' x2='-784.3' y1='-2524' y2='-1324.2' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint3_linear' x1='1108.2' x2='-288.6' y1='-2031.1' y2='-915.9' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint4_linear' x1='10.4' x2='-1626.5' y1='-2603.8' y2='-1399.5' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e")`},Fe={darkGrey:["#171717","#383838"],marineBlue:["#006D8F","#0049A1"],veryBlue:["#0027AF","#270094"],rubyRed:["#98002B","#8D1134"],toastyOrange:["#BE2200","#A41D00"],purpleSky:["#8912CA","#3E00EA"],eveningSea:["#00FFF2","#035355"],teal:["#005B4B"],pinkSea:["#C8077A","#C2297D"],greens:["#4BB8A5","#187656"]};function b(r){const{colors:e,shape:s,options:a}=r,R=`linear-gradient(90deg, ${(e.length===1?[e[0],e[0]]:e).join(", ")})`,L=`${s}, ${R}`,M=a?.fontColor??"#FFFFFF";return{colors:e,shape:s,backgroundImage:L,fontColor:M}}const j={home:b({colors:Fe.teal,shape:De.wave}),documentation:b({colors:Fe.pinkSea,shape:De.wave2}),tool:b({colors:Fe.purpleSky,shape:De.round}),service:b({colors:Fe.marineBlue,shape:De.wave}),website:b({colors:Fe.veryBlue,shape:De.wave}),library:b({colors:Fe.rubyRed,shape:De.wave}),other:b({colors:Fe.darkGrey,shape:De.wave}),app:b({colors:Fe.toastyOrange,shape:De.wave}),apis:b({colors:Fe.teal,shape:De.wave2}),card:b({colors:Fe.greens,shape:De.wave})},N=16,Y='"Helvetica Neue", Helvetica, Roboto, Arial, sans-serif',X="home",tt={htmlFontSize:N,fontFamily:Y,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 pt(r){const{palette:e,htmlFontSize:s=N,fontFamily:a=Y,defaultPageTheme:d=X,pageTheme:R=j,typography:L}=r;if(!R[d])throw new Error(`${d} is not defined in pageTheme.`);return tt.htmlFontSize=s,tt.fontFamily=a,{palette:e,typography:L??tt,page:R[d],getPageTheme:({themeId:M})=>R[M]??R[d]}}var bt=t(80012);const It={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,bt.a)(r.palette.textVerySubtle,.2):(0,bt.e$)(r.palette.textVerySubtle,.2)},"&::-webkit-scrollbar-thumb:hover, & *::-webkit-scrollbar-thumb:hover":{backgroundColor:r.palette.mode==="dark"?(0,bt.a)(r.palette.textVerySubtle,.2):(0,bt.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,bt.e$)(r.palette.link,.3),background:(0,bt.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"}}}},Kt=r=>(...e)=>{const s=e.length===0?[1]:e,a=(d,R)=>typeof d=="string"?d:R*d;return s.map(d=>{const R=a(d,r);return typeof R=="number"?`${R}px`:R}).join(" ")};function Ut(r,e){if(!e||typeof e=="string")return;const s=typeof e=="function"?e(r):e;if(s)return{"@global":s}}function Wt(r,e){if(!(!e||typeof e=="string")){if(typeof e=="object"){const s={...r},a=r.spacing(1);return typeof a=="number"&&(s.spacing=Kt(a)),Object.fromEntries(Object.entries(e).map(([d,R])=>typeof R=="function"?[d,R({theme:s})]:[d,R]))}return e}}const Bt=/^&.Mui-([\w-]+)$/;function ve(r){let e=r;if(!r||typeof r!="object")return e;for(const s of Object.keys(r)){const a=r[s];if(!(!a||typeof a!="object"))for(const d of Object.keys(a)){const R=d,L=R.match(Bt);if(L){const[,M]=L,{[R]:K,..._}=a;K&&(e={...e,[s]:_,[M]:K})}}}return e}function ge(r,e={}){const s={},a={};for(const d of Object.keys(e)){const R=e[d];R&&("styleOverrides"in R&&(d==="MuiCssBaseline"?s[d]=Ut(r,R.styleOverrides):s[d]=ve(Wt(r,R.styleOverrides))),"defaultProps"in R&&(a[d]=R.defaultProps))}return{overrides:s,props:a}}class kt{#t=new Map;constructor(e,s){this.#t=new Map,e&&this.#t.set("v4",e),s&&this.#t.set("v5",s)}getTheme(e){return this.#t.get(e)}}function fe(r){const e=pt(r),s={...It,...r.components},a=(0,Es.A)({...e,components:s}),d=ge(a,s),R={...(0,vs.A)(e),...d};return new kt(R,a)}function se(r){const e=adaptV4Theme(r),s=createTheme(r);return new kt(s,createV5Theme(e))}const ae={light:fe({palette:rn.light}),dark:fe({palette:rn.dark})};var Nt=t(75962),te=t(87145);const re=[{id:"light",title:"Light Theme",variant:"light",icon:(0,o.jsx)(te.A,{}),Provider:({children:r})=>(0,o.jsx)(bn,{theme:ae.light,children:r})},{id:"dark",title:"Dark Theme",variant:"dark",icon:(0,o.jsx)(Nt.A,{}),Provider:({children:r})=>(0,o.jsx)(bn,{theme:ae.dark,children:r})}];var Me=t(73466),we=t(39067),Ve=t.n(we);class _e{holders;constructor(...e){this.holders=e}get(e){for(const s of this.holders){const a=s.get(e);if(a)return a}}}var Ge=t(43836),xe=t(10602);const Rn=(0,Ge.tK)("api-context"),As=r=>{const{apis:e,children:s}=r,a=(0,l.useContext)(Rn)?.atVersion(1),d=a?new _e(e,a):e;return(0,o.jsx)(Rn.Provider,{value:(0,xe.B)({1:d}),children:s})};As.propTypes={apis:Ve().shape({get:Ve().func.isRequired}).isRequired,children:Ve().node};const Ir=/^[a-z][a-z0-9]*(?:[-_][a-z][a-z0-9]*)*$/i;function Sn(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}function xs(r){return typeof r!="object"||r===null?r:Array.isArray(r)?r.map(xs):Object.fromEntries(Object.entries(r).map(([e,s])=>[e,xs(s)]))}function gn(r,e){if(r===null)return;if(r===void 0)return e===void 0?void 0:gn(e);if(typeof r!="object"||Array.isArray(r))return r;const s=Sn(e)?e:{},a={};for(const d of new Set([...Object.keys(r),...Object.keys(s)])){const R=gn(r[d],s[d]);R!==void 0&&(a[d]=R)}return a}function Cs(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 Le={type(r,e,s,a){return`Invalid type in config for key '${r}' in '${e}', got ${s}, wanted ${a}`},missing(r,e){return`Missing required config value at '${r}' in '${e}'`},convert(r,e,s){return`Unable to convert config value for key '${r}' in '${e}' to a ${s}`}};class on{data;context;fallback;prefix;filteredKeys;notifiedFilteredKeys;static fromConfigs(e){return e.length===0?new on(void 0):e.reduce((s,{data:a,context:d,filteredKeys:R,deprecatedKeys:L})=>{const M=new on(a,d,s);if(M.filteredKeys=R,L)for(const{key:K,description:_}of L)console.warn(`The configuration key '${K}' of ${d} is deprecated and may be removed soon. ${_||""}`);return M},void 0)}constructor(e,s="mock-config",a,d=""){this.data=e,this.context=s,this.fallback=a,this.prefix=d,this.notifiedFilteredKeys=new Set}has(e){const s=this.readValue(e);return s===null?!1:s!==void 0?!0:this.fallback?.has(e)??!1}keys(){const e=this.data?Object.keys(this.data):[],s=this.fallback?.keys()??[];return[...new Set([...e,...s])].filter(a=>this.data?.[a]!==null)}get(e){const s=this.getOptional(e);if(s===void 0)throw new Error(Le.missing(this.fullKey(e??""),this.context));return s}getOptional(e){const s=xs(this.readValue(e)),a=this.fallback?.getOptional(e);if(s!==null)return s===void 0?gn(a):a===void 0?gn(s):gn(s,a)}getConfig(e){const s=this.getOptionalConfig(e);if(s===void 0)throw new Error(Le.missing(this.fullKey(e),this.context));return s}getOptionalConfig(e){const s=this.readValue(e),a=this.fallback?.getOptionalConfig(e);if(Sn(s))return this.copy(s,e,a);if(s!==null){if(s!==void 0)throw new TypeError(Le.type(this.fullKey(e),this.context,Cs(s),"object"));return a}}getConfigArray(e){const s=this.getOptionalConfigArray(e);if(s===void 0)throw new Error(Le.missing(this.fullKey(e),this.context));return s}getOptionalConfigArray(e){const s=this.readConfigValue(e,a=>{if(!Array.isArray(a))return{expected:"object-array"};for(const[d,R]of a.entries())if(!Sn(R))return{expected:"object-array",value:R,key:`${e}[${d}]`};return!0});if(s)return s.map((a,d)=>this.copy(a,`${e}[${d}]`))}getNumber(e){const s=this.getOptionalNumber(e);if(s===void 0)throw new Error(Le.missing(this.fullKey(e),this.context));return s}getOptionalNumber(e){const s=this.readConfigValue(e,d=>typeof d=="number"||typeof d=="string"||{expected:"number"});if(typeof s=="number"||s===void 0)return s;const a=Number(s);if(!Number.isFinite(a))throw new Error(Le.convert(this.fullKey(e),this.context,"number"));return a}getBoolean(e){const s=this.getOptionalBoolean(e);if(s===void 0)throw new Error(Le.missing(this.fullKey(e),this.context));return s}getOptionalBoolean(e){const s=this.readConfigValue(e,d=>typeof d=="boolean"||typeof d=="number"||typeof d=="string"||{expected:"boolean"});if(typeof s=="boolean"||s===void 0)return s;const a=String(s).trim();if(/^(?:y|yes|true|1|on)$/i.test(a))return!0;if(/^(?:n|no|false|0|off)$/i.test(a))return!1;throw new Error(Le.convert(this.fullKey(e),this.context,"boolean"))}getString(e){const s=this.getOptionalString(e);if(s===void 0)throw new Error(Le.missing(this.fullKey(e),this.context));return s}getOptionalString(e){return this.readConfigValue(e,s=>typeof s=="string"&&s!==""||{expected:"string"})}getStringArray(e){const s=this.getOptionalStringArray(e);if(s===void 0)throw new Error(Le.missing(this.fullKey(e),this.context));return s}getOptionalStringArray(e){return this.readConfigValue(e,s=>{if(!Array.isArray(s))return{expected:"string-array"};for(const[a,d]of s.entries())if(typeof d!="string"||d==="")return{expected:"string-array",value:d,key:`${e}[${a}]`};return!0})}fullKey(e){return`${this.prefix}${this.prefix?".":""}${e}`}copy(e,s,a){const d=new on(e,this.context,a,this.fullKey(s));return d.filteredKeys=this.filteredKeys,d}readConfigValue(e,s){const a=this.readValue(e);if(a===void 0)return this.fallback?.readConfigValue(e,s);if(a===null)return;const d=s(a);if(d!==!0){const{key:R=e,value:L=a,expected:M}=d;throw new TypeError(Le.type(this.fullKey(R),this.context,Cs(L),M))}return a}readValue(e){const s=e?e.split("."):[];for(const d of s)if(!Ir.test(d))throw new TypeError(`Invalid config key '${e}'`);if(this.data===void 0)return;let a=this.data;for(const[d,R]of s.entries())if(Sn(a))a=a[R];else if(a!=null){const L=this.fullKey(s.slice(0,d).join("."));throw new TypeError(Le.type(L,this.context,Cs(a),"object"))}return a}}const fn="theme";class Tn{themes;static createWithStorage(e){const s=new Tn(e);if(!window.localStorage)return s;const a=window.localStorage.getItem(fn)??void 0;return s.setActiveThemeId(a),s.activeThemeId$().subscribe(d=>{d?window.localStorage.setItem(fn,d):window.localStorage.removeItem(fn)}),window.addEventListener("storage",d=>{if(d.key===fn){const R=localStorage.getItem(fn)??void 0;s.setActiveThemeId(R)}}),s}activeThemeId;subject;constructor(e){this.themes=e,this.subject=new F(void 0)}getInstalledThemes(){return this.themes.slice()}activeThemeId$(){return this.subject}getActiveThemeId(){return this.activeThemeId}setActiveThemeId(e){this.activeThemeId=e,this.subject.next(e)}}var an=t(63636);function Bs(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 Dr{registeredFeatureFlags=[];flags;registerFlag(e){Bs(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[a,d]of Object.entries(e.states))this.flags.set(a,d);const s=Array.from(this.flags.entries()).filter(([,a])=>a===an.S.Active);window.localStorage.setItem("featureFlags",JSON.stringify(Object.fromEntries(s)))}load(){try{const e=window.localStorage.getItem("featureFlags");if(!e)return new Map;const s=JSON.parse(e);if(typeof s!="object"||s===null||Array.isArray(s))return new Map;const a=Object.entries(s).filter(([d,R])=>(Bs(d),R===an.S.Active));return new Map(a)}catch{return new Map}}}const In=(0,it.y)({id:"core.apptheme"}),js=(0,it.y)({id:"core.applanguage"});var Mr=t(56038),Ps;(function(r){r[r.default=10]="default",r[r.app=50]="app",r[r.static=100]="static"})(Ps||(Ps={}));class wr{factories=new Map;register(e,s){const a=Ps[e],d=this.factories.get(s.api.id);return d&&d.priority>=a?!1:(this.factories.set(s.api.id,{priority:a,factory:s}),!0)}get(e){const s=this.factories.get(e.id);if(s)return s.factory}getAllApis(){const e=new Set;for(const{factory:s}of this.factories.values())e.add(s.api);return e}}class Os{factories;static validateFactories(e,s){for(const a of s){const d=[a],R=new Set;for(;d.length;){const L=d.shift(),M=e.get(L);if(M)for(const K of Object.values(M.deps)){if(K.id===a.id)throw new Error(`Circular dependency of api factory for ${a}`);R.has(K)||(R.add(K),d.push(K))}}}}apis;constructor(e){this.factories=e,this.apis=new Map}get(e){return this.load(e)}load(e,s=[]){const a=this.apis.get(e.id);if(a)return a;const d=this.factories.get(e);if(!d)return;if(s.includes(d.api))throw new Error(`Circular dependency of api factory for ${d.api}`);const R=this.loadDeps(e,d.deps,[...s,d.api]),L=d.factory(R);return this.apis.set(e.id,L),L}loadDeps(e,s,a){const d={};for(const R in s)if(s.hasOwnProperty(R)){const L=s[R],M=this.load(L,a);if(!M)throw new Error(`No API factory available for dependency ${L} of dependent ${e}`);d[R]=M}return d}}function Lr(r){const e={};for(const a in r.collectors)r.collectors.hasOwnProperty(a)&&(e[a]=r.collectors[a]());const s=[{node:l.Children.toArray(r.root),parent:void 0,contexts:{}}];for(;s.length!==0;){const{node:a,parent:d,contexts:R}=s.shift();l.Children.forEach(a,L=>{if(!(0,l.isValidElement)(L))return;const M={};for(const K in e)if(e.hasOwnProperty(K)){const _=e[K];M[K]=_.visit(_.accumulator,L,d,R[K])}for(const K of r.discoverers){const _=K(L);_&&s.push({node:_,parent:L,contexts:M})}})}return Object.fromEntries(Object.entries(e).map(([a,d])=>[a,d.accumulator]))}function Dn(r,e){return()=>({accumulator:r(),visit:e})}function Br(r){return r.props?.children}function jr(r){if(r.props?.path&&r.props?.element)return r.props?.element}var Ce=t(19402);const Ur=Dn(()=>new Set,(r,e)=>{const s=(0,Ce.E)(e,"core.plugin");s&&r.add(s)});var pn=t(72427);const Us=r=>{const{children:e}=r,s=(0,pn.gf)(an.B),a="with"in r?s.isActive(r.with):!s.isActive(r.without);return(0,o.jsx)(o.Fragment,{children:a?e:null})};(0,Ce.h)(Us,"core.featureFlagged",!0);const Mn={caseSensitive:!1,path:"*",element:"match-all",routeRefs:new Set,plugins:new Set};function wn(r){const e=r;return e?.type?e.type.displayName??e.type.name??String(e.type):String(e)}const $s=r=>{const e=new Set;return r&&e.add(r),e};function Fs(r,e=new Array){return l.Children.forEach(r,s=>{if(!(0,l.isValidElement)(s))return;const a=(0,Ce.E)(s,"core.mountPoint");if(a){const d=(0,Ce.E)(s,"core.plugin");e.push({routeRef:a,plugin:d})}Fs(s.props.children,e)}),e}const $r=Dn(()=>({paths:new Map,parents:new Map,objects:new Array}),(r,e,s,a)=>{if(a?.isElementAncestor)return a;if(s?.props.element===e)return{...a,isElementAncestor:!0};const d=e.props?.path,R=(0,Ce.E)(e,"core.mountPoint");if(R&&d)throw new Error(`Path property may not be set directly on a routable extension "${wn(e)}"`);const L=a?.obj?.children??r.objects;if(d!==void 0){if(typeof d!="string")throw new Error(`Element path must be a string at "${wn(e)}"`);const M=d.startsWith("/")?d.slice(1):d,K=e.props.element;if((0,Ce.E)(e,"core.gatherMountPoints")){if(K)throw new Error(`Mount point gatherers may not have an element prop "${wn(e)}"`);const _={path:M,element:"gathered",routeRefs:new Set,caseSensitive:!!e.props?.caseSensitive,children:[Mn],plugins:new Set};return L.push(_),{obj:_,gatherPath:M,routeRef:a?.routeRef,gatherRouteRef:a?.routeRef}}if(K){const[_,...et]=Fs(K);if(et.length>0)throw new Error(`Route element with path "${d}" may not contain multiple routable extensions`);if(!_)return a;const{routeRef:mt,plugin:ut}=_,vt={path:M,element:"mounted",routeRefs:new Set([mt]),caseSensitive:!!e.props?.caseSensitive,children:[Mn],plugins:$s(ut)};return L.push(vt),r.paths.set(mt,M),r.parents.set(mt,a?.routeRef),{obj:vt,routeRef:mt??a?.routeRef,gatherPath:M,gatherRouteRef:a?.gatherRouteRef}}}if(R){if(a?.gatherPath===void 0)throw new Error(`Routable extension "${wn(e)}" with mount point "${R}" must be assigned a path`);a?.obj?.routeRefs.add(R);const M=(0,Ce.E)(e,"core.plugin");return M&&a?.obj?.plugins.add(M),r.paths.set(R,a.gatherPath),r.parents.set(R,a?.gatherRouteRef),{...a,routeRef:R}}return a}),Fr=Dn(()=>({paths:new Map,parents:new Map,objects:new Array}),(r,e,s,a)=>{if(s?.props.element===e)return a;let d=a?.obj,R=a?.routeRef,L=a?.sticky;const M=e.props?.path,K=d?.children??r.objects,_=!!e.props?.caseSensitive;let et=a?.path;if((0,Ce.E)(e,"core.gatherMountPoints")){if(!M)throw new Error("Mount point gatherer must have a path");et=M}const mt=e.props?.element;let ut=(0,Ce.E)(e,"core.mountPoint");if(!ut&&(0,l.isValidElement)(mt)&&(ut=(0,Ce.E)(mt,"core.mountPoint")),ut){let Dt=M;if(et&&(Dt?et=void 0:Dt=et),!Dt)throw new Error("Mounted routable extension must have a path");r.paths.set(ut,Dt),R&&L?(r.parents.set(ut,R),M&&(R=ut,L=!1)):(r.parents.set(ut,R),R=ut),M?(d={caseSensitive:_,path:M,element:"mounted",routeRefs:new Set([ut]),children:[Mn],plugins:$s((0,Ce.E)(e.props.element,"core.plugin"))},K.push(d)):d?.routeRefs.add(ut)}if((0,Ce.E)(e,"core.gatherMountPoints")&&(L=!0),(0,Ce.E)(e,"core.gatherMountPoints")){if(!M)throw new Error("Mount point gatherer must have a path");ut||(d={caseSensitive:_,path:M,element:"gathered",routeRefs:new Set,children:[Mn],plugins:a?.obj?.plugins||new Set},K.push(d))}return{obj:d,path:et,routeRef:R,sticky:L}}),Wr=Dn(()=>new Set,(r,e)=>{if(e.type===Us){const s=e.props;r.add("with"in s?s.with:s.without)}});var mn=t(74808),Nr=t(63544);const yn=(0,Nr.Q)("route-ref-type",()=>Symbol("route-ref-type"));function Ws(r){return r[yn]==="absolute"}function Ns(r){return r[yn]==="sub"}function Kr(r){return r[yn]==="external"}function Ln(...r){const e=r.join("/").replace(/\/\/+/g,"/");return e!=="/"&&e.endsWith("/")?e.slice(0,-1):e}var kr=t(46155),zr=t.n(kr);function Hr(r,e,s){let a,d="";if(Ws(r))a=r;else if(Ns(r))a=r.parent,d=r.path;else if(Kr(r)){const M=s.get(r);if(!M)return[void 0,""];if(Ws(M))a=M;else if(Ns(M))a=M.parent,d=M.path;else throw new Error(`ExternalRouteRef was bound to invalid target, ${M}`)}else throw r[yn]?new Error(`Unknown or invalid route ref type, ${r[yn]}`):new Error(`Unknown object passed to useRouteRef, got ${r}`);if(!a)return[void 0,""];const R=e.get(a);if(R===void 0)return[void 0,""];const L=Ln(R,d);return[a,L]}function Vr(r,e,s,a,d){const R=(0,mn.ue)(d,e)??[],L=Array();let M=-1;for(let et=r;et&&(M=R.findIndex(mt=>mt.route.routeRefs.has(et)),M===-1);et=a.get(et))L.unshift(et);L.length===0&&(M-=1);const K=M===-1?"":R[M].pathname,_=L.slice(0,-1).map(et=>{const mt=s.get(et);if(mt===void 0)throw new Error(`No path for ${et}`);if(mt.includes(":"))throw new Error(`Cannot route to ${r} with parent ${et} as it has parameters`);return mt});return`${Ln(K,..._)}/`}class Gr{routePaths;routeParents;routeObjects;routeBindings;appBasePath;constructor(e,s,a,d,R){this.routePaths=e,this.routeParents=s,this.routeObjects=a,this.routeBindings=d,this.appBasePath=R}resolve(e,s){const[a,d]=Hr(e,this.routePaths,this.routeBindings);if(!a)return;let R;typeof s=="string"?R=this.trimPath(s):s.pathname?R={...s,pathname:this.trimPath(s.pathname)}:R=s;const L=this.appBasePath+Vr(a,R,this.routePaths,this.routeParents,this.routeObjects);return(...[K])=>{const _=K&&zr()(K,et=>typeof et=="string"?et.replaceAll(/[&?#;\/]/g,mt=>encodeURIComponent(mt)):et);return Ln(L,(0,mn.tW)(d,_))}}trimPath(e){return e&&(e.startsWith(this.appBasePath)?e.slice(this.appBasePath.length):e)}}const Yr=(0,Ge.tK)("routing-context"),Qr=({routePaths:r,routeParents:e,routeObjects:s,routeBindings:a,basePath:d="",children:R})=>{const L=new Gr(r,e,s,a,d),M=(0,xe.B)({1:L});return(0,o.jsx)(Yr.Provider,{value:M,children:R})};function Zr(r,e){const s=new Set(e.values());s.delete(void 0);for(const a of e.keys()){if(s.has(a))continue;let d=a,R="";for(;d;){const M=r.get(d);if(M===void 0)throw new Error(`No path for ${d}`);R=Ln(M,R),d=e.get(d)}const L=R.match(/:(\w+)/g);if(L){for(let M=0;M<L.length;M++)for(let K=M+1;K<L.length;K++)if(L[K]===L[M])throw new Error(`Parameter ${L[K]} is duplicated in path ${R}`)}}}function Jr(r,e){for(const s of e)if(s.externalRoutes){for(const[a,d]of Object.entries(s.externalRoutes))if(!d.optional&&!r.has(d))throw new Error(`External route '${a}' of the '${s.getId()}' plugin must be bound to a target route. See https://backstage.io/link?bind-routes for details.`)}}var Xr=t(46828);const Ks="app",_r=`${Ks}-auth-cookie-expires-at`,qr=5*6e4,ks=5e3,to=2,eo=5*6e4;function no({discoveryApi:r,fetchApi:e,errorApi:s}){let a=!1,d,R=!0,L=ks;const M="BroadcastChannel"in window?new BroadcastChannel(_r):void 0,K=ut=>{const vt=(1+3*Math.random())*6e4;return Math.max(ut-Date.now(),qr)-vt},_=async()=>{try{const vt=`${await r.getBaseUrl(Ks)}/.backstage/auth/v1/cookie`,Dt=await e.fetch(vt,{credentials:"include"});if(!Dt.ok)throw new Error(`Request failed with status ${Dt.status} ${Dt.statusText}, see request towards ${vt} for more details`);const Vt=await Dt.json();if(!Vt.expiresAt)throw new Error("No expiration date in response");const Pe=Date.parse(Vt.expiresAt);if(Number.isNaN(Pe))throw new Error("Invalid expiration date in response");R=!0,M?.postMessage({action:"COOKIE_REFRESH_SUCCESS",payload:{expiresAt:new Date(Pe).toISOString()}}),mt(K(Pe))}catch(ut){R?(R=!1,L=ks):(L=Math.min(eo,L*to),console.error("Session cookie refresh failed",ut),s.post(new Error("Session refresh failed, see developer console for details"))),mt(L)}},et=ut=>{const{data:vt}=ut;if(!(vt===null||typeof vt!="object")&&"action"in vt&&vt.action==="COOKIE_REFRESH_SUCCESS"){const Dt=Date.parse(vt.payload.expiresAt);if(Number.isNaN(Dt)){console.warn("Received invalid expiration from session refresh channel");return}mt(K(Dt))}};function mt(ut){a||(d&&clearTimeout(d),d=setTimeout(_,ut))}return M?.addEventListener("message",et),_(),()=>{a=!0,d&&clearTimeout(d),M?.removeEventListener("message",et),M?.close()}}function zs(r){return new Error(`Tried to access IdentityApi ${r} before app was loaded`)}function bs(r){console.warn(`WARNING: Call to ${r} is deprecated and will break in the future`)}class so{target;waitForTarget;resolveTarget=()=>{};signOutTargetUrl="/";#t;constructor(){this.waitForTarget=new Promise(e=>{this.resolveTarget=e})}setTarget(e,s){this.target=e,this.signOutTargetUrl=s.signOutTargetUrl,this.resolveTarget(e)}getUserId(){if(!this.target)throw zs("getUserId");if(!this.target.getUserId)throw new Error("IdentityApi does not implement getUserId");return bs("getUserId"),this.target.getUserId()}getProfile(){if(!this.target)throw zs("getProfile");if(!this.target.getProfile)throw new Error("IdentityApi does not implement getProfile");return bs("getProfile"),this.target.getProfile()}async getProfileInfo(){return this.waitForTarget.then(e=>e.getProfileInfo())}async getBackstageIdentity(){const e=await this.waitForTarget.then(s=>s.getBackstageIdentity());return e.userEntityRef.match(/^.*:.*\/.*$/)||console.warn(`WARNING: The App IdentityApi provided an invalid userEntityRef, '${e.userEntityRef}'. It must be a full Entity Reference of the form '<kind>:<namespace>/<name>'.`),e}async getCredentials(){return this.waitForTarget.then(e=>e.getCredentials())}async getIdToken(){return this.waitForTarget.then(e=>{if(!e.getIdToken)throw new Error("IdentityApi does not implement getIdToken");return bs("getIdToken"),e.getIdToken()})}async signOut(){await this.waitForTarget.then(e=>e.signOut()),await this.#t?.(),window.location.href=this.signOutTargetUrl}enableCookieAuth(e){if(this.#t)return;const s=no(e);this.#t=async()=>{s();const a=await e.discoveryApi.getBaseUrl("app");try{await fetch(`${a}/.backstage/auth/v1/cookie`,{method:"DELETE",credentials:"include"})}catch{}}}}var ro=t(1394);function oo(r,e,s){if(r!==void 0){const d=s.find(R=>R.id===r);if(d)return d}if(e){const d=s.find(R=>R.variant==="dark");if(d)return d}const a=s.find(d=>d.variant==="light");return a||s[0]}const ao=()=>{const r=(0,l.useMemo)(()=>window.matchMedia("(prefers-color-scheme: dark)"),[]),[e,s]=(0,l.useState)(r.matches);return(0,l.useEffect)(()=>{const a=d=>{s(d.matches)};return r.addListener(a),()=>{r.removeListener(a)}},[r]),e};function Hs({children:r}){const e=(0,pn.gf)(In),s=(0,ro.A)(e.activeThemeId$(),e.getActiveThemeId()),a=window.matchMedia?ao():!1,d=oo(s,a,e.getInstalledThemes());if(!d)throw new Error("App has no themes");return(0,o.jsx)(d.Provider,{children:r})}const Vs=async()=>io();function io(r="__APP_INJECTED_RUNTIME_CONFIG__"){const e=[{context:"app-config.yaml",data:{app:{title:"Backstage Example App",baseUrl:"http://localhost:3000",experimental:{packages:"all"},support:{url:"https://github.com/backstage/backstage/issues",items:[{title:"Issues",icon:"github",links:[{url:"https://github.com/backstage/backstage/issues",title:"GitHub Issues"}]},{title:"Discord Chatroom",icon:"chat",links:[{url:"https://discord.gg/backstage-687207715902193673",title:"#backstage"}]}]}},backend:{baseUrl:"http://localhost:7007"},organization:{name:"My Company"},techdocs:{builder:"local"},scorecards:{jsonDataUrl:"https://raw.githubusercontent.com/Oriflame/backstage-plugins/main/plugins/score-card/sample-data/",wikiLinkTemplate:"https://link-to-wiki/{id}"},integrations:{github:[{host:"github.com"}],gitlab:[{host:"gitlab.com"}],azure:[{host:"dev.azure.com"}]},auth:{environment:"development"},stackstorm:{webUrl:"https://your.stackstorm.webui.instance.com"},permission:{enabled:!0}}}];if(!e)throw new Error("No static configuration provided");if(!Array.isArray(e))throw new Error("Static configuration has invalid format");const s=e.slice();if(r!=="__app_injected_runtime_config__".toLocaleUpperCase("en-US"))try{const d=JSON.parse(r);Array.isArray(d)?s.push(...d):s.push({data:d,context:"env"})}catch(d){throw new Error(`Failed to load runtime configuration, ${d}`)}const a=window.__APP_CONFIG__;return a&&s.push({context:"window",data:a}),s}class co{apis=[];add(e,s){return this.apis.push([e.id,s]),s}build(){return new cn(new Map(this.apis))}}class cn{apis;static builder(){return new co}static from(e){return new cn(new Map(e.map(([s,a])=>[s.id,a])))}static with(e,s){return new cn(new Map([[e.id,s]]))}constructor(e){this.apis=e}with(e,s){return new cn(new Map([...this.apis,[e.id,s]]))}get(e){return this.apis.get(e.id)}}function lo(r){const e=new Map,s=new Map;for(const a of r){for(const[d,R]of Object.entries(a.routes??{})){const L=`${a.getId()}.${d}`;if(e.has(L))throw new Error(`Unexpected duplicate route '${L}'`);e.set(L,R)}for(const[d,R]of Object.entries(a.externalRoutes??{})){const L=`${a.getId()}.${d}`;if(s.has(L))throw new Error(`Unexpected duplicate external route '${L}'`);s.set(L,R)}}return{routes:e,externalRoutes:s}}function uo(r,e,s){const a=lo(s),d=new Map;r&&r({bind:(K,_)=>{for(const[et,mt]of Object.entries(_)){const ut=K[et];if(!ut)throw new Error(`Key ${et} is not an existing external route`);if(!mt&&!ut.optional)throw new Error(`External route ${et} is required but was undefined`);mt&&d.set(ut,mt)}}});const R=e.getOptionalConfig("app.routes.bindings")?.get(),L=new Set;if(R)for(const[M,K]of Object.entries(R)){if(!ho(K))throw new Error(`Invalid config at app.routes.bindings['${M}'], value must be a non-empty string or false`);const _=a.externalRoutes.get(M);if(!_)throw new Error(`Invalid config at app.routes.bindings, '${M}' is not a valid external route`);if(K===!1)L.add(_),d.delete(_);else if(!d.has(_)){const et=a.routes.get(K);if(!et)throw new Error(`Invalid config at app.routes.bindings['${M}'], '${K}' is not a valid route`);d.set(_,et)}}for(const M of a.externalRoutes.values())if(!d.has(M)&&!L.has(M)){const K="getDefaultTarget"in M?M.getDefaultTarget():void 0;if(K){const _=a.routes.get(K);_&&d.set(M,_)}}return d}function ho(r){return!!(r===!1||typeof r=="string"&&r)}function vn(){const[r]=(0,v.AV)((0,o.jsx)(v.qh,{index:!0,element:(0,o.jsx)("div",{})}));return!r.index}const Gs=(0,l.createContext)(void 0);var Ys=t(82266),Qs=t(93368),go=t(25862);const fo=(r,e)=>{try{const a=(0,mn.ue)(e,{pathname:r})?.filter(K=>K?.route.routeRefs?.size>0).pop(),d=a?.route;if(!d||d.path===""&&r!=="/")return;let R;d.routeRefs.size===1&&(R=d.routeRefs.values().next().value);let L;d.plugins.size===1&&(L=d.plugins.values().next().value);const M=Object.entries(a?.params||{}).reduce((K,[_,et])=>(et!==void 0&&_!=="*"&&(K[_]=et),K),{});return{extension:"App",pluginId:L?.getId()||"root",...R?{routeRef:R.id}:{},_routeNodeType:d.element,params:M}}catch{return}},po=({pathname:r,search:e,hash:s,attributes:a})=>{const d=(0,Qs.s)();return(0,l.useEffect)(()=>{d.captureEvent("navigate",`${r}${e}${s}`,{attributes:a})},[d,r,e,s,a]),null},Bn=({routeObjects:r})=>{const{pathname:e,search:s,hash:a}=(0,v.zy)(),{params:d,...R}=fo(e,r)||{params:{}};return(0,o.jsx)(go.Ig,{attributes:R,children:(0,o.jsx)(po,{pathname:e,search:s,hash:a,attributes:d})})};function mo(r){return vn()?Rs(r):""}function Rs(r){let{pathname:e}=new URL(r.getOptionalString("app.baseUrl")??"/","http://sample.dev");return e=e.replace(/\/*$/,""),e}function Zs({component:r,appIdentityProxy:e,children:s}){const[a,d]=(0,l.useState)(),R=(0,pn.gf)(ne.U),L=Rs(R);return a?(e.setTarget(a,{signOutTargetUrl:L||"/"}),(0,o.jsx)(o.Fragment,{children:s})):(0,o.jsx)(r,{onSignInSuccess:d})}function Js(r){const{Router:e,SignInPage:s}=(0,Ys.n)().getComponents(),a=(0,pn.gf)(ne.U),d=Rs(a),R=`${d}/*`,L=(0,l.useContext)(Gs);if(!L)throw new Error("AppRouter must be rendered within the AppProvider");const{routeObjects:M,appIdentityProxy:K}=L;return s?vn()?(0,o.jsxs)(e,{children:[(0,o.jsx)(Bn,{routeObjects:M}),(0,o.jsx)(Zs,{component:s,appIdentityProxy:K,children:(0,o.jsx)(v.BV,{children:(0,o.jsx)(v.qh,{path:R,element:(0,o.jsx)(o.Fragment,{children:r.children})})})})]}):(0,o.jsxs)(e,{basename:d,children:[(0,o.jsx)(Bn,{routeObjects:M}),(0,o.jsx)(Zs,{component:s,appIdentityProxy:K,children:r.children})]}):(K.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:d||"/"}),vn()?(0,o.jsxs)(e,{children:[(0,o.jsx)(Bn,{routeObjects:M}),(0,o.jsx)(v.BV,{children:(0,o.jsx)(v.qh,{path:R,element:(0,o.jsx)(o.Fragment,{children:r.children})})})]}):(0,o.jsxs)(e,{basename:d,children:[(0,o.jsx)(Bn,{routeObjects:M}),r.children]}))}(0,Ce.h)(Js,"core.type","AppRouter");const En="language",Ke="en";class jn{static create(e){const s=e?.availableLanguages??[Ke];if(s.length!==new Set(s).size)throw new Error(`Supported languages may not contain duplicates, got '${s.join("', '")}'`);if(!s.includes(Ke))throw new Error(`Supported languages must include '${Ke}'`);const a=e?.defaultLanguage??Ke;if(!s.includes(a))throw new Error(`Initial language must be one of the supported languages, got '${a}'`);return new jn(s,a)}static createWithStorage(e){const s=jn.create(e);if(!window.localStorage)return s;const a=window.localStorage.getItem(En),{languages:d}=s.getAvailableLanguages();return a&&d.includes(a)&&s.setLanguage(a),s.language$().subscribe(({language:R})=>{R!==window.localStorage.getItem(En)&&window.localStorage.setItem(En,R)}),window.addEventListener("storage",R=>{if(R.key===En){const L=localStorage.getItem(En)??void 0;L&&s.setLanguage(L)}}),s}#t;#e;#n;constructor(e,s){this.#t=e,this.#e=s,this.#n=new F({language:this.#e})}getAvailableLanguages(){return{languages:this.#t.slice()}}setLanguage(e){const s=e??Ke;if(s!==this.#e){if(s&&!this.#t.includes(s))throw new Error(`Failed to change language to '${s}', available languages are '${this.#t.join("', '")}'`);this.#e=s,this.#n.next({language:s})}}getLanguage(){return{language:this.#e}}language$(){return this.#n}}var yo=t(47304),vo=t(99833),Xs=t(93184);function _s(r){return Object.fromEntries(Object.entries(r).filter(e=>e[1]!==null))}class Eo{onLoad;#t;#e;#n;constructor(e){this.onLoad=e,this.#t=new Set,this.#e=new Map,this.#n=new Map}addTranslationResource(e){const s=(0,vo.Y)(e);for(const a of s.resources){const d=this.#s(a.language,s.id);this.#n.has(d)||this.#n.set(d,a.loader)}}#s(e,s){return`${e}/${s}`}needsLoading(e,s){const a=this.#s(e,s);return this.#n.get(a)?!this.#t.has(a):!1}async load(e,s){const a=this.#s(e,s),d=this.#n.get(a);if(!d||this.#t.has(a))return;const R=this.#e.get(a);if(R){await R;return}const L=d().then(M=>{this.onLoad({language:e,namespace:s,messages:M.messages}),this.#t.add(a)},M=>{throw this.#t.add(a),M});this.#e.set(a,L),await L}}class Ss{static create(e){const{languages:s}=e.languageApi.getAvailableLanguages(),a=(0,yo.Q_)({fallbackLng:Ke,supportedLngs:s,interpolation:{escapeValue:!1},ns:[],defaultNS:!1,fallbackNS:!1,initImmediate:!1});if(a.init(),!a.isInitialized)throw new Error("i18next was unexpectedly not initialized");const{language:d}=e.languageApi.getLanguage();d!==Ke&&a.changeLanguage(d);const R=new Eo(K=>{a.addResourceBundle(K.language,K.namespace,_s(K.messages),!1,!0)}),L=e?.resources||[];for(let K=L.length-1;K>=0;K--){const _=L[K];_.$$type==="@backstage/TranslationResource"?R.addTranslationResource(_):_.$$type==="@backstage/TranslationMessages"&&a.addResourceBundle(Ke,_.id,_s(_.messages),!0,!1)}const M=new Ss(a,R,e.languageApi.getLanguage().language);return e.languageApi.language$().subscribe(({language:K})=>{M.#o(K)}),M}#t;#e;#n;#s=new Set;#r=new Set;constructor(e,s,a){this.#t=e,this.#e=s,this.#n=a}getTranslation(e){const s=(0,Xs.v)(e);return this.#i(s),this.#a(s)}translation$(e){const s=(0,Xs.v)(e);return this.#i(s),new(H())(a=>{let d={};const R=()=>{d={};const M=d;this.#e.load(this.#n,s.id).then(()=>{if(M===d){const K=this.#a(s);K.ready&&a.next(K)}},K=>{M===d&&a.error(Array.isArray(K)?K[0]:K)})},L=()=>{const M=this.#a(s);M.ready?a.next(M):R()};return this.#e.needsLoading(this.#n,s.id)&&R(),this.#r.add(L),()=>{this.#r.delete(L)}})}#o(e){this.#n!==e&&(this.#n=e,this.#t.changeLanguage(e),this.#r.forEach(s=>s()))}#a(e){return this.#e.needsLoading(this.#n,e.id)?{ready:!1}:{ready:!0,t:this.#t.getFixedT(null,e.id)}}#i(e){if(this.#s.has(e.id))return;this.#s.add(e.id);const s=e.getDefaultMessages();this.#t.addResourceBundle(Ke,e.id,s,!0,!1);const a=e.getDefaultResource();a&&this.#e.addTranslationResource(a)}}function qs(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 Ao(r){const e=on.fromConfigs(r),s=e.getOptionalString("app.baseUrl"),a=e.getOptionalString("backend.baseUrl");let d=r,R,L;if(s&&a){const M=new URL(s).origin,K=new URL(a).origin;if(M===K){const _=qs(a);a!==_&&(R=_)}}if(s){const M=qs(s);s!==M&&(L=M)}return(L||R)&&(d=d.concat({data:{app:L&&{baseUrl:L},backend:R&&{baseUrl:R}},context:"relative-resolver"})),d}function xo(){return(document.querySelector('meta[name="backstage-app-mode"]')?.getAttribute("content")??"public")==="protected"}function Co(r,e,s){const a=!!r,d=(0,Me.A)(r||(()=>Promise.resolve([])));let R;if(a&&d.loading){const{Progress:K}=e;R=(0,o.jsx)(K,{})}else if(d.error){const{BootErrorPage:K}=e;R=(0,o.jsx)(K,{step:"load-config",error:d.error})}const{ThemeProvider:L=Hs}=e;return R?{node:(0,o.jsx)(As,{apis:cn.with(In,s),children:(0,o.jsx)(L,{children:R})})}:{api:on.fromConfigs(d.value?.length?Ao(d.value):[])}}class Po{app;constructor(e){this.app=e}getPlugins(){return this.app.getPlugins()}getSystemIcon(e){return this.app.getSystemIcon(e)}getSystemIcons(){return this.app.getSystemIcons()}getComponents(){return this.app.getComponents()}}class Oo{apiHolder;configApi;apis;icons;plugins;featureFlags;components;themes;configLoader;defaultApis;bindRoutes;appLanguageApi;translationResources;appIdentityProxy=new so;apiFactoryRegistry;constructor(e){this.apis=e.apis??[],this.icons=e.icons,this.plugins=new Set(e.plugins??[]),this.featureFlags=e.featureFlags??[],this.components=e.components,this.themes=e.themes,this.configLoader=e.configLoader??Vs,this.defaultApis=e.defaultApis??[],this.bindRoutes=e.bindRoutes,this.apiFactoryRegistry=new wr,this.appLanguageApi=jn.createWithStorage({defaultLanguage:e.__experimentalTranslations?.defaultLanguage,availableLanguages:e.__experimentalTranslations?.availableLanguages}),this.translationResources=e.__experimentalTranslations?.resources??[]}getPlugins(){return Array.from(this.plugins)}getSystemIcon(e){return this.icons[e]}getSystemIcons(){return this.icons}getComponents(){return this.components}createRoot(e){const s=this.getProvider();return()=>(0,o.jsx)(s,{children:e})}#t=!1;getProvider(){if(this.#t)throw new Error("app.getProvider() or app.createRoot() has already been called, and can only be called once");this.#t=!0;const e=new Po(this);let s,a;return({children:R})=>{const L=(0,l.useRef)(!0),M=(0,l.useMemo)(()=>Tn.createWithStorage(this.themes),[]),{routing:K,featureFlags:_}=(0,l.useMemo)(()=>{const Vt=vn();Vt&&console.warn(`
|
|
8
|
-
DEPRECATION WARNING: React Router Beta is deprecated and support for it will be removed in a future release.
|
|
9
|
-
Please migrate to use React Router v6 stable.
|
|
10
|
-
See https://backstage.io/docs/tutorials/react-router-stable-migration
|
|
11
|
-
`);const Pe=Lr({root:R,discoverers:[Br,jr],collectors:{routing:Vt?Fr:$r,collectedPlugins:Ur,featureFlags:Wr}});return Pe.collectedPlugins.forEach(Ie=>this.plugins.add(Ie)),this.verifyPlugins(this.plugins),this.getApiHolder(),Pe},[R]),et=Co(this.configLoader,this.components,M),mt="api"in et;if(mt){const{api:Vt}=et;this.configApi=Vt}if("node"in et)return et.node;if(a)throw a;if(!s)try{s=uo(this.bindRoutes,et.api,this.plugins),Zr(K.paths,K.parents),Jr(s,this.plugins)}catch(Vt){throw a=Vt,Vt}if(mt&&L.current){L.current=!1;const Vt=this.getApiHolder().get(an.B);if(Vt){for(const be of this.featureFlags)Vt.registerFlag({...be,pluginId:""});for(const be of this.plugins.values())if("getFeatureFlags"in be)for(const tn of be.getFeatureFlags())Vt.registerFlag({name:tn.name,pluginId:be.getId()});else for(const tn of be.output())tn.type==="feature-flag"&&Vt.registerFlag({name:tn.name,pluginId:be.getId()});const Pe=Vt.getRegisteredFlags(),Ie=new Set(Pe.map(be=>be.name));for(const be of _)Ie.has(be)||Vt.registerFlag({name:be,pluginId:""})}}const{ThemeProvider:ut=Hs,Progress:vt}=this.components,Dt=this.getApiHolder();if(xo()){const Vt=Dt.get(Je.m),Pe=Dt.get(ie.a),Ie=Dt.get(oe.I);if(!Vt||!Pe||!Ie)throw new Error("App is running in protected mode but missing required APIs");this.appIdentityProxy.enableCookieAuth({errorApi:Vt,fetchApi:Pe,discoveryApi:Ie})}return(0,o.jsx)(As,{apis:Dt,children:(0,o.jsx)(Xr.Q,{appContext:e,children:(0,o.jsx)(ut,{children:(0,o.jsx)(Qr,{routePaths:K.paths,routeParents:K.parents,routeObjects:K.objects,routeBindings:s,basePath:mo(et.api),children:(0,o.jsx)(Gs.Provider,{value:{routeObjects:K.objects,appIdentityProxy:this.appIdentityProxy},children:(0,o.jsx)(l.Suspense,{fallback:(0,o.jsx)(vt,{}),children:R})})})})})})}}getRouter(){return Js}getApiHolder(){if(this.apiHolder){for(const e of this.plugins)for(const s of e.getApis())this.apiFactoryRegistry.get(s.api)||this.apiFactoryRegistry.register("default",s);return Os.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder}this.apiFactoryRegistry.register("static",{api:In,deps:{},factory:()=>Tn.createWithStorage(this.themes)}),this.apiFactoryRegistry.register("static",{api:ne.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:ce.K,deps:{},factory:()=>this.appIdentityProxy}),this.apiFactoryRegistry.register("static",{api:js,deps:{},factory:()=>this.appLanguageApi}),this.apiFactoryRegistry.register("default",{api:Mr.J,deps:{languageApi:js},factory:({languageApi:e})=>Ss.create({languageApi:e,resources:this.translationResources})}),this.apiFactoryRegistry.register("default",{api:an.B,deps:{},factory:()=>new Dr});for(const e of this.defaultApis)this.apiFactoryRegistry.register("default",e);for(const e of this.plugins)for(const s of e.getApis())if(!this.apiFactoryRegistry.register("default",s))throw new Error(`Plugin ${e.getId()} tried to register duplicate or forbidden API factory for ${s.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 Os.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder=new Os(this.apiFactoryRegistry),this.apiHolder}verifyPlugins(e){const s=new Set;for(const a of e){const d=a.getId();if(s.has(d))throw new Error(`Duplicate plugin found '${d}'`);s.add(d)}}}function bo(r){return new Oo(r)}function Ro(r){return bo({...r,apis:r?.apis??[],bindRoutes:r?.bindRoutes,components:{...I,...r?.components},configLoader:r?.configLoader,defaultApis:Yn,icons:{...us,...r?.icons},plugins:r?.plugins??[],featureFlags:r?.featureFlags??[],themes:r?.themes??re})}var Un=t(82442);let tr=!1;const er=r=>{const e=(0,Ys.n)(),{NotFoundErrorPage:s}=e.getComponents(),a=(0,l.useMemo)(()=>vn(),[]),R=[...(0,Un.O)(r.children,L=>L.getElements().flatMap(M=>{let K=M.props.path;if(K==="")return[];K=K?.replace(/\/\*$/,"")??"/";let _=a?M:M.props.element;return!a&&!_&&(_=M,tr||(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] />} />."),tr=!0)),[{path:K,element:_,children:M.props.children?[{path:K==="/"?"/":"*",element:M.props.children}]:void 0}]}).sort((M,K)=>K.path.localeCompare(M.path)).map(M=>({...M,path:M.path==="/"?"/":`${M.path}/*`}))),{path:"*",element:(0,o.jsx)(s,{})}];return(0,v.Ye)(R)};(0,Ce.h)(er,"core.type","FlatRoutes");var So=t(45843),nr=t(7341),To=t(18),Io=t(82292),sr=t(29207),ln=t(95203),Do=t(9803),Te=t(88758),Mo=t(54560),wo=t(50226),Lo=t(6292);const Oe=(0,Do.i)({id:"catalog",apis:[(0,Ht.b)({api:nr.v,deps:{discoveryApi:oe.I,fetchApi:ie.a},factory:({discoveryApi:r,fetchApi:e})=>new So.d({discoveryApi:r,fetchApi:e})}),(0,Ht.b)({api:To.a,deps:{storageApi:nn.F},factory:({storageApi:r})=>new wo.s({storageApi:r})}),(0,Ht.b)({api:Io.n,deps:{catalogApi:nr.v},factory:({catalogApi:r})=>Lo.D.create({catalogApi:r})})],routes:{catalogIndex:ln.rQ,catalogEntity:sr.s},externalRoutes:{createComponent:ln.qP,viewTechDoc:ln.UJ,createFromTemplate:ln.Zg,unregisterRedirect:ln.pS}}),Ha=Oe.provide((0,Te.QJ)({name:"CatalogIndexPage",component:()=>Promise.all([t.e(8721),t.e(6066),t.e(5580)]).then(t.bind(t,85580)).then(r=>r.CatalogPage),mountPoint:ln.rQ})),Bo=Oe.provide((0,Te.QJ)({name:"CatalogEntityPage",component:()=>t.e(7137).then(t.bind(t,7137)).then(r=>r.CatalogEntityPage),mountPoint:sr.s})),Va=Oe.provide((0,Te.NC)({name:"EntityAboutCard",component:{lazy:()=>Promise.all([t.e(8721),t.e(9797),t.e(4943)]).then(t.bind(t,74943)).then(r=>r.AboutCard)}})),Ga=Oe.provide((0,Te.NC)({name:"EntityLinksCard",component:{lazy:()=>t.e(8307).then(t.bind(t,18307)).then(r=>r.EntityLinksCard)}})),Ya=Oe.provide((0,Te.NC)({name:"EntityLabelsCard",component:{lazy:()=>t.e(3182).then(t.bind(t,63182)).then(r=>r.EntityLabelsCard)}})),Qa=Oe.provide((0,Te.NC)({name:"EntityHasSystemsCard",component:{lazy:()=>t.e(9652).then(t.bind(t,9652)).then(r=>r.HasSystemsCard)}})),Za=Oe.provide((0,Te.NC)({name:"EntityHasComponentsCard",component:{lazy:()=>t.e(2420).then(t.bind(t,52420)).then(r=>r.HasComponentsCard)}})),Ja=Oe.provide((0,Te.NC)({name:"EntityHasSubcomponentsCard",component:{lazy:()=>t.e(8384).then(t.bind(t,78384)).then(r=>r.HasSubcomponentsCard)}})),Xa=Oe.provide((0,Te.NC)({name:"EntityHasResourcesCard",component:{lazy:()=>t.e(6271).then(t.bind(t,56271)).then(r=>r.HasResourcesCard)}})),_a=Oe.provide((0,Te.NC)({name:"EntityDependsOnComponentsCard",component:{lazy:()=>t.e(3632).then(t.bind(t,3632)).then(r=>r.DependsOnComponentsCard)}})),qa=Oe.provide((0,Te.NC)({name:"EntityDependencyOfComponentsCard",component:{lazy:()=>t.e(124).then(t.bind(t,124)).then(r=>r.DependencyOfComponentsCard)}})),ti=Oe.provide((0,Te.NC)({name:"EntityDependsOnResourcesCard",component:{lazy:()=>t.e(287).then(t.bind(t,20287)).then(r=>r.DependsOnResourcesCard)}})),ei=Oe.provide((0,Te.NC)({name:"RelatedEntitiesCard",component:{lazy:()=>t.e(2401).then(t.bind(t,52401)).then(r=>r.RelatedEntitiesCard)}})),ni=Oe.provide((0,Mo.ec)({name:"CatalogSearchResultListItem",component:()=>t.e(1297).then(t.bind(t,61297)).then(r=>r.CatalogSearchResultListItem),predicate:r=>r.type==="software-catalog"}));var rr=t(3347),or=t(26679);class jo{configApi;discoveryApi;identityApi;constructor({configApi:e,discoveryApi:s,identityApi:a}){this.configApi=e,this.discoveryApi=s,this.identityApi=a}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,s){const d=`${await this.getApiOrigin()}/${s}`,R=await fetch(`${d.endsWith("/")?d:`${d}/`}index.html`);if(R.status===404)throw new Error("Page not found");return R.text()}async syncEntityDocs(e){return"cached"}async getBaseUrl(e,s,a){const d=await this.getApiOrigin();return new URL(e,`${d}/${a}`).toString()}}class Uo{configApi;discoveryApi;identityApi;constructor({configApi:e,discoveryApi:s,identityApi:a}){this.configApi=e,this.discoveryApi=s,this.identityApi=a}async getCookie(){return{expiresAt:new Date(Date.now()+6e5).toISOString()}}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getEntityMetadata(e){return{apiVersion:"backstage.io/v1alpha1",kind:"Component",metadata:{name:"local"},spec:{owner:"test",lifecycle:"experimental"}}}async getTechDocsMetadata(e){return{site_name:"Live preview environment",site_description:""}}}const $o=[(0,Ht.b)({api:or.s,deps:{configApi:ne.U,discoveryApi:oe.I,identityApi:ce.K},factory:({configApi:r,discoveryApi:e,identityApi:s})=>new jo({configApi:r,discoveryApi:e,identityApi:s})}),(0,Ht.b)({api:or.l,deps:{configApi:ne.U,discoveryApi:oe.I,identityApi:ce.K},factory:({configApi:r,discoveryApi:e,identityApi:s})=>new Uo({configApi:r,discoveryApi:e,identityApi:s})}),(0,Ht.b)({api:rr.Y,deps:{configApi:ne.U},factory:({configApi:r})=>rr.L.fromConfig(r)})],Fo={backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}},Wo={backend:{baseUrl:"http://localhost:7007"},techdocs:{builder:"external"}};async function No(){const r=await fetch("/.detect");return r.ok?(await r.text()).trim()==="techdocs-cli-server":!1}async function Ko(){const r=await Vs(),e=await No();return[...r,{context:"detected",data:e?Fo:Wo}]}var ke=t(58837),ko=t(3210);const zo=(0,ke.A)({svg:{width:"auto",height:30},path:{fill:"#7df3e1"}}),Ho=()=>{const r=zo();return(0,o.jsx)("svg",{className:r.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 2079.95 456.05",children:(0,o.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"})})},Vo=(0,ke.A)({svg:{width:"auto",height:28},path:{fill:"#7df3e1"}}),Go=()=>{const r=Vo();return(0,o.jsx)("svg",{className:r.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 337.46 428.5",children:(0,o.jsx)("path",{className:r.path,d:"M303,166.05a80.69,80.69,0,0,0,13.45-10.37c.79-.77,1.55-1.53,2.3-2.3a83.12,83.12,0,0,0,7.93-9.38A63.69,63.69,0,0,0,333,133.23a48.58,48.58,0,0,0,4.35-16.4c1.49-19.39-10-38.67-35.62-54.22L198.56,0,78.3,115.23,0,190.25l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.69,19.16-18.36,25.52-42.12,13.7-61.87a49.22,49.22,0,0,0-6.8-8.87A89.17,89.17,0,0,0,259,178.29h.15a85.08,85.08,0,0,0,31-5.79A80.88,80.88,0,0,0,303,166.05ZM202.45,225.86c-19.32,18.51-50.4,21.23-75.7,5.9L51.61,186.15l67.45-64.64,76.41,46.38C223,184.58,221.49,207.61,202.45,225.86Zm8.93-82.22-70.65-42.89L205.14,39,274.51,81.1c25.94,15.72,29.31,37,10.55,55A60.69,60.69,0,0,1,211.38,143.64Zm29.86,190c-19.57,18.75-46.17,29.09-74.88,29.09a123.73,123.73,0,0,1-64.1-18.2L0,282.52v24.67L108.6,373.1a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.27,87.27,0,0,1,241.24,333.68Zm0-39c-19.57,18.75-46.17,29.08-74.88,29.08a123.81,123.81,0,0,1-64.1-18.19L0,243.53v24.68l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.5v-1.78A87.27,87.27,0,0,1,241.24,294.7Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.81,123.81,0,0,1-64.1-18.19L0,204.55v24.68l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.68,12.88-12.35,20-27.13,19.68-41.5v-1.82A86.09,86.09,0,0,1,241.24,255.71Zm83.7,25.74a94.15,94.15,0,0,1-60.2,25.86h0V334a81.6,81.6,0,0,0,51.74-22.37c14-13.38,21.14-28.11,21-42.64v-2.19A94.92,94.92,0,0,1,324.94,281.45Zm-83.7,91.21c-19.57,18.76-46.17,29.09-74.88,29.09a123.73,123.73,0,0,1-64.1-18.2L0,321.5v24.68l108.6,65.9a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.8,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A86.29,86.29,0,0,1,241.24,372.66ZM327,162.45c-.68.69-1.35,1.38-2.05,2.06a94.37,94.37,0,0,1-10.64,8.65,91.35,91.35,0,0,1-11.6,7,94.53,94.53,0,0,1-26.24,8.71,97.69,97.69,0,0,1-14.16,1.57c.5,1.61.9,3.25,1.25,4.9a53.27,53.27,0,0,1,1.14,12V217h.05a84.41,84.41,0,0,0,25.35-5.55,81,81,0,0,0,26.39-16.82c.8-.77,1.5-1.56,2.26-2.34a82.08,82.08,0,0,0,7.93-9.38A63.76,63.76,0,0,0,333,172.17a48.55,48.55,0,0,0,4.32-16.45c.09-1.23.2-2.47.19-3.7V150q-1.08,1.54-2.25,3.09A96.73,96.73,0,0,1,327,162.45Zm0,77.92c-.69.7-1.31,1.41-2,2.1a94.2,94.2,0,0,1-60.2,25.86h0l0,26.67h0a81.6,81.6,0,0,0,51.74-22.37A73.51,73.51,0,0,0,333,250.13a48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.47.19-3.71v-2.19c-.74,1.07-1.46,2.15-2.27,3.21A95.68,95.68,0,0,1,327,240.37Zm0-39c-.69.7-1.31,1.41-2,2.1a93.18,93.18,0,0,1-10.63,8.65,91.63,91.63,0,0,1-11.63,7,95.47,95.47,0,0,1-37.94,10.18h0V256h0a81.65,81.65,0,0,0,51.74-22.37c.8-.77,1.5-1.56,2.26-2.34a82.08,82.08,0,0,0,7.93-9.38A63.76,63.76,0,0,0,333,211.15a48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.48.19-3.71v-2.2c-.74,1.08-1.46,2.16-2.27,3.22A95.68,95.68,0,0,1,327,201.39Z"})})};var Ee=t(72664);const ar={isOpen:!1,setOpen:()=>{}},ir=(0,l.createContext)(ar),cr=(0,Ge.tK)("sidebar-open-state-context");function lr(r){const{children:e,value:s}=r;return(0,o.jsx)(ir.Provider,{value:s,children:(0,o.jsx)(cr.Provider,{value:(0,xe.B)({1:s}),children:e})})}const Ts=()=>{const r=(0,l.useContext)(cr),e=(0,l.useContext)(ir);if(r===void 0)return e||ar;const s=r.atVersion(1);if(s===void 0)throw new Error("No context found for version 1.");return s};var dr=t(72072),ur=t(73524),Ye=t(77125),hr=t(5893),Yo=t(53373),qe=t.n(Yo),Qo=t(1125),gr=t(29365),Zo=t(73845),Is=t(72501),Jo=t(32881),Xo=t(27326),$n=t(45250),_o=t(13085);const fr=(0,l.createContext)({selectedMenuItemIndex:-1,setSelectedMenuItemIndex:()=>{}});var Ds=t(34435);const qo=(0,ke.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"}})),ta=r=>{const{to:e,label:s,icon:a,value:d}=r,{sidebarConfig:R}=(0,l.useContext)(Ee.yY),L=qo({sidebarConfig:R}),M=(0,v.zy)(),{selectedMenuItemIndex:K,setSelectedMenuItemIndex:_}=(0,l.useContext)(fr),et=(ut,vt)=>{_(vt===K?-1:vt)},mt=d===K&&K>=0||d!==K&&!(K>=0)&&e===M.pathname;return(0,o.jsx)(_o.A,{"aria-label":s,label:s,icon:a,component:dr.N_,to:e||M.pathname,onChange:et,value:d,selected:mt,classes:L})},pr=r=>{const{children:e,to:s,label:a,icon:d,value:R}=r,{isMobile:L}=(0,Ds.Ut)();return L?(0,o.jsx)(ta,{to:s,label:a,icon:d,value:R}):(0,o.jsx)(o.Fragment,{children:e})},mr=(0,ke.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`})})),ea=r=>(0,$n.orderBy)(r,({props:{priority:e}})=>Number.isInteger(e)?e:-1,"desc"),na=l.createElement(pr).type,sa=({children:r,label:e="Menu",open:s,onClose:a})=>{const{sidebarConfig:d}=(0,l.useContext)(Ee.yY),R=mr({sidebarConfig:d});return(0,o.jsxs)(Zo.Ay,{anchor:"bottom",open:s,onClose:a,ModalProps:{BackdropProps:{classes:{root:R.marginMobileSidebar}}},classes:{root:R.marginMobileSidebar,paperAnchorBottom:R.overlay},children:[(0,o.jsxs)(Ye.A,{className:R.overlayHeader,children:[(0,o.jsx)(Is.A,{variant:"h3",children:e}),(0,o.jsx)(gr.A,{onClick:a,classes:{root:R.overlayHeaderClose},children:(0,o.jsx)(Jo.A,{})})]}),(0,o.jsx)(Ye.A,{component:"nav",children:r})]})},ra=r=>{const{sidebarConfig:e}=(0,l.useContext)(Ee.yY),{children:s}=r,a=mr({sidebarConfig:e}),d=(0,v.zy)(),[R,L]=(0,l.useState)(-1);(0,l.useEffect)(()=>{L(-1)},[d.pathname]);let M=(0,Un.O)(s,_=>_.getElements().filter(et=>et.type===na));if(s)M.length?M=ea(M):M.push((0,o.jsx)(pr,{icon:(0,o.jsx)(Xo.A,{}),children:s},"default_menu"));else return null;const K=R>=0&&!M[R].props.to;return(0,o.jsx)(lr,{value:{isOpen:!0,setOpen:()=>{}},children:(0,o.jsxs)(fr.Provider,{value:{selectedMenuItemIndex:R,setSelectedMenuItemIndex:L},children:[(0,o.jsx)(sa,{label:M[R]&&M[R].props.label,open:K,onClose:()=>L(-1),children:M[R]&&M[R].props.children}),(0,o.jsx)(Qo.A,{className:a.root,"data-testid":"mobile-sidebar-root",component:"nav",children:M})]})})};var oa=t(87849),aa=t(10315);const yr=(0,ke.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 vr;(function(r){r[r.Closed=0]="Closed",r[r.Idle=1]="Idle",r[r.Open=2]="Open"})(vr||(vr={}));const ia=r=>{const{sidebarConfig:e}=(0,l.useContext)(Ee.yY),{openDelayMs:s=e.defaultOpenDelayMs,closeDelayMs:a=e.defaultCloseDelayMs,disableExpandOnHover:d,children:R}=r,L=yr({sidebarConfig:e}),M=(0,hr.A)(Ie=>Ie.breakpoints.down("md"),{noSsr:!0}),[K,_]=(0,l.useState)(0),et=(0,l.useRef)(),{isPinned:mt,toggleSidebarPinState:ut}=(0,Ds.Ut)(),vt=()=>{mt||d||(et.current&&(clearTimeout(et.current),et.current=void 0),K!==2&&!M&&(et.current=window.setTimeout(()=>{et.current=void 0,_(2)},s),_(1)))},Dt=()=>{mt||d||(et.current&&(clearTimeout(et.current),et.current=void 0),K===1?_(0):K===2&&(et.current=window.setTimeout(()=>{et.current=void 0,_(0)},a)))},Vt=K===2&&!M||mt,Pe=Ie=>{Ie?(_(2),ut()):(_(0),ut())};return(0,o.jsxs)("nav",{style:{},"aria-label":"sidebar nav",children:[(0,o.jsx)(la,{}),(0,o.jsx)(lr,{value:{isOpen:Vt,setOpen:Pe},children:(0,o.jsx)(Ye.A,{className:L.root,"data-testid":"sidebar-root",onMouseEnter:d?()=>{}:vt,onFocus:d?()=>{}:vt,onMouseLeave:d?()=>{}:Dt,onBlur:d?()=>{}:Dt,children:(0,o.jsx)(Ye.A,{className:qe()(L.drawer,L.drawerWidth,{[L.drawerOpen]:Vt}),children:R})})})]})},ca=r=>{const e=(0,Ee.Rv)(r.sidebarOptions??{}),s=(0,Ee.i8)(r.submenuOptions??{}),{children:a,disableExpandOnHover:d,openDelayMs:R,closeDelayMs:L}=r,{isMobile:M}=(0,Ds.Ut)();return M?(0,o.jsx)(ra,{children:a}):(0,o.jsx)(Ee.yY.Provider,{value:{sidebarConfig:e,submenuConfig:s},children:(0,o.jsx)(ia,{openDelayMs:R,closeDelayMs:L,disableExpandOnHover:d,children:a})})};function la(){const{sidebarConfig:r}=(0,l.useContext)(Ee.yY),{focusContent:e,contentRef:s}=(0,ur.H)(),a=yr({sidebarConfig:r}),{t:d}=(0,oa.i)(aa.O);return s?.current?(0,o.jsx)(E.A,{onClick:e,variant:"contained",className:qe()(a.visuallyHidden),children:d("skipToContent")}):null}var da=t(94509),Fn=t(60882),ua=t(79065),ha=t(55704),Er=t(62248);const ga=(0,ke.A)(r=>({root:{zIndex:1e3,position:"relative",overflow:"visible",width:r.spacing(7)+1},drawer:e=>({display:"flex",flexFlow:"column nowrap",alignItems:"flex-start",position:"fixed",[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:r.palette.navigation.submenu?.background??"#404040",overflowX:"hidden",msOverflowStyle:"none",scrollbarWidth:"none",cursor:"default",width:e.submenuConfig.drawerWidthClosed,transitionDelay:`${e.submenuConfig.defaultOpenDelayMs}ms`,"& > *":{flexShrink:0},"&::-webkit-scrollbar":{display:"none"}}),drawerOpen:e=>({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"}),fa=r=>{const{isOpen:e}=Ts(),{sidebarConfig:s,submenuConfig:a}=(0,l.useContext)(Ee.yY),d=e?s.drawerWidthOpen:s.drawerWidthClosed,R=ga({left:d,submenuConfig:a}),{isHoveredOn:L}=(0,l.useContext)(Ee.U1),[M,K]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{K(L)},[L]),(0,o.jsxs)(Ye.A,{className:qe()(R.drawer,{[R.drawerOpen]:M}),children:[(0,o.jsx)(Is.A,{variant:"h5",component:"span",className:R.title,children:r.title}),r.children]})};var pa=t(45810),Ar=t.n(pa);function xr(r,e,s=!1){const a=new URLSearchParams(e.search).toString(),d=Ar().parse(a),R=new URLSearchParams(r.search).toString(),L=Ar().parse(R),M=s?$n.isEqual:$n.isMatch;return(0,$n.isEqual)(e.pathname,r.pathname)&&M(L,d)}const ma=r=>(0,ke.A)(e=>({root:{color:e.palette.navigation.color,display:"flex",flexFlow:"row nowrap",alignItems:"center",height:48,cursor:"pointer"},buttonItem:{background:"none",border:"none",width:"100%",margin:0,padding:0,textAlign:"inherit",font:"inherit",textTransform:"none"},closed:{width:r.drawerWidthClosed,justifyContent:"center"},open:{[e.breakpoints.up("sm")]:{width:r.drawerWidthOpen}},highlightable:{"&:hover":{background:e.palette.navigation.navItem?.hoverBackground??"#404040"}},highlighted:{background:e.palette.navigation.navItem?.hoverBackground??"#404040"},label:{fontWeight:"bold",whiteSpace:"nowrap",lineHeight:"auto",flex:"3 1 auto",width:"110px",overflow:"hidden","text-overflow":"ellipsis"},iconContainer:{boxSizing:"border-box",height:"100%",width:r.iconContainerWidth,marginRight:-e.spacing(2),display:"flex",alignItems:"center",justifyContent:"center",lineHeight:"0"},searchRoot:{marginBottom:12},searchField:{color:"#b5b5b5",fontWeight:e.typography.fontWeightBold,fontSize:e.typography.fontSize},searchFieldHTMLInput:{padding:e.spacing(2,0,2)},searchContainer:{width:r.drawerWidthOpen-r.iconContainerWidth},secondaryAction:{width:e.spacing(6),textAlign:"center",marginRight:e.spacing(1)},closedItemIcon:{width:"100%",justifyContent:"center"},submenuArrow:{display:"flex"},expandButton:{background:"none",border:"none",color:e.palette.navigation.color,width:"100%",cursor:"pointer",position:"relative",height:48},arrows:{position:"absolute",right:10},selected:{"&$root":{borderLeft:`solid ${r.selectedIndicatorWidth}px ${e.palette.navigation.indicator}`,color:e.palette.navigation.selectedColor},"&$closed":{width:r.drawerWidthClosed},"& $closedItemIcon":{paddingRight:r.selectedIndicatorWidth},"& $iconContainer":{marginLeft:-r.selectedIndicatorWidth}}}),{name:"BackstageSidebarItem"});function Wn(r){return(0,l.useMemo)(()=>ma(r),[r])()}const ya=(r,e)=>(0,Un.O)(r.props.children,s=>{let a=!1;return s.getElements().forEach(({props:{to:d,dropdownItems:R}})=>{if(!a){if(R?.length){R.forEach(({to:L})=>a=a||xr(e,(0,mn.o1)(L)));return}d&&(a=xr(e,(0,mn.o1)(d)))}}),a},[e.pathname]);function Ms(r){return r.to===void 0}const va=l.createElement(fa).type,Ea=l.forwardRef(function({to:e,end:s,style:a,className:d,activeStyle:R,caseSensitive:L,activeClassName:M="active","aria-current":K="page",..._},et){let{pathname:mt}=(0,v.zy)(),{pathname:ut}=(0,v.x$)(e);L||(mt=mt.toLocaleLowerCase("en-US"),ut=ut.toLocaleLowerCase("en-US"));let vt=mt===ut;!vt&&!s&&(vt=mt.startsWith(`${ut}/`));const Dt=vt?K:void 0;return(0,o.jsx)(i.N_,{..._,to:e,ref:et,"aria-current":Dt,style:{...a,...vt?R:void 0},className:qe()([typeof d!="function"?d:void 0,vt?M:void 0])})}),Cr=(0,l.forwardRef)((r,e)=>{const{icon:s,text:a,hasNotifications:d=!1,hasSubmenu:R=!1,disableHighlight:L=!1,onClick:M,noTrack:K,children:_,className:et,...mt}=r,{sidebarConfig:ut}=(0,l.useContext)(Ee.yY),vt=Wn(ut),{isOpen:Dt}=Ts(),Vt=!Dt&&R?{display:"flex",marginLeft:"20px"}:{lineHeight:"0"},Pe=(0,o.jsxs)(Ye.A,{style:Vt,children:[(0,o.jsx)(s,{fontSize:"small"}),!Dt&&R?(0,o.jsx)(Er.A,{fontSize:"small"}):(0,o.jsx)(o.Fragment,{})]}),Ie=(0,o.jsx)(da.A,{color:"secondary",variant:"dot",overlap:"circular",invisible:!d,className:qe()({[vt.closedItemIcon]:!Dt}),children:Pe}),be=(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Ye.A,{"data-testid":"login-button",className:vt.iconContainer,children:Ie}),a&&(0,o.jsx)(Is.A,{variant:"subtitle2",component:"span",className:vt.label,children:a}),(0,o.jsx)("div",{className:vt.secondaryAction,children:_})]}),tn=Dt?be:Ie,Rr={onClick:M,className:qe()(et,vt.root,Dt?vt.open:vt.closed,Ms(r)&&vt.buttonItem,{[vt.highlightable]:!L})},Sr=(0,Qs.s)(),{pathname:ws}=(0,v.x$)(!Ms(r)&&r.to?r.to:""),Tr=(0,l.useCallback)(Na=>{if(!K){const Ka="click",ka=a??"Sidebar Item",za=ws?{attributes:{to:ws}}:void 0;Sr.captureEvent(Ka,ka,za)}M?.(Na)},[Sr,a,ws,K,M]);return Ms(r)?(0,o.jsx)(E.A,{role:"button","aria-label":a,...Rr,ref:e,onClick:Tr,children:tn}):(0,o.jsx)(Ea,{...Rr,activeClassName:vt.selected,to:r.to?r.to:"",ref:e,"aria-label":a||r.to,...mt,onClick:Tr,children:tn})}),Aa=({children:r,...e})=>{const{sidebarConfig:s}=(0,l.useContext)(Ee.yY),a=Wn(s),[d,R]=(0,l.useState)(!1),L=(0,v.zy)(),M=ya(r,L),K=(0,hr.A)(ut=>ut.breakpoints.down("sm")),_=()=>{R(!0)},et=()=>{R(!1)},mt=()=>K?d?(0,o.jsx)(ha.A,{fontSize:"small",className:a.submenuArrow}):(0,o.jsx)(ua.A,{fontSize:"small",className:a.submenuArrow}):!d&&(0,o.jsx)(Er.A,{fontSize:"small",className:a.submenuArrow});return(0,o.jsx)(Ee.U1.Provider,{value:{isHoveredOn:d,setIsHoveredOn:R},children:(0,o.jsxs)("div",{"data-testid":"item-with-submenu",onMouseLeave:et,onTouchStart:d?et:_,onMouseEnter:_,className:qe()(d&&a.highlighted),children:[(0,o.jsx)(Cr,{hasSubmenu:!0,className:M?a.selected:"",...e,children:mt()}),d&&r]})})},Pr=(0,l.forwardRef)((r,e)=>{const[s]=(0,Un.O)(r.children,a=>a.getElements().filter(d=>d.type===va));return s?(0,o.jsx)(Aa,{...r,children:s}):(0,o.jsx)(Cr,{...r,ref:e})});function oi(r){const{sidebarConfig:e}=useContext(SidebarConfigContext),[s,a]=useState(""),d=Wn(e),R=r.icon?r.icon:SearchIcon,L=()=>{r.onSearch(s),a("")},M=mt=>{mt.key==="Enter"&&(mt.preventDefault(),L())},K=mt=>{a(mt.target.value)},_=mt=>{mt.preventDefault(),mt.stopPropagation()},et=mt=>{L(),mt.preventDefault()};return _jsx(Box,{className:d.searchRoot,children:_jsx(Pr,{icon:R,to:r.to,onClick:et,disableHighlight:!0,children:_jsx(TextField,{placeholder:"Search",value:s,onClick:_,onChange:K,onKeyDown:M,className:d.searchContainer,InputProps:{disableUnderline:!0,className:d.searchField},inputProps:{className:d.searchFieldHTMLInput}})})})}const ai=(0,Fn.A)("div")({flex:1},{name:"BackstageSidebarSpace"}),ii=(0,Fn.A)("div")({height:8},{name:"BackstageSidebarSpacer"}),xa=(0,Fn.A)("hr")(({theme:r})=>({height:1,width:"100%",background:"#383838",border:"none",margin:r.spacing(1.2,0)}),{name:"BackstageSidebarDivider"}),Ca=r=>({overflowY:"auto","&::-webkit-scrollbar":{backgroundColor:r.palette.background.default,width:"5px",borderRadius:"5px"},"&::-webkit-scrollbar-thumb":{backgroundColor:r.palette.text.secondary,borderRadius:"5px"}}),ci=(0,Fn.A)("div")(({theme:r})=>{const e=Ca(r);return{flex:"0 1 auto",overflowX:"hidden",width:"100%",minHeight:"48px",overflowY:"hidden","@media (hover: none)":e,"&:hover":e}}),li=()=>{const{sidebarConfig:r}=useContext(SidebarConfigContext),e=Wn(r),{isOpen:s,setOpen:a}=useSidebarOpenState();if(useMediaQuery(L=>L.breakpoints.down("md"),{noSsr:!0}))return null;const R=()=>{a(!s)};return _jsx(Button,{role:"button",onClick:R,className:e.expandButton,"aria-label":"Expand Sidebar","data-testid":"sidebar-expand-button",children:_jsx(Box,{className:e.arrows,children:s?_jsx(DoubleArrowLeft,{}):_jsx(DoubleArrowRight,{})})})},Pa=(0,ke.A)({root:{width:Ee.hC.drawerWidthClosed,height:3*Ee.hC.logoHeight,display:"flex",flexFlow:"row nowrap",alignItems:"center",marginBottom:-14},link:{width:Ee.hC.drawerWidthClosed,marginLeft:24}}),Oa=()=>{const r=Pa(),{isOpen:e}=Ts();return(0,o.jsx)("div",{className:r.root,children:(0,o.jsx)(dr.N_,{to:"/docs/default/component/local/",underline:"none",className:r.link,children:e?(0,o.jsx)(Ho,{}):(0,o.jsx)(Go,{})})})},ba=({children:r})=>(0,o.jsxs)(ur.G,{children:[(0,o.jsxs)(ca,{children:[(0,o.jsx)(Oa,{}),(0,o.jsx)(xa,{}),(0,o.jsx)(Pr,{icon:ko.A,to:"/docs/default/component/local",text:"Docs Preview"})]}),r]});var Ra=t(71677),Sa=t(62437),Ta=t(55484),Ia=t(58269),Da=t(16203);const Ma=(0,ke.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 Or;(function(r){r.LIGHT="light",r.DARK="dark"})(Or||(Or={}));const wa=()=>{const r=(0,pn.gf)(In),e=Ma(),[s,a]=(0,l.useState)(r.getActiveThemeId()==="dark"?"dark":"light"),d={light:{icon:Ta.A,title:"Dark theme"},dark:{icon:Sa.A,title:"Light theme"}},{title:R,icon:L}=d[s],M=()=>{a(K=>{const _=K==="light"?"dark":"light";return r.setActiveThemeId(_),_})};return(0,o.jsx)(Ye.A,{display:"flex",alignItems:"center",mr:2,children:(0,o.jsx)(Ra.Ay,{title:R,arrow:!0,children:(0,o.jsx)(gr.A,{size:"small",onClick:M,children:(0,o.jsx)(L,{className:e.headerIcon})})})})},La=()=>(0,o.jsxs)(g.Wj,{children:[(0,o.jsx)(Ia.T,{}),(0,o.jsx)(Da.p,{withSearch:!1})]}),Ba=(0,o.jsx)(La,{}),br=Ro({apis:$o,configLoader:Ko,plugins:Object.values(n)}),ja=br.getProvider(),Ua=br.getRouter(),$a=g.Ju.provide((0,c.Hr)({name:"ThemeToggleAddon",component:wa,location:h.e.Header})),Fa=(0,o.jsxs)(er,{children:[(0,o.jsx)(v.C5,{to:"/docs/default/component/local/"},"/"),(0,o.jsx)(v.qh,{path:"/catalog/:namespace/:kind/:name",element:(0,o.jsx)(Bo,{})}),(0,o.jsx)(v.qh,{path:"/docs",element:(0,o.jsx)(g.$j,{}),children:(0,o.jsx)(u.K,{})}),(0,o.jsxs)(v.qh,{path:"/docs/:namespace/:kind/:name/*",element:(0,o.jsx)(g.Wj,{}),children:[Ba,(0,o.jsx)(c.po,{children:(0,o.jsx)($a,{})})]})]}),Wa=()=>(0,o.jsx)(ja,{children:(0,o.jsx)(Ua,{children:(0,o.jsx)(ba,{children:Fa})})});y.createRoot(document.getElementById("root")).render((0,o.jsx)(Wa,{}))},43836:(z,P,t)=>{"use strict";t.d(P,{qO:()=>y,tK:()=>l});var n=t(14041),o=t(63544);function l(g){return(0,o.Q)(g,()=>(0,n.createContext)(void 0))}function y(g){return(0,n.useContext)(l(g))}function v(g){return{set(u){globalThis[`__@backstage/${g}__`]=createContext(createVersionedValueMap(u))},reset(){delete globalThis[`__@backstage/${g}__`]}}}},10602:(z,P,t)=>{"use strict";t.d(P,{B:()=>n});function n(o){Object.freeze(o);const l={atVersion(y){return o[y]}};return Object.defineProperty(l,"$map",{configurable:!0,enumerable:!0,get(){return o}}),l}},63544:(z,P,t)=>{"use strict";t.d(P,{Q:()=>y});function n(){return typeof window<"u"&&window.Math===Math?window:typeof self<"u"&&self.Math===Math?self:Function("return this")()}const o=n(),l=v=>`__@backstage/${v}__`;function y(v,g){const u=l(v);let c=o[u];return c||(c=g(),o[u]=c,c)}},73571:(z,P,t)=>{"use strict";t.d(P,{Ej:()=>E,b1:()=>h,pG:()=>c});var n=t(31085),o=t(39066),l=t(83839),y=t(66243),v=t(66574),g=t(32696),u=t(14041);const c={entityContentTitle:(0,o.T)().with({id:"catalog.entity-content-title"}),entityFilterFunction:(0,o.T)().with({id:"catalog.entity-filter-function"}),entityFilterExpression:(0,o.T)().with({id:"catalog.entity-filter-expression"})};function h(m){const A="configSchema"in m?m.configSchema:(0,l.Z)(i=>i.object({filter:i.string().optional()}));return(0,y.w)({kind:"entity-card",namespace:m.namespace,name:m.name,attachTo:m.attachTo??{id:"entity-content:catalog/overview",input:"cards"},disabled:m.disabled??!0,output:{element:v.X.reactElement,filterFunction:c.entityFilterFunction.optional(),filterExpression:c.entityFilterExpression.optional()},inputs:m.inputs,configSchema:A,factory({config:i,inputs:C,node:f}){const O=(0,u.lazy)(()=>m.loader({inputs:C,config:i}).then(S=>({default:()=>S})));return{element:(0,n.jsx)(g.u,{node:f,children:(0,n.jsx)(O,{})}),...p({config:i,options:m})}}})}function E(m){return(0,y.w)({kind:"entity-content",namespace:m.namespace,name:m.name,attachTo:m.attachTo??{id:"page:catalog/entity",input:"contents"},disabled:m.disabled??!0,output:{element:v.X.reactElement,path:v.X.routePath,routeRef:v.X.routeRef.optional(),title:c.entityContentTitle,filterFunction:c.entityFilterFunction.optional(),filterExpression:c.entityFilterExpression.optional()},inputs:m.inputs,configSchema:(0,l.Z)(A=>A.object({path:A.string().default(m.defaultPath),title:A.string().default(m.defaultTitle),filter:A.string().optional()})),factory({config:A,inputs:i,node:C}){const f=(0,u.lazy)(()=>m.loader({inputs:i}).then(O=>({default:()=>O})));return{path:A.path,title:A.title,routeRef:m.routeRef,element:(0,n.jsx)(g.u,{node:C,children:(0,n.jsx)(f,{})}),...p({config:A,options:m})}}})}function p(m){const{options:A,config:i}=m;return i.filter?{filterExpression:i.filter}:typeof A.filter=="string"?{filterExpression:A.filter}:typeof A.filter=="function"?{filterFunction:A.filter}:{}}},7341:(z,P,t)=>{"use strict";t.d(P,{v:()=>o});var n=t(55309);const o=(0,n.y)({id:"plugin.catalog.service"})},82292:(z,P,t)=>{"use strict";t.d(P,{n:()=>o});var n=t(55309);const o=(0,n.y)({id:"plugin.catalog.entity-presentation"})},88083:(z,P,t)=>{"use strict";t.d(P,{T:()=>v});var n=t(6820),o=t(72348),l=t(46123),y=t.n(l);function v(c,h){const{kind:E,namespace:p,name:m,title:A,description:i,displayName:C,type:f}=g(c),O=(0,n.U2)({kind:E||"unknown",namespace:p||o.oQ,name:m||"unknown"}),S=u({kind:E,namespace:p,name:m,context:h}),I=[C,A,S].find(w=>w&&typeof w=="string"),D=[I!==O?O:void 0,f,i].filter(w=>w&&typeof w=="string").join(" | ");return{entityRef:O,primaryTitle:I,secondaryTitle:D||void 0,Icon:void 0}}function g(c){if(typeof c=="string"){let h=c.indexOf(":");const E=c.indexOf("/");E!==-1&&E<h&&(h=-1);const p=h===-1?void 0:c.slice(0,h),m=E===-1?void 0:c.slice(h+1,E),A=c.slice(Math.max(h+1,E+1));return{kind:p,namespace:m,name:A}}if(typeof c=="object"&&c!==null){const h=[y()(c,"kind")].find(f=>f&&typeof f=="string"),E=[y()(c,"metadata.namespace"),y()(c,"namespace")].find(f=>f&&typeof f=="string"),p=[y()(c,"metadata.name"),y()(c,"name")].find(f=>f&&typeof f=="string"),m=[y()(c,"metadata.title")].find(f=>f&&typeof f=="string"),A=[y()(c,"metadata.description")].find(f=>f&&typeof f=="string"),i=[y()(c,"spec.profile.displayName")].find(f=>f&&typeof f=="string"),C=[y()(c,"spec.type")].find(f=>f&&typeof f=="string");return{kind:h,namespace:E,name:p,title:m,description:A,displayName:i,type:C}}return{}}function u(c){const h=c.kind?.toLocaleLowerCase("en-US")||"unknown",E=c.namespace||o.oQ,p=c.name||"unknown",m=c.context?.defaultKind?.toLocaleLowerCase("en-US"),A=c.context?.defaultNamespace?.toLocaleLowerCase("en-US");let i=p;return(A&&E.toLocaleLowerCase("en-US")!==A||E!==o.oQ)&&(i=`${E}/${i}`),m&&h.toLocaleLowerCase("en-US")!==m&&(i=`${h}:${i}`),i}},3169:(z,P,t)=>{"use strict";t.d(P,{f:()=>u});var n=t(6820),o=t(72427),l=t(14041),y=t(82292),v=t(88083);function g(c,h,E){const[p,m]=(0,l.useState)(c);return(0,l.useEffect)(()=>{m(c);const A=h?.subscribe({next:i=>{m(i)},complete:()=>{A?.unsubscribe()}});return()=>{A?.unsubscribe()}},E),p}function u(c,h){const p=(0,o.Q2)().get(y.n),m=[p,JSON.stringify(c),JSON.stringify(h||null)],A=(0,l.useMemo)(()=>{if(!p){const i=(0,v.T)(c,h);return{snapshot:i,promise:Promise.resolve(i)}}return p.forEntity(typeof c=="string"||"metadata"in c?c:(0,n.U2)(c),h)},m);return g(A.snapshot,A.update$,[A])}},18:(z,P,t)=>{"use strict";t.d(P,{a:()=>o});var n=t(55309);const o=(0,n.y)({id:"catalog-react.starred-entities"})},54203:(z,P,t)=>{"use strict";t.d(P,{GI:()=>C});var n=t(31085),o=t(14041),l=t(77125),y=t(64947),v=t(73845),g=t(42899),u=t(72501),c=t(5893),h=t(54917),E=t(65859),p=t(64630),m=t(87849);const A=f=>{const O=(0,c.A)($=>$.breakpoints.down(f.options?.drawerBreakpoint??"md")),S=(0,h.A)(),[I,D]=(0,o.useState)(!1),{t:w}=(0,m.i)(p.j);return O?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(y.A,{style:{marginTop:S.spacing(1),marginLeft:S.spacing(1)},onClick:()=>D(!0),startIcon:(0,n.jsx)(E.A,{}),children:w("catalogFilter.buttonTitle")}),(0,n.jsx)(v.Ay,{open:I,onClose:()=>D(!1),anchor:f.options?.drawerAnchor??"left",disableAutoFocus:!0,keepMounted:!0,variant:"temporary",children:(0,n.jsxs)(l.A,{m:2,children:[(0,n.jsx)(u.A,{variant:"h6",component:"h2",style:{marginBottom:S.spacing(1)},children:w("catalogFilter.title")}),f.children]})})]}):(0,n.jsx)(g.A,{item:!0,lg:2,children:f.children})},i=f=>(0,n.jsx)(g.A,{item:!0,xs:12,lg:10,children:f.children}),C=f=>(0,n.jsx)(g.A,{container:!0,style:{position:"relative"},children:f.children});C.Filters=A,C.Content=i},50207:(z,P,t)=>{"use strict";t.d(P,{y:()=>B});var n=t(31085),o=t(77125),l=t(72501),y=t(58837),v=t(6924),g=t(20577),u=t(14041),c=t(72427),h=t(73466),E=t(7341),p=t(69076),m=t(86901),A=t(44148),i=t(41260);const C=(0,n.jsx)(i.A,{fontSize:"small"}),f=(0,n.jsx)(A.A,{fontSize:"small"});function O({selected:V}){return(0,n.jsx)(p.A,{icon:C,checkedIcon:f,checked:V})}const S=(0,u.memo)(V=>{const{selected:J,value:rt,availableOptions:lt,showCounts:ht}=V,Ct=ht?`${rt} (${lt?.[rt]})`:rt;return(0,n.jsx)(m.A,{control:(0,n.jsx)(O,{selected:J}),label:Ct,onClick:Rt=>Rt.preventDefault()})});var I=t(16249),D=t(53373),w=t.n(D);const $=(0,y.A)({input:{}},{name:"CatalogReactEntityAutocompletePickerInput"});function H(V){const J=$();return(0,n.jsx)(I.A,{variant:"outlined",...V,className:w()(J.input,V.className)})}var G=t(21405),F=t(26796);const Q=(0,y.A)({root:{},label:{}},{name:"CatalogReactEntityAutocompletePicker"});function B(V){const{label:J,name:rt,path:lt,showCounts:ht,Filter:Ct,InputProps:Rt,initialSelectedOptions:st=[],filtersForAvailableValues:at=["kind"]}=V,ot=Q(),{updateFilters:ft,filters:At,queryParameters:{[rt]:yt}}=(0,G.nK)(),St=(0,c.gf)(E.v),Tt=at.map(gt=>At[gt]),{value:wt}=(0,h.A)(async()=>{const gt=lt,{facets:it}=await St.getEntityFacets({facets:[gt],filter:(0,F.Rr)(Tt.filter(Boolean))});return Object.fromEntries(it[gt].map(({value:Ot,count:Lt})=>[Ot,Lt]))},[...Tt]),$t=(0,u.useMemo)(()=>[yt].flat().filter(Boolean),[yt]),[Pt,k]=(0,u.useState)($t.length?$t:At[rt]?.values??st);(0,u.useEffect)(()=>{$t.length&&k($t)},[$t]);const Z=Object.keys(wt??{}),ct=Pt.length&&Z.length;(0,u.useEffect)(()=>{ft({[rt]:ct?new Ct(Pt):void 0})},[rt,ct,Pt,Ct,ft]);const xt=At[rt];return xt&&typeof xt=="object"&&!("values"in xt)||!Z.length?null:(0,n.jsx)(o.A,{className:ot.root,pb:1,pt:1,children:(0,n.jsxs)(l.A,{className:ot.label,variant:"button",component:"label",children:[J,(0,n.jsx)(g.Ay,{PopperComponent:gt=>(0,n.jsx)("div",{...gt,children:gt.children}),multiple:!0,disableCloseOnSelect:!0,options:Z,value:Pt,onChange:(gt,it)=>k(it),renderOption:(gt,{selected:it})=>(0,n.jsx)(S,{selected:it,value:gt,availableOptions:wt,showCounts:!!ht}),size:"small",popupIcon:(0,n.jsx)(v.A,{"data-testid":`${String(rt)}-picker-expand`}),renderInput:gt=>(0,n.jsx)(H,{...gt,...Rt})})]})})}},52399:(z,P,t)=>{"use strict";t.d(P,{d:()=>c});var n=t(31085),o=t(77125),l=t(71677),y=t(58837),v=t(14041),g=t(3169);const u=(0,y.A)(h=>({root:{display:"inline-flex",alignItems:"center"},icon:{marginRight:h.spacing(.5),color:h.palette.text.secondary,lineHeight:0}}),{name:"CatalogReactEntityDisplayName"}),c=h=>{const{entityRef:E,hideIcon:p,disableTooltip:m,defaultKind:A,defaultNamespace:i}=h,C=u(),{primaryTitle:f,secondaryTitle:O,Icon:S}=(0,g.f)(E,{defaultKind:A,defaultNamespace:i});let I=(0,n.jsx)(n.Fragment,{children:f});return I=(0,n.jsxs)(o.A,{component:"span",className:C.root,children:[S&&!p?(0,n.jsx)(o.A,{component:"span",className:C.icon,children:(0,n.jsx)(S,{fontSize:"inherit"})}):null,I]}),O&&!m&&(I=(0,n.jsx)(l.Ay,{enterDelay:1500,title:O,children:I})),I}},72987:(z,P,t)=>{"use strict";t.d(P,{t:()=>$t});var n=t(31085),o=t(6820),l=t(77125),y=t(69076),v=t(86901),g=t(16249),u=t(72501),c=t(71677),h=t(58837),E=t(44148),p=t(41260),m=t(6924),A=t(20577),i=t(14041),C=t(21405),f=t(92822),O=t(92367),S=t(48108),I=t(47966),D=t(90184),w=t(72427),$=t(87290),H=t(7341),G=t(46123),F=t.n(G);function Q({enabled:Pt}){const k=(0,w.gf)(H.v),[Z]=(0,i.useState)(async()=>{if(!Pt)return[];const ct="relations.ownedBy",gt=(await k.getEntityFacets({facets:[ct]})).facets[ct].map(it=>it.value);return k.getEntitiesByRefs({entityRefs:gt}).then(it=>it.items.filter(Ot=>Ot!==void 0).map(Ot=>Ot).sort((Ot,Lt)=>(Ot.metadata.namespace||"").localeCompare(Lt.metadata.namespace||"","en-US")||(F()(Ot,"spec.profile.displayName")||Ot.metadata.title||Ot.metadata.name).localeCompare(F()(Lt,"spec.profile.displayName")||Lt.metadata.title||Lt.metadata.name,"en-US")||Ot.kind.localeCompare(Lt.kind,"en-US"))).then(it=>it).catch(()=>[])});return(0,$.A)(async(ct,xt)=>{const gt=await Z;if(!gt)return{items:[]};const it=xt?.limit??20,{text:Ot,start:Lt}=B(ct),Ft=gt.filter(Gt=>rt(Ot,Gt)),Mt=Lt+it;return{items:Ft.slice(0,Mt),...J({entities:Ft,limit:Mt,payload:{text:Ot,start:Mt}})}},[Z],{loading:!0,value:{items:[]}})}function B(Pt){return V(Pt)&&Pt.cursor?JSON.parse(atob(Pt.cursor)):{text:Pt.text||"",start:0}}function V(Pt){return!!Pt.cursor}function J({entities:Pt,limit:k,payload:Z}){return Pt.length>k?{cursor:btoa(JSON.stringify(Z))}:{}}function rt(Pt,k){const Z=Pt.trim();return k.kind.includes(Z)||k.metadata.namespace?.includes(Z)||k.metadata.name.includes(Z)||k.metadata.title?.includes(Z)||F()(k,"spec.profile.displayName")?.includes(Z)}function lt(){const Pt=(0,w.gf)(H.v);return(0,$.A)(async(k,Z)=>{const ct=k,xt=k,gt=Z?.limit??20;if(xt.cursor){const Ot=await Pt.queryEntities({cursor:xt.cursor,limit:gt});return{cursor:Ot.pageInfo.nextCursor,items:[...xt.items,...Ot.items]}}const it=await Pt.queryEntities({fullTextFilter:{term:ct.text||"",fields:["metadata.name","kind","spec.profile.displayname","metadata.title"]},filter:{kind:["User","Group"]},orderFields:[{field:"metadata.name",order:"asc"}],limit:gt});return{cursor:it.pageInfo.nextCursor,items:it.items}},[],{loading:!0})}var ht=t(76842);function Ct({mode:Pt,initialSelectedOwnersRefs:k}){const Z=Pt==="owners-only",ct=lt(),xt=Q({enabled:Z}),[gt,it]=Z?xt:ct;return[gt,it,Rt({enabled:!Z,initialSelectedOwnersRefs:k})]}function Rt({enabled:Pt,initialSelectedOwnersRefs:k}){const Z=(0,i.useRef)({}),ct=(0,w.gf)(H.v),[,xt]=(0,$.A)(async()=>{(await ct.getEntitiesByRefs({entityRefs:k})).items.forEach(it=>{it&&(Z.current[(0,o.U2)(it)]=it)})},[]);return(0,ht.u)(()=>{Pt&&k.length>0&&xt()}),{getEntity:gt=>Z.current[gt],setEntity:gt=>{Z.current[(0,o.U2)(gt)]=gt}}}var st=t(7031),at=t(3169),ot=t(64630),ft=t(87849);const At=(0,h.A)({root:{},label:{},input:{},fullWidth:{width:"100%"},boxLabel:{width:"100%",textOverflow:"ellipsis",overflow:"hidden"}},{name:"CatalogReactEntityOwnerPicker"}),yt=(0,st.A)(Pt=>({label:{width:"100%"},root:{width:"90%"}}),{name:"FixedWidthFormControlLabel"})(v.A),St=(0,n.jsx)(p.A,{fontSize:"small"}),Tt=(0,n.jsx)(E.A,{fontSize:"small"});function wt(Pt){const k=At(),Z=Pt.entity.kind.toLocaleLowerCase("en-US")==="group",{primaryTitle:ct}=(0,at.f)(Pt.entity);return(0,n.jsx)(l.A,{className:k.fullWidth,children:(0,n.jsx)(yt,{className:k.fullWidth,control:(0,n.jsx)(y.A,{icon:St,checkedIcon:Tt,checked:Pt.isSelected}),onClick:xt=>xt.preventDefault(),label:(0,n.jsx)(c.Ay,{title:ct,children:(0,n.jsxs)(l.A,{display:"flex",alignItems:"center",children:[Z?(0,n.jsx)(I.A,{fontSize:"small"}):(0,n.jsx)(S.A,{fontSize:"small"}),"\xA0",(0,n.jsx)(l.A,{className:k.boxLabel,children:(0,n.jsx)(u.A,{noWrap:!0,children:ct})})]})})})})}const $t=Pt=>{const k=At(),{mode:Z="owners-only"}=Pt||{},{updateFilters:ct,filters:xt,queryParameters:{owners:gt}}=(0,C.nK)(),[it,Ot]=(0,i.useState)(""),{t:Lt}=(0,ft.i)(ot.j),Ft=(0,i.useMemo)(()=>[gt].flat().filter(Boolean),[gt]),[Mt,Gt]=(0,i.useState)(Ft.length?Ft:xt.owners?.values??[]),[{value:ue,loading:le},he,Qt]=Ct({mode:Z,initialSelectedOwnersRefs:Mt});(0,O.s)(()=>he({text:it}),[it,he],250);const Xt=ue?.items||[];return(0,i.useEffect)(()=>{if(Ft.length){const jt=new f.N9(Ft);Gt(jt.values)}},[Ft]),(0,i.useEffect)(()=>{ct({owners:Mt.length?new f.N9(Mt):void 0})},[Mt,ct]),["user","group"].includes(xt.kind?.value.toLocaleLowerCase("en-US")||"")?null:(0,n.jsx)(l.A,{className:k.root,pb:1,pt:1,children:(0,n.jsxs)(u.A,{className:k.label,variant:"button",component:"label",children:[Lt("entityOwnerPicker.title"),(0,n.jsx)(A.Ay,{PopperComponent:jt=>(0,n.jsx)("div",{...jt,children:jt.children}),multiple:!0,disableCloseOnSelect:!0,loading:le,options:Xt,value:Mt,getOptionSelected:(jt,Zt)=>typeof Zt=="string"?(0,o.U2)(jt)===Zt:jt===Zt,getOptionLabel:jt=>{const Zt=typeof jt=="string"?Qt.getEntity(jt)||(0,o.KU)(jt,{defaultKind:"group",defaultNamespace:"default"}):jt;return(0,D.Z)(Zt,(0,D.S)(Zt))},onChange:(jt,Zt)=>{Ot(""),Gt(Zt.map(pe=>{const Be=typeof pe=="string"?pe:(0,o.U2)(pe);return typeof pe!="string"&&Qt.setEntity(pe),Be}))},filterOptions:jt=>jt,renderOption:(jt,{selected:Zt})=>(0,n.jsx)(wt,{entity:jt,isSelected:Zt}),size:"small",popupIcon:(0,n.jsx)(m.A,{"data-testid":"owner-picker-expand"}),renderInput:jt=>(0,n.jsx)(g.A,{...jt,className:k.input,onChange:Zt=>{Ot(Zt.currentTarget.value)},variant:"outlined"}),ListboxProps:{onScroll:jt=>{const Zt=jt.currentTarget;Math.abs(Zt.scrollHeight-Zt.clientHeight-Zt.scrollTop)<1&&ue?.cursor&&he({items:ue.items,cursor:ue.cursor})},"data-testid":"owner-picker-listbox"}})]})})}},29463:(z,P,t)=>{"use strict";t.d(P,{z:()=>h});var n=t(31085),o=t(6820),l=t(72348),y=t(72072),v=t(9222),g=t(14041),u=t(29207),c=t(52399);const h=(0,g.forwardRef)((p,m)=>{const{entityRef:A,defaultKind:i,defaultNamespace:C,title:f,children:O,hideIcon:S,...I}=p,D=E(p.entityRef),w=O??f??(0,n.jsx)(c.d,{entityRef:A,defaultKind:i,defaultNamespace:C,hideIcon:S});return(0,n.jsx)(y.N_,{...I,ref:m,to:D,children:w})});function E(p){const m=(0,v.S)(u.s);let A,i,C;if(typeof p=="string"){const O=(0,o.KU)(p);A=O.kind,i=O.namespace,C=O.name}else"metadata"in p?(A=p.kind,i=p.metadata.namespace,C=p.metadata.name):(A=p.kind,i=p.namespace,C=p.name);A=A.toLocaleLowerCase("en-US"),i=i?.toLocaleLowerCase("en-US")??l.oQ;const f={kind:encodeURIComponent(A),namespace:encodeURIComponent(i),name:encodeURIComponent(C)};return m(f)}},34428:(z,P,t)=>{"use strict";t.d(P,{i:()=>v});var n=t(31085),o=t(6820),l=t(14041),y=t(29463);function v(g){const{entityRefs:u,hideIcons:c,...h}=g;return(0,n.jsx)(n.Fragment,{children:u.map((E,p)=>{const m=typeof E=="string"?E:(0,o.U2)(E);return(0,n.jsxs)(l.Fragment,{children:[p>0&&", ",(0,n.jsx)(y.z,{...h,entityRef:E,hideIcon:c})]},`${p}.${m}`)})})}},90184:(z,P,t)=>{"use strict";t.d(P,{S:()=>y,Z:()=>v});var n=t(72348),o=t(46123),l=t.n(o);function y(g,u){const c=u?.defaultKind;let h,E,p;return"metadata"in g?(h=g.kind,E=g.metadata.namespace,p=g.metadata.name):(h=g.kind,E=g.namespace,p=g.name),(E===void 0||E==="")&&(E=n.oQ),u?.defaultNamespace!==void 0?u?.defaultNamespace===E&&(E=void 0):E===n.oQ&&(E=void 0),h=h.toLocaleLowerCase("en-US"),h=c&&c.toLocaleLowerCase("en-US")===h?void 0:h,`${h?`${h}:`:""}${E?`${E}/`:""}${p}`}function v(g,u){for(const c of["spec.profile.displayName","metadata.title"]){const h=l()(g,c);if(h&&typeof h=="string")return h}return u}},91035:(z,P,t)=>{"use strict";t.d(P,{m:()=>h});var n=t(31085),o=t(58837),l=t(14041),y=t(92822),v=t(50207),g=t(64630),u=t(87849);const c=(0,o.A)({input:{}},{name:"CatalogReactEntityTagPicker"}),h=E=>{const p=c(),{t:m}=(0,u.i)(g.j);return(0,n.jsx)(v.y,{label:m("entityTagPicker.title"),name:"tags",path:"metadata.tags",Filter:y.q_,showCounts:E.showCounts,InputProps:{className:p.input}})}},67626:(z,P,t)=>{"use strict";t.d(P,{y:()=>Rt});var n=t(31085),o=t(72427),l=t(65461),y=t(40703),v=t(58007),g=t(46423),u=t(65569),c=t(5951),h=t(26343),E=t(72501),p=t(58837),m=t(9684),A=t(80109),i=t(14041),C=t(92822),f=t(21405),O=t(16009),S=t(45250),I=t(73466),D=t(7341),w=t(26796),$=t(87290),H=t(48899);function G(){const st=(0,o.gf)(O.K),at=(0,o.gf)(D.v),{filters:ot}=(0,f.nK)(),{value:ft,loading:At}=(0,I.A)(async()=>(await st.getBackstageIdentity()).ownershipEntityRefs,[]),{user:yt,owners:St,...Tt}=ot,wt=(0,w.$3)((0,S.compact)(Object.values(Tt))),[{value:$t,loading:Pt},k]=(0,$.A)(async ct=>{const xt=F(ct.owners,ct.ownershipEntityRefs);if(xt===void 0)return 0;const{["metadata.name"]:gt,...it}=ct.filter.filter,{totalItems:Ot}=await at.queryEntities({...ct.filter,filter:{...it,"relations.ownedBy":xt},limit:0});return Ot},[],{loading:!0});return(0,H.A)(()=>{Object.keys(wt.filter).length!==0&&ft!==void 0&&k({ownershipEntityRefs:ft,owners:St,filter:wt})},[ft,St,wt]),{count:$t,loading:At||Pt,filter:(0,i.useMemo)(()=>C.tN.owned(ft??[]),[ft]),ownershipEntityRefs:ft}}function F(st,at){if(at===void 0)return;const ot=st?.values??[];if(ot.length){const ft=(0,S.intersection)(ot,at);return ft.length===0?void 0:ft}return at}function Q(){const st=(0,o.gf)(D.v),{filters:at}=(0,f.nK)(),ot=(0,i.useRef)(),ft=(0,i.useMemo)(()=>{const{user:St,...Tt}=at,wt=(0,S.compact)(Object.values(Tt)),$t=(0,w.$3)(wt),Pt={...$t,limit:0};return Object.keys($t.filter).length===0?(ot.current=void 0,ot.current):(0,S.isEqual)(Pt,ot.current)?ot.current:(ot.current=Pt,Pt)},[at]),{value:At,loading:yt}=(0,I.A)(async()=>{if(ft===void 0)return 0;const{totalItems:St}=await st.queryEntities(ft);return St},[ft]);return{count:At,loading:yt}}var B=t(6820),V=t(56889);function J(){const st=(0,o.gf)(D.v),{filters:at}=(0,f.nK)(),{starredEntities:ot}=(0,V.I)(),ft=(0,i.useRef)(),At=(0,i.useMemo)(()=>{const{user:wt,...$t}=at,Pt=(0,S.compact)(Object.values($t)),k=(0,w.$3)(Pt),ct={...k,filter:{...k.filter,["metadata.name"]:Array.from(ot).map(xt=>(0,B.KU)(xt).name)},limit:1e3};return(0,S.isEqual)(ct,ft.current)?ft.current:(ft.current=ct,ct)},[at,ot]),{value:yt,loading:St}=(0,I.A)(async()=>ot.size?(await st.queryEntities(At)).items.map($t=>(0,B.U2)({kind:$t.kind,namespace:$t.metadata.namespace,name:$t.metadata.name})).filter($t=>ot.has($t)).length:0,[At,ot]),Tt=(0,i.useMemo)(()=>C.tN.starred(Array.from(ot)),[ot]);return{count:yt,loading:St,filter:Tt}}var rt=t(87849),lt=t(64630);const ht=(0,p.A)(st=>({root:{backgroundColor:"rgba(0, 0, 0, .11)",boxShadow:"none",margin:st.spacing(1,0,1,0)},title:{margin:st.spacing(1,0,0,1),textTransform:"uppercase",fontSize:12,fontWeight:"bold"},listIcon:{minWidth:30,color:st.palette.text.primary},menuItem:{minHeight:st.spacing(6)},groupWrapper:{margin:st.spacing(1,1,2,1)}}),{name:"CatalogReactUserListPicker"});function Ct(st,at){return[{name:at("userListPicker.personalFilter.title"),items:[{id:"owned",label:at("userListPicker.personalFilter.ownedLabel"),icon:m.A},{id:"starred",label:at("userListPicker.personalFilter.starredLabel"),icon:A.A}]},{name:st,items:[{id:"all",label:at("userListPicker.orgFilterAllLabel")}]}]}const Rt=st=>{const{initialFilter:at,availableFilters:ot}=st,ft=ht(),At=(0,o.gf)(l.U),{t:yt}=(0,rt.i)(lt.j),St=At.getOptionalString("organization.name")??yt("userListPicker.defaultOrgName"),{filters:Tt,updateFilters:wt,queryParameters:{kind:$t,user:Pt}}=(0,f.nK)(),k=["starred","all"],Z=Ct(St,yt).map(Qt=>({...Qt,items:Qt.items.filter(({id:Xt})=>["group","user"].some(jt=>jt===$t)?k.includes(Xt):!ot||ot.includes(Xt))})).filter(({items:Qt})=>!!Qt.length),{count:ct,loading:xt,filter:gt}=G(),{count:it}=Q(),{count:Ot,filter:Lt,loading:Ft}=J(),Mt=(0,i.useMemo)(()=>[Pt].flat()[0],[Pt]),[Gt,ue]=(0,i.useState)(Mt??at),le=(0,i.useMemo)(()=>({all:it,starred:Ot,owned:ct}),[Ot,ct,it]);(0,i.useEffect)(()=>{Mt&&ue(Mt)},[Mt]);const he=xt||Ft;return(0,i.useEffect)(()=>{!he&&Gt&&Gt!=="all"&&le[Gt]===0&&ue("all")},[he,le,Gt,ue]),(0,i.useEffect)(()=>{if(!Gt||he)return;wt({user:Gt==="owned"?gt:Gt==="starred"?Lt:C.tN.all()})},[Gt,Lt,gt,wt,he]),(0,n.jsx)(y.A,{className:ft.root,children:Z.map(Qt=>(0,n.jsxs)(i.Fragment,{children:[(0,n.jsx)(E.A,{variant:"subtitle2",component:"span",className:ft.title,children:Qt.name}),(0,n.jsx)(y.A,{className:ft.groupWrapper,children:(0,n.jsx)(v.A,{disablePadding:!0,dense:!0,role:"menu","aria-label":Qt.name,children:Qt.items.map((Xt,jt)=>(0,n.jsxs)(h.A,{role:"none presentation",divider:jt!==Qt.items.length-1,onClick:()=>ue(Xt.id),selected:Xt.id===Tt.user?.value,className:ft.menuItem,disabled:le[Xt.id]===0,"data-testid":`user-picker-${Xt.id}`,tabIndex:0,ContainerProps:{role:"menuitem"},children:[Xt.icon&&(0,n.jsx)(g.A,{className:ft.listIcon,children:(0,n.jsx)(Xt.icon,{fontSize:"small"})}),(0,n.jsx)(c.A,{children:(0,n.jsxs)(E.A,{variant:"body1",children:[Xt.label," "]})}),(0,n.jsx)(u.A,{children:le[Xt.id]??"-"})]},Xt.id))})})]},Qt.name))})}},92822:(z,P,t)=>{"use strict";t.d(P,{I5:()=>h,Kf:()=>A,N9:()=>c,V3:()=>u,gM:()=>y,gZ:()=>m,mT:()=>i,qA:()=>v,q_:()=>g,tN:()=>p,z:()=>E});var n=t(6820),o=t(51372),l=t(67871);class y{value;constructor(f){this.value=f}getCatalogFilters(){return{kind:this.value}}toQueryValue(){return this.value}}class v{value;constructor(f){this.value=f}getTypes(){return Array.isArray(this.value)?this.value:[this.value]}getCatalogFilters(){return{"spec.type":this.getTypes()}}toQueryValue(){return this.getTypes()}}class g{values;constructor(f){this.values=f}filterEntity(f){return this.values.every(O=>(f.metadata.tags??[]).includes(O))}getCatalogFilters(){return{"metadata.tags":this.values}}toQueryValue(){return this.values}}class u{value;constructor(f){this.value=f}filterEntity(f){const O=this.toUpperArray(this.value.split(/\s/)),S=this.toUpperArray([f.metadata.tags]),I=this.toUpperArray([f.metadata.name,f.metadata.title]);for(const D of O)if(S.every(w=>w!==D)&&I.every(w=>!w.includes(D)))return!1;return!0}getFullTextFilters(){return{term:this.value,fields:["metadata.name","metadata.title","spec.profile.displayName"]}}toQueryValue(){return this.value}toUpperArray(f){return f.flat().filter(O=>!!O).map(O=>O.toLocaleUpperCase("en-US"))}}class c{values;constructor(f){this.values=f.reduce((O,S)=>{try{return O.push((0,n.U2)((0,n.KU)(S,{defaultKind:"Group"}))),O}catch{return O}},[])}getCatalogFilters(){return{"relations.ownedBy":this.values}}filterEntity(f){return this.values.some(O=>(0,l.t)(f,o.vv).some(S=>(0,n.U2)(S)===O))}toQueryValue(){return this.values}}class h{values;constructor(f){this.values=f}getCatalogFilters(){return{"spec.lifecycle":this.values}}filterEntity(f){return this.values.some(O=>f.spec?.lifecycle===O)}toQueryValue(){return this.values}}class E{values;constructor(f){this.values=f}getCatalogFilters(){return{"metadata.namespace":this.values}}filterEntity(f){return this.values.some(O=>f.metadata.namespace===O)}toQueryValue(){return this.values}}class p{value;refs;constructor(f,O){this.value=f,this.refs=O}static owned(f){return new p("owned",f)}static all(){return new p("all")}static starred(f){return new p("starred",f)}getCatalogFilters(){return this.value==="owned"?{"relations.ownedBy":this.refs??[]}:this.value==="starred"?{"metadata.name":this.refs?.map(f=>(0,n.KU)(f).name)??[]}:{}}filterEntity(f){if(this.value==="starred")return this.refs?.includes((0,n.U2)(f))??!0;if(this.value==="owned"){const O=(0,l.t)(f,o.vv);return this.refs?.some(S=>O.some(I=>(0,n.U2)(I)===S))??!1}return!0}toQueryValue(){return this.value}}class m{value;isOwnedEntity;isStarredEntity;constructor(f,O,S){this.value=f,this.isOwnedEntity=O,this.isStarredEntity=S}filterEntity(f){switch(this.value){case"owned":return this.isOwnedEntity(f);case"starred":return this.isStarredEntity(f);default:return!0}}toQueryValue(){return this.value}}class A{value;constructor(f){this.value=f}getCatalogFilters(){return this.value?{"metadata.annotations.backstage.io/orphan":String(this.value)}:{}}filterEntity(f){const O=f.metadata.annotations?.["backstage.io/orphan"];return O!==void 0&&this.value.toString()===O}}class i{value;constructor(f){this.value=f}filterEntity(f){const O=f?.status?.items?.length>0;return O!==void 0&&this.value===O}}},99538:(z,P,t)=>{"use strict";t.d(P,{T7:()=>c,TY:()=>p,tN:()=>E});var n=t(31085),o=t(6820),l=t(25862),y=t(43836),v=t(10602),g=t(14041);const u=(0,y.tK)("entity-context"),c=m=>{const{children:A,entity:i,loading:C,error:f,refresh:O}=m,S={entity:i,loading:C,error:f,refresh:O};return(0,n.jsx)(u.Provider,{value:(0,v.B)({1:S}),children:(0,n.jsx)(l.Ig,{attributes:{...i?{entityRef:(0,o.U2)(i)}:void 0},children:A})})},h=m=>_jsx(c,{entity:m.entity,loading:!m.entity,error:void 0,refresh:void 0,children:m.children});function E(){const m=(0,y.qO)("entity-context");if(!m)throw new Error("Entity context is not available");const A=m.atVersion(1);if(!A)throw new Error("EntityContext v1 not available");if(!A.entity)throw new Error("useEntity hook is being called outside of an EntityLayout where the entity has not been loaded. If this is intentional, please use useAsyncEntity instead.");return{entity:A.entity}}function p(){const m=(0,y.qO)("entity-context");if(!m)throw new Error("Entity context is not available");const A=m.atVersion(1);if(!A)throw new Error("EntityContext v1 not available");const{entity:i,loading:C,error:f,refresh:O}=A;return{entity:i,loading:C,error:f,refresh:O}}},21405:(z,P,t)=>{"use strict";t.d(P,{B9:()=>C,nK:()=>f});var n=t(31085),o=t(45250),l=t.n(o),y=t(45810),v=t.n(y),g=t(14041),u=t(18690),c=t(87290),h=t(22771),E=t(71581),p=t(7341),m=t(26796),A=t(72427);const i=(0,g.createContext)(void 0),C=O=>{const S=(0,E.A)(),I=(0,A.gf)(p.v),[D,w]=(0,g.useState)({}),$=(0,u.zy)(),H=O.pagination===!0||typeof O.pagination=="object",G=O.pagination&&typeof O.pagination=="object"&&typeof O.pagination.limit=="number"?O.pagination.limit:20,{queryParameters:F,cursor:Q}=(0,g.useMemo)(()=>{const ot=v().parse($.search,{ignoreQueryPrefix:!0});return{queryParameters:ot.filters??{},cursor:typeof ot.cursor=="string"?ot.cursor:void 0}},[$]),[B,V]=(0,g.useState)(Q),[J,rt]=(0,g.useState)(()=>({appliedFilters:{},entities:[],backendEntities:[],pageInfo:H?{}:void 0})),[{loading:lt,error:ht},Ct]=(0,c.A)(async()=>{const ot=(0,o.compact)(Object.values(D)),ft=Object.keys(D).reduce((At,yt)=>{const St=D[yt];return St?.toQueryValue&&(At[yt]=St.toQueryValue()),At},{});if(H)if(B){if(B!==J.appliedCursor){const At=(0,m.be)(ot),yt=await I.queryEntities({cursor:B,limit:G});rt({appliedFilters:D,appliedCursor:B,backendEntities:yt.items,entities:yt.items.filter(At),pageInfo:yt.pageInfo,totalItems:yt.totalItems})}}else{const At=(0,m.be)(ot),yt=(0,m.$3)(ot),St=(0,m.$3)((0,o.compact)(Object.values(J.appliedFilters)));if(!(0,o.isEqual)(St,yt)){const Tt=await I.queryEntities({...yt,limit:G,orderFields:[{field:"metadata.name",order:"asc"}]});rt({appliedFilters:D,backendEntities:Tt.items,entities:Tt.items.filter(At),pageInfo:Tt.pageInfo,totalItems:Tt.totalItems})}}else{const At=(0,m.be)(ot),yt=(0,m.Rr)(ot),St=(0,m.Rr)((0,o.compact)(Object.values(J.appliedFilters)));if((0,o.isEqual)(St,yt)){const Tt=J.backendEntities.filter(At);rt({appliedFilters:D,backendEntities:J.backendEntities,entities:Tt,totalItems:Tt.length})}else{const Tt=await I.getEntities({filter:yt}),wt=Tt.items.filter(At);rt({appliedFilters:D,backendEntities:Tt.items,entities:wt,totalItems:wt.length})}}if(S()){const At=v().parse($.search,{ignoreQueryPrefix:!0}),yt=v().stringify({...At,filters:ft,cursor:B},{addQueryPrefix:!0,arrayFormat:"repeat"}),St=`${window.location.pathname}${yt}`;window.history?.replaceState(null,document.title,St)}},[I,F,D,J,B,H],{loading:!0});(0,h.A)(Ct,10,[D,B]);const Rt=(0,g.useCallback)(ot=>{V(void 0),w(ft=>{const At=typeof ot=="function"?ot(ft):ot;return{...ft,...At}})},[]),st=(0,g.useMemo)(()=>{if(!H)return;const ot=J.pageInfo?.prevCursor,ft=J.pageInfo?.nextCursor;return{prev:ot?()=>V(ot):void 0,next:ft?()=>V(ft):void 0}},[H,J.pageInfo]),at=(0,g.useMemo)(()=>({filters:J.appliedFilters,entities:J.entities,backendEntities:J.backendEntities,updateFilters:Rt,queryParameters:F,loading:lt,error:ht,pageInfo:st,totalItems:J.totalItems}),[J,Rt,F,lt,ht,st]);return(0,n.jsx)(i.Provider,{value:at,children:O.children})};function f(){const O=(0,g.useContext)(i);if(!O)throw new Error("useEntityList must be used within EntityListProvider");return O}},56889:(z,P,t)=>{"use strict";t.d(P,{I:()=>u});var n=t(6820),o=t(72427),l=t(14041),y=t(1394),v=t(18);function g(c){return typeof c=="string"?c:(0,n.U2)(c)}function u(){const c=(0,o.gf)(v.a),h=(0,y.A)((0,l.useMemo)(()=>c.starredEntitie$(),[c]),new Set),E=(0,l.useCallback)(m=>h.has(g(m)),[h]),p=(0,l.useCallback)(m=>c.toggleStarred(g(m)).then(),[c]);return{starredEntities:h,toggleStarredEntity:p,isStarredEntity:E}}},29207:(z,P,t)=>{"use strict";t.d(P,{s:()=>l});var n=t(34569),o=t(63544);const l=(0,o.Q)("catalog:entity-route-ref",()=>(0,n.H)({id:"catalog:entity",params:["namespace","kind","name"]}));function y(v){return{kind:v.kind.toLocaleLowerCase("en-US"),namespace:v.metadata.namespace?.toLocaleLowerCase("en-US")??DEFAULT_NAMESPACE,name:v.metadata.name}}},64630:(z,P,t)=>{"use strict";t.d(P,{j:()=>o});var n=t(93184);const o=(0,n.h)({id:"catalog-react",messages:{catalogFilter:{title:"Filters",buttonTitle:"Filters"},entityKindPicker:{title:"Kind",errorMessage:"Failed to load entity kinds"},entityLifecyclePicker:{title:"Lifecycle"},entityNamespacePicker:{title:"Namespace"},entityOwnerPicker:{title:"Owner"},entityProcessingStatusPicker:{title:"Processing Status"},entityTagPicker:{title:"Tags"},entityPeekAheadPopover:{title:"Drill into the entity to see all of the tags.",emailCardAction:{title:"Email {{email}}",subTitle:"mailto {{email}}"},entityCardActionsTitle:"Show details"},entitySearchBar:{placeholder:"Search"},entityTypePicker:{title:"Type",errorMessage:"Failed to load entity types",optionAllTitle:"all"},favoriteEntity:{addToFavorites:"Add to favorites",removeFromFavorites:"Remove from favorites"},inspectEntityDialog:{title:"Entity Inspector",closeButtonTitle:"Close",ancestryPage:{title:"Ancestry"},colocatedPage:{title:"Colocated",description:"These are the entities that are colocated with this entity - as in, they originated from the same data source (e.g. came from the same YAML file), or from the same origin (e.g. the originally registered URL).",alertNoLocation:"Entity had no location information.",alertNoEntity:"There were no other entities on this location."},jsonPage:{title:"Entity as JSON",description:"This is the raw entity data as received from the catalog, on JSON form."},overviewPage:{title:"Overview"},yamlPage:{title:"Entity as YAML",description:"This is the raw entity data as received from the catalog, on YAML form."}},unregisterEntityDialog:{title:"Are you sure you want to unregister this entity?",cancelButtonTitle:"Cancel",deleteButtonTitle:"Delete Entity",deleteEntitySuccessMessage:"Removed entity {{entityName}}",bootstrapState:{title:'You cannot unregister this entity, since it originates from a protected Backstage configuration (location "{{location}}"). If you believe this is in error, please contact the {{appTitle}} integrator.',advancedDescription:"You have the option to delete the entity itself from the catalog. Note that this should only be done if you know that the catalog file has been deleted at, or moved from, its origin location. If that is not the case, the entity will reappear shortly as the next refresh round is performed by the catalog.",advancedOptions:"Advanced Options"},onlyDeleteStateTitle:"This entity does not seem to originate from a registered location. You therefore only have the option to delete it outright from the catalog.",unregisterState:{title:"This action will unregister the following entities:",subTitle:"Located at the following location:",description:"To undo, just re-register the entity in {{appTitle}}.",unregisterButtonTitle:"Unregister Location",advancedOptions:"Advanced Options",advancedDescription:"You also have the option to delete the entity itself from the catalog. Note that this should only be done if you know that the catalog file has been deleted at, or moved from, its origin location. If that is not the case, the entity will reappear shortly as the next refresh round is performed by the catalog."},errorStateTitle:"Internal error: Unknown state"},userListPicker:{defaultOrgName:"Company",personalFilter:{title:"Personal",ownedLabel:"Owned",starredLabel:"Starred"},orgFilterAllLabel:"All"}}})},26796:(z,P,t)=>{"use strict";t.d(P,{$3:()=>l,Rr:()=>y,be:()=>v});var n=t(92822);function o(g){return!!g.getFullTextFilters}function l(g){const u=g.reduce((h,E)=>({...h,...E.getCatalogFilters?E.getCatalogFilters():{}}),{}),c=g.find(o)?.getFullTextFilters();return{filter:u,fullTextFilter:c}}function y(g){const u={};return g.forEach(c=>{c instanceof n.q_||c instanceof n.N9||c instanceof n.I5||c instanceof n.z||c instanceof n.tN||c instanceof n.Kf||c instanceof n.V3||c instanceof n.gZ||Object.assign(u,c.getCatalogFilters?.()||{})}),u}function v(g){return u=>g.every(c=>!c.filterEntity||c.filterEntity(u))}},67871:(z,P,t)=>{"use strict";t.d(P,{t:()=>o});var n=t(6820);function o(l,y,v){let g=l?.relations?.filter(u=>u.type===y).map(u=>(0,n.KU)(u.targetRef))||[];return v?.kind&&(g=g.filter(u=>u.kind.toLocaleLowerCase("en-US")===v.kind.toLocaleLowerCase("en-US"))),g}},81053:(z,P,t)=>{"use strict";t.d(P,{Ay:()=>Be});var n=t(8539),o=t(70621),l=t(29207),y=t(95203),v=t(12935),g=t(57405),u=t(70795),c=t(38932),h=t(45843),E=t(59817),p=t(7341),m=t(18),A=t(82292),i=t(50226),C=t(6292);const f=(0,E.k)({factory:(0,v.b)({api:p.v,deps:{discoveryApi:g.I,fetchApi:u.a},factory:({discoveryApi:q,fetchApi:zt})=>new h.d({discoveryApi:q,fetchApi:zt})})}),O=(0,E.k)({factory:(0,v.b)({api:m.a,deps:{storageApi:c.F},factory:({storageApi:q})=>new i.s({storageApi:q})})}),S=(0,E.k)({factory:(0,v.b)({api:A.n,deps:{catalogApiImp:p.v},factory:({catalogApiImp:q})=>C.D.create({catalogApi:q})})}),I=[f,O,S];var D=t(31085),w=t(14041),$=t(71087),H=t(73602);function G(q,zt){return{$$type:"@backstage/ExtensionInput",extensionData:q,config:{singleton:!!zt?.singleton,optional:!!zt?.optional}}}var F=t(66574),Q=t(99538),B=t(73571),V=t(803),J=t(7164);const rt=(0,H.R)({defaultPath:"/catalog",routeRef:(0,n.D)(y.rQ),inputs:{filters:G({element:F.X.reactElement})},loader:async({inputs:q})=>{const{BaseCatalogPage:zt}=await Promise.all([t.e(8721),t.e(6066),t.e(5580)]).then(t.bind(t,85580)),ee=q.filters.map(de=>de.output.element);return(0,$.I)((0,D.jsx)(zt,{filters:(0,D.jsx)(D.Fragment,{children:ee})}))}}),lt=(0,H.R)({name:"entity",defaultPath:"/catalog/:namespace/:kind/:name",routeRef:(0,n.D)(l.s),inputs:{contents:G({element:F.X.reactElement,path:F.X.routePath,routeRef:F.X.routeRef.optional(),title:B.pG.entityContentTitle,filterFunction:B.pG.entityFilterFunction.optional(),filterExpression:B.pG.entityFilterExpression.optional()})},loader:async({inputs:q})=>{const{EntityLayout:zt}=await Promise.all([t.e(8721),t.e(2772),t.e(2745)]).then(t.bind(t,12745)),ee=()=>(0,D.jsx)(Q.T7,{...(0,V.W)(),children:(0,D.jsx)(zt,{children:q.contents.map(({output:de})=>(0,D.jsx)(zt.Route,{path:de.path,title:de.title,if:(0,J.$)(de.filterFunction,de.filterExpression),children:de.element},de.path))})});return(0,$.I)((0,D.jsx)(ee,{}))}}),ht=[rt,lt];var Ct=t(66243),Rt=t(32696);function st(q){return(0,Ct.w)({kind:"catalog-filter",namespace:q.namespace,name:q.name,attachTo:{id:"page:catalog",input:"filters"},inputs:q.inputs??{},configSchema:q.configSchema,output:{element:F.X.reactElement},factory({config:zt,node:ee}){const de=(0,w.lazy)(()=>q.loader({config:zt}).then(Re=>({default:()=>Re})));return{element:(0,D.jsx)(Rt.u,{node:ee,children:(0,D.jsx)(de,{})})}}})}var at=t(83839);const ot=st({name:"tag",loader:async()=>{const{EntityTagPicker:q}=await t.e(5502).then(t.bind(t,75502));return(0,D.jsx)(q,{})}}),ft=st({name:"kind",configSchema:(0,at.Z)(q=>q.object({initialFilter:q.string().default("component")})),loader:async({config:q})=>{const{EntityKindPicker:zt}=await t.e(5502).then(t.bind(t,75502));return(0,D.jsx)(zt,{initialFilter:q.initialFilter})}}),At=st({name:"type",loader:async()=>{const{EntityTypePicker:q}=await t.e(5502).then(t.bind(t,75502));return(0,D.jsx)(q,{})}}),yt=st({name:"mode",configSchema:(0,at.Z)(q=>q.object({mode:q.enum(["owners-only","all"]).optional()})),loader:async({config:q})=>{const{EntityOwnerPicker:zt}=await t.e(5502).then(t.bind(t,75502));return(0,D.jsx)(zt,{mode:q.mode})}}),St=st({name:"namespace",loader:async()=>{const{EntityNamespacePicker:q}=await t.e(5502).then(t.bind(t,75502));return(0,D.jsx)(q,{})}}),Tt=st({name:"lifecycle",loader:async()=>{const{EntityLifecyclePicker:q}=await t.e(5502).then(t.bind(t,75502));return(0,D.jsx)(q,{})}}),wt=st({name:"processing-status",loader:async()=>{const{EntityProcessingStatusPicker:q}=await t.e(5502).then(t.bind(t,75502));return(0,D.jsx)(q,{})}}),$t=st({name:"list",configSchema:(0,at.Z)(q=>q.object({initialFilter:q.enum(["owned","starred","all"]).default("owned")})),loader:async({config:q})=>{const{UserListPicker:zt}=await t.e(5502).then(t.bind(t,75502));return(0,D.jsx)(zt,{initialFilter:q.initialFilter})}}),Pt=[ot,ft,At,yt,St,Tt,wt,$t];var k=t(71374),Z=t(50893);const xt=[(0,Z.Q)({routeRef:(0,n.D)(y.rQ),title:"Catalog",icon:k.A})],gt=(0,B.b1)({name:"about",loader:async()=>Promise.all([t.e(8721),t.e(9797),t.e(4943)]).then(t.bind(t,74943)).then(q=>(0,$.I)((0,D.jsx)(q.AboutCard,{variant:"gridItem"})))}),it=(0,B.b1)({name:"links",filter:"has:links",loader:async()=>t.e(8307).then(t.bind(t,18307)).then(q=>(0,$.I)((0,D.jsx)(q.EntityLinksCard,{variant:"gridItem"})))}),Ot=(0,B.b1)({name:"labels",filter:"has:labels",loader:async()=>t.e(3182).then(t.bind(t,63182)).then(q=>(0,$.I)((0,D.jsx)(q.EntityLabelsCard,{variant:"gridItem"})))}),Lt=(0,B.b1)({name:"depends-on-components",loader:async()=>t.e(3632).then(t.bind(t,3632)).then(q=>(0,$.I)((0,D.jsx)(q.DependsOnComponentsCard,{variant:"gridItem"})))}),Ft=(0,B.b1)({name:"depends-on-resources",loader:async()=>t.e(287).then(t.bind(t,20287)).then(q=>(0,$.I)((0,D.jsx)(q.DependsOnResourcesCard,{variant:"gridItem"})))}),Mt=(0,B.b1)({name:"has-components",loader:async()=>t.e(2420).then(t.bind(t,52420)).then(q=>(0,$.I)((0,D.jsx)(q.HasComponentsCard,{variant:"gridItem"})))}),Gt=(0,B.b1)({name:"has-resources",loader:async()=>t.e(6271).then(t.bind(t,56271)).then(q=>(0,$.I)((0,D.jsx)(q.HasResourcesCard,{variant:"gridItem"})))}),ue=(0,B.b1)({name:"has-subcomponents",loader:async()=>t.e(8384).then(t.bind(t,78384)).then(q=>(0,$.I)((0,D.jsx)(q.HasSubcomponentsCard,{variant:"gridItem"})))}),le=(0,B.b1)({name:"has-systems",loader:async()=>t.e(9652).then(t.bind(t,9652)).then(q=>(0,$.I)((0,D.jsx)(q.HasSystemsCard,{variant:"gridItem"})))}),he=[gt,it,Ot,Lt,Ft,Mt,Gt,ue,le],Xt=[(0,B.Ej)({name:"overview",defaultPath:"/",defaultTitle:"Overview",disabled:!1,inputs:{cards:G({element:F.X.reactElement,filterFunction:B.pG.entityFilterFunction.optional(),filterExpression:B.pG.entityFilterExpression.optional()})},loader:async({inputs:q})=>t.e(4400).then(t.bind(t,4400)).then(zt=>(0,D.jsx)(zt.EntityOverviewPage,{cards:q.cards.map(ee=>ee.output)}))})];var jt=t(63552);const pe=[(0,jt.e)({predicate:q=>q.type==="software-catalog",component:()=>t.e(1297).then(t.bind(t,61297)).then(q=>q.CatalogSearchResultListItem)})],Be=(0,o.i)({id:"catalog",routes:(0,n.o)({catalogIndex:y.rQ,catalogEntity:l.s}),externalRoutes:(0,n.o)({viewTechDoc:y.UJ,createComponent:y.qP,createFromTemplate:y.Zg,unregisterRedirect:y.pS}),extensions:[...I,...ht,...Pt,...xt,...he,...Xt,...pe]})},7164:(z,P,t)=>{"use strict";t.d(P,{O:()=>O,$:()=>f});var n=t(31085),o=t(42899),l=t(14041),y=t(97142);function v(S,I){const D=S.map(w=>w.toLocaleLowerCase("en-US"));return w=>D.includes(w.kind.toLocaleLowerCase("en-US"))}function g(S,I){const D=S.map(w=>w.toLocaleLowerCase("en-US"));return w=>{const $=w.spec?.type;return typeof $=="string"&&D.includes($.toLocaleLowerCase("en-US"))}}const u={orphan:S=>!!S.metadata.annotations?.["backstage.io/orphan"]};function c(S,I){const D=S.flatMap(w=>{const $=u[w.toLocaleLowerCase("en-US")];if(!$){const H=Object.keys(u).map(G=>`'${G}'`);return I(new y.dz(`'${w}' is not a valid parameter for 'is' filter expressions, expected one of ${H}`)),[]}return[$]});return w=>D.length?D.some($=>$(w)):!0}const h={labels:S=>Object.keys(S.metadata.labels??{}).length>0,links:S=>(S.metadata.links??[]).length>0};function E(S,I){const D=S.flatMap(w=>{const $=h[w.toLocaleLowerCase("en-US")];if(!$){const H=Object.keys(h).map(G=>`'${G}'`);return I(new y.dz(`'${w}' is not a valid parameter for 'has' filter expressions, expected one of ${H}`)),[]}return[$]});return w=>D.length?D.some($=>$(w)):!0}const p={kind:v,type:g,is:c,has:E};function m(S){const I=[],w=A(S,H=>I.push(H)).flatMap(H=>{const G=p[H.key];if(!G){const Q=Object.keys(p).map(B=>`'${B}'`);return I.push(new y.dz(`'${H.key}' is not a valid filter expression key, expected one of ${Q}`)),[]}return[G(H.parameters,Q=>I.push(Q))]});return{filterFn:H=>w.every(G=>{try{return G(H)}catch{return!1}}),expressionParseErrors:I}}function A(S,I){const D=S.split(" ").map($=>$.trim()).filter(Boolean),w=new Array;for(const $ of D){const H=$.match(/^([^:]+):(.+)$/);if(!H){I(new y.dz(`'${$}' is not a valid filter expression, expected 'key:parameter' form`));continue}const G=H[1],F=H[2].split(",").filter(Boolean);w.push({key:G,parameters:F})}return w}const i=new Set,C=new Set;function f(S,I){S&&I&&!C.has(I)&&(console.warn(`Duplicate entity filter methods found, both '${I}' as well as a callback function, which is not permitted - using the callback`),C.add(I));const D=S||I;if(D){if(typeof D=="function")return $=>D($)}else return()=>!0;const w=m(D);return w.expressionParseErrors.length&&!i.has(D)&&(console.warn(`Error(s) in entity filter expression '${D}'`,w.expressionParseErrors),i.add(D)),w.filterFn}function O(S){const{entity:I,element:D,filterFunction:w,filterExpression:$}=S;return(0,l.useMemo)(()=>f(w,$),[w,$])(I)?(0,n.jsx)(o.A,{item:!0,md:6,xs:12,children:D}):null}},6292:(z,P,t)=>{"use strict";t.d(P,{D:()=>H});var n=t(6820);function o(G){const{years:F=0,months:Q=0,weeks:B=0,days:V=0,hours:J=0,minutes:rt=0,seconds:lt=0,milliseconds:ht=0}=G;return((((F*365+Q*30+B*7+V)*24+J)*60+rt)*60+lt)*1e3+ht}var l=t(25033),y=t.n(l),v=t(25295),g=t.n(v),u=t(96403),c=t.n(u),h=t(88083),E=t(14451),p=t(94389),m=t(17400),A=t(71865),i=t(52755),C=t(89350),f=t(33602),O=t(48108),S=t(55700);const I={seconds:10},D={milliseconds:50},w={api:m.A,component:C.A,system:p.A,resource:S.A,domain:E.A,location:i.A,user:O.A,group:f.A,template:A.A};function $(G){return{async:G.async,render:({entityRef:F,entity:Q,context:B})=>({snapshot:(0,h.T)(Q||F,B),loadEntity:G.async})}}class H{static createLocal(){return new H({renderer:$({async:!1})})}static create(F){return new H(F)}#t;#e;#n;#s;#r;constructor(F){const Q=F.cacheTtl??I,B=F.batchDelay??D,V=F.renderer??$({async:!0}),J={};if(Object.entries(w).forEach(([rt,lt])=>{J[rt.toLocaleLowerCase("en-US")]=lt}),Object.entries(F.kindIcons??{}).forEach(([rt,lt])=>{J[rt.toLocaleLowerCase("en-US")]=lt}),V.async){if(!F.catalogApi)throw new TypeError("Asynchronous rendering requires a catalog API");this.#n=this.#a({cacheTtl:Q,batchDelay:B,renderer:V,catalogApi:F.catalogApi})}this.#e=o(Q),this.#t=new Map,this.#s=J,this.#r=V}forEntity(F,Q){const{entityRef:B,kind:V,entity:J,needsLoad:rt}=this.#o(F),lt=at=>{const{snapshot:ot}=this.#r.render({entityRef:B,loading:at.loading,entity:at.entity,context:Q||{}});return{...ot,entityRef:B,Icon:this.#i(ot.Icon,V)}};let ht;try{ht=lt({loading:rt,entity:J})}catch{ht={primaryTitle:B,entityRef:B}}if(!rt)return{snapshot:ht,promise:Promise.resolve(ht)};const Ct=Promise.resolve().then(()=>this.#n?.load(B)).then(at=>lt({loading:!1,entity:at??J})).catch(()=>{}),Rt=new(c())(at=>{let ot=!1;return Ct.then(ft=>{ft&&at.next(ft)}).finally(()=>{ot||at.complete()}),()=>{ot=!0}}),st=Ct.then(at=>at??ht);return{snapshot:ht,update$:Rt,promise:st}}#o(F){if(typeof F!="string")return{entity:F,kind:F.kind,entityRef:(0,n.U2)(F),needsLoad:!1};const Q=this.#t.get(F),B=Q?.entity,J=(!Q||Date.now()-Q.updatedAt>this.#e)&&this.#r.async!==!1&&this.#n!==void 0;return{entity:B,kind:(0,n.KU)(F).kind,entityRef:F,needsLoad:J}}#a(F){const Q=o(F.cacheTtl),B=o(F.batchDelay);return new(y())(async V=>{const{items:J}=await F.catalogApi.getEntitiesByRefs({entityRefs:V}),rt=Date.now();return V.forEach((lt,ht)=>{this.#t.set(lt,{updatedAt:rt,entity:J[ht]})}),J},{name:"DefaultEntityPresentationApi",cacheMap:new(g())(Q),maxBatchSize:100,batchScheduleFn:B?V=>setTimeout(V,B):void 0})}#i(F,Q){return F||(F===!1?!1:this.#s[Q.toLocaleLowerCase("en-US")])}}},50226:(z,P,t)=>{"use strict";t.d(P,{s:()=>g});var n=t(96403),o=t.n(n),l=t(6820),y=t(45250);async function v({storageApi:u}){const c=u.forBucket("settings"),h=u.forBucket("starredEntities"),E=c.snapshot("starredEntities").value;if(!(0,y.isArray)(E))return;const p=new Set(h.snapshot("entityRefs").value??[]);E.filter(y.isString).map(m=>m.split(":")).filter(m=>m.length===4&&m[0]==="entity").map(([m,A,i,C])=>(0,l.U2)({kind:A,namespace:i,name:C})).forEach(m=>p.add(m)),await h.set("entityRefs",Array.from(p)),await c.remove("starredEntities")}class g{settingsStore;starredEntities;constructor(c){v(c).then(),this.settingsStore=c.storageApi.forBucket("starredEntities"),this.starredEntities=new Set(this.settingsStore.snapshot("entityRefs").value??[]),this.settingsStore.observe$("entityRefs").subscribe({next:h=>{this.starredEntities=new Set(h.value??[]),this.notifyChanges()}})}async toggleStarred(c){this.starredEntities.has(c)?this.starredEntities.delete(c):this.starredEntities.add(c),await this.settingsStore.set("entityRefs",Array.from(this.starredEntities))}starredEntitie$(){return this.observable}subscribers=new Set;observable=new(o())(c=>(c.next(new Set(this.starredEntities)),this.subscribers.add(c),()=>{this.subscribers.delete(c)}));notifyChanges(){for(const c of this.subscribers)c.next(new Set(this.starredEntities))}}},803:(z,P,t)=>{"use strict";t.d(P,{W:()=>h});var n=t(70048),o=t(72427),l=t(39837),y=t(29207),v=t(7341),g=t(14041),u=t(18690),c=t(28966);const h=()=>{const{kind:E,namespace:p,name:m}=(0,n.K)(y.s),A=(0,u.Zp)(),i=(0,o.gf)(l.m),C=(0,o.gf)(v.v),{value:f,error:O,loading:S,retry:I}=(0,c.A)(()=>C.getEntityByRef({kind:E,namespace:p,name:m}),[C,E,p,m]);return(0,g.useEffect)(()=>{m||(i.post(new Error("No name provided!")),A("/"))},[i,A,O,S,f,m]),{entity:f,loading:S,error:O,refresh:I}}},51655:()=>{"use strict"},95203:(z,P,t)=>{"use strict";t.d(P,{qP:()=>g,Zg:()=>c,rQ:()=>E,pS:()=>h,UJ:()=>u});var n=t(59598);let o=n.b;class l{id;params;optional;defaultTarget;[o];constructor(m,A,i,C){this.id=m,this.params=A,this.optional=i,this.defaultTarget=C,this[o]="external"}toString(){return`routeRef{type=external,id=${this.id}}`}getDefaultTarget(){return this.defaultTarget}}function y(p){return new l(p.id,p.params??[],!!p.optional,p?.defaultTarget)}var v=t(34569);const g=y({id:"create-component",optional:!0,defaultTarget:"scaffolder.createComponent"}),u=y({id:"view-techdoc",optional:!0,params:["namespace","kind","name"],defaultTarget:"techdocs.docRoot"}),c=y({id:"create-from-template",optional:!0,params:["namespace","templateName"],defaultTarget:"scaffolder.selectedTemplate"}),h=y({id:"catalog:unregister-redirect",optional:!0}),E=(0,v.H)({id:"catalog"})},54241:(z,P,t)=>{"use strict";t.d(P,{b:()=>n});var n;(function(o){o.DENY="DENY",o.ALLOW="ALLOW",o.CONDITIONAL="CONDITIONAL"})(n||(n={}))},96824:(z,P,t)=>{"use strict";t.d(P,{x:()=>o});var n=t(55309);const o=(0,n.y)({id:"plugin.permission.api"})},63552:(z,P,t)=>{"use strict";t.d(P,{e:()=>c});var n=t(31085),o=t(14041),l=t(83839),y=t(66243),v=t(32696),g=t(39066),u=t(54560);function c(h){const E="configSchema"in h?h.configSchema:(0,l.Z)(p=>p.object({noTrack:p.boolean().default(!1)}));return(0,y.w)({kind:"search-result-list-item",namespace:h.namespace,name:h.name,attachTo:h.attachTo??{id:"page:search",input:"items"},configSchema:E,output:{item:c.itemDataRef},factory({config:p,node:m}){const A=(0,o.lazy)(()=>h.component({config:p}).then(i=>({default:i})));return{item:{predicate:h.predicate,component:i=>(0,n.jsx)(v.u,{node:m,children:(0,n.jsx)(u.oN,{rank:i.rank,result:i.result,noTrack:p.noTrack,children:(0,n.jsx)(A,{...i})})})}}}})}(function(h){h.itemDataRef=(0,g.T)().with({id:"search.search-result-list-item.item"})})(c||(c={}))},70734:(z,P,t)=>{"use strict";t.d(P,{e:()=>v});var n=t(31085),o=t(14041),l=t(58837);const y=(0,l.A)(()=>({highlight:{}}),{name:"BackstageHighlightedSearchResultText"}),v=g=>{const{text:u,preTag:c,postTag:h}=g,E=y(),p=(0,o.useMemo)(()=>u.split(new RegExp(`(${c}.+?${h})`)),[h,c,u]);return(0,n.jsx)(n.Fragment,{children:p.map((m,A)=>m.includes(c)?(0,n.jsx)("mark",{className:E.highlight,children:m.replace(new RegExp(`${c}|${h}`,"g"),"")},A):m)})}},54560:(z,P,t)=>{"use strict";t.d(P,{ec:()=>h,oN:()=>c});var n=t(31085),o=t(14041),l=t(93368),y=t(88758),v=t(8109);const g="search.results.list.items.extensions.v1",u=(m,A)=>{for(const i of m)if(!(!isValidElement(i)||!getComponentData(i,g)?.(A)))return cloneElement(i,{rank:A.rank,highlight:A.highlight,result:A.document,...i.props});return null},c=m=>{const{rank:A,result:i,noTrack:C,children:f,alignItems:O="flex-start",...S}=m,I=(0,l.s)(),D=(0,o.useCallback)(()=>{C||i&&I.captureEvent("discover",i.title,{attributes:{to:i.location},value:A})},[A,i,C,I]);return(0,n.jsx)(v.A,{divider:!0,alignItems:O,onClickCapture:D,...S,children:f})},h=m=>{const{name:A,component:i,predicate:C=()=>!0}=m;return(0,y.zZ)({name:A,component:{lazy:()=>i().then(f=>O=>(0,n.jsx)(c,{rank:O.rank,result:O.result,noTrack:O.noTrack,children:(0,o.createElement)(f,O)}))},data:{[g]:C}})},E=m=>{const A=useElementFilter(m,i=>i.selectByComponentData({key:g}).getElements(),[m]);return useCallback((i,C)=>{const f=u(A,i);return _jsx(Fragment,{children:f??_jsx(c,{rank:i.rank,result:i.document,children:_jsx(DefaultResultListItem,{rank:i.rank,highlight:i.highlight,result:i.document})})},C)},[A])},p=m=>{const{results:A,children:i,...C}=m,f=E(i);return _jsx(List,{...C,children:A.map(f)})}},72020:(z,P,t)=>{"use strict";t.d(P,{AF:()=>c,Hr:()=>p,Wm:()=>u,YR:()=>C,po:()=>h});var n=t(31085),o=t(14041),l=t(18690),y=t(19402),v=t(88758),g=t(82442);const u="techdocs.addons.addon.v1",c="techdocs.addons.wrapper.v1",h=()=>null;(0,y.h)(h,c,!0);const E=f=>`${u}.${f.toLocaleLowerCase("en-US")}`;function p(f){const{name:O,component:S}=f;return(0,v.zZ)({name:O,component:{sync:I=>(0,n.jsx)(S,{...I})},data:{[u]:f,[E(O)]:!0}})}const m=(f,O)=>f.selectByComponentData({key:O}).getElements()[0],A=f=>f.selectByComponentData({key:c}).selectByComponentData({key:u}),i=f=>f.selectByComponentData({key:c}).findComponentData({key:u}),C=()=>{const f=(0,l.P1)(),O=(0,g.O)(f,A),S=(0,g.O)(f,i),I=(0,o.useCallback)($=>{if(!O||!$)return null;const H=E($.name);return m(O,H)??null},[O]),D=(0,o.useCallback)($=>{const H=S.find(G=>G.name===$);return H?I(H):null},[S,I]),w=(0,o.useCallback)($=>{const H=S.filter(G=>G.location===$);return H.length?H.map(I):null},[S,I]);return{renderComponentByName:D,renderComponentsByLocation:w}}},26679:(z,P,t)=>{"use strict";t.d(P,{l:()=>o,s:()=>l});var n=t(55309);const o=(0,n.y)({id:"plugin.techdocs.service"}),l=(0,n.y)({id:"plugin.techdocs.storageservice"})},86892:(z,P,t)=>{"use strict";t.d(P,{R:()=>f,V:()=>O});var n=t(31085),o=t(14041),l=t(73466),y=t(28966),v=t(6820),g=t(43836),u=t(10602),c=t(72427),h=t(65461),E=t(25862),p=t(26679);function m(S,I){return I.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")||(S.kind=S.kind.toLocaleLowerCase(),S.name=S.name.toLocaleLowerCase(),S.namespace=S.namespace.toLocaleLowerCase()),S}const A=(S,I)=>(0,v.U2)(S)===(0,v.U2)(I),i={title:"",subtitle:"",setTitle:()=>{},setSubtitle:()=>{},setShadowRoot:()=>{},metadata:{loading:!0},entityMetadata:{loading:!0},entityRef:{kind:"",name:"",namespace:""}},C=(0,g.tK)("techdocs-reader-page-context"),f=(0,o.memo)(S=>{const{entityRef:I,children:D}=S,w=(0,c.gf)(p.l),$=(0,c.gf)(h.U),H=(0,l.A)(async()=>w.getEntityMetadata(I),[I]),G=(0,y.A)(async()=>w.getTechDocsMetadata(I),[I]),[F,Q]=(0,o.useState)(i.title),[B,V]=(0,o.useState)(i.subtitle),[J,rt]=(0,o.useState)(i.shadowRoot);(0,o.useEffect)(()=>{J&&!G.value&&!G.loading&&G.retry()},[G.value,G.loading,J,G.retry,G]);const lt={metadata:G,entityRef:m(I,$),entityMetadata:H,shadowRoot:J,setShadowRoot:rt,title:F,setTitle:Q,subtitle:B,setSubtitle:V},ht=(0,u.B)({1:lt});return(0,n.jsx)(E.Ig,{attributes:{entityRef:(0,v.U2)(I)},children:(0,n.jsx)(C.Provider,{value:ht,children:D instanceof Function?D(lt):D})})},(S,I)=>A(S.entityRef,I.entityRef)),O=()=>{const S=(0,o.useContext)(C);if(S===void 0)return i;const I=S.atVersion(1);if(I===void 0)throw new Error("No context found for version 1.");return I}},99730:(z,P,t)=>{"use strict";t.d(P,{e:()=>n});const n=Object.freeze({Header:"Header",Subheader:"Subheader",Settings:"Settings",PrimarySidebar:"PrimarySidebar",SecondarySidebar:"SecondarySidebar",Content:"Content"})},66127:(z,P,t)=>{"use strict";t.d(P,{A:()=>B});var n=t(31085),o=t(14041),l=t(3210),y=t(59817),v=t(83839),g=t(73602),u=t(50893),c=t(70621),h=t(63552),E=t(12935),p=t(65461),m=t(57405),A=t(70795),i=t(71087),C=t(8539),f=t(26679),O=t(29406),S=t(82779),I=t(73571);const D=(0,y.k)({factory:(0,E.b)({api:f.s,deps:{configApi:p.U,discoveryApi:m.I,fetchApi:A.a},factory:({configApi:V,discoveryApi:J,fetchApi:rt})=>new O.E({configApi:V,discoveryApi:J,fetchApi:rt})})}),w=(0,y.k)({factory:(0,E.b)({api:f.l,deps:{configApi:p.U,discoveryApi:m.I,fetchApi:A.a},factory:({configApi:V,discoveryApi:J,fetchApi:rt})=>new O.z({configApi:V,discoveryApi:J,fetchApi:rt})})}),$=(0,h.e)({configSchema:(0,v.Z)(V=>V.object({title:V.string().optional(),lineClamp:V.number().default(5),asLink:V.boolean().default(!0),asListItem:V.boolean().default(!0),noTrack:V.boolean().default(!1)})),predicate:V=>V.type==="techdocs",component:async({config:V})=>{const{TechDocsSearchResultListItem:J}=await Promise.resolve().then(t.bind(t,27698));return rt=>(0,i.I)((0,n.jsx)(J,{...rt,...V}))}}),H=(0,g.R)({defaultPath:"/docs",routeRef:(0,C.D)(S.rQ),loader:()=>t.e(5788).then(t.bind(t,85788)).then(V=>(0,i.I)((0,n.jsx)(V.TechDocsIndexPage,{})))}),G=(0,g.R)({name:"reader",defaultPath:"/docs/:namespace/:kind/:name",routeRef:(0,C.D)(S.Oc),loader:()=>t.e(4036).then(t.bind(t,84036)).then(V=>(0,i.I)((0,n.jsx)(V.TechDocsReaderPage,{})))}),F=(0,I.Ej)({defaultPath:"docs",defaultTitle:"TechDocs",loader:()=>t.e(9605).then(t.bind(t,29605)).then(V=>(0,i.I)((0,n.jsx)(V.EmbeddedDocsRouter,{})))}),Q=(0,u.Q)({icon:l.A,title:"Docs",routeRef:(0,C.D)(S.rQ)}),B=(0,c.i)({id:"techdocs",extensions:[w,D,Q,H,G,F,$],routes:(0,C.o)({root:S.rQ,docRoot:S.Oc,entityContent:S.Ri})})},29406:(z,P,t)=>{"use strict";t.d(P,{E:()=>v,z:()=>y});var n=t(70835),o=t(97142),l=t(92110);class y{configApi;discoveryApi;fetchApi;constructor(u){this.configApi=u.configApi,this.discoveryApi=u.discoveryApi,this.fetchApi=u.fetchApi}async getCookie(){const c=`${await this.getApiOrigin()}/cookie`,h=await this.fetchApi.fetch(`${c}`,{credentials:"include"});if(!h.ok)throw await n.o.fromResponse(h);return await h.json()}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getTechDocsMetadata(u){const{kind:c,namespace:h,name:E}=u,m=`${await this.getApiOrigin()}/metadata/techdocs/${h}/${c}/${E}`,A=await this.fetchApi.fetch(`${m}`);if(!A.ok)throw await n.o.fromResponse(A);return await A.json()}async getEntityMetadata(u){const{kind:c,namespace:h,name:E}=u,m=`${await this.getApiOrigin()}/metadata/entity/${h}/${c}/${E}`,A=await this.fetchApi.fetch(`${m}`);if(!A.ok)throw await n.o.fromResponse(A);return await A.json()}}class v{configApi;discoveryApi;fetchApi;constructor(u){this.configApi=u.configApi,this.discoveryApi=u.discoveryApi,this.fetchApi=u.fetchApi}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getStorageUrl(){return this.configApi.getOptionalString("techdocs.storageUrl")??`${await this.discoveryApi.getBaseUrl("techdocs")}/static/docs`}async getBuilder(){return this.configApi.getOptionalString("techdocs.builder")||"local"}async getEntityDocs(u,c){const{kind:h,namespace:E,name:p}=u,A=`${await this.getStorageUrl()}/${E}/${h}/${p}/${c}`,i=await this.fetchApi.fetch(`${A.endsWith("/")?A:`${A}/`}index.html`);let C="";switch(i.status){case 404:throw C="Page not found. ",c||(C+="This could be because there is no index.md file in the root of the docs directory of this repository."),new o.m_(C);case 500:throw C="Could not generate documentation or an error in the TechDocs backend. ",new Error(C);default:break}return i.text()}async syncEntityDocs(u,c=()=>{}){const{kind:h,namespace:E,name:p}=u,A=`${await this.getApiOrigin()}/sync/${E}/${h}/${p}`;return new Promise((i,C)=>{const f=new AbortController;(0,l.y)(A,{fetch:this.fetchApi.fetch,signal:f.signal,onmessage(O){if(O.event==="log")O.data&&c(JSON.parse(O.data));else if(O.event==="finish"){let S=!1;O.data&&({updated:S}=JSON.parse(O.data)),i(S?"updated":"cached")}else O.event==="error"&&C(new Error(O.data))},onerror(O){f.abort(),C(O)}})})}async getBaseUrl(u,c,h){const{kind:E,namespace:p,name:m}=c,i=`${await this.getApiOrigin()}/static/docs/${p}/${E}/${m}/${h}`;return new URL(u,i.endsWith("/")?i:`${i}/`).toString()}}},95768:(z,P,t)=>{"use strict";t.d(P,{V:()=>n});function n(o,l){return l.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")?o:o.toLocaleLowerCase("en-US")}},85920:(z,P,t)=>{"use strict";t.d(P,{K:()=>G});var n=t(31085),o=t(14041),l=t(26280),y=t(59428),v=t(27586),g=t(21405),u=t(54203),c=t(67626),h=t(72987),E=t(91035),p=t(81859),m=t(86519);class A{getCatalogFilters(){return{"metadata.annotations.backstage.io/techdocs-ref":m.c}}}const i=()=>{const{updateFilters:F}=(0,g.nK)();return(0,o.useEffect)(()=>{F({techdocs:new A})},[F]),null};var C=t(36338),f=t(45250),O=t(88640),S=t(77310),I=t(56889),D=t(27125),w=t(84295),$=t(42717);const H=F=>{const{columns:Q,actions:B,options:V}=F,{loading:J,error:rt,entities:lt,filters:ht}=(0,g.nK)(),{isStarredEntity:Ct,toggleStarredEntity:Rt}=(0,I.I)(),[,st]=(0,C.A)(),at=(0,f.capitalize)(ht.user?.value??"all"),ot=[w.f.createCopyDocsUrlAction(st),w.f.createStarEntityAction(Ct,Rt)];return rt?(0,n.jsx)(O.B,{severity:"error",title:"Could not load available documentation.",children:(0,n.jsx)(S.z,{language:"text",text:rt.toString()})}):(0,n.jsx)(D.o,{title:at,entities:lt,loading:J,actions:B||ot,columns:Q,options:V})};H.columns=$.B,H.actions=w.f;const G=F=>{const{initialFilter:Q="owned",columns:B,actions:V,ownerPickerMode:J}=F;return(0,n.jsx)(p.S,{children:(0,n.jsxs)(l.U,{children:[(0,n.jsx)(y.d,{title:"",children:(0,n.jsx)(v.Y,{children:"Discover documentation in your ecosystem."})}),(0,n.jsx)(g.B9,{children:(0,n.jsxs)(u.GI,{children:[(0,n.jsxs)(u.GI.Filters,{children:[(0,n.jsx)(i,{}),(0,n.jsx)(c.y,{initialFilter:Q}),(0,n.jsx)(h.t,{mode:J}),(0,n.jsx)(E.m,{})]}),(0,n.jsx)(u.GI.Content,{children:(0,n.jsx)(H,{actions:V,columns:B})})]})})]})})}},27125:(z,P,t)=>{"use strict";t.d(P,{o:()=>S});var n=t(31085),o=t(14041),l=t(36338),y=t(9222),v=t(72427),g=t(65461),u=t(51372),c=t(67871),h=t(90184),E=t(82779),p=t(14209),m=t(44186),A=t(73896),i=t(84295),C=t(42717),f=t(95768);const O=[C.B.createTitleColumn({hidden:!0}),C.B.createNameColumn(),C.B.createOwnerColumn(),C.B.createKindColumn(),C.B.createTypeColumn()],S=I=>{const{entities:D,title:w,loading:$,columns:H,actions:G,options:F}=I,[,Q]=(0,l.A)(),B=(0,y.S)(E.Oc),V=(0,v.gf)(g.U);if(!D)return null;const J=D.map(Ct=>{const Rt=(0,c.t)(Ct,u.vv);return{entity:Ct,resolved:{docsUrl:B({namespace:(0,f.V)(Ct.metadata.namespace??"default",V),kind:(0,f.V)(Ct.kind,V),name:(0,f.V)(Ct.metadata.name,V)}),ownedByRelations:Rt,ownedByRelationsTitle:Rt.map(st=>(0,h.S)(st,{defaultKind:"group"})).join(", ")}}}),rt=[i.f.createCopyDocsUrlAction(Q)],lt=20,ht=J&&J.length>lt;return(0,n.jsx)(n.Fragment,{children:$||J&&J.length>0?(0,n.jsx)(p.X,{isLoading:$,options:{paging:ht,pageSize:lt,search:!0,actionsColumnIndex:-1,...F},data:J,columns:H||O,actions:G||rt,title:w?`${w} (${J.length})`:`All (${J.length})`}):(0,n.jsx)(m.p,{missing:"data",title:"No documents to show",description:"Create your own document. Check out our Getting Started Information",action:(0,n.jsx)(A.z,{color:"primary",to:"https://backstage.io/docs/features/techdocs/getting-started",variant:"contained",children:"DOCS"})})})};S.columns=C.B,S.actions=i.f},84295:(z,P,t)=>{"use strict";t.d(P,{f:()=>c});var n=t(31085),o=t(14041),l=t(55290),y=t(7031),v=t(80109),g=t(15303);const u=(0,y.A)({root:{color:"#f3ba37"}})(v.A),c={createCopyDocsUrlAction(h){return E=>({icon:()=>(0,n.jsx)(l.A,{fontSize:"small"}),tooltip:"Click to copy documentation link to clipboard",onClick:()=>h(`${window.location.origin}${E.resolved.docsUrl}`)})},createStarEntityAction(h,E){return p=>{const m=p.entity,A=h(m);return{cellStyle:{paddingLeft:"1em"},icon:()=>A?(0,n.jsx)(u,{}):(0,n.jsx)(g.A,{}),tooltip:A?"Remove from favorites":"Add to favorites",onClick:()=>E(m)}}}}},42717:(z,P,t)=>{"use strict";t.d(P,{B:()=>E});var n=t(31085),o=t(14041),l=t(77125),y=t(58837);const v=(0,y.A)(p=>({value:{marginBottom:p.spacing(.75)},subvalue:{color:p.palette.textSubtle,fontWeight:"normal"}}),{name:"BackstageSubvalueCell"});function g(p){const{value:m,subvalue:A}=p,i=v();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.A,{className:i.value,children:m}),(0,n.jsx)(l.A,{className:i.subvalue,children:A})]})}var u=t(72072),c=t(34428);function h(p){return p.metadata.title||p.metadata.name}const E={createTitleColumn(p){return{...E.createNameColumn(),field:"entity.metadata.title",hidden:p?.hidden}},createNameColumn(){return{title:"Document",field:"entity.metadata.name",highlight:!0,searchable:!0,defaultSort:"asc",customSort:(p,m)=>{const A=h(p.entity).toLocaleLowerCase(),i=h(m.entity).toLocaleLowerCase();return A.localeCompare(i)},render:p=>(0,n.jsx)(g,{value:(0,n.jsx)(u.N_,{to:p.resolved.docsUrl,children:h(p.entity)}),subvalue:p.entity.metadata.description})}},createOwnerColumn(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:p})=>(0,n.jsx)(c.i,{entityRefs:p.ownedByRelations,defaultKind:"group"})}},createKindColumn(){return{title:"Kind",field:"entity.kind"}},createTypeColumn(){return{title:"Type",field:"entity.spec.type"}}}},81859:(z,P,t)=>{"use strict";t.d(P,{S:()=>g});var n=t(31085),o=t(14041),l=t(27155),y=t(72427),v=t(65461);const g=u=>{const{children:c}=u,E=`Documentation available in ${(0,y.gf)(v.U).getOptionalString("organization.name")??"Backstage"}`;return(0,n.jsx)(l.d,{title:"Documentation",subtitle:E,themeId:"documentation",children:c})}},36677:()=>{"use strict"},69954:(z,P,t)=>{"use strict";t.d(P,{$j:()=>C,Ju:()=>p,Wj:()=>f});var n=t(26679),o=t(29406),l=t(82779),y=t(9803),v=t(12935),g=t(65461),u=t(57405),c=t(70795),h=t(88758),E=t(54560);const p=(0,y.i)({id:"techdocs",apis:[(0,v.b)({api:n.s,deps:{configApi:g.U,discoveryApi:u.I,fetchApi:c.a},factory:({configApi:S,discoveryApi:I,fetchApi:D})=>new o.E({configApi:S,discoveryApi:I,fetchApi:D})}),(0,v.b)({api:n.l,deps:{configApi:g.U,discoveryApi:u.I,fetchApi:c.a},factory:({configApi:S,discoveryApi:I,fetchApi:D})=>new o.z({configApi:S,discoveryApi:I,fetchApi:D})})],routes:{root:l.rQ,docRoot:l.Oc,entityContent:l.Ri}}),m=p.provide((0,h.QJ)({name:"TechdocsPage",component:()=>t.e(9605).then(t.bind(t,29605)).then(S=>S.Router),mountPoint:l.rQ})),A=p.provide((0,h.QJ)({name:"EntityTechdocsContent",component:()=>t.e(9605).then(t.bind(t,29605)).then(S=>S.EmbeddedDocsRouter),mountPoint:l.Ri})),i=p.provide((0,h.QJ)({name:"TechDocsCustomHome",component:()=>t.e(6545).then(t.bind(t,16545)).then(S=>S.TechDocsCustomHome),mountPoint:l.rQ})),C=p.provide((0,h.QJ)({name:"TechDocsIndexPage",component:()=>t.e(5788).then(t.bind(t,85788)).then(S=>S.TechDocsIndexPage),mountPoint:l.rQ})),f=p.provide((0,h.QJ)({name:"TechDocsReaderPage",component:()=>t.e(4036).then(t.bind(t,84036)).then(S=>S.TechDocsReaderPage),mountPoint:l.Oc})),O=p.provide((0,E.ec)({name:"TechDocsSearchResultListItem",component:()=>Promise.resolve().then(t.bind(t,27698)).then(S=>S.TechDocsSearchResultListItem),predicate:S=>S.type==="techdocs"}))},16203:(z,P,t)=>{"use strict";t.d(P,{p:()=>De});var n=t(31085),o=t(14041),l=t(42899),y=t(58837),v=t(86892),g=t(9394),u=t(91360),c=t(22856),h=t(68146);const E="TECH_DOCS_SHADOW_DOM_STYLE_LOAD",p=b=>{(0,o.useEffect)(()=>{if(!b)return()=>{};const j=b.querySelectorAll('head > link[rel="stylesheet"]');let N=j?.length??0;const Y=new CustomEvent(E);if(!N)return b.dispatchEvent(Y),()=>{};const X=()=>{--N===0&&b.dispatchEvent(Y)};return j?.forEach(tt=>{tt.addEventListener("load",X)}),()=>{j?.forEach(tt=>{tt.removeEventListener("load",X)})}},[b])},m=b=>{const[j,N]=(0,o.useState)(!1);return(0,o.useEffect)(()=>{if(!b)return()=>{};N(!0);const Y=b.style;Y.setProperty("opacity","0");const X=()=>{N(!1),Y.setProperty("opacity","1")};return b.addEventListener(E,X),()=>{b.removeEventListener(E,X)}},[b]),j},A=b=>{const{element:j,onAppend:N,children:Y}=b,[X,tt]=(0,o.useState)((0,g.vt)({...(0,c.A)(),insertionPoint:void 0}));p(j);const pt=m(j),bt=(0,o.useCallback)(It=>{if(!j||!It)return;tt((0,g.vt)({...(0,c.A)(),insertionPoint:j.querySelector("head")||void 0}));let Kt=It.shadowRoot;Kt||(Kt=It.attachShadow({mode:"open"})),Kt.replaceChildren(j),typeof N=="function"&&N(Kt)},[j,N]);return(0,n.jsxs)(n.Fragment,{children:[pt&&(0,n.jsx)(h.k,{}),(0,n.jsxs)(u.Ay,{jss:X,sheetsManager:new Map,children:[(0,n.jsx)("div",{ref:bt,"data-testid":"techdocs-native-shadowroot"}),Y]})]})};var i=t(12784);const C=()=>{const{shadowRoot:b}=(0,v.V)();return b},f=b=>{const j=C(),[N,Y]=(0,o.useState)(!1);return(0,o.useEffect)(()=>{let X;return j&&(X=new MutationObserver(()=>{Y(!N)}),X.observe(j,{attributes:!0,characterData:!0,childList:!0,subtree:!0})),()=>X?.disconnect()},[j,N,Y]),j?b.map(X=>j.querySelectorAll(X)).filter(X=>X.length).map(X=>Array.from(X)).flat():[]},O=b=>b.toString()&&b.rangeCount&&b.getRangeAt(0).getBoundingClientRect().top,S=(b=0)=>{const j=C(),[N,Y]=useState(null),X=useMemo(()=>debounce(()=>{const tt=j,pt=tt.getSelection?tt.getSelection():document.getSelection();pt&&O(pt)?Y(pt):Y(null)},b),[j,Y,b]);return useEffect(()=>(window.document.addEventListener("selectionchange",X),()=>{X.cancel(),window.document.removeEventListener("selectionchange",X)}),[X]),N};var I=t(12173),D=t(26280),w=t(45250),$=t(73466),H=t(5877),G=t(43836),F=t(10602),Q=t(72427),B=t(93368),V=t(25862),J=t(65461),rt=t(55309);const lt=(0,rt.y)({id:"plugin.search.queryservice"});class ht{mockedResults;constructor(j){this.mockedResults=j}query(){return Promise.resolve(this.mockedResults||{results:[]})}}const Ct=(0,G.tK)("search-context"),Rt=()=>{const b=(0,o.useContext)(Ct);if(!b)throw new Error("useSearch must be used within a SearchContextProvider");const j=b.atVersion(1);if(!j)throw new Error("No SearchContext v1 found");return j},st=()=>(0,o.useContext)(Ct)!==void 0,at={term:"",types:[],filters:{},pageLimit:void 0,pageCursor:void 0},ot=(b=at)=>{const j=(0,Q.gf)(lt),N=(0,B.s)(),[Y,X]=(0,o.useState)(b.term),[tt,pt]=(0,o.useState)(b.types),[bt,It]=(0,o.useState)(b.filters),[Kt,Ut]=(0,o.useState)(b.pageLimit),[Wt,Bt]=(0,o.useState)(b.pageCursor),ve=(0,H.A)(Y),ge=(0,H.A)(bt),kt=(0,$.A)(async()=>{const re=await j.query({term:Y,types:tt,filters:bt,pageLimit:Kt,pageCursor:Wt});return Y&&N.captureEvent("search",Y,{value:kt.value?.numberOfResults??void 0}),re},[Y,tt,bt,Kt,Wt]),fe=!kt.loading&&!kt.error&&kt.value?.nextPageCursor,se=!kt.loading&&!kt.error&&kt.value?.previousPageCursor,ae=(0,o.useCallback)(()=>{Bt(kt.value?.nextPageCursor)},[kt.value?.nextPageCursor]),Nt=(0,o.useCallback)(()=>{Bt(kt.value?.previousPageCursor)},[kt.value?.previousPageCursor]);return(0,o.useEffect)(()=>{ve!==void 0&&Y!==ve&&Bt(void 0)},[Y,ve,Bt]),(0,o.useEffect)(()=>{ge!==void 0&&!(0,w.isEqual)(bt,ge)&&Bt(void 0)},[bt,ge,Bt]),{result:kt,term:Y,setTerm:X,types:tt,setTypes:pt,filters:bt,setFilters:It,pageLimit:Kt,setPageLimit:Ut,pageCursor:Wt,setPageCursor:Bt,fetchNextPage:fe?ae:void 0,fetchPreviousPage:se?Nt:void 0}},ft=b=>{const{initialState:j,children:N}=b,Y=ot(j);return(0,n.jsx)(V.Ig,{attributes:{searchTypes:Y.types.sort().join(",")},children:(0,n.jsx)(Ct.Provider,{value:(0,F.B)({1:Y}),children:N})})},At=b=>{const{initialState:j,inheritParentContextIfAvailable:N,children:Y}=b,X=st(),tt=(0,Q.gf)(J.U),pt=j??{},bt=tt.has("search.query.pageLimit")?{pageLimit:tt.getNumber("search.query.pageLimit")}:{},It={...at,...pt,...bt};return X&&N?(0,n.jsx)(n.Fragment,{children:Y}):(0,n.jsx)(ft,{initialState:It,children:Y})};var yt=t(78467),St=t(20577),Tt=t(29365),wt=t(34839),$t=t(16249),Pt=t(64947),k=t(45917),Z=t(22771);function ct(b){return(0,o.forwardRef)((j,N)=>(0,n.jsx)(At,{inheritParentContextIfAvailable:!0,children:(0,n.jsx)(b,{...j,ref:N})}))}const xt=ct((0,o.forwardRef)((b,j)=>{const{onChange:N,onKeyDown:Y=()=>{},onClear:X=()=>{},onSubmit:tt=()=>{},debounceTime:pt=200,clearButton:bt=!0,fullWidth:It=!0,value:Kt,label:Ut,placeholder:Wt,inputProps:Bt={},InputProps:ve={},endAdornment:ge,...kt}=b,fe=(0,Q.gf)(J.U),[se,ae]=(0,o.useState)(""),Nt=(0,o.useRef)("");(0,o.useEffect)(()=>{ae(xe=>xe===Nt.current?String(Kt):xe)},[Kt,Nt]),(0,Z.A)(()=>{Nt.current=se,N(se)},pt,[se]);const te=(0,o.useCallback)(xe=>{ae(xe.target.value)},[ae]),re=(0,o.useCallback)(xe=>{Y&&Y(xe),tt&&xe.key==="Enter"&&tt()},[Y,tt]),Me=(0,o.useCallback)(()=>{Nt.current="",N(""),ae(""),X&&X()},[N,X]),we=Ut?void 0:"Search",Ve=Wt??`Search in ${fe.getOptionalString("app.title")||"Backstage"}`,_e=(0,n.jsx)(wt.A,{position:"start",children:(0,n.jsx)(Tt.A,{"aria-label":"Query",size:"small",disabled:!0,children:(0,n.jsx)(k.A,{})})}),Ge=(0,n.jsx)(wt.A,{position:"end",children:(0,n.jsx)(Pt.A,{"aria-label":"Clear",size:"small",onClick:Me,onKeyDown:xe=>{xe.key==="Enter"&&xe.stopPropagation()},children:"Clear"})});return(0,n.jsx)($t.A,{id:"search-bar-text-field","data-testid":"search-bar-next",variant:"outlined",margin:"normal",inputRef:j,value:se,label:Ut,placeholder:Ve,InputProps:{startAdornment:_e,endAdornment:bt?Ge:ge,...ve},inputProps:{"aria-label":we,...Bt},fullWidth:It,onChange:te,onKeyDown:re,...kt})})),gt=ct((0,o.forwardRef)((b,j)=>{const{value:N="",onChange:Y,...X}=b,{term:tt,setTerm:pt}=Rt();(0,o.useEffect)(()=>{N&&pt(String(N))},[N,pt]);const bt=(0,o.useCallback)(It=>{Y?Y(It):pt(It)},[Y,pt]);return(0,n.jsx)(V.Ig,{attributes:{pluginId:"search",extension:"SearchBar"},children:(0,n.jsx)(xt,{...X,ref:j,value:tt,onChange:bt})})})),it=(0,y.A)(b=>({loading:{right:b.spacing(1),position:"absolute"}})),Ot=b=>j=>(0,n.jsx)(At,{inheritParentContextIfAvailable:!0,children:(0,n.jsx)(b,{...j})}),Lt=()=>{const b=it();return(0,n.jsx)(yt.A,{className:b.loading,"data-testid":"search-autocomplete-progressbar",color:"inherit",size:20})},Ft=Ot(function(j){const{loading:N,value:Y,onChange:X=()=>{},options:tt=[],getOptionLabel:pt=Nt=>String(Nt),inputPlaceholder:bt,inputDebounceTime:It,freeSolo:Kt=!0,fullWidth:Ut=!0,clearOnBlur:Wt=!1,"data-testid":Bt="search-autocomplete",...ve}=j,{setTerm:ge}=Rt(),kt=(0,o.useCallback)(Nt=>Nt?typeof Nt=="string"?Nt:pt(Nt):"",[pt]),fe=(0,o.useMemo)(()=>kt(Y),[Y,kt]),se=(0,o.useCallback)((Nt,te,re,Me)=>{ge(kt(te)),X(Nt,te,re,Me)},[kt,ge,X]),ae=(0,o.useCallback)(({InputProps:{ref:Nt,className:te,endAdornment:re},InputLabelProps:Me,...we})=>(0,n.jsx)(gt,{...we,ref:Nt,clearButton:!1,value:fe,placeholder:bt,debounceTime:It,endAdornment:N?(0,n.jsx)(Lt,{}):re,InputProps:{className:te}}),[N,fe,bt,It]);return(0,n.jsx)(St.Ay,{...ve,"data-testid":Bt,value:Y,onChange:se,options:tt,getOptionLabel:pt,renderInput:ae,freeSolo:Kt,fullWidth:Ut,clearOnBlur:Wt})});var Mt=t(18690),Gt=t(27698);const ue=b=>b?.document,le=b=>{const{entityId:j,entityTitle:N,debounceTime:Y=150}=b,[X,tt]=(0,o.useState)(!1),pt=(0,Mt.Zp)(),{setFilters:bt,term:It,result:{loading:Kt,value:Ut}}=Rt(),[Wt,Bt]=(0,o.useState)([]);(0,o.useEffect)(()=>{let se=!0;if(se&&Ut){const ae=Ut.results.slice(0,10);Bt(ae)}return()=>{se=!1}},[Kt,Ut]);const{kind:ve,name:ge,namespace:kt}=j;(0,o.useEffect)(()=>{bt(se=>({...se,kind:ve,namespace:kt,name:ge}))},[ve,kt,ge,bt]);const fe=(se,ae)=>{if(ue(ae)){const{location:Nt}=ae.document;pt(Nt)}};return(0,n.jsx)(Ft,{"data-testid":"techdocs-search-bar",size:"small",open:X&&!!It,getOptionLabel:()=>"",filterOptions:se=>se,onClose:()=>{tt(!1)},onOpen:()=>{tt(!0)},onChange:fe,blurOnSelect:!0,noOptionsText:"No results found",value:null,options:Wt,renderOption:({document:se,highlight:ae})=>(0,n.jsx)(Gt.TechDocsSearchResultListItem,{result:se,lineClamp:3,asListItem:!1,asLink:!1,title:se.title,highlight:ae}),loading:Kt,inputDebounceTime:Y,inputPlaceholder:`Search ${N||j.name} docs`,freeSolo:!1})},he=b=>{const j={term:"",types:["techdocs"],pageCursor:"",filters:b.entityId};return(0,n.jsx)(At,{initialState:j,children:(0,n.jsx)(le,{...b})})};var Qt=t(74219),Xt=t(82266);const jt=(0,o.lazy)(()=>Promise.all([t.e(3308),t.e(9234)]).then(t.bind(t,99234)).then(b=>({default:b.RealLogViewer})));function Zt(b){const{Progress:j}=(0,Xt.n)().getComponents();return(0,n.jsx)(o.Suspense,{fallback:(0,n.jsx)(j,{}),children:(0,n.jsx)(jt,{...b})})}var pe=t(73845),Be=t(72501),q=t(99703),zt=t(32881);const ee=(0,y.A)(b=>(0,q.A)({paper:{width:"100%",[b.breakpoints.up("sm")]:{width:"75%"},[b.breakpoints.up("md")]:{width:"50%"},padding:b.spacing(2.5)},root:{height:"100%",overflow:"hidden"},logs:{background:b.palette.background.default}})),de=({buildLog:b,onClose:j})=>{const N=ee(),Y=b.length===0?"Waiting for logs...":b.join(`
|
|
12
|
-
`);return(0,n.jsxs)(l.A,{container:!0,direction:"column",className:N.root,spacing:0,wrap:"nowrap",children:[(0,n.jsxs)(l.A,{item:!0,container:!0,justifyContent:"space-between",alignItems:"center",spacing:0,wrap:"nowrap",children:[(0,n.jsx)(Be.A,{variant:"h5",children:"Build Details"}),(0,n.jsx)(Tt.A,{title:"Close the drawer",onClick:j,color:"inherit",children:(0,n.jsx)(zt.A,{})},"dismiss")]}),(0,n.jsx)(l.A,{item:!0,xs:!0,children:(0,n.jsx)(Zt,{text:Y,classes:{root:N.logs}})})]})},Re=({buildLog:b})=>{const j=ee(),[N,Y]=(0,o.useState)(!1);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(Pt.A,{color:"inherit",onClick:()=>Y(!0),children:"Show Build Logs"}),(0,n.jsx)(pe.Ay,{classes:{paper:j.paper},anchor:"right",open:N,onClose:()=>Y(!1),children:(0,n.jsx)(de,{buildLog:b,onClose:()=>Y(!1)})})]})},Ae=({errorMessage:b})=>{const j=(0,Q.gf)(J.U).getOptionalString("techdocs.builder"),N=(0,B.s)(),{entityRef:Y}=(0,v.V)(),X=(0,Mt.zy)();(0,o.useEffect)(()=>{const{pathname:pt,search:bt,hash:It}=X;N.captureEvent("not-found",`${pt}${bt}${It}`,{attributes:Y})},[N,Y,X]);let tt="";return[void 0,"local"].includes(j)||(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,n.jsx)(I.M,{status:"404",statusMessage:b||"Documentation not found",additionalInfo:tt})};var Qe=t(28966),ze=t(26679);function en({contentLoading:b,content:j,activeSyncState:N}){return b||N==="BUILD_READY_RELOAD"||!j&&N==="CHECKING"?"CHECKING":!j&&N==="BUILDING"?"INITIAL_BUILD":j?N==="BUILDING"?"CONTENT_STALE_REFRESHING":N==="BUILD_READY"?"CONTENT_STALE_READY":N==="ERROR"?"CONTENT_STALE_ERROR":"CONTENT_FRESH":"CONTENT_NOT_FOUND"}function je(b,j){const N={...b};switch(j.type){case"sync":j.state==="CHECKING"&&(N.buildLog=[]),N.activeSyncState=j.state,N.syncError=j.syncError;break;case"contentLoading":N.contentLoading=!0,N.contentError=void 0;break;case"content":typeof j.path=="string"&&(N.path=j.path),N.contentLoading=!1,N.content=j.content,N.contentError=j.contentError;break;case"buildLog":N.buildLog=N.buildLog.concat(j.log);break;default:throw new Error}return["BUILD_READY","BUILD_READY_RELOAD"].includes(N.activeSyncState)&&["contentLoading","content"].includes(j.type)&&(N.activeSyncState="UP_TO_DATE",N.buildLog=[]),N}function Ue(b,j,N,Y){const[X,tt]=(0,o.useReducer)(je,{activeSyncState:"CHECKING",path:Y,contentLoading:!0,buildLog:[]}),pt=(0,Q.gf)(ze.s),{retry:bt}=(0,Qe.A)(async()=>{tt({type:"contentLoading"});try{const Ut=await pt.getEntityDocs({kind:b,namespace:j,name:N},Y);return tt({type:"content",content:Ut,path:Y}),Ut}catch(Ut){tt({type:"content",contentError:Ut,path:Y})}},[pt,b,j,N,Y]),It=(0,o.useRef)({content:void 0,reload:()=>{}});return It.current={content:X.content,reload:bt},(0,$.A)(async()=>{tt({type:"sync",state:"CHECKING"});const Ut=setTimeout(()=>{tt({type:"sync",state:"BUILDING"})},1e3);try{switch(await pt.syncEntityDocs({kind:b,namespace:j,name:N},Bt=>{tt({type:"buildLog",log:Bt})})){case"updated":It.current.content?tt({type:"sync",state:"BUILD_READY"}):(It.current.reload(),tt({type:"sync",state:"BUILD_READY_RELOAD"}));break;case"cached":tt({type:"sync",state:"UP_TO_DATE"});break;default:tt({type:"sync",state:"ERROR",syncError:new Error("Unexpected return state")});break}}catch(Wt){tt({type:"sync",state:"ERROR",syncError:Wt})}finally{clearTimeout(Ut)}},[b,N,j,pt,tt,It]),{state:(0,o.useMemo)(()=>en({activeSyncState:X.activeSyncState,contentLoading:X.contentLoading,content:X.content}),[X.activeSyncState,X.content,X.contentLoading]),contentReload:bt,path:X.path,content:X.content,contentErrorMessage:X.contentError?.toString(),syncErrorMessage:X.syncError?.toString(),buildLog:X.buildLog}}const We=(0,o.createContext)({}),me=()=>(0,o.useContext)(We),He=b=>{const{children:j}=b,{"*":N=""}=(0,Mt.g)(),{entityRef:Y}=(0,v.V)(),{kind:X,namespace:tt,name:pt}=Y,bt=Ue(X,tt,pt,N);return(0,n.jsx)(We.Provider,{value:bt,children:j instanceof Function?j(bt):j})},Ze=b=>j=>(0,n.jsx)(He,{children:(0,n.jsx)(b,{...j})}),U=(0,y.A)(b=>({root:{marginBottom:b.spacing(2)},message:{wordBreak:"break-word",overflowWrap:"anywhere"}})),x=()=>{let b=null;const j=U(),{state:N,contentReload:Y,contentErrorMessage:X,syncErrorMessage:tt,buildLog:pt}=me();return N==="INITIAL_BUILD"&&(b=(0,n.jsx)(Qt.A,{classes:{root:j.root},variant:"outlined",severity:"info",icon:(0,n.jsx)(yt.A,{size:"24px"}),action:(0,n.jsx)(Re,{buildLog:pt}),children:"Documentation is accessed for the first time and is being prepared. The subsequent loads are much faster."})),N==="CONTENT_STALE_REFRESHING"&&(b=(0,n.jsx)(Qt.A,{variant:"outlined",severity:"info",icon:(0,n.jsx)(yt.A,{size:"24px"}),action:(0,n.jsx)(Re,{buildLog:pt}),classes:{root:j.root},children:"A newer version of this documentation is being prepared and will be available shortly."})),N==="CONTENT_STALE_READY"&&(b=(0,n.jsx)(Qt.A,{variant:"outlined",severity:"success",action:(0,n.jsx)(Pt.A,{color:"inherit",onClick:()=>Y(),children:"Refresh"}),classes:{root:j.root},children:"A newer version of this documentation is now available, please refresh to view."})),N==="CONTENT_STALE_ERROR"&&(b=(0,n.jsxs)(Qt.A,{variant:"outlined",severity:"error",action:(0,n.jsx)(Re,{buildLog:pt}),classes:{root:j.root,message:j.message},children:["Building a newer version of this documentation failed."," ",tt]})),N==="CONTENT_NOT_FOUND"&&(b=(0,n.jsxs)(n.Fragment,{children:[tt&&(0,n.jsxs)(Qt.A,{variant:"outlined",severity:"error",action:(0,n.jsx)(Re,{buildLog:pt}),classes:{root:j.root,message:j.message},children:["Building a newer version of this documentation failed."," ",tt]}),(0,n.jsx)(Ae,{errorMessage:X})]})),b};var T=t(5893),W=t(54917),nt=t(3347),dt=t(71651),Et=t.n(dt);const _t=/main\.[A-Fa-f0-9]{8}\.min\.css$/,Jt=/^https:\/\/fonts\.googleapis\.com/,qt=/^https:\/\/fonts\.gstatic\.com/,ye=b=>b.nodeName==="LINK",Ht=b=>{const j=b?.getAttribute("href")||"",N=j.match(_t),Y=j.match(Jt),X=j.match(qt);return N||Y||X},oe=b=>(ye(b)&&!Ht(b)&&b.remove(),b),ne=b=>b.nodeName==="IFRAME",$e=(b,j)=>{const N=b.getAttribute("src")||"";try{const{host:Y}=new URL(N);return j.includes(Y)}catch{return!1}},Ne=b=>j=>(ne(j)&&!$e(j,b)&&j.remove(),j),Je=()=>{const b=(0,Q.gf)(J.U);return(0,o.useMemo)(()=>b.getOptionalConfig("techdocs.sanitizer"),[b])},nn=()=>{const b=Je();return(0,o.useCallback)(async j=>{const N=b?.getOptionalStringArray("allowedIframeHosts");Et().addHook("beforeSanitizeElements",oe);const Y=["link"];return N&&(Y.push("iframe"),Et().addHook("beforeSanitizeElements",Ne(N))),Et().sanitize(j.outerHTML,{ADD_TAGS:Y,FORBID_TAGS:["style"],WHOLE_DOCUMENT:!0,RETURN_DOM:!0})},[b])};var ie=t(34435),ce=t(268);const Se=({theme:b})=>`
|
|
13
|
-
/*================== Variables ==================*/
|
|
14
|
-
/*
|
|
15
|
-
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.
|
|
16
|
-
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.
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
|
-
:host {
|
|
20
|
-
/* FONT */
|
|
21
|
-
--md-default-fg-color: ${b.palette.text.primary};
|
|
22
|
-
--md-default-fg-color--light: ${b.palette.text.secondary};
|
|
23
|
-
--md-default-fg-color--lighter: ${(0,ce.a)(b.palette.text.secondary,.7)};
|
|
24
|
-
--md-default-fg-color--lightest: ${(0,ce.a)(b.palette.text.secondary,.3)};
|
|
25
|
-
|
|
26
|
-
/* BACKGROUND */
|
|
27
|
-
--md-default-bg-color:${b.palette.background.default};
|
|
28
|
-
--md-default-bg-color--light: ${b.palette.background.paper};
|
|
29
|
-
--md-default-bg-color--lighter: ${(0,ce.a)(b.palette.background.paper,.7)};
|
|
30
|
-
--md-default-bg-color--lightest: ${(0,ce.a)(b.palette.background.paper,.3)};
|
|
31
|
-
|
|
32
|
-
/* PRIMARY */
|
|
33
|
-
--md-primary-fg-color: ${b.palette.primary.main};
|
|
34
|
-
--md-primary-fg-color--light: ${b.palette.primary.light};
|
|
35
|
-
--md-primary-fg-color--dark: ${b.palette.primary.dark};
|
|
36
|
-
--md-primary-bg-color: ${b.palette.primary.contrastText};
|
|
37
|
-
--md-primary-bg-color--light: ${(0,ce.a)(b.palette.primary.contrastText,.7)};
|
|
38
|
-
|
|
39
|
-
/* ACCENT */
|
|
40
|
-
--md-accent-fg-color: var(--md-primary-fg-color);
|
|
41
|
-
--md-accent-fg-color--transparent: ${(0,ce.X4)(b.palette.primary.main,.1)};
|
|
42
|
-
--md-accent-bg-color: var(--md-primary-bg-color);
|
|
43
|
-
--md-accent-bg-color--light: var(--md-primary-bg-color--light);
|
|
44
|
-
|
|
45
|
-
/* SHADOW */
|
|
46
|
-
--md-shadow-z1: ${b.shadows[1]};
|
|
47
|
-
--md-shadow-z2: ${b.shadows[2]};
|
|
48
|
-
--md-shadow-z3: ${b.shadows[3]};
|
|
49
|
-
|
|
50
|
-
/* EXTENSIONS */
|
|
51
|
-
--md-admonition-fg-color: var(--md-default-fg-color);
|
|
52
|
-
--md-admonition-bg-color: var(--md-default-bg-color);
|
|
53
|
-
/* Admonitions and others are using SVG masks to define icons. These masks are defined as CSS variables. */
|
|
54
|
-
--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>');
|
|
55
|
-
--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>');
|
|
56
|
-
--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>');
|
|
57
|
-
--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>');
|
|
58
|
-
--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>');
|
|
59
|
-
--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>');
|
|
60
|
-
--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>');
|
|
61
|
-
--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>');
|
|
62
|
-
--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>');
|
|
63
|
-
--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>');
|
|
64
|
-
--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>');
|
|
65
|
-
--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>');
|
|
66
|
-
--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>');
|
|
67
|
-
--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>');
|
|
68
|
-
--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>');
|
|
69
|
-
--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>');
|
|
70
|
-
--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>');
|
|
71
|
-
--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>');
|
|
72
|
-
--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>');
|
|
73
|
-
--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>');
|
|
74
|
-
--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>');
|
|
75
|
-
--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>');
|
|
76
|
-
--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>');
|
|
77
|
-
--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>');
|
|
78
|
-
--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>');
|
|
79
|
-
--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>');
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
:host > * {
|
|
83
|
-
/* CODE */
|
|
84
|
-
--md-code-fg-color: ${b.palette.text.primary};
|
|
85
|
-
--md-code-bg-color: ${b.palette.background.paper};
|
|
86
|
-
--md-code-hl-color: ${(0,ce.X4)(b.palette.warning.main,.5)};
|
|
87
|
-
--md-code-hl-color--light: var(--md-code-hl-color);
|
|
88
|
-
--md-code-hl-keyword-color: ${b.palette.type==="dark"?b.palette.primary.light:b.palette.primary.dark};
|
|
89
|
-
--md-code-hl-function-color: ${b.palette.type==="dark"?b.palette.secondary.light:b.palette.secondary.dark};
|
|
90
|
-
--md-code-hl-string-color: ${b.palette.type==="dark"?b.palette.success.light:b.palette.success.dark};
|
|
91
|
-
--md-code-hl-number-color: ${b.palette.type==="dark"?b.palette.error.light:b.palette.error.dark};
|
|
92
|
-
--md-code-hl-constant-color: var(--md-code-hl-function-color);
|
|
93
|
-
--md-code-hl-special-color: var(--md-code-hl-function-color);
|
|
94
|
-
--md-code-hl-name-color: var(--md-code-fg-color);
|
|
95
|
-
--md-code-hl-comment-color: var(--md-default-fg-color--light);
|
|
96
|
-
--md-code-hl-generic-color: var(--md-default-fg-color--light);
|
|
97
|
-
--md-code-hl-variable-color: var(--md-default-fg-color--light);
|
|
98
|
-
--md-code-hl-operator-color: var(--md-default-fg-color--light);
|
|
99
|
-
--md-code-hl-punctuation-color: var(--md-default-fg-color--light);
|
|
100
|
-
|
|
101
|
-
/* TYPESET */
|
|
102
|
-
--md-typeset-font-size: 1rem;
|
|
103
|
-
--md-typeset-color: var(--md-default-fg-color);
|
|
104
|
-
--md-typeset-a-color: ${b.palette.link};
|
|
105
|
-
--md-typeset-table-color: ${b.palette.text.primary};
|
|
106
|
-
--md-typeset-table-color--light: ${(0,ce.X4)(b.palette.text.primary,.5)};
|
|
107
|
-
--md-typeset-del-color: ${b.palette.type==="dark"?(0,ce.X4)(b.palette.error.dark,.5):(0,ce.X4)(b.palette.error.light,.5)};
|
|
108
|
-
--md-typeset-ins-color: ${b.palette.type==="dark"?(0,ce.X4)(b.palette.success.dark,.5):(0,ce.X4)(b.palette.success.light,.5)};
|
|
109
|
-
--md-typeset-mark-color: ${b.palette.type==="dark"?(0,ce.X4)(b.palette.warning.dark,.5):(0,ce.X4)(b.palette.warning.light,.5)};
|
|
110
|
-
--md-typeset-kbd-color: var(--md-code-bg-color);
|
|
111
|
-
--md-typeset-kbd-accent-color var(--md-code-bg-color);
|
|
112
|
-
--md-typeset-kbd-border-color: var(--md-default-fg-color--light);
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
@media screen and (max-width: 76.1875em) {
|
|
116
|
-
:host > * {
|
|
117
|
-
/* TYPESET */
|
|
118
|
-
--md-typeset-font-size: .9rem;
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
@media screen and (max-width: 600px) {
|
|
123
|
-
:host > * {
|
|
124
|
-
/* TYPESET */
|
|
125
|
-
--md-typeset-font-size: .7rem;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
--md-footer-bg-color: var(--md-default-bg-color);
|
|
130
|
-
--md-footer-bg-color--dark: var(--md-default-bg-color);
|
|
131
|
-
`,Nn=({theme:b})=>`
|
|
132
|
-
/*================== Reset ==================*/
|
|
133
|
-
|
|
134
|
-
body {
|
|
135
|
-
--md-text-color: var(--md-default-fg-color);
|
|
136
|
-
--md-text-link-color: var(--md-accent-fg-color);
|
|
137
|
-
--md-text-font-family: ${b.typography.fontFamily};
|
|
138
|
-
font-family: var(--md-text-font-family);
|
|
139
|
-
background-color: unset;
|
|
140
|
-
}
|
|
141
|
-
`,Kn="224px",kn=({theme:b,sidebar:j})=>`
|
|
142
|
-
/*================== Layout ==================*/
|
|
143
|
-
|
|
144
|
-
/* mkdocs material v9 compat */
|
|
145
|
-
.md-nav__title {
|
|
146
|
-
color: var(--md-default-fg-color);
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
.md-grid {
|
|
150
|
-
max-width: 100%;
|
|
151
|
-
margin: 0;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
.md-nav {
|
|
155
|
-
font-size: calc(var(--md-typeset-font-size) * 0.9);
|
|
156
|
-
}
|
|
157
|
-
.md-nav__link {
|
|
158
|
-
display: flex;
|
|
159
|
-
align-items: center;
|
|
160
|
-
justify-content: space-between;
|
|
161
|
-
}
|
|
162
|
-
.md-nav__icon {
|
|
163
|
-
height: 20px !important;
|
|
164
|
-
width: 20px !important;
|
|
165
|
-
margin-left:${b.spacing(1)}px;
|
|
166
|
-
}
|
|
167
|
-
.md-nav__icon svg {
|
|
168
|
-
margin: 0;
|
|
169
|
-
width: 20px !important;
|
|
170
|
-
height: 20px !important;
|
|
171
|
-
}
|
|
172
|
-
.md-nav__icon:after {
|
|
173
|
-
width: 20px !important;
|
|
174
|
-
height: 20px !important;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
.md-nav__item--active > .md-nav__link, a.md-nav__link--active {
|
|
178
|
-
text-decoration: underline;
|
|
179
|
-
color: var(--md-typeset-a-color);
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
.md-main__inner {
|
|
183
|
-
margin-top: 0;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
.md-sidebar {
|
|
187
|
-
bottom: 75px;
|
|
188
|
-
position: fixed;
|
|
189
|
-
width: 16rem;
|
|
190
|
-
overflow-y: auto;
|
|
191
|
-
overflow-x: hidden;
|
|
192
|
-
scrollbar-color: rgb(193, 193, 193) #eee;
|
|
193
|
-
scrollbar-width: thin;
|
|
194
|
-
}
|
|
195
|
-
.md-sidebar .md-sidebar__scrollwrap {
|
|
196
|
-
width: calc(12.1rem);
|
|
197
|
-
overflow-y: hidden;
|
|
198
|
-
}
|
|
199
|
-
.md-sidebar--secondary {
|
|
200
|
-
right: ${b.spacing(3)}px;
|
|
201
|
-
}
|
|
202
|
-
.md-sidebar::-webkit-scrollbar {
|
|
203
|
-
width: 5px;
|
|
204
|
-
}
|
|
205
|
-
.md-sidebar::-webkit-scrollbar-button {
|
|
206
|
-
width: 5px;
|
|
207
|
-
height: 5px;
|
|
208
|
-
}
|
|
209
|
-
.md-sidebar::-webkit-scrollbar-track {
|
|
210
|
-
background: #eee;
|
|
211
|
-
border: 1 px solid rgb(250, 250, 250);
|
|
212
|
-
box-shadow: 0px 0px 3px #dfdfdf inset;
|
|
213
|
-
border-radius: 3px;
|
|
214
|
-
}
|
|
215
|
-
.md-sidebar::-webkit-scrollbar-thumb {
|
|
216
|
-
width: 5px;
|
|
217
|
-
background: rgb(193, 193, 193);
|
|
218
|
-
border: transparent;
|
|
219
|
-
border-radius: 3px;
|
|
220
|
-
}
|
|
221
|
-
.md-sidebar::-webkit-scrollbar-thumb:hover {
|
|
222
|
-
background: rgb(125, 125, 125);
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
.md-content {
|
|
226
|
-
max-width: calc(100% - 16rem * 2);
|
|
227
|
-
margin-left: 16rem;
|
|
228
|
-
margin-bottom: 50px;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
.md-footer {
|
|
232
|
-
position: fixed;
|
|
233
|
-
bottom: 0px;
|
|
234
|
-
pointer-events: none;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
.md-footer-nav__link, .md-footer__link {
|
|
238
|
-
pointer-events: all;
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
.md-footer__title {
|
|
242
|
-
background-color: unset;
|
|
243
|
-
}
|
|
244
|
-
.md-footer-nav__link, .md-footer__link {
|
|
245
|
-
width: 16rem;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
.md-dialog {
|
|
249
|
-
background-color: unset;
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
@media screen and (min-width: 76.25em) {
|
|
253
|
-
.md-sidebar {
|
|
254
|
-
height: auto;
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
@media screen and (max-width: 76.1875em) {
|
|
259
|
-
.md-nav {
|
|
260
|
-
transition: none !important;
|
|
261
|
-
background-color: var(--md-default-bg-color)
|
|
262
|
-
}
|
|
263
|
-
.md-nav--primary .md-nav__title {
|
|
264
|
-
cursor: auto;
|
|
265
|
-
color: var(--md-default-fg-color);
|
|
266
|
-
font-weight: 700;
|
|
267
|
-
white-space: normal;
|
|
268
|
-
line-height: 1rem;
|
|
269
|
-
height: auto;
|
|
270
|
-
display: flex;
|
|
271
|
-
flex-flow: column;
|
|
272
|
-
row-gap: 1.6rem;
|
|
273
|
-
padding: 1.2rem .8rem .8rem;
|
|
274
|
-
background-color: var(--md-default-bg-color);
|
|
275
|
-
}
|
|
276
|
-
.md-nav--primary .md-nav__title~.md-nav__list {
|
|
277
|
-
box-shadow: none;
|
|
278
|
-
}
|
|
279
|
-
.md-nav--primary .md-nav__title ~ .md-nav__list > :first-child {
|
|
280
|
-
border-top: none;
|
|
281
|
-
}
|
|
282
|
-
.md-nav--primary .md-nav__title .md-nav__button {
|
|
283
|
-
display: none;
|
|
284
|
-
}
|
|
285
|
-
.md-nav--primary .md-nav__title .md-nav__icon {
|
|
286
|
-
color: var(--md-default-fg-color);
|
|
287
|
-
position: static;
|
|
288
|
-
height: auto;
|
|
289
|
-
margin: 0 0 0 -0.2rem;
|
|
290
|
-
}
|
|
291
|
-
.md-nav--primary > .md-nav__title [for="none"] {
|
|
292
|
-
padding-top: 0;
|
|
293
|
-
}
|
|
294
|
-
.md-nav--primary .md-nav__item {
|
|
295
|
-
border-top: none;
|
|
296
|
-
}
|
|
297
|
-
.md-nav--primary :is(.md-nav__title,.md-nav__item) {
|
|
298
|
-
font-size : var(--md-typeset-font-size);
|
|
299
|
-
}
|
|
300
|
-
.md-nav .md-source {
|
|
301
|
-
display: none;
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
.md-sidebar {
|
|
305
|
-
height: 100%;
|
|
306
|
-
}
|
|
307
|
-
.md-sidebar--primary {
|
|
308
|
-
width: 12.1rem !important;
|
|
309
|
-
z-index: 200;
|
|
310
|
-
left: ${j.isPinned?`calc(-12.1rem + ${Kn})`:"calc(-12.1rem + 72px)"} !important;
|
|
311
|
-
}
|
|
312
|
-
.md-sidebar--secondary:not([hidden]) {
|
|
313
|
-
display: none;
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
.md-content {
|
|
317
|
-
max-width: 100%;
|
|
318
|
-
margin-left: 0;
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
.md-header__button {
|
|
322
|
-
margin: 0.4rem 0;
|
|
323
|
-
margin-left: 0.4rem;
|
|
324
|
-
padding: 0;
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
.md-overlay {
|
|
328
|
-
left: 0;
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
.md-footer {
|
|
332
|
-
position: static;
|
|
333
|
-
padding-left: 0;
|
|
334
|
-
}
|
|
335
|
-
.md-footer-nav__link {
|
|
336
|
-
/* footer links begin to overlap at small sizes without setting width */
|
|
337
|
-
width: 50%;
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
@media screen and (max-width: 600px) {
|
|
342
|
-
.md-sidebar--primary {
|
|
343
|
-
left: -12.1rem !important;
|
|
344
|
-
width: 12.1rem;
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
@media print {
|
|
350
|
-
.md-sidebar,
|
|
351
|
-
#toggle-sidebar {
|
|
352
|
-
display: none;
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
.md-content {
|
|
356
|
-
margin: 0;
|
|
357
|
-
width: 100%;
|
|
358
|
-
max-width: 100%;
|
|
359
|
-
}
|
|
360
|
-
}
|
|
361
|
-
`,zn=["h1","h2","h3","h4","h5","h6"],sn=[Se,Nn,kn,({theme:b})=>`
|
|
362
|
-
/*================== Typeset ==================*/
|
|
363
|
-
|
|
364
|
-
.md-typeset {
|
|
365
|
-
font-size: var(--md-typeset-font-size);
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
${zn.reduce((j,N)=>{const Y=b.typography.htmlFontSize??16,X=b.typography[N],{lineHeight:tt,fontFamily:pt,fontWeight:bt,fontSize:It}=X,Kt=Ut=>{let Wt=1;return typeof Ut=="number"&&(Wt=Ut/Y*.6),typeof Ut=="string"&&(Wt=Ut.replace("rem","")),`calc(${Wt} * var(--md-typeset-font-size))`};return j.concat(`
|
|
369
|
-
.md-typeset ${N} {
|
|
370
|
-
color: var(--md-default-fg-color);
|
|
371
|
-
line-height: ${tt};
|
|
372
|
-
font-family: ${pt};
|
|
373
|
-
font-weight: ${bt};
|
|
374
|
-
font-size: ${Kt(It)};
|
|
375
|
-
}
|
|
376
|
-
`)},"")}
|
|
377
|
-
|
|
378
|
-
.md-typeset .md-content__button {
|
|
379
|
-
color: var(--md-default-fg-color);
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
.md-typeset hr {
|
|
383
|
-
border-bottom: 0.05rem dotted ${b.palette.divider};
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
.md-typeset details {
|
|
387
|
-
font-size: var(--md-typeset-font-size) !important;
|
|
388
|
-
}
|
|
389
|
-
.md-typeset details summary {
|
|
390
|
-
padding-left: 2.5rem !important;
|
|
391
|
-
}
|
|
392
|
-
.md-typeset details summary:before,
|
|
393
|
-
.md-typeset details summary:after {
|
|
394
|
-
top: 50% !important;
|
|
395
|
-
width: 20px !important;
|
|
396
|
-
height: 20px !important;
|
|
397
|
-
transform: rotate(0deg) translateY(-50%) !important;
|
|
398
|
-
}
|
|
399
|
-
.md-typeset details[open] > summary:after {
|
|
400
|
-
transform: rotate(90deg) translateX(-50%) !important;
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
.md-typeset blockquote {
|
|
404
|
-
color: var(--md-default-fg-color--light);
|
|
405
|
-
border-left: 0.2rem solid var(--md-default-fg-color--light);
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
.md-typeset table:not([class]) {
|
|
409
|
-
font-size: var(--md-typeset-font-size);
|
|
410
|
-
border: 1px solid var(--md-default-fg-color);
|
|
411
|
-
border-bottom: none;
|
|
412
|
-
border-collapse: collapse;
|
|
413
|
-
}
|
|
414
|
-
.md-typeset table:not([class]) th {
|
|
415
|
-
font-weight: bold;
|
|
416
|
-
}
|
|
417
|
-
.md-typeset table:not([class]) td, .md-typeset table:not([class]) th {
|
|
418
|
-
border-bottom: 1px solid var(--md-default-fg-color);
|
|
419
|
-
}
|
|
420
|
-
|
|
421
|
-
.md-typeset pre > code::-webkit-scrollbar-thumb {
|
|
422
|
-
background-color: hsla(0, 0%, 0%, 0.32);
|
|
423
|
-
}
|
|
424
|
-
.md-typeset pre > code::-webkit-scrollbar-thumb:hover {
|
|
425
|
-
background-color: hsla(0, 0%, 0%, 0.87);
|
|
426
|
-
}
|
|
427
|
-
|
|
428
|
-
.md-typeset code {
|
|
429
|
-
word-break: keep-all;
|
|
430
|
-
}
|
|
431
|
-
`,()=>`
|
|
432
|
-
/*================== Animations ==================*/
|
|
433
|
-
/*
|
|
434
|
-
Disable CSS animations on link colors as they lead to issues in dark mode.
|
|
435
|
-
The dark mode color theme is applied later and theirfore there is always an animation from light to dark mode when navigation between pages.
|
|
436
|
-
*/
|
|
437
|
-
.md-dialog, .md-nav__link, .md-footer__link, .md-typeset a, .md-typeset a::before, .md-typeset .headerlink {
|
|
438
|
-
transition: none;
|
|
439
|
-
}
|
|
440
|
-
`,({theme:b})=>`
|
|
441
|
-
/*================== Extensions ==================*/
|
|
442
|
-
|
|
443
|
-
/* HIGHLIGHT */
|
|
444
|
-
.highlight .md-clipboard:after {
|
|
445
|
-
content: unset;
|
|
446
|
-
}
|
|
447
|
-
|
|
448
|
-
.highlight .nx {
|
|
449
|
-
color: ${b.palette.type==="dark"?"#ff53a3":"#ec407a"};
|
|
450
|
-
}
|
|
451
|
-
|
|
452
|
-
/* CODE HILITE */
|
|
453
|
-
.codehilite .gd {
|
|
454
|
-
background-color: ${b.palette.type==="dark"?"rgba(248,81,73,0.65)":"#fdd"};
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
.codehilite .gi {
|
|
458
|
-
background-color: ${b.palette.type==="dark"?"rgba(46,160,67,0.65)":"#dfd"};
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
/* TABBED */
|
|
462
|
-
.tabbed-set>input:nth-child(1):checked~.tabbed-labels>:nth-child(1),
|
|
463
|
-
.tabbed-set>input:nth-child(2):checked~.tabbed-labels>:nth-child(2),
|
|
464
|
-
.tabbed-set>input:nth-child(3):checked~.tabbed-labels>:nth-child(3),
|
|
465
|
-
.tabbed-set>input:nth-child(4):checked~.tabbed-labels>:nth-child(4),
|
|
466
|
-
.tabbed-set>input:nth-child(5):checked~.tabbed-labels>:nth-child(5),
|
|
467
|
-
.tabbed-set>input:nth-child(6):checked~.tabbed-labels>:nth-child(6),
|
|
468
|
-
.tabbed-set>input:nth-child(7):checked~.tabbed-labels>:nth-child(7),
|
|
469
|
-
.tabbed-set>input:nth-child(8):checked~.tabbed-labels>:nth-child(8),
|
|
470
|
-
.tabbed-set>input:nth-child(9):checked~.tabbed-labels>:nth-child(9),
|
|
471
|
-
.tabbed-set>input:nth-child(10):checked~.tabbed-labels>:nth-child(10),
|
|
472
|
-
.tabbed-set>input:nth-child(11):checked~.tabbed-labels>:nth-child(11),
|
|
473
|
-
.tabbed-set>input:nth-child(12):checked~.tabbed-labels>:nth-child(12),
|
|
474
|
-
.tabbed-set>input:nth-child(13):checked~.tabbed-labels>:nth-child(13),
|
|
475
|
-
.tabbed-set>input:nth-child(14):checked~.tabbed-labels>:nth-child(14),
|
|
476
|
-
.tabbed-set>input:nth-child(15):checked~.tabbed-labels>:nth-child(15),
|
|
477
|
-
.tabbed-set>input:nth-child(16):checked~.tabbed-labels>:nth-child(16),
|
|
478
|
-
.tabbed-set>input:nth-child(17):checked~.tabbed-labels>:nth-child(17),
|
|
479
|
-
.tabbed-set>input:nth-child(18):checked~.tabbed-labels>:nth-child(18),
|
|
480
|
-
.tabbed-set>input:nth-child(19):checked~.tabbed-labels>:nth-child(19),
|
|
481
|
-
.tabbed-set>input:nth-child(20):checked~.tabbed-labels>:nth-child(20) {
|
|
482
|
-
color: var(--md-accent-fg-color);
|
|
483
|
-
border-color: var(--md-accent-fg-color);
|
|
484
|
-
}
|
|
485
|
-
|
|
486
|
-
/* TASK-LIST */
|
|
487
|
-
.task-list-control .task-list-indicator::before {
|
|
488
|
-
background-color: ${b.palette.action.disabledBackground};
|
|
489
|
-
}
|
|
490
|
-
.task-list-control [type="checkbox"]:checked + .task-list-indicator:before {
|
|
491
|
-
background-color: ${b.palette.success.main};
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
/* ADMONITION */
|
|
495
|
-
.admonition {
|
|
496
|
-
font-size: var(--md-typeset-font-size) !important;
|
|
497
|
-
}
|
|
498
|
-
.admonition .admonition-title {
|
|
499
|
-
padding-left: 2.5rem !important;
|
|
500
|
-
}
|
|
501
|
-
|
|
502
|
-
.admonition .admonition-title:before {
|
|
503
|
-
top: 50% !important;
|
|
504
|
-
width: 20px !important;
|
|
505
|
-
height: 20px !important;
|
|
506
|
-
transform: translateY(-50%) !important;
|
|
507
|
-
}
|
|
508
|
-
`],Hn=()=>(0,ie.Ut)(),Vn=()=>{const b=Hn(),j=(0,W.A)();return(0,o.useMemo)(()=>{const N={theme:j,sidebar:b};return sn.reduce((Y,X)=>Y+X(N),"")},[j,b])},Gn=()=>{const b=Vn();return(0,o.useCallback)(j=>(j.getElementsByTagName("head")[0].insertAdjacentHTML("beforeend",`<style>${b}</style>`),j),[b])},An=async(b,j)=>{let N;if(typeof b=="string")N=new DOMParser().parseFromString(b,"text/html").documentElement;else if(b instanceof Element)N=b;else throw new Error("dom is not a recognized type");for(const Y of j)N=await Y(N);return N},dn=(b,j,N)=>{const Y=b==="src"&&j.endsWith(".svg"),X=!j.match(/^([a-z]*:)?\/\//i),tt=j.startsWith(N);return Y&&(X||tt)},Yn=({techdocsStorageApi:b,entityId:j,path:N})=>async Y=>{const X=await b.getApiOrigin(),tt=async(pt,bt)=>{for(const It of pt)if(It.hasAttribute(bt)){const Kt=It.getAttribute(bt);if(!Kt)return;const Ut=await b.getBaseUrl(Kt,j,N);if(dn(bt,Kt,X))try{const Bt=await(await fetch(Ut,{credentials:"include"})).text();It.setAttribute(bt,`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(Bt)))}`)}catch{It.setAttribute("alt",`Error: ${Kt}`)}else It.setAttribute(bt,Ut)}};return await Promise.all([tt(Y.querySelectorAll("img"),"src"),tt(Y.querySelectorAll("script"),"src"),tt(Y.querySelectorAll("source"),"src"),tt(Y.querySelectorAll("link"),"href"),tt(Y.querySelectorAll("a[download]"),"href")]),Y},Qn=()=>b=>(((N,Y)=>{Array.from(N).filter(X=>X.hasAttribute(Y)).forEach(X=>{const tt=X.getAttribute(Y);if(tt){tt.match(/^https?:\/\//i)&&X.setAttribute("target","_blank");try{const pt=Zn(window.location.href);X.setAttribute(Y,new URL(tt,pt).toString())}catch{X.replaceWith(X.textContent||tt)}}})})(Array.from(b.getElementsByTagName("a")),"href"),b);function Zn(b){const j=new URL(b);return!j.pathname.endsWith("/")&&!j.pathname.endsWith(".html")&&(j.pathname+="/"),j.toString()}var Jn=t(27326);let xn;xn=Promise.resolve().then(t.t.bind(t,25873,19));function un(b,j){xn.then(N=>{"createRoot"in N?N.createRoot(j).render(b):N.render(b,j)})}const Xn=()=>b=>{const j=b.querySelector('.md-header label[for="__drawer"]'),N=b.querySelector("article");if(!j||!N)return b;const Y=j.cloneNode();return un(o.createElement(Jn.A),Y),Y.id="toggle-sidebar",Y.title="Toggle Sidebar",Y.classList.add("md-content__button"),Y.style.setProperty("padding","0 0 0 5px"),Y.style.setProperty("margin","0.4rem 0 0.4rem 0.4rem"),N?.prepend(Y),b},_n=()=>b=>(b.querySelector(".md-header")?.remove(),b),qn=()=>b=>(b.querySelector(".md-footer .md-copyright")?.remove(),b.querySelector(".md-footer-copyright")?.remove(),b);var ts=t(36021),es=t(90292),ns=t(52536),ss=t.n(ns);const rs=b=>j=>{const N=j.querySelector('[title="Edit this page"]');if(!N||!N.href)return j;const Y=new URL(N.href),X=b.byUrl(Y);if(X?.type!=="github"&&X?.type!=="gitlab")return j;const tt=j.querySelector("article>h1")?.childNodes[0].textContent||"",pt=encodeURIComponent(`Documentation Feedback: ${tt}`),bt=encodeURIComponent(`Page source:
|
|
509
|
-
${N.href}
|
|
510
|
-
|
|
511
|
-
Feedback:`),It=X?.type==="github"?(0,ts.F)(Y.href,"blob"):Y.href,Kt=ss()(It),Ut=`/${Kt.organization}/${Kt.name}`,Wt=N.cloneNode();switch(X?.type){case"gitlab":Wt.href=`${Y.origin}${Ut}/issues/new?issue[title]=${pt}&issue[description]=${bt}`;break;case"github":Wt.href=`${Y.origin}${Ut}/issues/new?title=${pt}&body=${bt}`;break;default:return j}return un(o.createElement(es.A),Wt),Wt.style.paddingLeft="5px",Wt.title="Leave feedback for this page",Wt.id="git-feedback-link",N?.insertAdjacentElement("beforebegin",Wt),j},os=()=>b=>(setTimeout(()=>{const j=b?.querySelectorAll("li.md-nav__item--active");j.length!==0&&(j.forEach(Y=>{const X=Y?.querySelector("input");X?.checked||X?.click()}),j[j.length-1].scrollIntoView())},200),b);var as=t(50868),is=t(10437),Cn=t(71677),Pn=t(7031),cs=t(36338);const ls=(0,Pn.A)(b=>({tooltip:{fontSize:"inherit",color:b.palette.text.primary,margin:0,padding:b.spacing(.5),backgroundColor:"transparent",boxShadow:"none"}}))(Cn.Ay),ds=()=>(0,n.jsx)(is.A,{children:(0,n.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"})}),us=({text:b})=>{const[j,N]=(0,o.useState)(!1),[,Y]=(0,cs.A)(),X=(0,o.useCallback)(()=>{Y(b),N(!0)},[b,Y]),tt=(0,o.useCallback)(()=>{N(!1)},[N]);return(0,n.jsx)(ls,{title:"Copied to clipboard",placement:"left",open:j,onClose:tt,leaveDelay:1e3,children:(0,n.jsx)(Tt.A,{style:{color:"inherit",position:"absolute"},className:"md-clipboard md-icon",onClick:X,children:(0,n.jsx)(ds,{})})})},hs=b=>j=>{const N=j.querySelectorAll("pre > code");for(const Y of N){const X=Y.textContent||"",tt=document.createElement("div");Y?.parentElement?.prepend(tt),un((0,n.jsx)(as.A,{theme:b,children:(0,n.jsx)(us,{text:X})}),tt)}return j},gs=({baseUrl:b,onClick:j})=>N=>(Array.from(N.getElementsByTagName("a")).forEach(Y=>{Y.addEventListener("click",X=>{const pt=Y.getAttribute("href");pt&&pt.startsWith(b)&&!Y.hasAttribute("download")&&(X.preventDefault(),j(X,pt))})}),N),On=({onLoading:b,onLoaded:j})=>N=>(b(),N.addEventListener(E,function Y(){j(),N.removeEventListener(E,Y)}),N);function fs(b,j){const N=new URL(j),Y=`${N.origin}${N.pathname.replace(/\/$/,"")}`,X=b.replace(Y,"").replace(/^\/+/,""),tt=new URL(`http://localhost/${X}`);return`${tt.pathname}${tt.search}${tt.hash}`}function ps(){const b=(0,o.useRef)((0,Mt.Zp)()),N=(0,Q.gf)(J.U).getOptionalString("app.baseUrl");return(0,o.useCallback)(X=>{let tt=X;if(N)try{tt=fs(X,N)}catch{}b.current(tt)},[N])}const ms="screen and (max-width: 76.1875em)",ys=b=>{const j=ps(),N=(0,W.A)(),Y=(0,T.A)(ms),X=nn(),tt=Gn(),pt=(0,B.s)(),bt=(0,Q.gf)(ze.s),It=(0,Q.gf)(nt.Y),{state:Kt,path:Ut,content:Wt}=me(),[Bt,ve]=(0,o.useState)(null),ge=m(Bt),kt=(0,o.useCallback)(()=>{if(!Bt)return;Bt.querySelectorAll(".md-sidebar").forEach(te=>{if(Y)te.style.top="0px";else{const Me=document?.querySelector(".techdocs-reader-page")?.getBoundingClientRect().top??0;let we=Bt.getBoundingClientRect().top??0;const _e=Bt.querySelector(".md-container > .md-tabs")?.getBoundingClientRect().height??0;we<Me&&(we=Me);const Ge=Math.max(we,0)+_e;te.style.top=`${Ge}px`;const Rn=Bt.querySelector(".md-container > .md-footer")?.getBoundingClientRect().top??window.innerHeight;te.style.height=`${Rn-Ge}px`}te.style.setProperty("opacity","1")})},[Bt,Y]);(0,o.useEffect)(()=>(window.addEventListener("resize",kt),window.addEventListener("scroll",kt,!0),()=>{window.removeEventListener("resize",kt),window.removeEventListener("scroll",kt,!0)}),[Bt,kt]);const fe=(0,o.useCallback)(()=>{if(!Bt)return;const Nt=Bt.querySelector(".md-footer");Nt&&(Nt.style.width=`${Bt.getBoundingClientRect().width}px`)},[Bt]);(0,o.useEffect)(()=>(window.addEventListener("resize",fe),()=>{window.removeEventListener("resize",fe)}),[Bt,fe]),(0,o.useEffect)(()=>{ge||(fe(),kt())},[Kt,ge,fe,kt]);const se=(0,o.useCallback)((Nt,te)=>An(Nt,[X,Yn({techdocsStorageApi:bt,entityId:b,path:te}),Qn(),Xn(),_n(),qn(),rs(It),tt]),[b,It,bt,X,tt]),ae=(0,o.useCallback)(async Nt=>An(Nt,[os(),hs(N),gs({baseUrl:window.location.origin,onClick:(te,re)=>{const Me=te.ctrlKey||te.metaKey,we=new URL(re),Ve=te.target?.innerText||re,_e=re.replace(window.location.origin,"");pt.captureEvent("click",Ve,{attributes:{to:_e}}),we.hash?Me?window.open(re,"_blank"):(j(re),Nt?.querySelector(`[id="${we.hash.slice(1)}"]`)?.scrollIntoView()):Me?window.open(re,"_blank"):j(re)}}),On({onLoading:()=>{},onLoaded:()=>{Nt.querySelector(".md-nav__title")?.removeAttribute("for")}}),On({onLoading:()=>{Array.from(Nt.querySelectorAll(".md-sidebar")).forEach(re=>{re.style.setProperty("opacity","0")})},onLoaded:()=>{}})]),[N,j,pt]);return(0,o.useEffect)(()=>{if(!Wt)return()=>{};let Nt=!0;return se(Wt,Ut).then(async te=>{if(!te?.innerHTML||!Nt)return;window.scroll({top:0});const re=await ae(te);ve(re)}),()=>{Nt=!1}},[Wt,Ut,se,ae]),Bt};var hn=t(41883),bn=t(72020),rn=t(99730);const vs=()=>{const b=(0,bn.YR)(),{shadowRoot:j}=(0,v.V)(),N=j?.querySelector('[data-md-component="content"]'),Y=j?.querySelector('div[data-md-component="sidebar"][data-md-type="navigation"], div[data-md-component="navigation"]');let X=Y?.querySelector('[data-techdocs-addons-location="primary sidebar"]');X||(X=document.createElement("div"),X.setAttribute("data-techdocs-addons-location","primary sidebar"),Y?.prepend(X));const tt=j?.querySelector('div[data-md-component="sidebar"][data-md-type="toc"], div[data-md-component="toc"]');let pt=tt?.querySelector('[data-techdocs-addons-location="secondary sidebar"]');return pt||(pt=document.createElement("div"),pt.setAttribute("data-techdocs-addons-location","secondary sidebar"),tt?.prepend(pt)),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(hn.A,{container:X,children:b.renderComponentsByLocation(rn.e.PrimarySidebar)}),(0,n.jsx)(hn.A,{container:N,children:b.renderComponentsByLocation(rn.e.Content)}),(0,n.jsx)(hn.A,{container:pt,children:b.renderComponentsByLocation(rn.e.SecondarySidebar)})]})},Es=(0,y.A)({search:{width:"100%","@media (min-width: 76.1875em)":{width:"calc(100% - 34.4rem)",margin:"0 auto"},"@media print":{display:"none"}}}),De=Ze(b=>{const{withSearch:j=!0,onReady:N}=b,Y=Es(),{entityMetadata:{value:X,loading:tt},entityRef:pt,setShadowRoot:bt}=(0,v.V)(),It=ys(pt),Kt=window.location.pathname,Ut=window.location.hash,Wt=m(It),[Bt]=f([`[id="${Ut.slice(1)}"]`]);(0,o.useEffect)(()=>{Wt||(Ut?Bt&&Bt.scrollIntoView():document?.querySelector("header")?.scrollIntoView())},[Kt,Ut,Bt,Wt]);const ve=(0,o.useCallback)(ge=>{bt(ge),N instanceof Function&&N()},[bt,N]);return tt===!1&&!X?(0,n.jsx)(I.M,{status:"404",statusMessage:"PAGE NOT FOUND"}):It?(0,n.jsx)(D.U,{children:(0,n.jsxs)(l.A,{container:!0,children:[(0,n.jsx)(l.A,{xs:12,item:!0,children:(0,n.jsx)(x,{})}),j&&(0,n.jsx)(l.A,{className:Y.search,xs:"auto",item:!0,children:(0,n.jsx)(he,{entityId:pt,entityTitle:X?.metadata?.title})}),(0,n.jsx)(l.A,{xs:12,item:!0,children:(0,n.jsx)(A,{element:It,onAppend:ve,children:(0,n.jsx)(vs,{})})})]})}):(0,n.jsx)(D.U,{children:(0,n.jsx)(l.A,{container:!0,children:(0,n.jsx)(l.A,{xs:12,item:!0,children:(0,n.jsx)(x,{})})})})}),Fe=null},58269:(z,P,t)=>{"use strict";t.d(P,{T:()=>H});var n=t(31085),o=t(14041),l=t(93285),y=t(42899),v=t(4387),g=t(13660),u=t(72020),c=t(86892),h=t(99730),E=t(67871),p=t(29463),m=t(34428),A=t(51372),i=t(72792),C=t(69814),f=t(72427),O=t(65461),S=t(9222),I=t(45250),D=t.n(I),w=t(82779);const $=(0,n.jsx)(v.A,{animation:"wave",variant:"text",height:40}),H=G=>{const{children:F}=G,Q=(0,u.YR)(),B=(0,f.gf)(O.U),{title:V,setTitle:J,subtitle:rt,setSubtitle:lt,entityRef:ht,metadata:{value:Ct,loading:Rt},entityMetadata:{value:st,loading:at}}=(0,c.V)();(0,o.useEffect)(()=>{Ct&&(J(Ct.site_name),lt(()=>{let{site_description:Z}=Ct;return(!Z||Z==="None")&&(Z=""),Z}))},[Ct,J,lt]);const ot=B.getOptional("app.title")||"Backstage",ft=[V,rt,ot].filter(Boolean).join(" | "),{locationMetadata:At,spec:yt}=st||{},St=yt?.lifecycle,Tt=st?(0,E.t)(st,A.vv):[],wt=(0,S.S)(w.rQ)(),$t=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(i.S,{label:(0,I.capitalize)(st?.kind||"entity"),value:(0,n.jsx)(p.z,{color:"inherit",entityRef:ht,title:st?.metadata.title,defaultKind:"Component"})}),Tt.length>0&&(0,n.jsx)(i.S,{label:"Owner",value:(0,n.jsx)(m.i,{color:"inherit",entityRefs:Tt,defaultKind:"group"})}),St?(0,n.jsx)(i.S,{label:"Lifecycle",value:String(St)}):null,At&&At.type!=="dir"&&At.type!=="file"?(0,n.jsx)(i.S,{label:"",value:(0,n.jsxs)(y.A,{container:!0,direction:"column",alignItems:"center",children:[(0,n.jsx)(y.A,{style:{padding:0},item:!0,children:(0,n.jsx)(g.A,{style:{marginTop:"-25px"}})}),(0,n.jsx)(y.A,{style:{padding:0},item:!0,children:"Source"})]}),url:At.target}):null]});return!at&&st===void 0||!Rt&&Ct===void 0?null:(0,n.jsxs)(C.Y,{type:"Documentation",typeLink:wt,title:V||$,subtitle:rt===""?void 0:rt||$,children:[(0,n.jsx)(l.A,{titleTemplate:"%s",children:(0,n.jsx)("title",{children:ft})}),$t,F,Q.renderComponentsByLocation(h.e.Header)]})}},82779:(z,P,t)=>{"use strict";t.d(P,{Oc:()=>l,Ri:()=>y,rQ:()=>o});var n=t(34569);const o=(0,n.H)({id:"techdocs:index-page"}),l=(0,n.H)({id:"techdocs:reader-page",params:["namespace","kind","name"]}),y=(0,n.H)({id:"techdocs:catalog-reader-view"})},27698:(z,P,t)=>{"use strict";t.r(P),t.d(P,{TechDocsSearchResultListItem:()=>E});var n=t(31085),o=t(14041),l=t(46423),y=t(5951),v=t(58837),g=t(72501),u=t(72072),c=t(70734);const h=(0,v.A)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",marginBottom:"1rem"}}),E=p=>{const{result:m,highlight:A,lineClamp:i=5,asListItem:C=!0,asLink:f=!0,title:O,icon:S}=p,I=h(),D=({children:H})=>f?(0,n.jsx)(u.N_,{noTrack:!0,to:m.location,children:H}):(0,n.jsx)(n.Fragment,{children:H}),w=()=>{const H=A?.fields.title?(0,n.jsx)(c.e,{text:A.fields.title,preTag:A.preTag,postTag:A.postTag}):m.title,G=A?.fields.entityTitle?(0,n.jsx)(c.e,{text:A.fields.entityTitle,preTag:A.preTag,postTag:A.postTag}):m.entityTitle,F=A?.fields.name?(0,n.jsx)(c.e,{text:A.fields.name,preTag:A.preTag,postTag:A.postTag}):m.name;return m?(0,n.jsx)(y.A,{className:I.itemText,primaryTypographyProps:{variant:"h6"},primary:(0,n.jsx)(D,{children:O||(0,n.jsxs)(n.Fragment,{children:[H," | ",G??F," docs"]})}),secondary:(0,n.jsx)(g.A,{component:"span",style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:i,overflow:"hidden"},color:"textSecondary",variant:"body2",children:A?.fields.text?(0,n.jsx)(c.e,{text:A.fields.text,preTag:A.preTag,postTag:A.postTag}):m.text})}):null},$=({children:H})=>C?(0,n.jsxs)(n.Fragment,{children:[S&&(0,n.jsx)(l.A,{children:typeof S=="function"?S(m):S}),(0,n.jsx)("div",{className:I.flexContainer,children:H})]}):(0,n.jsx)(n.Fragment,{children:H});return(0,n.jsx)($,{children:(0,n.jsx)(w,{})})}},86973:()=>{}},z=>{var P=n=>z(z.s=n);z.O(0,[1751,1888,5067,1678,235,6587,2754,9669,1975,5042,7400,4121],()=>(P(14415),P(33911)));var t=z.O()}]);})();
|
|
512
|
-
|
|
513
|
-
//# sourceMappingURL=main.c21a7aa4.js.map
|