@techdocs/cli 1.1.0 → 1.1.1-next.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/cjs/{PublisherConfig-162efac5.cjs.js → PublisherConfig-7a0dc71c.cjs.js} +32 -28
  3. package/dist/cjs/PublisherConfig-7a0dc71c.cjs.js.map +1 -0
  4. package/dist/cjs/{generate-67f1ab98.cjs.js → generate-b637bb78.cjs.js} +14 -14
  5. package/dist/cjs/generate-b637bb78.cjs.js.map +1 -0
  6. package/dist/cjs/{migrate-181e95f5.cjs.js → migrate-122ec4bf.cjs.js} +9 -9
  7. package/dist/cjs/migrate-122ec4bf.cjs.js.map +1 -0
  8. package/dist/cjs/{mkdocs-7c045a2a.cjs.js → mkdocs-3c3898e8.cjs.js} +11 -11
  9. package/dist/cjs/mkdocs-3c3898e8.cjs.js.map +1 -0
  10. package/dist/cjs/{publish-7bf1e5f7.cjs.js → publish-efa348a5.cjs.js} +7 -7
  11. package/dist/cjs/publish-efa348a5.cjs.js.map +1 -0
  12. package/dist/cjs/{serve-66a37894.cjs.js → serve-aa1ff626.cjs.js} +12 -12
  13. package/dist/cjs/serve-aa1ff626.cjs.js.map +1 -0
  14. package/dist/embedded-app/.config-schema.json +56 -0
  15. package/dist/embedded-app/index.html +1 -1
  16. package/dist/embedded-app/static/1553.0a1ffcc9.chunk.js +3 -0
  17. package/dist/embedded-app/static/1553.0a1ffcc9.chunk.js.map +1 -0
  18. package/dist/embedded-app/static/{1959.38a96998.chunk.js → 1959.54b727f3.chunk.js} +2 -2
  19. package/dist/embedded-app/static/{1959.38a96998.chunk.js.map → 1959.54b727f3.chunk.js.map} +1 -1
  20. package/dist/embedded-app/static/2426.75b31251.chunk.js +3 -0
  21. package/dist/embedded-app/static/2426.75b31251.chunk.js.map +1 -0
  22. package/dist/embedded-app/static/3860.8a0dac3d.chunk.js +3 -0
  23. package/dist/embedded-app/static/3860.8a0dac3d.chunk.js.map +1 -0
  24. package/dist/embedded-app/static/390.97868757.chunk.js +3 -0
  25. package/dist/embedded-app/static/390.97868757.chunk.js.map +1 -0
  26. package/dist/embedded-app/static/4022.f3d67914.chunk.js +3 -0
  27. package/dist/embedded-app/static/{2426.56947b7f.chunk.js.map → 4022.f3d67914.chunk.js.map} +1 -1
  28. package/dist/embedded-app/static/6235.5c01917c.chunk.js +3 -0
  29. package/dist/embedded-app/static/6235.5c01917c.chunk.js.map +1 -0
  30. package/dist/embedded-app/static/7110.4f2d78ba.chunk.js +3 -0
  31. package/dist/embedded-app/static/{7110.7d2c1934.chunk.js.map → 7110.4f2d78ba.chunk.js.map} +1 -1
  32. package/dist/embedded-app/static/7758.e94e2380.chunk.js +3 -0
  33. package/dist/embedded-app/static/{7758.f316879f.chunk.js.map → 7758.e94e2380.chunk.js.map} +1 -1
  34. package/dist/embedded-app/static/8061.a19d3b9a.chunk.js +3 -0
  35. package/dist/embedded-app/static/8061.a19d3b9a.chunk.js.map +1 -0
  36. package/dist/embedded-app/static/8792.2624b294.chunk.js +3 -0
  37. package/dist/embedded-app/static/8792.2624b294.chunk.js.map +1 -0
  38. package/dist/embedded-app/static/9028.e4b797db.chunk.js +3 -0
  39. package/dist/embedded-app/static/9028.e4b797db.chunk.js.map +1 -0
  40. package/dist/embedded-app/static/main.536dc3bc.js +476 -0
  41. package/dist/embedded-app/static/main.536dc3bc.js.map +1 -0
  42. package/dist/embedded-app/static/module-ajv.d6f6d109.js +3 -3
  43. package/dist/embedded-app/static/module-ajv.d6f6d109.js.map +1 -1
  44. package/dist/embedded-app/static/module-date-fns.5015b34b.js +3 -0
  45. package/dist/embedded-app/static/module-date-fns.5015b34b.js.map +1 -0
  46. package/dist/embedded-app/static/module-hot-loader.7c7a4226.js +25 -0
  47. package/dist/embedded-app/static/module-hot-loader.7c7a4226.js.map +1 -0
  48. package/dist/embedded-app/static/{module-material-table.cbad0c40.js → module-material-table.fcca9670.js} +2 -2
  49. package/dist/embedded-app/static/{module-material-table.cbad0c40.js.map → module-material-table.fcca9670.js.map} +1 -1
  50. package/dist/embedded-app/static/{module-material-ui.84a6ac87.js → module-material-ui.2f7d5af1.js} +2 -2
  51. package/dist/embedded-app/static/module-material-ui.2f7d5af1.js.map +1 -0
  52. package/dist/embedded-app/static/react-syntax-highlighter/lowlight-import.c14d776e.chunk.js +1 -1
  53. package/dist/embedded-app/static/{runtime.3efd9679.js → runtime.536dc3bc.js} +2 -2
  54. package/dist/embedded-app/static/runtime.536dc3bc.js.map +1 -0
  55. package/dist/embedded-app/static/vendor.536dc3bc.js +105 -0
  56. package/dist/embedded-app/static/vendor.536dc3bc.js.map +1 -0
  57. package/dist/index.cjs.js +10 -14
  58. package/dist/index.cjs.js.map +1 -1
  59. package/package.json +10 -10
  60. package/dist/cjs/PublisherConfig-162efac5.cjs.js.map +0 -1
  61. package/dist/cjs/generate-67f1ab98.cjs.js.map +0 -1
  62. package/dist/cjs/migrate-181e95f5.cjs.js.map +0 -1
  63. package/dist/cjs/mkdocs-7c045a2a.cjs.js.map +0 -1
  64. package/dist/cjs/publish-7bf1e5f7.cjs.js.map +0 -1
  65. package/dist/cjs/serve-66a37894.cjs.js.map +0 -1
  66. package/dist/embedded-app/static/1553.a26067ce.chunk.js +0 -3
  67. package/dist/embedded-app/static/1553.a26067ce.chunk.js.map +0 -1
  68. package/dist/embedded-app/static/2426.56947b7f.chunk.js +0 -3
  69. package/dist/embedded-app/static/3860.da7e5f63.chunk.js +0 -3
  70. package/dist/embedded-app/static/3860.da7e5f63.chunk.js.map +0 -1
  71. package/dist/embedded-app/static/390.a67c5759.chunk.js +0 -3
  72. package/dist/embedded-app/static/390.a67c5759.chunk.js.map +0 -1
  73. package/dist/embedded-app/static/4022.fa355d30.chunk.js +0 -3
  74. package/dist/embedded-app/static/4022.fa355d30.chunk.js.map +0 -1
  75. package/dist/embedded-app/static/6235.ec27c62a.chunk.js +0 -3
  76. package/dist/embedded-app/static/6235.ec27c62a.chunk.js.map +0 -1
  77. package/dist/embedded-app/static/7110.7d2c1934.chunk.js +0 -3
  78. package/dist/embedded-app/static/7758.f316879f.chunk.js +0 -3
  79. package/dist/embedded-app/static/8061.ec7736bc.chunk.js +0 -3
  80. package/dist/embedded-app/static/8061.ec7736bc.chunk.js.map +0 -1
  81. package/dist/embedded-app/static/8792.8a74fd9c.chunk.js +0 -3
  82. package/dist/embedded-app/static/8792.8a74fd9c.chunk.js.map +0 -1
  83. package/dist/embedded-app/static/9028.77f3e990.chunk.js +0 -3
  84. package/dist/embedded-app/static/9028.77f3e990.chunk.js.map +0 -1
  85. package/dist/embedded-app/static/main.3efd9679.js +0 -476
  86. package/dist/embedded-app/static/main.3efd9679.js.map +0 -1
  87. package/dist/embedded-app/static/module-aria-query.f720b73c.js +0 -9
  88. package/dist/embedded-app/static/module-aria-query.f720b73c.js.map +0 -1
  89. package/dist/embedded-app/static/module-date-fns.a08d117e.js +0 -3
  90. package/dist/embedded-app/static/module-date-fns.a08d117e.js.map +0 -1
  91. package/dist/embedded-app/static/module-hot-loader.7955a91c.js +0 -32
  92. package/dist/embedded-app/static/module-hot-loader.7955a91c.js.map +0 -1
  93. package/dist/embedded-app/static/module-material-ui.84a6ac87.js.map +0 -1
  94. package/dist/embedded-app/static/module-testing-library.633b23c6.js +0 -57
  95. package/dist/embedded-app/static/module-testing-library.633b23c6.js.map +0 -1
  96. package/dist/embedded-app/static/runtime.3efd9679.js.map +0 -1
  97. package/dist/embedded-app/static/vendor.3efd9679.js +0 -117
  98. package/dist/embedded-app/static/vendor.3efd9679.js.map +0 -1
@@ -0,0 +1,476 @@
1
+ (()=>{var Hi=Object.defineProperty;var ji=(ee,s,e)=>s in ee?Hi(ee,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):ee[s]=e;var _=(ee,s,e)=>(ji(ee,typeof s!="symbol"?s+"":s,e),e),sa=(ee,s,e)=>{if(!s.has(ee))throw TypeError("Cannot "+e)};var Je=(ee,s,e)=>(sa(ee,s,"read from private field"),e?e.call(ee):s.get(ee)),An=(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)},Pn=(ee,s,e,r)=>(sa(ee,s,"write to private field"),r?r.call(ee,e):s.set(ee,e),e);(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[179],{30001:function(ee,s,e){"use strict";e.d(s,{n3:function(){return R},MS:function(){return m}});var r=e(48023),t=e(10179),c=e(96279),f=e.n(c);const R=Symbol.for("CATALOG_FILTER_EXISTS_0e15b590c0b343a2bae3e787e84c2111");class m{constructor(i){_(this,"discoveryApi");_(this,"fetchApi");this.discoveryApi=i.discoveryApi,this.fetchApi=i.fetchApi||{fetch:f()}}async getEntityAncestors(i,u){const{kind:y,namespace:g,name:v}=(0,r.of)(i.entityRef);return await this.requestRequired("GET",`/entities/by-name/${encodeURIComponent(y)}/${encodeURIComponent(g)}/${encodeURIComponent(v)}/ancestry`,u)}async getLocationById(i,u){return await this.requestOptional("GET",`/locations/${encodeURIComponent(i)}`,u)}async getEntities(i,u){const{filter:y=[],fields:g=[],offset:v,limit:T,after:L}=i!=null?i:{},B=[];for(const M of[y].flat()){const D=[];for(const[P,H]of Object.entries(M))for(const K of[H].flat())K===R?D.push(encodeURIComponent(P)):typeof K=="string"&&D.push(`${encodeURIComponent(P)}=${encodeURIComponent(K)}`);D.length&&B.push(`filter=${D.join(",")}`)}g.length&&B.push(`fields=${g.map(encodeURIComponent).join(",")}`),v!==void 0&&B.push(`offset=${v}`),T!==void 0&&B.push(`limit=${T}`),L!==void 0&&B.push(`after=${encodeURIComponent(L)}`);const k=B.length?`?${B.join("&")}`:"",F=await this.requestRequired("GET",`/entities${k}`,u),x=(M,D)=>{var K,ce;if(((K=M.metadata)==null?void 0:K.name)===void 0||M.kind===void 0||((ce=D.metadata)==null?void 0:ce.name)===void 0||D.kind===void 0)return 0;const P=(0,r.eE)(M),H=(0,r.eE)(D);return P<H?-1:P>H?1:0};return{items:F.sort(x)}}async getEntityByRef(i,u){const{kind:y,namespace:g,name:v}=(0,r.of)(i);return this.requestOptional("GET",`/entities/by-name/${encodeURIComponent(y)}/${encodeURIComponent(g)}/${encodeURIComponent(v)}`,u)}async getEntityByName(i,u){const{kind:y,namespace:g="default",name:v}=i;return this.requestOptional("GET",`/entities/by-name/${encodeURIComponent(y)}/${encodeURIComponent(g)}/${encodeURIComponent(v)}`,u)}async refreshEntity(i,u){const y=await this.fetchApi.fetch(`${await this.discoveryApi.getBaseUrl("catalog")}/refresh`,{headers:{"Content-Type":"application/json",...(u==null?void 0:u.token)&&{Authorization:`Bearer ${u==null?void 0:u.token}`}},method:"POST",body:JSON.stringify({entityRef:i})});if(y.status!==200)throw new Error(await y.text())}async getEntityFacets(i,u){const{filter:y=[],facets:g}=i,v=[];for(const L of[y].flat()){const B=[];for(const[k,F]of Object.entries(L))for(const x of[F].flat())x===R?B.push(encodeURIComponent(k)):typeof x=="string"&&B.push(`${encodeURIComponent(k)}=${encodeURIComponent(x)}`);B.length&&v.push(`filter=${B.join(",")}`)}for(const L of g)v.push(`facet=${encodeURIComponent(L)}`);const T=v.length?`?${v.join("&")}`:"";return await this.requestOptional("GET",`/entity-facets${T}`,u)}async addLocation({type:i="url",target:u,dryRun:y},g){const v=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:i,target:u})});if(v.status!==201)throw new Error(await v.text());const{location:T,entities:L,exists:B}=await v.json();if(!T)throw new Error(`Location wasn't added: ${u}`);return{location:T,entities:L,exists:B}}async getLocationByRef(i,u){return(await this.requestRequired("GET","/locations",u)).map(g=>g.data).find(g=>i===(0,r.NZ)(g))}async removeLocationById(i,u){await this.requestIgnored("DELETE",`/locations/${encodeURIComponent(i)}`,u)}async removeEntityByUid(i,u){await this.requestIgnored("DELETE",`/entities/by-uid/${encodeURIComponent(i)}`,u)}async requestIgnored(i,u,y){const g=`${await this.discoveryApi.getBaseUrl("catalog")}${u}`,v=y!=null&&y.token?{Authorization:`Bearer ${y.token}`}:{},T=await this.fetchApi.fetch(g,{method:i,headers:v});if(!T.ok)throw await t.VL.fromResponse(T)}async requestRequired(i,u,y){const g=`${await this.discoveryApi.getBaseUrl("catalog")}${u}`,v=y!=null&&y.token?{Authorization:`Bearer ${y.token}`}:{},T=await this.fetchApi.fetch(g,{method:i,headers:v});if(!T.ok)throw await t.VL.fromResponse(T);return await T.json()}async requestOptional(i,u,y){const g=`${await this.discoveryApi.getBaseUrl("catalog")}${u}`,v=y!=null&&y.token?{Authorization:`Bearer ${y.token}`}:{},T=await this.fetchApi.fetch(g,{method:i,headers:v});if(!T.ok){if(T.status===404)return;throw await t.VL.fromResponse(T)}return await T.json()}}},48023:function(ee,s,e){"use strict";e.d(s,{Tf:function(){return c},P1:function(){return re},q1:function(){return ue},M6:function(){return Q},l2:function(){return t},zG:function(){return r},w$:function(){return ae},nP:function(){return W},aS:function(){return _e},S4:function(){return Mt},cz:function(){return be},iB:function(){return de},of:function(){return Ce},Ou:function(){return pe},eE:function(){return Ve},NZ:function(){return ie}});const r="default",t="backstage.io/view-url",c="backstage.io/edit-url";var f=e(76635),R=e.n(f);class m{constructor(N=DEFAULT_NAMESPACE){_(this,"namespace");this.namespace=N}async enforce(N){return N.metadata.namespace?N:lodash.merge({metadata:{namespace:this.namespace}},N)}}class a{static isValidPrefixAndOrSuffix(N,te,Pe,De){if(typeof N!="string")return!1;const we=N.split(te);return we.length===1?De(we[0]):we.length===2?Pe(we[0])&&De(we[1]):!1}static isJsonSafe(N){try{return R().isEqual(N,JSON.parse(JSON.stringify(N)))}catch{return!1}}static isValidDnsSubdomain(N){return typeof N=="string"&&N.length>=1&&N.length<=253&&N.split(".").every(a.isValidDnsLabel)}static isValidDnsLabel(N){return typeof N=="string"&&N.length>=1&&N.length<=63&&/^[a-z0-9]+(\-[a-z0-9]+)*$/.test(N)}static isValidTag(N){return typeof N=="string"&&N.length>=1&&N.length<=63&&/^[a-z0-9+#]+(\-[a-z0-9+#]+)*$/.test(N)}static isValidUrl(N){if(typeof N!="string")return!1;try{return new URL(N),!0}catch{return!1}}static isValidString(N){var te;return typeof N=="string"&&((te=N==null?void 0:N.trim())==null?void 0:te.length)>=1}static isNonEmptyString(N){var te;return typeof N=="string"&&((te=N==null?void 0:N.trim())==null?void 0:te.length)>=1}}var i=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"EntityEnvelope","description":"The envelope skeleton parts of an entity - whatever is necessary to be able to give it a ref and pass to further validation / policy checking.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Component","metadata":{"name":"LoremService"}}],"type":"object","required":["apiVersion","kind","metadata"],"additionalProperties":true,"properties":{"apiVersion":{"type":"string","description":"The version of specification format for this particular entity that this is written against.","minLength":1,"examples":["backstage.io/v1alpha1","my-company.net/v1","1.0"]},"kind":{"type":"string","description":"The high level entity type being described.","minLength":1,"examples":["API","Component","Domain","Group","Location","Resource","System","Template","User"]},"metadata":{"type":"object","required":["name"],"additionalProperties":true,"properties":{"name":{"type":"string","description":"The name of the entity. Must be unique within the catalog at any given point in time, for any given namespace + kind pair.","examples":["metadata-proxy"],"minLength":1},"namespace":{"type":"string","description":"The namespace that the entity belongs to.","default":"default","examples":["default","admin"],"minLength":1}}}}}'),u=e(48231),y=e.n(u),g=JSON.parse(`{"$schema":"http://json-schema.org/draft-07/schema","$id":"Entity","description":"The parts of the format that's common to all versions/kinds of entity.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Component","metadata":{"name":"LoremService","description":"Creates Lorems like a pro.","labels":{"product_name":"Random value Generator"},"annotations":{"docs":"https://github.com/..../tree/develop/doc"}},"spec":{"type":"service","lifecycle":"production","owner":"tools"}}],"type":"object","required":["apiVersion","kind","metadata"],"additionalProperties":false,"properties":{"apiVersion":{"type":"string","description":"The version of specification format for this particular entity that this is written against.","minLength":1,"examples":["backstage.io/v1alpha1","my-company.net/v1","1.0"]},"kind":{"type":"string","description":"The high level entity type being described.","minLength":1,"examples":["API","Component","Domain","Group","Location","Resource","System","Template","User"]},"metadata":{"$ref":"EntityMeta"},"spec":{"type":"object","description":"The specification data describing the entity itself."},"relations":{"type":"array","description":"The relations that this entity has with other entities.","items":{"$ref":"common#relation"}},"status":{"$ref":"common#status"}}}`),v=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}}}}}}'),T=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"common","type":"object","description":"Common definitions to import from other schemas","definitions":{"reference":{"$id":"#reference","type":"object","description":"A reference by name to another entity.","required":["kind","namespace","name"],"additionalProperties":false,"properties":{"kind":{"type":"string","description":"The kind field of the entity.","minLength":1},"namespace":{"type":"string","description":"The metadata.namespace field of the entity.","minLength":1},"name":{"type":"string","description":"The metadata.name field of the entity.","minLength":1}}},"relation":{"$id":"#relation","type":"object","description":"A directed relation from one entity to another.","required":["type","target"],"additionalProperties":false,"properties":{"type":{"type":"string","minLength":1,"pattern":"^\\\\w+$","description":"The type of relation."},"target":{"$ref":"#reference"}}},"status":{"$id":"#status","type":"object","description":"The current status of the entity, as claimed by various sources.","required":[],"additionalProperties":true,"properties":{"items":{"type":"array","items":{"$ref":"#statusItem"}}}},"statusItem":{"$id":"#statusItem","type":"object","description":"A specific status item on a well known format.","required":["type","level","message"],"additionalProperties":true,"properties":{"type":{"type":"string","minLength":1},"level":{"$ref":"#statusLevel","description":"The status level / severity of the status item."},"message":{"type":"string","description":"A brief message describing the status, intended for human consumption."},"error":{"$ref":"#error","description":"An optional serialized error object related to the status."}}},"statusLevel":{"$id":"#statusLevel","type":"string","description":"A status level / severity.","enum":["info","warning","error"]},"error":{"$id":"#error","type":"object","description":"A serialized error object.","required":["name","message"],"additionalProperties":true,"properties":{"name":{"type":"string","examples":["Error","InputError"],"description":"The type name of the error","minLength":1},"message":{"type":"string","description":"The message of the error"},"code":{"type":"string","description":"An error code associated with the error"},"stack":{"type":"string","description":"An error stack trace"}}}}}');const L=new Map,B=[i,g,v,T];function k(J){if(!(J!=null&&J.length))throw new TypeError("Unknown error");const N=J[0];throw new TypeError(`${N.instancePath||"<root>"} ${N.message}${N.params?` - ${Object.entries(N.params).map(([te,Pe])=>`${te}: ${Pe}`).join(", ")}`:""}`)}function F(J,N={}){var ht;const te=(ht=N==null?void 0:N.disableCache)!=null?ht:!1,Pe=te?"":JSON.stringify(J);if(!te){const Lt=L.get(Pe);if(Lt)return Lt}const De=x(J),we=new(y())({allowUnionTypes:!0,allErrors:!0,validateSchema:!0});De.length&&we.addSchema(De,void 0,void 0,!0);const Ne=we.compile(J);return te||L.set(Pe,Ne),Ne}function x(J){if(typeof J!="object")return[];const N=new Set;J.$id&&N.add(J.$id);const te=new Array,Pe=[J];for(;Pe.length;){const De=Pe.pop();for(const we of M(De))if(!N.has(we)){N.add(we);const Ne=B.find(ht=>ht.$id===we);Ne&&(te.push(Ne),Pe.push(Ne))}}return te}function*M(J){const N=[J];for(;N.length;){const te=N.pop();if(typeof te=="object"&&te)for(const[Pe,De]of Object.entries(te))Pe==="$ref"&&typeof De=="string"?yield De.split("#")[0]:N.push(De)}}function D(J){const N=compileAjvSchema(J||entityEnvelopeSchema);return te=>{if(N(te)===!0)return te;throw throwAjvError(N.errors)}}function P(J){const N=F(J);return te=>{var we;if(N(te)===!0)return te;const De=(we=N.errors)==null?void 0:we.filter(Ne=>["/kind","/apiVersion"].includes(Ne.instancePath));if((De==null?void 0:De.length)&&De.every(Ne=>Ne.keyword==="enum"))return!1;throw k(N.errors)}}function H(J){const N=compileAjvSchema(J||entitySchema);return te=>{if(N(te)===!0)return te;throw throwAjvError(N.errors)}}class K{static isValidApiVersion(N){return a.isValidPrefixAndOrSuffix(N,"/",a.isValidDnsSubdomain,te=>te.length>=1&&te.length<=63&&/^[a-z0-9A-Z]+$/.test(te))}static isValidKind(N){return typeof N=="string"&&N.length>=1&&N.length<=63&&/^[a-zA-Z][a-z0-9A-Z]*$/.test(N)}static isValidObjectName(N){return typeof N=="string"&&N.length>=1&&N.length<=63&&/^([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$/.test(N)}static isValidNamespace(N){return a.isValidDnsLabel(N)}static isValidLabelKey(N){return a.isValidPrefixAndOrSuffix(N,"/",a.isValidDnsSubdomain,K.isValidObjectName)}static isValidLabelValue(N){return N===""||K.isValidObjectName(N)}static isValidAnnotationKey(N){return a.isValidPrefixAndOrSuffix(N,"/",a.isValidDnsSubdomain,K.isValidObjectName)}static isValidAnnotationValue(N){return typeof N=="string"}}const ce={isValidApiVersion:K.isValidApiVersion,isValidKind:K.isValidKind,isValidEntityName:K.isValidObjectName,isValidNamespace:K.isValidNamespace,isValidLabelKey:K.isValidLabelKey,isValidLabelValue:K.isValidLabelValue,isValidAnnotationKey:K.isValidAnnotationKey,isValidAnnotationValue:K.isValidAnnotationValue,isValidTag:J=>typeof J=="string"&&J.length>=1&&J.length<=63&&/^[a-z0-9:+#]+(\-[a-z0-9:+#]+)*$/.test(J)};function We(J={}){return{...ce,...J}}class Ze{constructor(N=makeValidator()){_(this,"validators");this.validators=N}async enforce(N){var Ne,ht,Lt,Et,Ut,dt,gt;function te(Qe,Ot,nn){if(Ot==null)throw new Error(`${Qe} must have a value`);let bt;try{bt=nn(Ot)}catch(at){throw new Error(`${Qe} could not be validated, ${at}`)}if(!bt){let at;switch(nn.name){case"isValidLabelValue":case"isValidObjectName":at="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":at="a valid prefix and/or suffix";break;case"isValidNamespace":case"isValidDnsLabel":at="a string that is sequences of [a-z0-9] separated by [-], at most 63 characters in total";break;case"isValidTag":at="a string that is sequences of [a-z0-9+#] separated by [-], at most 63 characters in total";break;case"isValidAnnotationValue":at="a string";break;case"isValidKind":at="a string that is a sequence of [a-zA-Z][a-z0-9A-Z], at most 63 characters in total";break;case"isValidUrl":at="a string that is a valid url";break;case"isValidString":case"isNonEmptyString":at="a non empty string";break;default:at=void 0;break}const pt=at?` expected ${at} but found "${Ot}".`:"";throw new Error(`"${Qe}" is not valid;${pt} 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 Pe(Qe,Ot,nn){return Ot===void 0||te(Qe,Ot,nn)}te("apiVersion",N.apiVersion,this.validators.isValidApiVersion),te("kind",N.kind,this.validators.isValidKind),te("metadata.name",N.metadata.name,this.validators.isValidEntityName),Pe("metadata.namespace",N.metadata.namespace,this.validators.isValidNamespace);for(const[Qe,Ot]of Object.entries((Ne=N.metadata.labels)!=null?Ne:[]))te(`labels.${Qe}`,Qe,this.validators.isValidLabelKey),te(`labels.${Qe}`,Ot,this.validators.isValidLabelValue);for(const[Qe,Ot]of Object.entries((ht=N.metadata.annotations)!=null?ht:[]))te(`annotations.${Qe}`,Qe,this.validators.isValidAnnotationKey),te(`annotations.${Qe}`,Ot,this.validators.isValidAnnotationValue);const De=(Lt=N.metadata.tags)!=null?Lt:[];for(let Qe=0;Qe<De.length;++Qe)te(`tags.${Qe}`,De[Qe],this.validators.isValidTag);const we=(Et=N.metadata.links)!=null?Et:[];for(let Qe=0;Qe<we.length;++Qe)te(`links.${Qe}.url`,(Ut=we[Qe])==null?void 0:Ut.url,CommonValidatorFunctions.isValidUrl),Pe(`links.${Qe}.title`,(dt=we[Qe])==null?void 0:dt.title,CommonValidatorFunctions.isNonEmptyString),Pe(`links.${Qe}.icon`,(gt=we[Qe])==null?void 0:gt.icon,KubernetesValidatorFunctions.isValidObjectName);return N}}class me{constructor(){_(this,"validate")}async enforce(N){if(!this.validate){const De=new Ajv({allowUnionTypes:!0});this.validate=De.addSchema([commonSchema,entityMetaSchema],void 0,void 0,!0).compile(entitySchema)}if(this.validate(N)===!0)return N;const[Pe]=this.validate.errors||[];throw Pe?new Error(`Malformed envelope, ${Pe.instancePath||"<root>"} ${Pe.message}`):new Error("Malformed envelope, Unknown error")}}function je(J){let N=J.indexOf(":");const te=J.indexOf("/");te!==-1&&te<N&&(N=-1);const Pe=N===-1?void 0:J.slice(0,N),De=te===-1?void 0:J.slice(N+1,te),we=J.slice(Math.max(N+1,te+1));if(Pe===""||De===""||we==="")throw new TypeError(`Entity reference "${J}" was not on the form [<kind>:][<namespace>/]<name>`);return{kind:Pe,namespace:De,name:we}}function de(J){return{kind:J.kind,namespace:J.metadata.namespace||r,name:J.metadata.name}}function Ce(J,N){var ht,Lt,Et,Ut;if(!J)throw new Error("Entity reference must not be empty");const te=N==null?void 0:N.defaultKind,Pe=(N==null?void 0:N.defaultNamespace)||r;let De,we,Ne;if(typeof J=="string"){const dt=je(J);De=(ht=dt.kind)!=null?ht:te,we=(Lt=dt.namespace)!=null?Lt:Pe,Ne=dt.name}else De=(Et=J.kind)!=null?Et:te,we=(Ut=J.namespace)!=null?Ut:Pe,Ne=J.name;if(De)if(we){if(!Ne){const dt=JSON.stringify(J);throw new Error(`Entity reference ${dt} had missing or empty name`)}}else{const dt=JSON.stringify(J);throw new Error(`Entity reference ${dt} had missing or empty namespace`)}else{const dt=JSON.stringify(J);throw new Error(`Entity reference ${dt} had missing or empty kind (e.g. did not start with "component:" or similar)`)}return{kind:De,namespace:we,name:Ne}}function Ve(J){var De,we;let N,te,Pe;return"metadata"in J?(N=J.kind,te=(De=J.metadata.namespace)!=null?De:r,Pe=J.metadata.name):(N=J.kind,te=(we=J.namespace)!=null?we:r,Pe=J.name),`${N.toLocaleLowerCase("en-US")}:${te.toLocaleLowerCase("en-US")}/${Pe.toLocaleLowerCase("en-US")}`}class Ke{constructor(N){this.policies=N}async enforce(N){let te=N;for(const Pe of this.policies){const De=await Pe.enforce(te);if(!De)throw new Error(`Policy ${Pe.constructor.name} did not return a result`);te=De}return te}}class qe{constructor(N){this.policies=N}async enforce(N){for(const te of this.policies){const Pe=await te.enforce(N);if(Pe)return Pe}throw new Error("The entity did not match any known policy")}}const Re={allOf(J){return new Ke(J)},oneOf(J){return new qe(J)}};var Fe=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"ApiV1alpha1","description":"An API describes an interface that can be exposed by a component. The API can be defined in different formats, like OpenAPI, AsyncAPI, GraphQL, gRPC, or other formats.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"API","metadata":{"name":"artist-api","description":"Retrieve artist details","labels":{"product_name":"Random value Generator"},"annotations":{"docs":"https://github.com/..../tree/develop/doc"}},"spec":{"type":"openapi","lifecycle":"production","owner":"artist-relations-team","system":"artist-engagement-portal","definition":"openapi: \\"3.0.0\\"\\ninfo:..."}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1alpha1","backstage.io/v1beta1"]},"kind":{"enum":["API"]},"spec":{"type":"object","required":["type","lifecycle","owner","definition"],"properties":{"type":{"type":"string","description":"The type of the API definition.","examples":["openapi","asyncapi","graphql","grpc"],"minLength":1},"lifecycle":{"type":"string","description":"The lifecycle state of the API.","examples":["experimental","production","deprecated"],"minLength":1},"owner":{"type":"string","description":"An entity reference to the owner of the API.","examples":["artist-relations-team","user:john.johnson"],"minLength":1},"system":{"type":"string","description":"An entity reference to the system that the API belongs to.","minLength":1},"definition":{"type":"string","description":"The definition of the API, based on the format defined by the type.","minLength":1}}}}}]}');function Ue(J){const N=P(J);return{async check(te){return N(te)===te}}}const Ye=Ue(Fe);var it=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 Rt=Ue(it);var nt=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 ut=Ue(nt);var tt=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 rt=Ue(tt);var Bt=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 jt=Ue(Bt),Mt="ownedBy",In="ownerOf",Xt="consumesApi",yt="apiConsumedBy",un="providesApi",se="apiProvidedBy",W="dependsOn",ae="dependencyOf",ge="parentOf",ye="childOf",Oe="memberOf",ze="hasMember",be="partOf",_e="hasPart";var ct=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 wt=Ue(ct);var It=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 lt=Ue(It);var Tt=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 qt=Ue(Tt),re="backstage.io/managed-by-location",ue="backstage.io/managed-by-origin-location",Q="backstage.io/source-location";function pe(J){if(typeof J!="string")throw new TypeError(`Unable to parse location ref '${J}', unexpected argument ${typeof J}`);const N=J.indexOf(":");if(N<0)throw new TypeError(`Unable to parse location ref '${J}', expected '<type>:<target>', e.g. 'url:https://host/path'`);const te=J.substring(0,N).trim(),Pe=J.substring(N+1).trim();if(!te||!Pe)throw new TypeError(`Unable to parse location ref '${J}', expected '<type>:<target>', e.g. 'url:https://host/path'`);if(te==="http"||te==="https")throw new TypeError(`Invalid location ref '${J}', please prefix it with 'url:', e.g. 'url:${J}'`);return{type:te,target:Pe}}function ie(J){const{type:N,target:te}=J;if(N){if(!te)throw new TypeError("Unable to stringify location ref, empty target")}else throw new TypeError("Unable to stringify location ref, empty type");return`${N}:${te}`}function Be(J){var te,Pe,De,we,Ne;const N=(Ne=(Pe=(te=J.metadata)==null?void 0:te.annotations)==null?void 0:Pe[ANNOTATION_SOURCE_LOCATION])!=null?Ne:(we=(De=J.metadata)==null?void 0:De.annotations)==null?void 0:we[ANNOTATION_LOCATION];if(!N)throw new Error(`Entity '${stringifyEntityRef(J)}' is missing location`);return pe(N)}},23235:function(ee,s,e){"use strict";e.d(s,{C:function(){return t}});var r=e(98005);class t{constructor(){_(this,"subject",new r.J)}post(f){this.subject.next(f)}alert$(){return this.subject}}},47150:function(ee,s,e){"use strict";e.d(s,{g:function(){return r}});class r{captureEvent(c){}}},58652:function(ee,s,e){"use strict";e.d(s,{C:function(){return c}});var r=e(98005);const t="theme";class c{constructor(R){_(this,"activeThemeId");_(this,"subject",new r.X(void 0));this.themes=R}static createWithStorage(R){var i;const m=new c(R);if(!window.localStorage)return m;const a=(i=window.localStorage.getItem(t))!=null?i:void 0;return m.setActiveThemeId(a),m.activeThemeId$().subscribe(u=>{u?window.localStorage.setItem(t,u):window.localStorage.removeItem(t)}),window.addEventListener("storage",u=>{var y;if(u.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(R){this.activeThemeId=R,this.subject.next(R)}}},14721:function(ee,s,e){"use strict";e.d(s,{m:function(){return u}});var r=e(9850),t=e.n(r),c=e(12782),f=e.n(c);const R=/^[a-z][a-z0-9]*(?:[-_][a-z][a-z0-9]*)*$/i;function m(y){return typeof y=="object"&&y!==null&&!Array.isArray(y)}function a(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 i={type(y,g,v,T){return`Invalid type in config for key '${y}' in '${g}', got ${v}, wanted ${T}`},missing(y){return`Missing required config value at '${y}'`},convert(y,g,v){return`Unable to convert config value for key '${y}' in '${g}' to a ${v}`}};class u{constructor(g,v="mock-config",T,L=""){_(this,"filteredKeys");_(this,"notifiedFilteredKeys",new Set);this.data=g,this.context=v,this.fallback=T,this.prefix=L}static fromConfigs(g){return g.length===0?new u(void 0):g.reduce((v,{data:T,context:L,filteredKeys:B,deprecatedKeys:k})=>{const F=new u(T,L,v);if(F.filteredKeys=B,k)for(const{key:x,description:M}of k)console.warn(`The configuration key '${x}' of ${L} is deprecated and may be removed soon. ${M||""}`);return F},void 0)}has(g){var T,L;return this.readValue(g)!==void 0?!0:(L=(T=this.fallback)==null?void 0:T.has(g))!=null?L:!1}keys(){var T,L;const g=this.data?Object.keys(this.data):[],v=(L=(T=this.fallback)==null?void 0:T.keys())!=null?L:[];return[...new Set([...g,...v])]}get(g){const v=this.getOptional(g);if(v===void 0)throw new Error(i.missing(this.fullKey(g!=null?g:"")));return v}getOptional(g){var L;const v=t()(this.readValue(g)),T=(L=this.fallback)==null?void 0:L.getOptional(g);return v===void 0?T:T===void 0?v:f()({},{value:T},{value:v},(B,k)=>!m(k)||!m(B)?k:void 0).value}getConfig(g){const v=this.getOptionalConfig(g);if(v===void 0)throw new Error(i.missing(this.fullKey(g)));return v}getOptionalConfig(g){var L;const v=this.readValue(g),T=(L=this.fallback)==null?void 0:L.getOptionalConfig(g);if(m(v))return this.copy(v,g,T);if(v!==void 0)throw new TypeError(i.type(this.fullKey(g),this.context,a(v),"object"));return T}getConfigArray(g){const v=this.getOptionalConfigArray(g);if(v===void 0)throw new Error(i.missing(this.fullKey(g)));return v}getOptionalConfigArray(g){const v=this.readConfigValue(g,T=>{if(!Array.isArray(T))return{expected:"object-array"};for(const[L,B]of T.entries())if(!m(B))return{expected:"object-array",value:B,key:`${g}[${L}]`};return!0});if(!!v)return v.map((T,L)=>this.copy(T,`${g}[${L}]`))}getNumber(g){const v=this.getOptionalNumber(g);if(v===void 0)throw new Error(i.missing(this.fullKey(g)));return v}getOptionalNumber(g){const v=this.readConfigValue(g,L=>typeof L=="number"||typeof L=="string"||{expected:"number"});if(typeof v=="number"||v===void 0)return v;const T=Number(v);if(!Number.isFinite(T))throw new Error(i.convert(this.fullKey(g),this.context,"number"));return T}getBoolean(g){const v=this.getOptionalBoolean(g);if(v===void 0)throw new Error(i.missing(this.fullKey(g)));return v}getOptionalBoolean(g){return this.readConfigValue(g,v=>typeof v=="boolean"||{expected:"boolean"})}getString(g){const v=this.getOptionalString(g);if(v===void 0)throw new Error(i.missing(this.fullKey(g)));return v}getOptionalString(g){return this.readConfigValue(g,v=>typeof v=="string"&&v!==""||{expected:"string"})}getStringArray(g){const v=this.getOptionalStringArray(g);if(v===void 0)throw new Error(i.missing(this.fullKey(g)));return v}getOptionalStringArray(g){return this.readConfigValue(g,v=>{if(!Array.isArray(v))return{expected:"string-array"};for(const[T,L]of v.entries())if(typeof L!="string"||L==="")return{expected:"string-array",value:L,key:`${g}[${T}]`};return!0})}fullKey(g){return`${this.prefix}${this.prefix?".":""}${g}`}copy(g,v,T){const L=new u(g,this.context,T,this.fullKey(v));return L.filteredKeys=this.filteredKeys,L}readConfigValue(g,v){var B;const T=this.readValue(g);if(T===void 0)return(B=this.fallback)==null?void 0:B.readConfigValue(g,v);const L=v(T);if(L!==!0){const{key:k=g,value:F=T,expected:x}=L;throw new TypeError(i.type(this.fullKey(k),this.context,a(F),x))}return T}readValue(g){const v=g?g.split("."):[];for(const L of v)if(!R.test(L))throw new TypeError(`Invalid config key '${g}'`);if(this.data===void 0)return;let T=this.data;for(const[L,B]of v.entries())if(m(T))T=T[B];else if(T!==void 0){const k=this.fullKey(v.slice(0,L).join("."));throw new TypeError(i.type(k,this.context,a(T),"object"))}return T}}},4333:function(ee,s,e){"use strict";e.d(s,{p:function(){return t}});const r="Invalid discovery URL pattern,";class t{static compile(f){const R=f.split(/\{\{\s*pluginId\s*\}\}/),m=R.join("pluginId");let a;try{a=new URL(m)}catch{throw new Error(`${r} URL '${m}' is invalid`)}if(a.hash)throw new Error(`${r} URL must not have a hash`);if(a.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(R)}constructor(f){this.parts=f}async getBaseUrl(f){return this.parts.join(f)}}},89536:function(ee,s,e){"use strict";e.d(s,{KN:function(){return r},gr:function(){return c},Jv:function(){return f}});class r{constructor(m,a){this.alertApi=m,this.errorApi=a}post(m,a){return a!=null&&a.hidden||this.alertApi.post({message:m.message,severity:"error"}),this.errorApi.post(m,a)}error$(){return this.errorApi.error$()}}var t=e(98005);class c{constructor(){_(this,"subject",new t.J)}post(m,a){this.subject.next({error:m,context:a})}error$(){return this.subject}}class f{static forward(m,a){window.addEventListener("unhandledrejection",i=>{m.post(i.reason,a)})}}},14884:function(ee,s,e){"use strict";e.d(s,{b:function(){return c}});var r=e(36964);function t(f){if(f.length<3)throw new Error(`The '${f}' feature flag must have a minimum length of three characters.`);if(f.length>150)throw new Error(`The '${f}' feature flag must not exceed 150 characters.`);if(!f.match(/^[a-z]+[a-z0-9-]+$/))throw new Error(`The '${f}' feature flag must start with a lowercase letter and only contain lowercase letters, numbers and hyphens. Examples: feature-flag-one, alpha, release-2020`)}class c{constructor(){_(this,"registeredFeatureFlags",[]);_(this,"flags")}registerFlag(R){t(R.name),this.registeredFeatureFlags.push(R)}getRegisteredFlags(){return this.registeredFeatureFlags.slice()}isActive(R){return this.flags||(this.flags=this.load()),this.flags.get(R)===r.FeatureFlagState.Active}save(R){this.flags||(this.flags=this.load()),R.merge||this.flags.clear();for(const[a,i]of Object.entries(R.states))this.flags.set(a,i);const m=Array.from(this.flags.entries()).filter(([,a])=>a===r.FeatureFlagState.Active);window.localStorage.setItem("featureFlags",JSON.stringify(Object.fromEntries(m)))}load(){try{const R=window.localStorage.getItem("featureFlags");if(!R)return new Map;const m=JSON.parse(R);if(typeof m!="object"||m===null||Array.isArray(m))return new Map;const a=Object.entries(m).filter(([i,u])=>(t(i),u===r.FeatureFlagState.Active));return new Map(a)}catch{return new Map}}}},50160:function(ee,s,e){"use strict";e.d(s,{I:function(){return a},j:function(){return r}});function r(i){var g;let u=i.baseImplementation||e.g.fetch;const y=[(g=i.middleware)!=null?g:[]].flat().reverse();for(const v of y)u=v.apply(u);return{fetch:u}}class t{static create(u){var T,L;const y=c(u),g=((T=u.header)==null?void 0:T.name)||"authorization",v=((L=u.header)==null?void 0:L.value)||(B=>`Bearer ${B}`);return new t(u.identityApi,y,g,v)}constructor(u,y,g,v){this.identityApi=u,this.allowUrl=y,this.headerName=g,this.headerValue=v}apply(u){return async(y,g)=>{const v=new Request(y,g),{token:T}=await this.identityApi.getCredentials();return v.headers.get(this.headerName)||typeof T!="string"||!T||!this.allowUrl(v.url)?u(y,g):(v.headers.set(this.headerName,this.headerValue(T)),u(v))}}}function c(i){return i.allowUrl?i.allowUrl:i.urlPrefixAllowlist?f(i.urlPrefixAllowlist):i.config?f([i.config.getString("backend.baseUrl")]):()=>!1}function f(i){const u=i.map(y=>y.replace(/\/$/,""));return y=>u.some(g=>y===g||y.startsWith(`${g}/`))}function R(i,u){return!u||u==="/"?i:`${i.replace(/\/$/,"")}/${u.replace(/^\//,"")}`}class m{constructor(u){this.discoveryApi=u}apply(u){return async(y,g)=>{const v=new Request(y,g),T="plugin://";if(!v.url.startsWith(T))return u(y,g);const{hostname:L,pathname:B,search:k,hash:F,username:x,password:M}=new URL(`http://${v.url.substring(T.length)}`);let D=await this.discoveryApi.getBaseUrl(L);if(x||M){const H=new URL(D),K=`${x}${M?`:${M}`:""}@`;D=`${H.protocol}//${K}${H.host}${H.pathname}`}const P=`${R(D,B)}${k}${F}`;return u(P,typeof y=="string"?g:y)}}}class a{static resolvePluginProtocol(u){return new m(u.discoveryApi)}static injectIdentityAuth(u){return t.create(u)}constructor(){}}},11358:function(ee,s,e){"use strict";e.d(s,{Y:function(){return R}});var r=e(98005);function t(m,a){for(const i of a)if(!m.has(i))return!1;return!0}function c(m,...a){const i=new Set(m);for(const u of a)for(const y of u)i.add(y);return i}class f{constructor(){_(this,"requests",[]);_(this,"subject",new r.X(this.getCurrentPending()))}request(a){return new Promise((i,u)=>{this.requests.push({scopes:a,resolve:i,reject:u}),this.subject.next(this.getCurrentPending())})}resolve(a,i){this.requests=this.requests.filter(u=>t(a,u.scopes)?(u.resolve(i),!1):!0),this.subject.next(this.getCurrentPending())}reject(a){this.requests.forEach(i=>i.reject(a)),this.requests=[],this.subject.next(this.getCurrentPending())}pending(){return this.subject}getCurrentPending(){const a=this.requests.length===0?void 0:this.requests.slice(1).reduce((i,u)=>c(i,u.scopes),this.requests[0].scopes);return{scopes:a,resolve:i=>{a&&this.resolve(a,i)},reject:i=>{a&&this.reject(i)}}}}class R{constructor(){_(this,"subject",new r.X([]));_(this,"currentRequests",[]);_(this,"handlerCount",0)}createAuthRequester(a){const i=new f,u=this.handlerCount;return this.handlerCount++,i.pending().subscribe({next:y=>{const g=this.currentRequests.slice(),v=this.makeAuthRequest(y,a);v?g[u]=v:delete g[u],this.currentRequests=g,this.subject.next(g.filter(Boolean))}}),y=>i.request(y)}makeAuthRequest(a,i){const{scopes:u}=a;if(!!u)return{provider:i.provider,trigger:async()=>{const y=await i.onAuthRequest(u);a.resolve(y)},reject:()=>{const y=new Error("Login failed, rejected by user");y.name="RejectedError",a.reject(y)}}}authRequest$(){return this.subject}}},56054:function(ee,s,e){"use strict";e.d(s,{C:function(){return f}});var r=e(82394),t=e.n(r);const c=new Map;class f{constructor(m,a){_(this,"subscribers",new Set);_(this,"observable",new(t())(m=>(this.subscribers.add(m),()=>{this.subscribers.delete(m)})));this.namespace=m,this.errorApi=a}static create(m){var a;return new f((a=m.namespace)!=null?a:"",m.errorApi)}get(m){return this.snapshot(m).value}snapshot(m){let a,i="absent";try{const u=localStorage.getItem(this.getKeyName(m));u&&(a=JSON.parse(u,(y,g)=>(typeof g=="object"&&g!==null&&Object.freeze(g),g)),i="present")}catch{this.errorApi.post(new Error(`Error when parsing JSON config from storage for: ${m}`))}return{key:m,value:a,presence:i}}forBucket(m){const a=`${this.namespace}/${m}`;return c.has(a)||c.set(a,new f(a,this.errorApi)),c.get(a)}async set(m,a){localStorage.setItem(this.getKeyName(m),JSON.stringify(a)),this.notifyChanges(m)}async remove(m){localStorage.removeItem(this.getKeyName(m)),this.notifyChanges(m)}observe$(m){return this.observable.filter(({key:a})=>a===m)}getKeyName(m){return`${this.namespace}/${encodeURIComponent(m)}`}notifyChanges(m){const a=this.snapshot(m);for(const i of this.subscribers)i.next(a)}}},59589:function(ee,s,e){"use strict";e.d(s,{u:function(){return c}});var r=e(91205);const t={id:"atlassian",title:"Atlassian",icon:()=>null};class c{static create(R){const{discoveryApi:m,environment:a="development",provider:i=t,oauthRequestApi:u}=R;return r.OAuth2.create({discoveryApi:m,oauthRequestApi:u,provider:i,environment:a})}}},6098:function(ee,s,e){"use strict";e.d(s,{Z:function(){return c}});var r=e(91205);const t={id:"bitbucket",title:"Bitbucket",icon:()=>null};class c{static create(R){const{discoveryApi:m,environment:a="development",provider:i=t,oauthRequestApi:u,defaultScopes:y=["team"]}=R;return r.OAuth2.create({discoveryApi:m,oauthRequestApi:u,provider:i,environment:a,defaultScopes:y})}}},44431:function(ee,s,e){"use strict";e.d(s,{BitbucketAuth:function(){return c.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 c=e(6098)},19347:function(){},44474:function(ee,s,e){"use strict";e.d(s,{T:function(){return c}});var r=e(91205);const t={id:"github",title:"GitHub",icon:()=>null};class c{static create(R){const{discoveryApi:m,environment:a="development",provider:i=t,oauthRequestApi:u,defaultScopes:y=["read:user"]}=R;return r.OAuth2.create({discoveryApi:m,oauthRequestApi:u,provider:i,environment:a,defaultScopes:y})}}},2922:function(ee,s,e){"use strict";e.d(s,{a:function(){return c}});var r=e(91205);const t={id:"gitlab",title:"GitLab",icon:()=>null};class c{static create(R){const{discoveryApi:m,environment:a="development",provider:i=t,oauthRequestApi:u,defaultScopes:y=["read_user"]}=R;return r.OAuth2.create({discoveryApi:m,oauthRequestApi:u,provider:i,environment:a,defaultScopes:y})}}},59938:function(ee,s,e){"use strict";e.d(s,{e:function(){return f}});var r=e(91205);const t={id:"google",title:"Google",icon:()=>null},c="https://www.googleapis.com/auth/";class f{static create(m){const{discoveryApi:a,oauthRequestApi:i,environment:u="development",provider:y=t,defaultScopes:g=["openid",`${c}userinfo.email`,`${c}userinfo.profile`]}=m;return r.OAuth2.create({discoveryApi:a,oauthRequestApi:i,provider:y,environment:u,defaultScopes:g,scopeTransform(v){return v.map(T=>T==="openid"?T:T==="profile"||T==="email"?`${c}userinfo.${T}`:T.startsWith(c)?T:`${c}${T}`)}})}}},91668:function(ee,s,e){"use strict";e.d(s,{AtlassianAuth:function(){return y.u},BitbucketAuth:function(){return u.BitbucketAuth},GithubAuth:function(){return r.T},GitlabAuth:function(){return t.a},GoogleAuth:function(){return c.e},MicrosoftAuth:function(){return a._},OktaAuth:function(){return R.s},OneLoginAuth:function(){return i.$}});var r=e(44474),t=e(2922),c=e(59938),f=e(91205);e.o(f,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return f.AlertApiForwarder}}),e.o(f,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return f.AppThemeSelector}}),e.o(f,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return f.AtlassianAuth}}),e.o(f,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return f.BitbucketAuth}}),e.o(f,"ConfigReader")&&e.d(s,{ConfigReader:function(){return f.ConfigReader}}),e.o(f,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return f.ErrorAlerter}}),e.o(f,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return f.ErrorApiForwarder}}),e.o(f,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return f.FetchMiddlewares}}),e.o(f,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return f.FlatRoutes}}),e.o(f,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return f.LocalStorageFeatureFlags}}),e.o(f,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return f.MicrosoftAuth}}),e.o(f,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return f.NoOpAnalyticsApi}}),e.o(f,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return f.OAuthRequestManager}}),e.o(f,"OktaAuth")&&e.d(s,{OktaAuth:function(){return f.OktaAuth}}),e.o(f,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return f.OneLoginAuth}}),e.o(f,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return f.UnhandledErrorForwarder}}),e.o(f,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return f.UrlPatternDiscovery}}),e.o(f,"WebStorage")&&e.d(s,{WebStorage:function(){return f.WebStorage}}),e.o(f,"createFetchApi")&&e.d(s,{createFetchApi:function(){return f.createFetchApi}}),e.o(f,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return f.createSpecializedApp}}),e.o(f,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return f.defaultConfigLoader}});var R=e(26079),m=e(67604),a=e(38482),i=e(58381),u=e(44431);e.o(u,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return u.AlertApiForwarder}}),e.o(u,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return u.AppThemeSelector}}),e.o(u,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return u.AtlassianAuth}}),e.o(u,"ConfigReader")&&e.d(s,{ConfigReader:function(){return u.ConfigReader}}),e.o(u,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return u.ErrorAlerter}}),e.o(u,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return u.ErrorApiForwarder}}),e.o(u,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return u.FetchMiddlewares}}),e.o(u,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return u.FlatRoutes}}),e.o(u,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return u.LocalStorageFeatureFlags}}),e.o(u,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return u.NoOpAnalyticsApi}}),e.o(u,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return u.OAuthRequestManager}}),e.o(u,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return u.UnhandledErrorForwarder}}),e.o(u,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return u.UrlPatternDiscovery}}),e.o(u,"WebStorage")&&e.d(s,{WebStorage:function(){return u.WebStorage}}),e.o(u,"createFetchApi")&&e.d(s,{createFetchApi:function(){return u.createFetchApi}}),e.o(u,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return u.createSpecializedApp}}),e.o(u,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return u.defaultConfigLoader}});var y=e(59589)},38482:function(ee,s,e){"use strict";e.d(s,{_:function(){return c}});var r=e(91205);const t={id:"microsoft",title:"Microsoft",icon:()=>null};class c{static create(R){const{environment:m="development",provider:a=t,oauthRequestApi:i,discoveryApi:u,defaultScopes:y=["openid","offline_access","profile","email","User.Read"]}=R;return r.OAuth2.create({discoveryApi:u,oauthRequestApi:i,provider:a,environment:m,defaultScopes:y})}}},73124:function(ee,s,e){"use strict";e.d(s,{Z:function(){return m}});function r(a){return new Promise((i,u)=>{const y=a.width||500,g=a.height||700,v=window.screen.width/2-y/2,T=window.screen.height/2-g/2,L=window.open(a.url,a.name,`menubar=no,location=no,resizable=no,scrollbars=no,status=no,width=${y},height=${g},top=${T},left=${v}`);let B="";if(!L||typeof L.closed=="undefined"||L.closed){const M=new Error("Failed to open auth popup.");M.name="PopupRejectedError",u(M);return}const k=M=>{if(M.source!==L||M.origin!==a.origin)return;const{data:D}=M;if(D.type==="config_info"){B=D.targetOrigin;return}if(D.type!=="authorization_response")return;const P=D;if("error"in P){const H=new Error(P.error.message);H.name=P.error.name,u(H)}else i(P.response);x()},F=setInterval(()=>{if(L.closed){const M=`Login failed, ${B&&B!==window.location.origin?`Incorrect app origin, expected ${B}`:"popup was closed"}`,D=new Error(M);D.name="PopupClosedError",u(D),x()}},100);function x(){window.removeEventListener("message",k),clearInterval(F)}window.addEventListener("message",k)})}function t(a){return[...a].join(" ")}class c{constructor(i){_(this,"discoveryApi");_(this,"environment");_(this,"provider");_(this,"joinScopesFunc");_(this,"authRequester");_(this,"sessionTransform");const{discoveryApi:u,environment:y,provider:g,joinScopes:v=t,oauthRequestApi:T,sessionTransform:L=B=>B}=i;this.authRequester=T.createAuthRequester({provider:g,onAuthRequest:B=>this.showPopup(B)}),this.discoveryApi=u,this.environment=y,this.provider=g,this.joinScopesFunc=v,this.sessionTransform=L}async createSession(i){return i.instantPopup?this.showPopup(i.scopes):this.authRequester(i.scopes)}async refreshSession(){const i=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(!i.ok){const y=new Error(`Auth refresh request failed, ${i.statusText}`);throw y.status=i.status,y}const u=await i.json();if(u.error){const y=new Error(u.error.message);throw u.error.name&&(y.name=u.error.name),y}return await this.sessionTransform(u)}async removeSession(){const i=await fetch(await this.buildUrl("/logout"),{method:"POST",headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(u=>{throw new Error(`Logout request failed, ${u}`)});if(!i.ok){const u=new Error(`Logout request failed, ${i.statusText}`);throw u.status=i.status,u}}async showPopup(i){const u=this.joinScopesFunc(i),y=await this.buildUrl("/start",{scope:u,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(i,u){const y=await this.discoveryApi.getBaseUrl("auth"),g=this.buildQueryString({...u,env:this.environment});return`${y}/${this.provider.id}${i}${g}`}buildQueryString(i){if(!i)return"";const u=Object.entries(i).map(([y,g])=>{if(typeof g=="string")return`${encodeURIComponent(y)}=${encodeURIComponent(g)}`;if(g)return encodeURIComponent(y)}).filter(Boolean).join("&");return u?`?${u}`:""}}var f=e(57018);const R={id:"oauth2",title:"Your Identity Provider",icon:()=>null};class m{constructor(i){_(this,"sessionManager");_(this,"scopeTransform");this.sessionManager=i.sessionManager,this.scopeTransform=i.scopeTransform}static create(i){const{discoveryApi:u,environment:y="development",provider:g=R,oauthRequestApi:v,defaultScopes:T=[],scopeTransform:L=F=>F}=i,B=new c({discoveryApi:u,environment:y,provider:g,oauthRequestApi:v,sessionTransform(F){return{...F,providerInfo:{idToken:F.providerInfo.idToken,accessToken:F.providerInfo.accessToken,scopes:m.normalizeScopes(L,F.providerInfo.scope),expiresAt:new Date(Date.now()+F.providerInfo.expiresInSeconds*1e3)}}}}),k=new f.RefreshingAuthSessionManager({connector:B,defaultScopes:new Set(T),sessionScopes:F=>F.providerInfo.scopes,sessionShouldRefresh:F=>(F.providerInfo.expiresAt.getTime()-Date.now())/1e3<60*5});return new m({sessionManager:k,scopeTransform:L})}async signIn(){await this.getAccessToken()}async signOut(){await this.sessionManager.removeSession()}sessionState$(){return this.sessionManager.sessionState$()}async getAccessToken(i,u){var v;const y=m.normalizeScopes(this.scopeTransform,i),g=await this.sessionManager.getSession({...u,scopes:y});return(v=g==null?void 0:g.providerInfo.accessToken)!=null?v:""}async getIdToken(i={}){var y;const u=await this.sessionManager.getSession(i);return(y=u==null?void 0:u.providerInfo.idToken)!=null?y:""}async getBackstageIdentity(i={}){const u=await this.sessionManager.getSession(i);return u==null?void 0:u.backstageIdentity}async getProfile(i={}){const u=await this.sessionManager.getSession(i);return u==null?void 0:u.profile}static normalizeScopes(i,u){if(!u)return new Set;const y=Array.isArray(u)?u:u.split(/[\s|,]/).filter(Boolean);return new Set(i(y))}}},91205:function(ee,s,e){"use strict";e.d(s,{OAuth2:function(){return r.Z}});var r=e(73124),t=e(5973),c=e.n(t);e.o(t,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return t.AlertApiForwarder}}),e.o(t,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return t.AppThemeSelector}}),e.o(t,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return t.AtlassianAuth}}),e.o(t,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return t.BitbucketAuth}}),e.o(t,"ConfigReader")&&e.d(s,{ConfigReader:function(){return t.ConfigReader}}),e.o(t,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return t.ErrorAlerter}}),e.o(t,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return t.ErrorApiForwarder}}),e.o(t,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return t.FetchMiddlewares}}),e.o(t,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return t.FlatRoutes}}),e.o(t,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return t.LocalStorageFeatureFlags}}),e.o(t,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return t.MicrosoftAuth}}),e.o(t,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return t.NoOpAnalyticsApi}}),e.o(t,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return t.OAuthRequestManager}}),e.o(t,"OktaAuth")&&e.d(s,{OktaAuth:function(){return t.OktaAuth}}),e.o(t,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return t.OneLoginAuth}}),e.o(t,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return t.UnhandledErrorForwarder}}),e.o(t,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return t.UrlPatternDiscovery}}),e.o(t,"WebStorage")&&e.d(s,{WebStorage:function(){return t.WebStorage}}),e.o(t,"createFetchApi")&&e.d(s,{createFetchApi:function(){return t.createFetchApi}}),e.o(t,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return t.createSpecializedApp}}),e.o(t,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return t.defaultConfigLoader}})},5973:function(){},26079:function(ee,s,e){"use strict";e.d(s,{s:function(){return R}});var r=e(91205);const t={id:"okta",title:"Okta",icon:()=>null},c=new Set(["openid","profile","email","phone","address","groups","offline_access"]),f="okta.";class R{static create(a){const{discoveryApi:i,environment:u="development",provider:y=t,oauthRequestApi:g,defaultScopes:v=["openid","email","profile","offline_access"]}=a;return r.OAuth2.create({discoveryApi:i,oauthRequestApi:g,provider:y,environment:u,defaultScopes:v,scopeTransform(T){return T.map(L=>c.has(L)||L.startsWith(f)?L:`${f}${L}`)}})}}},58381:function(ee,s,e){"use strict";e.d(s,{$:function(){return R}});var r=e(91205);const t={id:"onelogin",title:"onelogin",icon:()=>null},c=new Set(["openid","profile","email","phone","address","groups","offline_access"]),f="onelogin.";class R{static create(a){const{discoveryApi:i,environment:u="development",provider:y=t,oauthRequestApi:g}=a;return r.OAuth2.create({discoveryApi:i,oauthRequestApi:g,provider:y,environment:u,defaultScopes:["openid","email","profile","offline_access"],scopeTransform(v){return v.map(T=>c.has(T)||T.startsWith(f)?T:`${f}${T}`)}})}}},67604:function(ee,s,e){"use strict";var r=e(57018),t=e(30195);const c=t.z.object({profile:t.z.object({email:t.z.string().optional(),displayName:t.z.string().optional(),picture:t.z.string().optional()}),backstageIdentity:t.z.object({id:t.z.string(),token:t.z.string(),identity:t.z.object({type:t.z.literal("user"),userEntityRef:t.z.string(),ownershipEntityRefs:t.z.array(t.z.string())})})}),f={id:"saml",title:"SAML",icon:()=>null};class R{static create(a){const{discoveryApi:i,environment:u="development",provider:y=f}=a,g=new DirectAuthConnector({discoveryApi:i,environment:u,provider:y}),v=new StaticAuthSessionManager({connector:g}),T=new AuthSessionStore({manager:v,storageKey:`${y.id}Session`,schema:samlSessionSchema});return new R(T)}sessionState$(){return this.sessionManager.sessionState$()}constructor(a){this.sessionManager=a}async signIn(){await this.getBackstageIdentity({})}async signOut(){await this.sessionManager.removeSession()}async getBackstageIdentity(a={}){const i=await this.sessionManager.getSession(a);return i==null?void 0:i.backstageIdentity}async getProfile(a={}){const i=await this.sessionManager.getSession(a);return i==null?void 0:i.profile}}},91631:function(ee,s,e){"use strict";e.d(s,{AlertApiForwarder:function(){return t.C},AppThemeSelector:function(){return f.C},AtlassianAuth:function(){return r.AtlassianAuth},ConfigReader:function(){return R.m},ErrorAlerter:function(){return a.KN},ErrorApiForwarder:function(){return a.gr},FetchMiddlewares:function(){return u.I},GithubAuth:function(){return r.GithubAuth},GitlabAuth:function(){return r.GitlabAuth},GoogleAuth:function(){return r.GoogleAuth},LocalStorageFeatureFlags:function(){return i.b},MicrosoftAuth:function(){return r.MicrosoftAuth},NoOpAnalyticsApi:function(){return c.g},OAuthRequestManager:function(){return y.Y},OktaAuth:function(){return r.OktaAuth},OneLoginAuth:function(){return r.OneLoginAuth},UnhandledErrorForwarder:function(){return a.Jv},UrlPatternDiscovery:function(){return m.p},WebStorage:function(){return g.C},createFetchApi:function(){return u.j}});var r=e(91668);e.o(r,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return r.AlertApiForwarder}}),e.o(r,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return r.AppThemeSelector}}),e.o(r,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return r.BitbucketAuth}}),e.o(r,"ConfigReader")&&e.d(s,{ConfigReader:function(){return r.ConfigReader}}),e.o(r,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return r.ErrorAlerter}}),e.o(r,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return r.ErrorApiForwarder}}),e.o(r,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return r.FetchMiddlewares}}),e.o(r,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return r.FlatRoutes}}),e.o(r,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return r.LocalStorageFeatureFlags}}),e.o(r,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return r.NoOpAnalyticsApi}}),e.o(r,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return r.OAuthRequestManager}}),e.o(r,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return r.UnhandledErrorForwarder}}),e.o(r,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return r.UrlPatternDiscovery}}),e.o(r,"WebStorage")&&e.d(s,{WebStorage:function(){return r.WebStorage}}),e.o(r,"createFetchApi")&&e.d(s,{createFetchApi:function(){return r.createFetchApi}}),e.o(r,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return r.createSpecializedApp}}),e.o(r,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return r.defaultConfigLoader}});var t=e(23235),c=e(47150),f=e(58652),R=e(14721),m=e(4333),a=e(89536),i=e(14884),u=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(c){c[c.default=10]="default";const f=50;c[c.app=f]="app",c[c.static=100]="static"})(r||(r={}));class t{constructor(){_(this,"factories",new Map)}register(f,R){const m=r[f],a=this.factories.get(R.api.id);return a&&a.priority>=m?!1:(this.factories.set(R.api.id,{priority:m,factory:R}),!0)}get(f){const R=this.factories.get(f.id);if(!!R)return R.factory}getAllApis(){const f=new Set;for(const{factory:R}of this.factories.values())f.add(R.api);return f}}},14406:function(ee,s,e){"use strict";e.d(s,{g:function(){return a}});var r=e(2784),t=e(13980),c=e.n(t);class f{constructor(...u){_(this,"holders");this.holders=u}get(u){for(const y of this.holders){const g=y.get(u);if(g)return g}}}var R=e(76241);const m=(0,R.CT)("api-context"),a=i=>{var T;const{apis:u,children:y}=i,g=(T=(0,r.useContext)(m))==null?void 0:T.atVersion(1),v=g?new f(u,g):u;return r.createElement(m.Provider,{value:(0,R.EI)({1:v}),children:y})};a.propTypes={apis:c().shape({get:c().func.isRequired}).isRequired,children:c().node}},12132:function(ee,s,e){"use strict";e.d(s,{M:function(){return r}});class r{constructor(c){_(this,"apis",new Map);this.factories=c}static validateFactories(c,f){for(const R of f){const m=[R],a=new Set;for(;m.length;){const i=m.shift(),u=c.get(i);if(!!u)for(const y of Object.values(u.deps)){if(y.id===R.id)throw new Error(`Circular dependency of api factory for ${R}`);a.has(y)||(a.add(y),m.push(y))}}}}get(c){return this.load(c)}load(c,f=[]){const R=this.apis.get(c.id);if(R)return R;const m=this.factories.get(c);if(!m)return;if(f.includes(m.api))throw new Error(`Circular dependency of api factory for ${m.api}`);const a=this.loadDeps(c,m.deps,[...f,m.api]),i=m.factory(a);return this.apis.set(c.id,i),i}loadDeps(c,f,R){const m={};for(const a in f)if(f.hasOwnProperty(a)){const i=f[a],u=this.load(i,R);if(!u)throw new Error(`No API factory available for dependency ${i} of dependent ${c}`);m[a]=u}return m}}},76105:function(ee,s,e){"use strict";e.d(s,{ApiFactoryRegistry:function(){return c.p},ApiProvider:function(){return r.g},ApiResolver:function(){return t.M}});var r=e(14406),t=e(12132),c=e(80396),f=e(82488),R=e.n(f);e.o(f,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return f.AlertApiForwarder}}),e.o(f,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return f.AppThemeSelector}}),e.o(f,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return f.AtlassianAuth}}),e.o(f,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return f.BitbucketAuth}}),e.o(f,"ConfigReader")&&e.d(s,{ConfigReader:function(){return f.ConfigReader}}),e.o(f,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return f.ErrorAlerter}}),e.o(f,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return f.ErrorApiForwarder}}),e.o(f,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return f.FetchMiddlewares}}),e.o(f,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return f.FlatRoutes}}),e.o(f,"GithubAuth")&&e.d(s,{GithubAuth:function(){return f.GithubAuth}}),e.o(f,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return f.GitlabAuth}}),e.o(f,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return f.GoogleAuth}}),e.o(f,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return f.LocalStorageFeatureFlags}}),e.o(f,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return f.MicrosoftAuth}}),e.o(f,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return f.NoOpAnalyticsApi}}),e.o(f,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return f.OAuthRequestManager}}),e.o(f,"OktaAuth")&&e.d(s,{OktaAuth:function(){return f.OktaAuth}}),e.o(f,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return f.OneLoginAuth}}),e.o(f,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return f.UnhandledErrorForwarder}}),e.o(f,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return f.UrlPatternDiscovery}}),e.o(f,"WebStorage")&&e.d(s,{WebStorage:function(){return f.WebStorage}}),e.o(f,"createFetchApi")&&e.d(s,{createFetchApi:function(){return f.createFetchApi}}),e.o(f,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return f.createSpecializedApp}}),e.o(f,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return f.defaultConfigLoader}})},82488:function(){},82370:function(ee,s,e){"use strict";e.d(s,{b:function(){return un}});var r=e(2784),t=e(10289),c=e(64279),f=e(56494),R=e(36964),m=e(76105);function a(se){const W={};for(const ge in se.collectors)se.collectors.hasOwnProperty(ge)&&(W[ge]=se.collectors[ge]());const ae=[{node:r.Children.toArray(se.root),parent:void 0,contexts:{}}];for(;ae.length!==0;){const{node:ge,parent:ye,contexts:Oe}=ae.shift();r.Children.forEach(ge,ze=>{if(!(0,r.isValidElement)(ze))return;const be={};for(const _e in W)if(W.hasOwnProperty(_e)){const ct=W[_e];be[_e]=ct.visit(ct.accumulator,ze,ye,Oe[_e])}for(const _e of se.discoverers){const ct=_e(ze);ct&&ae.push({node:ct,parent:ze,contexts:be})}})}return Object.fromEntries(Object.entries(W).map(([ge,ye])=>[ge,ye.accumulator]))}function i(se,W){return()=>({accumulator:se(),visit:W})}function u(se){var W;return(W=se.props)==null?void 0:W.children}function y(se){var W,ae,ge;if(((W=se.props)==null?void 0:W.path)&&((ae=se.props)==null?void 0:ae.element))return(ge=se.props)==null?void 0:ge.element}const g=i(()=>new Set,(se,W)=>{const ae=(0,R.getComponentData)(W,"core.plugin");ae&&se.add(ae)});var v=e(88934);const T={caseSensitive:!1,path:"/*",element:"match-all",routeRefs:new Set},L=i(()=>({paths:new Map,parents:new Map,objects:new Array}),(se,W,ae,ge)=>{var qt,re,ue,Q,pe;if((ae==null?void 0:ae.props.element)===W)return ge;let ye=ge==null?void 0:ge.obj,Oe=ge==null?void 0:ge.routeRef,ze=ge==null?void 0:ge.sticky;const be=(qt=W.props)==null?void 0:qt.path,_e=(re=ye==null?void 0:ye.children)!=null?re:se.objects,ct=Boolean((ue=W.props)==null?void 0:ue.caseSensitive);let wt=ge==null?void 0:ge.path;if((0,R.getComponentData)(W,"core.gatherMountPoints")){if(!be)throw new Error("Mount point gatherer must have a path");wt=be}const It=(Q=W.props)==null?void 0:Q.element;let lt=(0,R.getComponentData)(W,"core.mountPoint");if(!lt&&(0,r.isValidElement)(It)&&(lt=(0,R.getComponentData)(It,"core.mountPoint")),lt){let ie=be;if(wt&&(ie?wt=void 0:ie=wt),!ie)throw new Error("Mounted routable extension must have a path");se.paths.set(lt,ie),Oe&&ze?(se.parents.set(lt,Oe),be&&(Oe=lt,ze=!1)):(se.parents.set(lt,Oe),Oe=lt),be?(ye={caseSensitive:ct,path:be,element:"mounted",routeRefs:new Set([lt]),children:[T],plugin:(0,R.getComponentData)(W.props.element,"core.plugin")},_e.push(ye)):ye==null||ye.routeRefs.add(lt)}if((0,R.getComponentData)(W,"core.gatherMountPoints")&&(ze=!0),(0,R.getComponentData)(W,"core.gatherMountPoints")){if(!be)throw new Error("Mount point gatherer must have a path");lt||(ye={caseSensitive:ct,path:be,element:"gathered",routeRefs:new Set,children:[T],plugin:(pe=ge==null?void 0:ge.obj)==null?void 0:pe.plugin},_e.push(ye))}return{obj:ye,path:wt,routeRef:Oe,sticky:ze}}),B=i(()=>new Set,(se,W)=>{if(W.type===v.L){const ae=W.props;se.add("with"in ae?ae.with:ae.without)}});var k=e(76241);const F=(0,k.uW)("route-ref-type",()=>Symbol("route-ref-type"));function x(se){return se[F]==="absolute"}function M(se){return se[F]==="sub"}function D(se){return se[F]==="external"}function P(...se){const W=se.join("/").replace(/\/\/+/g,"/");return W!=="/"&&W.endsWith("/")?W.slice(0,-1):W}function H(se,W,ae){let ge,ye="";if(x(se))ge=se;else if(M(se))ge=se.parent,ye=se.path;else if(D(se)){const be=ae.get(se);if(!be)return[void 0,""];if(x(be))ge=be;else if(M(be))ge=be.parent,ye=be.path;else throw new Error(`ExternalRouteRef was bound to invalid target, ${be}`)}else throw se[F]?new Error(`Unknown or invalid route ref type, ${se[F]}`):new Error(`Unknown object passed to useRouteRef, got ${se}`);if(!ge)return[void 0,""];const Oe=W.get(ge);if(!Oe)return[void 0,""];const ze=P(Oe,ye);return[ge,ze]}function K(se,W,ae,ge,ye){var wt;const Oe=(wt=(0,t.fp)(ye,W))!=null?wt:[],ze=Array();let be=-1;for(let It=se;It&&(be=Oe.findIndex(lt=>lt.route.routeRefs.has(It)),be===-1);It=ge.get(It))ze.unshift(It);ze.length===0&&(be-=1);const _e=be===-1?"":Oe[be].pathname,ct=P(...ze.slice(0,-1).map(It=>{const lt=ae.get(It);if(!lt)throw new Error(`No path for ${It}`);if(lt.includes(":"))throw new Error(`Cannot route to ${se} with parent ${It} as it has parameters`);return lt}));return _e+ct}class ce{constructor(W,ae,ge,ye,Oe){this.routePaths=W,this.routeParents=ae,this.routeObjects=ge,this.routeBindings=ye,this.appBasePath=Oe}resolve(W,ae){const[ge,ye]=H(W,this.routePaths,this.routeBindings);if(!ge)return;let Oe;typeof ae=="string"?Oe=this.trimPath(ae):ae.pathname?Oe={...ae,pathname:this.trimPath(ae.pathname)}:Oe=ae;const ze=this.appBasePath+K(ge,Oe,this.routePaths,this.routeParents,this.routeObjects);return(...[_e])=>ze+(0,t.Gn)(ye,_e)}trimPath(W){return W&&(W.startsWith(this.appBasePath)?W.slice(this.appBasePath.length):W)}}const We=(0,k.CT)("routing-context"),Ze=({routePaths:se,routeParents:W,routeObjects:ae,routeBindings:ge,basePath:ye="",children:Oe})=>{const ze=new ce(se,W,ae,ge,ye),be=(0,k.EI)({1:ze});return r.createElement(We.Provider,{value:be},Oe)},me=(se,W)=>{var ae,ge;try{const ye=(0,t.fp)(W,{pathname:se}),Oe=(ae=ye==null?void 0:ye.filter(be=>{var _e;return((_e=be==null?void 0:be.route.routeRefs)==null?void 0:_e.size)>0}).pop())==null?void 0:ae.route;if(!Oe)return{};let ze;return Oe.routeRefs.size===1&&(ze=Oe.routeRefs.values().next().value),{extension:"App",pluginId:((ge=Oe.plugin)==null?void 0:ge.getId())||"root",...ze?{routeRef:ze.id}:{}}}catch{return{}}},je=({pathname:se,search:W,hash:ae})=>{const ge=(0,R.useAnalytics)();return(0,r.useEffect)(()=>{ge.captureEvent("navigate",`${se}${W}${ae}`)},[ge,se,W,ae]),null},de=({routeObjects:se})=>{const{pathname:W,search:ae,hash:ge}=(0,t.TH)();return r.createElement(R.AnalyticsContext,{attributes:me(W,se)},r.createElement(je,{pathname:W,search:ae,hash:ge}))};function Ce(se,W){const ae=new Set(W.values());ae.delete(void 0);for(const ge of W.keys()){if(ae.has(ge))continue;let ye=ge,Oe="";for(;ye;){const be=se.get(ye);if(!be)throw new Error(`No path for ${ye}`);Oe=`${be}${Oe}`,ye=W.get(ye)}const ze=Oe.match(/:(\w+)/g);if(ze){for(let be=0;be<ze.length;be++)for(let _e=be+1;_e<ze.length;_e++)if(ze[_e]===ze[be])throw new Error(`Parameter ${ze[_e]} is duplicated in path ${Oe}`)}}}function Ve(se,W){for(const ae of W)if(!!ae.externalRoutes){for(const[ge,ye]of Object.entries(ae.externalRoutes))if(!ye.optional&&!se.has(ye))throw new Error(`External route '${ge}' of the '${ae.getId()}' plugin must be bound to a target route. See https://backstage.io/link?bind-routes for details.`)}}const Ke=(0,k.CT)("app-context"),qe=({appContext:se,children:W})=>{const ae=(0,k.EI)({1:se});return r.createElement(Ke.Provider,{value:ae,children:W})};function Re(se){return new Error(`Tried to access IdentityApi ${se} before app was loaded`)}function Fe(se){console.warn(`WARNING: Call to ${se} is deprecated and will break in the future`)}class Ue{constructor(){_(this,"target");_(this,"waitForTarget");_(this,"resolveTarget",()=>{});this.waitForTarget=new Promise(W=>{this.resolveTarget=W})}setTarget(W){this.target=W,this.resolveTarget(W)}getUserId(){if(!this.target)throw Re("getUserId");if(!this.target.getUserId)throw new Error("IdentityApi does not implement getUserId");return Fe("getUserId"),this.target.getUserId()}getProfile(){if(!this.target)throw Re("getProfile");if(!this.target.getProfile)throw new Error("IdentityApi does not implement getProfile");return Fe("getProfile"),this.target.getProfile()}async getProfileInfo(){return this.waitForTarget.then(W=>W.getProfileInfo())}async getBackstageIdentity(){const W=await this.waitForTarget.then(ae=>ae.getBackstageIdentity());return W.userEntityRef.match(/^.*:.*\/.*$/)||console.warn(`WARNING: The App IdentityApi provided an invalid userEntityRef, '${W.userEntityRef}'. It must be a full Entity Reference of the form '<kind>:<namespace>/<name>'.`),W}async getCredentials(){return this.waitForTarget.then(W=>W.getCredentials())}async getIdToken(){return this.waitForTarget.then(W=>{if(!W.getIdToken)throw new Error("IdentityApi does not implement getIdToken");return Fe("getIdToken"),W.getIdToken()})}async signOut(){await this.waitForTarget.then(W=>W.signOut()),location.reload()}}var Ye=e(72164);function it(se,W,ae){if(se!==void 0){const ye=ae.find(Oe=>Oe.id===se);if(ye)return ye}if(W){const ye=ae.find(Oe=>Oe.variant==="dark");if(ye)return ye}const ge=ae.find(ye=>ye.variant==="light");return ge||ae[0]}const Rt=()=>{const se=(0,r.useMemo)(()=>window.matchMedia("(prefers-color-scheme: dark)"),[]),[W,ae]=(0,r.useState)(se.matches);return(0,r.useEffect)(()=>{const ge=ye=>{ae(ye.matches)};return se.addListener(ge),()=>{se.removeListener(ge)}},[se]),W};function nt({children:se}){const W=(0,R.useApi)(R.appThemeApiRef),ae=(0,Ye.Z)(W.activeThemeId$(),W.getActiveThemeId()),ge=Boolean(window.matchMedia)?Rt():!1,ye=it(ae,ge,W.getInstalledThemes());if(!ye)throw new Error("App has no themes");return r.createElement(ye.Provider,{children:se})}var ut=e(46611);class tt{constructor(){_(this,"apis",[])}add(W,ae){return this.apis.push([W.id,ae]),ae}build(){return new rt(new Map(this.apis))}}class rt{static builder(){return new tt}static from(W){return new rt(new Map(W.map(([ae,ge])=>[ae.id,ge])))}static with(W,ae){return new rt(new Map([[W.id,ae]]))}constructor(W){this.apis=W}with(W,ae){return new rt(new Map([...this.apis,[W.id,ae]]))}get(W){return this.apis.get(W.id)}}function Bt(se){const W=new Map;return se&&se({bind:(ge,ye)=>{for(const[Oe,ze]of Object.entries(ye)){const be=ge[Oe];if(!be)throw new Error(`Key ${Oe} is not an existing external route`);if(!ze&&!be.optional)throw new Error(`External route ${Oe} is required but was undefined`);ze&&W.set(be,ze)}}}),W}const jt=(0,r.createContext)({routeObjects:[]});function Mt(se){var ae;let{pathname:W}=new URL((ae=se.getOptionalString("app.baseUrl"))!=null?ae:"/","http://dummy.dev");return W=W.replace(/\/*$/,""),W}function In(se,W,ae){var _e;const ge=Boolean(se),ye=(0,c.default)(se||(()=>Promise.resolve([])));let Oe;if(ge&&ye.loading){const{Progress:ct}=W;Oe=r.createElement(ct,null)}else if(ye.error){const{BootErrorPage:ct}=W;Oe=r.createElement(ct,{step:"load-config",error:ye.error})}const{ThemeProvider:ze=nt}=W;return Oe?{node:r.createElement(f.ApiProvider,{apis:rt.with(R.appThemeApiRef,ae)},r.createElement(ze,null,Oe))}:{api:f.ConfigReader.fromConfigs((_e=ye.value)!=null?_e:[])}}class Xt{constructor(W){this.app=W}getPlugins(){return this.app.getPlugins()}getSystemIcon(W){return this.app.getSystemIcon(W)}getComponents(){return this.app.getComponents()}}class yt{constructor(W){_(this,"apiHolder");_(this,"configApi");_(this,"apis");_(this,"icons");_(this,"plugins");_(this,"components");_(this,"themes");_(this,"configLoader");_(this,"defaultApis");_(this,"bindRoutes");_(this,"appIdentityProxy",new Ue);_(this,"apiFactoryRegistry");var ae,ge,ye,Oe;this.apis=(ae=W.apis)!=null?ae:[],this.icons=W.icons,this.plugins=new Set((ge=W.plugins)!=null?ge:[]),this.components=W.components,this.themes=W.themes,this.configLoader=(ye=W.configLoader)!=null?ye:ut.t,this.defaultApis=(Oe=W.defaultApis)!=null?Oe:[],this.bindRoutes=W.bindRoutes,this.apiFactoryRegistry=new m.ApiFactoryRegistry}getPlugins(){return Array.from(this.plugins)}getSystemIcon(W){return this.icons[W]}getComponents(){return this.components}getProvider(){const W=new Xt(this);let ae=!1;return({children:ye})=>{const Oe=(0,r.useMemo)(()=>f.AppThemeSelector.createWithStorage(this.themes),[]),{routing:ze,featureFlags:be,routeBindings:_e}=(0,r.useMemo)(()=>{const lt=a({root:ye,discoverers:[u,y],collectors:{routing:L,collectedPlugins:g,featureFlags:B}});return lt.collectedPlugins.forEach(Tt=>this.plugins.add(Tt)),this.verifyPlugins(this.plugins),this.getApiHolder(),{...lt,routeBindings:Bt(this.bindRoutes)}},[ye]);ae||(ae=!0,Ce(ze.paths,ze.parents),Ve(_e,this.plugins));const ct=In(this.configLoader,this.components,Oe),wt="api"in ct;if(wt){const{api:lt}=ct;this.configApi=lt}if((0,r.useEffect)(()=>{if(wt){const lt=this.getApiHolder().get(R.featureFlagsApiRef);for(const Tt of this.plugins.values())if("getFeatureFlags"in Tt)for(const qt of Tt.getFeatureFlags())lt.registerFlag({name:qt.name,pluginId:Tt.getId()});else for(const qt of Tt.output())qt.type==="feature-flag"&&lt.registerFlag({name:qt.name,pluginId:Tt.getId()});for(const Tt of be)lt.registerFlag({name:Tt,pluginId:""})}},[wt,ct,be]),"node"in ct)return ct.node;const{ThemeProvider:It=nt}=this.components;return r.createElement(f.ApiProvider,{apis:this.getApiHolder()},r.createElement(qe,{appContext:W},r.createElement(It,null,r.createElement(Ze,{routePaths:ze.paths,routeParents:ze.parents,routeObjects:ze.objects,routeBindings:_e,basePath:Mt(ct.api)},r.createElement(jt.Provider,{value:{routeObjects:ze.objects}},ye)))))}}getRouter(){const{Router:W,SignInPage:ae}=this.components,ge=({component:Oe,children:ze})=>{const[be,_e]=(0,r.useState)();return be?(this.appIdentityProxy.setTarget(be),ze):r.createElement(Oe,{onSignInSuccess:_e})};return({children:Oe})=>{const ze=(0,R.useApi)(R.configApiRef),be=`${Mt(ze)}/*`,{routeObjects:_e}=(0,r.useContext)(jt);return ae?r.createElement(W,null,r.createElement(de,{routeObjects:_e}),r.createElement(ge,{component:ae},r.createElement(t.Z5,null,r.createElement(t.AW,{path:be,element:r.createElement(r.Fragment,null,Oe)})))):(this.appIdentityProxy.setTarget({getUserId:()=>"guest",getIdToken:async()=>{},getProfile:()=>({email:"guest@example.com",displayName:"Guest"}),getProfileInfo:async()=>({email:"guest@example.com",displayName:"Guest"}),getBackstageIdentity:async()=>({type:"user",userEntityRef:"user:default/guest",ownershipEntityRefs:["user:default/guest"]}),getCredentials:async()=>({}),signOut:async()=>{}}),r.createElement(W,null,r.createElement(de,{routeObjects:_e}),r.createElement(t.Z5,null,r.createElement(t.AW,{path:be,element:r.createElement(r.Fragment,null,Oe)}))))}}getApiHolder(){if(this.apiHolder){for(const W of this.plugins)for(const ae of W.getApis())this.apiFactoryRegistry.get(ae.api)||this.apiFactoryRegistry.register("default",ae);return m.ApiResolver.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder}this.apiFactoryRegistry.register("static",{api:R.appThemeApiRef,deps:{},factory:()=>f.AppThemeSelector.createWithStorage(this.themes)}),this.apiFactoryRegistry.register("static",{api:R.configApiRef,deps:{},factory:()=>{if(!this.configApi)throw new Error("Tried to access config API before config was loaded");return this.configApi}}),this.apiFactoryRegistry.register("static",{api:R.identityApiRef,deps:{},factory:()=>this.appIdentityProxy}),this.apiFactoryRegistry.register("default",{api:R.featureFlagsApiRef,deps:{},factory:()=>new f.LocalStorageFeatureFlags});for(const W of this.defaultApis)this.apiFactoryRegistry.register("default",W);for(const W of this.plugins)for(const ae of W.getApis())if(!this.apiFactoryRegistry.register("default",ae))throw new Error(`Plugin ${W.getId()} tried to register duplicate or forbidden API factory for ${ae.api}`);for(const W of this.apis)if(!this.apiFactoryRegistry.register("app",W))throw new Error(`Duplicate or forbidden API factory for ${W.api} in app`);return m.ApiResolver.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder=new m.ApiResolver(this.apiFactoryRegistry),this.apiHolder}verifyPlugins(W){const ae=new Set;for(const ge of W){const ye=ge.getId();if(ae.has(ye))throw new Error(`Duplicate plugin found '${ye}'`);ae.add(ye)}}}function un(se){return new yt(se)}},46611:function(ee,s,e){"use strict";e.d(s,{t:function(){return r}});const r=async(t="__APP_INJECTED_RUNTIME_CONFIG__")=>{const c=[{context:"app-config.yaml",data:{app:{title:"Techdocs Preview App",baseUrl:"http://localhost:3000"},backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}}}];if(!c)throw new Error("No static configuration provided");if(!Array.isArray(c))throw new Error("Static configuration has invalid format");const f=c.slice();if(t!=="__app_injected_runtime_config__".toLocaleUpperCase("en-US"))try{const m=JSON.parse(t);Array.isArray(m)?f.push(...m):f.push({data:m,context:"env"})}catch(m){throw new Error(`Failed to load runtime configuration, ${m}`)}const R=window.__APP_CONFIG__;return R&&f.push({context:"window",data:R}),f}},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),c=e(73495),f=e.n(c);e.o(c,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return c.AtlassianAuth}}),e.o(c,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return c.BitbucketAuth}}),e.o(c,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return c.FlatRoutes}}),e.o(c,"GithubAuth")&&e.d(s,{GithubAuth:function(){return c.GithubAuth}}),e.o(c,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return c.GitlabAuth}}),e.o(c,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return c.GoogleAuth}}),e.o(c,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return c.MicrosoftAuth}}),e.o(c,"OktaAuth")&&e.d(s,{OktaAuth:function(){return c.OktaAuth}}),e.o(c,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return c.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 c.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 c=e(63938)},57018:function(ee,s,e){"use strict";e.d(s,{RefreshingAuthSessionManager:function(){return m}});function r(i,u){for(const y of u)if(!i.has(y))return!1;return!0}class t{constructor(u){this.options=u}sessionExistsAndHasScope(u,y){if(!u)return!1;if(!y||this.options.sessionScopes===void 0)return!0;const g=this.options.sessionScopes(u);return r(g,y)}getExtendedScope(u,y){const g=new Set(this.options.defaultScopes);if(u&&this.options.sessionScopes!==void 0){const v=this.options.sessionScopes(u);for(const T of v)g.add(T)}if(y)for(const v of y)g.add(v);return g}}var c=e(98005),f=e(36964);class R{constructor(){_(this,"subject",new c.X(f.SessionState.SignedOut));_(this,"signedIn",!1)}setIsSignedIn(u){this.signedIn!==u&&(this.signedIn=u,this.subject.next(this.signedIn?f.SessionState.SignedIn:f.SessionState.SignedOut))}sessionState$(){return this.subject}}class m{constructor(u){_(this,"connector");_(this,"helper");_(this,"sessionScopesFunc");_(this,"sessionShouldRefreshFunc");_(this,"stateTracker",new R);_(this,"refreshPromise");_(this,"currentSession");const{connector:y,defaultScopes:g=new Set,sessionScopes:v,sessionShouldRefresh:T}=u;this.connector=y,this.sessionScopesFunc=v,this.sessionShouldRefreshFunc=T,this.helper=new t({sessionScopes:v,defaultScopes:g})}async getSession(u){if(this.helper.sessionExistsAndHasScope(this.currentSession,u.scopes)){if(!this.sessionShouldRefreshFunc(this.currentSession))return this.currentSession;try{const g=await this.collapsedSessionRefresh(),v=this.sessionScopesFunc(this.currentSession),T=this.sessionScopesFunc(g);return r(T,v)&&(this.currentSession=g),g}catch(g){if(u.optional)return;throw g}}if(!this.currentSession&&!u.instantPopup)try{const y=await this.collapsedSessionRefresh();return this.currentSession=y,this.getSession(u)}catch{}if(!u.optional)return this.currentSession=await this.connector.createSession({...u,scopes:this.helper.getExtendedScope(this.currentSession,u.scopes)}),this.stateTracker.setIsSignedIn(!0),this.currentSession}async removeSession(){this.currentSession=void 0,await this.connector.removeSession(),this.stateTracker.setIsSignedIn(!1)}sessionState$(){return this.stateTracker.sessionState$()}async collapsedSessionRefresh(){if(this.refreshPromise)return this.refreshPromise;this.refreshPromise=this.connector.refreshSession();try{const u=await this.refreshPromise;return this.stateTracker.setIsSignedIn(!0),u}finally{delete this.refreshPromise}}}class a{constructor(u){_(this,"connector");_(this,"helper");_(this,"stateTracker",new SessionStateTracker);_(this,"currentSession");const{connector:y,defaultScopes:g=new Set,sessionScopes:v}=u;this.connector=y,this.helper=new SessionScopeHelper({sessionScopes:v,defaultScopes:g})}setSession(u){this.currentSession=u,this.stateTracker.setIsSignedIn(Boolean(u))}async getSession(u){if(this.helper.sessionExistsAndHasScope(this.currentSession,u.scopes))return this.currentSession;if(!u.optional)return this.currentSession=await this.connector.createSession({...u,scopes:this.helper.getExtendedScope(this.currentSession,u.scopes)}),this.stateTracker.setIsSignedIn(!0),this.currentSession}async removeSession(){this.currentSession=void 0,this.stateTracker.setIsSignedIn(!1)}sessionState$(){return this.stateTracker.sessionState$()}}},98005:function(ee,s,e){"use strict";e.d(s,{J:function(){return c},X:function(){return f}});var r=e(82394),t=e.n(r);class c{constructor(){_(this,"isClosed",!1);_(this,"terminatingError");_(this,"observable",new(t())(m=>this.isClosed?(this.terminatingError?m.error(this.terminatingError):m.complete(),()=>{}):(this.subscribers.add(m),()=>{this.subscribers.delete(m)})));_(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(a=>a.next(m))}error(m){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.terminatingError=m,this.subscribers.forEach(a=>a.error(m))}complete(){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.subscribers.forEach(m=>m.complete())}subscribe(m,a,i){const u=typeof m=="function"?{next:m,error:a,complete:i}:m;return this.observable.subscribe(u)}}class f{constructor(m){_(this,"isClosed");_(this,"currentValue");_(this,"terminatingError");_(this,"observable");_(this,"subscribers",new Set);this.isClosed=!1,this.currentValue=m,this.terminatingError=void 0,this.observable=new(t())(a=>this.isClosed?(this.terminatingError?a.error(this.terminatingError):a.complete(),()=>{}):(a.next(this.currentValue),this.subscribers.add(a),()=>{this.subscribers.delete(a)}))}[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(a=>a.next(m))}error(m){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.terminatingError=m,this.subscribers.forEach(a=>a.error(m))}complete(){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.subscribers.forEach(m=>m.complete())}subscribe(m,a,i){const u=typeof m=="function"?{next:m,error:a,complete:i}:m;return this.observable.subscribe(u)}}},88934:function(ee,s,e){"use strict";e.d(s,{L:function(){return c}});var r=e(36964),t=e(2784);const c=f=>{const{children:R}=f,m=(0,r.useApi)(r.featureFlagsApiRef),a="with"in f?m.isActive(f.with):!m.isActive(f.without);return t.createElement(t.Fragment,null,a?R:null)};(0,r.attachComponentData)(c,"core.featureFlagged",!0)},63938:function(ee,s,e){"use strict";e.d(s,{w:function(){return f}});var r=e(2784),t=e(10289),c=e(36964);const f=m=>{const a=(0,c.useApp)(),{NotFoundErrorPage:i}=a.getComponents(),u=(0,c.useElementFilter)(m.children,y=>y.getElements().flatMap(g=>{var T;let v=g.props.path;return v===""?[]:(v=(T=v==null?void 0:v.replace(/\/\*$/,""))!=null?T:"/",[{path:v,element:g,children:g.props.children?[{path:v==="/"?"/":"/*",element:g.props.children}]:void 0}])}).sort((g,v)=>v.path.localeCompare(g.path)).map(g=>(g.path=g.path==="/"?"/":`${g.path}/*`,g)));return u.push({element:r.createElement(i,null),path:"/*"}),(0,t.V$)(u)};var R=e(88934)},53492:function(ee,s,e){"use strict";e.d(s,{Button:function(){return x},CodeSnippet:function(){return je},Content:function(){return Wo},ContentHeader:function(){return _s},CreateButton:function(){return Ve},DependencyGraph:function(){return Tt},DependencyGraphTypes:function(){return r},EmptyState:function(){return Ne},ErrorPage:function(){return oi},ErrorPanel:function(){return Ln},Header:function(){return Qo},HeaderIconLinkRow:function(){return Ur},HeaderLabel:function(){return hi},HeaderTabs:function(){return Ho},InfoCard:function(){return Yn},ItemCardGrid:function(){return Ri},ItemCardHeader:function(){return Ei},Link:function(){return k},LogViewer:function(){return Wr},MissingAnnotationEmptyState:function(){return Et},OverflowTooltip:function(){return Cr},Page:function(){return qo},PageWithHeader:function(){return Ti},Progress:function(){return br},ResponseErrorPanel:function(){return Nn},RoutedTabs:function(){return jo},Select:function(){return vt},Sidebar:function(){return ka},SidebarContext:function(){return Mr},SidebarDivider:function(){return cs},SidebarItem:function(){return Zo},SidebarPage:function(){return Ma},SidebarPinStateContext:function(){return hr},SubvalueCell:function(){return Ss},SupportButton:function(){return xa},Table:function(){return js},WarningPanel:function(){return xt},sidebarConfig:function(){return jn}});var r={};e.r(r),e.d(r,{Nm:function(){return Ke},ht:function(){return Fe},LJ:function(){return Re}});var t=e(2784),c=e(36964),f=e(19928);function R(n){const[o,l]=useState([]),d=useApi(alertApiRef),{anchorOrigin:p={vertical:"top",horizontal:"center"}}=n;if(useEffect(()=>{const U=d.alert$().subscribe(G=>l(z=>z.concat(G)));return()=>{U.unsubscribe()}},[d]),o.length===0)return null;const[E]=o,I=()=>{l(U=>U.filter(G=>G!==E))};return React.createElement(Snackbar,{open:!0,anchorOrigin:p},React.createElement(Alert,{action:React.createElement(IconButton,{color:"inherit",size:"small",onClick:I,"data-testid":"error-button-close"},React.createElement(CloseIcon,null)),severity:E.severity},React.createElement("span",null,E.message.toString(),o.length>1&&React.createElement("em",null,` (${o.length-1} older ${pluralize("message",o.length-1)})`))))}var m=e(79692),a=e(12420);const i=(0,m.Z)(n=>(0,a.Z)({avatar:{width:"4rem",height:"4rem",color:"#fff",fontWeight:n.typography.fontWeightBold,letterSpacing:"1px",textTransform:"uppercase"}}),{name:"BackstageAvatar"});function u(n){const{displayName:o,picture:l,customStyles:d}=n,p=i();return React.createElement(MaterialAvatar,{alt:o,src:l,className:p.avatar,style:{backgroundColor:stringToColor(o||l||""),...d}},o&&extractInitials(o))}var y=e(77277),g=e(86689),v=e(62833);const T=(0,m.Z)({visuallyHidden:{clip:"rect(0 0 0 0)",clipPath:"inset(50%)",overflow:"hidden",position:"absolute",whiteSpace:"nowrap",height:1,width:1}},{name:"Link"}),L=n=>/^([a-z+.-]+):/.test(n),B=n=>{var o;return n instanceof Array?n.map(B).join(" ").trim():typeof n=="object"&&n?B((o=n==null?void 0:n.props)==null?void 0:o.children):["string","number"].includes(typeof n)?String(n):""},k=t.forwardRef(({onClick:n,noTrack:o,...l},d)=>{const p=T(),E=(0,c.useAnalytics)(),I=String(l.to),U=B(l.children)||I,G=L(I),z=G&&!!/^https?:/.exec(I),ne=X=>{n==null||n(X),o||E.captureEvent("click",U,{attributes:{to:I}})};return G?t.createElement(g.Z,{ref:d,href:I,onClick:ne,...z?{target:"_blank",rel:"noopener"}:{},...l},l.children,t.createElement("span",{className:p.visuallyHidden},", Opens in a new window")):t.createElement(g.Z,{ref:d,component:v.rU,onClick:ne,...l})}),F=t.forwardRef((n,o)=>t.createElement(k,{ref:o,...n,color:"initial"})),x=t.forwardRef((n,o)=>t.createElement(y.Z,{ref:o,component:F,...n}));var M=e(60364),D=e(61837),P=e(80030),H=e(19353),K=e(95074);function ce(n){const{text:o,tooltipDelay:l=1e3,tooltipText:d="Text copied to clipboard"}=n,p=(0,c.useApi)(c.errorApiRef),[E,I]=(0,t.useState)(!1),[{error:U},G]=(0,K.Z)();(0,t.useEffect)(()=>{U&&p.post(U)},[U,p]);const z=ne=>{ne.stopPropagation(),I(!0),G(o)};return t.createElement(t.Fragment,null,t.createElement(P.ZP,{id:"copy-test-tooltip",title:d,placement:"top",leaveDelay:l,onClose:()=>I(!1),open:E},t.createElement(D.Z,{onClick:z},t.createElement(H.Z,null))))}var We=e(83229),Ze=e(26639),me=e(39595);function je(n){const{text:o,language:l,showLineNumbers:d=!1,highlightedNumbers:p,customStyle:E,showCopyCodeButton:I=!1}=n,U=(0,M.Z)(),G=U.palette.type==="dark"?Ze.Z:me.Z,z=U.palette.type==="dark"?"#256bf3":"#e6ffed";return t.createElement("div",{style:{position:"relative"}},t.createElement(We.Z,{customStyle:E,language:l,style:G,showLineNumbers:d,wrapLines:!0,lineNumberStyle:{color:U.palette.textVerySubtle},lineProps:ne=>p!=null&&p.includes(ne)?{style:{backgroundColor:z}}:{}},o),I&&t.createElement("div",{style:{position:"absolute",top:0,right:0}},t.createElement(ce,{text:o})))}var de=e(41156),Ce=e(88188);function Ve(n){const{title:o,to:l}=n,d=(0,de.Z)(p=>p.breakpoints.down("xs"));return l?d?t.createElement(D.Z,{component:v.rU,color:"primary",title:o,size:"small",to:l},t.createElement(Ce.Z,null)):t.createElement(y.Z,{component:v.rU,variant:"contained",color:"primary",to:l},o):null}var Ke;(function(n){const o="TB";n.TOP_BOTTOM=o;const l="BT";n.BOTTOM_TOP=l;const d="LR";n.LEFT_RIGHT=d;const p="RL";n.RIGHT_LEFT=p})(Ke||(Ke={}));var qe;(function(n){const o="UL";n.UP_LEFT=o;const l="UR";n.UP_RIGHT=l;const d="DL";n.DOWN_LEFT=d;const p="DR";n.DOWN_RIGHT=p})(qe||(qe={}));var Re;(function(n){const o="network-simplex";n.NETWORK_SIMPLEX=o;const l="tight-tree";n.TIGHT_TREE=l;const d="longest-path";n.LONGEST_PATH=d})(Re||(Re={}));var Fe;(function(n){const o="l";n.LEFT=o;const l="r";n.RIGHT=l;const d="c";n.CENTER=d})(Fe||(Fe={}));var Ue=e(13387),Ye=e(11105),it=e(97963),Rt=e(46506),nt=e.n(Rt),ut=e(54073),tt=e.n(ut),rt=e(10368);const Bt=(0,m.Z)(n=>({node:{fill:n.palette.primary.light,stroke:n.palette.primary.light},text:{fill:n.palette.primary.contrastText}}),{name:"BackstageDependencyGraphDefaultNode"});function jt({node:{id:n}}){const o=Bt(),[l,d]=t.useState(0),[p,E]=t.useState(0),I=t.useRef(null);t.useLayoutEffect(()=>{if(I.current){let{height:ne,width:X}=I.current.getBBox();ne=Math.round(ne),X=Math.round(X),(ne!==p||X!==l)&&(d(X),E(ne))}},[l,p]);const U=10,G=l+U*2,z=p+U*2;return t.createElement("g",null,t.createElement("rect",{className:o.node,width:G,height:z,rx:10}),t.createElement("text",{ref:I,className:o.text,y:z/2,x:G/2,textAnchor:"middle",alignmentBaseline:"middle"},n))}const Mt="arrow-marker",In="node",Xt="edge",yt="label",un=(0,rt.Z)(n=>({node:{transition:`${n.transitions.duration.shortest}ms`}}),{name:"BackstageDependencyGraphNode"}),se=n=>t.createElement(jt,{...n});function W({render:n=se,setNode:o,node:l}){const{width:d,height:p,x:E=0,y:I=0}=l,U=l,G=un(),z=t.useRef(null);return t.useLayoutEffect(()=>{if(z.current){let{height:ne,width:X}=z.current.getBBox();ne=Math.round(ne),X=Math.round(X),(ne!==p||X!==d)&&o(l.id,{...l,height:ne,width:X})}},[l,d,p,o]),t.createElement("g",{ref:z,"data-testid":In,className:G.node,transform:`translate(${E-d/2},${I-p/2})`},n({node:U}))}var ae=e(55876),ge=e(66481),ye=e(19574),Oe=e.n(ye);const ze=(0,rt.Z)(n=>({text:{fill:n.palette.textContrast}}),{name:"BackstageDependencyGraphDefaultLabel"});function be({edge:{label:n}}){const o=ze();return t.createElement("text",{className:o.text,textAnchor:"middle"},n)}const _e=(0,rt.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"}),ct=n=>t.createElement(be,{...n}),wt=ae.Z().x(n=>n.x).y(n=>n.y).curve(ge.Z);function It({render:n=ct,setEdge:o,id:l,edge:d}){const{x:p=0,y:E=0,width:I,height:U,points:G}=d,z=d,ne=_e(),X=t.useRef(null);t.useLayoutEffect(()=>{if(X.current){let{height:Ee,width:Se}=X.current.getBBox();Ee=Math.round(Ee),Se=Math.round(Se),(Ee!==U||Se!==I)&&o(l,{...d,height:Ee,width:Se})}},[d,U,I,o,l]);let Ae="";if(G){const Ee=G.filter(Se=>Oe()(Se.x)&&Oe()(Se.y));Ae=wt(Ee)||""}return t.createElement(t.Fragment,null,Ae&&t.createElement("path",{"data-testid":Xt,className:ne.path,markerEnd:`url(#${Mt})`,d:Ae}),z.label?t.createElement("g",{ref:X,"data-testid":yt,className:ne.label,transform:`translate(${p},${E})`},n({edge:z})):null)}const lt="workspace";function Tt(n){var pr,aa;const{edges:o,nodes:l,renderNode:d,direction:p=Ke.TOP_BOTTOM,align:E,nodeMargin:I=50,edgeMargin:U=10,rankMargin:G=50,paddingX:z=0,paddingY:ne=0,acyclicer:X,ranker:Ae=Re.NETWORK_SIMPLEX,labelPosition:Ee=Fe.RIGHT,labelOffset:Se=10,edgeRanks:st=1,edgeWeight:St=1,renderLabel:Wt,defs:Qt,zoom:ot="enabled",...Ct}=n,Pt=(0,it.Z)(),[an,Jn]=t.useState(100),[Tn,$r]=t.useState(100),At=t.useRef(new(nt()).graphlib.Graph),[Qn,fo]=t.useState(((pr=At.current.graph())==null?void 0:pr.width)||0),[rr,mo]=t.useState(((aa=At.current.graph())==null?void 0:aa.height)||0),[_r,eo]=t.useState([]),[ho,ln]=t.useState([]),vn=Math.max(Qn,an),bn=Math.max(rr,Tn),or=t.useMemo(()=>tt()(Gt=>{if(!Gt)return;const cn=Ye.Z(Gt),Ht=Ye.Z(Gt.getElementById(lt));function Fn(){cn.call(Ue.sP().scaleExtent([1,10]).on("zoom",Vn=>{Vn.transform.x=Math.min(0,Math.max(Vn.transform.x,vn-vn*Vn.transform.k)),Vn.transform.y=Math.min(0,Math.max(Vn.transform.y,bn-bn*Vn.transform.k)),Ht.attr("transform",Vn.transform)}))}ot==="enabled"?Fn():ot==="enable-on-click"&&cn.on("click",()=>Fn());const{width:Bn,height:to}=Gt.getBoundingClientRect();an!==Bn&&Jn(Bn),Tn!==to&&$r(to)},100),[Tn,an,vn,bn,ot]),en=t.useCallback(()=>{const Gt=At.current.nodes(),cn=At.current.edges();Gt.forEach(Ht=>{l.some(Bn=>Bn.id===Ht)||At.current.removeNode(Ht)}),cn.forEach(Ht=>{o.some(Bn=>Bn.from===Ht.v&&Bn.to===Ht.w)||At.current.removeEdge(Ht.v,Ht.w)}),l.forEach(Ht=>{const Fn=At.current.nodes().find(Bn=>Ht.id===Bn);if(Fn&&At.current.node(Fn)){const{width:Bn,height:to,x:Vn,y:Wi}=At.current.node(Fn);At.current.setNode(Fn,{...Ht,width:Bn,height:to,x:Vn,y:Wi})}else At.current.setNode(Ht.id,{...Ht,width:0,height:0})}),o.forEach(Ht=>{At.current.setEdge(Ht.from,Ht.to,{...Ht,label:Ht.label,width:0,height:0,labelpos:Ee,labeloffset:Se,weight:St,minlen:st})})},[o,l,Ee,Se,St,st]),tn=t.useMemo(()=>tt()(()=>{nt().layout(At.current);const{height:Gt,width:cn}=At.current.graph(),Ht=Math.max(0,Gt||0),Fn=Math.max(0,cn||0);fo(Fn),mo(Ht),eo(At.current.nodes()),ln(At.current.edges())},250,{leading:!0}),[]);t.useEffect(()=>(At.current.setGraph({rankdir:p,align:E,nodesep:I,edgesep:U,ranksep:G,marginx:z,marginy:ne,acyclicer:X,ranker:Ae}),en(),tn(),tn.cancel),[X,E,p,U,z,ne,I,G,Ae,en,tn]);function gr(Gt,cn){return At.current.setNode(Gt,cn),tn(),At.current}function ar(Gt,cn){return At.current.setEdge(Gt,cn),tn(),At.current}return t.createElement("svg",{ref:or,...Ct,width:"100%",height:bn,viewBox:`0 0 ${vn} ${bn}`},t.createElement("defs",null,t.createElement("marker",{id:Mt,viewBox:"0 0 24 24",markerWidth:"14",markerHeight:"14",refX:"16",refY:"12",orient:"auto",markerUnits:"strokeWidth"},t.createElement("path",{fill:Pt.palette.textSubtle,d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})),Qt),t.createElement("g",{id:lt},t.createElement("svg",{width:Qn,height:rr,y:bn/2-rr/2,x:vn/2-Qn/2,viewBox:`0 0 ${Qn} ${rr}`},ho.map(Gt=>{const cn=At.current.edge(Gt);return cn?t.createElement(It,{key:`${Gt.v}-${Gt.w}`,id:Gt,setEdge:ar,render:Wt,edge:cn}):null}),_r.map(Gt=>{const cn=At.current.node(Gt);return cn?t.createElement(W,{key:Gt,setNode:gr,render:d,node:cn}):null}))))}var qt=e(72779),re=e.n(qt);const ue=(0,m.Z)(n=>{var o;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:(o=n.palette.banner.warning)!=null?o:n.palette.banner.error}}},{name:"BackstageDismissableBanner"}),Q=n=>{var Ee;const{variant:o,message:l,id:d,fixed:p=!1}=n,E=ue(),U=useApi(storageApiRef).forBucket("notifications"),G=(Ee=U.snapshot("dismissedBanners").value)!=null?Ee:[],[z,ne]=useState(new Set(G)),X=useObservable(U.observe$("dismissedBanners"));useEffect(()=>{var Se;if(X!=null&&X.value){const st=(Se=X==null?void 0:X.value)!=null?Se:[];ne(new Set(st))}},[X==null?void 0:X.value]);const Ae=()=>{U.set("dismissedBanners",[...z,d])};return React.createElement(Snackbar,{anchorOrigin:p?{vertical:"bottom",horizontal:"center"}:{vertical:"top",horizontal:"center"},open:!z.has(d),classes:{root:classNames(E.root,!p&&E.topPosition)}},React.createElement(SnackbarContent,{classes:{root:classNames(E.content,E[o]),message:E.message},message:l,action:[React.createElement(IconButton,{key:"dismiss",title:"Permanently dismiss this message",color:"inherit",onClick:Ae},React.createElement(Close,{className:E.icon}))]}))};var pe=e(60905),ie=e(90436),Be=e.p+"static/missingAnnotation.67f79e98..svg",J=e.p+"static/noInformation.4b426325..svg",N=e.p+"static/createComponent.975d1e1e..svg",te=e.p+"static/noBuild.1715fa71..svg";const Pe=(0,m.Z)({generalImg:{width:"95%",zIndex:2,position:"relative",left:"50%",top:"50%",transform:"translate(-50%, 15%)"}},{name:"BackstageEmptyStateImage"}),De=({missing:n})=>{const o=Pe();switch(n){case"field":return t.createElement("img",{src:Be,className:o.generalImg,alt:"annotation is missing"});case"info":return t.createElement("img",{src:J,alt:"no Information",className:o.generalImg});case"content":return t.createElement("img",{src:N,alt:"create Component",className:o.generalImg});case"data":return t.createElement("img",{src:te,alt:"no Build",className:o.generalImg});default:return null}},we=(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 Ne(n){const{title:o,description:l,missing:d,action:p}=n,E=we();return t.createElement(pe.Z,{container:!0,direction:"row",justifyContent:"space-around",alignItems:"flex-start",className:E.root,spacing:2},t.createElement(pe.Z,{item:!0,xs:12,md:6},t.createElement(pe.Z,{container:!0,direction:"column"},t.createElement(pe.Z,{item:!0,xs:!0},t.createElement(ie.Z,{variant:"h5"},o)),t.createElement(pe.Z,{item:!0,xs:!0},t.createElement(ie.Z,{variant:"body1"},l)),t.createElement(pe.Z,{item:!0,xs:!0,className:E.action},p))),t.createElement(pe.Z,{item:!0,xs:12,md:6,className:E.imageContainer},t.createElement(De,{missing:d})))}const ht=`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`,Lt=(0,m.Z)(n=>({code:{borderRadius:6,margin:`${n.spacing(2)}px 0px`,background:n.palette.type==="dark"?"#444":"#fff"}}),{name:"BackstageMissingAnnotationEmptyState"});function Et(n){const{annotation:o}=n,l=Lt(),d=t.createElement(t.Fragment,null,"The ",t.createElement("code",null,o)," annotation is missing. You need to add the annotation to your component if you want to enable this tool.");return t.createElement(Ne,{missing:"field",title:"Missing Annotation",description:d,action:t.createElement(t.Fragment,null,t.createElement(ie.Z,{variant:"body1"},"Add the annotation to your component YAML as shown in the highlighted example below:"),t.createElement("div",{className:l.code},t.createElement(je,{text:ht.replace("ANNOTATION",o),language:"yaml",showLineNumbers:!0,highlightedNumbers:[6,7],customStyle:{background:"inherit",fontSize:"115%"}})),t.createElement(y.Z,{color:"primary",component:k,to:"https://backstage.io/docs/features/software-catalog/well-known-annotations"},"Read more"))})}var Ut=e(11776),dt=e(38402),gt=e(49378),Qe=e(41128),Ot=e(27616),nn=e(8284),bt=e(70660),at=e(91750),pt=e(38016);const Nt=(n,o)=>(o.palette.type==="light"?Qe._j:Qe.$n)(o.palette[n].light,.6),Vt=(n,o)=>(o.palette.type==="light"?Qe.$n:Qe._j)(o.palette[n].light,.9),rn=(0,m.Z)(n=>({root:{marginRight:n.spacing(1),fill:({severity:o})=>Nt(o,n)}})),Zt=({severity:n})=>{const o=rn({severity:n});return t.createElement(at.Z,{classes:o})},Kt=({severity:n})=>{const o=rn({severity:n});return t.createElement(pt.Z,{classes:o})},zt=(0,m.Z)(n=>({panel:{backgroundColor:({severity:o})=>Vt(o,n),color:({severity:o})=>Nt(o,n),verticalAlign:"middle"},summary:{display:"flex",flexDirection:"row"},summaryText:{color:({severity:o})=>Nt(o,n),fontWeight:"bold"},message:{width:"100%",display:"block",color:({severity:o})=>Nt(o,n),backgroundColor:({severity:o})=>Vt(o,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"}),kt=n=>n.charAt(0).toLocaleUpperCase("en-US")+n.slice(1);function xt(n){const{severity:o="warning",title:l,message:d,children:p,defaultExpanded:E}=n,I=zt({severity:o}),U=kt(o)+(l?`: ${l}`:"");return t.createElement(Ot.Z,{defaultExpanded:E!=null?E:!1,className:I.panel,role:"alert"},t.createElement(nn.Z,{expandIcon:t.createElement(Kt,{severity:o}),className:I.summary},t.createElement(Zt,{severity:o}),t.createElement(ie.Z,{className:I.summaryText,variant:"subtitle1"},U)),(d||p)&&t.createElement(bt.Z,null,t.createElement(pe.Z,{container:!0},d&&t.createElement(pe.Z,{item:!0,xs:12},t.createElement(ie.Z,{className:I.message,variant:"body1"},d)),p&&t.createElement(pe.Z,{item:!0,xs:12,className:I.details},p))))}const _t=(0,m.Z)(n=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:n.spacing(2)},divider:{margin:n.spacing(2)}}),{name:"BackstageErrorPanel"}),Un=({error:n,message:o,stack:l,children:d})=>{const p=_t();return t.createElement(Ut.Z,{dense:!0},t.createElement(dt.Z,{alignItems:"flex-start"},t.createElement(gt.Z,{classes:{secondary:p.text},primary:"Error",secondary:n}),t.createElement(ce,{text:n})),t.createElement(dt.Z,{alignItems:"flex-start"},t.createElement(gt.Z,{classes:{secondary:p.text},primary:"Message",secondary:o}),t.createElement(ce,{text:o})),l&&t.createElement(dt.Z,{alignItems:"flex-start"},t.createElement(gt.Z,{classes:{secondary:p.text},primary:"Stack Trace",secondary:l}),t.createElement(ce,{text:l})),d)};function Ln(n){const{title:o,error:l,defaultExpanded:d,children:p}=n;return t.createElement(xt,{severity:"error",title:o!=null?o:l.message,defaultExpanded:d},t.createElement(Un,{error:l.name,message:l.message,stack:l.stack,children:p}))}var Mn=e(85256);const Rn=(0,m.Z)(n=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:n.spacing(2)},divider:{margin:n.spacing(2)}}),{name:"BackstageResponseErrorPanel"});function Nn(n){var Se;const{title:o,error:l,defaultExpanded:d}=n,p=Rn();if(l.name!=="ResponseError")return t.createElement(Ln,{title:o!=null?o:l.message,defaultExpanded:d,error:l});const{body:E,cause:I}=l,{request:U,response:G}=E,z=`${G.statusCode}: ${I.name}`,ne=U&&`${U.method} ${U.url}`,X=I.message.replace(/\\n/g,`
12
+ `),Ae=(Se=I.stack)==null?void 0:Se.replace(/\\n/g,`
13
+ `),Ee=JSON.stringify(E,void 0,2);return t.createElement(Ln,{title:o!=null?o:l.message,defaultExpanded:d,error:{name:z,message:X,stack:Ae}},ne&&t.createElement(dt.Z,{alignItems:"flex-start"},t.createElement(gt.Z,{classes:{secondary:p.text},primary:"Request",secondary:U?`${ne}`:void 0}),t.createElement(ce,{text:ne})),t.createElement(t.Fragment,null,t.createElement(Mn.Z,{component:"li",className:p.divider}),t.createElement(dt.Z,{alignItems:"flex-start"},t.createElement(gt.Z,{classes:{secondary:p.text},primary:"Full Error as JSON"})),t.createElement(je,{language:"json",text:Ee,showCopyCodeButton:!0})))}var Xn=e(47093);function Zn(n){const o=document.createElement("div");return o.setAttribute("id",n),o}function zn(n){document.body.insertBefore(n,document.body.lastElementChild.nextElementSibling)}function $(n){const o=useRef(null);useEffect(function(){const p=document.querySelector(`#${n}`),E=p||Zn(n);return p||zn(E),E.appendChild(o.current),function(){o.current.remove(),E.childNodes.length===-1&&E.remove()}},[n]);function l(){return o.current||(o.current=document.createElement("div")),o.current}return l()}var h=null;const S="core.calloutSeen";function w(){const[n,o]=useState(()=>{const d=localStorage.getItem(S);return d?JSON.parse(d):{}}),l=useCallback((d,p)=>{const E=localStorage.getItem(S),U={...E?JSON.parse(E):{},[d]:p};o(U),localStorage.setItem(S,JSON.stringify(U))},[]);return{states:n,setState:l}}function j(n){const{states:o,setState:l}=w(),d=useCallback(()=>{l(n,!0)},[l,n]);return{seen:o[n]===!0,markSeen:d}}function he(n){const{seen:o,markSeen:l}=j(n);return{show:o===!1,hide:l}}const oe=(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 Me(n){const{featureId:o,title:l,description:d,children:p}=n,{show:E,hide:I}=useShowCallout(o),U=usePortal("core.callout"),G=useRef(null),[z,ne]=useState(),X=oe(),Ae=useCallback(()=>{if(G.current){const Ee=G.current.getBoundingClientRect(),Se=Math.max(Ee.width,Ee.height),st=800,St=Ee.x-(Se-Ee.width)/2-st,Wt=Ee.y-(Se-Ee.height)/2-st,Qt=Se+2*st,ot=450,Ct=Ee.x+Ee.width/2-ot,Pt=Ee.y-(Se-Ee.height)/2+Se+20;ne({dotLeft:St,dotTop:Wt,dotSize:Qt,borderWidth:st,textTop:Pt,textLeft:Ct,textWidth:ot})}},[]);return useEffect(()=>(window.addEventListener("resize",Ae),window.addEventListener("scroll",Ae),()=>{window.removeEventListener("resize",Ae),window.removeEventListener("scroll",Ae)}),[Ae]),useLayoutEffect(Ae,[G.current,Ae]),E?React.createElement(React.Fragment,null,React.createElement("div",{className:X.featureWrapper,ref:G},p),createPortal(React.createElement("div",{className:X.backdrop},React.createElement(ClickAwayListener,{onClickAway:I},React.createElement(React.Fragment,null,React.createElement("div",{className:X.dot,"data-testid":"dot",style:{left:z==null?void 0:z.dotLeft,top:z==null?void 0:z.dotTop,width:z==null?void 0:z.dotSize,height:z==null?void 0:z.dotSize,borderWidth:z==null?void 0:z.borderWidth},onClick:I,onKeyDown:I,role:"button",tabIndex:0},React.createElement("div",{className:X.pulseCircle})),React.createElement("div",{className:X.text,"data-testid":"text",style:{left:z==null?void 0:z.textLeft,top:z==null?void 0:z.textTop,width:z==null?void 0:z.textWidth}},React.createElement(Typography,{variant:"h2",paragraph:!0},l),React.createElement(Typography,null,d))))),U)):React.createElement(React.Fragment,null,p)}var et=e(35292);const Ft=(0,m.Z)(n=>({link:{display:"grid",justifyItems:"center",gridGap:4,textAlign:"center"},disabled:{color:"gray",cursor:"default"},primary:{color:n.palette.primary.main},secondary:{color:n.palette.secondary.main},label:{fontSize:"0.7rem",textTransform:"uppercase",fontWeight:600,letterSpacing:1.2}}),{name:"BackstageIconLinkVertical"});function dn({color:n="primary",disabled:o=!1,href:l="#",icon:d=t.createElement(et.Z,null),label:p,onClick:E,title:I}){const U=Ft();return o?t.createElement(g.Z,{title:I,className:re()(U.link,U.disabled),underline:"none"},d,t.createElement("span",{className:U.label},p)):t.createElement(g.Z,{title:I,className:re()(U.link,U[n]),to:l,component:k,onClick:E},d,t.createElement("span",{className:U.label},p))}const $t=(0,m.Z)(n=>({links:{margin:n.spacing(2,0),display:"grid",gridAutoFlow:"column",gridAutoColumns:"min-content",gridGap:n.spacing(3)}}),{name:"BackstageHeaderIconLinkRow"});function Ur(n){const{links:o}=n,l=$t();return t.createElement("nav",{className:l.links},o.map((d,p)=>t.createElement(dn,{key:p+1,...d})))}const Gn=n=>{const o=n==="dark"?"16%":"97%";return`
14
+ hsl(0, 0%, ${o}) 0%,
15
+ hsla(0, 0%, ${o}, 0.987) 8.1%,
16
+ hsla(0, 0%, ${o}, 0.951) 15.5%,
17
+ hsla(0, 0%, ${o}, 0.896) 22.5%,
18
+ hsla(0, 0%, ${o}, 0.825) 29%,
19
+ hsla(0, 0%, ${o}, 0.741) 35.3%,
20
+ hsla(0, 0%, ${o}, 0.648) 41.2%,
21
+ hsla(0, 0%, ${o}, 0.55) 47.1%,
22
+ hsla(0, 0%, ${o}, 0.45) 52.9%,
23
+ hsla(0, 0%, ${o}, 0.352) 58.8%,
24
+ hsla(0, 0%, ${o}, 0.259) 64.7%,
25
+ hsla(0, 0%, ${o}, 0.175) 71%,
26
+ hsla(0, 0%, ${o}, 0.104) 77.5%,
27
+ hsla(0, 0%, ${o}, 0.049) 84.5%,
28
+ hsla(0, 0%, ${o}, 0.013) 91.9%,
29
+ hsla(0, 0%, ${o}, 0) 100%
30
+ `},Nr=100,sr=10,Zr=(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:Nr,height:`calc(100% + ${sr}px)`,transition:"opacity 300ms",pointerEvents:"none"},fadeLeft:{left:-sr,background:`linear-gradient(90deg, ${Gn(n.palette.type)})`},fadeRight:{right:-sr,background:`linear-gradient(270deg, ${Gn(n.palette.type)})`},fadeHidden:{opacity:0},button:{position:"absolute"},buttonLeft:{left:-n.spacing(2)},buttonRight:{right:-n.spacing(2)}}),{name:"BackstageHorizontalScrollGrid"});function zr(n){const[[o,l],d]=React.useState([0,0]);return React.useLayoutEffect(()=>{const p=n.current;if(!p){d([0,0]);return}const E=()=>{const I=p.scrollLeft,U=p.scrollWidth-p.offsetWidth-p.scrollLeft;d([I,U])};return E(),p.addEventListener("scroll",E),window.addEventListener("resize",E),()=>{p.removeEventListener("scroll",E),window.removeEventListener("resize",E)}},[n]),[o,l]}function wn(n,o,l){const[d,p]=React.useState(0);return React.useLayoutEffect(()=>{if(d===0)return;const E=performance.now(),I=requestAnimationFrame(U=>{if(!n.current)return;const G=U-E,z=Math.abs(d)*G/o,X=Math.max(l,z)*Math.sign(d);n.current.scrollBy({left:X});const Ae=d-X;Math.sign(d)!==Math.sign(Ae)?p(0):p(Ae)});return()=>cancelAnimationFrame(I)},[n,d,o,l]),p}function On(n){const{scrollStep:o=100,scrollSpeed:l=50,minScrollDistance:d=5,children:p,...E}=n,I=Zr(n),U=React.useRef(),[G,z]=zr(U),ne=wn(U,l,d),X=Ae=>{!U.current||ne(Ae?o:-o)};return React.createElement("div",{...E,className:I.root},React.createElement(Grid,{container:!0,direction:"row",wrap:"nowrap",className:I.container,ref:U},p),React.createElement("div",{className:classNames(I.fade,I.fadeLeft,{[I.fadeHidden]:G===0})}),React.createElement("div",{className:classNames(I.fade,I.fadeRight,{[I.fadeHidden]:z===0})}),G>0&&React.createElement(IconButton,{title:"Scroll Left",onClick:()=>X(!1),className:classNames(I.button,I.buttonLeft,{})},React.createElement(ChevronLeftIcon,null)),z>0&&React.createElement(IconButton,{title:"Scroll Right",onClick:()=>X(!0),className:classNames(I.button,I.buttonRight,{})},React.createElement(ChevronRightIcon,null)))}const Kn=(0,m.Z)({alpha:{color:"#ffffff",fontFamily:"serif",fontWeight:"normal",fontStyle:"italic"},beta:{color:"#4d65cc",fontFamily:"serif",fontWeight:"normal",fontStyle:"italic"}},{name:"BackstageLifecycle"});function ir(n){const o=Kn(n),{shorthand:l,alpha:d}=n;return l?React.createElement("span",{className:o[d?"alpha":"beta"],style:{fontSize:"120%"}},d?React.createElement(React.Fragment,null,"\u03B1"):React.createElement(React.Fragment,null,"\u03B2")):React.createElement("span",{className:o[d?"alpha":"beta"]},d?"Alpha":"Beta")}const yr=(0,t.lazy)(()=>Promise.all([e.e(3860),e.e(8718)]).then(e.bind(e,98718)).then(n=>({default:n.RealLogViewer})));function Wr(n){const{Progress:o}=(0,c.useApp)().getComponents();return t.createElement(t.Suspense,{fallback:t.createElement(o,null)},t.createElement(yr,{...n}))}const kn=(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"}),Er={code:({inline:n,className:o,children:l,...d})=>{const p=String(l).replace(/\n+$/,""),E=/language-(\w+)/.exec(o||"");return!n&&E?t.createElement(je,{language:E[1],text:p}):t.createElement("code",{className:o,...d},l)}};function Hr(n){const{content:o,dialect:l="gfm",linkTarget:d}=n,p=kn();return React.createElement(ReactMarkdown,{remarkPlugins:l==="gfm"?[gfm]:[],className:p.markdown,children:o,components:Er,linkTarget:d})}var qn=e(10179);const hn=(0,m.Z)(n=>({root:{paddingLeft:n.spacing(3)}}),{name:"BackstageLoginRequestListItem"}),_n=({request:n,busy:o,setBusy:l})=>{const d=hn(),[p,E]=useState(),I=async()=>{l(!0);try{await n.trigger()}catch(G){E(isError(G)?G.message:"An unspecified error occurred")}finally{l(!1)}},U=n.provider.icon;return React.createElement(ListItem,{button:!0,disabled:o,classes:{root:d.root}},React.createElement(ListItemAvatar,null,React.createElement(U,{fontSize:"large"})),React.createElement(ListItemText,{primary:n.provider.title,secondary:p&&React.createElement(Typography,{color:"error"},p)}),React.createElement(Button,{color:"primary",variant:"contained",onClick:I},"Log in"))};var er=null;const tr=(0,m.Z)(n=>({dialog:{paddingTop:n.spacing(1)},title:{minWidth:0},contentList:{padding:0},actionButtons:{padding:n.spacing(2,0)}}),{name:"OAuthRequestDialog"});function vr(n){const o=tr(),[l,d]=useState(!1),p=useApi(oauthRequestApiRef),E=useObservable(useMemo(()=>p.authRequest$(),[p]),[]),I=()=>{E.forEach(U=>U.reject())};return React.createElement(Dialog,{open:Boolean(E.length),fullWidth:!0,maxWidth:"xs",classes:{paper:o.dialog}},React.createElement(DialogTitle,{classes:{root:o.title}},"Login Required"),React.createElement(DialogContent,{dividers:!0,classes:{root:o.contentList}},React.createElement(List,null,E.map(U=>React.createElement(LoginRequestListItem,{key:U.provider.title,request:U,busy:l,setBusy:d})))),React.createElement(DialogActions,{classes:{root:o.actionButtons}},React.createElement(Button,{onClick:I},"Reject All")))}var Ar=e(15277),Rr=e.n(Ar),lr=e(29862);const Sr=(0,m.Z)({container:{overflow:"visible !important"}},{name:"BackstageOverflowTooltip"});function Cr(n){var I;const[o,l]=(0,t.useState)(!1),d=(0,lr.t)(),p=Sr(),E=U=>{d()&&l(U)};return t.createElement(P.ZP,{title:(I=n.title)!=null?I:n.text||"",placement:n.placement,disableHoverListener:!o},t.createElement(Rr(),{text:n.text,line:n.line,onToggled:E,containerClassName:p.container}))}var Tr=e(67358);function br(n){const[o,l]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{const d=setTimeout(()=>l(!0),250);return()=>clearTimeout(d)},[]),o?t.createElement(Tr.Z,{...n,"data-testid":"progress"}):t.createElement("div",{style:{display:"none"}})}var Pr=e(94339),cr=e(14503),Ir=e(24579),ur=e(32552),on=e(15459),Sn=e(95544),Lr=e(27597);const gn=(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 Wn(n){const{link:o,title:l,onClick:d}=n,p=gn();return t.createElement("div",null,t.createElement(Mn.Z,null),t.createElement(k,{to:o,onClick:d,underline:"none"},t.createElement(Sn.Z,{display:"flex",alignItems:"center",className:p.root},t.createElement(Sn.Z,{className:p.boxTitle,fontWeight:"fontWeightBold",m:1},t.createElement(ie.Z,null,t.createElement("strong",null,l))),t.createElement(Lr.Z,{className:p.arrow}))))}const Hn=n=>{const{slackChannel:o}=n;if(o){if(typeof o=="string")return t.createElement(t.Fragment,null,"Please contact ",o," for help.");if(!o.href)return t.createElement(t.Fragment,null,"Please contact ",o.name," for help.")}else return null;return t.createElement(x,{to:o.href,variant:"contained"},o.name)},Or=class extends t.Component{constructor(o){super(o),this.state={error:void 0,errorInfo:void 0}}componentDidCatch(o,l){console.error(`ErrorBoundary, error: ${o}, info: ${l}`),this.setState({error:o,errorInfo:l})}render(){const{slackChannel:o,children:l}=this.props,{error:d}=this.state;return d?t.createElement(Ln,{title:"Something Went Wrong",error:d},t.createElement(Hn,{slackChannel:o})):l}},dr=(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"}),xr=(0,on.Z)(n=>({root:{display:"inline-block",padding:n.spacing(8,8,0,0),float:"right"}}),{name:"BackstageInfoCardCardActionsTopRight"})(cr.Z),nr={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 Yn(n){const{title:o,subheader:l,divider:d=!0,deepLink:p,slackChannel:E,errorBoundaryProps:I,variant:U,children:G,headerStyle:z,headerProps:ne,icon:X,action:Ae,actionsClassName:Ee,actions:Se,cardClassName:st,actionsTopRight:St,className:Wt,noPadding:Qt,titleTypographyProps:ot}=n,Ct=dr();let Pt={},an={};U&&U.split(/[\s]+/g).forEach(At=>{Pt={...Pt,...nr.card[At]},an={...an,...nr.cardContent[At]}});const Jn=()=>t.createElement("div",{className:Ct.headerSubheader},l&&t.createElement("div",{className:Ct.subheader},l),X),Tn=I||(E?{slackChannel:E}:{});return t.createElement(Pr.Z,{style:Pt,className:Wt},t.createElement(Or,{...Tn},o&&t.createElement(ur.Z,{classes:{root:Ct.header,title:Ct.headerTitle,subheader:Ct.headerSubheader,avatar:Ct.headerAvatar,action:Ct.headerAction,content:Ct.headerContent},title:o,subheader:Jn(),action:Ae,style:{...z},titleTypographyProps:ot,...ne}),St&&t.createElement(xr,null,St),d&&t.createElement(Mn.Z,null),t.createElement(Ir.Z,{className:re()(st,{[Ct.noPadding]:Qt}),style:an},G),Se&&t.createElement(cr.Z,{className:Ee},Se),p&&t.createElement(Wn,{...p})))}var jr=e(39307);const Vr=(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"}),fr={fractional:!0,inverse:!1,unit:"%",max:100},b=({palette:n,value:o,inverse:l,max:d})=>{if(isNaN(o))return"#ddd";const p=d||fr.max,E=l?p-o:o;return E<p/3?n.status.error:E<p*(2/3)?n.status.warning:n.status.ok};function q(n){const[o,l]=useState(null),{getColor:d=b}=n,p=Vr(n),{palette:E}=useTheme(),{value:I,fractional:U,inverse:G,unit:z,max:ne,description:X}={...fr,...n},Ae=U?Math.round(I*ne):I,Ee=ne!==100?Math.round(I):Ae,[Se,st]=useState(!1);return useEffect(()=>{const St=o,Wt=()=>st(!0),Qt=()=>st(!1);return St&&X?(St.addEventListener("mouseenter",Wt),St.addEventListener("mouseleave",Qt),()=>{St.removeEventListener("mouseenter",Wt),St.removeEventListener("mouseleave",Qt)}):()=>{st(!1)}},[X,o]),React.createElement("div",{ref:l,className:p.root},React.createElement(Circle,{strokeLinecap:"butt",percent:Ae,strokeWidth:12,trailWidth:12,strokeColor:d({palette:E,value:Ee,inverse:G,max:ne}),className:p.circle}),X&&Se?React.createElement("div",{className:p.description},X):React.createElement("div",{className:p.overlay},isNaN(I)?"N/A":`${Ee}${z}`))}const fe=(0,m.Z)({root:{height:"100%",width:250}},{name:"BackstageGaugeCard"});function Ie(n){const o=fe(n),{title:l,subheader:d,progress:p,inverse:E,deepLink:I,description:U,icon:G,variant:z,getColor:ne}=n,X={inverse:E,description:U,getColor:ne,value:p};return React.createElement("div",{className:o.root},React.createElement(InfoCard,{title:l,subheader:d,deepLink:I,variant:z,icon:G},React.createElement(Gauge,{...X})))}function ke(n){const{value:o,getColor:l=getProgressColor}=n,{palette:d}=useTheme();if(isNaN(o))return null;let p=Math.round(o*100*100)/100;p>100&&(p=100);const E=l({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:E})))}var ft=e(21324),A=e(7089),C=e(1292),O=e(42494),Z=e(74603),V=e(56939),Y=e(12231),le=e(73698),ve=e(72379);const Le=(0,m.Z)(()=>(0,a.Z)({icon:{position:"absolute",right:"4px",pointerEvents:"none"}}),{name:"BackstageClosedDropdown"});var Te=()=>{const n=Le();return t.createElement(ve.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 $e=(0,m.Z)(()=>(0,a.Z)({icon:{position:"absolute",right:"4px",pointerEvents:"none"}}),{name:"BackstageOpenedDropdown"});var mt=()=>{const n=$e();return t.createElement(ve.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 Xe=(0,on.Z)(n=>(0,a.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"})(Z.Z),Ge=(0,m.Z)(n=>(0,a.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 vt(n){const{multiple:o,items:l,label:d,placeholder:p,selected:E,onChange:I,triggerReset:U,native:G=!1,disabled:z=!1}=n,ne=Ge(),[X,Ae]=(0,t.useState)(E||(o?[]:"")),[Ee,Se]=(0,t.useState)(!1);(0,t.useEffect)(()=>{Ae(o?[]:"")},[U,o]),(0,t.useEffect)(()=>{E!==void 0&&Ae(E)},[E]);const st=ot=>{Ae(ot.target.value),I(ot.target.value)},St=ot=>{if(z){ot.preventDefault();return}Se(Ct=>o&&!(ot.target instanceof HTMLElement)?!0:!Ct)},Wt=()=>{Se(!1)},Qt=ot=>()=>{const Ct=X.filter(Pt=>Pt!==ot);Ae(Ct),I(Ct)};return t.createElement("div",{className:ne.root},t.createElement(C.Z,{onClickAway:Wt},t.createElement(O.Z,{className:ne.formControl},t.createElement(V.Z,{className:ne.formLabel},d),t.createElement(le.Z,{value:X,native:G,disabled:z,"data-testid":"select",displayEmpty:!0,multiple:o,onChange:st,onClick:St,open:Ee,input:t.createElement(Xe,null),label:d,tabIndex:0,renderValue:ot=>{var Ct;return o&&X.length!==0?t.createElement("div",{className:ne.chips},ot.map(Pt=>{var an,Jn;return t.createElement(A.Z,{key:(an=l.find(Tn=>Tn.value===Pt))==null?void 0:an.value,label:(Jn=l.find(Tn=>Tn.value===Pt))==null?void 0:Jn.label,clickable:!0,onDelete:Qt(Pt),className:ne.chip})})):t.createElement(ie.Z,null,X.length===0?p||"":(Ct=l.find(Pt=>Pt.value===ot))==null?void 0:Ct.label)},IconComponent:()=>Ee?t.createElement(mt,null):t.createElement(Te,null),MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},getContentAnchorEl:null}},p&&!o&&t.createElement(Y.Z,{value:[]},p),G?l&&l.map(ot=>t.createElement("option",{value:ot.value,key:ot.value},ot.label)):l&&l.map(ot=>t.createElement(Y.Z,{key:ot.value,value:ot.value},o&&t.createElement(ft.Z,{color:"primary",checked:X.includes(ot.value)||!1,className:ne.checkbox}),ot.label))))))}const Dt=()=>{},xn=t.createContext({stepperLength:0,stepIndex:0,setStepIndex:Dt,stepHistory:[],setStepHistory:Dt,onStepChange:Dt});function Yt(n){const{children:o,elevated:l,onStepChange:d,activeStep:p=0}=n,[E,I]=useState(p),[U,G]=useState([0]);useEffect(()=>{I(p)},[p]);const z=[];let ne;return Children.forEach(o,X=>{isValidElement(X)&&(X.props.end?ne=X:z.push(X))}),React.createElement(React.Fragment,null,React.createElement(xn.Provider,{value:{stepIndex:E,setStepIndex:I,stepHistory:U,setStepHistory:G,onStepChange:d,stepperLength:Children.count(o)}},React.createElement(MuiStepper,{activeStep:E,orientation:"vertical",elevation:l?2:0},z)),E>=Children.count(o)-1&&ne)}const sn=(0,m.Z)(n=>({root:{marginTop:n.spacing(3),"& button":{marginRight:n.spacing(1)}}}),{name:"BackstageSimpleStepperFooter"}),fn=({text:n,handleClick:o})=>React.createElement(Button,{onClick:o},n||"Reset"),pn=({text:n,handleClick:o,disabled:l,last:d,stepIndex:p})=>React.createElement(Button,{variant:"contained",color:"primary",disabled:l,"data-testid":`nextButton-${p}`,onClick:o},n||(d?"Finish":"Next")),mr=({text:n,handleClick:o,disabled:l,stepIndex:d})=>React.createElement(Button,{onClick:o,"data-testid":`backButton-${d}`,disabled:l},n||"Back"),Dr=({actions:n={},children:o})=>{const l=sn(),{stepperLength:d,stepIndex:p,setStepIndex:E,stepHistory:I,setStepHistory:U,onStepChange:G}=useContext(VerticalStepperContext),z=(Ee,Se)=>{Se&&Se(),G&&G(p,Ee),E(Ee)},ne=()=>{const Ee=n.nextStep?n.nextStep(p,d-1):p+1;z(Ee,n.onNext),U([...I,Ee])},X=()=>{I.pop(),z(I[I.length-1],n.onBack),U([...I])},Ae=()=>{z(0,n.onRestart),U([0])};return React.createElement("div",{className:l.root},[void 0,!0].includes(n.showBack)&&p!==0&&React.createElement(mr,{text:n.backText,handleClick:X,disabled:p===0,stepIndex:p}),[void 0,!0].includes(n.showNext)&&React.createElement(pn,{text:n.nextText,handleClick:ne,disabled:!!d&&p>=d||!!n.canNext&&!n.canNext(),stepIndex:p}),n.showRestart&&p!==0&&React.createElement(fn,{text:n.restartText,handleClick:Ae,stepIndex:p}),o)},Gr=(0,m.Z)(n=>({end:{padding:n.spacing(3)}}),{name:"SimpleStepperStep"});function yn(n){const{title:o,children:l,end:d,actions:p,...E}=n,I=Gr();return d?React.createElement("div",{className:I.end},React.createElement(Typography,{variant:"h6"},o),l,React.createElement(SimpleStepperFooter,{actions:{...p||{},showNext:!1}})):React.createElement(MuiStep,{...E},React.createElement(StepLabel,null,React.createElement(Typography,{variant:"h6"},o)),React.createElement(StepContent,null,l,React.createElement(SimpleStepperFooter,{actions:p})))}const Jt=(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 Fr(n){const o=Jt(n);return React.createElement("span",{className:classNames(o.status,o.ok),"aria-label":"Status ok","aria-hidden":"true",...n})}function no(n){const o=Jt(n);return React.createElement("span",{className:classNames(o.status,o.warning),"aria-label":"Status warning","aria-hidden":"true",...n})}function Vi(n){const o=Jt(n);return React.createElement("span",{className:classNames(o.status,o.error),"aria-label":"Status error","aria-hidden":"true",...n})}function Gi(n){const o=Jt(n);return React.createElement("span",{className:classNames(o.status,o.pending),"aria-label":"Status pending","aria-hidden":"true",...n})}function Ki(n){const o=Jt(n);return React.createElement("span",{className:classNames(o.status,o.running),"aria-label":"Status running","aria-hidden":"true",...n})}function ki(n){const o=Jt(n);return React.createElement("span",{className:classNames(o.status,o.aborted),"aria-label":"Status aborted","aria-hidden":"true",...n})}var Yi=e(74600),go=e(15584);const ia=n=>(0,a.Z)({root:{fontWeight:"bolder",whiteSpace:"nowrap",paddingRight:n.spacing(4),border:"0",verticalAlign:"top"}}),la={root:{border:"0",verticalAlign:"top"}},ca=n=>(0,a.Z)({root:{listStyle:"none",margin:n.spacing(0,0,-1,0),padding:"0"}}),ua=n=>(0,a.Z)({root:{padding:n.spacing(0,0,1,0)},random:{}}),da=(0,on.Z)(ia,{name:"BackstageMetadataTableTitleCell"})(go.Z),fa=(0,on.Z)(la,{name:"BackstageMetadataTableCell"})(go.Z),Ji=({dense:n,children:o})=>React.createElement(Table,{size:n?"small":"medium"},React.createElement(TableBody,null,o)),Qi=({title:n,children:o,...l})=>React.createElement(TableRow,null,n&&React.createElement(da,null,n),React.createElement(fa,{colSpan:n?1:2,...l},o)),po=(0,on.Z)(ca,{name:"BackstageMetadataTableList"})(({classes:n,children:o})=>t.createElement("ul",{className:n.root},o)),Xi=(0,on.Z)(ua,{name:"BackstageMetadataTableListItem"})(({classes:n,children:o})=>t.createElement("li",{className:n.root},o)),yo=(0,a.Z)({root:{margin:"0 0",listStyleType:"none"}}),ma=n=>(0,a.Z)({root:{...yo.root,paddingLeft:n.spacing(1)}}),Eo=(0,on.Z)(yo,{name:"BackstageStructuredMetadataTableList"})(({classes:n,children:o})=>t.createElement(po,{classes:n},o)),vo=(0,on.Z)(ma,{name:"BackstageStructuredMetadataTableNestedList"})(({classes:n,children:o})=>t.createElement(po,{classes:n},o));function ha(n,o){const l=n.map((d,p)=>React.createElement(MetadataListItem,{key:p},ro(d)));return o?React.createElement(vo,null,l):React.createElement(Eo,null,l)}function ga(n,o,l){const d=Object.keys(n).map(p=>{const E=ro(n[p],!0),I=l&&l.titleFormat?l.titleFormat(p):startCase(p);return React.createElement(MetadataListItem,{key:p},`${I}: `,E)});return o?React.createElement(vo,null,d):React.createElement(Eo,null,d)}function ro(n,o,l){return React.isValidElement(n)?React.createElement(Fragment,null,n):typeof n=="object"&&!Array.isArray(n)?ga(n,o,l):Array.isArray(n)?ha(n,l):typeof n=="boolean"?React.createElement(Fragment,null,n?"\u2705":"\u274C"):React.createElement(Fragment,null,n)}const pa=({value:n,options:o})=>React.createElement(Fragment,null,ro(n,o)),ya=({title:n,value:o,options:l})=>React.createElement(MetadataTableItem,{title:l&&l.titleFormat?l.titleFormat(n):startCase(n)},React.createElement(pa,{value:o,options:l}));function Ea(n,o){return Object.keys(n).map(l=>React.createElement(ya,{key:l,title:l,value:n[l],options:o}))}function qi(n){const{metadata:o,dense:l=!0,options:d}=n,p=Ea(o,d||{});return React.createElement(MetadataTable,{dense:l},p)}var va=e(49429),Aa=e(86136),Ao=e(79784),Br=e(76635),Ra=e(19126),Ro=e.n(Ra);function Sa(n){return qs.stringify(n,{strictNullHandling:!0})}function So(n){return qs.parse(n,{ignoreQueryPrefix:!0,strictNullHandling:!0})}function Co(n,o){return So(n)[o]}function Ca(n,o,l){const d={...So(n),[o]:l};return Sa(d)}function _i(n,o=250){const[l,d]=useSearchParams(),p=l.toString(),[E,I]=useState(Co(p,n));return useEffect(()=>{const U=Co(p,n);I(G=>isEqual(U,G)?G:U)},[p,I,n]),useDebouncedEffect(()=>{const U=Ca(p,n,E);p!==U&&d(U,{replace:!0})},[d,E,p,n],o),[E,I]}const Ta={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 To(){const o=(0,c.useApiHolder)().get(c.configApiRef),l=o==null?void 0:o.getOptionalConfig("app.support");return l?{url:l.getString("url"),items:l.getConfigArray("items").flatMap(d=>{var p;return{title:d.getString("title"),icon:d.getOptionalString("icon"),links:((p=d.getOptionalConfigArray("links"))!=null?p:[]).flatMap(E=>({url:E.getString("url"),title:E.getString("title")}))}})}:Ta}var ba=e(80079);function Dn(n,o){const d=(0,c.useApp)().getSystemIcon(n);return d?t.createElement(d,{...o}):t.createElement(ba.Z,{...o})}function el(n){return Dn("brokenImage",n)}function tl(n){return Dn("catalog",n)}function nl(n){return Dn("chat",n)}function rl(n){return Dn("dashboard",n)}function ol(n){return Dn("docs",n)}function al(n){return Dn("email",n)}function sl(n){return Dn("github",n)}function il(n){return Dn("group",n)}function Kr(n){return Dn("help",n)}function ll(n){return Dn("user",n)}function cl(n){return Dn("warning",n)}const Pa=(0,m.Z)({popoverList:{minWidth:260,maxWidth:400}},{name:"BackstageSupportButton"}),Ia=({icon:n})=>{var d;const o=(0,c.useApp)(),l=n&&(d=o.getSystemIcon(n))!=null?d:Kr;return t.createElement(l,null)},La=({link:n})=>{var o;return t.createElement(k,{to:n.url},(o=n.title)!=null?o:n.url)},Oa=({item:n})=>{var o;return t.createElement(dt.Z,null,t.createElement(Aa.Z,null,t.createElement(Ia,{icon:n.icon})),t.createElement(gt.Z,{primary:n.title,secondary:(o=n.links)==null?void 0:o.reduce((l,d,p)=>[...l,p>0&&t.createElement("br",{key:p}),t.createElement(La,{link:d,key:d.url})],[])}))};function xa(n){const{title:o,children:l}=n,{items:d}=To(),[p,E]=(0,t.useState)(!1),[I,U]=(0,t.useState)(null),G=Pa(),z=(0,de.Z)(Ae=>Ae.breakpoints.down("sm")),ne=Ae=>{U(Ae.currentTarget),E(!0)},X=()=>{E(!1)};return t.createElement(t.Fragment,null,t.createElement(Sn.Z,{display:"flex",ml:1},z?t.createElement(D.Z,{color:"primary",size:"small",onClick:ne,"data-testid":"support-button"},t.createElement(Kr,null)):t.createElement(y.Z,{"data-testid":"support-button","aria-label":"support",color:"primary",onClick:ne,startIcon:t.createElement(Kr,null)},"Support")),t.createElement(Ao.ZP,{"data-testid":"support-button-popover",open:p,anchorEl:I,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},onClose:X},t.createElement(Ut.Z,{className:G.popoverList},o&&t.createElement(dt.Z,{alignItems:"flex-start"},t.createElement(ie.Z,{variant:"subtitle1"},o)),t.Children.map(l,(Ae,Ee)=>t.createElement(dt.Z,{alignItems:"flex-start",key:`child-${Ee}`},Ae)),d&&d.map((Ae,Ee)=>t.createElement(Oa,{item:Ae,key:`item-${Ee}`}))),t.createElement(va.Z,null,t.createElement(y.Z,{color:"primary",onClick:X},"Close"))))}var oo=e(18671),Cn=e(10289);const kr=72,bo=24,Po=18,jn={drawerWidthClosed:kr,drawerWidthOpen:224,defaultOpenDelayMs:100,defaultCloseDelayMs:0,defaultFadeDuration:200,logoHeight:32,iconContainerWidth:kr,iconSize:kr-bo*2,iconPadding:bo,selectedIndicatorWidth:3,userBadgePadding:Po,userBadgeDiameter:kr-Po*2,mobileSidebarHeight:56},Da=n=>({...jn,...n,iconContainerWidth:jn.drawerWidthClosed,iconSize:jn.drawerWidthClosed-jn.iconPadding*2,userBadgeDiameter:jn.drawerWidthClosed-jn.userBadgePadding*2}),Io={drawerWidthClosed:0,drawerWidthOpen:202,defaultOpenDelayMs:jn.defaultOpenDelayMs+200},Fa=n=>({...Io,...n}),ul="@backstage/core/sidebar-intro-dismissed",Mr=(0,t.createContext)({isOpen:!1,setOpen:()=>{}}),$n=(0,t.createContext)({sidebarConfig:jn,submenuConfig:Io}),Lo=(0,t.createContext)({isHoveredOn:!1,setIsHoveredOn:()=>{}});var Yr;(function(n){const o="sidebarPinState";n.SIDEBAR_PIN_STATE=o})(Yr||(Yr={}));const Oo={getSidebarPinState(){let n;try{n=JSON.parse(window.localStorage.getItem(Yr.SIDEBAR_PIN_STATE)||"true")}catch{return!0}return!!n},setSidebarPinState(n){return window.localStorage.setItem(Yr.SIDEBAR_PIN_STATE,JSON.stringify(n))}},Ba=(0,m.Z)(n=>({root:o=>({width:"100%",transition:"padding-left 0.1s ease-out",isolation:"isolate",[n.breakpoints.up("sm")]:{paddingLeft:()=>o.isPinned?o.sidebarConfig.drawerWidthOpen:o.sidebarConfig.drawerWidthClosed},[n.breakpoints.down("xs")]:{paddingBottom:o.sidebarConfig.mobileSidebarHeight}}),content:{zIndex:0,isolation:"isolate","&:focus":{outline:0}}}),{name:"BackstageSidebarPage"}),hr=(0,t.createContext)({isPinned:!0,toggleSidebarPinState:()=>{},isMobile:!1}),xo=(0,t.createContext)({content:{contentRef:void 0}});function Ma(n){const[o,l]=(0,t.useState)(()=>Oo.getSidebarPinState()),{sidebarConfig:d}=(0,t.useContext)($n),p=(0,t.useRef)(null),E=(0,t.useMemo)(()=>({content:{contentRef:p}}),[p]);(0,t.useEffect)(()=>{Oo.setSidebarPinState(o)},[o]);const I=(0,de.Z)(z=>z.breakpoints.down("xs"),{noSsr:!0}),U=()=>l(!o),G=Ba({isPinned:o,sidebarConfig:d});return t.createElement(hr.Provider,{value:{isPinned:o,toggleSidebarPinState:U,isMobile:I}},t.createElement(xo.Provider,{value:E},t.createElement("div",{className:G.root},n.children)))}function Do(){const{content:n}=(0,t.useContext)(xo);return{focusContent:(0,t.useCallback)(()=>{var l,d;(d=(l=n==null?void 0:n.contentRef)==null?void 0:l.current)==null||d.focus()},[n]),contentRef:n==null?void 0:n.contentRef}}var wa=e(50023),$a=e(4190),Ua=e(87685),Na=e(44882),Za=e(57998);const za=(0,m.Z)(n=>({root:{flexGrow:0,margin:n.spacing(0,2),color:n.palette.navigation.color},selected:o=>({color:`${n.palette.navigation.selectedColor}!important`,borderTop:`solid ${o.sidebarConfig.selectedIndicatorWidth}px ${n.palette.navigation.indicator}`,marginTop:"-1px"}),label:{display:"none"}})),Wa=n=>{const{to:o,label:l,icon:d,value:p}=n,{sidebarConfig:E}=(0,t.useContext)($n),I=za({sidebarConfig:E}),U=(0,Cn.TH)(),{selectedMenuItemIndex:G,setSelectedMenuItemIndex:z}=(0,t.useContext)(Mo),ne=(Ae,Ee)=>{z(Ee===G?-1:Ee)},X=p===G&&G>=0||p!==G&&!(G>=0)&&o===U.pathname;return t.createElement(Za.Z,{label:l,icon:d,component:k,to:o||U.pathname,onChange:ne,value:p,selected:X,classes:I})},Fo=n=>{const{children:o,to:l,label:d,icon:p,value:E}=n,{isMobile:I}=(0,t.useContext)(hr);return I?t.createElement(Wa,{to:l,label:d,icon:p,value:E}):t.createElement(t.Fragment,null,o)},Bo=(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:o=>({background:n.palette.navigation.background,width:"100%",bottom:`${o.sidebarConfig.mobileSidebarHeight}px`,height:`calc(100% - ${o.sidebarConfig.mobileSidebarHeight}px)`,flex:"0 1 auto",overflow:"auto"}),overlayHeader:{display:"flex",color:n.palette.bursts.fontColor,alignItems:"center",justifyContent:"space-between",padding:n.spacing(2,3)},overlayHeaderClose:{color:n.palette.bursts.fontColor},marginMobileSidebar:o=>({marginBottom:`${o.sidebarConfig.mobileSidebarHeight}px`})})),Ha=n=>(0,Br.orderBy)(n,({props:{priority:o}})=>Number.isInteger(o)?o:-1,"desc"),ja=t.createElement(Fo).type,Va=({children:n,label:o="Menu",open:l,onClose:d})=>{const{sidebarConfig:p}=(0,t.useContext)($n),E=Bo({sidebarConfig:p});return t.createElement($a.ZP,{anchor:"bottom",open:l,onClose:d,ModalProps:{BackdropProps:{classes:{root:E.marginMobileSidebar}}},classes:{root:E.marginMobileSidebar,paperAnchorBottom:E.overlay}},t.createElement(Sn.Z,{className:E.overlayHeader},t.createElement(ie.Z,{variant:"h3"},o),t.createElement(D.Z,{onClick:d,classes:{root:E.overlayHeaderClose}},t.createElement(Ua.Z,null))),t.createElement(Sn.Z,{component:"nav"},n))},Mo=(0,t.createContext)({selectedMenuItemIndex:-1,setSelectedMenuItemIndex:()=>{}}),Ga=n=>{const{sidebarConfig:o}=(0,t.useContext)($n),{children:l}=n,d=Bo({sidebarConfig:o}),p=(0,Cn.TH)(),[E,I]=(0,t.useState)(-1);(0,t.useEffect)(()=>{I(-1)},[p.pathname]);let U=(0,c.useElementFilter)(l,z=>z.getElements().filter(ne=>ne.type===ja));if(l)U.length?U=Ha(U):U.push(t.createElement(Fo,{key:"default_menu",icon:t.createElement(Na.Z,null)},l));else return null;const G=E>=0&&!U[E].props.to;return t.createElement(Mr.Provider,{value:{isOpen:!0,setOpen:()=>{}}},t.createElement(Mo.Provider,{value:{selectedMenuItemIndex:E,setSelectedMenuItemIndex:I}},t.createElement(Va,{label:U[E]&&U[E].props.label,open:G,onClose:()=>I(-1)},U[E]&&U[E].props.children),t.createElement(wa.Z,{className:d.root,"data-testid":"mobile-sidebar-root",component:"nav"},U)))},wo=(0,m.Z)(n=>({drawer:o=>({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:o.sidebarConfig.drawerWidthClosed,transition:n.transitions.create("width",{easing:n.transitions.easing.sharp,duration:n.transitions.duration.shortest}),"& > *":{flexShrink:0},"&::-webkit-scrollbar":{display:"none"}}),drawerOpen:o=>({width:o.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 En;(function(n){n[n.Closed=0]="Closed";const l=0+1;n[n.Idle=l]="Idle";const d=l+1;n[n.Open=d]="Open"})(En||(En={}));const Ka=n=>{const{sidebarConfig:o}=(0,t.useContext)($n),{openDelayMs:l=o.defaultOpenDelayMs,closeDelayMs:d=o.defaultCloseDelayMs,disableExpandOnHover:p,children:E}=n,I=wo({sidebarConfig:o}),U=(0,de.Z)(Wt=>Wt.breakpoints.down("md"),{noSsr:!0}),[G,z]=(0,t.useState)(En.Closed),ne=(0,t.useRef)(),{isPinned:X,toggleSidebarPinState:Ae}=(0,t.useContext)(hr),Ee=()=>{X||p||(ne.current&&(clearTimeout(ne.current),ne.current=void 0),G!==En.Open&&!U&&(ne.current=window.setTimeout(()=>{ne.current=void 0,z(En.Open)},l),z(En.Idle)))},Se=()=>{X||p||(ne.current&&(clearTimeout(ne.current),ne.current=void 0),G===En.Idle?z(En.Closed):G===En.Open&&(ne.current=window.setTimeout(()=>{ne.current=void 0,z(En.Closed)},d)))},st=G===En.Open&&!U||X,St=Wt=>{Wt?(z(En.Open),Ae()):(z(En.Closed),Ae())};return t.createElement("nav",{style:{},"aria-label":"sidebar nav"},t.createElement(Ya,null),t.createElement(Mr.Provider,{value:{isOpen:st,setOpen:St}},t.createElement("div",{className:I.root,"data-testid":"sidebar-root",onMouseEnter:p?()=>{}:Ee,onFocus:p?()=>{}:Ee,onMouseLeave:p?()=>{}:Se,onBlur:p?()=>{}:Se},t.createElement("div",{className:re()(I.drawer,{[I.drawerOpen]:st})},E))))},ka=n=>{var G,z;const o=Da((G=n.sidebarOptions)!=null?G:{}),l=Fa((z=n.submenuOptions)!=null?z:{}),{children:d,disableExpandOnHover:p,openDelayMs:E,closeDelayMs:I}=n,{isMobile:U}=(0,t.useContext)(hr);return U?t.createElement(Ga,null,d):t.createElement($n.Provider,{value:{sidebarConfig:o,submenuConfig:l}},t.createElement(Ka,{openDelayMs:E,closeDelayMs:I,disableExpandOnHover:p},d))};function Ya(){const{sidebarConfig:n}=(0,t.useContext)($n),{focusContent:o,contentRef:l}=Do(),d=wo({sidebarConfig:n});return l!=null&&l.current?t.createElement(y.Z,{onClick:o,variant:"contained",className:re()(d.visuallyHidden)},"Skip to content"):null}function $o(n,o){const l=new URLSearchParams(o.search).toString(),d=Ro().parse(l),p=new URLSearchParams(n.search).toString(),E=Ro().parse(p);return(0,Br.isEqual)(o.pathname,n.pathname)&&(0,Br.isMatch)(E,d)}const Ja=(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},dropdownArrow:{position:"absolute",right:21},dropdown:{display:"flex",flexDirection:"column",alignItems:"end"},dropdownItem:{width:"100%",padding:"10px 0 10px 0"},textContent:{color:n.palette.navigation.color,display:"flex",justifyContent:"center",[n.breakpoints.down("xs")]:{display:"block",paddingLeft:n.spacing(4)},fontSize:"14px"}}),{name:"BackstageSidebarSubmenuItem"}),dl=n=>{const{title:o,to:l,icon:d,dropdownItems:p}=n,E=Ja(),{setIsHoveredOn:I}=useContext(SidebarItemWithSubmenuContext),U=()=>{I(!1)},G=useResolvedPath(l),z=useLocation();let ne=isLocationMatch(z,G);const[X,Ae]=useState(!1),Ee=()=>{Ae(!X)};return p!==void 0?(p.some(Se=>{const st=resolvePath(Se.to);return ne=isLocationMatch(z,st),ne}),React.createElement("div",{className:E.itemContainer},React.createElement("button",{onClick:Ee,onTouchStart:Se=>Se.stopPropagation(),className:classnames(E.item,ne?E.selected:void 0)},React.createElement(d,{fontSize:"small"}),React.createElement(Typography,{variant:"subtitle1",className:E.label},o),X?React.createElement(ArrowDropUpIcon,{className:E.dropdownArrow}):React.createElement(ArrowDropDownIcon,{className:E.dropdownArrow})),p&&X&&React.createElement("div",{className:E.dropdown},p.map((Se,st)=>React.createElement(Link,{to:Se.to,underline:"none",className:E.dropdownItem,onClick:U,onTouchStart:St=>St.stopPropagation(),key:st},React.createElement(Typography,{className:E.textContent},Se.title)))))):React.createElement("div",{className:E.itemContainer},React.createElement(Link,{to:l,underline:"none",className:classnames(E.item,ne?E.selected:void 0),onClick:U,onTouchStart:Se=>Se.stopPropagation()},React.createElement(d,{fontSize:"small"}),React.createElement(Typography,{variant:"subtitle1",className:E.label},o)))},Qa=(0,m.Z)(n=>({root:{zIndex:1e3,position:"relative",overflow:"visible",width:n.spacing(7)+1},drawer:o=>{var l,d;return{display:"flex",flexFlow:"column nowrap",alignItems:"flex-start",position:"fixed",[n.breakpoints.up("sm")]:{marginLeft:o.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=(l=n.palette.navigation.submenu)==null?void 0:l.background)!=null?d:"#404040",overflowX:"hidden",msOverflowStyle:"none",scrollbarWidth:"none",cursor:"default",width:o.submenuConfig.drawerWidthClosed,transitionDelay:`${o.submenuConfig.defaultOpenDelayMs}ms`,"& > *":{flexShrink:0},"&::-webkit-scrollbar":{display:"none"}}},drawerOpen:o=>({width:o.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"}),Xa=n=>{const{isOpen:o}=(0,t.useContext)(Mr),{sidebarConfig:l,submenuConfig:d}=(0,t.useContext)($n),p=o?l.drawerWidthOpen:l.drawerWidthClosed,E=Qa({left:p,submenuConfig:d}),{isHoveredOn:I}=(0,t.useContext)(Lo),[U,G]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{G(I)},[I]),t.createElement("div",{className:re()(E.drawer,{[E.drawerOpen]:U})},t.createElement(ie.Z,{variant:"h5",className:E.title},n.title),n.children)};var Jr=e(76600),qa=e(26739),_a=e(98989),es=e(59797),ts=e(83543);const ns=(0,m.Z)({iconContainer:{display:"flex",position:"relative",width:"100%"},arrow1:{right:"6px",position:"absolute"}}),fl=()=>{const n=ns();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 ml=null;const rs=(0,m.Z)({iconContainer:{display:"flex",position:"relative",width:"100%"},arrow1:{right:"6px",position:"absolute"}}),hl=()=>{const n=rs();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 gl=null;const os=n=>(0,m.Z)(o=>{var l,d,p,E;return{root:{color:o.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:{[o.breakpoints.up("sm")]:{width:n.drawerWidthOpen}},highlightable:{"&:hover":{background:(d=(l=o.palette.navigation.navItem)==null?void 0:l.hoverBackground)!=null?d:"#404040"}},highlighted:{background:(E=(p=o.palette.navigation.navItem)==null?void 0:p.hoverBackground)!=null?E:"#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:-o.spacing(2),display:"flex",alignItems:"center",justifyContent:"center"},searchRoot:{marginBottom:12},searchField:{color:"#b5b5b5",fontWeight:"bold",fontSize:o.typography.fontSize},searchFieldHTMLInput:{padding:o.spacing(2,0,2)},searchContainer:{width:n.drawerWidthOpen-n.iconContainerWidth},secondaryAction:{width:o.spacing(6),textAlign:"center",marginRight:o.spacing(1)},closedItemIcon:{width:"100%",justifyContent:"center"},submenuArrow:{display:"flex"},expandButton:{background:"none",border:"none",color:o.palette.navigation.color,width:"100%",cursor:"pointer",position:"relative",height:48},arrows:{position:"absolute",right:10},selected:{"&$root":{borderLeft:`solid ${n.selectedIndicatorWidth}px ${o.palette.navigation.indicator}`,color:o.palette.navigation.selectedColor},"&$closed":{width:n.drawerWidthClosed},"& $closedItemIcon":{paddingRight:n.selectedIndicatorWidth},"& $iconContainer":{marginLeft:-n.selectedIndicatorWidth}}}},{name:"BackstageSidebarItem"});function Qr(n){return(0,t.useMemo)(()=>os(n),[n])()}const as=(n,o)=>(0,c.useElementFilter)(n.props.children,l=>{let d=!1;return l.getElements().forEach(({props:{to:p,dropdownItems:E}})=>{if(!d){if(E!=null&&E.length){E.forEach(({to:I})=>d=d||$o(o,(0,Cn.i3)(I)));return}p&&(d=$o(o,(0,Cn.i3)(p)))}}),d},[o.pathname]);function Uo(n){return n.to===void 0}const ss=t.createElement(Xa).type,is=t.forwardRef(function({to:o,end:l,style:d,className:p,activeStyle:E,caseSensitive:I,activeClassName:U="active","aria-current":G="page",...z},ne){let{pathname:X}=(0,Cn.TH)(),{pathname:Ae}=(0,Cn.WU)(o);I||(X=X.toLocaleLowerCase("en-US"),Ae=Ae.toLocaleLowerCase("en-US"));let Ee=X===Ae;!Ee&&!l&&(Ee=X.startsWith(`${Ae}/`));const Se=Ee?G:void 0;return t.createElement(v.rU,{...z,to:o,ref:ne,"aria-current":Se,style:{...d,...Ee?E:void 0},className:re()([p,Ee?U:void 0])})}),No=(0,t.forwardRef)((n,o)=>{const{icon:l,text:d,hasNotifications:p=!1,disableHighlight:E=!1,onClick:I,children:U,className:G,...z}=n,{sidebarConfig:ne}=(0,t.useContext)($n),X=Qr(ne),{isOpen:Ae}=(0,t.useContext)(Mr),Ee=t.createElement(qa.Z,{color:"secondary",variant:"dot",overlap:"circular",invisible:!p,className:re()({[X.closedItemIcon]:!Ae})},t.createElement(l,{fontSize:"small"})),Se=t.createElement(t.Fragment,null,t.createElement("div",{"data-testid":"login-button",className:X.iconContainer},Ee),d&&t.createElement(ie.Z,{variant:"subtitle2",className:X.label},d),t.createElement("div",{className:X.secondaryAction},U)),st=Ae?Se:Ee,St={onClick:I,className:re()(G,X.root,Ae?X.open:X.closed,Uo(n)&&X.buttonItem,{[X.highlightable]:!E})};return Uo(n)?t.createElement("button",{"aria-label":d,...St,ref:o},st):t.createElement(is,{...St,activeClassName:X.selected,to:n.to?n.to:"",ref:o,"aria-label":d||n.to,...z},st)}),ls=({children:n,...o})=>{const{sidebarConfig:l}=(0,t.useContext)($n),d=Qr(l),[p,E]=(0,t.useState)(!1),I=(0,Cn.TH)(),U=as(n,I),G=(0,de.Z)(Ae=>Ae.breakpoints.down("sm")),z=()=>{E(!0)},ne=()=>{E(!1)},X=()=>G?p?t.createElement(es.Z,{fontSize:"small",className:d.submenuArrow}):t.createElement(ts.Z,{fontSize:"small",className:d.submenuArrow}):!p&&t.createElement(_a.Z,{fontSize:"small",className:d.submenuArrow});return t.createElement(Lo.Provider,{value:{isHoveredOn:p,setIsHoveredOn:E}},t.createElement("div",{"data-testid":"item-with-submenu",onMouseLeave:ne,onTouchStart:p?ne:z,onMouseEnter:z,className:re()(p&&d.highlighted)},t.createElement(No,{className:U?d.selected:"",...o},X()),p&&n))},Zo=(0,t.forwardRef)((n,o)=>{const[l]=(0,c.useElementFilter)(n.children,d=>d.getElements().filter(p=>p.type===ss));return l?t.createElement(ls,{...n},l):t.createElement(No,{...n,ref:o})});function pl(n){const{sidebarConfig:o}=useContext(SidebarConfigContext),[l,d]=useState(""),p=Qr(o),E=n.icon?n.icon:SearchIcon,I=()=>{n.onSearch(l),d("")},U=X=>{X.key==="Enter"&&(X.preventDefault(),I())},G=X=>{d(X.target.value)},z=X=>{X.preventDefault(),X.stopPropagation()},ne=X=>{I(),X.preventDefault()};return React.createElement("div",{className:p.searchRoot},React.createElement(Zo,{icon:E,to:n.to,onClick:ne,disableHighlight:!0},React.createElement(TextField,{placeholder:"Search",value:l,onClick:z,onChange:G,onKeyDown:U,className:p.searchContainer,InputProps:{disableUnderline:!0,className:p.searchField},inputProps:{className:p.searchFieldHTMLInput}})))}const yl=(0,Jr.Z)("div")({flex:1},{name:"BackstageSidebarSpace"}),El=(0,Jr.Z)("div")({height:8},{name:"BackstageSidebarSpacer"}),cs=(0,Jr.Z)("hr")({height:1,width:"100%",background:"#383838",border:"none",margin:"12px 0px"},{name:"BackstageSidebarDivider"}),us=n=>({overflowY:"auto","&::-webkit-scrollbar":{backgroundColor:n.palette.background.default,width:"5px",borderRadius:"5px"},"&::-webkit-scrollbar-thumb":{backgroundColor:n.palette.text.hint,borderRadius:"5px"}}),vl=(0,Jr.Z)("div")(({theme:n})=>{const o=us(n);return{flex:"0 1 auto",overflowX:"hidden",width:"calc(100% - 5px)",minHeight:"48px",overflowY:"hidden","@media (hover: none)":o,"&:hover":o}}),Al=()=>{const{sidebarConfig:n}=useContext(SidebarConfigContext),o=Qr(n),{isOpen:l,setOpen:d}=useContext(SidebarContext);if(useMediaQuery(I=>I.breakpoints.down("md"),{noSsr:!0}))return null;const E=()=>{d(!l)};return React.createElement("button",{onClick:E,className:o.expandButton,"aria-label":"Expand Sidebar","data-testid":"sidebar-expand-button"},React.createElement("div",{className:o.arrows},l?React.createElement(DoubleArrowLeft,null):React.createElement(DoubleArrowRight,null)))},ds=(0,m.Z)(n=>({introCard:o=>({color:"#b5b5b5",fontSize:12,width:o.sidebarConfig.drawerWidthOpen,marginTop:18,marginBottom:12,paddingLeft:o.sidebarConfig.iconPadding,paddingRight:o.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 fs(n){const{sidebarConfig:o}=useContext(SidebarConfigContext),l=ds({sidebarConfig:o}),{text:d,onClose:p}=n,E=()=>p();return React.createElement("div",{className:l.introCard},React.createElement(Typography,{variant:"subtitle2"},d),React.createElement("div",{className:l.introDismiss},React.createElement(Link,{component:"button",onClick:E,underline:"none",className:l.introDismissLink},React.createElement(CloseIcon,{className:l.introDismissIcon}),React.createElement(Typography,{component:"span",className:l.introDismissText},"Dismiss"))))}const zo=n=>{const{text:o,onDismiss:l}=n,[d,p]=useState(!1),E=()=>{p(!0)};return React.createElement(Collapse,{in:!d,onExited:l},React.createElement(fs,{text:o,onClose:E}))},ms=null,hs="And your recently viewed plugins will pop up here!";function Rl(n){const{isOpen:o}=useContext(SidebarContext),l={starredItemsDismissed:!1,recentlyViewedItemsDismissed:!1},[d,p]=useLocalStorageValue(SIDEBAR_INTRO_LOCAL_STORAGE),{starredItemsDismissed:E,recentlyViewedItemsDismissed:I}=d!=null?d:{},U=()=>{p(z=>({...l,...z,starredItemsDismissed:!0}))},G=()=>{p(z=>({...l,...z,recentlyViewedItemsDismissed:!0}))};return o?React.createElement(React.Fragment,null,!E&&React.createElement(React.Fragment,null,React.createElement(zo,{text:ms,onDismiss:U}),React.createElement(SidebarDivider,null)),!I&&React.createElement(zo,{text:hs,onDismiss:G})):null}const gs=(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 Wo(n){const{className:o,stretch:l,noPadding:d,children:p,...E}=n,{contentRef:I}=Do(),U=gs();return t.createElement("article",{ref:I,tabIndex:-1,...E,className:re()(U.root,o,{[U.stretch]:l,[U.noPadding]:d})},p)}var ps=e(6487),ys=e(99152);const Es=(0,m.Z)(n=>({tabsWrapper:{gridArea:"pageSubheader",backgroundColor:n.palette.background.paper,paddingLeft:n.spacing(3)},defaultTab:{padding:n.spacing(3,3),...n.typography.caption,textTransform:"uppercase",fontWeight:"bold",color:n.palette.text.secondary},selected:{color:n.palette.text.primary},tabRoot:{"&:hover":{backgroundColor:n.palette.background.default,color:n.palette.text.primary}}}),{name:"BackstageHeaderTabs"});function Ho(n){const{tabs:o,onChange:l,selectedIndex:d}=n,[p,E]=(0,t.useState)(d!=null?d:0),I=Es(),U=(G,z)=>{d===void 0&&E(z),l&&l(z)};return(0,t.useEffect)(()=>{d!==void 0&&E(d)},[d]),t.createElement("div",{className:I.tabsWrapper},t.createElement(ys.Z,{selectionFollowsFocus:!0,indicatorColor:"primary",textColor:"inherit",variant:"scrollable",scrollButtons:"auto","aria-label":"scrollable auto tabs example",onChange:U,value:p},o.map((G,z)=>t.createElement(ps.Z,{...G.tabProps,"data-testid":`header-tab-${z}`,label:G.label,key:G.id,value:z,className:I.defaultTab,classes:{selected:I.selected,root:I.tabRoot}}))))}function vs(n){var U,G,z;const o=(0,Cn.UO)(),d=n.map(({path:ne,children:X})=>({caseSensitive:!1,path:`${ne}/*`,element:X})).sort((ne,X)=>X.path.replace(/\/\*$/,"").localeCompare(ne.path.replace(/\/\*$/,""))),p=(U=(0,Cn.V$)(d))!=null?U:n[0].children,[E]=(G=(0,Cn.fp)(d,`/${o["*"]}`))!=null?G:[],I=E?n.findIndex(ne=>`${ne.path}/*`===E.route.path):0;return{index:I===-1?0:I,element:p,route:(z=n[I])!=null?z:n[0]}}function jo(n){const{routes:o}=n,l=(0,Cn.s0)(),{index:d,route:p,element:E}=vs(o),I=(0,t.useMemo)(()=>o.map(G=>({id:G.path,label:G.title,tabProps:G.tabProps})),[o]),U=G=>l(o[G].path.replace(/\/\*$/,"").replace(/^\//,""));return t.createElement(t.Fragment,null,t.createElement(Ho,{tabs:I,selectedIndex:d,onChange:U}),t.createElement(Wo,null,t.createElement(oo.q,{title:p.title}),E))}const ao=()=>null;(0,c.attachComponentData)(ao,"core.gatherMountPoints",!0);function Vo(n){const o=t.createElement(ao,{path:"",title:""},t.createElement("div",null)).type;return t.Children.toArray(n).flatMap(l=>{if(!(0,t.isValidElement)(l))return[];if(l.type===t.Fragment)return Vo(l.props.children);if(l.type!==o)throw new Error("Child of TabbedLayout must be an TabbedLayout.Route");const{path:d,title:p,children:E,tabProps:I}=l.props;return[{path:d,title:p,children:E,tabProps:I}]})}function As(n){const o=Vo(n.children);return t.createElement(jo,{routes:o})}As.Route=ao;const Rs=(0,m.Z)(n=>({value:{marginBottom:"6px"},subvalue:{color:n.palette.textSubtle,fontWeight:"normal"}}),{name:"BackstageSubvalueCell"});function Ss(n){const{value:o,subvalue:l}=n,d=Rs();return t.createElement(t.Fragment,null,t.createElement("div",{className:d.value},o),t.createElement("div",{className:d.subvalue},l))}var Cs=e(21070),Ts=e(90324),bs=e(98281),Ps=e(48049),Go=e(51209),Ko=e(33375),Is=e(44233),Ls=e(27604),so=e(36444),Os=e(37971),xs=e(59709),Ds=e(17373),Fs=e(3702),Bs=e(93111),Xr=e(67222);const Ms=(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"}),ws=n=>{var G;const o=Ms(),{onChangeFilters:l}=n,[d,p]=(0,t.useState)({...n.selectedFilters}),[E,I]=(0,t.useState)(!1),U=()=>{p({}),I(z=>!z)};return(0,t.useEffect)(()=>{l(d)},[d,l]),t.createElement("div",{className:o.root},t.createElement("div",{className:o.header},t.createElement("div",{className:o.value},"Filters"),t.createElement(y.Z,{color:"primary",onClick:U},"Clear all")),t.createElement("div",{className:o.filters},((G=n.filters)==null?void 0:G.length)&&n.filters.map(z=>t.createElement(vt,{triggerReset:E,key:z.element.label,...z.element,selected:d[z.element.label],onChange:ne=>p({...d,[z.element.label]:ne})}))))},$s={Add:(0,t.forwardRef)((n,o)=>t.createElement(Cs.Z,{...n,ref:o})),Check:(0,t.forwardRef)((n,o)=>t.createElement(bs.Z,{...n,ref:o})),Clear:(0,t.forwardRef)((n,o)=>t.createElement(Ko.Z,{...n,ref:o})),Delete:(0,t.forwardRef)((n,o)=>t.createElement(Is.Z,{...n,ref:o})),DetailPanel:(0,t.forwardRef)((n,o)=>t.createElement(Go.Z,{...n,ref:o})),Edit:(0,t.forwardRef)((n,o)=>t.createElement(Ls.Z,{...n,ref:o})),Export:(0,t.forwardRef)((n,o)=>t.createElement(Fs.Z,{...n,ref:o})),Filter:(0,t.forwardRef)((n,o)=>t.createElement(so.Z,{...n,ref:o})),FirstPage:(0,t.forwardRef)((n,o)=>t.createElement(Os.Z,{...n,ref:o})),LastPage:(0,t.forwardRef)((n,o)=>t.createElement(xs.Z,{...n,ref:o})),NextPage:(0,t.forwardRef)((n,o)=>t.createElement(Go.Z,{...n,ref:o})),PreviousPage:(0,t.forwardRef)((n,o)=>t.createElement(Ps.Z,{...n,ref:o})),ResetSearch:(0,t.forwardRef)((n,o)=>t.createElement(Ko.Z,{...n,ref:o})),Search:(0,t.forwardRef)((n,o)=>t.createElement(so.Z,{...n,ref:o})),SortArrow:(0,t.forwardRef)((n,o)=>t.createElement(Ts.Z,{...n,ref:o})),ThirdStateCheck:(0,t.forwardRef)((n,o)=>t.createElement(Ds.Z,{...n,ref:o})),ViewColumn:(0,t.forwardRef)((n,o)=>t.createElement(Bs.Z,{...n,ref:o}))};function ko(n,o){const l=o.split(".");let d=n[l[0]];for(let p=1;p<l.length;++p){if(d===void 0)return d;const E=l[p];d=d[E]}return d}const Us=(0,on.Z)(n=>({header:{padding:n.spacing(1,2,1,2.5),borderTop:`1px solid ${n.palette.grey.A100}`,borderBottom:`1px solid ${n.palette.grey.A100}`,color:n.palette.textSubtle,fontWeight:n.typography.fontWeightBold,position:"static",wordBreak:"normal"}}),{name:"BackstageTableHeader"})(Xr.W$),Yo=(0,on.Z)(n=>({root:{padding:n.spacing(3,0,2.5,2.5)},title:{"& > h6":{fontWeight:"bold"}},searchField:{paddingRight:n.spacing(2)}}),{name:"BackstageTableToolbar"})(Xr.UW),Ns=(0,m.Z)(()=>({root:{display:"flex",alignItems:"center",justifyContent:"space-between"},title:{fontWeight:"bold",fontSize:18,whiteSpace:"nowrap"}}),{name:"BackstageTableFiltersContainer"}),Zs=(0,m.Z)(()=>({root:{display:"flex",alignItems:"start"}}),{name:"BackstageTable"});function zs(n,o){return n.map(l=>{const d={};let p=l.cellStyle||{};if(l.highlight)if(d.color=o.palette.textContrast,typeof p=="object")p.fontWeight=o.typography.fontWeightBold;else{const E=p;p=(I,U,G)=>({...E(I,U,G),fontWeight:o.typography.fontWeightBold})}return{...l,headerStyle:d,cellStyle:p}})}function Ws(n,o){return(0,Br.transform)(n,(l,d,p)=>{(0,Br.isEqual)(d,o[p])||(l[p]=d)})}const Jo={search:"",filtersOpen:!1,filters:{}};function Hs(n){const{toolbarRef:o,setSearch:l,hasFilters:d,selectedFiltersLength:p,toggleFilters:E}=n,I=Ns(),U=(0,t.useCallback)(G=>{n.onSearchChanged(G),l(G)},[n,l]);return d?t.createElement("div",{className:I.root},t.createElement("div",{className:I.root},t.createElement(D.Z,{onClick:E,"aria-label":"filter list"},t.createElement(so.Z,null)),t.createElement(ie.Z,{className:I.title},"Filters (",p,")")),t.createElement(Yo,{...n,ref:o,onSearchChanged:U})):t.createElement(Yo,{...n,ref:o,onSearchChanged:U})}function js(n){const{data:o,columns:l,options:d,title:p,subtitle:E,filters:I,initialState:U,emptyContent:G,onStateChange:z,...ne}=n,X=Zs(),Ae=(0,M.Z)(),Ee={...Jo,...U},[Se,st]=(0,t.useState)(Ee.filtersOpen),St=(0,t.useCallback)(()=>st(ln=>!ln),[st]),[Wt,Qt]=(0,t.useState)(0),[ot,Ct]=(0,t.useState)(o),[Pt,an]=(0,t.useState)(Ee.filters),Jn=zs(l,Ae),[Tn,$r]=(0,t.useState)(Ee.search);(0,t.useEffect)(()=>{if(z){const ln=Ws({search:Tn,filtersOpen:Se,filters:Pt},Jo);z(ln)}},[Tn,Se,Pt,z]);const At={headerStyle:{textTransform:"uppercase"}},Qn=(0,t.useCallback)(ln=>{var vn;return(vn=l.find(bn=>bn.title===ln))==null?void 0:vn.field},[l]);(0,t.useEffect)(()=>{if(typeof o=="function")return;if(!Pt){Ct(o);return}const ln=Object.values(Pt);if(o&&ln.flat().length){const vn=o.filter(bn=>!!Object.entries(Pt).filter(([,or])=>!!or.length).every(([or,en])=>{const tn=ko(bn,Qn(or));return Array.isArray(tn)&&Array.isArray(en)?tn.some(gr=>en.includes(gr)):Array.isArray(tn)?tn.includes(en):Array.isArray(en)?en.includes(tn):tn===en}));Ct(vn)}else Ct(o);Qt(ln.flat().length)},[o,Pt,Qn]);const fo=(ln,vn)=>{const bn=en=>{const tn=new Set,gr=ar=>{ar!=null&&tn.add(ar)};return vn&&vn.forEach(ar=>{const pr=ko(ar,Qn(en));Array.isArray(pr)?pr.forEach(gr):gr(pr)}),tn},or=en=>({placeholder:"All results",label:en.column,multiple:en.type==="multiple-select",items:[...bn(en.column)].sort().map(tn=>({label:tn,value:tn}))});return ln.map(en=>({type:en.type,element:or(en)}))},rr=!!(I!=null&&I.length),mo=(0,t.useCallback)(ln=>t.createElement(Hs,{setSearch:$r,hasFilters:rr,selectedFiltersLength:Wt,toggleFilters:St,...ln}),[St,rr,Wt,$r]),_r=typeof o!="function"&&o.length===0,eo=l.length,ho=(0,t.useCallback)(ln=>G&&_r?t.createElement("tbody",null,t.createElement("tr",null,t.createElement("td",{colSpan:eo},G))):t.createElement(Xr.os,{...ln}),[_r,G,eo]);return t.createElement("div",{className:X.root},Se&&o&&typeof o!="function"&&(I==null?void 0:I.length)&&t.createElement(ws,{filters:fo(I,o),selectedFilters:Pt,onChangeFilters:an}),t.createElement(Xr.ZP,{components:{Header:Us,Toolbar:mo,Body:ho},options:{...At,...d},columns:Jn,icons:$s,title:t.createElement(t.Fragment,null,t.createElement(ie.Z,{variant:"h5",component:"h3"},p),E&&t.createElement(ie.Z,{color:"textSecondary",variant:"body1"},E)),data:typeof o=="function"?o:ot,style:{width:"100%"},localization:{toolbar:{searchPlaceholder:"Filter"}},...ne}))}const Sl=n=>{const{children:o,value:l,index:d,...p}=n;return React.createElement("div",{role:"tabpanel",hidden:l!==d,"aria-labelledby":`scrollable-auto-tab-${d}`,...p},l===d&&React.createElement(Box,{p:3},o))},Vs=(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"}),Cl=n=>{const o=Vs(n),{ariaLabel:l,onClick:d}=n;return React.createElement(IconButton,{onClick:d,className:o.root,size:"small",disableRipple:!0,disableFocusRipple:!0,"aria-label":l},n.children)},Gs=(n,o)=>o?n?"20px":"0":"40px",Ks=(0,m.Z)(n=>({root:{textTransform:"none",height:"64px",fontWeight:n.typography.fontWeightBold,fontSize:n.typography.pxToRem(13),color:n.palette.textSubtle,marginLeft:o=>Gs(o.isFirstNav,o.isFirstIndex),width:"130px",minWidth:"130px","&:hover":{outline:"none",backgroundColor:"transparent",color:n.palette.textSubtle}}}),{name:"BackstageTab"}),Tl=n=>{const o=Ks(n),{isFirstNav:l,isFirstIndex:d,...p}=n;return React.createElement(Tab,{classes:o,disableRipple:!0,...p})},ks=(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"}),bl=n=>{const o=ks(n);return React.createElement(Tabs,{classes:o,...n,TabIndicatorProps:{children:React.createElement("span",null)}})},Ys=(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 Pl(n){const{tabs:o}=n,l=Ys(),[d,p]=useState([0,0]),[E,I]=useState(0),[U,G]=useState(0),[z,ne]=useState([[]]),X=useRef(),{width:Ae}=useWindowSize(),Ee=(Qt,ot)=>{p([E,ot])},Se=()=>{I(E-1)},st=()=>{I(E+1)},St=()=>E+1<z.length;useEffect(()=>{const ot=E===0?1:2,Ct=X.current.offsetWidth-20-ot*30,Pt=d[0]*U+d[1],an=Math.floor(Ct/170);G(an),ne(chunkArray(o,an)),p([Math.floor(Pt/an),Pt%an])},[Ae,o]);const Wt=E===d[0]?d[1]:!1;return React.createElement("div",{className:l.root},React.createElement(AppBar,{ref:X,className:l.appbar,position:"static"},React.createElement("div",null,React.createElement(StyledTabs,{value:Wt,onChange:Ee,selectionFollowsFocus:!0},E!==0&&React.createElement(StyledIcon,{onClick:Se,ariaLabel:"navigate-before"},React.createElement(NavigateBeforeIcon,null)),z[E].map((Qt,ot)=>React.createElement(StyledTab,{value:ot,isFirstIndex:ot===0,isFirstNav:E===0,key:ot,icon:Qt.icon||void 0,label:Qt.label||void 0})),St()&&React.createElement(StyledIcon,{isNext:!0,onClick:st,ariaLabel:"navigate-next"},React.createElement(NavigateNextIcon,null))))),Wt!==!1?z[E].map((Qt,ot)=>React.createElement(TabPanel,{key:ot,value:ot,index:Wt},Qt.content)):React.createElement(TabPanel,{key:"panel_outside_chunked_array",value:d[1],index:d[1]},z[d[0]][d[1]].content))}var Il=e(44311);function Js(n,o){const l=n[n.length-1];if(!!l)return l>=.9?o.palette.status.ok:l>=.5?o.palette.status.warning:o.palette.status.error}function Ll(n){var l;const o=useTheme();return n.data?React.createElement(Sparklines,{width:120,height:30,min:0,max:1,...n},n.title&&React.createElement("title",null,n.title),React.createElement(SparklinesLine,{color:(l=n.color)!=null?l:Js(n.data,o)})):null}const Qs=n=>(0,m.Z)(o=>({container:{width:"100%",display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-end",alignItems:"center",marginBottom:o.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:o.spacing(1),minWidth:0,overflow:"visible"},description:{},title:{display:"inline-flex",marginBottom:0}}),{name:"BackstageContentHeader"}),Xs=({title:n="Unknown page",className:o})=>t.createElement(ie.Z,{variant:"h4",component:"h2",className:o,"data-testid":"header-title"},n);function _s(n){const{description:o,title:l,titleComponent:d=void 0,children:p,textAlign:E="left"}=n,I=Qs({textAlign:E})(),U=d||t.createElement(Xs,{title:l,className:I.title});return t.createElement(t.Fragment,null,t.createElement(oo.q,{title:l}),t.createElement("div",{className:I.container},t.createElement("div",{className:I.leftItemsBox},U,o&&t.createElement(ie.Z,{className:I.description,variant:"body2"},o)),t.createElement("div",{className:I.rightItemsBox},p)))}var ei=e.p+"static/mic-drop.fe3ef4d0..svg";const ti=(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"}),ni=()=>{const n=ti();return t.createElement("img",{src:ei,className:n.micDrop,alt:"Girl dropping mic from her hands"})},ri=(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 oi(n){const{status:o,statusMessage:l,additionalInfo:d,supportUrl:p}=n,E=ri(),I=(0,Cn.s0)(),U=To();return t.createElement(pe.Z,{container:!0,spacing:0,className:E.container},t.createElement(ni,null),t.createElement(pe.Z,{item:!0,xs:12,sm:8,md:4},t.createElement(ie.Z,{"data-testid":"error",variant:"body1",className:E.subtitle},"ERROR ",o,": ",l),t.createElement(ie.Z,{variant:"body1",className:E.subtitle},d),t.createElement(ie.Z,{variant:"h2",className:E.title},"Looks like someone dropped the mic!"),t.createElement(ie.Z,{variant:"h6"},t.createElement(k,{to:"#","data-testid":"go-back-link",onClick:()=>I(-1)},"Go back"),"... or please"," ",t.createElement(k,{to:p||U.url},"contact support")," if you think this is a bug.")))}var ai=e(16173);const si=(0,on.Z)({root:{textDecoration:"underline",cursor:"pointer"}},{name:"BackstageBreadcrumbsClickableText"})(ie.Z),io=(0,on.Z)({root:{textDecoration:"underline",color:"inherit"}},{name:"BackstageBreadcrumbsStyledBox"})(Sn.Z);function ii(n){const{children:o,...l}=n,[d,p]=t.useState(null),E=t.Children.toArray(o),[I,U,...G]=E,z=G.length?G.pop():E[E.length-1],ne=E.length>3,X=Se=>{p(Se.currentTarget)},Ae=()=>{p(null)},Ee=Boolean(d);return t.createElement(t.Fragment,null,t.createElement(ai.Z,{"aria-label":"breadcrumb",...l},E.length>1&&t.createElement(io,{clone:!0},I),E.length>2&&t.createElement(io,{clone:!0},U),ne&&t.createElement(si,{onClick:X},"..."),t.createElement(Sn.Z,{style:{fontStyle:"italic"}},z)),t.createElement(Ao.ZP,{open:Ee,anchorEl:d,onClose:Ae,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}},t.createElement(Ut.Z,null,G.map((Se,st)=>t.createElement(dt.Z,{key:st,button:!0},t.createElement(io,{clone:!0},Se))))))}const li=(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"},title:{color:n.palette.bursts.fontColor,wordBreak:"break-word",fontSize:n.typography.h3.fontSize,marginBottom:0},subtitle:{color:n.palette.bursts.fontColor,opacity:.8,display:"inline-block",marginTop:n.spacing(1),maxWidth:"75ch"},type:{textTransform:"uppercase",fontSize:11,opacity:.8,marginBottom:n.spacing(1),color:n.palette.bursts.fontColor},breadcrumb:{color:n.palette.bursts.fontColor},breadcrumbType:{fontSize:"inherit",opacity:.7,marginRight:-n.spacing(.3),marginBottom:n.spacing(.3)},breadcrumbTitle:{fontSize:"inherit",marginLeft:-n.spacing(.3),marginBottom:n.spacing(.3)}}),{name:"BackstageHeader"}),ci=({type:n,typeLink:o,classes:l,pageTitle:d})=>n?o?t.createElement(ii,{className:l.breadcrumb},t.createElement(k,{to:o},n),t.createElement(ie.Z,null,d)):t.createElement(ie.Z,{className:l.type},n):null,ui=({pageTitle:n,classes:o,tooltip:l})=>{const d=t.createElement(ie.Z,{className:o.title,variant:"h1"},n);return l?t.createElement(P.ZP,{title:l,placement:"top-start"},d):d},di=({classes:n,subtitle:o})=>o?typeof o!="string"?t.createElement(t.Fragment,null,o):t.createElement(ie.Z,{className:n.subtitle,variant:"subtitle2",component:"span"},o):null;function Qo(n){const{children:o,pageTitleOverride:l,style:d,subtitle:p,title:E,tooltip:I,type:U,typeLink:G}=n,z=li(),X=(0,c.useApi)(c.configApiRef).getOptionalString("app.title")||"Backstage",Ae=l||E,Ee=E||l,Se=`${Ae} | %s | ${X}`,st=`${Ae} | ${X}`;return t.createElement(t.Fragment,null,t.createElement(oo.q,{titleTemplate:Se,defaultTitle:st}),t.createElement("header",{style:d,className:z.header},t.createElement(Sn.Z,{className:z.leftItemsBox},t.createElement(ci,{classes:z,type:U,typeLink:G,pageTitle:Ee}),t.createElement(ui,{classes:z,pageTitle:Ee,tooltip:I}),t.createElement(di,{classes:z,subtitle:p})),t.createElement(pe.Z,{container:!0,className:z.rightItemsBox,spacing:4},o)))}const fi=(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"}),mi=({value:n,className:o})=>t.createElement(ie.Z,{className:o},n);function hi(n){const{label:o,value:l,url:d}=n,p=fi(),E=t.createElement(mi,{className:p.value,value:l||"<Unknown>"});return t.createElement(pe.Z,{item:!0},t.createElement("span",{className:p.root},t.createElement(ie.Z,{className:p.label},o),d?t.createElement(k,{to:d},E):E))}const gi={hour:"2-digit",minute:"2-digit"};function Xo(n){const o=new Date,l=window.navigator.language,d=[];if(!n.has("homepage.clocks"))return d;const p=n.getConfigArray("homepage.clocks");for(const E of p)if(E.has("label")&&E.has("timezone")){let I=E.getString("label");const U={timeZone:E.getString("timezone"),...gi};try{new Date().toLocaleString(l,U)}catch{console.warn(`The timezone ${U.timeZone} is invalid. Defaulting to GMT`),U.timeZone="GMT",I="GMT"}const G=o.toLocaleTimeString(l,U);d.push({time:G,label:I})}return d}function Ol(n){const o=useApi(configApiRef),l=[],[d,p]=React.useState(l);return React.useEffect(()=>{p(Xo(o));const E=setInterval(()=>{p(Xo(o))},1e3);return()=>{clearInterval(E)}},[o]),d.length!==0?React.createElement(React.Fragment,null,d.map(E=>React.createElement(HeaderLabel,{label:E.label,value:E.time,key:E.label}))):null}const pi=n=>(0,a.Z)({root:{color:n.palette.common.white,padding:n.spacing(2,2,3),backgroundImage:n.palette.bursts.gradient.linear,backgroundPosition:0,backgroundSize:"inherit"}}),yi=(0,m.Z)(pi,{name:"BackstageItemCardHeader"});function Ei(n){const{title:o,subtitle:l,children:d}=n,p=yi(n);return t.createElement("div",{className:p.root},l&&t.createElement(ie.Z,{variant:"subtitle2",component:"h3"},l),o&&t.createElement(ie.Z,{variant:"h6",component:"h4"},o),d)}function xl(n){const{description:o,tags:l,title:d,type:p,subtitle:E,label:I,onClick:U,href:G}=n;return React.createElement(Card,null,React.createElement(CardMedia,null,React.createElement(ItemCardHeader,{title:d,subtitle:E||p})),React.createElement(CardContent,null,l!=null&&l.length?React.createElement(Box,null,l.map((z,ne)=>React.createElement(Chip,{size:"small",label:z,key:ne}))):null,o),React.createElement(CardActions,null,!G&&React.createElement(Button,{to:"#",onClick:U,color:"primary"},I),G&&React.createElement(Button,{to:G,color:"primary"},I)))}const vi=n=>(0,a.Z)({root:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(22em, 1fr))",gridAutoRows:"1fr",gridGap:n.spacing(2)}}),Ai=(0,m.Z)(vi,{name:"BackstageItemCardGrid"});function Ri(n){const{children:o,...l}=n,d=Ai(l);return t.createElement("div",{className:d.root,...l},o)}var Si=e(41547);const Ci=(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 qo(n){const{themeId:o,children:l}=n,{isMobile:d}=(0,t.useContext)(hr),p=Ci({isMobile:d});return t.createElement(Si.Z,{theme:E=>({...E,page:E.getPageTheme({themeId:o})})},t.createElement("main",{className:p.root},l))}function Ti(n){const{themeId:o,children:l,...d}=n;return t.createElement(qo,{themeId:o},t.createElement(Qo,{...d}),l)}var mn=e(30195);const Dl=mn.z.object({providerInfo:mn.z.object({}).catchall(mn.z.unknown()).optional(),profile:mn.z.object({email:mn.z.string().optional(),displayName:mn.z.string().optional(),picture:mn.z.string().optional()}),backstageIdentity:mn.z.object({token:mn.z.string(),identity:mn.z.object({type:mn.z.literal("user"),userEntityRef:mn.z.string(),ownershipEntityRefs:mn.z.array(mn.z.string())})})}),_o={defaultTokenExpiryMillis:5*60*1e3,tokenExpiryMarginMillis:5*60*1e3};function bi(n){const o=new Date(Date.now()+_o.defaultTokenExpiryMillis);if(!n)return o;const[l,d,p]=n.split("."),E=JSON.parse(atob(d));return typeof E.exp!="number"?o:new Date(E.exp*1e3-_o.tokenExpiryMarginMillis)}class Fl{constructor(o){_(this,"options");_(this,"abortController");_(this,"state");this.options=o,this.abortController=new AbortController,this.state={type:"empty"}}async start(){await this.getSessionAsync()}getUserId(){const{backstageIdentity:o}=this.getSessionSync(),l=o.identity.userEntityRef,d=/^([^:/]+:)?([^:/]+\/)?([^:/]+)$/.exec(l);if(!d)throw new TypeError(`Invalid user entity reference "${l}"`);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 o=this.state.type==="active"?this.state.session:void 0,l=this.fetchSession().then(d=>(this.state={type:"active",session:d,expiresAt:bi(d.backstageIdentity.token)},d),d=>{throw this.state={type:"failed",error:d},d});return this.state={type:"fetching",promise:l,previous:o},l}async fetchSession(){const o=await this.options.discoveryApi.getBaseUrl("auth"),l=await fetch(`${o}/${this.options.provider}/refresh`,{signal:this.abortController.signal,headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"});if(!l.ok)throw await ResponseError.fromResponse(l);return proxiedSessionSchema.parse(await l.json())}}const Bl=n=>{const o=useApi(discoveryApiRef),[{status:l,error:d},{execute:p}]=useAsync(async()=>{const E=new ProxiedSignInIdentity({provider:n.provider,discoveryApi:o});await E.start(),n.onSignInSuccess(E)});return useMountEffect(p),l==="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},Pi=(0,m.Z)({container:{padding:0,listStyle:"none"},item:{display:"flex",flexDirection:"column",width:"100%",maxWidth:"400px",margin:0,padding:0}},{name:"BackstageSignInPage"}),lo=({children:n})=>{const o=Pi();return t.createElement(pe.Z,{component:"li",item:!0,classes:o},n)};class co{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 o="user:default/guest";return{type:"user",userEntityRef:o,ownershipEntityRefs:[o]}}async getCredentials(){return{}}async signOut(){}}function Ii(n){const[o,l,d]=n.split(".");return JSON.parse(atob(l))}class uo{constructor(o){this.result=o}getUserId(){return this.result.userId}static fromResult(o){return new uo(o)}async getIdToken(){var o,l;return(l=(o=this.result).getIdToken)==null?void 0:l.call(o)}getProfile(){return this.result.profile}async getProfileInfo(){return this.result.profile}async getBackstageIdentity(){const o=await this.getIdToken();if(!o){const p=`user:default/${this.getUserId()}`;return{type:"user",userEntityRef:p,ownershipEntityRefs:[p]}}const{sub:l,ent:d}=Ii(o);return{type:"user",userEntityRef:l,ownershipEntityRefs:d!=null?d:[]}}async getCredentials(){var l,d;return{token:await((d=(l=this.result).getIdToken)==null?void 0:d.call(l))}}async signOut(){var o,l;return(l=(o=this.result).signOut)==null?void 0:l.call(o)}}class wr{constructor(o,l,d){_(this,"profilePromise");this.identity=o,this.authApi=l,this.profile=d}static createGuest(){return new co}static fromLegacy(o){return uo.fromResult(o)}static create(o){return new wr(o.identity,o.authApi,o.profile)}getUserId(){const o=this.identity.userEntityRef,l=/^([^:/]+:)?([^:/]+\/)?([^:/]+)$/.exec(o);if(!l)throw new TypeError(`Invalid user entity reference "${o}"`);return l[3]}async getIdToken(){return(await this.authApi.getBackstageIdentity()).token}getProfile(){if(!this.profile)throw new Error("The identity API does not implement synchronous profile fetching, use getProfileInfo() instead");return this.profile}async getProfileInfo(){if(this.profilePromise)return await this.profilePromise;try{return this.profilePromise=this.authApi.getProfile(),await this.profilePromise}catch(o){throw this.profilePromise=void 0,o}}async getBackstageIdentity(){return this.identity}async getCredentials(){return{token:(await this.authApi.getBackstageIdentity()).token}}async signOut(){return this.authApi.signOut()}}const Li={Component:({config:n,onSignInSuccess:o})=>{const{apiRef:l,title:d,message:p}=n,E=(0,c.useApi)(l),I=(0,c.useApi)(c.errorApiRef),U=async()=>{try{const G=await E.getBackstageIdentity({instantPopup:!0});if(!G)throw new Error(`The ${d} provider is not configured to support sign-in`);const z=await E.getProfile();o(wr.create({identity:G.identity,profile:z,authApi:E}))}catch(G){I.post(new qn.SP("Login failed",G))}};return t.createElement(lo,null,t.createElement(Yn,{variant:"fullHeight",title:d,actions:t.createElement(y.Z,{color:"primary",variant:"outlined",onClick:U},"Sign In")},t.createElement(ie.Z,{variant:"body1"},p)))},loader:async(n,o)=>{const l=n.get(o),d=await l.getBackstageIdentity({optional:!0});if(!d)return;const p=await l.getProfile();return wr.create({identity:d.identity,profile:p,authApi:l})}},Oi={Component:({onSignInSuccess:n})=>t.createElement(lo,null,t.createElement(Yn,{title:"Guest",variant:"fullHeight",actions:t.createElement(y.Z,{color:"primary",variant:"outlined",onClick:()=>n(new co)},"Enter")},t.createElement(ie.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 co};var xi=e(63955),ea=e(86619),ta=e(74828),Di=e(45455),Fi=e.n(Di);const Bi=/^[a-z0-9_\-]+\.[a-z0-9_\-]+\.[a-z0-9_\-]+$/i,Mi=(0,m.Z)(n=>({form:{display:"flex",flexFlow:"column nowrap"},button:{alignSelf:"center",marginTop:n.spacing(2)}}),{name:"BackstageCustomProvider"}),na=n=>{const{ref:o,...l}=n;return{inputRef:o,...l}},wi={Component:({onSignInSuccess:n})=>{const o=Mi(),{register:l,handleSubmit:d,formState:p}=(0,xi.cI)({mode:"onChange"}),{errors:E}=p,I=({userId:U})=>{n(wr.fromLegacy({userId:U,profile:{email:`${U}@example.com`}}))};return t.createElement(lo,null,t.createElement(Yn,{title:"Custom User",variant:"fullHeight"},t.createElement(ie.Z,{variant:"body1"},"Enter your own User ID and credentials.",t.createElement("br",null),"This selection will not be stored."),t.createElement("form",{className:o.form,onSubmit:d(I)},t.createElement(O.Z,null,t.createElement(ea.Z,{...na(l("userId",{required:!0})),label:"User ID",margin:"normal",error:Boolean(E.userId)}),E.userId&&t.createElement(ta.Z,{error:!0},E.userId.message)),t.createElement(O.Z,null,t.createElement(ea.Z,{...na(l("idToken",{required:!1,validate:U=>!U||Bi.test(U)||"Token is not a valid OpenID Connect JWT Token"})),label:"ID Token (optional)",margin:"normal",autoComplete:"off",error:Boolean(E.idToken)}),E.idToken&&t.createElement(ta.Z,{error:!0},E.idToken.message)),t.createElement(y.Z,{type:"submit",color:"primary",variant:"outlined",className:o.button,disabled:!(p!=null&&p.isDirty)||!Fi()(E)},"Continue"))))},loader:async()=>{}},qr="@backstage/core:SignInPage:provider",ra={guest:Oi,custom:wi,common:Li};function oa(n,o){if(n in o)throw new Error(`"${n}" ID is duplicated. IDs of identity providers have to be unique.`)}function zl(n){return n.reduce((l,d)=>{if(typeof d=="string")return oa(d,l),l[d]={components:ra[d],id:d},l;const{id:p}=d;return oa(p,l),l[p]={components:ra.common,id:p,config:d},l},{})}const Wl=(n,o)=>{const l=useApi(errorApiRef),d=useApiHolder(),[p,E]=useState(!0),I=useCallback(G=>{o(IdentityApiSignOutProxy.from({identityApi:G,signOut:async()=>{var z;localStorage.removeItem(qr),await((z=G.signOut)==null?void 0:z.call(G))}}))},[o]);useLayoutEffect(()=>{var X;if(!p)return;const G=localStorage.getItem(qr);if(G===null){E(!1);return}const z=n[G];if(!z){E(!1);return}let ne=!1;return z.components.loader(d,(X=z.config)==null?void 0:X.apiRef).then(Ae=>{ne||(Ae?I(Ae):E(!1))}).catch(Ae=>{ne||(localStorage.removeItem(qr),l.post(Ae),E(!1))}),()=>{ne=!0}},[p,l,o,d,n,I]);const U=useMemo(()=>Object.keys(n).map(G=>{const z=n[G],{Component:ne}=z.components,X=Ae=>{localStorage.setItem(qr,z.id),I(Ae)};return React.createElement(ne,{key:z.id,config:z.config,onSignInSuccess:X})}),[n,I]);return[p,U]},$i=({onSignInSuccess:n,providers:o=[],title:l,align:d="left"})=>{const p=useApi(configApiRef),E=useStyles(),I=getSignInProviders(o),[U,G]=useSignInProviders(I,n);return U?React.createElement(Progress,null):React.createElement(Page,{themeId:"home"},React.createElement(Header,{title:p.getString("app.title")}),React.createElement(Content,null,l&&React.createElement(ContentHeader,{title:l,textAlign:d}),React.createElement(Grid,{container:!0,justifyContent:d==="center"?d:"flex-start",spacing:2,component:"ul",classes:E},G)))},Ui=({provider:n,auto:o,onSignInSuccess:l})=>{const d=useStyles(),p=useApi(n.apiRef),E=useApi(configApiRef),[I,U]=useState(),[G,z]=useState(!1),ne=async({checkExisting:X,showPopup:Ae})=>{try{let Ee;if(X&&(Ee=await p.getBackstageIdentity({optional:!0})),!Ee&&(Ae||o)&&(z(!0),Ee=await p.getBackstageIdentity({instantPopup:!0}),!Ee))throw new Error(`The ${n.title} provider is not configured to support sign-in`);if(!Ee){z(!0);return}const Se=await p.getProfile();l(UserIdentity.create({identity:Ee.identity,authApi:p,profile:Se}))}catch(Ee){U(Ee),z(!0)}};return useMountEffect(()=>ne({checkExisting:!0})),G?React.createElement(Page,{themeId:"home"},React.createElement(Header,{title:E.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),I&&I.name!=="PopupRejectedError"&&React.createElement(Typography,{variant:"body1",color:"error"},I.message)))))):React.createElement(Progress,null)};function Hl(n){return"provider"in n?React.createElement(Ui,{...n}):React.createElement($i,{...n})}const Ni=(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"}),Zi=(0,on.Z)(n=>({root:{padding:n.spacing(2,2,2,2.5),display:"inline-block"},title:{fontWeight:700},subheader:{paddingTop:n.spacing(1)}}),{name:"BackstageTabbedCardBoldHeader"})(ur.Z);function jl(n){const{slackChannel:o,errorBoundaryProps:l,children:d,title:p,deepLink:E,value:I,onChange:U}=n,G=Ni(),[z,ne]=useState(0),X=U||((Se,st)=>ne(st));let Ae;I?React.Children.map(d,Se=>{React.isValidElement(Se)&&(Se==null?void 0:Se.props.value)===I&&(Ae=Se==null?void 0:Se.props.children)}):React.Children.map(d,(Se,st)=>{React.isValidElement(Se)&&st===z&&(Ae=Se==null?void 0:Se.props.children)});const Ee=l||(o?{slackChannel:o}:{});return React.createElement(Card,null,React.createElement(ErrorBoundary,{...Ee},p&&React.createElement(Zi,{title:p}),React.createElement(Tabs,{selectionFollowsFocus:!0,classes:G,value:I||z,onChange:X},d),React.createElement(Divider,null),React.createElement(CardContent,null,Ae),E&&React.createElement(BottomLink,{...E})))}const zi=(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 Vl(n){const{children:o,...l}=n,d=zi();return React.createElement(Tab,{disableRipple:!0,classes:d,...l})}},88609:function(ee,s,e){"use strict";e.d(s,{Os:function(){return f},fC:function(){return R}});var r=e(76241),t=e(2784);const c=(0,r.CT)("analytics-context"),f=()=>{const a=(0,t.useContext)(c);if(a===void 0)return{routeRef:"unknown",pluginId:"root",extension:"App"};const i=a.atVersion(1);if(i===void 0)throw new Error("No context found for version 1.");return i},R=a=>{const{attributes:i,children:u}=a,g={...f(),...i},v=(0,r.EI)({1:g});return t.createElement(c.Provider,{value:v},u)};function m(a,i){const u=y=>React.createElement(R,{attributes:i},React.createElement(a,{...y}));return u.displayName=`WithAnalyticsContext(${a.displayName||a.name||"Component"})`,u}},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),c=e(2784);class f{constructor(i,u={routeRef:"unknown",pluginId:"root",extension:"App"}){this.analyticsApi=i,this.context=u}setContext(i){this.context=i}captureEvent(i,u,{value:y,attributes:g}={}){try{this.analyticsApi.captureEvent({action:i,subject:u,value:y,attributes:g,context:this.context})}catch(v){console.warn("Error during analytics event capture. %o",v)}}}function R(){try{return(0,t.useApi)(t.analyticsApiRef)}catch{return{captureEvent:()=>{}}}}function m(){const a=(0,c.useRef)(null),i=(0,r.Os)(),u=R();function y(){return a.current===null&&(a.current=new f(u)),a.current}const g=y();return g.setContext(i),g}},39135:function(ee,s,e){"use strict";e.d(s,{CL:function(){return F},sM:function(){return t},$v:function(){return g},v_:function(){return v},hg:function(){return T},uB:function(){return y},bq:function(){return u},Ds:function(){return L},NW:function(){return B},VE:function(){return k},W0:function(){return x},gP:function(){return M},F4:function(){return f},ux:function(){return m},Kp:function(){return c},$4:function(){return D},p_:function(){return a},ZM:function(){return P},D:function(){return R},gW:function(){return i},E6:function(){return H}});var r=e(86833),t;(function(K){const ce="SignedIn";K.SignedIn=ce;const We="SignedOut";K.SignedOut=We})(t||(t={}));const c=(0,r.createApiRef)({id:"core.auth.google"}),f=(0,r.createApiRef)({id:"core.auth.github"}),R=(0,r.createApiRef)({id:"core.auth.okta"}),m=(0,r.createApiRef)({id:"core.auth.gitlab"}),a=(0,r.createApiRef)({id:"core.auth.microsoft"}),i=(0,r.createApiRef)({id:"core.auth.onelogin"}),u=(0,r.createApiRef)({id:"core.auth.bitbucket"}),y=(0,r.createApiRef)({id:"core.auth.atlassian"}),g=(0,r.createApiRef)({id:"core.alert"}),v=(0,r.createApiRef)({id:"core.analytics"}),T=(0,r.createApiRef)({id:"core.apptheme"}),L=(0,r.createApiRef)({id:"core.config"}),B=(0,r.createApiRef)({id:"core.discovery"}),k=(0,r.createApiRef)({id:"core.error"});var F;(function(K){K[K.None=0]="None";const We=1;K[K.Active=We]="Active"})(F||(F={}));const x=(0,r.createApiRef)({id:"core.featureflags"}),M=(0,r.createApiRef)({id:"core.fetch"}),D=(0,r.createApiRef)({id:"core.identity"}),P=(0,r.createApiRef)({id:"core.oauthrequest"}),H=(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(f){if(this.config=f,!f.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 '${f.id}'`)}get id(){return this.config.id}get T(){throw new Error(`tried to read ApiRef.T of ${this}`)}toString(){return`apiRef{${this.config.id}}`}}function t(c){return new r(c)}},25182:function(ee,s,e){"use strict";e.d(s,{n:function(){return r}});function r(t,c){return"id"in t?{api:t,deps:{},factory:()=>c}:t}},86833:function(ee,s,e){"use strict";e.d(s,{createApiFactory:function(){return R.n},createApiRef:function(){return t.T},useApi:function(){return r.h_},useApiHolder:function(){return r.I_}});var r=e(5761),t=e(90515),c=e(16362),f=e.n(c);e.o(c,"FeatureFlagState")&&e.d(s,{FeatureFlagState:function(){return c.FeatureFlagState}}),e.o(c,"SessionState")&&e.d(s,{SessionState:function(){return c.SessionState}}),e.o(c,"alertApiRef")&&e.d(s,{alertApiRef:function(){return c.alertApiRef}}),e.o(c,"analyticsApiRef")&&e.d(s,{analyticsApiRef:function(){return c.analyticsApiRef}}),e.o(c,"appThemeApiRef")&&e.d(s,{appThemeApiRef:function(){return c.appThemeApiRef}}),e.o(c,"atlassianAuthApiRef")&&e.d(s,{atlassianAuthApiRef:function(){return c.atlassianAuthApiRef}}),e.o(c,"attachComponentData")&&e.d(s,{attachComponentData:function(){return c.attachComponentData}}),e.o(c,"bitbucketAuthApiRef")&&e.d(s,{bitbucketAuthApiRef:function(){return c.bitbucketAuthApiRef}}),e.o(c,"configApiRef")&&e.d(s,{configApiRef:function(){return c.configApiRef}}),e.o(c,"createApiFactory")&&e.d(s,{createApiFactory:function(){return c.createApiFactory}}),e.o(c,"createComponentExtension")&&e.d(s,{createComponentExtension:function(){return c.createComponentExtension}}),e.o(c,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return c.createExternalRouteRef}}),e.o(c,"createPlugin")&&e.d(s,{createPlugin:function(){return c.createPlugin}}),e.o(c,"createReactExtension")&&e.d(s,{createReactExtension:function(){return c.createReactExtension}}),e.o(c,"createRoutableExtension")&&e.d(s,{createRoutableExtension:function(){return c.createRoutableExtension}}),e.o(c,"createRouteRef")&&e.d(s,{createRouteRef:function(){return c.createRouteRef}}),e.o(c,"discoveryApiRef")&&e.d(s,{discoveryApiRef:function(){return c.discoveryApiRef}}),e.o(c,"errorApiRef")&&e.d(s,{errorApiRef:function(){return c.errorApiRef}}),e.o(c,"featureFlagsApiRef")&&e.d(s,{featureFlagsApiRef:function(){return c.featureFlagsApiRef}}),e.o(c,"fetchApiRef")&&e.d(s,{fetchApiRef:function(){return c.fetchApiRef}}),e.o(c,"getComponentData")&&e.d(s,{getComponentData:function(){return c.getComponentData}}),e.o(c,"githubAuthApiRef")&&e.d(s,{githubAuthApiRef:function(){return c.githubAuthApiRef}}),e.o(c,"gitlabAuthApiRef")&&e.d(s,{gitlabAuthApiRef:function(){return c.gitlabAuthApiRef}}),e.o(c,"googleAuthApiRef")&&e.d(s,{googleAuthApiRef:function(){return c.googleAuthApiRef}}),e.o(c,"identityApiRef")&&e.d(s,{identityApiRef:function(){return c.identityApiRef}}),e.o(c,"microsoftAuthApiRef")&&e.d(s,{microsoftAuthApiRef:function(){return c.microsoftAuthApiRef}}),e.o(c,"oauthRequestApiRef")&&e.d(s,{oauthRequestApiRef:function(){return c.oauthRequestApiRef}}),e.o(c,"oktaAuthApiRef")&&e.d(s,{oktaAuthApiRef:function(){return c.oktaAuthApiRef}}),e.o(c,"oneloginAuthApiRef")&&e.d(s,{oneloginAuthApiRef:function(){return c.oneloginAuthApiRef}}),e.o(c,"storageApiRef")&&e.d(s,{storageApiRef:function(){return c.storageApiRef}}),e.o(c,"useApp")&&e.d(s,{useApp:function(){return c.useApp}}),e.o(c,"useElementFilter")&&e.d(s,{useElementFilter:function(){return c.useElementFilter}}),e.o(c,"useRouteRef")&&e.d(s,{useRouteRef:function(){return c.useRouteRef}}),e.o(c,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return c.useRouteRefParams}});var R=e(25182)},16362:function(){},5761:function(ee,s,e){"use strict";e.d(s,{I_:function(){return c},h_:function(){return f}});var r=e(2784),t=e(76241);function c(){const m=(0,t.Vt)("api-context");if(!m)throw new Error("API context is not available");const a=m.atVersion(1);if(!a)throw new Error("ApiContext v1 not available");return a}function f(m){const i=c().get(m);if(!i)throw new Error(`No implementation available for ${m}`);return i}function R(m){return function(i){const u=g=>{const v=c(),T={};for(const L in m)if(m.hasOwnProperty(L)){const B=m[L],k=v.get(B);if(!k)throw new Error(`No implementation available for ${B}`);T[L]=k}return React.createElement(i,{...g,...T})},y=i.displayName||i.name||"Component";return u.displayName=`withApis(${y})`,u}}},31311:function(ee,s,e){"use strict";e.d(s,{useApp:function(){return r.q}});var r=e(32483),t=e(67229),c=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 c=(0,r.Vt)("app-context");if(!c)throw new Error("App context is not available");const f=c.atVersion(1);if(!f)throw new Error("AppContext v1 not available");return f}},74181:function(ee,s,e){"use strict";e.d(s,{R5:function(){return f},CO:function(){return v},YO:function(){return T},P4:function(){return g},IY:function(){return R},vJ:function(){return F}});var r=e(76241);const t=(0,r.uW)("component-data-store",()=>new WeakMap),c="__backstage_data";function f(x,M,D){var K;const P=x;let H=(K=P[c])!=null?K:t.get(x);if(H||(H={map:new Map},Object.defineProperty(P,c,{enumerable:!1,configurable:!0,writable:!1,value:H}),t.set(x,H)),H.map.has(M)){const ce=x.displayName||x.name;throw new Error(`Attempted to attach duplicate data "${M}" to component "${ce}"`)}H.map.set(M,D)}function R(x,M){var H;if(!x)return;const D=x.type;if(!D)return;const P=(H=D[c])!=null?H:t.get(D);if(!!P)return P.map.get(M)}var m=e(2784),a=e(88609),i=e(31311),u=e(82772);class y extends m.Component{constructor(){super(...arguments);_(this,"state",{error:void 0});_(this,"handleErrorReset",()=>{this.setState({error:void 0})})}static getDerivedStateFromError(D){return{error:D}}render(){const{error:D}=this.state,{app:P,plugin:H}=this.props,{ErrorBoundaryFallback:K}=P.getComponents();return D?m.createElement(K,{error:D,resetError:this.handleErrorReset,plugin:H}):this.props.children}}function g(x){const{component:M,mountPoint:D,name:P}=x;return T({component:{lazy:()=>M().then(H=>{const K=We=>{try{(0,u.tg)(D)}catch(Ze){if(typeof Ze=="object"&&Ze!==null){const{message:me}=Ze;if(typeof me=="string"&&me.startsWith("No path for "))throw new Error(`Routable extension component with mount point ${D} 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 Ze}return m.createElement(H,{...We})},ce=P||H.displayName||H.name||"LazyComponent";return K.displayName=`RoutableExtension(${ce})`,K},H=>ce=>{const We=(0,i.useApp)(),{BootErrorPage:Ze}=We.getComponents();return m.createElement(Ze,{step:"load-chunk",error:H})})},data:{"core.mountPoint":D},name:P})}function v(x){const{component:M,name:D}=x;return T({component:M,name:D})}function T(x){const{data:M={},name:D}=x;D||console.warn("Declaring extensions without name is DEPRECATED. Make sure that all usages of createReactExtension, createComponentExtension and createRoutableExtension provide a name.");let P;if("lazy"in x.component){const K=x.component.lazy;P=(0,m.lazy)(()=>K().then(ce=>({default:ce})))}else P=x.component.sync;const H=D||P.displayName||P.name||"Component";return{expose(K){const ce=We=>{const Ze=(0,i.useApp)(),{Progress:me}=Ze.getComponents(),je=M==null?void 0:M["core.mountPoint"];return m.createElement(m.Suspense,{fallback:m.createElement(me,null)},m.createElement(y,{app:Ze,plugin:K},m.createElement(a.fC,{attributes:{pluginId:K.getId(),...D&&{extension:D},...je&&{routeRef:je.id}}},m.createElement(P,{...We}))))};f(ce,"core.plugin",K);for(const[We,Ze]of Object.entries(M))f(ce,We,Ze);return ce.displayName=`Extension(${H})`,ce}}}var L=e(27399);function B(x,M,D,P){return m.Children.toArray(x).flatMap(H=>{if(!(0,m.isValidElement)(H))return[];if(H.type===m.Fragment)return B(H.props.children,M,D,P);if(R(H,"core.featureFlagged")){const K=H.props;return("with"in K?M.isActive(K.with):!M.isActive(K.without))?B(H.props.children,M,D,P):[]}if(D===void 0||D(H))return[H];if(P)throw new Error(P);return B(H.props.children,M,D,P)})}class k{constructor(M,D){this.node=M,this.featureFlagsApi=D}selectByComponentData(M){const D=B(this.node,this.featureFlagsApi,P=>R(P,M.key)!==void 0,M.withStrictError);return new k(D,this.featureFlagsApi)}findComponentData(M){return B(this.node,this.featureFlagsApi,P=>R(P,M.key)!==void 0).map(P=>R(P,M.key)).filter(P=>P!==void 0)}getElements(){return B(this.node,this.featureFlagsApi)}}function F(x,M,D=[]){const P=(0,L.useApi)(L.featureFlagsApiRef),H=new k(x,P);return(0,m.useMemo)(()=>M(H),[x,...D])}},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 f.R5},bitbucketAuthApiRef:function(){return t.bitbucketAuthApiRef},configApiRef:function(){return t.configApiRef},createComponentExtension:function(){return f.CO},createExternalRouteRef:function(){return i.x8},createPlugin:function(){return a.r},createReactExtension:function(){return f.YO},createRoutableExtension:function(){return f.P4},createRouteRef:function(){return i.NT},discoveryApiRef:function(){return t.discoveryApiRef},errorApiRef:function(){return t.errorApiRef},featureFlagsApiRef:function(){return t.featureFlagsApiRef},fetchApiRef:function(){return t.fetchApiRef},getComponentData:function(){return f.IY},githubAuthApiRef:function(){return t.githubAuthApiRef},gitlabAuthApiRef:function(){return t.gitlabAuthApiRef},googleAuthApiRef:function(){return t.googleAuthApiRef},identityApiRef:function(){return t.identityApiRef},microsoftAuthApiRef:function(){return t.microsoftAuthApiRef},oauthRequestApiRef:function(){return t.oauthRequestApiRef},oktaAuthApiRef:function(){return t.oktaAuthApiRef},oneloginAuthApiRef:function(){return t.oneloginAuthApiRef},storageApiRef:function(){return t.storageApiRef},useAnalytics:function(){return r.z},useApp:function(){return c.useApp},useElementFilter:function(){return f.vJ},useRouteRef:function(){return i.tg},useRouteRefParams:function(){return i.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 c=e(31311);e.o(c,"attachComponentData")&&e.d(s,{attachComponentData:function(){return c.attachComponentData}}),e.o(c,"createApiFactory")&&e.d(s,{createApiFactory:function(){return c.createApiFactory}}),e.o(c,"createApiRef")&&e.d(s,{createApiRef:function(){return c.createApiRef}}),e.o(c,"createComponentExtension")&&e.d(s,{createComponentExtension:function(){return c.createComponentExtension}}),e.o(c,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return c.createExternalRouteRef}}),e.o(c,"createPlugin")&&e.d(s,{createPlugin:function(){return c.createPlugin}}),e.o(c,"createReactExtension")&&e.d(s,{createReactExtension:function(){return c.createReactExtension}}),e.o(c,"createRoutableExtension")&&e.d(s,{createRoutableExtension:function(){return c.createRoutableExtension}}),e.o(c,"createRouteRef")&&e.d(s,{createRouteRef:function(){return c.createRouteRef}}),e.o(c,"getComponentData")&&e.d(s,{getComponentData:function(){return c.getComponentData}}),e.o(c,"useApi")&&e.d(s,{useApi:function(){return c.useApi}}),e.o(c,"useApiHolder")&&e.d(s,{useApiHolder:function(){return c.useApiHolder}}),e.o(c,"useElementFilter")&&e.d(s,{useElementFilter:function(){return c.useElementFilter}}),e.o(c,"useRouteRef")&&e.d(s,{useRouteRef:function(){return c.useRouteRef}}),e.o(c,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return c.useRouteRefParams}});var f=e(74181),R=e(80274),m=e.n(R);e.o(R,"createApiFactory")&&e.d(s,{createApiFactory:function(){return R.createApiFactory}}),e.o(R,"createApiRef")&&e.d(s,{createApiRef:function(){return R.createApiRef}}),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,"createRouteRef")&&e.d(s,{createRouteRef:function(){return R.createRouteRef}}),e.o(R,"useApi")&&e.d(s,{useApi:function(){return R.useApi}}),e.o(R,"useApiHolder")&&e.d(s,{useApiHolder:function(){return R.useApiHolder}}),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 a=e(96896),i=e(82772)},96896:function(ee,s,e){"use strict";e.d(s,{r:function(){return t}});class r{constructor(f){this.config=f}getId(){return this.config.id}getApis(){var f;return(f=this.config.apis)!=null?f:[]}getFeatureFlags(){var f,R;return(R=(f=this.config.featureFlags)==null?void 0:f.slice())!=null?R:[]}get routes(){var f;return(f=this.config.routes)!=null?f:{}}get externalRoutes(){var f;return(f=this.config.externalRoutes)!=null?f:{}}provide(f){return f.expose(this)}toString(){return`plugin{${this.config.id}}`}}function t(c){return new r(c)}},82772:function(ee,s,e){var L,B,k;"use strict";e.d(s,{x8:function(){return u},NT:function(){return f},tg:function(){return v},Oi:function(){return T}});var r=e(76241);const t=(0,r.uW)("route-ref-type",()=>Symbol("route-ref-type"));class c{constructor(x,M){_(this,L,"absolute");this.id=x,this.params=M}get title(){return this.id}toString(){return`routeRef{type=absolute,id=${this.id}}`}}L=t;function f(F){var x;return new c(F.id,(x=F.params)!=null?x:[])}const R=/^\w+$/;class m{constructor(x,M,D,P){_(this,B,"sub");this.id=x,this.path=M,this.parent=D,this.params=P}toString(){return`routeRef{type=sub,id=${this.id}}`}}B=t;function a(F){const{id:x,path:M,parent:D}=F,P=M.split("/").filter(ce=>ce.startsWith(":")).map(ce=>ce.substring(1)),H=[...D.params,...P];if(D.params.some(ce=>P.includes(ce)))throw new Error("SubRouteRef may not have params that overlap with its parent");if(!M.startsWith("/"))throw new Error(`SubRouteRef path must start with '/', got '${M}'`);if(M.endsWith("/"))throw new Error(`SubRouteRef path must not end with '/', got '${M}'`);for(const ce of P)if(!R.test(ce))throw new Error(`SubRouteRef path has invalid param, got '${ce}'`);return new m(x,M,D,H)}class i{constructor(x,M,D){_(this,k,"external");this.id=x,this.params=M,this.optional=D}toString(){return`routeRef{type=external,id=${this.id}}`}}k=t;function u(F){var x;return new i(F.id,(x=F.params)!=null?x:[],Boolean(F.optional))}var y=e(2784),g=e(10289);function v(F){const x=(0,g.TH)(),M=(0,r.Vt)("routing-context");if(!M)throw new Error("Routing context is not available");const D=M.atVersion(1),P=(0,y.useMemo)(()=>D&&D.resolve(F,x),[D,F,x]);if(!M)throw new Error("useRouteRef used outside of routing context");if(!D)throw new Error("RoutingContext v1 not available");const H="optional"in F&&F.optional;if(!P&&!H)throw new Error(`No path for ${F}`);return P}function T(F){return(0,g.UO)()}},10179:function(ee,s,e){"use strict";e.d(s,{SP:function(){return L},dR:function(){return g},VL:function(){return k},BD:function(){return t}});function r(F){if(typeof F!="object"||F===null||Array.isArray(F))return!1;const x=F;return!(typeof x.name!="string"||x.name===""||typeof x.message!="string")}function t(F){if(typeof F!="object"||F===null||Array.isArray(F))throw new Error(`Encountered invalid error, not an object, got '${F}'`);const x=F;if(typeof x.name!="string"||x.name==="")throw new Error(`Encountered error object without a name, got '${F}'`);if(typeof x.message!="string")throw new Error(`Encountered error object without a message, got '${F}'`)}var c=e(24852);function f(F,x){const M=serializeErrorInternal(F),D={name:"Unknown",message:"<no reason given>",...M};return x!=null&&x.includeStack||delete D.stack,D}function R(F){const x=(0,c.deserializeError)(F);return F.stack||(x.stack=void 0),x}function m(F){if(r(F)){const x=String(F);return x!=="[object Object]"?x:`${F.name}: ${F.message}`}return`unknown error '${F}'`}class a extends Error{constructor(M,D){var H;let P=M;if(D!==void 0){const K=m(D);P?P+=`; caused by ${K}`:P=`caused by ${K}`}super(P);_(this,"cause");(H=Error.captureStackTrace)==null||H.call(Error,this,this.constructor),this.name=this.constructor.name,this.cause=r(D)?D:void 0}}class i extends null{}class u extends null{}class y extends null{}class g extends a{}class v extends null{}class T extends null{}class L extends a{constructor(x,M){super(x,M),this.name=r(M)?M.name:"Error"}}async function B(F){var x;try{const M=await F.text();if(M){if((x=F.headers.get("content-type"))!=null&&x.startsWith("application/json"))try{const D=JSON.parse(M);if(D.error&&D.response)return D}catch{}return{error:{name:"Error",message:`Request failed with status ${F.status} ${F.statusText}, ${M}`},response:{statusCode:F.status}}}}catch{}return{error:{name:"Error",message:`Request failed with status ${F.status} ${F.statusText}`},response:{statusCode:F.status}}}class k extends Error{constructor(M){super(M.message);_(this,"response");_(this,"body");_(this,"cause");this.name="ResponseError",this.response=M.response,this.body=M.data,this.cause=M.cause}static async fromResponse(M){const D=await B(M),P=D.response.statusCode||M.status,H=D.error.name||M.statusText,K=`Request failed with ${P} ${H}`,ce=R(D.error);return new k({message:K,response:M,data:D,cause:ce})}}},36356:function(ee,s,e){var g,v,T,L,B;"use strict";e.d(s,{nW:function(){return y},ae:function(){return m},q3:function(){return a}});var r=e(36964);const t=(0,r.createApiRef)({id:"core.scmauth"});class c{constructor(x){An(this,g,void 0);Pn(this,g,x)}async getCredentials(x){const M=new URL(x.url),D=Je(this,g).find(P=>P.isUrlSupported(M));if(!D)throw new Error(`No auth provider available for '${x.url}', see https://backstage.io/link?scm-auth`);return D.getCredentials(x)}}g=new WeakMap;const k=class{constructor(x,M,D,P){An(this,v,void 0);An(this,T,void 0);An(this,L,void 0);An(this,B,void 0);Pn(this,v,M),Pn(this,T,D),Pn(this,L,P),Pn(this,B,x)}static createDefaultApiFactory(){return createApiFactory({api:scmAuthApiRef,deps:{github:githubAuthApiRef,gitlab:gitlabAuthApiRef,azure:microsoftAuthApiRef,bitbucket:bitbucketAuthApiRef},factory:({github:x,gitlab:M,azure:D,bitbucket:P})=>k.merge(k.forGithub(x),k.forGitlab(M),k.forAzure(D),k.forBitbucket(P))})}static forAuthApi(x,M){return new k("generic",x,M.host,M.scopeMapping)}static forGithub(x,M){var P;const D=(P=M==null?void 0:M.host)!=null?P:"github.com";return new k("github",x,D,{default:["repo","read:org","read:user"],repoWrite:["gist"]})}static forGitlab(x,M){var P;const D=(P=M==null?void 0:M.host)!=null?P:"gitlab.com";return new k("gitlab",x,D,{default:["read_user","read_api","read_repository"],repoWrite:["write_repository","api"]})}static forAzure(x,M){var P;const D=(P=M==null?void 0:M.host)!=null?P:"dev.azure.com";return new k("azure",x,D,{default:["vso.build","vso.code","vso.graph","vso.project","vso.profile"],repoWrite:["vso.code_manage"]})}static forBitbucket(x,M){var P;const D=(P=M==null?void 0:M.host)!=null?P:"bitbucket.org";return new k("bitbucket",x,D,{default:["account","team","pullrequest","snippet","issue"],repoWrite:["pullrequest:write","snippet:write","issue:write"]})}static merge(...x){return new c(x)}isUrlSupported(x){return x.host===Je(this,T)}getAdditionalScopesForProvider(x){var M,D;return!(x!=null&&x.customScopes)||Je(this,B)==="generic"?[]:(D=(M=x.customScopes)==null?void 0:M[Je(this,B)])!=null?D:[]}async getCredentials(x){const{url:M,additionalScope:D,...P}=x,H=Je(this,L).default.slice();D!=null&&D.repoWrite&&H.push(...Je(this,L).repoWrite);const K=this.getAdditionalScopesForProvider(D);K.length&&H.push(...K);const ce=[...new Set(H)],We=await Je(this,v).getAccessToken(ce,P);return{token:We,headers:{Authorization:`Bearer ${We}`}}}};let f=k;v=new WeakMap,T=new WeakMap,L=new WeakMap,B=new WeakMap;var R=e(68370);class m{static fromConfig(x){return R.Lx.fromConfig(x)}}const a=(0,r.createApiRef)({id:"integration.scmintegrations"});var i=e(73250),u=e(2784);const y=F=>{var H;const{type:x}=F,M=(0,r.useApp)(),D=i.Z,P=x&&(H=M.getSystemIcon(x))!=null?H:D;return u.createElement(P,null)}},68370:function(ee,s,e){var rn,Zt,Kt,zt,kt,xt,_t;"use strict";e.d(s,{Lx:function(){return Nt},Pb:function(){return ht}});var r=e(82717),t=e.n(r),c=e(76635);function f($){const h=new URL("http://example.com");return h.host=$,h.host===$}function R($){try{return new URL($),!0}catch{return!1}}function m($,h){return{list(){return $},byUrl(S){try{const w=typeof S=="string"?new URL(S):S;return $.find(j=>h(j)===w.host)}catch{return}},byHost(S){return $.find(w=>h(w)===S)}}}function a($){const{url:h,base:S,lineNumber:w}=$;try{return new URL(h),h}catch{}let j;if(h.startsWith("/")){const{filepath:he}=t()(S);j=new URL(S);const oe=(0,c.trimEnd)(j.pathname.substring(0,j.pathname.length-he.length),"/");j.pathname=`${oe}${h}`}else j=new URL(h,S);return j.search=new URL(S).search,w&&(j.hash=`L${w}`),j.toString()}const i="amazonaws.com";function u($){var Ft;const h=$.getOptionalString("endpoint"),S=(Ft=$.getOptionalBoolean("s3ForcePathStyle"))!=null?Ft:!1;let w,j;if(h){try{const dn=new URL(h);w=dn.host,j=dn.pathname}catch{throw new Error(`invalid awsS3 integration config, endpoint '${h}' is not a valid URL`)}if(j!=="/")throw new Error(`invalid awsS3 integration config, endpoints cannot contain path, got '${h}'`)}else w=i;const he=$.getOptionalString("accessKeyId"),oe=$.getOptionalString("secretAccessKey"),Me=$.getOptionalString("roleArn"),et=$.getOptionalString("externalId");return{host:w,endpoint:h,s3ForcePathStyle:S,accessKeyId:he,secretAccessKey:oe,roleArn:Me,externalId:et}}function y($){const h=$.map(u);return h.some(S=>S.host===i)||h.push({host:i}),h}const Vt=class{get type(){return"awsS3"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}constructor(h){this.integrationConfig=h}resolveUrl(h){return a(h)}resolveEditUrl(h){return h}};let g=Vt;_(g,"factory",({config:h})=>{var w;const S=y((w=h.getOptionalConfigArray("integrations.awsS3"))!=null?w:[]);return m(S.map(j=>new Vt(j)),j=>j.config.host)});const v="GB",Un=class{constructor(h,S,w,j,he,oe){An(this,rn,void 0);An(this,Zt,void 0);An(this,Kt,void 0);An(this,zt,void 0);An(this,kt,void 0);An(this,xt,void 0);An(this,_t,(...h)=>{const S=new URL(Je(this,rn));return S.pathname=h.map(w=>encodeURIComponent(w)).join("/"),S});Pn(this,rn,h),Pn(this,Zt,S),Pn(this,Kt,w),Pn(this,zt,j),Pn(this,kt,he),Pn(this,xt,oe)}static fromRepoUrl(h){var dn;const S=new URL(h);let w,j,he;const oe=S.pathname.split("/").map($t=>decodeURIComponent($t));if(oe[2]==="_git"?(w=oe[1],j=he=oe[3]):oe[3]==="_git"&&(w=oe[1],j=oe[2],he=oe[4]),!w||!j||!he)throw new Error("Azure URL must point to a git repository");const Me=(dn=S.searchParams.get("path"))!=null?dn:void 0;let et;const Ft=S.searchParams.get("version");if(Ft){if(Ft.slice(0,2)!=="GB")throw new Error("Azure URL version must point to a git branch");et=Ft.slice(2)}return new Un(S.origin,w,j,he,Me,et)}toRepoUrl(){let h;return Je(this,Kt)===Je(this,zt)?h=Je(this,_t).call(this,Je(this,Zt),"_git",Je(this,zt)):h=Je(this,_t).call(this,Je(this,Zt),Je(this,Kt),"_git",Je(this,zt)),Je(this,kt)&&h.searchParams.set("path",Je(this,kt)),Je(this,xt)&&h.searchParams.set("version",v+Je(this,xt)),h.toString()}toFileUrl(){if(!Je(this,kt))throw new Error("Azure URL must point to a specific path to be able to download a file");const h=Je(this,_t).call(this,Je(this,Zt),Je(this,Kt),"_apis","git","repositories",Je(this,zt),"items");return h.searchParams.set("api-version","6.0"),h.searchParams.set("path",Je(this,kt)),Je(this,xt)&&h.searchParams.set("version",Je(this,xt)),h.toString()}toArchiveUrl(){const h=Je(this,_t).call(this,Je(this,Zt),Je(this,Kt),"_apis","git","repositories",Je(this,zt),"items");return h.searchParams.set("recursionLevel","full"),h.searchParams.set("download","true"),h.searchParams.set("api-version","6.0"),Je(this,kt)&&h.searchParams.set("scopePath",Je(this,kt)),Je(this,xt)&&h.searchParams.set("version",Je(this,xt)),h.toString()}toCommitsUrl(){const h=Je(this,_t).call(this,Je(this,Zt),Je(this,Kt),"_apis","git","repositories",Je(this,zt),"commits");return h.searchParams.set("api-version","6.0"),Je(this,xt)&&h.searchParams.set("searchCriteria.itemVersion.version",Je(this,xt)),h.toString()}getOwner(){return Je(this,Zt)}getProject(){return Je(this,Kt)}getRepo(){return Je(this,zt)}getPath(){return Je(this,kt)}getRef(){return Je(this,xt)}};let T=Un;rn=new WeakMap,Zt=new WeakMap,Kt=new WeakMap,zt=new WeakMap,kt=new WeakMap,xt=new WeakMap,_t=new WeakMap;const L="dev.azure.com";function B($){var w;const h=(w=$.getOptionalString("host"))!=null?w:L,S=$.getOptionalString("token");if(!f(h))throw new Error(`Invalid Azure integration config, '${h}' is not a valid host`);return{host:h,token:S}}function k($){const h=$.map(B);return h.some(S=>S.host===L)||h.push({host:L}),h}const Ln=class{constructor(h){this.integrationConfig=h}get type(){return"azure"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(h){var j;const{url:S,base:w}=h;if(R(S))return S;try{const he=T.fromRepoUrl(w),oe=new URL(w),Me=new URL(`https://a.com${(j=he.getPath())!=null?j:""}`),et=new URL(S,Me).pathname;return oe.searchParams.set("path",et),h.lineNumber&&(oe.searchParams.set("line",String(h.lineNumber)),oe.searchParams.set("lineEnd",String(h.lineNumber+1)),oe.searchParams.set("lineStartColumn","1"),oe.searchParams.set("lineEndColumn","1")),oe.toString()}catch{return new URL(S,w).toString()}}resolveEditUrl(h){return h}};let F=Ln;_(F,"factory",({config:h})=>{var w;const S=k((w=h.getOptionalConfigArray("integrations.azure"))!=null?w:[]);return m(S.map(j=>new Ln(j)),j=>j.config.host)});var x=e(48834).Buffer;function M($){return AzureUrl.fromRepoUrl($).toFileUrl()}function D($){return AzureUrl.fromRepoUrl($).toArchiveUrl()}function P($){return AzureUrl.fromRepoUrl($).toCommitsUrl()}function H($,h){const S=h?{...h}:{};if($.token){const w=x.from(`:${$.token}`,"utf8");S.Authorization=`Basic ${w.toString("base64")}`}return{headers:S}}const K="bitbucket.org",ce="https://api.bitbucket.org/2.0";function We($){var oe;const h=(oe=$.getOptionalString("host"))!=null?oe:K;let S=$.getOptionalString("apiBaseUrl");const w=$.getOptionalString("token"),j=$.getOptionalString("username"),he=$.getOptionalString("appPassword");if(!f(h))throw new Error(`Invalid Bitbucket integration config, '${h}' is not a valid host`);return S?S=(0,c.trimEnd)(S,"/"):h===K?S=ce:S=`https://${h}/rest/api/1.0`,{host:h,apiBaseUrl:S,token:w,username:j,appPassword:he}}function Ze($){const h=$.map(We);return h.some(S=>S.host===K)||h.push({host:K,apiBaseUrl:ce}),h}const Mn=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=a(h);if(!h.lineNumber)return S;const w=new URL(S);return this.integrationConfig.host==="bitbucket.org"?w.hash=`lines-${h.lineNumber}`:w.hash=`${h.lineNumber}`,w.toString()}resolveEditUrl(h){const S=t()(h),w=new URL(h);return w.searchParams.set("mode","edit"),w.searchParams.set("spa","0"),w.searchParams.set("at",S.ref),w.toString()}};let me=Mn;_(me,"factory",({config:h})=>{var w,j,he;const S=Ze((he=h.getOptionalConfigArray("integrations.bitbucket"))!=null?he:[...(w=h.getOptionalConfigArray("integrations.bitbucketCloud"))!=null?w:[],...(j=h.getOptionalConfigArray("integrations.bitbucketServer"))!=null?j:[]]);return m(S.map(oe=>new Mn(oe)),oe=>oe.config.host)});var je=e(96279),de=e(48834).Buffer;async function Ce($,h){const{name:S,owner:w,resource:j}=parseGitUrl($),he=j==="bitbucket.org";let oe=he?`${h.apiBaseUrl}/repositories/${w}/${S}`:`${h.apiBaseUrl}/projects/${w}/repos/${S}/default-branch`,Me=await fetch(oe,qe(h));if(Me.status===404&&!he&&(oe=`${h.apiBaseUrl}/projects/${w}/repos/${S}/branches/default`,Me=await fetch(oe,qe(h))),!Me.ok){const Ft=`Failed to retrieve default branch from ${oe}, ${Me.status} ${Me.statusText}`;throw new Error(Ft)}let et;if(he)et=(await Me.json()).mainbranch.name;else{const{displayId:Ft}=await Me.json();et=Ft}if(!et)throw new Error(`Failed to read default branch from ${oe}. Response ${Me.status} ${Me.json()}`);return et}async function Ve($,h){const{name:S,owner:w,ref:j,protocol:he,resource:oe,filepath:Me}=parseGitUrl($),et=oe==="bitbucket.org";let Ft=j;Ft||(Ft=await Ce($,h));const dn=Me?`&path=${encodeURIComponent(Me)}`:"";return et?`${he}://${oe}/${w}/${S}/get/${Ft}.tar.gz`:`${h.apiBaseUrl}/projects/${w}/repos/${S}/archive?format=tgz&at=${Ft}&prefix=${w}-${S}${dn}`}function Ke($,h){try{const{owner:S,name:w,ref:j,filepathtype:he,filepath:oe}=parseGitUrl($);if(!S||!w||he!=="browse"&&he!=="raw"&&he!=="src")throw new Error("Invalid Bitbucket URL or file path");const Me=oe.replace(/^\//,"");if(h.host==="bitbucket.org"){if(!j)throw new Error("Invalid Bitbucket URL or file path");return`${h.apiBaseUrl}/repositories/${S}/${w}/src/${j}/${Me}`}return`${h.apiBaseUrl}/projects/${S}/repos/${w}/raw/${Me}?at=${j}`}catch(S){throw new Error(`Incorrect URL: ${$}, ${S}`)}}function qe($){const h={};if($.token)h.Authorization=`Bearer ${$.token}`;else if($.username&&$.appPassword){const S=de.from(`${$.username}:${$.appPassword}`,"utf8");h.Authorization=`Basic ${S.toString("base64")}`}return{headers:h}}const Re="bitbucket.org",Fe="https://api.bitbucket.org/2.0";function Ue($){const h=Re,S=Fe,w=$.getString("username"),j=$.getString("appPassword");return{host:h,apiBaseUrl:S,username:w,appPassword:j}}function Ye($){const h=$.map(Ue);return h.length===0&&h.push({host:Re,apiBaseUrl:Fe}),h}const Rn=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=a(h);if(h.lineNumber){const w=new URL(S);return w.hash=`lines-${h.lineNumber}`,w.toString()}return S}resolveEditUrl(h){const S=t()(h),w=new URL(h);return w.searchParams.set("mode","edit"),w.searchParams.set("at",S.ref),w.toString()}};let it=Rn;_(it,"factory",({config:h})=>{var w;const S=Ye((w=h.getOptionalConfigArray("integrations.bitbucketCloud"))!=null?w:[]);return m(S.map(j=>new Rn(j)),j=>j.config.host)});var Rt=e(48834).Buffer;async function nt($,h){const{name:S,owner:w}=parseGitUrl($),j=`${h.apiBaseUrl}/repositories/${w}/${S}`,he=await fetch(j,rt(h));if(!he.ok){const et=`Failed to retrieve default branch from ${j}, ${he.status} ${he.statusText}`;throw new Error(et)}const Me=(await he.json()).mainbranch.name;if(!Me)throw new Error(`Failed to read default branch from ${j}. Response ${he.status} ${he.json()}`);return Me}async function ut($,h){const{name:S,owner:w,ref:j,protocol:he,resource:oe}=parseGitUrl($);let Me=j;return Me||(Me=await nt($,h)),`${he}://${oe}/${w}/${S}/get/${Me}.tar.gz`}function tt($,h){try{const{owner:S,name:w,ref:j,filepathtype:he,filepath:oe}=parseGitUrl($);if(!S||!w||he!=="src"&&he!=="raw")throw new Error("Invalid Bitbucket Cloud URL or file path");const Me=oe.replace(/^\//,"");if(!j)throw new Error("Invalid Bitbucket Cloud URL or file path");return`${h.apiBaseUrl}/repositories/${S}/${w}/src/${j}/${Me}`}catch(S){throw new Error(`Incorrect URL: ${$}, ${S}`)}}function rt($){const h={};if($.username&&$.appPassword){const S=Rt.from(`${$.username}:${$.appPassword}`,"utf8");h.Authorization=`Basic ${S.toString("base64")}`}return{headers:h}}function Bt($){const h=$.getString("host");let S=$.getOptionalString("apiBaseUrl");const w=$.getOptionalString("token");if(!f(h))throw new Error(`Invalid Bitbucket Server integration config, '${h}' is not a valid host`);return S?S=(0,c.trimEnd)(S,"/"):S=`https://${h}/rest/api/1.0`,{host:h,apiBaseUrl:S,token:w}}function jt($){return $.map(Bt)}const Nn=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=a(h);if(h.lineNumber){const w=new URL(S),j=w.pathname.split("/").slice(-1)[0];return w.hash=`${j}-${h.lineNumber}`,w.toString()}return S}resolveEditUrl(h){const S=t()(h),w=new URL(h);return w.searchParams.set("mode","edit"),w.searchParams.set("spa","0"),w.searchParams.set("at",S.ref),w.toString()}};let Mt=Nn;_(Mt,"factory",({config:h})=>{var w;const S=jt((w=h.getOptionalConfigArray("integrations.bitbucketServer"))!=null?w:[]);return m(S.map(j=>new Nn(j)),j=>j.config.host)});async function In($,h){const{name:S,owner:w}=parseGitUrl($);let j=`${h.apiBaseUrl}/projects/${w}/repos/${S}/default-branch`,he=await fetch(j,un(h));if(he.status===404&&(j=`${h.apiBaseUrl}/projects/${w}/repos/${S}/branches/default`,he=await fetch(j,un(h))),!he.ok){const et=`Failed to retrieve default branch from ${j}, ${he.status} ${he.statusText}`;throw new Error(et)}const{displayId:oe}=await he.json(),Me=oe;if(!Me)throw new Error(`Failed to read default branch from ${j}. Response ${he.status} ${he.json()}`);return Me}async function Xt($,h){const{name:S,owner:w,ref:j,filepath:he}=parseGitUrl($);let oe=j;oe||(oe=await In($,h));const Me=he?`&path=${encodeURIComponent(he)}`:"";return`${h.apiBaseUrl}/projects/${w}/repos/${S}/archive?format=tgz&at=${oe}&prefix=${w}-${S}${Me}`}function yt($,h){try{const{owner:S,name:w,ref:j,filepathtype:he,filepath:oe}=parseGitUrl($);if(!S||!w||he!=="browse"&&he!=="raw"&&he!=="src")throw new Error("Invalid Bitbucket Server URL or file path");const Me=oe.replace(/^\//,"");return`${h.apiBaseUrl}/projects/${S}/repos/${w}/raw/${Me}?at=${j}`}catch(S){throw new Error(`Incorrect URL: ${$}, ${S}`)}}function un($){const h={};return $.token&&(h.Authorization=`Bearer ${$.token}`),{headers:h}}function se($){const h=$.getString("host");let S=$.getOptionalString("baseUrl"),w=$.getOptionalString("cloneUrl"),j=$.getOptionalString("gitilesBaseUrl");const he=$.getOptionalString("username"),oe=$.getOptionalString("password");if(f(h)){if(S&&!R(S))throw new Error(`Invalid Gerrit integration config, '${S}' is not a valid baseUrl`);if(w&&!R(w))throw new Error(`Invalid Gerrit integration config, '${w}' is not a valid cloneUrl`);if(j&&!R(j))throw new Error(`Invalid Gerrit integration config, '${j}' is not a valid gitilesBaseUrl`)}else throw new Error(`Invalid Gerrit integration config, '${h}' is not a valid host`);return S?S=(0,c.trimEnd)(S,"/"):S=`https://${h}`,j?j=(0,c.trimEnd)(j,"/"):j=`https://${h}`,w?w=(0,c.trimEnd)(w,"/"):w=S,{host:h,baseUrl:S,cloneUrl:w,gitilesBaseUrl:j,username:he,password:oe}}function W($){return $.map(se)}const Xn=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:w,lineNumber:j}=h;let he;return S?he=new URL(S,w):he=new URL(w),j&&(he.hash=j.toString()),he.toString()}resolveEditUrl(h){return h}};let ae=Xn;_(ae,"factory",({config:h})=>{var w;const S=W((w=h.getOptionalConfigArray("integrations.gerrit"))!=null?w:[]);return m(S.map(j=>new Xn(j)),j=>j.config.host)});var ge=e(48834).Buffer;const ye=")]}'";function Oe($,h){const w=h.replace($.gitilesBaseUrl,"").split("/").filter(Ft=>!!Ft),j=w.indexOf("+");if(j<=0)throw new Error(`Unable to parse project from url: ${h}`);const he=trimStart(w.slice(0,j).join("/"),"/"),oe=w.indexOf("heads");if(oe<=0)throw new Error(`Unable to parse branch from url: ${h}`);const Me=w[oe+1],et=w.slice(oe+2).join("/");return{branch:Me,filePath:et===""?"/":et,project:he}}function ze($){return $.password?"/a/":"/"}function be($,h){const{branch:S,project:w}=Oe($,h);return`${$.baseUrl}${ze($)}projects/${encodeURIComponent(w)}/branches/${S}`}function _e($,h){const{project:S}=Oe($,h);return`${$.cloneUrl}${ze($)}${S}`}function ct($,h){const{branch:S,filePath:w,project:j}=Oe($,h);return`${$.baseUrl}${ze($)}projects/${encodeURIComponent(j)}/branches/${S}/files/${encodeURIComponent(w)}/content`}function wt($){return`${$.baseUrl}${ze($)}projects/`}function It($){const h={};if(!$.password)return h;const S=ge.from(`${$.username}:${$.password}`,"utf8");return h.Authorization=`Basic ${S.toString("base64")}`,{headers:h}}async function lt($){const h=await $.text();if(h.startsWith(ye))try{return JSON.parse(h.slice(ye.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 Tt="github.com",qt="https://api.github.com",re="https://raw.githubusercontent.com";function ue($){var oe,Me;const h=(oe=$.getOptionalString("host"))!=null?oe:Tt;let S=$.getOptionalString("apiBaseUrl"),w=$.getOptionalString("rawBaseUrl");const j=$.getOptionalString("token"),he=(Me=$.getOptionalConfigArray("apps"))==null?void 0:Me.map(et=>({appId:et.getNumber("appId"),clientId:et.getString("clientId"),clientSecret:et.getString("clientSecret"),webhookSecret:et.getString("webhookSecret"),privateKey:et.getString("privateKey"),allowedInstallationOwners:et.getOptionalStringArray("allowedInstallationOwners")}));if(!f(h))throw new Error(`Invalid GitHub integration config, '${h}' is not a valid host`);return S?S=(0,c.trimEnd)(S,"/"):h===Tt&&(S=qt),w?w=(0,c.trimEnd)(w,"/"):h===Tt&&(w=re),{host:h,apiBaseUrl:S,rawBaseUrl:w,token:j,apps:he}}function Q($){const h=$.map(ue);return h.some(S=>S.host===Tt)||h.push({host:Tt,apiBaseUrl:qt,rawBaseUrl:re}),h}function pe($,h,S){try{const{owner:w,name:j,ref:he,filepathtype:oe,filepath:Me}=parseGitUrl($);if(!w||!j||!he||oe!=="blob"&&oe!=="raw"&&oe!=="tree")throw new Error("Invalid GitHub URL or file path");const et=Me.replace(/^\//,"");return Be(h,S)==="api"?`${h.apiBaseUrl}/repos/${w}/${j}/contents/${et}?ref=${he}`:`${h.rawBaseUrl}/${w}/${j}/${he}/${et}`}catch(w){throw new Error(`Incorrect URL: ${$}, ${w}`)}}function ie($,h){const S={};return Be($,h)==="api"&&(S.Accept="application/vnd.github.v3.raw"),h.token&&(S.Authorization=`token ${h.token}`),{headers:S}}function Be($,h){return $.apiBaseUrl&&(h.token||!$.rawBaseUrl)?"api":"raw"}class J{constructor(){_(this,"tokenCache",new Map);_(this,"isNotExpired",h=>h.diff(DateTime.local(),"minutes").minutes>50)}async getOrCreateToken(h,S){const w=this.tokenCache.get(h);if(w&&this.isNotExpired(w.expiresAt))return{accessToken:w.token};const j=await S();return this.tokenCache.set(h,j),{accessToken:j.token}}}const N={Accept:"application/vnd.github.machine-man-preview+json"};class te{constructor(h,S){_(this,"appClient");_(this,"baseUrl");_(this,"baseAuthConfig");_(this,"cache",new J);_(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:N,authStrategy:createAppAuth,auth:this.baseAuthConfig})}async getInstallationCredentials(h,S){var oe;const{installationId:w,suspended:j}=await this.getInstallationData(h);if(this.allowedInstallationOwners&&!((oe=this.allowedInstallationOwners)!=null&&oe.includes(h)))return{accessToken:void 0};if(j)throw new Error(`The GitHub application for ${h} is suspended`);const he=S?`${h}/${S}`:h;return this.cache.getOrCreateToken(he,async()=>{const Me=await this.appClient.apps.createInstallationAccessToken({installation_id:w,headers:N});if(S&&Me.data.repository_selection==="selected"){const et=new Octokit({baseUrl:this.baseUrl,auth:Me.data.token});if(!(await et.paginate(et.apps.listReposAccessibleToInstallation)).some($t=>$t.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:Me.data.token,expiresAt:DateTime.fromISO(Me.data.expires_at)}})}getInstallations(){return this.appClient.paginate(this.appClient.apps.listInstallations)}async getInstallationData(h){const w=(await this.getInstallations()).find(he=>{var oe,Me;return((Me=(oe=he.account)==null?void 0:oe.login)==null?void 0:Me.toLocaleLowerCase("en-US"))===h.toLocaleLowerCase("en-US")});if(w)return{installationId:w.id,suspended:Boolean(w.suspended_by)};const j=new Error(`No app installation found for ${h} in ${this.baseAuthConfig.appId}`);throw j.name="NotFoundError",j}}class Pe{constructor(h){_(this,"apps");var S,w;this.apps=(w=(S=h.apps)==null?void 0:S.map(j=>new te(j,h.apiBaseUrl)))!=null?w:[]}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 w=await Promise.all(this.apps.map(Me=>Me.getInstallationCredentials(h,S).then(et=>({credentials:et,error:void 0}),et=>({credentials:void 0,error:et})))),j=w.find(Me=>Me.credentials);if(j)return j.credentials.accessToken;const oe=w.map(Me=>Me.error).find(Me=>Me.name!=="NotFoundError");if(oe)throw oe}}class De{constructor(h,S){this.githubAppCredentialsMux=h,this.token=S}async getCredentials(h){const S=parseGitUrl(h.url),w=S.owner||S.name,j=S.owner?S.name:void 0;let he="app",oe=await this.githubAppCredentialsMux.getAppToken(w,j);return oe||(he="token",oe=this.token),{headers:oe?{Authorization:`Bearer ${oe}`}:void 0,token:oe,type:he}}}_(De,"create",null);class we{static fromIntegrations(h){const S=new Map;return h.github.list().forEach(w=>{const j=SingleInstanceGithubCredentialsProvider.create(w.config);S.set(w.config.host,j)}),new we(S)}constructor(h){this.providers=h}async getCredentials(h){const S=new URL(h.url),w=this.providers.get(S.host);if(!w)throw new Error(`There is no GitHub integration that matches ${h.url}. Please add a configuration for an integration.`);return w.getCredentials(h)}}const Zn=class{constructor(h){this.integrationConfig=h}get type(){return"github"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(h){return ht(a(h),"tree")}resolveEditUrl(h){return ht(h,"edit")}};let Ne=Zn;_(Ne,"factory",({config:h})=>{var w;const S=Q((w=h.getOptionalConfigArray("integrations.github"))!=null?w:[]);return m(S.map(j=>new Zn(j)),j=>j.config.host)});function ht($,h){return $.replace(/\/\/([^/]+)\/([^/]+)\/([^/]+)\/(blob|tree|edit)\//,(S,w,j,he)=>`//${w}/${j}/${he}/${h}/`)}const Lt="gitlab.com",Et="https://gitlab.com/api/v4";function Ut($){const h=$.getString("host");let S=$.getOptionalString("apiBaseUrl");const w=$.getOptionalString("token");let j=$.getOptionalString("baseUrl");if(S?S=(0,c.trimEnd)(S,"/"):h===Lt&&(S=Et),j?j=(0,c.trimEnd)(j,"/"):j=`https://${h}`,f(h)){if(!S||!R(S))throw new Error(`Invalid GitLab integration config, '${S}' is not a valid apiBaseUrl`);if(!R(j))throw new Error(`Invalid GitLab integration config, '${j}' is not a valid baseUrl`)}else throw new Error(`Invalid GitLab integration config, '${h}' is not a valid host`);return{host:h,token:w,apiBaseUrl:S,baseUrl:j}}function dt($){const h=$.map(Ut);return h.some(S=>S.host===Lt)||h.push({host:Lt,apiBaseUrl:Et,baseUrl:`https://${Lt}`}),h}async function gt($,h){if($.includes("/-/blob/")){const S=await bt($,h);return nn($,S).toString()}return Ot($).toString()}function Qe($){const{token:h=""}=$;return{headers:{"PRIVATE-TOKEN":h}}}function Ot($){try{const h=new URL($),[S,w,j,he,...oe]=h.pathname.split("/");if(S!==""||w===""||j===""||he!=="blob"||!oe.join("/").match(/\.(yaml|yml)$/))throw new Error("Wrong GitLab URL");return h.pathname=[S,w,j,"raw",...oe].join("/"),h}catch(h){throw new Error(`Incorrect url: ${$}, ${h}`)}}function nn($,h){try{const S=new URL($),w=S.pathname.split("/-/blob/")[1],[j,...he]=w.split("/");return S.pathname=["/api/v4/projects",h,"repository/files",encodeURIComponent(decodeURIComponent(he.join("/"))),"raw"].join("/"),S.search=`?ref=${j}`,S}catch(S){throw new Error(`Incorrect url: ${$}, ${S}`)}}async function bt($,h){const S=new URL($);if(!S.pathname.includes("/-/blob/"))throw new Error("Please provide full path to yaml file from GitLab");try{const w=S.pathname.split("/-/blob/")[0],j=new URL(`${S.origin}/api/v4/projects/${encodeURIComponent(w.replace(/^\//,""))}`),he=await fetch(j.toString(),Qe(h)),oe=await he.json();if(!he.ok)throw new Error(`GitLab Error '${oe.error}', ${oe.error_description}`);return Number(oe.id)}catch(w){throw new Error(`Could not get GitLab project ID for: ${$}, ${w}`)}}const zn=class{constructor(h){this.integrationConfig=h}get type(){return"gitlab"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(h){return a(h)}resolveEditUrl(h){return pt(h,"edit")}};let at=zn;_(at,"factory",({config:h})=>{var w;const S=dt((w=h.getOptionalConfigArray("integrations.gitlab"))!=null?w:[]);return m(S.map(j=>new zn(j)),j=>j.config.host)});function pt($,h){return $.replace(/\/\-\/(blob|tree|edit)\//,`/-/${h}/`)}class Nt{constructor(h){_(this,"byType");this.byType=h}static fromConfig(h){return new Nt({awsS3:g.factory({config:h}),azure:F.factory({config:h}),bitbucket:me.factory({config:h}),bitbucketCloud:it.factory({config:h}),bitbucketServer:Mt.factory({config:h}),gerrit:ae.factory({config:h}),github:Ne.factory({config:h}),gitlab:at.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):a(h)}resolveEditUrl(h){const S=this.byUrl(h);return S?S.resolveEditUrl(h):h}}},46054:function(ee,s,e){"use strict";var r={};e.r(r),e.d(r,{TechDocsPlugin:function(){return R.plugin}});var t=e(2784),c=e(47093),f=e(10289),R=e(82250),m=e(47955),a=e(49208),i=e(36964),u=e(68099);const y=[(0,i.createApiFactory)({api:i.discoveryApiRef,deps:{configApi:i.configApiRef},factory:({configApi:b})=>a.UrlPatternDiscovery.compile(`${b.getString("backend.baseUrl")}/api/{{ pluginId }}`)}),(0,i.createApiFactory)({api:i.alertApiRef,deps:{},factory:()=>new a.AlertApiForwarder}),(0,i.createApiFactory)({api:i.analyticsApiRef,deps:{},factory:()=>new a.NoOpAnalyticsApi}),(0,i.createApiFactory)({api:i.errorApiRef,deps:{alertApi:i.alertApiRef},factory:({alertApi:b})=>{const q=new a.ErrorAlerter(b,new a.ErrorApiForwarder);return a.UnhandledErrorForwarder.forward(q,{hidden:!1}),q}}),(0,i.createApiFactory)({api:i.storageApiRef,deps:{errorApi:i.errorApiRef},factory:({errorApi:b})=>a.WebStorage.create({errorApi:b})}),(0,i.createApiFactory)({api:i.fetchApiRef,deps:{configApi:i.configApiRef,identityApi:i.identityApiRef,discoveryApi:i.discoveryApiRef},factory:({configApi:b,identityApi:q,discoveryApi:fe})=>(0,a.createFetchApi)({middleware:[a.FetchMiddlewares.resolvePluginProtocol({discoveryApi:fe}),a.FetchMiddlewares.injectIdentityAuth({identityApi:q,config:b})]})}),(0,i.createApiFactory)({api:i.oauthRequestApiRef,deps:{},factory:()=>new a.OAuthRequestManager}),(0,i.createApiFactory)({api:i.googleAuthApiRef,deps:{discoveryApi:i.discoveryApiRef,oauthRequestApi:i.oauthRequestApiRef,configApi:i.configApiRef},factory:({discoveryApi:b,oauthRequestApi:q,configApi:fe})=>a.GoogleAuth.create({discoveryApi:b,oauthRequestApi:q,environment:fe.getOptionalString("auth.environment")})}),(0,i.createApiFactory)({api:i.microsoftAuthApiRef,deps:{discoveryApi:i.discoveryApiRef,oauthRequestApi:i.oauthRequestApiRef,configApi:i.configApiRef},factory:({discoveryApi:b,oauthRequestApi:q,configApi:fe})=>a.MicrosoftAuth.create({discoveryApi:b,oauthRequestApi:q,environment:fe.getOptionalString("auth.environment")})}),(0,i.createApiFactory)({api:i.githubAuthApiRef,deps:{discoveryApi:i.discoveryApiRef,oauthRequestApi:i.oauthRequestApiRef,configApi:i.configApiRef},factory:({discoveryApi:b,oauthRequestApi:q,configApi:fe})=>a.GithubAuth.create({discoveryApi:b,oauthRequestApi:q,defaultScopes:["read:user"],environment:fe.getOptionalString("auth.environment")})}),(0,i.createApiFactory)({api:i.oktaAuthApiRef,deps:{discoveryApi:i.discoveryApiRef,oauthRequestApi:i.oauthRequestApiRef,configApi:i.configApiRef},factory:({discoveryApi:b,oauthRequestApi:q,configApi:fe})=>a.OktaAuth.create({discoveryApi:b,oauthRequestApi:q,environment:fe.getOptionalString("auth.environment")})}),(0,i.createApiFactory)({api:i.gitlabAuthApiRef,deps:{discoveryApi:i.discoveryApiRef,oauthRequestApi:i.oauthRequestApiRef,configApi:i.configApiRef},factory:({discoveryApi:b,oauthRequestApi:q,configApi:fe})=>a.GitlabAuth.create({discoveryApi:b,oauthRequestApi:q,environment:fe.getOptionalString("auth.environment")})}),(0,i.createApiFactory)({api:i.oneloginAuthApiRef,deps:{discoveryApi:i.discoveryApiRef,oauthRequestApi:i.oauthRequestApiRef,configApi:i.configApiRef},factory:({discoveryApi:b,oauthRequestApi:q,configApi:fe})=>a.OneLoginAuth.create({discoveryApi:b,oauthRequestApi:q,environment:fe.getOptionalString("auth.environment")})}),(0,i.createApiFactory)({api:i.bitbucketAuthApiRef,deps:{discoveryApi:i.discoveryApiRef,oauthRequestApi:i.oauthRequestApiRef,configApi:i.configApiRef},factory:({discoveryApi:b,oauthRequestApi:q,configApi:fe})=>a.BitbucketAuth.create({discoveryApi:b,oauthRequestApi:q,defaultScopes:["team"],environment:fe.getOptionalString("auth.environment")})}),(0,i.createApiFactory)({api:i.atlassianAuthApiRef,deps:{discoveryApi:i.discoveryApiRef,oauthRequestApi:i.oauthRequestApiRef,configApi:i.configApiRef},factory:({discoveryApi:b,oauthRequestApi:q,configApi:fe})=>a.AtlassianAuth.create({discoveryApi:b,oauthRequestApi:q,environment:fe.getOptionalString("auth.environment")})}),(0,i.createApiFactory)({api:u.RV,deps:{discovery:i.discoveryApiRef,identity:i.identityApiRef,config:i.configApiRef},factory:({config:b,discovery:q,identity:fe})=>u.iM.create({config:b,discovery:q,identity:fe})})];var g=e(77277),v=e(53492),T=e(62833);function L({children:b}){return(0,f.GV)()?t.createElement(t.Fragment,null,b):t.createElement(f.VA,null,b)}const B=()=>t.createElement(v.ErrorPage,{status:"404",statusMessage:"PAGE NOT FOUND"}),k=({step:b,error:q})=>{let fe="";return b==="load-config"?fe=`The configuration failed to load, someone should have a look at this error: ${q.message}`:b==="load-chunk"&&(fe=`Lazy loaded chunk failed to load, try to reload the page: ${q.message}`),t.createElement(L,null,t.createElement(v.ErrorPage,{status:"501",statusMessage:fe}))},F=({error:b,resetError:q,plugin:fe})=>t.createElement(v.ErrorPanel,{title:`Error in ${fe==null?void 0:fe.getId()}`,defaultExpanded:!0,error:b},t.createElement(g.Z,{variant:"outlined",onClick:q},"Retry")),x={Progress:v.Progress,Router:T.VK,NotFoundErrorPage:B,BootErrorPage:k,ErrorBoundaryFallback:F};var M=e(43642),D=e(80079),P=e(90941),H=e(32915),K=e(40562),ce=e(21853),We=e(60744),Ze=e(66569),me=e(30254),je=e(13384),de=e(15933),Ce=e(58838),Ve=e(86737),Ke=e(4989),qe=e(44407),Re=e(18628),Fe=e(84219),Ue=e(98685),Ye=e(39781);const it={brokenImage:D.Z,catalog:Re.Z,scaffolder:H.Z,techdocs:K.Z,search:ce.Z,chat:We.Z,dashboard:Ze.Z,docs:me.Z,email:je.Z,github:Ce.Z,group:Fe.Z,help:Ve.Z,"kind:api":de.Z,"kind:component":qe.Z,"kind:domain":M.Z,"kind:group":Fe.Z,"kind:location":Ke.Z,"kind:system":P.Z,"kind:user":Ue.Z,user:Ue.Z,warning:Ye.Z};var Rt=e(73689),nt=e(48032);const ut={wave:`url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='1368' height='400' fill='none'%3e%3cmask id='a' width='1368' height='401' x='0' y='0' maskUnits='userSpaceOnUse'%3e%3cpath fill='url(%23paint0_linear)' d='M437 116C223 116 112 0 112 0h1256v400c-82 0-225-21-282-109-112-175-436-175-649-175z'/%3e%3cpath fill='url(%23paint1_linear)' d='M1368 400V282C891-29 788 40 711 161 608 324 121 372 0 361v39h1368z'/%3e%3cpath fill='url(%23paint2_linear)' d='M1368 244v156H0V94c92-24 198-46 375 0l135 41c176 51 195 109 858 109z'/%3e%3cpath fill='url(%23paint3_linear)' d='M1252 400h116c-14-7-35-14-116-16-663-14-837-128-1013-258l-85-61C98 28 46 8 0 0v400h1252z'/%3e%3c/mask%3e%3cg mask='url(%23a)'%3e%3cpath fill='white' d='M-172-98h1671v601H-172z'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient id='paint0_linear' x1='602' x2='1093.5' y1='-960.5' y2='272' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint1_linear' x1='482' x2='480' y1='1058.5' y2='70.5' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint2_linear' x1='424' x2='446.1' y1='-587.5' y2='274.6' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint3_linear' x1='587' x2='349' y1='-1120.5' y2='341' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e")`,wave2:`url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='1368' height='400' fill='none'%3e%3cmask id='a' width='1764' height='479' x='-229' y='-6' maskUnits='userSpaceOnUse'%3e%3cpath fill='url(%23paint0_linear)' d='M0 400h1350C1321 336 525 33 179-2c-345-34-395 236-408 402H0z'/%3e%3cpath fill='url(%23paint1_linear)' d='M1378 177v223H0V217s219 75 327 52C436 246 717-35 965 45s254 144 413 132z'/%3e%3cpath fill='url(%23paint2_linear)' d='M26 400l-78-16c-170 205-44-6-137-30l-4-1 4 1 137 30c37-45 89-110 159-201 399-514-45 238 1176-50 275-65 354-39 91 267H26z'/%3e%3c/mask%3e%3cg mask='url(%23a)'%3e%3cpath fill='white' d='M0 0h1368v400H0z'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient id='paint0_linear' x1='431' x2='397.3' y1='-599' y2='372.8' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint1_linear' x1='236.5' x2='446.6' y1='-586' y2='381.5' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint2_linear' x1='851.8' x2='640.4' y1='-867.2' y2='363.7' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e")`,round:`url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='1368' height='400' fill='none'%3e%3cmask id='a' width='2269' height='1408' x='-610' y='-509' maskUnits='userSpaceOnUse'%3e%3ccircle cx='1212.8' cy='74.8' r='317.5' fill='url(%23paint0_linear)' transform='rotate(-52 1213 75)'/%3e%3ccircle cx='737.8' cy='445.8' r='317.5' fill='url(%23paint1_linear)' transform='rotate(-116 738 446)'/%3e%3ccircle cx='601.8' cy='52.8' r='418.6' fill='url(%23paint2_linear)' transform='rotate(-117 602 53)'/%3e%3ccircle cx='999.8' cy='364' r='389.1' fill='url(%23paint3_linear)' transform='rotate(31 1000 364)'/%3e%3cellipse cx='-109.2' cy='263.5' fill='url(%23paint4_linear)' rx='429.2' ry='465.8' transform='rotate(-85 -109 264)'/%3e%3c/mask%3e%3cg mask='url(%23a)'%3e%3cpath fill='white' d='M0 0h1368v400H0z'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient id='paint0_linear' x1='1301.2' x2='161.4' y1='-1879.7' y2='-969.6' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint1_linear' x1='826.2' x2='-313.6' y1='-1508.7' y2='-598.6' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint2_linear' x1='718.4' x2='-784.3' y1='-2524' y2='-1324.2' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint3_linear' x1='1108.2' x2='-288.6' y1='-2031.1' y2='-915.9' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint4_linear' x1='10.4' x2='-1626.5' y1='-2603.8' y2='-1399.5' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e")`},tt={darkGrey:["#171717","#383838"],marineBlue:["#006D8F","#0049A1"],veryBlue:["#0027AF","#270094"],rubyRed:["#98002B","#8D1134"],toastyOrange:["#BE2200","#A41D00"],purpleSky:["#8912CA","#3E00EA"],eveningSea:["#00FFF2","#035355"],teal:["#005B4B"],pinkSea:["#C8077A","#C2297D"]};function rt(b,q){const Ie=`linear-gradient(90deg, ${(b.length===1?[b[0],b[0]]:b).join(", ")})`,ke=`${q}, ${Ie}`;return{colors:b,shape:q,backgroundImage:ke}}const Bt={home:rt(tt.teal,ut.wave),documentation:rt(tt.pinkSea,ut.wave2),tool:rt(tt.purpleSky,ut.round),service:rt(tt.marineBlue,ut.wave),website:rt(tt.veryBlue,ut.wave),library:rt(tt.rubyRed,ut.wave),other:rt(tt.darkGrey,ut.wave),app:rt(tt.toastyOrange,ut.wave),apis:rt(tt.teal,ut.wave2)},jt='"Helvetica Neue", Helvetica, Roboto, Arial, sans-serif';function Mt(b){const{palette:q,fontFamily:fe=jt,defaultPageTheme:Ie,pageTheme:ke=Bt}=b;if(!ke[Ie])throw new Error(`${Ie} is not defined in pageTheme.`);return{palette:q,props:{MuiGrid:{spacing:2},MuiSwitch:{color:"primary"}},typography:{fontFamily:fe,h5:{fontWeight:700},h4:{fontWeight:700,fontSize:28,marginBottom:6},h3:{fontSize:32,fontWeight:700,marginBottom:6},h2:{fontSize:40,fontWeight:700,marginBottom:8},h1:{fontSize:54,fontWeight:700,marginBottom:10}},page:ke[Ie],getPageTheme:({themeId:ft})=>{var A;return(A=ke[ft])!=null?A:ke[Ie]}}}function In(b){return{MuiCssBaseline:{"@global":{html:{height:"100%",fontFamily:b.typography.fontFamily},body:{height:"100%",fontFamily:b.typography.fontFamily,"overscroll-behavior-y":"none"},a:{color:"inherit",textDecoration:"none"}}},MuiTableRow:{root:{"&:nth-of-type(odd)":{backgroundColor:b.palette.background.default}},hover:{"&:hover":{cursor:"pointer"}},head:{"&:nth-of-type(odd)":{backgroundColor:b.palette.background.paper}}},MuiTableCell:{root:{wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:b.spacing(3,2,3,2.5),borderBottom:0},sizeSmall:{padding:b.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:b.palette.link,minHeight:24,textTransform:"initial",letterSpacing:"0.07em","&:hover":{color:(0,nt.darken)(b.palette.link,.3),background:(0,nt.lighten)(b.palette.link,.95)},[b.breakpoints.up("md")]:{minWidth:120,fontSize:b.typography.pxToRem(14),fontWeight:500}},textColorPrimary:{color:b.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:b.spacing(1),marginBottom:b.spacing(1),color:b.palette.grey[900]},outlined:{color:b.palette.text.primary},label:{lineHeight:`${b.spacing(2.5)}px`,fontWeight:b.typography.fontWeightMedium,fontSize:`${b.spacing(1.75)}px`},labelSmall:{fontSize:`${b.spacing(1.5)}px`},deleteIcon:{color:b.palette.grey[500],width:`${b.spacing(3)}px`,height:`${b.spacing(3)}px`,margin:`0 ${b.spacing(.75)}px 0 -${b.spacing(.75)}px`},deleteIconSmall:{width:`${b.spacing(2)}px`,height:`${b.spacing(2)}px`,margin:`0 ${b.spacing(.5)}px 0 -${b.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 Xt(b){const q=Mt(b),fe=(0,Rt.Z)(q),Ie=In(fe);return{...fe,overrides:Ie}}var yt=e(34505);const un=Xt({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:yt.Z.A700,navigation:{background:"#171717",indicator:"#9BF0E1",color:"#b5b5b5",selectedColor:"#FFF",navItem:{hoverBackground:"#404040"},submenu:{background:"#404040"}},pinSidebarButton:{icon:"#181818",background:"#BDBDBD"},tabbar:{indicator:"#9BF0E1"}},defaultPageTheme:"home",pageTheme:Bt}),se=Xt({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:yt.Z.A700,navigation:{background:"#424242",indicator:"#9BF0E1",color:"#b5b5b5",selectedColor:"#FFF",navItem:{hoverBackground:"#404040"},submenu:{background:"#404040"}},pinSidebarButton:{icon:"#404040",background:"#BDBDBD"},tabbar:{indicator:"#9BF0E1"}},defaultPageTheme:"home",pageTheme:Bt});var W=e(98192),ae=e(15222),ge=e(41547),ye=e(87561);const Oe=[{id:"light",title:"Light Theme",variant:"light",icon:t.createElement(ae.Z,null),Provider:({children:b})=>t.createElement(ge.Z,{theme:un},t.createElement(ye.ZP,null,b))},{id:"dark",title:"Dark Theme",variant:"dark",icon:t.createElement(W.Z,null),Provider:({children:b})=>t.createElement(ge.Z,{theme:se},t.createElement(ye.ZP,null,b))}];function ze(b){var q,fe,Ie;return(0,a.createSpecializedApp)({...b,apis:(q=b==null?void 0:b.apis)!=null?q:[],bindRoutes:b==null?void 0:b.bindRoutes,components:{...x,...b==null?void 0:b.components},configLoader:b==null?void 0:b.configLoader,defaultApis:y,icons:{...it,...b==null?void 0:b.icons},plugins:(fe=b==null?void 0:b.plugins)!=null?fe:[],themes:(Ie=b==null?void 0:b.themes)!=null?Ie:Oe})}var be=e(82394),_e=e.n(be),ct=e(48023),wt=e(76635);async function It({storageApi:b}){var ft;const q=b.forBucket("settings"),fe=b.forBucket("starredEntities"),Ie=q.snapshot("starredEntities").value;if(!(0,wt.isArray)(Ie))return;const ke=new Set((ft=fe.snapshot("entityRefs").value)!=null?ft:[]);Ie.filter(wt.isString).map(A=>A.split(":")).filter(A=>A.length===4&&A[0]==="entity").map(([A,C,O,Z])=>(0,ct.eE)({kind:C,namespace:O,name:Z})).forEach(A=>ke.add(A)),await fe.set("entityRefs",Array.from(ke)),await q.remove("starredEntities")}class lt{constructor(q){_(this,"settingsStore");_(this,"starredEntities");_(this,"subscribers",new Set);_(this,"observable",new(_e())(q=>(q.next(new Set(this.starredEntities)),this.subscribers.add(q),()=>{this.subscribers.delete(q)})));var fe;It(q).then(),this.settingsStore=q.storageApi.forBucket("starredEntities"),this.starredEntities=new Set((fe=this.settingsStore.snapshot("entityRefs").value)!=null?fe:[]),this.settingsStore.observe$("entityRefs").subscribe({next:Ie=>{var ke;this.starredEntities=new Set((ke=Ie.value)!=null?ke:[]),this.notifyChanges()}})}async toggleStarred(q){this.starredEntities.has(q)?this.starredEntities.delete(q):this.starredEntities.add(q),await this.settingsStore.set("entityRefs",Array.from(this.starredEntities))}starredEntitie$(){return this.observable}notifyChanges(){for(const q of this.subscribers)q.next(new Set(this.starredEntities))}}var Tt=e(39398),qt=e(49782),re=e(79692),ue=e(73624);const Q=(0,re.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",wordBreak:"break-all",marginBottom:"1rem"}});function pe(b){var Ie,ke;const q=b.result,fe=Q();return React.createElement(Link,{to:q.location},React.createElement(ListItem,{alignItems:"flex-start",className:fe.flexContainer},React.createElement(ListItemText,{className:fe.itemText,primaryTypographyProps:{variant:"h6"},primary:(Ie=b.highlight)!=null&&Ie.fields.title?React.createElement(HighlightedSearchResultText,{text:b.highlight.fields.title,preTag:b.highlight.preTag,postTag:b.highlight.postTag}):q.title,secondary:(ke=b.highlight)!=null&&ke.fields.text?React.createElement(HighlightedSearchResultText,{text:b.highlight.fields.text,preTag:b.highlight.preTag,postTag:b.highlight.postTag}):q.text}),React.createElement(Box,null,q.kind&&React.createElement(Chip,{label:`Kind: ${q.kind}`,size:"small"}),q.lifecycle&&React.createElement(Chip,{label:`Lifecycle: ${q.lifecycle}`,size:"small"}))),React.createElement(Divider,{component:"li"}))}var ie=e(30097),Be=e(53479),J=e(95544),N=e(99688),te=e(12231),Pe=e(86136),De=e(49378),we=e(85256),Ne=e(61837),ht=e(79784),Lt=e(50758),Et=e(49166),Ut=e(31654),dt=e(43054),gt=e(40749);const Qe="catalog-entity",Ot=(0,gt.J$)({name:"catalog.entity.read",attributes:{action:"read"},resourceType:Qe}),nn=(0,gt.J$)({name:"catalog.entity.create",attributes:{action:"create"}}),bt=(0,gt.J$)({name:"catalog.entity.delete",attributes:{action:"delete"},resourceType:Qe}),at=(0,gt.J$)({name:"catalog.entity.refresh",attributes:{action:"update"},resourceType:Qe}),pt=(0,gt.J$)({name:"catalog.location.read",attributes:{action:"read"}}),Nt=(0,gt.J$)({name:"catalog.location.create",attributes:{action:"create"}}),Vt=(0,gt.J$)({name:"catalog.location.delete",attributes:{action:"delete"}}),rn=(0,re.Z)({button:{color:"white"}});function Zt(b){var ve;const{UNSTABLE_extraContextMenuItems:q,UNSTABLE_contextMenuOptions:fe,onUnregisterEntity:Ie,onInspectEntity:ke}=b,[ft,A]=(0,t.useState)(),C=rn(),O=(0,Be.useEntityPermission)(bt),Z=Le=>{A(Le.currentTarget)},V=()=>{A(void 0)},Y=q&&[...q.map(Le=>t.createElement(te.Z,{key:Le.title,onClick:()=>{V(),Le.onClick()}},t.createElement(Pe.Z,null,t.createElement(Le.Icon,{fontSize:"small"})),t.createElement(De.Z,{primary:Le.title}))),t.createElement(we.Z,{key:"the divider is here!"})],le=(ve=!O.allowed||(fe==null?void 0:fe.disableUnregister))!=null?ve:!1;return t.createElement(t.Fragment,null,t.createElement(Ne.Z,{"aria-label":"more","aria-controls":"long-menu","aria-haspopup":"true","aria-expanded":!!ft,role:"button",onClick:Z,"data-testid":"menu-button",className:C.button,id:"long-menu"},t.createElement(dt.Z,null)),t.createElement(ht.ZP,{open:Boolean(ft),onClose:V,anchorEl:ft,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},"aria-labelledby":"long-menu"},t.createElement(Lt.Z,null,Y,t.createElement(te.Z,{onClick:()=>{V(),Ie()},disabled:le},t.createElement(Pe.Z,null,t.createElement(Et.Z,{fontSize:"small"})),t.createElement(De.Z,{primary:"Unregister entity"})),t.createElement(te.Z,{onClick:()=>{V(),ke()}},t.createElement(Pe.Z,null,t.createElement(Ut.Z,{fontSize:"small"})),t.createElement(De.Z,{primary:"Inspect entity"})))))}const Kt="plugin.catalog.entityLayoutRoute",zt=()=>null;(0,i.attachComponentData)(zt,Kt,!0),(0,i.attachComponentData)(zt,"core.gatherMountPoints",!0);function kt(b){const{entity:q,title:fe}=b;return t.createElement(J.Z,{display:"inline-flex",alignItems:"center",height:"1em",maxWidth:"100%"},t.createElement(J.Z,{component:"span",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},fe),q&&t.createElement(Be.FavoriteEntity,{entity:q}))}function xt(b,q,fe,Ie){var C,O,Z,V,Y;const ke=(C=b!=null?b:Ie==null?void 0:Ie.kind)!=null?C:"",ft=(O=q!=null?q:Ie==null?void 0:Ie.metadata.namespace)!=null?O:"";return{headerTitle:`${(Y=(V=(Z=Ie==null?void 0:Ie.metadata.title)!=null?Z:fe)!=null?V:Ie==null?void 0:Ie.metadata.name)!=null?Y:""}${ft&&ft!==ct.zG?` in ${ft}`:""}`,headerType:(()=>{let le=ke.toLocaleLowerCase("en-US");return Ie&&Ie.spec&&"type"in Ie.spec&&(le+=" \u2014 ",le+=Ie.spec.type.toLocaleLowerCase("en-US")),le})()}}function _t(b){var Ie;const{entity:q}=b,fe=(0,Be.getEntityRelations)(q,ct.S4);return t.createElement(t.Fragment,null,fe.length>0&&t.createElement(v.HeaderLabel,{label:"Owner",value:t.createElement(Be.EntityRefLinks,{entityRefs:fe,defaultKind:"Group",color:"inherit"})}),((Ie=q.spec)==null?void 0:Ie.lifecycle)&&t.createElement(v.HeaderLabel,{label:"Lifecycle",value:q.spec.lifecycle}))}const Un=b=>{var Ge,vt,Dt;const{UNSTABLE_extraContextMenuItems:q,UNSTABLE_contextMenuOptions:fe,children:Ie,NotFoundComponent:ke}=b,{kind:ft,namespace:A,name:C}=(0,i.useRouteRefParams)(Be.entityRouteRef),{entity:O,loading:Z,error:V}=(0,Be.useAsyncEntity)(),Y=(0,f.TH)(),le=(0,i.useElementFilter)(Ie,xn=>xn.selectByComponentData({key:Kt,withStrictError:"Child of EntityLayout must be an EntityLayout.Route"}).getElements().flatMap(({props:Yt})=>{if(O){if(Yt.if&&!Yt.if(O))return[]}else return[];return[{path:Yt.path,title:Yt.title,children:Yt.children,tabProps:Yt.tabProps}]}),[O]),{headerTitle:ve,headerType:Le}=xt(ft,A,C,O),[xe,Te]=(0,t.useState)(!1),[$e,He]=(0,t.useState)(!1),mt=(0,f.s0)(),Xe=async()=>{Te(!1),He(!1),mt("/")};return(0,t.useEffect)(()=>{Te(!1),He(!1)},[Y.pathname]),t.createElement(v.Page,{themeId:(Dt=(vt=(Ge=O==null?void 0:O.spec)==null?void 0:Ge.type)==null?void 0:vt.toString())!=null?Dt:"home"},t.createElement(v.Header,{title:t.createElement(kt,{title:ve,entity:O}),pageTitleOverride:ve,type:Le},O&&t.createElement(t.Fragment,null,t.createElement(_t,{entity:O}),t.createElement(Zt,{UNSTABLE_extraContextMenuItems:q,UNSTABLE_contextMenuOptions:fe,onUnregisterEntity:()=>Te(!0),onInspectEntity:()=>He(!0)}))),Z&&t.createElement(v.Progress,null),O&&t.createElement(v.RoutedTabs,{routes:le}),V&&t.createElement(v.Content,null,t.createElement(N.Z,{severity:"error"},V.toString())),!Z&&!V&&!O&&t.createElement(v.Content,null,ke||t.createElement(v.WarningPanel,{title:"Entity not found"},"There is no ",ft," with the requested"," ",t.createElement(v.Link,{to:"https://backstage.io/docs/features/software-catalog/references"},"kind, namespace, and name"),".")),t.createElement(Be.UnregisterEntityDialog,{open:xe,entity:O,onConfirm:Xe,onClose:()=>Te(!1)}),t.createElement(Be.InspectEntityDialog,{open:$e,entity:O,onClose:()=>He(!1)}))};Un.Route=zt;var Ln=e(10179);function Mn(b){const{open:q,onClose:fe,onConfirm:Ie,entity:ke}=b,[ft,A]=useState(!1),C=useApi(catalogApiRef),O=useApi(alertApiRef),Z=async()=>{A(!0);try{const V=ke.metadata.uid;await C.removeEntityByUid(V),Ie()}catch(V){assertError(V),O.post({message:V.message})}finally{A(!1)}};return React.createElement(Dialog,{open:q,onClose:fe},React.createElement(DialogTitle,{id:"responsive-dialog-title"},"Are you sure you want to delete this entity?"),React.createElement(DialogActions,null,React.createElement(Button,{variant:"contained",color:"secondary",disabled:ft,onClick:Z},"Delete"),React.createElement(Button,{onClick:fe,color:"primary"},"Cancel")))}var Rn=e(47851);function Nn(b){var q,fe;return((fe=(q=b==null?void 0:b.metadata)==null?void 0:q.annotations)==null?void 0:fe["backstage.io/orphan"])==="true"}function Xn(){const b=useNavigate(),q=useRouteRef(rootRouteRef),[fe,Ie]=useState(!1),{entity:ke}=useEntity(),ft=async()=>{Ie(!1),b(q())};return React.createElement(React.Fragment,null,React.createElement(Alert,{severity:"warning",onClick:()=>Ie(!0)},"This entity is not referenced by any location and is therefore not receiving updates. Click here to delete."),React.createElement(DeleteEntityDialog,{open:fe,entity:ke,onConfirm:ft,onClose:()=>Ie(!1)}))}var Zn=e(30001);const zn=b=>b.error&&b.level==="error"&&b.type===ENTITY_STATUS_CATALOG_PROCESSING_TYPE;async function $(b,q){return{items:(await q.getEntityAncestors({entityRef:b})).items.map(ke=>{var C,O;return{errors:((O=(C=ke.entity.status)==null?void 0:C.items)!=null?O:[]).filter(zn).map(Z=>Z.error).filter(Z=>Boolean(Z)),entity:ke.entity}}).filter(ke=>ke.errors.length>0)}}async function h(b,q){const fe=q.apis.get(catalogApiRef);if(!fe)throw new Error(`No implementation available for ${catalogApiRef}`);return(await $(stringifyEntityRef(b),fe)).items.length>0}function S(){const{entity:b}=useEntity(),q=stringifyEntityRef(b),fe=useApi(catalogApiRef),{loading:Ie,error:ke,value:ft}=useAsync(async()=>$(q,fe),[q,fe]);return ke?React.createElement(Box,{mb:1},React.createElement(ResponseErrorPanel,{error:ke})):Ie||!ft?null:React.createElement(React.Fragment,null,ft.items.map((A,C)=>React.createElement(Box,{key:C,mb:1},stringifyEntityRef(b)!==stringifyEntityRef(A.entity)&&React.createElement(Box,{p:1},"The error below originates from"," ",React.createElement(EntityRefLink,{entityRef:A.entity})),A.errors.map((O,Z)=>React.createElement(ResponseErrorPanel,{key:Z,error:O})))))}var w=e(64279);const j="core.backstage.entitySwitch",he=b=>null;(0,i.attachComponentData)(he,j,!0);const oe=b=>{var A,C;const{entity:q,loading:fe}=(0,Be.useAsyncEntity)(),Ie=(0,i.useApiHolder)(),ke=(0,i.useElementFilter)(b.children,O=>O.selectByComponentData({key:j,withStrictError:"Child of EntitySwitch is not an EntitySwitch.Case"}).getElements().flatMap(Z=>{var le;if(fe)return[];const{if:V,children:Y}=Z.props;return q?[{if:(le=V==null?void 0:V(q,{apis:Ie}))!=null?le:!0,children:Y}]:[{if:V===void 0,children:Y}]}),[Ie,q,fe]);return ke.some(O=>typeof O.if=="object"&&"then"in O.if)?t.createElement(Me,{results:ke}):(C=(A=ke.find(O=>O.if))==null?void 0:A.children)!=null?C:null};function Me({results:b}){const{loading:q,value:fe}=(0,w.default)(async()=>{var ke;const Ie=b.map(async({if:ft,children:A})=>{try{if(await ft)return A}catch{}return null});return(ke=(await Promise.all(Ie)).find(Boolean))!=null?ke:null},[b]);return q||!fe?null:fe}oe.Case=he;const et=null,Ft=Be.CatalogFilterLayout.Filters,dn=Be.CatalogFilterLayout.Content,$t=(0,i.createPlugin)({id:"catalog",apis:[(0,i.createApiFactory)({api:Be.catalogApiRef,deps:{discoveryApi:i.discoveryApiRef,fetchApi:i.fetchApiRef},factory:({discoveryApi:b,fetchApi:q})=>new Zn.MS({discoveryApi:b,fetchApi:q})}),(0,i.createApiFactory)({api:Be.starredEntitiesApiRef,deps:{storageApi:i.storageApiRef},factory:({storageApi:b})=>new lt({storageApi:b})})],routes:{catalogIndex:Rn._Z,catalogEntity:Be.entityRouteRef},externalRoutes:{createComponent:Rn.yw,viewTechDoc:Rn.jU}}),Ur=$t.provide((0,i.createRoutableExtension)({name:"CatalogIndexPage",component:()=>e.e(7758).then(e.bind(e,7758)).then(b=>b.CatalogPage),mountPoint:Rn._Z})),Gn=$t.provide((0,i.createRoutableExtension)({name:"CatalogEntityPage",component:()=>e.e(6583).then(e.bind(e,96583)).then(b=>b.CatalogEntityPage),mountPoint:Be.entityRouteRef})),Nr=$t.provide((0,i.createComponentExtension)({name:"EntityAboutCard",component:{lazy:()=>Promise.resolve().then(e.bind(e,39398)).then(b=>b.AboutCard)}})),sr=$t.provide((0,i.createComponentExtension)({name:"EntityLinksCard",component:{lazy:()=>e.e(1959).then(e.bind(e,81959)).then(b=>b.EntityLinksCard)}})),Zr=$t.provide((0,i.createComponentExtension)({name:"EntityHasSystemsCard",component:{lazy:()=>e.e(390).then(e.bind(e,60390)).then(b=>b.HasSystemsCard)}})),zr=$t.provide((0,i.createComponentExtension)({name:"EntityHasComponentsCard",component:{lazy:()=>e.e(4022).then(e.bind(e,4022)).then(b=>b.HasComponentsCard)}})),wn=$t.provide((0,i.createComponentExtension)({name:"EntityHasSubcomponentsCard",component:{lazy:()=>e.e(8792).then(e.bind(e,38792)).then(b=>b.HasSubcomponentsCard)}})),On=$t.provide((0,i.createComponentExtension)({name:"EntityHasResourcesCard",component:{lazy:()=>e.e(1553).then(e.bind(e,11553)).then(b=>b.HasResourcesCard)}})),Kn=$t.provide((0,i.createComponentExtension)({name:"EntityDependsOnComponentsCard",component:{lazy:()=>e.e(8061).then(e.bind(e,48061)).then(b=>b.DependsOnComponentsCard)}})),ir=$t.provide((0,i.createComponentExtension)({name:"EntityDependencyOfComponentsCard",component:{lazy:()=>e.e(6235).then(e.bind(e,56235)).then(b=>b.DependencyOfComponentsCard)}})),yr=$t.provide((0,i.createComponentExtension)({name:"EntityDependsOnResourcesCard",component:{lazy:()=>e.e(9028).then(e.bind(e,59028)).then(b=>b.DependsOnResourcesCard)}})),Wr=$t.provide((0,i.createComponentExtension)({name:"RelatedEntitiesCard",component:{lazy:()=>e.e(2426).then(e.bind(e,62426)).then(b=>b.RelatedEntitiesCard)}}));var kn=e(36356);class Er{constructor({configApi:q,discoveryApi:fe,identityApi:Ie}){_(this,"configApi");_(this,"discoveryApi");_(this,"identityApi");this.configApi=q,this.discoveryApi=fe,this.identityApi=Ie}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(q,fe){const ke=`${await this.getApiOrigin()}/${fe}`,ft=await fetch(`${ke.endsWith("/")?ke:`${ke}/`}index.html`);if(ft.status===404)throw new Error("Page not found");return ft.text()}async syncEntityDocs(q){return"cached"}async getBaseUrl(q,fe,Ie){const ke=await this.getApiOrigin();return new URL(q,`${ke}/${Ie}`).toString()}}class Hr{constructor({configApi:q,discoveryApi:fe,identityApi:Ie}){_(this,"configApi");_(this,"discoveryApi");_(this,"identityApi");this.configApi=q,this.discoveryApi=fe,this.identityApi=Ie}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getEntityMetadata(q){return{apiVersion:"backstage.io/v1alpha1",kind:"Component",metadata:{name:"local"},spec:{owner:"test",lifecycle:"experimental"}}}async getTechDocsMetadata(q){return{site_name:"Live preview environment",site_description:""}}}const qn=[(0,i.createApiFactory)({api:m.Dl,deps:{configApi:i.configApiRef,discoveryApi:i.discoveryApiRef,identityApi:i.identityApiRef},factory:({configApi:b,discoveryApi:q,identityApi:fe})=>new Er({configApi:b,discoveryApi:q,identityApi:fe})}),(0,i.createApiFactory)({api:m.gT,deps:{configApi:i.configApiRef,discoveryApi:i.discoveryApiRef,identityApi:i.identityApiRef},factory:({configApi:b,discoveryApi:q,identityApi:fe})=>new Hr({configApi:b,discoveryApi:q,identityApi:fe})}),(0,i.createApiFactory)({api:kn.q3,deps:{configApi:i.configApiRef},factory:({configApi:b})=>kn.ae.fromConfig(b)})],hn={backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}},_n={backend:{baseUrl:"http://localhost:7007"},techdocs:{builder:"external"}};async function er(){const b=await fetch("/.detect");return b.ok?(await b.text()).trim()==="techdocs-cli-server":!1}async function tr(){const b=await(0,a.defaultConfigLoader)(),q=await er();return[...b,{context:"detected",data:q?hn:_n}]}var vr=e(86689),Ar=e(58845);const Rr=(0,re.Z)({svg:{width:"auto",height:30},path:{fill:"#7df3e1"}});var Sr=()=>{const b=Rr();return t.createElement("svg",{className:b.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 2079.95 456.05"},t.createElement("path",{className:b.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 Cr=(0,re.Z)({svg:{width:"auto",height:28},path:{fill:"#7df3e1"}});var br=()=>{const b=Cr();return t.createElement("svg",{className:b.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 337.46 428.5"},t.createElement("path",{className:b.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 Pr=(0,re.Z)({root:{width:v.sidebarConfig.drawerWidthClosed,height:3*v.sidebarConfig.logoHeight,display:"flex",flexFlow:"row nowrap",alignItems:"center",marginBottom:-14},link:{width:v.sidebarConfig.drawerWidthClosed,marginLeft:24}}),cr=()=>{const b=Pr(),{isOpen:q}=(0,t.useContext)(v.SidebarContext);return t.createElement("div",{className:b.root},t.createElement(vr.Z,{component:T.OL,to:"/docs/default/component/local/",underline:"none",className:b.link},q?t.createElement(Sr,null):t.createElement(br,null)))},Ir=({children:b})=>t.createElement(v.SidebarPage,null,t.createElement(v.Sidebar,null,t.createElement(cr,null),t.createElement(v.SidebarDivider,null),t.createElement(v.SidebarItem,{icon:Ar.Z,to:"/docs/default/component/local",text:"Docs Preview"})),b);var ur=e(80030),on=e(32388),Sn=e(4142);const Lr=(0,re.Z)(b=>({headerIcon:{color:b.palette.common.white,width:"32px",height:"32px"},content:{backgroundColor:b.palette.background.default},contentToolbar:{display:"flex",justifyContent:"flex-end",padding:0}}));var gn;(function(b){const q="light";b.LIGHT=q;const fe="dark";b.DARK=fe})(gn||(gn={}));const Wn=()=>{const b=(0,i.useApi)(i.appThemeApiRef),q=Lr(),[fe,Ie]=(0,t.useState)(b.getActiveThemeId()||gn.LIGHT),ke={[gn.LIGHT]:{icon:Sn.Z,title:"Dark theme"},[gn.DARK]:{icon:on.Z,title:"Light theme"}},{title:ft,icon:A}=ke[fe],C=()=>{Ie(O=>{const Z=O===gn.LIGHT?gn.DARK:gn.LIGHT;return b.setActiveThemeId(Z),Z})};return t.createElement(J.Z,{display:"flex",alignItems:"center",mr:2},t.createElement(ur.ZP,{title:ft,arrow:!0},t.createElement(Ne.Z,{size:"small",onClick:C},t.createElement(A,{className:q.headerIcon}))))},Hn=()=>t.createElement(R.TechDocsReaderPage,null,t.createElement(R.TechDocsReaderPageHeader,null),t.createElement(R.TechDocsReaderPageContent,{withSearch:!1})),Or=t.createElement(Hn,null),dr=ze({apis:qn,configLoader:tr,plugins:Object.values(r)}),xr=dr.getProvider(),nr=dr.getRouter(),Yn=R.techdocsPlugin.provide((0,m.KY)({name:"ThemeToggleAddon",component:Wn,location:m.oZ.Header})),jr=t.createElement(a.FlatRoutes,null,t.createElement(f.Fg,{key:"/",to:"/docs/default/component/local/"}),t.createElement(f.AW,{path:"/catalog/:namespace/:kind/:name",element:t.createElement(Gn,null)}),t.createElement(f.AW,{path:"/docs",element:t.createElement(R.TechDocsIndexPage,null)},t.createElement(R.DefaultTechDocsHome,null)),t.createElement(f.AW,{path:"/docs/:namespace/:kind/:name/*",element:t.createElement(R.TechDocsReaderPage,null)},Or,t.createElement(m.DR,null,t.createElement(Yn,null))));var fr=()=>t.createElement(xr,null,t.createElement(nr,null,t.createElement(Ir,null,jr)));c.render(t.createElement(fr,null),document.getElementById("root"))},76241:function(ee,s,e){"use strict";e.d(s,{CT:function(){return m},EI:function(){return u},uW:function(){return f},Vt:function(){return a}});function r(){return typeof window!="undefined"&&window.Math===Math?window:typeof self!="undefined"&&self.Math===Math?self:Function("return this")()}const t=r(),c=y=>`__@backstage/${y}__`;function f(y,g){const v=c(y);let T=t[v];return T||(T=g(),t[v]=T,T)}var R=e(2784);function m(y){return f(y,()=>(0,R.createContext)(void 0))}function a(y){return(0,R.useContext)(m(y))}function i(y){return{set(g){globalThis[`__@backstage/${y}__`]=createContext(createVersionedValueMap(g))},reset(){delete globalThis[`__@backstage/${y}__`]}}}function u(y){return Object.freeze(y),{atVersion(g){return y[g]}}}},53479:function(ee,s,e){"use strict";e.d(s,{AsyncEntityProvider:function(){return P},CATALOG_FILTER_EXISTS:function(){return r.n3},CatalogFilterLayout:function(){return x},EntityKindFilter:function(){return ae},EntityLifecyclePicker:function(){return dt},EntityListProvider:function(){return Rt},EntityOwnerPicker:function(){return nn},EntityRefLink:function(){return se},EntityRefLinks:function(){return W},EntityTable:function(){return Zt},EntityTagPicker:function(){return xt},EntityTypePicker:function(){return Ln},FavoriteEntity:function(){return zn},InspectEntityDialog:function(){return Or},UnregisterEntityDialog:function(){return Vr},UserListPicker:function(){return ke},catalogApiRef:function(){return c},entityRouteRef:function(){return Mt},getEntityRelations:function(){return Fe},getEntitySourceLocation:function(){return Ue},humanizeEntityRef:function(){return Xt},starredEntitiesApiRef:function(){return f},useAsyncEntity:function(){return ce},useEntity:function(){return K},useEntityList:function(){return nt},useEntityOwnership:function(){return Q},useEntityPermission:function(){return ie},useRelatedEntities:function(){return It},useStarredEntities:function(){return qt}});var r=e(30001),t=e(36964);const c=(0,t.createApiRef)({id:"plugin.catalog.service"}),f=(0,t.createApiRef)({id:"catalog-react.starred-entities"});var R=e(82394);class m{constructor(){_(this,"starredEntities",new Set);_(this,"subscribers",new Set);_(this,"observable",new ObservableImpl(C=>(C.next(new Set(this.starredEntities)),this.subscribers.add(C),()=>{this.subscribers.delete(C)})))}async toggleStarred(C){this.starredEntities.delete(C)||this.starredEntities.add(C);for(const O of this.subscribers)O.next(new Set(this.starredEntities))}starredEntitie$(){return this.observable}}var a=e(2784),i=e(41156),u=e(60364),y=e(77277),g=e(4190),v=e(95544),T=e(90436),L=e(60905),B=e(36444);const k=A=>{const C=(0,i.Z)(Y=>Y.breakpoints.down("md")),O=(0,u.Z)(),[Z,V]=(0,a.useState)(!1);return C?a.createElement(a.Fragment,null,a.createElement(y.Z,{style:{marginTop:O.spacing(1),marginLeft:O.spacing(1)},onClick:()=>V(!0),startIcon:a.createElement(B.Z,null)},"Filters"),a.createElement(g.ZP,{open:Z,onClose:()=>V(!1),anchor:"left",disableAutoFocus:!0,keepMounted:!0,variant:"temporary"},a.createElement(v.Z,{m:2},a.createElement(T.Z,{variant:"h6",component:"h2",style:{marginBottom:O.spacing(1)}},"Filters"),A.children))):a.createElement(L.Z,{item:!0,lg:2},A.children)},F=A=>a.createElement(L.Z,{item:!0,xs:12,lg:10},A.children),x=A=>a.createElement(L.Z,{container:!0,style:{position:"relative"}},A.children);x.Filters=k,x.Content=F;var M=e(76241);const D=(0,M.CT)("entity-context"),P=({children:A,entity:C,loading:O,error:Z,refresh:V})=>{const Y={entity:C,loading:O,error:Z,refresh:V};return a.createElement(D.Provider,{value:(0,M.EI)({1:Y})},A)},H=A=>React.createElement(P,{entity:A.entity,loading:!Boolean(A.entity),error:void 0,refresh:void 0,children:A.children});function K(){const A=(0,M.Vt)("entity-context");if(!A)throw new Error("Entity context is not available");const C=A.atVersion(1);if(!C)throw new Error("EntityContext v1 not available");if(!C.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:C.entity}}function ce(){const A=(0,M.Vt)("entity-context");if(!A)throw new Error("Entity context is not available");const C=A.atVersion(1);if(!C)throw new Error("EntityContext v1 not available");const{entity:O,loading:Z,error:V,refresh:Y}=C;return{entity:O,loading:Z,error:V,refresh:Y}}var We=e(76635),Ze=e(19126),me=e.n(Ze),je=e(10289),de=e(69294),Ce=e(48760),Ve=e(90736);function Ke(A){return A.reduce((C,O)=>({...C,...O.getCatalogFilters?O.getCatalogFilters():{}}),{})}function qe(A){return C=>A.every(O=>!O.filterEntity||O.filterEntity(C))}var Re=e(48023);function Fe(A,C,O){var V;let Z=((V=A==null?void 0:A.relations)==null?void 0:V.filter(Y=>Y.type===C).map(Y=>(0,Re.of)(Y.targetRef)))||[];return O!=null&&O.kind&&(Z=Z.filter(Y=>Y.kind.toLocaleLowerCase("en-US")===O.kind.toLocaleLowerCase("en-US"))),Z}function Ue(A,C){var Z;const O=(Z=A.metadata.annotations)==null?void 0:Z[Re.M6];if(!!O)try{const V=(0,Re.Ou)(O),Y=C.byUrl(V.target);return{locationTargetUrl:V.target,integrationType:Y==null?void 0:Y.type}}catch{return}}function Ye(A,C){const O=new Set([...getEntityRelations(A,RELATION_MEMBER_OF,{kind:"group"}),...A?[getCompoundEntityRef(A)]:[]].map(stringifyEntityRef)),Z=getEntityRelations(C,RELATION_OWNED_BY).map(stringifyEntityRef);for(const V of Z)if(O.has(V))return!0;return!1}const it=(0,a.createContext)(void 0),Rt=({children:A})=>{const C=(0,Ve.default)(),O=(0,t.useApi)(c),[Z,V]=(0,a.useState)({}),Y=(0,je.TH)(),le=(0,a.useMemo)(()=>{var Xe;return(Xe=me().parse(Y.search,{ignoreQueryPrefix:!0}).filters)!=null?Xe:{}},[Y]),[ve,Le]=(0,a.useState)(()=>({appliedFilters:{},entities:[],backendEntities:[]})),[{loading:xe,error:Te},$e]=(0,de.default)(async()=>{var Yt;const Xe=(0,We.compact)(Object.values(Z)),Ge=qe(Xe),vt=Ke(Xe),Dt=Ke((0,We.compact)(Object.values(ve.appliedFilters))),xn=Object.keys(Z).reduce((sn,fn)=>{const pn=Z[fn];return pn!=null&&pn.toQueryValue&&(sn[fn]=pn.toQueryValue()),sn},{});if((0,We.isEqual)(Dt,vt))Le({appliedFilters:Z,backendEntities:ve.backendEntities,entities:ve.backendEntities.filter(Ge)});else{const sn=await O.getEntities({filter:vt});Le({appliedFilters:Z,backendEntities:sn.items,entities:sn.items.filter(Ge)})}if(C()){const sn=me().parse(Y.search,{ignoreQueryPrefix:!0}),fn=me().stringify({...sn,filters:xn},{addQueryPrefix:!0,arrayFormat:"repeat"}),pn=`${window.location.pathname}${fn}`;(Yt=window.history)==null||Yt.replaceState(null,document.title,pn)}},[O,le,Z,ve],{loading:!0});(0,Ce.Z)($e,10,[Z]);const He=(0,a.useCallback)(Xe=>{V(Ge=>{const vt=typeof Xe=="function"?Xe(Ge):Xe;return{...Ge,...vt}})},[]),mt=(0,a.useMemo)(()=>({filters:ve.appliedFilters,entities:ve.entities,backendEntities:ve.backendEntities,updateFilters:He,queryParameters:le,loading:xe,error:Te}),[ve,He,le,xe,Te]);return a.createElement(it.Provider,{value:mt},A)};function nt(){const A=(0,a.useContext)(it);if(!A)throw new Error("useEntityList must be used within EntityListProvider");return A}var ut=e(64279),tt=e(18149),rt=e.n(tt),Bt=e(829),jt=e.n(Bt);const Mt=(0,M.uW)("catalog:entity-route-ref",()=>(0,t.createRouteRef)({id:"catalog:entity",params:["namespace","kind","name"]}));function In(A){var C,O;return{kind:A.kind.toLocaleLowerCase("en-US"),namespace:(O=(C=A.metadata.namespace)==null?void 0:C.toLocaleLowerCase("en-US"))!=null?O:DEFAULT_NAMESPACE,name:A.metadata.name}}function Xt(A,C){const O=C==null?void 0:C.defaultKind;let Z,V,Y;return"metadata"in A?(Z=A.kind,V=A.metadata.namespace,Y=A.metadata.name):(Z=A.kind,V=A.namespace,Y=A.name),V===Re.zG&&(V=void 0),Z=Z.toLocaleLowerCase("en-US"),Z=O&&O.toLocaleLowerCase("en-US")===Z?void 0:Z,`${Z?`${Z}:`:""}${V?`${V}/`:""}${Y}`}var yt=e(53492),un=e(80030);const se=(0,a.forwardRef)((A,C)=>{var Xe;const{entityRef:O,defaultKind:Z,title:V,children:Y,...le}=A,ve=(0,t.useRouteRef)(Mt);let Le,xe,Te;if(typeof O=="string"){const Ge=(0,Re.of)(O);Le=Ge.kind,xe=Ge.namespace,Te=Ge.name}else"metadata"in O?(Le=O.kind,xe=O.metadata.namespace,Te=O.metadata.name):(Le=O.kind,xe=O.namespace,Te=O.name);Le=Le.toLocaleLowerCase("en-US"),xe=(Xe=xe==null?void 0:xe.toLocaleLowerCase("en-US"))!=null?Xe:Re.zG;const $e={kind:Le,namespace:xe,name:Te},He=Xt({kind:Le,namespace:xe,name:Te},{defaultKind:Z}),mt=a.createElement(yt.Link,{...le,ref:C,to:ve($e)},Y,!Y&&(V!=null?V:He));return V?a.createElement(un.ZP,{title:He},mt):mt});function W(A){const{entityRefs:C,defaultKind:O,...Z}=A;return a.createElement(a.Fragment,null,C.map((V,Y)=>a.createElement(a.Fragment,{key:Y},Y>0&&", ",a.createElement(se,{...Z,entityRef:V,defaultKind:O}))))}class ae{constructor(C){this.value=C}getCatalogFilters(){return{kind:this.value}}toQueryValue(){return this.value}}class ge{constructor(C){this.value=C}getTypes(){return Array.isArray(this.value)?this.value:[this.value]}getCatalogFilters(){return{"spec.type":this.getTypes()}}toQueryValue(){return this.getTypes()}}class ye{constructor(C){this.values=C}filterEntity(C){return this.values.every(O=>{var Z;return((Z=C.metadata.tags)!=null?Z:[]).includes(O)})}toQueryValue(){return this.values}}class Oe{constructor(C){this.value=C}filterEntity(C){var Z;const O=this.value.toLocaleUpperCase("en-US");return C.metadata.name.toLocaleUpperCase("en-US").includes(O)||`${C.metadata.title}`.toLocaleUpperCase("en-US").includes(O)||((Z=C.metadata.tags)==null?void 0:Z.join("").toLocaleUpperCase("en-US").indexOf(O))!==-1}}class ze{constructor(C){this.values=C}filterEntity(C){return this.values.some(O=>Fe(C,Re.S4).some(Z=>Xt(Z,{defaultKind:"group"})===O))}toQueryValue(){return this.values}}class be{constructor(C){this.values=C}filterEntity(C){return this.values.some(O=>{var Z;return((Z=C.spec)==null?void 0:Z.lifecycle)===O})}toQueryValue(){return this.values}}class _e{constructor(C,O,Z){this.value=C,this.isOwnedEntity=O,this.isStarredEntity=Z}filterEntity(C){switch(this.value){case"owned":return this.isOwnedEntity(C);case"starred":return this.isStarredEntity(C);default:return!0}}toQueryValue(){return this.value}}function ct(){var Ge;const A=(0,t.useApi)(c),{filters:{kind:C,type:O},queryParameters:{type:Z},updateFilters:V}=nt(),Y=(0,a.useMemo)(()=>[Z].flat().filter(Boolean),[Z]),[le,ve]=(0,a.useState)(Y.length?Y:(Ge=O==null?void 0:O.getTypes())!=null?Ge:[]);(0,a.useEffect)(()=>{Y.length&&ve(Y)},[Y]);const[Le,xe]=(0,a.useState)([]),Te=(0,a.useMemo)(()=>C==null?void 0:C.value,[C]),{error:$e,loading:He,value:mt}=(0,ut.default)(async()=>Te?await A.getEntityFacets({filter:{kind:Te},facets:["spec.type"]}).then(Dt=>Dt.facets["spec.type"]||[]):[],[Te,A]),Xe=(0,a.useRef)(mt);return(0,a.useEffect)(()=>{const vt=Xe.current;if(Xe.current=mt,He||!Te||vt===mt||!mt)return;const Dt=jt()(mt,Yt=>-Yt.count).map(Yt=>Yt.value);xe(Dt);const xn=le.filter(Yt=>Dt.includes(Yt));rt()(le,xn)||ve(xn)},[He,Te,le,ve,mt]),(0,a.useEffect)(()=>{V({type:le.length?new ge(le):void 0})},[le,V]),{loading:He,error:$e,availableTypes:Le,selectedTypes:le,setSelectedTypes:ve}}const wt=20;function It(A,C){var Le,xe;const O=(Le=C==null?void 0:C.type)==null?void 0:Le.toLocaleLowerCase("en-US"),Z=(xe=C==null?void 0:C.kind)==null?void 0:xe.toLocaleLowerCase("en-US"),V=(0,t.useApi)(c),{loading:Y,value:le,error:ve}=(0,ut.default)(async()=>{var Xe;const Te=(Xe=A.relations)==null?void 0:Xe.map(Ge=>({type:Ge.type,target:(0,Re.of)(Ge.targetRef)})).filter(Ge=>(!O||Ge.type.toLocaleLowerCase("en-US")===O)&&(!Z||Ge.target.kind===Z));if(!Te)return[];const $e=Object.values((0,We.groupBy)(Te,({target:Ge})=>`${Ge.kind}:${Ge.namespace}`.toLocaleLowerCase("en-US"))),He=[];for(const Ge of $e)He.push({kind:Ge[0].target.kind,namespace:Ge[0].target.namespace,nameBatches:(0,We.chunk)(Ge.map(vt=>vt.target.name),wt)});return(await Promise.all(He.flatMap(Ge=>Ge.nameBatches.map(vt=>V.getEntities({filter:{kind:Ge.kind,"metadata.namespace":Ge.namespace,"metadata.name":vt}}))))).flatMap(Ge=>Ge.items)},[A,O,Z]);return{entities:le,loading:Y,error:ve}}var lt=e(72164);function Tt(A){return typeof A=="string"?A:(0,Re.eE)(A)}function qt(){const A=(0,t.useApi)(f),C=(0,lt.Z)(A.starredEntitie$(),new Set),O=(0,a.useCallback)(V=>C.has(Tt(V)),[C]),Z=(0,a.useCallback)(V=>A.toggleStarred(Tt(V)).then(),[A]);return{starredEntities:C,toggleStarredEntity:Z,isStarredEntity:O}}function re(A){return typeof A=="string"?A:(0,Re.eE)(A)}function ue(A){const C=(0,t.useApi)(f),[O,Z]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{const Y=C.starredEntitie$().subscribe({next(le){Z(le.has(re(A)))}});return()=>{Y.unsubscribe()}},[A,C]),{toggleStarredEntity:(0,a.useCallback)(()=>C.toggleStarred(re(A)).then(),[A,C]),isStarredEntity:O}}function Q(){const A=(0,t.useApi)(t.identityApiRef),{loading:C,value:O}=(0,ut.default)(async()=>{const{ownershipEntityRefs:V}=await A.getBackstageIdentity();return V},[]),Z=(0,a.useMemo)(()=>{const V=new Set(O!=null?O:[]);return Y=>{const le=Fe(Y,Re.S4).map(Re.eE);for(const ve of le)if(V.has(ve))return!0;return!1}},[O]);return(0,a.useMemo)(()=>({loading:C,isOwnedEntity:Z}),[C,Z])}var pe=e(68099);function ie(A){const{entity:C,loading:O,error:Z}=ce(),{allowed:V,loading:Y,error:le}=(0,pe.gI)({permission:A,resourceRef:C?(0,Re.eE)(C):void 0});return O||Y?{loading:!0,allowed:!1}:Z?{loading:!1,allowed:!1,error:Z}:{loading:!1,allowed:V,error:le}}const Be=A=>{var le;const{initialFilter:C,hidden:O}=A,{updateFilters:Z,queryParameters:{kind:V}}=useEntityList(),[Y]=useState((le=[V].flat()[0])!=null?le:C);return useEffect(()=>{Z({kind:Y?new EntityKindFilter(Y):void 0})},[Y,Z]),O?null:React.createElement(Alert,{severity:"warning"},"Kind filter not yet available")};var J=e(79692),N=e(5806),te=e(21324),Pe=e(86619),De=e(19996),we=e(25505),Ne=e(38016),ht=e(88013);const Lt=(0,J.Z)({input:{}},{name:"CatalogReactEntityLifecyclePicker"}),Et=a.createElement(we.Z,{fontSize:"small"}),Ut=a.createElement(De.Z,{fontSize:"small"}),dt=()=>{var xe,Te;const A=Lt(),{updateFilters:C,backendEntities:O,filters:Z,queryParameters:{lifecycles:V}}=nt(),Y=(0,a.useMemo)(()=>[V].flat().filter(Boolean),[V]),[le,ve]=(0,a.useState)(Y.length?Y:(Te=(xe=Z.lifecycles)==null?void 0:xe.values)!=null?Te:[]);(0,a.useEffect)(()=>{Y.length&&ve(Y)},[Y]),(0,a.useEffect)(()=>{C({lifecycles:le.length?new be(le):void 0})},[le,C]);const Le=(0,a.useMemo)(()=>[...new Set(O.map($e=>{var He;return(He=$e.spec)==null?void 0:He.lifecycle}).filter(Boolean))].sort(),[O]);return Le.length?a.createElement(v.Z,{pb:1,pt:1},a.createElement(T.Z,{variant:"button"},"Lifecycle"),a.createElement(ht.ZP,{"aria-label":"Lifecycle",multiple:!0,options:Le,value:le,onChange:($e,He)=>ve(He),renderOption:($e,{selected:He})=>a.createElement(N.Z,{control:a.createElement(te.Z,{icon:Et,checkedIcon:Ut,checked:He}),label:$e}),size:"small",popupIcon:a.createElement(Ne.Z,{"data-testid":"lifecycle-picker-expand"}),renderInput:$e=>a.createElement(Pe.Z,{...$e,className:A.input,variant:"outlined"})})):null},gt=(0,J.Z)({input:{}},{name:"CatalogReactEntityOwnerPicker"}),Qe=a.createElement(we.Z,{fontSize:"small"}),Ot=a.createElement(De.Z,{fontSize:"small"}),nn=()=>{var xe,Te;const A=gt(),{updateFilters:C,backendEntities:O,filters:Z,queryParameters:{owners:V}}=nt(),Y=(0,a.useMemo)(()=>[V].flat().filter(Boolean),[V]),[le,ve]=(0,a.useState)(Y.length?Y:(Te=(xe=Z.owners)==null?void 0:xe.values)!=null?Te:[]);(0,a.useEffect)(()=>{Y.length&&ve(Y)},[Y]),(0,a.useEffect)(()=>{C({owners:le.length?new ze(le):void 0})},[le,C]);const Le=(0,a.useMemo)(()=>[...new Set(O.flatMap($e=>Fe($e,Re.S4).map(He=>Xt(He,{defaultKind:"group"}))).filter(Boolean))].sort(),[O]);return Le.length?a.createElement(v.Z,{pb:1,pt:1},a.createElement(T.Z,{variant:"button"},"Owner"),a.createElement(ht.ZP,{multiple:!0,"aria-label":"Owner",options:Le,value:le,onChange:($e,He)=>ve(He),renderOption:($e,{selected:He})=>a.createElement(N.Z,{control:a.createElement(te.Z,{icon:Qe,checkedIcon:Ot,checked:He}),label:$e}),size:"small",popupIcon:a.createElement(Ne.Z,{"data-testid":"owner-picker-expand"}),renderInput:$e=>a.createElement(Pe.Z,{...$e,className:A.input,variant:"outlined"})})):null},bt=(0,J.Z)(A=>({searchToolbar:{paddingLeft:0,paddingRight:0},input:{}}),{name:"CatalogReactEntitySearchBar"}),at=()=>{var Y,le;const A=bt(),{filters:C,updateFilters:O}=useEntityList(),[Z,V]=useState((le=(Y=C.text)==null?void 0:Y.value)!=null?le:"");return useDebounce(()=>{O({text:Z.length?new EntityTextFilter(Z):void 0})},250,[Z,O]),React.createElement(Toolbar,{className:A.searchToolbar},React.createElement(FormControl,null,React.createElement(Input,{"aria-label":"search",id:"input-with-icon-adornment",className:A.input,placeholder:"Search",autoComplete:"off",onChange:ve=>V(ve.target.value),value:Z,startAdornment:React.createElement(InputAdornment,{position:"start"},React.createElement(Search,null)),endAdornment:React.createElement(InputAdornment,{position:"end"},React.createElement(IconButton,{"aria-label":"clear search",onClick:()=>V(""),edge:"end",disabled:Z.length===0},React.createElement(Clear,null)))})))},pt=Object.freeze({createEntityRefColumn(A){const{defaultKind:C}=A;function O(Z){var V;return((V=Z.metadata)==null?void 0:V.title)||Xt(Z,{defaultKind:C})}return{title:"Name",highlight:!0,customFilterAndSearch(Z,V){return O(V).includes(Z)},customSort(Z,V){return O(Z).localeCompare(O(V))},render:Z=>{var V;return a.createElement(se,{entityRef:Z,defaultKind:C,title:(V=Z.metadata)==null?void 0:V.title})}}},createEntityRelationColumn({title:A,relation:C,defaultKind:O,filter:Z}){function V(le){return Fe(le,C,Z)}function Y(le){return V(le).map(ve=>Xt(ve,{defaultKind:O})).join(", ")}return{title:A,customFilterAndSearch(le,ve){return Y(ve).includes(le)},customSort(le,ve){return Y(le).localeCompare(Y(ve))},render:le=>a.createElement(W,{entityRefs:V(le),defaultKind:O})}},createOwnerColumn(){return this.createEntityRelationColumn({title:"Owner",relation:Re.S4,defaultKind:"group"})},createDomainColumn(){return this.createEntityRelationColumn({title:"Domain",relation:Re.cz,defaultKind:"domain",filter:{kind:"domain"}})},createSystemColumn(){return this.createEntityRelationColumn({title:"System",relation:Re.cz,defaultKind:"system",filter:{kind:"system"}})},createMetadataDescriptionColumn(){return{title:"Description",field:"metadata.description",render:A=>a.createElement(yt.OverflowTooltip,{text:A.metadata.description,placement:"bottom-start",line:2}),width:"auto"}},createSpecLifecycleColumn(){return{title:"Lifecycle",field:"spec.lifecycle"}},createSpecTypeColumn(){return{title:"Type",field:"spec.type"}}}),Nt=[pt.createEntityRefColumn({defaultKind:"system"}),pt.createDomainColumn(),pt.createOwnerColumn(),pt.createMetadataDescriptionColumn()],Vt=[pt.createEntityRefColumn({defaultKind:"component"}),pt.createSystemColumn(),pt.createOwnerColumn(),pt.createSpecTypeColumn(),pt.createSpecLifecycleColumn(),pt.createMetadataDescriptionColumn()],rn=(0,J.Z)(A=>({empty:{padding:A.spacing(2),display:"flex",justifyContent:"center"}})),Zt=A=>{const{entities:C,title:O,emptyContent:Z,variant:V="gridItem",columns:Y}=A,le=rn(),ve={minWidth:"0",width:"100%"};return V==="gridItem"&&(ve.height="calc(100% - 10px)"),a.createElement(yt.Table,{columns:Y,title:O,style:ve,emptyContent:Z&&a.createElement("div",{className:le.empty},Z),options:{search:!1,paging:!1,actionsColumnIndex:-1,padding:"dense"},data:C})};Zt.columns=pt,Zt.systemEntityColumns=Nt,Zt.componentEntityColumns=Vt;const Kt=(0,J.Z)({input:{}},{name:"CatalogReactEntityTagPicker"}),zt=a.createElement(we.Z,{fontSize:"small"}),kt=a.createElement(De.Z,{fontSize:"small"}),xt=()=>{var xe,Te;const A=Kt(),{updateFilters:C,filters:O,queryParameters:{tags:Z}}=nt(),V=(0,t.useApi)(c),{value:Y}=(0,ut.default)(async()=>{var mt;const $e="metadata.tags",{facets:He}=await V.getEntityFacets({facets:[$e],filter:(mt=O.kind)==null?void 0:mt.getCatalogFilters()});return He[$e].map(({value:Xe})=>Xe)},[O.kind]),le=(0,a.useMemo)(()=>[Z].flat().filter(Boolean),[Z]),[ve,Le]=(0,a.useState)(le.length?le:(Te=(xe=O.tags)==null?void 0:xe.values)!=null?Te:[]);return(0,a.useEffect)(()=>{le.length&&Le(le)},[le]),(0,a.useEffect)(()=>{C({tags:ve.length?new ye(ve):void 0})},[ve,C]),Y!=null&&Y.length?a.createElement(v.Z,{pb:1,pt:1},a.createElement(T.Z,{variant:"button"},"Tags"),a.createElement(ht.ZP,{multiple:!0,"aria-label":"Tags",options:Y,value:ve,onChange:($e,He)=>Le(He),renderOption:($e,{selected:He})=>a.createElement(N.Z,{control:a.createElement(te.Z,{icon:zt,checkedIcon:kt,checked:He}),label:$e}),size:"small",popupIcon:a.createElement(Ne.Z,{"data-testid":"tag-picker-expand"}),renderInput:$e=>a.createElement(Pe.Z,{...$e,className:A.input,variant:"outlined"})})):null};var _t=e(82108),Un=e.n(_t);const Ln=A=>{var xe;const{hidden:C,initialFilter:O}=A,Z=(0,t.useApi)(t.alertApiRef),{error:V,availableTypes:Y,selectedTypes:le,setSelectedTypes:ve}=ct();if((0,a.useEffect)(()=>{V&&Z.post({message:"Failed to load entity types",severity:"error"}),O&&ve([O])},[V,Z,O,ve]),Y.length===0||V)return null;const Le=[{value:"all",label:"All"},...Y.map(Te=>({value:Te,label:Un()(Te)}))];return C?null:a.createElement(v.Z,{pb:1,pt:1},a.createElement(yt.Select,{label:"Type",items:Le,selected:(xe=Le.length>1?le[0]:void 0)!=null?xe:"all",onChange:Te=>ve(Te==="all"?[]:[String(Te)])}))};var Mn=e(15459),Rn=e(61837),Nn=e(11640),Xn=e(28347);const Zn=(0,Mn.Z)({root:{color:"#f3ba37"}})(Nn.Z),zn=A=>{const{toggleStarredEntity:C,isStarredEntity:O}=ue(A.entity);return a.createElement(Rn.Z,{"aria-label":"favorite",color:"inherit",...A,onClick:()=>C()},a.createElement(un.ZP,{title:O?"Remove from favorites":"Add to favorites"},O?a.createElement(Zn,null):a.createElement(Xn.Z,null)))};var $=e(8629),h=e(79249),S=e(38724),w=e(99152),j=e(6487),he=e(49429),oe=e(55999),Me=e(72779),et=e.n(Me),Ft=e(39412);const dn=Ft.Z;function $t(A,C){if(A)return A.toLocaleLowerCase("en-US");if(C)try{return(0,Re.of)(C).kind.toLocaleLowerCase("en-US")}catch{return}}function Ur(A,C){const O=(0,t.useApp)(),Z=$t(A,C);return Z&&O.getSystemIcon(`kind:${Z}`)||dn}function Gn(A){const{kind:C,entityRef:O,...Z}=A,V=Ur(C,O);return a.createElement(V,{...Z})}const Nr=(0,J.Z)(A=>({node:{fill:A.palette.grey[300],stroke:A.palette.grey[300],"&.primary":{fill:A.palette.primary.light,stroke:A.palette.primary.light},"&.secondary":{fill:A.palette.secondary.light,stroke:A.palette.secondary.light}},text:{fill:A.palette.getContrastText(A.palette.grey[300]),"&.primary":{fill:A.palette.primary.contrastText},"&.secondary":{fill:A.palette.secondary.contrastText},"&.focused":{fontWeight:"bold"}},clickable:{cursor:"pointer"}}));function sr(A){const C=(0,t.useApi)(c),O=(0,Re.eE)(A),{loading:Z,error:V,value:Y}=(0,ut.default)(async()=>{const le=await C.getEntityAncestors({entityRef:O}),ve=new Array,Le=new Array;for(const xe of le.items){const Te=(0,Re.eE)(xe.entity),$e=Te===le.rootEntityRef;ve.push({id:Te,root:$e,...xe.entity});for(const He of xe.parentEntityRefs)Le.push({from:Te,to:He})}return{nodes:ve,edges:Le}},[O]);return{loading:Z,error:V,nodes:(Y==null?void 0:Y.nodes)||[],edges:(Y==null?void 0:Y.edges)||[]}}function Zr({node:A}){const C=Nr(),O=(0,je.s0)(),Z=(0,t.useRouteRef)(Mt),[V,Y]=(0,a.useState)(0),[le,ve]=(0,a.useState)(0),Le=(0,a.useRef)(null);(0,a.useLayoutEffect)(()=>{if(Le.current){let{height:vt,width:Dt}=Le.current.getBBox();vt=Math.round(vt),Dt=Math.round(Dt),(vt!==le||Dt!==V)&&(Y(Dt),ve(vt))}},[V,le]);const xe=10,Te=le,$e=Te+xe,He=$e+V+xe*2,mt=le+xe*2,Xe=A.metadata.title||(A.kind&&A.metadata.name&&A.metadata.namespace?Xt({kind:A.kind,name:A.metadata.name,namespace:A.metadata.namespace||""}):A.id),Ge=()=>{O(Z({kind:A.kind,namespace:A.metadata.namespace||Re.zG,name:A.metadata.name}))};return a.createElement("g",{onClick:Ge,className:C.clickable},a.createElement("rect",{className:et()(C.node,A.root?"secondary":"primary"),width:He,height:mt,rx:10}),a.createElement(Gn,{kind:A.kind,y:xe,x:xe,width:Te,height:Te,className:et()(C.text,A.root?"secondary":"primary")}),a.createElement("text",{ref:Le,className:et()(C.text,A.root?"secondary":"primary"),y:mt/2,x:$e+(V+xe*2)/2,textAnchor:"middle",alignmentBaseline:"middle"},Xe))}function zr(A){const{loading:C,error:O,nodes:Z,edges:V}=sr(A.entity);return C?a.createElement(yt.Progress,null):O?a.createElement(yt.ResponseErrorPanel,{error:O}):a.createElement(a.Fragment,null,a.createElement(oe.Z,{variant:"h2"},"Ancestry"),a.createElement(oe.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"," ",a.createElement(yt.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."),a.createElement(v.Z,{mt:4},a.createElement(yt.DependencyGraph,{nodes:Z,edges:V,renderNode:Zr,direction:yt.DependencyGraphTypes.Nm.BOTTOM_TOP,zoom:"enable-on-click"})))}var wn=e(11776),On=e(38402),Kn=e(86136),ir=e(99688),yr=e(49378),Wr=e(54506),kn=e(94339),Er=e(24579),Hr=e(27685);const qn=(0,J.Z)(A=>({root:{display:"flex",flexDirection:"column"},marginTop:{marginTop:A.spacing(2)},helpIcon:{marginLeft:A.spacing(1),color:A.palette.text.disabled},monospace:{fontFamily:"monospace"}}));function hn(A){const C=qn();return a.createElement(yr.Z,{...A,primaryTypographyProps:{className:C.monospace},secondaryTypographyProps:{className:C.monospace}})}function _n(A){const C=qn();return a.createElement(Wr.Z,{className:C.monospace},A.children)}function er(A){return a.createElement(v.Z,{mt:2},a.createElement(kn.Z,{variant:"outlined"},a.createElement(Er.Z,null,a.createElement(T.Z,{variant:"h6",gutterBottom:!0},A.title,A.helpLink&&a.createElement(vr,{to:A.helpLink})),A.children)))}function tr(A){const[C,O]=A.entry;return a.createElement(On.Z,null,A.indent&&a.createElement(Kn.Z,null),a.createElement(hn,{primary:C,secondary:O.match(/^url:https?:\/\//)?a.createElement(a.Fragment,null,O.substring(0,4),a.createElement(yt.Link,{to:O.substring(4)},O.substring(4))):O}))}function vr(A){const C=qn();return a.createElement(yt.Link,{to:A.to,className:C.helpIcon},a.createElement(Hr.Z,{fontSize:"inherit"}))}const Ar=(0,J.Z)({root:{display:"flex",flexDirection:"column"}});function Rr(A){var Le,xe;const C=(0,t.useApi)(c),O=(0,Re.eE)(A),Z=(Le=A.metadata.annotations)==null?void 0:Le[Re.P1],V=(xe=A.metadata.annotations)==null?void 0:xe[Re.q1],{loading:Y,error:le,value:ve}=(0,ut.default)(async()=>!Z&&!V?[]:(await C.getEntities({filter:[...Z?[{[`metadata.annotations.${Re.P1}`]:Z}]:[],...V?[{[`metadata.annotations.${Re.q1}`]:V}]:[]]})).items,[Z,V]);return{loading:Y,error:le,location:Z,originLocation:V,colocatedEntities:ve==null?void 0:ve.filter(Te=>(0,Re.eE)(Te)!==O)}}function lr(A){return a.createElement(wn.Z,{dense:!0},A.header&&a.createElement(tr,{key:"header",entry:A.header}),A.entities.map(C=>a.createElement(On.Z,{key:(0,Re.eE)(C)},a.createElement(Kn.Z,null,a.createElement(Gn,{kind:C.kind})),a.createElement(hn,{primary:a.createElement(se,{entityRef:C})}))))}function Sr(A){const{entity:C}=A,{loading:O,error:Z,location:V,originLocation:Y,colocatedEntities:le}=Rr(C);if(O)return a.createElement(yt.Progress,null);if(Z)return a.createElement(yt.ResponseErrorPanel,{error:Z});if(!V&&!Y)return a.createElement(ir.Z,{severity:"warning"},"Entity had no location information.");if(!(le!=null&&le.length))return a.createElement(ir.Z,{severity:"info"},"There were no other entities on this location.");if(V===Y)return a.createElement(lr,{entities:le});const ve=le.filter(xe=>{var Te;return((Te=xe.metadata.annotations)==null?void 0:Te[Re.P1])===V}),Le=le.filter(xe=>{var Te;return((Te=xe.metadata.annotations)==null?void 0:Te[Re.q1])===Y});return a.createElement(a.Fragment,null,ve.length>0&&a.createElement(lr,{entities:ve,header:["At the same location",V]}),Le.length>0&&a.createElement(lr,{entities:Le,header:["At the same origin",Y]}))}function Cr(A){const C=Ar();return a.createElement(a.Fragment,null,a.createElement(oe.Z,{variant:"h2"},"Colocated"),a.createElement(oe.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)."),a.createElement("div",{className:C.root},a.createElement(Sr,{entity:A.entity})))}function Tr(A){return Object.fromEntries([...Object.entries(A)].sort((C,O)=>C[0]<O[0]?-1:1))}function br(A){return a.createElement(a.Fragment,null,a.createElement(oe.Z,{variant:"h2"},"Entity as JSON"),a.createElement(oe.Z,null,"This is the raw entity data as received from the catalog, on JSON form."),a.createElement(oe.Z,null,a.createElement("div",{style:{fontSize:"75%"},"data-testid":"code-snippet"},a.createElement(yt.CodeSnippet,{text:JSON.stringify(Tr(A.entity),void 0,2),language:"json",showCopyCodeButton:!0}))))}var Pr=e(3440),cr=e.n(Pr);const Ir=(0,J.Z)({root:{display:"flex",flexDirection:"column"}});function ur(A){var xe,Te;const C=Ir(),{apiVersion:O,kind:Z,metadata:V,spec:Y,relations:le=[],status:ve={}}=A.entity,Le=cr()(jt()(le,$e=>$e.targetRef),"type");return a.createElement(a.Fragment,null,a.createElement(oe.Z,{variant:"h2"},"Overview"),a.createElement("div",{className:C.root},a.createElement(er,{title:"Identity"},a.createElement(wn.Z,{dense:!0},a.createElement(On.Z,null,a.createElement(hn,{primary:"apiVersion",secondary:O})),a.createElement(On.Z,null,a.createElement(hn,{primary:"kind",secondary:Z})),(Y==null?void 0:Y.type)&&a.createElement(On.Z,null,a.createElement(hn,{primary:"spec.type",secondary:Y.type})),V.uid&&a.createElement(On.Z,null,a.createElement(hn,{primary:"uid",secondary:V.uid})),V.etag&&a.createElement(On.Z,null,a.createElement(hn,{primary:"etag",secondary:V.etag})))),a.createElement(er,{title:"Metadata"},!!Object.keys(V.annotations||{}).length&&a.createElement(wn.Z,{dense:!0,subheader:a.createElement(_n,null,"Annotations",a.createElement(vr,{to:"https://backstage.io/docs/features/software-catalog/well-known-annotations"}))},Object.entries(V.annotations).map($e=>a.createElement(tr,{key:$e[0],indent:!0,entry:$e}))),!!Object.keys(V.labels||{}).length&&a.createElement(wn.Z,{dense:!0,subheader:a.createElement(_n,null,"Labels")},Object.entries(V.labels).map($e=>a.createElement(tr,{key:$e[0],indent:!0,entry:$e}))),!!((xe=V.tags)!=null&&xe.length)&&a.createElement(wn.Z,{dense:!0,subheader:a.createElement(_n,null,"Tags")},V.tags.map(($e,He)=>a.createElement(On.Z,{key:`${$e}-${He}`},a.createElement(Kn.Z,null),a.createElement(hn,{primary:$e}))))),!!le.length&&a.createElement(er,{title:"Relations",helpLink:"https://backstage.io/docs/features/software-catalog/well-known-relations"},Object.entries(Le).map(([$e,He],mt)=>a.createElement("div",{key:mt},a.createElement(wn.Z,{dense:!0,subheader:a.createElement(_n,null,$e)},He.map(Xe=>a.createElement(On.Z,{key:Xe.targetRef},a.createElement(Kn.Z,null,a.createElement(Gn,{entityRef:Xe.targetRef})),a.createElement(hn,{primary:a.createElement(se,{entityRef:Xe.targetRef})}))))))),!!((Te=ve.items)!=null&&Te.length)&&a.createElement(er,{title:"Status",helpLink:"https://backstage.io/docs/features/software-catalog/well-known-statuses"},ve.items.map(($e,He)=>a.createElement("div",{key:He},a.createElement(T.Z,null,$e.level,": ",$e.type),a.createElement(v.Z,{ml:2},$e.message))))))}var on=e(60155),Sn=e.n(on);function Lr(A){return a.createElement(a.Fragment,null,a.createElement(oe.Z,{variant:"h2"},"Entity as YAML"),a.createElement(oe.Z,null,"This is the raw entity data as received from the catalog, on YAML form."),a.createElement(oe.Z,null,a.createElement("div",{style:{fontSize:"75%"},"data-testid":"code-snippet"},a.createElement(yt.CodeSnippet,{text:Sn().stringify(Tr(A.entity)),language:"yaml",showCopyCodeButton:!0}))))}const gn=(0,J.Z)(A=>({fullHeightDialog:{height:"calc(100% - 64px)"},root:{display:"flex",flexGrow:1,width:"100%",backgroundColor:A.palette.background.paper},tabs:{borderRight:`1px solid ${A.palette.divider}`,flexShrink:0},tabContents:{flexGrow:1,overflowX:"auto"}}));function Wn(A){const{children:C,value:O,index:Z,...V}=A,Y=gn();return a.createElement("div",{role:"tabpanel",hidden:O!==Z,id:`vertical-tabpanel-${Z}`,"aria-labelledby":`vertical-tab-${Z}`,className:Y.tabContents,...V},O===Z&&a.createElement(v.Z,{pl:3,pr:3},C))}function Hn(A){return{id:`vertical-tab-${A}`,"aria-controls":`vertical-tabpanel-${A}`}}function Or(A){const C=gn(),[O,Z]=a.useState(0);return(0,a.useEffect)(()=>{Z(0)},[A.open]),A.entity?a.createElement($.Z,{fullWidth:!0,maxWidth:"xl",open:A.open,onClose:A.onClose,"aria-labelledby":"entity-inspector-dialog-title",PaperProps:{className:C.fullHeightDialog}},a.createElement(h.Z,{id:"entity-inspector-dialog-title"},"Entity Inspector"),a.createElement(S.Z,{dividers:!0},a.createElement("div",{className:C.root},a.createElement(w.Z,{orientation:"vertical",variant:"scrollable",value:O,onChange:(V,Y)=>Z(Y),"aria-label":"Inspector options",className:C.tabs},a.createElement(j.Z,{label:"Overview",...Hn(0)}),a.createElement(j.Z,{label:"Ancestry",...Hn(1)}),a.createElement(j.Z,{label:"Colocated",...Hn(2)}),a.createElement(j.Z,{label:"Raw JSON",...Hn(3)}),a.createElement(j.Z,{label:"Raw YAML",...Hn(4)})),a.createElement(Wn,{value:O,index:0},a.createElement(ur,{entity:A.entity})),a.createElement(Wn,{value:O,index:1},a.createElement(zr,{entity:A.entity})),a.createElement(Wn,{value:O,index:2},a.createElement(Cr,{entity:A.entity})),a.createElement(Wn,{value:O,index:3},a.createElement(br,{entity:A.entity})),a.createElement(Wn,{value:O,index:4},a.createElement(Lr,{entity:A.entity})))),a.createElement(he.Z,null,a.createElement(y.Z,{onClick:A.onClose,color:"primary"},"Close"))):null}var dr=e(85256);function xr(A){var mt;const C=(0,t.useApi)(c),O=(mt=A.metadata.annotations)==null?void 0:mt[Re.q1],Z=A.metadata.uid,V=O==="bootstrap:bootstrap",Y=(0,ut.default)(async()=>{const Xe=C.getLocationByRef(O);let Ge;if(!O)Ge=Promise.resolve([]);else{const vt=`metadata.annotations.${Re.q1}`;Ge=C.getEntities({filter:{[vt]:O},fields:["kind","metadata.uid","metadata.name","metadata.namespace"]}).then(Dt=>Dt.items)}return Promise.all([Xe,Ge]).then(([vt,Dt])=>({location:vt,colocatedEntities:Dt}))},[C,A]),le=(0,a.useCallback)(async function(){const{location:Ge}=Y.value;await C.removeLocationById(Ge.id)},[C,Y]),ve=(0,a.useCallback)(async function(){await C.removeEntityByUid(Z)},[C,Z]);if(V)return{type:"bootstrap",location:O,deleteEntity:ve};const{loading:Le,error:xe,value:Te}=Y;if(Le)return{type:"loading"};if(xe)return{type:"error",error:xe};const{location:$e,colocatedEntities:He}=Te;return $e?{type:"unregister",location:O,colocatedEntities:He.map(Re.iB),unregisterLocation:le,deleteEntity:ve}:{type:"only-delete",deleteEntity:ve}}var nr=e(10179);const Yn=(0,J.Z)({advancedButton:{fontSize:"0.7em"}}),jr=({entity:A,onConfirm:C})=>{var mt;const O=(0,t.useApi)(t.alertApiRef),Z=(0,t.useApi)(t.configApiRef),V=Yn(),Y=xr(A),[le,ve]=(0,a.useState)(!1),[Le,xe]=(0,a.useState)(!1),Te=(mt=Z.getOptionalString("app.title"))!=null?mt:"Backstage",$e=(0,a.useCallback)(async function(){if("unregisterLocation"in Y){xe(!0);try{await Y.unregisterLocation(),C()}catch(Ge){(0,nr.BD)(Ge),O.post({message:Ge.message})}finally{xe(!1)}}},[O,C,Y]),He=(0,a.useCallback)(async function(){if("deleteEntity"in Y){xe(!0);try{await Y.deleteEntity(),C()}catch(Ge){(0,nr.BD)(Ge),O.post({message:Ge.message})}finally{xe(!1)}}},[O,C,Y]);return Y.type==="loading"?a.createElement(yt.Progress,null):Y.type==="error"?a.createElement(yt.ResponseErrorPanel,{error:Y.error}):Y.type==="bootstrap"?a.createElement(a.Fragment,null,a.createElement(ir.Z,{severity:"info"},'You cannot unregister this entity, since it originates from a protected Backstage configuration (location "',Y.location,'"). If you believe this is in error, please contact the ',Te," ","integrator."),a.createElement(v.Z,{marginTop:2},!le&&a.createElement(y.Z,{variant:"text",size:"small",color:"primary",className:V.advancedButton,onClick:()=>ve(!0)},"Advanced Options"),le&&a.createElement(a.Fragment,null,a.createElement(oe.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."),a.createElement(y.Z,{variant:"contained",color:"secondary",disabled:Le,onClick:He},"Delete Entity")))):Y.type==="only-delete"?a.createElement(a.Fragment,null,a.createElement(oe.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."),a.createElement(y.Z,{variant:"contained",color:"secondary",disabled:Le,onClick:He},"Delete Entity")):Y.type==="unregister"?a.createElement(a.Fragment,null,a.createElement(oe.Z,null,"This action will unregister the following entities:"),a.createElement(oe.Z,{component:"ul"},Y.colocatedEntities.map(Xe=>a.createElement("li",{key:`${Xe.kind}:${Xe.namespace}/${Xe.name}`},a.createElement(se,{entityRef:Xe})))),a.createElement(oe.Z,null,"Located at the following location:"),a.createElement(oe.Z,{component:"ul"},a.createElement("li",null,Y.location)),a.createElement(oe.Z,null,"To undo, just re-register the entity in ",Te,"."),a.createElement(v.Z,{marginTop:2},a.createElement(y.Z,{variant:"contained",color:"secondary",disabled:Le,onClick:$e},"Unregister Location"),!le&&a.createElement(v.Z,{component:"span",marginLeft:2},a.createElement(y.Z,{variant:"text",size:"small",color:"primary",className:V.advancedButton,onClick:()=>ve(!0)},"Advanced Options"))),le&&a.createElement(a.Fragment,null,a.createElement(v.Z,{paddingTop:4,paddingBottom:4},a.createElement(dr.Z,null)),a.createElement(oe.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."),a.createElement(y.Z,{variant:"contained",color:"secondary",disabled:Le,onClick:He},"Delete Entity"))):a.createElement(ir.Z,{severity:"error"},"Internal error: Unknown state")},Vr=A=>{const{open:C,onConfirm:O,onClose:Z,entity:V}=A;return a.createElement($.Z,{open:C,onClose:Z},a.createElement(h.Z,{id:"responsive-dialog-title"},"Are you sure you want to unregister this entity?"),a.createElement(S.Z,null,a.createElement(jr,{entity:V,onConfirm:O})),a.createElement(he.Z,null,a.createElement(y.Z,{onClick:Z,color:"primary"},"Cancel")))};var fr=e(12231),b=e(9520),q=e(47603);const fe=(0,J.Z)(A=>({root:{backgroundColor:"rgba(0, 0, 0, .11)",boxShadow:"none",margin:A.spacing(1,0,1,0)},title:{margin:A.spacing(1,0,0,1),textTransform:"uppercase",fontSize:12,fontWeight:"bold"},listIcon:{minWidth:30,color:A.palette.text.primary},menuItem:{minHeight:A.spacing(6)},groupWrapper:{margin:A.spacing(1,1,2,1)}}),{name:"CatalogReactUserListPicker"});function Ie(A){return[{name:"Personal",items:[{id:"owned",label:"Owned",icon:q.Z},{id:"starred",label:"Starred",icon:Nn.Z}]},{name:A!=null?A:"Company",items:[{id:"all",label:"All"}]}]}const ke=A=>{var Gr;const{initialFilter:C,availableFilters:O}=A,Z=fe(),Y=(Gr=(0,t.useApi)(t.configApiRef).getOptionalString("organization.name"))!=null?Gr:"Company",{filters:le,updateFilters:ve,backendEntities:Le,queryParameters:{kind:xe,user:Te},loading:$e}=nt(),He=["starred","all"],mt=Ie(Y).map(yn=>({...yn,items:yn.items.filter(({id:Jt})=>["group","user"].some(Fr=>Fr===xe)?He.includes(Jt):!O||O.includes(Jt))})).filter(({items:yn})=>!!yn.length),{isStarredEntity:Xe}=qt(),{isOwnedEntity:Ge,loading:vt}=Q(),Dt=$e||vt,xn=(0,a.useMemo)(()=>new _e("owned",Ge,Xe),[Ge,Xe]),Yt=(0,a.useMemo)(()=>new _e("starred",Ge,Xe),[Ge,Xe]),sn=(0,a.useMemo)(()=>[Te].flat()[0],[Te]),[fn,pn]=(0,a.useState)(sn!=null?sn:C),mr=(0,a.useMemo)(()=>Le.filter(qe((0,We.compact)(Object.values({...le,user:void 0})))),[le,Le]),Dr=(0,a.useMemo)(()=>({all:mr.length,starred:mr.filter(yn=>Yt.filterEntity(yn)).length,owned:mr.filter(yn=>xn.filterEntity(yn)).length}),[mr,Yt,xn]);return(0,a.useEffect)(()=>{sn&&pn(sn)},[sn]),(0,a.useEffect)(()=>{!Dt&&!!fn&&fn!=="all"&&Dr[fn]===0&&pn("all")},[Dt,Dr,fn,pn]),(0,a.useEffect)(()=>{ve({user:fn?new _e(fn,Ge,Xe):void 0})},[fn,Ge,Xe,ve]),a.createElement(kn.Z,{className:Z.root},mt.map(yn=>a.createElement(a.Fragment,{key:yn.name},a.createElement(T.Z,{variant:"subtitle2",className:Z.title},yn.name),a.createElement(kn.Z,{className:Z.groupWrapper},a.createElement(wn.Z,{disablePadding:!0,dense:!0,role:"menu"},yn.items.map(Jt=>{var Fr,no;return a.createElement(fr.Z,{key:Jt.id,button:!0,divider:!0,onClick:()=>pn(Jt.id),selected:Jt.id===((Fr=le.user)==null?void 0:Fr.value),className:Z.menuItem,disabled:Dr[Jt.id]===0,"data-testid":`user-picker-${Jt.id}`,tabIndex:0},Jt.icon&&a.createElement(Kn.Z,{className:Z.listIcon},a.createElement(Jt.icon,{fontSize:"small"})),a.createElement(yr.Z,null,a.createElement(T.Z,{variant:"body1"},Jt.label)),a.createElement(b.Z,null,(no=Dr[Jt.id])!=null?no:"-"))}))))))},ft=({children:A,value:C})=>{var ve;const[O,Z]=useState((ve=C==null?void 0:C.filters)!=null?ve:{}),V=useCallback(Le=>{Z(xe=>{const Te=typeof Le=="function"?Le(xe):Le;return{...xe,...Te}})},[]),Y=useMemo(()=>({entities:[],backendEntities:[],queryParameters:{}}),[]),le=useMemo(()=>{var Le,xe,Te,$e,He;return{entities:(Le=C==null?void 0:C.entities)!=null?Le:Y.entities,backendEntities:(xe=C==null?void 0:C.backendEntities)!=null?xe:Y.backendEntities,updateFilters:(Te=C==null?void 0:C.updateFilters)!=null?Te:V,filters:O,loading:($e=C==null?void 0:C.loading)!=null?$e:!1,queryParameters:(He=C==null?void 0:C.queryParameters)!=null?He:Y.queryParameters,error:C==null?void 0:C.error}},[C,Y,O,V]);return React.createElement(EntityListContext.Provider,{value:le},A)}},39398:function(ee,s,e){"use strict";e.r(s),e.d(s,{AboutCard:function(){return We},AboutContent:function(){return K},AboutField:function(){return P}});var r=e(48023),t=e(53492),c=e(36964),f=e(36356),R=e(53479),m=e(79692),a=e(94339),i=e(32552),u=e(61837),y=e(85256),g=e(24579),v=e(52866),T=e(30254),L=e(27604),B=e(2784),k=e(47851),F=e(60905),x=e(90436),M=e(7089);const D=(0,m.Z)(Ze=>({value:{fontWeight:"bold",overflow:"hidden",lineHeight:"24px",wordBreak:"break-word"},label:{color:Ze.palette.text.secondary,textTransform:"uppercase",fontSize:"10px",fontWeight:"bold",letterSpacing:.5,overflow:"hidden",whiteSpace:"nowrap"}}));function P(Ze){const{label:me,value:je,gridSizes:de,children:Ce}=Ze,Ve=D(),Ke=(0,c.useElementFilter)(Ce,Re=>Re.getElements()),qe=Ke.length>0?Ke:B.createElement(x.Z,{variant:"body2",className:Ve.value},je||"unknown");return B.createElement(F.Z,{item:!0,...de},B.createElement(x.Z,{variant:"h2",className:Ve.label},me),qe)}const H=(0,m.Z)({description:{wordBreak:"break-word"}});function K(Ze){var nt,ut,tt,rt,Bt,jt;const{entity:me}=Ze,je=H(),de=me.kind.toLocaleLowerCase("en-US")==="system",Ce=me.kind.toLocaleLowerCase("en-US")==="resource",Ve=me.kind.toLocaleLowerCase("en-US")==="component",Ke=me.kind.toLocaleLowerCase("en-US")==="api",qe=me.kind.toLocaleLowerCase("en-US")==="template",Re=me.kind.toLocaleLowerCase("en-US")==="location",Fe=me.kind.toLocaleLowerCase("en-US")==="group",Ue=(0,R.getEntityRelations)(me,r.cz,{kind:"system"}),Ye=(0,R.getEntityRelations)(me,r.cz,{kind:"component"}),it=(0,R.getEntityRelations)(me,r.cz,{kind:"domain"}),Rt=(0,R.getEntityRelations)(me,r.S4);return B.createElement(F.Z,{container:!0},B.createElement(P,{label:"Description",gridSizes:{xs:12}},B.createElement(x.Z,{variant:"body2",paragraph:!0,className:je.description},((nt=me==null?void 0:me.metadata)==null?void 0:nt.description)||"No description")),B.createElement(P,{label:"Owner",value:"No Owner",gridSizes:{xs:12,sm:6,lg:4}},Rt.length>0&&B.createElement(R.EntityRefLinks,{entityRefs:Rt,defaultKind:"group"})),(de||it.length>0)&&B.createElement(P,{label:"Domain",value:"No Domain",gridSizes:{xs:12,sm:6,lg:4}},it.length>0&&B.createElement(R.EntityRefLinks,{entityRefs:it,defaultKind:"domain"})),(Ke||Ve||Ce||Ue.length>0)&&B.createElement(P,{label:"System",value:"No System",gridSizes:{xs:12,sm:6,lg:4}},Ue.length>0&&B.createElement(R.EntityRefLinks,{entityRefs:Ue,defaultKind:"system"})),Ve&&Ye.length>0&&B.createElement(P,{label:"Parent Component",value:"No Parent Component",gridSizes:{xs:12,sm:6,lg:4}},B.createElement(R.EntityRefLinks,{entityRefs:Ye,defaultKind:"component"})),(Ke||Ve||Ce||qe||Fe||Re||typeof((ut=me==null?void 0:me.spec)==null?void 0:ut.type)=="string")&&B.createElement(P,{label:"Type",value:(tt=me==null?void 0:me.spec)==null?void 0:tt.type,gridSizes:{xs:12,sm:6,lg:4}}),(Ke||Ve||typeof((rt=me==null?void 0:me.spec)==null?void 0:rt.lifecycle)=="string")&&B.createElement(P,{label:"Lifecycle",value:(Bt=me==null?void 0:me.spec)==null?void 0:Bt.lifecycle,gridSizes:{xs:12,sm:6,lg:4}}),B.createElement(P,{label:"Tags",value:"No Tags",gridSizes:{xs:12,sm:6,lg:4}},(((jt=me==null?void 0:me.metadata)==null?void 0:jt.tags)||[]).map(Mt=>B.createElement(M.Z,{key:Mt,size:"small",label:Mt}))))}const ce=(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 We(Ze){var rt,Bt,jt;const{variant:me}=Ze,je=ce(),{entity:de}=(0,R.useEntity)(),Ce=(0,c.useApi)(f.q3),Ve=(0,c.useApi)(R.catalogApiRef),Ke=(0,c.useApi)(c.alertApiRef),qe=(0,c.useRouteRef)(k.jU),Re=(0,R.getEntitySourceLocation)(de,Ce),Fe=(rt=de.metadata.annotations)==null?void 0:rt[r.Tf],Ue={label:"View Source",disabled:!Re,icon:B.createElement(f.nW,{type:Re==null?void 0:Re.integrationType}),href:Re==null?void 0:Re.locationTargetUrl},Ye={label:"View TechDocs",disabled:!((Bt=de.metadata.annotations)!=null&&Bt["backstage.io/techdocs-ref"])||!qe,icon:B.createElement(T.Z,null),href:qe&&qe({namespace:de.metadata.namespace||r.zG,kind:de.kind,name:de.metadata.name})};let it="";me==="gridItem"?it=je.gridItemCard:me==="fullHeight"&&(it=je.fullHeightCard);let Rt="";me==="gridItem"?Rt=je.gridItemCardContent:me==="fullHeight"&&(Rt=je.fullHeightCardContent);const nt=(jt=de.metadata.annotations)==null?void 0:jt[r.P1],ut=(nt==null?void 0:nt.startsWith("url:"))||(nt==null?void 0:nt.startsWith("file:")),tt=(0,B.useCallback)(async()=>{await Ve.refreshEntity((0,r.eE)(de)),Ke.post({message:"Refresh scheduled",severity:"info"})},[Ve,Ke,de]);return B.createElement(a.Z,{className:it},B.createElement(i.Z,{title:"About",action:B.createElement(B.Fragment,null,ut&&B.createElement(u.Z,{"aria-label":"Refresh",title:"Schedule entity refresh",onClick:tt},B.createElement(v.Z,null)),B.createElement(u.Z,{component:t.Link,"aria-label":"Edit",disabled:!Fe,title:"Edit Metadata",to:Fe!=null?Fe:"#"},B.createElement(L.Z,null))),subheader:B.createElement(t.HeaderIconLinkRow,{links:[Ue,Ye]})}),B.createElement(y.Z,null),B.createElement(g.Z,{className:Rt},B.createElement(K,{entity:de})))}},49782:function(ee,s,e){"use strict";e.d(s,{K:function(){return v}});var r=e(2784),t=e(79692),c=e(12420),f=e(97580),R=e(73698),m=e(74603),a=e(12231),i=e(53479),u=e(64279),y=e(36964);const g=(0,t.Z)(T=>(0,c.Z)({root:{...T.typography.h4}}));function v(T){var Ze;const{initialFilter:L="component",allowedKinds:B}=T,k=g(),F=(0,y.useApi)(i.catalogApiRef),{value:x}=(0,u.default)(async()=>await F.getEntityFacets({facets:["kind"]}).then(me=>{var je;return((je=me.facets.kind)==null?void 0:je.map(de=>de.value).sort())||[]})),{updateFilters:M,queryParameters:{kind:D}}=(0,i.useEntityList)(),P=(0,r.useMemo)(()=>{var me;return(me=[D].flat()[0])==null?void 0:me.toLocaleLowerCase("en-US")},[D]),[H,K]=(0,r.useState)(P!=null?P:L);(0,r.useEffect)(()=>{M({kind:H?new i.EntityKindFilter(H):void 0})},[H,M]),(0,r.useEffect)(()=>{P&&K(P)},[P]);const We=[(0,f.Z)(H)].concat((Ze=x==null?void 0:x.filter(me=>B?B.some(je=>je.toLocaleLowerCase("en-US")===me.toLocaleLowerCase("en-US")):!0))!=null?Ze:[]).sort().reduce((me,je)=>(me[je.toLocaleLowerCase("en-US")]=je,me),{});return r.createElement(R.Z,{input:r.createElement(m.Z,{value:H}),value:H,onChange:me=>K(me.target.value),classes:k},Object.keys(We).map(me=>r.createElement(a.Z,{value:me,key:me},`${We[me]}s`)))}},30097:function(ee,s,e){"use strict";e.d(s,{E:function(){return L}});var r=e(48023),t=e(53479),c=e(27604),f=e(2997),R=e(76635),m=e(2784),a=e(7089),i=e(53492);const u=Object.freeze({createNameColumn(B){function k(F){var x;return((x=F.metadata)==null?void 0:x.title)||(0,t.humanizeEntityRef)(F,{defaultKind:B==null?void 0:B.defaultKind})}return{title:"Name",field:"resolved.name",highlight:!0,customSort({entity:F},{entity:x}){return k(F).localeCompare(k(x))},render:({entity:F})=>{var x;return m.createElement(t.EntityRefLink,{entityRef:F,defaultKind:(B==null?void 0:B.defaultKind)||"Component",title:(x=F.metadata)==null?void 0:x.title})}}},createSystemColumn(){return{title:"System",field:"resolved.partOfSystemRelationTitle",render:({resolved:B})=>m.createElement(t.EntityRefLinks,{entityRefs:B.partOfSystemRelations,defaultKind:"system"})}},createOwnerColumn(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:B})=>m.createElement(t.EntityRefLinks,{entityRefs:B.ownedByRelations,defaultKind:"group"})}},createSpecTypeColumn(){return{title:"Type",field:"entity.spec.type",hidden:!0}},createSpecLifecycleColumn(){return{title:"Lifecycle",field:"entity.spec.lifecycle"}},createMetadataDescriptionColumn(){return{title:"Description",field:"entity.metadata.description",render:({entity:B})=>m.createElement(i.OverflowTooltip,{text:B.metadata.description,placement:"bottom-start"}),width:"auto"}},createTagsColumn(){return{title:"Tags",field:"entity.metadata.tags",cellStyle:{padding:"0px 16px 0px 20px"},render:({entity:B})=>m.createElement(m.Fragment,null,B.metadata.tags&&B.metadata.tags.map(k=>m.createElement(a.Z,{key:k,label:k,size:"small",variant:"outlined",style:{marginBottom:"0px"}})))}}});var y=e(28347),g=e(15459),v=e(11640);const T=(0,g.Z)({root:{color:"#f3ba37"}})(v.Z),L=B=>{var Ke,qe,Re;const{columns:k,actions:F,tableOptions:x}=B,{isStarredEntity:M,toggleStarredEntity:D}=(0,t.useStarredEntities)(),{loading:P,error:H,entities:K,filters:ce}=(0,t.useEntityList)(),We=(0,m.useMemo)(()=>{var Ue;return[u.createNameColumn({defaultKind:(Ue=ce.kind)==null?void 0:Ue.value}),...Fe(),u.createMetadataDescriptionColumn(),u.createTagsColumn()];function Fe(){var Ye;switch((Ye=ce.kind)==null?void 0:Ye.value){case"user":return[];case"domain":case"system":return[u.createOwnerColumn()];case"group":case"location":case"template":return[u.createSpecTypeColumn()];default:return[u.createSystemColumn(),u.createOwnerColumn(),u.createSpecTypeColumn(),u.createSpecLifecycleColumn()]}}},[(Ke=ce.kind)==null?void 0:Ke.value]),Ze=ce.type===void 0,me=(0,R.capitalize)((Re=(qe=ce.user)==null?void 0:qe.value)!=null?Re:"all");if(H)return m.createElement("div",null,m.createElement(i.WarningPanel,{severity:"error",title:"Could not fetch catalog entities."},m.createElement(i.CodeSnippet,{language:"text",text:H.toString()})));const je=[({entity:Fe})=>{var Ye;const Ue=(Ye=Fe.metadata.annotations)==null?void 0:Ye[r.l2];return{icon:()=>m.createElement(f.Z,{"aria-label":"View",fontSize:"small"}),tooltip:"View",disabled:!Ue,onClick:()=>{!Ue||window.open(Ue,"_blank")}}},({entity:Fe})=>{var Ye;const Ue=(Ye=Fe.metadata.annotations)==null?void 0:Ye[r.Tf];return{icon:()=>m.createElement(c.Z,{"aria-label":"Edit",fontSize:"small"}),tooltip:"Edit",disabled:!Ue,onClick:()=>{!Ue||window.open(Ue,"_blank")}}},({entity:Fe})=>{const Ue=M(Fe);return{cellStyle:{paddingLeft:"1em"},icon:()=>Ue?m.createElement(T,null):m.createElement(y.Z,null),tooltip:Ue?"Remove from favorites":"Add to favorites",onClick:()=>D(Fe)}}],de=K.map(Fe=>{const Ue=(0,t.getEntityRelations)(Fe,r.cz,{kind:"system"}),Ye=(0,t.getEntityRelations)(Fe,r.S4);return{entity:Fe,resolved:{name:(0,t.humanizeEntityRef)(Fe,{defaultKind:"Component"}),ownedByRelationsTitle:Ye.map(it=>(0,t.humanizeEntityRef)(it,{defaultKind:"group"})).join(", "),ownedByRelations:Ye,partOfSystemRelationTitle:Ue.map(it=>(0,t.humanizeEntityRef)(it,{defaultKind:"system"})).join(", "),partOfSystemRelations:Ue}}}),Ce=(k||We).find(Fe=>Fe.title==="Type");Ce&&(Ce.hidden=!Ze);const Ve=de.length>20;return m.createElement(i.Table,{isLoading:P,columns:k||We,options:{paging:Ve,pageSize:20,actionsColumnIndex:-1,loadingType:"linear",showEmptyDataSourceMessage:!P,padding:"dense",pageSizeOptions:[20,50,100],...x},title:`${me} (${K.length})`,data:de,actions:F||je})};L.columns=u},47851:function(ee,s,e){"use strict";e.d(s,{_Z:function(){return f},jU:function(){return c},yw:function(){return t}});var r=e(36964);const t=(0,r.createExternalRouteRef)({id:"create-component",optional:!0}),c=(0,r.createExternalRouteRef)({id:"view-techdoc",optional:!0,params:["namespace","kind","name"]}),f=(0,r.createRouteRef)({id:"catalog"})},40749:function(ee,s,e){"use strict";e.d(s,{rG:function(){return r},Y2:function(){return M},J$:function(){return u},g2:function(){return c}});var r;(function(D){const P="DENY";D.DENY=P;const H="ALLOW";D.ALLOW=H;const K="CONDITIONAL";D.CONDITIONAL=K})(r||(r={}));function t(D,P){return D.name===P.name}function c(D,P){return"resourceType"in D?!P||D.resourceType===P:!1}function f(D){return D.attributes.action==="create"}function R(D){return D.attributes.action==="read"}function m(D){return D.attributes.action==="update"}function a(D){return D.attributes.action==="delete"}function i(D){return{authorize:async(P,H)=>await D.authorize(P,H),authorizeConditional(P,H){const K=P;return D.authorize(K,H)}}}function u({name:D,attributes:P,resourceType:H}){return H?{type:"resource",name:D,attributes:P,resourceType:H}:{type:"basic",name:D,attributes:P}}var y=e(10179),g=e(96279),v=e.n(g),T=e(9571),L=e(30195);const B=L.z.lazy(()=>L.z.object({rule:L.z.string(),resourceType:L.z.string(),params:L.z.array(L.z.unknown())}).or(L.z.object({anyOf:L.z.array(B).nonempty()})).or(L.z.object({allOf:L.z.array(B).nonempty()})).or(L.z.object({not:B}))),k=L.z.object({result:L.z.literal(r.ALLOW).or(L.z.literal(r.DENY))}),F=L.z.union([L.z.object({result:L.z.literal(r.ALLOW).or(L.z.literal(r.DENY))}),L.z.object({result:L.z.literal(r.CONDITIONAL),pluginId:L.z.string(),resourceType:L.z.string(),conditions:B})]),x=(D,P)=>L.z.object({items:L.z.array(L.z.intersection(L.z.object({id:L.z.string()}),D)).refine(H=>H.length===P.size&&H.every(({id:K})=>P.has(K)),{message:"Items in response do not match request"})});class M{constructor(P){_(this,"enabled");_(this,"discovery");var H;this.discovery=P.discovery,this.enabled=(H=P.config.getOptionalBoolean("permission.enabled"))!=null?H:!1}async authorize(P,H){return this.makeRequest(P,k,H)}async authorizeConditional(P,H){return this.makeRequest(P,F,H)}async makeRequest(P,H,K){if(!this.enabled)return P.map(Ce=>({result:r.ALLOW}));const ce={items:P.map(Ce=>({id:T.Z(),...Ce}))},We=await this.discovery.getBaseUrl("permission"),Ze=await v()(`${We}/authorize`,{method:"POST",body:JSON.stringify(ce),headers:{...this.getAuthorizationHeader(K==null?void 0:K.token),"content-type":"application/json"}});if(!Ze.ok)throw await y.VL.fromResponse(Ze);const me=await Ze.json(),de=x(H,new Set(ce.items.map(({id:Ce})=>Ce))).parse(me).items.reduce((Ce,Ve)=>(Ce[Ve.id]=Ve,Ce),{});return ce.items.map(Ce=>de[Ce.id])}getAuthorizationHeader(P){return P?{Authorization:`Bearer ${P}`}:{}}}},68099:function(ee,s,e){"use strict";e.d(s,{iM:function(){return R},RV:function(){return c},gI:function(){return a}});var r=e(2784),t=e(36964);const c=(0,t.createApiRef)({id:"plugin.permission.api"});var f=e(40749);class R{constructor(y,g){this.permissionClient=y,this.identityApi=g}static create(y){const{config:g,discovery:v,identity:T}=y,L=new f.Y2({discovery:v,config:g});return new R(L,T)}async authorize(y){return(await this.permissionClient.authorize([y],await this.identityApi.getCredentials()))[0]}}var m=e(49857);function a(u){const y=(0,t.useApi)(c),{data:g,error:v}=(0,m.ZP)(u,async T=>{if((0,f.g2)(T.permission)&&!T.resourceRef)return f.rG.DENY;const{result:L}=await y.authorize(T);return L});return v?{error:v,loading:!1,allowed:!1}:g===void 0?{loading:!0,allowed:!1}:{loading:!1,allowed:g===f.rG.ALLOW}}const i=u=>{const{permission:y,resourceRef:g,errorComponent:v,...T}=u,L=usePermission(isResourcePermission(y)?{permission:y,resourceRef:g}:{permission:y}),B=useApp(),{NotFoundErrorPage:k}=B.getComponents();let F=v===void 0?React.createElement(k,null):v;return L.loading?F=null:L.allowed&&(F=u.element),React.createElement(Route,{...T,element:F})}},73624:function(ee,s,e){"use strict";e.d(s,{FA:function(){return a},Nd:function(){return B},Rx:function(){return v}});var r=e(36964);const t=(0,r.createApiRef)({id:"plugin.search.queryservice"});class c{constructor(F){this.mockedResults=F}query(){return Promise.resolve(this.mockedResults||{results:[]})}}var f=e(2784),R=e(79692);const m=(0,R.Z)(()=>({highlight:{}}),{name:"BackstageHighlightedSearchResultText"}),a=({text:k,preTag:F,postTag:x})=>{const M=m(),D=(0,f.useMemo)(()=>k.split(new RegExp(`(${F}.+?${x})`)),[x,F,k]);return f.createElement(f.Fragment,null,D.map((P,H)=>P.includes(F)?f.createElement("mark",{className:M.highlight,key:H},P.replace(new RegExp(`${F}|${x}`,"g"),"")):P))};var i=e(76241),u=e(64279),y=e(1849);const g=(0,i.CT)("search-context"),v=()=>{const k=(0,f.useContext)(g);if(!k)throw new Error("useSearch must be used within a SearchContextProvider");const F=k.atVersion(1);if(!F)throw new Error("No SearchContext v1 found");return F},T=()=>useContext(g)!==void 0,L={term:"",pageCursor:void 0,filters:{},types:[]},B=k=>{var Ue,Ye,it,Rt;const{initialState:F=L,children:x}=k,M=(0,r.useApi)(t),[D,P]=(0,f.useState)(F.pageCursor),[H,K]=(0,f.useState)(F.filters),[ce,We]=(0,f.useState)(F.term),[Ze,me]=(0,f.useState)(F.types),je=(0,y.Z)(ce),de=(0,u.default)(()=>M.query({term:ce,filters:H,pageCursor:D,types:Ze}),[ce,H,Ze,D]),Ce=!de.loading&&!de.error&&((Ue=de.value)==null?void 0:Ue.nextPageCursor),Ve=!de.loading&&!de.error&&((Ye=de.value)==null?void 0:Ye.previousPageCursor),Ke=(0,f.useCallback)(()=>{var nt;P((nt=de.value)==null?void 0:nt.nextPageCursor)},[(it=de.value)==null?void 0:it.nextPageCursor]),qe=(0,f.useCallback)(()=>{var nt;P((nt=de.value)==null?void 0:nt.previousPageCursor)},[(Rt=de.value)==null?void 0:Rt.previousPageCursor]);(0,f.useEffect)(()=>{ce&&je&&ce!==je&&P(void 0)},[ce,je,F.pageCursor]);const Re={result:de,filters:H,setFilters:K,term:ce,setTerm:We,types:Ze,setTypes:me,pageCursor:D,setPageCursor:P,fetchNextPage:Ce?Ke:void 0,fetchPreviousPage:Ve?qe:void 0},Fe=(0,i.EI)({1:Re});return f.createElement(r.AnalyticsContext,{attributes:{searchTypes:Ze.sort().join(",")}},f.createElement(g.Provider,{value:Fe,children:x}))}},47955:function(ee,s,e){"use strict";e.d(s,{Zz:function(){return R},oZ:function(){return je},DR:function(){return m},ZS:function(){return P},KY:function(){return i},gT:function(){return T},Dl:function(){return L},$L:function(){return v},x1:function(){return H}});var r=e(2784),t=e(10289),c=e(36964);const f="techdocs.addons.addon.v1",R="techdocs.addons.wrapper.v1",m=()=>null;(0,c.attachComponentData)(m,R,!0);const a=de=>`${f}.${de.toLocaleLowerCase("en-US")}`;function i(de){const{name:Ce,component:Ve}=de;return(0,c.createReactExtension)({name:Ce,component:{sync:Ke=>r.createElement(Ve,{...Ke})},data:{[f]:de,[a(Ce)]:!0}})}const u=(de,Ce)=>de.selectByComponentData({key:Ce}).getElements()[0],y=de=>de.selectByComponentData({key:R}).selectByComponentData({key:f}),g=de=>de.selectByComponentData({key:R}).findComponentData({key:f}),v=()=>{const de=(0,t.pC)(),Ce=(0,c.useElementFilter)(de,y),Ve=(0,c.useElementFilter)(de,g),Ke=(0,r.useCallback)(Fe=>{var Ye;if(!Ce||!Fe)return null;const Ue=a(Fe.name);return(Ye=u(Ce,Ue))!=null?Ye:null},[Ce]),qe=(0,r.useCallback)(Fe=>{const Ue=Ve.find(Ye=>Ye.name===Fe);return Ue?Ke(Ue):null},[Ve,Ke]),Re=(0,r.useCallback)(Fe=>{const Ue=Ve.filter(Ye=>Ye.location===Fe);return Ue.length?Ue.map(Ke):null},[Ve,Ke]);return{renderComponentByName:qe,renderComponentsByLocation:Re}},T=(0,c.createApiRef)({id:"plugin.techdocs.service"}),L=(0,c.createApiRef)({id:"plugin.techdocs.storageservice"});var B=e(64279),k=e(48023),F=e(76241);const x=(de,Ce)=>(0,k.eE)(de)===(0,k.eE)(Ce),M={title:"",subtitle:"",setTitle:()=>{},setSubtitle:()=>{},setShadowRoot:()=>{},metadata:{loading:!0},entityMetadata:{loading:!0},entityRef:{kind:"",name:"",namespace:""}},D=(0,F.CT)("techdocs-reader-page-context"),P=(0,r.memo)(({entityRef:de,children:Ce})=>{const Ve=(0,c.useApi)(T),Ke=(0,B.default)(async()=>Ve.getTechDocsMetadata(de),[de]),qe=(0,B.default)(async()=>Ve.getEntityMetadata(de),[de]),[Re,Fe]=(0,r.useState)(M.title),[Ue,Ye]=(0,r.useState)(M.subtitle),[it,Rt]=(0,r.useState)(M.shadowRoot),nt={metadata:Ke,entityRef:de,entityMetadata:qe,shadowRoot:it,setShadowRoot:Rt,title:Re,setTitle:Fe,subtitle:Ue,setSubtitle:Ye},ut=(0,F.EI)({1:nt});return r.createElement(D.Provider,{value:ut},Ce instanceof Function?Ce(nt):Ce)},(de,Ce)=>x(de.entityRef,Ce.entityRef)),H=()=>{const de=(0,r.useContext)(D);if(de===void 0)return M;const Ce=de.atVersion(1);if(Ce===void 0)throw new Error("No context found for version 1.");return Ce};var K=e(54073);const ce=()=>{const{shadowRoot:de}=useTechDocsReaderPage();return de},We=de=>{const Ce=ce();return Ce?de.map(Ve=>Ce==null?void 0:Ce.querySelectorAll(Ve)).filter(Ve=>Ve.length).map(Ve=>Array.from(Ve)).flat():[]},Ze=de=>de.toString()&&de.rangeCount&&de.getRangeAt(0).getBoundingClientRect().top,me=(de=0)=>{const Ce=ce(),[Ve,Ke]=useState(null),qe=useMemo(()=>debounce(()=>{const Re=Ce,Fe=Re.getSelection?Re.getSelection():document.getSelection();Fe&&Ze(Fe)?Ke(Fe):Ke(null)},de),[Ce,Ke,de]);return useEffect(()=>(window.document.addEventListener("selectionchange",qe),()=>window.document.removeEventListener("selectionchange",qe)),[qe]),Ve},je=Object.freeze({Header:"Header",Subheader:"Subheader",Settings:"Settings",PrimarySidebar:"PrimarySidebar",SecondarySidebar:"SecondarySidebar",Content:"Content"})},94067:function(ee,s,e){"use strict";e.r(s),e.d(s,{EmbeddedDocsRouter:function(){return B},Router:function(){return L},isTechDocsAvailable:function(){return T}});var r=e(2784),t=e(10289),c=e(53479),f=e(53492),R=e(48023),m=e(20961),a=e(16172),i=e(28626);const u=({entity:k})=>{const F=(0,R.iB)(k);return r.createElement(m.I6,{entityRef:F},r.createElement(a.b,null),r.createElement(i.Fq,{withSearch:!1}))};var y=e(50021),g=e(26220);const v="backstage.io/techdocs-ref",T=k=>{var F,x;return Boolean((x=(F=k==null?void 0:k.metadata)==null?void 0:F.annotations)==null?void 0:x[v])},L=()=>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)})),B=k=>{var D;const{children:F}=k,{entity:x}=(0,c.useEntity)();return((D=x.metadata.annotations)==null?void 0:D[v])?r.createElement(t.Z5,null,r.createElement(t.AW,{element:r.createElement(u,{entity:x})},F)):r.createElement(f.MissingAnnotationEmptyState,{annotation:v})}},3337:function(ee,s,e){"use strict";var r=e(36964);const t=(0,r.createApiRef)({id:"plugin.techdocs.storageservice"}),c=(0,r.createApiRef)({id:"plugin.techdocs.service"})},42723:function(ee,s,e){"use strict";e.d(s,{k:function(){return R},p:function(){return f}});var r=e(10179),t=e(76372),c=e.n(t);class f{constructor(a){_(this,"configApi");_(this,"discoveryApi");_(this,"fetchApi");this.configApi=a.configApi,this.discoveryApi=a.discoveryApi,this.fetchApi=a.fetchApi}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getTechDocsMetadata(a){const{kind:i,namespace:u,name:y}=a,v=`${await this.getApiOrigin()}/metadata/techdocs/${u}/${i}/${y}`,T=await this.fetchApi.fetch(`${v}`);if(!T.ok)throw await r.VL.fromResponse(T);return await T.json()}async getEntityMetadata(a){const{kind:i,namespace:u,name:y}=a,v=`${await this.getApiOrigin()}/metadata/entity/${u}/${i}/${y}`,T=await this.fetchApi.fetch(`${v}`);if(!T.ok)throw await r.VL.fromResponse(T);return await T.json()}}class R{constructor(a){_(this,"configApi");_(this,"discoveryApi");_(this,"identityApi");_(this,"fetchApi");this.configApi=a.configApi,this.discoveryApi=a.discoveryApi,this.identityApi=a.identityApi,this.fetchApi=a.fetchApi}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getStorageUrl(){var a;return(a=this.configApi.getOptionalString("techdocs.storageUrl"))!=null?a:`${await this.discoveryApi.getBaseUrl("techdocs")}/static/docs`}async getBuilder(){return this.configApi.getString("techdocs.builder")}async getEntityDocs(a,i){const{kind:u,namespace:y,name:g}=a,T=`${await this.getStorageUrl()}/${y}/${u}/${g}/${i}`,L=await this.fetchApi.fetch(`${T.endsWith("/")?T:`${T}/`}index.html`);let B="";switch(L.status){case 404:throw B="Page not found. ",i||(B+="This could be because there is no index.md file in the root of the docs directory of this repository."),new r.dR(B);case 500:throw B="Could not generate documentation or an error in the TechDocs backend. ",new Error(B);default:break}return L.text()}async syncEntityDocs(a,i=()=>{}){const{kind:u,namespace:y,name:g}=a,T=`${await this.getApiOrigin()}/sync/${y}/${u}/${g}`,{token:L}=await this.identityApi.getCredentials();return new Promise((B,k)=>{const F=new t.EventSourcePolyfill(T,{withCredentials:!0,headers:L?{Authorization:`Bearer ${L}`}:{}});F.addEventListener("log",x=>{x.data&&i(JSON.parse(x.data))}),F.addEventListener("finish",x=>{let M=!1;x.data&&({updated:M}=JSON.parse(x.data)),B(M?"updated":"cached")}),F.onerror=x=>{switch(F.close(),x.status){case 404:k(new r.dR(x.message));return;default:k(new Error(x.data));return}}})}async getBaseUrl(a,i,u){const{kind:y,namespace:g,name:v}=i,L=`${await this.getApiOrigin()}/static/docs/${g}/${y}/${v}/${u}`;return new URL(a,L.endsWith("/")?L:`${L}/`).toString()}}},97589:function(ee,s,e){"use strict";e.d(s,{D:function(){return r}});function r(t,c){return c.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")?t:t.toLocaleLowerCase("en-US")}},2546:function(ee,s,e){"use strict";e.d(s,{u:function(){return a}});var r=e(2784),t=e(53492),c=e(53479),f=e(1114),R=e(70335),m=e(21956);const a=i=>{const{initialFilter:u="all",columns:y,actions:g}=i;return r.createElement(f.j,null,r.createElement(t.Content,null,r.createElement(t.ContentHeader,{title:""},r.createElement(t.SupportButton,null,"Discover documentation in your ecosystem.")),r.createElement(c.EntityListProvider,null,r.createElement(c.CatalogFilterLayout,null,r.createElement(c.CatalogFilterLayout.Filters,null,r.createElement(R.f,null),r.createElement(c.UserListPicker,{initialFilter:u}),r.createElement(c.EntityOwnerPicker,null),r.createElement(c.EntityTagPicker,null)),r.createElement(c.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),c=e(36964),f=e(53492),R=e(94339),m=e(16111),a=e(24579),i=e(14503),u=e(2784);const y=T=>{const{entities:L}=T,B=(0,c.useRouteRef)(r.Fw),k=(0,c.useApi)(c.configApiRef);return L?u.createElement(f.ItemCardGrid,{"data-testid":"docs-explore"},L!=null&&L.length?L.map((F,x)=>{var M,D;return u.createElement(R.Z,{key:x},u.createElement(m.Z,null,u.createElement(f.ItemCardHeader,{title:(M=F.metadata.title)!=null?M:F.metadata.name})),u.createElement(a.Z,null,F.metadata.description),u.createElement(i.Z,null,u.createElement(f.Button,{to:B({namespace:(0,t.D)((D=F.metadata.namespace)!=null?D:"default",k),kind:(0,t.D)(F.kind,k),name:(0,t.D)(F.metadata.name,k)}),color:"primary","data-testid":"read_docs"},"Read Docs")))}):null):null};var g=e(53479);const v=()=>{const{loading:T,error:L,entities:B}=useEntityList();return L?React.createElement(WarningPanel,{severity:"error",title:"Could not load available documentation."},React.createElement(CodeSnippet,{language:"text",text:L.toString()})):T||!B?React.createElement(Progress,null):(B.sort((k,F)=>{var x,M;return((x=k.metadata.title)!=null?x:k.metadata.name).localeCompare((M=F.metadata.title)!=null?M:F.metadata.name)}),React.createElement(DocsCardGrid,{entities:B}))}},38634:function(ee,s,e){"use strict";e.d(s,{H:function(){return g}});var r=e(2784),t=e(95074),c=e(36964),f=e(48023),R=e(53479),m=e(68725),a=e(53492),i=e(98095),u=e(3792),y=e(97589);const g=v=>{const{entities:T,title:L,loading:B,columns:k,actions:F}=v,[,x]=(0,t.Z)(),M=(0,c.useRouteRef)(m.Fw),D=(0,c.useApi)(c.configApiRef);if(!T)return null;const P=T.map(ce=>{var Ze;const We=(0,R.getEntityRelations)(ce,f.S4);return{entity:ce,resolved:{docsUrl:M({namespace:(0,y.D)((Ze=ce.metadata.namespace)!=null?Ze:"default",D),kind:(0,y.D)(ce.kind,D),name:(0,y.D)(ce.metadata.name,D)}),ownedByRelations:We,ownedByRelationsTitle:We.map(me=>(0,R.humanizeEntityRef)(me,{defaultKind:"group"})).join(", ")}}}),H=[u.N.createNameColumn(),u.N.createOwnerColumn(),u.N.createTypeColumn()],K=[i.n.createCopyDocsUrlAction(x)];return r.createElement(r.Fragment,null,B||P&&P.length>0?r.createElement(a.Table,{isLoading:B,options:{paging:!0,pageSize:20,search:!0,actionsColumnIndex:-1},data:P,columns:k||H,actions:F||K,title:L?`${L} (${P.length})`:`All (${P.length})`}):r.createElement(a.EmptyState,{missing:"data",title:"No documents to show",description:"Create your own document. Check out our Getting Started Information",action:r.createElement(a.Button,{color:"primary",to:"https://backstage.io/docs/features/techdocs/getting-started",variant:"contained"},"DOCS")}))};g.columns=u.N,g.actions=i.n},12481:function(ee,s,e){"use strict";e.d(s,{n:function(){return y}});var r=e(2784),t=e(95074),c=e(76635),f=e.n(c),R=e(53492),m=e(53479),a=e(38634),i=e(98095),u=e(3792);const y=g=>{var K,ce;const{columns:v,actions:T}=g,{loading:L,error:B,entities:k,filters:F}=(0,m.useEntityList)(),{isStarredEntity:x,toggleStarredEntity:M}=(0,m.useStarredEntities)(),[,D]=(0,t.Z)(),P=(0,c.capitalize)((ce=(K=F.user)==null?void 0:K.value)!=null?ce:"all"),H=[i.n.createCopyDocsUrlAction(D),i.n.createStarEntityAction(x,M)];return B?r.createElement(R.WarningPanel,{severity:"error",title:"Could not load available documentation."},r.createElement(R.CodeSnippet,{language:"text",text:B.toString()})):r.createElement(a.H,{title:P,entities:k,loading:L,actions:T||H,columns:v})};y.columns=u.N,y.actions=i.n},98095:function(ee,s,e){"use strict";e.d(s,{n:function(){return a}});var r=e(2784),t=e(39981),c=e(2337),f=e(11640),R=e(28347);const m=(0,c.Z)({root:{color:"#f3ba37"}})(f.Z),a={createCopyDocsUrlAction(i){return u=>({icon:()=>r.createElement(t.Z,{fontSize:"small"}),tooltip:"Click to copy documentation link to clipboard",onClick:()=>i(`${window.location.origin}${u.resolved.docsUrl}`)})},createStarEntityAction(i,u){return({entity:y})=>{const g=i(y);return{cellStyle:{paddingLeft:"1em"},icon:()=>g?r.createElement(m,null):r.createElement(R.Z,null),tooltip:g?"Remove from favorites":"Add to favorites",onClick:()=>u(y)}}}}},3792:function(ee,s,e){"use strict";e.d(s,{N:function(){return R}});var r=e(2784),t=e(53492),c=e(53479);function f(m){return m.metadata.title||m.metadata.name}const R={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},f(m.entity)),subvalue:m.entity.metadata.description})}},createOwnerColumn(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:m})=>r.createElement(c.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),c=e(72580),f=e.n(c);e.o(c,"DefaultTechDocsHome")&&e.d(s,{DefaultTechDocsHome:function(){return c.DefaultTechDocsHome}})},72580:function(){},50021:function(ee,s,e){"use strict";e.r(s),e.d(s,{TechDocsIndexPage:function(){return f}});var r=e(2784),t=e(10289),c=e(2546);const f=()=>(0,t.pC)()||r.createElement(c.u,null)},1114:function(ee,s,e){"use strict";e.d(s,{j:function(){return f}});var r=e(2784),t=e(53492),c=e(36964);const f=R=>{var u;const{children:m}=R,i=`Documentation available in ${(u=(0,c.useApi)(c.configApiRef).getOptionalString("organization.name"))!=null?u:"Backstage"}`;return r.createElement(t.PageWithHeader,{title:"Documentation",subtitle:i,themeId:"documentation"},m)}},70335:function(ee,s,e){"use strict";e.d(s,{f:function(){return f}});var r=e(2784),t=e(53479);class c{getCatalogFilters(){return{"metadata.annotations.backstage.io/techdocs-ref":t.CATALOG_FILTER_EXISTS}}}const f=()=>{const{updateFilters:R}=(0,t.useEntityList)();return(0,r.useEffect)(()=>{R({techdocs:new c})},[R]),null}},19192:function(ee,s,e){"use strict";e.d(s,{DefaultTechDocsHome:function(){return c.u}});var r=e(51016),t=e(21956),c=e(2546),f=e(1114),R=e(70335)},82250:function(ee,s,e){"use strict";e.d(s,{DefaultTechDocsHome:function(){return a.DefaultTechDocsHome},TechDocsIndexPage:function(){return i.Jl},TechDocsReaderPage:function(){return i.I6},TechDocsReaderPageContent:function(){return R.Fq},TechDocsReaderPageHeader:function(){return R.SE},plugin:function(){return i.s4},techdocsPlugin:function(){return i.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 c=e(3337),f=e(42723),R=e(96393),m=e(47861),a=e(19192),i=e(20961),u=e(94067)},20961:function(ee,s,e){"use strict";e.d(s,{I6:function(){return y},Jl:function(){return u},s4:function(){return R}});var r=e(47955),t=e(42723),c=e(68725),f=e(36964);const R=(0,f.createPlugin)({id:"techdocs",apis:[(0,f.createApiFactory)({api:r.Dl,deps:{configApi:f.configApiRef,discoveryApi:f.discoveryApiRef,identityApi:f.identityApiRef,fetchApi:f.fetchApiRef},factory:({configApi:g,discoveryApi:v,identityApi:T,fetchApi:L})=>new t.k({configApi:g,discoveryApi:v,identityApi:T,fetchApi:L})}),(0,f.createApiFactory)({api:r.gT,deps:{configApi:f.configApiRef,discoveryApi:f.discoveryApiRef,fetchApi:f.fetchApiRef},factory:({configApi:g,discoveryApi:v,fetchApi:T})=>new t.p({configApi:g,discoveryApi:v,fetchApi:T})})],routes:{root:c._Z,docRoot:c.Fw,entityContent:c.pd}}),m=R.provide((0,f.createRoutableExtension)({name:"TechdocsPage",component:()=>Promise.resolve().then(e.bind(e,94067)).then(g=>g.Router),mountPoint:c._Z})),a=R.provide((0,f.createRoutableExtension)({name:"EntityTechdocsContent",component:()=>Promise.resolve().then(e.bind(e,94067)).then(g=>g.EmbeddedDocsRouter),mountPoint:c.pd})),i=R.provide((0,f.createRoutableExtension)({name:"TechDocsCustomHome",component:()=>e.e(7110).then(e.bind(e,57110)).then(g=>g.TechDocsCustomHome),mountPoint:c._Z})),u=R.provide((0,f.createRoutableExtension)({name:"TechDocsIndexPage",component:()=>Promise.resolve().then(e.bind(e,50021)).then(g=>g.TechDocsIndexPage),mountPoint:c._Z})),y=R.provide((0,f.createRoutableExtension)({name:"TechDocsReaderPage",component:()=>Promise.resolve().then(e.bind(e,26220)).then(g=>g.TechDocsReaderPage),mountPoint:c.Fw}))},26220:function(ee,s,e){"use strict";e.r(s),e.d(s,{TechDocsReaderLayout:function(){return i},TechDocsReaderPage:function(){return u}});var r=e(2784),t=e(10289),c=e(53492),f=e(47955),R=e(28626),m=e(99954),a=e(16172);const i=({withSearch:y,withHeader:g=!0})=>r.createElement(c.Page,{themeId:"documentation"},g&&r.createElement(m.S,null),r.createElement(a.b,null),r.createElement(R.Fq,{withSearch:y})),u=y=>{const{kind:g,name:v,namespace:T}=(0,t.UO)(),{children:L,entityRef:B={kind:g,name:v,namespace:T}}=y,k=(0,t.pC)();if(!L){const x=(k?r.Children.toArray(k.props.children):[]).find(M=>{var P,H;const{type:D}=M;return!((H=(P=D==null?void 0:D.__backstage_data)==null?void 0:P.map)!=null&&H.get(f.Zz))});return r.createElement(f.ZS,{entityRef:B},x||r.createElement(i,null))}return r.createElement(f.ZS,{entityRef:B},({metadata:F,entityMetadata:x,onReady:M})=>r.createElement(c.Page,{themeId:"documentation"},L instanceof Function?L({entityRef:B,techdocsMetadataValue:F.value,entityMetadataValue:x.value,onReady:M}):L))}},28626:function(ee,s,e){"use strict";e.d(s,{Fq:function(){return Tt},DK:function(){return K}});var r=e(2784),t=e(36617),c=e(79692),f=e(60905),R=e(8560),m=e(50236),a=e(19219),i=e(47955),u=e(53492),y=e(47861),g=e(23738),v=e(10289),T=e(60364),L=e(41128),B=e(36964),k=e(36356),F=e(64279),x=e(77446);function M({contentLoading:re,content:ue,activeSyncState:Q}){return re||Q==="BUILD_READY_RELOAD"||!ue&&Q==="CHECKING"?"CHECKING":!ue&&Q==="BUILDING"?"INITIAL_BUILD":ue?Q==="BUILDING"?"CONTENT_STALE_REFRESHING":Q==="BUILD_READY"?"CONTENT_STALE_READY":Q==="ERROR"?"CONTENT_STALE_ERROR":"CONTENT_FRESH":"CONTENT_NOT_FOUND"}function D(re,ue){const Q={...re};switch(ue.type){case"sync":ue.state==="CHECKING"&&(Q.buildLog=[]),Q.activeSyncState=ue.state,Q.syncError=ue.syncError;break;case"contentLoading":Q.contentLoading=!0,Q.contentError=void 0;break;case"content":typeof ue.path=="string"&&(Q.path=ue.path),Q.contentLoading=!1,Q.content=ue.content,Q.contentError=ue.contentError;break;case"buildLog":Q.buildLog=Q.buildLog.concat(ue.log);break;default:throw new Error}return["BUILD_READY","BUILD_READY_RELOAD"].includes(Q.activeSyncState)&&["contentLoading","content"].includes(ue.type)&&(Q.activeSyncState="UP_TO_DATE",Q.buildLog=[]),Q}function P(re,ue,Q,pe){var De,we;const[ie,Be]=(0,r.useReducer)(D,{activeSyncState:"CHECKING",path:pe,contentLoading:!0,buildLog:[]}),J=(0,B.useApi)(i.Dl),{retry:N}=(0,x.Z)(async()=>{Be({type:"contentLoading"});try{const Ne=await J.getEntityDocs({kind:re,namespace:ue,name:Q},pe);return Be({type:"content",content:Ne,path:pe}),Ne}catch(Ne){Be({type:"content",contentError:Ne,path:pe})}},[J,re,ue,Q,pe]),te=(0,r.useRef)({content:void 0,reload:()=>{}});return te.current={content:ie.content,reload:N},(0,F.default)(async()=>{Be({type:"sync",state:"CHECKING"});const Ne=setTimeout(()=>{Be({type:"sync",state:"BUILDING"})},1e3);try{switch(await J.syncEntityDocs({kind:re,namespace:ue,name:Q},Lt=>{Be({type:"buildLog",log:Lt})})){case"updated":te.current.content?Be({type:"sync",state:"BUILD_READY"}):(te.current.reload(),Be({type:"sync",state:"BUILD_READY_RELOAD"}));break;case"cached":Be({type:"sync",state:"UP_TO_DATE"});break;default:Be({type:"sync",state:"ERROR",syncError:new Error("Unexpected return state")});break}}catch(ht){Be({type:"sync",state:"ERROR",syncError:ht})}finally{clearTimeout(Ne)}},[re,Q,ue,J,Be,te]),{state:(0,r.useMemo)(()=>M({activeSyncState:ie.activeSyncState,contentLoading:ie.contentLoading,content:ie.content}),[ie.activeSyncState,ie.content,ie.contentLoading]),contentReload:N,path:ie.path,content:ie.content,contentErrorMessage:(De=ie.contentError)==null?void 0:De.toString(),syncErrorMessage:(we=ie.syncError)==null?void 0:we.toString(),buildLog:ie.buildLog}}const H=(0,r.createContext)({}),K=()=>(0,r.useContext)(H),ce=({children:re})=>{const{"*":ue=""}=(0,v.UO)(),{entityRef:Q}=(0,i.x1)(),{kind:pe,namespace:ie,name:Be}=Q,J=P(pe,ie,Be,ue);return r.createElement(H.Provider,{value:J},re instanceof Function?re(J):re)},We=re=>ue=>r.createElement(ce,null,r.createElement(re,{...ue})),Ze=(re,ue,Q)=>{const pe=re==="src"&&ue.endsWith(".svg"),ie=!ue.match(/^([a-z]*:)?\/\//i),Be=ue.startsWith(Q);return pe&&(ie||Be)},me=({techdocsStorageApi:re,entityId:ue,path:Q})=>async pe=>{const ie=await re.getApiOrigin(),Be=async(J,N)=>{for(const te of J)if(te.hasAttribute(N)){const Pe=te.getAttribute(N);if(!Pe)return;const De=await re.getBaseUrl(Pe,ue,Q);if(Ze(N,Pe,ie))try{const Ne=await(await fetch(De,{credentials:"include"})).text();te.setAttribute(N,`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(Ne)))}`)}catch{te.setAttribute("alt",`Error: ${Pe}`)}else te.setAttribute(N,De)}};return await Promise.all([Be(pe.querySelectorAll("img"),"src"),Be(pe.querySelectorAll("script"),"src"),Be(pe.querySelectorAll("source"),"src"),Be(pe.querySelectorAll("link"),"href"),Be(pe.querySelectorAll("a[download]"),"href")]),pe};var je=e(68370),de=e(67097),Ce=e(47093),Ve=e(82717),Ke=e.n(Ve);const qe=re=>ue=>{var Ne;const Q=ue.querySelector('[title="Edit this page"]');if(!Q||!Q.href)return ue;const pe=new URL(Q.href),ie=re.byUrl(pe);if((ie==null?void 0:ie.type)!=="github"&&(ie==null?void 0:ie.type)!=="gitlab")return ue;const Be=((Ne=ue.querySelector("article>h1"))==null?void 0:Ne.childNodes[0].textContent)||"",J=encodeURIComponent(`Documentation Feedback: ${Be}`),N=encodeURIComponent(`Page source:
32
+ ${Q.href}
33
+
34
+ Feedback:`),te=(ie==null?void 0:ie.type)==="github"?(0,je.Pb)(pe.href,"blob"):pe.href,Pe=Ke()(te),De=`/${Pe.organization}/${Pe.name}`,we=Q.cloneNode();switch(ie==null?void 0:ie.type){case"gitlab":we.href=`${pe.origin}${De}/issues/new?issue[title]=${J}&issue[description]=${N}`;break;case"github":we.href=`${pe.origin}${De}/issues/new?title=${J}&body=${N}`;break;default:return ue}return Ce.render(r.createElement(de.Z),we),we.style.paddingLeft="5px",we.title="Leave feedback for this page",we.id="git-feedback-link",Q==null||Q.insertAdjacentElement("beforebegin",we),ue};var Re=e(44882);const Fe=()=>re=>{const ue=re.querySelector('.md-header label[for="__drawer"]'),Q=re.querySelector("article");if(!ue||!Q)return re;const pe=ue.cloneNode();return Ce.render(r.createElement(Re.Z),pe),pe.id="toggle-sidebar",pe.title="Toggle Sidebar",pe.classList.add("md-content__button"),pe.style.setProperty("padding","0 0 0 5px"),pe.style.setProperty("margin","0.4rem 0 0.4rem 0.4rem"),Q==null||Q.prepend(pe),re},Ue=()=>re=>(((Q,pe)=>{Array.from(Q).filter(ie=>ie.hasAttribute(pe)).forEach(ie=>{const Be=ie.getAttribute(pe);if(Be){Be.match(/^https?:\/\//i)&&ie.setAttribute("target","_blank");try{const J=Ye(window.location.href);ie.setAttribute(pe,new URL(Be,J).toString())}catch{ie.replaceWith(ie.textContent||Be)}}})})(Array.from(re.getElementsByTagName("a")),"href"),re);function Ye(re){const ue=new URL(re);return!ue.pathname.endsWith("/")&&!ue.pathname.endsWith(".html")&&(ue.pathname+="/"),ue.toString()}const it=({baseUrl:re,onClick:ue})=>Q=>(Array.from(Q.getElementsByTagName("a")).forEach(pe=>{pe.addEventListener("click",ie=>{const J=pe.getAttribute("href");!J||J.startsWith(re)&&!pe.hasAttribute("download")&&(ie.preventDefault(),ue(ie,J))})}),Q);var Rt=e(15459),nt=e(80030),ut=e(72379),tt=e(41547);const rt=(0,Rt.Z)(re=>({tooltip:{fontSize:"inherit",color:re.palette.text.primary,margin:0,padding:re.spacing(.5),backgroundColor:"transparent",boxShadow:"none"}}))(nt.ZP),Bt=()=>r.createElement(ut.Z,null,r.createElement("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"})),jt=({text:re})=>{const[ue,Q]=(0,r.useState)(!1),pe=(0,r.useCallback)(()=>{navigator.clipboard.writeText(re),Q(!0)},[re]),ie=(0,r.useCallback)(()=>{Q(!1)},[Q]);return r.createElement(rt,{title:"Copied to clipboard",placement:"left",open:ue,onClose:ie,leaveDelay:1e3},r.createElement("button",{className:"md-clipboard md-icon",onClick:pe},r.createElement(Bt,null)))},Mt=re=>ue=>{var pe;const Q=ue.querySelectorAll("pre > code");for(const ie of Q){const Be=ie.textContent||"",J=document.createElement("div");(pe=ie==null?void 0:ie.parentElement)==null||pe.prepend(J),Ce.render(r.createElement(tt.Z,{theme:re},r.createElement(jt,{text:Be})),J)}return ue},In=()=>re=>{var ue;return(ue=re.querySelector(".md-header"))==null||ue.remove(),re},Xt=()=>re=>{var ue,Q;return(ue=re.querySelector(".md-footer .md-copyright"))==null||ue.remove(),(Q=re.querySelector(".md-footer-copyright"))==null||Q.remove(),re},yt=({docStorageUrl:re,onLoading:ue,onLoaded:Q})=>pe=>{const ie=Array.from(pe.querySelectorAll('head > link[rel="stylesheet"]')).filter(J=>{var N;return(N=J.getAttribute("href"))==null?void 0:N.startsWith(re)});let Be=ie.length;return Be>0&&ue(pe),ie.forEach(J=>J.addEventListener("load",()=>{Be-=1,Be===0&&Q(pe)})),pe};var un=e(35368),se=e.n(un);const W=/main\.[A-Fa-f0-9]{8}\.min\.css$/,ae=/^https:\/\/fonts\.googleapis\.com/,ge=/^https:\/\/fonts\.gstatic\.com/,ye=re=>{if(re.nodeName&&re.nodeName==="LINK"){const ue=re.getAttribute("href")||"";ue.match(W)&&re.setAttribute("rel","stylesheet"),ue.match(ae)&&re.setAttribute("rel","stylesheet"),ue.match(ge)&&re.setAttribute("rel","preconnect")}return re},Oe=re=>ue=>{if(ue.nodeName==="IFRAME"){const Q=ue.getAttribute("src");if(!Q)return ue.remove(),ue;try{const pe=new URL(Q);re.some(Be=>pe.host===Be)||ue.remove()}catch(pe){console.warn(`Invalid iframe src, ${pe}`),ue.remove()}}return ue},ze=re=>{const ue=(re==null?void 0:re.getOptionalStringArray("allowedIframeHosts"))||[];return Q=>{se().addHook("afterSanitizeAttributes",ye);const pe=["link"];return ue.length>0&&(se().addHook("beforeSanitizeElements",Oe(ue)),pe.push("iframe")),se().sanitize(Q.innerHTML,{ADD_TAGS:pe,FORBID_TAGS:["style"],WHOLE_DOCUMENT:!0,RETURN_DOM:!0})}},be=({css:re})=>ue=>(ue.getElementsByTagName("head")[0].insertAdjacentHTML("beforeend",`<style>${re}</style>`),ue),_e=()=>re=>(setTimeout(()=>{var ue;if(window.location.hash){const Q=window.location.hash.slice(1);(ue=re==null?void 0:re.querySelector(`[id="${Q}"]`))==null||ue.scrollIntoView()}},200),re),ct=async(re,ue)=>{let Q;if(typeof re=="string")Q=new DOMParser().parseFromString(re,"text/html").documentElement;else if(re instanceof Element)Q=re;else throw new Error("dom is not a recognized type");for(const pe of ue)Q=await pe(Q);return Q},wt=["h1","h2","h3","h4","h5","h6"],It=re=>{const ue=(0,v.s0)(),Q=(0,T.Z)(),pe=(0,B.useApi)(i.Dl),ie=(0,B.useApi)(k.q3),Be=(0,B.useApi)(B.configApiRef),{namespace:J,kind:N,name:te}=re,{state:Pe,path:De,content:we}=K(),Ne=Q.palette.type==="dark",[ht,Lt]=(0,r.useState)(),[Et,Ut]=(0,r.useState)(null),{isPinned:dt}=(0,r.useContext)(u.SidebarPinStateContext),gt=(0,r.useCallback)(()=>{if(!Et||!ht)return;const bt=Et.querySelector(".md-container > .md-tabs"),at=window.matchMedia("screen and (max-width: 76.1875em)").matches,pt=Math.max(Et.getBoundingClientRect().top,0);ht.forEach(Nt=>{at?Nt.style.top="0px":bt?Nt.style.top=`${pt+bt.getBoundingClientRect().height}px`:Nt.style.top=`${pt}px`})},[Et,ht]);(0,r.useEffect)(()=>(gt(),window.addEventListener("scroll",gt,!0),window.addEventListener("resize",gt),()=>{window.removeEventListener("scroll",gt,!0),window.removeEventListener("resize",gt)}),[gt,Pe]);const Qe=(0,r.useCallback)(()=>{if(!Et)return;const bt=Et.querySelector(".md-footer");bt&&(bt.style.width=`${Et.getBoundingClientRect().width}px`)},[Et]);(0,r.useEffect)(()=>(Qe(),window.addEventListener("resize",Qe),()=>{window.removeEventListener("resize",Qe)}));const Ot=(0,r.useCallback)((bt,at)=>ct(bt,[ze(Be.getOptionalConfig("techdocs.sanitizer")),me({techdocsStorageApi:pe,entityId:{kind:N,name:te,namespace:J},path:at}),Ue(),Fe(),In(),Xt(),qe(ie),be({css:`
35
+ /*
36
+ As the MkDocs output is rendered in shadow DOM, the CSS variable definitions on the root selector are not applied. Instead, they have to be applied on :host.
37
+ As there is no way to transform the served main*.css yet (for example in the backend), we have to copy from main*.css and modify them.
38
+ */
39
+ :host {
40
+ /* FONT */
41
+ --md-default-fg-color: ${Q.palette.text.primary};
42
+ --md-default-fg-color--light: ${Q.palette.text.secondary};
43
+ --md-default-fg-color--lighter: ${(0,L.$n)(Q.palette.text.secondary,.7)};
44
+ --md-default-fg-color--lightest: ${(0,L.$n)(Q.palette.text.secondary,.3)};
45
+
46
+ /* BACKGROUND */
47
+ --md-default-bg-color:${Q.palette.background.default};
48
+ --md-default-bg-color--light: ${Q.palette.background.paper};
49
+ --md-default-bg-color--lighter: ${(0,L.$n)(Q.palette.background.paper,.7)};
50
+ --md-default-bg-color--lightest: ${(0,L.$n)(Q.palette.background.paper,.3)};
51
+
52
+ /* PRIMARY */
53
+ --md-primary-fg-color: ${Q.palette.primary.main};
54
+ --md-primary-fg-color--light: ${Q.palette.primary.light};
55
+ --md-primary-fg-color--dark: ${Q.palette.primary.dark};
56
+ --md-primary-bg-color: ${Q.palette.primary.contrastText};
57
+ --md-primary-bg-color--light: ${(0,L.$n)(Q.palette.primary.contrastText,.7)};
58
+
59
+ /* ACCENT */
60
+ --md-accent-fg-color: var(--md-primary-fg-color);
61
+
62
+ /* SHADOW */
63
+ --md-shadow-z1: ${Q.shadows[1]};
64
+ --md-shadow-z2: ${Q.shadows[2]};
65
+ --md-shadow-z3: ${Q.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: ${Q.palette.text.primary};
102
+ --md-code-bg-color: ${Q.palette.background.paper};
103
+ --md-code-hl-color: ${(0,L.Fq)(Q.palette.warning.main,.5)};
104
+ --md-code-hl-keyword-color: ${Ne?Q.palette.primary.light:Q.palette.primary.dark};
105
+ --md-code-hl-function-color: ${Ne?Q.palette.secondary.light:Q.palette.secondary.dark};
106
+ --md-code-hl-string-color: ${Ne?Q.palette.success.light:Q.palette.success.dark};
107
+ --md-code-hl-number-color: ${Ne?Q.palette.error.light:Q.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: ${Q.palette.text.primary};
122
+ --md-typeset-del-color: ${Ne?(0,L.Fq)(Q.palette.error.dark,.5):(0,L.Fq)(Q.palette.error.light,.5)};
123
+ --md-typeset-ins-color: ${Ne?(0,L.Fq)(Q.palette.success.dark,.5):(0,L.Fq)(Q.palette.success.light,.5)};
124
+ --md-typeset-mark-color: ${Ne?(0,L.Fq)(Q.palette.warning.dark,.5):(0,L.Fq)(Q.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
+ `}),be({css:`
141
+ body {
142
+ --md-text-color: var(--md-default-fg-color);
143
+ --md-text-link-color: var(--md-accent-fg-color);
144
+ --md-text-font-family: ${Q.typography.fontFamily};
145
+ font-family: var(--md-text-font-family);
146
+ background-color: unset;
147
+ }
148
+ `}),be({css:`
149
+ .md-grid {
150
+ max-width: 100%;
151
+ margin: 0;
152
+ }
153
+
154
+ .md-nav {
155
+ font-size: calc(var(--md-typeset-font-size) * 0.9);
156
+ }
157
+ .md-nav__link {
158
+ display: flex;
159
+ align-items: center;
160
+ justify-content: space-between;
161
+ }
162
+ .md-nav__icon {
163
+ height: 20px !important;
164
+ width: 20px !important;
165
+ margin-left:${Q.spacing(1)}px;
166
+ }
167
+ .md-nav__icon svg {
168
+ margin: 0;
169
+ width: 20px !important;
170
+ height: 20px !important;
171
+ }
172
+ .md-nav__icon:after {
173
+ width: 20px !important;
174
+ height: 20px !important;
175
+ }
176
+
177
+ .md-main__inner {
178
+ margin-top: 0;
179
+ }
180
+
181
+ .md-sidebar {
182
+ bottom: 75px;
183
+ position: fixed;
184
+ width: 16rem;
185
+ overflow-y: auto;
186
+ overflow-x: hidden;
187
+ scrollbar-color: rgb(193, 193, 193) #eee;
188
+ scrollbar-width: thin;
189
+ }
190
+ .md-sidebar .md-sidebar__scrollwrap {
191
+ width: calc(16rem - 10px);
192
+ }
193
+ .md-sidebar--secondary {
194
+ right: ${Q.spacing(3)}px;
195
+ }
196
+ .md-sidebar::-webkit-scrollbar {
197
+ width: 5px;
198
+ }
199
+ .md-sidebar::-webkit-scrollbar-button {
200
+ width: 5px;
201
+ height: 5px;
202
+ }
203
+ .md-sidebar::-webkit-scrollbar-track {
204
+ background: #eee;
205
+ border: 1 px solid rgb(250, 250, 250);
206
+ box-shadow: 0px 0px 3px #dfdfdf inset;
207
+ border-radius: 3px;
208
+ }
209
+ .md-sidebar::-webkit-scrollbar-thumb {
210
+ width: 5px;
211
+ background: rgb(193, 193, 193);
212
+ border: transparent;
213
+ border-radius: 3px;
214
+ }
215
+ .md-sidebar::-webkit-scrollbar-thumb:hover {
216
+ background: rgb(125, 125, 125);
217
+ }
218
+
219
+ .md-content {
220
+ max-width: calc(100% - 16rem * 2);
221
+ margin-left: 16rem;
222
+ margin-bottom: 50px;
223
+ }
224
+
225
+ .md-footer {
226
+ position: fixed;
227
+ bottom: 0px;
228
+ }
229
+ .md-footer__title {
230
+ background-color: unset;
231
+ }
232
+ .md-footer-nav__link {
233
+ width: 16rem;
234
+ }
235
+
236
+ .md-dialog {
237
+ background-color: unset;
238
+ }
239
+
240
+ @media screen and (min-width: 76.25em) {
241
+ .md-sidebar {
242
+ height: auto;
243
+ }
244
+ }
245
+
246
+ @media screen and (max-width: 76.1875em) {
247
+ .md-nav {
248
+ transition: none !important;
249
+ background-color: var(--md-default-bg-color)
250
+ }
251
+ .md-nav--primary .md-nav__title {
252
+ cursor: auto;
253
+ color: var(--md-default-fg-color);
254
+ font-weight: 700;
255
+ white-space: normal;
256
+ line-height: 1rem;
257
+ height: auto;
258
+ display: flex;
259
+ flex-flow: column;
260
+ row-gap: 1.6rem;
261
+ padding: 1.2rem .8rem .8rem;
262
+ background-color: var(--md-default-bg-color);
263
+ }
264
+ .md-nav--primary .md-nav__title~.md-nav__list {
265
+ box-shadow: none;
266
+ }
267
+ .md-nav--primary .md-nav__title ~ .md-nav__list > :first-child {
268
+ border-top: none;
269
+ }
270
+ .md-nav--primary .md-nav__title .md-nav__button {
271
+ display: none;
272
+ }
273
+ .md-nav--primary .md-nav__title .md-nav__icon {
274
+ color: var(--md-default-fg-color);
275
+ position: static;
276
+ height: auto;
277
+ margin: 0 0 0 -0.2rem;
278
+ }
279
+ .md-nav--primary > .md-nav__title [for="none"] {
280
+ padding-top: 0;
281
+ }
282
+ .md-nav--primary .md-nav__item {
283
+ border-top: none;
284
+ }
285
+ .md-nav--primary :is(.md-nav__title,.md-nav__item) {
286
+ font-size : var(--md-typeset-font-size);
287
+ }
288
+ .md-nav .md-source {
289
+ display: none;
290
+ }
291
+
292
+ .md-sidebar {
293
+ height: 100%;
294
+ }
295
+ .md-sidebar--primary {
296
+ width: 12.1rem !important;
297
+ z-index: 200;
298
+ left: ${dt?"calc(-12.1rem + 242px)":"calc(-12.1rem + 72px)"} !important;
299
+ }
300
+ .md-sidebar--secondary:not([hidden]) {
301
+ display: none;
302
+ }
303
+
304
+ .md-content {
305
+ max-width: 100%;
306
+ margin-left: 0;
307
+ }
308
+
309
+ .md-header__button {
310
+ margin: 0.4rem 0;
311
+ margin-left: 0.4rem;
312
+ padding: 0;
313
+ }
314
+
315
+ .md-overlay {
316
+ left: 0;
317
+ }
318
+
319
+ .md-footer {
320
+ position: static;
321
+ padding-left: 0;
322
+ }
323
+ .md-footer-nav__link {
324
+ /* footer links begin to overlap at small sizes without setting width */
325
+ width: 50%;
326
+ }
327
+ }
328
+
329
+ @media screen and (max-width: 600px) {
330
+ .md-sidebar--primary {
331
+ left: -12.1rem !important;
332
+ width: 12.1rem;
333
+ }
334
+ }
335
+ `}),be({css:`
336
+ .md-typeset {
337
+ font-size: var(--md-typeset-font-size);
338
+ }
339
+
340
+ ${wt.reduce((pt,Nt)=>{const Vt=Q.typography[Nt],{lineHeight:rn,fontFamily:Zt,fontWeight:Kt,fontSize:zt}=Vt,kt=xt=>{let _t=1;return typeof xt=="number"&&(_t=xt/16*.6),typeof xt=="string"&&(_t=xt.replace("rem","")),`calc(${_t} * var(--md-typeset-font-size))`};return pt.concat(`
341
+ .md-typeset ${Nt} {
342
+ color: var(--md-default-fg-color);
343
+ line-height: ${rn};
344
+ font-family: ${Zt};
345
+ font-weight: ${Kt};
346
+ font-size: ${kt(zt)};
347
+ }
348
+ `)},"")}
349
+
350
+ .md-typeset .md-content__button {
351
+ color: var(--md-default-fg-color);
352
+ }
353
+
354
+ .md-typeset hr {
355
+ border-bottom: 0.05rem dotted ${Q.palette.divider};
356
+ }
357
+
358
+ .md-typeset details {
359
+ font-size: var(--md-typeset-font-size) !important;
360
+ }
361
+ .md-typeset details summary {
362
+ padding-left: 2.5rem !important;
363
+ }
364
+ .md-typeset details summary:before,
365
+ .md-typeset details summary:after {
366
+ top: 50% !important;
367
+ width: 20px !important;
368
+ height: 20px !important;
369
+ transform: rotate(0deg) translateY(-50%) !important;
370
+ }
371
+ .md-typeset details[open] > summary:after {
372
+ transform: rotate(90deg) translateX(-50%) !important;
373
+ }
374
+
375
+ .md-typeset blockquote {
376
+ color: var(--md-default-fg-color--light);
377
+ border-left: 0.2rem solid var(--md-default-fg-color--light);
378
+ }
379
+
380
+ .md-typeset table:not([class]) {
381
+ font-size: var(--md-typeset-font-size);
382
+ border: 1px solid var(--md-default-fg-color);
383
+ border-bottom: none;
384
+ border-collapse: collapse;
385
+ }
386
+ .md-typeset table:not([class]) th {
387
+ font-weight: bold;
388
+ }
389
+ .md-typeset table:not([class]) td, .md-typeset table:not([class]) th {
390
+ border-bottom: 1px solid var(--md-default-fg-color);
391
+ }
392
+
393
+ .md-typeset pre > code::-webkit-scrollbar-thumb {
394
+ background-color: hsla(0, 0%, 0%, 0.32);
395
+ }
396
+ .md-typeset pre > code::-webkit-scrollbar-thumb:hover {
397
+ background-color: hsla(0, 0%, 0%, 0.87);
398
+ }
399
+ `}),be({css:`
400
+ /*
401
+ Disable CSS animations on link colors as they lead to issues in dark mode.
402
+ The dark mode color theme is applied later and theirfore there is always an animation from light to dark mode when navigation between pages.
403
+ */
404
+ .md-dialog, .md-nav__link, .md-footer__link, .md-typeset a, .md-typeset a::before, .md-typeset .headerlink {
405
+ transition: none;
406
+ }
407
+ `}),be({css:`
408
+ /* HIGHLIGHT */
409
+ .highlight .md-clipboard:after {
410
+ content: unset;
411
+ }
412
+
413
+ .highlight .nx {
414
+ color: ${Ne?"#ff53a3":"#ec407a"};
415
+ }
416
+
417
+ /* CODE HILITE */
418
+ .codehilite .gd {
419
+ background-color: ${Ne?"rgba(248,81,73,0.65)":"#fdd"};
420
+ }
421
+
422
+ .codehilite .gi {
423
+ background-color: ${Ne?"rgba(46,160,67,0.65)":"#dfd"};
424
+ }
425
+
426
+ /* TABBED */
427
+ .tabbed-set>input:nth-child(1):checked~.tabbed-labels>:nth-child(1),
428
+ .tabbed-set>input:nth-child(2):checked~.tabbed-labels>:nth-child(2),
429
+ .tabbed-set>input:nth-child(3):checked~.tabbed-labels>:nth-child(3),
430
+ .tabbed-set>input:nth-child(4):checked~.tabbed-labels>:nth-child(4),
431
+ .tabbed-set>input:nth-child(5):checked~.tabbed-labels>:nth-child(5),
432
+ .tabbed-set>input:nth-child(6):checked~.tabbed-labels>:nth-child(6),
433
+ .tabbed-set>input:nth-child(7):checked~.tabbed-labels>:nth-child(7),
434
+ .tabbed-set>input:nth-child(8):checked~.tabbed-labels>:nth-child(8),
435
+ .tabbed-set>input:nth-child(9):checked~.tabbed-labels>:nth-child(9),
436
+ .tabbed-set>input:nth-child(10):checked~.tabbed-labels>:nth-child(10),
437
+ .tabbed-set>input:nth-child(11):checked~.tabbed-labels>:nth-child(11),
438
+ .tabbed-set>input:nth-child(12):checked~.tabbed-labels>:nth-child(12),
439
+ .tabbed-set>input:nth-child(13):checked~.tabbed-labels>:nth-child(13),
440
+ .tabbed-set>input:nth-child(14):checked~.tabbed-labels>:nth-child(14),
441
+ .tabbed-set>input:nth-child(15):checked~.tabbed-labels>:nth-child(15),
442
+ .tabbed-set>input:nth-child(16):checked~.tabbed-labels>:nth-child(16),
443
+ .tabbed-set>input:nth-child(17):checked~.tabbed-labels>:nth-child(17),
444
+ .tabbed-set>input:nth-child(18):checked~.tabbed-labels>:nth-child(18),
445
+ .tabbed-set>input:nth-child(19):checked~.tabbed-labels>:nth-child(19),
446
+ .tabbed-set>input:nth-child(20):checked~.tabbed-labels>:nth-child(20) {
447
+ color: var(--md-accent-fg-color);
448
+ border-color: var(--md-accent-fg-color);
449
+ }
450
+
451
+ /* TASK-LIST */
452
+ .task-list-control .task-list-indicator::before {
453
+ background-color: ${Q.palette.action.disabledBackground};
454
+ }
455
+ .task-list-control [type="checkbox"]:checked + .task-list-indicator:before {
456
+ background-color: ${Q.palette.success.main};
457
+ }
458
+
459
+ /* ADMONITION */
460
+ .admonition {
461
+ font-size: var(--md-typeset-font-size) !important;
462
+ }
463
+ .admonition .admonition-title {
464
+ padding-left: 2.5rem !important;
465
+ }
466
+
467
+ .admonition .admonition-title:before {
468
+ top: 50% !important;
469
+ width: 20px !important;
470
+ height: 20px !important;
471
+ transform: translateY(-50%) !important;
472
+ }
473
+ `})]),[N,te,J,ie,Be,pe,Q,Ne,dt]),nn=(0,r.useCallback)(async bt=>ct(bt,[_e(),Mt(Q),it({baseUrl:window.location.origin,onClick:(at,pt)=>{var rn;const Nt=at.ctrlKey||at.metaKey,Vt=new URL(pt);Vt.hash?Nt?window.open(`${Vt.pathname}${Vt.hash}`,"_blank"):(ue(`${Vt.pathname}${Vt.hash}`),(rn=bt==null?void 0:bt.querySelector(`#${Vt.hash.slice(1)}`))==null||rn.scrollIntoView()):Nt?window.open(Vt.pathname,"_blank"):ue(Vt.pathname)}}),yt({docStorageUrl:await pe.getApiOrigin(),onLoading:at=>{at.style.setProperty("opacity","0")},onLoaded:at=>{var pt;at.style.removeProperty("opacity"),(pt=at.querySelector(".md-nav__title"))==null||pt.removeAttribute("for"),Lt(Array.from(at.querySelectorAll(".md-sidebar")))}})]),[Q,ue,pe]);return(0,r.useEffect)(()=>{if(!we)return()=>{};let bt=!0;return Ot(we,De).then(async at=>{if(!(at!=null&&at.innerHTML)||!bt)return;window.scroll({top:0});const pt=await nn(at);Ut(pt)}),()=>{bt=!1}},[we,De,Ot,nn]),Et},lt=(0,c.Z)({search:{width:"100%","@media (min-width: 76.1875em)":{width:"calc(100% - 34.4rem)",margin:"0 auto"}}}),Tt=We(re=>{const{withSearch:ue=!0,onReady:Q}=re,pe=lt(),ie=(0,i.$L)(),{entityMetadata:{value:Be,loading:J},entityRef:N,shadowRoot:te,setShadowRoot:Pe}=(0,i.x1)(),De=It(N),[we,Ne]=(0,r.useState)((0,t.Ue)({...(0,m.Z)(),insertionPoint:void 0})),ht=(0,r.useCallback)(Qe=>{var nn;if(!De||!Qe)return;Ne((0,t.Ue)({...(0,m.Z)(),insertionPoint:De.querySelector("head")||void 0}));const Ot=(nn=Qe.shadowRoot)!=null?nn:Qe.attachShadow({mode:"open"});Ot.innerHTML="",Ot.appendChild(De),Pe(Ot),Q instanceof Function&&Q()},[De,Pe,Q]),Lt=te==null?void 0:te.querySelector('[data-md-component="content"]'),Et=te==null?void 0:te.querySelector('div[data-md-component="sidebar"][data-md-type="navigation"], div[data-md-component="navigation"]'),Ut=te==null?void 0:te.querySelector('div[data-md-component="sidebar"][data-md-type="toc"], div[data-md-component="toc"]'),dt=document.createElement("div");Et==null||Et.prepend(dt);const gt=document.createElement("div");return Ut==null||Ut.prepend(gt),J===!1&&!Be?r.createElement(u.ErrorPage,{status:"404",statusMessage:"PAGE NOT FOUND"}):De?r.createElement(u.Content,null,r.createElement(f.Z,{container:!0},r.createElement(f.Z,{xs:12,item:!0},r.createElement(g.N,null)),ue&&r.createElement(f.Z,{className:pe.search,xs:"auto",item:!0},r.createElement(y.S,{entityId:N})),r.createElement(f.Z,{xs:12,item:!0},r.createElement(a.ZP,{jss:we,sheetsManager:new Map},r.createElement("div",{ref:ht,"data-testid":"techdocs-native-shadowroot"}),r.createElement(R.Z,{container:dt},ie.renderComponentsByLocation(i.oZ.PrimarySidebar)),r.createElement(R.Z,{container:Lt},ie.renderComponentsByLocation(i.oZ.Content)),r.createElement(R.Z,{container:gt},ie.renderComponentsByLocation(i.oZ.SecondarySidebar)))))):r.createElement(u.Content,null,r.createElement(f.Z,{container:!0},r.createElement(f.Z,{xs:12,item:!0},r.createElement(g.N,null))))}),qt=null},99954:function(ee,s,e){"use strict";e.d(s,{S:function(){return v}});var r=e(2784),t=e(18671),c=e(98069),f=e(73250),R=e(47955),m=e(53479),a=e(48023),i=e(53492),u=e(36964),y=e(68725);const g=r.createElement(c.Z,{animation:"wave",variant:"text",height:40}),v=T=>{const{children:L}=T,B=(0,R.$L)(),k=(0,u.useApi)(u.configApiRef),{title:F,setTitle:x,subtitle:M,setSubtitle:D,entityRef:P,metadata:{value:H,loading:K},entityMetadata:{value:ce,loading:We}}=(0,R.x1)();(0,r.useEffect)(()=>{!H||(x(Ue=>{const{site_name:Ye}=H;return Ue||Ye}),D(Ue=>{let{site_description:Ye}=H;return(!Ye||Ye==="None")&&(Ye="Home"),Ue||Ye}))},[H,x,D]);const Ze=k.getOptional("app.title")||"Backstage",me=[M,F,Ze].filter(Boolean).join(" | "),{locationMetadata:je,spec:de}=ce||{},Ce=de==null?void 0:de.lifecycle,Ve=ce?(0,m.getEntityRelations)(ce,a.S4):[],Ke=(0,u.useRouteRef)(y._Z)(),qe=r.createElement(r.Fragment,null,r.createElement(i.HeaderLabel,{label:"Component",value:r.createElement(m.EntityRefLink,{color:"inherit",entityRef:P,defaultKind:"Component"})}),Ve.length>0&&r.createElement(i.HeaderLabel,{label:"Owner",value:r.createElement(m.EntityRefLinks,{color:"inherit",entityRefs:Ve,defaultKind:"group"})}),Ce?r.createElement(i.HeaderLabel,{label:"Lifecycle",value:Ce}):null,je&&je.type!=="dir"&&je.type!=="file"?r.createElement(i.HeaderLabel,{label:"",value:r.createElement("a",{href:je.target,target:"_blank",rel:"noopener noreferrer"},r.createElement(f.Z,{style:{marginTop:"-25px",fill:"#fff"}}))}):null);return!We&&ce===void 0||!K&&H===void 0?null:r.createElement(i.Header,{type:"Documentation",typeLink:Ke,title:F||g,subtitle:M||g},r.createElement(t.Z,{titleTemplate:"%s"},r.createElement("title",null,me)),qe,L,B.renderComponentsByLocation(R.oZ.Header))}},16172:function(ee,s,e){"use strict";e.d(s,{b:function(){return g}});var r=e(2784),t=e(79692),c=e(15223),f=e(95544),R=e(80030),m=e(61837),a=e(48348),i=e(47603),u=e(47955);const y=(0,t.Z)(v=>({root:{gridArea:"pageSubheader",flexDirection:"column",minHeight:"auto",padding:v.spacing(3,3,0)}})),g=({toolbarProps:v})=>{const T=y(),[L,B]=(0,r.useState)(null),k=(0,r.useCallback)(K=>{B(K.currentTarget)},[]),F=(0,r.useCallback)(()=>{B(null)},[]),{entityMetadata:{value:x,loading:M}}=(0,u.x1)(),D=(0,u.$L)(),P=D.renderComponentsByLocation(u.oZ.Subheader),H=D.renderComponentsByLocation(u.oZ.Settings);return!P&&!H||M===!1&&!x?null:r.createElement(c.Z,{classes:T,...v},r.createElement(f.Z,{display:"flex",justifyContent:"flex-end",width:"100%",flexWrap:"wrap"},P,H?r.createElement(r.Fragment,null,r.createElement(R.ZP,{title:"Settings"},r.createElement(m.Z,{"aria-controls":"tech-docs-reader-page-settings","aria-haspopup":"true",onClick:k},r.createElement(i.Z,null))),r.createElement(a.Z,{id:"tech-docs-reader-page-settings",getContentAnchorEl:null,anchorEl:L,anchorOrigin:{vertical:"bottom",horizontal:"right"},open:Boolean(L),onClose:F,keepMounted:!0},H)):null))}},23738:function(ee,s,e){"use strict";e.d(s,{N:function(){return D}});var r=e(2784),t=e(53492),c=e(79692),f=e(4614),R=e(77277),m=e(99688),a=e(12420),i=e(60905),u=e(90436),y=e(61837),g=e(4190),v=e(87685);const T=(0,c.Z)(P=>(0,a.Z)({paper:{width:"100%",[P.breakpoints.up("sm")]:{width:"75%"},[P.breakpoints.up("md")]:{width:"50%"},padding:P.spacing(2.5)},root:{height:"100%",overflow:"hidden"},logs:{background:P.palette.background.default}})),L=({buildLog:P,onClose:H})=>{const K=T(),ce=P.length===0?"Waiting for logs...":P.join(`
474
+ `);return r.createElement(i.Z,{container:!0,direction:"column",className:K.root,spacing:0,wrap:"nowrap"},r.createElement(i.Z,{item:!0,container:!0,justifyContent:"space-between",alignItems:"center",spacing:0,wrap:"nowrap"},r.createElement(u.Z,{variant:"h5"},"Build Details"),r.createElement(y.Z,{key:"dismiss",title:"Close the drawer",onClick:H,color:"inherit"},r.createElement(v.Z,null))),r.createElement(t.LogViewer,{text:ce,classes:{root:K.logs}}))},B=({buildLog:P})=>{const H=T(),[K,ce]=(0,r.useState)(!1);return r.createElement(r.Fragment,null,r.createElement(R.Z,{color:"inherit",onClick:()=>ce(!0)},"Show Build Logs"),r.createElement(g.ZP,{classes:{paper:H.paper},anchor:"right",open:K,onClose:()=>ce(!1)},r.createElement(L,{buildLog:P,onClose:()=>ce(!1)})))};var k=e(36964);const F=({errorMessage:P})=>{const H=(0,k.useApi)(k.configApiRef).getOptionalString("techdocs.builder");let K="";return H!=="local"&&(K="Note that techdocs.builder is not set to 'local' in your config, which means this Backstage app will not generate docs if they are not found. Make sure the project's docs are generated and published by some external process (e.g. CI/CD pipeline). Or change techdocs.builder to 'local' to generate docs from this Backstage instance."),r.createElement(t.ErrorPage,{status:"404",statusMessage:P||"Documentation not found",additionalInfo:K})};var x=e(28626);const M=(0,c.Z)(P=>({root:{marginBottom:P.spacing(2)},message:{wordBreak:"break-word",overflowWrap:"anywhere"}})),D=()=>{let P=null;const H=M(),{state:K,contentReload:ce,contentErrorMessage:We,syncErrorMessage:Ze,buildLog:me}=(0,x.DK)(),je=K==="CHECKING"?r.createElement(t.Progress,null):null;return K==="INITIAL_BUILD"&&(P=r.createElement(m.Z,{classes:{root:H.root},variant:"outlined",severity:"info",icon:r.createElement(f.Z,{size:"24px"}),action:r.createElement(B,{buildLog:me})},"Documentation is accessed for the first time and is being prepared. The subsequent loads are much faster.")),K==="CONTENT_STALE_REFRESHING"&&(P=r.createElement(m.Z,{variant:"outlined",severity:"info",icon:r.createElement(f.Z,{size:"24px"}),action:r.createElement(B,{buildLog:me}),classes:{root:H.root}},"A newer version of this documentation is being prepared and will be available shortly.")),K==="CONTENT_STALE_READY"&&(P=r.createElement(m.Z,{variant:"outlined",severity:"success",action:r.createElement(R.Z,{color:"inherit",onClick:()=>ce()},"Refresh"),classes:{root:H.root}},"A newer version of this documentation is now available, please refresh to view.")),K==="CONTENT_STALE_ERROR"&&(P=r.createElement(m.Z,{variant:"outlined",severity:"error",action:r.createElement(B,{buildLog:me}),classes:{root:H.root,message:H.message}},"Building a newer version of this documentation failed."," ",Ze)),K==="CONTENT_NOT_FOUND"&&(P=r.createElement(r.Fragment,null,Ze&&r.createElement(m.Z,{variant:"outlined",severity:"error",action:r.createElement(B,{buildLog:me}),classes:{root:H.root,message:H.message}},"Building a newer version of this documentation failed."," ",Ze),r.createElement(F,{errorMessage:We}))),r.createElement(r.Fragment,null,je,P)}},96393:function(ee,s,e){"use strict";e.d(s,{Fq:function(){return c.Fq},SE:function(){return t.S}});var r=e(26220),t=e(99954),c=e(28626),f=e(16172),R=e(23738)},68725:function(ee,s,e){"use strict";e.d(s,{Fw:function(){return c},_Z:function(){return t},pd:function(){return f}});var r=e(36964);const t=(0,r.createRouteRef)({id:"techdocs:index-page"}),c=(0,r.createRouteRef)({id:"techdocs:reader-page",params:["namespace","kind","name"]}),f=(0,r.createRouteRef)({id:"techdocs:catalog-reader-view"})},47861:function(ee,s,e){"use strict";e.d(s,{S:function(){return D}});var r=e(2784),t=e(79692),c=e(49378),f=e(38402),R=e(85256),m=e(53492),a=e(73624);const i=(0,t.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",marginBottom:"1rem"}}),u=P=>{const{result:H,highlight:K,lineClamp:ce=5,asListItem:We=!0,asLink:Ze=!0,title:me}=P,je=i(),de=()=>{const Ke=K!=null&&K.fields.title?r.createElement(a.FA,{text:K.fields.title,preTag:K.preTag,postTag:K.postTag}):H.title,qe=K!=null&&K.fields.entityTitle?r.createElement(a.FA,{text:K.fields.entityTitle,preTag:K.preTag,postTag:K.postTag}):H.entityTitle,Re=K!=null&&K.fields.name?r.createElement(a.FA,{text:K.fields.name,preTag:K.preTag,postTag:K.postTag}):H.name;return r.createElement(c.Z,{className:je.itemText,primaryTypographyProps:{variant:"h6"},primary:me||r.createElement(r.Fragment,null,Ke," | ",qe!=null?qe:Re," docs"),secondary:r.createElement("span",{style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:ce,overflow:"hidden"}},K!=null&&K.fields.text?r.createElement(a.FA,{text:K.fields.text,preTag:K.preTag,postTag:K.postTag}):H.text)})},Ce=({children:Ke})=>Ze?r.createElement(m.Link,{to:H.location},Ke):r.createElement(r.Fragment,null,Ke),Ve=({children:Ke})=>We?r.createElement(r.Fragment,null,r.createElement(f.Z,{alignItems:"flex-start",className:je.flexContainer},Ke),r.createElement(R.Z,{component:"li"})):r.createElement(r.Fragment,null,Ke);return r.createElement(Ce,null,r.createElement(Ve,null,r.createElement(de,null)))};var y=e(86619),g=e(50581),v=e(61837),T=e(4614),L=e(21853),B=e(88013),k=e(10289),F=e(48760);const x=(0,t.Z)({root:{width:"100%"}}),M=P=>{const{entityId:H,debounceTime:K=150}=P,[ce,We]=(0,r.useState)(!1),Ze=(0,k.s0)(),{term:me,setTerm:je,setFilters:de,result:{loading:Ce,value:Ve}}=(0,a.Rx)(),Ke=x(),[qe,Re]=(0,r.useState)([]);(0,r.useEffect)(()=>{let tt=!0;if(tt&&Ve){const rt=Ve.results.slice(0,10);Re(rt)}return()=>{tt=!1}},[Ce,Ve]);const[Fe,Ue]=(0,r.useState)(me);(0,F.Z)(()=>je(Fe),K,[Fe]);const{kind:Ye,name:it,namespace:Rt}=H;(0,r.useEffect)(()=>{de(tt=>({...tt,kind:Ye,namespace:Rt,name:it}))},[Ye,Rt,it,de]);const nt=tt=>{ce||We(!0),Ue(tt.target.value)},ut=(tt,rt)=>{if(rt!=null&&rt.document){const{location:Bt}=rt.document;Ze(Bt)}};return r.createElement(B.ZP,{classes:{root:Ke.root},"data-testid":"techdocs-search-bar",size:"small",open:ce,getOptionLabel:()=>"",filterOptions:tt=>tt,onClose:()=>{We(!1)},onFocus:()=>{We(!0)},onChange:ut,blurOnSelect:!0,noOptionsText:"No results found",value:null,options:qe,renderOption:({document:tt,highlight:rt})=>r.createElement(u,{result:tt,lineClamp:3,asListItem:!1,asLink:!1,title:tt.title,highlight:rt}),loading:Ce,renderInput:tt=>r.createElement(y.Z,{...tt,"data-testid":"techdocs-search-bar-input",variant:"outlined",fullWidth:!0,placeholder:`Search ${H.name} docs`,value:Fe,onChange:nt,InputProps:{...tt.InputProps,startAdornment:r.createElement(g.Z,{position:"start"},r.createElement(v.Z,{"aria-label":"Query",disabled:!0},r.createElement(L.Z,null))),endAdornment:r.createElement(r.Fragment,null,Ce?r.createElement(T.Z,{color:"inherit",size:20}):null,tt.InputProps.endAdornment)}})})},D=P=>{const H={term:"",types:["techdocs"],pageCursor:"",filters:P.entityId};return r.createElement(a.Nd,{initialState:H},r.createElement(M,{...P}))}},98157:function(){},53260:function(){}},function(ee){var s=function(r){return ee(ee.s=r)};ee.O(0,[2370,6202,9284,2126,7012,9035,4983,3222,5218,4736],function(){return s(88649),s(46054)});var e=ee.O()}]);})();
475
+
476
+ //# sourceMappingURL=main.536dc3bc.js.map