@techdocs/cli 1.1.4-next.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/cjs/{mkdocs-1961b6ea.cjs.js → mkdocs-1501e940.cjs.js} +3 -2
  3. package/dist/cjs/{mkdocs-1961b6ea.cjs.js.map → mkdocs-1501e940.cjs.js.map} +1 -1
  4. package/dist/cjs/{mkdocsServer-f7081578.cjs.js → mkdocsServer-99ec8af2.cjs.js} +2 -1
  5. package/dist/cjs/mkdocsServer-99ec8af2.cjs.js.map +1 -0
  6. package/dist/cjs/{serve-0818dbae.cjs.js → serve-176119a3.cjs.js} +3 -2
  7. package/dist/cjs/{serve-0818dbae.cjs.js.map → serve-176119a3.cjs.js.map} +1 -1
  8. package/dist/embedded-app/index.html +1 -1
  9. package/dist/embedded-app/static/main.b21eb9fe.js +492 -0
  10. package/dist/embedded-app/static/main.b21eb9fe.js.map +1 -0
  11. package/dist/embedded-app/static/module-zod.206c7997.js +3 -0
  12. package/dist/embedded-app/static/module-zod.206c7997.js.map +1 -0
  13. package/dist/embedded-app/static/{runtime.77934963.js → runtime.b21eb9fe.js} +1 -1
  14. package/dist/embedded-app/static/{runtime.77934963.js.map → runtime.b21eb9fe.js.map} +1 -1
  15. package/dist/embedded-app/static/{vendor.77934963.js → vendor.b21eb9fe.js} +3 -3
  16. package/dist/embedded-app/static/vendor.b21eb9fe.js.map +1 -0
  17. package/dist/index.cjs.js +9 -3
  18. package/dist/index.cjs.js.map +1 -1
  19. package/package.json +6 -6
  20. package/dist/cjs/mkdocsServer-f7081578.cjs.js.map +0 -1
  21. package/dist/embedded-app/static/main.77934963.js +0 -487
  22. package/dist/embedded-app/static/main.77934963.js.map +0 -1
  23. package/dist/embedded-app/static/module-zod.fe17cc67.js +0 -3
  24. package/dist/embedded-app/static/module-zod.fe17cc67.js.map +0 -1
  25. package/dist/embedded-app/static/vendor.77934963.js.map +0 -1
@@ -1,487 +0,0 @@
1
- (()=>{var nl=Object.defineProperty;var rl=(ee,s,e)=>s in ee?nl(ee,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):ee[s]=e;var X=(ee,s,e)=>(rl(ee,typeof s!="symbol"?s+"":s,e),e),Ao=(ee,s,e)=>{if(!s.has(ee))throw TypeError("Cannot "+e)};var st=(ee,s,e)=>(Ao(ee,s,"read from private field"),e?e.call(ee):s.get(ee)),Mn=(ee,s,e)=>{if(s.has(ee))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(ee):s.set(ee,e)},zn=(ee,s,e,r)=>(Ao(ee,s,"write to private field"),r?r.call(ee,e):s.set(ee,e),e);(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[179],{30001:function(ee,s,e){"use strict";e.d(s,{n3:function(){return R},MS:function(){return c}});var r=e(48023),t=e(10179),d=e(96279),i=e.n(d);const R=Symbol.for("CATALOG_FILTER_EXISTS_0e15b590c0b343a2bae3e787e84c2111");class c{constructor(u){X(this,"discoveryApi");X(this,"fetchApi");this.discoveryApi=u.discoveryApi,this.fetchApi=u.fetchApi||{fetch:i()}}async getEntityAncestors(u,m){const{kind:y,namespace:g,name:E}=(0,r.of)(u.entityRef);return await this.requestRequired("GET",`/entities/by-name/${encodeURIComponent(y)}/${encodeURIComponent(g)}/${encodeURIComponent(E)}/ancestry`,m)}async getLocationById(u,m){return await this.requestOptional("GET",`/locations/${encodeURIComponent(u)}`,m)}async getEntities(u,m){const{filter:y=[],fields:g=[],offset:E,limit:S,after:b}=u!=null?u:{},x=[];for(const O of[y].flat()){const D=[];for(const[$,K]of Object.entries(O))for(const ne of[K].flat())ne===R?D.push(encodeURIComponent($)):typeof ne=="string"&&D.push(`${encodeURIComponent($)}=${encodeURIComponent(ne)}`);D.length&&x.push(`filter=${D.join(",")}`)}g.length&&x.push(`fields=${g.map(encodeURIComponent).join(",")}`),E!==void 0&&x.push(`offset=${E}`),S!==void 0&&x.push(`limit=${S}`),b!==void 0&&x.push(`after=${encodeURIComponent(b)}`);const w=x.length?`?${x.join("&")}`:"",B=await this.requestRequired("GET",`/entities${w}`,m),F=(O,D)=>{var ne,se;if(((ne=O.metadata)==null?void 0:ne.name)===void 0||O.kind===void 0||((se=D.metadata)==null?void 0:se.name)===void 0||D.kind===void 0)return 0;const $=(0,r.eE)(O),K=(0,r.eE)(D);return $<K?-1:$>K?1:0};return{items:B.sort(F)}}async getEntityByRef(u,m){const{kind:y,namespace:g,name:E}=(0,r.of)(u);return this.requestOptional("GET",`/entities/by-name/${encodeURIComponent(y)}/${encodeURIComponent(g)}/${encodeURIComponent(E)}`,m)}async getEntityByName(u,m){const{kind:y,namespace:g="default",name:E}=u;return this.requestOptional("GET",`/entities/by-name/${encodeURIComponent(y)}/${encodeURIComponent(g)}/${encodeURIComponent(E)}`,m)}async refreshEntity(u,m){const y=await this.fetchApi.fetch(`${await this.discoveryApi.getBaseUrl("catalog")}/refresh`,{headers:{"Content-Type":"application/json",...(m==null?void 0:m.token)&&{Authorization:`Bearer ${m==null?void 0:m.token}`}},method:"POST",body:JSON.stringify({entityRef:u})});if(y.status!==200)throw new Error(await y.text())}async getEntityFacets(u,m){const{filter:y=[],facets:g}=u,E=[];for(const b of[y].flat()){const x=[];for(const[w,B]of Object.entries(b))for(const F of[B].flat())F===R?x.push(encodeURIComponent(w)):typeof F=="string"&&x.push(`${encodeURIComponent(w)}=${encodeURIComponent(F)}`);x.length&&E.push(`filter=${x.join(",")}`)}for(const b of g)E.push(`facet=${encodeURIComponent(b)}`);const S=E.length?`?${E.join("&")}`:"";return await this.requestOptional("GET",`/entity-facets${S}`,m)}async addLocation({type:u="url",target:m,dryRun:y},g){const E=await this.fetchApi.fetch(`${await this.discoveryApi.getBaseUrl("catalog")}/locations${y?"?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:u,target:m})});if(E.status!==201)throw new Error(await E.text());const{location:S,entities:b,exists:x}=await E.json();if(!S)throw new Error(`Location wasn't added: ${m}`);return{location:S,entities:b,exists:x}}async getLocationByRef(u,m){return(await this.requestRequired("GET","/locations",m)).map(g=>g.data).find(g=>u===(0,r.NZ)(g))}async removeLocationById(u,m){await this.requestIgnored("DELETE",`/locations/${encodeURIComponent(u)}`,m)}async removeEntityByUid(u,m){await this.requestIgnored("DELETE",`/entities/by-uid/${encodeURIComponent(u)}`,m)}async requestIgnored(u,m,y){const g=`${await this.discoveryApi.getBaseUrl("catalog")}${m}`,E=y!=null&&y.token?{Authorization:`Bearer ${y.token}`}:{},S=await this.fetchApi.fetch(g,{method:u,headers:E});if(!S.ok)throw await t.VL.fromResponse(S)}async requestRequired(u,m,y){const g=`${await this.discoveryApi.getBaseUrl("catalog")}${m}`,E=y!=null&&y.token?{Authorization:`Bearer ${y.token}`}:{},S=await this.fetchApi.fetch(g,{method:u,headers:E});if(!S.ok)throw await t.VL.fromResponse(S);return await S.json()}async requestOptional(u,m,y){const g=`${await this.discoveryApi.getBaseUrl("catalog")}${m}`,E=y!=null&&y.token?{Authorization:`Bearer ${y.token}`}:{},S=await this.fetchApi.fetch(g,{method:u,headers:E});if(!S.ok){if(S.status===404)return;throw await t.VL.fromResponse(S)}return await S.json()}}},48023:function(ee,s,e){"use strict";e.d(s,{Tf:function(){return d},P1:function(){return Nt},q1:function(){return mn},M6:function(){return On},l2:function(){return t},zG:function(){return r},w$:function(){return be},nP:function(){return me},aS:function(){return St},S4:function(){return $e},cz:function(){return Et},iB:function(){return Tt},CV:function(){return nt},of:function(){return yt},Ou:function(){return Kt},eE:function(){return Pe},NZ:function(){return $t}});const r="default",t="backstage.io/view-url",d="backstage.io/edit-url",i="kubernetes.io/api-server",R="kubernetes.io/api-server-certificate-authority",c="kubernetes.io/auth-provider";var o=e(76635),u=e.n(o);class m{constructor(j=DEFAULT_NAMESPACE){X(this,"namespace");this.namespace=j}async enforce(j){return j.metadata.namespace?j:lodash.merge({metadata:{namespace:this.namespace}},j)}}class y{static isValidPrefixAndOrSuffix(j,ye,Ke,rt){if(typeof j!="string")return!1;const it=j.split(ye);return it.length===1?rt(it[0]):it.length===2?Ke(it[0])&&rt(it[1]):!1}static isJsonSafe(j){try{return u().isEqual(j,JSON.parse(JSON.stringify(j)))}catch{return!1}}static isValidDnsSubdomain(j){return typeof j=="string"&&j.length>=1&&j.length<=253&&j.split(".").every(y.isValidDnsLabel)}static isValidDnsLabel(j){return typeof j=="string"&&j.length>=1&&j.length<=63&&/^[a-z0-9]+(\-[a-z0-9]+)*$/.test(j)}static isValidTag(j){return typeof j=="string"&&j.length>=1&&j.length<=63&&/^[a-z0-9+#]+(\-[a-z0-9+#]+)*$/.test(j)}static isValidUrl(j){if(typeof j!="string")return!1;try{return new URL(j),!0}catch{return!1}}static isValidString(j){var ye;return typeof j=="string"&&((ye=j==null?void 0:j.trim())==null?void 0:ye.length)>=1}static isNonEmptyString(j){var ye;return typeof j=="string"&&((ye=j==null?void 0:j.trim())==null?void 0:ye.length)>=1}}var g=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}}}}}'),E=e(48231),S=e.n(E),b=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"}}}`),x=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},"type":{"type":"string","description":"An optional value to categorize links into specific groups.","examples":["runbook","documentation","logs","dashboard"],"minLength":1}}}}}}'),w=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"},"targetRef":{"type":"string","minLength":1,"description":"The entity ref of the target of this relation."}}},"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 B=new Map,F=[g,b,x,w];function O(ce){if(!(ce!=null&&ce.length))throw new TypeError("Unknown error");const j=ce[0];throw new TypeError(`${j.instancePath||"<root>"} ${j.message}${j.params?` - ${Object.entries(j.params).map(([ye,Ke])=>`${ye}: ${Ke}`).join(", ")}`:""}`)}function D(ce,j={}){var Qt;const ye=(Qt=j==null?void 0:j.disableCache)!=null?Qt:!1,Ke=ye?"":JSON.stringify(ce);if(!ye){const en=B.get(Ke);if(en)return en}const rt=$(ce),it=new(S())({allowUnionTypes:!0,allErrors:!0,validateSchema:!0});rt.length&&it.addSchema(rt,void 0,void 0,!0);const Rt=it.compile(ce);return ye||B.set(Ke,Rt),Rt}function $(ce){if(typeof ce!="object")return[];const j=new Set;ce.$id&&j.add(ce.$id);const ye=new Array,Ke=[ce];for(;Ke.length;){const rt=Ke.pop();for(const it of K(rt))if(!j.has(it)){j.add(it);const Rt=F.find(Qt=>Qt.$id===it);Rt&&(ye.push(Rt),Ke.push(Rt))}}return ye}function*K(ce){const j=[ce];for(;j.length;){const ye=j.pop();if(typeof ye=="object"&&ye)for(const[Ke,rt]of Object.entries(ye))Ke==="$ref"&&typeof rt=="string"?yield rt.split("#")[0]:j.push(rt)}}function ne(ce){const j=compileAjvSchema(ce||entityEnvelopeSchema);return ye=>{if(j(ye)===!0)return ye;throw throwAjvError(j.errors)}}function se(ce){const j=D(ce);return ye=>{var it;if(j(ye)===!0)return ye;const rt=(it=j.errors)==null?void 0:it.filter(Rt=>["/kind","/apiVersion"].includes(Rt.instancePath));if((rt==null?void 0:rt.length)&&rt.every(Rt=>Rt.keyword==="enum"))return!1;throw O(j.errors)}}function Ee(ce){const j=compileAjvSchema(ce||entitySchema);return ye=>{if(j(ye)===!0)return ye;throw throwAjvError(j.errors)}}class Ue{static isValidApiVersion(j){return y.isValidPrefixAndOrSuffix(j,"/",y.isValidDnsSubdomain,ye=>ye.length>=1&&ye.length<=63&&/^[a-z0-9A-Z]+$/.test(ye))}static isValidKind(j){return typeof j=="string"&&j.length>=1&&j.length<=63&&/^[a-zA-Z][a-z0-9A-Z]*$/.test(j)}static isValidObjectName(j){return typeof j=="string"&&j.length>=1&&j.length<=63&&/^([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$/.test(j)}static isValidNamespace(j){return y.isValidDnsLabel(j)}static isValidLabelKey(j){return y.isValidPrefixAndOrSuffix(j,"/",y.isValidDnsSubdomain,Ue.isValidObjectName)}static isValidLabelValue(j){return j===""||Ue.isValidObjectName(j)}static isValidAnnotationKey(j){return y.isValidPrefixAndOrSuffix(j,"/",y.isValidDnsSubdomain,Ue.isValidObjectName)}static isValidAnnotationValue(j){return typeof j=="string"}}const xe={isValidApiVersion:Ue.isValidApiVersion,isValidKind:Ue.isValidKind,isValidEntityName:Ue.isValidObjectName,isValidNamespace:Ue.isValidNamespace,isValidLabelKey:Ue.isValidLabelKey,isValidLabelValue:Ue.isValidLabelValue,isValidAnnotationKey:Ue.isValidAnnotationKey,isValidAnnotationValue:Ue.isValidAnnotationValue,isValidTag:ce=>typeof ce=="string"&&ce.length>=1&&ce.length<=63&&/^[a-z0-9:+#]+(\-[a-z0-9:+#]+)*$/.test(ce)};function We(ce={}){return{...xe,...ce}}class Re{constructor(j=makeValidator()){X(this,"validators");this.validators=j}async enforce(j){var Rt,Qt,en,tn,En,U,re;function ye(te,ve,Ne){if(ve==null)throw new Error(`${te} must have a value`);let ht;try{ht=Ne(ve)}catch(He){throw new Error(`${te} could not be validated, ${He}`)}if(!ht){let He;switch(Ne.name){case"isValidLabelValue":case"isValidObjectName":He="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":He="a valid prefix and/or suffix";break;case"isValidNamespace":case"isValidDnsLabel":He="a string that is sequences of [a-z0-9] separated by [-], at most 63 characters in total";break;case"isValidTag":He="a string that is sequences of [a-z0-9+#] separated by [-], at most 63 characters in total";break;case"isValidAnnotationValue":He="a string";break;case"isValidKind":He="a string that is a sequence of [a-zA-Z][a-z0-9A-Z], at most 63 characters in total";break;case"isValidUrl":He="a string that is a valid url";break;case"isValidString":case"isNonEmptyString":He="a non empty string";break;default:He=void 0;break}const Zt=He?` expected ${He} but found "${ve}".`:"";throw new Error(`"${te}" is not valid;${Zt} 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 Ke(te,ve,Ne){return ve===void 0||ye(te,ve,Ne)}ye("apiVersion",j.apiVersion,this.validators.isValidApiVersion),ye("kind",j.kind,this.validators.isValidKind),ye("metadata.name",j.metadata.name,this.validators.isValidEntityName),Ke("metadata.namespace",j.metadata.namespace,this.validators.isValidNamespace);for(const[te,ve]of Object.entries((Rt=j.metadata.labels)!=null?Rt:[]))ye(`labels.${te}`,te,this.validators.isValidLabelKey),ye(`labels.${te}`,ve,this.validators.isValidLabelValue);for(const[te,ve]of Object.entries((Qt=j.metadata.annotations)!=null?Qt:[]))ye(`annotations.${te}`,te,this.validators.isValidAnnotationKey),ye(`annotations.${te}`,ve,this.validators.isValidAnnotationValue);const rt=(en=j.metadata.tags)!=null?en:[];for(let te=0;te<rt.length;++te)ye(`tags.${te}`,rt[te],this.validators.isValidTag);const it=(tn=j.metadata.links)!=null?tn:[];for(let te=0;te<it.length;++te)ye(`links.${te}.url`,(En=it[te])==null?void 0:En.url,CommonValidatorFunctions.isValidUrl),Ke(`links.${te}.title`,(U=it[te])==null?void 0:U.title,CommonValidatorFunctions.isNonEmptyString),Ke(`links.${te}.icon`,(re=it[te])==null?void 0:re.icon,KubernetesValidatorFunctions.isValidObjectName);return j}}class Je{constructor(){X(this,"validate")}async enforce(j){if(!this.validate){const rt=new Ajv({allowUnionTypes:!0});this.validate=rt.addSchema([commonSchema,entityMetaSchema],void 0,void 0,!0).compile(entitySchema)}if(this.validate(j)===!0)return j;const[Ke]=this.validate.errors||[];throw Ke?new Error(`Malformed envelope, ${Ke.instancePath||"<root>"} ${Ke.message}`):new Error("Malformed envelope, Unknown error")}}function at(ce){let j=ce.indexOf(":");const ye=ce.indexOf("/");ye!==-1&&ye<j&&(j=-1);const Ke=j===-1?void 0:ce.slice(0,j),rt=ye===-1?void 0:ce.slice(j+1,ye),it=ce.slice(Math.max(j+1,ye+1));if(Ke===""||rt===""||it==="")throw new TypeError(`Entity reference "${ce}" was not on the form [<kind>:][<namespace>/]<name>`);return{kind:Ke,namespace:rt,name:it}}function Tt(ce){return{kind:ce.kind,namespace:ce.metadata.namespace||r,name:ce.metadata.name}}function yt(ce,j){var Qt,en,tn,En;if(!ce)throw new Error("Entity reference must not be empty");const ye=j==null?void 0:j.defaultKind,Ke=(j==null?void 0:j.defaultNamespace)||r;let rt,it,Rt;if(typeof ce=="string"){const U=at(ce);rt=(Qt=U.kind)!=null?Qt:ye,it=(en=U.namespace)!=null?en:Ke,Rt=U.name}else rt=(tn=ce.kind)!=null?tn:ye,it=(En=ce.namespace)!=null?En:Ke,Rt=ce.name;if(rt)if(it){if(!Rt){const U=JSON.stringify(ce);throw new Error(`Entity reference ${U} had missing or empty name`)}}else{const U=JSON.stringify(ce);throw new Error(`Entity reference ${U} had missing or empty namespace`)}else{const U=JSON.stringify(ce);throw new Error(`Entity reference ${U} had missing or empty kind (e.g. did not start with "component:" or similar)`)}return{kind:rt,namespace:it,name:Rt}}function Pe(ce){var rt,it;let j,ye,Ke;return"metadata"in ce?(j=ce.kind,ye=(rt=ce.metadata.namespace)!=null?rt:r,Ke=ce.metadata.name):(j=ce.kind,ye=(it=ce.namespace)!=null?it:r,Ke=ce.name),`${j.toLocaleLowerCase("en-US")}:${ye.toLocaleLowerCase("en-US")}/${Ke.toLocaleLowerCase("en-US")}`}class mt{constructor(j){this.policies=j}async enforce(j){let ye=j;for(const Ke of this.policies){const rt=await Ke.enforce(ye);if(!rt)throw new Error(`Policy ${Ke.constructor.name} did not return a result`);ye=rt}return ye}}class qe{constructor(j){this.policies=j}async enforce(j){for(const ye of this.policies){const Ke=await ye.enforce(j);if(Ke)return Ke}throw new Error("The entity did not match any known policy")}}const le={allOf(ce){return new mt(ce)},oneOf(ce){return new qe(ce)}};var fe=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 Me(ce){const j=se(ce);return{async check(ye){return j(ye)===ye}}}const we=Me(fe);var Ve=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 lt=Me(Ve);var Qe=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 Ct=Me(Qe);var oe=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 ue=Me(oe);var Xe=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 Ge=Me(Xe),$e="ownedBy",ct="ownerOf",Y="consumesApi",Z="apiConsumedBy",q="providesApi",ie="apiProvidedBy",me="dependsOn",be="dependencyOf",Le="parentOf",Se="childOf",_e="memberOf",ke="hasMember",Et="partOf",St="hasPart";var ut=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 Dt=Me(ut);var Ot=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 bt=Me(Ot);var Pt=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 Ut=Me(Pt),Nt="backstage.io/managed-by-location",mn="backstage.io/managed-by-origin-location",On="backstage.io/source-location";function Kt(ce){if(typeof ce!="string")throw new TypeError(`Unable to parse location ref '${ce}', unexpected argument ${typeof ce}`);const j=ce.indexOf(":");if(j<0)throw new TypeError(`Unable to parse location ref '${ce}', expected '<type>:<target>', e.g. 'url:https://host/path'`);const ye=ce.substring(0,j).trim(),Ke=ce.substring(j+1).trim();if(!ye||!Ke)throw new TypeError(`Unable to parse location ref '${ce}', expected '<type>:<target>', e.g. 'url:https://host/path'`);if(ye==="http"||ye==="https")throw new TypeError(`Invalid location ref '${ce}', please prefix it with 'url:', e.g. 'url:${ce}'`);return{type:ye,target:Ke}}function $t(ce){const{type:j,target:ye}=ce;if(j){if(!ye)throw new TypeError("Unable to stringify location ref, empty target")}else throw new TypeError("Unable to stringify location ref, empty type");return`${j}:${ye}`}function nt(ce){var ye,Ke,rt,it,Rt;const j=(Rt=(Ke=(ye=ce.metadata)==null?void 0:ye.annotations)==null?void 0:Ke[On])!=null?Rt:(it=(rt=ce.metadata)==null?void 0:rt.annotations)==null?void 0:it[Nt];if(!j)throw new Error(`Entity '${Pe(ce)}' is missing location`);return Kt(j)}},23235:function(ee,s,e){"use strict";e.d(s,{C:function(){return t}});var r=e(98005);class t{constructor(){X(this,"subject",new r.J)}post(i){this.subject.next(i)}alert$(){return this.subject}}},47150:function(ee,s,e){"use strict";e.d(s,{g:function(){return r}});class r{captureEvent(d){}}},58652:function(ee,s,e){"use strict";e.d(s,{C:function(){return d}});var r=e(98005);const t="theme";class d{constructor(R){X(this,"activeThemeId");X(this,"subject",new r.X(void 0));this.themes=R}static createWithStorage(R){var u;const c=new d(R);if(!window.localStorage)return c;const o=(u=window.localStorage.getItem(t))!=null?u:void 0;return c.setActiveThemeId(o),c.activeThemeId$().subscribe(m=>{m?window.localStorage.setItem(t,m):window.localStorage.removeItem(t)}),window.addEventListener("storage",m=>{var y;if(m.key===t){const g=(y=localStorage.getItem(t))!=null?y:void 0;c.setActiveThemeId(g)}}),c}getInstalledThemes(){return this.themes.slice()}activeThemeId$(){return this.subject}getActiveThemeId(){return this.activeThemeId}setActiveThemeId(R){this.activeThemeId=R,this.subject.next(R)}}},14721:function(ee,s,e){"use strict";e.d(s,{m:function(){return m}});var r=e(9850),t=e.n(r),d=e(12782),i=e.n(d);const R=/^[a-z][a-z0-9]*(?:[-_][a-z][a-z0-9]*)*$/i;function c(y){return typeof y=="object"&&y!==null&&!Array.isArray(y)}function o(y){if(y===null)return"null";if(Array.isArray(y))return"array";const g=typeof y;return g==="number"&&isNaN(y)?"nan":g==="string"&&y===""?"empty-string":g}const u={type(y,g,E,S){return`Invalid type in config for key '${y}' in '${g}', got ${E}, wanted ${S}`},missing(y){return`Missing required config value at '${y}'`},convert(y,g,E){return`Unable to convert config value for key '${y}' in '${g}' to a ${E}`}};class m{constructor(g,E="mock-config",S,b=""){X(this,"filteredKeys");X(this,"notifiedFilteredKeys",new Set);this.data=g,this.context=E,this.fallback=S,this.prefix=b}static fromConfigs(g){return g.length===0?new m(void 0):g.reduce((E,{data:S,context:b,filteredKeys:x,deprecatedKeys:w})=>{const B=new m(S,b,E);if(B.filteredKeys=x,w)for(const{key:F,description:O}of w)console.warn(`The configuration key '${F}' of ${b} is deprecated and may be removed soon. ${O||""}`);return B},void 0)}has(g){var S,b;return this.readValue(g)!==void 0?!0:(b=(S=this.fallback)==null?void 0:S.has(g))!=null?b:!1}keys(){var S,b;const g=this.data?Object.keys(this.data):[],E=(b=(S=this.fallback)==null?void 0:S.keys())!=null?b:[];return[...new Set([...g,...E])]}get(g){const E=this.getOptional(g);if(E===void 0)throw new Error(u.missing(this.fullKey(g!=null?g:"")));return E}getOptional(g){var b;const E=t()(this.readValue(g)),S=(b=this.fallback)==null?void 0:b.getOptional(g);return E===void 0?S:S===void 0?E:i()({},{value:S},{value:E},(x,w)=>!c(w)||!c(x)?w:void 0).value}getConfig(g){const E=this.getOptionalConfig(g);if(E===void 0)throw new Error(u.missing(this.fullKey(g)));return E}getOptionalConfig(g){var b;const E=this.readValue(g),S=(b=this.fallback)==null?void 0:b.getOptionalConfig(g);if(c(E))return this.copy(E,g,S);if(E!==void 0)throw new TypeError(u.type(this.fullKey(g),this.context,o(E),"object"));return S}getConfigArray(g){const E=this.getOptionalConfigArray(g);if(E===void 0)throw new Error(u.missing(this.fullKey(g)));return E}getOptionalConfigArray(g){const E=this.readConfigValue(g,S=>{if(!Array.isArray(S))return{expected:"object-array"};for(const[b,x]of S.entries())if(!c(x))return{expected:"object-array",value:x,key:`${g}[${b}]`};return!0});if(!!E)return E.map((S,b)=>this.copy(S,`${g}[${b}]`))}getNumber(g){const E=this.getOptionalNumber(g);if(E===void 0)throw new Error(u.missing(this.fullKey(g)));return E}getOptionalNumber(g){const E=this.readConfigValue(g,b=>typeof b=="number"||typeof b=="string"||{expected:"number"});if(typeof E=="number"||E===void 0)return E;const S=Number(E);if(!Number.isFinite(S))throw new Error(u.convert(this.fullKey(g),this.context,"number"));return S}getBoolean(g){const E=this.getOptionalBoolean(g);if(E===void 0)throw new Error(u.missing(this.fullKey(g)));return E}getOptionalBoolean(g){return this.readConfigValue(g,E=>typeof E=="boolean"||{expected:"boolean"})}getString(g){const E=this.getOptionalString(g);if(E===void 0)throw new Error(u.missing(this.fullKey(g)));return E}getOptionalString(g){return this.readConfigValue(g,E=>typeof E=="string"&&E!==""||{expected:"string"})}getStringArray(g){const E=this.getOptionalStringArray(g);if(E===void 0)throw new Error(u.missing(this.fullKey(g)));return E}getOptionalStringArray(g){return this.readConfigValue(g,E=>{if(!Array.isArray(E))return{expected:"string-array"};for(const[S,b]of E.entries())if(typeof b!="string"||b==="")return{expected:"string-array",value:b,key:`${g}[${S}]`};return!0})}fullKey(g){return`${this.prefix}${this.prefix?".":""}${g}`}copy(g,E,S){const b=new m(g,this.context,S,this.fullKey(E));return b.filteredKeys=this.filteredKeys,b}readConfigValue(g,E){var x;const S=this.readValue(g);if(S===void 0)return(x=this.fallback)==null?void 0:x.readConfigValue(g,E);const b=E(S);if(b!==!0){const{key:w=g,value:B=S,expected:F}=b;throw new TypeError(u.type(this.fullKey(w),this.context,o(B),F))}return S}readValue(g){const E=g?g.split("."):[];for(const b of E)if(!R.test(b))throw new TypeError(`Invalid config key '${g}'`);if(this.data===void 0)return;let S=this.data;for(const[b,x]of E.entries())if(c(S))S=S[x];else if(S!==void 0){const w=this.fullKey(E.slice(0,b).join("."));throw new TypeError(u.type(w,this.context,o(S),"object"))}return S}}},4333:function(ee,s,e){"use strict";e.d(s,{p:function(){return t}});const r="Invalid discovery URL pattern,";class t{static compile(i){const R=i.split(/\{\{\s*pluginId\s*\}\}/),c=R.join("pluginId");let o;try{o=new URL(c)}catch{throw new Error(`${r} URL '${c}' 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(c.endsWith("/"))throw new Error(`${r} URL must not end with a slash`);return new t(R)}constructor(i){this.parts=i}async getBaseUrl(i){return this.parts.join(i)}}},89536:function(ee,s,e){"use strict";e.d(s,{KN:function(){return r},gr:function(){return d},Jv:function(){return i}});class r{constructor(c,o){this.alertApi=c,this.errorApi=o}post(c,o){return o!=null&&o.hidden||this.alertApi.post({message:c.message,severity:"error"}),this.errorApi.post(c,o)}error$(){return this.errorApi.error$()}}var t=e(98005);class d{constructor(){X(this,"subject",new t.J)}post(c,o){this.subject.next({error:c,context:o})}error$(){return this.subject}}class i{static forward(c,o){window.addEventListener("unhandledrejection",u=>{c.post(u.reason,o)})}}},14884:function(ee,s,e){"use strict";e.d(s,{b:function(){return d}});var r=e(36964);function t(i){if(i.length<3)throw new Error(`The '${i}' feature flag must have a minimum length of three characters.`);if(i.length>150)throw new Error(`The '${i}' feature flag must not exceed 150 characters.`);if(!i.match(/^[a-z]+[a-z0-9-]+$/))throw new Error(`The '${i}' feature flag must start with a lowercase letter and only contain lowercase letters, numbers and hyphens. Examples: feature-flag-one, alpha, release-2020`)}class d{constructor(){X(this,"registeredFeatureFlags",[]);X(this,"flags")}registerFlag(R){t(R.name),this.registeredFeatureFlags.push(R)}getRegisteredFlags(){return this.registeredFeatureFlags.slice()}isActive(R){return this.flags||(this.flags=this.load()),this.flags.get(R)===r.FeatureFlagState.Active}save(R){this.flags||(this.flags=this.load()),R.merge||this.flags.clear();for(const[o,u]of Object.entries(R.states))this.flags.set(o,u);const c=Array.from(this.flags.entries()).filter(([,o])=>o===r.FeatureFlagState.Active);window.localStorage.setItem("featureFlags",JSON.stringify(Object.fromEntries(c)))}load(){try{const R=window.localStorage.getItem("featureFlags");if(!R)return new Map;const c=JSON.parse(R);if(typeof c!="object"||c===null||Array.isArray(c))return new Map;const o=Object.entries(c).filter(([u,m])=>(t(u),m===r.FeatureFlagState.Active));return new Map(o)}catch{return new Map}}}},50160:function(ee,s,e){"use strict";e.d(s,{I:function(){return u},j:function(){return r}});function r(m){var E;let y=m.baseImplementation||e.g.fetch;const g=[(E=m.middleware)!=null?E:[]].flat().reverse();for(const S of g)y=S.apply(y);return{fetch:y}}class t{static create(y){var b,x;const g=d(y),E=((b=y.header)==null?void 0:b.name)||"authorization",S=((x=y.header)==null?void 0:x.value)||(w=>`Bearer ${w}`);return new t(y.identityApi,g,E,S)}constructor(y,g,E,S){this.identityApi=y,this.allowUrl=g,this.headerName=E,this.headerValue=S}apply(y){return async(g,E)=>{const S=new Request(g,E),{token:b}=await this.identityApi.getCredentials();return S.headers.get(this.headerName)||typeof b!="string"||!b||!this.allowUrl(S.url)?y(g,E):(S.headers.set(this.headerName,this.headerValue(b)),y(S))}}}function d(m){return m.allowUrl?m.allowUrl:m.urlPrefixAllowlist?i(m.urlPrefixAllowlist):m.config?i([m.config.getString("backend.baseUrl")]):()=>!1}function i(m){const y=m.map(g=>g.replace(/\/$/,""));return g=>y.some(E=>g===E||g.startsWith(`${E}/`))}function R(m,y){return!y||y==="/"?m:`${m.replace(/\/$/,"")}/${y.replace(/^\//,"")}`}class c{constructor(y){this.discoveryApi=y}apply(y){return async(g,E)=>{const S=new Request(g,E),b="plugin://";if(!S.url.startsWith(b))return y(g,E);const{hostname:x,pathname:w,search:B,hash:F,username:O,password:D}=new URL(`http://${S.url.substring(b.length)}`);let $=await this.discoveryApi.getBaseUrl(x);if(O||D){const ne=new URL($),se=`${O}${D?`:${D}`:""}@`;$=`${ne.protocol}//${se}${ne.host}${ne.pathname}`}const K=`${R($,w)}${B}${F}`;return y(K,typeof g=="string"||o(g)?E:g)}}}function o(m){return typeof m=="object"&&(m==null?void 0:m.constructor)===URL}class u{static resolvePluginProtocol(y){return new c(y.discoveryApi)}static injectIdentityAuth(y){return t.create(y)}constructor(){}}},11358:function(ee,s,e){"use strict";e.d(s,{Y:function(){return R}});var r=e(98005);function t(c,o){for(const u of o)if(!c.has(u))return!1;return!0}function d(c,...o){const u=new Set(c);for(const m of o)for(const y of m)u.add(y);return u}class i{constructor(){X(this,"requests",[]);X(this,"subject",new r.X(this.getCurrentPending()))}request(o){return new Promise((u,m)=>{this.requests.push({scopes:o,resolve:u,reject:m}),this.subject.next(this.getCurrentPending())})}resolve(o,u){this.requests=this.requests.filter(m=>t(o,m.scopes)?(m.resolve(u),!1):!0),this.subject.next(this.getCurrentPending())}reject(o){this.requests.forEach(u=>u.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((u,m)=>d(u,m.scopes),this.requests[0].scopes);return{scopes:o,resolve:u=>{o&&this.resolve(o,u)},reject:u=>{o&&this.reject(u)}}}}class R{constructor(){X(this,"subject",new r.X([]));X(this,"currentRequests",[]);X(this,"handlerCount",0)}createAuthRequester(o){const u=new i,m=this.handlerCount;return this.handlerCount++,u.pending().subscribe({next:y=>{const g=this.currentRequests.slice(),E=this.makeAuthRequest(y,o);E?g[m]=E:delete g[m],this.currentRequests=g,this.subject.next(g.filter(Boolean))}}),y=>u.request(y)}makeAuthRequest(o,u){const{scopes:m}=o;if(!!m)return{provider:u.provider,trigger:async()=>{const y=await u.onAuthRequest(m);o.resolve(y)},reject:()=>{const y=new Error("Login failed, rejected by user");y.name="RejectedError",o.reject(y)}}}authRequest$(){return this.subject}}},56054:function(ee,s,e){"use strict";e.d(s,{C:function(){return i}});var r=e(82394),t=e.n(r);const d=new Map;class i{constructor(c,o){X(this,"subscribers",new Set);X(this,"observable",new(t())(c=>(this.subscribers.add(c),()=>{this.subscribers.delete(c)})));this.namespace=c,this.errorApi=o}static create(c){var o;return new i((o=c.namespace)!=null?o:"",c.errorApi)}get(c){return this.snapshot(c).value}snapshot(c){let o,u="absent";try{const m=localStorage.getItem(this.getKeyName(c));m&&(o=JSON.parse(m,(y,g)=>(typeof g=="object"&&g!==null&&Object.freeze(g),g)),u="present")}catch{this.errorApi.post(new Error(`Error when parsing JSON config from storage for: ${c}`))}return{key:c,value:o,presence:u}}forBucket(c){const o=`${this.namespace}/${c}`;return d.has(o)||d.set(o,new i(o,this.errorApi)),d.get(o)}async set(c,o){localStorage.setItem(this.getKeyName(c),JSON.stringify(o)),this.notifyChanges(c)}async remove(c){localStorage.removeItem(this.getKeyName(c)),this.notifyChanges(c)}observe$(c){return this.observable.filter(({key:o})=>o===c)}getKeyName(c){return`${this.namespace}/${encodeURIComponent(c)}`}notifyChanges(c){const o=this.snapshot(c);for(const u of this.subscribers)u.next(o)}}},59589:function(ee,s,e){"use strict";e.d(s,{u:function(){return d}});var r=e(91205);const t={id:"atlassian",title:"Atlassian",icon:()=>null};class d{static create(R){const{discoveryApi:c,environment:o="development",provider:u=t,oauthRequestApi:m}=R;return r.OAuth2.create({discoveryApi:c,oauthRequestApi:m,provider:u,environment:o})}}},6098:function(ee,s,e){"use strict";e.d(s,{Z:function(){return d}});var r=e(91205);const t={id:"bitbucket",title:"Bitbucket",icon:()=>null};class d{static create(R){const{discoveryApi:c,environment:o="development",provider:u=t,oauthRequestApi:m,defaultScopes:y=["team"]}=R;return r.OAuth2.create({discoveryApi:c,oauthRequestApi:m,provider:u,environment:o,defaultScopes:y})}}},44431:function(ee,s,e){"use strict";e.d(s,{BitbucketAuth:function(){return d.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 d=e(6098)},19347:function(){},44474:function(ee,s,e){"use strict";e.d(s,{T:function(){return d}});var r=e(91205);const t={id:"github",title:"GitHub",icon:()=>null};class d{static create(R){const{discoveryApi:c,environment:o="development",provider:u=t,oauthRequestApi:m,defaultScopes:y=["read:user"]}=R;return r.OAuth2.create({discoveryApi:c,oauthRequestApi:m,provider:u,environment:o,defaultScopes:y})}}},2922:function(ee,s,e){"use strict";e.d(s,{a:function(){return d}});var r=e(91205);const t={id:"gitlab",title:"GitLab",icon:()=>null};class d{static create(R){const{discoveryApi:c,environment:o="development",provider:u=t,oauthRequestApi:m,defaultScopes:y=["read_user"]}=R;return r.OAuth2.create({discoveryApi:c,oauthRequestApi:m,provider:u,environment:o,defaultScopes:y})}}},59938:function(ee,s,e){"use strict";e.d(s,{e:function(){return i}});var r=e(91205);const t={id:"google",title:"Google",icon:()=>null},d="https://www.googleapis.com/auth/";class i{static create(c){const{discoveryApi:o,oauthRequestApi:u,environment:m="development",provider:y=t,defaultScopes:g=["openid",`${d}userinfo.email`,`${d}userinfo.profile`]}=c;return r.OAuth2.create({discoveryApi:o,oauthRequestApi:u,provider:y,environment:m,defaultScopes:g,scopeTransform(E){return E.map(S=>S==="openid"?S:S==="profile"||S==="email"?`${d}userinfo.${S}`:S.startsWith(d)?S:`${d}${S}`)}})}}},91668:function(ee,s,e){"use strict";e.d(s,{AtlassianAuth:function(){return y.u},BitbucketAuth:function(){return m.BitbucketAuth},GithubAuth:function(){return r.T},GitlabAuth:function(){return t.a},GoogleAuth:function(){return d.e},MicrosoftAuth:function(){return o._},OktaAuth:function(){return R.s},OneLoginAuth:function(){return u.$}});var r=e(44474),t=e(2922),d=e(59938),i=e(91205);e.o(i,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return i.AlertApiForwarder}}),e.o(i,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return i.AppThemeSelector}}),e.o(i,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return i.AtlassianAuth}}),e.o(i,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return i.BitbucketAuth}}),e.o(i,"ConfigReader")&&e.d(s,{ConfigReader:function(){return i.ConfigReader}}),e.o(i,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return i.ErrorAlerter}}),e.o(i,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return i.ErrorApiForwarder}}),e.o(i,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return i.FetchMiddlewares}}),e.o(i,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return i.FlatRoutes}}),e.o(i,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return i.LocalStorageFeatureFlags}}),e.o(i,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return i.MicrosoftAuth}}),e.o(i,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return i.NoOpAnalyticsApi}}),e.o(i,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return i.OAuthRequestManager}}),e.o(i,"OktaAuth")&&e.d(s,{OktaAuth:function(){return i.OktaAuth}}),e.o(i,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return i.OneLoginAuth}}),e.o(i,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return i.UnhandledErrorForwarder}}),e.o(i,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return i.UrlPatternDiscovery}}),e.o(i,"WebStorage")&&e.d(s,{WebStorage:function(){return i.WebStorage}}),e.o(i,"createFetchApi")&&e.d(s,{createFetchApi:function(){return i.createFetchApi}}),e.o(i,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return i.createSpecializedApp}}),e.o(i,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return i.defaultConfigLoader}});var R=e(26079),c=e(67604),o=e(38482),u=e(58381),m=e(44431);e.o(m,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return m.AlertApiForwarder}}),e.o(m,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return m.AppThemeSelector}}),e.o(m,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return m.AtlassianAuth}}),e.o(m,"ConfigReader")&&e.d(s,{ConfigReader:function(){return m.ConfigReader}}),e.o(m,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return m.ErrorAlerter}}),e.o(m,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return m.ErrorApiForwarder}}),e.o(m,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return m.FetchMiddlewares}}),e.o(m,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return m.FlatRoutes}}),e.o(m,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return m.LocalStorageFeatureFlags}}),e.o(m,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return m.NoOpAnalyticsApi}}),e.o(m,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return m.OAuthRequestManager}}),e.o(m,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return m.UnhandledErrorForwarder}}),e.o(m,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return m.UrlPatternDiscovery}}),e.o(m,"WebStorage")&&e.d(s,{WebStorage:function(){return m.WebStorage}}),e.o(m,"createFetchApi")&&e.d(s,{createFetchApi:function(){return m.createFetchApi}}),e.o(m,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return m.createSpecializedApp}}),e.o(m,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return m.defaultConfigLoader}});var y=e(59589)},38482:function(ee,s,e){"use strict";e.d(s,{_:function(){return d}});var r=e(91205);const t={id:"microsoft",title:"Microsoft",icon:()=>null};class d{static create(R){const{environment:c="development",provider:o=t,oauthRequestApi:u,discoveryApi:m,defaultScopes:y=["openid","offline_access","profile","email","User.Read"]}=R;return r.OAuth2.create({discoveryApi:m,oauthRequestApi:u,provider:o,environment:c,defaultScopes:y})}}},73124:function(ee,s,e){"use strict";e.d(s,{Z:function(){return c}});function r(o){return new Promise((u,m)=>{const y=o.width||500,g=o.height||700,E=window.screen.width/2-y/2,S=window.screen.height/2-g/2,b=window.open(o.url,o.name,`menubar=no,location=no,resizable=no,scrollbars=no,status=no,width=${y},height=${g},top=${S},left=${E}`);let x="";if(!b||typeof b.closed=="undefined"||b.closed){const O=new Error("Failed to open auth popup.");O.name="PopupRejectedError",m(O);return}const w=O=>{if(O.source!==b||O.origin!==o.origin)return;const{data:D}=O;if(D.type==="config_info"){x=D.targetOrigin;return}if(D.type!=="authorization_response")return;const $=D;if("error"in $){const K=new Error($.error.message);K.name=$.error.name,m(K)}else u($.response);F()},B=setInterval(()=>{if(b.closed){const O=`Login failed, ${x&&x!==window.location.origin?`Incorrect app origin, expected ${x}`:"popup was closed"}`,D=new Error(O);D.name="PopupClosedError",m(D),F()}},100);function F(){window.removeEventListener("message",w),clearInterval(B)}window.addEventListener("message",w)})}function t(o){return[...o].join(" ")}class d{constructor(u){X(this,"discoveryApi");X(this,"environment");X(this,"provider");X(this,"joinScopesFunc");X(this,"authRequester");X(this,"sessionTransform");const{discoveryApi:m,environment:y,provider:g,joinScopes:E=t,oauthRequestApi:S,sessionTransform:b=x=>x}=u;this.authRequester=S.createAuthRequester({provider:g,onAuthRequest:x=>this.showPopup(x)}),this.discoveryApi=m,this.environment=y,this.provider=g,this.joinScopesFunc=E,this.sessionTransform=b}async createSession(u){return u.instantPopup?this.showPopup(u.scopes):this.authRequester(u.scopes)}async refreshSession(){const u=await fetch(await this.buildUrl("/refresh",{optional:!0}),{headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(y=>{throw new Error(`Auth refresh request failed, ${y}`)});if(!u.ok){const y=new Error(`Auth refresh request failed, ${u.statusText}`);throw y.status=u.status,y}const m=await u.json();if(m.error){const y=new Error(m.error.message);throw m.error.name&&(y.name=m.error.name),y}return await this.sessionTransform(m)}async removeSession(){const u=await fetch(await this.buildUrl("/logout"),{method:"POST",headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(m=>{throw new Error(`Logout request failed, ${m}`)});if(!u.ok){const m=new Error(`Logout request failed, ${u.statusText}`);throw m.status=u.status,m}}async showPopup(u){const m=this.joinScopesFunc(u),y=await this.buildUrl("/start",{scope:m,origin:location.origin}),g=await r({url:y,name:`${this.provider.title} Login`,origin:new URL(y).origin,width:450,height:730});return await this.sessionTransform(g)}async buildUrl(u,m){const y=await this.discoveryApi.getBaseUrl("auth"),g=this.buildQueryString({...m,env:this.environment});return`${y}/${this.provider.id}${u}${g}`}buildQueryString(u){if(!u)return"";const m=Object.entries(u).map(([y,g])=>{if(typeof g=="string")return`${encodeURIComponent(y)}=${encodeURIComponent(g)}`;if(g)return encodeURIComponent(y)}).filter(Boolean).join("&");return m?`?${m}`:""}}var i=e(57018);const R={id:"oauth2",title:"Your Identity Provider",icon:()=>null};class c{constructor(u){X(this,"sessionManager");X(this,"scopeTransform");this.sessionManager=u.sessionManager,this.scopeTransform=u.scopeTransform}static create(u){const{discoveryApi:m,environment:y="development",provider:g=R,oauthRequestApi:E,defaultScopes:S=[],scopeTransform:b=B=>B}=u,x=new d({discoveryApi:m,environment:y,provider:g,oauthRequestApi:E,sessionTransform(B){return{...B,providerInfo:{idToken:B.providerInfo.idToken,accessToken:B.providerInfo.accessToken,scopes:c.normalizeScopes(b,B.providerInfo.scope),expiresAt:new Date(Date.now()+B.providerInfo.expiresInSeconds*1e3)}}}}),w=new i.RefreshingAuthSessionManager({connector:x,defaultScopes:new Set(S),sessionScopes:B=>B.providerInfo.scopes,sessionShouldRefresh:B=>(B.providerInfo.expiresAt.getTime()-Date.now())/1e3<60*5});return new c({sessionManager:w,scopeTransform:b})}async signIn(){await this.getAccessToken()}async signOut(){await this.sessionManager.removeSession()}sessionState$(){return this.sessionManager.sessionState$()}async getAccessToken(u,m){var E;const y=c.normalizeScopes(this.scopeTransform,u),g=await this.sessionManager.getSession({...m,scopes:y});return(E=g==null?void 0:g.providerInfo.accessToken)!=null?E:""}async getIdToken(u={}){var y;const m=await this.sessionManager.getSession(u);return(y=m==null?void 0:m.providerInfo.idToken)!=null?y:""}async getBackstageIdentity(u={}){const m=await this.sessionManager.getSession(u);return m==null?void 0:m.backstageIdentity}async getProfile(u={}){const m=await this.sessionManager.getSession(u);return m==null?void 0:m.profile}static normalizeScopes(u,m){if(!m)return new Set;const y=Array.isArray(m)?m:m.split(/[\s|,]/).filter(Boolean);return new Set(u(y))}}},91205:function(ee,s,e){"use strict";e.d(s,{OAuth2:function(){return r.Z}});var r=e(73124),t=e(5973),d=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(ee,s,e){"use strict";e.d(s,{s:function(){return R}});var r=e(91205);const t={id:"okta",title:"Okta",icon:()=>null},d=new Set(["openid","profile","email","phone","address","groups","offline_access"]),i="okta.";class R{static create(o){const{discoveryApi:u,environment:m="development",provider:y=t,oauthRequestApi:g,defaultScopes:E=["openid","email","profile","offline_access"]}=o;return r.OAuth2.create({discoveryApi:u,oauthRequestApi:g,provider:y,environment:m,defaultScopes:E,scopeTransform(S){return S.map(b=>d.has(b)||b.startsWith(i)?b:`${i}${b}`)}})}}},58381:function(ee,s,e){"use strict";e.d(s,{$:function(){return R}});var r=e(91205);const t={id:"onelogin",title:"onelogin",icon:()=>null},d=new Set(["openid","profile","email","phone","address","groups","offline_access"]),i="onelogin.";class R{static create(o){const{discoveryApi:u,environment:m="development",provider:y=t,oauthRequestApi:g}=o;return r.OAuth2.create({discoveryApi:u,oauthRequestApi:g,provider:y,environment:m,defaultScopes:["openid","email","profile","offline_access"],scopeTransform(E){return E.map(S=>d.has(S)||S.startsWith(i)?S:`${i}${S}`)}})}}},67604:function(ee,s,e){"use strict";var r=e(57018),t=e(30195);const d=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({token:t.z.string(),identity:t.z.object({type:t.z.literal("user"),userEntityRef:t.z.string(),ownershipEntityRefs:t.z.array(t.z.string())})})}),i={id:"saml",title:"SAML",icon:()=>null};class R{static create(o){const{discoveryApi:u,environment:m="development",provider:y=i}=o,g=new DirectAuthConnector({discoveryApi:u,environment:m,provider:y}),E=new StaticAuthSessionManager({connector:g}),S=new AuthSessionStore({manager:E,storageKey:`${y.id}Session`,schema:samlSessionSchema});return new R(S)}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 u=await this.sessionManager.getSession(o);return u==null?void 0:u.backstageIdentity}async getProfile(o={}){const u=await this.sessionManager.getSession(o);return u==null?void 0:u.profile}}},91631:function(ee,s,e){"use strict";e.d(s,{AlertApiForwarder:function(){return t.C},AppThemeSelector:function(){return i.C},AtlassianAuth:function(){return r.AtlassianAuth},ConfigReader:function(){return R.m},ErrorAlerter:function(){return o.KN},ErrorApiForwarder:function(){return o.gr},FetchMiddlewares:function(){return m.I},GithubAuth:function(){return r.GithubAuth},GitlabAuth:function(){return r.GitlabAuth},GoogleAuth:function(){return r.GoogleAuth},LocalStorageFeatureFlags:function(){return u.b},MicrosoftAuth:function(){return r.MicrosoftAuth},NoOpAnalyticsApi:function(){return d.g},OAuthRequestManager:function(){return y.Y},OktaAuth:function(){return r.OktaAuth},OneLoginAuth:function(){return r.OneLoginAuth},UnhandledErrorForwarder:function(){return o.Jv},UrlPatternDiscovery:function(){return c.p},WebStorage:function(){return g.C},createFetchApi:function(){return m.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),d=e(47150),i=e(58652),R=e(14721),c=e(4333),o=e(89536),u=e(14884),m=e(50160),y=e(11358),g=e(56054)},56494:function(ee,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(ee,s,e){"use strict";e.d(s,{p:function(){return t}});var r;(function(d){d[d.default=10]="default";const i=50;d[d.app=i]="app",d[d.static=100]="static"})(r||(r={}));class t{constructor(){X(this,"factories",new Map)}register(i,R){const c=r[i],o=this.factories.get(R.api.id);return o&&o.priority>=c?!1:(this.factories.set(R.api.id,{priority:c,factory:R}),!0)}get(i){const R=this.factories.get(i.id);if(!!R)return R.factory}getAllApis(){const i=new Set;for(const{factory:R}of this.factories.values())i.add(R.api);return i}}},14406:function(ee,s,e){"use strict";e.d(s,{g:function(){return o}});var r=e(2784),t=e(13980),d=e.n(t);class i{constructor(...m){X(this,"holders");this.holders=m}get(m){for(const y of this.holders){const g=y.get(m);if(g)return g}}}var R=e(76241);const c=(0,R.CT)("api-context"),o=u=>{var S;const{apis:m,children:y}=u,g=(S=(0,r.useContext)(c))==null?void 0:S.atVersion(1),E=g?new i(m,g):m;return r.createElement(c.Provider,{value:(0,R.EI)({1:E}),children:y})};o.propTypes={apis:d().shape({get:d().func.isRequired}).isRequired,children:d().node}},12132:function(ee,s,e){"use strict";e.d(s,{M:function(){return r}});class r{constructor(d){X(this,"apis",new Map);this.factories=d}static validateFactories(d,i){for(const R of i){const c=[R],o=new Set;for(;c.length;){const u=c.shift(),m=d.get(u);if(!!m)for(const y of Object.values(m.deps)){if(y.id===R.id)throw new Error(`Circular dependency of api factory for ${R}`);o.has(y)||(o.add(y),c.push(y))}}}}get(d){return this.load(d)}load(d,i=[]){const R=this.apis.get(d.id);if(R)return R;const c=this.factories.get(d);if(!c)return;if(i.includes(c.api))throw new Error(`Circular dependency of api factory for ${c.api}`);const o=this.loadDeps(d,c.deps,[...i,c.api]),u=c.factory(o);return this.apis.set(d.id,u),u}loadDeps(d,i,R){const c={};for(const o in i)if(i.hasOwnProperty(o)){const u=i[o],m=this.load(u,R);if(!m)throw new Error(`No API factory available for dependency ${u} of dependent ${d}`);c[o]=m}return c}}},76105:function(ee,s,e){"use strict";e.d(s,{ApiFactoryRegistry:function(){return d.p},ApiProvider:function(){return r.g},ApiResolver:function(){return t.M}});var r=e(14406),t=e(12132),d=e(80396),i=e(82488),R=e.n(i);e.o(i,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return i.AlertApiForwarder}}),e.o(i,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return i.AppThemeSelector}}),e.o(i,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return i.AtlassianAuth}}),e.o(i,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return i.BitbucketAuth}}),e.o(i,"ConfigReader")&&e.d(s,{ConfigReader:function(){return i.ConfigReader}}),e.o(i,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return i.ErrorAlerter}}),e.o(i,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return i.ErrorApiForwarder}}),e.o(i,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return i.FetchMiddlewares}}),e.o(i,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return i.FlatRoutes}}),e.o(i,"GithubAuth")&&e.d(s,{GithubAuth:function(){return i.GithubAuth}}),e.o(i,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return i.GitlabAuth}}),e.o(i,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return i.GoogleAuth}}),e.o(i,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return i.LocalStorageFeatureFlags}}),e.o(i,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return i.MicrosoftAuth}}),e.o(i,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return i.NoOpAnalyticsApi}}),e.o(i,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return i.OAuthRequestManager}}),e.o(i,"OktaAuth")&&e.d(s,{OktaAuth:function(){return i.OktaAuth}}),e.o(i,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return i.OneLoginAuth}}),e.o(i,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return i.UnhandledErrorForwarder}}),e.o(i,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return i.UrlPatternDiscovery}}),e.o(i,"WebStorage")&&e.d(s,{WebStorage:function(){return i.WebStorage}}),e.o(i,"createFetchApi")&&e.d(s,{createFetchApi:function(){return i.createFetchApi}}),e.o(i,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return i.createSpecializedApp}}),e.o(i,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return i.defaultConfigLoader}})},82488:function(){},82370:function(ee,s,e){"use strict";e.d(s,{b:function(){return ct}});var r=e(2784),t=e(10289),d=e(64279),i=e(56494),R=e(36964),c=e(76105);function o(Y){const Z={};for(const ie in Y.collectors)Y.collectors.hasOwnProperty(ie)&&(Z[ie]=Y.collectors[ie]());const q=[{node:r.Children.toArray(Y.root),parent:void 0,contexts:{}}];for(;q.length!==0;){const{node:ie,parent:me,contexts:be}=q.shift();r.Children.forEach(ie,Le=>{if(!(0,r.isValidElement)(Le))return;const Se={};for(const _e in Z)if(Z.hasOwnProperty(_e)){const ke=Z[_e];Se[_e]=ke.visit(ke.accumulator,Le,me,be[_e])}for(const _e of Y.discoverers){const ke=_e(Le);ke&&q.push({node:ke,parent:Le,contexts:Se})}})}return Object.fromEntries(Object.entries(Z).map(([ie,me])=>[ie,me.accumulator]))}function u(Y,Z){return()=>({accumulator:Y(),visit:Z})}function m(Y){var Z;return(Z=Y.props)==null?void 0:Z.children}function y(Y){var Z,q,ie;if(((Z=Y.props)==null?void 0:Z.path)&&((q=Y.props)==null?void 0:q.element))return(ie=Y.props)==null?void 0:ie.element}const g=u(()=>new Set,(Y,Z)=>{const q=(0,R.getComponentData)(Z,"core.plugin");q&&Y.add(q)});var E=e(88934);const S={caseSensitive:!1,path:"/*",element:"match-all",routeRefs:new Set},b=u(()=>({paths:new Map,parents:new Map,objects:new Array}),(Y,Z,q,ie)=>{var Ot,bt,Pt,Ut,Nt;if((q==null?void 0:q.props.element)===Z)return ie;let me=ie==null?void 0:ie.obj,be=ie==null?void 0:ie.routeRef,Le=ie==null?void 0:ie.sticky;const Se=(Ot=Z.props)==null?void 0:Ot.path,_e=(bt=me==null?void 0:me.children)!=null?bt:Y.objects,ke=Boolean((Pt=Z.props)==null?void 0:Pt.caseSensitive);let Et=ie==null?void 0:ie.path;if((0,R.getComponentData)(Z,"core.gatherMountPoints")){if(!Se)throw new Error("Mount point gatherer must have a path");Et=Se}const St=(Ut=Z.props)==null?void 0:Ut.element;let ut=(0,R.getComponentData)(Z,"core.mountPoint");if(!ut&&(0,r.isValidElement)(St)&&(ut=(0,R.getComponentData)(St,"core.mountPoint")),ut){let mn=Se;if(Et&&(mn?Et=void 0:mn=Et),!mn)throw new Error("Mounted routable extension must have a path");Y.paths.set(ut,mn),be&&Le?(Y.parents.set(ut,be),Se&&(be=ut,Le=!1)):(Y.parents.set(ut,be),be=ut),Se?(me={caseSensitive:ke,path:Se,element:"mounted",routeRefs:new Set([ut]),children:[S],plugin:(0,R.getComponentData)(Z.props.element,"core.plugin")},_e.push(me)):me==null||me.routeRefs.add(ut)}if((0,R.getComponentData)(Z,"core.gatherMountPoints")&&(Le=!0),(0,R.getComponentData)(Z,"core.gatherMountPoints")){if(!Se)throw new Error("Mount point gatherer must have a path");ut||(me={caseSensitive:ke,path:Se,element:"gathered",routeRefs:new Set,children:[S],plugin:(Nt=ie==null?void 0:ie.obj)==null?void 0:Nt.plugin},_e.push(me))}return{obj:me,path:Et,routeRef:be,sticky:Le}}),x=u(()=>new Set,(Y,Z)=>{if(Z.type===E.L){const q=Z.props;Y.add("with"in q?q.with:q.without)}});var w=e(76241);const B=(0,w.uW)("route-ref-type",()=>Symbol("route-ref-type"));function F(Y){return Y[B]==="absolute"}function O(Y){return Y[B]==="sub"}function D(Y){return Y[B]==="external"}function $(...Y){const Z=Y.join("/").replace(/\/\/+/g,"/");return Z!=="/"&&Z.endsWith("/")?Z.slice(0,-1):Z}function K(Y,Z,q){let ie,me="";if(F(Y))ie=Y;else if(O(Y))ie=Y.parent,me=Y.path;else if(D(Y)){const Se=q.get(Y);if(!Se)return[void 0,""];if(F(Se))ie=Se;else if(O(Se))ie=Se.parent,me=Se.path;else throw new Error(`ExternalRouteRef was bound to invalid target, ${Se}`)}else throw Y[B]?new Error(`Unknown or invalid route ref type, ${Y[B]}`):new Error(`Unknown object passed to useRouteRef, got ${Y}`);if(!ie)return[void 0,""];const be=Z.get(ie);if(!be)return[void 0,""];const Le=$(be,me);return[ie,Le]}function ne(Y,Z,q,ie,me){var Et;const be=(Et=(0,t.fp)(me,Z))!=null?Et:[],Le=Array();let Se=-1;for(let St=Y;St&&(Se=be.findIndex(ut=>ut.route.routeRefs.has(St)),Se===-1);St=ie.get(St))Le.unshift(St);Le.length===0&&(Se-=1);const _e=Se===-1?"":be[Se].pathname,ke=$(...Le.slice(0,-1).map(St=>{const ut=q.get(St);if(!ut)throw new Error(`No path for ${St}`);if(ut.includes(":"))throw new Error(`Cannot route to ${Y} with parent ${St} as it has parameters`);return ut}));return _e+ke}class se{constructor(Z,q,ie,me,be){this.routePaths=Z,this.routeParents=q,this.routeObjects=ie,this.routeBindings=me,this.appBasePath=be}resolve(Z,q){const[ie,me]=K(Z,this.routePaths,this.routeBindings);if(!ie)return;let be;typeof q=="string"?be=this.trimPath(q):q.pathname?be={...q,pathname:this.trimPath(q.pathname)}:be=q;const Le=this.appBasePath+ne(ie,be,this.routePaths,this.routeParents,this.routeObjects);return(...[_e])=>Le+(0,t.Gn)(me,_e)}trimPath(Z){return Z&&(Z.startsWith(this.appBasePath)?Z.slice(this.appBasePath.length):Z)}}const Ee=(0,w.CT)("routing-context"),Ue=({routePaths:Y,routeParents:Z,routeObjects:q,routeBindings:ie,basePath:me="",children:be})=>{const Le=new se(Y,Z,q,ie,me),Se=(0,w.EI)({1:Le});return r.createElement(Ee.Provider,{value:Se},be)},xe=(Y,Z)=>{var q,ie;try{const me=(0,t.fp)(Z,{pathname:Y}),be=(q=me==null?void 0:me.filter(Se=>{var _e;return((_e=Se==null?void 0:Se.route.routeRefs)==null?void 0:_e.size)>0}).pop())==null?void 0:q.route;if(!be)return{};let Le;return be.routeRefs.size===1&&(Le=be.routeRefs.values().next().value),{extension:"App",pluginId:((ie=be.plugin)==null?void 0:ie.getId())||"root",...Le?{routeRef:Le.id}:{}}}catch{return{}}},We=({pathname:Y,search:Z,hash:q})=>{const ie=(0,R.useAnalytics)();return(0,r.useEffect)(()=>{ie.captureEvent("navigate",`${Y}${Z}${q}`)},[ie,Y,Z,q]),null},Re=({routeObjects:Y})=>{const{pathname:Z,search:q,hash:ie}=(0,t.TH)();return r.createElement(R.AnalyticsContext,{attributes:xe(Z,Y)},r.createElement(We,{pathname:Z,search:q,hash:ie}))};function Je(Y,Z){const q=new Set(Z.values());q.delete(void 0);for(const ie of Z.keys()){if(q.has(ie))continue;let me=ie,be="";for(;me;){const Se=Y.get(me);if(!Se)throw new Error(`No path for ${me}`);be=`${Se}${be}`,me=Z.get(me)}const Le=be.match(/:(\w+)/g);if(Le){for(let Se=0;Se<Le.length;Se++)for(let _e=Se+1;_e<Le.length;_e++)if(Le[_e]===Le[Se])throw new Error(`Parameter ${Le[_e]} is duplicated in path ${be}`)}}}function at(Y,Z){for(const q of Z)if(!!q.externalRoutes){for(const[ie,me]of Object.entries(q.externalRoutes))if(!me.optional&&!Y.has(me))throw new Error(`External route '${ie}' of the '${q.getId()}' plugin must be bound to a target route. See https://backstage.io/link?bind-routes for details.`)}}const Tt=(0,w.CT)("app-context"),yt=({appContext:Y,children:Z})=>{const q=(0,w.EI)({1:Y});return r.createElement(Tt.Provider,{value:q,children:Z})};function Pe(Y){return new Error(`Tried to access IdentityApi ${Y} before app was loaded`)}function mt(Y){console.warn(`WARNING: Call to ${Y} is deprecated and will break in the future`)}class qe{constructor(){X(this,"target");X(this,"waitForTarget");X(this,"resolveTarget",()=>{});X(this,"signOutTargetUrl","/");this.waitForTarget=new Promise(Z=>{this.resolveTarget=Z})}setTarget(Z,q){this.target=Z,this.signOutTargetUrl=q.signOutTargetUrl,this.resolveTarget(Z)}getUserId(){if(!this.target)throw Pe("getUserId");if(!this.target.getUserId)throw new Error("IdentityApi does not implement getUserId");return mt("getUserId"),this.target.getUserId()}getProfile(){if(!this.target)throw Pe("getProfile");if(!this.target.getProfile)throw new Error("IdentityApi does not implement getProfile");return mt("getProfile"),this.target.getProfile()}async getProfileInfo(){return this.waitForTarget.then(Z=>Z.getProfileInfo())}async getBackstageIdentity(){const Z=await this.waitForTarget.then(q=>q.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 mt("getIdToken"),Z.getIdToken()})}async signOut(){await this.waitForTarget.then(Z=>Z.signOut()),location.href=this.signOutTargetUrl}}var le=e(72164);function fe(Y,Z,q){if(Y!==void 0){const me=q.find(be=>be.id===Y);if(me)return me}if(Z){const me=q.find(be=>be.variant==="dark");if(me)return me}const ie=q.find(me=>me.variant==="light");return ie||q[0]}const Me=()=>{const Y=(0,r.useMemo)(()=>window.matchMedia("(prefers-color-scheme: dark)"),[]),[Z,q]=(0,r.useState)(Y.matches);return(0,r.useEffect)(()=>{const ie=me=>{q(me.matches)};return Y.addListener(ie),()=>{Y.removeListener(ie)}},[Y]),Z};function we({children:Y}){const Z=(0,R.useApi)(R.appThemeApiRef),q=(0,le.Z)(Z.activeThemeId$(),Z.getActiveThemeId()),ie=Boolean(window.matchMedia)?Me():!1,me=fe(q,ie,Z.getInstalledThemes());if(!me)throw new Error("App has no themes");return r.createElement(me.Provider,{children:Y})}var Ve=e(46611);class lt{constructor(){X(this,"apis",[])}add(Z,q){return this.apis.push([Z.id,q]),q}build(){return new Qe(new Map(this.apis))}}class Qe{static builder(){return new lt}static from(Z){return new Qe(new Map(Z.map(([q,ie])=>[q.id,ie])))}static with(Z,q){return new Qe(new Map([[Z.id,q]]))}constructor(Z){this.apis=Z}with(Z,q){return new Qe(new Map([...this.apis,[Z.id,q]]))}get(Z){return this.apis.get(Z.id)}}function Ct(Y){const Z=new Map;return Y&&Y({bind:(ie,me)=>{for(const[be,Le]of Object.entries(me)){const Se=ie[be];if(!Se)throw new Error(`Key ${be} is not an existing external route`);if(!Le&&!Se.optional)throw new Error(`External route ${be} is required but was undefined`);Le&&Z.set(Se,Le)}}}),Z}const oe=(0,r.createContext)({routeObjects:[]});function ue(Y){var q;let{pathname:Z}=new URL((q=Y.getOptionalString("app.baseUrl"))!=null?q:"/","http://dummy.dev");return Z=Z.replace(/\/*$/,""),Z}function Xe(Y,Z,q){var _e;const ie=Boolean(Y),me=(0,d.default)(Y||(()=>Promise.resolve([])));let be;if(ie&&me.loading){const{Progress:ke}=Z;be=r.createElement(ke,null)}else if(me.error){const{BootErrorPage:ke}=Z;be=r.createElement(ke,{step:"load-config",error:me.error})}const{ThemeProvider:Le=we}=Z;return be?{node:r.createElement(i.ApiProvider,{apis:Qe.with(R.appThemeApiRef,q)},r.createElement(Le,null,be))}:{api:i.ConfigReader.fromConfigs((_e=me.value)!=null?_e:[])}}class Ge{constructor(Z){this.app=Z}getPlugins(){return this.app.getPlugins()}getSystemIcon(Z){return this.app.getSystemIcon(Z)}getComponents(){return this.app.getComponents()}}class $e{constructor(Z){X(this,"apiHolder");X(this,"configApi");X(this,"apis");X(this,"icons");X(this,"plugins");X(this,"components");X(this,"themes");X(this,"configLoader");X(this,"defaultApis");X(this,"bindRoutes");X(this,"appIdentityProxy",new qe);X(this,"apiFactoryRegistry");var q,ie,me,be;this.apis=(q=Z.apis)!=null?q:[],this.icons=Z.icons,this.plugins=new Set((ie=Z.plugins)!=null?ie:[]),this.components=Z.components,this.themes=Z.themes,this.configLoader=(me=Z.configLoader)!=null?me:Ve.t,this.defaultApis=(be=Z.defaultApis)!=null?be:[],this.bindRoutes=Z.bindRoutes,this.apiFactoryRegistry=new c.ApiFactoryRegistry}getPlugins(){return Array.from(this.plugins)}getSystemIcon(Z){return this.icons[Z]}getComponents(){return this.components}getProvider(){const Z=new Ge(this);let q=!1;return({children:me})=>{const be=(0,r.useMemo)(()=>i.AppThemeSelector.createWithStorage(this.themes),[]),{routing:Le,featureFlags:Se,routeBindings:_e}=(0,r.useMemo)(()=>{const ut=o({root:me,discoverers:[m,y],collectors:{routing:b,collectedPlugins:g,featureFlags:x}});return ut.collectedPlugins.forEach(Dt=>this.plugins.add(Dt)),this.verifyPlugins(this.plugins),this.getApiHolder(),{...ut,routeBindings:Ct(this.bindRoutes)}},[me]);q||(q=!0,Je(Le.paths,Le.parents),at(_e,this.plugins));const ke=Xe(this.configLoader,this.components,be),Et="api"in ke;if(Et){const{api:ut}=ke;this.configApi=ut}if((0,r.useEffect)(()=>{if(Et){const ut=this.getApiHolder().get(R.featureFlagsApiRef);for(const Dt of this.plugins.values())if("getFeatureFlags"in Dt)for(const Ot of Dt.getFeatureFlags())ut.registerFlag({name:Ot.name,pluginId:Dt.getId()});else for(const Ot of Dt.output())Ot.type==="feature-flag"&&ut.registerFlag({name:Ot.name,pluginId:Dt.getId()});for(const Dt of Se)ut.registerFlag({name:Dt,pluginId:""})}},[Et,ke,Se]),"node"in ke)return ke.node;const{ThemeProvider:St=we}=this.components;return r.createElement(i.ApiProvider,{apis:this.getApiHolder()},r.createElement(yt,{appContext:Z},r.createElement(St,null,r.createElement(Ue,{routePaths:Le.paths,routeParents:Le.parents,routeObjects:Le.objects,routeBindings:_e,basePath:ue(ke.api)},r.createElement(oe.Provider,{value:{routeObjects:Le.objects}},me)))))}}getRouter(){const{Router:Z,SignInPage:q}=this.components,ie=({component:be,children:Le})=>{const[Se,_e]=(0,r.useState)(),ke=(0,R.useApi)(R.configApiRef),Et=ue(ke);return Se?(this.appIdentityProxy.setTarget(Se,{signOutTargetUrl:Et||"/"}),Le):r.createElement(be,{onSignInSuccess:_e})};return({children:be})=>{const Le=(0,R.useApi)(R.configApiRef),Se=ue(Le),_e=`${Se}/*`,{routeObjects:ke}=(0,r.useContext)(oe);return q?r.createElement(Z,null,r.createElement(Re,{routeObjects:ke}),r.createElement(ie,{component:q},r.createElement(t.Z5,null,r.createElement(t.AW,{path:_e,element:r.createElement(r.Fragment,null,be)})))):(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()=>{}},{signOutTargetUrl:Se||"/"}),r.createElement(Z,null,r.createElement(Re,{routeObjects:ke}),r.createElement(t.Z5,null,r.createElement(t.AW,{path:_e,element:r.createElement(r.Fragment,null,be)}))))}}getApiHolder(){if(this.apiHolder){for(const Z of this.plugins)for(const q of Z.getApis())this.apiFactoryRegistry.get(q.api)||this.apiFactoryRegistry.register("default",q);return c.ApiResolver.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder}this.apiFactoryRegistry.register("static",{api:R.appThemeApiRef,deps:{},factory:()=>i.AppThemeSelector.createWithStorage(this.themes)}),this.apiFactoryRegistry.register("static",{api:R.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:R.identityApiRef,deps:{},factory:()=>this.appIdentityProxy}),this.apiFactoryRegistry.register("default",{api:R.featureFlagsApiRef,deps:{},factory:()=>new i.LocalStorageFeatureFlags});for(const Z of this.defaultApis)this.apiFactoryRegistry.register("default",Z);for(const Z of this.plugins)for(const q of Z.getApis())if(!this.apiFactoryRegistry.register("default",q))throw new Error(`Plugin ${Z.getId()} tried to register duplicate or forbidden API factory for ${q.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 c.ApiResolver.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder=new c.ApiResolver(this.apiFactoryRegistry),this.apiHolder}verifyPlugins(Z){const q=new Set;for(const ie of Z){const me=ie.getId();if(q.has(me))throw new Error(`Duplicate plugin found '${me}'`);q.add(me)}}}function ct(Y){return new $e(Y)}},46611:function(ee,s,e){"use strict";e.d(s,{t:function(){return r}});const r=async(t="__APP_INJECTED_RUNTIME_CONFIG__")=>{const d=[{context:"app-config.yaml",data:{app:{title:"Techdocs Preview App",baseUrl:"http://localhost:3000"},backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}}}];if(!d)throw new Error("No static configuration provided");if(!Array.isArray(d))throw new Error("Static configuration has invalid format");const i=d.slice();if(t!=="__app_injected_runtime_config__".toLocaleUpperCase("en-US"))try{const c=JSON.parse(t);Array.isArray(c)?i.push(...c):i.push({data:c,context:"env"})}catch(c){throw new Error(`Failed to load runtime configuration, ${c}`)}const R=window.__APP_CONFIG__;return R&&i.push({context:"window",data:R}),i}},44056:function(ee,s,e){"use strict";e.d(s,{createSpecializedApp:function(){return r.b},defaultConfigLoader:function(){return t.t}});var r=e(82370),t=e(46611),d=e(73495),i=e.n(d);e.o(d,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return d.AtlassianAuth}}),e.o(d,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return d.BitbucketAuth}}),e.o(d,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return d.FlatRoutes}}),e.o(d,"GithubAuth")&&e.d(s,{GithubAuth:function(){return d.GithubAuth}}),e.o(d,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return d.GitlabAuth}}),e.o(d,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return d.GoogleAuth}}),e.o(d,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return d.MicrosoftAuth}}),e.o(d,"OktaAuth")&&e.d(s,{OktaAuth:function(){return d.OktaAuth}}),e.o(d,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return d.OneLoginAuth}})},73495:function(){},49208:function(ee,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 d.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 d=e(63938)},57018:function(ee,s,e){"use strict";e.d(s,{RefreshingAuthSessionManager:function(){return c}});function r(u,m){for(const y of m)if(!u.has(y))return!1;return!0}class t{constructor(m){this.options=m}sessionExistsAndHasScope(m,y){if(!m)return!1;if(!y||this.options.sessionScopes===void 0)return!0;const g=this.options.sessionScopes(m);return r(g,y)}getExtendedScope(m,y){const g=new Set(this.options.defaultScopes);if(m&&this.options.sessionScopes!==void 0){const E=this.options.sessionScopes(m);for(const S of E)g.add(S)}if(y)for(const E of y)g.add(E);return g}}var d=e(98005),i=e(36964);class R{constructor(){X(this,"subject",new d.X(i.SessionState.SignedOut));X(this,"signedIn",!1)}setIsSignedIn(m){this.signedIn!==m&&(this.signedIn=m,this.subject.next(this.signedIn?i.SessionState.SignedIn:i.SessionState.SignedOut))}sessionState$(){return this.subject}}class c{constructor(m){X(this,"connector");X(this,"helper");X(this,"sessionScopesFunc");X(this,"sessionShouldRefreshFunc");X(this,"stateTracker",new R);X(this,"refreshPromise");X(this,"currentSession");const{connector:y,defaultScopes:g=new Set,sessionScopes:E,sessionShouldRefresh:S}=m;this.connector=y,this.sessionScopesFunc=E,this.sessionShouldRefreshFunc=S,this.helper=new t({sessionScopes:E,defaultScopes:g})}async getSession(m){if(this.helper.sessionExistsAndHasScope(this.currentSession,m.scopes)){if(!this.sessionShouldRefreshFunc(this.currentSession))return this.currentSession;try{const g=await this.collapsedSessionRefresh(),E=this.sessionScopesFunc(this.currentSession),S=this.sessionScopesFunc(g);return r(S,E)&&(this.currentSession=g),g}catch(g){if(m.optional)return;throw g}}if(!this.currentSession&&!m.instantPopup)try{const y=await this.collapsedSessionRefresh();return this.currentSession=y,this.getSession(m)}catch{}if(!m.optional)return this.currentSession=await this.connector.createSession({...m,scopes:this.helper.getExtendedScope(this.currentSession,m.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 m=await this.refreshPromise;return this.stateTracker.setIsSignedIn(!0),m}finally{delete this.refreshPromise}}}class o{constructor(m){X(this,"connector");X(this,"helper");X(this,"stateTracker",new SessionStateTracker);X(this,"currentSession");const{connector:y,defaultScopes:g=new Set,sessionScopes:E}=m;this.connector=y,this.helper=new SessionScopeHelper({sessionScopes:E,defaultScopes:g})}setSession(m){this.currentSession=m,this.stateTracker.setIsSignedIn(Boolean(m))}async getSession(m){if(this.helper.sessionExistsAndHasScope(this.currentSession,m.scopes))return this.currentSession;if(!m.optional)return this.currentSession=await this.connector.createSession({...m,scopes:this.helper.getExtendedScope(this.currentSession,m.scopes)}),this.stateTracker.setIsSignedIn(!0),this.currentSession}async removeSession(){this.currentSession=void 0,this.stateTracker.setIsSignedIn(!1)}sessionState$(){return this.stateTracker.sessionState$()}}},98005:function(ee,s,e){"use strict";e.d(s,{J:function(){return d},X:function(){return i}});var r=e(82394),t=e.n(r);class d{constructor(){X(this,"isClosed",!1);X(this,"terminatingError");X(this,"observable",new(t())(c=>this.isClosed?(this.terminatingError?c.error(this.terminatingError):c.complete(),()=>{}):(this.subscribers.add(c),()=>{this.subscribers.delete(c)})));X(this,"subscribers",new Set)}[Symbol.observable](){return this}get closed(){return this.isClosed}next(c){if(this.isClosed)throw new Error("PublishSubject is closed");this.subscribers.forEach(o=>o.next(c))}error(c){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.terminatingError=c,this.subscribers.forEach(o=>o.error(c))}complete(){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.subscribers.forEach(c=>c.complete())}subscribe(c,o,u){const m=typeof c=="function"?{next:c,error:o,complete:u}:c;return this.observable.subscribe(m)}}class i{constructor(c){X(this,"isClosed");X(this,"currentValue");X(this,"terminatingError");X(this,"observable");X(this,"subscribers",new Set);this.isClosed=!1,this.currentValue=c,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(c){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.currentValue=c,this.subscribers.forEach(o=>o.next(c))}error(c){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.terminatingError=c,this.subscribers.forEach(o=>o.error(c))}complete(){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.subscribers.forEach(c=>c.complete())}subscribe(c,o,u){const m=typeof c=="function"?{next:c,error:o,complete:u}:c;return this.observable.subscribe(m)}}},88934:function(ee,s,e){"use strict";e.d(s,{L:function(){return d}});var r=e(36964),t=e(2784);const d=i=>{const{children:R}=i,c=(0,r.useApi)(r.featureFlagsApiRef),o="with"in i?c.isActive(i.with):!c.isActive(i.without);return t.createElement(t.Fragment,null,o?R:null)};(0,r.attachComponentData)(d,"core.featureFlagged",!0)},63938:function(ee,s,e){"use strict";e.d(s,{w:function(){return i}});var r=e(2784),t=e(10289),d=e(36964);const i=c=>{const o=(0,d.useApp)(),{NotFoundErrorPage:u}=o.getComponents(),m=(0,d.useElementFilter)(c.children,y=>y.getElements().flatMap(g=>{var S;let E=g.props.path;return E===""?[]:(E=(S=E==null?void 0:E.replace(/\/\*$/,""))!=null?S:"/",[{path:E,element:g,children:g.props.children?[{path:E==="/"?"/":"/*",element:g.props.children}]:void 0}])}).sort((g,E)=>E.path.localeCompare(g.path)).map(g=>(g.path=g.path==="/"?"/":`${g.path}/*`,g)));return m.push({element:r.createElement(u,null),path:"/*"}),(0,t.V$)(m)};var R=e(88934)},82339:function(ee,s,e){"use strict";e.d(s,{Button:function(){return se},CodeSnippet:function(){return Pe},Content:function(){return to},ContentHeader:function(){return mi},CreateButton:function(){return le},DependencyGraph:function(){return mn},DependencyGraphTypes:function(){return r},EmptyState:function(){return Qt},ErrorPage:function(){return Ei},ErrorPanel:function(){return It},Header:function(){return uo},HeaderIconLinkRow:function(){return kn},HeaderLabel:function(){return Li},HeaderTabs:function(){return no},InfoCard:function(){return cr},ItemCardGrid:function(){return wi},ItemCardHeader:function(){return Fi},Link:function(){return K},LogViewer:function(){return Or},MissingAnnotationEmptyState:function(){return En},OverflowTooltip:function(){return yr},Page:function(){return mo},PageWithHeader:function(){return Ni},Progress:function(){return Br},ResponseErrorPanel:function(){return on},RoutedTabs:function(){return ro},Select:function(){return ot},Sidebar:function(){return ls},SidebarDivider:function(){return Cs},SidebarItem:function(){return _a},SidebarPage:function(){return Jo},SubvalueCell:function(){return $s},SupportButton:function(){return Vo},Table:function(){return ai},WarningPanel:function(){return rn},sidebarConfig:function(){return qn},useSidebarOpenState:function(){return fa},useSidebarPinState:function(){return Wr}});var r={};e.r(r),e.d(r,{Nm:function(){return fe},ht:function(){return Ve},LJ:function(){return we}});var t=e(2784),d=e(36964),i=e(19928);function R(n){const[a,l]=useState([]),f=useApi(alertApiRef),{anchorOrigin:p={vertical:"top",horizontal:"center"}}=n;if(useEffect(()=>{const z=f.alert$().subscribe(G=>l(H=>H.concat(G)));return()=>{z.unsubscribe()}},[f]),a.length===0)return null;const[v]=a,P=()=>{l(z=>z.filter(G=>G!==v))};return React.createElement(Snackbar,{open:!0,anchorOrigin:p},React.createElement(Alert,{action:React.createElement(IconButton,{color:"inherit",size:"small",onClick:P,"data-testid":"error-button-close"},React.createElement(CloseIcon,null)),severity:v.severity},React.createElement("span",null,v.message.toString(),a.length>1&&React.createElement("em",null,` (${a.length-1} older ${pluralize("message",a.length-1)})`))))}var c=e(79692),o=e(12420);const u=(0,c.Z)(n=>(0,o.Z)({avatar:{width:"4rem",height:"4rem",color:"#fff",fontWeight:n.typography.fontWeightBold,letterSpacing:"1px",textTransform:"uppercase"}}),{name:"BackstageAvatar"});function m(n){const{displayName:a,picture:l,customStyles:f}=n,p=u();let v={...f};return l||(v={backgroundColor:stringToColor(a||""),...f}),React.createElement(MaterialAvatar,{alt:a,src:l,className:p.avatar,style:v},a&&extractInitials(a))}var y=e(77277),g=e(72779),E=e.n(g),S=e(86689),b=e(62833),x=e(76635);const w=(0,c.Z)({visuallyHidden:{clip:"rect(0 0 0 0)",clipPath:"inset(50%)",overflow:"hidden",position:"absolute",whiteSpace:"nowrap",height:1,width:1},externalLink:{position:"relative"}},{name:"Link"}),B=n=>/^([a-z+.-]+):/.test(n),F=()=>{try{return(0,d.useApi)(d.configApiRef).getOptionalString("app.baseUrl")}catch{return}},O=()=>{var f;const n="http://dummy.dev",a=(f=F())!=null?f:"/",{pathname:l}=new URL(a,n);return(0,x.trimEnd)(l,"/")},D=n=>{let a=String(n);const l=O(),f=B(a),p=a.startsWith(l);return!f&&!p&&(a=l.concat(a)),a},$=n=>{var a;return n instanceof Array?n.map($).join(" ").trim():typeof n=="object"&&n?$((a=n==null?void 0:n.props)==null?void 0:a.children):["string","number"].includes(typeof n)?String(n):""},K=t.forwardRef(({onClick:n,noTrack:a,...l},f)=>{const p=w(),v=(0,d.useAnalytics)(),P=D(l.to),z=$(l.children)||P,G=B(P),H=G&&!!/^https?:/.exec(P),ae=_=>{n==null||n(_),a||v.captureEvent("click",z,{attributes:{to:P}})};return G?t.createElement(S.Z,{...H?{target:"_blank",rel:"noopener"}:{},...l,ref:f,href:P,onClick:ae,className:E()(p.externalLink,l.className)},l.children,t.createElement("span",{className:p.visuallyHidden},", Opens in a new window")):t.createElement(S.Z,{...l,ref:f,component:b.rU,to:P,onClick:ae})}),ne=t.forwardRef((n,a)=>t.createElement(K,{ref:a,...n,color:"initial"})),se=t.forwardRef((n,a)=>t.createElement(y.Z,{ref:a,component:ne,...n}));var Ee=e(60364),Ue=e(61837),xe=e(80030),We=e(19353),Re=e(95074);function Je(n){const{text:a,tooltipDelay:l=1e3,tooltipText:f="Text copied to clipboard","aria-label":p="Copy text"}=n,v=(0,d.useApi)(d.errorApiRef),[P,z]=(0,t.useState)(!1),[{error:G},H]=(0,Re.Z)();(0,t.useEffect)(()=>{G&&v.post(G)},[G,v]);const ae=_=>{_.stopPropagation(),z(!0),H(a)};return t.createElement(t.Fragment,null,t.createElement(xe.ZP,{id:"copy-test-tooltip",title:f,placement:"top",leaveDelay:l,onClose:()=>z(!1),open:P},t.createElement(Ue.Z,{onClick:ae,"aria-label":p},t.createElement(We.Z,null))))}var at=e(83229),Tt=e(26639),yt=e(39595);function Pe(n){const{text:a,language:l,showLineNumbers:f=!1,highlightedNumbers:p,customStyle:v,showCopyCodeButton:P=!1}=n,z=(0,Ee.Z)(),G=z.palette.type==="dark"?Tt.Z:yt.Z,H=z.palette.type==="dark"?"#256bf3":"#e6ffed";return t.createElement("div",{style:{position:"relative"}},t.createElement(at.Z,{customStyle:v,language:l,style:G,showLineNumbers:f,wrapLines:!0,lineNumberStyle:{color:z.palette.textVerySubtle},lineProps:ae=>p!=null&&p.includes(ae)?{style:{backgroundColor:H}}:{}},a),P&&t.createElement("div",{style:{position:"absolute",top:0,right:0}},t.createElement(Je,{text:a})))}var mt=e(41156),qe=e(88188);function le(n){const{title:a,to:l}=n,f=(0,mt.Z)(p=>p.breakpoints.down("xs"));return l?f?t.createElement(Ue.Z,{component:b.rU,color:"primary",title:a,size:"small",to:l},t.createElement(qe.Z,null)):t.createElement(y.Z,{component:b.rU,variant:"contained",color:"primary",to:l},a):null}var fe;(function(n){const a="TB";n.TOP_BOTTOM=a;const l="BT";n.BOTTOM_TOP=l;const f="LR";n.LEFT_RIGHT=f;const p="RL";n.RIGHT_LEFT=p})(fe||(fe={}));var Me;(function(n){const a="UL";n.UP_LEFT=a;const l="UR";n.UP_RIGHT=l;const f="DL";n.DOWN_LEFT=f;const p="DR";n.DOWN_RIGHT=p})(Me||(Me={}));var we;(function(n){const a="network-simplex";n.NETWORK_SIMPLEX=a;const l="tight-tree";n.TIGHT_TREE=l;const f="longest-path";n.LONGEST_PATH=f})(we||(we={}));var Ve;(function(n){const a="l";n.LEFT=a;const l="r";n.RIGHT=l;const f="c";n.CENTER=f})(Ve||(Ve={}));var lt=e(84945),Qe=e(11105),Ct=e(97963),oe=e(46506),ue=e.n(oe),Xe=e(54073),Ge=e.n(Xe),$e=e(10368);const ct=(0,c.Z)(n=>({node:{fill:n.palette.primary.light,stroke:n.palette.primary.light},text:{fill:n.palette.primary.contrastText}}),{name:"BackstageDependencyGraphDefaultNode"});function Y({node:{id:n}}){const a=ct(),[l,f]=t.useState(0),[p,v]=t.useState(0),P=t.useRef(null);t.useLayoutEffect(()=>{if(P.current){let{height:ae,width:_}=P.current.getBBox();ae=Math.round(ae),_=Math.round(_),(ae!==p||_!==l)&&(f(_),v(ae))}},[l,p]);const z=10,G=l+z*2,H=p+z*2;return t.createElement("g",null,t.createElement("rect",{className:a.node,width:G,height:H,rx:10}),t.createElement("text",{ref:P,className:a.text,y:H/2,x:G/2,textAnchor:"middle",alignmentBaseline:"middle"},n))}const Z="arrow-marker",q="node",ie="edge",me="label",be=(0,$e.Z)(n=>({node:{transition:`${n.transitions.duration.shortest}ms`}}),{name:"BackstageDependencyGraphNode"}),Le=n=>t.createElement(Y,{...n});function Se({render:n=Le,setNode:a,node:l}){const{width:f,height:p,x:v=0,y:P=0}=l,z=l,G=be(),H=t.useRef(null);return t.useLayoutEffect(()=>{if(H.current){let{height:ae,width:_}=H.current.getBBox();ae=Math.round(ae),_=Math.round(_),(ae!==p||_!==f)&&a(l.id,{...l,height:ae,width:_})}},[l,f,p,a]),t.createElement("g",{ref:H,"data-testid":q,className:G.node,transform:`translate(${v-f/2},${P-p/2})`},n({node:z}))}var _e=e(55876),ke=e(66481),Et=e(19574),St=e.n(Et);const ut=(0,$e.Z)(n=>({text:{fill:n.palette.textContrast}}),{name:"BackstageDependencyGraphDefaultLabel"});function Dt({edge:{label:n}}){const a=ut();return t.createElement("text",{className:a.text,textAnchor:"middle"},n)}const Ot=(0,$e.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"}),bt=n=>t.createElement(Dt,{...n}),Pt=_e.Z().x(n=>n.x).y(n=>n.y).curve(ke.Z);function Ut({render:n=bt,setEdge:a,id:l,edge:f}){const{x:p=0,y:v=0,width:P,height:z,points:G}=f,H=f,ae=Ot(),_=t.useRef(null);t.useLayoutEffect(()=>{if(_.current){let{height:Te,width:Be}=_.current.getBBox();Te=Math.round(Te),Be=Math.round(Be),(Te!==z||Be!==P)&&a(l,{...f,height:Te,width:Be})}},[f,z,P,a,l]);let Ae="";if(G){const Te=G.filter(Be=>St()(Be.x)&&St()(Be.y));Ae=Pt(Te)||""}return t.createElement(t.Fragment,null,Ae&&t.createElement("path",{"data-testid":ie,className:ae.path,markerEnd:`url(#${Z})`,d:Ae}),H.label?t.createElement("g",{ref:_,"data-testid":me,className:ae.label,transform:`translate(${p},${v})`},n({edge:H})):null)}const Nt="workspace";function mn(n){var sr,Ir;const{edges:a,nodes:l,renderNode:f,direction:p=fe.TOP_BOTTOM,align:v,nodeMargin:P=50,edgeMargin:z=10,rankMargin:G=50,paddingX:H=0,paddingY:ae=0,acyclicer:_,ranker:Ae=we.NETWORK_SIMPLEX,labelPosition:Te=Ve.RIGHT,labelOffset:Be=10,edgeRanks:ft=1,edgeWeight:Mt=1,renderLabel:Vt,defs:qt,zoom:pt="enabled",...Gt}=n,nn=(0,Ct.Z)(),[_t,ar]=t.useState(100),[Hn,jr]=t.useState(100),wt=t.useRef(new(ue()).graphlib.Graph),[Tr,Vr]=t.useState(((sr=wt.current.graph())==null?void 0:sr.width)||0),[br,aa]=t.useState(((Ir=wt.current.graph())==null?void 0:Ir.height)||0),[va,oa]=t.useState([]),[sa,Aa]=t.useState([]),dn=Math.max(Tr,_t),In=Math.max(br,Hn),ur=t.useMemo(()=>Ge()(fn=>{if(!fn)return;const An=Qe.Z(fn),ln=Qe.Z(fn.getElementById(Nt));function jn(){An.call(lt.sP().scaleExtent([1,10]).on("zoom",_n=>{_n.transform.x=Math.min(0,Math.max(_n.transform.x,dn-dn*_n.transform.k)),_n.transform.y=Math.min(0,Math.max(_n.transform.y,In-In*_n.transform.k)),ln.attr("transform",_n.transform)}))}pt==="enabled"?jn():pt==="enable-on-click"&&An.on("click",()=>jn());const{width:Vn,height:ia}=fn.getBoundingClientRect();_t!==Vn&&ar(Vn),Hn!==ia&&jr(ia)},100),[Hn,_t,dn,In,pt]),or=t.useCallback(()=>{const fn=wt.current.nodes(),An=wt.current.edges();fn.forEach(ln=>{l.some(Vn=>Vn.id===ln)||wt.current.removeNode(ln)}),An.forEach(ln=>{a.some(Vn=>Vn.from===ln.v&&Vn.to===ln.w)||wt.current.removeEdge(ln.v,ln.w)}),l.forEach(ln=>{const jn=wt.current.nodes().find(Vn=>ln.id===Vn);if(jn&&wt.current.node(jn)){const{width:Vn,height:ia,x:_n,y:tl}=wt.current.node(jn);wt.current.setNode(jn,{...ln,width:Vn,height:ia,x:_n,y:tl})}else wt.current.setNode(ln.id,{...ln,width:0,height:0})}),a.forEach(ln=>{wt.current.setEdge(ln.from,ln.to,{...ln,label:ln.label,width:0,height:0,labelpos:Te,labeloffset:Be,weight:Mt,minlen:ft})})},[a,l,Te,Be,Mt,ft]),sn=t.useMemo(()=>Ge()(()=>{ue().layout(wt.current);const{height:fn,width:An}=wt.current.graph(),ln=Math.max(0,fn||0),jn=Math.max(0,An||0);Vr(jn),aa(ln),oa(wt.current.nodes()),Aa(wt.current.edges())},250,{leading:!0}),[]);t.useEffect(()=>(wt.current.setGraph({rankdir:p,align:v,nodesep:P,edgesep:z,ranksep:G,marginx:H,marginy:ae,acyclicer:_,ranker:Ae}),or(),sn(),sn.cancel),[_,v,p,z,H,ae,P,G,Ae,or,sn]);function Ln(fn,An){return wt.current.setNode(fn,An),sn(),wt.current}function Pr(fn,An){return wt.current.setEdge(fn,An),sn(),wt.current}return t.createElement("svg",{ref:ur,...Gt,width:"100%",height:In,viewBox:`0 0 ${dn} ${In}`},t.createElement("defs",null,t.createElement("marker",{id:Z,viewBox:"0 0 24 24",markerWidth:"14",markerHeight:"14",refX:"16",refY:"12",orient:"auto",markerUnits:"strokeWidth"},t.createElement("path",{fill:nn.palette.textSubtle,d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})),qt),t.createElement("g",{id:Nt},t.createElement("svg",{width:Tr,height:br,y:In/2-br/2,x:dn/2-Tr/2,viewBox:`0 0 ${Tr} ${br}`},sa.map(fn=>{const An=wt.current.edge(fn);return An?t.createElement(Ut,{key:`${fn.v}-${fn.w}`,id:fn,setEdge:Pr,render:Vt,edge:An}):null}),va.map(fn=>{const An=wt.current.node(fn);return An?t.createElement(Se,{key:fn,setNode:Ln,render:f,node:An}):null}))))}const On=(0,c.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"}),Kt=n=>{var Te;const{variant:a,message:l,id:f,fixed:p=!1}=n,v=On(),z=useApi(storageApiRef).forBucket("notifications"),G=(Te=z.snapshot("dismissedBanners").value)!=null?Te:[],[H,ae]=useState(new Set(G)),_=useObservable(z.observe$("dismissedBanners"));useEffect(()=>{var Be;if(_!=null&&_.value){const ft=(Be=_==null?void 0:_.value)!=null?Be:[];ae(new Set(ft))}},[_==null?void 0:_.value]);const Ae=()=>{z.set("dismissedBanners",[...H,f])};return React.createElement(Snackbar,{anchorOrigin:p?{vertical:"bottom",horizontal:"center"}:{vertical:"top",horizontal:"center"},open:!H.has(f),classes:{root:classNames(v.root,!p&&v.topPosition)}},React.createElement(SnackbarContent,{classes:{root:classNames(v.content,v[a]),message:v.message},message:l,action:[React.createElement(IconButton,{key:"dismiss",title:"Permanently dismiss this message",color:"inherit",onClick:Ae},React.createElement(Close,{className:v.icon}))]}))};var $t=e(60905),nt=e(90436),ce=e.p+"static/missingAnnotation.67f79e98..svg",j=e.p+"static/noInformation.4b426325..svg",ye=e.p+"static/createComponent.975d1e1e..svg",Ke=e.p+"static/noBuild.1715fa71..svg";const rt=(0,c.Z)({generalImg:{width:"95%",zIndex:2,position:"relative",left:"50%",top:"50%",transform:"translate(-50%, 15%)"}},{name:"BackstageEmptyStateImage"}),it=({missing:n})=>{const a=rt();switch(n){case"field":return t.createElement("img",{src:ce,className:a.generalImg,alt:"annotation is missing"});case"info":return t.createElement("img",{src:j,alt:"no Information",className:a.generalImg});case"content":return t.createElement("img",{src:ye,alt:"create Component",className:a.generalImg});case"data":return t.createElement("img",{src:Ke,alt:"no Build",className:a.generalImg});default:return null}},Rt=(0,c.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 Qt(n){const{title:a,description:l,missing:f,action:p}=n,v=Rt();return t.createElement($t.Z,{container:!0,direction:"row",justifyContent:"space-around",alignItems:"flex-start",className:v.root,spacing:2},t.createElement($t.Z,{item:!0,xs:12,md:6},t.createElement($t.Z,{container:!0,direction:"column"},t.createElement($t.Z,{item:!0,xs:!0},t.createElement(nt.Z,{variant:"h5"},a)),t.createElement($t.Z,{item:!0,xs:!0},t.createElement(nt.Z,{variant:"body1"},l)),t.createElement($t.Z,{item:!0,xs:!0,className:v.action},p))),t.createElement($t.Z,{item:!0,xs:12,md:6,className:v.imageContainer},t.createElement(it,{missing:f})))}const en=`apiVersion: backstage.io/v1alpha1
2
- kind: Component
3
- metadata:
4
- name: example
5
- description: example.com
6
- annotations:
7
- ANNOTATION: value
8
- spec:
9
- type: website
10
- lifecycle: production
11
- owner: user:guest`,tn=(0,c.Z)(n=>({code:{borderRadius:6,margin:`${n.spacing(2)}px 0px`,background:n.palette.type==="dark"?"#444":"#fff"}}),{name:"BackstageMissingAnnotationEmptyState"});function En(n){const{annotation:a,readMoreUrl:l}=n,f=l||"https://backstage.io/docs/features/software-catalog/well-known-annotations",p=tn(),v=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(Qt,{missing:"field",title:"Missing Annotation",description:v,action:t.createElement(t.Fragment,null,t.createElement(nt.Z,{variant:"body1"},"Add the annotation to your component YAML as shown in the highlighted example below:"),t.createElement("div",{className:p.code},t.createElement(Pe,{text:en.replace("ANNOTATION",a),language:"yaml",showLineNumbers:!0,highlightedNumbers:[6,7],customStyle:{background:"inherit",fontSize:"115%"}})),t.createElement(y.Z,{color:"primary",component:K,to:f},"Read more"))})}var U=e(11776),re=e(38402),te=e(49378),ve=e(41128),Ne=e(27616),ht=e(8284),He=e(70660),Zt=e(91750),Wt=e(38016);const Ht=(n,a)=>(a.palette.type==="light"?ve._j:ve.$n)(a.palette[n].light,.6),Ft=(n,a)=>(a.palette.type==="light"?ve.$n:ve._j)(a.palette[n].light,.9),vt=(0,c.Z)(n=>({root:{marginRight:n.spacing(1),fill:({severity:a})=>Ht(a,n)}})),kt=({severity:n})=>{const a=vt({severity:n});return t.createElement(Zt.Z,{classes:a})},hn=({severity:n})=>{const a=vt({severity:n});return t.createElement(Wt.Z,{classes:a})},Yt=(0,c.Z)(n=>({panel:{backgroundColor:({severity:a})=>Ft(a,n),color:({severity:a})=>Ht(a,n),verticalAlign:"middle"},summary:{display:"flex",flexDirection:"row"},summaryText:{color:({severity:a})=>Ht(a,n),fontWeight:"bold"},message:{width:"100%",display:"block",color:({severity:a})=>Ht(a,n),backgroundColor:({severity:a})=>Ft(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"}),Xt=n=>n.charAt(0).toLocaleUpperCase("en-US")+n.slice(1);function rn(n){const{severity:a="warning",title:l,message:f,children:p,defaultExpanded:v}=n,P=Yt({severity:a}),z=Xt(a)+(l?`: ${l}`:"");return t.createElement(Ne.Z,{defaultExpanded:v!=null?v:!1,className:P.panel,role:"alert"},t.createElement(ht.Z,{expandIcon:t.createElement(hn,{severity:a}),className:P.summary},t.createElement(kt,{severity:a}),t.createElement(nt.Z,{className:P.summaryText,variant:"subtitle1"},z)),(f||p)&&t.createElement(He.Z,null,t.createElement($t.Z,{container:!0},f&&t.createElement($t.Z,{item:!0,xs:12},t.createElement(nt.Z,{className:P.message,variant:"body1"},f)),p&&t.createElement($t.Z,{item:!0,xs:12,className:P.details},p))))}const an=(0,c.Z)(n=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:n.spacing(2)},divider:{margin:n.spacing(2)}}),{name:"BackstageErrorPanel"}),Bt=({error:n,message:a,stack:l,children:f})=>{const p=an();return t.createElement(U.Z,{dense:!0},t.createElement(re.Z,{alignItems:"flex-start"},t.createElement(te.Z,{classes:{secondary:p.text},primary:"Error",secondary:n}),t.createElement(Je,{text:n})),t.createElement(re.Z,{alignItems:"flex-start"},t.createElement(te.Z,{classes:{secondary:p.text},primary:"Message",secondary:a}),t.createElement(Je,{text:a})),l&&t.createElement(re.Z,{alignItems:"flex-start"},t.createElement(te.Z,{classes:{secondary:p.text},primary:"Stack Trace",secondary:l}),t.createElement(Je,{text:l})),f)};function It(n){const{title:a,error:l,defaultExpanded:f,children:p}=n;return t.createElement(rn,{severity:"error",title:a!=null?a:l.message,defaultExpanded:f},t.createElement(Bt,{error:l.name,message:l.message,stack:l.stack,children:p}))}var cn=e(85256);const Sn=(0,c.Z)(n=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:n.spacing(2)},divider:{margin:n.spacing(2)}}),{name:"BackstageResponseErrorPanel"});function on(n){var Be;const{title:a,error:l,defaultExpanded:f}=n,p=Sn();if(l.name!=="ResponseError")return t.createElement(It,{title:a!=null?a:l.message,defaultExpanded:f,error:l});const{body:v,cause:P}=l,{request:z,response:G}=v,H=`${G.statusCode}: ${P.name}`,ae=z&&`${z.method} ${z.url}`,_=P.message.replace(/\\n/g,`
12
- `),Ae=(Be=P.stack)==null?void 0:Be.replace(/\\n/g,`
13
- `),Te=JSON.stringify(v,void 0,2);return t.createElement(It,{title:a!=null?a:l.message,defaultExpanded:f,error:{name:H,message:_,stack:Ae}},ae&&t.createElement(re.Z,{alignItems:"flex-start"},t.createElement(te.Z,{classes:{secondary:p.text},primary:"Request",secondary:z?`${ae}`:void 0}),t.createElement(Je,{text:ae})),t.createElement(t.Fragment,null,t.createElement(cn.Z,{component:"li",className:p.divider}),t.createElement(re.Z,{alignItems:"flex-start"},t.createElement(te.Z,{classes:{secondary:p.text},primary:"Full Error as JSON"})),t.createElement(Pe,{language:"json",text:Te,showCopyCodeButton:!0})))}var Rn=e(47093);function Cn(n){const a=document.createElement("div");return a.setAttribute("id",n),a}function xn(n){document.body.insertBefore(n,document.body.lastElementChild.nextElementSibling)}function wn(n){const a=useRef(null);useEffect(function(){const p=document.querySelector(`#${n}`),v=p||Cn(n);return p||xn(v),v.appendChild(a.current),function(){a.current.remove(),v.childNodes.length===-1&&v.remove()}},[n]);function l(){return a.current||(a.current=document.createElement("div")),a.current}return l()}var M=null;const h="core.calloutSeen";function C(){const[n,a]=useState(()=>{const f=localStorage.getItem(h);return f?JSON.parse(f):{}}),l=useCallback((f,p)=>{const v=localStorage.getItem(h),z={...v?JSON.parse(v):{},[f]:p};a(z),localStorage.setItem(h,JSON.stringify(z))},[]);return{states:n,setState:l}}function L(n){const{states:a,setState:l}=C(),f=useCallback(()=>{l(n,!0)},[l,n]);return{seen:a[n]===!0,markSeen:f}}function V(n){const{seen:a,markSeen:l}=L(n);return{show:a===!1,hide:l}}const ge=(0,c.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 pe(n){const{featureId:a,title:l,description:f,children:p}=n,{show:v,hide:P}=useShowCallout(a),z=usePortal("core.callout"),G=useRef(null),[H,ae]=useState(),_=ge(),Ae=useCallback(()=>{if(G.current){const Te=G.current.getBoundingClientRect(),Be=Math.max(Te.width,Te.height),ft=800,Mt=Te.x-(Be-Te.width)/2-ft,Vt=Te.y-(Be-Te.height)/2-ft,qt=Be+2*ft,pt=450,Gt=Te.x+Te.width/2-pt,nn=Te.y-(Be-Te.height)/2+Be+20;ae({dotLeft:Mt,dotTop:Vt,dotSize:qt,borderWidth:ft,textTop:nn,textLeft:Gt,textWidth:pt})}},[]);return useEffect(()=>(window.addEventListener("resize",Ae),window.addEventListener("scroll",Ae),()=>{window.removeEventListener("resize",Ae),window.removeEventListener("scroll",Ae)}),[Ae]),useLayoutEffect(Ae,[G.current,Ae]),v?React.createElement(React.Fragment,null,React.createElement("div",{className:_.featureWrapper,ref:G},p),createPortal(React.createElement("div",{className:_.backdrop},React.createElement(ClickAwayListener,{onClickAway:P},React.createElement(React.Fragment,null,React.createElement("div",{className:_.dot,"data-testid":"dot",style:{left:H==null?void 0:H.dotLeft,top:H==null?void 0:H.dotTop,width:H==null?void 0:H.dotSize,height:H==null?void 0:H.dotSize,borderWidth:H==null?void 0:H.borderWidth},onClick:P,onKeyDown:P,role:"button",tabIndex:0},React.createElement("div",{className:_.pulseCircle})),React.createElement("div",{className:_.text,"data-testid":"text",style:{left:H==null?void 0:H.textLeft,top:H==null?void 0:H.textTop,width:H==null?void 0:H.textWidth}},React.createElement(Typography,{variant:"h2",paragraph:!0},l),React.createElement(Typography,null,f))))),z)):React.createElement(React.Fragment,null,p)}var Ie=e(35292);const et=(0,c.Z)(n=>({link:{display:"grid",justifyItems:"center",gridGap:4,textAlign:"center"},disabled:{color:n.palette.text.secondary,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 zt({color:n="primary",disabled:a=!1,href:l="#",icon:f=t.createElement(Ie.Z,null),label:p,onClick:v,title:P}){const z=et();return a?t.createElement(S.Z,{title:P,className:E()(z.link,z.disabled),underline:"none"},f,t.createElement("span",{className:z.label},p)):t.createElement(S.Z,{title:P,className:E()(z.link,z[n]),to:l,component:K,onClick:v},f,t.createElement("span",{className:z.label},p))}const pn=(0,c.Z)(n=>({links:{margin:n.spacing(2,0),display:"grid",gridAutoFlow:"column",gridAutoColumns:"min-content",gridGap:n.spacing(3)}}),{name:"BackstageHeaderIconLinkRow"});function kn(n){const{links:a}=n,l=pn();return t.createElement("nav",{className:l.links},a.map((f,p)=>t.createElement(zt,{key:p+1,...f})))}const dr=n=>{const a=n==="dark"?"16%":"97%";return`
14
- hsl(0, 0%, ${a}) 0%,
15
- hsla(0, 0%, ${a}, 0.987) 8.1%,
16
- hsla(0, 0%, ${a}, 0.951) 15.5%,
17
- hsla(0, 0%, ${a}, 0.896) 22.5%,
18
- hsla(0, 0%, ${a}, 0.825) 29%,
19
- hsla(0, 0%, ${a}, 0.741) 35.3%,
20
- hsla(0, 0%, ${a}, 0.648) 41.2%,
21
- hsla(0, 0%, ${a}, 0.55) 47.1%,
22
- hsla(0, 0%, ${a}, 0.45) 52.9%,
23
- hsla(0, 0%, ${a}, 0.352) 58.8%,
24
- hsla(0, 0%, ${a}, 0.259) 64.7%,
25
- hsla(0, 0%, ${a}, 0.175) 71%,
26
- hsla(0, 0%, ${a}, 0.104) 77.5%,
27
- hsla(0, 0%, ${a}, 0.049) 84.5%,
28
- hsla(0, 0%, ${a}, 0.013) 91.9%,
29
- hsla(0, 0%, ${a}, 0) 100%
30
- `},fr=100,mr=10,Gn=(0,c.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:fr,height:`calc(100% + ${mr}px)`,transition:"opacity 300ms",pointerEvents:"none"},fadeLeft:{left:-mr,background:`linear-gradient(90deg, ${dr(n.palette.type)})`},fadeRight:{right:-mr,background:`linear-gradient(270deg, ${dr(n.palette.type)})`},fadeHidden:{opacity:0},button:{position:"absolute"},buttonLeft:{left:-n.spacing(2)},buttonRight:{right:-n.spacing(2)}}),{name:"BackstageHorizontalScrollGrid"});function $n(n){const[[a,l],f]=React.useState([0,0]);return React.useLayoutEffect(()=>{const p=n.current;if(!p){f([0,0]);return}const v=()=>{const P=p.scrollLeft,z=p.scrollWidth-p.offsetWidth-p.scrollLeft;f([P,z])};return v(),p.addEventListener("scroll",v),window.addEventListener("resize",v),()=>{p.removeEventListener("scroll",v),window.removeEventListener("resize",v)}},[n]),[a,l]}function er(n,a,l){const[f,p]=React.useState(0);return React.useLayoutEffect(()=>{if(f===0)return;const v=performance.now(),P=requestAnimationFrame(z=>{if(!n.current)return;const G=z-v,H=Math.abs(f)*G/a,_=Math.max(l,H)*Math.sign(f);n.current.scrollBy({left:_});const Ae=f-_;Math.sign(f)!==Math.sign(Ae)?p(0):p(Ae)});return()=>cancelAnimationFrame(P)},[n,f,a,l]),p}function hr(n){const{scrollStep:a=100,scrollSpeed:l=50,minScrollDistance:f=5,children:p,...v}=n,P=Gn(n),z=React.useRef(),[G,H]=$n(z),ae=er(z,l,f),_=Ae=>{!z.current||ae(Ae?a:-a)};return React.createElement("div",{...v,className:P.root},React.createElement(Grid,{container:!0,direction:"row",wrap:"nowrap",className:P.container,ref:z},p),React.createElement("div",{className:classNames(P.fade,P.fadeLeft,{[P.fadeHidden]:G===0})}),React.createElement("div",{className:classNames(P.fade,P.fadeRight,{[P.fadeHidden]:H===0})}),G>0&&React.createElement(IconButton,{title:"Scroll Left",onClick:()=>_(!1),className:classNames(P.button,P.buttonLeft,{})},React.createElement(ChevronLeftIcon,null)),H>0&&React.createElement(IconButton,{title:"Scroll Right",onClick:()=>_(!0),className:classNames(P.button,P.buttonRight,{})},React.createElement(ChevronRightIcon,null)))}const Lr=(0,c.Z)({alpha:{color:"#ffffff",fontFamily:"serif",fontWeight:"normal",fontStyle:"italic"},beta:{color:"#4d65cc",fontFamily:"serif",fontWeight:"normal",fontStyle:"italic"}},{name:"BackstageLifecycle"});function la(n){const a=Lr(n),{shorthand:l,alpha:f}=n;return l?React.createElement("span",{className:a[f?"alpha":"beta"],style:{fontSize:"120%"}},f?React.createElement(React.Fragment,null,"\u03B1"):React.createElement(React.Fragment,null,"\u03B2")):React.createElement("span",{className:a[f?"alpha":"beta"]},f?"Alpha":"Beta")}const tr=(0,t.lazy)(()=>Promise.all([e.e(4949),e.e(8718)]).then(e.bind(e,98718)).then(n=>({default:n.RealLogViewer})));function Or(n){const{Progress:a}=(0,d.useApp)().getComponents();return t.createElement(t.Suspense,{fallback:t.createElement(a,null)},t.createElement(tr,{...n}))}const xr=(0,c.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"}),ir={code:({inline:n,className:a,children:l,...f})=>{const p=String(l).replace(/\n+$/,""),v=/language-(\w+)/.exec(a||"");return!n&&v?t.createElement(Pe,{language:v[1],text:p}):t.createElement("code",{className:a,...f},l)}};function Un(n){const{content:a,dialect:l="gfm",linkTarget:f,transformLinkUri:p,transformImageUri:v}=n,P=xr();return React.createElement(ReactMarkdown,{remarkPlugins:l==="gfm"?[gfm]:[],className:P.markdown,children:a,components:ir,linkTarget:f,transformLinkUri:p,transformImageUri:v})}var nr=e(10179);const rr=(0,c.Z)(n=>({root:{paddingLeft:n.spacing(3)}}),{name:"BackstageLoginRequestListItem"}),Gr=({request:n,busy:a,setBusy:l})=>{const f=rr(),[p,v]=useState(),P=async()=>{l(!0);try{await n.trigger()}catch(G){v(isError(G)?G.message:"An unspecified error occurred")}finally{l(!1)}},z=n.provider.icon;return React.createElement(ListItem,{disabled:a,classes:{root:f.root}},React.createElement(ListItemAvatar,null,React.createElement(z,{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:P},"Log in"))};var gr=null;const pr=(0,c.Z)(n=>({dialog:{paddingTop:n.spacing(1)},title:{minWidth:0},titleHeading:{fontSize:n.typography.h6.fontSize},contentList:{padding:0},actionButtons:{padding:n.spacing(2,0)}}),{name:"OAuthRequestDialog"});function Kr(n){const a=pr(),[l,f]=useState(!1),p=useApi(oauthRequestApiRef),v=useObservable(useMemo(()=>p.authRequest$(),[p]),[]),P=()=>{v.forEach(z=>z.reject())};return React.createElement(Dialog,{open:Boolean(v.length),fullWidth:!0,maxWidth:"xs",classes:{paper:a.dialog},"aria-labelledby":"oauth-req-dialog-title"},React.createElement("main",null,React.createElement(DialogTitle,{classes:{root:a.title},id:"oauth-req-dialog-title"},React.createElement(Typography,{className:a.titleHeading,variant:"h1"},"Login Required")),React.createElement(DialogContent,{dividers:!0,classes:{root:a.contentList}},React.createElement(List,null,v.map(z=>React.createElement(LoginRequestListItem,{key:z.provider.title,request:z,busy:l,setBusy:f}))))),React.createElement(DialogActions,{classes:{root:a.actionButtons}},React.createElement(Button,{onClick:P},"Reject All")))}var kr=e(15277),lr=e.n(kr),Dr=e(29862);const Yr=(0,c.Z)({container:{overflow:"visible !important"}},{name:"BackstageOverflowTooltip"});function yr(n){var P;const[a,l]=(0,t.useState)(!1),f=(0,Dr.t)(),p=Yr(),v=z=>{f()&&l(z)};return t.createElement(xe.ZP,{title:(P=n.title)!=null?P:n.text||"",placement:n.placement,disableHoverListener:!a},t.createElement(lr(),{text:n.text,line:n.line,onToggled:v,containerClassName:p.container}))}var Fr=e(67358);function Br(n){const[a,l]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{const f=setTimeout(()=>l(!0),250);return()=>clearTimeout(f)},[]),a?t.createElement(Fr.Z,{...n,"data-testid":"progress"}):t.createElement("div",{style:{display:"none"}})}var Mr=e(94339),Er=e(14503),wr=e(24579),vr=e(32552),yn=e(15459),un=e(95544),Yn=e(27597);const Jn=(0,c.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 $r(n){const{link:a,title:l,onClick:f}=n,p=Jn();return t.createElement("div",null,t.createElement(cn.Z,null),t.createElement(K,{to:a,onClick:f,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(nt.Z,null,t.createElement("strong",null,l))),t.createElement(Yn.Z,{className:p.arrow}))))}const Ar=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(se,{to:a.href,variant:"contained"},a.name)},Ur=class extends t.Component{constructor(a){super(a),this.state={error:void 0,errorInfo:void 0}}componentDidCatch(a,l){console.error(`ErrorBoundary, error: ${a}, info: ${l}`),this.setState({error:a,errorInfo:l})}render(){const{slackChannel:a,children:l}=this.props,{error:f}=this.state;return f?t.createElement(It,{title:"Something Went Wrong",error:f},t.createElement(Ar,{slackChannel:a})):l}},Rr=(0,c.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"}),Nr=(0,yn.Z)(n=>({root:{display:"inline-block",padding:n.spacing(8,8,0,0),float:"right"}}),{name:"BackstageInfoCardCardActionsTopRight"})(Er.Z),Sr={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 cr(n){const{title:a,subheader:l,divider:f=!0,deepLink:p,slackChannel:v,errorBoundaryProps:P,variant:z,children:G,headerStyle:H,headerProps:ae,icon:_,action:Ae,actionsClassName:Te,actions:Be,cardClassName:ft,actionsTopRight:Mt,className:Vt,noPadding:qt,titleTypographyProps:pt}=n,Gt=Rr();let nn={},_t={};z&&z.split(/[\s]+/g).forEach(wt=>{nn={...nn,...Sr.card[wt]},_t={..._t,...Sr.cardContent[wt]}});const ar=()=>t.createElement("div",{className:Gt.headerSubheader},l&&t.createElement("div",{className:Gt.subheader},l),_),Hn=P||(v?{slackChannel:v}:{});return t.createElement(Mr.Z,{style:nn,className:Vt},t.createElement(Ur,{...Hn},a&&t.createElement(vr.Z,{classes:{root:Gt.header,title:Gt.headerTitle,subheader:Gt.headerSubheader,avatar:Gt.headerAvatar,action:Gt.headerAction,content:Gt.headerContent},title:a,subheader:ar(),action:Ae,style:{...H},titleTypographyProps:pt,...ae}),Mt&&t.createElement(Nr,null,Mt),f&&t.createElement(cn.Z,null),t.createElement(wr.Z,{className:E()(ft,{[Gt.noPadding]:qt}),style:_t},G),Be&&t.createElement(Er.Z,{className:Te},Be),p&&t.createElement($r,{...p})))}var Jr=e(39307);const I=(0,c.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"}),k={fractional:!0,inverse:!1,unit:"%",max:100},de=({palette:n,value:a,inverse:l,max:f})=>{if(isNaN(a))return"#ddd";const p=f||k.max,v=l?p-a:a;return v<p/3?n.status.error:v<p*(2/3)?n.status.warning:n.status.ok};function De(n){const[a,l]=useState(null),{getColor:f=de}=n,p=I(n),{palette:v}=useTheme(),{value:P,fractional:z,inverse:G,unit:H,max:ae,description:_}={...k,...n},Ae=z?Math.round(P*ae):P,Te=ae!==100?Math.round(P):Ae,[Be,ft]=useState(!1);return useEffect(()=>{const Mt=a,Vt=()=>ft(!0),qt=()=>ft(!1);return Mt&&_?(Mt.addEventListener("mouseenter",Vt),Mt.addEventListener("mouseleave",qt),()=>{Mt.removeEventListener("mouseenter",Vt),Mt.removeEventListener("mouseleave",qt)}):()=>{ft(!1)}},[_,a]),React.createElement("div",{ref:l,className:p.root},React.createElement(Circle,{strokeLinecap:"butt",percent:Ae,strokeWidth:12,trailWidth:12,strokeColor:f({palette:v,value:Te,inverse:G,max:ae}),className:p.circle}),_&&Be?React.createElement("div",{className:p.description},_):React.createElement("div",{className:p.overlay},isNaN(P)?"N/A":`${Te}${H}`))}const tt=(0,c.Z)({root:{height:"100%",width:250}},{name:"BackstageGaugeCard"});function gt(n){const a=tt(n),{title:l,subheader:f,progress:p,inverse:v,deepLink:P,description:z,icon:G,variant:H,getColor:ae}=n,_={inverse:v,description:z,getColor:ae,value:p};return React.createElement("div",{className:a.root},React.createElement(InfoCard,{title:l,subheader:f,deepLink:P,variant:H,icon:G},React.createElement(Gauge,{..._})))}function At(n){const{value:a,getColor:l=getProgressColor}=n,{palette:f}=useTheme();if(isNaN(a))return null;let p=Math.round(a*100*100)/100;p>100&&(p=100);const v=l({palette:f,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 xt=e(21324),dt=e(7089),jt=e(1292),A=e(42494),T=e(74603),N=e(56939),W=e(12231),J=e(73698),Q=e(72379);const he=(0,c.Z)(()=>(0,o.Z)({icon:{position:"absolute",right:"4px",pointerEvents:"none"}}),{name:"BackstageClosedDropdown"});var Oe=()=>{const n=he();return t.createElement(Q.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 Fe=(0,c.Z)(()=>(0,o.Z)({icon:{position:"absolute",right:"4px",pointerEvents:"none"}}),{name:"BackstageOpenedDropdown"});var ze=()=>{const n=Fe();return t.createElement(Q.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 Ye=(0,yn.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"})(T.Z),Lt=(0,c.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}},formLabel:{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 ot(n){const{multiple:a,items:l,label:f,placeholder:p,selected:v,onChange:P,triggerReset:z,native:G=!1,disabled:H=!1}=n,ae=Lt(),[_,Ae]=(0,t.useState)(v||(a?[]:"")),[Te,Be]=(0,t.useState)(!1);(0,t.useEffect)(()=>{Ae(a?[]:"")},[z,a]),(0,t.useEffect)(()=>{v!==void 0&&Ae(v)},[v]);const ft=pt=>{Ae(pt.target.value),P(pt.target.value)},Mt=pt=>{if(H){pt.preventDefault();return}Be(Gt=>a&&!(pt.target instanceof HTMLElement)?!0:!Gt)},Vt=()=>{Be(!1)},qt=pt=>()=>{const Gt=_.filter(nn=>nn!==pt);Ae(Gt),P(Gt)};return t.createElement("div",{className:ae.root},t.createElement(jt.Z,{onClickAway:Vt},t.createElement(A.Z,{className:ae.formControl},t.createElement(N.Z,{className:ae.formLabel},f),t.createElement(J.Z,{"aria-label":f,value:_,native:G,disabled:H,"data-testid":"select",displayEmpty:!0,multiple:a,onChange:ft,onClick:Mt,open:Te,input:t.createElement(Ye,null),label:f,tabIndex:0,renderValue:pt=>{var Gt;return a&&_.length!==0?t.createElement("div",{className:ae.chips},pt.map(nn=>{var _t,ar;return t.createElement(dt.Z,{key:(_t=l.find(Hn=>Hn.value===nn))==null?void 0:_t.value,label:(ar=l.find(Hn=>Hn.value===nn))==null?void 0:ar.label,clickable:!0,onDelete:qt(nn),className:ae.chip})})):t.createElement(nt.Z,null,_.length===0?p||"":(Gt=l.find(nn=>nn.value===pt))==null?void 0:Gt.label)},IconComponent:()=>Te?t.createElement(ze,null):t.createElement(Oe,null),MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},getContentAnchorEl:null}},p&&!a&&t.createElement(W.Z,{value:[]},p),G?l&&l.map(pt=>t.createElement("option",{value:pt.value,key:pt.value},pt.label)):l&&l.map(pt=>t.createElement(W.Z,{key:pt.value,value:pt.value},a&&t.createElement(xt.Z,{color:"primary",checked:_.includes(pt.value)||!1,className:ae.checkbox}),pt.label))))))}const je=()=>{},Jt=t.createContext({stepperLength:0,stepIndex:0,setStepIndex:je,stepHistory:[],setStepHistory:je,onStepChange:je});function gn(n){const{children:a,elevated:l,onStepChange:f,activeStep:p=0}=n,[v,P]=useState(p),[z,G]=useState([0]);useEffect(()=>{P(p)},[p]);const H=[];let ae;return Children.forEach(a,_=>{isValidElement(_)&&(_.props.end?ae=_:H.push(_))}),React.createElement(React.Fragment,null,React.createElement(Jt.Provider,{value:{stepIndex:v,setStepIndex:P,stepHistory:z,setStepHistory:G,onStepChange:f,stepperLength:Children.count(a)}},React.createElement(MuiStepper,{activeStep:v,orientation:"vertical",elevation:l?2:0},H)),v>=Children.count(a)-1&&ae)}const Qn=(0,c.Z)(n=>({root:{marginTop:n.spacing(3),"& button":{marginRight:n.spacing(1)}}}),{name:"BackstageSimpleStepperFooter"}),Dn=({text:n,handleClick:a})=>React.createElement(Button,{onClick:a},n||"Reset"),vn=({text:n,handleClick:a,disabled:l,last:f,stepIndex:p})=>React.createElement(Button,{variant:"contained",color:"primary",disabled:l,"data-testid":`nextButton-${p}`,onClick:a},n||(f?"Finish":"Next")),Tn=({text:n,handleClick:a,disabled:l,stepIndex:f})=>React.createElement(Button,{onClick:a,"data-testid":`backButton-${f}`,disabled:l},n||"Back"),Nn=({actions:n={},children:a})=>{const l=Qn(),{stepperLength:f,stepIndex:p,setStepIndex:v,stepHistory:P,setStepHistory:z,onStepChange:G}=useContext(VerticalStepperContext),H=(Te,Be)=>{Be&&Be(),G&&G(p,Te),v(Te)},ae=()=>{const Te=n.nextStep?n.nextStep(p,f-1):p+1;H(Te,n.onNext),z([...P,Te])},_=()=>{P.pop(),H(P[P.length-1],n.onBack),z([...P])},Ae=()=>{H(0,n.onRestart),z([0])};return React.createElement("div",{className:l.root},[void 0,!0].includes(n.showBack)&&p!==0&&React.createElement(Tn,{text:n.backText,handleClick:_,disabled:p===0,stepIndex:p}),[void 0,!0].includes(n.showNext)&&React.createElement(vn,{text:n.nextText,handleClick:ae,disabled:!!f&&p>=f||!!n.canNext&&!n.canNext(),stepIndex:p}),n.showRestart&&p!==0&&React.createElement(Dn,{text:n.restartText,handleClick:Ae,stepIndex:p}),a)},Cr=(0,c.Z)(n=>({end:{padding:n.spacing(3)}}),{name:"SimpleStepperStep"});function Zr(n){const{title:a,children:l,end:f,actions:p,...v}=n,P=Cr();return f?React.createElement("div",{className:P.end},React.createElement(Typography,{variant:"h6"},a),l,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,l,React.createElement(SimpleStepperFooter,{actions:p})))}const Xn=(0,c.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 bn(n){const a=Xn(n);return React.createElement("span",{className:classNames(a.status,a.ok),"aria-label":"Status ok","aria-hidden":"true",...n})}function Fn(n){const a=Xn(n);return React.createElement("span",{className:classNames(a.status,a.warning),"aria-label":"Status warning","aria-hidden":"true",...n})}function zr(n){const a=Xn(n);return React.createElement("span",{className:classNames(a.status,a.error),"aria-label":"Status error","aria-hidden":"true",...n})}function ca(n){const a=Xn(n);return React.createElement("span",{className:classNames(a.status,a.pending),"aria-label":"Status pending","aria-hidden":"true",...n})}function al(n){const a=Xn(n);return React.createElement("span",{className:classNames(a.status,a.running),"aria-label":"Status running","aria-hidden":"true",...n})}function ol(n){const a=Xn(n);return React.createElement("span",{className:classNames(a.status,a.aborted),"aria-label":"Status aborted","aria-hidden":"true",...n})}var sl=e(74600),Ra=e(15584);const Ro=n=>(0,o.Z)({root:{fontWeight:"bolder",whiteSpace:"nowrap",paddingRight:n.spacing(4),border:"0",verticalAlign:"top"}}),So={root:{border:"0",verticalAlign:"top"}},Co=n=>(0,o.Z)({root:{listStyle:"none",margin:n.spacing(0,0,-1,0),padding:"0"}}),To=n=>(0,o.Z)({root:{padding:n.spacing(0,0,1,0)},random:{}}),bo=(0,yn.Z)(Ro,{name:"BackstageMetadataTableTitleCell"})(Ra.Z),Po=(0,yn.Z)(So,{name:"BackstageMetadataTableCell"})(Ra.Z),il=({dense:n,children:a})=>React.createElement(Table,{size:n?"small":"medium"},React.createElement(TableBody,null,a)),ll=({title:n,children:a,...l})=>React.createElement(TableRow,null,n&&React.createElement(bo,null,n),React.createElement(Po,{colSpan:n?1:2,...l},a)),Sa=(0,yn.Z)(Co,{name:"BackstageMetadataTableList"})(({classes:n,children:a})=>t.createElement("ul",{className:n.root},a)),cl=(0,yn.Z)(To,{name:"BackstageMetadataTableListItem"})(({classes:n,children:a})=>t.createElement("li",{className:n.root},a)),Ca=(0,o.Z)({root:{margin:"0 0",listStyleType:"none"}}),Io=n=>(0,o.Z)({root:{...Ca.root,paddingLeft:n.spacing(1)}}),Ta=(0,yn.Z)(Ca,{name:"BackstageStructuredMetadataTableList"})(({classes:n,children:a})=>t.createElement(Sa,{classes:n},a)),ba=(0,yn.Z)(Io,{name:"BackstageStructuredMetadataTableNestedList"})(({classes:n,children:a})=>t.createElement(Sa,{classes:n},a));function Lo(n,a){const l=n.map((f,p)=>React.createElement(MetadataListItem,{key:p},ua(f)));return a?React.createElement(ba,null,l):React.createElement(Ta,null,l)}function Oo(n,a,l){const f=Object.keys(n).map(p=>{const v=ua(n[p],!0),P=l&&l.titleFormat?l.titleFormat(p):startCase(p);return React.createElement(MetadataListItem,{key:p},`${P}: `,v)});return a?React.createElement(ba,null,f):React.createElement(Ta,null,f)}function ua(n,a,l){return React.isValidElement(n)?React.createElement(Fragment,null,n):typeof n=="object"&&!Array.isArray(n)?Oo(n,a,l):Array.isArray(n)?Lo(n,l):typeof n=="boolean"?React.createElement(Fragment,null,n?"\u2705":"\u274C"):React.createElement(Fragment,null,n)}const xo=({value:n,options:a})=>React.createElement(Fragment,null,ua(n,a)),Do=({title:n,value:a,options:l})=>React.createElement(MetadataTableItem,{title:l&&l.titleFormat?l.titleFormat(n):startCase(n)},React.createElement(xo,{value:a,options:l}));function Fo(n,a){return Object.keys(n).map(l=>React.createElement(Do,{key:l,title:l,value:n[l],options:a}))}function ul(n){const{metadata:a,dense:l=!0,options:f}=n,p=Fo(a,f||{});return React.createElement(MetadataTable,{dense:l},p)}var Bo=e(49429),Mo=e(86136),Pa=e(79784),wo=e(19126),Ia=e.n(wo);function $o(n){return qs.stringify(n,{strictNullHandling:!0})}function La(n){return qs.parse(n,{ignoreQueryPrefix:!0,strictNullHandling:!0})}function Oa(n,a){return La(n)[a]}function Uo(n,a,l){const f={...La(n),[a]:l};return $o(f)}function dl(n,a=250){const[l,f]=useSearchParams(),p=l.toString(),[v,P]=useState(Oa(p,n));return useEffect(()=>{const z=Oa(p,n);P(G=>isEqual(z,G)?G:z)},[p,P,n]),useDebouncedEffect(()=>{const z=Uo(p,n,v);p!==z&&f(z,{replace:!0})},[f,v,p,n],a),[v,P]}const No={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 xa(){const a=(0,d.useApiHolder)().get(d.configApiRef),l=a==null?void 0:a.getOptionalConfig("app.support");return l?{url:l.getString("url"),items:l.getConfigArray("items").flatMap(f=>{var p;return{title:f.getString("title"),icon:f.getOptionalString("icon"),links:((p=f.getOptionalConfigArray("links"))!=null?p:[]).flatMap(v=>({url:v.getString("url"),title:v.getString("title")}))}})}:No}var Zo=e(80079);function Wn(n,a){const f=(0,d.useApp)().getSystemIcon(n);return f?t.createElement(f,{...a}):t.createElement(Zo.Z,{...a})}function fl(n){return Wn("brokenImage",n)}function ml(n){return Wn("catalog",n)}function hl(n){return Wn("chat",n)}function gl(n){return Wn("dashboard",n)}function pl(n){return Wn("docs",n)}function yl(n){return Wn("email",n)}function El(n){return Wn("github",n)}function vl(n){return Wn("group",n)}function Qr(n){return Wn("help",n)}function Al(n){return Wn("user",n)}function Rl(n){return Wn("warning",n)}const zo=(0,c.Z)({popoverList:{minWidth:260,maxWidth:400}},{name:"BackstageSupportButton"}),Wo=({icon:n})=>{var f;const a=(0,d.useApp)(),l=n&&(f=a.getSystemIcon(n))!=null?f:Qr;return t.createElement(l,null)},Ho=({link:n})=>{var a;return t.createElement(K,{to:n.url},(a=n.title)!=null?a:n.url)},jo=({item:n})=>{var a;return t.createElement(re.Z,null,t.createElement(Mo.Z,null,t.createElement(Wo,{icon:n.icon})),t.createElement(te.Z,{primary:n.title,secondary:(a=n.links)==null?void 0:a.reduce((l,f,p)=>[...l,p>0&&t.createElement("br",{key:p}),t.createElement(Ho,{link:f,key:f.url})],[])}))};function Vo(n){const{title:a,children:l}=n,{items:f}=xa(),[p,v]=(0,t.useState)(!1),[P,z]=(0,t.useState)(null),G=zo(),H=(0,mt.Z)(Ae=>Ae.breakpoints.down("sm")),ae=Ae=>{z(Ae.currentTarget),v(!0)},_=()=>{v(!1)};return t.createElement(t.Fragment,null,t.createElement(un.Z,{display:"flex",ml:1},H?t.createElement(Ue.Z,{color:"primary",size:"small",onClick:ae,"data-testid":"support-button"},t.createElement(Qr,null)):t.createElement(y.Z,{"data-testid":"support-button","aria-label":"support",color:"primary",onClick:ae,startIcon:t.createElement(Qr,null)},"Support")),t.createElement(Pa.ZP,{"data-testid":"support-button-popover",open:p,anchorEl:P,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},onClose:_},t.createElement(U.Z,{className:G.popoverList},a&&t.createElement(re.Z,{alignItems:"flex-start"},t.createElement(nt.Z,{variant:"subtitle1"},a)),t.Children.map(l,(Ae,Te)=>t.createElement(re.Z,{alignItems:"flex-start",key:`child-${Te}`},Ae)),f&&f.map((Ae,Te)=>t.createElement(jo,{item:Ae,key:`item-${Te}`}))),t.createElement(Bo.Z,null,t.createElement(y.Z,{color:"primary",onClick:_},"Close"))))}var da=e(18671),Zn=e(10289);const Xr=72,Da=24,Fa=18,qn={drawerWidthClosed:Xr,drawerWidthOpen:224,defaultOpenDelayMs:100,defaultCloseDelayMs:0,defaultFadeDuration:200,logoHeight:32,iconContainerWidth:Xr,iconSize:Xr-Da*2,iconPadding:Da,selectedIndicatorWidth:3,userBadgePadding:Fa,userBadgeDiameter:Xr-Fa*2,mobileSidebarHeight:56},Go=n=>({...qn,...n,iconContainerWidth:qn.drawerWidthClosed,iconSize:qn.drawerWidthClosed-qn.iconPadding*2,userBadgeDiameter:qn.drawerWidthClosed-qn.userBadgePadding*2}),Ba={drawerWidthClosed:0,drawerWidthOpen:202,defaultOpenDelayMs:qn.defaultOpenDelayMs+200},Ko=n=>({...Ba,...n}),Sl="@backstage/core/sidebar-intro-dismissed",Kn=(0,t.createContext)({sidebarConfig:qn,submenuConfig:Ba}),Ma=(0,t.createContext)({isHoveredOn:!1,setIsHoveredOn:()=>{}});var qr;(function(n){const a="sidebarPinState";n.SIDEBAR_PIN_STATE=a})(qr||(qr={}));const wa={getSidebarPinState(){let n;try{n=JSON.parse(window.localStorage.getItem(qr.SIDEBAR_PIN_STATE)||"true")}catch{return!0}return!!n},setSidebarPinState(n){return window.localStorage.setItem(qr.SIDEBAR_PIN_STATE,JSON.stringify(n))}};var _r=e(76241);const $a={isPinned:!0,toggleSidebarPinState:()=>{},isMobile:!1},Ua=(0,t.createContext)($a),Na=(0,_r.CT)("sidebar-pin-state-context"),ko=({children:n,value:a})=>t.createElement(Ua.Provider,{value:a},t.createElement(Na.Provider,{value:(0,_r.EI)({1:a})},n)),Wr=()=>{const n=(0,t.useContext)(Na),a=(0,t.useContext)(Ua);if(n===void 0)return a||$a;const l=n.atVersion(1);if(l===void 0)throw new Error("No context found for version 1.");return l},Yo=(0,c.Z)(n=>({root:{width:"100%",transition:"padding-left 0.1s ease-out",isolation:"isolate",[n.breakpoints.up("sm")]:{paddingLeft:a=>a.isPinned?a.sidebarConfig.drawerWidthOpen:a.sidebarConfig.drawerWidthClosed},[n.breakpoints.down("xs")]:{paddingBottom:a=>a.sidebarConfig.mobileSidebarHeight}},content:{zIndex:0,isolation:"isolate","&:focus":{outline:0}}}),{name:"BackstageSidebarPage"}),Za=(0,t.createContext)({content:{contentRef:void 0}});function Jo(n){const[a,l]=(0,t.useState)(()=>wa.getSidebarPinState()),{sidebarConfig:f}=(0,t.useContext)(Kn),p=(0,t.useRef)(null),v=(0,t.useMemo)(()=>({content:{contentRef:p}}),[p]);(0,t.useEffect)(()=>{wa.setSidebarPinState(a)},[a]);const P=(0,mt.Z)(H=>H.breakpoints.down("xs"),{noSsr:!0}),z=()=>l(!a),G=Yo({isPinned:a,sidebarConfig:f});return t.createElement(ko,{value:{isPinned:a,toggleSidebarPinState:z,isMobile:P}},t.createElement(Za.Provider,{value:v},t.createElement("div",{className:G.root},n.children)))}function za(){const{content:n}=(0,t.useContext)(Za);return{focusContent:(0,t.useCallback)(()=>{var l,f;(f=(l=n==null?void 0:n.contentRef)==null?void 0:l.current)==null||f.focus()},[n]),contentRef:n==null?void 0:n.contentRef}}const Wa={isOpen:!1,setOpen:()=>{}},Ha=(0,t.createContext)(Wa),ja=(0,_r.CT)("sidebar-open-state-context"),Va=({children:n,value:a})=>t.createElement(Ha.Provider,{value:a},t.createElement(ja.Provider,{value:(0,_r.EI)({1:a})},n)),fa=()=>{const n=(0,t.useContext)(ja),a=(0,t.useContext)(Ha);if(n===void 0)return a||Wa;const l=n.atVersion(1);if(l===void 0)throw new Error("No context found for version 1.");return l};var Qo=e(50023),Xo=e(4190),qo=e(87685),_o=e(44882),es=e(57998);const ts=(0,c.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"}})),ns=n=>{const{to:a,label:l,icon:f,value:p}=n,{sidebarConfig:v}=(0,t.useContext)(Kn),P=ts({sidebarConfig:v}),z=(0,Zn.TH)(),{selectedMenuItemIndex:G,setSelectedMenuItemIndex:H}=(0,t.useContext)(ka),ae=(Ae,Te)=>{H(Te===G?-1:Te)},_=p===G&&G>=0||p!==G&&!(G>=0)&&a===z.pathname;return t.createElement(es.Z,{label:l,icon:f,component:K,to:a||z.pathname,onChange:ae,value:p,selected:_,classes:P})},Ga=n=>{const{children:a,to:l,label:f,icon:p,value:v}=n,{isMobile:P}=Wr();return P?t.createElement(ns,{to:l,label:f,icon:p,value:v}):t.createElement(t.Fragment,null,a)},Ka=(0,c.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.text.primary,alignItems:"center",justifyContent:"space-between",padding:n.spacing(2,3)},overlayHeaderClose:{color:n.palette.text.primary},marginMobileSidebar:a=>({marginBottom:`${a.sidebarConfig.mobileSidebarHeight}px`})})),rs=n=>(0,x.orderBy)(n,({props:{priority:a}})=>Number.isInteger(a)?a:-1,"desc"),as=t.createElement(Ga).type,os=({children:n,label:a="Menu",open:l,onClose:f})=>{const{sidebarConfig:p}=(0,t.useContext)(Kn),v=Ka({sidebarConfig:p});return t.createElement(Xo.ZP,{anchor:"bottom",open:l,onClose:f,ModalProps:{BackdropProps:{classes:{root:v.marginMobileSidebar}}},classes:{root:v.marginMobileSidebar,paperAnchorBottom:v.overlay}},t.createElement(un.Z,{className:v.overlayHeader},t.createElement(nt.Z,{variant:"h3"},a),t.createElement(Ue.Z,{onClick:f,classes:{root:v.overlayHeaderClose}},t.createElement(qo.Z,null))),t.createElement(un.Z,{component:"nav"},n))},ka=(0,t.createContext)({selectedMenuItemIndex:-1,setSelectedMenuItemIndex:()=>{}}),ss=n=>{const{sidebarConfig:a}=(0,t.useContext)(Kn),{children:l}=n,f=Ka({sidebarConfig:a}),p=(0,Zn.TH)(),[v,P]=(0,t.useState)(-1);(0,t.useEffect)(()=>{P(-1)},[p.pathname]);let z=(0,d.useElementFilter)(l,H=>H.getElements().filter(ae=>ae.type===as));if(l)z.length?z=rs(z):z.push(t.createElement(Ga,{key:"default_menu",icon:t.createElement(_o.Z,null)},l));else return null;const G=v>=0&&!z[v].props.to;return t.createElement(Va,{value:{isOpen:!0,setOpen:()=>{}}},t.createElement(ka.Provider,{value:{selectedMenuItemIndex:v,setSelectedMenuItemIndex:P}},t.createElement(os,{label:z[v]&&z[v].props.label,open:G,onClose:()=>P(-1)},z[v]&&z[v].props.children),t.createElement(Qo.Z,{className:f.root,"data-testid":"mobile-sidebar-root",component:"nav"},z)))},Ya=(0,c.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 Bn;(function(n){n[n.Closed=0]="Closed";const l=0+1;n[n.Idle=l]="Idle";const f=l+1;n[n.Open=f]="Open"})(Bn||(Bn={}));const is=n=>{const{sidebarConfig:a}=(0,t.useContext)(Kn),{openDelayMs:l=a.defaultOpenDelayMs,closeDelayMs:f=a.defaultCloseDelayMs,disableExpandOnHover:p,children:v}=n,P=Ya({sidebarConfig:a}),z=(0,mt.Z)(Vt=>Vt.breakpoints.down("md"),{noSsr:!0}),[G,H]=(0,t.useState)(Bn.Closed),ae=(0,t.useRef)(),{isPinned:_,toggleSidebarPinState:Ae}=Wr(),Te=()=>{_||p||(ae.current&&(clearTimeout(ae.current),ae.current=void 0),G!==Bn.Open&&!z&&(ae.current=window.setTimeout(()=>{ae.current=void 0,H(Bn.Open)},l),H(Bn.Idle)))},Be=()=>{_||p||(ae.current&&(clearTimeout(ae.current),ae.current=void 0),G===Bn.Idle?H(Bn.Closed):G===Bn.Open&&(ae.current=window.setTimeout(()=>{ae.current=void 0,H(Bn.Closed)},f)))},ft=G===Bn.Open&&!z||_,Mt=Vt=>{Vt?(H(Bn.Open),Ae()):(H(Bn.Closed),Ae())};return t.createElement("nav",{style:{},"aria-label":"sidebar nav"},t.createElement(cs,null),t.createElement(Va,{value:{isOpen:ft,setOpen:Mt}},t.createElement("div",{className:P.root,"data-testid":"sidebar-root",onMouseEnter:p?()=>{}:Te,onFocus:p?()=>{}:Te,onMouseLeave:p?()=>{}:Be,onBlur:p?()=>{}:Be},t.createElement("div",{className:E()(P.drawer,{[P.drawerOpen]:ft})},v))))},ls=n=>{var G,H;const a=Go((G=n.sidebarOptions)!=null?G:{}),l=Ko((H=n.submenuOptions)!=null?H:{}),{children:f,disableExpandOnHover:p,openDelayMs:v,closeDelayMs:P}=n,{isMobile:z}=Wr();return z?t.createElement(ss,null,f):t.createElement(Kn.Provider,{value:{sidebarConfig:a,submenuConfig:l}},t.createElement(is,{openDelayMs:v,closeDelayMs:P,disableExpandOnHover:p},f))};function cs(){const{sidebarConfig:n}=(0,t.useContext)(Kn),{focusContent:a,contentRef:l}=za(),f=Ya({sidebarConfig:n});return l!=null&&l.current?t.createElement(y.Z,{onClick:a,variant:"contained",className:E()(f.visuallyHidden)},"Skip to content"):null}function Ja(n,a){const l=new URLSearchParams(a.search).toString(),f=Ia().parse(l),p=new URLSearchParams(n.search).toString(),v=Ia().parse(p);return(0,x.isEqual)(a.pathname,n.pathname)&&(0,x.isMatch)(v,f)}const us=(0,c.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,whiteSpace:"nowrap",overflow:"hidden","text-overflow":"ellipsis",lineHeight:1},subtitle:{fontSize:10,whiteSpace:"nowrap",overflow:"hidden","text-overflow":"ellipsis"},dropdownArrow:{position:"absolute",right:21},dropdown:{display:"flex",flexDirection:"column",alignItems:"end"},dropdownItem:{width:"100%",padding:"10px 0 10px 0","&:hover":{background:"#6f6f6f",color:n.palette.navigation.selectedColor}},textContent:{color:n.palette.navigation.color,paddingLeft:n.spacing(4),paddingRight:n.spacing(1),fontSize:"14px",whiteSpace:"nowrap",overflow:"hidden","text-overflow":"ellipsis"}}),{name:"BackstageSidebarSubmenuItem"}),Cl=n=>{const{title:a,subtitle:l,to:f,icon:p,dropdownItems:v}=n,P=us(),{setIsHoveredOn:z}=useContext(SidebarItemWithSubmenuContext),G=()=>{z(!1)},H=useResolvedPath(f!=null?f:""),ae=useLocation();let _=isLocationMatch(ae,H);const[Ae,Te]=useState(!1),Be=()=>{Te(!Ae)};return v!==void 0?(v.some(ft=>{const Mt=resolvePath(ft.to);return _=isLocationMatch(ae,Mt),_}),React.createElement("div",{className:P.itemContainer},React.createElement(Tooltip,{title:a,enterDelay:500,enterNextDelay:500},React.createElement("button",{onClick:Be,onTouchStart:ft=>ft.stopPropagation(),className:classnames(P.item,_?P.selected:void 0)},p&&React.createElement(p,{fontSize:"small"}),React.createElement(Typography,{variant:"subtitle1",className:P.label},a,React.createElement("br",null),l&&React.createElement(Typography,{variant:"caption",className:P.subtitle},l)),Ae?React.createElement(ArrowDropUpIcon,{className:P.dropdownArrow}):React.createElement(ArrowDropDownIcon,{className:P.dropdownArrow}))),v&&Ae&&React.createElement("div",{className:P.dropdown},v.map((ft,Mt)=>React.createElement(Tooltip,{key:Mt,title:ft.title,enterDelay:500,enterNextDelay:500},React.createElement(Link,{to:ft.to,underline:"none",className:P.dropdownItem,onClick:G,onTouchStart:Vt=>Vt.stopPropagation()},React.createElement(Typography,{className:P.textContent},ft.title))))))):React.createElement("div",{className:P.itemContainer},React.createElement(Tooltip,{title:a,enterDelay:500,enterNextDelay:500},React.createElement(Link,{to:f,underline:"none",className:classnames(P.item,_?P.selected:void 0),onClick:G,onTouchStart:ft=>ft.stopPropagation()},p&&React.createElement(p,{fontSize:"small"}),React.createElement(Typography,{variant:"subtitle1",className:P.label},a,React.createElement("br",null),l&&React.createElement(Typography,{variant:"caption",className:P.subtitle},l)))))},ds=(0,c.Z)(n=>({root:{zIndex:1e3,position:"relative",overflow:"visible",width:n.spacing(7)+1},drawer:a=>{var l,f;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:(f=(l=n.palette.navigation.submenu)==null?void 0:l.background)!=null?f:"#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"}),fs=n=>{const{isOpen:a}=fa(),{sidebarConfig:l,submenuConfig:f}=(0,t.useContext)(Kn),p=a?l.drawerWidthOpen:l.drawerWidthClosed,v=ds({left:p,submenuConfig:f}),{isHoveredOn:P}=(0,t.useContext)(Ma),[z,G]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{G(P)},[P]),t.createElement("div",{className:E()(v.drawer,{[v.drawerOpen]:z})},t.createElement(nt.Z,{variant:"h5",className:v.title},n.title),n.children)};var ea=e(76600),ms=e(26739),Qa=e(98989),hs=e(59797),gs=e(83543);const ps=(0,c.Z)({iconContainer:{display:"flex",position:"relative",width:"100%"},arrow1:{right:"6px",position:"absolute"}}),Tl=()=>{const n=ps();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 bl=null;const ys=(0,c.Z)({iconContainer:{display:"flex",position:"relative",width:"100%"},arrow1:{right:"6px",position:"absolute"}}),Pl=()=>{const n=ys();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 Il=null;const Es=n=>(0,c.Z)(a=>{var l,f,p,v;return{root:{color:a.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:{width:n.drawerWidthClosed,justifyContent:"center"},open:{[a.breakpoints.up("sm")]:{width:n.drawerWidthOpen}},highlightable:{"&:hover":{background:(f=(l=a.palette.navigation.navItem)==null?void 0:l.hoverBackground)!=null?f:"#404040"}},highlighted:{background:(v=(p=a.palette.navigation.navItem)==null?void 0:p.hoverBackground)!=null?v:"#404040"},label:{fontWeight:"bold",whiteSpace:"nowrap",lineHeight:"auto",flex:"3 1 auto",width:"110px",overflow:"hidden","text-overflow":"ellipsis"},iconContainer:{boxSizing:"border-box",height:"100%",width:n.iconContainerWidth,marginRight:-a.spacing(2),display:"flex",alignItems:"center",justifyContent:"center"},searchRoot:{marginBottom:12},searchField:{color:"#b5b5b5",fontWeight:"bold",fontSize:a.typography.fontSize},searchFieldHTMLInput:{padding:a.spacing(2,0,2)},searchContainer:{width:n.drawerWidthOpen-n.iconContainerWidth},secondaryAction:{width:a.spacing(6),textAlign:"center",marginRight:a.spacing(1)},closedItemIcon:{width:"100%",justifyContent:"center"},submenuArrow:{display:"flex"},expandButton:{background:"none",border:"none",color:a.palette.navigation.color,width:"100%",cursor:"pointer",position:"relative",height:48},arrows:{position:"absolute",right:10},selected:{"&$root":{borderLeft:`solid ${n.selectedIndicatorWidth}px ${a.palette.navigation.indicator}`,color:a.palette.navigation.selectedColor},"&$closed":{width:n.drawerWidthClosed},"& $closedItemIcon":{paddingRight:n.selectedIndicatorWidth},"& $iconContainer":{marginLeft:-n.selectedIndicatorWidth}}}},{name:"BackstageSidebarItem"});function ta(n){return(0,t.useMemo)(()=>Es(n),[n])()}const vs=(n,a)=>(0,d.useElementFilter)(n.props.children,l=>{let f=!1;return l.getElements().forEach(({props:{to:p,dropdownItems:v}})=>{if(!f){if(v!=null&&v.length){v.forEach(({to:P})=>f=f||Ja(a,(0,Zn.i3)(P)));return}p&&(f=Ja(a,(0,Zn.i3)(p)))}}),f},[a.pathname]);function Xa(n){return n.to===void 0}const As=t.createElement(fs).type,Rs=t.forwardRef(function({to:a,end:l,style:f,className:p,activeStyle:v,caseSensitive:P,activeClassName:z="active","aria-current":G="page",...H},ae){let{pathname:_}=(0,Zn.TH)(),{pathname:Ae}=(0,Zn.WU)(a);P||(_=_.toLocaleLowerCase("en-US"),Ae=Ae.toLocaleLowerCase("en-US"));let Te=_===Ae;!Te&&!l&&(Te=_.startsWith(`${Ae}/`));const Be=Te?G:void 0;return t.createElement(b.rU,{...H,to:a,ref:ae,"aria-current":Be,style:{...f,...Te?v:void 0},className:E()([p,Te?z:void 0])})}),qa=(0,t.forwardRef)((n,a)=>{const{icon:l,text:f,hasNotifications:p=!1,hasSubmenu:v=!1,disableHighlight:P=!1,onClick:z,children:G,className:H,...ae}=n,{sidebarConfig:_}=(0,t.useContext)(Kn),Ae=ta(_),{isOpen:Te}=fa(),Be=!Te&&v?{display:"flex",marginLeft:"24px"}:{},ft=t.createElement("div",{style:Be},t.createElement(l,{fontSize:"small"}),!Te&&v?t.createElement(Qa.Z,null):t.createElement(t.Fragment,null)),Mt=t.createElement(ms.Z,{color:"secondary",variant:"dot",overlap:"circular",invisible:!p,className:E()({[Ae.closedItemIcon]:!Te})},ft),Vt=t.createElement(t.Fragment,null,t.createElement("div",{"data-testid":"login-button",className:Ae.iconContainer},Mt),f&&t.createElement(nt.Z,{variant:"subtitle2",className:Ae.label},f),t.createElement("div",{className:Ae.secondaryAction},G)),qt=Te?Vt:Mt,pt={onClick:z,className:E()(H,Ae.root,Te?Ae.open:Ae.closed,Xa(n)&&Ae.buttonItem,{[Ae.highlightable]:!P})};return Xa(n)?t.createElement("button",{"aria-label":f,...pt,ref:a},qt):t.createElement(Rs,{...pt,activeClassName:Ae.selected,to:n.to?n.to:"",ref:a,"aria-label":f||n.to,...ae},qt)}),Ss=({children:n,...a})=>{const{sidebarConfig:l}=(0,t.useContext)(Kn),f=ta(l),[p,v]=(0,t.useState)(!1),P=(0,Zn.TH)(),z=vs(n,P),G=(0,mt.Z)(Ae=>Ae.breakpoints.down("sm")),H=()=>{v(!0)},ae=()=>{v(!1)},_=()=>G?p?t.createElement(hs.Z,{fontSize:"small",className:f.submenuArrow}):t.createElement(gs.Z,{fontSize:"small",className:f.submenuArrow}):!p&&t.createElement(Qa.Z,{fontSize:"small",className:f.submenuArrow});return t.createElement(Ma.Provider,{value:{isHoveredOn:p,setIsHoveredOn:v}},t.createElement("div",{"data-testid":"item-with-submenu",onMouseLeave:ae,onTouchStart:p?ae:H,onMouseEnter:H,className:E()(p&&f.highlighted)},t.createElement(qa,{hasSubmenu:!0,className:z?f.selected:"",...a},_()),p&&n))},_a=(0,t.forwardRef)((n,a)=>{const[l]=(0,d.useElementFilter)(n.children,f=>f.getElements().filter(p=>p.type===As));return l?t.createElement(Ss,{...n},l):t.createElement(qa,{...n,ref:a})});function Ll(n){const{sidebarConfig:a}=useContext(SidebarConfigContext),[l,f]=useState(""),p=ta(a),v=n.icon?n.icon:SearchIcon,P=()=>{n.onSearch(l),f("")},z=_=>{_.key==="Enter"&&(_.preventDefault(),P())},G=_=>{f(_.target.value)},H=_=>{_.preventDefault(),_.stopPropagation()},ae=_=>{P(),_.preventDefault()};return React.createElement("div",{className:p.searchRoot},React.createElement(_a,{icon:v,to:n.to,onClick:ae,disableHighlight:!0},React.createElement(TextField,{placeholder:"Search",value:l,onClick:H,onChange:G,onKeyDown:z,className:p.searchContainer,InputProps:{disableUnderline:!0,className:p.searchField},inputProps:{className:p.searchFieldHTMLInput}})))}const Ol=(0,ea.Z)("div")({flex:1},{name:"BackstageSidebarSpace"}),xl=(0,ea.Z)("div")({height:8},{name:"BackstageSidebarSpacer"}),Cs=(0,ea.Z)("hr")({height:1,width:"100%",background:"#383838",border:"none",margin:"12px 0px"},{name:"BackstageSidebarDivider"}),Ts=n=>({overflowY:"auto","&::-webkit-scrollbar":{backgroundColor:n.palette.background.default,width:"5px",borderRadius:"5px"},"&::-webkit-scrollbar-thumb":{backgroundColor:n.palette.text.hint,borderRadius:"5px"}}),Dl=(0,ea.Z)("div")(({theme:n})=>{const a=Ts(n);return{flex:"0 1 auto",overflowX:"hidden",width:"calc(100% - 5px)",minHeight:"48px",overflowY:"hidden","@media (hover: none)":a,"&:hover":a}}),Fl=()=>{const{sidebarConfig:n}=useContext(SidebarConfigContext),a=ta(n),{isOpen:l,setOpen:f}=useSidebarOpenState();if(useMediaQuery(P=>P.breakpoints.down("md"),{noSsr:!0}))return null;const v=()=>{f(!l)};return React.createElement("button",{onClick:v,className:a.expandButton,"aria-label":"Expand Sidebar","data-testid":"sidebar-expand-button"},React.createElement("div",{className:a.arrows},l?React.createElement(DoubleArrowLeft,null):React.createElement(DoubleArrowRight,null)))},bs=(0,c.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 Ps(n){const{sidebarConfig:a}=useContext(SidebarConfigContext),l=bs({sidebarConfig:a}),{text:f,onClose:p}=n,v=()=>p();return React.createElement("div",{className:l.introCard},React.createElement(Typography,{variant:"subtitle2"},f),React.createElement("div",{className:l.introDismiss},React.createElement(Link,{component:"button",onClick:v,underline:"none",className:l.introDismissLink},React.createElement(CloseIcon,{className:l.introDismissIcon}),React.createElement(Typography,{component:"span",className:l.introDismissText},"Dismiss"))))}const eo=n=>{const{text:a,onDismiss:l}=n,[f,p]=useState(!1),v=()=>{p(!0)};return React.createElement(Collapse,{in:!f,onExited:l},React.createElement(Ps,{text:a,onClose:v}))},Is=null,Ls="And your recently viewed plugins will pop up here!";function Bl(n){const{isOpen:a}=useSidebarOpenState(),l={starredItemsDismissed:!1,recentlyViewedItemsDismissed:!1},[f,p]=useLocalStorageValue(SIDEBAR_INTRO_LOCAL_STORAGE),{starredItemsDismissed:v,recentlyViewedItemsDismissed:P}=f!=null?f:{},z=()=>{p(H=>({...l,...H,starredItemsDismissed:!0}))},G=()=>{p(H=>({...l,...H,recentlyViewedItemsDismissed:!0}))};return a?React.createElement(React.Fragment,null,!v&&React.createElement(React.Fragment,null,React.createElement(eo,{text:Is,onDismiss:z}),React.createElement(SidebarDivider,null)),!P&&React.createElement(eo,{text:Ls,onDismiss:G})):null}const Os=(0,c.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 to(n){const{className:a,stretch:l,noPadding:f,children:p,...v}=n,{contentRef:P}=za(),z=Os();return t.createElement("article",{ref:P,tabIndex:-1,...v,className:E()(z.root,a,{[z.stretch]:l,[z.noPadding]:f})},p)}var xs=e(6487),Ds=e(99152);const Fs=(0,c.Z)(n=>({tabsWrapper:{gridArea:"pageSubheader",backgroundColor:n.palette.background.paper,paddingLeft:n.spacing(3),minWidth:0},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 no(n){const{tabs:a,onChange:l,selectedIndex:f}=n,[p,v]=(0,t.useState)(f!=null?f:0),P=Fs(),z=(0,t.useCallback)((G,H)=>{f===void 0&&v(H),l&&f!==H&&l(H)},[f,l]);return(0,t.useEffect)(()=>{f!==void 0&&v(f)},[f]),t.createElement("div",{className:P.tabsWrapper},t.createElement(Ds.Z,{selectionFollowsFocus:!0,indicatorColor:"primary",textColor:"inherit",variant:"scrollable",scrollButtons:"auto","aria-label":"scrollable auto tabs example",onChange:z,value:p},a.map((G,H)=>t.createElement(xs.Z,{...G.tabProps,"data-testid":`header-tab-${H}`,label:G.label,key:G.id,value:H,className:P.defaultTab,classes:{selected:P.selected,root:P.tabRoot}}))))}function Bs(n){var z,G,H;const a=(0,Zn.UO)(),f=n.map(({path:ae,children:_})=>({caseSensitive:!1,path:`${ae}/*`,element:_})).sort((ae,_)=>_.path.replace(/\/\*$/,"").localeCompare(ae.path.replace(/\/\*$/,""))),p=(z=(0,Zn.V$)(f))!=null?z:n[0].children,[v]=(G=(0,Zn.fp)(f,`/${a["*"]}`))!=null?G:[],P=v?n.findIndex(ae=>`${ae.path}/*`===v.route.path):0;return{index:P===-1?0:P,element:p,route:(H=n[P])!=null?H:n[0]}}function ro(n){const{routes:a}=n,l=(0,Zn.s0)(),{index:f,route:p,element:v}=Bs(a),P=(0,t.useMemo)(()=>a.map(G=>({id:G.path,label:G.title,tabProps:G.tabProps})),[a]),z=G=>l(a[G].path.replace(/\/\*$/,"").replace(/^\//,""));return t.createElement(t.Fragment,null,t.createElement(no,{tabs:P,selectedIndex:f,onChange:z}),t.createElement(to,null,t.createElement(da.q,{title:p.title}),v))}const ma=()=>null;(0,d.attachComponentData)(ma,"core.gatherMountPoints",!0);function ao(n){const a=t.createElement(ma,{path:"",title:""},t.createElement("div",null)).type;return t.Children.toArray(n).flatMap(l=>{if(!(0,t.isValidElement)(l))return[];if(l.type===t.Fragment)return ao(l.props.children);if(l.type!==a)throw new Error("Child of TabbedLayout must be an TabbedLayout.Route");const{path:f,title:p,children:v,tabProps:P}=l.props;return[{path:f,title:p,children:v,tabProps:P}]})}function Ms(n){const a=ao(n.children);return t.createElement(ro,{routes:a})}Ms.Route=ma;const ws=(0,c.Z)(n=>({value:{marginBottom:"6px"},subvalue:{color:n.palette.textSubtle,fontWeight:"normal"}}),{name:"BackstageSubvalueCell"});function $s(n){const{value:a,subvalue:l}=n,f=ws();return t.createElement(t.Fragment,null,t.createElement("div",{className:f.value},a),t.createElement("div",{className:f.subvalue},l))}var Us=e(21070),Ns=e(90324),Zs=e(98281),zs=e(48049),oo=e(51209),so=e(33375),Ws=e(44233),Hs=e(27604),ha=e(36444),js=e(37971),Vs=e(59709),Gs=e(17373),Ks=e(3702),ks=e(93111),na=e(67222);const Ys=(0,c.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"}),Js=n=>{var G;const a=Ys(),{onChangeFilters:l}=n,[f,p]=(0,t.useState)({...n.selectedFilters}),[v,P]=(0,t.useState)(!1),z=()=>{p({}),P(H=>!H)};return(0,t.useEffect)(()=>{l(f)},[f,l]),t.createElement("div",{className:a.root},t.createElement("div",{className:a.header},t.createElement("div",{className:a.value},"Filters"),t.createElement(y.Z,{color:"primary",onClick:z},"Clear all")),t.createElement("div",{className:a.filters},((G=n.filters)==null?void 0:G.length)&&n.filters.map(H=>t.createElement(ot,{triggerReset:v,key:H.element.label,...H.element,selected:f[H.element.label],onChange:ae=>p({...f,[H.element.label]:ae})}))))},Qs={Add:(0,t.forwardRef)((n,a)=>t.createElement(Us.Z,{...n,ref:a})),Check:(0,t.forwardRef)((n,a)=>t.createElement(Zs.Z,{...n,ref:a})),Clear:(0,t.forwardRef)((n,a)=>t.createElement(so.Z,{...n,ref:a})),Delete:(0,t.forwardRef)((n,a)=>t.createElement(Ws.Z,{...n,ref:a})),DetailPanel:(0,t.forwardRef)((n,a)=>t.createElement(oo.Z,{...n,ref:a})),Edit:(0,t.forwardRef)((n,a)=>t.createElement(Hs.Z,{...n,ref:a})),Export:(0,t.forwardRef)((n,a)=>t.createElement(Ks.Z,{...n,ref:a})),Filter:(0,t.forwardRef)((n,a)=>t.createElement(ha.Z,{...n,ref:a})),FirstPage:(0,t.forwardRef)((n,a)=>t.createElement(js.Z,{...n,ref:a})),LastPage:(0,t.forwardRef)((n,a)=>t.createElement(Vs.Z,{...n,ref:a})),NextPage:(0,t.forwardRef)((n,a)=>t.createElement(oo.Z,{...n,ref:a})),PreviousPage:(0,t.forwardRef)((n,a)=>t.createElement(zs.Z,{...n,ref:a})),ResetSearch:(0,t.forwardRef)((n,a)=>t.createElement(so.Z,{...n,ref:a})),Search:(0,t.forwardRef)((n,a)=>t.createElement(ha.Z,{...n,ref:a})),SortArrow:(0,t.forwardRef)((n,a)=>t.createElement(Ns.Z,{...n,ref:a})),ThirdStateCheck:(0,t.forwardRef)((n,a)=>t.createElement(Gs.Z,{...n,ref:a})),ViewColumn:(0,t.forwardRef)((n,a)=>t.createElement(ks.Z,{...n,ref:a}))};function io(n,a){const l=a.split(".");let f=n[l[0]];for(let p=1;p<l.length;++p){if(f===void 0)return f;const v=l[p];f=f[v]}return f}const Xs=(0,yn.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"})(na.W$),lo=(0,yn.Z)(n=>({root:{padding:n.spacing(3,0,2.5,2.5)},title:{"& > h6":{fontWeight:"bold"}},searchField:{paddingRight:n.spacing(2)}}),{name:"BackstageTableToolbar"})(na.UW),_s=(0,c.Z)(()=>({root:{display:"flex",alignItems:"center",justifyContent:"space-between"},title:{fontWeight:"bold",fontSize:18,whiteSpace:"nowrap"}}),{name:"BackstageTableFiltersContainer"}),ei=(0,c.Z)(()=>({root:{display:"flex",alignItems:"start"}}),{name:"BackstageTable"});function ti(n,a){return n.map(l=>{const f={};let p=l.cellStyle||{};if(l.highlight)if(f.color=a.palette.textContrast,typeof p=="object")p.fontWeight=a.typography.fontWeightBold;else{const v=p;p=(P,z,G)=>({...v(P,z,G),fontWeight:a.typography.fontWeightBold})}return{...l,headerStyle:f,cellStyle:p}})}function ni(n,a){return(0,x.transform)(n,(l,f,p)=>{(0,x.isEqual)(f,a[p])||(l[p]=f)})}const co={search:"",filtersOpen:!1,filters:{}};function ri(n){const{toolbarRef:a,setSearch:l,hasFilters:f,selectedFiltersLength:p,toggleFilters:v}=n,P=_s(),z=(0,t.useCallback)(G=>{n.onSearchChanged(G),l(G)},[n,l]);return f?t.createElement("div",{className:P.root},t.createElement("div",{className:P.root},t.createElement(Ue.Z,{onClick:v,"aria-label":"filter list"},t.createElement(ha.Z,null)),t.createElement(nt.Z,{className:P.title},"Filters (",p,")")),t.createElement(lo,{...n,ref:a,onSearchChanged:z})):t.createElement(lo,{...n,ref:a,onSearchChanged:z})}function ai(n){const{data:a,columns:l,options:f,title:p,subtitle:v,filters:P,initialState:z,emptyContent:G,onStateChange:H,components:ae,..._}=n,Ae=ei(),Te=(0,Ee.Z)(),Be={...co,...z},[ft,Mt]=(0,t.useState)(Be.filtersOpen),Vt=(0,t.useCallback)(()=>Mt(dn=>!dn),[Mt]),[qt,pt]=(0,t.useState)(0),[Gt,nn]=(0,t.useState)(a),[_t,ar]=(0,t.useState)(Be.filters),Hn=ti(l,Te),[jr,wt]=(0,t.useState)(Be.search);(0,t.useEffect)(()=>{if(H){const dn=ni({search:jr,filtersOpen:ft,filters:_t},co);H(dn)}},[jr,ft,_t,H]);const Tr={headerStyle:{textTransform:"uppercase"}},Vr=(0,t.useCallback)(dn=>{var In;return(In=l.find(ur=>ur.title===dn))==null?void 0:In.field},[l]);(0,t.useEffect)(()=>{if(typeof a=="function")return;if(!_t){nn(a);return}const dn=Object.values(_t);if(a&&dn.flat().length){const In=a.filter(ur=>!!Object.entries(_t).filter(([,or])=>!!or.length).every(([or,sn])=>{const Ln=io(ur,Vr(or));return Array.isArray(Ln)&&Array.isArray(sn)?Ln.some(Pr=>sn.includes(Pr)):Array.isArray(Ln)?Ln.includes(sn):Array.isArray(sn)?sn.includes(Ln):Ln===sn}));nn(In)}else nn(a);pt(dn.flat().length)},[a,_t,Vr]);const br=(dn,In)=>{const ur=sn=>{const Ln=new Set,Pr=sr=>{sr!=null&&Ln.add(sr)};return In&&In.forEach(sr=>{const Ir=io(sr,Vr(sn));Array.isArray(Ir)?Ir.forEach(Pr):Pr(Ir)}),Ln},or=sn=>({placeholder:"All results",label:sn.column,multiple:sn.type==="multiple-select",items:[...ur(sn.column)].sort().map(Ln=>({label:Ln,value:Ln}))});return dn.map(sn=>({type:sn.type,element:or(sn)}))},aa=!!(P!=null&&P.length),va=(0,t.useCallback)(dn=>t.createElement(ri,{setSearch:wt,hasFilters:aa,selectedFiltersLength:qt,toggleFilters:Vt,...dn}),[Vt,aa,qt,wt]),oa=typeof a!="function"&&a.length===0,sa=l.length,Aa=(0,t.useCallback)(dn=>G&&oa?t.createElement("tbody",null,t.createElement("tr",null,t.createElement("td",{colSpan:sa},G))):t.createElement(na.os,{...dn}),[oa,G,sa]);return t.createElement("div",{className:Ae.root},ft&&a&&typeof a!="function"&&(P==null?void 0:P.length)&&t.createElement(Js,{filters:br(P,a),selectedFilters:_t,onChangeFilters:ar}),t.createElement(na.ZP,{components:{Header:Xs,Toolbar:va,Body:Aa,...ae},options:{...Tr,...f},columns:Hn,icons:Qs,title:t.createElement(t.Fragment,null,t.createElement(nt.Z,{variant:"h5",component:"h2"},p),v&&t.createElement(nt.Z,{color:"textSecondary",variant:"body1"},v)),data:typeof a=="function"?a:Gt,style:{width:"100%"},localization:{toolbar:{searchPlaceholder:"Filter"}},..._}))}const Ml=n=>{const{children:a,value:l,index:f,...p}=n;return React.createElement("div",{role:"tabpanel",hidden:l!==f,"aria-labelledby":`scrollable-auto-tab-${f}`,...p},l===f&&React.createElement(Box,{p:3},a))},oi=(0,c.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"}),wl=n=>{const a=oi(n),{ariaLabel:l,onClick:f}=n;return React.createElement(IconButton,{onClick:f,className:a.root,size:"small",disableRipple:!0,disableFocusRipple:!0,"aria-label":l},n.children)},si=(n,a)=>a?n?"20px":"0":"40px",ii=(0,c.Z)(n=>({root:{textTransform:"none",height:"64px",fontWeight:n.typography.fontWeightBold,fontSize:n.typography.pxToRem(13),color:n.palette.textSubtle,marginLeft:a=>si(a.isFirstNav,a.isFirstIndex),width:"130px",minWidth:"130px","&:hover":{outline:"none",backgroundColor:"transparent",color:n.palette.textSubtle}}}),{name:"BackstageTab"}),$l=n=>{const a=ii(n),{isFirstNav:l,isFirstIndex:f,...p}=n;return React.createElement(Tab,{classes:a,disableRipple:!0,...p})},li=(0,c.Z)(n=>({indicator:{display:"flex",justifyContent:"center",backgroundColor:n.palette.tabbar.indicator,height:"4px"},flexContainer:{alignItems:"center"},root:{"&:last-child":{marginLeft:"auto"}}}),{name:"BackstageTabBar"}),Ul=n=>{const a=li(n);return React.createElement(Tabs,{classes:a,...n,TabIndicatorProps:{children:React.createElement("span",null)}})},ci=(0,c.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 Nl(n){const{tabs:a}=n,l=ci(),[f,p]=useState([0,0]),[v,P]=useState(0),[z,G]=useState(0),[H,ae]=useState([[]]),_=useRef(),{width:Ae}=useWindowSize(),Te=(qt,pt)=>{p([v,pt])},Be=()=>{P(v-1)},ft=()=>{P(v+1)},Mt=()=>v+1<H.length;useEffect(()=>{const pt=v===0?1:2,Gt=_.current.offsetWidth-20-pt*30,nn=f[0]*z+f[1],_t=Math.floor(Gt/170);G(_t),ae(chunkArray(a,_t)),p([Math.floor(nn/_t),nn%_t])},[Ae,a]);const Vt=v===f[0]?f[1]:!1;return React.createElement("div",{className:l.root},React.createElement(AppBar,{ref:_,className:l.appbar,position:"static"},React.createElement("div",null,React.createElement(StyledTabs,{value:Vt,onChange:Te,selectionFollowsFocus:!0},v!==0&&React.createElement(StyledIcon,{onClick:Be,ariaLabel:"navigate-before"},React.createElement(NavigateBeforeIcon,null)),H[v].map((qt,pt)=>React.createElement(StyledTab,{value:pt,isFirstIndex:pt===0,isFirstNav:v===0,key:pt,icon:qt.icon||void 0,label:qt.label||void 0})),Mt()&&React.createElement(StyledIcon,{isNext:!0,onClick:ft,ariaLabel:"navigate-next"},React.createElement(NavigateNextIcon,null))))),Vt!==!1?H[v].map((qt,pt)=>React.createElement(TabPanel,{key:pt,value:pt,index:Vt},qt.content)):React.createElement(TabPanel,{key:"panel_outside_chunked_array",value:f[1],index:f[1]},H[f[0]][f[1]].content))}var Zl=e(44311);function ui(n,a){const l=n[n.length-1];if(!!l)return l>=.9?a.palette.status.ok:l>=.5?a.palette.status.warning:a.palette.status.error}function zl(n){var l;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:(l=n.color)!=null?l:ui(n.data,a)})):null}const di=n=>(0,c.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"}),fi=({title:n="Unknown page",className:a})=>t.createElement(nt.Z,{variant:"h4",component:"h2",className:a,"data-testid":"header-title"},n);function mi(n){const{description:a,title:l,titleComponent:f=void 0,children:p,textAlign:v="left"}=n,P=di({textAlign:v})(),z=f||t.createElement(fi,{title:l,className:P.title});return t.createElement(t.Fragment,null,t.createElement(da.q,{title:l}),t.createElement("div",{className:P.container},t.createElement("div",{className:P.leftItemsBox},z,a&&t.createElement(nt.Z,{className:P.description,variant:"body2"},a)),t.createElement("div",{className:P.rightItemsBox},p)))}var hi=e.p+"static/mic-drop.fe3ef4d0..svg";const gi=(0,c.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"}),pi=()=>{const n=gi();return t.createElement("img",{src:hi,className:n.micDrop,alt:"Girl dropping mic from her hands"})},yi=(0,c.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 Ei(n){const{status:a,statusMessage:l,additionalInfo:f,supportUrl:p}=n,v=yi(),P=(0,Zn.s0)(),z=xa();return t.createElement($t.Z,{container:!0,spacing:0,className:v.container},t.createElement(pi,null),t.createElement($t.Z,{item:!0,xs:12,sm:8,md:4},t.createElement(nt.Z,{"data-testid":"error",variant:"body1",className:v.subtitle},"ERROR ",a,": ",l),t.createElement(nt.Z,{variant:"body1",className:v.subtitle},f),t.createElement(nt.Z,{variant:"h2",className:v.title},"Looks like someone dropped the mic!"),t.createElement(nt.Z,{variant:"h6"},t.createElement(K,{to:"#","data-testid":"go-back-link",onClick:()=>P(-1)},"Go back"),"... or please"," ",t.createElement(K,{to:p||z.url},"contact support")," if you think this is a bug.")))}var vi=e(16173);const Ai=(0,yn.Z)({root:{textDecoration:"underline",cursor:"pointer"}},{name:"BackstageBreadcrumbsClickableText"})(nt.Z),ga=(0,yn.Z)({root:{textDecoration:"underline",color:"inherit"}},{name:"BackstageBreadcrumbsStyledBox"})(un.Z);function Ri(n){const{children:a,...l}=n,[f,p]=t.useState(null),v=t.Children.toArray(a),[P,z,...G]=v,H=G.length?G.pop():v[v.length-1],ae=v.length>3,_=Be=>{p(Be.currentTarget)},Ae=()=>{p(null)},Te=Boolean(f);return t.createElement(t.Fragment,null,t.createElement(vi.Z,{"aria-label":"breadcrumb",...l},v.length>1&&t.createElement(ga,{clone:!0},P),v.length>2&&t.createElement(ga,{clone:!0},z),ae&&t.createElement(Ai,{onClick:_},"..."),t.createElement(un.Z,{style:{fontStyle:"italic"}},H)),t.createElement(Pa.ZP,{open:Te,anchorEl:f,onClose:Ae,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}},t.createElement(U.Z,null,G.map((Be,ft)=>t.createElement(re.Z,{key:ft,button:!0},t.createElement(ga,{clone:!0},Be))))))}const Si=(0,c.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",alignItems:"center"},title:{color:n.page.fontColor,wordBreak:"break-word",fontSize:n.typography.h3.fontSize,marginBottom:0},subtitle:{color:n.page.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.page.fontColor},breadcrumb:{color:n.page.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"}),Ci=({type:n,typeLink:a,classes:l,pageTitle:f})=>n?a?t.createElement(Ri,{className:l.breadcrumb},t.createElement(K,{to:a},n),t.createElement(nt.Z,null,f)):t.createElement(nt.Z,{className:l.type},n):null,Ti=({pageTitle:n,classes:a,tooltip:l})=>{const f=t.createElement(nt.Z,{className:a.title,variant:"h1"},n);return l?t.createElement(xe.ZP,{title:l,placement:"top-start"},f):f},bi=({classes:n,subtitle:a})=>a?typeof a!="string"?t.createElement(t.Fragment,null,a):t.createElement(nt.Z,{className:n.subtitle,variant:"subtitle2",component:"span"},a):null;function uo(n){const{children:a,pageTitleOverride:l,style:f,subtitle:p,title:v,tooltip:P,type:z,typeLink:G}=n,H=Si(),_=(0,d.useApi)(d.configApiRef).getOptionalString("app.title")||"Backstage",Ae=l||v,Te=v||l,Be=`${Ae} | %s | ${_}`,ft=`${Ae} | ${_}`;return t.createElement(t.Fragment,null,t.createElement(da.q,{titleTemplate:Be,defaultTitle:ft}),t.createElement("header",{style:f,className:H.header},t.createElement(un.Z,{className:H.leftItemsBox},t.createElement(Ci,{classes:H,type:z,typeLink:G,pageTitle:Te}),t.createElement(Ti,{classes:H,pageTitle:Te,tooltip:P}),t.createElement(bi,{classes:H,subtitle:p})),t.createElement($t.Z,{container:!0,className:H.rightItemsBox,spacing:4},a)))}const Pi=(0,c.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"}),Ii=({value:n,className:a})=>t.createElement(nt.Z,{className:a},n);function Li(n){const{label:a,value:l,url:f}=n,p=Pi(),v=t.createElement(Ii,{className:p.value,value:l||"<Unknown>"});return t.createElement($t.Z,{item:!0},t.createElement("span",{className:p.root},t.createElement(nt.Z,{className:p.label},a),f?t.createElement(K,{to:f},v):v))}const Oi={hour:"2-digit",minute:"2-digit"};function fo(n){const a=new Date,l=window.navigator.language,f=[];if(!n.has("homepage.clocks"))return f;const p=n.getConfigArray("homepage.clocks");for(const v of p)if(v.has("label")&&v.has("timezone")){let P=v.getString("label");const z={timeZone:v.getString("timezone"),...Oi};try{new Date().toLocaleString(l,z)}catch{console.warn(`The timezone ${z.timeZone} is invalid. Defaulting to GMT`),z.timeZone="GMT",P="GMT"}const G=a.toLocaleTimeString(l,z);f.push({time:G,label:P})}return f}function Wl(n){const a=useApi(configApiRef),l=[],[f,p]=React.useState(l);return React.useEffect(()=>{p(fo(a));const v=setInterval(()=>{p(fo(a))},1e3);return()=>{clearInterval(v)}},[a]),f.length!==0?React.createElement(React.Fragment,null,f.map(v=>React.createElement(HeaderLabel,{label:v.label,value:v.time,key:v.label}))):null}const xi=n=>(0,o.Z)({root:{color:n.palette.common.white,padding:n.spacing(2,2,3),backgroundImage:n.getPageTheme({themeId:"card"}).backgroundImage,backgroundPosition:0,backgroundSize:"inherit"}}),Di=(0,c.Z)(xi,{name:"BackstageItemCardHeader"});function Fi(n){const{title:a,subtitle:l,children:f}=n,p=Di(n);return t.createElement("div",{className:p.root},l&&t.createElement(nt.Z,{variant:"subtitle2",component:"h3"},l),a&&t.createElement(nt.Z,{variant:"h6",component:"h4"},a),f)}function Hl(n){const{description:a,tags:l,title:f,type:p,subtitle:v,label:P,onClick:z,href:G}=n;return React.createElement(Card,null,React.createElement(CardMedia,null,React.createElement(ItemCardHeader,{title:f,subtitle:v||p})),React.createElement(CardContent,null,l!=null&&l.length?React.createElement(Box,null,l.map((H,ae)=>React.createElement(Chip,{size:"small",label:H,key:ae}))):null,a),React.createElement(CardActions,null,!G&&React.createElement(Button,{to:"#",onClick:z,color:"primary"},P),G&&React.createElement(Button,{to:G,color:"primary"},P)))}const Bi=n=>(0,o.Z)({root:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(22em, 1fr))",gridAutoRows:"1fr",gridGap:n.spacing(2)}}),Mi=(0,c.Z)(Bi,{name:"BackstageItemCardGrid"});function wi(n){const{children:a,...l}=n,f=Mi(l);return t.createElement("div",{className:f.root,...l},a)}var $i=e(41547);const Ui=(0,c.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 mo(n){const{themeId:a,children:l}=n,{isMobile:f}=Wr(),p=Ui({isMobile:f});return t.createElement($i.Z,{theme:v=>({...v,page:v.getPageTheme({themeId:a})})},t.createElement("main",{className:p.root},l))}function Ni(n){const{themeId:a,children:l,...f}=n;return t.createElement(mo,{themeId:a},t.createElement(uo,{...f}),l)}var Pn=e(30195);const jl=Pn.z.object({providerInfo:Pn.z.object({}).catchall(Pn.z.unknown()).optional(),profile:Pn.z.object({email:Pn.z.string().optional(),displayName:Pn.z.string().optional(),picture:Pn.z.string().optional()}),backstageIdentity:Pn.z.object({token:Pn.z.string(),identity:Pn.z.object({type:Pn.z.literal("user"),userEntityRef:Pn.z.string(),ownershipEntityRefs:Pn.z.array(Pn.z.string())})})}),ho={defaultTokenExpiryMillis:5*60*1e3,tokenExpiryMarginMillis:5*60*1e3};function Zi(n){const a=new Date(Date.now()+ho.defaultTokenExpiryMillis);if(!n)return a;const[l,f,p]=n.split("."),v=JSON.parse(atob(f));return typeof v.exp!="number"?a:new Date(v.exp*1e3-ho.tokenExpiryMarginMillis)}class Vl{constructor(a){X(this,"options");X(this,"abortController");X(this,"state");this.options=a,this.abortController=new AbortController,this.state={type:"empty"}}async start(){await this.getSessionAsync()}getUserId(){const{backstageIdentity:a}=this.getSessionSync(),l=a.identity.userEntityRef,f=/^([^:/]+:)?([^:/]+\/)?([^:/]+)$/.exec(l);if(!f)throw new TypeError(`Invalid user entity reference "${l}"`);return f[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,l=this.fetchSession().then(f=>(this.state={type:"active",session:f,expiresAt:Zi(f.backstageIdentity.token)},f),f=>{throw this.state={type:"failed",error:f},f});return this.state={type:"fetching",promise:l,previous:a},l}async fetchSession(){const a=await this.options.discoveryApi.getBaseUrl("auth"),l=await fetch(`${a}/${this.options.provider}/refresh`,{signal:this.abortController.signal,headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"});if(!l.ok)throw await ResponseError.fromResponse(l);return proxiedSessionSchema.parse(await l.json())}}const Gl=n=>{const a=useApi(discoveryApiRef),[{status:l,error:f},{execute:p}]=useAsync(async()=>{const v=new ProxiedSignInIdentity({provider:n.provider,discoveryApi:a});await v.start(),n.onSignInSuccess(v)});return useMountEffect(p),l==="loading"?React.createElement(Progress,null):f?React.createElement(ErrorPanel,{title:"You do not appear to be signed in. Please try reloading the browser page.",error:f}):null},zi=(0,c.Z)({container:{padding:0,listStyle:"none"},item:{display:"flex",flexDirection:"column",width:"100%",maxWidth:"400px",margin:0,padding:0}},{name:"BackstageSignInPage"}),pa=({children:n})=>{const a=zi();return t.createElement($t.Z,{component:"li",item:!0,classes:a},n)};class ya{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 Wi(n){const[a,l,f]=n.split(".");return JSON.parse(atob(l))}class Ea{constructor(a){this.result=a}getUserId(){return this.result.userId}static fromResult(a){return new Ea(a)}async getIdToken(){var a,l;return(l=(a=this.result).getIdToken)==null?void 0:l.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:l,ent:f}=Wi(a);return{type:"user",userEntityRef:l,ownershipEntityRefs:f!=null?f:[]}}async getCredentials(){var l,f;return{token:await((f=(l=this.result).getIdToken)==null?void 0:f.call(l))}}async signOut(){var a,l;return(l=(a=this.result).signOut)==null?void 0:l.call(a)}}class Hr{constructor(a,l,f){X(this,"profilePromise");this.identity=a,this.authApi=l,this.profile=f}static createGuest(){return new ya}static fromLegacy(a){return Ea.fromResult(a)}static create(a){return new Hr(a.identity,a.authApi,a.profile)}getUserId(){const a=this.identity.userEntityRef,l=/^([^:/]+:)?([^:/]+\/)?([^:/]+)$/.exec(a);if(!l)throw new TypeError(`Invalid user entity reference "${a}"`);return l[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 Hi={Component:({config:n,onSignInSuccess:a})=>{const{apiRef:l,title:f,message:p}=n,v=(0,d.useApi)(l),P=(0,d.useApi)(d.errorApiRef),z=async()=>{try{const G=await v.getBackstageIdentity({instantPopup:!0});if(!G)throw new Error(`The ${f} provider is not configured to support sign-in`);const H=await v.getProfile();a(Hr.create({identity:G.identity,profile:H,authApi:v}))}catch(G){P.post(new nr.SP("Login failed",G))}};return t.createElement(pa,null,t.createElement(cr,{variant:"fullHeight",title:f,actions:t.createElement(y.Z,{color:"primary",variant:"outlined",onClick:z},"Sign In")},t.createElement(nt.Z,{variant:"body1"},p)))},loader:async(n,a)=>{const l=n.get(a),f=await l.getBackstageIdentity({optional:!0});if(!f)return;const p=await l.getProfile();return Hr.create({identity:f.identity,profile:p,authApi:l})}},ji={Component:({onSignInSuccess:n})=>t.createElement(pa,null,t.createElement(cr,{title:"Guest",variant:"fullHeight",actions:t.createElement(y.Z,{color:"primary",variant:"outlined",onClick:()=>n(new ya)},"Enter")},t.createElement(nt.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 ya};var Vi=e(63955),go=e(86619),po=e(74828),Gi=e(45455),Ki=e.n(Gi);const ki=/^[a-z0-9_\-]+\.[a-z0-9_\-]+\.[a-z0-9_\-]+$/i,Yi=(0,c.Z)(n=>({form:{display:"flex",flexFlow:"column nowrap"},button:{alignSelf:"center",marginTop:n.spacing(2)}}),{name:"BackstageCustomProvider"}),yo=n=>{const{ref:a,...l}=n;return{inputRef:a,...l}},Ji={Component:({onSignInSuccess:n})=>{const a=Yi(),{register:l,handleSubmit:f,formState:p}=(0,Vi.cI)({mode:"onChange"}),{errors:v}=p,P=({userId:z})=>{n(Hr.fromLegacy({userId:z,profile:{email:`${z}@example.com`}}))};return t.createElement(pa,null,t.createElement(cr,{title:"Custom User",variant:"fullHeight"},t.createElement(nt.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:f(P)},t.createElement(A.Z,null,t.createElement(go.Z,{...yo(l("userId",{required:!0})),label:"User ID",margin:"normal",error:Boolean(v.userId)}),v.userId&&t.createElement(po.Z,{error:!0},v.userId.message)),t.createElement(A.Z,null,t.createElement(go.Z,{...yo(l("idToken",{required:!1,validate:z=>!z||ki.test(z)||"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(po.Z,{error:!0},v.idToken.message)),t.createElement(y.Z,{type:"submit",color:"primary",variant:"outlined",className:a.button,disabled:!(p!=null&&p.isDirty)||!Ki()(v)},"Continue"))))},loader:async()=>{}},ra="@backstage/core:SignInPage:provider",Eo={guest:ji,custom:Ji,common:Hi};function vo(n,a){if(n in a)throw new Error(`"${n}" ID is duplicated. IDs of identity providers have to be unique.`)}function ql(n){return n.reduce((l,f)=>{if(typeof f=="string")return vo(f,l),l[f]={components:Eo[f],id:f},l;const{id:p}=f;return vo(p,l),l[p]={components:Eo.common,id:p,config:f},l},{})}const _l=(n,a)=>{const l=useApi(errorApiRef),f=useApiHolder(),[p,v]=useState(!0),P=useCallback(G=>{a(IdentityApiSignOutProxy.from({identityApi:G,signOut:async()=>{var H;localStorage.removeItem(ra),await((H=G.signOut)==null?void 0:H.call(G))}}))},[a]);useLayoutEffect(()=>{var _;if(!p)return;const G=localStorage.getItem(ra);if(G===null){v(!1);return}const H=n[G];if(!H){v(!1);return}let ae=!1;return H.components.loader(f,(_=H.config)==null?void 0:_.apiRef).then(Ae=>{ae||(Ae?P(Ae):v(!1))}).catch(Ae=>{ae||(localStorage.removeItem(ra),l.post(Ae),v(!1))}),()=>{ae=!0}},[p,l,a,f,n,P]);const z=useMemo(()=>Object.keys(n).map(G=>{const H=n[G],{Component:ae}=H.components,_=Ae=>{localStorage.setItem(ra,H.id),P(Ae)};return React.createElement(ae,{key:H.id,config:H.config,onSignInSuccess:_})}),[n,P]);return[p,z]},Qi=({onSignInSuccess:n,providers:a=[],title:l,align:f="left"})=>{const p=useApi(configApiRef),v=useStyles(),P=getSignInProviders(a),[z,G]=useSignInProviders(P,n);return z?React.createElement(Progress,null):React.createElement(Page,{themeId:"home"},React.createElement(Header,{title:p.getString("app.title")}),React.createElement(Content,null,l&&React.createElement(ContentHeader,{title:l,textAlign:f}),React.createElement(Grid,{container:!0,justifyContent:f==="center"?f:"flex-start",spacing:2,component:"ul",classes:v},G)))},Xi=({provider:n,auto:a,onSignInSuccess:l})=>{const f=useStyles(),p=useApi(n.apiRef),v=useApi(configApiRef),[P,z]=useState(),[G,H]=useState(!1),ae=async({checkExisting:_,showPopup:Ae})=>{try{let Te;if(_&&(Te=await p.getBackstageIdentity({optional:!0})),!Te&&(Ae||a)&&(H(!0),Te=await p.getBackstageIdentity({instantPopup:!0}),!Te))throw new Error(`The ${n.title} provider is not configured to support sign-in`);if(!Te){H(!0);return}const Be=await p.getProfile();l(UserIdentity.create({identity:Te.identity,authApi:p,profile:Be}))}catch(Te){z(Te),H(!0)}};return useMountEffect(()=>ae({checkExisting:!0})),G?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:f},React.createElement(GridItem,null,React.createElement(InfoCard,{variant:"fullHeight",title:n.title,actions:React.createElement(Button,{color:"primary",variant:"outlined",onClick:()=>{ae({showPopup:!0})}},"Sign In")},React.createElement(Typography,{variant:"body1"},n.message),P&&P.name!=="PopupRejectedError"&&React.createElement(Typography,{variant:"body1",color:"error"},P.message)))))):React.createElement(Progress,null)};function ec(n){return"provider"in n?React.createElement(Xi,{...n}):React.createElement(Qi,{...n})}const qi=(0,c.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"}),_i=(0,yn.Z)(n=>({root:{padding:n.spacing(2,2,2,2.5),display:"inline-block"},title:{fontWeight:700},subheader:{paddingTop:n.spacing(1)}}),{name:"BackstageTabbedCardBoldHeader"})(vr.Z);function tc(n){const{slackChannel:a,errorBoundaryProps:l,children:f,title:p,deepLink:v,value:P,onChange:z}=n,G=qi(),[H,ae]=useState(0),_=z||((Be,ft)=>ae(ft));let Ae;P?React.Children.map(f,Be=>{React.isValidElement(Be)&&(Be==null?void 0:Be.props.value)===P&&(Ae=Be==null?void 0:Be.props.children)}):React.Children.map(f,(Be,ft)=>{React.isValidElement(Be)&&ft===H&&(Ae=Be==null?void 0:Be.props.children)});const Te=l||(a?{slackChannel:a}:{});return React.createElement(Card,null,React.createElement(ErrorBoundary,{...Te},p&&React.createElement(_i,{title:p}),React.createElement(Tabs,{selectionFollowsFocus:!0,classes:G,value:P||H,onChange:_},f),React.createElement(Divider,null),React.createElement(CardContent,null,Ae),v&&React.createElement(BottomLink,{...v})))}const el=(0,c.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 nc(n){const{children:a,...l}=n,f=el();return React.createElement(Tab,{disableRipple:!0,classes:f,...l})}},24877:function(ee,s,e){"use strict";e.d(s,{f:function(){return R},z:function(){return y}});var r=e(76241),t=e(2784);const d=(0,r.CT)("analytics-context"),i=()=>{const g=(0,t.useContext)(d);if(g===void 0)return{routeRef:"unknown",pluginId:"root",extension:"App"};const E=g.atVersion(1);if(E===void 0)throw new Error("No context found for version 1.");return E},R=g=>{const{attributes:E,children:S}=g,x={...i(),...E},w=(0,r.EI)({1:x});return t.createElement(d.Provider,{value:w},S)};function c(g,E){const S=b=>React.createElement(R,{attributes:E},React.createElement(g,{...b}));return S.displayName=`WithAnalyticsContext(${g.displayName||g.name||"Component"})`,S}var o=e(27399);class u{constructor(E,S={routeRef:"unknown",pluginId:"root",extension:"App"}){this.analyticsApi=E,this.context=S}setContext(E){this.context=E}captureEvent(E,S,{value:b,attributes:x}={}){try{this.analyticsApi.captureEvent({action:E,subject:S,value:b,attributes:x,context:this.context})}catch(w){console.warn("Error during analytics event capture. %o",w)}}}function m(){try{return(0,o.useApi)(o.analyticsApiRef)}catch{return{captureEvent:()=>{}}}}function y(){const g=(0,t.useRef)(null),E=i(),S=m();function b(){return g.current===null&&(g.current=new u(S)),g.current}const x=b();return x.setContext(E),x}},39135:function(ee,s,e){"use strict";e.d(s,{CL:function(){return B},sM:function(){return t},$v:function(){return g},v_:function(){return E},hg:function(){return S},uB:function(){return y},bq:function(){return m},Ds:function(){return b},NW:function(){return x},VE:function(){return w},W0:function(){return F},gP:function(){return O},F4:function(){return i},ux:function(){return c},Kp:function(){return d},$4:function(){return D},p_:function(){return o},ZM:function(){return $},D:function(){return R},gW:function(){return u},E6:function(){return K}});var r=e(86833),t;(function(ne){const se="SignedIn";ne.SignedIn=se;const Ee="SignedOut";ne.SignedOut=Ee})(t||(t={}));const d=(0,r.createApiRef)({id:"core.auth.google"}),i=(0,r.createApiRef)({id:"core.auth.github"}),R=(0,r.createApiRef)({id:"core.auth.okta"}),c=(0,r.createApiRef)({id:"core.auth.gitlab"}),o=(0,r.createApiRef)({id:"core.auth.microsoft"}),u=(0,r.createApiRef)({id:"core.auth.onelogin"}),m=(0,r.createApiRef)({id:"core.auth.bitbucket"}),y=(0,r.createApiRef)({id:"core.auth.atlassian"}),g=(0,r.createApiRef)({id:"core.alert"}),E=(0,r.createApiRef)({id:"core.analytics"}),S=(0,r.createApiRef)({id:"core.apptheme"}),b=(0,r.createApiRef)({id:"core.config"}),x=(0,r.createApiRef)({id:"core.discovery"}),w=(0,r.createApiRef)({id:"core.error"});var B;(function(ne){ne[ne.None=0]="None";const Ee=1;ne[ne.Active=Ee]="Active"})(B||(B={}));const F=(0,r.createApiRef)({id:"core.featureflags"}),O=(0,r.createApiRef)({id:"core.fetch"}),D=(0,r.createApiRef)({id:"core.identity"}),$=(0,r.createApiRef)({id:"core.oauthrequest"}),K=(0,r.createApiRef)({id:"core.storage"})},27399:function(ee,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,"createReactExtension")&&e.d(s,{createReactExtension:function(){return r.createReactExtension}}),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,"usePluginOptions")&&e.d(s,{usePluginOptions:function(){return r.usePluginOptions}}),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(ee,s,e){"use strict";e.d(s,{T:function(){return t}});class r{constructor(i){if(this.config=i,!i.id.split(".").flatMap(c=>c.split("-")).every(c=>c.match(/^[a-z][a-z0-9]*$/)))throw new Error(`API id must only contain period separated lowercase alphanum tokens with dashes, got '${i.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(d){return new r(d)}},25182:function(ee,s,e){"use strict";e.d(s,{n:function(){return r}});function r(t,d){return"id"in t?{api:t,deps:{},factory:()=>d}:t}},86833:function(ee,s,e){"use strict";e.d(s,{createApiFactory:function(){return R.n},createApiRef:function(){return t.T},useApi:function(){return r.h_},useApiHolder:function(){return r.I_}});var r=e(5761),t=e(90515),d=e(16362),i=e.n(d);e.o(d,"FeatureFlagState")&&e.d(s,{FeatureFlagState:function(){return d.FeatureFlagState}}),e.o(d,"SessionState")&&e.d(s,{SessionState:function(){return d.SessionState}}),e.o(d,"alertApiRef")&&e.d(s,{alertApiRef:function(){return d.alertApiRef}}),e.o(d,"analyticsApiRef")&&e.d(s,{analyticsApiRef:function(){return d.analyticsApiRef}}),e.o(d,"appThemeApiRef")&&e.d(s,{appThemeApiRef:function(){return d.appThemeApiRef}}),e.o(d,"atlassianAuthApiRef")&&e.d(s,{atlassianAuthApiRef:function(){return d.atlassianAuthApiRef}}),e.o(d,"attachComponentData")&&e.d(s,{attachComponentData:function(){return d.attachComponentData}}),e.o(d,"bitbucketAuthApiRef")&&e.d(s,{bitbucketAuthApiRef:function(){return d.bitbucketAuthApiRef}}),e.o(d,"configApiRef")&&e.d(s,{configApiRef:function(){return d.configApiRef}}),e.o(d,"createApiFactory")&&e.d(s,{createApiFactory:function(){return d.createApiFactory}}),e.o(d,"createComponentExtension")&&e.d(s,{createComponentExtension:function(){return d.createComponentExtension}}),e.o(d,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return d.createExternalRouteRef}}),e.o(d,"createPlugin")&&e.d(s,{createPlugin:function(){return d.createPlugin}}),e.o(d,"createReactExtension")&&e.d(s,{createReactExtension:function(){return d.createReactExtension}}),e.o(d,"createRoutableExtension")&&e.d(s,{createRoutableExtension:function(){return d.createRoutableExtension}}),e.o(d,"createRouteRef")&&e.d(s,{createRouteRef:function(){return d.createRouteRef}}),e.o(d,"discoveryApiRef")&&e.d(s,{discoveryApiRef:function(){return d.discoveryApiRef}}),e.o(d,"errorApiRef")&&e.d(s,{errorApiRef:function(){return d.errorApiRef}}),e.o(d,"featureFlagsApiRef")&&e.d(s,{featureFlagsApiRef:function(){return d.featureFlagsApiRef}}),e.o(d,"fetchApiRef")&&e.d(s,{fetchApiRef:function(){return d.fetchApiRef}}),e.o(d,"getComponentData")&&e.d(s,{getComponentData:function(){return d.getComponentData}}),e.o(d,"githubAuthApiRef")&&e.d(s,{githubAuthApiRef:function(){return d.githubAuthApiRef}}),e.o(d,"gitlabAuthApiRef")&&e.d(s,{gitlabAuthApiRef:function(){return d.gitlabAuthApiRef}}),e.o(d,"googleAuthApiRef")&&e.d(s,{googleAuthApiRef:function(){return d.googleAuthApiRef}}),e.o(d,"identityApiRef")&&e.d(s,{identityApiRef:function(){return d.identityApiRef}}),e.o(d,"microsoftAuthApiRef")&&e.d(s,{microsoftAuthApiRef:function(){return d.microsoftAuthApiRef}}),e.o(d,"oauthRequestApiRef")&&e.d(s,{oauthRequestApiRef:function(){return d.oauthRequestApiRef}}),e.o(d,"oktaAuthApiRef")&&e.d(s,{oktaAuthApiRef:function(){return d.oktaAuthApiRef}}),e.o(d,"oneloginAuthApiRef")&&e.d(s,{oneloginAuthApiRef:function(){return d.oneloginAuthApiRef}}),e.o(d,"storageApiRef")&&e.d(s,{storageApiRef:function(){return d.storageApiRef}}),e.o(d,"useApp")&&e.d(s,{useApp:function(){return d.useApp}}),e.o(d,"useElementFilter")&&e.d(s,{useElementFilter:function(){return d.useElementFilter}}),e.o(d,"usePluginOptions")&&e.d(s,{usePluginOptions:function(){return d.usePluginOptions}}),e.o(d,"useRouteRef")&&e.d(s,{useRouteRef:function(){return d.useRouteRef}}),e.o(d,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return d.useRouteRefParams}});var R=e(25182)},16362:function(){},5761:function(ee,s,e){"use strict";e.d(s,{I_:function(){return d},h_:function(){return i}});var r=e(2784),t=e(76241);function d(){const c=(0,t.Vt)("api-context");if(!c)throw new Error("API context is not available");const o=c.atVersion(1);if(!o)throw new Error("ApiContext v1 not available");return o}function i(c){const u=d().get(c);if(!u)throw new Error(`No implementation available for ${c}`);return u}function R(c){return function(u){const m=g=>{const E=d(),S={};for(const b in c)if(c.hasOwnProperty(b)){const x=c[b],w=E.get(x);if(!w)throw new Error(`No implementation available for ${x}`);S[b]=w}return React.createElement(u,{...g,...S})},y=u.displayName||u.name||"Component";return m.displayName=`withApis(${y})`,m}}},31311:function(ee,s,e){"use strict";e.d(s,{useApp:function(){return r.q}});var r=e(32483),t=e(67229),d=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,"createReactExtension")&&e.d(s,{createReactExtension:function(){return t.createReactExtension}}),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(ee,s,e){"use strict";e.d(s,{q:function(){return t}});var r=e(76241);const t=()=>{const d=(0,r.Vt)("app-context");if(!d)throw new Error("App context is not available");const i=d.atVersion(1);if(!i)throw new Error("AppContext v1 not available");return i}},74181:function(ee,s,e){"use strict";e.d(s,{R5:function(){return i},CO:function(){return S},YO:function(){return b},P4:function(){return E},IY:function(){return R},vJ:function(){return F}});var r=e(76241);const t=(0,r.uW)("component-data-store",()=>new WeakMap),d="__backstage_data";function i(O,D,$){var se;const K=O;let ne=(se=K[d])!=null?se:t.get(O);if(ne||(ne={map:new Map},Object.defineProperty(K,d,{enumerable:!1,configurable:!0,writable:!1,value:ne}),t.set(O,ne)),ne.map.has(D)){const Ee=O.displayName||O.name;throw new Error(`Attempted to attach duplicate data "${D}" to component "${Ee}"`)}ne.map.set(D,$)}function R(O,D){var ne;if(!O)return;const $=O.type;if(!$)return;const K=(ne=$[d])!=null?ne:t.get($);if(!!K)return K.map.get(D)}var c=e(2784),o=e(24877),u=e(31311),m=e(82772);class y extends c.Component{constructor(){super(...arguments);X(this,"state",{error:void 0});X(this,"handleErrorReset",()=>{this.setState({error:void 0})})}static getDerivedStateFromError($){return{error:$}}render(){const{error:$}=this.state,{app:K,plugin:ne}=this.props,{ErrorBoundaryFallback:se}=K.getComponents();return $?c.createElement(se,{error:$,resetError:this.handleErrorReset,plugin:ne}):this.props.children}}var g=e(40338);function E(O){const{component:D,mountPoint:$,name:K}=O;return b({component:{lazy:()=>D().then(ne=>{const se=Ue=>{try{(0,m.tg)($)}catch(xe){if(typeof xe=="object"&&xe!==null){const{message:We}=xe;if(typeof We=="string"&&We.startsWith("No path for "))throw new Error(`Routable extension component with mount point ${$} 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 xe}return c.createElement(ne,{...Ue})},Ee=K||ne.displayName||ne.name||"LazyComponent";return se.displayName=`RoutableExtension(${Ee})`,se},ne=>Ee=>{const Ue=(0,u.useApp)(),{BootErrorPage:xe}=Ue.getComponents();return c.createElement(xe,{step:"load-chunk",error:ne})})},data:{"core.mountPoint":$},name:K})}function S(O){const{component:D,name:$}=O;return b({component:D,name:$})}function b(O){const{data:D={},name:$}=O;$||console.warn("Declaring extensions without name is DEPRECATED. Make sure that all usages of createReactExtension, createComponentExtension and createRoutableExtension provide a name.");let K;if("lazy"in O.component){const se=O.component.lazy;K=(0,c.lazy)(()=>se().then(Ee=>({default:Ee})))}else K=O.component.sync;const ne=$||K.displayName||K.name||"Component";return{expose(se){const Ee=Ue=>{const xe=(0,u.useApp)(),{Progress:We}=xe.getComponents(),Re=D==null?void 0:D["core.mountPoint"];return c.createElement(c.Suspense,{fallback:c.createElement(We,null)},c.createElement(y,{app:xe,plugin:se},c.createElement(o.f,{attributes:{pluginId:se.getId(),...$&&{extension:$},...Re&&{routeRef:Re.id}}},c.createElement(g.o,{plugin:se},c.createElement(K,{...Ue})))))};i(Ee,"core.plugin",se);for(const[Ue,xe]of Object.entries(D))i(Ee,Ue,xe);return Ee.displayName=`Extension(${ne})`,Ee}}}var x=e(27399);function w(O,D,$,K){return c.Children.toArray(O).flatMap(ne=>{if(!(0,c.isValidElement)(ne))return[];if(ne.type===c.Fragment)return w(ne.props.children,D,$,K);if(R(ne,"core.featureFlagged")){const se=ne.props;return("with"in se?D.isActive(se.with):!D.isActive(se.without))?w(ne.props.children,D,$,K):[]}if($===void 0||$(ne))return[ne];if(K)throw new Error(K);return w(ne.props.children,D,$,K)})}class B{constructor(D,$){this.node=D,this.featureFlagsApi=$}selectByComponentData(D){const $=w(this.node,this.featureFlagsApi,K=>R(K,D.key)!==void 0,D.withStrictError);return new B($,this.featureFlagsApi)}findComponentData(D){return w(this.node,this.featureFlagsApi,K=>R(K,D.key)!==void 0).map(K=>R(K,D.key)).filter(K=>K!==void 0)}getElements(){return w(this.node,this.featureFlagsApi)}}function F(O,D,$=[]){const K=(0,x.useApi)(x.featureFlagsApiRef),ne=new B(O,K);return(0,c.useMemo)(()=>D(ne),[O,...$])}},80274:function(){},36964:function(ee,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 R.R5},bitbucketAuthApiRef:function(){return t.bitbucketAuthApiRef},configApiRef:function(){return t.configApiRef},createComponentExtension:function(){return R.CO},createExternalRouteRef:function(){return m.x8},createPlugin:function(){return u.r},createReactExtension:function(){return R.YO},createRoutableExtension:function(){return R.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 R.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 i.useApp},useElementFilter:function(){return R.vJ},usePluginOptions:function(){return d.y},useRouteRef:function(){return m.tg},useRouteRefParams:function(){return m.Oi}});var r=e(24877),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,"createReactExtension")&&e.d(s,{createReactExtension:function(){return t.createReactExtension}}),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,"usePluginOptions")&&e.d(s,{usePluginOptions:function(){return t.usePluginOptions}}),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 d=e(40338),i=e(31311);e.o(i,"attachComponentData")&&e.d(s,{attachComponentData:function(){return i.attachComponentData}}),e.o(i,"createApiFactory")&&e.d(s,{createApiFactory:function(){return i.createApiFactory}}),e.o(i,"createApiRef")&&e.d(s,{createApiRef:function(){return i.createApiRef}}),e.o(i,"createComponentExtension")&&e.d(s,{createComponentExtension:function(){return i.createComponentExtension}}),e.o(i,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return i.createExternalRouteRef}}),e.o(i,"createPlugin")&&e.d(s,{createPlugin:function(){return i.createPlugin}}),e.o(i,"createReactExtension")&&e.d(s,{createReactExtension:function(){return i.createReactExtension}}),e.o(i,"createRoutableExtension")&&e.d(s,{createRoutableExtension:function(){return i.createRoutableExtension}}),e.o(i,"createRouteRef")&&e.d(s,{createRouteRef:function(){return i.createRouteRef}}),e.o(i,"getComponentData")&&e.d(s,{getComponentData:function(){return i.getComponentData}}),e.o(i,"useApi")&&e.d(s,{useApi:function(){return i.useApi}}),e.o(i,"useApiHolder")&&e.d(s,{useApiHolder:function(){return i.useApiHolder}}),e.o(i,"useElementFilter")&&e.d(s,{useElementFilter:function(){return i.useElementFilter}}),e.o(i,"useRouteRef")&&e.d(s,{useRouteRef:function(){return i.useRouteRef}}),e.o(i,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return i.useRouteRefParams}});var R=e(74181),c=e(80274),o=e.n(c);e.o(c,"createApiFactory")&&e.d(s,{createApiFactory:function(){return c.createApiFactory}}),e.o(c,"createApiRef")&&e.d(s,{createApiRef:function(){return c.createApiRef}}),e.o(c,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return c.createExternalRouteRef}}),e.o(c,"createPlugin")&&e.d(s,{createPlugin:function(){return c.createPlugin}}),e.o(c,"createRouteRef")&&e.d(s,{createRouteRef:function(){return c.createRouteRef}}),e.o(c,"useApi")&&e.d(s,{useApi:function(){return c.useApi}}),e.o(c,"useApiHolder")&&e.d(s,{useApiHolder:function(){return c.useApiHolder}}),e.o(c,"useRouteRef")&&e.d(s,{useRouteRef:function(){return c.useRouteRef}}),e.o(c,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return c.useRouteRefParams}});var u=e(96896),m=e(82772)},40338:function(ee,s,e){"use strict";e.d(s,{o:function(){return i},y:function(){return R}});var r=e(76241),t=e(2784);const d="plugin-context",i=({children:c,plugin:o})=>{const{Provider:u}=(0,r.CT)(d);return t.createElement(u,{value:(0,r.EI)({1:{plugin:o}})},c)};function R(){const c=(0,r.Vt)(d);if(!c)throw new Error("Plugin Options context is not available");const o=c.atVersion(1);if(!o)throw new Error("Plugin Options v1 is not available");return o.plugin.getPluginOptions()}},96896:function(ee,s,e){"use strict";e.d(s,{r:function(){return t}});class r{constructor(i){X(this,"options");this.config=i}getId(){return this.config.id}getApis(){var i;return(i=this.config.apis)!=null?i:[]}getFeatureFlags(){var i,R;return(R=(i=this.config.featureFlags)==null?void 0:i.slice())!=null?R:[]}get routes(){var i;return(i=this.config.routes)!=null?i:{}}get externalRoutes(){var i;return(i=this.config.externalRoutes)!=null?i:{}}provide(i){return i.expose(this)}__experimentalReconfigure(i){this.config.__experimentalConfigure&&(this.options=this.config.__experimentalConfigure(i))}getPluginOptions(){var i;return this.config.__experimentalConfigure&&!this.options&&(this.options=this.config.__experimentalConfigure()),(i=this.options)!=null?i:{}}toString(){return`plugin{${this.config.id}}`}}function t(d){return new r(d)}},82772:function(ee,s,e){var b,x,w;"use strict";e.d(s,{x8:function(){return m},NT:function(){return i},tg:function(){return E},Oi:function(){return S}});var r=e(76241);const t=(0,r.uW)("route-ref-type",()=>Symbol("route-ref-type"));class d{constructor(F,O){X(this,b,"absolute");this.id=F,this.params=O}get title(){return this.id}toString(){return`routeRef{type=absolute,id=${this.id}}`}}b=t;function i(B){var F;return new d(B.id,(F=B.params)!=null?F:[])}const R=/^\w+$/;class c{constructor(F,O,D,$){X(this,x,"sub");this.id=F,this.path=O,this.parent=D,this.params=$}toString(){return`routeRef{type=sub,id=${this.id}}`}}x=t;function o(B){const{id:F,path:O,parent:D}=B,$=O.split("/").filter(se=>se.startsWith(":")).map(se=>se.substring(1)),K=[...D.params,...$];if(D.params.some(se=>$.includes(se)))throw new Error("SubRouteRef may not have params that overlap with its parent");if(!O.startsWith("/"))throw new Error(`SubRouteRef path must start with '/', got '${O}'`);if(O.endsWith("/"))throw new Error(`SubRouteRef path must not end with '/', got '${O}'`);for(const se of $)if(!R.test(se))throw new Error(`SubRouteRef path has invalid param, got '${se}'`);return new c(F,O,D,K)}class u{constructor(F,O,D){X(this,w,"external");this.id=F,this.params=O,this.optional=D}toString(){return`routeRef{type=external,id=${this.id}}`}}w=t;function m(B){var F;return new u(B.id,(F=B.params)!=null?F:[],Boolean(B.optional))}var y=e(2784),g=e(10289);function E(B){const F=(0,g.TH)(),O=(0,r.Vt)("routing-context");if(!O)throw new Error("Routing context is not available");const D=O.atVersion(1),$=(0,y.useMemo)(()=>D&&D.resolve(B,F),[D,B,F]);if(!O)throw new Error("useRouteRef used outside of routing context");if(!D)throw new Error("RoutingContext v1 not available");const K="optional"in B&&B.optional;if(!$&&!K)throw new Error(`No path for ${B}`);return $}function S(B){return(0,g.UO)()}},10179:function(ee,s,e){"use strict";e.d(s,{SP:function(){return b},dR:function(){return g},VL:function(){return w},BD:function(){return t}});function r(B){if(typeof B!="object"||B===null||Array.isArray(B))return!1;const F=B;return!(typeof F.name!="string"||F.name===""||typeof F.message!="string")}function t(B){if(typeof B!="object"||B===null||Array.isArray(B))throw new Error(`Encountered invalid error, not an object, got '${B}'`);const F=B;if(typeof F.name!="string"||F.name==="")throw new Error(`Encountered error object without a name, got '${B}'`);if(typeof F.message!="string")throw new Error(`Encountered error object without a message, got '${B}'`)}var d=e(24852);function i(B,F){const O=serializeErrorInternal(B),D={name:"Unknown",message:"<no reason given>",...O};return F!=null&&F.includeStack||delete D.stack,D}function R(B){const F=(0,d.deserializeError)(B);return B.stack||(F.stack=void 0),F}function c(B){if(r(B)){const F=String(B);return F!=="[object Object]"?F:`${B.name}: ${B.message}`}return`unknown error '${B}'`}class o extends Error{constructor(O,D){var K;let $=O;if(D!==void 0){const ne=c(D);$?$+=`; caused by ${ne}`:$=`caused by ${ne}`}super($);X(this,"cause");(K=Error.captureStackTrace)==null||K.call(Error,this,this.constructor),this.name=this.constructor.name,this.cause=r(D)?D:void 0}}class u extends null{}class m extends null{}class y extends null{}class g extends o{}class E extends null{}class S extends null{}class b extends o{constructor(F,O){super(F,O),this.name=r(O)?O.name:"Error"}}async function x(B){var F;try{const O=await B.text();if(O){if((F=B.headers.get("content-type"))!=null&&F.startsWith("application/json"))try{const D=JSON.parse(O);if(D.error&&D.response)return D}catch{}return{error:{name:"Error",message:`Request failed with status ${B.status} ${B.statusText}, ${O}`},response:{statusCode:B.status}}}}catch{}return{error:{name:"Error",message:`Request failed with status ${B.status} ${B.statusText}`},response:{statusCode:B.status}}}class w extends Error{constructor(O){super(O.message);X(this,"response");X(this,"body");X(this,"cause");this.name="ResponseError",this.response=O.response,this.body=O.data,this.cause=O.cause}static async fromResponse(O){const D=await x(O),$=D.response.statusCode||O.status,K=D.error.name||O.statusText,ne=`Request failed with ${$} ${K}`,se=R(D.error);return new w({message:ne,response:O,data:D,cause:se})}}},36356:function(ee,s,e){var g,E,S,b,x;"use strict";e.d(s,{nW:function(){return y},ae:function(){return c},q3:function(){return o}});var r=e(36964);const t=(0,r.createApiRef)({id:"core.scmauth"});class d{constructor(F){Mn(this,g,void 0);zn(this,g,F)}async getCredentials(F){const O=new URL(F.url),D=st(this,g).find($=>$.isUrlSupported(O));if(!D)throw new Error(`No auth provider available for '${F.url}', see https://backstage.io/link?scm-auth`);return D.getCredentials(F)}}g=new WeakMap;const w=class{constructor(F,O,D,$){Mn(this,E,void 0);Mn(this,S,void 0);Mn(this,b,void 0);Mn(this,x,void 0);zn(this,E,O),zn(this,S,D),zn(this,b,$),zn(this,x,F)}static createDefaultApiFactory(){return createApiFactory({api:scmAuthApiRef,deps:{github:githubAuthApiRef,gitlab:gitlabAuthApiRef,azure:microsoftAuthApiRef,bitbucket:bitbucketAuthApiRef},factory:({github:F,gitlab:O,azure:D,bitbucket:$})=>w.merge(w.forGithub(F),w.forGitlab(O),w.forAzure(D),w.forBitbucket($))})}static forAuthApi(F,O){return new w("generic",F,O.host,O.scopeMapping)}static forGithub(F,O){var $;const D=($=O==null?void 0:O.host)!=null?$:"github.com";return new w("github",F,D,{default:["repo","read:org","read:user"],repoWrite:["gist"]})}static forGitlab(F,O){var $;const D=($=O==null?void 0:O.host)!=null?$:"gitlab.com";return new w("gitlab",F,D,{default:["read_user","read_api","read_repository"],repoWrite:["write_repository","api"]})}static forAzure(F,O){var $;const D=($=O==null?void 0:O.host)!=null?$:"dev.azure.com";return new w("azure",F,D,{default:["vso.build","vso.code","vso.graph","vso.project","vso.profile"],repoWrite:["vso.code_manage"]})}static forBitbucket(F,O){var $;const D=($=O==null?void 0:O.host)!=null?$:"bitbucket.org";return new w("bitbucket",F,D,{default:["account","team","pullrequest","snippet","issue"],repoWrite:["pullrequest:write","snippet:write","issue:write"]})}static merge(...F){return new d(F)}isUrlSupported(F){return F.host===st(this,S)}getAdditionalScopesForProvider(F){var O,D;return!(F!=null&&F.customScopes)||st(this,x)==="generic"?[]:(D=(O=F.customScopes)==null?void 0:O[st(this,x)])!=null?D:[]}async getCredentials(F){const{url:O,additionalScope:D,...$}=F,K=st(this,b).default.slice();D!=null&&D.repoWrite&&K.push(...st(this,b).repoWrite);const ne=this.getAdditionalScopesForProvider(D);ne.length&&K.push(...ne);const se=[...new Set(K)],Ee=await st(this,E).getAccessToken(se,$);return{token:Ee,headers:{Authorization:`Bearer ${Ee}`}}}};let i=w;E=new WeakMap,S=new WeakMap,b=new WeakMap,x=new WeakMap;var R=e(68370);class c{static fromConfig(F){return R.Lx.fromConfig(F)}}const o=(0,r.createApiRef)({id:"integration.scmintegrations"});var u=e(73250),m=e(2784);const y=B=>{var K;const{type:F}=B,O=(0,r.useApp)(),D=u.Z,$=F&&(K=O.getSystemIcon(F))!=null?K:D;return m.createElement($,null)}},68370:function(ee,s,e){var kt,hn,Yt,Xt,rn,an,Bt;"use strict";e.d(s,{Lx:function(){return Ft},Pb:function(){return Qt}});var r=e(82717),t=e.n(r),d=e(76635);function i(M){const h=new URL("http://example.com");return h.host=M,h.host===M}function R(M){try{return new URL(M),!0}catch{return!1}}function c(M,h){return{list(){return M},byUrl(C){try{const L=typeof C=="string"?new URL(C):C;return M.find(V=>h(V)===L.host)}catch{return}},byHost(C){return M.find(L=>h(L)===C)}}}function o(M){const{url:h,base:C,lineNumber:L}=M;try{return new URL(h),h}catch{}let V;if(h.startsWith("/")){const{filepath:ge}=t()(C);V=new URL(C);const pe=(0,d.trimEnd)(V.pathname.substring(0,V.pathname.length-ge.length),"/");V.pathname=`${pe}${h}`}else V=new URL(h,C);return V.search=new URL(C).search,L&&(V.hash=`L${L}`),V.toString()}const u="amazonaws.com";function m(M){var zt;const h=M.getOptionalString("endpoint"),C=(zt=M.getOptionalBoolean("s3ForcePathStyle"))!=null?zt:!1;let L,V;if(h){try{const pn=new URL(h);L=pn.host,V=pn.pathname}catch{throw new Error(`invalid awsS3 integration config, endpoint '${h}' is not a valid URL`)}if(V!=="/")throw new Error(`invalid awsS3 integration config, endpoints cannot contain path, got '${h}'`)}else L=u;const ge=M.getOptionalString("accessKeyId"),pe=M.getOptionalString("secretAccessKey"),Ie=M.getOptionalString("roleArn"),et=M.getOptionalString("externalId");return{host:L,endpoint:h,s3ForcePathStyle:C,accessKeyId:ge,secretAccessKey:pe,roleArn:Ie,externalId:et}}function y(M){const h=M.map(m);return h.some(C=>C.host===u)||h.push({host:u}),h}const vt=class{get type(){return"awsS3"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}constructor(h){this.integrationConfig=h}resolveUrl(h){return o(h)}resolveEditUrl(h){return h}};let g=vt;X(g,"factory",({config:h})=>{var L;const C=y((L=h.getOptionalConfigArray("integrations.awsS3"))!=null?L:[]);return c(C.map(V=>new vt(V)),V=>V.config.host)});const E="GB",It=class{constructor(h,C,L,V,ge,pe){Mn(this,kt,void 0);Mn(this,hn,void 0);Mn(this,Yt,void 0);Mn(this,Xt,void 0);Mn(this,rn,void 0);Mn(this,an,void 0);Mn(this,Bt,(...h)=>{const C=new URL(st(this,kt));return C.pathname=h.map(L=>encodeURIComponent(L)).join("/"),C});zn(this,kt,h),zn(this,hn,C),zn(this,Yt,L),zn(this,Xt,V),zn(this,rn,ge),zn(this,an,pe)}static fromRepoUrl(h){var pn;const C=new URL(h);let L,V,ge;const pe=C.pathname.split("/").map(kn=>decodeURIComponent(kn));if(pe[2]==="_git"?(L=pe[1],V=ge=pe[3]):pe[3]==="_git"?(L=pe[1],V=pe[2],ge=pe[4]):pe[4]==="_git"&&(L=`${pe[1]}/${pe[2]}`,V=pe[3],ge=pe[5]),!L||!V||!ge)throw new Error("Azure URL must point to a git repository");const Ie=(pn=C.searchParams.get("path"))!=null?pn:void 0;let et;const zt=C.searchParams.get("version");if(zt){if(zt.slice(0,2)!=="GB")throw new Error("Azure URL version must point to a git branch");et=zt.slice(2)}return new It(C.origin,L,V,ge,Ie,et)}toRepoUrl(){let h;return st(this,Yt)===st(this,Xt)?h=st(this,Bt).call(this,st(this,hn),"_git",st(this,Xt)):h=st(this,Bt).call(this,st(this,hn),st(this,Yt),"_git",st(this,Xt)),st(this,rn)&&h.searchParams.set("path",st(this,rn)),st(this,an)&&h.searchParams.set("version",E+st(this,an)),h.toString()}toFileUrl(){if(!st(this,rn))throw new Error("Azure URL must point to a specific path to be able to download a file");const h=st(this,Bt).call(this,st(this,hn),st(this,Yt),"_apis","git","repositories",st(this,Xt),"items");return h.searchParams.set("api-version","6.0"),h.searchParams.set("path",st(this,rn)),st(this,an)&&h.searchParams.set("version",st(this,an)),h.toString()}toArchiveUrl(){const h=st(this,Bt).call(this,st(this,hn),st(this,Yt),"_apis","git","repositories",st(this,Xt),"items");return h.searchParams.set("recursionLevel","full"),h.searchParams.set("download","true"),h.searchParams.set("api-version","6.0"),st(this,rn)&&h.searchParams.set("scopePath",st(this,rn)),st(this,an)&&h.searchParams.set("version",st(this,an)),h.toString()}toCommitsUrl(){const h=st(this,Bt).call(this,st(this,hn),st(this,Yt),"_apis","git","repositories",st(this,Xt),"commits");return h.searchParams.set("api-version","6.0"),st(this,an)&&h.searchParams.set("searchCriteria.itemVersion.version",st(this,an)),h.toString()}getOwner(){return st(this,hn)}getProject(){return st(this,Yt)}getRepo(){return st(this,Xt)}getPath(){return st(this,rn)}getRef(){return st(this,an)}};let S=It;kt=new WeakMap,hn=new WeakMap,Yt=new WeakMap,Xt=new WeakMap,rn=new WeakMap,an=new WeakMap,Bt=new WeakMap;const b="dev.azure.com";function x(M){var L;const h=(L=M.getOptionalString("host"))!=null?L:b,C=M.getOptionalString("token");if(!i(h))throw new Error(`Invalid Azure integration config, '${h}' is not a valid host`);return{host:h,token:C}}function w(M){const h=M.map(x);return h.some(C=>C.host===b)||h.push({host:b}),h}const cn=class{constructor(h){this.integrationConfig=h}get type(){return"azure"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(h){var V;const{url:C,base:L}=h;if(R(C))return C;try{const ge=S.fromRepoUrl(L),pe=new URL(L),Ie=new URL(`https://a.com${(V=ge.getPath())!=null?V:""}`),et=new URL(C,Ie).pathname;return pe.searchParams.set("path",et),h.lineNumber&&(pe.searchParams.set("line",String(h.lineNumber)),pe.searchParams.set("lineEnd",String(h.lineNumber+1)),pe.searchParams.set("lineStartColumn","1"),pe.searchParams.set("lineEndColumn","1")),pe.toString()}catch{return new URL(C,L).toString()}}resolveEditUrl(h){return h}};let B=cn;X(B,"factory",({config:h})=>{var L;const C=w((L=h.getOptionalConfigArray("integrations.azure"))!=null?L:[]);return c(C.map(V=>new cn(V)),V=>V.config.host)});var F=e(48834).lW;function O(M){return AzureUrl.fromRepoUrl(M).toFileUrl()}function D(M){return AzureUrl.fromRepoUrl(M).toArchiveUrl()}function $(M){return AzureUrl.fromRepoUrl(M).toCommitsUrl()}function K(M,h){const C=h?{...h}:{};if(M.token){const L=F.from(`:${M.token}`,"utf8");C.Authorization=`Basic ${L.toString("base64")}`}return{headers:C}}const ne="bitbucket.org",se="https://api.bitbucket.org/2.0";function Ee(M){var pe;const h=(pe=M.getOptionalString("host"))!=null?pe:ne;let C=M.getOptionalString("apiBaseUrl");const L=M.getOptionalString("token"),V=M.getOptionalString("username"),ge=M.getOptionalString("appPassword");if(!i(h))throw new Error(`Invalid Bitbucket integration config, '${h}' is not a valid host`);return C?C=(0,d.trimEnd)(C,"/"):h===ne?C=se:C=`https://${h}/rest/api/1.0`,{host:h,apiBaseUrl:C,token:L,username:V,appPassword:ge}}function Ue(M){const h=M.map(Ee);return h.some(C=>C.host===ne)||h.push({host:ne,apiBaseUrl:se}),h}const Sn=class{constructor(h){this.integrationConfig=h}get type(){return"bitbucket"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(h){const C=o(h);if(!h.lineNumber)return C;const L=new URL(C);return this.integrationConfig.host==="bitbucket.org"?L.hash=`lines-${h.lineNumber}`:L.hash=`${h.lineNumber}`,L.toString()}resolveEditUrl(h){const C=t()(h),L=new URL(h);return L.searchParams.set("mode","edit"),L.searchParams.set("spa","0"),L.searchParams.set("at",C.ref),L.toString()}};let xe=Sn;X(xe,"factory",({config:h})=>{var L,V,ge;const C=Ue((ge=h.getOptionalConfigArray("integrations.bitbucket"))!=null?ge:[...(L=h.getOptionalConfigArray("integrations.bitbucketCloud"))!=null?L:[],...(V=h.getOptionalConfigArray("integrations.bitbucketServer"))!=null?V:[]]);return c(C.map(pe=>new Sn(pe)),pe=>pe.config.host)});var We=e(96279),Re=e(48834).lW;async function Je(M,h){const{name:C,owner:L,resource:V}=parseGitUrl(M),ge=V==="bitbucket.org";let pe=ge?`${h.apiBaseUrl}/repositories/${L}/${C}`:`${h.apiBaseUrl}/projects/${L}/repos/${C}/default-branch`,Ie=await fetch(pe,yt(h));if(Ie.status===404&&!ge&&(pe=`${h.apiBaseUrl}/projects/${L}/repos/${C}/branches/default`,Ie=await fetch(pe,yt(h))),!Ie.ok){const zt=`Failed to retrieve default branch from ${pe}, ${Ie.status} ${Ie.statusText}`;throw new Error(zt)}let et;if(ge)et=(await Ie.json()).mainbranch.name;else{const{displayId:zt}=await Ie.json();et=zt}if(!et)throw new Error(`Failed to read default branch from ${pe}. Response ${Ie.status} ${Ie.json()}`);return et}async function at(M,h){const{name:C,owner:L,ref:V,protocol:ge,resource:pe,filepath:Ie}=parseGitUrl(M),et=pe==="bitbucket.org";let zt=V;zt||(zt=await Je(M,h));const pn=Ie?`&path=${encodeURIComponent(decodeURIComponent(Ie))}`:"";return et?`${ge}://${pe}/${L}/${C}/get/${zt}.tar.gz`:`${h.apiBaseUrl}/projects/${L}/repos/${C}/archive?format=tgz&at=${zt}&prefix=${L}-${C}${pn}`}function Tt(M,h){try{const{owner:C,name:L,ref:V,filepathtype:ge,filepath:pe}=parseGitUrl(M);if(!C||!L||ge!=="browse"&&ge!=="raw"&&ge!=="src")throw new Error("Invalid Bitbucket URL or file path");const Ie=pe.replace(/^\//,"");if(h.host==="bitbucket.org"){if(!V)throw new Error("Invalid Bitbucket URL or file path");return`${h.apiBaseUrl}/repositories/${C}/${L}/src/${V}/${Ie}`}return`${h.apiBaseUrl}/projects/${C}/repos/${L}/raw/${Ie}?at=${V}`}catch(C){throw new Error(`Incorrect URL: ${M}, ${C}`)}}function yt(M){const h={};if(M.token)h.Authorization=`Bearer ${M.token}`;else if(M.username&&M.appPassword){const C=Re.from(`${M.username}:${M.appPassword}`,"utf8");h.Authorization=`Basic ${C.toString("base64")}`}return{headers:h}}const Pe="bitbucket.org",mt="https://api.bitbucket.org/2.0";function qe(M){const h=Pe,C=mt,L=M.getString("username"),V=M.getString("appPassword");return{host:h,apiBaseUrl:C,username:L,appPassword:V}}function le(M){const h=M.map(qe);return h.length===0&&h.push({host:Pe,apiBaseUrl:mt}),h}const on=class{constructor(h){this.integrationConfig=h}get type(){return"bitbucketCloud"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(h){const C=o(h);if(h.lineNumber){const L=new URL(C);return L.hash=`lines-${h.lineNumber}`,L.toString()}return C}resolveEditUrl(h){const C=t()(h),L=new URL(h);return L.searchParams.set("mode","edit"),L.searchParams.set("at",C.ref),L.toString()}};let fe=on;X(fe,"factory",({config:h})=>{var L;const C=le((L=h.getOptionalConfigArray("integrations.bitbucketCloud"))!=null?L:[]);return c(C.map(V=>new on(V)),V=>V.config.host)});var Me=e(48834).lW;async function we(M,h){const{name:C,owner:L}=parseGitUrl(M),V=`${h.apiBaseUrl}/repositories/${L}/${C}`,ge=await fetch(V,Qe(h));if(!ge.ok){const et=`Failed to retrieve default branch from ${V}, ${ge.status} ${ge.statusText}`;throw new Error(et)}const Ie=(await ge.json()).mainbranch.name;if(!Ie)throw new Error(`Failed to read default branch from ${V}. Response ${ge.status} ${ge.json()}`);return Ie}async function Ve(M,h){const{name:C,owner:L,ref:V,protocol:ge,resource:pe}=parseGitUrl(M);let Ie=V;return Ie||(Ie=await we(M,h)),`${ge}://${pe}/${L}/${C}/get/${Ie}.tar.gz`}function lt(M,h){try{const{owner:C,name:L,ref:V,filepathtype:ge,filepath:pe}=parseGitUrl(M);if(!C||!L||ge!=="src"&&ge!=="raw")throw new Error("Invalid Bitbucket Cloud URL or file path");const Ie=pe.replace(/^\//,"");if(!V)throw new Error("Invalid Bitbucket Cloud URL or file path");return`${h.apiBaseUrl}/repositories/${C}/${L}/src/${V}/${Ie}`}catch(C){throw new Error(`Incorrect URL: ${M}, ${C}`)}}function Qe(M){const h={};if(M.username&&M.appPassword){const C=Me.from(`${M.username}:${M.appPassword}`,"utf8");h.Authorization=`Basic ${C.toString("base64")}`}return{headers:h}}function Ct(M){const h=M.getString("host");let C=M.getOptionalString("apiBaseUrl");const L=M.getOptionalString("token"),V=M.getOptionalString("username"),ge=M.getOptionalString("password");if(!i(h))throw new Error(`Invalid Bitbucket Server integration config, '${h}' is not a valid host`);return C?C=(0,d.trimEnd)(C,"/"):C=`https://${h}/rest/api/1.0`,{host:h,apiBaseUrl:C,token:L,username:V,password:ge}}function oe(M){return M.map(Ct)}const Rn=class{constructor(h){this.integrationConfig=h}get type(){return"bitbucketServer"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(h){const C=o(h);if(h.lineNumber){const L=new URL(C),V=L.pathname.split("/").slice(-1)[0];return L.hash=`${V}-${h.lineNumber}`,L.toString()}return C}resolveEditUrl(h){const C=t()(h),L=new URL(h);return L.searchParams.set("mode","edit"),L.searchParams.set("spa","0"),L.searchParams.set("at",C.ref),L.toString()}};let ue=Rn;X(ue,"factory",({config:h})=>{var L;const C=oe((L=h.getOptionalConfigArray("integrations.bitbucketServer"))!=null?L:[]);return c(C.map(V=>new Rn(V)),V=>V.config.host)});var Xe=e(48834).lW;async function Ge(M,h){const{name:C,owner:L}=parseGitUrl(M);let V=`${h.apiBaseUrl}/projects/${L}/repos/${C}/default-branch`,ge=await fetch(V,Y(h));if(ge.status===404&&(V=`${h.apiBaseUrl}/projects/${L}/repos/${C}/branches/default`,ge=await fetch(V,Y(h))),!ge.ok){const et=`Failed to retrieve default branch from ${V}, ${ge.status} ${ge.statusText}`;throw new Error(et)}const{displayId:pe}=await ge.json(),Ie=pe;if(!Ie)throw new Error(`Failed to read default branch from ${V}. Response ${ge.status} ${ge.json()}`);return Ie}async function $e(M,h){const{name:C,owner:L,ref:V,filepath:ge}=parseGitUrl(M);let pe=V;pe||(pe=await Ge(M,h));const Ie=ge?`&path=${encodeURIComponent(decodeURIComponent(ge))}`:"";return`${h.apiBaseUrl}/projects/${L}/repos/${C}/archive?format=tgz&at=${pe}&prefix=${L}-${C}${Ie}`}function ct(M,h){try{const{owner:C,name:L,ref:V,filepathtype:ge,filepath:pe}=parseGitUrl(M);if(!C||!L||ge!=="browse"&&ge!=="raw"&&ge!=="src")throw new Error("Invalid Bitbucket Server URL or file path");const Ie=pe.replace(/^\//,"");return`${h.apiBaseUrl}/projects/${C}/repos/${L}/raw/${Ie}?at=${V}`}catch(C){throw new Error(`Incorrect URL: ${M}, ${C}`)}}function Y(M){const h={};if(M.token&&(h.Authorization=`Bearer ${M.token}`),M.username&&M.password){const C=Xe.from(`${M.username}:${M.password}`,"utf8");h.Authorization=`Basic ${C.toString("base64")}`}return{headers:h}}function Z(M){const h=M.getString("host");let C=M.getOptionalString("baseUrl"),L=M.getOptionalString("cloneUrl"),V=M.getOptionalString("gitilesBaseUrl");const ge=M.getOptionalString("username"),pe=M.getOptionalString("password");if(i(h)){if(C&&!R(C))throw new Error(`Invalid Gerrit integration config, '${C}' is not a valid baseUrl`);if(L&&!R(L))throw new Error(`Invalid Gerrit integration config, '${L}' is not a valid cloneUrl`);if(V&&!R(V))throw new Error(`Invalid Gerrit integration config, '${V}' is not a valid gitilesBaseUrl`)}else throw new Error(`Invalid Gerrit integration config, '${h}' is not a valid host`);return C?C=(0,d.trimEnd)(C,"/"):C=`https://${h}`,V?V=(0,d.trimEnd)(V,"/"):V=`https://${h}`,L?L=(0,d.trimEnd)(L,"/"):L=C,{host:h,baseUrl:C,cloneUrl:L,gitilesBaseUrl:V,username:ge,password:pe}}function q(M){return M.map(Z)}var ie=e(48834).lW;const me=")]}'";function be(M,h){const L=h.replace(M.gitilesBaseUrl,"").split("/").filter(zt=>!!zt),V=L.indexOf("+");if(V<=0)throw new Error(`Unable to parse project from url: ${h}`);const ge=(0,d.trimStart)(L.slice(0,V).join("/"),"/"),pe=L.indexOf("heads");if(pe<=0)throw new Error(`Unable to parse branch from url: ${h}`);const Ie=L[pe+1],et=L.slice(pe+2).join("/");return{branch:Ie,filePath:et===""?"/":et,project:ge}}function Le(M,h,C,L){return`${M.gitilesBaseUrl}/${h}/+/refs/heads/${C}/${(0,d.trimStart)(L,"/")}`}function Se(M){return M.password?"/a/":"/"}function _e(M,h){const{branch:C,project:L}=be(M,h);return`${M.baseUrl}${Se(M)}projects/${encodeURIComponent(L)}/branches/${C}`}function ke(M,h){const{project:C}=be(M,h);return`${M.cloneUrl}${Se(M)}${C}`}function Et(M,h){const{branch:C,filePath:L,project:V}=be(M,h);return`${M.baseUrl}${Se(M)}projects/${encodeURIComponent(V)}/branches/${C}/files/${encodeURIComponent(L)}/content`}function St(M){return`${M.baseUrl}${Se(M)}projects/`}function ut(M){const h={};if(!M.password)return h;const C=ie.from(`${M.username}:${M.password}`,"utf8");return h.Authorization=`Basic ${C.toString("base64")}`,{headers:h}}async function Dt(M){const h=await M.text();if(h.startsWith(me))try{return JSON.parse(h.slice(me.length))}catch(C){throw new Error(`Invalid response from Gerrit: ${h.slice(0,10)} - ${C}`)}throw new Error(`Gerrit JSON body prefix missing. Found: ${h.slice(0,10)}`)}const Cn=class{constructor(h){this.integrationConfig=h}get type(){return"gerrit"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(h){const{url:C,base:L,lineNumber:V}=h;let ge;if(C.startsWith("/")){const{branch:pe,project:Ie}=be(this.config,L);return Le(this.config,Ie,pe,C)}return C?ge=new URL(C,L):ge=new URL(L),V&&(ge.hash=V.toString()),ge.toString()}resolveEditUrl(h){return h}};let Ot=Cn;X(Ot,"factory",({config:h})=>{var L;const C=q((L=h.getOptionalConfigArray("integrations.gerrit"))!=null?L:[]);return c(C.map(V=>new Cn(V)),V=>V.config.host)});const bt="github.com",Pt="https://api.github.com",Ut="https://raw.githubusercontent.com";function Nt(M){var pe,Ie;const h=(pe=M.getOptionalString("host"))!=null?pe:bt;let C=M.getOptionalString("apiBaseUrl"),L=M.getOptionalString("rawBaseUrl");const V=M.getOptionalString("token"),ge=(Ie=M.getOptionalConfigArray("apps"))==null?void 0:Ie.map(et=>({appId:et.getNumber("appId"),clientId:et.getString("clientId"),clientSecret:et.getString("clientSecret"),webhookSecret:et.getString("webhookSecret"),privateKey:et.getString("privateKey"),allowedInstallationOwners:et.getOptionalStringArray("allowedInstallationOwners")}));if(!i(h))throw new Error(`Invalid GitHub integration config, '${h}' is not a valid host`);return C?C=(0,d.trimEnd)(C,"/"):h===bt&&(C=Pt),L?L=(0,d.trimEnd)(L,"/"):h===bt&&(L=Ut),{host:h,apiBaseUrl:C,rawBaseUrl:L,token:V,apps:ge}}function mn(M){const h=M.map(Nt);return h.some(C=>C.host===bt)||h.push({host:bt,apiBaseUrl:Pt,rawBaseUrl:Ut}),h}function On(M,h,C){try{const{owner:L,name:V,ref:ge,filepathtype:pe,filepath:Ie}=parseGitUrl(M);if(!L||!V||!ge||pe!=="blob"&&pe!=="raw"&&pe!=="tree")throw new Error("Invalid GitHub URL or file path");const et=Ie.replace(/^\//,"");return $t(h,C)==="api"?`${h.apiBaseUrl}/repos/${L}/${V}/contents/${et}?ref=${ge}`:`${h.rawBaseUrl}/${L}/${V}/${ge}/${et}`}catch(L){throw new Error(`Incorrect URL: ${M}, ${L}`)}}function Kt(M,h){const C={};return $t(M,h)==="api"&&(C.Accept="application/vnd.github.v3.raw"),h.token&&(C.Authorization=`token ${h.token}`),{headers:C}}function $t(M,h){return M.apiBaseUrl&&(h.token||!M.rawBaseUrl)?"api":"raw"}var nt=e(55912);class ce{constructor(){X(this,"tokenCache",new Map);X(this,"isNotExpired",h=>h.diff(DateTime.local(),"minutes").minutes>50)}async getOrCreateToken(h,C){const L=this.tokenCache.get(h);if(L&&this.isNotExpired(L.expiresAt))return{accessToken:L.token};const V=await C();return this.tokenCache.set(h,V),{accessToken:V.token}}}const j={Accept:"application/vnd.github.machine-man-preview+json"};class ye{constructor(h,C){X(this,"appClient");X(this,"baseUrl");X(this,"baseAuthConfig");X(this,"cache",new ce);X(this,"allowedInstallationOwners");this.allowedInstallationOwners=h.allowedInstallationOwners,this.baseUrl=C,this.baseAuthConfig={appId:h.appId,privateKey:h.privateKey.replace(/\\n/gm,`
31
- `)},this.appClient=new Octokit({baseUrl:C,headers:j,authStrategy:createAppAuth,auth:this.baseAuthConfig})}async getInstallationCredentials(h,C){var pe;const{installationId:L,suspended:V}=await this.getInstallationData(h);if(this.allowedInstallationOwners&&!((pe=this.allowedInstallationOwners)!=null&&pe.includes(h)))return{accessToken:void 0};if(V)throw new Error(`The GitHub application for ${h} is suspended`);const ge=C?`${h}/${C}`:h;return this.cache.getOrCreateToken(ge,async()=>{var et;const Ie=await this.appClient.apps.createInstallationAccessToken({installation_id:L,headers:j});if(C&&Ie.data.repository_selection==="selected"){const zt=new Octokit({baseUrl:this.baseUrl,auth:Ie.data.token}),pn=await zt.paginate(zt.apps.listReposAccessibleToInstallation);if(!((et=pn.repositories)!=null?et:pn).some(fr=>fr.name===C))throw new Error(`The Backstage GitHub application used in the ${h} organization does not have access to a repository with the name ${C}`)}return{token:Ie.data.token,expiresAt:DateTime.fromISO(Ie.data.expires_at)}})}getInstallations(){return this.appClient.paginate(this.appClient.apps.listInstallations)}async getInstallationData(h){const L=(await this.getInstallations()).find(ge=>{var pe,Ie;return((Ie=(pe=ge.account)==null?void 0:pe.login)==null?void 0:Ie.toLocaleLowerCase("en-US"))===h.toLocaleLowerCase("en-US")});if(L)return{installationId:L.id,suspended:Boolean(L.suspended_by)};const V=new Error(`No app installation found for ${h} in ${this.baseAuthConfig.appId}`);throw V.name="NotFoundError",V}}class Ke{constructor(h){X(this,"apps");var C,L;this.apps=(L=(C=h.apps)==null?void 0:C.map(V=>new ye(V,h.apiBaseUrl)))!=null?L:[]}async getAllInstallations(){return this.apps.length?(await Promise.all(this.apps.map(C=>C.getInstallations()))).flat():[]}async getAppToken(h,C){if(this.apps.length===0)return;const L=await Promise.all(this.apps.map(Ie=>Ie.getInstallationCredentials(h,C).then(et=>({credentials:et,error:void 0}),et=>({credentials:void 0,error:et})))),V=L.find(Ie=>Ie.credentials);if(V)return V.credentials.accessToken;const pe=L.map(Ie=>Ie.error).find(Ie=>Ie.name!=="NotFoundError");if(pe)throw pe}}class rt{constructor(h,C){this.githubAppCredentialsMux=h,this.token=C}async getCredentials(h){const C=parseGitUrl(h.url),L=C.owner||C.name,V=C.owner?C.name:void 0;let ge="app",pe=await this.githubAppCredentialsMux.getAppToken(L,V);return pe||(ge="token",pe=this.token),{headers:pe?{Authorization:`Bearer ${pe}`}:void 0,token:pe,type:ge}}}X(rt,"create",null);class it{static fromIntegrations(h){const C=new Map;return h.github.list().forEach(L=>{const V=SingleInstanceGithubCredentialsProvider.create(L.config);C.set(L.config.host,V)}),new it(C)}constructor(h){this.providers=h}async getCredentials(h){const C=new URL(h.url),L=this.providers.get(C.host);if(!L)throw new Error(`There is no GitHub integration that matches ${h.url}. Please add a configuration for an integration.`);return L.getCredentials(h)}}const xn=class{constructor(h){this.integrationConfig=h}get type(){return"github"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(h){return Qt(o(h),"tree")}resolveEditUrl(h){return Qt(h,"edit")}};let Rt=xn;X(Rt,"factory",({config:h})=>{var L;const C=mn((L=h.getOptionalConfigArray("integrations.github"))!=null?L:[]);return c(C.map(V=>new xn(V)),V=>V.config.host)});function Qt(M,h){return M.replace(/\/\/([^/]+)\/([^/]+)\/([^/]+)\/(blob|tree|edit)\//,(C,L,V,ge)=>`//${L}/${V}/${ge}/${h}/`)}const en="gitlab.com",tn="https://gitlab.com/api/v4";function En(M){const h=M.getString("host");let C=M.getOptionalString("apiBaseUrl");const L=M.getOptionalString("token");let V=M.getOptionalString("baseUrl");if(C?C=(0,d.trimEnd)(C,"/"):h===en&&(C=tn),V?V=(0,d.trimEnd)(V,"/"):V=`https://${h}`,i(h)){if(!C||!R(C))throw new Error(`Invalid GitLab integration config, '${C}' is not a valid apiBaseUrl`);if(!R(V))throw new Error(`Invalid GitLab integration config, '${V}' is not a valid baseUrl`)}else throw new Error(`Invalid GitLab integration config, '${h}' is not a valid host`);return{host:h,token:L,apiBaseUrl:C,baseUrl:V}}function U(M){const h=M.map(En);return h.some(C=>C.host===en)||h.push({host:en,apiBaseUrl:tn,baseUrl:`https://${en}`}),h}function re(M){let h="";return M.host!==en&&(h=new URL(M.baseUrl).pathname),trimEnd(h,"/")}var te=e(10179);async function ve(M,h){if(M.includes("/-/blob/")){const C=await Zt(M,h);return He(M,C,h).toString()}return ht(M).toString()}function Ne(M){const{token:h=""}=M;return{headers:{"PRIVATE-TOKEN":h}}}function ht(M){try{const h=new URL(M),C=h.pathname.split("/").filter(Boolean),L=C.indexOf("blob",2);if(L<2||L===C.length-1)throw new InputError("Wrong GitLab URL");const V=C.slice(0,L),ge=C.slice(L+1);if(!ge.join("/").match(/\.(yaml|yml)$/))throw new InputError("Wrong GitLab URL");return h.pathname=[...V,"raw",...ge].join("/"),h}catch(h){throw new InputError(`Incorrect url: ${M}, ${h}`)}}function He(M,h,C){try{const L=new URL(M),V=L.pathname.split("/-/blob/")[1],[ge,...pe]=V.split("/"),Ie=getGitLabIntegrationRelativePath(C);return L.pathname=[...Ie?[Ie]:[],"api/v4/projects",h,"repository/files",encodeURIComponent(decodeURIComponent(pe.join("/"))),"raw"].join("/"),L.search=`?ref=${ge}`,L}catch(L){throw new Error(`Incorrect url: ${M}, ${L}`)}}async function Zt(M,h){const C=new URL(M);if(!C.pathname.includes("/-/blob/"))throw new Error("Please provide full path to yaml file from GitLab");try{let L=C.pathname.split("/-/blob/")[0];const V=getGitLabIntegrationRelativePath(h);V&&(L=L.replace(V,""));const ge=new URL(`${C.origin}${V}/api/v4/projects/${encodeURIComponent(L.replace(/^\//,""))}`),pe=await fetch(ge.toString(),Ne(h)),Ie=await pe.json();if(!pe.ok)throw new Error(`GitLab Error '${Ie.error}', ${Ie.error_description}`);return Number(Ie.id)}catch(L){throw new Error(`Could not get GitLab project ID for: ${M}, ${L}`)}}const wn=class{constructor(h){this.integrationConfig=h}get type(){return"gitlab"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(h){return o(h)}resolveEditUrl(h){return Ht(h,"edit")}};let Wt=wn;X(Wt,"factory",({config:h})=>{var L;const C=U((L=h.getOptionalConfigArray("integrations.gitlab"))!=null?L:[]);return c(C.map(V=>new wn(V)),V=>V.config.host)});function Ht(M,h){return M.replace(/\/\-\/(blob|tree|edit)\//,`/-/${h}/`)}class Ft{constructor(h){X(this,"byType");this.byType=h}static fromConfig(h){return new Ft({awsS3:g.factory({config:h}),azure:B.factory({config:h}),bitbucket:xe.factory({config:h}),bitbucketCloud:fe.factory({config:h}),bitbucketServer:ue.factory({config:h}),gerrit:Ot.factory({config:h}),github:Rt.factory({config:h}),gitlab:Wt.factory({config:h})})}get awsS3(){return this.byType.awsS3}get azure(){return this.byType.azure}get bitbucket(){return this.byType.bitbucket}get bitbucketCloud(){return this.byType.bitbucketCloud}get bitbucketServer(){return this.byType.bitbucketServer}get gerrit(){return this.byType.gerrit}get github(){return this.byType.github}get gitlab(){return this.byType.gitlab}list(){return Object.values(this.byType).flatMap(h=>h.list())}byUrl(h){return Object.values(this.byType).map(C=>C.byUrl(h)).find(Boolean)}byHost(h){return Object.values(this.byType).map(C=>C.byHost(h)).find(Boolean)}resolveUrl(h){const C=this.byUrl(h.base);return C?C.resolveUrl(h):o(h)}resolveEditUrl(h){const C=this.byUrl(h);return C?C.resolveEditUrl(h):h}}},90775:function(ee,s,e){"use strict";var r={};e.r(r),e.d(r,{TechDocsPlugin:function(){return R.plugin}});var t=e(2784),d=e(47093),i=e(10289),R=e(82250),c=e(26136),o=e(49208),u=e(36964),m=e(68099);const y=[(0,u.createApiFactory)({api:u.discoveryApiRef,deps:{configApi:u.configApiRef},factory:({configApi:I})=>o.UrlPatternDiscovery.compile(`${I.getString("backend.baseUrl")}/api/{{ pluginId }}`)}),(0,u.createApiFactory)({api:u.alertApiRef,deps:{},factory:()=>new o.AlertApiForwarder}),(0,u.createApiFactory)({api:u.analyticsApiRef,deps:{},factory:()=>new o.NoOpAnalyticsApi}),(0,u.createApiFactory)({api:u.errorApiRef,deps:{alertApi:u.alertApiRef},factory:({alertApi:I})=>{const k=new o.ErrorAlerter(I,new o.ErrorApiForwarder);return o.UnhandledErrorForwarder.forward(k,{hidden:!1}),k}}),(0,u.createApiFactory)({api:u.storageApiRef,deps:{errorApi:u.errorApiRef},factory:({errorApi:I})=>o.WebStorage.create({errorApi:I})}),(0,u.createApiFactory)({api:u.fetchApiRef,deps:{configApi:u.configApiRef,identityApi:u.identityApiRef,discoveryApi:u.discoveryApiRef},factory:({configApi:I,identityApi:k,discoveryApi:de})=>(0,o.createFetchApi)({middleware:[o.FetchMiddlewares.resolvePluginProtocol({discoveryApi:de}),o.FetchMiddlewares.injectIdentityAuth({identityApi:k,config:I})]})}),(0,u.createApiFactory)({api:u.oauthRequestApiRef,deps:{},factory:()=>new o.OAuthRequestManager}),(0,u.createApiFactory)({api:u.googleAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:I,oauthRequestApi:k,configApi:de})=>o.GoogleAuth.create({discoveryApi:I,oauthRequestApi:k,environment:de.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.microsoftAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:I,oauthRequestApi:k,configApi:de})=>o.MicrosoftAuth.create({discoveryApi:I,oauthRequestApi:k,environment:de.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.githubAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:I,oauthRequestApi:k,configApi:de})=>o.GithubAuth.create({discoveryApi:I,oauthRequestApi:k,defaultScopes:["read:user"],environment:de.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.oktaAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:I,oauthRequestApi:k,configApi:de})=>o.OktaAuth.create({discoveryApi:I,oauthRequestApi:k,environment:de.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.gitlabAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:I,oauthRequestApi:k,configApi:de})=>o.GitlabAuth.create({discoveryApi:I,oauthRequestApi:k,environment:de.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.oneloginAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:I,oauthRequestApi:k,configApi:de})=>o.OneLoginAuth.create({discoveryApi:I,oauthRequestApi:k,environment:de.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.bitbucketAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:I,oauthRequestApi:k,configApi:de})=>o.BitbucketAuth.create({discoveryApi:I,oauthRequestApi:k,defaultScopes:["team"],environment:de.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.atlassianAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:I,oauthRequestApi:k,configApi:de})=>o.AtlassianAuth.create({discoveryApi:I,oauthRequestApi:k,environment:de.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:m.RV,deps:{discovery:u.discoveryApiRef,identity:u.identityApiRef,config:u.configApiRef},factory:({config:I,discovery:k,identity:de})=>m.iM.create({config:I,discovery:k,identity:de})})];var g=e(77277),E=e(82339),S=e(62833);function b({children:I}){return(0,i.GV)()?t.createElement(t.Fragment,null,I):t.createElement(i.VA,null,I)}const x=()=>t.createElement(E.ErrorPage,{status:"404",statusMessage:"PAGE NOT FOUND"}),w=({step:I,error:k})=>{let de="";return I==="load-config"?de=`The configuration failed to load, someone should have a look at this error: ${k.message}`:I==="load-chunk"&&(de=`Lazy loaded chunk failed to load, try to reload the page: ${k.message}`),t.createElement(b,null,t.createElement(E.ErrorPage,{status:"501",statusMessage:de}))},B=({error:I,resetError:k,plugin:de})=>t.createElement(E.ErrorPanel,{title:`Error in ${de==null?void 0:de.getId()}`,defaultExpanded:!0,error:I},t.createElement(g.Z,{variant:"outlined",onClick:k},"Retry")),F={Progress:E.Progress,Router:S.VK,NotFoundErrorPage:x,BootErrorPage:w,ErrorBoundaryFallback:B};var O=e(43642),D=e(80079),$=e(90941),K=e(32915),ne=e(40562),se=e(21853),Ee=e(60744),Ue=e(66569),xe=e(30254),We=e(13384),Re=e(15933),Je=e(58838),at=e(86737),Tt=e(4989),yt=e(44407),Pe=e(18628),mt=e(84219),qe=e(98685),le=e(39781);const fe={brokenImage:D.Z,catalog:Pe.Z,scaffolder:K.Z,techdocs:ne.Z,search:se.Z,chat:Ee.Z,dashboard:Ue.Z,docs:xe.Z,email:We.Z,github:Je.Z,group:mt.Z,help:at.Z,"kind:api":Re.Z,"kind:component":yt.Z,"kind:domain":O.Z,"kind:group":mt.Z,"kind:location":Tt.Z,"kind:system":$.Z,"kind:user":qe.Z,user:qe.Z,warning:le.Z};var Me=e(73689),we=e(48032);const Ve={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"],greens:["#4BB8A5","#187656"]};function Qe(I){var dt;const{colors:k,shape:de,options:De}=I,gt=`linear-gradient(90deg, ${(k.length===1?[k[0],k[0]]:k).join(", ")})`,At=`${de}, ${gt}`,xt=(dt=De==null?void 0:De.fontColor)!=null?dt:"#FFFFFF";return{colors:k,shape:de,backgroundImage:At,fontColor:xt}}const Ct={home:Qe({colors:lt.teal,shape:Ve.wave}),documentation:Qe({colors:lt.pinkSea,shape:Ve.wave2}),tool:Qe({colors:lt.purpleSky,shape:Ve.round}),service:Qe({colors:lt.marineBlue,shape:Ve.wave}),website:Qe({colors:lt.veryBlue,shape:Ve.wave}),library:Qe({colors:lt.rubyRed,shape:Ve.wave}),other:Qe({colors:lt.darkGrey,shape:Ve.wave}),app:Qe({colors:lt.toastyOrange,shape:Ve.wave}),apis:Qe({colors:lt.teal,shape:Ve.wave2}),card:Qe({colors:lt.greens,shape:Ve.wave})},oe=16,ue='"Helvetica Neue", Helvetica, Roboto, Arial, sans-serif';function Xe(I){const{palette:k,htmlFontSize:de=oe,fontFamily:De=ue,defaultPageTheme:tt,pageTheme:gt=Ct}=I;if(!gt[tt])throw new Error(`${tt} is not defined in pageTheme.`);return{palette:k,props:{MuiGrid:{spacing:2},MuiSwitch:{color:"primary"}},typography:{htmlFontSize:de,fontFamily:De,h6:{fontWeight:700,fontSize:20,marginBottom:2},h5:{fontWeight:700,fontSize:24,marginBottom:4},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:gt[tt],getPageTheme:({themeId:At})=>{var xt;return(xt=gt[At])!=null?xt:gt[tt]}}}function Ge(I){return{MuiCssBaseline:{"@global":{html:{height:"100%",fontFamily:I.typography.fontFamily},body:{height:"100%",fontFamily:I.typography.fontFamily,"overscroll-behavior-y":"none"},a:{color:"inherit",textDecoration:"none"}}},MuiTableRow:{root:{"&:nth-of-type(odd)":{backgroundColor:I.palette.background.default}},hover:{"&:hover":{cursor:"pointer"}},head:{"&:nth-of-type(odd)":{backgroundColor:I.palette.background.paper}}},MuiTableCell:{root:{wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:I.spacing(3,2,3,2.5),borderBottom:0},sizeSmall:{padding:I.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:I.palette.link,minHeight:24,textTransform:"initial",letterSpacing:"0.07em","&:hover":{color:(0,we.darken)(I.palette.link,.3),background:(0,we.lighten)(I.palette.link,.95)},[I.breakpoints.up("md")]:{minWidth:120,fontSize:I.typography.pxToRem(14),fontWeight:500}},textColorPrimary:{color:I.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:I.spacing(1),marginBottom:I.spacing(1),color:I.palette.grey[900]},outlined:{color:I.palette.text.primary},label:{lineHeight:`${I.spacing(2.5)}px`,fontWeight:I.typography.fontWeightMedium,fontSize:`${I.spacing(1.75)}px`},labelSmall:{fontSize:`${I.spacing(1.5)}px`},deleteIcon:{color:I.palette.grey[500],width:`${I.spacing(3)}px`,height:`${I.spacing(3)}px`,margin:`0 ${I.spacing(.75)}px 0 -${I.spacing(.75)}px`},deleteIconSmall:{width:`${I.spacing(2)}px`,height:`${I.spacing(2)}px`,margin:`0 ${I.spacing(.5)}px 0 -${I.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 $e(I){const k=Xe(I),de=(0,Me.Z)(k),De=Ge(de);return{...de,overrides:De}}var ct=e(34505);const Y=$e({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:ct.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:Ct}),Z=$e({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:ct.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:Ct});var q=e(98192),ie=e(15222),me=e(41547),be=e(87561);const Le=[{id:"light",title:"Light Theme",variant:"light",icon:t.createElement(ie.Z,null),Provider:({children:I})=>t.createElement(me.Z,{theme:Y},t.createElement(be.ZP,null,I))},{id:"dark",title:"Dark Theme",variant:"dark",icon:t.createElement(q.Z,null),Provider:({children:I})=>t.createElement(me.Z,{theme:Z},t.createElement(be.ZP,null,I))}];function Se(I){var k,de,De;return(0,o.createSpecializedApp)({...I,apis:(k=I==null?void 0:I.apis)!=null?k:[],bindRoutes:I==null?void 0:I.bindRoutes,components:{...F,...I==null?void 0:I.components},configLoader:I==null?void 0:I.configLoader,defaultApis:y,icons:{...fe,...I==null?void 0:I.icons},plugins:(de=I==null?void 0:I.plugins)!=null?de:[],themes:(De=I==null?void 0:I.themes)!=null?De:Le})}var _e=e(82394),ke=e.n(_e),Et=e(48023),St=e(76635);async function ut({storageApi:I}){var gt;const k=I.forBucket("settings"),de=I.forBucket("starredEntities"),De=k.snapshot("starredEntities").value;if(!(0,St.isArray)(De))return;const tt=new Set((gt=de.snapshot("entityRefs").value)!=null?gt:[]);De.filter(St.isString).map(At=>At.split(":")).filter(At=>At.length===4&&At[0]==="entity").map(([At,xt,dt,jt])=>(0,Et.eE)({kind:xt,namespace:dt,name:jt})).forEach(At=>tt.add(At)),await de.set("entityRefs",Array.from(tt)),await k.remove("starredEntities")}class Dt{constructor(k){X(this,"settingsStore");X(this,"starredEntities");X(this,"subscribers",new Set);X(this,"observable",new(ke())(k=>(k.next(new Set(this.starredEntities)),this.subscribers.add(k),()=>{this.subscribers.delete(k)})));var de;ut(k).then(),this.settingsStore=k.storageApi.forBucket("starredEntities"),this.starredEntities=new Set((de=this.settingsStore.snapshot("entityRefs").value)!=null?de:[]),this.settingsStore.observe$("entityRefs").subscribe({next:De=>{var tt;this.starredEntities=new Set((tt=De.value)!=null?tt:[]),this.notifyChanges()}})}async toggleStarred(k){this.starredEntities.has(k)?this.starredEntities.delete(k):this.starredEntities.add(k),await this.settingsStore.set("entityRefs",Array.from(this.starredEntities))}starredEntitie$(){return this.observable}notifyChanges(){for(const k of this.subscribers)k.next(new Set(this.starredEntities))}}var Ot=e(39398),bt=e(49782),Pt=e(79692),Ut=e(74450);const Nt=(0,Pt.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",wordBreak:"break-all",marginBottom:"1rem"}});function mn(I){var gt,At;const k=I.result,de=Nt(),De=useAnalytics(),tt=()=>{De.captureEvent("discover",k.title,{attributes:{to:k.location},value:I.rank})};return React.createElement(Link,{noTrack:!0,to:k.location,onClick:tt},React.createElement(ListItem,{alignItems:"flex-start"},I.icon&&React.createElement(ListItemIcon,null,I.icon),React.createElement("div",{className:de.flexContainer},React.createElement(ListItemText,{className:de.itemText,primaryTypographyProps:{variant:"h6"},primary:(gt=I.highlight)!=null&&gt.fields.title?React.createElement(HighlightedSearchResultText,{text:I.highlight.fields.title,preTag:I.highlight.preTag,postTag:I.highlight.postTag}):k.title,secondary:(At=I.highlight)!=null&&At.fields.text?React.createElement(HighlightedSearchResultText,{text:I.highlight.fields.text,preTag:I.highlight.preTag,postTag:I.highlight.postTag}):k.text}),React.createElement(Box,null,k.kind&&React.createElement(Chip,{label:`Kind: ${k.kind}`,size:"small"}),k.lifecycle&&React.createElement(Chip,{label:`Lifecycle: ${k.lifecycle}`,size:"small"})))),React.createElement(Divider,{component:"li"}))}var On=e(30097),Kt=e(17429),$t=e(95544),nt=e(99688),ce=e(12231),j=e(86136),ye=e(49378),Ke=e(85256),rt=e(61837),it=e(79784),Rt=e(50758),Qt=e(31654),en=e(43054),tn=e(40749);const En="catalog-entity",U=(0,tn.J$)({name:"catalog.entity.read",attributes:{action:"read"},resourceType:En}),re=(0,tn.J$)({name:"catalog.entity.create",attributes:{action:"create"}}),te=(0,tn.J$)({name:"catalog.entity.delete",attributes:{action:"delete"},resourceType:En}),ve=(0,tn.J$)({name:"catalog.entity.refresh",attributes:{action:"update"},resourceType:En}),Ne=(0,tn.J$)({name:"catalog.location.read",attributes:{action:"read"}}),ht=(0,tn.J$)({name:"catalog.location.create",attributes:{action:"create"}}),He=(0,tn.J$)({name:"catalog.location.delete",attributes:{action:"delete"}});var Zt=e(49166);function Wt(I){var dt;const{unregisterEntityOptions:k,isUnregisterAllowed:de,onUnregisterEntity:De,onClose:tt}=I,gt=typeof(k==null?void 0:k.disableUnregister)=="boolean",At=(dt=!de||(gt?!!(k!=null&&k.disableUnregister):(k==null?void 0:k.disableUnregister)==="disable"))!=null?dt:!1;let xt=t.createElement(t.Fragment,null);return(k==null?void 0:k.disableUnregister)!=="hidden"&&(xt=t.createElement(ce.Z,{onClick:()=>{tt(),De()},disabled:At},t.createElement(j.Z,null,t.createElement(Zt.Z,{fontSize:"small"})),t.createElement(ye.Z,{primary:"Unregister entity"}))),t.createElement(t.Fragment,null,xt)}const Ht=(0,Pt.Z)(I=>({button:{color:I.page.fontColor}}),{name:"PluginCatalogEntityContextMenu"});function Ft(I){const{UNSTABLE_extraContextMenuItems:k,UNSTABLE_contextMenuOptions:de,onUnregisterEntity:De,onInspectEntity:tt}=I,[gt,At]=(0,t.useState)(),xt=Ht(),jt=(0,Kt.useEntityPermission)(te).allowed,A=W=>{At(W.currentTarget)},T=()=>{At(void 0)},N=k&&[...k.map(W=>t.createElement(ce.Z,{key:W.title,onClick:()=>{T(),W.onClick()}},t.createElement(j.Z,null,t.createElement(W.Icon,{fontSize:"small"})),t.createElement(ye.Z,{primary:W.title}))),t.createElement(Ke.Z,{key:"the divider is here!"})];return t.createElement(t.Fragment,null,t.createElement(rt.Z,{"aria-label":"more","aria-controls":"long-menu","aria-haspopup":"true","aria-expanded":!!gt,role:"button",onClick:A,"data-testid":"menu-button",className:xt.button,id:"long-menu"},t.createElement(en.Z,null)),t.createElement(it.ZP,{open:Boolean(gt),onClose:T,anchorEl:gt,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},"aria-labelledby":"long-menu"},t.createElement(Rt.Z,null,N,t.createElement(Wt,{unregisterEntityOptions:de,isUnregisterAllowed:jt,onUnregisterEntity:De,onClose:T}),t.createElement(ce.Z,{onClick:()=>{T(),tt()}},t.createElement(j.Z,null,t.createElement(Qt.Z,{fontSize:"small"})),t.createElement(ye.Z,{primary:"Inspect entity"})))))}const vt="plugin.catalog.entityLayoutRoute",kt=()=>null;(0,u.attachComponentData)(kt,vt,!0),(0,u.attachComponentData)(kt,"core.gatherMountPoints",!0);function hn(I){const{entity:k,title:de}=I;return t.createElement($t.Z,{display:"inline-flex",alignItems:"center",height:"1em",maxWidth:"100%"},t.createElement($t.Z,{component:"span",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},de),k&&t.createElement(Kt.FavoriteEntity,{entity:k}))}function Yt(I,k,de,De){var xt,dt,jt,A,T;const tt=(xt=I!=null?I:De==null?void 0:De.kind)!=null?xt:"",gt=(dt=k!=null?k:De==null?void 0:De.metadata.namespace)!=null?dt:"";return{headerTitle:`${(T=(A=(jt=De==null?void 0:De.metadata.title)!=null?jt:de)!=null?A:De==null?void 0:De.metadata.name)!=null?T:""}${gt&&gt!==Et.zG?` in ${gt}`:""}`,headerType:(()=>{let N=tt.toLocaleLowerCase("en-US");return De&&De.spec&&"type"in De.spec&&(N+=" \u2014 ",N+=De.spec.type.toLocaleLowerCase("en-US")),N})()}}function Xt(I){var De;const{entity:k}=I,de=(0,Kt.getEntityRelations)(k,Et.S4);return t.createElement(t.Fragment,null,de.length>0&&t.createElement(E.HeaderLabel,{label:"Owner",value:t.createElement(Kt.EntityRefLinks,{entityRefs:de,defaultKind:"Group",color:"inherit"})}),((De=k.spec)==null?void 0:De.lifecycle)&&t.createElement(E.HeaderLabel,{label:"Lifecycle",value:k.spec.lifecycle}))}const rn=I=>{var ze,Ye,Lt;const{UNSTABLE_extraContextMenuItems:k,UNSTABLE_contextMenuOptions:de,children:De,NotFoundComponent:tt}=I,{kind:gt,namespace:At,name:xt}=(0,u.useRouteRefParams)(Kt.entityRouteRef),{entity:dt,loading:jt,error:A}=(0,Kt.useAsyncEntity)(),T=(0,i.TH)(),N=(0,u.useElementFilter)(De,ot=>ot.selectByComponentData({key:vt,withStrictError:"Child of EntityLayout must be an EntityLayout.Route"}).getElements().flatMap(({props:je})=>{if(dt){if(je.if&&!je.if(dt))return[]}else return[];return[{path:je.path,title:je.title,children:je.children,tabProps:je.tabProps}]}),[dt]),{headerTitle:W,headerType:J}=Yt(gt,At,xt,dt),[Q,he]=(0,t.useState)(!1),[Ce,Oe]=(0,t.useState)(!1),Fe=(0,i.s0)(),Ze=async()=>{he(!1),Oe(!1),Fe("/")};return(0,t.useEffect)(()=>{he(!1),Oe(!1)},[T.pathname]),t.createElement(E.Page,{themeId:(Lt=(Ye=(ze=dt==null?void 0:dt.spec)==null?void 0:ze.type)==null?void 0:Ye.toString())!=null?Lt:"home"},t.createElement(E.Header,{title:t.createElement(hn,{title:W,entity:dt}),pageTitleOverride:W,type:J},dt&&t.createElement(t.Fragment,null,t.createElement(Xt,{entity:dt}),t.createElement(Ft,{UNSTABLE_extraContextMenuItems:k,UNSTABLE_contextMenuOptions:de,onUnregisterEntity:()=>he(!0),onInspectEntity:()=>Oe(!0)}))),jt&&t.createElement(E.Progress,null),dt&&t.createElement(E.RoutedTabs,{routes:N}),A&&t.createElement(E.Content,null,t.createElement(nt.Z,{severity:"error"},A.toString())),!jt&&!A&&!dt&&t.createElement(E.Content,null,tt||t.createElement(E.WarningPanel,{title:"Entity not found"},"There is no ",gt," with the requested"," ",t.createElement(E.Link,{to:"https://backstage.io/docs/features/software-catalog/references"},"kind, namespace, and name"),".")),t.createElement(Kt.UnregisterEntityDialog,{open:Q,entity:dt,onConfirm:Ze,onClose:()=>he(!1)}),t.createElement(Kt.InspectEntityDialog,{open:Ce,entity:dt,onClose:()=>Oe(!1)}))};rn.Route=kt;var an=e(10179);function Bt(I){const{open:k,onClose:de,onConfirm:De,entity:tt}=I,[gt,At]=useState(!1),xt=useApi(catalogApiRef),dt=useApi(alertApiRef),jt=async()=>{At(!0);try{const A=tt.metadata.uid;await xt.removeEntityByUid(A),De()}catch(A){assertError(A),dt.post({message:A.message})}finally{At(!1)}};return React.createElement(Dialog,{open:k,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:gt,onClick:jt},"Delete"),React.createElement(Button,{onClick:de,color:"primary"},"Cancel")))}var It=e(47851);function cn(I){var k,de;return((de=(k=I==null?void 0:I.metadata)==null?void 0:k.annotations)==null?void 0:de["backstage.io/orphan"])==="true"}function Sn(){const I=useNavigate(),k=useRouteRef(rootRouteRef),[de,De]=useState(!1),{entity:tt}=useEntity(),gt=async()=>{De(!1),I(k())};return React.createElement(React.Fragment,null,React.createElement(Alert,{severity:"warning",onClick:()=>De(!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:tt,onConfirm:gt,onClose:()=>De(!1)}))}var on=e(30001);const Rn=I=>I.error&&I.level==="error"&&I.type===ENTITY_STATUS_CATALOG_PROCESSING_TYPE;async function Cn(I,k){return{items:(await k.getEntityAncestors({entityRef:I})).items.map(tt=>{var xt,dt;return{errors:((dt=(xt=tt.entity.status)==null?void 0:xt.items)!=null?dt:[]).filter(Rn).map(jt=>jt.error).filter(jt=>Boolean(jt)),entity:tt.entity}}).filter(tt=>tt.errors.length>0)}}async function xn(I,k){const de=k.apis.get(catalogApiRef);if(!de)throw new Error(`No implementation available for ${catalogApiRef}`);return(await Cn(stringifyEntityRef(I),de)).items.length>0}function wn(){const{entity:I}=useEntity(),k=stringifyEntityRef(I),de=useApi(catalogApiRef),{loading:De,error:tt,value:gt}=useAsync(async()=>Cn(k,de),[k,de]);return tt?React.createElement(Box,{mb:1},React.createElement(ResponseErrorPanel,{error:tt})):De||!gt?null:React.createElement(React.Fragment,null,gt.items.map((At,xt)=>React.createElement(Box,{key:xt,mb:1},stringifyEntityRef(I)!==stringifyEntityRef(At.entity)&&React.createElement(Box,{p:1},"The error below originates from"," ",React.createElement(EntityRefLink,{entityRef:At.entity})),At.errors.map((dt,jt)=>React.createElement(ResponseErrorPanel,{key:jt,error:dt})))))}var M=e(64279);const h="core.backstage.entitySwitch",C=I=>null;(0,u.attachComponentData)(C,h,!0);const L=I=>{var At,xt;const{entity:k,loading:de}=(0,Kt.useAsyncEntity)(),De=(0,u.useApiHolder)(),tt=(0,u.useElementFilter)(I.children,dt=>dt.selectByComponentData({key:h,withStrictError:"Child of EntitySwitch is not an EntitySwitch.Case"}).getElements().flatMap(jt=>{var N;if(de)return[];const{if:A,children:T}=jt.props;return k?[{if:(N=A==null?void 0:A(k,{apis:De}))!=null?N:!0,children:T}]:[{if:A===void 0,children:T}]}),[De,k,de]);return tt.some(dt=>typeof dt.if=="object"&&"then"in dt.if)?t.createElement(V,{results:tt}):(xt=(At=tt.find(dt=>dt.if))==null?void 0:At.children)!=null?xt:null};function V({results:I}){const{loading:k,value:de}=(0,M.default)(async()=>{var tt;const De=I.map(async({if:gt,children:At})=>{try{if(await gt)return At}catch{}return null});return(tt=(await Promise.all(De)).find(Boolean))!=null?tt:null},[I]);return k||!de?null:de}L.Case=C;const ge=null,pe=Kt.CatalogFilterLayout.Filters,Ie=Kt.CatalogFilterLayout.Content,et=(0,u.createPlugin)({id:"catalog",apis:[(0,u.createApiFactory)({api:Kt.catalogApiRef,deps:{discoveryApi:u.discoveryApiRef,fetchApi:u.fetchApiRef},factory:({discoveryApi:I,fetchApi:k})=>new on.MS({discoveryApi:I,fetchApi:k})}),(0,u.createApiFactory)({api:Kt.starredEntitiesApiRef,deps:{storageApi:u.storageApiRef},factory:({storageApi:I})=>new Dt({storageApi:I})})],routes:{catalogIndex:It._Z,catalogEntity:Kt.entityRouteRef},externalRoutes:{createComponent:It.yw,viewTechDoc:It.jU},__experimentalConfigure(I){return{...{createButtonTitle:"Create"},...I}}}),zt=et.provide((0,u.createRoutableExtension)({name:"CatalogIndexPage",component:()=>e.e(5162).then(e.bind(e,74036)).then(I=>I.CatalogPage),mountPoint:It._Z})),pn=et.provide((0,u.createRoutableExtension)({name:"CatalogEntityPage",component:()=>e.e(6583).then(e.bind(e,96583)).then(I=>I.CatalogEntityPage),mountPoint:Kt.entityRouteRef})),kn=et.provide((0,u.createComponentExtension)({name:"EntityAboutCard",component:{lazy:()=>Promise.resolve().then(e.bind(e,39398)).then(I=>I.AboutCard)}})),dr=et.provide((0,u.createComponentExtension)({name:"EntityLinksCard",component:{lazy:()=>e.e(3555).then(e.bind(e,73555)).then(I=>I.EntityLinksCard)}})),fr=et.provide((0,u.createComponentExtension)({name:"EntityHasSystemsCard",component:{lazy:()=>e.e(390).then(e.bind(e,60390)).then(I=>I.HasSystemsCard)}})),mr=et.provide((0,u.createComponentExtension)({name:"EntityHasComponentsCard",component:{lazy:()=>e.e(4022).then(e.bind(e,4022)).then(I=>I.HasComponentsCard)}})),Gn=et.provide((0,u.createComponentExtension)({name:"EntityHasSubcomponentsCard",component:{lazy:()=>e.e(8792).then(e.bind(e,38792)).then(I=>I.HasSubcomponentsCard)}})),$n=et.provide((0,u.createComponentExtension)({name:"EntityHasResourcesCard",component:{lazy:()=>e.e(1553).then(e.bind(e,11553)).then(I=>I.HasResourcesCard)}})),er=et.provide((0,u.createComponentExtension)({name:"EntityDependsOnComponentsCard",component:{lazy:()=>e.e(8061).then(e.bind(e,48061)).then(I=>I.DependsOnComponentsCard)}})),hr=et.provide((0,u.createComponentExtension)({name:"EntityDependencyOfComponentsCard",component:{lazy:()=>e.e(6235).then(e.bind(e,56235)).then(I=>I.DependencyOfComponentsCard)}})),Lr=et.provide((0,u.createComponentExtension)({name:"EntityDependsOnResourcesCard",component:{lazy:()=>e.e(9028).then(e.bind(e,59028)).then(I=>I.DependsOnResourcesCard)}})),la=et.provide((0,u.createComponentExtension)({name:"RelatedEntitiesCard",component:{lazy:()=>e.e(2426).then(e.bind(e,62426)).then(I=>I.RelatedEntitiesCard)}}));var tr=e(36356);class Or{constructor({configApi:k,discoveryApi:de,identityApi:De}){X(this,"configApi");X(this,"discoveryApi");X(this,"identityApi");this.configApi=k,this.discoveryApi=de,this.identityApi=De}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(k,de){const tt=`${await this.getApiOrigin()}/${de}`,gt=await fetch(`${tt.endsWith("/")?tt:`${tt}/`}index.html`);if(gt.status===404)throw new Error("Page not found");return gt.text()}async syncEntityDocs(k){return"cached"}async getBaseUrl(k,de,De){const tt=await this.getApiOrigin();return new URL(k,`${tt}/${De}`).toString()}}class xr{constructor({configApi:k,discoveryApi:de,identityApi:De}){X(this,"configApi");X(this,"discoveryApi");X(this,"identityApi");this.configApi=k,this.discoveryApi=de,this.identityApi=De}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getEntityMetadata(k){return{apiVersion:"backstage.io/v1alpha1",kind:"Component",metadata:{name:"local"},spec:{owner:"test",lifecycle:"experimental"}}}async getTechDocsMetadata(k){return{site_name:"Live preview environment",site_description:""}}}const ir=[(0,u.createApiFactory)({api:c.Dl,deps:{configApi:u.configApiRef,discoveryApi:u.discoveryApiRef,identityApi:u.identityApiRef},factory:({configApi:I,discoveryApi:k,identityApi:de})=>new Or({configApi:I,discoveryApi:k,identityApi:de})}),(0,u.createApiFactory)({api:c.gT,deps:{configApi:u.configApiRef,discoveryApi:u.discoveryApiRef,identityApi:u.identityApiRef},factory:({configApi:I,discoveryApi:k,identityApi:de})=>new xr({configApi:I,discoveryApi:k,identityApi:de})}),(0,u.createApiFactory)({api:tr.q3,deps:{configApi:u.configApiRef},factory:({configApi:I})=>tr.ae.fromConfig(I)})],Un={backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}},nr={backend:{baseUrl:"http://localhost:7007"},techdocs:{builder:"external"}};async function rr(){const I=await fetch("/.detect");return I.ok?(await I.text()).trim()==="techdocs-cli-server":!1}async function Gr(){const I=await(0,o.defaultConfigLoader)(),k=await rr();return[...I,{context:"detected",data:k?Un:nr}]}var gr=e(86689),pr=e(58845);const Kr=(0,Pt.Z)({svg:{width:"auto",height:30},path:{fill:"#7df3e1"}});var lr=()=>{const I=Kr();return t.createElement("svg",{className:I.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 2079.95 456.05"},t.createElement("path",{className:I.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 Dr=(0,Pt.Z)({svg:{width:"auto",height:28},path:{fill:"#7df3e1"}});var yr=()=>{const I=Dr();return t.createElement("svg",{className:I.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 337.46 428.5"},t.createElement("path",{className:I.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 Fr=(0,Pt.Z)({root:{width:E.sidebarConfig.drawerWidthClosed,height:3*E.sidebarConfig.logoHeight,display:"flex",flexFlow:"row nowrap",alignItems:"center",marginBottom:-14},link:{width:E.sidebarConfig.drawerWidthClosed,marginLeft:24}}),Br=()=>{const I=Fr(),{isOpen:k}=(0,E.useSidebarOpenState)();return t.createElement("div",{className:I.root},t.createElement(gr.Z,{component:S.OL,to:"/docs/default/component/local/",underline:"none",className:I.link},k?t.createElement(lr,null):t.createElement(yr,null)))},Mr=({children:I})=>t.createElement(E.SidebarPage,null,t.createElement(E.Sidebar,null,t.createElement(Br,null),t.createElement(E.SidebarDivider,null),t.createElement(E.SidebarItem,{icon:pr.Z,to:"/docs/default/component/local",text:"Docs Preview"})),I);var Er=e(80030),wr=e(32388),vr=e(4142);const yn=(0,Pt.Z)(I=>({headerIcon:{color:I.palette.common.white,width:"32px",height:"32px"},content:{backgroundColor:I.palette.background.default},contentToolbar:{display:"flex",justifyContent:"flex-end",padding:0}}));var un;(function(I){const k="light";I.LIGHT=k;const de="dark";I.DARK=de})(un||(un={}));const Yn=()=>{const I=(0,u.useApi)(u.appThemeApiRef),k=yn(),[de,De]=(0,t.useState)(I.getActiveThemeId()||un.LIGHT),tt={[un.LIGHT]:{icon:vr.Z,title:"Dark theme"},[un.DARK]:{icon:wr.Z,title:"Light theme"}},{title:gt,icon:At}=tt[de],xt=()=>{De(dt=>{const jt=dt===un.LIGHT?un.DARK:un.LIGHT;return I.setActiveThemeId(jt),jt})};return t.createElement($t.Z,{display:"flex",alignItems:"center",mr:2},t.createElement(Er.ZP,{title:gt,arrow:!0},t.createElement(rt.Z,{size:"small",onClick:xt},t.createElement(At,{className:k.headerIcon}))))},Jn=()=>t.createElement(R.TechDocsReaderPage,null,t.createElement(R.TechDocsReaderPageHeader,null),t.createElement(R.TechDocsReaderPageContent,{withSearch:!1})),$r=t.createElement(Jn,null),Ar=Se({apis:ir,configLoader:Gr,plugins:Object.values(r)}),Ur=Ar.getProvider(),Rr=Ar.getRouter(),Nr=R.techdocsPlugin.provide((0,c.KY)({name:"ThemeToggleAddon",component:Yn,location:c.oZ.Header})),Sr=t.createElement(o.FlatRoutes,null,t.createElement(i.Fg,{key:"/",to:"/docs/default/component/local/"}),t.createElement(i.AW,{path:"/catalog/:namespace/:kind/:name",element:t.createElement(pn,null)}),t.createElement(i.AW,{path:"/docs",element:t.createElement(R.TechDocsIndexPage,null)},t.createElement(R.DefaultTechDocsHome,null)),t.createElement(i.AW,{path:"/docs/:namespace/:kind/:name/*",element:t.createElement(R.TechDocsReaderPage,null)},$r,t.createElement(c.DR,null,t.createElement(Nr,null))));var Jr=()=>t.createElement(Ur,null,t.createElement(Rr,null,t.createElement(Mr,null,Sr)));d.render(t.createElement(Jr,null),document.getElementById("root"))},76241:function(ee,s,e){"use strict";e.d(s,{CT:function(){return c},EI:function(){return m},uW:function(){return i},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(),d=y=>`__@backstage/${y}__`;function i(y,g){const E=d(y);let S=t[E];return S||(S=g(),t[E]=S,S)}var R=e(2784);function c(y){return i(y,()=>(0,R.createContext)(void 0))}function o(y){return(0,R.useContext)(c(y))}function u(y){return{set(g){globalThis[`__@backstage/${y}__`]=createContext(createVersionedValueMap(g))},reset(){delete globalThis[`__@backstage/${y}__`]}}}function m(y){return Object.freeze(y),{atVersion(g){return y[g]}}}},17429:function(ee,s,e){"use strict";e.d(s,{AsyncEntityProvider:function(){return $},CATALOG_FILTER_EXISTS:function(){return r.n3},CatalogFilterLayout:function(){return F},EntityKindFilter:function(){return q},EntityLifecyclePicker:function(){return En},EntityListProvider:function(){return Me},EntityOwnerPicker:function(){return ve},EntityProcessingStatusPicker:function(){return dt},EntityRefLink:function(){return Y},EntityRefLinks:function(){return Z},EntityTable:function(){return Ft},EntityTagPicker:function(){return Yt},EntityTypePicker:function(){return an},FavoriteEntity:function(){return Rn},InspectEntityDialog:function(){return $r},UnregisterEntityDialog:function(){return cr},UserListPicker:function(){return tt},catalogApiRef:function(){return d},entityRouteRef:function(){return ue},getEntityRelations:function(){return mt},getEntitySourceLocation:function(){return qe},humanizeEntityRef:function(){return Ge},starredEntitiesApiRef:function(){return i},useAsyncEntity:function(){return se},useEntity:function(){return ne},useEntityList:function(){return we},useEntityOwnership:function(){return mn},useEntityPermission:function(){return Kt},useRelatedEntities:function(){return Dt},useStarredEntities:function(){return Pt}});var r=e(30001),t=e(36964);const d=(0,t.createApiRef)({id:"plugin.catalog.service"}),i=(0,t.createApiRef)({id:"catalog-react.starred-entities"});var R=e(82394);class c{constructor(){X(this,"starredEntities",new Set);X(this,"subscribers",new Set);X(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 N of this.subscribers)N.next(new Set(this.starredEntities))}starredEntitie$(){return this.observable}}var o=e(2784),u=e(41156),m=e(60364),y=e(77277),g=e(4190),E=e(95544),S=e(90436),b=e(60905),x=e(36444);const w=A=>{const T=(0,u.Z)(Q=>Q.breakpoints.down("md")),N=(0,m.Z)(),[W,J]=(0,o.useState)(!1);return T?o.createElement(o.Fragment,null,o.createElement(y.Z,{style:{marginTop:N.spacing(1),marginLeft:N.spacing(1)},onClick:()=>J(!0),startIcon:o.createElement(x.Z,null)},"Filters"),o.createElement(g.ZP,{open:W,onClose:()=>J(!1),anchor:"left",disableAutoFocus:!0,keepMounted:!0,variant:"temporary"},o.createElement(E.Z,{m:2},o.createElement(S.Z,{variant:"h6",component:"h2",style:{marginBottom:N.spacing(1)}},"Filters"),A.children))):o.createElement(b.Z,{item:!0,lg:2},A.children)},B=A=>o.createElement(b.Z,{item:!0,xs:12,lg:10},A.children),F=A=>o.createElement(b.Z,{container:!0,style:{position:"relative"}},A.children);F.Filters=w,F.Content=B;var O=e(76241);const D=(0,O.CT)("entity-context"),$=({children:A,entity:T,loading:N,error:W,refresh:J})=>{const Q={entity:T,loading:N,error:W,refresh:J};return o.createElement(D.Provider,{value:(0,O.EI)({1:Q})},A)},K=A=>React.createElement($,{entity:A.entity,loading:!Boolean(A.entity),error:void 0,refresh:void 0,children:A.children});function ne(){const A=(0,O.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 se(){const A=(0,O.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:N,loading:W,error:J,refresh:Q}=T;return{entity:N,loading:W,error:J,refresh:Q}}var Ee=e(76635),Ue=e(19126),xe=e.n(Ue),We=e(10289),Re=e(69294),Je=e(48760),at=e(90736);function Tt(A){return A.reduce((T,N)=>({...T,...N.getCatalogFilters?N.getCatalogFilters():{}}),{})}function yt(A){return T=>A.every(N=>!N.filterEntity||N.filterEntity(T))}var Pe=e(48023);function mt(A,T,N){var J;let W=((J=A==null?void 0:A.relations)==null?void 0:J.filter(Q=>Q.type===T).map(Q=>(0,Pe.of)(Q.targetRef)))||[];return N!=null&&N.kind&&(W=W.filter(Q=>Q.kind.toLocaleLowerCase("en-US")===N.kind.toLocaleLowerCase("en-US"))),W}function qe(A,T){var W;const N=(W=A.metadata.annotations)==null?void 0:W[Pe.M6];if(!!N)try{const J=(0,Pe.Ou)(N),Q=T.byUrl(J.target);return{locationTargetUrl:J.target,integrationType:Q==null?void 0:Q.type}}catch{return}}function le(A,T){const N=new Set([...getEntityRelations(A,RELATION_MEMBER_OF,{kind:"group"}),...A?[getCompoundEntityRef(A)]:[]].map(stringifyEntityRef)),W=getEntityRelations(T,RELATION_OWNED_BY).map(stringifyEntityRef);for(const J of W)if(N.has(J))return!0;return!1}const fe=(0,o.createContext)(void 0),Me=({children:A})=>{const T=(0,at.default)(),N=(0,t.useApi)(d),[W,J]=(0,o.useState)({}),Q=(0,We.TH)(),he=(0,o.useMemo)(()=>{var ot;return(ot=xe().parse(Q.search,{ignoreQueryPrefix:!0}).filters)!=null?ot:{}},[Q]),[Ce,Oe]=(0,o.useState)(()=>({appliedFilters:{},entities:[],backendEntities:[]})),[{loading:Fe,error:Ze},ze]=(0,Re.default)(async()=>{var Dn;const ot=(0,Ee.compact)(Object.values(W)),je=yt(ot),Jt=Tt(ot),gn=Tt((0,Ee.compact)(Object.values(Ce.appliedFilters))),Qn=Object.keys(W).reduce((vn,Tn)=>{const Nn=W[Tn];return Nn!=null&&Nn.toQueryValue&&(vn[Tn]=Nn.toQueryValue()),vn},{});if((0,Ee.isEqual)(gn,Jt))Oe({appliedFilters:W,backendEntities:Ce.backendEntities,entities:Ce.backendEntities.filter(je)});else{const vn=await N.getEntities({filter:Jt});Oe({appliedFilters:W,backendEntities:vn.items,entities:vn.items.filter(je)})}if(T()){const vn=xe().parse(Q.search,{ignoreQueryPrefix:!0}),Tn=xe().stringify({...vn,filters:Qn},{addQueryPrefix:!0,arrayFormat:"repeat"}),Nn=`${window.location.pathname}${Tn}`;(Dn=window.history)==null||Dn.replaceState(null,document.title,Nn)}},[N,he,W,Ce],{loading:!0});(0,Je.Z)(ze,10,[W]);const Ye=(0,o.useCallback)(ot=>{J(je=>{const Jt=typeof ot=="function"?ot(je):ot;return{...je,...Jt}})},[]),Lt=(0,o.useMemo)(()=>({filters:Ce.appliedFilters,entities:Ce.entities,backendEntities:Ce.backendEntities,updateFilters:Ye,queryParameters:he,loading:Fe,error:Ze}),[Ce,Ye,he,Fe,Ze]);return o.createElement(fe.Provider,{value:Lt},A)};function we(){const A=(0,o.useContext)(fe);if(!A)throw new Error("useEntityList must be used within EntityListProvider");return A}var Ve=e(64279),lt=e(18149),Qe=e.n(lt),Ct=e(829),oe=e.n(Ct);const ue=(0,O.uW)("catalog:entity-route-ref",()=>(0,t.createRouteRef)({id:"catalog:entity",params:["namespace","kind","name"]}));function Xe(A){var T,N;return{kind:A.kind.toLocaleLowerCase("en-US"),namespace:(N=(T=A.metadata.namespace)==null?void 0:T.toLocaleLowerCase("en-US"))!=null?N:DEFAULT_NAMESPACE,name:A.metadata.name}}function Ge(A,T){const N=T==null?void 0:T.defaultKind;let W,J,Q;return"metadata"in A?(W=A.kind,J=A.metadata.namespace,Q=A.metadata.name):(W=A.kind,J=A.namespace,Q=A.name),J===Pe.zG&&(J=void 0),W=W.toLocaleLowerCase("en-US"),W=N&&N.toLocaleLowerCase("en-US")===W?void 0:W,`${W?`${W}:`:""}${J?`${J}/`:""}${Q}`}var $e=e(82339),ct=e(80030);const Y=(0,o.forwardRef)((A,T)=>{var ot;const{entityRef:N,defaultKind:W,title:J,children:Q,...he}=A,Ce=(0,t.useRouteRef)(ue);let Oe,Fe,Ze;if(typeof N=="string"){const je=(0,Pe.of)(N);Oe=je.kind,Fe=je.namespace,Ze=je.name}else"metadata"in N?(Oe=N.kind,Fe=N.metadata.namespace,Ze=N.metadata.name):(Oe=N.kind,Fe=N.namespace,Ze=N.name);Oe=Oe.toLocaleLowerCase("en-US"),Fe=(ot=Fe==null?void 0:Fe.toLocaleLowerCase("en-US"))!=null?ot:Pe.zG;const ze={kind:Oe,namespace:Fe,name:Ze},Ye=Ge({kind:Oe,namespace:Fe,name:Ze},{defaultKind:W}),Lt=o.createElement($e.Link,{...he,ref:T,to:Ce(ze)},Q,!Q&&(J!=null?J:Ye));return J?o.createElement(ct.ZP,{title:Ye},Lt):Lt});function Z(A){const{entityRefs:T,defaultKind:N,...W}=A;return o.createElement(o.Fragment,null,T.map((J,Q)=>o.createElement(o.Fragment,{key:Q},Q>0&&", ",o.createElement(Y,{...W,entityRef:J,defaultKind:N}))))}class q{constructor(T){this.value=T}getCatalogFilters(){return{kind:this.value}}toQueryValue(){return this.value}}class ie{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 me{constructor(T){this.values=T}filterEntity(T){return this.values.every(N=>{var W;return((W=T.metadata.tags)!=null?W:[]).includes(N)})}toQueryValue(){return this.values}}class be{constructor(T){this.value=T}filterEntity(T){var W;const N=this.value.toLocaleUpperCase("en-US");return T.metadata.name.toLocaleUpperCase("en-US").includes(N)||`${T.metadata.title}`.toLocaleUpperCase("en-US").includes(N)||((W=T.metadata.tags)==null?void 0:W.join("").toLocaleUpperCase("en-US").indexOf(N))!==-1}}class Le{constructor(T){this.values=T}filterEntity(T){return this.values.some(N=>mt(T,Pe.S4).some(W=>Ge(W,{defaultKind:"group"})===N))}toQueryValue(){return this.values}}class Se{constructor(T){this.values=T}filterEntity(T){return this.values.some(N=>{var W;return((W=T.spec)==null?void 0:W.lifecycle)===N})}toQueryValue(){return this.values}}class _e{constructor(T,N,W){this.value=T,this.isOwnedEntity=N,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}}class ke{constructor(T){this.value=T}filterEntity(T){var W;const N=(W=T.metadata.annotations)==null?void 0:W["backstage.io/orphan"];return N!==void 0&&this.value.toString()===N}}class Et{constructor(T){this.value=T}filterEntity(T){var W,J;const N=((J=(W=T==null?void 0:T.status)==null?void 0:W.items)==null?void 0:J.length)>0;return N!==void 0&&this.value===N}}function St(){var je;const A=(0,t.useApi)(d),{filters:{kind:T,type:N},queryParameters:{type:W},updateFilters:J}=we(),Q=(0,o.useMemo)(()=>[W].flat().filter(Boolean),[W]),[he,Ce]=(0,o.useState)(Q.length?Q:(je=N==null?void 0:N.getTypes())!=null?je:[]);(0,o.useEffect)(()=>{Q.length&&Ce(Q)},[Q]);const[Oe,Fe]=(0,o.useState)([]),Ze=(0,o.useMemo)(()=>T==null?void 0:T.value,[T]),{error:ze,loading:Ye,value:Lt}=(0,Ve.default)(async()=>Ze?await A.getEntityFacets({filter:{kind:Ze},facets:["spec.type"]}).then(gn=>gn.facets["spec.type"]||[]):[],[Ze,A]),ot=(0,o.useRef)(Lt);return(0,o.useEffect)(()=>{const Jt=ot.current;if(ot.current=Lt,Ye||!Ze||Jt===Lt||!Lt)return;const gn=[...new Set(oe()(Lt,Dn=>-Dn.count).map(Dn=>Dn.value.toLocaleLowerCase("en-US")))];Fe(gn);const Qn=he.filter(Dn=>gn.includes(Dn));Qe()(he,Qn)||Ce(Qn)},[Ye,Ze,he,Ce,Lt]),(0,o.useEffect)(()=>{J({type:he.length?new ie(he):void 0})},[he,J]),{loading:Ye,error:ze,availableTypes:Oe,selectedTypes:he,setSelectedTypes:Ce}}const ut=20;function Dt(A,T){var Oe,Fe;const N=(Oe=T==null?void 0:T.type)==null?void 0:Oe.toLocaleLowerCase("en-US"),W=(Fe=T==null?void 0:T.kind)==null?void 0:Fe.toLocaleLowerCase("en-US"),J=(0,t.useApi)(d),{loading:Q,value:he,error:Ce}=(0,Ve.default)(async()=>{var ot;const Ze=(ot=A.relations)==null?void 0:ot.map(je=>({type:je.type,target:(0,Pe.of)(je.targetRef)})).filter(je=>(!N||je.type.toLocaleLowerCase("en-US")===N)&&(!W||je.target.kind===W));if(!Ze)return[];const ze=Object.values((0,Ee.groupBy)(Ze,({target:je})=>`${je.kind}:${je.namespace}`.toLocaleLowerCase("en-US"))),Ye=[];for(const je of ze)Ye.push({kind:je[0].target.kind,namespace:je[0].target.namespace,nameBatches:(0,Ee.chunk)(je.map(Jt=>Jt.target.name),ut)});return(await Promise.all(Ye.flatMap(je=>je.nameBatches.map(Jt=>J.getEntities({filter:{kind:je.kind,"metadata.namespace":je.namespace,"metadata.name":Jt}}))))).flatMap(je=>je.items)},[A,N,W]);return{entities:he,loading:Q,error:Ce}}var Ot=e(72164);function bt(A){return typeof A=="string"?A:(0,Pe.eE)(A)}function Pt(){const A=(0,t.useApi)(i),T=(0,Ot.Z)(A.starredEntitie$(),new Set),N=(0,o.useCallback)(J=>T.has(bt(J)),[T]),W=(0,o.useCallback)(J=>A.toggleStarred(bt(J)).then(),[A]);return{starredEntities:T,toggleStarredEntity:W,isStarredEntity:N}}function Ut(A){return typeof A=="string"?A:(0,Pe.eE)(A)}function Nt(A){const T=(0,t.useApi)(i),[N,W]=(0,o.useState)(!1);return(0,o.useEffect)(()=>{const Q=T.starredEntitie$().subscribe({next(he){W(he.has(Ut(A)))}});return()=>{Q.unsubscribe()}},[A,T]),{toggleStarredEntity:(0,o.useCallback)(()=>T.toggleStarred(Ut(A)).then(),[A,T]),isStarredEntity:N}}function mn(){const A=(0,t.useApi)(t.identityApiRef),{loading:T,value:N}=(0,Ve.default)(async()=>{const{ownershipEntityRefs:J}=await A.getBackstageIdentity();return J},[]),W=(0,o.useMemo)(()=>{const J=new Set(N!=null?N:[]);return Q=>{const he=mt(Q,Pe.S4).map(Pe.eE);for(const Ce of he)if(J.has(Ce))return!0;return!1}},[N]);return(0,o.useMemo)(()=>({loading:T,isOwnedEntity:W}),[T,W])}var On=e(68099);function Kt(A){const{entity:T,loading:N,error:W}=se(),{allowed:J,loading:Q,error:he}=(0,On.gI)({permission:A,resourceRef:T?(0,Pe.eE)(T):void 0});return N||Q?{loading:!0,allowed:!1}:W?{loading:!1,allowed:!1,error:W}:{loading:!1,allowed:J,error:he}}const $t=A=>{var he;const{initialFilter:T,hidden:N}=A,{updateFilters:W,queryParameters:{kind:J}}=useEntityList(),[Q]=useState((he=[J].flat()[0])!=null?he:T);return useEffect(()=>{W({kind:Q?new EntityKindFilter(Q):void 0})},[Q,W]),N?null:React.createElement(Alert,{severity:"warning"},"Kind filter not yet available")};var nt=e(79692),ce=e(5806),j=e(21324),ye=e(86619),Ke=e(19996),rt=e(25505),it=e(38016),Rt=e(88013);const Qt=(0,nt.Z)({input:{}},{name:"CatalogReactEntityLifecyclePicker"}),en=o.createElement(rt.Z,{fontSize:"small"}),tn=o.createElement(Ke.Z,{fontSize:"small"}),En=()=>{var Fe,Ze;const A=Qt(),{updateFilters:T,backendEntities:N,filters:W,queryParameters:{lifecycles:J}}=we(),Q=(0,o.useMemo)(()=>[J].flat().filter(Boolean),[J]),[he,Ce]=(0,o.useState)(Q.length?Q:(Ze=(Fe=W.lifecycles)==null?void 0:Fe.values)!=null?Ze:[]);(0,o.useEffect)(()=>{Q.length&&Ce(Q)},[Q]),(0,o.useEffect)(()=>{T({lifecycles:he.length?new Se(he):void 0})},[he,T]);const Oe=(0,o.useMemo)(()=>[...new Set(N.map(ze=>{var Ye;return(Ye=ze.spec)==null?void 0:Ye.lifecycle}).filter(Boolean))].sort(),[N]);return Oe.length?o.createElement(E.Z,{pb:1,pt:1},o.createElement(S.Z,{variant:"button",component:"label"},"Lifecycle",o.createElement(Rt.ZP,{multiple:!0,options:Oe,value:he,onChange:(ze,Ye)=>Ce(Ye),renderOption:(ze,{selected:Ye})=>o.createElement(ce.Z,{control:o.createElement(j.Z,{icon:en,checkedIcon:tn,checked:Ye}),label:ze}),size:"small",popupIcon:o.createElement(it.Z,{"data-testid":"lifecycle-picker-expand"}),renderInput:ze=>o.createElement(ye.Z,{...ze,className:A.input,variant:"outlined"})}))):null},U=(0,nt.Z)({input:{}},{name:"CatalogReactEntityOwnerPicker"}),re=o.createElement(rt.Z,{fontSize:"small"}),te=o.createElement(Ke.Z,{fontSize:"small"}),ve=()=>{var Fe,Ze;const A=U(),{updateFilters:T,backendEntities:N,filters:W,queryParameters:{owners:J}}=we(),Q=(0,o.useMemo)(()=>[J].flat().filter(Boolean),[J]),[he,Ce]=(0,o.useState)(Q.length?Q:(Ze=(Fe=W.owners)==null?void 0:Fe.values)!=null?Ze:[]);(0,o.useEffect)(()=>{Q.length&&Ce(Q)},[Q]),(0,o.useEffect)(()=>{T({owners:he.length?new Le(he):void 0})},[he,T]);const Oe=(0,o.useMemo)(()=>[...new Set(N.flatMap(ze=>mt(ze,Pe.S4).map(Ye=>Ge(Ye,{defaultKind:"group"}))).filter(Boolean))].sort(),[N]);return Oe.length?o.createElement(E.Z,{pb:1,pt:1},o.createElement(S.Z,{variant:"button",component:"label"},"Owner",o.createElement(Rt.ZP,{multiple:!0,options:Oe,value:he,onChange:(ze,Ye)=>Ce(Ye),renderOption:(ze,{selected:Ye})=>o.createElement(ce.Z,{control:o.createElement(j.Z,{icon:re,checkedIcon:te,checked:Ye}),label:ze}),size:"small",popupIcon:o.createElement(it.Z,{"data-testid":"owner-picker-expand"}),renderInput:ze=>o.createElement(ye.Z,{...ze,className:A.input,variant:"outlined"})}))):null},Ne=(0,nt.Z)(A=>({searchToolbar:{paddingLeft:0,paddingRight:0},input:{}}),{name:"CatalogReactEntitySearchBar"}),ht=()=>{var Q,he;const A=Ne(),{filters:T,updateFilters:N}=useEntityList(),[W,J]=useState((he=(Q=T.text)==null?void 0:Q.value)!=null?he:"");return useDebounce(()=>{N({text:W.length?new EntityTextFilter(W):void 0})},250,[W,N]),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:Ce=>J(Ce.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)))})))},He=Object.freeze({createEntityRefColumn(A){const{defaultKind:T}=A;function N(W){var J;return((J=W.metadata)==null?void 0:J.title)||Ge(W,{defaultKind:T})}return{title:"Name",highlight:!0,customFilterAndSearch(W,J){return N(J).includes(W)},customSort(W,J){return N(W).localeCompare(N(J))},render:W=>{var J;return o.createElement(Y,{entityRef:W,defaultKind:T,title:(J=W.metadata)==null?void 0:J.title})}}},createEntityRelationColumn({title:A,relation:T,defaultKind:N,filter:W}){function J(he){return mt(he,T,W)}function Q(he){return J(he).map(Ce=>Ge(Ce,{defaultKind:N})).join(", ")}return{title:A,customFilterAndSearch(he,Ce){return Q(Ce).includes(he)},customSort(he,Ce){return Q(he).localeCompare(Q(Ce))},render:he=>o.createElement(Z,{entityRefs:J(he),defaultKind:N})}},createOwnerColumn(){return this.createEntityRelationColumn({title:"Owner",relation:Pe.S4,defaultKind:"group"})},createDomainColumn(){return this.createEntityRelationColumn({title:"Domain",relation:Pe.cz,defaultKind:"domain",filter:{kind:"domain"}})},createSystemColumn(){return this.createEntityRelationColumn({title:"System",relation:Pe.cz,defaultKind:"system",filter:{kind:"system"}})},createMetadataDescriptionColumn(){return{title:"Description",field:"metadata.description",render:A=>o.createElement($e.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"}}}),Zt=[He.createEntityRefColumn({defaultKind:"system"}),He.createDomainColumn(),He.createOwnerColumn(),He.createMetadataDescriptionColumn()],Wt=[He.createEntityRefColumn({defaultKind:"component"}),He.createSystemColumn(),He.createOwnerColumn(),He.createSpecTypeColumn(),He.createSpecLifecycleColumn(),He.createMetadataDescriptionColumn()],Ht=(0,nt.Z)(A=>({empty:{padding:A.spacing(2),display:"flex",justifyContent:"center"}})),Ft=A=>{const{entities:T,title:N,emptyContent:W,variant:J="gridItem",columns:Q}=A,he=Ht(),Ce={minWidth:"0",width:"100%"};return J==="gridItem"&&(Ce.height="calc(100% - 10px)"),o.createElement($e.Table,{columns:Q,title:N,style:Ce,emptyContent:W&&o.createElement("div",{className:he.empty},W),options:{search:!1,paging:!1,actionsColumnIndex:-1,padding:"dense",draggable:!1},data:T})};Ft.columns=He,Ft.systemEntityColumns=Zt,Ft.componentEntityColumns=Wt;const vt=(0,nt.Z)({input:{}},{name:"CatalogReactEntityTagPicker"}),kt=o.createElement(rt.Z,{fontSize:"small"}),hn=o.createElement(Ke.Z,{fontSize:"small"}),Yt=()=>{var Fe,Ze;const A=vt(),{updateFilters:T,filters:N,queryParameters:{tags:W}}=we(),J=(0,t.useApi)(d),{value:Q}=(0,Ve.default)(async()=>{var Lt;const ze="metadata.tags",{facets:Ye}=await J.getEntityFacets({facets:[ze],filter:(Lt=N.kind)==null?void 0:Lt.getCatalogFilters()});return Ye[ze].map(({value:ot})=>ot)},[N.kind]),he=(0,o.useMemo)(()=>[W].flat().filter(Boolean),[W]),[Ce,Oe]=(0,o.useState)(he.length?he:(Ze=(Fe=N.tags)==null?void 0:Fe.values)!=null?Ze:[]);return(0,o.useEffect)(()=>{he.length&&Oe(he)},[he]),(0,o.useEffect)(()=>{T({tags:Ce.length?new me(Ce):void 0})},[Ce,T]),Q!=null&&Q.length?o.createElement(E.Z,{pb:1,pt:1},o.createElement(S.Z,{variant:"button",component:"label"},"Tags",o.createElement(Rt.ZP,{multiple:!0,options:Q,value:Ce,onChange:(ze,Ye)=>Oe(Ye),renderOption:(ze,{selected:Ye})=>o.createElement(ce.Z,{control:o.createElement(j.Z,{icon:kt,checkedIcon:hn,checked:Ye}),label:ze}),size:"small",popupIcon:o.createElement(it.Z,{"data-testid":"tag-picker-expand"}),renderInput:ze=>o.createElement(ye.Z,{...ze,className:A.input,variant:"outlined"})}))):null};var Xt=e(82108),rn=e.n(Xt);const an=A=>{var Fe;const{hidden:T,initialFilter:N}=A,W=(0,t.useApi)(t.alertApiRef),{error:J,availableTypes:Q,selectedTypes:he,setSelectedTypes:Ce}=St();if((0,o.useEffect)(()=>{J&&W.post({message:"Failed to load entity types",severity:"error"}),N&&Ce([N])},[J,W,N,Ce]),Q.length===0||J)return null;const Oe=[{value:"all",label:"All"},...Q.map(Ze=>({value:Ze,label:rn()(Ze)}))];return T?null:o.createElement(E.Z,{pb:1,pt:1},o.createElement($e.Select,{label:"Type",items:Oe,selected:(Fe=Oe.length>1?he[0]:void 0)!=null?Fe:"all",onChange:Ze=>Ce(Ze==="all"?[]:[String(Ze)])}))};var Bt=e(15459),It=e(61837),cn=e(11640),Sn=e(28347);const on=(0,Bt.Z)({root:{color:"#f3ba37"}})(cn.Z),Rn=A=>{const{toggleStarredEntity:T,isStarredEntity:N}=Nt(A.entity);return o.createElement(It.Z,{"aria-label":"favorite",color:"inherit",...A,onClick:()=>T()},o.createElement(ct.ZP,{title:N?"Remove from favorites":"Add to favorites"},N?o.createElement(on,null):o.createElement(Sn.Z,null)))};var Cn=e(8629),xn=e(79249),wn=e(38724),M=e(99152),h=e(6487),C=e(49429),L=e(55999),V=e(72779),ge=e.n(V),pe=e(39412);const Ie=pe.Z;function et(A,T){if(A)return A.toLocaleLowerCase("en-US");if(T)try{return(0,Pe.of)(T).kind.toLocaleLowerCase("en-US")}catch{return}}function zt(A,T){const N=(0,t.useApp)(),W=et(A,T);return W&&N.getSystemIcon(`kind:${W}`)||Ie}function pn(A){const{kind:T,entityRef:N,...W}=A,J=zt(T,N);return o.createElement(J,{...W})}const kn=(0,nt.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 dr(A){const T=(0,t.useApi)(d),N=(0,Pe.eE)(A),{loading:W,error:J,value:Q}=(0,Ve.default)(async()=>{const he=await T.getEntityAncestors({entityRef:N}),Ce=new Array,Oe=new Array;for(const Fe of he.items){const Ze=(0,Pe.eE)(Fe.entity),ze=Ze===he.rootEntityRef;Ce.push({id:Ze,root:ze,...Fe.entity});for(const Ye of Fe.parentEntityRefs)Oe.push({from:Ze,to:Ye})}return{nodes:Ce,edges:Oe}},[N]);return{loading:W,error:J,nodes:(Q==null?void 0:Q.nodes)||[],edges:(Q==null?void 0:Q.edges)||[]}}function fr({node:A}){const T=kn(),N=(0,We.s0)(),W=(0,t.useRouteRef)(ue),[J,Q]=(0,o.useState)(0),[he,Ce]=(0,o.useState)(0),Oe=(0,o.useRef)(null);(0,o.useLayoutEffect)(()=>{if(Oe.current){let{height:Jt,width:gn}=Oe.current.getBBox();Jt=Math.round(Jt),gn=Math.round(gn),(Jt!==he||gn!==J)&&(Q(gn),Ce(Jt))}},[J,he]);const Fe=10,Ze=he,ze=Ze+Fe,Ye=ze+J+Fe*2,Lt=he+Fe*2,ot=A.metadata.title||(A.kind&&A.metadata.name&&A.metadata.namespace?Ge({kind:A.kind,name:A.metadata.name,namespace:A.metadata.namespace||""}):A.id),je=()=>{N(W({kind:A.kind,namespace:A.metadata.namespace||Pe.zG,name:A.metadata.name}))};return o.createElement("g",{onClick:je,className:T.clickable},o.createElement("rect",{className:ge()(T.node,A.root?"secondary":"primary"),width:Ye,height:Lt,rx:10}),o.createElement(pn,{kind:A.kind,y:Fe,x:Fe,width:Ze,height:Ze,className:ge()(T.text,A.root?"secondary":"primary")}),o.createElement("text",{ref:Oe,className:ge()(T.text,A.root?"secondary":"primary"),y:Lt/2,x:ze+(J+Fe*2)/2,textAnchor:"middle",alignmentBaseline:"middle"},ot))}function mr(A){const{loading:T,error:N,nodes:W,edges:J}=dr(A.entity);return T?o.createElement($e.Progress,null):N?o.createElement($e.ResponseErrorPanel,{error:N}):o.createElement(o.Fragment,null,o.createElement(L.Z,{variant:"h2"},"Ancestry"),o.createElement(L.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($e.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(E.Z,{mt:4},o.createElement($e.DependencyGraph,{nodes:W,edges:J,renderNode:fr,direction:$e.DependencyGraphTypes.Nm.BOTTOM_TOP,zoom:"enable-on-click"})))}var Gn=e(11776),$n=e(38402),er=e(86136),hr=e(99688),Lr=e(49378),la=e(54506),tr=e(94339),Or=e(24579),xr=e(27685);const ir=(0,nt.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 Un(A){const T=ir();return o.createElement(Lr.Z,{...A,primaryTypographyProps:{className:T.monospace},secondaryTypographyProps:{className:T.monospace}})}function nr(A){const T=ir();return o.createElement(la.Z,{className:T.monospace},A.children)}function rr(A){return o.createElement(E.Z,{mt:2},o.createElement(tr.Z,{variant:"outlined"},o.createElement(Or.Z,null,o.createElement(S.Z,{variant:"h6",gutterBottom:!0},A.title,A.helpLink&&o.createElement(pr,{to:A.helpLink})),A.children)))}function Gr(A){if(A.match(/^url:https?:\/\//))return A.slice(4);if(A.match(/^https?:\/\//))return A}function gr(A){const[T,N]=A.entry,W=Gr(N);return o.createElement($n.Z,null,A.indent&&o.createElement(er.Z,null),o.createElement(Un,{primary:T,secondary:W?o.createElement($e.Link,{to:W},N):N}))}function pr(A){const T=ir();return o.createElement($e.Link,{to:A.to,className:T.helpIcon},o.createElement(xr.Z,{fontSize:"inherit"}))}const Kr=(0,nt.Z)({root:{display:"flex",flexDirection:"column"}});function kr(A){var Oe,Fe;const T=(0,t.useApi)(d),N=(0,Pe.eE)(A),W=(Oe=A.metadata.annotations)==null?void 0:Oe[Pe.P1],J=(Fe=A.metadata.annotations)==null?void 0:Fe[Pe.q1],{loading:Q,error:he,value:Ce}=(0,Ve.default)(async()=>!W&&!J?[]:(await T.getEntities({filter:[...W?[{[`metadata.annotations.${Pe.P1}`]:W}]:[],...J?[{[`metadata.annotations.${Pe.q1}`]:J}]:[]]})).items,[W,J]);return{loading:Q,error:he,location:W,originLocation:J,colocatedEntities:Ce==null?void 0:Ce.filter(Ze=>(0,Pe.eE)(Ze)!==N)}}function lr(A){return o.createElement(Gn.Z,{dense:!0},A.header&&o.createElement(gr,{key:"header",entry:A.header}),A.entities.map(T=>o.createElement($n.Z,{key:(0,Pe.eE)(T)},o.createElement(er.Z,null,o.createElement(pn,{kind:T.kind})),o.createElement(Un,{primary:o.createElement(Y,{entityRef:T})}))))}function Dr(A){const{entity:T}=A,{loading:N,error:W,location:J,originLocation:Q,colocatedEntities:he}=kr(T);if(N)return o.createElement($e.Progress,null);if(W)return o.createElement($e.ResponseErrorPanel,{error:W});if(!J&&!Q)return o.createElement(hr.Z,{severity:"warning"},"Entity had no location information.");if(!(he!=null&&he.length))return o.createElement(hr.Z,{severity:"info"},"There were no other entities on this location.");if(J===Q)return o.createElement(lr,{entities:he});const Ce=he.filter(Fe=>{var Ze;return((Ze=Fe.metadata.annotations)==null?void 0:Ze[Pe.P1])===J}),Oe=he.filter(Fe=>{var Ze;return((Ze=Fe.metadata.annotations)==null?void 0:Ze[Pe.q1])===Q});return o.createElement(o.Fragment,null,Ce.length>0&&o.createElement(lr,{entities:Ce,header:["At the same location",J]}),Oe.length>0&&o.createElement(lr,{entities:Oe,header:["At the same origin",Q]}))}function Yr(A){const T=Kr();return o.createElement(o.Fragment,null,o.createElement(L.Z,{variant:"h2"},"Colocated"),o.createElement(L.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(Dr,{entity:A.entity})))}function yr(A){return Object.fromEntries([...Object.entries(A)].sort((T,N)=>T[0]<N[0]?-1:1))}function Fr(A){return o.createElement(o.Fragment,null,o.createElement(L.Z,{variant:"h2"},"Entity as JSON"),o.createElement(L.Z,null,"This is the raw entity data as received from the catalog, on JSON form."),o.createElement(L.Z,null,o.createElement("div",{style:{fontSize:"75%"},"data-testid":"code-snippet"},o.createElement($e.CodeSnippet,{text:JSON.stringify(yr(A.entity),void 0,2),language:"json",showCopyCodeButton:!0}))))}var Br=e(3440),Mr=e.n(Br);const Er=(0,nt.Z)({root:{display:"flex",flexDirection:"column"}});function wr(A){var Fe,Ze;const T=Er(),{apiVersion:N,kind:W,metadata:J,spec:Q,relations:he=[],status:Ce={}}=A.entity,Oe=Mr()(oe()(he,ze=>ze.targetRef),"type");return o.createElement(o.Fragment,null,o.createElement(L.Z,{variant:"h2"},"Overview"),o.createElement("div",{className:T.root},o.createElement(rr,{title:"Identity"},o.createElement(Gn.Z,{dense:!0},o.createElement($n.Z,null,o.createElement(Un,{primary:"apiVersion",secondary:N})),o.createElement($n.Z,null,o.createElement(Un,{primary:"kind",secondary:W})),(Q==null?void 0:Q.type)&&o.createElement($n.Z,null,o.createElement(Un,{primary:"spec.type",secondary:Q.type})),J.uid&&o.createElement($n.Z,null,o.createElement(Un,{primary:"uid",secondary:J.uid})),J.etag&&o.createElement($n.Z,null,o.createElement(Un,{primary:"etag",secondary:J.etag})))),o.createElement(rr,{title:"Metadata"},!!Object.keys(J.annotations||{}).length&&o.createElement(Gn.Z,{dense:!0,subheader:o.createElement(nr,null,"Annotations",o.createElement(pr,{to:"https://backstage.io/docs/features/software-catalog/well-known-annotations"}))},Object.entries(J.annotations).map(ze=>o.createElement(gr,{key:ze[0],indent:!0,entry:ze}))),!!Object.keys(J.labels||{}).length&&o.createElement(Gn.Z,{dense:!0,subheader:o.createElement(nr,null,"Labels")},Object.entries(J.labels).map(ze=>o.createElement(gr,{key:ze[0],indent:!0,entry:ze}))),!!((Fe=J.tags)!=null&&Fe.length)&&o.createElement(Gn.Z,{dense:!0,subheader:o.createElement(nr,null,"Tags")},J.tags.map((ze,Ye)=>o.createElement($n.Z,{key:`${ze}-${Ye}`},o.createElement(er.Z,null),o.createElement(Un,{primary:ze}))))),!!he.length&&o.createElement(rr,{title:"Relations",helpLink:"https://backstage.io/docs/features/software-catalog/well-known-relations"},Object.entries(Oe).map(([ze,Ye],Lt)=>o.createElement("div",{key:Lt},o.createElement(Gn.Z,{dense:!0,subheader:o.createElement(nr,null,ze)},Ye.map(ot=>o.createElement($n.Z,{key:ot.targetRef},o.createElement(er.Z,null,o.createElement(pn,{entityRef:ot.targetRef})),o.createElement(Un,{primary:o.createElement(Y,{entityRef:ot.targetRef})}))))))),!!((Ze=Ce.items)!=null&&Ze.length)&&o.createElement(rr,{title:"Status",helpLink:"https://backstage.io/docs/features/software-catalog/well-known-statuses"},Ce.items.map((ze,Ye)=>o.createElement("div",{key:Ye},o.createElement(S.Z,null,ze.level,": ",ze.type),o.createElement(E.Z,{ml:2},ze.message))))))}var vr=e(72847);function yn(A){return o.createElement(o.Fragment,null,o.createElement(L.Z,{variant:"h2"},"Entity as YAML"),o.createElement(L.Z,null,"This is the raw entity data as received from the catalog, on YAML form."),o.createElement(L.Z,null,o.createElement("div",{style:{fontSize:"75%"},"data-testid":"code-snippet"},o.createElement($e.CodeSnippet,{text:vr.ZP.stringify(yr(A.entity)),language:"yaml",showCopyCodeButton:!0}))))}const un=(0,nt.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 Yn(A){const{children:T,value:N,index:W,...J}=A,Q=un();return o.createElement("div",{role:"tabpanel",hidden:N!==W,id:`vertical-tabpanel-${W}`,"aria-labelledby":`vertical-tab-${W}`,className:Q.tabContents,...J},N===W&&o.createElement(E.Z,{pl:3,pr:3},T))}function Jn(A){return{id:`vertical-tab-${A}`,"aria-controls":`vertical-tabpanel-${A}`}}function $r(A){const T=un(),[N,W]=o.useState(0);return(0,o.useEffect)(()=>{W(0)},[A.open]),A.entity?o.createElement(Cn.Z,{fullWidth:!0,maxWidth:"xl",open:A.open,onClose:A.onClose,"aria-labelledby":"entity-inspector-dialog-title",PaperProps:{className:T.fullHeightDialog}},o.createElement(xn.Z,{id:"entity-inspector-dialog-title"},"Entity Inspector"),o.createElement(wn.Z,{dividers:!0},o.createElement("div",{className:T.root},o.createElement(M.Z,{orientation:"vertical",variant:"scrollable",value:N,onChange:(J,Q)=>W(Q),"aria-label":"Inspector options",className:T.tabs},o.createElement(h.Z,{label:"Overview",...Jn(0)}),o.createElement(h.Z,{label:"Ancestry",...Jn(1)}),o.createElement(h.Z,{label:"Colocated",...Jn(2)}),o.createElement(h.Z,{label:"Raw JSON",...Jn(3)}),o.createElement(h.Z,{label:"Raw YAML",...Jn(4)})),o.createElement(Yn,{value:N,index:0},o.createElement(wr,{entity:A.entity})),o.createElement(Yn,{value:N,index:1},o.createElement(mr,{entity:A.entity})),o.createElement(Yn,{value:N,index:2},o.createElement(Yr,{entity:A.entity})),o.createElement(Yn,{value:N,index:3},o.createElement(Fr,{entity:A.entity})),o.createElement(Yn,{value:N,index:4},o.createElement(yn,{entity:A.entity})))),o.createElement(C.Z,null,o.createElement(y.Z,{onClick:A.onClose,color:"primary"},"Close"))):null}var Ar=e(85256);function Ur(A){var Lt;const T=(0,t.useApi)(d),N=(Lt=A.metadata.annotations)==null?void 0:Lt[Pe.q1],W=A.metadata.uid,J=N==="bootstrap:bootstrap",Q=(0,Ve.default)(async()=>{const ot=T.getLocationByRef(N);let je;if(!N)je=Promise.resolve([]);else{const Jt=`metadata.annotations.${Pe.q1}`;je=T.getEntities({filter:{[Jt]:N},fields:["kind","metadata.uid","metadata.name","metadata.namespace"]}).then(gn=>gn.items)}return Promise.all([ot,je]).then(([Jt,gn])=>({location:Jt,colocatedEntities:gn}))},[T,A]),he=(0,o.useCallback)(async function(){const{location:je}=Q.value;await T.removeLocationById(je.id)},[T,Q]),Ce=(0,o.useCallback)(async function(){await T.removeEntityByUid(W)},[T,W]);if(J)return{type:"bootstrap",location:N,deleteEntity:Ce};const{loading:Oe,error:Fe,value:Ze}=Q;if(Oe)return{type:"loading"};if(Fe)return{type:"error",error:Fe};const{location:ze,colocatedEntities:Ye}=Ze;return ze?{type:"unregister",location:N,colocatedEntities:Ye.map(Pe.iB),unregisterLocation:he,deleteEntity:Ce}:{type:"only-delete",deleteEntity:Ce}}var Rr=e(10179);const Nr=(0,nt.Z)({advancedButton:{fontSize:"0.7em"}}),Sr=({entity:A,onConfirm:T})=>{var Lt;const N=(0,t.useApi)(t.alertApiRef),W=(0,t.useApi)(t.configApiRef),J=Nr(),Q=Ur(A),[he,Ce]=(0,o.useState)(!1),[Oe,Fe]=(0,o.useState)(!1),Ze=(Lt=W.getOptionalString("app.title"))!=null?Lt:"Backstage",ze=(0,o.useCallback)(async function(){if("unregisterLocation"in Q){Fe(!0);try{await Q.unregisterLocation(),T()}catch(je){(0,Rr.BD)(je),N.post({message:je.message})}finally{Fe(!1)}}},[N,T,Q]),Ye=(0,o.useCallback)(async function(){if("deleteEntity"in Q){Fe(!0);try{await Q.deleteEntity(),T()}catch(je){(0,Rr.BD)(je),N.post({message:je.message})}finally{Fe(!1)}}},[N,T,Q]);return Q.type==="loading"?o.createElement($e.Progress,null):Q.type==="error"?o.createElement($e.ResponseErrorPanel,{error:Q.error}):Q.type==="bootstrap"?o.createElement(o.Fragment,null,o.createElement(hr.Z,{severity:"info"},'You cannot unregister this entity, since it originates from a protected Backstage configuration (location "',Q.location,'"). If you believe this is in error, please contact the ',Ze," ","integrator."),o.createElement(E.Z,{marginTop:2},!he&&o.createElement(y.Z,{variant:"text",size:"small",color:"primary",className:J.advancedButton,onClick:()=>Ce(!0)},"Advanced Options"),he&&o.createElement(o.Fragment,null,o.createElement(L.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(y.Z,{variant:"contained",color:"secondary",disabled:Oe,onClick:Ye},"Delete Entity")))):Q.type==="only-delete"?o.createElement(o.Fragment,null,o.createElement(L.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(y.Z,{variant:"contained",color:"secondary",disabled:Oe,onClick:Ye},"Delete Entity")):Q.type==="unregister"?o.createElement(o.Fragment,null,o.createElement(L.Z,null,"This action will unregister the following entities:"),o.createElement(L.Z,{component:"ul"},Q.colocatedEntities.map(ot=>o.createElement("li",{key:`${ot.kind}:${ot.namespace}/${ot.name}`},o.createElement(Y,{entityRef:ot})))),o.createElement(L.Z,null,"Located at the following location:"),o.createElement(L.Z,{component:"ul"},o.createElement("li",null,Q.location)),o.createElement(L.Z,null,"To undo, just re-register the entity in ",Ze,"."),o.createElement(E.Z,{marginTop:2},o.createElement(y.Z,{variant:"contained",color:"secondary",disabled:Oe,onClick:ze},"Unregister Location"),!he&&o.createElement(E.Z,{component:"span",marginLeft:2},o.createElement(y.Z,{variant:"text",size:"small",color:"primary",className:J.advancedButton,onClick:()=>Ce(!0)},"Advanced Options"))),he&&o.createElement(o.Fragment,null,o.createElement(E.Z,{paddingTop:4,paddingBottom:4},o.createElement(Ar.Z,null)),o.createElement(L.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(y.Z,{variant:"contained",color:"secondary",disabled:Oe,onClick:Ye},"Delete Entity"))):o.createElement(hr.Z,{severity:"error"},"Internal error: Unknown state")},cr=A=>{const{open:T,onConfirm:N,onClose:W,entity:J}=A;return o.createElement(Cn.Z,{open:T,onClose:W},o.createElement(xn.Z,{id:"responsive-dialog-title"},"Are you sure you want to unregister this entity?"),o.createElement(wn.Z,null,o.createElement(Sr,{entity:J,onConfirm:N})),o.createElement(C.Z,null,o.createElement(y.Z,{onClick:W,color:"primary"},"Cancel")))};var Jr=e(12231),I=e(9520),k=e(47603);const de=(0,nt.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:k.Z},{id:"starred",label:"Starred",icon:cn.Z}]},{name:A!=null?A:"Company",items:[{id:"all",label:"All"}]}]}const tt=A=>{var Xn;const{initialFilter:T,availableFilters:N}=A,W=de(),Q=(Xn=(0,t.useApi)(t.configApiRef).getOptionalString("organization.name"))!=null?Xn:"Company",{filters:he,updateFilters:Ce,backendEntities:Oe,queryParameters:{kind:Fe,user:Ze},loading:ze}=we(),Ye=["starred","all"],Lt=De(Q).map(bn=>({...bn,items:bn.items.filter(({id:Fn})=>["group","user"].some(zr=>zr===Fe)?Ye.includes(Fn):!N||N.includes(Fn))})).filter(({items:bn})=>!!bn.length),{isStarredEntity:ot}=Pt(),{isOwnedEntity:je,loading:Jt}=mn(),gn=ze||Jt,Qn=(0,o.useMemo)(()=>new _e("owned",je,ot),[je,ot]),Dn=(0,o.useMemo)(()=>new _e("starred",je,ot),[je,ot]),vn=(0,o.useMemo)(()=>[Ze].flat()[0],[Ze]),[Tn,Nn]=(0,o.useState)(vn!=null?vn:T),Cr=(0,o.useMemo)(()=>Oe.filter(yt((0,Ee.compact)(Object.values({...he,user:void 0})))),[he,Oe]),Zr=(0,o.useMemo)(()=>({all:Cr.length,starred:Cr.filter(bn=>Dn.filterEntity(bn)).length,owned:Cr.filter(bn=>Qn.filterEntity(bn)).length}),[Cr,Dn,Qn]);return(0,o.useEffect)(()=>{vn&&Nn(vn)},[vn]),(0,o.useEffect)(()=>{!gn&&!!Tn&&Tn!=="all"&&Zr[Tn]===0&&Nn("all")},[gn,Zr,Tn,Nn]),(0,o.useEffect)(()=>{Ce({user:Tn?new _e(Tn,je,ot):void 0})},[Tn,je,ot,Ce]),o.createElement(tr.Z,{className:W.root},Lt.map(bn=>o.createElement(o.Fragment,{key:bn.name},o.createElement(S.Z,{variant:"subtitle2",component:"span",className:W.title},bn.name),o.createElement(tr.Z,{className:W.groupWrapper},o.createElement(Gn.Z,{disablePadding:!0,dense:!0,role:"menu","aria-label":bn.name},bn.items.map(Fn=>{var zr,ca;return o.createElement(Jr.Z,{role:"none presentation",key:Fn.id,button:!0,divider:!0,onClick:()=>Nn(Fn.id),selected:Fn.id===((zr=he.user)==null?void 0:zr.value),className:W.menuItem,disabled:Zr[Fn.id]===0,"data-testid":`user-picker-${Fn.id}`,tabIndex:0,ContainerProps:{role:"menuitem"}},Fn.icon&&o.createElement(er.Z,{className:W.listIcon},o.createElement(Fn.icon,{fontSize:"small"})),o.createElement(Lr.Z,null,o.createElement(S.Z,{variant:"body1"},Fn.label," ")),o.createElement(I.Z,null,(ca=Zr[Fn.id])!=null?ca:"-"))}))))))},gt=(0,nt.Z)({input:{}},{name:"CatalogReactEntityProcessingStatusPickerPicker"}),At=o.createElement(rt.Z,{fontSize:"small"}),xt=o.createElement(Ke.Z,{fontSize:"small"}),dt=()=>{const A=gt(),{updateFilters:T}=we(),[N,W]=(0,o.useState)([]);function J(Ce){T({orphan:Ce?new ke(Ce):void 0})}function Q(Ce){T({error:Ce?new Et(Ce):void 0})}const he=["Is Orphan","Has Error"];return o.createElement(E.Z,{pb:1,pt:1},o.createElement(S.Z,{variant:"button",component:"label"},"Processing Status",o.createElement(Rt.ZP,{multiple:!0,options:he,value:N,onChange:(Ce,Oe)=>{W(Oe),J(Oe.includes("Is Orphan")),Q(Oe.includes("Has Error"))},renderOption:(Ce,{selected:Oe})=>o.createElement(ce.Z,{control:o.createElement(j.Z,{icon:At,checkedIcon:xt,checked:Oe}),label:Ce}),size:"small",popupIcon:o.createElement(it.Z,{"data-testid":"processing-status-picker-expand"}),renderInput:Ce=>o.createElement(ye.Z,{...Ce,className:A.input,variant:"outlined"})})))},jt=({children:A,value:T})=>{var Ce;const[N,W]=useState((Ce=T==null?void 0:T.filters)!=null?Ce:{}),J=useCallback(Oe=>{W(Fe=>{const Ze=typeof Oe=="function"?Oe(Fe):Oe;return{...Fe,...Ze}})},[]),Q=useMemo(()=>({entities:[],backendEntities:[],queryParameters:{}}),[]),he=useMemo(()=>{var Oe,Fe,Ze,ze,Ye;return{entities:(Oe=T==null?void 0:T.entities)!=null?Oe:Q.entities,backendEntities:(Fe=T==null?void 0:T.backendEntities)!=null?Fe:Q.backendEntities,updateFilters:(Ze=T==null?void 0:T.updateFilters)!=null?Ze:J,filters:N,loading:(ze=T==null?void 0:T.loading)!=null?ze:!1,queryParameters:(Ye=T==null?void 0:T.queryParameters)!=null?Ye:Q.queryParameters,error:T==null?void 0:T.error}},[T,Q,N,J]);return React.createElement(EntityListContext.Provider,{value:he},A)}},39398:function(ee,s,e){"use strict";e.r(s),e.d(s,{AboutCard:function(){return xe},AboutContent:function(){return Ee},AboutField:function(){return $}});var r=e(48023),t=e(82339),d=e(36964),i=e(36356),R=e(17429),c=e(79692),o=e(94339),u=e(32552),m=e(61837),y=e(85256),g=e(24579),E=e(52866),S=e(30254),b=e(27604),x=e(2784),w=e(47851),B=e(60905),F=e(90436),O=e(7089);const D=(0,c.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 $(We){const{label:Re,value:Je,gridSizes:at,children:Tt}=We,yt=D(),Pe=(0,d.useElementFilter)(Tt,qe=>qe.getElements()),mt=Pe.length>0?Pe:x.createElement(F.Z,{variant:"body2",className:yt.value},Je||"unknown");return x.createElement(B.Z,{item:!0,...at},x.createElement(F.Z,{variant:"h2",className:yt.label},Re),mt)}var K=e(45915);const ne=(0,c.Z)({description:{wordBreak:"break-word"}});function se(We,Re,Je){if(Re==="url"||We.includes("://"))return We;const at=Je.type==="file"?`file://${Je.target}`:Je.target;return Re==="file"||Je.type==="file"?new URL(We,at).href:at}function Ee(We){var Qe,Ct,oe,ue,Xe,Ge,$e,ct;const{entity:Re}=We,Je=ne(),at=Re.kind.toLocaleLowerCase("en-US")==="system",Tt=Re.kind.toLocaleLowerCase("en-US")==="resource",yt=Re.kind.toLocaleLowerCase("en-US")==="component",Pe=Re.kind.toLocaleLowerCase("en-US")==="api",mt=Re.kind.toLocaleLowerCase("en-US")==="template",qe=Re.kind.toLocaleLowerCase("en-US")==="location",le=Re.kind.toLocaleLowerCase("en-US")==="group",fe=(0,R.getEntityRelations)(Re,r.cz,{kind:"system"}),Me=(0,R.getEntityRelations)(Re,r.cz,{kind:"component"}),we=(0,R.getEntityRelations)(Re,r.cz,{kind:"domain"}),Ve=(0,R.getEntityRelations)(Re,r.S4);let lt;try{lt=(0,r.CV)(Re)}catch{lt=void 0}return x.createElement(B.Z,{container:!0},x.createElement($,{label:"Description",gridSizes:{xs:12}},x.createElement(F.Z,{variant:"body2",paragraph:!0,className:Je.description},((Qe=Re==null?void 0:Re.metadata)==null?void 0:Qe.description)||"No description")),x.createElement($,{label:"Owner",value:"No Owner",gridSizes:{xs:12,sm:6,lg:4}},Ve.length>0&&x.createElement(R.EntityRefLinks,{entityRefs:Ve,defaultKind:"group"})),(at||we.length>0)&&x.createElement($,{label:"Domain",value:"No Domain",gridSizes:{xs:12,sm:6,lg:4}},we.length>0&&x.createElement(R.EntityRefLinks,{entityRefs:we,defaultKind:"domain"})),(Pe||yt||Tt||fe.length>0)&&x.createElement($,{label:"System",value:"No System",gridSizes:{xs:12,sm:6,lg:4}},fe.length>0&&x.createElement(R.EntityRefLinks,{entityRefs:fe,defaultKind:"system"})),yt&&Me.length>0&&x.createElement($,{label:"Parent Component",value:"No Parent Component",gridSizes:{xs:12,sm:6,lg:4}},x.createElement(R.EntityRefLinks,{entityRefs:Me,defaultKind:"component"})),(Pe||yt||Tt||mt||le||qe||typeof((Ct=Re==null?void 0:Re.spec)==null?void 0:Ct.type)=="string")&&x.createElement($,{label:"Type",value:(oe=Re==null?void 0:Re.spec)==null?void 0:oe.type,gridSizes:{xs:12,sm:6,lg:4}}),(Pe||yt||typeof((ue=Re==null?void 0:Re.spec)==null?void 0:ue.lifecycle)=="string")&&x.createElement($,{label:"Lifecycle",value:(Xe=Re==null?void 0:Re.spec)==null?void 0:Xe.lifecycle,gridSizes:{xs:12,sm:6,lg:4}}),x.createElement($,{label:"Tags",value:"No Tags",gridSizes:{xs:12,sm:6,lg:4}},(((Ge=Re==null?void 0:Re.metadata)==null?void 0:Ge.tags)||[]).map(Y=>x.createElement(O.Z,{key:Y,size:"small",label:Y}))),qe&&((($e=Re==null?void 0:Re.spec)==null?void 0:$e.targets)||((ct=Re==null?void 0:Re.spec)==null?void 0:ct.target))&&x.createElement($,{label:"Targets",gridSizes:{xs:12}},x.createElement(K.s,{cols:1,items:(Re.spec.targets||[Re.spec.target]).map(Y=>Y).map(Y=>{var Z;return{text:Y,href:se(Y,((Z=Re==null?void 0:Re.spec)==null?void 0:Z.type)||"unknown",lt)}})})))}const Ue=(0,c.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 xe(We){var oe,ue,Xe;const{variant:Re}=We,Je=Ue(),{entity:at}=(0,R.useEntity)(),Tt=(0,d.useApi)(i.q3),yt=(0,d.useApi)(R.catalogApiRef),Pe=(0,d.useApi)(d.alertApiRef),mt=(0,d.useRouteRef)(w.jU),qe=(0,R.getEntitySourceLocation)(at,Tt),le=(oe=at.metadata.annotations)==null?void 0:oe[r.Tf],fe={label:"View Source",disabled:!qe,icon:x.createElement(i.nW,{type:qe==null?void 0:qe.integrationType}),href:qe==null?void 0:qe.locationTargetUrl},Me={label:"View TechDocs",disabled:!((ue=at.metadata.annotations)!=null&&ue["backstage.io/techdocs-ref"])||!mt,icon:x.createElement(S.Z,null),href:mt&&mt({namespace:at.metadata.namespace||r.zG,kind:at.kind,name:at.metadata.name})};let we="";Re==="gridItem"?we=Je.gridItemCard:Re==="fullHeight"&&(we=Je.fullHeightCard);let Ve="";Re==="gridItem"?Ve=Je.gridItemCardContent:Re==="fullHeight"&&(Ve=Je.fullHeightCardContent);const lt=(Xe=at.metadata.annotations)==null?void 0:Xe[r.P1],Qe=(lt==null?void 0:lt.startsWith("url:"))||(lt==null?void 0:lt.startsWith("file:")),Ct=(0,x.useCallback)(async()=>{await yt.refreshEntity((0,r.eE)(at)),Pe.post({message:"Refresh scheduled",severity:"info"})},[yt,Pe,at]);return x.createElement(o.Z,{className:we},x.createElement(u.Z,{title:"About",action:x.createElement(x.Fragment,null,Qe&&x.createElement(m.Z,{"aria-label":"Refresh",title:"Schedule entity refresh",onClick:Ct},x.createElement(E.Z,null)),x.createElement(m.Z,{component:t.Link,"aria-label":"Edit",disabled:!le,title:"Edit Metadata",to:le!=null?le:"#"},x.createElement(b.Z,null))),subheader:x.createElement(t.HeaderIconLinkRow,{links:[fe,Me]})}),x.createElement(y.Z,null),x.createElement(g.Z,{className:Ve},x.createElement(Ee,{entity:at})))}},49782:function(ee,s,e){"use strict";e.d(s,{K:function(){return E}});var r=e(2784),t=e(79692),d=e(12420),i=e(97580),R=e(73698),c=e(74603),o=e(12231),u=e(17429),m=e(64279),y=e(36964);const g=(0,t.Z)(S=>(0,d.Z)({root:{...S.typography.h4}}));function E(S){var Ue;const{initialFilter:b="component",allowedKinds:x}=S,w=g(),B=(0,y.useApi)(u.catalogApiRef),{value:F}=(0,m.default)(async()=>await B.getEntityFacets({facets:["kind"]}).then(xe=>{var We;return((We=xe.facets.kind)==null?void 0:We.map(Re=>Re.value).sort())||[]})),{updateFilters:O,queryParameters:{kind:D}}=(0,u.useEntityList)(),$=(0,r.useMemo)(()=>{var xe;return(xe=[D].flat()[0])==null?void 0:xe.toLocaleLowerCase("en-US")},[D]),[K,ne]=(0,r.useState)($!=null?$:b);(0,r.useEffect)(()=>{O({kind:K?new u.EntityKindFilter(K):void 0})},[K,O]),(0,r.useEffect)(()=>{$&&ne($)},[$]);const Ee=[(0,i.Z)(K)].concat((Ue=F==null?void 0:F.filter(xe=>x?x.some(We=>We.toLocaleLowerCase("en-US")===xe.toLocaleLowerCase("en-US")):!0))!=null?Ue:[]).sort().reduce((xe,We)=>(xe[We.toLocaleLowerCase("en-US")]=We,xe),{});return r.createElement(R.Z,{input:r.createElement(c.Z,{value:K}),value:K,onChange:xe=>ne(xe.target.value),classes:w},Object.keys(Ee).map(xe=>r.createElement(o.Z,{value:xe,key:xe},`${Ee[xe]}s`)))}},30097:function(ee,s,e){"use strict";e.d(s,{E:function(){return x}});var r=e(48023),t=e(17429),d=e(27604),i=e(2997),R=e(76635),c=e(2784),o=e(7089),u=e(82339);const m=Object.freeze({createNameColumn(w){function B(F){var O;return((O=F.metadata)==null?void 0:O.title)||(0,t.humanizeEntityRef)(F,{defaultKind:w==null?void 0:w.defaultKind})}return{title:"Name",field:"resolved.name",highlight:!0,customSort({entity:F},{entity:O}){return B(F).localeCompare(B(O))},render:({entity:F})=>{var O;return c.createElement(t.EntityRefLink,{entityRef:F,defaultKind:(w==null?void 0:w.defaultKind)||"Component",title:(O=F.metadata)==null?void 0:O.title})}}},createSystemColumn(){return{title:"System",field:"resolved.partOfSystemRelationTitle",render:({resolved:w})=>c.createElement(t.EntityRefLinks,{entityRefs:w.partOfSystemRelations,defaultKind:"system"})}},createOwnerColumn(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:w})=>c.createElement(t.EntityRefLinks,{entityRefs:w.ownedByRelations,defaultKind:"group"})}},createSpecTargetsColumn(){return{title:"Targets",field:"entity.spec.targets",render:({entity:w})=>{var B,F;return c.createElement(c.Fragment,null,(((B=w==null?void 0:w.spec)==null?void 0:B.targets)||((F=w==null?void 0:w.spec)==null?void 0:F.target))&&c.createElement(u.OverflowTooltip,{text:(w.spec.targets||[w.spec.target]).join(", "),placement:"bottom-start"}))}}},createSpecTypeColumn(){return{title:"Type",field:"entity.spec.type",hidden:!0,width:"auto"}},createSpecLifecycleColumn(){return{title:"Lifecycle",field:"entity.spec.lifecycle"}},createMetadataDescriptionColumn(){return{title:"Description",field:"entity.metadata.description",render:({entity:w})=>c.createElement(u.OverflowTooltip,{text:w.metadata.description,placement:"bottom-start"}),width:"auto"}},createTagsColumn(){return{title:"Tags",field:"entity.metadata.tags",cellStyle:{padding:"0px 16px 0px 20px"},render:({entity:w})=>c.createElement(c.Fragment,null,w.metadata.tags&&w.metadata.tags.map(B=>c.createElement(o.Z,{key:B,label:B,size:"small",variant:"outlined",style:{marginBottom:"0px"}}))),width:"auto"}},createTitleColumn(w){return{title:"Title",field:"entity.metadata.title",hidden:w==null?void 0:w.hidden,searchable:!0}}});var y=e(28347),g=e(15459),E=e(11640),S=e(90436);const b=(0,g.Z)({root:{color:"#f3ba37"}})(E.Z),x=w=>{var yt,Pe,mt;const{columns:B,actions:F,tableOptions:O}=w,{isStarredEntity:D,toggleStarredEntity:$}=(0,t.useStarredEntities)(),{loading:K,error:ne,entities:se,filters:Ee}=(0,t.useEntityList)(),Ue=(0,c.useMemo)(()=>{var le;return[m.createTitleColumn({hidden:!0}),m.createNameColumn({defaultKind:(le=Ee.kind)==null?void 0:le.value}),...qe(),m.createMetadataDescriptionColumn(),m.createTagsColumn()];function qe(){var fe;switch((fe=Ee.kind)==null?void 0:fe.value){case"user":return[];case"domain":case"system":return[m.createOwnerColumn()];case"group":case"template":return[m.createSpecTypeColumn()];case"location":return[m.createSpecTypeColumn(),m.createSpecTargetsColumn()];default:return[m.createSystemColumn(),m.createOwnerColumn(),m.createSpecTypeColumn(),m.createSpecLifecycleColumn()]}}},[(yt=Ee.kind)==null?void 0:yt.value]),xe=Ee.type===void 0,We=(0,R.capitalize)((mt=(Pe=Ee.user)==null?void 0:Pe.value)!=null?mt:"all");if(ne)return c.createElement("div",null,c.createElement(u.WarningPanel,{severity:"error",title:"Could not fetch catalog entities."},c.createElement(u.CodeSnippet,{language:"text",text:ne.toString()})));const Re=[({entity:qe})=>{var Me;const le=(Me=qe.metadata.annotations)==null?void 0:Me[r.l2],fe="View";return{icon:()=>c.createElement(c.Fragment,null,c.createElement(S.Z,{variant:"srOnly"},fe),c.createElement(i.Z,{fontSize:"small"})),tooltip:fe,disabled:!le,onClick:()=>{!le||window.open(le,"_blank")}}},({entity:qe})=>{var Me;const le=(Me=qe.metadata.annotations)==null?void 0:Me[r.Tf],fe="Edit";return{icon:()=>c.createElement(c.Fragment,null,c.createElement(S.Z,{variant:"srOnly"},fe),c.createElement(d.Z,{fontSize:"small"})),tooltip:fe,disabled:!le,onClick:()=>{!le||window.open(le,"_blank")}}},({entity:qe})=>{const le=D(qe),fe=le?"Remove from favorites":"Add to favorites";return{cellStyle:{paddingLeft:"1em"},icon:()=>c.createElement(c.Fragment,null,c.createElement(S.Z,{variant:"srOnly"},fe),le?c.createElement(b,null):c.createElement(y.Z,null)),tooltip:fe,onClick:()=>$(qe)}}],Je=se.map(qe=>{const le=(0,t.getEntityRelations)(qe,r.cz,{kind:"system"}),fe=(0,t.getEntityRelations)(qe,r.S4);return{entity:qe,resolved:{name:(0,t.humanizeEntityRef)(qe,{defaultKind:"Component"}),ownedByRelationsTitle:fe.map(Me=>(0,t.humanizeEntityRef)(Me,{defaultKind:"group"})).join(", "),ownedByRelations:fe,partOfSystemRelationTitle:le.map(Me=>(0,t.humanizeEntityRef)(Me,{defaultKind:"system"})).join(", "),partOfSystemRelations:le}}}),at=(B||Ue).find(qe=>qe.title==="Type");at&&(at.hidden=!xe);const Tt=Je.length>20;return c.createElement(u.Table,{isLoading:K,columns:B||Ue,options:{paging:Tt,pageSize:20,actionsColumnIndex:-1,loadingType:"linear",showEmptyDataSourceMessage:!K,padding:"dense",pageSizeOptions:[20,50,100],...O},title:`${We} (${se.length})`,data:Je,actions:F||Re})};x.columns=m},45915:function(ee,s,e){"use strict";e.d(s,{s:function(){return b}});var r=e(90348),t=e(11861),d=e(2784),i=e(79692),R=e(95544),c=e(90436),o=e(52160),u=e(82339);const m=(0,i.Z)({svgIcon:{display:"inline-block","& svg":{display:"inline-block",fontSize:"inherit",verticalAlign:"baseline"}}});function y(x){const{href:w,text:B,Icon:F}=x,O=m();return d.createElement(R.Z,{display:"flex"},d.createElement(R.Z,{mr:1,className:O.svgIcon},d.createElement(c.Z,{component:"div"},F?d.createElement(F,null):d.createElement(o.Z,null))),d.createElement(R.Z,{flexGrow:"1"},d.createElement(u.Link,{to:w,target:"_blank",rel:"noopener"},B||w)))}var g=e(41156);const E={xs:1,sm:1,md:1,lg:2,xl:3};function S(x){var F,O;const w=[(0,g.Z)(D=>D.breakpoints.up("xl"))?"xl":null,(0,g.Z)(D=>D.breakpoints.up("lg"))?"lg":null,(0,g.Z)(D=>D.breakpoints.up("md"))?"md":null,(0,g.Z)(D=>D.breakpoints.up("sm"))?"sm":null,(0,g.Z)(D=>D.breakpoints.up("xs"))?"xs":null];let B=1;if(typeof x=="number")B=x;else{const D=(F=w.find($=>$!==null))!=null?F:"xs";B=(O=x==null?void 0:x[D])!=null?O:E[D]}return B}function b(x){const{items:w,cols:B=void 0}=x,F=S(B);return d.createElement(r.Z,{rowHeight:"auto",cols:F},w.map(({text:O,href:D,Icon:$},K)=>d.createElement(t.Z,{key:K},d.createElement(y,{href:D,text:O!=null?O:D,Icon:$}))))}},47851:function(ee,s,e){"use strict";e.d(s,{_Z:function(){return i},jU:function(){return d},yw:function(){return t}});var r=e(36964);const t=(0,r.createExternalRouteRef)({id:"create-component",optional:!0}),d=(0,r.createExternalRouteRef)({id:"view-techdoc",optional:!0,params:["namespace","kind","name"]}),i=(0,r.createRouteRef)({id:"catalog"})},40749:function(ee,s,e){"use strict";e.d(s,{rG:function(){return r},Y2:function(){return O},J$:function(){return m},g2:function(){return d}});var r;(function(D){const $="DENY";D.DENY=$;const K="ALLOW";D.ALLOW=K;const ne="CONDITIONAL";D.CONDITIONAL=ne})(r||(r={}));function t(D,$){return D.name===$.name}function d(D,$){return"resourceType"in D?!$||D.resourceType===$:!1}function i(D){return D.attributes.action==="create"}function R(D){return D.attributes.action==="read"}function c(D){return D.attributes.action==="update"}function o(D){return D.attributes.action==="delete"}function u(D){return{authorize:async($,K)=>await D.authorize($,K),authorizeConditional($,K){const ne=$;return D.authorize(ne,K)}}}function m({name:D,attributes:$,resourceType:K}){return K?{type:"resource",name:D,attributes:$,resourceType:K}:{type:"basic",name:D,attributes:$}}var y=e(10179),g=e(96279),E=e.n(g),S=e(9571),b=e(30195);const x=b.z.lazy(()=>b.z.object({rule:b.z.string(),resourceType:b.z.string(),params:b.z.array(b.z.unknown())}).or(b.z.object({anyOf:b.z.array(x).nonempty()})).or(b.z.object({allOf:b.z.array(x).nonempty()})).or(b.z.object({not:x}))),w=b.z.object({result:b.z.literal(r.ALLOW).or(b.z.literal(r.DENY))}),B=b.z.union([b.z.object({result:b.z.literal(r.ALLOW).or(b.z.literal(r.DENY))}),b.z.object({result:b.z.literal(r.CONDITIONAL),pluginId:b.z.string(),resourceType:b.z.string(),conditions:x})]),F=(D,$)=>b.z.object({items:b.z.array(b.z.intersection(b.z.object({id:b.z.string()}),D)).refine(K=>K.length===$.size&&K.every(({id:ne})=>$.has(ne)),{message:"Items in response do not match request"})});class O{constructor($){X(this,"enabled");X(this,"discovery");var K;this.discovery=$.discovery,this.enabled=(K=$.config.getOptionalBoolean("permission.enabled"))!=null?K:!1}async authorize($,K){return this.makeRequest($,w,K)}async authorizeConditional($,K){return this.makeRequest($,B,K)}async makeRequest($,K,ne){if(!this.enabled)return $.map(Je=>({result:r.ALLOW}));const se={items:$.map(Je=>({id:S.Z(),...Je}))},Ee=await this.discovery.getBaseUrl("permission"),Ue=await E()(`${Ee}/authorize`,{method:"POST",body:JSON.stringify(se),headers:{...this.getAuthorizationHeader(ne==null?void 0:ne.token),"content-type":"application/json"}});if(!Ue.ok)throw await y.VL.fromResponse(Ue);const xe=await Ue.json(),Re=F(K,new Set(se.items.map(({id:Je})=>Je))).parse(xe).items.reduce((Je,at)=>(Je[at.id]=at,Je),{});return se.items.map(Je=>Re[Je.id])}getAuthorizationHeader($){return $?{Authorization:`Bearer ${$}`}:{}}}},68099:function(ee,s,e){"use strict";e.d(s,{iM:function(){return R},RV:function(){return d},gI:function(){return o}});var r=e(2784),t=e(36964);const d=(0,t.createApiRef)({id:"plugin.permission.api"});var i=e(40749);class R{constructor(y,g){this.permissionClient=y,this.identityApi=g}static create(y){const{config:g,discovery:E,identity:S}=y,b=new i.Y2({discovery:E,config:g});return new R(b,S)}async authorize(y){return(await this.permissionClient.authorize([y],await this.identityApi.getCredentials()))[0]}}var c=e(49857);function o(m){const y=(0,t.useApi)(d),{data:g,error:E}=(0,c.ZP)(m,async S=>{if((0,i.g2)(S.permission)&&!S.resourceRef)return i.rG.DENY;const{result:b}=await y.authorize(S);return b});return E?{error:E,loading:!1,allowed:!1}:g===void 0?{loading:!0,allowed:!1}:{loading:!1,allowed:g===i.rG.ALLOW}}const u=m=>{const{permission:y,resourceRef:g,errorComponent:E,...S}=m,b=usePermission(isResourcePermission(y)?{permission:y,resourceRef:g}:{permission:y}),x=useApp(),{NotFoundErrorPage:w}=x.getComponents();let B=E===void 0?React.createElement(w,null):E;return b.loading?B=null:b.allowed&&(B=m.element),React.createElement(Route,{...S,element:B})}},74450:function(ee,s,e){"use strict";e.d(s,{FA:function(){return o},Nd:function(){return K},Rx:function(){return O}});var r=e(36964);const t=(0,r.createApiRef)({id:"plugin.search.queryservice"});class d{constructor(ue){this.mockedResults=ue}query(){return Promise.resolve(this.mockedResults||{results:[]})}}var i=e(2784),R=e(79692);const c=(0,R.Z)(()=>({highlight:{}}),{name:"BackstageHighlightedSearchResultText"}),o=({text:oe,preTag:ue,postTag:Xe})=>{const Ge=c(),$e=(0,i.useMemo)(()=>oe.split(new RegExp(`(${ue}.+?${Xe})`)),[Xe,ue,oe]);return i.createElement(i.Fragment,null,$e.map((ct,Y)=>ct.includes(ue)?i.createElement("mark",{className:Ge.highlight,key:Y},ct.replace(new RegExp(`${ue}|${Xe}`,"g"),"")):ct))};var u=e(42494),m=e(84899),y=e(5806),g=e(21324),E=e(56939),S=e(73698),b=e(12231),x=e(76241),w=e(64279),B=e(1849);const F=(0,x.CT)("search-context"),O=()=>{const oe=(0,i.useContext)(F);if(!oe)throw new Error("useSearch must be used within a SearchContextProvider");const ue=oe.atVersion(1);if(!ue)throw new Error("No SearchContext v1 found");return ue},D=()=>useContext(F)!==void 0,$={term:"",pageCursor:void 0,filters:{},types:[]},K=oe=>{var Ot,bt,Pt,Ut;const{initialState:ue=$,children:Xe}=oe,Ge=(0,r.useApi)(t),[$e,ct]=(0,i.useState)(ue.pageCursor),[Y,Z]=(0,i.useState)(ue.filters),[q,ie]=(0,i.useState)(ue.term),[me,be]=(0,i.useState)(ue.types),Le=(0,B.Z)(q),Se=(0,w.default)(()=>Ge.query({term:q,filters:Y,pageCursor:$e,types:me}),[q,Y,me,$e]),_e=!Se.loading&&!Se.error&&((Ot=Se.value)==null?void 0:Ot.nextPageCursor),ke=!Se.loading&&!Se.error&&((bt=Se.value)==null?void 0:bt.previousPageCursor),Et=(0,i.useCallback)(()=>{var Nt;ct((Nt=Se.value)==null?void 0:Nt.nextPageCursor)},[(Pt=Se.value)==null?void 0:Pt.nextPageCursor]),St=(0,i.useCallback)(()=>{var Nt;ct((Nt=Se.value)==null?void 0:Nt.previousPageCursor)},[(Ut=Se.value)==null?void 0:Ut.previousPageCursor]);(0,i.useEffect)(()=>{Le!==void 0&&q!==Le&&ct(void 0)},[q,Le,ct]);const ut={result:Se,filters:Y,setFilters:Z,term:q,setTerm:ie,types:me,setTypes:be,pageCursor:$e,setPageCursor:ct,fetchNextPage:_e?Et:void 0,fetchPreviousPage:ke?St:void 0},Dt=(0,x.EI)({1:ut});return i.createElement(r.AnalyticsContext,{attributes:{searchTypes:me.sort().join(",")}},i.createElement(F.Provider,{value:Dt,children:Xe}))};var ne=e(86619),se=e(7089),Ee=e(88013),Ue=e(69294),xe=e(48760);const We=(oe,ue,Xe=[],Ge=250)=>{const $e=(0,i.useRef)({}),ct=oe||(()=>Promise.resolve([])),[Y,Z]=(0,Ue.default)(ct,[ue],{loading:!0});if((0,xe.Z)(()=>{$e.current[ue]===void 0&&($e.current[ue]=Z(ue).then(ie=>($e.current[ue]=ie,ie)))},Ge,[Z,ue]),Xe.length)return{loading:!1,value:Xe};const q=$e.current[ue];return Array.isArray(q)?{loading:!1,value:q}:Y},Re=(oe,ue)=>{const{setFilters:Xe}=O();(0,i.useEffect)(()=>{ue&&[ue].flat().length>0&&Xe(Ge=>({...Ge,[oe]:ue}))},[])},Je=oe=>{const{className:ue,defaultValue:Xe,name:Ge,values:$e,valuesDebounceMs:ct,label:Y,filterSelectedOptions:Z,limitTags:q,multiple:ie}=oe,[me,be]=(0,i.useState)("");Re(Ge,Xe);const Le=typeof $e=="function"?$e:void 0,Se=typeof $e=="function"?void 0:$e,{value:_e,loading:ke}=We(Le,me,Se,ct),{filters:Et,setFilters:St}=O(),ut=Et[Ge]||(ie?[]:null),Dt=(Pt,Ut)=>{St(Nt=>{const{[Ge]:mn,...On}=Nt;return Ut?{...On,[Ge]:Ut}:{...On}})},Ot=Pt=>i.createElement(ne.Z,{...Pt,name:"search",variant:"outlined",label:Y,fullWidth:!0}),bt=(Pt,Ut)=>Pt.map((Nt,mn)=>i.createElement(se.Z,{label:Nt,color:"primary",...Ut({index:mn})}));return i.createElement(Ee.ZP,{filterSelectedOptions:Z,limitTags:q,multiple:ie,className:ue,id:`${ie?"multi-":""}select-filter-${Ge}--select`,options:_e||[],loading:ke,value:ut,onChange:Dt,onInputChange:(Pt,Ut)=>be(Ut),renderInput:Ot,renderTags:bt})},at=(0,R.Z)({label:{textTransform:"capitalize"}}),Tt=oe=>{const{className:ue,defaultValue:Xe,label:Ge,name:$e,values:ct=[],valuesDebounceMs:Y}=oe,Z=at(),{filters:q,setFilters:ie}=O();Re($e,Xe);const me=typeof ct=="function"?ct:void 0,be=typeof ct=="function"?void 0:ct,{value:Le=[],loading:Se}=We(me,"",be,Y),_e=ke=>{const{target:{value:Et,checked:St}}=ke;ie(ut=>{const{[$e]:Dt,...Ot}=ut,bt=(Dt||[]).filter(Ut=>Ut!==Et),Pt=St?[...bt,Et]:bt;return Pt.length?{...Ot,[$e]:Pt}:Ot})};return i.createElement(u.Z,{className:ue,disabled:Se,fullWidth:!0,"data-testid":"search-checkboxfilter-next"},Ge?i.createElement(m.Z,{className:Z.label},Ge):null,Le.map(ke=>{var Et;return i.createElement(y.Z,{key:ke,control:i.createElement(g.Z,{color:"primary",tabIndex:-1,inputProps:{"aria-labelledby":ke},value:ke,name:ke,onChange:_e,checked:((Et=q[$e])!=null?Et:[]).includes(ke)}),label:ke})}))},yt=oe=>{const{className:ue,defaultValue:Xe,label:Ge,name:$e,values:ct,valuesDebounceMs:Y}=oe,Z=at();Re($e,Xe);const q=typeof ct=="function"?ct:void 0,ie=typeof ct=="function"?void 0:ct,{value:me=[],loading:be}=We(q,"",ie,Y),{filters:Le,setFilters:Se}=O(),_e=ke=>{const{target:{value:Et}}=ke;Se(St=>{const{[$e]:ut,...Dt}=St;return Et?{...Dt,[$e]:Et}:Dt})};return i.createElement(u.Z,{disabled:be,className:ue,variant:"filled",fullWidth:!0,"data-testid":"search-selectfilter-next"},Ge?i.createElement(E.Z,{className:Z.label,margin:"dense"},Ge):null,i.createElement(S.Z,{variant:"outlined",value:Le[$e]||"",onChange:_e},i.createElement(b.Z,{value:""},i.createElement("em",null,"All")),me.map(ke=>i.createElement(b.Z,{key:ke,value:ke},ke))))},Pe=({component:oe,...ue})=>i.createElement(oe,{...ue});Pe.Checkbox=oe=>i.createElement(Pe,{...oe,component:Tt}),Pe.Select=oe=>i.createElement(Pe,{...oe,component:yt}),Pe.Autocomplete=oe=>i.createElement(Pe,{...oe,component:Je});var mt=e(82339);const qe=({children:oe})=>{const{result:{loading:ue,error:Xe,value:Ge}}=useSearch();return ue?React.createElement(Progress,null):Xe?React.createElement(ResponseErrorPanel,{title:"Error encountered while fetching search results",error:Xe}):Ge!=null&&Ge.results.length?React.createElement(React.Fragment,null,oe({results:Ge.results})):React.createElement(EmptyState,{missing:"data",title:"Sorry, no results were found"})},le=oe=>React.createElement(AnalyticsContext,{attributes:{pluginId:"search",extension:"SearchResult"}},React.createElement(qe,{...oe})),fe=(0,R.Z)(oe=>({root:{display:"flex",justifyContent:"space-between",gap:oe.spacing(2),margin:oe.spacing(2,0)}})),Me=()=>{const{fetchNextPage:oe,fetchPreviousPage:ue}=useSearch(),Xe=fe();return!oe&&!ue?React.createElement(React.Fragment,null):React.createElement("nav",{"arial-label":"pagination navigation",className:Xe.root},React.createElement(Button,{"aria-label":"previous page",disabled:!ue,onClick:ue,startIcon:React.createElement(ArrowBackIosIcon,null)},"Previous"),React.createElement(Button,{"aria-label":"next page",disabled:!oe,onClick:oe,endIcon:React.createElement(ArrowForwardIosIcon,null)},"Next"))},we=({children:oe})=>{const ue=useAnalytics(),{term:Xe}=useSearch();return useEffect(()=>{Xe&&ue.captureEvent("search",Xe)},[ue,Xe]),React.createElement(React.Fragment,null,oe)},Ve=({onChange:oe,onKeyDown:ue,onSubmit:Xe,debounceTime:Ge=200,clearButton:$e=!0,fullWidth:ct=!0,value:Y,inputProps:Z={},endAdornment:q,...ie})=>{const me=useApi(configApiRef),[be,Le]=useState(Y),Se=useSearchContextCheck();useEffect(()=>{Le(bt=>bt!==Y?Y:bt)},[Y]),useDebounce(()=>oe(be),Ge,[be]);const _e=useCallback(bt=>{Le(bt.target.value)},[Le]),ke=useCallback(bt=>{ue&&ue(bt),Xe&&bt.key==="Enter"&&Xe()},[ue,Xe]),Et=useCallback(()=>{oe("")},[oe]),St=`Search in ${me.getOptionalString("app.title")||"Backstage"}`,ut=React.createElement(InputAdornment,{position:"start"},React.createElement(IconButton,{"aria-label":"Query",disabled:!0},React.createElement(SearchIcon,null))),Dt=React.createElement(InputAdornment,{position:"end"},React.createElement(IconButton,{"aria-label":"Clear",onClick:Et},React.createElement(ClearButton,null))),Ot=React.createElement(TrackSearch,null,React.createElement(InputBase,{"data-testid":"search-bar-next",value:be,placeholder:St,startAdornment:ut,endAdornment:$e?Dt:q,inputProps:{"aria-label":"Search",...Z},fullWidth:ct,onChange:_e,onKeyDown:ke,...ie}));return Se?Ot:React.createElement(SearchContextProvider,null,Ot)},lt=({onChange:oe,...ue})=>{const{term:Xe,setTerm:Ge}=useSearch(),$e=useCallback(ct=>{oe?oe(ct):Ge(ct)},[oe,Ge]);return React.createElement(AnalyticsContext,{attributes:{pluginId:"search",extension:"SearchBar"}},React.createElement(Ve,{value:Xe,onChange:$e,...ue}))},Qe=({result:oe,highlight:ue,rank:Xe,icon:Ge,secondaryAction:$e,lineClamp:ct=5})=>{const Y=useAnalytics(),Z=()=>{Y.captureEvent("discover",oe.title,{attributes:{to:oe.location},value:Xe})};return React.createElement(Link,{noTrack:!0,to:oe.location,onClick:Z},React.createElement(ListItem,{alignItems:"center"},Ge&&React.createElement(ListItemIcon,null,Ge),React.createElement(ListItemText,{primaryTypographyProps:{variant:"h6"},primary:ue!=null&&ue.fields.title?React.createElement(HighlightedSearchResultText,{text:ue.fields.title,preTag:ue.preTag,postTag:ue.postTag}):oe.title,secondary:React.createElement("span",{style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:ct,overflow:"hidden"}},ue!=null&&ue.fields.text?React.createElement(HighlightedSearchResultText,{text:ue.fields.text,preTag:ue.preTag,postTag:ue.postTag}):oe.text)}),$e&&React.createElement(Box,{alignItems:"flex-end"},$e)),React.createElement(Divider,null))},Ct=oe=>React.createElement(AnalyticsContext,{attributes:{pluginId:"search",extension:"DefaultResultListItem"}},React.createElement(Qe,{...oe}))},26136:function(ee,s,e){"use strict";e.d(s,{Ox:function(){return We},Zz:function(){return R},oZ:function(){return ne},DR:function(){return c},ZS:function(){return $},VA:function(){return at},KY:function(){return u},gT:function(){return S},Dl:function(){return b},ux:function(){return Je},$L:function(){return E},x1:function(){return K}});var r=e(2784),t=e(10289),d=e(36964);const i="techdocs.addons.addon.v1",R="techdocs.addons.wrapper.v1",c=()=>null;(0,d.attachComponentData)(c,R,!0);const o=le=>`${i}.${le.toLocaleLowerCase("en-US")}`;function u(le){const{name:fe,component:Me}=le;return(0,d.createReactExtension)({name:fe,component:{sync:we=>r.createElement(Me,{...we})},data:{[i]:le,[o(fe)]:!0}})}const m=(le,fe)=>le.selectByComponentData({key:fe}).getElements()[0],y=le=>le.selectByComponentData({key:R}).selectByComponentData({key:i}),g=le=>le.selectByComponentData({key:R}).findComponentData({key:i}),E=()=>{const le=(0,t.pC)(),fe=(0,d.useElementFilter)(le,y),Me=(0,d.useElementFilter)(le,g),we=(0,r.useCallback)(Qe=>{var oe;if(!fe||!Qe)return null;const Ct=o(Qe.name);return(oe=m(fe,Ct))!=null?oe:null},[fe]),Ve=(0,r.useCallback)(Qe=>{const Ct=Me.find(oe=>oe.name===Qe);return Ct?we(Ct):null},[Me,we]),lt=(0,r.useCallback)(Qe=>{const Ct=Me.filter(oe=>oe.location===Qe);return Ct.length?Ct.map(we):null},[Me,we]);return{renderComponentByName:Ve,renderComponentsByLocation:lt}},S=(0,d.createApiRef)({id:"plugin.techdocs.service"}),b=(0,d.createApiRef)({id:"plugin.techdocs.storageservice"});var x=e(64279),w=e(48023),B=e(76241);const F=(le,fe)=>(0,w.eE)(le)===(0,w.eE)(fe),O={title:"",subtitle:"",setTitle:()=>{},setSubtitle:()=>{},setShadowRoot:()=>{},metadata:{loading:!0},entityMetadata:{loading:!0},entityRef:{kind:"",name:"",namespace:""}},D=(0,B.CT)("techdocs-reader-page-context"),$=(0,r.memo)(({entityRef:le,children:fe})=>{const Me=(0,d.useApi)(S),we=(0,x.default)(async()=>Me.getTechDocsMetadata(le),[le]),Ve=(0,x.default)(async()=>Me.getEntityMetadata(le),[le]),[lt,Qe]=(0,r.useState)(O.title),[Ct,oe]=(0,r.useState)(O.subtitle),[ue,Xe]=(0,r.useState)(O.shadowRoot),Ge={metadata:we,entityRef:le,entityMetadata:Ve,shadowRoot:ue,setShadowRoot:Xe,title:lt,setTitle:Qe,subtitle:Ct,setSubtitle:oe},$e=(0,B.EI)({1:Ge});return r.createElement(D.Provider,{value:$e},fe instanceof Function?fe(Ge):fe)},(le,fe)=>F(le.entityRef,fe.entityRef)),K=()=>{const le=(0,r.useContext)(D);if(le===void 0)return O;const fe=le.atVersion(1);if(fe===void 0)throw new Error("No context found for version 1.");return fe},ne=Object.freeze({Header:"Header",Subheader:"Subheader",Settings:"Settings",PrimarySidebar:"PrimarySidebar",SecondarySidebar:"SecondarySidebar",Content:"Content"});var se=e(6553),Ee=e(50236),Ue=e(19219),xe=e(82339);const We="TECH_DOCS_SHADOW_DOM_STYLE_LOAD",Re=le=>{(0,r.useEffect)(()=>{var lt;if(!le)return()=>{};const fe=le.querySelectorAll('head > link[rel="stylesheet"]');let Me=(lt=fe==null?void 0:fe.length)!=null?lt:0;const we=new CustomEvent(We);if(!Me)return le.dispatchEvent(we),()=>{};const Ve=()=>{--Me===0&&le.dispatchEvent(we)};return fe==null||fe.forEach(Qe=>{Qe.addEventListener("load",Ve)}),()=>{fe==null||fe.forEach(Qe=>{Qe.removeEventListener("load",Ve)})}},[le])},Je=le=>{const[fe,Me]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{if(!le)return()=>{};Me(!0);const we=le.style;we.setProperty("opacity","0");const Ve=()=>{Me(!1),we.setProperty("opacity","1")};return le.addEventListener(We,Ve),()=>{le.removeEventListener(We,Ve)}},[le]),fe},at=({element:le,onAppend:fe,children:Me})=>{const[we,Ve]=(0,r.useState)((0,se.Ue)({...(0,Ee.Z)(),insertionPoint:void 0}));Re(le);const lt=Je(le),Qe=(0,r.useCallback)(Ct=>{if(!le||!Ct)return;Ve((0,se.Ue)({...(0,Ee.Z)(),insertionPoint:le.querySelector("head")||void 0}));let oe=Ct.shadowRoot;oe||(oe=Ct.attachShadow({mode:"open"})),oe.replaceChildren(le),typeof fe=="function"&&fe(oe)},[le,fe]);return r.createElement(r.Fragment,null,lt&&r.createElement(xe.Progress,null),r.createElement(Ue.ZP,{jss:we,sheetsManager:new Map},r.createElement("div",{ref:Qe,"data-testid":"techdocs-native-shadowroot"}),Me))};var Tt=e(54073);const yt=()=>{const{shadowRoot:le}=useTechDocsReaderPage();return le},Pe=le=>{const fe=yt();return fe?le.map(Me=>fe==null?void 0:fe.querySelectorAll(Me)).filter(Me=>Me.length).map(Me=>Array.from(Me)).flat():[]},mt=le=>le.toString()&&le.rangeCount&&le.getRangeAt(0).getBoundingClientRect().top,qe=(le=0)=>{const fe=yt(),[Me,we]=useState(null),Ve=useMemo(()=>debounce(()=>{const lt=fe,Qe=lt.getSelection?lt.getSelection():document.getSelection();Qe&&mt(Qe)?we(Qe):we(null)},le),[fe,we,le]);return useEffect(()=>(window.document.addEventListener("selectionchange",Ve),()=>window.document.removeEventListener("selectionchange",Ve)),[Ve]),Me}},94067:function(ee,s,e){"use strict";e.r(s),e.d(s,{EmbeddedDocsRouter:function(){return x},Router:function(){return b},isTechDocsAvailable:function(){return S}});var r=e(2784),t=e(10289),d=e(17429),i=e(82339),R=e(48023),c=e(20961),o=e(16172),u=e(63126);const m=({entity:w})=>{const B=(0,R.iB)(w);return r.createElement(c.I6,{entityRef:B},r.createElement(o.b,null),r.createElement(u.F,{withSearch:!1}))};var y=e(50021),g=e(26220);const E="backstage.io/techdocs-ref",S=w=>{var B,F;return Boolean((F=(B=w==null?void 0:w.metadata)==null?void 0:B.annotations)==null?void 0:F[E])},b=()=>r.createElement(t.Z5,null,r.createElement(t.AW,{path:"/",element:r.createElement(y.TechDocsIndexPage,null)}),r.createElement(t.AW,{path:"/:namespace/:kind/:name/*",element:r.createElement(g.TechDocsReaderPage,null)})),x=w=>{var $;const{children:B}=w,{entity:F}=(0,d.useEntity)(),O=(0,t.V$)([{path:"/*",element:r.createElement(m,{entity:F}),children:[{path:"/*",element:B}]}]);return(($=F.metadata.annotations)==null?void 0:$[E])?O:r.createElement(i.MissingAnnotationEmptyState,{annotation:E})}},3337:function(ee,s,e){"use strict";var r=e(36964);const t=(0,r.createApiRef)({id:"plugin.techdocs.storageservice"}),d=(0,r.createApiRef)({id:"plugin.techdocs.service"})},42723:function(ee,s,e){"use strict";e.d(s,{k:function(){return R},p:function(){return i}});var r=e(10179),t=e(76372),d=e.n(t);class i{constructor(o){X(this,"configApi");X(this,"discoveryApi");X(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:u,namespace:m,name:y}=o,E=`${await this.getApiOrigin()}/metadata/techdocs/${m}/${u}/${y}`,S=await this.fetchApi.fetch(`${E}`);if(!S.ok)throw await r.VL.fromResponse(S);return await S.json()}async getEntityMetadata(o){const{kind:u,namespace:m,name:y}=o,E=`${await this.getApiOrigin()}/metadata/entity/${m}/${u}/${y}`,S=await this.fetchApi.fetch(`${E}`);if(!S.ok)throw await r.VL.fromResponse(S);return await S.json()}}class R{constructor(o){X(this,"configApi");X(this,"discoveryApi");X(this,"identityApi");X(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,u){const{kind:m,namespace:y,name:g}=o,S=`${await this.getStorageUrl()}/${y}/${m}/${g}/${u}`,b=await this.fetchApi.fetch(`${S.endsWith("/")?S:`${S}/`}index.html`);let x="";switch(b.status){case 404:throw x="Page not found. ",u||(x+="This could be because there is no index.md file in the root of the docs directory of this repository."),new r.dR(x);case 500:throw x="Could not generate documentation or an error in the TechDocs backend. ",new Error(x);default:break}return b.text()}async syncEntityDocs(o,u=()=>{}){const{kind:m,namespace:y,name:g}=o,S=`${await this.getApiOrigin()}/sync/${y}/${m}/${g}`,{token:b}=await this.identityApi.getCredentials();return new Promise((x,w)=>{const B=new t.EventSourcePolyfill(S,{withCredentials:!0,headers:b?{Authorization:`Bearer ${b}`}:{}});B.addEventListener("log",F=>{F.data&&u(JSON.parse(F.data))}),B.addEventListener("finish",F=>{let O=!1;F.data&&({updated:O}=JSON.parse(F.data)),x(O?"updated":"cached")}),B.onerror=F=>{switch(B.close(),F.status){case 404:w(new r.dR(F.message));return;default:w(new Error(F.data));return}}})}async getBaseUrl(o,u,m){const{kind:y,namespace:g,name:E}=u,b=`${await this.getApiOrigin()}/static/docs/${g}/${y}/${E}/${m}`;return new URL(o,b.endsWith("/")?b:`${b}/`).toString()}}},97589:function(ee,s,e){"use strict";e.d(s,{D:function(){return r}});function r(t,d){return d.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")?t:t.toLocaleLowerCase("en-US")}},2546:function(ee,s,e){"use strict";e.d(s,{u:function(){return o}});var r=e(2784),t=e(82339),d=e(17429),i=e(1114),R=e(70335),c=e(21956);const o=u=>{const{initialFilter:m="owned",columns:y,actions:g}=u;return r.createElement(i.j,null,r.createElement(t.Content,null,r.createElement(t.ContentHeader,{title:""},r.createElement(t.SupportButton,null,"Discover documentation in your ecosystem.")),r.createElement(d.EntityListProvider,null,r.createElement(d.CatalogFilterLayout,null,r.createElement(d.CatalogFilterLayout.Filters,null,r.createElement(R.f,null),r.createElement(d.UserListPicker,{initialFilter:m}),r.createElement(d.EntityOwnerPicker,null),r.createElement(d.EntityTagPicker,null)),r.createElement(d.CatalogFilterLayout.Content,null,r.createElement(c.EntityListDocsTable,{actions:g,columns:y}))))))}},51016:function(ee,s,e){"use strict";e.d(s,{f:function(){return y}});var r=e(68725),t=e(97589),d=e(36964),i=e(82339),R=e(94339),c=e(16111),o=e(24579),u=e(14503),m=e(2784);const y=S=>{const{entities:b}=S,x=(0,d.useRouteRef)(r.Fw),w=(0,d.useApi)(d.configApiRef);return b?m.createElement(i.ItemCardGrid,{"data-testid":"docs-explore"},b!=null&&b.length?b.map((B,F)=>{var O,D;return m.createElement(R.Z,{key:F},m.createElement(c.Z,null,m.createElement(i.ItemCardHeader,{title:(O=B.metadata.title)!=null?O:B.metadata.name})),m.createElement(o.Z,null,B.metadata.description),m.createElement(u.Z,null,m.createElement(i.Button,{to:x({namespace:(0,t.D)((D=B.metadata.namespace)!=null?D:"default",w),kind:(0,t.D)(B.kind,w),name:(0,t.D)(B.metadata.name,w)}),color:"primary","data-testid":"read_docs"},"Read Docs")))}):null):null};var g=e(17429);const E=()=>{const{loading:S,error:b,entities:x}=useEntityList();return b?React.createElement(WarningPanel,{severity:"error",title:"Could not load available documentation."},React.createElement(CodeSnippet,{language:"text",text:b.toString()})):S||!x?React.createElement(Progress,null):(x.sort((w,B)=>{var F,O;return((F=w.metadata.title)!=null?F:w.metadata.name).localeCompare((O=B.metadata.title)!=null?O:B.metadata.name)}),React.createElement(DocsCardGrid,{entities:x}))}},38634:function(ee,s,e){"use strict";e.d(s,{H:function(){return g}});var r=e(2784),t=e(95074),d=e(36964),i=e(48023),R=e(17429),c=e(68725),o=e(82339),u=e(98095),m=e(3792),y=e(97589);const g=E=>{const{entities:S,title:b,loading:x,columns:w,actions:B}=E,[,F]=(0,t.Z)(),O=(0,d.useRouteRef)(c.Fw),D=(0,d.useApi)(d.configApiRef);if(!S)return null;const $=S.map(se=>{var Ue;const Ee=(0,R.getEntityRelations)(se,i.S4);return{entity:se,resolved:{docsUrl:O({namespace:(0,y.D)((Ue=se.metadata.namespace)!=null?Ue:"default",D),kind:(0,y.D)(se.kind,D),name:(0,y.D)(se.metadata.name,D)}),ownedByRelations:Ee,ownedByRelationsTitle:Ee.map(xe=>(0,R.humanizeEntityRef)(xe,{defaultKind:"group"})).join(", ")}}}),K=[m.N.createNameColumn(),m.N.createOwnerColumn(),m.N.createTypeColumn()],ne=[u.n.createCopyDocsUrlAction(F)];return r.createElement(r.Fragment,null,x||$&&$.length>0?r.createElement(o.Table,{isLoading:x,options:{paging:!0,pageSize:20,search:!0,actionsColumnIndex:-1},data:$,columns:w||K,actions:B||ne,title:b?`${b} (${$.length})`:`All (${$.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=m.N,g.actions=u.n},12481:function(ee,s,e){"use strict";e.d(s,{n:function(){return y}});var r=e(2784),t=e(95074),d=e(76635),i=e.n(d),R=e(82339),c=e(17429),o=e(38634),u=e(98095),m=e(3792);const y=g=>{var ne,se;const{columns:E,actions:S}=g,{loading:b,error:x,entities:w,filters:B}=(0,c.useEntityList)(),{isStarredEntity:F,toggleStarredEntity:O}=(0,c.useStarredEntities)(),[,D]=(0,t.Z)(),$=(0,d.capitalize)((se=(ne=B.user)==null?void 0:ne.value)!=null?se:"all"),K=[u.n.createCopyDocsUrlAction(D),u.n.createStarEntityAction(F,O)];return x?r.createElement(R.WarningPanel,{severity:"error",title:"Could not load available documentation."},r.createElement(R.CodeSnippet,{language:"text",text:x.toString()})):r.createElement(o.H,{title:$,entities:w,loading:b,actions:S||K,columns:E})};y.columns=m.N,y.actions=u.n},98095:function(ee,s,e){"use strict";e.d(s,{n:function(){return o}});var r=e(2784),t=e(39981),d=e(2337),i=e(11640),R=e(28347);const c=(0,d.Z)({root:{color:"#f3ba37"}})(i.Z),o={createCopyDocsUrlAction(u){return m=>({icon:()=>r.createElement(t.Z,{fontSize:"small"}),tooltip:"Click to copy documentation link to clipboard",onClick:()=>u(`${window.location.origin}${m.resolved.docsUrl}`)})},createStarEntityAction(u,m){return({entity:y})=>{const g=u(y);return{cellStyle:{paddingLeft:"1em"},icon:()=>g?r.createElement(c,null):r.createElement(R.Z,null),tooltip:g?"Remove from favorites":"Add to favorites",onClick:()=>m(y)}}}}},3792:function(ee,s,e){"use strict";e.d(s,{N:function(){return R}});var r=e(2784),t=e(82339),d=e(17429);function i(c){return c.metadata.title||c.metadata.name}const R={createNameColumn(){return{title:"Document",field:"entity.metadata.name",highlight:!0,render:c=>r.createElement(t.SubvalueCell,{value:r.createElement(t.Link,{to:c.resolved.docsUrl},i(c.entity)),subvalue:c.entity.metadata.description})}},createOwnerColumn(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:c})=>r.createElement(d.EntityRefLinks,{entityRefs:c.ownedByRelations,defaultKind:"group"})}},createTypeColumn(){return{title:"Type",field:"entity.spec.type"}}}},21956:function(ee,s,e){"use strict";e.d(s,{DocsTable:function(){return t.H},EntityListDocsTable:function(){return r.n}});var r=e(12481),t=e(38634),d=e(72580),i=e.n(d);e.o(d,"DefaultTechDocsHome")&&e.d(s,{DefaultTechDocsHome:function(){return d.DefaultTechDocsHome}})},72580:function(){},50021:function(ee,s,e){"use strict";e.r(s),e.d(s,{TechDocsIndexPage:function(){return i}});var r=e(2784),t=e(10289),d=e(2546);const i=R=>(0,t.pC)()||r.createElement(d.u,{...R})},1114:function(ee,s,e){"use strict";e.d(s,{j:function(){return i}});var r=e(2784),t=e(82339),d=e(36964);const i=R=>{var m;const{children:c}=R,u=`Documentation available in ${(m=(0,d.useApi)(d.configApiRef).getOptionalString("organization.name"))!=null?m:"Backstage"}`;return r.createElement(t.PageWithHeader,{title:"Documentation",subtitle:u,themeId:"documentation"},c)}},70335:function(ee,s,e){"use strict";e.d(s,{f:function(){return i}});var r=e(2784),t=e(17429);class d{getCatalogFilters(){return{"metadata.annotations.backstage.io/techdocs-ref":t.CATALOG_FILTER_EXISTS}}}const i=()=>{const{updateFilters:R}=(0,t.useEntityList)();return(0,r.useEffect)(()=>{R({techdocs:new d})},[R]),null}},19192:function(ee,s,e){"use strict";e.d(s,{DefaultTechDocsHome:function(){return d.u}});var r=e(51016),t=e(21956),d=e(2546),i=e(1114),R=e(70335)},82250:function(ee,s,e){"use strict";e.d(s,{DefaultTechDocsHome:function(){return o.DefaultTechDocsHome},TechDocsIndexPage:function(){return u.Jl},TechDocsReaderPage:function(){return u.I6},TechDocsReaderPageContent:function(){return R.Fq},TechDocsReaderPageHeader:function(){return R.SE},plugin:function(){return u.s4},techdocsPlugin:function(){return u.s4}});var r=e(98157),t=e.n(r);e.o(r,"DefaultTechDocsHome")&&e.d(s,{DefaultTechDocsHome:function(){return r.DefaultTechDocsHome}}),e.o(r,"TechDocsReaderPageContent")&&e.d(s,{TechDocsReaderPageContent:function(){return r.TechDocsReaderPageContent}}),e.o(r,"TechDocsReaderPageHeader")&&e.d(s,{TechDocsReaderPageHeader:function(){return r.TechDocsReaderPageHeader}});var d=e(3337),i=e(42723),R=e(96393),c=e(47861),o=e(19192),u=e(20961),m=e(94067)},20961:function(ee,s,e){"use strict";e.d(s,{I6:function(){return y},Jl:function(){return m},s4:function(){return R}});var r=e(26136),t=e(42723),d=e(68725),i=e(36964);const R=(0,i.createPlugin)({id:"techdocs",apis:[(0,i.createApiFactory)({api:r.Dl,deps:{configApi:i.configApiRef,discoveryApi:i.discoveryApiRef,identityApi:i.identityApiRef,fetchApi:i.fetchApiRef},factory:({configApi:g,discoveryApi:E,identityApi:S,fetchApi:b})=>new t.k({configApi:g,discoveryApi:E,identityApi:S,fetchApi:b})}),(0,i.createApiFactory)({api:r.gT,deps:{configApi:i.configApiRef,discoveryApi:i.discoveryApiRef,fetchApi:i.fetchApiRef},factory:({configApi:g,discoveryApi:E,fetchApi:S})=>new t.p({configApi:g,discoveryApi:E,fetchApi:S})})],routes:{root:d._Z,docRoot:d.Fw,entityContent:d.pd}}),c=R.provide((0,i.createRoutableExtension)({name:"TechdocsPage",component:()=>Promise.resolve().then(e.bind(e,94067)).then(g=>g.Router),mountPoint:d._Z})),o=R.provide((0,i.createRoutableExtension)({name:"EntityTechdocsContent",component:()=>Promise.resolve().then(e.bind(e,94067)).then(g=>g.EmbeddedDocsRouter),mountPoint:d.pd})),u=R.provide((0,i.createRoutableExtension)({name:"TechDocsCustomHome",component:()=>e.e(7110).then(e.bind(e,57110)).then(g=>g.TechDocsCustomHome),mountPoint:d._Z})),m=R.provide((0,i.createRoutableExtension)({name:"TechDocsIndexPage",component:()=>Promise.resolve().then(e.bind(e,50021)).then(g=>g.TechDocsIndexPage),mountPoint:d._Z})),y=R.provide((0,i.createRoutableExtension)({name:"TechDocsReaderPage",component:()=>Promise.resolve().then(e.bind(e,26220)).then(g=>g.TechDocsReaderPage),mountPoint:d.Fw}))},26220:function(ee,s,e){"use strict";e.r(s),e.d(s,{TechDocsReaderLayout:function(){return u},TechDocsReaderPage:function(){return m}});var r=e(2784),t=e(10289),d=e(82339),i=e(26136),R=e(63126),c=e(99954),o=e(16172);const u=({withSearch:y,withHeader:g=!0})=>r.createElement(d.Page,{themeId:"documentation"},g&&r.createElement(c.S,null),r.createElement(o.b,null),r.createElement(R.F,{withSearch:y})),m=y=>{const{kind:g,name:E,namespace:S}=(0,t.UO)(),{children:b,entityRef:x={kind:g,name:E,namespace:S}}=y,w=(0,t.pC)();if(!b){const F=(w?r.Children.toArray(w.props.children):[]).find(O=>{var $,K;const{type:D}=O;return!((K=($=D==null?void 0:D.__backstage_data)==null?void 0:$.map)!=null&&K.get(i.Zz))});return r.createElement(i.ZS,{entityRef:x},F||r.createElement(u,null))}return r.createElement(i.ZS,{entityRef:x},({metadata:B,entityMetadata:F,onReady:O})=>r.createElement("div",{className:"techdocs-reader-page"},r.createElement(d.Page,{themeId:"documentation"},b instanceof Function?b({entityRef:x,techdocsMetadataValue:B.value,entityMetadataValue:F.value,onReady:O}):b)))}},63126:function(ee,s,e){"use strict";e.d(s,{F:function(){return tn}});var r=e(2784),t=e(79692),d=e(60905),i=e(26136),R=e(82339),c=e(47861),o=e(4614),u=e(77277),m=e(99688),y=e(12420),g=e(90436),E=e(61837),S=e(4190),b=e(87685);const x=(0,t.Z)(U=>(0,y.Z)({paper:{width:"100%",[U.breakpoints.up("sm")]:{width:"75%"},[U.breakpoints.up("md")]:{width:"50%"},padding:U.spacing(2.5)},root:{height:"100%",overflow:"hidden"},logs:{background:U.palette.background.default}})),w=({buildLog:U,onClose:re})=>{const te=x(),ve=U.length===0?"Waiting for logs...":U.join(`
32
- `);return r.createElement(d.Z,{container:!0,direction:"column",className:te.root,spacing:0,wrap:"nowrap"},r.createElement(d.Z,{item:!0,container:!0,justifyContent:"space-between",alignItems:"center",spacing:0,wrap:"nowrap"},r.createElement(g.Z,{variant:"h5"},"Build Details"),r.createElement(E.Z,{key:"dismiss",title:"Close the drawer",onClick:re,color:"inherit"},r.createElement(b.Z,null))),r.createElement(R.LogViewer,{text:ve,classes:{root:te.logs}}))},B=({buildLog:U})=>{const re=x(),[te,ve]=(0,r.useState)(!1);return r.createElement(r.Fragment,null,r.createElement(u.Z,{color:"inherit",onClick:()=>ve(!0)},"Show Build Logs"),r.createElement(S.ZP,{classes:{paper:re.paper},anchor:"right",open:te,onClose:()=>ve(!1)},r.createElement(w,{buildLog:U,onClose:()=>ve(!1)})))};var F=e(36964);const O=({errorMessage:U})=>{const re=(0,F.useApi)(F.configApiRef).getOptionalString("techdocs.builder");let te="";return re!=="local"&&(te="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(R.ErrorPage,{status:"404",statusMessage:U||"Documentation not found",additionalInfo:te})};var D=e(2263);const $=(0,t.Z)(U=>({root:{marginBottom:U.spacing(2)},message:{wordBreak:"break-word",overflowWrap:"anywhere"}})),K=()=>{let U=null;const re=$(),{state:te,contentReload:ve,contentErrorMessage:Ne,syncErrorMessage:ht,buildLog:He}=(0,D.DK)();return te==="INITIAL_BUILD"&&(U=r.createElement(m.Z,{classes:{root:re.root},variant:"outlined",severity:"info",icon:r.createElement(o.Z,{size:"24px"}),action:r.createElement(B,{buildLog:He})},"Documentation is accessed for the first time and is being prepared. The subsequent loads are much faster.")),te==="CONTENT_STALE_REFRESHING"&&(U=r.createElement(m.Z,{variant:"outlined",severity:"info",icon:r.createElement(o.Z,{size:"24px"}),action:r.createElement(B,{buildLog:He}),classes:{root:re.root}},"A newer version of this documentation is being prepared and will be available shortly.")),te==="CONTENT_STALE_READY"&&(U=r.createElement(m.Z,{variant:"outlined",severity:"success",action:r.createElement(u.Z,{color:"inherit",onClick:()=>ve()},"Refresh"),classes:{root:re.root}},"A newer version of this documentation is now available, please refresh to view.")),te==="CONTENT_STALE_ERROR"&&(U=r.createElement(m.Z,{variant:"outlined",severity:"error",action:r.createElement(B,{buildLog:He}),classes:{root:re.root,message:re.message}},"Building a newer version of this documentation failed."," ",ht)),te==="CONTENT_NOT_FOUND"&&(U=r.createElement(r.Fragment,null,ht&&r.createElement(m.Z,{variant:"outlined",severity:"error",action:r.createElement(B,{buildLog:He}),classes:{root:re.root,message:re.message}},"Building a newer version of this documentation failed."," ",ht),r.createElement(O,{errorMessage:Ne}))),U};var ne=e(10289),se=e(60364),Ee=e(41156),Ue=e(36356),xe=e(35368),We=e.n(xe);const Re=/main\.[A-Fa-f0-9]{8}\.min\.css$/,Je=/^https:\/\/fonts\.googleapis\.com/,at=/^https:\/\/fonts\.gstatic\.com/,Tt=U=>U.nodeName==="LINK",yt=U=>{const re=(U==null?void 0:U.getAttribute("href"))||"",te=re.match(Re),ve=re.match(Je),Ne=re.match(at);return te||ve||Ne},Pe=U=>(Tt(U)&&!yt(U)&&U.remove(),U),mt=U=>U.nodeName==="IFRAME",qe=(U,re)=>{const te=U.getAttribute("src")||"";try{const{host:ve}=new URL(te);return re.includes(ve)}catch{return!1}},le=U=>re=>(mt(re)&&!qe(re,U)&&re.remove(),re),fe=()=>{const U=(0,F.useApi)(F.configApiRef);return(0,r.useMemo)(()=>U.getOptionalConfig("techdocs.sanitizer"),[U])},Me=()=>{const U=fe();return(0,r.useCallback)(async re=>{const te=U==null?void 0:U.getOptionalStringArray("allowedIframeHosts");We().addHook("beforeSanitizeElements",Pe);const ve=["link"];return te&&(ve.push("iframe"),We().addHook("beforeSanitizeElements",le(te))),We().sanitize(re.innerHTML,{ADD_TAGS:ve,FORBID_TAGS:["style"],WHOLE_DOCUMENT:!0,RETURN_DOM:!0})},[U])};var we=e(41128),Ve=({theme:U})=>`
33
- /*================== Variables ==================*/
34
- /*
35
- 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.
36
- 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.
37
- */
38
-
39
- :host {
40
- /* FONT */
41
- --md-default-fg-color: ${U.palette.text.primary};
42
- --md-default-fg-color--light: ${U.palette.text.secondary};
43
- --md-default-fg-color--lighter: ${(0,we.$n)(U.palette.text.secondary,.7)};
44
- --md-default-fg-color--lightest: ${(0,we.$n)(U.palette.text.secondary,.3)};
45
-
46
- /* BACKGROUND */
47
- --md-default-bg-color:${U.palette.background.default};
48
- --md-default-bg-color--light: ${U.palette.background.paper};
49
- --md-default-bg-color--lighter: ${(0,we.$n)(U.palette.background.paper,.7)};
50
- --md-default-bg-color--lightest: ${(0,we.$n)(U.palette.background.paper,.3)};
51
-
52
- /* PRIMARY */
53
- --md-primary-fg-color: ${U.palette.primary.main};
54
- --md-primary-fg-color--light: ${U.palette.primary.light};
55
- --md-primary-fg-color--dark: ${U.palette.primary.dark};
56
- --md-primary-bg-color: ${U.palette.primary.contrastText};
57
- --md-primary-bg-color--light: ${(0,we.$n)(U.palette.primary.contrastText,.7)};
58
-
59
- /* ACCENT */
60
- --md-accent-fg-color: var(--md-primary-fg-color);
61
-
62
- /* SHADOW */
63
- --md-shadow-z1: ${U.shadows[1]};
64
- --md-shadow-z2: ${U.shadows[2]};
65
- --md-shadow-z3: ${U.shadows[3]};
66
-
67
- /* EXTENSIONS */
68
- --md-admonition-fg-color: var(--md-default-fg-color);
69
- --md-admonition-bg-color: var(--md-default-bg-color);
70
- /* Admonitions and others are using SVG masks to define icons. These masks are defined as CSS variables. */
71
- --md-admonition-icon--note: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20.71 7.04c.39-.39.39-1.04 0-1.41l-2.34-2.34c-.37-.39-1.02-.39-1.41 0l-1.84 1.83 3.75 3.75M3 17.25V21h3.75L17.81 9.93l-3.75-3.75L3 17.25z"/></svg>');
72
- --md-admonition-icon--abstract: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 5h16v2H4V5m0 4h16v2H4V9m0 4h16v2H4v-2m0 4h10v2H4v-2z"/></svg>');
73
- --md-admonition-icon--info: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 9h-2V7h2m0 10h-2v-6h2m-1-9A10 10 0 002 12a10 10 0 0010 10 10 10 0 0010-10A10 10 0 0012 2z"/></svg>');
74
- --md-admonition-icon--tip: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M17.55 11.2c-.23-.3-.5-.56-.76-.82-.65-.6-1.4-1.03-2.03-1.66C13.3 7.26 13 4.85 13.91 3c-.91.23-1.75.75-2.45 1.32-2.54 2.08-3.54 5.75-2.34 8.9.04.1.08.2.08.33 0 .22-.15.42-.35.5-.22.1-.46.04-.64-.12a.83.83 0 01-.15-.17c-1.1-1.43-1.28-3.48-.53-5.12C5.89 10 5 12.3 5.14 14.47c.04.5.1 1 .27 1.5.14.6.4 1.2.72 1.73 1.04 1.73 2.87 2.97 4.84 3.22 2.1.27 4.35-.12 5.96-1.6 1.8-1.66 2.45-4.32 1.5-6.6l-.13-.26c-.2-.46-.47-.87-.8-1.25l.05-.01m-3.1 6.3c-.28.24-.73.5-1.08.6-1.1.4-2.2-.16-2.87-.82 1.19-.28 1.89-1.16 2.09-2.05.17-.8-.14-1.46-.27-2.23-.12-.74-.1-1.37.18-2.06.17.38.37.76.6 1.06.76 1 1.95 1.44 2.2 2.8.04.14.06.28.06.43.03.82-.32 1.72-.92 2.27h.01z"/></svg>');
75
- --md-admonition-icon--success: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2m-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>');
76
- --md-admonition-icon--question: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M15.07 11.25l-.9.92C13.45 12.89 13 13.5 13 15h-2v-.5c0-1.11.45-2.11 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41a2 2 0 00-2-2 2 2 0 00-2 2H8a4 4 0 014-4 4 4 0 014 4 3.2 3.2 0 01-.93 2.25M13 19h-2v-2h2M12 2A10 10 0 002 12a10 10 0 0010 10 10 10 0 0010-10c0-5.53-4.5-10-10-10z"/></svg>');
77
- --md-admonition-icon--warning: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 14h-2v-4h2m0 8h-2v-2h2M1 21h22L12 2 1 21z"/></svg>');
78
- --md-admonition-icon--failure: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2c5.53 0 10 4.47 10 10s-4.47 10-10 10S2 17.53 2 12 6.47 2 12 2m3.59 5L12 10.59 8.41 7 7 8.41 10.59 12 7 15.59 8.41 17 12 13.41 15.59 17 17 15.59 13.41 12 17 8.41 15.59 7z"/></svg>');
79
- --md-admonition-icon--danger: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M11.5 20l4.86-9.73H13V4l-5 9.73h3.5V20M12 2c2.75 0 5.1 1 7.05 2.95C21 6.9 22 9.25 22 12s-1 5.1-2.95 7.05C17.1 21 14.75 22 12 22s-5.1-1-7.05-2.95C3 17.1 2 14.75 2 12s1-5.1 2.95-7.05C6.9 3 9.25 2 12 2z"/></svg>');
80
- --md-admonition-icon--bug: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14 12h-4v-2h4m0 6h-4v-2h4m6-6h-2.81a5.985 5.985 0 00-1.82-1.96L17 4.41 15.59 3l-2.17 2.17a6.002 6.002 0 00-2.83 0L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20V8z"/></svg>');
81
- --md-admonition-icon--example: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7 13v-2h14v2H7m0 6v-2h14v2H7M7 7V5h14v2H7M3 8V5H2V4h2v4H3m-1 9v-1h3v4H2v-1h2v-.5H3v-1h1V17H2m2.25-7a.75.75 0 01.75.75c0 .2-.08.39-.21.52L3.12 13H5v1H2v-.92L4 11H2v-1h2.25z"/></svg>');
82
- --md-admonition-icon--quote: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14 17h3l2-4V7h-6v6h3M6 17h3l2-4V7H5v6h3l-2 4z"/></svg>');
83
- --md-footnotes-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 7v4H5.83l3.58-3.59L8 6l-6 6 6 6 1.41-1.42L5.83 13H21V7h-2z"/></svg>');
84
- --md-details-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8.59 16.58 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.42z"/></svg>');
85
- --md-tasklist-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"/></svg>');
86
- --md-tasklist-icon--checked: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>');
87
- --md-nav-icon--prev: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>');
88
- --md-nav-icon--next: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8.59 16.58 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.42z"/></svg>');
89
- --md-toc-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 9h14V7H3v2m0 4h14v-2H3v2m0 4h14v-2H3v2m16 0h2v-2h-2v2m0-10v2h2V7h-2m0 6h2v-2h-2v2z"/></svg>');
90
- --md-clipboard-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 21H8V7h11m0-2H8a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2m-3-4H4a2 2 0 0 0-2 2v14h2V3h12V1z"/></svg>');
91
- --md-search-result-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h7c-.41-.25-.8-.56-1.14-.9-.33-.33-.61-.7-.86-1.1H6V4h7v5h5v1.18c.71.16 1.39.43 2 .82V8l-6-6m6.31 16.9c1.33-2.11.69-4.9-1.4-6.22-2.11-1.33-4.91-.68-6.22 1.4-1.34 2.11-.69 4.89 1.4 6.22 1.46.93 3.32.93 4.79.02L22 23.39 23.39 22l-3.08-3.1m-3.81.1a2.5 2.5 0 0 1-2.5-2.5 2.5 2.5 0 0 1 2.5-2.5 2.5 2.5 0 0 1 2.5 2.5 2.5 2.5 0 0 1-2.5 2.5z"/></svg>');
92
- --md-source-forks-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M5 3.25a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0zm0 2.122a2.25 2.25 0 1 0-1.5 0v.878A2.25 2.25 0 0 0 5.75 8.5h1.5v2.128a2.251 2.251 0 1 0 1.5 0V8.5h1.5a2.25 2.25 0 0 0 2.25-2.25v-.878a2.25 2.25 0 1 0-1.5 0v.878a.75.75 0 0 1-.75.75h-4.5A.75.75 0 0 1 5 6.25v-.878zm3.75 7.378a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0zm3-8.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5z"/></svg>');
93
- --md-source-repositories-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 1 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 0 1-1.072 1.05A2.495 2.495 0 0 1 2 11.5v-9zm10.5-1V9h-8c-.356 0-.694.074-1 .208V2.5a1 1 0 0 1 1-1h8zM5 12.25v3.25a.25.25 0 0 0 .4.2l1.45-1.087a.25.25 0 0 1 .3 0L8.6 15.7a.25.25 0 0 0 .4-.2v-3.25a.25.25 0 0 0-.25-.25h-3.5a.25.25 0 0 0-.25.25z"/></svg>');
94
- --md-source-stars-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.75.75 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25zm0 2.445L6.615 5.5a.75.75 0 0 1-.564.41l-3.097.45 2.24 2.184a.75.75 0 0 1 .216.664l-.528 3.084 2.769-1.456a.75.75 0 0 1 .698 0l2.77 1.456-.53-3.084a.75.75 0 0 1 .216-.664l2.24-2.183-3.096-.45a.75.75 0 0 1-.564-.41L8 2.694v.001z"/></svg>');
95
- --md-source-version-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M2.5 7.775V2.75a.25.25 0 0 1 .25-.25h5.025a.25.25 0 0 1 .177.073l6.25 6.25a.25.25 0 0 1 0 .354l-5.025 5.025a.25.25 0 0 1-.354 0l-6.25-6.25a.25.25 0 0 1-.073-.177zm-1.5 0V2.75C1 1.784 1.784 1 2.75 1h5.025c.464 0 .91.184 1.238.513l6.25 6.25a1.75 1.75 0 0 1 0 2.474l-5.026 5.026a1.75 1.75 0 0 1-2.474 0l-6.25-6.25A1.75 1.75 0 0 1 1 7.775zM6 5a1 1 0 1 0 0 2 1 1 0 0 0 0-2z"/></svg>');
96
- --md-version-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!--! Font Awesome Free 6.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2022 Fonticons, Inc.--><path d="m310.6 246.6-127.1 128c-7.1 6.3-15.3 9.4-23.5 9.4s-16.38-3.125-22.63-9.375l-127.1-128C.224 237.5-2.516 223.7 2.438 211.8S19.07 192 32 192h255.1c12.94 0 24.62 7.781 29.58 19.75s3.12 25.75-6.08 34.85z"/></svg>');
97
- }
98
-
99
- :host > * {
100
- /* CODE */
101
- --md-code-fg-color: ${U.palette.text.primary};
102
- --md-code-bg-color: ${U.palette.background.paper};
103
- --md-code-hl-color: ${(0,we.Fq)(U.palette.warning.main,.5)};
104
- --md-code-hl-keyword-color: ${U.palette.type==="dark"?U.palette.primary.light:U.palette.primary.dark};
105
- --md-code-hl-function-color: ${U.palette.type==="dark"?U.palette.secondary.light:U.palette.secondary.dark};
106
- --md-code-hl-string-color: ${U.palette.type==="dark"?U.palette.success.light:U.palette.success.dark};
107
- --md-code-hl-number-color: ${U.palette.type==="dark"?U.palette.error.light:U.palette.error.dark};
108
- --md-code-hl-constant-color: var(--md-code-hl-function-color);
109
- --md-code-hl-special-color: var(--md-code-hl-function-color);
110
- --md-code-hl-name-color: var(--md-code-fg-color);
111
- --md-code-hl-comment-color: var(--md-default-fg-color--light);
112
- --md-code-hl-generic-color: var(--md-default-fg-color--light);
113
- --md-code-hl-variable-color: var(--md-default-fg-color--light);
114
- --md-code-hl-operator-color: var(--md-default-fg-color--light);
115
- --md-code-hl-punctuation-color: var(--md-default-fg-color--light);
116
-
117
- /* TYPESET */
118
- --md-typeset-font-size: 1rem;
119
- --md-typeset-color: var(--md-default-fg-color);
120
- --md-typeset-a-color: var(--md-accent-fg-color);
121
- --md-typeset-table-color: ${U.palette.text.primary};
122
- --md-typeset-del-color: ${U.palette.type==="dark"?(0,we.Fq)(U.palette.error.dark,.5):(0,we.Fq)(U.palette.error.light,.5)};
123
- --md-typeset-ins-color: ${U.palette.type==="dark"?(0,we.Fq)(U.palette.success.dark,.5):(0,we.Fq)(U.palette.success.light,.5)};
124
- --md-typeset-mark-color: ${U.palette.type==="dark"?(0,we.Fq)(U.palette.warning.dark,.5):(0,we.Fq)(U.palette.warning.light,.5)};
125
- }
126
-
127
- @media screen and (max-width: 76.1875em) {
128
- :host > * {
129
- /* TYPESET */
130
- --md-typeset-font-size: .9rem;
131
- }
132
- }
133
-
134
- @media screen and (max-width: 600px) {
135
- :host > * {
136
- /* TYPESET */
137
- --md-typeset-font-size: .7rem;
138
- }
139
- }
140
- `,lt=({theme:U})=>`
141
- /*================== Reset ==================*/
142
-
143
- body {
144
- --md-text-color: var(--md-default-fg-color);
145
- --md-text-link-color: var(--md-accent-fg-color);
146
- --md-text-font-family: ${U.typography.fontFamily};
147
- font-family: var(--md-text-font-family);
148
- background-color: unset;
149
- }
150
- `;const Qe="224px";var Ct=({theme:U,sidebar:re})=>`
151
- /*================== Layout ==================*/
152
-
153
- .md-grid {
154
- max-width: 100%;
155
- margin: 0;
156
- }
157
-
158
- .md-nav {
159
- font-size: calc(var(--md-typeset-font-size) * 0.9);
160
- }
161
- .md-nav__link {
162
- display: flex;
163
- align-items: center;
164
- justify-content: space-between;
165
- }
166
- .md-nav__icon {
167
- height: 20px !important;
168
- width: 20px !important;
169
- margin-left:${U.spacing(1)}px;
170
- }
171
- .md-nav__icon svg {
172
- margin: 0;
173
- width: 20px !important;
174
- height: 20px !important;
175
- }
176
- .md-nav__icon:after {
177
- width: 20px !important;
178
- height: 20px !important;
179
- }
180
-
181
- .md-main__inner {
182
- margin-top: 0;
183
- }
184
-
185
- .md-sidebar {
186
- bottom: 75px;
187
- position: fixed;
188
- width: 16rem;
189
- overflow-y: auto;
190
- overflow-x: hidden;
191
- scrollbar-color: rgb(193, 193, 193) #eee;
192
- scrollbar-width: thin;
193
- }
194
- .md-sidebar .md-sidebar__scrollwrap {
195
- width: calc(12.1rem);
196
- }
197
- .md-sidebar--secondary {
198
- right: ${U.spacing(3)}px;
199
- }
200
- .md-sidebar::-webkit-scrollbar {
201
- width: 5px;
202
- }
203
- .md-sidebar::-webkit-scrollbar-button {
204
- width: 5px;
205
- height: 5px;
206
- }
207
- .md-sidebar::-webkit-scrollbar-track {
208
- background: #eee;
209
- border: 1 px solid rgb(250, 250, 250);
210
- box-shadow: 0px 0px 3px #dfdfdf inset;
211
- border-radius: 3px;
212
- }
213
- .md-sidebar::-webkit-scrollbar-thumb {
214
- width: 5px;
215
- background: rgb(193, 193, 193);
216
- border: transparent;
217
- border-radius: 3px;
218
- }
219
- .md-sidebar::-webkit-scrollbar-thumb:hover {
220
- background: rgb(125, 125, 125);
221
- }
222
-
223
- .md-content {
224
- max-width: calc(100% - 16rem * 2);
225
- margin-left: 16rem;
226
- margin-bottom: 50px;
227
- }
228
-
229
- .md-footer {
230
- position: fixed;
231
- bottom: 0px;
232
- }
233
- .md-footer__title {
234
- background-color: unset;
235
- }
236
- .md-footer-nav__link {
237
- width: 16rem;
238
- }
239
-
240
- .md-dialog {
241
- background-color: unset;
242
- }
243
-
244
- @media screen and (min-width: 76.25em) {
245
- .md-sidebar {
246
- height: auto;
247
- }
248
- }
249
-
250
- @media screen and (max-width: 76.1875em) {
251
- .md-nav {
252
- transition: none !important;
253
- background-color: var(--md-default-bg-color)
254
- }
255
- .md-nav--primary .md-nav__title {
256
- cursor: auto;
257
- color: var(--md-default-fg-color);
258
- font-weight: 700;
259
- white-space: normal;
260
- line-height: 1rem;
261
- height: auto;
262
- display: flex;
263
- flex-flow: column;
264
- row-gap: 1.6rem;
265
- padding: 1.2rem .8rem .8rem;
266
- background-color: var(--md-default-bg-color);
267
- }
268
- .md-nav--primary .md-nav__title~.md-nav__list {
269
- box-shadow: none;
270
- }
271
- .md-nav--primary .md-nav__title ~ .md-nav__list > :first-child {
272
- border-top: none;
273
- }
274
- .md-nav--primary .md-nav__title .md-nav__button {
275
- display: none;
276
- }
277
- .md-nav--primary .md-nav__title .md-nav__icon {
278
- color: var(--md-default-fg-color);
279
- position: static;
280
- height: auto;
281
- margin: 0 0 0 -0.2rem;
282
- }
283
- .md-nav--primary > .md-nav__title [for="none"] {
284
- padding-top: 0;
285
- }
286
- .md-nav--primary .md-nav__item {
287
- border-top: none;
288
- }
289
- .md-nav--primary :is(.md-nav__title,.md-nav__item) {
290
- font-size : var(--md-typeset-font-size);
291
- }
292
- .md-nav .md-source {
293
- display: none;
294
- }
295
-
296
- .md-sidebar {
297
- height: 100%;
298
- }
299
- .md-sidebar--primary {
300
- width: 12.1rem !important;
301
- z-index: 200;
302
- left: ${re.isPinned?`calc(-12.1rem + ${Qe})`:"calc(-12.1rem + 72px)"} !important;
303
- }
304
- .md-sidebar--secondary:not([hidden]) {
305
- display: none;
306
- }
307
-
308
- .md-content {
309
- max-width: 100%;
310
- margin-left: 0;
311
- }
312
-
313
- .md-header__button {
314
- margin: 0.4rem 0;
315
- margin-left: 0.4rem;
316
- padding: 0;
317
- }
318
-
319
- .md-overlay {
320
- left: 0;
321
- }
322
-
323
- .md-footer {
324
- position: static;
325
- padding-left: 0;
326
- }
327
- .md-footer-nav__link {
328
- /* footer links begin to overlap at small sizes without setting width */
329
- width: 50%;
330
- }
331
- }
332
-
333
- @media screen and (max-width: 600px) {
334
- .md-sidebar--primary {
335
- left: -12.1rem !important;
336
- width: 12.1rem;
337
- }
338
- }
339
- `;const oe=["h1","h2","h3","h4","h5","h6"];var ue=({theme:U})=>`
340
- /*================== Typeset ==================*/
341
-
342
- .md-typeset {
343
- font-size: var(--md-typeset-font-size);
344
- }
345
-
346
- ${oe.reduce((re,te)=>{var Ft;const ve=(Ft=U.typography.htmlFontSize)!=null?Ft:16,Ne=U.typography[te],{lineHeight:ht,fontFamily:He,fontWeight:Zt,fontSize:Wt}=Ne,Ht=vt=>{let kt=1;return typeof vt=="number"&&(kt=vt/ve),typeof vt=="string"&&(kt=vt.replace("rem","")),`calc(${kt} * var(--md-typeset-font-size))`};return re.concat(`
347
- .md-typeset ${te} {
348
- color: var(--md-default-fg-color);
349
- line-height: ${ht};
350
- font-family: ${He};
351
- font-weight: ${Zt};
352
- font-size: ${Ht(Wt)};
353
- }
354
- `)},"")}
355
-
356
- .md-typeset .md-content__button {
357
- color: var(--md-default-fg-color);
358
- }
359
-
360
- .md-typeset hr {
361
- border-bottom: 0.05rem dotted ${U.palette.divider};
362
- }
363
-
364
- .md-typeset details {
365
- font-size: var(--md-typeset-font-size) !important;
366
- }
367
- .md-typeset details summary {
368
- padding-left: 2.5rem !important;
369
- }
370
- .md-typeset details summary:before,
371
- .md-typeset details summary:after {
372
- top: 50% !important;
373
- width: 20px !important;
374
- height: 20px !important;
375
- transform: rotate(0deg) translateY(-50%) !important;
376
- }
377
- .md-typeset details[open] > summary:after {
378
- transform: rotate(90deg) translateX(-50%) !important;
379
- }
380
-
381
- .md-typeset blockquote {
382
- color: var(--md-default-fg-color--light);
383
- border-left: 0.2rem solid var(--md-default-fg-color--light);
384
- }
385
-
386
- .md-typeset table:not([class]) {
387
- font-size: var(--md-typeset-font-size);
388
- border: 1px solid var(--md-default-fg-color);
389
- border-bottom: none;
390
- border-collapse: collapse;
391
- }
392
- .md-typeset table:not([class]) th {
393
- font-weight: bold;
394
- }
395
- .md-typeset table:not([class]) td, .md-typeset table:not([class]) th {
396
- border-bottom: 1px solid var(--md-default-fg-color);
397
- }
398
-
399
- .md-typeset pre > code::-webkit-scrollbar-thumb {
400
- background-color: hsla(0, 0%, 0%, 0.32);
401
- }
402
- .md-typeset pre > code::-webkit-scrollbar-thumb:hover {
403
- background-color: hsla(0, 0%, 0%, 0.87);
404
- }
405
- `,Xe=()=>`
406
- /*================== Animations ==================*/
407
- /*
408
- Disable CSS animations on link colors as they lead to issues in dark mode.
409
- The dark mode color theme is applied later and theirfore there is always an animation from light to dark mode when navigation between pages.
410
- */
411
- .md-dialog, .md-nav__link, .md-footer__link, .md-typeset a, .md-typeset a::before, .md-typeset .headerlink {
412
- transition: none;
413
- }
414
- `,Ge=({theme:U})=>`
415
- /*================== Extensions ==================*/
416
-
417
- /* HIGHLIGHT */
418
- .highlight .md-clipboard:after {
419
- content: unset;
420
- }
421
-
422
- .highlight .nx {
423
- color: ${U.palette.type==="dark"?"#ff53a3":"#ec407a"};
424
- }
425
-
426
- /* CODE HILITE */
427
- .codehilite .gd {
428
- background-color: ${U.palette.type==="dark"?"rgba(248,81,73,0.65)":"#fdd"};
429
- }
430
-
431
- .codehilite .gi {
432
- background-color: ${U.palette.type==="dark"?"rgba(46,160,67,0.65)":"#dfd"};
433
- }
434
-
435
- /* TABBED */
436
- .tabbed-set>input:nth-child(1):checked~.tabbed-labels>:nth-child(1),
437
- .tabbed-set>input:nth-child(2):checked~.tabbed-labels>:nth-child(2),
438
- .tabbed-set>input:nth-child(3):checked~.tabbed-labels>:nth-child(3),
439
- .tabbed-set>input:nth-child(4):checked~.tabbed-labels>:nth-child(4),
440
- .tabbed-set>input:nth-child(5):checked~.tabbed-labels>:nth-child(5),
441
- .tabbed-set>input:nth-child(6):checked~.tabbed-labels>:nth-child(6),
442
- .tabbed-set>input:nth-child(7):checked~.tabbed-labels>:nth-child(7),
443
- .tabbed-set>input:nth-child(8):checked~.tabbed-labels>:nth-child(8),
444
- .tabbed-set>input:nth-child(9):checked~.tabbed-labels>:nth-child(9),
445
- .tabbed-set>input:nth-child(10):checked~.tabbed-labels>:nth-child(10),
446
- .tabbed-set>input:nth-child(11):checked~.tabbed-labels>:nth-child(11),
447
- .tabbed-set>input:nth-child(12):checked~.tabbed-labels>:nth-child(12),
448
- .tabbed-set>input:nth-child(13):checked~.tabbed-labels>:nth-child(13),
449
- .tabbed-set>input:nth-child(14):checked~.tabbed-labels>:nth-child(14),
450
- .tabbed-set>input:nth-child(15):checked~.tabbed-labels>:nth-child(15),
451
- .tabbed-set>input:nth-child(16):checked~.tabbed-labels>:nth-child(16),
452
- .tabbed-set>input:nth-child(17):checked~.tabbed-labels>:nth-child(17),
453
- .tabbed-set>input:nth-child(18):checked~.tabbed-labels>:nth-child(18),
454
- .tabbed-set>input:nth-child(19):checked~.tabbed-labels>:nth-child(19),
455
- .tabbed-set>input:nth-child(20):checked~.tabbed-labels>:nth-child(20) {
456
- color: var(--md-accent-fg-color);
457
- border-color: var(--md-accent-fg-color);
458
- }
459
-
460
- /* TASK-LIST */
461
- .task-list-control .task-list-indicator::before {
462
- background-color: ${U.palette.action.disabledBackground};
463
- }
464
- .task-list-control [type="checkbox"]:checked + .task-list-indicator:before {
465
- background-color: ${U.palette.success.main};
466
- }
467
-
468
- /* ADMONITION */
469
- .admonition {
470
- font-size: var(--md-typeset-font-size) !important;
471
- }
472
- .admonition .admonition-title {
473
- padding-left: 2.5rem !important;
474
- }
475
-
476
- .admonition .admonition-title:before {
477
- top: 50% !important;
478
- width: 20px !important;
479
- height: 20px !important;
480
- transform: translateY(-50%) !important;
481
- }
482
- `;const $e=[Ve,lt,Ct,ue,Xe,Ge],ct=()=>(0,R.useSidebarPinState)(),Y=()=>{const U=ct(),re=(0,se.Z)();return(0,r.useMemo)(()=>{const te={theme:re,sidebar:U};return $e.reduce((ve,Ne)=>ve+Ne(te),"")},[re,U])},Z=()=>{const U=Y();return(0,r.useCallback)(re=>(re.getElementsByTagName("head")[0].insertAdjacentHTML("beforeend",`<style>${U}</style>`),re),[U])},q=(U,re,te)=>{const ve=U==="src"&&re.endsWith(".svg"),Ne=!re.match(/^([a-z]*:)?\/\//i),ht=re.startsWith(te);return ve&&(Ne||ht)},ie=({techdocsStorageApi:U,entityId:re,path:te})=>async ve=>{const Ne=await U.getApiOrigin(),ht=async(He,Zt)=>{for(const Wt of He)if(Wt.hasAttribute(Zt)){const Ht=Wt.getAttribute(Zt);if(!Ht)return;const Ft=await U.getBaseUrl(Ht,re,te);if(q(Zt,Ht,Ne))try{const kt=await(await fetch(Ft,{credentials:"include"})).text();Wt.setAttribute(Zt,`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(kt)))}`)}catch{Wt.setAttribute("alt",`Error: ${Ht}`)}else Wt.setAttribute(Zt,Ft)}};return await Promise.all([ht(ve.querySelectorAll("img"),"src"),ht(ve.querySelectorAll("script"),"src"),ht(ve.querySelectorAll("source"),"src"),ht(ve.querySelectorAll("link"),"href"),ht(ve.querySelectorAll("a[download]"),"href")]),ve};var me=e(68370),be=e(67097),Le=e(47093),Se=e(82717),_e=e.n(Se);const ke=U=>re=>{var kt;const te=re.querySelector('[title="Edit this page"]');if(!te||!te.href)return re;const ve=new URL(te.href),Ne=U.byUrl(ve);if((Ne==null?void 0:Ne.type)!=="github"&&(Ne==null?void 0:Ne.type)!=="gitlab")return re;const ht=((kt=re.querySelector("article>h1"))==null?void 0:kt.childNodes[0].textContent)||"",He=encodeURIComponent(`Documentation Feedback: ${ht}`),Zt=encodeURIComponent(`Page source:
483
- ${te.href}
484
-
485
- Feedback:`),Wt=(Ne==null?void 0:Ne.type)==="github"?(0,me.Pb)(ve.href,"blob"):ve.href,Ht=_e()(Wt),Ft=`/${Ht.organization}/${Ht.name}`,vt=te.cloneNode();switch(Ne==null?void 0:Ne.type){case"gitlab":vt.href=`${ve.origin}${Ft}/issues/new?issue[title]=${He}&issue[description]=${Zt}`;break;case"github":vt.href=`${ve.origin}${Ft}/issues/new?title=${He}&body=${Zt}`;break;default:return re}return Le.render(r.createElement(be.Z),vt),vt.style.paddingLeft="5px",vt.title="Leave feedback for this page",vt.id="git-feedback-link",te==null||te.insertAdjacentElement("beforebegin",vt),re};var Et=e(44882);const St=()=>U=>{const re=U.querySelector('.md-header label[for="__drawer"]'),te=U.querySelector("article");if(!re||!te)return U;const ve=re.cloneNode();return Le.render(r.createElement(Et.Z),ve),ve.id="toggle-sidebar",ve.title="Toggle Sidebar",ve.classList.add("md-content__button"),ve.style.setProperty("padding","0 0 0 5px"),ve.style.setProperty("margin","0.4rem 0 0.4rem 0.4rem"),te==null||te.prepend(ve),U},ut=()=>U=>(((te,ve)=>{Array.from(te).filter(Ne=>Ne.hasAttribute(ve)).forEach(Ne=>{const ht=Ne.getAttribute(ve);if(ht){ht.match(/^https?:\/\//i)&&Ne.setAttribute("target","_blank");try{const He=Dt(window.location.href);Ne.setAttribute(ve,new URL(ht,He).toString())}catch{Ne.replaceWith(Ne.textContent||ht)}}})})(Array.from(U.getElementsByTagName("a")),"href"),U);function Dt(U){const re=new URL(U);return!re.pathname.endsWith("/")&&!re.pathname.endsWith(".html")&&(re.pathname+="/"),re.toString()}const Ot=({baseUrl:U,onClick:re})=>te=>(Array.from(te.getElementsByTagName("a")).forEach(ve=>{ve.addEventListener("click",Ne=>{const He=ve.getAttribute("href");!He||He.startsWith(U)&&!ve.hasAttribute("download")&&(Ne.preventDefault(),re(Ne,He))})}),te);var bt=e(15459),Pt=e(80030),Ut=e(72379),Nt=e(41547);const mn=(0,bt.Z)(U=>({tooltip:{fontSize:"inherit",color:U.palette.text.primary,margin:0,padding:U.spacing(.5),backgroundColor:"transparent",boxShadow:"none"}}))(Pt.ZP),On=()=>r.createElement(Ut.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"})),Kt=({text:U})=>{const[re,te]=(0,r.useState)(!1),ve=(0,r.useCallback)(()=>{navigator.clipboard.writeText(U),te(!0)},[U]),Ne=(0,r.useCallback)(()=>{te(!1)},[te]);return r.createElement(mn,{title:"Copied to clipboard",placement:"left",open:re,onClose:Ne,leaveDelay:1e3},r.createElement("button",{className:"md-clipboard md-icon",onClick:ve},r.createElement(On,null)))},$t=U=>re=>{var ve;const te=re.querySelectorAll("pre > code");for(const Ne of te){const ht=Ne.textContent||"",He=document.createElement("div");(ve=Ne==null?void 0:Ne.parentElement)==null||ve.prepend(He),Le.render(r.createElement(Nt.Z,{theme:U},r.createElement(Kt,{text:ht})),He)}return re},nt=()=>U=>{var re;return(re=U.querySelector(".md-header"))==null||re.remove(),U},ce=()=>U=>{var re,te;return(re=U.querySelector(".md-footer .md-copyright"))==null||re.remove(),(te=U.querySelector(".md-footer-copyright"))==null||te.remove(),U},j=({onLoading:U,onLoaded:re})=>te=>(U(),te.addEventListener(i.Ox,function ve(){re(),te.removeEventListener(i.Ox,ve)}),te),ye=()=>U=>(setTimeout(()=>{var re;if(window.location.hash){const te=window.location.hash.slice(1);(re=U==null?void 0:U.querySelector(`[id="${te}"]`))==null||re.scrollIntoView()}},200),U),Ke=async(U,re)=>{let te;if(typeof U=="string")te=new DOMParser().parseFromString(U,"text/html").documentElement;else if(U instanceof Element)te=U;else throw new Error("dom is not a recognized type");for(const ve of re)te=await ve(te);return te},rt="screen and (max-width: 76.1875em)",it=U=>{const re=(0,ne.s0)(),te=(0,se.Z)(),ve=(0,Ee.Z)(rt),Ne=Me(),ht=Z(),He=(0,F.useApi)(i.Dl),Zt=(0,F.useApi)(Ue.q3),{state:Wt,path:Ht,content:Ft}=(0,D.DK)(),[vt,kt]=(0,r.useState)(null),hn=(0,i.ux)(vt),Yt=(0,r.useCallback)(()=>{if(!vt)return;vt.querySelectorAll(".md-sidebar").forEach(It=>{var cn,Sn,on;if(ve)It.style.top="0px";else{const Rn=document==null?void 0:document.querySelector(".techdocs-reader-page"),Cn=(cn=Rn==null?void 0:Rn.getBoundingClientRect().top)!=null?cn:0;let xn=(Sn=vt.getBoundingClientRect().top)!=null?Sn:0;const wn=vt.querySelector(".md-container > .md-tabs"),M=(on=wn==null?void 0:wn.getBoundingClientRect().height)!=null?on:0;xn<Cn&&(xn=Cn),It.style.top=`${Math.max(xn,0)+M}px`}It.style.setProperty("opacity","1")})},[vt,ve]);(0,r.useEffect)(()=>(window.addEventListener("resize",Yt),window.addEventListener("scroll",Yt,!0),()=>{window.removeEventListener("resize",Yt),window.removeEventListener("scroll",Yt,!0)}),[vt,Yt]);const Xt=(0,r.useCallback)(()=>{if(!vt)return;const Bt=vt.querySelector(".md-footer");Bt&&(Bt.style.width=`${vt.getBoundingClientRect().width}px`)},[vt]);(0,r.useEffect)(()=>(window.addEventListener("resize",Xt),()=>{window.removeEventListener("resize",Xt)}),[vt,Xt]),(0,r.useEffect)(()=>{hn||(Xt(),Yt())},[Wt,hn,Xt,Yt]);const rn=(0,r.useCallback)((Bt,It)=>Ke(Bt,[Ne,ie({techdocsStorageApi:He,entityId:U,path:It}),ut(),St(),nt(),ce(),ke(Zt),ht]),[U,Zt,He,Ne,ht]),an=(0,r.useCallback)(async Bt=>Ke(Bt,[ye(),$t(te),Ot({baseUrl:window.location.origin,onClick:(It,cn)=>{var Rn;const Sn=It.ctrlKey||It.metaKey,on=new URL(cn);on.hash?Sn?window.open(`${on.pathname}${on.hash}`,"_blank"):(re(`${on.pathname}${on.hash}`),(Rn=Bt==null?void 0:Bt.querySelector(`#${on.hash.slice(1)}`))==null||Rn.scrollIntoView()):Sn?window.open(on.pathname,"_blank"):re(on.pathname)}}),j({onLoading:()=>{},onLoaded:()=>{var It;(It=Bt.querySelector(".md-nav__title"))==null||It.removeAttribute("for")}}),j({onLoading:()=>{Array.from(Bt.querySelectorAll(".md-sidebar")).forEach(cn=>{cn.style.setProperty("opacity","0")})},onLoaded:()=>{}})]),[te,re]);return(0,r.useEffect)(()=>{if(!Ft)return()=>{};let Bt=!0;return rn(Ft,Ht).then(async It=>{if(!(It!=null&&It.innerHTML)||!Bt)return;window.scroll({top:0});const cn=await an(It);kt(cn)}),()=>{Bt=!1}},[Ft,Ht,rn,an]),vt};var Rt=e(8560);const Qt=()=>{const U=(0,i.$L)(),{shadowRoot:re}=(0,i.x1)(),te=re==null?void 0:re.querySelector('[data-md-component="content"]'),ve=re==null?void 0:re.querySelector('div[data-md-component="sidebar"][data-md-type="navigation"], div[data-md-component="navigation"]');let Ne=ve==null?void 0:ve.querySelector('[data-techdocs-addons-location="primary sidebar"]');Ne||(Ne=document.createElement("div"),Ne.setAttribute("data-techdocs-addons-location","primary sidebar"),ve==null||ve.prepend(Ne));const ht=re==null?void 0:re.querySelector('div[data-md-component="sidebar"][data-md-type="toc"], div[data-md-component="toc"]');let He=ht==null?void 0:ht.querySelector('[data-techdocs-addons-location="secondary sidebar"]');return He||(He=document.createElement("div"),He.setAttribute("data-techdocs-addons-location","secondary sidebar"),ht==null||ht.prepend(He)),r.createElement(r.Fragment,null,r.createElement(Rt.Z,{container:Ne},U.renderComponentsByLocation(i.oZ.PrimarySidebar)),r.createElement(Rt.Z,{container:te},U.renderComponentsByLocation(i.oZ.Content)),r.createElement(Rt.Z,{container:He},U.renderComponentsByLocation(i.oZ.SecondarySidebar)))},en=(0,t.Z)({search:{width:"100%","@media (min-width: 76.1875em)":{width:"calc(100% - 34.4rem)",margin:"0 auto"}}}),tn=(0,D.m1)(U=>{var Ft;const{withSearch:re=!0,onReady:te}=U,ve=en(),{entityMetadata:{value:Ne,loading:ht},entityRef:He,setShadowRoot:Zt}=(0,i.x1)(),Wt=it(He),Ht=(0,r.useCallback)(vt=>{Zt(vt),te instanceof Function&&te()},[Zt,te]);return ht===!1&&!Ne?r.createElement(R.ErrorPage,{status:"404",statusMessage:"PAGE NOT FOUND"}):Wt?r.createElement(R.Content,null,r.createElement(d.Z,{container:!0},r.createElement(d.Z,{xs:12,item:!0},r.createElement(K,null)),re&&r.createElement(d.Z,{className:ve.search,xs:"auto",item:!0},r.createElement(c.S,{entityId:He,entityTitle:(Ft=Ne==null?void 0:Ne.metadata)==null?void 0:Ft.title})),r.createElement(d.Z,{xs:12,item:!0},r.createElement(i.VA,{element:Wt,onAppend:Ht},r.createElement(Qt,null))))):r.createElement(R.Content,null,r.createElement(d.Z,{container:!0},r.createElement(d.Z,{xs:12,item:!0},r.createElement(K,null))))}),En=null},99954:function(ee,s,e){"use strict";e.d(s,{S:function(){return E}});var r=e(2784),t=e(18671),d=e(98069),i=e(73250),R=e(26136),c=e(17429),o=e(48023),u=e(82339),m=e(36964),y=e(68725);const g=r.createElement(d.Z,{animation:"wave",variant:"text",height:40}),E=S=>{const{children:b}=S,x=(0,R.$L)(),w=(0,m.useApi)(m.configApiRef),{title:B,setTitle:F,subtitle:O,setSubtitle:D,entityRef:$,metadata:{value:K,loading:ne},entityMetadata:{value:se,loading:Ee}}=(0,R.x1)();(0,r.useEffect)(()=>{!K||(F(qe=>{const{site_name:le}=K;return qe||le}),D(qe=>{let{site_description:le}=K;return(!le||le==="None")&&(le="Home"),qe||le}))},[K,F,D]);const Ue=w.getOptional("app.title")||"Backstage",xe=[B,O,Ue].filter(Boolean).join(" | "),{locationMetadata:We,spec:Re}=se||{},Je=Re==null?void 0:Re.lifecycle,at=se?(0,c.getEntityRelations)(se,o.S4):[],Tt=(0,m.useRouteRef)(y._Z)(),yt=r.createElement(r.Fragment,null,r.createElement(u.HeaderLabel,{label:"Component",value:r.createElement(c.EntityRefLink,{color:"inherit",entityRef:$,title:se==null?void 0:se.metadata.title,defaultKind:"Component"})}),at.length>0&&r.createElement(u.HeaderLabel,{label:"Owner",value:r.createElement(c.EntityRefLinks,{color:"inherit",entityRefs:at,defaultKind:"group"})}),Je?r.createElement(u.HeaderLabel,{label:"Lifecycle",value:Je}):null,We&&We.type!=="dir"&&We.type!=="file"?r.createElement(u.HeaderLabel,{label:"",value:r.createElement("a",{href:We.target,target:"_blank",rel:"noopener noreferrer"},r.createElement(i.Z,{style:{marginTop:"-25px",fill:"#fff"}}))}):null);return!Ee&&se===void 0||!ne&&K===void 0?null:r.createElement(u.Header,{type:"Documentation",typeLink:Tt,title:B||g,subtitle:O||g},r.createElement(t.Z,{titleTemplate:"%s"},r.createElement("title",null,xe)),yt,b,x.renderComponentsByLocation(R.oZ.Header))}},16172:function(ee,s,e){"use strict";e.d(s,{b:function(){return g}});var r=e(2784),t=e(79692),d=e(15223),i=e(95544),R=e(80030),c=e(61837),o=e(48348),u=e(47603),m=e(26136);const y=(0,t.Z)(E=>({root:{gridArea:"pageSubheader",flexDirection:"column",minHeight:"auto",padding:E.spacing(3,3,0)}})),g=({toolbarProps:E})=>{const S=y(),[b,x]=(0,r.useState)(null),w=(0,r.useCallback)(ne=>{x(ne.currentTarget)},[]),B=(0,r.useCallback)(()=>{x(null)},[]),{entityMetadata:{value:F,loading:O}}=(0,m.x1)(),D=(0,m.$L)(),$=D.renderComponentsByLocation(m.oZ.Subheader),K=D.renderComponentsByLocation(m.oZ.Settings);return!$&&!K||O===!1&&!F?null:r.createElement(d.Z,{classes:S,...E},r.createElement(i.Z,{display:"flex",justifyContent:"flex-end",width:"100%",flexWrap:"wrap"},$,K?r.createElement(r.Fragment,null,r.createElement(R.ZP,{title:"Settings"},r.createElement(c.Z,{"aria-controls":"tech-docs-reader-page-settings","aria-haspopup":"true",onClick:w},r.createElement(u.Z,null))),r.createElement(o.Z,{id:"tech-docs-reader-page-settings",getContentAnchorEl:null,anchorEl:b,anchorOrigin:{vertical:"bottom",horizontal:"right"},open:Boolean(b),onClose:B,keepMounted:!0},K)):null))}},2263:function(ee,s,e){"use strict";e.d(s,{DK:function(){return g},m1:function(){return S}});var r=e(2784),t=e(10289),d=e(26136),i=e(36964),R=e(64279),c=e(77446);function o({contentLoading:b,content:x,activeSyncState:w}){return b||w==="BUILD_READY_RELOAD"||!x&&w==="CHECKING"?"CHECKING":!x&&w==="BUILDING"?"INITIAL_BUILD":x?w==="BUILDING"?"CONTENT_STALE_REFRESHING":w==="BUILD_READY"?"CONTENT_STALE_READY":w==="ERROR"?"CONTENT_STALE_ERROR":"CONTENT_FRESH":"CONTENT_NOT_FOUND"}function u(b,x){const w={...b};switch(x.type){case"sync":x.state==="CHECKING"&&(w.buildLog=[]),w.activeSyncState=x.state,w.syncError=x.syncError;break;case"contentLoading":w.contentLoading=!0,w.contentError=void 0;break;case"content":typeof x.path=="string"&&(w.path=x.path),w.contentLoading=!1,w.content=x.content,w.contentError=x.contentError;break;case"buildLog":w.buildLog=w.buildLog.concat(x.log);break;default:throw new Error}return["BUILD_READY","BUILD_READY_RELOAD"].includes(w.activeSyncState)&&["contentLoading","content"].includes(x.type)&&(w.activeSyncState="UP_TO_DATE",w.buildLog=[]),w}function m(b,x,w,B){var se,Ee;const[F,O]=(0,r.useReducer)(u,{activeSyncState:"CHECKING",path:B,contentLoading:!0,buildLog:[]}),D=(0,i.useApi)(d.Dl),{retry:$}=(0,c.Z)(async()=>{O({type:"contentLoading"});try{const Ue=await D.getEntityDocs({kind:b,namespace:x,name:w},B);return O({type:"content",content:Ue,path:B}),Ue}catch(Ue){O({type:"content",contentError:Ue,path:B})}},[D,b,x,w,B]),K=(0,r.useRef)({content:void 0,reload:()=>{}});return K.current={content:F.content,reload:$},(0,R.default)(async()=>{O({type:"sync",state:"CHECKING"});const Ue=setTimeout(()=>{O({type:"sync",state:"BUILDING"})},1e3);try{switch(await D.syncEntityDocs({kind:b,namespace:x,name:w},We=>{O({type:"buildLog",log:We})})){case"updated":K.current.content?O({type:"sync",state:"BUILD_READY"}):(K.current.reload(),O({type:"sync",state:"BUILD_READY_RELOAD"}));break;case"cached":O({type:"sync",state:"UP_TO_DATE"});break;default:O({type:"sync",state:"ERROR",syncError:new Error("Unexpected return state")});break}}catch(xe){O({type:"sync",state:"ERROR",syncError:xe})}finally{clearTimeout(Ue)}},[b,w,x,D,O,K]),{state:(0,r.useMemo)(()=>o({activeSyncState:F.activeSyncState,contentLoading:F.contentLoading,content:F.content}),[F.activeSyncState,F.content,F.contentLoading]),contentReload:$,path:F.path,content:F.content,contentErrorMessage:(se=F.contentError)==null?void 0:se.toString(),syncErrorMessage:(Ee=F.syncError)==null?void 0:Ee.toString(),buildLog:F.buildLog}}const y=(0,r.createContext)({}),g=()=>(0,r.useContext)(y),E=({children:b})=>{const{"*":x=""}=(0,t.UO)(),{entityRef:w}=(0,d.x1)(),{kind:B,namespace:F,name:O}=w,D=m(B,F,O,x);return r.createElement(y.Provider,{value:D},b instanceof Function?b(D):b)},S=b=>x=>r.createElement(E,null,r.createElement(b,{...x}))},96393:function(ee,s,e){"use strict";e.d(s,{Fq:function(){return i.F},SE:function(){return d.S}});var r=e(2263),t=e(26220),d=e(99954),i=e(63126),R=e(16172)},68725:function(ee,s,e){"use strict";e.d(s,{Fw:function(){return d},_Z:function(){return t},pd:function(){return i}});var r=e(36964);const t=(0,r.createRouteRef)({id:"techdocs:index-page"}),d=(0,r.createRouteRef)({id:"techdocs:reader-page",params:["namespace","kind","name"]}),i=(0,r.createRouteRef)({id:"techdocs:catalog-reader-view"})},47861:function(ee,s,e){"use strict";e.d(s,{S:function(){return K}});var r=e(2784),t=e(79692),d=e(49378),i=e(38402),R=e(86136),c=e(85256),o=e(82339),u=e(36964),m=e(74450);const y=(0,t.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",marginBottom:"1rem"}}),g=ne=>{const{result:se,highlight:Ee,rank:Ue,lineClamp:xe=5,asListItem:We=!0,asLink:Re=!0,title:Je,icon:at}=ne,Tt=y(),yt=(0,u.useAnalytics)(),Pe=()=>{yt.captureEvent("discover",se.title,{attributes:{to:se.location},value:Ue})},mt=()=>{const fe=Ee!=null&&Ee.fields.title?r.createElement(m.FA,{text:Ee.fields.title,preTag:Ee.preTag,postTag:Ee.postTag}):se.title,Me=Ee!=null&&Ee.fields.entityTitle?r.createElement(m.FA,{text:Ee.fields.entityTitle,preTag:Ee.preTag,postTag:Ee.postTag}):se.entityTitle,we=Ee!=null&&Ee.fields.name?r.createElement(m.FA,{text:Ee.fields.name,preTag:Ee.preTag,postTag:Ee.postTag}):se.name;return r.createElement(d.Z,{className:Tt.itemText,primaryTypographyProps:{variant:"h6"},primary:Je||r.createElement(r.Fragment,null,fe," | ",Me!=null?Me:we," docs"),secondary:r.createElement("span",{style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:xe,overflow:"hidden"}},Ee!=null&&Ee.fields.text?r.createElement(m.FA,{text:Ee.fields.text,preTag:Ee.preTag,postTag:Ee.postTag}):se.text)})},qe=({children:fe})=>Re?r.createElement(o.Link,{noTrack:!0,to:se.location,onClick:Pe},fe):r.createElement(r.Fragment,null,fe),le=({children:fe})=>We?r.createElement(r.Fragment,null,r.createElement(i.Z,{alignItems:"flex-start"},at&&r.createElement(R.Z,null,at),r.createElement("div",{className:Tt.flexContainer},fe)),r.createElement(c.Z,{component:"li"})):r.createElement(r.Fragment,null,fe);return r.createElement(qe,null,r.createElement(le,null,r.createElement(mt,null)))};var E=e(86619),S=e(50581),b=e(61837),x=e(4614),w=e(21853),B=e(88013),F=e(10289),O=e(48760);const D=(0,t.Z)({root:{width:"100%"}}),$=ne=>{const{entityId:se,entityTitle:Ee,debounceTime:Ue=150}=ne,[xe,We]=(0,r.useState)(!1),Re=(0,F.s0)(),{term:Je,setTerm:at,setFilters:Tt,result:{loading:yt,value:Pe}}=(0,m.Rx)(),mt=D(),[qe,le]=(0,r.useState)([]);(0,r.useEffect)(()=>{let oe=!0;if(oe&&Pe){const ue=Pe.results.slice(0,10);le(ue)}return()=>{oe=!1}},[yt,Pe]);const[fe,Me]=(0,r.useState)(Je);(0,O.Z)(()=>at(fe),Ue,[fe]);const{kind:we,name:Ve,namespace:lt}=se;(0,r.useEffect)(()=>{Tt(oe=>({...oe,kind:we,namespace:lt,name:Ve}))},[we,lt,Ve,Tt]);const Qe=oe=>{xe||We(!0),Me(oe.target.value)},Ct=(oe,ue)=>{if(ue!=null&&ue.document){const{location:Xe}=ue.document;Re(Xe)}};return r.createElement(B.ZP,{classes:{root:mt.root},"data-testid":"techdocs-search-bar",size:"small",open:xe,getOptionLabel:()=>"",filterOptions:oe=>oe,onClose:()=>{We(!1)},onFocus:()=>{We(!0)},onChange:Ct,blurOnSelect:!0,noOptionsText:"No results found",value:null,options:qe,renderOption:({document:oe,highlight:ue})=>r.createElement(g,{result:oe,lineClamp:3,asListItem:!1,asLink:!1,title:oe.title,highlight:ue}),loading:yt,renderInput:oe=>r.createElement(E.Z,{...oe,"data-testid":"techdocs-search-bar-input",variant:"outlined",fullWidth:!0,placeholder:`Search ${Ee||se.name} docs`,value:fe,onChange:Qe,InputProps:{...oe.InputProps,startAdornment:r.createElement(S.Z,{position:"start"},r.createElement(b.Z,{"aria-label":"Query",disabled:!0},r.createElement(w.Z,null))),endAdornment:r.createElement(r.Fragment,null,yt?r.createElement(x.Z,{color:"inherit",size:20}):null,oe.InputProps.endAdornment)}})})},K=ne=>{const se={term:"",types:["techdocs"],pageCursor:"",filters:ne.entityId};return r.createElement(m.Nd,{initialState:se},r.createElement($,{...ne}))}},98157:function(){},53260:function(){}},function(ee){var s=function(r){return ee(ee.s=r)};ee.O(0,[2370,6202,9284,9035,2126,7012,2194,4983,3222,6816,5218,4736],function(){return s(88649),s(90775)});var e=ee.O()}]);})();
486
-
487
- //# sourceMappingURL=main.77934963.js.map