@techdocs/cli 1.1.2 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/dist/cjs/{generate-b637bb78.cjs.js → generate-e530be0d.cjs.js} +2 -2
  3. package/dist/cjs/generate-e530be0d.cjs.js.map +1 -0
  4. package/dist/embedded-app/.config-schema.json +1 -0
  5. package/dist/embedded-app/index.html +1 -1
  6. package/dist/embedded-app/static/{1553.09ef0e28.chunk.js → 1553.c2a9eb50.chunk.js} +2 -2
  7. package/dist/embedded-app/static/{1553.09ef0e28.chunk.js.map → 1553.c2a9eb50.chunk.js.map} +1 -1
  8. package/dist/embedded-app/static/{2426.56f057f3.chunk.js → 2426.32fc1ca1.chunk.js} +2 -2
  9. package/dist/embedded-app/static/{2426.56f057f3.chunk.js.map → 2426.32fc1ca1.chunk.js.map} +1 -1
  10. package/dist/embedded-app/static/3555.4d83af5a.chunk.js +8 -0
  11. package/dist/embedded-app/static/3555.4d83af5a.chunk.js.map +1 -0
  12. package/dist/embedded-app/static/{390.0d686030.chunk.js → 390.74a27040.chunk.js} +2 -2
  13. package/dist/embedded-app/static/{390.0d686030.chunk.js.map → 390.74a27040.chunk.js.map} +1 -1
  14. package/dist/embedded-app/static/{4022.7b5d6caf.chunk.js → 4022.ca590614.chunk.js} +2 -2
  15. package/dist/embedded-app/static/{4022.7b5d6caf.chunk.js.map → 4022.ca590614.chunk.js.map} +1 -1
  16. package/dist/embedded-app/static/4949.bffcfed7.chunk.js +3 -0
  17. package/dist/embedded-app/static/4949.bffcfed7.chunk.js.map +1 -0
  18. package/dist/embedded-app/static/{6235.8385fd0b.chunk.js → 6235.61c00d19.chunk.js} +2 -2
  19. package/dist/embedded-app/static/{6235.8385fd0b.chunk.js.map → 6235.61c00d19.chunk.js.map} +1 -1
  20. package/dist/embedded-app/static/{6583.19098eda.chunk.js → 6583.0b42ebbe.chunk.js} +2 -2
  21. package/dist/embedded-app/static/{6583.19098eda.chunk.js.map → 6583.0b42ebbe.chunk.js.map} +1 -1
  22. package/dist/embedded-app/static/{7110.b2c2b46c.chunk.js → 7110.135c2721.chunk.js} +2 -2
  23. package/dist/embedded-app/static/{7110.b2c2b46c.chunk.js.map → 7110.135c2721.chunk.js.map} +1 -1
  24. package/dist/embedded-app/static/7758.75aef2ae.chunk.js +3 -0
  25. package/dist/embedded-app/static/7758.75aef2ae.chunk.js.map +1 -0
  26. package/dist/embedded-app/static/{8061.411cf8de.chunk.js → 8061.f5e20bb7.chunk.js} +2 -2
  27. package/dist/embedded-app/static/{8061.411cf8de.chunk.js.map → 8061.f5e20bb7.chunk.js.map} +1 -1
  28. package/dist/embedded-app/static/{8718.b6fd1dca.chunk.js → 8718.bd799167.chunk.js} +2 -2
  29. package/dist/embedded-app/static/8718.bd799167.chunk.js.map +1 -0
  30. package/dist/embedded-app/static/{8792.bd5eec10.chunk.js → 8792.6f60e67c.chunk.js} +2 -2
  31. package/dist/embedded-app/static/{8792.bd5eec10.chunk.js.map → 8792.6f60e67c.chunk.js.map} +1 -1
  32. package/dist/embedded-app/static/{9028.afacb85a.chunk.js → 9028.1e31ab6a.chunk.js} +2 -2
  33. package/dist/embedded-app/static/{9028.afacb85a.chunk.js.map → 9028.1e31ab6a.chunk.js.map} +1 -1
  34. package/dist/embedded-app/static/main.a9307e40.js +487 -0
  35. package/dist/embedded-app/static/main.a9307e40.js.map +1 -0
  36. package/dist/embedded-app/static/module-luxon.ee0def5d.js +3 -0
  37. package/dist/embedded-app/static/module-luxon.ee0def5d.js.map +1 -0
  38. package/dist/embedded-app/static/{module-material-ui.1e05f502.js → module-material-ui.cd8dff4a.js} +11 -11
  39. package/dist/embedded-app/static/module-material-ui.cd8dff4a.js.map +1 -0
  40. package/dist/embedded-app/static/module-yaml.0874c6f8.js +136 -0
  41. package/dist/embedded-app/static/module-yaml.0874c6f8.js.map +1 -0
  42. package/dist/embedded-app/static/module-zod.53b5d347.js +3 -0
  43. package/dist/embedded-app/static/module-zod.53b5d347.js.map +1 -0
  44. package/dist/embedded-app/static/{runtime.9724fcfa.js → runtime.a9307e40.js} +2 -2
  45. package/dist/embedded-app/static/{runtime.9724fcfa.js.map → runtime.a9307e40.js.map} +1 -1
  46. package/dist/embedded-app/static/vendor.a9307e40.js +102 -0
  47. package/dist/embedded-app/static/vendor.a9307e40.js.map +1 -0
  48. package/dist/index.cjs.js +2 -2
  49. package/dist/index.cjs.js.map +1 -1
  50. package/package.json +7 -7
  51. package/dist/cjs/generate-b637bb78.cjs.js.map +0 -1
  52. package/dist/embedded-app/static/1959.9f791e1b.chunk.js +0 -8
  53. package/dist/embedded-app/static/1959.9f791e1b.chunk.js.map +0 -1
  54. package/dist/embedded-app/static/3860.30afe880.chunk.js +0 -3
  55. package/dist/embedded-app/static/3860.30afe880.chunk.js.map +0 -1
  56. package/dist/embedded-app/static/7758.94a98122.chunk.js +0 -3
  57. package/dist/embedded-app/static/7758.94a98122.chunk.js.map +0 -1
  58. package/dist/embedded-app/static/8718.b6fd1dca.chunk.js.map +0 -1
  59. package/dist/embedded-app/static/main.9724fcfa.js +0 -487
  60. package/dist/embedded-app/static/main.9724fcfa.js.map +0 -1
  61. package/dist/embedded-app/static/module-material-ui.1e05f502.js.map +0 -1
  62. package/dist/embedded-app/static/module-yaml.63d08f2d.js +0 -151
  63. package/dist/embedded-app/static/module-yaml.63d08f2d.js.map +0 -1
  64. package/dist/embedded-app/static/module-zod.2193e794.js +0 -3
  65. package/dist/embedded-app/static/module-zod.2193e794.js.map +0 -1
  66. package/dist/embedded-app/static/vendor.9724fcfa.js +0 -103
  67. package/dist/embedded-app/static/vendor.9724fcfa.js.map +0 -1
@@ -0,0 +1,487 @@
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 q=(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 A},MS:function(){return m}});var r=e(48023),t=e(10179),l=e(96279),u=e.n(l);const A=Symbol.for("CATALOG_FILTER_EXISTS_0e15b590c0b343a2bae3e787e84c2111");class m{constructor(c){q(this,"discoveryApi");q(this,"fetchApi");this.discoveryApi=c.discoveryApi,this.fetchApi=c.fetchApi||{fetch:u()}}async getEntityAncestors(c,f){const{kind:y,namespace:g,name:E}=(0,r.of)(c.entityRef);return await this.requestRequired("GET",`/entities/by-name/${encodeURIComponent(y)}/${encodeURIComponent(g)}/${encodeURIComponent(E)}/ancestry`,f)}async getLocationById(c,f){return await this.requestOptional("GET",`/locations/${encodeURIComponent(c)}`,f)}async getEntities(c,f){const{filter:y=[],fields:g=[],offset:E,limit:C,after:O}=c!=null?c:{},D=[];for(const I of[y].flat()){const x=[];for(const[M,K]of Object.entries(I))for(const le of[K].flat())le===A?x.push(encodeURIComponent(M)):typeof le=="string"&&x.push(`${encodeURIComponent(M)}=${encodeURIComponent(le)}`);x.length&&D.push(`filter=${x.join(",")}`)}g.length&&D.push(`fields=${g.map(encodeURIComponent).join(",")}`),E!==void 0&&D.push(`offset=${E}`),C!==void 0&&D.push(`limit=${C}`),O!==void 0&&D.push(`after=${encodeURIComponent(O)}`);const U=D.length?`?${D.join("&")}`:"",B=await this.requestRequired("GET",`/entities${U}`,f),b=(I,x)=>{var le,fe;if(((le=I.metadata)==null?void 0:le.name)===void 0||I.kind===void 0||((fe=x.metadata)==null?void 0:fe.name)===void 0||x.kind===void 0)return 0;const M=(0,r.eE)(I),K=(0,r.eE)(x);return M<K?-1:M>K?1:0};return{items:B.sort(b)}}async getEntityByRef(c,f){const{kind:y,namespace:g,name:E}=(0,r.of)(c);return this.requestOptional("GET",`/entities/by-name/${encodeURIComponent(y)}/${encodeURIComponent(g)}/${encodeURIComponent(E)}`,f)}async getEntityByName(c,f){const{kind:y,namespace:g="default",name:E}=c;return this.requestOptional("GET",`/entities/by-name/${encodeURIComponent(y)}/${encodeURIComponent(g)}/${encodeURIComponent(E)}`,f)}async refreshEntity(c,f){const y=await this.fetchApi.fetch(`${await this.discoveryApi.getBaseUrl("catalog")}/refresh`,{headers:{"Content-Type":"application/json",...(f==null?void 0:f.token)&&{Authorization:`Bearer ${f==null?void 0:f.token}`}},method:"POST",body:JSON.stringify({entityRef:c})});if(y.status!==200)throw new Error(await y.text())}async getEntityFacets(c,f){const{filter:y=[],facets:g}=c,E=[];for(const O of[y].flat()){const D=[];for(const[U,B]of Object.entries(O))for(const b of[B].flat())b===A?D.push(encodeURIComponent(U)):typeof b=="string"&&D.push(`${encodeURIComponent(U)}=${encodeURIComponent(b)}`);D.length&&E.push(`filter=${D.join(",")}`)}for(const O of g)E.push(`facet=${encodeURIComponent(O)}`);const C=E.length?`?${E.join("&")}`:"";return await this.requestOptional("GET",`/entity-facets${C}`,f)}async addLocation({type:c="url",target:f,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:c,target:f})});if(E.status!==201)throw new Error(await E.text());const{location:C,entities:O,exists:D}=await E.json();if(!C)throw new Error(`Location wasn't added: ${f}`);return{location:C,entities:O,exists:D}}async getLocationByRef(c,f){return(await this.requestRequired("GET","/locations",f)).map(g=>g.data).find(g=>c===(0,r.NZ)(g))}async removeLocationById(c,f){await this.requestIgnored("DELETE",`/locations/${encodeURIComponent(c)}`,f)}async removeEntityByUid(c,f){await this.requestIgnored("DELETE",`/entities/by-uid/${encodeURIComponent(c)}`,f)}async requestIgnored(c,f,y){const g=`${await this.discoveryApi.getBaseUrl("catalog")}${f}`,E=y!=null&&y.token?{Authorization:`Bearer ${y.token}`}:{},C=await this.fetchApi.fetch(g,{method:c,headers:E});if(!C.ok)throw await t.VL.fromResponse(C)}async requestRequired(c,f,y){const g=`${await this.discoveryApi.getBaseUrl("catalog")}${f}`,E=y!=null&&y.token?{Authorization:`Bearer ${y.token}`}:{},C=await this.fetchApi.fetch(g,{method:c,headers:E});if(!C.ok)throw await t.VL.fromResponse(C);return await C.json()}async requestOptional(c,f,y){const g=`${await this.discoveryApi.getBaseUrl("catalog")}${f}`,E=y!=null&&y.token?{Authorization:`Bearer ${y.token}`}:{},C=await this.fetchApi.fetch(g,{method:c,headers:E});if(!C.ok){if(C.status===404)return;throw await t.VL.fromResponse(C)}return await C.json()}}},48023:function(ee,s,e){"use strict";e.d(s,{Tf:function(){return l},P1:function(){return Nt},q1:function(){return gn},M6:function(){return In},l2:function(){return t},zG:function(){return r},w$:function(){return be},nP:function(){return ce},aS:function(){return St},S4:function(){return Ue},cz:function(){return vt},iB:function(){return It},CV:function(){return _e},of:function(){return Et},Ou:function(){return Zt},eE:function(){return Pe},NZ:function(){return Ht}});const r="default",t="backstage.io/view-url",l="backstage.io/edit-url",u="kubernetes.io/api-server",A="kubernetes.io/api-server-certificate-authority",m="kubernetes.io/auth-provider";var o=e(76635),c=e.n(o);class f{constructor(V=DEFAULT_NAMESPACE){q(this,"namespace");this.namespace=V}async enforce(V){return V.metadata.namespace?V:lodash.merge({metadata:{namespace:this.namespace}},V)}}class y{static isValidPrefixAndOrSuffix(V,ye,Ve,tt){if(typeof V!="string")return!1;const nt=V.split(ye);return nt.length===1?tt(nt[0]):nt.length===2?Ve(nt[0])&&tt(nt[1]):!1}static isJsonSafe(V){try{return c().isEqual(V,JSON.parse(JSON.stringify(V)))}catch{return!1}}static isValidDnsSubdomain(V){return typeof V=="string"&&V.length>=1&&V.length<=253&&V.split(".").every(y.isValidDnsLabel)}static isValidDnsLabel(V){return typeof V=="string"&&V.length>=1&&V.length<=63&&/^[a-z0-9]+(\-[a-z0-9]+)*$/.test(V)}static isValidTag(V){return typeof V=="string"&&V.length>=1&&V.length<=63&&/^[a-z0-9+#]+(\-[a-z0-9+#]+)*$/.test(V)}static isValidUrl(V){if(typeof V!="string")return!1;try{return new URL(V),!0}catch{return!1}}static isValidString(V){var ye;return typeof V=="string"&&((ye=V==null?void 0:V.trim())==null?void 0:ye.length)>=1}static isNonEmptyString(V){var ye;return typeof V=="string"&&((ye=V==null?void 0:V.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),C=e.n(E),O=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"}}}`),D=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}}}}}}'),U=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,b=[g,O,D,U];function I(ie){if(!(ie!=null&&ie.length))throw new TypeError("Unknown error");const V=ie[0];throw new TypeError(`${V.instancePath||"<root>"} ${V.message}${V.params?` - ${Object.entries(V.params).map(([ye,Ve])=>`${ye}: ${Ve}`).join(", ")}`:""}`)}function x(ie,V={}){var jt;const ye=(jt=V==null?void 0:V.disableCache)!=null?jt:!1,Ve=ye?"":JSON.stringify(ie);if(!ye){const mn=B.get(Ve);if(mn)return mn}const tt=M(ie),nt=new(C())({allowUnionTypes:!0,allErrors:!0,validateSchema:!0});tt.length&&nt.addSchema(tt,void 0,void 0,!0);const Tt=nt.compile(ie);return ye||B.set(Ve,Tt),Tt}function M(ie){if(typeof ie!="object")return[];const V=new Set;ie.$id&&V.add(ie.$id);const ye=new Array,Ve=[ie];for(;Ve.length;){const tt=Ve.pop();for(const nt of K(tt))if(!V.has(nt)){V.add(nt);const Tt=b.find(jt=>jt.$id===nt);Tt&&(ye.push(Tt),Ve.push(Tt))}}return ye}function*K(ie){const V=[ie];for(;V.length;){const ye=V.pop();if(typeof ye=="object"&&ye)for(const[Ve,tt]of Object.entries(ye))Ve==="$ref"&&typeof tt=="string"?yield tt.split("#")[0]:V.push(tt)}}function le(ie){const V=compileAjvSchema(ie||entityEnvelopeSchema);return ye=>{if(V(ye)===!0)return ye;throw throwAjvError(V.errors)}}function fe(ie){const V=x(ie);return ye=>{var nt;if(V(ye)===!0)return ye;const tt=(nt=V.errors)==null?void 0:nt.filter(Tt=>["/kind","/apiVersion"].includes(Tt.instancePath));if((tt==null?void 0:tt.length)&&tt.every(Tt=>Tt.keyword==="enum"))return!1;throw I(V.errors)}}function Ae(ie){const V=compileAjvSchema(ie||entitySchema);return ye=>{if(V(ye)===!0)return ye;throw throwAjvError(V.errors)}}class xe{static isValidApiVersion(V){return y.isValidPrefixAndOrSuffix(V,"/",y.isValidDnsSubdomain,ye=>ye.length>=1&&ye.length<=63&&/^[a-z0-9A-Z]+$/.test(ye))}static isValidKind(V){return typeof V=="string"&&V.length>=1&&V.length<=63&&/^[a-zA-Z][a-z0-9A-Z]*$/.test(V)}static isValidObjectName(V){return typeof V=="string"&&V.length>=1&&V.length<=63&&/^([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$/.test(V)}static isValidNamespace(V){return y.isValidDnsLabel(V)}static isValidLabelKey(V){return y.isValidPrefixAndOrSuffix(V,"/",y.isValidDnsSubdomain,xe.isValidObjectName)}static isValidLabelValue(V){return V===""||xe.isValidObjectName(V)}static isValidAnnotationKey(V){return y.isValidPrefixAndOrSuffix(V,"/",y.isValidDnsSubdomain,xe.isValidObjectName)}static isValidAnnotationValue(V){return typeof V=="string"}}const ze={isValidApiVersion:xe.isValidApiVersion,isValidKind:xe.isValidKind,isValidEntityName:xe.isValidObjectName,isValidNamespace:xe.isValidNamespace,isValidLabelKey:xe.isValidLabelKey,isValidLabelValue:xe.isValidLabelValue,isValidAnnotationKey:xe.isValidAnnotationKey,isValidAnnotationValue:xe.isValidAnnotationValue,isValidTag:ie=>typeof ie=="string"&&ie.length>=1&&ie.length<=63&&/^[a-z0-9:+#]+(\-[a-z0-9:+#]+)*$/.test(ie)};function He(ie={}){return{...ze,...ie}}class Se{constructor(V=makeValidator()){q(this,"validators");this.validators=V}async enforce(V){var Tt,jt,mn,sn,N,te,pe;function ye(re,Ie,lt){if(Ie==null)throw new Error(`${re} must have a value`);let At;try{At=lt(Ie)}catch(ct){throw new Error(`${re} could not be validated, ${ct}`)}if(!At){let ct;switch(lt.name){case"isValidLabelValue":case"isValidObjectName":ct="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":ct="a valid prefix and/or suffix";break;case"isValidNamespace":case"isValidDnsLabel":ct="a string that is sequences of [a-z0-9] separated by [-], at most 63 characters in total";break;case"isValidTag":ct="a string that is sequences of [a-z0-9+#] separated by [-], at most 63 characters in total";break;case"isValidAnnotationValue":ct="a string";break;case"isValidKind":ct="a string that is a sequence of [a-zA-Z][a-z0-9A-Z], at most 63 characters in total";break;case"isValidUrl":ct="a string that is a valid url";break;case"isValidString":case"isNonEmptyString":ct="a non empty string";break;default:ct=void 0;break}const Ut=ct?` expected ${ct} but found "${Ie}".`:"";throw new Error(`"${re}" is not valid;${Ut} 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 Ve(re,Ie,lt){return Ie===void 0||ye(re,Ie,lt)}ye("apiVersion",V.apiVersion,this.validators.isValidApiVersion),ye("kind",V.kind,this.validators.isValidKind),ye("metadata.name",V.metadata.name,this.validators.isValidEntityName),Ve("metadata.namespace",V.metadata.namespace,this.validators.isValidNamespace);for(const[re,Ie]of Object.entries((Tt=V.metadata.labels)!=null?Tt:[]))ye(`labels.${re}`,re,this.validators.isValidLabelKey),ye(`labels.${re}`,Ie,this.validators.isValidLabelValue);for(const[re,Ie]of Object.entries((jt=V.metadata.annotations)!=null?jt:[]))ye(`annotations.${re}`,re,this.validators.isValidAnnotationKey),ye(`annotations.${re}`,Ie,this.validators.isValidAnnotationValue);const tt=(mn=V.metadata.tags)!=null?mn:[];for(let re=0;re<tt.length;++re)ye(`tags.${re}`,tt[re],this.validators.isValidTag);const nt=(sn=V.metadata.links)!=null?sn:[];for(let re=0;re<nt.length;++re)ye(`links.${re}.url`,(N=nt[re])==null?void 0:N.url,CommonValidatorFunctions.isValidUrl),Ve(`links.${re}.title`,(te=nt[re])==null?void 0:te.title,CommonValidatorFunctions.isNonEmptyString),Ve(`links.${re}.icon`,(pe=nt[re])==null?void 0:pe.icon,KubernetesValidatorFunctions.isValidObjectName);return V}}class Ye{constructor(){q(this,"validate")}async enforce(V){if(!this.validate){const tt=new Ajv({allowUnionTypes:!0});this.validate=tt.addSchema([commonSchema,entityMetaSchema],void 0,void 0,!0).compile(entitySchema)}if(this.validate(V)===!0)return V;const[Ve]=this.validate.errors||[];throw Ve?new Error(`Malformed envelope, ${Ve.instancePath||"<root>"} ${Ve.message}`):new Error("Malformed envelope, Unknown error")}}function rt(ie){let V=ie.indexOf(":");const ye=ie.indexOf("/");ye!==-1&&ye<V&&(V=-1);const Ve=V===-1?void 0:ie.slice(0,V),tt=ye===-1?void 0:ie.slice(V+1,ye),nt=ie.slice(Math.max(V+1,ye+1));if(Ve===""||tt===""||nt==="")throw new TypeError(`Entity reference "${ie}" was not on the form [<kind>:][<namespace>/]<name>`);return{kind:Ve,namespace:tt,name:nt}}function It(ie){return{kind:ie.kind,namespace:ie.metadata.namespace||r,name:ie.metadata.name}}function Et(ie,V){var jt,mn,sn,N;if(!ie)throw new Error("Entity reference must not be empty");const ye=V==null?void 0:V.defaultKind,Ve=(V==null?void 0:V.defaultNamespace)||r;let tt,nt,Tt;if(typeof ie=="string"){const te=rt(ie);tt=(jt=te.kind)!=null?jt:ye,nt=(mn=te.namespace)!=null?mn:Ve,Tt=te.name}else tt=(sn=ie.kind)!=null?sn:ye,nt=(N=ie.namespace)!=null?N:Ve,Tt=ie.name;if(tt)if(nt){if(!Tt){const te=JSON.stringify(ie);throw new Error(`Entity reference ${te} had missing or empty name`)}}else{const te=JSON.stringify(ie);throw new Error(`Entity reference ${te} had missing or empty namespace`)}else{const te=JSON.stringify(ie);throw new Error(`Entity reference ${te} had missing or empty kind (e.g. did not start with "component:" or similar)`)}return{kind:tt,namespace:nt,name:Tt}}function Pe(ie){var tt,nt;let V,ye,Ve;return"metadata"in ie?(V=ie.kind,ye=(tt=ie.metadata.namespace)!=null?tt:r,Ve=ie.metadata.name):(V=ie.kind,ye=(nt=ie.namespace)!=null?nt:r,Ve=ie.name),`${V.toLocaleLowerCase("en-US")}:${ye.toLocaleLowerCase("en-US")}/${Ve.toLocaleLowerCase("en-US")}`}class mt{constructor(V){this.policies=V}async enforce(V){let ye=V;for(const Ve of this.policies){const tt=await Ve.enforce(ye);if(!tt)throw new Error(`Policy ${Ve.constructor.name} did not return a result`);ye=tt}return ye}}class Xe{constructor(V){this.policies=V}async enforce(V){for(const ye of this.policies){const Ve=await ye.enforce(V);if(Ve)return Ve}throw new Error("The entity did not match any known policy")}}const se={allOf(ie){return new mt(ie)},oneOf(ie){return new Xe(ie)}};var me=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 we(ie){const V=fe(ie);return{async check(ye){return V(ye)===ye}}}const $e=we(me);var je=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 it=we(je);var Je=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=we(Je);var ae=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=we(ae);var Qe=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=we(Qe),Ue="ownedBy",at="ownerOf",Q="consumesApi",Z="apiConsumedBy",X="providesApi",oe="apiProvidedBy",ce="dependsOn",be="dependencyOf",Le="parentOf",Ce="childOf",qe="memberOf",Ke="hasMember",vt="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 Pt=we(ut);var Lt=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 Ft=we(Lt);var Ot=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 Wt=we(Ot),Nt="backstage.io/managed-by-location",gn="backstage.io/managed-by-origin-location",In="backstage.io/source-location";function Zt(ie){if(typeof ie!="string")throw new TypeError(`Unable to parse location ref '${ie}', unexpected argument ${typeof ie}`);const V=ie.indexOf(":");if(V<0)throw new TypeError(`Unable to parse location ref '${ie}', expected '<type>:<target>', e.g. 'url:https://host/path'`);const ye=ie.substring(0,V).trim(),Ve=ie.substring(V+1).trim();if(!ye||!Ve)throw new TypeError(`Unable to parse location ref '${ie}', expected '<type>:<target>', e.g. 'url:https://host/path'`);if(ye==="http"||ye==="https")throw new TypeError(`Invalid location ref '${ie}', please prefix it with 'url:', e.g. 'url:${ie}'`);return{type:ye,target:Ve}}function Ht(ie){const{type:V,target:ye}=ie;if(V){if(!ye)throw new TypeError("Unable to stringify location ref, empty target")}else throw new TypeError("Unable to stringify location ref, empty type");return`${V}:${ye}`}function _e(ie){var ye,Ve,tt,nt,Tt;const V=(Tt=(Ve=(ye=ie.metadata)==null?void 0:ye.annotations)==null?void 0:Ve[In])!=null?Tt:(nt=(tt=ie.metadata)==null?void 0:tt.annotations)==null?void 0:nt[Nt];if(!V)throw new Error(`Entity '${Pe(ie)}' is missing location`);return Zt(V)}},23235:function(ee,s,e){"use strict";e.d(s,{C:function(){return t}});var r=e(98005);class t{constructor(){q(this,"subject",new r.J)}post(u){this.subject.next(u)}alert$(){return this.subject}}},47150:function(ee,s,e){"use strict";e.d(s,{g:function(){return r}});class r{captureEvent(l){}}},58652:function(ee,s,e){"use strict";e.d(s,{C:function(){return l}});var r=e(98005);const t="theme";class l{constructor(A){q(this,"activeThemeId");q(this,"subject",new r.X(void 0));this.themes=A}static createWithStorage(A){var c;const m=new l(A);if(!window.localStorage)return m;const o=(c=window.localStorage.getItem(t))!=null?c:void 0;return m.setActiveThemeId(o),m.activeThemeId$().subscribe(f=>{f?window.localStorage.setItem(t,f):window.localStorage.removeItem(t)}),window.addEventListener("storage",f=>{var y;if(f.key===t){const g=(y=localStorage.getItem(t))!=null?y:void 0;m.setActiveThemeId(g)}}),m}getInstalledThemes(){return this.themes.slice()}activeThemeId$(){return this.subject}getActiveThemeId(){return this.activeThemeId}setActiveThemeId(A){this.activeThemeId=A,this.subject.next(A)}}},14721:function(ee,s,e){"use strict";e.d(s,{m:function(){return f}});var r=e(9850),t=e.n(r),l=e(12782),u=e.n(l);const A=/^[a-z][a-z0-9]*(?:[-_][a-z][a-z0-9]*)*$/i;function m(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 c={type(y,g,E,C){return`Invalid type in config for key '${y}' in '${g}', got ${E}, wanted ${C}`},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 f{constructor(g,E="mock-config",C,O=""){q(this,"filteredKeys");q(this,"notifiedFilteredKeys",new Set);this.data=g,this.context=E,this.fallback=C,this.prefix=O}static fromConfigs(g){return g.length===0?new f(void 0):g.reduce((E,{data:C,context:O,filteredKeys:D,deprecatedKeys:U})=>{const B=new f(C,O,E);if(B.filteredKeys=D,U)for(const{key:b,description:I}of U)console.warn(`The configuration key '${b}' of ${O} is deprecated and may be removed soon. ${I||""}`);return B},void 0)}has(g){var C,O;return this.readValue(g)!==void 0?!0:(O=(C=this.fallback)==null?void 0:C.has(g))!=null?O:!1}keys(){var C,O;const g=this.data?Object.keys(this.data):[],E=(O=(C=this.fallback)==null?void 0:C.keys())!=null?O:[];return[...new Set([...g,...E])]}get(g){const E=this.getOptional(g);if(E===void 0)throw new Error(c.missing(this.fullKey(g!=null?g:"")));return E}getOptional(g){var O;const E=t()(this.readValue(g)),C=(O=this.fallback)==null?void 0:O.getOptional(g);return E===void 0?C:C===void 0?E:u()({},{value:C},{value:E},(D,U)=>!m(U)||!m(D)?U:void 0).value}getConfig(g){const E=this.getOptionalConfig(g);if(E===void 0)throw new Error(c.missing(this.fullKey(g)));return E}getOptionalConfig(g){var O;const E=this.readValue(g),C=(O=this.fallback)==null?void 0:O.getOptionalConfig(g);if(m(E))return this.copy(E,g,C);if(E!==void 0)throw new TypeError(c.type(this.fullKey(g),this.context,o(E),"object"));return C}getConfigArray(g){const E=this.getOptionalConfigArray(g);if(E===void 0)throw new Error(c.missing(this.fullKey(g)));return E}getOptionalConfigArray(g){const E=this.readConfigValue(g,C=>{if(!Array.isArray(C))return{expected:"object-array"};for(const[O,D]of C.entries())if(!m(D))return{expected:"object-array",value:D,key:`${g}[${O}]`};return!0});if(!!E)return E.map((C,O)=>this.copy(C,`${g}[${O}]`))}getNumber(g){const E=this.getOptionalNumber(g);if(E===void 0)throw new Error(c.missing(this.fullKey(g)));return E}getOptionalNumber(g){const E=this.readConfigValue(g,O=>typeof O=="number"||typeof O=="string"||{expected:"number"});if(typeof E=="number"||E===void 0)return E;const C=Number(E);if(!Number.isFinite(C))throw new Error(c.convert(this.fullKey(g),this.context,"number"));return C}getBoolean(g){const E=this.getOptionalBoolean(g);if(E===void 0)throw new Error(c.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(c.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(c.missing(this.fullKey(g)));return E}getOptionalStringArray(g){return this.readConfigValue(g,E=>{if(!Array.isArray(E))return{expected:"string-array"};for(const[C,O]of E.entries())if(typeof O!="string"||O==="")return{expected:"string-array",value:O,key:`${g}[${C}]`};return!0})}fullKey(g){return`${this.prefix}${this.prefix?".":""}${g}`}copy(g,E,C){const O=new f(g,this.context,C,this.fullKey(E));return O.filteredKeys=this.filteredKeys,O}readConfigValue(g,E){var D;const C=this.readValue(g);if(C===void 0)return(D=this.fallback)==null?void 0:D.readConfigValue(g,E);const O=E(C);if(O!==!0){const{key:U=g,value:B=C,expected:b}=O;throw new TypeError(c.type(this.fullKey(U),this.context,o(B),b))}return C}readValue(g){const E=g?g.split("."):[];for(const O of E)if(!A.test(O))throw new TypeError(`Invalid config key '${g}'`);if(this.data===void 0)return;let C=this.data;for(const[O,D]of E.entries())if(m(C))C=C[D];else if(C!==void 0){const U=this.fullKey(E.slice(0,O).join("."));throw new TypeError(c.type(U,this.context,o(C),"object"))}return C}}},4333:function(ee,s,e){"use strict";e.d(s,{p:function(){return t}});const r="Invalid discovery URL pattern,";class t{static compile(u){const A=u.split(/\{\{\s*pluginId\s*\}\}/),m=A.join("pluginId");let o;try{o=new URL(m)}catch{throw new Error(`${r} URL '${m}' 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(m.endsWith("/"))throw new Error(`${r} URL must not end with a slash`);return new t(A)}constructor(u){this.parts=u}async getBaseUrl(u){return this.parts.join(u)}}},89536:function(ee,s,e){"use strict";e.d(s,{KN:function(){return r},gr:function(){return l},Jv:function(){return u}});class r{constructor(m,o){this.alertApi=m,this.errorApi=o}post(m,o){return o!=null&&o.hidden||this.alertApi.post({message:m.message,severity:"error"}),this.errorApi.post(m,o)}error$(){return this.errorApi.error$()}}var t=e(98005);class l{constructor(){q(this,"subject",new t.J)}post(m,o){this.subject.next({error:m,context:o})}error$(){return this.subject}}class u{static forward(m,o){window.addEventListener("unhandledrejection",c=>{m.post(c.reason,o)})}}},14884:function(ee,s,e){"use strict";e.d(s,{b:function(){return l}});var r=e(36964);function t(u){if(u.length<3)throw new Error(`The '${u}' feature flag must have a minimum length of three characters.`);if(u.length>150)throw new Error(`The '${u}' feature flag must not exceed 150 characters.`);if(!u.match(/^[a-z]+[a-z0-9-]+$/))throw new Error(`The '${u}' feature flag must start with a lowercase letter and only contain lowercase letters, numbers and hyphens. Examples: feature-flag-one, alpha, release-2020`)}class l{constructor(){q(this,"registeredFeatureFlags",[]);q(this,"flags")}registerFlag(A){t(A.name),this.registeredFeatureFlags.push(A)}getRegisteredFlags(){return this.registeredFeatureFlags.slice()}isActive(A){return this.flags||(this.flags=this.load()),this.flags.get(A)===r.FeatureFlagState.Active}save(A){this.flags||(this.flags=this.load()),A.merge||this.flags.clear();for(const[o,c]of Object.entries(A.states))this.flags.set(o,c);const m=Array.from(this.flags.entries()).filter(([,o])=>o===r.FeatureFlagState.Active);window.localStorage.setItem("featureFlags",JSON.stringify(Object.fromEntries(m)))}load(){try{const A=window.localStorage.getItem("featureFlags");if(!A)return new Map;const m=JSON.parse(A);if(typeof m!="object"||m===null||Array.isArray(m))return new Map;const o=Object.entries(m).filter(([c,f])=>(t(c),f===r.FeatureFlagState.Active));return new Map(o)}catch{return new Map}}}},50160:function(ee,s,e){"use strict";e.d(s,{I:function(){return c},j:function(){return r}});function r(f){var E;let y=f.baseImplementation||e.g.fetch;const g=[(E=f.middleware)!=null?E:[]].flat().reverse();for(const C of g)y=C.apply(y);return{fetch:y}}class t{static create(y){var O,D;const g=l(y),E=((O=y.header)==null?void 0:O.name)||"authorization",C=((D=y.header)==null?void 0:D.value)||(U=>`Bearer ${U}`);return new t(y.identityApi,g,E,C)}constructor(y,g,E,C){this.identityApi=y,this.allowUrl=g,this.headerName=E,this.headerValue=C}apply(y){return async(g,E)=>{const C=new Request(g,E),{token:O}=await this.identityApi.getCredentials();return C.headers.get(this.headerName)||typeof O!="string"||!O||!this.allowUrl(C.url)?y(g,E):(C.headers.set(this.headerName,this.headerValue(O)),y(C))}}}function l(f){return f.allowUrl?f.allowUrl:f.urlPrefixAllowlist?u(f.urlPrefixAllowlist):f.config?u([f.config.getString("backend.baseUrl")]):()=>!1}function u(f){const y=f.map(g=>g.replace(/\/$/,""));return g=>y.some(E=>g===E||g.startsWith(`${E}/`))}function A(f,y){return!y||y==="/"?f:`${f.replace(/\/$/,"")}/${y.replace(/^\//,"")}`}class m{constructor(y){this.discoveryApi=y}apply(y){return async(g,E)=>{const C=new Request(g,E),O="plugin://";if(!C.url.startsWith(O))return y(g,E);const{hostname:D,pathname:U,search:B,hash:b,username:I,password:x}=new URL(`http://${C.url.substring(O.length)}`);let M=await this.discoveryApi.getBaseUrl(D);if(I||x){const le=new URL(M),fe=`${I}${x?`:${x}`:""}@`;M=`${le.protocol}//${fe}${le.host}${le.pathname}`}const K=`${A(M,U)}${B}${b}`;return y(K,typeof g=="string"||o(g)?E:g)}}}function o(f){return typeof f=="object"&&(f==null?void 0:f.constructor)===URL}class c{static resolvePluginProtocol(y){return new m(y.discoveryApi)}static injectIdentityAuth(y){return t.create(y)}constructor(){}}},11358:function(ee,s,e){"use strict";e.d(s,{Y:function(){return A}});var r=e(98005);function t(m,o){for(const c of o)if(!m.has(c))return!1;return!0}function l(m,...o){const c=new Set(m);for(const f of o)for(const y of f)c.add(y);return c}class u{constructor(){q(this,"requests",[]);q(this,"subject",new r.X(this.getCurrentPending()))}request(o){return new Promise((c,f)=>{this.requests.push({scopes:o,resolve:c,reject:f}),this.subject.next(this.getCurrentPending())})}resolve(o,c){this.requests=this.requests.filter(f=>t(o,f.scopes)?(f.resolve(c),!1):!0),this.subject.next(this.getCurrentPending())}reject(o){this.requests.forEach(c=>c.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((c,f)=>l(c,f.scopes),this.requests[0].scopes);return{scopes:o,resolve:c=>{o&&this.resolve(o,c)},reject:c=>{o&&this.reject(c)}}}}class A{constructor(){q(this,"subject",new r.X([]));q(this,"currentRequests",[]);q(this,"handlerCount",0)}createAuthRequester(o){const c=new u,f=this.handlerCount;return this.handlerCount++,c.pending().subscribe({next:y=>{const g=this.currentRequests.slice(),E=this.makeAuthRequest(y,o);E?g[f]=E:delete g[f],this.currentRequests=g,this.subject.next(g.filter(Boolean))}}),y=>c.request(y)}makeAuthRequest(o,c){const{scopes:f}=o;if(!!f)return{provider:c.provider,trigger:async()=>{const y=await c.onAuthRequest(f);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 u}});var r=e(82394),t=e.n(r);const l=new Map;class u{constructor(m,o){q(this,"subscribers",new Set);q(this,"observable",new(t())(m=>(this.subscribers.add(m),()=>{this.subscribers.delete(m)})));this.namespace=m,this.errorApi=o}static create(m){var o;return new u((o=m.namespace)!=null?o:"",m.errorApi)}get(m){return this.snapshot(m).value}snapshot(m){let o,c="absent";try{const f=localStorage.getItem(this.getKeyName(m));f&&(o=JSON.parse(f,(y,g)=>(typeof g=="object"&&g!==null&&Object.freeze(g),g)),c="present")}catch{this.errorApi.post(new Error(`Error when parsing JSON config from storage for: ${m}`))}return{key:m,value:o,presence:c}}forBucket(m){const o=`${this.namespace}/${m}`;return l.has(o)||l.set(o,new u(o,this.errorApi)),l.get(o)}async set(m,o){localStorage.setItem(this.getKeyName(m),JSON.stringify(o)),this.notifyChanges(m)}async remove(m){localStorage.removeItem(this.getKeyName(m)),this.notifyChanges(m)}observe$(m){return this.observable.filter(({key:o})=>o===m)}getKeyName(m){return`${this.namespace}/${encodeURIComponent(m)}`}notifyChanges(m){const o=this.snapshot(m);for(const c of this.subscribers)c.next(o)}}},59589:function(ee,s,e){"use strict";e.d(s,{u:function(){return l}});var r=e(91205);const t={id:"atlassian",title:"Atlassian",icon:()=>null};class l{static create(A){const{discoveryApi:m,environment:o="development",provider:c=t,oauthRequestApi:f}=A;return r.OAuth2.create({discoveryApi:m,oauthRequestApi:f,provider:c,environment:o})}}},6098:function(ee,s,e){"use strict";e.d(s,{Z:function(){return l}});var r=e(91205);const t={id:"bitbucket",title:"Bitbucket",icon:()=>null};class l{static create(A){const{discoveryApi:m,environment:o="development",provider:c=t,oauthRequestApi:f,defaultScopes:y=["team"]}=A;return r.OAuth2.create({discoveryApi:m,oauthRequestApi:f,provider:c,environment:o,defaultScopes:y})}}},44431:function(ee,s,e){"use strict";e.d(s,{BitbucketAuth:function(){return l.Z}});var r=e(19347),t=e.n(r);e.o(r,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return r.AlertApiForwarder}}),e.o(r,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return r.AppThemeSelector}}),e.o(r,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return r.AtlassianAuth}}),e.o(r,"ConfigReader")&&e.d(s,{ConfigReader:function(){return r.ConfigReader}}),e.o(r,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return r.ErrorAlerter}}),e.o(r,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return r.ErrorApiForwarder}}),e.o(r,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return r.FetchMiddlewares}}),e.o(r,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return r.FlatRoutes}}),e.o(r,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return r.LocalStorageFeatureFlags}}),e.o(r,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return r.NoOpAnalyticsApi}}),e.o(r,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return r.OAuthRequestManager}}),e.o(r,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return r.UnhandledErrorForwarder}}),e.o(r,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return r.UrlPatternDiscovery}}),e.o(r,"WebStorage")&&e.d(s,{WebStorage:function(){return r.WebStorage}}),e.o(r,"createFetchApi")&&e.d(s,{createFetchApi:function(){return r.createFetchApi}}),e.o(r,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return r.createSpecializedApp}}),e.o(r,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return r.defaultConfigLoader}});var l=e(6098)},19347:function(){},44474:function(ee,s,e){"use strict";e.d(s,{T:function(){return l}});var r=e(91205);const t={id:"github",title:"GitHub",icon:()=>null};class l{static create(A){const{discoveryApi:m,environment:o="development",provider:c=t,oauthRequestApi:f,defaultScopes:y=["read:user"]}=A;return r.OAuth2.create({discoveryApi:m,oauthRequestApi:f,provider:c,environment:o,defaultScopes:y})}}},2922:function(ee,s,e){"use strict";e.d(s,{a:function(){return l}});var r=e(91205);const t={id:"gitlab",title:"GitLab",icon:()=>null};class l{static create(A){const{discoveryApi:m,environment:o="development",provider:c=t,oauthRequestApi:f,defaultScopes:y=["read_user"]}=A;return r.OAuth2.create({discoveryApi:m,oauthRequestApi:f,provider:c,environment:o,defaultScopes:y})}}},59938:function(ee,s,e){"use strict";e.d(s,{e:function(){return u}});var r=e(91205);const t={id:"google",title:"Google",icon:()=>null},l="https://www.googleapis.com/auth/";class u{static create(m){const{discoveryApi:o,oauthRequestApi:c,environment:f="development",provider:y=t,defaultScopes:g=["openid",`${l}userinfo.email`,`${l}userinfo.profile`]}=m;return r.OAuth2.create({discoveryApi:o,oauthRequestApi:c,provider:y,environment:f,defaultScopes:g,scopeTransform(E){return E.map(C=>C==="openid"?C:C==="profile"||C==="email"?`${l}userinfo.${C}`:C.startsWith(l)?C:`${l}${C}`)}})}}},91668:function(ee,s,e){"use strict";e.d(s,{AtlassianAuth:function(){return y.u},BitbucketAuth:function(){return f.BitbucketAuth},GithubAuth:function(){return r.T},GitlabAuth:function(){return t.a},GoogleAuth:function(){return l.e},MicrosoftAuth:function(){return o._},OktaAuth:function(){return A.s},OneLoginAuth:function(){return c.$}});var r=e(44474),t=e(2922),l=e(59938),u=e(91205);e.o(u,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return u.AlertApiForwarder}}),e.o(u,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return u.AppThemeSelector}}),e.o(u,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return u.AtlassianAuth}}),e.o(u,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return u.BitbucketAuth}}),e.o(u,"ConfigReader")&&e.d(s,{ConfigReader:function(){return u.ConfigReader}}),e.o(u,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return u.ErrorAlerter}}),e.o(u,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return u.ErrorApiForwarder}}),e.o(u,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return u.FetchMiddlewares}}),e.o(u,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return u.FlatRoutes}}),e.o(u,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return u.LocalStorageFeatureFlags}}),e.o(u,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return u.MicrosoftAuth}}),e.o(u,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return u.NoOpAnalyticsApi}}),e.o(u,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return u.OAuthRequestManager}}),e.o(u,"OktaAuth")&&e.d(s,{OktaAuth:function(){return u.OktaAuth}}),e.o(u,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return u.OneLoginAuth}}),e.o(u,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return u.UnhandledErrorForwarder}}),e.o(u,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return u.UrlPatternDiscovery}}),e.o(u,"WebStorage")&&e.d(s,{WebStorage:function(){return u.WebStorage}}),e.o(u,"createFetchApi")&&e.d(s,{createFetchApi:function(){return u.createFetchApi}}),e.o(u,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return u.createSpecializedApp}}),e.o(u,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return u.defaultConfigLoader}});var A=e(26079),m=e(67604),o=e(38482),c=e(58381),f=e(44431);e.o(f,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return f.AlertApiForwarder}}),e.o(f,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return f.AppThemeSelector}}),e.o(f,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return f.AtlassianAuth}}),e.o(f,"ConfigReader")&&e.d(s,{ConfigReader:function(){return f.ConfigReader}}),e.o(f,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return f.ErrorAlerter}}),e.o(f,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return f.ErrorApiForwarder}}),e.o(f,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return f.FetchMiddlewares}}),e.o(f,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return f.FlatRoutes}}),e.o(f,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return f.LocalStorageFeatureFlags}}),e.o(f,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return f.NoOpAnalyticsApi}}),e.o(f,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return f.OAuthRequestManager}}),e.o(f,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return f.UnhandledErrorForwarder}}),e.o(f,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return f.UrlPatternDiscovery}}),e.o(f,"WebStorage")&&e.d(s,{WebStorage:function(){return f.WebStorage}}),e.o(f,"createFetchApi")&&e.d(s,{createFetchApi:function(){return f.createFetchApi}}),e.o(f,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return f.createSpecializedApp}}),e.o(f,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return f.defaultConfigLoader}});var y=e(59589)},38482:function(ee,s,e){"use strict";e.d(s,{_:function(){return l}});var r=e(91205);const t={id:"microsoft",title:"Microsoft",icon:()=>null};class l{static create(A){const{environment:m="development",provider:o=t,oauthRequestApi:c,discoveryApi:f,defaultScopes:y=["openid","offline_access","profile","email","User.Read"]}=A;return r.OAuth2.create({discoveryApi:f,oauthRequestApi:c,provider:o,environment:m,defaultScopes:y})}}},73124:function(ee,s,e){"use strict";e.d(s,{Z:function(){return m}});function r(o){return new Promise((c,f)=>{const y=o.width||500,g=o.height||700,E=window.screen.width/2-y/2,C=window.screen.height/2-g/2,O=window.open(o.url,o.name,`menubar=no,location=no,resizable=no,scrollbars=no,status=no,width=${y},height=${g},top=${C},left=${E}`);let D="";if(!O||typeof O.closed=="undefined"||O.closed){const I=new Error("Failed to open auth popup.");I.name="PopupRejectedError",f(I);return}const U=I=>{if(I.source!==O||I.origin!==o.origin)return;const{data:x}=I;if(x.type==="config_info"){D=x.targetOrigin;return}if(x.type!=="authorization_response")return;const M=x;if("error"in M){const K=new Error(M.error.message);K.name=M.error.name,f(K)}else c(M.response);b()},B=setInterval(()=>{if(O.closed){const I=`Login failed, ${D&&D!==window.location.origin?`Incorrect app origin, expected ${D}`:"popup was closed"}`,x=new Error(I);x.name="PopupClosedError",f(x),b()}},100);function b(){window.removeEventListener("message",U),clearInterval(B)}window.addEventListener("message",U)})}function t(o){return[...o].join(" ")}class l{constructor(c){q(this,"discoveryApi");q(this,"environment");q(this,"provider");q(this,"joinScopesFunc");q(this,"authRequester");q(this,"sessionTransform");const{discoveryApi:f,environment:y,provider:g,joinScopes:E=t,oauthRequestApi:C,sessionTransform:O=D=>D}=c;this.authRequester=C.createAuthRequester({provider:g,onAuthRequest:D=>this.showPopup(D)}),this.discoveryApi=f,this.environment=y,this.provider=g,this.joinScopesFunc=E,this.sessionTransform=O}async createSession(c){return c.instantPopup?this.showPopup(c.scopes):this.authRequester(c.scopes)}async refreshSession(){const c=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(!c.ok){const y=new Error(`Auth refresh request failed, ${c.statusText}`);throw y.status=c.status,y}const f=await c.json();if(f.error){const y=new Error(f.error.message);throw f.error.name&&(y.name=f.error.name),y}return await this.sessionTransform(f)}async removeSession(){const c=await fetch(await this.buildUrl("/logout"),{method:"POST",headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(f=>{throw new Error(`Logout request failed, ${f}`)});if(!c.ok){const f=new Error(`Logout request failed, ${c.statusText}`);throw f.status=c.status,f}}async showPopup(c){const f=this.joinScopesFunc(c),y=await this.buildUrl("/start",{scope:f,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(c,f){const y=await this.discoveryApi.getBaseUrl("auth"),g=this.buildQueryString({...f,env:this.environment});return`${y}/${this.provider.id}${c}${g}`}buildQueryString(c){if(!c)return"";const f=Object.entries(c).map(([y,g])=>{if(typeof g=="string")return`${encodeURIComponent(y)}=${encodeURIComponent(g)}`;if(g)return encodeURIComponent(y)}).filter(Boolean).join("&");return f?`?${f}`:""}}var u=e(57018);const A={id:"oauth2",title:"Your Identity Provider",icon:()=>null};class m{constructor(c){q(this,"sessionManager");q(this,"scopeTransform");this.sessionManager=c.sessionManager,this.scopeTransform=c.scopeTransform}static create(c){const{discoveryApi:f,environment:y="development",provider:g=A,oauthRequestApi:E,defaultScopes:C=[],scopeTransform:O=B=>B}=c,D=new l({discoveryApi:f,environment:y,provider:g,oauthRequestApi:E,sessionTransform(B){return{...B,providerInfo:{idToken:B.providerInfo.idToken,accessToken:B.providerInfo.accessToken,scopes:m.normalizeScopes(O,B.providerInfo.scope),expiresAt:new Date(Date.now()+B.providerInfo.expiresInSeconds*1e3)}}}}),U=new u.RefreshingAuthSessionManager({connector:D,defaultScopes:new Set(C),sessionScopes:B=>B.providerInfo.scopes,sessionShouldRefresh:B=>(B.providerInfo.expiresAt.getTime()-Date.now())/1e3<60*5});return new m({sessionManager:U,scopeTransform:O})}async signIn(){await this.getAccessToken()}async signOut(){await this.sessionManager.removeSession()}sessionState$(){return this.sessionManager.sessionState$()}async getAccessToken(c,f){var E;const y=m.normalizeScopes(this.scopeTransform,c),g=await this.sessionManager.getSession({...f,scopes:y});return(E=g==null?void 0:g.providerInfo.accessToken)!=null?E:""}async getIdToken(c={}){var y;const f=await this.sessionManager.getSession(c);return(y=f==null?void 0:f.providerInfo.idToken)!=null?y:""}async getBackstageIdentity(c={}){const f=await this.sessionManager.getSession(c);return f==null?void 0:f.backstageIdentity}async getProfile(c={}){const f=await this.sessionManager.getSession(c);return f==null?void 0:f.profile}static normalizeScopes(c,f){if(!f)return new Set;const y=Array.isArray(f)?f:f.split(/[\s|,]/).filter(Boolean);return new Set(c(y))}}},91205:function(ee,s,e){"use strict";e.d(s,{OAuth2:function(){return r.Z}});var r=e(73124),t=e(5973),l=e.n(t);e.o(t,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return t.AlertApiForwarder}}),e.o(t,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return t.AppThemeSelector}}),e.o(t,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return t.AtlassianAuth}}),e.o(t,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return t.BitbucketAuth}}),e.o(t,"ConfigReader")&&e.d(s,{ConfigReader:function(){return t.ConfigReader}}),e.o(t,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return t.ErrorAlerter}}),e.o(t,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return t.ErrorApiForwarder}}),e.o(t,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return t.FetchMiddlewares}}),e.o(t,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return t.FlatRoutes}}),e.o(t,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return t.LocalStorageFeatureFlags}}),e.o(t,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return t.MicrosoftAuth}}),e.o(t,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return t.NoOpAnalyticsApi}}),e.o(t,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return t.OAuthRequestManager}}),e.o(t,"OktaAuth")&&e.d(s,{OktaAuth:function(){return t.OktaAuth}}),e.o(t,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return t.OneLoginAuth}}),e.o(t,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return t.UnhandledErrorForwarder}}),e.o(t,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return t.UrlPatternDiscovery}}),e.o(t,"WebStorage")&&e.d(s,{WebStorage:function(){return t.WebStorage}}),e.o(t,"createFetchApi")&&e.d(s,{createFetchApi:function(){return t.createFetchApi}}),e.o(t,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return t.createSpecializedApp}}),e.o(t,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return t.defaultConfigLoader}})},5973:function(){},26079:function(ee,s,e){"use strict";e.d(s,{s:function(){return A}});var r=e(91205);const t={id:"okta",title:"Okta",icon:()=>null},l=new Set(["openid","profile","email","phone","address","groups","offline_access"]),u="okta.";class A{static create(o){const{discoveryApi:c,environment:f="development",provider:y=t,oauthRequestApi:g,defaultScopes:E=["openid","email","profile","offline_access"]}=o;return r.OAuth2.create({discoveryApi:c,oauthRequestApi:g,provider:y,environment:f,defaultScopes:E,scopeTransform(C){return C.map(O=>l.has(O)||O.startsWith(u)?O:`${u}${O}`)}})}}},58381:function(ee,s,e){"use strict";e.d(s,{$:function(){return A}});var r=e(91205);const t={id:"onelogin",title:"onelogin",icon:()=>null},l=new Set(["openid","profile","email","phone","address","groups","offline_access"]),u="onelogin.";class A{static create(o){const{discoveryApi:c,environment:f="development",provider:y=t,oauthRequestApi:g}=o;return r.OAuth2.create({discoveryApi:c,oauthRequestApi:g,provider:y,environment:f,defaultScopes:["openid","email","profile","offline_access"],scopeTransform(E){return E.map(C=>l.has(C)||C.startsWith(u)?C:`${u}${C}`)}})}}},67604:function(ee,s,e){"use strict";var r=e(57018),t=e(30195);const l=t.z.object({profile:t.z.object({email:t.z.string().optional(),displayName:t.z.string().optional(),picture:t.z.string().optional()}),backstageIdentity:t.z.object({token:t.z.string(),identity:t.z.object({type:t.z.literal("user"),userEntityRef:t.z.string(),ownershipEntityRefs:t.z.array(t.z.string())})})}),u={id:"saml",title:"SAML",icon:()=>null};class A{static create(o){const{discoveryApi:c,environment:f="development",provider:y=u}=o,g=new DirectAuthConnector({discoveryApi:c,environment:f,provider:y}),E=new StaticAuthSessionManager({connector:g}),C=new AuthSessionStore({manager:E,storageKey:`${y.id}Session`,schema:samlSessionSchema});return new A(C)}sessionState$(){return this.sessionManager.sessionState$()}constructor(o){this.sessionManager=o}async signIn(){await this.getBackstageIdentity({})}async signOut(){await this.sessionManager.removeSession()}async getBackstageIdentity(o={}){const c=await this.sessionManager.getSession(o);return c==null?void 0:c.backstageIdentity}async getProfile(o={}){const c=await this.sessionManager.getSession(o);return c==null?void 0:c.profile}}},91631:function(ee,s,e){"use strict";e.d(s,{AlertApiForwarder:function(){return t.C},AppThemeSelector:function(){return u.C},AtlassianAuth:function(){return r.AtlassianAuth},ConfigReader:function(){return A.m},ErrorAlerter:function(){return o.KN},ErrorApiForwarder:function(){return o.gr},FetchMiddlewares:function(){return f.I},GithubAuth:function(){return r.GithubAuth},GitlabAuth:function(){return r.GitlabAuth},GoogleAuth:function(){return r.GoogleAuth},LocalStorageFeatureFlags:function(){return c.b},MicrosoftAuth:function(){return r.MicrosoftAuth},NoOpAnalyticsApi:function(){return l.g},OAuthRequestManager:function(){return y.Y},OktaAuth:function(){return r.OktaAuth},OneLoginAuth:function(){return r.OneLoginAuth},UnhandledErrorForwarder:function(){return o.Jv},UrlPatternDiscovery:function(){return m.p},WebStorage:function(){return g.C},createFetchApi:function(){return f.j}});var r=e(91668);e.o(r,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return r.AlertApiForwarder}}),e.o(r,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return r.AppThemeSelector}}),e.o(r,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return r.BitbucketAuth}}),e.o(r,"ConfigReader")&&e.d(s,{ConfigReader:function(){return r.ConfigReader}}),e.o(r,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return r.ErrorAlerter}}),e.o(r,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return r.ErrorApiForwarder}}),e.o(r,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return r.FetchMiddlewares}}),e.o(r,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return r.FlatRoutes}}),e.o(r,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return r.LocalStorageFeatureFlags}}),e.o(r,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return r.NoOpAnalyticsApi}}),e.o(r,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return r.OAuthRequestManager}}),e.o(r,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return r.UnhandledErrorForwarder}}),e.o(r,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return r.UrlPatternDiscovery}}),e.o(r,"WebStorage")&&e.d(s,{WebStorage:function(){return r.WebStorage}}),e.o(r,"createFetchApi")&&e.d(s,{createFetchApi:function(){return r.createFetchApi}}),e.o(r,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return r.createSpecializedApp}}),e.o(r,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return r.defaultConfigLoader}});var t=e(23235),l=e(47150),u=e(58652),A=e(14721),m=e(4333),o=e(89536),c=e(14884),f=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(l){l[l.default=10]="default";const u=50;l[l.app=u]="app",l[l.static=100]="static"})(r||(r={}));class t{constructor(){q(this,"factories",new Map)}register(u,A){const m=r[u],o=this.factories.get(A.api.id);return o&&o.priority>=m?!1:(this.factories.set(A.api.id,{priority:m,factory:A}),!0)}get(u){const A=this.factories.get(u.id);if(!!A)return A.factory}getAllApis(){const u=new Set;for(const{factory:A}of this.factories.values())u.add(A.api);return u}}},14406:function(ee,s,e){"use strict";e.d(s,{g:function(){return o}});var r=e(2784),t=e(13980),l=e.n(t);class u{constructor(...f){q(this,"holders");this.holders=f}get(f){for(const y of this.holders){const g=y.get(f);if(g)return g}}}var A=e(76241);const m=(0,A.CT)("api-context"),o=c=>{var C;const{apis:f,children:y}=c,g=(C=(0,r.useContext)(m))==null?void 0:C.atVersion(1),E=g?new u(f,g):f;return r.createElement(m.Provider,{value:(0,A.EI)({1:E}),children:y})};o.propTypes={apis:l().shape({get:l().func.isRequired}).isRequired,children:l().node}},12132:function(ee,s,e){"use strict";e.d(s,{M:function(){return r}});class r{constructor(l){q(this,"apis",new Map);this.factories=l}static validateFactories(l,u){for(const A of u){const m=[A],o=new Set;for(;m.length;){const c=m.shift(),f=l.get(c);if(!!f)for(const y of Object.values(f.deps)){if(y.id===A.id)throw new Error(`Circular dependency of api factory for ${A}`);o.has(y)||(o.add(y),m.push(y))}}}}get(l){return this.load(l)}load(l,u=[]){const A=this.apis.get(l.id);if(A)return A;const m=this.factories.get(l);if(!m)return;if(u.includes(m.api))throw new Error(`Circular dependency of api factory for ${m.api}`);const o=this.loadDeps(l,m.deps,[...u,m.api]),c=m.factory(o);return this.apis.set(l.id,c),c}loadDeps(l,u,A){const m={};for(const o in u)if(u.hasOwnProperty(o)){const c=u[o],f=this.load(c,A);if(!f)throw new Error(`No API factory available for dependency ${c} of dependent ${l}`);m[o]=f}return m}}},76105:function(ee,s,e){"use strict";e.d(s,{ApiFactoryRegistry:function(){return l.p},ApiProvider:function(){return r.g},ApiResolver:function(){return t.M}});var r=e(14406),t=e(12132),l=e(80396),u=e(82488),A=e.n(u);e.o(u,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return u.AlertApiForwarder}}),e.o(u,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return u.AppThemeSelector}}),e.o(u,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return u.AtlassianAuth}}),e.o(u,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return u.BitbucketAuth}}),e.o(u,"ConfigReader")&&e.d(s,{ConfigReader:function(){return u.ConfigReader}}),e.o(u,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return u.ErrorAlerter}}),e.o(u,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return u.ErrorApiForwarder}}),e.o(u,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return u.FetchMiddlewares}}),e.o(u,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return u.FlatRoutes}}),e.o(u,"GithubAuth")&&e.d(s,{GithubAuth:function(){return u.GithubAuth}}),e.o(u,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return u.GitlabAuth}}),e.o(u,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return u.GoogleAuth}}),e.o(u,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return u.LocalStorageFeatureFlags}}),e.o(u,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return u.MicrosoftAuth}}),e.o(u,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return u.NoOpAnalyticsApi}}),e.o(u,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return u.OAuthRequestManager}}),e.o(u,"OktaAuth")&&e.d(s,{OktaAuth:function(){return u.OktaAuth}}),e.o(u,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return u.OneLoginAuth}}),e.o(u,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return u.UnhandledErrorForwarder}}),e.o(u,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return u.UrlPatternDiscovery}}),e.o(u,"WebStorage")&&e.d(s,{WebStorage:function(){return u.WebStorage}}),e.o(u,"createFetchApi")&&e.d(s,{createFetchApi:function(){return u.createFetchApi}}),e.o(u,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return u.createSpecializedApp}}),e.o(u,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return u.defaultConfigLoader}})},82488:function(){},82370:function(ee,s,e){"use strict";e.d(s,{b:function(){return at}});var r=e(2784),t=e(10289),l=e(64279),u=e(56494),A=e(36964),m=e(76105);function o(Q){const Z={};for(const oe in Q.collectors)Q.collectors.hasOwnProperty(oe)&&(Z[oe]=Q.collectors[oe]());const X=[{node:r.Children.toArray(Q.root),parent:void 0,contexts:{}}];for(;X.length!==0;){const{node:oe,parent:ce,contexts:be}=X.shift();r.Children.forEach(oe,Le=>{if(!(0,r.isValidElement)(Le))return;const Ce={};for(const qe in Z)if(Z.hasOwnProperty(qe)){const Ke=Z[qe];Ce[qe]=Ke.visit(Ke.accumulator,Le,ce,be[qe])}for(const qe of Q.discoverers){const Ke=qe(Le);Ke&&X.push({node:Ke,parent:Le,contexts:Ce})}})}return Object.fromEntries(Object.entries(Z).map(([oe,ce])=>[oe,ce.accumulator]))}function c(Q,Z){return()=>({accumulator:Q(),visit:Z})}function f(Q){var Z;return(Z=Q.props)==null?void 0:Z.children}function y(Q){var Z,X,oe;if(((Z=Q.props)==null?void 0:Z.path)&&((X=Q.props)==null?void 0:X.element))return(oe=Q.props)==null?void 0:oe.element}const g=c(()=>new Set,(Q,Z)=>{const X=(0,A.getComponentData)(Z,"core.plugin");X&&Q.add(X)});var E=e(88934);const C={caseSensitive:!1,path:"/*",element:"match-all",routeRefs:new Set},O=c(()=>({paths:new Map,parents:new Map,objects:new Array}),(Q,Z,X,oe)=>{var Lt,Ft,Ot,Wt,Nt;if((X==null?void 0:X.props.element)===Z)return oe;let ce=oe==null?void 0:oe.obj,be=oe==null?void 0:oe.routeRef,Le=oe==null?void 0:oe.sticky;const Ce=(Lt=Z.props)==null?void 0:Lt.path,qe=(Ft=ce==null?void 0:ce.children)!=null?Ft:Q.objects,Ke=Boolean((Ot=Z.props)==null?void 0:Ot.caseSensitive);let vt=oe==null?void 0:oe.path;if((0,A.getComponentData)(Z,"core.gatherMountPoints")){if(!Ce)throw new Error("Mount point gatherer must have a path");vt=Ce}const St=(Wt=Z.props)==null?void 0:Wt.element;let ut=(0,A.getComponentData)(Z,"core.mountPoint");if(!ut&&(0,r.isValidElement)(St)&&(ut=(0,A.getComponentData)(St,"core.mountPoint")),ut){let gn=Ce;if(vt&&(gn?vt=void 0:gn=vt),!gn)throw new Error("Mounted routable extension must have a path");Q.paths.set(ut,gn),be&&Le?(Q.parents.set(ut,be),Ce&&(be=ut,Le=!1)):(Q.parents.set(ut,be),be=ut),Ce?(ce={caseSensitive:Ke,path:Ce,element:"mounted",routeRefs:new Set([ut]),children:[C],plugin:(0,A.getComponentData)(Z.props.element,"core.plugin")},qe.push(ce)):ce==null||ce.routeRefs.add(ut)}if((0,A.getComponentData)(Z,"core.gatherMountPoints")&&(Le=!0),(0,A.getComponentData)(Z,"core.gatherMountPoints")){if(!Ce)throw new Error("Mount point gatherer must have a path");ut||(ce={caseSensitive:Ke,path:Ce,element:"gathered",routeRefs:new Set,children:[C],plugin:(Nt=oe==null?void 0:oe.obj)==null?void 0:Nt.plugin},qe.push(ce))}return{obj:ce,path:vt,routeRef:be,sticky:Le}}),D=c(()=>new Set,(Q,Z)=>{if(Z.type===E.L){const X=Z.props;Q.add("with"in X?X.with:X.without)}});var U=e(76241);const B=(0,U.uW)("route-ref-type",()=>Symbol("route-ref-type"));function b(Q){return Q[B]==="absolute"}function I(Q){return Q[B]==="sub"}function x(Q){return Q[B]==="external"}function M(...Q){const Z=Q.join("/").replace(/\/\/+/g,"/");return Z!=="/"&&Z.endsWith("/")?Z.slice(0,-1):Z}function K(Q,Z,X){let oe,ce="";if(b(Q))oe=Q;else if(I(Q))oe=Q.parent,ce=Q.path;else if(x(Q)){const Ce=X.get(Q);if(!Ce)return[void 0,""];if(b(Ce))oe=Ce;else if(I(Ce))oe=Ce.parent,ce=Ce.path;else throw new Error(`ExternalRouteRef was bound to invalid target, ${Ce}`)}else throw Q[B]?new Error(`Unknown or invalid route ref type, ${Q[B]}`):new Error(`Unknown object passed to useRouteRef, got ${Q}`);if(!oe)return[void 0,""];const be=Z.get(oe);if(!be)return[void 0,""];const Le=M(be,ce);return[oe,Le]}function le(Q,Z,X,oe,ce){var vt;const be=(vt=(0,t.fp)(ce,Z))!=null?vt:[],Le=Array();let Ce=-1;for(let St=Q;St&&(Ce=be.findIndex(ut=>ut.route.routeRefs.has(St)),Ce===-1);St=oe.get(St))Le.unshift(St);Le.length===0&&(Ce-=1);const qe=Ce===-1?"":be[Ce].pathname,Ke=M(...Le.slice(0,-1).map(St=>{const ut=X.get(St);if(!ut)throw new Error(`No path for ${St}`);if(ut.includes(":"))throw new Error(`Cannot route to ${Q} with parent ${St} as it has parameters`);return ut}));return qe+Ke}class fe{constructor(Z,X,oe,ce,be){this.routePaths=Z,this.routeParents=X,this.routeObjects=oe,this.routeBindings=ce,this.appBasePath=be}resolve(Z,X){const[oe,ce]=K(Z,this.routePaths,this.routeBindings);if(!oe)return;let be;typeof X=="string"?be=this.trimPath(X):X.pathname?be={...X,pathname:this.trimPath(X.pathname)}:be=X;const Le=this.appBasePath+le(oe,be,this.routePaths,this.routeParents,this.routeObjects);return(...[qe])=>Le+(0,t.Gn)(ce,qe)}trimPath(Z){return Z&&(Z.startsWith(this.appBasePath)?Z.slice(this.appBasePath.length):Z)}}const Ae=(0,U.CT)("routing-context"),xe=({routePaths:Q,routeParents:Z,routeObjects:X,routeBindings:oe,basePath:ce="",children:be})=>{const Le=new fe(Q,Z,X,oe,ce),Ce=(0,U.EI)({1:Le});return r.createElement(Ae.Provider,{value:Ce},be)},ze=(Q,Z)=>{var X,oe;try{const ce=(0,t.fp)(Z,{pathname:Q}),be=(X=ce==null?void 0:ce.filter(Ce=>{var qe;return((qe=Ce==null?void 0:Ce.route.routeRefs)==null?void 0:qe.size)>0}).pop())==null?void 0:X.route;if(!be)return{};let Le;return be.routeRefs.size===1&&(Le=be.routeRefs.values().next().value),{extension:"App",pluginId:((oe=be.plugin)==null?void 0:oe.getId())||"root",...Le?{routeRef:Le.id}:{}}}catch{return{}}},He=({pathname:Q,search:Z,hash:X})=>{const oe=(0,A.useAnalytics)();return(0,r.useEffect)(()=>{oe.captureEvent("navigate",`${Q}${Z}${X}`)},[oe,Q,Z,X]),null},Se=({routeObjects:Q})=>{const{pathname:Z,search:X,hash:oe}=(0,t.TH)();return r.createElement(A.AnalyticsContext,{attributes:ze(Z,Q)},r.createElement(He,{pathname:Z,search:X,hash:oe}))};function Ye(Q,Z){const X=new Set(Z.values());X.delete(void 0);for(const oe of Z.keys()){if(X.has(oe))continue;let ce=oe,be="";for(;ce;){const Ce=Q.get(ce);if(!Ce)throw new Error(`No path for ${ce}`);be=`${Ce}${be}`,ce=Z.get(ce)}const Le=be.match(/:(\w+)/g);if(Le){for(let Ce=0;Ce<Le.length;Ce++)for(let qe=Ce+1;qe<Le.length;qe++)if(Le[qe]===Le[Ce])throw new Error(`Parameter ${Le[qe]} is duplicated in path ${be}`)}}}function rt(Q,Z){for(const X of Z)if(!!X.externalRoutes){for(const[oe,ce]of Object.entries(X.externalRoutes))if(!ce.optional&&!Q.has(ce))throw new Error(`External route '${oe}' of the '${X.getId()}' plugin must be bound to a target route. See https://backstage.io/link?bind-routes for details.`)}}const It=(0,U.CT)("app-context"),Et=({appContext:Q,children:Z})=>{const X=(0,U.EI)({1:Q});return r.createElement(It.Provider,{value:X,children:Z})};function Pe(Q){return new Error(`Tried to access IdentityApi ${Q} before app was loaded`)}function mt(Q){console.warn(`WARNING: Call to ${Q} is deprecated and will break in the future`)}class Xe{constructor(){q(this,"target");q(this,"waitForTarget");q(this,"resolveTarget",()=>{});q(this,"signOutTargetUrl","/");this.waitForTarget=new Promise(Z=>{this.resolveTarget=Z})}setTarget(Z,X){this.target=Z,this.signOutTargetUrl=X.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(X=>X.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 se=e(72164);function me(Q,Z,X){if(Q!==void 0){const ce=X.find(be=>be.id===Q);if(ce)return ce}if(Z){const ce=X.find(be=>be.variant==="dark");if(ce)return ce}const oe=X.find(ce=>ce.variant==="light");return oe||X[0]}const we=()=>{const Q=(0,r.useMemo)(()=>window.matchMedia("(prefers-color-scheme: dark)"),[]),[Z,X]=(0,r.useState)(Q.matches);return(0,r.useEffect)(()=>{const oe=ce=>{X(ce.matches)};return Q.addListener(oe),()=>{Q.removeListener(oe)}},[Q]),Z};function $e({children:Q}){const Z=(0,A.useApi)(A.appThemeApiRef),X=(0,se.Z)(Z.activeThemeId$(),Z.getActiveThemeId()),oe=Boolean(window.matchMedia)?we():!1,ce=me(X,oe,Z.getInstalledThemes());if(!ce)throw new Error("App has no themes");return r.createElement(ce.Provider,{children:Q})}var je=e(46611);class it{constructor(){q(this,"apis",[])}add(Z,X){return this.apis.push([Z.id,X]),X}build(){return new Je(new Map(this.apis))}}class Je{static builder(){return new it}static from(Z){return new Je(new Map(Z.map(([X,oe])=>[X.id,oe])))}static with(Z,X){return new Je(new Map([[Z.id,X]]))}constructor(Z){this.apis=Z}with(Z,X){return new Je(new Map([...this.apis,[Z.id,X]]))}get(Z){return this.apis.get(Z.id)}}function Ct(Q){const Z=new Map;return Q&&Q({bind:(oe,ce)=>{for(const[be,Le]of Object.entries(ce)){const Ce=oe[be];if(!Ce)throw new Error(`Key ${be} is not an existing external route`);if(!Le&&!Ce.optional)throw new Error(`External route ${be} is required but was undefined`);Le&&Z.set(Ce,Le)}}}),Z}const ae=(0,r.createContext)({routeObjects:[]});function ue(Q){var X;let{pathname:Z}=new URL((X=Q.getOptionalString("app.baseUrl"))!=null?X:"/","http://dummy.dev");return Z=Z.replace(/\/*$/,""),Z}function Qe(Q,Z,X){var qe;const oe=Boolean(Q),ce=(0,l.default)(Q||(()=>Promise.resolve([])));let be;if(oe&&ce.loading){const{Progress:Ke}=Z;be=r.createElement(Ke,null)}else if(ce.error){const{BootErrorPage:Ke}=Z;be=r.createElement(Ke,{step:"load-config",error:ce.error})}const{ThemeProvider:Le=$e}=Z;return be?{node:r.createElement(u.ApiProvider,{apis:Je.with(A.appThemeApiRef,X)},r.createElement(Le,null,be))}:{api:u.ConfigReader.fromConfigs((qe=ce.value)!=null?qe:[])}}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 Ue{constructor(Z){q(this,"apiHolder");q(this,"configApi");q(this,"apis");q(this,"icons");q(this,"plugins");q(this,"components");q(this,"themes");q(this,"configLoader");q(this,"defaultApis");q(this,"bindRoutes");q(this,"appIdentityProxy",new Xe);q(this,"apiFactoryRegistry");var X,oe,ce,be;this.apis=(X=Z.apis)!=null?X:[],this.icons=Z.icons,this.plugins=new Set((oe=Z.plugins)!=null?oe:[]),this.components=Z.components,this.themes=Z.themes,this.configLoader=(ce=Z.configLoader)!=null?ce:je.t,this.defaultApis=(be=Z.defaultApis)!=null?be:[],this.bindRoutes=Z.bindRoutes,this.apiFactoryRegistry=new m.ApiFactoryRegistry}getPlugins(){return Array.from(this.plugins)}getSystemIcon(Z){return this.icons[Z]}getComponents(){return this.components}getProvider(){const Z=new Ge(this);let X=!1;return({children:ce})=>{const be=(0,r.useMemo)(()=>u.AppThemeSelector.createWithStorage(this.themes),[]),{routing:Le,featureFlags:Ce,routeBindings:qe}=(0,r.useMemo)(()=>{const ut=o({root:ce,discoverers:[f,y],collectors:{routing:O,collectedPlugins:g,featureFlags:D}});return ut.collectedPlugins.forEach(Pt=>this.plugins.add(Pt)),this.verifyPlugins(this.plugins),this.getApiHolder(),{...ut,routeBindings:Ct(this.bindRoutes)}},[ce]);X||(X=!0,Ye(Le.paths,Le.parents),rt(qe,this.plugins));const Ke=Qe(this.configLoader,this.components,be),vt="api"in Ke;if(vt){const{api:ut}=Ke;this.configApi=ut}if((0,r.useEffect)(()=>{if(vt){const ut=this.getApiHolder().get(A.featureFlagsApiRef);for(const Pt of this.plugins.values())if("getFeatureFlags"in Pt)for(const Lt of Pt.getFeatureFlags())ut.registerFlag({name:Lt.name,pluginId:Pt.getId()});else for(const Lt of Pt.output())Lt.type==="feature-flag"&&ut.registerFlag({name:Lt.name,pluginId:Pt.getId()});for(const Pt of Ce)ut.registerFlag({name:Pt,pluginId:""})}},[vt,Ke,Ce]),"node"in Ke)return Ke.node;const{ThemeProvider:St=$e}=this.components;return r.createElement(u.ApiProvider,{apis:this.getApiHolder()},r.createElement(Et,{appContext:Z},r.createElement(St,null,r.createElement(xe,{routePaths:Le.paths,routeParents:Le.parents,routeObjects:Le.objects,routeBindings:qe,basePath:ue(Ke.api)},r.createElement(ae.Provider,{value:{routeObjects:Le.objects}},ce)))))}}getRouter(){const{Router:Z,SignInPage:X}=this.components,oe=({component:be,children:Le})=>{const[Ce,qe]=(0,r.useState)(),Ke=(0,A.useApi)(A.configApiRef),vt=ue(Ke);return Ce?(this.appIdentityProxy.setTarget(Ce,{signOutTargetUrl:vt||"/"}),Le):r.createElement(be,{onSignInSuccess:qe})};return({children:be})=>{const Le=(0,A.useApi)(A.configApiRef),Ce=ue(Le),qe=`${Ce}/*`,{routeObjects:Ke}=(0,r.useContext)(ae);return X?r.createElement(Z,null,r.createElement(Se,{routeObjects:Ke}),r.createElement(oe,{component:X},r.createElement(t.Z5,null,r.createElement(t.AW,{path:qe,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:Ce||"/"}),r.createElement(Z,null,r.createElement(Se,{routeObjects:Ke}),r.createElement(t.Z5,null,r.createElement(t.AW,{path:qe,element:r.createElement(r.Fragment,null,be)}))))}}getApiHolder(){if(this.apiHolder){for(const Z of this.plugins)for(const X of Z.getApis())this.apiFactoryRegistry.get(X.api)||this.apiFactoryRegistry.register("default",X);return m.ApiResolver.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder}this.apiFactoryRegistry.register("static",{api:A.appThemeApiRef,deps:{},factory:()=>u.AppThemeSelector.createWithStorage(this.themes)}),this.apiFactoryRegistry.register("static",{api:A.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:A.identityApiRef,deps:{},factory:()=>this.appIdentityProxy}),this.apiFactoryRegistry.register("default",{api:A.featureFlagsApiRef,deps:{},factory:()=>new u.LocalStorageFeatureFlags});for(const Z of this.defaultApis)this.apiFactoryRegistry.register("default",Z);for(const Z of this.plugins)for(const X of Z.getApis())if(!this.apiFactoryRegistry.register("default",X))throw new Error(`Plugin ${Z.getId()} tried to register duplicate or forbidden API factory for ${X.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 m.ApiResolver.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder=new m.ApiResolver(this.apiFactoryRegistry),this.apiHolder}verifyPlugins(Z){const X=new Set;for(const oe of Z){const ce=oe.getId();if(X.has(ce))throw new Error(`Duplicate plugin found '${ce}'`);X.add(ce)}}}function at(Q){return new Ue(Q)}},46611:function(ee,s,e){"use strict";e.d(s,{t:function(){return r}});const r=async(t="__APP_INJECTED_RUNTIME_CONFIG__")=>{const l=[{context:"app-config.yaml",data:{app:{title:"Techdocs Preview App",baseUrl:"http://localhost:3000"},backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}}}];if(!l)throw new Error("No static configuration provided");if(!Array.isArray(l))throw new Error("Static configuration has invalid format");const u=l.slice();if(t!=="__app_injected_runtime_config__".toLocaleUpperCase("en-US"))try{const m=JSON.parse(t);Array.isArray(m)?u.push(...m):u.push({data:m,context:"env"})}catch(m){throw new Error(`Failed to load runtime configuration, ${m}`)}const A=window.__APP_CONFIG__;return A&&u.push({context:"window",data:A}),u}},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),l=e(73495),u=e.n(l);e.o(l,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return l.AtlassianAuth}}),e.o(l,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return l.BitbucketAuth}}),e.o(l,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return l.FlatRoutes}}),e.o(l,"GithubAuth")&&e.d(s,{GithubAuth:function(){return l.GithubAuth}}),e.o(l,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return l.GitlabAuth}}),e.o(l,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return l.GoogleAuth}}),e.o(l,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return l.MicrosoftAuth}}),e.o(l,"OktaAuth")&&e.d(s,{OktaAuth:function(){return l.OktaAuth}}),e.o(l,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return l.OneLoginAuth}})},73495:function(){},49208:function(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 l.w},NoOpAnalyticsApi:function(){return r.NoOpAnalyticsApi},OAuthRequestManager:function(){return r.OAuthRequestManager},UnhandledErrorForwarder:function(){return r.UnhandledErrorForwarder},UrlPatternDiscovery:function(){return r.UrlPatternDiscovery},WebStorage:function(){return r.WebStorage},createFetchApi:function(){return r.createFetchApi},createSpecializedApp:function(){return t.createSpecializedApp},defaultConfigLoader:function(){return t.defaultConfigLoader}});var r=e(56494);e.o(r,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return r.AtlassianAuth}}),e.o(r,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return r.BitbucketAuth}}),e.o(r,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return r.FlatRoutes}}),e.o(r,"GithubAuth")&&e.d(s,{GithubAuth:function(){return r.GithubAuth}}),e.o(r,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return r.GitlabAuth}}),e.o(r,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return r.GoogleAuth}}),e.o(r,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return r.MicrosoftAuth}}),e.o(r,"OktaAuth")&&e.d(s,{OktaAuth:function(){return r.OktaAuth}}),e.o(r,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return r.OneLoginAuth}}),e.o(r,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return r.createSpecializedApp}}),e.o(r,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return r.defaultConfigLoader}});var t=e(44056);e.o(t,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return t.AtlassianAuth}}),e.o(t,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return t.BitbucketAuth}}),e.o(t,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return t.FlatRoutes}}),e.o(t,"GithubAuth")&&e.d(s,{GithubAuth:function(){return t.GithubAuth}}),e.o(t,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return t.GitlabAuth}}),e.o(t,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return t.GoogleAuth}}),e.o(t,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return t.MicrosoftAuth}}),e.o(t,"OktaAuth")&&e.d(s,{OktaAuth:function(){return t.OktaAuth}}),e.o(t,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return t.OneLoginAuth}});var l=e(63938)},57018:function(ee,s,e){"use strict";e.d(s,{RefreshingAuthSessionManager:function(){return m}});function r(c,f){for(const y of f)if(!c.has(y))return!1;return!0}class t{constructor(f){this.options=f}sessionExistsAndHasScope(f,y){if(!f)return!1;if(!y||this.options.sessionScopes===void 0)return!0;const g=this.options.sessionScopes(f);return r(g,y)}getExtendedScope(f,y){const g=new Set(this.options.defaultScopes);if(f&&this.options.sessionScopes!==void 0){const E=this.options.sessionScopes(f);for(const C of E)g.add(C)}if(y)for(const E of y)g.add(E);return g}}var l=e(98005),u=e(36964);class A{constructor(){q(this,"subject",new l.X(u.SessionState.SignedOut));q(this,"signedIn",!1)}setIsSignedIn(f){this.signedIn!==f&&(this.signedIn=f,this.subject.next(this.signedIn?u.SessionState.SignedIn:u.SessionState.SignedOut))}sessionState$(){return this.subject}}class m{constructor(f){q(this,"connector");q(this,"helper");q(this,"sessionScopesFunc");q(this,"sessionShouldRefreshFunc");q(this,"stateTracker",new A);q(this,"refreshPromise");q(this,"currentSession");const{connector:y,defaultScopes:g=new Set,sessionScopes:E,sessionShouldRefresh:C}=f;this.connector=y,this.sessionScopesFunc=E,this.sessionShouldRefreshFunc=C,this.helper=new t({sessionScopes:E,defaultScopes:g})}async getSession(f){if(this.helper.sessionExistsAndHasScope(this.currentSession,f.scopes)){if(!this.sessionShouldRefreshFunc(this.currentSession))return this.currentSession;try{const g=await this.collapsedSessionRefresh(),E=this.sessionScopesFunc(this.currentSession),C=this.sessionScopesFunc(g);return r(C,E)&&(this.currentSession=g),g}catch(g){if(f.optional)return;throw g}}if(!this.currentSession&&!f.instantPopup)try{const y=await this.collapsedSessionRefresh();return this.currentSession=y,this.getSession(f)}catch{}if(!f.optional)return this.currentSession=await this.connector.createSession({...f,scopes:this.helper.getExtendedScope(this.currentSession,f.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 f=await this.refreshPromise;return this.stateTracker.setIsSignedIn(!0),f}finally{delete this.refreshPromise}}}class o{constructor(f){q(this,"connector");q(this,"helper");q(this,"stateTracker",new SessionStateTracker);q(this,"currentSession");const{connector:y,defaultScopes:g=new Set,sessionScopes:E}=f;this.connector=y,this.helper=new SessionScopeHelper({sessionScopes:E,defaultScopes:g})}setSession(f){this.currentSession=f,this.stateTracker.setIsSignedIn(Boolean(f))}async getSession(f){if(this.helper.sessionExistsAndHasScope(this.currentSession,f.scopes))return this.currentSession;if(!f.optional)return this.currentSession=await this.connector.createSession({...f,scopes:this.helper.getExtendedScope(this.currentSession,f.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 l},X:function(){return u}});var r=e(82394),t=e.n(r);class l{constructor(){q(this,"isClosed",!1);q(this,"terminatingError");q(this,"observable",new(t())(m=>this.isClosed?(this.terminatingError?m.error(this.terminatingError):m.complete(),()=>{}):(this.subscribers.add(m),()=>{this.subscribers.delete(m)})));q(this,"subscribers",new Set)}[Symbol.observable](){return this}get closed(){return this.isClosed}next(m){if(this.isClosed)throw new Error("PublishSubject is closed");this.subscribers.forEach(o=>o.next(m))}error(m){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.terminatingError=m,this.subscribers.forEach(o=>o.error(m))}complete(){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.subscribers.forEach(m=>m.complete())}subscribe(m,o,c){const f=typeof m=="function"?{next:m,error:o,complete:c}:m;return this.observable.subscribe(f)}}class u{constructor(m){q(this,"isClosed");q(this,"currentValue");q(this,"terminatingError");q(this,"observable");q(this,"subscribers",new Set);this.isClosed=!1,this.currentValue=m,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(m){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.currentValue=m,this.subscribers.forEach(o=>o.next(m))}error(m){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.terminatingError=m,this.subscribers.forEach(o=>o.error(m))}complete(){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.subscribers.forEach(m=>m.complete())}subscribe(m,o,c){const f=typeof m=="function"?{next:m,error:o,complete:c}:m;return this.observable.subscribe(f)}}},88934:function(ee,s,e){"use strict";e.d(s,{L:function(){return l}});var r=e(36964),t=e(2784);const l=u=>{const{children:A}=u,m=(0,r.useApi)(r.featureFlagsApiRef),o="with"in u?m.isActive(u.with):!m.isActive(u.without);return t.createElement(t.Fragment,null,o?A:null)};(0,r.attachComponentData)(l,"core.featureFlagged",!0)},63938:function(ee,s,e){"use strict";e.d(s,{w:function(){return u}});var r=e(2784),t=e(10289),l=e(36964);const u=m=>{const o=(0,l.useApp)(),{NotFoundErrorPage:c}=o.getComponents(),f=(0,l.useElementFilter)(m.children,y=>y.getElements().flatMap(g=>{var C;let E=g.props.path;return E===""?[]:(E=(C=E==null?void 0:E.replace(/\/\*$/,""))!=null?C:"/",[{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 f.push({element:r.createElement(c,null),path:"/*"}),(0,t.V$)(f)};var A=e(88934)},82339:function(ee,s,e){"use strict";e.d(s,{Button:function(){return fe},CodeSnippet:function(){return Pe},Content:function(){return to},ContentHeader:function(){return mi},CreateButton:function(){return se},DependencyGraph:function(){return gn},DependencyGraphTypes:function(){return r},EmptyState:function(){return jt},ErrorPage:function(){return Ei},ErrorPanel:function(){return Jt},Header:function(){return uo},HeaderIconLinkRow:function(){return jr},HeaderLabel:function(){return Li},HeaderTabs:function(){return no},InfoCard:function(){return lr},ItemCardGrid:function(){return wi},ItemCardHeader:function(){return Fi},Link:function(){return K},LogViewer:function(){return Ir},MissingAnnotationEmptyState:function(){return N},OverflowTooltip:function(){return hr},Page:function(){return mo},PageWithHeader:function(){return Ni},Progress:function(){return Dr},ResponseErrorPanel:function(){return En},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 qt},sidebarConfig:function(){return Xn},useSidebarOpenState:function(){return fa},useSidebarPinState:function(){return Zr}});var r={};e.r(r),e.d(r,{Nm:function(){return me},ht:function(){return je},LJ:function(){return $e}});var t=e(2784),l=e(36964),u=e(19928);function A(n){const[a,i]=useState([]),d=useApi(alertApiRef),{anchorOrigin:p={vertical:"top",horizontal:"center"}}=n;if(useEffect(()=>{const z=d.alert$().subscribe(G=>i(j=>j.concat(G)));return()=>{z.unsubscribe()}},[d]),a.length===0)return null;const[v]=a,P=()=>{i(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 m=e(79692),o=e(12420);const c=(0,m.Z)(n=>(0,o.Z)({avatar:{width:"4rem",height:"4rem",color:"#fff",fontWeight:n.typography.fontWeightBold,letterSpacing:"1px",textTransform:"uppercase"}}),{name:"BackstageAvatar"});function f(n){const{displayName:a,picture:i,customStyles:d}=n,p=c();let v={...d};return i||(v={backgroundColor:stringToColor(a||""),...d}),React.createElement(MaterialAvatar,{alt:a,src:i,className:p.avatar,style:v},a&&extractInitials(a))}var y=e(77277),g=e(72779),E=e.n(g),C=e(86689),O=e(62833),D=e(76635);const U=(0,m.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),b=()=>{try{return(0,l.useApi)(l.configApiRef).getOptionalString("app.baseUrl")}catch{return}},I=()=>{var d;const n="http://dummy.dev",a=(d=b())!=null?d:"/",{pathname:i}=new URL(a,n);return(0,D.trimEnd)(i,"/")},x=n=>{let a=String(n);const i=I(),d=B(a),p=a.startsWith(i);return!d&&!p&&(a=i.concat(a)),a},M=n=>{var a;return n instanceof Array?n.map(M).join(" ").trim():typeof n=="object"&&n?M((a=n==null?void 0:n.props)==null?void 0:a.children):["string","number"].includes(typeof n)?String(n):""},K=t.forwardRef(({onClick:n,noTrack:a,...i},d)=>{const p=U(),v=(0,l.useAnalytics)(),P=x(i.to),z=M(i.children)||P,G=B(P),j=G&&!!/^https?:/.exec(P),ne=_=>{n==null||n(_),a||v.captureEvent("click",z,{attributes:{to:P}})};return G?t.createElement(C.Z,{...j?{target:"_blank",rel:"noopener"}:{},...i,ref:d,href:P,onClick:ne,className:E()(p.externalLink,i.className)},i.children,t.createElement("span",{className:p.visuallyHidden},", Opens in a new window")):t.createElement(C.Z,{...i,ref:d,component:O.rU,to:P,onClick:ne})}),le=t.forwardRef((n,a)=>t.createElement(K,{ref:a,...n,color:"initial"})),fe=t.forwardRef((n,a)=>t.createElement(y.Z,{ref:a,component:le,...n}));var Ae=e(60364),xe=e(61837),ze=e(80030),He=e(19353),Se=e(95074);function Ye(n){const{text:a,tooltipDelay:i=1e3,tooltipText:d="Text copied to clipboard","aria-label":p="Copy text"}=n,v=(0,l.useApi)(l.errorApiRef),[P,z]=(0,t.useState)(!1),[{error:G},j]=(0,Se.Z)();(0,t.useEffect)(()=>{G&&v.post(G)},[G,v]);const ne=_=>{_.stopPropagation(),z(!0),j(a)};return t.createElement(t.Fragment,null,t.createElement(ze.ZP,{id:"copy-test-tooltip",title:d,placement:"top",leaveDelay:i,onClose:()=>z(!1),open:P},t.createElement(xe.Z,{onClick:ne,"aria-label":p},t.createElement(He.Z,null))))}var rt=e(83229),It=e(26639),Et=e(39595);function Pe(n){const{text:a,language:i,showLineNumbers:d=!1,highlightedNumbers:p,customStyle:v,showCopyCodeButton:P=!1}=n,z=(0,Ae.Z)(),G=z.palette.type==="dark"?It.Z:Et.Z,j=z.palette.type==="dark"?"#256bf3":"#e6ffed";return t.createElement("div",{style:{position:"relative"}},t.createElement(rt.Z,{customStyle:v,language:i,style:G,showLineNumbers:d,wrapLines:!0,lineNumberStyle:{color:z.palette.textVerySubtle},lineProps:ne=>p!=null&&p.includes(ne)?{style:{backgroundColor:j}}:{}},a),P&&t.createElement("div",{style:{position:"absolute",top:0,right:0}},t.createElement(Ye,{text:a})))}var mt=e(41156),Xe=e(88188);function se(n){const{title:a,to:i}=n,d=(0,mt.Z)(p=>p.breakpoints.down("xs"));return i?d?t.createElement(xe.Z,{component:O.rU,color:"primary",title:a,size:"small",to:i},t.createElement(Xe.Z,null)):t.createElement(y.Z,{component:O.rU,variant:"contained",color:"primary",to:i},a):null}var me;(function(n){const a="TB";n.TOP_BOTTOM=a;const i="BT";n.BOTTOM_TOP=i;const d="LR";n.LEFT_RIGHT=d;const p="RL";n.RIGHT_LEFT=p})(me||(me={}));var we;(function(n){const a="UL";n.UP_LEFT=a;const i="UR";n.UP_RIGHT=i;const d="DL";n.DOWN_LEFT=d;const p="DR";n.DOWN_RIGHT=p})(we||(we={}));var $e;(function(n){const a="network-simplex";n.NETWORK_SIMPLEX=a;const i="tight-tree";n.TIGHT_TREE=i;const d="longest-path";n.LONGEST_PATH=d})($e||($e={}));var je;(function(n){const a="l";n.LEFT=a;const i="r";n.RIGHT=i;const d="c";n.CENTER=d})(je||(je={}));var it=e(84945),Je=e(11105),Ct=e(97963),ae=e(46506),ue=e.n(ae),Qe=e(54073),Ge=e.n(Qe),Ue=e(10368);const at=(0,m.Z)(n=>({node:{fill:n.palette.primary.light,stroke:n.palette.primary.light},text:{fill:n.palette.primary.contrastText}}),{name:"BackstageDependencyGraphDefaultNode"});function Q({node:{id:n}}){const a=at(),[i,d]=t.useState(0),[p,v]=t.useState(0),P=t.useRef(null);t.useLayoutEffect(()=>{if(P.current){let{height:ne,width:_}=P.current.getBBox();ne=Math.round(ne),_=Math.round(_),(ne!==p||_!==i)&&(d(_),v(ne))}},[i,p]);const z=10,G=i+z*2,j=p+z*2;return t.createElement("g",null,t.createElement("rect",{className:a.node,width:G,height:j,rx:10}),t.createElement("text",{ref:P,className:a.text,y:j/2,x:G/2,textAnchor:"middle",alignmentBaseline:"middle"},n))}const Z="arrow-marker",X="node",oe="edge",ce="label",be=(0,Ue.Z)(n=>({node:{transition:`${n.transitions.duration.shortest}ms`}}),{name:"BackstageDependencyGraphNode"}),Le=n=>t.createElement(Q,{...n});function Ce({render:n=Le,setNode:a,node:i}){const{width:d,height:p,x:v=0,y:P=0}=i,z=i,G=be(),j=t.useRef(null);return t.useLayoutEffect(()=>{if(j.current){let{height:ne,width:_}=j.current.getBBox();ne=Math.round(ne),_=Math.round(_),(ne!==p||_!==d)&&a(i.id,{...i,height:ne,width:_})}},[i,d,p,a]),t.createElement("g",{ref:j,"data-testid":X,className:G.node,transform:`translate(${v-d/2},${P-p/2})`},n({node:z}))}var qe=e(55876),Ke=e(66481),vt=e(19574),St=e.n(vt);const ut=(0,Ue.Z)(n=>({text:{fill:n.palette.textContrast}}),{name:"BackstageDependencyGraphDefaultLabel"});function Pt({edge:{label:n}}){const a=ut();return t.createElement("text",{className:a.text,textAnchor:"middle"},n)}const Lt=(0,Ue.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"}),Ft=n=>t.createElement(Pt,{...n}),Ot=qe.Z().x(n=>n.x).y(n=>n.y).curve(Ke.Z);function Wt({render:n=Ft,setEdge:a,id:i,edge:d}){const{x:p=0,y:v=0,width:P,height:z,points:G}=d,j=d,ne=Lt(),_=t.useRef(null);t.useLayoutEffect(()=>{if(_.current){let{height:Te,width:Me}=_.current.getBBox();Te=Math.round(Te),Me=Math.round(Me),(Te!==z||Me!==P)&&a(i,{...d,height:Te,width:Me})}},[d,z,P,a,i]);let ve="";if(G){const Te=G.filter(Me=>St()(Me.x)&&St()(Me.y));ve=Ot(Te)||""}return t.createElement(t.Fragment,null,ve&&t.createElement("path",{"data-testid":oe,className:ne.path,markerEnd:`url(#${Z})`,d:ve}),j.label?t.createElement("g",{ref:_,"data-testid":ce,className:ne.label,transform:`translate(${p},${v})`},n({edge:j})):null)}const Nt="workspace";function gn(n){var or,Tr;const{edges:a,nodes:i,renderNode:d,direction:p=me.TOP_BOTTOM,align:v,nodeMargin:P=50,edgeMargin:z=10,rankMargin:G=50,paddingX:j=0,paddingY:ne=0,acyclicer:_,ranker:ve=$e.NETWORK_SIMPLEX,labelPosition:Te=je.RIGHT,labelOffset:Me=10,edgeRanks:ft=1,edgeWeight:Mt=1,renderLabel:Gt,defs:_t,zoom:pt="enabled",...Kt}=n,nn=(0,Ct.Z)(),[en,rr]=t.useState(100),[Hn,Wr]=t.useState(100),wt=t.useRef(new(ue()).graphlib.Graph),[Rr,Hr]=t.useState(((or=wt.current.graph())==null?void 0:or.width)||0),[Sr,aa]=t.useState(((Tr=wt.current.graph())==null?void 0:Tr.height)||0),[va,oa]=t.useState([]),[sa,Aa]=t.useState([]),dn=Math.max(Rr,en),bn=Math.max(Sr,Hn),cr=t.useMemo(()=>Ge()(fn=>{if(!fn)return;const An=Je.Z(fn),on=Je.Z(fn.getElementById(Nt));function jn(){An.call(it.sP().scaleExtent([1,10]).on("zoom",qn=>{qn.transform.x=Math.min(0,Math.max(qn.transform.x,dn-dn*qn.transform.k)),qn.transform.y=Math.min(0,Math.max(qn.transform.y,bn-bn*qn.transform.k)),on.attr("transform",qn.transform)}))}pt==="enabled"?jn():pt==="enable-on-click"&&An.on("click",()=>jn());const{width:Vn,height:ia}=fn.getBoundingClientRect();en!==Vn&&rr(Vn),Hn!==ia&&Wr(ia)},100),[Hn,en,dn,bn,pt]),ar=t.useCallback(()=>{const fn=wt.current.nodes(),An=wt.current.edges();fn.forEach(on=>{i.some(Vn=>Vn.id===on)||wt.current.removeNode(on)}),An.forEach(on=>{a.some(Vn=>Vn.from===on.v&&Vn.to===on.w)||wt.current.removeEdge(on.v,on.w)}),i.forEach(on=>{const jn=wt.current.nodes().find(Vn=>on.id===Vn);if(jn&&wt.current.node(jn)){const{width:Vn,height:ia,x:qn,y:tl}=wt.current.node(jn);wt.current.setNode(jn,{...on,width:Vn,height:ia,x:qn,y:tl})}else wt.current.setNode(on.id,{...on,width:0,height:0})}),a.forEach(on=>{wt.current.setEdge(on.from,on.to,{...on,label:on.label,width:0,height:0,labelpos:Te,labeloffset:Me,weight:Mt,minlen:ft})})},[a,i,Te,Me,Mt,ft]),an=t.useMemo(()=>Ge()(()=>{ue().layout(wt.current);const{height:fn,width:An}=wt.current.graph(),on=Math.max(0,fn||0),jn=Math.max(0,An||0);Hr(jn),aa(on),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:j,marginy:ne,acyclicer:_,ranker:ve}),ar(),an(),an.cancel),[_,v,p,z,j,ne,P,G,ve,ar,an]);function Pn(fn,An){return wt.current.setNode(fn,An),an(),wt.current}function Cr(fn,An){return wt.current.setEdge(fn,An),an(),wt.current}return t.createElement("svg",{ref:cr,...Kt,width:"100%",height:bn,viewBox:`0 0 ${dn} ${bn}`},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"})),_t),t.createElement("g",{id:Nt},t.createElement("svg",{width:Rr,height:Sr,y:bn/2-Sr/2,x:dn/2-Rr/2,viewBox:`0 0 ${Rr} ${Sr}`},sa.map(fn=>{const An=wt.current.edge(fn);return An?t.createElement(Wt,{key:`${fn.v}-${fn.w}`,id:fn,setEdge:Cr,render:Gt,edge:An}):null}),va.map(fn=>{const An=wt.current.node(fn);return An?t.createElement(Ce,{key:fn,setNode:Pn,render:d,node:An}):null}))))}const In=(0,m.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"}),Zt=n=>{var Te;const{variant:a,message:i,id:d,fixed:p=!1}=n,v=In(),z=useApi(storageApiRef).forBucket("notifications"),G=(Te=z.snapshot("dismissedBanners").value)!=null?Te:[],[j,ne]=useState(new Set(G)),_=useObservable(z.observe$("dismissedBanners"));useEffect(()=>{var Me;if(_!=null&&_.value){const ft=(Me=_==null?void 0:_.value)!=null?Me:[];ne(new Set(ft))}},[_==null?void 0:_.value]);const ve=()=>{z.set("dismissedBanners",[...j,d])};return React.createElement(Snackbar,{anchorOrigin:p?{vertical:"bottom",horizontal:"center"}:{vertical:"top",horizontal:"center"},open:!j.has(d),classes:{root:classNames(v.root,!p&&v.topPosition)}},React.createElement(SnackbarContent,{classes:{root:classNames(v.content,v[a]),message:v.message},message:i,action:[React.createElement(IconButton,{key:"dismiss",title:"Permanently dismiss this message",color:"inherit",onClick:ve},React.createElement(Close,{className:v.icon}))]}))};var Ht=e(60905),_e=e(90436),ie=e.p+"static/missingAnnotation.67f79e98..svg",V=e.p+"static/noInformation.4b426325..svg",ye=e.p+"static/createComponent.975d1e1e..svg",Ve=e.p+"static/noBuild.1715fa71..svg";const tt=(0,m.Z)({generalImg:{width:"95%",zIndex:2,position:"relative",left:"50%",top:"50%",transform:"translate(-50%, 15%)"}},{name:"BackstageEmptyStateImage"}),nt=({missing:n})=>{const a=tt();switch(n){case"field":return t.createElement("img",{src:ie,className:a.generalImg,alt:"annotation is missing"});case"info":return t.createElement("img",{src:V,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:Ve,alt:"no Build",className:a.generalImg});default:return null}},Tt=(0,m.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 jt(n){const{title:a,description:i,missing:d,action:p}=n,v=Tt();return t.createElement(Ht.Z,{container:!0,direction:"row",justifyContent:"space-around",alignItems:"flex-start",className:v.root,spacing:2},t.createElement(Ht.Z,{item:!0,xs:12,md:6},t.createElement(Ht.Z,{container:!0,direction:"column"},t.createElement(Ht.Z,{item:!0,xs:!0},t.createElement(_e.Z,{variant:"h5"},a)),t.createElement(Ht.Z,{item:!0,xs:!0},t.createElement(_e.Z,{variant:"body1"},i)),t.createElement(Ht.Z,{item:!0,xs:!0,className:v.action},p))),t.createElement(Ht.Z,{item:!0,xs:12,md:6,className:v.imageContainer},t.createElement(nt,{missing:d})))}const mn=`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`,sn=(0,m.Z)(n=>({code:{borderRadius:6,margin:`${n.spacing(2)}px 0px`,background:n.palette.type==="dark"?"#444":"#fff"}}),{name:"BackstageMissingAnnotationEmptyState"});function N(n){const{annotation:a,readMoreUrl:i}=n,d=i||"https://backstage.io/docs/features/software-catalog/well-known-annotations",p=sn(),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(jt,{missing:"field",title:"Missing Annotation",description:v,action:t.createElement(t.Fragment,null,t.createElement(_e.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:mn.replace("ANNOTATION",a),language:"yaml",showLineNumbers:!0,highlightedNumbers:[6,7],customStyle:{background:"inherit",fontSize:"115%"}})),t.createElement(y.Z,{color:"primary",component:K,to:d},"Read more"))})}var te=e(11776),pe=e(38402),re=e(49378),Ie=e(41128),lt=e(27616),At=e(8284),ct=e(70660),Ut=e(91750),tn=e(38016);const $t=(n,a)=>(a.palette.type==="light"?Ie._j:Ie.$n)(a.palette[n].light,.6),ht=(n,a)=>(a.palette.type==="light"?Ie.$n:Ie._j)(a.palette[n].light,.9),kt=(0,m.Z)(n=>({root:{marginRight:n.spacing(1),fill:({severity:a})=>$t(a,n)}})),rn=({severity:n})=>{const a=kt({severity:n});return t.createElement(Ut.Z,{classes:a})},Yt=({severity:n})=>{const a=kt({severity:n});return t.createElement(tn.Z,{classes:a})},Xt=(0,m.Z)(n=>({panel:{backgroundColor:({severity:a})=>ht(a,n),color:({severity:a})=>$t(a,n),verticalAlign:"middle"},summary:{display:"flex",flexDirection:"row"},summaryText:{color:({severity:a})=>$t(a,n),fontWeight:"bold"},message:{width:"100%",display:"block",color:({severity:a})=>$t(a,n),backgroundColor:({severity:a})=>ht(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"}),ln=n=>n.charAt(0).toLocaleUpperCase("en-US")+n.slice(1);function qt(n){const{severity:a="warning",title:i,message:d,children:p,defaultExpanded:v}=n,P=Xt({severity:a}),z=ln(a)+(i?`: ${i}`:"");return t.createElement(lt.Z,{defaultExpanded:v!=null?v:!1,className:P.panel,role:"alert"},t.createElement(At.Z,{expandIcon:t.createElement(Yt,{severity:a}),className:P.summary},t.createElement(rn,{severity:a}),t.createElement(_e.Z,{className:P.summaryText,variant:"subtitle1"},z)),(d||p)&&t.createElement(ct.Z,null,t.createElement(Ht.Z,{container:!0},d&&t.createElement(Ht.Z,{item:!0,xs:12},t.createElement(_e.Z,{className:P.message,variant:"body1"},d)),p&&t.createElement(Ht.Z,{item:!0,xs:12,className:P.details},p))))}const Bt=(0,m.Z)(n=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:n.spacing(2)},divider:{margin:n.spacing(2)}}),{name:"BackstageErrorPanel"}),zt=({error:n,message:a,stack:i,children:d})=>{const p=Bt();return t.createElement(te.Z,{dense:!0},t.createElement(pe.Z,{alignItems:"flex-start"},t.createElement(re.Z,{classes:{secondary:p.text},primary:"Error",secondary:n}),t.createElement(Ye,{text:n})),t.createElement(pe.Z,{alignItems:"flex-start"},t.createElement(re.Z,{classes:{secondary:p.text},primary:"Message",secondary:a}),t.createElement(Ye,{text:a})),i&&t.createElement(pe.Z,{alignItems:"flex-start"},t.createElement(re.Z,{classes:{secondary:p.text},primary:"Stack Trace",secondary:i}),t.createElement(Ye,{text:i})),d)};function Jt(n){const{title:a,error:i,defaultExpanded:d,children:p}=n;return t.createElement(qt,{severity:"error",title:a!=null?a:i.message,defaultExpanded:d},t.createElement(zt,{error:i.name,message:i.message,stack:i.stack,children:p}))}var pn=e(85256);const cn=(0,m.Z)(n=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:n.spacing(2)},divider:{margin:n.spacing(2)}}),{name:"BackstageResponseErrorPanel"});function En(n){var Me;const{title:a,error:i,defaultExpanded:d}=n,p=cn();if(i.name!=="ResponseError")return t.createElement(Jt,{title:a!=null?a:i.message,defaultExpanded:d,error:i});const{body:v,cause:P}=i,{request:z,response:G}=v,j=`${G.statusCode}: ${P.name}`,ne=z&&`${z.method} ${z.url}`,_=P.message.replace(/\\n/g,`
12
+ `),ve=(Me=P.stack)==null?void 0:Me.replace(/\\n/g,`
13
+ `),Te=JSON.stringify(v,void 0,2);return t.createElement(Jt,{title:a!=null?a:i.message,defaultExpanded:d,error:{name:j,message:_,stack:ve}},ne&&t.createElement(pe.Z,{alignItems:"flex-start"},t.createElement(re.Z,{classes:{secondary:p.text},primary:"Request",secondary:z?`${ne}`:void 0}),t.createElement(Ye,{text:ne})),t.createElement(t.Fragment,null,t.createElement(pn.Z,{component:"li",className:p.divider}),t.createElement(pe.Z,{alignItems:"flex-start"},t.createElement(re.Z,{classes:{secondary:p.text},primary:"Full Error as JSON"})),t.createElement(Pe,{language:"json",text:Te,showCopyCodeButton:!0})))}var zn=e(47093);function Rn(n){const a=document.createElement("div");return a.setAttribute("id",n),a}function Ln(n){document.body.insertBefore(n,document.body.lastElementChild.nextElementSibling)}function w(n){const a=useRef(null);useEffect(function(){const p=document.querySelector(`#${n}`),v=p||Rn(n);return p||Ln(v),v.appendChild(a.current),function(){a.current.remove(),v.childNodes.length===-1&&v.remove()}},[n]);function i(){return a.current||(a.current=document.createElement("div")),a.current}return i()}var h=null;const S="core.calloutSeen";function F(){const[n,a]=useState(()=>{const d=localStorage.getItem(S);return d?JSON.parse(d):{}}),i=useCallback((d,p)=>{const v=localStorage.getItem(S),z={...v?JSON.parse(v):{},[d]:p};a(z),localStorage.setItem(S,JSON.stringify(z))},[]);return{states:n,setState:i}}function W(n){const{states:a,setState:i}=F(),d=useCallback(()=>{i(n,!0)},[i,n]);return{seen:a[n]===!0,markSeen:d}}function Ee(n){const{seen:a,markSeen:i}=W(n);return{show:a===!1,hide:i}}const ge=(0,m.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 Oe(n){const{featureId:a,title:i,description:d,children:p}=n,{show:v,hide:P}=useShowCallout(a),z=usePortal("core.callout"),G=useRef(null),[j,ne]=useState(),_=ge(),ve=useCallback(()=>{if(G.current){const Te=G.current.getBoundingClientRect(),Me=Math.max(Te.width,Te.height),ft=800,Mt=Te.x-(Me-Te.width)/2-ft,Gt=Te.y-(Me-Te.height)/2-ft,_t=Me+2*ft,pt=450,Kt=Te.x+Te.width/2-pt,nn=Te.y-(Me-Te.height)/2+Me+20;ne({dotLeft:Mt,dotTop:Gt,dotSize:_t,borderWidth:ft,textTop:nn,textLeft:Kt,textWidth:pt})}},[]);return useEffect(()=>(window.addEventListener("resize",ve),window.addEventListener("scroll",ve),()=>{window.removeEventListener("resize",ve),window.removeEventListener("scroll",ve)}),[ve]),useLayoutEffect(ve,[G.current,ve]),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:j==null?void 0:j.dotLeft,top:j==null?void 0:j.dotTop,width:j==null?void 0:j.dotSize,height:j==null?void 0:j.dotSize,borderWidth:j==null?void 0:j.borderWidth},onClick:P,onKeyDown:P,role:"button",tabIndex:0},React.createElement("div",{className:_.pulseCircle})),React.createElement("div",{className:_.text,"data-testid":"text",style:{left:j==null?void 0:j.textLeft,top:j==null?void 0:j.textTop,width:j==null?void 0:j.textWidth}},React.createElement(Typography,{variant:"h2",paragraph:!0},i),React.createElement(Typography,null,d))))),z)):React.createElement(React.Fragment,null,p)}var yt=e(35292);const bt=(0,m.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 On({color:n="primary",disabled:a=!1,href:i="#",icon:d=t.createElement(yt.Z,null),label:p,onClick:v,title:P}){const z=bt();return a?t.createElement(C.Z,{title:P,className:E()(z.link,z.disabled),underline:"none"},d,t.createElement("span",{className:z.label},p)):t.createElement(C.Z,{title:P,className:E()(z.link,z[n]),to:i,component:K,onClick:v},d,t.createElement("span",{className:z.label},p))}const xn=(0,m.Z)(n=>({links:{margin:n.spacing(2,0),display:"grid",gridAutoFlow:"column",gridAutoColumns:"min-content",gridGap:n.spacing(3)}}),{name:"BackstageHeaderIconLinkRow"});function jr(n){const{links:a}=n,i=xn();return t.createElement("nav",{className:i.links},a.map((d,p)=>t.createElement(On,{key:p+1,...d})))}const br=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
+ `},Vr=100,ur=10,Gn=(0,m.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:Vr,height:`calc(100% + ${ur}px)`,transition:"opacity 300ms",pointerEvents:"none"},fadeLeft:{left:-ur,background:`linear-gradient(90deg, ${br(n.palette.type)})`},fadeRight:{right:-ur,background:`linear-gradient(270deg, ${br(n.palette.type)})`},fadeHidden:{opacity:0},button:{position:"absolute"},buttonLeft:{left:-n.spacing(2)},buttonRight:{right:-n.spacing(2)}}),{name:"BackstageHorizontalScrollGrid"});function wn(n){const[[a,i],d]=React.useState([0,0]);return React.useLayoutEffect(()=>{const p=n.current;if(!p){d([0,0]);return}const v=()=>{const P=p.scrollLeft,z=p.scrollWidth-p.offsetWidth-p.scrollLeft;d([P,z])};return v(),p.addEventListener("scroll",v),window.addEventListener("resize",v),()=>{p.removeEventListener("scroll",v),window.removeEventListener("resize",v)}},[n]),[a,i]}function _n(n,a,i){const[d,p]=React.useState(0);return React.useLayoutEffect(()=>{if(d===0)return;const v=performance.now(),P=requestAnimationFrame(z=>{if(!n.current)return;const G=z-v,j=Math.abs(d)*G/a,_=Math.max(i,j)*Math.sign(d);n.current.scrollBy({left:_});const ve=d-_;Math.sign(d)!==Math.sign(ve)?p(0):p(ve)});return()=>cancelAnimationFrame(P)},[n,d,a,i]),p}function dr(n){const{scrollStep:a=100,scrollSpeed:i=50,minScrollDistance:d=5,children:p,...v}=n,P=Gn(n),z=React.useRef(),[G,j]=wn(z),ne=_n(z,i,d),_=ve=>{!z.current||ne(ve?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]:j===0})}),G>0&&React.createElement(IconButton,{title:"Scroll Left",onClick:()=>_(!1),className:classNames(P.button,P.buttonLeft,{})},React.createElement(ChevronLeftIcon,null)),j>0&&React.createElement(IconButton,{title:"Scroll Right",onClick:()=>_(!0),className:classNames(P.button,P.buttonRight,{})},React.createElement(ChevronRightIcon,null)))}const Pr=(0,m.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=Pr(n),{shorthand:i,alpha:d}=n;return i?React.createElement("span",{className:a[d?"alpha":"beta"],style:{fontSize:"120%"}},d?React.createElement(React.Fragment,null,"\u03B1"):React.createElement(React.Fragment,null,"\u03B2")):React.createElement("span",{className:a[d?"alpha":"beta"]},d?"Alpha":"Beta")}const er=(0,t.lazy)(()=>Promise.all([e.e(4949),e.e(8718)]).then(e.bind(e,98718)).then(n=>({default:n.RealLogViewer})));function Ir(n){const{Progress:a}=(0,l.useApp)().getComponents();return t.createElement(t.Suspense,{fallback:t.createElement(a,null)},t.createElement(er,{...n}))}const Lr=(0,m.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"}),sr={code:({inline:n,className:a,children:i,...d})=>{const p=String(i).replace(/\n+$/,""),v=/language-(\w+)/.exec(a||"");return!n&&v?t.createElement(Pe,{language:v[1],text:p}):t.createElement("code",{className:a,...d},i)}};function $n(n){const{content:a,dialect:i="gfm",linkTarget:d,transformLinkUri:p,transformImageUri:v}=n,P=Lr();return React.createElement(ReactMarkdown,{remarkPlugins:i==="gfm"?[gfm]:[],className:P.markdown,children:a,components:sr,linkTarget:d,transformLinkUri:p,transformImageUri:v})}var tr=e(10179);const nr=(0,m.Z)(n=>({root:{paddingLeft:n.spacing(3)}}),{name:"BackstageLoginRequestListItem"}),Gr=({request:n,busy:a,setBusy:i})=>{const d=nr(),[p,v]=useState(),P=async()=>{i(!0);try{await n.trigger()}catch(G){v(isError(G)?G.message:"An unspecified error occurred")}finally{i(!1)}},z=n.provider.icon;return React.createElement(ListItem,{disabled:a,classes:{root:d.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 fr=null;const mr=(0,m.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=mr(),[i,d]=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:i,setBusy:d}))))),React.createElement(DialogActions,{classes:{root:a.actionButtons}},React.createElement(Button,{onClick:P},"Reject All")))}var kr=e(15277),ir=e.n(kr),Or=e(29862);const Yr=(0,m.Z)({container:{overflow:"visible !important"}},{name:"BackstageOverflowTooltip"});function hr(n){var P;const[a,i]=(0,t.useState)(!1),d=(0,Or.t)(),p=Yr(),v=z=>{d()&&i(z)};return t.createElement(ze.ZP,{title:(P=n.title)!=null?P:n.text||"",placement:n.placement,disableHoverListener:!a},t.createElement(ir(),{text:n.text,line:n.line,onToggled:v,containerClassName:p.container}))}var xr=e(67358);function Dr(n){const[a,i]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{const d=setTimeout(()=>i(!0),250);return()=>clearTimeout(d)},[]),a?t.createElement(xr.Z,{...n,"data-testid":"progress"}):t.createElement("div",{style:{display:"none"}})}var Fr=e(94339),gr=e(14503),Br=e(24579),pr=e(32552),yn=e(15459),un=e(95544),kn=e(27597);const Yn=(0,m.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 Mr(n){const{link:a,title:i,onClick:d}=n,p=Yn();return t.createElement("div",null,t.createElement(pn.Z,null),t.createElement(K,{to:a,onClick:d,underline:"none"},t.createElement(un.Z,{display:"flex",alignItems:"center",className:p.root},t.createElement(un.Z,{className:p.boxTitle,fontWeight:"fontWeightBold",m:1},t.createElement(_e.Z,null,t.createElement("strong",null,i))),t.createElement(kn.Z,{className:p.arrow}))))}const yr=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(fe,{to:a.href,variant:"contained"},a.name)},wr=class extends t.Component{constructor(a){super(a),this.state={error:void 0,errorInfo:void 0}}componentDidCatch(a,i){console.error(`ErrorBoundary, error: ${a}, info: ${i}`),this.setState({error:a,errorInfo:i})}render(){const{slackChannel:a,children:i}=this.props,{error:d}=this.state;return d?t.createElement(Jt,{title:"Something Went Wrong",error:d},t.createElement(yr,{slackChannel:a})):i}},Er=(0,m.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"}),$r=(0,yn.Z)(n=>({root:{display:"inline-block",padding:n.spacing(8,8,0,0),float:"right"}}),{name:"BackstageInfoCardCardActionsTopRight"})(gr.Z),vr={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 lr(n){const{title:a,subheader:i,divider:d=!0,deepLink:p,slackChannel:v,errorBoundaryProps:P,variant:z,children:G,headerStyle:j,headerProps:ne,icon:_,action:ve,actionsClassName:Te,actions:Me,cardClassName:ft,actionsTopRight:Mt,className:Gt,noPadding:_t,titleTypographyProps:pt}=n,Kt=Er();let nn={},en={};z&&z.split(/[\s]+/g).forEach(wt=>{nn={...nn,...vr.card[wt]},en={...en,...vr.cardContent[wt]}});const rr=()=>t.createElement("div",{className:Kt.headerSubheader},i&&t.createElement("div",{className:Kt.subheader},i),_),Hn=P||(v?{slackChannel:v}:{});return t.createElement(Fr.Z,{style:nn,className:Gt},t.createElement(wr,{...Hn},a&&t.createElement(pr.Z,{classes:{root:Kt.header,title:Kt.headerTitle,subheader:Kt.headerSubheader,avatar:Kt.headerAvatar,action:Kt.headerAction,content:Kt.headerContent},title:a,subheader:rr(),action:ve,style:{...j},titleTypographyProps:pt,...ne}),Mt&&t.createElement($r,null,Mt),d&&t.createElement(pn.Z,null),t.createElement(Br.Z,{className:E()(ft,{[Kt.noPadding]:_t}),style:en},G),Me&&t.createElement(gr.Z,{className:Te},Me),p&&t.createElement(Mr,{...p})))}var Jr=e(39307);const L=(0,m.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:i,max:d})=>{if(isNaN(a))return"#ddd";const p=d||k.max,v=i?p-a:a;return v<p/3?n.status.error:v<p*(2/3)?n.status.warning:n.status.ok};function Fe(n){const[a,i]=useState(null),{getColor:d=de}=n,p=L(n),{palette:v}=useTheme(),{value:P,fractional:z,inverse:G,unit:j,max:ne,description:_}={...k,...n},ve=z?Math.round(P*ne):P,Te=ne!==100?Math.round(P):ve,[Me,ft]=useState(!1);return useEffect(()=>{const Mt=a,Gt=()=>ft(!0),_t=()=>ft(!1);return Mt&&_?(Mt.addEventListener("mouseenter",Gt),Mt.addEventListener("mouseleave",_t),()=>{Mt.removeEventListener("mouseenter",Gt),Mt.removeEventListener("mouseleave",_t)}):()=>{ft(!1)}},[_,a]),React.createElement("div",{ref:i,className:p.root},React.createElement(Circle,{strokeLinecap:"butt",percent:ve,strokeWidth:12,trailWidth:12,strokeColor:d({palette:v,value:Te,inverse:G,max:ne}),className:p.circle}),_&&Me?React.createElement("div",{className:p.description},_):React.createElement("div",{className:p.overlay},isNaN(P)?"N/A":`${Te}${j}`))}const et=(0,m.Z)({root:{height:"100%",width:250}},{name:"BackstageGaugeCard"});function gt(n){const a=et(n),{title:i,subheader:d,progress:p,inverse:v,deepLink:P,description:z,icon:G,variant:j,getColor:ne}=n,_={inverse:v,description:z,getColor:ne,value:p};return React.createElement("div",{className:a.root},React.createElement(InfoCard,{title:i,subheader:d,deepLink:P,variant:j,icon:G},React.createElement(Gauge,{..._})))}function Rt(n){const{value:a,getColor:i=getProgressColor}=n,{palette:d}=useTheme();if(isNaN(a))return null;let p=Math.round(a*100*100)/100;p>100&&(p=100);const v=i({palette:d,value:p,inverse:!1,max:100});return React.createElement(Tooltip,{title:`${p}%`},React.createElement("span",null,React.createElement(Line,{percent:p,strokeWidth:4,trailWidth:4,strokeColor:v})))}var Dt=e(21324),dt=e(7089),Vt=e(1292),R=e(42494),T=e(74603),$=e(56939),H=e(12231),Y=e(73698),J=e(72379);const he=(0,m.Z)(()=>(0,o.Z)({icon:{position:"absolute",right:"4px",pointerEvents:"none"}}),{name:"BackstageClosedDropdown"});var De=()=>{const n=he();return t.createElement(J.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 Be=(0,m.Z)(()=>(0,o.Z)({icon:{position:"absolute",right:"4px",pointerEvents:"none"}}),{name:"BackstageOpenedDropdown"});var Ze=()=>{const n=Be();return t.createElement(J.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 ke=(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),xt=(0,m.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:i,label:d,placeholder:p,selected:v,onChange:P,triggerReset:z,native:G=!1,disabled:j=!1}=n,ne=xt(),[_,ve]=(0,t.useState)(v||(a?[]:"")),[Te,Me]=(0,t.useState)(!1);(0,t.useEffect)(()=>{ve(a?[]:"")},[z,a]),(0,t.useEffect)(()=>{v!==void 0&&ve(v)},[v]);const ft=pt=>{ve(pt.target.value),P(pt.target.value)},Mt=pt=>{if(j){pt.preventDefault();return}Me(Kt=>a&&!(pt.target instanceof HTMLElement)?!0:!Kt)},Gt=()=>{Me(!1)},_t=pt=>()=>{const Kt=_.filter(nn=>nn!==pt);ve(Kt),P(Kt)};return t.createElement("div",{className:ne.root},t.createElement(Vt.Z,{onClickAway:Gt},t.createElement(R.Z,{className:ne.formControl},t.createElement($.Z,{className:ne.formLabel},d),t.createElement(Y.Z,{"aria-label":d,value:_,native:G,disabled:j,"data-testid":"select",displayEmpty:!0,multiple:a,onChange:ft,onClick:Mt,open:Te,input:t.createElement(ke,null),label:d,tabIndex:0,renderValue:pt=>{var Kt;return a&&_.length!==0?t.createElement("div",{className:ne.chips},pt.map(nn=>{var en,rr;return t.createElement(dt.Z,{key:(en=i.find(Hn=>Hn.value===nn))==null?void 0:en.value,label:(rr=i.find(Hn=>Hn.value===nn))==null?void 0:rr.label,clickable:!0,onDelete:_t(nn),className:ne.chip})})):t.createElement(_e.Z,null,_.length===0?p||"":(Kt=i.find(nn=>nn.value===pt))==null?void 0:Kt.label)},IconComponent:()=>Te?t.createElement(Ze,null):t.createElement(De,null),MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},getContentAnchorEl:null}},p&&!a&&t.createElement(H.Z,{value:[]},p),G?i&&i.map(pt=>t.createElement("option",{value:pt.value,key:pt.value},pt.label)):i&&i.map(pt=>t.createElement(H.Z,{key:pt.value,value:pt.value},a&&t.createElement(Dt.Z,{color:"primary",checked:_.includes(pt.value)||!1,className:ne.checkbox}),pt.label))))))}const We=()=>{},Qt=t.createContext({stepperLength:0,stepIndex:0,setStepIndex:We,stepHistory:[],setStepHistory:We,onStepChange:We});function hn(n){const{children:a,elevated:i,onStepChange:d,activeStep:p=0}=n,[v,P]=useState(p),[z,G]=useState([0]);useEffect(()=>{P(p)},[p]);const j=[];let ne;return Children.forEach(a,_=>{isValidElement(_)&&(_.props.end?ne=_:j.push(_))}),React.createElement(React.Fragment,null,React.createElement(Qt.Provider,{value:{stepIndex:v,setStepIndex:P,stepHistory:z,setStepHistory:G,onStepChange:d,stepperLength:Children.count(a)}},React.createElement(MuiStepper,{activeStep:v,orientation:"vertical",elevation:i?2:0},j)),v>=Children.count(a)-1&&ne)}const Jn=(0,m.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:i,last:d,stepIndex:p})=>React.createElement(Button,{variant:"contained",color:"primary",disabled:i,"data-testid":`nextButton-${p}`,onClick:a},n||(d?"Finish":"Next")),Sn=({text:n,handleClick:a,disabled:i,stepIndex:d})=>React.createElement(Button,{onClick:a,"data-testid":`backButton-${d}`,disabled:i},n||"Back"),Un=({actions:n={},children:a})=>{const i=Jn(),{stepperLength:d,stepIndex:p,setStepIndex:v,stepHistory:P,setStepHistory:z,onStepChange:G}=useContext(VerticalStepperContext),j=(Te,Me)=>{Me&&Me(),G&&G(p,Te),v(Te)},ne=()=>{const Te=n.nextStep?n.nextStep(p,d-1):p+1;j(Te,n.onNext),z([...P,Te])},_=()=>{P.pop(),j(P[P.length-1],n.onBack),z([...P])},ve=()=>{j(0,n.onRestart),z([0])};return React.createElement("div",{className:i.root},[void 0,!0].includes(n.showBack)&&p!==0&&React.createElement(Sn,{text:n.backText,handleClick:_,disabled:p===0,stepIndex:p}),[void 0,!0].includes(n.showNext)&&React.createElement(vn,{text:n.nextText,handleClick:ne,disabled:!!d&&p>=d||!!n.canNext&&!n.canNext(),stepIndex:p}),n.showRestart&&p!==0&&React.createElement(Dn,{text:n.restartText,handleClick:ve,stepIndex:p}),a)},Ar=(0,m.Z)(n=>({end:{padding:n.spacing(3)}}),{name:"SimpleStepperStep"});function Ur(n){const{title:a,children:i,end:d,actions:p,...v}=n,P=Ar();return d?React.createElement("div",{className:P.end},React.createElement(Typography,{variant:"h6"},a),i,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,i,React.createElement(SimpleStepperFooter,{actions:p})))}const Qn=(0,m.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 Cn(n){const a=Qn(n);return React.createElement("span",{className:classNames(a.status,a.ok),"aria-label":"Status ok","aria-hidden":"true",...n})}function Fn(n){const a=Qn(n);return React.createElement("span",{className:classNames(a.status,a.warning),"aria-label":"Status warning","aria-hidden":"true",...n})}function Nr(n){const a=Qn(n);return React.createElement("span",{className:classNames(a.status,a.error),"aria-label":"Status error","aria-hidden":"true",...n})}function ca(n){const a=Qn(n);return React.createElement("span",{className:classNames(a.status,a.pending),"aria-label":"Status pending","aria-hidden":"true",...n})}function al(n){const a=Qn(n);return React.createElement("span",{className:classNames(a.status,a.running),"aria-label":"Status running","aria-hidden":"true",...n})}function ol(n){const a=Qn(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,...i})=>React.createElement(TableRow,null,n&&React.createElement(bo,null,n),React.createElement(Po,{colSpan:n?1:2,...i},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 i=n.map((d,p)=>React.createElement(MetadataListItem,{key:p},ua(d)));return a?React.createElement(ba,null,i):React.createElement(Ta,null,i)}function Oo(n,a,i){const d=Object.keys(n).map(p=>{const v=ua(n[p],!0),P=i&&i.titleFormat?i.titleFormat(p):startCase(p);return React.createElement(MetadataListItem,{key:p},`${P}: `,v)});return a?React.createElement(ba,null,d):React.createElement(Ta,null,d)}function ua(n,a,i){return React.isValidElement(n)?React.createElement(Fragment,null,n):typeof n=="object"&&!Array.isArray(n)?Oo(n,a,i):Array.isArray(n)?Lo(n,i):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:i})=>React.createElement(MetadataTableItem,{title:i&&i.titleFormat?i.titleFormat(n):startCase(n)},React.createElement(xo,{value:a,options:i}));function Fo(n,a){return Object.keys(n).map(i=>React.createElement(Do,{key:i,title:i,value:n[i],options:a}))}function ul(n){const{metadata:a,dense:i=!0,options:d}=n,p=Fo(a,d||{});return React.createElement(MetadataTable,{dense:i},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,i){const d={...La(n),[a]:i};return $o(d)}function dl(n,a=250){const[i,d]=useSearchParams(),p=i.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&&d(z,{replace:!0})},[d,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,l.useApiHolder)().get(l.configApiRef),i=a==null?void 0:a.getOptionalConfig("app.support");return i?{url:i.getString("url"),items:i.getConfigArray("items").flatMap(d=>{var p;return{title:d.getString("title"),icon:d.getOptionalString("icon"),links:((p=d.getOptionalConfigArray("links"))!=null?p:[]).flatMap(v=>({url:v.getString("url"),title:v.getString("title")}))}})}:No}var Zo=e(80079);function Wn(n,a){const d=(0,l.useApp)().getSystemIcon(n);return d?t.createElement(d,{...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,m.Z)({popoverList:{minWidth:260,maxWidth:400}},{name:"BackstageSupportButton"}),Wo=({icon:n})=>{var d;const a=(0,l.useApp)(),i=n&&(d=a.getSystemIcon(n))!=null?d:Qr;return t.createElement(i,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(pe.Z,null,t.createElement(Mo.Z,null,t.createElement(Wo,{icon:n.icon})),t.createElement(re.Z,{primary:n.title,secondary:(a=n.links)==null?void 0:a.reduce((i,d,p)=>[...i,p>0&&t.createElement("br",{key:p}),t.createElement(Ho,{link:d,key:d.url})],[])}))};function Vo(n){const{title:a,children:i}=n,{items:d}=xa(),[p,v]=(0,t.useState)(!1),[P,z]=(0,t.useState)(null),G=zo(),j=(0,mt.Z)(ve=>ve.breakpoints.down("sm")),ne=ve=>{z(ve.currentTarget),v(!0)},_=()=>{v(!1)};return t.createElement(t.Fragment,null,t.createElement(un.Z,{display:"flex",ml:1},j?t.createElement(xe.Z,{color:"primary",size:"small",onClick:ne,"data-testid":"support-button"},t.createElement(Qr,null)):t.createElement(y.Z,{"data-testid":"support-button","aria-label":"support",color:"primary",onClick:ne,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(te.Z,{className:G.popoverList},a&&t.createElement(pe.Z,{alignItems:"flex-start"},t.createElement(_e.Z,{variant:"subtitle1"},a)),t.Children.map(i,(ve,Te)=>t.createElement(pe.Z,{alignItems:"flex-start",key:`child-${Te}`},ve)),d&&d.map((ve,Te)=>t.createElement(jo,{item:ve,key:`item-${Te}`}))),t.createElement(Bo.Z,null,t.createElement(y.Z,{color:"primary",onClick:_},"Close"))))}var da=e(18671),Nn=e(10289);const Xr=72,Da=24,Fa=18,Xn={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=>({...Xn,...n,iconContainerWidth:Xn.drawerWidthClosed,iconSize:Xn.drawerWidthClosed-Xn.iconPadding*2,userBadgeDiameter:Xn.drawerWidthClosed-Xn.userBadgePadding*2}),Ba={drawerWidthClosed:0,drawerWidthOpen:202,defaultOpenDelayMs:Xn.defaultOpenDelayMs+200},Ko=n=>({...Ba,...n}),Sl="@backstage/core/sidebar-intro-dismissed",Kn=(0,t.createContext)({sidebarConfig:Xn,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)),Zr=()=>{const n=(0,t.useContext)(Na),a=(0,t.useContext)(Ua);if(n===void 0)return a||$a;const i=n.atVersion(1);if(i===void 0)throw new Error("No context found for version 1.");return i},Yo=(0,m.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,i]=(0,t.useState)(()=>wa.getSidebarPinState()),{sidebarConfig:d}=(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)(j=>j.breakpoints.down("xs"),{noSsr:!0}),z=()=>i(!a),G=Yo({isPinned:a,sidebarConfig:d});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 i,d;(d=(i=n==null?void 0:n.contentRef)==null?void 0:i.current)==null||d.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 i=n.atVersion(1);if(i===void 0)throw new Error("No context found for version 1.");return i};var Qo=e(50023),Xo=e(4190),qo=e(87685),_o=e(44882),es=e(57998);const ts=(0,m.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:i,icon:d,value:p}=n,{sidebarConfig:v}=(0,t.useContext)(Kn),P=ts({sidebarConfig:v}),z=(0,Nn.TH)(),{selectedMenuItemIndex:G,setSelectedMenuItemIndex:j}=(0,t.useContext)(ka),ne=(ve,Te)=>{j(Te===G?-1:Te)},_=p===G&&G>=0||p!==G&&!(G>=0)&&a===z.pathname;return t.createElement(es.Z,{label:i,icon:d,component:K,to:a||z.pathname,onChange:ne,value:p,selected:_,classes:P})},Ga=n=>{const{children:a,to:i,label:d,icon:p,value:v}=n,{isMobile:P}=Zr();return P?t.createElement(ns,{to:i,label:d,icon:p,value:v}):t.createElement(t.Fragment,null,a)},Ka=(0,m.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,D.orderBy)(n,({props:{priority:a}})=>Number.isInteger(a)?a:-1,"desc"),as=t.createElement(Ga).type,os=({children:n,label:a="Menu",open:i,onClose:d})=>{const{sidebarConfig:p}=(0,t.useContext)(Kn),v=Ka({sidebarConfig:p});return t.createElement(Xo.ZP,{anchor:"bottom",open:i,onClose:d,ModalProps:{BackdropProps:{classes:{root:v.marginMobileSidebar}}},classes:{root:v.marginMobileSidebar,paperAnchorBottom:v.overlay}},t.createElement(un.Z,{className:v.overlayHeader},t.createElement(_e.Z,{variant:"h3"},a),t.createElement(xe.Z,{onClick:d,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:i}=n,d=Ka({sidebarConfig:a}),p=(0,Nn.TH)(),[v,P]=(0,t.useState)(-1);(0,t.useEffect)(()=>{P(-1)},[p.pathname]);let z=(0,l.useElementFilter)(i,j=>j.getElements().filter(ne=>ne.type===as));if(i)z.length?z=rs(z):z.push(t.createElement(Ga,{key:"default_menu",icon:t.createElement(_o.Z,null)},i));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:d.root,"data-testid":"mobile-sidebar-root",component:"nav"},z)))},Ya=(0,m.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 i=0+1;n[n.Idle=i]="Idle";const d=i+1;n[n.Open=d]="Open"})(Bn||(Bn={}));const is=n=>{const{sidebarConfig:a}=(0,t.useContext)(Kn),{openDelayMs:i=a.defaultOpenDelayMs,closeDelayMs:d=a.defaultCloseDelayMs,disableExpandOnHover:p,children:v}=n,P=Ya({sidebarConfig:a}),z=(0,mt.Z)(Gt=>Gt.breakpoints.down("md"),{noSsr:!0}),[G,j]=(0,t.useState)(Bn.Closed),ne=(0,t.useRef)(),{isPinned:_,toggleSidebarPinState:ve}=Zr(),Te=()=>{_||p||(ne.current&&(clearTimeout(ne.current),ne.current=void 0),G!==Bn.Open&&!z&&(ne.current=window.setTimeout(()=>{ne.current=void 0,j(Bn.Open)},i),j(Bn.Idle)))},Me=()=>{_||p||(ne.current&&(clearTimeout(ne.current),ne.current=void 0),G===Bn.Idle?j(Bn.Closed):G===Bn.Open&&(ne.current=window.setTimeout(()=>{ne.current=void 0,j(Bn.Closed)},d)))},ft=G===Bn.Open&&!z||_,Mt=Gt=>{Gt?(j(Bn.Open),ve()):(j(Bn.Closed),ve())};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?()=>{}:Me,onBlur:p?()=>{}:Me},t.createElement("div",{className:E()(P.drawer,{[P.drawerOpen]:ft})},v))))},ls=n=>{var G,j;const a=Go((G=n.sidebarOptions)!=null?G:{}),i=Ko((j=n.submenuOptions)!=null?j:{}),{children:d,disableExpandOnHover:p,openDelayMs:v,closeDelayMs:P}=n,{isMobile:z}=Zr();return z?t.createElement(ss,null,d):t.createElement(Kn.Provider,{value:{sidebarConfig:a,submenuConfig:i}},t.createElement(is,{openDelayMs:v,closeDelayMs:P,disableExpandOnHover:p},d))};function cs(){const{sidebarConfig:n}=(0,t.useContext)(Kn),{focusContent:a,contentRef:i}=za(),d=Ya({sidebarConfig:n});return i!=null&&i.current?t.createElement(y.Z,{onClick:a,variant:"contained",className:E()(d.visuallyHidden)},"Skip to content"):null}function Ja(n,a){const i=new URLSearchParams(a.search).toString(),d=Ia().parse(i),p=new URLSearchParams(n.search).toString(),v=Ia().parse(p);return(0,D.isEqual)(a.pathname,n.pathname)&&(0,D.isMatch)(v,d)}const us=(0,m.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:i,to:d,icon:p,dropdownItems:v}=n,P=us(),{setIsHoveredOn:z}=useContext(SidebarItemWithSubmenuContext),G=()=>{z(!1)},j=useResolvedPath(d!=null?d:""),ne=useLocation();let _=isLocationMatch(ne,j);const[ve,Te]=useState(!1),Me=()=>{Te(!ve)};return v!==void 0?(v.some(ft=>{const Mt=resolvePath(ft.to);return _=isLocationMatch(ne,Mt),_}),React.createElement("div",{className:P.itemContainer},React.createElement(Tooltip,{title:a,enterDelay:500,enterNextDelay:500},React.createElement("button",{onClick:Me,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),i&&React.createElement(Typography,{variant:"caption",className:P.subtitle},i)),ve?React.createElement(ArrowDropUpIcon,{className:P.dropdownArrow}):React.createElement(ArrowDropDownIcon,{className:P.dropdownArrow}))),v&&ve&&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:Gt=>Gt.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:d,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),i&&React.createElement(Typography,{variant:"caption",className:P.subtitle},i)))))},ds=(0,m.Z)(n=>({root:{zIndex:1e3,position:"relative",overflow:"visible",width:n.spacing(7)+1},drawer:a=>{var i,d;return{display:"flex",flexFlow:"column nowrap",alignItems:"flex-start",position:"fixed",[n.breakpoints.up("sm")]:{marginLeft:a.left,transition:n.transitions.create("margin-left",{easing:n.transitions.easing.sharp,duration:n.transitions.duration.shortest})},top:0,bottom:0,padding:0,background:(d=(i=n.palette.navigation.submenu)==null?void 0:i.background)!=null?d:"#404040",overflowX:"hidden",msOverflowStyle:"none",scrollbarWidth:"none",cursor:"default",width:a.submenuConfig.drawerWidthClosed,transitionDelay:`${a.submenuConfig.defaultOpenDelayMs}ms`,"& > *":{flexShrink:0},"&::-webkit-scrollbar":{display:"none"}}},drawerOpen:a=>({width:a.submenuConfig.drawerWidthOpen,[n.breakpoints.down("xs")]:{width:"100%",position:"relative",paddingLeft:n.spacing(3),left:0,top:0}}),title:{fontSize:24,fontWeight:500,color:"#FFF",padding:20,[n.breakpoints.down("xs")]:{display:"none"}}}),{name:"BackstageSidebarSubmenu"}),fs=n=>{const{isOpen:a}=fa(),{sidebarConfig:i,submenuConfig:d}=(0,t.useContext)(Kn),p=a?i.drawerWidthOpen:i.drawerWidthClosed,v=ds({left:p,submenuConfig:d}),{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(_e.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,m.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,m.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,m.Z)(a=>{var i,d,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:(d=(i=a.palette.navigation.navItem)==null?void 0:i.hoverBackground)!=null?d:"#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,l.useElementFilter)(n.props.children,i=>{let d=!1;return i.getElements().forEach(({props:{to:p,dropdownItems:v}})=>{if(!d){if(v!=null&&v.length){v.forEach(({to:P})=>d=d||Ja(a,(0,Nn.i3)(P)));return}p&&(d=Ja(a,(0,Nn.i3)(p)))}}),d},[a.pathname]);function Xa(n){return n.to===void 0}const As=t.createElement(fs).type,Rs=t.forwardRef(function({to:a,end:i,style:d,className:p,activeStyle:v,caseSensitive:P,activeClassName:z="active","aria-current":G="page",...j},ne){let{pathname:_}=(0,Nn.TH)(),{pathname:ve}=(0,Nn.WU)(a);P||(_=_.toLocaleLowerCase("en-US"),ve=ve.toLocaleLowerCase("en-US"));let Te=_===ve;!Te&&!i&&(Te=_.startsWith(`${ve}/`));const Me=Te?G:void 0;return t.createElement(O.rU,{...j,to:a,ref:ne,"aria-current":Me,style:{...d,...Te?v:void 0},className:E()([p,Te?z:void 0])})}),qa=(0,t.forwardRef)((n,a)=>{const{icon:i,text:d,hasNotifications:p=!1,hasSubmenu:v=!1,disableHighlight:P=!1,onClick:z,children:G,className:j,...ne}=n,{sidebarConfig:_}=(0,t.useContext)(Kn),ve=ta(_),{isOpen:Te}=fa(),Me=!Te&&v?{display:"flex",marginLeft:"24px"}:{},ft=t.createElement("div",{style:Me},t.createElement(i,{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()({[ve.closedItemIcon]:!Te})},ft),Gt=t.createElement(t.Fragment,null,t.createElement("div",{"data-testid":"login-button",className:ve.iconContainer},Mt),d&&t.createElement(_e.Z,{variant:"subtitle2",className:ve.label},d),t.createElement("div",{className:ve.secondaryAction},G)),_t=Te?Gt:Mt,pt={onClick:z,className:E()(j,ve.root,Te?ve.open:ve.closed,Xa(n)&&ve.buttonItem,{[ve.highlightable]:!P})};return Xa(n)?t.createElement("button",{"aria-label":d,...pt,ref:a},_t):t.createElement(Rs,{...pt,activeClassName:ve.selected,to:n.to?n.to:"",ref:a,"aria-label":d||n.to,...ne},_t)}),Ss=({children:n,...a})=>{const{sidebarConfig:i}=(0,t.useContext)(Kn),d=ta(i),[p,v]=(0,t.useState)(!1),P=(0,Nn.TH)(),z=vs(n,P),G=(0,mt.Z)(ve=>ve.breakpoints.down("sm")),j=()=>{v(!0)},ne=()=>{v(!1)},_=()=>G?p?t.createElement(hs.Z,{fontSize:"small",className:d.submenuArrow}):t.createElement(gs.Z,{fontSize:"small",className:d.submenuArrow}):!p&&t.createElement(Qa.Z,{fontSize:"small",className:d.submenuArrow});return t.createElement(Ma.Provider,{value:{isHoveredOn:p,setIsHoveredOn:v}},t.createElement("div",{"data-testid":"item-with-submenu",onMouseLeave:ne,onTouchStart:p?ne:j,onMouseEnter:j,className:E()(p&&d.highlighted)},t.createElement(qa,{hasSubmenu:!0,className:z?d.selected:"",...a},_()),p&&n))},_a=(0,t.forwardRef)((n,a)=>{const[i]=(0,l.useElementFilter)(n.children,d=>d.getElements().filter(p=>p.type===As));return i?t.createElement(Ss,{...n},i):t.createElement(qa,{...n,ref:a})});function Ll(n){const{sidebarConfig:a}=useContext(SidebarConfigContext),[i,d]=useState(""),p=ta(a),v=n.icon?n.icon:SearchIcon,P=()=>{n.onSearch(i),d("")},z=_=>{_.key==="Enter"&&(_.preventDefault(),P())},G=_=>{d(_.target.value)},j=_=>{_.preventDefault(),_.stopPropagation()},ne=_=>{P(),_.preventDefault()};return React.createElement("div",{className:p.searchRoot},React.createElement(_a,{icon:v,to:n.to,onClick:ne,disableHighlight:!0},React.createElement(TextField,{placeholder:"Search",value:i,onClick:j,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:i,setOpen:d}=useSidebarOpenState();if(useMediaQuery(P=>P.breakpoints.down("md"),{noSsr:!0}))return null;const v=()=>{d(!i)};return React.createElement("button",{onClick:v,className:a.expandButton,"aria-label":"Expand Sidebar","data-testid":"sidebar-expand-button"},React.createElement("div",{className:a.arrows},i?React.createElement(DoubleArrowLeft,null):React.createElement(DoubleArrowRight,null)))},bs=(0,m.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),i=bs({sidebarConfig:a}),{text:d,onClose:p}=n,v=()=>p();return React.createElement("div",{className:i.introCard},React.createElement(Typography,{variant:"subtitle2"},d),React.createElement("div",{className:i.introDismiss},React.createElement(Link,{component:"button",onClick:v,underline:"none",className:i.introDismissLink},React.createElement(CloseIcon,{className:i.introDismissIcon}),React.createElement(Typography,{component:"span",className:i.introDismissText},"Dismiss"))))}const eo=n=>{const{text:a,onDismiss:i}=n,[d,p]=useState(!1),v=()=>{p(!0)};return React.createElement(Collapse,{in:!d,onExited:i},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(),i={starredItemsDismissed:!1,recentlyViewedItemsDismissed:!1},[d,p]=useLocalStorageValue(SIDEBAR_INTRO_LOCAL_STORAGE),{starredItemsDismissed:v,recentlyViewedItemsDismissed:P}=d!=null?d:{},z=()=>{p(j=>({...i,...j,starredItemsDismissed:!0}))},G=()=>{p(j=>({...i,...j,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,m.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:i,noPadding:d,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]:i,[z.noPadding]:d})},p)}var xs=e(6487),Ds=e(99152);const Fs=(0,m.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:i,selectedIndex:d}=n,[p,v]=(0,t.useState)(d!=null?d:0),P=Fs(),z=(0,t.useCallback)((G,j)=>{d===void 0&&v(j),i&&d!==j&&i(j)},[d,i]);return(0,t.useEffect)(()=>{d!==void 0&&v(d)},[d]),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,j)=>t.createElement(xs.Z,{...G.tabProps,"data-testid":`header-tab-${j}`,label:G.label,key:G.id,value:j,className:P.defaultTab,classes:{selected:P.selected,root:P.tabRoot}}))))}function Bs(n){var z,G,j;const a=(0,Nn.UO)(),d=n.map(({path:ne,children:_})=>({caseSensitive:!1,path:`${ne}/*`,element:_})).sort((ne,_)=>_.path.replace(/\/\*$/,"").localeCompare(ne.path.replace(/\/\*$/,""))),p=(z=(0,Nn.V$)(d))!=null?z:n[0].children,[v]=(G=(0,Nn.fp)(d,`/${a["*"]}`))!=null?G:[],P=v?n.findIndex(ne=>`${ne.path}/*`===v.route.path):0;return{index:P===-1?0:P,element:p,route:(j=n[P])!=null?j:n[0]}}function ro(n){const{routes:a}=n,i=(0,Nn.s0)(),{index:d,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=>i(a[G].path.replace(/\/\*$/,"").replace(/^\//,""));return t.createElement(t.Fragment,null,t.createElement(no,{tabs:P,selectedIndex:d,onChange:z}),t.createElement(to,null,t.createElement(da.q,{title:p.title}),v))}const ma=()=>null;(0,l.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(i=>{if(!(0,t.isValidElement)(i))return[];if(i.type===t.Fragment)return ao(i.props.children);if(i.type!==a)throw new Error("Child of TabbedLayout must be an TabbedLayout.Route");const{path:d,title:p,children:v,tabProps:P}=i.props;return[{path:d,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,m.Z)(n=>({value:{marginBottom:"6px"},subvalue:{color:n.palette.textSubtle,fontWeight:"normal"}}),{name:"BackstageSubvalueCell"});function $s(n){const{value:a,subvalue:i}=n,d=ws();return t.createElement(t.Fragment,null,t.createElement("div",{className:d.value},a),t.createElement("div",{className:d.subvalue},i))}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,m.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:i}=n,[d,p]=(0,t.useState)({...n.selectedFilters}),[v,P]=(0,t.useState)(!1),z=()=>{p({}),P(j=>!j)};return(0,t.useEffect)(()=>{i(d)},[d,i]),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(j=>t.createElement(ot,{triggerReset:v,key:j.element.label,...j.element,selected:d[j.element.label],onChange:ne=>p({...d,[j.element.label]:ne})}))))},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 i=a.split(".");let d=n[i[0]];for(let p=1;p<i.length;++p){if(d===void 0)return d;const v=i[p];d=d[v]}return d}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,m.Z)(()=>({root:{display:"flex",alignItems:"center",justifyContent:"space-between"},title:{fontWeight:"bold",fontSize:18,whiteSpace:"nowrap"}}),{name:"BackstageTableFiltersContainer"}),ei=(0,m.Z)(()=>({root:{display:"flex",alignItems:"start"}}),{name:"BackstageTable"});function ti(n,a){return n.map(i=>{const d={};let p=i.cellStyle||{};if(i.highlight)if(d.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{...i,headerStyle:d,cellStyle:p}})}function ni(n,a){return(0,D.transform)(n,(i,d,p)=>{(0,D.isEqual)(d,a[p])||(i[p]=d)})}const co={search:"",filtersOpen:!1,filters:{}};function ri(n){const{toolbarRef:a,setSearch:i,hasFilters:d,selectedFiltersLength:p,toggleFilters:v}=n,P=_s(),z=(0,t.useCallback)(G=>{n.onSearchChanged(G),i(G)},[n,i]);return d?t.createElement("div",{className:P.root},t.createElement("div",{className:P.root},t.createElement(xe.Z,{onClick:v,"aria-label":"filter list"},t.createElement(ha.Z,null)),t.createElement(_e.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:i,options:d,title:p,subtitle:v,filters:P,initialState:z,emptyContent:G,onStateChange:j,components:ne,..._}=n,ve=ei(),Te=(0,Ae.Z)(),Me={...co,...z},[ft,Mt]=(0,t.useState)(Me.filtersOpen),Gt=(0,t.useCallback)(()=>Mt(dn=>!dn),[Mt]),[_t,pt]=(0,t.useState)(0),[Kt,nn]=(0,t.useState)(a),[en,rr]=(0,t.useState)(Me.filters),Hn=ti(i,Te),[Wr,wt]=(0,t.useState)(Me.search);(0,t.useEffect)(()=>{if(j){const dn=ni({search:Wr,filtersOpen:ft,filters:en},co);j(dn)}},[Wr,ft,en,j]);const Rr={headerStyle:{textTransform:"uppercase"}},Hr=(0,t.useCallback)(dn=>{var bn;return(bn=i.find(cr=>cr.title===dn))==null?void 0:bn.field},[i]);(0,t.useEffect)(()=>{if(typeof a=="function")return;if(!en){nn(a);return}const dn=Object.values(en);if(a&&dn.flat().length){const bn=a.filter(cr=>!!Object.entries(en).filter(([,ar])=>!!ar.length).every(([ar,an])=>{const Pn=io(cr,Hr(ar));return Array.isArray(Pn)&&Array.isArray(an)?Pn.some(Cr=>an.includes(Cr)):Array.isArray(Pn)?Pn.includes(an):Array.isArray(an)?an.includes(Pn):Pn===an}));nn(bn)}else nn(a);pt(dn.flat().length)},[a,en,Hr]);const Sr=(dn,bn)=>{const cr=an=>{const Pn=new Set,Cr=or=>{or!=null&&Pn.add(or)};return bn&&bn.forEach(or=>{const Tr=io(or,Hr(an));Array.isArray(Tr)?Tr.forEach(Cr):Cr(Tr)}),Pn},ar=an=>({placeholder:"All results",label:an.column,multiple:an.type==="multiple-select",items:[...cr(an.column)].sort().map(Pn=>({label:Pn,value:Pn}))});return dn.map(an=>({type:an.type,element:ar(an)}))},aa=!!(P!=null&&P.length),va=(0,t.useCallback)(dn=>t.createElement(ri,{setSearch:wt,hasFilters:aa,selectedFiltersLength:_t,toggleFilters:Gt,...dn}),[Gt,aa,_t,wt]),oa=typeof a!="function"&&a.length===0,sa=i.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:ve.root},ft&&a&&typeof a!="function"&&(P==null?void 0:P.length)&&t.createElement(Js,{filters:Sr(P,a),selectedFilters:en,onChangeFilters:rr}),t.createElement(na.ZP,{components:{Header:Xs,Toolbar:va,Body:Aa,...ne},options:{...Rr,...d},columns:Hn,icons:Qs,title:t.createElement(t.Fragment,null,t.createElement(_e.Z,{variant:"h5",component:"h2"},p),v&&t.createElement(_e.Z,{color:"textSecondary",variant:"body1"},v)),data:typeof a=="function"?a:Kt,style:{width:"100%"},localization:{toolbar:{searchPlaceholder:"Filter"}},..._}))}const Ml=n=>{const{children:a,value:i,index:d,...p}=n;return React.createElement("div",{role:"tabpanel",hidden:i!==d,"aria-labelledby":`scrollable-auto-tab-${d}`,...p},i===d&&React.createElement(Box,{p:3},a))},oi=(0,m.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:i,onClick:d}=n;return React.createElement(IconButton,{onClick:d,className:a.root,size:"small",disableRipple:!0,disableFocusRipple:!0,"aria-label":i},n.children)},si=(n,a)=>a?n?"20px":"0":"40px",ii=(0,m.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:i,isFirstIndex:d,...p}=n;return React.createElement(Tab,{classes:a,disableRipple:!0,...p})},li=(0,m.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,m.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,i=ci(),[d,p]=useState([0,0]),[v,P]=useState(0),[z,G]=useState(0),[j,ne]=useState([[]]),_=useRef(),{width:ve}=useWindowSize(),Te=(_t,pt)=>{p([v,pt])},Me=()=>{P(v-1)},ft=()=>{P(v+1)},Mt=()=>v+1<j.length;useEffect(()=>{const pt=v===0?1:2,Kt=_.current.offsetWidth-20-pt*30,nn=d[0]*z+d[1],en=Math.floor(Kt/170);G(en),ne(chunkArray(a,en)),p([Math.floor(nn/en),nn%en])},[ve,a]);const Gt=v===d[0]?d[1]:!1;return React.createElement("div",{className:i.root},React.createElement(AppBar,{ref:_,className:i.appbar,position:"static"},React.createElement("div",null,React.createElement(StyledTabs,{value:Gt,onChange:Te,selectionFollowsFocus:!0},v!==0&&React.createElement(StyledIcon,{onClick:Me,ariaLabel:"navigate-before"},React.createElement(NavigateBeforeIcon,null)),j[v].map((_t,pt)=>React.createElement(StyledTab,{value:pt,isFirstIndex:pt===0,isFirstNav:v===0,key:pt,icon:_t.icon||void 0,label:_t.label||void 0})),Mt()&&React.createElement(StyledIcon,{isNext:!0,onClick:ft,ariaLabel:"navigate-next"},React.createElement(NavigateNextIcon,null))))),Gt!==!1?j[v].map((_t,pt)=>React.createElement(TabPanel,{key:pt,value:pt,index:Gt},_t.content)):React.createElement(TabPanel,{key:"panel_outside_chunked_array",value:d[1],index:d[1]},j[d[0]][d[1]].content))}var Zl=e(44311);function ui(n,a){const i=n[n.length-1];if(!!i)return i>=.9?a.palette.status.ok:i>=.5?a.palette.status.warning:a.palette.status.error}function zl(n){var i;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:(i=n.color)!=null?i:ui(n.data,a)})):null}const di=n=>(0,m.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(_e.Z,{variant:"h4",component:"h2",className:a,"data-testid":"header-title"},n);function mi(n){const{description:a,title:i,titleComponent:d=void 0,children:p,textAlign:v="left"}=n,P=di({textAlign:v})(),z=d||t.createElement(fi,{title:i,className:P.title});return t.createElement(t.Fragment,null,t.createElement(da.q,{title:i}),t.createElement("div",{className:P.container},t.createElement("div",{className:P.leftItemsBox},z,a&&t.createElement(_e.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,m.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,m.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:i,additionalInfo:d,supportUrl:p}=n,v=yi(),P=(0,Nn.s0)(),z=xa();return t.createElement(Ht.Z,{container:!0,spacing:0,className:v.container},t.createElement(pi,null),t.createElement(Ht.Z,{item:!0,xs:12,sm:8,md:4},t.createElement(_e.Z,{"data-testid":"error",variant:"body1",className:v.subtitle},"ERROR ",a,": ",i),t.createElement(_e.Z,{variant:"body1",className:v.subtitle},d),t.createElement(_e.Z,{variant:"h2",className:v.title},"Looks like someone dropped the mic!"),t.createElement(_e.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"})(_e.Z),ga=(0,yn.Z)({root:{textDecoration:"underline",color:"inherit"}},{name:"BackstageBreadcrumbsStyledBox"})(un.Z);function Ri(n){const{children:a,...i}=n,[d,p]=t.useState(null),v=t.Children.toArray(a),[P,z,...G]=v,j=G.length?G.pop():v[v.length-1],ne=v.length>3,_=Me=>{p(Me.currentTarget)},ve=()=>{p(null)},Te=Boolean(d);return t.createElement(t.Fragment,null,t.createElement(vi.Z,{"aria-label":"breadcrumb",...i},v.length>1&&t.createElement(ga,{clone:!0},P),v.length>2&&t.createElement(ga,{clone:!0},z),ne&&t.createElement(Ai,{onClick:_},"..."),t.createElement(un.Z,{style:{fontStyle:"italic"}},j)),t.createElement(Pa.ZP,{open:Te,anchorEl:d,onClose:ve,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}},t.createElement(te.Z,null,G.map((Me,ft)=>t.createElement(pe.Z,{key:ft,button:!0},t.createElement(ga,{clone:!0},Me))))))}const Si=(0,m.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:i,pageTitle:d})=>n?a?t.createElement(Ri,{className:i.breadcrumb},t.createElement(K,{to:a},n),t.createElement(_e.Z,null,d)):t.createElement(_e.Z,{className:i.type},n):null,Ti=({pageTitle:n,classes:a,tooltip:i})=>{const d=t.createElement(_e.Z,{className:a.title,variant:"h1"},n);return i?t.createElement(ze.ZP,{title:i,placement:"top-start"},d):d},bi=({classes:n,subtitle:a})=>a?typeof a!="string"?t.createElement(t.Fragment,null,a):t.createElement(_e.Z,{className:n.subtitle,variant:"subtitle2",component:"span"},a):null;function uo(n){const{children:a,pageTitleOverride:i,style:d,subtitle:p,title:v,tooltip:P,type:z,typeLink:G}=n,j=Si(),_=(0,l.useApi)(l.configApiRef).getOptionalString("app.title")||"Backstage",ve=i||v,Te=v||i,Me=`${ve} | %s | ${_}`,ft=`${ve} | ${_}`;return t.createElement(t.Fragment,null,t.createElement(da.q,{titleTemplate:Me,defaultTitle:ft}),t.createElement("header",{style:d,className:j.header},t.createElement(un.Z,{className:j.leftItemsBox},t.createElement(Ci,{classes:j,type:z,typeLink:G,pageTitle:Te}),t.createElement(Ti,{classes:j,pageTitle:Te,tooltip:P}),t.createElement(bi,{classes:j,subtitle:p})),t.createElement(Ht.Z,{container:!0,className:j.rightItemsBox,spacing:4},a)))}const Pi=(0,m.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(_e.Z,{className:a},n);function Li(n){const{label:a,value:i,url:d}=n,p=Pi(),v=t.createElement(Ii,{className:p.value,value:i||"<Unknown>"});return t.createElement(Ht.Z,{item:!0},t.createElement("span",{className:p.root},t.createElement(_e.Z,{className:p.label},a),d?t.createElement(K,{to:d},v):v))}const Oi={hour:"2-digit",minute:"2-digit"};function fo(n){const a=new Date,i=window.navigator.language,d=[];if(!n.has("homepage.clocks"))return d;const p=n.getConfigArray("homepage.clocks");for(const v of p)if(v.has("label")&&v.has("timezone")){let P=v.getString("label");const z={timeZone:v.getString("timezone"),...Oi};try{new Date().toLocaleString(i,z)}catch{console.warn(`The timezone ${z.timeZone} is invalid. Defaulting to GMT`),z.timeZone="GMT",P="GMT"}const G=a.toLocaleTimeString(i,z);d.push({time:G,label:P})}return d}function Wl(n){const a=useApi(configApiRef),i=[],[d,p]=React.useState(i);return React.useEffect(()=>{p(fo(a));const v=setInterval(()=>{p(fo(a))},1e3);return()=>{clearInterval(v)}},[a]),d.length!==0?React.createElement(React.Fragment,null,d.map(v=>React.createElement(HeaderLabel,{label:v.label,value:v.time,key:v.label}))):null}const 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,m.Z)(xi,{name:"BackstageItemCardHeader"});function Fi(n){const{title:a,subtitle:i,children:d}=n,p=Di(n);return t.createElement("div",{className:p.root},i&&t.createElement(_e.Z,{variant:"subtitle2",component:"h3"},i),a&&t.createElement(_e.Z,{variant:"h6",component:"h4"},a),d)}function Hl(n){const{description:a,tags:i,title:d,type:p,subtitle:v,label:P,onClick:z,href:G}=n;return React.createElement(Card,null,React.createElement(CardMedia,null,React.createElement(ItemCardHeader,{title:d,subtitle:v||p})),React.createElement(CardContent,null,i!=null&&i.length?React.createElement(Box,null,i.map((j,ne)=>React.createElement(Chip,{size:"small",label:j,key:ne}))):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,m.Z)(Bi,{name:"BackstageItemCardGrid"});function wi(n){const{children:a,...i}=n,d=Mi(i);return t.createElement("div",{className:d.root,...i},a)}var $i=e(41547);const Ui=(0,m.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:i}=n,{isMobile:d}=Zr(),p=Ui({isMobile:d});return t.createElement($i.Z,{theme:v=>({...v,page:v.getPageTheme({themeId:a})})},t.createElement("main",{className:p.root},i))}function Ni(n){const{themeId:a,children:i,...d}=n;return t.createElement(mo,{themeId:a},t.createElement(uo,{...d}),i)}var Tn=e(30195);const jl=Tn.z.object({providerInfo:Tn.z.object({}).catchall(Tn.z.unknown()).optional(),profile:Tn.z.object({email:Tn.z.string().optional(),displayName:Tn.z.string().optional(),picture:Tn.z.string().optional()}),backstageIdentity:Tn.z.object({token:Tn.z.string(),identity:Tn.z.object({type:Tn.z.literal("user"),userEntityRef:Tn.z.string(),ownershipEntityRefs:Tn.z.array(Tn.z.string())})})}),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[i,d,p]=n.split("."),v=JSON.parse(atob(d));return typeof v.exp!="number"?a:new Date(v.exp*1e3-ho.tokenExpiryMarginMillis)}class Vl{constructor(a){q(this,"options");q(this,"abortController");q(this,"state");this.options=a,this.abortController=new AbortController,this.state={type:"empty"}}async start(){await this.getSessionAsync()}getUserId(){const{backstageIdentity:a}=this.getSessionSync(),i=a.identity.userEntityRef,d=/^([^:/]+:)?([^:/]+\/)?([^:/]+)$/.exec(i);if(!d)throw new TypeError(`Invalid user entity reference "${i}"`);return d[3]}async getIdToken(){return(await this.getSessionAsync()).backstageIdentity.token}getProfile(){return this.getSessionSync().profile}async getProfileInfo(){return(await this.getSessionAsync()).profile}async getBackstageIdentity(){return(await this.getSessionAsync()).backstageIdentity.identity}async getCredentials(){return{token:(await this.getSessionAsync()).backstageIdentity.token}}async signOut(){this.abortController.abort()}getSessionSync(){if(this.state.type==="active")return this.state.session;if(this.state.type==="fetching"&&this.state.previous)return this.state.previous;throw new Error("No session available. Try reloading your browser page.")}async getSessionAsync(){if(this.state.type==="fetching")return this.state.promise;if(this.state.type==="active"&&new Date<this.state.expiresAt)return this.state.session;const a=this.state.type==="active"?this.state.session:void 0,i=this.fetchSession().then(d=>(this.state={type:"active",session:d,expiresAt:Zi(d.backstageIdentity.token)},d),d=>{throw this.state={type:"failed",error:d},d});return this.state={type:"fetching",promise:i,previous:a},i}async fetchSession(){const a=await this.options.discoveryApi.getBaseUrl("auth"),i=await fetch(`${a}/${this.options.provider}/refresh`,{signal:this.abortController.signal,headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"});if(!i.ok)throw await ResponseError.fromResponse(i);return proxiedSessionSchema.parse(await i.json())}}const Gl=n=>{const a=useApi(discoveryApiRef),[{status:i,error:d},{execute:p}]=useAsync(async()=>{const v=new ProxiedSignInIdentity({provider:n.provider,discoveryApi:a});await v.start(),n.onSignInSuccess(v)});return useMountEffect(p),i==="loading"?React.createElement(Progress,null):d?React.createElement(ErrorPanel,{title:"You do not appear to be signed in. Please try reloading the browser page.",error:d}):null},zi=(0,m.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(Ht.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,i,d]=n.split(".");return JSON.parse(atob(i))}class Ea{constructor(a){this.result=a}getUserId(){return this.result.userId}static fromResult(a){return new Ea(a)}async getIdToken(){var a,i;return(i=(a=this.result).getIdToken)==null?void 0:i.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:i,ent:d}=Wi(a);return{type:"user",userEntityRef:i,ownershipEntityRefs:d!=null?d:[]}}async getCredentials(){var i,d;return{token:await((d=(i=this.result).getIdToken)==null?void 0:d.call(i))}}async signOut(){var a,i;return(i=(a=this.result).signOut)==null?void 0:i.call(a)}}class zr{constructor(a,i,d){q(this,"profilePromise");this.identity=a,this.authApi=i,this.profile=d}static createGuest(){return new ya}static fromLegacy(a){return Ea.fromResult(a)}static create(a){return new zr(a.identity,a.authApi,a.profile)}getUserId(){const a=this.identity.userEntityRef,i=/^([^:/]+:)?([^:/]+\/)?([^:/]+)$/.exec(a);if(!i)throw new TypeError(`Invalid user entity reference "${a}"`);return i[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:i,title:d,message:p}=n,v=(0,l.useApi)(i),P=(0,l.useApi)(l.errorApiRef),z=async()=>{try{const G=await v.getBackstageIdentity({instantPopup:!0});if(!G)throw new Error(`The ${d} provider is not configured to support sign-in`);const j=await v.getProfile();a(zr.create({identity:G.identity,profile:j,authApi:v}))}catch(G){P.post(new tr.SP("Login failed",G))}};return t.createElement(pa,null,t.createElement(lr,{variant:"fullHeight",title:d,actions:t.createElement(y.Z,{color:"primary",variant:"outlined",onClick:z},"Sign In")},t.createElement(_e.Z,{variant:"body1"},p)))},loader:async(n,a)=>{const i=n.get(a),d=await i.getBackstageIdentity({optional:!0});if(!d)return;const p=await i.getProfile();return zr.create({identity:d.identity,profile:p,authApi:i})}},ji={Component:({onSignInSuccess:n})=>t.createElement(pa,null,t.createElement(lr,{title:"Guest",variant:"fullHeight",actions:t.createElement(y.Z,{color:"primary",variant:"outlined",onClick:()=>n(new ya)},"Enter")},t.createElement(_e.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,m.Z)(n=>({form:{display:"flex",flexFlow:"column nowrap"},button:{alignSelf:"center",marginTop:n.spacing(2)}}),{name:"BackstageCustomProvider"}),yo=n=>{const{ref:a,...i}=n;return{inputRef:a,...i}},Ji={Component:({onSignInSuccess:n})=>{const a=Yi(),{register:i,handleSubmit:d,formState:p}=(0,Vi.cI)({mode:"onChange"}),{errors:v}=p,P=({userId:z})=>{n(zr.fromLegacy({userId:z,profile:{email:`${z}@example.com`}}))};return t.createElement(pa,null,t.createElement(lr,{title:"Custom User",variant:"fullHeight"},t.createElement(_e.Z,{variant:"body1"},"Enter your own User ID and credentials.",t.createElement("br",null),"This selection will not be stored."),t.createElement("form",{className:a.form,onSubmit:d(P)},t.createElement(R.Z,null,t.createElement(go.Z,{...yo(i("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(R.Z,null,t.createElement(go.Z,{...yo(i("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((i,d)=>{if(typeof d=="string")return vo(d,i),i[d]={components:Eo[d],id:d},i;const{id:p}=d;return vo(p,i),i[p]={components:Eo.common,id:p,config:d},i},{})}const _l=(n,a)=>{const i=useApi(errorApiRef),d=useApiHolder(),[p,v]=useState(!0),P=useCallback(G=>{a(IdentityApiSignOutProxy.from({identityApi:G,signOut:async()=>{var j;localStorage.removeItem(ra),await((j=G.signOut)==null?void 0:j.call(G))}}))},[a]);useLayoutEffect(()=>{var _;if(!p)return;const G=localStorage.getItem(ra);if(G===null){v(!1);return}const j=n[G];if(!j){v(!1);return}let ne=!1;return j.components.loader(d,(_=j.config)==null?void 0:_.apiRef).then(ve=>{ne||(ve?P(ve):v(!1))}).catch(ve=>{ne||(localStorage.removeItem(ra),i.post(ve),v(!1))}),()=>{ne=!0}},[p,i,a,d,n,P]);const z=useMemo(()=>Object.keys(n).map(G=>{const j=n[G],{Component:ne}=j.components,_=ve=>{localStorage.setItem(ra,j.id),P(ve)};return React.createElement(ne,{key:j.id,config:j.config,onSignInSuccess:_})}),[n,P]);return[p,z]},Qi=({onSignInSuccess:n,providers:a=[],title:i,align:d="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,i&&React.createElement(ContentHeader,{title:i,textAlign:d}),React.createElement(Grid,{container:!0,justifyContent:d==="center"?d:"flex-start",spacing:2,component:"ul",classes:v},G)))},Xi=({provider:n,auto:a,onSignInSuccess:i})=>{const d=useStyles(),p=useApi(n.apiRef),v=useApi(configApiRef),[P,z]=useState(),[G,j]=useState(!1),ne=async({checkExisting:_,showPopup:ve})=>{try{let Te;if(_&&(Te=await p.getBackstageIdentity({optional:!0})),!Te&&(ve||a)&&(j(!0),Te=await p.getBackstageIdentity({instantPopup:!0}),!Te))throw new Error(`The ${n.title} provider is not configured to support sign-in`);if(!Te){j(!0);return}const Me=await p.getProfile();i(UserIdentity.create({identity:Te.identity,authApi:p,profile:Me}))}catch(Te){z(Te),j(!0)}};return useMountEffect(()=>ne({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:d},React.createElement(GridItem,null,React.createElement(InfoCard,{variant:"fullHeight",title:n.title,actions:React.createElement(Button,{color:"primary",variant:"outlined",onClick:()=>{ne({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,m.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"})(pr.Z);function tc(n){const{slackChannel:a,errorBoundaryProps:i,children:d,title:p,deepLink:v,value:P,onChange:z}=n,G=qi(),[j,ne]=useState(0),_=z||((Me,ft)=>ne(ft));let ve;P?React.Children.map(d,Me=>{React.isValidElement(Me)&&(Me==null?void 0:Me.props.value)===P&&(ve=Me==null?void 0:Me.props.children)}):React.Children.map(d,(Me,ft)=>{React.isValidElement(Me)&&ft===j&&(ve=Me==null?void 0:Me.props.children)});const Te=i||(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||j,onChange:_},d),React.createElement(Divider,null),React.createElement(CardContent,null,ve),v&&React.createElement(BottomLink,{...v})))}const el=(0,m.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,...i}=n,d=el();return React.createElement(Tab,{disableRipple:!0,classes:d,...i})}},88609:function(ee,s,e){"use strict";e.d(s,{Os:function(){return u},fC:function(){return A}});var r=e(76241),t=e(2784);const l=(0,r.CT)("analytics-context"),u=()=>{const o=(0,t.useContext)(l);if(o===void 0)return{routeRef:"unknown",pluginId:"root",extension:"App"};const c=o.atVersion(1);if(c===void 0)throw new Error("No context found for version 1.");return c},A=o=>{const{attributes:c,children:f}=o,g={...u(),...c},E=(0,r.EI)({1:g});return t.createElement(l.Provider,{value:E},f)};function m(o,c){const f=y=>React.createElement(A,{attributes:c},React.createElement(o,{...y}));return f.displayName=`WithAnalyticsContext(${o.displayName||o.name||"Component"})`,f}},28461:function(ee,s,e){"use strict";e.d(s,{f:function(){return r.fC},z:function(){return m}});var r=e(88609),t=e(27399),l=e(2784);class u{constructor(c,f={routeRef:"unknown",pluginId:"root",extension:"App"}){this.analyticsApi=c,this.context=f}setContext(c){this.context=c}captureEvent(c,f,{value:y,attributes:g}={}){try{this.analyticsApi.captureEvent({action:c,subject:f,value:y,attributes:g,context:this.context})}catch(E){console.warn("Error during analytics event capture. %o",E)}}}function A(){try{return(0,t.useApi)(t.analyticsApiRef)}catch{return{captureEvent:()=>{}}}}function m(){const o=(0,l.useRef)(null),c=(0,r.Os)(),f=A();function y(){return o.current===null&&(o.current=new u(f)),o.current}const g=y();return g.setContext(c),g}},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 C},uB:function(){return y},bq:function(){return f},Ds:function(){return O},NW:function(){return D},VE:function(){return U},W0:function(){return b},gP:function(){return I},F4:function(){return u},ux:function(){return m},Kp:function(){return l},$4:function(){return x},p_:function(){return o},ZM:function(){return M},D:function(){return A},gW:function(){return c},E6:function(){return K}});var r=e(86833),t;(function(le){const fe="SignedIn";le.SignedIn=fe;const Ae="SignedOut";le.SignedOut=Ae})(t||(t={}));const l=(0,r.createApiRef)({id:"core.auth.google"}),u=(0,r.createApiRef)({id:"core.auth.github"}),A=(0,r.createApiRef)({id:"core.auth.okta"}),m=(0,r.createApiRef)({id:"core.auth.gitlab"}),o=(0,r.createApiRef)({id:"core.auth.microsoft"}),c=(0,r.createApiRef)({id:"core.auth.onelogin"}),f=(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"}),C=(0,r.createApiRef)({id:"core.apptheme"}),O=(0,r.createApiRef)({id:"core.config"}),D=(0,r.createApiRef)({id:"core.discovery"}),U=(0,r.createApiRef)({id:"core.error"});var B;(function(le){le[le.None=0]="None";const Ae=1;le[le.Active=Ae]="Active"})(B||(B={}));const b=(0,r.createApiRef)({id:"core.featureflags"}),I=(0,r.createApiRef)({id:"core.fetch"}),x=(0,r.createApiRef)({id:"core.identity"}),M=(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,"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(u){if(this.config=u,!u.id.split(".").flatMap(m=>m.split("-")).every(m=>m.match(/^[a-z][a-z0-9]*$/)))throw new Error(`API id must only contain period separated lowercase alphanum tokens with dashes, got '${u.id}'`)}get id(){return this.config.id}get T(){throw new Error(`tried to read ApiRef.T of ${this}`)}toString(){return`apiRef{${this.config.id}}`}}function t(l){return new r(l)}},25182:function(ee,s,e){"use strict";e.d(s,{n:function(){return r}});function r(t,l){return"id"in t?{api:t,deps:{},factory:()=>l}:t}},86833:function(ee,s,e){"use strict";e.d(s,{createApiFactory:function(){return A.n},createApiRef:function(){return t.T},useApi:function(){return r.h_},useApiHolder:function(){return r.I_}});var r=e(5761),t=e(90515),l=e(16362),u=e.n(l);e.o(l,"FeatureFlagState")&&e.d(s,{FeatureFlagState:function(){return l.FeatureFlagState}}),e.o(l,"SessionState")&&e.d(s,{SessionState:function(){return l.SessionState}}),e.o(l,"alertApiRef")&&e.d(s,{alertApiRef:function(){return l.alertApiRef}}),e.o(l,"analyticsApiRef")&&e.d(s,{analyticsApiRef:function(){return l.analyticsApiRef}}),e.o(l,"appThemeApiRef")&&e.d(s,{appThemeApiRef:function(){return l.appThemeApiRef}}),e.o(l,"atlassianAuthApiRef")&&e.d(s,{atlassianAuthApiRef:function(){return l.atlassianAuthApiRef}}),e.o(l,"attachComponentData")&&e.d(s,{attachComponentData:function(){return l.attachComponentData}}),e.o(l,"bitbucketAuthApiRef")&&e.d(s,{bitbucketAuthApiRef:function(){return l.bitbucketAuthApiRef}}),e.o(l,"configApiRef")&&e.d(s,{configApiRef:function(){return l.configApiRef}}),e.o(l,"createApiFactory")&&e.d(s,{createApiFactory:function(){return l.createApiFactory}}),e.o(l,"createComponentExtension")&&e.d(s,{createComponentExtension:function(){return l.createComponentExtension}}),e.o(l,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return l.createExternalRouteRef}}),e.o(l,"createPlugin")&&e.d(s,{createPlugin:function(){return l.createPlugin}}),e.o(l,"createReactExtension")&&e.d(s,{createReactExtension:function(){return l.createReactExtension}}),e.o(l,"createRoutableExtension")&&e.d(s,{createRoutableExtension:function(){return l.createRoutableExtension}}),e.o(l,"createRouteRef")&&e.d(s,{createRouteRef:function(){return l.createRouteRef}}),e.o(l,"discoveryApiRef")&&e.d(s,{discoveryApiRef:function(){return l.discoveryApiRef}}),e.o(l,"errorApiRef")&&e.d(s,{errorApiRef:function(){return l.errorApiRef}}),e.o(l,"featureFlagsApiRef")&&e.d(s,{featureFlagsApiRef:function(){return l.featureFlagsApiRef}}),e.o(l,"fetchApiRef")&&e.d(s,{fetchApiRef:function(){return l.fetchApiRef}}),e.o(l,"getComponentData")&&e.d(s,{getComponentData:function(){return l.getComponentData}}),e.o(l,"githubAuthApiRef")&&e.d(s,{githubAuthApiRef:function(){return l.githubAuthApiRef}}),e.o(l,"gitlabAuthApiRef")&&e.d(s,{gitlabAuthApiRef:function(){return l.gitlabAuthApiRef}}),e.o(l,"googleAuthApiRef")&&e.d(s,{googleAuthApiRef:function(){return l.googleAuthApiRef}}),e.o(l,"identityApiRef")&&e.d(s,{identityApiRef:function(){return l.identityApiRef}}),e.o(l,"microsoftAuthApiRef")&&e.d(s,{microsoftAuthApiRef:function(){return l.microsoftAuthApiRef}}),e.o(l,"oauthRequestApiRef")&&e.d(s,{oauthRequestApiRef:function(){return l.oauthRequestApiRef}}),e.o(l,"oktaAuthApiRef")&&e.d(s,{oktaAuthApiRef:function(){return l.oktaAuthApiRef}}),e.o(l,"oneloginAuthApiRef")&&e.d(s,{oneloginAuthApiRef:function(){return l.oneloginAuthApiRef}}),e.o(l,"storageApiRef")&&e.d(s,{storageApiRef:function(){return l.storageApiRef}}),e.o(l,"useApp")&&e.d(s,{useApp:function(){return l.useApp}}),e.o(l,"useElementFilter")&&e.d(s,{useElementFilter:function(){return l.useElementFilter}}),e.o(l,"useRouteRef")&&e.d(s,{useRouteRef:function(){return l.useRouteRef}}),e.o(l,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return l.useRouteRefParams}});var A=e(25182)},16362:function(){},5761:function(ee,s,e){"use strict";e.d(s,{I_:function(){return l},h_:function(){return u}});var r=e(2784),t=e(76241);function l(){const m=(0,t.Vt)("api-context");if(!m)throw new Error("API context is not available");const o=m.atVersion(1);if(!o)throw new Error("ApiContext v1 not available");return o}function u(m){const c=l().get(m);if(!c)throw new Error(`No implementation available for ${m}`);return c}function A(m){return function(c){const f=g=>{const E=l(),C={};for(const O in m)if(m.hasOwnProperty(O)){const D=m[O],U=E.get(D);if(!U)throw new Error(`No implementation available for ${D}`);C[O]=U}return React.createElement(c,{...g,...C})},y=c.displayName||c.name||"Component";return f.displayName=`withApis(${y})`,f}}},31311:function(ee,s,e){"use strict";e.d(s,{useApp:function(){return r.q}});var r=e(32483),t=e(67229),l=e.n(t);e.o(t,"attachComponentData")&&e.d(s,{attachComponentData:function(){return t.attachComponentData}}),e.o(t,"createApiFactory")&&e.d(s,{createApiFactory:function(){return t.createApiFactory}}),e.o(t,"createApiRef")&&e.d(s,{createApiRef:function(){return t.createApiRef}}),e.o(t,"createComponentExtension")&&e.d(s,{createComponentExtension:function(){return t.createComponentExtension}}),e.o(t,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return t.createExternalRouteRef}}),e.o(t,"createPlugin")&&e.d(s,{createPlugin:function(){return t.createPlugin}}),e.o(t,"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 l=(0,r.Vt)("app-context");if(!l)throw new Error("App context is not available");const u=l.atVersion(1);if(!u)throw new Error("AppContext v1 not available");return u}},74181:function(ee,s,e){"use strict";e.d(s,{R5:function(){return u},CO:function(){return E},YO:function(){return C},P4:function(){return g},IY:function(){return A},vJ:function(){return B}});var r=e(76241);const t=(0,r.uW)("component-data-store",()=>new WeakMap),l="__backstage_data";function u(b,I,x){var le;const M=b;let K=(le=M[l])!=null?le:t.get(b);if(K||(K={map:new Map},Object.defineProperty(M,l,{enumerable:!1,configurable:!0,writable:!1,value:K}),t.set(b,K)),K.map.has(I)){const fe=b.displayName||b.name;throw new Error(`Attempted to attach duplicate data "${I}" to component "${fe}"`)}K.map.set(I,x)}function A(b,I){var K;if(!b)return;const x=b.type;if(!x)return;const M=(K=x[l])!=null?K:t.get(x);if(!!M)return M.map.get(I)}var m=e(2784),o=e(88609),c=e(31311),f=e(82772);class y extends m.Component{constructor(){super(...arguments);q(this,"state",{error:void 0});q(this,"handleErrorReset",()=>{this.setState({error:void 0})})}static getDerivedStateFromError(x){return{error:x}}render(){const{error:x}=this.state,{app:M,plugin:K}=this.props,{ErrorBoundaryFallback:le}=M.getComponents();return x?m.createElement(le,{error:x,resetError:this.handleErrorReset,plugin:K}):this.props.children}}function g(b){const{component:I,mountPoint:x,name:M}=b;return C({component:{lazy:()=>I().then(K=>{const le=Ae=>{try{(0,f.tg)(x)}catch(xe){if(typeof xe=="object"&&xe!==null){const{message:ze}=xe;if(typeof ze=="string"&&ze.startsWith("No path for "))throw new Error(`Routable extension component with mount point ${x} 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 m.createElement(K,{...Ae})},fe=M||K.displayName||K.name||"LazyComponent";return le.displayName=`RoutableExtension(${fe})`,le},K=>fe=>{const Ae=(0,c.useApp)(),{BootErrorPage:xe}=Ae.getComponents();return m.createElement(xe,{step:"load-chunk",error:K})})},data:{"core.mountPoint":x},name:M})}function E(b){const{component:I,name:x}=b;return C({component:I,name:x})}function C(b){const{data:I={},name:x}=b;x||console.warn("Declaring extensions without name is DEPRECATED. Make sure that all usages of createReactExtension, createComponentExtension and createRoutableExtension provide a name.");let M;if("lazy"in b.component){const le=b.component.lazy;M=(0,m.lazy)(()=>le().then(fe=>({default:fe})))}else M=b.component.sync;const K=x||M.displayName||M.name||"Component";return{expose(le){const fe=Ae=>{const xe=(0,c.useApp)(),{Progress:ze}=xe.getComponents(),He=I==null?void 0:I["core.mountPoint"];return m.createElement(m.Suspense,{fallback:m.createElement(ze,null)},m.createElement(y,{app:xe,plugin:le},m.createElement(o.fC,{attributes:{pluginId:le.getId(),...x&&{extension:x},...He&&{routeRef:He.id}}},m.createElement(M,{...Ae}))))};u(fe,"core.plugin",le);for(const[Ae,xe]of Object.entries(I))u(fe,Ae,xe);return fe.displayName=`Extension(${K})`,fe}}}var O=e(27399);function D(b,I,x,M){return m.Children.toArray(b).flatMap(K=>{if(!(0,m.isValidElement)(K))return[];if(K.type===m.Fragment)return D(K.props.children,I,x,M);if(A(K,"core.featureFlagged")){const le=K.props;return("with"in le?I.isActive(le.with):!I.isActive(le.without))?D(K.props.children,I,x,M):[]}if(x===void 0||x(K))return[K];if(M)throw new Error(M);return D(K.props.children,I,x,M)})}class U{constructor(I,x){this.node=I,this.featureFlagsApi=x}selectByComponentData(I){const x=D(this.node,this.featureFlagsApi,M=>A(M,I.key)!==void 0,I.withStrictError);return new U(x,this.featureFlagsApi)}findComponentData(I){return D(this.node,this.featureFlagsApi,M=>A(M,I.key)!==void 0).map(M=>A(M,I.key)).filter(M=>M!==void 0)}getElements(){return D(this.node,this.featureFlagsApi)}}function B(b,I,x=[]){const M=(0,O.useApi)(O.featureFlagsApiRef),K=new U(b,M);return(0,m.useMemo)(()=>I(K),[b,...x])}},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 u.R5},bitbucketAuthApiRef:function(){return t.bitbucketAuthApiRef},configApiRef:function(){return t.configApiRef},createComponentExtension:function(){return u.CO},createExternalRouteRef:function(){return c.x8},createPlugin:function(){return o.r},createReactExtension:function(){return u.YO},createRoutableExtension:function(){return u.P4},createRouteRef:function(){return c.NT},discoveryApiRef:function(){return t.discoveryApiRef},errorApiRef:function(){return t.errorApiRef},featureFlagsApiRef:function(){return t.featureFlagsApiRef},fetchApiRef:function(){return t.fetchApiRef},getComponentData:function(){return u.IY},githubAuthApiRef:function(){return t.githubAuthApiRef},gitlabAuthApiRef:function(){return t.gitlabAuthApiRef},googleAuthApiRef:function(){return t.googleAuthApiRef},identityApiRef:function(){return t.identityApiRef},microsoftAuthApiRef:function(){return t.microsoftAuthApiRef},oauthRequestApiRef:function(){return t.oauthRequestApiRef},oktaAuthApiRef:function(){return t.oktaAuthApiRef},oneloginAuthApiRef:function(){return t.oneloginAuthApiRef},storageApiRef:function(){return t.storageApiRef},useAnalytics:function(){return r.z},useApp:function(){return l.useApp},useElementFilter:function(){return u.vJ},useRouteRef:function(){return c.tg},useRouteRefParams:function(){return c.Oi}});var r=e(28461),t=e(27399);e.o(t,"attachComponentData")&&e.d(s,{attachComponentData:function(){return t.attachComponentData}}),e.o(t,"createApiFactory")&&e.d(s,{createApiFactory:function(){return t.createApiFactory}}),e.o(t,"createApiRef")&&e.d(s,{createApiRef:function(){return t.createApiRef}}),e.o(t,"createComponentExtension")&&e.d(s,{createComponentExtension:function(){return t.createComponentExtension}}),e.o(t,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return t.createExternalRouteRef}}),e.o(t,"createPlugin")&&e.d(s,{createPlugin:function(){return t.createPlugin}}),e.o(t,"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,"useRouteRef")&&e.d(s,{useRouteRef:function(){return t.useRouteRef}}),e.o(t,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return t.useRouteRefParams}});var l=e(31311);e.o(l,"attachComponentData")&&e.d(s,{attachComponentData:function(){return l.attachComponentData}}),e.o(l,"createApiFactory")&&e.d(s,{createApiFactory:function(){return l.createApiFactory}}),e.o(l,"createApiRef")&&e.d(s,{createApiRef:function(){return l.createApiRef}}),e.o(l,"createComponentExtension")&&e.d(s,{createComponentExtension:function(){return l.createComponentExtension}}),e.o(l,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return l.createExternalRouteRef}}),e.o(l,"createPlugin")&&e.d(s,{createPlugin:function(){return l.createPlugin}}),e.o(l,"createReactExtension")&&e.d(s,{createReactExtension:function(){return l.createReactExtension}}),e.o(l,"createRoutableExtension")&&e.d(s,{createRoutableExtension:function(){return l.createRoutableExtension}}),e.o(l,"createRouteRef")&&e.d(s,{createRouteRef:function(){return l.createRouteRef}}),e.o(l,"getComponentData")&&e.d(s,{getComponentData:function(){return l.getComponentData}}),e.o(l,"useApi")&&e.d(s,{useApi:function(){return l.useApi}}),e.o(l,"useApiHolder")&&e.d(s,{useApiHolder:function(){return l.useApiHolder}}),e.o(l,"useElementFilter")&&e.d(s,{useElementFilter:function(){return l.useElementFilter}}),e.o(l,"useRouteRef")&&e.d(s,{useRouteRef:function(){return l.useRouteRef}}),e.o(l,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return l.useRouteRefParams}});var u=e(74181),A=e(80274),m=e.n(A);e.o(A,"createApiFactory")&&e.d(s,{createApiFactory:function(){return A.createApiFactory}}),e.o(A,"createApiRef")&&e.d(s,{createApiRef:function(){return A.createApiRef}}),e.o(A,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return A.createExternalRouteRef}}),e.o(A,"createPlugin")&&e.d(s,{createPlugin:function(){return A.createPlugin}}),e.o(A,"createRouteRef")&&e.d(s,{createRouteRef:function(){return A.createRouteRef}}),e.o(A,"useApi")&&e.d(s,{useApi:function(){return A.useApi}}),e.o(A,"useApiHolder")&&e.d(s,{useApiHolder:function(){return A.useApiHolder}}),e.o(A,"useRouteRef")&&e.d(s,{useRouteRef:function(){return A.useRouteRef}}),e.o(A,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return A.useRouteRefParams}});var o=e(96896),c=e(82772)},96896:function(ee,s,e){"use strict";e.d(s,{r:function(){return t}});class r{constructor(u){this.config=u}getId(){return this.config.id}getApis(){var u;return(u=this.config.apis)!=null?u:[]}getFeatureFlags(){var u,A;return(A=(u=this.config.featureFlags)==null?void 0:u.slice())!=null?A:[]}get routes(){var u;return(u=this.config.routes)!=null?u:{}}get externalRoutes(){var u;return(u=this.config.externalRoutes)!=null?u:{}}provide(u){return u.expose(this)}toString(){return`plugin{${this.config.id}}`}}function t(l){return new r(l)}},82772:function(ee,s,e){var O,D,U;"use strict";e.d(s,{x8:function(){return f},NT:function(){return u},tg:function(){return E},Oi:function(){return C}});var r=e(76241);const t=(0,r.uW)("route-ref-type",()=>Symbol("route-ref-type"));class l{constructor(b,I){q(this,O,"absolute");this.id=b,this.params=I}get title(){return this.id}toString(){return`routeRef{type=absolute,id=${this.id}}`}}O=t;function u(B){var b;return new l(B.id,(b=B.params)!=null?b:[])}const A=/^\w+$/;class m{constructor(b,I,x,M){q(this,D,"sub");this.id=b,this.path=I,this.parent=x,this.params=M}toString(){return`routeRef{type=sub,id=${this.id}}`}}D=t;function o(B){const{id:b,path:I,parent:x}=B,M=I.split("/").filter(fe=>fe.startsWith(":")).map(fe=>fe.substring(1)),K=[...x.params,...M];if(x.params.some(fe=>M.includes(fe)))throw new Error("SubRouteRef may not have params that overlap with its parent");if(!I.startsWith("/"))throw new Error(`SubRouteRef path must start with '/', got '${I}'`);if(I.endsWith("/"))throw new Error(`SubRouteRef path must not end with '/', got '${I}'`);for(const fe of M)if(!A.test(fe))throw new Error(`SubRouteRef path has invalid param, got '${fe}'`);return new m(b,I,x,K)}class c{constructor(b,I,x){q(this,U,"external");this.id=b,this.params=I,this.optional=x}toString(){return`routeRef{type=external,id=${this.id}}`}}U=t;function f(B){var b;return new c(B.id,(b=B.params)!=null?b:[],Boolean(B.optional))}var y=e(2784),g=e(10289);function E(B){const b=(0,g.TH)(),I=(0,r.Vt)("routing-context");if(!I)throw new Error("Routing context is not available");const x=I.atVersion(1),M=(0,y.useMemo)(()=>x&&x.resolve(B,b),[x,B,b]);if(!I)throw new Error("useRouteRef used outside of routing context");if(!x)throw new Error("RoutingContext v1 not available");const K="optional"in B&&B.optional;if(!M&&!K)throw new Error(`No path for ${B}`);return M}function C(B){return(0,g.UO)()}},10179:function(ee,s,e){"use strict";e.d(s,{SP:function(){return O},dR:function(){return g},VL:function(){return U},BD:function(){return t}});function r(B){if(typeof B!="object"||B===null||Array.isArray(B))return!1;const b=B;return!(typeof b.name!="string"||b.name===""||typeof b.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 b=B;if(typeof b.name!="string"||b.name==="")throw new Error(`Encountered error object without a name, got '${B}'`);if(typeof b.message!="string")throw new Error(`Encountered error object without a message, got '${B}'`)}var l=e(24852);function u(B,b){const I=serializeErrorInternal(B),x={name:"Unknown",message:"<no reason given>",...I};return b!=null&&b.includeStack||delete x.stack,x}function A(B){const b=(0,l.deserializeError)(B);return B.stack||(b.stack=void 0),b}function m(B){if(r(B)){const b=String(B);return b!=="[object Object]"?b:`${B.name}: ${B.message}`}return`unknown error '${B}'`}class o extends Error{constructor(I,x){var K;let M=I;if(x!==void 0){const le=m(x);M?M+=`; caused by ${le}`:M=`caused by ${le}`}super(M);q(this,"cause");(K=Error.captureStackTrace)==null||K.call(Error,this,this.constructor),this.name=this.constructor.name,this.cause=r(x)?x:void 0}}class c extends null{}class f extends null{}class y extends null{}class g extends o{}class E extends null{}class C extends null{}class O extends o{constructor(b,I){super(b,I),this.name=r(I)?I.name:"Error"}}async function D(B){var b;try{const I=await B.text();if(I){if((b=B.headers.get("content-type"))!=null&&b.startsWith("application/json"))try{const x=JSON.parse(I);if(x.error&&x.response)return x}catch{}return{error:{name:"Error",message:`Request failed with status ${B.status} ${B.statusText}, ${I}`},response:{statusCode:B.status}}}}catch{}return{error:{name:"Error",message:`Request failed with status ${B.status} ${B.statusText}`},response:{statusCode:B.status}}}class U extends Error{constructor(I){super(I.message);q(this,"response");q(this,"body");q(this,"cause");this.name="ResponseError",this.response=I.response,this.body=I.data,this.cause=I.cause}static async fromResponse(I){const x=await D(I),M=x.response.statusCode||I.status,K=x.error.name||I.statusText,le=`Request failed with ${M} ${K}`,fe=A(x.error);return new U({message:le,response:I,data:x,cause:fe})}}},36356:function(ee,s,e){var g,E,C,O,D;"use strict";e.d(s,{nW:function(){return y},ae:function(){return m},q3:function(){return o}});var r=e(36964);const t=(0,r.createApiRef)({id:"core.scmauth"});class l{constructor(b){Mn(this,g,void 0);Zn(this,g,b)}async getCredentials(b){const I=new URL(b.url),x=st(this,g).find(M=>M.isUrlSupported(I));if(!x)throw new Error(`No auth provider available for '${b.url}', see https://backstage.io/link?scm-auth`);return x.getCredentials(b)}}g=new WeakMap;const U=class{constructor(b,I,x,M){Mn(this,E,void 0);Mn(this,C,void 0);Mn(this,O,void 0);Mn(this,D,void 0);Zn(this,E,I),Zn(this,C,x),Zn(this,O,M),Zn(this,D,b)}static createDefaultApiFactory(){return createApiFactory({api:scmAuthApiRef,deps:{github:githubAuthApiRef,gitlab:gitlabAuthApiRef,azure:microsoftAuthApiRef,bitbucket:bitbucketAuthApiRef},factory:({github:b,gitlab:I,azure:x,bitbucket:M})=>U.merge(U.forGithub(b),U.forGitlab(I),U.forAzure(x),U.forBitbucket(M))})}static forAuthApi(b,I){return new U("generic",b,I.host,I.scopeMapping)}static forGithub(b,I){var M;const x=(M=I==null?void 0:I.host)!=null?M:"github.com";return new U("github",b,x,{default:["repo","read:org","read:user"],repoWrite:["gist"]})}static forGitlab(b,I){var M;const x=(M=I==null?void 0:I.host)!=null?M:"gitlab.com";return new U("gitlab",b,x,{default:["read_user","read_api","read_repository"],repoWrite:["write_repository","api"]})}static forAzure(b,I){var M;const x=(M=I==null?void 0:I.host)!=null?M:"dev.azure.com";return new U("azure",b,x,{default:["vso.build","vso.code","vso.graph","vso.project","vso.profile"],repoWrite:["vso.code_manage"]})}static forBitbucket(b,I){var M;const x=(M=I==null?void 0:I.host)!=null?M:"bitbucket.org";return new U("bitbucket",b,x,{default:["account","team","pullrequest","snippet","issue"],repoWrite:["pullrequest:write","snippet:write","issue:write"]})}static merge(...b){return new l(b)}isUrlSupported(b){return b.host===st(this,C)}getAdditionalScopesForProvider(b){var I,x;return!(b!=null&&b.customScopes)||st(this,D)==="generic"?[]:(x=(I=b.customScopes)==null?void 0:I[st(this,D)])!=null?x:[]}async getCredentials(b){const{url:I,additionalScope:x,...M}=b,K=st(this,O).default.slice();x!=null&&x.repoWrite&&K.push(...st(this,O).repoWrite);const le=this.getAdditionalScopesForProvider(x);le.length&&K.push(...le);const fe=[...new Set(K)],Ae=await st(this,E).getAccessToken(fe,M);return{token:Ae,headers:{Authorization:`Bearer ${Ae}`}}}};let u=U;E=new WeakMap,C=new WeakMap,O=new WeakMap,D=new WeakMap;var A=e(68370);class m{static fromConfig(b){return A.Lx.fromConfig(b)}}const o=(0,r.createApiRef)({id:"integration.scmintegrations"});var c=e(73250),f=e(2784);const y=B=>{var K;const{type:b}=B,I=(0,r.useApp)(),x=c.Z,M=b&&(K=I.getSystemIcon(b))!=null?K:x;return f.createElement(M,null)}},68370:function(ee,s,e){var kt,rn,Yt,Xt,ln,qt,Bt;"use strict";e.d(s,{Lx:function(){return $t},Pb:function(){return Tt}});var r=e(82717),t=e.n(r),l=e(76635);function u(w){const h=new URL("http://example.com");return h.host=w,h.host===w}function A(w){try{return new URL(w),!0}catch{return!1}}function m(w,h){return{list(){return w},byUrl(S){try{const F=typeof S=="string"?new URL(S):S;return w.find(W=>h(W)===F.host)}catch{return}},byHost(S){return w.find(F=>h(F)===S)}}}function o(w){const{url:h,base:S,lineNumber:F}=w;try{return new URL(h),h}catch{}let W;if(h.startsWith("/")){const{filepath:Ee}=t()(S);W=new URL(S);const ge=(0,l.trimEnd)(W.pathname.substring(0,W.pathname.length-Ee.length),"/");W.pathname=`${ge}${h}`}else W=new URL(h,S);return W.search=new URL(S).search,F&&(W.hash=`L${F}`),W.toString()}const c="amazonaws.com";function f(w){var bt;const h=w.getOptionalString("endpoint"),S=(bt=w.getOptionalBoolean("s3ForcePathStyle"))!=null?bt:!1;let F,W;if(h){try{const On=new URL(h);F=On.host,W=On.pathname}catch{throw new Error(`invalid awsS3 integration config, endpoint '${h}' is not a valid URL`)}if(W!=="/")throw new Error(`invalid awsS3 integration config, endpoints cannot contain path, got '${h}'`)}else F=c;const Ee=w.getOptionalString("accessKeyId"),ge=w.getOptionalString("secretAccessKey"),Oe=w.getOptionalString("roleArn"),yt=w.getOptionalString("externalId");return{host:F,endpoint:h,s3ForcePathStyle:S,accessKeyId:Ee,secretAccessKey:ge,roleArn:Oe,externalId:yt}}function y(w){const h=w.map(f);return h.some(S=>S.host===c)||h.push({host:c}),h}const ht=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=ht;q(g,"factory",({config:h})=>{var F;const S=y((F=h.getOptionalConfigArray("integrations.awsS3"))!=null?F:[]);return m(S.map(W=>new ht(W)),W=>W.config.host)});const E="GB",zt=class{constructor(h,S,F,W,Ee,ge){Mn(this,kt,void 0);Mn(this,rn,void 0);Mn(this,Yt,void 0);Mn(this,Xt,void 0);Mn(this,ln,void 0);Mn(this,qt,void 0);Mn(this,Bt,(...h)=>{const S=new URL(st(this,kt));return S.pathname=h.map(F=>encodeURIComponent(F)).join("/"),S});Zn(this,kt,h),Zn(this,rn,S),Zn(this,Yt,F),Zn(this,Xt,W),Zn(this,ln,Ee),Zn(this,qt,ge)}static fromRepoUrl(h){var On;const S=new URL(h);let F,W,Ee;const ge=S.pathname.split("/").map(xn=>decodeURIComponent(xn));if(ge[2]==="_git"?(F=ge[1],W=Ee=ge[3]):ge[3]==="_git"?(F=ge[1],W=ge[2],Ee=ge[4]):ge[4]==="_git"&&(F=`${ge[1]}/${ge[2]}`,W=ge[3],Ee=ge[5]),!F||!W||!Ee)throw new Error("Azure URL must point to a git repository");const Oe=(On=S.searchParams.get("path"))!=null?On:void 0;let yt;const bt=S.searchParams.get("version");if(bt){if(bt.slice(0,2)!=="GB")throw new Error("Azure URL version must point to a git branch");yt=bt.slice(2)}return new zt(S.origin,F,W,Ee,Oe,yt)}toRepoUrl(){let h;return st(this,Yt)===st(this,Xt)?h=st(this,Bt).call(this,st(this,rn),"_git",st(this,Xt)):h=st(this,Bt).call(this,st(this,rn),st(this,Yt),"_git",st(this,Xt)),st(this,ln)&&h.searchParams.set("path",st(this,ln)),st(this,qt)&&h.searchParams.set("version",E+st(this,qt)),h.toString()}toFileUrl(){if(!st(this,ln))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,rn),st(this,Yt),"_apis","git","repositories",st(this,Xt),"items");return h.searchParams.set("api-version","6.0"),h.searchParams.set("path",st(this,ln)),st(this,qt)&&h.searchParams.set("version",st(this,qt)),h.toString()}toArchiveUrl(){const h=st(this,Bt).call(this,st(this,rn),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,ln)&&h.searchParams.set("scopePath",st(this,ln)),st(this,qt)&&h.searchParams.set("version",st(this,qt)),h.toString()}toCommitsUrl(){const h=st(this,Bt).call(this,st(this,rn),st(this,Yt),"_apis","git","repositories",st(this,Xt),"commits");return h.searchParams.set("api-version","6.0"),st(this,qt)&&h.searchParams.set("searchCriteria.itemVersion.version",st(this,qt)),h.toString()}getOwner(){return st(this,rn)}getProject(){return st(this,Yt)}getRepo(){return st(this,Xt)}getPath(){return st(this,ln)}getRef(){return st(this,qt)}};let C=zt;kt=new WeakMap,rn=new WeakMap,Yt=new WeakMap,Xt=new WeakMap,ln=new WeakMap,qt=new WeakMap,Bt=new WeakMap;const O="dev.azure.com";function D(w){var F;const h=(F=w.getOptionalString("host"))!=null?F:O,S=w.getOptionalString("token");if(!u(h))throw new Error(`Invalid Azure integration config, '${h}' is not a valid host`);return{host:h,token:S}}function U(w){const h=w.map(D);return h.some(S=>S.host===O)||h.push({host:O}),h}const Jt=class{constructor(h){this.integrationConfig=h}get type(){return"azure"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(h){var W;const{url:S,base:F}=h;if(A(S))return S;try{const Ee=C.fromRepoUrl(F),ge=new URL(F),Oe=new URL(`https://a.com${(W=Ee.getPath())!=null?W:""}`),yt=new URL(S,Oe).pathname;return ge.searchParams.set("path",yt),h.lineNumber&&(ge.searchParams.set("line",String(h.lineNumber)),ge.searchParams.set("lineEnd",String(h.lineNumber+1)),ge.searchParams.set("lineStartColumn","1"),ge.searchParams.set("lineEndColumn","1")),ge.toString()}catch{return new URL(S,F).toString()}}resolveEditUrl(h){return h}};let B=Jt;q(B,"factory",({config:h})=>{var F;const S=U((F=h.getOptionalConfigArray("integrations.azure"))!=null?F:[]);return m(S.map(W=>new Jt(W)),W=>W.config.host)});var b=e(48834).Buffer;function I(w){return AzureUrl.fromRepoUrl(w).toFileUrl()}function x(w){return AzureUrl.fromRepoUrl(w).toArchiveUrl()}function M(w){return AzureUrl.fromRepoUrl(w).toCommitsUrl()}function K(w,h){const S=h?{...h}:{};if(w.token){const F=b.from(`:${w.token}`,"utf8");S.Authorization=`Basic ${F.toString("base64")}`}return{headers:S}}const le="bitbucket.org",fe="https://api.bitbucket.org/2.0";function Ae(w){var ge;const h=(ge=w.getOptionalString("host"))!=null?ge:le;let S=w.getOptionalString("apiBaseUrl");const F=w.getOptionalString("token"),W=w.getOptionalString("username"),Ee=w.getOptionalString("appPassword");if(!u(h))throw new Error(`Invalid Bitbucket integration config, '${h}' is not a valid host`);return S?S=(0,l.trimEnd)(S,"/"):h===le?S=fe:S=`https://${h}/rest/api/1.0`,{host:h,apiBaseUrl:S,token:F,username:W,appPassword:Ee}}function xe(w){const h=w.map(Ae);return h.some(S=>S.host===le)||h.push({host:le,apiBaseUrl:fe}),h}const pn=class{constructor(h){this.integrationConfig=h}get type(){return"bitbucket"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(h){const S=o(h);if(!h.lineNumber)return S;const F=new URL(S);return this.integrationConfig.host==="bitbucket.org"?F.hash=`lines-${h.lineNumber}`:F.hash=`${h.lineNumber}`,F.toString()}resolveEditUrl(h){const S=t()(h),F=new URL(h);return F.searchParams.set("mode","edit"),F.searchParams.set("spa","0"),F.searchParams.set("at",S.ref),F.toString()}};let ze=pn;q(ze,"factory",({config:h})=>{var F,W,Ee;const S=xe((Ee=h.getOptionalConfigArray("integrations.bitbucket"))!=null?Ee:[...(F=h.getOptionalConfigArray("integrations.bitbucketCloud"))!=null?F:[],...(W=h.getOptionalConfigArray("integrations.bitbucketServer"))!=null?W:[]]);return m(S.map(ge=>new pn(ge)),ge=>ge.config.host)});var He=e(96279),Se=e(48834).Buffer;async function Ye(w,h){const{name:S,owner:F,resource:W}=parseGitUrl(w),Ee=W==="bitbucket.org";let ge=Ee?`${h.apiBaseUrl}/repositories/${F}/${S}`:`${h.apiBaseUrl}/projects/${F}/repos/${S}/default-branch`,Oe=await fetch(ge,Et(h));if(Oe.status===404&&!Ee&&(ge=`${h.apiBaseUrl}/projects/${F}/repos/${S}/branches/default`,Oe=await fetch(ge,Et(h))),!Oe.ok){const bt=`Failed to retrieve default branch from ${ge}, ${Oe.status} ${Oe.statusText}`;throw new Error(bt)}let yt;if(Ee)yt=(await Oe.json()).mainbranch.name;else{const{displayId:bt}=await Oe.json();yt=bt}if(!yt)throw new Error(`Failed to read default branch from ${ge}. Response ${Oe.status} ${Oe.json()}`);return yt}async function rt(w,h){const{name:S,owner:F,ref:W,protocol:Ee,resource:ge,filepath:Oe}=parseGitUrl(w),yt=ge==="bitbucket.org";let bt=W;bt||(bt=await Ye(w,h));const On=Oe?`&path=${encodeURIComponent(Oe)}`:"";return yt?`${Ee}://${ge}/${F}/${S}/get/${bt}.tar.gz`:`${h.apiBaseUrl}/projects/${F}/repos/${S}/archive?format=tgz&at=${bt}&prefix=${F}-${S}${On}`}function It(w,h){try{const{owner:S,name:F,ref:W,filepathtype:Ee,filepath:ge}=parseGitUrl(w);if(!S||!F||Ee!=="browse"&&Ee!=="raw"&&Ee!=="src")throw new Error("Invalid Bitbucket URL or file path");const Oe=ge.replace(/^\//,"");if(h.host==="bitbucket.org"){if(!W)throw new Error("Invalid Bitbucket URL or file path");return`${h.apiBaseUrl}/repositories/${S}/${F}/src/${W}/${Oe}`}return`${h.apiBaseUrl}/projects/${S}/repos/${F}/raw/${Oe}?at=${W}`}catch(S){throw new Error(`Incorrect URL: ${w}, ${S}`)}}function Et(w){const h={};if(w.token)h.Authorization=`Bearer ${w.token}`;else if(w.username&&w.appPassword){const S=Se.from(`${w.username}:${w.appPassword}`,"utf8");h.Authorization=`Basic ${S.toString("base64")}`}return{headers:h}}const Pe="bitbucket.org",mt="https://api.bitbucket.org/2.0";function Xe(w){const h=Pe,S=mt,F=w.getString("username"),W=w.getString("appPassword");return{host:h,apiBaseUrl:S,username:F,appPassword:W}}function se(w){const h=w.map(Xe);return h.length===0&&h.push({host:Pe,apiBaseUrl:mt}),h}const cn=class{constructor(h){this.integrationConfig=h}get type(){return"bitbucketCloud"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(h){const S=o(h);if(h.lineNumber){const F=new URL(S);return F.hash=`lines-${h.lineNumber}`,F.toString()}return S}resolveEditUrl(h){const S=t()(h),F=new URL(h);return F.searchParams.set("mode","edit"),F.searchParams.set("at",S.ref),F.toString()}};let me=cn;q(me,"factory",({config:h})=>{var F;const S=se((F=h.getOptionalConfigArray("integrations.bitbucketCloud"))!=null?F:[]);return m(S.map(W=>new cn(W)),W=>W.config.host)});var we=e(48834).Buffer;async function $e(w,h){const{name:S,owner:F}=parseGitUrl(w),W=`${h.apiBaseUrl}/repositories/${F}/${S}`,Ee=await fetch(W,Je(h));if(!Ee.ok){const yt=`Failed to retrieve default branch from ${W}, ${Ee.status} ${Ee.statusText}`;throw new Error(yt)}const Oe=(await Ee.json()).mainbranch.name;if(!Oe)throw new Error(`Failed to read default branch from ${W}. Response ${Ee.status} ${Ee.json()}`);return Oe}async function je(w,h){const{name:S,owner:F,ref:W,protocol:Ee,resource:ge}=parseGitUrl(w);let Oe=W;return Oe||(Oe=await $e(w,h)),`${Ee}://${ge}/${F}/${S}/get/${Oe}.tar.gz`}function it(w,h){try{const{owner:S,name:F,ref:W,filepathtype:Ee,filepath:ge}=parseGitUrl(w);if(!S||!F||Ee!=="src"&&Ee!=="raw")throw new Error("Invalid Bitbucket Cloud URL or file path");const Oe=ge.replace(/^\//,"");if(!W)throw new Error("Invalid Bitbucket Cloud URL or file path");return`${h.apiBaseUrl}/repositories/${S}/${F}/src/${W}/${Oe}`}catch(S){throw new Error(`Incorrect URL: ${w}, ${S}`)}}function Je(w){const h={};if(w.username&&w.appPassword){const S=we.from(`${w.username}:${w.appPassword}`,"utf8");h.Authorization=`Basic ${S.toString("base64")}`}return{headers:h}}function Ct(w){const h=w.getString("host");let S=w.getOptionalString("apiBaseUrl");const F=w.getOptionalString("token");if(!u(h))throw new Error(`Invalid Bitbucket Server integration config, '${h}' is not a valid host`);return S?S=(0,l.trimEnd)(S,"/"):S=`https://${h}/rest/api/1.0`,{host:h,apiBaseUrl:S,token:F}}function ae(w){return w.map(Ct)}const En=class{constructor(h){this.integrationConfig=h}get type(){return"bitbucketServer"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(h){const S=o(h);if(h.lineNumber){const F=new URL(S),W=F.pathname.split("/").slice(-1)[0];return F.hash=`${W}-${h.lineNumber}`,F.toString()}return S}resolveEditUrl(h){const S=t()(h),F=new URL(h);return F.searchParams.set("mode","edit"),F.searchParams.set("spa","0"),F.searchParams.set("at",S.ref),F.toString()}};let ue=En;q(ue,"factory",({config:h})=>{var F;const S=ae((F=h.getOptionalConfigArray("integrations.bitbucketServer"))!=null?F:[]);return m(S.map(W=>new En(W)),W=>W.config.host)});async function Qe(w,h){const{name:S,owner:F}=parseGitUrl(w);let W=`${h.apiBaseUrl}/projects/${F}/repos/${S}/default-branch`,Ee=await fetch(W,at(h));if(Ee.status===404&&(W=`${h.apiBaseUrl}/projects/${F}/repos/${S}/branches/default`,Ee=await fetch(W,at(h))),!Ee.ok){const yt=`Failed to retrieve default branch from ${W}, ${Ee.status} ${Ee.statusText}`;throw new Error(yt)}const{displayId:ge}=await Ee.json(),Oe=ge;if(!Oe)throw new Error(`Failed to read default branch from ${W}. Response ${Ee.status} ${Ee.json()}`);return Oe}async function Ge(w,h){const{name:S,owner:F,ref:W,filepath:Ee}=parseGitUrl(w);let ge=W;ge||(ge=await Qe(w,h));const Oe=Ee?`&path=${encodeURIComponent(decodeURIComponent(Ee))}`:"";return`${h.apiBaseUrl}/projects/${F}/repos/${S}/archive?format=tgz&at=${ge}&prefix=${F}-${S}${Oe}`}function Ue(w,h){try{const{owner:S,name:F,ref:W,filepathtype:Ee,filepath:ge}=parseGitUrl(w);if(!S||!F||Ee!=="browse"&&Ee!=="raw"&&Ee!=="src")throw new Error("Invalid Bitbucket Server URL or file path");const Oe=ge.replace(/^\//,"");return`${h.apiBaseUrl}/projects/${S}/repos/${F}/raw/${Oe}?at=${W}`}catch(S){throw new Error(`Incorrect URL: ${w}, ${S}`)}}function at(w){const h={};return w.token&&(h.Authorization=`Bearer ${w.token}`),{headers:h}}function Q(w){const h=w.getString("host");let S=w.getOptionalString("baseUrl"),F=w.getOptionalString("cloneUrl"),W=w.getOptionalString("gitilesBaseUrl");const Ee=w.getOptionalString("username"),ge=w.getOptionalString("password");if(u(h)){if(S&&!A(S))throw new Error(`Invalid Gerrit integration config, '${S}' is not a valid baseUrl`);if(F&&!A(F))throw new Error(`Invalid Gerrit integration config, '${F}' is not a valid cloneUrl`);if(W&&!A(W))throw new Error(`Invalid Gerrit integration config, '${W}' is not a valid gitilesBaseUrl`)}else throw new Error(`Invalid Gerrit integration config, '${h}' is not a valid host`);return S?S=(0,l.trimEnd)(S,"/"):S=`https://${h}`,W?W=(0,l.trimEnd)(W,"/"):W=`https://${h}`,F?F=(0,l.trimEnd)(F,"/"):F=S,{host:h,baseUrl:S,cloneUrl:F,gitilesBaseUrl:W,username:Ee,password:ge}}function Z(w){return w.map(Q)}var X=e(48834).Buffer;const oe=")]}'";function ce(w,h){const F=h.replace(w.gitilesBaseUrl,"").split("/").filter(bt=>!!bt),W=F.indexOf("+");if(W<=0)throw new Error(`Unable to parse project from url: ${h}`);const Ee=(0,l.trimStart)(F.slice(0,W).join("/"),"/"),ge=F.indexOf("heads");if(ge<=0)throw new Error(`Unable to parse branch from url: ${h}`);const Oe=F[ge+1],yt=F.slice(ge+2).join("/");return{branch:Oe,filePath:yt===""?"/":yt,project:Ee}}function be(w,h,S,F){return`${w.gitilesBaseUrl}/${h}/+/refs/heads/${S}/${(0,l.trimStart)(F,"/")}`}function Le(w){return w.password?"/a/":"/"}function Ce(w,h){const{branch:S,project:F}=ce(w,h);return`${w.baseUrl}${Le(w)}projects/${encodeURIComponent(F)}/branches/${S}`}function qe(w,h){const{project:S}=ce(w,h);return`${w.cloneUrl}${Le(w)}${S}`}function Ke(w,h){const{branch:S,filePath:F,project:W}=ce(w,h);return`${w.baseUrl}${Le(w)}projects/${encodeURIComponent(W)}/branches/${S}/files/${encodeURIComponent(F)}/content`}function vt(w){return`${w.baseUrl}${Le(w)}projects/`}function St(w){const h={};if(!w.password)return h;const S=X.from(`${w.username}:${w.password}`,"utf8");return h.Authorization=`Basic ${S.toString("base64")}`,{headers:h}}async function ut(w){const h=await w.text();if(h.startsWith(oe))try{return JSON.parse(h.slice(oe.length))}catch(S){throw new Error(`Invalid response from Gerrit: ${h.slice(0,10)} - ${S}`)}throw new Error(`Gerrit JSON body prefix missing. Found: ${h.slice(0,10)}`)}const zn=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:S,base:F,lineNumber:W}=h;let Ee;if(S.startsWith("/")){const{branch:ge,project:Oe}=ce(this.config,F);return be(this.config,Oe,ge,S)}return S?Ee=new URL(S,F):Ee=new URL(F),W&&(Ee.hash=W.toString()),Ee.toString()}resolveEditUrl(h){return h}};let Pt=zn;q(Pt,"factory",({config:h})=>{var F;const S=Z((F=h.getOptionalConfigArray("integrations.gerrit"))!=null?F:[]);return m(S.map(W=>new zn(W)),W=>W.config.host)});const Lt="github.com",Ft="https://api.github.com",Ot="https://raw.githubusercontent.com";function Wt(w){var ge,Oe;const h=(ge=w.getOptionalString("host"))!=null?ge:Lt;let S=w.getOptionalString("apiBaseUrl"),F=w.getOptionalString("rawBaseUrl");const W=w.getOptionalString("token"),Ee=(Oe=w.getOptionalConfigArray("apps"))==null?void 0:Oe.map(yt=>({appId:yt.getNumber("appId"),clientId:yt.getString("clientId"),clientSecret:yt.getString("clientSecret"),webhookSecret:yt.getString("webhookSecret"),privateKey:yt.getString("privateKey"),allowedInstallationOwners:yt.getOptionalStringArray("allowedInstallationOwners")}));if(!u(h))throw new Error(`Invalid GitHub integration config, '${h}' is not a valid host`);return S?S=(0,l.trimEnd)(S,"/"):h===Lt&&(S=Ft),F?F=(0,l.trimEnd)(F,"/"):h===Lt&&(F=Ot),{host:h,apiBaseUrl:S,rawBaseUrl:F,token:W,apps:Ee}}function Nt(w){const h=w.map(Wt);return h.some(S=>S.host===Lt)||h.push({host:Lt,apiBaseUrl:Ft,rawBaseUrl:Ot}),h}function gn(w,h,S){try{const{owner:F,name:W,ref:Ee,filepathtype:ge,filepath:Oe}=parseGitUrl(w);if(!F||!W||!Ee||ge!=="blob"&&ge!=="raw"&&ge!=="tree")throw new Error("Invalid GitHub URL or file path");const yt=Oe.replace(/^\//,"");return Zt(h,S)==="api"?`${h.apiBaseUrl}/repos/${F}/${W}/contents/${yt}?ref=${Ee}`:`${h.rawBaseUrl}/${F}/${W}/${Ee}/${yt}`}catch(F){throw new Error(`Incorrect URL: ${w}, ${F}`)}}function In(w,h){const S={};return Zt(w,h)==="api"&&(S.Accept="application/vnd.github.v3.raw"),h.token&&(S.Authorization=`token ${h.token}`),{headers:S}}function Zt(w,h){return w.apiBaseUrl&&(h.token||!w.rawBaseUrl)?"api":"raw"}var Ht=e(55912);class _e{constructor(){q(this,"tokenCache",new Map);q(this,"isNotExpired",h=>h.diff(DateTime.local(),"minutes").minutes>50)}async getOrCreateToken(h,S){const F=this.tokenCache.get(h);if(F&&this.isNotExpired(F.expiresAt))return{accessToken:F.token};const W=await S();return this.tokenCache.set(h,W),{accessToken:W.token}}}const ie={Accept:"application/vnd.github.machine-man-preview+json"};class V{constructor(h,S){q(this,"appClient");q(this,"baseUrl");q(this,"baseAuthConfig");q(this,"cache",new _e);q(this,"allowedInstallationOwners");this.allowedInstallationOwners=h.allowedInstallationOwners,this.baseUrl=S,this.baseAuthConfig={appId:h.appId,privateKey:h.privateKey.replace(/\\n/gm,`
31
+ `)},this.appClient=new Octokit({baseUrl:S,headers:ie,authStrategy:createAppAuth,auth:this.baseAuthConfig})}async getInstallationCredentials(h,S){var ge;const{installationId:F,suspended:W}=await this.getInstallationData(h);if(this.allowedInstallationOwners&&!((ge=this.allowedInstallationOwners)!=null&&ge.includes(h)))return{accessToken:void 0};if(W)throw new Error(`The GitHub application for ${h} is suspended`);const Ee=S?`${h}/${S}`:h;return this.cache.getOrCreateToken(Ee,async()=>{const Oe=await this.appClient.apps.createInstallationAccessToken({installation_id:F,headers:ie});if(S&&Oe.data.repository_selection==="selected"){const yt=new Octokit({baseUrl:this.baseUrl,auth:Oe.data.token});if(!(await yt.paginate(yt.apps.listReposAccessibleToInstallation)).repositories.some(xn=>xn.name===S))throw new Error(`The Backstage GitHub application used in the ${h} organization does not have access to a repository with the name ${S}`)}return{token:Oe.data.token,expiresAt:DateTime.fromISO(Oe.data.expires_at)}})}getInstallations(){return this.appClient.paginate(this.appClient.apps.listInstallations)}async getInstallationData(h){const F=(await this.getInstallations()).find(Ee=>{var ge,Oe;return((Oe=(ge=Ee.account)==null?void 0:ge.login)==null?void 0:Oe.toLocaleLowerCase("en-US"))===h.toLocaleLowerCase("en-US")});if(F)return{installationId:F.id,suspended:Boolean(F.suspended_by)};const W=new Error(`No app installation found for ${h} in ${this.baseAuthConfig.appId}`);throw W.name="NotFoundError",W}}class ye{constructor(h){q(this,"apps");var S,F;this.apps=(F=(S=h.apps)==null?void 0:S.map(W=>new V(W,h.apiBaseUrl)))!=null?F:[]}async getAllInstallations(){return this.apps.length?(await Promise.all(this.apps.map(S=>S.getInstallations()))).flat():[]}async getAppToken(h,S){if(this.apps.length===0)return;const F=await Promise.all(this.apps.map(Oe=>Oe.getInstallationCredentials(h,S).then(yt=>({credentials:yt,error:void 0}),yt=>({credentials:void 0,error:yt})))),W=F.find(Oe=>Oe.credentials);if(W)return W.credentials.accessToken;const ge=F.map(Oe=>Oe.error).find(Oe=>Oe.name!=="NotFoundError");if(ge)throw ge}}class Ve{constructor(h,S){this.githubAppCredentialsMux=h,this.token=S}async getCredentials(h){const S=parseGitUrl(h.url),F=S.owner||S.name,W=S.owner?S.name:void 0;let Ee="app",ge=await this.githubAppCredentialsMux.getAppToken(F,W);return ge||(Ee="token",ge=this.token),{headers:ge?{Authorization:`Bearer ${ge}`}:void 0,token:ge,type:Ee}}}q(Ve,"create",null);class tt{static fromIntegrations(h){const S=new Map;return h.github.list().forEach(F=>{const W=SingleInstanceGithubCredentialsProvider.create(F.config);S.set(F.config.host,W)}),new tt(S)}constructor(h){this.providers=h}async getCredentials(h){const S=new URL(h.url),F=this.providers.get(S.host);if(!F)throw new Error(`There is no GitHub integration that matches ${h.url}. Please add a configuration for an integration.`);return F.getCredentials(h)}}const Rn=class{constructor(h){this.integrationConfig=h}get type(){return"github"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(h){return Tt(o(h),"tree")}resolveEditUrl(h){return Tt(h,"edit")}};let nt=Rn;q(nt,"factory",({config:h})=>{var F;const S=Nt((F=h.getOptionalConfigArray("integrations.github"))!=null?F:[]);return m(S.map(W=>new Rn(W)),W=>W.config.host)});function Tt(w,h){return w.replace(/\/\/([^/]+)\/([^/]+)\/([^/]+)\/(blob|tree|edit)\//,(S,F,W,Ee)=>`//${F}/${W}/${Ee}/${h}/`)}const jt="gitlab.com",mn="https://gitlab.com/api/v4";function sn(w){const h=w.getString("host");let S=w.getOptionalString("apiBaseUrl");const F=w.getOptionalString("token");let W=w.getOptionalString("baseUrl");if(S?S=(0,l.trimEnd)(S,"/"):h===jt&&(S=mn),W?W=(0,l.trimEnd)(W,"/"):W=`https://${h}`,u(h)){if(!S||!A(S))throw new Error(`Invalid GitLab integration config, '${S}' is not a valid apiBaseUrl`);if(!A(W))throw new Error(`Invalid GitLab integration config, '${W}' is not a valid baseUrl`)}else throw new Error(`Invalid GitLab integration config, '${h}' is not a valid host`);return{host:h,token:F,apiBaseUrl:S,baseUrl:W}}function N(w){const h=w.map(sn);return h.some(S=>S.host===jt)||h.push({host:jt,apiBaseUrl:mn,baseUrl:`https://${jt}`}),h}function te(w){let h="";return w.host!==jt&&(h=new URL(w.baseUrl).pathname),trimEnd(h,"/")}var pe=e(10179);async function re(w,h){if(w.includes("/-/blob/")){const S=await ct(w,h);return At(w,S,h).toString()}return lt(w).toString()}function Ie(w){const{token:h=""}=w;return{headers:{"PRIVATE-TOKEN":h}}}function lt(w){try{const h=new URL(w),S=h.pathname.split("/").filter(Boolean),F=S.indexOf("blob",2);if(F<2||F===S.length-1)throw new InputError("Wrong GitLab URL");const W=S.slice(0,F),Ee=S.slice(F+1);if(!Ee.join("/").match(/\.(yaml|yml)$/))throw new InputError("Wrong GitLab URL");return h.pathname=[...W,"raw",...Ee].join("/"),h}catch(h){throw new InputError(`Incorrect url: ${w}, ${h}`)}}function At(w,h,S){try{const F=new URL(w),W=F.pathname.split("/-/blob/")[1],[Ee,...ge]=W.split("/"),Oe=getGitLabIntegrationRelativePath(S);return F.pathname=[...Oe?[Oe]:[],"api/v4/projects",h,"repository/files",encodeURIComponent(decodeURIComponent(ge.join("/"))),"raw"].join("/"),F.search=`?ref=${Ee}`,F}catch(F){throw new Error(`Incorrect url: ${w}, ${F}`)}}async function ct(w,h){const S=new URL(w);if(!S.pathname.includes("/-/blob/"))throw new Error("Please provide full path to yaml file from GitLab");try{let F=S.pathname.split("/-/blob/")[0];const W=getGitLabIntegrationRelativePath(h);W&&(F=F.replace(W,""));const Ee=new URL(`${S.origin}${W}/api/v4/projects/${encodeURIComponent(F.replace(/^\//,""))}`),ge=await fetch(Ee.toString(),Ie(h)),Oe=await ge.json();if(!ge.ok)throw new Error(`GitLab Error '${Oe.error}', ${Oe.error_description}`);return Number(Oe.id)}catch(F){throw new Error(`Could not get GitLab project ID for: ${w}, ${F}`)}}const Ln=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 tn(h,"edit")}};let Ut=Ln;q(Ut,"factory",({config:h})=>{var F;const S=N((F=h.getOptionalConfigArray("integrations.gitlab"))!=null?F:[]);return m(S.map(W=>new Ln(W)),W=>W.config.host)});function tn(w,h){return w.replace(/\/\-\/(blob|tree|edit)\//,`/-/${h}/`)}class $t{constructor(h){q(this,"byType");this.byType=h}static fromConfig(h){return new $t({awsS3:g.factory({config:h}),azure:B.factory({config:h}),bitbucket:ze.factory({config:h}),bitbucketCloud:me.factory({config:h}),bitbucketServer:ue.factory({config:h}),gerrit:Pt.factory({config:h}),github:nt.factory({config:h}),gitlab:Ut.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(S=>S.byUrl(h)).find(Boolean)}byHost(h){return Object.values(this.byType).map(S=>S.byHost(h)).find(Boolean)}resolveUrl(h){const S=this.byUrl(h.base);return S?S.resolveUrl(h):o(h)}resolveEditUrl(h){const S=this.byUrl(h);return S?S.resolveEditUrl(h):h}}},90775:function(ee,s,e){"use strict";var r={};e.r(r),e.d(r,{TechDocsPlugin:function(){return A.plugin}});var t=e(2784),l=e(47093),u=e(10289),A=e(82250),m=e(26136),o=e(49208),c=e(36964),f=e(68099);const y=[(0,c.createApiFactory)({api:c.discoveryApiRef,deps:{configApi:c.configApiRef},factory:({configApi:L})=>o.UrlPatternDiscovery.compile(`${L.getString("backend.baseUrl")}/api/{{ pluginId }}`)}),(0,c.createApiFactory)({api:c.alertApiRef,deps:{},factory:()=>new o.AlertApiForwarder}),(0,c.createApiFactory)({api:c.analyticsApiRef,deps:{},factory:()=>new o.NoOpAnalyticsApi}),(0,c.createApiFactory)({api:c.errorApiRef,deps:{alertApi:c.alertApiRef},factory:({alertApi:L})=>{const k=new o.ErrorAlerter(L,new o.ErrorApiForwarder);return o.UnhandledErrorForwarder.forward(k,{hidden:!1}),k}}),(0,c.createApiFactory)({api:c.storageApiRef,deps:{errorApi:c.errorApiRef},factory:({errorApi:L})=>o.WebStorage.create({errorApi:L})}),(0,c.createApiFactory)({api:c.fetchApiRef,deps:{configApi:c.configApiRef,identityApi:c.identityApiRef,discoveryApi:c.discoveryApiRef},factory:({configApi:L,identityApi:k,discoveryApi:de})=>(0,o.createFetchApi)({middleware:[o.FetchMiddlewares.resolvePluginProtocol({discoveryApi:de}),o.FetchMiddlewares.injectIdentityAuth({identityApi:k,config:L})]})}),(0,c.createApiFactory)({api:c.oauthRequestApiRef,deps:{},factory:()=>new o.OAuthRequestManager}),(0,c.createApiFactory)({api:c.googleAuthApiRef,deps:{discoveryApi:c.discoveryApiRef,oauthRequestApi:c.oauthRequestApiRef,configApi:c.configApiRef},factory:({discoveryApi:L,oauthRequestApi:k,configApi:de})=>o.GoogleAuth.create({discoveryApi:L,oauthRequestApi:k,environment:de.getOptionalString("auth.environment")})}),(0,c.createApiFactory)({api:c.microsoftAuthApiRef,deps:{discoveryApi:c.discoveryApiRef,oauthRequestApi:c.oauthRequestApiRef,configApi:c.configApiRef},factory:({discoveryApi:L,oauthRequestApi:k,configApi:de})=>o.MicrosoftAuth.create({discoveryApi:L,oauthRequestApi:k,environment:de.getOptionalString("auth.environment")})}),(0,c.createApiFactory)({api:c.githubAuthApiRef,deps:{discoveryApi:c.discoveryApiRef,oauthRequestApi:c.oauthRequestApiRef,configApi:c.configApiRef},factory:({discoveryApi:L,oauthRequestApi:k,configApi:de})=>o.GithubAuth.create({discoveryApi:L,oauthRequestApi:k,defaultScopes:["read:user"],environment:de.getOptionalString("auth.environment")})}),(0,c.createApiFactory)({api:c.oktaAuthApiRef,deps:{discoveryApi:c.discoveryApiRef,oauthRequestApi:c.oauthRequestApiRef,configApi:c.configApiRef},factory:({discoveryApi:L,oauthRequestApi:k,configApi:de})=>o.OktaAuth.create({discoveryApi:L,oauthRequestApi:k,environment:de.getOptionalString("auth.environment")})}),(0,c.createApiFactory)({api:c.gitlabAuthApiRef,deps:{discoveryApi:c.discoveryApiRef,oauthRequestApi:c.oauthRequestApiRef,configApi:c.configApiRef},factory:({discoveryApi:L,oauthRequestApi:k,configApi:de})=>o.GitlabAuth.create({discoveryApi:L,oauthRequestApi:k,environment:de.getOptionalString("auth.environment")})}),(0,c.createApiFactory)({api:c.oneloginAuthApiRef,deps:{discoveryApi:c.discoveryApiRef,oauthRequestApi:c.oauthRequestApiRef,configApi:c.configApiRef},factory:({discoveryApi:L,oauthRequestApi:k,configApi:de})=>o.OneLoginAuth.create({discoveryApi:L,oauthRequestApi:k,environment:de.getOptionalString("auth.environment")})}),(0,c.createApiFactory)({api:c.bitbucketAuthApiRef,deps:{discoveryApi:c.discoveryApiRef,oauthRequestApi:c.oauthRequestApiRef,configApi:c.configApiRef},factory:({discoveryApi:L,oauthRequestApi:k,configApi:de})=>o.BitbucketAuth.create({discoveryApi:L,oauthRequestApi:k,defaultScopes:["team"],environment:de.getOptionalString("auth.environment")})}),(0,c.createApiFactory)({api:c.atlassianAuthApiRef,deps:{discoveryApi:c.discoveryApiRef,oauthRequestApi:c.oauthRequestApiRef,configApi:c.configApiRef},factory:({discoveryApi:L,oauthRequestApi:k,configApi:de})=>o.AtlassianAuth.create({discoveryApi:L,oauthRequestApi:k,environment:de.getOptionalString("auth.environment")})}),(0,c.createApiFactory)({api:f.RV,deps:{discovery:c.discoveryApiRef,identity:c.identityApiRef,config:c.configApiRef},factory:({config:L,discovery:k,identity:de})=>f.iM.create({config:L,discovery:k,identity:de})})];var g=e(77277),E=e(82339),C=e(62833);function O({children:L}){return(0,u.GV)()?t.createElement(t.Fragment,null,L):t.createElement(u.VA,null,L)}const D=()=>t.createElement(E.ErrorPage,{status:"404",statusMessage:"PAGE NOT FOUND"}),U=({step:L,error:k})=>{let de="";return L==="load-config"?de=`The configuration failed to load, someone should have a look at this error: ${k.message}`:L==="load-chunk"&&(de=`Lazy loaded chunk failed to load, try to reload the page: ${k.message}`),t.createElement(O,null,t.createElement(E.ErrorPage,{status:"501",statusMessage:de}))},B=({error:L,resetError:k,plugin:de})=>t.createElement(E.ErrorPanel,{title:`Error in ${de==null?void 0:de.getId()}`,defaultExpanded:!0,error:L},t.createElement(g.Z,{variant:"outlined",onClick:k},"Retry")),b={Progress:E.Progress,Router:C.VK,NotFoundErrorPage:D,BootErrorPage:U,ErrorBoundaryFallback:B};var I=e(43642),x=e(80079),M=e(90941),K=e(32915),le=e(40562),fe=e(21853),Ae=e(60744),xe=e(66569),ze=e(30254),He=e(13384),Se=e(15933),Ye=e(58838),rt=e(86737),It=e(4989),Et=e(44407),Pe=e(18628),mt=e(84219),Xe=e(98685),se=e(39781);const me={brokenImage:x.Z,catalog:Pe.Z,scaffolder:K.Z,techdocs:le.Z,search:fe.Z,chat:Ae.Z,dashboard:xe.Z,docs:ze.Z,email:He.Z,github:Ye.Z,group:mt.Z,help:rt.Z,"kind:api":Se.Z,"kind:component":Et.Z,"kind:domain":I.Z,"kind:group":mt.Z,"kind:location":It.Z,"kind:system":M.Z,"kind:user":Xe.Z,user:Xe.Z,warning:se.Z};var we=e(73689),$e=e(48032);const je={wave:`url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='1368' height='400' fill='none'%3e%3cmask id='a' width='1368' height='401' x='0' y='0' maskUnits='userSpaceOnUse'%3e%3cpath fill='url(%23paint0_linear)' d='M437 116C223 116 112 0 112 0h1256v400c-82 0-225-21-282-109-112-175-436-175-649-175z'/%3e%3cpath fill='url(%23paint1_linear)' d='M1368 400V282C891-29 788 40 711 161 608 324 121 372 0 361v39h1368z'/%3e%3cpath fill='url(%23paint2_linear)' d='M1368 244v156H0V94c92-24 198-46 375 0l135 41c176 51 195 109 858 109z'/%3e%3cpath fill='url(%23paint3_linear)' d='M1252 400h116c-14-7-35-14-116-16-663-14-837-128-1013-258l-85-61C98 28 46 8 0 0v400h1252z'/%3e%3c/mask%3e%3cg mask='url(%23a)'%3e%3cpath fill='white' d='M-172-98h1671v601H-172z'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient id='paint0_linear' x1='602' x2='1093.5' y1='-960.5' y2='272' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint1_linear' x1='482' x2='480' y1='1058.5' y2='70.5' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint2_linear' x1='424' x2='446.1' y1='-587.5' y2='274.6' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint3_linear' x1='587' x2='349' y1='-1120.5' y2='341' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e")`,wave2:`url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='1368' height='400' fill='none'%3e%3cmask id='a' width='1764' height='479' x='-229' y='-6' maskUnits='userSpaceOnUse'%3e%3cpath fill='url(%23paint0_linear)' d='M0 400h1350C1321 336 525 33 179-2c-345-34-395 236-408 402H0z'/%3e%3cpath fill='url(%23paint1_linear)' d='M1378 177v223H0V217s219 75 327 52C436 246 717-35 965 45s254 144 413 132z'/%3e%3cpath fill='url(%23paint2_linear)' d='M26 400l-78-16c-170 205-44-6-137-30l-4-1 4 1 137 30c37-45 89-110 159-201 399-514-45 238 1176-50 275-65 354-39 91 267H26z'/%3e%3c/mask%3e%3cg mask='url(%23a)'%3e%3cpath fill='white' d='M0 0h1368v400H0z'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient id='paint0_linear' x1='431' x2='397.3' y1='-599' y2='372.8' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint1_linear' x1='236.5' x2='446.6' y1='-586' y2='381.5' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint2_linear' x1='851.8' x2='640.4' y1='-867.2' y2='363.7' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e")`,round:`url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='1368' height='400' fill='none'%3e%3cmask id='a' width='2269' height='1408' x='-610' y='-509' maskUnits='userSpaceOnUse'%3e%3ccircle cx='1212.8' cy='74.8' r='317.5' fill='url(%23paint0_linear)' transform='rotate(-52 1213 75)'/%3e%3ccircle cx='737.8' cy='445.8' r='317.5' fill='url(%23paint1_linear)' transform='rotate(-116 738 446)'/%3e%3ccircle cx='601.8' cy='52.8' r='418.6' fill='url(%23paint2_linear)' transform='rotate(-117 602 53)'/%3e%3ccircle cx='999.8' cy='364' r='389.1' fill='url(%23paint3_linear)' transform='rotate(31 1000 364)'/%3e%3cellipse cx='-109.2' cy='263.5' fill='url(%23paint4_linear)' rx='429.2' ry='465.8' transform='rotate(-85 -109 264)'/%3e%3c/mask%3e%3cg mask='url(%23a)'%3e%3cpath fill='white' d='M0 0h1368v400H0z'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient id='paint0_linear' x1='1301.2' x2='161.4' y1='-1879.7' y2='-969.6' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint1_linear' x1='826.2' x2='-313.6' y1='-1508.7' y2='-598.6' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint2_linear' x1='718.4' x2='-784.3' y1='-2524' y2='-1324.2' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint3_linear' x1='1108.2' x2='-288.6' y1='-2031.1' y2='-915.9' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint4_linear' x1='10.4' x2='-1626.5' y1='-2603.8' y2='-1399.5' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e")`},it={darkGrey:["#171717","#383838"],marineBlue:["#006D8F","#0049A1"],veryBlue:["#0027AF","#270094"],rubyRed:["#98002B","#8D1134"],toastyOrange:["#BE2200","#A41D00"],purpleSky:["#8912CA","#3E00EA"],eveningSea:["#00FFF2","#035355"],teal:["#005B4B"],pinkSea:["#C8077A","#C2297D"],greens:["#4BB8A5","#187656"]};function Je(L){var dt;const{colors:k,shape:de,options:Fe}=L,gt=`linear-gradient(90deg, ${(k.length===1?[k[0],k[0]]:k).join(", ")})`,Rt=`${de}, ${gt}`,Dt=(dt=Fe==null?void 0:Fe.fontColor)!=null?dt:"#FFFFFF";return{colors:k,shape:de,backgroundImage:Rt,fontColor:Dt}}const Ct={home:Je({colors:it.teal,shape:je.wave}),documentation:Je({colors:it.pinkSea,shape:je.wave2}),tool:Je({colors:it.purpleSky,shape:je.round}),service:Je({colors:it.marineBlue,shape:je.wave}),website:Je({colors:it.veryBlue,shape:je.wave}),library:Je({colors:it.rubyRed,shape:je.wave}),other:Je({colors:it.darkGrey,shape:je.wave}),app:Je({colors:it.toastyOrange,shape:je.wave}),apis:Je({colors:it.teal,shape:je.wave2}),card:Je({colors:it.greens,shape:je.wave})},ae=16,ue='"Helvetica Neue", Helvetica, Roboto, Arial, sans-serif';function Qe(L){const{palette:k,htmlFontSize:de=ae,fontFamily:Fe=ue,defaultPageTheme:et,pageTheme:gt=Ct}=L;if(!gt[et])throw new Error(`${et} is not defined in pageTheme.`);return{palette:k,props:{MuiGrid:{spacing:2},MuiSwitch:{color:"primary"}},typography:{htmlFontSize:de,fontFamily:Fe,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[et],getPageTheme:({themeId:Rt})=>{var Dt;return(Dt=gt[Rt])!=null?Dt:gt[et]}}}function Ge(L){return{MuiCssBaseline:{"@global":{html:{height:"100%",fontFamily:L.typography.fontFamily},body:{height:"100%",fontFamily:L.typography.fontFamily,"overscroll-behavior-y":"none"},a:{color:"inherit",textDecoration:"none"}}},MuiTableRow:{root:{"&:nth-of-type(odd)":{backgroundColor:L.palette.background.default}},hover:{"&:hover":{cursor:"pointer"}},head:{"&:nth-of-type(odd)":{backgroundColor:L.palette.background.paper}}},MuiTableCell:{root:{wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:L.spacing(3,2,3,2.5),borderBottom:0},sizeSmall:{padding:L.spacing(1.5,2,1.5,2.5)},head:{wordBreak:"break-word",overflow:"hidden",color:"rgb(179, 179, 179)",fontWeight:"normal",lineHeight:"1"}},MuiTabs:{root:{minHeight:24}},MuiTab:{root:{color:L.palette.link,minHeight:24,textTransform:"initial",letterSpacing:"0.07em","&:hover":{color:(0,$e.darken)(L.palette.link,.3),background:(0,$e.lighten)(L.palette.link,.95)},[L.breakpoints.up("md")]:{minWidth:120,fontSize:L.typography.pxToRem(14),fontWeight:500}},textColorPrimary:{color:L.palette.link}},MuiTableSortLabel:{root:{color:"inherit","&:hover":{color:"inherit"},"&:focus":{color:"inherit"}},active:{fontWeight:"bold",color:"inherit"}},MuiListItemText:{dense:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},MuiButton:{text:{padding:void 0}},MuiChip:{root:{backgroundColor:"#D9D9D9",marginRight:L.spacing(1),marginBottom:L.spacing(1),color:L.palette.grey[900]},outlined:{color:L.palette.text.primary},label:{lineHeight:`${L.spacing(2.5)}px`,fontWeight:L.typography.fontWeightMedium,fontSize:`${L.spacing(1.75)}px`},labelSmall:{fontSize:`${L.spacing(1.5)}px`},deleteIcon:{color:L.palette.grey[500],width:`${L.spacing(3)}px`,height:`${L.spacing(3)}px`,margin:`0 ${L.spacing(.75)}px 0 -${L.spacing(.75)}px`},deleteIconSmall:{width:`${L.spacing(2)}px`,height:`${L.spacing(2)}px`,margin:`0 ${L.spacing(.5)}px 0 -${L.spacing(.5)}px`}},MuiCard:{root:{display:"flex",flexDirection:"column"}},MuiCardHeader:{root:{paddingBottom:0}},MuiCardContent:{root:{flexGrow:1,"&:last-child":{paddingBottom:void 0}}},MuiCardActions:{root:{justifyContent:"flex-end"}}}}function Ue(L){const k=Qe(L),de=(0,we.Z)(k),Fe=Ge(de);return{...de,overrides:Fe}}var at=e(34505);const Q=Ue({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:at.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=Ue({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:at.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 X=e(98192),oe=e(15222),ce=e(41547),be=e(87561);const Le=[{id:"light",title:"Light Theme",variant:"light",icon:t.createElement(oe.Z,null),Provider:({children:L})=>t.createElement(ce.Z,{theme:Q},t.createElement(be.ZP,null,L))},{id:"dark",title:"Dark Theme",variant:"dark",icon:t.createElement(X.Z,null),Provider:({children:L})=>t.createElement(ce.Z,{theme:Z},t.createElement(be.ZP,null,L))}];function Ce(L){var k,de,Fe;return(0,o.createSpecializedApp)({...L,apis:(k=L==null?void 0:L.apis)!=null?k:[],bindRoutes:L==null?void 0:L.bindRoutes,components:{...b,...L==null?void 0:L.components},configLoader:L==null?void 0:L.configLoader,defaultApis:y,icons:{...me,...L==null?void 0:L.icons},plugins:(de=L==null?void 0:L.plugins)!=null?de:[],themes:(Fe=L==null?void 0:L.themes)!=null?Fe:Le})}var qe=e(82394),Ke=e.n(qe),vt=e(48023),St=e(76635);async function ut({storageApi:L}){var gt;const k=L.forBucket("settings"),de=L.forBucket("starredEntities"),Fe=k.snapshot("starredEntities").value;if(!(0,St.isArray)(Fe))return;const et=new Set((gt=de.snapshot("entityRefs").value)!=null?gt:[]);Fe.filter(St.isString).map(Rt=>Rt.split(":")).filter(Rt=>Rt.length===4&&Rt[0]==="entity").map(([Rt,Dt,dt,Vt])=>(0,vt.eE)({kind:Dt,namespace:dt,name:Vt})).forEach(Rt=>et.add(Rt)),await de.set("entityRefs",Array.from(et)),await k.remove("starredEntities")}class Pt{constructor(k){q(this,"settingsStore");q(this,"starredEntities");q(this,"subscribers",new Set);q(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:Fe=>{var et;this.starredEntities=new Set((et=Fe.value)!=null?et:[]),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 Lt=e(39398),Ft=e(49782),Ot=e(79692),Wt=e(74450);const Nt=(0,Ot.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",wordBreak:"break-all",marginBottom:"1rem"}});function gn(L){var gt,Rt;const k=L.result,de=Nt(),Fe=useAnalytics(),et=()=>{Fe.captureEvent("discover",k.title,{attributes:{to:k.location},value:L.rank})};return React.createElement(Link,{noTrack:!0,to:k.location,onClick:et},React.createElement(ListItem,{alignItems:"flex-start"},L.icon&&React.createElement(ListItemIcon,null,L.icon),React.createElement("div",{className:de.flexContainer},React.createElement(ListItemText,{className:de.itemText,primaryTypographyProps:{variant:"h6"},primary:(gt=L.highlight)!=null&&gt.fields.title?React.createElement(HighlightedSearchResultText,{text:L.highlight.fields.title,preTag:L.highlight.preTag,postTag:L.highlight.postTag}):k.title,secondary:(Rt=L.highlight)!=null&&Rt.fields.text?React.createElement(HighlightedSearchResultText,{text:L.highlight.fields.text,preTag:L.highlight.preTag,postTag:L.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 In=e(30097),Zt=e(17429),Ht=e(95544),_e=e(99688),ie=e(12231),V=e(86136),ye=e(49378),Ve=e(85256),tt=e(61837),nt=e(79784),Tt=e(50758),jt=e(31654),mn=e(43054),sn=e(40749);const N="catalog-entity",te=(0,sn.J$)({name:"catalog.entity.read",attributes:{action:"read"},resourceType:N}),pe=(0,sn.J$)({name:"catalog.entity.create",attributes:{action:"create"}}),re=(0,sn.J$)({name:"catalog.entity.delete",attributes:{action:"delete"},resourceType:N}),Ie=(0,sn.J$)({name:"catalog.entity.refresh",attributes:{action:"update"},resourceType:N}),lt=(0,sn.J$)({name:"catalog.location.read",attributes:{action:"read"}}),At=(0,sn.J$)({name:"catalog.location.create",attributes:{action:"create"}}),ct=(0,sn.J$)({name:"catalog.location.delete",attributes:{action:"delete"}});var Ut=e(49166);function tn(L){var dt;const{unregisterEntityOptions:k,isUnregisterAllowed:de,onUnregisterEntity:Fe,onClose:et}=L,gt=typeof(k==null?void 0:k.disableUnregister)=="boolean",Rt=(dt=!de||(gt?!!(k!=null&&k.disableUnregister):(k==null?void 0:k.disableUnregister)==="disable"))!=null?dt:!1;let Dt=t.createElement(t.Fragment,null);return(k==null?void 0:k.disableUnregister)!=="hidden"&&(Dt=t.createElement(ie.Z,{onClick:()=>{et(),Fe()},disabled:Rt},t.createElement(V.Z,null,t.createElement(Ut.Z,{fontSize:"small"})),t.createElement(ye.Z,{primary:"Unregister entity"}))),t.createElement(t.Fragment,null,Dt)}const $t=(0,Ot.Z)(L=>({button:{color:L.page.fontColor}}),{name:"PluginCatalogEntityContextMenu"});function ht(L){const{UNSTABLE_extraContextMenuItems:k,UNSTABLE_contextMenuOptions:de,onUnregisterEntity:Fe,onInspectEntity:et}=L,[gt,Rt]=(0,t.useState)(),Dt=$t(),Vt=(0,Zt.useEntityPermission)(re).allowed,R=H=>{Rt(H.currentTarget)},T=()=>{Rt(void 0)},$=k&&[...k.map(H=>t.createElement(ie.Z,{key:H.title,onClick:()=>{T(),H.onClick()}},t.createElement(V.Z,null,t.createElement(H.Icon,{fontSize:"small"})),t.createElement(ye.Z,{primary:H.title}))),t.createElement(Ve.Z,{key:"the divider is here!"})];return t.createElement(t.Fragment,null,t.createElement(tt.Z,{"aria-label":"more","aria-controls":"long-menu","aria-haspopup":"true","aria-expanded":!!gt,role:"button",onClick:R,"data-testid":"menu-button",className:Dt.button,id:"long-menu"},t.createElement(mn.Z,null)),t.createElement(nt.ZP,{open:Boolean(gt),onClose:T,anchorEl:gt,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},"aria-labelledby":"long-menu"},t.createElement(Tt.Z,null,$,t.createElement(tn,{unregisterEntityOptions:de,isUnregisterAllowed:Vt,onUnregisterEntity:Fe,onClose:T}),t.createElement(ie.Z,{onClick:()=>{T(),et()}},t.createElement(V.Z,null,t.createElement(jt.Z,{fontSize:"small"})),t.createElement(ye.Z,{primary:"Inspect entity"})))))}const kt="plugin.catalog.entityLayoutRoute",rn=()=>null;(0,c.attachComponentData)(rn,kt,!0),(0,c.attachComponentData)(rn,"core.gatherMountPoints",!0);function Yt(L){const{entity:k,title:de}=L;return t.createElement(Ht.Z,{display:"inline-flex",alignItems:"center",height:"1em",maxWidth:"100%"},t.createElement(Ht.Z,{component:"span",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},de),k&&t.createElement(Zt.FavoriteEntity,{entity:k}))}function Xt(L,k,de,Fe){var Dt,dt,Vt,R,T;const et=(Dt=L!=null?L:Fe==null?void 0:Fe.kind)!=null?Dt:"",gt=(dt=k!=null?k:Fe==null?void 0:Fe.metadata.namespace)!=null?dt:"";return{headerTitle:`${(T=(R=(Vt=Fe==null?void 0:Fe.metadata.title)!=null?Vt:de)!=null?R:Fe==null?void 0:Fe.metadata.name)!=null?T:""}${gt&&gt!==vt.zG?` in ${gt}`:""}`,headerType:(()=>{let $=et.toLocaleLowerCase("en-US");return Fe&&Fe.spec&&"type"in Fe.spec&&($+=" \u2014 ",$+=Fe.spec.type.toLocaleLowerCase("en-US")),$})()}}function ln(L){var Fe;const{entity:k}=L,de=(0,Zt.getEntityRelations)(k,vt.S4);return t.createElement(t.Fragment,null,de.length>0&&t.createElement(E.HeaderLabel,{label:"Owner",value:t.createElement(Zt.EntityRefLinks,{entityRefs:de,defaultKind:"Group",color:"inherit"})}),((Fe=k.spec)==null?void 0:Fe.lifecycle)&&t.createElement(E.HeaderLabel,{label:"Lifecycle",value:k.spec.lifecycle}))}const qt=L=>{var Ze,ke,xt;const{UNSTABLE_extraContextMenuItems:k,UNSTABLE_contextMenuOptions:de,children:Fe,NotFoundComponent:et}=L,{kind:gt,namespace:Rt,name:Dt}=(0,c.useRouteRefParams)(Zt.entityRouteRef),{entity:dt,loading:Vt,error:R}=(0,Zt.useAsyncEntity)(),T=(0,u.TH)(),$=(0,c.useElementFilter)(Fe,ot=>ot.selectByComponentData({key:kt,withStrictError:"Child of EntityLayout must be an EntityLayout.Route"}).getElements().flatMap(({props:We})=>{if(dt){if(We.if&&!We.if(dt))return[]}else return[];return[{path:We.path,title:We.title,children:We.children,tabProps:We.tabProps}]}),[dt]),{headerTitle:H,headerType:Y}=Xt(gt,Rt,Dt,dt),[J,he]=(0,t.useState)(!1),[Re,De]=(0,t.useState)(!1),Be=(0,u.s0)(),Ne=async()=>{he(!1),De(!1),Be("/")};return(0,t.useEffect)(()=>{he(!1),De(!1)},[T.pathname]),t.createElement(E.Page,{themeId:(xt=(ke=(Ze=dt==null?void 0:dt.spec)==null?void 0:Ze.type)==null?void 0:ke.toString())!=null?xt:"home"},t.createElement(E.Header,{title:t.createElement(Yt,{title:H,entity:dt}),pageTitleOverride:H,type:Y},dt&&t.createElement(t.Fragment,null,t.createElement(ln,{entity:dt}),t.createElement(ht,{UNSTABLE_extraContextMenuItems:k,UNSTABLE_contextMenuOptions:de,onUnregisterEntity:()=>he(!0),onInspectEntity:()=>De(!0)}))),Vt&&t.createElement(E.Progress,null),dt&&t.createElement(E.RoutedTabs,{routes:$}),R&&t.createElement(E.Content,null,t.createElement(_e.Z,{severity:"error"},R.toString())),!Vt&&!R&&!dt&&t.createElement(E.Content,null,et||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(Zt.UnregisterEntityDialog,{open:J,entity:dt,onConfirm:Ne,onClose:()=>he(!1)}),t.createElement(Zt.InspectEntityDialog,{open:Re,entity:dt,onClose:()=>De(!1)}))};qt.Route=rn;var Bt=e(10179);function zt(L){const{open:k,onClose:de,onConfirm:Fe,entity:et}=L,[gt,Rt]=useState(!1),Dt=useApi(catalogApiRef),dt=useApi(alertApiRef),Vt=async()=>{Rt(!0);try{const R=et.metadata.uid;await Dt.removeEntityByUid(R),Fe()}catch(R){assertError(R),dt.post({message:R.message})}finally{Rt(!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:Vt},"Delete"),React.createElement(Button,{onClick:de,color:"primary"},"Cancel")))}var Jt=e(47851);function pn(L){var k,de;return((de=(k=L==null?void 0:L.metadata)==null?void 0:k.annotations)==null?void 0:de["backstage.io/orphan"])==="true"}function cn(){const L=useNavigate(),k=useRouteRef(rootRouteRef),[de,Fe]=useState(!1),{entity:et}=useEntity(),gt=async()=>{Fe(!1),L(k())};return React.createElement(React.Fragment,null,React.createElement(Alert,{severity:"warning",onClick:()=>Fe(!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:et,onConfirm:gt,onClose:()=>Fe(!1)}))}var En=e(30001);const zn=L=>L.error&&L.level==="error"&&L.type===ENTITY_STATUS_CATALOG_PROCESSING_TYPE;async function Rn(L,k){return{items:(await k.getEntityAncestors({entityRef:L})).items.map(et=>{var Dt,dt;return{errors:((dt=(Dt=et.entity.status)==null?void 0:Dt.items)!=null?dt:[]).filter(zn).map(Vt=>Vt.error).filter(Vt=>Boolean(Vt)),entity:et.entity}}).filter(et=>et.errors.length>0)}}async function Ln(L,k){const de=k.apis.get(catalogApiRef);if(!de)throw new Error(`No implementation available for ${catalogApiRef}`);return(await Rn(stringifyEntityRef(L),de)).items.length>0}function w(){const{entity:L}=useEntity(),k=stringifyEntityRef(L),de=useApi(catalogApiRef),{loading:Fe,error:et,value:gt}=useAsync(async()=>Rn(k,de),[k,de]);return et?React.createElement(Box,{mb:1},React.createElement(ResponseErrorPanel,{error:et})):Fe||!gt?null:React.createElement(React.Fragment,null,gt.items.map((Rt,Dt)=>React.createElement(Box,{key:Dt,mb:1},stringifyEntityRef(L)!==stringifyEntityRef(Rt.entity)&&React.createElement(Box,{p:1},"The error below originates from"," ",React.createElement(EntityRefLink,{entityRef:Rt.entity})),Rt.errors.map((dt,Vt)=>React.createElement(ResponseErrorPanel,{key:Vt,error:dt})))))}var h=e(64279);const S="core.backstage.entitySwitch",F=L=>null;(0,c.attachComponentData)(F,S,!0);const W=L=>{var Rt,Dt;const{entity:k,loading:de}=(0,Zt.useAsyncEntity)(),Fe=(0,c.useApiHolder)(),et=(0,c.useElementFilter)(L.children,dt=>dt.selectByComponentData({key:S,withStrictError:"Child of EntitySwitch is not an EntitySwitch.Case"}).getElements().flatMap(Vt=>{var $;if(de)return[];const{if:R,children:T}=Vt.props;return k?[{if:($=R==null?void 0:R(k,{apis:Fe}))!=null?$:!0,children:T}]:[{if:R===void 0,children:T}]}),[Fe,k,de]);return et.some(dt=>typeof dt.if=="object"&&"then"in dt.if)?t.createElement(Ee,{results:et}):(Dt=(Rt=et.find(dt=>dt.if))==null?void 0:Rt.children)!=null?Dt:null};function Ee({results:L}){const{loading:k,value:de}=(0,h.default)(async()=>{var et;const Fe=L.map(async({if:gt,children:Rt})=>{try{if(await gt)return Rt}catch{}return null});return(et=(await Promise.all(Fe)).find(Boolean))!=null?et:null},[L]);return k||!de?null:de}W.Case=F;const ge=null,Oe=Zt.CatalogFilterLayout.Filters,yt=Zt.CatalogFilterLayout.Content,bt=(0,c.createPlugin)({id:"catalog",apis:[(0,c.createApiFactory)({api:Zt.catalogApiRef,deps:{discoveryApi:c.discoveryApiRef,fetchApi:c.fetchApiRef},factory:({discoveryApi:L,fetchApi:k})=>new En.MS({discoveryApi:L,fetchApi:k})}),(0,c.createApiFactory)({api:Zt.starredEntitiesApiRef,deps:{storageApi:c.storageApiRef},factory:({storageApi:L})=>new Pt({storageApi:L})})],routes:{catalogIndex:Jt._Z,catalogEntity:Zt.entityRouteRef},externalRoutes:{createComponent:Jt.yw,viewTechDoc:Jt.jU}}),On=bt.provide((0,c.createRoutableExtension)({name:"CatalogIndexPage",component:()=>e.e(7758).then(e.bind(e,7758)).then(L=>L.CatalogPage),mountPoint:Jt._Z})),xn=bt.provide((0,c.createRoutableExtension)({name:"CatalogEntityPage",component:()=>e.e(6583).then(e.bind(e,96583)).then(L=>L.CatalogEntityPage),mountPoint:Zt.entityRouteRef})),jr=bt.provide((0,c.createComponentExtension)({name:"EntityAboutCard",component:{lazy:()=>Promise.resolve().then(e.bind(e,39398)).then(L=>L.AboutCard)}})),br=bt.provide((0,c.createComponentExtension)({name:"EntityLinksCard",component:{lazy:()=>e.e(3555).then(e.bind(e,73555)).then(L=>L.EntityLinksCard)}})),Vr=bt.provide((0,c.createComponentExtension)({name:"EntityHasSystemsCard",component:{lazy:()=>e.e(390).then(e.bind(e,60390)).then(L=>L.HasSystemsCard)}})),ur=bt.provide((0,c.createComponentExtension)({name:"EntityHasComponentsCard",component:{lazy:()=>e.e(4022).then(e.bind(e,4022)).then(L=>L.HasComponentsCard)}})),Gn=bt.provide((0,c.createComponentExtension)({name:"EntityHasSubcomponentsCard",component:{lazy:()=>e.e(8792).then(e.bind(e,38792)).then(L=>L.HasSubcomponentsCard)}})),wn=bt.provide((0,c.createComponentExtension)({name:"EntityHasResourcesCard",component:{lazy:()=>e.e(1553).then(e.bind(e,11553)).then(L=>L.HasResourcesCard)}})),_n=bt.provide((0,c.createComponentExtension)({name:"EntityDependsOnComponentsCard",component:{lazy:()=>e.e(8061).then(e.bind(e,48061)).then(L=>L.DependsOnComponentsCard)}})),dr=bt.provide((0,c.createComponentExtension)({name:"EntityDependencyOfComponentsCard",component:{lazy:()=>e.e(6235).then(e.bind(e,56235)).then(L=>L.DependencyOfComponentsCard)}})),Pr=bt.provide((0,c.createComponentExtension)({name:"EntityDependsOnResourcesCard",component:{lazy:()=>e.e(9028).then(e.bind(e,59028)).then(L=>L.DependsOnResourcesCard)}})),la=bt.provide((0,c.createComponentExtension)({name:"RelatedEntitiesCard",component:{lazy:()=>e.e(2426).then(e.bind(e,62426)).then(L=>L.RelatedEntitiesCard)}}));var er=e(36356);class Ir{constructor({configApi:k,discoveryApi:de,identityApi:Fe}){q(this,"configApi");q(this,"discoveryApi");q(this,"identityApi");this.configApi=k,this.discoveryApi=de,this.identityApi=Fe}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 et=`${await this.getApiOrigin()}/${de}`,gt=await fetch(`${et.endsWith("/")?et:`${et}/`}index.html`);if(gt.status===404)throw new Error("Page not found");return gt.text()}async syncEntityDocs(k){return"cached"}async getBaseUrl(k,de,Fe){const et=await this.getApiOrigin();return new URL(k,`${et}/${Fe}`).toString()}}class Lr{constructor({configApi:k,discoveryApi:de,identityApi:Fe}){q(this,"configApi");q(this,"discoveryApi");q(this,"identityApi");this.configApi=k,this.discoveryApi=de,this.identityApi=Fe}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 sr=[(0,c.createApiFactory)({api:m.Dl,deps:{configApi:c.configApiRef,discoveryApi:c.discoveryApiRef,identityApi:c.identityApiRef},factory:({configApi:L,discoveryApi:k,identityApi:de})=>new Ir({configApi:L,discoveryApi:k,identityApi:de})}),(0,c.createApiFactory)({api:m.gT,deps:{configApi:c.configApiRef,discoveryApi:c.discoveryApiRef,identityApi:c.identityApiRef},factory:({configApi:L,discoveryApi:k,identityApi:de})=>new Lr({configApi:L,discoveryApi:k,identityApi:de})}),(0,c.createApiFactory)({api:er.q3,deps:{configApi:c.configApiRef},factory:({configApi:L})=>er.ae.fromConfig(L)})],$n={backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}},tr={backend:{baseUrl:"http://localhost:7007"},techdocs:{builder:"external"}};async function nr(){const L=await fetch("/.detect");return L.ok?(await L.text()).trim()==="techdocs-cli-server":!1}async function Gr(){const L=await(0,o.defaultConfigLoader)(),k=await nr();return[...L,{context:"detected",data:k?$n:tr}]}var fr=e(86689),mr=e(58845);const Kr=(0,Ot.Z)({svg:{width:"auto",height:30},path:{fill:"#7df3e1"}});var ir=()=>{const L=Kr();return t.createElement("svg",{className:L.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 2079.95 456.05"},t.createElement("path",{className:L.path,d:"M302.9,180a80.62,80.62,0,0,0,13.44-10.37c.8-.77,1.55-1.54,2.31-2.31a81.89,81.89,0,0,0,7.92-9.37,62.37,62.37,0,0,0,6.27-10.77,48.6,48.6,0,0,0,4.36-16.4c1.49-19.39-10-38.67-35.62-54.22L198.42,14,78.16,129.22l-78.29,75,108.6,65.9a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.8,66.42-25.69,19.16-18.36,25.52-42.12,13.7-61.87a49.69,49.69,0,0,0-6.8-8.87,89.78,89.78,0,0,0,19.28,2.15H259a85.09,85.09,0,0,0,31-5.79A80.88,80.88,0,0,0,302.9,180Zm-100.59,59.8c-19.32,18.51-50.4,21.24-75.7,5.9l-75.13-45.6,67.44-64.65,76.42,46.39C222.88,198.57,221.36,221.6,202.31,239.84Zm8.94-82.21L140.6,114.74,205,53l69.37,42.11c25.94,15.73,29.31,37.05,10.55,55A60.71,60.71,0,0,1,211.25,157.63Zm29.86,190c-19.57,18.75-46.17,29.08-74.88,29.08a123.84,123.84,0,0,1-64.11-18.19L-.13,296.51v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.85,87.85,0,0,1,241.11,347.67Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,257.52V282.2l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.68,12.88-12.35,20-27.13,19.68-41.5v-1.79A86.86,86.86,0,0,1,241.11,308.68Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,218.54v24.68l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.69,12.88-12.34,20-27.12,19.68-41.49v-1.82A87.14,87.14,0,0,1,241.11,269.7Zm83.69,25.74a94.16,94.16,0,0,1-60.19,25.86h0V348a81.6,81.6,0,0,0,51.73-22.37c14-13.38,21.15-28.11,21-42.64v-2.2A95.14,95.14,0,0,1,324.8,295.44Zm-83.69,91.21c-19.57,18.75-46.17,29.09-74.88,29.09a123.76,123.76,0,0,1-64.11-18.2L-.13,335.49v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.35,87.35,0,0,1,241.11,386.65Zm85.75-210.21c-.68.69-1.35,1.38-2.06,2.05a99.19,99.19,0,0,1-22.23,15.69,94.53,94.53,0,0,1-26.24,8.71,97.84,97.84,0,0,1-14.16,1.57c.5,1.61.9,3.25,1.25,4.9a52.7,52.7,0,0,1,1.13,12V231h.05A84.48,84.48,0,0,0,290,225.47a80.83,80.83,0,0,0,26.38-16.82c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,62.85,62.85,0,0,0,6.29-10.78,48.5,48.5,0,0,0,4.32-16.44c.09-1.23.2-2.47.19-3.7v-2c-.72,1-1.48,2.06-2.26,3.09A98,98,0,0,1,326.86,176.44Zm0,77.92c-.68.7-1.3,1.41-2,2.1a94.09,94.09,0,0,1-60.19,25.85h0V309h0a81.65,81.65,0,0,0,51.73-22.37,73.51,73.51,0,0,0,16.48-22.49,48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.48.19-3.71v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A95.81,95.81,0,0,1,326.82,254.36Zm0-39c-.68.7-1.3,1.41-2,2.1a92.22,92.22,0,0,1-10.62,8.65,93.53,93.53,0,0,1-11.63,7,95.63,95.63,0,0,1-37.94,10.18h-.05l0,26.67h0a81.63,81.63,0,0,0,51.73-22.37c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,63.16,63.16,0,0,0,6.29-10.77,48.55,48.55,0,0,0,4.32-16.45c.09-1.23.2-2.47.19-3.7v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A98.19,98.19,0,0,1,326.82,215.38Zm241-88.84q7.94,0,17.09.17t18.12,1a139.3,139.3,0,0,1,16.74,2.57,42.78,42.78,0,0,1,13.3,5.14,64.27,64.27,0,0,1,20.54,19.89Q662,168,662,186.54q0,19.54-9.49,33.78t-27.1,21.09v.68q22.78,4.82,34.87,20.58t12.08,38.4a72.62,72.62,0,0,1-4.83,26.06,65.29,65.29,0,0,1-14.33,22.46,71.57,71.57,0,0,1-23.47,15.78q-14,6-32.28,6H478.38V126.54Zm9,105.27q28,0,40.21-9.78t12.26-29.31q0-13-4.14-20.58a29.47,29.47,0,0,0-11.4-11.66A45,45,0,0,0,597,155.17a161.2,161.2,0,0,0-20.19-1.2h-65.6v77.84Zm16.57,112.13q21.74,0,34-11.66T639.59,300q0-12-4.48-19.88a34.85,34.85,0,0,0-11.91-12.52,50.14,50.14,0,0,0-17.09-6.52,105,105,0,0,0-20-1.88H511.17v84.7Zm274.79,26.74q-7.61,4.45-21.06,4.46-11.4,0-18.12-6.34t-6.74-20.75a70.17,70.17,0,0,1-28.13,20.75,97.87,97.87,0,0,1-57.65,3.6,53.51,53.51,0,0,1-18.82-8.58A41.19,41.19,0,0,1,705,348.56q-4.65-9.42-4.66-22.8,0-15.09,5.18-24.69a44.92,44.92,0,0,1,13.64-15.6,62.63,62.63,0,0,1,19.33-9.09q10.88-3.08,22.27-5.14,12.08-2.4,23-3.6a128,128,0,0,0,19.16-3.43c5.53-1.48,9.89-3.65,13.12-6.51s4.83-7,4.83-12.52q0-9.6-3.62-15.43a24.94,24.94,0,0,0-9.32-8.92,38.38,38.38,0,0,0-12.78-4.11,96.54,96.54,0,0,0-14-1q-18.63,0-31.07,7T736.6,249.29H707.26q.69-16.46,6.9-27.77a52.21,52.21,0,0,1,16.57-18.35,70,70,0,0,1,23.65-10.11A125.51,125.51,0,0,1,782.86,190a168.63,168.63,0,0,1,24,1.72,63.26,63.26,0,0,1,21.58,7A41.23,41.23,0,0,1,844,213.59q5.87,9.57,5.87,25v91q0,10.26,1.21,15.05t8.11,4.79a35.57,35.57,0,0,0,9-1.37Zm-47.64-90.87c-3.69,2.74-8.52,4.72-14.5,6s-12.26,2.27-18.82,3.07-13.17,1.71-19.85,2.73a73.7,73.7,0,0,0-18,4.94,32.62,32.62,0,0,0-12.94,9.73q-5,6.32-5,17.23a23.31,23.31,0,0,0,2.94,12.11,24.11,24.11,0,0,0,7.59,8,32,32,0,0,0,10.88,4.44,60.94,60.94,0,0,0,13.11,1.36q14.5,0,24.86-3.92a52.49,52.49,0,0,0,16.91-9.9,39.1,39.1,0,0,0,9.67-13,32.53,32.53,0,0,0,3.11-13.14ZM1002.07,225q-11.05-9.25-29.69-9.26-15.89,0-26.58,5.83A47.29,47.29,0,0,0,928.71,237a64.66,64.66,0,0,0-9.15,22.12A119.83,119.83,0,0,0,916.8,285a98.22,98.22,0,0,0,2.93,24,64.18,64.18,0,0,0,9.15,20.74,46.2,46.2,0,0,0,16.23,14.58q10,5.49,23.82,5.48,21.75,0,34-11.31t15-31.89h30q-4.83,32.91-24.68,50.75t-54,17.83q-20.37,0-36.07-6.52A69.86,69.86,0,0,1,907,350.11a79.92,79.92,0,0,1-15.88-28.63A118.64,118.64,0,0,1,885.73,285a129.41,129.41,0,0,1,5.18-37.21,85.63,85.63,0,0,1,15.71-30.17A73.46,73.46,0,0,1,933,197.35Q948.91,190,970,190a108.54,108.54,0,0,1,28.48,3.6,69.59,69.59,0,0,1,23.48,11.15,61,61,0,0,1,16.74,19q6.55,11.49,8.29,27.26h-30.38Q1013.11,234.21,1002.07,225Zm109.77-98.41v145l81.47-77.49h39.36l-70.77,64.46,75.95,112.82h-37.29l-61.1-92.59-27.62,25.38v67.21H1082.5V126.54Zm170.54,205.22a31.07,31.07,0,0,0,10.87,10.63,49,49,0,0,0,15.19,5.66,87.06,87.06,0,0,0,17.44,1.71,109.18,109.18,0,0,0,14.5-1,53.22,53.22,0,0,0,14-3.78,26.27,26.27,0,0,0,10.53-8q4.14-5.32,4.14-13.55,0-11.31-8.63-17.14a73.69,73.69,0,0,0-21.58-9.43q-12.94-3.6-28.13-6.52a146,146,0,0,1-28.14-8.23A58.16,58.16,0,0,1,1261,267.13q-8.64-9.6-8.63-26.75,0-13.38,6-23a49.26,49.26,0,0,1,15.53-15.61,71.76,71.76,0,0,1,21.4-8.91A99.41,99.41,0,0,1,1319,190a141.31,141.31,0,0,1,28,2.58,64.85,64.85,0,0,1,22.62,8.91,46.16,46.16,0,0,1,15.7,17.15q5.87,10.8,6.91,26.91h-29.35q-.69-8.57-4.48-14.23a29.36,29.36,0,0,0-9.67-9.08,44.16,44.16,0,0,0-12.94-5,67.68,67.68,0,0,0-14.33-1.54,87.29,87.29,0,0,0-13.29,1,45.28,45.28,0,0,0-12.26,3.6,24.49,24.49,0,0,0-9,6.86q-3.46,4.29-3.46,11.14a16.32,16.32,0,0,0,5.36,12.52,42.75,42.75,0,0,0,13.63,8.23,120,120,0,0,0,18.64,5.48q10.37,2.24,20.72,4.63,11,2.4,21.57,5.83A70.74,70.74,0,0,1,1382,284.1a44.55,44.55,0,0,1,13.12,14.23q5,8.58,5,21.26,0,16.13-6.73,26.75a52.5,52.5,0,0,1-17.61,17.14,73.89,73.89,0,0,1-24.51,9.09,146.3,146.3,0,0,1-27.1,2.57,126.24,126.24,0,0,1-28.31-3.09A69.56,69.56,0,0,1,1272,361.94a51.74,51.74,0,0,1-16.57-18.52q-6.21-11.49-6.9-27.95h29.34A32.65,32.65,0,0,0,1282.38,331.76Zm226.46-137.67v25.72h-35.56V329.88a31.37,31.37,0,0,0,.87,8.23,8.42,8.42,0,0,0,3.28,4.8,14.61,14.61,0,0,0,6.73,2.23,99.19,99.19,0,0,0,11.22.51h13.46v25.72H1486.4a105.8,105.8,0,0,1-19.5-1.55,28.65,28.65,0,0,1-13.12-5.65,24.09,24.09,0,0,1-7.42-11.66q-2.43-7.54-2.42-19.89V219.81h-30.38V194.09h30.38V140.94h29.34v53.15ZM1699.4,370.68q-7.61,4.45-21.06,4.46-11.4,0-18.12-6.34t-6.74-20.75a70.17,70.17,0,0,1-28.13,20.75,97.87,97.87,0,0,1-57.65,3.6,53.51,53.51,0,0,1-18.82-8.58,41.19,41.19,0,0,1-12.6-15.26q-4.65-9.42-4.66-22.8,0-15.09,5.18-24.69a44.92,44.92,0,0,1,13.64-15.6,62.63,62.63,0,0,1,19.33-9.09q10.88-3.08,22.27-5.14,12.07-2.4,23-3.6a128,128,0,0,0,19.16-3.43c5.53-1.48,9.89-3.65,13.12-6.51s4.83-7,4.83-12.52q0-9.6-3.62-15.43a24.94,24.94,0,0,0-9.32-8.92,38.38,38.38,0,0,0-12.78-4.11,96.54,96.54,0,0,0-14-1q-18.63,0-31.07,7t-13.46,26.57h-29.34q.67-16.46,6.9-27.77A52.21,52.21,0,0,1,1562,203.17a70,70,0,0,1,23.65-10.11,125.51,125.51,0,0,1,28.48-3.09,168.63,168.63,0,0,1,24,1.72,63.26,63.26,0,0,1,21.58,7,41.23,41.23,0,0,1,15.53,14.89q5.87,9.57,5.87,25v91q0,10.26,1.21,15.05t8.11,4.79a35.57,35.57,0,0,0,9-1.37Zm-47.64-90.87c-3.69,2.74-8.52,4.72-14.5,6s-12.26,2.27-18.82,3.07-13.17,1.71-19.85,2.73a73.7,73.7,0,0,0-17.95,4.94,32.62,32.62,0,0,0-12.94,9.73q-5,6.32-5,17.23a23.31,23.31,0,0,0,2.94,12.11,24.11,24.11,0,0,0,7.59,8,32,32,0,0,0,10.88,4.44,60.94,60.94,0,0,0,13.11,1.36q14.51,0,24.86-3.92a52.49,52.49,0,0,0,16.91-9.9,39.1,39.1,0,0,0,9.67-13,32.53,32.53,0,0,0,3.11-13.14Zm208.85,141.62q-20,21.6-62.83,21.6a122.11,122.11,0,0,1-25.37-2.74,78,78,0,0,1-23.48-8.92,54.41,54.41,0,0,1-17.43-16.11q-6.91-10-7.6-24.35h29.35a21.47,21.47,0,0,0,5,13.38,36.67,36.67,0,0,0,11.4,8.91,55.52,55.52,0,0,0,14.67,5,79.51,79.51,0,0,0,15.19,1.55q14.49,0,24.51-5A46,46,0,0,0,1840.59,401a56.53,56.53,0,0,0,9.49-21.09,117.46,117.46,0,0,0,2.94-27.09V341.19h-.7q-7.59,16.46-23,24.18a71.8,71.8,0,0,1-32.63,7.71q-20,0-34.86-7.2A72.88,72.88,0,0,1,1737,346.51a82.13,82.13,0,0,1-15-28.46,116.62,116.62,0,0,1-5-34.47,133.92,133.92,0,0,1,4.14-32.4A88.17,88.17,0,0,1,1735,221a75.49,75.49,0,0,1,25.55-22.29q15.87-8.75,39-8.75a66.21,66.21,0,0,1,31.07,7.38,52.13,52.13,0,0,1,22.09,22.11h.35V194.09h27.61V356.28Q1880.63,399.83,1860.61,421.43Zm-37.46-79.72a47.94,47.94,0,0,0,16.4-15.78,71.89,71.89,0,0,0,9.15-22.11,106.77,106.77,0,0,0,2.93-24.69,96.71,96.71,0,0,0-2.76-23,64,64,0,0,0-8.8-20.4,45.76,45.76,0,0,0-15.71-14.57q-9.66-5.49-23.47-5.49-14.16,0-24.17,5.32a46.77,46.77,0,0,0-16.4,14.23,60.14,60.14,0,0,0-9.32,20.57,99.69,99.69,0,0,0-2.93,24.35,120.63,120.63,0,0,0,2.42,24,67.5,67.5,0,0,0,8.28,21.77,46.37,46.37,0,0,0,15.54,15.78q9.66,6,24.16,6T1823.15,341.71Zm228,18.34q-20,15.09-50.41,15.09-21.4,0-37.11-6.86a73.16,73.16,0,0,1-26.41-19.2,81.52,81.52,0,0,1-16-29.49,141.12,141.12,0,0,1-6-37.38,106.1,106.1,0,0,1,6.21-37A88.56,88.56,0,0,1,1938.8,216a79.09,79.09,0,0,1,26.58-19.2A81.66,81.66,0,0,1,1999,190q23.82,0,39.53,9.78a78,78,0,0,1,25.2,24.86,98.18,98.18,0,0,1,13.12,32.91,140.6,140.6,0,0,1,2.93,34h-133.6a70,70,0,0,0,2.76,22.12,49.9,49.9,0,0,0,10,18.51A49.1,49.1,0,0,0,1976.6,345q10.7,4.82,25.2,4.8,18.65,0,30.55-8.57t15.71-26.06h29Q2071.18,345,2051.17,360.05Zm-7.08-113.84a50,50,0,0,0-10.7-16,53.1,53.1,0,0,0-56.62-10.63,47.48,47.48,0,0,0-15.71,10.81,51.69,51.69,0,0,0-10.35,15.94,60.18,60.18,0,0,0-4.49,19.37h102.53A59.47,59.47,0,0,0,2044.09,246.21ZM302.9,180a80.62,80.62,0,0,0,13.44-10.37c.8-.77,1.55-1.54,2.31-2.31a81.89,81.89,0,0,0,7.92-9.37,62.37,62.37,0,0,0,6.27-10.77,48.6,48.6,0,0,0,4.36-16.4c1.49-19.39-10-38.67-35.62-54.22L198.42,14,78.16,129.22l-78.29,75,108.6,65.9a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.8,66.42-25.69,19.16-18.36,25.52-42.12,13.7-61.87a49.69,49.69,0,0,0-6.8-8.87,89.78,89.78,0,0,0,19.28,2.15H259a85.09,85.09,0,0,0,31-5.79A80.88,80.88,0,0,0,302.9,180Zm-100.59,59.8c-19.32,18.51-50.4,21.24-75.7,5.9l-75.13-45.6,67.44-64.65,76.42,46.39C222.88,198.57,221.36,221.6,202.31,239.84Zm8.94-82.21L140.6,114.74,205,53l69.37,42.11c25.94,15.73,29.31,37.05,10.55,55A60.71,60.71,0,0,1,211.25,157.63Zm29.86,190c-19.57,18.75-46.17,29.08-74.88,29.08a123.84,123.84,0,0,1-64.11-18.19L-.13,296.51v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.85,87.85,0,0,1,241.11,347.67Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,257.52V282.2l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.68,12.88-12.35,20-27.13,19.68-41.5v-1.79A86.86,86.86,0,0,1,241.11,308.68Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,218.54v24.68l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.69,12.88-12.34,20-27.12,19.68-41.49v-1.82A87.14,87.14,0,0,1,241.11,269.7Zm83.69,25.74a94.16,94.16,0,0,1-60.19,25.86h0V348a81.6,81.6,0,0,0,51.73-22.37c14-13.38,21.15-28.11,21-42.64v-2.2A95.14,95.14,0,0,1,324.8,295.44Zm-83.69,91.21c-19.57,18.75-46.17,29.09-74.88,29.09a123.76,123.76,0,0,1-64.11-18.2L-.13,335.49v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.35,87.35,0,0,1,241.11,386.65Zm85.75-210.21c-.68.69-1.35,1.38-2.06,2.05a99.19,99.19,0,0,1-22.23,15.69,94.53,94.53,0,0,1-26.24,8.71,97.84,97.84,0,0,1-14.16,1.57c.5,1.61.9,3.25,1.25,4.9a52.7,52.7,0,0,1,1.13,12V231h.05A84.48,84.48,0,0,0,290,225.47a80.83,80.83,0,0,0,26.38-16.82c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,62.85,62.85,0,0,0,6.29-10.78,48.5,48.5,0,0,0,4.32-16.44c.09-1.23.2-2.47.19-3.7v-2c-.72,1-1.48,2.06-2.26,3.09A98,98,0,0,1,326.86,176.44Zm0,77.92c-.68.7-1.3,1.41-2,2.1a94.09,94.09,0,0,1-60.19,25.85h0V309h0a81.65,81.65,0,0,0,51.73-22.37,73.51,73.51,0,0,0,16.48-22.49,48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.48.19-3.71v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A95.81,95.81,0,0,1,326.82,254.36Zm0-39c-.68.7-1.3,1.41-2,2.1a92.22,92.22,0,0,1-10.62,8.65,93.53,93.53,0,0,1-11.63,7,95.63,95.63,0,0,1-37.94,10.18h-.05l0,26.67h0a81.63,81.63,0,0,0,51.73-22.37c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,63.16,63.16,0,0,0,6.29-10.77,48.55,48.55,0,0,0,4.32-16.45c.09-1.23.2-2.47.19-3.7v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A98.19,98.19,0,0,1,326.82,215.38Z"}))};const Or=(0,Ot.Z)({svg:{width:"auto",height:28},path:{fill:"#7df3e1"}});var hr=()=>{const L=Or();return t.createElement("svg",{className:L.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 337.46 428.5"},t.createElement("path",{className:L.path,d:"M303,166.05a80.69,80.69,0,0,0,13.45-10.37c.79-.77,1.55-1.53,2.3-2.3a83.12,83.12,0,0,0,7.93-9.38A63.69,63.69,0,0,0,333,133.23a48.58,48.58,0,0,0,4.35-16.4c1.49-19.39-10-38.67-35.62-54.22L198.56,0,78.3,115.23,0,190.25l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.69,19.16-18.36,25.52-42.12,13.7-61.87a49.22,49.22,0,0,0-6.8-8.87A89.17,89.17,0,0,0,259,178.29h.15a85.08,85.08,0,0,0,31-5.79A80.88,80.88,0,0,0,303,166.05ZM202.45,225.86c-19.32,18.51-50.4,21.23-75.7,5.9L51.61,186.15l67.45-64.64,76.41,46.38C223,184.58,221.49,207.61,202.45,225.86Zm8.93-82.22-70.65-42.89L205.14,39,274.51,81.1c25.94,15.72,29.31,37,10.55,55A60.69,60.69,0,0,1,211.38,143.64Zm29.86,190c-19.57,18.75-46.17,29.09-74.88,29.09a123.73,123.73,0,0,1-64.1-18.2L0,282.52v24.67L108.6,373.1a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.27,87.27,0,0,1,241.24,333.68Zm0-39c-19.57,18.75-46.17,29.08-74.88,29.08a123.81,123.81,0,0,1-64.1-18.19L0,243.53v24.68l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.5v-1.78A87.27,87.27,0,0,1,241.24,294.7Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.81,123.81,0,0,1-64.1-18.19L0,204.55v24.68l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.68,12.88-12.35,20-27.13,19.68-41.5v-1.82A86.09,86.09,0,0,1,241.24,255.71Zm83.7,25.74a94.15,94.15,0,0,1-60.2,25.86h0V334a81.6,81.6,0,0,0,51.74-22.37c14-13.38,21.14-28.11,21-42.64v-2.19A94.92,94.92,0,0,1,324.94,281.45Zm-83.7,91.21c-19.57,18.76-46.17,29.09-74.88,29.09a123.73,123.73,0,0,1-64.1-18.2L0,321.5v24.68l108.6,65.9a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.8,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A86.29,86.29,0,0,1,241.24,372.66ZM327,162.45c-.68.69-1.35,1.38-2.05,2.06a94.37,94.37,0,0,1-10.64,8.65,91.35,91.35,0,0,1-11.6,7,94.53,94.53,0,0,1-26.24,8.71,97.69,97.69,0,0,1-14.16,1.57c.5,1.61.9,3.25,1.25,4.9a53.27,53.27,0,0,1,1.14,12V217h.05a84.41,84.41,0,0,0,25.35-5.55,81,81,0,0,0,26.39-16.82c.8-.77,1.5-1.56,2.26-2.34a82.08,82.08,0,0,0,7.93-9.38A63.76,63.76,0,0,0,333,172.17a48.55,48.55,0,0,0,4.32-16.45c.09-1.23.2-2.47.19-3.7V150q-1.08,1.54-2.25,3.09A96.73,96.73,0,0,1,327,162.45Zm0,77.92c-.69.7-1.31,1.41-2,2.1a94.2,94.2,0,0,1-60.2,25.86h0l0,26.67h0a81.6,81.6,0,0,0,51.74-22.37A73.51,73.51,0,0,0,333,250.13a48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.47.19-3.71v-2.19c-.74,1.07-1.46,2.15-2.27,3.21A95.68,95.68,0,0,1,327,240.37Zm0-39c-.69.7-1.31,1.41-2,2.1a93.18,93.18,0,0,1-10.63,8.65,91.63,91.63,0,0,1-11.63,7,95.47,95.47,0,0,1-37.94,10.18h0V256h0a81.65,81.65,0,0,0,51.74-22.37c.8-.77,1.5-1.56,2.26-2.34a82.08,82.08,0,0,0,7.93-9.38A63.76,63.76,0,0,0,333,211.15a48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.48.19-3.71v-2.2c-.74,1.08-1.46,2.16-2.27,3.22A95.68,95.68,0,0,1,327,201.39Z"}))};const xr=(0,Ot.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}}),Dr=()=>{const L=xr(),{isOpen:k}=(0,E.useSidebarOpenState)();return t.createElement("div",{className:L.root},t.createElement(fr.Z,{component:C.OL,to:"/docs/default/component/local/",underline:"none",className:L.link},k?t.createElement(ir,null):t.createElement(hr,null)))},Fr=({children:L})=>t.createElement(E.SidebarPage,null,t.createElement(E.Sidebar,null,t.createElement(Dr,null),t.createElement(E.SidebarDivider,null),t.createElement(E.SidebarItem,{icon:mr.Z,to:"/docs/default/component/local",text:"Docs Preview"})),L);var gr=e(80030),Br=e(32388),pr=e(4142);const yn=(0,Ot.Z)(L=>({headerIcon:{color:L.palette.common.white,width:"32px",height:"32px"},content:{backgroundColor:L.palette.background.default},contentToolbar:{display:"flex",justifyContent:"flex-end",padding:0}}));var un;(function(L){const k="light";L.LIGHT=k;const de="dark";L.DARK=de})(un||(un={}));const kn=()=>{const L=(0,c.useApi)(c.appThemeApiRef),k=yn(),[de,Fe]=(0,t.useState)(L.getActiveThemeId()||un.LIGHT),et={[un.LIGHT]:{icon:pr.Z,title:"Dark theme"},[un.DARK]:{icon:Br.Z,title:"Light theme"}},{title:gt,icon:Rt}=et[de],Dt=()=>{Fe(dt=>{const Vt=dt===un.LIGHT?un.DARK:un.LIGHT;return L.setActiveThemeId(Vt),Vt})};return t.createElement(Ht.Z,{display:"flex",alignItems:"center",mr:2},t.createElement(gr.ZP,{title:gt,arrow:!0},t.createElement(tt.Z,{size:"small",onClick:Dt},t.createElement(Rt,{className:k.headerIcon}))))},Yn=()=>t.createElement(A.TechDocsReaderPage,null,t.createElement(A.TechDocsReaderPageHeader,null),t.createElement(A.TechDocsReaderPageContent,{withSearch:!1})),Mr=t.createElement(Yn,null),yr=Ce({apis:sr,configLoader:Gr,plugins:Object.values(r)}),wr=yr.getProvider(),Er=yr.getRouter(),$r=A.techdocsPlugin.provide((0,m.KY)({name:"ThemeToggleAddon",component:kn,location:m.oZ.Header})),vr=t.createElement(o.FlatRoutes,null,t.createElement(u.Fg,{key:"/",to:"/docs/default/component/local/"}),t.createElement(u.AW,{path:"/catalog/:namespace/:kind/:name",element:t.createElement(xn,null)}),t.createElement(u.AW,{path:"/docs",element:t.createElement(A.TechDocsIndexPage,null)},t.createElement(A.DefaultTechDocsHome,null)),t.createElement(u.AW,{path:"/docs/:namespace/:kind/:name/*",element:t.createElement(A.TechDocsReaderPage,null)},Mr,t.createElement(m.DR,null,t.createElement($r,null))));var Jr=()=>t.createElement(wr,null,t.createElement(Er,null,t.createElement(Fr,null,vr)));l.render(t.createElement(Jr,null),document.getElementById("root"))},76241:function(ee,s,e){"use strict";e.d(s,{CT:function(){return m},EI:function(){return f},uW:function(){return u},Vt:function(){return o}});function r(){return typeof window!="undefined"&&window.Math===Math?window:typeof self!="undefined"&&self.Math===Math?self:Function("return this")()}const t=r(),l=y=>`__@backstage/${y}__`;function u(y,g){const E=l(y);let C=t[E];return C||(C=g(),t[E]=C,C)}var A=e(2784);function m(y){return u(y,()=>(0,A.createContext)(void 0))}function o(y){return(0,A.useContext)(m(y))}function c(y){return{set(g){globalThis[`__@backstage/${y}__`]=createContext(createVersionedValueMap(g))},reset(){delete globalThis[`__@backstage/${y}__`]}}}function f(y){return Object.freeze(y),{atVersion(g){return y[g]}}}},17429:function(ee,s,e){"use strict";e.d(s,{AsyncEntityProvider:function(){return M},CATALOG_FILTER_EXISTS:function(){return r.n3},CatalogFilterLayout:function(){return b},EntityKindFilter:function(){return X},EntityLifecyclePicker:function(){return N},EntityListProvider:function(){return we},EntityOwnerPicker:function(){return Ie},EntityProcessingStatusPicker:function(){return dt},EntityRefLink:function(){return Q},EntityRefLinks:function(){return Z},EntityTable:function(){return ht},EntityTagPicker:function(){return Xt},EntityTypePicker:function(){return Bt},FavoriteEntity:function(){return zn},InspectEntityDialog:function(){return Mr},UnregisterEntityDialog:function(){return lr},UserListPicker:function(){return et},catalogApiRef:function(){return l},entityRouteRef:function(){return ue},getEntityRelations:function(){return mt},getEntitySourceLocation:function(){return Xe},humanizeEntityRef:function(){return Ge},starredEntitiesApiRef:function(){return u},useAsyncEntity:function(){return fe},useEntity:function(){return le},useEntityList:function(){return $e},useEntityOwnership:function(){return gn},useEntityPermission:function(){return Zt},useRelatedEntities:function(){return Pt},useStarredEntities:function(){return Ot}});var r=e(30001),t=e(36964);const l=(0,t.createApiRef)({id:"plugin.catalog.service"}),u=(0,t.createApiRef)({id:"catalog-react.starred-entities"});var A=e(82394);class m{constructor(){q(this,"starredEntities",new Set);q(this,"subscribers",new Set);q(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 $ of this.subscribers)$.next(new Set(this.starredEntities))}starredEntitie$(){return this.observable}}var o=e(2784),c=e(41156),f=e(60364),y=e(77277),g=e(4190),E=e(95544),C=e(90436),O=e(60905),D=e(36444);const U=R=>{const T=(0,c.Z)(J=>J.breakpoints.down("md")),$=(0,f.Z)(),[H,Y]=(0,o.useState)(!1);return T?o.createElement(o.Fragment,null,o.createElement(y.Z,{style:{marginTop:$.spacing(1),marginLeft:$.spacing(1)},onClick:()=>Y(!0),startIcon:o.createElement(D.Z,null)},"Filters"),o.createElement(g.ZP,{open:H,onClose:()=>Y(!1),anchor:"left",disableAutoFocus:!0,keepMounted:!0,variant:"temporary"},o.createElement(E.Z,{m:2},o.createElement(C.Z,{variant:"h6",component:"h2",style:{marginBottom:$.spacing(1)}},"Filters"),R.children))):o.createElement(O.Z,{item:!0,lg:2},R.children)},B=R=>o.createElement(O.Z,{item:!0,xs:12,lg:10},R.children),b=R=>o.createElement(O.Z,{container:!0,style:{position:"relative"}},R.children);b.Filters=U,b.Content=B;var I=e(76241);const x=(0,I.CT)("entity-context"),M=({children:R,entity:T,loading:$,error:H,refresh:Y})=>{const J={entity:T,loading:$,error:H,refresh:Y};return o.createElement(x.Provider,{value:(0,I.EI)({1:J})},R)},K=R=>React.createElement(M,{entity:R.entity,loading:!Boolean(R.entity),error:void 0,refresh:void 0,children:R.children});function le(){const R=(0,I.Vt)("entity-context");if(!R)throw new Error("Entity context is not available");const T=R.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 fe(){const R=(0,I.Vt)("entity-context");if(!R)throw new Error("Entity context is not available");const T=R.atVersion(1);if(!T)throw new Error("EntityContext v1 not available");const{entity:$,loading:H,error:Y,refresh:J}=T;return{entity:$,loading:H,error:Y,refresh:J}}var Ae=e(76635),xe=e(19126),ze=e.n(xe),He=e(10289),Se=e(69294),Ye=e(48760),rt=e(90736);function It(R){return R.reduce((T,$)=>({...T,...$.getCatalogFilters?$.getCatalogFilters():{}}),{})}function Et(R){return T=>R.every($=>!$.filterEntity||$.filterEntity(T))}var Pe=e(48023);function mt(R,T,$){var Y;let H=((Y=R==null?void 0:R.relations)==null?void 0:Y.filter(J=>J.type===T).map(J=>(0,Pe.of)(J.targetRef)))||[];return $!=null&&$.kind&&(H=H.filter(J=>J.kind.toLocaleLowerCase("en-US")===$.kind.toLocaleLowerCase("en-US"))),H}function Xe(R,T){var H;const $=(H=R.metadata.annotations)==null?void 0:H[Pe.M6];if(!!$)try{const Y=(0,Pe.Ou)($),J=T.byUrl(Y.target);return{locationTargetUrl:Y.target,integrationType:J==null?void 0:J.type}}catch{return}}function se(R,T){const $=new Set([...getEntityRelations(R,RELATION_MEMBER_OF,{kind:"group"}),...R?[getCompoundEntityRef(R)]:[]].map(stringifyEntityRef)),H=getEntityRelations(T,RELATION_OWNED_BY).map(stringifyEntityRef);for(const Y of H)if($.has(Y))return!0;return!1}const me=(0,o.createContext)(void 0),we=({children:R})=>{const T=(0,rt.default)(),$=(0,t.useApi)(l),[H,Y]=(0,o.useState)({}),J=(0,He.TH)(),he=(0,o.useMemo)(()=>{var ot;return(ot=ze().parse(J.search,{ignoreQueryPrefix:!0}).filters)!=null?ot:{}},[J]),[Re,De]=(0,o.useState)(()=>({appliedFilters:{},entities:[],backendEntities:[]})),[{loading:Be,error:Ne},Ze]=(0,Se.default)(async()=>{var Dn;const ot=(0,Ae.compact)(Object.values(H)),We=Et(ot),Qt=It(ot),hn=It((0,Ae.compact)(Object.values(Re.appliedFilters))),Jn=Object.keys(H).reduce((vn,Sn)=>{const Un=H[Sn];return Un!=null&&Un.toQueryValue&&(vn[Sn]=Un.toQueryValue()),vn},{});if((0,Ae.isEqual)(hn,Qt))De({appliedFilters:H,backendEntities:Re.backendEntities,entities:Re.backendEntities.filter(We)});else{const vn=await $.getEntities({filter:Qt});De({appliedFilters:H,backendEntities:vn.items,entities:vn.items.filter(We)})}if(T()){const vn=ze().parse(J.search,{ignoreQueryPrefix:!0}),Sn=ze().stringify({...vn,filters:Jn},{addQueryPrefix:!0,arrayFormat:"repeat"}),Un=`${window.location.pathname}${Sn}`;(Dn=window.history)==null||Dn.replaceState(null,document.title,Un)}},[$,he,H,Re],{loading:!0});(0,Ye.Z)(Ze,10,[H]);const ke=(0,o.useCallback)(ot=>{Y(We=>{const Qt=typeof ot=="function"?ot(We):ot;return{...We,...Qt}})},[]),xt=(0,o.useMemo)(()=>({filters:Re.appliedFilters,entities:Re.entities,backendEntities:Re.backendEntities,updateFilters:ke,queryParameters:he,loading:Be,error:Ne}),[Re,ke,he,Be,Ne]);return o.createElement(me.Provider,{value:xt},R)};function $e(){const R=(0,o.useContext)(me);if(!R)throw new Error("useEntityList must be used within EntityListProvider");return R}var je=e(64279),it=e(18149),Je=e.n(it),Ct=e(829),ae=e.n(Ct);const ue=(0,I.uW)("catalog:entity-route-ref",()=>(0,t.createRouteRef)({id:"catalog:entity",params:["namespace","kind","name"]}));function Qe(R){var T,$;return{kind:R.kind.toLocaleLowerCase("en-US"),namespace:($=(T=R.metadata.namespace)==null?void 0:T.toLocaleLowerCase("en-US"))!=null?$:DEFAULT_NAMESPACE,name:R.metadata.name}}function Ge(R,T){const $=T==null?void 0:T.defaultKind;let H,Y,J;return"metadata"in R?(H=R.kind,Y=R.metadata.namespace,J=R.metadata.name):(H=R.kind,Y=R.namespace,J=R.name),Y===Pe.zG&&(Y=void 0),H=H.toLocaleLowerCase("en-US"),H=$&&$.toLocaleLowerCase("en-US")===H?void 0:H,`${H?`${H}:`:""}${Y?`${Y}/`:""}${J}`}var Ue=e(82339),at=e(80030);const Q=(0,o.forwardRef)((R,T)=>{var ot;const{entityRef:$,defaultKind:H,title:Y,children:J,...he}=R,Re=(0,t.useRouteRef)(ue);let De,Be,Ne;if(typeof $=="string"){const We=(0,Pe.of)($);De=We.kind,Be=We.namespace,Ne=We.name}else"metadata"in $?(De=$.kind,Be=$.metadata.namespace,Ne=$.metadata.name):(De=$.kind,Be=$.namespace,Ne=$.name);De=De.toLocaleLowerCase("en-US"),Be=(ot=Be==null?void 0:Be.toLocaleLowerCase("en-US"))!=null?ot:Pe.zG;const Ze={kind:De,namespace:Be,name:Ne},ke=Ge({kind:De,namespace:Be,name:Ne},{defaultKind:H}),xt=o.createElement(Ue.Link,{...he,ref:T,to:Re(Ze)},J,!J&&(Y!=null?Y:ke));return Y?o.createElement(at.ZP,{title:ke},xt):xt});function Z(R){const{entityRefs:T,defaultKind:$,...H}=R;return o.createElement(o.Fragment,null,T.map((Y,J)=>o.createElement(o.Fragment,{key:J},J>0&&", ",o.createElement(Q,{...H,entityRef:Y,defaultKind:$}))))}class X{constructor(T){this.value=T}getCatalogFilters(){return{kind:this.value}}toQueryValue(){return this.value}}class oe{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 ce{constructor(T){this.values=T}filterEntity(T){return this.values.every($=>{var H;return((H=T.metadata.tags)!=null?H:[]).includes($)})}toQueryValue(){return this.values}}class be{constructor(T){this.value=T}filterEntity(T){var H;const $=this.value.toLocaleUpperCase("en-US");return T.metadata.name.toLocaleUpperCase("en-US").includes($)||`${T.metadata.title}`.toLocaleUpperCase("en-US").includes($)||((H=T.metadata.tags)==null?void 0:H.join("").toLocaleUpperCase("en-US").indexOf($))!==-1}}class Le{constructor(T){this.values=T}filterEntity(T){return this.values.some($=>mt(T,Pe.S4).some(H=>Ge(H,{defaultKind:"group"})===$))}toQueryValue(){return this.values}}class Ce{constructor(T){this.values=T}filterEntity(T){return this.values.some($=>{var H;return((H=T.spec)==null?void 0:H.lifecycle)===$})}toQueryValue(){return this.values}}class qe{constructor(T,$,H){this.value=T,this.isOwnedEntity=$,this.isStarredEntity=H}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 H;const $=(H=T.metadata.annotations)==null?void 0:H["backstage.io/orphan"];return $!==void 0&&this.value.toString()===$}}class vt{constructor(T){this.value=T}filterEntity(T){var H,Y;const $=((Y=(H=T==null?void 0:T.status)==null?void 0:H.items)==null?void 0:Y.length)>0;return $!==void 0&&this.value===$}}function St(){var We;const R=(0,t.useApi)(l),{filters:{kind:T,type:$},queryParameters:{type:H},updateFilters:Y}=$e(),J=(0,o.useMemo)(()=>[H].flat().filter(Boolean),[H]),[he,Re]=(0,o.useState)(J.length?J:(We=$==null?void 0:$.getTypes())!=null?We:[]);(0,o.useEffect)(()=>{J.length&&Re(J)},[J]);const[De,Be]=(0,o.useState)([]),Ne=(0,o.useMemo)(()=>T==null?void 0:T.value,[T]),{error:Ze,loading:ke,value:xt}=(0,je.default)(async()=>Ne?await R.getEntityFacets({filter:{kind:Ne},facets:["spec.type"]}).then(hn=>hn.facets["spec.type"]||[]):[],[Ne,R]),ot=(0,o.useRef)(xt);return(0,o.useEffect)(()=>{const Qt=ot.current;if(ot.current=xt,ke||!Ne||Qt===xt||!xt)return;const hn=[...new Set(ae()(xt,Dn=>-Dn.count).map(Dn=>Dn.value.toLocaleLowerCase("en-US")))];Be(hn);const Jn=he.filter(Dn=>hn.includes(Dn));Je()(he,Jn)||Re(Jn)},[ke,Ne,he,Re,xt]),(0,o.useEffect)(()=>{Y({type:he.length?new oe(he):void 0})},[he,Y]),{loading:ke,error:Ze,availableTypes:De,selectedTypes:he,setSelectedTypes:Re}}const ut=20;function Pt(R,T){var De,Be;const $=(De=T==null?void 0:T.type)==null?void 0:De.toLocaleLowerCase("en-US"),H=(Be=T==null?void 0:T.kind)==null?void 0:Be.toLocaleLowerCase("en-US"),Y=(0,t.useApi)(l),{loading:J,value:he,error:Re}=(0,je.default)(async()=>{var ot;const Ne=(ot=R.relations)==null?void 0:ot.map(We=>({type:We.type,target:(0,Pe.of)(We.targetRef)})).filter(We=>(!$||We.type.toLocaleLowerCase("en-US")===$)&&(!H||We.target.kind===H));if(!Ne)return[];const Ze=Object.values((0,Ae.groupBy)(Ne,({target:We})=>`${We.kind}:${We.namespace}`.toLocaleLowerCase("en-US"))),ke=[];for(const We of Ze)ke.push({kind:We[0].target.kind,namespace:We[0].target.namespace,nameBatches:(0,Ae.chunk)(We.map(Qt=>Qt.target.name),ut)});return(await Promise.all(ke.flatMap(We=>We.nameBatches.map(Qt=>Y.getEntities({filter:{kind:We.kind,"metadata.namespace":We.namespace,"metadata.name":Qt}}))))).flatMap(We=>We.items)},[R,$,H]);return{entities:he,loading:J,error:Re}}var Lt=e(72164);function Ft(R){return typeof R=="string"?R:(0,Pe.eE)(R)}function Ot(){const R=(0,t.useApi)(u),T=(0,Lt.Z)(R.starredEntitie$(),new Set),$=(0,o.useCallback)(Y=>T.has(Ft(Y)),[T]),H=(0,o.useCallback)(Y=>R.toggleStarred(Ft(Y)).then(),[R]);return{starredEntities:T,toggleStarredEntity:H,isStarredEntity:$}}function Wt(R){return typeof R=="string"?R:(0,Pe.eE)(R)}function Nt(R){const T=(0,t.useApi)(u),[$,H]=(0,o.useState)(!1);return(0,o.useEffect)(()=>{const J=T.starredEntitie$().subscribe({next(he){H(he.has(Wt(R)))}});return()=>{J.unsubscribe()}},[R,T]),{toggleStarredEntity:(0,o.useCallback)(()=>T.toggleStarred(Wt(R)).then(),[R,T]),isStarredEntity:$}}function gn(){const R=(0,t.useApi)(t.identityApiRef),{loading:T,value:$}=(0,je.default)(async()=>{const{ownershipEntityRefs:Y}=await R.getBackstageIdentity();return Y},[]),H=(0,o.useMemo)(()=>{const Y=new Set($!=null?$:[]);return J=>{const he=mt(J,Pe.S4).map(Pe.eE);for(const Re of he)if(Y.has(Re))return!0;return!1}},[$]);return(0,o.useMemo)(()=>({loading:T,isOwnedEntity:H}),[T,H])}var In=e(68099);function Zt(R){const{entity:T,loading:$,error:H}=fe(),{allowed:Y,loading:J,error:he}=(0,In.gI)({permission:R,resourceRef:T?(0,Pe.eE)(T):void 0});return $||J?{loading:!0,allowed:!1}:H?{loading:!1,allowed:!1,error:H}:{loading:!1,allowed:Y,error:he}}const Ht=R=>{var he;const{initialFilter:T,hidden:$}=R,{updateFilters:H,queryParameters:{kind:Y}}=useEntityList(),[J]=useState((he=[Y].flat()[0])!=null?he:T);return useEffect(()=>{H({kind:J?new EntityKindFilter(J):void 0})},[J,H]),$?null:React.createElement(Alert,{severity:"warning"},"Kind filter not yet available")};var _e=e(79692),ie=e(5806),V=e(21324),ye=e(86619),Ve=e(19996),tt=e(25505),nt=e(38016),Tt=e(88013);const jt=(0,_e.Z)({input:{}},{name:"CatalogReactEntityLifecyclePicker"}),mn=o.createElement(tt.Z,{fontSize:"small"}),sn=o.createElement(Ve.Z,{fontSize:"small"}),N=()=>{var Be,Ne;const R=jt(),{updateFilters:T,backendEntities:$,filters:H,queryParameters:{lifecycles:Y}}=$e(),J=(0,o.useMemo)(()=>[Y].flat().filter(Boolean),[Y]),[he,Re]=(0,o.useState)(J.length?J:(Ne=(Be=H.lifecycles)==null?void 0:Be.values)!=null?Ne:[]);(0,o.useEffect)(()=>{J.length&&Re(J)},[J]),(0,o.useEffect)(()=>{T({lifecycles:he.length?new Ce(he):void 0})},[he,T]);const De=(0,o.useMemo)(()=>[...new Set($.map(Ze=>{var ke;return(ke=Ze.spec)==null?void 0:ke.lifecycle}).filter(Boolean))].sort(),[$]);return De.length?o.createElement(E.Z,{pb:1,pt:1},o.createElement(C.Z,{variant:"button",component:"label"},"Lifecycle",o.createElement(Tt.ZP,{multiple:!0,options:De,value:he,onChange:(Ze,ke)=>Re(ke),renderOption:(Ze,{selected:ke})=>o.createElement(ie.Z,{control:o.createElement(V.Z,{icon:mn,checkedIcon:sn,checked:ke}),label:Ze}),size:"small",popupIcon:o.createElement(nt.Z,{"data-testid":"lifecycle-picker-expand"}),renderInput:Ze=>o.createElement(ye.Z,{...Ze,className:R.input,variant:"outlined"})}))):null},te=(0,_e.Z)({input:{}},{name:"CatalogReactEntityOwnerPicker"}),pe=o.createElement(tt.Z,{fontSize:"small"}),re=o.createElement(Ve.Z,{fontSize:"small"}),Ie=()=>{var Be,Ne;const R=te(),{updateFilters:T,backendEntities:$,filters:H,queryParameters:{owners:Y}}=$e(),J=(0,o.useMemo)(()=>[Y].flat().filter(Boolean),[Y]),[he,Re]=(0,o.useState)(J.length?J:(Ne=(Be=H.owners)==null?void 0:Be.values)!=null?Ne:[]);(0,o.useEffect)(()=>{J.length&&Re(J)},[J]),(0,o.useEffect)(()=>{T({owners:he.length?new Le(he):void 0})},[he,T]);const De=(0,o.useMemo)(()=>[...new Set($.flatMap(Ze=>mt(Ze,Pe.S4).map(ke=>Ge(ke,{defaultKind:"group"}))).filter(Boolean))].sort(),[$]);return De.length?o.createElement(E.Z,{pb:1,pt:1},o.createElement(C.Z,{variant:"button",component:"label"},"Owner",o.createElement(Tt.ZP,{multiple:!0,options:De,value:he,onChange:(Ze,ke)=>Re(ke),renderOption:(Ze,{selected:ke})=>o.createElement(ie.Z,{control:o.createElement(V.Z,{icon:pe,checkedIcon:re,checked:ke}),label:Ze}),size:"small",popupIcon:o.createElement(nt.Z,{"data-testid":"owner-picker-expand"}),renderInput:Ze=>o.createElement(ye.Z,{...Ze,className:R.input,variant:"outlined"})}))):null},lt=(0,_e.Z)(R=>({searchToolbar:{paddingLeft:0,paddingRight:0},input:{}}),{name:"CatalogReactEntitySearchBar"}),At=()=>{var J,he;const R=lt(),{filters:T,updateFilters:$}=useEntityList(),[H,Y]=useState((he=(J=T.text)==null?void 0:J.value)!=null?he:"");return useDebounce(()=>{$({text:H.length?new EntityTextFilter(H):void 0})},250,[H,$]),React.createElement(Toolbar,{className:R.searchToolbar},React.createElement(FormControl,null,React.createElement(Input,{"aria-label":"search",id:"input-with-icon-adornment",className:R.input,placeholder:"Search",autoComplete:"off",onChange:Re=>Y(Re.target.value),value:H,startAdornment:React.createElement(InputAdornment,{position:"start"},React.createElement(Search,null)),endAdornment:React.createElement(InputAdornment,{position:"end"},React.createElement(IconButton,{"aria-label":"clear search",onClick:()=>Y(""),edge:"end",disabled:H.length===0},React.createElement(Clear,null)))})))},ct=Object.freeze({createEntityRefColumn(R){const{defaultKind:T}=R;function $(H){var Y;return((Y=H.metadata)==null?void 0:Y.title)||Ge(H,{defaultKind:T})}return{title:"Name",highlight:!0,customFilterAndSearch(H,Y){return $(Y).includes(H)},customSort(H,Y){return $(H).localeCompare($(Y))},render:H=>{var Y;return o.createElement(Q,{entityRef:H,defaultKind:T,title:(Y=H.metadata)==null?void 0:Y.title})}}},createEntityRelationColumn({title:R,relation:T,defaultKind:$,filter:H}){function Y(he){return mt(he,T,H)}function J(he){return Y(he).map(Re=>Ge(Re,{defaultKind:$})).join(", ")}return{title:R,customFilterAndSearch(he,Re){return J(Re).includes(he)},customSort(he,Re){return J(he).localeCompare(J(Re))},render:he=>o.createElement(Z,{entityRefs:Y(he),defaultKind:$})}},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:R=>o.createElement(Ue.OverflowTooltip,{text:R.metadata.description,placement:"bottom-start",line:2}),width:"auto"}},createSpecLifecycleColumn(){return{title:"Lifecycle",field:"spec.lifecycle"}},createSpecTypeColumn(){return{title:"Type",field:"spec.type"}}}),Ut=[ct.createEntityRefColumn({defaultKind:"system"}),ct.createDomainColumn(),ct.createOwnerColumn(),ct.createMetadataDescriptionColumn()],tn=[ct.createEntityRefColumn({defaultKind:"component"}),ct.createSystemColumn(),ct.createOwnerColumn(),ct.createSpecTypeColumn(),ct.createSpecLifecycleColumn(),ct.createMetadataDescriptionColumn()],$t=(0,_e.Z)(R=>({empty:{padding:R.spacing(2),display:"flex",justifyContent:"center"}})),ht=R=>{const{entities:T,title:$,emptyContent:H,variant:Y="gridItem",columns:J}=R,he=$t(),Re={minWidth:"0",width:"100%"};return Y==="gridItem"&&(Re.height="calc(100% - 10px)"),o.createElement(Ue.Table,{columns:J,title:$,style:Re,emptyContent:H&&o.createElement("div",{className:he.empty},H),options:{search:!1,paging:!1,actionsColumnIndex:-1,padding:"dense",draggable:!1},data:T})};ht.columns=ct,ht.systemEntityColumns=Ut,ht.componentEntityColumns=tn;const kt=(0,_e.Z)({input:{}},{name:"CatalogReactEntityTagPicker"}),rn=o.createElement(tt.Z,{fontSize:"small"}),Yt=o.createElement(Ve.Z,{fontSize:"small"}),Xt=()=>{var Be,Ne;const R=kt(),{updateFilters:T,filters:$,queryParameters:{tags:H}}=$e(),Y=(0,t.useApi)(l),{value:J}=(0,je.default)(async()=>{var xt;const Ze="metadata.tags",{facets:ke}=await Y.getEntityFacets({facets:[Ze],filter:(xt=$.kind)==null?void 0:xt.getCatalogFilters()});return ke[Ze].map(({value:ot})=>ot)},[$.kind]),he=(0,o.useMemo)(()=>[H].flat().filter(Boolean),[H]),[Re,De]=(0,o.useState)(he.length?he:(Ne=(Be=$.tags)==null?void 0:Be.values)!=null?Ne:[]);return(0,o.useEffect)(()=>{he.length&&De(he)},[he]),(0,o.useEffect)(()=>{T({tags:Re.length?new ce(Re):void 0})},[Re,T]),J!=null&&J.length?o.createElement(E.Z,{pb:1,pt:1},o.createElement(C.Z,{variant:"button",component:"label"},"Tags",o.createElement(Tt.ZP,{multiple:!0,options:J,value:Re,onChange:(Ze,ke)=>De(ke),renderOption:(Ze,{selected:ke})=>o.createElement(ie.Z,{control:o.createElement(V.Z,{icon:rn,checkedIcon:Yt,checked:ke}),label:Ze}),size:"small",popupIcon:o.createElement(nt.Z,{"data-testid":"tag-picker-expand"}),renderInput:Ze=>o.createElement(ye.Z,{...Ze,className:R.input,variant:"outlined"})}))):null};var ln=e(82108),qt=e.n(ln);const Bt=R=>{var Be;const{hidden:T,initialFilter:$}=R,H=(0,t.useApi)(t.alertApiRef),{error:Y,availableTypes:J,selectedTypes:he,setSelectedTypes:Re}=St();if((0,o.useEffect)(()=>{Y&&H.post({message:"Failed to load entity types",severity:"error"}),$&&Re([$])},[Y,H,$,Re]),J.length===0||Y)return null;const De=[{value:"all",label:"All"},...J.map(Ne=>({value:Ne,label:qt()(Ne)}))];return T?null:o.createElement(E.Z,{pb:1,pt:1},o.createElement(Ue.Select,{label:"Type",items:De,selected:(Be=De.length>1?he[0]:void 0)!=null?Be:"all",onChange:Ne=>Re(Ne==="all"?[]:[String(Ne)])}))};var zt=e(15459),Jt=e(61837),pn=e(11640),cn=e(28347);const En=(0,zt.Z)({root:{color:"#f3ba37"}})(pn.Z),zn=R=>{const{toggleStarredEntity:T,isStarredEntity:$}=Nt(R.entity);return o.createElement(Jt.Z,{"aria-label":"favorite",color:"inherit",...R,onClick:()=>T()},o.createElement(at.ZP,{title:$?"Remove from favorites":"Add to favorites"},$?o.createElement(En,null):o.createElement(cn.Z,null)))};var Rn=e(8629),Ln=e(79249),w=e(38724),h=e(99152),S=e(6487),F=e(49429),W=e(55999),Ee=e(72779),ge=e.n(Ee),Oe=e(39412);const yt=Oe.Z;function bt(R,T){if(R)return R.toLocaleLowerCase("en-US");if(T)try{return(0,Pe.of)(T).kind.toLocaleLowerCase("en-US")}catch{return}}function On(R,T){const $=(0,t.useApp)(),H=bt(R,T);return H&&$.getSystemIcon(`kind:${H}`)||yt}function xn(R){const{kind:T,entityRef:$,...H}=R,Y=On(T,$);return o.createElement(Y,{...H})}const jr=(0,_e.Z)(R=>({node:{fill:R.palette.grey[300],stroke:R.palette.grey[300],"&.primary":{fill:R.palette.primary.light,stroke:R.palette.primary.light},"&.secondary":{fill:R.palette.secondary.light,stroke:R.palette.secondary.light}},text:{fill:R.palette.getContrastText(R.palette.grey[300]),"&.primary":{fill:R.palette.primary.contrastText},"&.secondary":{fill:R.palette.secondary.contrastText},"&.focused":{fontWeight:"bold"}},clickable:{cursor:"pointer"}}));function br(R){const T=(0,t.useApi)(l),$=(0,Pe.eE)(R),{loading:H,error:Y,value:J}=(0,je.default)(async()=>{const he=await T.getEntityAncestors({entityRef:$}),Re=new Array,De=new Array;for(const Be of he.items){const Ne=(0,Pe.eE)(Be.entity),Ze=Ne===he.rootEntityRef;Re.push({id:Ne,root:Ze,...Be.entity});for(const ke of Be.parentEntityRefs)De.push({from:Ne,to:ke})}return{nodes:Re,edges:De}},[$]);return{loading:H,error:Y,nodes:(J==null?void 0:J.nodes)||[],edges:(J==null?void 0:J.edges)||[]}}function Vr({node:R}){const T=jr(),$=(0,He.s0)(),H=(0,t.useRouteRef)(ue),[Y,J]=(0,o.useState)(0),[he,Re]=(0,o.useState)(0),De=(0,o.useRef)(null);(0,o.useLayoutEffect)(()=>{if(De.current){let{height:Qt,width:hn}=De.current.getBBox();Qt=Math.round(Qt),hn=Math.round(hn),(Qt!==he||hn!==Y)&&(J(hn),Re(Qt))}},[Y,he]);const Be=10,Ne=he,Ze=Ne+Be,ke=Ze+Y+Be*2,xt=he+Be*2,ot=R.metadata.title||(R.kind&&R.metadata.name&&R.metadata.namespace?Ge({kind:R.kind,name:R.metadata.name,namespace:R.metadata.namespace||""}):R.id),We=()=>{$(H({kind:R.kind,namespace:R.metadata.namespace||Pe.zG,name:R.metadata.name}))};return o.createElement("g",{onClick:We,className:T.clickable},o.createElement("rect",{className:ge()(T.node,R.root?"secondary":"primary"),width:ke,height:xt,rx:10}),o.createElement(xn,{kind:R.kind,y:Be,x:Be,width:Ne,height:Ne,className:ge()(T.text,R.root?"secondary":"primary")}),o.createElement("text",{ref:De,className:ge()(T.text,R.root?"secondary":"primary"),y:xt/2,x:Ze+(Y+Be*2)/2,textAnchor:"middle",alignmentBaseline:"middle"},ot))}function ur(R){const{loading:T,error:$,nodes:H,edges:Y}=br(R.entity);return T?o.createElement(Ue.Progress,null):$?o.createElement(Ue.ResponseErrorPanel,{error:$}):o.createElement(o.Fragment,null,o.createElement(W.Z,{variant:"h2"},"Ancestry"),o.createElement(W.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(Ue.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(Ue.DependencyGraph,{nodes:H,edges:Y,renderNode:Vr,direction:Ue.DependencyGraphTypes.Nm.BOTTOM_TOP,zoom:"enable-on-click"})))}var Gn=e(11776),wn=e(38402),_n=e(86136),dr=e(99688),Pr=e(49378),la=e(54506),er=e(94339),Ir=e(24579),Lr=e(27685);const sr=(0,_e.Z)(R=>({root:{display:"flex",flexDirection:"column"},marginTop:{marginTop:R.spacing(2)},helpIcon:{marginLeft:R.spacing(1),color:R.palette.text.disabled},monospace:{fontFamily:"monospace"}}));function $n(R){const T=sr();return o.createElement(Pr.Z,{...R,primaryTypographyProps:{className:T.monospace},secondaryTypographyProps:{className:T.monospace}})}function tr(R){const T=sr();return o.createElement(la.Z,{className:T.monospace},R.children)}function nr(R){return o.createElement(E.Z,{mt:2},o.createElement(er.Z,{variant:"outlined"},o.createElement(Ir.Z,null,o.createElement(C.Z,{variant:"h6",gutterBottom:!0},R.title,R.helpLink&&o.createElement(mr,{to:R.helpLink})),R.children)))}function Gr(R){if(R.match(/^url:https?:\/\//))return R.slice(4);if(R.match(/^https?:\/\//))return R}function fr(R){const[T,$]=R.entry,H=Gr($);return o.createElement(wn.Z,null,R.indent&&o.createElement(_n.Z,null),o.createElement($n,{primary:T,secondary:H?o.createElement(Ue.Link,{to:H},$):$}))}function mr(R){const T=sr();return o.createElement(Ue.Link,{to:R.to,className:T.helpIcon},o.createElement(Lr.Z,{fontSize:"inherit"}))}const Kr=(0,_e.Z)({root:{display:"flex",flexDirection:"column"}});function kr(R){var De,Be;const T=(0,t.useApi)(l),$=(0,Pe.eE)(R),H=(De=R.metadata.annotations)==null?void 0:De[Pe.P1],Y=(Be=R.metadata.annotations)==null?void 0:Be[Pe.q1],{loading:J,error:he,value:Re}=(0,je.default)(async()=>!H&&!Y?[]:(await T.getEntities({filter:[...H?[{[`metadata.annotations.${Pe.P1}`]:H}]:[],...Y?[{[`metadata.annotations.${Pe.q1}`]:Y}]:[]]})).items,[H,Y]);return{loading:J,error:he,location:H,originLocation:Y,colocatedEntities:Re==null?void 0:Re.filter(Ne=>(0,Pe.eE)(Ne)!==$)}}function ir(R){return o.createElement(Gn.Z,{dense:!0},R.header&&o.createElement(fr,{key:"header",entry:R.header}),R.entities.map(T=>o.createElement(wn.Z,{key:(0,Pe.eE)(T)},o.createElement(_n.Z,null,o.createElement(xn,{kind:T.kind})),o.createElement($n,{primary:o.createElement(Q,{entityRef:T})}))))}function Or(R){const{entity:T}=R,{loading:$,error:H,location:Y,originLocation:J,colocatedEntities:he}=kr(T);if($)return o.createElement(Ue.Progress,null);if(H)return o.createElement(Ue.ResponseErrorPanel,{error:H});if(!Y&&!J)return o.createElement(dr.Z,{severity:"warning"},"Entity had no location information.");if(!(he!=null&&he.length))return o.createElement(dr.Z,{severity:"info"},"There were no other entities on this location.");if(Y===J)return o.createElement(ir,{entities:he});const Re=he.filter(Be=>{var Ne;return((Ne=Be.metadata.annotations)==null?void 0:Ne[Pe.P1])===Y}),De=he.filter(Be=>{var Ne;return((Ne=Be.metadata.annotations)==null?void 0:Ne[Pe.q1])===J});return o.createElement(o.Fragment,null,Re.length>0&&o.createElement(ir,{entities:Re,header:["At the same location",Y]}),De.length>0&&o.createElement(ir,{entities:De,header:["At the same origin",J]}))}function Yr(R){const T=Kr();return o.createElement(o.Fragment,null,o.createElement(W.Z,{variant:"h2"},"Colocated"),o.createElement(W.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(Or,{entity:R.entity})))}function hr(R){return Object.fromEntries([...Object.entries(R)].sort((T,$)=>T[0]<$[0]?-1:1))}function xr(R){return o.createElement(o.Fragment,null,o.createElement(W.Z,{variant:"h2"},"Entity as JSON"),o.createElement(W.Z,null,"This is the raw entity data as received from the catalog, on JSON form."),o.createElement(W.Z,null,o.createElement("div",{style:{fontSize:"75%"},"data-testid":"code-snippet"},o.createElement(Ue.CodeSnippet,{text:JSON.stringify(hr(R.entity),void 0,2),language:"json",showCopyCodeButton:!0}))))}var Dr=e(3440),Fr=e.n(Dr);const gr=(0,_e.Z)({root:{display:"flex",flexDirection:"column"}});function Br(R){var Be,Ne;const T=gr(),{apiVersion:$,kind:H,metadata:Y,spec:J,relations:he=[],status:Re={}}=R.entity,De=Fr()(ae()(he,Ze=>Ze.targetRef),"type");return o.createElement(o.Fragment,null,o.createElement(W.Z,{variant:"h2"},"Overview"),o.createElement("div",{className:T.root},o.createElement(nr,{title:"Identity"},o.createElement(Gn.Z,{dense:!0},o.createElement(wn.Z,null,o.createElement($n,{primary:"apiVersion",secondary:$})),o.createElement(wn.Z,null,o.createElement($n,{primary:"kind",secondary:H})),(J==null?void 0:J.type)&&o.createElement(wn.Z,null,o.createElement($n,{primary:"spec.type",secondary:J.type})),Y.uid&&o.createElement(wn.Z,null,o.createElement($n,{primary:"uid",secondary:Y.uid})),Y.etag&&o.createElement(wn.Z,null,o.createElement($n,{primary:"etag",secondary:Y.etag})))),o.createElement(nr,{title:"Metadata"},!!Object.keys(Y.annotations||{}).length&&o.createElement(Gn.Z,{dense:!0,subheader:o.createElement(tr,null,"Annotations",o.createElement(mr,{to:"https://backstage.io/docs/features/software-catalog/well-known-annotations"}))},Object.entries(Y.annotations).map(Ze=>o.createElement(fr,{key:Ze[0],indent:!0,entry:Ze}))),!!Object.keys(Y.labels||{}).length&&o.createElement(Gn.Z,{dense:!0,subheader:o.createElement(tr,null,"Labels")},Object.entries(Y.labels).map(Ze=>o.createElement(fr,{key:Ze[0],indent:!0,entry:Ze}))),!!((Be=Y.tags)!=null&&Be.length)&&o.createElement(Gn.Z,{dense:!0,subheader:o.createElement(tr,null,"Tags")},Y.tags.map((Ze,ke)=>o.createElement(wn.Z,{key:`${Ze}-${ke}`},o.createElement(_n.Z,null),o.createElement($n,{primary:Ze}))))),!!he.length&&o.createElement(nr,{title:"Relations",helpLink:"https://backstage.io/docs/features/software-catalog/well-known-relations"},Object.entries(De).map(([Ze,ke],xt)=>o.createElement("div",{key:xt},o.createElement(Gn.Z,{dense:!0,subheader:o.createElement(tr,null,Ze)},ke.map(ot=>o.createElement(wn.Z,{key:ot.targetRef},o.createElement(_n.Z,null,o.createElement(xn,{entityRef:ot.targetRef})),o.createElement($n,{primary:o.createElement(Q,{entityRef:ot.targetRef})}))))))),!!((Ne=Re.items)!=null&&Ne.length)&&o.createElement(nr,{title:"Status",helpLink:"https://backstage.io/docs/features/software-catalog/well-known-statuses"},Re.items.map((Ze,ke)=>o.createElement("div",{key:ke},o.createElement(C.Z,null,Ze.level,": ",Ze.type),o.createElement(E.Z,{ml:2},Ze.message))))))}var pr=e(72847);function yn(R){return o.createElement(o.Fragment,null,o.createElement(W.Z,{variant:"h2"},"Entity as YAML"),o.createElement(W.Z,null,"This is the raw entity data as received from the catalog, on YAML form."),o.createElement(W.Z,null,o.createElement("div",{style:{fontSize:"75%"},"data-testid":"code-snippet"},o.createElement(Ue.CodeSnippet,{text:pr.ZP.stringify(hr(R.entity)),language:"yaml",showCopyCodeButton:!0}))))}const un=(0,_e.Z)(R=>({fullHeightDialog:{height:"calc(100% - 64px)"},root:{display:"flex",flexGrow:1,width:"100%",backgroundColor:R.palette.background.paper},tabs:{borderRight:`1px solid ${R.palette.divider}`,flexShrink:0},tabContents:{flexGrow:1,overflowX:"auto"}}));function kn(R){const{children:T,value:$,index:H,...Y}=R,J=un();return o.createElement("div",{role:"tabpanel",hidden:$!==H,id:`vertical-tabpanel-${H}`,"aria-labelledby":`vertical-tab-${H}`,className:J.tabContents,...Y},$===H&&o.createElement(E.Z,{pl:3,pr:3},T))}function Yn(R){return{id:`vertical-tab-${R}`,"aria-controls":`vertical-tabpanel-${R}`}}function Mr(R){const T=un(),[$,H]=o.useState(0);return(0,o.useEffect)(()=>{H(0)},[R.open]),R.entity?o.createElement(Rn.Z,{fullWidth:!0,maxWidth:"xl",open:R.open,onClose:R.onClose,"aria-labelledby":"entity-inspector-dialog-title",PaperProps:{className:T.fullHeightDialog}},o.createElement(Ln.Z,{id:"entity-inspector-dialog-title"},"Entity Inspector"),o.createElement(w.Z,{dividers:!0},o.createElement("div",{className:T.root},o.createElement(h.Z,{orientation:"vertical",variant:"scrollable",value:$,onChange:(Y,J)=>H(J),"aria-label":"Inspector options",className:T.tabs},o.createElement(S.Z,{label:"Overview",...Yn(0)}),o.createElement(S.Z,{label:"Ancestry",...Yn(1)}),o.createElement(S.Z,{label:"Colocated",...Yn(2)}),o.createElement(S.Z,{label:"Raw JSON",...Yn(3)}),o.createElement(S.Z,{label:"Raw YAML",...Yn(4)})),o.createElement(kn,{value:$,index:0},o.createElement(Br,{entity:R.entity})),o.createElement(kn,{value:$,index:1},o.createElement(ur,{entity:R.entity})),o.createElement(kn,{value:$,index:2},o.createElement(Yr,{entity:R.entity})),o.createElement(kn,{value:$,index:3},o.createElement(xr,{entity:R.entity})),o.createElement(kn,{value:$,index:4},o.createElement(yn,{entity:R.entity})))),o.createElement(F.Z,null,o.createElement(y.Z,{onClick:R.onClose,color:"primary"},"Close"))):null}var yr=e(85256);function wr(R){var xt;const T=(0,t.useApi)(l),$=(xt=R.metadata.annotations)==null?void 0:xt[Pe.q1],H=R.metadata.uid,Y=$==="bootstrap:bootstrap",J=(0,je.default)(async()=>{const ot=T.getLocationByRef($);let We;if(!$)We=Promise.resolve([]);else{const Qt=`metadata.annotations.${Pe.q1}`;We=T.getEntities({filter:{[Qt]:$},fields:["kind","metadata.uid","metadata.name","metadata.namespace"]}).then(hn=>hn.items)}return Promise.all([ot,We]).then(([Qt,hn])=>({location:Qt,colocatedEntities:hn}))},[T,R]),he=(0,o.useCallback)(async function(){const{location:We}=J.value;await T.removeLocationById(We.id)},[T,J]),Re=(0,o.useCallback)(async function(){await T.removeEntityByUid(H)},[T,H]);if(Y)return{type:"bootstrap",location:$,deleteEntity:Re};const{loading:De,error:Be,value:Ne}=J;if(De)return{type:"loading"};if(Be)return{type:"error",error:Be};const{location:Ze,colocatedEntities:ke}=Ne;return Ze?{type:"unregister",location:$,colocatedEntities:ke.map(Pe.iB),unregisterLocation:he,deleteEntity:Re}:{type:"only-delete",deleteEntity:Re}}var Er=e(10179);const $r=(0,_e.Z)({advancedButton:{fontSize:"0.7em"}}),vr=({entity:R,onConfirm:T})=>{var xt;const $=(0,t.useApi)(t.alertApiRef),H=(0,t.useApi)(t.configApiRef),Y=$r(),J=wr(R),[he,Re]=(0,o.useState)(!1),[De,Be]=(0,o.useState)(!1),Ne=(xt=H.getOptionalString("app.title"))!=null?xt:"Backstage",Ze=(0,o.useCallback)(async function(){if("unregisterLocation"in J){Be(!0);try{await J.unregisterLocation(),T()}catch(We){(0,Er.BD)(We),$.post({message:We.message})}finally{Be(!1)}}},[$,T,J]),ke=(0,o.useCallback)(async function(){if("deleteEntity"in J){Be(!0);try{await J.deleteEntity(),T()}catch(We){(0,Er.BD)(We),$.post({message:We.message})}finally{Be(!1)}}},[$,T,J]);return J.type==="loading"?o.createElement(Ue.Progress,null):J.type==="error"?o.createElement(Ue.ResponseErrorPanel,{error:J.error}):J.type==="bootstrap"?o.createElement(o.Fragment,null,o.createElement(dr.Z,{severity:"info"},'You cannot unregister this entity, since it originates from a protected Backstage configuration (location "',J.location,'"). If you believe this is in error, please contact the ',Ne," ","integrator."),o.createElement(E.Z,{marginTop:2},!he&&o.createElement(y.Z,{variant:"text",size:"small",color:"primary",className:Y.advancedButton,onClick:()=>Re(!0)},"Advanced Options"),he&&o.createElement(o.Fragment,null,o.createElement(W.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:De,onClick:ke},"Delete Entity")))):J.type==="only-delete"?o.createElement(o.Fragment,null,o.createElement(W.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:De,onClick:ke},"Delete Entity")):J.type==="unregister"?o.createElement(o.Fragment,null,o.createElement(W.Z,null,"This action will unregister the following entities:"),o.createElement(W.Z,{component:"ul"},J.colocatedEntities.map(ot=>o.createElement("li",{key:`${ot.kind}:${ot.namespace}/${ot.name}`},o.createElement(Q,{entityRef:ot})))),o.createElement(W.Z,null,"Located at the following location:"),o.createElement(W.Z,{component:"ul"},o.createElement("li",null,J.location)),o.createElement(W.Z,null,"To undo, just re-register the entity in ",Ne,"."),o.createElement(E.Z,{marginTop:2},o.createElement(y.Z,{variant:"contained",color:"secondary",disabled:De,onClick:Ze},"Unregister Location"),!he&&o.createElement(E.Z,{component:"span",marginLeft:2},o.createElement(y.Z,{variant:"text",size:"small",color:"primary",className:Y.advancedButton,onClick:()=>Re(!0)},"Advanced Options"))),he&&o.createElement(o.Fragment,null,o.createElement(E.Z,{paddingTop:4,paddingBottom:4},o.createElement(yr.Z,null)),o.createElement(W.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:De,onClick:ke},"Delete Entity"))):o.createElement(dr.Z,{severity:"error"},"Internal error: Unknown state")},lr=R=>{const{open:T,onConfirm:$,onClose:H,entity:Y}=R;return o.createElement(Rn.Z,{open:T,onClose:H},o.createElement(Ln.Z,{id:"responsive-dialog-title"},"Are you sure you want to unregister this entity?"),o.createElement(w.Z,null,o.createElement(vr,{entity:Y,onConfirm:$})),o.createElement(F.Z,null,o.createElement(y.Z,{onClick:H,color:"primary"},"Cancel")))};var Jr=e(12231),L=e(9520),k=e(47603);const de=(0,_e.Z)(R=>({root:{backgroundColor:"rgba(0, 0, 0, .11)",boxShadow:"none",margin:R.spacing(1,0,1,0)},title:{margin:R.spacing(1,0,0,1),textTransform:"uppercase",fontSize:12,fontWeight:"bold"},listIcon:{minWidth:30,color:R.palette.text.primary},menuItem:{minHeight:R.spacing(6)},groupWrapper:{margin:R.spacing(1,1,2,1)}}),{name:"CatalogReactUserListPicker"});function Fe(R){return[{name:"Personal",items:[{id:"owned",label:"Owned",icon:k.Z},{id:"starred",label:"Starred",icon:pn.Z}]},{name:R!=null?R:"Company",items:[{id:"all",label:"All"}]}]}const et=R=>{var Qn;const{initialFilter:T,availableFilters:$}=R,H=de(),J=(Qn=(0,t.useApi)(t.configApiRef).getOptionalString("organization.name"))!=null?Qn:"Company",{filters:he,updateFilters:Re,backendEntities:De,queryParameters:{kind:Be,user:Ne},loading:Ze}=$e(),ke=["starred","all"],xt=Fe(J).map(Cn=>({...Cn,items:Cn.items.filter(({id:Fn})=>["group","user"].some(Nr=>Nr===Be)?ke.includes(Fn):!$||$.includes(Fn))})).filter(({items:Cn})=>!!Cn.length),{isStarredEntity:ot}=Ot(),{isOwnedEntity:We,loading:Qt}=gn(),hn=Ze||Qt,Jn=(0,o.useMemo)(()=>new qe("owned",We,ot),[We,ot]),Dn=(0,o.useMemo)(()=>new qe("starred",We,ot),[We,ot]),vn=(0,o.useMemo)(()=>[Ne].flat()[0],[Ne]),[Sn,Un]=(0,o.useState)(vn!=null?vn:T),Ar=(0,o.useMemo)(()=>De.filter(Et((0,Ae.compact)(Object.values({...he,user:void 0})))),[he,De]),Ur=(0,o.useMemo)(()=>({all:Ar.length,starred:Ar.filter(Cn=>Dn.filterEntity(Cn)).length,owned:Ar.filter(Cn=>Jn.filterEntity(Cn)).length}),[Ar,Dn,Jn]);return(0,o.useEffect)(()=>{vn&&Un(vn)},[vn]),(0,o.useEffect)(()=>{!hn&&!!Sn&&Sn!=="all"&&Ur[Sn]===0&&Un("all")},[hn,Ur,Sn,Un]),(0,o.useEffect)(()=>{Re({user:Sn?new qe(Sn,We,ot):void 0})},[Sn,We,ot,Re]),o.createElement(er.Z,{className:H.root},xt.map(Cn=>o.createElement(o.Fragment,{key:Cn.name},o.createElement(C.Z,{variant:"subtitle2",component:"span",className:H.title},Cn.name),o.createElement(er.Z,{className:H.groupWrapper},o.createElement(Gn.Z,{disablePadding:!0,dense:!0,role:"menu","aria-label":Cn.name},Cn.items.map(Fn=>{var Nr,ca;return o.createElement(Jr.Z,{role:"none presentation",key:Fn.id,button:!0,divider:!0,onClick:()=>Un(Fn.id),selected:Fn.id===((Nr=he.user)==null?void 0:Nr.value),className:H.menuItem,disabled:Ur[Fn.id]===0,"data-testid":`user-picker-${Fn.id}`,tabIndex:0,ContainerProps:{role:"menuitem"}},Fn.icon&&o.createElement(_n.Z,{className:H.listIcon},o.createElement(Fn.icon,{fontSize:"small"})),o.createElement(Pr.Z,null,o.createElement(C.Z,{variant:"body1"},Fn.label," ")),o.createElement(L.Z,null,(ca=Ur[Fn.id])!=null?ca:"-"))}))))))},gt=(0,_e.Z)({input:{}},{name:"CatalogReactEntityProcessingStatusPickerPicker"}),Rt=o.createElement(tt.Z,{fontSize:"small"}),Dt=o.createElement(Ve.Z,{fontSize:"small"}),dt=()=>{const R=gt(),{updateFilters:T}=$e(),[$,H]=(0,o.useState)([]);function Y(Re){T({orphan:Re?new Ke(Re):void 0})}function J(Re){T({error:Re?new vt(Re):void 0})}const he=["Is Orphan","Has Error"];return o.createElement(E.Z,{pb:1,pt:1},o.createElement(C.Z,{variant:"button",component:"label"},"Processing Status",o.createElement(Tt.ZP,{multiple:!0,options:he,value:$,onChange:(Re,De)=>{H(De),Y(De.includes("Is Orphan")),J(De.includes("Has Error"))},renderOption:(Re,{selected:De})=>o.createElement(ie.Z,{control:o.createElement(V.Z,{icon:Rt,checkedIcon:Dt,checked:De}),label:Re}),size:"small",popupIcon:o.createElement(nt.Z,{"data-testid":"processing-status-picker-expand"}),renderInput:Re=>o.createElement(ye.Z,{...Re,className:R.input,variant:"outlined"})})))},Vt=({children:R,value:T})=>{var Re;const[$,H]=useState((Re=T==null?void 0:T.filters)!=null?Re:{}),Y=useCallback(De=>{H(Be=>{const Ne=typeof De=="function"?De(Be):De;return{...Be,...Ne}})},[]),J=useMemo(()=>({entities:[],backendEntities:[],queryParameters:{}}),[]),he=useMemo(()=>{var De,Be,Ne,Ze,ke;return{entities:(De=T==null?void 0:T.entities)!=null?De:J.entities,backendEntities:(Be=T==null?void 0:T.backendEntities)!=null?Be:J.backendEntities,updateFilters:(Ne=T==null?void 0:T.updateFilters)!=null?Ne:Y,filters:$,loading:(Ze=T==null?void 0:T.loading)!=null?Ze:!1,queryParameters:(ke=T==null?void 0:T.queryParameters)!=null?ke:J.queryParameters,error:T==null?void 0:T.error}},[T,J,$,Y]);return React.createElement(EntityListContext.Provider,{value:he},R)}},39398:function(ee,s,e){"use strict";e.r(s),e.d(s,{AboutCard:function(){return ze},AboutContent:function(){return Ae},AboutField:function(){return M}});var r=e(48023),t=e(82339),l=e(36964),u=e(36356),A=e(17429),m=e(79692),o=e(94339),c=e(32552),f=e(61837),y=e(85256),g=e(24579),E=e(52866),C=e(30254),O=e(27604),D=e(2784),U=e(47851),B=e(60905),b=e(90436),I=e(7089);const x=(0,m.Z)(He=>({value:{fontWeight:"bold",overflow:"hidden",lineHeight:"24px",wordBreak:"break-word"},label:{color:He.palette.text.secondary,textTransform:"uppercase",fontSize:"10px",fontWeight:"bold",letterSpacing:.5,overflow:"hidden",whiteSpace:"nowrap"}}));function M(He){const{label:Se,value:Ye,gridSizes:rt,children:It}=He,Et=x(),Pe=(0,l.useElementFilter)(It,Xe=>Xe.getElements()),mt=Pe.length>0?Pe:D.createElement(b.Z,{variant:"body2",className:Et.value},Ye||"unknown");return D.createElement(B.Z,{item:!0,...rt},D.createElement(b.Z,{variant:"h2",className:Et.label},Se),mt)}var K=e(45915);const le=(0,m.Z)({description:{wordBreak:"break-word"}});function fe(He,Se,Ye){if(Se==="url"||He.includes("://"))return He;const rt=Ye.type==="file"?`file://${Ye.target}`:Ye.target;return Se==="file"||Ye.type==="file"?new URL(He,rt).href:rt}function Ae(He){var Je,Ct,ae,ue,Qe,Ge,Ue,at;const{entity:Se}=He,Ye=le(),rt=Se.kind.toLocaleLowerCase("en-US")==="system",It=Se.kind.toLocaleLowerCase("en-US")==="resource",Et=Se.kind.toLocaleLowerCase("en-US")==="component",Pe=Se.kind.toLocaleLowerCase("en-US")==="api",mt=Se.kind.toLocaleLowerCase("en-US")==="template",Xe=Se.kind.toLocaleLowerCase("en-US")==="location",se=Se.kind.toLocaleLowerCase("en-US")==="group",me=(0,A.getEntityRelations)(Se,r.cz,{kind:"system"}),we=(0,A.getEntityRelations)(Se,r.cz,{kind:"component"}),$e=(0,A.getEntityRelations)(Se,r.cz,{kind:"domain"}),je=(0,A.getEntityRelations)(Se,r.S4);let it;try{it=(0,r.CV)(Se)}catch{it=void 0}return D.createElement(B.Z,{container:!0},D.createElement(M,{label:"Description",gridSizes:{xs:12}},D.createElement(b.Z,{variant:"body2",paragraph:!0,className:Ye.description},((Je=Se==null?void 0:Se.metadata)==null?void 0:Je.description)||"No description")),D.createElement(M,{label:"Owner",value:"No Owner",gridSizes:{xs:12,sm:6,lg:4}},je.length>0&&D.createElement(A.EntityRefLinks,{entityRefs:je,defaultKind:"group"})),(rt||$e.length>0)&&D.createElement(M,{label:"Domain",value:"No Domain",gridSizes:{xs:12,sm:6,lg:4}},$e.length>0&&D.createElement(A.EntityRefLinks,{entityRefs:$e,defaultKind:"domain"})),(Pe||Et||It||me.length>0)&&D.createElement(M,{label:"System",value:"No System",gridSizes:{xs:12,sm:6,lg:4}},me.length>0&&D.createElement(A.EntityRefLinks,{entityRefs:me,defaultKind:"system"})),Et&&we.length>0&&D.createElement(M,{label:"Parent Component",value:"No Parent Component",gridSizes:{xs:12,sm:6,lg:4}},D.createElement(A.EntityRefLinks,{entityRefs:we,defaultKind:"component"})),(Pe||Et||It||mt||se||Xe||typeof((Ct=Se==null?void 0:Se.spec)==null?void 0:Ct.type)=="string")&&D.createElement(M,{label:"Type",value:(ae=Se==null?void 0:Se.spec)==null?void 0:ae.type,gridSizes:{xs:12,sm:6,lg:4}}),(Pe||Et||typeof((ue=Se==null?void 0:Se.spec)==null?void 0:ue.lifecycle)=="string")&&D.createElement(M,{label:"Lifecycle",value:(Qe=Se==null?void 0:Se.spec)==null?void 0:Qe.lifecycle,gridSizes:{xs:12,sm:6,lg:4}}),D.createElement(M,{label:"Tags",value:"No Tags",gridSizes:{xs:12,sm:6,lg:4}},(((Ge=Se==null?void 0:Se.metadata)==null?void 0:Ge.tags)||[]).map(Q=>D.createElement(I.Z,{key:Q,size:"small",label:Q}))),Xe&&(((Ue=Se==null?void 0:Se.spec)==null?void 0:Ue.targets)||((at=Se==null?void 0:Se.spec)==null?void 0:at.target))&&D.createElement(M,{label:"Targets",gridSizes:{xs:12}},D.createElement(K.s,{cols:1,items:(Se.spec.targets||[Se.spec.target]).map(Q=>Q).map(Q=>{var Z;return{text:Q,href:fe(Q,((Z=Se==null?void 0:Se.spec)==null?void 0:Z.type)||"unknown",it)}})})))}const xe=(0,m.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 ze(He){var ae,ue,Qe;const{variant:Se}=He,Ye=xe(),{entity:rt}=(0,A.useEntity)(),It=(0,l.useApi)(u.q3),Et=(0,l.useApi)(A.catalogApiRef),Pe=(0,l.useApi)(l.alertApiRef),mt=(0,l.useRouteRef)(U.jU),Xe=(0,A.getEntitySourceLocation)(rt,It),se=(ae=rt.metadata.annotations)==null?void 0:ae[r.Tf],me={label:"View Source",disabled:!Xe,icon:D.createElement(u.nW,{type:Xe==null?void 0:Xe.integrationType}),href:Xe==null?void 0:Xe.locationTargetUrl},we={label:"View TechDocs",disabled:!((ue=rt.metadata.annotations)!=null&&ue["backstage.io/techdocs-ref"])||!mt,icon:D.createElement(C.Z,null),href:mt&&mt({namespace:rt.metadata.namespace||r.zG,kind:rt.kind,name:rt.metadata.name})};let $e="";Se==="gridItem"?$e=Ye.gridItemCard:Se==="fullHeight"&&($e=Ye.fullHeightCard);let je="";Se==="gridItem"?je=Ye.gridItemCardContent:Se==="fullHeight"&&(je=Ye.fullHeightCardContent);const it=(Qe=rt.metadata.annotations)==null?void 0:Qe[r.P1],Je=(it==null?void 0:it.startsWith("url:"))||(it==null?void 0:it.startsWith("file:")),Ct=(0,D.useCallback)(async()=>{await Et.refreshEntity((0,r.eE)(rt)),Pe.post({message:"Refresh scheduled",severity:"info"})},[Et,Pe,rt]);return D.createElement(o.Z,{className:$e},D.createElement(c.Z,{title:"About",action:D.createElement(D.Fragment,null,Je&&D.createElement(f.Z,{"aria-label":"Refresh",title:"Schedule entity refresh",onClick:Ct},D.createElement(E.Z,null)),D.createElement(f.Z,{component:t.Link,"aria-label":"Edit",disabled:!se,title:"Edit Metadata",to:se!=null?se:"#"},D.createElement(O.Z,null))),subheader:D.createElement(t.HeaderIconLinkRow,{links:[me,we]})}),D.createElement(y.Z,null),D.createElement(g.Z,{className:je},D.createElement(Ae,{entity:rt})))}},49782:function(ee,s,e){"use strict";e.d(s,{K:function(){return E}});var r=e(2784),t=e(79692),l=e(12420),u=e(97580),A=e(73698),m=e(74603),o=e(12231),c=e(17429),f=e(64279),y=e(36964);const g=(0,t.Z)(C=>(0,l.Z)({root:{...C.typography.h4}}));function E(C){var xe;const{initialFilter:O="component",allowedKinds:D}=C,U=g(),B=(0,y.useApi)(c.catalogApiRef),{value:b}=(0,f.default)(async()=>await B.getEntityFacets({facets:["kind"]}).then(ze=>{var He;return((He=ze.facets.kind)==null?void 0:He.map(Se=>Se.value).sort())||[]})),{updateFilters:I,queryParameters:{kind:x}}=(0,c.useEntityList)(),M=(0,r.useMemo)(()=>{var ze;return(ze=[x].flat()[0])==null?void 0:ze.toLocaleLowerCase("en-US")},[x]),[K,le]=(0,r.useState)(M!=null?M:O);(0,r.useEffect)(()=>{I({kind:K?new c.EntityKindFilter(K):void 0})},[K,I]),(0,r.useEffect)(()=>{M&&le(M)},[M]);const Ae=[(0,u.Z)(K)].concat((xe=b==null?void 0:b.filter(ze=>D?D.some(He=>He.toLocaleLowerCase("en-US")===ze.toLocaleLowerCase("en-US")):!0))!=null?xe:[]).sort().reduce((ze,He)=>(ze[He.toLocaleLowerCase("en-US")]=He,ze),{});return r.createElement(A.Z,{input:r.createElement(m.Z,{value:K}),value:K,onChange:ze=>le(ze.target.value),classes:U},Object.keys(Ae).map(ze=>r.createElement(o.Z,{value:ze,key:ze},`${Ae[ze]}s`)))}},30097:function(ee,s,e){"use strict";e.d(s,{E:function(){return D}});var r=e(48023),t=e(17429),l=e(27604),u=e(2997),A=e(76635),m=e(2784),o=e(7089),c=e(82339);const f=Object.freeze({createNameColumn(U){function B(b){var I;return((I=b.metadata)==null?void 0:I.title)||(0,t.humanizeEntityRef)(b,{defaultKind:U==null?void 0:U.defaultKind})}return{title:"Name",field:"resolved.name",highlight:!0,customSort({entity:b},{entity:I}){return B(b).localeCompare(B(I))},render:({entity:b})=>{var I;return m.createElement(t.EntityRefLink,{entityRef:b,defaultKind:(U==null?void 0:U.defaultKind)||"Component",title:(I=b.metadata)==null?void 0:I.title})}}},createSystemColumn(){return{title:"System",field:"resolved.partOfSystemRelationTitle",render:({resolved:U})=>m.createElement(t.EntityRefLinks,{entityRefs:U.partOfSystemRelations,defaultKind:"system"})}},createOwnerColumn(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:U})=>m.createElement(t.EntityRefLinks,{entityRefs:U.ownedByRelations,defaultKind:"group"})}},createSpecTargetsColumn(){return{title:"Targets",field:"entity.spec.targets",render:({entity:U})=>{var B,b;return m.createElement(m.Fragment,null,(((B=U==null?void 0:U.spec)==null?void 0:B.targets)||((b=U==null?void 0:U.spec)==null?void 0:b.target))&&m.createElement(c.OverflowTooltip,{text:(U.spec.targets||[U.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:U})=>m.createElement(c.OverflowTooltip,{text:U.metadata.description,placement:"bottom-start"}),width:"auto"}},createTagsColumn(){return{title:"Tags",field:"entity.metadata.tags",cellStyle:{padding:"0px 16px 0px 20px"},render:({entity:U})=>m.createElement(m.Fragment,null,U.metadata.tags&&U.metadata.tags.map(B=>m.createElement(o.Z,{key:B,label:B,size:"small",variant:"outlined",style:{marginBottom:"0px"}}))),width:"auto"}},createTitleColumn(U){return{title:"Title",field:"entity.metadata.title",hidden:U==null?void 0:U.hidden,searchable:!0}}});var y=e(28347),g=e(15459),E=e(11640),C=e(90436);const O=(0,g.Z)({root:{color:"#f3ba37"}})(E.Z),D=U=>{var Et,Pe,mt;const{columns:B,actions:b,tableOptions:I}=U,{isStarredEntity:x,toggleStarredEntity:M}=(0,t.useStarredEntities)(),{loading:K,error:le,entities:fe,filters:Ae}=(0,t.useEntityList)(),xe=(0,m.useMemo)(()=>{var se;return[f.createTitleColumn({hidden:!0}),f.createNameColumn({defaultKind:(se=Ae.kind)==null?void 0:se.value}),...Xe(),f.createMetadataDescriptionColumn(),f.createTagsColumn()];function Xe(){var me;switch((me=Ae.kind)==null?void 0:me.value){case"user":return[];case"domain":case"system":return[f.createOwnerColumn()];case"group":case"template":return[f.createSpecTypeColumn()];case"location":return[f.createSpecTypeColumn(),f.createSpecTargetsColumn()];default:return[f.createSystemColumn(),f.createOwnerColumn(),f.createSpecTypeColumn(),f.createSpecLifecycleColumn()]}}},[(Et=Ae.kind)==null?void 0:Et.value]),ze=Ae.type===void 0,He=(0,A.capitalize)((mt=(Pe=Ae.user)==null?void 0:Pe.value)!=null?mt:"all");if(le)return m.createElement("div",null,m.createElement(c.WarningPanel,{severity:"error",title:"Could not fetch catalog entities."},m.createElement(c.CodeSnippet,{language:"text",text:le.toString()})));const Se=[({entity:Xe})=>{var we;const se=(we=Xe.metadata.annotations)==null?void 0:we[r.l2],me="View";return{icon:()=>m.createElement(m.Fragment,null,m.createElement(C.Z,{variant:"srOnly"},me),m.createElement(u.Z,{fontSize:"small"})),tooltip:me,disabled:!se,onClick:()=>{!se||window.open(se,"_blank")}}},({entity:Xe})=>{var we;const se=(we=Xe.metadata.annotations)==null?void 0:we[r.Tf],me="Edit";return{icon:()=>m.createElement(m.Fragment,null,m.createElement(C.Z,{variant:"srOnly"},me),m.createElement(l.Z,{fontSize:"small"})),tooltip:me,disabled:!se,onClick:()=>{!se||window.open(se,"_blank")}}},({entity:Xe})=>{const se=x(Xe),me=se?"Remove from favorites":"Add to favorites";return{cellStyle:{paddingLeft:"1em"},icon:()=>m.createElement(m.Fragment,null,m.createElement(C.Z,{variant:"srOnly"},me),se?m.createElement(O,null):m.createElement(y.Z,null)),tooltip:me,onClick:()=>M(Xe)}}],Ye=fe.map(Xe=>{const se=(0,t.getEntityRelations)(Xe,r.cz,{kind:"system"}),me=(0,t.getEntityRelations)(Xe,r.S4);return{entity:Xe,resolved:{name:(0,t.humanizeEntityRef)(Xe,{defaultKind:"Component"}),ownedByRelationsTitle:me.map(we=>(0,t.humanizeEntityRef)(we,{defaultKind:"group"})).join(", "),ownedByRelations:me,partOfSystemRelationTitle:se.map(we=>(0,t.humanizeEntityRef)(we,{defaultKind:"system"})).join(", "),partOfSystemRelations:se}}}),rt=(B||xe).find(Xe=>Xe.title==="Type");rt&&(rt.hidden=!ze);const It=Ye.length>20;return m.createElement(c.Table,{isLoading:K,columns:B||xe,options:{paging:It,pageSize:20,actionsColumnIndex:-1,loadingType:"linear",showEmptyDataSourceMessage:!K,padding:"dense",pageSizeOptions:[20,50,100],...I},title:`${He} (${fe.length})`,data:Ye,actions:b||Se})};D.columns=f},45915:function(ee,s,e){"use strict";e.d(s,{s:function(){return O}});var r=e(90348),t=e(11861),l=e(2784),u=e(79692),A=e(95544),m=e(90436),o=e(52160),c=e(82339);const f=(0,u.Z)({svgIcon:{display:"inline-block","& svg":{display:"inline-block",fontSize:"inherit",verticalAlign:"baseline"}}});function y(D){const{href:U,text:B,Icon:b}=D,I=f();return l.createElement(A.Z,{display:"flex"},l.createElement(A.Z,{mr:1,className:I.svgIcon},l.createElement(m.Z,{component:"div"},b?l.createElement(b,null):l.createElement(o.Z,null))),l.createElement(A.Z,{flexGrow:"1"},l.createElement(c.Link,{to:U,target:"_blank",rel:"noopener"},B||U)))}var g=e(41156);const E={xs:1,sm:1,md:1,lg:2,xl:3};function C(D){var b,I;const U=[(0,g.Z)(x=>x.breakpoints.up("xl"))?"xl":null,(0,g.Z)(x=>x.breakpoints.up("lg"))?"lg":null,(0,g.Z)(x=>x.breakpoints.up("md"))?"md":null,(0,g.Z)(x=>x.breakpoints.up("sm"))?"sm":null,(0,g.Z)(x=>x.breakpoints.up("xs"))?"xs":null];let B=1;if(typeof D=="number")B=D;else{const x=(b=U.find(M=>M!==null))!=null?b:"xs";B=(I=D==null?void 0:D[x])!=null?I:E[x]}return B}function O(D){const{items:U,cols:B=void 0}=D,b=C(B);return l.createElement(r.Z,{rowHeight:"auto",cols:b},U.map(({text:I,href:x,Icon:M},K)=>l.createElement(t.Z,{key:K},l.createElement(y,{href:x,text:I!=null?I:x,Icon:M}))))}},47851:function(ee,s,e){"use strict";e.d(s,{_Z:function(){return u},jU:function(){return l},yw:function(){return t}});var r=e(36964);const t=(0,r.createExternalRouteRef)({id:"create-component",optional:!0}),l=(0,r.createExternalRouteRef)({id:"view-techdoc",optional:!0,params:["namespace","kind","name"]}),u=(0,r.createRouteRef)({id:"catalog"})},40749:function(ee,s,e){"use strict";e.d(s,{rG:function(){return r},Y2:function(){return I},J$:function(){return f},g2:function(){return l}});var r;(function(x){const M="DENY";x.DENY=M;const K="ALLOW";x.ALLOW=K;const le="CONDITIONAL";x.CONDITIONAL=le})(r||(r={}));function t(x,M){return x.name===M.name}function l(x,M){return"resourceType"in x?!M||x.resourceType===M:!1}function u(x){return x.attributes.action==="create"}function A(x){return x.attributes.action==="read"}function m(x){return x.attributes.action==="update"}function o(x){return x.attributes.action==="delete"}function c(x){return{authorize:async(M,K)=>await x.authorize(M,K),authorizeConditional(M,K){const le=M;return x.authorize(le,K)}}}function f({name:x,attributes:M,resourceType:K}){return K?{type:"resource",name:x,attributes:M,resourceType:K}:{type:"basic",name:x,attributes:M}}var y=e(10179),g=e(96279),E=e.n(g),C=e(9571),O=e(30195);const D=O.z.lazy(()=>O.z.object({rule:O.z.string(),resourceType:O.z.string(),params:O.z.array(O.z.unknown())}).or(O.z.object({anyOf:O.z.array(D).nonempty()})).or(O.z.object({allOf:O.z.array(D).nonempty()})).or(O.z.object({not:D}))),U=O.z.object({result:O.z.literal(r.ALLOW).or(O.z.literal(r.DENY))}),B=O.z.union([O.z.object({result:O.z.literal(r.ALLOW).or(O.z.literal(r.DENY))}),O.z.object({result:O.z.literal(r.CONDITIONAL),pluginId:O.z.string(),resourceType:O.z.string(),conditions:D})]),b=(x,M)=>O.z.object({items:O.z.array(O.z.intersection(O.z.object({id:O.z.string()}),x)).refine(K=>K.length===M.size&&K.every(({id:le})=>M.has(le)),{message:"Items in response do not match request"})});class I{constructor(M){q(this,"enabled");q(this,"discovery");var K;this.discovery=M.discovery,this.enabled=(K=M.config.getOptionalBoolean("permission.enabled"))!=null?K:!1}async authorize(M,K){return this.makeRequest(M,U,K)}async authorizeConditional(M,K){return this.makeRequest(M,B,K)}async makeRequest(M,K,le){if(!this.enabled)return M.map(Ye=>({result:r.ALLOW}));const fe={items:M.map(Ye=>({id:C.Z(),...Ye}))},Ae=await this.discovery.getBaseUrl("permission"),xe=await E()(`${Ae}/authorize`,{method:"POST",body:JSON.stringify(fe),headers:{...this.getAuthorizationHeader(le==null?void 0:le.token),"content-type":"application/json"}});if(!xe.ok)throw await y.VL.fromResponse(xe);const ze=await xe.json(),Se=b(K,new Set(fe.items.map(({id:Ye})=>Ye))).parse(ze).items.reduce((Ye,rt)=>(Ye[rt.id]=rt,Ye),{});return fe.items.map(Ye=>Se[Ye.id])}getAuthorizationHeader(M){return M?{Authorization:`Bearer ${M}`}:{}}}},68099:function(ee,s,e){"use strict";e.d(s,{iM:function(){return A},RV:function(){return l},gI:function(){return o}});var r=e(2784),t=e(36964);const l=(0,t.createApiRef)({id:"plugin.permission.api"});var u=e(40749);class A{constructor(y,g){this.permissionClient=y,this.identityApi=g}static create(y){const{config:g,discovery:E,identity:C}=y,O=new u.Y2({discovery:E,config:g});return new A(O,C)}async authorize(y){return(await this.permissionClient.authorize([y],await this.identityApi.getCredentials()))[0]}}var m=e(49857);function o(f){const y=(0,t.useApi)(l),{data:g,error:E}=(0,m.ZP)(f,async C=>{if((0,u.g2)(C.permission)&&!C.resourceRef)return u.rG.DENY;const{result:O}=await y.authorize(C);return O});return E?{error:E,loading:!1,allowed:!1}:g===void 0?{loading:!0,allowed:!1}:{loading:!1,allowed:g===u.rG.ALLOW}}const c=f=>{const{permission:y,resourceRef:g,errorComponent:E,...C}=f,O=usePermission(isResourcePermission(y)?{permission:y,resourceRef:g}:{permission:y}),D=useApp(),{NotFoundErrorPage:U}=D.getComponents();let B=E===void 0?React.createElement(U,null):E;return O.loading?B=null:O.allowed&&(B=f.element),React.createElement(Route,{...C,element:B})}},74450:function(ee,s,e){"use strict";e.d(s,{FA:function(){return o},Nd:function(){return K},Rx:function(){return I}});var r=e(36964);const t=(0,r.createApiRef)({id:"plugin.search.queryservice"});class l{constructor(ue){this.mockedResults=ue}query(){return Promise.resolve(this.mockedResults||{results:[]})}}var u=e(2784),A=e(79692);const m=(0,A.Z)(()=>({highlight:{}}),{name:"BackstageHighlightedSearchResultText"}),o=({text:ae,preTag:ue,postTag:Qe})=>{const Ge=m(),Ue=(0,u.useMemo)(()=>ae.split(new RegExp(`(${ue}.+?${Qe})`)),[Qe,ue,ae]);return u.createElement(u.Fragment,null,Ue.map((at,Q)=>at.includes(ue)?u.createElement("mark",{className:Ge.highlight,key:Q},at.replace(new RegExp(`${ue}|${Qe}`,"g"),"")):at))};var c=e(42494),f=e(84899),y=e(5806),g=e(21324),E=e(56939),C=e(73698),O=e(12231),D=e(76241),U=e(64279),B=e(1849);const b=(0,D.CT)("search-context"),I=()=>{const ae=(0,u.useContext)(b);if(!ae)throw new Error("useSearch must be used within a SearchContextProvider");const ue=ae.atVersion(1);if(!ue)throw new Error("No SearchContext v1 found");return ue},x=()=>useContext(b)!==void 0,M={term:"",pageCursor:void 0,filters:{},types:[]},K=ae=>{var Lt,Ft,Ot,Wt;const{initialState:ue=M,children:Qe}=ae,Ge=(0,r.useApi)(t),[Ue,at]=(0,u.useState)(ue.pageCursor),[Q,Z]=(0,u.useState)(ue.filters),[X,oe]=(0,u.useState)(ue.term),[ce,be]=(0,u.useState)(ue.types),Le=(0,B.Z)(X),Ce=(0,U.default)(()=>Ge.query({term:X,filters:Q,pageCursor:Ue,types:ce}),[X,Q,ce,Ue]),qe=!Ce.loading&&!Ce.error&&((Lt=Ce.value)==null?void 0:Lt.nextPageCursor),Ke=!Ce.loading&&!Ce.error&&((Ft=Ce.value)==null?void 0:Ft.previousPageCursor),vt=(0,u.useCallback)(()=>{var Nt;at((Nt=Ce.value)==null?void 0:Nt.nextPageCursor)},[(Ot=Ce.value)==null?void 0:Ot.nextPageCursor]),St=(0,u.useCallback)(()=>{var Nt;at((Nt=Ce.value)==null?void 0:Nt.previousPageCursor)},[(Wt=Ce.value)==null?void 0:Wt.previousPageCursor]);(0,u.useEffect)(()=>{Le!==void 0&&X!==Le&&at(void 0)},[X,Le,at]);const ut={result:Ce,filters:Q,setFilters:Z,term:X,setTerm:oe,types:ce,setTypes:be,pageCursor:Ue,setPageCursor:at,fetchNextPage:qe?vt:void 0,fetchPreviousPage:Ke?St:void 0},Pt=(0,D.EI)({1:ut});return u.createElement(r.AnalyticsContext,{attributes:{searchTypes:ce.sort().join(",")}},u.createElement(b.Provider,{value:Pt,children:Qe}))};var le=e(86619),fe=e(7089),Ae=e(88013),xe=e(69294),ze=e(48760);const He=(ae,ue,Qe=[],Ge=250)=>{const Ue=(0,u.useRef)({}),at=ae||(()=>Promise.resolve([])),[Q,Z]=(0,xe.default)(at,[ue],{loading:!0});if((0,ze.Z)(()=>{Ue.current[ue]===void 0&&(Ue.current[ue]=Z(ue).then(oe=>(Ue.current[ue]=oe,oe)))},Ge,[Z,ue]),Qe.length)return{loading:!1,value:Qe};const X=Ue.current[ue];return Array.isArray(X)?{loading:!1,value:X}:Q},Se=(ae,ue)=>{const{setFilters:Qe}=I();(0,u.useEffect)(()=>{ue&&[ue].flat().length>0&&Qe(Ge=>({...Ge,[ae]:ue}))},[])},Ye=ae=>{const{className:ue,defaultValue:Qe,name:Ge,values:Ue,valuesDebounceMs:at,label:Q,filterSelectedOptions:Z,limitTags:X,multiple:oe}=ae,[ce,be]=(0,u.useState)("");Se(Ge,Qe);const Le=typeof Ue=="function"?Ue:void 0,Ce=typeof Ue=="function"?void 0:Ue,{value:qe,loading:Ke}=He(Le,ce,Ce,at),{filters:vt,setFilters:St}=I(),ut=vt[Ge]||(oe?[]:null),Pt=(Ot,Wt)=>{St(Nt=>{const{[Ge]:gn,...In}=Nt;return Wt?{...In,[Ge]:Wt}:{...In}})},Lt=Ot=>u.createElement(le.Z,{...Ot,name:"search",variant:"outlined",label:Q,fullWidth:!0}),Ft=(Ot,Wt)=>Ot.map((Nt,gn)=>u.createElement(fe.Z,{label:Nt,color:"primary",...Wt({index:gn})}));return u.createElement(Ae.ZP,{filterSelectedOptions:Z,limitTags:X,multiple:oe,className:ue,id:`${oe?"multi-":""}select-filter-${Ge}--select`,options:qe||[],loading:Ke,value:ut,onChange:Pt,onInputChange:(Ot,Wt)=>be(Wt),renderInput:Lt,renderTags:Ft})},rt=(0,A.Z)({label:{textTransform:"capitalize"}}),It=ae=>{const{className:ue,defaultValue:Qe,label:Ge,name:Ue,values:at=[],valuesDebounceMs:Q}=ae,Z=rt(),{filters:X,setFilters:oe}=I();Se(Ue,Qe);const ce=typeof at=="function"?at:void 0,be=typeof at=="function"?void 0:at,{value:Le=[],loading:Ce}=He(ce,"",be,Q),qe=Ke=>{const{target:{value:vt,checked:St}}=Ke;oe(ut=>{const{[Ue]:Pt,...Lt}=ut,Ft=(Pt||[]).filter(Wt=>Wt!==vt),Ot=St?[...Ft,vt]:Ft;return Ot.length?{...Lt,[Ue]:Ot}:Lt})};return u.createElement(c.Z,{className:ue,disabled:Ce,fullWidth:!0,"data-testid":"search-checkboxfilter-next"},Ge?u.createElement(f.Z,{className:Z.label},Ge):null,Le.map(Ke=>{var vt;return u.createElement(y.Z,{key:Ke,control:u.createElement(g.Z,{color:"primary",tabIndex:-1,inputProps:{"aria-labelledby":Ke},value:Ke,name:Ke,onChange:qe,checked:((vt=X[Ue])!=null?vt:[]).includes(Ke)}),label:Ke})}))},Et=ae=>{const{className:ue,defaultValue:Qe,label:Ge,name:Ue,values:at,valuesDebounceMs:Q}=ae,Z=rt();Se(Ue,Qe);const X=typeof at=="function"?at:void 0,oe=typeof at=="function"?void 0:at,{value:ce=[],loading:be}=He(X,"",oe,Q),{filters:Le,setFilters:Ce}=I(),qe=Ke=>{const{target:{value:vt}}=Ke;Ce(St=>{const{[Ue]:ut,...Pt}=St;return vt?{...Pt,[Ue]:vt}:Pt})};return u.createElement(c.Z,{disabled:be,className:ue,variant:"filled",fullWidth:!0,"data-testid":"search-selectfilter-next"},Ge?u.createElement(E.Z,{className:Z.label,margin:"dense"},Ge):null,u.createElement(C.Z,{variant:"outlined",value:Le[Ue]||"",onChange:qe},u.createElement(O.Z,{value:""},u.createElement("em",null,"All")),ce.map(Ke=>u.createElement(O.Z,{key:Ke,value:Ke},Ke))))},Pe=({component:ae,...ue})=>u.createElement(ae,{...ue});Pe.Checkbox=ae=>u.createElement(Pe,{...ae,component:It}),Pe.Select=ae=>u.createElement(Pe,{...ae,component:Et}),Pe.Autocomplete=ae=>u.createElement(Pe,{...ae,component:Ye});var mt=e(82339);const Xe=({children:ae})=>{const{result:{loading:ue,error:Qe,value:Ge}}=useSearch();return ue?React.createElement(Progress,null):Qe?React.createElement(ResponseErrorPanel,{title:"Error encountered while fetching search results",error:Qe}):Ge!=null&&Ge.results.length?React.createElement(React.Fragment,null,ae({results:Ge.results})):React.createElement(EmptyState,{missing:"data",title:"Sorry, no results were found"})},se=ae=>React.createElement(AnalyticsContext,{attributes:{pluginId:"search",extension:"SearchResult"}},React.createElement(Xe,{...ae})),me=(0,A.Z)(ae=>({root:{display:"flex",justifyContent:"space-between",gap:ae.spacing(2),margin:ae.spacing(2,0)}})),we=()=>{const{fetchNextPage:ae,fetchPreviousPage:ue}=useSearch(),Qe=me();return!ae&&!ue?React.createElement(React.Fragment,null):React.createElement("nav",{"arial-label":"pagination navigation",className:Qe.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:!ae,onClick:ae,endIcon:React.createElement(ArrowForwardIosIcon,null)},"Next"))},$e=({children:ae})=>{const ue=useAnalytics(),{term:Qe}=useSearch();return useEffect(()=>{Qe&&ue.captureEvent("search",Qe)},[ue,Qe]),React.createElement(React.Fragment,null,ae)},je=({onChange:ae,onKeyDown:ue,onSubmit:Qe,debounceTime:Ge=200,clearButton:Ue=!0,fullWidth:at=!0,value:Q,inputProps:Z={},endAdornment:X,...oe})=>{const ce=useApi(configApiRef),[be,Le]=useState(Q),Ce=useSearchContextCheck();useEffect(()=>{Le(Ft=>Ft!==Q?Q:Ft)},[Q]),useDebounce(()=>ae(be),Ge,[be]);const qe=useCallback(Ft=>{Le(Ft.target.value)},[Le]),Ke=useCallback(Ft=>{ue&&ue(Ft),Qe&&Ft.key==="Enter"&&Qe()},[ue,Qe]),vt=useCallback(()=>{ae("")},[ae]),St=`Search in ${ce.getOptionalString("app.title")||"Backstage"}`,ut=React.createElement(InputAdornment,{position:"start"},React.createElement(IconButton,{"aria-label":"Query",disabled:!0},React.createElement(SearchIcon,null))),Pt=React.createElement(InputAdornment,{position:"end"},React.createElement(IconButton,{"aria-label":"Clear",onClick:vt},React.createElement(ClearButton,null))),Lt=React.createElement(TrackSearch,null,React.createElement(InputBase,{"data-testid":"search-bar-next",value:be,placeholder:St,startAdornment:ut,endAdornment:Ue?Pt:X,inputProps:{"aria-label":"Search",...Z},fullWidth:at,onChange:qe,onKeyDown:Ke,...oe}));return Ce?Lt:React.createElement(SearchContextProvider,null,Lt)},it=({onChange:ae,...ue})=>{const{term:Qe,setTerm:Ge}=useSearch(),Ue=useCallback(at=>{ae?ae(at):Ge(at)},[ae,Ge]);return React.createElement(AnalyticsContext,{attributes:{pluginId:"search",extension:"SearchBar"}},React.createElement(je,{value:Qe,onChange:Ue,...ue}))},Je=({result:ae,highlight:ue,rank:Qe,icon:Ge,secondaryAction:Ue,lineClamp:at=5})=>{const Q=useAnalytics(),Z=()=>{Q.captureEvent("discover",ae.title,{attributes:{to:ae.location},value:Qe})};return React.createElement(Link,{noTrack:!0,to:ae.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}):ae.title,secondary:React.createElement("span",{style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:at,overflow:"hidden"}},ue!=null&&ue.fields.text?React.createElement(HighlightedSearchResultText,{text:ue.fields.text,preTag:ue.preTag,postTag:ue.postTag}):ae.text)}),Ue&&React.createElement(Box,{alignItems:"flex-end"},Ue)),React.createElement(Divider,null))},Ct=ae=>React.createElement(AnalyticsContext,{attributes:{pluginId:"search",extension:"DefaultResultListItem"}},React.createElement(Je,{...ae}))},26136:function(ee,s,e){"use strict";e.d(s,{Ox:function(){return He},Zz:function(){return A},oZ:function(){return le},DR:function(){return m},ZS:function(){return M},VA:function(){return rt},KY:function(){return c},gT:function(){return C},Dl:function(){return O},ux:function(){return Ye},$L:function(){return E},x1:function(){return K}});var r=e(2784),t=e(10289),l=e(36964);const u="techdocs.addons.addon.v1",A="techdocs.addons.wrapper.v1",m=()=>null;(0,l.attachComponentData)(m,A,!0);const o=se=>`${u}.${se.toLocaleLowerCase("en-US")}`;function c(se){const{name:me,component:we}=se;return(0,l.createReactExtension)({name:me,component:{sync:$e=>r.createElement(we,{...$e})},data:{[u]:se,[o(me)]:!0}})}const f=(se,me)=>se.selectByComponentData({key:me}).getElements()[0],y=se=>se.selectByComponentData({key:A}).selectByComponentData({key:u}),g=se=>se.selectByComponentData({key:A}).findComponentData({key:u}),E=()=>{const se=(0,t.pC)(),me=(0,l.useElementFilter)(se,y),we=(0,l.useElementFilter)(se,g),$e=(0,r.useCallback)(Je=>{var ae;if(!me||!Je)return null;const Ct=o(Je.name);return(ae=f(me,Ct))!=null?ae:null},[me]),je=(0,r.useCallback)(Je=>{const Ct=we.find(ae=>ae.name===Je);return Ct?$e(Ct):null},[we,$e]),it=(0,r.useCallback)(Je=>{const Ct=we.filter(ae=>ae.location===Je);return Ct.length?Ct.map($e):null},[we,$e]);return{renderComponentByName:je,renderComponentsByLocation:it}},C=(0,l.createApiRef)({id:"plugin.techdocs.service"}),O=(0,l.createApiRef)({id:"plugin.techdocs.storageservice"});var D=e(64279),U=e(48023),B=e(76241);const b=(se,me)=>(0,U.eE)(se)===(0,U.eE)(me),I={title:"",subtitle:"",setTitle:()=>{},setSubtitle:()=>{},setShadowRoot:()=>{},metadata:{loading:!0},entityMetadata:{loading:!0},entityRef:{kind:"",name:"",namespace:""}},x=(0,B.CT)("techdocs-reader-page-context"),M=(0,r.memo)(({entityRef:se,children:me})=>{const we=(0,l.useApi)(C),$e=(0,D.default)(async()=>we.getTechDocsMetadata(se),[se]),je=(0,D.default)(async()=>we.getEntityMetadata(se),[se]),[it,Je]=(0,r.useState)(I.title),[Ct,ae]=(0,r.useState)(I.subtitle),[ue,Qe]=(0,r.useState)(I.shadowRoot),Ge={metadata:$e,entityRef:se,entityMetadata:je,shadowRoot:ue,setShadowRoot:Qe,title:it,setTitle:Je,subtitle:Ct,setSubtitle:ae},Ue=(0,B.EI)({1:Ge});return r.createElement(x.Provider,{value:Ue},me instanceof Function?me(Ge):me)},(se,me)=>b(se.entityRef,me.entityRef)),K=()=>{const se=(0,r.useContext)(x);if(se===void 0)return I;const me=se.atVersion(1);if(me===void 0)throw new Error("No context found for version 1.");return me},le=Object.freeze({Header:"Header",Subheader:"Subheader",Settings:"Settings",PrimarySidebar:"PrimarySidebar",SecondarySidebar:"SecondarySidebar",Content:"Content"});var fe=e(6553),Ae=e(50236),xe=e(19219),ze=e(82339);const He="TECH_DOCS_SHADOW_DOM_STYLE_LOAD",Se=se=>{(0,r.useEffect)(()=>{var it;if(!se)return()=>{};const me=se.querySelectorAll('head > link[rel="stylesheet"]');let we=(it=me==null?void 0:me.length)!=null?it:0;const $e=new CustomEvent(He);if(!we)return se.dispatchEvent($e),()=>{};const je=()=>{--we===0&&se.dispatchEvent($e)};return me==null||me.forEach(Je=>{Je.addEventListener("load",je)}),()=>{me==null||me.forEach(Je=>{Je.removeEventListener("load",je)})}},[se])},Ye=se=>{const[me,we]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{if(!se)return()=>{};we(!0);const $e=se.style;$e.setProperty("opacity","0");const je=()=>{we(!1),$e.setProperty("opacity","1")};return se.addEventListener(He,je),()=>{se.removeEventListener(He,je)}},[se]),me},rt=({element:se,onAppend:me,children:we})=>{const[$e,je]=(0,r.useState)((0,fe.Ue)({...(0,Ae.Z)(),insertionPoint:void 0}));Se(se);const it=Ye(se),Je=(0,r.useCallback)(Ct=>{if(!se||!Ct)return;je((0,fe.Ue)({...(0,Ae.Z)(),insertionPoint:se.querySelector("head")||void 0}));let ae=Ct.shadowRoot;ae||(ae=Ct.attachShadow({mode:"open"})),ae.replaceChildren(se),typeof me=="function"&&me(ae)},[se,me]);return r.createElement(r.Fragment,null,it&&r.createElement(ze.Progress,null),r.createElement(xe.ZP,{jss:$e,sheetsManager:new Map},r.createElement("div",{ref:Je,"data-testid":"techdocs-native-shadowroot"}),we))};var It=e(54073);const Et=()=>{const{shadowRoot:se}=useTechDocsReaderPage();return se},Pe=se=>{const me=Et();return me?se.map(we=>me==null?void 0:me.querySelectorAll(we)).filter(we=>we.length).map(we=>Array.from(we)).flat():[]},mt=se=>se.toString()&&se.rangeCount&&se.getRangeAt(0).getBoundingClientRect().top,Xe=(se=0)=>{const me=Et(),[we,$e]=useState(null),je=useMemo(()=>debounce(()=>{const it=me,Je=it.getSelection?it.getSelection():document.getSelection();Je&&mt(Je)?$e(Je):$e(null)},se),[me,$e,se]);return useEffect(()=>(window.document.addEventListener("selectionchange",je),()=>window.document.removeEventListener("selectionchange",je)),[je]),we}},94067:function(ee,s,e){"use strict";e.r(s),e.d(s,{EmbeddedDocsRouter:function(){return D},Router:function(){return O},isTechDocsAvailable:function(){return C}});var r=e(2784),t=e(10289),l=e(17429),u=e(82339),A=e(48023),m=e(20961),o=e(16172),c=e(63126);const f=({entity:U})=>{const B=(0,A.iB)(U);return r.createElement(m.I6,{entityRef:B},r.createElement(o.b,null),r.createElement(c.F,{withSearch:!1}))};var y=e(50021),g=e(26220);const E="backstage.io/techdocs-ref",C=U=>{var B,b;return Boolean((b=(B=U==null?void 0:U.metadata)==null?void 0:B.annotations)==null?void 0:b[E])},O=()=>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)})),D=U=>{var M;const{children:B}=U,{entity:b}=(0,l.useEntity)(),I=(0,t.V$)([{path:"/*",element:r.createElement(f,{entity:b}),children:[{path:"/*",element:B}]}]);return((M=b.metadata.annotations)==null?void 0:M[E])?I:r.createElement(u.MissingAnnotationEmptyState,{annotation:E})}},3337:function(ee,s,e){"use strict";var r=e(36964);const t=(0,r.createApiRef)({id:"plugin.techdocs.storageservice"}),l=(0,r.createApiRef)({id:"plugin.techdocs.service"})},42723:function(ee,s,e){"use strict";e.d(s,{k:function(){return A},p:function(){return u}});var r=e(10179),t=e(76372),l=e.n(t);class u{constructor(o){q(this,"configApi");q(this,"discoveryApi");q(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:c,namespace:f,name:y}=o,E=`${await this.getApiOrigin()}/metadata/techdocs/${f}/${c}/${y}`,C=await this.fetchApi.fetch(`${E}`);if(!C.ok)throw await r.VL.fromResponse(C);return await C.json()}async getEntityMetadata(o){const{kind:c,namespace:f,name:y}=o,E=`${await this.getApiOrigin()}/metadata/entity/${f}/${c}/${y}`,C=await this.fetchApi.fetch(`${E}`);if(!C.ok)throw await r.VL.fromResponse(C);return await C.json()}}class A{constructor(o){q(this,"configApi");q(this,"discoveryApi");q(this,"identityApi");q(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,c){const{kind:f,namespace:y,name:g}=o,C=`${await this.getStorageUrl()}/${y}/${f}/${g}/${c}`,O=await this.fetchApi.fetch(`${C.endsWith("/")?C:`${C}/`}index.html`);let D="";switch(O.status){case 404:throw D="Page not found. ",c||(D+="This could be because there is no index.md file in the root of the docs directory of this repository."),new r.dR(D);case 500:throw D="Could not generate documentation or an error in the TechDocs backend. ",new Error(D);default:break}return O.text()}async syncEntityDocs(o,c=()=>{}){const{kind:f,namespace:y,name:g}=o,C=`${await this.getApiOrigin()}/sync/${y}/${f}/${g}`,{token:O}=await this.identityApi.getCredentials();return new Promise((D,U)=>{const B=new t.EventSourcePolyfill(C,{withCredentials:!0,headers:O?{Authorization:`Bearer ${O}`}:{}});B.addEventListener("log",b=>{b.data&&c(JSON.parse(b.data))}),B.addEventListener("finish",b=>{let I=!1;b.data&&({updated:I}=JSON.parse(b.data)),D(I?"updated":"cached")}),B.onerror=b=>{switch(B.close(),b.status){case 404:U(new r.dR(b.message));return;default:U(new Error(b.data));return}}})}async getBaseUrl(o,c,f){const{kind:y,namespace:g,name:E}=c,O=`${await this.getApiOrigin()}/static/docs/${g}/${y}/${E}/${f}`;return new URL(o,O.endsWith("/")?O:`${O}/`).toString()}}},97589:function(ee,s,e){"use strict";e.d(s,{D:function(){return r}});function r(t,l){return l.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")?t:t.toLocaleLowerCase("en-US")}},2546:function(ee,s,e){"use strict";e.d(s,{u:function(){return o}});var r=e(2784),t=e(82339),l=e(17429),u=e(1114),A=e(70335),m=e(21956);const o=c=>{const{initialFilter:f="owned",columns:y,actions:g}=c;return r.createElement(u.j,null,r.createElement(t.Content,null,r.createElement(t.ContentHeader,{title:""},r.createElement(t.SupportButton,null,"Discover documentation in your ecosystem.")),r.createElement(l.EntityListProvider,null,r.createElement(l.CatalogFilterLayout,null,r.createElement(l.CatalogFilterLayout.Filters,null,r.createElement(A.f,null),r.createElement(l.UserListPicker,{initialFilter:f}),r.createElement(l.EntityOwnerPicker,null),r.createElement(l.EntityTagPicker,null)),r.createElement(l.CatalogFilterLayout.Content,null,r.createElement(m.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),l=e(36964),u=e(82339),A=e(94339),m=e(16111),o=e(24579),c=e(14503),f=e(2784);const y=C=>{const{entities:O}=C,D=(0,l.useRouteRef)(r.Fw),U=(0,l.useApi)(l.configApiRef);return O?f.createElement(u.ItemCardGrid,{"data-testid":"docs-explore"},O!=null&&O.length?O.map((B,b)=>{var I,x;return f.createElement(A.Z,{key:b},f.createElement(m.Z,null,f.createElement(u.ItemCardHeader,{title:(I=B.metadata.title)!=null?I:B.metadata.name})),f.createElement(o.Z,null,B.metadata.description),f.createElement(c.Z,null,f.createElement(u.Button,{to:D({namespace:(0,t.D)((x=B.metadata.namespace)!=null?x:"default",U),kind:(0,t.D)(B.kind,U),name:(0,t.D)(B.metadata.name,U)}),color:"primary","data-testid":"read_docs"},"Read Docs")))}):null):null};var g=e(17429);const E=()=>{const{loading:C,error:O,entities:D}=useEntityList();return O?React.createElement(WarningPanel,{severity:"error",title:"Could not load available documentation."},React.createElement(CodeSnippet,{language:"text",text:O.toString()})):C||!D?React.createElement(Progress,null):(D.sort((U,B)=>{var b,I;return((b=U.metadata.title)!=null?b:U.metadata.name).localeCompare((I=B.metadata.title)!=null?I:B.metadata.name)}),React.createElement(DocsCardGrid,{entities:D}))}},38634:function(ee,s,e){"use strict";e.d(s,{H:function(){return g}});var r=e(2784),t=e(95074),l=e(36964),u=e(48023),A=e(17429),m=e(68725),o=e(82339),c=e(98095),f=e(3792),y=e(97589);const g=E=>{const{entities:C,title:O,loading:D,columns:U,actions:B}=E,[,b]=(0,t.Z)(),I=(0,l.useRouteRef)(m.Fw),x=(0,l.useApi)(l.configApiRef);if(!C)return null;const M=C.map(fe=>{var xe;const Ae=(0,A.getEntityRelations)(fe,u.S4);return{entity:fe,resolved:{docsUrl:I({namespace:(0,y.D)((xe=fe.metadata.namespace)!=null?xe:"default",x),kind:(0,y.D)(fe.kind,x),name:(0,y.D)(fe.metadata.name,x)}),ownedByRelations:Ae,ownedByRelationsTitle:Ae.map(ze=>(0,A.humanizeEntityRef)(ze,{defaultKind:"group"})).join(", ")}}}),K=[f.N.createNameColumn(),f.N.createOwnerColumn(),f.N.createTypeColumn()],le=[c.n.createCopyDocsUrlAction(b)];return r.createElement(r.Fragment,null,D||M&&M.length>0?r.createElement(o.Table,{isLoading:D,options:{paging:!0,pageSize:20,search:!0,actionsColumnIndex:-1},data:M,columns:U||K,actions:B||le,title:O?`${O} (${M.length})`:`All (${M.length})`}):r.createElement(o.EmptyState,{missing:"data",title:"No documents to show",description:"Create your own document. Check out our Getting Started Information",action:r.createElement(o.Button,{color:"primary",to:"https://backstage.io/docs/features/techdocs/getting-started",variant:"contained"},"DOCS")}))};g.columns=f.N,g.actions=c.n},12481:function(ee,s,e){"use strict";e.d(s,{n:function(){return y}});var r=e(2784),t=e(95074),l=e(76635),u=e.n(l),A=e(82339),m=e(17429),o=e(38634),c=e(98095),f=e(3792);const y=g=>{var le,fe;const{columns:E,actions:C}=g,{loading:O,error:D,entities:U,filters:B}=(0,m.useEntityList)(),{isStarredEntity:b,toggleStarredEntity:I}=(0,m.useStarredEntities)(),[,x]=(0,t.Z)(),M=(0,l.capitalize)((fe=(le=B.user)==null?void 0:le.value)!=null?fe:"all"),K=[c.n.createCopyDocsUrlAction(x),c.n.createStarEntityAction(b,I)];return D?r.createElement(A.WarningPanel,{severity:"error",title:"Could not load available documentation."},r.createElement(A.CodeSnippet,{language:"text",text:D.toString()})):r.createElement(o.H,{title:M,entities:U,loading:O,actions:C||K,columns:E})};y.columns=f.N,y.actions=c.n},98095:function(ee,s,e){"use strict";e.d(s,{n:function(){return o}});var r=e(2784),t=e(39981),l=e(2337),u=e(11640),A=e(28347);const m=(0,l.Z)({root:{color:"#f3ba37"}})(u.Z),o={createCopyDocsUrlAction(c){return f=>({icon:()=>r.createElement(t.Z,{fontSize:"small"}),tooltip:"Click to copy documentation link to clipboard",onClick:()=>c(`${window.location.origin}${f.resolved.docsUrl}`)})},createStarEntityAction(c,f){return({entity:y})=>{const g=c(y);return{cellStyle:{paddingLeft:"1em"},icon:()=>g?r.createElement(m,null):r.createElement(A.Z,null),tooltip:g?"Remove from favorites":"Add to favorites",onClick:()=>f(y)}}}}},3792:function(ee,s,e){"use strict";e.d(s,{N:function(){return A}});var r=e(2784),t=e(82339),l=e(17429);function u(m){return m.metadata.title||m.metadata.name}const A={createNameColumn(){return{title:"Document",field:"entity.metadata.name",highlight:!0,render:m=>r.createElement(t.SubvalueCell,{value:r.createElement(t.Link,{to:m.resolved.docsUrl},u(m.entity)),subvalue:m.entity.metadata.description})}},createOwnerColumn(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:m})=>r.createElement(l.EntityRefLinks,{entityRefs:m.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),l=e(72580),u=e.n(l);e.o(l,"DefaultTechDocsHome")&&e.d(s,{DefaultTechDocsHome:function(){return l.DefaultTechDocsHome}})},72580:function(){},50021:function(ee,s,e){"use strict";e.r(s),e.d(s,{TechDocsIndexPage:function(){return u}});var r=e(2784),t=e(10289),l=e(2546);const u=A=>(0,t.pC)()||r.createElement(l.u,{...A})},1114:function(ee,s,e){"use strict";e.d(s,{j:function(){return u}});var r=e(2784),t=e(82339),l=e(36964);const u=A=>{var f;const{children:m}=A,c=`Documentation available in ${(f=(0,l.useApi)(l.configApiRef).getOptionalString("organization.name"))!=null?f:"Backstage"}`;return r.createElement(t.PageWithHeader,{title:"Documentation",subtitle:c,themeId:"documentation"},m)}},70335:function(ee,s,e){"use strict";e.d(s,{f:function(){return u}});var r=e(2784),t=e(17429);class l{getCatalogFilters(){return{"metadata.annotations.backstage.io/techdocs-ref":t.CATALOG_FILTER_EXISTS}}}const u=()=>{const{updateFilters:A}=(0,t.useEntityList)();return(0,r.useEffect)(()=>{A({techdocs:new l})},[A]),null}},19192:function(ee,s,e){"use strict";e.d(s,{DefaultTechDocsHome:function(){return l.u}});var r=e(51016),t=e(21956),l=e(2546),u=e(1114),A=e(70335)},82250:function(ee,s,e){"use strict";e.d(s,{DefaultTechDocsHome:function(){return o.DefaultTechDocsHome},TechDocsIndexPage:function(){return c.Jl},TechDocsReaderPage:function(){return c.I6},TechDocsReaderPageContent:function(){return A.Fq},TechDocsReaderPageHeader:function(){return A.SE},plugin:function(){return c.s4},techdocsPlugin:function(){return c.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 l=e(3337),u=e(42723),A=e(96393),m=e(47861),o=e(19192),c=e(20961),f=e(94067)},20961:function(ee,s,e){"use strict";e.d(s,{I6:function(){return y},Jl:function(){return f},s4:function(){return A}});var r=e(26136),t=e(42723),l=e(68725),u=e(36964);const A=(0,u.createPlugin)({id:"techdocs",apis:[(0,u.createApiFactory)({api:r.Dl,deps:{configApi:u.configApiRef,discoveryApi:u.discoveryApiRef,identityApi:u.identityApiRef,fetchApi:u.fetchApiRef},factory:({configApi:g,discoveryApi:E,identityApi:C,fetchApi:O})=>new t.k({configApi:g,discoveryApi:E,identityApi:C,fetchApi:O})}),(0,u.createApiFactory)({api:r.gT,deps:{configApi:u.configApiRef,discoveryApi:u.discoveryApiRef,fetchApi:u.fetchApiRef},factory:({configApi:g,discoveryApi:E,fetchApi:C})=>new t.p({configApi:g,discoveryApi:E,fetchApi:C})})],routes:{root:l._Z,docRoot:l.Fw,entityContent:l.pd}}),m=A.provide((0,u.createRoutableExtension)({name:"TechdocsPage",component:()=>Promise.resolve().then(e.bind(e,94067)).then(g=>g.Router),mountPoint:l._Z})),o=A.provide((0,u.createRoutableExtension)({name:"EntityTechdocsContent",component:()=>Promise.resolve().then(e.bind(e,94067)).then(g=>g.EmbeddedDocsRouter),mountPoint:l.pd})),c=A.provide((0,u.createRoutableExtension)({name:"TechDocsCustomHome",component:()=>e.e(7110).then(e.bind(e,57110)).then(g=>g.TechDocsCustomHome),mountPoint:l._Z})),f=A.provide((0,u.createRoutableExtension)({name:"TechDocsIndexPage",component:()=>Promise.resolve().then(e.bind(e,50021)).then(g=>g.TechDocsIndexPage),mountPoint:l._Z})),y=A.provide((0,u.createRoutableExtension)({name:"TechDocsReaderPage",component:()=>Promise.resolve().then(e.bind(e,26220)).then(g=>g.TechDocsReaderPage),mountPoint:l.Fw}))},26220:function(ee,s,e){"use strict";e.r(s),e.d(s,{TechDocsReaderLayout:function(){return c},TechDocsReaderPage:function(){return f}});var r=e(2784),t=e(10289),l=e(82339),u=e(26136),A=e(63126),m=e(99954),o=e(16172);const c=({withSearch:y,withHeader:g=!0})=>r.createElement(l.Page,{themeId:"documentation"},g&&r.createElement(m.S,null),r.createElement(o.b,null),r.createElement(A.F,{withSearch:y})),f=y=>{const{kind:g,name:E,namespace:C}=(0,t.UO)(),{children:O,entityRef:D={kind:g,name:E,namespace:C}}=y,U=(0,t.pC)();if(!O){const b=(U?r.Children.toArray(U.props.children):[]).find(I=>{var M,K;const{type:x}=I;return!((K=(M=x==null?void 0:x.__backstage_data)==null?void 0:M.map)!=null&&K.get(u.Zz))});return r.createElement(u.ZS,{entityRef:D},b||r.createElement(c,null))}return r.createElement(u.ZS,{entityRef:D},({metadata:B,entityMetadata:b,onReady:I})=>r.createElement("div",{className:"techdocs-reader-page"},r.createElement(l.Page,{themeId:"documentation"},O instanceof Function?O({entityRef:D,techdocsMetadataValue:B.value,entityMetadataValue:b.value,onReady:I}):O)))}},63126:function(ee,s,e){"use strict";e.d(s,{F:function(){return mn}});var r=e(2784),t=e(79692),l=e(60905),u=e(26136),A=e(82339),m=e(47861),o=e(4614),c=e(77277),f=e(99688),y=e(12420),g=e(90436),E=e(61837),C=e(4190),O=e(87685);const D=(0,t.Z)(N=>(0,y.Z)({paper:{width:"100%",[N.breakpoints.up("sm")]:{width:"75%"},[N.breakpoints.up("md")]:{width:"50%"},padding:N.spacing(2.5)},root:{height:"100%",overflow:"hidden"},logs:{background:N.palette.background.default}})),U=({buildLog:N,onClose:te})=>{const pe=D(),re=N.length===0?"Waiting for logs...":N.join(`
32
+ `);return r.createElement(l.Z,{container:!0,direction:"column",className:pe.root,spacing:0,wrap:"nowrap"},r.createElement(l.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:te,color:"inherit"},r.createElement(O.Z,null))),r.createElement(A.LogViewer,{text:re,classes:{root:pe.logs}}))},B=({buildLog:N})=>{const te=D(),[pe,re]=(0,r.useState)(!1);return r.createElement(r.Fragment,null,r.createElement(c.Z,{color:"inherit",onClick:()=>re(!0)},"Show Build Logs"),r.createElement(C.ZP,{classes:{paper:te.paper},anchor:"right",open:pe,onClose:()=>re(!1)},r.createElement(U,{buildLog:N,onClose:()=>re(!1)})))};var b=e(36964);const I=({errorMessage:N})=>{const te=(0,b.useApi)(b.configApiRef).getOptionalString("techdocs.builder");let pe="";return te!=="local"&&(pe="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(A.ErrorPage,{status:"404",statusMessage:N||"Documentation not found",additionalInfo:pe})};var x=e(2263);const M=(0,t.Z)(N=>({root:{marginBottom:N.spacing(2)},message:{wordBreak:"break-word",overflowWrap:"anywhere"}})),K=()=>{let N=null;const te=M(),{state:pe,contentReload:re,contentErrorMessage:Ie,syncErrorMessage:lt,buildLog:At}=(0,x.DK)();return pe==="INITIAL_BUILD"&&(N=r.createElement(f.Z,{classes:{root:te.root},variant:"outlined",severity:"info",icon:r.createElement(o.Z,{size:"24px"}),action:r.createElement(B,{buildLog:At})},"Documentation is accessed for the first time and is being prepared. The subsequent loads are much faster.")),pe==="CONTENT_STALE_REFRESHING"&&(N=r.createElement(f.Z,{variant:"outlined",severity:"info",icon:r.createElement(o.Z,{size:"24px"}),action:r.createElement(B,{buildLog:At}),classes:{root:te.root}},"A newer version of this documentation is being prepared and will be available shortly.")),pe==="CONTENT_STALE_READY"&&(N=r.createElement(f.Z,{variant:"outlined",severity:"success",action:r.createElement(c.Z,{color:"inherit",onClick:()=>re()},"Refresh"),classes:{root:te.root}},"A newer version of this documentation is now available, please refresh to view.")),pe==="CONTENT_STALE_ERROR"&&(N=r.createElement(f.Z,{variant:"outlined",severity:"error",action:r.createElement(B,{buildLog:At}),classes:{root:te.root,message:te.message}},"Building a newer version of this documentation failed."," ",lt)),pe==="CONTENT_NOT_FOUND"&&(N=r.createElement(r.Fragment,null,lt&&r.createElement(f.Z,{variant:"outlined",severity:"error",action:r.createElement(B,{buildLog:At}),classes:{root:te.root,message:te.message}},"Building a newer version of this documentation failed."," ",lt),r.createElement(I,{errorMessage:Ie}))),N};var le=e(10289),fe=e(60364),Ae=e(41156),xe=e(36356),ze=e(35368),He=e.n(ze);const Se=/main\.[A-Fa-f0-9]{8}\.min\.css$/,Ye=/^https:\/\/fonts\.googleapis\.com/,rt=/^https:\/\/fonts\.gstatic\.com/,It=N=>N.nodeName==="LINK",Et=N=>{const te=(N==null?void 0:N.getAttribute("href"))||"",pe=te.match(Se),re=te.match(Ye),Ie=te.match(rt);return pe||re||Ie},Pe=N=>(It(N)&&!Et(N)&&N.remove(),N),mt=N=>N.nodeName==="IFRAME",Xe=(N,te)=>{const pe=N.getAttribute("src")||"";try{const{host:re}=new URL(pe);return te.includes(re)}catch{return!1}},se=N=>te=>(mt(te)&&!Xe(te,N)&&te.remove(),te),me=()=>{const N=(0,b.useApi)(b.configApiRef);return(0,r.useMemo)(()=>N.getOptionalConfig("techdocs.sanitizer"),[N])},we=()=>{const N=me();return(0,r.useCallback)(async te=>{const pe=N==null?void 0:N.getOptionalStringArray("allowedIframeHosts");He().addHook("beforeSanitizeElements",Pe);const re=["link"];return pe&&(re.push("iframe"),He().addHook("beforeSanitizeElements",se(pe))),He().sanitize(te.innerHTML,{ADD_TAGS:re,FORBID_TAGS:["style"],WHOLE_DOCUMENT:!0,RETURN_DOM:!0})},[N])};var $e=e(41128),je=({theme:N})=>`
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: ${N.palette.text.primary};
42
+ --md-default-fg-color--light: ${N.palette.text.secondary};
43
+ --md-default-fg-color--lighter: ${(0,$e.$n)(N.palette.text.secondary,.7)};
44
+ --md-default-fg-color--lightest: ${(0,$e.$n)(N.palette.text.secondary,.3)};
45
+
46
+ /* BACKGROUND */
47
+ --md-default-bg-color:${N.palette.background.default};
48
+ --md-default-bg-color--light: ${N.palette.background.paper};
49
+ --md-default-bg-color--lighter: ${(0,$e.$n)(N.palette.background.paper,.7)};
50
+ --md-default-bg-color--lightest: ${(0,$e.$n)(N.palette.background.paper,.3)};
51
+
52
+ /* PRIMARY */
53
+ --md-primary-fg-color: ${N.palette.primary.main};
54
+ --md-primary-fg-color--light: ${N.palette.primary.light};
55
+ --md-primary-fg-color--dark: ${N.palette.primary.dark};
56
+ --md-primary-bg-color: ${N.palette.primary.contrastText};
57
+ --md-primary-bg-color--light: ${(0,$e.$n)(N.palette.primary.contrastText,.7)};
58
+
59
+ /* ACCENT */
60
+ --md-accent-fg-color: var(--md-primary-fg-color);
61
+
62
+ /* SHADOW */
63
+ --md-shadow-z1: ${N.shadows[1]};
64
+ --md-shadow-z2: ${N.shadows[2]};
65
+ --md-shadow-z3: ${N.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: ${N.palette.text.primary};
102
+ --md-code-bg-color: ${N.palette.background.paper};
103
+ --md-code-hl-color: ${(0,$e.Fq)(N.palette.warning.main,.5)};
104
+ --md-code-hl-keyword-color: ${N.palette.type==="dark"?N.palette.primary.light:N.palette.primary.dark};
105
+ --md-code-hl-function-color: ${N.palette.type==="dark"?N.palette.secondary.light:N.palette.secondary.dark};
106
+ --md-code-hl-string-color: ${N.palette.type==="dark"?N.palette.success.light:N.palette.success.dark};
107
+ --md-code-hl-number-color: ${N.palette.type==="dark"?N.palette.error.light:N.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: ${N.palette.text.primary};
122
+ --md-typeset-del-color: ${N.palette.type==="dark"?(0,$e.Fq)(N.palette.error.dark,.5):(0,$e.Fq)(N.palette.error.light,.5)};
123
+ --md-typeset-ins-color: ${N.palette.type==="dark"?(0,$e.Fq)(N.palette.success.dark,.5):(0,$e.Fq)(N.palette.success.light,.5)};
124
+ --md-typeset-mark-color: ${N.palette.type==="dark"?(0,$e.Fq)(N.palette.warning.dark,.5):(0,$e.Fq)(N.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
+ `,it=({theme:N})=>`
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: ${N.typography.fontFamily};
147
+ font-family: var(--md-text-font-family);
148
+ background-color: unset;
149
+ }
150
+ `,Je=({theme:N,sidebar:te})=>`
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:${N.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(16rem - 10px);
196
+ }
197
+ .md-sidebar--secondary {
198
+ right: ${N.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: ${te.isPinned?"calc(-12.1rem + 242px)":"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 Ct=["h1","h2","h3","h4","h5","h6"];var ae=({theme:N})=>`
340
+ /*================== Typeset ==================*/
341
+
342
+ .md-typeset {
343
+ font-size: var(--md-typeset-font-size);
344
+ }
345
+
346
+ ${Ct.reduce((te,pe)=>{var $t;const re=($t=N.typography.htmlFontSize)!=null?$t:16,Ie=N.typography[pe],{lineHeight:lt,fontFamily:At,fontWeight:ct,fontSize:Ut}=Ie,tn=ht=>{let kt=1;return typeof ht=="number"&&(kt=ht/re),typeof ht=="string"&&(kt=ht.replace("rem","")),`calc(${kt} * var(--md-typeset-font-size))`};return te.concat(`
347
+ .md-typeset ${pe} {
348
+ color: var(--md-default-fg-color);
349
+ line-height: ${lt};
350
+ font-family: ${At};
351
+ font-weight: ${ct};
352
+ font-size: ${tn(Ut)};
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 ${N.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
+ `,ue=()=>`
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
+ `,Qe=({theme:N})=>`
415
+ /*================== Extensions ==================*/
416
+
417
+ /* HIGHLIGHT */
418
+ .highlight .md-clipboard:after {
419
+ content: unset;
420
+ }
421
+
422
+ .highlight .nx {
423
+ color: ${N.palette.type==="dark"?"#ff53a3":"#ec407a"};
424
+ }
425
+
426
+ /* CODE HILITE */
427
+ .codehilite .gd {
428
+ background-color: ${N.palette.type==="dark"?"rgba(248,81,73,0.65)":"#fdd"};
429
+ }
430
+
431
+ .codehilite .gi {
432
+ background-color: ${N.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: ${N.palette.action.disabledBackground};
463
+ }
464
+ .task-list-control [type="checkbox"]:checked + .task-list-indicator:before {
465
+ background-color: ${N.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 Ge=[je,it,Je,ae,ue,Qe],Ue=()=>(0,A.useSidebarPinState)(),at=()=>{const N=Ue(),te=(0,fe.Z)();return(0,r.useMemo)(()=>{const pe={theme:te,sidebar:N};return Ge.reduce((re,Ie)=>re+Ie(pe),"")},[te,N])},Q=()=>{const N=at();return(0,r.useCallback)(te=>(te.getElementsByTagName("head")[0].insertAdjacentHTML("beforeend",`<style>${N}</style>`),te),[N])},Z=(N,te,pe)=>{const re=N==="src"&&te.endsWith(".svg"),Ie=!te.match(/^([a-z]*:)?\/\//i),lt=te.startsWith(pe);return re&&(Ie||lt)},X=({techdocsStorageApi:N,entityId:te,path:pe})=>async re=>{const Ie=await N.getApiOrigin(),lt=async(At,ct)=>{for(const Ut of At)if(Ut.hasAttribute(ct)){const tn=Ut.getAttribute(ct);if(!tn)return;const $t=await N.getBaseUrl(tn,te,pe);if(Z(ct,tn,Ie))try{const kt=await(await fetch($t,{credentials:"include"})).text();Ut.setAttribute(ct,`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(kt)))}`)}catch{Ut.setAttribute("alt",`Error: ${tn}`)}else Ut.setAttribute(ct,$t)}};return await Promise.all([lt(re.querySelectorAll("img"),"src"),lt(re.querySelectorAll("script"),"src"),lt(re.querySelectorAll("source"),"src"),lt(re.querySelectorAll("link"),"href"),lt(re.querySelectorAll("a[download]"),"href")]),re};var oe=e(68370),ce=e(67097),be=e(47093),Le=e(82717),Ce=e.n(Le);const qe=N=>te=>{var kt;const pe=te.querySelector('[title="Edit this page"]');if(!pe||!pe.href)return te;const re=new URL(pe.href),Ie=N.byUrl(re);if((Ie==null?void 0:Ie.type)!=="github"&&(Ie==null?void 0:Ie.type)!=="gitlab")return te;const lt=((kt=te.querySelector("article>h1"))==null?void 0:kt.childNodes[0].textContent)||"",At=encodeURIComponent(`Documentation Feedback: ${lt}`),ct=encodeURIComponent(`Page source:
483
+ ${pe.href}
484
+
485
+ Feedback:`),Ut=(Ie==null?void 0:Ie.type)==="github"?(0,oe.Pb)(re.href,"blob"):re.href,tn=Ce()(Ut),$t=`/${tn.organization}/${tn.name}`,ht=pe.cloneNode();switch(Ie==null?void 0:Ie.type){case"gitlab":ht.href=`${re.origin}${$t}/issues/new?issue[title]=${At}&issue[description]=${ct}`;break;case"github":ht.href=`${re.origin}${$t}/issues/new?title=${At}&body=${ct}`;break;default:return te}return be.render(r.createElement(ce.Z),ht),ht.style.paddingLeft="5px",ht.title="Leave feedback for this page",ht.id="git-feedback-link",pe==null||pe.insertAdjacentElement("beforebegin",ht),te};var Ke=e(44882);const vt=()=>N=>{const te=N.querySelector('.md-header label[for="__drawer"]'),pe=N.querySelector("article");if(!te||!pe)return N;const re=te.cloneNode();return be.render(r.createElement(Ke.Z),re),re.id="toggle-sidebar",re.title="Toggle Sidebar",re.classList.add("md-content__button"),re.style.setProperty("padding","0 0 0 5px"),re.style.setProperty("margin","0.4rem 0 0.4rem 0.4rem"),pe==null||pe.prepend(re),N},St=()=>N=>(((pe,re)=>{Array.from(pe).filter(Ie=>Ie.hasAttribute(re)).forEach(Ie=>{const lt=Ie.getAttribute(re);if(lt){lt.match(/^https?:\/\//i)&&Ie.setAttribute("target","_blank");try{const At=ut(window.location.href);Ie.setAttribute(re,new URL(lt,At).toString())}catch{Ie.replaceWith(Ie.textContent||lt)}}})})(Array.from(N.getElementsByTagName("a")),"href"),N);function ut(N){const te=new URL(N);return!te.pathname.endsWith("/")&&!te.pathname.endsWith(".html")&&(te.pathname+="/"),te.toString()}const Pt=({baseUrl:N,onClick:te})=>pe=>(Array.from(pe.getElementsByTagName("a")).forEach(re=>{re.addEventListener("click",Ie=>{const At=re.getAttribute("href");!At||At.startsWith(N)&&!re.hasAttribute("download")&&(Ie.preventDefault(),te(Ie,At))})}),pe);var Lt=e(15459),Ft=e(80030),Ot=e(72379),Wt=e(41547);const Nt=(0,Lt.Z)(N=>({tooltip:{fontSize:"inherit",color:N.palette.text.primary,margin:0,padding:N.spacing(.5),backgroundColor:"transparent",boxShadow:"none"}}))(Ft.ZP),gn=()=>r.createElement(Ot.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"})),In=({text:N})=>{const[te,pe]=(0,r.useState)(!1),re=(0,r.useCallback)(()=>{navigator.clipboard.writeText(N),pe(!0)},[N]),Ie=(0,r.useCallback)(()=>{pe(!1)},[pe]);return r.createElement(Nt,{title:"Copied to clipboard",placement:"left",open:te,onClose:Ie,leaveDelay:1e3},r.createElement("button",{className:"md-clipboard md-icon",onClick:re},r.createElement(gn,null)))},Zt=N=>te=>{var re;const pe=te.querySelectorAll("pre > code");for(const Ie of pe){const lt=Ie.textContent||"",At=document.createElement("div");(re=Ie==null?void 0:Ie.parentElement)==null||re.prepend(At),be.render(r.createElement(Wt.Z,{theme:N},r.createElement(In,{text:lt})),At)}return te},Ht=()=>N=>{var te;return(te=N.querySelector(".md-header"))==null||te.remove(),N},_e=()=>N=>{var te,pe;return(te=N.querySelector(".md-footer .md-copyright"))==null||te.remove(),(pe=N.querySelector(".md-footer-copyright"))==null||pe.remove(),N},ie=({onLoading:N,onLoaded:te})=>pe=>(N(),pe.addEventListener(u.Ox,function re(){te(),pe.removeEventListener(u.Ox,re)}),pe),V=()=>N=>(setTimeout(()=>{var te;if(window.location.hash){const pe=window.location.hash.slice(1);(te=N==null?void 0:N.querySelector(`[id="${pe}"]`))==null||te.scrollIntoView()}},200),N),ye=async(N,te)=>{let pe;if(typeof N=="string")pe=new DOMParser().parseFromString(N,"text/html").documentElement;else if(N instanceof Element)pe=N;else throw new Error("dom is not a recognized type");for(const re of te)pe=await re(pe);return pe},Ve="screen and (max-width: 76.1875em)",tt=N=>{const te=(0,le.s0)(),pe=(0,fe.Z)(),re=(0,Ae.Z)(Ve),Ie=we(),lt=Q(),At=(0,b.useApi)(u.Dl),ct=(0,b.useApi)(xe.q3),{state:Ut,path:tn,content:$t}=(0,x.DK)(),[ht,kt]=(0,r.useState)(null),rn=(0,u.ux)(ht),Yt=(0,r.useCallback)(()=>{if(!ht)return;ht.querySelectorAll(".md-sidebar").forEach(zt=>{var Jt,pn,cn;if(re)zt.style.top="0px";else{const En=document==null?void 0:document.querySelector(".techdocs-reader-page"),zn=(Jt=En==null?void 0:En.getBoundingClientRect().top)!=null?Jt:0;let Rn=(pn=ht.getBoundingClientRect().top)!=null?pn:0;const Ln=ht.querySelector(".md-container > .md-tabs"),w=(cn=Ln==null?void 0:Ln.getBoundingClientRect().height)!=null?cn:0;Rn<zn&&(Rn=zn),zt.style.top=`${Math.max(Rn,0)+w}px`}zt.style.setProperty("opacity","1")})},[ht,re]);(0,r.useEffect)(()=>(window.addEventListener("resize",Yt),window.addEventListener("scroll",Yt,!0),()=>{window.removeEventListener("resize",Yt),window.removeEventListener("scroll",Yt,!0)}),[ht,Yt]);const Xt=(0,r.useCallback)(()=>{if(!ht)return;const Bt=ht.querySelector(".md-footer");Bt&&(Bt.style.width=`${ht.getBoundingClientRect().width}px`)},[ht]);(0,r.useEffect)(()=>(window.addEventListener("resize",Xt),()=>{window.removeEventListener("resize",Xt)}),[ht,Xt]),(0,r.useEffect)(()=>{rn||(Xt(),Yt())},[Ut,rn,Xt,Yt]);const ln=(0,r.useCallback)((Bt,zt)=>ye(Bt,[Ie,X({techdocsStorageApi:At,entityId:N,path:zt}),St(),vt(),Ht(),_e(),qe(ct),lt]),[N,ct,At,Ie,lt]),qt=(0,r.useCallback)(async Bt=>ye(Bt,[V(),Zt(pe),Pt({baseUrl:window.location.origin,onClick:(zt,Jt)=>{var En;const pn=zt.ctrlKey||zt.metaKey,cn=new URL(Jt);cn.hash?pn?window.open(`${cn.pathname}${cn.hash}`,"_blank"):(te(`${cn.pathname}${cn.hash}`),(En=Bt==null?void 0:Bt.querySelector(`#${cn.hash.slice(1)}`))==null||En.scrollIntoView()):pn?window.open(cn.pathname,"_blank"):te(cn.pathname)}}),ie({onLoading:()=>{},onLoaded:()=>{var zt;(zt=Bt.querySelector(".md-nav__title"))==null||zt.removeAttribute("for")}}),ie({onLoading:()=>{Array.from(Bt.querySelectorAll(".md-sidebar")).forEach(Jt=>{Jt.style.setProperty("opacity","0")})},onLoaded:()=>{}})]),[pe,te]);return(0,r.useEffect)(()=>{if(!$t)return()=>{};let Bt=!0;return ln($t,tn).then(async zt=>{if(!(zt!=null&&zt.innerHTML)||!Bt)return;window.scroll({top:0});const Jt=await qt(zt);kt(Jt)}),()=>{Bt=!1}},[$t,tn,ln,qt]),ht};var nt=e(8560);const Tt=()=>{const N=(0,u.$L)(),{shadowRoot:te}=(0,u.x1)(),pe=te==null?void 0:te.querySelector('[data-md-component="content"]'),re=te==null?void 0:te.querySelector('div[data-md-component="sidebar"][data-md-type="navigation"], div[data-md-component="navigation"]');let Ie=re==null?void 0:re.querySelector('[data-techdocs-addons-location="primary sidebar"]');Ie||(Ie=document.createElement("div"),Ie.setAttribute("data-techdocs-addons-location","primary sidebar"),re==null||re.prepend(Ie));const lt=te==null?void 0:te.querySelector('div[data-md-component="sidebar"][data-md-type="toc"], div[data-md-component="toc"]');let At=lt==null?void 0:lt.querySelector('[data-techdocs-addons-location="secondary sidebar"]');return At||(At=document.createElement("div"),At.setAttribute("data-techdocs-addons-location","secondary sidebar"),lt==null||lt.prepend(At)),r.createElement(r.Fragment,null,r.createElement(nt.Z,{container:Ie},N.renderComponentsByLocation(u.oZ.PrimarySidebar)),r.createElement(nt.Z,{container:pe},N.renderComponentsByLocation(u.oZ.Content)),r.createElement(nt.Z,{container:At},N.renderComponentsByLocation(u.oZ.SecondarySidebar)))},jt=(0,t.Z)({search:{width:"100%","@media (min-width: 76.1875em)":{width:"calc(100% - 34.4rem)",margin:"0 auto"}}}),mn=(0,x.m1)(N=>{var $t;const{withSearch:te=!0,onReady:pe}=N,re=jt(),{entityMetadata:{value:Ie,loading:lt},entityRef:At,setShadowRoot:ct}=(0,u.x1)(),Ut=tt(At),tn=(0,r.useCallback)(ht=>{ct(ht),pe instanceof Function&&pe()},[ct,pe]);return lt===!1&&!Ie?r.createElement(A.ErrorPage,{status:"404",statusMessage:"PAGE NOT FOUND"}):Ut?r.createElement(A.Content,null,r.createElement(l.Z,{container:!0},r.createElement(l.Z,{xs:12,item:!0},r.createElement(K,null)),te&&r.createElement(l.Z,{className:re.search,xs:"auto",item:!0},r.createElement(m.S,{entityId:At,entityTitle:($t=Ie==null?void 0:Ie.metadata)==null?void 0:$t.title})),r.createElement(l.Z,{xs:12,item:!0},r.createElement(u.VA,{element:Ut,onAppend:tn},r.createElement(Tt,null))))):r.createElement(A.Content,null,r.createElement(l.Z,{container:!0},r.createElement(l.Z,{xs:12,item:!0},r.createElement(K,null))))}),sn=null},99954:function(ee,s,e){"use strict";e.d(s,{S:function(){return E}});var r=e(2784),t=e(18671),l=e(98069),u=e(73250),A=e(26136),m=e(17429),o=e(48023),c=e(82339),f=e(36964),y=e(68725);const g=r.createElement(l.Z,{animation:"wave",variant:"text",height:40}),E=C=>{const{children:O}=C,D=(0,A.$L)(),U=(0,f.useApi)(f.configApiRef),{title:B,setTitle:b,subtitle:I,setSubtitle:x,entityRef:M,metadata:{value:K,loading:le},entityMetadata:{value:fe,loading:Ae}}=(0,A.x1)();(0,r.useEffect)(()=>{!K||(b(Xe=>{const{site_name:se}=K;return Xe||se}),x(Xe=>{let{site_description:se}=K;return(!se||se==="None")&&(se="Home"),Xe||se}))},[K,b,x]);const xe=U.getOptional("app.title")||"Backstage",ze=[B,I,xe].filter(Boolean).join(" | "),{locationMetadata:He,spec:Se}=fe||{},Ye=Se==null?void 0:Se.lifecycle,rt=fe?(0,m.getEntityRelations)(fe,o.S4):[],It=(0,f.useRouteRef)(y._Z)(),Et=r.createElement(r.Fragment,null,r.createElement(c.HeaderLabel,{label:"Component",value:r.createElement(m.EntityRefLink,{color:"inherit",entityRef:M,title:fe==null?void 0:fe.metadata.title,defaultKind:"Component"})}),rt.length>0&&r.createElement(c.HeaderLabel,{label:"Owner",value:r.createElement(m.EntityRefLinks,{color:"inherit",entityRefs:rt,defaultKind:"group"})}),Ye?r.createElement(c.HeaderLabel,{label:"Lifecycle",value:Ye}):null,He&&He.type!=="dir"&&He.type!=="file"?r.createElement(c.HeaderLabel,{label:"",value:r.createElement("a",{href:He.target,target:"_blank",rel:"noopener noreferrer"},r.createElement(u.Z,{style:{marginTop:"-25px",fill:"#fff"}}))}):null);return!Ae&&fe===void 0||!le&&K===void 0?null:r.createElement(c.Header,{type:"Documentation",typeLink:It,title:B||g,subtitle:I||g},r.createElement(t.Z,{titleTemplate:"%s"},r.createElement("title",null,ze)),Et,O,D.renderComponentsByLocation(A.oZ.Header))}},16172:function(ee,s,e){"use strict";e.d(s,{b:function(){return g}});var r=e(2784),t=e(79692),l=e(15223),u=e(95544),A=e(80030),m=e(61837),o=e(48348),c=e(47603),f=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 C=y(),[O,D]=(0,r.useState)(null),U=(0,r.useCallback)(le=>{D(le.currentTarget)},[]),B=(0,r.useCallback)(()=>{D(null)},[]),{entityMetadata:{value:b,loading:I}}=(0,f.x1)(),x=(0,f.$L)(),M=x.renderComponentsByLocation(f.oZ.Subheader),K=x.renderComponentsByLocation(f.oZ.Settings);return!M&&!K||I===!1&&!b?null:r.createElement(l.Z,{classes:C,...E},r.createElement(u.Z,{display:"flex",justifyContent:"flex-end",width:"100%",flexWrap:"wrap"},M,K?r.createElement(r.Fragment,null,r.createElement(A.ZP,{title:"Settings"},r.createElement(m.Z,{"aria-controls":"tech-docs-reader-page-settings","aria-haspopup":"true",onClick:U},r.createElement(c.Z,null))),r.createElement(o.Z,{id:"tech-docs-reader-page-settings",getContentAnchorEl:null,anchorEl:O,anchorOrigin:{vertical:"bottom",horizontal:"right"},open:Boolean(O),onClose:B,keepMounted:!0},K)):null))}},2263:function(ee,s,e){"use strict";e.d(s,{DK:function(){return g},m1:function(){return C}});var r=e(2784),t=e(10289),l=e(26136),u=e(36964),A=e(64279),m=e(77446);function o({contentLoading:O,content:D,activeSyncState:U}){return O||U==="BUILD_READY_RELOAD"||!D&&U==="CHECKING"?"CHECKING":!D&&U==="BUILDING"?"INITIAL_BUILD":D?U==="BUILDING"?"CONTENT_STALE_REFRESHING":U==="BUILD_READY"?"CONTENT_STALE_READY":U==="ERROR"?"CONTENT_STALE_ERROR":"CONTENT_FRESH":"CONTENT_NOT_FOUND"}function c(O,D){const U={...O};switch(D.type){case"sync":D.state==="CHECKING"&&(U.buildLog=[]),U.activeSyncState=D.state,U.syncError=D.syncError;break;case"contentLoading":U.contentLoading=!0,U.contentError=void 0;break;case"content":typeof D.path=="string"&&(U.path=D.path),U.contentLoading=!1,U.content=D.content,U.contentError=D.contentError;break;case"buildLog":U.buildLog=U.buildLog.concat(D.log);break;default:throw new Error}return["BUILD_READY","BUILD_READY_RELOAD"].includes(U.activeSyncState)&&["contentLoading","content"].includes(D.type)&&(U.activeSyncState="UP_TO_DATE",U.buildLog=[]),U}function f(O,D,U,B){var fe,Ae;const[b,I]=(0,r.useReducer)(c,{activeSyncState:"CHECKING",path:B,contentLoading:!0,buildLog:[]}),x=(0,u.useApi)(l.Dl),{retry:M}=(0,m.Z)(async()=>{I({type:"contentLoading"});try{const xe=await x.getEntityDocs({kind:O,namespace:D,name:U},B);return I({type:"content",content:xe,path:B}),xe}catch(xe){I({type:"content",contentError:xe,path:B})}},[x,O,D,U,B]),K=(0,r.useRef)({content:void 0,reload:()=>{}});return K.current={content:b.content,reload:M},(0,A.default)(async()=>{I({type:"sync",state:"CHECKING"});const xe=setTimeout(()=>{I({type:"sync",state:"BUILDING"})},1e3);try{switch(await x.syncEntityDocs({kind:O,namespace:D,name:U},He=>{I({type:"buildLog",log:He})})){case"updated":K.current.content?I({type:"sync",state:"BUILD_READY"}):(K.current.reload(),I({type:"sync",state:"BUILD_READY_RELOAD"}));break;case"cached":I({type:"sync",state:"UP_TO_DATE"});break;default:I({type:"sync",state:"ERROR",syncError:new Error("Unexpected return state")});break}}catch(ze){I({type:"sync",state:"ERROR",syncError:ze})}finally{clearTimeout(xe)}},[O,U,D,x,I,K]),{state:(0,r.useMemo)(()=>o({activeSyncState:b.activeSyncState,contentLoading:b.contentLoading,content:b.content}),[b.activeSyncState,b.content,b.contentLoading]),contentReload:M,path:b.path,content:b.content,contentErrorMessage:(fe=b.contentError)==null?void 0:fe.toString(),syncErrorMessage:(Ae=b.syncError)==null?void 0:Ae.toString(),buildLog:b.buildLog}}const y=(0,r.createContext)({}),g=()=>(0,r.useContext)(y),E=({children:O})=>{const{"*":D=""}=(0,t.UO)(),{entityRef:U}=(0,l.x1)(),{kind:B,namespace:b,name:I}=U,x=f(B,b,I,D);return r.createElement(y.Provider,{value:x},O instanceof Function?O(x):O)},C=O=>D=>r.createElement(E,null,r.createElement(O,{...D}))},96393:function(ee,s,e){"use strict";e.d(s,{Fq:function(){return u.F},SE:function(){return l.S}});var r=e(2263),t=e(26220),l=e(99954),u=e(63126),A=e(16172)},68725:function(ee,s,e){"use strict";e.d(s,{Fw:function(){return l},_Z:function(){return t},pd:function(){return u}});var r=e(36964);const t=(0,r.createRouteRef)({id:"techdocs:index-page"}),l=(0,r.createRouteRef)({id:"techdocs:reader-page",params:["namespace","kind","name"]}),u=(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),l=e(49378),u=e(38402),A=e(86136),m=e(85256),o=e(82339),c=e(36964),f=e(74450);const y=(0,t.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",marginBottom:"1rem"}}),g=le=>{const{result:fe,highlight:Ae,rank:xe,lineClamp:ze=5,asListItem:He=!0,asLink:Se=!0,title:Ye,icon:rt}=le,It=y(),Et=(0,c.useAnalytics)(),Pe=()=>{Et.captureEvent("discover",fe.title,{attributes:{to:fe.location},value:xe})},mt=()=>{const me=Ae!=null&&Ae.fields.title?r.createElement(f.FA,{text:Ae.fields.title,preTag:Ae.preTag,postTag:Ae.postTag}):fe.title,we=Ae!=null&&Ae.fields.entityTitle?r.createElement(f.FA,{text:Ae.fields.entityTitle,preTag:Ae.preTag,postTag:Ae.postTag}):fe.entityTitle,$e=Ae!=null&&Ae.fields.name?r.createElement(f.FA,{text:Ae.fields.name,preTag:Ae.preTag,postTag:Ae.postTag}):fe.name;return r.createElement(l.Z,{className:It.itemText,primaryTypographyProps:{variant:"h6"},primary:Ye||r.createElement(r.Fragment,null,me," | ",we!=null?we:$e," docs"),secondary:r.createElement("span",{style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:ze,overflow:"hidden"}},Ae!=null&&Ae.fields.text?r.createElement(f.FA,{text:Ae.fields.text,preTag:Ae.preTag,postTag:Ae.postTag}):fe.text)})},Xe=({children:me})=>Se?r.createElement(o.Link,{noTrack:!0,to:fe.location,onClick:Pe},me):r.createElement(r.Fragment,null,me),se=({children:me})=>He?r.createElement(r.Fragment,null,r.createElement(u.Z,{alignItems:"flex-start"},rt&&r.createElement(A.Z,null,rt),r.createElement("div",{className:It.flexContainer},me)),r.createElement(m.Z,{component:"li"})):r.createElement(r.Fragment,null,me);return r.createElement(Xe,null,r.createElement(se,null,r.createElement(mt,null)))};var E=e(86619),C=e(50581),O=e(61837),D=e(4614),U=e(21853),B=e(88013),b=e(10289),I=e(48760);const x=(0,t.Z)({root:{width:"100%"}}),M=le=>{const{entityId:fe,entityTitle:Ae,debounceTime:xe=150}=le,[ze,He]=(0,r.useState)(!1),Se=(0,b.s0)(),{term:Ye,setTerm:rt,setFilters:It,result:{loading:Et,value:Pe}}=(0,f.Rx)(),mt=x(),[Xe,se]=(0,r.useState)([]);(0,r.useEffect)(()=>{let ae=!0;if(ae&&Pe){const ue=Pe.results.slice(0,10);se(ue)}return()=>{ae=!1}},[Et,Pe]);const[me,we]=(0,r.useState)(Ye);(0,I.Z)(()=>rt(me),xe,[me]);const{kind:$e,name:je,namespace:it}=fe;(0,r.useEffect)(()=>{It(ae=>({...ae,kind:$e,namespace:it,name:je}))},[$e,it,je,It]);const Je=ae=>{ze||He(!0),we(ae.target.value)},Ct=(ae,ue)=>{if(ue!=null&&ue.document){const{location:Qe}=ue.document;Se(Qe)}};return r.createElement(B.ZP,{classes:{root:mt.root},"data-testid":"techdocs-search-bar",size:"small",open:ze,getOptionLabel:()=>"",filterOptions:ae=>ae,onClose:()=>{He(!1)},onFocus:()=>{He(!0)},onChange:Ct,blurOnSelect:!0,noOptionsText:"No results found",value:null,options:Xe,renderOption:({document:ae,highlight:ue})=>r.createElement(g,{result:ae,lineClamp:3,asListItem:!1,asLink:!1,title:ae.title,highlight:ue}),loading:Et,renderInput:ae=>r.createElement(E.Z,{...ae,"data-testid":"techdocs-search-bar-input",variant:"outlined",fullWidth:!0,placeholder:`Search ${Ae||fe.name} docs`,value:me,onChange:Je,InputProps:{...ae.InputProps,startAdornment:r.createElement(C.Z,{position:"start"},r.createElement(O.Z,{"aria-label":"Query",disabled:!0},r.createElement(U.Z,null))),endAdornment:r.createElement(r.Fragment,null,Et?r.createElement(D.Z,{color:"inherit",size:20}):null,ae.InputProps.endAdornment)}})})},K=le=>{const fe={term:"",types:["techdocs"],pageCursor:"",filters:le.entityId};return r.createElement(f.Nd,{initialState:fe},r.createElement(M,{...le}))}},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.a9307e40.js.map