@techdocs/cli 0.0.0-nightly-20220407023218 → 0.0.0-nightly-20220410023309
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 +4 -4
- package/dist/cjs/PublisherConfig-162efac5.cjs.js.map +1 -1
- package/dist/cjs/generate-67f1ab98.cjs.js.map +1 -1
- package/dist/cjs/migrate-181e95f5.cjs.js.map +1 -1
- package/dist/cjs/mkdocs-7c045a2a.cjs.js.map +1 -1
- package/dist/cjs/mkdocsServer-0af6527d.cjs.js.map +1 -1
- package/dist/cjs/publish-7bf1e5f7.cjs.js.map +1 -1
- package/dist/cjs/serve-66a37894.cjs.js.map +1 -1
- package/dist/cjs/utility-51f4a306.cjs.js.map +1 -1
- package/dist/embedded-app/index.html +1 -1
- package/dist/embedded-app/static/{main.a260d25c.js → main.bae8d87a.js} +56 -56
- package/dist/embedded-app/static/main.bae8d87a.js.map +1 -0
- package/dist/embedded-app/static/{runtime.a260d25c.js → runtime.bae8d87a.js} +1 -1
- package/dist/embedded-app/static/{runtime.a260d25c.js.map → runtime.bae8d87a.js.map} +1 -1
- package/dist/embedded-app/static/vendor.bae8d87a.js +140 -0
- package/dist/embedded-app/static/vendor.bae8d87a.js.map +1 -0
- package/dist/index.cjs.js.map +1 -1
- package/package.json +5 -5
- package/dist/embedded-app/static/main.a260d25c.js.map +0 -1
- package/dist/embedded-app/static/vendor.a260d25c.js +0 -140
- package/dist/embedded-app/static/vendor.a260d25c.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(()=>{var Vi=Object.defineProperty;var ji=(_,s,e)=>s in _?Vi(_,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):_[s]=e;var ae=(_,s,e)=>(ji(_,typeof s!="symbol"?s+"":s,e),e),oo=(_,s,e)=>{if(!s.has(_))throw TypeError("Cannot "+e)};var tt=(_,s,e)=>(oo(_,s,"read from private field"),e?e.call(_):s.get(_)),sn=(_,s,e)=>{if(s.has(_))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(_):s.set(_,e)},gn=(_,s,e,r)=>(oo(_,s,"write to private field"),r?r.call(_,e):s.set(_,e),e);(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[179],{30001:function(_,s,e){"use strict";e.d(s,{n3:function(){return E},MS:function(){return i}});var r=e(48023),t=e(10179),l=e(96279),f=e.n(l);const E=Symbol.for("CATALOG_FILTER_EXISTS_0e15b590c0b343a2bae3e787e84c2111");class i{constructor(m){ae(this,"discoveryApi");ae(this,"fetchApi");this.discoveryApi=m.discoveryApi,this.fetchApi=m.fetchApi||{fetch:f()}}async getEntityAncestors(m,u){const{kind:h,namespace:g,name:R}=(0,r.of)(m.entityRef);return await this.requestRequired("GET",`/entities/by-name/${encodeURIComponent(h)}/${encodeURIComponent(g)}/${encodeURIComponent(R)}/ancestry`,u)}async getLocationById(m,u){return await this.requestOptional("GET",`/locations/${encodeURIComponent(m)}`,u)}async getEntities(m,u){const{filter:h=[],fields:g=[],offset:R,limit:C,after:M}=m!=null?m:{},b=[];for(const L of[h].flat()){const z=[];for(const[W,q]of Object.entries(L))for(const oe of[q].flat())oe===E?z.push(encodeURIComponent(W)):typeof oe=="string"&&z.push(`${encodeURIComponent(W)}=${encodeURIComponent(oe)}`);z.length&&b.push(`filter=${z.join(",")}`)}g.length&&b.push(`fields=${g.map(encodeURIComponent).join(",")}`),R!==void 0&&b.push(`offset=${R}`),C!==void 0&&b.push(`limit=${C}`),M!==void 0&&b.push(`after=${encodeURIComponent(M)}`);const Q=b.length?`?${b.join("&")}`:"",I=await this.requestRequired("GET",`/entities${Q}`,u),P=(L,z)=>{var oe,ve;if(((oe=L.metadata)==null?void 0:oe.name)===void 0||L.kind===void 0||((ve=z.metadata)==null?void 0:ve.name)===void 0||z.kind===void 0)return 0;const W=(0,r.eE)(L),q=(0,r.eE)(z);return W<q?-1:W>q?1:0};return{items:I.sort(P)}}async getEntityByRef(m,u){const{kind:h,namespace:g,name:R}=(0,r.of)(m);return this.requestOptional("GET",`/entities/by-name/${encodeURIComponent(h)}/${encodeURIComponent(g)}/${encodeURIComponent(R)}`,u)}async getEntityByName(m,u){const{kind:h,namespace:g="default",name:R}=m;return this.requestOptional("GET",`/entities/by-name/${encodeURIComponent(h)}/${encodeURIComponent(g)}/${encodeURIComponent(R)}`,u)}async refreshEntity(m,u){const h=await this.fetchApi.fetch(`${await this.discoveryApi.getBaseUrl("catalog")}/refresh`,{headers:{"Content-Type":"application/json",...(u==null?void 0:u.token)&&{Authorization:`Bearer ${u==null?void 0:u.token}`}},method:"POST",body:JSON.stringify({entityRef:m})});if(h.status!==200)throw new Error(await h.text())}async getEntityFacets(m,u){const{filter:h=[],facets:g}=m,R=[];for(const M of[h].flat()){const b=[];for(const[Q,I]of Object.entries(M))for(const P of[I].flat())P===E?b.push(encodeURIComponent(Q)):typeof P=="string"&&b.push(`${encodeURIComponent(Q)}=${encodeURIComponent(P)}`);b.length&&R.push(`filter=${b.join(",")}`)}for(const M of g)R.push(`facet=${encodeURIComponent(M)}`);const C=R.length?`?${R.join("&")}`:"";return await this.requestOptional("GET",`/entity-facets${C}`,u)}async addLocation({type:m="url",target:u,dryRun:h},g){const R=await this.fetchApi.fetch(`${await this.discoveryApi.getBaseUrl("catalog")}/locations${h?"?dryRun=true":""}`,{headers:{"Content-Type":"application/json",...(g==null?void 0:g.token)&&{Authorization:`Bearer ${g==null?void 0:g.token}`}},method:"POST",body:JSON.stringify({type:m,target:u})});if(R.status!==201)throw new Error(await R.text());const{location:C,entities:M,exists:b}=await R.json();if(!C)throw new Error(`Location wasn't added: ${u}`);return{location:C,entities:M,exists:b}}async getLocationByRef(m,u){return(await this.requestRequired("GET","/locations",u)).map(g=>g.data).find(g=>m===(0,r.NZ)(g))}async removeLocationById(m,u){await this.requestIgnored("DELETE",`/locations/${encodeURIComponent(m)}`,u)}async removeEntityByUid(m,u){await this.requestIgnored("DELETE",`/entities/by-uid/${encodeURIComponent(m)}`,u)}async requestIgnored(m,u,h){const g=`${await this.discoveryApi.getBaseUrl("catalog")}${u}`,R=h!=null&&h.token?{Authorization:`Bearer ${h.token}`}:{},C=await this.fetchApi.fetch(g,{method:m,headers:R});if(!C.ok)throw await t.VL.fromResponse(C)}async requestRequired(m,u,h){const g=`${await this.discoveryApi.getBaseUrl("catalog")}${u}`,R=h!=null&&h.token?{Authorization:`Bearer ${h.token}`}:{},C=await this.fetchApi.fetch(g,{method:m,headers:R});if(!C.ok)throw await t.VL.fromResponse(C);return await C.json()}async requestOptional(m,u,h){const g=`${await this.discoveryApi.getBaseUrl("catalog")}${u}`,R=h!=null&&h.token?{Authorization:`Bearer ${h.token}`}:{},C=await this.fetchApi.fetch(g,{method:m,headers:R});if(!C.ok){if(C.status===404)return;throw await t.VL.fromResponse(C)}return await C.json()}}},48023:function(_,s,e){"use strict";e.d(s,{Tf:function(){return l},P1:function(){return Te},q1:function(){return De},M6:function(){return Ee},l2:function(){return t},zG:function(){return r},w$:function(){return X},nP:function(){return Et},aS:function(){return Ze},S4:function(){return Lt},cz:function(){return ye},iB:function(){return _e},of:function(){return ut},Ou:function(){return Fe},eE:function(){return rt},NZ:function(){return vt}});const r="default",t="backstage.io/view-url",l="backstage.io/edit-url";var f=e(76635),E=e.n(f);class i{constructor(S=DEFAULT_NAMESPACE){ae(this,"namespace");this.namespace=S}async enforce(S){return S.metadata.namespace?S:lodash.merge({metadata:{namespace:this.namespace}},S)}}class o{static isValidPrefixAndOrSuffix(S,j,ue,ge){if(typeof S!="string")return!1;const me=S.split(j);return me.length===1?ge(me[0]):me.length===2?ue(me[0])&&ge(me[1]):!1}static isJsonSafe(S){try{return E().isEqual(S,JSON.parse(JSON.stringify(S)))}catch{return!1}}static isValidDnsSubdomain(S){return typeof S=="string"&&S.length>=1&&S.length<=253&&S.split(".").every(o.isValidDnsLabel)}static isValidDnsLabel(S){return typeof S=="string"&&S.length>=1&&S.length<=63&&/^[a-z0-9]+(\-[a-z0-9]+)*$/.test(S)}static isValidTag(S){return typeof S=="string"&&S.length>=1&&S.length<=63&&/^[a-z0-9+#]+(\-[a-z0-9+#]+)*$/.test(S)}static isValidUrl(S){if(typeof S!="string")return!1;try{return new URL(S),!0}catch{return!1}}static isValidString(S){var j;return typeof S=="string"&&((j=S==null?void 0:S.trim())==null?void 0:j.length)>=1}static isNonEmptyString(S){var j;return typeof S=="string"&&((j=S==null?void 0:S.trim())==null?void 0:j.length)>=1}}var m=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"EntityEnvelope","description":"The envelope skeleton parts of an entity - whatever is necessary to be able to give it a ref and pass to further validation / policy checking.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Component","metadata":{"name":"LoremService"}}],"type":"object","required":["apiVersion","kind","metadata"],"additionalProperties":true,"properties":{"apiVersion":{"type":"string","description":"The version of specification format for this particular entity that this is written against.","minLength":1,"examples":["backstage.io/v1alpha1","my-company.net/v1","1.0"]},"kind":{"type":"string","description":"The high level entity type being described.","minLength":1,"examples":["API","Component","Domain","Group","Location","Resource","System","Template","User"]},"metadata":{"type":"object","required":["name"],"additionalProperties":true,"properties":{"name":{"type":"string","description":"The name of the entity. Must be unique within the catalog at any given point in time, for any given namespace + kind pair.","examples":["metadata-proxy"],"minLength":1},"namespace":{"type":"string","description":"The namespace that the entity belongs to.","default":"default","examples":["default","admin"],"minLength":1}}}}}'),u=e(48231),h=e.n(u),g=JSON.parse(`{"$schema":"http://json-schema.org/draft-07/schema","$id":"Entity","description":"The parts of the format that's common to all versions/kinds of entity.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Component","metadata":{"name":"LoremService","description":"Creates Lorems like a pro.","labels":{"product_name":"Random value Generator"},"annotations":{"docs":"https://github.com/..../tree/develop/doc"}},"spec":{"type":"service","lifecycle":"production","owner":"tools"}}],"type":"object","required":["apiVersion","kind","metadata"],"additionalProperties":false,"properties":{"apiVersion":{"type":"string","description":"The version of specification format for this particular entity that this is written against.","minLength":1,"examples":["backstage.io/v1alpha1","my-company.net/v1","1.0"]},"kind":{"type":"string","description":"The high level entity type being described.","minLength":1,"examples":["API","Component","Domain","Group","Location","Resource","System","Template","User"]},"metadata":{"$ref":"EntityMeta"},"spec":{"type":"object","description":"The specification data describing the entity itself."},"relations":{"type":"array","description":"The relations that this entity has with other entities.","items":{"$ref":"common#relation"}},"status":{"$ref":"common#status"}}}`),R=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"EntityMeta","description":"Metadata fields common to all versions/kinds of entity.","examples":[{"uid":"e01199ab-08cc-44c2-8e19-5c29ded82521","etag":"lsndfkjsndfkjnsdfkjnsd==","name":"my-component-yay","namespace":"the-namespace","labels":{"backstage.io/custom":"ValueStuff"},"annotations":{"example.com/bindings":"are-secret"},"tags":["java","data"]}],"type":"object","required":["name"],"additionalProperties":true,"properties":{"uid":{"type":"string","description":"A globally unique ID for the entity. This field can not be set by the user at creation time, and the server will reject an attempt to do so. The field will be populated in read operations. The field can (optionally) be specified when performing update or delete operations, but the server is free to reject requests that do so in such a way that it breaks semantics.","examples":["e01199ab-08cc-44c2-8e19-5c29ded82521"],"minLength":1},"etag":{"type":"string","description":"An opaque string that changes for each update operation to any part of the entity, including metadata. This field can not be set by the user at creation time, and the server will reject an attempt to do so. The field will be populated in read operations. The field can (optionally) be specified when performing update or delete operations, and the server will then reject the operation if it does not match the current stored value.","examples":["lsndfkjsndfkjnsdfkjnsd=="],"minLength":1},"name":{"type":"string","description":"The name of the entity. Must be unique within the catalog at any given point in time, for any given namespace + kind pair.","examples":["metadata-proxy"],"minLength":1},"namespace":{"type":"string","description":"The namespace that the entity belongs to.","default":"default","examples":["default","admin"],"minLength":1},"title":{"type":"string","description":"A display name of the entity, to be presented in user interfaces instead of the name property, when available.","examples":["React SSR Template"],"minLength":1},"description":{"type":"string","description":"A short (typically relatively few words, on one line) description of the entity."},"labels":{"type":"object","description":"Key/value pairs of identifying information attached to the entity.","additionalProperties":true,"patternProperties":{"^.+$":{"type":"string"}}},"annotations":{"type":"object","description":"Key/value pairs of non-identifying auxiliary information attached to the entity.","additionalProperties":true,"patternProperties":{"^.+$":{"type":"string"}}},"tags":{"type":"array","description":"A list of single-valued strings, to for example classify catalog entities in various ways.","items":{"type":"string","minLength":1}},"links":{"type":"array","description":"A list of external hyperlinks related to the entity. Links can provide additional contextual information that may be located outside of Backstage itself. For example, an admin dashboard or external CMS page.","items":{"type":"object","required":["url"],"properties":{"url":{"type":"string","description":"A url in a standard uri format.","examples":["https://admin.example-org.com"],"minLength":1},"title":{"type":"string","description":"A user friendly display name for the link.","examples":["Admin Dashboard"],"minLength":1},"icon":{"type":"string","description":"A key representing a visual icon to be displayed in the UI.","examples":["dashboard"],"minLength":1}}}}}}'),C=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"common","type":"object","description":"Common definitions to import from other schemas","definitions":{"reference":{"$id":"#reference","type":"object","description":"A reference by name to another entity.","required":["kind","namespace","name"],"additionalProperties":false,"properties":{"kind":{"type":"string","description":"The kind field of the entity.","minLength":1},"namespace":{"type":"string","description":"The metadata.namespace field of the entity.","minLength":1},"name":{"type":"string","description":"The metadata.name field of the entity.","minLength":1}}},"relation":{"$id":"#relation","type":"object","description":"A directed relation from one entity to another.","required":["type","target"],"additionalProperties":false,"properties":{"type":{"type":"string","minLength":1,"pattern":"^\\\\w+$","description":"The type of relation."},"target":{"$ref":"#reference"}}},"status":{"$id":"#status","type":"object","description":"The current status of the entity, as claimed by various sources.","required":[],"additionalProperties":true,"properties":{"items":{"type":"array","items":{"$ref":"#statusItem"}}}},"statusItem":{"$id":"#statusItem","type":"object","description":"A specific status item on a well known format.","required":["type","level","message"],"additionalProperties":true,"properties":{"type":{"type":"string","minLength":1},"level":{"$ref":"#statusLevel","description":"The status level / severity of the status item."},"message":{"type":"string","description":"A brief message describing the status, intended for human consumption."},"error":{"$ref":"#error","description":"An optional serialized error object related to the status."}}},"statusLevel":{"$id":"#statusLevel","type":"string","description":"A status level / severity.","enum":["info","warning","error"]},"error":{"$id":"#error","type":"object","description":"A serialized error object.","required":["name","message"],"additionalProperties":true,"properties":{"name":{"type":"string","examples":["Error","InputError"],"description":"The type name of the error","minLength":1},"message":{"type":"string","description":"The message of the error"},"code":{"type":"string","description":"An error code associated with the error"},"stack":{"type":"string","description":"An error stack trace"}}}}}');const M=new Map,b=[m,g,R,C];function Q(B){if(!(B!=null&&B.length))throw new TypeError("Unknown error");const S=B[0];throw new TypeError(`${S.instancePath||"<root>"} ${S.message}${S.params?` - ${Object.entries(S.params).map(([j,ue])=>`${j}: ${ue}`).join(", ")}`:""}`)}function I(B,S={}){var qe;const j=(qe=S==null?void 0:S.disableCache)!=null?qe:!1,ue=j?"":JSON.stringify(B);if(!j){const ot=M.get(ue);if(ot)return ot}const ge=P(B),me=new(h())({allowUnionTypes:!0,allErrors:!0,validateSchema:!0});ge.length&&me.addSchema(ge,void 0,void 0,!0);const Se=me.compile(B);return j||M.set(ue,Se),Se}function P(B){if(typeof B!="object")return[];const S=new Set;B.$id&&S.add(B.$id);const j=new Array,ue=[B];for(;ue.length;){const ge=ue.pop();for(const me of L(ge))if(!S.has(me)){S.add(me);const Se=b.find(qe=>qe.$id===me);Se&&(j.push(Se),ue.push(Se))}}return j}function*L(B){const S=[B];for(;S.length;){const j=S.pop();if(typeof j=="object"&&j)for(const[ue,ge]of Object.entries(j))ue==="$ref"&&typeof ge=="string"?yield ge.split("#")[0]:S.push(ge)}}function z(B){const S=compileAjvSchema(B||entityEnvelopeSchema);return j=>{if(S(j)===!0)return j;throw throwAjvError(S.errors)}}function W(B){const S=I(B);return j=>{var me;if(S(j)===!0)return j;const ge=(me=S.errors)==null?void 0:me.filter(Se=>["/kind","/apiVersion"].includes(Se.instancePath));if((ge==null?void 0:ge.length)&&ge.every(Se=>Se.keyword==="enum"))return!1;throw Q(S.errors)}}function q(B){const S=compileAjvSchema(B||entitySchema);return j=>{if(S(j)===!0)return j;throw throwAjvError(S.errors)}}class oe{static isValidApiVersion(S){return o.isValidPrefixAndOrSuffix(S,"/",o.isValidDnsSubdomain,j=>j.length>=1&&j.length<=63&&/^[a-z0-9A-Z]+$/.test(j))}static isValidKind(S){return typeof S=="string"&&S.length>=1&&S.length<=63&&/^[a-zA-Z][a-z0-9A-Z]*$/.test(S)}static isValidObjectName(S){return typeof S=="string"&&S.length>=1&&S.length<=63&&/^([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$/.test(S)}static isValidNamespace(S){return o.isValidDnsLabel(S)}static isValidLabelKey(S){return o.isValidPrefixAndOrSuffix(S,"/",o.isValidDnsSubdomain,oe.isValidObjectName)}static isValidLabelValue(S){return S===""||oe.isValidObjectName(S)}static isValidAnnotationKey(S){return o.isValidPrefixAndOrSuffix(S,"/",o.isValidDnsSubdomain,oe.isValidObjectName)}static isValidAnnotationValue(S){return typeof S=="string"}}const ve={isValidApiVersion:oe.isValidApiVersion,isValidKind:oe.isValidKind,isValidEntityName:oe.isValidObjectName,isValidNamespace:oe.isValidNamespace,isValidLabelKey:oe.isValidLabelKey,isValidLabelValue:oe.isValidLabelValue,isValidAnnotationKey:oe.isValidAnnotationKey,isValidAnnotationValue:oe.isValidAnnotationValue,isValidTag:B=>typeof B=="string"&&B.length>=1&&B.length<=63&&/^[a-z0-9:+#]+(\-[a-z0-9:+#]+)*$/.test(B)};function Le(B={}){return{...ve,...B}}class we{constructor(S=makeValidator()){ae(this,"validators");this.validators=S}async enforce(S){var Se,qe,ot,Ve,Je,ht,st;function j(Ue,N,y){if(N==null)throw new Error(`${Ue} must have a value`);let x;try{x=y(N)}catch(H){throw new Error(`${Ue} could not be validated, ${H}`)}if(!x){let H;switch(y.name){case"isValidLabelValue":case"isValidObjectName":H="a string that is sequences of [a-zA-Z0-9] separated by any of [-_.], at most 63 characters in total";break;case"isValidLabelKey":case"isValidApiVersion":case"isValidAnnotationKey":H="a valid prefix and/or suffix";break;case"isValidNamespace":case"isValidDnsLabel":H="a string that is sequences of [a-z0-9] separated by [-], at most 63 characters in total";break;case"isValidTag":H="a string that is sequences of [a-z0-9+#] separated by [-], at most 63 characters in total";break;case"isValidAnnotationValue":H="a string";break;case"isValidKind":H="a string that is a sequence of [a-zA-Z][a-z0-9A-Z], at most 63 characters in total";break;case"isValidUrl":H="a string that is a valid url";break;case"isValidString":case"isNonEmptyString":H="a non empty string";break;default:H=void 0;break}const k=H?` expected ${H} but found "${N}".`:"";throw new Error(`"${Ue}" is not valid;${k} To learn more about catalog file format, visit: https://github.com/backstage/backstage/blob/master/docs/architecture-decisions/adr002-default-catalog-file-format.md`)}}function ue(Ue,N,y){return N===void 0||j(Ue,N,y)}j("apiVersion",S.apiVersion,this.validators.isValidApiVersion),j("kind",S.kind,this.validators.isValidKind),j("metadata.name",S.metadata.name,this.validators.isValidEntityName),ue("metadata.namespace",S.metadata.namespace,this.validators.isValidNamespace);for(const[Ue,N]of Object.entries((Se=S.metadata.labels)!=null?Se:[]))j(`labels.${Ue}`,Ue,this.validators.isValidLabelKey),j(`labels.${Ue}`,N,this.validators.isValidLabelValue);for(const[Ue,N]of Object.entries((qe=S.metadata.annotations)!=null?qe:[]))j(`annotations.${Ue}`,Ue,this.validators.isValidAnnotationKey),j(`annotations.${Ue}`,N,this.validators.isValidAnnotationValue);const ge=(ot=S.metadata.tags)!=null?ot:[];for(let Ue=0;Ue<ge.length;++Ue)j(`tags.${Ue}`,ge[Ue],this.validators.isValidTag);const me=(Ve=S.metadata.links)!=null?Ve:[];for(let Ue=0;Ue<me.length;++Ue)j(`links.${Ue}.url`,(Je=me[Ue])==null?void 0:Je.url,CommonValidatorFunctions.isValidUrl),ue(`links.${Ue}.title`,(ht=me[Ue])==null?void 0:ht.title,CommonValidatorFunctions.isNonEmptyString),ue(`links.${Ue}.icon`,(st=me[Ue])==null?void 0:st.icon,KubernetesValidatorFunctions.isValidObjectName);return S}}class fe{constructor(){ae(this,"validate")}async enforce(S){if(!this.validate){const ge=new Ajv({allowUnionTypes:!0});this.validate=ge.addSchema([commonSchema,entityMetaSchema],void 0,void 0,!0).compile(entitySchema)}if(this.validate(S)===!0)return S;const[ue]=this.validate.errors||[];throw ue?new Error(`Malformed envelope, ${ue.instancePath||"<root>"} ${ue.message}`):new Error("Malformed envelope, Unknown error")}}function Ke(B){let S=B.indexOf(":");const j=B.indexOf("/");j!==-1&&j<S&&(S=-1);const ue=S===-1?void 0:B.slice(0,S),ge=j===-1?void 0:B.slice(S+1,j),me=B.slice(Math.max(S+1,j+1));if(ue===""||ge===""||me==="")throw new TypeError(`Entity reference "${B}" was not on the form [<kind>:][<namespace>/]<name>`);return{kind:ue,namespace:ge,name:me}}function _e(B){return{kind:B.kind,namespace:B.metadata.namespace||r,name:B.metadata.name}}function ut(B,S){var qe,ot,Ve,Je;if(!B)throw new Error("Entity reference must not be empty");const j=S==null?void 0:S.defaultKind,ue=(S==null?void 0:S.defaultNamespace)||r;let ge,me,Se;if(typeof B=="string"){const ht=Ke(B);ge=(qe=ht.kind)!=null?qe:j,me=(ot=ht.namespace)!=null?ot:ue,Se=ht.name}else ge=(Ve=B.kind)!=null?Ve:j,me=(Je=B.namespace)!=null?Je:ue,Se=B.name;if(ge)if(me){if(!Se){const ht=JSON.stringify(B);throw new Error(`Entity reference ${ht} had missing or empty name`)}}else{const ht=JSON.stringify(B);throw new Error(`Entity reference ${ht} had missing or empty namespace`)}else{const ht=JSON.stringify(B);throw new Error(`Entity reference ${ht} had missing or empty kind (e.g. did not start with "component:" or similar)`)}return{kind:ge,namespace:me,name:Se}}function rt(B){var ge,me;let S,j,ue;return"metadata"in B?(S=B.kind,j=(ge=B.metadata.namespace)!=null?ge:r,ue=B.metadata.name):(S=B.kind,j=(me=B.namespace)!=null?me:r,ue=B.name),`${S.toLocaleLowerCase("en-US")}:${j.toLocaleLowerCase("en-US")}/${ue.toLocaleLowerCase("en-US")}`}class at{constructor(S){this.policies=S}async enforce(S){let j=S;for(const ue of this.policies){const ge=await ue.enforce(j);if(!ge)throw new Error(`Policy ${ue.constructor.name} did not return a result`);j=ge}return j}}class gt{constructor(S){this.policies=S}async enforce(S){for(const j of this.policies){const ue=await j.enforce(S);if(ue)return ue}throw new Error("The entity did not match any known policy")}}const xe={allOf(B){return new at(B)},oneOf(B){return new gt(B)}};var Qe=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"ApiV1alpha1","description":"An API describes an interface that can be exposed by a component. The API can be defined in different formats, like OpenAPI, AsyncAPI, GraphQL, gRPC, or other formats.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"API","metadata":{"name":"artist-api","description":"Retrieve artist details","labels":{"product_name":"Random value Generator"},"annotations":{"docs":"https://github.com/..../tree/develop/doc"}},"spec":{"type":"openapi","lifecycle":"production","owner":"artist-relations-team","system":"artist-engagement-portal","definition":"openapi: \\"3.0.0\\"\\ninfo:..."}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1alpha1","backstage.io/v1beta1"]},"kind":{"enum":["API"]},"spec":{"type":"object","required":["type","lifecycle","owner","definition"],"properties":{"type":{"type":"string","description":"The type of the API definition.","examples":["openapi","asyncapi","graphql","grpc"],"minLength":1},"lifecycle":{"type":"string","description":"The lifecycle state of the API.","examples":["experimental","production","deprecated"],"minLength":1},"owner":{"type":"string","description":"An entity reference to the owner of the API.","examples":["artist-relations-team","user:john.johnson"],"minLength":1},"system":{"type":"string","description":"An entity reference to the system that the API belongs to.","minLength":1},"definition":{"type":"string","description":"The definition of the API, based on the format defined by the type.","minLength":1}}}}}]}');function Ye(B){const S=W(B);return{async check(j){return S(j)===j}}}const Rt=Ye(Qe);var pt=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"ComponentV1alpha1","description":"A Component describes a software component. It is typically intimately linked to the source code that constitutes the component, and should be what a developer may regard a \\"unit of software\\", usually with a distinct deployable or linkable artifact.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Component","metadata":{"name":"LoremService","description":"Creates Lorems like a pro.","labels":{"product_name":"Random value Generator"},"annotations":{"docs":"https://github.com/..../tree/develop/doc"}},"spec":{"type":"service","lifecycle":"production","owner":"tools"}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1alpha1","backstage.io/v1beta1"]},"kind":{"enum":["Component"]},"spec":{"type":"object","required":["type","lifecycle","owner"],"properties":{"type":{"type":"string","description":"The type of component.","examples":["service","website","library"],"minLength":1},"lifecycle":{"type":"string","description":"The lifecycle state of the component.","examples":["experimental","production","deprecated"],"minLength":1},"owner":{"type":"string","description":"An entity reference to the owner of the component.","examples":["artist-relations-team","user:john.johnson"],"minLength":1},"system":{"type":"string","description":"An entity reference to the system that the component belongs to.","minLength":1},"subcomponentOf":{"type":"string","description":"An entity reference to another component of which the component is a part.","minLength":1},"providesApis":{"type":"array","description":"An array of entity references to the APIs that are provided by the component.","items":{"type":"string","minLength":1}},"consumesApis":{"type":"array","description":"An array of entity references to the APIs that are consumed by the component.","items":{"type":"string","minLength":1}},"dependsOn":{"type":"array","description":"An array of references to other entities that the component depends on to function.","items":{"type":"string","minLength":1}}}}}}]}');const St=Ye(pt);var it=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"DomainV1alpha1","description":"A Domain groups a collection of systems that share terminology, domain models, business purpose, or documentation, i.e. form a bounded context.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Domain","metadata":{"name":"artists","description":"Everything about artists"},"spec":{"owner":"artist-relations-team"}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1alpha1","backstage.io/v1beta1"]},"kind":{"enum":["Domain"]},"spec":{"type":"object","required":["owner"],"properties":{"owner":{"type":"string","description":"An entity reference to the owner of the component.","examples":["artist-relations-team","user:john.johnson"],"minLength":1}}}}}]}');const yt=Ye(it);var It=JSON.parse(`{"$schema":"http://json-schema.org/draft-07/schema","$id":"GroupV1alpha1","description":"A group describes an organizational entity, such as for example a team, a business unit, or a loose collection of people in an interest group. Members of these groups are modeled in the catalog as kind User.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Group","metadata":{"name":"infrastructure","description":"The infra business unit"},"spec":{"type":"business-unit","profile":{"displayName":"Infrastructure","email":"infrastructure@example.com","picture":"https://example.com/groups/bu-infrastructure.jpeg"},"parent":"ops","children":["backstage","other"]}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1alpha1","backstage.io/v1beta1"]},"kind":{"enum":["Group"]},"spec":{"type":"object","required":["type","children"],"properties":{"type":{"type":"string","description":"The type of group. There is currently no enforced set of values for this field, so it is left up to the adopting organization to choose a nomenclature that matches their org hierarchy.","examples":["team","business-unit","product-area","root"],"minLength":1},"profile":{"type":"object","description":"Optional profile information about the group, mainly for display purposes. All fields of this structure are also optional. The email would be a group email of some form, that the group may wish to be used for contacting them. The picture is expected to be a URL pointing to an image that's representative of the group, and that a browser could fetch and render on a group page or similar.","properties":{"displayName":{"type":"string","description":"A simple display name to present to users.","examples":["Infrastructure"],"minLength":1},"email":{"type":"string","description":"An email where this entity can be reached.","examples":["infrastructure@example.com"],"minLength":1},"picture":{"type":"string","description":"The URL of an image that represents this entity.","examples":["https://example.com/groups/bu-infrastructure.jpeg"],"minLength":1}}},"parent":{"type":"string","description":"The immediate parent group in the hierarchy, if any. Not all groups must have a parent; the catalog supports multi-root hierarchies. Groups may however not have more than one parent. This field is an entity reference.","examples":["ops"],"minLength":1},"children":{"type":"array","description":"The immediate child groups of this group in the hierarchy (whose parent field points to this group). The list must be present, but may be empty if there are no child groups. The items are not guaranteed to be ordered in any particular way. The entries of this array are entity references.","items":{"type":"string","examples":["backstage","other"],"minLength":1}},"members":{"type":"array","description":"The users that are members of this group. The entries of this array are entity references.","items":{"type":"string","examples":["jdoe"],"minLength":1}}}}}}]}`);const Pt=Ye(It);var Zt=JSON.parse(`{"$schema":"http://json-schema.org/draft-07/schema","$id":"LocationV1alpha1","description":"A location is a marker that references other places to look for catalog data.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Location","metadata":{"name":"org-data"},"spec":{"type":"url","targets":["http://github.com/myorg/myproject/org-data-dump/catalog-info-staff.yaml","http://github.com/myorg/myproject/org-data-dump/catalog-info-consultants.yaml"]}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1alpha1","backstage.io/v1beta1"]},"kind":{"enum":["Location"]},"spec":{"type":"object","required":[],"properties":{"type":{"type":"string","description":"The single location type, that's common to the targets specified in the spec. If it is left out, it is inherited from the location type that originally read the entity data.","examples":["url"],"minLength":1},"target":{"type":"string","description":"A single target as a string. Can be either an absolute path/URL (depending on the type), or a relative path such as ./details/catalog-info.yaml which is resolved relative to the location of this Location entity itself.","examples":["./details/catalog-info.yaml"],"minLength":1},"targets":{"type":"array","description":"A list of targets as strings. They can all be either absolute paths/URLs (depending on the type), or relative paths such as ./details/catalog-info.yaml which are resolved relative to the location of this Location entity itself.","items":{"type":"string","examples":["./details/catalog-info.yaml","http://github.com/myorg/myproject/org-data-dump/catalog-info-staff.yaml"],"minLength":1}},"presence":{"type":"string","description":"Whether the presence of the location target is required and it should be considered an error if it can not be found","default":"required","examples":["required"],"enum":["required","optional"]}}}}}]}`);const Bt=Ye(Zt),Lt="ownedBy",ze="ownerOf",lt="consumesApi",ke="apiConsumedBy",Ct="providesApi",ct="apiProvidedBy",Et="dependsOn",X="dependencyOf",Z="parentOf",ne="childOf",ce="memberOf",se="hasMember",ye="partOf",Ze="hasPart";var $e=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"ResourceV1alpha1","description":"A resource describes the infrastructure a system needs to operate, like BigTable databases, Pub/Sub topics, S3 buckets or CDNs. Modelling them together with components and systems allows to visualize resource footprint, and create tooling around them.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Resource","metadata":{"name":"artists-db","description":"Stores artist details"},"spec":{"type":"database","owner":"artist-relations-team","system":"artist-engagement-portal"}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1alpha1","backstage.io/v1beta1"]},"kind":{"enum":["Resource"]},"spec":{"type":"object","required":["type","owner"],"properties":{"type":{"type":"string","description":"The type of resource.","examples":["database","s3-bucket","cluster"],"minLength":1},"owner":{"type":"string","description":"An entity reference to the owner of the resource.","examples":["artist-relations-team","user:john.johnson"],"minLength":1},"dependsOn":{"type":"array","description":"An array of references to other entities that the resource depends on to function.","items":{"type":"string","minLength":1}},"system":{"type":"string","description":"An entity reference to the system that the resource belongs to.","minLength":1}}}}}]}');const nt=Ye($e);var te=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"SystemV1alpha1","description":"A system is a collection of resources and components. The system may expose or consume one or several APIs. It is viewed as abstraction level that provides potential consumers insights into exposed features without needing a too detailed view into the details of all components. This also gives the owning team the possibility to decide about published artifacts and APIs.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"System","metadata":{"name":"artist-engagement-portal","description":"Handy tools to keep artists in the loop"},"spec":{"owner":"artist-relations-team","domain":"artists"}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1alpha1","backstage.io/v1beta1"]},"kind":{"enum":["System"]},"spec":{"type":"object","required":["owner"],"properties":{"owner":{"type":"string","description":"An entity reference to the owner of the component.","examples":["artist-relations-team","user:john.johnson"],"minLength":1},"domain":{"type":"string","description":"An entity reference to the domain that the system belongs to.","examples":["artists"],"minLength":1}}}}}]}');const J=Ye(te);var U=JSON.parse(`{"$schema":"http://json-schema.org/draft-07/schema","$id":"UserV1alpha1","description":"A user describes a person, such as an employee, a contractor, or similar. Users belong to Group entities in the catalog. These catalog user entries are connected to the way that authentication within the Backstage ecosystem works. See the auth section of the docs for a discussion of these concepts.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"User","metadata":{"name":"jdoe"},"spec":{"profile":{"displayName":"Jenny Doe","email":"jenny-doe@example.com","picture":"https://example.com/staff/jenny-with-party-hat.jpeg"},"memberOf":["team-b","employees"]}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1alpha1","backstage.io/v1beta1"]},"kind":{"enum":["User"]},"spec":{"type":"object","required":["memberOf"],"properties":{"profile":{"type":"object","description":"Optional profile information about the user, mainly for display purposes. All fields of this structure are also optional. The email would be a primary email of some form, that the user may wish to be used for contacting them. The picture is expected to be a URL pointing to an image that's representative of the user, and that a browser could fetch and render on a profile page or similar.","properties":{"displayName":{"type":"string","description":"A simple display name to present to users.","examples":["Jenny Doe"],"minLength":1},"email":{"type":"string","description":"An email where this user can be reached.","examples":["jenny-doe@example.com"],"minLength":1},"picture":{"type":"string","description":"The URL of an image that represents this user.","examples":["https://example.com/staff/jenny-with-party-hat.jpeg"],"minLength":1}}},"memberOf":{"type":"array","description":"The list of groups that the user is a direct member of (i.e., no transitive memberships are listed here). The list must be present, but may be empty if the user is not member of any groups. The items are not guaranteed to be ordered in any particular way. The entries of this array are entity references.","items":{"type":"string","examples":["team-b","employees"],"minLength":1}}}}}}]}`);const ie=Ye(U),Te="backstage.io/managed-by-location",De="backstage.io/managed-by-origin-location",Ee="backstage.io/source-location";function Fe(B){if(typeof B!="string")throw new TypeError(`Unable to parse location ref '${B}', unexpected argument ${typeof B}`);const S=B.indexOf(":");if(S<0)throw new TypeError(`Unable to parse location ref '${B}', expected '<type>:<target>', e.g. 'url:https://host/path'`);const j=B.substring(0,S).trim(),ue=B.substring(S+1).trim();if(!j||!ue)throw new TypeError(`Unable to parse location ref '${B}', expected '<type>:<target>', e.g. 'url:https://host/path'`);if(j==="http"||j==="https")throw new TypeError(`Invalid location ref '${B}', please prefix it with 'url:', e.g. 'url:${B}'`);return{type:j,target:ue}}function vt(B){const{type:S,target:j}=B;if(S){if(!j)throw new TypeError("Unable to stringify location ref, empty target")}else throw new TypeError("Unable to stringify location ref, empty type");return`${S}:${j}`}function xt(B){var j,ue,ge,me,Se;const S=(Se=(ue=(j=B.metadata)==null?void 0:j.annotations)==null?void 0:ue[ANNOTATION_SOURCE_LOCATION])!=null?Se:(me=(ge=B.metadata)==null?void 0:ge.annotations)==null?void 0:me[ANNOTATION_LOCATION];if(!S)throw new Error(`Entity '${stringifyEntityRef(B)}' is missing location`);return Fe(S)}},23235:function(_,s,e){"use strict";e.d(s,{C:function(){return t}});var r=e(98005);class t{constructor(){ae(this,"subject",new r.J)}post(f){this.subject.next(f)}alert$(){return this.subject}}},47150:function(_,s,e){"use strict";e.d(s,{g:function(){return r}});class r{captureEvent(l){}}},58652:function(_,s,e){"use strict";e.d(s,{C:function(){return l}});var r=e(98005);const t="theme";class l{constructor(E){ae(this,"activeThemeId");ae(this,"subject",new r.X(void 0));this.themes=E}static createWithStorage(E){var m;const i=new l(E);if(!window.localStorage)return i;const o=(m=window.localStorage.getItem(t))!=null?m:void 0;return i.setActiveThemeId(o),i.activeThemeId$().subscribe(u=>{u?window.localStorage.setItem(t,u):window.localStorage.removeItem(t)}),window.addEventListener("storage",u=>{var h;if(u.key===t){const g=(h=localStorage.getItem(t))!=null?h:void 0;i.setActiveThemeId(g)}}),i}getInstalledThemes(){return this.themes.slice()}activeThemeId$(){return this.subject}getActiveThemeId(){return this.activeThemeId}setActiveThemeId(E){this.activeThemeId=E,this.subject.next(E)}}},14721:function(_,s,e){"use strict";e.d(s,{m:function(){return u}});var r=e(9850),t=e.n(r),l=e(12782),f=e.n(l);const E=/^[a-z][a-z0-9]*(?:[-_][a-z][a-z0-9]*)*$/i;function i(h){return typeof h=="object"&&h!==null&&!Array.isArray(h)}function o(h){if(h===null)return"null";if(Array.isArray(h))return"array";const g=typeof h;return g==="number"&&isNaN(h)?"nan":g==="string"&&h===""?"empty-string":g}const m={type(h,g,R,C){return`Invalid type in config for key '${h}' in '${g}', got ${R}, wanted ${C}`},missing(h){return`Missing required config value at '${h}'`},convert(h,g,R){return`Unable to convert config value for key '${h}' in '${g}' to a ${R}`}};class u{constructor(g,R="mock-config",C,M=""){ae(this,"filteredKeys");ae(this,"notifiedFilteredKeys",new Set);this.data=g,this.context=R,this.fallback=C,this.prefix=M}static fromConfigs(g){return g.length===0?new u(void 0):g.reduce((R,{data:C,context:M,filteredKeys:b,deprecatedKeys:Q})=>{const I=new u(C,M,R);if(I.filteredKeys=b,Q)for(const{key:P,description:L}of Q)console.warn(`The configuration key '${P}' of ${M} is deprecated and may be removed soon. ${L||""}`);return I},void 0)}has(g){var C,M;return this.readValue(g)!==void 0?!0:(M=(C=this.fallback)==null?void 0:C.has(g))!=null?M:!1}keys(){var C,M;const g=this.data?Object.keys(this.data):[],R=(M=(C=this.fallback)==null?void 0:C.keys())!=null?M:[];return[...new Set([...g,...R])]}get(g){const R=this.getOptional(g);if(R===void 0)throw new Error(m.missing(this.fullKey(g!=null?g:"")));return R}getOptional(g){var M;const R=t()(this.readValue(g)),C=(M=this.fallback)==null?void 0:M.getOptional(g);return R===void 0?C:C===void 0?R:f()({},{value:C},{value:R},(b,Q)=>!i(Q)||!i(b)?Q:void 0).value}getConfig(g){const R=this.getOptionalConfig(g);if(R===void 0)throw new Error(m.missing(this.fullKey(g)));return R}getOptionalConfig(g){var M;const R=this.readValue(g),C=(M=this.fallback)==null?void 0:M.getOptionalConfig(g);if(i(R))return this.copy(R,g,C);if(R!==void 0)throw new TypeError(m.type(this.fullKey(g),this.context,o(R),"object"));return C}getConfigArray(g){const R=this.getOptionalConfigArray(g);if(R===void 0)throw new Error(m.missing(this.fullKey(g)));return R}getOptionalConfigArray(g){const R=this.readConfigValue(g,C=>{if(!Array.isArray(C))return{expected:"object-array"};for(const[M,b]of C.entries())if(!i(b))return{expected:"object-array",value:b,key:`${g}[${M}]`};return!0});if(!!R)return R.map((C,M)=>this.copy(C,`${g}[${M}]`))}getNumber(g){const R=this.getOptionalNumber(g);if(R===void 0)throw new Error(m.missing(this.fullKey(g)));return R}getOptionalNumber(g){const R=this.readConfigValue(g,M=>typeof M=="number"||typeof M=="string"||{expected:"number"});if(typeof R=="number"||R===void 0)return R;const C=Number(R);if(!Number.isFinite(C))throw new Error(m.convert(this.fullKey(g),this.context,"number"));return C}getBoolean(g){const R=this.getOptionalBoolean(g);if(R===void 0)throw new Error(m.missing(this.fullKey(g)));return R}getOptionalBoolean(g){return this.readConfigValue(g,R=>typeof R=="boolean"||{expected:"boolean"})}getString(g){const R=this.getOptionalString(g);if(R===void 0)throw new Error(m.missing(this.fullKey(g)));return R}getOptionalString(g){return this.readConfigValue(g,R=>typeof R=="string"&&R!==""||{expected:"string"})}getStringArray(g){const R=this.getOptionalStringArray(g);if(R===void 0)throw new Error(m.missing(this.fullKey(g)));return R}getOptionalStringArray(g){return this.readConfigValue(g,R=>{if(!Array.isArray(R))return{expected:"string-array"};for(const[C,M]of R.entries())if(typeof M!="string"||M==="")return{expected:"string-array",value:M,key:`${g}[${C}]`};return!0})}fullKey(g){return`${this.prefix}${this.prefix?".":""}${g}`}copy(g,R,C){const M=new u(g,this.context,C,this.fullKey(R));return M.filteredKeys=this.filteredKeys,M}readConfigValue(g,R){var b;const C=this.readValue(g);if(C===void 0)return(b=this.fallback)==null?void 0:b.readConfigValue(g,R);const M=R(C);if(M!==!0){const{key:Q=g,value:I=C,expected:P}=M;throw new TypeError(m.type(this.fullKey(Q),this.context,o(I),P))}return C}readValue(g){const R=g?g.split("."):[];for(const M of R)if(!E.test(M))throw new TypeError(`Invalid config key '${g}'`);if(this.data===void 0)return;let C=this.data;for(const[M,b]of R.entries())if(i(C))C=C[b];else if(C!==void 0){const Q=this.fullKey(R.slice(0,M).join("."));throw new TypeError(m.type(Q,this.context,o(C),"object"))}return C}}},4333:function(_,s,e){"use strict";e.d(s,{p:function(){return t}});const r="Invalid discovery URL pattern,";class t{static compile(f){const E=f.split(/\{\{\s*pluginId\s*\}\}/),i=E.join("pluginId");let o;try{o=new URL(i)}catch{throw new Error(`${r} URL '${i}' is invalid`)}if(o.hash)throw new Error(`${r} URL must not have a hash`);if(o.search)throw new Error(`${r} URL must not have a query`);if(i.endsWith("/"))throw new Error(`${r} URL must not end with a slash`);return new t(E)}constructor(f){this.parts=f}async getBaseUrl(f){return this.parts.join(f)}}},89536:function(_,s,e){"use strict";e.d(s,{KN:function(){return r},gr:function(){return l},Jv:function(){return f}});class r{constructor(i,o){this.alertApi=i,this.errorApi=o}post(i,o){return o!=null&&o.hidden||this.alertApi.post({message:i.message,severity:"error"}),this.errorApi.post(i,o)}error$(){return this.errorApi.error$()}}var t=e(98005);class l{constructor(){ae(this,"subject",new t.J)}post(i,o){this.subject.next({error:i,context:o})}error$(){return this.subject}}class f{static forward(i,o){window.addEventListener("unhandledrejection",m=>{i.post(m.reason,o)})}}},14884:function(_,s,e){"use strict";e.d(s,{b:function(){return l}});var r=e(36964);function t(f){if(f.length<3)throw new Error(`The '${f}' feature flag must have a minimum length of three characters.`);if(f.length>150)throw new Error(`The '${f}' feature flag must not exceed 150 characters.`);if(!f.match(/^[a-z]+[a-z0-9-]+$/))throw new Error(`The '${f}' feature flag must start with a lowercase letter and only contain lowercase letters, numbers and hyphens. Examples: feature-flag-one, alpha, release-2020`)}class l{constructor(){ae(this,"registeredFeatureFlags",[]);ae(this,"flags")}registerFlag(E){t(E.name),this.registeredFeatureFlags.push(E)}getRegisteredFlags(){return this.registeredFeatureFlags.slice()}isActive(E){return this.flags||(this.flags=this.load()),this.flags.get(E)===r.FeatureFlagState.Active}save(E){this.flags||(this.flags=this.load()),E.merge||this.flags.clear();for(const[o,m]of Object.entries(E.states))this.flags.set(o,m);const i=Array.from(this.flags.entries()).filter(([,o])=>o===r.FeatureFlagState.Active);window.localStorage.setItem("featureFlags",JSON.stringify(Object.fromEntries(i)))}load(){try{const E=window.localStorage.getItem("featureFlags");if(!E)return new Map;const i=JSON.parse(E);if(typeof i!="object"||i===null||Array.isArray(i))return new Map;const o=Object.entries(i).filter(([m,u])=>(t(m),u===r.FeatureFlagState.Active));return new Map(o)}catch{return new Map}}}},50160:function(_,s,e){"use strict";e.d(s,{I:function(){return o},j:function(){return r}});function r(m){var g;let u=m.baseImplementation||e.g.fetch;const h=[(g=m.middleware)!=null?g:[]].flat().reverse();for(const R of h)u=R.apply(u);return{fetch:u}}class t{static create(u){var C,M;const h=l(u),g=((C=u.header)==null?void 0:C.name)||"authorization",R=((M=u.header)==null?void 0:M.value)||(b=>`Bearer ${b}`);return new t(u.identityApi,h,g,R)}constructor(u,h,g,R){this.identityApi=u,this.allowUrl=h,this.headerName=g,this.headerValue=R}apply(u){return async(h,g)=>{const R=new Request(h,g),{token:C}=await this.identityApi.getCredentials();return R.headers.get(this.headerName)||typeof C!="string"||!C||!this.allowUrl(R.url)?u(h,g):(R.headers.set(this.headerName,this.headerValue(C)),u(R))}}}function l(m){return m.allowUrl?m.allowUrl:m.urlPrefixAllowlist?f(m.urlPrefixAllowlist):m.config?f([m.config.getString("backend.baseUrl")]):()=>!1}function f(m){const u=m.map(h=>h.replace(/\/$/,""));return h=>u.some(g=>h===g||h.startsWith(`${g}/`))}function E(m,u){return!u||u==="/"?m:`${m.replace(/\/$/,"")}/${u.replace(/^\//,"")}`}class i{constructor(u){this.discoveryApi=u}apply(u){return async(h,g)=>{const R=new Request(h,g),C="plugin://";if(!R.url.startsWith(C))return u(h,g);const{hostname:M,pathname:b,search:Q,hash:I,username:P,password:L}=new URL(`http://${R.url.substring(C.length)}`);let z=await this.discoveryApi.getBaseUrl(M);if(P||L){const q=new URL(z),oe=`${P}${L?`:${L}`:""}@`;z=`${q.protocol}//${oe}${q.host}${q.pathname}`}const W=`${E(z,b)}${Q}${I}`;return u(W,typeof h=="string"?g:h)}}}class o{static resolvePluginProtocol(u){return new i(u.discoveryApi)}static injectIdentityAuth(u){return t.create(u)}constructor(){}}},11358:function(_,s,e){"use strict";e.d(s,{Y:function(){return E}});var r=e(98005);function t(i,o){for(const m of o)if(!i.has(m))return!1;return!0}function l(i,...o){const m=new Set(i);for(const u of o)for(const h of u)m.add(h);return m}class f{constructor(){ae(this,"requests",[]);ae(this,"subject",new r.X(this.getCurrentPending()))}request(o){return new Promise((m,u)=>{this.requests.push({scopes:o,resolve:m,reject:u}),this.subject.next(this.getCurrentPending())})}resolve(o,m){this.requests=this.requests.filter(u=>t(o,u.scopes)?(u.resolve(m),!1):!0),this.subject.next(this.getCurrentPending())}reject(o){this.requests.forEach(m=>m.reject(o)),this.requests=[],this.subject.next(this.getCurrentPending())}pending(){return this.subject}getCurrentPending(){const o=this.requests.length===0?void 0:this.requests.slice(1).reduce((m,u)=>l(m,u.scopes),this.requests[0].scopes);return{scopes:o,resolve:m=>{o&&this.resolve(o,m)},reject:m=>{o&&this.reject(m)}}}}class E{constructor(){ae(this,"subject",new r.X([]));ae(this,"currentRequests",[]);ae(this,"handlerCount",0)}createAuthRequester(o){const m=new f,u=this.handlerCount;return this.handlerCount++,m.pending().subscribe({next:h=>{const g=this.currentRequests.slice(),R=this.makeAuthRequest(h,o);R?g[u]=R:delete g[u],this.currentRequests=g,this.subject.next(g.filter(Boolean))}}),h=>m.request(h)}makeAuthRequest(o,m){const{scopes:u}=o;if(!!u)return{provider:m.provider,trigger:async()=>{const h=await m.onAuthRequest(u);o.resolve(h)},reject:()=>{const h=new Error("Login failed, rejected by user");h.name="RejectedError",o.reject(h)}}}authRequest$(){return this.subject}}},56054:function(_,s,e){"use strict";e.d(s,{C:function(){return f}});var r=e(82394),t=e.n(r);const l=new Map;class f{constructor(i,o){ae(this,"subscribers",new Set);ae(this,"observable",new(t())(i=>(this.subscribers.add(i),()=>{this.subscribers.delete(i)})));this.namespace=i,this.errorApi=o}static create(i){var o;return new f((o=i.namespace)!=null?o:"",i.errorApi)}get(i){return this.snapshot(i).value}snapshot(i){let o,m="absent";try{const u=localStorage.getItem(this.getKeyName(i));u&&(o=JSON.parse(u,(h,g)=>(typeof g=="object"&&g!==null&&Object.freeze(g),g)),m="present")}catch{this.errorApi.post(new Error(`Error when parsing JSON config from storage for: ${i}`))}return{key:i,value:o,presence:m}}forBucket(i){const o=`${this.namespace}/${i}`;return l.has(o)||l.set(o,new f(o,this.errorApi)),l.get(o)}async set(i,o){localStorage.setItem(this.getKeyName(i),JSON.stringify(o)),this.notifyChanges(i)}async remove(i){localStorage.removeItem(this.getKeyName(i)),this.notifyChanges(i)}observe$(i){return this.observable.filter(({key:o})=>o===i)}getKeyName(i){return`${this.namespace}/${encodeURIComponent(i)}`}notifyChanges(i){const o=this.snapshot(i);for(const m of this.subscribers)m.next(o)}}},59589:function(_,s,e){"use strict";e.d(s,{u:function(){return l}});var r=e(91205);const t={id:"atlassian",title:"Atlassian",icon:()=>null};class l{static create(E){const{discoveryApi:i,environment:o="development",provider:m=t,oauthRequestApi:u}=E;return r.OAuth2.create({discoveryApi:i,oauthRequestApi:u,provider:m,environment:o})}}},6098:function(_,s,e){"use strict";e.d(s,{Z:function(){return l}});var r=e(91205);const t={id:"bitbucket",title:"Bitbucket",icon:()=>null};class l{static create(E){const{discoveryApi:i,environment:o="development",provider:m=t,oauthRequestApi:u,defaultScopes:h=["team"]}=E;return r.OAuth2.create({discoveryApi:i,oauthRequestApi:u,provider:m,environment:o,defaultScopes:h})}}},44431:function(_,s,e){"use strict";e.d(s,{BitbucketAuth:function(){return l.Z}});var r=e(19347),t=e.n(r);e.o(r,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return r.AlertApiForwarder}}),e.o(r,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return r.AppThemeSelector}}),e.o(r,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return r.AtlassianAuth}}),e.o(r,"ConfigReader")&&e.d(s,{ConfigReader:function(){return r.ConfigReader}}),e.o(r,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return r.ErrorAlerter}}),e.o(r,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return r.ErrorApiForwarder}}),e.o(r,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return r.FetchMiddlewares}}),e.o(r,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return r.FlatRoutes}}),e.o(r,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return r.LocalStorageFeatureFlags}}),e.o(r,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return r.NoOpAnalyticsApi}}),e.o(r,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return r.OAuthRequestManager}}),e.o(r,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return r.UnhandledErrorForwarder}}),e.o(r,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return r.UrlPatternDiscovery}}),e.o(r,"WebStorage")&&e.d(s,{WebStorage:function(){return r.WebStorage}}),e.o(r,"createFetchApi")&&e.d(s,{createFetchApi:function(){return r.createFetchApi}}),e.o(r,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return r.createSpecializedApp}}),e.o(r,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return r.defaultConfigLoader}});var l=e(6098)},19347:function(){},44474:function(_,s,e){"use strict";e.d(s,{T:function(){return l}});var r=e(91205);const t={id:"github",title:"GitHub",icon:()=>null};class l{static create(E){const{discoveryApi:i,environment:o="development",provider:m=t,oauthRequestApi:u,defaultScopes:h=["read:user"]}=E;return r.OAuth2.create({discoveryApi:i,oauthRequestApi:u,provider:m,environment:o,defaultScopes:h})}}},2922:function(_,s,e){"use strict";e.d(s,{a:function(){return l}});var r=e(91205);const t={id:"gitlab",title:"GitLab",icon:()=>null};class l{static create(E){const{discoveryApi:i,environment:o="development",provider:m=t,oauthRequestApi:u,defaultScopes:h=["read_user"]}=E;return r.OAuth2.create({discoveryApi:i,oauthRequestApi:u,provider:m,environment:o,defaultScopes:h})}}},59938:function(_,s,e){"use strict";e.d(s,{e:function(){return f}});var r=e(91205);const t={id:"google",title:"Google",icon:()=>null},l="https://www.googleapis.com/auth/";class f{static create(i){const{discoveryApi:o,oauthRequestApi:m,environment:u="development",provider:h=t,defaultScopes:g=["openid",`${l}userinfo.email`,`${l}userinfo.profile`]}=i;return r.OAuth2.create({discoveryApi:o,oauthRequestApi:m,provider:h,environment:u,defaultScopes:g,scopeTransform(R){return R.map(C=>C==="openid"?C:C==="profile"||C==="email"?`${l}userinfo.${C}`:C.startsWith(l)?C:`${l}${C}`)}})}}},91668:function(_,s,e){"use strict";e.d(s,{AtlassianAuth:function(){return h.u},BitbucketAuth:function(){return u.BitbucketAuth},GithubAuth:function(){return r.T},GitlabAuth:function(){return t.a},GoogleAuth:function(){return l.e},MicrosoftAuth:function(){return o._},OktaAuth:function(){return E.s},OneLoginAuth:function(){return m.$}});var r=e(44474),t=e(2922),l=e(59938),f=e(91205);e.o(f,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return f.AlertApiForwarder}}),e.o(f,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return f.AppThemeSelector}}),e.o(f,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return f.AtlassianAuth}}),e.o(f,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return f.BitbucketAuth}}),e.o(f,"ConfigReader")&&e.d(s,{ConfigReader:function(){return f.ConfigReader}}),e.o(f,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return f.ErrorAlerter}}),e.o(f,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return f.ErrorApiForwarder}}),e.o(f,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return f.FetchMiddlewares}}),e.o(f,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return f.FlatRoutes}}),e.o(f,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return f.LocalStorageFeatureFlags}}),e.o(f,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return f.MicrosoftAuth}}),e.o(f,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return f.NoOpAnalyticsApi}}),e.o(f,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return f.OAuthRequestManager}}),e.o(f,"OktaAuth")&&e.d(s,{OktaAuth:function(){return f.OktaAuth}}),e.o(f,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return f.OneLoginAuth}}),e.o(f,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return f.UnhandledErrorForwarder}}),e.o(f,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return f.UrlPatternDiscovery}}),e.o(f,"WebStorage")&&e.d(s,{WebStorage:function(){return f.WebStorage}}),e.o(f,"createFetchApi")&&e.d(s,{createFetchApi:function(){return f.createFetchApi}}),e.o(f,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return f.createSpecializedApp}}),e.o(f,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return f.defaultConfigLoader}});var E=e(26079),i=e(67604),o=e(38482),m=e(58381),u=e(44431);e.o(u,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return u.AlertApiForwarder}}),e.o(u,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return u.AppThemeSelector}}),e.o(u,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return u.AtlassianAuth}}),e.o(u,"ConfigReader")&&e.d(s,{ConfigReader:function(){return u.ConfigReader}}),e.o(u,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return u.ErrorAlerter}}),e.o(u,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return u.ErrorApiForwarder}}),e.o(u,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return u.FetchMiddlewares}}),e.o(u,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return u.FlatRoutes}}),e.o(u,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return u.LocalStorageFeatureFlags}}),e.o(u,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return u.NoOpAnalyticsApi}}),e.o(u,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return u.OAuthRequestManager}}),e.o(u,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return u.UnhandledErrorForwarder}}),e.o(u,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return u.UrlPatternDiscovery}}),e.o(u,"WebStorage")&&e.d(s,{WebStorage:function(){return u.WebStorage}}),e.o(u,"createFetchApi")&&e.d(s,{createFetchApi:function(){return u.createFetchApi}}),e.o(u,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return u.createSpecializedApp}}),e.o(u,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return u.defaultConfigLoader}});var h=e(59589)},38482:function(_,s,e){"use strict";e.d(s,{_:function(){return l}});var r=e(91205);const t={id:"microsoft",title:"Microsoft",icon:()=>null};class l{static create(E){const{environment:i="development",provider:o=t,oauthRequestApi:m,discoveryApi:u,defaultScopes:h=["openid","offline_access","profile","email","User.Read"]}=E;return r.OAuth2.create({discoveryApi:u,oauthRequestApi:m,provider:o,environment:i,defaultScopes:h})}}},73124:function(_,s,e){"use strict";e.d(s,{Z:function(){return i}});function r(o){return new Promise((m,u)=>{const h=o.width||500,g=o.height||700,R=window.screen.width/2-h/2,C=window.screen.height/2-g/2,M=window.open(o.url,o.name,`menubar=no,location=no,resizable=no,scrollbars=no,status=no,width=${h},height=${g},top=${C},left=${R}`);let b="";if(!M||typeof M.closed=="undefined"||M.closed){const L=new Error("Failed to open auth popup.");L.name="PopupRejectedError",u(L);return}const Q=L=>{if(L.source!==M||L.origin!==o.origin)return;const{data:z}=L;if(z.type==="config_info"){b=z.targetOrigin;return}if(z.type!=="authorization_response")return;const W=z;if("error"in W){const q=new Error(W.error.message);q.name=W.error.name,u(q)}else m(W.response);P()},I=setInterval(()=>{if(M.closed){const L=`Login failed, ${b&&b!==window.location.origin?`Incorrect app origin, expected ${b}`:"popup was closed"}`,z=new Error(L);z.name="PopupClosedError",u(z),P()}},100);function P(){window.removeEventListener("message",Q),clearInterval(I)}window.addEventListener("message",Q)})}function t(o){return[...o].join(" ")}class l{constructor(m){ae(this,"discoveryApi");ae(this,"environment");ae(this,"provider");ae(this,"joinScopesFunc");ae(this,"authRequester");ae(this,"sessionTransform");const{discoveryApi:u,environment:h,provider:g,joinScopes:R=t,oauthRequestApi:C,sessionTransform:M=b=>b}=m;this.authRequester=C.createAuthRequester({provider:g,onAuthRequest:b=>this.showPopup(b)}),this.discoveryApi=u,this.environment=h,this.provider=g,this.joinScopesFunc=R,this.sessionTransform=M}async createSession(m){return m.instantPopup?this.showPopup(m.scopes):this.authRequester(m.scopes)}async refreshSession(){const m=await fetch(await this.buildUrl("/refresh",{optional:!0}),{headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(h=>{throw new Error(`Auth refresh request failed, ${h}`)});if(!m.ok){const h=new Error(`Auth refresh request failed, ${m.statusText}`);throw h.status=m.status,h}const u=await m.json();if(u.error){const h=new Error(u.error.message);throw u.error.name&&(h.name=u.error.name),h}return await this.sessionTransform(u)}async removeSession(){const m=await fetch(await this.buildUrl("/logout"),{method:"POST",headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(u=>{throw new Error(`Logout request failed, ${u}`)});if(!m.ok){const u=new Error(`Logout request failed, ${m.statusText}`);throw u.status=m.status,u}}async showPopup(m){const u=this.joinScopesFunc(m),h=await this.buildUrl("/start",{scope:u,origin:location.origin}),g=await r({url:h,name:`${this.provider.title} Login`,origin:new URL(h).origin,width:450,height:730});return await this.sessionTransform(g)}async buildUrl(m,u){const h=await this.discoveryApi.getBaseUrl("auth"),g=this.buildQueryString({...u,env:this.environment});return`${h}/${this.provider.id}${m}${g}`}buildQueryString(m){if(!m)return"";const u=Object.entries(m).map(([h,g])=>{if(typeof g=="string")return`${encodeURIComponent(h)}=${encodeURIComponent(g)}`;if(g)return encodeURIComponent(h)}).filter(Boolean).join("&");return u?`?${u}`:""}}var f=e(57018);const E={id:"oauth2",title:"Your Identity Provider",icon:()=>null};class i{constructor(m){ae(this,"sessionManager");ae(this,"scopeTransform");this.sessionManager=m.sessionManager,this.scopeTransform=m.scopeTransform}static create(m){const{discoveryApi:u,environment:h="development",provider:g=E,oauthRequestApi:R,defaultScopes:C=[],scopeTransform:M=I=>I}=m,b=new l({discoveryApi:u,environment:h,provider:g,oauthRequestApi:R,sessionTransform(I){return{...I,providerInfo:{idToken:I.providerInfo.idToken,accessToken:I.providerInfo.accessToken,scopes:i.normalizeScopes(M,I.providerInfo.scope),expiresAt:new Date(Date.now()+I.providerInfo.expiresInSeconds*1e3)}}}}),Q=new f.RefreshingAuthSessionManager({connector:b,defaultScopes:new Set(C),sessionScopes:I=>I.providerInfo.scopes,sessionShouldRefresh:I=>(I.providerInfo.expiresAt.getTime()-Date.now())/1e3<60*5});return new i({sessionManager:Q,scopeTransform:M})}async signIn(){await this.getAccessToken()}async signOut(){await this.sessionManager.removeSession()}sessionState$(){return this.sessionManager.sessionState$()}async getAccessToken(m,u){var R;const h=i.normalizeScopes(this.scopeTransform,m),g=await this.sessionManager.getSession({...u,scopes:h});return(R=g==null?void 0:g.providerInfo.accessToken)!=null?R:""}async getIdToken(m={}){var h;const u=await this.sessionManager.getSession(m);return(h=u==null?void 0:u.providerInfo.idToken)!=null?h:""}async getBackstageIdentity(m={}){const u=await this.sessionManager.getSession(m);return u==null?void 0:u.backstageIdentity}async getProfile(m={}){const u=await this.sessionManager.getSession(m);return u==null?void 0:u.profile}static normalizeScopes(m,u){if(!u)return new Set;const h=Array.isArray(u)?u:u.split(/[\s|,]/).filter(Boolean);return new Set(m(h))}}},91205:function(_,s,e){"use strict";e.d(s,{OAuth2:function(){return r.Z}});var r=e(73124),t=e(5973),l=e.n(t);e.o(t,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return t.AlertApiForwarder}}),e.o(t,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return t.AppThemeSelector}}),e.o(t,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return t.AtlassianAuth}}),e.o(t,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return t.BitbucketAuth}}),e.o(t,"ConfigReader")&&e.d(s,{ConfigReader:function(){return t.ConfigReader}}),e.o(t,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return t.ErrorAlerter}}),e.o(t,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return t.ErrorApiForwarder}}),e.o(t,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return t.FetchMiddlewares}}),e.o(t,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return t.FlatRoutes}}),e.o(t,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return t.LocalStorageFeatureFlags}}),e.o(t,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return t.MicrosoftAuth}}),e.o(t,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return t.NoOpAnalyticsApi}}),e.o(t,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return t.OAuthRequestManager}}),e.o(t,"OktaAuth")&&e.d(s,{OktaAuth:function(){return t.OktaAuth}}),e.o(t,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return t.OneLoginAuth}}),e.o(t,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return t.UnhandledErrorForwarder}}),e.o(t,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return t.UrlPatternDiscovery}}),e.o(t,"WebStorage")&&e.d(s,{WebStorage:function(){return t.WebStorage}}),e.o(t,"createFetchApi")&&e.d(s,{createFetchApi:function(){return t.createFetchApi}}),e.o(t,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return t.createSpecializedApp}}),e.o(t,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return t.defaultConfigLoader}})},5973:function(){},26079:function(_,s,e){"use strict";e.d(s,{s:function(){return E}});var r=e(91205);const t={id:"okta",title:"Okta",icon:()=>null},l=new Set(["openid","profile","email","phone","address","groups","offline_access"]),f="okta.";class E{static create(o){const{discoveryApi:m,environment:u="development",provider:h=t,oauthRequestApi:g,defaultScopes:R=["openid","email","profile","offline_access"]}=o;return r.OAuth2.create({discoveryApi:m,oauthRequestApi:g,provider:h,environment:u,defaultScopes:R,scopeTransform(C){return C.map(M=>l.has(M)||M.startsWith(f)?M:`${f}${M}`)}})}}},58381:function(_,s,e){"use strict";e.d(s,{$:function(){return E}});var r=e(91205);const t={id:"onelogin",title:"onelogin",icon:()=>null},l=new Set(["openid","profile","email","phone","address","groups","offline_access"]),f="onelogin.";class E{static create(o){const{discoveryApi:m,environment:u="development",provider:h=t,oauthRequestApi:g}=o;return r.OAuth2.create({discoveryApi:m,oauthRequestApi:g,provider:h,environment:u,defaultScopes:["openid","email","profile","offline_access"],scopeTransform(R){return R.map(C=>l.has(C)||C.startsWith(f)?C:`${f}${C}`)}})}}},67604:function(_,s,e){"use strict";var r=e(57018),t=e(30195);const l=t.z.object({profile:t.z.object({email:t.z.string().optional(),displayName:t.z.string().optional(),picture:t.z.string().optional()}),backstageIdentity:t.z.object({id:t.z.string(),token:t.z.string(),identity:t.z.object({type:t.z.literal("user"),userEntityRef:t.z.string(),ownershipEntityRefs:t.z.array(t.z.string())})})}),f={id:"saml",title:"SAML",icon:()=>null};class E{static create(o){const{discoveryApi:m,environment:u="development",provider:h=f}=o,g=new DirectAuthConnector({discoveryApi:m,environment:u,provider:h}),R=new StaticAuthSessionManager({connector:g}),C=new AuthSessionStore({manager:R,storageKey:`${h.id}Session`,schema:samlSessionSchema});return new E(C)}sessionState$(){return this.sessionManager.sessionState$()}constructor(o){this.sessionManager=o}async signIn(){await this.getBackstageIdentity({})}async signOut(){await this.sessionManager.removeSession()}async getBackstageIdentity(o={}){const m=await this.sessionManager.getSession(o);return m==null?void 0:m.backstageIdentity}async getProfile(o={}){const m=await this.sessionManager.getSession(o);return m==null?void 0:m.profile}}},91631:function(_,s,e){"use strict";e.d(s,{AlertApiForwarder:function(){return t.C},AppThemeSelector:function(){return f.C},AtlassianAuth:function(){return r.AtlassianAuth},ConfigReader:function(){return E.m},ErrorAlerter:function(){return o.KN},ErrorApiForwarder:function(){return o.gr},FetchMiddlewares:function(){return u.I},GithubAuth:function(){return r.GithubAuth},GitlabAuth:function(){return r.GitlabAuth},GoogleAuth:function(){return r.GoogleAuth},LocalStorageFeatureFlags:function(){return m.b},MicrosoftAuth:function(){return r.MicrosoftAuth},NoOpAnalyticsApi:function(){return l.g},OAuthRequestManager:function(){return h.Y},OktaAuth:function(){return r.OktaAuth},OneLoginAuth:function(){return r.OneLoginAuth},UnhandledErrorForwarder:function(){return o.Jv},UrlPatternDiscovery:function(){return i.p},WebStorage:function(){return g.C},createFetchApi:function(){return u.j}});var r=e(91668);e.o(r,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return r.AlertApiForwarder}}),e.o(r,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return r.AppThemeSelector}}),e.o(r,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return r.BitbucketAuth}}),e.o(r,"ConfigReader")&&e.d(s,{ConfigReader:function(){return r.ConfigReader}}),e.o(r,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return r.ErrorAlerter}}),e.o(r,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return r.ErrorApiForwarder}}),e.o(r,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return r.FetchMiddlewares}}),e.o(r,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return r.FlatRoutes}}),e.o(r,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return r.LocalStorageFeatureFlags}}),e.o(r,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return r.NoOpAnalyticsApi}}),e.o(r,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return r.OAuthRequestManager}}),e.o(r,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return r.UnhandledErrorForwarder}}),e.o(r,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return r.UrlPatternDiscovery}}),e.o(r,"WebStorage")&&e.d(s,{WebStorage:function(){return r.WebStorage}}),e.o(r,"createFetchApi")&&e.d(s,{createFetchApi:function(){return r.createFetchApi}}),e.o(r,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return r.createSpecializedApp}}),e.o(r,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return r.defaultConfigLoader}});var t=e(23235),l=e(47150),f=e(58652),E=e(14721),i=e(4333),o=e(89536),m=e(14884),u=e(50160),h=e(11358),g=e(56054)},56494:function(_,s,e){"use strict";e.d(s,{AlertApiForwarder:function(){return t.AlertApiForwarder},ApiProvider:function(){return r.ApiProvider},AppThemeSelector:function(){return t.AppThemeSelector},ConfigReader:function(){return t.ConfigReader},ErrorAlerter:function(){return t.ErrorAlerter},ErrorApiForwarder:function(){return t.ErrorApiForwarder},FetchMiddlewares:function(){return t.FetchMiddlewares},LocalStorageFeatureFlags:function(){return t.LocalStorageFeatureFlags},NoOpAnalyticsApi:function(){return t.NoOpAnalyticsApi},OAuthRequestManager:function(){return t.OAuthRequestManager},UnhandledErrorForwarder:function(){return t.UnhandledErrorForwarder},UrlPatternDiscovery:function(){return t.UrlPatternDiscovery},WebStorage:function(){return t.WebStorage},createFetchApi:function(){return t.createFetchApi}});var r=e(76105);e.o(r,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return r.AlertApiForwarder}}),e.o(r,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return r.AppThemeSelector}}),e.o(r,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return r.AtlassianAuth}}),e.o(r,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return r.BitbucketAuth}}),e.o(r,"ConfigReader")&&e.d(s,{ConfigReader:function(){return r.ConfigReader}}),e.o(r,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return r.ErrorAlerter}}),e.o(r,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return r.ErrorApiForwarder}}),e.o(r,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return r.FetchMiddlewares}}),e.o(r,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return r.FlatRoutes}}),e.o(r,"GithubAuth")&&e.d(s,{GithubAuth:function(){return r.GithubAuth}}),e.o(r,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return r.GitlabAuth}}),e.o(r,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return r.GoogleAuth}}),e.o(r,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return r.LocalStorageFeatureFlags}}),e.o(r,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return r.MicrosoftAuth}}),e.o(r,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return r.NoOpAnalyticsApi}}),e.o(r,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return r.OAuthRequestManager}}),e.o(r,"OktaAuth")&&e.d(s,{OktaAuth:function(){return r.OktaAuth}}),e.o(r,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return r.OneLoginAuth}}),e.o(r,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return r.UnhandledErrorForwarder}}),e.o(r,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return r.UrlPatternDiscovery}}),e.o(r,"WebStorage")&&e.d(s,{WebStorage:function(){return r.WebStorage}}),e.o(r,"createFetchApi")&&e.d(s,{createFetchApi:function(){return r.createFetchApi}}),e.o(r,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return r.createSpecializedApp}}),e.o(r,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return r.defaultConfigLoader}});var t=e(91631);e.o(t,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return t.AtlassianAuth}}),e.o(t,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return t.BitbucketAuth}}),e.o(t,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return t.FlatRoutes}}),e.o(t,"GithubAuth")&&e.d(s,{GithubAuth:function(){return t.GithubAuth}}),e.o(t,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return t.GitlabAuth}}),e.o(t,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return t.GoogleAuth}}),e.o(t,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return t.MicrosoftAuth}}),e.o(t,"OktaAuth")&&e.d(s,{OktaAuth:function(){return t.OktaAuth}}),e.o(t,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return t.OneLoginAuth}}),e.o(t,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return t.createSpecializedApp}}),e.o(t,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return t.defaultConfigLoader}})},80396:function(_,s,e){"use strict";e.d(s,{p:function(){return t}});var r;(function(l){l[l.default=10]="default";const f=50;l[l.app=f]="app",l[l.static=100]="static"})(r||(r={}));class t{constructor(){ae(this,"factories",new Map)}register(f,E){const i=r[f],o=this.factories.get(E.api.id);return o&&o.priority>=i?!1:(this.factories.set(E.api.id,{priority:i,factory:E}),!0)}get(f){const E=this.factories.get(f.id);if(!!E)return E.factory}getAllApis(){const f=new Set;for(const{factory:E}of this.factories.values())f.add(E.api);return f}}},14406:function(_,s,e){"use strict";e.d(s,{g:function(){return o}});var r=e(2784),t=e(13980),l=e.n(t);class f{constructor(...u){ae(this,"holders");this.holders=u}get(u){for(const h of this.holders){const g=h.get(u);if(g)return g}}}var E=e(76241);const i=(0,E.CT)("api-context"),o=m=>{var C;const{apis:u,children:h}=m,g=(C=(0,r.useContext)(i))==null?void 0:C.atVersion(1),R=g?new f(u,g):u;return r.createElement(i.Provider,{value:(0,E.EI)({1:R}),children:h})};o.propTypes={apis:l().shape({get:l().func.isRequired}).isRequired,children:l().node}},12132:function(_,s,e){"use strict";e.d(s,{M:function(){return r}});class r{constructor(l){ae(this,"apis",new Map);this.factories=l}static validateFactories(l,f){for(const E of f){const i=[E],o=new Set;for(;i.length;){const m=i.shift(),u=l.get(m);if(!!u)for(const h of Object.values(u.deps)){if(h.id===E.id)throw new Error(`Circular dependency of api factory for ${E}`);o.has(h)||(o.add(h),i.push(h))}}}}get(l){return this.load(l)}load(l,f=[]){const E=this.apis.get(l.id);if(E)return E;const i=this.factories.get(l);if(!i)return;if(f.includes(i.api))throw new Error(`Circular dependency of api factory for ${i.api}`);const o=this.loadDeps(l,i.deps,[...f,i.api]),m=i.factory(o);return this.apis.set(l.id,m),m}loadDeps(l,f,E){const i={};for(const o in f)if(f.hasOwnProperty(o)){const m=f[o],u=this.load(m,E);if(!u)throw new Error(`No API factory available for dependency ${m} of dependent ${l}`);i[o]=u}return i}}},76105:function(_,s,e){"use strict";e.d(s,{ApiFactoryRegistry:function(){return l.p},ApiProvider:function(){return r.g},ApiResolver:function(){return t.M}});var r=e(14406),t=e(12132),l=e(80396),f=e(82488),E=e.n(f);e.o(f,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return f.AlertApiForwarder}}),e.o(f,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return f.AppThemeSelector}}),e.o(f,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return f.AtlassianAuth}}),e.o(f,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return f.BitbucketAuth}}),e.o(f,"ConfigReader")&&e.d(s,{ConfigReader:function(){return f.ConfigReader}}),e.o(f,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return f.ErrorAlerter}}),e.o(f,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return f.ErrorApiForwarder}}),e.o(f,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return f.FetchMiddlewares}}),e.o(f,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return f.FlatRoutes}}),e.o(f,"GithubAuth")&&e.d(s,{GithubAuth:function(){return f.GithubAuth}}),e.o(f,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return f.GitlabAuth}}),e.o(f,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return f.GoogleAuth}}),e.o(f,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return f.LocalStorageFeatureFlags}}),e.o(f,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return f.MicrosoftAuth}}),e.o(f,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return f.NoOpAnalyticsApi}}),e.o(f,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return f.OAuthRequestManager}}),e.o(f,"OktaAuth")&&e.d(s,{OktaAuth:function(){return f.OktaAuth}}),e.o(f,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return f.OneLoginAuth}}),e.o(f,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return f.UnhandledErrorForwarder}}),e.o(f,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return f.UrlPatternDiscovery}}),e.o(f,"WebStorage")&&e.d(s,{WebStorage:function(){return f.WebStorage}}),e.o(f,"createFetchApi")&&e.d(s,{createFetchApi:function(){return f.createFetchApi}}),e.o(f,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return f.createSpecializedApp}}),e.o(f,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return f.defaultConfigLoader}})},82488:function(){},82370:function(_,s,e){"use strict";e.d(s,{b:function(){return Et}});var r=e(2784),t=e(10289),l=e(64279),f=e(56494),E=e(36964),i=e(76105);function o(X){const Z={};for(const ce in X.collectors)X.collectors.hasOwnProperty(ce)&&(Z[ce]=X.collectors[ce]());const ne=[{node:r.Children.toArray(X.root),parent:void 0,contexts:{}}];for(;ne.length!==0;){const{node:ce,parent:se,contexts:ye}=ne.shift();r.Children.forEach(ce,Ze=>{if(!(0,r.isValidElement)(Ze))return;const $e={};for(const nt in Z)if(Z.hasOwnProperty(nt)){const te=Z[nt];$e[nt]=te.visit(te.accumulator,Ze,se,ye[nt])}for(const nt of X.discoverers){const te=nt(Ze);te&&ne.push({node:te,parent:Ze,contexts:$e})}})}return Object.fromEntries(Object.entries(Z).map(([ce,se])=>[ce,se.accumulator]))}function m(X,Z){return()=>({accumulator:X(),visit:Z})}function u(X){var Z;return(Z=X.props)==null?void 0:Z.children}function h(X){var Z,ne,ce;if(((Z=X.props)==null?void 0:Z.path)&&((ne=X.props)==null?void 0:ne.element))return(ce=X.props)==null?void 0:ce.element}const g=m(()=>new Set,(X,Z)=>{const ne=(0,E.getComponentData)(Z,"core.plugin");ne&&X.add(ne)});var R=e(88934);function C(X){var ce;const Z=(ce=X.props)==null?void 0:ce.element;let ne=(0,E.getComponentData)(X,"core.mountPoint");return!ne&&(0,r.isValidElement)(Z)&&(ne=(0,E.getComponentData)(Z,"core.mountPoint")),ne}const M=m(()=>new Map,(X,Z,ne,ce)=>{var Ze,$e;let se=ce;if((ne==null?void 0:ne.props.element)===Z)return se;if((0,E.getComponentData)(Z,"core.gatherMountPoints")){const nt=(Ze=Z.props)==null?void 0:Ze.path;if(!nt)throw new Error("Mount point gatherer must have a path");se=nt}const ye=C(Z);if(ye){let nt=($e=Z.props)==null?void 0:$e.path;if(se&&(nt?se=void 0:nt=se),!nt)throw new Error("Mounted routable extension must have a path");X.set(ye,nt)}return se}),b=m(()=>new Map,(X,Z,ne,ce)=>{var Ze;if((ne==null?void 0:ne.props.element)===Z)return ce;let se=ce;const ye=C(Z);return ye&&(ce&&"sticky"in ce?(X.set(ye,ce.sticky),(Ze=Z.props)!=null&&Ze.path?se=ye:se=ce):(X.set(ye,ce),se=ye)),(0,E.getComponentData)(Z,"core.gatherMountPoints")?{sticky:se}:se}),Q={caseSensitive:!1,path:"/*",element:"match-all",routeRefs:new Set},I=m(()=>Array(),(X,Z,ne,ce)=>{var te,J,U;const se=(te=ce==null?void 0:ce.children)!=null?te:X;if((ne==null?void 0:ne.props.element)===Z)return ce;const ye=(J=Z.props)==null?void 0:J.path,Ze=Boolean((U=Z.props)==null?void 0:U.caseSensitive),$e=C(Z);if($e){if(ye){const ie={caseSensitive:Ze,path:ye,element:"mounted",routeRefs:new Set([$e]),children:[Q],plugin:(0,E.getComponentData)(Z.props.element,"core.plugin")};return se.push(ie),ie}ce==null||ce.routeRefs.add($e)}if((0,E.getComponentData)(Z,"core.gatherMountPoints")){if(!ye)throw new Error("Mount point gatherer must have a path");const ie={caseSensitive:Ze,path:ye,element:"gathered",routeRefs:new Set,children:[Q],plugin:ce==null?void 0:ce.plugin};return se.push(ie),ie}return ce}),P=m(()=>new Set,(X,Z)=>{if(Z.type===R.L){const ne=Z.props;X.add("with"in ne?ne.with:ne.without)}});var L=e(76241);const z=(0,L.uW)("route-ref-type",()=>Symbol("route-ref-type"));function W(X){return X[z]==="absolute"}function q(X){return X[z]==="sub"}function oe(X){return X[z]==="external"}function ve(...X){const Z=X.join("/").replace(/\/\/+/g,"/");return Z!=="/"&&Z.endsWith("/")?Z.slice(0,-1):Z}function Le(X,Z,ne){let ce,se="";if(W(X))ce=X;else if(q(X))ce=X.parent,se=X.path;else if(oe(X)){const $e=ne.get(X);if(!$e)return[void 0,""];if(W($e))ce=$e;else if(q($e))ce=$e.parent,se=$e.path;else throw new Error(`ExternalRouteRef was bound to invalid target, ${$e}`)}else throw X[z]?new Error(`Unknown or invalid route ref type, ${X[z]}`):new Error(`Unknown object passed to useRouteRef, got ${X}`);if(!ce)return[void 0,""];const ye=Z.get(ce);if(!ye)return[void 0,""];const Ze=ve(ye,se);return[ce,Ze]}function we(X,Z,ne,ce,se){var J;const ye=(J=(0,t.fp)(se,Z))!=null?J:[],Ze=Array();let $e=-1;for(let U=X;U&&($e=ye.findIndex(ie=>ie.route.routeRefs.has(U)),$e===-1);U=ce.get(U))Ze.unshift(U);Ze.length===0&&($e-=1);const nt=$e===-1?"":ye[$e].pathname,te=ve(...Ze.slice(0,-1).map(U=>{const ie=ne.get(U);if(!ie)throw new Error(`No path for ${U}`);if(ie.includes(":"))throw new Error(`Cannot route to ${X} with parent ${U} as it has parameters`);return ie}));return nt+te}class fe{constructor(Z,ne,ce,se,ye){this.routePaths=Z,this.routeParents=ne,this.routeObjects=ce,this.routeBindings=se,this.appBasePath=ye}resolve(Z,ne){const[ce,se]=Le(Z,this.routePaths,this.routeBindings);if(!ce)return;let ye;typeof ne=="string"?ye=this.trimPath(ne):ne.pathname?ye={...ne,pathname:this.trimPath(ne.pathname)}:ye=ne;const Ze=this.appBasePath+we(ce,ye,this.routePaths,this.routeParents,this.routeObjects);return(...[nt])=>Ze+(0,t.Gn)(se,nt)}trimPath(Z){return Z&&(Z.startsWith(this.appBasePath)?Z.slice(this.appBasePath.length):Z)}}const Ke=(0,L.CT)("routing-context"),_e=({routePaths:X,routeParents:Z,routeObjects:ne,routeBindings:ce,basePath:se="",children:ye})=>{const Ze=new fe(X,Z,ne,ce,se),$e=(0,L.EI)({1:Ze});return r.createElement(Ke.Provider,{value:$e},ye)},ut=(X,Z)=>{var ne,ce;try{const se=(0,t.fp)(Z,{pathname:X}),ye=(ne=se==null?void 0:se.filter($e=>{var nt;return((nt=$e==null?void 0:$e.route.routeRefs)==null?void 0:nt.size)>0}).pop())==null?void 0:ne.route;if(!ye)return{};let Ze;return ye.routeRefs.size===1&&(Ze=ye.routeRefs.values().next().value),{extension:"App",pluginId:((ce=ye.plugin)==null?void 0:ce.getId())||"root",...Ze?{routeRef:Ze.id}:{}}}catch{return{}}},rt=({pathname:X,search:Z,hash:ne})=>{const ce=(0,E.useAnalytics)();return(0,r.useEffect)(()=>{ce.captureEvent("navigate",`${X}${Z}${ne}`)},[ce,X,Z,ne]),null},at=({tree:X})=>{const{pathname:Z,search:ne,hash:ce}=(0,t.TH)(),{routeObjects:se}=(0,r.useMemo)(()=>o({root:X,discoverers:[u,h],collectors:{routeObjects:I}}),[X]);return r.createElement(E.AnalyticsContext,{attributes:ut(Z,se)},r.createElement(rt,{pathname:Z,search:ne,hash:ce}))};function gt(X,Z){const ne=new Set(Z.values());ne.delete(void 0);for(const ce of Z.keys()){if(ne.has(ce))continue;let se=ce,ye="";for(;se;){const $e=X.get(se);if(!$e)throw new Error(`No path for ${se}`);ye=`${$e}${ye}`,se=Z.get(se)}const Ze=ye.match(/:(\w+)/g);if(Ze){for(let $e=0;$e<Ze.length;$e++)for(let nt=$e+1;nt<Ze.length;nt++)if(Ze[nt]===Ze[$e])throw new Error(`Parameter ${Ze[nt]} is duplicated in path ${ye}`)}}}function xe(X,Z){for(const ne of Z)if(!!ne.externalRoutes){for(const[ce,se]of Object.entries(ne.externalRoutes))if(!se.optional&&!X.has(se))throw new Error(`External route '${ce}' of the '${ne.getId()}' plugin must be bound to a target route. See https://backstage.io/link?bind-routes for details.`)}}const Qe=(0,L.CT)("app-context"),Ye=({appContext:X,children:Z})=>{const ne=(0,L.EI)({1:X});return r.createElement(Qe.Provider,{value:ne,children:Z})};function Rt(X){return new Error(`Tried to access IdentityApi ${X} before app was loaded`)}function pt(X){console.warn(`WARNING: Call to ${X} is deprecated and will break in the future`)}class St{constructor(){ae(this,"target");ae(this,"waitForTarget");ae(this,"resolveTarget",()=>{});this.waitForTarget=new Promise(Z=>{this.resolveTarget=Z})}setTarget(Z){this.target=Z,this.resolveTarget(Z)}getUserId(){if(!this.target)throw Rt("getUserId");if(!this.target.getUserId)throw new Error("IdentityApi does not implement getUserId");return pt("getUserId"),this.target.getUserId()}getProfile(){if(!this.target)throw Rt("getProfile");if(!this.target.getProfile)throw new Error("IdentityApi does not implement getProfile");return pt("getProfile"),this.target.getProfile()}async getProfileInfo(){return this.waitForTarget.then(Z=>Z.getProfileInfo())}async getBackstageIdentity(){const Z=await this.waitForTarget.then(ne=>ne.getBackstageIdentity());return Z.userEntityRef.match(/^.*:.*\/.*$/)||console.warn(`WARNING: The App IdentityApi provided an invalid userEntityRef, '${Z.userEntityRef}'. It must be a full Entity Reference of the form '<kind>:<namespace>/<name>'.`),Z}async getCredentials(){return this.waitForTarget.then(Z=>Z.getCredentials())}async getIdToken(){return this.waitForTarget.then(Z=>{if(!Z.getIdToken)throw new Error("IdentityApi does not implement getIdToken");return pt("getIdToken"),Z.getIdToken()})}async signOut(){await this.waitForTarget.then(Z=>Z.signOut()),location.reload()}}var it=e(72164);function yt(X,Z,ne){if(X!==void 0){const se=ne.find(ye=>ye.id===X);if(se)return se}if(Z){const se=ne.find(ye=>ye.variant==="dark");if(se)return se}const ce=ne.find(se=>se.variant==="light");return ce||ne[0]}const It=()=>{const X=(0,r.useMemo)(()=>window.matchMedia("(prefers-color-scheme: dark)"),[]),[Z,ne]=(0,r.useState)(X.matches);return(0,r.useEffect)(()=>{const ce=se=>{ne(se.matches)};return X.addListener(ce),()=>{X.removeListener(ce)}},[X]),Z};function Pt({children:X}){const Z=(0,E.useApi)(E.appThemeApiRef),ne=(0,it.Z)(Z.activeThemeId$(),Z.getActiveThemeId()),ce=Boolean(window.matchMedia)?It():!1,se=yt(ne,ce,Z.getInstalledThemes());if(!se)throw new Error("App has no themes");return r.createElement(se.Provider,{children:X})}var Zt=e(46611);class Bt{constructor(){ae(this,"apis",[])}add(Z,ne){return this.apis.push([Z.id,ne]),ne}build(){return new Lt(new Map(this.apis))}}class Lt{static builder(){return new Bt}static from(Z){return new Lt(new Map(Z.map(([ne,ce])=>[ne.id,ce])))}static with(Z,ne){return new Lt(new Map([[Z.id,ne]]))}constructor(Z){this.apis=Z}with(Z,ne){return new Lt(new Map([...this.apis,[Z.id,ne]]))}get(Z){return this.apis.get(Z.id)}}function ze(X){const Z=new Map;return X&&X({bind:(ce,se)=>{for(const[ye,Ze]of Object.entries(se)){const $e=ce[ye];if(!$e)throw new Error(`Key ${ye} is not an existing external route`);if(!Ze&&!$e.optional)throw new Error(`External route ${ye} is required but was undefined`);Ze&&Z.set($e,Ze)}}}),Z}function lt(X){var ne;let{pathname:Z}=new URL((ne=X.getOptionalString("app.baseUrl"))!=null?ne:"/","http://dummy.dev");return Z=Z.replace(/\/*$/,""),Z}function ke(X,Z,ne){var nt;const ce=Boolean(X),se=(0,l.default)(X||(()=>Promise.resolve([])));let ye;if(ce&&se.loading){const{Progress:te}=Z;ye=r.createElement(te,null)}else if(se.error){const{BootErrorPage:te}=Z;ye=r.createElement(te,{step:"load-config",error:se.error})}const{ThemeProvider:Ze=Pt}=Z;return ye?{node:r.createElement(f.ApiProvider,{apis:Lt.with(E.appThemeApiRef,ne)},r.createElement(Ze,null,ye))}:{api:f.ConfigReader.fromConfigs((nt=se.value)!=null?nt:[])}}class Ct{constructor(Z){this.app=Z}getPlugins(){return this.app.getPlugins()}getSystemIcon(Z){return this.app.getSystemIcon(Z)}getComponents(){return this.app.getComponents()}}class ct{constructor(Z){ae(this,"apiHolder");ae(this,"configApi");ae(this,"apis");ae(this,"icons");ae(this,"plugins");ae(this,"components");ae(this,"themes");ae(this,"configLoader");ae(this,"defaultApis");ae(this,"bindRoutes");ae(this,"appIdentityProxy",new St);ae(this,"apiFactoryRegistry");var ne,ce,se,ye;this.apis=(ne=Z.apis)!=null?ne:[],this.icons=Z.icons,this.plugins=new Set((ce=Z.plugins)!=null?ce:[]),this.components=Z.components,this.themes=Z.themes,this.configLoader=(se=Z.configLoader)!=null?se:Zt.t,this.defaultApis=(ye=Z.defaultApis)!=null?ye:[],this.bindRoutes=Z.bindRoutes,this.apiFactoryRegistry=new i.ApiFactoryRegistry}getPlugins(){return Array.from(this.plugins)}getSystemIcon(Z){return this.icons[Z]}getComponents(){return this.components}getProvider(){const Z=new Ct(this);let ne=!1;return({children:se})=>{const ye=(0,r.useMemo)(()=>f.AppThemeSelector.createWithStorage(this.themes),[]),{routePaths:Ze,routeParents:$e,routeObjects:nt,featureFlags:te,routeBindings:J}=(0,r.useMemo)(()=>{const De=o({root:se,discoverers:[u,h],collectors:{routePaths:M,routeParents:b,routeObjects:I,collectedPlugins:g,featureFlags:P}});return De.collectedPlugins.forEach(Ee=>this.plugins.add(Ee)),this.verifyPlugins(this.plugins),this.getApiHolder(),{...De,routeBindings:ze(this.bindRoutes)}},[se]);ne||(ne=!0,gt(Ze,$e),xe(J,this.plugins));const U=ke(this.configLoader,this.components,ye),ie="api"in U;if(ie){const{api:De}=U;this.configApi=De}if((0,r.useEffect)(()=>{if(ie){const De=this.getApiHolder().get(E.featureFlagsApiRef);for(const Ee of this.plugins.values())if("getFeatureFlags"in Ee)for(const Fe of Ee.getFeatureFlags())De.registerFlag({name:Fe.name,pluginId:Ee.getId()});else for(const Fe of Ee.output())Fe.type==="feature-flag"&&De.registerFlag({name:Fe.name,pluginId:Ee.getId()});for(const Ee of te)De.registerFlag({name:Ee,pluginId:""})}},[ie,U,te]),"node"in U)return U.node;const{ThemeProvider:Te=Pt}=this.components;return r.createElement(f.ApiProvider,{apis:this.getApiHolder()},r.createElement(Ye,{appContext:Z},r.createElement(Te,null,r.createElement(_e,{routePaths:Ze,routeParents:$e,routeObjects:nt,routeBindings:J,basePath:lt(U.api)},se))))}}getRouter(){const{Router:Z,SignInPage:ne}=this.components,ce=({component:ye,children:Ze})=>{const[$e,nt]=(0,r.useState)();return $e?(this.appIdentityProxy.setTarget($e),Ze):r.createElement(ye,{onSignInSuccess:nt})};return({children:ye})=>{const Ze=(0,E.useApi)(E.configApiRef),$e=`${lt(Ze)}/*`;return ne?r.createElement(Z,null,r.createElement(at,{tree:ye}),r.createElement(ce,{component:ne},r.createElement(t.Z5,null,r.createElement(t.AW,{path:$e,element:r.createElement(r.Fragment,null,ye)})))):(this.appIdentityProxy.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()=>{}}),r.createElement(Z,null,r.createElement(at,{tree:ye}),r.createElement(t.Z5,null,r.createElement(t.AW,{path:$e,element:r.createElement(r.Fragment,null,ye)}))))}}getApiHolder(){if(this.apiHolder){for(const Z of this.plugins)for(const ne of Z.getApis())this.apiFactoryRegistry.get(ne.api)||this.apiFactoryRegistry.register("default",ne);return i.ApiResolver.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder}this.apiFactoryRegistry.register("static",{api:E.appThemeApiRef,deps:{},factory:()=>f.AppThemeSelector.createWithStorage(this.themes)}),this.apiFactoryRegistry.register("static",{api:E.configApiRef,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:E.identityApiRef,deps:{},factory:()=>this.appIdentityProxy}),this.apiFactoryRegistry.register("default",{api:E.featureFlagsApiRef,deps:{},factory:()=>new f.LocalStorageFeatureFlags});for(const Z of this.defaultApis)this.apiFactoryRegistry.register("default",Z);for(const Z of this.plugins)for(const ne of Z.getApis())if(!this.apiFactoryRegistry.register("default",ne))throw new Error(`Plugin ${Z.getId()} tried to register duplicate or forbidden API factory for ${ne.api}`);for(const Z of this.apis)if(!this.apiFactoryRegistry.register("app",Z))throw new Error(`Duplicate or forbidden API factory for ${Z.api} in app`);return i.ApiResolver.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder=new i.ApiResolver(this.apiFactoryRegistry),this.apiHolder}verifyPlugins(Z){const ne=new Set;for(const ce of Z){const se=ce.getId();if(ne.has(se))throw new Error(`Duplicate plugin found '${se}'`);ne.add(se)}}}function Et(X){return new ct(X)}},46611:function(_,s,e){"use strict";e.d(s,{t:function(){return r}});const r=async(t="__APP_INJECTED_RUNTIME_CONFIG__")=>{const l=[{context:"app-config.yaml",data:{app:{title:"Techdocs Preview App",baseUrl:"http://localhost:3000"},backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}}}];if(!l)throw new Error("No static configuration provided");if(!Array.isArray(l))throw new Error("Static configuration has invalid format");const f=l.slice();if(t!=="__app_injected_runtime_config__".toLocaleUpperCase("en-US"))try{const i=JSON.parse(t);Array.isArray(i)?f.push(...i):f.push({data:i,context:"env"})}catch(i){throw new Error(`Failed to load runtime configuration, ${i}`)}const E=window.__APP_CONFIG__;return E&&f.push({context:"window",data:E}),f}},44056:function(_,s,e){"use strict";e.d(s,{createSpecializedApp:function(){return r.b},defaultConfigLoader:function(){return t.t}});var r=e(82370),t=e(46611),l=e(73495),f=e.n(l);e.o(l,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return l.AtlassianAuth}}),e.o(l,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return l.BitbucketAuth}}),e.o(l,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return l.FlatRoutes}}),e.o(l,"GithubAuth")&&e.d(s,{GithubAuth:function(){return l.GithubAuth}}),e.o(l,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return l.GitlabAuth}}),e.o(l,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return l.GoogleAuth}}),e.o(l,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return l.MicrosoftAuth}}),e.o(l,"OktaAuth")&&e.d(s,{OktaAuth:function(){return l.OktaAuth}}),e.o(l,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return l.OneLoginAuth}})},73495:function(){},49208:function(_,s,e){"use strict";e.d(s,{AlertApiForwarder:function(){return r.AlertApiForwarder},ErrorAlerter:function(){return r.ErrorAlerter},ErrorApiForwarder:function(){return r.ErrorApiForwarder},FetchMiddlewares:function(){return r.FetchMiddlewares},FlatRoutes:function(){return l.w},NoOpAnalyticsApi:function(){return r.NoOpAnalyticsApi},OAuthRequestManager:function(){return r.OAuthRequestManager},UnhandledErrorForwarder:function(){return r.UnhandledErrorForwarder},UrlPatternDiscovery:function(){return r.UrlPatternDiscovery},WebStorage:function(){return r.WebStorage},createFetchApi:function(){return r.createFetchApi},createSpecializedApp:function(){return t.createSpecializedApp},defaultConfigLoader:function(){return t.defaultConfigLoader}});var r=e(56494);e.o(r,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return r.AtlassianAuth}}),e.o(r,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return r.BitbucketAuth}}),e.o(r,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return r.FlatRoutes}}),e.o(r,"GithubAuth")&&e.d(s,{GithubAuth:function(){return r.GithubAuth}}),e.o(r,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return r.GitlabAuth}}),e.o(r,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return r.GoogleAuth}}),e.o(r,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return r.MicrosoftAuth}}),e.o(r,"OktaAuth")&&e.d(s,{OktaAuth:function(){return r.OktaAuth}}),e.o(r,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return r.OneLoginAuth}}),e.o(r,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return r.createSpecializedApp}}),e.o(r,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return r.defaultConfigLoader}});var t=e(44056);e.o(t,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return t.AtlassianAuth}}),e.o(t,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return t.BitbucketAuth}}),e.o(t,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return t.FlatRoutes}}),e.o(t,"GithubAuth")&&e.d(s,{GithubAuth:function(){return t.GithubAuth}}),e.o(t,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return t.GitlabAuth}}),e.o(t,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return t.GoogleAuth}}),e.o(t,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return t.MicrosoftAuth}}),e.o(t,"OktaAuth")&&e.d(s,{OktaAuth:function(){return t.OktaAuth}}),e.o(t,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return t.OneLoginAuth}});var l=e(63938)},57018:function(_,s,e){"use strict";e.d(s,{RefreshingAuthSessionManager:function(){return i}});function r(m,u){for(const h of u)if(!m.has(h))return!1;return!0}class t{constructor(u){this.options=u}sessionExistsAndHasScope(u,h){if(!u)return!1;if(!h||this.options.sessionScopes===void 0)return!0;const g=this.options.sessionScopes(u);return r(g,h)}getExtendedScope(u,h){const g=new Set(this.options.defaultScopes);if(u&&this.options.sessionScopes!==void 0){const R=this.options.sessionScopes(u);for(const C of R)g.add(C)}if(h)for(const R of h)g.add(R);return g}}var l=e(98005),f=e(36964);class E{constructor(){ae(this,"subject",new l.X(f.SessionState.SignedOut));ae(this,"signedIn",!1)}setIsSignedIn(u){this.signedIn!==u&&(this.signedIn=u,this.subject.next(this.signedIn?f.SessionState.SignedIn:f.SessionState.SignedOut))}sessionState$(){return this.subject}}class i{constructor(u){ae(this,"connector");ae(this,"helper");ae(this,"sessionScopesFunc");ae(this,"sessionShouldRefreshFunc");ae(this,"stateTracker",new E);ae(this,"refreshPromise");ae(this,"currentSession");const{connector:h,defaultScopes:g=new Set,sessionScopes:R,sessionShouldRefresh:C}=u;this.connector=h,this.sessionScopesFunc=R,this.sessionShouldRefreshFunc=C,this.helper=new t({sessionScopes:R,defaultScopes:g})}async getSession(u){if(this.helper.sessionExistsAndHasScope(this.currentSession,u.scopes)){if(!this.sessionShouldRefreshFunc(this.currentSession))return this.currentSession;try{const g=await this.collapsedSessionRefresh(),R=this.sessionScopesFunc(this.currentSession),C=this.sessionScopesFunc(g);return r(C,R)&&(this.currentSession=g),g}catch(g){if(u.optional)return;throw g}}if(!this.currentSession&&!u.instantPopup)try{const h=await this.collapsedSessionRefresh();return this.currentSession=h,this.getSession(u)}catch{}if(!u.optional)return this.currentSession=await this.connector.createSession({...u,scopes:this.helper.getExtendedScope(this.currentSession,u.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(){if(this.refreshPromise)return this.refreshPromise;this.refreshPromise=this.connector.refreshSession();try{const u=await this.refreshPromise;return this.stateTracker.setIsSignedIn(!0),u}finally{delete this.refreshPromise}}}class o{constructor(u){ae(this,"connector");ae(this,"helper");ae(this,"stateTracker",new SessionStateTracker);ae(this,"currentSession");const{connector:h,defaultScopes:g=new Set,sessionScopes:R}=u;this.connector=h,this.helper=new SessionScopeHelper({sessionScopes:R,defaultScopes:g})}setSession(u){this.currentSession=u,this.stateTracker.setIsSignedIn(Boolean(u))}async getSession(u){if(this.helper.sessionExistsAndHasScope(this.currentSession,u.scopes))return this.currentSession;if(!u.optional)return this.currentSession=await this.connector.createSession({...u,scopes:this.helper.getExtendedScope(this.currentSession,u.scopes)}),this.stateTracker.setIsSignedIn(!0),this.currentSession}async removeSession(){this.currentSession=void 0,this.stateTracker.setIsSignedIn(!1)}sessionState$(){return this.stateTracker.sessionState$()}}},98005:function(_,s,e){"use strict";e.d(s,{J:function(){return l},X:function(){return f}});var r=e(82394),t=e.n(r);class l{constructor(){ae(this,"isClosed",!1);ae(this,"terminatingError");ae(this,"observable",new(t())(i=>this.isClosed?(this.terminatingError?i.error(this.terminatingError):i.complete(),()=>{}):(this.subscribers.add(i),()=>{this.subscribers.delete(i)})));ae(this,"subscribers",new Set)}[Symbol.observable](){return this}get closed(){return this.isClosed}next(i){if(this.isClosed)throw new Error("PublishSubject is closed");this.subscribers.forEach(o=>o.next(i))}error(i){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.terminatingError=i,this.subscribers.forEach(o=>o.error(i))}complete(){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.subscribers.forEach(i=>i.complete())}subscribe(i,o,m){const u=typeof i=="function"?{next:i,error:o,complete:m}:i;return this.observable.subscribe(u)}}class f{constructor(i){ae(this,"isClosed");ae(this,"currentValue");ae(this,"terminatingError");ae(this,"observable");ae(this,"subscribers",new Set);this.isClosed=!1,this.currentValue=i,this.terminatingError=void 0,this.observable=new(t())(o=>this.isClosed?(this.terminatingError?o.error(this.terminatingError):o.complete(),()=>{}):(o.next(this.currentValue),this.subscribers.add(o),()=>{this.subscribers.delete(o)}))}[Symbol.observable](){return this}get closed(){return this.isClosed}next(i){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.currentValue=i,this.subscribers.forEach(o=>o.next(i))}error(i){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.terminatingError=i,this.subscribers.forEach(o=>o.error(i))}complete(){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.subscribers.forEach(i=>i.complete())}subscribe(i,o,m){const u=typeof i=="function"?{next:i,error:o,complete:m}:i;return this.observable.subscribe(u)}}},88934:function(_,s,e){"use strict";e.d(s,{L:function(){return l}});var r=e(36964),t=e(2784);const l=f=>{const{children:E}=f,i=(0,r.useApi)(r.featureFlagsApiRef),o="with"in f?i.isActive(f.with):!i.isActive(f.without);return t.createElement(t.Fragment,null,o?E:null)};(0,r.attachComponentData)(l,"core.featureFlagged",!0)},63938:function(_,s,e){"use strict";e.d(s,{w:function(){return f}});var r=e(2784),t=e(10289),l=e(36964);const f=i=>{const o=(0,l.useApp)(),{NotFoundErrorPage:m}=o.getComponents(),u=(0,l.useElementFilter)(i.children,h=>h.getElements().flatMap(g=>{var C;let R=g.props.path;return R===""?[]:(R=(C=R==null?void 0:R.replace(/\/\*$/,""))!=null?C:"/",[{path:R,element:g,children:g.props.children?[{path:R==="/"?"/":"/*",element:g.props.children}]:void 0}])}).sort((g,R)=>R.path.localeCompare(g.path)).map(g=>(g.path=g.path==="/"?"/":`${g.path}/*`,g)));return u.push({element:r.createElement(m,null),path:"/*"}),(0,t.V$)(u)};var E=e(88934)},9118:function(_,s,e){"use strict";e.d(s,{Button:function(){return I},CodeSnippet:function(){return fe},Content:function(){return za},ContentHeader:function(){return ei},CreateButton:function(){return ut},DependencyGraph:function(){return J},DependencyGraphTypes:function(){return r},EmptyState:function(){return me},ErrorPage:function(){return oi},ErrorPanel:function(){return pn},Header:function(){return ka},HeaderIconLinkRow:function(){return Nr},HeaderLabel:function(){return gi},HeaderTabs:function(){return Wa},InfoCard:function(){return Rn},ItemCardGrid:function(){return Ci},ItemCardHeader:function(){return vi},Link:function(){return b},LogViewer:function(){return Nn},MissingAnnotationEmptyState:function(){return ot},OverflowTooltip:function(){return vr},Page:function(){return Xa},PageWithHeader:function(){return Pi},Progress:function(){return _n},ResponseErrorPanel:function(){return lr},RoutedTabs:function(){return Ha},Select:function(){return et},Sidebar:function(){return ko},SidebarContext:function(){return xr},SidebarDivider:function(){return us},SidebarItem:function(){return Ua},SidebarPage:function(){return $o},SidebarPinStateContext:function(){return or},SubvalueCell:function(){return Ss},SupportButton:function(){return Fo},Table:function(){return js},WarningPanel:function(){return qt},sidebarConfig:function(){return Ln},useContent:function(){return sa},useQueryParamState:function(){return Po}});var r={};e.r(r),e.d(r,{Nm:function(){return rt},ht:function(){return xe},LJ:function(){return gt}});var t=e(2784),l=e(36964),f=e(19928);function E(n){const[a,c]=useState([]),d=useApi(alertApiRef);if(useEffect(()=>{const D=d.alert$().subscribe($=>c(Y=>Y.concat($)));return()=>{D.unsubscribe()}},[d]),a.length===0)return null;const[p]=a,v=()=>{c(D=>D.filter($=>$!==p))};return React.createElement(Snackbar,{open:!0,anchorOrigin:{vertical:"top",horizontal:"center"}},React.createElement(Alert,{action:React.createElement(IconButton,{color:"inherit",size:"small",onClick:v,"data-testid":"error-button-close"},React.createElement(CloseIcon,null)),severity:p.severity},React.createElement("span",null,p.message.toString(),a.length>1&&React.createElement("em",null,` (${a.length-1} older ${pluralize("message",a.length-1)})`))))}var i=e(79692),o=e(12420);const m=(0,i.Z)(n=>(0,o.Z)({avatar:{width:"4rem",height:"4rem",color:"#fff",fontWeight:n.typography.fontWeightBold,letterSpacing:"1px",textTransform:"uppercase"}}),{name:"BackstageAvatar"});function u(n){const{displayName:a,picture:c,customStyles:d}=n,p=m();return React.createElement(MaterialAvatar,{alt:a,src:c,className:p.avatar,style:{backgroundColor:stringToColor(a||c||""),...d}},a&&extractInitials(a))}var h=e(77277),g=e(86689),R=e(62833);const C=n=>/^([a-z+.-]+):/.test(n),M=n=>{var a;return n instanceof Array?n.map(M).join(" ").trim():typeof n=="object"&&n?M((a=n==null?void 0:n.props)==null?void 0:a.children):["string","number"].includes(typeof n)?String(n):""},b=t.forwardRef(({onClick:n,noTrack:a,...c},d)=>{const p=(0,l.useAnalytics)(),v=String(c.to),D=M(c.children)||v,$=C(v),Y=$&&!!/^https?:/.exec(v),V=le=>{n==null||n(le),a||p.captureEvent("click",D,{attributes:{to:v}})};return $?t.createElement(g.Z,{ref:d,href:v,onClick:V,...Y?{target:"_blank",rel:"noopener"}:{},...c}):t.createElement(g.Z,{ref:d,component:R.rU,onClick:V,...c})}),Q=t.forwardRef((n,a)=>t.createElement(b,{ref:a,...n,color:"initial"})),I=t.forwardRef((n,a)=>t.createElement(h.Z,{ref:a,component:Q,...n}));var P=e(60364),L=e(61837),z=e(80030),W=e(19353),q=e(95074);function oe(n){const{text:a,tooltipDelay:c=1e3,tooltipText:d="Text copied to clipboard"}=n,p=(0,l.useApi)(l.errorApiRef),[v,D]=(0,t.useState)(!1),[{error:$},Y]=(0,q.Z)();(0,t.useEffect)(()=>{$&&p.post($)},[$,p]);const V=le=>{le.stopPropagation(),D(!0),Y(a)};return t.createElement(t.Fragment,null,t.createElement(z.ZP,{id:"copy-test-tooltip",title:d,placement:"top",leaveDelay:c,onClose:()=>D(!1),open:v},t.createElement(L.Z,{onClick:V},t.createElement(W.Z,null))))}var ve=e(83229),Le=e(26639),we=e(39595);function fe(n){const{text:a,language:c,showLineNumbers:d=!1,highlightedNumbers:p,customStyle:v,showCopyCodeButton:D=!1}=n,$=(0,P.Z)(),Y=$.palette.type==="dark"?Le.Z:we.Z,V=$.palette.type==="dark"?"#256bf3":"#e6ffed";return t.createElement("div",{style:{position:"relative"}},t.createElement(ve.Z,{customStyle:v,language:c,style:Y,showLineNumbers:d,wrapLines:!0,lineNumberStyle:{color:$.palette.textVerySubtle},lineProps:le=>p!=null&&p.includes(le)?{style:{backgroundColor:V}}:{}},a),D&&t.createElement("div",{style:{position:"absolute",top:0,right:0}},t.createElement(oe,{text:a})))}var Ke=e(41156),_e=e(88188);function ut(n){const{title:a,to:c}=n,d=(0,Ke.Z)(p=>p.breakpoints.down("xs"));return c?d?t.createElement(L.Z,{component:R.rU,color:"primary",title:a,size:"small",to:c},t.createElement(_e.Z,null)):t.createElement(h.Z,{component:R.rU,variant:"contained",color:"primary",to:c},a):null}var rt;(function(n){const a="TB";n.TOP_BOTTOM=a;const c="BT";n.BOTTOM_TOP=c;const d="LR";n.LEFT_RIGHT=d;const p="RL";n.RIGHT_LEFT=p})(rt||(rt={}));var at;(function(n){const a="UL";n.UP_LEFT=a;const c="UR";n.UP_RIGHT=c;const d="DL";n.DOWN_LEFT=d;const p="DR";n.DOWN_RIGHT=p})(at||(at={}));var gt;(function(n){const a="network-simplex";n.NETWORK_SIMPLEX=a;const c="tight-tree";n.TIGHT_TREE=c;const d="longest-path";n.LONGEST_PATH=d})(gt||(gt={}));var xe;(function(n){const a="l";n.LEFT=a;const c="r";n.RIGHT=c;const d="c";n.CENTER=d})(xe||(xe={}));var Qe=e(13387),Ye=e(11105),Rt=e(97963),pt=e(46506),St=e.n(pt),it=e(54073),yt=e.n(it),It=e(10368);const Pt=(0,i.Z)(n=>({node:{fill:n.palette.primary.light,stroke:n.palette.primary.light},text:{fill:n.palette.primary.contrastText}}),{name:"BackstageDependencyGraphDefaultNode"});function Zt({node:{id:n}}){const a=Pt(),[c,d]=t.useState(0),[p,v]=t.useState(0),D=t.useRef(null);t.useLayoutEffect(()=>{if(D.current){let{height:le,width:re}=D.current.getBBox();le=Math.round(le),re=Math.round(re),(le!==p||re!==c)&&(d(re),v(le))}},[c,p]);const $=10,Y=c+$*2,V=p+$*2;return t.createElement("g",null,t.createElement("rect",{className:a.node,width:Y,height:V,rx:10}),t.createElement("text",{ref:D,className:a.text,y:V/2,x:Y/2,textAnchor:"middle",alignmentBaseline:"middle"},n))}const Bt="arrow-marker",Lt="node",ze="edge",lt="label",ke=(0,It.Z)(n=>({node:{transition:`${n.transitions.duration.shortest}ms`}}),{name:"BackstageDependencyGraphNode"}),Ct=n=>t.createElement(Zt,{...n});function ct({render:n=Ct,setNode:a,node:c}){const{width:d,height:p,x:v=0,y:D=0}=c,$=c,Y=ke(),V=t.useRef(null);return t.useLayoutEffect(()=>{if(V.current){let{height:le,width:re}=V.current.getBBox();le=Math.round(le),re=Math.round(re),(le!==p||re!==d)&&a(c.id,{...c,height:le,width:re})}},[c,d,p,a]),t.createElement("g",{ref:V,"data-testid":Lt,className:Y.node,transform:`translate(${v-d/2},${D-p/2})`},n({node:$}))}var Et=e(55876),X=e(66481),Z=e(19574),ne=e.n(Z);const ce=(0,It.Z)(n=>({text:{fill:n.palette.textContrast}}),{name:"BackstageDependencyGraphDefaultLabel"});function se({edge:{label:n}}){const a=ce();return t.createElement("text",{className:a.text,textAnchor:"middle"},n)}const ye=(0,It.Z)(n=>({path:{strokeWidth:2,stroke:n.palette.textSubtle,fill:"none",transition:`${n.transitions.duration.shortest}ms`},label:{transition:`${n.transitions.duration.shortest}ms`}}),{name:"BackstageDependencyGraphEdge"}),Ze=n=>t.createElement(se,{...n}),$e=Et.Z().x(n=>n.x).y(n=>n.y).curve(X.Z);function nt({render:n=Ze,setEdge:a,id:c,edge:d}){const{x:p=0,y:v=0,width:D,height:$,points:Y}=d,V=d,le=ye(),re=t.useRef(null);t.useLayoutEffect(()=>{if(re.current){let{height:Re,width:be}=re.current.getBBox();Re=Math.round(Re),be=Math.round(be),(Re!==$||be!==D)&&a(c,{...d,height:Re,width:be})}},[d,$,D,a,c]);let Ce="";if(Y){const Re=Y.filter(be=>ne()(be.x)&&ne()(be.y));Ce=$e(Re)||""}return t.createElement(t.Fragment,null,Ce&&t.createElement("path",{"data-testid":ze,className:le.path,markerEnd:`url(#${Bt})`,d:Ce}),V.label?t.createElement("g",{ref:re,"data-testid":lt,className:le.label,transform:`translate(${p},${v})`},n({edge:V})):null)}const te="workspace";function J(n){var ir,ao;const{edges:a,nodes:c,renderNode:d,direction:p=rt.TOP_BOTTOM,align:v,nodeMargin:D=50,edgeMargin:$=10,rankMargin:Y=50,paddingX:V=0,paddingY:le=0,acyclicer:re,ranker:Ce=gt.NETWORK_SIMPLEX,labelPosition:Re=xe.RIGHT,labelOffset:be=10,edgeRanks:mt=1,edgeWeight:Ot=1,renderLabel:Nt,defs:Wt,zoom:dt="enabled",...Dt}=n,Ft=(0,Rt.Z)(),[Jt,Fn]=t.useState(100),[mn,Dr]=t.useState(100),bt=t.useRef(new(St()).graphlib.Graph),[Bn,ma]=t.useState(((ir=bt.current.graph())==null?void 0:ir.width)||0),[Vn,ha]=t.useState(((ao=bt.current.graph())==null?void 0:ao.height)||0),[_r,ea]=t.useState([]),[ga,Qt]=t.useState([]),on=Math.max(Bn,Jt),hn=Math.max(Vn,mn),jn=t.useMemo(()=>yt()(zt=>{if(!zt)return;const Xt=Ye.Z(zt),Ut=Ye.Z(zt.getElementById(te));function vn(){Xt.call(Qe.sP().scaleExtent([1,10]).on("zoom",xn=>{xn.transform.x=Math.min(0,Math.max(xn.transform.x,on-on*xn.transform.k)),xn.transform.y=Math.min(0,Math.max(xn.transform.y,hn-hn*xn.transform.k)),Ut.attr("transform",xn.transform)}))}dt==="enabled"?vn():dt==="enable-on-click"&&Xt.on("click",()=>vn());const{width:An,height:ta}=zt.getBoundingClientRect();Jt!==An&&Fn(An),mn!==ta&&Dr(ta)},100),[mn,Jt,on,hn,dt]),jt=t.useCallback(()=>{const zt=bt.current.nodes(),Xt=bt.current.edges();zt.forEach(Ut=>{c.some(An=>An.id===Ut)||bt.current.removeNode(Ut)}),Xt.forEach(Ut=>{a.some(An=>An.from===Ut.v&&An.to===Ut.w)||bt.current.removeEdge(Ut.v,Ut.w)}),c.forEach(Ut=>{const vn=bt.current.nodes().find(An=>Ut.id===An);if(vn&&bt.current.node(vn)){const{width:An,height:ta,x:xn,y:Hi}=bt.current.node(vn);bt.current.setNode(vn,{...Ut,width:An,height:ta,x:xn,y:Hi})}else bt.current.setNode(Ut.id,{...Ut,width:0,height:0})}),a.forEach(Ut=>{bt.current.setEdge(Ut.from,Ut.to,{...Ut,label:Ut.label,width:0,height:0,labelpos:Re,labeloffset:be,weight:Ot,minlen:mt})})},[a,c,Re,be,Ot,mt]),Gt=t.useMemo(()=>yt()(()=>{St().layout(bt.current);const{height:zt,width:Xt}=bt.current.graph(),Ut=Math.max(0,zt||0),vn=Math.max(0,Xt||0);ma(vn),ha(Ut),ea(bt.current.nodes()),Qt(bt.current.edges())},250,{leading:!0}),[]);t.useEffect(()=>(bt.current.setGraph({rankdir:p,align:v,nodesep:D,edgesep:$,ranksep:Y,marginx:V,marginy:le,acyclicer:re,ranker:Ce}),jt(),Gt(),Gt.cancel),[re,v,p,$,V,le,D,Y,Ce,jt,Gt]);function sr(zt,Xt){return bt.current.setNode(zt,Xt),Gt(),bt.current}function Gn(zt,Xt){return bt.current.setEdge(zt,Xt),Gt(),bt.current}return t.createElement("svg",{ref:jn,...Dt,width:"100%",height:hn,viewBox:`0 0 ${on} ${hn}`},t.createElement("defs",null,t.createElement("marker",{id:Bt,viewBox:"0 0 24 24",markerWidth:"14",markerHeight:"14",refX:"16",refY:"12",orient:"auto",markerUnits:"strokeWidth"},t.createElement("path",{fill:Ft.palette.textSubtle,d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})),Wt),t.createElement("g",{id:te},t.createElement("svg",{width:Bn,height:Vn,y:hn/2-Vn/2,x:on/2-Bn/2,viewBox:`0 0 ${Bn} ${Vn}`},ga.map(zt=>{const Xt=bt.current.edge(zt);return Xt?t.createElement(nt,{key:`${zt.v}-${zt.w}`,id:zt,setEdge:Gn,render:Nt,edge:Xt}):null}),_r.map(zt=>{const Xt=bt.current.node(zt);return Xt?t.createElement(ct,{key:zt,setNode:sr,render:d,node:Xt}):null}))))}var U=e(72779),ie=e.n(U);const Te=(0,i.Z)(n=>{var a;return{root:{padding:n.spacing(0),marginBottom:n.spacing(0),marginTop:n.spacing(0),display:"flex",flexFlow:"row nowrap"},topPosition:{position:"relative",marginBottom:n.spacing(6),marginTop:-n.spacing(3),zIndex:"unset"},icon:{fontSize:20},content:{width:"100%",maxWidth:"inherit",flexWrap:"nowrap"},message:{display:"flex",alignItems:"center",color:n.palette.banner.text,"& a":{color:n.palette.banner.link}},info:{backgroundColor:n.palette.banner.info},error:{backgroundColor:n.palette.banner.error},warning:{backgroundColor:(a=n.palette.banner.warning)!=null?a:n.palette.banner.error}}},{name:"BackstageDismissableBanner"}),De=n=>{var Re;const{variant:a,message:c,id:d,fixed:p=!1}=n,v=Te(),$=useApi(storageApiRef).forBucket("notifications"),Y=(Re=$.snapshot("dismissedBanners").value)!=null?Re:[],[V,le]=useState(new Set(Y)),re=useObservable($.observe$("dismissedBanners"));useEffect(()=>{var be;if(re!=null&&re.value){const mt=(be=re==null?void 0:re.value)!=null?be:[];le(new Set(mt))}},[re==null?void 0:re.value]);const Ce=()=>{$.set("dismissedBanners",[...V,d])};return React.createElement(Snackbar,{anchorOrigin:p?{vertical:"bottom",horizontal:"center"}:{vertical:"top",horizontal:"center"},open:!V.has(d),classes:{root:classNames(v.root,!p&&v.topPosition)}},React.createElement(SnackbarContent,{classes:{root:classNames(v.content,v[a]),message:v.message},message:c,action:[React.createElement(IconButton,{key:"dismiss",title:"Permanently dismiss this message",color:"inherit",onClick:Ce},React.createElement(Close,{className:v.icon}))]}))};var Ee=e(60905),Fe=e(90436),vt=e(86284),xt=e(96465),B=e(19133),S=e(3871);const j=(0,i.Z)({generalImg:{width:"95%",zIndex:2,position:"relative",left:"50%",top:"50%",transform:"translate(-50%, 15%)"}},{name:"BackstageEmptyStateImage"}),ue=({missing:n})=>{const a=j();switch(n){case"field":return t.createElement("img",{src:vt,className:a.generalImg,alt:"annotation is missing"});case"info":return t.createElement("img",{src:xt,alt:"no Information",className:a.generalImg});case"content":return t.createElement("img",{src:B,alt:"create Component",className:a.generalImg});case"data":return t.createElement("img",{src:S,alt:"no Build",className:a.generalImg});default:return null}},ge=(0,i.Z)(n=>({root:{backgroundColor:n.palette.background.default,padding:n.spacing(2,0,0,0)},action:{marginTop:n.spacing(2)},imageContainer:{position:"relative"}}),{name:"BackstageEmptyState"});function me(n){const{title:a,description:c,missing:d,action:p}=n,v=ge();return t.createElement(Ee.Z,{container:!0,direction:"row",justifyContent:"space-around",alignItems:"flex-start",className:v.root,spacing:2},t.createElement(Ee.Z,{item:!0,xs:12,md:6},t.createElement(Ee.Z,{container:!0,direction:"column"},t.createElement(Ee.Z,{item:!0,xs:!0},t.createElement(Fe.Z,{variant:"h5"},a)),t.createElement(Ee.Z,{item:!0,xs:!0},t.createElement(Fe.Z,{variant:"body1"},c)),t.createElement(Ee.Z,{item:!0,xs:!0,className:v.action},p))),t.createElement(Ee.Z,{item:!0,xs:12,md:6,className:v.imageContainer},t.createElement(ue,{missing:d})))}const Se=`apiVersion: backstage.io/v1alpha1
|
|
1
|
+
(()=>{var ji=Object.defineProperty;var Vi=(_,s,e)=>s in _?ji(_,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):_[s]=e;var oe=(_,s,e)=>(Vi(_,typeof s!="symbol"?s+"":s,e),e),oo=(_,s,e)=>{if(!s.has(_))throw TypeError("Cannot "+e)};var nt=(_,s,e)=>(oo(_,s,"read from private field"),e?e.call(_):s.get(_)),sn=(_,s,e)=>{if(s.has(_))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(_):s.set(_,e)},gn=(_,s,e,r)=>(oo(_,s,"write to private field"),r?r.call(_,e):s.set(_,e),e);(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[179],{30001:function(_,s,e){"use strict";e.d(s,{n3:function(){return E},MS:function(){return i}});var r=e(48023),t=e(10179),l=e(96279),f=e.n(l);const E=Symbol.for("CATALOG_FILTER_EXISTS_0e15b590c0b343a2bae3e787e84c2111");class i{constructor(m){oe(this,"discoveryApi");oe(this,"fetchApi");this.discoveryApi=m.discoveryApi,this.fetchApi=m.fetchApi||{fetch:f()}}async getEntityAncestors(m,u){const{kind:h,namespace:g,name:R}=(0,r.of)(m.entityRef);return await this.requestRequired("GET",`/entities/by-name/${encodeURIComponent(h)}/${encodeURIComponent(g)}/${encodeURIComponent(R)}/ancestry`,u)}async getLocationById(m,u){return await this.requestOptional("GET",`/locations/${encodeURIComponent(m)}`,u)}async getEntities(m,u){const{filter:h=[],fields:g=[],offset:R,limit:P,after:x}=m!=null?m:{},T=[];for(const D of[h].flat()){const Z=[];for(const[M,K]of Object.entries(D))for(const ae of[K].flat())ae===E?Z.push(encodeURIComponent(M)):typeof ae=="string"&&Z.push(`${encodeURIComponent(M)}=${encodeURIComponent(ae)}`);Z.length&&T.push(`filter=${Z.join(",")}`)}g.length&&T.push(`fields=${g.map(encodeURIComponent).join(",")}`),R!==void 0&&T.push(`offset=${R}`),P!==void 0&&T.push(`limit=${P}`),x!==void 0&&T.push(`after=${encodeURIComponent(x)}`);const X=T.length?`?${T.join("&")}`:"",F=await this.requestRequired("GET",`/entities${X}`,u),b=(D,Z)=>{var ae,pe;if(((ae=D.metadata)==null?void 0:ae.name)===void 0||D.kind===void 0||((pe=Z.metadata)==null?void 0:pe.name)===void 0||Z.kind===void 0)return 0;const M=(0,r.eE)(D),K=(0,r.eE)(Z);return M<K?-1:M>K?1:0};return{items:F.sort(b)}}async getEntityByRef(m,u){const{kind:h,namespace:g,name:R}=(0,r.of)(m);return this.requestOptional("GET",`/entities/by-name/${encodeURIComponent(h)}/${encodeURIComponent(g)}/${encodeURIComponent(R)}`,u)}async getEntityByName(m,u){const{kind:h,namespace:g="default",name:R}=m;return this.requestOptional("GET",`/entities/by-name/${encodeURIComponent(h)}/${encodeURIComponent(g)}/${encodeURIComponent(R)}`,u)}async refreshEntity(m,u){const h=await this.fetchApi.fetch(`${await this.discoveryApi.getBaseUrl("catalog")}/refresh`,{headers:{"Content-Type":"application/json",...(u==null?void 0:u.token)&&{Authorization:`Bearer ${u==null?void 0:u.token}`}},method:"POST",body:JSON.stringify({entityRef:m})});if(h.status!==200)throw new Error(await h.text())}async getEntityFacets(m,u){const{filter:h=[],facets:g}=m,R=[];for(const x of[h].flat()){const T=[];for(const[X,F]of Object.entries(x))for(const b of[F].flat())b===E?T.push(encodeURIComponent(X)):typeof b=="string"&&T.push(`${encodeURIComponent(X)}=${encodeURIComponent(b)}`);T.length&&R.push(`filter=${T.join(",")}`)}for(const x of g)R.push(`facet=${encodeURIComponent(x)}`);const P=R.length?`?${R.join("&")}`:"";return await this.requestOptional("GET",`/entity-facets${P}`,u)}async addLocation({type:m="url",target:u,dryRun:h},g){const R=await this.fetchApi.fetch(`${await this.discoveryApi.getBaseUrl("catalog")}/locations${h?"?dryRun=true":""}`,{headers:{"Content-Type":"application/json",...(g==null?void 0:g.token)&&{Authorization:`Bearer ${g==null?void 0:g.token}`}},method:"POST",body:JSON.stringify({type:m,target:u})});if(R.status!==201)throw new Error(await R.text());const{location:P,entities:x,exists:T}=await R.json();if(!P)throw new Error(`Location wasn't added: ${u}`);return{location:P,entities:x,exists:T}}async getLocationByRef(m,u){return(await this.requestRequired("GET","/locations",u)).map(g=>g.data).find(g=>m===(0,r.NZ)(g))}async removeLocationById(m,u){await this.requestIgnored("DELETE",`/locations/${encodeURIComponent(m)}`,u)}async removeEntityByUid(m,u){await this.requestIgnored("DELETE",`/entities/by-uid/${encodeURIComponent(m)}`,u)}async requestIgnored(m,u,h){const g=`${await this.discoveryApi.getBaseUrl("catalog")}${u}`,R=h!=null&&h.token?{Authorization:`Bearer ${h.token}`}:{},P=await this.fetchApi.fetch(g,{method:m,headers:R});if(!P.ok)throw await t.VL.fromResponse(P)}async requestRequired(m,u,h){const g=`${await this.discoveryApi.getBaseUrl("catalog")}${u}`,R=h!=null&&h.token?{Authorization:`Bearer ${h.token}`}:{},P=await this.fetchApi.fetch(g,{method:m,headers:R});if(!P.ok)throw await t.VL.fromResponse(P);return await P.json()}async requestOptional(m,u,h){const g=`${await this.discoveryApi.getBaseUrl("catalog")}${u}`,R=h!=null&&h.token?{Authorization:`Bearer ${h.token}`}:{},P=await this.fetchApi.fetch(g,{method:m,headers:R});if(!P.ok){if(P.status===404)return;throw await t.VL.fromResponse(P)}return await P.json()}}},48023:function(_,s,e){"use strict";e.d(s,{Tf:function(){return l},P1:function(){return Te},q1:function(){return Oe},M6:function(){return ve},l2:function(){return t},zG:function(){return r},w$:function(){return q},nP:function(){return Et},aS:function(){return Ze},S4:function(){return It},cz:function(){return Ee},iB:function(){return _e},of:function(){return Qe},Ou:function(){return De},eE:function(){return rt},NZ:function(){return vt}});const r="default",t="backstage.io/view-url",l="backstage.io/edit-url";var f=e(76635),E=e.n(f);class i{constructor(C=DEFAULT_NAMESPACE){oe(this,"namespace");this.namespace=C}async enforce(C){return C.metadata.namespace?C:lodash.merge({metadata:{namespace:this.namespace}},C)}}class o{static isValidPrefixAndOrSuffix(C,V,ue,ge){if(typeof C!="string")return!1;const me=C.split(V);return me.length===1?ge(me[0]):me.length===2?ue(me[0])&&ge(me[1]):!1}static isJsonSafe(C){try{return E().isEqual(C,JSON.parse(JSON.stringify(C)))}catch{return!1}}static isValidDnsSubdomain(C){return typeof C=="string"&&C.length>=1&&C.length<=253&&C.split(".").every(o.isValidDnsLabel)}static isValidDnsLabel(C){return typeof C=="string"&&C.length>=1&&C.length<=63&&/^[a-z0-9]+(\-[a-z0-9]+)*$/.test(C)}static isValidTag(C){return typeof C=="string"&&C.length>=1&&C.length<=63&&/^[a-z0-9+#]+(\-[a-z0-9+#]+)*$/.test(C)}static isValidUrl(C){if(typeof C!="string")return!1;try{return new URL(C),!0}catch{return!1}}static isValidString(C){var V;return typeof C=="string"&&((V=C==null?void 0:C.trim())==null?void 0:V.length)>=1}static isNonEmptyString(C){var V;return typeof C=="string"&&((V=C==null?void 0:C.trim())==null?void 0:V.length)>=1}}var m=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"EntityEnvelope","description":"The envelope skeleton parts of an entity - whatever is necessary to be able to give it a ref and pass to further validation / policy checking.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Component","metadata":{"name":"LoremService"}}],"type":"object","required":["apiVersion","kind","metadata"],"additionalProperties":true,"properties":{"apiVersion":{"type":"string","description":"The version of specification format for this particular entity that this is written against.","minLength":1,"examples":["backstage.io/v1alpha1","my-company.net/v1","1.0"]},"kind":{"type":"string","description":"The high level entity type being described.","minLength":1,"examples":["API","Component","Domain","Group","Location","Resource","System","Template","User"]},"metadata":{"type":"object","required":["name"],"additionalProperties":true,"properties":{"name":{"type":"string","description":"The name of the entity. Must be unique within the catalog at any given point in time, for any given namespace + kind pair.","examples":["metadata-proxy"],"minLength":1},"namespace":{"type":"string","description":"The namespace that the entity belongs to.","default":"default","examples":["default","admin"],"minLength":1}}}}}'),u=e(48231),h=e.n(u),g=JSON.parse(`{"$schema":"http://json-schema.org/draft-07/schema","$id":"Entity","description":"The parts of the format that's common to all versions/kinds of entity.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Component","metadata":{"name":"LoremService","description":"Creates Lorems like a pro.","labels":{"product_name":"Random value Generator"},"annotations":{"docs":"https://github.com/..../tree/develop/doc"}},"spec":{"type":"service","lifecycle":"production","owner":"tools"}}],"type":"object","required":["apiVersion","kind","metadata"],"additionalProperties":false,"properties":{"apiVersion":{"type":"string","description":"The version of specification format for this particular entity that this is written against.","minLength":1,"examples":["backstage.io/v1alpha1","my-company.net/v1","1.0"]},"kind":{"type":"string","description":"The high level entity type being described.","minLength":1,"examples":["API","Component","Domain","Group","Location","Resource","System","Template","User"]},"metadata":{"$ref":"EntityMeta"},"spec":{"type":"object","description":"The specification data describing the entity itself."},"relations":{"type":"array","description":"The relations that this entity has with other entities.","items":{"$ref":"common#relation"}},"status":{"$ref":"common#status"}}}`),R=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"EntityMeta","description":"Metadata fields common to all versions/kinds of entity.","examples":[{"uid":"e01199ab-08cc-44c2-8e19-5c29ded82521","etag":"lsndfkjsndfkjnsdfkjnsd==","name":"my-component-yay","namespace":"the-namespace","labels":{"backstage.io/custom":"ValueStuff"},"annotations":{"example.com/bindings":"are-secret"},"tags":["java","data"]}],"type":"object","required":["name"],"additionalProperties":true,"properties":{"uid":{"type":"string","description":"A globally unique ID for the entity. This field can not be set by the user at creation time, and the server will reject an attempt to do so. The field will be populated in read operations. The field can (optionally) be specified when performing update or delete operations, but the server is free to reject requests that do so in such a way that it breaks semantics.","examples":["e01199ab-08cc-44c2-8e19-5c29ded82521"],"minLength":1},"etag":{"type":"string","description":"An opaque string that changes for each update operation to any part of the entity, including metadata. This field can not be set by the user at creation time, and the server will reject an attempt to do so. The field will be populated in read operations. The field can (optionally) be specified when performing update or delete operations, and the server will then reject the operation if it does not match the current stored value.","examples":["lsndfkjsndfkjnsdfkjnsd=="],"minLength":1},"name":{"type":"string","description":"The name of the entity. Must be unique within the catalog at any given point in time, for any given namespace + kind pair.","examples":["metadata-proxy"],"minLength":1},"namespace":{"type":"string","description":"The namespace that the entity belongs to.","default":"default","examples":["default","admin"],"minLength":1},"title":{"type":"string","description":"A display name of the entity, to be presented in user interfaces instead of the name property, when available.","examples":["React SSR Template"],"minLength":1},"description":{"type":"string","description":"A short (typically relatively few words, on one line) description of the entity."},"labels":{"type":"object","description":"Key/value pairs of identifying information attached to the entity.","additionalProperties":true,"patternProperties":{"^.+$":{"type":"string"}}},"annotations":{"type":"object","description":"Key/value pairs of non-identifying auxiliary information attached to the entity.","additionalProperties":true,"patternProperties":{"^.+$":{"type":"string"}}},"tags":{"type":"array","description":"A list of single-valued strings, to for example classify catalog entities in various ways.","items":{"type":"string","minLength":1}},"links":{"type":"array","description":"A list of external hyperlinks related to the entity. Links can provide additional contextual information that may be located outside of Backstage itself. For example, an admin dashboard or external CMS page.","items":{"type":"object","required":["url"],"properties":{"url":{"type":"string","description":"A url in a standard uri format.","examples":["https://admin.example-org.com"],"minLength":1},"title":{"type":"string","description":"A user friendly display name for the link.","examples":["Admin Dashboard"],"minLength":1},"icon":{"type":"string","description":"A key representing a visual icon to be displayed in the UI.","examples":["dashboard"],"minLength":1}}}}}}'),P=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"common","type":"object","description":"Common definitions to import from other schemas","definitions":{"reference":{"$id":"#reference","type":"object","description":"A reference by name to another entity.","required":["kind","namespace","name"],"additionalProperties":false,"properties":{"kind":{"type":"string","description":"The kind field of the entity.","minLength":1},"namespace":{"type":"string","description":"The metadata.namespace field of the entity.","minLength":1},"name":{"type":"string","description":"The metadata.name field of the entity.","minLength":1}}},"relation":{"$id":"#relation","type":"object","description":"A directed relation from one entity to another.","required":["type","target"],"additionalProperties":false,"properties":{"type":{"type":"string","minLength":1,"pattern":"^\\\\w+$","description":"The type of relation."},"target":{"$ref":"#reference"}}},"status":{"$id":"#status","type":"object","description":"The current status of the entity, as claimed by various sources.","required":[],"additionalProperties":true,"properties":{"items":{"type":"array","items":{"$ref":"#statusItem"}}}},"statusItem":{"$id":"#statusItem","type":"object","description":"A specific status item on a well known format.","required":["type","level","message"],"additionalProperties":true,"properties":{"type":{"type":"string","minLength":1},"level":{"$ref":"#statusLevel","description":"The status level / severity of the status item."},"message":{"type":"string","description":"A brief message describing the status, intended for human consumption."},"error":{"$ref":"#error","description":"An optional serialized error object related to the status."}}},"statusLevel":{"$id":"#statusLevel","type":"string","description":"A status level / severity.","enum":["info","warning","error"]},"error":{"$id":"#error","type":"object","description":"A serialized error object.","required":["name","message"],"additionalProperties":true,"properties":{"name":{"type":"string","examples":["Error","InputError"],"description":"The type name of the error","minLength":1},"message":{"type":"string","description":"The message of the error"},"code":{"type":"string","description":"An error code associated with the error"},"stack":{"type":"string","description":"An error stack trace"}}}}}');const x=new Map,T=[m,g,R,P];function X($){if(!($!=null&&$.length))throw new TypeError("Unknown error");const C=$[0];throw new TypeError(`${C.instancePath||"<root>"} ${C.message}${C.params?` - ${Object.entries(C.params).map(([V,ue])=>`${V}: ${ue}`).join(", ")}`:""}`)}function F($,C={}){var et;const V=(et=C==null?void 0:C.disableCache)!=null?et:!1,ue=V?"":JSON.stringify($);if(!V){const st=x.get(ue);if(st)return st}const ge=b($),me=new(h())({allowUnionTypes:!0,allErrors:!0,validateSchema:!0});ge.length&&me.addSchema(ge,void 0,void 0,!0);const Se=me.compile($);return V||x.set(ue,Se),Se}function b($){if(typeof $!="object")return[];const C=new Set;$.$id&&C.add($.$id);const V=new Array,ue=[$];for(;ue.length;){const ge=ue.pop();for(const me of D(ge))if(!C.has(me)){C.add(me);const Se=T.find(et=>et.$id===me);Se&&(V.push(Se),ue.push(Se))}}return V}function*D($){const C=[$];for(;C.length;){const V=C.pop();if(typeof V=="object"&&V)for(const[ue,ge]of Object.entries(V))ue==="$ref"&&typeof ge=="string"?yield ge.split("#")[0]:C.push(ge)}}function Z($){const C=compileAjvSchema($||entityEnvelopeSchema);return V=>{if(C(V)===!0)return V;throw throwAjvError(C.errors)}}function M($){const C=F($);return V=>{var me;if(C(V)===!0)return V;const ge=(me=C.errors)==null?void 0:me.filter(Se=>["/kind","/apiVersion"].includes(Se.instancePath));if((ge==null?void 0:ge.length)&&ge.every(Se=>Se.keyword==="enum"))return!1;throw X(C.errors)}}function K($){const C=compileAjvSchema($||entitySchema);return V=>{if(C(V)===!0)return V;throw throwAjvError(C.errors)}}class ae{static isValidApiVersion(C){return o.isValidPrefixAndOrSuffix(C,"/",o.isValidDnsSubdomain,V=>V.length>=1&&V.length<=63&&/^[a-z0-9A-Z]+$/.test(V))}static isValidKind(C){return typeof C=="string"&&C.length>=1&&C.length<=63&&/^[a-zA-Z][a-z0-9A-Z]*$/.test(C)}static isValidObjectName(C){return typeof C=="string"&&C.length>=1&&C.length<=63&&/^([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$/.test(C)}static isValidNamespace(C){return o.isValidDnsLabel(C)}static isValidLabelKey(C){return o.isValidPrefixAndOrSuffix(C,"/",o.isValidDnsSubdomain,ae.isValidObjectName)}static isValidLabelValue(C){return C===""||ae.isValidObjectName(C)}static isValidAnnotationKey(C){return o.isValidPrefixAndOrSuffix(C,"/",o.isValidDnsSubdomain,ae.isValidObjectName)}static isValidAnnotationValue(C){return typeof C=="string"}}const pe={isValidApiVersion:ae.isValidApiVersion,isValidKind:ae.isValidKind,isValidEntityName:ae.isValidObjectName,isValidNamespace:ae.isValidNamespace,isValidLabelKey:ae.isValidLabelKey,isValidLabelValue:ae.isValidLabelValue,isValidAnnotationKey:ae.isValidAnnotationKey,isValidAnnotationValue:ae.isValidAnnotationValue,isValidTag:$=>typeof $=="string"&&$.length>=1&&$.length<=63&&/^[a-z0-9:+#]+(\-[a-z0-9:+#]+)*$/.test($)};function Me($={}){return{...pe,...$}}class Ue{constructor(C=makeValidator()){oe(this,"validators");this.validators=C}async enforce(C){var Se,et,st,Ve,Je,ht,it;function V(we,w,y){if(w==null)throw new Error(`${we} must have a value`);let I;try{I=y(w)}catch(H){throw new Error(`${we} could not be validated, ${H}`)}if(!I){let H;switch(y.name){case"isValidLabelValue":case"isValidObjectName":H="a string that is sequences of [a-zA-Z0-9] separated by any of [-_.], at most 63 characters in total";break;case"isValidLabelKey":case"isValidApiVersion":case"isValidAnnotationKey":H="a valid prefix and/or suffix";break;case"isValidNamespace":case"isValidDnsLabel":H="a string that is sequences of [a-z0-9] separated by [-], at most 63 characters in total";break;case"isValidTag":H="a string that is sequences of [a-z0-9+#] separated by [-], at most 63 characters in total";break;case"isValidAnnotationValue":H="a string";break;case"isValidKind":H="a string that is a sequence of [a-zA-Z][a-z0-9A-Z], at most 63 characters in total";break;case"isValidUrl":H="a string that is a valid url";break;case"isValidString":case"isNonEmptyString":H="a non empty string";break;default:H=void 0;break}const Q=H?` expected ${H} but found "${w}".`:"";throw new Error(`"${we}" is not valid;${Q} To learn more about catalog file format, visit: https://github.com/backstage/backstage/blob/master/docs/architecture-decisions/adr002-default-catalog-file-format.md`)}}function ue(we,w,y){return w===void 0||V(we,w,y)}V("apiVersion",C.apiVersion,this.validators.isValidApiVersion),V("kind",C.kind,this.validators.isValidKind),V("metadata.name",C.metadata.name,this.validators.isValidEntityName),ue("metadata.namespace",C.metadata.namespace,this.validators.isValidNamespace);for(const[we,w]of Object.entries((Se=C.metadata.labels)!=null?Se:[]))V(`labels.${we}`,we,this.validators.isValidLabelKey),V(`labels.${we}`,w,this.validators.isValidLabelValue);for(const[we,w]of Object.entries((et=C.metadata.annotations)!=null?et:[]))V(`annotations.${we}`,we,this.validators.isValidAnnotationKey),V(`annotations.${we}`,w,this.validators.isValidAnnotationValue);const ge=(st=C.metadata.tags)!=null?st:[];for(let we=0;we<ge.length;++we)V(`tags.${we}`,ge[we],this.validators.isValidTag);const me=(Ve=C.metadata.links)!=null?Ve:[];for(let we=0;we<me.length;++we)V(`links.${we}.url`,(Je=me[we])==null?void 0:Je.url,CommonValidatorFunctions.isValidUrl),ue(`links.${we}.title`,(ht=me[we])==null?void 0:ht.title,CommonValidatorFunctions.isNonEmptyString),ue(`links.${we}.icon`,(it=me[we])==null?void 0:it.icon,KubernetesValidatorFunctions.isValidObjectName);return C}}class de{constructor(){oe(this,"validate")}async enforce(C){if(!this.validate){const ge=new Ajv({allowUnionTypes:!0});this.validate=ge.addSchema([commonSchema,entityMetaSchema],void 0,void 0,!0).compile(entitySchema)}if(this.validate(C)===!0)return C;const[ue]=this.validate.errors||[];throw ue?new Error(`Malformed envelope, ${ue.instancePath||"<root>"} ${ue.message}`):new Error("Malformed envelope, Unknown error")}}function je($){let C=$.indexOf(":");const V=$.indexOf("/");V!==-1&&V<C&&(C=-1);const ue=C===-1?void 0:$.slice(0,C),ge=V===-1?void 0:$.slice(C+1,V),me=$.slice(Math.max(C+1,V+1));if(ue===""||ge===""||me==="")throw new TypeError(`Entity reference "${$}" was not on the form [<kind>:][<namespace>/]<name>`);return{kind:ue,namespace:ge,name:me}}function _e($){return{kind:$.kind,namespace:$.metadata.namespace||r,name:$.metadata.name}}function Qe($,C){var et,st,Ve,Je;if(!$)throw new Error("Entity reference must not be empty");const V=C==null?void 0:C.defaultKind,ue=(C==null?void 0:C.defaultNamespace)||r;let ge,me,Se;if(typeof $=="string"){const ht=je($);ge=(et=ht.kind)!=null?et:V,me=(st=ht.namespace)!=null?st:ue,Se=ht.name}else ge=(Ve=$.kind)!=null?Ve:V,me=(Je=$.namespace)!=null?Je:ue,Se=$.name;if(ge)if(me){if(!Se){const ht=JSON.stringify($);throw new Error(`Entity reference ${ht} had missing or empty name`)}}else{const ht=JSON.stringify($);throw new Error(`Entity reference ${ht} had missing or empty namespace`)}else{const ht=JSON.stringify($);throw new Error(`Entity reference ${ht} had missing or empty kind (e.g. did not start with "component:" or similar)`)}return{kind:ge,namespace:me,name:Se}}function rt($){var ge,me;let C,V,ue;return"metadata"in $?(C=$.kind,V=(ge=$.metadata.namespace)!=null?ge:r,ue=$.metadata.name):(C=$.kind,V=(me=$.namespace)!=null?me:r,ue=$.name),`${C.toLocaleLowerCase("en-US")}:${V.toLocaleLowerCase("en-US")}/${ue.toLocaleLowerCase("en-US")}`}class ot{constructor(C){this.policies=C}async enforce(C){let V=C;for(const ue of this.policies){const ge=await ue.enforce(V);if(!ge)throw new Error(`Policy ${ue.constructor.name} did not return a result`);V=ge}return V}}class gt{constructor(C){this.policies=C}async enforce(C){for(const V of this.policies){const ue=await V.enforce(C);if(ue)return ue}throw new Error("The entity did not match any known policy")}}const Le={allOf($){return new ot($)},oneOf($){return new gt($)}};var Xe=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"ApiV1alpha1","description":"An API describes an interface that can be exposed by a component. The API can be defined in different formats, like OpenAPI, AsyncAPI, GraphQL, gRPC, or other formats.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"API","metadata":{"name":"artist-api","description":"Retrieve artist details","labels":{"product_name":"Random value Generator"},"annotations":{"docs":"https://github.com/..../tree/develop/doc"}},"spec":{"type":"openapi","lifecycle":"production","owner":"artist-relations-team","system":"artist-engagement-portal","definition":"openapi: \\"3.0.0\\"\\ninfo:..."}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1alpha1","backstage.io/v1beta1"]},"kind":{"enum":["API"]},"spec":{"type":"object","required":["type","lifecycle","owner","definition"],"properties":{"type":{"type":"string","description":"The type of the API definition.","examples":["openapi","asyncapi","graphql","grpc"],"minLength":1},"lifecycle":{"type":"string","description":"The lifecycle state of the API.","examples":["experimental","production","deprecated"],"minLength":1},"owner":{"type":"string","description":"An entity reference to the owner of the API.","examples":["artist-relations-team","user:john.johnson"],"minLength":1},"system":{"type":"string","description":"An entity reference to the system that the API belongs to.","minLength":1},"definition":{"type":"string","description":"The definition of the API, based on the format defined by the type.","minLength":1}}}}}]}');function Ye($){const C=M($);return{async check(V){return C(V)===V}}}const Rt=Ye(Xe);var pt=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"ComponentV1alpha1","description":"A Component describes a software component. It is typically intimately linked to the source code that constitutes the component, and should be what a developer may regard a \\"unit of software\\", usually with a distinct deployable or linkable artifact.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Component","metadata":{"name":"LoremService","description":"Creates Lorems like a pro.","labels":{"product_name":"Random value Generator"},"annotations":{"docs":"https://github.com/..../tree/develop/doc"}},"spec":{"type":"service","lifecycle":"production","owner":"tools"}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1alpha1","backstage.io/v1beta1"]},"kind":{"enum":["Component"]},"spec":{"type":"object","required":["type","lifecycle","owner"],"properties":{"type":{"type":"string","description":"The type of component.","examples":["service","website","library"],"minLength":1},"lifecycle":{"type":"string","description":"The lifecycle state of the component.","examples":["experimental","production","deprecated"],"minLength":1},"owner":{"type":"string","description":"An entity reference to the owner of the component.","examples":["artist-relations-team","user:john.johnson"],"minLength":1},"system":{"type":"string","description":"An entity reference to the system that the component belongs to.","minLength":1},"subcomponentOf":{"type":"string","description":"An entity reference to another component of which the component is a part.","minLength":1},"providesApis":{"type":"array","description":"An array of entity references to the APIs that are provided by the component.","items":{"type":"string","minLength":1}},"consumesApis":{"type":"array","description":"An array of entity references to the APIs that are consumed by the component.","items":{"type":"string","minLength":1}},"dependsOn":{"type":"array","description":"An array of references to other entities that the component depends on to function.","items":{"type":"string","minLength":1}}}}}}]}');const St=Ye(pt);var lt=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"DomainV1alpha1","description":"A Domain groups a collection of systems that share terminology, domain models, business purpose, or documentation, i.e. form a bounded context.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Domain","metadata":{"name":"artists","description":"Everything about artists"},"spec":{"owner":"artist-relations-team"}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1alpha1","backstage.io/v1beta1"]},"kind":{"enum":["Domain"]},"spec":{"type":"object","required":["owner"],"properties":{"owner":{"type":"string","description":"An entity reference to the owner of the component.","examples":["artist-relations-team","user:john.johnson"],"minLength":1}}}}}]}');const yt=Ye(lt);var bt=JSON.parse(`{"$schema":"http://json-schema.org/draft-07/schema","$id":"GroupV1alpha1","description":"A group describes an organizational entity, such as for example a team, a business unit, or a loose collection of people in an interest group. Members of these groups are modeled in the catalog as kind User.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Group","metadata":{"name":"infrastructure","description":"The infra business unit"},"spec":{"type":"business-unit","profile":{"displayName":"Infrastructure","email":"infrastructure@example.com","picture":"https://example.com/groups/bu-infrastructure.jpeg"},"parent":"ops","children":["backstage","other"]}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1alpha1","backstage.io/v1beta1"]},"kind":{"enum":["Group"]},"spec":{"type":"object","required":["type","children"],"properties":{"type":{"type":"string","description":"The type of group. There is currently no enforced set of values for this field, so it is left up to the adopting organization to choose a nomenclature that matches their org hierarchy.","examples":["team","business-unit","product-area","root"],"minLength":1},"profile":{"type":"object","description":"Optional profile information about the group, mainly for display purposes. All fields of this structure are also optional. The email would be a group email of some form, that the group may wish to be used for contacting them. The picture is expected to be a URL pointing to an image that's representative of the group, and that a browser could fetch and render on a group page or similar.","properties":{"displayName":{"type":"string","description":"A simple display name to present to users.","examples":["Infrastructure"],"minLength":1},"email":{"type":"string","description":"An email where this entity can be reached.","examples":["infrastructure@example.com"],"minLength":1},"picture":{"type":"string","description":"The URL of an image that represents this entity.","examples":["https://example.com/groups/bu-infrastructure.jpeg"],"minLength":1}}},"parent":{"type":"string","description":"The immediate parent group in the hierarchy, if any. Not all groups must have a parent; the catalog supports multi-root hierarchies. Groups may however not have more than one parent. This field is an entity reference.","examples":["ops"],"minLength":1},"children":{"type":"array","description":"The immediate child groups of this group in the hierarchy (whose parent field points to this group). The list must be present, but may be empty if there are no child groups. The items are not guaranteed to be ordered in any particular way. The entries of this array are entity references.","items":{"type":"string","examples":["backstage","other"],"minLength":1}},"members":{"type":"array","description":"The users that are members of this group. The entries of this array are entity references.","items":{"type":"string","examples":["jdoe"],"minLength":1}}}}}}]}`);const Tt=Ye(bt);var Mt=JSON.parse(`{"$schema":"http://json-schema.org/draft-07/schema","$id":"LocationV1alpha1","description":"A location is a marker that references other places to look for catalog data.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Location","metadata":{"name":"org-data"},"spec":{"type":"url","targets":["http://github.com/myorg/myproject/org-data-dump/catalog-info-staff.yaml","http://github.com/myorg/myproject/org-data-dump/catalog-info-consultants.yaml"]}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1alpha1","backstage.io/v1beta1"]},"kind":{"enum":["Location"]},"spec":{"type":"object","required":[],"properties":{"type":{"type":"string","description":"The single location type, that's common to the targets specified in the spec. If it is left out, it is inherited from the location type that originally read the entity data.","examples":["url"],"minLength":1},"target":{"type":"string","description":"A single target as a string. Can be either an absolute path/URL (depending on the type), or a relative path such as ./details/catalog-info.yaml which is resolved relative to the location of this Location entity itself.","examples":["./details/catalog-info.yaml"],"minLength":1},"targets":{"type":"array","description":"A list of targets as strings. They can all be either absolute paths/URLs (depending on the type), or relative paths such as ./details/catalog-info.yaml which are resolved relative to the location of this Location entity itself.","items":{"type":"string","examples":["./details/catalog-info.yaml","http://github.com/myorg/myproject/org-data-dump/catalog-info-staff.yaml"],"minLength":1}},"presence":{"type":"string","description":"Whether the presence of the location target is required and it should be considered an error if it can not be found","default":"required","examples":["required"],"enum":["required","optional"]}}}}}]}`);const Bt=Ye(Mt),It="ownedBy",ze="ownerOf",ct="consumesApi",ke="apiConsumedBy",Ct="providesApi",ut="apiProvidedBy",Et="dependsOn",q="dependencyOf",N="parentOf",ne="childOf",ce="memberOf",se="hasMember",Ee="partOf",Ze="hasPart";var $e=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"ResourceV1alpha1","description":"A resource describes the infrastructure a system needs to operate, like BigTable databases, Pub/Sub topics, S3 buckets or CDNs. Modelling them together with components and systems allows to visualize resource footprint, and create tooling around them.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Resource","metadata":{"name":"artists-db","description":"Stores artist details"},"spec":{"type":"database","owner":"artist-relations-team","system":"artist-engagement-portal"}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1alpha1","backstage.io/v1beta1"]},"kind":{"enum":["Resource"]},"spec":{"type":"object","required":["type","owner"],"properties":{"type":{"type":"string","description":"The type of resource.","examples":["database","s3-bucket","cluster"],"minLength":1},"owner":{"type":"string","description":"An entity reference to the owner of the resource.","examples":["artist-relations-team","user:john.johnson"],"minLength":1},"dependsOn":{"type":"array","description":"An array of references to other entities that the resource depends on to function.","items":{"type":"string","minLength":1}},"system":{"type":"string","description":"An entity reference to the system that the resource belongs to.","minLength":1}}}}}]}');const at=Ye($e);var te=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"SystemV1alpha1","description":"A system is a collection of resources and components. The system may expose or consume one or several APIs. It is viewed as abstraction level that provides potential consumers insights into exposed features without needing a too detailed view into the details of all components. This also gives the owning team the possibility to decide about published artifacts and APIs.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"System","metadata":{"name":"artist-engagement-portal","description":"Handy tools to keep artists in the loop"},"spec":{"owner":"artist-relations-team","domain":"artists"}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1alpha1","backstage.io/v1beta1"]},"kind":{"enum":["System"]},"spec":{"type":"object","required":["owner"],"properties":{"owner":{"type":"string","description":"An entity reference to the owner of the component.","examples":["artist-relations-team","user:john.johnson"],"minLength":1},"domain":{"type":"string","description":"An entity reference to the domain that the system belongs to.","examples":["artists"],"minLength":1}}}}}]}');const Y=Ye(te);var z=JSON.parse(`{"$schema":"http://json-schema.org/draft-07/schema","$id":"UserV1alpha1","description":"A user describes a person, such as an employee, a contractor, or similar. Users belong to Group entities in the catalog. These catalog user entries are connected to the way that authentication within the Backstage ecosystem works. See the auth section of the docs for a discussion of these concepts.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"User","metadata":{"name":"jdoe"},"spec":{"profile":{"displayName":"Jenny Doe","email":"jenny-doe@example.com","picture":"https://example.com/staff/jenny-with-party-hat.jpeg"},"memberOf":["team-b","employees"]}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1alpha1","backstage.io/v1beta1"]},"kind":{"enum":["User"]},"spec":{"type":"object","required":["memberOf"],"properties":{"profile":{"type":"object","description":"Optional profile information about the user, mainly for display purposes. All fields of this structure are also optional. The email would be a primary email of some form, that the user may wish to be used for contacting them. The picture is expected to be a URL pointing to an image that's representative of the user, and that a browser could fetch and render on a profile page or similar.","properties":{"displayName":{"type":"string","description":"A simple display name to present to users.","examples":["Jenny Doe"],"minLength":1},"email":{"type":"string","description":"An email where this user can be reached.","examples":["jenny-doe@example.com"],"minLength":1},"picture":{"type":"string","description":"The URL of an image that represents this user.","examples":["https://example.com/staff/jenny-with-party-hat.jpeg"],"minLength":1}}},"memberOf":{"type":"array","description":"The list of groups that the user is a direct member of (i.e., no transitive memberships are listed here). The list must be present, but may be empty if the user is not member of any groups. The items are not guaranteed to be ordered in any particular way. The entries of this array are entity references.","items":{"type":"string","examples":["team-b","employees"],"minLength":1}}}}}}]}`);const ie=Ye(z),Te="backstage.io/managed-by-location",Oe="backstage.io/managed-by-origin-location",ve="backstage.io/source-location";function De($){if(typeof $!="string")throw new TypeError(`Unable to parse location ref '${$}', unexpected argument ${typeof $}`);const C=$.indexOf(":");if(C<0)throw new TypeError(`Unable to parse location ref '${$}', expected '<type>:<target>', e.g. 'url:https://host/path'`);const V=$.substring(0,C).trim(),ue=$.substring(C+1).trim();if(!V||!ue)throw new TypeError(`Unable to parse location ref '${$}', expected '<type>:<target>', e.g. 'url:https://host/path'`);if(V==="http"||V==="https")throw new TypeError(`Invalid location ref '${$}', please prefix it with 'url:', e.g. 'url:${$}'`);return{type:V,target:ue}}function vt($){const{type:C,target:V}=$;if(C){if(!V)throw new TypeError("Unable to stringify location ref, empty target")}else throw new TypeError("Unable to stringify location ref, empty type");return`${C}:${V}`}function Lt($){var V,ue,ge,me,Se;const C=(Se=(ue=(V=$.metadata)==null?void 0:V.annotations)==null?void 0:ue[ANNOTATION_SOURCE_LOCATION])!=null?Se:(me=(ge=$.metadata)==null?void 0:ge.annotations)==null?void 0:me[ANNOTATION_LOCATION];if(!C)throw new Error(`Entity '${stringifyEntityRef($)}' is missing location`);return De(C)}},23235:function(_,s,e){"use strict";e.d(s,{C:function(){return t}});var r=e(98005);class t{constructor(){oe(this,"subject",new r.J)}post(f){this.subject.next(f)}alert$(){return this.subject}}},47150:function(_,s,e){"use strict";e.d(s,{g:function(){return r}});class r{captureEvent(l){}}},58652:function(_,s,e){"use strict";e.d(s,{C:function(){return l}});var r=e(98005);const t="theme";class l{constructor(E){oe(this,"activeThemeId");oe(this,"subject",new r.X(void 0));this.themes=E}static createWithStorage(E){var m;const i=new l(E);if(!window.localStorage)return i;const o=(m=window.localStorage.getItem(t))!=null?m:void 0;return i.setActiveThemeId(o),i.activeThemeId$().subscribe(u=>{u?window.localStorage.setItem(t,u):window.localStorage.removeItem(t)}),window.addEventListener("storage",u=>{var h;if(u.key===t){const g=(h=localStorage.getItem(t))!=null?h:void 0;i.setActiveThemeId(g)}}),i}getInstalledThemes(){return this.themes.slice()}activeThemeId$(){return this.subject}getActiveThemeId(){return this.activeThemeId}setActiveThemeId(E){this.activeThemeId=E,this.subject.next(E)}}},14721:function(_,s,e){"use strict";e.d(s,{m:function(){return u}});var r=e(9850),t=e.n(r),l=e(12782),f=e.n(l);const E=/^[a-z][a-z0-9]*(?:[-_][a-z][a-z0-9]*)*$/i;function i(h){return typeof h=="object"&&h!==null&&!Array.isArray(h)}function o(h){if(h===null)return"null";if(Array.isArray(h))return"array";const g=typeof h;return g==="number"&&isNaN(h)?"nan":g==="string"&&h===""?"empty-string":g}const m={type(h,g,R,P){return`Invalid type in config for key '${h}' in '${g}', got ${R}, wanted ${P}`},missing(h){return`Missing required config value at '${h}'`},convert(h,g,R){return`Unable to convert config value for key '${h}' in '${g}' to a ${R}`}};class u{constructor(g,R="mock-config",P,x=""){oe(this,"filteredKeys");oe(this,"notifiedFilteredKeys",new Set);this.data=g,this.context=R,this.fallback=P,this.prefix=x}static fromConfigs(g){return g.length===0?new u(void 0):g.reduce((R,{data:P,context:x,filteredKeys:T,deprecatedKeys:X})=>{const F=new u(P,x,R);if(F.filteredKeys=T,X)for(const{key:b,description:D}of X)console.warn(`The configuration key '${b}' of ${x} is deprecated and may be removed soon. ${D||""}`);return F},void 0)}has(g){var P,x;return this.readValue(g)!==void 0?!0:(x=(P=this.fallback)==null?void 0:P.has(g))!=null?x:!1}keys(){var P,x;const g=this.data?Object.keys(this.data):[],R=(x=(P=this.fallback)==null?void 0:P.keys())!=null?x:[];return[...new Set([...g,...R])]}get(g){const R=this.getOptional(g);if(R===void 0)throw new Error(m.missing(this.fullKey(g!=null?g:"")));return R}getOptional(g){var x;const R=t()(this.readValue(g)),P=(x=this.fallback)==null?void 0:x.getOptional(g);return R===void 0?P:P===void 0?R:f()({},{value:P},{value:R},(T,X)=>!i(X)||!i(T)?X:void 0).value}getConfig(g){const R=this.getOptionalConfig(g);if(R===void 0)throw new Error(m.missing(this.fullKey(g)));return R}getOptionalConfig(g){var x;const R=this.readValue(g),P=(x=this.fallback)==null?void 0:x.getOptionalConfig(g);if(i(R))return this.copy(R,g,P);if(R!==void 0)throw new TypeError(m.type(this.fullKey(g),this.context,o(R),"object"));return P}getConfigArray(g){const R=this.getOptionalConfigArray(g);if(R===void 0)throw new Error(m.missing(this.fullKey(g)));return R}getOptionalConfigArray(g){const R=this.readConfigValue(g,P=>{if(!Array.isArray(P))return{expected:"object-array"};for(const[x,T]of P.entries())if(!i(T))return{expected:"object-array",value:T,key:`${g}[${x}]`};return!0});if(!!R)return R.map((P,x)=>this.copy(P,`${g}[${x}]`))}getNumber(g){const R=this.getOptionalNumber(g);if(R===void 0)throw new Error(m.missing(this.fullKey(g)));return R}getOptionalNumber(g){const R=this.readConfigValue(g,x=>typeof x=="number"||typeof x=="string"||{expected:"number"});if(typeof R=="number"||R===void 0)return R;const P=Number(R);if(!Number.isFinite(P))throw new Error(m.convert(this.fullKey(g),this.context,"number"));return P}getBoolean(g){const R=this.getOptionalBoolean(g);if(R===void 0)throw new Error(m.missing(this.fullKey(g)));return R}getOptionalBoolean(g){return this.readConfigValue(g,R=>typeof R=="boolean"||{expected:"boolean"})}getString(g){const R=this.getOptionalString(g);if(R===void 0)throw new Error(m.missing(this.fullKey(g)));return R}getOptionalString(g){return this.readConfigValue(g,R=>typeof R=="string"&&R!==""||{expected:"string"})}getStringArray(g){const R=this.getOptionalStringArray(g);if(R===void 0)throw new Error(m.missing(this.fullKey(g)));return R}getOptionalStringArray(g){return this.readConfigValue(g,R=>{if(!Array.isArray(R))return{expected:"string-array"};for(const[P,x]of R.entries())if(typeof x!="string"||x==="")return{expected:"string-array",value:x,key:`${g}[${P}]`};return!0})}fullKey(g){return`${this.prefix}${this.prefix?".":""}${g}`}copy(g,R,P){const x=new u(g,this.context,P,this.fullKey(R));return x.filteredKeys=this.filteredKeys,x}readConfigValue(g,R){var T;const P=this.readValue(g);if(P===void 0)return(T=this.fallback)==null?void 0:T.readConfigValue(g,R);const x=R(P);if(x!==!0){const{key:X=g,value:F=P,expected:b}=x;throw new TypeError(m.type(this.fullKey(X),this.context,o(F),b))}return P}readValue(g){const R=g?g.split("."):[];for(const x of R)if(!E.test(x))throw new TypeError(`Invalid config key '${g}'`);if(this.data===void 0)return;let P=this.data;for(const[x,T]of R.entries())if(i(P))P=P[T];else if(P!==void 0){const X=this.fullKey(R.slice(0,x).join("."));throw new TypeError(m.type(X,this.context,o(P),"object"))}return P}}},4333:function(_,s,e){"use strict";e.d(s,{p:function(){return t}});const r="Invalid discovery URL pattern,";class t{static compile(f){const E=f.split(/\{\{\s*pluginId\s*\}\}/),i=E.join("pluginId");let o;try{o=new URL(i)}catch{throw new Error(`${r} URL '${i}' is invalid`)}if(o.hash)throw new Error(`${r} URL must not have a hash`);if(o.search)throw new Error(`${r} URL must not have a query`);if(i.endsWith("/"))throw new Error(`${r} URL must not end with a slash`);return new t(E)}constructor(f){this.parts=f}async getBaseUrl(f){return this.parts.join(f)}}},89536:function(_,s,e){"use strict";e.d(s,{KN:function(){return r},gr:function(){return l},Jv:function(){return f}});class r{constructor(i,o){this.alertApi=i,this.errorApi=o}post(i,o){return o!=null&&o.hidden||this.alertApi.post({message:i.message,severity:"error"}),this.errorApi.post(i,o)}error$(){return this.errorApi.error$()}}var t=e(98005);class l{constructor(){oe(this,"subject",new t.J)}post(i,o){this.subject.next({error:i,context:o})}error$(){return this.subject}}class f{static forward(i,o){window.addEventListener("unhandledrejection",m=>{i.post(m.reason,o)})}}},14884:function(_,s,e){"use strict";e.d(s,{b:function(){return l}});var r=e(36964);function t(f){if(f.length<3)throw new Error(`The '${f}' feature flag must have a minimum length of three characters.`);if(f.length>150)throw new Error(`The '${f}' feature flag must not exceed 150 characters.`);if(!f.match(/^[a-z]+[a-z0-9-]+$/))throw new Error(`The '${f}' feature flag must start with a lowercase letter and only contain lowercase letters, numbers and hyphens. Examples: feature-flag-one, alpha, release-2020`)}class l{constructor(){oe(this,"registeredFeatureFlags",[]);oe(this,"flags")}registerFlag(E){t(E.name),this.registeredFeatureFlags.push(E)}getRegisteredFlags(){return this.registeredFeatureFlags.slice()}isActive(E){return this.flags||(this.flags=this.load()),this.flags.get(E)===r.FeatureFlagState.Active}save(E){this.flags||(this.flags=this.load()),E.merge||this.flags.clear();for(const[o,m]of Object.entries(E.states))this.flags.set(o,m);const i=Array.from(this.flags.entries()).filter(([,o])=>o===r.FeatureFlagState.Active);window.localStorage.setItem("featureFlags",JSON.stringify(Object.fromEntries(i)))}load(){try{const E=window.localStorage.getItem("featureFlags");if(!E)return new Map;const i=JSON.parse(E);if(typeof i!="object"||i===null||Array.isArray(i))return new Map;const o=Object.entries(i).filter(([m,u])=>(t(m),u===r.FeatureFlagState.Active));return new Map(o)}catch{return new Map}}}},50160:function(_,s,e){"use strict";e.d(s,{I:function(){return o},j:function(){return r}});function r(m){var g;let u=m.baseImplementation||e.g.fetch;const h=[(g=m.middleware)!=null?g:[]].flat().reverse();for(const R of h)u=R.apply(u);return{fetch:u}}class t{static create(u){var P,x;const h=l(u),g=((P=u.header)==null?void 0:P.name)||"authorization",R=((x=u.header)==null?void 0:x.value)||(T=>`Bearer ${T}`);return new t(u.identityApi,h,g,R)}constructor(u,h,g,R){this.identityApi=u,this.allowUrl=h,this.headerName=g,this.headerValue=R}apply(u){return async(h,g)=>{const R=new Request(h,g),{token:P}=await this.identityApi.getCredentials();return R.headers.get(this.headerName)||typeof P!="string"||!P||!this.allowUrl(R.url)?u(h,g):(R.headers.set(this.headerName,this.headerValue(P)),u(R))}}}function l(m){return m.allowUrl?m.allowUrl:m.urlPrefixAllowlist?f(m.urlPrefixAllowlist):m.config?f([m.config.getString("backend.baseUrl")]):()=>!1}function f(m){const u=m.map(h=>h.replace(/\/$/,""));return h=>u.some(g=>h===g||h.startsWith(`${g}/`))}function E(m,u){return!u||u==="/"?m:`${m.replace(/\/$/,"")}/${u.replace(/^\//,"")}`}class i{constructor(u){this.discoveryApi=u}apply(u){return async(h,g)=>{const R=new Request(h,g),P="plugin://";if(!R.url.startsWith(P))return u(h,g);const{hostname:x,pathname:T,search:X,hash:F,username:b,password:D}=new URL(`http://${R.url.substring(P.length)}`);let Z=await this.discoveryApi.getBaseUrl(x);if(b||D){const K=new URL(Z),ae=`${b}${D?`:${D}`:""}@`;Z=`${K.protocol}//${ae}${K.host}${K.pathname}`}const M=`${E(Z,T)}${X}${F}`;return u(M,typeof h=="string"?g:h)}}}class o{static resolvePluginProtocol(u){return new i(u.discoveryApi)}static injectIdentityAuth(u){return t.create(u)}constructor(){}}},11358:function(_,s,e){"use strict";e.d(s,{Y:function(){return E}});var r=e(98005);function t(i,o){for(const m of o)if(!i.has(m))return!1;return!0}function l(i,...o){const m=new Set(i);for(const u of o)for(const h of u)m.add(h);return m}class f{constructor(){oe(this,"requests",[]);oe(this,"subject",new r.X(this.getCurrentPending()))}request(o){return new Promise((m,u)=>{this.requests.push({scopes:o,resolve:m,reject:u}),this.subject.next(this.getCurrentPending())})}resolve(o,m){this.requests=this.requests.filter(u=>t(o,u.scopes)?(u.resolve(m),!1):!0),this.subject.next(this.getCurrentPending())}reject(o){this.requests.forEach(m=>m.reject(o)),this.requests=[],this.subject.next(this.getCurrentPending())}pending(){return this.subject}getCurrentPending(){const o=this.requests.length===0?void 0:this.requests.slice(1).reduce((m,u)=>l(m,u.scopes),this.requests[0].scopes);return{scopes:o,resolve:m=>{o&&this.resolve(o,m)},reject:m=>{o&&this.reject(m)}}}}class E{constructor(){oe(this,"subject",new r.X([]));oe(this,"currentRequests",[]);oe(this,"handlerCount",0)}createAuthRequester(o){const m=new f,u=this.handlerCount;return this.handlerCount++,m.pending().subscribe({next:h=>{const g=this.currentRequests.slice(),R=this.makeAuthRequest(h,o);R?g[u]=R:delete g[u],this.currentRequests=g,this.subject.next(g.filter(Boolean))}}),h=>m.request(h)}makeAuthRequest(o,m){const{scopes:u}=o;if(!!u)return{provider:m.provider,trigger:async()=>{const h=await m.onAuthRequest(u);o.resolve(h)},reject:()=>{const h=new Error("Login failed, rejected by user");h.name="RejectedError",o.reject(h)}}}authRequest$(){return this.subject}}},56054:function(_,s,e){"use strict";e.d(s,{C:function(){return f}});var r=e(82394),t=e.n(r);const l=new Map;class f{constructor(i,o){oe(this,"subscribers",new Set);oe(this,"observable",new(t())(i=>(this.subscribers.add(i),()=>{this.subscribers.delete(i)})));this.namespace=i,this.errorApi=o}static create(i){var o;return new f((o=i.namespace)!=null?o:"",i.errorApi)}get(i){return this.snapshot(i).value}snapshot(i){let o,m="absent";try{const u=localStorage.getItem(this.getKeyName(i));u&&(o=JSON.parse(u,(h,g)=>(typeof g=="object"&&g!==null&&Object.freeze(g),g)),m="present")}catch{this.errorApi.post(new Error(`Error when parsing JSON config from storage for: ${i}`))}return{key:i,value:o,presence:m}}forBucket(i){const o=`${this.namespace}/${i}`;return l.has(o)||l.set(o,new f(o,this.errorApi)),l.get(o)}async set(i,o){localStorage.setItem(this.getKeyName(i),JSON.stringify(o)),this.notifyChanges(i)}async remove(i){localStorage.removeItem(this.getKeyName(i)),this.notifyChanges(i)}observe$(i){return this.observable.filter(({key:o})=>o===i)}getKeyName(i){return`${this.namespace}/${encodeURIComponent(i)}`}notifyChanges(i){const o=this.snapshot(i);for(const m of this.subscribers)m.next(o)}}},59589:function(_,s,e){"use strict";e.d(s,{u:function(){return l}});var r=e(91205);const t={id:"atlassian",title:"Atlassian",icon:()=>null};class l{static create(E){const{discoveryApi:i,environment:o="development",provider:m=t,oauthRequestApi:u}=E;return r.OAuth2.create({discoveryApi:i,oauthRequestApi:u,provider:m,environment:o})}}},6098:function(_,s,e){"use strict";e.d(s,{Z:function(){return l}});var r=e(91205);const t={id:"bitbucket",title:"Bitbucket",icon:()=>null};class l{static create(E){const{discoveryApi:i,environment:o="development",provider:m=t,oauthRequestApi:u,defaultScopes:h=["team"]}=E;return r.OAuth2.create({discoveryApi:i,oauthRequestApi:u,provider:m,environment:o,defaultScopes:h})}}},44431:function(_,s,e){"use strict";e.d(s,{BitbucketAuth:function(){return l.Z}});var r=e(19347),t=e.n(r);e.o(r,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return r.AlertApiForwarder}}),e.o(r,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return r.AppThemeSelector}}),e.o(r,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return r.AtlassianAuth}}),e.o(r,"ConfigReader")&&e.d(s,{ConfigReader:function(){return r.ConfigReader}}),e.o(r,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return r.ErrorAlerter}}),e.o(r,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return r.ErrorApiForwarder}}),e.o(r,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return r.FetchMiddlewares}}),e.o(r,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return r.FlatRoutes}}),e.o(r,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return r.LocalStorageFeatureFlags}}),e.o(r,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return r.NoOpAnalyticsApi}}),e.o(r,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return r.OAuthRequestManager}}),e.o(r,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return r.UnhandledErrorForwarder}}),e.o(r,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return r.UrlPatternDiscovery}}),e.o(r,"WebStorage")&&e.d(s,{WebStorage:function(){return r.WebStorage}}),e.o(r,"createFetchApi")&&e.d(s,{createFetchApi:function(){return r.createFetchApi}}),e.o(r,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return r.createSpecializedApp}}),e.o(r,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return r.defaultConfigLoader}});var l=e(6098)},19347:function(){},44474:function(_,s,e){"use strict";e.d(s,{T:function(){return l}});var r=e(91205);const t={id:"github",title:"GitHub",icon:()=>null};class l{static create(E){const{discoveryApi:i,environment:o="development",provider:m=t,oauthRequestApi:u,defaultScopes:h=["read:user"]}=E;return r.OAuth2.create({discoveryApi:i,oauthRequestApi:u,provider:m,environment:o,defaultScopes:h})}}},2922:function(_,s,e){"use strict";e.d(s,{a:function(){return l}});var r=e(91205);const t={id:"gitlab",title:"GitLab",icon:()=>null};class l{static create(E){const{discoveryApi:i,environment:o="development",provider:m=t,oauthRequestApi:u,defaultScopes:h=["read_user"]}=E;return r.OAuth2.create({discoveryApi:i,oauthRequestApi:u,provider:m,environment:o,defaultScopes:h})}}},59938:function(_,s,e){"use strict";e.d(s,{e:function(){return f}});var r=e(91205);const t={id:"google",title:"Google",icon:()=>null},l="https://www.googleapis.com/auth/";class f{static create(i){const{discoveryApi:o,oauthRequestApi:m,environment:u="development",provider:h=t,defaultScopes:g=["openid",`${l}userinfo.email`,`${l}userinfo.profile`]}=i;return r.OAuth2.create({discoveryApi:o,oauthRequestApi:m,provider:h,environment:u,defaultScopes:g,scopeTransform(R){return R.map(P=>P==="openid"?P:P==="profile"||P==="email"?`${l}userinfo.${P}`:P.startsWith(l)?P:`${l}${P}`)}})}}},91668:function(_,s,e){"use strict";e.d(s,{AtlassianAuth:function(){return h.u},BitbucketAuth:function(){return u.BitbucketAuth},GithubAuth:function(){return r.T},GitlabAuth:function(){return t.a},GoogleAuth:function(){return l.e},MicrosoftAuth:function(){return o._},OktaAuth:function(){return E.s},OneLoginAuth:function(){return m.$}});var r=e(44474),t=e(2922),l=e(59938),f=e(91205);e.o(f,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return f.AlertApiForwarder}}),e.o(f,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return f.AppThemeSelector}}),e.o(f,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return f.AtlassianAuth}}),e.o(f,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return f.BitbucketAuth}}),e.o(f,"ConfigReader")&&e.d(s,{ConfigReader:function(){return f.ConfigReader}}),e.o(f,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return f.ErrorAlerter}}),e.o(f,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return f.ErrorApiForwarder}}),e.o(f,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return f.FetchMiddlewares}}),e.o(f,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return f.FlatRoutes}}),e.o(f,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return f.LocalStorageFeatureFlags}}),e.o(f,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return f.MicrosoftAuth}}),e.o(f,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return f.NoOpAnalyticsApi}}),e.o(f,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return f.OAuthRequestManager}}),e.o(f,"OktaAuth")&&e.d(s,{OktaAuth:function(){return f.OktaAuth}}),e.o(f,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return f.OneLoginAuth}}),e.o(f,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return f.UnhandledErrorForwarder}}),e.o(f,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return f.UrlPatternDiscovery}}),e.o(f,"WebStorage")&&e.d(s,{WebStorage:function(){return f.WebStorage}}),e.o(f,"createFetchApi")&&e.d(s,{createFetchApi:function(){return f.createFetchApi}}),e.o(f,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return f.createSpecializedApp}}),e.o(f,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return f.defaultConfigLoader}});var E=e(26079),i=e(67604),o=e(38482),m=e(58381),u=e(44431);e.o(u,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return u.AlertApiForwarder}}),e.o(u,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return u.AppThemeSelector}}),e.o(u,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return u.AtlassianAuth}}),e.o(u,"ConfigReader")&&e.d(s,{ConfigReader:function(){return u.ConfigReader}}),e.o(u,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return u.ErrorAlerter}}),e.o(u,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return u.ErrorApiForwarder}}),e.o(u,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return u.FetchMiddlewares}}),e.o(u,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return u.FlatRoutes}}),e.o(u,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return u.LocalStorageFeatureFlags}}),e.o(u,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return u.NoOpAnalyticsApi}}),e.o(u,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return u.OAuthRequestManager}}),e.o(u,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return u.UnhandledErrorForwarder}}),e.o(u,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return u.UrlPatternDiscovery}}),e.o(u,"WebStorage")&&e.d(s,{WebStorage:function(){return u.WebStorage}}),e.o(u,"createFetchApi")&&e.d(s,{createFetchApi:function(){return u.createFetchApi}}),e.o(u,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return u.createSpecializedApp}}),e.o(u,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return u.defaultConfigLoader}});var h=e(59589)},38482:function(_,s,e){"use strict";e.d(s,{_:function(){return l}});var r=e(91205);const t={id:"microsoft",title:"Microsoft",icon:()=>null};class l{static create(E){const{environment:i="development",provider:o=t,oauthRequestApi:m,discoveryApi:u,defaultScopes:h=["openid","offline_access","profile","email","User.Read"]}=E;return r.OAuth2.create({discoveryApi:u,oauthRequestApi:m,provider:o,environment:i,defaultScopes:h})}}},73124:function(_,s,e){"use strict";e.d(s,{Z:function(){return i}});function r(o){return new Promise((m,u)=>{const h=o.width||500,g=o.height||700,R=window.screen.width/2-h/2,P=window.screen.height/2-g/2,x=window.open(o.url,o.name,`menubar=no,location=no,resizable=no,scrollbars=no,status=no,width=${h},height=${g},top=${P},left=${R}`);let T="";if(!x||typeof x.closed=="undefined"||x.closed){const D=new Error("Failed to open auth popup.");D.name="PopupRejectedError",u(D);return}const X=D=>{if(D.source!==x||D.origin!==o.origin)return;const{data:Z}=D;if(Z.type==="config_info"){T=Z.targetOrigin;return}if(Z.type!=="authorization_response")return;const M=Z;if("error"in M){const K=new Error(M.error.message);K.name=M.error.name,u(K)}else m(M.response);b()},F=setInterval(()=>{if(x.closed){const D=`Login failed, ${T&&T!==window.location.origin?`Incorrect app origin, expected ${T}`:"popup was closed"}`,Z=new Error(D);Z.name="PopupClosedError",u(Z),b()}},100);function b(){window.removeEventListener("message",X),clearInterval(F)}window.addEventListener("message",X)})}function t(o){return[...o].join(" ")}class l{constructor(m){oe(this,"discoveryApi");oe(this,"environment");oe(this,"provider");oe(this,"joinScopesFunc");oe(this,"authRequester");oe(this,"sessionTransform");const{discoveryApi:u,environment:h,provider:g,joinScopes:R=t,oauthRequestApi:P,sessionTransform:x=T=>T}=m;this.authRequester=P.createAuthRequester({provider:g,onAuthRequest:T=>this.showPopup(T)}),this.discoveryApi=u,this.environment=h,this.provider=g,this.joinScopesFunc=R,this.sessionTransform=x}async createSession(m){return m.instantPopup?this.showPopup(m.scopes):this.authRequester(m.scopes)}async refreshSession(){const m=await fetch(await this.buildUrl("/refresh",{optional:!0}),{headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(h=>{throw new Error(`Auth refresh request failed, ${h}`)});if(!m.ok){const h=new Error(`Auth refresh request failed, ${m.statusText}`);throw h.status=m.status,h}const u=await m.json();if(u.error){const h=new Error(u.error.message);throw u.error.name&&(h.name=u.error.name),h}return await this.sessionTransform(u)}async removeSession(){const m=await fetch(await this.buildUrl("/logout"),{method:"POST",headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(u=>{throw new Error(`Logout request failed, ${u}`)});if(!m.ok){const u=new Error(`Logout request failed, ${m.statusText}`);throw u.status=m.status,u}}async showPopup(m){const u=this.joinScopesFunc(m),h=await this.buildUrl("/start",{scope:u,origin:location.origin}),g=await r({url:h,name:`${this.provider.title} Login`,origin:new URL(h).origin,width:450,height:730});return await this.sessionTransform(g)}async buildUrl(m,u){const h=await this.discoveryApi.getBaseUrl("auth"),g=this.buildQueryString({...u,env:this.environment});return`${h}/${this.provider.id}${m}${g}`}buildQueryString(m){if(!m)return"";const u=Object.entries(m).map(([h,g])=>{if(typeof g=="string")return`${encodeURIComponent(h)}=${encodeURIComponent(g)}`;if(g)return encodeURIComponent(h)}).filter(Boolean).join("&");return u?`?${u}`:""}}var f=e(57018);const E={id:"oauth2",title:"Your Identity Provider",icon:()=>null};class i{constructor(m){oe(this,"sessionManager");oe(this,"scopeTransform");this.sessionManager=m.sessionManager,this.scopeTransform=m.scopeTransform}static create(m){const{discoveryApi:u,environment:h="development",provider:g=E,oauthRequestApi:R,defaultScopes:P=[],scopeTransform:x=F=>F}=m,T=new l({discoveryApi:u,environment:h,provider:g,oauthRequestApi:R,sessionTransform(F){return{...F,providerInfo:{idToken:F.providerInfo.idToken,accessToken:F.providerInfo.accessToken,scopes:i.normalizeScopes(x,F.providerInfo.scope),expiresAt:new Date(Date.now()+F.providerInfo.expiresInSeconds*1e3)}}}}),X=new f.RefreshingAuthSessionManager({connector:T,defaultScopes:new Set(P),sessionScopes:F=>F.providerInfo.scopes,sessionShouldRefresh:F=>(F.providerInfo.expiresAt.getTime()-Date.now())/1e3<60*5});return new i({sessionManager:X,scopeTransform:x})}async signIn(){await this.getAccessToken()}async signOut(){await this.sessionManager.removeSession()}sessionState$(){return this.sessionManager.sessionState$()}async getAccessToken(m,u){var R;const h=i.normalizeScopes(this.scopeTransform,m),g=await this.sessionManager.getSession({...u,scopes:h});return(R=g==null?void 0:g.providerInfo.accessToken)!=null?R:""}async getIdToken(m={}){var h;const u=await this.sessionManager.getSession(m);return(h=u==null?void 0:u.providerInfo.idToken)!=null?h:""}async getBackstageIdentity(m={}){const u=await this.sessionManager.getSession(m);return u==null?void 0:u.backstageIdentity}async getProfile(m={}){const u=await this.sessionManager.getSession(m);return u==null?void 0:u.profile}static normalizeScopes(m,u){if(!u)return new Set;const h=Array.isArray(u)?u:u.split(/[\s|,]/).filter(Boolean);return new Set(m(h))}}},91205:function(_,s,e){"use strict";e.d(s,{OAuth2:function(){return r.Z}});var r=e(73124),t=e(5973),l=e.n(t);e.o(t,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return t.AlertApiForwarder}}),e.o(t,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return t.AppThemeSelector}}),e.o(t,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return t.AtlassianAuth}}),e.o(t,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return t.BitbucketAuth}}),e.o(t,"ConfigReader")&&e.d(s,{ConfigReader:function(){return t.ConfigReader}}),e.o(t,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return t.ErrorAlerter}}),e.o(t,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return t.ErrorApiForwarder}}),e.o(t,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return t.FetchMiddlewares}}),e.o(t,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return t.FlatRoutes}}),e.o(t,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return t.LocalStorageFeatureFlags}}),e.o(t,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return t.MicrosoftAuth}}),e.o(t,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return t.NoOpAnalyticsApi}}),e.o(t,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return t.OAuthRequestManager}}),e.o(t,"OktaAuth")&&e.d(s,{OktaAuth:function(){return t.OktaAuth}}),e.o(t,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return t.OneLoginAuth}}),e.o(t,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return t.UnhandledErrorForwarder}}),e.o(t,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return t.UrlPatternDiscovery}}),e.o(t,"WebStorage")&&e.d(s,{WebStorage:function(){return t.WebStorage}}),e.o(t,"createFetchApi")&&e.d(s,{createFetchApi:function(){return t.createFetchApi}}),e.o(t,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return t.createSpecializedApp}}),e.o(t,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return t.defaultConfigLoader}})},5973:function(){},26079:function(_,s,e){"use strict";e.d(s,{s:function(){return E}});var r=e(91205);const t={id:"okta",title:"Okta",icon:()=>null},l=new Set(["openid","profile","email","phone","address","groups","offline_access"]),f="okta.";class E{static create(o){const{discoveryApi:m,environment:u="development",provider:h=t,oauthRequestApi:g,defaultScopes:R=["openid","email","profile","offline_access"]}=o;return r.OAuth2.create({discoveryApi:m,oauthRequestApi:g,provider:h,environment:u,defaultScopes:R,scopeTransform(P){return P.map(x=>l.has(x)||x.startsWith(f)?x:`${f}${x}`)}})}}},58381:function(_,s,e){"use strict";e.d(s,{$:function(){return E}});var r=e(91205);const t={id:"onelogin",title:"onelogin",icon:()=>null},l=new Set(["openid","profile","email","phone","address","groups","offline_access"]),f="onelogin.";class E{static create(o){const{discoveryApi:m,environment:u="development",provider:h=t,oauthRequestApi:g}=o;return r.OAuth2.create({discoveryApi:m,oauthRequestApi:g,provider:h,environment:u,defaultScopes:["openid","email","profile","offline_access"],scopeTransform(R){return R.map(P=>l.has(P)||P.startsWith(f)?P:`${f}${P}`)}})}}},67604:function(_,s,e){"use strict";var r=e(57018),t=e(30195);const l=t.z.object({profile:t.z.object({email:t.z.string().optional(),displayName:t.z.string().optional(),picture:t.z.string().optional()}),backstageIdentity:t.z.object({id:t.z.string(),token:t.z.string(),identity:t.z.object({type:t.z.literal("user"),userEntityRef:t.z.string(),ownershipEntityRefs:t.z.array(t.z.string())})})}),f={id:"saml",title:"SAML",icon:()=>null};class E{static create(o){const{discoveryApi:m,environment:u="development",provider:h=f}=o,g=new DirectAuthConnector({discoveryApi:m,environment:u,provider:h}),R=new StaticAuthSessionManager({connector:g}),P=new AuthSessionStore({manager:R,storageKey:`${h.id}Session`,schema:samlSessionSchema});return new E(P)}sessionState$(){return this.sessionManager.sessionState$()}constructor(o){this.sessionManager=o}async signIn(){await this.getBackstageIdentity({})}async signOut(){await this.sessionManager.removeSession()}async getBackstageIdentity(o={}){const m=await this.sessionManager.getSession(o);return m==null?void 0:m.backstageIdentity}async getProfile(o={}){const m=await this.sessionManager.getSession(o);return m==null?void 0:m.profile}}},91631:function(_,s,e){"use strict";e.d(s,{AlertApiForwarder:function(){return t.C},AppThemeSelector:function(){return f.C},AtlassianAuth:function(){return r.AtlassianAuth},ConfigReader:function(){return E.m},ErrorAlerter:function(){return o.KN},ErrorApiForwarder:function(){return o.gr},FetchMiddlewares:function(){return u.I},GithubAuth:function(){return r.GithubAuth},GitlabAuth:function(){return r.GitlabAuth},GoogleAuth:function(){return r.GoogleAuth},LocalStorageFeatureFlags:function(){return m.b},MicrosoftAuth:function(){return r.MicrosoftAuth},NoOpAnalyticsApi:function(){return l.g},OAuthRequestManager:function(){return h.Y},OktaAuth:function(){return r.OktaAuth},OneLoginAuth:function(){return r.OneLoginAuth},UnhandledErrorForwarder:function(){return o.Jv},UrlPatternDiscovery:function(){return i.p},WebStorage:function(){return g.C},createFetchApi:function(){return u.j}});var r=e(91668);e.o(r,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return r.AlertApiForwarder}}),e.o(r,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return r.AppThemeSelector}}),e.o(r,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return r.BitbucketAuth}}),e.o(r,"ConfigReader")&&e.d(s,{ConfigReader:function(){return r.ConfigReader}}),e.o(r,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return r.ErrorAlerter}}),e.o(r,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return r.ErrorApiForwarder}}),e.o(r,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return r.FetchMiddlewares}}),e.o(r,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return r.FlatRoutes}}),e.o(r,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return r.LocalStorageFeatureFlags}}),e.o(r,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return r.NoOpAnalyticsApi}}),e.o(r,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return r.OAuthRequestManager}}),e.o(r,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return r.UnhandledErrorForwarder}}),e.o(r,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return r.UrlPatternDiscovery}}),e.o(r,"WebStorage")&&e.d(s,{WebStorage:function(){return r.WebStorage}}),e.o(r,"createFetchApi")&&e.d(s,{createFetchApi:function(){return r.createFetchApi}}),e.o(r,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return r.createSpecializedApp}}),e.o(r,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return r.defaultConfigLoader}});var t=e(23235),l=e(47150),f=e(58652),E=e(14721),i=e(4333),o=e(89536),m=e(14884),u=e(50160),h=e(11358),g=e(56054)},56494:function(_,s,e){"use strict";e.d(s,{AlertApiForwarder:function(){return t.AlertApiForwarder},ApiProvider:function(){return r.ApiProvider},AppThemeSelector:function(){return t.AppThemeSelector},ConfigReader:function(){return t.ConfigReader},ErrorAlerter:function(){return t.ErrorAlerter},ErrorApiForwarder:function(){return t.ErrorApiForwarder},FetchMiddlewares:function(){return t.FetchMiddlewares},LocalStorageFeatureFlags:function(){return t.LocalStorageFeatureFlags},NoOpAnalyticsApi:function(){return t.NoOpAnalyticsApi},OAuthRequestManager:function(){return t.OAuthRequestManager},UnhandledErrorForwarder:function(){return t.UnhandledErrorForwarder},UrlPatternDiscovery:function(){return t.UrlPatternDiscovery},WebStorage:function(){return t.WebStorage},createFetchApi:function(){return t.createFetchApi}});var r=e(76105);e.o(r,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return r.AlertApiForwarder}}),e.o(r,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return r.AppThemeSelector}}),e.o(r,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return r.AtlassianAuth}}),e.o(r,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return r.BitbucketAuth}}),e.o(r,"ConfigReader")&&e.d(s,{ConfigReader:function(){return r.ConfigReader}}),e.o(r,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return r.ErrorAlerter}}),e.o(r,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return r.ErrorApiForwarder}}),e.o(r,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return r.FetchMiddlewares}}),e.o(r,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return r.FlatRoutes}}),e.o(r,"GithubAuth")&&e.d(s,{GithubAuth:function(){return r.GithubAuth}}),e.o(r,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return r.GitlabAuth}}),e.o(r,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return r.GoogleAuth}}),e.o(r,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return r.LocalStorageFeatureFlags}}),e.o(r,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return r.MicrosoftAuth}}),e.o(r,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return r.NoOpAnalyticsApi}}),e.o(r,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return r.OAuthRequestManager}}),e.o(r,"OktaAuth")&&e.d(s,{OktaAuth:function(){return r.OktaAuth}}),e.o(r,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return r.OneLoginAuth}}),e.o(r,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return r.UnhandledErrorForwarder}}),e.o(r,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return r.UrlPatternDiscovery}}),e.o(r,"WebStorage")&&e.d(s,{WebStorage:function(){return r.WebStorage}}),e.o(r,"createFetchApi")&&e.d(s,{createFetchApi:function(){return r.createFetchApi}}),e.o(r,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return r.createSpecializedApp}}),e.o(r,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return r.defaultConfigLoader}});var t=e(91631);e.o(t,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return t.AtlassianAuth}}),e.o(t,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return t.BitbucketAuth}}),e.o(t,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return t.FlatRoutes}}),e.o(t,"GithubAuth")&&e.d(s,{GithubAuth:function(){return t.GithubAuth}}),e.o(t,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return t.GitlabAuth}}),e.o(t,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return t.GoogleAuth}}),e.o(t,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return t.MicrosoftAuth}}),e.o(t,"OktaAuth")&&e.d(s,{OktaAuth:function(){return t.OktaAuth}}),e.o(t,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return t.OneLoginAuth}}),e.o(t,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return t.createSpecializedApp}}),e.o(t,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return t.defaultConfigLoader}})},80396:function(_,s,e){"use strict";e.d(s,{p:function(){return t}});var r;(function(l){l[l.default=10]="default";const f=50;l[l.app=f]="app",l[l.static=100]="static"})(r||(r={}));class t{constructor(){oe(this,"factories",new Map)}register(f,E){const i=r[f],o=this.factories.get(E.api.id);return o&&o.priority>=i?!1:(this.factories.set(E.api.id,{priority:i,factory:E}),!0)}get(f){const E=this.factories.get(f.id);if(!!E)return E.factory}getAllApis(){const f=new Set;for(const{factory:E}of this.factories.values())f.add(E.api);return f}}},14406:function(_,s,e){"use strict";e.d(s,{g:function(){return o}});var r=e(2784),t=e(13980),l=e.n(t);class f{constructor(...u){oe(this,"holders");this.holders=u}get(u){for(const h of this.holders){const g=h.get(u);if(g)return g}}}var E=e(76241);const i=(0,E.CT)("api-context"),o=m=>{var P;const{apis:u,children:h}=m,g=(P=(0,r.useContext)(i))==null?void 0:P.atVersion(1),R=g?new f(u,g):u;return r.createElement(i.Provider,{value:(0,E.EI)({1:R}),children:h})};o.propTypes={apis:l().shape({get:l().func.isRequired}).isRequired,children:l().node}},12132:function(_,s,e){"use strict";e.d(s,{M:function(){return r}});class r{constructor(l){oe(this,"apis",new Map);this.factories=l}static validateFactories(l,f){for(const E of f){const i=[E],o=new Set;for(;i.length;){const m=i.shift(),u=l.get(m);if(!!u)for(const h of Object.values(u.deps)){if(h.id===E.id)throw new Error(`Circular dependency of api factory for ${E}`);o.has(h)||(o.add(h),i.push(h))}}}}get(l){return this.load(l)}load(l,f=[]){const E=this.apis.get(l.id);if(E)return E;const i=this.factories.get(l);if(!i)return;if(f.includes(i.api))throw new Error(`Circular dependency of api factory for ${i.api}`);const o=this.loadDeps(l,i.deps,[...f,i.api]),m=i.factory(o);return this.apis.set(l.id,m),m}loadDeps(l,f,E){const i={};for(const o in f)if(f.hasOwnProperty(o)){const m=f[o],u=this.load(m,E);if(!u)throw new Error(`No API factory available for dependency ${m} of dependent ${l}`);i[o]=u}return i}}},76105:function(_,s,e){"use strict";e.d(s,{ApiFactoryRegistry:function(){return l.p},ApiProvider:function(){return r.g},ApiResolver:function(){return t.M}});var r=e(14406),t=e(12132),l=e(80396),f=e(82488),E=e.n(f);e.o(f,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return f.AlertApiForwarder}}),e.o(f,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return f.AppThemeSelector}}),e.o(f,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return f.AtlassianAuth}}),e.o(f,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return f.BitbucketAuth}}),e.o(f,"ConfigReader")&&e.d(s,{ConfigReader:function(){return f.ConfigReader}}),e.o(f,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return f.ErrorAlerter}}),e.o(f,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return f.ErrorApiForwarder}}),e.o(f,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return f.FetchMiddlewares}}),e.o(f,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return f.FlatRoutes}}),e.o(f,"GithubAuth")&&e.d(s,{GithubAuth:function(){return f.GithubAuth}}),e.o(f,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return f.GitlabAuth}}),e.o(f,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return f.GoogleAuth}}),e.o(f,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return f.LocalStorageFeatureFlags}}),e.o(f,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return f.MicrosoftAuth}}),e.o(f,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return f.NoOpAnalyticsApi}}),e.o(f,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return f.OAuthRequestManager}}),e.o(f,"OktaAuth")&&e.d(s,{OktaAuth:function(){return f.OktaAuth}}),e.o(f,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return f.OneLoginAuth}}),e.o(f,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return f.UnhandledErrorForwarder}}),e.o(f,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return f.UrlPatternDiscovery}}),e.o(f,"WebStorage")&&e.d(s,{WebStorage:function(){return f.WebStorage}}),e.o(f,"createFetchApi")&&e.d(s,{createFetchApi:function(){return f.createFetchApi}}),e.o(f,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return f.createSpecializedApp}}),e.o(f,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return f.defaultConfigLoader}})},82488:function(){},82370:function(_,s,e){"use strict";e.d(s,{b:function(){return Et}});var r=e(2784),t=e(10289),l=e(64279),f=e(56494),E=e(36964),i=e(76105);function o(q){const N={};for(const ce in q.collectors)q.collectors.hasOwnProperty(ce)&&(N[ce]=q.collectors[ce]());const ne=[{node:r.Children.toArray(q.root),parent:void 0,contexts:{}}];for(;ne.length!==0;){const{node:ce,parent:se,contexts:Ee}=ne.shift();r.Children.forEach(ce,Ze=>{if(!(0,r.isValidElement)(Ze))return;const $e={};for(const at in N)if(N.hasOwnProperty(at)){const te=N[at];$e[at]=te.visit(te.accumulator,Ze,se,Ee[at])}for(const at of q.discoverers){const te=at(Ze);te&&ne.push({node:te,parent:Ze,contexts:$e})}})}return Object.fromEntries(Object.entries(N).map(([ce,se])=>[ce,se.accumulator]))}function m(q,N){return()=>({accumulator:q(),visit:N})}function u(q){var N;return(N=q.props)==null?void 0:N.children}function h(q){var N,ne,ce;if(((N=q.props)==null?void 0:N.path)&&((ne=q.props)==null?void 0:ne.element))return(ce=q.props)==null?void 0:ce.element}const g=m(()=>new Set,(q,N)=>{const ne=(0,E.getComponentData)(N,"core.plugin");ne&&q.add(ne)});var R=e(88934);function P(q){var ce;const N=(ce=q.props)==null?void 0:ce.element;let ne=(0,E.getComponentData)(q,"core.mountPoint");return!ne&&(0,r.isValidElement)(N)&&(ne=(0,E.getComponentData)(N,"core.mountPoint")),ne}const x=m(()=>new Map,(q,N,ne,ce)=>{var Ze,$e;let se=ce;if((ne==null?void 0:ne.props.element)===N)return se;if((0,E.getComponentData)(N,"core.gatherMountPoints")){const at=(Ze=N.props)==null?void 0:Ze.path;if(!at)throw new Error("Mount point gatherer must have a path");se=at}const Ee=P(N);if(Ee){let at=($e=N.props)==null?void 0:$e.path;if(se&&(at?se=void 0:at=se),!at)throw new Error("Mounted routable extension must have a path");q.set(Ee,at)}return se}),T=m(()=>new Map,(q,N,ne,ce)=>{var Ze;if((ne==null?void 0:ne.props.element)===N)return ce;let se=ce;const Ee=P(N);return Ee&&(ce&&"sticky"in ce?(q.set(Ee,ce.sticky),(Ze=N.props)!=null&&Ze.path?se=Ee:se=ce):(q.set(Ee,ce),se=Ee)),(0,E.getComponentData)(N,"core.gatherMountPoints")?{sticky:se}:se}),X={caseSensitive:!1,path:"/*",element:"match-all",routeRefs:new Set},F=m(()=>Array(),(q,N,ne,ce)=>{var te,Y,z;const se=(te=ce==null?void 0:ce.children)!=null?te:q;if((ne==null?void 0:ne.props.element)===N)return ce;const Ee=(Y=N.props)==null?void 0:Y.path,Ze=Boolean((z=N.props)==null?void 0:z.caseSensitive),$e=P(N);if($e){if(Ee){const ie={caseSensitive:Ze,path:Ee,element:"mounted",routeRefs:new Set([$e]),children:[X],plugin:(0,E.getComponentData)(N.props.element,"core.plugin")};return se.push(ie),ie}ce==null||ce.routeRefs.add($e)}if((0,E.getComponentData)(N,"core.gatherMountPoints")){if(!Ee)throw new Error("Mount point gatherer must have a path");const ie={caseSensitive:Ze,path:Ee,element:"gathered",routeRefs:new Set,children:[X],plugin:ce==null?void 0:ce.plugin};return se.push(ie),ie}return ce}),b=m(()=>new Set,(q,N)=>{if(N.type===R.L){const ne=N.props;q.add("with"in ne?ne.with:ne.without)}});var D=e(76241);const Z=(0,D.uW)("route-ref-type",()=>Symbol("route-ref-type"));function M(q){return q[Z]==="absolute"}function K(q){return q[Z]==="sub"}function ae(q){return q[Z]==="external"}function pe(...q){const N=q.join("/").replace(/\/\/+/g,"/");return N!=="/"&&N.endsWith("/")?N.slice(0,-1):N}function Me(q,N,ne){let ce,se="";if(M(q))ce=q;else if(K(q))ce=q.parent,se=q.path;else if(ae(q)){const $e=ne.get(q);if(!$e)return[void 0,""];if(M($e))ce=$e;else if(K($e))ce=$e.parent,se=$e.path;else throw new Error(`ExternalRouteRef was bound to invalid target, ${$e}`)}else throw q[Z]?new Error(`Unknown or invalid route ref type, ${q[Z]}`):new Error(`Unknown object passed to useRouteRef, got ${q}`);if(!ce)return[void 0,""];const Ee=N.get(ce);if(!Ee)return[void 0,""];const Ze=pe(Ee,se);return[ce,Ze]}function Ue(q,N,ne,ce,se){var Y;const Ee=(Y=(0,t.fp)(se,N))!=null?Y:[],Ze=Array();let $e=-1;for(let z=q;z&&($e=Ee.findIndex(ie=>ie.route.routeRefs.has(z)),$e===-1);z=ce.get(z))Ze.unshift(z);Ze.length===0&&($e-=1);const at=$e===-1?"":Ee[$e].pathname,te=pe(...Ze.slice(0,-1).map(z=>{const ie=ne.get(z);if(!ie)throw new Error(`No path for ${z}`);if(ie.includes(":"))throw new Error(`Cannot route to ${q} with parent ${z} as it has parameters`);return ie}));return at+te}class de{constructor(N,ne,ce,se,Ee){this.routePaths=N,this.routeParents=ne,this.routeObjects=ce,this.routeBindings=se,this.appBasePath=Ee}resolve(N,ne){const[ce,se]=Me(N,this.routePaths,this.routeBindings);if(!ce)return;let Ee;typeof ne=="string"?Ee=this.trimPath(ne):ne.pathname?Ee={...ne,pathname:this.trimPath(ne.pathname)}:Ee=ne;const Ze=this.appBasePath+Ue(ce,Ee,this.routePaths,this.routeParents,this.routeObjects);return(...[at])=>Ze+(0,t.Gn)(se,at)}trimPath(N){return N&&(N.startsWith(this.appBasePath)?N.slice(this.appBasePath.length):N)}}const je=(0,D.CT)("routing-context"),_e=({routePaths:q,routeParents:N,routeObjects:ne,routeBindings:ce,basePath:se="",children:Ee})=>{const Ze=new de(q,N,ne,ce,se),$e=(0,D.EI)({1:Ze});return r.createElement(je.Provider,{value:$e},Ee)},Qe=(q,N)=>{var ne,ce;try{const se=(0,t.fp)(N,{pathname:q}),Ee=(ne=se==null?void 0:se.filter($e=>{var at;return((at=$e==null?void 0:$e.route.routeRefs)==null?void 0:at.size)>0}).pop())==null?void 0:ne.route;if(!Ee)return{};let Ze;return Ee.routeRefs.size===1&&(Ze=Ee.routeRefs.values().next().value),{extension:"App",pluginId:((ce=Ee.plugin)==null?void 0:ce.getId())||"root",...Ze?{routeRef:Ze.id}:{}}}catch{return{}}},rt=({pathname:q,search:N,hash:ne})=>{const ce=(0,E.useAnalytics)();return(0,r.useEffect)(()=>{ce.captureEvent("navigate",`${q}${N}${ne}`)},[ce,q,N,ne]),null},ot=({tree:q})=>{const{pathname:N,search:ne,hash:ce}=(0,t.TH)(),{routeObjects:se}=(0,r.useMemo)(()=>o({root:q,discoverers:[u,h],collectors:{routeObjects:F}}),[q]);return r.createElement(E.AnalyticsContext,{attributes:Qe(N,se)},r.createElement(rt,{pathname:N,search:ne,hash:ce}))};function gt(q,N){const ne=new Set(N.values());ne.delete(void 0);for(const ce of N.keys()){if(ne.has(ce))continue;let se=ce,Ee="";for(;se;){const $e=q.get(se);if(!$e)throw new Error(`No path for ${se}`);Ee=`${$e}${Ee}`,se=N.get(se)}const Ze=Ee.match(/:(\w+)/g);if(Ze){for(let $e=0;$e<Ze.length;$e++)for(let at=$e+1;at<Ze.length;at++)if(Ze[at]===Ze[$e])throw new Error(`Parameter ${Ze[at]} is duplicated in path ${Ee}`)}}}function Le(q,N){for(const ne of N)if(!!ne.externalRoutes){for(const[ce,se]of Object.entries(ne.externalRoutes))if(!se.optional&&!q.has(se))throw new Error(`External route '${ce}' of the '${ne.getId()}' plugin must be bound to a target route. See https://backstage.io/link?bind-routes for details.`)}}const Xe=(0,D.CT)("app-context"),Ye=({appContext:q,children:N})=>{const ne=(0,D.EI)({1:q});return r.createElement(Xe.Provider,{value:ne,children:N})};function Rt(q){return new Error(`Tried to access IdentityApi ${q} before app was loaded`)}function pt(q){console.warn(`WARNING: Call to ${q} is deprecated and will break in the future`)}class St{constructor(){oe(this,"target");oe(this,"waitForTarget");oe(this,"resolveTarget",()=>{});this.waitForTarget=new Promise(N=>{this.resolveTarget=N})}setTarget(N){this.target=N,this.resolveTarget(N)}getUserId(){if(!this.target)throw Rt("getUserId");if(!this.target.getUserId)throw new Error("IdentityApi does not implement getUserId");return pt("getUserId"),this.target.getUserId()}getProfile(){if(!this.target)throw Rt("getProfile");if(!this.target.getProfile)throw new Error("IdentityApi does not implement getProfile");return pt("getProfile"),this.target.getProfile()}async getProfileInfo(){return this.waitForTarget.then(N=>N.getProfileInfo())}async getBackstageIdentity(){const N=await this.waitForTarget.then(ne=>ne.getBackstageIdentity());return N.userEntityRef.match(/^.*:.*\/.*$/)||console.warn(`WARNING: The App IdentityApi provided an invalid userEntityRef, '${N.userEntityRef}'. It must be a full Entity Reference of the form '<kind>:<namespace>/<name>'.`),N}async getCredentials(){return this.waitForTarget.then(N=>N.getCredentials())}async getIdToken(){return this.waitForTarget.then(N=>{if(!N.getIdToken)throw new Error("IdentityApi does not implement getIdToken");return pt("getIdToken"),N.getIdToken()})}async signOut(){await this.waitForTarget.then(N=>N.signOut()),location.reload()}}var lt=e(72164);function yt(q,N,ne){if(q!==void 0){const se=ne.find(Ee=>Ee.id===q);if(se)return se}if(N){const se=ne.find(Ee=>Ee.variant==="dark");if(se)return se}const ce=ne.find(se=>se.variant==="light");return ce||ne[0]}const bt=()=>{const q=(0,r.useMemo)(()=>window.matchMedia("(prefers-color-scheme: dark)"),[]),[N,ne]=(0,r.useState)(q.matches);return(0,r.useEffect)(()=>{const ce=se=>{ne(se.matches)};return q.addListener(ce),()=>{q.removeListener(ce)}},[q]),N};function Tt({children:q}){const N=(0,E.useApi)(E.appThemeApiRef),ne=(0,lt.Z)(N.activeThemeId$(),N.getActiveThemeId()),ce=Boolean(window.matchMedia)?bt():!1,se=yt(ne,ce,N.getInstalledThemes());if(!se)throw new Error("App has no themes");return r.createElement(se.Provider,{children:q})}var Mt=e(46611);class Bt{constructor(){oe(this,"apis",[])}add(N,ne){return this.apis.push([N.id,ne]),ne}build(){return new It(new Map(this.apis))}}class It{static builder(){return new Bt}static from(N){return new It(new Map(N.map(([ne,ce])=>[ne.id,ce])))}static with(N,ne){return new It(new Map([[N.id,ne]]))}constructor(N){this.apis=N}with(N,ne){return new It(new Map([...this.apis,[N.id,ne]]))}get(N){return this.apis.get(N.id)}}function ze(q){const N=new Map;return q&&q({bind:(ce,se)=>{for(const[Ee,Ze]of Object.entries(se)){const $e=ce[Ee];if(!$e)throw new Error(`Key ${Ee} is not an existing external route`);if(!Ze&&!$e.optional)throw new Error(`External route ${Ee} is required but was undefined`);Ze&&N.set($e,Ze)}}}),N}function ct(q){var ne;let{pathname:N}=new URL((ne=q.getOptionalString("app.baseUrl"))!=null?ne:"/","http://dummy.dev");return N=N.replace(/\/*$/,""),N}function ke(q,N,ne){var at;const ce=Boolean(q),se=(0,l.default)(q||(()=>Promise.resolve([])));let Ee;if(ce&&se.loading){const{Progress:te}=N;Ee=r.createElement(te,null)}else if(se.error){const{BootErrorPage:te}=N;Ee=r.createElement(te,{step:"load-config",error:se.error})}const{ThemeProvider:Ze=Tt}=N;return Ee?{node:r.createElement(f.ApiProvider,{apis:It.with(E.appThemeApiRef,ne)},r.createElement(Ze,null,Ee))}:{api:f.ConfigReader.fromConfigs((at=se.value)!=null?at:[])}}class Ct{constructor(N){this.app=N}getPlugins(){return this.app.getPlugins()}getSystemIcon(N){return this.app.getSystemIcon(N)}getComponents(){return this.app.getComponents()}}class ut{constructor(N){oe(this,"apiHolder");oe(this,"configApi");oe(this,"apis");oe(this,"icons");oe(this,"plugins");oe(this,"components");oe(this,"themes");oe(this,"configLoader");oe(this,"defaultApis");oe(this,"bindRoutes");oe(this,"appIdentityProxy",new St);oe(this,"apiFactoryRegistry");var ne,ce,se,Ee;this.apis=(ne=N.apis)!=null?ne:[],this.icons=N.icons,this.plugins=new Set((ce=N.plugins)!=null?ce:[]),this.components=N.components,this.themes=N.themes,this.configLoader=(se=N.configLoader)!=null?se:Mt.t,this.defaultApis=(Ee=N.defaultApis)!=null?Ee:[],this.bindRoutes=N.bindRoutes,this.apiFactoryRegistry=new i.ApiFactoryRegistry}getPlugins(){return Array.from(this.plugins)}getSystemIcon(N){return this.icons[N]}getComponents(){return this.components}getProvider(){const N=new Ct(this);let ne=!1;return({children:se})=>{const Ee=(0,r.useMemo)(()=>f.AppThemeSelector.createWithStorage(this.themes),[]),{routePaths:Ze,routeParents:$e,routeObjects:at,featureFlags:te,routeBindings:Y}=(0,r.useMemo)(()=>{const Oe=o({root:se,discoverers:[u,h],collectors:{routePaths:x,routeParents:T,routeObjects:F,collectedPlugins:g,featureFlags:b}});return Oe.collectedPlugins.forEach(ve=>this.plugins.add(ve)),this.verifyPlugins(this.plugins),this.getApiHolder(),{...Oe,routeBindings:ze(this.bindRoutes)}},[se]);ne||(ne=!0,gt(Ze,$e),Le(Y,this.plugins));const z=ke(this.configLoader,this.components,Ee),ie="api"in z;if(ie){const{api:Oe}=z;this.configApi=Oe}if((0,r.useEffect)(()=>{if(ie){const Oe=this.getApiHolder().get(E.featureFlagsApiRef);for(const ve of this.plugins.values())if("getFeatureFlags"in ve)for(const De of ve.getFeatureFlags())Oe.registerFlag({name:De.name,pluginId:ve.getId()});else for(const De of ve.output())De.type==="feature-flag"&&Oe.registerFlag({name:De.name,pluginId:ve.getId()});for(const ve of te)Oe.registerFlag({name:ve,pluginId:""})}},[ie,z,te]),"node"in z)return z.node;const{ThemeProvider:Te=Tt}=this.components;return r.createElement(f.ApiProvider,{apis:this.getApiHolder()},r.createElement(Ye,{appContext:N},r.createElement(Te,null,r.createElement(_e,{routePaths:Ze,routeParents:$e,routeObjects:at,routeBindings:Y,basePath:ct(z.api)},se))))}}getRouter(){const{Router:N,SignInPage:ne}=this.components,ce=({component:Ee,children:Ze})=>{const[$e,at]=(0,r.useState)();return $e?(this.appIdentityProxy.setTarget($e),Ze):r.createElement(Ee,{onSignInSuccess:at})};return({children:Ee})=>{const Ze=(0,E.useApi)(E.configApiRef),$e=`${ct(Ze)}/*`;return ne?r.createElement(N,null,r.createElement(ot,{tree:Ee}),r.createElement(ce,{component:ne},r.createElement(t.Z5,null,r.createElement(t.AW,{path:$e,element:r.createElement(r.Fragment,null,Ee)})))):(this.appIdentityProxy.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()=>{}}),r.createElement(N,null,r.createElement(ot,{tree:Ee}),r.createElement(t.Z5,null,r.createElement(t.AW,{path:$e,element:r.createElement(r.Fragment,null,Ee)}))))}}getApiHolder(){if(this.apiHolder){for(const N of this.plugins)for(const ne of N.getApis())this.apiFactoryRegistry.get(ne.api)||this.apiFactoryRegistry.register("default",ne);return i.ApiResolver.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder}this.apiFactoryRegistry.register("static",{api:E.appThemeApiRef,deps:{},factory:()=>f.AppThemeSelector.createWithStorage(this.themes)}),this.apiFactoryRegistry.register("static",{api:E.configApiRef,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:E.identityApiRef,deps:{},factory:()=>this.appIdentityProxy}),this.apiFactoryRegistry.register("default",{api:E.featureFlagsApiRef,deps:{},factory:()=>new f.LocalStorageFeatureFlags});for(const N of this.defaultApis)this.apiFactoryRegistry.register("default",N);for(const N of this.plugins)for(const ne of N.getApis())if(!this.apiFactoryRegistry.register("default",ne))throw new Error(`Plugin ${N.getId()} tried to register duplicate or forbidden API factory for ${ne.api}`);for(const N of this.apis)if(!this.apiFactoryRegistry.register("app",N))throw new Error(`Duplicate or forbidden API factory for ${N.api} in app`);return i.ApiResolver.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder=new i.ApiResolver(this.apiFactoryRegistry),this.apiHolder}verifyPlugins(N){const ne=new Set;for(const ce of N){const se=ce.getId();if(ne.has(se))throw new Error(`Duplicate plugin found '${se}'`);ne.add(se)}}}function Et(q){return new ut(q)}},46611:function(_,s,e){"use strict";e.d(s,{t:function(){return r}});const r=async(t="__APP_INJECTED_RUNTIME_CONFIG__")=>{const l=[{context:"app-config.yaml",data:{app:{title:"Techdocs Preview App",baseUrl:"http://localhost:3000"},backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}}}];if(!l)throw new Error("No static configuration provided");if(!Array.isArray(l))throw new Error("Static configuration has invalid format");const f=l.slice();if(t!=="__app_injected_runtime_config__".toLocaleUpperCase("en-US"))try{const i=JSON.parse(t);Array.isArray(i)?f.push(...i):f.push({data:i,context:"env"})}catch(i){throw new Error(`Failed to load runtime configuration, ${i}`)}const E=window.__APP_CONFIG__;return E&&f.push({context:"window",data:E}),f}},44056:function(_,s,e){"use strict";e.d(s,{createSpecializedApp:function(){return r.b},defaultConfigLoader:function(){return t.t}});var r=e(82370),t=e(46611),l=e(73495),f=e.n(l);e.o(l,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return l.AtlassianAuth}}),e.o(l,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return l.BitbucketAuth}}),e.o(l,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return l.FlatRoutes}}),e.o(l,"GithubAuth")&&e.d(s,{GithubAuth:function(){return l.GithubAuth}}),e.o(l,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return l.GitlabAuth}}),e.o(l,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return l.GoogleAuth}}),e.o(l,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return l.MicrosoftAuth}}),e.o(l,"OktaAuth")&&e.d(s,{OktaAuth:function(){return l.OktaAuth}}),e.o(l,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return l.OneLoginAuth}})},73495:function(){},49208:function(_,s,e){"use strict";e.d(s,{AlertApiForwarder:function(){return r.AlertApiForwarder},ErrorAlerter:function(){return r.ErrorAlerter},ErrorApiForwarder:function(){return r.ErrorApiForwarder},FetchMiddlewares:function(){return r.FetchMiddlewares},FlatRoutes:function(){return l.w},NoOpAnalyticsApi:function(){return r.NoOpAnalyticsApi},OAuthRequestManager:function(){return r.OAuthRequestManager},UnhandledErrorForwarder:function(){return r.UnhandledErrorForwarder},UrlPatternDiscovery:function(){return r.UrlPatternDiscovery},WebStorage:function(){return r.WebStorage},createFetchApi:function(){return r.createFetchApi},createSpecializedApp:function(){return t.createSpecializedApp},defaultConfigLoader:function(){return t.defaultConfigLoader}});var r=e(56494);e.o(r,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return r.AtlassianAuth}}),e.o(r,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return r.BitbucketAuth}}),e.o(r,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return r.FlatRoutes}}),e.o(r,"GithubAuth")&&e.d(s,{GithubAuth:function(){return r.GithubAuth}}),e.o(r,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return r.GitlabAuth}}),e.o(r,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return r.GoogleAuth}}),e.o(r,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return r.MicrosoftAuth}}),e.o(r,"OktaAuth")&&e.d(s,{OktaAuth:function(){return r.OktaAuth}}),e.o(r,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return r.OneLoginAuth}}),e.o(r,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return r.createSpecializedApp}}),e.o(r,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return r.defaultConfigLoader}});var t=e(44056);e.o(t,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return t.AtlassianAuth}}),e.o(t,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return t.BitbucketAuth}}),e.o(t,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return t.FlatRoutes}}),e.o(t,"GithubAuth")&&e.d(s,{GithubAuth:function(){return t.GithubAuth}}),e.o(t,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return t.GitlabAuth}}),e.o(t,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return t.GoogleAuth}}),e.o(t,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return t.MicrosoftAuth}}),e.o(t,"OktaAuth")&&e.d(s,{OktaAuth:function(){return t.OktaAuth}}),e.o(t,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return t.OneLoginAuth}});var l=e(63938)},57018:function(_,s,e){"use strict";e.d(s,{RefreshingAuthSessionManager:function(){return i}});function r(m,u){for(const h of u)if(!m.has(h))return!1;return!0}class t{constructor(u){this.options=u}sessionExistsAndHasScope(u,h){if(!u)return!1;if(!h||this.options.sessionScopes===void 0)return!0;const g=this.options.sessionScopes(u);return r(g,h)}getExtendedScope(u,h){const g=new Set(this.options.defaultScopes);if(u&&this.options.sessionScopes!==void 0){const R=this.options.sessionScopes(u);for(const P of R)g.add(P)}if(h)for(const R of h)g.add(R);return g}}var l=e(98005),f=e(36964);class E{constructor(){oe(this,"subject",new l.X(f.SessionState.SignedOut));oe(this,"signedIn",!1)}setIsSignedIn(u){this.signedIn!==u&&(this.signedIn=u,this.subject.next(this.signedIn?f.SessionState.SignedIn:f.SessionState.SignedOut))}sessionState$(){return this.subject}}class i{constructor(u){oe(this,"connector");oe(this,"helper");oe(this,"sessionScopesFunc");oe(this,"sessionShouldRefreshFunc");oe(this,"stateTracker",new E);oe(this,"refreshPromise");oe(this,"currentSession");const{connector:h,defaultScopes:g=new Set,sessionScopes:R,sessionShouldRefresh:P}=u;this.connector=h,this.sessionScopesFunc=R,this.sessionShouldRefreshFunc=P,this.helper=new t({sessionScopes:R,defaultScopes:g})}async getSession(u){if(this.helper.sessionExistsAndHasScope(this.currentSession,u.scopes)){if(!this.sessionShouldRefreshFunc(this.currentSession))return this.currentSession;try{const g=await this.collapsedSessionRefresh(),R=this.sessionScopesFunc(this.currentSession),P=this.sessionScopesFunc(g);return r(P,R)&&(this.currentSession=g),g}catch(g){if(u.optional)return;throw g}}if(!this.currentSession&&!u.instantPopup)try{const h=await this.collapsedSessionRefresh();return this.currentSession=h,this.getSession(u)}catch{}if(!u.optional)return this.currentSession=await this.connector.createSession({...u,scopes:this.helper.getExtendedScope(this.currentSession,u.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(){if(this.refreshPromise)return this.refreshPromise;this.refreshPromise=this.connector.refreshSession();try{const u=await this.refreshPromise;return this.stateTracker.setIsSignedIn(!0),u}finally{delete this.refreshPromise}}}class o{constructor(u){oe(this,"connector");oe(this,"helper");oe(this,"stateTracker",new SessionStateTracker);oe(this,"currentSession");const{connector:h,defaultScopes:g=new Set,sessionScopes:R}=u;this.connector=h,this.helper=new SessionScopeHelper({sessionScopes:R,defaultScopes:g})}setSession(u){this.currentSession=u,this.stateTracker.setIsSignedIn(Boolean(u))}async getSession(u){if(this.helper.sessionExistsAndHasScope(this.currentSession,u.scopes))return this.currentSession;if(!u.optional)return this.currentSession=await this.connector.createSession({...u,scopes:this.helper.getExtendedScope(this.currentSession,u.scopes)}),this.stateTracker.setIsSignedIn(!0),this.currentSession}async removeSession(){this.currentSession=void 0,this.stateTracker.setIsSignedIn(!1)}sessionState$(){return this.stateTracker.sessionState$()}}},98005:function(_,s,e){"use strict";e.d(s,{J:function(){return l},X:function(){return f}});var r=e(82394),t=e.n(r);class l{constructor(){oe(this,"isClosed",!1);oe(this,"terminatingError");oe(this,"observable",new(t())(i=>this.isClosed?(this.terminatingError?i.error(this.terminatingError):i.complete(),()=>{}):(this.subscribers.add(i),()=>{this.subscribers.delete(i)})));oe(this,"subscribers",new Set)}[Symbol.observable](){return this}get closed(){return this.isClosed}next(i){if(this.isClosed)throw new Error("PublishSubject is closed");this.subscribers.forEach(o=>o.next(i))}error(i){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.terminatingError=i,this.subscribers.forEach(o=>o.error(i))}complete(){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.subscribers.forEach(i=>i.complete())}subscribe(i,o,m){const u=typeof i=="function"?{next:i,error:o,complete:m}:i;return this.observable.subscribe(u)}}class f{constructor(i){oe(this,"isClosed");oe(this,"currentValue");oe(this,"terminatingError");oe(this,"observable");oe(this,"subscribers",new Set);this.isClosed=!1,this.currentValue=i,this.terminatingError=void 0,this.observable=new(t())(o=>this.isClosed?(this.terminatingError?o.error(this.terminatingError):o.complete(),()=>{}):(o.next(this.currentValue),this.subscribers.add(o),()=>{this.subscribers.delete(o)}))}[Symbol.observable](){return this}get closed(){return this.isClosed}next(i){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.currentValue=i,this.subscribers.forEach(o=>o.next(i))}error(i){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.terminatingError=i,this.subscribers.forEach(o=>o.error(i))}complete(){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.subscribers.forEach(i=>i.complete())}subscribe(i,o,m){const u=typeof i=="function"?{next:i,error:o,complete:m}:i;return this.observable.subscribe(u)}}},88934:function(_,s,e){"use strict";e.d(s,{L:function(){return l}});var r=e(36964),t=e(2784);const l=f=>{const{children:E}=f,i=(0,r.useApi)(r.featureFlagsApiRef),o="with"in f?i.isActive(f.with):!i.isActive(f.without);return t.createElement(t.Fragment,null,o?E:null)};(0,r.attachComponentData)(l,"core.featureFlagged",!0)},63938:function(_,s,e){"use strict";e.d(s,{w:function(){return f}});var r=e(2784),t=e(10289),l=e(36964);const f=i=>{const o=(0,l.useApp)(),{NotFoundErrorPage:m}=o.getComponents(),u=(0,l.useElementFilter)(i.children,h=>h.getElements().flatMap(g=>{var P;let R=g.props.path;return R===""?[]:(R=(P=R==null?void 0:R.replace(/\/\*$/,""))!=null?P:"/",[{path:R,element:g,children:g.props.children?[{path:R==="/"?"/":"/*",element:g.props.children}]:void 0}])}).sort((g,R)=>R.path.localeCompare(g.path)).map(g=>(g.path=g.path==="/"?"/":`${g.path}/*`,g)));return u.push({element:r.createElement(m,null),path:"/*"}),(0,t.V$)(u)};var E=e(88934)},9118:function(_,s,e){"use strict";e.d(s,{Button:function(){return F},CodeSnippet:function(){return de},Content:function(){return za},ContentHeader:function(){return ei},CreateButton:function(){return Qe},DependencyGraph:function(){return Y},DependencyGraphTypes:function(){return r},EmptyState:function(){return me},ErrorPage:function(){return oi},ErrorPanel:function(){return pn},Header:function(){return ka},HeaderIconLinkRow:function(){return Nr},HeaderLabel:function(){return gi},HeaderTabs:function(){return Wa},InfoCard:function(){return Rn},ItemCardGrid:function(){return Ci},ItemCardHeader:function(){return vi},Link:function(){return T},LogViewer:function(){return Nn},MissingAnnotationEmptyState:function(){return st},OverflowTooltip:function(){return vr},Page:function(){return Xa},PageWithHeader:function(){return Pi},Progress:function(){return _n},ResponseErrorPanel:function(){return lr},RoutedTabs:function(){return Ha},Select:function(){return tt},Sidebar:function(){return ko},SidebarContext:function(){return xr},SidebarDivider:function(){return us},SidebarItem:function(){return Ua},SidebarPage:function(){return $o},SidebarPinStateContext:function(){return or},SubvalueCell:function(){return Ss},SupportButton:function(){return Fo},Table:function(){return Vs},WarningPanel:function(){return qt},sidebarConfig:function(){return Ln},useContent:function(){return sa},useQueryParamState:function(){return Po}});var r={};e.r(r),e.d(r,{Nm:function(){return rt},ht:function(){return Le},LJ:function(){return gt}});var t=e(2784),l=e(36964),f=e(19928);function E(n){const[a,c]=useState([]),d=useApi(alertApiRef);if(useEffect(()=>{const O=d.alert$().subscribe(U=>c(k=>k.concat(U)));return()=>{O.unsubscribe()}},[d]),a.length===0)return null;const[p]=a,v=()=>{c(O=>O.filter(U=>U!==p))};return React.createElement(Snackbar,{open:!0,anchorOrigin:{vertical:"top",horizontal:"center"}},React.createElement(Alert,{action:React.createElement(IconButton,{color:"inherit",size:"small",onClick:v,"data-testid":"error-button-close"},React.createElement(CloseIcon,null)),severity:p.severity},React.createElement("span",null,p.message.toString(),a.length>1&&React.createElement("em",null,` (${a.length-1} older ${pluralize("message",a.length-1)})`))))}var i=e(79692),o=e(12420);const m=(0,i.Z)(n=>(0,o.Z)({avatar:{width:"4rem",height:"4rem",color:"#fff",fontWeight:n.typography.fontWeightBold,letterSpacing:"1px",textTransform:"uppercase"}}),{name:"BackstageAvatar"});function u(n){const{displayName:a,picture:c,customStyles:d}=n,p=m();return React.createElement(MaterialAvatar,{alt:a,src:c,className:p.avatar,style:{backgroundColor:stringToColor(a||c||""),...d}},a&&extractInitials(a))}var h=e(77277),g=e(86689),R=e(62833);const P=n=>/^([a-z+.-]+):/.test(n),x=n=>{var a;return n instanceof Array?n.map(x).join(" ").trim():typeof n=="object"&&n?x((a=n==null?void 0:n.props)==null?void 0:a.children):["string","number"].includes(typeof n)?String(n):""},T=t.forwardRef(({onClick:n,noTrack:a,...c},d)=>{const p=(0,l.useAnalytics)(),v=String(c.to),O=x(c.children)||v,U=P(v),k=U&&!!/^https?:/.exec(v),j=le=>{n==null||n(le),a||p.captureEvent("click",O,{attributes:{to:v}})};return U?t.createElement(g.Z,{ref:d,href:v,onClick:j,...k?{target:"_blank",rel:"noopener"}:{},...c}):t.createElement(g.Z,{ref:d,component:R.rU,onClick:j,...c})}),X=t.forwardRef((n,a)=>t.createElement(T,{ref:a,...n,color:"initial"})),F=t.forwardRef((n,a)=>t.createElement(h.Z,{ref:a,component:X,...n}));var b=e(60364),D=e(61837),Z=e(80030),M=e(19353),K=e(95074);function ae(n){const{text:a,tooltipDelay:c=1e3,tooltipText:d="Text copied to clipboard"}=n,p=(0,l.useApi)(l.errorApiRef),[v,O]=(0,t.useState)(!1),[{error:U},k]=(0,K.Z)();(0,t.useEffect)(()=>{U&&p.post(U)},[U,p]);const j=le=>{le.stopPropagation(),O(!0),k(a)};return t.createElement(t.Fragment,null,t.createElement(Z.ZP,{id:"copy-test-tooltip",title:d,placement:"top",leaveDelay:c,onClose:()=>O(!1),open:v},t.createElement(D.Z,{onClick:j},t.createElement(M.Z,null))))}var pe=e(83229),Me=e(26639),Ue=e(39595);function de(n){const{text:a,language:c,showLineNumbers:d=!1,highlightedNumbers:p,customStyle:v,showCopyCodeButton:O=!1}=n,U=(0,b.Z)(),k=U.palette.type==="dark"?Me.Z:Ue.Z,j=U.palette.type==="dark"?"#256bf3":"#e6ffed";return t.createElement("div",{style:{position:"relative"}},t.createElement(pe.Z,{customStyle:v,language:c,style:k,showLineNumbers:d,wrapLines:!0,lineNumberStyle:{color:U.palette.textVerySubtle},lineProps:le=>p!=null&&p.includes(le)?{style:{backgroundColor:j}}:{}},a),O&&t.createElement("div",{style:{position:"absolute",top:0,right:0}},t.createElement(ae,{text:a})))}var je=e(41156),_e=e(88188);function Qe(n){const{title:a,to:c}=n,d=(0,je.Z)(p=>p.breakpoints.down("xs"));return c?d?t.createElement(D.Z,{component:R.rU,color:"primary",title:a,size:"small",to:c},t.createElement(_e.Z,null)):t.createElement(h.Z,{component:R.rU,variant:"contained",color:"primary",to:c},a):null}var rt;(function(n){const a="TB";n.TOP_BOTTOM=a;const c="BT";n.BOTTOM_TOP=c;const d="LR";n.LEFT_RIGHT=d;const p="RL";n.RIGHT_LEFT=p})(rt||(rt={}));var ot;(function(n){const a="UL";n.UP_LEFT=a;const c="UR";n.UP_RIGHT=c;const d="DL";n.DOWN_LEFT=d;const p="DR";n.DOWN_RIGHT=p})(ot||(ot={}));var gt;(function(n){const a="network-simplex";n.NETWORK_SIMPLEX=a;const c="tight-tree";n.TIGHT_TREE=c;const d="longest-path";n.LONGEST_PATH=d})(gt||(gt={}));var Le;(function(n){const a="l";n.LEFT=a;const c="r";n.RIGHT=c;const d="c";n.CENTER=d})(Le||(Le={}));var Xe=e(13387),Ye=e(11105),Rt=e(97963),pt=e(46506),St=e.n(pt),lt=e(54073),yt=e.n(lt),bt=e(10368);const Tt=(0,i.Z)(n=>({node:{fill:n.palette.primary.light,stroke:n.palette.primary.light},text:{fill:n.palette.primary.contrastText}}),{name:"BackstageDependencyGraphDefaultNode"});function Mt({node:{id:n}}){const a=Tt(),[c,d]=t.useState(0),[p,v]=t.useState(0),O=t.useRef(null);t.useLayoutEffect(()=>{if(O.current){let{height:le,width:re}=O.current.getBBox();le=Math.round(le),re=Math.round(re),(le!==p||re!==c)&&(d(re),v(le))}},[c,p]);const U=10,k=c+U*2,j=p+U*2;return t.createElement("g",null,t.createElement("rect",{className:a.node,width:k,height:j,rx:10}),t.createElement("text",{ref:O,className:a.text,y:j/2,x:k/2,textAnchor:"middle",alignmentBaseline:"middle"},n))}const Bt="arrow-marker",It="node",ze="edge",ct="label",ke=(0,bt.Z)(n=>({node:{transition:`${n.transitions.duration.shortest}ms`}}),{name:"BackstageDependencyGraphNode"}),Ct=n=>t.createElement(Mt,{...n});function ut({render:n=Ct,setNode:a,node:c}){const{width:d,height:p,x:v=0,y:O=0}=c,U=c,k=ke(),j=t.useRef(null);return t.useLayoutEffect(()=>{if(j.current){let{height:le,width:re}=j.current.getBBox();le=Math.round(le),re=Math.round(re),(le!==p||re!==d)&&a(c.id,{...c,height:le,width:re})}},[c,d,p,a]),t.createElement("g",{ref:j,"data-testid":It,className:k.node,transform:`translate(${v-d/2},${O-p/2})`},n({node:U}))}var Et=e(55876),q=e(66481),N=e(19574),ne=e.n(N);const ce=(0,bt.Z)(n=>({text:{fill:n.palette.textContrast}}),{name:"BackstageDependencyGraphDefaultLabel"});function se({edge:{label:n}}){const a=ce();return t.createElement("text",{className:a.text,textAnchor:"middle"},n)}const Ee=(0,bt.Z)(n=>({path:{strokeWidth:2,stroke:n.palette.textSubtle,fill:"none",transition:`${n.transitions.duration.shortest}ms`},label:{transition:`${n.transitions.duration.shortest}ms`}}),{name:"BackstageDependencyGraphEdge"}),Ze=n=>t.createElement(se,{...n}),$e=Et.Z().x(n=>n.x).y(n=>n.y).curve(q.Z);function at({render:n=Ze,setEdge:a,id:c,edge:d}){const{x:p=0,y:v=0,width:O,height:U,points:k}=d,j=d,le=Ee(),re=t.useRef(null);t.useLayoutEffect(()=>{if(re.current){let{height:Re,width:be}=re.current.getBBox();Re=Math.round(Re),be=Math.round(be),(Re!==U||be!==O)&&a(c,{...d,height:Re,width:be})}},[d,U,O,a,c]);let Ce="";if(k){const Re=k.filter(be=>ne()(be.x)&&ne()(be.y));Ce=$e(Re)||""}return t.createElement(t.Fragment,null,Ce&&t.createElement("path",{"data-testid":ze,className:le.path,markerEnd:`url(#${Bt})`,d:Ce}),j.label?t.createElement("g",{ref:re,"data-testid":ct,className:le.label,transform:`translate(${p},${v})`},n({edge:j})):null)}const te="workspace";function Y(n){var ir,ao;const{edges:a,nodes:c,renderNode:d,direction:p=rt.TOP_BOTTOM,align:v,nodeMargin:O=50,edgeMargin:U=10,rankMargin:k=50,paddingX:j=0,paddingY:le=0,acyclicer:re,ranker:Ce=gt.NETWORK_SIMPLEX,labelPosition:Re=Le.RIGHT,labelOffset:be=10,edgeRanks:mt=1,edgeWeight:Ot=1,renderLabel:Nt,defs:Wt,zoom:dt="enabled",...Dt}=n,Ft=(0,Rt.Z)(),[Jt,Fn]=t.useState(100),[mn,Dr]=t.useState(100),Pt=t.useRef(new(St()).graphlib.Graph),[Bn,ma]=t.useState(((ir=Pt.current.graph())==null?void 0:ir.width)||0),[jn,ha]=t.useState(((ao=Pt.current.graph())==null?void 0:ao.height)||0),[_r,ea]=t.useState([]),[ga,Qt]=t.useState([]),on=Math.max(Bn,Jt),hn=Math.max(jn,mn),Vn=t.useMemo(()=>yt()(zt=>{if(!zt)return;const Xt=Ye.Z(zt),Ut=Ye.Z(zt.getElementById(te));function vn(){Xt.call(Xe.sP().scaleExtent([1,10]).on("zoom",xn=>{xn.transform.x=Math.min(0,Math.max(xn.transform.x,on-on*xn.transform.k)),xn.transform.y=Math.min(0,Math.max(xn.transform.y,hn-hn*xn.transform.k)),Ut.attr("transform",xn.transform)}))}dt==="enabled"?vn():dt==="enable-on-click"&&Xt.on("click",()=>vn());const{width:An,height:ta}=zt.getBoundingClientRect();Jt!==An&&Fn(An),mn!==ta&&Dr(ta)},100),[mn,Jt,on,hn,dt]),Vt=t.useCallback(()=>{const zt=Pt.current.nodes(),Xt=Pt.current.edges();zt.forEach(Ut=>{c.some(An=>An.id===Ut)||Pt.current.removeNode(Ut)}),Xt.forEach(Ut=>{a.some(An=>An.from===Ut.v&&An.to===Ut.w)||Pt.current.removeEdge(Ut.v,Ut.w)}),c.forEach(Ut=>{const vn=Pt.current.nodes().find(An=>Ut.id===An);if(vn&&Pt.current.node(vn)){const{width:An,height:ta,x:xn,y:Hi}=Pt.current.node(vn);Pt.current.setNode(vn,{...Ut,width:An,height:ta,x:xn,y:Hi})}else Pt.current.setNode(Ut.id,{...Ut,width:0,height:0})}),a.forEach(Ut=>{Pt.current.setEdge(Ut.from,Ut.to,{...Ut,label:Ut.label,width:0,height:0,labelpos:Re,labeloffset:be,weight:Ot,minlen:mt})})},[a,c,Re,be,Ot,mt]),Gt=t.useMemo(()=>yt()(()=>{St().layout(Pt.current);const{height:zt,width:Xt}=Pt.current.graph(),Ut=Math.max(0,zt||0),vn=Math.max(0,Xt||0);ma(vn),ha(Ut),ea(Pt.current.nodes()),Qt(Pt.current.edges())},250,{leading:!0}),[]);t.useEffect(()=>(Pt.current.setGraph({rankdir:p,align:v,nodesep:O,edgesep:U,ranksep:k,marginx:j,marginy:le,acyclicer:re,ranker:Ce}),Vt(),Gt(),Gt.cancel),[re,v,p,U,j,le,O,k,Ce,Vt,Gt]);function sr(zt,Xt){return Pt.current.setNode(zt,Xt),Gt(),Pt.current}function Gn(zt,Xt){return Pt.current.setEdge(zt,Xt),Gt(),Pt.current}return t.createElement("svg",{ref:Vn,...Dt,width:"100%",height:hn,viewBox:`0 0 ${on} ${hn}`},t.createElement("defs",null,t.createElement("marker",{id:Bt,viewBox:"0 0 24 24",markerWidth:"14",markerHeight:"14",refX:"16",refY:"12",orient:"auto",markerUnits:"strokeWidth"},t.createElement("path",{fill:Ft.palette.textSubtle,d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})),Wt),t.createElement("g",{id:te},t.createElement("svg",{width:Bn,height:jn,y:hn/2-jn/2,x:on/2-Bn/2,viewBox:`0 0 ${Bn} ${jn}`},ga.map(zt=>{const Xt=Pt.current.edge(zt);return Xt?t.createElement(at,{key:`${zt.v}-${zt.w}`,id:zt,setEdge:Gn,render:Nt,edge:Xt}):null}),_r.map(zt=>{const Xt=Pt.current.node(zt);return Xt?t.createElement(ut,{key:zt,setNode:sr,render:d,node:Xt}):null}))))}var z=e(72779),ie=e.n(z);const Te=(0,i.Z)(n=>{var a;return{root:{padding:n.spacing(0),marginBottom:n.spacing(0),marginTop:n.spacing(0),display:"flex",flexFlow:"row nowrap"},topPosition:{position:"relative",marginBottom:n.spacing(6),marginTop:-n.spacing(3),zIndex:"unset"},icon:{fontSize:20},content:{width:"100%",maxWidth:"inherit",flexWrap:"nowrap"},message:{display:"flex",alignItems:"center",color:n.palette.banner.text,"& a":{color:n.palette.banner.link}},info:{backgroundColor:n.palette.banner.info},error:{backgroundColor:n.palette.banner.error},warning:{backgroundColor:(a=n.palette.banner.warning)!=null?a:n.palette.banner.error}}},{name:"BackstageDismissableBanner"}),Oe=n=>{var Re;const{variant:a,message:c,id:d,fixed:p=!1}=n,v=Te(),U=useApi(storageApiRef).forBucket("notifications"),k=(Re=U.snapshot("dismissedBanners").value)!=null?Re:[],[j,le]=useState(new Set(k)),re=useObservable(U.observe$("dismissedBanners"));useEffect(()=>{var be;if(re!=null&&re.value){const mt=(be=re==null?void 0:re.value)!=null?be:[];le(new Set(mt))}},[re==null?void 0:re.value]);const Ce=()=>{U.set("dismissedBanners",[...j,d])};return React.createElement(Snackbar,{anchorOrigin:p?{vertical:"bottom",horizontal:"center"}:{vertical:"top",horizontal:"center"},open:!j.has(d),classes:{root:classNames(v.root,!p&&v.topPosition)}},React.createElement(SnackbarContent,{classes:{root:classNames(v.content,v[a]),message:v.message},message:c,action:[React.createElement(IconButton,{key:"dismiss",title:"Permanently dismiss this message",color:"inherit",onClick:Ce},React.createElement(Close,{className:v.icon}))]}))};var ve=e(60905),De=e(90436),vt=e(86284),Lt=e(96465),$=e(19133),C=e(3871);const V=(0,i.Z)({generalImg:{width:"95%",zIndex:2,position:"relative",left:"50%",top:"50%",transform:"translate(-50%, 15%)"}},{name:"BackstageEmptyStateImage"}),ue=({missing:n})=>{const a=V();switch(n){case"field":return t.createElement("img",{src:vt,className:a.generalImg,alt:"annotation is missing"});case"info":return t.createElement("img",{src:Lt,alt:"no Information",className:a.generalImg});case"content":return t.createElement("img",{src:$,alt:"create Component",className:a.generalImg});case"data":return t.createElement("img",{src:C,alt:"no Build",className:a.generalImg});default:return null}},ge=(0,i.Z)(n=>({root:{backgroundColor:n.palette.background.default,padding:n.spacing(2,0,0,0)},action:{marginTop:n.spacing(2)},imageContainer:{position:"relative"}}),{name:"BackstageEmptyState"});function me(n){const{title:a,description:c,missing:d,action:p}=n,v=ge();return t.createElement(ve.Z,{container:!0,direction:"row",justifyContent:"space-around",alignItems:"flex-start",className:v.root,spacing:2},t.createElement(ve.Z,{item:!0,xs:12,md:6},t.createElement(ve.Z,{container:!0,direction:"column"},t.createElement(ve.Z,{item:!0,xs:!0},t.createElement(De.Z,{variant:"h5"},a)),t.createElement(ve.Z,{item:!0,xs:!0},t.createElement(De.Z,{variant:"body1"},c)),t.createElement(ve.Z,{item:!0,xs:!0,className:v.action},p))),t.createElement(ve.Z,{item:!0,xs:12,md:6,className:v.imageContainer},t.createElement(ue,{missing:d})))}const Se=`apiVersion: backstage.io/v1alpha1
|
|
2
2
|
kind: Component
|
|
3
3
|
metadata:
|
|
4
4
|
name: example
|
|
@@ -8,9 +8,9 @@ metadata:
|
|
|
8
8
|
spec:
|
|
9
9
|
type: website
|
|
10
10
|
lifecycle: production
|
|
11
|
-
owner: user:guest`,
|
|
12
|
-
`),Ce=(be=
|
|
13
|
-
`),Re=JSON.stringify(v,void 0,2);return t.createElement(pn,{title:a!=null?a:c.message,defaultExpanded:d,error:{name:
|
|
11
|
+
owner: user:guest`,et=(0,i.Z)(n=>({code:{borderRadius:6,margin:`${n.spacing(2)}px 0px`,background:n.palette.type==="dark"?"#444":"#fff"}}),{name:"BackstageMissingAnnotationEmptyState"});function st(n){const{annotation:a}=n,c=et(),d=t.createElement(t.Fragment,null,"The ",t.createElement("code",null,a)," annotation is missing. You need to add the annotation to your component if you want to enable this tool.");return t.createElement(me,{missing:"field",title:"Missing Annotation",description:d,action:t.createElement(t.Fragment,null,t.createElement(De.Z,{variant:"body1"},"Add the annotation to your component YAML as shown in the highlighted example below:"),t.createElement("div",{className:c.code},t.createElement(de,{text:Se.replace("ANNOTATION",a),language:"yaml",showLineNumbers:!0,highlightedNumbers:[6,7],customStyle:{background:"inherit",fontSize:"115%"}})),t.createElement(h.Z,{color:"primary",component:T,to:"https://backstage.io/docs/features/software-catalog/well-known-annotations"},"Read more"))})}var Ve=e(11776),Je=e(38402),ht=e(49378),it=e(41128),we=e(27616),w=e(8284),y=e(70660),I=e(91750),H=e(38016);const Q=(n,a)=>(a.palette.type==="light"?it._j:it.$n)(a.palette[n].light,.6),xe=(n,a)=>(a.palette.type==="light"?it.$n:it._j)(a.palette[n].light,.9),Ae=(0,i.Z)(n=>({root:{marginRight:n.spacing(1),fill:({severity:a})=>Q(a,n)}})),Ie=({severity:n})=>{const a=Ae({severity:n});return t.createElement(I.Z,{classes:a})},He=({severity:n})=>{const a=Ae({severity:n});return t.createElement(H.Z,{classes:a})},ft=(0,i.Z)(n=>({panel:{backgroundColor:({severity:a})=>xe(a,n),color:({severity:a})=>Q(a,n),verticalAlign:"middle"},summary:{display:"flex",flexDirection:"row"},summaryText:{color:({severity:a})=>Q(a,n),fontWeight:"bold"},message:{width:"100%",display:"block",color:({severity:a})=>Q(a,n),backgroundColor:({severity:a})=>xe(a,n)},details:{width:"100%",display:"block",color:n.palette.textContrast,backgroundColor:n.palette.background.default,border:`1px solid ${n.palette.border}`,padding:n.spacing(2),fontFamily:"sans-serif"}}),{name:"BackstageWarningPanel"}),Ht=n=>n.charAt(0).toLocaleUpperCase("en-US")+n.slice(1);function qt(n){const{severity:a="warning",title:c,message:d,children:p,defaultExpanded:v}=n,O=ft({severity:a}),U=Ht(a)+(c?`: ${c}`:"");return t.createElement(we.Z,{defaultExpanded:v!=null?v:!1,className:O.panel,role:"alert"},t.createElement(w.Z,{expandIcon:t.createElement(He,{severity:a}),className:O.summary},t.createElement(Ie,{severity:a}),t.createElement(De.Z,{className:O.summaryText,variant:"subtitle1"},U)),(d||p)&&t.createElement(y.Z,null,t.createElement(ve.Z,{container:!0},d&&t.createElement(ve.Z,{item:!0,xs:12},t.createElement(De.Z,{className:O.message,variant:"body1"},d)),p&&t.createElement(ve.Z,{item:!0,xs:12,className:O.details},p))))}const Mn=(0,i.Z)(n=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:n.spacing(2)},divider:{margin:n.spacing(2)}}),{name:"BackstageErrorPanel"}),Fr=({error:n,message:a,stack:c,children:d})=>{const p=Mn();return t.createElement(Ve.Z,{dense:!0},t.createElement(Je.Z,{alignItems:"flex-start"},t.createElement(ht.Z,{classes:{secondary:p.text},primary:"Error",secondary:n}),t.createElement(ae,{text:n})),t.createElement(Je.Z,{alignItems:"flex-start"},t.createElement(ht.Z,{classes:{secondary:p.text},primary:"Message",secondary:a}),t.createElement(ae,{text:a})),c&&t.createElement(Je.Z,{alignItems:"flex-start"},t.createElement(ht.Z,{classes:{secondary:p.text},primary:"Stack Trace",secondary:c}),t.createElement(ae,{text:c})),d)};function pn(n){const{title:a,error:c,defaultExpanded:d,children:p}=n;return t.createElement(qt,{severity:"error",title:a!=null?a:c.message,defaultExpanded:d},t.createElement(Fr,{error:c.name,message:c.message,stack:c.stack,children:p}))}var Kn=e(85256);const Br=(0,i.Z)(n=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:n.spacing(2)},divider:{margin:n.spacing(2)}}),{name:"BackstageResponseErrorPanel"});function lr(n){var be;const{title:a,error:c,defaultExpanded:d}=n,p=Br();if(c.name!=="ResponseError")return t.createElement(pn,{title:a!=null?a:c.message,defaultExpanded:d,error:c});const{body:v,cause:O}=c,{request:U,response:k}=v,j=`${k.statusCode}: ${O.name}`,le=U&&`${U.method} ${U.url}`,re=O.message.replace(/\\n/g,`
|
|
12
|
+
`),Ce=(be=O.stack)==null?void 0:be.replace(/\\n/g,`
|
|
13
|
+
`),Re=JSON.stringify(v,void 0,2);return t.createElement(pn,{title:a!=null?a:c.message,defaultExpanded:d,error:{name:j,message:re,stack:Ce}},le&&t.createElement(Je.Z,{alignItems:"flex-start"},t.createElement(ht.Z,{classes:{secondary:p.text},primary:"Request",secondary:U?`${le}`:void 0}),t.createElement(ae,{text:le})),t.createElement(t.Fragment,null,t.createElement(Kn.Z,{component:"li",className:p.divider}),t.createElement(Je.Z,{alignItems:"flex-start"},t.createElement(ht.Z,{classes:{secondary:p.text},primary:"Full Error as JSON"})),t.createElement(de,{language:"json",text:Re,showCopyCodeButton:!0})))}var cr=e(47093);function Jn(n){const a=document.createElement("div");return a.setAttribute("id",n),a}function Mr(n){document.body.insertBefore(n,document.body.lastElementChild.nextElementSibling)}function na(n){const a=useRef(null);useEffect(function(){const p=document.querySelector(`#${n}`),v=p||Jn(n);return p||Mr(v),v.appendChild(a.current),function(){a.current.remove(),v.childNodes.length===-1&&v.remove()}},[n]);function c(){return a.current||(a.current=document.createElement("div")),a.current}return c()}var ur=null;const Sn="core.calloutSeen";function Zn(){const[n,a]=useState(()=>{const d=localStorage.getItem(Sn);return d?JSON.parse(d):{}}),c=useCallback((d,p)=>{const v=localStorage.getItem(Sn),U={...v?JSON.parse(v):{},[d]:p};a(U),localStorage.setItem(Sn,JSON.stringify(U))},[]);return{states:n,setState:c}}function dr(n){const{states:a,setState:c}=Zn(),d=useCallback(()=>{c(n,!0)},[c,n]);return{seen:a[n]===!0,markSeen:d}}function On(n){const{seen:a,markSeen:c}=dr(n);return{show:a===!1,hide:c}}const fr=(0,i.Z)({"@keyframes pulsateSlightly":{"0%":{transform:"scale(1.0)"},"100%":{transform:"scale(1.1)"}},"@keyframes pulsateAndFade":{"0%":{transform:"scale(1.0)",opacity:.9},"100%":{transform:"scale(1.5)",opacity:0}},featureWrapper:{position:"relative"},backdrop:{zIndex:2e3,position:"fixed",overflow:"hidden",left:0,right:0,top:0,bottom:0},dot:{position:"absolute",backgroundColor:"transparent",borderRadius:"100%",border:"1px solid rgba(103, 146, 180, 0.98)",boxShadow:"0px 0px 0px 20000px rgba(0, 0, 0, 0.5)",zIndex:2001,transformOrigin:"center center",animation:"$pulsateSlightly 1744ms 1.2s cubic-bezier(0.4, 0, 0.2, 1) alternate infinite"},pulseCircle:{width:"100%",height:"100%",backgroundColor:"transparent",borderRadius:"100%",border:"2px solid white",zIndex:2001,transformOrigin:"center center",animation:"$pulsateAndFade 872ms 1.2s cubic-bezier(0.4, 0, 0.2, 1) infinite"},text:{position:"absolute",color:"white",zIndex:2003}},{name:"BackstageFeatureCalloutCircular"});function $t(n){const{featureId:a,title:c,description:d,children:p}=n,{show:v,hide:O}=useShowCallout(a),U=usePortal("core.callout"),k=useRef(null),[j,le]=useState(),re=fr(),Ce=useCallback(()=>{if(k.current){const Re=k.current.getBoundingClientRect(),be=Math.max(Re.width,Re.height),mt=800,Ot=Re.x-(be-Re.width)/2-mt,Nt=Re.y-(be-Re.height)/2-mt,Wt=be+2*mt,dt=450,Dt=Re.x+Re.width/2-dt,Ft=Re.y-(be-Re.height)/2+be+20;le({dotLeft:Ot,dotTop:Nt,dotSize:Wt,borderWidth:mt,textTop:Ft,textLeft:Dt,textWidth:dt})}},[]);return useEffect(()=>(window.addEventListener("resize",Ce),window.addEventListener("scroll",Ce),()=>{window.removeEventListener("resize",Ce),window.removeEventListener("scroll",Ce)}),[Ce]),useLayoutEffect(Ce,[k.current,Ce]),v?React.createElement(React.Fragment,null,React.createElement("div",{className:re.featureWrapper,ref:k},p),createPortal(React.createElement("div",{className:re.backdrop},React.createElement(ClickAwayListener,{onClickAway:O},React.createElement(React.Fragment,null,React.createElement("div",{className:re.dot,"data-testid":"dot",style:{left:j==null?void 0:j.dotLeft,top:j==null?void 0:j.dotTop,width:j==null?void 0:j.dotSize,height:j==null?void 0:j.dotSize,borderWidth:j==null?void 0:j.borderWidth},onClick:O,onKeyDown:O,role:"button",tabIndex:0},React.createElement("div",{className:re.pulseCircle})),React.createElement("div",{className:re.text,"data-testid":"text",style:{left:j==null?void 0:j.textLeft,top:j==null?void 0:j.textTop,width:j==null?void 0:j.textWidth}},React.createElement(Typography,{variant:"h2",paragraph:!0},c),React.createElement(Typography,null,d))))),U)):React.createElement(React.Fragment,null,p)}var Zr=e(35292);const jt=(0,i.Z)(n=>({link:{display:"grid",justifyItems:"center",gridGap:4,textAlign:"center"},disabled:{color:"gray",cursor:"default"},primary:{color:n.palette.primary.main},secondary:{color:n.palette.secondary.main},label:{fontSize:"0.7rem",textTransform:"uppercase",fontWeight:600,letterSpacing:1.2}}),{name:"BackstageIconLinkVertical"});function $r({color:n="primary",disabled:a=!1,href:c="#",icon:d=t.createElement(Zr.Z,null),label:p,onClick:v,title:O}){const U=jt();return a?t.createElement(g.Z,{title:O,className:ie()(U.link,U.disabled),underline:"none"},d,t.createElement("span",{className:U.label},p)):t.createElement(g.Z,{title:O,className:ie()(U.link,U[n]),to:c,component:T,onClick:v},d,t.createElement("span",{className:U.label},p))}const Yn=(0,i.Z)(n=>({links:{margin:n.spacing(2,0),display:"grid",gridAutoFlow:"column",gridAutoColumns:"min-content",gridGap:n.spacing(3)}}),{name:"BackstageHeaderIconLinkRow"});function Nr(n){const{links:a}=n,c=Yn();return t.createElement("nav",{className:c.links},a.map((d,p)=>t.createElement($r,{key:p+1,...d})))}const mr=n=>{const a=n==="dark"?"16%":"97%";return`
|
|
14
14
|
hsl(0, 0%, ${a}) 0%,
|
|
15
15
|
hsla(0, 0%, ${a}, 0.987) 8.1%,
|
|
16
16
|
hsla(0, 0%, ${a}, 0.951) 15.5%,
|
|
@@ -27,42 +27,42 @@ spec:
|
|
|
27
27
|
hsla(0, 0%, ${a}, 0.049) 84.5%,
|
|
28
28
|
hsla(0, 0%, ${a}, 0.013) 91.9%,
|
|
29
29
|
hsla(0, 0%, ${a}, 0) 100%
|
|
30
|
-
`},kn=100,Qn=10,Ur=(0,i.Z)(n=>({root:{position:"relative",display:"flex",flexFlow:"row nowrap",alignItems:"center"},container:{overflow:"auto",scrollbarWidth:0,"&::-webkit-scrollbar":{display:"none"}},fade:{position:"absolute",width:kn,height:`calc(100% + ${Qn}px)`,transition:"opacity 300ms",pointerEvents:"none"},fadeLeft:{left:-Qn,background:`linear-gradient(90deg, ${mr(n.palette.type)})`},fadeRight:{right:-Qn,background:`linear-gradient(270deg, ${mr(n.palette.type)})`},fadeHidden:{opacity:0},button:{position:"absolute"},buttonLeft:{left:-n.spacing(2)},buttonRight:{right:-n.spacing(2)}}),{name:"BackstageHorizontalScrollGrid"});function wr(n){const[[a,c],d]=React.useState([0,0]);return React.useLayoutEffect(()=>{const p=n.current;if(!p){d([0,0]);return}const v=()=>{const D=p.scrollLeft,$=p.scrollWidth-p.offsetWidth-p.scrollLeft;d([D,$])};return v(),p.addEventListener("scroll",v),window.addEventListener("resize",v),()=>{p.removeEventListener("scroll",v),window.removeEventListener("resize",v)}},[n]),[a,c]}function zr(n,a,c){const[d,p]=React.useState(0);return React.useLayoutEffect(()=>{if(d===0)return;const v=performance.now(),D=requestAnimationFrame($=>{if(!n.current)return;const Y=$-v,V=Math.abs(d)*Y/a,re=Math.max(c,V)*Math.sign(d);n.current.scrollBy({left:re});const Ce=d-re;Math.sign(d)!==Math.sign(Ce)?p(0):p(Ce)});return()=>cancelAnimationFrame(D)},[n,d,a,c]),p}function Tn(n){const{scrollStep:a=100,scrollSpeed:c=50,minScrollDistance:d=5,children:p,...v}=n,D=Ur(n),$=React.useRef(),[Y,V]=wr($),le=zr($,c,d),re=Ce=>{!$.current||le(Ce?a:-a)};return React.createElement("div",{...v,className:D.root},React.createElement(Grid,{container:!0,direction:"row",wrap:"nowrap",className:D.container,ref:$},p),React.createElement("div",{className:classNames(D.fade,D.fadeLeft,{[D.fadeHidden]:Y===0})}),React.createElement("div",{className:classNames(D.fade,D.fadeRight,{[D.fadeHidden]:V===0})}),Y>0&&React.createElement(IconButton,{title:"Scroll Left",onClick:()=>re(!1),className:classNames(D.button,D.buttonLeft,{})},React.createElement(ChevronLeftIcon,null)),V>0&&React.createElement(IconButton,{title:"Scroll Right",onClick:()=>re(!0),className:classNames(D.button,D.buttonRight,{})},React.createElement(ChevronRightIcon,null)))}const ln=(0,i.Z)({alpha:{color:"#ffffff",fontFamily:"serif",fontWeight:"normal",fontStyle:"italic"},beta:{color:"#4d65cc",fontFamily:"serif",fontWeight:"normal",fontStyle:"italic"}},{name:"BackstageLifecycle"});function $n(n){const a=ln(n),{shorthand:c,alpha:d}=n;return c?React.createElement("span",{className:a[d?"alpha":"beta"],style:{fontSize:"120%"}},d?React.createElement(React.Fragment,null,"\u03B1"):React.createElement(React.Fragment,null,"\u03B2")):React.createElement("span",{className:a[d?"alpha":"beta"]},d?"Alpha":"Beta")}const Yt=(0,t.lazy)(()=>Promise.all([e.e(3860),e.e(8718)]).then(e.bind(e,98718)).then(n=>({default:n.RealLogViewer})));function Nn(n){const{Progress:a}=(0,l.useApp)().getComponents();return t.createElement(t.Suspense,{fallback:t.createElement(a,null)},t.createElement(Yt,{...n}))}const hr=(0,i.Z)(n=>({markdown:{"& table":{borderCollapse:"collapse",border:`1px solid ${n.palette.border}`},"& th, & td":{border:`1px solid ${n.palette.border}`,padding:n.spacing(1)},"& td":{wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:n.spacing(3,2,3,2.5),borderBottom:0},"& th":{backgroundColor:n.palette.background.paper},"& tr":{backgroundColor:n.palette.background.paper},"& tr:nth-child(odd)":{backgroundColor:n.palette.background.default},"& a":{color:n.palette.link},"& img":{maxWidth:"100%"}}}),{name:"BackstageMarkdownContent"}),Un={code:({inline:n,className:a,children:c,...d})=>{const p=String(c).replace(/\n+$/,""),v=/language-(\w+)/.exec(a||"");return!n&&v?t.createElement(fe,{language:v[1],text:p}):t.createElement("code",{className:a,...d},c)}};function Wr(n){const{content:a,dialect:c="gfm",linkTarget:d}=n,p=hr();return React.createElement(ReactMarkdown,{remarkPlugins:c==="gfm"?[gfm]:[],className:p.markdown,children:a,components:Un,linkTarget:d})}var gr=e(10179);const wn=(0,i.Z)(n=>({root:{paddingLeft:n.spacing(3)}}),{name:"BackstageLoginRequestListItem"}),cn=({request:n,busy:a,setBusy:c})=>{const d=wn(),[p,v]=useState(),D=async()=>{c(!0);try{await n.trigger()}catch(Y){v(isError(Y)?Y.message:"An unspecified error occurred")}finally{c(!1)}},$=n.provider.icon;return React.createElement(ListItem,{button:!0,disabled:a,classes:{root:d.root}},React.createElement(ListItemAvatar,null,React.createElement($,{fontSize:"large"})),React.createElement(ListItemText,{primary:n.provider.title,secondary:p&&React.createElement(Typography,{color:"error"},p)}),React.createElement(Button,{color:"primary",variant:"contained",onClick:D},"Log in"))};var Xn=null;const Dn=(0,i.Z)(n=>({dialog:{paddingTop:n.spacing(1)},title:{minWidth:0},contentList:{padding:0},actionButtons:{padding:n.spacing(2,0)}}),{name:"OAuthRequestDialog"});function qn(n){const a=Dn(),[c,d]=useState(!1),p=useApi(oauthRequestApiRef),v=useObservable(useMemo(()=>p.authRequest$(),[p]),[]),D=()=>{v.forEach($=>$.reject())};return React.createElement(Dialog,{open:Boolean(v.length),fullWidth:!0,maxWidth:"xs",classes:{paper:a.dialog}},React.createElement(DialogTitle,{classes:{root:a.title}},"Login Required"),React.createElement(DialogContent,{dividers:!0,classes:{root:a.contentList}},React.createElement(List,null,v.map($=>React.createElement(LoginRequestListItem,{key:$.provider.title,request:$,busy:c,setBusy:d})))),React.createElement(DialogActions,{classes:{root:a.actionButtons}},React.createElement(Button,{onClick:D},"Reject All")))}var pr=e(15277),yr=e.n(pr),Er=e(29862);const zn=(0,i.Z)({container:{overflow:"visible !important"}},{name:"BackstageOverflowTooltip"});function vr(n){var D;const[a,c]=(0,t.useState)(!1),d=(0,Er.t)(),p=zn(),v=$=>{d()&&c($)};return t.createElement(z.ZP,{title:(D=n.title)!=null?D:n.text||"",placement:n.placement,disableHoverListener:!a},t.createElement(yr(),{text:n.text,line:n.line,onToggled:v,containerClassName:p.container}))}var Ar=e(67358);function _n(n){const[a,c]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{const d=setTimeout(()=>c(!0),250);return()=>clearTimeout(d)},[]),a?t.createElement(Ar.Z,{...n,"data-testid":"progress"}):t.createElement("div",{style:{display:"none"}})}var Rr=e(94339),Wn=e(14503),_t=e(24579),Hn=e(32552),Kt=e(15459),un=e(95544),Cr=e(27597);const Sr=(0,i.Z)(n=>({root:{maxWidth:"fit-content",padding:n.spacing(2,2,2,2.5)},boxTitle:{margin:0,color:n.palette.textSubtle},arrow:{color:n.palette.textSubtle}}),{name:"BackstageBottomLink"});function er(n){const{link:a,title:c,onClick:d}=n,p=Sr();return t.createElement("div",null,t.createElement(Kn.Z,null),t.createElement(b,{to:a,onClick:d,underline:"none"},t.createElement(un.Z,{display:"flex",alignItems:"center",className:p.root},t.createElement(un.Z,{className:p.boxTitle,fontWeight:"fontWeightBold",m:1},t.createElement(Fe.Z,null,t.createElement("strong",null,c))),t.createElement(Cr.Z,{className:p.arrow}))))}const Pn=n=>{const{slackChannel:a}=n;if(a){if(typeof a=="string")return t.createElement(t.Fragment,null,"Please contact ",a," for help.");if(!a.href)return t.createElement(t.Fragment,null,"Please contact ",a.name," for help.")}else return null;return t.createElement(I,{to:a.href,variant:"contained"},a.name)},bn=class extends t.Component{constructor(a){super(a);this.state={error:void 0,errorInfo:void 0}}componentDidCatch(a,c){console.error(`ErrorBoundary, error: ${a}, info: ${c}`),this.setState({error:a,errorInfo:c})}render(){const{slackChannel:a,children:c}=this.props,{error:d}=this.state;return d?t.createElement(pn,{title:"Something Went Wrong",error:d},t.createElement(Pn,{slackChannel:a})):c}},Tr=(0,i.Z)(n=>({noPadding:{padding:0,"&:last-child":{paddingBottom:0}},header:{padding:n.spacing(2,2,2,2.5)},headerTitle:{fontWeight:700},headerSubheader:{paddingTop:n.spacing(1)},headerAvatar:{},headerAction:{},headerContent:{},subheader:{display:"flex"}}),{name:"BackstageInfoCard"}),Pr=(0,Kt.Z)(n=>({root:{display:"inline-block",padding:n.spacing(8,8,0,0),float:"right"}}),{name:"BackstageInfoCardCardActionsTopRight"})(Wn.Z),tr={card:{flex:{display:"flex",flexDirection:"column"},fullHeight:{display:"flex",flexDirection:"column",height:"100%"},gridItem:{display:"flex",flexDirection:"column",height:"calc(100% - 10px)",marginBottom:"10px"}},cardContent:{fullHeight:{flex:1},gridItem:{flex:1}}};function Rn(n){const{title:a,subheader:c,divider:d=!0,deepLink:p,slackChannel:v,errorBoundaryProps:D,variant:$,children:Y,headerStyle:V,headerProps:le,icon:re,action:Ce,actionsClassName:Re,actions:be,cardClassName:mt,actionsTopRight:Ot,className:Nt,noPadding:Wt,titleTypographyProps:dt}=n,Dt=Tr();let Ft={},Jt={};$&&$.split(/[\s]+/g).forEach(bt=>{Ft={...Ft,...tr.card[bt]},Jt={...Jt,...tr.cardContent[bt]}});const Fn=()=>t.createElement("div",{className:Dt.headerSubheader},c&&t.createElement("div",{className:Dt.subheader},c),re),mn=D||(v?{slackChannel:v}:{});return t.createElement(Rr.Z,{style:Ft,className:Nt},t.createElement(bn,{...mn},a&&t.createElement(Hn.Z,{classes:{root:Dt.header,title:Dt.headerTitle,subheader:Dt.headerSubheader,avatar:Dt.headerAvatar,action:Dt.headerAction,content:Dt.headerContent},title:a,subheader:Fn(),action:Ce,style:{...V},titleTypographyProps:dt,...le}),Ot&&t.createElement(Pr,null,Ot),d&&t.createElement(Kn.Z,null),t.createElement(_t.Z,{className:ie()(mt,{[Dt.noPadding]:Wt}),style:Jt},Y),be&&t.createElement(Wn.Z,{className:Re},be),p&&t.createElement(er,{...p})))}var Hr=e(39307);const br=(0,i.Z)(n=>({root:{position:"relative",lineHeight:0},overlay:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -60%)",fontSize:45,fontWeight:"bold",color:n.palette.textContrast},description:{fontSize:"100%",top:"50%",left:"50%",transform:"translate(-50%, -50%)",position:"absolute",wordBreak:"break-all",display:"inline-block"},circle:{width:"80%",transform:"translate(10%, 0)"},colorUnknown:{}}),{name:"BackstageGauge"}),nr={fractional:!0,inverse:!1,unit:"%",max:100},Vr=({palette:n,value:a,inverse:c,max:d})=>{if(isNaN(a))return"#ddd";const p=d||nr.max,v=c?p-a:a;return v<p/3?n.status.error:v<p*(2/3)?n.status.warning:n.status.ok};function jr(n){const[a,c]=useState(null),{getColor:d=Vr}=n,p=br(n),{palette:v}=useTheme(),{value:D,fractional:$,inverse:Y,unit:V,max:le,description:re}={...nr,...n},Ce=$?Math.round(D*le):D,Re=le!==100?Math.round(D):Ce,[be,mt]=useState(!1);return useEffect(()=>{const Ot=a,Nt=()=>mt(!0),Wt=()=>mt(!1);return Ot&&re?(Ot.addEventListener("mouseenter",Nt),Ot.addEventListener("mouseleave",Wt),()=>{Ot.removeEventListener("mouseenter",Nt),Ot.removeEventListener("mouseleave",Wt)}):()=>{mt(!1)}},[re,a]),React.createElement("div",{ref:c,className:p.root},React.createElement(Circle,{strokeLinecap:"butt",percent:Ce,strokeWidth:12,trailWidth:12,strokeColor:d({palette:v,value:Re,inverse:Y,max:le}),className:p.circle}),re&&be?React.createElement("div",{className:p.description},re):React.createElement("div",{className:p.overlay},isNaN(D)?"N/A":`${Re}${V}`))}const O=(0,i.Z)({root:{height:"100%",width:250}},{name:"BackstageGaugeCard"});function ee(n){const a=O(n),{title:c,subheader:d,progress:p,inverse:v,deepLink:D,description:$,icon:Y,variant:V,getColor:le}=n,re={inverse:v,description:$,getColor:le,value:p};return React.createElement("div",{className:a.root},React.createElement(InfoCard,{title:c,subheader:d,deepLink:D,variant:V,icon:Y},React.createElement(Gauge,{...re})))}function de(n){const{value:a,getColor:c=getProgressColor}=n,{palette:d}=useTheme();if(isNaN(a))return null;let p=Math.round(a*100*100)/100;p>100&&(p=100);const v=c({palette:d,value:p,inverse:!1,max:100});return React.createElement(Tooltip,{title:`${p}%`},React.createElement("span",null,React.createElement(Line,{percent:p,strokeWidth:4,trailWidth:4,strokeColor:v})))}var Me=e(21324),Xe=e(7089),A=e(1292),T=e(42494),F=e(74603),w=e(12231),K=e(73698),G=e(72379);const he=(0,i.Z)(()=>(0,o.Z)({icon:{position:"absolute",right:"4px",pointerEvents:"none"}}),{name:"BackstageClosedDropdown"});var Ne=()=>{const n=he();return t.createElement(G.Z,{className:n.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{d:"M7.5 8L6 9.5L12.0703 15.5703L18.1406 9.5L16.6406 8L12.0703 12.5703L7.5 8Z",fill:"#616161"}))};const Pe=(0,i.Z)(()=>(0,o.Z)({icon:{position:"absolute",right:"4px",pointerEvents:"none"}}),{name:"BackstageOpenedDropdown"});var We=()=>{const n=Pe();return t.createElement(G.Z,{className:n.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{d:"M16.5 16L18 14.5L11.9297 8.42969L5.85938 14.5L7.35938 16L11.9297 11.4297L16.5 16Z",fill:"#616161"}))};const je=(0,Kt.Z)(n=>(0,o.Z)({root:{"label + &":{marginTop:n.spacing(3)}},input:{borderRadius:4,position:"relative",backgroundColor:n.palette.background.paper,border:"1px solid #ced4da",fontSize:16,padding:"10px 26px 10px 12px",transition:n.transitions.create(["border-color","box-shadow"]),fontFamily:"Helvetica Neue","&:focus":{background:n.palette.background.paper,borderRadius:4}}}),{name:"BackstageSelectInputBase"})(F.Z),At=(0,i.Z)(n=>(0,o.Z)({formControl:{margin:`${n.spacing(1)} 0px`,maxWidth:300},label:{transform:"initial",fontWeight:"bold",fontSize:14,fontFamily:n.typography.fontFamily,color:n.palette.text.primary,"&.Mui-focused":{color:n.palette.text.primary}},chips:{display:"flex",flexWrap:"wrap"},chip:{margin:2},checkbox:{},root:{display:"flex",flexDirection:"column"}}),{name:"BackstageSelect"});function et(n){const{multiple:a,items:c,label:d,placeholder:p,selected:v,onChange:D,triggerReset:$,native:Y=!1,disabled:V=!1}=n,le=At(),[re,Ce]=(0,t.useState)(v||(a?[]:"")),[Re,be]=(0,t.useState)(!1);(0,t.useEffect)(()=>{Ce(a?[]:"")},[$,a]),(0,t.useEffect)(()=>{v!==void 0&&Ce(v)},[v]);const mt=dt=>{Ce(dt.target.value),D(dt.target.value)},Ot=dt=>{if(V){dt.preventDefault();return}be(Dt=>a&&!(dt.target instanceof HTMLElement)?!0:!Dt)},Nt=()=>{be(!1)},Wt=dt=>()=>{const Dt=re.filter(Ft=>Ft!==dt);Ce(Dt),D(Dt)};return t.createElement("div",{className:le.root},t.createElement(Fe.Z,{variant:"button"},d),t.createElement(A.Z,{onClickAway:Nt},t.createElement(T.Z,{className:le.formControl},t.createElement(K.Z,{value:re,native:Y,disabled:V,"data-testid":"select",displayEmpty:!0,multiple:a,onChange:mt,onClick:Ot,open:Re,input:t.createElement(je,null),renderValue:dt=>{var Dt;return a&&re.length!==0?t.createElement("div",{className:le.chips},dt.map(Ft=>{var Jt,Fn;return t.createElement(Xe.Z,{key:(Jt=c.find(mn=>mn.value===Ft))==null?void 0:Jt.value,label:(Fn=c.find(mn=>mn.value===Ft))==null?void 0:Fn.label,clickable:!0,onDelete:Wt(Ft),className:le.chip})})):t.createElement(Fe.Z,null,re.length===0?p||"":(Dt=c.find(Ft=>Ft.value===dt))==null?void 0:Dt.label)},IconComponent:()=>Re?t.createElement(We,null):t.createElement(Ne,null),MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},getContentAnchorEl:null}},p&&!a&&t.createElement(w.Z,{value:[]},p),Y?c&&c.map(dt=>t.createElement("option",{value:dt.value,key:dt.value},dt.label)):c&&c.map(dt=>t.createElement(w.Z,{key:dt.value,value:dt.value},a&&t.createElement(Me.Z,{color:"primary",checked:re.includes(dt.value)||!1,className:le.checkbox}),dt.label))))))}const Ge=()=>{},Tt=t.createContext({stepperLength:0,stepIndex:0,setStepIndex:Ge,stepHistory:[],setStepHistory:Ge,onStepChange:Ge});function Mt(n){const{children:a,elevated:c,onStepChange:d,activeStep:p=0}=n,[v,D]=useState(p),[$,Y]=useState([0]);useEffect(()=>{D(p)},[p]);const V=[];let le;return Children.forEach(a,re=>{isValidElement(re)&&(re.props.end?le=re:V.push(re))}),React.createElement(React.Fragment,null,React.createElement(Tt.Provider,{value:{stepIndex:v,setStepIndex:D,stepHistory:$,setStepHistory:Y,onStepChange:d,stepperLength:Children.count(a)}},React.createElement(MuiStepper,{activeStep:v,orientation:"vertical",elevation:c?2:0},V)),v>=Children.count(a)-1&&le)}const yn=(0,i.Z)(n=>({root:{marginTop:n.spacing(3),"& button":{marginRight:n.spacing(1)}}}),{name:"BackstageSimpleStepperFooter"}),wt=({text:n,handleClick:a})=>React.createElement(Button,{onClick:a},n||"Reset"),kt=({text:n,handleClick:a,disabled:c,last:d,stepIndex:p})=>React.createElement(Button,{variant:"contained",color:"primary",disabled:c,"data-testid":`nextButton-${p}`,onClick:a},n||(d?"Finish":"Next")),en=({text:n,handleClick:a,disabled:c,stepIndex:d})=>React.createElement(Button,{onClick:a,"data-testid":`backButton-${d}`,disabled:c},n||"Back"),dn=({actions:n={},children:a})=>{const c=yn(),{stepperLength:d,stepIndex:p,setStepIndex:v,stepHistory:D,setStepHistory:$,onStepChange:Y}=useContext(VerticalStepperContext),V=(Re,be)=>{be&&be(),Y&&Y(p,Re),v(Re)},le=()=>{const Re=n.nextStep?n.nextStep(p,d-1):p+1;V(Re,n.onNext),$([...D,Re])},re=()=>{D.pop(),V(D[D.length-1],n.onBack),$([...D])},Ce=()=>{V(0,n.onRestart),$([0])};return React.createElement("div",{className:c.root},[void 0,!0].includes(n.showBack)&&p!==0&&React.createElement(en,{text:n.backText,handleClick:re,disabled:p===0,stepIndex:p}),[void 0,!0].includes(n.showNext)&&React.createElement(kt,{text:n.nextText,handleClick:le,disabled:!!d&&p>=d||!!n.canNext&&!n.canNext(),stepIndex:p}),n.showRestart&&p!==0&&React.createElement(wt,{text:n.restartText,handleClick:Ce,stepIndex:p}),a)},rr=(0,i.Z)(n=>({end:{padding:n.spacing(3)}}),{name:"SimpleStepperStep"});function Ir(n){const{title:a,children:c,end:d,actions:p,...v}=n,D=rr();return d?React.createElement("div",{className:D.end},React.createElement(Typography,{variant:"h6"},a),c,React.createElement(SimpleStepperFooter,{actions:{...p||{},showNext:!1}})):React.createElement(MuiStep,{...v},React.createElement(StepLabel,null,React.createElement(Typography,{variant:"h6"},a)),React.createElement(StepContent,null,c,React.createElement(SimpleStepperFooter,{actions:p})))}const In=(0,i.Z)(n=>({status:{fontWeight:500,"&::before":{width:"0.7em",height:"0.7em",display:"inline-block",marginRight:8,borderRadius:"50%",content:'""'}},ok:{"&::before":{backgroundColor:n.palette.status.ok}},warning:{"&::before":{backgroundColor:n.palette.status.warning}},error:{"&::before":{backgroundColor:n.palette.status.error}},pending:{"&::before":{backgroundColor:n.palette.status.pending}},running:{"&::before":{backgroundColor:n.palette.status.running}},aborted:{"&::before":{backgroundColor:n.palette.status.aborted}}}),{name:"BackstageStatus"});function nn(n){const a=In(n);return React.createElement("span",{className:classNames(a.status,a.ok),"aria-label":"Status ok","aria-hidden":"true",...n})}function rn(n){const a=In(n);return React.createElement("span",{className:classNames(a.status,a.warning),"aria-label":"Status warning","aria-hidden":"true",...n})}function Lr(n){const a=In(n);return React.createElement("span",{className:classNames(a.status,a.error),"aria-label":"Status error","aria-hidden":"true",...n})}function ra(n){const a=In(n);return React.createElement("span",{className:classNames(a.status,a.pending),"aria-label":"Status pending","aria-hidden":"true",...n})}function Gi(n){const a=In(n);return React.createElement("span",{className:classNames(a.status,a.running),"aria-label":"Status running","aria-hidden":"true",...n})}function Ki(n){const a=In(n);return React.createElement("span",{className:classNames(a.status,a.aborted),"aria-label":"Status aborted","aria-hidden":"true",...n})}var Ji=e(74600),pa=e(15584);const so=n=>(0,o.Z)({root:{fontWeight:"bolder",whiteSpace:"nowrap",paddingRight:n.spacing(4),border:"0",verticalAlign:"top"}}),io={root:{border:"0",verticalAlign:"top"}},lo=n=>(0,o.Z)({root:{listStyle:"none",margin:n.spacing(0,0,-1,0),padding:"0"}}),co=n=>(0,o.Z)({root:{padding:n.spacing(0,0,1,0)},random:{}}),uo=(0,Kt.Z)(so,{name:"BackstageMetadataTableTitleCell"})(pa.Z),fo=(0,Kt.Z)(io,{name:"BackstageMetadataTableCell"})(pa.Z),Yi=({dense:n,children:a})=>React.createElement(Table,{size:n?"small":"medium"},React.createElement(TableBody,null,a)),ki=({title:n,children:a,...c})=>React.createElement(TableRow,null,n&&React.createElement(uo,null,n),React.createElement(fo,{colSpan:n?1:2,...c},a)),ya=(0,Kt.Z)(lo,{name:"BackstageMetadataTableList"})(({classes:n,children:a})=>t.createElement("ul",{className:n.root},a)),Qi=(0,Kt.Z)(co,{name:"BackstageMetadataTableListItem"})(({classes:n,children:a})=>t.createElement("li",{className:n.root},a)),Ea=(0,o.Z)({root:{margin:"0 0",listStyleType:"none"}}),mo=n=>(0,o.Z)({root:{...Ea.root,paddingLeft:n.spacing(1)}}),va=(0,Kt.Z)(Ea,{name:"BackstageStructuredMetadataTableList"})(({classes:n,children:a})=>t.createElement(ya,{classes:n},a)),Aa=(0,Kt.Z)(mo,{name:"BackstageStructuredMetadataTableNestedList"})(({classes:n,children:a})=>t.createElement(ya,{classes:n},a));function ho(n,a){const c=n.map((d,p)=>React.createElement(MetadataListItem,{key:p},aa(d)));return a?React.createElement(Aa,null,c):React.createElement(va,null,c)}function go(n,a,c){const d=Object.keys(n).map(p=>{const v=aa(n[p],!0),D=c&&c.titleFormat?c.titleFormat(p):startCase(p);return React.createElement(MetadataListItem,{key:p},`${D}: `,v)});return a?React.createElement(Aa,null,d):React.createElement(va,null,d)}function aa(n,a,c){return React.isValidElement(n)?React.createElement(Fragment,null,n):typeof n=="object"&&!Array.isArray(n)?go(n,a,c):Array.isArray(n)?ho(n,c):typeof n=="boolean"?React.createElement(Fragment,null,n?"\u2705":"\u274C"):React.createElement(Fragment,null,n)}const po=({value:n,options:a})=>React.createElement(Fragment,null,aa(n,a)),yo=({title:n,value:a,options:c})=>React.createElement(MetadataTableItem,{title:c&&c.titleFormat?c.titleFormat(n):startCase(n)},React.createElement(po,{value:a,options:c}));function Eo(n,a){return Object.keys(n).map(c=>React.createElement(yo,{key:c,title:c,value:n[c],options:a}))}function Xi(n){const{metadata:a,dense:c=!0,options:d}=n,p=Eo(a,d||{});return React.createElement(MetadataTable,{dense:c},p)}var vo=e(49429),Ao=e(86136),Ra=e(79784),ar=e(76635),Ro=e(19126),Gr=e.n(Ro),Co=e(80277);function So(n){return Gr().stringify(n,{strictNullHandling:!0})}function Ca(n){return Gr().parse(n,{ignoreQueryPrefix:!0,strictNullHandling:!0})}function Sa(n,a){return Ca(n)[a]}function To(n,a,c){const d={...Ca(n),[a]:c};return So(d)}function Po(n,a=250){const[c,d]=(0,R.lr)(),p=c.toString(),[v,D]=(0,t.useState)(Sa(p,n));return(0,t.useEffect)(()=>{const $=Sa(p,n);D(Y=>(0,ar.isEqual)($,Y)?Y:$)},[p,D,n]),(0,Co.b)(()=>{const $=To(p,n,v);p!==$&&d($,{replace:!0})},[d,v,p,n],a),[v,D]}const bo={url:"https://github.com/backstage/backstage/issues",items:[{title:"Support Not Configured",icon:"warning",links:[{title:"Add `app.support` config key",url:"https://github.com/backstage/backstage/blob/master/app-config.yaml"}]}]};function Ta(){const a=(0,l.useApiHolder)().get(l.configApiRef),c=a==null?void 0:a.getOptionalConfig("app.support");return c?{url:c.getString("url"),items:c.getConfigArray("items").flatMap(d=>{var p;return{title:d.getString("title"),icon:d.getOptionalString("icon"),links:((p=d.getOptionalConfigArray("links"))!=null?p:[]).flatMap(v=>({url:v.getString("url"),title:v.getString("title")}))}})}:bo}var Io=e(80079);function En(n,a){const d=(0,l.useApp)().getSystemIcon(n);return d?t.createElement(d,{...a}):t.createElement(Io.Z,{...a})}function qi(n){return En("brokenImage",n)}function _i(n){return En("catalog",n)}function el(n){return En("chat",n)}function tl(n){return En("dashboard",n)}function nl(n){return En("docs",n)}function rl(n){return En("email",n)}function al(n){return En("github",n)}function ol(n){return En("group",n)}function Kr(n){return En("help",n)}function sl(n){return En("user",n)}function il(n){return En("warning",n)}const Lo=(0,i.Z)({popoverList:{minWidth:260,maxWidth:400}},{name:"BackstageSupportButton"}),xo=({icon:n})=>{var d;const a=(0,l.useApp)(),c=n&&(d=a.getSystemIcon(n))!=null?d:Kr;return t.createElement(c,null)},Oo=({link:n})=>{var a;return t.createElement(b,{to:n.url},(a=n.title)!=null?a:n.url)},Do=({item:n})=>{var a;return t.createElement(Je.Z,null,t.createElement(Ao.Z,null,t.createElement(xo,{icon:n.icon})),t.createElement(ht.Z,{primary:n.title,secondary:(a=n.links)==null?void 0:a.reduce((c,d,p)=>[...c,p>0&&t.createElement("br",{key:p}),t.createElement(Oo,{link:d,key:d.url})],[])}))};function Fo(n){const{title:a,children:c}=n,{items:d}=Ta(),[p,v]=(0,t.useState)(!1),[D,$]=(0,t.useState)(null),Y=Lo(),V=(0,Ke.Z)(Ce=>Ce.breakpoints.down("sm")),le=Ce=>{$(Ce.currentTarget),v(!0)},re=()=>{v(!1)};return t.createElement(t.Fragment,null,t.createElement(un.Z,{display:"flex",ml:1},V?t.createElement(L.Z,{color:"primary",size:"small",onClick:le,"data-testid":"support-button"},t.createElement(Kr,null)):t.createElement(h.Z,{"data-testid":"support-button",color:"primary",onClick:le,startIcon:t.createElement(Kr,null)},"Support")),t.createElement(Ra.ZP,{"data-testid":"support-button-popover",open:p,anchorEl:D,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},onClose:re},t.createElement(Ve.Z,{className:Y.popoverList},a&&t.createElement(Je.Z,{alignItems:"flex-start"},t.createElement(Fe.Z,{variant:"subtitle1"},a)),t.Children.map(c,(Ce,Re)=>t.createElement(Je.Z,{alignItems:"flex-start",key:`child-${Re}`},Ce)),d&&d.map((Ce,Re)=>t.createElement(Do,{item:Ce,key:`item-${Re}`}))),t.createElement(vo.Z,null,t.createElement(h.Z,{color:"primary",onClick:re},"Close"))))}var oa=e(18671),fn=e(10289);const Jr=72,Pa=24,ba=18,Ln={drawerWidthClosed:Jr,drawerWidthOpen:224,defaultOpenDelayMs:100,defaultCloseDelayMs:0,defaultFadeDuration:200,logoHeight:32,iconContainerWidth:Jr,iconSize:Jr-Pa*2,iconPadding:Pa,selectedIndicatorWidth:3,userBadgePadding:ba,userBadgeDiameter:Jr-ba*2,mobileSidebarHeight:56},Bo=n=>({...Ln,...n,iconContainerWidth:Ln.drawerWidthClosed,iconSize:Ln.drawerWidthClosed-Ln.iconPadding*2,userBadgeDiameter:Ln.drawerWidthClosed-Ln.userBadgePadding*2}),Ia={drawerWidthClosed:0,drawerWidthOpen:202,defaultOpenDelayMs:Ln.defaultOpenDelayMs+200},Mo=n=>({...Ia,...n}),ll="@backstage/core/sidebar-intro-dismissed",xr=(0,t.createContext)({isOpen:!1,setOpen:()=>{}}),Cn=(0,t.createContext)({sidebarConfig:Ln,submenuConfig:Ia}),La=(0,t.createContext)({isHoveredOn:!1,setIsHoveredOn:()=>{}});var Yr;(function(n){const a="sidebarPinState";n.SIDEBAR_PIN_STATE=a})(Yr||(Yr={}));const xa={getSidebarPinState(){let n;try{n=JSON.parse(window.localStorage.getItem(Yr.SIDEBAR_PIN_STATE)||"true")}catch{return!0}return!!n},setSidebarPinState(n){return window.localStorage.setItem(Yr.SIDEBAR_PIN_STATE,JSON.stringify(n))}},Zo=(0,i.Z)(n=>({root:a=>({width:"100%",transition:"padding-left 0.1s ease-out",isolation:"isolate",[n.breakpoints.up("sm")]:{paddingLeft:()=>a.isPinned?a.sidebarConfig.drawerWidthOpen:a.sidebarConfig.drawerWidthClosed},[n.breakpoints.down("xs")]:{paddingBottom:a.sidebarConfig.mobileSidebarHeight}}),content:{zIndex:0,isolation:"isolate","&:focus":{outline:0}}}),{name:"BackstageSidebarPage"}),or=(0,t.createContext)({isPinned:!0,toggleSidebarPinState:()=>{},isMobile:!1}),Oa=(0,t.createContext)({content:{contentRef:void 0}});function $o(n){const[a,c]=(0,t.useState)(()=>xa.getSidebarPinState()),{sidebarConfig:d}=(0,t.useContext)(Cn),p=(0,t.useRef)(null),v=(0,t.useMemo)(()=>({content:{contentRef:p}}),[p]);(0,t.useEffect)(()=>{xa.setSidebarPinState(a)},[a]);const D=(0,Ke.Z)(V=>V.breakpoints.down("xs"),{noSsr:!0}),$=()=>c(!a),Y=Zo({isPinned:a,sidebarConfig:d});return t.createElement(or.Provider,{value:{isPinned:a,toggleSidebarPinState:$,isMobile:D}},t.createElement(Oa.Provider,{value:v},t.createElement("div",{className:Y.root},n.children)))}function sa(){const{content:n}=(0,t.useContext)(Oa);return{focusContent:(0,t.useCallback)(()=>{var c,d;(d=(c=n==null?void 0:n.contentRef)==null?void 0:c.current)==null||d.focus()},[n]),contentRef:n==null?void 0:n.contentRef}}var No=e(50023),Uo=e(4190),wo=e(87685),zo=e(44882),Wo=e(57998);const Ho=(0,i.Z)(n=>({root:{flexGrow:0,margin:n.spacing(0,2),color:n.palette.navigation.color},selected:a=>({color:`${n.palette.navigation.selectedColor}!important`,borderTop:`solid ${a.sidebarConfig.selectedIndicatorWidth}px ${n.palette.navigation.indicator}`,marginTop:"-1px"}),label:{display:"none"}})),Vo=n=>{const{to:a,label:c,icon:d,value:p}=n,{sidebarConfig:v}=(0,t.useContext)(Cn),D=Ho({sidebarConfig:v}),$=(0,fn.TH)(),{selectedMenuItemIndex:Y,setSelectedMenuItemIndex:V}=(0,t.useContext)(Ba),le=(Ce,Re)=>{V(Re===Y?-1:Re)},re=p===Y&&Y>=0||p!==Y&&!(Y>=0)&&a===$.pathname;return t.createElement(Wo.Z,{label:c,icon:d,component:b,to:a||$.pathname,onChange:le,value:p,selected:re,classes:D})},Da=n=>{const{children:a,to:c,label:d,icon:p,value:v}=n,{isMobile:D}=(0,t.useContext)(or);return D?t.createElement(Vo,{to:c,label:d,icon:p,value:v}):t.createElement(t.Fragment,null,a)},Fa=(0,i.Z)(n=>({root:{position:"fixed",backgroundColor:n.palette.navigation.background,color:n.palette.navigation.color,bottom:0,left:0,right:0,zIndex:n.zIndex.snackbar,borderTop:"1px solid #383838"},overlay:a=>({background:n.palette.navigation.background,width:"100%",bottom:`${a.sidebarConfig.mobileSidebarHeight}px`,height:`calc(100% - ${a.sidebarConfig.mobileSidebarHeight}px)`,flex:"0 1 auto",overflow:"auto"}),overlayHeader:{display:"flex",color:n.palette.bursts.fontColor,alignItems:"center",justifyContent:"space-between",padding:n.spacing(2,3)},overlayHeaderClose:{color:n.palette.bursts.fontColor},marginMobileSidebar:a=>({marginBottom:`${a.sidebarConfig.mobileSidebarHeight}px`})})),jo=n=>(0,ar.orderBy)(n,({props:{priority:a}})=>Number.isInteger(a)?a:-1,"desc"),Go=t.createElement(Da).type,Ko=({children:n,label:a="Menu",open:c,onClose:d})=>{const{sidebarConfig:p}=(0,t.useContext)(Cn),v=Fa({sidebarConfig:p});return t.createElement(Uo.ZP,{anchor:"bottom",open:c,onClose:d,ModalProps:{BackdropProps:{classes:{root:v.marginMobileSidebar}}},classes:{root:v.marginMobileSidebar,paperAnchorBottom:v.overlay}},t.createElement(un.Z,{className:v.overlayHeader},t.createElement(Fe.Z,{variant:"h3"},a),t.createElement(L.Z,{onClick:d,classes:{root:v.overlayHeaderClose}},t.createElement(wo.Z,null))),t.createElement(un.Z,null,n))},Ba=(0,t.createContext)({selectedMenuItemIndex:-1,setSelectedMenuItemIndex:()=>{}}),Jo=n=>{const{sidebarConfig:a}=(0,t.useContext)(Cn),{children:c}=n,d=Fa({sidebarConfig:a}),p=(0,fn.TH)(),[v,D]=(0,t.useState)(-1);(0,t.useEffect)(()=>{D(-1)},[p.pathname]);let $=(0,l.useElementFilter)(c,V=>V.getElements().filter(le=>le.type===Go));if(c)$.length?$=jo($):$.push(t.createElement(Da,{key:"default_menu",icon:t.createElement(zo.Z,null)},c));else return null;const Y=v>=0&&!$[v].props.to;return t.createElement(xr.Provider,{value:{isOpen:!0,setOpen:()=>{}}},t.createElement(Ba.Provider,{value:{selectedMenuItemIndex:v,setSelectedMenuItemIndex:D}},t.createElement(Ko,{label:$[v]&&$[v].props.label,open:Y,onClose:()=>D(-1)},$[v]&&$[v].props.children),t.createElement(No.Z,{className:d.root,"data-testid":"mobile-sidebar-root"},$)))},Ma=(0,i.Z)(n=>({drawer:a=>({display:"flex",flexFlow:"column nowrap",alignItems:"flex-start",position:"fixed",left:0,top:0,bottom:0,zIndex:n.zIndex.appBar,background:n.palette.navigation.background,overflowX:"hidden",msOverflowStyle:"none",scrollbarWidth:"none",width:a.sidebarConfig.drawerWidthClosed,transition:n.transitions.create("width",{easing:n.transitions.easing.sharp,duration:n.transitions.duration.shortest}),"& > *":{flexShrink:0},"&::-webkit-scrollbar":{display:"none"}}),drawerOpen:a=>({width:a.sidebarConfig.drawerWidthOpen,transition:n.transitions.create("width",{easing:n.transitions.easing.sharp,duration:n.transitions.duration.shorter})}),visuallyHidden:{top:0,position:"absolute",zIndex:1e3,transform:"translateY(-200%)","&:focus":{transform:"translateY(5px)"}}}),{name:"BackstageSidebar"});var an;(function(n){n[n.Closed=0]="Closed";const c=0+1;n[n.Idle=c]="Idle";const d=c+1;n[n.Open=d]="Open"})(an||(an={}));const Yo=n=>{const{sidebarConfig:a}=(0,t.useContext)(Cn),{openDelayMs:c=a.defaultOpenDelayMs,closeDelayMs:d=a.defaultCloseDelayMs,disableExpandOnHover:p,children:v}=n,D=Ma({sidebarConfig:a}),$=(0,Ke.Z)(Nt=>Nt.breakpoints.down("md"),{noSsr:!0}),[Y,V]=(0,t.useState)(an.Closed),le=(0,t.useRef)(),{isPinned:re,toggleSidebarPinState:Ce}=(0,t.useContext)(or),Re=()=>{re||p||(le.current&&(clearTimeout(le.current),le.current=void 0),Y!==an.Open&&!$&&(le.current=window.setTimeout(()=>{le.current=void 0,V(an.Open)},c),V(an.Idle)))},be=()=>{re||p||(le.current&&(clearTimeout(le.current),le.current=void 0),Y===an.Idle?V(an.Closed):Y===an.Open&&(le.current=window.setTimeout(()=>{le.current=void 0,V(an.Closed)},d)))},mt=Y===an.Open&&!$||re,Ot=Nt=>{Nt?(V(an.Open),Ce()):(V(an.Closed),Ce())};return t.createElement("div",{style:{}},t.createElement(Qo,null),t.createElement(xr.Provider,{value:{isOpen:mt,setOpen:Ot}},t.createElement("div",{className:D.root,"data-testid":"sidebar-root",onMouseEnter:p?()=>{}:Re,onFocus:p?()=>{}:Re,onMouseLeave:p?()=>{}:be,onBlur:p?()=>{}:be},t.createElement("div",{className:ie()(D.drawer,{[D.drawerOpen]:mt})},v))))},ko=n=>{var Y,V;const a=Bo((Y=n.sidebarOptions)!=null?Y:{}),c=Mo((V=n.submenuOptions)!=null?V:{}),{children:d,disableExpandOnHover:p,openDelayMs:v,closeDelayMs:D}=n,{isMobile:$}=(0,t.useContext)(or);return $?t.createElement(Jo,null,d):t.createElement(Cn.Provider,{value:{sidebarConfig:a,submenuConfig:c}},t.createElement(Yo,{openDelayMs:v,closeDelayMs:D,disableExpandOnHover:p},d))};function Qo(){const{sidebarConfig:n}=(0,t.useContext)(Cn),{focusContent:a,contentRef:c}=sa(),d=Ma({sidebarConfig:n});return c!=null&&c.current?t.createElement(h.Z,{onClick:a,variant:"contained",className:ie()(d.visuallyHidden)},"Skip to content"):null}function Za(n,a){const c=new URLSearchParams(a.search).toString(),d=Gr().parse(c),p=new URLSearchParams(n.search).toString(),v=Gr().parse(p);return(0,ar.isEqual)(a.pathname,n.pathname)&&(0,ar.isMatch)(v,d)}const Xo=(0,i.Z)(n=>({item:{height:48,width:"100%","&:hover":{background:"#6f6f6f",color:n.palette.navigation.selectedColor},display:"flex",alignItems:"center",color:n.palette.navigation.color,padding:20,cursor:"pointer",position:"relative",background:"none",border:"none"},itemContainer:{width:"100%"},selected:{background:"#6f6f6f",color:"#FFF"},label:{margin:14,marginLeft:7,fontSize:14},dropdownArrow:{position:"absolute",right:21},dropdown:{display:"flex",flexDirection:"column",alignItems:"end"},dropdownItem:{width:"100%",padding:"10px 0 10px 0"},textContent:{color:n.palette.navigation.color,display:"flex",justifyContent:"center",[n.breakpoints.down("xs")]:{display:"block",paddingLeft:n.spacing(4)},fontSize:"14px"}}),{name:"BackstageSidebarSubmenuItem"}),cl=n=>{const{title:a,to:c,icon:d,dropdownItems:p}=n,v=Xo(),{setIsHoveredOn:D}=useContext(SidebarItemWithSubmenuContext),$=()=>{D(!1)},Y=useResolvedPath(c),V=useLocation();let le=isLocationMatch(V,Y);const[re,Ce]=useState(!1),Re=()=>{Ce(!re)};return p!==void 0?(p.some(be=>{const mt=resolvePath(be.to);return le=isLocationMatch(V,mt),le}),React.createElement("div",{className:v.itemContainer},React.createElement("button",{onClick:Re,onTouchStart:be=>be.stopPropagation(),className:classnames(v.item,le?v.selected:void 0)},React.createElement(d,{fontSize:"small"}),React.createElement(Typography,{variant:"subtitle1",className:v.label},a),re?React.createElement(ArrowDropUpIcon,{className:v.dropdownArrow}):React.createElement(ArrowDropDownIcon,{className:v.dropdownArrow})),p&&re&&React.createElement("div",{className:v.dropdown},p.map((be,mt)=>React.createElement(Link,{to:be.to,underline:"none",className:v.dropdownItem,onClick:$,onTouchStart:Ot=>Ot.stopPropagation(),key:mt},React.createElement(Typography,{className:v.textContent},be.title)))))):React.createElement("div",{className:v.itemContainer},React.createElement(Link,{to:c,underline:"none",className:classnames(v.item,le?v.selected:void 0),onClick:$,onTouchStart:be=>be.stopPropagation()},React.createElement(d,{fontSize:"small"}),React.createElement(Typography,{variant:"subtitle1",className:v.label},a)))},qo=(0,i.Z)(n=>({root:{zIndex:1e3,position:"relative",overflow:"visible",width:n.spacing(7)+1},drawer:a=>{var c,d;return{display:"flex",flexFlow:"column nowrap",alignItems:"flex-start",position:"fixed",[n.breakpoints.up("sm")]:{marginLeft:a.left,transition:n.transitions.create("margin-left",{easing:n.transitions.easing.sharp,duration:n.transitions.duration.shortest})},top:0,bottom:0,padding:0,background:(d=(c=n.palette.navigation.submenu)==null?void 0:c.background)!=null?d:"#404040",overflowX:"hidden",msOverflowStyle:"none",scrollbarWidth:"none",cursor:"default",width:a.submenuConfig.drawerWidthClosed,transitionDelay:`${a.submenuConfig.defaultOpenDelayMs}ms`,"& > *":{flexShrink:0},"&::-webkit-scrollbar":{display:"none"}}},drawerOpen:a=>({width:a.submenuConfig.drawerWidthOpen,[n.breakpoints.down("xs")]:{width:"100%",position:"relative",paddingLeft:n.spacing(3),left:0,top:0}}),title:{fontSize:24,fontWeight:500,color:"#FFF",padding:20,[n.breakpoints.down("xs")]:{display:"none"}}}),{name:"BackstageSidebarSubmenu"}),_o=n=>{const{isOpen:a}=(0,t.useContext)(xr),{sidebarConfig:c,submenuConfig:d}=(0,t.useContext)(Cn),p=a?c.drawerWidthOpen:c.drawerWidthClosed,v=qo({left:p,submenuConfig:d}),{isHoveredOn:D}=(0,t.useContext)(La),[$,Y]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{Y(D)},[D]),t.createElement("div",{className:ie()(v.drawer,{[v.drawerOpen]:$})},t.createElement(Fe.Z,{variant:"h5",className:v.title},n.title),n.children)};var kr=e(76600),es=e(26739),ts=e(98989),ns=e(59797),rs=e(83543);const as=(0,i.Z)({iconContainer:{display:"flex",position:"relative",width:"100%"},arrow1:{right:"6px",position:"absolute"}}),ul=()=>{const n=as();return React.createElement("div",{className:n.iconContainer},React.createElement("div",{className:n.arrow1},React.createElement(ArrowBackIosIcon,{style:{fontSize:"12px"}})),React.createElement("div",null,React.createElement(ArrowBackIosIcon,{style:{fontSize:"12px"}})))};var dl=null;const os=(0,i.Z)({iconContainer:{display:"flex",position:"relative",width:"100%"},arrow1:{right:"6px",position:"absolute"}}),fl=()=>{const n=os();return React.createElement("div",{className:n.iconContainer},React.createElement("div",{className:n.arrow1},React.createElement(ArrowForwardIosIcon,{style:{fontSize:"12px"}})),React.createElement("div",null,React.createElement(ArrowForwardIosIcon,{style:{fontSize:"12px"}})))};var ml=null;const Qr=(0,i.Z)(n=>{var a,c,d,p;return{root:{color:n.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"},closed:v=>({width:v.sidebarConfig.drawerWidthClosed,justifyContent:"center"}),open:v=>({[n.breakpoints.up("sm")]:{width:v.sidebarConfig.drawerWidthOpen}}),highlightable:{"&:hover":{background:(c=(a=n.palette.navigation.navItem)==null?void 0:a.hoverBackground)!=null?c:"#404040"}},highlighted:{background:(p=(d=n.palette.navigation.navItem)==null?void 0:d.hoverBackground)!=null?p:"#404040"},label:{fontWeight:"bold",whiteSpace:"nowrap",lineHeight:"auto",flex:"3 1 auto",width:"110px",overflow:"hidden","text-overflow":"ellipsis"},iconContainer:v=>({boxSizing:"border-box",height:"100%",width:v.sidebarConfig.iconContainerWidth,marginRight:-n.spacing(2),display:"flex",alignItems:"center",justifyContent:"center"}),searchRoot:{marginBottom:12},searchField:{color:"#b5b5b5",fontWeight:"bold",fontSize:n.typography.fontSize},searchFieldHTMLInput:{padding:n.spacing(2,0,2)},searchContainer:v=>({width:v.sidebarConfig.drawerWidthOpen-v.sidebarConfig.iconContainerWidth}),secondaryAction:{width:n.spacing(6),textAlign:"center",marginRight:n.spacing(1)},closedItemIcon:{width:"100%",justifyContent:"center"},submenuArrow:{display:"flex"},expandButton:{background:"none",border:"none",color:n.palette.navigation.color,width:"100%",cursor:"pointer",position:"relative",height:48},arrows:{position:"absolute",right:10},selected:v=>({"&$root":{borderLeft:`solid ${v.sidebarConfig.selectedIndicatorWidth}px ${n.palette.navigation.indicator}`,color:n.palette.navigation.selectedColor},"&$closed":{width:v.sidebarConfig.drawerWidthClosed},"& $closedItemIcon":{paddingRight:v.sidebarConfig.selectedIndicatorWidth},"& $iconContainer":{marginLeft:-v.sidebarConfig.selectedIndicatorWidth}})}},{name:"BackstageSidebarItem"}),ss=(n,a)=>(0,l.useElementFilter)(n.props.children,c=>{let d=!1;return c.getElements().forEach(({props:{to:p,dropdownItems:v}})=>{if(!d){if(v!=null&&v.length){v.forEach(({to:D})=>d=d||Za(a,(0,fn.i3)(D)));return}p&&(d=Za(a,(0,fn.i3)(p)))}}),d},[a.pathname]);function $a(n){return n.to===void 0}const is=t.createElement(_o).type,ls=t.forwardRef(function({to:a,end:c,style:d,className:p,activeStyle:v,caseSensitive:D,activeClassName:$="active","aria-current":Y="page",...V},le){let{pathname:re}=(0,fn.TH)(),{pathname:Ce}=(0,fn.WU)(a);D||(re=re.toLocaleLowerCase("en-US"),Ce=Ce.toLocaleLowerCase("en-US"));let Re=re===Ce;!Re&&!c&&(Re=re.startsWith(`${Ce}/`));const be=Re?Y:void 0;return t.createElement(R.rU,{...V,to:a,ref:le,"aria-current":be,style:{...d,...Re?v:void 0},className:ie()([p,Re?$:void 0])})}),Na=(0,t.forwardRef)((n,a)=>{const{icon:c,text:d,hasNotifications:p=!1,disableHighlight:v=!1,onClick:D,children:$,className:Y,...V}=n,{sidebarConfig:le}=(0,t.useContext)(Cn),re=Qr({sidebarConfig:le}),{isOpen:Ce}=(0,t.useContext)(xr),Re=t.createElement(es.Z,{color:"secondary",variant:"dot",overlap:"circular",invisible:!p,className:ie()({[re.closedItemIcon]:!Ce})},t.createElement(c,{fontSize:"small"})),be=t.createElement(t.Fragment,null,t.createElement("div",{"data-testid":"login-button",className:re.iconContainer},Re),d&&t.createElement(Fe.Z,{variant:"subtitle2",className:re.label},d),t.createElement("div",{className:re.secondaryAction},$)),mt=Ce?be:Re,Ot={onClick:D,className:ie()(Y,re.root,Ce?re.open:re.closed,$a(n)&&re.buttonItem,{[re.highlightable]:!v})};return $a(n)?t.createElement("button",{"aria-label":d,...Ot,ref:a},mt):t.createElement(ls,{...Ot,activeClassName:re.selected,to:n.to?n.to:"",ref:a,"aria-label":d||n.to,...V},mt)}),cs=({children:n,...a})=>{const{sidebarConfig:c}=(0,t.useContext)(Cn),d=Qr({sidebarConfig:c}),[p,v]=(0,t.useState)(!1),D=(0,fn.TH)(),$=ss(n,D),Y=(0,Ke.Z)(Ce=>Ce.breakpoints.down("sm")),V=()=>{v(!0)},le=()=>{v(!1)},re=()=>Y?p?t.createElement(ns.Z,{fontSize:"small",className:d.submenuArrow}):t.createElement(rs.Z,{fontSize:"small",className:d.submenuArrow}):!p&&t.createElement(ts.Z,{fontSize:"small",className:d.submenuArrow});return t.createElement(La.Provider,{value:{isHoveredOn:p,setIsHoveredOn:v}},t.createElement("div",{"data-testid":"item-with-submenu",onMouseLeave:le,onTouchStart:p?le:V,onMouseEnter:V,className:ie()(p&&d.highlighted)},t.createElement(Na,{className:$?d.selected:"",...a},re()),p&&n))},Ua=(0,t.forwardRef)((n,a)=>{const[c]=(0,l.useElementFilter)(n.children,d=>d.getElements().filter(p=>p.type===is));return c?t.createElement(cs,{...n},c):t.createElement(Na,{...n,ref:a})});function hl(n){const{sidebarConfig:a}=useContext(SidebarConfigContext),[c,d]=useState(""),p=Qr({sidebarConfig:a}),v=n.icon?n.icon:SearchIcon,D=()=>{n.onSearch(c),d("")},$=re=>{re.key==="Enter"&&(re.preventDefault(),D())},Y=re=>{d(re.target.value)},V=re=>{re.preventDefault(),re.stopPropagation()},le=re=>{D(),re.preventDefault()};return React.createElement("div",{className:p.searchRoot},React.createElement(Ua,{icon:v,to:n.to,onClick:le,disableHighlight:!0},React.createElement(TextField,{placeholder:"Search",value:c,onClick:V,onChange:Y,onKeyDown:$,className:p.searchContainer,InputProps:{disableUnderline:!0,className:p.searchField},inputProps:{className:p.searchFieldHTMLInput}})))}const gl=(0,kr.Z)("div")({flex:1},{name:"BackstageSidebarSpace"}),pl=(0,kr.Z)("div")({height:8},{name:"BackstageSidebarSpacer"}),us=(0,kr.Z)("hr")({height:1,width:"100%",background:"#383838",border:"none",margin:"12px 0px"},{name:"BackstageSidebarDivider"}),ds=n=>({overflowY:"auto","&::-webkit-scrollbar":{backgroundColor:n.palette.background.default,width:"5px",borderRadius:"5px"},"&::-webkit-scrollbar-thumb":{backgroundColor:n.palette.text.hint,borderRadius:"5px"}}),yl=(0,kr.Z)("div")(({theme:n})=>{const a=ds(n);return{flex:"0 1 auto",overflowX:"hidden",width:"calc(100% - 5px)",minHeight:"48px",overflowY:"hidden","@media (hover: none)":a,"&:hover":a}}),El=()=>{const{sidebarConfig:n}=useContext(SidebarConfigContext),a=Qr({sidebarConfig:n}),{isOpen:c,setOpen:d}=useContext(SidebarContext);if(useMediaQuery(D=>D.breakpoints.down("md"),{noSsr:!0}))return null;const v=()=>{d(!c)};return React.createElement("button",{onClick:v,className:a.expandButton,"aria-label":"Expand Sidebar","data-testid":"sidebar-expand-button"},React.createElement("div",{className:a.arrows},c?React.createElement(DoubleArrowLeft,null):React.createElement(DoubleArrowRight,null)))},fs=(0,i.Z)(n=>({introCard:a=>({color:"#b5b5b5",fontSize:12,width:a.sidebarConfig.drawerWidthOpen,marginTop:18,marginBottom:12,paddingLeft:a.sidebarConfig.iconPadding,paddingRight:a.sidebarConfig.iconPadding}),introDismiss:{display:"flex",justifyContent:"flex-end",alignItems:"center",marginTop:12},introDismissLink:{color:"#dddddd",display:"flex",alignItems:"center",marginBottom:4,"&:hover":{color:n.palette.linkHover,transition:n.transitions.create("color",{easing:n.transitions.easing.sharp,duration:n.transitions.duration.shortest})}},introDismissText:{fontSize:"0.7rem",fontWeight:"bold",textTransform:"uppercase",letterSpacing:1},introDismissIcon:{width:18,height:18,marginRight:12}}),{name:"BackstageSidebarIntro"});function ms(n){const{sidebarConfig:a}=useContext(SidebarConfigContext),c=fs({sidebarConfig:a}),{text:d,onClose:p}=n,v=()=>p();return React.createElement("div",{className:c.introCard},React.createElement(Typography,{variant:"subtitle2"},d),React.createElement("div",{className:c.introDismiss},React.createElement(Link,{component:"button",onClick:v,underline:"none",className:c.introDismissLink},React.createElement(CloseIcon,{className:c.introDismissIcon}),React.createElement(Typography,{component:"span",className:c.introDismissText},"Dismiss"))))}const wa=n=>{const{text:a,onDismiss:c}=n,[d,p]=useState(!1),v=()=>{p(!0)};return React.createElement(Collapse,{in:!d,onExited:c},React.createElement(ms,{text:a,onClose:v}))},hs=null,gs="And your recently viewed plugins will pop up here!";function vl(n){const{isOpen:a}=useContext(SidebarContext),c={starredItemsDismissed:!1,recentlyViewedItemsDismissed:!1},[d,p]=useLocalStorageValue(SIDEBAR_INTRO_LOCAL_STORAGE),{starredItemsDismissed:v,recentlyViewedItemsDismissed:D}=d!=null?d:{},$=()=>{p(V=>({...c,...V,starredItemsDismissed:!0}))},Y=()=>{p(V=>({...c,...V,recentlyViewedItemsDismissed:!0}))};return a?React.createElement(React.Fragment,null,!v&&React.createElement(React.Fragment,null,React.createElement(wa,{text:hs,onDismiss:$}),React.createElement(SidebarDivider,null)),!D&&React.createElement(wa,{text:gs,onDismiss:Y})):null}const ps=(0,i.Z)(n=>({root:{gridArea:"pageContent",minWidth:0,paddingTop:n.spacing(3),paddingBottom:n.spacing(3),paddingLeft:n.spacing(2),paddingRight:n.spacing(2),[n.breakpoints.up("sm")]:{paddingLeft:n.spacing(3),paddingRight:n.spacing(3)}},stretch:{display:"flex",flexDirection:"column",flexGrow:1},noPadding:{padding:0}}),{name:"BackstageContent"});function za(n){const{className:a,stretch:c,noPadding:d,children:p,...v}=n,{contentRef:D}=sa(),$=ps();return t.createElement("article",{ref:D,tabIndex:-1,...v,className:ie()($.root,a,{[$.stretch]:c,[$.noPadding]:d})},p)}var ys=e(6487),Es=e(99152);const vs=(0,i.Z)(n=>({tabsWrapper:{gridArea:"pageSubheader",backgroundColor:n.palette.background.paper,paddingLeft:n.spacing(3)},defaultTab:{padding:n.spacing(3,3),...n.typography.caption,textTransform:"uppercase",fontWeight:"bold",color:n.palette.text.secondary},selected:{color:n.palette.text.primary},tabRoot:{"&:hover":{backgroundColor:n.palette.background.default,color:n.palette.text.primary}}}),{name:"BackstageHeaderTabs"});function Wa(n){const{tabs:a,onChange:c,selectedIndex:d}=n,[p,v]=(0,t.useState)(d!=null?d:0),D=vs(),$=(Y,V)=>{d===void 0&&v(V),c&&c(V)};return(0,t.useEffect)(()=>{d!==void 0&&v(d)},[d]),t.createElement("div",{className:D.tabsWrapper},t.createElement(Es.Z,{selectionFollowsFocus:!0,indicatorColor:"primary",textColor:"inherit",variant:"scrollable",scrollButtons:"auto","aria-label":"scrollable auto tabs example",onChange:$,value:p},a.map((Y,V)=>t.createElement(ys.Z,{...Y.tabProps,"data-testid":`header-tab-${V}`,label:Y.label,key:Y.id,value:V,className:D.defaultTab,classes:{selected:D.selected,root:D.tabRoot}}))))}function As(n){var $,Y,V;const a=(0,fn.UO)(),d=n.map(({path:le,children:re})=>({caseSensitive:!1,path:`${le}/*`,element:re})).sort((le,re)=>re.path.replace(/\/\*$/,"").localeCompare(le.path.replace(/\/\*$/,""))),p=($=(0,fn.V$)(d))!=null?$:n[0].children,[v]=(Y=(0,fn.fp)(d,`/${a["*"]}`))!=null?Y:[],D=v?n.findIndex(le=>`${le.path}/*`===v.route.path):0;return{index:D===-1?0:D,element:p,route:(V=n[D])!=null?V:n[0]}}function Ha(n){const{routes:a}=n,c=(0,fn.s0)(),{index:d,route:p,element:v}=As(a),D=(0,t.useMemo)(()=>a.map(Y=>({id:Y.path,label:Y.title,tabProps:Y.tabProps})),[a]),$=Y=>c(a[Y].path.replace(/\/\*$/,"").replace(/^\//,""));return t.createElement(t.Fragment,null,t.createElement(Wa,{tabs:D,selectedIndex:d,onChange:$}),t.createElement(za,null,t.createElement(oa.q,{title:p.title}),v))}const ia=()=>null;(0,l.attachComponentData)(ia,"core.gatherMountPoints",!0);function Va(n){const a=t.createElement(ia,{path:"",title:""},t.createElement("div",null)).type;return t.Children.toArray(n).flatMap(c=>{if(!(0,t.isValidElement)(c))return[];if(c.type===t.Fragment)return Va(c.props.children);if(c.type!==a)throw new Error("Child of TabbedLayout must be an TabbedLayout.Route");const{path:d,title:p,children:v,tabProps:D}=c.props;return[{path:d,title:p,children:v,tabProps:D}]})}function Rs(n){const a=Va(n.children);return t.createElement(Ha,{routes:a})}Rs.Route=ia;const Cs=(0,i.Z)(n=>({value:{marginBottom:"6px"},subvalue:{color:n.palette.textSubtle,fontWeight:"normal"}}),{name:"BackstageSubvalueCell"});function Ss(n){const{value:a,subvalue:c}=n,d=Cs();return t.createElement(t.Fragment,null,t.createElement("div",{className:d.value},a),t.createElement("div",{className:d.subvalue},c))}var Ts=e(21070),Ps=e(90324),bs=e(98281),Is=e(48049),ja=e(51209),Ga=e(33375),Ls=e(44233),xs=e(27604),la=e(36444),Os=e(37971),Ds=e(59709),Fs=e(17373),Bs=e(3702),Ms=e(93111),Xr=e(67222);const Zs=(0,i.Z)(n=>({root:{height:"100%",width:"315px",display:"flex",flexDirection:"column",marginRight:n.spacing(3)},value:{fontWeight:"bold",fontSize:18},header:{display:"flex",alignItems:"center",height:"60px",justifyContent:"space-between",borderBottom:`1px solid ${n.palette.grey[500]}`},filters:{display:"flex",flexDirection:"column","& > *":{marginTop:n.spacing(2)}}}),{name:"BackstageTableFilters"}),$s=n=>{var Y;const a=Zs(),{onChangeFilters:c}=n,[d,p]=(0,t.useState)({...n.selectedFilters}),[v,D]=(0,t.useState)(!1),$=()=>{p({}),D(V=>!V)};return(0,t.useEffect)(()=>{c(d)},[d,c]),t.createElement("div",{className:a.root},t.createElement("div",{className:a.header},t.createElement("div",{className:a.value},"Filters"),t.createElement(h.Z,{color:"primary",onClick:$},"Clear all")),t.createElement("div",{className:a.filters},((Y=n.filters)==null?void 0:Y.length)&&n.filters.map(V=>t.createElement(et,{triggerReset:v,key:V.element.label,...V.element,selected:d[V.element.label],onChange:le=>p({...d,[V.element.label]:le})}))))},Ns={Add:(0,t.forwardRef)((n,a)=>t.createElement(Ts.Z,{...n,ref:a})),Check:(0,t.forwardRef)((n,a)=>t.createElement(bs.Z,{...n,ref:a})),Clear:(0,t.forwardRef)((n,a)=>t.createElement(Ga.Z,{...n,ref:a})),Delete:(0,t.forwardRef)((n,a)=>t.createElement(Ls.Z,{...n,ref:a})),DetailPanel:(0,t.forwardRef)((n,a)=>t.createElement(ja.Z,{...n,ref:a})),Edit:(0,t.forwardRef)((n,a)=>t.createElement(xs.Z,{...n,ref:a})),Export:(0,t.forwardRef)((n,a)=>t.createElement(Bs.Z,{...n,ref:a})),Filter:(0,t.forwardRef)((n,a)=>t.createElement(la.Z,{...n,ref:a})),FirstPage:(0,t.forwardRef)((n,a)=>t.createElement(Os.Z,{...n,ref:a})),LastPage:(0,t.forwardRef)((n,a)=>t.createElement(Ds.Z,{...n,ref:a})),NextPage:(0,t.forwardRef)((n,a)=>t.createElement(ja.Z,{...n,ref:a})),PreviousPage:(0,t.forwardRef)((n,a)=>t.createElement(Is.Z,{...n,ref:a})),ResetSearch:(0,t.forwardRef)((n,a)=>t.createElement(Ga.Z,{...n,ref:a})),Search:(0,t.forwardRef)((n,a)=>t.createElement(la.Z,{...n,ref:a})),SortArrow:(0,t.forwardRef)((n,a)=>t.createElement(Ps.Z,{...n,ref:a})),ThirdStateCheck:(0,t.forwardRef)((n,a)=>t.createElement(Fs.Z,{...n,ref:a})),ViewColumn:(0,t.forwardRef)((n,a)=>t.createElement(Ms.Z,{...n,ref:a}))};function Ka(n,a){const c=a.split(".");let d=n[c[0]];for(let p=1;p<c.length;++p){if(d===void 0)return d;const v=c[p];d=d[v]}return d}const Us=(0,Kt.Z)(n=>({header:{padding:n.spacing(1,2,1,2.5),borderTop:`1px solid ${n.palette.grey.A100}`,borderBottom:`1px solid ${n.palette.grey.A100}`,color:n.palette.textSubtle,fontWeight:n.typography.fontWeightBold,position:"static",wordBreak:"normal"}}),{name:"BackstageTableHeader"})(Xr.W$),Ja=(0,Kt.Z)(n=>({root:{padding:n.spacing(3,0,2.5,2.5)},title:{"& > h6":{fontWeight:"bold"}},searchField:{paddingRight:n.spacing(2)}}),{name:"BackstageTableToolbar"})(Xr.UW),ws=(0,i.Z)(()=>({root:{display:"flex",alignItems:"center",justifyContent:"space-between"},title:{fontWeight:"bold",fontSize:18,whiteSpace:"nowrap"}}),{name:"BackstageTableFiltersContainer"}),zs=(0,i.Z)(()=>({root:{display:"flex",alignItems:"start"}}),{name:"BackstageTable"});function Ws(n,a){return n.map(c=>{const d={};let p=c.cellStyle||{};if(c.highlight)if(d.color=a.palette.textContrast,typeof p=="object")p.fontWeight=a.typography.fontWeightBold;else{const v=p;p=(D,$,Y)=>({...v(D,$,Y),fontWeight:a.typography.fontWeightBold})}return{...c,headerStyle:d,cellStyle:p}})}function Hs(n,a){return(0,ar.transform)(n,(c,d,p)=>{(0,ar.isEqual)(d,a[p])||(c[p]=d)})}const Ya={search:"",filtersOpen:!1,filters:{}};function Vs(n){const{toolbarRef:a,setSearch:c,hasFilters:d,selectedFiltersLength:p,toggleFilters:v}=n,D=ws(),$=(0,t.useCallback)(Y=>{n.onSearchChanged(Y),c(Y)},[n,c]);return d?t.createElement("div",{className:D.root},t.createElement("div",{className:D.root},t.createElement(L.Z,{onClick:v,"aria-label":"filter list"},t.createElement(la.Z,null)),t.createElement(Fe.Z,{className:D.title},"Filters (",p,")")),t.createElement(Ja,{...n,ref:a,onSearchChanged:$})):t.createElement(Ja,{...n,ref:a,onSearchChanged:$})}function js(n){const{data:a,columns:c,options:d,title:p,subtitle:v,filters:D,initialState:$,emptyContent:Y,onStateChange:V,...le}=n,re=zs(),Ce=(0,P.Z)(),Re={...Ya,...$},[be,mt]=(0,t.useState)(Re.filtersOpen),Ot=(0,t.useCallback)(()=>mt(Qt=>!Qt),[mt]),[Nt,Wt]=(0,t.useState)(0),[dt,Dt]=(0,t.useState)(a),[Ft,Jt]=(0,t.useState)(Re.filters),Fn=Ws(c,Ce),[mn,Dr]=(0,t.useState)(Re.search);(0,t.useEffect)(()=>{if(V){const Qt=Hs({search:mn,filtersOpen:be,filters:Ft},Ya);V(Qt)}},[mn,be,Ft,V]);const bt={headerStyle:{textTransform:"uppercase"}},Bn=(0,t.useCallback)(Qt=>{var on;return(on=c.find(hn=>hn.title===Qt))==null?void 0:on.field},[c]);(0,t.useEffect)(()=>{if(typeof a=="function")return;if(!Ft){Dt(a);return}const Qt=Object.values(Ft);if(a&&Qt.flat().length){const on=a.filter(hn=>!!Object.entries(Ft).filter(([,jn])=>!!jn.length).every(([jn,jt])=>{const Gt=Ka(hn,Bn(jn));return Array.isArray(Gt)&&Array.isArray(jt)?Gt.some(sr=>jt.includes(sr)):Array.isArray(Gt)?Gt.includes(jt):Array.isArray(jt)?jt.includes(Gt):Gt===jt}));Dt(on)}else Dt(a);Wt(Qt.flat().length)},[a,Ft,Bn]);const ma=(Qt,on)=>{const hn=jt=>{const Gt=new Set,sr=Gn=>{Gn!=null&&Gt.add(Gn)};return on&&on.forEach(Gn=>{const ir=Ka(Gn,Bn(jt));Array.isArray(ir)?ir.forEach(sr):sr(ir)}),Gt},jn=jt=>({placeholder:"All results",label:jt.column,multiple:jt.type==="multiple-select",items:[...hn(jt.column)].sort().map(Gt=>({label:Gt,value:Gt}))});return Qt.map(jt=>({type:jt.type,element:jn(jt)}))},Vn=!!(D!=null&&D.length),ha=(0,t.useCallback)(Qt=>t.createElement(Vs,{setSearch:Dr,hasFilters:Vn,selectedFiltersLength:Nt,toggleFilters:Ot,...Qt}),[Ot,Vn,Nt,Dr]),_r=typeof a!="function"&&a.length===0,ea=c.length,ga=(0,t.useCallback)(Qt=>Y&&_r?t.createElement("tbody",null,t.createElement("tr",null,t.createElement("td",{colSpan:ea},Y))):t.createElement(Xr.os,{...Qt}),[_r,Y,ea]);return t.createElement("div",{className:re.root},be&&a&&typeof a!="function"&&(D==null?void 0:D.length)&&t.createElement($s,{filters:ma(D,a),selectedFilters:Ft,onChangeFilters:Jt}),t.createElement(Xr.ZP,{components:{Header:Us,Toolbar:ha,Body:ga},options:{...bt,...d},columns:Fn,icons:Ns,title:t.createElement(t.Fragment,null,t.createElement(Fe.Z,{variant:"h5",component:"h3"},p),v&&t.createElement(Fe.Z,{color:"textSecondary",variant:"body1"},v)),data:typeof a=="function"?a:dt,style:{width:"100%"},localization:{toolbar:{searchPlaceholder:"Filter"}},...le}))}const Al=n=>{const{children:a,value:c,index:d,...p}=n;return React.createElement("div",{role:"tabpanel",hidden:c!==d,"aria-labelledby":`scrollable-auto-tab-${d}`,...p},c===d&&React.createElement(Box,{p:3},a))},Gs=(0,i.Z)(()=>({root:{color:"#6E6E6E",overflow:"visible",fontSize:"1.5rem",textAlign:"center",borderRadius:"50%",backgroundColor:"#E6E6E6",marginLeft:n=>n.isNext?"auto":"0",marginRight:n=>n.isNext?"0":"10px","&:hover":{backgroundColor:"#E6E6E6",opacity:"1"}}}),{name:"BackstageTabIcon"}),Rl=n=>{const a=Gs(n),{ariaLabel:c,onClick:d}=n;return React.createElement(IconButton,{onClick:d,className:a.root,size:"small",disableRipple:!0,disableFocusRipple:!0,"aria-label":c},n.children)},Ks=(n,a)=>a?n?"20px":"0":"40px",Js=(0,i.Z)(n=>({root:{textTransform:"none",height:"64px",fontWeight:n.typography.fontWeightBold,fontSize:n.typography.pxToRem(13),color:n.palette.textSubtle,marginLeft:a=>Ks(a.isFirstNav,a.isFirstIndex),width:"130px",minWidth:"130px","&:hover":{outline:"none",backgroundColor:"transparent",color:n.palette.textSubtle}}}),{name:"BackstageTab"}),Cl=n=>{const a=Js(n),{isFirstNav:c,isFirstIndex:d,...p}=n;return React.createElement(Tab,{classes:a,disableRipple:!0,...p})},Ys=(0,i.Z)(n=>({indicator:{display:"flex",justifyContent:"center",backgroundColor:n.palette.tabbar.indicator,height:"4px"},flexContainer:{alignItems:"center"},root:{"&:last-child":{marginLeft:"auto"}}}),{name:"BackstageTabBar"}),Sl=n=>{const a=Ys(n);return React.createElement(Tabs,{classes:a,...n,TabIndicatorProps:{children:React.createElement("span",null)}})},ks=(0,i.Z)(n=>({root:{flexGrow:1,width:"100%"},styledTabs:{backgroundColor:n.palette.background.paper},appbar:{boxShadow:"none",backgroundColor:n.palette.background.paper,paddingLeft:"10px",paddingRight:"10px"}}),{name:"BackstageTabs"});function Tl(n){const{tabs:a}=n,c=ks(),[d,p]=useState([0,0]),[v,D]=useState(0),[$,Y]=useState(0),[V,le]=useState([[]]),re=useRef(),{width:Ce}=useWindowSize(),Re=(Wt,dt)=>{p([v,dt])},be=()=>{D(v-1)},mt=()=>{D(v+1)},Ot=()=>v+1<V.length;useEffect(()=>{const dt=v===0?1:2,Dt=re.current.offsetWidth-20-dt*30,Ft=d[0]*$+d[1],Jt=Math.floor(Dt/170);Y(Jt),le(chunkArray(a,Jt)),p([Math.floor(Ft/Jt),Ft%Jt])},[Ce,a]);const Nt=v===d[0]?d[1]:!1;return React.createElement("div",{className:c.root},React.createElement(AppBar,{ref:re,className:c.appbar,position:"static"},React.createElement("div",null,React.createElement(StyledTabs,{value:Nt,onChange:Re,selectionFollowsFocus:!0},v!==0&&React.createElement(StyledIcon,{onClick:be,ariaLabel:"navigate-before"},React.createElement(NavigateBeforeIcon,null)),V[v].map((Wt,dt)=>React.createElement(StyledTab,{value:dt,isFirstIndex:dt===0,isFirstNav:v===0,key:dt,icon:Wt.icon||void 0,label:Wt.label||void 0})),Ot()&&React.createElement(StyledIcon,{isNext:!0,onClick:mt,ariaLabel:"navigate-next"},React.createElement(NavigateNextIcon,null))))),Nt!==!1?V[v].map((Wt,dt)=>React.createElement(TabPanel,{key:dt,value:dt,index:Nt},Wt.content)):React.createElement(TabPanel,{key:"panel_outside_chunked_array",value:d[1],index:d[1]},V[d[0]][d[1]].content))}var Pl=e(44311);function Qs(n,a){const c=n[n.length-1];if(!!c)return c>=.9?a.palette.status.ok:c>=.5?a.palette.status.warning:a.palette.status.error}function bl(n){var c;const a=useTheme();return n.data?React.createElement(Sparklines,{width:120,height:30,min:0,max:1,...n},n.title&&React.createElement("title",null,n.title),React.createElement(SparklinesLine,{color:(c=n.color)!=null?c:Qs(n.data,a)})):null}const Xs=n=>(0,i.Z)(a=>({container:{width:"100%",display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-end",alignItems:"center",marginBottom:a.spacing(2),textAlign:n.textAlign},leftItemsBox:{flex:"1 1 auto",minWidth:0,overflow:"visible"},rightItemsBox:{flex:"0 1 auto",display:"flex",flexDirection:"row",flexWrap:"wrap",alignItems:"center",marginLeft:a.spacing(1),minWidth:0,overflow:"visible"},description:{},title:{display:"inline-flex",marginBottom:0}}),{name:"BackstageContentHeader"}),_s=({title:n="Unknown page",className:a})=>t.createElement(Fe.Z,{variant:"h4",component:"h2",className:a,"data-testid":"header-title"},n);function ei(n){const{description:a,title:c,titleComponent:d=void 0,children:p,textAlign:v="left"}=n,D=Xs({textAlign:v})(),$=d||t.createElement(_s,{title:c,className:D.title});return t.createElement(t.Fragment,null,t.createElement(oa.q,{title:c}),t.createElement("div",{className:D.container},t.createElement("div",{className:D.leftItemsBox},$,a&&t.createElement(Fe.Z,{className:D.description,variant:"body2"},a)),t.createElement("div",{className:D.rightItemsBox},p)))}var ti=e(29788);const ni=(0,i.Z)(n=>({micDrop:{maxWidth:"60%",position:"absolute",bottom:n.spacing(2),right:n.spacing(2),[n.breakpoints.down("xs")]:{maxWidth:"96%",position:"relative",bottom:"unset",right:"unset",margin:`${n.spacing(10)}px auto ${n.spacing(4)}px`}}}),{name:"BackstageErrorPageMicDrop"}),ri=()=>{const n=ni();return t.createElement("img",{src:ti,className:n.micDrop,alt:"Girl dropping mic from her hands"})},ai=(0,i.Z)(n=>({container:{padding:n.spacing(8),[n.breakpoints.down("xs")]:{padding:n.spacing(2)}},title:{paddingBottom:n.spacing(5),[n.breakpoints.down("xs")]:{paddingBottom:n.spacing(4),fontSize:32}},subtitle:{color:n.palette.textSubtle}}),{name:"BackstageErrorPage"});function oi(n){const{status:a,statusMessage:c,additionalInfo:d,supportUrl:p}=n,v=ai(),D=(0,fn.s0)(),$=Ta();return t.createElement(Ee.Z,{container:!0,spacing:0,className:v.container},t.createElement(ri,null),t.createElement(Ee.Z,{item:!0,xs:12,sm:8,md:4},t.createElement(Fe.Z,{"data-testid":"error",variant:"body1",className:v.subtitle},"ERROR ",a,": ",c),t.createElement(Fe.Z,{variant:"body1",className:v.subtitle},d),t.createElement(Fe.Z,{variant:"h2",className:v.title},"Looks like someone dropped the mic!"),t.createElement(Fe.Z,{variant:"h6"},t.createElement(b,{to:"#","data-testid":"go-back-link",onClick:()=>D(-1)},"Go back"),"... or please"," ",t.createElement(b,{to:p||$.url},"contact support")," if you think this is a bug.")))}var si=e(16173);const ii=(0,Kt.Z)({root:{textDecoration:"underline",cursor:"pointer"}},{name:"BackstageBreadcrumbsClickableText"})(Fe.Z),ca=(0,Kt.Z)({root:{textDecoration:"underline",color:"inherit"}},{name:"BackstageBreadcrumbsStyledBox"})(un.Z);function li(n){const{children:a,...c}=n,[d,p]=t.useState(null),v=t.Children.toArray(a),[D,$,...Y]=v,V=Y.length?Y.pop():v[v.length-1],le=v.length>3,re=be=>{p(be.currentTarget)},Ce=()=>{p(null)},Re=Boolean(d);return t.createElement(t.Fragment,null,t.createElement(si.Z,{"aria-label":"breadcrumb",...c},v.length>1&&t.createElement(ca,{clone:!0},D),v.length>2&&t.createElement(ca,{clone:!0},$),le&&t.createElement(ii,{onClick:re},"..."),t.createElement(un.Z,{style:{fontStyle:"italic"}},V)),t.createElement(Ra.ZP,{open:Re,anchorEl:d,onClose:Ce,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}},t.createElement(Ve.Z,null,Y.map((be,mt)=>t.createElement(Je.Z,{key:mt,button:!0},t.createElement(ca,{clone:!0},be))))))}const ci=(0,i.Z)(n=>({header:{gridArea:"pageHeader",padding:n.spacing(3),width:"100%",boxShadow:n.shadows[4],position:"relative",zIndex:100,display:"flex",flexDirection:"row",alignItems:"center",backgroundImage:n.page.backgroundImage,backgroundPosition:"center",backgroundSize:"cover",[n.breakpoints.down("sm")]:{flexWrap:"wrap"}},leftItemsBox:{maxWidth:"100%",flexGrow:1},rightItemsBox:{width:"auto"},title:{color:n.palette.bursts.fontColor,wordBreak:"break-word",fontSize:n.typography.h3.fontSize,marginBottom:0},subtitle:{color:n.palette.bursts.fontColor,opacity:.8,display:"inline-block",marginTop:n.spacing(1),maxWidth:"75ch"},type:{textTransform:"uppercase",fontSize:11,opacity:.8,marginBottom:n.spacing(1),color:n.palette.bursts.fontColor},breadcrumb:{color:n.palette.bursts.fontColor},breadcrumbType:{fontSize:"inherit",opacity:.7,marginRight:-n.spacing(.3),marginBottom:n.spacing(.3)},breadcrumbTitle:{fontSize:"inherit",marginLeft:-n.spacing(.3),marginBottom:n.spacing(.3)}}),{name:"BackstageHeader"}),ui=({type:n,typeLink:a,classes:c,pageTitle:d})=>n?a?t.createElement(li,{className:c.breadcrumb},t.createElement(b,{to:a},n),t.createElement(Fe.Z,null,d)):t.createElement(Fe.Z,{className:c.type},n):null,di=({pageTitle:n,classes:a,tooltip:c})=>{const d=t.createElement(Fe.Z,{className:a.title,variant:"h1"},n);return c?t.createElement(z.ZP,{title:c,placement:"top-start"},d):d},fi=({classes:n,subtitle:a})=>a?typeof a!="string"?t.createElement(t.Fragment,null,a):t.createElement(Fe.Z,{className:n.subtitle,variant:"subtitle2",component:"span"},a):null;function ka(n){const{children:a,pageTitleOverride:c,style:d,subtitle:p,title:v,tooltip:D,type:$,typeLink:Y}=n,V=ci(),re=(0,l.useApi)(l.configApiRef).getOptionalString("app.title")||"Backstage",Ce=c||v,Re=v||c,be=`${Ce} | %s | ${re}`,mt=`${Ce} | ${re}`;return t.createElement(t.Fragment,null,t.createElement(oa.q,{titleTemplate:be,defaultTitle:mt}),t.createElement("header",{style:d,className:V.header},t.createElement(un.Z,{className:V.leftItemsBox},t.createElement(ui,{classes:V,type:$,typeLink:Y,pageTitle:Re}),t.createElement(di,{classes:V,pageTitle:Re,tooltip:D}),t.createElement(fi,{classes:V,subtitle:p})),t.createElement(Ee.Z,{container:!0,className:V.rightItemsBox,spacing:4},a)))}const mi=(0,i.Z)(n=>({root:{textAlign:"left"},label:{color:n.palette.common.white,fontWeight:"bold",letterSpacing:0,fontSize:n.typography.fontSize,marginBottom:n.spacing(1)/2,lineHeight:1},value:{color:"rgba(255, 255, 255, 0.8)",fontSize:n.typography.fontSize,lineHeight:1}}),{name:"BackstageHeaderLabel"}),hi=({value:n,className:a})=>t.createElement(Fe.Z,{className:a},n);function gi(n){const{label:a,value:c,url:d}=n,p=mi(),v=t.createElement(hi,{className:p.value,value:c||"<Unknown>"});return t.createElement(Ee.Z,{item:!0},t.createElement("span",{className:p.root},t.createElement(Fe.Z,{className:p.label},a),d?t.createElement(b,{to:d},v):v))}const pi={hour:"2-digit",minute:"2-digit"};function Qa(n){const a=new Date,c=window.navigator.language,d=[];if(!n.has("homepage.clocks"))return d;const p=n.getConfigArray("homepage.clocks");for(const v of p)if(v.has("label")&&v.has("timezone")){let D=v.getString("label");const $={timeZone:v.getString("timezone"),...pi};try{new Date().toLocaleString(c,$)}catch{console.warn(`The timezone ${$.timeZone} is invalid. Defaulting to GMT`),$.timeZone="GMT",D="GMT"}const Y=a.toLocaleTimeString(c,$);d.push({time:Y,label:D})}return d}function Il(n){const a=useApi(configApiRef),c=[],[d,p]=React.useState(c);return React.useEffect(()=>{p(Qa(a));const v=setInterval(()=>{p(Qa(a))},1e3);return()=>{clearInterval(v)}},[a]),d.length!==0?React.createElement(React.Fragment,null,d.map(v=>React.createElement(HeaderLabel,{label:v.label,value:v.time,key:v.label}))):null}const yi=n=>(0,o.Z)({root:{color:n.palette.common.white,padding:n.spacing(2,2,3),backgroundImage:n.palette.bursts.gradient.linear,backgroundPosition:0,backgroundSize:"inherit"}}),Ei=(0,i.Z)(yi,{name:"BackstageItemCardHeader"});function vi(n){const{title:a,subtitle:c,children:d}=n,p=Ei(n);return t.createElement("div",{className:p.root},c&&t.createElement(Fe.Z,{variant:"subtitle2",component:"h3"},c),a&&t.createElement(Fe.Z,{variant:"h6",component:"h4"},a),d)}function Ll(n){const{description:a,tags:c,title:d,type:p,subtitle:v,label:D,onClick:$,href:Y}=n;return React.createElement(Card,null,React.createElement(CardMedia,null,React.createElement(ItemCardHeader,{title:d,subtitle:v||p})),React.createElement(CardContent,null,c!=null&&c.length?React.createElement(Box,null,c.map((V,le)=>React.createElement(Chip,{size:"small",label:V,key:le}))):null,a),React.createElement(CardActions,null,!Y&&React.createElement(Button,{to:"#",onClick:$,color:"primary"},D),Y&&React.createElement(Button,{to:Y,color:"primary"},D)))}const Ai=n=>(0,o.Z)({root:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(22em, 1fr))",gridAutoRows:"1fr",gridGap:n.spacing(2)}}),Ri=(0,i.Z)(Ai,{name:"BackstageItemCardGrid"});function Ci(n){const{children:a,...c}=n,d=Ri(c);return t.createElement("div",{className:d.root,...c},a)}var Si=e(41547);const Ti=(0,i.Z)(()=>({root:({isMobile:n})=>({display:"grid",gridTemplateAreas:"'pageHeader pageHeader pageHeader' 'pageSubheader pageSubheader pageSubheader' 'pageNav pageContent pageSidebar'",gridTemplateRows:"max-content auto 1fr",gridTemplateColumns:"auto 1fr auto",height:n?"100%":"100vh",overflowY:"auto"})}),{name:"BackstagePage"});function Xa(n){const{themeId:a,children:c}=n,{isMobile:d}=(0,t.useContext)(or),p=Ti({isMobile:d});return t.createElement(Si.Z,{theme:v=>({...v,page:v.getPageTheme({themeId:a})})},t.createElement("div",{className:p.root},c))}function Pi(n){const{themeId:a,children:c,...d}=n;return t.createElement(Xa,{themeId:a},t.createElement(ka,{...d}),c)}var tn=e(30195);const xl=tn.z.object({providerInfo:tn.z.object({}).catchall(tn.z.unknown()).optional(),profile:tn.z.object({email:tn.z.string().optional(),displayName:tn.z.string().optional(),picture:tn.z.string().optional()}),backstageIdentity:tn.z.object({token:tn.z.string(),identity:tn.z.object({type:tn.z.literal("user"),userEntityRef:tn.z.string(),ownershipEntityRefs:tn.z.array(tn.z.string())})})}),qa={defaultTokenExpiryMillis:5*60*1e3,tokenExpiryMarginMillis:5*60*1e3};function bi(n){const a=new Date(Date.now()+qa.defaultTokenExpiryMillis);if(!n)return a;const[c,d,p]=n.split("."),v=JSON.parse(atob(d));return typeof v.exp!="number"?a:new Date(v.exp*1e3-qa.tokenExpiryMarginMillis)}class Ol{constructor(a){ae(this,"options");ae(this,"abortController");ae(this,"state");this.options=a,this.abortController=new AbortController,this.state={type:"empty"}}async start(){await this.getSessionAsync()}getUserId(){const{backstageIdentity:a}=this.getSessionSync(),c=a.identity.userEntityRef,d=/^([^:/]+:)?([^:/]+\/)?([^:/]+)$/.exec(c);if(!d)throw new TypeError(`Invalid user entity reference "${c}"`);return d[3]}async getIdToken(){return(await this.getSessionAsync()).backstageIdentity.token}getProfile(){return this.getSessionSync().profile}async getProfileInfo(){return(await this.getSessionAsync()).profile}async getBackstageIdentity(){return(await this.getSessionAsync()).backstageIdentity.identity}async getCredentials(){return{token:(await this.getSessionAsync()).backstageIdentity.token}}async signOut(){this.abortController.abort()}getSessionSync(){if(this.state.type==="active")return this.state.session;if(this.state.type==="fetching"&&this.state.previous)return this.state.previous;throw new Error("No session available. Try reloading your browser page.")}async getSessionAsync(){if(this.state.type==="fetching")return this.state.promise;if(this.state.type==="active"&&new Date<this.state.expiresAt)return this.state.session;const a=this.state.type==="active"?this.state.session:void 0,c=this.fetchSession().then(d=>(this.state={type:"active",session:d,expiresAt:bi(d.backstageIdentity.token)},d),d=>{throw this.state={type:"failed",error:d},d});return this.state={type:"fetching",promise:c,previous:a},c}async fetchSession(){const a=await this.options.discoveryApi.getBaseUrl("auth"),c=await fetch(`${a}/${this.options.provider}/refresh`,{signal:this.abortController.signal,headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"});if(!c.ok)throw await ResponseError.fromResponse(c);return proxiedSessionSchema.parse(await c.json())}}const Dl=n=>{const a=useApi(discoveryApiRef),[{status:c,error:d},{execute:p}]=useAsync(async()=>{const v=new ProxiedSignInIdentity({provider:n.provider,discoveryApi:a});await v.start(),n.onSignInSuccess(v)});return useMountEffect(p),c==="loading"?React.createElement(Progress,null):d?React.createElement(ErrorPanel,{title:"You do not appear to be signed in. Please try reloading the browser page.",error:d}):null},Ii=(0,i.Z)({container:{padding:0,listStyle:"none"},item:{display:"flex",flexDirection:"column",width:"100%",maxWidth:"400px",margin:0,padding:0}},{name:"BackstageSignInPage"}),ua=({children:n})=>{const a=Ii();return t.createElement(Ee.Z,{component:"li",item:!0,classes:a},n)};class da{getUserId(){return"guest"}async getIdToken(){}getProfile(){return{email:"guest@example.com",displayName:"Guest"}}async getProfileInfo(){return{email:"guest@example.com",displayName:"Guest"}}async getBackstageIdentity(){const a="user:default/guest";return{type:"user",userEntityRef:a,ownershipEntityRefs:[a]}}async getCredentials(){return{}}async signOut(){}}function Li(n){const[a,c,d]=n.split(".");return JSON.parse(atob(c))}class fa{constructor(a){this.result=a}getUserId(){return this.result.userId}static fromResult(a){return new fa(a)}async getIdToken(){var a,c;return(c=(a=this.result).getIdToken)==null?void 0:c.call(a)}getProfile(){return this.result.profile}async getProfileInfo(){return this.result.profile}async getBackstageIdentity(){const a=await this.getIdToken();if(!a){const p=`user:default/${this.getUserId()}`;return{type:"user",userEntityRef:p,ownershipEntityRefs:[p]}}const{sub:c,ent:d}=Li(a);return{type:"user",userEntityRef:c,ownershipEntityRefs:d!=null?d:[]}}async getCredentials(){var c,d;return{token:await((d=(c=this.result).getIdToken)==null?void 0:d.call(c))}}async signOut(){var a,c;return(c=(a=this.result).signOut)==null?void 0:c.call(a)}}class Or{constructor(a,c,d){ae(this,"profilePromise");this.identity=a,this.authApi=c,this.profile=d}static createGuest(){return new da}static fromLegacy(a){return fa.fromResult(a)}static create(a){return new Or(a.identity,a.authApi,a.profile)}getUserId(){const a=this.identity.userEntityRef,c=/^([^:/]+:)?([^:/]+\/)?([^:/]+)$/.exec(a);if(!c)throw new TypeError(`Invalid user entity reference "${a}"`);return c[3]}async getIdToken(){return(await this.authApi.getBackstageIdentity()).token}getProfile(){if(!this.profile)throw new Error("The identity API does not implement synchronous profile fetching, use getProfileInfo() instead");return this.profile}async getProfileInfo(){if(this.profilePromise)return await this.profilePromise;try{return this.profilePromise=this.authApi.getProfile(),await this.profilePromise}catch(a){throw this.profilePromise=void 0,a}}async getBackstageIdentity(){return this.identity}async getCredentials(){return{token:(await this.authApi.getBackstageIdentity()).token}}async signOut(){return this.authApi.signOut()}}const xi={Component:({config:n,onSignInSuccess:a})=>{const{apiRef:c,title:d,message:p}=n,v=(0,l.useApi)(c),D=(0,l.useApi)(l.errorApiRef),$=async()=>{try{const Y=await v.getBackstageIdentity({instantPopup:!0});if(!Y)throw new Error(`The ${d} provider is not configured to support sign-in`);const V=await v.getProfile();a(Or.create({identity:Y.identity,profile:V,authApi:v}))}catch(Y){D.post(new gr.SP("Login failed",Y))}};return t.createElement(ua,null,t.createElement(Rn,{variant:"fullHeight",title:d,actions:t.createElement(h.Z,{color:"primary",variant:"outlined",onClick:$},"Sign In")},t.createElement(Fe.Z,{variant:"body1"},p)))},loader:async(n,a)=>{const c=n.get(a),d=await c.getBackstageIdentity({optional:!0});if(!d)return;const p=await c.getProfile();return Or.create({identity:d.identity,profile:p,authApi:c})}},Oi={Component:({onSignInSuccess:n})=>t.createElement(ua,null,t.createElement(Rn,{title:"Guest",variant:"fullHeight",actions:t.createElement(h.Z,{color:"primary",variant:"outlined",onClick:()=>n(new da)},"Enter")},t.createElement(Fe.Z,{variant:"body1"},"Enter as a Guest User.",t.createElement("br",null),"You will not have a verified identity,",t.createElement("br",null),"meaning some features might be unavailable."))),loader:async()=>new da};var Di=e(63955),_a=e(86619),eo=e(74828),Fi=e(45455),Bi=e.n(Fi);const Mi=/^[a-z0-9_\-]+\.[a-z0-9_\-]+\.[a-z0-9_\-]+$/i,Zi=(0,i.Z)(n=>({form:{display:"flex",flexFlow:"column nowrap"},button:{alignSelf:"center",marginTop:n.spacing(2)}}),{name:"BackstageCustomProvider"}),to=n=>{const{ref:a,...c}=n;return{inputRef:a,...c}},$i={Component:({onSignInSuccess:n})=>{const a=Zi(),{register:c,handleSubmit:d,formState:p}=(0,Di.cI)({mode:"onChange"}),{errors:v}=p,D=({userId:$})=>{n(Or.fromLegacy({userId:$,profile:{email:`${$}@example.com`}}))};return t.createElement(ua,null,t.createElement(Rn,{title:"Custom User",variant:"fullHeight"},t.createElement(Fe.Z,{variant:"body1"},"Enter your own User ID and credentials.",t.createElement("br",null),"This selection will not be stored."),t.createElement("form",{className:a.form,onSubmit:d(D)},t.createElement(T.Z,null,t.createElement(_a.Z,{...to(c("userId",{required:!0})),label:"User ID",margin:"normal",error:Boolean(v.userId)}),v.userId&&t.createElement(eo.Z,{error:!0},v.userId.message)),t.createElement(T.Z,null,t.createElement(_a.Z,{...to(c("idToken",{required:!1,validate:$=>!$||Mi.test($)||"Token is not a valid OpenID Connect JWT Token"})),label:"ID Token (optional)",margin:"normal",autoComplete:"off",error:Boolean(v.idToken)}),v.idToken&&t.createElement(eo.Z,{error:!0},v.idToken.message)),t.createElement(h.Z,{type:"submit",color:"primary",variant:"outlined",className:a.button,disabled:!(p!=null&&p.isDirty)||!Bi()(v)},"Continue"))))},loader:async()=>{}},qr="@backstage/core:SignInPage:provider",no={guest:Oi,custom:$i,common:xi};function ro(n,a){if(n in a)throw new Error(`"${n}" ID is duplicated. IDs of identity providers have to be unique.`)}function Ul(n){return n.reduce((c,d)=>{if(typeof d=="string")return ro(d,c),c[d]={components:no[d],id:d},c;const{id:p}=d;return ro(p,c),c[p]={components:no.common,id:p,config:d},c},{})}const wl=(n,a)=>{const c=useApi(errorApiRef),d=useApiHolder(),[p,v]=useState(!0),D=useCallback(Y=>{a(IdentityApiSignOutProxy.from({identityApi:Y,signOut:async()=>{var V;localStorage.removeItem(qr),await((V=Y.signOut)==null?void 0:V.call(Y))}}))},[a]);useLayoutEffect(()=>{var re;if(!p)return;const Y=localStorage.getItem(qr);if(Y===null){v(!1);return}const V=n[Y];if(!V){v(!1);return}let le=!1;return V.components.loader(d,(re=V.config)==null?void 0:re.apiRef).then(Ce=>{le||(Ce?D(Ce):v(!1))}).catch(Ce=>{le||(localStorage.removeItem(qr),c.post(Ce),v(!1))}),()=>{le=!0}},[p,c,a,d,n,D]);const $=useMemo(()=>Object.keys(n).map(Y=>{const V=n[Y],{Component:le}=V.components,re=Ce=>{localStorage.setItem(qr,V.id),D(Ce)};return React.createElement(le,{key:V.id,config:V.config,onSignInSuccess:re})}),[n,D]);return[p,$]},Ni=({onSignInSuccess:n,providers:a=[],title:c,align:d="left"})=>{const p=useApi(configApiRef),v=useStyles(),D=getSignInProviders(a),[$,Y]=useSignInProviders(D,n);return $?React.createElement(Progress,null):React.createElement(Page,{themeId:"home"},React.createElement(Header,{title:p.getString("app.title")}),React.createElement(Content,null,c&&React.createElement(ContentHeader,{title:c,textAlign:d}),React.createElement(Grid,{container:!0,justifyContent:d==="center"?d:"flex-start",spacing:2,component:"ul",classes:v},Y)))},Ui=({provider:n,auto:a,onSignInSuccess:c})=>{const d=useStyles(),p=useApi(n.apiRef),v=useApi(configApiRef),[D,$]=useState(),[Y,V]=useState(!1),le=async({checkExisting:re,showPopup:Ce})=>{try{let Re;if(re&&(Re=await p.getBackstageIdentity({optional:!0})),!Re&&(Ce||a)&&(V(!0),Re=await p.getBackstageIdentity({instantPopup:!0}),!Re))throw new Error(`The ${n.title} provider is not configured to support sign-in`);if(!Re){V(!0);return}const be=await p.getProfile();c(UserIdentity.create({identity:Re.identity,authApi:p,profile:be}))}catch(Re){$(Re),V(!0)}};return useMountEffect(()=>le({checkExisting:!0})),Y?React.createElement(Page,{themeId:"home"},React.createElement(Header,{title:v.getString("app.title")}),React.createElement(Content,null,React.createElement(Grid,{container:!0,justifyContent:"center",spacing:2,component:"ul",classes:d},React.createElement(GridItem,null,React.createElement(InfoCard,{variant:"fullHeight",title:n.title,actions:React.createElement(Button,{color:"primary",variant:"outlined",onClick:()=>{le({showPopup:!0})}},"Sign In")},React.createElement(Typography,{variant:"body1"},n.message),D&&D.name!=="PopupRejectedError"&&React.createElement(Typography,{variant:"body1",color:"error"},D.message)))))):React.createElement(Progress,null)};function zl(n){return"provider"in n?React.createElement(Ui,{...n}):React.createElement(Ni,{...n})}const wi=(0,i.Z)(n=>({root:{padding:n.spacing(0,2,0,2.5),minHeight:n.spacing(3)},indicator:{backgroundColor:n.palette.info.main,height:n.spacing(.3)}}),{name:"BackstageTabbedCard"}),zi=(0,Kt.Z)(n=>({root:{padding:n.spacing(2,2,2,2.5),display:"inline-block"},title:{fontWeight:700},subheader:{paddingTop:n.spacing(1)}}),{name:"BackstageTabbedCardBoldHeader"})(Hn.Z);function Wl(n){const{slackChannel:a,errorBoundaryProps:c,children:d,title:p,deepLink:v,value:D,onChange:$}=n,Y=wi(),[V,le]=useState(0),re=$||((be,mt)=>le(mt));let Ce;D?React.Children.map(d,be=>{React.isValidElement(be)&&(be==null?void 0:be.props.value)===D&&(Ce=be==null?void 0:be.props.children)}):React.Children.map(d,(be,mt)=>{React.isValidElement(be)&&mt===V&&(Ce=be==null?void 0:be.props.children)});const Re=c||(a?{slackChannel:a}:{});return React.createElement(Card,null,React.createElement(ErrorBoundary,{...Re},p&&React.createElement(zi,{title:p}),React.createElement(Tabs,{selectionFollowsFocus:!0,classes:Y,value:D||V,onChange:re},d),React.createElement(Divider,null),React.createElement(CardContent,null,Ce),v&&React.createElement(BottomLink,{...v})))}const Wi=(0,i.Z)(n=>({root:{minWidth:n.spacing(6),minHeight:n.spacing(3),margin:n.spacing(0,2,0,0),padding:n.spacing(.5,0,.5,0),textTransform:"none","&:hover":{opacity:1,backgroundColor:"transparent",color:n.palette.text.primary}},selected:{fontWeight:"bold"}}),{name:"BackstageCardTab"});function Hl(n){const{children:a,...c}=n,d=Wi();return React.createElement(Tab,{disableRipple:!0,classes:d,...c})}},88609:function(_,s,e){"use strict";e.d(s,{Os:function(){return f},fC:function(){return E}});var r=e(76241),t=e(2784);const l=(0,r.CT)("analytics-context"),f=()=>{const o=(0,t.useContext)(l);if(o===void 0)return{routeRef:"unknown",pluginId:"root",extension:"App"};const m=o.atVersion(1);if(m===void 0)throw new Error("No context found for version 1.");return m},E=o=>{const{attributes:m,children:u}=o,g={...f(),...m},R=(0,r.EI)({1:g});return t.createElement(l.Provider,{value:R},u)};function i(o,m){const u=h=>React.createElement(E,{attributes:m},React.createElement(o,{...h}));return u.displayName=`WithAnalyticsContext(${o.displayName||o.name||"Component"})`,u}},28461:function(_,s,e){"use strict";e.d(s,{f:function(){return r.fC},z:function(){return i}});var r=e(88609),t=e(27399),l=e(2784);class f{constructor(m,u={routeRef:"unknown",pluginId:"root",extension:"App"}){this.analyticsApi=m,this.context=u}setContext(m){this.context=m}captureEvent(m,u,{value:h,attributes:g}={}){try{this.analyticsApi.captureEvent({action:m,subject:u,value:h,attributes:g,context:this.context})}catch(R){console.warn("Error during analytics event capture. %o",R)}}}function E(){try{return(0,t.useApi)(t.analyticsApiRef)}catch{return{captureEvent:()=>{}}}}function i(){const o=(0,l.useRef)(null),m=(0,r.Os)(),u=E();function h(){return o.current===null&&(o.current=new f(u)),o.current}const g=h();return g.setContext(m),g}},39135:function(_,s,e){"use strict";e.d(s,{CL:function(){return I},sM:function(){return t},$v:function(){return g},v_:function(){return R},hg:function(){return C},uB:function(){return h},bq:function(){return u},Ds:function(){return M},NW:function(){return b},VE:function(){return Q},W0:function(){return P},gP:function(){return L},F4:function(){return f},ux:function(){return i},Kp:function(){return l},$4:function(){return z},p_:function(){return o},ZM:function(){return W},D:function(){return E},gW:function(){return m},E6:function(){return q}});var r=e(86833),t;(function(oe){const ve="SignedIn";oe.SignedIn=ve;const Le="SignedOut";oe.SignedOut=Le})(t||(t={}));const l=(0,r.createApiRef)({id:"core.auth.google"}),f=(0,r.createApiRef)({id:"core.auth.github"}),E=(0,r.createApiRef)({id:"core.auth.okta"}),i=(0,r.createApiRef)({id:"core.auth.gitlab"}),o=(0,r.createApiRef)({id:"core.auth.microsoft"}),m=(0,r.createApiRef)({id:"core.auth.onelogin"}),u=(0,r.createApiRef)({id:"core.auth.bitbucket"}),h=(0,r.createApiRef)({id:"core.auth.atlassian"}),g=(0,r.createApiRef)({id:"core.alert"}),R=(0,r.createApiRef)({id:"core.analytics"}),C=(0,r.createApiRef)({id:"core.apptheme"}),M=(0,r.createApiRef)({id:"core.config"}),b=(0,r.createApiRef)({id:"core.discovery"}),Q=(0,r.createApiRef)({id:"core.error"});var I;(function(oe){oe[oe.None=0]="None";const Le=1;oe[oe.Active=Le]="Active"})(I||(I={}));const P=(0,r.createApiRef)({id:"core.featureflags"}),L=(0,r.createApiRef)({id:"core.fetch"}),z=(0,r.createApiRef)({id:"core.identity"}),W=(0,r.createApiRef)({id:"core.oauthrequest"}),q=(0,r.createApiRef)({id:"core.storage"})},27399:function(_,s,e){"use strict";e.d(s,{FeatureFlagState:function(){return t.CL},SessionState:function(){return t.sM},alertApiRef:function(){return t.$v},analyticsApiRef:function(){return t.v_},appThemeApiRef:function(){return t.hg},atlassianAuthApiRef:function(){return t.uB},bitbucketAuthApiRef:function(){return t.bq},configApiRef:function(){return t.Ds},createApiFactory:function(){return r.createApiFactory},createApiRef:function(){return r.createApiRef},discoveryApiRef:function(){return t.NW},errorApiRef:function(){return t.VE},featureFlagsApiRef:function(){return t.W0},fetchApiRef:function(){return t.gP},githubAuthApiRef:function(){return t.F4},gitlabAuthApiRef:function(){return t.ux},googleAuthApiRef:function(){return t.Kp},identityApiRef:function(){return t.$4},microsoftAuthApiRef:function(){return t.p_},oauthRequestApiRef:function(){return t.ZM},oktaAuthApiRef:function(){return t.D},oneloginAuthApiRef:function(){return t.gW},storageApiRef:function(){return t.E6},useApi:function(){return r.useApi},useApiHolder:function(){return r.useApiHolder}});var r=e(86833);e.o(r,"FeatureFlagState")&&e.d(s,{FeatureFlagState:function(){return r.FeatureFlagState}}),e.o(r,"SessionState")&&e.d(s,{SessionState:function(){return r.SessionState}}),e.o(r,"alertApiRef")&&e.d(s,{alertApiRef:function(){return r.alertApiRef}}),e.o(r,"analyticsApiRef")&&e.d(s,{analyticsApiRef:function(){return r.analyticsApiRef}}),e.o(r,"appThemeApiRef")&&e.d(s,{appThemeApiRef:function(){return r.appThemeApiRef}}),e.o(r,"atlassianAuthApiRef")&&e.d(s,{atlassianAuthApiRef:function(){return r.atlassianAuthApiRef}}),e.o(r,"attachComponentData")&&e.d(s,{attachComponentData:function(){return r.attachComponentData}}),e.o(r,"bitbucketAuthApiRef")&&e.d(s,{bitbucketAuthApiRef:function(){return r.bitbucketAuthApiRef}}),e.o(r,"configApiRef")&&e.d(s,{configApiRef:function(){return r.configApiRef}}),e.o(r,"createComponentExtension")&&e.d(s,{createComponentExtension:function(){return r.createComponentExtension}}),e.o(r,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return r.createExternalRouteRef}}),e.o(r,"createPlugin")&&e.d(s,{createPlugin:function(){return r.createPlugin}}),e.o(r,"createRoutableExtension")&&e.d(s,{createRoutableExtension:function(){return r.createRoutableExtension}}),e.o(r,"createRouteRef")&&e.d(s,{createRouteRef:function(){return r.createRouteRef}}),e.o(r,"discoveryApiRef")&&e.d(s,{discoveryApiRef:function(){return r.discoveryApiRef}}),e.o(r,"errorApiRef")&&e.d(s,{errorApiRef:function(){return r.errorApiRef}}),e.o(r,"featureFlagsApiRef")&&e.d(s,{featureFlagsApiRef:function(){return r.featureFlagsApiRef}}),e.o(r,"fetchApiRef")&&e.d(s,{fetchApiRef:function(){return r.fetchApiRef}}),e.o(r,"getComponentData")&&e.d(s,{getComponentData:function(){return r.getComponentData}}),e.o(r,"githubAuthApiRef")&&e.d(s,{githubAuthApiRef:function(){return r.githubAuthApiRef}}),e.o(r,"gitlabAuthApiRef")&&e.d(s,{gitlabAuthApiRef:function(){return r.gitlabAuthApiRef}}),e.o(r,"googleAuthApiRef")&&e.d(s,{googleAuthApiRef:function(){return r.googleAuthApiRef}}),e.o(r,"identityApiRef")&&e.d(s,{identityApiRef:function(){return r.identityApiRef}}),e.o(r,"microsoftAuthApiRef")&&e.d(s,{microsoftAuthApiRef:function(){return r.microsoftAuthApiRef}}),e.o(r,"oauthRequestApiRef")&&e.d(s,{oauthRequestApiRef:function(){return r.oauthRequestApiRef}}),e.o(r,"oktaAuthApiRef")&&e.d(s,{oktaAuthApiRef:function(){return r.oktaAuthApiRef}}),e.o(r,"oneloginAuthApiRef")&&e.d(s,{oneloginAuthApiRef:function(){return r.oneloginAuthApiRef}}),e.o(r,"storageApiRef")&&e.d(s,{storageApiRef:function(){return r.storageApiRef}}),e.o(r,"useApp")&&e.d(s,{useApp:function(){return r.useApp}}),e.o(r,"useElementFilter")&&e.d(s,{useElementFilter:function(){return r.useElementFilter}}),e.o(r,"useRouteRef")&&e.d(s,{useRouteRef:function(){return r.useRouteRef}}),e.o(r,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return r.useRouteRefParams}});var t=e(39135)},90515:function(_,s,e){"use strict";e.d(s,{T:function(){return t}});class r{constructor(f){if(this.config=f,!f.id.split(".").flatMap(i=>i.split("-")).every(i=>i.match(/^[a-z][a-z0-9]*$/)))throw new Error(`API id must only contain period separated lowercase alphanum tokens with dashes, got '${f.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 t(l){return new r(l)}},25182:function(_,s,e){"use strict";e.d(s,{n:function(){return r}});function r(t,l){return"id"in t?{api:t,deps:{},factory:()=>l}:t}},86833:function(_,s,e){"use strict";e.d(s,{createApiFactory:function(){return E.n},createApiRef:function(){return t.T},useApi:function(){return r.h_},useApiHolder:function(){return r.I_}});var r=e(5761),t=e(90515),l=e(16362),f=e.n(l);e.o(l,"FeatureFlagState")&&e.d(s,{FeatureFlagState:function(){return l.FeatureFlagState}}),e.o(l,"SessionState")&&e.d(s,{SessionState:function(){return l.SessionState}}),e.o(l,"alertApiRef")&&e.d(s,{alertApiRef:function(){return l.alertApiRef}}),e.o(l,"analyticsApiRef")&&e.d(s,{analyticsApiRef:function(){return l.analyticsApiRef}}),e.o(l,"appThemeApiRef")&&e.d(s,{appThemeApiRef:function(){return l.appThemeApiRef}}),e.o(l,"atlassianAuthApiRef")&&e.d(s,{atlassianAuthApiRef:function(){return l.atlassianAuthApiRef}}),e.o(l,"attachComponentData")&&e.d(s,{attachComponentData:function(){return l.attachComponentData}}),e.o(l,"bitbucketAuthApiRef")&&e.d(s,{bitbucketAuthApiRef:function(){return l.bitbucketAuthApiRef}}),e.o(l,"configApiRef")&&e.d(s,{configApiRef:function(){return l.configApiRef}}),e.o(l,"createApiFactory")&&e.d(s,{createApiFactory:function(){return l.createApiFactory}}),e.o(l,"createComponentExtension")&&e.d(s,{createComponentExtension:function(){return l.createComponentExtension}}),e.o(l,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return l.createExternalRouteRef}}),e.o(l,"createPlugin")&&e.d(s,{createPlugin:function(){return l.createPlugin}}),e.o(l,"createRoutableExtension")&&e.d(s,{createRoutableExtension:function(){return l.createRoutableExtension}}),e.o(l,"createRouteRef")&&e.d(s,{createRouteRef:function(){return l.createRouteRef}}),e.o(l,"discoveryApiRef")&&e.d(s,{discoveryApiRef:function(){return l.discoveryApiRef}}),e.o(l,"errorApiRef")&&e.d(s,{errorApiRef:function(){return l.errorApiRef}}),e.o(l,"featureFlagsApiRef")&&e.d(s,{featureFlagsApiRef:function(){return l.featureFlagsApiRef}}),e.o(l,"fetchApiRef")&&e.d(s,{fetchApiRef:function(){return l.fetchApiRef}}),e.o(l,"getComponentData")&&e.d(s,{getComponentData:function(){return l.getComponentData}}),e.o(l,"githubAuthApiRef")&&e.d(s,{githubAuthApiRef:function(){return l.githubAuthApiRef}}),e.o(l,"gitlabAuthApiRef")&&e.d(s,{gitlabAuthApiRef:function(){return l.gitlabAuthApiRef}}),e.o(l,"googleAuthApiRef")&&e.d(s,{googleAuthApiRef:function(){return l.googleAuthApiRef}}),e.o(l,"identityApiRef")&&e.d(s,{identityApiRef:function(){return l.identityApiRef}}),e.o(l,"microsoftAuthApiRef")&&e.d(s,{microsoftAuthApiRef:function(){return l.microsoftAuthApiRef}}),e.o(l,"oauthRequestApiRef")&&e.d(s,{oauthRequestApiRef:function(){return l.oauthRequestApiRef}}),e.o(l,"oktaAuthApiRef")&&e.d(s,{oktaAuthApiRef:function(){return l.oktaAuthApiRef}}),e.o(l,"oneloginAuthApiRef")&&e.d(s,{oneloginAuthApiRef:function(){return l.oneloginAuthApiRef}}),e.o(l,"storageApiRef")&&e.d(s,{storageApiRef:function(){return l.storageApiRef}}),e.o(l,"useApp")&&e.d(s,{useApp:function(){return l.useApp}}),e.o(l,"useElementFilter")&&e.d(s,{useElementFilter:function(){return l.useElementFilter}}),e.o(l,"useRouteRef")&&e.d(s,{useRouteRef:function(){return l.useRouteRef}}),e.o(l,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return l.useRouteRefParams}});var E=e(25182)},16362:function(){},5761:function(_,s,e){"use strict";e.d(s,{I_:function(){return l},h_:function(){return f}});var r=e(2784),t=e(76241);function l(){const i=(0,t.Vt)("api-context");if(!i)throw new Error("API context is not available");const o=i.atVersion(1);if(!o)throw new Error("ApiContext v1 not available");return o}function f(i){const m=l().get(i);if(!m)throw new Error(`No implementation available for ${i}`);return m}function E(i){return function(m){const u=g=>{const R=l(),C={};for(const M in i)if(i.hasOwnProperty(M)){const b=i[M],Q=R.get(b);if(!Q)throw new Error(`No implementation available for ${b}`);C[M]=Q}return React.createElement(m,{...g,...C})},h=m.displayName||m.name||"Component";return u.displayName=`withApis(${h})`,u}}},31311:function(_,s,e){"use strict";e.d(s,{useApp:function(){return r.q}});var r=e(32483),t=e(67229),l=e.n(t);e.o(t,"attachComponentData")&&e.d(s,{attachComponentData:function(){return t.attachComponentData}}),e.o(t,"createApiFactory")&&e.d(s,{createApiFactory:function(){return t.createApiFactory}}),e.o(t,"createApiRef")&&e.d(s,{createApiRef:function(){return t.createApiRef}}),e.o(t,"createComponentExtension")&&e.d(s,{createComponentExtension:function(){return t.createComponentExtension}}),e.o(t,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return t.createExternalRouteRef}}),e.o(t,"createPlugin")&&e.d(s,{createPlugin:function(){return t.createPlugin}}),e.o(t,"createRoutableExtension")&&e.d(s,{createRoutableExtension:function(){return t.createRoutableExtension}}),e.o(t,"createRouteRef")&&e.d(s,{createRouteRef:function(){return t.createRouteRef}}),e.o(t,"getComponentData")&&e.d(s,{getComponentData:function(){return t.getComponentData}}),e.o(t,"useApi")&&e.d(s,{useApi:function(){return t.useApi}}),e.o(t,"useApiHolder")&&e.d(s,{useApiHolder:function(){return t.useApiHolder}}),e.o(t,"useElementFilter")&&e.d(s,{useElementFilter:function(){return t.useElementFilter}}),e.o(t,"useRouteRef")&&e.d(s,{useRouteRef:function(){return t.useRouteRef}}),e.o(t,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return t.useRouteRefParams}})},67229:function(){},32483:function(_,s,e){"use strict";e.d(s,{q:function(){return t}});var r=e(76241);const t=()=>{const l=(0,r.Vt)("app-context");if(!l)throw new Error("App context is not available");const f=l.atVersion(1);if(!f)throw new Error("AppContext v1 not available");return f}},74181:function(_,s,e){"use strict";e.d(s,{R5:function(){return f},CO:function(){return R},P4:function(){return g},IY:function(){return E},vJ:function(){return I}});var r=e(76241);const t=(0,r.uW)("component-data-store",()=>new WeakMap),l="__backstage_data";function f(P,L,z){var oe;const W=P;let q=(oe=W[l])!=null?oe:t.get(P);if(q||(q={map:new Map},Object.defineProperty(W,l,{enumerable:!1,configurable:!0,writable:!1,value:q}),t.set(P,q)),q.map.has(L)){const ve=P.displayName||P.name;throw new Error(`Attempted to attach duplicate data "${L}" to component "${ve}"`)}q.map.set(L,z)}function E(P,L){var q;if(!P)return;const z=P.type;if(!z)return;const W=(q=z[l])!=null?q:t.get(z);if(!!W)return W.map.get(L)}var i=e(2784),o=e(88609),m=e(31311),u=e(82772);class h extends i.Component{constructor(){super(...arguments);ae(this,"state",{error:void 0});ae(this,"handleErrorReset",()=>{this.setState({error:void 0})})}static getDerivedStateFromError(L){return{error:L}}render(){const{error:L}=this.state,{app:z,plugin:W}=this.props,{ErrorBoundaryFallback:q}=z.getComponents();return L?i.createElement(q,{error:L,resetError:this.handleErrorReset,plugin:W}):this.props.children}}function g(P){const{component:L,mountPoint:z,name:W}=P;return C({component:{lazy:()=>L().then(q=>{const oe=Le=>{try{(0,u.tg)(z)}catch(we){if(typeof we=="object"&&we!==null){const{message:fe}=we;if(typeof fe=="string"&&fe.startsWith("No path for "))throw new Error(`Routable extension component with mount point ${z} 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 we}return i.createElement(q,{...Le})},ve=W||q.displayName||q.name||"LazyComponent";return oe.displayName=`RoutableExtension(${ve})`,oe},q=>ve=>{const Le=(0,m.useApp)(),{BootErrorPage:we}=Le.getComponents();return i.createElement(we,{step:"load-chunk",error:q})})},data:{"core.mountPoint":z},name:W})}function R(P){const{component:L,name:z}=P;return C({component:L,name:z})}function C(P){const{data:L={},name:z}=P;z||console.warn("Declaring extensions without name is DEPRECATED. Make sure that all usages of createReactExtension, createComponentExtension and createRoutableExtension provide a name.");let W;if("lazy"in P.component){const oe=P.component.lazy;W=(0,i.lazy)(()=>oe().then(ve=>({default:ve})))}else W=P.component.sync;const q=z||W.displayName||W.name||"Component";return{expose(oe){const ve=Le=>{const we=(0,m.useApp)(),{Progress:fe}=we.getComponents(),Ke=L==null?void 0:L["core.mountPoint"];return i.createElement(i.Suspense,{fallback:i.createElement(fe,null)},i.createElement(h,{app:we,plugin:oe},i.createElement(o.fC,{attributes:{pluginId:oe.getId(),...z&&{extension:z},...Ke&&{routeRef:Ke.id}}},i.createElement(W,{...Le}))))};f(ve,"core.plugin",oe);for(const[Le,we]of Object.entries(L))f(ve,Le,we);return ve.displayName=`Extension(${q})`,ve}}}var M=e(27399);function b(P,L,z,W){return i.Children.toArray(P).flatMap(q=>{if(!(0,i.isValidElement)(q))return[];if(q.type===i.Fragment)return b(q.props.children,L,z,W);if(E(q,"core.featureFlagged")){const oe=q.props;return("with"in oe?L.isActive(oe.with):!L.isActive(oe.without))?b(q.props.children,L,z,W):[]}if(z===void 0||z(q))return[q];if(W)throw new Error(W);return b(q.props.children,L,z,W)})}class Q{constructor(L,z){this.node=L,this.featureFlagsApi=z}selectByComponentData(L){const z=b(this.node,this.featureFlagsApi,W=>E(W,L.key)!==void 0,L.withStrictError);return new Q(z,this.featureFlagsApi)}findComponentData(L){return b(this.node,this.featureFlagsApi,W=>E(W,L.key)!==void 0).map(W=>E(W,L.key)).filter(W=>W!==void 0)}getElements(){return b(this.node,this.featureFlagsApi)}}function I(P,L,z=[]){const W=(0,M.useApi)(M.featureFlagsApiRef),q=new Q(P,W);return(0,i.useMemo)(()=>L(q),[P,...z])}},80274:function(){},36964:function(_,s,e){"use strict";e.d(s,{AnalyticsContext:function(){return r.f},FeatureFlagState:function(){return t.FeatureFlagState},SessionState:function(){return t.SessionState},alertApiRef:function(){return t.alertApiRef},analyticsApiRef:function(){return t.analyticsApiRef},appThemeApiRef:function(){return t.appThemeApiRef},atlassianAuthApiRef:function(){return t.atlassianAuthApiRef},attachComponentData:function(){return f.R5},bitbucketAuthApiRef:function(){return t.bitbucketAuthApiRef},configApiRef:function(){return t.configApiRef},createComponentExtension:function(){return f.CO},createExternalRouteRef:function(){return m.x8},createPlugin:function(){return o.r},createRoutableExtension:function(){return f.P4},createRouteRef:function(){return m.NT},discoveryApiRef:function(){return t.discoveryApiRef},errorApiRef:function(){return t.errorApiRef},featureFlagsApiRef:function(){return t.featureFlagsApiRef},fetchApiRef:function(){return t.fetchApiRef},getComponentData:function(){return f.IY},githubAuthApiRef:function(){return t.githubAuthApiRef},gitlabAuthApiRef:function(){return t.gitlabAuthApiRef},googleAuthApiRef:function(){return t.googleAuthApiRef},identityApiRef:function(){return t.identityApiRef},microsoftAuthApiRef:function(){return t.microsoftAuthApiRef},oauthRequestApiRef:function(){return t.oauthRequestApiRef},oktaAuthApiRef:function(){return t.oktaAuthApiRef},oneloginAuthApiRef:function(){return t.oneloginAuthApiRef},storageApiRef:function(){return t.storageApiRef},useAnalytics:function(){return r.z},useApp:function(){return l.useApp},useElementFilter:function(){return f.vJ},useRouteRef:function(){return m.tg},useRouteRefParams:function(){return m.Oi}});var r=e(28461),t=e(27399);e.o(t,"attachComponentData")&&e.d(s,{attachComponentData:function(){return t.attachComponentData}}),e.o(t,"createApiFactory")&&e.d(s,{createApiFactory:function(){return t.createApiFactory}}),e.o(t,"createApiRef")&&e.d(s,{createApiRef:function(){return t.createApiRef}}),e.o(t,"createComponentExtension")&&e.d(s,{createComponentExtension:function(){return t.createComponentExtension}}),e.o(t,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return t.createExternalRouteRef}}),e.o(t,"createPlugin")&&e.d(s,{createPlugin:function(){return t.createPlugin}}),e.o(t,"createRoutableExtension")&&e.d(s,{createRoutableExtension:function(){return t.createRoutableExtension}}),e.o(t,"createRouteRef")&&e.d(s,{createRouteRef:function(){return t.createRouteRef}}),e.o(t,"getComponentData")&&e.d(s,{getComponentData:function(){return t.getComponentData}}),e.o(t,"useApi")&&e.d(s,{useApi:function(){return t.useApi}}),e.o(t,"useApiHolder")&&e.d(s,{useApiHolder:function(){return t.useApiHolder}}),e.o(t,"useApp")&&e.d(s,{useApp:function(){return t.useApp}}),e.o(t,"useElementFilter")&&e.d(s,{useElementFilter:function(){return t.useElementFilter}}),e.o(t,"useRouteRef")&&e.d(s,{useRouteRef:function(){return t.useRouteRef}}),e.o(t,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return t.useRouteRefParams}});var l=e(31311);e.o(l,"attachComponentData")&&e.d(s,{attachComponentData:function(){return l.attachComponentData}}),e.o(l,"createApiFactory")&&e.d(s,{createApiFactory:function(){return l.createApiFactory}}),e.o(l,"createApiRef")&&e.d(s,{createApiRef:function(){return l.createApiRef}}),e.o(l,"createComponentExtension")&&e.d(s,{createComponentExtension:function(){return l.createComponentExtension}}),e.o(l,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return l.createExternalRouteRef}}),e.o(l,"createPlugin")&&e.d(s,{createPlugin:function(){return l.createPlugin}}),e.o(l,"createRoutableExtension")&&e.d(s,{createRoutableExtension:function(){return l.createRoutableExtension}}),e.o(l,"createRouteRef")&&e.d(s,{createRouteRef:function(){return l.createRouteRef}}),e.o(l,"getComponentData")&&e.d(s,{getComponentData:function(){return l.getComponentData}}),e.o(l,"useApi")&&e.d(s,{useApi:function(){return l.useApi}}),e.o(l,"useApiHolder")&&e.d(s,{useApiHolder:function(){return l.useApiHolder}}),e.o(l,"useElementFilter")&&e.d(s,{useElementFilter:function(){return l.useElementFilter}}),e.o(l,"useRouteRef")&&e.d(s,{useRouteRef:function(){return l.useRouteRef}}),e.o(l,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return l.useRouteRefParams}});var f=e(74181),E=e(80274),i=e.n(E);e.o(E,"createApiFactory")&&e.d(s,{createApiFactory:function(){return E.createApiFactory}}),e.o(E,"createApiRef")&&e.d(s,{createApiRef:function(){return E.createApiRef}}),e.o(E,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return E.createExternalRouteRef}}),e.o(E,"createPlugin")&&e.d(s,{createPlugin:function(){return E.createPlugin}}),e.o(E,"createRouteRef")&&e.d(s,{createRouteRef:function(){return E.createRouteRef}}),e.o(E,"useApi")&&e.d(s,{useApi:function(){return E.useApi}}),e.o(E,"useApiHolder")&&e.d(s,{useApiHolder:function(){return E.useApiHolder}}),e.o(E,"useRouteRef")&&e.d(s,{useRouteRef:function(){return E.useRouteRef}}),e.o(E,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return E.useRouteRefParams}});var o=e(96896),m=e(82772)},96896:function(_,s,e){"use strict";e.d(s,{r:function(){return t}});class r{constructor(f){this.config=f}getId(){return this.config.id}getApis(){var f;return(f=this.config.apis)!=null?f:[]}getFeatureFlags(){var f,E;return(E=(f=this.config.featureFlags)==null?void 0:f.slice())!=null?E:[]}get routes(){var f;return(f=this.config.routes)!=null?f:{}}get externalRoutes(){var f;return(f=this.config.externalRoutes)!=null?f:{}}provide(f){return f.expose(this)}toString(){return`plugin{${this.config.id}}`}}function t(l){return new r(l)}},82772:function(_,s,e){var M,b,Q;"use strict";e.d(s,{x8:function(){return u},NT:function(){return f},tg:function(){return R},Oi:function(){return C}});var r=e(76241);const t=(0,r.uW)("route-ref-type",()=>Symbol("route-ref-type"));class l{constructor(P,L){ae(this,M,"absolute");this.id=P,this.params=L}get title(){return this.id}toString(){return`routeRef{type=absolute,id=${this.id}}`}}M=t;function f(I){var P;return new l(I.id,(P=I.params)!=null?P:[])}const E=/^\w+$/;class i{constructor(P,L,z,W){ae(this,b,"sub");this.id=P,this.path=L,this.parent=z,this.params=W}toString(){return`routeRef{type=sub,id=${this.id}}`}}b=t;function o(I){const{id:P,path:L,parent:z}=I,W=L.split("/").filter(ve=>ve.startsWith(":")).map(ve=>ve.substring(1)),q=[...z.params,...W];if(z.params.some(ve=>W.includes(ve)))throw new Error("SubRouteRef may not have params that overlap with its parent");if(!L.startsWith("/"))throw new Error(`SubRouteRef path must start with '/', got '${L}'`);if(L.endsWith("/"))throw new Error(`SubRouteRef path must not end with '/', got '${L}'`);for(const ve of W)if(!E.test(ve))throw new Error(`SubRouteRef path has invalid param, got '${ve}'`);return new i(P,L,z,q)}class m{constructor(P,L,z){ae(this,Q,"external");this.id=P,this.params=L,this.optional=z}toString(){return`routeRef{type=external,id=${this.id}}`}}Q=t;function u(I){var P;return new m(I.id,(P=I.params)!=null?P:[],Boolean(I.optional))}var h=e(2784),g=e(10289);function R(I){const P=(0,g.TH)(),L=(0,r.Vt)("routing-context");if(!L)throw new Error("Routing context is not available");const z=L.atVersion(1),W=(0,h.useMemo)(()=>z&&z.resolve(I,P),[z,I,P]);if(!L)throw new Error("useRouteRef used outside of routing context");if(!z)throw new Error("RoutingContext v1 not available");const q="optional"in I&&I.optional;if(!W&&!q)throw new Error(`No path for ${I}`);return W}function C(I){return(0,g.UO)()}},10179:function(_,s,e){"use strict";e.d(s,{SP:function(){return M},dR:function(){return g},VL:function(){return Q},BD:function(){return t}});function r(I){if(typeof I!="object"||I===null||Array.isArray(I))return!1;const P=I;return!(typeof P.name!="string"||P.name===""||typeof P.message!="string")}function t(I){if(typeof I!="object"||I===null||Array.isArray(I))throw new Error(`Encountered invalid error, not an object, got '${I}'`);const P=I;if(typeof P.name!="string"||P.name==="")throw new Error(`Encountered error object without a name, got '${I}'`);if(typeof P.message!="string")throw new Error(`Encountered error object without a message, got '${I}'`)}var l=e(24852);function f(I,P){const L=serializeErrorInternal(I),z={name:"Unknown",message:"<no reason given>",...L};return P!=null&&P.includeStack||delete z.stack,z}function E(I){const P=(0,l.deserializeError)(I);return I.stack||(P.stack=void 0),P}function i(I){if(r(I)){const P=String(I);return P!=="[object Object]"?P:`${I.name}: ${I.message}`}return`unknown error '${I}'`}class o extends Error{constructor(P,L){var W;let z=P;if(L!==void 0){const q=i(L);z?z+=`; caused by ${q}`:z=`caused by ${q}`}super(z);ae(this,"cause");(W=Error.captureStackTrace)==null||W.call(Error,this,this.constructor),this.name=this.constructor.name,this.cause=r(L)?L:void 0}}class m extends null{}class u extends null{}class h extends null{}class g extends o{}class R extends null{}class C extends null{}class M extends o{constructor(P,L){super(P,L);this.name=r(L)?L.name:"Error"}}async function b(I){var P;try{const L=await I.text();if(L){if((P=I.headers.get("content-type"))!=null&&P.startsWith("application/json"))try{const z=JSON.parse(L);if(z.error&&z.response)return z}catch{}return{error:{name:"Error",message:`Request failed with status ${I.status} ${I.statusText}, ${L}`},response:{statusCode:I.status}}}}catch{}return{error:{name:"Error",message:`Request failed with status ${I.status} ${I.statusText}`},response:{statusCode:I.status}}}class Q extends Error{constructor(P){super(P.message);ae(this,"response");ae(this,"body");ae(this,"cause");this.name="ResponseError",this.response=P.response,this.body=P.data,this.cause=P.cause}static async fromResponse(P){const L=await b(P),z=L.response.statusCode||P.status,W=L.error.name||P.statusText,q=`Request failed with ${z} ${W}`,oe=E(L.error);return new Q({message:q,response:P,data:L,cause:oe})}}},36356:function(_,s,e){var g,R,C,M,b;"use strict";e.d(s,{nW:function(){return h},ae:function(){return i},q3:function(){return o}});var r=e(36964);const t=(0,r.createApiRef)({id:"core.scmauth"});class l{constructor(P){sn(this,g,void 0);gn(this,g,P)}async getCredentials(P){const L=new URL(P.url),z=tt(this,g).find(W=>W.isUrlSupported(L));if(!z)throw new Error(`No auth provider available for '${P.url}', see https://backstage.io/link?scm-auth`);return z.getCredentials(P)}}g=new WeakMap;const Q=class{constructor(P,L,z,W){sn(this,R,void 0);sn(this,C,void 0);sn(this,M,void 0);sn(this,b,void 0);gn(this,R,L),gn(this,C,z),gn(this,M,W),gn(this,b,P)}static createDefaultApiFactory(){return createApiFactory({api:scmAuthApiRef,deps:{github:githubAuthApiRef,gitlab:gitlabAuthApiRef,azure:microsoftAuthApiRef,bitbucket:bitbucketAuthApiRef},factory:({github:P,gitlab:L,azure:z,bitbucket:W})=>Q.merge(Q.forGithub(P),Q.forGitlab(L),Q.forAzure(z),Q.forBitbucket(W))})}static forAuthApi(P,L){return new Q("generic",P,L.host,L.scopeMapping)}static forGithub(P,L){var W;const z=(W=L==null?void 0:L.host)!=null?W:"github.com";return new Q("github",P,z,{default:["repo","read:org","read:user"],repoWrite:["gist"]})}static forGitlab(P,L){var W;const z=(W=L==null?void 0:L.host)!=null?W:"gitlab.com";return new Q("gitlab",P,z,{default:["read_user","read_api","read_repository"],repoWrite:["write_repository","api"]})}static forAzure(P,L){var W;const z=(W=L==null?void 0:L.host)!=null?W:"dev.azure.com";return new Q("azure",P,z,{default:["vso.build","vso.code","vso.graph","vso.project","vso.profile"],repoWrite:["vso.code_manage"]})}static forBitbucket(P,L){var W;const z=(W=L==null?void 0:L.host)!=null?W:"bitbucket.org";return new Q("bitbucket",P,z,{default:["account","team","pullrequest","snippet","issue"],repoWrite:["pullrequest:write","snippet:write","issue:write"]})}static merge(...P){return new l(P)}isUrlSupported(P){return P.host===tt(this,C)}getAdditionalScopesForProvider(P){var L,z;return!(P!=null&&P.customScopes)||tt(this,b)==="generic"?[]:(z=(L=P.customScopes)==null?void 0:L[tt(this,b)])!=null?z:[]}async getCredentials(P){const{url:L,additionalScope:z,...W}=P,q=tt(this,M).default.slice();z!=null&&z.repoWrite&&q.push(...tt(this,M).repoWrite);const oe=this.getAdditionalScopesForProvider(z);oe.length&&q.push(...oe);const ve=[...new Set(q)],Le=await tt(this,R).getAccessToken(ve,W);return{token:Le,headers:{Authorization:`Bearer ${Le}`}}}};let f=Q;R=new WeakMap,C=new WeakMap,M=new WeakMap,b=new WeakMap;var E=e(86574);class i{static fromConfig(P){return E.Lx.fromConfig(P)}}const o=(0,r.createApiRef)({id:"integration.scmintegrations"});var m=e(73250),u=e(2784);const h=I=>{var q;const{type:P}=I,L=(0,r.useApp)(),z=m.Z,W=P&&(q=L.getSystemIcon(P))!=null?q:z;return u.createElement(W,null)}},86574:function(_,s,e){var B,S,j,ue,ge,me,Se;"use strict";e.d(s,{Lx:function(){return xt},Pb:function(){return ne}});var r=e(82717),t=e.n(r),l=e(76635);function f(N){const y=new URL("http://example.com");return y.host=N,y.host===N}function E(N){try{return new URL(N),!0}catch{return!1}}function i(N,y){return{list(){return N},byUrl(x){try{const H=typeof x=="string"?new URL(x):x;return N.find(k=>y(k)===H.host)}catch{return}},byHost(x){return N.find(H=>y(H)===x)}}}function o(N){const{url:y,base:x,lineNumber:H}=N;try{return new URL(y),y}catch{}let k;if(y.startsWith("/")){const{filepath:Oe}=t()(x);k=new URL(x);const Ae=(0,l.trimEnd)(k.pathname.substring(0,k.pathname.length-Oe.length),"/");k.pathname=`${Ae}${y}`}else k=new URL(y,x);return k.search=new URL(x).search,H&&(k.hash=`L${H}`),k.toString()}const m="GB",qe=class{constructor(y,x,H,k,Oe,Ae){sn(this,B,void 0);sn(this,S,void 0);sn(this,j,void 0);sn(this,ue,void 0);sn(this,ge,void 0);sn(this,me,void 0);sn(this,Se,(...y)=>{const x=new URL(tt(this,B));return x.pathname=y.map(H=>encodeURIComponent(H)).join("/"),x});gn(this,B,y),gn(this,S,x),gn(this,j,H),gn(this,ue,k),gn(this,ge,Oe),gn(this,me,Ae)}static fromRepoUrl(y){var Ht;const x=new URL(y);let H,k,Oe;const Ae=x.pathname.split("/").map(qt=>decodeURIComponent(qt));if(Ae[2]==="_git"?(H=Ae[1],k=Oe=Ae[3]):Ae[3]==="_git"&&(H=Ae[1],k=Ae[2],Oe=Ae[4]),!H||!k||!Oe)throw new Error("Azure URL must point to a git repository");const Ie=(Ht=x.searchParams.get("path"))!=null?Ht:void 0;let He;const ft=x.searchParams.get("version");if(ft){if(ft.slice(0,2)!=="GB")throw new Error("Azure URL version must point to a git branch");He=ft.slice(2)}return new qe(x.origin,H,k,Oe,Ie,He)}toRepoUrl(){let y;return tt(this,j)===tt(this,ue)?y=tt(this,Se).call(this,tt(this,S),"_git",tt(this,ue)):y=tt(this,Se).call(this,tt(this,S),tt(this,j),"_git",tt(this,ue)),tt(this,ge)&&y.searchParams.set("path",tt(this,ge)),tt(this,me)&&y.searchParams.set("version",m+tt(this,me)),y.toString()}toFileUrl(){if(!tt(this,ge))throw new Error("Azure URL must point to a specific path to be able to download a file");const y=tt(this,Se).call(this,tt(this,S),tt(this,j),"_apis","git","repositories",tt(this,ue),"items");return y.searchParams.set("api-version","6.0"),y.searchParams.set("path",tt(this,ge)),tt(this,me)&&y.searchParams.set("version",tt(this,me)),y.toString()}toArchiveUrl(){const y=tt(this,Se).call(this,tt(this,S),tt(this,j),"_apis","git","repositories",tt(this,ue),"items");return y.searchParams.set("recursionLevel","full"),y.searchParams.set("download","true"),y.searchParams.set("api-version","6.0"),tt(this,ge)&&y.searchParams.set("scopePath",tt(this,ge)),tt(this,me)&&y.searchParams.set("version",tt(this,me)),y.toString()}toCommitsUrl(){const y=tt(this,Se).call(this,tt(this,S),tt(this,j),"_apis","git","repositories",tt(this,ue),"commits");return y.searchParams.set("api-version","6.0"),tt(this,me)&&y.searchParams.set("searchCriteria.itemVersion.version",tt(this,me)),y.toString()}getOwner(){return tt(this,S)}getProject(){return tt(this,j)}getRepo(){return tt(this,ue)}getPath(){return tt(this,ge)}getRef(){return tt(this,me)}};let u=qe;B=new WeakMap,S=new WeakMap,j=new WeakMap,ue=new WeakMap,ge=new WeakMap,me=new WeakMap,Se=new WeakMap;const h="dev.azure.com";function g(N){var H;const y=(H=N.getOptionalString("host"))!=null?H:h,x=N.getOptionalString("token");if(!f(y))throw new Error(`Invalid Azure integration config, '${y}' is not a valid host`);return{host:y,token:x}}function R(N){const y=N.map(g);return y.some(x=>x.host===h)||y.push({host:h}),y}const ot=class{constructor(y){this.integrationConfig=y}get type(){return"azure"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(y){var k;const{url:x,base:H}=y;if(E(x))return x;try{const Oe=u.fromRepoUrl(H),Ae=new URL(H),Ie=new URL(`https://a.com${(k=Oe.getPath())!=null?k:""}`),He=new URL(x,Ie).pathname;return Ae.searchParams.set("path",He),y.lineNumber&&(Ae.searchParams.set("line",String(y.lineNumber)),Ae.searchParams.set("lineEnd",String(y.lineNumber+1)),Ae.searchParams.set("lineStartColumn","1"),Ae.searchParams.set("lineEndColumn","1")),Ae.toString()}catch{return new URL(x,H).toString()}}resolveEditUrl(y){return y}};let C=ot;ae(C,"factory",({config:y})=>{var H;const x=R((H=y.getOptionalConfigArray("integrations.azure"))!=null?H:[]);return i(x.map(k=>new ot(k)),k=>k.config.host)});var M=e(48834).Buffer;function b(N){return AzureUrl.fromRepoUrl(N).toFileUrl()}function Q(N){return AzureUrl.fromRepoUrl(N).toArchiveUrl()}function I(N){return AzureUrl.fromRepoUrl(N).toCommitsUrl()}function P(N,y){const x=y?{...y}:{};if(N.token){const H=M.from(`:${N.token}`,"utf8");x.Authorization=`Basic ${H.toString("base64")}`}return{headers:x}}const L="bitbucket.org",z="https://api.bitbucket.org/2.0";function W(N){var Ae;const y=(Ae=N.getOptionalString("host"))!=null?Ae:L;let x=N.getOptionalString("apiBaseUrl");const H=N.getOptionalString("token"),k=N.getOptionalString("username"),Oe=N.getOptionalString("appPassword");if(!f(y))throw new Error(`Invalid Bitbucket integration config, '${y}' is not a valid host`);return x?x=(0,l.trimEnd)(x,"/"):y===L?x=z:x=`https://${y}/rest/api/1.0`,{host:y,apiBaseUrl:x,token:H,username:k,appPassword:Oe}}function q(N){const y=N.map(W);return y.some(x=>x.host===L)||y.push({host:L,apiBaseUrl:z}),y}const Ve=class{constructor(y){this.integrationConfig=y}get type(){return"bitbucket"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(y){const x=o(y);if(!y.lineNumber)return x;const H=new URL(x);return this.integrationConfig.host==="bitbucket.org"?H.hash=`lines-${y.lineNumber}`:H.hash=`${y.lineNumber}`,H.toString()}resolveEditUrl(y){const x=t()(y),H=new URL(y);return H.searchParams.set("mode","edit"),H.searchParams.set("spa","0"),H.searchParams.set("at",x.ref),H.toString()}};let oe=Ve;ae(oe,"factory",({config:y})=>{var H;const x=q((H=y.getOptionalConfigArray("integrations.bitbucket"))!=null?H:[]);return i(x.map(k=>new Ve(k)),k=>k.config.host)});var ve=e(96279),Le=e(48834).Buffer;async function we(N,y){const{name:x,owner:H,resource:k}=parseGitUrl(N),Oe=k==="bitbucket.org";let Ae=Oe?`${y.apiBaseUrl}/repositories/${H}/${x}`:`${y.apiBaseUrl}/projects/${H}/repos/${x}/default-branch`,Ie=await fetch(Ae,_e(y));if(Ie.status===404&&!Oe&&(Ae=`${y.apiBaseUrl}/projects/${H}/repos/${x}/branches/default`,Ie=await fetch(Ae,_e(y))),!Ie.ok){const ft=`Failed to retrieve default branch from ${Ae}, ${Ie.status} ${Ie.statusText}`;throw new Error(ft)}let He;if(Oe)He=(await Ie.json()).mainbranch.name;else{const{displayId:ft}=await Ie.json();He=ft}if(!He)throw new Error(`Failed to read default branch from ${Ae}. Response ${Ie.status} ${Ie.json()}`);return He}async function fe(N,y){const{name:x,owner:H,ref:k,protocol:Oe,resource:Ae,filepath:Ie}=parseGitUrl(N),He=Ae==="bitbucket.org";let ft=k;ft||(ft=await we(N,y));const Ht=Ie?`&path=${encodeURIComponent(Ie)}`:"";return He?`${Oe}://${Ae}/${H}/${x}/get/${ft}.tar.gz`:`${y.apiBaseUrl}/projects/${H}/repos/${x}/archive?format=tgz&at=${ft}&prefix=${H}-${x}${Ht}`}function Ke(N,y){try{const{owner:x,name:H,ref:k,filepathtype:Oe,filepath:Ae}=parseGitUrl(N);if(!x||!H||Oe!=="browse"&&Oe!=="raw"&&Oe!=="src")throw new Error("Invalid Bitbucket URL or file path");const Ie=Ae.replace(/^\//,"");if(y.host==="bitbucket.org"){if(!k)throw new Error("Invalid Bitbucket URL or file path");return`${y.apiBaseUrl}/repositories/${x}/${H}/src/${k}/${Ie}`}return`${y.apiBaseUrl}/projects/${x}/repos/${H}/raw/${Ie}?at=${k}`}catch(x){throw new Error(`Incorrect URL: ${N}, ${x}`)}}function _e(N){const y={};if(N.token)y.Authorization=`Bearer ${N.token}`;else if(N.username&&N.appPassword){const x=Le.from(`${N.username}:${N.appPassword}`,"utf8");y.Authorization=`Basic ${x.toString("base64")}`}return{headers:y}}function ut(N){const y=N.getString("host");let x=N.getOptionalString("baseUrl"),H=N.getOptionalString("gitilesBaseUrl");const k=N.getOptionalString("username"),Oe=N.getOptionalString("password");if(f(y)){if(x&&!E(x))throw new Error(`Invalid Gerrit integration config, '${x}' is not a valid baseUrl`);if(H&&!E(H))throw new Error(`Invalid Gerrit integration config, '${H}' is not a valid gitilesBaseUrl`)}else throw new Error(`Invalid Gerrit integration config, '${y}' is not a valid host`);return x?x=(0,l.trimEnd)(x,"/"):x=`https://${y}`,H?H=(0,l.trimEnd)(H,"/"):H=`https://${y}`,{host:y,baseUrl:x,gitilesBaseUrl:H,username:k,password:Oe}}function rt(N){return N.map(ut)}const Je=class{constructor(y){this.integrationConfig=y}get type(){return"gerrit"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(y){const{url:x,base:H,lineNumber:k}=y;let Oe;return x?Oe=new URL(x,H):Oe=new URL(H),k&&(Oe.hash=k.toString()),Oe.toString()}resolveEditUrl(y){return y}};let at=Je;ae(at,"factory",({config:y})=>{var H;const x=rt((H=y.getOptionalConfigArray("integrations.gerrit"))!=null?H:[]);return i(x.map(k=>new Je(k)),k=>k.config.host)});var gt=e(48834).Buffer;const xe=")]}'";function Qe(N,y){const H=y.replace(N.gitilesBaseUrl,"").split("/").filter(ft=>!!ft),k=H.indexOf("+");if(k<=0)throw new Error(`Unable to parse project from url: ${y}`);const Oe=trimStart(H.slice(0,k).join("/"),"/"),Ae=H.indexOf("heads");if(Ae<=0)throw new Error(`Unable to parse branch from url: ${y}`);const Ie=H[Ae+1],He=H.slice(Ae+2).join("/");return{branch:Ie,filePath:He===""?"/":He,project:Oe}}function Ye(N){return N.password?"/a/":"/"}function Rt(N,y){const{branch:x,filePath:H,project:k}=Qe(N,y);return`${N.baseUrl}${Ye(N)}projects/${encodeURIComponent(k)}/branches/${x}/files/${encodeURIComponent(H)}/content`}function pt(N){const y={};if(!N.password)return y;const x=gt.from(`${N.username}:${N.password}`,"utf8");return y.Authorization=`Basic ${x.toString("base64")}`,{headers:y}}async function St(N){const y=await N.text();if(y.startsWith(xe))try{return JSON.parse(y.slice(xe.length))}catch(x){throw new Error(`Invalid response from Gerrit: ${y.slice(0,10)} - ${x}`)}throw new Error(`Gerrit JSON body prefix missing. Found: ${y.slice(0,10)}`)}const it="github.com",yt="https://api.github.com",It="https://raw.githubusercontent.com";function Pt(N){var Ae,Ie;const y=(Ae=N.getOptionalString("host"))!=null?Ae:it;let x=N.getOptionalString("apiBaseUrl"),H=N.getOptionalString("rawBaseUrl");const k=N.getOptionalString("token"),Oe=(Ie=N.getOptionalConfigArray("apps"))==null?void 0:Ie.map(He=>({appId:He.getNumber("appId"),clientId:He.getString("clientId"),clientSecret:He.getString("clientSecret"),webhookSecret:He.getString("webhookSecret"),privateKey:He.getString("privateKey"),allowedInstallationOwners:He.getOptionalStringArray("allowedInstallationOwners")}));if(!f(y))throw new Error(`Invalid GitHub integration config, '${y}' is not a valid host`);return x?x=(0,l.trimEnd)(x,"/"):y===it&&(x=yt),H?H=(0,l.trimEnd)(H,"/"):y===it&&(H=It),{host:y,apiBaseUrl:x,rawBaseUrl:H,token:k,apps:Oe}}function Zt(N){const y=N.map(Pt);return y.some(x=>x.host===it)||y.push({host:it,apiBaseUrl:yt,rawBaseUrl:It}),y}function Bt(N,y,x){try{const{owner:H,name:k,ref:Oe,filepathtype:Ae,filepath:Ie}=parseGitUrl(N);if(!H||!k||!Oe||Ae!=="blob"&&Ae!=="raw"&&Ae!=="tree")throw new Error("Invalid GitHub URL or file path");const He=Ie.replace(/^\//,"");return ze(y,x)==="api"?`${y.apiBaseUrl}/repos/${H}/${k}/contents/${He}?ref=${Oe}`:`${y.rawBaseUrl}/${H}/${k}/${Oe}/${He}`}catch(H){throw new Error(`Incorrect URL: ${N}, ${H}`)}}function Lt(N,y){const x={};return ze(N,y)==="api"&&(x.Accept="application/vnd.github.v3.raw"),y.token&&(x.Authorization=`token ${y.token}`),{headers:x}}function ze(N,y){return N.apiBaseUrl&&(y.token||!N.rawBaseUrl)?"api":"raw"}class lt{constructor(){ae(this,"tokenCache",new Map);ae(this,"isNotExpired",y=>y.diff(DateTime.local(),"minutes").minutes>50)}async getOrCreateToken(y,x){const H=this.tokenCache.get(y);if(H&&this.isNotExpired(H.expiresAt))return{accessToken:H.token};const k=await x();return this.tokenCache.set(y,k),{accessToken:k.token}}}const ke={Accept:"application/vnd.github.machine-man-preview+json"};class Ct{constructor(y,x){ae(this,"appClient");ae(this,"baseUrl");ae(this,"baseAuthConfig");ae(this,"cache",new lt);ae(this,"allowedInstallationOwners");this.allowedInstallationOwners=y.allowedInstallationOwners,this.baseUrl=x,this.baseAuthConfig={appId:y.appId,privateKey:y.privateKey.replace(/\\n/gm,`
|
|
31
|
-
`)},this.appClient=new Octokit({baseUrl:x,headers:ke,authStrategy:createAppAuth,auth:this.baseAuthConfig})}async getInstallationCredentials(y,x){var Ae;const{installationId:H,suspended:k}=await this.getInstallationData(y);if(this.allowedInstallationOwners&&!((Ae=this.allowedInstallationOwners)!=null&&Ae.includes(y)))return{accessToken:void 0};if(k)throw new Error(`The GitHub application for ${y} is suspended`);const Oe=x?`${y}/${x}`:y;return this.cache.getOrCreateToken(Oe,async()=>{const Ie=await this.appClient.apps.createInstallationAccessToken({installation_id:H,headers:ke});if(x&&Ie.data.repository_selection==="selected"){const He=new Octokit({baseUrl:this.baseUrl,auth:Ie.data.token});if(!(await He.paginate(He.apps.listReposAccessibleToInstallation)).some(qt=>qt.name===x))throw new Error(`The Backstage GitHub application used in the ${y} organization does not have access to a repository with the name ${x}`)}return{token:Ie.data.token,expiresAt:DateTime.fromISO(Ie.data.expires_at)}})}getInstallations(){return this.appClient.paginate(this.appClient.apps.listInstallations)}async getInstallationData(y){const H=(await this.getInstallations()).find(Oe=>{var Ae,Ie;return((Ie=(Ae=Oe.account)==null?void 0:Ae.login)==null?void 0:Ie.toLocaleLowerCase("en-US"))===y.toLocaleLowerCase("en-US")});if(H)return{installationId:H.id,suspended:Boolean(H.suspended_by)};const k=new Error(`No app installation found for ${y} in ${this.baseAuthConfig.appId}`);throw k.name="NotFoundError",k}}class ct{constructor(y){ae(this,"apps");var x,H;this.apps=(H=(x=y.apps)==null?void 0:x.map(k=>new Ct(k,y.apiBaseUrl)))!=null?H:[]}async getAllInstallations(){return this.apps.length?(await Promise.all(this.apps.map(x=>x.getInstallations()))).flat():[]}async getAppToken(y,x){if(this.apps.length===0)return;const H=await Promise.all(this.apps.map(Ie=>Ie.getInstallationCredentials(y,x).then(He=>({credentials:He,error:void 0}),He=>({credentials:void 0,error:He})))),k=H.find(Ie=>Ie.credentials);if(k)return k.credentials.accessToken;const Ae=H.map(Ie=>Ie.error).find(Ie=>Ie.name!=="NotFoundError");if(Ae)throw Ae}}class Et{constructor(y,x){this.githubAppCredentialsMux=y,this.token=x}async getCredentials(y){const x=parseGitUrl(y.url),H=x.owner||x.name,k=x.owner?x.name:void 0;let Oe="app",Ae=await this.githubAppCredentialsMux.getAppToken(H,k);return Ae||(Oe="token",Ae=this.token),{headers:Ae?{Authorization:`Bearer ${Ae}`}:void 0,token:Ae,type:Oe}}}ae(Et,"create",null);class X{static fromIntegrations(y){const x=new Map;return y.github.list().forEach(H=>{const k=SingleInstanceGithubCredentialsProvider.create(H.config);x.set(H.config.host,k)}),new X(x)}constructor(y){this.providers=y}async getCredentials(y){const x=new URL(y.url),H=this.providers.get(x.host);if(!H)throw new Error(`There is no GitHub integration that matches ${y.url}. Please add a configuration for an integration.`);return H.getCredentials(y)}}const ht=class{constructor(y){this.integrationConfig=y}get type(){return"github"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(y){return ne(o(y),"tree")}resolveEditUrl(y){return ne(y,"edit")}};let Z=ht;ae(Z,"factory",({config:y})=>{var H;const x=Zt((H=y.getOptionalConfigArray("integrations.github"))!=null?H:[]);return i(x.map(k=>new ht(k)),k=>k.config.host)});function ne(N,y){return N.replace(/\/\/([^/]+)\/([^/]+)\/([^/]+)\/(blob|tree|edit)\//,(x,H,k,Oe)=>`//${H}/${k}/${Oe}/${y}/`)}const ce="gitlab.com",se="https://gitlab.com/api/v4";function ye(N){const y=N.getString("host");let x=N.getOptionalString("apiBaseUrl");const H=N.getOptionalString("token");let k=N.getOptionalString("baseUrl");if(x?x=(0,l.trimEnd)(x,"/"):y===ce&&(x=se),k?k=(0,l.trimEnd)(k,"/"):k=`https://${y}`,f(y)){if(!x||!E(x))throw new Error(`Invalid GitLab integration config, '${x}' is not a valid apiBaseUrl`);if(!E(k))throw new Error(`Invalid GitLab integration config, '${k}' is not a valid baseUrl`)}else throw new Error(`Invalid GitLab integration config, '${y}' is not a valid host`);return{host:y,token:H,apiBaseUrl:x,baseUrl:k}}function Ze(N){const y=N.map(ye);return y.some(x=>x.host===ce)||y.push({host:ce,apiBaseUrl:se,baseUrl:`https://${ce}`}),y}async function $e(N,y){if(N.includes("/-/blob/")){const x=await U(N,y);return J(N,x).toString()}return te(N).toString()}function nt(N){const{token:y=""}=N;return{headers:{"PRIVATE-TOKEN":y}}}function te(N){try{const y=new URL(N),[x,H,k,Oe,...Ae]=y.pathname.split("/");if(x!==""||H===""||k===""||Oe!=="blob"||!Ae.join("/").match(/\.(yaml|yml)$/))throw new Error("Wrong GitLab URL");return y.pathname=[x,H,k,"raw",...Ae].join("/"),y}catch(y){throw new Error(`Incorrect url: ${N}, ${y}`)}}function J(N,y){try{const x=new URL(N),H=x.pathname.split("/-/blob/")[1],[k,...Oe]=H.split("/");return x.pathname=["/api/v4/projects",y,"repository/files",encodeURIComponent(decodeURIComponent(Oe.join("/"))),"raw"].join("/"),x.search=`?ref=${k}`,x}catch(x){throw new Error(`Incorrect url: ${N}, ${x}`)}}async function U(N,y){const x=new URL(N);if(!x.pathname.includes("/-/blob/"))throw new Error("Please provide full path to yaml file from GitLab");try{const H=x.pathname.split("/-/blob/")[0],k=new URL(`${x.origin}/api/v4/projects/${encodeURIComponent(H.replace(/^\//,""))}`),Oe=await fetch(k.toString(),nt(y)),Ae=await Oe.json();if(!Oe.ok)throw new Error(`GitLab Error '${Ae.error}', ${Ae.error_description}`);return Number(Ae.id)}catch(H){throw new Error(`Could not get GitLab project ID for: ${N}, ${H}`)}}const st=class{constructor(y){this.integrationConfig=y}get type(){return"gitlab"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(y){return o(y)}resolveEditUrl(y){return Te(y,"edit")}};let ie=st;ae(ie,"factory",({config:y})=>{var H;const x=Ze((H=y.getOptionalConfigArray("integrations.gitlab"))!=null?H:[]);return i(x.map(k=>new st(k)),k=>k.config.host)});function Te(N,y){return N.replace(/\/\-\/(blob|tree|edit)\//,`/-/${y}/`)}const De="amazonaws.com";function Ee(N){var ft;const y=N.getOptionalString("endpoint"),x=(ft=N.getOptionalBoolean("s3ForcePathStyle"))!=null?ft:!1;let H,k;if(y){try{const Ht=new URL(y);H=Ht.host,k=Ht.pathname}catch{throw new Error(`invalid awsS3 integration config, endpoint '${y}' is not a valid URL`)}if(k!=="/")throw new Error(`invalid awsS3 integration config, endpoints cannot contain path, got '${y}'`)}else H=De;const Oe=N.getOptionalString("accessKeyId"),Ae=N.getOptionalString("secretAccessKey"),Ie=N.getOptionalString("roleArn"),He=N.getOptionalString("externalId");return{host:H,endpoint:y,s3ForcePathStyle:x,accessKeyId:Oe,secretAccessKey:Ae,roleArn:Ie,externalId:He}}function Fe(N){const y=N.map(Ee);return y.some(x=>x.host===De)||y.push({host:De}),y}const Ue=class{get type(){return"awsS3"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}constructor(y){this.integrationConfig=y}resolveUrl(y){return o(y)}resolveEditUrl(y){return y}};let vt=Ue;ae(vt,"factory",({config:y})=>{var H;const x=Fe((H=y.getOptionalConfigArray("integrations.awsS3"))!=null?H:[]);return i(x.map(k=>new Ue(k)),k=>k.config.host)});class xt{constructor(y){ae(this,"byType");this.byType=y}static fromConfig(y){return new xt({awsS3:vt.factory({config:y}),azure:C.factory({config:y}),bitbucket:oe.factory({config:y}),gerrit:at.factory({config:y}),github:Z.factory({config:y}),gitlab:ie.factory({config:y})})}get awsS3(){return this.byType.awsS3}get azure(){return this.byType.azure}get bitbucket(){return this.byType.bitbucket}get gerrit(){return this.byType.gerrit}get github(){return this.byType.github}get gitlab(){return this.byType.gitlab}list(){return Object.values(this.byType).flatMap(y=>y.list())}byUrl(y){return Object.values(this.byType).map(x=>x.byUrl(y)).find(Boolean)}byHost(y){return Object.values(this.byType).map(x=>x.byHost(y)).find(Boolean)}resolveUrl(y){const x=this.byUrl(y.base);return x?x.resolveUrl(y):o(y)}resolveEditUrl(y){const x=this.byUrl(y);return x?x.resolveEditUrl(y):y}}},46054:function(_,s,e){"use strict";var r={};e.r(r),e.d(r,{TechDocsPlugin:function(){return Yt.plugin}});var t=e(2784),l=e(47093),f=e(10289),E=e(49208),i=e(36964),o=e(68099);const m=[(0,i.createApiFactory)({api:i.discoveryApiRef,deps:{configApi:i.configApiRef},factory:({configApi:O})=>E.UrlPatternDiscovery.compile(`${O.getString("backend.baseUrl")}/api/{{ pluginId }}`)}),(0,i.createApiFactory)({api:i.alertApiRef,deps:{},factory:()=>new E.AlertApiForwarder}),(0,i.createApiFactory)({api:i.analyticsApiRef,deps:{},factory:()=>new E.NoOpAnalyticsApi}),(0,i.createApiFactory)({api:i.errorApiRef,deps:{alertApi:i.alertApiRef},factory:({alertApi:O})=>{const ee=new E.ErrorAlerter(O,new E.ErrorApiForwarder);return E.UnhandledErrorForwarder.forward(ee,{hidden:!1}),ee}}),(0,i.createApiFactory)({api:i.storageApiRef,deps:{errorApi:i.errorApiRef},factory:({errorApi:O})=>E.WebStorage.create({errorApi:O})}),(0,i.createApiFactory)({api:i.fetchApiRef,deps:{configApi:i.configApiRef,identityApi:i.identityApiRef,discoveryApi:i.discoveryApiRef},factory:({configApi:O,identityApi:ee,discoveryApi:de})=>(0,E.createFetchApi)({middleware:[E.FetchMiddlewares.resolvePluginProtocol({discoveryApi:de}),E.FetchMiddlewares.injectIdentityAuth({identityApi:ee,config:O})]})}),(0,i.createApiFactory)({api:i.oauthRequestApiRef,deps:{},factory:()=>new E.OAuthRequestManager}),(0,i.createApiFactory)({api:i.googleAuthApiRef,deps:{discoveryApi:i.discoveryApiRef,oauthRequestApi:i.oauthRequestApiRef,configApi:i.configApiRef},factory:({discoveryApi:O,oauthRequestApi:ee,configApi:de})=>E.GoogleAuth.create({discoveryApi:O,oauthRequestApi:ee,environment:de.getOptionalString("auth.environment")})}),(0,i.createApiFactory)({api:i.microsoftAuthApiRef,deps:{discoveryApi:i.discoveryApiRef,oauthRequestApi:i.oauthRequestApiRef,configApi:i.configApiRef},factory:({discoveryApi:O,oauthRequestApi:ee,configApi:de})=>E.MicrosoftAuth.create({discoveryApi:O,oauthRequestApi:ee,environment:de.getOptionalString("auth.environment")})}),(0,i.createApiFactory)({api:i.githubAuthApiRef,deps:{discoveryApi:i.discoveryApiRef,oauthRequestApi:i.oauthRequestApiRef,configApi:i.configApiRef},factory:({discoveryApi:O,oauthRequestApi:ee,configApi:de})=>E.GithubAuth.create({discoveryApi:O,oauthRequestApi:ee,defaultScopes:["read:user"],environment:de.getOptionalString("auth.environment")})}),(0,i.createApiFactory)({api:i.oktaAuthApiRef,deps:{discoveryApi:i.discoveryApiRef,oauthRequestApi:i.oauthRequestApiRef,configApi:i.configApiRef},factory:({discoveryApi:O,oauthRequestApi:ee,configApi:de})=>E.OktaAuth.create({discoveryApi:O,oauthRequestApi:ee,environment:de.getOptionalString("auth.environment")})}),(0,i.createApiFactory)({api:i.gitlabAuthApiRef,deps:{discoveryApi:i.discoveryApiRef,oauthRequestApi:i.oauthRequestApiRef,configApi:i.configApiRef},factory:({discoveryApi:O,oauthRequestApi:ee,configApi:de})=>E.GitlabAuth.create({discoveryApi:O,oauthRequestApi:ee,environment:de.getOptionalString("auth.environment")})}),(0,i.createApiFactory)({api:i.oneloginAuthApiRef,deps:{discoveryApi:i.discoveryApiRef,oauthRequestApi:i.oauthRequestApiRef,configApi:i.configApiRef},factory:({discoveryApi:O,oauthRequestApi:ee,configApi:de})=>E.OneLoginAuth.create({discoveryApi:O,oauthRequestApi:ee,environment:de.getOptionalString("auth.environment")})}),(0,i.createApiFactory)({api:i.bitbucketAuthApiRef,deps:{discoveryApi:i.discoveryApiRef,oauthRequestApi:i.oauthRequestApiRef,configApi:i.configApiRef},factory:({discoveryApi:O,oauthRequestApi:ee,configApi:de})=>E.BitbucketAuth.create({discoveryApi:O,oauthRequestApi:ee,defaultScopes:["team"],environment:de.getOptionalString("auth.environment")})}),(0,i.createApiFactory)({api:i.atlassianAuthApiRef,deps:{discoveryApi:i.discoveryApiRef,oauthRequestApi:i.oauthRequestApiRef,configApi:i.configApiRef},factory:({discoveryApi:O,oauthRequestApi:ee,configApi:de})=>E.AtlassianAuth.create({discoveryApi:O,oauthRequestApi:ee,environment:de.getOptionalString("auth.environment")})}),(0,i.createApiFactory)({api:o.RV,deps:{discovery:i.discoveryApiRef,identity:i.identityApiRef,config:i.configApiRef},factory:({config:O,discovery:ee,identity:de})=>o.iM.create({config:O,discovery:ee,identity:de})})];var u=e(77277),h=e(9118),g=e(62833);function R({children:O}){return(0,f.GV)()?t.createElement(t.Fragment,null,O):t.createElement(f.VA,null,O)}const C=()=>t.createElement(h.ErrorPage,{status:"404",statusMessage:"PAGE NOT FOUND"}),M=({step:O,error:ee})=>{let de="";return O==="load-config"?de=`The configuration failed to load, someone should have a look at this error: ${ee.message}`:O==="load-chunk"&&(de=`Lazy loaded chunk failed to load, try to reload the page: ${ee.message}`),t.createElement(R,null,t.createElement(h.ErrorPage,{status:"501",statusMessage:de}))},b=({error:O,resetError:ee,plugin:de})=>t.createElement(h.ErrorPanel,{title:`Error in ${de==null?void 0:de.getId()}`,defaultExpanded:!0,error:O},t.createElement(u.Z,{variant:"outlined",onClick:ee},"Retry")),Q={Progress:h.Progress,Router:g.VK,NotFoundErrorPage:C,BootErrorPage:M,ErrorBoundaryFallback:b};var I=e(43642),P=e(80079),L=e(90941),z=e(32915),W=e(40562),q=e(21853),oe=e(60744),ve=e(66569),Le=e(30254),we=e(13384),fe=e(15933),Ke=e(58838),_e=e(86737),ut=e(4989),rt=e(44407),at=e(18628),gt=e(84219),xe=e(98685),Qe=e(39781);const Ye={brokenImage:P.Z,catalog:at.Z,scaffolder:z.Z,techdocs:W.Z,search:q.Z,chat:oe.Z,dashboard:ve.Z,docs:Le.Z,email:we.Z,github:Ke.Z,group:gt.Z,help:_e.Z,"kind:api":fe.Z,"kind:component":rt.Z,"kind:domain":I.Z,"kind:group":gt.Z,"kind:location":ut.Z,"kind:system":L.Z,"kind:user":xe.Z,user:xe.Z,warning:Qe.Z};var Rt=e(73689),pt=e(48032);const St={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")`},it={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"]};function yt(O,ee){const Me=`linear-gradient(90deg, ${(O.length===1?[O[0],O[0]]:O).join(", ")})`,Xe=`${ee}, ${Me}`;return{colors:O,shape:ee,backgroundImage:Xe}}const It={home:yt(it.teal,St.wave),documentation:yt(it.pinkSea,St.wave2),tool:yt(it.purpleSky,St.round),service:yt(it.marineBlue,St.wave),website:yt(it.veryBlue,St.wave),library:yt(it.rubyRed,St.wave),other:yt(it.darkGrey,St.wave),app:yt(it.toastyOrange,St.wave),apis:yt(it.teal,St.wave2)},Pt='"Helvetica Neue", Helvetica, Roboto, Arial, sans-serif';function Zt(O){const{palette:ee,fontFamily:de=Pt,defaultPageTheme:Me,pageTheme:Xe=It}=O;if(!Xe[Me])throw new Error(`${Me} is not defined in pageTheme.`);return{palette:ee,props:{MuiGrid:{spacing:2},MuiSwitch:{color:"primary"}},typography:{fontFamily:de,h5:{fontWeight:700},h4:{fontWeight:700,fontSize:28,marginBottom:6},h3:{fontSize:32,fontWeight:700,marginBottom:6},h2:{fontSize:40,fontWeight:700,marginBottom:8},h1:{fontSize:54,fontWeight:700,marginBottom:10}},page:Xe[Me],getPageTheme:({themeId:A})=>{var T;return(T=Xe[A])!=null?T:Xe[Me]}}}function Bt(O){return{MuiCssBaseline:{"@global":{html:{height:"100%",fontFamily:O.typography.fontFamily},body:{height:"100%",fontFamily:O.typography.fontFamily,"overscroll-behavior-y":"none"},a:{color:"inherit",textDecoration:"none"}}},MuiTableRow:{root:{"&:nth-of-type(odd)":{backgroundColor:O.palette.background.default}},hover:{"&:hover":{cursor:"pointer"}},head:{"&:nth-of-type(odd)":{backgroundColor:O.palette.background.paper}}},MuiTableCell:{root:{wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:O.spacing(3,2,3,2.5),borderBottom:0},sizeSmall:{padding:O.spacing(1.5,2,1.5,2.5)},head:{wordBreak:"break-word",overflow:"hidden",color:"rgb(179, 179, 179)",fontWeight:"normal",lineHeight:"1"}},MuiTabs:{root:{minHeight:24}},MuiTab:{root:{color:O.palette.link,minHeight:24,textTransform:"initial",letterSpacing:"0.07em","&:hover":{color:(0,pt.darken)(O.palette.link,.3),background:(0,pt.lighten)(O.palette.link,.95)},[O.breakpoints.up("md")]:{minWidth:120,fontSize:O.typography.pxToRem(14),fontWeight:500}},textColorPrimary:{color:O.palette.link}},MuiTableSortLabel:{root:{color:"inherit","&:hover":{color:"inherit"},"&:focus":{color:"inherit"}},active:{fontWeight:"bold",color:"inherit"}},MuiListItemText:{dense:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},MuiButton:{text:{padding:void 0}},MuiChip:{root:{backgroundColor:"#D9D9D9",marginRight:O.spacing(1),marginBottom:O.spacing(1),color:O.palette.grey[900]},outlined:{color:O.palette.text.primary},label:{lineHeight:`${O.spacing(2.5)}px`,fontWeight:O.typography.fontWeightMedium,fontSize:`${O.spacing(1.75)}px`},labelSmall:{fontSize:`${O.spacing(1.5)}px`},deleteIcon:{color:O.palette.grey[500],width:`${O.spacing(3)}px`,height:`${O.spacing(3)}px`,margin:`0 ${O.spacing(.75)}px 0 -${O.spacing(.75)}px`},deleteIconSmall:{width:`${O.spacing(2)}px`,height:`${O.spacing(2)}px`,margin:`0 ${O.spacing(.5)}px 0 -${O.spacing(.5)}px`}},MuiCard:{root:{display:"flex",flexDirection:"column"}},MuiCardHeader:{root:{paddingBottom:0}},MuiCardContent:{root:{flexGrow:1,"&:last-child":{paddingBottom:void 0}}},MuiCardActions:{root:{justifyContent:"flex-end"}}}}function Lt(O){const ee=Zt(O),de=(0,Rt.Z)(ee),Me=Bt(de);return{...de,overrides:Me}}var ze=e(34505);const lt=Lt({palette:{type:"light",background:{default:"#F8F8F8"},status:{ok:"#1DB954",warning:"#FF9800",error:"#E22134",running:"#2E77D0",pending:"#FFED51",aborted:"#757575"},bursts:{fontColor:"#FEFEFE",slackChannelText:"#ddd",backgroundColor:{default:"#7C3699"},gradient:{linear:"linear-gradient(-137deg, #4BB8A5 0%, #187656 100%)"}},primary:{main:"#2E77D0"},banner:{info:"#2E77D0",error:"#E22134",text:"#FFFFFF",link:"#000000",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:ze.Z.A700,navigation:{background:"#171717",indicator:"#9BF0E1",color:"#b5b5b5",selectedColor:"#FFF",navItem:{hoverBackground:"#404040"},submenu:{background:"#404040"}},pinSidebarButton:{icon:"#181818",background:"#BDBDBD"},tabbar:{indicator:"#9BF0E1"}},defaultPageTheme:"home",pageTheme:It}),ke=Lt({palette:{type:"dark",background:{default:"#333333"},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",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:ze.Z.A700,navigation:{background:"#424242",indicator:"#9BF0E1",color:"#b5b5b5",selectedColor:"#FFF",navItem:{hoverBackground:"#404040"},submenu:{background:"#404040"}},pinSidebarButton:{icon:"#404040",background:"#BDBDBD"},tabbar:{indicator:"#9BF0E1"}},defaultPageTheme:"home",pageTheme:It});var Ct=e(98192),ct=e(15222),Et=e(41547),X=e(87561);const Z=[{id:"light",title:"Light Theme",variant:"light",icon:t.createElement(ct.Z,null),Provider:({children:O})=>t.createElement(Et.Z,{theme:lt},t.createElement(X.ZP,null,O))},{id:"dark",title:"Dark Theme",variant:"dark",icon:t.createElement(Ct.Z,null),Provider:({children:O})=>t.createElement(Et.Z,{theme:ke},t.createElement(X.ZP,null,O))}];function ne(O){var ee,de,Me;return(0,E.createSpecializedApp)({...O,apis:(ee=O==null?void 0:O.apis)!=null?ee:[],bindRoutes:O==null?void 0:O.bindRoutes,components:{...Q,...O==null?void 0:O.components},configLoader:O==null?void 0:O.configLoader,defaultApis:m,icons:{...Ye,...O==null?void 0:O.icons},plugins:(de=O==null?void 0:O.plugins)!=null?de:[],themes:(Me=O==null?void 0:O.themes)!=null?Me:Z})}var ce=e(82394),se=e.n(ce),ye=e(48023),Ze=e(76635);async function $e({storageApi:O}){var A;const ee=O.forBucket("settings"),de=O.forBucket("starredEntities"),Me=ee.snapshot("starredEntities").value;if(!(0,Ze.isArray)(Me))return;const Xe=new Set((A=de.snapshot("entityRefs").value)!=null?A:[]);Me.filter(Ze.isString).map(T=>T.split(":")).filter(T=>T.length===4&&T[0]==="entity").map(([T,F,w,K])=>(0,ye.eE)({kind:F,namespace:w,name:K})).forEach(T=>Xe.add(T)),await de.set("entityRefs",Array.from(Xe)),await ee.remove("starredEntities")}class nt{constructor(ee){ae(this,"settingsStore");ae(this,"starredEntities");ae(this,"subscribers",new Set);ae(this,"observable",new(se())(ee=>(ee.next(new Set(this.starredEntities)),this.subscribers.add(ee),()=>{this.subscribers.delete(ee)})));var de;$e(ee).then(),this.settingsStore=ee.storageApi.forBucket("starredEntities"),this.starredEntities=new Set((de=this.settingsStore.snapshot("entityRefs").value)!=null?de:[]),this.settingsStore.observe$("entityRefs").subscribe({next:Me=>{var Xe;this.starredEntities=new Set((Xe=Me.value)!=null?Xe:[]),this.notifyChanges()}})}async toggleStarred(ee){this.starredEntities.has(ee)?this.starredEntities.delete(ee):this.starredEntities.add(ee),await this.settingsStore.set("entityRefs",Array.from(this.starredEntities))}starredEntitie$(){return this.observable}notifyChanges(){for(const ee of this.subscribers)ee.next(new Set(this.starredEntities))}}var te=e(39398),J=e(49782),U=e(79692);const ie=(0,U.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",wordBreak:"break-all",marginBottom:"1rem"}});function Te(O){const ee=O.result,de=ie();return React.createElement(Link,{to:ee.location},React.createElement(ListItem,{alignItems:"flex-start",className:de.flexContainer},React.createElement(ListItemText,{className:de.itemText,primaryTypographyProps:{variant:"h6"},primary:ee.title,secondary:ee.text}),React.createElement(Box,null,ee.kind&&React.createElement(Chip,{label:`Kind: ${ee.kind}`,size:"small"}),ee.lifecycle&&React.createElement(Chip,{label:`Lifecycle: ${ee.lifecycle}`,size:"small"}))),React.createElement(Divider,{component:"li"}))}var De=e(30097),Ee=e(53479),Fe=e(95544),vt=e(99688),xt=e(12231),B=e(86136),S=e(49378),j=e(85256),ue=e(61837),ge=e(79784),me=e(50758),Se=e(49166),qe=e(31654),ot=e(43054),Ve=e(40749);const Je="catalog-entity",ht=(0,Ve.J$)({name:"catalog.entity.read",attributes:{action:"read"},resourceType:Je}),st=(0,Ve.J$)({name:"catalog.entity.create",attributes:{action:"create"}}),Ue=(0,Ve.J$)({name:"catalog.entity.delete",attributes:{action:"delete"},resourceType:Je}),N=(0,Ve.J$)({name:"catalog.entity.refresh",attributes:{action:"update"},resourceType:Je}),y=(0,Ve.J$)({name:"catalog.location.read",attributes:{action:"read"}}),x=(0,Ve.J$)({name:"catalog.location.create",attributes:{action:"create"}}),H=(0,Ve.J$)({name:"catalog.location.delete",attributes:{action:"delete"}}),k=(0,U.Z)({button:{color:"white"}});function Oe(O){var Ne;const{UNSTABLE_extraContextMenuItems:ee,UNSTABLE_contextMenuOptions:de,onUnregisterEntity:Me,onInspectEntity:Xe}=O,[A,T]=(0,t.useState)(),F=k(),w=(0,Ee.useEntityPermission)(Ue),K=Pe=>{T(Pe.currentTarget)},G=()=>{T(void 0)},he=ee&&[...ee.map(Pe=>t.createElement(xt.Z,{key:Pe.title,onClick:()=>{G(),Pe.onClick()}},t.createElement(B.Z,null,t.createElement(Pe.Icon,{fontSize:"small"})),t.createElement(S.Z,{primary:Pe.title}))),t.createElement(j.Z,{key:"the divider is here!"})],pe=(Ne=!w.allowed||(de==null?void 0:de.disableUnregister))!=null?Ne:!1;return t.createElement(t.Fragment,null,t.createElement(ue.Z,{"aria-label":"more","aria-controls":"long-menu","aria-haspopup":"true",onClick:K,"data-testid":"menu-button",className:F.button},t.createElement(ot.Z,null)),t.createElement(ge.ZP,{open:Boolean(A),onClose:G,anchorEl:A,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}},t.createElement(me.Z,null,he,t.createElement(xt.Z,{onClick:()=>{G(),Me()},disabled:pe},t.createElement(B.Z,null,t.createElement(Se.Z,{fontSize:"small"})),t.createElement(S.Z,{primary:"Unregister entity"})),t.createElement(xt.Z,{onClick:()=>{G(),Xe()}},t.createElement(B.Z,null,t.createElement(qe.Z,{fontSize:"small"})),t.createElement(S.Z,{primary:"Inspect entity"})))))}const Ae="plugin.catalog.entityLayoutRoute",Ie=()=>null;(0,i.attachComponentData)(Ie,Ae,!0),(0,i.attachComponentData)(Ie,"core.gatherMountPoints",!0);function He(O){const{entity:ee,title:de}=O;return t.createElement(Fe.Z,{display:"inline-flex",alignItems:"center",height:"1em",maxWidth:"100%"},t.createElement(Fe.Z,{component:"span",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},de),ee&&t.createElement(Ee.FavoriteEntity,{entity:ee}))}function ft(O,ee,de,Me){var F,w,K,G,he;const Xe=(F=O!=null?O:Me==null?void 0:Me.kind)!=null?F:"",A=(w=ee!=null?ee:Me==null?void 0:Me.metadata.namespace)!=null?w:"";return{headerTitle:`${(he=(G=(K=Me==null?void 0:Me.metadata.title)!=null?K:de)!=null?G:Me==null?void 0:Me.metadata.name)!=null?he:""}${A&&A!==ye.zG?` in ${A}`:""}`,headerType:(()=>{let pe=Xe.toLocaleLowerCase("en-US");return Me&&Me.spec&&"type"in Me.spec&&(pe+=" \u2014 ",pe+=Me.spec.type.toLocaleLowerCase("en-US")),pe})()}}function Ht(O){var Me;const{entity:ee}=O,de=(0,Ee.getEntityRelations)(ee,ye.S4);return t.createElement(t.Fragment,null,de.length>0&&t.createElement(h.HeaderLabel,{label:"Owner",value:t.createElement(Ee.EntityRefLinks,{entityRefs:de,defaultKind:"Group",color:"inherit"})}),((Me=ee.spec)==null?void 0:Me.lifecycle)&&t.createElement(h.HeaderLabel,{label:"Lifecycle",value:ee.spec.lifecycle}))}const qt=O=>{var Ge,Tt,Mt;const{UNSTABLE_extraContextMenuItems:ee,UNSTABLE_contextMenuOptions:de,children:Me}=O,{kind:Xe,namespace:A,name:T}=(0,i.useRouteRefParams)(Ee.entityRouteRef),{entity:F,loading:w,error:K}=(0,Ee.useAsyncEntity)(),G=(0,f.TH)(),he=(0,i.useElementFilter)(Me,yn=>yn.selectByComponentData({key:Ae,withStrictError:"Child of EntityLayout must be an EntityLayout.Route"}).getElements().flatMap(({props:wt})=>{if(F){if(wt.if&&!wt.if(F))return[]}else return[];return[{path:wt.path,title:wt.title,children:wt.children,tabProps:wt.tabProps}]}),[F]),{headerTitle:pe,headerType:Ne}=ft(Xe,A,T,F),[Pe,Be]=(0,t.useState)(!1),[We,je]=(0,t.useState)(!1),At=(0,f.s0)(),et=async()=>{Be(!1),je(!1),At("/")};return(0,t.useEffect)(()=>{Be(!1),je(!1)},[G.pathname]),t.createElement(h.Page,{themeId:(Mt=(Tt=(Ge=F==null?void 0:F.spec)==null?void 0:Ge.type)==null?void 0:Tt.toString())!=null?Mt:"home"},t.createElement(h.Header,{title:t.createElement(He,{title:pe,entity:F}),pageTitleOverride:pe,type:Ne},F&&t.createElement(t.Fragment,null,t.createElement(Ht,{entity:F}),t.createElement(Oe,{UNSTABLE_extraContextMenuItems:ee,UNSTABLE_contextMenuOptions:de,onUnregisterEntity:()=>Be(!0),onInspectEntity:()=>je(!0)}))),w&&t.createElement(h.Progress,null),F&&t.createElement(h.RoutedTabs,{routes:he}),K&&t.createElement(h.Content,null,t.createElement(vt.Z,{severity:"error"},K.toString())),!w&&!K&&!F&&t.createElement(h.Content,null,t.createElement(h.WarningPanel,{title:"Entity not found"},"There is no ",Xe," with the requested"," ",t.createElement(h.Link,{to:"https://backstage.io/docs/features/software-catalog/references"},"kind, namespace, and name"),".")),t.createElement(Ee.UnregisterEntityDialog,{open:Pe,entity:F,onConfirm:et,onClose:()=>Be(!1)}),t.createElement(Ee.InspectEntityDialog,{open:We,entity:F,onClose:()=>je(!1)}))};qt.Route=Ie;var Mn=e(10179);function Fr(O){const{open:ee,onClose:de,onConfirm:Me,entity:Xe}=O,[A,T]=useState(!1),F=useApi(catalogApiRef),w=useApi(alertApiRef),K=async()=>{T(!0);try{const G=Xe.metadata.uid;await F.removeEntityByUid(G),Me()}catch(G){assertError(G),w.post({message:G.message})}finally{T(!1)}};return React.createElement(Dialog,{open:ee,onClose:de},React.createElement(DialogTitle,{id:"responsive-dialog-title"},"Are you sure you want to delete this entity?"),React.createElement(DialogActions,null,React.createElement(Button,{variant:"contained",color:"secondary",disabled:A,onClick:K},"Delete"),React.createElement(Button,{onClick:de,color:"primary"},"Cancel")))}var pn=e(47851);function Kn(O){var ee,de;return((de=(ee=O==null?void 0:O.metadata)==null?void 0:ee.annotations)==null?void 0:de["backstage.io/orphan"])==="true"}function Br(){const O=useNavigate(),ee=useRouteRef(rootRouteRef),[de,Me]=useState(!1),{entity:Xe}=useEntity(),A=async()=>{Me(!1),O(ee())};return React.createElement(React.Fragment,null,React.createElement(Alert,{severity:"warning",onClick:()=>Me(!0)},"This entity is not referenced by any location and is therefore not receiving updates. Click here to delete."),React.createElement(DeleteEntityDialog,{open:de,entity:Xe,onConfirm:A,onClose:()=>Me(!1)}))}var lr=e(30001);const cr=O=>O.error&&O.level==="error"&&O.type===ENTITY_STATUS_CATALOG_PROCESSING_TYPE;async function Jn(O,ee){return{items:(await ee.getEntityAncestors({entityRef:O})).items.map(Xe=>{var F,w;return{errors:((w=(F=Xe.entity.status)==null?void 0:F.items)!=null?w:[]).filter(cr).map(K=>K.error).filter(K=>Boolean(K)),entity:Xe.entity}}).filter(Xe=>Xe.errors.length>0)}}async function Mr(O,ee){const de=ee.apis.get(catalogApiRef);if(!de)throw new Error(`No implementation available for ${catalogApiRef}`);return(await Jn(stringifyEntityRef(O),de)).items.length>0}function na(){const{entity:O}=useEntity(),ee=stringifyEntityRef(O),de=useApi(catalogApiRef),{loading:Me,error:Xe,value:A}=useAsync(async()=>Jn(ee,de),[ee,de]);return Xe?React.createElement(Box,{mb:1},React.createElement(ResponseErrorPanel,{error:Xe})):Me||!A?null:React.createElement(React.Fragment,null,A.items.map((T,F)=>React.createElement(Box,{key:F,mb:1},stringifyEntityRef(O)!==stringifyEntityRef(T.entity)&&React.createElement(Box,{p:1},"The error below originates from"," ",React.createElement(EntityRefLink,{entityRef:T.entity})),T.errors.map((w,K)=>React.createElement(ResponseErrorPanel,{key:K,error:w})))))}var ur=e(64279);const Sn="core.backstage.entitySwitch",Zn=O=>null;(0,i.attachComponentData)(Zn,Sn,!0);const dr=O=>{var T,F;const{entity:ee,loading:de}=(0,Ee.useAsyncEntity)(),Me=(0,i.useApiHolder)(),Xe=(0,i.useElementFilter)(O.children,w=>w.selectByComponentData({key:Sn,withStrictError:"Child of EntitySwitch is not an EntitySwitch.Case"}).getElements().flatMap(K=>{var pe;if(de)return[];const{if:G,children:he}=K.props;return ee?[{if:(pe=G==null?void 0:G(ee,{apis:Me}))!=null?pe:!0,children:he}]:[{if:G===void 0,children:he}]}),[Me,ee,de]);return Xe.some(w=>typeof w.if=="object"&&"then"in w.if)?t.createElement(On,{results:Xe}):(F=(T=Xe.find(w=>w.if))==null?void 0:T.children)!=null?F:null};function On({results:O}){const{loading:ee,value:de}=(0,ur.default)(async()=>{var Xe;const Me=O.map(async({if:A,children:T})=>{try{if(await A)return T}catch{}return null});return(Xe=(await Promise.all(Me)).find(Boolean))!=null?Xe:null},[O]);return ee||!de?null:de}dr.Case=Zn;const fr=null,$t=Ee.CatalogFilterLayout.Filters,Zr=Ee.CatalogFilterLayout.Content,Vt=(0,i.createPlugin)({id:"catalog",apis:[(0,i.createApiFactory)({api:Ee.catalogApiRef,deps:{discoveryApi:i.discoveryApiRef,fetchApi:i.fetchApiRef},factory:({discoveryApi:O,fetchApi:ee})=>new lr.MS({discoveryApi:O,fetchApi:ee})}),(0,i.createApiFactory)({api:Ee.starredEntitiesApiRef,deps:{storageApi:i.storageApiRef},factory:({storageApi:O})=>new nt({storageApi:O})})],routes:{catalogIndex:pn._Z,catalogEntity:Ee.entityRouteRef},externalRoutes:{createComponent:pn.yw,viewTechDoc:pn.jU}}),$r=Vt.provide((0,i.createRoutableExtension)({name:"CatalogIndexPage",component:()=>e.e(7758).then(e.bind(e,7758)).then(O=>O.CatalogPage),mountPoint:pn._Z})),Yn=Vt.provide((0,i.createRoutableExtension)({name:"CatalogEntityPage",component:()=>e.e(6583).then(e.bind(e,96583)).then(O=>O.CatalogEntityPage),mountPoint:Ee.entityRouteRef})),Nr=Vt.provide((0,i.createComponentExtension)({name:"EntityAboutCard",component:{lazy:()=>Promise.resolve().then(e.bind(e,39398)).then(O=>O.AboutCard)}})),mr=Vt.provide((0,i.createComponentExtension)({name:"EntityLinksCard",component:{lazy:()=>e.e(1959).then(e.bind(e,81959)).then(O=>O.EntityLinksCard)}})),kn=Vt.provide((0,i.createComponentExtension)({name:"EntityHasSystemsCard",component:{lazy:()=>e.e(390).then(e.bind(e,60390)).then(O=>O.HasSystemsCard)}})),Qn=Vt.provide((0,i.createComponentExtension)({name:"EntityHasComponentsCard",component:{lazy:()=>e.e(4022).then(e.bind(e,4022)).then(O=>O.HasComponentsCard)}})),Ur=Vt.provide((0,i.createComponentExtension)({name:"EntityHasSubcomponentsCard",component:{lazy:()=>e.e(8792).then(e.bind(e,38792)).then(O=>O.HasSubcomponentsCard)}})),wr=Vt.provide((0,i.createComponentExtension)({name:"EntityHasResourcesCard",component:{lazy:()=>e.e(1553).then(e.bind(e,11553)).then(O=>O.HasResourcesCard)}})),zr=Vt.provide((0,i.createComponentExtension)({name:"EntityDependsOnComponentsCard",component:{lazy:()=>e.e(8061).then(e.bind(e,48061)).then(O=>O.DependsOnComponentsCard)}})),Tn=Vt.provide((0,i.createComponentExtension)({name:"EntityDependencyOfComponentsCard",component:{lazy:()=>e.e(6235).then(e.bind(e,56235)).then(O=>O.DependencyOfComponentsCard)}})),ln=Vt.provide((0,i.createComponentExtension)({name:"EntityDependsOnResourcesCard",component:{lazy:()=>e.e(9028).then(e.bind(e,59028)).then(O=>O.DependsOnResourcesCard)}})),$n=Vt.provide((0,i.createComponentExtension)({name:"RelatedEntitiesCard",component:{lazy:()=>e.e(2426).then(e.bind(e,62426)).then(O=>O.RelatedEntitiesCard)}}));var Yt=e(82250),Nn=e(36356);class hr{constructor({configApi:ee,discoveryApi:de,identityApi:Me}){ae(this,"configApi");ae(this,"discoveryApi");ae(this,"identityApi");this.configApi=ee,this.discoveryApi=de,this.identityApi=Me}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getStorageUrl(){return`${await this.discoveryApi.getBaseUrl("techdocs")}/static/docs`}async getBuilder(){return this.configApi.getString("techdocs.builder")}async getEntityDocs(ee,de){const Xe=`${await this.getApiOrigin()}/${de}`,A=await fetch(`${Xe.endsWith("/")?Xe:`${Xe}/`}index.html`);if(A.status===404)throw new Error("Page not found");return A.text()}async syncEntityDocs(ee){return"cached"}async getBaseUrl(ee,de,Me){const Xe=await this.getApiOrigin();return new URL(ee,`${Xe}/${Me}`).toString()}}class Un{constructor({configApi:ee,discoveryApi:de,identityApi:Me}){ae(this,"configApi");ae(this,"discoveryApi");ae(this,"identityApi");this.configApi=ee,this.discoveryApi=de,this.identityApi=Me}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getEntityMetadata(ee){return{apiVersion:"backstage.io/v1alpha1",kind:"Component",metadata:{name:"local"},spec:{owner:"test",lifecycle:"experimental"}}}async getTechDocsMetadata(ee){return{site_name:"Live preview environment",site_description:""}}}const Wr=[(0,i.createApiFactory)({api:Yt.techdocsStorageApiRef,deps:{configApi:i.configApiRef,discoveryApi:i.discoveryApiRef,identityApi:i.identityApiRef},factory:({configApi:O,discoveryApi:ee,identityApi:de})=>new hr({configApi:O,discoveryApi:ee,identityApi:de})}),(0,i.createApiFactory)({api:Yt.techdocsApiRef,deps:{configApi:i.configApiRef,discoveryApi:i.discoveryApiRef,identityApi:i.identityApiRef},factory:({configApi:O,discoveryApi:ee,identityApi:de})=>new Un({configApi:O,discoveryApi:ee,identityApi:de})}),(0,i.createApiFactory)({api:Nn.q3,deps:{configApi:i.configApiRef},factory:({configApi:O})=>Nn.ae.fromConfig(O)})];var gr=e(86689),wn=e(58845);const cn=(0,U.Z)({svg:{width:"auto",height:30},path:{fill:"#7df3e1"}});var Dn=()=>{const O=cn();return t.createElement("svg",{className:O.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 2079.95 456.05"},t.createElement("path",{className:O.path,d:"M302.9,180a80.62,80.62,0,0,0,13.44-10.37c.8-.77,1.55-1.54,2.31-2.31a81.89,81.89,0,0,0,7.92-9.37,62.37,62.37,0,0,0,6.27-10.77,48.6,48.6,0,0,0,4.36-16.4c1.49-19.39-10-38.67-35.62-54.22L198.42,14,78.16,129.22l-78.29,75,108.6,65.9a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.8,66.42-25.69,19.16-18.36,25.52-42.12,13.7-61.87a49.69,49.69,0,0,0-6.8-8.87,89.78,89.78,0,0,0,19.28,2.15H259a85.09,85.09,0,0,0,31-5.79A80.88,80.88,0,0,0,302.9,180Zm-100.59,59.8c-19.32,18.51-50.4,21.24-75.7,5.9l-75.13-45.6,67.44-64.65,76.42,46.39C222.88,198.57,221.36,221.6,202.31,239.84Zm8.94-82.21L140.6,114.74,205,53l69.37,42.11c25.94,15.73,29.31,37.05,10.55,55A60.71,60.71,0,0,1,211.25,157.63Zm29.86,190c-19.57,18.75-46.17,29.08-74.88,29.08a123.84,123.84,0,0,1-64.11-18.19L-.13,296.51v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.85,87.85,0,0,1,241.11,347.67Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,257.52V282.2l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.68,12.88-12.35,20-27.13,19.68-41.5v-1.79A86.86,86.86,0,0,1,241.11,308.68Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,218.54v24.68l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.69,12.88-12.34,20-27.12,19.68-41.49v-1.82A87.14,87.14,0,0,1,241.11,269.7Zm83.69,25.74a94.16,94.16,0,0,1-60.19,25.86h0V348a81.6,81.6,0,0,0,51.73-22.37c14-13.38,21.15-28.11,21-42.64v-2.2A95.14,95.14,0,0,1,324.8,295.44Zm-83.69,91.21c-19.57,18.75-46.17,29.09-74.88,29.09a123.76,123.76,0,0,1-64.11-18.2L-.13,335.49v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.35,87.35,0,0,1,241.11,386.65Zm85.75-210.21c-.68.69-1.35,1.38-2.06,2.05a99.19,99.19,0,0,1-22.23,15.69,94.53,94.53,0,0,1-26.24,8.71,97.84,97.84,0,0,1-14.16,1.57c.5,1.61.9,3.25,1.25,4.9a52.7,52.7,0,0,1,1.13,12V231h.05A84.48,84.48,0,0,0,290,225.47a80.83,80.83,0,0,0,26.38-16.82c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,62.85,62.85,0,0,0,6.29-10.78,48.5,48.5,0,0,0,4.32-16.44c.09-1.23.2-2.47.19-3.7v-2c-.72,1-1.48,2.06-2.26,3.09A98,98,0,0,1,326.86,176.44Zm0,77.92c-.68.7-1.3,1.41-2,2.1a94.09,94.09,0,0,1-60.19,25.85h0V309h0a81.65,81.65,0,0,0,51.73-22.37,73.51,73.51,0,0,0,16.48-22.49,48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.48.19-3.71v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A95.81,95.81,0,0,1,326.82,254.36Zm0-39c-.68.7-1.3,1.41-2,2.1a92.22,92.22,0,0,1-10.62,8.65,93.53,93.53,0,0,1-11.63,7,95.63,95.63,0,0,1-37.94,10.18h-.05l0,26.67h0a81.63,81.63,0,0,0,51.73-22.37c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,63.16,63.16,0,0,0,6.29-10.77,48.55,48.55,0,0,0,4.32-16.45c.09-1.23.2-2.47.19-3.7v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A98.19,98.19,0,0,1,326.82,215.38Zm241-88.84q7.94,0,17.09.17t18.12,1a139.3,139.3,0,0,1,16.74,2.57,42.78,42.78,0,0,1,13.3,5.14,64.27,64.27,0,0,1,20.54,19.89Q662,168,662,186.54q0,19.54-9.49,33.78t-27.1,21.09v.68q22.78,4.82,34.87,20.58t12.08,38.4a72.62,72.62,0,0,1-4.83,26.06,65.29,65.29,0,0,1-14.33,22.46,71.57,71.57,0,0,1-23.47,15.78q-14,6-32.28,6H478.38V126.54Zm9,105.27q28,0,40.21-9.78t12.26-29.31q0-13-4.14-20.58a29.47,29.47,0,0,0-11.4-11.66A45,45,0,0,0,597,155.17a161.2,161.2,0,0,0-20.19-1.2h-65.6v77.84Zm16.57,112.13q21.74,0,34-11.66T639.59,300q0-12-4.48-19.88a34.85,34.85,0,0,0-11.91-12.52,50.14,50.14,0,0,0-17.09-6.52,105,105,0,0,0-20-1.88H511.17v84.7Zm274.79,26.74q-7.61,4.45-21.06,4.46-11.4,0-18.12-6.34t-6.74-20.75a70.17,70.17,0,0,1-28.13,20.75,97.87,97.87,0,0,1-57.65,3.6,53.51,53.51,0,0,1-18.82-8.58A41.19,41.19,0,0,1,705,348.56q-4.65-9.42-4.66-22.8,0-15.09,5.18-24.69a44.92,44.92,0,0,1,13.64-15.6,62.63,62.63,0,0,1,19.33-9.09q10.88-3.08,22.27-5.14,12.08-2.4,23-3.6a128,128,0,0,0,19.16-3.43c5.53-1.48,9.89-3.65,13.12-6.51s4.83-7,4.83-12.52q0-9.6-3.62-15.43a24.94,24.94,0,0,0-9.32-8.92,38.38,38.38,0,0,0-12.78-4.11,96.54,96.54,0,0,0-14-1q-18.63,0-31.07,7T736.6,249.29H707.26q.69-16.46,6.9-27.77a52.21,52.21,0,0,1,16.57-18.35,70,70,0,0,1,23.65-10.11A125.51,125.51,0,0,1,782.86,190a168.63,168.63,0,0,1,24,1.72,63.26,63.26,0,0,1,21.58,7A41.23,41.23,0,0,1,844,213.59q5.87,9.57,5.87,25v91q0,10.26,1.21,15.05t8.11,4.79a35.57,35.57,0,0,0,9-1.37Zm-47.64-90.87c-3.69,2.74-8.52,4.72-14.5,6s-12.26,2.27-18.82,3.07-13.17,1.71-19.85,2.73a73.7,73.7,0,0,0-18,4.94,32.62,32.62,0,0,0-12.94,9.73q-5,6.32-5,17.23a23.31,23.31,0,0,0,2.94,12.11,24.11,24.11,0,0,0,7.59,8,32,32,0,0,0,10.88,4.44,60.94,60.94,0,0,0,13.11,1.36q14.5,0,24.86-3.92a52.49,52.49,0,0,0,16.91-9.9,39.1,39.1,0,0,0,9.67-13,32.53,32.53,0,0,0,3.11-13.14ZM1002.07,225q-11.05-9.25-29.69-9.26-15.89,0-26.58,5.83A47.29,47.29,0,0,0,928.71,237a64.66,64.66,0,0,0-9.15,22.12A119.83,119.83,0,0,0,916.8,285a98.22,98.22,0,0,0,2.93,24,64.18,64.18,0,0,0,9.15,20.74,46.2,46.2,0,0,0,16.23,14.58q10,5.49,23.82,5.48,21.75,0,34-11.31t15-31.89h30q-4.83,32.91-24.68,50.75t-54,17.83q-20.37,0-36.07-6.52A69.86,69.86,0,0,1,907,350.11a79.92,79.92,0,0,1-15.88-28.63A118.64,118.64,0,0,1,885.73,285a129.41,129.41,0,0,1,5.18-37.21,85.63,85.63,0,0,1,15.71-30.17A73.46,73.46,0,0,1,933,197.35Q948.91,190,970,190a108.54,108.54,0,0,1,28.48,3.6,69.59,69.59,0,0,1,23.48,11.15,61,61,0,0,1,16.74,19q6.55,11.49,8.29,27.26h-30.38Q1013.11,234.21,1002.07,225Zm109.77-98.41v145l81.47-77.49h39.36l-70.77,64.46,75.95,112.82h-37.29l-61.1-92.59-27.62,25.38v67.21H1082.5V126.54Zm170.54,205.22a31.07,31.07,0,0,0,10.87,10.63,49,49,0,0,0,15.19,5.66,87.06,87.06,0,0,0,17.44,1.71,109.18,109.18,0,0,0,14.5-1,53.22,53.22,0,0,0,14-3.78,26.27,26.27,0,0,0,10.53-8q4.14-5.32,4.14-13.55,0-11.31-8.63-17.14a73.69,73.69,0,0,0-21.58-9.43q-12.94-3.6-28.13-6.52a146,146,0,0,1-28.14-8.23A58.16,58.16,0,0,1,1261,267.13q-8.64-9.6-8.63-26.75,0-13.38,6-23a49.26,49.26,0,0,1,15.53-15.61,71.76,71.76,0,0,1,21.4-8.91A99.41,99.41,0,0,1,1319,190a141.31,141.31,0,0,1,28,2.58,64.85,64.85,0,0,1,22.62,8.91,46.16,46.16,0,0,1,15.7,17.15q5.87,10.8,6.91,26.91h-29.35q-.69-8.57-4.48-14.23a29.36,29.36,0,0,0-9.67-9.08,44.16,44.16,0,0,0-12.94-5,67.68,67.68,0,0,0-14.33-1.54,87.29,87.29,0,0,0-13.29,1,45.28,45.28,0,0,0-12.26,3.6,24.49,24.49,0,0,0-9,6.86q-3.46,4.29-3.46,11.14a16.32,16.32,0,0,0,5.36,12.52,42.75,42.75,0,0,0,13.63,8.23,120,120,0,0,0,18.64,5.48q10.37,2.24,20.72,4.63,11,2.4,21.57,5.83A70.74,70.74,0,0,1,1382,284.1a44.55,44.55,0,0,1,13.12,14.23q5,8.58,5,21.26,0,16.13-6.73,26.75a52.5,52.5,0,0,1-17.61,17.14,73.89,73.89,0,0,1-24.51,9.09,146.3,146.3,0,0,1-27.1,2.57,126.24,126.24,0,0,1-28.31-3.09A69.56,69.56,0,0,1,1272,361.94a51.74,51.74,0,0,1-16.57-18.52q-6.21-11.49-6.9-27.95h29.34A32.65,32.65,0,0,0,1282.38,331.76Zm226.46-137.67v25.72h-35.56V329.88a31.37,31.37,0,0,0,.87,8.23,8.42,8.42,0,0,0,3.28,4.8,14.61,14.61,0,0,0,6.73,2.23,99.19,99.19,0,0,0,11.22.51h13.46v25.72H1486.4a105.8,105.8,0,0,1-19.5-1.55,28.65,28.65,0,0,1-13.12-5.65,24.09,24.09,0,0,1-7.42-11.66q-2.43-7.54-2.42-19.89V219.81h-30.38V194.09h30.38V140.94h29.34v53.15ZM1699.4,370.68q-7.61,4.45-21.06,4.46-11.4,0-18.12-6.34t-6.74-20.75a70.17,70.17,0,0,1-28.13,20.75,97.87,97.87,0,0,1-57.65,3.6,53.51,53.51,0,0,1-18.82-8.58,41.19,41.19,0,0,1-12.6-15.26q-4.65-9.42-4.66-22.8,0-15.09,5.18-24.69a44.92,44.92,0,0,1,13.64-15.6,62.63,62.63,0,0,1,19.33-9.09q10.88-3.08,22.27-5.14,12.07-2.4,23-3.6a128,128,0,0,0,19.16-3.43c5.53-1.48,9.89-3.65,13.12-6.51s4.83-7,4.83-12.52q0-9.6-3.62-15.43a24.94,24.94,0,0,0-9.32-8.92,38.38,38.38,0,0,0-12.78-4.11,96.54,96.54,0,0,0-14-1q-18.63,0-31.07,7t-13.46,26.57h-29.34q.67-16.46,6.9-27.77A52.21,52.21,0,0,1,1562,203.17a70,70,0,0,1,23.65-10.11,125.51,125.51,0,0,1,28.48-3.09,168.63,168.63,0,0,1,24,1.72,63.26,63.26,0,0,1,21.58,7,41.23,41.23,0,0,1,15.53,14.89q5.87,9.57,5.87,25v91q0,10.26,1.21,15.05t8.11,4.79a35.57,35.57,0,0,0,9-1.37Zm-47.64-90.87c-3.69,2.74-8.52,4.72-14.5,6s-12.26,2.27-18.82,3.07-13.17,1.71-19.85,2.73a73.7,73.7,0,0,0-17.95,4.94,32.62,32.62,0,0,0-12.94,9.73q-5,6.32-5,17.23a23.31,23.31,0,0,0,2.94,12.11,24.11,24.11,0,0,0,7.59,8,32,32,0,0,0,10.88,4.44,60.94,60.94,0,0,0,13.11,1.36q14.51,0,24.86-3.92a52.49,52.49,0,0,0,16.91-9.9,39.1,39.1,0,0,0,9.67-13,32.53,32.53,0,0,0,3.11-13.14Zm208.85,141.62q-20,21.6-62.83,21.6a122.11,122.11,0,0,1-25.37-2.74,78,78,0,0,1-23.48-8.92,54.41,54.41,0,0,1-17.43-16.11q-6.91-10-7.6-24.35h29.35a21.47,21.47,0,0,0,5,13.38,36.67,36.67,0,0,0,11.4,8.91,55.52,55.52,0,0,0,14.67,5,79.51,79.51,0,0,0,15.19,1.55q14.49,0,24.51-5A46,46,0,0,0,1840.59,401a56.53,56.53,0,0,0,9.49-21.09,117.46,117.46,0,0,0,2.94-27.09V341.19h-.7q-7.59,16.46-23,24.18a71.8,71.8,0,0,1-32.63,7.71q-20,0-34.86-7.2A72.88,72.88,0,0,1,1737,346.51a82.13,82.13,0,0,1-15-28.46,116.62,116.62,0,0,1-5-34.47,133.92,133.92,0,0,1,4.14-32.4A88.17,88.17,0,0,1,1735,221a75.49,75.49,0,0,1,25.55-22.29q15.87-8.75,39-8.75a66.21,66.21,0,0,1,31.07,7.38,52.13,52.13,0,0,1,22.09,22.11h.35V194.09h27.61V356.28Q1880.63,399.83,1860.61,421.43Zm-37.46-79.72a47.94,47.94,0,0,0,16.4-15.78,71.89,71.89,0,0,0,9.15-22.11,106.77,106.77,0,0,0,2.93-24.69,96.71,96.71,0,0,0-2.76-23,64,64,0,0,0-8.8-20.4,45.76,45.76,0,0,0-15.71-14.57q-9.66-5.49-23.47-5.49-14.16,0-24.17,5.32a46.77,46.77,0,0,0-16.4,14.23,60.14,60.14,0,0,0-9.32,20.57,99.69,99.69,0,0,0-2.93,24.35,120.63,120.63,0,0,0,2.42,24,67.5,67.5,0,0,0,8.28,21.77,46.37,46.37,0,0,0,15.54,15.78q9.66,6,24.16,6T1823.15,341.71Zm228,18.34q-20,15.09-50.41,15.09-21.4,0-37.11-6.86a73.16,73.16,0,0,1-26.41-19.2,81.52,81.52,0,0,1-16-29.49,141.12,141.12,0,0,1-6-37.38,106.1,106.1,0,0,1,6.21-37A88.56,88.56,0,0,1,1938.8,216a79.09,79.09,0,0,1,26.58-19.2A81.66,81.66,0,0,1,1999,190q23.82,0,39.53,9.78a78,78,0,0,1,25.2,24.86,98.18,98.18,0,0,1,13.12,32.91,140.6,140.6,0,0,1,2.93,34h-133.6a70,70,0,0,0,2.76,22.12,49.9,49.9,0,0,0,10,18.51A49.1,49.1,0,0,0,1976.6,345q10.7,4.82,25.2,4.8,18.65,0,30.55-8.57t15.71-26.06h29Q2071.18,345,2051.17,360.05Zm-7.08-113.84a50,50,0,0,0-10.7-16,53.1,53.1,0,0,0-56.62-10.63,47.48,47.48,0,0,0-15.71,10.81,51.69,51.69,0,0,0-10.35,15.94,60.18,60.18,0,0,0-4.49,19.37h102.53A59.47,59.47,0,0,0,2044.09,246.21ZM302.9,180a80.62,80.62,0,0,0,13.44-10.37c.8-.77,1.55-1.54,2.31-2.31a81.89,81.89,0,0,0,7.92-9.37,62.37,62.37,0,0,0,6.27-10.77,48.6,48.6,0,0,0,4.36-16.4c1.49-19.39-10-38.67-35.62-54.22L198.42,14,78.16,129.22l-78.29,75,108.6,65.9a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.8,66.42-25.69,19.16-18.36,25.52-42.12,13.7-61.87a49.69,49.69,0,0,0-6.8-8.87,89.78,89.78,0,0,0,19.28,2.15H259a85.09,85.09,0,0,0,31-5.79A80.88,80.88,0,0,0,302.9,180Zm-100.59,59.8c-19.32,18.51-50.4,21.24-75.7,5.9l-75.13-45.6,67.44-64.65,76.42,46.39C222.88,198.57,221.36,221.6,202.31,239.84Zm8.94-82.21L140.6,114.74,205,53l69.37,42.11c25.94,15.73,29.31,37.05,10.55,55A60.71,60.71,0,0,1,211.25,157.63Zm29.86,190c-19.57,18.75-46.17,29.08-74.88,29.08a123.84,123.84,0,0,1-64.11-18.19L-.13,296.51v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.85,87.85,0,0,1,241.11,347.67Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,257.52V282.2l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.68,12.88-12.35,20-27.13,19.68-41.5v-1.79A86.86,86.86,0,0,1,241.11,308.68Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,218.54v24.68l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.69,12.88-12.34,20-27.12,19.68-41.49v-1.82A87.14,87.14,0,0,1,241.11,269.7Zm83.69,25.74a94.16,94.16,0,0,1-60.19,25.86h0V348a81.6,81.6,0,0,0,51.73-22.37c14-13.38,21.15-28.11,21-42.64v-2.2A95.14,95.14,0,0,1,324.8,295.44Zm-83.69,91.21c-19.57,18.75-46.17,29.09-74.88,29.09a123.76,123.76,0,0,1-64.11-18.2L-.13,335.49v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.35,87.35,0,0,1,241.11,386.65Zm85.75-210.21c-.68.69-1.35,1.38-2.06,2.05a99.19,99.19,0,0,1-22.23,15.69,94.53,94.53,0,0,1-26.24,8.71,97.84,97.84,0,0,1-14.16,1.57c.5,1.61.9,3.25,1.25,4.9a52.7,52.7,0,0,1,1.13,12V231h.05A84.48,84.48,0,0,0,290,225.47a80.83,80.83,0,0,0,26.38-16.82c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,62.85,62.85,0,0,0,6.29-10.78,48.5,48.5,0,0,0,4.32-16.44c.09-1.23.2-2.47.19-3.7v-2c-.72,1-1.48,2.06-2.26,3.09A98,98,0,0,1,326.86,176.44Zm0,77.92c-.68.7-1.3,1.41-2,2.1a94.09,94.09,0,0,1-60.19,25.85h0V309h0a81.65,81.65,0,0,0,51.73-22.37,73.51,73.51,0,0,0,16.48-22.49,48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.48.19-3.71v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A95.81,95.81,0,0,1,326.82,254.36Zm0-39c-.68.7-1.3,1.41-2,2.1a92.22,92.22,0,0,1-10.62,8.65,93.53,93.53,0,0,1-11.63,7,95.63,95.63,0,0,1-37.94,10.18h-.05l0,26.67h0a81.63,81.63,0,0,0,51.73-22.37c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,63.16,63.16,0,0,0,6.29-10.77,48.55,48.55,0,0,0,4.32-16.45c.09-1.23.2-2.47.19-3.7v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A98.19,98.19,0,0,1,326.82,215.38Z"}))};const qn=(0,U.Z)({svg:{width:"auto",height:28},path:{fill:"#7df3e1"}});var yr=()=>{const O=qn();return t.createElement("svg",{className:O.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 337.46 428.5"},t.createElement("path",{className:O.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"}))};const Er=(0,U.Z)({root:{width:h.sidebarConfig.drawerWidthClosed,height:3*h.sidebarConfig.logoHeight,display:"flex",flexFlow:"row nowrap",alignItems:"center",marginBottom:-14},link:{width:h.sidebarConfig.drawerWidthClosed,marginLeft:24}}),zn=()=>{const O=Er(),{isOpen:ee}=(0,t.useContext)(h.SidebarContext);return t.createElement("div",{className:O.root},t.createElement(gr.Z,{component:g.OL,to:"/docs/default/component/local/",underline:"none",className:O.link},ee?t.createElement(Dn,null):t.createElement(yr,null)))},vr=({children:O})=>t.createElement(h.SidebarPage,null,t.createElement(h.Sidebar,null,t.createElement(zn,null),t.createElement(h.SidebarDivider,null),t.createElement(h.SidebarItem,{icon:wn.Z,to:"/docs/default/component/local",text:"Docs Preview"})),O);var Ar=e(80030),_n=e(32388),Rr=e(4142);const Wn=(0,U.Z)(O=>({headerIcon:{color:O.palette.common.white,width:"32px",height:"32px"},content:{backgroundColor:O.palette.background.default},contentToolbar:{display:"flex",justifyContent:"flex-end",padding:0}}));var _t;(function(O){const ee="light";O.LIGHT=ee;const de="dark";O.DARK=de})(_t||(_t={}));const Hn=(0,t.createContext)({theme:_t.LIGHT,toggleTheme:()=>{}}),Kt=({children:O})=>{const[ee,de]=(0,t.useState)(_t.LIGHT),Me=(0,t.useCallback)(()=>{de(T=>T===_t.LIGHT?_t.DARK:_t.LIGHT)},[de]),Xe={theme:ee,toggleTheme:Me},A={[_t.LIGHT]:lt,[_t.DARK]:ke};return t.createElement(Hn.Provider,{value:Xe},t.createElement(Et.Z,{theme:A[ee]},O))},un=()=>(0,t.useContext)(Hn),Cr=()=>{const O=Wn(),{theme:ee,toggleTheme:de}=un(),Me={[_t.LIGHT]:{icon:Rr.Z,title:"Dark theme"},[_t.DARK]:{icon:_n.Z,title:"Light theme"}},{title:Xe,icon:A}=Me[ee];return t.createElement(Fe.Z,{display:"flex",alignItems:"center",mr:2},t.createElement(Ar.ZP,{title:Xe,arrow:!0},t.createElement(ue.Z,{size:"small",onClick:de},t.createElement(A,{className:O.headerIcon}))))},Sr=({onReady:O,entityRef:ee})=>{const de=Wn();return t.createElement(h.Content,{className:de.content,"data-testid":"techdocs-content"},t.createElement(Yt.Reader,{onReady:O,entityRef:ee,withSearch:!1}))},er=()=>{const O={site_name:"Live preview environment",site_description:""};return t.createElement(Yt.TechDocsReaderPage,null,({entityRef:ee,onReady:de})=>t.createElement(t.Fragment,null,t.createElement(Yt.TechDocsReaderPageHeader,{entityRef:ee,techDocsMetadata:O},t.createElement(Cr,null)),t.createElement(Sr,{entityRef:ee,onReady:de})))},Pn=t.createElement(Kt,null,t.createElement(er,null)),bn={backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}},Tr={backend:{baseUrl:"http://localhost:7007"},techdocs:{builder:"external"}};async function Pr(){const O=await fetch("/.detect");return O.ok?(await O.text()).trim()==="techdocs-cli-server":!1}async function tr(){const O=await(0,E.defaultConfigLoader)(),ee=await Pr();return[...O,{context:"detected",data:ee?bn:Tr}]}const Rn=ne({apis:Wr,configLoader:tr,plugins:Object.values(r)}),Hr=Rn.getProvider(),br=Rn.getRouter(),nr=t.createElement(E.FlatRoutes,null,t.createElement(f.Fg,{key:"/",to:"/docs/default/component/local/"}),t.createElement(f.AW,{path:"/catalog/:namespace/:kind/:name",element:t.createElement(Yn,null)}),t.createElement(f.AW,{path:"/docs",element:t.createElement(Yt.TechDocsIndexPage,null)},t.createElement(Yt.DefaultTechDocsHome,null)),t.createElement(f.AW,{path:"/docs/:namespace/:kind/:name/*",element:t.createElement(Yt.TechDocsReaderPage,null)},Pn));var jr=()=>t.createElement(Hr,null,t.createElement(br,null,t.createElement(vr,null,nr)));l.render(t.createElement(jr,null),document.getElementById("root"))},76241:function(_,s,e){"use strict";e.d(s,{CT:function(){return i},EI:function(){return u},uW:function(){return f},Vt:function(){return o}});function r(){return typeof window!="undefined"&&window.Math===Math?window:typeof self!="undefined"&&self.Math===Math?self:Function("return this")()}const t=r(),l=h=>`__@backstage/${h}__`;function f(h,g){const R=l(h);let C=t[R];return C||(C=g(),t[R]=C,C)}var E=e(2784);function i(h){return f(h,()=>(0,E.createContext)(void 0))}function o(h){return(0,E.useContext)(i(h))}function m(h){return{set(g){globalThis[`__@backstage/${h}__`]=createContext(createVersionedValueMap(g))},reset(){delete globalThis[`__@backstage/${h}__`]}}}function u(h){return Object.freeze(h),{atVersion(g){return h[g]}}}},53479:function(_,s,e){"use strict";e.d(s,{AsyncEntityProvider:function(){return W},CATALOG_FILTER_EXISTS:function(){return r.n3},CatalogFilterLayout:function(){return P},EntityKindFilter:function(){return X},EntityLifecyclePicker:function(){return ht},EntityListProvider:function(){return St},EntityOwnerPicker:function(){return y},EntityRefLink:function(){return ct},EntityRefLinks:function(){return Et},EntityTable:function(){return He},EntityTagPicker:function(){return Mn},EntityTypePicker:function(){return Kn},FavoriteEntity:function(){return na},InspectEntityDialog:function(){return Tr},UnregisterEntityDialog:function(){return nr},UserListPicker:function(){return Me},catalogApiRef:function(){return l},entityRouteRef:function(){return Lt},getEntityRelations:function(){return Qe},getEntitySourceLocation:function(){return Ye},humanizeEntityRef:function(){return lt},starredEntitiesApiRef:function(){return f},useAsyncEntity:function(){return ve},useEntity:function(){return oe},useEntityList:function(){return it},useEntityOwnership:function(){return Ee},useEntityPermission:function(){return vt},useRelatedEntities:function(){return te},useStarredEntities:function(){return ie}});var r=e(30001),t=e(36964);const l=(0,t.createApiRef)({id:"plugin.catalog.service"}),f=(0,t.createApiRef)({id:"catalog-react.starred-entities"});var E=e(82394);class i{constructor(){ae(this,"starredEntities",new Set);ae(this,"subscribers",new Set);ae(this,"observable",new ObservableImpl(T=>(T.next(new Set(this.starredEntities)),this.subscribers.add(T),()=>{this.subscribers.delete(T)})))}async toggleStarred(T){this.starredEntities.delete(T)||this.starredEntities.add(T);for(const F of this.subscribers)F.next(new Set(this.starredEntities))}starredEntitie$(){return this.observable}}var o=e(2784),m=e(41156),u=e(60364),h=e(77277),g=e(4190),R=e(95544),C=e(90436),M=e(60905),b=e(36444);const Q=A=>{const T=(0,m.Z)(G=>G.breakpoints.down("md")),F=(0,u.Z)(),[w,K]=(0,o.useState)(!1);return T?o.createElement(o.Fragment,null,o.createElement(h.Z,{style:{marginTop:F.spacing(1),marginLeft:F.spacing(1)},onClick:()=>K(!0),startIcon:o.createElement(b.Z,null)},"Filters"),o.createElement(g.ZP,{open:w,onClose:()=>K(!1),anchor:"left",disableAutoFocus:!0,keepMounted:!0,variant:"temporary"},o.createElement(R.Z,{m:2},o.createElement(C.Z,{variant:"h6",component:"h2",style:{marginBottom:F.spacing(1)}},"Filters"),A.children))):o.createElement(M.Z,{item:!0,lg:2},A.children)},I=A=>o.createElement(M.Z,{item:!0,xs:12,lg:10},A.children),P=A=>o.createElement(M.Z,{container:!0,style:{position:"relative"}},A.children);P.Filters=Q,P.Content=I;var L=e(76241);const z=(0,L.CT)("entity-context"),W=({children:A,entity:T,loading:F,error:w,refresh:K})=>{const G={entity:T,loading:F,error:w,refresh:K};return o.createElement(z.Provider,{value:(0,L.EI)({1:G})},A)},q=A=>React.createElement(W,{entity:A.entity,loading:!Boolean(A.entity),error:void 0,refresh:void 0,children:A.children});function oe(){const A=(0,L.Vt)("entity-context");if(!A)throw new Error("Entity context is not available");const T=A.atVersion(1);if(!T)throw new Error("EntityContext v1 not available");if(!T.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:T.entity}}function ve(){const A=(0,L.Vt)("entity-context");if(!A)throw new Error("Entity context is not available");const T=A.atVersion(1);if(!T)throw new Error("EntityContext v1 not available");const{entity:F,loading:w,error:K,refresh:G}=T;return{entity:F,loading:w,error:K,refresh:G}}var Le=e(76635),we=e(19126),fe=e.n(we),Ke=e(10289),_e=e(69294),ut=e(48760),rt=e(90736);function at(A){return A.reduce((T,F)=>({...T,...F.getCatalogFilters?F.getCatalogFilters():{}}),{})}function gt(A){return T=>A.every(F=>!F.filterEntity||F.filterEntity(T))}var xe=e(48023);function Qe(A,T,F){var K;let w=((K=A==null?void 0:A.relations)==null?void 0:K.filter(G=>G.type===T).map(G=>(0,xe.of)(G.targetRef)))||[];return F!=null&&F.kind&&(w=w.filter(G=>G.kind.toLocaleLowerCase("en-US")===F.kind.toLocaleLowerCase("en-US"))),w}function Ye(A,T){var w;const F=(w=A.metadata.annotations)==null?void 0:w[xe.M6];if(!!F)try{const K=(0,xe.Ou)(F),G=T.byUrl(K.target);return{locationTargetUrl:K.target,integrationType:G==null?void 0:G.type}}catch{return}}function Rt(A,T){const F=new Set([...getEntityRelations(A,RELATION_MEMBER_OF,{kind:"group"}),...A?[getCompoundEntityRef(A)]:[]].map(stringifyEntityRef)),w=getEntityRelations(T,RELATION_OWNED_BY).map(stringifyEntityRef);for(const K of w)if(F.has(K))return!0;return!1}const pt=(0,o.createContext)(void 0),St=({children:A})=>{const T=(0,rt.default)(),F=(0,t.useApi)(l),[w,K]=(0,o.useState)({}),G=(0,Ke.TH)(),he=(0,o.useMemo)(()=>{var et;return(et=fe().parse(G.search,{ignoreQueryPrefix:!0}).filters)!=null?et:{}},[G]),[pe,Ne]=(0,o.useState)(()=>({appliedFilters:{},entities:[],backendEntities:[]})),[{loading:Pe,error:Be},We]=(0,_e.default)(async()=>{var wt;const et=(0,Le.compact)(Object.values(w)),Ge=gt(et),Tt=at(et),Mt=at((0,Le.compact)(Object.values(pe.appliedFilters))),yn=Object.keys(w).reduce((kt,en)=>{const dn=w[en];return dn!=null&&dn.toQueryValue&&(kt[en]=dn.toQueryValue()),kt},{});if((0,Le.isEqual)(Mt,Tt))Ne({appliedFilters:w,backendEntities:pe.backendEntities,entities:pe.backendEntities.filter(Ge)});else{const kt=await F.getEntities({filter:Tt});Ne({appliedFilters:w,backendEntities:kt.items,entities:kt.items.filter(Ge)})}if(T()){const kt=fe().parse(G.search,{ignoreQueryPrefix:!0}),en=fe().stringify({...kt,filters:yn},{addQueryPrefix:!0,arrayFormat:"repeat"}),dn=`${window.location.pathname}${en}`;(wt=window.history)==null||wt.replaceState(null,document.title,dn)}},[F,he,w,pe],{loading:!0});(0,ut.Z)(We,10,[w]);const je=(0,o.useCallback)(et=>{K(Ge=>{const Tt=typeof et=="function"?et(Ge):et;return{...Ge,...Tt}})},[]),At=(0,o.useMemo)(()=>({filters:pe.appliedFilters,entities:pe.entities,backendEntities:pe.backendEntities,updateFilters:je,queryParameters:he,loading:Pe,error:Be}),[pe,je,he,Pe,Be]);return o.createElement(pt.Provider,{value:At},A)};function it(){const A=(0,o.useContext)(pt);if(!A)throw new Error("useEntityList must be used within EntityListProvider");return A}var yt=e(64279),It=e(18149),Pt=e.n(It),Zt=e(829),Bt=e.n(Zt);const Lt=(0,L.uW)("catalog:entity-route-ref",()=>(0,t.createRouteRef)({id:"catalog:entity",params:["namespace","kind","name"]}));function ze(A){var T,F;return{kind:A.kind.toLocaleLowerCase("en-US"),namespace:(F=(T=A.metadata.namespace)==null?void 0:T.toLocaleLowerCase("en-US"))!=null?F:DEFAULT_NAMESPACE,name:A.metadata.name}}function lt(A,T){const F=T==null?void 0:T.defaultKind;let w,K,G;return"metadata"in A?(w=A.kind,K=A.metadata.namespace,G=A.metadata.name):(w=A.kind,K=A.namespace,G=A.name),K===xe.zG&&(K=void 0),w=w.toLocaleLowerCase("en-US"),w=F&&F.toLocaleLowerCase("en-US")===w?void 0:w,`${w?`${w}:`:""}${K?`${K}/`:""}${G}`}var ke=e(9118),Ct=e(80030);const ct=(0,o.forwardRef)((A,T)=>{var et;const{entityRef:F,defaultKind:w,title:K,children:G,...he}=A,pe=(0,t.useRouteRef)(Lt);let Ne,Pe,Be;if(typeof F=="string"){const Ge=(0,xe.of)(F);Ne=Ge.kind,Pe=Ge.namespace,Be=Ge.name}else"metadata"in F?(Ne=F.kind,Pe=F.metadata.namespace,Be=F.metadata.name):(Ne=F.kind,Pe=F.namespace,Be=F.name);Ne=Ne.toLocaleLowerCase("en-US"),Pe=(et=Pe==null?void 0:Pe.toLocaleLowerCase("en-US"))!=null?et:xe.zG;const We={kind:Ne,namespace:Pe,name:Be},je=lt({kind:Ne,namespace:Pe,name:Be},{defaultKind:w}),At=o.createElement(ke.Link,{...he,ref:T,to:pe(We)},G,!G&&(K!=null?K:je));return K?o.createElement(Ct.ZP,{title:je},At):At});function Et(A){const{entityRefs:T,defaultKind:F,...w}=A;return o.createElement(o.Fragment,null,T.map((K,G)=>o.createElement(o.Fragment,{key:G},G>0&&", ",o.createElement(ct,{...w,entityRef:K,defaultKind:F}))))}class X{constructor(T){this.value=T}getCatalogFilters(){return{kind:this.value}}toQueryValue(){return this.value}}class Z{constructor(T){this.value=T}getTypes(){return Array.isArray(this.value)?this.value:[this.value]}getCatalogFilters(){return{"spec.type":this.getTypes()}}toQueryValue(){return this.getTypes()}}class ne{constructor(T){this.values=T}filterEntity(T){return this.values.every(F=>{var w;return((w=T.metadata.tags)!=null?w:[]).includes(F)})}toQueryValue(){return this.values}}class ce{constructor(T){this.value=T}filterEntity(T){var w;const F=this.value.toLocaleUpperCase("en-US");return T.metadata.name.toLocaleUpperCase("en-US").includes(F)||`${T.metadata.title}`.toLocaleUpperCase("en-US").includes(F)||((w=T.metadata.tags)==null?void 0:w.join("").toLocaleUpperCase("en-US").indexOf(F))!==-1}}class se{constructor(T){this.values=T}filterEntity(T){return this.values.some(F=>Qe(T,xe.S4).some(w=>lt(w,{defaultKind:"group"})===F))}toQueryValue(){return this.values}}class ye{constructor(T){this.values=T}filterEntity(T){return this.values.some(F=>{var w;return((w=T.spec)==null?void 0:w.lifecycle)===F})}toQueryValue(){return this.values}}class Ze{constructor(T,F,w){this.value=T,this.isOwnedEntity=F,this.isStarredEntity=w}filterEntity(T){switch(this.value){case"owned":return this.isOwnedEntity(T);case"starred":return this.isStarredEntity(T);default:return!0}}toQueryValue(){return this.value}}function $e(){var Ge;const A=(0,t.useApi)(l),{filters:{kind:T,type:F},queryParameters:{type:w},updateFilters:K}=it(),G=(0,o.useMemo)(()=>[w].flat().filter(Boolean),[w]),[he,pe]=(0,o.useState)(G.length?G:(Ge=F==null?void 0:F.getTypes())!=null?Ge:[]);(0,o.useEffect)(()=>{G.length&&pe(G)},[G]);const[Ne,Pe]=(0,o.useState)([]),Be=(0,o.useMemo)(()=>T==null?void 0:T.value,[T]),{error:We,loading:je,value:At}=(0,yt.default)(async()=>Be?await A.getEntityFacets({filter:{kind:Be},facets:["spec.type"]}).then(Mt=>Mt.facets["spec.type"]||[]):[],[Be,A]),et=(0,o.useRef)(At);return(0,o.useEffect)(()=>{const Tt=et.current;if(et.current=At,je||!Be||Tt===At||!At)return;const Mt=Bt()(At,wt=>-wt.count).map(wt=>wt.value);Pe(Mt);const yn=he.filter(wt=>Mt.includes(wt));Pt()(he,yn)||pe(yn)},[je,Be,he,pe,At]),(0,o.useEffect)(()=>{K({type:he.length?new Z(he):void 0})},[he,K]),{loading:je,error:We,availableTypes:Ne,selectedTypes:he,setSelectedTypes:pe}}const nt=20;function te(A,T){var Ne,Pe;const F=(Ne=T==null?void 0:T.type)==null?void 0:Ne.toLocaleLowerCase("en-US"),w=(Pe=T==null?void 0:T.kind)==null?void 0:Pe.toLocaleLowerCase("en-US"),K=(0,t.useApi)(l),{loading:G,value:he,error:pe}=(0,yt.default)(async()=>{var et;const Be=(et=A.relations)==null?void 0:et.map(Ge=>({type:Ge.type,target:(0,xe.of)(Ge.targetRef)})).filter(Ge=>(!F||Ge.type.toLocaleLowerCase("en-US")===F)&&(!w||Ge.target.kind===w));if(!Be)return[];const We=Object.values((0,Le.groupBy)(Be,({target:Ge})=>`${Ge.kind}:${Ge.namespace}`.toLocaleLowerCase("en-US"))),je=[];for(const Ge of We)je.push({kind:Ge[0].target.kind,namespace:Ge[0].target.namespace,nameBatches:(0,Le.chunk)(Ge.map(Tt=>Tt.target.name),nt)});return(await Promise.all(je.flatMap(Ge=>Ge.nameBatches.map(Tt=>K.getEntities({filter:{kind:Ge.kind,"metadata.namespace":Ge.namespace,"metadata.name":Tt}}))))).flatMap(Ge=>Ge.items)},[A,F,w]);return{entities:he,loading:G,error:pe}}var J=e(72164);function U(A){return typeof A=="string"?A:(0,xe.eE)(A)}function ie(){const A=(0,t.useApi)(f),T=(0,J.Z)(A.starredEntitie$(),new Set),F=(0,o.useCallback)(K=>T.has(U(K)),[T]),w=(0,o.useCallback)(K=>A.toggleStarred(U(K)).then(),[A]);return{starredEntities:T,toggleStarredEntity:w,isStarredEntity:F}}function Te(A){return typeof A=="string"?A:(0,xe.eE)(A)}function De(A){const T=(0,t.useApi)(f),[F,w]=(0,o.useState)(!1);return(0,o.useEffect)(()=>{const G=T.starredEntitie$().subscribe({next(he){w(he.has(Te(A)))}});return()=>{G.unsubscribe()}},[A,T]),{toggleStarredEntity:(0,o.useCallback)(()=>T.toggleStarred(Te(A)).then(),[A,T]),isStarredEntity:F}}function Ee(){const A=(0,t.useApi)(t.identityApiRef),{loading:T,value:F}=(0,yt.default)(async()=>{const{ownershipEntityRefs:K}=await A.getBackstageIdentity();return K},[]),w=(0,o.useMemo)(()=>{const K=new Set(F!=null?F:[]);return G=>{const he=Qe(G,xe.S4).map(xe.eE);for(const pe of he)if(K.has(pe))return!0;return!1}},[F]);return(0,o.useMemo)(()=>({loading:T,isOwnedEntity:w}),[T,w])}var Fe=e(68099);function vt(A){const{entity:T,loading:F,error:w}=ve(),{allowed:K,loading:G,error:he}=(0,Fe.gI)({permission:A,resourceRef:T?(0,xe.eE)(T):void 0});return F||G?{loading:!0,allowed:!1}:w?{loading:!1,allowed:!1,error:w}:{loading:!1,allowed:K,error:he}}const xt=A=>{var he;const{initialFilter:T,hidden:F}=A,{updateFilters:w,queryParameters:{kind:K}}=useEntityList(),[G]=useState((he=[K].flat()[0])!=null?he:T);return useEffect(()=>{w({kind:G?new EntityKindFilter(G):void 0})},[G,w]),F?null:React.createElement(Alert,{severity:"warning"},"Kind filter not yet available")};var B=e(79692),S=e(5806),j=e(21324),ue=e(86619),ge=e(19996),me=e(25505),Se=e(38016),qe=e(88013);const ot=(0,B.Z)({input:{}},{name:"CatalogReactEntityLifecyclePicker"}),Ve=o.createElement(me.Z,{fontSize:"small"}),Je=o.createElement(ge.Z,{fontSize:"small"}),ht=()=>{var Pe,Be;const A=ot(),{updateFilters:T,backendEntities:F,filters:w,queryParameters:{lifecycles:K}}=it(),G=(0,o.useMemo)(()=>[K].flat().filter(Boolean),[K]),[he,pe]=(0,o.useState)(G.length?G:(Be=(Pe=w.lifecycles)==null?void 0:Pe.values)!=null?Be:[]);(0,o.useEffect)(()=>{G.length&&pe(G)},[G]),(0,o.useEffect)(()=>{T({lifecycles:he.length?new ye(he):void 0})},[he,T]);const Ne=(0,o.useMemo)(()=>[...new Set(F.map(We=>{var je;return(je=We.spec)==null?void 0:je.lifecycle}).filter(Boolean))].sort(),[F]);return Ne.length?o.createElement(R.Z,{pb:1,pt:1},o.createElement(C.Z,{variant:"button"},"Lifecycle"),o.createElement(qe.ZP,{"aria-label":"Lifecycle",multiple:!0,options:Ne,value:he,onChange:(We,je)=>pe(je),renderOption:(We,{selected:je})=>o.createElement(S.Z,{control:o.createElement(j.Z,{icon:Ve,checkedIcon:Je,checked:je}),label:We}),size:"small",popupIcon:o.createElement(Se.Z,{"data-testid":"lifecycle-picker-expand"}),renderInput:We=>o.createElement(ue.Z,{...We,className:A.input,variant:"outlined"})})):null},st=(0,B.Z)({input:{}},{name:"CatalogReactEntityOwnerPicker"}),Ue=o.createElement(me.Z,{fontSize:"small"}),N=o.createElement(ge.Z,{fontSize:"small"}),y=()=>{var Pe,Be;const A=st(),{updateFilters:T,backendEntities:F,filters:w,queryParameters:{owners:K}}=it(),G=(0,o.useMemo)(()=>[K].flat().filter(Boolean),[K]),[he,pe]=(0,o.useState)(G.length?G:(Be=(Pe=w.owners)==null?void 0:Pe.values)!=null?Be:[]);(0,o.useEffect)(()=>{G.length&&pe(G)},[G]),(0,o.useEffect)(()=>{T({owners:he.length?new se(he):void 0})},[he,T]);const Ne=(0,o.useMemo)(()=>[...new Set(F.flatMap(We=>Qe(We,xe.S4).map(je=>lt(je,{defaultKind:"group"}))).filter(Boolean))].sort(),[F]);return Ne.length?o.createElement(R.Z,{pb:1,pt:1},o.createElement(C.Z,{variant:"button"},"Owner"),o.createElement(qe.ZP,{multiple:!0,"aria-label":"Owner",options:Ne,value:he,onChange:(We,je)=>pe(je),renderOption:(We,{selected:je})=>o.createElement(S.Z,{control:o.createElement(j.Z,{icon:Ue,checkedIcon:N,checked:je}),label:We}),size:"small",popupIcon:o.createElement(Se.Z,{"data-testid":"owner-picker-expand"}),renderInput:We=>o.createElement(ue.Z,{...We,className:A.input,variant:"outlined"})})):null},x=(0,B.Z)(A=>({searchToolbar:{paddingLeft:0,paddingRight:0},input:{}}),{name:"CatalogReactEntitySearchBar"}),H=()=>{var G,he;const A=x(),{filters:T,updateFilters:F}=useEntityList(),[w,K]=useState((he=(G=T.text)==null?void 0:G.value)!=null?he:"");return useDebounce(()=>{F({text:w.length?new EntityTextFilter(w):void 0})},250,[w,F]),React.createElement(Toolbar,{className:A.searchToolbar},React.createElement(FormControl,null,React.createElement(Input,{"aria-label":"search",id:"input-with-icon-adornment",className:A.input,placeholder:"Search",autoComplete:"off",onChange:pe=>K(pe.target.value),value:w,startAdornment:React.createElement(InputAdornment,{position:"start"},React.createElement(Search,null)),endAdornment:React.createElement(InputAdornment,{position:"end"},React.createElement(IconButton,{"aria-label":"clear search",onClick:()=>K(""),edge:"end",disabled:w.length===0},React.createElement(Clear,null)))})))},k=Object.freeze({createEntityRefColumn(A){const{defaultKind:T}=A;function F(w){var K;return((K=w.metadata)==null?void 0:K.title)||lt(w,{defaultKind:T})}return{title:"Name",highlight:!0,customFilterAndSearch(w,K){return F(K).includes(w)},customSort(w,K){return F(w).localeCompare(F(K))},render:w=>{var K;return o.createElement(ct,{entityRef:w,defaultKind:T,title:(K=w.metadata)==null?void 0:K.title})}}},createEntityRelationColumn({title:A,relation:T,defaultKind:F,filter:w}){function K(he){return Qe(he,T,w)}function G(he){return K(he).map(pe=>lt(pe,{defaultKind:F})).join(", ")}return{title:A,customFilterAndSearch(he,pe){return G(pe).includes(he)},customSort(he,pe){return G(he).localeCompare(G(pe))},render:he=>o.createElement(Et,{entityRefs:K(he),defaultKind:F})}},createOwnerColumn(){return this.createEntityRelationColumn({title:"Owner",relation:xe.S4,defaultKind:"group"})},createDomainColumn(){return this.createEntityRelationColumn({title:"Domain",relation:xe.cz,defaultKind:"domain",filter:{kind:"domain"}})},createSystemColumn(){return this.createEntityRelationColumn({title:"System",relation:xe.cz,defaultKind:"system",filter:{kind:"system"}})},createMetadataDescriptionColumn(){return{title:"Description",field:"metadata.description",render:A=>o.createElement(ke.OverflowTooltip,{text:A.metadata.description,placement:"bottom-start",line:2}),width:"auto"}},createSpecLifecycleColumn(){return{title:"Lifecycle",field:"spec.lifecycle"}},createSpecTypeColumn(){return{title:"Type",field:"spec.type"}}}),Oe=[k.createEntityRefColumn({defaultKind:"system"}),k.createDomainColumn(),k.createOwnerColumn(),k.createMetadataDescriptionColumn()],Ae=[k.createEntityRefColumn({defaultKind:"component"}),k.createSystemColumn(),k.createOwnerColumn(),k.createSpecTypeColumn(),k.createSpecLifecycleColumn(),k.createMetadataDescriptionColumn()],Ie=(0,B.Z)(A=>({empty:{padding:A.spacing(2),display:"flex",justifyContent:"center"}})),He=A=>{const{entities:T,title:F,emptyContent:w,variant:K="gridItem",columns:G}=A,he=Ie(),pe={minWidth:"0",width:"100%"};return K==="gridItem"&&(pe.height="calc(100% - 10px)"),o.createElement(ke.Table,{columns:G,title:F,style:pe,emptyContent:w&&o.createElement("div",{className:he.empty},w),options:{search:!1,paging:!1,actionsColumnIndex:-1,padding:"dense"},data:T})};He.columns=k,He.systemEntityColumns=Oe,He.componentEntityColumns=Ae;const ft=(0,B.Z)({input:{}},{name:"CatalogReactEntityTagPicker"}),Ht=o.createElement(me.Z,{fontSize:"small"}),qt=o.createElement(ge.Z,{fontSize:"small"}),Mn=()=>{var Pe,Be;const A=ft(),{updateFilters:T,filters:F,queryParameters:{tags:w}}=it(),K=(0,t.useApi)(l),{value:G}=(0,yt.default)(async()=>{var At;const We="metadata.tags",{facets:je}=await K.getEntityFacets({facets:[We],filter:(At=F.kind)==null?void 0:At.getCatalogFilters()});return je[We].map(({value:et})=>et)},[F.kind]),he=(0,o.useMemo)(()=>[w].flat().filter(Boolean),[w]),[pe,Ne]=(0,o.useState)(he.length?he:(Be=(Pe=F.tags)==null?void 0:Pe.values)!=null?Be:[]);return(0,o.useEffect)(()=>{he.length&&Ne(he)},[he]),(0,o.useEffect)(()=>{T({tags:pe.length?new ne(pe):void 0})},[pe,T]),G!=null&&G.length?o.createElement(R.Z,{pb:1,pt:1},o.createElement(C.Z,{variant:"button"},"Tags"),o.createElement(qe.ZP,{multiple:!0,"aria-label":"Tags",options:G,value:pe,onChange:(We,je)=>Ne(je),renderOption:(We,{selected:je})=>o.createElement(S.Z,{control:o.createElement(j.Z,{icon:Ht,checkedIcon:qt,checked:je}),label:We}),size:"small",popupIcon:o.createElement(Se.Z,{"data-testid":"tag-picker-expand"}),renderInput:We=>o.createElement(ue.Z,{...We,className:A.input,variant:"outlined"})})):null};var Fr=e(82108),pn=e.n(Fr);const Kn=A=>{var Pe;const{hidden:T,initialFilter:F}=A,w=(0,t.useApi)(t.alertApiRef),{error:K,availableTypes:G,selectedTypes:he,setSelectedTypes:pe}=$e();if((0,o.useEffect)(()=>{K&&w.post({message:"Failed to load entity types",severity:"error"}),F&&pe([F])},[K,w,F,pe]),G.length===0||K)return null;const Ne=[{value:"all",label:"All"},...G.map(Be=>({value:Be,label:pn()(Be)}))];return T?null:o.createElement(R.Z,{pb:1,pt:1},o.createElement(ke.Select,{label:"Type",items:Ne,selected:(Pe=Ne.length>1?he[0]:void 0)!=null?Pe:"all",onChange:Be=>pe(Be==="all"?[]:[String(Be)])}))};var Br=e(15459),lr=e(61837),cr=e(11640),Jn=e(28347);const Mr=(0,Br.Z)({root:{color:"#f3ba37"}})(cr.Z),na=A=>{const{toggleStarredEntity:T,isStarredEntity:F}=De(A.entity);return o.createElement(lr.Z,{"aria-label":"favorite",color:"inherit",...A,onClick:()=>T()},o.createElement(Ct.ZP,{title:F?"Remove from favorites":"Add to favorites"},F?o.createElement(Mr,null):o.createElement(Jn.Z,null)))};var ur=e(8629),Sn=e(79249),Zn=e(38724),dr=e(99152),On=e(6487),fr=e(49429),$t=e(55999),Zr=e(72779),Vt=e.n(Zr),$r=e(39412);const Yn=$r.Z;function Nr(A,T){if(A)return A.toLocaleLowerCase("en-US");if(T)try{return(0,xe.of)(T).kind.toLocaleLowerCase("en-US")}catch{return}}function mr(A,T){const F=(0,t.useApp)(),w=Nr(A,T);return w&&F.getSystemIcon(`kind:${w}`)||Yn}function kn(A){const{kind:T,entityRef:F,...w}=A,K=mr(T,F);return o.createElement(K,{...w})}const Qn=(0,B.Z)(A=>({node:{fill:A.palette.grey[300],stroke:A.palette.grey[300],"&.primary":{fill:A.palette.primary.light,stroke:A.palette.primary.light},"&.secondary":{fill:A.palette.secondary.light,stroke:A.palette.secondary.light}},text:{fill:A.palette.getContrastText(A.palette.grey[300]),"&.primary":{fill:A.palette.primary.contrastText},"&.secondary":{fill:A.palette.secondary.contrastText},"&.focused":{fontWeight:"bold"}},clickable:{cursor:"pointer"}}));function Ur(A){const T=(0,t.useApi)(l),F=(0,xe.eE)(A),{loading:w,error:K,value:G}=(0,yt.default)(async()=>{const he=await T.getEntityAncestors({entityRef:F}),pe=new Array,Ne=new Array;for(const Pe of he.items){const Be=(0,xe.eE)(Pe.entity),We=Be===he.rootEntityRef;pe.push({id:Be,root:We,...Pe.entity});for(const je of Pe.parentEntityRefs)Ne.push({from:Be,to:je})}return{nodes:pe,edges:Ne}},[F]);return{loading:w,error:K,nodes:(G==null?void 0:G.nodes)||[],edges:(G==null?void 0:G.edges)||[]}}function wr({node:A}){const T=Qn(),F=(0,Ke.s0)(),w=(0,t.useRouteRef)(Lt),[K,G]=(0,o.useState)(0),[he,pe]=(0,o.useState)(0),Ne=(0,o.useRef)(null);(0,o.useLayoutEffect)(()=>{if(Ne.current){let{height:Tt,width:Mt}=Ne.current.getBBox();Tt=Math.round(Tt),Mt=Math.round(Mt),(Tt!==he||Mt!==K)&&(G(Mt),pe(Tt))}},[K,he]);const Pe=10,Be=he,We=Be+Pe,je=We+K+Pe*2,At=he+Pe*2,et=A.metadata.title||(A.kind&&A.metadata.name&&A.metadata.namespace?lt({kind:A.kind,name:A.metadata.name,namespace:A.metadata.namespace||""}):A.id),Ge=()=>{F(w({kind:A.kind,namespace:A.metadata.namespace||xe.zG,name:A.metadata.name}))};return o.createElement("g",{onClick:Ge,className:T.clickable},o.createElement("rect",{className:Vt()(T.node,A.root?"secondary":"primary"),width:je,height:At,rx:10}),o.createElement(kn,{kind:A.kind,y:Pe,x:Pe,width:Be,height:Be,className:Vt()(T.text,A.root?"secondary":"primary")}),o.createElement("text",{ref:Ne,className:Vt()(T.text,A.root?"secondary":"primary"),y:At/2,x:We+(K+Pe*2)/2,textAnchor:"middle",alignmentBaseline:"middle"},et))}function zr(A){const{loading:T,error:F,nodes:w,edges:K}=Ur(A.entity);return T?o.createElement(ke.Progress,null):F?o.createElement(ke.ResponseErrorPanel,{error:F}):o.createElement(o.Fragment,null,o.createElement($t.Z,{variant:"h2"},"Ancestry"),o.createElement($t.Z,{gutterBottom:!0},"This is the ancestry of entities above the current one - as in, the chain(s) of entities down to the current one, where"," ",o.createElement(ke.Link,{to:"https://backstage.io/docs/features/software-catalog/life-of-an-entity"},"processors emitted")," ","child entities that ultimately led to the current one existing. Note that this is a completely different mechanism from relations."),o.createElement(R.Z,{mt:4},o.createElement(ke.DependencyGraph,{nodes:w,edges:K,renderNode:wr,direction:ke.DependencyGraphTypes.Nm.BOTTOM_TOP,zoom:"enable-on-click"})))}var Tn=e(11776),ln=e(38402),$n=e(86136),Yt=e(99688),Nn=e(49378),hr=e(54506),Un=e(94339),Wr=e(24579),gr=e(27685);const wn=(0,B.Z)(A=>({root:{display:"flex",flexDirection:"column"},marginTop:{marginTop:A.spacing(2)},helpIcon:{marginLeft:A.spacing(1),color:A.palette.text.disabled},monospace:{fontFamily:"monospace"}}));function cn(A){const T=wn();return o.createElement(Nn.Z,{...A,primaryTypographyProps:{className:T.monospace},secondaryTypographyProps:{className:T.monospace}})}function Xn(A){const T=wn();return o.createElement(hr.Z,{className:T.monospace},A.children)}function Dn(A){return o.createElement(R.Z,{mt:2},o.createElement(Un.Z,{variant:"outlined"},o.createElement(Wr.Z,null,o.createElement(C.Z,{variant:"h6",gutterBottom:!0},A.title,A.helpLink&&o.createElement(pr,{to:A.helpLink})),A.children)))}function qn(A){const[T,F]=A.entry;return o.createElement(ln.Z,null,A.indent&&o.createElement($n.Z,null),o.createElement(cn,{primary:T,secondary:F.match(/^url:https?:\/\//)?o.createElement(o.Fragment,null,F.substring(0,4),o.createElement(ke.Link,{to:F.substring(4)},F.substring(4))):F}))}function pr(A){const T=wn();return o.createElement(ke.Link,{to:A.to,className:T.helpIcon},o.createElement(gr.Z,{fontSize:"inherit"}))}const yr=(0,B.Z)({root:{display:"flex",flexDirection:"column"}});function Er(A){var Ne,Pe;const T=(0,t.useApi)(l),F=(0,xe.eE)(A),w=(Ne=A.metadata.annotations)==null?void 0:Ne[xe.P1],K=(Pe=A.metadata.annotations)==null?void 0:Pe[xe.q1],{loading:G,error:he,value:pe}=(0,yt.default)(async()=>!w&&!K?[]:(await T.getEntities({filter:[...w?[{[`metadata.annotations.${xe.P1}`]:w}]:[],...K?[{[`metadata.annotations.${xe.q1}`]:K}]:[]]})).items,[w,K]);return{loading:G,error:he,location:w,originLocation:K,colocatedEntities:pe==null?void 0:pe.filter(Be=>(0,xe.eE)(Be)!==F)}}function zn(A){return o.createElement(Tn.Z,{dense:!0},A.header&&o.createElement(qn,{key:"header",entry:A.header}),A.entities.map(T=>o.createElement(ln.Z,{key:(0,xe.eE)(T)},o.createElement($n.Z,null,o.createElement(kn,{kind:T.kind})),o.createElement(cn,{primary:o.createElement(ct,{entityRef:T})}))))}function vr(A){const{entity:T}=A,{loading:F,error:w,location:K,originLocation:G,colocatedEntities:he}=Er(T);if(F)return o.createElement(ke.Progress,null);if(w)return o.createElement(ke.ResponseErrorPanel,{error:w});if(!K&&!G)return o.createElement(Yt.Z,{severity:"warning"},"Entity had no location information.");if(!(he!=null&&he.length))return o.createElement(Yt.Z,{severity:"info"},"There were no other entities on this location.");if(K===G)return o.createElement(zn,{entities:he});const pe=he.filter(Pe=>{var Be;return((Be=Pe.metadata.annotations)==null?void 0:Be[xe.P1])===K}),Ne=he.filter(Pe=>{var Be;return((Be=Pe.metadata.annotations)==null?void 0:Be[xe.q1])===G});return o.createElement(o.Fragment,null,pe.length>0&&o.createElement(zn,{entities:pe,header:["At the same location",K]}),Ne.length>0&&o.createElement(zn,{entities:Ne,header:["At the same origin",G]}))}function Ar(A){const T=yr();return o.createElement(o.Fragment,null,o.createElement($t.Z,{variant:"h2"},"Colocated"),o.createElement($t.Z,null,"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)."),o.createElement("div",{className:T.root},o.createElement(vr,{entity:A.entity})))}function _n(A){return Object.fromEntries([...Object.entries(A)].sort((T,F)=>T[0]<F[0]?-1:1))}function Rr(A){return o.createElement(o.Fragment,null,o.createElement($t.Z,{variant:"h2"},"Entity as JSON"),o.createElement($t.Z,null,"This is the raw entity data as received from the catalog, on JSON form."),o.createElement($t.Z,null,o.createElement("div",{style:{fontSize:"75%"},"data-testid":"code-snippet"},o.createElement(ke.CodeSnippet,{text:JSON.stringify(_n(A.entity),void 0,2),language:"json",showCopyCodeButton:!0}))))}var Wn=e(3440),_t=e.n(Wn);const Hn=(0,B.Z)({root:{display:"flex",flexDirection:"column"}});function Kt(A){var Pe,Be;const T=Hn(),{apiVersion:F,kind:w,metadata:K,spec:G,relations:he=[],status:pe={}}=A.entity,Ne=_t()(Bt()(he,We=>We.targetRef),"type");return o.createElement(o.Fragment,null,o.createElement($t.Z,{variant:"h2"},"Overview"),o.createElement("div",{className:T.root},o.createElement(Dn,{title:"Identity"},o.createElement(Tn.Z,{dense:!0},o.createElement(ln.Z,null,o.createElement(cn,{primary:"apiVersion",secondary:F})),o.createElement(ln.Z,null,o.createElement(cn,{primary:"kind",secondary:w})),(G==null?void 0:G.type)&&o.createElement(ln.Z,null,o.createElement(cn,{primary:"spec.type",secondary:G.type})),K.uid&&o.createElement(ln.Z,null,o.createElement(cn,{primary:"uid",secondary:K.uid})),K.etag&&o.createElement(ln.Z,null,o.createElement(cn,{primary:"etag",secondary:K.etag})))),o.createElement(Dn,{title:"Metadata"},!!Object.keys(K.annotations||{}).length&&o.createElement(Tn.Z,{dense:!0,subheader:o.createElement(Xn,null,"Annotations",o.createElement(pr,{to:"https://backstage.io/docs/features/software-catalog/well-known-annotations"}))},Object.entries(K.annotations).map(We=>o.createElement(qn,{key:We[0],indent:!0,entry:We}))),!!Object.keys(K.labels||{}).length&&o.createElement(Tn.Z,{dense:!0,subheader:o.createElement(Xn,null,"Labels")},Object.entries(K.labels).map(We=>o.createElement(qn,{key:We[0],indent:!0,entry:We}))),!!((Pe=K.tags)!=null&&Pe.length)&&o.createElement(Tn.Z,{dense:!0,subheader:o.createElement(Xn,null,"Tags")},K.tags.map((We,je)=>o.createElement(ln.Z,{key:`${We}-${je}`},o.createElement($n.Z,null),o.createElement(cn,{primary:We}))))),!!he.length&&o.createElement(Dn,{title:"Relations",helpLink:"https://backstage.io/docs/features/software-catalog/well-known-relations"},Object.entries(Ne).map(([We,je],At)=>o.createElement("div",{key:At},o.createElement(Tn.Z,{dense:!0,subheader:o.createElement(Xn,null,We)},je.map(et=>o.createElement(ln.Z,{key:et.targetRef},o.createElement($n.Z,null,o.createElement(kn,{entityRef:et.targetRef})),o.createElement(cn,{primary:o.createElement(ct,{entityRef:et.targetRef})}))))))),!!((Be=pe.items)!=null&&Be.length)&&o.createElement(Dn,{title:"Status",helpLink:"https://backstage.io/docs/features/software-catalog/well-known-statuses"},pe.items.map((We,je)=>o.createElement("div",{key:je},o.createElement(C.Z,null,We.level,": ",We.type),o.createElement(R.Z,{ml:2},We.message))))))}var un=e(60155),Cr=e.n(un);function Sr(A){return o.createElement(o.Fragment,null,o.createElement($t.Z,{variant:"h2"},"Entity as YAML"),o.createElement($t.Z,null,"This is the raw entity data as received from the catalog, on YAML form."),o.createElement($t.Z,null,o.createElement("div",{style:{fontSize:"75%"},"data-testid":"code-snippet"},o.createElement(ke.CodeSnippet,{text:Cr().stringify(_n(A.entity)),language:"yaml",showCopyCodeButton:!0}))))}const er=(0,B.Z)(A=>({fullHeightDialog:{height:"calc(100% - 64px)"},root:{display:"flex",flexGrow:1,width:"100%",backgroundColor:A.palette.background.paper},tabs:{borderRight:`1px solid ${A.palette.divider}`,flexShrink:0},tabContents:{flexGrow:1,overflowX:"auto"}}));function Pn(A){const{children:T,value:F,index:w,...K}=A,G=er();return o.createElement("div",{role:"tabpanel",hidden:F!==w,id:`vertical-tabpanel-${w}`,"aria-labelledby":`vertical-tab-${w}`,className:G.tabContents,...K},F===w&&o.createElement(R.Z,{pl:3,pr:3},T))}function bn(A){return{id:`vertical-tab-${A}`,"aria-controls":`vertical-tabpanel-${A}`}}function Tr(A){const T=er(),[F,w]=o.useState(0);return(0,o.useEffect)(()=>{w(0)},[A.open]),A.entity?o.createElement(ur.Z,{fullWidth:!0,maxWidth:"xl",open:A.open,onClose:A.onClose,"aria-labelledby":"entity-inspector-dialog-title",PaperProps:{className:T.fullHeightDialog}},o.createElement(Sn.Z,{id:"entity-inspector-dialog-title"},"Entity Inspector"),o.createElement(Zn.Z,{dividers:!0},o.createElement("div",{className:T.root},o.createElement(dr.Z,{orientation:"vertical",variant:"scrollable",value:F,onChange:(K,G)=>w(G),"aria-label":"Inspector options",className:T.tabs},o.createElement(On.Z,{label:"Overview",...bn(0)}),o.createElement(On.Z,{label:"Ancestry",...bn(1)}),o.createElement(On.Z,{label:"Colocated",...bn(2)}),o.createElement(On.Z,{label:"Raw JSON",...bn(3)}),o.createElement(On.Z,{label:"Raw YAML",...bn(4)})),o.createElement(Pn,{value:F,index:0},o.createElement(Kt,{entity:A.entity})),o.createElement(Pn,{value:F,index:1},o.createElement(zr,{entity:A.entity})),o.createElement(Pn,{value:F,index:2},o.createElement(Ar,{entity:A.entity})),o.createElement(Pn,{value:F,index:3},o.createElement(Rr,{entity:A.entity})),o.createElement(Pn,{value:F,index:4},o.createElement(Sr,{entity:A.entity})))),o.createElement(fr.Z,null,o.createElement(h.Z,{onClick:A.onClose,color:"primary"},"Close"))):null}var Pr=e(85256);function tr(A){var At;const T=(0,t.useApi)(l),F=(At=A.metadata.annotations)==null?void 0:At[xe.q1],w=A.metadata.uid,K=F==="bootstrap:bootstrap",G=(0,yt.default)(async()=>{const et=T.getLocationByRef(F);let Ge;if(!F)Ge=Promise.resolve([]);else{const Tt=`metadata.annotations.${xe.q1}`;Ge=T.getEntities({filter:{[Tt]:F},fields:["kind","metadata.uid","metadata.name","metadata.namespace"]}).then(Mt=>Mt.items)}return Promise.all([et,Ge]).then(([Tt,Mt])=>({location:Tt,colocatedEntities:Mt}))},[T,A]),he=(0,o.useCallback)(async function(){const{location:Ge,colocatedEntities:Tt}=G.value;await T.removeLocationById(Ge.id),await Promise.allSettled(Tt.map(Mt=>T.removeEntityByUid(Mt.metadata.uid)))},[T,G]),pe=(0,o.useCallback)(async function(){await T.removeEntityByUid(w)},[T,w]);if(K)return{type:"bootstrap",location:F,deleteEntity:pe};const{loading:Ne,error:Pe,value:Be}=G;if(Ne)return{type:"loading"};if(Pe)return{type:"error",error:Pe};const{location:We,colocatedEntities:je}=Be;return We?{type:"unregister",location:F,colocatedEntities:je.map(xe.iB),unregisterLocation:he,deleteEntity:pe}:{type:"only-delete",deleteEntity:pe}}var Rn=e(10179);const Hr=(0,B.Z)({advancedButton:{fontSize:"0.7em"}}),br=({entity:A,onConfirm:T})=>{var At;const F=(0,t.useApi)(t.alertApiRef),w=(0,t.useApi)(t.configApiRef),K=Hr(),G=tr(A),[he,pe]=(0,o.useState)(!1),[Ne,Pe]=(0,o.useState)(!1),Be=(At=w.getOptionalString("app.title"))!=null?At:"Backstage",We=(0,o.useCallback)(async function(){if("unregisterLocation"in G){Pe(!0);try{await G.unregisterLocation(),T()}catch(Ge){(0,Rn.BD)(Ge),F.post({message:Ge.message})}finally{Pe(!1)}}},[F,T,G]),je=(0,o.useCallback)(async function(){if("deleteEntity"in G){Pe(!0);try{await G.deleteEntity(),T()}catch(Ge){(0,Rn.BD)(Ge),F.post({message:Ge.message})}finally{Pe(!1)}}},[F,T,G]);return G.type==="loading"?o.createElement(ke.Progress,null):G.type==="error"?o.createElement(ke.ResponseErrorPanel,{error:G.error}):G.type==="bootstrap"?o.createElement(o.Fragment,null,o.createElement(Yt.Z,{severity:"info"},'You cannot unregister this entity, since it originates from a protected Backstage configuration (location "',G.location,'"). If you believe this is in error, please contact the ',Be," ","integrator."),o.createElement(R.Z,{marginTop:2},!he&&o.createElement(h.Z,{variant:"text",size:"small",color:"primary",className:K.advancedButton,onClick:()=>pe(!0)},"Advanced Options"),he&&o.createElement(o.Fragment,null,o.createElement($t.Z,null,"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."),o.createElement(h.Z,{variant:"contained",color:"secondary",disabled:Ne,onClick:je},"Delete Entity")))):G.type==="only-delete"?o.createElement(o.Fragment,null,o.createElement($t.Z,null,"This entity does not seem to originate from a registered location. You therefore only have the option to delete it outright from the catalog."),o.createElement(h.Z,{variant:"contained",color:"secondary",disabled:Ne,onClick:je},"Delete Entity")):G.type==="unregister"?o.createElement(o.Fragment,null,o.createElement($t.Z,null,"This action will unregister the following entities:"),o.createElement($t.Z,{component:"ul"},G.colocatedEntities.map(et=>o.createElement("li",{key:`${et.kind}:${et.namespace}/${et.name}`},o.createElement(ct,{entityRef:et})))),o.createElement($t.Z,null,"Located at the following location:"),o.createElement($t.Z,{component:"ul"},o.createElement("li",null,G.location)),o.createElement($t.Z,null,"To undo, just re-register the entity in ",Be,"."),o.createElement(R.Z,{marginTop:2},o.createElement(h.Z,{variant:"contained",color:"secondary",disabled:Ne,onClick:We},"Unregister Location"),!he&&o.createElement(R.Z,{component:"span",marginLeft:2},o.createElement(h.Z,{variant:"text",size:"small",color:"primary",className:K.advancedButton,onClick:()=>pe(!0)},"Advanced Options"))),he&&o.createElement(o.Fragment,null,o.createElement(R.Z,{paddingTop:4,paddingBottom:4},o.createElement(Pr.Z,null)),o.createElement($t.Z,null,"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."),o.createElement(h.Z,{variant:"contained",color:"secondary",disabled:Ne,onClick:je},"Delete Entity"))):o.createElement(Yt.Z,{severity:"error"},"Internal error: Unknown state")},nr=A=>{const{open:T,onConfirm:F,onClose:w,entity:K}=A;return o.createElement(ur.Z,{open:T,onClose:w},o.createElement(Sn.Z,{id:"responsive-dialog-title"},"Are you sure you want to unregister this entity?"),o.createElement(Zn.Z,null,o.createElement(br,{entity:K,onConfirm:F})),o.createElement(fr.Z,null,o.createElement(h.Z,{onClick:w,color:"primary"},"Cancel")))};var Vr=e(12231),jr=e(9520),O=e(47603);const ee=(0,B.Z)(A=>({root:{backgroundColor:"rgba(0, 0, 0, .11)",boxShadow:"none",margin:A.spacing(1,0,1,0)},title:{margin:A.spacing(1,0,0,1),textTransform:"uppercase",fontSize:12,fontWeight:"bold"},listIcon:{minWidth:30,color:A.palette.text.primary},menuItem:{minHeight:A.spacing(6)},groupWrapper:{margin:A.spacing(1,1,2,1)}}),{name:"CatalogReactUserListPicker"});function de(A){return[{name:"Personal",items:[{id:"owned",label:"Owned",icon:O.Z},{id:"starred",label:"Starred",icon:cr.Z}]},{name:A!=null?A:"Company",items:[{id:"all",label:"All"}]}]}const Me=A=>{var In;const{initialFilter:T,availableFilters:F}=A,w=ee(),G=(In=(0,t.useApi)(t.configApiRef).getOptionalString("organization.name"))!=null?In:"Company",{filters:he,updateFilters:pe,backendEntities:Ne,queryParameters:{kind:Pe,user:Be},loading:We}=it(),je=["starred","all"],At=de(G).map(nn=>({...nn,items:nn.items.filter(({id:rn})=>["group","user"].some(Lr=>Lr===Pe)?je.includes(rn):!F||F.includes(rn))})).filter(({items:nn})=>!!nn.length),{isStarredEntity:et}=ie(),{isOwnedEntity:Ge,loading:Tt}=Ee(),Mt=We||Tt,yn=(0,o.useMemo)(()=>new Ze("owned",Ge,et),[Ge,et]),wt=(0,o.useMemo)(()=>new Ze("starred",Ge,et),[Ge,et]),kt=(0,o.useMemo)(()=>[Be].flat()[0],[Be]),[en,dn]=(0,o.useState)(kt!=null?kt:T),rr=(0,o.useMemo)(()=>Ne.filter(gt((0,Le.compact)(Object.values({...he,user:void 0})))),[he,Ne]),Ir=(0,o.useMemo)(()=>({all:rr.length,starred:rr.filter(nn=>wt.filterEntity(nn)).length,owned:rr.filter(nn=>yn.filterEntity(nn)).length}),[rr,wt,yn]);return(0,o.useEffect)(()=>{kt&&dn(kt)},[kt]),(0,o.useEffect)(()=>{!Mt&&!!en&&en!=="all"&&Ir[en]===0&&dn("all")},[Mt,Ir,en,dn]),(0,o.useEffect)(()=>{pe({user:en?new Ze(en,Ge,et):void 0})},[en,Ge,et,pe]),o.createElement(Un.Z,{className:w.root},At.map(nn=>o.createElement(o.Fragment,{key:nn.name},o.createElement(C.Z,{variant:"subtitle2",className:w.title},nn.name),o.createElement(Un.Z,{className:w.groupWrapper},o.createElement(Tn.Z,{disablePadding:!0,dense:!0},nn.items.map(rn=>{var Lr,ra;return o.createElement(Vr.Z,{key:rn.id,button:!0,divider:!0,onClick:()=>dn(rn.id),selected:rn.id===((Lr=he.user)==null?void 0:Lr.value),className:w.menuItem,disabled:Ir[rn.id]===0,"data-testid":`user-picker-${rn.id}`},rn.icon&&o.createElement($n.Z,{className:w.listIcon},o.createElement(rn.icon,{fontSize:"small"})),o.createElement(Nn.Z,null,o.createElement(C.Z,{variant:"body1"},rn.label)),o.createElement(jr.Z,null,(ra=Ir[rn.id])!=null?ra:"-"))}))))))},Xe=({children:A,value:T})=>{var pe;const[F,w]=useState((pe=T==null?void 0:T.filters)!=null?pe:{}),K=useCallback(Ne=>{w(Pe=>{const Be=typeof Ne=="function"?Ne(Pe):Ne;return{...Pe,...Be}})},[]),G=useMemo(()=>({entities:[],backendEntities:[],queryParameters:{}}),[]),he=useMemo(()=>{var Ne,Pe,Be,We,je;return{entities:(Ne=T==null?void 0:T.entities)!=null?Ne:G.entities,backendEntities:(Pe=T==null?void 0:T.backendEntities)!=null?Pe:G.backendEntities,updateFilters:(Be=T==null?void 0:T.updateFilters)!=null?Be:K,filters:F,loading:(We=T==null?void 0:T.loading)!=null?We:!1,queryParameters:(je=T==null?void 0:T.queryParameters)!=null?je:G.queryParameters,error:T==null?void 0:T.error}},[T,G,F,K]);return React.createElement(EntityListContext.Provider,{value:he},A)}},39398:function(_,s,e){"use strict";e.r(s),e.d(s,{AboutCard:function(){return Le},AboutContent:function(){return oe},AboutField:function(){return W}});var r=e(48023),t=e(9118),l=e(36964),f=e(36356),E=e(53479),i=e(79692),o=e(94339),m=e(32552),u=e(61837),h=e(85256),g=e(24579),R=e(52866),C=e(30254),M=e(27604),b=e(2784),Q=e(47851),I=e(60905),P=e(90436),L=e(7089);const z=(0,i.Z)(we=>({value:{fontWeight:"bold",overflow:"hidden",lineHeight:"24px",wordBreak:"break-word"},label:{color:we.palette.text.secondary,textTransform:"uppercase",fontSize:"10px",fontWeight:"bold",letterSpacing:.5,overflow:"hidden",whiteSpace:"nowrap"}}));function W(we){const{label:fe,value:Ke,gridSizes:_e,children:ut}=we,rt=z(),at=(0,l.useElementFilter)(ut,xe=>xe.getElements()),gt=at.length>0?at:b.createElement(P.Z,{variant:"body2",className:rt.value},Ke||"unknown");return b.createElement(I.Z,{item:!0,..._e},b.createElement(P.Z,{variant:"subtitle2",className:rt.label},fe),gt)}const q=(0,i.Z)({description:{wordBreak:"break-word"}});function oe(we){var it,yt,It,Pt,Zt,Bt;const{entity:fe}=we,Ke=q(),_e=fe.kind.toLocaleLowerCase("en-US")==="system",ut=fe.kind.toLocaleLowerCase("en-US")==="resource",rt=fe.kind.toLocaleLowerCase("en-US")==="component",at=fe.kind.toLocaleLowerCase("en-US")==="api",gt=fe.kind.toLocaleLowerCase("en-US")==="template",xe=fe.kind.toLocaleLowerCase("en-US")==="location",Qe=fe.kind.toLocaleLowerCase("en-US")==="group",Ye=(0,E.getEntityRelations)(fe,r.cz,{kind:"system"}),Rt=(0,E.getEntityRelations)(fe,r.cz,{kind:"component"}),pt=(0,E.getEntityRelations)(fe,r.cz,{kind:"domain"}),St=(0,E.getEntityRelations)(fe,r.S4);return b.createElement(I.Z,{container:!0},b.createElement(W,{label:"Description",gridSizes:{xs:12}},b.createElement(P.Z,{variant:"body2",paragraph:!0,className:Ke.description},((it=fe==null?void 0:fe.metadata)==null?void 0:it.description)||"No description")),b.createElement(W,{label:"Owner",value:"No Owner",gridSizes:{xs:12,sm:6,lg:4}},St.length>0&&b.createElement(E.EntityRefLinks,{entityRefs:St,defaultKind:"group"})),(_e||pt.length>0)&&b.createElement(W,{label:"Domain",value:"No Domain",gridSizes:{xs:12,sm:6,lg:4}},pt.length>0&&b.createElement(E.EntityRefLinks,{entityRefs:pt,defaultKind:"domain"})),(at||rt||ut||Ye.length>0)&&b.createElement(W,{label:"System",value:"No System",gridSizes:{xs:12,sm:6,lg:4}},Ye.length>0&&b.createElement(E.EntityRefLinks,{entityRefs:Ye,defaultKind:"system"})),rt&&Rt.length>0&&b.createElement(W,{label:"Parent Component",value:"No Parent Component",gridSizes:{xs:12,sm:6,lg:4}},b.createElement(E.EntityRefLinks,{entityRefs:Rt,defaultKind:"component"})),(at||rt||ut||gt||Qe||xe||typeof((yt=fe==null?void 0:fe.spec)==null?void 0:yt.type)=="string")&&b.createElement(W,{label:"Type",value:(It=fe==null?void 0:fe.spec)==null?void 0:It.type,gridSizes:{xs:12,sm:6,lg:4}}),(at||rt||typeof((Pt=fe==null?void 0:fe.spec)==null?void 0:Pt.lifecycle)=="string")&&b.createElement(W,{label:"Lifecycle",value:(Zt=fe==null?void 0:fe.spec)==null?void 0:Zt.lifecycle,gridSizes:{xs:12,sm:6,lg:4}}),b.createElement(W,{label:"Tags",value:"No Tags",gridSizes:{xs:12,sm:6,lg:4}},(((Bt=fe==null?void 0:fe.metadata)==null?void 0:Bt.tags)||[]).map(Lt=>b.createElement(L.Z,{key:Lt,size:"small",label:Lt}))))}const ve=(0,i.Z)({gridItemCard:{display:"flex",flexDirection:"column",height:"calc(100% - 10px)",marginBottom:"10px"},fullHeightCard:{display:"flex",flexDirection:"column",height:"100%"},gridItemCardContent:{flex:1},fullHeightCardContent:{flex:1}});function Le(we){var Pt,Zt,Bt;const{variant:fe}=we,Ke=ve(),{entity:_e}=(0,E.useEntity)(),ut=(0,l.useApi)(f.q3),rt=(0,l.useApi)(E.catalogApiRef),at=(0,l.useApi)(l.alertApiRef),gt=(0,l.useRouteRef)(Q.jU),xe=(0,E.getEntitySourceLocation)(_e,ut),Qe=(Pt=_e.metadata.annotations)==null?void 0:Pt[r.Tf],Ye={label:"View Source",disabled:!xe,icon:b.createElement(f.nW,{type:xe==null?void 0:xe.integrationType}),href:xe==null?void 0:xe.locationTargetUrl},Rt={label:"View TechDocs",disabled:!((Zt=_e.metadata.annotations)!=null&&Zt["backstage.io/techdocs-ref"])||!gt,icon:b.createElement(C.Z,null),href:gt&>({namespace:_e.metadata.namespace||r.zG,kind:_e.kind,name:_e.metadata.name})};let pt="";fe==="gridItem"?pt=Ke.gridItemCard:fe==="fullHeight"&&(pt=Ke.fullHeightCard);let St="";fe==="gridItem"?St=Ke.gridItemCardContent:fe==="fullHeight"&&(St=Ke.fullHeightCardContent);const it=(Bt=_e.metadata.annotations)==null?void 0:Bt[r.P1],yt=(it==null?void 0:it.startsWith("url:"))||(it==null?void 0:it.startsWith("file:")),It=(0,b.useCallback)(async()=>{await rt.refreshEntity((0,r.eE)(_e)),at.post({message:"Refresh scheduled",severity:"info"})},[rt,at,_e]);return b.createElement(o.Z,{className:pt},b.createElement(m.Z,{title:"About",action:b.createElement(b.Fragment,null,yt&&b.createElement(u.Z,{"aria-label":"Refresh",title:"Schedule entity refresh",onClick:It},b.createElement(R.Z,null)),b.createElement(u.Z,{component:t.Link,"aria-label":"Edit",disabled:!Qe,title:"Edit Metadata",to:Qe!=null?Qe:"#"},b.createElement(M.Z,null))),subheader:b.createElement(t.HeaderIconLinkRow,{links:[Ye,Rt]})}),b.createElement(h.Z,null),b.createElement(g.Z,{className:St},b.createElement(oe,{entity:_e})))}},49782:function(_,s,e){"use strict";e.d(s,{K:function(){return R}});var r=e(2784),t=e(79692),l=e(12420),f=e(97580),E=e(73698),i=e(74603),o=e(12231),m=e(53479),u=e(64279),h=e(36964);const g=(0,t.Z)(C=>(0,l.Z)({root:{...C.typography.h4}}));function R(C){var we;const{initialFilter:M="component",allowedKinds:b}=C,Q=g(),I=(0,h.useApi)(m.catalogApiRef),{value:P}=(0,u.default)(async()=>await I.getEntityFacets({facets:["kind"]}).then(fe=>{var Ke;return((Ke=fe.facets.kind)==null?void 0:Ke.map(_e=>_e.value).sort())||[]})),{updateFilters:L,queryParameters:{kind:z}}=(0,m.useEntityList)(),W=(0,r.useMemo)(()=>{var fe;return(fe=[z].flat()[0])==null?void 0:fe.toLocaleLowerCase("en-US")},[z]),[q,oe]=(0,r.useState)(W!=null?W:M);(0,r.useEffect)(()=>{L({kind:q?new m.EntityKindFilter(q):void 0})},[q,L]),(0,r.useEffect)(()=>{W&&oe(W)},[W]);const Le=[(0,f.Z)(q)].concat((we=P==null?void 0:P.filter(fe=>b?b.some(Ke=>Ke.toLocaleLowerCase("en-US")===fe.toLocaleLowerCase("en-US")):!0))!=null?we:[]).sort().reduce((fe,Ke)=>(fe[Ke.toLocaleLowerCase("en-US")]=Ke,fe),{});return r.createElement(E.Z,{input:r.createElement(i.Z,{value:q}),value:q,onChange:fe=>oe(fe.target.value),classes:Q},Object.keys(Le).map(fe=>r.createElement(o.Z,{value:fe,key:fe},`${Le[fe]}s`)))}},30097:function(_,s,e){"use strict";e.d(s,{E:function(){return M}});var r=e(48023),t=e(53479),l=e(27604),f=e(2997),E=e(76635),i=e(2784),o=e(7089),m=e(9118);const u=Object.freeze({createNameColumn(b){function Q(I){var P;return((P=I.metadata)==null?void 0:P.title)||(0,t.humanizeEntityRef)(I,{defaultKind:b==null?void 0:b.defaultKind})}return{title:"Name",field:"resolved.name",highlight:!0,customSort({entity:I},{entity:P}){return Q(I).localeCompare(Q(P))},render:({entity:I})=>{var P;return i.createElement(t.EntityRefLink,{entityRef:I,defaultKind:(b==null?void 0:b.defaultKind)||"Component",title:(P=I.metadata)==null?void 0:P.title})}}},createSystemColumn(){return{title:"System",field:"resolved.partOfSystemRelationTitle",render:({resolved:b})=>i.createElement(t.EntityRefLinks,{entityRefs:b.partOfSystemRelations,defaultKind:"system"})}},createOwnerColumn(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:b})=>i.createElement(t.EntityRefLinks,{entityRefs:b.ownedByRelations,defaultKind:"group"})}},createSpecTypeColumn(){return{title:"Type",field:"entity.spec.type",hidden:!0}},createSpecLifecycleColumn(){return{title:"Lifecycle",field:"entity.spec.lifecycle"}},createMetadataDescriptionColumn(){return{title:"Description",field:"entity.metadata.description",render:({entity:b})=>i.createElement(m.OverflowTooltip,{text:b.metadata.description,placement:"bottom-start"}),width:"auto"}},createTagsColumn(){return{title:"Tags",field:"entity.metadata.tags",cellStyle:{padding:"0px 16px 0px 20px"},render:({entity:b})=>i.createElement(i.Fragment,null,b.metadata.tags&&b.metadata.tags.map(Q=>i.createElement(o.Z,{key:Q,label:Q,size:"small",variant:"outlined",style:{marginBottom:"0px"}})))}}});var h=e(28347),g=e(15459),R=e(11640);const C=(0,g.Z)({root:{color:"#f3ba37"}})(R.Z),M=b=>{var at,gt,xe;const{columns:Q,actions:I,tableOptions:P}=b,{isStarredEntity:L,toggleStarredEntity:z}=(0,t.useStarredEntities)(),{loading:W,error:q,entities:oe,filters:ve}=(0,t.useEntityList)(),Le=(0,i.useMemo)(()=>{var Ye;return[u.createNameColumn({defaultKind:(Ye=ve.kind)==null?void 0:Ye.value}),...Qe(),u.createMetadataDescriptionColumn(),u.createTagsColumn()];function Qe(){var Rt;switch((Rt=ve.kind)==null?void 0:Rt.value){case"user":return[];case"domain":case"system":return[u.createOwnerColumn()];case"group":case"location":case"template":return[u.createSpecTypeColumn()];default:return[u.createSystemColumn(),u.createOwnerColumn(),u.createSpecTypeColumn(),u.createSpecLifecycleColumn()]}}},[(at=ve.kind)==null?void 0:at.value]),we=ve.type===void 0,fe=(0,E.capitalize)((xe=(gt=ve.user)==null?void 0:gt.value)!=null?xe:"all");if(q)return i.createElement("div",null,i.createElement(m.WarningPanel,{severity:"error",title:"Could not fetch catalog entities."},i.createElement(m.CodeSnippet,{language:"text",text:q.toString()})));const Ke=[({entity:Qe})=>{var Rt;const Ye=(Rt=Qe.metadata.annotations)==null?void 0:Rt[r.l2];return{icon:()=>i.createElement(f.Z,{"aria-label":"View",fontSize:"small"}),tooltip:"View",disabled:!Ye,onClick:()=>{!Ye||window.open(Ye,"_blank")}}},({entity:Qe})=>{var Rt;const Ye=(Rt=Qe.metadata.annotations)==null?void 0:Rt[r.Tf];return{icon:()=>i.createElement(l.Z,{"aria-label":"Edit",fontSize:"small"}),tooltip:"Edit",disabled:!Ye,onClick:()=>{!Ye||window.open(Ye,"_blank")}}},({entity:Qe})=>{const Ye=L(Qe);return{cellStyle:{paddingLeft:"1em"},icon:()=>Ye?i.createElement(C,null):i.createElement(h.Z,null),tooltip:Ye?"Remove from favorites":"Add to favorites",onClick:()=>z(Qe)}}],_e=oe.map(Qe=>{const Ye=(0,t.getEntityRelations)(Qe,r.cz,{kind:"system"}),Rt=(0,t.getEntityRelations)(Qe,r.S4);return{entity:Qe,resolved:{name:(0,t.humanizeEntityRef)(Qe,{defaultKind:"Component"}),ownedByRelationsTitle:Rt.map(pt=>(0,t.humanizeEntityRef)(pt,{defaultKind:"group"})).join(", "),ownedByRelations:Rt,partOfSystemRelationTitle:Ye.map(pt=>(0,t.humanizeEntityRef)(pt,{defaultKind:"system"})).join(", "),partOfSystemRelations:Ye}}}),ut=(Q||Le).find(Qe=>Qe.title==="Type");ut&&(ut.hidden=!we);const rt=_e.length>20;return i.createElement(m.Table,{isLoading:W,columns:Q||Le,options:{paging:rt,pageSize:20,actionsColumnIndex:-1,loadingType:"linear",showEmptyDataSourceMessage:!W,padding:"dense",pageSizeOptions:[20,50,100],...P},title:`${fe} (${oe.length})`,data:_e,actions:I||Ke})};M.columns=u},47851:function(_,s,e){"use strict";e.d(s,{_Z:function(){return f},jU:function(){return l},yw:function(){return t}});var r=e(36964);const t=(0,r.createExternalRouteRef)({id:"create-component",optional:!0}),l=(0,r.createExternalRouteRef)({id:"view-techdoc",optional:!0,params:["namespace","kind","name"]}),f=(0,r.createRouteRef)({id:"catalog"})},40749:function(_,s,e){"use strict";e.d(s,{rG:function(){return r},Y2:function(){return Q},J$:function(){return m},g2:function(){return l}});var r;(function(I){const P="DENY";I.DENY=P;const L="ALLOW";I.ALLOW=L;const z="CONDITIONAL";I.CONDITIONAL=z})(r||(r={}));function t(I,P){return I.name===P.name}function l(I,P){return"resourceType"in I?!P||I.resourceType===P:!1}function f(I){return I.attributes.action==="create"}function E(I){return I.attributes.action==="read"}function i(I){return I.attributes.action==="update"}function o(I){return I.attributes.action==="delete"}function m({name:I,attributes:P,resourceType:L}){return L?{type:"resource",name:I,attributes:P,resourceType:L}:{type:"basic",name:I,attributes:P}}var u=e(10179),h=e(96279),g=e.n(h),R=e(9571),C=e(30195);const M=C.z.lazy(()=>C.z.object({rule:C.z.string(),resourceType:C.z.string(),params:C.z.array(C.z.unknown())}).strict().or(C.z.object({anyOf:C.z.array(M).nonempty()}).strict()).or(C.z.object({allOf:C.z.array(M).nonempty()}).strict()).or(C.z.object({not:M}).strict())),b=C.z.object({items:C.z.array(C.z.object({id:C.z.string(),result:C.z.literal(r.ALLOW).or(C.z.literal(r.DENY))}).or(C.z.object({id:C.z.string(),result:C.z.literal(r.CONDITIONAL),conditions:M})))});class Q{constructor(P){ae(this,"enabled");ae(this,"discovery");var L;this.discovery=P.discovery,this.enabled=(L=P.config.getOptionalBoolean("permission.enabled"))!=null?L:!1}async authorize(P,L){if(!this.enabled)return P.map(Le=>({result:r.ALLOW}));const z={items:P.map(Le=>({id:R.Z(),...Le}))},W=await this.discovery.getBaseUrl("permission"),q=await g()(`${W}/authorize`,{method:"POST",body:JSON.stringify(z),headers:{...this.getAuthorizationHeader(L==null?void 0:L.token),"content-type":"application/json"}});if(!q.ok)throw await u.VL.fromResponse(q);const oe=await q.json();this.assertValidResponse(z,oe);const ve=oe.items.reduce((Le,we)=>(Le[we.id]=we,Le),{});return z.items.map(Le=>ve[Le.id])}getAuthorizationHeader(P){return P?{Authorization:`Bearer ${P}`}:{}}assertValidResponse(P,L){const W=b.parse(L).items.map(oe=>oe.id);if(!P.items.every(oe=>W.includes(oe.id)))throw new Error("Unexpected authorization response from permission-backend")}}},68099:function(_,s,e){"use strict";e.d(s,{iM:function(){return E},RV:function(){return l},gI:function(){return o}});var r=e(2784),t=e(36964);const l=(0,t.createApiRef)({id:"plugin.permission.api"});var f=e(40749);class E{constructor(h,g){this.permissionClient=h,this.identityApi=g}static create(h){const{config:g,discovery:R,identity:C}=h,M=new f.Y2({discovery:R,config:g});return new E(M,C)}async authorize(h){return(await this.permissionClient.authorize([h],await this.identityApi.getCredentials()))[0]}}var i=e(49857);function o(u){const h=(0,t.useApi)(l),{data:g,error:R}=(0,i.ZP)(u,async C=>{if((0,f.g2)(C.permission)&&!C.resourceRef)return f.rG.DENY;const{result:M}=await h.authorize(C);return M});return R?{error:R,loading:!1,allowed:!1}:g===void 0?{loading:!0,allowed:!1}:{loading:!1,allowed:g===f.rG.ALLOW}}const m=u=>{const{permission:h,resourceRef:g,errorComponent:R,...C}=u,M=usePermission(isResourcePermission(h)?{permission:h,resourceRef:g}:{permission:h}),b=useApp(),{NotFoundErrorPage:Q}=b.getComponents();let I=R===void 0?React.createElement(Q,null):R;return M.loading?I=null:M.allowed&&(I=u.element),React.createElement(Route,{...C,element:I})}},91512:function(_,s,e){"use strict";e.d(s,{g:function(){return E},w:function(){return i}});var r=e(36964),t=e(10179),l=e(19126),f=e.n(l);const E=(0,r.createApiRef)({id:"plugin.search.queryservice"});class i{constructor(m){ae(this,"discoveryApi");ae(this,"identityApi");this.discoveryApi=m.discoveryApi,this.identityApi=m.identityApi}async query(m){const{token:u}=await this.identityApi.getCredentials(),h=f().stringify(m),g=`${await this.discoveryApi.getBaseUrl("search/query")}?${h}`,R=await fetch(g,{headers:u?{Authorization:`Bearer ${u}`}:{}});if(!R.ok)throw await t.VL.fromResponse(R);return R.json()}}},19941:function(_,s,e){"use strict";e.r(s),e.d(s,{DefaultResultListItem:function(){return h}});var r=e(2784),t=e(38402),l=e(86136),f=e(49378),E=e(95544),i=e(85256),o=e(9118),m=e(15277),u=e.n(m);const h=({result:g,icon:R,secondaryAction:C,lineClamp:M=5})=>r.createElement(o.Link,{to:g.location},r.createElement(t.Z,{alignItems:"center"},R&&r.createElement(l.Z,null,R),r.createElement(f.Z,{primaryTypographyProps:{variant:"h6"},primary:g.title,secondary:r.createElement(u(),{line:M,truncateText:"\u2026",text:g.text,element:"span"})}),C&&r.createElement(E.Z,{alignItems:"flex-end"},C)),r.createElement(i.Z,null))},1795:function(_,s,e){"use strict";e.r(s),e.d(s,{SearchBar:function(){return C},SearchBarBase:function(){return R}});var r=e(2784),t=e(48760),l=e(36964),f=e(50581),E=e(61837),i=e(74603),o=e(21853),m=e(33375),u=e(22313);const h=({children:M})=>{const b=(0,l.useAnalytics)(),{term:Q}=(0,u.Rx)();return(0,r.useEffect)(()=>{Q&&b.captureEvent("search",Q)},[b,Q]),r.createElement(r.Fragment,null,M)},g=()=>(0,r.useContext)(u.ci)!==void 0,R=({onChange:M,onKeyDown:b,onSubmit:Q,debounceTime:I=200,clearButton:P=!0,fullWidth:L=!0,value:z,inputProps:W={},endAdornment:q,...oe})=>{const ve=(0,l.useApi)(l.configApiRef),[Le,we]=(0,r.useState)(z),fe=g();(0,r.useEffect)(()=>{we(Qe=>Qe!==z?z:Qe)},[z]),(0,t.Z)(()=>M(Le),I,[Le]);const Ke=(0,r.useCallback)(Qe=>{we(Qe.target.value)},[we]),_e=(0,r.useCallback)(Qe=>{b&&b(Qe),Q&&Qe.key==="Enter"&&Q()},[b,Q]),ut=(0,r.useCallback)(()=>{M("")},[M]),rt=`Search in ${ve.getOptionalString("app.title")||"Backstage"}`,at=r.createElement(f.Z,{position:"start"},r.createElement(E.Z,{"aria-label":"Query",disabled:!0},r.createElement(o.Z,null))),gt=r.createElement(f.Z,{position:"end"},r.createElement(E.Z,{"aria-label":"Clear",onClick:ut},r.createElement(m.Z,null))),xe=r.createElement(h,null,r.createElement(i.Z,{"data-testid":"search-bar-next",value:Le,placeholder:rt,startAdornment:at,endAdornment:P?gt:q,inputProps:{"aria-label":"Search",...W},fullWidth:L,onChange:Ke,onKeyDown:_e,...oe}));return fe?xe:r.createElement(u.Nd,null,xe)},C=({onChange:M,...b})=>{const{term:Q,setTerm:I}=(0,u.Rx)(),P=(0,r.useCallback)(L=>{M?M(L):I(L)},[M,I]);return r.createElement(R,{value:Q,onChange:P,...b})}},22313:function(_,s,e){"use strict";e.d(s,{ci:function(){return i},Nd:function(){return m},Rx:function(){return u}});var r=e(36964),t=e(2784),l=e(64279),f=e(1849),E=e(91512);const i=(0,t.createContext)(void 0),o={term:"",pageCursor:void 0,filters:{},types:[]},m=({initialState:h=o,children:g})=>{var Ke,_e,ut,rt;const R=(0,r.useApi)(E.g),[C,M]=(0,t.useState)(h.pageCursor),[b,Q]=(0,t.useState)(h.filters),[I,P]=(0,t.useState)(h.term),[L,z]=(0,t.useState)(h.types),W=(0,f.Z)(I),q=(0,l.default)(()=>R.query({term:I,filters:b,pageCursor:C,types:L}),[I,b,L,C]),oe=!q.loading&&!q.error&&((Ke=q.value)==null?void 0:Ke.nextPageCursor),ve=!q.loading&&!q.error&&((_e=q.value)==null?void 0:_e.previousPageCursor),Le=(0,t.useCallback)(()=>{var at;M((at=q.value)==null?void 0:at.nextPageCursor)},[(ut=q.value)==null?void 0:ut.nextPageCursor]),we=(0,t.useCallback)(()=>{var at;M((at=q.value)==null?void 0:at.previousPageCursor)},[(rt=q.value)==null?void 0:rt.previousPageCursor]);(0,t.useEffect)(()=>{I&&W&&I!==W&&M(void 0)},[I,W,h.pageCursor]);const fe={result:q,filters:b,setFilters:Q,term:I,setTerm:P,types:L,setTypes:z,pageCursor:C,setPageCursor:M,fetchNextPage:oe?Le:void 0,fetchPreviousPage:ve?we:void 0};return t.createElement(r.AnalyticsContext,{attributes:{searchTypes:L.sort().join(",")}},t.createElement(i.Provider,{value:fe,children:g}))},u=()=>{const h=(0,t.useContext)(i);if(h===void 0)throw new Error("useSearch must be used within a SearchContextProvider");return h}},73032:function(_,s,e){"use strict";e.d(s,{s:function(){return oe},O:function(){return ve}});var r=e(2784),t=e(60364),l=e(79249),f=e(27556),E=e(38724),i=e(60905),o=e(85256),m=e(11776),u=e(49429),h=e(8629),g=e(69001),R=e(79692),C=e(1795),M=e(19941),b=e(39332),Q=e(22313),I=e(8542),P=e(36964),L=e(9118),z=e(20863);const W=(0,R.Z)(Le=>({container:{borderRadius:30,display:"flex",height:"2.4em"},input:{flex:1},paperFullWidth:{height:"calc(100% - 128px)"},dialogActionsContainer:{padding:Le.spacing(1,3)},viewResultsLink:{verticalAlign:"0.5em"}})),q=({toggleModal:Le})=>{const we=(0,P.useRouteRef)(z._Z),fe=W(),{term:Ke}=(0,Q.Rx)(),{focusContent:_e}=(0,L.useContent)(),{transitions:ut}=(0,t.Z)(),rt=()=>{Le(),setTimeout(_e,ut.duration.leavingScreen)},at=()=>{rt()};return r.createElement(r.Fragment,null,r.createElement(l.Z,null,r.createElement(f.Z,{className:fe.container},r.createElement(C.SearchBar,{className:fe.input}))),r.createElement(E.Z,null,r.createElement(i.Z,{container:!0,direction:"row-reverse",justifyContent:"flex-start",alignItems:"center"},r.createElement(i.Z,{item:!0},r.createElement(L.Link,{onClick:()=>{Le(),setTimeout(_e,ut.duration.leavingScreen)},to:`${we()}?query=${Ke}`},r.createElement("span",{className:fe.viewResultsLink},"View Full Results"),r.createElement(g.Z,{color:"primary"})))),r.createElement(o.Z,null),r.createElement(b.SearchResult,null,({results:gt})=>r.createElement(m.Z,null,gt.map(({document:xe})=>r.createElement("div",{role:"button",tabIndex:0,key:`${xe.location}-btn`,onClick:rt,onKeyPress:at},r.createElement(M.DefaultResultListItem,{key:xe.location,result:xe})))))),r.createElement(u.Z,{className:fe.dialogActionsContainer},r.createElement(i.Z,{container:!0,direction:"row"},r.createElement(i.Z,{item:!0,xs:12},r.createElement(I.G,null)))))},oe=({open:Le=!0,hidden:we,toggleModal:fe})=>{const Ke=W();return r.createElement(h.Z,{classes:{paperFullWidth:Ke.paperFullWidth},onClose:fe,"aria-labelledby":"search-modal-title",fullWidth:!0,maxWidth:"lg",open:Le,hidden:we},Le&&r.createElement(Q.Nd,null,r.createElement(q,{toggleModal:fe})))};function ve(Le=!1){const[we,fe]=(0,r.useState)({hidden:!Le,open:Le}),Ke=(0,r.useCallback)(()=>fe(ut=>({open:!0,hidden:!ut.hidden})),[]),_e=(0,r.useCallback)(ut=>fe(rt=>({open:rt.open||ut,hidden:!ut})),[]);return{state:we,toggleModal:Ke,setOpen:_e}}},3992:function(_,s,e){"use strict";e.r(s),e.d(s,{SearchPage:function(){return Lt}});var r=e(2784),t=e(1849),l=e(19126),f=e.n(l),E=e(10289),i=e(22313),o=e(60905),m=e(48760),u=e(79692),h=e(27556),g=e(74603),R=e(61837),C=e(21853),M=e(33375);const b=(0,u.Z)(()=>({root:{display:"flex",alignItems:"center"},input:{flex:1}})),Q=({searchQuery:ze,handleSearch:lt,handleClearSearchBar:ke})=>{const Ct=b();return r.createElement(h.Z,{component:"form",onSubmit:ct=>lt(ct),className:Ct.root},r.createElement(R.Z,{disabled:!0,type:"submit","aria-label":"search"},r.createElement(C.Z,null)),r.createElement(g.Z,{className:Ct.input,placeholder:"Search in Backstage",value:ze,onChange:ct=>lt(ct),inputProps:{"aria-label":"search backstage"}}),r.createElement(R.Z,{"aria-label":"search",onClick:()=>ke()},r.createElement(M.Z,null)))};var I=e(85256),P=e(90436),L=e(99688),z=e(64279),W=e(53479),q=e(36444);const oe=(0,u.Z)(ze=>({filters:{width:"250px",display:"flex"},icon:{margin:ze.spacing(-1,0,0,0)}})),ve=({numberOfSelectedFilters:ze,handleToggleFilters:lt})=>{const ke=oe();return r.createElement("div",{className:ke.filters},r.createElement(R.Z,{className:ke.icon,"aria-label":"settings",onClick:lt},r.createElement(q.Z,null)),r.createElement(P.Z,{variant:"h6"},"Filters (",ze||0,")"))};var Le=e(94339),we=e(32552),fe=e(77277),Ke=e(24579),_e=e(73698),ut=e(12231),rt=e(11776),at=e(38402),gt=e(21324),xe=e(49378);const Qe=(0,u.Z)(ze=>({filters:{background:"transparent",boxShadow:"0px 0px 0px 0px"},checkbox:{padding:ze.spacing(0,1,0,1)},dropdown:{width:"100%"}})),Ye=({filters:ze,filterOptions:lt,resetFilters:ke,updateSelected:Ct,updateChecked:ct})=>{const Et=Qe();return r.createElement(Le.Z,{className:Et.filters},r.createElement(we.Z,{title:r.createElement(P.Z,{variant:"h6"},"Filters"),action:r.createElement(fe.Z,{color:"primary",onClick:()=>ke()},"CLEAR ALL")}),r.createElement(I.Z,null),lt.kind.length===0&<.lifecycle.length===0&&r.createElement(Ke.Z,null,r.createElement(P.Z,{variant:"subtitle2"},"Filters cannot be applied to available results")),lt.kind.length>0&&r.createElement(Ke.Z,null,r.createElement(P.Z,{variant:"subtitle2"},"Kind"),r.createElement(_e.Z,{id:"outlined-select",onChange:X=>{var Z;return Ct((Z=X==null?void 0:X.target)==null?void 0:Z.value)},variant:"outlined",className:Et.dropdown,value:ze.selected},lt.kind.map(X=>r.createElement(ut.Z,{selected:X==="",dense:!0,key:X,value:X},X)))),lt.lifecycle.length>0&&r.createElement(Ke.Z,null,r.createElement(P.Z,{variant:"subtitle2"},"Lifecycle"),r.createElement(rt.Z,{disablePadding:!0,dense:!0},lt.lifecycle.map(X=>r.createElement(at.Z,{key:X,dense:!0,button:!0,onClick:()=>ct(X)},r.createElement(gt.Z,{edge:"start",disableRipple:!0,className:Et.checkbox,color:"primary",checked:ze.checked.includes(X),tabIndex:-1,value:X,name:X}),r.createElement(xe.Z,{id:X,primary:X}))))))};var Rt=e(48023),pt=e(9118),St=e(36964);const it=(0,u.Z)(ze=>({searchQuery:{color:ze.palette.text.primary,background:ze.palette.background.default,borderRadius:"10%"},tableHeader:{margin:ze.spacing(1,0,0,0),display:"flex"},divider:{width:"1px",margin:ze.spacing(0,2),padding:ze.spacing(2,0)}})),yt=[{title:"Name",field:"name",highlight:!0,render:ze=>r.createElement(pt.Link,{to:ze.url||""},ze.name)},{title:"Description",field:"description"},{title:"Owner",field:"owner"},{title:"Kind",field:"kind"},{title:"LifeCycle",field:"lifecycle"}],It=({searchQuery:ze,numberOfSelectedFilters:lt,numberOfResults:ke,handleToggleFilters:Ct})=>{const ct=it();return r.createElement("div",{className:ct.tableHeader},r.createElement(ve,{numberOfSelectedFilters:lt,handleToggleFilters:Ct}),r.createElement(I.Z,{className:ct.divider,orientation:"vertical"}),r.createElement(o.Z,{item:!0,xs:12},ze?r.createElement(P.Z,{variant:"h6"},`${ke} `,ke>1?"results for ":"result for ",r.createElement("span",{className:ct.searchQuery},'"',ze,'"')," "):r.createElement(P.Z,{variant:"h6"},`${ke} results`)))},Pt=({searchQuery:ze})=>{const lt=(0,St.useApi)(W.catalogApiRef),[ke,Ct]=(0,r.useState)(!1),[ct,Et]=(0,r.useState)({selected:"",checked:[]}),[X,Z]=(0,r.useState)([]),{loading:ne,error:ce,value:se}=(0,z.default)(async()=>(await lt.getEntities()).items.map(J=>{var U,ie,Te,De,Ee;return{name:J.metadata.name,description:J.metadata.description,owner:typeof((U=J.spec)==null?void 0:U.owner)=="string"?(ie=J.spec)==null?void 0:ie.owner:void 0,kind:J.kind,lifecycle:typeof((Te=J.spec)==null?void 0:Te.lifecycle)=="string"?(De=J.spec)==null?void 0:De.lifecycle:void 0,url:`/catalog/${((Ee=J.metadata.namespace)==null?void 0:Ee.toLocaleLowerCase("en-US"))||Rt.zG}/${J.kind.toLocaleLowerCase("en-US")}/${J.metadata.name}`}}),[]);if((0,r.useEffect)(()=>{if(se){let te=se;ct.selected!==""&&(te=se.filter(J=>ct.selected.includes(J.kind))),ct.checked.length>0&&(te=te.filter(J=>J.lifecycle&&ct.checked.includes(J.lifecycle))),ze&&(te=te.filter(J=>{var U,ie,Te;return((U=J.name)==null?void 0:U.toLocaleLowerCase("en-US").includes(ze))||((ie=J.name)==null?void 0:ie.toLocaleLowerCase("en-US").includes(ze.split(" ").join("-")))||((Te=J.description)==null?void 0:Te.toLocaleLowerCase("en-US").includes(ze))})),Z(te)}},[ct,ze,se]),ne)return r.createElement(pt.Progress,null);if(ce)return r.createElement(L.Z,{severity:"error"},"Error encountered while fetching search results. ",ce.toString());if(!se||se.length===0)return r.createElement(pt.EmptyState,{missing:"data",title:"Sorry, no results were found"});const ye=()=>{Et({selected:"",checked:[]})},Ze=te=>{Et(J=>({...J,selected:te}))},$e=te=>{if(ct.checked.includes(te)){Et(J=>({...J,checked:J.checked.filter(U=>U!==te)}));return}Et(J=>({...J,checked:[...J.checked,te]}))},nt=se.reduce((te,J)=>(J.kind&&te.kind.indexOf(J.kind)<0&&te.kind.push(J.kind),J.lifecycle&&te.lifecycle.indexOf(J.lifecycle)<0&&te.lifecycle.push(J.lifecycle),te),{kind:[],lifecycle:[]});return r.createElement(r.Fragment,null,r.createElement(o.Z,{container:!0},ke&&r.createElement(o.Z,{item:!0,xs:3},r.createElement(Ye,{filters:ct,filterOptions:nt,resetFilters:ye,updateSelected:Ze,updateChecked:$e})),r.createElement(o.Z,{item:!0,xs:ke?9:12},r.createElement(pt.Table,{options:{paging:!0,pageSize:20,search:!1},data:X,columns:yt,title:r.createElement(It,{searchQuery:ze,numberOfResults:X.length,numberOfSelectedFilters:(ct.selected!==""?1:0)+ct.checked.length,handleToggleFilters:()=>Ct(!ke)})}))))},Zt=()=>{const[ze,lt]=(0,pt.useQueryParamState)("query"),[ke,Ct]=(0,r.useState)(ze!=null?ze:""),ct=X=>{X.preventDefault(),Ct(X.target.value)};(0,r.useEffect)(()=>Ct(ze!=null?ze:""),[ze]),(0,m.Z)(()=>{lt(ke)},200,[ke]);const Et=()=>{Ct("")};return r.createElement(pt.Page,{themeId:"home"},r.createElement(pt.Header,{title:"Search"}),r.createElement(pt.Content,null,r.createElement(o.Z,{container:!0,direction:"row"},r.createElement(o.Z,{item:!0,xs:12},r.createElement(Q,{handleSearch:ct,handleClearSearchBar:Et,searchQuery:ke})),r.createElement(o.Z,{item:!0,xs:12},r.createElement(Pt,{searchQuery:(ze!=null?ze:"").toLocaleLowerCase("en-US")})))))},Bt=()=>{const ze=(0,E.TH)(),{term:lt,setTerm:ke,types:Ct,setTypes:ct,pageCursor:Et,setPageCursor:X,filters:Z,setFilters:ne}=(0,i.Rx)(),ce=(0,t.Z)(ze.search);return(0,r.useEffect)(()=>{if(ze.search===ce)return;const se=f().parse(ze.search.substring(1),{arrayLimit:0})||{};se.filters&&ne(se.filters),se.query&&ke(se.query),se.pageCursor&&X(se.pageCursor),se.types&&ct(se.types)},[ce,ze,ke,ct,X,ne]),(0,r.useEffect)(()=>{const se=f().stringify({query:lt,types:Ct,pageCursor:Et,filters:Z},{arrayFormat:"brackets"}),ye=`${window.location.pathname}?${se}`;window.history.replaceState(null,document.title,ye)},[lt,Ct,Et,Z]),null},Lt=()=>{const ze=(0,E.pC)();return r.createElement(i.Nd,null,r.createElement(Bt,null),ze||r.createElement(Zt,null))}},39332:function(_,s,e){"use strict";e.r(s),e.d(s,{SearchResult:function(){return f}});var r=e(9118),t=e(2784),l=e(22313);const f=({children:E})=>{const{result:{loading:i,error:o,value:m}}=(0,l.Rx)();return i?t.createElement(r.Progress,null):o?t.createElement(r.ResponseErrorPanel,{title:"Error encountered while fetching search results",error:o}):m!=null&&m.results.length?t.createElement(t.Fragment,null,E({results:m.results})):t.createElement(r.EmptyState,{missing:"data",title:"Sorry, no results were found"})}},8542:function(_,s,e){"use strict";e.d(s,{G:function(){return m}});var r=e(79692),t=e(77277),l=e(35352),f=e(27742),E=e(2784),i=e(22313);const o=(0,r.Z)(u=>({root:{display:"flex",justifyContent:"space-between",gap:u.spacing(2),margin:u.spacing(2,0)}})),m=()=>{const{fetchNextPage:u,fetchPreviousPage:h}=(0,i.Rx)(),g=o();return!u&&!h?E.createElement(E.Fragment,null):E.createElement("nav",{"arial-label":"pagination navigation",className:g.root},E.createElement(t.Z,{"aria-label":"previous page",disabled:!h,onClick:h,startIcon:E.createElement(l.Z,null)},"Previous"),E.createElement(t.Z,{"aria-label":"next page",disabled:!u,onClick:u,endIcon:E.createElement(f.Z,null)},"Next"))}},20863:function(_,s,e){"use strict";e.d(s,{_Z:function(){return l}});var r=e(91512),t=e(36964);const l=(0,t.createRouteRef)({id:"search"}),f=(0,t.createRouteRef)({id:"search:next"}),E=(0,t.createPlugin)({id:"search",apis:[(0,t.createApiFactory)({api:r.g,deps:{discoveryApi:t.discoveryApiRef,identityApi:t.identityApiRef},factory:({discoveryApi:b,identityApi:Q})=>new r.w({discoveryApi:b,identityApi:Q})})],routes:{root:l,nextRoot:f}}),i=E.provide((0,t.createRoutableExtension)({name:"SearchPage",component:()=>Promise.resolve().then(e.bind(e,3992)).then(b=>b.SearchPage),mountPoint:l})),o=E.provide((0,t.createRoutableExtension)({name:"SearchPageNext",component:()=>Promise.resolve().then(e.bind(e,3992)).then(b=>b.SearchPage),mountPoint:f})),m=E.provide((0,t.createComponentExtension)({name:"SearchBar",component:{lazy:()=>Promise.resolve().then(e.bind(e,1795)).then(b=>b.SearchBar)}})),u=E.provide((0,t.createComponentExtension)({name:"SearchBarNext",component:{lazy:()=>Promise.resolve().then(e.bind(e,1795)).then(b=>b.SearchBar)}})),h=E.provide((0,t.createComponentExtension)({name:"SearchResult",component:{lazy:()=>Promise.resolve().then(e.bind(e,39332)).then(b=>b.SearchResult)}})),g=E.provide((0,t.createComponentExtension)({name:"SearchResultNext",component:{lazy:()=>Promise.resolve().then(e.bind(e,39332)).then(b=>b.SearchResult)}})),R=E.provide((0,t.createComponentExtension)({name:"SidebarSearchModal",component:{lazy:()=>e.e(3825).then(e.bind(e,43825)).then(b=>b.SidebarSearchModal)}})),C=E.provide((0,t.createComponentExtension)({name:"DefaultResultListItem",component:{lazy:()=>Promise.resolve().then(e.bind(e,19941)).then(b=>b.DefaultResultListItem)}})),M=E.provide((0,t.createComponentExtension)({name:"HomePageSearchBar",component:{lazy:()=>e.e(6105).then(e.bind(e,46105)).then(b=>b.HomePageSearchBar)}}))},94067:function(_,s,e){"use strict";e.r(s),e.d(s,{EmbeddedDocsRouter:function(){return M},Router:function(){return C},isTechDocsAvailable:function(){return R}});var r=e(2784),t=e(53479),l=e(10289),f=e(50021),E=e(75733),i=e(96393),o=e(97589),m=e(36964);const u=({entity:b})=>{var I;const Q=(0,m.useApi)(m.configApiRef);return r.createElement(i.Ej,{withSearch:!1,entityRef:{namespace:(0,o.D)((I=b.metadata.namespace)!=null?I:"default",Q),kind:(0,o.D)(b.kind,Q),name:(0,o.D)(b.metadata.name,Q)}})};var h=e(9118);const g="backstage.io/techdocs-ref",R=b=>{var Q,I;return Boolean((I=(Q=b==null?void 0:b.metadata)==null?void 0:Q.annotations)==null?void 0:I[g])},C=()=>r.createElement(l.Z5,null,r.createElement(l.AW,{path:"/",element:r.createElement(f.TechDocsIndexPage,null)}),r.createElement(l.AW,{path:"/:namespace/:kind/:name/*",element:r.createElement(E.TechDocsReaderPage,null)})),M=()=>{var I;const{entity:b}=(0,t.useEntity)();return((I=b.metadata.annotations)==null?void 0:I[g])?r.createElement(l.Z5,null,r.createElement(l.AW,{path:"/*",element:r.createElement(u,{entity:b})})):r.createElement(h.MissingAnnotationEmptyState,{annotation:g})}},3337:function(_,s,e){"use strict";e.d(s,{D:function(){return t},g:function(){return l}});var r=e(36964);const t=(0,r.createApiRef)({id:"plugin.techdocs.storageservice"}),l=(0,r.createApiRef)({id:"plugin.techdocs.service"})},42723:function(_,s,e){"use strict";e.d(s,{k:function(){return E},p:function(){return f}});var r=e(10179),t=e(76372),l=e.n(t);class f{constructor(o){ae(this,"configApi");ae(this,"discoveryApi");ae(this,"fetchApi");this.configApi=o.configApi,this.discoveryApi=o.discoveryApi,this.fetchApi=o.fetchApi}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getTechDocsMetadata(o){const{kind:m,namespace:u,name:h}=o,R=`${await this.getApiOrigin()}/metadata/techdocs/${u}/${m}/${h}`,C=await this.fetchApi.fetch(`${R}`);if(!C.ok)throw await r.VL.fromResponse(C);return await C.json()}async getEntityMetadata(o){const{kind:m,namespace:u,name:h}=o,R=`${await this.getApiOrigin()}/metadata/entity/${u}/${m}/${h}`,C=await this.fetchApi.fetch(`${R}`);if(!C.ok)throw await r.VL.fromResponse(C);return await C.json()}}class E{constructor(o){ae(this,"configApi");ae(this,"discoveryApi");ae(this,"identityApi");ae(this,"fetchApi");this.configApi=o.configApi,this.discoveryApi=o.discoveryApi,this.identityApi=o.identityApi,this.fetchApi=o.fetchApi}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getStorageUrl(){var o;return(o=this.configApi.getOptionalString("techdocs.storageUrl"))!=null?o:`${await this.discoveryApi.getBaseUrl("techdocs")}/static/docs`}async getBuilder(){return this.configApi.getString("techdocs.builder")}async getEntityDocs(o,m){const{kind:u,namespace:h,name:g}=o,C=`${await this.getStorageUrl()}/${h}/${u}/${g}/${m}`,M=await this.fetchApi.fetch(`${C.endsWith("/")?C:`${C}/`}index.html`);let b="";switch(M.status){case 404:throw b="Page not found. ",m||(b+="This could be because there is no index.md file in the root of the docs directory of this repository."),new r.dR(b);case 500:throw b="Could not generate documentation or an error in the TechDocs backend. ",new Error(b);default:break}return M.text()}async syncEntityDocs(o,m=()=>{}){const{kind:u,namespace:h,name:g}=o,C=`${await this.getApiOrigin()}/sync/${h}/${u}/${g}`,{token:M}=await this.identityApi.getCredentials();return new Promise((b,Q)=>{const I=new t.EventSourcePolyfill(C,{withCredentials:!0,headers:M?{Authorization:`Bearer ${M}`}:{}});I.addEventListener("log",P=>{P.data&&m(JSON.parse(P.data))}),I.addEventListener("finish",P=>{let L=!1;P.data&&({updated:L}=JSON.parse(P.data)),b(L?"updated":"cached")}),I.onerror=P=>{switch(I.close(),P.status){case 404:Q(new r.dR(P.message));return;default:Q(new Error(P.data));return}}})}async getBaseUrl(o,m,u){const{kind:h,namespace:g,name:R}=m,M=`${await this.getApiOrigin()}/static/docs/${g}/${h}/${R}/${u}`;return new URL(o,M.endsWith("/")?M:`${M}/`).toString()}}},97589:function(_,s,e){"use strict";e.d(s,{D:function(){return r}});function r(t,l){return l.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")?t:t.toLocaleLowerCase("en-US")}},2546:function(_,s,e){"use strict";e.d(s,{u:function(){return o}});var r=e(2784),t=e(9118),l=e(53479),f=e(1114),E=e(70335),i=e(21956);const o=m=>{const{initialFilter:u="all",columns:h,actions:g}=m;return r.createElement(f.j,null,r.createElement(t.Content,null,r.createElement(t.ContentHeader,{title:""},r.createElement(t.SupportButton,null,"Discover documentation in your ecosystem.")),r.createElement(l.EntityListProvider,null,r.createElement(l.CatalogFilterLayout,null,r.createElement(l.CatalogFilterLayout.Filters,null,r.createElement(E.f,null),r.createElement(l.UserListPicker,{initialFilter:u}),r.createElement(l.EntityOwnerPicker,null),r.createElement(l.EntityTagPicker,null)),r.createElement(l.CatalogFilterLayout.Content,null,r.createElement(i.EntityListDocsTable,{actions:g,columns:h}))))))}},51016:function(_,s,e){"use strict";e.d(s,{f:function(){return h}});var r=e(68725),t=e(97589),l=e(36964),f=e(9118),E=e(94339),i=e(16111),o=e(24579),m=e(14503),u=e(2784);const h=C=>{const{entities:M}=C,b=(0,l.useRouteRef)(r.Fw),Q=(0,l.useApi)(l.configApiRef);return M?u.createElement(f.ItemCardGrid,{"data-testid":"docs-explore"},M!=null&&M.length?M.map((I,P)=>{var L,z;return u.createElement(E.Z,{key:P},u.createElement(i.Z,null,u.createElement(f.ItemCardHeader,{title:(L=I.metadata.title)!=null?L:I.metadata.name})),u.createElement(o.Z,null,I.metadata.description),u.createElement(m.Z,null,u.createElement(f.Button,{to:b({namespace:(0,t.D)((z=I.metadata.namespace)!=null?z:"default",Q),kind:(0,t.D)(I.kind,Q),name:(0,t.D)(I.metadata.name,Q)}),color:"primary","data-testid":"read_docs"},"Read Docs")))}):null):null};var g=e(53479);const R=()=>{const{loading:C,error:M,entities:b}=useEntityList();return M?React.createElement(WarningPanel,{severity:"error",title:"Could not load available documentation."},React.createElement(CodeSnippet,{language:"text",text:M.toString()})):C||!b?React.createElement(Progress,null):(b.sort((Q,I)=>{var P,L;return((P=Q.metadata.title)!=null?P:Q.metadata.name).localeCompare((L=I.metadata.title)!=null?L:I.metadata.name)}),React.createElement(DocsCardGrid,{entities:b}))}},81290:function(_,s,e){"use strict";e.d(s,{H:function(){return g}});var r=e(2784),t=e(95074),l=e(36964),f=e(48023),E=e(53479),i=e(68725),o=e(9118),m=e(98095),u=e(3792),h=e(97589);const g=R=>{const{entities:C,title:M,loading:b,columns:Q,actions:I}=R,[,P]=(0,t.Z)(),L=(0,l.useRouteRef)(i.Fw),z=(0,l.useApi)(l.configApiRef);if(!C)return null;const W=C.map(ve=>{var we;const Le=(0,E.getEntityRelations)(ve,f.S4);return{entity:ve,resolved:{docsUrl:L({namespace:(0,h.D)((we=ve.metadata.namespace)!=null?we:"default",z),kind:(0,h.D)(ve.kind,z),name:(0,h.D)(ve.metadata.name,z)}),ownedByRelations:Le,ownedByRelationsTitle:Le.map(fe=>(0,E.humanizeEntityRef)(fe,{defaultKind:"group"})).join(", ")}}}),q=[u.N.createNameColumn(),u.N.createOwnerColumn(),u.N.createTypeColumn()],oe=[m.n.createCopyDocsUrlAction(P)];return r.createElement(r.Fragment,null,b||W&&W.length>0?r.createElement(o.Table,{isLoading:b,options:{paging:!0,pageSize:20,search:!0,actionsColumnIndex:-1},data:W,columns:Q||q,actions:I||oe,title:M?`${M} (${W.length})`:`All (${W.length})`}):r.createElement(o.EmptyState,{missing:"data",title:"No documents to show",description:"Create your own document. Check out our Getting Started Information",action:r.createElement(o.Button,{color:"primary",to:"https://backstage.io/docs/features/techdocs/getting-started",variant:"contained"},"DOCS")}))};g.columns=u.N,g.actions=m.n},12481:function(_,s,e){"use strict";e.d(s,{n:function(){return h}});var r=e(2784),t=e(95074),l=e(76635),f=e.n(l),E=e(9118),i=e(53479),o=e(81290),m=e(98095),u=e(3792);const h=g=>{var oe,ve;const{columns:R,actions:C}=g,{loading:M,error:b,entities:Q,filters:I}=(0,i.useEntityList)(),{isStarredEntity:P,toggleStarredEntity:L}=(0,i.useStarredEntities)(),[,z]=(0,t.Z)(),W=(0,l.capitalize)((ve=(oe=I.user)==null?void 0:oe.value)!=null?ve:"all"),q=[m.n.createCopyDocsUrlAction(z),m.n.createStarEntityAction(P,L)];return b?r.createElement(E.WarningPanel,{severity:"error",title:"Could not load available documentation."},r.createElement(E.CodeSnippet,{language:"text",text:b.toString()})):r.createElement(o.H,{title:W,entities:Q,loading:M,actions:C||q,columns:R})};h.columns=u.N,h.actions=m.n},98095:function(_,s,e){"use strict";e.d(s,{n:function(){return o}});var r=e(2784),t=e(39981),l=e(2337),f=e(11640),E=e(28347);const i=(0,l.Z)({root:{color:"#f3ba37"}})(f.Z),o={createCopyDocsUrlAction(m){return u=>({icon:()=>r.createElement(t.Z,{fontSize:"small"}),tooltip:"Click to copy documentation link to clipboard",onClick:()=>m(`${window.location.origin}${u.resolved.docsUrl}`)})},createStarEntityAction(m,u){return({entity:h})=>{const g=m(h);return{cellStyle:{paddingLeft:"1em"},icon:()=>g?r.createElement(i,null):r.createElement(E.Z,null),tooltip:g?"Remove from favorites":"Add to favorites",onClick:()=>u(h)}}}}},3792:function(_,s,e){"use strict";e.d(s,{N:function(){return E}});var r=e(2784),t=e(9118),l=e(53479);function f(i){return i.metadata.title||i.metadata.name}const E={createNameColumn(){return{title:"Document",field:"entity.metadata.name",highlight:!0,render:i=>r.createElement(t.SubvalueCell,{value:r.createElement(t.Link,{to:i.resolved.docsUrl},f(i.entity)),subvalue:i.entity.metadata.description})}},createOwnerColumn(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:i})=>r.createElement(l.EntityRefLinks,{entityRefs:i.ownedByRelations,defaultKind:"group"})}},createTypeColumn(){return{title:"Type",field:"entity.spec.type"}}}},21956:function(_,s,e){"use strict";e.d(s,{DocsTable:function(){return t.H},EntityListDocsTable:function(){return r.n}});var r=e(12481),t=e(81290),l=e(72580),f=e.n(l);e.o(l,"DefaultTechDocsHome")&&e.d(s,{DefaultTechDocsHome:function(){return l.DefaultTechDocsHome}})},72580:function(){},50021:function(_,s,e){"use strict";e.r(s),e.d(s,{TechDocsIndexPage:function(){return f}});var r=e(2784),t=e(10289),l=e(2546);const f=()=>(0,t.pC)()||r.createElement(l.u,null)},1114:function(_,s,e){"use strict";e.d(s,{j:function(){return f}});var r=e(2784),t=e(9118),l=e(36964);const f=E=>{var u;const{children:i}=E,m=`Documentation available in ${(u=(0,l.useApi)(l.configApiRef).getOptionalString("organization.name"))!=null?u:"Backstage"}`;return r.createElement(t.PageWithHeader,{title:"Documentation",subtitle:m,themeId:"documentation"},i)}},70335:function(_,s,e){"use strict";e.d(s,{f:function(){return f}});var r=e(2784),t=e(53479);class l{getCatalogFilters(){return{"metadata.annotations.backstage.io/techdocs-ref":t.CATALOG_FILTER_EXISTS}}}const f=()=>{const{updateFilters:E}=(0,t.useEntityList)();return(0,r.useEffect)(()=>{E({techdocs:new l})},[E]),null}},19192:function(_,s,e){"use strict";e.d(s,{DefaultTechDocsHome:function(){return l.u}});var r=e(51016),t=e(21956),l=e(2546),f=e(1114),E=e(70335)},82250:function(_,s,e){"use strict";e.d(s,{DefaultTechDocsHome:function(){return o.DefaultTechDocsHome},Reader:function(){return E.Ej},TechDocsIndexPage:function(){return m.Jl},TechDocsReaderPage:function(){return m.I6},TechDocsReaderPageHeader:function(){return E.SE},plugin:function(){return m.s4},techdocsApiRef:function(){return l.g},techdocsStorageApiRef:function(){return l.D}});var r=e(98157),t=e.n(r);e.o(r,"DefaultTechDocsHome")&&e.d(s,{DefaultTechDocsHome:function(){return r.DefaultTechDocsHome}}),e.o(r,"Reader")&&e.d(s,{Reader:function(){return r.Reader}}),e.o(r,"TechDocsReaderPageHeader")&&e.d(s,{TechDocsReaderPageHeader:function(){return r.TechDocsReaderPageHeader}}),e.o(r,"techdocsApiRef")&&e.d(s,{techdocsApiRef:function(){return r.techdocsApiRef}}),e.o(r,"techdocsStorageApiRef")&&e.d(s,{techdocsStorageApiRef:function(){return r.techdocsStorageApiRef}});var l=e(3337),f=e(42723),E=e(96393),i=e(93566),o=e(19192),m=e(20961),u=e(94067)},20961:function(_,s,e){"use strict";e.d(s,{I6:function(){return h},Jl:function(){return u},s4:function(){return E}});var r=e(3337),t=e(42723),l=e(68725),f=e(36964);const E=(0,f.createPlugin)({id:"techdocs",apis:[(0,f.createApiFactory)({api:r.D,deps:{configApi:f.configApiRef,discoveryApi:f.discoveryApiRef,identityApi:f.identityApiRef,fetchApi:f.fetchApiRef},factory:({configApi:g,discoveryApi:R,identityApi:C,fetchApi:M})=>new t.k({configApi:g,discoveryApi:R,identityApi:C,fetchApi:M})}),(0,f.createApiFactory)({api:r.g,deps:{configApi:f.configApiRef,discoveryApi:f.discoveryApiRef,fetchApi:f.fetchApiRef},factory:({configApi:g,discoveryApi:R,fetchApi:C})=>new t.p({configApi:g,discoveryApi:R,fetchApi:C})})],routes:{root:l._Z,docRoot:l.Fw,entityContent:l.pd}}),i=E.provide((0,f.createRoutableExtension)({name:"TechdocsPage",component:()=>Promise.resolve().then(e.bind(e,94067)).then(g=>g.Router),mountPoint:l._Z})),o=E.provide((0,f.createRoutableExtension)({name:"EntityTechdocsContent",component:()=>Promise.resolve().then(e.bind(e,94067)).then(g=>g.EmbeddedDocsRouter),mountPoint:l.pd})),m=E.provide((0,f.createRoutableExtension)({name:"TechDocsCustomHome",component:()=>e.e(7110).then(e.bind(e,57110)).then(g=>g.TechDocsCustomHome),mountPoint:l._Z})),u=E.provide((0,f.createRoutableExtension)({name:"TechDocsIndexPage",component:()=>Promise.resolve().then(e.bind(e,50021)).then(g=>g.TechDocsIndexPage),mountPoint:l._Z})),h=E.provide((0,f.createRoutableExtension)({name:"TechDocsReaderPage",component:()=>Promise.resolve().then(e.bind(e,75733)).then(g=>g.TechDocsReaderPage),mountPoint:l.Fw}))},53242:function(_,s,e){"use strict";e.d(s,{Ej:function(){return nt},DK:function(){return se}});var r=e(2784),t=e(10289),l=e(79692),f=e(60364),E=e(41128),i=e(60905),o=e(36964),m=e(36356),u=e(9118),h=e(3337);const g=(te,J,U)=>{const ie=te==="src"&&J.endsWith(".svg"),Te=!J.match(/^([a-z]*:)?\/\//i),De=J.startsWith(U);return ie&&(Te||De)},R=({techdocsStorageApi:te,entityId:J,path:U})=>async ie=>{const Te=await te.getApiOrigin(),De=async(Ee,Fe)=>{for(const vt of Ee)if(vt.hasAttribute(Fe)){const xt=vt.getAttribute(Fe);if(!xt)return;const B=await te.getBaseUrl(xt,J,U);if(g(Fe,xt,Te))try{const j=await(await fetch(B,{credentials:"include"})).text();vt.setAttribute(Fe,`data:image/svg+xml;base64,${btoa(j)}`)}catch{vt.setAttribute("alt",`Error: ${xt}`)}else vt.setAttribute(Fe,B)}};return await Promise.all([De(ie.querySelectorAll("img"),"src"),De(ie.querySelectorAll("script"),"src"),De(ie.querySelectorAll("source"),"src"),De(ie.querySelectorAll("link"),"href"),De(ie.querySelectorAll("a[download]"),"href")]),ie};var C=e(86574),M=e(67097),b=e(47093),Q=e(82717),I=e.n(Q);const P=te=>J=>{const U=J.querySelector('[title="Edit this page"]');if(!U||!U.href)return J;const ie=new URL(U.href),Te=te.byUrl(ie);if((Te==null?void 0:Te.type)!=="github"&&(Te==null?void 0:Te.type)!=="gitlab")return J;const De=J.querySelector("article>h1").childNodes[0].textContent,Ee=encodeURIComponent(`Documentation Feedback: ${De}`),Fe=encodeURIComponent(`Page source:
|
|
32
|
-
${
|
|
30
|
+
`},kn=100,Qn=10,Ur=(0,i.Z)(n=>({root:{position:"relative",display:"flex",flexFlow:"row nowrap",alignItems:"center"},container:{overflow:"auto",scrollbarWidth:0,"&::-webkit-scrollbar":{display:"none"}},fade:{position:"absolute",width:kn,height:`calc(100% + ${Qn}px)`,transition:"opacity 300ms",pointerEvents:"none"},fadeLeft:{left:-Qn,background:`linear-gradient(90deg, ${mr(n.palette.type)})`},fadeRight:{right:-Qn,background:`linear-gradient(270deg, ${mr(n.palette.type)})`},fadeHidden:{opacity:0},button:{position:"absolute"},buttonLeft:{left:-n.spacing(2)},buttonRight:{right:-n.spacing(2)}}),{name:"BackstageHorizontalScrollGrid"});function wr(n){const[[a,c],d]=React.useState([0,0]);return React.useLayoutEffect(()=>{const p=n.current;if(!p){d([0,0]);return}const v=()=>{const O=p.scrollLeft,U=p.scrollWidth-p.offsetWidth-p.scrollLeft;d([O,U])};return v(),p.addEventListener("scroll",v),window.addEventListener("resize",v),()=>{p.removeEventListener("scroll",v),window.removeEventListener("resize",v)}},[n]),[a,c]}function zr(n,a,c){const[d,p]=React.useState(0);return React.useLayoutEffect(()=>{if(d===0)return;const v=performance.now(),O=requestAnimationFrame(U=>{if(!n.current)return;const k=U-v,j=Math.abs(d)*k/a,re=Math.max(c,j)*Math.sign(d);n.current.scrollBy({left:re});const Ce=d-re;Math.sign(d)!==Math.sign(Ce)?p(0):p(Ce)});return()=>cancelAnimationFrame(O)},[n,d,a,c]),p}function Tn(n){const{scrollStep:a=100,scrollSpeed:c=50,minScrollDistance:d=5,children:p,...v}=n,O=Ur(n),U=React.useRef(),[k,j]=wr(U),le=zr(U,c,d),re=Ce=>{!U.current||le(Ce?a:-a)};return React.createElement("div",{...v,className:O.root},React.createElement(Grid,{container:!0,direction:"row",wrap:"nowrap",className:O.container,ref:U},p),React.createElement("div",{className:classNames(O.fade,O.fadeLeft,{[O.fadeHidden]:k===0})}),React.createElement("div",{className:classNames(O.fade,O.fadeRight,{[O.fadeHidden]:j===0})}),k>0&&React.createElement(IconButton,{title:"Scroll Left",onClick:()=>re(!1),className:classNames(O.button,O.buttonLeft,{})},React.createElement(ChevronLeftIcon,null)),j>0&&React.createElement(IconButton,{title:"Scroll Right",onClick:()=>re(!0),className:classNames(O.button,O.buttonRight,{})},React.createElement(ChevronRightIcon,null)))}const ln=(0,i.Z)({alpha:{color:"#ffffff",fontFamily:"serif",fontWeight:"normal",fontStyle:"italic"},beta:{color:"#4d65cc",fontFamily:"serif",fontWeight:"normal",fontStyle:"italic"}},{name:"BackstageLifecycle"});function $n(n){const a=ln(n),{shorthand:c,alpha:d}=n;return c?React.createElement("span",{className:a[d?"alpha":"beta"],style:{fontSize:"120%"}},d?React.createElement(React.Fragment,null,"\u03B1"):React.createElement(React.Fragment,null,"\u03B2")):React.createElement("span",{className:a[d?"alpha":"beta"]},d?"Alpha":"Beta")}const Yt=(0,t.lazy)(()=>Promise.all([e.e(3860),e.e(8718)]).then(e.bind(e,98718)).then(n=>({default:n.RealLogViewer})));function Nn(n){const{Progress:a}=(0,l.useApp)().getComponents();return t.createElement(t.Suspense,{fallback:t.createElement(a,null)},t.createElement(Yt,{...n}))}const hr=(0,i.Z)(n=>({markdown:{"& table":{borderCollapse:"collapse",border:`1px solid ${n.palette.border}`},"& th, & td":{border:`1px solid ${n.palette.border}`,padding:n.spacing(1)},"& td":{wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:n.spacing(3,2,3,2.5),borderBottom:0},"& th":{backgroundColor:n.palette.background.paper},"& tr":{backgroundColor:n.palette.background.paper},"& tr:nth-child(odd)":{backgroundColor:n.palette.background.default},"& a":{color:n.palette.link},"& img":{maxWidth:"100%"}}}),{name:"BackstageMarkdownContent"}),Un={code:({inline:n,className:a,children:c,...d})=>{const p=String(c).replace(/\n+$/,""),v=/language-(\w+)/.exec(a||"");return!n&&v?t.createElement(de,{language:v[1],text:p}):t.createElement("code",{className:a,...d},c)}};function Wr(n){const{content:a,dialect:c="gfm",linkTarget:d}=n,p=hr();return React.createElement(ReactMarkdown,{remarkPlugins:c==="gfm"?[gfm]:[],className:p.markdown,children:a,components:Un,linkTarget:d})}var gr=e(10179);const wn=(0,i.Z)(n=>({root:{paddingLeft:n.spacing(3)}}),{name:"BackstageLoginRequestListItem"}),cn=({request:n,busy:a,setBusy:c})=>{const d=wn(),[p,v]=useState(),O=async()=>{c(!0);try{await n.trigger()}catch(k){v(isError(k)?k.message:"An unspecified error occurred")}finally{c(!1)}},U=n.provider.icon;return React.createElement(ListItem,{button:!0,disabled:a,classes:{root:d.root}},React.createElement(ListItemAvatar,null,React.createElement(U,{fontSize:"large"})),React.createElement(ListItemText,{primary:n.provider.title,secondary:p&&React.createElement(Typography,{color:"error"},p)}),React.createElement(Button,{color:"primary",variant:"contained",onClick:O},"Log in"))};var Xn=null;const Dn=(0,i.Z)(n=>({dialog:{paddingTop:n.spacing(1)},title:{minWidth:0},contentList:{padding:0},actionButtons:{padding:n.spacing(2,0)}}),{name:"OAuthRequestDialog"});function qn(n){const a=Dn(),[c,d]=useState(!1),p=useApi(oauthRequestApiRef),v=useObservable(useMemo(()=>p.authRequest$(),[p]),[]),O=()=>{v.forEach(U=>U.reject())};return React.createElement(Dialog,{open:Boolean(v.length),fullWidth:!0,maxWidth:"xs",classes:{paper:a.dialog}},React.createElement(DialogTitle,{classes:{root:a.title}},"Login Required"),React.createElement(DialogContent,{dividers:!0,classes:{root:a.contentList}},React.createElement(List,null,v.map(U=>React.createElement(LoginRequestListItem,{key:U.provider.title,request:U,busy:c,setBusy:d})))),React.createElement(DialogActions,{classes:{root:a.actionButtons}},React.createElement(Button,{onClick:O},"Reject All")))}var pr=e(15277),yr=e.n(pr),Er=e(29862);const zn=(0,i.Z)({container:{overflow:"visible !important"}},{name:"BackstageOverflowTooltip"});function vr(n){var O;const[a,c]=(0,t.useState)(!1),d=(0,Er.t)(),p=zn(),v=U=>{d()&&c(U)};return t.createElement(Z.ZP,{title:(O=n.title)!=null?O:n.text||"",placement:n.placement,disableHoverListener:!a},t.createElement(yr(),{text:n.text,line:n.line,onToggled:v,containerClassName:p.container}))}var Ar=e(67358);function _n(n){const[a,c]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{const d=setTimeout(()=>c(!0),250);return()=>clearTimeout(d)},[]),a?t.createElement(Ar.Z,{...n,"data-testid":"progress"}):t.createElement("div",{style:{display:"none"}})}var Rr=e(94339),Wn=e(14503),_t=e(24579),Hn=e(32552),Kt=e(15459),un=e(95544),Cr=e(27597);const Sr=(0,i.Z)(n=>({root:{maxWidth:"fit-content",padding:n.spacing(2,2,2,2.5)},boxTitle:{margin:0,color:n.palette.textSubtle},arrow:{color:n.palette.textSubtle}}),{name:"BackstageBottomLink"});function er(n){const{link:a,title:c,onClick:d}=n,p=Sr();return t.createElement("div",null,t.createElement(Kn.Z,null),t.createElement(T,{to:a,onClick:d,underline:"none"},t.createElement(un.Z,{display:"flex",alignItems:"center",className:p.root},t.createElement(un.Z,{className:p.boxTitle,fontWeight:"fontWeightBold",m:1},t.createElement(De.Z,null,t.createElement("strong",null,c))),t.createElement(Cr.Z,{className:p.arrow}))))}const Pn=n=>{const{slackChannel:a}=n;if(a){if(typeof a=="string")return t.createElement(t.Fragment,null,"Please contact ",a," for help.");if(!a.href)return t.createElement(t.Fragment,null,"Please contact ",a.name," for help.")}else return null;return t.createElement(F,{to:a.href,variant:"contained"},a.name)},bn=class extends t.Component{constructor(a){super(a);this.state={error:void 0,errorInfo:void 0}}componentDidCatch(a,c){console.error(`ErrorBoundary, error: ${a}, info: ${c}`),this.setState({error:a,errorInfo:c})}render(){const{slackChannel:a,children:c}=this.props,{error:d}=this.state;return d?t.createElement(pn,{title:"Something Went Wrong",error:d},t.createElement(Pn,{slackChannel:a})):c}},Tr=(0,i.Z)(n=>({noPadding:{padding:0,"&:last-child":{paddingBottom:0}},header:{padding:n.spacing(2,2,2,2.5)},headerTitle:{fontWeight:700},headerSubheader:{paddingTop:n.spacing(1)},headerAvatar:{},headerAction:{},headerContent:{},subheader:{display:"flex"}}),{name:"BackstageInfoCard"}),Pr=(0,Kt.Z)(n=>({root:{display:"inline-block",padding:n.spacing(8,8,0,0),float:"right"}}),{name:"BackstageInfoCardCardActionsTopRight"})(Wn.Z),tr={card:{flex:{display:"flex",flexDirection:"column"},fullHeight:{display:"flex",flexDirection:"column",height:"100%"},gridItem:{display:"flex",flexDirection:"column",height:"calc(100% - 10px)",marginBottom:"10px"}},cardContent:{fullHeight:{flex:1},gridItem:{flex:1}}};function Rn(n){const{title:a,subheader:c,divider:d=!0,deepLink:p,slackChannel:v,errorBoundaryProps:O,variant:U,children:k,headerStyle:j,headerProps:le,icon:re,action:Ce,actionsClassName:Re,actions:be,cardClassName:mt,actionsTopRight:Ot,className:Nt,noPadding:Wt,titleTypographyProps:dt}=n,Dt=Tr();let Ft={},Jt={};U&&U.split(/[\s]+/g).forEach(Pt=>{Ft={...Ft,...tr.card[Pt]},Jt={...Jt,...tr.cardContent[Pt]}});const Fn=()=>t.createElement("div",{className:Dt.headerSubheader},c&&t.createElement("div",{className:Dt.subheader},c),re),mn=O||(v?{slackChannel:v}:{});return t.createElement(Rr.Z,{style:Ft,className:Nt},t.createElement(bn,{...mn},a&&t.createElement(Hn.Z,{classes:{root:Dt.header,title:Dt.headerTitle,subheader:Dt.headerSubheader,avatar:Dt.headerAvatar,action:Dt.headerAction,content:Dt.headerContent},title:a,subheader:Fn(),action:Ce,style:{...j},titleTypographyProps:dt,...le}),Ot&&t.createElement(Pr,null,Ot),d&&t.createElement(Kn.Z,null),t.createElement(_t.Z,{className:ie()(mt,{[Dt.noPadding]:Wt}),style:Jt},k),be&&t.createElement(Wn.Z,{className:Re},be),p&&t.createElement(er,{...p})))}var Hr=e(39307);const br=(0,i.Z)(n=>({root:{position:"relative",lineHeight:0},overlay:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -60%)",fontSize:45,fontWeight:"bold",color:n.palette.textContrast},description:{fontSize:"100%",top:"50%",left:"50%",transform:"translate(-50%, -50%)",position:"absolute",wordBreak:"break-all",display:"inline-block"},circle:{width:"80%",transform:"translate(10%, 0)"},colorUnknown:{}}),{name:"BackstageGauge"}),nr={fractional:!0,inverse:!1,unit:"%",max:100},jr=({palette:n,value:a,inverse:c,max:d})=>{if(isNaN(a))return"#ddd";const p=d||nr.max,v=c?p-a:a;return v<p/3?n.status.error:v<p*(2/3)?n.status.warning:n.status.ok};function Vr(n){const[a,c]=useState(null),{getColor:d=jr}=n,p=br(n),{palette:v}=useTheme(),{value:O,fractional:U,inverse:k,unit:j,max:le,description:re}={...nr,...n},Ce=U?Math.round(O*le):O,Re=le!==100?Math.round(O):Ce,[be,mt]=useState(!1);return useEffect(()=>{const Ot=a,Nt=()=>mt(!0),Wt=()=>mt(!1);return Ot&&re?(Ot.addEventListener("mouseenter",Nt),Ot.addEventListener("mouseleave",Wt),()=>{Ot.removeEventListener("mouseenter",Nt),Ot.removeEventListener("mouseleave",Wt)}):()=>{mt(!1)}},[re,a]),React.createElement("div",{ref:c,className:p.root},React.createElement(Circle,{strokeLinecap:"butt",percent:Ce,strokeWidth:12,trailWidth:12,strokeColor:d({palette:v,value:Re,inverse:k,max:le}),className:p.circle}),re&&be?React.createElement("div",{className:p.description},re):React.createElement("div",{className:p.overlay},isNaN(O)?"N/A":`${Re}${j}`))}const L=(0,i.Z)({root:{height:"100%",width:250}},{name:"BackstageGaugeCard"});function ee(n){const a=L(n),{title:c,subheader:d,progress:p,inverse:v,deepLink:O,description:U,icon:k,variant:j,getColor:le}=n,re={inverse:v,description:U,getColor:le,value:p};return React.createElement("div",{className:a.root},React.createElement(InfoCard,{title:c,subheader:d,deepLink:O,variant:j,icon:k},React.createElement(Gauge,{...re})))}function fe(n){const{value:a,getColor:c=getProgressColor}=n,{palette:d}=useTheme();if(isNaN(a))return null;let p=Math.round(a*100*100)/100;p>100&&(p=100);const v=c({palette:d,value:p,inverse:!1,max:100});return React.createElement(Tooltip,{title:`${p}%`},React.createElement("span",null,React.createElement(Line,{percent:p,strokeWidth:4,trailWidth:4,strokeColor:v})))}var Be=e(21324),qe=e(7089),A=e(1292),S=e(42494),B=e(74603),W=e(12231),J=e(73698),G=e(72379);const he=(0,i.Z)(()=>(0,o.Z)({icon:{position:"absolute",right:"4px",pointerEvents:"none"}}),{name:"BackstageClosedDropdown"});var Ne=()=>{const n=he();return t.createElement(G.Z,{className:n.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{d:"M7.5 8L6 9.5L12.0703 15.5703L18.1406 9.5L16.6406 8L12.0703 12.5703L7.5 8Z",fill:"#616161"}))};const Pe=(0,i.Z)(()=>(0,o.Z)({icon:{position:"absolute",right:"4px",pointerEvents:"none"}}),{name:"BackstageOpenedDropdown"});var We=()=>{const n=Pe();return t.createElement(G.Z,{className:n.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{d:"M16.5 16L18 14.5L11.9297 8.42969L5.85938 14.5L7.35938 16L11.9297 11.4297L16.5 16Z",fill:"#616161"}))};const Ge=(0,Kt.Z)(n=>(0,o.Z)({root:{"label + &":{marginTop:n.spacing(3)}},input:{borderRadius:4,position:"relative",backgroundColor:n.palette.background.paper,border:"1px solid #ced4da",fontSize:16,padding:"10px 26px 10px 12px",transition:n.transitions.create(["border-color","box-shadow"]),fontFamily:"Helvetica Neue","&:focus":{background:n.palette.background.paper,borderRadius:4}}}),{name:"BackstageSelectInputBase"})(B.Z),At=(0,i.Z)(n=>(0,o.Z)({formControl:{margin:`${n.spacing(1)} 0px`,maxWidth:300},label:{transform:"initial",fontWeight:"bold",fontSize:14,fontFamily:n.typography.fontFamily,color:n.palette.text.primary,"&.Mui-focused":{color:n.palette.text.primary}},chips:{display:"flex",flexWrap:"wrap"},chip:{margin:2},checkbox:{},root:{display:"flex",flexDirection:"column"}}),{name:"BackstageSelect"});function tt(n){const{multiple:a,items:c,label:d,placeholder:p,selected:v,onChange:O,triggerReset:U,native:k=!1,disabled:j=!1}=n,le=At(),[re,Ce]=(0,t.useState)(v||(a?[]:"")),[Re,be]=(0,t.useState)(!1);(0,t.useEffect)(()=>{Ce(a?[]:"")},[U,a]),(0,t.useEffect)(()=>{v!==void 0&&Ce(v)},[v]);const mt=dt=>{Ce(dt.target.value),O(dt.target.value)},Ot=dt=>{if(j){dt.preventDefault();return}be(Dt=>a&&!(dt.target instanceof HTMLElement)?!0:!Dt)},Nt=()=>{be(!1)},Wt=dt=>()=>{const Dt=re.filter(Ft=>Ft!==dt);Ce(Dt),O(Dt)};return t.createElement("div",{className:le.root},t.createElement(De.Z,{variant:"button"},d),t.createElement(A.Z,{onClickAway:Nt},t.createElement(S.Z,{className:le.formControl},t.createElement(J.Z,{value:re,native:k,disabled:j,"data-testid":"select",displayEmpty:!0,multiple:a,onChange:mt,onClick:Ot,open:Re,input:t.createElement(Ge,null),renderValue:dt=>{var Dt;return a&&re.length!==0?t.createElement("div",{className:le.chips},dt.map(Ft=>{var Jt,Fn;return t.createElement(qe.Z,{key:(Jt=c.find(mn=>mn.value===Ft))==null?void 0:Jt.value,label:(Fn=c.find(mn=>mn.value===Ft))==null?void 0:Fn.label,clickable:!0,onDelete:Wt(Ft),className:le.chip})})):t.createElement(De.Z,null,re.length===0?p||"":(Dt=c.find(Ft=>Ft.value===dt))==null?void 0:Dt.label)},IconComponent:()=>Re?t.createElement(We,null):t.createElement(Ne,null),MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},getContentAnchorEl:null}},p&&!a&&t.createElement(W.Z,{value:[]},p),k?c&&c.map(dt=>t.createElement("option",{value:dt.value,key:dt.value},dt.label)):c&&c.map(dt=>t.createElement(W.Z,{key:dt.value,value:dt.value},a&&t.createElement(Be.Z,{color:"primary",checked:re.includes(dt.value)||!1,className:le.checkbox}),dt.label))))))}const Ke=()=>{},xt=t.createContext({stepperLength:0,stepIndex:0,setStepIndex:Ke,stepHistory:[],setStepHistory:Ke,onStepChange:Ke});function Zt(n){const{children:a,elevated:c,onStepChange:d,activeStep:p=0}=n,[v,O]=useState(p),[U,k]=useState([0]);useEffect(()=>{O(p)},[p]);const j=[];let le;return Children.forEach(a,re=>{isValidElement(re)&&(re.props.end?le=re:j.push(re))}),React.createElement(React.Fragment,null,React.createElement(xt.Provider,{value:{stepIndex:v,setStepIndex:O,stepHistory:U,setStepHistory:k,onStepChange:d,stepperLength:Children.count(a)}},React.createElement(MuiStepper,{activeStep:v,orientation:"vertical",elevation:c?2:0},j)),v>=Children.count(a)-1&&le)}const yn=(0,i.Z)(n=>({root:{marginTop:n.spacing(3),"& button":{marginRight:n.spacing(1)}}}),{name:"BackstageSimpleStepperFooter"}),wt=({text:n,handleClick:a})=>React.createElement(Button,{onClick:a},n||"Reset"),kt=({text:n,handleClick:a,disabled:c,last:d,stepIndex:p})=>React.createElement(Button,{variant:"contained",color:"primary",disabled:c,"data-testid":`nextButton-${p}`,onClick:a},n||(d?"Finish":"Next")),en=({text:n,handleClick:a,disabled:c,stepIndex:d})=>React.createElement(Button,{onClick:a,"data-testid":`backButton-${d}`,disabled:c},n||"Back"),dn=({actions:n={},children:a})=>{const c=yn(),{stepperLength:d,stepIndex:p,setStepIndex:v,stepHistory:O,setStepHistory:U,onStepChange:k}=useContext(VerticalStepperContext),j=(Re,be)=>{be&&be(),k&&k(p,Re),v(Re)},le=()=>{const Re=n.nextStep?n.nextStep(p,d-1):p+1;j(Re,n.onNext),U([...O,Re])},re=()=>{O.pop(),j(O[O.length-1],n.onBack),U([...O])},Ce=()=>{j(0,n.onRestart),U([0])};return React.createElement("div",{className:c.root},[void 0,!0].includes(n.showBack)&&p!==0&&React.createElement(en,{text:n.backText,handleClick:re,disabled:p===0,stepIndex:p}),[void 0,!0].includes(n.showNext)&&React.createElement(kt,{text:n.nextText,handleClick:le,disabled:!!d&&p>=d||!!n.canNext&&!n.canNext(),stepIndex:p}),n.showRestart&&p!==0&&React.createElement(wt,{text:n.restartText,handleClick:Ce,stepIndex:p}),a)},rr=(0,i.Z)(n=>({end:{padding:n.spacing(3)}}),{name:"SimpleStepperStep"});function Ir(n){const{title:a,children:c,end:d,actions:p,...v}=n,O=rr();return d?React.createElement("div",{className:O.end},React.createElement(Typography,{variant:"h6"},a),c,React.createElement(SimpleStepperFooter,{actions:{...p||{},showNext:!1}})):React.createElement(MuiStep,{...v},React.createElement(StepLabel,null,React.createElement(Typography,{variant:"h6"},a)),React.createElement(StepContent,null,c,React.createElement(SimpleStepperFooter,{actions:p})))}const In=(0,i.Z)(n=>({status:{fontWeight:500,"&::before":{width:"0.7em",height:"0.7em",display:"inline-block",marginRight:8,borderRadius:"50%",content:'""'}},ok:{"&::before":{backgroundColor:n.palette.status.ok}},warning:{"&::before":{backgroundColor:n.palette.status.warning}},error:{"&::before":{backgroundColor:n.palette.status.error}},pending:{"&::before":{backgroundColor:n.palette.status.pending}},running:{"&::before":{backgroundColor:n.palette.status.running}},aborted:{"&::before":{backgroundColor:n.palette.status.aborted}}}),{name:"BackstageStatus"});function nn(n){const a=In(n);return React.createElement("span",{className:classNames(a.status,a.ok),"aria-label":"Status ok","aria-hidden":"true",...n})}function rn(n){const a=In(n);return React.createElement("span",{className:classNames(a.status,a.warning),"aria-label":"Status warning","aria-hidden":"true",...n})}function Lr(n){const a=In(n);return React.createElement("span",{className:classNames(a.status,a.error),"aria-label":"Status error","aria-hidden":"true",...n})}function ra(n){const a=In(n);return React.createElement("span",{className:classNames(a.status,a.pending),"aria-label":"Status pending","aria-hidden":"true",...n})}function Gi(n){const a=In(n);return React.createElement("span",{className:classNames(a.status,a.running),"aria-label":"Status running","aria-hidden":"true",...n})}function Ki(n){const a=In(n);return React.createElement("span",{className:classNames(a.status,a.aborted),"aria-label":"Status aborted","aria-hidden":"true",...n})}var Ji=e(74600),pa=e(15584);const so=n=>(0,o.Z)({root:{fontWeight:"bolder",whiteSpace:"nowrap",paddingRight:n.spacing(4),border:"0",verticalAlign:"top"}}),io={root:{border:"0",verticalAlign:"top"}},lo=n=>(0,o.Z)({root:{listStyle:"none",margin:n.spacing(0,0,-1,0),padding:"0"}}),co=n=>(0,o.Z)({root:{padding:n.spacing(0,0,1,0)},random:{}}),uo=(0,Kt.Z)(so,{name:"BackstageMetadataTableTitleCell"})(pa.Z),fo=(0,Kt.Z)(io,{name:"BackstageMetadataTableCell"})(pa.Z),Yi=({dense:n,children:a})=>React.createElement(Table,{size:n?"small":"medium"},React.createElement(TableBody,null,a)),ki=({title:n,children:a,...c})=>React.createElement(TableRow,null,n&&React.createElement(uo,null,n),React.createElement(fo,{colSpan:n?1:2,...c},a)),ya=(0,Kt.Z)(lo,{name:"BackstageMetadataTableList"})(({classes:n,children:a})=>t.createElement("ul",{className:n.root},a)),Qi=(0,Kt.Z)(co,{name:"BackstageMetadataTableListItem"})(({classes:n,children:a})=>t.createElement("li",{className:n.root},a)),Ea=(0,o.Z)({root:{margin:"0 0",listStyleType:"none"}}),mo=n=>(0,o.Z)({root:{...Ea.root,paddingLeft:n.spacing(1)}}),va=(0,Kt.Z)(Ea,{name:"BackstageStructuredMetadataTableList"})(({classes:n,children:a})=>t.createElement(ya,{classes:n},a)),Aa=(0,Kt.Z)(mo,{name:"BackstageStructuredMetadataTableNestedList"})(({classes:n,children:a})=>t.createElement(ya,{classes:n},a));function ho(n,a){const c=n.map((d,p)=>React.createElement(MetadataListItem,{key:p},aa(d)));return a?React.createElement(Aa,null,c):React.createElement(va,null,c)}function go(n,a,c){const d=Object.keys(n).map(p=>{const v=aa(n[p],!0),O=c&&c.titleFormat?c.titleFormat(p):startCase(p);return React.createElement(MetadataListItem,{key:p},`${O}: `,v)});return a?React.createElement(Aa,null,d):React.createElement(va,null,d)}function aa(n,a,c){return React.isValidElement(n)?React.createElement(Fragment,null,n):typeof n=="object"&&!Array.isArray(n)?go(n,a,c):Array.isArray(n)?ho(n,c):typeof n=="boolean"?React.createElement(Fragment,null,n?"\u2705":"\u274C"):React.createElement(Fragment,null,n)}const po=({value:n,options:a})=>React.createElement(Fragment,null,aa(n,a)),yo=({title:n,value:a,options:c})=>React.createElement(MetadataTableItem,{title:c&&c.titleFormat?c.titleFormat(n):startCase(n)},React.createElement(po,{value:a,options:c}));function Eo(n,a){return Object.keys(n).map(c=>React.createElement(yo,{key:c,title:c,value:n[c],options:a}))}function Xi(n){const{metadata:a,dense:c=!0,options:d}=n,p=Eo(a,d||{});return React.createElement(MetadataTable,{dense:c},p)}var vo=e(49429),Ao=e(86136),Ra=e(79784),ar=e(76635),Ro=e(19126),Gr=e.n(Ro),Co=e(80277);function So(n){return Gr().stringify(n,{strictNullHandling:!0})}function Ca(n){return Gr().parse(n,{ignoreQueryPrefix:!0,strictNullHandling:!0})}function Sa(n,a){return Ca(n)[a]}function To(n,a,c){const d={...Ca(n),[a]:c};return So(d)}function Po(n,a=250){const[c,d]=(0,R.lr)(),p=c.toString(),[v,O]=(0,t.useState)(Sa(p,n));return(0,t.useEffect)(()=>{const U=Sa(p,n);O(k=>(0,ar.isEqual)(U,k)?k:U)},[p,O,n]),(0,Co.b)(()=>{const U=To(p,n,v);p!==U&&d(U,{replace:!0})},[d,v,p,n],a),[v,O]}const bo={url:"https://github.com/backstage/backstage/issues",items:[{title:"Support Not Configured",icon:"warning",links:[{title:"Add `app.support` config key",url:"https://github.com/backstage/backstage/blob/master/app-config.yaml"}]}]};function Ta(){const a=(0,l.useApiHolder)().get(l.configApiRef),c=a==null?void 0:a.getOptionalConfig("app.support");return c?{url:c.getString("url"),items:c.getConfigArray("items").flatMap(d=>{var p;return{title:d.getString("title"),icon:d.getOptionalString("icon"),links:((p=d.getOptionalConfigArray("links"))!=null?p:[]).flatMap(v=>({url:v.getString("url"),title:v.getString("title")}))}})}:bo}var Io=e(80079);function En(n,a){const d=(0,l.useApp)().getSystemIcon(n);return d?t.createElement(d,{...a}):t.createElement(Io.Z,{...a})}function qi(n){return En("brokenImage",n)}function _i(n){return En("catalog",n)}function el(n){return En("chat",n)}function tl(n){return En("dashboard",n)}function nl(n){return En("docs",n)}function rl(n){return En("email",n)}function al(n){return En("github",n)}function ol(n){return En("group",n)}function Kr(n){return En("help",n)}function sl(n){return En("user",n)}function il(n){return En("warning",n)}const Lo=(0,i.Z)({popoverList:{minWidth:260,maxWidth:400}},{name:"BackstageSupportButton"}),xo=({icon:n})=>{var d;const a=(0,l.useApp)(),c=n&&(d=a.getSystemIcon(n))!=null?d:Kr;return t.createElement(c,null)},Oo=({link:n})=>{var a;return t.createElement(T,{to:n.url},(a=n.title)!=null?a:n.url)},Do=({item:n})=>{var a;return t.createElement(Je.Z,null,t.createElement(Ao.Z,null,t.createElement(xo,{icon:n.icon})),t.createElement(ht.Z,{primary:n.title,secondary:(a=n.links)==null?void 0:a.reduce((c,d,p)=>[...c,p>0&&t.createElement("br",{key:p}),t.createElement(Oo,{link:d,key:d.url})],[])}))};function Fo(n){const{title:a,children:c}=n,{items:d}=Ta(),[p,v]=(0,t.useState)(!1),[O,U]=(0,t.useState)(null),k=Lo(),j=(0,je.Z)(Ce=>Ce.breakpoints.down("sm")),le=Ce=>{U(Ce.currentTarget),v(!0)},re=()=>{v(!1)};return t.createElement(t.Fragment,null,t.createElement(un.Z,{display:"flex",ml:1},j?t.createElement(D.Z,{color:"primary",size:"small",onClick:le,"data-testid":"support-button"},t.createElement(Kr,null)):t.createElement(h.Z,{"data-testid":"support-button",color:"primary",onClick:le,startIcon:t.createElement(Kr,null)},"Support")),t.createElement(Ra.ZP,{"data-testid":"support-button-popover",open:p,anchorEl:O,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},onClose:re},t.createElement(Ve.Z,{className:k.popoverList},a&&t.createElement(Je.Z,{alignItems:"flex-start"},t.createElement(De.Z,{variant:"subtitle1"},a)),t.Children.map(c,(Ce,Re)=>t.createElement(Je.Z,{alignItems:"flex-start",key:`child-${Re}`},Ce)),d&&d.map((Ce,Re)=>t.createElement(Do,{item:Ce,key:`item-${Re}`}))),t.createElement(vo.Z,null,t.createElement(h.Z,{color:"primary",onClick:re},"Close"))))}var oa=e(18671),fn=e(10289);const Jr=72,Pa=24,ba=18,Ln={drawerWidthClosed:Jr,drawerWidthOpen:224,defaultOpenDelayMs:100,defaultCloseDelayMs:0,defaultFadeDuration:200,logoHeight:32,iconContainerWidth:Jr,iconSize:Jr-Pa*2,iconPadding:Pa,selectedIndicatorWidth:3,userBadgePadding:ba,userBadgeDiameter:Jr-ba*2,mobileSidebarHeight:56},Bo=n=>({...Ln,...n,iconContainerWidth:Ln.drawerWidthClosed,iconSize:Ln.drawerWidthClosed-Ln.iconPadding*2,userBadgeDiameter:Ln.drawerWidthClosed-Ln.userBadgePadding*2}),Ia={drawerWidthClosed:0,drawerWidthOpen:202,defaultOpenDelayMs:Ln.defaultOpenDelayMs+200},Mo=n=>({...Ia,...n}),ll="@backstage/core/sidebar-intro-dismissed",xr=(0,t.createContext)({isOpen:!1,setOpen:()=>{}}),Cn=(0,t.createContext)({sidebarConfig:Ln,submenuConfig:Ia}),La=(0,t.createContext)({isHoveredOn:!1,setIsHoveredOn:()=>{}});var Yr;(function(n){const a="sidebarPinState";n.SIDEBAR_PIN_STATE=a})(Yr||(Yr={}));const xa={getSidebarPinState(){let n;try{n=JSON.parse(window.localStorage.getItem(Yr.SIDEBAR_PIN_STATE)||"true")}catch{return!0}return!!n},setSidebarPinState(n){return window.localStorage.setItem(Yr.SIDEBAR_PIN_STATE,JSON.stringify(n))}},Zo=(0,i.Z)(n=>({root:a=>({width:"100%",transition:"padding-left 0.1s ease-out",isolation:"isolate",[n.breakpoints.up("sm")]:{paddingLeft:()=>a.isPinned?a.sidebarConfig.drawerWidthOpen:a.sidebarConfig.drawerWidthClosed},[n.breakpoints.down("xs")]:{paddingBottom:a.sidebarConfig.mobileSidebarHeight}}),content:{zIndex:0,isolation:"isolate","&:focus":{outline:0}}}),{name:"BackstageSidebarPage"}),or=(0,t.createContext)({isPinned:!0,toggleSidebarPinState:()=>{},isMobile:!1}),Oa=(0,t.createContext)({content:{contentRef:void 0}});function $o(n){const[a,c]=(0,t.useState)(()=>xa.getSidebarPinState()),{sidebarConfig:d}=(0,t.useContext)(Cn),p=(0,t.useRef)(null),v=(0,t.useMemo)(()=>({content:{contentRef:p}}),[p]);(0,t.useEffect)(()=>{xa.setSidebarPinState(a)},[a]);const O=(0,je.Z)(j=>j.breakpoints.down("xs"),{noSsr:!0}),U=()=>c(!a),k=Zo({isPinned:a,sidebarConfig:d});return t.createElement(or.Provider,{value:{isPinned:a,toggleSidebarPinState:U,isMobile:O}},t.createElement(Oa.Provider,{value:v},t.createElement("div",{className:k.root},n.children)))}function sa(){const{content:n}=(0,t.useContext)(Oa);return{focusContent:(0,t.useCallback)(()=>{var c,d;(d=(c=n==null?void 0:n.contentRef)==null?void 0:c.current)==null||d.focus()},[n]),contentRef:n==null?void 0:n.contentRef}}var No=e(50023),Uo=e(4190),wo=e(87685),zo=e(44882),Wo=e(57998);const Ho=(0,i.Z)(n=>({root:{flexGrow:0,margin:n.spacing(0,2),color:n.palette.navigation.color},selected:a=>({color:`${n.palette.navigation.selectedColor}!important`,borderTop:`solid ${a.sidebarConfig.selectedIndicatorWidth}px ${n.palette.navigation.indicator}`,marginTop:"-1px"}),label:{display:"none"}})),jo=n=>{const{to:a,label:c,icon:d,value:p}=n,{sidebarConfig:v}=(0,t.useContext)(Cn),O=Ho({sidebarConfig:v}),U=(0,fn.TH)(),{selectedMenuItemIndex:k,setSelectedMenuItemIndex:j}=(0,t.useContext)(Ba),le=(Ce,Re)=>{j(Re===k?-1:Re)},re=p===k&&k>=0||p!==k&&!(k>=0)&&a===U.pathname;return t.createElement(Wo.Z,{label:c,icon:d,component:T,to:a||U.pathname,onChange:le,value:p,selected:re,classes:O})},Da=n=>{const{children:a,to:c,label:d,icon:p,value:v}=n,{isMobile:O}=(0,t.useContext)(or);return O?t.createElement(jo,{to:c,label:d,icon:p,value:v}):t.createElement(t.Fragment,null,a)},Fa=(0,i.Z)(n=>({root:{position:"fixed",backgroundColor:n.palette.navigation.background,color:n.palette.navigation.color,bottom:0,left:0,right:0,zIndex:n.zIndex.snackbar,borderTop:"1px solid #383838"},overlay:a=>({background:n.palette.navigation.background,width:"100%",bottom:`${a.sidebarConfig.mobileSidebarHeight}px`,height:`calc(100% - ${a.sidebarConfig.mobileSidebarHeight}px)`,flex:"0 1 auto",overflow:"auto"}),overlayHeader:{display:"flex",color:n.palette.bursts.fontColor,alignItems:"center",justifyContent:"space-between",padding:n.spacing(2,3)},overlayHeaderClose:{color:n.palette.bursts.fontColor},marginMobileSidebar:a=>({marginBottom:`${a.sidebarConfig.mobileSidebarHeight}px`})})),Vo=n=>(0,ar.orderBy)(n,({props:{priority:a}})=>Number.isInteger(a)?a:-1,"desc"),Go=t.createElement(Da).type,Ko=({children:n,label:a="Menu",open:c,onClose:d})=>{const{sidebarConfig:p}=(0,t.useContext)(Cn),v=Fa({sidebarConfig:p});return t.createElement(Uo.ZP,{anchor:"bottom",open:c,onClose:d,ModalProps:{BackdropProps:{classes:{root:v.marginMobileSidebar}}},classes:{root:v.marginMobileSidebar,paperAnchorBottom:v.overlay}},t.createElement(un.Z,{className:v.overlayHeader},t.createElement(De.Z,{variant:"h3"},a),t.createElement(D.Z,{onClick:d,classes:{root:v.overlayHeaderClose}},t.createElement(wo.Z,null))),t.createElement(un.Z,null,n))},Ba=(0,t.createContext)({selectedMenuItemIndex:-1,setSelectedMenuItemIndex:()=>{}}),Jo=n=>{const{sidebarConfig:a}=(0,t.useContext)(Cn),{children:c}=n,d=Fa({sidebarConfig:a}),p=(0,fn.TH)(),[v,O]=(0,t.useState)(-1);(0,t.useEffect)(()=>{O(-1)},[p.pathname]);let U=(0,l.useElementFilter)(c,j=>j.getElements().filter(le=>le.type===Go));if(c)U.length?U=Vo(U):U.push(t.createElement(Da,{key:"default_menu",icon:t.createElement(zo.Z,null)},c));else return null;const k=v>=0&&!U[v].props.to;return t.createElement(xr.Provider,{value:{isOpen:!0,setOpen:()=>{}}},t.createElement(Ba.Provider,{value:{selectedMenuItemIndex:v,setSelectedMenuItemIndex:O}},t.createElement(Ko,{label:U[v]&&U[v].props.label,open:k,onClose:()=>O(-1)},U[v]&&U[v].props.children),t.createElement(No.Z,{className:d.root,"data-testid":"mobile-sidebar-root"},U)))},Ma=(0,i.Z)(n=>({drawer:a=>({display:"flex",flexFlow:"column nowrap",alignItems:"flex-start",position:"fixed",left:0,top:0,bottom:0,zIndex:n.zIndex.appBar,background:n.palette.navigation.background,overflowX:"hidden",msOverflowStyle:"none",scrollbarWidth:"none",width:a.sidebarConfig.drawerWidthClosed,transition:n.transitions.create("width",{easing:n.transitions.easing.sharp,duration:n.transitions.duration.shortest}),"& > *":{flexShrink:0},"&::-webkit-scrollbar":{display:"none"}}),drawerOpen:a=>({width:a.sidebarConfig.drawerWidthOpen,transition:n.transitions.create("width",{easing:n.transitions.easing.sharp,duration:n.transitions.duration.shorter})}),visuallyHidden:{top:0,position:"absolute",zIndex:1e3,transform:"translateY(-200%)","&:focus":{transform:"translateY(5px)"}}}),{name:"BackstageSidebar"});var an;(function(n){n[n.Closed=0]="Closed";const c=0+1;n[n.Idle=c]="Idle";const d=c+1;n[n.Open=d]="Open"})(an||(an={}));const Yo=n=>{const{sidebarConfig:a}=(0,t.useContext)(Cn),{openDelayMs:c=a.defaultOpenDelayMs,closeDelayMs:d=a.defaultCloseDelayMs,disableExpandOnHover:p,children:v}=n,O=Ma({sidebarConfig:a}),U=(0,je.Z)(Nt=>Nt.breakpoints.down("md"),{noSsr:!0}),[k,j]=(0,t.useState)(an.Closed),le=(0,t.useRef)(),{isPinned:re,toggleSidebarPinState:Ce}=(0,t.useContext)(or),Re=()=>{re||p||(le.current&&(clearTimeout(le.current),le.current=void 0),k!==an.Open&&!U&&(le.current=window.setTimeout(()=>{le.current=void 0,j(an.Open)},c),j(an.Idle)))},be=()=>{re||p||(le.current&&(clearTimeout(le.current),le.current=void 0),k===an.Idle?j(an.Closed):k===an.Open&&(le.current=window.setTimeout(()=>{le.current=void 0,j(an.Closed)},d)))},mt=k===an.Open&&!U||re,Ot=Nt=>{Nt?(j(an.Open),Ce()):(j(an.Closed),Ce())};return t.createElement("div",{style:{}},t.createElement(Qo,null),t.createElement(xr.Provider,{value:{isOpen:mt,setOpen:Ot}},t.createElement("div",{className:O.root,"data-testid":"sidebar-root",onMouseEnter:p?()=>{}:Re,onFocus:p?()=>{}:Re,onMouseLeave:p?()=>{}:be,onBlur:p?()=>{}:be},t.createElement("div",{className:ie()(O.drawer,{[O.drawerOpen]:mt})},v))))},ko=n=>{var k,j;const a=Bo((k=n.sidebarOptions)!=null?k:{}),c=Mo((j=n.submenuOptions)!=null?j:{}),{children:d,disableExpandOnHover:p,openDelayMs:v,closeDelayMs:O}=n,{isMobile:U}=(0,t.useContext)(or);return U?t.createElement(Jo,null,d):t.createElement(Cn.Provider,{value:{sidebarConfig:a,submenuConfig:c}},t.createElement(Yo,{openDelayMs:v,closeDelayMs:O,disableExpandOnHover:p},d))};function Qo(){const{sidebarConfig:n}=(0,t.useContext)(Cn),{focusContent:a,contentRef:c}=sa(),d=Ma({sidebarConfig:n});return c!=null&&c.current?t.createElement(h.Z,{onClick:a,variant:"contained",className:ie()(d.visuallyHidden)},"Skip to content"):null}function Za(n,a){const c=new URLSearchParams(a.search).toString(),d=Gr().parse(c),p=new URLSearchParams(n.search).toString(),v=Gr().parse(p);return(0,ar.isEqual)(a.pathname,n.pathname)&&(0,ar.isMatch)(v,d)}const Xo=(0,i.Z)(n=>({item:{height:48,width:"100%","&:hover":{background:"#6f6f6f",color:n.palette.navigation.selectedColor},display:"flex",alignItems:"center",color:n.palette.navigation.color,padding:20,cursor:"pointer",position:"relative",background:"none",border:"none"},itemContainer:{width:"100%"},selected:{background:"#6f6f6f",color:"#FFF"},label:{margin:14,marginLeft:7,fontSize:14},dropdownArrow:{position:"absolute",right:21},dropdown:{display:"flex",flexDirection:"column",alignItems:"end"},dropdownItem:{width:"100%",padding:"10px 0 10px 0"},textContent:{color:n.palette.navigation.color,display:"flex",justifyContent:"center",[n.breakpoints.down("xs")]:{display:"block",paddingLeft:n.spacing(4)},fontSize:"14px"}}),{name:"BackstageSidebarSubmenuItem"}),cl=n=>{const{title:a,to:c,icon:d,dropdownItems:p}=n,v=Xo(),{setIsHoveredOn:O}=useContext(SidebarItemWithSubmenuContext),U=()=>{O(!1)},k=useResolvedPath(c),j=useLocation();let le=isLocationMatch(j,k);const[re,Ce]=useState(!1),Re=()=>{Ce(!re)};return p!==void 0?(p.some(be=>{const mt=resolvePath(be.to);return le=isLocationMatch(j,mt),le}),React.createElement("div",{className:v.itemContainer},React.createElement("button",{onClick:Re,onTouchStart:be=>be.stopPropagation(),className:classnames(v.item,le?v.selected:void 0)},React.createElement(d,{fontSize:"small"}),React.createElement(Typography,{variant:"subtitle1",className:v.label},a),re?React.createElement(ArrowDropUpIcon,{className:v.dropdownArrow}):React.createElement(ArrowDropDownIcon,{className:v.dropdownArrow})),p&&re&&React.createElement("div",{className:v.dropdown},p.map((be,mt)=>React.createElement(Link,{to:be.to,underline:"none",className:v.dropdownItem,onClick:U,onTouchStart:Ot=>Ot.stopPropagation(),key:mt},React.createElement(Typography,{className:v.textContent},be.title)))))):React.createElement("div",{className:v.itemContainer},React.createElement(Link,{to:c,underline:"none",className:classnames(v.item,le?v.selected:void 0),onClick:U,onTouchStart:be=>be.stopPropagation()},React.createElement(d,{fontSize:"small"}),React.createElement(Typography,{variant:"subtitle1",className:v.label},a)))},qo=(0,i.Z)(n=>({root:{zIndex:1e3,position:"relative",overflow:"visible",width:n.spacing(7)+1},drawer:a=>{var c,d;return{display:"flex",flexFlow:"column nowrap",alignItems:"flex-start",position:"fixed",[n.breakpoints.up("sm")]:{marginLeft:a.left,transition:n.transitions.create("margin-left",{easing:n.transitions.easing.sharp,duration:n.transitions.duration.shortest})},top:0,bottom:0,padding:0,background:(d=(c=n.palette.navigation.submenu)==null?void 0:c.background)!=null?d:"#404040",overflowX:"hidden",msOverflowStyle:"none",scrollbarWidth:"none",cursor:"default",width:a.submenuConfig.drawerWidthClosed,transitionDelay:`${a.submenuConfig.defaultOpenDelayMs}ms`,"& > *":{flexShrink:0},"&::-webkit-scrollbar":{display:"none"}}},drawerOpen:a=>({width:a.submenuConfig.drawerWidthOpen,[n.breakpoints.down("xs")]:{width:"100%",position:"relative",paddingLeft:n.spacing(3),left:0,top:0}}),title:{fontSize:24,fontWeight:500,color:"#FFF",padding:20,[n.breakpoints.down("xs")]:{display:"none"}}}),{name:"BackstageSidebarSubmenu"}),_o=n=>{const{isOpen:a}=(0,t.useContext)(xr),{sidebarConfig:c,submenuConfig:d}=(0,t.useContext)(Cn),p=a?c.drawerWidthOpen:c.drawerWidthClosed,v=qo({left:p,submenuConfig:d}),{isHoveredOn:O}=(0,t.useContext)(La),[U,k]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{k(O)},[O]),t.createElement("div",{className:ie()(v.drawer,{[v.drawerOpen]:U})},t.createElement(De.Z,{variant:"h5",className:v.title},n.title),n.children)};var kr=e(76600),es=e(26739),ts=e(98989),ns=e(59797),rs=e(83543);const as=(0,i.Z)({iconContainer:{display:"flex",position:"relative",width:"100%"},arrow1:{right:"6px",position:"absolute"}}),ul=()=>{const n=as();return React.createElement("div",{className:n.iconContainer},React.createElement("div",{className:n.arrow1},React.createElement(ArrowBackIosIcon,{style:{fontSize:"12px"}})),React.createElement("div",null,React.createElement(ArrowBackIosIcon,{style:{fontSize:"12px"}})))};var dl=null;const os=(0,i.Z)({iconContainer:{display:"flex",position:"relative",width:"100%"},arrow1:{right:"6px",position:"absolute"}}),fl=()=>{const n=os();return React.createElement("div",{className:n.iconContainer},React.createElement("div",{className:n.arrow1},React.createElement(ArrowForwardIosIcon,{style:{fontSize:"12px"}})),React.createElement("div",null,React.createElement(ArrowForwardIosIcon,{style:{fontSize:"12px"}})))};var ml=null;const Qr=(0,i.Z)(n=>{var a,c,d,p;return{root:{color:n.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"},closed:v=>({width:v.sidebarConfig.drawerWidthClosed,justifyContent:"center"}),open:v=>({[n.breakpoints.up("sm")]:{width:v.sidebarConfig.drawerWidthOpen}}),highlightable:{"&:hover":{background:(c=(a=n.palette.navigation.navItem)==null?void 0:a.hoverBackground)!=null?c:"#404040"}},highlighted:{background:(p=(d=n.palette.navigation.navItem)==null?void 0:d.hoverBackground)!=null?p:"#404040"},label:{fontWeight:"bold",whiteSpace:"nowrap",lineHeight:"auto",flex:"3 1 auto",width:"110px",overflow:"hidden","text-overflow":"ellipsis"},iconContainer:v=>({boxSizing:"border-box",height:"100%",width:v.sidebarConfig.iconContainerWidth,marginRight:-n.spacing(2),display:"flex",alignItems:"center",justifyContent:"center"}),searchRoot:{marginBottom:12},searchField:{color:"#b5b5b5",fontWeight:"bold",fontSize:n.typography.fontSize},searchFieldHTMLInput:{padding:n.spacing(2,0,2)},searchContainer:v=>({width:v.sidebarConfig.drawerWidthOpen-v.sidebarConfig.iconContainerWidth}),secondaryAction:{width:n.spacing(6),textAlign:"center",marginRight:n.spacing(1)},closedItemIcon:{width:"100%",justifyContent:"center"},submenuArrow:{display:"flex"},expandButton:{background:"none",border:"none",color:n.palette.navigation.color,width:"100%",cursor:"pointer",position:"relative",height:48},arrows:{position:"absolute",right:10},selected:v=>({"&$root":{borderLeft:`solid ${v.sidebarConfig.selectedIndicatorWidth}px ${n.palette.navigation.indicator}`,color:n.palette.navigation.selectedColor},"&$closed":{width:v.sidebarConfig.drawerWidthClosed},"& $closedItemIcon":{paddingRight:v.sidebarConfig.selectedIndicatorWidth},"& $iconContainer":{marginLeft:-v.sidebarConfig.selectedIndicatorWidth}})}},{name:"BackstageSidebarItem"}),ss=(n,a)=>(0,l.useElementFilter)(n.props.children,c=>{let d=!1;return c.getElements().forEach(({props:{to:p,dropdownItems:v}})=>{if(!d){if(v!=null&&v.length){v.forEach(({to:O})=>d=d||Za(a,(0,fn.i3)(O)));return}p&&(d=Za(a,(0,fn.i3)(p)))}}),d},[a.pathname]);function $a(n){return n.to===void 0}const is=t.createElement(_o).type,ls=t.forwardRef(function({to:a,end:c,style:d,className:p,activeStyle:v,caseSensitive:O,activeClassName:U="active","aria-current":k="page",...j},le){let{pathname:re}=(0,fn.TH)(),{pathname:Ce}=(0,fn.WU)(a);O||(re=re.toLocaleLowerCase("en-US"),Ce=Ce.toLocaleLowerCase("en-US"));let Re=re===Ce;!Re&&!c&&(Re=re.startsWith(`${Ce}/`));const be=Re?k:void 0;return t.createElement(R.rU,{...j,to:a,ref:le,"aria-current":be,style:{...d,...Re?v:void 0},className:ie()([p,Re?U:void 0])})}),Na=(0,t.forwardRef)((n,a)=>{const{icon:c,text:d,hasNotifications:p=!1,disableHighlight:v=!1,onClick:O,children:U,className:k,...j}=n,{sidebarConfig:le}=(0,t.useContext)(Cn),re=Qr({sidebarConfig:le}),{isOpen:Ce}=(0,t.useContext)(xr),Re=t.createElement(es.Z,{color:"secondary",variant:"dot",overlap:"circular",invisible:!p,className:ie()({[re.closedItemIcon]:!Ce})},t.createElement(c,{fontSize:"small"})),be=t.createElement(t.Fragment,null,t.createElement("div",{"data-testid":"login-button",className:re.iconContainer},Re),d&&t.createElement(De.Z,{variant:"subtitle2",className:re.label},d),t.createElement("div",{className:re.secondaryAction},U)),mt=Ce?be:Re,Ot={onClick:O,className:ie()(k,re.root,Ce?re.open:re.closed,$a(n)&&re.buttonItem,{[re.highlightable]:!v})};return $a(n)?t.createElement("button",{"aria-label":d,...Ot,ref:a},mt):t.createElement(ls,{...Ot,activeClassName:re.selected,to:n.to?n.to:"",ref:a,"aria-label":d||n.to,...j},mt)}),cs=({children:n,...a})=>{const{sidebarConfig:c}=(0,t.useContext)(Cn),d=Qr({sidebarConfig:c}),[p,v]=(0,t.useState)(!1),O=(0,fn.TH)(),U=ss(n,O),k=(0,je.Z)(Ce=>Ce.breakpoints.down("sm")),j=()=>{v(!0)},le=()=>{v(!1)},re=()=>k?p?t.createElement(ns.Z,{fontSize:"small",className:d.submenuArrow}):t.createElement(rs.Z,{fontSize:"small",className:d.submenuArrow}):!p&&t.createElement(ts.Z,{fontSize:"small",className:d.submenuArrow});return t.createElement(La.Provider,{value:{isHoveredOn:p,setIsHoveredOn:v}},t.createElement("div",{"data-testid":"item-with-submenu",onMouseLeave:le,onTouchStart:p?le:j,onMouseEnter:j,className:ie()(p&&d.highlighted)},t.createElement(Na,{className:U?d.selected:"",...a},re()),p&&n))},Ua=(0,t.forwardRef)((n,a)=>{const[c]=(0,l.useElementFilter)(n.children,d=>d.getElements().filter(p=>p.type===is));return c?t.createElement(cs,{...n},c):t.createElement(Na,{...n,ref:a})});function hl(n){const{sidebarConfig:a}=useContext(SidebarConfigContext),[c,d]=useState(""),p=Qr({sidebarConfig:a}),v=n.icon?n.icon:SearchIcon,O=()=>{n.onSearch(c),d("")},U=re=>{re.key==="Enter"&&(re.preventDefault(),O())},k=re=>{d(re.target.value)},j=re=>{re.preventDefault(),re.stopPropagation()},le=re=>{O(),re.preventDefault()};return React.createElement("div",{className:p.searchRoot},React.createElement(Ua,{icon:v,to:n.to,onClick:le,disableHighlight:!0},React.createElement(TextField,{placeholder:"Search",value:c,onClick:j,onChange:k,onKeyDown:U,className:p.searchContainer,InputProps:{disableUnderline:!0,className:p.searchField},inputProps:{className:p.searchFieldHTMLInput}})))}const gl=(0,kr.Z)("div")({flex:1},{name:"BackstageSidebarSpace"}),pl=(0,kr.Z)("div")({height:8},{name:"BackstageSidebarSpacer"}),us=(0,kr.Z)("hr")({height:1,width:"100%",background:"#383838",border:"none",margin:"12px 0px"},{name:"BackstageSidebarDivider"}),ds=n=>({overflowY:"auto","&::-webkit-scrollbar":{backgroundColor:n.palette.background.default,width:"5px",borderRadius:"5px"},"&::-webkit-scrollbar-thumb":{backgroundColor:n.palette.text.hint,borderRadius:"5px"}}),yl=(0,kr.Z)("div")(({theme:n})=>{const a=ds(n);return{flex:"0 1 auto",overflowX:"hidden",width:"calc(100% - 5px)",minHeight:"48px",overflowY:"hidden","@media (hover: none)":a,"&:hover":a}}),El=()=>{const{sidebarConfig:n}=useContext(SidebarConfigContext),a=Qr({sidebarConfig:n}),{isOpen:c,setOpen:d}=useContext(SidebarContext);if(useMediaQuery(O=>O.breakpoints.down("md"),{noSsr:!0}))return null;const v=()=>{d(!c)};return React.createElement("button",{onClick:v,className:a.expandButton,"aria-label":"Expand Sidebar","data-testid":"sidebar-expand-button"},React.createElement("div",{className:a.arrows},c?React.createElement(DoubleArrowLeft,null):React.createElement(DoubleArrowRight,null)))},fs=(0,i.Z)(n=>({introCard:a=>({color:"#b5b5b5",fontSize:12,width:a.sidebarConfig.drawerWidthOpen,marginTop:18,marginBottom:12,paddingLeft:a.sidebarConfig.iconPadding,paddingRight:a.sidebarConfig.iconPadding}),introDismiss:{display:"flex",justifyContent:"flex-end",alignItems:"center",marginTop:12},introDismissLink:{color:"#dddddd",display:"flex",alignItems:"center",marginBottom:4,"&:hover":{color:n.palette.linkHover,transition:n.transitions.create("color",{easing:n.transitions.easing.sharp,duration:n.transitions.duration.shortest})}},introDismissText:{fontSize:"0.7rem",fontWeight:"bold",textTransform:"uppercase",letterSpacing:1},introDismissIcon:{width:18,height:18,marginRight:12}}),{name:"BackstageSidebarIntro"});function ms(n){const{sidebarConfig:a}=useContext(SidebarConfigContext),c=fs({sidebarConfig:a}),{text:d,onClose:p}=n,v=()=>p();return React.createElement("div",{className:c.introCard},React.createElement(Typography,{variant:"subtitle2"},d),React.createElement("div",{className:c.introDismiss},React.createElement(Link,{component:"button",onClick:v,underline:"none",className:c.introDismissLink},React.createElement(CloseIcon,{className:c.introDismissIcon}),React.createElement(Typography,{component:"span",className:c.introDismissText},"Dismiss"))))}const wa=n=>{const{text:a,onDismiss:c}=n,[d,p]=useState(!1),v=()=>{p(!0)};return React.createElement(Collapse,{in:!d,onExited:c},React.createElement(ms,{text:a,onClose:v}))},hs=null,gs="And your recently viewed plugins will pop up here!";function vl(n){const{isOpen:a}=useContext(SidebarContext),c={starredItemsDismissed:!1,recentlyViewedItemsDismissed:!1},[d,p]=useLocalStorageValue(SIDEBAR_INTRO_LOCAL_STORAGE),{starredItemsDismissed:v,recentlyViewedItemsDismissed:O}=d!=null?d:{},U=()=>{p(j=>({...c,...j,starredItemsDismissed:!0}))},k=()=>{p(j=>({...c,...j,recentlyViewedItemsDismissed:!0}))};return a?React.createElement(React.Fragment,null,!v&&React.createElement(React.Fragment,null,React.createElement(wa,{text:hs,onDismiss:U}),React.createElement(SidebarDivider,null)),!O&&React.createElement(wa,{text:gs,onDismiss:k})):null}const ps=(0,i.Z)(n=>({root:{gridArea:"pageContent",minWidth:0,paddingTop:n.spacing(3),paddingBottom:n.spacing(3),paddingLeft:n.spacing(2),paddingRight:n.spacing(2),[n.breakpoints.up("sm")]:{paddingLeft:n.spacing(3),paddingRight:n.spacing(3)}},stretch:{display:"flex",flexDirection:"column",flexGrow:1},noPadding:{padding:0}}),{name:"BackstageContent"});function za(n){const{className:a,stretch:c,noPadding:d,children:p,...v}=n,{contentRef:O}=sa(),U=ps();return t.createElement("article",{ref:O,tabIndex:-1,...v,className:ie()(U.root,a,{[U.stretch]:c,[U.noPadding]:d})},p)}var ys=e(6487),Es=e(99152);const vs=(0,i.Z)(n=>({tabsWrapper:{gridArea:"pageSubheader",backgroundColor:n.palette.background.paper,paddingLeft:n.spacing(3)},defaultTab:{padding:n.spacing(3,3),...n.typography.caption,textTransform:"uppercase",fontWeight:"bold",color:n.palette.text.secondary},selected:{color:n.palette.text.primary},tabRoot:{"&:hover":{backgroundColor:n.palette.background.default,color:n.palette.text.primary}}}),{name:"BackstageHeaderTabs"});function Wa(n){const{tabs:a,onChange:c,selectedIndex:d}=n,[p,v]=(0,t.useState)(d!=null?d:0),O=vs(),U=(k,j)=>{d===void 0&&v(j),c&&c(j)};return(0,t.useEffect)(()=>{d!==void 0&&v(d)},[d]),t.createElement("div",{className:O.tabsWrapper},t.createElement(Es.Z,{selectionFollowsFocus:!0,indicatorColor:"primary",textColor:"inherit",variant:"scrollable",scrollButtons:"auto","aria-label":"scrollable auto tabs example",onChange:U,value:p},a.map((k,j)=>t.createElement(ys.Z,{...k.tabProps,"data-testid":`header-tab-${j}`,label:k.label,key:k.id,value:j,className:O.defaultTab,classes:{selected:O.selected,root:O.tabRoot}}))))}function As(n){var U,k,j;const a=(0,fn.UO)(),d=n.map(({path:le,children:re})=>({caseSensitive:!1,path:`${le}/*`,element:re})).sort((le,re)=>re.path.replace(/\/\*$/,"").localeCompare(le.path.replace(/\/\*$/,""))),p=(U=(0,fn.V$)(d))!=null?U:n[0].children,[v]=(k=(0,fn.fp)(d,`/${a["*"]}`))!=null?k:[],O=v?n.findIndex(le=>`${le.path}/*`===v.route.path):0;return{index:O===-1?0:O,element:p,route:(j=n[O])!=null?j:n[0]}}function Ha(n){const{routes:a}=n,c=(0,fn.s0)(),{index:d,route:p,element:v}=As(a),O=(0,t.useMemo)(()=>a.map(k=>({id:k.path,label:k.title,tabProps:k.tabProps})),[a]),U=k=>c(a[k].path.replace(/\/\*$/,"").replace(/^\//,""));return t.createElement(t.Fragment,null,t.createElement(Wa,{tabs:O,selectedIndex:d,onChange:U}),t.createElement(za,null,t.createElement(oa.q,{title:p.title}),v))}const ia=()=>null;(0,l.attachComponentData)(ia,"core.gatherMountPoints",!0);function ja(n){const a=t.createElement(ia,{path:"",title:""},t.createElement("div",null)).type;return t.Children.toArray(n).flatMap(c=>{if(!(0,t.isValidElement)(c))return[];if(c.type===t.Fragment)return ja(c.props.children);if(c.type!==a)throw new Error("Child of TabbedLayout must be an TabbedLayout.Route");const{path:d,title:p,children:v,tabProps:O}=c.props;return[{path:d,title:p,children:v,tabProps:O}]})}function Rs(n){const a=ja(n.children);return t.createElement(Ha,{routes:a})}Rs.Route=ia;const Cs=(0,i.Z)(n=>({value:{marginBottom:"6px"},subvalue:{color:n.palette.textSubtle,fontWeight:"normal"}}),{name:"BackstageSubvalueCell"});function Ss(n){const{value:a,subvalue:c}=n,d=Cs();return t.createElement(t.Fragment,null,t.createElement("div",{className:d.value},a),t.createElement("div",{className:d.subvalue},c))}var Ts=e(21070),Ps=e(90324),bs=e(98281),Is=e(48049),Va=e(51209),Ga=e(33375),Ls=e(44233),xs=e(27604),la=e(36444),Os=e(37971),Ds=e(59709),Fs=e(17373),Bs=e(3702),Ms=e(93111),Xr=e(67222);const Zs=(0,i.Z)(n=>({root:{height:"100%",width:"315px",display:"flex",flexDirection:"column",marginRight:n.spacing(3)},value:{fontWeight:"bold",fontSize:18},header:{display:"flex",alignItems:"center",height:"60px",justifyContent:"space-between",borderBottom:`1px solid ${n.palette.grey[500]}`},filters:{display:"flex",flexDirection:"column","& > *":{marginTop:n.spacing(2)}}}),{name:"BackstageTableFilters"}),$s=n=>{var k;const a=Zs(),{onChangeFilters:c}=n,[d,p]=(0,t.useState)({...n.selectedFilters}),[v,O]=(0,t.useState)(!1),U=()=>{p({}),O(j=>!j)};return(0,t.useEffect)(()=>{c(d)},[d,c]),t.createElement("div",{className:a.root},t.createElement("div",{className:a.header},t.createElement("div",{className:a.value},"Filters"),t.createElement(h.Z,{color:"primary",onClick:U},"Clear all")),t.createElement("div",{className:a.filters},((k=n.filters)==null?void 0:k.length)&&n.filters.map(j=>t.createElement(tt,{triggerReset:v,key:j.element.label,...j.element,selected:d[j.element.label],onChange:le=>p({...d,[j.element.label]:le})}))))},Ns={Add:(0,t.forwardRef)((n,a)=>t.createElement(Ts.Z,{...n,ref:a})),Check:(0,t.forwardRef)((n,a)=>t.createElement(bs.Z,{...n,ref:a})),Clear:(0,t.forwardRef)((n,a)=>t.createElement(Ga.Z,{...n,ref:a})),Delete:(0,t.forwardRef)((n,a)=>t.createElement(Ls.Z,{...n,ref:a})),DetailPanel:(0,t.forwardRef)((n,a)=>t.createElement(Va.Z,{...n,ref:a})),Edit:(0,t.forwardRef)((n,a)=>t.createElement(xs.Z,{...n,ref:a})),Export:(0,t.forwardRef)((n,a)=>t.createElement(Bs.Z,{...n,ref:a})),Filter:(0,t.forwardRef)((n,a)=>t.createElement(la.Z,{...n,ref:a})),FirstPage:(0,t.forwardRef)((n,a)=>t.createElement(Os.Z,{...n,ref:a})),LastPage:(0,t.forwardRef)((n,a)=>t.createElement(Ds.Z,{...n,ref:a})),NextPage:(0,t.forwardRef)((n,a)=>t.createElement(Va.Z,{...n,ref:a})),PreviousPage:(0,t.forwardRef)((n,a)=>t.createElement(Is.Z,{...n,ref:a})),ResetSearch:(0,t.forwardRef)((n,a)=>t.createElement(Ga.Z,{...n,ref:a})),Search:(0,t.forwardRef)((n,a)=>t.createElement(la.Z,{...n,ref:a})),SortArrow:(0,t.forwardRef)((n,a)=>t.createElement(Ps.Z,{...n,ref:a})),ThirdStateCheck:(0,t.forwardRef)((n,a)=>t.createElement(Fs.Z,{...n,ref:a})),ViewColumn:(0,t.forwardRef)((n,a)=>t.createElement(Ms.Z,{...n,ref:a}))};function Ka(n,a){const c=a.split(".");let d=n[c[0]];for(let p=1;p<c.length;++p){if(d===void 0)return d;const v=c[p];d=d[v]}return d}const Us=(0,Kt.Z)(n=>({header:{padding:n.spacing(1,2,1,2.5),borderTop:`1px solid ${n.palette.grey.A100}`,borderBottom:`1px solid ${n.palette.grey.A100}`,color:n.palette.textSubtle,fontWeight:n.typography.fontWeightBold,position:"static",wordBreak:"normal"}}),{name:"BackstageTableHeader"})(Xr.W$),Ja=(0,Kt.Z)(n=>({root:{padding:n.spacing(3,0,2.5,2.5)},title:{"& > h6":{fontWeight:"bold"}},searchField:{paddingRight:n.spacing(2)}}),{name:"BackstageTableToolbar"})(Xr.UW),ws=(0,i.Z)(()=>({root:{display:"flex",alignItems:"center",justifyContent:"space-between"},title:{fontWeight:"bold",fontSize:18,whiteSpace:"nowrap"}}),{name:"BackstageTableFiltersContainer"}),zs=(0,i.Z)(()=>({root:{display:"flex",alignItems:"start"}}),{name:"BackstageTable"});function Ws(n,a){return n.map(c=>{const d={};let p=c.cellStyle||{};if(c.highlight)if(d.color=a.palette.textContrast,typeof p=="object")p.fontWeight=a.typography.fontWeightBold;else{const v=p;p=(O,U,k)=>({...v(O,U,k),fontWeight:a.typography.fontWeightBold})}return{...c,headerStyle:d,cellStyle:p}})}function Hs(n,a){return(0,ar.transform)(n,(c,d,p)=>{(0,ar.isEqual)(d,a[p])||(c[p]=d)})}const Ya={search:"",filtersOpen:!1,filters:{}};function js(n){const{toolbarRef:a,setSearch:c,hasFilters:d,selectedFiltersLength:p,toggleFilters:v}=n,O=ws(),U=(0,t.useCallback)(k=>{n.onSearchChanged(k),c(k)},[n,c]);return d?t.createElement("div",{className:O.root},t.createElement("div",{className:O.root},t.createElement(D.Z,{onClick:v,"aria-label":"filter list"},t.createElement(la.Z,null)),t.createElement(De.Z,{className:O.title},"Filters (",p,")")),t.createElement(Ja,{...n,ref:a,onSearchChanged:U})):t.createElement(Ja,{...n,ref:a,onSearchChanged:U})}function Vs(n){const{data:a,columns:c,options:d,title:p,subtitle:v,filters:O,initialState:U,emptyContent:k,onStateChange:j,...le}=n,re=zs(),Ce=(0,b.Z)(),Re={...Ya,...U},[be,mt]=(0,t.useState)(Re.filtersOpen),Ot=(0,t.useCallback)(()=>mt(Qt=>!Qt),[mt]),[Nt,Wt]=(0,t.useState)(0),[dt,Dt]=(0,t.useState)(a),[Ft,Jt]=(0,t.useState)(Re.filters),Fn=Ws(c,Ce),[mn,Dr]=(0,t.useState)(Re.search);(0,t.useEffect)(()=>{if(j){const Qt=Hs({search:mn,filtersOpen:be,filters:Ft},Ya);j(Qt)}},[mn,be,Ft,j]);const Pt={headerStyle:{textTransform:"uppercase"}},Bn=(0,t.useCallback)(Qt=>{var on;return(on=c.find(hn=>hn.title===Qt))==null?void 0:on.field},[c]);(0,t.useEffect)(()=>{if(typeof a=="function")return;if(!Ft){Dt(a);return}const Qt=Object.values(Ft);if(a&&Qt.flat().length){const on=a.filter(hn=>!!Object.entries(Ft).filter(([,Vn])=>!!Vn.length).every(([Vn,Vt])=>{const Gt=Ka(hn,Bn(Vn));return Array.isArray(Gt)&&Array.isArray(Vt)?Gt.some(sr=>Vt.includes(sr)):Array.isArray(Gt)?Gt.includes(Vt):Array.isArray(Vt)?Vt.includes(Gt):Gt===Vt}));Dt(on)}else Dt(a);Wt(Qt.flat().length)},[a,Ft,Bn]);const ma=(Qt,on)=>{const hn=Vt=>{const Gt=new Set,sr=Gn=>{Gn!=null&&Gt.add(Gn)};return on&&on.forEach(Gn=>{const ir=Ka(Gn,Bn(Vt));Array.isArray(ir)?ir.forEach(sr):sr(ir)}),Gt},Vn=Vt=>({placeholder:"All results",label:Vt.column,multiple:Vt.type==="multiple-select",items:[...hn(Vt.column)].sort().map(Gt=>({label:Gt,value:Gt}))});return Qt.map(Vt=>({type:Vt.type,element:Vn(Vt)}))},jn=!!(O!=null&&O.length),ha=(0,t.useCallback)(Qt=>t.createElement(js,{setSearch:Dr,hasFilters:jn,selectedFiltersLength:Nt,toggleFilters:Ot,...Qt}),[Ot,jn,Nt,Dr]),_r=typeof a!="function"&&a.length===0,ea=c.length,ga=(0,t.useCallback)(Qt=>k&&_r?t.createElement("tbody",null,t.createElement("tr",null,t.createElement("td",{colSpan:ea},k))):t.createElement(Xr.os,{...Qt}),[_r,k,ea]);return t.createElement("div",{className:re.root},be&&a&&typeof a!="function"&&(O==null?void 0:O.length)&&t.createElement($s,{filters:ma(O,a),selectedFilters:Ft,onChangeFilters:Jt}),t.createElement(Xr.ZP,{components:{Header:Us,Toolbar:ha,Body:ga},options:{...Pt,...d},columns:Fn,icons:Ns,title:t.createElement(t.Fragment,null,t.createElement(De.Z,{variant:"h5",component:"h3"},p),v&&t.createElement(De.Z,{color:"textSecondary",variant:"body1"},v)),data:typeof a=="function"?a:dt,style:{width:"100%"},localization:{toolbar:{searchPlaceholder:"Filter"}},...le}))}const Al=n=>{const{children:a,value:c,index:d,...p}=n;return React.createElement("div",{role:"tabpanel",hidden:c!==d,"aria-labelledby":`scrollable-auto-tab-${d}`,...p},c===d&&React.createElement(Box,{p:3},a))},Gs=(0,i.Z)(()=>({root:{color:"#6E6E6E",overflow:"visible",fontSize:"1.5rem",textAlign:"center",borderRadius:"50%",backgroundColor:"#E6E6E6",marginLeft:n=>n.isNext?"auto":"0",marginRight:n=>n.isNext?"0":"10px","&:hover":{backgroundColor:"#E6E6E6",opacity:"1"}}}),{name:"BackstageTabIcon"}),Rl=n=>{const a=Gs(n),{ariaLabel:c,onClick:d}=n;return React.createElement(IconButton,{onClick:d,className:a.root,size:"small",disableRipple:!0,disableFocusRipple:!0,"aria-label":c},n.children)},Ks=(n,a)=>a?n?"20px":"0":"40px",Js=(0,i.Z)(n=>({root:{textTransform:"none",height:"64px",fontWeight:n.typography.fontWeightBold,fontSize:n.typography.pxToRem(13),color:n.palette.textSubtle,marginLeft:a=>Ks(a.isFirstNav,a.isFirstIndex),width:"130px",minWidth:"130px","&:hover":{outline:"none",backgroundColor:"transparent",color:n.palette.textSubtle}}}),{name:"BackstageTab"}),Cl=n=>{const a=Js(n),{isFirstNav:c,isFirstIndex:d,...p}=n;return React.createElement(Tab,{classes:a,disableRipple:!0,...p})},Ys=(0,i.Z)(n=>({indicator:{display:"flex",justifyContent:"center",backgroundColor:n.palette.tabbar.indicator,height:"4px"},flexContainer:{alignItems:"center"},root:{"&:last-child":{marginLeft:"auto"}}}),{name:"BackstageTabBar"}),Sl=n=>{const a=Ys(n);return React.createElement(Tabs,{classes:a,...n,TabIndicatorProps:{children:React.createElement("span",null)}})},ks=(0,i.Z)(n=>({root:{flexGrow:1,width:"100%"},styledTabs:{backgroundColor:n.palette.background.paper},appbar:{boxShadow:"none",backgroundColor:n.palette.background.paper,paddingLeft:"10px",paddingRight:"10px"}}),{name:"BackstageTabs"});function Tl(n){const{tabs:a}=n,c=ks(),[d,p]=useState([0,0]),[v,O]=useState(0),[U,k]=useState(0),[j,le]=useState([[]]),re=useRef(),{width:Ce}=useWindowSize(),Re=(Wt,dt)=>{p([v,dt])},be=()=>{O(v-1)},mt=()=>{O(v+1)},Ot=()=>v+1<j.length;useEffect(()=>{const dt=v===0?1:2,Dt=re.current.offsetWidth-20-dt*30,Ft=d[0]*U+d[1],Jt=Math.floor(Dt/170);k(Jt),le(chunkArray(a,Jt)),p([Math.floor(Ft/Jt),Ft%Jt])},[Ce,a]);const Nt=v===d[0]?d[1]:!1;return React.createElement("div",{className:c.root},React.createElement(AppBar,{ref:re,className:c.appbar,position:"static"},React.createElement("div",null,React.createElement(StyledTabs,{value:Nt,onChange:Re,selectionFollowsFocus:!0},v!==0&&React.createElement(StyledIcon,{onClick:be,ariaLabel:"navigate-before"},React.createElement(NavigateBeforeIcon,null)),j[v].map((Wt,dt)=>React.createElement(StyledTab,{value:dt,isFirstIndex:dt===0,isFirstNav:v===0,key:dt,icon:Wt.icon||void 0,label:Wt.label||void 0})),Ot()&&React.createElement(StyledIcon,{isNext:!0,onClick:mt,ariaLabel:"navigate-next"},React.createElement(NavigateNextIcon,null))))),Nt!==!1?j[v].map((Wt,dt)=>React.createElement(TabPanel,{key:dt,value:dt,index:Nt},Wt.content)):React.createElement(TabPanel,{key:"panel_outside_chunked_array",value:d[1],index:d[1]},j[d[0]][d[1]].content))}var Pl=e(44311);function Qs(n,a){const c=n[n.length-1];if(!!c)return c>=.9?a.palette.status.ok:c>=.5?a.palette.status.warning:a.palette.status.error}function bl(n){var c;const a=useTheme();return n.data?React.createElement(Sparklines,{width:120,height:30,min:0,max:1,...n},n.title&&React.createElement("title",null,n.title),React.createElement(SparklinesLine,{color:(c=n.color)!=null?c:Qs(n.data,a)})):null}const Xs=n=>(0,i.Z)(a=>({container:{width:"100%",display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-end",alignItems:"center",marginBottom:a.spacing(2),textAlign:n.textAlign},leftItemsBox:{flex:"1 1 auto",minWidth:0,overflow:"visible"},rightItemsBox:{flex:"0 1 auto",display:"flex",flexDirection:"row",flexWrap:"wrap",alignItems:"center",marginLeft:a.spacing(1),minWidth:0,overflow:"visible"},description:{},title:{display:"inline-flex",marginBottom:0}}),{name:"BackstageContentHeader"}),_s=({title:n="Unknown page",className:a})=>t.createElement(De.Z,{variant:"h4",component:"h2",className:a,"data-testid":"header-title"},n);function ei(n){const{description:a,title:c,titleComponent:d=void 0,children:p,textAlign:v="left"}=n,O=Xs({textAlign:v})(),U=d||t.createElement(_s,{title:c,className:O.title});return t.createElement(t.Fragment,null,t.createElement(oa.q,{title:c}),t.createElement("div",{className:O.container},t.createElement("div",{className:O.leftItemsBox},U,a&&t.createElement(De.Z,{className:O.description,variant:"body2"},a)),t.createElement("div",{className:O.rightItemsBox},p)))}var ti=e(29788);const ni=(0,i.Z)(n=>({micDrop:{maxWidth:"60%",position:"absolute",bottom:n.spacing(2),right:n.spacing(2),[n.breakpoints.down("xs")]:{maxWidth:"96%",position:"relative",bottom:"unset",right:"unset",margin:`${n.spacing(10)}px auto ${n.spacing(4)}px`}}}),{name:"BackstageErrorPageMicDrop"}),ri=()=>{const n=ni();return t.createElement("img",{src:ti,className:n.micDrop,alt:"Girl dropping mic from her hands"})},ai=(0,i.Z)(n=>({container:{padding:n.spacing(8),[n.breakpoints.down("xs")]:{padding:n.spacing(2)}},title:{paddingBottom:n.spacing(5),[n.breakpoints.down("xs")]:{paddingBottom:n.spacing(4),fontSize:32}},subtitle:{color:n.palette.textSubtle}}),{name:"BackstageErrorPage"});function oi(n){const{status:a,statusMessage:c,additionalInfo:d,supportUrl:p}=n,v=ai(),O=(0,fn.s0)(),U=Ta();return t.createElement(ve.Z,{container:!0,spacing:0,className:v.container},t.createElement(ri,null),t.createElement(ve.Z,{item:!0,xs:12,sm:8,md:4},t.createElement(De.Z,{"data-testid":"error",variant:"body1",className:v.subtitle},"ERROR ",a,": ",c),t.createElement(De.Z,{variant:"body1",className:v.subtitle},d),t.createElement(De.Z,{variant:"h2",className:v.title},"Looks like someone dropped the mic!"),t.createElement(De.Z,{variant:"h6"},t.createElement(T,{to:"#","data-testid":"go-back-link",onClick:()=>O(-1)},"Go back"),"... or please"," ",t.createElement(T,{to:p||U.url},"contact support")," if you think this is a bug.")))}var si=e(16173);const ii=(0,Kt.Z)({root:{textDecoration:"underline",cursor:"pointer"}},{name:"BackstageBreadcrumbsClickableText"})(De.Z),ca=(0,Kt.Z)({root:{textDecoration:"underline",color:"inherit"}},{name:"BackstageBreadcrumbsStyledBox"})(un.Z);function li(n){const{children:a,...c}=n,[d,p]=t.useState(null),v=t.Children.toArray(a),[O,U,...k]=v,j=k.length?k.pop():v[v.length-1],le=v.length>3,re=be=>{p(be.currentTarget)},Ce=()=>{p(null)},Re=Boolean(d);return t.createElement(t.Fragment,null,t.createElement(si.Z,{"aria-label":"breadcrumb",...c},v.length>1&&t.createElement(ca,{clone:!0},O),v.length>2&&t.createElement(ca,{clone:!0},U),le&&t.createElement(ii,{onClick:re},"..."),t.createElement(un.Z,{style:{fontStyle:"italic"}},j)),t.createElement(Ra.ZP,{open:Re,anchorEl:d,onClose:Ce,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}},t.createElement(Ve.Z,null,k.map((be,mt)=>t.createElement(Je.Z,{key:mt,button:!0},t.createElement(ca,{clone:!0},be))))))}const ci=(0,i.Z)(n=>({header:{gridArea:"pageHeader",padding:n.spacing(3),width:"100%",boxShadow:n.shadows[4],position:"relative",zIndex:100,display:"flex",flexDirection:"row",alignItems:"center",backgroundImage:n.page.backgroundImage,backgroundPosition:"center",backgroundSize:"cover",[n.breakpoints.down("sm")]:{flexWrap:"wrap"}},leftItemsBox:{maxWidth:"100%",flexGrow:1},rightItemsBox:{width:"auto"},title:{color:n.palette.bursts.fontColor,wordBreak:"break-word",fontSize:n.typography.h3.fontSize,marginBottom:0},subtitle:{color:n.palette.bursts.fontColor,opacity:.8,display:"inline-block",marginTop:n.spacing(1),maxWidth:"75ch"},type:{textTransform:"uppercase",fontSize:11,opacity:.8,marginBottom:n.spacing(1),color:n.palette.bursts.fontColor},breadcrumb:{color:n.palette.bursts.fontColor},breadcrumbType:{fontSize:"inherit",opacity:.7,marginRight:-n.spacing(.3),marginBottom:n.spacing(.3)},breadcrumbTitle:{fontSize:"inherit",marginLeft:-n.spacing(.3),marginBottom:n.spacing(.3)}}),{name:"BackstageHeader"}),ui=({type:n,typeLink:a,classes:c,pageTitle:d})=>n?a?t.createElement(li,{className:c.breadcrumb},t.createElement(T,{to:a},n),t.createElement(De.Z,null,d)):t.createElement(De.Z,{className:c.type},n):null,di=({pageTitle:n,classes:a,tooltip:c})=>{const d=t.createElement(De.Z,{className:a.title,variant:"h1"},n);return c?t.createElement(Z.ZP,{title:c,placement:"top-start"},d):d},fi=({classes:n,subtitle:a})=>a?typeof a!="string"?t.createElement(t.Fragment,null,a):t.createElement(De.Z,{className:n.subtitle,variant:"subtitle2",component:"span"},a):null;function ka(n){const{children:a,pageTitleOverride:c,style:d,subtitle:p,title:v,tooltip:O,type:U,typeLink:k}=n,j=ci(),re=(0,l.useApi)(l.configApiRef).getOptionalString("app.title")||"Backstage",Ce=c||v,Re=v||c,be=`${Ce} | %s | ${re}`,mt=`${Ce} | ${re}`;return t.createElement(t.Fragment,null,t.createElement(oa.q,{titleTemplate:be,defaultTitle:mt}),t.createElement("header",{style:d,className:j.header},t.createElement(un.Z,{className:j.leftItemsBox},t.createElement(ui,{classes:j,type:U,typeLink:k,pageTitle:Re}),t.createElement(di,{classes:j,pageTitle:Re,tooltip:O}),t.createElement(fi,{classes:j,subtitle:p})),t.createElement(ve.Z,{container:!0,className:j.rightItemsBox,spacing:4},a)))}const mi=(0,i.Z)(n=>({root:{textAlign:"left"},label:{color:n.palette.common.white,fontWeight:"bold",letterSpacing:0,fontSize:n.typography.fontSize,marginBottom:n.spacing(1)/2,lineHeight:1},value:{color:"rgba(255, 255, 255, 0.8)",fontSize:n.typography.fontSize,lineHeight:1}}),{name:"BackstageHeaderLabel"}),hi=({value:n,className:a})=>t.createElement(De.Z,{className:a},n);function gi(n){const{label:a,value:c,url:d}=n,p=mi(),v=t.createElement(hi,{className:p.value,value:c||"<Unknown>"});return t.createElement(ve.Z,{item:!0},t.createElement("span",{className:p.root},t.createElement(De.Z,{className:p.label},a),d?t.createElement(T,{to:d},v):v))}const pi={hour:"2-digit",minute:"2-digit"};function Qa(n){const a=new Date,c=window.navigator.language,d=[];if(!n.has("homepage.clocks"))return d;const p=n.getConfigArray("homepage.clocks");for(const v of p)if(v.has("label")&&v.has("timezone")){let O=v.getString("label");const U={timeZone:v.getString("timezone"),...pi};try{new Date().toLocaleString(c,U)}catch{console.warn(`The timezone ${U.timeZone} is invalid. Defaulting to GMT`),U.timeZone="GMT",O="GMT"}const k=a.toLocaleTimeString(c,U);d.push({time:k,label:O})}return d}function Il(n){const a=useApi(configApiRef),c=[],[d,p]=React.useState(c);return React.useEffect(()=>{p(Qa(a));const v=setInterval(()=>{p(Qa(a))},1e3);return()=>{clearInterval(v)}},[a]),d.length!==0?React.createElement(React.Fragment,null,d.map(v=>React.createElement(HeaderLabel,{label:v.label,value:v.time,key:v.label}))):null}const yi=n=>(0,o.Z)({root:{color:n.palette.common.white,padding:n.spacing(2,2,3),backgroundImage:n.palette.bursts.gradient.linear,backgroundPosition:0,backgroundSize:"inherit"}}),Ei=(0,i.Z)(yi,{name:"BackstageItemCardHeader"});function vi(n){const{title:a,subtitle:c,children:d}=n,p=Ei(n);return t.createElement("div",{className:p.root},c&&t.createElement(De.Z,{variant:"subtitle2",component:"h3"},c),a&&t.createElement(De.Z,{variant:"h6",component:"h4"},a),d)}function Ll(n){const{description:a,tags:c,title:d,type:p,subtitle:v,label:O,onClick:U,href:k}=n;return React.createElement(Card,null,React.createElement(CardMedia,null,React.createElement(ItemCardHeader,{title:d,subtitle:v||p})),React.createElement(CardContent,null,c!=null&&c.length?React.createElement(Box,null,c.map((j,le)=>React.createElement(Chip,{size:"small",label:j,key:le}))):null,a),React.createElement(CardActions,null,!k&&React.createElement(Button,{to:"#",onClick:U,color:"primary"},O),k&&React.createElement(Button,{to:k,color:"primary"},O)))}const Ai=n=>(0,o.Z)({root:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(22em, 1fr))",gridAutoRows:"1fr",gridGap:n.spacing(2)}}),Ri=(0,i.Z)(Ai,{name:"BackstageItemCardGrid"});function Ci(n){const{children:a,...c}=n,d=Ri(c);return t.createElement("div",{className:d.root,...c},a)}var Si=e(41547);const Ti=(0,i.Z)(()=>({root:({isMobile:n})=>({display:"grid",gridTemplateAreas:"'pageHeader pageHeader pageHeader' 'pageSubheader pageSubheader pageSubheader' 'pageNav pageContent pageSidebar'",gridTemplateRows:"max-content auto 1fr",gridTemplateColumns:"auto 1fr auto",height:n?"100%":"100vh",overflowY:"auto"})}),{name:"BackstagePage"});function Xa(n){const{themeId:a,children:c}=n,{isMobile:d}=(0,t.useContext)(or),p=Ti({isMobile:d});return t.createElement(Si.Z,{theme:v=>({...v,page:v.getPageTheme({themeId:a})})},t.createElement("div",{className:p.root},c))}function Pi(n){const{themeId:a,children:c,...d}=n;return t.createElement(Xa,{themeId:a},t.createElement(ka,{...d}),c)}var tn=e(30195);const xl=tn.z.object({providerInfo:tn.z.object({}).catchall(tn.z.unknown()).optional(),profile:tn.z.object({email:tn.z.string().optional(),displayName:tn.z.string().optional(),picture:tn.z.string().optional()}),backstageIdentity:tn.z.object({token:tn.z.string(),identity:tn.z.object({type:tn.z.literal("user"),userEntityRef:tn.z.string(),ownershipEntityRefs:tn.z.array(tn.z.string())})})}),qa={defaultTokenExpiryMillis:5*60*1e3,tokenExpiryMarginMillis:5*60*1e3};function bi(n){const a=new Date(Date.now()+qa.defaultTokenExpiryMillis);if(!n)return a;const[c,d,p]=n.split("."),v=JSON.parse(atob(d));return typeof v.exp!="number"?a:new Date(v.exp*1e3-qa.tokenExpiryMarginMillis)}class Ol{constructor(a){oe(this,"options");oe(this,"abortController");oe(this,"state");this.options=a,this.abortController=new AbortController,this.state={type:"empty"}}async start(){await this.getSessionAsync()}getUserId(){const{backstageIdentity:a}=this.getSessionSync(),c=a.identity.userEntityRef,d=/^([^:/]+:)?([^:/]+\/)?([^:/]+)$/.exec(c);if(!d)throw new TypeError(`Invalid user entity reference "${c}"`);return d[3]}async getIdToken(){return(await this.getSessionAsync()).backstageIdentity.token}getProfile(){return this.getSessionSync().profile}async getProfileInfo(){return(await this.getSessionAsync()).profile}async getBackstageIdentity(){return(await this.getSessionAsync()).backstageIdentity.identity}async getCredentials(){return{token:(await this.getSessionAsync()).backstageIdentity.token}}async signOut(){this.abortController.abort()}getSessionSync(){if(this.state.type==="active")return this.state.session;if(this.state.type==="fetching"&&this.state.previous)return this.state.previous;throw new Error("No session available. Try reloading your browser page.")}async getSessionAsync(){if(this.state.type==="fetching")return this.state.promise;if(this.state.type==="active"&&new Date<this.state.expiresAt)return this.state.session;const a=this.state.type==="active"?this.state.session:void 0,c=this.fetchSession().then(d=>(this.state={type:"active",session:d,expiresAt:bi(d.backstageIdentity.token)},d),d=>{throw this.state={type:"failed",error:d},d});return this.state={type:"fetching",promise:c,previous:a},c}async fetchSession(){const a=await this.options.discoveryApi.getBaseUrl("auth"),c=await fetch(`${a}/${this.options.provider}/refresh`,{signal:this.abortController.signal,headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"});if(!c.ok)throw await ResponseError.fromResponse(c);return proxiedSessionSchema.parse(await c.json())}}const Dl=n=>{const a=useApi(discoveryApiRef),[{status:c,error:d},{execute:p}]=useAsync(async()=>{const v=new ProxiedSignInIdentity({provider:n.provider,discoveryApi:a});await v.start(),n.onSignInSuccess(v)});return useMountEffect(p),c==="loading"?React.createElement(Progress,null):d?React.createElement(ErrorPanel,{title:"You do not appear to be signed in. Please try reloading the browser page.",error:d}):null},Ii=(0,i.Z)({container:{padding:0,listStyle:"none"},item:{display:"flex",flexDirection:"column",width:"100%",maxWidth:"400px",margin:0,padding:0}},{name:"BackstageSignInPage"}),ua=({children:n})=>{const a=Ii();return t.createElement(ve.Z,{component:"li",item:!0,classes:a},n)};class da{getUserId(){return"guest"}async getIdToken(){}getProfile(){return{email:"guest@example.com",displayName:"Guest"}}async getProfileInfo(){return{email:"guest@example.com",displayName:"Guest"}}async getBackstageIdentity(){const a="user:default/guest";return{type:"user",userEntityRef:a,ownershipEntityRefs:[a]}}async getCredentials(){return{}}async signOut(){}}function Li(n){const[a,c,d]=n.split(".");return JSON.parse(atob(c))}class fa{constructor(a){this.result=a}getUserId(){return this.result.userId}static fromResult(a){return new fa(a)}async getIdToken(){var a,c;return(c=(a=this.result).getIdToken)==null?void 0:c.call(a)}getProfile(){return this.result.profile}async getProfileInfo(){return this.result.profile}async getBackstageIdentity(){const a=await this.getIdToken();if(!a){const p=`user:default/${this.getUserId()}`;return{type:"user",userEntityRef:p,ownershipEntityRefs:[p]}}const{sub:c,ent:d}=Li(a);return{type:"user",userEntityRef:c,ownershipEntityRefs:d!=null?d:[]}}async getCredentials(){var c,d;return{token:await((d=(c=this.result).getIdToken)==null?void 0:d.call(c))}}async signOut(){var a,c;return(c=(a=this.result).signOut)==null?void 0:c.call(a)}}class Or{constructor(a,c,d){oe(this,"profilePromise");this.identity=a,this.authApi=c,this.profile=d}static createGuest(){return new da}static fromLegacy(a){return fa.fromResult(a)}static create(a){return new Or(a.identity,a.authApi,a.profile)}getUserId(){const a=this.identity.userEntityRef,c=/^([^:/]+:)?([^:/]+\/)?([^:/]+)$/.exec(a);if(!c)throw new TypeError(`Invalid user entity reference "${a}"`);return c[3]}async getIdToken(){return(await this.authApi.getBackstageIdentity()).token}getProfile(){if(!this.profile)throw new Error("The identity API does not implement synchronous profile fetching, use getProfileInfo() instead");return this.profile}async getProfileInfo(){if(this.profilePromise)return await this.profilePromise;try{return this.profilePromise=this.authApi.getProfile(),await this.profilePromise}catch(a){throw this.profilePromise=void 0,a}}async getBackstageIdentity(){return this.identity}async getCredentials(){return{token:(await this.authApi.getBackstageIdentity()).token}}async signOut(){return this.authApi.signOut()}}const xi={Component:({config:n,onSignInSuccess:a})=>{const{apiRef:c,title:d,message:p}=n,v=(0,l.useApi)(c),O=(0,l.useApi)(l.errorApiRef),U=async()=>{try{const k=await v.getBackstageIdentity({instantPopup:!0});if(!k)throw new Error(`The ${d} provider is not configured to support sign-in`);const j=await v.getProfile();a(Or.create({identity:k.identity,profile:j,authApi:v}))}catch(k){O.post(new gr.SP("Login failed",k))}};return t.createElement(ua,null,t.createElement(Rn,{variant:"fullHeight",title:d,actions:t.createElement(h.Z,{color:"primary",variant:"outlined",onClick:U},"Sign In")},t.createElement(De.Z,{variant:"body1"},p)))},loader:async(n,a)=>{const c=n.get(a),d=await c.getBackstageIdentity({optional:!0});if(!d)return;const p=await c.getProfile();return Or.create({identity:d.identity,profile:p,authApi:c})}},Oi={Component:({onSignInSuccess:n})=>t.createElement(ua,null,t.createElement(Rn,{title:"Guest",variant:"fullHeight",actions:t.createElement(h.Z,{color:"primary",variant:"outlined",onClick:()=>n(new da)},"Enter")},t.createElement(De.Z,{variant:"body1"},"Enter as a Guest User.",t.createElement("br",null),"You will not have a verified identity,",t.createElement("br",null),"meaning some features might be unavailable."))),loader:async()=>new da};var Di=e(63955),_a=e(86619),eo=e(74828),Fi=e(45455),Bi=e.n(Fi);const Mi=/^[a-z0-9_\-]+\.[a-z0-9_\-]+\.[a-z0-9_\-]+$/i,Zi=(0,i.Z)(n=>({form:{display:"flex",flexFlow:"column nowrap"},button:{alignSelf:"center",marginTop:n.spacing(2)}}),{name:"BackstageCustomProvider"}),to=n=>{const{ref:a,...c}=n;return{inputRef:a,...c}},$i={Component:({onSignInSuccess:n})=>{const a=Zi(),{register:c,handleSubmit:d,formState:p}=(0,Di.cI)({mode:"onChange"}),{errors:v}=p,O=({userId:U})=>{n(Or.fromLegacy({userId:U,profile:{email:`${U}@example.com`}}))};return t.createElement(ua,null,t.createElement(Rn,{title:"Custom User",variant:"fullHeight"},t.createElement(De.Z,{variant:"body1"},"Enter your own User ID and credentials.",t.createElement("br",null),"This selection will not be stored."),t.createElement("form",{className:a.form,onSubmit:d(O)},t.createElement(S.Z,null,t.createElement(_a.Z,{...to(c("userId",{required:!0})),label:"User ID",margin:"normal",error:Boolean(v.userId)}),v.userId&&t.createElement(eo.Z,{error:!0},v.userId.message)),t.createElement(S.Z,null,t.createElement(_a.Z,{...to(c("idToken",{required:!1,validate:U=>!U||Mi.test(U)||"Token is not a valid OpenID Connect JWT Token"})),label:"ID Token (optional)",margin:"normal",autoComplete:"off",error:Boolean(v.idToken)}),v.idToken&&t.createElement(eo.Z,{error:!0},v.idToken.message)),t.createElement(h.Z,{type:"submit",color:"primary",variant:"outlined",className:a.button,disabled:!(p!=null&&p.isDirty)||!Bi()(v)},"Continue"))))},loader:async()=>{}},qr="@backstage/core:SignInPage:provider",no={guest:Oi,custom:$i,common:xi};function ro(n,a){if(n in a)throw new Error(`"${n}" ID is duplicated. IDs of identity providers have to be unique.`)}function Ul(n){return n.reduce((c,d)=>{if(typeof d=="string")return ro(d,c),c[d]={components:no[d],id:d},c;const{id:p}=d;return ro(p,c),c[p]={components:no.common,id:p,config:d},c},{})}const wl=(n,a)=>{const c=useApi(errorApiRef),d=useApiHolder(),[p,v]=useState(!0),O=useCallback(k=>{a(IdentityApiSignOutProxy.from({identityApi:k,signOut:async()=>{var j;localStorage.removeItem(qr),await((j=k.signOut)==null?void 0:j.call(k))}}))},[a]);useLayoutEffect(()=>{var re;if(!p)return;const k=localStorage.getItem(qr);if(k===null){v(!1);return}const j=n[k];if(!j){v(!1);return}let le=!1;return j.components.loader(d,(re=j.config)==null?void 0:re.apiRef).then(Ce=>{le||(Ce?O(Ce):v(!1))}).catch(Ce=>{le||(localStorage.removeItem(qr),c.post(Ce),v(!1))}),()=>{le=!0}},[p,c,a,d,n,O]);const U=useMemo(()=>Object.keys(n).map(k=>{const j=n[k],{Component:le}=j.components,re=Ce=>{localStorage.setItem(qr,j.id),O(Ce)};return React.createElement(le,{key:j.id,config:j.config,onSignInSuccess:re})}),[n,O]);return[p,U]},Ni=({onSignInSuccess:n,providers:a=[],title:c,align:d="left"})=>{const p=useApi(configApiRef),v=useStyles(),O=getSignInProviders(a),[U,k]=useSignInProviders(O,n);return U?React.createElement(Progress,null):React.createElement(Page,{themeId:"home"},React.createElement(Header,{title:p.getString("app.title")}),React.createElement(Content,null,c&&React.createElement(ContentHeader,{title:c,textAlign:d}),React.createElement(Grid,{container:!0,justifyContent:d==="center"?d:"flex-start",spacing:2,component:"ul",classes:v},k)))},Ui=({provider:n,auto:a,onSignInSuccess:c})=>{const d=useStyles(),p=useApi(n.apiRef),v=useApi(configApiRef),[O,U]=useState(),[k,j]=useState(!1),le=async({checkExisting:re,showPopup:Ce})=>{try{let Re;if(re&&(Re=await p.getBackstageIdentity({optional:!0})),!Re&&(Ce||a)&&(j(!0),Re=await p.getBackstageIdentity({instantPopup:!0}),!Re))throw new Error(`The ${n.title} provider is not configured to support sign-in`);if(!Re){j(!0);return}const be=await p.getProfile();c(UserIdentity.create({identity:Re.identity,authApi:p,profile:be}))}catch(Re){U(Re),j(!0)}};return useMountEffect(()=>le({checkExisting:!0})),k?React.createElement(Page,{themeId:"home"},React.createElement(Header,{title:v.getString("app.title")}),React.createElement(Content,null,React.createElement(Grid,{container:!0,justifyContent:"center",spacing:2,component:"ul",classes:d},React.createElement(GridItem,null,React.createElement(InfoCard,{variant:"fullHeight",title:n.title,actions:React.createElement(Button,{color:"primary",variant:"outlined",onClick:()=>{le({showPopup:!0})}},"Sign In")},React.createElement(Typography,{variant:"body1"},n.message),O&&O.name!=="PopupRejectedError"&&React.createElement(Typography,{variant:"body1",color:"error"},O.message)))))):React.createElement(Progress,null)};function zl(n){return"provider"in n?React.createElement(Ui,{...n}):React.createElement(Ni,{...n})}const wi=(0,i.Z)(n=>({root:{padding:n.spacing(0,2,0,2.5),minHeight:n.spacing(3)},indicator:{backgroundColor:n.palette.info.main,height:n.spacing(.3)}}),{name:"BackstageTabbedCard"}),zi=(0,Kt.Z)(n=>({root:{padding:n.spacing(2,2,2,2.5),display:"inline-block"},title:{fontWeight:700},subheader:{paddingTop:n.spacing(1)}}),{name:"BackstageTabbedCardBoldHeader"})(Hn.Z);function Wl(n){const{slackChannel:a,errorBoundaryProps:c,children:d,title:p,deepLink:v,value:O,onChange:U}=n,k=wi(),[j,le]=useState(0),re=U||((be,mt)=>le(mt));let Ce;O?React.Children.map(d,be=>{React.isValidElement(be)&&(be==null?void 0:be.props.value)===O&&(Ce=be==null?void 0:be.props.children)}):React.Children.map(d,(be,mt)=>{React.isValidElement(be)&&mt===j&&(Ce=be==null?void 0:be.props.children)});const Re=c||(a?{slackChannel:a}:{});return React.createElement(Card,null,React.createElement(ErrorBoundary,{...Re},p&&React.createElement(zi,{title:p}),React.createElement(Tabs,{selectionFollowsFocus:!0,classes:k,value:O||j,onChange:re},d),React.createElement(Divider,null),React.createElement(CardContent,null,Ce),v&&React.createElement(BottomLink,{...v})))}const Wi=(0,i.Z)(n=>({root:{minWidth:n.spacing(6),minHeight:n.spacing(3),margin:n.spacing(0,2,0,0),padding:n.spacing(.5,0,.5,0),textTransform:"none","&:hover":{opacity:1,backgroundColor:"transparent",color:n.palette.text.primary}},selected:{fontWeight:"bold"}}),{name:"BackstageCardTab"});function Hl(n){const{children:a,...c}=n,d=Wi();return React.createElement(Tab,{disableRipple:!0,classes:d,...c})}},88609:function(_,s,e){"use strict";e.d(s,{Os:function(){return f},fC:function(){return E}});var r=e(76241),t=e(2784);const l=(0,r.CT)("analytics-context"),f=()=>{const o=(0,t.useContext)(l);if(o===void 0)return{routeRef:"unknown",pluginId:"root",extension:"App"};const m=o.atVersion(1);if(m===void 0)throw new Error("No context found for version 1.");return m},E=o=>{const{attributes:m,children:u}=o,g={...f(),...m},R=(0,r.EI)({1:g});return t.createElement(l.Provider,{value:R},u)};function i(o,m){const u=h=>React.createElement(E,{attributes:m},React.createElement(o,{...h}));return u.displayName=`WithAnalyticsContext(${o.displayName||o.name||"Component"})`,u}},28461:function(_,s,e){"use strict";e.d(s,{f:function(){return r.fC},z:function(){return i}});var r=e(88609),t=e(27399),l=e(2784);class f{constructor(m,u={routeRef:"unknown",pluginId:"root",extension:"App"}){this.analyticsApi=m,this.context=u}setContext(m){this.context=m}captureEvent(m,u,{value:h,attributes:g}={}){try{this.analyticsApi.captureEvent({action:m,subject:u,value:h,attributes:g,context:this.context})}catch(R){console.warn("Error during analytics event capture. %o",R)}}}function E(){try{return(0,t.useApi)(t.analyticsApiRef)}catch{return{captureEvent:()=>{}}}}function i(){const o=(0,l.useRef)(null),m=(0,r.Os)(),u=E();function h(){return o.current===null&&(o.current=new f(u)),o.current}const g=h();return g.setContext(m),g}},39135:function(_,s,e){"use strict";e.d(s,{CL:function(){return F},sM:function(){return t},$v:function(){return g},v_:function(){return R},hg:function(){return P},uB:function(){return h},bq:function(){return u},Ds:function(){return x},NW:function(){return T},VE:function(){return X},W0:function(){return b},gP:function(){return D},F4:function(){return f},ux:function(){return i},Kp:function(){return l},$4:function(){return Z},p_:function(){return o},ZM:function(){return M},D:function(){return E},gW:function(){return m},E6:function(){return K}});var r=e(86833),t;(function(ae){const pe="SignedIn";ae.SignedIn=pe;const Me="SignedOut";ae.SignedOut=Me})(t||(t={}));const l=(0,r.createApiRef)({id:"core.auth.google"}),f=(0,r.createApiRef)({id:"core.auth.github"}),E=(0,r.createApiRef)({id:"core.auth.okta"}),i=(0,r.createApiRef)({id:"core.auth.gitlab"}),o=(0,r.createApiRef)({id:"core.auth.microsoft"}),m=(0,r.createApiRef)({id:"core.auth.onelogin"}),u=(0,r.createApiRef)({id:"core.auth.bitbucket"}),h=(0,r.createApiRef)({id:"core.auth.atlassian"}),g=(0,r.createApiRef)({id:"core.alert"}),R=(0,r.createApiRef)({id:"core.analytics"}),P=(0,r.createApiRef)({id:"core.apptheme"}),x=(0,r.createApiRef)({id:"core.config"}),T=(0,r.createApiRef)({id:"core.discovery"}),X=(0,r.createApiRef)({id:"core.error"});var F;(function(ae){ae[ae.None=0]="None";const Me=1;ae[ae.Active=Me]="Active"})(F||(F={}));const b=(0,r.createApiRef)({id:"core.featureflags"}),D=(0,r.createApiRef)({id:"core.fetch"}),Z=(0,r.createApiRef)({id:"core.identity"}),M=(0,r.createApiRef)({id:"core.oauthrequest"}),K=(0,r.createApiRef)({id:"core.storage"})},27399:function(_,s,e){"use strict";e.d(s,{FeatureFlagState:function(){return t.CL},SessionState:function(){return t.sM},alertApiRef:function(){return t.$v},analyticsApiRef:function(){return t.v_},appThemeApiRef:function(){return t.hg},atlassianAuthApiRef:function(){return t.uB},bitbucketAuthApiRef:function(){return t.bq},configApiRef:function(){return t.Ds},createApiFactory:function(){return r.createApiFactory},createApiRef:function(){return r.createApiRef},discoveryApiRef:function(){return t.NW},errorApiRef:function(){return t.VE},featureFlagsApiRef:function(){return t.W0},fetchApiRef:function(){return t.gP},githubAuthApiRef:function(){return t.F4},gitlabAuthApiRef:function(){return t.ux},googleAuthApiRef:function(){return t.Kp},identityApiRef:function(){return t.$4},microsoftAuthApiRef:function(){return t.p_},oauthRequestApiRef:function(){return t.ZM},oktaAuthApiRef:function(){return t.D},oneloginAuthApiRef:function(){return t.gW},storageApiRef:function(){return t.E6},useApi:function(){return r.useApi},useApiHolder:function(){return r.useApiHolder}});var r=e(86833);e.o(r,"FeatureFlagState")&&e.d(s,{FeatureFlagState:function(){return r.FeatureFlagState}}),e.o(r,"SessionState")&&e.d(s,{SessionState:function(){return r.SessionState}}),e.o(r,"alertApiRef")&&e.d(s,{alertApiRef:function(){return r.alertApiRef}}),e.o(r,"analyticsApiRef")&&e.d(s,{analyticsApiRef:function(){return r.analyticsApiRef}}),e.o(r,"appThemeApiRef")&&e.d(s,{appThemeApiRef:function(){return r.appThemeApiRef}}),e.o(r,"atlassianAuthApiRef")&&e.d(s,{atlassianAuthApiRef:function(){return r.atlassianAuthApiRef}}),e.o(r,"attachComponentData")&&e.d(s,{attachComponentData:function(){return r.attachComponentData}}),e.o(r,"bitbucketAuthApiRef")&&e.d(s,{bitbucketAuthApiRef:function(){return r.bitbucketAuthApiRef}}),e.o(r,"configApiRef")&&e.d(s,{configApiRef:function(){return r.configApiRef}}),e.o(r,"createComponentExtension")&&e.d(s,{createComponentExtension:function(){return r.createComponentExtension}}),e.o(r,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return r.createExternalRouteRef}}),e.o(r,"createPlugin")&&e.d(s,{createPlugin:function(){return r.createPlugin}}),e.o(r,"createRoutableExtension")&&e.d(s,{createRoutableExtension:function(){return r.createRoutableExtension}}),e.o(r,"createRouteRef")&&e.d(s,{createRouteRef:function(){return r.createRouteRef}}),e.o(r,"discoveryApiRef")&&e.d(s,{discoveryApiRef:function(){return r.discoveryApiRef}}),e.o(r,"errorApiRef")&&e.d(s,{errorApiRef:function(){return r.errorApiRef}}),e.o(r,"featureFlagsApiRef")&&e.d(s,{featureFlagsApiRef:function(){return r.featureFlagsApiRef}}),e.o(r,"fetchApiRef")&&e.d(s,{fetchApiRef:function(){return r.fetchApiRef}}),e.o(r,"getComponentData")&&e.d(s,{getComponentData:function(){return r.getComponentData}}),e.o(r,"githubAuthApiRef")&&e.d(s,{githubAuthApiRef:function(){return r.githubAuthApiRef}}),e.o(r,"gitlabAuthApiRef")&&e.d(s,{gitlabAuthApiRef:function(){return r.gitlabAuthApiRef}}),e.o(r,"googleAuthApiRef")&&e.d(s,{googleAuthApiRef:function(){return r.googleAuthApiRef}}),e.o(r,"identityApiRef")&&e.d(s,{identityApiRef:function(){return r.identityApiRef}}),e.o(r,"microsoftAuthApiRef")&&e.d(s,{microsoftAuthApiRef:function(){return r.microsoftAuthApiRef}}),e.o(r,"oauthRequestApiRef")&&e.d(s,{oauthRequestApiRef:function(){return r.oauthRequestApiRef}}),e.o(r,"oktaAuthApiRef")&&e.d(s,{oktaAuthApiRef:function(){return r.oktaAuthApiRef}}),e.o(r,"oneloginAuthApiRef")&&e.d(s,{oneloginAuthApiRef:function(){return r.oneloginAuthApiRef}}),e.o(r,"storageApiRef")&&e.d(s,{storageApiRef:function(){return r.storageApiRef}}),e.o(r,"useApp")&&e.d(s,{useApp:function(){return r.useApp}}),e.o(r,"useElementFilter")&&e.d(s,{useElementFilter:function(){return r.useElementFilter}}),e.o(r,"useRouteRef")&&e.d(s,{useRouteRef:function(){return r.useRouteRef}}),e.o(r,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return r.useRouteRefParams}});var t=e(39135)},90515:function(_,s,e){"use strict";e.d(s,{T:function(){return t}});class r{constructor(f){if(this.config=f,!f.id.split(".").flatMap(i=>i.split("-")).every(i=>i.match(/^[a-z][a-z0-9]*$/)))throw new Error(`API id must only contain period separated lowercase alphanum tokens with dashes, got '${f.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 t(l){return new r(l)}},25182:function(_,s,e){"use strict";e.d(s,{n:function(){return r}});function r(t,l){return"id"in t?{api:t,deps:{},factory:()=>l}:t}},86833:function(_,s,e){"use strict";e.d(s,{createApiFactory:function(){return E.n},createApiRef:function(){return t.T},useApi:function(){return r.h_},useApiHolder:function(){return r.I_}});var r=e(5761),t=e(90515),l=e(16362),f=e.n(l);e.o(l,"FeatureFlagState")&&e.d(s,{FeatureFlagState:function(){return l.FeatureFlagState}}),e.o(l,"SessionState")&&e.d(s,{SessionState:function(){return l.SessionState}}),e.o(l,"alertApiRef")&&e.d(s,{alertApiRef:function(){return l.alertApiRef}}),e.o(l,"analyticsApiRef")&&e.d(s,{analyticsApiRef:function(){return l.analyticsApiRef}}),e.o(l,"appThemeApiRef")&&e.d(s,{appThemeApiRef:function(){return l.appThemeApiRef}}),e.o(l,"atlassianAuthApiRef")&&e.d(s,{atlassianAuthApiRef:function(){return l.atlassianAuthApiRef}}),e.o(l,"attachComponentData")&&e.d(s,{attachComponentData:function(){return l.attachComponentData}}),e.o(l,"bitbucketAuthApiRef")&&e.d(s,{bitbucketAuthApiRef:function(){return l.bitbucketAuthApiRef}}),e.o(l,"configApiRef")&&e.d(s,{configApiRef:function(){return l.configApiRef}}),e.o(l,"createApiFactory")&&e.d(s,{createApiFactory:function(){return l.createApiFactory}}),e.o(l,"createComponentExtension")&&e.d(s,{createComponentExtension:function(){return l.createComponentExtension}}),e.o(l,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return l.createExternalRouteRef}}),e.o(l,"createPlugin")&&e.d(s,{createPlugin:function(){return l.createPlugin}}),e.o(l,"createRoutableExtension")&&e.d(s,{createRoutableExtension:function(){return l.createRoutableExtension}}),e.o(l,"createRouteRef")&&e.d(s,{createRouteRef:function(){return l.createRouteRef}}),e.o(l,"discoveryApiRef")&&e.d(s,{discoveryApiRef:function(){return l.discoveryApiRef}}),e.o(l,"errorApiRef")&&e.d(s,{errorApiRef:function(){return l.errorApiRef}}),e.o(l,"featureFlagsApiRef")&&e.d(s,{featureFlagsApiRef:function(){return l.featureFlagsApiRef}}),e.o(l,"fetchApiRef")&&e.d(s,{fetchApiRef:function(){return l.fetchApiRef}}),e.o(l,"getComponentData")&&e.d(s,{getComponentData:function(){return l.getComponentData}}),e.o(l,"githubAuthApiRef")&&e.d(s,{githubAuthApiRef:function(){return l.githubAuthApiRef}}),e.o(l,"gitlabAuthApiRef")&&e.d(s,{gitlabAuthApiRef:function(){return l.gitlabAuthApiRef}}),e.o(l,"googleAuthApiRef")&&e.d(s,{googleAuthApiRef:function(){return l.googleAuthApiRef}}),e.o(l,"identityApiRef")&&e.d(s,{identityApiRef:function(){return l.identityApiRef}}),e.o(l,"microsoftAuthApiRef")&&e.d(s,{microsoftAuthApiRef:function(){return l.microsoftAuthApiRef}}),e.o(l,"oauthRequestApiRef")&&e.d(s,{oauthRequestApiRef:function(){return l.oauthRequestApiRef}}),e.o(l,"oktaAuthApiRef")&&e.d(s,{oktaAuthApiRef:function(){return l.oktaAuthApiRef}}),e.o(l,"oneloginAuthApiRef")&&e.d(s,{oneloginAuthApiRef:function(){return l.oneloginAuthApiRef}}),e.o(l,"storageApiRef")&&e.d(s,{storageApiRef:function(){return l.storageApiRef}}),e.o(l,"useApp")&&e.d(s,{useApp:function(){return l.useApp}}),e.o(l,"useElementFilter")&&e.d(s,{useElementFilter:function(){return l.useElementFilter}}),e.o(l,"useRouteRef")&&e.d(s,{useRouteRef:function(){return l.useRouteRef}}),e.o(l,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return l.useRouteRefParams}});var E=e(25182)},16362:function(){},5761:function(_,s,e){"use strict";e.d(s,{I_:function(){return l},h_:function(){return f}});var r=e(2784),t=e(76241);function l(){const i=(0,t.Vt)("api-context");if(!i)throw new Error("API context is not available");const o=i.atVersion(1);if(!o)throw new Error("ApiContext v1 not available");return o}function f(i){const m=l().get(i);if(!m)throw new Error(`No implementation available for ${i}`);return m}function E(i){return function(m){const u=g=>{const R=l(),P={};for(const x in i)if(i.hasOwnProperty(x)){const T=i[x],X=R.get(T);if(!X)throw new Error(`No implementation available for ${T}`);P[x]=X}return React.createElement(m,{...g,...P})},h=m.displayName||m.name||"Component";return u.displayName=`withApis(${h})`,u}}},31311:function(_,s,e){"use strict";e.d(s,{useApp:function(){return r.q}});var r=e(32483),t=e(67229),l=e.n(t);e.o(t,"attachComponentData")&&e.d(s,{attachComponentData:function(){return t.attachComponentData}}),e.o(t,"createApiFactory")&&e.d(s,{createApiFactory:function(){return t.createApiFactory}}),e.o(t,"createApiRef")&&e.d(s,{createApiRef:function(){return t.createApiRef}}),e.o(t,"createComponentExtension")&&e.d(s,{createComponentExtension:function(){return t.createComponentExtension}}),e.o(t,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return t.createExternalRouteRef}}),e.o(t,"createPlugin")&&e.d(s,{createPlugin:function(){return t.createPlugin}}),e.o(t,"createRoutableExtension")&&e.d(s,{createRoutableExtension:function(){return t.createRoutableExtension}}),e.o(t,"createRouteRef")&&e.d(s,{createRouteRef:function(){return t.createRouteRef}}),e.o(t,"getComponentData")&&e.d(s,{getComponentData:function(){return t.getComponentData}}),e.o(t,"useApi")&&e.d(s,{useApi:function(){return t.useApi}}),e.o(t,"useApiHolder")&&e.d(s,{useApiHolder:function(){return t.useApiHolder}}),e.o(t,"useElementFilter")&&e.d(s,{useElementFilter:function(){return t.useElementFilter}}),e.o(t,"useRouteRef")&&e.d(s,{useRouteRef:function(){return t.useRouteRef}}),e.o(t,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return t.useRouteRefParams}})},67229:function(){},32483:function(_,s,e){"use strict";e.d(s,{q:function(){return t}});var r=e(76241);const t=()=>{const l=(0,r.Vt)("app-context");if(!l)throw new Error("App context is not available");const f=l.atVersion(1);if(!f)throw new Error("AppContext v1 not available");return f}},74181:function(_,s,e){"use strict";e.d(s,{R5:function(){return f},CO:function(){return R},P4:function(){return g},IY:function(){return E},vJ:function(){return F}});var r=e(76241);const t=(0,r.uW)("component-data-store",()=>new WeakMap),l="__backstage_data";function f(b,D,Z){var ae;const M=b;let K=(ae=M[l])!=null?ae:t.get(b);if(K||(K={map:new Map},Object.defineProperty(M,l,{enumerable:!1,configurable:!0,writable:!1,value:K}),t.set(b,K)),K.map.has(D)){const pe=b.displayName||b.name;throw new Error(`Attempted to attach duplicate data "${D}" to component "${pe}"`)}K.map.set(D,Z)}function E(b,D){var K;if(!b)return;const Z=b.type;if(!Z)return;const M=(K=Z[l])!=null?K:t.get(Z);if(!!M)return M.map.get(D)}var i=e(2784),o=e(88609),m=e(31311),u=e(82772);class h extends i.Component{constructor(){super(...arguments);oe(this,"state",{error:void 0});oe(this,"handleErrorReset",()=>{this.setState({error:void 0})})}static getDerivedStateFromError(D){return{error:D}}render(){const{error:D}=this.state,{app:Z,plugin:M}=this.props,{ErrorBoundaryFallback:K}=Z.getComponents();return D?i.createElement(K,{error:D,resetError:this.handleErrorReset,plugin:M}):this.props.children}}function g(b){const{component:D,mountPoint:Z,name:M}=b;return P({component:{lazy:()=>D().then(K=>{const ae=Me=>{try{(0,u.tg)(Z)}catch(Ue){if(typeof Ue=="object"&&Ue!==null){const{message:de}=Ue;if(typeof de=="string"&&de.startsWith("No path for "))throw new Error(`Routable extension component with mount point ${Z} 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 Ue}return i.createElement(K,{...Me})},pe=M||K.displayName||K.name||"LazyComponent";return ae.displayName=`RoutableExtension(${pe})`,ae},K=>pe=>{const Me=(0,m.useApp)(),{BootErrorPage:Ue}=Me.getComponents();return i.createElement(Ue,{step:"load-chunk",error:K})})},data:{"core.mountPoint":Z},name:M})}function R(b){const{component:D,name:Z}=b;return P({component:D,name:Z})}function P(b){const{data:D={},name:Z}=b;Z||console.warn("Declaring extensions without name is DEPRECATED. Make sure that all usages of createReactExtension, createComponentExtension and createRoutableExtension provide a name.");let M;if("lazy"in b.component){const ae=b.component.lazy;M=(0,i.lazy)(()=>ae().then(pe=>({default:pe})))}else M=b.component.sync;const K=Z||M.displayName||M.name||"Component";return{expose(ae){const pe=Me=>{const Ue=(0,m.useApp)(),{Progress:de}=Ue.getComponents(),je=D==null?void 0:D["core.mountPoint"];return i.createElement(i.Suspense,{fallback:i.createElement(de,null)},i.createElement(h,{app:Ue,plugin:ae},i.createElement(o.fC,{attributes:{pluginId:ae.getId(),...Z&&{extension:Z},...je&&{routeRef:je.id}}},i.createElement(M,{...Me}))))};f(pe,"core.plugin",ae);for(const[Me,Ue]of Object.entries(D))f(pe,Me,Ue);return pe.displayName=`Extension(${K})`,pe}}}var x=e(27399);function T(b,D,Z,M){return i.Children.toArray(b).flatMap(K=>{if(!(0,i.isValidElement)(K))return[];if(K.type===i.Fragment)return T(K.props.children,D,Z,M);if(E(K,"core.featureFlagged")){const ae=K.props;return("with"in ae?D.isActive(ae.with):!D.isActive(ae.without))?T(K.props.children,D,Z,M):[]}if(Z===void 0||Z(K))return[K];if(M)throw new Error(M);return T(K.props.children,D,Z,M)})}class X{constructor(D,Z){this.node=D,this.featureFlagsApi=Z}selectByComponentData(D){const Z=T(this.node,this.featureFlagsApi,M=>E(M,D.key)!==void 0,D.withStrictError);return new X(Z,this.featureFlagsApi)}findComponentData(D){return T(this.node,this.featureFlagsApi,M=>E(M,D.key)!==void 0).map(M=>E(M,D.key)).filter(M=>M!==void 0)}getElements(){return T(this.node,this.featureFlagsApi)}}function F(b,D,Z=[]){const M=(0,x.useApi)(x.featureFlagsApiRef),K=new X(b,M);return(0,i.useMemo)(()=>D(K),[b,...Z])}},80274:function(){},36964:function(_,s,e){"use strict";e.d(s,{AnalyticsContext:function(){return r.f},FeatureFlagState:function(){return t.FeatureFlagState},SessionState:function(){return t.SessionState},alertApiRef:function(){return t.alertApiRef},analyticsApiRef:function(){return t.analyticsApiRef},appThemeApiRef:function(){return t.appThemeApiRef},atlassianAuthApiRef:function(){return t.atlassianAuthApiRef},attachComponentData:function(){return f.R5},bitbucketAuthApiRef:function(){return t.bitbucketAuthApiRef},configApiRef:function(){return t.configApiRef},createComponentExtension:function(){return f.CO},createExternalRouteRef:function(){return m.x8},createPlugin:function(){return o.r},createRoutableExtension:function(){return f.P4},createRouteRef:function(){return m.NT},discoveryApiRef:function(){return t.discoveryApiRef},errorApiRef:function(){return t.errorApiRef},featureFlagsApiRef:function(){return t.featureFlagsApiRef},fetchApiRef:function(){return t.fetchApiRef},getComponentData:function(){return f.IY},githubAuthApiRef:function(){return t.githubAuthApiRef},gitlabAuthApiRef:function(){return t.gitlabAuthApiRef},googleAuthApiRef:function(){return t.googleAuthApiRef},identityApiRef:function(){return t.identityApiRef},microsoftAuthApiRef:function(){return t.microsoftAuthApiRef},oauthRequestApiRef:function(){return t.oauthRequestApiRef},oktaAuthApiRef:function(){return t.oktaAuthApiRef},oneloginAuthApiRef:function(){return t.oneloginAuthApiRef},storageApiRef:function(){return t.storageApiRef},useAnalytics:function(){return r.z},useApp:function(){return l.useApp},useElementFilter:function(){return f.vJ},useRouteRef:function(){return m.tg},useRouteRefParams:function(){return m.Oi}});var r=e(28461),t=e(27399);e.o(t,"attachComponentData")&&e.d(s,{attachComponentData:function(){return t.attachComponentData}}),e.o(t,"createApiFactory")&&e.d(s,{createApiFactory:function(){return t.createApiFactory}}),e.o(t,"createApiRef")&&e.d(s,{createApiRef:function(){return t.createApiRef}}),e.o(t,"createComponentExtension")&&e.d(s,{createComponentExtension:function(){return t.createComponentExtension}}),e.o(t,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return t.createExternalRouteRef}}),e.o(t,"createPlugin")&&e.d(s,{createPlugin:function(){return t.createPlugin}}),e.o(t,"createRoutableExtension")&&e.d(s,{createRoutableExtension:function(){return t.createRoutableExtension}}),e.o(t,"createRouteRef")&&e.d(s,{createRouteRef:function(){return t.createRouteRef}}),e.o(t,"getComponentData")&&e.d(s,{getComponentData:function(){return t.getComponentData}}),e.o(t,"useApi")&&e.d(s,{useApi:function(){return t.useApi}}),e.o(t,"useApiHolder")&&e.d(s,{useApiHolder:function(){return t.useApiHolder}}),e.o(t,"useApp")&&e.d(s,{useApp:function(){return t.useApp}}),e.o(t,"useElementFilter")&&e.d(s,{useElementFilter:function(){return t.useElementFilter}}),e.o(t,"useRouteRef")&&e.d(s,{useRouteRef:function(){return t.useRouteRef}}),e.o(t,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return t.useRouteRefParams}});var l=e(31311);e.o(l,"attachComponentData")&&e.d(s,{attachComponentData:function(){return l.attachComponentData}}),e.o(l,"createApiFactory")&&e.d(s,{createApiFactory:function(){return l.createApiFactory}}),e.o(l,"createApiRef")&&e.d(s,{createApiRef:function(){return l.createApiRef}}),e.o(l,"createComponentExtension")&&e.d(s,{createComponentExtension:function(){return l.createComponentExtension}}),e.o(l,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return l.createExternalRouteRef}}),e.o(l,"createPlugin")&&e.d(s,{createPlugin:function(){return l.createPlugin}}),e.o(l,"createRoutableExtension")&&e.d(s,{createRoutableExtension:function(){return l.createRoutableExtension}}),e.o(l,"createRouteRef")&&e.d(s,{createRouteRef:function(){return l.createRouteRef}}),e.o(l,"getComponentData")&&e.d(s,{getComponentData:function(){return l.getComponentData}}),e.o(l,"useApi")&&e.d(s,{useApi:function(){return l.useApi}}),e.o(l,"useApiHolder")&&e.d(s,{useApiHolder:function(){return l.useApiHolder}}),e.o(l,"useElementFilter")&&e.d(s,{useElementFilter:function(){return l.useElementFilter}}),e.o(l,"useRouteRef")&&e.d(s,{useRouteRef:function(){return l.useRouteRef}}),e.o(l,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return l.useRouteRefParams}});var f=e(74181),E=e(80274),i=e.n(E);e.o(E,"createApiFactory")&&e.d(s,{createApiFactory:function(){return E.createApiFactory}}),e.o(E,"createApiRef")&&e.d(s,{createApiRef:function(){return E.createApiRef}}),e.o(E,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return E.createExternalRouteRef}}),e.o(E,"createPlugin")&&e.d(s,{createPlugin:function(){return E.createPlugin}}),e.o(E,"createRouteRef")&&e.d(s,{createRouteRef:function(){return E.createRouteRef}}),e.o(E,"useApi")&&e.d(s,{useApi:function(){return E.useApi}}),e.o(E,"useApiHolder")&&e.d(s,{useApiHolder:function(){return E.useApiHolder}}),e.o(E,"useRouteRef")&&e.d(s,{useRouteRef:function(){return E.useRouteRef}}),e.o(E,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return E.useRouteRefParams}});var o=e(96896),m=e(82772)},96896:function(_,s,e){"use strict";e.d(s,{r:function(){return t}});class r{constructor(f){this.config=f}getId(){return this.config.id}getApis(){var f;return(f=this.config.apis)!=null?f:[]}getFeatureFlags(){var f,E;return(E=(f=this.config.featureFlags)==null?void 0:f.slice())!=null?E:[]}get routes(){var f;return(f=this.config.routes)!=null?f:{}}get externalRoutes(){var f;return(f=this.config.externalRoutes)!=null?f:{}}provide(f){return f.expose(this)}toString(){return`plugin{${this.config.id}}`}}function t(l){return new r(l)}},82772:function(_,s,e){var x,T,X;"use strict";e.d(s,{x8:function(){return u},NT:function(){return f},tg:function(){return R},Oi:function(){return P}});var r=e(76241);const t=(0,r.uW)("route-ref-type",()=>Symbol("route-ref-type"));class l{constructor(b,D){oe(this,x,"absolute");this.id=b,this.params=D}get title(){return this.id}toString(){return`routeRef{type=absolute,id=${this.id}}`}}x=t;function f(F){var b;return new l(F.id,(b=F.params)!=null?b:[])}const E=/^\w+$/;class i{constructor(b,D,Z,M){oe(this,T,"sub");this.id=b,this.path=D,this.parent=Z,this.params=M}toString(){return`routeRef{type=sub,id=${this.id}}`}}T=t;function o(F){const{id:b,path:D,parent:Z}=F,M=D.split("/").filter(pe=>pe.startsWith(":")).map(pe=>pe.substring(1)),K=[...Z.params,...M];if(Z.params.some(pe=>M.includes(pe)))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 pe of M)if(!E.test(pe))throw new Error(`SubRouteRef path has invalid param, got '${pe}'`);return new i(b,D,Z,K)}class m{constructor(b,D,Z){oe(this,X,"external");this.id=b,this.params=D,this.optional=Z}toString(){return`routeRef{type=external,id=${this.id}}`}}X=t;function u(F){var b;return new m(F.id,(b=F.params)!=null?b:[],Boolean(F.optional))}var h=e(2784),g=e(10289);function R(F){const b=(0,g.TH)(),D=(0,r.Vt)("routing-context");if(!D)throw new Error("Routing context is not available");const Z=D.atVersion(1),M=(0,h.useMemo)(()=>Z&&Z.resolve(F,b),[Z,F,b]);if(!D)throw new Error("useRouteRef used outside of routing context");if(!Z)throw new Error("RoutingContext v1 not available");const K="optional"in F&&F.optional;if(!M&&!K)throw new Error(`No path for ${F}`);return M}function P(F){return(0,g.UO)()}},10179:function(_,s,e){"use strict";e.d(s,{SP:function(){return x},dR:function(){return g},VL:function(){return X},BD:function(){return t}});function r(F){if(typeof F!="object"||F===null||Array.isArray(F))return!1;const b=F;return!(typeof b.name!="string"||b.name===""||typeof b.message!="string")}function t(F){if(typeof F!="object"||F===null||Array.isArray(F))throw new Error(`Encountered invalid error, not an object, got '${F}'`);const b=F;if(typeof b.name!="string"||b.name==="")throw new Error(`Encountered error object without a name, got '${F}'`);if(typeof b.message!="string")throw new Error(`Encountered error object without a message, got '${F}'`)}var l=e(24852);function f(F,b){const D=serializeErrorInternal(F),Z={name:"Unknown",message:"<no reason given>",...D};return b!=null&&b.includeStack||delete Z.stack,Z}function E(F){const b=(0,l.deserializeError)(F);return F.stack||(b.stack=void 0),b}function i(F){if(r(F)){const b=String(F);return b!=="[object Object]"?b:`${F.name}: ${F.message}`}return`unknown error '${F}'`}class o extends Error{constructor(b,D){var M;let Z=b;if(D!==void 0){const K=i(D);Z?Z+=`; caused by ${K}`:Z=`caused by ${K}`}super(Z);oe(this,"cause");(M=Error.captureStackTrace)==null||M.call(Error,this,this.constructor),this.name=this.constructor.name,this.cause=r(D)?D:void 0}}class m extends null{}class u extends null{}class h extends null{}class g extends o{}class R extends null{}class P extends null{}class x extends o{constructor(b,D){super(b,D);this.name=r(D)?D.name:"Error"}}async function T(F){var b;try{const D=await F.text();if(D){if((b=F.headers.get("content-type"))!=null&&b.startsWith("application/json"))try{const Z=JSON.parse(D);if(Z.error&&Z.response)return Z}catch{}return{error:{name:"Error",message:`Request failed with status ${F.status} ${F.statusText}, ${D}`},response:{statusCode:F.status}}}}catch{}return{error:{name:"Error",message:`Request failed with status ${F.status} ${F.statusText}`},response:{statusCode:F.status}}}class X extends Error{constructor(b){super(b.message);oe(this,"response");oe(this,"body");oe(this,"cause");this.name="ResponseError",this.response=b.response,this.body=b.data,this.cause=b.cause}static async fromResponse(b){const D=await T(b),Z=D.response.statusCode||b.status,M=D.error.name||b.statusText,K=`Request failed with ${Z} ${M}`,ae=E(D.error);return new X({message:K,response:b,data:D,cause:ae})}}},36356:function(_,s,e){var g,R,P,x,T;"use strict";e.d(s,{nW:function(){return h},ae:function(){return i},q3:function(){return o}});var r=e(36964);const t=(0,r.createApiRef)({id:"core.scmauth"});class l{constructor(b){sn(this,g,void 0);gn(this,g,b)}async getCredentials(b){const D=new URL(b.url),Z=nt(this,g).find(M=>M.isUrlSupported(D));if(!Z)throw new Error(`No auth provider available for '${b.url}', see https://backstage.io/link?scm-auth`);return Z.getCredentials(b)}}g=new WeakMap;const X=class{constructor(b,D,Z,M){sn(this,R,void 0);sn(this,P,void 0);sn(this,x,void 0);sn(this,T,void 0);gn(this,R,D),gn(this,P,Z),gn(this,x,M),gn(this,T,b)}static createDefaultApiFactory(){return createApiFactory({api:scmAuthApiRef,deps:{github:githubAuthApiRef,gitlab:gitlabAuthApiRef,azure:microsoftAuthApiRef,bitbucket:bitbucketAuthApiRef},factory:({github:b,gitlab:D,azure:Z,bitbucket:M})=>X.merge(X.forGithub(b),X.forGitlab(D),X.forAzure(Z),X.forBitbucket(M))})}static forAuthApi(b,D){return new X("generic",b,D.host,D.scopeMapping)}static forGithub(b,D){var M;const Z=(M=D==null?void 0:D.host)!=null?M:"github.com";return new X("github",b,Z,{default:["repo","read:org","read:user"],repoWrite:["gist"]})}static forGitlab(b,D){var M;const Z=(M=D==null?void 0:D.host)!=null?M:"gitlab.com";return new X("gitlab",b,Z,{default:["read_user","read_api","read_repository"],repoWrite:["write_repository","api"]})}static forAzure(b,D){var M;const Z=(M=D==null?void 0:D.host)!=null?M:"dev.azure.com";return new X("azure",b,Z,{default:["vso.build","vso.code","vso.graph","vso.project","vso.profile"],repoWrite:["vso.code_manage"]})}static forBitbucket(b,D){var M;const Z=(M=D==null?void 0:D.host)!=null?M:"bitbucket.org";return new X("bitbucket",b,Z,{default:["account","team","pullrequest","snippet","issue"],repoWrite:["pullrequest:write","snippet:write","issue:write"]})}static merge(...b){return new l(b)}isUrlSupported(b){return b.host===nt(this,P)}getAdditionalScopesForProvider(b){var D,Z;return!(b!=null&&b.customScopes)||nt(this,T)==="generic"?[]:(Z=(D=b.customScopes)==null?void 0:D[nt(this,T)])!=null?Z:[]}async getCredentials(b){const{url:D,additionalScope:Z,...M}=b,K=nt(this,x).default.slice();Z!=null&&Z.repoWrite&&K.push(...nt(this,x).repoWrite);const ae=this.getAdditionalScopesForProvider(Z);ae.length&&K.push(...ae);const pe=[...new Set(K)],Me=await nt(this,R).getAccessToken(pe,M);return{token:Me,headers:{Authorization:`Bearer ${Me}`}}}};let f=X;R=new WeakMap,P=new WeakMap,x=new WeakMap,T=new WeakMap;var E=e(86574);class i{static fromConfig(b){return E.Lx.fromConfig(b)}}const o=(0,r.createApiRef)({id:"integration.scmintegrations"});var m=e(73250),u=e(2784);const h=F=>{var K;const{type:b}=F,D=(0,r.useApp)(),Z=m.Z,M=b&&(K=D.getSystemIcon(b))!=null?K:Z;return u.createElement(M,null)}},86574:function(_,s,e){var $,C,V,ue,ge,me,Se;"use strict";e.d(s,{Lx:function(){return Lt},Pb:function(){return ne}});var r=e(82717),t=e.n(r),l=e(76635);function f(w){const y=new URL("http://example.com");return y.host=w,y.host===w}function E(w){try{return new URL(w),!0}catch{return!1}}function i(w,y){return{list(){return w},byUrl(I){try{const H=typeof I=="string"?new URL(I):I;return w.find(Q=>y(Q)===H.host)}catch{return}},byHost(I){return w.find(H=>y(H)===I)}}}function o(w){const{url:y,base:I,lineNumber:H}=w;try{return new URL(y),y}catch{}let Q;if(y.startsWith("/")){const{filepath:xe}=t()(I);Q=new URL(I);const Ae=(0,l.trimEnd)(Q.pathname.substring(0,Q.pathname.length-xe.length),"/");Q.pathname=`${Ae}${y}`}else Q=new URL(y,I);return Q.search=new URL(I).search,H&&(Q.hash=`L${H}`),Q.toString()}const m="GB",et=class{constructor(y,I,H,Q,xe,Ae){sn(this,$,void 0);sn(this,C,void 0);sn(this,V,void 0);sn(this,ue,void 0);sn(this,ge,void 0);sn(this,me,void 0);sn(this,Se,(...y)=>{const I=new URL(nt(this,$));return I.pathname=y.map(H=>encodeURIComponent(H)).join("/"),I});gn(this,$,y),gn(this,C,I),gn(this,V,H),gn(this,ue,Q),gn(this,ge,xe),gn(this,me,Ae)}static fromRepoUrl(y){var Ht;const I=new URL(y);let H,Q,xe;const Ae=I.pathname.split("/").map(qt=>decodeURIComponent(qt));if(Ae[2]==="_git"?(H=Ae[1],Q=xe=Ae[3]):Ae[3]==="_git"&&(H=Ae[1],Q=Ae[2],xe=Ae[4]),!H||!Q||!xe)throw new Error("Azure URL must point to a git repository");const Ie=(Ht=I.searchParams.get("path"))!=null?Ht:void 0;let He;const ft=I.searchParams.get("version");if(ft){if(ft.slice(0,2)!=="GB")throw new Error("Azure URL version must point to a git branch");He=ft.slice(2)}return new et(I.origin,H,Q,xe,Ie,He)}toRepoUrl(){let y;return nt(this,V)===nt(this,ue)?y=nt(this,Se).call(this,nt(this,C),"_git",nt(this,ue)):y=nt(this,Se).call(this,nt(this,C),nt(this,V),"_git",nt(this,ue)),nt(this,ge)&&y.searchParams.set("path",nt(this,ge)),nt(this,me)&&y.searchParams.set("version",m+nt(this,me)),y.toString()}toFileUrl(){if(!nt(this,ge))throw new Error("Azure URL must point to a specific path to be able to download a file");const y=nt(this,Se).call(this,nt(this,C),nt(this,V),"_apis","git","repositories",nt(this,ue),"items");return y.searchParams.set("api-version","6.0"),y.searchParams.set("path",nt(this,ge)),nt(this,me)&&y.searchParams.set("version",nt(this,me)),y.toString()}toArchiveUrl(){const y=nt(this,Se).call(this,nt(this,C),nt(this,V),"_apis","git","repositories",nt(this,ue),"items");return y.searchParams.set("recursionLevel","full"),y.searchParams.set("download","true"),y.searchParams.set("api-version","6.0"),nt(this,ge)&&y.searchParams.set("scopePath",nt(this,ge)),nt(this,me)&&y.searchParams.set("version",nt(this,me)),y.toString()}toCommitsUrl(){const y=nt(this,Se).call(this,nt(this,C),nt(this,V),"_apis","git","repositories",nt(this,ue),"commits");return y.searchParams.set("api-version","6.0"),nt(this,me)&&y.searchParams.set("searchCriteria.itemVersion.version",nt(this,me)),y.toString()}getOwner(){return nt(this,C)}getProject(){return nt(this,V)}getRepo(){return nt(this,ue)}getPath(){return nt(this,ge)}getRef(){return nt(this,me)}};let u=et;$=new WeakMap,C=new WeakMap,V=new WeakMap,ue=new WeakMap,ge=new WeakMap,me=new WeakMap,Se=new WeakMap;const h="dev.azure.com";function g(w){var H;const y=(H=w.getOptionalString("host"))!=null?H:h,I=w.getOptionalString("token");if(!f(y))throw new Error(`Invalid Azure integration config, '${y}' is not a valid host`);return{host:y,token:I}}function R(w){const y=w.map(g);return y.some(I=>I.host===h)||y.push({host:h}),y}const st=class{constructor(y){this.integrationConfig=y}get type(){return"azure"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(y){var Q;const{url:I,base:H}=y;if(E(I))return I;try{const xe=u.fromRepoUrl(H),Ae=new URL(H),Ie=new URL(`https://a.com${(Q=xe.getPath())!=null?Q:""}`),He=new URL(I,Ie).pathname;return Ae.searchParams.set("path",He),y.lineNumber&&(Ae.searchParams.set("line",String(y.lineNumber)),Ae.searchParams.set("lineEnd",String(y.lineNumber+1)),Ae.searchParams.set("lineStartColumn","1"),Ae.searchParams.set("lineEndColumn","1")),Ae.toString()}catch{return new URL(I,H).toString()}}resolveEditUrl(y){return y}};let P=st;oe(P,"factory",({config:y})=>{var H;const I=R((H=y.getOptionalConfigArray("integrations.azure"))!=null?H:[]);return i(I.map(Q=>new st(Q)),Q=>Q.config.host)});var x=e(48834).Buffer;function T(w){return AzureUrl.fromRepoUrl(w).toFileUrl()}function X(w){return AzureUrl.fromRepoUrl(w).toArchiveUrl()}function F(w){return AzureUrl.fromRepoUrl(w).toCommitsUrl()}function b(w,y){const I=y?{...y}:{};if(w.token){const H=x.from(`:${w.token}`,"utf8");I.Authorization=`Basic ${H.toString("base64")}`}return{headers:I}}const D="bitbucket.org",Z="https://api.bitbucket.org/2.0";function M(w){var Ae;const y=(Ae=w.getOptionalString("host"))!=null?Ae:D;let I=w.getOptionalString("apiBaseUrl");const H=w.getOptionalString("token"),Q=w.getOptionalString("username"),xe=w.getOptionalString("appPassword");if(!f(y))throw new Error(`Invalid Bitbucket integration config, '${y}' is not a valid host`);return I?I=(0,l.trimEnd)(I,"/"):y===D?I=Z:I=`https://${y}/rest/api/1.0`,{host:y,apiBaseUrl:I,token:H,username:Q,appPassword:xe}}function K(w){const y=w.map(M);return y.some(I=>I.host===D)||y.push({host:D,apiBaseUrl:Z}),y}const Ve=class{constructor(y){this.integrationConfig=y}get type(){return"bitbucket"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(y){const I=o(y);if(!y.lineNumber)return I;const H=new URL(I);return this.integrationConfig.host==="bitbucket.org"?H.hash=`lines-${y.lineNumber}`:H.hash=`${y.lineNumber}`,H.toString()}resolveEditUrl(y){const I=t()(y),H=new URL(y);return H.searchParams.set("mode","edit"),H.searchParams.set("spa","0"),H.searchParams.set("at",I.ref),H.toString()}};let ae=Ve;oe(ae,"factory",({config:y})=>{var H;const I=K((H=y.getOptionalConfigArray("integrations.bitbucket"))!=null?H:[]);return i(I.map(Q=>new Ve(Q)),Q=>Q.config.host)});var pe=e(96279),Me=e(48834).Buffer;async function Ue(w,y){const{name:I,owner:H,resource:Q}=parseGitUrl(w),xe=Q==="bitbucket.org";let Ae=xe?`${y.apiBaseUrl}/repositories/${H}/${I}`:`${y.apiBaseUrl}/projects/${H}/repos/${I}/default-branch`,Ie=await fetch(Ae,_e(y));if(Ie.status===404&&!xe&&(Ae=`${y.apiBaseUrl}/projects/${H}/repos/${I}/branches/default`,Ie=await fetch(Ae,_e(y))),!Ie.ok){const ft=`Failed to retrieve default branch from ${Ae}, ${Ie.status} ${Ie.statusText}`;throw new Error(ft)}let He;if(xe)He=(await Ie.json()).mainbranch.name;else{const{displayId:ft}=await Ie.json();He=ft}if(!He)throw new Error(`Failed to read default branch from ${Ae}. Response ${Ie.status} ${Ie.json()}`);return He}async function de(w,y){const{name:I,owner:H,ref:Q,protocol:xe,resource:Ae,filepath:Ie}=parseGitUrl(w),He=Ae==="bitbucket.org";let ft=Q;ft||(ft=await Ue(w,y));const Ht=Ie?`&path=${encodeURIComponent(Ie)}`:"";return He?`${xe}://${Ae}/${H}/${I}/get/${ft}.tar.gz`:`${y.apiBaseUrl}/projects/${H}/repos/${I}/archive?format=tgz&at=${ft}&prefix=${H}-${I}${Ht}`}function je(w,y){try{const{owner:I,name:H,ref:Q,filepathtype:xe,filepath:Ae}=parseGitUrl(w);if(!I||!H||xe!=="browse"&&xe!=="raw"&&xe!=="src")throw new Error("Invalid Bitbucket URL or file path");const Ie=Ae.replace(/^\//,"");if(y.host==="bitbucket.org"){if(!Q)throw new Error("Invalid Bitbucket URL or file path");return`${y.apiBaseUrl}/repositories/${I}/${H}/src/${Q}/${Ie}`}return`${y.apiBaseUrl}/projects/${I}/repos/${H}/raw/${Ie}?at=${Q}`}catch(I){throw new Error(`Incorrect URL: ${w}, ${I}`)}}function _e(w){const y={};if(w.token)y.Authorization=`Bearer ${w.token}`;else if(w.username&&w.appPassword){const I=Me.from(`${w.username}:${w.appPassword}`,"utf8");y.Authorization=`Basic ${I.toString("base64")}`}return{headers:y}}function Qe(w){const y=w.getString("host");let I=w.getOptionalString("baseUrl"),H=w.getOptionalString("gitilesBaseUrl");const Q=w.getOptionalString("username"),xe=w.getOptionalString("password");if(f(y)){if(I&&!E(I))throw new Error(`Invalid Gerrit integration config, '${I}' is not a valid baseUrl`);if(H&&!E(H))throw new Error(`Invalid Gerrit integration config, '${H}' is not a valid gitilesBaseUrl`)}else throw new Error(`Invalid Gerrit integration config, '${y}' is not a valid host`);return I?I=(0,l.trimEnd)(I,"/"):I=`https://${y}`,H?H=(0,l.trimEnd)(H,"/"):H=`https://${y}`,{host:y,baseUrl:I,gitilesBaseUrl:H,username:Q,password:xe}}function rt(w){return w.map(Qe)}const Je=class{constructor(y){this.integrationConfig=y}get type(){return"gerrit"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(y){const{url:I,base:H,lineNumber:Q}=y;let xe;return I?xe=new URL(I,H):xe=new URL(H),Q&&(xe.hash=Q.toString()),xe.toString()}resolveEditUrl(y){return y}};let ot=Je;oe(ot,"factory",({config:y})=>{var H;const I=rt((H=y.getOptionalConfigArray("integrations.gerrit"))!=null?H:[]);return i(I.map(Q=>new Je(Q)),Q=>Q.config.host)});var gt=e(48834).Buffer;const Le=")]}'";function Xe(w,y){const H=y.replace(w.gitilesBaseUrl,"").split("/").filter(ft=>!!ft),Q=H.indexOf("+");if(Q<=0)throw new Error(`Unable to parse project from url: ${y}`);const xe=trimStart(H.slice(0,Q).join("/"),"/"),Ae=H.indexOf("heads");if(Ae<=0)throw new Error(`Unable to parse branch from url: ${y}`);const Ie=H[Ae+1],He=H.slice(Ae+2).join("/");return{branch:Ie,filePath:He===""?"/":He,project:xe}}function Ye(w){return w.password?"/a/":"/"}function Rt(w,y){const{branch:I,filePath:H,project:Q}=Xe(w,y);return`${w.baseUrl}${Ye(w)}projects/${encodeURIComponent(Q)}/branches/${I}/files/${encodeURIComponent(H)}/content`}function pt(w){const y={};if(!w.password)return y;const I=gt.from(`${w.username}:${w.password}`,"utf8");return y.Authorization=`Basic ${I.toString("base64")}`,{headers:y}}async function St(w){const y=await w.text();if(y.startsWith(Le))try{return JSON.parse(y.slice(Le.length))}catch(I){throw new Error(`Invalid response from Gerrit: ${y.slice(0,10)} - ${I}`)}throw new Error(`Gerrit JSON body prefix missing. Found: ${y.slice(0,10)}`)}const lt="github.com",yt="https://api.github.com",bt="https://raw.githubusercontent.com";function Tt(w){var Ae,Ie;const y=(Ae=w.getOptionalString("host"))!=null?Ae:lt;let I=w.getOptionalString("apiBaseUrl"),H=w.getOptionalString("rawBaseUrl");const Q=w.getOptionalString("token"),xe=(Ie=w.getOptionalConfigArray("apps"))==null?void 0:Ie.map(He=>({appId:He.getNumber("appId"),clientId:He.getString("clientId"),clientSecret:He.getString("clientSecret"),webhookSecret:He.getString("webhookSecret"),privateKey:He.getString("privateKey"),allowedInstallationOwners:He.getOptionalStringArray("allowedInstallationOwners")}));if(!f(y))throw new Error(`Invalid GitHub integration config, '${y}' is not a valid host`);return I?I=(0,l.trimEnd)(I,"/"):y===lt&&(I=yt),H?H=(0,l.trimEnd)(H,"/"):y===lt&&(H=bt),{host:y,apiBaseUrl:I,rawBaseUrl:H,token:Q,apps:xe}}function Mt(w){const y=w.map(Tt);return y.some(I=>I.host===lt)||y.push({host:lt,apiBaseUrl:yt,rawBaseUrl:bt}),y}function Bt(w,y,I){try{const{owner:H,name:Q,ref:xe,filepathtype:Ae,filepath:Ie}=parseGitUrl(w);if(!H||!Q||!xe||Ae!=="blob"&&Ae!=="raw"&&Ae!=="tree")throw new Error("Invalid GitHub URL or file path");const He=Ie.replace(/^\//,"");return ze(y,I)==="api"?`${y.apiBaseUrl}/repos/${H}/${Q}/contents/${He}?ref=${xe}`:`${y.rawBaseUrl}/${H}/${Q}/${xe}/${He}`}catch(H){throw new Error(`Incorrect URL: ${w}, ${H}`)}}function It(w,y){const I={};return ze(w,y)==="api"&&(I.Accept="application/vnd.github.v3.raw"),y.token&&(I.Authorization=`token ${y.token}`),{headers:I}}function ze(w,y){return w.apiBaseUrl&&(y.token||!w.rawBaseUrl)?"api":"raw"}class ct{constructor(){oe(this,"tokenCache",new Map);oe(this,"isNotExpired",y=>y.diff(DateTime.local(),"minutes").minutes>50)}async getOrCreateToken(y,I){const H=this.tokenCache.get(y);if(H&&this.isNotExpired(H.expiresAt))return{accessToken:H.token};const Q=await I();return this.tokenCache.set(y,Q),{accessToken:Q.token}}}const ke={Accept:"application/vnd.github.machine-man-preview+json"};class Ct{constructor(y,I){oe(this,"appClient");oe(this,"baseUrl");oe(this,"baseAuthConfig");oe(this,"cache",new ct);oe(this,"allowedInstallationOwners");this.allowedInstallationOwners=y.allowedInstallationOwners,this.baseUrl=I,this.baseAuthConfig={appId:y.appId,privateKey:y.privateKey.replace(/\\n/gm,`
|
|
31
|
+
`)},this.appClient=new Octokit({baseUrl:I,headers:ke,authStrategy:createAppAuth,auth:this.baseAuthConfig})}async getInstallationCredentials(y,I){var Ae;const{installationId:H,suspended:Q}=await this.getInstallationData(y);if(this.allowedInstallationOwners&&!((Ae=this.allowedInstallationOwners)!=null&&Ae.includes(y)))return{accessToken:void 0};if(Q)throw new Error(`The GitHub application for ${y} is suspended`);const xe=I?`${y}/${I}`:y;return this.cache.getOrCreateToken(xe,async()=>{const Ie=await this.appClient.apps.createInstallationAccessToken({installation_id:H,headers:ke});if(I&&Ie.data.repository_selection==="selected"){const He=new Octokit({baseUrl:this.baseUrl,auth:Ie.data.token});if(!(await He.paginate(He.apps.listReposAccessibleToInstallation)).some(qt=>qt.name===I))throw new Error(`The Backstage GitHub application used in the ${y} organization does not have access to a repository with the name ${I}`)}return{token:Ie.data.token,expiresAt:DateTime.fromISO(Ie.data.expires_at)}})}getInstallations(){return this.appClient.paginate(this.appClient.apps.listInstallations)}async getInstallationData(y){const H=(await this.getInstallations()).find(xe=>{var Ae,Ie;return((Ie=(Ae=xe.account)==null?void 0:Ae.login)==null?void 0:Ie.toLocaleLowerCase("en-US"))===y.toLocaleLowerCase("en-US")});if(H)return{installationId:H.id,suspended:Boolean(H.suspended_by)};const Q=new Error(`No app installation found for ${y} in ${this.baseAuthConfig.appId}`);throw Q.name="NotFoundError",Q}}class ut{constructor(y){oe(this,"apps");var I,H;this.apps=(H=(I=y.apps)==null?void 0:I.map(Q=>new Ct(Q,y.apiBaseUrl)))!=null?H:[]}async getAllInstallations(){return this.apps.length?(await Promise.all(this.apps.map(I=>I.getInstallations()))).flat():[]}async getAppToken(y,I){if(this.apps.length===0)return;const H=await Promise.all(this.apps.map(Ie=>Ie.getInstallationCredentials(y,I).then(He=>({credentials:He,error:void 0}),He=>({credentials:void 0,error:He})))),Q=H.find(Ie=>Ie.credentials);if(Q)return Q.credentials.accessToken;const Ae=H.map(Ie=>Ie.error).find(Ie=>Ie.name!=="NotFoundError");if(Ae)throw Ae}}class Et{constructor(y,I){this.githubAppCredentialsMux=y,this.token=I}async getCredentials(y){const I=parseGitUrl(y.url),H=I.owner||I.name,Q=I.owner?I.name:void 0;let xe="app",Ae=await this.githubAppCredentialsMux.getAppToken(H,Q);return Ae||(xe="token",Ae=this.token),{headers:Ae?{Authorization:`Bearer ${Ae}`}:void 0,token:Ae,type:xe}}}oe(Et,"create",null);class q{static fromIntegrations(y){const I=new Map;return y.github.list().forEach(H=>{const Q=SingleInstanceGithubCredentialsProvider.create(H.config);I.set(H.config.host,Q)}),new q(I)}constructor(y){this.providers=y}async getCredentials(y){const I=new URL(y.url),H=this.providers.get(I.host);if(!H)throw new Error(`There is no GitHub integration that matches ${y.url}. Please add a configuration for an integration.`);return H.getCredentials(y)}}const ht=class{constructor(y){this.integrationConfig=y}get type(){return"github"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(y){return ne(o(y),"tree")}resolveEditUrl(y){return ne(y,"edit")}};let N=ht;oe(N,"factory",({config:y})=>{var H;const I=Mt((H=y.getOptionalConfigArray("integrations.github"))!=null?H:[]);return i(I.map(Q=>new ht(Q)),Q=>Q.config.host)});function ne(w,y){return w.replace(/\/\/([^/]+)\/([^/]+)\/([^/]+)\/(blob|tree|edit)\//,(I,H,Q,xe)=>`//${H}/${Q}/${xe}/${y}/`)}const ce="gitlab.com",se="https://gitlab.com/api/v4";function Ee(w){const y=w.getString("host");let I=w.getOptionalString("apiBaseUrl");const H=w.getOptionalString("token");let Q=w.getOptionalString("baseUrl");if(I?I=(0,l.trimEnd)(I,"/"):y===ce&&(I=se),Q?Q=(0,l.trimEnd)(Q,"/"):Q=`https://${y}`,f(y)){if(!I||!E(I))throw new Error(`Invalid GitLab integration config, '${I}' is not a valid apiBaseUrl`);if(!E(Q))throw new Error(`Invalid GitLab integration config, '${Q}' is not a valid baseUrl`)}else throw new Error(`Invalid GitLab integration config, '${y}' is not a valid host`);return{host:y,token:H,apiBaseUrl:I,baseUrl:Q}}function Ze(w){const y=w.map(Ee);return y.some(I=>I.host===ce)||y.push({host:ce,apiBaseUrl:se,baseUrl:`https://${ce}`}),y}async function $e(w,y){if(w.includes("/-/blob/")){const I=await z(w,y);return Y(w,I).toString()}return te(w).toString()}function at(w){const{token:y=""}=w;return{headers:{"PRIVATE-TOKEN":y}}}function te(w){try{const y=new URL(w),[I,H,Q,xe,...Ae]=y.pathname.split("/");if(I!==""||H===""||Q===""||xe!=="blob"||!Ae.join("/").match(/\.(yaml|yml)$/))throw new Error("Wrong GitLab URL");return y.pathname=[I,H,Q,"raw",...Ae].join("/"),y}catch(y){throw new Error(`Incorrect url: ${w}, ${y}`)}}function Y(w,y){try{const I=new URL(w),H=I.pathname.split("/-/blob/")[1],[Q,...xe]=H.split("/");return I.pathname=["/api/v4/projects",y,"repository/files",encodeURIComponent(decodeURIComponent(xe.join("/"))),"raw"].join("/"),I.search=`?ref=${Q}`,I}catch(I){throw new Error(`Incorrect url: ${w}, ${I}`)}}async function z(w,y){const I=new URL(w);if(!I.pathname.includes("/-/blob/"))throw new Error("Please provide full path to yaml file from GitLab");try{const H=I.pathname.split("/-/blob/")[0],Q=new URL(`${I.origin}/api/v4/projects/${encodeURIComponent(H.replace(/^\//,""))}`),xe=await fetch(Q.toString(),at(y)),Ae=await xe.json();if(!xe.ok)throw new Error(`GitLab Error '${Ae.error}', ${Ae.error_description}`);return Number(Ae.id)}catch(H){throw new Error(`Could not get GitLab project ID for: ${w}, ${H}`)}}const it=class{constructor(y){this.integrationConfig=y}get type(){return"gitlab"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(y){return o(y)}resolveEditUrl(y){return Te(y,"edit")}};let ie=it;oe(ie,"factory",({config:y})=>{var H;const I=Ze((H=y.getOptionalConfigArray("integrations.gitlab"))!=null?H:[]);return i(I.map(Q=>new it(Q)),Q=>Q.config.host)});function Te(w,y){return w.replace(/\/\-\/(blob|tree|edit)\//,`/-/${y}/`)}const Oe="amazonaws.com";function ve(w){var ft;const y=w.getOptionalString("endpoint"),I=(ft=w.getOptionalBoolean("s3ForcePathStyle"))!=null?ft:!1;let H,Q;if(y){try{const Ht=new URL(y);H=Ht.host,Q=Ht.pathname}catch{throw new Error(`invalid awsS3 integration config, endpoint '${y}' is not a valid URL`)}if(Q!=="/")throw new Error(`invalid awsS3 integration config, endpoints cannot contain path, got '${y}'`)}else H=Oe;const xe=w.getOptionalString("accessKeyId"),Ae=w.getOptionalString("secretAccessKey"),Ie=w.getOptionalString("roleArn"),He=w.getOptionalString("externalId");return{host:H,endpoint:y,s3ForcePathStyle:I,accessKeyId:xe,secretAccessKey:Ae,roleArn:Ie,externalId:He}}function De(w){const y=w.map(ve);return y.some(I=>I.host===Oe)||y.push({host:Oe}),y}const we=class{get type(){return"awsS3"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}constructor(y){this.integrationConfig=y}resolveUrl(y){return o(y)}resolveEditUrl(y){return y}};let vt=we;oe(vt,"factory",({config:y})=>{var H;const I=De((H=y.getOptionalConfigArray("integrations.awsS3"))!=null?H:[]);return i(I.map(Q=>new we(Q)),Q=>Q.config.host)});class Lt{constructor(y){oe(this,"byType");this.byType=y}static fromConfig(y){return new Lt({awsS3:vt.factory({config:y}),azure:P.factory({config:y}),bitbucket:ae.factory({config:y}),gerrit:ot.factory({config:y}),github:N.factory({config:y}),gitlab:ie.factory({config:y})})}get awsS3(){return this.byType.awsS3}get azure(){return this.byType.azure}get bitbucket(){return this.byType.bitbucket}get gerrit(){return this.byType.gerrit}get github(){return this.byType.github}get gitlab(){return this.byType.gitlab}list(){return Object.values(this.byType).flatMap(y=>y.list())}byUrl(y){return Object.values(this.byType).map(I=>I.byUrl(y)).find(Boolean)}byHost(y){return Object.values(this.byType).map(I=>I.byHost(y)).find(Boolean)}resolveUrl(y){const I=this.byUrl(y.base);return I?I.resolveUrl(y):o(y)}resolveEditUrl(y){const I=this.byUrl(y);return I?I.resolveEditUrl(y):y}}},46054:function(_,s,e){"use strict";var r={};e.r(r),e.d(r,{TechDocsPlugin:function(){return Yt.plugin}});var t=e(2784),l=e(47093),f=e(10289),E=e(49208),i=e(36964),o=e(68099);const m=[(0,i.createApiFactory)({api:i.discoveryApiRef,deps:{configApi:i.configApiRef},factory:({configApi:L})=>E.UrlPatternDiscovery.compile(`${L.getString("backend.baseUrl")}/api/{{ pluginId }}`)}),(0,i.createApiFactory)({api:i.alertApiRef,deps:{},factory:()=>new E.AlertApiForwarder}),(0,i.createApiFactory)({api:i.analyticsApiRef,deps:{},factory:()=>new E.NoOpAnalyticsApi}),(0,i.createApiFactory)({api:i.errorApiRef,deps:{alertApi:i.alertApiRef},factory:({alertApi:L})=>{const ee=new E.ErrorAlerter(L,new E.ErrorApiForwarder);return E.UnhandledErrorForwarder.forward(ee,{hidden:!1}),ee}}),(0,i.createApiFactory)({api:i.storageApiRef,deps:{errorApi:i.errorApiRef},factory:({errorApi:L})=>E.WebStorage.create({errorApi:L})}),(0,i.createApiFactory)({api:i.fetchApiRef,deps:{configApi:i.configApiRef,identityApi:i.identityApiRef,discoveryApi:i.discoveryApiRef},factory:({configApi:L,identityApi:ee,discoveryApi:fe})=>(0,E.createFetchApi)({middleware:[E.FetchMiddlewares.resolvePluginProtocol({discoveryApi:fe}),E.FetchMiddlewares.injectIdentityAuth({identityApi:ee,config:L})]})}),(0,i.createApiFactory)({api:i.oauthRequestApiRef,deps:{},factory:()=>new E.OAuthRequestManager}),(0,i.createApiFactory)({api:i.googleAuthApiRef,deps:{discoveryApi:i.discoveryApiRef,oauthRequestApi:i.oauthRequestApiRef,configApi:i.configApiRef},factory:({discoveryApi:L,oauthRequestApi:ee,configApi:fe})=>E.GoogleAuth.create({discoveryApi:L,oauthRequestApi:ee,environment:fe.getOptionalString("auth.environment")})}),(0,i.createApiFactory)({api:i.microsoftAuthApiRef,deps:{discoveryApi:i.discoveryApiRef,oauthRequestApi:i.oauthRequestApiRef,configApi:i.configApiRef},factory:({discoveryApi:L,oauthRequestApi:ee,configApi:fe})=>E.MicrosoftAuth.create({discoveryApi:L,oauthRequestApi:ee,environment:fe.getOptionalString("auth.environment")})}),(0,i.createApiFactory)({api:i.githubAuthApiRef,deps:{discoveryApi:i.discoveryApiRef,oauthRequestApi:i.oauthRequestApiRef,configApi:i.configApiRef},factory:({discoveryApi:L,oauthRequestApi:ee,configApi:fe})=>E.GithubAuth.create({discoveryApi:L,oauthRequestApi:ee,defaultScopes:["read:user"],environment:fe.getOptionalString("auth.environment")})}),(0,i.createApiFactory)({api:i.oktaAuthApiRef,deps:{discoveryApi:i.discoveryApiRef,oauthRequestApi:i.oauthRequestApiRef,configApi:i.configApiRef},factory:({discoveryApi:L,oauthRequestApi:ee,configApi:fe})=>E.OktaAuth.create({discoveryApi:L,oauthRequestApi:ee,environment:fe.getOptionalString("auth.environment")})}),(0,i.createApiFactory)({api:i.gitlabAuthApiRef,deps:{discoveryApi:i.discoveryApiRef,oauthRequestApi:i.oauthRequestApiRef,configApi:i.configApiRef},factory:({discoveryApi:L,oauthRequestApi:ee,configApi:fe})=>E.GitlabAuth.create({discoveryApi:L,oauthRequestApi:ee,environment:fe.getOptionalString("auth.environment")})}),(0,i.createApiFactory)({api:i.oneloginAuthApiRef,deps:{discoveryApi:i.discoveryApiRef,oauthRequestApi:i.oauthRequestApiRef,configApi:i.configApiRef},factory:({discoveryApi:L,oauthRequestApi:ee,configApi:fe})=>E.OneLoginAuth.create({discoveryApi:L,oauthRequestApi:ee,environment:fe.getOptionalString("auth.environment")})}),(0,i.createApiFactory)({api:i.bitbucketAuthApiRef,deps:{discoveryApi:i.discoveryApiRef,oauthRequestApi:i.oauthRequestApiRef,configApi:i.configApiRef},factory:({discoveryApi:L,oauthRequestApi:ee,configApi:fe})=>E.BitbucketAuth.create({discoveryApi:L,oauthRequestApi:ee,defaultScopes:["team"],environment:fe.getOptionalString("auth.environment")})}),(0,i.createApiFactory)({api:i.atlassianAuthApiRef,deps:{discoveryApi:i.discoveryApiRef,oauthRequestApi:i.oauthRequestApiRef,configApi:i.configApiRef},factory:({discoveryApi:L,oauthRequestApi:ee,configApi:fe})=>E.AtlassianAuth.create({discoveryApi:L,oauthRequestApi:ee,environment:fe.getOptionalString("auth.environment")})}),(0,i.createApiFactory)({api:o.RV,deps:{discovery:i.discoveryApiRef,identity:i.identityApiRef,config:i.configApiRef},factory:({config:L,discovery:ee,identity:fe})=>o.iM.create({config:L,discovery:ee,identity:fe})})];var u=e(77277),h=e(9118),g=e(62833);function R({children:L}){return(0,f.GV)()?t.createElement(t.Fragment,null,L):t.createElement(f.VA,null,L)}const P=()=>t.createElement(h.ErrorPage,{status:"404",statusMessage:"PAGE NOT FOUND"}),x=({step:L,error:ee})=>{let fe="";return L==="load-config"?fe=`The configuration failed to load, someone should have a look at this error: ${ee.message}`:L==="load-chunk"&&(fe=`Lazy loaded chunk failed to load, try to reload the page: ${ee.message}`),t.createElement(R,null,t.createElement(h.ErrorPage,{status:"501",statusMessage:fe}))},T=({error:L,resetError:ee,plugin:fe})=>t.createElement(h.ErrorPanel,{title:`Error in ${fe==null?void 0:fe.getId()}`,defaultExpanded:!0,error:L},t.createElement(u.Z,{variant:"outlined",onClick:ee},"Retry")),X={Progress:h.Progress,Router:g.VK,NotFoundErrorPage:P,BootErrorPage:x,ErrorBoundaryFallback:T};var F=e(43642),b=e(80079),D=e(90941),Z=e(32915),M=e(40562),K=e(21853),ae=e(60744),pe=e(66569),Me=e(30254),Ue=e(13384),de=e(15933),je=e(58838),_e=e(86737),Qe=e(4989),rt=e(44407),ot=e(18628),gt=e(84219),Le=e(98685),Xe=e(39781);const Ye={brokenImage:b.Z,catalog:ot.Z,scaffolder:Z.Z,techdocs:M.Z,search:K.Z,chat:ae.Z,dashboard:pe.Z,docs:Me.Z,email:Ue.Z,github:je.Z,group:gt.Z,help:_e.Z,"kind:api":de.Z,"kind:component":rt.Z,"kind:domain":F.Z,"kind:group":gt.Z,"kind:location":Qe.Z,"kind:system":D.Z,"kind:user":Le.Z,user:Le.Z,warning:Xe.Z};var Rt=e(73689),pt=e(48032);const St={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")`},lt={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"]};function yt(L,ee){const Be=`linear-gradient(90deg, ${(L.length===1?[L[0],L[0]]:L).join(", ")})`,qe=`${ee}, ${Be}`;return{colors:L,shape:ee,backgroundImage:qe}}const bt={home:yt(lt.teal,St.wave),documentation:yt(lt.pinkSea,St.wave2),tool:yt(lt.purpleSky,St.round),service:yt(lt.marineBlue,St.wave),website:yt(lt.veryBlue,St.wave),library:yt(lt.rubyRed,St.wave),other:yt(lt.darkGrey,St.wave),app:yt(lt.toastyOrange,St.wave),apis:yt(lt.teal,St.wave2)},Tt='"Helvetica Neue", Helvetica, Roboto, Arial, sans-serif';function Mt(L){const{palette:ee,fontFamily:fe=Tt,defaultPageTheme:Be,pageTheme:qe=bt}=L;if(!qe[Be])throw new Error(`${Be} is not defined in pageTheme.`);return{palette:ee,props:{MuiGrid:{spacing:2},MuiSwitch:{color:"primary"}},typography:{fontFamily:fe,h5:{fontWeight:700},h4:{fontWeight:700,fontSize:28,marginBottom:6},h3:{fontSize:32,fontWeight:700,marginBottom:6},h2:{fontSize:40,fontWeight:700,marginBottom:8},h1:{fontSize:54,fontWeight:700,marginBottom:10}},page:qe[Be],getPageTheme:({themeId:A})=>{var S;return(S=qe[A])!=null?S:qe[Be]}}}function Bt(L){return{MuiCssBaseline:{"@global":{html:{height:"100%",fontFamily:L.typography.fontFamily},body:{height:"100%",fontFamily:L.typography.fontFamily,"overscroll-behavior-y":"none"},a:{color:"inherit",textDecoration:"none"}}},MuiTableRow:{root:{"&:nth-of-type(odd)":{backgroundColor:L.palette.background.default}},hover:{"&:hover":{cursor:"pointer"}},head:{"&:nth-of-type(odd)":{backgroundColor:L.palette.background.paper}}},MuiTableCell:{root:{wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:L.spacing(3,2,3,2.5),borderBottom:0},sizeSmall:{padding:L.spacing(1.5,2,1.5,2.5)},head:{wordBreak:"break-word",overflow:"hidden",color:"rgb(179, 179, 179)",fontWeight:"normal",lineHeight:"1"}},MuiTabs:{root:{minHeight:24}},MuiTab:{root:{color:L.palette.link,minHeight:24,textTransform:"initial",letterSpacing:"0.07em","&:hover":{color:(0,pt.darken)(L.palette.link,.3),background:(0,pt.lighten)(L.palette.link,.95)},[L.breakpoints.up("md")]:{minWidth:120,fontSize:L.typography.pxToRem(14),fontWeight:500}},textColorPrimary:{color:L.palette.link}},MuiTableSortLabel:{root:{color:"inherit","&:hover":{color:"inherit"},"&:focus":{color:"inherit"}},active:{fontWeight:"bold",color:"inherit"}},MuiListItemText:{dense:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},MuiButton:{text:{padding:void 0}},MuiChip:{root:{backgroundColor:"#D9D9D9",marginRight:L.spacing(1),marginBottom:L.spacing(1),color:L.palette.grey[900]},outlined:{color:L.palette.text.primary},label:{lineHeight:`${L.spacing(2.5)}px`,fontWeight:L.typography.fontWeightMedium,fontSize:`${L.spacing(1.75)}px`},labelSmall:{fontSize:`${L.spacing(1.5)}px`},deleteIcon:{color:L.palette.grey[500],width:`${L.spacing(3)}px`,height:`${L.spacing(3)}px`,margin:`0 ${L.spacing(.75)}px 0 -${L.spacing(.75)}px`},deleteIconSmall:{width:`${L.spacing(2)}px`,height:`${L.spacing(2)}px`,margin:`0 ${L.spacing(.5)}px 0 -${L.spacing(.5)}px`}},MuiCard:{root:{display:"flex",flexDirection:"column"}},MuiCardHeader:{root:{paddingBottom:0}},MuiCardContent:{root:{flexGrow:1,"&:last-child":{paddingBottom:void 0}}},MuiCardActions:{root:{justifyContent:"flex-end"}}}}function It(L){const ee=Mt(L),fe=(0,Rt.Z)(ee),Be=Bt(fe);return{...fe,overrides:Be}}var ze=e(34505);const ct=It({palette:{type:"light",background:{default:"#F8F8F8"},status:{ok:"#1DB954",warning:"#FF9800",error:"#E22134",running:"#2E77D0",pending:"#FFED51",aborted:"#757575"},bursts:{fontColor:"#FEFEFE",slackChannelText:"#ddd",backgroundColor:{default:"#7C3699"},gradient:{linear:"linear-gradient(-137deg, #4BB8A5 0%, #187656 100%)"}},primary:{main:"#2E77D0"},banner:{info:"#2E77D0",error:"#E22134",text:"#FFFFFF",link:"#000000",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:ze.Z.A700,navigation:{background:"#171717",indicator:"#9BF0E1",color:"#b5b5b5",selectedColor:"#FFF",navItem:{hoverBackground:"#404040"},submenu:{background:"#404040"}},pinSidebarButton:{icon:"#181818",background:"#BDBDBD"},tabbar:{indicator:"#9BF0E1"}},defaultPageTheme:"home",pageTheme:bt}),ke=It({palette:{type:"dark",background:{default:"#333333"},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",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:ze.Z.A700,navigation:{background:"#424242",indicator:"#9BF0E1",color:"#b5b5b5",selectedColor:"#FFF",navItem:{hoverBackground:"#404040"},submenu:{background:"#404040"}},pinSidebarButton:{icon:"#404040",background:"#BDBDBD"},tabbar:{indicator:"#9BF0E1"}},defaultPageTheme:"home",pageTheme:bt});var Ct=e(98192),ut=e(15222),Et=e(41547),q=e(87561);const N=[{id:"light",title:"Light Theme",variant:"light",icon:t.createElement(ut.Z,null),Provider:({children:L})=>t.createElement(Et.Z,{theme:ct},t.createElement(q.ZP,null,L))},{id:"dark",title:"Dark Theme",variant:"dark",icon:t.createElement(Ct.Z,null),Provider:({children:L})=>t.createElement(Et.Z,{theme:ke},t.createElement(q.ZP,null,L))}];function ne(L){var ee,fe,Be;return(0,E.createSpecializedApp)({...L,apis:(ee=L==null?void 0:L.apis)!=null?ee:[],bindRoutes:L==null?void 0:L.bindRoutes,components:{...X,...L==null?void 0:L.components},configLoader:L==null?void 0:L.configLoader,defaultApis:m,icons:{...Ye,...L==null?void 0:L.icons},plugins:(fe=L==null?void 0:L.plugins)!=null?fe:[],themes:(Be=L==null?void 0:L.themes)!=null?Be:N})}var ce=e(82394),se=e.n(ce),Ee=e(48023),Ze=e(76635);async function $e({storageApi:L}){var A;const ee=L.forBucket("settings"),fe=L.forBucket("starredEntities"),Be=ee.snapshot("starredEntities").value;if(!(0,Ze.isArray)(Be))return;const qe=new Set((A=fe.snapshot("entityRefs").value)!=null?A:[]);Be.filter(Ze.isString).map(S=>S.split(":")).filter(S=>S.length===4&&S[0]==="entity").map(([S,B,W,J])=>(0,Ee.eE)({kind:B,namespace:W,name:J})).forEach(S=>qe.add(S)),await fe.set("entityRefs",Array.from(qe)),await ee.remove("starredEntities")}class at{constructor(ee){oe(this,"settingsStore");oe(this,"starredEntities");oe(this,"subscribers",new Set);oe(this,"observable",new(se())(ee=>(ee.next(new Set(this.starredEntities)),this.subscribers.add(ee),()=>{this.subscribers.delete(ee)})));var fe;$e(ee).then(),this.settingsStore=ee.storageApi.forBucket("starredEntities"),this.starredEntities=new Set((fe=this.settingsStore.snapshot("entityRefs").value)!=null?fe:[]),this.settingsStore.observe$("entityRefs").subscribe({next:Be=>{var qe;this.starredEntities=new Set((qe=Be.value)!=null?qe:[]),this.notifyChanges()}})}async toggleStarred(ee){this.starredEntities.has(ee)?this.starredEntities.delete(ee):this.starredEntities.add(ee),await this.settingsStore.set("entityRefs",Array.from(this.starredEntities))}starredEntitie$(){return this.observable}notifyChanges(){for(const ee of this.subscribers)ee.next(new Set(this.starredEntities))}}var te=e(39398),Y=e(49782),z=e(79692);const ie=(0,z.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",wordBreak:"break-all",marginBottom:"1rem"}});function Te(L){const ee=L.result,fe=ie();return React.createElement(Link,{to:ee.location},React.createElement(ListItem,{alignItems:"flex-start",className:fe.flexContainer},React.createElement(ListItemText,{className:fe.itemText,primaryTypographyProps:{variant:"h6"},primary:ee.title,secondary:ee.text}),React.createElement(Box,null,ee.kind&&React.createElement(Chip,{label:`Kind: ${ee.kind}`,size:"small"}),ee.lifecycle&&React.createElement(Chip,{label:`Lifecycle: ${ee.lifecycle}`,size:"small"}))),React.createElement(Divider,{component:"li"}))}var Oe=e(30097),ve=e(53479),De=e(95544),vt=e(99688),Lt=e(12231),$=e(86136),C=e(49378),V=e(85256),ue=e(61837),ge=e(79784),me=e(50758),Se=e(49166),et=e(31654),st=e(43054),Ve=e(40749);const Je="catalog-entity",ht=(0,Ve.J$)({name:"catalog.entity.read",attributes:{action:"read"},resourceType:Je}),it=(0,Ve.J$)({name:"catalog.entity.create",attributes:{action:"create"}}),we=(0,Ve.J$)({name:"catalog.entity.delete",attributes:{action:"delete"},resourceType:Je}),w=(0,Ve.J$)({name:"catalog.entity.refresh",attributes:{action:"update"},resourceType:Je}),y=(0,Ve.J$)({name:"catalog.location.read",attributes:{action:"read"}}),I=(0,Ve.J$)({name:"catalog.location.create",attributes:{action:"create"}}),H=(0,Ve.J$)({name:"catalog.location.delete",attributes:{action:"delete"}}),Q=(0,z.Z)({button:{color:"white"}});function xe(L){var Ne;const{UNSTABLE_extraContextMenuItems:ee,UNSTABLE_contextMenuOptions:fe,onUnregisterEntity:Be,onInspectEntity:qe}=L,[A,S]=(0,t.useState)(),B=Q(),W=(0,ve.useEntityPermission)(we),J=Pe=>{S(Pe.currentTarget)},G=()=>{S(void 0)},he=ee&&[...ee.map(Pe=>t.createElement(Lt.Z,{key:Pe.title,onClick:()=>{G(),Pe.onClick()}},t.createElement($.Z,null,t.createElement(Pe.Icon,{fontSize:"small"})),t.createElement(C.Z,{primary:Pe.title}))),t.createElement(V.Z,{key:"the divider is here!"})],ye=(Ne=!W.allowed||(fe==null?void 0:fe.disableUnregister))!=null?Ne:!1;return t.createElement(t.Fragment,null,t.createElement(ue.Z,{"aria-label":"more","aria-controls":"long-menu","aria-haspopup":"true",onClick:J,"data-testid":"menu-button",className:B.button},t.createElement(st.Z,null)),t.createElement(ge.ZP,{open:Boolean(A),onClose:G,anchorEl:A,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}},t.createElement(me.Z,null,he,t.createElement(Lt.Z,{onClick:()=>{G(),Be()},disabled:ye},t.createElement($.Z,null,t.createElement(Se.Z,{fontSize:"small"})),t.createElement(C.Z,{primary:"Unregister entity"})),t.createElement(Lt.Z,{onClick:()=>{G(),qe()}},t.createElement($.Z,null,t.createElement(et.Z,{fontSize:"small"})),t.createElement(C.Z,{primary:"Inspect entity"})))))}const Ae="plugin.catalog.entityLayoutRoute",Ie=()=>null;(0,i.attachComponentData)(Ie,Ae,!0),(0,i.attachComponentData)(Ie,"core.gatherMountPoints",!0);function He(L){const{entity:ee,title:fe}=L;return t.createElement(De.Z,{display:"inline-flex",alignItems:"center",height:"1em",maxWidth:"100%"},t.createElement(De.Z,{component:"span",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},fe),ee&&t.createElement(ve.FavoriteEntity,{entity:ee}))}function ft(L,ee,fe,Be){var B,W,J,G,he;const qe=(B=L!=null?L:Be==null?void 0:Be.kind)!=null?B:"",A=(W=ee!=null?ee:Be==null?void 0:Be.metadata.namespace)!=null?W:"";return{headerTitle:`${(he=(G=(J=Be==null?void 0:Be.metadata.title)!=null?J:fe)!=null?G:Be==null?void 0:Be.metadata.name)!=null?he:""}${A&&A!==Ee.zG?` in ${A}`:""}`,headerType:(()=>{let ye=qe.toLocaleLowerCase("en-US");return Be&&Be.spec&&"type"in Be.spec&&(ye+=" \u2014 ",ye+=Be.spec.type.toLocaleLowerCase("en-US")),ye})()}}function Ht(L){var Be;const{entity:ee}=L,fe=(0,ve.getEntityRelations)(ee,Ee.S4);return t.createElement(t.Fragment,null,fe.length>0&&t.createElement(h.HeaderLabel,{label:"Owner",value:t.createElement(ve.EntityRefLinks,{entityRefs:fe,defaultKind:"Group",color:"inherit"})}),((Be=ee.spec)==null?void 0:Be.lifecycle)&&t.createElement(h.HeaderLabel,{label:"Lifecycle",value:ee.spec.lifecycle}))}const qt=L=>{var Ke,xt,Zt;const{UNSTABLE_extraContextMenuItems:ee,UNSTABLE_contextMenuOptions:fe,children:Be}=L,{kind:qe,namespace:A,name:S}=(0,i.useRouteRefParams)(ve.entityRouteRef),{entity:B,loading:W,error:J}=(0,ve.useAsyncEntity)(),G=(0,f.TH)(),he=(0,i.useElementFilter)(Be,yn=>yn.selectByComponentData({key:Ae,withStrictError:"Child of EntityLayout must be an EntityLayout.Route"}).getElements().flatMap(({props:wt})=>{if(B){if(wt.if&&!wt.if(B))return[]}else return[];return[{path:wt.path,title:wt.title,children:wt.children,tabProps:wt.tabProps}]}),[B]),{headerTitle:ye,headerType:Ne}=ft(qe,A,S,B),[Pe,Fe]=(0,t.useState)(!1),[We,Ge]=(0,t.useState)(!1),At=(0,f.s0)(),tt=async()=>{Fe(!1),Ge(!1),At("/")};return(0,t.useEffect)(()=>{Fe(!1),Ge(!1)},[G.pathname]),t.createElement(h.Page,{themeId:(Zt=(xt=(Ke=B==null?void 0:B.spec)==null?void 0:Ke.type)==null?void 0:xt.toString())!=null?Zt:"home"},t.createElement(h.Header,{title:t.createElement(He,{title:ye,entity:B}),pageTitleOverride:ye,type:Ne},B&&t.createElement(t.Fragment,null,t.createElement(Ht,{entity:B}),t.createElement(xe,{UNSTABLE_extraContextMenuItems:ee,UNSTABLE_contextMenuOptions:fe,onUnregisterEntity:()=>Fe(!0),onInspectEntity:()=>Ge(!0)}))),W&&t.createElement(h.Progress,null),B&&t.createElement(h.RoutedTabs,{routes:he}),J&&t.createElement(h.Content,null,t.createElement(vt.Z,{severity:"error"},J.toString())),!W&&!J&&!B&&t.createElement(h.Content,null,t.createElement(h.WarningPanel,{title:"Entity not found"},"There is no ",qe," with the requested"," ",t.createElement(h.Link,{to:"https://backstage.io/docs/features/software-catalog/references"},"kind, namespace, and name"),".")),t.createElement(ve.UnregisterEntityDialog,{open:Pe,entity:B,onConfirm:tt,onClose:()=>Fe(!1)}),t.createElement(ve.InspectEntityDialog,{open:We,entity:B,onClose:()=>Ge(!1)}))};qt.Route=Ie;var Mn=e(10179);function Fr(L){const{open:ee,onClose:fe,onConfirm:Be,entity:qe}=L,[A,S]=useState(!1),B=useApi(catalogApiRef),W=useApi(alertApiRef),J=async()=>{S(!0);try{const G=qe.metadata.uid;await B.removeEntityByUid(G),Be()}catch(G){assertError(G),W.post({message:G.message})}finally{S(!1)}};return React.createElement(Dialog,{open:ee,onClose:fe},React.createElement(DialogTitle,{id:"responsive-dialog-title"},"Are you sure you want to delete this entity?"),React.createElement(DialogActions,null,React.createElement(Button,{variant:"contained",color:"secondary",disabled:A,onClick:J},"Delete"),React.createElement(Button,{onClick:fe,color:"primary"},"Cancel")))}var pn=e(47851);function Kn(L){var ee,fe;return((fe=(ee=L==null?void 0:L.metadata)==null?void 0:ee.annotations)==null?void 0:fe["backstage.io/orphan"])==="true"}function Br(){const L=useNavigate(),ee=useRouteRef(rootRouteRef),[fe,Be]=useState(!1),{entity:qe}=useEntity(),A=async()=>{Be(!1),L(ee())};return React.createElement(React.Fragment,null,React.createElement(Alert,{severity:"warning",onClick:()=>Be(!0)},"This entity is not referenced by any location and is therefore not receiving updates. Click here to delete."),React.createElement(DeleteEntityDialog,{open:fe,entity:qe,onConfirm:A,onClose:()=>Be(!1)}))}var lr=e(30001);const cr=L=>L.error&&L.level==="error"&&L.type===ENTITY_STATUS_CATALOG_PROCESSING_TYPE;async function Jn(L,ee){return{items:(await ee.getEntityAncestors({entityRef:L})).items.map(qe=>{var B,W;return{errors:((W=(B=qe.entity.status)==null?void 0:B.items)!=null?W:[]).filter(cr).map(J=>J.error).filter(J=>Boolean(J)),entity:qe.entity}}).filter(qe=>qe.errors.length>0)}}async function Mr(L,ee){const fe=ee.apis.get(catalogApiRef);if(!fe)throw new Error(`No implementation available for ${catalogApiRef}`);return(await Jn(stringifyEntityRef(L),fe)).items.length>0}function na(){const{entity:L}=useEntity(),ee=stringifyEntityRef(L),fe=useApi(catalogApiRef),{loading:Be,error:qe,value:A}=useAsync(async()=>Jn(ee,fe),[ee,fe]);return qe?React.createElement(Box,{mb:1},React.createElement(ResponseErrorPanel,{error:qe})):Be||!A?null:React.createElement(React.Fragment,null,A.items.map((S,B)=>React.createElement(Box,{key:B,mb:1},stringifyEntityRef(L)!==stringifyEntityRef(S.entity)&&React.createElement(Box,{p:1},"The error below originates from"," ",React.createElement(EntityRefLink,{entityRef:S.entity})),S.errors.map((W,J)=>React.createElement(ResponseErrorPanel,{key:J,error:W})))))}var ur=e(64279);const Sn="core.backstage.entitySwitch",Zn=L=>null;(0,i.attachComponentData)(Zn,Sn,!0);const dr=L=>{var S,B;const{entity:ee,loading:fe}=(0,ve.useAsyncEntity)(),Be=(0,i.useApiHolder)(),qe=(0,i.useElementFilter)(L.children,W=>W.selectByComponentData({key:Sn,withStrictError:"Child of EntitySwitch is not an EntitySwitch.Case"}).getElements().flatMap(J=>{var ye;if(fe)return[];const{if:G,children:he}=J.props;return ee?[{if:(ye=G==null?void 0:G(ee,{apis:Be}))!=null?ye:!0,children:he}]:[{if:G===void 0,children:he}]}),[Be,ee,fe]);return qe.some(W=>typeof W.if=="object"&&"then"in W.if)?t.createElement(On,{results:qe}):(B=(S=qe.find(W=>W.if))==null?void 0:S.children)!=null?B:null};function On({results:L}){const{loading:ee,value:fe}=(0,ur.default)(async()=>{var qe;const Be=L.map(async({if:A,children:S})=>{try{if(await A)return S}catch{}return null});return(qe=(await Promise.all(Be)).find(Boolean))!=null?qe:null},[L]);return ee||!fe?null:fe}dr.Case=Zn;const fr=null,$t=ve.CatalogFilterLayout.Filters,Zr=ve.CatalogFilterLayout.Content,jt=(0,i.createPlugin)({id:"catalog",apis:[(0,i.createApiFactory)({api:ve.catalogApiRef,deps:{discoveryApi:i.discoveryApiRef,fetchApi:i.fetchApiRef},factory:({discoveryApi:L,fetchApi:ee})=>new lr.MS({discoveryApi:L,fetchApi:ee})}),(0,i.createApiFactory)({api:ve.starredEntitiesApiRef,deps:{storageApi:i.storageApiRef},factory:({storageApi:L})=>new at({storageApi:L})})],routes:{catalogIndex:pn._Z,catalogEntity:ve.entityRouteRef},externalRoutes:{createComponent:pn.yw,viewTechDoc:pn.jU}}),$r=jt.provide((0,i.createRoutableExtension)({name:"CatalogIndexPage",component:()=>e.e(7758).then(e.bind(e,7758)).then(L=>L.CatalogPage),mountPoint:pn._Z})),Yn=jt.provide((0,i.createRoutableExtension)({name:"CatalogEntityPage",component:()=>e.e(6583).then(e.bind(e,96583)).then(L=>L.CatalogEntityPage),mountPoint:ve.entityRouteRef})),Nr=jt.provide((0,i.createComponentExtension)({name:"EntityAboutCard",component:{lazy:()=>Promise.resolve().then(e.bind(e,39398)).then(L=>L.AboutCard)}})),mr=jt.provide((0,i.createComponentExtension)({name:"EntityLinksCard",component:{lazy:()=>e.e(1959).then(e.bind(e,81959)).then(L=>L.EntityLinksCard)}})),kn=jt.provide((0,i.createComponentExtension)({name:"EntityHasSystemsCard",component:{lazy:()=>e.e(390).then(e.bind(e,60390)).then(L=>L.HasSystemsCard)}})),Qn=jt.provide((0,i.createComponentExtension)({name:"EntityHasComponentsCard",component:{lazy:()=>e.e(4022).then(e.bind(e,4022)).then(L=>L.HasComponentsCard)}})),Ur=jt.provide((0,i.createComponentExtension)({name:"EntityHasSubcomponentsCard",component:{lazy:()=>e.e(8792).then(e.bind(e,38792)).then(L=>L.HasSubcomponentsCard)}})),wr=jt.provide((0,i.createComponentExtension)({name:"EntityHasResourcesCard",component:{lazy:()=>e.e(1553).then(e.bind(e,11553)).then(L=>L.HasResourcesCard)}})),zr=jt.provide((0,i.createComponentExtension)({name:"EntityDependsOnComponentsCard",component:{lazy:()=>e.e(8061).then(e.bind(e,48061)).then(L=>L.DependsOnComponentsCard)}})),Tn=jt.provide((0,i.createComponentExtension)({name:"EntityDependencyOfComponentsCard",component:{lazy:()=>e.e(6235).then(e.bind(e,56235)).then(L=>L.DependencyOfComponentsCard)}})),ln=jt.provide((0,i.createComponentExtension)({name:"EntityDependsOnResourcesCard",component:{lazy:()=>e.e(9028).then(e.bind(e,59028)).then(L=>L.DependsOnResourcesCard)}})),$n=jt.provide((0,i.createComponentExtension)({name:"RelatedEntitiesCard",component:{lazy:()=>e.e(2426).then(e.bind(e,62426)).then(L=>L.RelatedEntitiesCard)}}));var Yt=e(82250),Nn=e(36356);class hr{constructor({configApi:ee,discoveryApi:fe,identityApi:Be}){oe(this,"configApi");oe(this,"discoveryApi");oe(this,"identityApi");this.configApi=ee,this.discoveryApi=fe,this.identityApi=Be}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getStorageUrl(){return`${await this.discoveryApi.getBaseUrl("techdocs")}/static/docs`}async getBuilder(){return this.configApi.getString("techdocs.builder")}async getEntityDocs(ee,fe){const qe=`${await this.getApiOrigin()}/${fe}`,A=await fetch(`${qe.endsWith("/")?qe:`${qe}/`}index.html`);if(A.status===404)throw new Error("Page not found");return A.text()}async syncEntityDocs(ee){return"cached"}async getBaseUrl(ee,fe,Be){const qe=await this.getApiOrigin();return new URL(ee,`${qe}/${Be}`).toString()}}class Un{constructor({configApi:ee,discoveryApi:fe,identityApi:Be}){oe(this,"configApi");oe(this,"discoveryApi");oe(this,"identityApi");this.configApi=ee,this.discoveryApi=fe,this.identityApi=Be}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getEntityMetadata(ee){return{apiVersion:"backstage.io/v1alpha1",kind:"Component",metadata:{name:"local"},spec:{owner:"test",lifecycle:"experimental"}}}async getTechDocsMetadata(ee){return{site_name:"Live preview environment",site_description:""}}}const Wr=[(0,i.createApiFactory)({api:Yt.techdocsStorageApiRef,deps:{configApi:i.configApiRef,discoveryApi:i.discoveryApiRef,identityApi:i.identityApiRef},factory:({configApi:L,discoveryApi:ee,identityApi:fe})=>new hr({configApi:L,discoveryApi:ee,identityApi:fe})}),(0,i.createApiFactory)({api:Yt.techdocsApiRef,deps:{configApi:i.configApiRef,discoveryApi:i.discoveryApiRef,identityApi:i.identityApiRef},factory:({configApi:L,discoveryApi:ee,identityApi:fe})=>new Un({configApi:L,discoveryApi:ee,identityApi:fe})}),(0,i.createApiFactory)({api:Nn.q3,deps:{configApi:i.configApiRef},factory:({configApi:L})=>Nn.ae.fromConfig(L)})];var gr=e(86689),wn=e(58845);const cn=(0,z.Z)({svg:{width:"auto",height:30},path:{fill:"#7df3e1"}});var Dn=()=>{const L=cn();return t.createElement("svg",{className:L.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 2079.95 456.05"},t.createElement("path",{className:L.path,d:"M302.9,180a80.62,80.62,0,0,0,13.44-10.37c.8-.77,1.55-1.54,2.31-2.31a81.89,81.89,0,0,0,7.92-9.37,62.37,62.37,0,0,0,6.27-10.77,48.6,48.6,0,0,0,4.36-16.4c1.49-19.39-10-38.67-35.62-54.22L198.42,14,78.16,129.22l-78.29,75,108.6,65.9a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.8,66.42-25.69,19.16-18.36,25.52-42.12,13.7-61.87a49.69,49.69,0,0,0-6.8-8.87,89.78,89.78,0,0,0,19.28,2.15H259a85.09,85.09,0,0,0,31-5.79A80.88,80.88,0,0,0,302.9,180Zm-100.59,59.8c-19.32,18.51-50.4,21.24-75.7,5.9l-75.13-45.6,67.44-64.65,76.42,46.39C222.88,198.57,221.36,221.6,202.31,239.84Zm8.94-82.21L140.6,114.74,205,53l69.37,42.11c25.94,15.73,29.31,37.05,10.55,55A60.71,60.71,0,0,1,211.25,157.63Zm29.86,190c-19.57,18.75-46.17,29.08-74.88,29.08a123.84,123.84,0,0,1-64.11-18.19L-.13,296.51v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.85,87.85,0,0,1,241.11,347.67Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,257.52V282.2l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.68,12.88-12.35,20-27.13,19.68-41.5v-1.79A86.86,86.86,0,0,1,241.11,308.68Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,218.54v24.68l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.69,12.88-12.34,20-27.12,19.68-41.49v-1.82A87.14,87.14,0,0,1,241.11,269.7Zm83.69,25.74a94.16,94.16,0,0,1-60.19,25.86h0V348a81.6,81.6,0,0,0,51.73-22.37c14-13.38,21.15-28.11,21-42.64v-2.2A95.14,95.14,0,0,1,324.8,295.44Zm-83.69,91.21c-19.57,18.75-46.17,29.09-74.88,29.09a123.76,123.76,0,0,1-64.11-18.2L-.13,335.49v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.35,87.35,0,0,1,241.11,386.65Zm85.75-210.21c-.68.69-1.35,1.38-2.06,2.05a99.19,99.19,0,0,1-22.23,15.69,94.53,94.53,0,0,1-26.24,8.71,97.84,97.84,0,0,1-14.16,1.57c.5,1.61.9,3.25,1.25,4.9a52.7,52.7,0,0,1,1.13,12V231h.05A84.48,84.48,0,0,0,290,225.47a80.83,80.83,0,0,0,26.38-16.82c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,62.85,62.85,0,0,0,6.29-10.78,48.5,48.5,0,0,0,4.32-16.44c.09-1.23.2-2.47.19-3.7v-2c-.72,1-1.48,2.06-2.26,3.09A98,98,0,0,1,326.86,176.44Zm0,77.92c-.68.7-1.3,1.41-2,2.1a94.09,94.09,0,0,1-60.19,25.85h0V309h0a81.65,81.65,0,0,0,51.73-22.37,73.51,73.51,0,0,0,16.48-22.49,48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.48.19-3.71v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A95.81,95.81,0,0,1,326.82,254.36Zm0-39c-.68.7-1.3,1.41-2,2.1a92.22,92.22,0,0,1-10.62,8.65,93.53,93.53,0,0,1-11.63,7,95.63,95.63,0,0,1-37.94,10.18h-.05l0,26.67h0a81.63,81.63,0,0,0,51.73-22.37c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,63.16,63.16,0,0,0,6.29-10.77,48.55,48.55,0,0,0,4.32-16.45c.09-1.23.2-2.47.19-3.7v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A98.19,98.19,0,0,1,326.82,215.38Zm241-88.84q7.94,0,17.09.17t18.12,1a139.3,139.3,0,0,1,16.74,2.57,42.78,42.78,0,0,1,13.3,5.14,64.27,64.27,0,0,1,20.54,19.89Q662,168,662,186.54q0,19.54-9.49,33.78t-27.1,21.09v.68q22.78,4.82,34.87,20.58t12.08,38.4a72.62,72.62,0,0,1-4.83,26.06,65.29,65.29,0,0,1-14.33,22.46,71.57,71.57,0,0,1-23.47,15.78q-14,6-32.28,6H478.38V126.54Zm9,105.27q28,0,40.21-9.78t12.26-29.31q0-13-4.14-20.58a29.47,29.47,0,0,0-11.4-11.66A45,45,0,0,0,597,155.17a161.2,161.2,0,0,0-20.19-1.2h-65.6v77.84Zm16.57,112.13q21.74,0,34-11.66T639.59,300q0-12-4.48-19.88a34.85,34.85,0,0,0-11.91-12.52,50.14,50.14,0,0,0-17.09-6.52,105,105,0,0,0-20-1.88H511.17v84.7Zm274.79,26.74q-7.61,4.45-21.06,4.46-11.4,0-18.12-6.34t-6.74-20.75a70.17,70.17,0,0,1-28.13,20.75,97.87,97.87,0,0,1-57.65,3.6,53.51,53.51,0,0,1-18.82-8.58A41.19,41.19,0,0,1,705,348.56q-4.65-9.42-4.66-22.8,0-15.09,5.18-24.69a44.92,44.92,0,0,1,13.64-15.6,62.63,62.63,0,0,1,19.33-9.09q10.88-3.08,22.27-5.14,12.08-2.4,23-3.6a128,128,0,0,0,19.16-3.43c5.53-1.48,9.89-3.65,13.12-6.51s4.83-7,4.83-12.52q0-9.6-3.62-15.43a24.94,24.94,0,0,0-9.32-8.92,38.38,38.38,0,0,0-12.78-4.11,96.54,96.54,0,0,0-14-1q-18.63,0-31.07,7T736.6,249.29H707.26q.69-16.46,6.9-27.77a52.21,52.21,0,0,1,16.57-18.35,70,70,0,0,1,23.65-10.11A125.51,125.51,0,0,1,782.86,190a168.63,168.63,0,0,1,24,1.72,63.26,63.26,0,0,1,21.58,7A41.23,41.23,0,0,1,844,213.59q5.87,9.57,5.87,25v91q0,10.26,1.21,15.05t8.11,4.79a35.57,35.57,0,0,0,9-1.37Zm-47.64-90.87c-3.69,2.74-8.52,4.72-14.5,6s-12.26,2.27-18.82,3.07-13.17,1.71-19.85,2.73a73.7,73.7,0,0,0-18,4.94,32.62,32.62,0,0,0-12.94,9.73q-5,6.32-5,17.23a23.31,23.31,0,0,0,2.94,12.11,24.11,24.11,0,0,0,7.59,8,32,32,0,0,0,10.88,4.44,60.94,60.94,0,0,0,13.11,1.36q14.5,0,24.86-3.92a52.49,52.49,0,0,0,16.91-9.9,39.1,39.1,0,0,0,9.67-13,32.53,32.53,0,0,0,3.11-13.14ZM1002.07,225q-11.05-9.25-29.69-9.26-15.89,0-26.58,5.83A47.29,47.29,0,0,0,928.71,237a64.66,64.66,0,0,0-9.15,22.12A119.83,119.83,0,0,0,916.8,285a98.22,98.22,0,0,0,2.93,24,64.18,64.18,0,0,0,9.15,20.74,46.2,46.2,0,0,0,16.23,14.58q10,5.49,23.82,5.48,21.75,0,34-11.31t15-31.89h30q-4.83,32.91-24.68,50.75t-54,17.83q-20.37,0-36.07-6.52A69.86,69.86,0,0,1,907,350.11a79.92,79.92,0,0,1-15.88-28.63A118.64,118.64,0,0,1,885.73,285a129.41,129.41,0,0,1,5.18-37.21,85.63,85.63,0,0,1,15.71-30.17A73.46,73.46,0,0,1,933,197.35Q948.91,190,970,190a108.54,108.54,0,0,1,28.48,3.6,69.59,69.59,0,0,1,23.48,11.15,61,61,0,0,1,16.74,19q6.55,11.49,8.29,27.26h-30.38Q1013.11,234.21,1002.07,225Zm109.77-98.41v145l81.47-77.49h39.36l-70.77,64.46,75.95,112.82h-37.29l-61.1-92.59-27.62,25.38v67.21H1082.5V126.54Zm170.54,205.22a31.07,31.07,0,0,0,10.87,10.63,49,49,0,0,0,15.19,5.66,87.06,87.06,0,0,0,17.44,1.71,109.18,109.18,0,0,0,14.5-1,53.22,53.22,0,0,0,14-3.78,26.27,26.27,0,0,0,10.53-8q4.14-5.32,4.14-13.55,0-11.31-8.63-17.14a73.69,73.69,0,0,0-21.58-9.43q-12.94-3.6-28.13-6.52a146,146,0,0,1-28.14-8.23A58.16,58.16,0,0,1,1261,267.13q-8.64-9.6-8.63-26.75,0-13.38,6-23a49.26,49.26,0,0,1,15.53-15.61,71.76,71.76,0,0,1,21.4-8.91A99.41,99.41,0,0,1,1319,190a141.31,141.31,0,0,1,28,2.58,64.85,64.85,0,0,1,22.62,8.91,46.16,46.16,0,0,1,15.7,17.15q5.87,10.8,6.91,26.91h-29.35q-.69-8.57-4.48-14.23a29.36,29.36,0,0,0-9.67-9.08,44.16,44.16,0,0,0-12.94-5,67.68,67.68,0,0,0-14.33-1.54,87.29,87.29,0,0,0-13.29,1,45.28,45.28,0,0,0-12.26,3.6,24.49,24.49,0,0,0-9,6.86q-3.46,4.29-3.46,11.14a16.32,16.32,0,0,0,5.36,12.52,42.75,42.75,0,0,0,13.63,8.23,120,120,0,0,0,18.64,5.48q10.37,2.24,20.72,4.63,11,2.4,21.57,5.83A70.74,70.74,0,0,1,1382,284.1a44.55,44.55,0,0,1,13.12,14.23q5,8.58,5,21.26,0,16.13-6.73,26.75a52.5,52.5,0,0,1-17.61,17.14,73.89,73.89,0,0,1-24.51,9.09,146.3,146.3,0,0,1-27.1,2.57,126.24,126.24,0,0,1-28.31-3.09A69.56,69.56,0,0,1,1272,361.94a51.74,51.74,0,0,1-16.57-18.52q-6.21-11.49-6.9-27.95h29.34A32.65,32.65,0,0,0,1282.38,331.76Zm226.46-137.67v25.72h-35.56V329.88a31.37,31.37,0,0,0,.87,8.23,8.42,8.42,0,0,0,3.28,4.8,14.61,14.61,0,0,0,6.73,2.23,99.19,99.19,0,0,0,11.22.51h13.46v25.72H1486.4a105.8,105.8,0,0,1-19.5-1.55,28.65,28.65,0,0,1-13.12-5.65,24.09,24.09,0,0,1-7.42-11.66q-2.43-7.54-2.42-19.89V219.81h-30.38V194.09h30.38V140.94h29.34v53.15ZM1699.4,370.68q-7.61,4.45-21.06,4.46-11.4,0-18.12-6.34t-6.74-20.75a70.17,70.17,0,0,1-28.13,20.75,97.87,97.87,0,0,1-57.65,3.6,53.51,53.51,0,0,1-18.82-8.58,41.19,41.19,0,0,1-12.6-15.26q-4.65-9.42-4.66-22.8,0-15.09,5.18-24.69a44.92,44.92,0,0,1,13.64-15.6,62.63,62.63,0,0,1,19.33-9.09q10.88-3.08,22.27-5.14,12.07-2.4,23-3.6a128,128,0,0,0,19.16-3.43c5.53-1.48,9.89-3.65,13.12-6.51s4.83-7,4.83-12.52q0-9.6-3.62-15.43a24.94,24.94,0,0,0-9.32-8.92,38.38,38.38,0,0,0-12.78-4.11,96.54,96.54,0,0,0-14-1q-18.63,0-31.07,7t-13.46,26.57h-29.34q.67-16.46,6.9-27.77A52.21,52.21,0,0,1,1562,203.17a70,70,0,0,1,23.65-10.11,125.51,125.51,0,0,1,28.48-3.09,168.63,168.63,0,0,1,24,1.72,63.26,63.26,0,0,1,21.58,7,41.23,41.23,0,0,1,15.53,14.89q5.87,9.57,5.87,25v91q0,10.26,1.21,15.05t8.11,4.79a35.57,35.57,0,0,0,9-1.37Zm-47.64-90.87c-3.69,2.74-8.52,4.72-14.5,6s-12.26,2.27-18.82,3.07-13.17,1.71-19.85,2.73a73.7,73.7,0,0,0-17.95,4.94,32.62,32.62,0,0,0-12.94,9.73q-5,6.32-5,17.23a23.31,23.31,0,0,0,2.94,12.11,24.11,24.11,0,0,0,7.59,8,32,32,0,0,0,10.88,4.44,60.94,60.94,0,0,0,13.11,1.36q14.51,0,24.86-3.92a52.49,52.49,0,0,0,16.91-9.9,39.1,39.1,0,0,0,9.67-13,32.53,32.53,0,0,0,3.11-13.14Zm208.85,141.62q-20,21.6-62.83,21.6a122.11,122.11,0,0,1-25.37-2.74,78,78,0,0,1-23.48-8.92,54.41,54.41,0,0,1-17.43-16.11q-6.91-10-7.6-24.35h29.35a21.47,21.47,0,0,0,5,13.38,36.67,36.67,0,0,0,11.4,8.91,55.52,55.52,0,0,0,14.67,5,79.51,79.51,0,0,0,15.19,1.55q14.49,0,24.51-5A46,46,0,0,0,1840.59,401a56.53,56.53,0,0,0,9.49-21.09,117.46,117.46,0,0,0,2.94-27.09V341.19h-.7q-7.59,16.46-23,24.18a71.8,71.8,0,0,1-32.63,7.71q-20,0-34.86-7.2A72.88,72.88,0,0,1,1737,346.51a82.13,82.13,0,0,1-15-28.46,116.62,116.62,0,0,1-5-34.47,133.92,133.92,0,0,1,4.14-32.4A88.17,88.17,0,0,1,1735,221a75.49,75.49,0,0,1,25.55-22.29q15.87-8.75,39-8.75a66.21,66.21,0,0,1,31.07,7.38,52.13,52.13,0,0,1,22.09,22.11h.35V194.09h27.61V356.28Q1880.63,399.83,1860.61,421.43Zm-37.46-79.72a47.94,47.94,0,0,0,16.4-15.78,71.89,71.89,0,0,0,9.15-22.11,106.77,106.77,0,0,0,2.93-24.69,96.71,96.71,0,0,0-2.76-23,64,64,0,0,0-8.8-20.4,45.76,45.76,0,0,0-15.71-14.57q-9.66-5.49-23.47-5.49-14.16,0-24.17,5.32a46.77,46.77,0,0,0-16.4,14.23,60.14,60.14,0,0,0-9.32,20.57,99.69,99.69,0,0,0-2.93,24.35,120.63,120.63,0,0,0,2.42,24,67.5,67.5,0,0,0,8.28,21.77,46.37,46.37,0,0,0,15.54,15.78q9.66,6,24.16,6T1823.15,341.71Zm228,18.34q-20,15.09-50.41,15.09-21.4,0-37.11-6.86a73.16,73.16,0,0,1-26.41-19.2,81.52,81.52,0,0,1-16-29.49,141.12,141.12,0,0,1-6-37.38,106.1,106.1,0,0,1,6.21-37A88.56,88.56,0,0,1,1938.8,216a79.09,79.09,0,0,1,26.58-19.2A81.66,81.66,0,0,1,1999,190q23.82,0,39.53,9.78a78,78,0,0,1,25.2,24.86,98.18,98.18,0,0,1,13.12,32.91,140.6,140.6,0,0,1,2.93,34h-133.6a70,70,0,0,0,2.76,22.12,49.9,49.9,0,0,0,10,18.51A49.1,49.1,0,0,0,1976.6,345q10.7,4.82,25.2,4.8,18.65,0,30.55-8.57t15.71-26.06h29Q2071.18,345,2051.17,360.05Zm-7.08-113.84a50,50,0,0,0-10.7-16,53.1,53.1,0,0,0-56.62-10.63,47.48,47.48,0,0,0-15.71,10.81,51.69,51.69,0,0,0-10.35,15.94,60.18,60.18,0,0,0-4.49,19.37h102.53A59.47,59.47,0,0,0,2044.09,246.21ZM302.9,180a80.62,80.62,0,0,0,13.44-10.37c.8-.77,1.55-1.54,2.31-2.31a81.89,81.89,0,0,0,7.92-9.37,62.37,62.37,0,0,0,6.27-10.77,48.6,48.6,0,0,0,4.36-16.4c1.49-19.39-10-38.67-35.62-54.22L198.42,14,78.16,129.22l-78.29,75,108.6,65.9a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.8,66.42-25.69,19.16-18.36,25.52-42.12,13.7-61.87a49.69,49.69,0,0,0-6.8-8.87,89.78,89.78,0,0,0,19.28,2.15H259a85.09,85.09,0,0,0,31-5.79A80.88,80.88,0,0,0,302.9,180Zm-100.59,59.8c-19.32,18.51-50.4,21.24-75.7,5.9l-75.13-45.6,67.44-64.65,76.42,46.39C222.88,198.57,221.36,221.6,202.31,239.84Zm8.94-82.21L140.6,114.74,205,53l69.37,42.11c25.94,15.73,29.31,37.05,10.55,55A60.71,60.71,0,0,1,211.25,157.63Zm29.86,190c-19.57,18.75-46.17,29.08-74.88,29.08a123.84,123.84,0,0,1-64.11-18.19L-.13,296.51v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.85,87.85,0,0,1,241.11,347.67Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,257.52V282.2l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.68,12.88-12.35,20-27.13,19.68-41.5v-1.79A86.86,86.86,0,0,1,241.11,308.68Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,218.54v24.68l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.69,12.88-12.34,20-27.12,19.68-41.49v-1.82A87.14,87.14,0,0,1,241.11,269.7Zm83.69,25.74a94.16,94.16,0,0,1-60.19,25.86h0V348a81.6,81.6,0,0,0,51.73-22.37c14-13.38,21.15-28.11,21-42.64v-2.2A95.14,95.14,0,0,1,324.8,295.44Zm-83.69,91.21c-19.57,18.75-46.17,29.09-74.88,29.09a123.76,123.76,0,0,1-64.11-18.2L-.13,335.49v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.35,87.35,0,0,1,241.11,386.65Zm85.75-210.21c-.68.69-1.35,1.38-2.06,2.05a99.19,99.19,0,0,1-22.23,15.69,94.53,94.53,0,0,1-26.24,8.71,97.84,97.84,0,0,1-14.16,1.57c.5,1.61.9,3.25,1.25,4.9a52.7,52.7,0,0,1,1.13,12V231h.05A84.48,84.48,0,0,0,290,225.47a80.83,80.83,0,0,0,26.38-16.82c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,62.85,62.85,0,0,0,6.29-10.78,48.5,48.5,0,0,0,4.32-16.44c.09-1.23.2-2.47.19-3.7v-2c-.72,1-1.48,2.06-2.26,3.09A98,98,0,0,1,326.86,176.44Zm0,77.92c-.68.7-1.3,1.41-2,2.1a94.09,94.09,0,0,1-60.19,25.85h0V309h0a81.65,81.65,0,0,0,51.73-22.37,73.51,73.51,0,0,0,16.48-22.49,48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.48.19-3.71v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A95.81,95.81,0,0,1,326.82,254.36Zm0-39c-.68.7-1.3,1.41-2,2.1a92.22,92.22,0,0,1-10.62,8.65,93.53,93.53,0,0,1-11.63,7,95.63,95.63,0,0,1-37.94,10.18h-.05l0,26.67h0a81.63,81.63,0,0,0,51.73-22.37c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,63.16,63.16,0,0,0,6.29-10.77,48.55,48.55,0,0,0,4.32-16.45c.09-1.23.2-2.47.19-3.7v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A98.19,98.19,0,0,1,326.82,215.38Z"}))};const qn=(0,z.Z)({svg:{width:"auto",height:28},path:{fill:"#7df3e1"}});var yr=()=>{const L=qn();return t.createElement("svg",{className:L.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 337.46 428.5"},t.createElement("path",{className:L.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"}))};const Er=(0,z.Z)({root:{width:h.sidebarConfig.drawerWidthClosed,height:3*h.sidebarConfig.logoHeight,display:"flex",flexFlow:"row nowrap",alignItems:"center",marginBottom:-14},link:{width:h.sidebarConfig.drawerWidthClosed,marginLeft:24}}),zn=()=>{const L=Er(),{isOpen:ee}=(0,t.useContext)(h.SidebarContext);return t.createElement("div",{className:L.root},t.createElement(gr.Z,{component:g.OL,to:"/docs/default/component/local/",underline:"none",className:L.link},ee?t.createElement(Dn,null):t.createElement(yr,null)))},vr=({children:L})=>t.createElement(h.SidebarPage,null,t.createElement(h.Sidebar,null,t.createElement(zn,null),t.createElement(h.SidebarDivider,null),t.createElement(h.SidebarItem,{icon:wn.Z,to:"/docs/default/component/local",text:"Docs Preview"})),L);var Ar=e(80030),_n=e(32388),Rr=e(4142);const Wn=(0,z.Z)(L=>({headerIcon:{color:L.palette.common.white,width:"32px",height:"32px"},content:{backgroundColor:L.palette.background.default},contentToolbar:{display:"flex",justifyContent:"flex-end",padding:0}}));var _t;(function(L){const ee="light";L.LIGHT=ee;const fe="dark";L.DARK=fe})(_t||(_t={}));const Hn=(0,t.createContext)({theme:_t.LIGHT,toggleTheme:()=>{}}),Kt=({children:L})=>{const[ee,fe]=(0,t.useState)(_t.LIGHT),Be=(0,t.useCallback)(()=>{fe(S=>S===_t.LIGHT?_t.DARK:_t.LIGHT)},[fe]),qe={theme:ee,toggleTheme:Be},A={[_t.LIGHT]:ct,[_t.DARK]:ke};return t.createElement(Hn.Provider,{value:qe},t.createElement(Et.Z,{theme:A[ee]},L))},un=()=>(0,t.useContext)(Hn),Cr=()=>{const L=Wn(),{theme:ee,toggleTheme:fe}=un(),Be={[_t.LIGHT]:{icon:Rr.Z,title:"Dark theme"},[_t.DARK]:{icon:_n.Z,title:"Light theme"}},{title:qe,icon:A}=Be[ee];return t.createElement(De.Z,{display:"flex",alignItems:"center",mr:2},t.createElement(Ar.ZP,{title:qe,arrow:!0},t.createElement(ue.Z,{size:"small",onClick:fe},t.createElement(A,{className:L.headerIcon}))))},Sr=({onReady:L,entityRef:ee})=>{const fe=Wn();return t.createElement(h.Content,{className:fe.content,"data-testid":"techdocs-content"},t.createElement(Yt.Reader,{onReady:L,entityRef:ee,withSearch:!1}))},er=()=>{const L={site_name:"Live preview environment",site_description:""};return t.createElement(Yt.TechDocsReaderPage,null,({entityRef:ee,onReady:fe})=>t.createElement(t.Fragment,null,t.createElement(Yt.TechDocsReaderPageHeader,{entityRef:ee,techDocsMetadata:L},t.createElement(Cr,null)),t.createElement(Sr,{entityRef:ee,onReady:fe})))},Pn=t.createElement(Kt,null,t.createElement(er,null)),bn={backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}},Tr={backend:{baseUrl:"http://localhost:7007"},techdocs:{builder:"external"}};async function Pr(){const L=await fetch("/.detect");return L.ok?(await L.text()).trim()==="techdocs-cli-server":!1}async function tr(){const L=await(0,E.defaultConfigLoader)(),ee=await Pr();return[...L,{context:"detected",data:ee?bn:Tr}]}const Rn=ne({apis:Wr,configLoader:tr,plugins:Object.values(r)}),Hr=Rn.getProvider(),br=Rn.getRouter(),nr=t.createElement(E.FlatRoutes,null,t.createElement(f.Fg,{key:"/",to:"/docs/default/component/local/"}),t.createElement(f.AW,{path:"/catalog/:namespace/:kind/:name",element:t.createElement(Yn,null)}),t.createElement(f.AW,{path:"/docs",element:t.createElement(Yt.TechDocsIndexPage,null)},t.createElement(Yt.DefaultTechDocsHome,null)),t.createElement(f.AW,{path:"/docs/:namespace/:kind/:name/*",element:t.createElement(Yt.TechDocsReaderPage,null)},Pn));var Vr=()=>t.createElement(Hr,null,t.createElement(br,null,t.createElement(vr,null,nr)));l.render(t.createElement(Vr,null),document.getElementById("root"))},76241:function(_,s,e){"use strict";e.d(s,{CT:function(){return i},EI:function(){return u},uW:function(){return f},Vt:function(){return o}});function r(){return typeof window!="undefined"&&window.Math===Math?window:typeof self!="undefined"&&self.Math===Math?self:Function("return this")()}const t=r(),l=h=>`__@backstage/${h}__`;function f(h,g){const R=l(h);let P=t[R];return P||(P=g(),t[R]=P,P)}var E=e(2784);function i(h){return f(h,()=>(0,E.createContext)(void 0))}function o(h){return(0,E.useContext)(i(h))}function m(h){return{set(g){globalThis[`__@backstage/${h}__`]=createContext(createVersionedValueMap(g))},reset(){delete globalThis[`__@backstage/${h}__`]}}}function u(h){return Object.freeze(h),{atVersion(g){return h[g]}}}},53479:function(_,s,e){"use strict";e.d(s,{AsyncEntityProvider:function(){return M},CATALOG_FILTER_EXISTS:function(){return r.n3},CatalogFilterLayout:function(){return b},EntityKindFilter:function(){return q},EntityLifecyclePicker:function(){return ht},EntityListProvider:function(){return St},EntityOwnerPicker:function(){return y},EntityRefLink:function(){return ut},EntityRefLinks:function(){return Et},EntityTable:function(){return He},EntityTagPicker:function(){return Mn},EntityTypePicker:function(){return Kn},FavoriteEntity:function(){return na},InspectEntityDialog:function(){return Tr},UnregisterEntityDialog:function(){return nr},UserListPicker:function(){return Be},catalogApiRef:function(){return l},entityRouteRef:function(){return It},getEntityRelations:function(){return Xe},getEntitySourceLocation:function(){return Ye},humanizeEntityRef:function(){return ct},starredEntitiesApiRef:function(){return f},useAsyncEntity:function(){return pe},useEntity:function(){return ae},useEntityList:function(){return lt},useEntityOwnership:function(){return ve},useEntityPermission:function(){return vt},useRelatedEntities:function(){return te},useStarredEntities:function(){return ie}});var r=e(30001),t=e(36964);const l=(0,t.createApiRef)({id:"plugin.catalog.service"}),f=(0,t.createApiRef)({id:"catalog-react.starred-entities"});var E=e(82394);class i{constructor(){oe(this,"starredEntities",new Set);oe(this,"subscribers",new Set);oe(this,"observable",new ObservableImpl(S=>(S.next(new Set(this.starredEntities)),this.subscribers.add(S),()=>{this.subscribers.delete(S)})))}async toggleStarred(S){this.starredEntities.delete(S)||this.starredEntities.add(S);for(const B of this.subscribers)B.next(new Set(this.starredEntities))}starredEntitie$(){return this.observable}}var o=e(2784),m=e(41156),u=e(60364),h=e(77277),g=e(4190),R=e(95544),P=e(90436),x=e(60905),T=e(36444);const X=A=>{const S=(0,m.Z)(G=>G.breakpoints.down("md")),B=(0,u.Z)(),[W,J]=(0,o.useState)(!1);return S?o.createElement(o.Fragment,null,o.createElement(h.Z,{style:{marginTop:B.spacing(1),marginLeft:B.spacing(1)},onClick:()=>J(!0),startIcon:o.createElement(T.Z,null)},"Filters"),o.createElement(g.ZP,{open:W,onClose:()=>J(!1),anchor:"left",disableAutoFocus:!0,keepMounted:!0,variant:"temporary"},o.createElement(R.Z,{m:2},o.createElement(P.Z,{variant:"h6",component:"h2",style:{marginBottom:B.spacing(1)}},"Filters"),A.children))):o.createElement(x.Z,{item:!0,lg:2},A.children)},F=A=>o.createElement(x.Z,{item:!0,xs:12,lg:10},A.children),b=A=>o.createElement(x.Z,{container:!0,style:{position:"relative"}},A.children);b.Filters=X,b.Content=F;var D=e(76241);const Z=(0,D.CT)("entity-context"),M=({children:A,entity:S,loading:B,error:W,refresh:J})=>{const G={entity:S,loading:B,error:W,refresh:J};return o.createElement(Z.Provider,{value:(0,D.EI)({1:G})},A)},K=A=>React.createElement(M,{entity:A.entity,loading:!Boolean(A.entity),error:void 0,refresh:void 0,children:A.children});function ae(){const A=(0,D.Vt)("entity-context");if(!A)throw new Error("Entity context is not available");const S=A.atVersion(1);if(!S)throw new Error("EntityContext v1 not available");if(!S.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:S.entity}}function pe(){const A=(0,D.Vt)("entity-context");if(!A)throw new Error("Entity context is not available");const S=A.atVersion(1);if(!S)throw new Error("EntityContext v1 not available");const{entity:B,loading:W,error:J,refresh:G}=S;return{entity:B,loading:W,error:J,refresh:G}}var Me=e(76635),Ue=e(19126),de=e.n(Ue),je=e(10289),_e=e(69294),Qe=e(48760),rt=e(90736);function ot(A){return A.reduce((S,B)=>({...S,...B.getCatalogFilters?B.getCatalogFilters():{}}),{})}function gt(A){return S=>A.every(B=>!B.filterEntity||B.filterEntity(S))}var Le=e(48023);function Xe(A,S,B){var J;let W=((J=A==null?void 0:A.relations)==null?void 0:J.filter(G=>G.type===S).map(G=>(0,Le.of)(G.targetRef)))||[];return B!=null&&B.kind&&(W=W.filter(G=>G.kind.toLocaleLowerCase("en-US")===B.kind.toLocaleLowerCase("en-US"))),W}function Ye(A,S){var W;const B=(W=A.metadata.annotations)==null?void 0:W[Le.M6];if(!!B)try{const J=(0,Le.Ou)(B),G=S.byUrl(J.target);return{locationTargetUrl:J.target,integrationType:G==null?void 0:G.type}}catch{return}}function Rt(A,S){const B=new Set([...getEntityRelations(A,RELATION_MEMBER_OF,{kind:"group"}),...A?[getCompoundEntityRef(A)]:[]].map(stringifyEntityRef)),W=getEntityRelations(S,RELATION_OWNED_BY).map(stringifyEntityRef);for(const J of W)if(B.has(J))return!0;return!1}const pt=(0,o.createContext)(void 0),St=({children:A})=>{const S=(0,rt.default)(),B=(0,t.useApi)(l),[W,J]=(0,o.useState)({}),G=(0,je.TH)(),he=(0,o.useMemo)(()=>{var tt;return(tt=de().parse(G.search,{ignoreQueryPrefix:!0}).filters)!=null?tt:{}},[G]),[ye,Ne]=(0,o.useState)(()=>({appliedFilters:{},entities:[],backendEntities:[]})),[{loading:Pe,error:Fe},We]=(0,_e.default)(async()=>{var wt;const tt=(0,Me.compact)(Object.values(W)),Ke=gt(tt),xt=ot(tt),Zt=ot((0,Me.compact)(Object.values(ye.appliedFilters))),yn=Object.keys(W).reduce((kt,en)=>{const dn=W[en];return dn!=null&&dn.toQueryValue&&(kt[en]=dn.toQueryValue()),kt},{});if((0,Me.isEqual)(Zt,xt))Ne({appliedFilters:W,backendEntities:ye.backendEntities,entities:ye.backendEntities.filter(Ke)});else{const kt=await B.getEntities({filter:xt});Ne({appliedFilters:W,backendEntities:kt.items,entities:kt.items.filter(Ke)})}if(S()){const kt=de().parse(G.search,{ignoreQueryPrefix:!0}),en=de().stringify({...kt,filters:yn},{addQueryPrefix:!0,arrayFormat:"repeat"}),dn=`${window.location.pathname}${en}`;(wt=window.history)==null||wt.replaceState(null,document.title,dn)}},[B,he,W,ye],{loading:!0});(0,Qe.Z)(We,10,[W]);const Ge=(0,o.useCallback)(tt=>{J(Ke=>{const xt=typeof tt=="function"?tt(Ke):tt;return{...Ke,...xt}})},[]),At=(0,o.useMemo)(()=>({filters:ye.appliedFilters,entities:ye.entities,backendEntities:ye.backendEntities,updateFilters:Ge,queryParameters:he,loading:Pe,error:Fe}),[ye,Ge,he,Pe,Fe]);return o.createElement(pt.Provider,{value:At},A)};function lt(){const A=(0,o.useContext)(pt);if(!A)throw new Error("useEntityList must be used within EntityListProvider");return A}var yt=e(64279),bt=e(18149),Tt=e.n(bt),Mt=e(829),Bt=e.n(Mt);const It=(0,D.uW)("catalog:entity-route-ref",()=>(0,t.createRouteRef)({id:"catalog:entity",params:["namespace","kind","name"]}));function ze(A){var S,B;return{kind:A.kind.toLocaleLowerCase("en-US"),namespace:(B=(S=A.metadata.namespace)==null?void 0:S.toLocaleLowerCase("en-US"))!=null?B:DEFAULT_NAMESPACE,name:A.metadata.name}}function ct(A,S){const B=S==null?void 0:S.defaultKind;let W,J,G;return"metadata"in A?(W=A.kind,J=A.metadata.namespace,G=A.metadata.name):(W=A.kind,J=A.namespace,G=A.name),J===Le.zG&&(J=void 0),W=W.toLocaleLowerCase("en-US"),W=B&&B.toLocaleLowerCase("en-US")===W?void 0:W,`${W?`${W}:`:""}${J?`${J}/`:""}${G}`}var ke=e(9118),Ct=e(80030);const ut=(0,o.forwardRef)((A,S)=>{var tt;const{entityRef:B,defaultKind:W,title:J,children:G,...he}=A,ye=(0,t.useRouteRef)(It);let Ne,Pe,Fe;if(typeof B=="string"){const Ke=(0,Le.of)(B);Ne=Ke.kind,Pe=Ke.namespace,Fe=Ke.name}else"metadata"in B?(Ne=B.kind,Pe=B.metadata.namespace,Fe=B.metadata.name):(Ne=B.kind,Pe=B.namespace,Fe=B.name);Ne=Ne.toLocaleLowerCase("en-US"),Pe=(tt=Pe==null?void 0:Pe.toLocaleLowerCase("en-US"))!=null?tt:Le.zG;const We={kind:Ne,namespace:Pe,name:Fe},Ge=ct({kind:Ne,namespace:Pe,name:Fe},{defaultKind:W}),At=o.createElement(ke.Link,{...he,ref:S,to:ye(We)},G,!G&&(J!=null?J:Ge));return J?o.createElement(Ct.ZP,{title:Ge},At):At});function Et(A){const{entityRefs:S,defaultKind:B,...W}=A;return o.createElement(o.Fragment,null,S.map((J,G)=>o.createElement(o.Fragment,{key:G},G>0&&", ",o.createElement(ut,{...W,entityRef:J,defaultKind:B}))))}class q{constructor(S){this.value=S}getCatalogFilters(){return{kind:this.value}}toQueryValue(){return this.value}}class N{constructor(S){this.value=S}getTypes(){return Array.isArray(this.value)?this.value:[this.value]}getCatalogFilters(){return{"spec.type":this.getTypes()}}toQueryValue(){return this.getTypes()}}class ne{constructor(S){this.values=S}filterEntity(S){return this.values.every(B=>{var W;return((W=S.metadata.tags)!=null?W:[]).includes(B)})}toQueryValue(){return this.values}}class ce{constructor(S){this.value=S}filterEntity(S){var W;const B=this.value.toLocaleUpperCase("en-US");return S.metadata.name.toLocaleUpperCase("en-US").includes(B)||`${S.metadata.title}`.toLocaleUpperCase("en-US").includes(B)||((W=S.metadata.tags)==null?void 0:W.join("").toLocaleUpperCase("en-US").indexOf(B))!==-1}}class se{constructor(S){this.values=S}filterEntity(S){return this.values.some(B=>Xe(S,Le.S4).some(W=>ct(W,{defaultKind:"group"})===B))}toQueryValue(){return this.values}}class Ee{constructor(S){this.values=S}filterEntity(S){return this.values.some(B=>{var W;return((W=S.spec)==null?void 0:W.lifecycle)===B})}toQueryValue(){return this.values}}class Ze{constructor(S,B,W){this.value=S,this.isOwnedEntity=B,this.isStarredEntity=W}filterEntity(S){switch(this.value){case"owned":return this.isOwnedEntity(S);case"starred":return this.isStarredEntity(S);default:return!0}}toQueryValue(){return this.value}}function $e(){var Ke;const A=(0,t.useApi)(l),{filters:{kind:S,type:B},queryParameters:{type:W},updateFilters:J}=lt(),G=(0,o.useMemo)(()=>[W].flat().filter(Boolean),[W]),[he,ye]=(0,o.useState)(G.length?G:(Ke=B==null?void 0:B.getTypes())!=null?Ke:[]);(0,o.useEffect)(()=>{G.length&&ye(G)},[G]);const[Ne,Pe]=(0,o.useState)([]),Fe=(0,o.useMemo)(()=>S==null?void 0:S.value,[S]),{error:We,loading:Ge,value:At}=(0,yt.default)(async()=>Fe?await A.getEntityFacets({filter:{kind:Fe},facets:["spec.type"]}).then(Zt=>Zt.facets["spec.type"]||[]):[],[Fe,A]),tt=(0,o.useRef)(At);return(0,o.useEffect)(()=>{const xt=tt.current;if(tt.current=At,Ge||!Fe||xt===At||!At)return;const Zt=Bt()(At,wt=>-wt.count).map(wt=>wt.value);Pe(Zt);const yn=he.filter(wt=>Zt.includes(wt));Tt()(he,yn)||ye(yn)},[Ge,Fe,he,ye,At]),(0,o.useEffect)(()=>{J({type:he.length?new N(he):void 0})},[he,J]),{loading:Ge,error:We,availableTypes:Ne,selectedTypes:he,setSelectedTypes:ye}}const at=20;function te(A,S){var Ne,Pe;const B=(Ne=S==null?void 0:S.type)==null?void 0:Ne.toLocaleLowerCase("en-US"),W=(Pe=S==null?void 0:S.kind)==null?void 0:Pe.toLocaleLowerCase("en-US"),J=(0,t.useApi)(l),{loading:G,value:he,error:ye}=(0,yt.default)(async()=>{var tt;const Fe=(tt=A.relations)==null?void 0:tt.map(Ke=>({type:Ke.type,target:(0,Le.of)(Ke.targetRef)})).filter(Ke=>(!B||Ke.type.toLocaleLowerCase("en-US")===B)&&(!W||Ke.target.kind===W));if(!Fe)return[];const We=Object.values((0,Me.groupBy)(Fe,({target:Ke})=>`${Ke.kind}:${Ke.namespace}`.toLocaleLowerCase("en-US"))),Ge=[];for(const Ke of We)Ge.push({kind:Ke[0].target.kind,namespace:Ke[0].target.namespace,nameBatches:(0,Me.chunk)(Ke.map(xt=>xt.target.name),at)});return(await Promise.all(Ge.flatMap(Ke=>Ke.nameBatches.map(xt=>J.getEntities({filter:{kind:Ke.kind,"metadata.namespace":Ke.namespace,"metadata.name":xt}}))))).flatMap(Ke=>Ke.items)},[A,B,W]);return{entities:he,loading:G,error:ye}}var Y=e(72164);function z(A){return typeof A=="string"?A:(0,Le.eE)(A)}function ie(){const A=(0,t.useApi)(f),S=(0,Y.Z)(A.starredEntitie$(),new Set),B=(0,o.useCallback)(J=>S.has(z(J)),[S]),W=(0,o.useCallback)(J=>A.toggleStarred(z(J)).then(),[A]);return{starredEntities:S,toggleStarredEntity:W,isStarredEntity:B}}function Te(A){return typeof A=="string"?A:(0,Le.eE)(A)}function Oe(A){const S=(0,t.useApi)(f),[B,W]=(0,o.useState)(!1);return(0,o.useEffect)(()=>{const G=S.starredEntitie$().subscribe({next(he){W(he.has(Te(A)))}});return()=>{G.unsubscribe()}},[A,S]),{toggleStarredEntity:(0,o.useCallback)(()=>S.toggleStarred(Te(A)).then(),[A,S]),isStarredEntity:B}}function ve(){const A=(0,t.useApi)(t.identityApiRef),{loading:S,value:B}=(0,yt.default)(async()=>{const{ownershipEntityRefs:J}=await A.getBackstageIdentity();return J},[]),W=(0,o.useMemo)(()=>{const J=new Set(B!=null?B:[]);return G=>{const he=Xe(G,Le.S4).map(Le.eE);for(const ye of he)if(J.has(ye))return!0;return!1}},[B]);return(0,o.useMemo)(()=>({loading:S,isOwnedEntity:W}),[S,W])}var De=e(68099);function vt(A){const{entity:S,loading:B,error:W}=pe(),{allowed:J,loading:G,error:he}=(0,De.gI)({permission:A,resourceRef:S?(0,Le.eE)(S):void 0});return B||G?{loading:!0,allowed:!1}:W?{loading:!1,allowed:!1,error:W}:{loading:!1,allowed:J,error:he}}const Lt=A=>{var he;const{initialFilter:S,hidden:B}=A,{updateFilters:W,queryParameters:{kind:J}}=useEntityList(),[G]=useState((he=[J].flat()[0])!=null?he:S);return useEffect(()=>{W({kind:G?new EntityKindFilter(G):void 0})},[G,W]),B?null:React.createElement(Alert,{severity:"warning"},"Kind filter not yet available")};var $=e(79692),C=e(5806),V=e(21324),ue=e(86619),ge=e(19996),me=e(25505),Se=e(38016),et=e(88013);const st=(0,$.Z)({input:{}},{name:"CatalogReactEntityLifecyclePicker"}),Ve=o.createElement(me.Z,{fontSize:"small"}),Je=o.createElement(ge.Z,{fontSize:"small"}),ht=()=>{var Pe,Fe;const A=st(),{updateFilters:S,backendEntities:B,filters:W,queryParameters:{lifecycles:J}}=lt(),G=(0,o.useMemo)(()=>[J].flat().filter(Boolean),[J]),[he,ye]=(0,o.useState)(G.length?G:(Fe=(Pe=W.lifecycles)==null?void 0:Pe.values)!=null?Fe:[]);(0,o.useEffect)(()=>{G.length&&ye(G)},[G]),(0,o.useEffect)(()=>{S({lifecycles:he.length?new Ee(he):void 0})},[he,S]);const Ne=(0,o.useMemo)(()=>[...new Set(B.map(We=>{var Ge;return(Ge=We.spec)==null?void 0:Ge.lifecycle}).filter(Boolean))].sort(),[B]);return Ne.length?o.createElement(R.Z,{pb:1,pt:1},o.createElement(P.Z,{variant:"button"},"Lifecycle"),o.createElement(et.ZP,{"aria-label":"Lifecycle",multiple:!0,options:Ne,value:he,onChange:(We,Ge)=>ye(Ge),renderOption:(We,{selected:Ge})=>o.createElement(C.Z,{control:o.createElement(V.Z,{icon:Ve,checkedIcon:Je,checked:Ge}),label:We}),size:"small",popupIcon:o.createElement(Se.Z,{"data-testid":"lifecycle-picker-expand"}),renderInput:We=>o.createElement(ue.Z,{...We,className:A.input,variant:"outlined"})})):null},it=(0,$.Z)({input:{}},{name:"CatalogReactEntityOwnerPicker"}),we=o.createElement(me.Z,{fontSize:"small"}),w=o.createElement(ge.Z,{fontSize:"small"}),y=()=>{var Pe,Fe;const A=it(),{updateFilters:S,backendEntities:B,filters:W,queryParameters:{owners:J}}=lt(),G=(0,o.useMemo)(()=>[J].flat().filter(Boolean),[J]),[he,ye]=(0,o.useState)(G.length?G:(Fe=(Pe=W.owners)==null?void 0:Pe.values)!=null?Fe:[]);(0,o.useEffect)(()=>{G.length&&ye(G)},[G]),(0,o.useEffect)(()=>{S({owners:he.length?new se(he):void 0})},[he,S]);const Ne=(0,o.useMemo)(()=>[...new Set(B.flatMap(We=>Xe(We,Le.S4).map(Ge=>ct(Ge,{defaultKind:"group"}))).filter(Boolean))].sort(),[B]);return Ne.length?o.createElement(R.Z,{pb:1,pt:1},o.createElement(P.Z,{variant:"button"},"Owner"),o.createElement(et.ZP,{multiple:!0,"aria-label":"Owner",options:Ne,value:he,onChange:(We,Ge)=>ye(Ge),renderOption:(We,{selected:Ge})=>o.createElement(C.Z,{control:o.createElement(V.Z,{icon:we,checkedIcon:w,checked:Ge}),label:We}),size:"small",popupIcon:o.createElement(Se.Z,{"data-testid":"owner-picker-expand"}),renderInput:We=>o.createElement(ue.Z,{...We,className:A.input,variant:"outlined"})})):null},I=(0,$.Z)(A=>({searchToolbar:{paddingLeft:0,paddingRight:0},input:{}}),{name:"CatalogReactEntitySearchBar"}),H=()=>{var G,he;const A=I(),{filters:S,updateFilters:B}=useEntityList(),[W,J]=useState((he=(G=S.text)==null?void 0:G.value)!=null?he:"");return useDebounce(()=>{B({text:W.length?new EntityTextFilter(W):void 0})},250,[W,B]),React.createElement(Toolbar,{className:A.searchToolbar},React.createElement(FormControl,null,React.createElement(Input,{"aria-label":"search",id:"input-with-icon-adornment",className:A.input,placeholder:"Search",autoComplete:"off",onChange:ye=>J(ye.target.value),value:W,startAdornment:React.createElement(InputAdornment,{position:"start"},React.createElement(Search,null)),endAdornment:React.createElement(InputAdornment,{position:"end"},React.createElement(IconButton,{"aria-label":"clear search",onClick:()=>J(""),edge:"end",disabled:W.length===0},React.createElement(Clear,null)))})))},Q=Object.freeze({createEntityRefColumn(A){const{defaultKind:S}=A;function B(W){var J;return((J=W.metadata)==null?void 0:J.title)||ct(W,{defaultKind:S})}return{title:"Name",highlight:!0,customFilterAndSearch(W,J){return B(J).includes(W)},customSort(W,J){return B(W).localeCompare(B(J))},render:W=>{var J;return o.createElement(ut,{entityRef:W,defaultKind:S,title:(J=W.metadata)==null?void 0:J.title})}}},createEntityRelationColumn({title:A,relation:S,defaultKind:B,filter:W}){function J(he){return Xe(he,S,W)}function G(he){return J(he).map(ye=>ct(ye,{defaultKind:B})).join(", ")}return{title:A,customFilterAndSearch(he,ye){return G(ye).includes(he)},customSort(he,ye){return G(he).localeCompare(G(ye))},render:he=>o.createElement(Et,{entityRefs:J(he),defaultKind:B})}},createOwnerColumn(){return this.createEntityRelationColumn({title:"Owner",relation:Le.S4,defaultKind:"group"})},createDomainColumn(){return this.createEntityRelationColumn({title:"Domain",relation:Le.cz,defaultKind:"domain",filter:{kind:"domain"}})},createSystemColumn(){return this.createEntityRelationColumn({title:"System",relation:Le.cz,defaultKind:"system",filter:{kind:"system"}})},createMetadataDescriptionColumn(){return{title:"Description",field:"metadata.description",render:A=>o.createElement(ke.OverflowTooltip,{text:A.metadata.description,placement:"bottom-start",line:2}),width:"auto"}},createSpecLifecycleColumn(){return{title:"Lifecycle",field:"spec.lifecycle"}},createSpecTypeColumn(){return{title:"Type",field:"spec.type"}}}),xe=[Q.createEntityRefColumn({defaultKind:"system"}),Q.createDomainColumn(),Q.createOwnerColumn(),Q.createMetadataDescriptionColumn()],Ae=[Q.createEntityRefColumn({defaultKind:"component"}),Q.createSystemColumn(),Q.createOwnerColumn(),Q.createSpecTypeColumn(),Q.createSpecLifecycleColumn(),Q.createMetadataDescriptionColumn()],Ie=(0,$.Z)(A=>({empty:{padding:A.spacing(2),display:"flex",justifyContent:"center"}})),He=A=>{const{entities:S,title:B,emptyContent:W,variant:J="gridItem",columns:G}=A,he=Ie(),ye={minWidth:"0",width:"100%"};return J==="gridItem"&&(ye.height="calc(100% - 10px)"),o.createElement(ke.Table,{columns:G,title:B,style:ye,emptyContent:W&&o.createElement("div",{className:he.empty},W),options:{search:!1,paging:!1,actionsColumnIndex:-1,padding:"dense"},data:S})};He.columns=Q,He.systemEntityColumns=xe,He.componentEntityColumns=Ae;const ft=(0,$.Z)({input:{}},{name:"CatalogReactEntityTagPicker"}),Ht=o.createElement(me.Z,{fontSize:"small"}),qt=o.createElement(ge.Z,{fontSize:"small"}),Mn=()=>{var Pe,Fe;const A=ft(),{updateFilters:S,filters:B,queryParameters:{tags:W}}=lt(),J=(0,t.useApi)(l),{value:G}=(0,yt.default)(async()=>{var At;const We="metadata.tags",{facets:Ge}=await J.getEntityFacets({facets:[We],filter:(At=B.kind)==null?void 0:At.getCatalogFilters()});return Ge[We].map(({value:tt})=>tt)},[B.kind]),he=(0,o.useMemo)(()=>[W].flat().filter(Boolean),[W]),[ye,Ne]=(0,o.useState)(he.length?he:(Fe=(Pe=B.tags)==null?void 0:Pe.values)!=null?Fe:[]);return(0,o.useEffect)(()=>{he.length&&Ne(he)},[he]),(0,o.useEffect)(()=>{S({tags:ye.length?new ne(ye):void 0})},[ye,S]),G!=null&&G.length?o.createElement(R.Z,{pb:1,pt:1},o.createElement(P.Z,{variant:"button"},"Tags"),o.createElement(et.ZP,{multiple:!0,"aria-label":"Tags",options:G,value:ye,onChange:(We,Ge)=>Ne(Ge),renderOption:(We,{selected:Ge})=>o.createElement(C.Z,{control:o.createElement(V.Z,{icon:Ht,checkedIcon:qt,checked:Ge}),label:We}),size:"small",popupIcon:o.createElement(Se.Z,{"data-testid":"tag-picker-expand"}),renderInput:We=>o.createElement(ue.Z,{...We,className:A.input,variant:"outlined"})})):null};var Fr=e(82108),pn=e.n(Fr);const Kn=A=>{var Pe;const{hidden:S,initialFilter:B}=A,W=(0,t.useApi)(t.alertApiRef),{error:J,availableTypes:G,selectedTypes:he,setSelectedTypes:ye}=$e();if((0,o.useEffect)(()=>{J&&W.post({message:"Failed to load entity types",severity:"error"}),B&&ye([B])},[J,W,B,ye]),G.length===0||J)return null;const Ne=[{value:"all",label:"All"},...G.map(Fe=>({value:Fe,label:pn()(Fe)}))];return S?null:o.createElement(R.Z,{pb:1,pt:1},o.createElement(ke.Select,{label:"Type",items:Ne,selected:(Pe=Ne.length>1?he[0]:void 0)!=null?Pe:"all",onChange:Fe=>ye(Fe==="all"?[]:[String(Fe)])}))};var Br=e(15459),lr=e(61837),cr=e(11640),Jn=e(28347);const Mr=(0,Br.Z)({root:{color:"#f3ba37"}})(cr.Z),na=A=>{const{toggleStarredEntity:S,isStarredEntity:B}=Oe(A.entity);return o.createElement(lr.Z,{"aria-label":"favorite",color:"inherit",...A,onClick:()=>S()},o.createElement(Ct.ZP,{title:B?"Remove from favorites":"Add to favorites"},B?o.createElement(Mr,null):o.createElement(Jn.Z,null)))};var ur=e(8629),Sn=e(79249),Zn=e(38724),dr=e(99152),On=e(6487),fr=e(49429),$t=e(55999),Zr=e(72779),jt=e.n(Zr),$r=e(39412);const Yn=$r.Z;function Nr(A,S){if(A)return A.toLocaleLowerCase("en-US");if(S)try{return(0,Le.of)(S).kind.toLocaleLowerCase("en-US")}catch{return}}function mr(A,S){const B=(0,t.useApp)(),W=Nr(A,S);return W&&B.getSystemIcon(`kind:${W}`)||Yn}function kn(A){const{kind:S,entityRef:B,...W}=A,J=mr(S,B);return o.createElement(J,{...W})}const Qn=(0,$.Z)(A=>({node:{fill:A.palette.grey[300],stroke:A.palette.grey[300],"&.primary":{fill:A.palette.primary.light,stroke:A.palette.primary.light},"&.secondary":{fill:A.palette.secondary.light,stroke:A.palette.secondary.light}},text:{fill:A.palette.getContrastText(A.palette.grey[300]),"&.primary":{fill:A.palette.primary.contrastText},"&.secondary":{fill:A.palette.secondary.contrastText},"&.focused":{fontWeight:"bold"}},clickable:{cursor:"pointer"}}));function Ur(A){const S=(0,t.useApi)(l),B=(0,Le.eE)(A),{loading:W,error:J,value:G}=(0,yt.default)(async()=>{const he=await S.getEntityAncestors({entityRef:B}),ye=new Array,Ne=new Array;for(const Pe of he.items){const Fe=(0,Le.eE)(Pe.entity),We=Fe===he.rootEntityRef;ye.push({id:Fe,root:We,...Pe.entity});for(const Ge of Pe.parentEntityRefs)Ne.push({from:Fe,to:Ge})}return{nodes:ye,edges:Ne}},[B]);return{loading:W,error:J,nodes:(G==null?void 0:G.nodes)||[],edges:(G==null?void 0:G.edges)||[]}}function wr({node:A}){const S=Qn(),B=(0,je.s0)(),W=(0,t.useRouteRef)(It),[J,G]=(0,o.useState)(0),[he,ye]=(0,o.useState)(0),Ne=(0,o.useRef)(null);(0,o.useLayoutEffect)(()=>{if(Ne.current){let{height:xt,width:Zt}=Ne.current.getBBox();xt=Math.round(xt),Zt=Math.round(Zt),(xt!==he||Zt!==J)&&(G(Zt),ye(xt))}},[J,he]);const Pe=10,Fe=he,We=Fe+Pe,Ge=We+J+Pe*2,At=he+Pe*2,tt=A.metadata.title||(A.kind&&A.metadata.name&&A.metadata.namespace?ct({kind:A.kind,name:A.metadata.name,namespace:A.metadata.namespace||""}):A.id),Ke=()=>{B(W({kind:A.kind,namespace:A.metadata.namespace||Le.zG,name:A.metadata.name}))};return o.createElement("g",{onClick:Ke,className:S.clickable},o.createElement("rect",{className:jt()(S.node,A.root?"secondary":"primary"),width:Ge,height:At,rx:10}),o.createElement(kn,{kind:A.kind,y:Pe,x:Pe,width:Fe,height:Fe,className:jt()(S.text,A.root?"secondary":"primary")}),o.createElement("text",{ref:Ne,className:jt()(S.text,A.root?"secondary":"primary"),y:At/2,x:We+(J+Pe*2)/2,textAnchor:"middle",alignmentBaseline:"middle"},tt))}function zr(A){const{loading:S,error:B,nodes:W,edges:J}=Ur(A.entity);return S?o.createElement(ke.Progress,null):B?o.createElement(ke.ResponseErrorPanel,{error:B}):o.createElement(o.Fragment,null,o.createElement($t.Z,{variant:"h2"},"Ancestry"),o.createElement($t.Z,{gutterBottom:!0},"This is the ancestry of entities above the current one - as in, the chain(s) of entities down to the current one, where"," ",o.createElement(ke.Link,{to:"https://backstage.io/docs/features/software-catalog/life-of-an-entity"},"processors emitted")," ","child entities that ultimately led to the current one existing. Note that this is a completely different mechanism from relations."),o.createElement(R.Z,{mt:4},o.createElement(ke.DependencyGraph,{nodes:W,edges:J,renderNode:wr,direction:ke.DependencyGraphTypes.Nm.BOTTOM_TOP,zoom:"enable-on-click"})))}var Tn=e(11776),ln=e(38402),$n=e(86136),Yt=e(99688),Nn=e(49378),hr=e(54506),Un=e(94339),Wr=e(24579),gr=e(27685);const wn=(0,$.Z)(A=>({root:{display:"flex",flexDirection:"column"},marginTop:{marginTop:A.spacing(2)},helpIcon:{marginLeft:A.spacing(1),color:A.palette.text.disabled},monospace:{fontFamily:"monospace"}}));function cn(A){const S=wn();return o.createElement(Nn.Z,{...A,primaryTypographyProps:{className:S.monospace},secondaryTypographyProps:{className:S.monospace}})}function Xn(A){const S=wn();return o.createElement(hr.Z,{className:S.monospace},A.children)}function Dn(A){return o.createElement(R.Z,{mt:2},o.createElement(Un.Z,{variant:"outlined"},o.createElement(Wr.Z,null,o.createElement(P.Z,{variant:"h6",gutterBottom:!0},A.title,A.helpLink&&o.createElement(pr,{to:A.helpLink})),A.children)))}function qn(A){const[S,B]=A.entry;return o.createElement(ln.Z,null,A.indent&&o.createElement($n.Z,null),o.createElement(cn,{primary:S,secondary:B.match(/^url:https?:\/\//)?o.createElement(o.Fragment,null,B.substring(0,4),o.createElement(ke.Link,{to:B.substring(4)},B.substring(4))):B}))}function pr(A){const S=wn();return o.createElement(ke.Link,{to:A.to,className:S.helpIcon},o.createElement(gr.Z,{fontSize:"inherit"}))}const yr=(0,$.Z)({root:{display:"flex",flexDirection:"column"}});function Er(A){var Ne,Pe;const S=(0,t.useApi)(l),B=(0,Le.eE)(A),W=(Ne=A.metadata.annotations)==null?void 0:Ne[Le.P1],J=(Pe=A.metadata.annotations)==null?void 0:Pe[Le.q1],{loading:G,error:he,value:ye}=(0,yt.default)(async()=>!W&&!J?[]:(await S.getEntities({filter:[...W?[{[`metadata.annotations.${Le.P1}`]:W}]:[],...J?[{[`metadata.annotations.${Le.q1}`]:J}]:[]]})).items,[W,J]);return{loading:G,error:he,location:W,originLocation:J,colocatedEntities:ye==null?void 0:ye.filter(Fe=>(0,Le.eE)(Fe)!==B)}}function zn(A){return o.createElement(Tn.Z,{dense:!0},A.header&&o.createElement(qn,{key:"header",entry:A.header}),A.entities.map(S=>o.createElement(ln.Z,{key:(0,Le.eE)(S)},o.createElement($n.Z,null,o.createElement(kn,{kind:S.kind})),o.createElement(cn,{primary:o.createElement(ut,{entityRef:S})}))))}function vr(A){const{entity:S}=A,{loading:B,error:W,location:J,originLocation:G,colocatedEntities:he}=Er(S);if(B)return o.createElement(ke.Progress,null);if(W)return o.createElement(ke.ResponseErrorPanel,{error:W});if(!J&&!G)return o.createElement(Yt.Z,{severity:"warning"},"Entity had no location information.");if(!(he!=null&&he.length))return o.createElement(Yt.Z,{severity:"info"},"There were no other entities on this location.");if(J===G)return o.createElement(zn,{entities:he});const ye=he.filter(Pe=>{var Fe;return((Fe=Pe.metadata.annotations)==null?void 0:Fe[Le.P1])===J}),Ne=he.filter(Pe=>{var Fe;return((Fe=Pe.metadata.annotations)==null?void 0:Fe[Le.q1])===G});return o.createElement(o.Fragment,null,ye.length>0&&o.createElement(zn,{entities:ye,header:["At the same location",J]}),Ne.length>0&&o.createElement(zn,{entities:Ne,header:["At the same origin",G]}))}function Ar(A){const S=yr();return o.createElement(o.Fragment,null,o.createElement($t.Z,{variant:"h2"},"Colocated"),o.createElement($t.Z,null,"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)."),o.createElement("div",{className:S.root},o.createElement(vr,{entity:A.entity})))}function _n(A){return Object.fromEntries([...Object.entries(A)].sort((S,B)=>S[0]<B[0]?-1:1))}function Rr(A){return o.createElement(o.Fragment,null,o.createElement($t.Z,{variant:"h2"},"Entity as JSON"),o.createElement($t.Z,null,"This is the raw entity data as received from the catalog, on JSON form."),o.createElement($t.Z,null,o.createElement("div",{style:{fontSize:"75%"},"data-testid":"code-snippet"},o.createElement(ke.CodeSnippet,{text:JSON.stringify(_n(A.entity),void 0,2),language:"json",showCopyCodeButton:!0}))))}var Wn=e(3440),_t=e.n(Wn);const Hn=(0,$.Z)({root:{display:"flex",flexDirection:"column"}});function Kt(A){var Pe,Fe;const S=Hn(),{apiVersion:B,kind:W,metadata:J,spec:G,relations:he=[],status:ye={}}=A.entity,Ne=_t()(Bt()(he,We=>We.targetRef),"type");return o.createElement(o.Fragment,null,o.createElement($t.Z,{variant:"h2"},"Overview"),o.createElement("div",{className:S.root},o.createElement(Dn,{title:"Identity"},o.createElement(Tn.Z,{dense:!0},o.createElement(ln.Z,null,o.createElement(cn,{primary:"apiVersion",secondary:B})),o.createElement(ln.Z,null,o.createElement(cn,{primary:"kind",secondary:W})),(G==null?void 0:G.type)&&o.createElement(ln.Z,null,o.createElement(cn,{primary:"spec.type",secondary:G.type})),J.uid&&o.createElement(ln.Z,null,o.createElement(cn,{primary:"uid",secondary:J.uid})),J.etag&&o.createElement(ln.Z,null,o.createElement(cn,{primary:"etag",secondary:J.etag})))),o.createElement(Dn,{title:"Metadata"},!!Object.keys(J.annotations||{}).length&&o.createElement(Tn.Z,{dense:!0,subheader:o.createElement(Xn,null,"Annotations",o.createElement(pr,{to:"https://backstage.io/docs/features/software-catalog/well-known-annotations"}))},Object.entries(J.annotations).map(We=>o.createElement(qn,{key:We[0],indent:!0,entry:We}))),!!Object.keys(J.labels||{}).length&&o.createElement(Tn.Z,{dense:!0,subheader:o.createElement(Xn,null,"Labels")},Object.entries(J.labels).map(We=>o.createElement(qn,{key:We[0],indent:!0,entry:We}))),!!((Pe=J.tags)!=null&&Pe.length)&&o.createElement(Tn.Z,{dense:!0,subheader:o.createElement(Xn,null,"Tags")},J.tags.map((We,Ge)=>o.createElement(ln.Z,{key:`${We}-${Ge}`},o.createElement($n.Z,null),o.createElement(cn,{primary:We}))))),!!he.length&&o.createElement(Dn,{title:"Relations",helpLink:"https://backstage.io/docs/features/software-catalog/well-known-relations"},Object.entries(Ne).map(([We,Ge],At)=>o.createElement("div",{key:At},o.createElement(Tn.Z,{dense:!0,subheader:o.createElement(Xn,null,We)},Ge.map(tt=>o.createElement(ln.Z,{key:tt.targetRef},o.createElement($n.Z,null,o.createElement(kn,{entityRef:tt.targetRef})),o.createElement(cn,{primary:o.createElement(ut,{entityRef:tt.targetRef})}))))))),!!((Fe=ye.items)!=null&&Fe.length)&&o.createElement(Dn,{title:"Status",helpLink:"https://backstage.io/docs/features/software-catalog/well-known-statuses"},ye.items.map((We,Ge)=>o.createElement("div",{key:Ge},o.createElement(P.Z,null,We.level,": ",We.type),o.createElement(R.Z,{ml:2},We.message))))))}var un=e(60155),Cr=e.n(un);function Sr(A){return o.createElement(o.Fragment,null,o.createElement($t.Z,{variant:"h2"},"Entity as YAML"),o.createElement($t.Z,null,"This is the raw entity data as received from the catalog, on YAML form."),o.createElement($t.Z,null,o.createElement("div",{style:{fontSize:"75%"},"data-testid":"code-snippet"},o.createElement(ke.CodeSnippet,{text:Cr().stringify(_n(A.entity)),language:"yaml",showCopyCodeButton:!0}))))}const er=(0,$.Z)(A=>({fullHeightDialog:{height:"calc(100% - 64px)"},root:{display:"flex",flexGrow:1,width:"100%",backgroundColor:A.palette.background.paper},tabs:{borderRight:`1px solid ${A.palette.divider}`,flexShrink:0},tabContents:{flexGrow:1,overflowX:"auto"}}));function Pn(A){const{children:S,value:B,index:W,...J}=A,G=er();return o.createElement("div",{role:"tabpanel",hidden:B!==W,id:`vertical-tabpanel-${W}`,"aria-labelledby":`vertical-tab-${W}`,className:G.tabContents,...J},B===W&&o.createElement(R.Z,{pl:3,pr:3},S))}function bn(A){return{id:`vertical-tab-${A}`,"aria-controls":`vertical-tabpanel-${A}`}}function Tr(A){const S=er(),[B,W]=o.useState(0);return(0,o.useEffect)(()=>{W(0)},[A.open]),A.entity?o.createElement(ur.Z,{fullWidth:!0,maxWidth:"xl",open:A.open,onClose:A.onClose,"aria-labelledby":"entity-inspector-dialog-title",PaperProps:{className:S.fullHeightDialog}},o.createElement(Sn.Z,{id:"entity-inspector-dialog-title"},"Entity Inspector"),o.createElement(Zn.Z,{dividers:!0},o.createElement("div",{className:S.root},o.createElement(dr.Z,{orientation:"vertical",variant:"scrollable",value:B,onChange:(J,G)=>W(G),"aria-label":"Inspector options",className:S.tabs},o.createElement(On.Z,{label:"Overview",...bn(0)}),o.createElement(On.Z,{label:"Ancestry",...bn(1)}),o.createElement(On.Z,{label:"Colocated",...bn(2)}),o.createElement(On.Z,{label:"Raw JSON",...bn(3)}),o.createElement(On.Z,{label:"Raw YAML",...bn(4)})),o.createElement(Pn,{value:B,index:0},o.createElement(Kt,{entity:A.entity})),o.createElement(Pn,{value:B,index:1},o.createElement(zr,{entity:A.entity})),o.createElement(Pn,{value:B,index:2},o.createElement(Ar,{entity:A.entity})),o.createElement(Pn,{value:B,index:3},o.createElement(Rr,{entity:A.entity})),o.createElement(Pn,{value:B,index:4},o.createElement(Sr,{entity:A.entity})))),o.createElement(fr.Z,null,o.createElement(h.Z,{onClick:A.onClose,color:"primary"},"Close"))):null}var Pr=e(85256);function tr(A){var At;const S=(0,t.useApi)(l),B=(At=A.metadata.annotations)==null?void 0:At[Le.q1],W=A.metadata.uid,J=B==="bootstrap:bootstrap",G=(0,yt.default)(async()=>{const tt=S.getLocationByRef(B);let Ke;if(!B)Ke=Promise.resolve([]);else{const xt=`metadata.annotations.${Le.q1}`;Ke=S.getEntities({filter:{[xt]:B},fields:["kind","metadata.uid","metadata.name","metadata.namespace"]}).then(Zt=>Zt.items)}return Promise.all([tt,Ke]).then(([xt,Zt])=>({location:xt,colocatedEntities:Zt}))},[S,A]),he=(0,o.useCallback)(async function(){const{location:Ke}=G.value;await S.removeLocationById(Ke.id)},[S,G]),ye=(0,o.useCallback)(async function(){await S.removeEntityByUid(W)},[S,W]);if(J)return{type:"bootstrap",location:B,deleteEntity:ye};const{loading:Ne,error:Pe,value:Fe}=G;if(Ne)return{type:"loading"};if(Pe)return{type:"error",error:Pe};const{location:We,colocatedEntities:Ge}=Fe;return We?{type:"unregister",location:B,colocatedEntities:Ge.map(Le.iB),unregisterLocation:he,deleteEntity:ye}:{type:"only-delete",deleteEntity:ye}}var Rn=e(10179);const Hr=(0,$.Z)({advancedButton:{fontSize:"0.7em"}}),br=({entity:A,onConfirm:S})=>{var At;const B=(0,t.useApi)(t.alertApiRef),W=(0,t.useApi)(t.configApiRef),J=Hr(),G=tr(A),[he,ye]=(0,o.useState)(!1),[Ne,Pe]=(0,o.useState)(!1),Fe=(At=W.getOptionalString("app.title"))!=null?At:"Backstage",We=(0,o.useCallback)(async function(){if("unregisterLocation"in G){Pe(!0);try{await G.unregisterLocation(),S()}catch(Ke){(0,Rn.BD)(Ke),B.post({message:Ke.message})}finally{Pe(!1)}}},[B,S,G]),Ge=(0,o.useCallback)(async function(){if("deleteEntity"in G){Pe(!0);try{await G.deleteEntity(),S()}catch(Ke){(0,Rn.BD)(Ke),B.post({message:Ke.message})}finally{Pe(!1)}}},[B,S,G]);return G.type==="loading"?o.createElement(ke.Progress,null):G.type==="error"?o.createElement(ke.ResponseErrorPanel,{error:G.error}):G.type==="bootstrap"?o.createElement(o.Fragment,null,o.createElement(Yt.Z,{severity:"info"},'You cannot unregister this entity, since it originates from a protected Backstage configuration (location "',G.location,'"). If you believe this is in error, please contact the ',Fe," ","integrator."),o.createElement(R.Z,{marginTop:2},!he&&o.createElement(h.Z,{variant:"text",size:"small",color:"primary",className:J.advancedButton,onClick:()=>ye(!0)},"Advanced Options"),he&&o.createElement(o.Fragment,null,o.createElement($t.Z,null,"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."),o.createElement(h.Z,{variant:"contained",color:"secondary",disabled:Ne,onClick:Ge},"Delete Entity")))):G.type==="only-delete"?o.createElement(o.Fragment,null,o.createElement($t.Z,null,"This entity does not seem to originate from a registered location. You therefore only have the option to delete it outright from the catalog."),o.createElement(h.Z,{variant:"contained",color:"secondary",disabled:Ne,onClick:Ge},"Delete Entity")):G.type==="unregister"?o.createElement(o.Fragment,null,o.createElement($t.Z,null,"This action will unregister the following entities:"),o.createElement($t.Z,{component:"ul"},G.colocatedEntities.map(tt=>o.createElement("li",{key:`${tt.kind}:${tt.namespace}/${tt.name}`},o.createElement(ut,{entityRef:tt})))),o.createElement($t.Z,null,"Located at the following location:"),o.createElement($t.Z,{component:"ul"},o.createElement("li",null,G.location)),o.createElement($t.Z,null,"To undo, just re-register the entity in ",Fe,"."),o.createElement(R.Z,{marginTop:2},o.createElement(h.Z,{variant:"contained",color:"secondary",disabled:Ne,onClick:We},"Unregister Location"),!he&&o.createElement(R.Z,{component:"span",marginLeft:2},o.createElement(h.Z,{variant:"text",size:"small",color:"primary",className:J.advancedButton,onClick:()=>ye(!0)},"Advanced Options"))),he&&o.createElement(o.Fragment,null,o.createElement(R.Z,{paddingTop:4,paddingBottom:4},o.createElement(Pr.Z,null)),o.createElement($t.Z,null,"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."),o.createElement(h.Z,{variant:"contained",color:"secondary",disabled:Ne,onClick:Ge},"Delete Entity"))):o.createElement(Yt.Z,{severity:"error"},"Internal error: Unknown state")},nr=A=>{const{open:S,onConfirm:B,onClose:W,entity:J}=A;return o.createElement(ur.Z,{open:S,onClose:W},o.createElement(Sn.Z,{id:"responsive-dialog-title"},"Are you sure you want to unregister this entity?"),o.createElement(Zn.Z,null,o.createElement(br,{entity:J,onConfirm:B})),o.createElement(fr.Z,null,o.createElement(h.Z,{onClick:W,color:"primary"},"Cancel")))};var jr=e(12231),Vr=e(9520),L=e(47603);const ee=(0,$.Z)(A=>({root:{backgroundColor:"rgba(0, 0, 0, .11)",boxShadow:"none",margin:A.spacing(1,0,1,0)},title:{margin:A.spacing(1,0,0,1),textTransform:"uppercase",fontSize:12,fontWeight:"bold"},listIcon:{minWidth:30,color:A.palette.text.primary},menuItem:{minHeight:A.spacing(6)},groupWrapper:{margin:A.spacing(1,1,2,1)}}),{name:"CatalogReactUserListPicker"});function fe(A){return[{name:"Personal",items:[{id:"owned",label:"Owned",icon:L.Z},{id:"starred",label:"Starred",icon:cr.Z}]},{name:A!=null?A:"Company",items:[{id:"all",label:"All"}]}]}const Be=A=>{var In;const{initialFilter:S,availableFilters:B}=A,W=ee(),G=(In=(0,t.useApi)(t.configApiRef).getOptionalString("organization.name"))!=null?In:"Company",{filters:he,updateFilters:ye,backendEntities:Ne,queryParameters:{kind:Pe,user:Fe},loading:We}=lt(),Ge=["starred","all"],At=fe(G).map(nn=>({...nn,items:nn.items.filter(({id:rn})=>["group","user"].some(Lr=>Lr===Pe)?Ge.includes(rn):!B||B.includes(rn))})).filter(({items:nn})=>!!nn.length),{isStarredEntity:tt}=ie(),{isOwnedEntity:Ke,loading:xt}=ve(),Zt=We||xt,yn=(0,o.useMemo)(()=>new Ze("owned",Ke,tt),[Ke,tt]),wt=(0,o.useMemo)(()=>new Ze("starred",Ke,tt),[Ke,tt]),kt=(0,o.useMemo)(()=>[Fe].flat()[0],[Fe]),[en,dn]=(0,o.useState)(kt!=null?kt:S),rr=(0,o.useMemo)(()=>Ne.filter(gt((0,Me.compact)(Object.values({...he,user:void 0})))),[he,Ne]),Ir=(0,o.useMemo)(()=>({all:rr.length,starred:rr.filter(nn=>wt.filterEntity(nn)).length,owned:rr.filter(nn=>yn.filterEntity(nn)).length}),[rr,wt,yn]);return(0,o.useEffect)(()=>{kt&&dn(kt)},[kt]),(0,o.useEffect)(()=>{!Zt&&!!en&&en!=="all"&&Ir[en]===0&&dn("all")},[Zt,Ir,en,dn]),(0,o.useEffect)(()=>{ye({user:en?new Ze(en,Ke,tt):void 0})},[en,Ke,tt,ye]),o.createElement(Un.Z,{className:W.root},At.map(nn=>o.createElement(o.Fragment,{key:nn.name},o.createElement(P.Z,{variant:"subtitle2",className:W.title},nn.name),o.createElement(Un.Z,{className:W.groupWrapper},o.createElement(Tn.Z,{disablePadding:!0,dense:!0},nn.items.map(rn=>{var Lr,ra;return o.createElement(jr.Z,{key:rn.id,button:!0,divider:!0,onClick:()=>dn(rn.id),selected:rn.id===((Lr=he.user)==null?void 0:Lr.value),className:W.menuItem,disabled:Ir[rn.id]===0,"data-testid":`user-picker-${rn.id}`},rn.icon&&o.createElement($n.Z,{className:W.listIcon},o.createElement(rn.icon,{fontSize:"small"})),o.createElement(Nn.Z,null,o.createElement(P.Z,{variant:"body1"},rn.label)),o.createElement(Vr.Z,null,(ra=Ir[rn.id])!=null?ra:"-"))}))))))},qe=({children:A,value:S})=>{var ye;const[B,W]=useState((ye=S==null?void 0:S.filters)!=null?ye:{}),J=useCallback(Ne=>{W(Pe=>{const Fe=typeof Ne=="function"?Ne(Pe):Ne;return{...Pe,...Fe}})},[]),G=useMemo(()=>({entities:[],backendEntities:[],queryParameters:{}}),[]),he=useMemo(()=>{var Ne,Pe,Fe,We,Ge;return{entities:(Ne=S==null?void 0:S.entities)!=null?Ne:G.entities,backendEntities:(Pe=S==null?void 0:S.backendEntities)!=null?Pe:G.backendEntities,updateFilters:(Fe=S==null?void 0:S.updateFilters)!=null?Fe:J,filters:B,loading:(We=S==null?void 0:S.loading)!=null?We:!1,queryParameters:(Ge=S==null?void 0:S.queryParameters)!=null?Ge:G.queryParameters,error:S==null?void 0:S.error}},[S,G,B,J]);return React.createElement(EntityListContext.Provider,{value:he},A)}},39398:function(_,s,e){"use strict";e.r(s),e.d(s,{AboutCard:function(){return Me},AboutContent:function(){return ae},AboutField:function(){return M}});var r=e(48023),t=e(9118),l=e(36964),f=e(36356),E=e(53479),i=e(79692),o=e(94339),m=e(32552),u=e(61837),h=e(85256),g=e(24579),R=e(52866),P=e(30254),x=e(27604),T=e(2784),X=e(47851),F=e(60905),b=e(90436),D=e(7089);const Z=(0,i.Z)(Ue=>({value:{fontWeight:"bold",overflow:"hidden",lineHeight:"24px",wordBreak:"break-word"},label:{color:Ue.palette.text.secondary,textTransform:"uppercase",fontSize:"10px",fontWeight:"bold",letterSpacing:.5,overflow:"hidden",whiteSpace:"nowrap"}}));function M(Ue){const{label:de,value:je,gridSizes:_e,children:Qe}=Ue,rt=Z(),ot=(0,l.useElementFilter)(Qe,Le=>Le.getElements()),gt=ot.length>0?ot:T.createElement(b.Z,{variant:"body2",className:rt.value},je||"unknown");return T.createElement(F.Z,{item:!0,..._e},T.createElement(b.Z,{variant:"subtitle2",className:rt.label},de),gt)}const K=(0,i.Z)({description:{wordBreak:"break-word"}});function ae(Ue){var lt,yt,bt,Tt,Mt,Bt;const{entity:de}=Ue,je=K(),_e=de.kind.toLocaleLowerCase("en-US")==="system",Qe=de.kind.toLocaleLowerCase("en-US")==="resource",rt=de.kind.toLocaleLowerCase("en-US")==="component",ot=de.kind.toLocaleLowerCase("en-US")==="api",gt=de.kind.toLocaleLowerCase("en-US")==="template",Le=de.kind.toLocaleLowerCase("en-US")==="location",Xe=de.kind.toLocaleLowerCase("en-US")==="group",Ye=(0,E.getEntityRelations)(de,r.cz,{kind:"system"}),Rt=(0,E.getEntityRelations)(de,r.cz,{kind:"component"}),pt=(0,E.getEntityRelations)(de,r.cz,{kind:"domain"}),St=(0,E.getEntityRelations)(de,r.S4);return T.createElement(F.Z,{container:!0},T.createElement(M,{label:"Description",gridSizes:{xs:12}},T.createElement(b.Z,{variant:"body2",paragraph:!0,className:je.description},((lt=de==null?void 0:de.metadata)==null?void 0:lt.description)||"No description")),T.createElement(M,{label:"Owner",value:"No Owner",gridSizes:{xs:12,sm:6,lg:4}},St.length>0&&T.createElement(E.EntityRefLinks,{entityRefs:St,defaultKind:"group"})),(_e||pt.length>0)&&T.createElement(M,{label:"Domain",value:"No Domain",gridSizes:{xs:12,sm:6,lg:4}},pt.length>0&&T.createElement(E.EntityRefLinks,{entityRefs:pt,defaultKind:"domain"})),(ot||rt||Qe||Ye.length>0)&&T.createElement(M,{label:"System",value:"No System",gridSizes:{xs:12,sm:6,lg:4}},Ye.length>0&&T.createElement(E.EntityRefLinks,{entityRefs:Ye,defaultKind:"system"})),rt&&Rt.length>0&&T.createElement(M,{label:"Parent Component",value:"No Parent Component",gridSizes:{xs:12,sm:6,lg:4}},T.createElement(E.EntityRefLinks,{entityRefs:Rt,defaultKind:"component"})),(ot||rt||Qe||gt||Xe||Le||typeof((yt=de==null?void 0:de.spec)==null?void 0:yt.type)=="string")&&T.createElement(M,{label:"Type",value:(bt=de==null?void 0:de.spec)==null?void 0:bt.type,gridSizes:{xs:12,sm:6,lg:4}}),(ot||rt||typeof((Tt=de==null?void 0:de.spec)==null?void 0:Tt.lifecycle)=="string")&&T.createElement(M,{label:"Lifecycle",value:(Mt=de==null?void 0:de.spec)==null?void 0:Mt.lifecycle,gridSizes:{xs:12,sm:6,lg:4}}),T.createElement(M,{label:"Tags",value:"No Tags",gridSizes:{xs:12,sm:6,lg:4}},(((Bt=de==null?void 0:de.metadata)==null?void 0:Bt.tags)||[]).map(It=>T.createElement(D.Z,{key:It,size:"small",label:It}))))}const pe=(0,i.Z)({gridItemCard:{display:"flex",flexDirection:"column",height:"calc(100% - 10px)",marginBottom:"10px"},fullHeightCard:{display:"flex",flexDirection:"column",height:"100%"},gridItemCardContent:{flex:1},fullHeightCardContent:{flex:1}});function Me(Ue){var Tt,Mt,Bt;const{variant:de}=Ue,je=pe(),{entity:_e}=(0,E.useEntity)(),Qe=(0,l.useApi)(f.q3),rt=(0,l.useApi)(E.catalogApiRef),ot=(0,l.useApi)(l.alertApiRef),gt=(0,l.useRouteRef)(X.jU),Le=(0,E.getEntitySourceLocation)(_e,Qe),Xe=(Tt=_e.metadata.annotations)==null?void 0:Tt[r.Tf],Ye={label:"View Source",disabled:!Le,icon:T.createElement(f.nW,{type:Le==null?void 0:Le.integrationType}),href:Le==null?void 0:Le.locationTargetUrl},Rt={label:"View TechDocs",disabled:!((Mt=_e.metadata.annotations)!=null&&Mt["backstage.io/techdocs-ref"])||!gt,icon:T.createElement(P.Z,null),href:gt&>({namespace:_e.metadata.namespace||r.zG,kind:_e.kind,name:_e.metadata.name})};let pt="";de==="gridItem"?pt=je.gridItemCard:de==="fullHeight"&&(pt=je.fullHeightCard);let St="";de==="gridItem"?St=je.gridItemCardContent:de==="fullHeight"&&(St=je.fullHeightCardContent);const lt=(Bt=_e.metadata.annotations)==null?void 0:Bt[r.P1],yt=(lt==null?void 0:lt.startsWith("url:"))||(lt==null?void 0:lt.startsWith("file:")),bt=(0,T.useCallback)(async()=>{await rt.refreshEntity((0,r.eE)(_e)),ot.post({message:"Refresh scheduled",severity:"info"})},[rt,ot,_e]);return T.createElement(o.Z,{className:pt},T.createElement(m.Z,{title:"About",action:T.createElement(T.Fragment,null,yt&&T.createElement(u.Z,{"aria-label":"Refresh",title:"Schedule entity refresh",onClick:bt},T.createElement(R.Z,null)),T.createElement(u.Z,{component:t.Link,"aria-label":"Edit",disabled:!Xe,title:"Edit Metadata",to:Xe!=null?Xe:"#"},T.createElement(x.Z,null))),subheader:T.createElement(t.HeaderIconLinkRow,{links:[Ye,Rt]})}),T.createElement(h.Z,null),T.createElement(g.Z,{className:St},T.createElement(ae,{entity:_e})))}},49782:function(_,s,e){"use strict";e.d(s,{K:function(){return R}});var r=e(2784),t=e(79692),l=e(12420),f=e(97580),E=e(73698),i=e(74603),o=e(12231),m=e(53479),u=e(64279),h=e(36964);const g=(0,t.Z)(P=>(0,l.Z)({root:{...P.typography.h4}}));function R(P){var Ue;const{initialFilter:x="component",allowedKinds:T}=P,X=g(),F=(0,h.useApi)(m.catalogApiRef),{value:b}=(0,u.default)(async()=>await F.getEntityFacets({facets:["kind"]}).then(de=>{var je;return((je=de.facets.kind)==null?void 0:je.map(_e=>_e.value).sort())||[]})),{updateFilters:D,queryParameters:{kind:Z}}=(0,m.useEntityList)(),M=(0,r.useMemo)(()=>{var de;return(de=[Z].flat()[0])==null?void 0:de.toLocaleLowerCase("en-US")},[Z]),[K,ae]=(0,r.useState)(M!=null?M:x);(0,r.useEffect)(()=>{D({kind:K?new m.EntityKindFilter(K):void 0})},[K,D]),(0,r.useEffect)(()=>{M&&ae(M)},[M]);const Me=[(0,f.Z)(K)].concat((Ue=b==null?void 0:b.filter(de=>T?T.some(je=>je.toLocaleLowerCase("en-US")===de.toLocaleLowerCase("en-US")):!0))!=null?Ue:[]).sort().reduce((de,je)=>(de[je.toLocaleLowerCase("en-US")]=je,de),{});return r.createElement(E.Z,{input:r.createElement(i.Z,{value:K}),value:K,onChange:de=>ae(de.target.value),classes:X},Object.keys(Me).map(de=>r.createElement(o.Z,{value:de,key:de},`${Me[de]}s`)))}},30097:function(_,s,e){"use strict";e.d(s,{E:function(){return x}});var r=e(48023),t=e(53479),l=e(27604),f=e(2997),E=e(76635),i=e(2784),o=e(7089),m=e(9118);const u=Object.freeze({createNameColumn(T){function X(F){var b;return((b=F.metadata)==null?void 0:b.title)||(0,t.humanizeEntityRef)(F,{defaultKind:T==null?void 0:T.defaultKind})}return{title:"Name",field:"resolved.name",highlight:!0,customSort({entity:F},{entity:b}){return X(F).localeCompare(X(b))},render:({entity:F})=>{var b;return i.createElement(t.EntityRefLink,{entityRef:F,defaultKind:(T==null?void 0:T.defaultKind)||"Component",title:(b=F.metadata)==null?void 0:b.title})}}},createSystemColumn(){return{title:"System",field:"resolved.partOfSystemRelationTitle",render:({resolved:T})=>i.createElement(t.EntityRefLinks,{entityRefs:T.partOfSystemRelations,defaultKind:"system"})}},createOwnerColumn(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:T})=>i.createElement(t.EntityRefLinks,{entityRefs:T.ownedByRelations,defaultKind:"group"})}},createSpecTypeColumn(){return{title:"Type",field:"entity.spec.type",hidden:!0}},createSpecLifecycleColumn(){return{title:"Lifecycle",field:"entity.spec.lifecycle"}},createMetadataDescriptionColumn(){return{title:"Description",field:"entity.metadata.description",render:({entity:T})=>i.createElement(m.OverflowTooltip,{text:T.metadata.description,placement:"bottom-start"}),width:"auto"}},createTagsColumn(){return{title:"Tags",field:"entity.metadata.tags",cellStyle:{padding:"0px 16px 0px 20px"},render:({entity:T})=>i.createElement(i.Fragment,null,T.metadata.tags&&T.metadata.tags.map(X=>i.createElement(o.Z,{key:X,label:X,size:"small",variant:"outlined",style:{marginBottom:"0px"}})))}}});var h=e(28347),g=e(15459),R=e(11640);const P=(0,g.Z)({root:{color:"#f3ba37"}})(R.Z),x=T=>{var ot,gt,Le;const{columns:X,actions:F,tableOptions:b}=T,{isStarredEntity:D,toggleStarredEntity:Z}=(0,t.useStarredEntities)(),{loading:M,error:K,entities:ae,filters:pe}=(0,t.useEntityList)(),Me=(0,i.useMemo)(()=>{var Ye;return[u.createNameColumn({defaultKind:(Ye=pe.kind)==null?void 0:Ye.value}),...Xe(),u.createMetadataDescriptionColumn(),u.createTagsColumn()];function Xe(){var Rt;switch((Rt=pe.kind)==null?void 0:Rt.value){case"user":return[];case"domain":case"system":return[u.createOwnerColumn()];case"group":case"location":case"template":return[u.createSpecTypeColumn()];default:return[u.createSystemColumn(),u.createOwnerColumn(),u.createSpecTypeColumn(),u.createSpecLifecycleColumn()]}}},[(ot=pe.kind)==null?void 0:ot.value]),Ue=pe.type===void 0,de=(0,E.capitalize)((Le=(gt=pe.user)==null?void 0:gt.value)!=null?Le:"all");if(K)return i.createElement("div",null,i.createElement(m.WarningPanel,{severity:"error",title:"Could not fetch catalog entities."},i.createElement(m.CodeSnippet,{language:"text",text:K.toString()})));const je=[({entity:Xe})=>{var Rt;const Ye=(Rt=Xe.metadata.annotations)==null?void 0:Rt[r.l2];return{icon:()=>i.createElement(f.Z,{"aria-label":"View",fontSize:"small"}),tooltip:"View",disabled:!Ye,onClick:()=>{!Ye||window.open(Ye,"_blank")}}},({entity:Xe})=>{var Rt;const Ye=(Rt=Xe.metadata.annotations)==null?void 0:Rt[r.Tf];return{icon:()=>i.createElement(l.Z,{"aria-label":"Edit",fontSize:"small"}),tooltip:"Edit",disabled:!Ye,onClick:()=>{!Ye||window.open(Ye,"_blank")}}},({entity:Xe})=>{const Ye=D(Xe);return{cellStyle:{paddingLeft:"1em"},icon:()=>Ye?i.createElement(P,null):i.createElement(h.Z,null),tooltip:Ye?"Remove from favorites":"Add to favorites",onClick:()=>Z(Xe)}}],_e=ae.map(Xe=>{const Ye=(0,t.getEntityRelations)(Xe,r.cz,{kind:"system"}),Rt=(0,t.getEntityRelations)(Xe,r.S4);return{entity:Xe,resolved:{name:(0,t.humanizeEntityRef)(Xe,{defaultKind:"Component"}),ownedByRelationsTitle:Rt.map(pt=>(0,t.humanizeEntityRef)(pt,{defaultKind:"group"})).join(", "),ownedByRelations:Rt,partOfSystemRelationTitle:Ye.map(pt=>(0,t.humanizeEntityRef)(pt,{defaultKind:"system"})).join(", "),partOfSystemRelations:Ye}}}),Qe=(X||Me).find(Xe=>Xe.title==="Type");Qe&&(Qe.hidden=!Ue);const rt=_e.length>20;return i.createElement(m.Table,{isLoading:M,columns:X||Me,options:{paging:rt,pageSize:20,actionsColumnIndex:-1,loadingType:"linear",showEmptyDataSourceMessage:!M,padding:"dense",pageSizeOptions:[20,50,100],...b},title:`${de} (${ae.length})`,data:_e,actions:F||je})};x.columns=u},47851:function(_,s,e){"use strict";e.d(s,{_Z:function(){return f},jU:function(){return l},yw:function(){return t}});var r=e(36964);const t=(0,r.createExternalRouteRef)({id:"create-component",optional:!0}),l=(0,r.createExternalRouteRef)({id:"view-techdoc",optional:!0,params:["namespace","kind","name"]}),f=(0,r.createRouteRef)({id:"catalog"})},40749:function(_,s,e){"use strict";e.d(s,{rG:function(){return r},Y2:function(){return D},J$:function(){return u},g2:function(){return l}});var r;(function(Z){const M="DENY";Z.DENY=M;const K="ALLOW";Z.ALLOW=K;const ae="CONDITIONAL";Z.CONDITIONAL=ae})(r||(r={}));function t(Z,M){return Z.name===M.name}function l(Z,M){return"resourceType"in Z?!M||Z.resourceType===M:!1}function f(Z){return Z.attributes.action==="create"}function E(Z){return Z.attributes.action==="read"}function i(Z){return Z.attributes.action==="update"}function o(Z){return Z.attributes.action==="delete"}function m(Z){return{authorize:async(M,K)=>await Z.authorize(M,K),authorizeConditional(M,K){const ae=M;return Z.authorize(ae,K)}}}function u({name:Z,attributes:M,resourceType:K}){return K?{type:"resource",name:Z,attributes:M,resourceType:K}:{type:"basic",name:Z,attributes:M}}var h=e(10179),g=e(96279),R=e.n(g),P=e(9571),x=e(30195);const T=x.z.lazy(()=>x.z.object({rule:x.z.string(),resourceType:x.z.string(),params:x.z.array(x.z.unknown())}).strict().or(x.z.object({anyOf:x.z.array(T).nonempty()}).strict()).or(x.z.object({allOf:x.z.array(T).nonempty()}).strict()).or(x.z.object({not:T}).strict())),X=x.z.object({result:x.z.literal(r.ALLOW).or(x.z.literal(r.DENY))}),F=x.z.union([x.z.object({result:x.z.literal(r.ALLOW).or(x.z.literal(r.DENY))}),x.z.object({result:x.z.literal(r.CONDITIONAL),pluginId:x.z.string(),resourceType:x.z.string(),conditions:T})]),b=(Z,M)=>x.z.object({items:x.z.array(x.z.intersection(x.z.object({id:x.z.string()}),Z)).refine(K=>K.length===M.size&&K.every(({id:ae})=>M.has(ae)),{message:"Items in response do not match request"})});class D{constructor(M){oe(this,"enabled");oe(this,"discovery");var K;this.discovery=M.discovery,this.enabled=(K=M.config.getOptionalBoolean("permission.enabled"))!=null?K:!1}async authorize(M,K){return this.makeRequest(M,X,K)}async authorizeConditional(M,K){return this.makeRequest(M,F,K)}async makeRequest(M,K,ae){if(!this.enabled)return M.map(Qe=>({result:r.ALLOW}));const pe={items:M.map(Qe=>({id:P.Z(),...Qe}))},Me=await this.discovery.getBaseUrl("permission"),Ue=await R()(`${Me}/authorize`,{method:"POST",body:JSON.stringify(pe),headers:{...this.getAuthorizationHeader(ae==null?void 0:ae.token),"content-type":"application/json"}});if(!Ue.ok)throw await h.VL.fromResponse(Ue);const de=await Ue.json(),_e=b(K,new Set(pe.items.map(({id:Qe})=>Qe))).parse(de).items.reduce((Qe,rt)=>(Qe[rt.id]=rt,Qe),{});return pe.items.map(Qe=>_e[Qe.id])}getAuthorizationHeader(M){return M?{Authorization:`Bearer ${M}`}:{}}}},68099:function(_,s,e){"use strict";e.d(s,{iM:function(){return E},RV:function(){return l},gI:function(){return o}});var r=e(2784),t=e(36964);const l=(0,t.createApiRef)({id:"plugin.permission.api"});var f=e(40749);class E{constructor(h,g){this.permissionClient=h,this.identityApi=g}static create(h){const{config:g,discovery:R,identity:P}=h,x=new f.Y2({discovery:R,config:g});return new E(x,P)}async authorize(h){return(await this.permissionClient.authorize([h],await this.identityApi.getCredentials()))[0]}}var i=e(49857);function o(u){const h=(0,t.useApi)(l),{data:g,error:R}=(0,i.ZP)(u,async P=>{if((0,f.g2)(P.permission)&&!P.resourceRef)return f.rG.DENY;const{result:x}=await h.authorize(P);return x});return R?{error:R,loading:!1,allowed:!1}:g===void 0?{loading:!0,allowed:!1}:{loading:!1,allowed:g===f.rG.ALLOW}}const m=u=>{const{permission:h,resourceRef:g,errorComponent:R,...P}=u,x=usePermission(isResourcePermission(h)?{permission:h,resourceRef:g}:{permission:h}),T=useApp(),{NotFoundErrorPage:X}=T.getComponents();let F=R===void 0?React.createElement(X,null):R;return x.loading?F=null:x.allowed&&(F=u.element),React.createElement(Route,{...P,element:F})}},91512:function(_,s,e){"use strict";e.d(s,{g:function(){return E},w:function(){return i}});var r=e(36964),t=e(10179),l=e(19126),f=e.n(l);const E=(0,r.createApiRef)({id:"plugin.search.queryservice"});class i{constructor(m){oe(this,"discoveryApi");oe(this,"identityApi");this.discoveryApi=m.discoveryApi,this.identityApi=m.identityApi}async query(m){const{token:u}=await this.identityApi.getCredentials(),h=f().stringify(m),g=`${await this.discoveryApi.getBaseUrl("search/query")}?${h}`,R=await fetch(g,{headers:u?{Authorization:`Bearer ${u}`}:{}});if(!R.ok)throw await t.VL.fromResponse(R);return R.json()}}},19941:function(_,s,e){"use strict";e.r(s),e.d(s,{DefaultResultListItem:function(){return h}});var r=e(2784),t=e(38402),l=e(86136),f=e(49378),E=e(95544),i=e(85256),o=e(9118),m=e(15277),u=e.n(m);const h=({result:g,icon:R,secondaryAction:P,lineClamp:x=5})=>r.createElement(o.Link,{to:g.location},r.createElement(t.Z,{alignItems:"center"},R&&r.createElement(l.Z,null,R),r.createElement(f.Z,{primaryTypographyProps:{variant:"h6"},primary:g.title,secondary:r.createElement(u(),{line:x,truncateText:"\u2026",text:g.text,element:"span"})}),P&&r.createElement(E.Z,{alignItems:"flex-end"},P)),r.createElement(i.Z,null))},1795:function(_,s,e){"use strict";e.r(s),e.d(s,{SearchBar:function(){return P},SearchBarBase:function(){return R}});var r=e(2784),t=e(48760),l=e(36964),f=e(50581),E=e(61837),i=e(74603),o=e(21853),m=e(33375),u=e(22313);const h=({children:x})=>{const T=(0,l.useAnalytics)(),{term:X}=(0,u.Rx)();return(0,r.useEffect)(()=>{X&&T.captureEvent("search",X)},[T,X]),r.createElement(r.Fragment,null,x)},g=()=>(0,r.useContext)(u.ci)!==void 0,R=({onChange:x,onKeyDown:T,onSubmit:X,debounceTime:F=200,clearButton:b=!0,fullWidth:D=!0,value:Z,inputProps:M={},endAdornment:K,...ae})=>{const pe=(0,l.useApi)(l.configApiRef),[Me,Ue]=(0,r.useState)(Z),de=g();(0,r.useEffect)(()=>{Ue(Xe=>Xe!==Z?Z:Xe)},[Z]),(0,t.Z)(()=>x(Me),F,[Me]);const je=(0,r.useCallback)(Xe=>{Ue(Xe.target.value)},[Ue]),_e=(0,r.useCallback)(Xe=>{T&&T(Xe),X&&Xe.key==="Enter"&&X()},[T,X]),Qe=(0,r.useCallback)(()=>{x("")},[x]),rt=`Search in ${pe.getOptionalString("app.title")||"Backstage"}`,ot=r.createElement(f.Z,{position:"start"},r.createElement(E.Z,{"aria-label":"Query",disabled:!0},r.createElement(o.Z,null))),gt=r.createElement(f.Z,{position:"end"},r.createElement(E.Z,{"aria-label":"Clear",onClick:Qe},r.createElement(m.Z,null))),Le=r.createElement(h,null,r.createElement(i.Z,{"data-testid":"search-bar-next",value:Me,placeholder:rt,startAdornment:ot,endAdornment:b?gt:K,inputProps:{"aria-label":"Search",...M},fullWidth:D,onChange:je,onKeyDown:_e,...ae}));return de?Le:r.createElement(u.Nd,null,Le)},P=({onChange:x,...T})=>{const{term:X,setTerm:F}=(0,u.Rx)(),b=(0,r.useCallback)(D=>{x?x(D):F(D)},[x,F]);return r.createElement(R,{value:X,onChange:b,...T})}},22313:function(_,s,e){"use strict";e.d(s,{ci:function(){return i},Nd:function(){return m},Rx:function(){return u}});var r=e(36964),t=e(2784),l=e(64279),f=e(1849),E=e(91512);const i=(0,t.createContext)(void 0),o={term:"",pageCursor:void 0,filters:{},types:[]},m=({initialState:h=o,children:g})=>{var je,_e,Qe,rt;const R=(0,r.useApi)(E.g),[P,x]=(0,t.useState)(h.pageCursor),[T,X]=(0,t.useState)(h.filters),[F,b]=(0,t.useState)(h.term),[D,Z]=(0,t.useState)(h.types),M=(0,f.Z)(F),K=(0,l.default)(()=>R.query({term:F,filters:T,pageCursor:P,types:D}),[F,T,D,P]),ae=!K.loading&&!K.error&&((je=K.value)==null?void 0:je.nextPageCursor),pe=!K.loading&&!K.error&&((_e=K.value)==null?void 0:_e.previousPageCursor),Me=(0,t.useCallback)(()=>{var ot;x((ot=K.value)==null?void 0:ot.nextPageCursor)},[(Qe=K.value)==null?void 0:Qe.nextPageCursor]),Ue=(0,t.useCallback)(()=>{var ot;x((ot=K.value)==null?void 0:ot.previousPageCursor)},[(rt=K.value)==null?void 0:rt.previousPageCursor]);(0,t.useEffect)(()=>{F&&M&&F!==M&&x(void 0)},[F,M,h.pageCursor]);const de={result:K,filters:T,setFilters:X,term:F,setTerm:b,types:D,setTypes:Z,pageCursor:P,setPageCursor:x,fetchNextPage:ae?Me:void 0,fetchPreviousPage:pe?Ue:void 0};return t.createElement(r.AnalyticsContext,{attributes:{searchTypes:D.sort().join(",")}},t.createElement(i.Provider,{value:de,children:g}))},u=()=>{const h=(0,t.useContext)(i);if(h===void 0)throw new Error("useSearch must be used within a SearchContextProvider");return h}},73032:function(_,s,e){"use strict";e.d(s,{s:function(){return ae},O:function(){return pe}});var r=e(2784),t=e(60364),l=e(79249),f=e(27556),E=e(38724),i=e(60905),o=e(85256),m=e(11776),u=e(49429),h=e(8629),g=e(69001),R=e(79692),P=e(1795),x=e(19941),T=e(39332),X=e(22313),F=e(8542),b=e(36964),D=e(9118),Z=e(20863);const M=(0,R.Z)(Me=>({container:{borderRadius:30,display:"flex",height:"2.4em"},input:{flex:1},paperFullWidth:{height:"calc(100% - 128px)"},dialogActionsContainer:{padding:Me.spacing(1,3)},viewResultsLink:{verticalAlign:"0.5em"}})),K=({toggleModal:Me})=>{const Ue=(0,b.useRouteRef)(Z._Z),de=M(),{term:je}=(0,X.Rx)(),{focusContent:_e}=(0,D.useContent)(),{transitions:Qe}=(0,t.Z)(),rt=()=>{Me(),setTimeout(_e,Qe.duration.leavingScreen)},ot=()=>{rt()};return r.createElement(r.Fragment,null,r.createElement(l.Z,null,r.createElement(f.Z,{className:de.container},r.createElement(P.SearchBar,{className:de.input}))),r.createElement(E.Z,null,r.createElement(i.Z,{container:!0,direction:"row-reverse",justifyContent:"flex-start",alignItems:"center"},r.createElement(i.Z,{item:!0},r.createElement(D.Link,{onClick:()=>{Me(),setTimeout(_e,Qe.duration.leavingScreen)},to:`${Ue()}?query=${je}`},r.createElement("span",{className:de.viewResultsLink},"View Full Results"),r.createElement(g.Z,{color:"primary"})))),r.createElement(o.Z,null),r.createElement(T.SearchResult,null,({results:gt})=>r.createElement(m.Z,null,gt.map(({document:Le})=>r.createElement("div",{role:"button",tabIndex:0,key:`${Le.location}-btn`,onClick:rt,onKeyPress:ot},r.createElement(x.DefaultResultListItem,{key:Le.location,result:Le})))))),r.createElement(u.Z,{className:de.dialogActionsContainer},r.createElement(i.Z,{container:!0,direction:"row"},r.createElement(i.Z,{item:!0,xs:12},r.createElement(F.G,null)))))},ae=({open:Me=!0,hidden:Ue,toggleModal:de})=>{const je=M();return r.createElement(h.Z,{classes:{paperFullWidth:je.paperFullWidth},onClose:de,"aria-labelledby":"search-modal-title",fullWidth:!0,maxWidth:"lg",open:Me,hidden:Ue},Me&&r.createElement(X.Nd,null,r.createElement(K,{toggleModal:de})))};function pe(Me=!1){const[Ue,de]=(0,r.useState)({hidden:!Me,open:Me}),je=(0,r.useCallback)(()=>de(Qe=>({open:!0,hidden:!Qe.hidden})),[]),_e=(0,r.useCallback)(Qe=>de(rt=>({open:rt.open||Qe,hidden:!Qe})),[]);return{state:Ue,toggleModal:je,setOpen:_e}}},3992:function(_,s,e){"use strict";e.r(s),e.d(s,{SearchPage:function(){return It}});var r=e(2784),t=e(1849),l=e(19126),f=e.n(l),E=e(10289),i=e(22313),o=e(60905),m=e(48760),u=e(79692),h=e(27556),g=e(74603),R=e(61837),P=e(21853),x=e(33375);const T=(0,u.Z)(()=>({root:{display:"flex",alignItems:"center"},input:{flex:1}})),X=({searchQuery:ze,handleSearch:ct,handleClearSearchBar:ke})=>{const Ct=T();return r.createElement(h.Z,{component:"form",onSubmit:ut=>ct(ut),className:Ct.root},r.createElement(R.Z,{disabled:!0,type:"submit","aria-label":"search"},r.createElement(P.Z,null)),r.createElement(g.Z,{className:Ct.input,placeholder:"Search in Backstage",value:ze,onChange:ut=>ct(ut),inputProps:{"aria-label":"search backstage"}}),r.createElement(R.Z,{"aria-label":"search",onClick:()=>ke()},r.createElement(x.Z,null)))};var F=e(85256),b=e(90436),D=e(99688),Z=e(64279),M=e(53479),K=e(36444);const ae=(0,u.Z)(ze=>({filters:{width:"250px",display:"flex"},icon:{margin:ze.spacing(-1,0,0,0)}})),pe=({numberOfSelectedFilters:ze,handleToggleFilters:ct})=>{const ke=ae();return r.createElement("div",{className:ke.filters},r.createElement(R.Z,{className:ke.icon,"aria-label":"settings",onClick:ct},r.createElement(K.Z,null)),r.createElement(b.Z,{variant:"h6"},"Filters (",ze||0,")"))};var Me=e(94339),Ue=e(32552),de=e(77277),je=e(24579),_e=e(73698),Qe=e(12231),rt=e(11776),ot=e(38402),gt=e(21324),Le=e(49378);const Xe=(0,u.Z)(ze=>({filters:{background:"transparent",boxShadow:"0px 0px 0px 0px"},checkbox:{padding:ze.spacing(0,1,0,1)},dropdown:{width:"100%"}})),Ye=({filters:ze,filterOptions:ct,resetFilters:ke,updateSelected:Ct,updateChecked:ut})=>{const Et=Xe();return r.createElement(Me.Z,{className:Et.filters},r.createElement(Ue.Z,{title:r.createElement(b.Z,{variant:"h6"},"Filters"),action:r.createElement(de.Z,{color:"primary",onClick:()=>ke()},"CLEAR ALL")}),r.createElement(F.Z,null),ct.kind.length===0&&ct.lifecycle.length===0&&r.createElement(je.Z,null,r.createElement(b.Z,{variant:"subtitle2"},"Filters cannot be applied to available results")),ct.kind.length>0&&r.createElement(je.Z,null,r.createElement(b.Z,{variant:"subtitle2"},"Kind"),r.createElement(_e.Z,{id:"outlined-select",onChange:q=>{var N;return Ct((N=q==null?void 0:q.target)==null?void 0:N.value)},variant:"outlined",className:Et.dropdown,value:ze.selected},ct.kind.map(q=>r.createElement(Qe.Z,{selected:q==="",dense:!0,key:q,value:q},q)))),ct.lifecycle.length>0&&r.createElement(je.Z,null,r.createElement(b.Z,{variant:"subtitle2"},"Lifecycle"),r.createElement(rt.Z,{disablePadding:!0,dense:!0},ct.lifecycle.map(q=>r.createElement(ot.Z,{key:q,dense:!0,button:!0,onClick:()=>ut(q)},r.createElement(gt.Z,{edge:"start",disableRipple:!0,className:Et.checkbox,color:"primary",checked:ze.checked.includes(q),tabIndex:-1,value:q,name:q}),r.createElement(Le.Z,{id:q,primary:q}))))))};var Rt=e(48023),pt=e(9118),St=e(36964);const lt=(0,u.Z)(ze=>({searchQuery:{color:ze.palette.text.primary,background:ze.palette.background.default,borderRadius:"10%"},tableHeader:{margin:ze.spacing(1,0,0,0),display:"flex"},divider:{width:"1px",margin:ze.spacing(0,2),padding:ze.spacing(2,0)}})),yt=[{title:"Name",field:"name",highlight:!0,render:ze=>r.createElement(pt.Link,{to:ze.url||""},ze.name)},{title:"Description",field:"description"},{title:"Owner",field:"owner"},{title:"Kind",field:"kind"},{title:"LifeCycle",field:"lifecycle"}],bt=({searchQuery:ze,numberOfSelectedFilters:ct,numberOfResults:ke,handleToggleFilters:Ct})=>{const ut=lt();return r.createElement("div",{className:ut.tableHeader},r.createElement(pe,{numberOfSelectedFilters:ct,handleToggleFilters:Ct}),r.createElement(F.Z,{className:ut.divider,orientation:"vertical"}),r.createElement(o.Z,{item:!0,xs:12},ze?r.createElement(b.Z,{variant:"h6"},`${ke} `,ke>1?"results for ":"result for ",r.createElement("span",{className:ut.searchQuery},'"',ze,'"')," "):r.createElement(b.Z,{variant:"h6"},`${ke} results`)))},Tt=({searchQuery:ze})=>{const ct=(0,St.useApi)(M.catalogApiRef),[ke,Ct]=(0,r.useState)(!1),[ut,Et]=(0,r.useState)({selected:"",checked:[]}),[q,N]=(0,r.useState)([]),{loading:ne,error:ce,value:se}=(0,Z.default)(async()=>(await ct.getEntities()).items.map(Y=>{var z,ie,Te,Oe,ve;return{name:Y.metadata.name,description:Y.metadata.description,owner:typeof((z=Y.spec)==null?void 0:z.owner)=="string"?(ie=Y.spec)==null?void 0:ie.owner:void 0,kind:Y.kind,lifecycle:typeof((Te=Y.spec)==null?void 0:Te.lifecycle)=="string"?(Oe=Y.spec)==null?void 0:Oe.lifecycle:void 0,url:`/catalog/${((ve=Y.metadata.namespace)==null?void 0:ve.toLocaleLowerCase("en-US"))||Rt.zG}/${Y.kind.toLocaleLowerCase("en-US")}/${Y.metadata.name}`}}),[]);if((0,r.useEffect)(()=>{if(se){let te=se;ut.selected!==""&&(te=se.filter(Y=>ut.selected.includes(Y.kind))),ut.checked.length>0&&(te=te.filter(Y=>Y.lifecycle&&ut.checked.includes(Y.lifecycle))),ze&&(te=te.filter(Y=>{var z,ie,Te;return((z=Y.name)==null?void 0:z.toLocaleLowerCase("en-US").includes(ze))||((ie=Y.name)==null?void 0:ie.toLocaleLowerCase("en-US").includes(ze.split(" ").join("-")))||((Te=Y.description)==null?void 0:Te.toLocaleLowerCase("en-US").includes(ze))})),N(te)}},[ut,ze,se]),ne)return r.createElement(pt.Progress,null);if(ce)return r.createElement(D.Z,{severity:"error"},"Error encountered while fetching search results. ",ce.toString());if(!se||se.length===0)return r.createElement(pt.EmptyState,{missing:"data",title:"Sorry, no results were found"});const Ee=()=>{Et({selected:"",checked:[]})},Ze=te=>{Et(Y=>({...Y,selected:te}))},$e=te=>{if(ut.checked.includes(te)){Et(Y=>({...Y,checked:Y.checked.filter(z=>z!==te)}));return}Et(Y=>({...Y,checked:[...Y.checked,te]}))},at=se.reduce((te,Y)=>(Y.kind&&te.kind.indexOf(Y.kind)<0&&te.kind.push(Y.kind),Y.lifecycle&&te.lifecycle.indexOf(Y.lifecycle)<0&&te.lifecycle.push(Y.lifecycle),te),{kind:[],lifecycle:[]});return r.createElement(r.Fragment,null,r.createElement(o.Z,{container:!0},ke&&r.createElement(o.Z,{item:!0,xs:3},r.createElement(Ye,{filters:ut,filterOptions:at,resetFilters:Ee,updateSelected:Ze,updateChecked:$e})),r.createElement(o.Z,{item:!0,xs:ke?9:12},r.createElement(pt.Table,{options:{paging:!0,pageSize:20,search:!1},data:q,columns:yt,title:r.createElement(bt,{searchQuery:ze,numberOfResults:q.length,numberOfSelectedFilters:(ut.selected!==""?1:0)+ut.checked.length,handleToggleFilters:()=>Ct(!ke)})}))))},Mt=()=>{const[ze,ct]=(0,pt.useQueryParamState)("query"),[ke,Ct]=(0,r.useState)(ze!=null?ze:""),ut=q=>{q.preventDefault(),Ct(q.target.value)};(0,r.useEffect)(()=>Ct(ze!=null?ze:""),[ze]),(0,m.Z)(()=>{ct(ke)},200,[ke]);const Et=()=>{Ct("")};return r.createElement(pt.Page,{themeId:"home"},r.createElement(pt.Header,{title:"Search"}),r.createElement(pt.Content,null,r.createElement(o.Z,{container:!0,direction:"row"},r.createElement(o.Z,{item:!0,xs:12},r.createElement(X,{handleSearch:ut,handleClearSearchBar:Et,searchQuery:ke})),r.createElement(o.Z,{item:!0,xs:12},r.createElement(Tt,{searchQuery:(ze!=null?ze:"").toLocaleLowerCase("en-US")})))))},Bt=()=>{const ze=(0,E.TH)(),{term:ct,setTerm:ke,types:Ct,setTypes:ut,pageCursor:Et,setPageCursor:q,filters:N,setFilters:ne}=(0,i.Rx)(),ce=(0,t.Z)(ze.search);return(0,r.useEffect)(()=>{if(ze.search===ce)return;const se=f().parse(ze.search.substring(1),{arrayLimit:0})||{};se.filters&&ne(se.filters),se.query&&ke(se.query),se.pageCursor&&q(se.pageCursor),se.types&&ut(se.types)},[ce,ze,ke,ut,q,ne]),(0,r.useEffect)(()=>{const se=f().stringify({query:ct,types:Ct,pageCursor:Et,filters:N},{arrayFormat:"brackets"}),Ee=`${window.location.pathname}?${se}`;window.history.replaceState(null,document.title,Ee)},[ct,Ct,Et,N]),null},It=()=>{const ze=(0,E.pC)();return r.createElement(i.Nd,null,r.createElement(Bt,null),ze||r.createElement(Mt,null))}},39332:function(_,s,e){"use strict";e.r(s),e.d(s,{SearchResult:function(){return f}});var r=e(9118),t=e(2784),l=e(22313);const f=({children:E})=>{const{result:{loading:i,error:o,value:m}}=(0,l.Rx)();return i?t.createElement(r.Progress,null):o?t.createElement(r.ResponseErrorPanel,{title:"Error encountered while fetching search results",error:o}):m!=null&&m.results.length?t.createElement(t.Fragment,null,E({results:m.results})):t.createElement(r.EmptyState,{missing:"data",title:"Sorry, no results were found"})}},8542:function(_,s,e){"use strict";e.d(s,{G:function(){return m}});var r=e(79692),t=e(77277),l=e(35352),f=e(27742),E=e(2784),i=e(22313);const o=(0,r.Z)(u=>({root:{display:"flex",justifyContent:"space-between",gap:u.spacing(2),margin:u.spacing(2,0)}})),m=()=>{const{fetchNextPage:u,fetchPreviousPage:h}=(0,i.Rx)(),g=o();return!u&&!h?E.createElement(E.Fragment,null):E.createElement("nav",{"arial-label":"pagination navigation",className:g.root},E.createElement(t.Z,{"aria-label":"previous page",disabled:!h,onClick:h,startIcon:E.createElement(l.Z,null)},"Previous"),E.createElement(t.Z,{"aria-label":"next page",disabled:!u,onClick:u,endIcon:E.createElement(f.Z,null)},"Next"))}},20863:function(_,s,e){"use strict";e.d(s,{_Z:function(){return l}});var r=e(91512),t=e(36964);const l=(0,t.createRouteRef)({id:"search"}),f=(0,t.createRouteRef)({id:"search:next"}),E=(0,t.createPlugin)({id:"search",apis:[(0,t.createApiFactory)({api:r.g,deps:{discoveryApi:t.discoveryApiRef,identityApi:t.identityApiRef},factory:({discoveryApi:T,identityApi:X})=>new r.w({discoveryApi:T,identityApi:X})})],routes:{root:l,nextRoot:f}}),i=E.provide((0,t.createRoutableExtension)({name:"SearchPage",component:()=>Promise.resolve().then(e.bind(e,3992)).then(T=>T.SearchPage),mountPoint:l})),o=E.provide((0,t.createRoutableExtension)({name:"SearchPageNext",component:()=>Promise.resolve().then(e.bind(e,3992)).then(T=>T.SearchPage),mountPoint:f})),m=E.provide((0,t.createComponentExtension)({name:"SearchBar",component:{lazy:()=>Promise.resolve().then(e.bind(e,1795)).then(T=>T.SearchBar)}})),u=E.provide((0,t.createComponentExtension)({name:"SearchBarNext",component:{lazy:()=>Promise.resolve().then(e.bind(e,1795)).then(T=>T.SearchBar)}})),h=E.provide((0,t.createComponentExtension)({name:"SearchResult",component:{lazy:()=>Promise.resolve().then(e.bind(e,39332)).then(T=>T.SearchResult)}})),g=E.provide((0,t.createComponentExtension)({name:"SearchResultNext",component:{lazy:()=>Promise.resolve().then(e.bind(e,39332)).then(T=>T.SearchResult)}})),R=E.provide((0,t.createComponentExtension)({name:"SidebarSearchModal",component:{lazy:()=>e.e(3825).then(e.bind(e,43825)).then(T=>T.SidebarSearchModal)}})),P=E.provide((0,t.createComponentExtension)({name:"DefaultResultListItem",component:{lazy:()=>Promise.resolve().then(e.bind(e,19941)).then(T=>T.DefaultResultListItem)}})),x=E.provide((0,t.createComponentExtension)({name:"HomePageSearchBar",component:{lazy:()=>e.e(6105).then(e.bind(e,46105)).then(T=>T.HomePageSearchBar)}}))},94067:function(_,s,e){"use strict";e.r(s),e.d(s,{EmbeddedDocsRouter:function(){return x},Router:function(){return P},isTechDocsAvailable:function(){return R}});var r=e(2784),t=e(53479),l=e(10289),f=e(50021),E=e(75733),i=e(96393),o=e(97589),m=e(36964);const u=({entity:T})=>{var F;const X=(0,m.useApi)(m.configApiRef);return r.createElement(i.Ej,{withSearch:!1,entityRef:{namespace:(0,o.D)((F=T.metadata.namespace)!=null?F:"default",X),kind:(0,o.D)(T.kind,X),name:(0,o.D)(T.metadata.name,X)}})};var h=e(9118);const g="backstage.io/techdocs-ref",R=T=>{var X,F;return Boolean((F=(X=T==null?void 0:T.metadata)==null?void 0:X.annotations)==null?void 0:F[g])},P=()=>r.createElement(l.Z5,null,r.createElement(l.AW,{path:"/",element:r.createElement(f.TechDocsIndexPage,null)}),r.createElement(l.AW,{path:"/:namespace/:kind/:name/*",element:r.createElement(E.TechDocsReaderPage,null)})),x=()=>{var F;const{entity:T}=(0,t.useEntity)();return((F=T.metadata.annotations)==null?void 0:F[g])?r.createElement(l.Z5,null,r.createElement(l.AW,{path:"/*",element:r.createElement(u,{entity:T})})):r.createElement(h.MissingAnnotationEmptyState,{annotation:g})}},3337:function(_,s,e){"use strict";e.d(s,{D:function(){return t},g:function(){return l}});var r=e(36964);const t=(0,r.createApiRef)({id:"plugin.techdocs.storageservice"}),l=(0,r.createApiRef)({id:"plugin.techdocs.service"})},42723:function(_,s,e){"use strict";e.d(s,{k:function(){return E},p:function(){return f}});var r=e(10179),t=e(76372),l=e.n(t);class f{constructor(o){oe(this,"configApi");oe(this,"discoveryApi");oe(this,"fetchApi");this.configApi=o.configApi,this.discoveryApi=o.discoveryApi,this.fetchApi=o.fetchApi}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getTechDocsMetadata(o){const{kind:m,namespace:u,name:h}=o,R=`${await this.getApiOrigin()}/metadata/techdocs/${u}/${m}/${h}`,P=await this.fetchApi.fetch(`${R}`);if(!P.ok)throw await r.VL.fromResponse(P);return await P.json()}async getEntityMetadata(o){const{kind:m,namespace:u,name:h}=o,R=`${await this.getApiOrigin()}/metadata/entity/${u}/${m}/${h}`,P=await this.fetchApi.fetch(`${R}`);if(!P.ok)throw await r.VL.fromResponse(P);return await P.json()}}class E{constructor(o){oe(this,"configApi");oe(this,"discoveryApi");oe(this,"identityApi");oe(this,"fetchApi");this.configApi=o.configApi,this.discoveryApi=o.discoveryApi,this.identityApi=o.identityApi,this.fetchApi=o.fetchApi}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getStorageUrl(){var o;return(o=this.configApi.getOptionalString("techdocs.storageUrl"))!=null?o:`${await this.discoveryApi.getBaseUrl("techdocs")}/static/docs`}async getBuilder(){return this.configApi.getString("techdocs.builder")}async getEntityDocs(o,m){const{kind:u,namespace:h,name:g}=o,P=`${await this.getStorageUrl()}/${h}/${u}/${g}/${m}`,x=await this.fetchApi.fetch(`${P.endsWith("/")?P:`${P}/`}index.html`);let T="";switch(x.status){case 404:throw T="Page not found. ",m||(T+="This could be because there is no index.md file in the root of the docs directory of this repository."),new r.dR(T);case 500:throw T="Could not generate documentation or an error in the TechDocs backend. ",new Error(T);default:break}return x.text()}async syncEntityDocs(o,m=()=>{}){const{kind:u,namespace:h,name:g}=o,P=`${await this.getApiOrigin()}/sync/${h}/${u}/${g}`,{token:x}=await this.identityApi.getCredentials();return new Promise((T,X)=>{const F=new t.EventSourcePolyfill(P,{withCredentials:!0,headers:x?{Authorization:`Bearer ${x}`}:{}});F.addEventListener("log",b=>{b.data&&m(JSON.parse(b.data))}),F.addEventListener("finish",b=>{let D=!1;b.data&&({updated:D}=JSON.parse(b.data)),T(D?"updated":"cached")}),F.onerror=b=>{switch(F.close(),b.status){case 404:X(new r.dR(b.message));return;default:X(new Error(b.data));return}}})}async getBaseUrl(o,m,u){const{kind:h,namespace:g,name:R}=m,x=`${await this.getApiOrigin()}/static/docs/${g}/${h}/${R}/${u}`;return new URL(o,x.endsWith("/")?x:`${x}/`).toString()}}},97589:function(_,s,e){"use strict";e.d(s,{D:function(){return r}});function r(t,l){return l.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")?t:t.toLocaleLowerCase("en-US")}},2546:function(_,s,e){"use strict";e.d(s,{u:function(){return o}});var r=e(2784),t=e(9118),l=e(53479),f=e(1114),E=e(70335),i=e(21956);const o=m=>{const{initialFilter:u="all",columns:h,actions:g}=m;return r.createElement(f.j,null,r.createElement(t.Content,null,r.createElement(t.ContentHeader,{title:""},r.createElement(t.SupportButton,null,"Discover documentation in your ecosystem.")),r.createElement(l.EntityListProvider,null,r.createElement(l.CatalogFilterLayout,null,r.createElement(l.CatalogFilterLayout.Filters,null,r.createElement(E.f,null),r.createElement(l.UserListPicker,{initialFilter:u}),r.createElement(l.EntityOwnerPicker,null),r.createElement(l.EntityTagPicker,null)),r.createElement(l.CatalogFilterLayout.Content,null,r.createElement(i.EntityListDocsTable,{actions:g,columns:h}))))))}},51016:function(_,s,e){"use strict";e.d(s,{f:function(){return h}});var r=e(68725),t=e(97589),l=e(36964),f=e(9118),E=e(94339),i=e(16111),o=e(24579),m=e(14503),u=e(2784);const h=P=>{const{entities:x}=P,T=(0,l.useRouteRef)(r.Fw),X=(0,l.useApi)(l.configApiRef);return x?u.createElement(f.ItemCardGrid,{"data-testid":"docs-explore"},x!=null&&x.length?x.map((F,b)=>{var D,Z;return u.createElement(E.Z,{key:b},u.createElement(i.Z,null,u.createElement(f.ItemCardHeader,{title:(D=F.metadata.title)!=null?D:F.metadata.name})),u.createElement(o.Z,null,F.metadata.description),u.createElement(m.Z,null,u.createElement(f.Button,{to:T({namespace:(0,t.D)((Z=F.metadata.namespace)!=null?Z:"default",X),kind:(0,t.D)(F.kind,X),name:(0,t.D)(F.metadata.name,X)}),color:"primary","data-testid":"read_docs"},"Read Docs")))}):null):null};var g=e(53479);const R=()=>{const{loading:P,error:x,entities:T}=useEntityList();return x?React.createElement(WarningPanel,{severity:"error",title:"Could not load available documentation."},React.createElement(CodeSnippet,{language:"text",text:x.toString()})):P||!T?React.createElement(Progress,null):(T.sort((X,F)=>{var b,D;return((b=X.metadata.title)!=null?b:X.metadata.name).localeCompare((D=F.metadata.title)!=null?D:F.metadata.name)}),React.createElement(DocsCardGrid,{entities:T}))}},81290:function(_,s,e){"use strict";e.d(s,{H:function(){return g}});var r=e(2784),t=e(95074),l=e(36964),f=e(48023),E=e(53479),i=e(68725),o=e(9118),m=e(98095),u=e(3792),h=e(97589);const g=R=>{const{entities:P,title:x,loading:T,columns:X,actions:F}=R,[,b]=(0,t.Z)(),D=(0,l.useRouteRef)(i.Fw),Z=(0,l.useApi)(l.configApiRef);if(!P)return null;const M=P.map(pe=>{var Ue;const Me=(0,E.getEntityRelations)(pe,f.S4);return{entity:pe,resolved:{docsUrl:D({namespace:(0,h.D)((Ue=pe.metadata.namespace)!=null?Ue:"default",Z),kind:(0,h.D)(pe.kind,Z),name:(0,h.D)(pe.metadata.name,Z)}),ownedByRelations:Me,ownedByRelationsTitle:Me.map(de=>(0,E.humanizeEntityRef)(de,{defaultKind:"group"})).join(", ")}}}),K=[u.N.createNameColumn(),u.N.createOwnerColumn(),u.N.createTypeColumn()],ae=[m.n.createCopyDocsUrlAction(b)];return r.createElement(r.Fragment,null,T||M&&M.length>0?r.createElement(o.Table,{isLoading:T,options:{paging:!0,pageSize:20,search:!0,actionsColumnIndex:-1},data:M,columns:X||K,actions:F||ae,title:x?`${x} (${M.length})`:`All (${M.length})`}):r.createElement(o.EmptyState,{missing:"data",title:"No documents to show",description:"Create your own document. Check out our Getting Started Information",action:r.createElement(o.Button,{color:"primary",to:"https://backstage.io/docs/features/techdocs/getting-started",variant:"contained"},"DOCS")}))};g.columns=u.N,g.actions=m.n},12481:function(_,s,e){"use strict";e.d(s,{n:function(){return h}});var r=e(2784),t=e(95074),l=e(76635),f=e.n(l),E=e(9118),i=e(53479),o=e(81290),m=e(98095),u=e(3792);const h=g=>{var ae,pe;const{columns:R,actions:P}=g,{loading:x,error:T,entities:X,filters:F}=(0,i.useEntityList)(),{isStarredEntity:b,toggleStarredEntity:D}=(0,i.useStarredEntities)(),[,Z]=(0,t.Z)(),M=(0,l.capitalize)((pe=(ae=F.user)==null?void 0:ae.value)!=null?pe:"all"),K=[m.n.createCopyDocsUrlAction(Z),m.n.createStarEntityAction(b,D)];return T?r.createElement(E.WarningPanel,{severity:"error",title:"Could not load available documentation."},r.createElement(E.CodeSnippet,{language:"text",text:T.toString()})):r.createElement(o.H,{title:M,entities:X,loading:x,actions:P||K,columns:R})};h.columns=u.N,h.actions=m.n},98095:function(_,s,e){"use strict";e.d(s,{n:function(){return o}});var r=e(2784),t=e(39981),l=e(2337),f=e(11640),E=e(28347);const i=(0,l.Z)({root:{color:"#f3ba37"}})(f.Z),o={createCopyDocsUrlAction(m){return u=>({icon:()=>r.createElement(t.Z,{fontSize:"small"}),tooltip:"Click to copy documentation link to clipboard",onClick:()=>m(`${window.location.origin}${u.resolved.docsUrl}`)})},createStarEntityAction(m,u){return({entity:h})=>{const g=m(h);return{cellStyle:{paddingLeft:"1em"},icon:()=>g?r.createElement(i,null):r.createElement(E.Z,null),tooltip:g?"Remove from favorites":"Add to favorites",onClick:()=>u(h)}}}}},3792:function(_,s,e){"use strict";e.d(s,{N:function(){return E}});var r=e(2784),t=e(9118),l=e(53479);function f(i){return i.metadata.title||i.metadata.name}const E={createNameColumn(){return{title:"Document",field:"entity.metadata.name",highlight:!0,render:i=>r.createElement(t.SubvalueCell,{value:r.createElement(t.Link,{to:i.resolved.docsUrl},f(i.entity)),subvalue:i.entity.metadata.description})}},createOwnerColumn(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:i})=>r.createElement(l.EntityRefLinks,{entityRefs:i.ownedByRelations,defaultKind:"group"})}},createTypeColumn(){return{title:"Type",field:"entity.spec.type"}}}},21956:function(_,s,e){"use strict";e.d(s,{DocsTable:function(){return t.H},EntityListDocsTable:function(){return r.n}});var r=e(12481),t=e(81290),l=e(72580),f=e.n(l);e.o(l,"DefaultTechDocsHome")&&e.d(s,{DefaultTechDocsHome:function(){return l.DefaultTechDocsHome}})},72580:function(){},50021:function(_,s,e){"use strict";e.r(s),e.d(s,{TechDocsIndexPage:function(){return f}});var r=e(2784),t=e(10289),l=e(2546);const f=()=>(0,t.pC)()||r.createElement(l.u,null)},1114:function(_,s,e){"use strict";e.d(s,{j:function(){return f}});var r=e(2784),t=e(9118),l=e(36964);const f=E=>{var u;const{children:i}=E,m=`Documentation available in ${(u=(0,l.useApi)(l.configApiRef).getOptionalString("organization.name"))!=null?u:"Backstage"}`;return r.createElement(t.PageWithHeader,{title:"Documentation",subtitle:m,themeId:"documentation"},i)}},70335:function(_,s,e){"use strict";e.d(s,{f:function(){return f}});var r=e(2784),t=e(53479);class l{getCatalogFilters(){return{"metadata.annotations.backstage.io/techdocs-ref":t.CATALOG_FILTER_EXISTS}}}const f=()=>{const{updateFilters:E}=(0,t.useEntityList)();return(0,r.useEffect)(()=>{E({techdocs:new l})},[E]),null}},19192:function(_,s,e){"use strict";e.d(s,{DefaultTechDocsHome:function(){return l.u}});var r=e(51016),t=e(21956),l=e(2546),f=e(1114),E=e(70335)},82250:function(_,s,e){"use strict";e.d(s,{DefaultTechDocsHome:function(){return o.DefaultTechDocsHome},Reader:function(){return E.Ej},TechDocsIndexPage:function(){return m.Jl},TechDocsReaderPage:function(){return m.I6},TechDocsReaderPageHeader:function(){return E.SE},plugin:function(){return m.s4},techdocsApiRef:function(){return l.g},techdocsStorageApiRef:function(){return l.D}});var r=e(98157),t=e.n(r);e.o(r,"DefaultTechDocsHome")&&e.d(s,{DefaultTechDocsHome:function(){return r.DefaultTechDocsHome}}),e.o(r,"Reader")&&e.d(s,{Reader:function(){return r.Reader}}),e.o(r,"TechDocsReaderPageHeader")&&e.d(s,{TechDocsReaderPageHeader:function(){return r.TechDocsReaderPageHeader}}),e.o(r,"techdocsApiRef")&&e.d(s,{techdocsApiRef:function(){return r.techdocsApiRef}}),e.o(r,"techdocsStorageApiRef")&&e.d(s,{techdocsStorageApiRef:function(){return r.techdocsStorageApiRef}});var l=e(3337),f=e(42723),E=e(96393),i=e(93566),o=e(19192),m=e(20961),u=e(94067)},20961:function(_,s,e){"use strict";e.d(s,{I6:function(){return h},Jl:function(){return u},s4:function(){return E}});var r=e(3337),t=e(42723),l=e(68725),f=e(36964);const E=(0,f.createPlugin)({id:"techdocs",apis:[(0,f.createApiFactory)({api:r.D,deps:{configApi:f.configApiRef,discoveryApi:f.discoveryApiRef,identityApi:f.identityApiRef,fetchApi:f.fetchApiRef},factory:({configApi:g,discoveryApi:R,identityApi:P,fetchApi:x})=>new t.k({configApi:g,discoveryApi:R,identityApi:P,fetchApi:x})}),(0,f.createApiFactory)({api:r.g,deps:{configApi:f.configApiRef,discoveryApi:f.discoveryApiRef,fetchApi:f.fetchApiRef},factory:({configApi:g,discoveryApi:R,fetchApi:P})=>new t.p({configApi:g,discoveryApi:R,fetchApi:P})})],routes:{root:l._Z,docRoot:l.Fw,entityContent:l.pd}}),i=E.provide((0,f.createRoutableExtension)({name:"TechdocsPage",component:()=>Promise.resolve().then(e.bind(e,94067)).then(g=>g.Router),mountPoint:l._Z})),o=E.provide((0,f.createRoutableExtension)({name:"EntityTechdocsContent",component:()=>Promise.resolve().then(e.bind(e,94067)).then(g=>g.EmbeddedDocsRouter),mountPoint:l.pd})),m=E.provide((0,f.createRoutableExtension)({name:"TechDocsCustomHome",component:()=>e.e(7110).then(e.bind(e,57110)).then(g=>g.TechDocsCustomHome),mountPoint:l._Z})),u=E.provide((0,f.createRoutableExtension)({name:"TechDocsIndexPage",component:()=>Promise.resolve().then(e.bind(e,50021)).then(g=>g.TechDocsIndexPage),mountPoint:l._Z})),h=E.provide((0,f.createRoutableExtension)({name:"TechDocsReaderPage",component:()=>Promise.resolve().then(e.bind(e,75733)).then(g=>g.TechDocsReaderPage),mountPoint:l.Fw}))},53242:function(_,s,e){"use strict";e.d(s,{Ej:function(){return at},DK:function(){return se}});var r=e(2784),t=e(10289),l=e(79692),f=e(60364),E=e(41128),i=e(60905),o=e(36964),m=e(36356),u=e(9118),h=e(3337);const g=(te,Y,z)=>{const ie=te==="src"&&Y.endsWith(".svg"),Te=!Y.match(/^([a-z]*:)?\/\//i),Oe=Y.startsWith(z);return ie&&(Te||Oe)},R=({techdocsStorageApi:te,entityId:Y,path:z})=>async ie=>{const Te=await te.getApiOrigin(),Oe=async(ve,De)=>{for(const vt of ve)if(vt.hasAttribute(De)){const Lt=vt.getAttribute(De);if(!Lt)return;const $=await te.getBaseUrl(Lt,Y,z);if(g(De,Lt,Te))try{const V=await(await fetch($,{credentials:"include"})).text();vt.setAttribute(De,`data:image/svg+xml;base64,${btoa(V)}`)}catch{vt.setAttribute("alt",`Error: ${Lt}`)}else vt.setAttribute(De,$)}};return await Promise.all([Oe(ie.querySelectorAll("img"),"src"),Oe(ie.querySelectorAll("script"),"src"),Oe(ie.querySelectorAll("source"),"src"),Oe(ie.querySelectorAll("link"),"href"),Oe(ie.querySelectorAll("a[download]"),"href")]),ie};var P=e(86574),x=e(67097),T=e(47093),X=e(82717),F=e.n(X);const b=te=>Y=>{const z=Y.querySelector('[title="Edit this page"]');if(!z||!z.href)return Y;const ie=new URL(z.href),Te=te.byUrl(ie);if((Te==null?void 0:Te.type)!=="github"&&(Te==null?void 0:Te.type)!=="gitlab")return Y;const Oe=Y.querySelector("article>h1").childNodes[0].textContent,ve=encodeURIComponent(`Documentation Feedback: ${Oe}`),De=encodeURIComponent(`Page source:
|
|
32
|
+
${z.href}
|
|
33
33
|
|
|
34
|
-
Feedback:`),vt=(Te==null?void 0:Te.type)==="github"?(0,
|
|
34
|
+
Feedback:`),vt=(Te==null?void 0:Te.type)==="github"?(0,P.Pb)(ie.href,"blob"):ie.href,Lt=F()(vt),$=`/${Lt.organization}/${Lt.name}`,C=z.cloneNode();switch(Te==null?void 0:Te.type){case"gitlab":C.href=`${ie.origin}${$}/issues/new?issue[title]=${ve}&issue[description]=${De}`;break;case"github":C.href=`${ie.origin}${$}/issues/new?title=${ve}&body=${De}`;break;default:return Y}return T.render(r.createElement(x.Z),C),C.style.paddingLeft="5px",C.title="Leave feedback for this page",C.id="git-feedback-link",z==null||z.insertAdjacentElement("beforebegin",C),Y};var D=e(44882);const Z=()=>te=>{const Y=te.querySelector('.md-header label[for="__drawer"]'),z=te.querySelector("article");if(!Y||!z)return te;const ie=Y.cloneNode();return T.render(r.createElement(D.Z),ie),ie.id="toggle-sidebar",ie.title="Toggle Sidebar",ie.classList.add("md-content__button"),ie.style.setProperty("padding","0 0 0 5px"),ie.style.setProperty("margin","0.4rem 0 0.4rem 0.4rem"),z==null||z.prepend(ie),te},M=()=>te=>(((z,ie)=>{Array.from(z).filter(Te=>Te.hasAttribute(ie)).forEach(Te=>{const Oe=Te.getAttribute(ie);if(Oe){Oe.match(/^https?:\/\//i)&&Te.setAttribute("target","_blank");try{const ve=K(window.location.href);Te.setAttribute(ie,new URL(Oe,ve).toString())}catch{Te.replaceWith(Te.textContent||Oe)}}})})(Array.from(te.getElementsByTagName("a")),"href"),te);function K(te){const Y=new URL(te);return!Y.pathname.endsWith("/")&&!Y.pathname.endsWith(".html")&&(Y.pathname+="/"),Y.toString()}const ae=({baseUrl:te,onClick:Y})=>z=>(Array.from(z.getElementsByTagName("a")).forEach(ie=>{ie.addEventListener("click",Te=>{const ve=ie.getAttribute("href");!ve||ve.startsWith(te)&&!ie.hasAttribute("download")&&(Te.preventDefault(),Y(Te,ve))})}),z);var pe=e(15459),Me=e(80030),Ue=e(72379),de=e(41547);const je=(0,pe.Z)(te=>({tooltip:{fontSize:"inherit",color:te.palette.text.primary,margin:0,padding:te.spacing(.5),backgroundColor:"transparent",boxShadow:"none"}}))(Me.ZP),_e=()=>r.createElement(Ue.Z,null,r.createElement("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"})),Qe=({text:te})=>{const[Y,z]=(0,r.useState)(!1),ie=(0,r.useCallback)(()=>{navigator.clipboard.writeText(te),z(!0)},[te]),Te=(0,r.useCallback)(()=>{z(!1)},[z]);return r.createElement(je,{title:"Copied to clipboard",placement:"left",open:Y,onClose:Te,leaveDelay:1e3},r.createElement("button",{className:"md-clipboard md-icon",onClick:ie},r.createElement(_e,null)))},rt=te=>Y=>{var ie;const z=Y.querySelectorAll("pre > code");for(const Te of z){const Oe=Te.textContent||"",ve=document.createElement("div");(ie=Te==null?void 0:Te.parentElement)==null||ie.prepend(ve),T.render(r.createElement(de.Z,{theme:te},r.createElement(Qe,{text:Oe})),ve)}return Y},ot=()=>te=>{var Y;return(Y=te.querySelector(".md-header"))==null||Y.remove(),te},gt=()=>te=>{var Y,z;return(Y=te.querySelector(".md-footer .md-copyright"))==null||Y.remove(),(z=te.querySelector(".md-footer-copyright"))==null||z.remove(),te},Le=({docStorageUrl:te,onLoading:Y,onLoaded:z})=>ie=>{const Te=Array.from(ie.querySelectorAll('head > link[rel="stylesheet"]')).filter(ve=>{var De;return(De=ve.getAttribute("href"))==null?void 0:De.startsWith(te)});let Oe=Te.length;return Oe>0&&Y(ie),Te.forEach(ve=>ve.addEventListener("load",()=>{Oe-=1,Oe===0&&z(ie)})),ie};var Xe=e(35368),Ye=e.n(Xe);const Rt=/main\.[A-Fa-f0-9]{8}\.min\.css$/,pt=/^https:\/\/fonts\.googleapis\.com/,St=/^https:\/\/fonts\.gstatic\.com/,lt=te=>{if(te.nodeName&&te.nodeName==="LINK"){const Y=te.getAttribute("href")||"";Y.match(Rt)&&te.setAttribute("rel","stylesheet"),Y.match(pt)&&te.setAttribute("rel","stylesheet"),Y.match(St)&&te.setAttribute("rel","preconnect")}return te},yt=te=>Y=>{if(Y.nodeName==="IFRAME"){const z=Y.getAttribute("src");if(!z)return Y.remove(),Y;try{const ie=new URL(z);te.some(Oe=>ie.host===Oe)||Y.remove()}catch(ie){console.warn(`Invalid iframe src, ${ie}`),Y.remove()}}return Y},bt=te=>{const Y=(te==null?void 0:te.getOptionalStringArray("allowedIframeHosts"))||[];return z=>{Ye().addHook("afterSanitizeAttributes",lt);const ie=["link"];return Y.length>0&&(Ye().addHook("beforeSanitizeElements",yt(Y)),ie.push("iframe")),Ye().sanitize(z.innerHTML,{ADD_TAGS:ie,FORBID_TAGS:["style"],WHOLE_DOCUMENT:!0,RETURN_DOM:!0})}},Tt=({css:te})=>Y=>(Y.getElementsByTagName("head")[0].insertAdjacentHTML("beforeend",`<style>${te}</style>`),Y),Mt=()=>te=>(setTimeout(()=>{var Y;if(window.location.hash){const z=window.location.hash.slice(1);(Y=te==null?void 0:te.querySelector(`[id="${z}"]`))==null||Y.scrollIntoView()}},200),te),Bt=async(te,Y)=>{let z;if(typeof te=="string")z=new DOMParser().parseFromString(te,"text/html").documentElement;else if(te instanceof Element)z=te;else throw new Error("dom is not a recognized type");for(const ie of Y)z=await ie(z);return z};var It=e(93566),ze=e(23738),ct=e(64279),ke=e(77446);function Ct({contentLoading:te,content:Y,activeSyncState:z}){return te||z==="BUILD_READY_RELOAD"||!Y&&z==="CHECKING"?"CHECKING":!Y&&z==="BUILDING"?"INITIAL_BUILD":Y?z==="BUILDING"?"CONTENT_STALE_REFRESHING":z==="BUILD_READY"?"CONTENT_STALE_READY":z==="ERROR"?"CONTENT_STALE_ERROR":"CONTENT_FRESH":"CONTENT_NOT_FOUND"}function ut(te,Y){const z={...te};switch(Y.type){case"sync":Y.state==="CHECKING"&&(z.buildLog=[]),z.activeSyncState=Y.state,z.syncError=Y.syncError;break;case"contentLoading":z.contentLoading=!0,z.contentError=void 0;break;case"content":typeof Y.path=="string"&&(z.path=Y.path),z.contentLoading=!1,z.content=Y.content,z.contentError=Y.contentError;break;case"buildLog":z.buildLog=z.buildLog.concat(Y.log);break;default:throw new Error}return["BUILD_READY","BUILD_READY_RELOAD"].includes(z.activeSyncState)&&["contentLoading","content"].includes(Y.type)&&(z.activeSyncState="UP_TO_DATE",z.buildLog=[]),z}function Et(te,Y,z,ie){var $,C;const[Te,Oe]=(0,r.useReducer)(ut,{activeSyncState:"CHECKING",path:ie,contentLoading:!0,buildLog:[]}),ve=(0,o.useApi)(h.D),{retry:De}=(0,ke.Z)(async()=>{Oe({type:"contentLoading"});try{const V=await ve.getEntityDocs({kind:te,namespace:Y,name:z},ie);return Oe({type:"content",content:V,path:ie}),V}catch(V){Oe({type:"content",contentError:V,path:ie})}},[ve,te,Y,z,ie]),vt=(0,r.useRef)({content:void 0,reload:()=>{}});return vt.current={content:Te.content,reload:De},(0,ct.default)(async()=>{Oe({type:"sync",state:"CHECKING"});const V=setTimeout(()=>{Oe({type:"sync",state:"BUILDING"})},1e3);try{switch(await ve.syncEntityDocs({kind:te,namespace:Y,name:z},ge=>{Oe({type:"buildLog",log:ge})})){case"updated":vt.current.content?Oe({type:"sync",state:"BUILD_READY"}):(vt.current.reload(),Oe({type:"sync",state:"BUILD_READY_RELOAD"}));break;case"cached":Oe({type:"sync",state:"UP_TO_DATE"});break;default:Oe({type:"sync",state:"ERROR",syncError:new Error("Unexpected return state")});break}}catch(ue){Oe({type:"sync",state:"ERROR",syncError:ue})}finally{clearTimeout(V)}},[te,z,Y,ve,Oe,vt]),{state:(0,r.useMemo)(()=>Ct({activeSyncState:Te.activeSyncState,contentLoading:Te.contentLoading,content:Te.content}),[Te.activeSyncState,Te.content,Te.contentLoading]),contentReload:De,path:Te.path,content:Te.content,contentErrorMessage:($=Te.contentError)==null?void 0:$.toString(),syncErrorMessage:(C=Te.syncError)==null?void 0:C.toString(),buildLog:Te.buildLog}}const q=(0,l.Z)(te=>({searchBar:{maxWidth:"calc(100% - 16rem * 2 - 2.4rem)",marginTop:0,marginBottom:te.spacing(1),marginLeft:"calc(16rem + 1.2rem)","@media screen and (max-width: 76.1875em)":{marginLeft:"0",maxWidth:"100%"}}})),N=(0,r.createContext)({}),ne=({children:te,entityRef:Y})=>{const{"*":z}=(0,t.UO)(),{kind:ie,namespace:Te,name:Oe}=Y,ve=Et(ie,Te,Oe,z);return r.createElement(N.Provider,{value:ve},te)},ce=(te,Y)=>z=>React.createElement(ne,{entityRef:Y},React.createElement(te,{...z})),se=()=>(0,r.useContext)(N),Ee=["h1","h2","h3","h4","h5","h6"],Ze=te=>{const Y=(0,t.s0)(),z=(0,f.Z)(),ie=(0,o.useApi)(h.D),Te=(0,o.useApi)(m.q3),Oe=(0,o.useApi)(o.configApiRef),{namespace:ve="",kind:De="",name:vt=""}=te,{state:Lt,path:$,content:C}=se(),V=z.palette.type==="dark",[ue,ge]=(0,r.useState)(),[me,Se]=(0,r.useState)(null),{isPinned:et}=(0,r.useContext)(u.SidebarPinStateContext),st=(0,r.useCallback)(()=>{if(!me||!ue)return;const it=me.querySelector(".md-container > .md-tabs"),we=window.matchMedia("screen and (max-width: 76.1875em)").matches,w=Math.max(me.getBoundingClientRect().top,0);ue.forEach(y=>{we?y.style.top="0px":it?y.style.top=`${w+it.getBoundingClientRect().height}px`:y.style.top=`${w}px`})},[me,ue]);(0,r.useEffect)(()=>(st(),window.addEventListener("scroll",st,!0),window.addEventListener("resize",st),()=>{window.removeEventListener("scroll",st,!0),window.removeEventListener("resize",st)}),[st,Lt]);const Ve=(0,r.useCallback)(()=>{if(!me)return;const it=me.querySelector(".md-footer");it&&(it.style.width=`${me.getBoundingClientRect().width}px`)},[me]);(0,r.useEffect)(()=>(Ve(),window.addEventListener("resize",Ve),()=>{window.removeEventListener("resize",Ve)}));const Je=(0,r.useCallback)((it,we)=>Bt(it,[bt(Oe.getOptionalConfig("techdocs.sanitizer")),R({techdocsStorageApi:ie,entityId:{kind:De,name:vt,namespace:ve},path:we}),M(),Z(),ot(),gt(),b(Te),Tt({css:`
|
|
35
35
|
/*
|
|
36
36
|
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.
|
|
37
37
|
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.
|
|
38
38
|
*/
|
|
39
39
|
:host {
|
|
40
40
|
/* FONT */
|
|
41
|
-
--md-default-fg-color: ${
|
|
42
|
-
--md-default-fg-color--light: ${
|
|
43
|
-
--md-default-fg-color--lighter: ${(0,E.$n)(
|
|
44
|
-
--md-default-fg-color--lightest: ${(0,E.$n)(
|
|
41
|
+
--md-default-fg-color: ${z.palette.text.primary};
|
|
42
|
+
--md-default-fg-color--light: ${z.palette.text.secondary};
|
|
43
|
+
--md-default-fg-color--lighter: ${(0,E.$n)(z.palette.text.secondary,.7)};
|
|
44
|
+
--md-default-fg-color--lightest: ${(0,E.$n)(z.palette.text.secondary,.3)};
|
|
45
45
|
|
|
46
46
|
/* BACKGROUND */
|
|
47
|
-
--md-default-bg-color:${
|
|
48
|
-
--md-default-bg-color--light: ${
|
|
49
|
-
--md-default-bg-color--lighter: ${(0,E.$n)(
|
|
50
|
-
--md-default-bg-color--lightest: ${(0,E.$n)(
|
|
47
|
+
--md-default-bg-color:${z.palette.background.default};
|
|
48
|
+
--md-default-bg-color--light: ${z.palette.background.paper};
|
|
49
|
+
--md-default-bg-color--lighter: ${(0,E.$n)(z.palette.background.paper,.7)};
|
|
50
|
+
--md-default-bg-color--lightest: ${(0,E.$n)(z.palette.background.paper,.3)};
|
|
51
51
|
|
|
52
52
|
/* PRIMARY */
|
|
53
|
-
--md-primary-fg-color: ${
|
|
54
|
-
--md-primary-fg-color--light: ${
|
|
55
|
-
--md-primary-fg-color--dark: ${
|
|
56
|
-
--md-primary-bg-color: ${
|
|
57
|
-
--md-primary-bg-color--light: ${(0,E.$n)(
|
|
53
|
+
--md-primary-fg-color: ${z.palette.primary.main};
|
|
54
|
+
--md-primary-fg-color--light: ${z.palette.primary.light};
|
|
55
|
+
--md-primary-fg-color--dark: ${z.palette.primary.dark};
|
|
56
|
+
--md-primary-bg-color: ${z.palette.primary.contrastText};
|
|
57
|
+
--md-primary-bg-color--light: ${(0,E.$n)(z.palette.primary.contrastText,.7)};
|
|
58
58
|
|
|
59
59
|
/* ACCENT */
|
|
60
60
|
--md-accent-fg-color: var(--md-primary-fg-color);
|
|
61
61
|
|
|
62
62
|
/* SHADOW */
|
|
63
|
-
--md-shadow-z1: ${
|
|
64
|
-
--md-shadow-z2: ${
|
|
65
|
-
--md-shadow-z3: ${
|
|
63
|
+
--md-shadow-z1: ${z.shadows[1]};
|
|
64
|
+
--md-shadow-z2: ${z.shadows[2]};
|
|
65
|
+
--md-shadow-z3: ${z.shadows[3]};
|
|
66
66
|
|
|
67
67
|
/* EXTENSIONS */
|
|
68
68
|
--md-admonition-fg-color: var(--md-default-fg-color);
|
|
@@ -98,13 +98,13 @@ Feedback:`),vt=(Te==null?void 0:Te.type)==="github"?(0,C.Pb)(ie.href,"blob"):ie.
|
|
|
98
98
|
|
|
99
99
|
:host > * {
|
|
100
100
|
/* CODE */
|
|
101
|
-
--md-code-fg-color: ${
|
|
102
|
-
--md-code-bg-color: ${
|
|
103
|
-
--md-code-hl-color: ${(0,E.Fq)(
|
|
104
|
-
--md-code-hl-keyword-color: ${
|
|
105
|
-
--md-code-hl-function-color: ${
|
|
106
|
-
--md-code-hl-string-color: ${
|
|
107
|
-
--md-code-hl-number-color: ${
|
|
101
|
+
--md-code-fg-color: ${z.palette.text.primary};
|
|
102
|
+
--md-code-bg-color: ${z.palette.background.paper};
|
|
103
|
+
--md-code-hl-color: ${(0,E.Fq)(z.palette.warning.main,.5)};
|
|
104
|
+
--md-code-hl-keyword-color: ${V?z.palette.primary.light:z.palette.primary.dark};
|
|
105
|
+
--md-code-hl-function-color: ${V?z.palette.secondary.light:z.palette.secondary.dark};
|
|
106
|
+
--md-code-hl-string-color: ${V?z.palette.success.light:z.palette.success.dark};
|
|
107
|
+
--md-code-hl-number-color: ${V?z.palette.error.light:z.palette.error.dark};
|
|
108
108
|
--md-code-hl-constant-color: var(--md-code-hl-function-color);
|
|
109
109
|
--md-code-hl-special-color: var(--md-code-hl-function-color);
|
|
110
110
|
--md-code-hl-name-color: var(--md-code-fg-color);
|
|
@@ -118,10 +118,10 @@ Feedback:`),vt=(Te==null?void 0:Te.type)==="github"?(0,C.Pb)(ie.href,"blob"):ie.
|
|
|
118
118
|
--md-typeset-font-size: 1rem;
|
|
119
119
|
--md-typeset-color: var(--md-default-fg-color);
|
|
120
120
|
--md-typeset-a-color: var(--md-accent-fg-color);
|
|
121
|
-
--md-typeset-table-color: ${
|
|
122
|
-
--md-typeset-del-color: ${
|
|
123
|
-
--md-typeset-ins-color: ${
|
|
124
|
-
--md-typeset-mark-color: ${
|
|
121
|
+
--md-typeset-table-color: ${z.palette.text.primary};
|
|
122
|
+
--md-typeset-del-color: ${V?(0,E.Fq)(z.palette.error.dark,.5):(0,E.Fq)(z.palette.error.light,.5)};
|
|
123
|
+
--md-typeset-ins-color: ${V?(0,E.Fq)(z.palette.success.dark,.5):(0,E.Fq)(z.palette.success.light,.5)};
|
|
124
|
+
--md-typeset-mark-color: ${V?(0,E.Fq)(z.palette.warning.dark,.5):(0,E.Fq)(z.palette.warning.light,.5)};
|
|
125
125
|
}
|
|
126
126
|
|
|
127
127
|
@media screen and (max-width: 76.1875em) {
|
|
@@ -137,15 +137,15 @@ Feedback:`),vt=(Te==null?void 0:Te.type)==="github"?(0,C.Pb)(ie.href,"blob"):ie.
|
|
|
137
137
|
--md-typeset-font-size: .7rem;
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
|
-
`}),
|
|
140
|
+
`}),Tt({css:`
|
|
141
141
|
body {
|
|
142
142
|
--md-text-color: var(--md-default-fg-color);
|
|
143
143
|
--md-text-link-color: var(--md-accent-fg-color);
|
|
144
|
-
--md-text-font-family: ${
|
|
144
|
+
--md-text-font-family: ${z.typography.fontFamily};
|
|
145
145
|
font-family: var(--md-text-font-family);
|
|
146
146
|
background-color: unset;
|
|
147
147
|
}
|
|
148
|
-
`}),
|
|
148
|
+
`}),Tt({css:`
|
|
149
149
|
.md-grid {
|
|
150
150
|
max-width: 100%;
|
|
151
151
|
margin: 0;
|
|
@@ -162,7 +162,7 @@ Feedback:`),vt=(Te==null?void 0:Te.type)==="github"?(0,C.Pb)(ie.href,"blob"):ie.
|
|
|
162
162
|
.md-nav__icon {
|
|
163
163
|
height: 20px !important;
|
|
164
164
|
width: 20px !important;
|
|
165
|
-
margin-left:${
|
|
165
|
+
margin-left:${z.spacing(1)}px;
|
|
166
166
|
}
|
|
167
167
|
.md-nav__icon svg {
|
|
168
168
|
margin: 0;
|
|
@@ -210,7 +210,7 @@ Feedback:`),vt=(Te==null?void 0:Te.type)==="github"?(0,C.Pb)(ie.href,"blob"):ie.
|
|
|
210
210
|
background: rgb(125, 125, 125);
|
|
211
211
|
}
|
|
212
212
|
.md-sidebar--secondary {
|
|
213
|
-
right: ${
|
|
213
|
+
right: ${z.spacing(3)}px;
|
|
214
214
|
}
|
|
215
215
|
.md-sidebar__scrollwrap {
|
|
216
216
|
overflow: unset !important;
|
|
@@ -295,7 +295,7 @@ Feedback:`),vt=(Te==null?void 0:Te.type)==="github"?(0,C.Pb)(ie.href,"blob"):ie.
|
|
|
295
295
|
.md-sidebar--primary {
|
|
296
296
|
width: 16rem !important;
|
|
297
297
|
z-index: 200;
|
|
298
|
-
left: ${
|
|
298
|
+
left: ${et?`calc(-16rem + ${u.sidebarConfig.drawerWidthOpen}px)`:`calc(-16rem + ${u.sidebarConfig.drawerWidthClosed}px)`} !important;
|
|
299
299
|
}
|
|
300
300
|
.md-sidebar--secondary:not([hidden]) {
|
|
301
301
|
display: none;
|
|
@@ -345,17 +345,17 @@ Feedback:`),vt=(Te==null?void 0:Te.type)==="github"?(0,C.Pb)(ie.href,"blob"):ie.
|
|
|
345
345
|
bottom: ${u.sidebarConfig.mobileSidebarHeight}px;
|
|
346
346
|
}
|
|
347
347
|
}
|
|
348
|
-
`}),
|
|
348
|
+
`}),Tt({css:`
|
|
349
349
|
.md-typeset {
|
|
350
350
|
font-size: var(--md-typeset-font-size);
|
|
351
351
|
}
|
|
352
352
|
|
|
353
|
-
${
|
|
353
|
+
${Ee.reduce((w,y)=>{const I=z.typography[y],{lineHeight:H,fontFamily:Q,fontWeight:xe,fontSize:Ae}=I,Ie=He=>{let ft=1;return typeof He=="number"&&(ft=He/16*.6),typeof He=="string"&&(ft=He.replace("rem","")),`calc(${ft} * var(--md-typeset-font-size))`};return w.concat(`
|
|
354
354
|
.md-typeset ${y} {
|
|
355
355
|
color: var(--md-default-fg-color);
|
|
356
356
|
line-height: ${H};
|
|
357
|
-
font-family: ${
|
|
358
|
-
font-weight: ${
|
|
357
|
+
font-family: ${Q};
|
|
358
|
+
font-weight: ${xe};
|
|
359
359
|
font-size: ${Ie(Ae)};
|
|
360
360
|
}
|
|
361
361
|
`)},"")}
|
|
@@ -365,7 +365,7 @@ Feedback:`),vt=(Te==null?void 0:Te.type)==="github"?(0,C.Pb)(ie.href,"blob"):ie.
|
|
|
365
365
|
}
|
|
366
366
|
|
|
367
367
|
.md-typeset hr {
|
|
368
|
-
border-bottom: 0.05rem dotted ${
|
|
368
|
+
border-bottom: 0.05rem dotted ${z.palette.divider};
|
|
369
369
|
}
|
|
370
370
|
|
|
371
371
|
.md-typeset details {
|
|
@@ -409,7 +409,7 @@ Feedback:`),vt=(Te==null?void 0:Te.type)==="github"?(0,C.Pb)(ie.href,"blob"):ie.
|
|
|
409
409
|
.md-typeset pre > code::-webkit-scrollbar-thumb:hover {
|
|
410
410
|
background-color: hsla(0, 0%, 0%, 0.87);
|
|
411
411
|
}
|
|
412
|
-
`}),
|
|
412
|
+
`}),Tt({css:`
|
|
413
413
|
/*
|
|
414
414
|
Disable CSS animations on link colors as they lead to issues in dark mode.
|
|
415
415
|
The dark mode color theme is applied later and theirfore there is always an animation from light to dark mode when navigation between pages.
|
|
@@ -417,23 +417,23 @@ Feedback:`),vt=(Te==null?void 0:Te.type)==="github"?(0,C.Pb)(ie.href,"blob"):ie.
|
|
|
417
417
|
.md-dialog, .md-nav__link, .md-footer__link, .md-typeset a, .md-typeset a::before, .md-typeset .headerlink {
|
|
418
418
|
transition: none;
|
|
419
419
|
}
|
|
420
|
-
`}),
|
|
420
|
+
`}),Tt({css:`
|
|
421
421
|
/* HIGHLIGHT */
|
|
422
422
|
.highlight .md-clipboard:after {
|
|
423
423
|
content: unset;
|
|
424
424
|
}
|
|
425
425
|
|
|
426
426
|
.highlight .nx {
|
|
427
|
-
color: ${
|
|
427
|
+
color: ${V?"#ff53a3":"#ec407a"};
|
|
428
428
|
}
|
|
429
429
|
|
|
430
430
|
/* CODE HILITE */
|
|
431
431
|
.codehilite .gd {
|
|
432
|
-
background-color: ${
|
|
432
|
+
background-color: ${V?"rgba(248,81,73,0.65)":"#fdd"};
|
|
433
433
|
}
|
|
434
434
|
|
|
435
435
|
.codehilite .gi {
|
|
436
|
-
background-color: ${
|
|
436
|
+
background-color: ${V?"rgba(46,160,67,0.65)":"#dfd"};
|
|
437
437
|
}
|
|
438
438
|
|
|
439
439
|
/* TABBED */
|
|
@@ -463,10 +463,10 @@ Feedback:`),vt=(Te==null?void 0:Te.type)==="github"?(0,C.Pb)(ie.href,"blob"):ie.
|
|
|
463
463
|
|
|
464
464
|
/* TASK-LIST */
|
|
465
465
|
.task-list-control .task-list-indicator::before {
|
|
466
|
-
background-color: ${
|
|
466
|
+
background-color: ${z.palette.action.disabledBackground};
|
|
467
467
|
}
|
|
468
468
|
.task-list-control [type="checkbox"]:checked + .task-list-indicator:before {
|
|
469
|
-
background-color: ${
|
|
469
|
+
background-color: ${z.palette.success.main};
|
|
470
470
|
}
|
|
471
471
|
|
|
472
472
|
/* ADMONITION */
|
|
@@ -483,7 +483,7 @@ Feedback:`),vt=(Te==null?void 0:Te.type)==="github"?(0,C.Pb)(ie.href,"blob"):ie.
|
|
|
483
483
|
height: 20px !important;
|
|
484
484
|
transform: translateY(-50%) !important;
|
|
485
485
|
}
|
|
486
|
-
`})]),[
|
|
487
|
-
`);return r.createElement(m.Z,{container:!0,direction:"column",className:oe.root,spacing:0,wrap:"nowrap"},r.createElement(m.Z,{item:!0,container:!0,justifyContent:"space-between",alignItems:"center",spacing:0,wrap:"nowrap"},r.createElement(u.Z,{variant:"h5"},"Build Details"),r.createElement(h.Z,{key:"dismiss",title:"Close the drawer",onClick:q,color:"inherit"},r.createElement(R.Z,null))),r.createElement(t.LogViewer,{text:ve,classes:{root:oe.logs}}))},b=({buildLog:W})=>{const q=C(),[oe,ve]=(0,r.useState)(!1);return r.createElement(r.Fragment,null,r.createElement(E.Z,{color:"inherit",onClick:()=>ve(!0)},"Show Build Logs"),r.createElement(g.ZP,{classes:{paper:q.paper},anchor:"right",open:oe,onClose:()=>ve(!1)},r.createElement(M,{buildLog:W,onClose:()=>ve(!1)})))};var Q=e(36964);const I=({errorMessage:W})=>{const q=(0,Q.useApi)(Q.configApiRef).getOptionalString("techdocs.builder");let oe="";return q!=="local"&&(oe="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."),r.createElement(t.ErrorPage,{status:"404",statusMessage:W||"Documentation not found",additionalInfo:oe})};var P=e(53242);const L=(0,l.Z)(W=>({root:{marginBottom:W.spacing(2)},message:{wordBreak:"break-word",overflowWrap:"anywhere"}})),z=()=>{let W=null;const q=L(),{state:oe,contentReload:ve,contentErrorMessage:Le,syncErrorMessage:we,buildLog:fe}=(0,P.DK)(),Ke=oe==="CHECKING"?r.createElement(t.Progress,null):null;return oe==="INITIAL_BUILD"&&(W=r.createElement(i.Z,{classes:{root:q.root},variant:"outlined",severity:"info",icon:r.createElement(f.Z,{size:"24px"}),action:r.createElement(b,{buildLog:fe})},"Documentation is accessed for the first time and is being prepared. The subsequent loads are much faster.")),oe==="CONTENT_STALE_REFRESHING"&&(W=r.createElement(i.Z,{variant:"outlined",severity:"info",icon:r.createElement(f.Z,{size:"24px"}),action:r.createElement(b,{buildLog:fe}),classes:{root:q.root}},"A newer version of this documentation is being prepared and will be available shortly.")),oe==="CONTENT_STALE_READY"&&(W=r.createElement(i.Z,{variant:"outlined",severity:"success",action:r.createElement(E.Z,{color:"inherit",onClick:()=>ve()},"Refresh"),classes:{root:q.root}},"A newer version of this documentation is now available, please refresh to view.")),oe==="CONTENT_STALE_ERROR"&&(W=r.createElement(i.Z,{variant:"outlined",severity:"error",action:r.createElement(b,{buildLog:fe}),classes:{root:q.root,message:q.message}},"Building a newer version of this documentation failed."," ",we)),oe==="CONTENT_NOT_FOUND"&&(W=r.createElement(r.Fragment,null,we&&r.createElement(i.Z,{variant:"outlined",severity:"error",action:r.createElement(b,{buildLog:fe}),classes:{root:q.root,message:q.message}},"Building a newer version of this documentation failed."," ",we),r.createElement(I,{errorMessage:Le}))),r.createElement(r.Fragment,null,Ke,W)}},96393:function(_,s,e){"use strict";e.d(s,{Ej:function(){return r.Ej},SE:function(){return t.S}});var r=e(53242),t=e(75505),l=e(23738)},68725:function(_,s,e){"use strict";e.d(s,{Fw:function(){return l},_Z:function(){return t},pd:function(){return f}});var r=e(36964);const t=(0,r.createRouteRef)({id:"techdocs:index-page"}),l=(0,r.createRouteRef)({id:"techdocs:reader-page",params:["namespace","kind","name"]}),f=(0,r.createRouteRef)({id:"techdocs:catalog-reader-view"})},93566:function(_,s,e){"use strict";e.d(s,{S:function(){return xt}});var r=e(2784),t=e(79692),l=e(49378),f=e(38402),E=e(85256),i=e(9118),o=e(15277),m=e.n(o);const u=(0,t.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",marginBottom:"1rem"}}),h=B=>{const{result:S,lineClamp:j=5,asListItem:ue=!0,asLink:ge=!0,title:me}=B,Se=u(),qe=()=>{var Je;return r.createElement(l.Z,{className:Se.itemText,primaryTypographyProps:{variant:"h6"},primary:me||`${S.title} | ${(Je=S.entityTitle)!=null?Je:S.name} docs`,secondary:r.createElement(m(),{line:j,truncateText:"\u2026",text:S.text,element:"span"})})},ot=({children:Je})=>ge?r.createElement(i.Link,{to:S.location},Je):r.createElement(r.Fragment,null,Je),Ve=({children:Je})=>ue?r.createElement(r.Fragment,null,r.createElement(f.Z,{alignItems:"flex-start",className:Se.flexContainer},Je),r.createElement(E.Z,{component:"li"})):r.createElement(r.Fragment,null,Je);return r.createElement(ot,null,r.createElement(Ve,null,r.createElement(qe,null)))};var g=e(91512);const R=(0,t.Z)(B=>({filters:{width:"250px",display:"flex"},icon:{margin:B.spacing(-1,0,0,0)}})),C=({numberOfSelectedFilters:B,handleToggleFilters:S})=>{const j=R();return React.createElement("div",{className:j.filters},React.createElement(IconButton,{className:j.icon,"aria-label":"settings",onClick:S},React.createElement(FilterListIcon,null)),React.createElement(Typography,{variant:"h6"},"Filters (",B||0,")"))},M=(0,t.Z)(B=>({filters:{background:"transparent",boxShadow:"0px 0px 0px 0px"},checkbox:{padding:B.spacing(0,1,0,1)},dropdown:{width:"100%"}})),b=({filters:B,filterOptions:S,resetFilters:j,updateSelected:ue,updateChecked:ge})=>{const me=M();return React.createElement(Card,{className:me.filters},React.createElement(CardHeader,{title:React.createElement(Typography,{variant:"h6"},"Filters"),action:React.createElement(Button,{color:"primary",onClick:()=>j()},"CLEAR ALL")}),React.createElement(Divider,null),S.kind.length===0&&S.lifecycle.length===0&&React.createElement(CardContent,null,React.createElement(Typography,{variant:"subtitle2"},"Filters cannot be applied to available results")),S.kind.length>0&&React.createElement(CardContent,null,React.createElement(Typography,{variant:"subtitle2"},"Kind"),React.createElement(Select,{id:"outlined-select",onChange:Se=>{var qe;return ue((qe=Se==null?void 0:Se.target)==null?void 0:qe.value)},variant:"outlined",className:me.dropdown,value:B.selected},S.kind.map(Se=>React.createElement(MenuItem,{selected:Se==="",dense:!0,key:Se,value:Se},Se)))),S.lifecycle.length>0&&React.createElement(CardContent,null,React.createElement(Typography,{variant:"subtitle2"},"Lifecycle"),React.createElement(List,{disablePadding:!0,dense:!0},S.lifecycle.map(Se=>React.createElement(ListItem,{key:Se,dense:!0,button:!0,onClick:()=>ge(Se)},React.createElement(Checkbox,{edge:"start",disableRipple:!0,className:me.checkbox,color:"primary",checked:B.checked.includes(Se),tabIndex:-1,value:Se,name:Se}),React.createElement(ListItemText,{id:Se,primary:Se}))))))};var Q=e(1795),I=e(22313),P=e(42494),L=e(84899),z=e(5806),W=e(21324),q=e(56939),oe=e(73698),ve=e(12231),Le=e(86619),we=e(7089),fe=e(88013),Ke=e(69294),_e=e(48760);const ut=(B,S,j=[],ue=250)=>{const ge=(0,r.useRef)({}),me=B||(()=>Promise.resolve([])),[Se,qe]=(0,Ke.default)(me,[S],{loading:!0});if((0,_e.Z)(()=>{ge.current[S]===void 0&&(ge.current[S]=qe(S).then(Ve=>(ge.current[S]=Ve,Ve)))},ue,[qe,S]),j.length)return{loading:!1,value:j};const ot=ge.current[S];return Array.isArray(ot)?{loading:!1,value:ot}:Se},rt=(B,S)=>{const{setFilters:j}=(0,I.Rx)();(0,r.useEffect)(()=>{S&&[S].flat().length>0&&j(ue=>({...ue,[B]:S}))},[])},at=B=>{const{className:S,defaultValue:j,name:ue,values:ge,valuesDebounceMs:me,label:Se,filterSelectedOptions:qe,limitTags:ot,multiple:Ve}=B,[Je,ht]=(0,r.useState)("");rt(ue,j);const st=typeof ge=="function"?ge:void 0,Ue=typeof ge=="function"?void 0:ge,{value:N,loading:y}=ut(st,Je,Ue,me),{filters:x,setFilters:H}=(0,I.Rx)(),k=x[ue]||(Ve?[]:null),Oe=(He,ft)=>{H(Ht=>{const{[ue]:qt,...Mn}=Ht;return ft?{...Mn,[ue]:ft}:{...Mn}})},Ae=He=>r.createElement(Le.Z,{...He,name:"search",variant:"outlined",label:Se,fullWidth:!0}),Ie=(He,ft)=>He.map((Ht,qt)=>r.createElement(we.Z,{label:Ht,color:"primary",...ft({index:qt})}));return r.createElement(fe.ZP,{filterSelectedOptions:qe,limitTags:ot,multiple:Ve,className:S,id:`${Ve?"multi-":""}select-filter-${ue}--select`,options:N||[],loading:y,value:k,onChange:Oe,onInputChange:(He,ft)=>ht(ft),renderInput:Ae,renderTags:Ie})},gt=(0,t.Z)({label:{textTransform:"capitalize"}}),xe=B=>{const{className:S,defaultValue:j,label:ue,name:ge,values:me=[],valuesDebounceMs:Se}=B,qe=gt(),{filters:ot,setFilters:Ve}=(0,I.Rx)();rt(ge,j);const Je=typeof me=="function"?me:void 0,ht=typeof me=="function"?void 0:me,{value:st=[],loading:Ue}=ut(Je,"",ht,Se),N=y=>{const{target:{value:x,checked:H}}=y;Ve(k=>{const{[ge]:Oe,...Ae}=k,Ie=(Oe||[]).filter(ft=>ft!==x),He=H?[...Ie,x]:Ie;return He.length?{...Ae,[ge]:He}:Ae})};return r.createElement(P.Z,{className:S,disabled:Ue,fullWidth:!0,"data-testid":"search-checkboxfilter-next"},ue?r.createElement(L.Z,{className:qe.label},ue):null,st.map(y=>{var x;return r.createElement(z.Z,{key:y,control:r.createElement(W.Z,{color:"primary",tabIndex:-1,inputProps:{"aria-labelledby":y},value:y,name:y,onChange:N,checked:((x=ot[ge])!=null?x:[]).includes(y)}),label:y})}))},Qe=B=>{const{className:S,defaultValue:j,label:ue,name:ge,values:me,valuesDebounceMs:Se}=B,qe=gt();rt(ge,j);const ot=typeof me=="function"?me:void 0,Ve=typeof me=="function"?void 0:me,{value:Je=[],loading:ht}=ut(ot,"",Ve,Se),{filters:st,setFilters:Ue}=(0,I.Rx)(),N=y=>{const{target:{value:x}}=y;Ue(H=>{const{[ge]:k,...Oe}=H;return x?{...Oe,[ge]:x}:Oe})};return r.createElement(P.Z,{disabled:ht,className:S,variant:"filled",fullWidth:!0,"data-testid":"search-selectfilter-next"},ue?r.createElement(q.Z,{className:qe.label,margin:"dense"},ue):null,r.createElement(oe.Z,{variant:"outlined",value:st[ge]||"",onChange:N},r.createElement(ve.Z,{value:""},r.createElement("em",null,"All")),Je.map(y=>r.createElement(ve.Z,{key:y,value:y},y))))},Ye=({component:B,...S})=>r.createElement(B,{...S});Ye.Checkbox=B=>r.createElement(Ye,{...B,component:xe}),Ye.Select=B=>r.createElement(Ye,{...B,component:Qe}),Ye.Autocomplete=B=>r.createElement(Ye,{...B,component:at});const Rt=null;var pt=e(73032),St=e(3992),it=e(8542),yt=e(62155),It=e(94339),Pt=e(32552),Zt=e(24579),Bt=e(27616),Lt=e(8284),ze=e(70660),lt=e(11776),ke=e(86136),Ct=e(38016),ct=e(56881);const Et=(0,t.Z)(B=>({card:{backgroundColor:"rgba(0, 0, 0, .11)"},cardContent:{paddingTop:B.spacing(1)},icon:{color:B.palette.common.black},list:{width:"100%"},listItemIcon:{width:"24px",height:"24px"},accordion:{backgroundColor:B.palette.background.paper},accordionSummary:{minHeight:"auto","&.Mui-expanded":{minHeight:"auto"}},accordionSummaryContent:{margin:B.spacing(2,0),"&.Mui-expanded":{margin:B.spacing(2,0)}},accordionDetails:{padding:B.spacing(0,0,1)}})),X=B=>{const S=Et(),{setPageCursor:j,setTypes:ue,types:ge}=(0,I.Rx)(),[me,Se]=(0,r.useState)(!0),{defaultValue:qe,name:ot,types:Ve}=B,Je=()=>Se(N=>!N),ht=N=>()=>{ue(N!==""?[N]:[]),j(void 0),Se(!1)};(0,r.useEffect)(()=>{qe&&ue([qe])},[]);const st=[{value:"",name:"All",icon:r.createElement(ct.Z,null)},...Ve],Ue=ge[0]||"";return r.createElement(It.Z,{className:S.card},r.createElement(Pt.Z,{title:ot,titleTypographyProps:{variant:"overline"}}),r.createElement(Zt.Z,{className:S.cardContent},r.createElement(Bt.Z,{className:S.accordion,expanded:me,onChange:Je},r.createElement(Lt.Z,{classes:{root:S.accordionSummary,content:S.accordionSummaryContent},expandIcon:r.createElement(Ct.Z,{className:S.icon}),IconButtonProps:{size:"small"}},me?"Collapse":st.filter(N=>N.value===Ue)[0].name),r.createElement(ze.Z,{classes:{root:S.accordionDetails}},r.createElement(lt.Z,{className:S.list,component:"nav","aria-label":"filter by type",disablePadding:!0,dense:!0},st.map(N=>r.createElement(r.Fragment,{key:N.value},r.createElement(E.Z,null),r.createElement(f.Z,{selected:ge[0]===N.value||ge.length===0&&N.value==="",onClick:ht(N.value),button:!0},r.createElement(ke.Z,null,(0,r.cloneElement)(N.icon,{className:S.listItemIcon})),r.createElement(l.Z,{primary:N.name})))))))))};var Z=e(99152),ne=e(6487);const ce=(0,t.Z)(B=>({tabs:{borderBottom:`1px solid ${B.palette.textVerySubtle}`,padding:B.spacing(0,4)},tab:{height:"50px",fontWeight:B.typography.fontWeightBold,fontSize:B.typography.pxToRem(13),color:B.palette.textSubtle,minWidth:"130px"}})),se=B=>{const S=ce(),{setPageCursor:j,setTypes:ue,types:ge}=(0,I.Rx)(),{defaultValue:me,types:Se}=B,qe=(Ve,Je)=>{ue(Je!==""?[Je]:[]),j(void 0)};(0,r.useEffect)(()=>{me&&ue([me])},[]);const ot=[{value:"",name:"All"},...Se];return r.createElement(Z.Z,{className:S.tabs,indicatorColor:"primary",value:ge.length===0?"":ge[0],onChange:qe},ot.map(Ve=>r.createElement(ne.Z,{className:S.tab,disableRipple:!0,label:Ve.name,value:Ve.value})))},ye=(0,t.Z)(B=>({label:{textTransform:"capitalize"},chips:{display:"flex",flexWrap:"wrap",marginTop:B.spacing(1)},chip:{margin:2}})),Ze=B=>{const{className:S,defaultValue:j,name:ue,values:ge=[]}=B,me=ye(),{types:Se,setTypes:qe}=(0,I.Rx)();(0,yt.Z)(()=>{Se.length||(j&&Array.isArray(j)?qe(j):j&&qe([j]))});const ot=Ve=>{const Je=Ve.target.value;qe(Je)};return r.createElement(P.Z,{className:S,variant:"filled",fullWidth:!0,"data-testid":"search-typefilter-next"},r.createElement(q.Z,{className:me.label,margin:"dense"},ue),r.createElement(oe.Z,{multiple:!0,variant:"outlined",value:Se,onChange:ot,placeholder:"All Results",renderValue:Ve=>r.createElement("div",{className:me.chips},Ve.map(Je=>r.createElement(we.Z,{key:Je,label:Je,className:me.chip,size:"small"})))},ge.map(Ve=>r.createElement(ve.Z,{key:Ve,value:Ve},r.createElement(W.Z,{checked:Se.indexOf(Ve)>-1}),r.createElement(l.Z,{primary:Ve})))))};Ze.Accordion=B=>r.createElement(X,{...B}),Ze.Tabs=B=>r.createElement(se,{...B});var $e=e(19126),nt=e(20863),te=e(36964);const J=B=>{const S=useRouteRef(rootRouteRef),{focusContent:j}=useContent(),ue=useNavigate(),ge=useCallback(me=>{const Se=qs.stringify({query:me},{addQueryPrefix:!0});j(),ue(`${S()}${Se}`)},[j,ue,S]);return React.createElement(SidebarSearchField,{icon:B.icon,onSearch:ge,to:"/search"})};var U=e(50581),ie=e(61837),Te=e(4614),De=e(21853),Ee=e(10289);const Fe=(0,t.Z)({root:{width:"100%"}}),vt=B=>{const{entityId:S,debounceTime:j=150}=B,[ue,ge]=(0,r.useState)(!1),me=(0,Ee.s0)(),{term:Se,setTerm:qe,setFilters:ot,result:{loading:Ve,value:Je}}=(0,I.Rx)(),ht=Fe(),[st,Ue]=(0,r.useState)([]);(0,r.useEffect)(()=>{let Ie=!0;if(Ie&&Je){const He=Je.results.slice(0,10);Ue(He)}return()=>{Ie=!1}},[Ve,Je]);const[N,y]=(0,r.useState)(Se);(0,_e.Z)(()=>qe(N),j,[N]);const{kind:x,name:H,namespace:k}=S;(0,r.useEffect)(()=>{ot(Ie=>({...Ie,kind:x,namespace:k,name:H}))},[x,k,H,ot]);const Oe=Ie=>{ue||ge(!0),y(Ie.target.value)},Ae=(Ie,He)=>{if(He!=null&&He.document){const{location:ft}=He.document;me(ft)}};return r.createElement(fe.ZP,{classes:{root:ht.root},"data-testid":"techdocs-search-bar",size:"small",open:ue,getOptionLabel:()=>"",filterOptions:Ie=>Ie,onClose:()=>{ge(!1)},onFocus:()=>{ge(!0)},onChange:Ae,blurOnSelect:!0,noOptionsText:"No results found",value:null,options:st,renderOption:({document:Ie})=>r.createElement(h,{result:Ie,lineClamp:3,asListItem:!1,asLink:!1,title:Ie.title}),loading:Ve,renderInput:Ie=>r.createElement(Le.Z,{...Ie,"data-testid":"techdocs-search-bar-input",variant:"outlined",fullWidth:!0,placeholder:`Search ${S.name} docs`,value:N,onChange:Oe,InputProps:{...Ie.InputProps,startAdornment:r.createElement(U.Z,{position:"start"},r.createElement(ie.Z,{"aria-label":"Query",disabled:!0},r.createElement(De.Z,null))),endAdornment:r.createElement(r.Fragment,null,Ve?r.createElement(Te.Z,{color:"inherit",size:20}):null,Ie.InputProps.endAdornment)}})})},xt=B=>{const S={term:"",types:["techdocs"],pageCursor:"",filters:B.entityId};return r.createElement(I.Nd,{initialState:S},r.createElement(vt,{...B}))}},98157:function(){},19133:function(_,s,e){"use strict";_.exports=e.p+"static/createComponent.975d1e1e..svg"},86284:function(_,s,e){"use strict";_.exports=e.p+"static/missingAnnotation.67f79e98..svg"},3871:function(_,s,e){"use strict";_.exports=e.p+"static/noBuild.1715fa71..svg"},96465:function(_,s,e){"use strict";_.exports=e.p+"static/noInformation.4b426325..svg"},29788:function(_,s,e){"use strict";_.exports=e.p+"static/mic-drop.fe3ef4d0..svg"},53260:function(){}},function(_){var s=function(r){return _(_.s=r)};_.O(0,[2370,6202,9284,2126,7012,9035,4983,5218,4736],function(){return s(88649),s(46054)});var e=_.O()}]);})();
|
|
486
|
+
`})]),[De,vt,ve,Te,Oe,ie,z,V,et]),ht=(0,r.useCallback)(async it=>Bt(it,[Mt(),rt(z),ae({baseUrl:window.location.origin,onClick:(we,w)=>{var H,Q;const y=we.ctrlKey||we.metaKey,I=new URL(w);I.hash?y?window.open(`${I.pathname}${I.hash}`,"_blank"):(Y(`${I.pathname}${I.hash}`),(H=it==null?void 0:it.querySelector(`[id='${I.hash.slice(1)}']`))==null||H.scrollIntoView()):y?window.open(I.pathname,"_blank"):(Y(I.pathname),(Q=it==null?void 0:it.querySelector(".md-content__inner"))==null||Q.scrollIntoView())}}),Le({docStorageUrl:await ie.getApiOrigin(),onLoading:we=>{we.style.setProperty("opacity","0")},onLoaded:we=>{var w;we.style.removeProperty("opacity"),(w=we.querySelector(".md-nav__title"))==null||w.removeAttribute("for"),ge(Array.from(we.querySelectorAll(".md-sidebar")))}})]),[z,Y,ie]);return(0,r.useEffect)(()=>{if(!C)return()=>{};let it=!0;return Je(C,$).then(async we=>{if(!(we!=null&&we.innerHTML)||!it)return;window.scroll({top:0});const w=await ht(we);Se(w)}),()=>{it=!1}},[C,$,Je,ht]),me},$e=({entityRef:te,onReady:Y=()=>{},withSearch:z=!0})=>{var De,vt;const ie=q(),Te=Ze(te),Oe=(0,r.useRef)(null),ve=(0,r.useRef)(Y);return(0,r.useEffect)(()=>{ve.current=Y},[Y]),(0,r.useEffect)(()=>{if(!Te||!Oe.current)return;const Lt=Oe.current,$=Lt.shadowRoot||Lt.attachShadow({mode:"open"});Array.from($.children).forEach(C=>$.removeChild(C)),$.appendChild(Te),ve.current()},[Te]),r.createElement(r.Fragment,null,r.createElement(ze.N,null),z&&((vt=(De=Oe==null?void 0:Oe.current)==null?void 0:De.shadowRoot)==null?void 0:vt.innerHTML)&&r.createElement(i.Z,{container:!0,className:ie.searchBar},r.createElement(It.S,{entityId:te})),r.createElement("div",{"data-testid":"techdocs-content-shadowroot",ref:Oe}))},at=te=>{const{entityRef:Y,onReady:z=()=>{},withSearch:ie=!0}=te;return r.createElement(ne,{entityRef:Y},r.createElement($e,{entityRef:Y,onReady:z,withSearch:ie}))}},75733:function(_,s,e){"use strict";e.r(s),e.d(s,{TechDocsReaderPage:function(){return u}});var r=e(2784),t=e(10289),l=e(64279),f=e(53242),E=e(75505),i=e(3337),o=e(36964),m=e(9118);const u=h=>{const{children:g}=h,{NotFoundErrorPage:R}=(0,o.useApp)().getComponents(),P=(0,t.pC)(),[x,T]=(0,r.useState)(!1),{namespace:X,kind:F,name:b}=(0,t.UO)(),D=(0,o.useApi)(i.g),{value:Z}=(0,l.default)(()=>x?D.getTechDocsMetadata({kind:F,namespace:X,name:b}):Promise.resolve(void 0),[F,X,b,D,x]),{value:M,error:K}=(0,l.default)(()=>D.getEntityMetadata({kind:F,namespace:X,name:b}),[F,X,b,D]),ae=(0,r.useCallback)(()=>{T(!0)},[T]);return K?r.createElement(R,null):g?r.createElement(m.Page,{themeId:"documentation"},g instanceof Function?g({techdocsMetadataValue:Z,entityMetadataValue:M,entityRef:{kind:F,namespace:X,name:b},onReady:ae}):g):P||r.createElement(m.Page,{themeId:"documentation"},r.createElement(E.S,{techDocsMetadata:Z,entityMetadata:M,entityRef:{kind:F,namespace:X,name:b}}),r.createElement(m.Content,{"data-testid":"techdocs-content"},r.createElement(f.Ej,{onReady:ae,entityRef:{kind:F,namespace:X,name:b}})))}},75505:function(_,s,e){"use strict";e.d(s,{S:function(){return m}});var r=e(2784),t=e(73250),l=e(36964),f=e(9118),E=e(48023),i=e(53479),o=e(68725);const m=u=>{const{entityRef:h,entityMetadata:g,techDocsMetadata:R,children:P}=u,{name:x}=h,{site_name:T,site_description:X}=R||{},{locationMetadata:F,spec:b}=g||{},D=b==null?void 0:b.lifecycle,Z=g?(0,i.getEntityRelations)(g,E.S4):[],M=(0,l.useRouteRef)(o._Z)(),K=r.createElement(r.Fragment,null,r.createElement(f.HeaderLabel,{label:"Component",value:r.createElement(i.EntityRefLink,{color:"inherit",entityRef:h,defaultKind:"Component"})}),Z.length>0&&r.createElement(f.HeaderLabel,{label:"Owner",value:r.createElement(i.EntityRefLinks,{color:"inherit",entityRefs:Z,defaultKind:"group"})}),D?r.createElement(f.HeaderLabel,{label:"Lifecycle",value:D}):null,F&&F.type!=="dir"&&F.type!=="file"?r.createElement(f.HeaderLabel,{label:"",value:r.createElement("a",{href:F.target,target:"_blank",rel:"noopener noreferrer"},r.createElement(t.Z,{style:{marginTop:"-25px",fill:"#fff"}}))}):null);return r.createElement(f.Header,{title:T||".",pageTitleOverride:T||x,subtitle:X&&X!=="None"?X:"",type:"Docs",typeLink:M},K,P)}},23738:function(_,s,e){"use strict";e.d(s,{N:function(){return Z}});var r=e(2784),t=e(9118),l=e(79692),f=e(4614),E=e(77277),i=e(99688),o=e(12420),m=e(60905),u=e(90436),h=e(61837),g=e(4190),R=e(87685);const P=(0,l.Z)(M=>(0,o.Z)({paper:{width:"100%",[M.breakpoints.up("sm")]:{width:"75%"},[M.breakpoints.up("md")]:{width:"50%"},padding:M.spacing(2.5)},root:{height:"100%",overflow:"hidden"},logs:{background:M.palette.background.default}})),x=({buildLog:M,onClose:K})=>{const ae=P(),pe=M.length===0?"Waiting for logs...":M.join(`
|
|
487
|
+
`);return r.createElement(m.Z,{container:!0,direction:"column",className:ae.root,spacing:0,wrap:"nowrap"},r.createElement(m.Z,{item:!0,container:!0,justifyContent:"space-between",alignItems:"center",spacing:0,wrap:"nowrap"},r.createElement(u.Z,{variant:"h5"},"Build Details"),r.createElement(h.Z,{key:"dismiss",title:"Close the drawer",onClick:K,color:"inherit"},r.createElement(R.Z,null))),r.createElement(t.LogViewer,{text:pe,classes:{root:ae.logs}}))},T=({buildLog:M})=>{const K=P(),[ae,pe]=(0,r.useState)(!1);return r.createElement(r.Fragment,null,r.createElement(E.Z,{color:"inherit",onClick:()=>pe(!0)},"Show Build Logs"),r.createElement(g.ZP,{classes:{paper:K.paper},anchor:"right",open:ae,onClose:()=>pe(!1)},r.createElement(x,{buildLog:M,onClose:()=>pe(!1)})))};var X=e(36964);const F=({errorMessage:M})=>{const K=(0,X.useApi)(X.configApiRef).getOptionalString("techdocs.builder");let ae="";return K!=="local"&&(ae="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."),r.createElement(t.ErrorPage,{status:"404",statusMessage:M||"Documentation not found",additionalInfo:ae})};var b=e(53242);const D=(0,l.Z)(M=>({root:{marginBottom:M.spacing(2)},message:{wordBreak:"break-word",overflowWrap:"anywhere"}})),Z=()=>{let M=null;const K=D(),{state:ae,contentReload:pe,contentErrorMessage:Me,syncErrorMessage:Ue,buildLog:de}=(0,b.DK)(),je=ae==="CHECKING"?r.createElement(t.Progress,null):null;return ae==="INITIAL_BUILD"&&(M=r.createElement(i.Z,{classes:{root:K.root},variant:"outlined",severity:"info",icon:r.createElement(f.Z,{size:"24px"}),action:r.createElement(T,{buildLog:de})},"Documentation is accessed for the first time and is being prepared. The subsequent loads are much faster.")),ae==="CONTENT_STALE_REFRESHING"&&(M=r.createElement(i.Z,{variant:"outlined",severity:"info",icon:r.createElement(f.Z,{size:"24px"}),action:r.createElement(T,{buildLog:de}),classes:{root:K.root}},"A newer version of this documentation is being prepared and will be available shortly.")),ae==="CONTENT_STALE_READY"&&(M=r.createElement(i.Z,{variant:"outlined",severity:"success",action:r.createElement(E.Z,{color:"inherit",onClick:()=>pe()},"Refresh"),classes:{root:K.root}},"A newer version of this documentation is now available, please refresh to view.")),ae==="CONTENT_STALE_ERROR"&&(M=r.createElement(i.Z,{variant:"outlined",severity:"error",action:r.createElement(T,{buildLog:de}),classes:{root:K.root,message:K.message}},"Building a newer version of this documentation failed."," ",Ue)),ae==="CONTENT_NOT_FOUND"&&(M=r.createElement(r.Fragment,null,Ue&&r.createElement(i.Z,{variant:"outlined",severity:"error",action:r.createElement(T,{buildLog:de}),classes:{root:K.root,message:K.message}},"Building a newer version of this documentation failed."," ",Ue),r.createElement(F,{errorMessage:Me}))),r.createElement(r.Fragment,null,je,M)}},96393:function(_,s,e){"use strict";e.d(s,{Ej:function(){return r.Ej},SE:function(){return t.S}});var r=e(53242),t=e(75505),l=e(23738)},68725:function(_,s,e){"use strict";e.d(s,{Fw:function(){return l},_Z:function(){return t},pd:function(){return f}});var r=e(36964);const t=(0,r.createRouteRef)({id:"techdocs:index-page"}),l=(0,r.createRouteRef)({id:"techdocs:reader-page",params:["namespace","kind","name"]}),f=(0,r.createRouteRef)({id:"techdocs:catalog-reader-view"})},93566:function(_,s,e){"use strict";e.d(s,{S:function(){return Lt}});var r=e(2784),t=e(79692),l=e(49378),f=e(38402),E=e(85256),i=e(9118),o=e(15277),m=e.n(o);const u=(0,t.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",marginBottom:"1rem"}}),h=$=>{const{result:C,lineClamp:V=5,asListItem:ue=!0,asLink:ge=!0,title:me}=$,Se=u(),et=()=>{var Je;return r.createElement(l.Z,{className:Se.itemText,primaryTypographyProps:{variant:"h6"},primary:me||`${C.title} | ${(Je=C.entityTitle)!=null?Je:C.name} docs`,secondary:r.createElement(m(),{line:V,truncateText:"\u2026",text:C.text,element:"span"})})},st=({children:Je})=>ge?r.createElement(i.Link,{to:C.location},Je):r.createElement(r.Fragment,null,Je),Ve=({children:Je})=>ue?r.createElement(r.Fragment,null,r.createElement(f.Z,{alignItems:"flex-start",className:Se.flexContainer},Je),r.createElement(E.Z,{component:"li"})):r.createElement(r.Fragment,null,Je);return r.createElement(st,null,r.createElement(Ve,null,r.createElement(et,null)))};var g=e(91512);const R=(0,t.Z)($=>({filters:{width:"250px",display:"flex"},icon:{margin:$.spacing(-1,0,0,0)}})),P=({numberOfSelectedFilters:$,handleToggleFilters:C})=>{const V=R();return React.createElement("div",{className:V.filters},React.createElement(IconButton,{className:V.icon,"aria-label":"settings",onClick:C},React.createElement(FilterListIcon,null)),React.createElement(Typography,{variant:"h6"},"Filters (",$||0,")"))},x=(0,t.Z)($=>({filters:{background:"transparent",boxShadow:"0px 0px 0px 0px"},checkbox:{padding:$.spacing(0,1,0,1)},dropdown:{width:"100%"}})),T=({filters:$,filterOptions:C,resetFilters:V,updateSelected:ue,updateChecked:ge})=>{const me=x();return React.createElement(Card,{className:me.filters},React.createElement(CardHeader,{title:React.createElement(Typography,{variant:"h6"},"Filters"),action:React.createElement(Button,{color:"primary",onClick:()=>V()},"CLEAR ALL")}),React.createElement(Divider,null),C.kind.length===0&&C.lifecycle.length===0&&React.createElement(CardContent,null,React.createElement(Typography,{variant:"subtitle2"},"Filters cannot be applied to available results")),C.kind.length>0&&React.createElement(CardContent,null,React.createElement(Typography,{variant:"subtitle2"},"Kind"),React.createElement(Select,{id:"outlined-select",onChange:Se=>{var et;return ue((et=Se==null?void 0:Se.target)==null?void 0:et.value)},variant:"outlined",className:me.dropdown,value:$.selected},C.kind.map(Se=>React.createElement(MenuItem,{selected:Se==="",dense:!0,key:Se,value:Se},Se)))),C.lifecycle.length>0&&React.createElement(CardContent,null,React.createElement(Typography,{variant:"subtitle2"},"Lifecycle"),React.createElement(List,{disablePadding:!0,dense:!0},C.lifecycle.map(Se=>React.createElement(ListItem,{key:Se,dense:!0,button:!0,onClick:()=>ge(Se)},React.createElement(Checkbox,{edge:"start",disableRipple:!0,className:me.checkbox,color:"primary",checked:$.checked.includes(Se),tabIndex:-1,value:Se,name:Se}),React.createElement(ListItemText,{id:Se,primary:Se}))))))};var X=e(1795),F=e(22313),b=e(42494),D=e(84899),Z=e(5806),M=e(21324),K=e(56939),ae=e(73698),pe=e(12231),Me=e(86619),Ue=e(7089),de=e(88013),je=e(69294),_e=e(48760);const Qe=($,C,V=[],ue=250)=>{const ge=(0,r.useRef)({}),me=$||(()=>Promise.resolve([])),[Se,et]=(0,je.default)(me,[C],{loading:!0});if((0,_e.Z)(()=>{ge.current[C]===void 0&&(ge.current[C]=et(C).then(Ve=>(ge.current[C]=Ve,Ve)))},ue,[et,C]),V.length)return{loading:!1,value:V};const st=ge.current[C];return Array.isArray(st)?{loading:!1,value:st}:Se},rt=($,C)=>{const{setFilters:V}=(0,F.Rx)();(0,r.useEffect)(()=>{C&&[C].flat().length>0&&V(ue=>({...ue,[$]:C}))},[])},ot=$=>{const{className:C,defaultValue:V,name:ue,values:ge,valuesDebounceMs:me,label:Se,filterSelectedOptions:et,limitTags:st,multiple:Ve}=$,[Je,ht]=(0,r.useState)("");rt(ue,V);const it=typeof ge=="function"?ge:void 0,we=typeof ge=="function"?void 0:ge,{value:w,loading:y}=Qe(it,Je,we,me),{filters:I,setFilters:H}=(0,F.Rx)(),Q=I[ue]||(Ve?[]:null),xe=(He,ft)=>{H(Ht=>{const{[ue]:qt,...Mn}=Ht;return ft?{...Mn,[ue]:ft}:{...Mn}})},Ae=He=>r.createElement(Me.Z,{...He,name:"search",variant:"outlined",label:Se,fullWidth:!0}),Ie=(He,ft)=>He.map((Ht,qt)=>r.createElement(Ue.Z,{label:Ht,color:"primary",...ft({index:qt})}));return r.createElement(de.ZP,{filterSelectedOptions:et,limitTags:st,multiple:Ve,className:C,id:`${Ve?"multi-":""}select-filter-${ue}--select`,options:w||[],loading:y,value:Q,onChange:xe,onInputChange:(He,ft)=>ht(ft),renderInput:Ae,renderTags:Ie})},gt=(0,t.Z)({label:{textTransform:"capitalize"}}),Le=$=>{const{className:C,defaultValue:V,label:ue,name:ge,values:me=[],valuesDebounceMs:Se}=$,et=gt(),{filters:st,setFilters:Ve}=(0,F.Rx)();rt(ge,V);const Je=typeof me=="function"?me:void 0,ht=typeof me=="function"?void 0:me,{value:it=[],loading:we}=Qe(Je,"",ht,Se),w=y=>{const{target:{value:I,checked:H}}=y;Ve(Q=>{const{[ge]:xe,...Ae}=Q,Ie=(xe||[]).filter(ft=>ft!==I),He=H?[...Ie,I]:Ie;return He.length?{...Ae,[ge]:He}:Ae})};return r.createElement(b.Z,{className:C,disabled:we,fullWidth:!0,"data-testid":"search-checkboxfilter-next"},ue?r.createElement(D.Z,{className:et.label},ue):null,it.map(y=>{var I;return r.createElement(Z.Z,{key:y,control:r.createElement(M.Z,{color:"primary",tabIndex:-1,inputProps:{"aria-labelledby":y},value:y,name:y,onChange:w,checked:((I=st[ge])!=null?I:[]).includes(y)}),label:y})}))},Xe=$=>{const{className:C,defaultValue:V,label:ue,name:ge,values:me,valuesDebounceMs:Se}=$,et=gt();rt(ge,V);const st=typeof me=="function"?me:void 0,Ve=typeof me=="function"?void 0:me,{value:Je=[],loading:ht}=Qe(st,"",Ve,Se),{filters:it,setFilters:we}=(0,F.Rx)(),w=y=>{const{target:{value:I}}=y;we(H=>{const{[ge]:Q,...xe}=H;return I?{...xe,[ge]:I}:xe})};return r.createElement(b.Z,{disabled:ht,className:C,variant:"filled",fullWidth:!0,"data-testid":"search-selectfilter-next"},ue?r.createElement(K.Z,{className:et.label,margin:"dense"},ue):null,r.createElement(ae.Z,{variant:"outlined",value:it[ge]||"",onChange:w},r.createElement(pe.Z,{value:""},r.createElement("em",null,"All")),Je.map(y=>r.createElement(pe.Z,{key:y,value:y},y))))},Ye=({component:$,...C})=>r.createElement($,{...C});Ye.Checkbox=$=>r.createElement(Ye,{...$,component:Le}),Ye.Select=$=>r.createElement(Ye,{...$,component:Xe}),Ye.Autocomplete=$=>r.createElement(Ye,{...$,component:ot});const Rt=null;var pt=e(73032),St=e(3992),lt=e(8542),yt=e(62155),bt=e(94339),Tt=e(32552),Mt=e(24579),Bt=e(27616),It=e(8284),ze=e(70660),ct=e(11776),ke=e(86136),Ct=e(38016),ut=e(56881);const Et=(0,t.Z)($=>({card:{backgroundColor:"rgba(0, 0, 0, .11)"},cardContent:{paddingTop:$.spacing(1)},icon:{color:$.palette.common.black},list:{width:"100%"},listItemIcon:{width:"24px",height:"24px"},accordion:{backgroundColor:$.palette.background.paper},accordionSummary:{minHeight:"auto","&.Mui-expanded":{minHeight:"auto"}},accordionSummaryContent:{margin:$.spacing(2,0),"&.Mui-expanded":{margin:$.spacing(2,0)}},accordionDetails:{padding:$.spacing(0,0,1)}})),q=$=>{const C=Et(),{setPageCursor:V,setTypes:ue,types:ge}=(0,F.Rx)(),[me,Se]=(0,r.useState)(!0),{defaultValue:et,name:st,types:Ve}=$,Je=()=>Se(w=>!w),ht=w=>()=>{ue(w!==""?[w]:[]),V(void 0),Se(!1)};(0,r.useEffect)(()=>{et&&ue([et])},[]);const it=[{value:"",name:"All",icon:r.createElement(ut.Z,null)},...Ve],we=ge[0]||"";return r.createElement(bt.Z,{className:C.card},r.createElement(Tt.Z,{title:st,titleTypographyProps:{variant:"overline"}}),r.createElement(Mt.Z,{className:C.cardContent},r.createElement(Bt.Z,{className:C.accordion,expanded:me,onChange:Je},r.createElement(It.Z,{classes:{root:C.accordionSummary,content:C.accordionSummaryContent},expandIcon:r.createElement(Ct.Z,{className:C.icon}),IconButtonProps:{size:"small"}},me?"Collapse":it.filter(w=>w.value===we)[0].name),r.createElement(ze.Z,{classes:{root:C.accordionDetails}},r.createElement(ct.Z,{className:C.list,component:"nav","aria-label":"filter by type",disablePadding:!0,dense:!0},it.map(w=>r.createElement(r.Fragment,{key:w.value},r.createElement(E.Z,null),r.createElement(f.Z,{selected:ge[0]===w.value||ge.length===0&&w.value==="",onClick:ht(w.value),button:!0},r.createElement(ke.Z,null,(0,r.cloneElement)(w.icon,{className:C.listItemIcon})),r.createElement(l.Z,{primary:w.name})))))))))};var N=e(99152),ne=e(6487);const ce=(0,t.Z)($=>({tabs:{borderBottom:`1px solid ${$.palette.textVerySubtle}`,padding:$.spacing(0,4)},tab:{height:"50px",fontWeight:$.typography.fontWeightBold,fontSize:$.typography.pxToRem(13),color:$.palette.textSubtle,minWidth:"130px"}})),se=$=>{const C=ce(),{setPageCursor:V,setTypes:ue,types:ge}=(0,F.Rx)(),{defaultValue:me,types:Se}=$,et=(Ve,Je)=>{ue(Je!==""?[Je]:[]),V(void 0)};(0,r.useEffect)(()=>{me&&ue([me])},[]);const st=[{value:"",name:"All"},...Se];return r.createElement(N.Z,{className:C.tabs,indicatorColor:"primary",value:ge.length===0?"":ge[0],onChange:et},st.map(Ve=>r.createElement(ne.Z,{className:C.tab,disableRipple:!0,label:Ve.name,value:Ve.value})))},Ee=(0,t.Z)($=>({label:{textTransform:"capitalize"},chips:{display:"flex",flexWrap:"wrap",marginTop:$.spacing(1)},chip:{margin:2}})),Ze=$=>{const{className:C,defaultValue:V,name:ue,values:ge=[]}=$,me=Ee(),{types:Se,setTypes:et}=(0,F.Rx)();(0,yt.Z)(()=>{Se.length||(V&&Array.isArray(V)?et(V):V&&et([V]))});const st=Ve=>{const Je=Ve.target.value;et(Je)};return r.createElement(b.Z,{className:C,variant:"filled",fullWidth:!0,"data-testid":"search-typefilter-next"},r.createElement(K.Z,{className:me.label,margin:"dense"},ue),r.createElement(ae.Z,{multiple:!0,variant:"outlined",value:Se,onChange:st,placeholder:"All Results",renderValue:Ve=>r.createElement("div",{className:me.chips},Ve.map(Je=>r.createElement(Ue.Z,{key:Je,label:Je,className:me.chip,size:"small"})))},ge.map(Ve=>r.createElement(pe.Z,{key:Ve,value:Ve},r.createElement(M.Z,{checked:Se.indexOf(Ve)>-1}),r.createElement(l.Z,{primary:Ve})))))};Ze.Accordion=$=>r.createElement(q,{...$}),Ze.Tabs=$=>r.createElement(se,{...$});var $e=e(19126),at=e(20863),te=e(36964);const Y=$=>{const C=useRouteRef(rootRouteRef),{focusContent:V}=useContent(),ue=useNavigate(),ge=useCallback(me=>{const Se=qs.stringify({query:me},{addQueryPrefix:!0});V(),ue(`${C()}${Se}`)},[V,ue,C]);return React.createElement(SidebarSearchField,{icon:$.icon,onSearch:ge,to:"/search"})};var z=e(50581),ie=e(61837),Te=e(4614),Oe=e(21853),ve=e(10289);const De=(0,t.Z)({root:{width:"100%"}}),vt=$=>{const{entityId:C,debounceTime:V=150}=$,[ue,ge]=(0,r.useState)(!1),me=(0,ve.s0)(),{term:Se,setTerm:et,setFilters:st,result:{loading:Ve,value:Je}}=(0,F.Rx)(),ht=De(),[it,we]=(0,r.useState)([]);(0,r.useEffect)(()=>{let Ie=!0;if(Ie&&Je){const He=Je.results.slice(0,10);we(He)}return()=>{Ie=!1}},[Ve,Je]);const[w,y]=(0,r.useState)(Se);(0,_e.Z)(()=>et(w),V,[w]);const{kind:I,name:H,namespace:Q}=C;(0,r.useEffect)(()=>{st(Ie=>({...Ie,kind:I,namespace:Q,name:H}))},[I,Q,H,st]);const xe=Ie=>{ue||ge(!0),y(Ie.target.value)},Ae=(Ie,He)=>{if(He!=null&&He.document){const{location:ft}=He.document;me(ft)}};return r.createElement(de.ZP,{classes:{root:ht.root},"data-testid":"techdocs-search-bar",size:"small",open:ue,getOptionLabel:()=>"",filterOptions:Ie=>Ie,onClose:()=>{ge(!1)},onFocus:()=>{ge(!0)},onChange:Ae,blurOnSelect:!0,noOptionsText:"No results found",value:null,options:it,renderOption:({document:Ie})=>r.createElement(h,{result:Ie,lineClamp:3,asListItem:!1,asLink:!1,title:Ie.title}),loading:Ve,renderInput:Ie=>r.createElement(Me.Z,{...Ie,"data-testid":"techdocs-search-bar-input",variant:"outlined",fullWidth:!0,placeholder:`Search ${C.name} docs`,value:w,onChange:xe,InputProps:{...Ie.InputProps,startAdornment:r.createElement(z.Z,{position:"start"},r.createElement(ie.Z,{"aria-label":"Query",disabled:!0},r.createElement(Oe.Z,null))),endAdornment:r.createElement(r.Fragment,null,Ve?r.createElement(Te.Z,{color:"inherit",size:20}):null,Ie.InputProps.endAdornment)}})})},Lt=$=>{const C={term:"",types:["techdocs"],pageCursor:"",filters:$.entityId};return r.createElement(F.Nd,{initialState:C},r.createElement(vt,{...$}))}},98157:function(){},19133:function(_,s,e){"use strict";_.exports=e.p+"static/createComponent.975d1e1e..svg"},86284:function(_,s,e){"use strict";_.exports=e.p+"static/missingAnnotation.67f79e98..svg"},3871:function(_,s,e){"use strict";_.exports=e.p+"static/noBuild.1715fa71..svg"},96465:function(_,s,e){"use strict";_.exports=e.p+"static/noInformation.4b426325..svg"},29788:function(_,s,e){"use strict";_.exports=e.p+"static/mic-drop.fe3ef4d0..svg"},53260:function(){}},function(_){var s=function(r){return _(_.s=r)};_.O(0,[2370,6202,9284,2126,7012,9035,4983,5218,4736],function(){return s(88649),s(46054)});var e=_.O()}]);})();
|
|
488
488
|
|
|
489
|
-
//# sourceMappingURL=main.
|
|
489
|
+
//# sourceMappingURL=main.bae8d87a.js.map
|