@techdocs/cli 0.8.16 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +36 -0
- package/dist/cjs/{PublisherConfig-a09bdfcc.cjs.js → PublisherConfig-162efac5.cjs.js} +1 -1
- package/dist/cjs/{PublisherConfig-a09bdfcc.cjs.js.map → PublisherConfig-162efac5.cjs.js.map} +1 -1
- package/dist/cjs/{generate-20171bf9.cjs.js → generate-143a6de3.cjs.js} +4 -4
- package/dist/cjs/generate-143a6de3.cjs.js.map +1 -0
- package/dist/cjs/{migrate-04a51fb3.cjs.js → migrate-181e95f5.cjs.js} +5 -5
- package/dist/cjs/migrate-181e95f5.cjs.js.map +1 -0
- package/dist/cjs/{mkdocs-f1cf9408.cjs.js → mkdocs-30f530ff.cjs.js} +3 -3
- package/dist/cjs/{mkdocs-f1cf9408.cjs.js.map → mkdocs-30f530ff.cjs.js.map} +1 -1
- package/dist/cjs/{mkdocsServer-7058189d.cjs.js → mkdocsServer-758a3ae9.cjs.js} +1 -1
- package/dist/cjs/{mkdocsServer-7058189d.cjs.js.map → mkdocsServer-758a3ae9.cjs.js.map} +1 -1
- package/dist/cjs/{publish-d1ccb001.cjs.js → publish-7bf1e5f7.cjs.js} +5 -5
- package/dist/cjs/publish-7bf1e5f7.cjs.js.map +1 -0
- package/dist/cjs/{serve-be4ef843.cjs.js → serve-21d1e885.cjs.js} +3 -3
- package/dist/cjs/serve-21d1e885.cjs.js.map +1 -0
- package/dist/cjs/{utility-6042a9ba.cjs.js → utility-51f4a306.cjs.js} +1 -1
- package/dist/cjs/utility-51f4a306.cjs.js.map +1 -0
- package/dist/embedded-app/.config-schema.json +34 -5
- package/dist/embedded-app/index.html +1 -1
- package/dist/embedded-app/static/{1553.8d50cd6e.chunk.js → 1553.925835b9.chunk.js} +2 -2
- package/dist/embedded-app/static/{1553.8d50cd6e.chunk.js.map → 1553.925835b9.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{1959.3c856a1e.chunk.js → 1959.2eb957a4.chunk.js} +2 -2
- package/dist/embedded-app/static/{1959.3c856a1e.chunk.js.map → 1959.2eb957a4.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{2426.0fc592b4.chunk.js → 2426.f9952783.chunk.js} +2 -2
- package/dist/embedded-app/static/{2426.0fc592b4.chunk.js.map → 2426.f9952783.chunk.js.map} +1 -1
- package/dist/embedded-app/static/3860.da7e5f63.chunk.js +3 -0
- package/dist/embedded-app/static/3860.da7e5f63.chunk.js.map +1 -0
- package/dist/embedded-app/static/{390.879c2086.chunk.js → 390.cd301478.chunk.js} +2 -2
- package/dist/embedded-app/static/{390.879c2086.chunk.js.map → 390.cd301478.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{4022.0fe21618.chunk.js → 4022.313be9b5.chunk.js} +2 -2
- package/dist/embedded-app/static/{4022.0fe21618.chunk.js.map → 4022.313be9b5.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{6235.c0346cdc.chunk.js → 6235.b3634d50.chunk.js} +2 -2
- package/dist/embedded-app/static/{6235.c0346cdc.chunk.js.map → 6235.b3634d50.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{6583.ad8c5d41.chunk.js → 6583.c98b5125.chunk.js} +2 -2
- package/dist/embedded-app/static/{6583.ad8c5d41.chunk.js.map → 6583.c98b5125.chunk.js.map} +1 -1
- package/dist/embedded-app/static/7110.527cc68b.chunk.js +3 -0
- package/dist/embedded-app/static/7110.527cc68b.chunk.js.map +1 -0
- package/dist/embedded-app/static/7758.a6ab2713.chunk.js +3 -0
- package/dist/embedded-app/static/7758.a6ab2713.chunk.js.map +1 -0
- package/dist/embedded-app/static/{8061.8b41800d.chunk.js → 8061.fd1f45d1.chunk.js} +2 -2
- package/dist/embedded-app/static/{8061.8b41800d.chunk.js.map → 8061.fd1f45d1.chunk.js.map} +1 -1
- package/dist/embedded-app/static/8718.cd7bb850.chunk.js +4 -0
- package/dist/embedded-app/static/{8718.8a863f87.chunk.js.map → 8718.cd7bb850.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{8792.c72ab612.chunk.js → 8792.867bf73e.chunk.js} +2 -2
- package/dist/embedded-app/static/{8792.c72ab612.chunk.js.map → 8792.867bf73e.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{9028.decd1f17.chunk.js → 9028.200536ea.chunk.js} +2 -2
- package/dist/embedded-app/static/{9028.decd1f17.chunk.js.map → 9028.200536ea.chunk.js.map} +1 -1
- package/dist/embedded-app/static/main.0b0e8219.js +476 -0
- package/dist/embedded-app/static/main.0b0e8219.js.map +1 -0
- package/dist/embedded-app/static/{module-material-table.a73fb7f5.js → module-material-table.cbad0c40.js} +2 -2
- package/dist/embedded-app/static/{module-material-table.a73fb7f5.js.map → module-material-table.cbad0c40.js.map} +1 -1
- package/dist/embedded-app/static/module-react-beautiful-dnd.a9014a2e.js +67 -0
- package/dist/embedded-app/static/module-react-beautiful-dnd.a9014a2e.js.map +1 -0
- package/dist/embedded-app/static/{runtime.a73a2a40.js → runtime.0b0e8219.js} +2 -2
- package/dist/embedded-app/static/runtime.0b0e8219.js.map +1 -0
- package/dist/embedded-app/static/vendor.0b0e8219.js +140 -0
- package/dist/embedded-app/static/vendor.0b0e8219.js.map +1 -0
- package/dist/index.cjs.js +8 -8
- package/dist/index.cjs.js.map +1 -1
- package/package.json +12 -12
- package/dist/cjs/generate-20171bf9.cjs.js.map +0 -1
- package/dist/cjs/migrate-04a51fb3.cjs.js.map +0 -1
- package/dist/cjs/publish-d1ccb001.cjs.js.map +0 -1
- package/dist/cjs/serve-be4ef843.cjs.js.map +0 -1
- package/dist/cjs/utility-6042a9ba.cjs.js.map +0 -1
- package/dist/embedded-app/static/5011.c8e98520.chunk.js +0 -3
- package/dist/embedded-app/static/5011.c8e98520.chunk.js.map +0 -1
- package/dist/embedded-app/static/7110.5f7b5114.chunk.js +0 -3
- package/dist/embedded-app/static/7110.5f7b5114.chunk.js.map +0 -1
- package/dist/embedded-app/static/7758.2fe27149.chunk.js +0 -3
- package/dist/embedded-app/static/7758.2fe27149.chunk.js.map +0 -1
- package/dist/embedded-app/static/8718.8a863f87.chunk.js +0 -4
- package/dist/embedded-app/static/main.a73a2a40.js +0 -444
- package/dist/embedded-app/static/main.a73a2a40.js.map +0 -1
- package/dist/embedded-app/static/module-react-beautiful-dnd.2ab2ffc2.js +0 -67
- package/dist/embedded-app/static/module-react-beautiful-dnd.2ab2ffc2.js.map +0 -1
- package/dist/embedded-app/static/runtime.a73a2a40.js.map +0 -1
- package/dist/embedded-app/static/vendor.a73a2a40.js +0 -140
- package/dist/embedded-app/static/vendor.a73a2a40.js.map +0 -1
|
@@ -0,0 +1,476 @@
|
|
|
1
|
+
(()=>{var wi=Object.defineProperty;var zi=(q,s,e)=>s in q?wi(q,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):q[s]=e;var ne=(q,s,e)=>(zi(q,typeof s!="symbol"?s+"":s,e),e),ro=(q,s,e)=>{if(!s.has(q))throw TypeError("Cannot "+e)};var qe=(q,s,e)=>(ro(q,s,"read from private field"),e?e.call(q):s.get(q)),sn=(q,s,e)=>{if(s.has(q))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(q):s.set(q,e)},hn=(q,s,e,r)=>(ro(q,s,"write to private field"),r?r.call(q,e):s.set(q,e),e);(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[179],{30001:function(q,s,e){"use strict";e.d(s,{n3:function(){return y},MS:function(){return i}});var r=e(48023),t=e(10179),l=e(96279),f=e.n(l);const y=Symbol.for("CATALOG_FILTER_EXISTS_0e15b590c0b343a2bae3e787e84c2111");class i{constructor(m){ne(this,"discoveryApi");ne(this,"fetchApi");this.discoveryApi=m.discoveryApi,this.fetchApi=m.fetchApi||{fetch:f()}}async getEntityAncestors(m,c){const{kind:g,namespace:p,name:R}=(0,r.of)(m.entityRef);return await this.requestRequired("GET",`/entities/by-name/${encodeURIComponent(g)}/${encodeURIComponent(p)}/${encodeURIComponent(R)}/ancestry`,c)}async getLocationById(m,c){return await this.requestOptional("GET",`/locations/${encodeURIComponent(m)}`,c)}async getEntities(m,c){const{filter:g=[],fields:p=[],offset:R,limit:L,after:U}=m!=null?m:{},P=[];for(const b of[g].flat()){const B=[];for(const[N,j]of Object.entries(b))for(const se of[j].flat())se===y?B.push(encodeURIComponent(N)):typeof se=="string"&&B.push(`${encodeURIComponent(N)}=${encodeURIComponent(se)}`);B.length&&P.push(`filter=${B.join(",")}`)}p.length&&P.push(`fields=${p.map(encodeURIComponent).join(",")}`),R!==void 0&&P.push(`offset=${R}`),L!==void 0&&P.push(`limit=${L}`),U!==void 0&&P.push(`after=${encodeURIComponent(U)}`);const Q=P.length?`?${P.join("&")}`:"",D=await this.requestRequired("GET",`/entities${Q}`,c),T=(b,B)=>{var se,Ce;if(((se=b.metadata)==null?void 0:se.name)===void 0||b.kind===void 0||((Ce=B.metadata)==null?void 0:Ce.name)===void 0||B.kind===void 0)return 0;const N=(0,r.eE)(b),j=(0,r.eE)(B);return N<j?-1:N>j?1:0};return{items:D.sort(T)}}async getEntityByRef(m,c){const{kind:g,namespace:p,name:R}=(0,r.of)(m);return this.requestOptional("GET",`/entities/by-name/${encodeURIComponent(g)}/${encodeURIComponent(p)}/${encodeURIComponent(R)}`,c)}async getEntityByName(m,c){const{kind:g,namespace:p="default",name:R}=m;return this.requestOptional("GET",`/entities/by-name/${encodeURIComponent(g)}/${encodeURIComponent(p)}/${encodeURIComponent(R)}`,c)}async refreshEntity(m,c){const g=await this.fetchApi.fetch(`${await this.discoveryApi.getBaseUrl("catalog")}/refresh`,{headers:{"Content-Type":"application/json",...(c==null?void 0:c.token)&&{Authorization:`Bearer ${c==null?void 0:c.token}`}},method:"POST",body:JSON.stringify({entityRef:m})});if(g.status!==200)throw new Error(await g.text())}async getEntityFacets(m,c){const{filter:g=[],facets:p}=m,R=[];for(const U of[g].flat()){const P=[];for(const[Q,D]of Object.entries(U))for(const T of[D].flat())T===y?P.push(encodeURIComponent(Q)):typeof T=="string"&&P.push(`${encodeURIComponent(Q)}=${encodeURIComponent(T)}`);P.length&&R.push(`filter=${P.join(",")}`)}for(const U of p)R.push(`facet=${encodeURIComponent(U)}`);const L=R.length?`?${R.join("&")}`:"";return await this.requestOptional("GET",`/entity-facets${L}`,c)}async addLocation({type:m="url",target:c,dryRun:g},p){const R=await this.fetchApi.fetch(`${await this.discoveryApi.getBaseUrl("catalog")}/locations${g?"?dryRun=true":""}`,{headers:{"Content-Type":"application/json",...(p==null?void 0:p.token)&&{Authorization:`Bearer ${p==null?void 0:p.token}`}},method:"POST",body:JSON.stringify({type:m,target:c})});if(R.status!==201)throw new Error(await R.text());const{location:L,entities:U,exists:P}=await R.json();if(!L)throw new Error(`Location wasn't added: ${c}`);return{location:L,entities:U,exists:P}}async getLocationByRef(m,c){return(await this.requestRequired("GET","/locations",c)).map(p=>p.data).find(p=>m===(0,r.NZ)(p))}async removeLocationById(m,c){await this.requestIgnored("DELETE",`/locations/${encodeURIComponent(m)}`,c)}async removeEntityByUid(m,c){await this.requestIgnored("DELETE",`/entities/by-uid/${encodeURIComponent(m)}`,c)}async requestIgnored(m,c,g){const p=`${await this.discoveryApi.getBaseUrl("catalog")}${c}`,R=(g==null?void 0:g.token)?{Authorization:`Bearer ${g.token}`}:{},L=await this.fetchApi.fetch(p,{method:m,headers:R});if(!L.ok)throw await t.VL.fromResponse(L)}async requestRequired(m,c,g){const p=`${await this.discoveryApi.getBaseUrl("catalog")}${c}`,R=(g==null?void 0:g.token)?{Authorization:`Bearer ${g.token}`}:{},L=await this.fetchApi.fetch(p,{method:m,headers:R});if(!L.ok)throw await t.VL.fromResponse(L);return await L.json()}async requestOptional(m,c,g){const p=`${await this.discoveryApi.getBaseUrl("catalog")}${c}`,R=(g==null?void 0:g.token)?{Authorization:`Bearer ${g.token}`}:{},L=await this.fetchApi.fetch(p,{method:m,headers:R});if(!L.ok){if(L.status===404)return;throw await t.VL.fromResponse(L)}return await L.json()}}},48023:function(q,s,e){"use strict";e.d(s,{Tf:function(){return l},P1:function(){return ie},q1:function(){return ve},M6:function(){return Ie},l2:function(){return t},zG:function(){return r},w$:function(){return yt},nP:function(){return rt},aS:function(){return Se},S4:function(){return Lt},cz:function(){return le},iB:function(){return je},of:function(){return Qe},Ou:function(){return pe},eE:function(){return at},NZ:function(){return Te}});const r="default",t="backstage.io/view-url",l="backstage.io/edit-url";var f=e(76635),y=e.n(f);class i{constructor(S=DEFAULT_NAMESPACE){ne(this,"namespace");this.namespace=S}async enforce(S){return S.metadata.namespace?S:lodash.merge({metadata:{namespace:this.namespace}},S)}}class o{static isValidPrefixAndOrSuffix(S,z,ce,ye){if(typeof S!="string")return!1;const Ae=S.split(z);return Ae.length===1?ye(Ae[0]):Ae.length===2?ce(Ae[0])&&ye(Ae[1]):!1}static isJsonSafe(S){try{return y().isEqual(S,JSON.parse(JSON.stringify(S)))}catch{return!1}}static isValidDnsSubdomain(S){return typeof S=="string"&&S.length>=1&&S.length<=253&&S.split(".").every(o.isValidDnsLabel)}static isValidDnsLabel(S){return typeof S=="string"&&S.length>=1&&S.length<=63&&/^[a-z0-9]+(\-[a-z0-9]+)*$/.test(S)}static isValidTag(S){return typeof S=="string"&&S.length>=1&&S.length<=63&&/^[a-z0-9+#]+(\-[a-z0-9+#]+)*$/.test(S)}static isValidUrl(S){if(typeof S!="string")return!1;try{return new URL(S),!0}catch{return!1}}static isValidString(S){var z;return typeof S=="string"&&((z=S==null?void 0:S.trim())==null?void 0:z.length)>=1}static isNonEmptyString(S){var z;return typeof S=="string"&&((z=S==null?void 0:S.trim())==null?void 0:z.length)>=1}}var m=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"EntityEnvelope","description":"The envelope skeleton parts of an entity - whatever is necessary to be able to give it a ref and pass to further validation / policy checking.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Component","metadata":{"name":"LoremService"}}],"type":"object","required":["apiVersion","kind","metadata"],"additionalProperties":true,"properties":{"apiVersion":{"type":"string","description":"The version of specification format for this particular entity that this is written against.","minLength":1,"examples":["backstage.io/v1alpha1","my-company.net/v1","1.0"]},"kind":{"type":"string","description":"The high level entity type being described.","minLength":1,"examples":["API","Component","Domain","Group","Location","Resource","System","Template","User"]},"metadata":{"type":"object","required":["name"],"additionalProperties":true,"properties":{"name":{"type":"string","description":"The name of the entity. Must be unique within the catalog at any given point in time, for any given namespace + kind pair.","examples":["metadata-proxy"],"minLength":1},"namespace":{"type":"string","description":"The namespace that the entity belongs to.","default":"default","examples":["default","admin"],"minLength":1}}}}}'),c=e(48231),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"}}}`),p=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}}}}}}'),R=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,U=[m,g,p,R];function P(re){if(!(re==null?void 0:re.length))throw new TypeError("Unknown error");const S=re[0];throw new TypeError(`${S.dataPath||"<root>"} ${S.message}${S.params?` - ${Object.entries(S.params).map(([z,ce])=>`${z}: ${ce}`).join(", ")}`:""}`)}function Q(re,S={}){var We;const z=(We=S==null?void 0:S.disableCache)!=null?We:!1,ce=z?"":JSON.stringify(re);if(!z){const V=L.get(ce);if(V)return V}const ye=D(re),Ae=new c.ZP({allowUnionTypes:!0,allErrors:!0,validateSchema:!0});ye.length&&Ae.addSchema(ye,void 0,void 0,!0);const Le=Ae.compile(re);return z||L.set(ce,Le),Le}function D(re){if(typeof re!="object")return[];const S=new Set;re.$id&&S.add(re.$id);const z=new Array,ce=[re];for(;ce.length;){const ye=ce.pop();for(const Ae of T(ye))if(!S.has(Ae)){S.add(Ae);const Le=U.find(We=>We.$id===Ae);Le&&(z.push(Le),ce.push(Le))}}return z}function*T(re){const S=[re];for(;S.length;){const z=S.pop();if(typeof z=="object"&&z)for(const[ce,ye]of Object.entries(z))ce==="$ref"&&typeof ye=="string"?yield ye.split("#")[0]:S.push(ye)}}function b(re){const S=compileAjvSchema(re||entityEnvelopeSchema);return z=>{if(S(z)===!0)return z;throw throwAjvError(S.errors)}}function B(re){const S=Q(re);return z=>{var Ae;if(S(z)===!0)return z;const ye=(Ae=S.errors)==null?void 0:Ae.filter(Le=>["/kind","/apiVersion"].includes(Le.dataPath));if((ye==null?void 0:ye.length)&&ye.every(Le=>Le.keyword==="enum"))return!1;throw P(S.errors)}}function N(re){const S=compileAjvSchema(re||entitySchema);return z=>{if(S(z)===!0)return z;throw throwAjvError(S.errors)}}class j{static isValidApiVersion(S){return o.isValidPrefixAndOrSuffix(S,"/",o.isValidDnsSubdomain,z=>z.length>=1&&z.length<=63&&/^[a-z0-9A-Z]+$/.test(z))}static isValidKind(S){return typeof S=="string"&&S.length>=1&&S.length<=63&&/^[a-zA-Z][a-z0-9A-Z]*$/.test(S)}static isValidObjectName(S){return typeof S=="string"&&S.length>=1&&S.length<=63&&/^([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$/.test(S)}static isValidNamespace(S){return o.isValidDnsLabel(S)}static isValidLabelKey(S){return o.isValidPrefixAndOrSuffix(S,"/",o.isValidDnsSubdomain,j.isValidObjectName)}static isValidLabelValue(S){return S===""||j.isValidObjectName(S)}static isValidAnnotationKey(S){return o.isValidPrefixAndOrSuffix(S,"/",o.isValidDnsSubdomain,j.isValidObjectName)}static isValidAnnotationValue(S){return typeof S=="string"}}const se={isValidApiVersion:j.isValidApiVersion,isValidKind:j.isValidKind,isValidEntityName:j.isValidObjectName,isValidNamespace:j.isValidNamespace,isValidLabelKey:j.isValidLabelKey,isValidLabelValue:j.isValidLabelValue,isValidAnnotationKey:j.isValidAnnotationKey,isValidAnnotationValue:j.isValidAnnotationValue,isValidTag:re=>typeof re=="string"&&re.length>=1&&re.length<=63&&/^[a-z0-9:+#]+(\-[a-z0-9:+#]+)*$/.test(re)};function Ce(re={}){return{...se,...re}}class xe{constructor(S=makeValidator()){ne(this,"validators");this.validators=S}async enforce(S){var Le,We,V,E,I,M,ee;function z(ae,ue,Re){if(ue==null)throw new Error(`${ae} must have a value`);let Ne;try{Ne=Re(ue)}catch(Ve){throw new Error(`${ae} could not be validated, ${Ve}`)}if(!Ne){let Ve;switch(Re.name){case"isValidLabelValue":case"isValidObjectName":Ve="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":Ve="a valid prefix and/or suffix";break;case"isValidNamespace":case"isValidDnsLabel":Ve="a string that is sequences of [a-z0-9] separated by [-], at most 63 characters in total";break;case"isValidTag":Ve="a string that is sequences of [a-z0-9+#] separated by [-], at most 63 characters in total";break;case"isValidAnnotationValue":Ve="a string";break;case"isValidKind":Ve="a string that is a sequence of [a-zA-Z][a-z0-9A-Z], at most 63 characters in total";break;case"isValidUrl":Ve="a string that is a valid url";break;case"isValidString":case"isNonEmptyString":Ve="a non empty string";break;default:Ve=void 0;break}const bt=Ve?` expected ${Ve} but found "${ue}".`:"";throw new Error(`"${ae}" is not valid;${bt} 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 ce(ae,ue,Re){return ue===void 0||z(ae,ue,Re)}z("apiVersion",S.apiVersion,this.validators.isValidApiVersion),z("kind",S.kind,this.validators.isValidKind),z("metadata.name",S.metadata.name,this.validators.isValidEntityName),ce("metadata.namespace",S.metadata.namespace,this.validators.isValidNamespace);for(const[ae,ue]of Object.entries((Le=S.metadata.labels)!=null?Le:[]))z(`labels.${ae}`,ae,this.validators.isValidLabelKey),z(`labels.${ae}`,ue,this.validators.isValidLabelValue);for(const[ae,ue]of Object.entries((We=S.metadata.annotations)!=null?We:[]))z(`annotations.${ae}`,ae,this.validators.isValidAnnotationKey),z(`annotations.${ae}`,ue,this.validators.isValidAnnotationValue);const ye=(V=S.metadata.tags)!=null?V:[];for(let ae=0;ae<ye.length;++ae)z(`tags.${ae}`,ye[ae],this.validators.isValidTag);const Ae=(E=S.metadata.links)!=null?E:[];for(let ae=0;ae<Ae.length;++ae)z(`links.${ae}.url`,(I=Ae[ae])==null?void 0:I.url,CommonValidatorFunctions.isValidUrl),ce(`links.${ae}.title`,(M=Ae[ae])==null?void 0:M.title,CommonValidatorFunctions.isNonEmptyString),ce(`links.${ae}.icon`,(ee=Ae[ae])==null?void 0:ee.icon,KubernetesValidatorFunctions.isValidObjectName);return S}}class He{constructor(){ne(this,"validate")}async enforce(S){if(!this.validate){const ye=new Ajv({allowUnionTypes:!0});this.validate=ye.addSchema([commonSchema,entityMetaSchema],void 0,void 0,!0).compile(entitySchema)}if(this.validate(S)===!0)return S;const[ce]=this.validate.errors||[];throw ce?new Error(`Malformed envelope, ${ce.dataPath||"<root>"} ${ce.message}`):new Error("Malformed envelope, Unknown error")}}function fe(re){let S=re.indexOf(":");const z=re.indexOf("/");z!==-1&&z<S&&(S=-1);const ce=S===-1?void 0:re.slice(0,S),ye=z===-1?void 0:re.slice(S+1,z),Ae=re.slice(Math.max(S+1,z+1));if(ce===""||ye===""||Ae==="")throw new TypeError(`Entity reference "${re}" was not on the form [<kind>:][<namespace>/]<name>`);return{kind:ce,namespace:ye,name:Ae}}function je(re){return{kind:re.kind,namespace:re.metadata.namespace||r,name:re.metadata.name}}function Qe(re,S){var We,V,E,I;if(!re)throw new Error("Entity reference must not be empty");const z=S==null?void 0:S.defaultKind,ce=(S==null?void 0:S.defaultNamespace)||r;let ye,Ae,Le;if(typeof re=="string"){const M=fe(re);ye=(We=M.kind)!=null?We:z,Ae=(V=M.namespace)!=null?V:ce,Le=M.name}else ye=(E=re.kind)!=null?E:z,Ae=(I=re.namespace)!=null?I:ce,Le=re.name;if(ye)if(Ae){if(!Le){const M=JSON.stringify(re);throw new Error(`Entity reference ${M} had missing or empty name`)}}else{const M=JSON.stringify(re);throw new Error(`Entity reference ${M} had missing or empty namespace`)}else{const M=JSON.stringify(re);throw new Error(`Entity reference ${M} had missing or empty kind (e.g. did not start with "component:" or similar)`)}return{kind:ye,namespace:Ae,name:Le}}function at(re){var ye,Ae;let S,z,ce;return"metadata"in re?(S=re.kind,z=(ye=re.metadata.namespace)!=null?ye:r,ce=re.metadata.name):(S=re.kind,z=(Ae=re.namespace)!=null?Ae:r,ce=re.name),`${S.toLocaleLowerCase("en-US")}:${z.toLocaleLowerCase("en-US")}/${ce.toLocaleLowerCase("en-US")}`}class et{constructor(S){this.policies=S}async enforce(S){let z=S;for(const ce of this.policies){const ye=await ce.enforce(z);if(!ye)throw new Error(`Policy ${ce.constructor.name} did not return a result`);z=ye}return z}}class tt{constructor(S){this.policies=S}async enforce(S){for(const z of this.policies){const ce=await z.enforce(S);if(ce)return ce}throw new Error("The entity did not match any known policy")}}const ot={allOf(re){return new et(re)},oneOf(re){return new tt(re)}};var Ee=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 Ge(re){const S=B(re);return{async check(z){return S(z)===z}}}const lt=Ge(Ee);var Dt=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 gt=Ge(Dt);var Et=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"DomainV1alpha1","description":"A Domain groups a collection of systems that share terminology, domain models, business purpose, or documentation, i.e. form a bounded context.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Domain","metadata":{"name":"artists","description":"Everything about artists"},"spec":{"owner":"artist-relations-team"}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1alpha1","backstage.io/v1beta1"]},"kind":{"enum":["Domain"]},"spec":{"type":"object","required":["owner"],"properties":{"owner":{"type":"string","description":"An entity reference to the owner of the component.","examples":["artist-relations-team","user:john.johnson"],"minLength":1}}}}}]}');const ct=Ge(Et);var ft=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 It=Ge(ft);var At=JSON.parse(`{"$schema":"http://json-schema.org/draft-07/schema","$id":"LocationV1alpha1","description":"A location is a marker that references other places to look for catalog data.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Location","metadata":{"name":"org-data"},"spec":{"type":"url","targets":["http://github.com/myorg/myproject/org-data-dump/catalog-info-staff.yaml","http://github.com/myorg/myproject/org-data-dump/catalog-info-consultants.yaml"]}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1alpha1","backstage.io/v1beta1"]},"kind":{"enum":["Location"]},"spec":{"type":"object","required":[],"properties":{"type":{"type":"string","description":"The single location type, that's common to the targets specified in the spec. If it is left out, it is inherited from the location type that originally read the entity data.","examples":["url"],"minLength":1},"target":{"type":"string","description":"A single target as a string. Can be either an absolute path/URL (depending on the type), or a relative path such as ./details/catalog-info.yaml which is resolved relative to the location of this Location entity itself.","examples":["./details/catalog-info.yaml"],"minLength":1},"targets":{"type":"array","description":"A list of targets as strings. They can all be either absolute paths/URLs (depending on the type), or relative paths such as ./details/catalog-info.yaml which are resolved relative to the location of this Location entity itself.","items":{"type":"string","examples":["./details/catalog-info.yaml","http://github.com/myorg/myproject/org-data-dump/catalog-info-staff.yaml"],"minLength":1}},"presence":{"type":"string","description":"Whether the presence of the location target is required and it should be considered an error if it can not be found","default":"required","examples":["required"],"enum":["required","optional"]}}}}}]}`);const Bt=Ge(At),Lt="ownedBy",Ct="ownerOf",ze="consumesApi",nt="apiConsumedBy",Ke="providesApi",pt="apiProvidedBy",rt="dependsOn",yt="dependencyOf",X="parentOf",Z="childOf",te="memberOf",me="hasMember",le="partOf",Se="hasPart";var $e=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"ResourceV1alpha1","description":"A resource describes the infrastructure a system needs to operate, like BigTable databases, Pub/Sub topics, S3 buckets or CDNs. Modelling them together with components and systems allows to visualize resource footprint, and create tooling around them.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Resource","metadata":{"name":"artists-db","description":"Stores artist details"},"spec":{"type":"database","owner":"artist-relations-team","system":"artist-engagement-portal"}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1alpha1","backstage.io/v1beta1"]},"kind":{"enum":["Resource"]},"spec":{"type":"object","required":["type","owner"],"properties":{"type":{"type":"string","description":"The type of resource.","examples":["database","s3-bucket","cluster"],"minLength":1},"owner":{"type":"string","description":"An entity reference to the owner of the resource.","examples":["artist-relations-team","user:john.johnson"],"minLength":1},"dependsOn":{"type":"array","description":"An array of references to other entities that the resource depends on to function.","items":{"type":"string","minLength":1}},"system":{"type":"string","description":"An entity reference to the system that the resource belongs to.","minLength":1}}}}}]}');const Ze=Ge($e);var Xe=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 _=Ge(Xe);var G=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 $=Ge(G),ie="backstage.io/managed-by-location",ve="backstage.io/managed-by-origin-location",Ie="backstage.io/source-location";function pe(re){if(typeof re!="string")throw new TypeError(`Unable to parse location ref '${re}', unexpected argument ${typeof re}`);const S=re.indexOf(":");if(S<0)throw new TypeError(`Unable to parse location ref '${re}', expected '<type>:<target>', e.g. 'url:https://host/path'`);const z=re.substring(0,S).trim(),ce=re.substring(S+1).trim();if(!z||!ce)throw new TypeError(`Unable to parse location ref '${re}', expected '<type>:<target>', e.g. 'url:https://host/path'`);if(z==="http"||z==="https")throw new TypeError(`Invalid location ref '${re}', please prefix it with 'url:', e.g. 'url:${re}'`);return{type:z,target:ce}}function Te(re){const{type:S,target:z}=re;if(S){if(!z)throw new TypeError("Unable to stringify location ref, empty target")}else throw new TypeError("Unable to stringify location ref, empty type");return`${S}:${z}`}function st(re){var z,ce,ye,Ae,Le;const S=(Le=(ce=(z=re.metadata)==null?void 0:z.annotations)==null?void 0:ce[ANNOTATION_SOURCE_LOCATION])!=null?Le:(Ae=(ye=re.metadata)==null?void 0:ye.annotations)==null?void 0:Ae[ANNOTATION_LOCATION];if(!S)throw new Error(`Entity '${stringifyEntityRef(re)}' is missing location`);return pe(S)}},23235:function(q,s,e){"use strict";e.d(s,{C:function(){return t}});var r=e(98005);class t{constructor(){ne(this,"subject",new r.J)}post(f){this.subject.next(f)}alert$(){return this.subject}}},47150:function(q,s,e){"use strict";e.d(s,{g:function(){return r}});class r{captureEvent(l){}}},58652:function(q,s,e){"use strict";e.d(s,{C:function(){return l}});var r=e(98005);const t="theme";class l{constructor(y){ne(this,"activeThemeId");ne(this,"subject",new r.X(void 0));this.themes=y}static createWithStorage(y){var m;const i=new l(y);if(!window.localStorage)return i;const o=(m=window.localStorage.getItem(t))!=null?m:void 0;return i.setActiveThemeId(o),i.activeThemeId$().subscribe(c=>{c?window.localStorage.setItem(t,c):window.localStorage.removeItem(t)}),window.addEventListener("storage",c=>{var g;if(c.key===t){const p=(g=localStorage.getItem(t))!=null?g:void 0;i.setActiveThemeId(p)}}),i}getInstalledThemes(){return this.themes.slice()}activeThemeId$(){return this.subject}getActiveThemeId(){return this.activeThemeId}setActiveThemeId(y){this.activeThemeId=y,this.subject.next(y)}}},14721:function(q,s,e){"use strict";e.d(s,{m:function(){return c}});var r=e(9850),t=e.n(r),l=e(12782),f=e.n(l);const y=/^[a-z][a-z0-9]*(?:[-_][a-z][a-z0-9]*)*$/i;function i(g){return typeof g=="object"&&g!==null&&!Array.isArray(g)}function o(g){if(g===null)return"null";if(Array.isArray(g))return"array";const p=typeof g;return p==="number"&&isNaN(g)?"nan":p==="string"&&g===""?"empty-string":p}const m={type(g,p,R,L){return`Invalid type in config for key '${g}' in '${p}', got ${R}, wanted ${L}`},missing(g){return`Missing required config value at '${g}'`},convert(g,p,R){return`Unable to convert config value for key '${g}' in '${p}' to a ${R}`}};class c{constructor(p,R="mock-config",L,U=""){ne(this,"filteredKeys");ne(this,"notifiedFilteredKeys",new Set);this.data=p,this.context=R,this.fallback=L,this.prefix=U}static fromConfigs(p){return p.length===0?new c(void 0):p.reduce((R,{data:L,context:U,filteredKeys:P,deprecatedKeys:Q})=>{const D=new c(L,U,R);if(D.filteredKeys=P,Q)for(const{key:T,description:b}of Q)console.warn(`The configuration key '${T}' of ${U} is deprecated and may be removed soon. ${b||""}`);return D},void 0)}has(p){var L,U;return this.readValue(p)!==void 0?!0:(U=(L=this.fallback)==null?void 0:L.has(p))!=null?U:!1}keys(){var L,U;const p=this.data?Object.keys(this.data):[],R=(U=(L=this.fallback)==null?void 0:L.keys())!=null?U:[];return[...new Set([...p,...R])]}get(p){const R=this.getOptional(p);if(R===void 0)throw new Error(m.missing(this.fullKey(p!=null?p:"")));return R}getOptional(p){var U;const R=t()(this.readValue(p)),L=(U=this.fallback)==null?void 0:U.getOptional(p);return R===void 0?L:L===void 0?R:f()({},{value:L},{value:R},(P,Q)=>!i(Q)||!i(P)?Q:void 0).value}getConfig(p){const R=this.getOptionalConfig(p);if(R===void 0)throw new Error(m.missing(this.fullKey(p)));return R}getOptionalConfig(p){var U;const R=this.readValue(p),L=(U=this.fallback)==null?void 0:U.getOptionalConfig(p);if(i(R))return this.copy(R,p,L);if(R!==void 0)throw new TypeError(m.type(this.fullKey(p),this.context,o(R),"object"));return L}getConfigArray(p){const R=this.getOptionalConfigArray(p);if(R===void 0)throw new Error(m.missing(this.fullKey(p)));return R}getOptionalConfigArray(p){const R=this.readConfigValue(p,L=>{if(!Array.isArray(L))return{expected:"object-array"};for(const[U,P]of L.entries())if(!i(P))return{expected:"object-array",value:P,key:`${p}[${U}]`};return!0});if(!!R)return R.map((L,U)=>this.copy(L,`${p}[${U}]`))}getNumber(p){const R=this.getOptionalNumber(p);if(R===void 0)throw new Error(m.missing(this.fullKey(p)));return R}getOptionalNumber(p){const R=this.readConfigValue(p,U=>typeof U=="number"||typeof U=="string"||{expected:"number"});if(typeof R=="number"||R===void 0)return R;const L=Number(R);if(!Number.isFinite(L))throw new Error(m.convert(this.fullKey(p),this.context,"number"));return L}getBoolean(p){const R=this.getOptionalBoolean(p);if(R===void 0)throw new Error(m.missing(this.fullKey(p)));return R}getOptionalBoolean(p){return this.readConfigValue(p,R=>typeof R=="boolean"||{expected:"boolean"})}getString(p){const R=this.getOptionalString(p);if(R===void 0)throw new Error(m.missing(this.fullKey(p)));return R}getOptionalString(p){return this.readConfigValue(p,R=>typeof R=="string"&&R!==""||{expected:"string"})}getStringArray(p){const R=this.getOptionalStringArray(p);if(R===void 0)throw new Error(m.missing(this.fullKey(p)));return R}getOptionalStringArray(p){return this.readConfigValue(p,R=>{if(!Array.isArray(R))return{expected:"string-array"};for(const[L,U]of R.entries())if(typeof U!="string"||U==="")return{expected:"string-array",value:U,key:`${p}[${L}]`};return!0})}fullKey(p){return`${this.prefix}${this.prefix?".":""}${p}`}copy(p,R,L){const U=new c(p,this.context,L,this.fullKey(R));return U.filteredKeys=this.filteredKeys,U}readConfigValue(p,R){var P;const L=this.readValue(p);if(L===void 0)return(P=this.fallback)==null?void 0:P.readConfigValue(p,R);const U=R(L);if(U!==!0){const{key:Q=p,value:D=L,expected:T}=U;throw new TypeError(m.type(this.fullKey(Q),this.context,o(D),T))}return L}readValue(p){const R=p?p.split("."):[];for(const U of R)if(!y.test(U))throw new TypeError(`Invalid config key '${p}'`);if(this.data===void 0)return;let L=this.data;for(const[U,P]of R.entries())if(i(L))L=L[P];else if(L!==void 0){const Q=this.fullKey(R.slice(0,U).join("."));throw new TypeError(m.type(Q,this.context,o(L),"object"))}return L}}},4333:function(q,s,e){"use strict";e.d(s,{p:function(){return t}});const r="Invalid discovery URL pattern,";class t{static compile(f){const y=f.split(/\{\{\s*pluginId\s*\}\}/),i=y.join("pluginId");let o;try{o=new URL(i)}catch{throw new Error(`${r} URL '${i}' is invalid`)}if(o.hash)throw new Error(`${r} URL must not have a hash`);if(o.search)throw new Error(`${r} URL must not have a query`);if(i.endsWith("/"))throw new Error(`${r} URL must not end with a slash`);return new t(y)}constructor(f){this.parts=f}async getBaseUrl(f){return this.parts.join(f)}}},89536:function(q,s,e){"use strict";e.d(s,{KN:function(){return r},gr:function(){return l},Jv:function(){return f}});class r{constructor(i,o){this.alertApi=i,this.errorApi=o}post(i,o){return(o==null?void 0:o.hidden)||this.alertApi.post({message:i.message,severity:"error"}),this.errorApi.post(i,o)}error$(){return this.errorApi.error$()}}var t=e(98005);class l{constructor(){ne(this,"subject",new t.J)}post(i,o){this.subject.next({error:i,context:o})}error$(){return this.subject}}class f{static forward(i,o){window.addEventListener("unhandledrejection",m=>{i.post(m.reason,o)})}}},14884:function(q,s,e){"use strict";e.d(s,{b:function(){return l}});var r=e(36964);function t(f){if(f.length<3)throw new Error(`The '${f}' feature flag must have a minimum length of three characters.`);if(f.length>150)throw new Error(`The '${f}' feature flag must not exceed 150 characters.`);if(!f.match(/^[a-z]+[a-z0-9-]+$/))throw new Error(`The '${f}' feature flag must start with a lowercase letter and only contain lowercase letters, numbers and hyphens. Examples: feature-flag-one, alpha, release-2020`)}class l{constructor(){ne(this,"registeredFeatureFlags",[]);ne(this,"flags")}registerFlag(y){t(y.name),this.registeredFeatureFlags.push(y)}getRegisteredFlags(){return this.registeredFeatureFlags.slice()}isActive(y){return this.flags||(this.flags=this.load()),this.flags.get(y)===r.FeatureFlagState.Active}save(y){this.flags||(this.flags=this.load()),y.merge||this.flags.clear();for(const[o,m]of Object.entries(y.states))this.flags.set(o,m);const i=Array.from(this.flags.entries()).filter(([,o])=>o===r.FeatureFlagState.Active);window.localStorage.setItem("featureFlags",JSON.stringify(Object.fromEntries(i)))}load(){try{const y=window.localStorage.getItem("featureFlags");if(!y)return new Map;const i=JSON.parse(y);if(typeof i!="object"||i===null||Array.isArray(i))return new Map;const o=Object.entries(i).filter(([m,c])=>(t(m),c===r.FeatureFlagState.Active));return new Map(o)}catch{return new Map}}}},50160:function(q,s,e){"use strict";e.d(s,{I:function(){return o},j:function(){return r}});function r(m){var p;let c=m.baseImplementation||e.g.fetch;const g=[(p=m.middleware)!=null?p:[]].flat().reverse();for(const R of g)c=R.apply(c);return{fetch:c}}class t{static create(c){var L,U;const g=l(c),p=((L=c.header)==null?void 0:L.name)||"authorization",R=((U=c.header)==null?void 0:U.value)||(P=>`Bearer ${P}`);return new t(c.identityApi,g,p,R)}constructor(c,g,p,R){this.identityApi=c,this.allowUrl=g,this.headerName=p,this.headerValue=R}apply(c){return async(g,p)=>{const R=new Request(g,p),{token:L}=await this.identityApi.getCredentials();return R.headers.get(this.headerName)||typeof L!="string"||!L||!this.allowUrl(R.url)?c(g,p):(R.headers.set(this.headerName,this.headerValue(L)),c(R))}}}function l(m){return m.allowUrl?m.allowUrl:m.urlPrefixAllowlist?f(m.urlPrefixAllowlist):m.config?f([m.config.getString("backend.baseUrl")]):()=>!1}function f(m){const c=m.map(g=>g.replace(/\/$/,""));return g=>c.some(p=>g===p||g.startsWith(`${p}/`))}function y(m,c){return!c||c==="/"?m:`${m.replace(/\/$/,"")}/${c.replace(/^\//,"")}`}class i{constructor(c){this.discoveryApi=c}apply(c){return async(g,p)=>{const R=new Request(g,p),L="plugin://";if(!R.url.startsWith(L))return c(g,p);const{hostname:U,pathname:P,search:Q,hash:D,username:T,password:b}=new URL(`http://${R.url.substring(L.length)}`);let B=await this.discoveryApi.getBaseUrl(U);if(T||b){const j=new URL(B),se=`${T}${b?`:${b}`:""}@`;B=`${j.protocol}//${se}${j.host}${j.pathname}`}const N=`${y(B,P)}${Q}${D}`;return c(N,R)}}}class o{static resolvePluginProtocol(c){return new i(c.discoveryApi)}static injectIdentityAuth(c){return t.create(c)}constructor(){}}},11358:function(q,s,e){"use strict";e.d(s,{Y:function(){return y}});var r=e(98005);function t(i,o){for(const m of o)if(!i.has(m))return!1;return!0}function l(i,...o){const m=new Set(i);for(const c of o)for(const g of c)m.add(g);return m}class f{constructor(){ne(this,"requests",[]);ne(this,"subject",new r.X(this.getCurrentPending()))}request(o){return new Promise((m,c)=>{this.requests.push({scopes:o,resolve:m,reject:c}),this.subject.next(this.getCurrentPending())})}resolve(o,m){this.requests=this.requests.filter(c=>t(o,c.scopes)?(c.resolve(m),!1):!0),this.subject.next(this.getCurrentPending())}reject(o){this.requests.forEach(m=>m.reject(o)),this.requests=[],this.subject.next(this.getCurrentPending())}pending(){return this.subject}getCurrentPending(){const o=this.requests.length===0?void 0:this.requests.slice(1).reduce((m,c)=>l(m,c.scopes),this.requests[0].scopes);return{scopes:o,resolve:m=>{o&&this.resolve(o,m)},reject:m=>{o&&this.reject(m)}}}}class y{constructor(){ne(this,"subject",new r.X([]));ne(this,"currentRequests",[]);ne(this,"handlerCount",0)}createAuthRequester(o){const m=new f,c=this.handlerCount;return this.handlerCount++,m.pending().subscribe({next:g=>{const p=this.currentRequests.slice(),R=this.makeAuthRequest(g,o);R?p[c]=R:delete p[c],this.currentRequests=p,this.subject.next(p.filter(Boolean))}}),g=>m.request(g)}makeAuthRequest(o,m){const{scopes:c}=o;if(!!c)return{provider:m.provider,trigger:async()=>{const g=await m.onAuthRequest(c);o.resolve(g)},reject:()=>{const g=new Error("Login failed, rejected by user");g.name="RejectedError",o.reject(g)}}}authRequest$(){return this.subject}}},56054:function(q,s,e){"use strict";e.d(s,{C:function(){return f}});var r=e(82394),t=e.n(r);const l=new Map;class f{constructor(i,o){ne(this,"subscribers",new Set);ne(this,"observable",new(t())(i=>(this.subscribers.add(i),()=>{this.subscribers.delete(i)})));this.namespace=i,this.errorApi=o}static create(i){var o;return new f((o=i.namespace)!=null?o:"",i.errorApi)}get(i){return this.snapshot(i).value}snapshot(i){let o,m="absent";try{const c=localStorage.getItem(this.getKeyName(i));c&&(o=JSON.parse(c,(g,p)=>(typeof p=="object"&&p!==null&&Object.freeze(p),p)),m="present")}catch{this.errorApi.post(new Error(`Error when parsing JSON config from storage for: ${i}`))}return{key:i,value:o,presence:m}}forBucket(i){const o=`${this.namespace}/${i}`;return l.has(o)||l.set(o,new f(o,this.errorApi)),l.get(o)}async set(i,o){localStorage.setItem(this.getKeyName(i),JSON.stringify(o)),this.notifyChanges(i)}async remove(i){localStorage.removeItem(this.getKeyName(i)),this.notifyChanges(i)}observe$(i){return this.observable.filter(({key:o})=>o===i)}getKeyName(i){return`${this.namespace}/${encodeURIComponent(i)}`}notifyChanges(i){const o=this.snapshot(i);for(const m of this.subscribers)m.next(o)}}},59589:function(q,s,e){"use strict";e.d(s,{u:function(){return l}});var r=e(91205);const t={id:"atlassian",title:"Atlassian",icon:()=>null};class l{static create(y){const{discoveryApi:i,environment:o="development",provider:m=t,oauthRequestApi:c}=y;return r.OAuth2.create({discoveryApi:i,oauthRequestApi:c,provider:m,environment:o})}}},6098:function(q,s,e){"use strict";e.d(s,{Z:function(){return l}});var r=e(91205);const t={id:"bitbucket",title:"Bitbucket",icon:()=>null};class l{static create(y){const{discoveryApi:i,environment:o="development",provider:m=t,oauthRequestApi:c,defaultScopes:g=["team"]}=y;return r.OAuth2.create({discoveryApi:i,oauthRequestApi:c,provider:m,environment:o,defaultScopes:g})}}},44431:function(q,s,e){"use strict";e.d(s,{BitbucketAuth:function(){return l.Z}});var r=e(19347),t=e.n(r);e.o(r,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return r.AlertApiForwarder}}),e.o(r,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return r.AppThemeSelector}}),e.o(r,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return r.AtlassianAuth}}),e.o(r,"ConfigReader")&&e.d(s,{ConfigReader:function(){return r.ConfigReader}}),e.o(r,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return r.ErrorAlerter}}),e.o(r,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return r.ErrorApiForwarder}}),e.o(r,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return r.FetchMiddlewares}}),e.o(r,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return r.FlatRoutes}}),e.o(r,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return r.LocalStorageFeatureFlags}}),e.o(r,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return r.NoOpAnalyticsApi}}),e.o(r,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return r.OAuthRequestManager}}),e.o(r,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return r.UnhandledErrorForwarder}}),e.o(r,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return r.UrlPatternDiscovery}}),e.o(r,"WebStorage")&&e.d(s,{WebStorage:function(){return r.WebStorage}}),e.o(r,"createFetchApi")&&e.d(s,{createFetchApi:function(){return r.createFetchApi}}),e.o(r,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return r.createSpecializedApp}}),e.o(r,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return r.defaultConfigLoader}});var l=e(6098)},19347:function(){},44474:function(q,s,e){"use strict";e.d(s,{T:function(){return l}});var r=e(91205);const t={id:"github",title:"GitHub",icon:()=>null};class l{static create(y){const{discoveryApi:i,environment:o="development",provider:m=t,oauthRequestApi:c,defaultScopes:g=["read:user"]}=y;return r.OAuth2.create({discoveryApi:i,oauthRequestApi:c,provider:m,environment:o,defaultScopes:g})}}},2922:function(q,s,e){"use strict";e.d(s,{a:function(){return l}});var r=e(91205);const t={id:"gitlab",title:"GitLab",icon:()=>null};class l{static create(y){const{discoveryApi:i,environment:o="development",provider:m=t,oauthRequestApi:c,defaultScopes:g=["read_user"]}=y;return r.OAuth2.create({discoveryApi:i,oauthRequestApi:c,provider:m,environment:o,defaultScopes:g})}}},59938:function(q,s,e){"use strict";e.d(s,{e:function(){return f}});var r=e(91205);const t={id:"google",title:"Google",icon:()=>null},l="https://www.googleapis.com/auth/";class f{static create(i){const{discoveryApi:o,oauthRequestApi:m,environment:c="development",provider:g=t,defaultScopes:p=["openid",`${l}userinfo.email`,`${l}userinfo.profile`]}=i;return r.OAuth2.create({discoveryApi:o,oauthRequestApi:m,provider:g,environment:c,defaultScopes:p,scopeTransform(R){return R.map(L=>L==="openid"?L:L==="profile"||L==="email"?`${l}userinfo.${L}`:L.startsWith(l)?L:`${l}${L}`)}})}}},91668:function(q,s,e){"use strict";e.d(s,{GithubAuth:function(){return r.T},GitlabAuth:function(){return t.a},GoogleAuth:function(){return l.e},OktaAuth:function(){return y.s},MicrosoftAuth:function(){return o._},OneLoginAuth:function(){return m.$},BitbucketAuth:function(){return c.BitbucketAuth},AtlassianAuth:function(){return g.u}});var r=e(44474),t=e(2922),l=e(59938),f=e(91205);e.o(f,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return f.AlertApiForwarder}}),e.o(f,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return f.AppThemeSelector}}),e.o(f,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return f.AtlassianAuth}}),e.o(f,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return f.BitbucketAuth}}),e.o(f,"ConfigReader")&&e.d(s,{ConfigReader:function(){return f.ConfigReader}}),e.o(f,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return f.ErrorAlerter}}),e.o(f,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return f.ErrorApiForwarder}}),e.o(f,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return f.FetchMiddlewares}}),e.o(f,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return f.FlatRoutes}}),e.o(f,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return f.LocalStorageFeatureFlags}}),e.o(f,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return f.MicrosoftAuth}}),e.o(f,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return f.NoOpAnalyticsApi}}),e.o(f,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return f.OAuthRequestManager}}),e.o(f,"OktaAuth")&&e.d(s,{OktaAuth:function(){return f.OktaAuth}}),e.o(f,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return f.OneLoginAuth}}),e.o(f,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return f.UnhandledErrorForwarder}}),e.o(f,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return f.UrlPatternDiscovery}}),e.o(f,"WebStorage")&&e.d(s,{WebStorage:function(){return f.WebStorage}}),e.o(f,"createFetchApi")&&e.d(s,{createFetchApi:function(){return f.createFetchApi}}),e.o(f,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return f.createSpecializedApp}}),e.o(f,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return f.defaultConfigLoader}});var y=e(26079),i=e(67604),o=e(38482),m=e(58381),c=e(44431);e.o(c,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return c.AlertApiForwarder}}),e.o(c,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return c.AppThemeSelector}}),e.o(c,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return c.AtlassianAuth}}),e.o(c,"ConfigReader")&&e.d(s,{ConfigReader:function(){return c.ConfigReader}}),e.o(c,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return c.ErrorAlerter}}),e.o(c,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return c.ErrorApiForwarder}}),e.o(c,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return c.FetchMiddlewares}}),e.o(c,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return c.FlatRoutes}}),e.o(c,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return c.LocalStorageFeatureFlags}}),e.o(c,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return c.NoOpAnalyticsApi}}),e.o(c,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return c.OAuthRequestManager}}),e.o(c,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return c.UnhandledErrorForwarder}}),e.o(c,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return c.UrlPatternDiscovery}}),e.o(c,"WebStorage")&&e.d(s,{WebStorage:function(){return c.WebStorage}}),e.o(c,"createFetchApi")&&e.d(s,{createFetchApi:function(){return c.createFetchApi}}),e.o(c,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return c.createSpecializedApp}}),e.o(c,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return c.defaultConfigLoader}});var g=e(59589)},38482:function(q,s,e){"use strict";e.d(s,{_:function(){return l}});var r=e(91205);const t={id:"microsoft",title:"Microsoft",icon:()=>null};class l{static create(y){const{environment:i="development",provider:o=t,oauthRequestApi:m,discoveryApi:c,defaultScopes:g=["openid","offline_access","profile","email","User.Read"]}=y;return r.OAuth2.create({discoveryApi:c,oauthRequestApi:m,provider:o,environment:i,defaultScopes:g})}}},73124:function(q,s,e){"use strict";e.d(s,{Z:function(){return i}});function r(o){return new Promise((m,c)=>{const g=o.width||500,p=o.height||700,R=window.screen.width/2-g/2,L=window.screen.height/2-p/2,U=window.open(o.url,o.name,`menubar=no,location=no,resizable=no,scrollbars=no,status=no,width=${g},height=${p},top=${L},left=${R}`);let P="";if(!U||typeof U.closed=="undefined"||U.closed){const b=new Error("Failed to open auth popup.");b.name="PopupRejectedError",c(b);return}const Q=b=>{if(b.source!==U||b.origin!==o.origin)return;const{data:B}=b;if(B.type==="config_info"){P=B.targetOrigin;return}if(B.type!=="authorization_response")return;const N=B;if("error"in N){const j=new Error(N.error.message);j.name=N.error.name,c(j)}else m(N.response);T()},D=setInterval(()=>{if(U.closed){const b=`Login failed, ${P&&P!==window.location.origin?`Incorrect app origin, expected ${P}`:"popup was closed"}`,B=new Error(b);B.name="PopupClosedError",c(B),T()}},100);function T(){window.removeEventListener("message",Q),clearInterval(D)}window.addEventListener("message",Q)})}function t(o){return[...o].join(" ")}class l{constructor(m){ne(this,"discoveryApi");ne(this,"environment");ne(this,"provider");ne(this,"joinScopesFunc");ne(this,"authRequester");ne(this,"sessionTransform");const{discoveryApi:c,environment:g,provider:p,joinScopes:R=t,oauthRequestApi:L,sessionTransform:U=P=>P}=m;this.authRequester=L.createAuthRequester({provider:p,onAuthRequest:P=>this.showPopup(P)}),this.discoveryApi=c,this.environment=g,this.provider=p,this.joinScopesFunc=R,this.sessionTransform=U}async createSession(m){return m.instantPopup?this.showPopup(m.scopes):this.authRequester(m.scopes)}async refreshSession(){const m=await fetch(await this.buildUrl("/refresh",{optional:!0}),{headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(g=>{throw new Error(`Auth refresh request failed, ${g}`)});if(!m.ok){const g=new Error(`Auth refresh request failed, ${m.statusText}`);throw g.status=m.status,g}const c=await m.json();if(c.error){const g=new Error(c.error.message);throw c.error.name&&(g.name=c.error.name),g}return await this.sessionTransform(c)}async removeSession(){const m=await fetch(await this.buildUrl("/logout"),{method:"POST",headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(c=>{throw new Error(`Logout request failed, ${c}`)});if(!m.ok){const c=new Error(`Logout request failed, ${m.statusText}`);throw c.status=m.status,c}}async showPopup(m){const c=this.joinScopesFunc(m),g=await this.buildUrl("/start",{scope:c,origin:location.origin}),p=await r({url:g,name:`${this.provider.title} Login`,origin:new URL(g).origin,width:450,height:730});return await this.sessionTransform(p)}async buildUrl(m,c){const g=await this.discoveryApi.getBaseUrl("auth"),p=this.buildQueryString({...c,env:this.environment});return`${g}/${this.provider.id}${m}${p}`}buildQueryString(m){if(!m)return"";const c=Object.entries(m).map(([g,p])=>{if(typeof p=="string")return`${encodeURIComponent(g)}=${encodeURIComponent(p)}`;if(p)return encodeURIComponent(g)}).filter(Boolean).join("&");return c?`?${c}`:""}}var f=e(57018);const y={id:"oauth2",title:"Your Identity Provider",icon:()=>null};class i{constructor(m){ne(this,"sessionManager");ne(this,"scopeTransform");this.sessionManager=m.sessionManager,this.scopeTransform=m.scopeTransform}static create(m){const{discoveryApi:c,environment:g="development",provider:p=y,oauthRequestApi:R,defaultScopes:L=[],scopeTransform:U=D=>D}=m,P=new l({discoveryApi:c,environment:g,provider:p,oauthRequestApi:R,sessionTransform(D){return{...D,providerInfo:{idToken:D.providerInfo.idToken,accessToken:D.providerInfo.accessToken,scopes:i.normalizeScopes(U,D.providerInfo.scope),expiresAt:new Date(Date.now()+D.providerInfo.expiresInSeconds*1e3)}}}}),Q=new f.RefreshingAuthSessionManager({connector:P,defaultScopes:new Set(L),sessionScopes:D=>D.providerInfo.scopes,sessionShouldRefresh:D=>(D.providerInfo.expiresAt.getTime()-Date.now())/1e3<60*5});return new i({sessionManager:Q,scopeTransform:U})}async signIn(){await this.getAccessToken()}async signOut(){await this.sessionManager.removeSession()}sessionState$(){return this.sessionManager.sessionState$()}async getAccessToken(m,c){var R;const g=i.normalizeScopes(this.scopeTransform,m),p=await this.sessionManager.getSession({...c,scopes:g});return(R=p==null?void 0:p.providerInfo.accessToken)!=null?R:""}async getIdToken(m={}){var g;const c=await this.sessionManager.getSession(m);return(g=c==null?void 0:c.providerInfo.idToken)!=null?g:""}async getBackstageIdentity(m={}){const c=await this.sessionManager.getSession(m);return c==null?void 0:c.backstageIdentity}async getProfile(m={}){const c=await this.sessionManager.getSession(m);return c==null?void 0:c.profile}static normalizeScopes(m,c){if(!c)return new Set;const g=Array.isArray(c)?c:c.split(/[\s|,]/).filter(Boolean);return new Set(m(g))}}},91205:function(q,s,e){"use strict";e.d(s,{OAuth2:function(){return r.Z}});var r=e(73124),t=e(5973),l=e.n(t);e.o(t,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return t.AlertApiForwarder}}),e.o(t,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return t.AppThemeSelector}}),e.o(t,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return t.AtlassianAuth}}),e.o(t,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return t.BitbucketAuth}}),e.o(t,"ConfigReader")&&e.d(s,{ConfigReader:function(){return t.ConfigReader}}),e.o(t,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return t.ErrorAlerter}}),e.o(t,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return t.ErrorApiForwarder}}),e.o(t,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return t.FetchMiddlewares}}),e.o(t,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return t.FlatRoutes}}),e.o(t,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return t.LocalStorageFeatureFlags}}),e.o(t,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return t.MicrosoftAuth}}),e.o(t,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return t.NoOpAnalyticsApi}}),e.o(t,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return t.OAuthRequestManager}}),e.o(t,"OktaAuth")&&e.d(s,{OktaAuth:function(){return t.OktaAuth}}),e.o(t,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return t.OneLoginAuth}}),e.o(t,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return t.UnhandledErrorForwarder}}),e.o(t,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return t.UrlPatternDiscovery}}),e.o(t,"WebStorage")&&e.d(s,{WebStorage:function(){return t.WebStorage}}),e.o(t,"createFetchApi")&&e.d(s,{createFetchApi:function(){return t.createFetchApi}}),e.o(t,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return t.createSpecializedApp}}),e.o(t,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return t.defaultConfigLoader}})},5973:function(){},26079:function(q,s,e){"use strict";e.d(s,{s:function(){return y}});var r=e(91205);const t={id:"okta",title:"Okta",icon:()=>null},l=new Set(["openid","profile","email","phone","address","groups","offline_access"]),f="okta.";class y{static create(o){const{discoveryApi:m,environment:c="development",provider:g=t,oauthRequestApi:p,defaultScopes:R=["openid","email","profile","offline_access"]}=o;return r.OAuth2.create({discoveryApi:m,oauthRequestApi:p,provider:g,environment:c,defaultScopes:R,scopeTransform(L){return L.map(U=>l.has(U)||U.startsWith(f)?U:`${f}${U}`)}})}}},58381:function(q,s,e){"use strict";e.d(s,{$:function(){return y}});var r=e(91205);const t={id:"onelogin",title:"onelogin",icon:()=>null},l=new Set(["openid","profile","email","phone","address","groups","offline_access"]),f="onelogin.";class y{static create(o){const{discoveryApi:m,environment:c="development",provider:g=t,oauthRequestApi:p}=o;return r.OAuth2.create({discoveryApi:m,oauthRequestApi:p,provider:g,environment:c,defaultScopes:["openid","email","profile","offline_access"],scopeTransform(R){return R.map(L=>l.has(L)||L.startsWith(f)?L:`${f}${L}`)}})}}},67604:function(q,s,e){"use strict";var r=e(57018),t=e(30195);const l=t.z.object({profile:t.z.object({email:t.z.string().optional(),displayName:t.z.string().optional(),picture:t.z.string().optional()}),backstageIdentity:t.z.object({id:t.z.string(),token:t.z.string(),identity:t.z.object({type:t.z.literal("user"),userEntityRef:t.z.string(),ownershipEntityRefs:t.z.array(t.z.string())})})}),f={id:"saml",title:"SAML",icon:()=>null};class y{static create(o){const{discoveryApi:m,environment:c="development",provider:g=f}=o,p=new DirectAuthConnector({discoveryApi:m,environment:c,provider:g}),R=new StaticAuthSessionManager({connector:p}),L=new AuthSessionStore({manager:R,storageKey:`${g.id}Session`,schema:samlSessionSchema});return new y(L)}sessionState$(){return this.sessionManager.sessionState$()}constructor(o){this.sessionManager=o}async signIn(){await this.getBackstageIdentity({})}async signOut(){await this.sessionManager.removeSession()}async getBackstageIdentity(o={}){const m=await this.sessionManager.getSession(o);return m==null?void 0:m.backstageIdentity}async getProfile(o={}){const m=await this.sessionManager.getSession(o);return m==null?void 0:m.profile}}},91631:function(q,s,e){"use strict";e.d(s,{AtlassianAuth:function(){return r.AtlassianAuth},GithubAuth:function(){return r.GithubAuth},GitlabAuth:function(){return r.GitlabAuth},GoogleAuth:function(){return r.GoogleAuth},MicrosoftAuth:function(){return r.MicrosoftAuth},OktaAuth:function(){return r.OktaAuth},OneLoginAuth:function(){return r.OneLoginAuth},AlertApiForwarder:function(){return t.C},NoOpAnalyticsApi:function(){return l.g},AppThemeSelector:function(){return f.C},ConfigReader:function(){return y.m},UrlPatternDiscovery:function(){return i.p},ErrorAlerter:function(){return o.KN},ErrorApiForwarder:function(){return o.gr},UnhandledErrorForwarder:function(){return o.Jv},LocalStorageFeatureFlags:function(){return m.b},FetchMiddlewares:function(){return c.I},createFetchApi:function(){return c.j},OAuthRequestManager:function(){return g.Y},WebStorage:function(){return p.C}});var r=e(91668);e.o(r,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return r.AlertApiForwarder}}),e.o(r,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return r.AppThemeSelector}}),e.o(r,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return r.BitbucketAuth}}),e.o(r,"ConfigReader")&&e.d(s,{ConfigReader:function(){return r.ConfigReader}}),e.o(r,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return r.ErrorAlerter}}),e.o(r,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return r.ErrorApiForwarder}}),e.o(r,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return r.FetchMiddlewares}}),e.o(r,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return r.FlatRoutes}}),e.o(r,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return r.LocalStorageFeatureFlags}}),e.o(r,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return r.NoOpAnalyticsApi}}),e.o(r,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return r.OAuthRequestManager}}),e.o(r,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return r.UnhandledErrorForwarder}}),e.o(r,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return r.UrlPatternDiscovery}}),e.o(r,"WebStorage")&&e.d(s,{WebStorage:function(){return r.WebStorage}}),e.o(r,"createFetchApi")&&e.d(s,{createFetchApi:function(){return r.createFetchApi}}),e.o(r,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return r.createSpecializedApp}}),e.o(r,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return r.defaultConfigLoader}});var t=e(23235),l=e(47150),f=e(58652),y=e(14721),i=e(4333),o=e(89536),m=e(14884),c=e(50160),g=e(11358),p=e(56054)},56494:function(q,s,e){"use strict";e.d(s,{ApiProvider:function(){return r.ApiProvider},AlertApiForwarder:function(){return t.AlertApiForwarder},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(q,s,e){"use strict";e.d(s,{p:function(){return t}});var r;(function(l){l[l.default=10]="default";const f=50;l[l.app=f]="app",l[l.static=100]="static"})(r||(r={}));class t{constructor(){ne(this,"factories",new Map)}register(f,y){const i=r[f],o=this.factories.get(y.api.id);return o&&o.priority>=i?!1:(this.factories.set(y.api.id,{priority:i,factory:y}),!0)}get(f){const y=this.factories.get(f.id);if(!!y)return y.factory}getAllApis(){const f=new Set;for(const{factory:y}of this.factories.values())f.add(y.api);return f}}},14406:function(q,s,e){"use strict";e.d(s,{g:function(){return o}});var r=e(2784),t=e(13980),l=e.n(t);class f{constructor(...c){ne(this,"holders");this.holders=c}get(c){for(const g of this.holders){const p=g.get(c);if(p)return p}}}var y=e(76241);const i=(0,y.CT)("api-context"),o=m=>{var L;const{apis:c,children:g}=m,p=(L=(0,r.useContext)(i))==null?void 0:L.atVersion(1),R=p?new f(c,p):c;return r.createElement(i.Provider,{value:(0,y.EI)({1:R}),children:g})};o.propTypes={apis:l().shape({get:l().func.isRequired}).isRequired,children:l().node}},12132:function(q,s,e){"use strict";e.d(s,{M:function(){return r}});class r{constructor(l){ne(this,"apis",new Map);this.factories=l}static validateFactories(l,f){for(const y of f){const i=[y],o=new Set;for(;i.length;){const m=i.shift(),c=l.get(m);if(!!c)for(const g of Object.values(c.deps)){if(g.id===y.id)throw new Error(`Circular dependency of api factory for ${y}`);o.has(g)||(o.add(g),i.push(g))}}}}get(l){return this.load(l)}load(l,f=[]){const y=this.apis.get(l.id);if(y)return y;const i=this.factories.get(l);if(!i)return;if(f.includes(i.api))throw new Error(`Circular dependency of api factory for ${i.api}`);const o=this.loadDeps(l,i.deps,[...f,i.api]),m=i.factory(o);return this.apis.set(l.id,m),m}loadDeps(l,f,y){const i={};for(const o in f)if(f.hasOwnProperty(o)){const m=f[o],c=this.load(m,y);if(!c)throw new Error(`No API factory available for dependency ${m} of dependent ${l}`);i[o]=c}return i}}},76105:function(q,s,e){"use strict";e.d(s,{ApiProvider:function(){return r.g},ApiResolver:function(){return t.M},ApiFactoryRegistry:function(){return l.p}});var r=e(14406),t=e(12132),l=e(80396),f=e(82488),y=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(q,s,e){"use strict";e.d(s,{b:function(){return yt}});var r=e(2784),t=e(10289),l=e(64279),f=e(56494),y=e(36964),i=e(76105);function o(X){const Z={};for(const me in X.collectors)X.collectors.hasOwnProperty(me)&&(Z[me]=X.collectors[me]());const te=[{node:r.Children.toArray(X.root),parent:void 0,contexts:{}}];for(;te.length!==0;){const{node:me,parent:le,contexts:Se}=te.shift();r.Children.forEach(me,$e=>{if(!(0,r.isValidElement)($e))return;const Ze={};for(const Xe in Z)if(Z.hasOwnProperty(Xe)){const _=Z[Xe];Ze[Xe]=_.visit(_.accumulator,$e,le,Se[Xe])}for(const Xe of X.discoverers){const _=Xe($e);_&&te.push({node:_,parent:$e,contexts:Ze})}})}return Object.fromEntries(Object.entries(Z).map(([me,le])=>[me,le.accumulator]))}function m(X,Z){return()=>({accumulator:X(),visit:Z})}function c(X){var Z;return(Z=X.props)==null?void 0:Z.children}function g(X){var Z,te,me;if(((Z=X.props)==null?void 0:Z.path)&&((te=X.props)==null?void 0:te.element))return(me=X.props)==null?void 0:me.element}const p=m(()=>new Set,(X,Z)=>{const te=(0,y.getComponentData)(Z,"core.plugin");te&&X.add(te)});var R=e(88934);function L(X){var me;const Z=(me=X.props)==null?void 0:me.element;let te=(0,y.getComponentData)(X,"core.mountPoint");return!te&&(0,r.isValidElement)(Z)&&(te=(0,y.getComponentData)(Z,"core.mountPoint")),te}const U=m(()=>new Map,(X,Z,te,me)=>{var $e,Ze;let le=me;if((te==null?void 0:te.props.element)===Z)return le;if((0,y.getComponentData)(Z,"core.gatherMountPoints")){const Xe=($e=Z.props)==null?void 0:$e.path;if(!Xe)throw new Error("Mount point gatherer must have a path");le=Xe}const Se=L(Z);if(Se){let Xe=(Ze=Z.props)==null?void 0:Ze.path;if(le&&(Xe?le=void 0:Xe=le),!Xe)throw new Error("Mounted routable extension must have a path");X.set(Se,Xe)}return le}),P=m(()=>new Map,(X,Z,te,me)=>{var $e;if((te==null?void 0:te.props.element)===Z)return me;let le=me;const Se=L(Z);return Se&&(me&&"sticky"in me?(X.set(Se,me.sticky),(($e=Z.props)==null?void 0:$e.path)?le=Se:le=me):(X.set(Se,me),le=Se)),(0,y.getComponentData)(Z,"core.gatherMountPoints")?{sticky:le}:le}),Q={caseSensitive:!1,path:"/*",element:"match-all",routeRefs:new Set},D=m(()=>Array(),(X,Z,te,me)=>{var _,G,$;const le=(_=me==null?void 0:me.children)!=null?_:X;if((te==null?void 0:te.props.element)===Z)return me;const Se=(G=Z.props)==null?void 0:G.path,$e=Boolean(($=Z.props)==null?void 0:$.caseSensitive),Ze=L(Z);if(Ze){if(Se){const ie={caseSensitive:$e,path:Se,element:"mounted",routeRefs:new Set([Ze]),children:[Q],plugin:(0,y.getComponentData)(Z.props.element,"core.plugin")};return le.push(ie),ie}me==null||me.routeRefs.add(Ze)}if((0,y.getComponentData)(Z,"core.gatherMountPoints")){if(!Se)throw new Error("Mount point gatherer must have a path");const ie={caseSensitive:$e,path:Se,element:"gathered",routeRefs:new Set,children:[Q],plugin:me==null?void 0:me.plugin};return le.push(ie),ie}return me}),T=m(()=>new Set,(X,Z)=>{if(Z.type===R.L){const te=Z.props;X.add("with"in te?te.with:te.without)}});var b=e(76241);const B=(0,b.uW)("route-ref-type",()=>Symbol("route-ref-type"));function N(X){return X[B]==="absolute"}function j(X){return X[B]==="sub"}function se(X){return X[B]==="external"}function Ce(...X){const Z=X.join("/").replace(/\/\/+/g,"/");return Z!=="/"&&Z.endsWith("/")?Z.slice(0,-1):Z}function xe(X,Z,te){let me,le="";if(N(X))me=X;else if(j(X))me=X.parent,le=X.path;else if(se(X)){const Ze=te.get(X);if(!Ze)return[void 0,""];if(N(Ze))me=Ze;else if(j(Ze))me=Ze.parent,le=Ze.path;else throw new Error(`ExternalRouteRef was bound to invalid target, ${Ze}`)}else throw X[B]?new Error(`Unknown or invalid route ref type, ${X[B]}`):new Error(`Unknown object passed to useRouteRef, got ${X}`);if(!me)return[void 0,""];const Se=Z.get(me);if(!Se)return[void 0,""];const $e=Ce(Se,le);return[me,$e]}function He(X,Z,te,me,le){var G;const Se=(G=(0,t.fp)(le,Z))!=null?G:[],$e=Array();let Ze=-1;for(let $=X;$&&(Ze=Se.findIndex(ie=>ie.route.routeRefs.has($)),Ze===-1);$=me.get($))$e.unshift($);$e.length===0&&(Ze-=1);const Xe=Ze===-1?"":Se[Ze].pathname,_=Ce(...$e.slice(0,-1).map($=>{const ie=te.get($);if(!ie)throw new Error(`No path for ${$}`);if(ie.includes(":"))throw new Error(`Cannot route to ${X} with parent ${$} as it has parameters`);return ie}));return Xe+_}class fe{constructor(Z,te,me,le,Se){this.routePaths=Z,this.routeParents=te,this.routeObjects=me,this.routeBindings=le,this.appBasePath=Se}resolve(Z,te){const[me,le]=xe(Z,this.routePaths,this.routeBindings);if(!me)return;let Se;typeof te=="string"?Se=this.trimPath(te):te.pathname?Se={...te,pathname:this.trimPath(te.pathname)}:Se=te;const $e=this.appBasePath+He(me,Se,this.routePaths,this.routeParents,this.routeObjects);return(...[Xe])=>$e+(0,t.Gn)(le,Xe)}trimPath(Z){return Z&&(Z.startsWith(this.appBasePath)?Z.slice(this.appBasePath.length):Z)}}const je=(0,b.CT)("routing-context"),Qe=({routePaths:X,routeParents:Z,routeObjects:te,routeBindings:me,basePath:le="",children:Se})=>{const $e=new fe(X,Z,te,me,le),Ze=(0,b.EI)({1:$e});return r.createElement(je.Provider,{value:Ze},Se)},at=(X,Z)=>{var te,me;try{const le=(0,t.fp)(Z,{pathname:X}),Se=(te=le==null?void 0:le.filter(Ze=>{var Xe;return((Xe=Ze==null?void 0:Ze.route.routeRefs)==null?void 0:Xe.size)>0}).pop())==null?void 0:te.route;if(!Se)return{};let $e;return Se.routeRefs.size===1&&($e=Se.routeRefs.values().next().value),{extension:"App",pluginId:((me=Se.plugin)==null?void 0:me.getId())||"root",...$e?{routeRef:$e.id}:{}}}catch{return{}}},et=({pathname:X,search:Z,hash:te})=>{const me=(0,y.useAnalytics)();return(0,r.useEffect)(()=>{me.captureEvent("navigate",`${X}${Z}${te}`)},[me,X,Z,te]),null},tt=({tree:X})=>{const{pathname:Z,search:te,hash:me}=(0,t.TH)(),{routeObjects:le}=(0,r.useMemo)(()=>o({root:X,discoverers:[c,g],collectors:{routeObjects:D}}),[X]);return r.createElement(y.AnalyticsContext,{attributes:at(Z,le)},r.createElement(et,{pathname:Z,search:te,hash:me}))};function ot(X,Z){const te=new Set(Z.values());te.delete(void 0);for(const me of Z.keys()){if(te.has(me))continue;let le=me,Se="";for(;le;){const Ze=X.get(le);if(!Ze)throw new Error(`No path for ${le}`);Se=`${Ze}${Se}`,le=Z.get(le)}const $e=Se.match(/:(\w+)/g);if($e){for(let Ze=0;Ze<$e.length;Ze++)for(let Xe=Ze+1;Xe<$e.length;Xe++)if($e[Xe]===$e[Ze])throw new Error(`Parameter ${$e[Xe]} is duplicated in path ${Se}`)}}}function Ee(X,Z){for(const te of Z)if(!!te.externalRoutes){for(const[me,le]of Object.entries(te.externalRoutes))if(!le.optional&&!X.has(le))throw new Error(`External route '${me}' of the '${te.getId()}' plugin must be bound to a target route. See https://backstage.io/link?bind-routes for details.`)}}const Ge=(0,b.CT)("app-context"),lt=({appContext:X,children:Z})=>{const te=(0,b.EI)({1:X});return r.createElement(Ge.Provider,{value:te,children:Z})};function Dt(X){return new Error(`Tried to access IdentityApi ${X} before app was loaded`)}function gt(X){console.warn(`WARNING: Call to ${X} is deprecated and will break in the future`)}class Et{constructor(){ne(this,"target");ne(this,"waitForTarget");ne(this,"resolveTarget",()=>{});this.waitForTarget=new Promise(Z=>{this.resolveTarget=Z})}setTarget(Z){this.target=Z,this.resolveTarget(Z)}getUserId(){if(!this.target)throw Dt("getUserId");if(!this.target.getUserId)throw new Error("IdentityApi does not implement getUserId");return gt("getUserId"),this.target.getUserId()}getProfile(){if(!this.target)throw Dt("getProfile");if(!this.target.getProfile)throw new Error("IdentityApi does not implement getProfile");return gt("getProfile"),this.target.getProfile()}async getProfileInfo(){return this.waitForTarget.then(Z=>Z.getProfileInfo())}async getBackstageIdentity(){const Z=await this.waitForTarget.then(te=>te.getBackstageIdentity());return Z.userEntityRef.match(/^.*:.*\/.*$/)||console.warn(`WARNING: The App IdentityApi provided an invalid userEntityRef, '${Z.userEntityRef}'. It must be a full Entity Reference of the form '<kind>:<namespace>/<name>'.`),Z}async getCredentials(){return this.waitForTarget.then(Z=>Z.getCredentials())}async getIdToken(){return this.waitForTarget.then(Z=>{if(!Z.getIdToken)throw new Error("IdentityApi does not implement getIdToken");return gt("getIdToken"),Z.getIdToken()})}async signOut(){await this.waitForTarget.then(Z=>Z.signOut()),location.reload()}}var ct=e(72164);function ft(X,Z,te){if(X!==void 0){const le=te.find(Se=>Se.id===X);if(le)return le}if(Z){const le=te.find(Se=>Se.variant==="dark");if(le)return le}const me=te.find(le=>le.variant==="light");return me||te[0]}const It=()=>{const X=(0,r.useMemo)(()=>window.matchMedia("(prefers-color-scheme: dark)"),[]),[Z,te]=(0,r.useState)(X.matches);return(0,r.useEffect)(()=>{const me=le=>{te(le.matches)};return X.addListener(me),()=>{X.removeListener(me)}},[X]),Z};function At({children:X}){const Z=(0,y.useApi)(y.appThemeApiRef),te=(0,ct.Z)(Z.activeThemeId$(),Z.getActiveThemeId()),me=Boolean(window.matchMedia)?It():!1,le=ft(te,me,Z.getInstalledThemes());if(!le)throw new Error("App has no themes");return r.createElement(le.Provider,{children:X})}var Bt=e(46611);class Lt{constructor(){ne(this,"apis",[])}add(Z,te){return this.apis.push([Z.id,te]),te}build(){return new Ct(new Map(this.apis))}}class Ct{static builder(){return new Lt}static from(Z){return new Ct(new Map(Z.map(([te,me])=>[te.id,me])))}static with(Z,te){return new Ct(new Map([[Z.id,te]]))}constructor(Z){this.apis=Z}with(Z,te){return new Ct(new Map([...this.apis,[Z.id,te]]))}get(Z){return this.apis.get(Z.id)}}function ze(X){const Z=new Map;return X&&X({bind:(me,le)=>{for(const[Se,$e]of Object.entries(le)){const Ze=me[Se];if(!Ze)throw new Error(`Key ${Se} is not an existing external route`);if(!$e&&!Ze.optional)throw new Error(`External route ${Se} is required but was undefined`);$e&&Z.set(Ze,$e)}}}),Z}function nt(X){var te;let{pathname:Z}=new URL((te=X.getOptionalString("app.baseUrl"))!=null?te:"/","http://dummy.dev");return Z=Z.replace(/\/*$/,""),Z}function Ke(X,Z,te){var Xe;const me=Boolean(X),le=(0,l.default)(X||(()=>Promise.resolve([])));let Se;if(me&&le.loading){const{Progress:_}=Z;Se=r.createElement(_,null)}else if(le.error){const{BootErrorPage:_}=Z;Se=r.createElement(_,{step:"load-config",error:le.error})}const{ThemeProvider:$e=At}=Z;return Se?{node:r.createElement(f.ApiProvider,{apis:Ct.with(y.appThemeApiRef,te)},r.createElement($e,null,Se))}:{api:f.ConfigReader.fromConfigs((Xe=le.value)!=null?Xe:[])}}class pt{constructor(Z){this.app=Z}getPlugins(){return this.app.getPlugins()}getSystemIcon(Z){return this.app.getSystemIcon(Z)}getComponents(){return this.app.getComponents()}}class rt{constructor(Z){ne(this,"apiHolder");ne(this,"configApi");ne(this,"apis");ne(this,"icons");ne(this,"plugins");ne(this,"components");ne(this,"themes");ne(this,"configLoader");ne(this,"defaultApis");ne(this,"bindRoutes");ne(this,"appIdentityProxy",new Et);ne(this,"apiFactoryRegistry");var te,me,le,Se;this.apis=(te=Z.apis)!=null?te:[],this.icons=Z.icons,this.plugins=new Set((me=Z.plugins)!=null?me:[]),this.components=Z.components,this.themes=Z.themes,this.configLoader=(le=Z.configLoader)!=null?le:Bt.t,this.defaultApis=(Se=Z.defaultApis)!=null?Se:[],this.bindRoutes=Z.bindRoutes,this.apiFactoryRegistry=new i.ApiFactoryRegistry}getPlugins(){return Array.from(this.plugins)}getSystemIcon(Z){return this.icons[Z]}getComponents(){return this.components}getProvider(){const Z=new pt(this);let te=!1;return({children:le})=>{const Se=(0,r.useMemo)(()=>f.AppThemeSelector.createWithStorage(this.themes),[]),{routePaths:$e,routeParents:Ze,routeObjects:Xe,featureFlags:_,routeBindings:G}=(0,r.useMemo)(()=>{const Ie=o({root:le,discoverers:[c,g],collectors:{routePaths:U,routeParents:P,routeObjects:D,collectedPlugins:p,featureFlags:T}});return Ie.collectedPlugins.forEach(pe=>this.plugins.add(pe)),this.verifyPlugins(this.plugins),this.getApiHolder(),{...Ie,routeBindings:ze(this.bindRoutes)}},[le]);te||(te=!0,ot($e,Ze),Ee(G,this.plugins));const $=Ke(this.configLoader,this.components,Se),ie="api"in $;if(ie){const{api:Ie}=$;this.configApi=Ie}if((0,r.useEffect)(()=>{if(ie){const Ie=this.getApiHolder().get(y.featureFlagsApiRef);for(const pe of this.plugins.values())if("getFeatureFlags"in pe)for(const Te of pe.getFeatureFlags())Ie.registerFlag({name:Te.name,pluginId:pe.getId()});else for(const Te of pe.output())Te.type==="feature-flag"&&Ie.registerFlag({name:Te.name,pluginId:pe.getId()});for(const pe of _)Ie.registerFlag({name:pe,pluginId:""})}},[ie,$,_]),"node"in $)return $.node;const{ThemeProvider:ve=At}=this.components;return r.createElement(f.ApiProvider,{apis:this.getApiHolder()},r.createElement(lt,{appContext:Z},r.createElement(ve,null,r.createElement(Qe,{routePaths:$e,routeParents:Ze,routeObjects:Xe,routeBindings:G,basePath:nt($.api)},le))))}}getRouter(){const{Router:Z,SignInPage:te}=this.components,me=({component:Se,children:$e})=>{const[Ze,Xe]=(0,r.useState)();return Ze?(this.appIdentityProxy.setTarget(Ze),$e):r.createElement(Se,{onSignInSuccess:Xe})};return({children:Se})=>{const $e=(0,y.useApi)(y.configApiRef),Ze=`${nt($e)}/*`;return te?r.createElement(Z,null,r.createElement(tt,{tree:Se}),r.createElement(me,{component:te},r.createElement(t.Z5,null,r.createElement(t.AW,{path:Ze,element:r.createElement(r.Fragment,null,Se)})))):(this.appIdentityProxy.setTarget({getUserId:()=>"guest",getIdToken:async()=>{},getProfile:()=>({email:"guest@example.com",displayName:"Guest"}),getProfileInfo:async()=>({email:"guest@example.com",displayName:"Guest"}),getBackstageIdentity:async()=>({type:"user",userEntityRef:"user:default/guest",ownershipEntityRefs:["user:default/guest"]}),getCredentials:async()=>({}),signOut:async()=>{}}),r.createElement(Z,null,r.createElement(tt,{tree:Se}),r.createElement(t.Z5,null,r.createElement(t.AW,{path:Ze,element:r.createElement(r.Fragment,null,Se)}))))}}getApiHolder(){if(this.apiHolder){for(const Z of this.plugins)for(const te of Z.getApis())this.apiFactoryRegistry.get(te.api)||this.apiFactoryRegistry.register("default",te);return i.ApiResolver.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder}this.apiFactoryRegistry.register("static",{api:y.appThemeApiRef,deps:{},factory:()=>f.AppThemeSelector.createWithStorage(this.themes)}),this.apiFactoryRegistry.register("static",{api:y.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:y.identityApiRef,deps:{},factory:()=>this.appIdentityProxy}),this.apiFactoryRegistry.register("default",{api:y.featureFlagsApiRef,deps:{},factory:()=>new f.LocalStorageFeatureFlags});for(const Z of this.defaultApis)this.apiFactoryRegistry.register("default",Z);for(const Z of this.plugins)for(const te of Z.getApis())if(!this.apiFactoryRegistry.register("default",te))throw new Error(`Plugin ${Z.getId()} tried to register duplicate or forbidden API factory for ${te.api}`);for(const Z of this.apis)if(!this.apiFactoryRegistry.register("app",Z))throw new Error(`Duplicate or forbidden API factory for ${Z.api} in app`);return i.ApiResolver.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder=new i.ApiResolver(this.apiFactoryRegistry),this.apiHolder}verifyPlugins(Z){const te=new Set;for(const me of Z){const le=me.getId();if(te.has(le))throw new Error(`Duplicate plugin found '${le}'`);te.add(le)}}}function yt(X){return new rt(X)}},46611:function(q,s,e){"use strict";e.d(s,{t:function(){return r}});const r=async(t="__APP_INJECTED_RUNTIME_CONFIG__")=>{const l=[{context:"app-config.yaml",data:{app:{title:"Techdocs Preview App",baseUrl:"http://localhost:3000"},backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}}}];if(!l)throw new Error("No static configuration provided");if(!Array.isArray(l))throw new Error("Static configuration has invalid format");const f=l.slice();if(t!=="__app_injected_runtime_config__".toLocaleUpperCase("en-US"))try{const i=JSON.parse(t);Array.isArray(i)?f.push(...i):f.push({data:i,context:"env"})}catch(i){throw new Error(`Failed to load runtime configuration, ${i}`)}const y=window.__APP_CONFIG__;return y&&f.push({context:"window",data:y}),f}},44056:function(q,s,e){"use strict";e.d(s,{createSpecializedApp:function(){return r.b},defaultConfigLoader:function(){return t.t}});var r=e(82370),t=e(46611),l=e(73495),f=e.n(l);e.o(l,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return l.AtlassianAuth}}),e.o(l,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return l.BitbucketAuth}}),e.o(l,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return l.FlatRoutes}}),e.o(l,"GithubAuth")&&e.d(s,{GithubAuth:function(){return l.GithubAuth}}),e.o(l,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return l.GitlabAuth}}),e.o(l,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return l.GoogleAuth}}),e.o(l,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return l.MicrosoftAuth}}),e.o(l,"OktaAuth")&&e.d(s,{OktaAuth:function(){return l.OktaAuth}}),e.o(l,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return l.OneLoginAuth}})},73495:function(){},49208:function(q,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},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},FlatRoutes:function(){return l.w}});var r=e(56494);e.o(r,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return r.AtlassianAuth}}),e.o(r,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return r.BitbucketAuth}}),e.o(r,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return r.FlatRoutes}}),e.o(r,"GithubAuth")&&e.d(s,{GithubAuth:function(){return r.GithubAuth}}),e.o(r,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return r.GitlabAuth}}),e.o(r,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return r.GoogleAuth}}),e.o(r,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return r.MicrosoftAuth}}),e.o(r,"OktaAuth")&&e.d(s,{OktaAuth:function(){return r.OktaAuth}}),e.o(r,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return r.OneLoginAuth}}),e.o(r,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return r.createSpecializedApp}}),e.o(r,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return r.defaultConfigLoader}});var t=e(44056);e.o(t,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return t.AtlassianAuth}}),e.o(t,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return t.BitbucketAuth}}),e.o(t,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return t.FlatRoutes}}),e.o(t,"GithubAuth")&&e.d(s,{GithubAuth:function(){return t.GithubAuth}}),e.o(t,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return t.GitlabAuth}}),e.o(t,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return t.GoogleAuth}}),e.o(t,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return t.MicrosoftAuth}}),e.o(t,"OktaAuth")&&e.d(s,{OktaAuth:function(){return t.OktaAuth}}),e.o(t,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return t.OneLoginAuth}});var l=e(63938)},57018:function(q,s,e){"use strict";e.d(s,{RefreshingAuthSessionManager:function(){return i}});function r(m,c){for(const g of c)if(!m.has(g))return!1;return!0}class t{constructor(c){this.options=c}sessionExistsAndHasScope(c,g){if(!c)return!1;if(!g||this.options.sessionScopes===void 0)return!0;const p=this.options.sessionScopes(c);return r(p,g)}getExtendedScope(c,g){const p=new Set(this.options.defaultScopes);if(c&&this.options.sessionScopes!==void 0){const R=this.options.sessionScopes(c);for(const L of R)p.add(L)}if(g)for(const R of g)p.add(R);return p}}var l=e(98005),f=e(36964);class y{constructor(){ne(this,"subject",new l.X(f.SessionState.SignedOut));ne(this,"signedIn",!1)}setIsSignedIn(c){this.signedIn!==c&&(this.signedIn=c,this.subject.next(this.signedIn?f.SessionState.SignedIn:f.SessionState.SignedOut))}sessionState$(){return this.subject}}class i{constructor(c){ne(this,"connector");ne(this,"helper");ne(this,"sessionScopesFunc");ne(this,"sessionShouldRefreshFunc");ne(this,"stateTracker",new y);ne(this,"refreshPromise");ne(this,"currentSession");const{connector:g,defaultScopes:p=new Set,sessionScopes:R,sessionShouldRefresh:L}=c;this.connector=g,this.sessionScopesFunc=R,this.sessionShouldRefreshFunc=L,this.helper=new t({sessionScopes:R,defaultScopes:p})}async getSession(c){if(this.helper.sessionExistsAndHasScope(this.currentSession,c.scopes)){if(!this.sessionShouldRefreshFunc(this.currentSession))return this.currentSession;try{const p=await this.collapsedSessionRefresh(),R=this.sessionScopesFunc(this.currentSession),L=this.sessionScopesFunc(p);return r(L,R)&&(this.currentSession=p),p}catch(p){if(c.optional)return;throw p}}if(!this.currentSession&&!c.instantPopup)try{const g=await this.collapsedSessionRefresh();return this.currentSession=g,this.getSession(c)}catch{}if(!c.optional)return this.currentSession=await this.connector.createSession({...c,scopes:this.helper.getExtendedScope(this.currentSession,c.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 c=await this.refreshPromise;return this.stateTracker.setIsSignedIn(!0),c}finally{delete this.refreshPromise}}}class o{constructor(c){ne(this,"connector");ne(this,"helper");ne(this,"stateTracker",new SessionStateTracker);ne(this,"currentSession");const{connector:g,defaultScopes:p=new Set,sessionScopes:R}=c;this.connector=g,this.helper=new SessionScopeHelper({sessionScopes:R,defaultScopes:p})}setSession(c){this.currentSession=c,this.stateTracker.setIsSignedIn(Boolean(c))}async getSession(c){if(this.helper.sessionExistsAndHasScope(this.currentSession,c.scopes))return this.currentSession;if(!c.optional)return this.currentSession=await this.connector.createSession({...c,scopes:this.helper.getExtendedScope(this.currentSession,c.scopes)}),this.stateTracker.setIsSignedIn(!0),this.currentSession}async removeSession(){this.currentSession=void 0,this.stateTracker.setIsSignedIn(!1)}sessionState$(){return this.stateTracker.sessionState$()}}},98005:function(q,s,e){"use strict";e.d(s,{J:function(){return l},X:function(){return f}});var r=e(82394),t=e.n(r);class l{constructor(){ne(this,"isClosed",!1);ne(this,"terminatingError");ne(this,"observable",new(t())(i=>this.isClosed?(this.terminatingError?i.error(this.terminatingError):i.complete(),()=>{}):(this.subscribers.add(i),()=>{this.subscribers.delete(i)})));ne(this,"subscribers",new Set)}[Symbol.observable](){return this}get closed(){return this.isClosed}next(i){if(this.isClosed)throw new Error("PublishSubject is closed");this.subscribers.forEach(o=>o.next(i))}error(i){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.terminatingError=i,this.subscribers.forEach(o=>o.error(i))}complete(){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.subscribers.forEach(i=>i.complete())}subscribe(i,o,m){const c=typeof i=="function"?{next:i,error:o,complete:m}:i;return this.observable.subscribe(c)}}class f{constructor(i){ne(this,"isClosed");ne(this,"currentValue");ne(this,"terminatingError");ne(this,"observable");ne(this,"subscribers",new Set);this.isClosed=!1,this.currentValue=i,this.terminatingError=void 0,this.observable=new(t())(o=>this.isClosed?(this.terminatingError?o.error(this.terminatingError):o.complete(),()=>{}):(o.next(this.currentValue),this.subscribers.add(o),()=>{this.subscribers.delete(o)}))}[Symbol.observable](){return this}get closed(){return this.isClosed}next(i){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.currentValue=i,this.subscribers.forEach(o=>o.next(i))}error(i){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.terminatingError=i,this.subscribers.forEach(o=>o.error(i))}complete(){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.subscribers.forEach(i=>i.complete())}subscribe(i,o,m){const c=typeof i=="function"?{next:i,error:o,complete:m}:i;return this.observable.subscribe(c)}}},88934:function(q,s,e){"use strict";e.d(s,{L:function(){return l}});var r=e(36964),t=e(2784);const l=f=>{const{children:y}=f,i=(0,r.useApi)(r.featureFlagsApiRef),o="with"in f?i.isActive(f.with):!i.isActive(f.without);return t.createElement(t.Fragment,null,o?y:null)};(0,r.attachComponentData)(l,"core.featureFlagged",!0)},63938:function(q,s,e){"use strict";e.d(s,{w:function(){return f}});var r=e(2784),t=e(10289),l=e(36964);const f=i=>{const o=(0,l.useApp)(),{NotFoundErrorPage:m}=o.getComponents(),c=(0,l.useElementFilter)(i.children,g=>g.getElements().flatMap(p=>{var L;let R=p.props.path;return R===""?[]:(R=(L=R==null?void 0:R.replace(/\/\*$/,""))!=null?L:"/",[{path:R,element:p,children:p.props.children?[{path:R==="/"?"/":"/*",element:p.props.children}]:void 0}])}).sort((p,R)=>R.path.localeCompare(p.path)).map(p=>(p.path=p.path==="/"?"/":`${p.path}/*`,p)));return c.push({element:r.createElement(m,null),path:"/*"}),(0,t.V$)(c)};var y=e(88934)},9118:function(q,s,e){"use strict";e.d(s,{Button:function(){return D},CodeSnippet:function(){return fe},Content:function(){return Ua},ContentHeader:function(){return ks},CreateButton:function(){return at},DependencyGraph:function(){return G},DependencyGraphTypes:function(){return r},EmptyState:function(){return Le},ErrorPage:function(){return ti},ErrorPanel:function(){return Mn},Header:function(){return Ya},HeaderIconLinkRow:function(){return $r},HeaderLabel:function(){return di},HeaderTabs:function(){return wa},InfoCard:function(){return In},ItemCardGrid:function(){return Ei},ItemCardHeader:function(){return gi},Link:function(){return P},LogViewer:function(){return qn},MissingAnnotationEmptyState:function(){return E},OverflowTooltip:function(){return Rr},Page:function(){return ka},PageWithHeader:function(){return Ri},Progress:function(){return _n},ResponseErrorPanel:function(){return ur},RoutedTabs:function(){return za},Select:function(){return _e},Sidebar:function(){return Go},SidebarContext:function(){return Dr},SidebarDivider:function(){return ss},SidebarItem:function(){return Na},SidebarPage:function(){return Fo},SidebarPinStateContext:function(){return sr},SubvalueCell:function(){return vs},SupportButton:function(){return Oo},Table:function(){return zs},WarningPanel:function(){return bn},sidebarConfig:function(){return wt},useContent:function(){return oa},useQueryParamState:function(){return Co}});var r={};e.r(r),e.d(r,{Nm:function(){return et},ht:function(){return Ee},LJ:function(){return ot}});var t=e(2784),l=e(36964),f=e(19928);function y(n){const[a,u]=useState([]),d=useApi(alertApiRef);if(useEffect(()=>{const O=d.alert$().subscribe(w=>u(Y=>Y.concat(w)));return()=>{O.unsubscribe()}},[d]),a.length===0)return null;const[h]=a,A=()=>{u(O=>O.filter(w=>w!==h))};return React.createElement(Snackbar,{open:!0,anchorOrigin:{vertical:"top",horizontal:"center"}},React.createElement(Alert,{action:React.createElement(IconButton,{color:"inherit",size:"small",onClick:A,"data-testid":"error-button-close"},React.createElement(CloseIcon,null)),severity:h.severity},React.createElement("span",null,h.message.toString(),a.length>1&&React.createElement("em",null,` (${a.length-1} older ${pluralize("message",a.length-1)})`))))}var i=e(79692),o=e(12420);const m=(0,i.Z)(n=>(0,o.Z)({avatar:{width:"4rem",height:"4rem",color:"#fff",fontWeight:n.typography.fontWeightBold,letterSpacing:"1px",textTransform:"uppercase"}}),{name:"BackstageAvatar"});function c(n){const{displayName:a,picture:u,customStyles:d}=n,h=m();return React.createElement(MaterialAvatar,{alt:a,src:u,className:h.avatar,style:{backgroundColor:stringToColor(a||u||""),...d}},a&&extractInitials(a))}var g=e(77277),p=e(86689),R=e(62833);const L=n=>/^([a-z+.-]+):/.test(n),U=n=>{var a;return n instanceof Array?n.map(U).join(" ").trim():typeof n=="object"&&n?U((a=n==null?void 0:n.props)==null?void 0:a.children):["string","number"].includes(typeof n)?String(n):""},P=t.forwardRef(({onClick:n,noTrack:a,...u},d)=>{const h=(0,l.useAnalytics)(),A=String(u.to),O=U(u.children)||A,w=L(A),Y=w&&!!/^https?:/.exec(A),H=oe=>{n==null||n(oe),a||h.captureEvent("click",O,{attributes:{to:A}})};return w?t.createElement(p.Z,{ref:d,href:A,onClick:H,...Y?{target:"_blank",rel:"noopener"}:{},...u}):t.createElement(p.Z,{ref:d,component:R.rU,onClick:H,...u})}),Q=t.forwardRef((n,a)=>t.createElement(P,{ref:a,...n,color:"initial"})),D=t.forwardRef((n,a)=>t.createElement(g.Z,{ref:a,component:Q,...n}));var T=e(60364),b=e(61837),B=e(80030),N=e(19353),j=e(55295);function se(n){const{text:a,tooltipDelay:u=1e3,tooltipText:d="Text copied to clipboard"}=n,h=(0,l.useApi)(l.errorApiRef),[A,O]=(0,t.useState)(!1),[{error:w},Y]=(0,j.Z)();(0,t.useEffect)(()=>{w&&h.post(w)},[w,h]);const H=oe=>{oe.stopPropagation(),O(!0),Y(a)};return t.createElement(t.Fragment,null,t.createElement(B.ZP,{id:"copy-test-tooltip",title:d,placement:"top",leaveDelay:u,onClose:()=>O(!1),open:A},t.createElement(b.Z,{onClick:H},t.createElement(N.Z,null))))}var Ce=e(70813),xe=e(26639),He=e(39595);function fe(n){const{text:a,language:u,showLineNumbers:d=!1,highlightedNumbers:h,customStyle:A,showCopyCodeButton:O=!1}=n,w=(0,T.Z)(),Y=w.palette.type==="dark"?xe.Z:He.Z,H=w.palette.type==="dark"?"#256bf3":"#e6ffed";return t.createElement("div",{style:{position:"relative"}},t.createElement(Ce.Z,{customStyle:A,language:u,style:Y,showLineNumbers:d,wrapLines:!0,lineNumberStyle:{color:w.palette.textVerySubtle},lineProps:oe=>(h==null?void 0:h.includes(oe))?{style:{backgroundColor:H}}:{}},a),O&&t.createElement("div",{style:{position:"absolute",top:0,right:0}},t.createElement(se,{text:a})))}var je=e(41156),Qe=e(88188);function at(n){const{title:a,to:u}=n,d=(0,je.Z)(h=>h.breakpoints.down("xs"));return u?d?t.createElement(b.Z,{component:R.rU,color:"primary",title:a,size:"small",to:u},t.createElement(Qe.Z,null)):t.createElement(g.Z,{component:R.rU,variant:"contained",color:"primary",to:u},a):null}var et;(function(n){const a="TB";n.TOP_BOTTOM=a;const u="BT";n.BOTTOM_TOP=u;const d="LR";n.LEFT_RIGHT=d;const h="RL";n.RIGHT_LEFT=h})(et||(et={}));var tt;(function(n){const a="UL";n.UP_LEFT=a;const u="UR";n.UP_RIGHT=u;const d="DL";n.DOWN_LEFT=d;const h="DR";n.DOWN_RIGHT=h})(tt||(tt={}));var ot;(function(n){const a="network-simplex";n.NETWORK_SIMPLEX=a;const u="tight-tree";n.TIGHT_TREE=u;const d="longest-path";n.LONGEST_PATH=d})(ot||(ot={}));var Ee;(function(n){const a="l";n.LEFT=a;const u="r";n.RIGHT=u;const d="c";n.CENTER=d})(Ee||(Ee={}));var Ge=e(13387),lt=e(11105),Dt=e(97963),gt=e(46506),Et=e.n(gt),ct=e(54073),ft=e.n(ct),It=e(10368);const At=(0,i.Z)(n=>({node:{fill:n.palette.primary.light,stroke:n.palette.primary.light},text:{fill:n.palette.primary.contrastText}}),{name:"BackstageDependencyGraphDefaultNode"});function Bt({node:{id:n}}){const a=At(),[u,d]=t.useState(0),[h,A]=t.useState(0),O=t.useRef(null);t.useLayoutEffect(()=>{if(O.current){let{height:oe,width:de}=O.current.getBBox();oe=Math.round(oe),de=Math.round(de),(oe!==h||de!==u)&&(d(de),A(oe))}},[u,h]);const w=10,Y=u+w*2,H=h+w*2;return t.createElement("g",null,t.createElement("rect",{className:a.node,width:Y,height:H,rx:10}),t.createElement("text",{ref:O,className:a.text,y:H/2,x:Y/2,textAnchor:"middle",alignmentBaseline:"middle"},n))}const Lt="arrow-marker",Ct="node",ze="edge",nt="label",Ke=(0,It.Z)(n=>({node:{transition:`${n.transitions.duration.shortest}ms`}}),{name:"BackstageDependencyGraphNode"}),pt=n=>t.createElement(Bt,{...n});function rt({render:n=pt,setNode:a,node:u}){const{width:d,height:h,x:A=0,y:O=0}=u,w=u,Y=Ke(),H=t.useRef(null);return t.useLayoutEffect(()=>{if(H.current){let{height:oe,width:de}=H.current.getBBox();oe=Math.round(oe),de=Math.round(de),(oe!==h||de!==d)&&a(u.id,{...u,height:oe,width:de})}},[u,d,h,a]),t.createElement("g",{ref:H,"data-testid":Ct,className:Y.node,transform:`translate(${A-d/2},${O-h/2})`},n({node:w}))}var yt=e(40408),X=e(49810),Z=e(19574),te=e.n(Z);const me=(0,It.Z)(n=>({text:{fill:n.palette.textContrast}}),{name:"BackstageDependencyGraphDefaultLabel"});function le({edge:{label:n}}){const a=me();return t.createElement("text",{className:a.text,textAnchor:"middle"},n)}const Se=(0,It.Z)(n=>({path:{strokeWidth:2,stroke:n.palette.textSubtle,fill:"none",transition:`${n.transitions.duration.shortest}ms`},label:{transition:`${n.transitions.duration.shortest}ms`}}),{name:"BackstageDependencyGraphEdge"}),$e=n=>t.createElement(le,{...n}),Ze=yt.Z().x(n=>n.x).y(n=>n.y).curve(X.Z);function Xe({render:n=$e,setEdge:a,id:u,edge:d}){const{x:h=0,y:A=0,width:O,height:w,points:Y}=d,H=d,oe=Se(),de=t.useRef(null);t.useLayoutEffect(()=>{if(de.current){let{height:be,width:Oe}=de.current.getBBox();be=Math.round(be),Oe=Math.round(Oe),(be!==w||Oe!==O)&&a(u,{...d,height:be,width:Oe})}},[d,w,O,a,u]);let Pe="";if(Y){const be=Y.filter(Oe=>te()(Oe.x)&&te()(Oe.y));Pe=Ze(be)||""}return t.createElement(t.Fragment,null,Pe&&t.createElement("path",{"data-testid":ze,className:oe.path,markerEnd:`url(#${Lt})`,d:Pe}),H.label?t.createElement("g",{ref:de,"data-testid":nt,className:oe.label,transform:`translate(${h},${A})`},n({edge:H})):null)}const _="workspace";function G(n){var lr,no;const{edges:a,nodes:u,renderNode:d,direction:h=et.TOP_BOTTOM,align:A,nodeMargin:O=50,edgeMargin:w=10,rankMargin:Y=50,paddingX:H=0,paddingY:oe=0,acyclicer:de,ranker:Pe=ot.NETWORK_SIMPLEX,labelPosition:be=Ee.RIGHT,labelOffset:Oe=10,edgeRanks:ut=1,edgeWeight:xt=1,renderLabel:Jt,defs:zt,zoom:it="enabled",...Pt}=n,Ot=(0,Dt.Z)(),[kt,Dn]=t.useState(100),[fn,Br]=t.useState(100),Tt=t.useRef(new(Et()).graphlib.Graph),[Fn,fa]=t.useState(((lr=Tt.current.graph())==null?void 0:lr.width)||0),[Hn,ma]=t.useState(((no=Tt.current.graph())==null?void 0:no.height)||0),[Xr,qr]=t.useState([]),[ha,en]=t.useState([]),on=Math.max(Fn,kt),mn=Math.max(Hn,fn),Vn=t.useMemo(()=>ft()($t=>{if(!$t)return;const tn=lt.Z($t),Zt=lt.Z($t.getElementById(_));function En(){tn.call(Ge.sP().scaleExtent([1,10]).on("zoom",Ln=>{Ln.transform.x=Math.min(0,Math.max(Ln.transform.x,on-on*Ln.transform.k)),Ln.transform.y=Math.min(0,Math.max(Ln.transform.y,mn-mn*Ln.transform.k)),Zt.attr("transform",Ln.transform)}))}it==="enabled"?En():it==="enable-on-click"&&tn.on("click",()=>En());const{width:vn,height:_r}=$t.getBoundingClientRect();kt!==vn&&Dn(vn),fn!==_r&&Br(_r)},100),[fn,kt,on,mn,it]),Ht=t.useCallback(()=>{const $t=Tt.current.nodes(),tn=Tt.current.edges();$t.forEach(Zt=>{u.some(vn=>vn.id===Zt)||Tt.current.removeNode(Zt)}),tn.forEach(Zt=>{a.some(vn=>vn.from===Zt.v&&vn.to===Zt.w)||Tt.current.removeEdge(Zt.v,Zt.w)}),u.forEach(Zt=>{const En=Tt.current.nodes().find(vn=>Zt.id===vn);if(En&&Tt.current.node(En)){const{width:vn,height:_r,x:Ln,y:Ui}=Tt.current.node(En);Tt.current.setNode(En,{...Zt,width:vn,height:_r,x:Ln,y:Ui})}else Tt.current.setNode(Zt.id,{...Zt,width:0,height:0})}),a.forEach(Zt=>{Tt.current.setEdge(Zt.from,Zt.to,{...Zt,label:Zt.label,width:0,height:0,labelpos:be,labeloffset:Oe,weight:xt,minlen:ut})})},[a,u,be,Oe,xt,ut]),Vt=t.useMemo(()=>ft()(()=>{Et().layout(Tt.current);const{height:$t,width:tn}=Tt.current.graph(),Zt=Math.max(0,$t||0),En=Math.max(0,tn||0);fa(En),ma(Zt),qr(Tt.current.nodes()),en(Tt.current.edges())},250,{leading:!0}),[]);t.useEffect(()=>(Tt.current.setGraph({rankdir:h,align:A,nodesep:O,edgesep:w,ranksep:Y,marginx:H,marginy:oe,acyclicer:de,ranker:Pe}),Ht(),Vt(),Vt.cancel),[de,A,h,w,H,oe,O,Y,Pe,Ht,Vt]);function ir($t,tn){return Tt.current.setNode($t,tn),Vt(),Tt.current}function jn($t,tn){return Tt.current.setEdge($t,tn),Vt(),Tt.current}return t.createElement("svg",{ref:Vn,...Pt,width:"100%",height:mn,viewBox:`0 0 ${on} ${mn}`},t.createElement("defs",null,t.createElement("marker",{id:Lt,viewBox:"0 0 24 24",markerWidth:"14",markerHeight:"14",refX:"16",refY:"12",orient:"auto",markerUnits:"strokeWidth"},t.createElement("path",{fill:Ot.palette.textSubtle,d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})),zt),t.createElement("g",{id:_},t.createElement("svg",{width:Fn,height:Hn,y:mn/2-Hn/2,x:on/2-Fn/2,viewBox:`0 0 ${Fn} ${Hn}`},ha.map($t=>{const tn=Tt.current.edge($t);return tn?t.createElement(Xe,{key:`${$t.v}-${$t.w}`,id:$t,setEdge:jn,render:Jt,edge:tn}):null}),Xr.map($t=>{const tn=Tt.current.node($t);return tn?t.createElement(rt,{key:$t,setNode:ir,render:d,node:tn}):null}))))}var $=e(72779),ie=e.n($);const ve=(0,i.Z)(n=>{var a;return{root:{padding:n.spacing(0),marginBottom:n.spacing(0),marginTop:n.spacing(0),display:"flex",flexFlow:"row nowrap"},topPosition:{position:"relative",marginBottom:n.spacing(6),marginTop:-n.spacing(3),zIndex:"unset"},icon:{fontSize:20},content:{width:"100%",maxWidth:"inherit",flexWrap:"nowrap"},message:{display:"flex",alignItems:"center",color:n.palette.banner.text,"& a":{color:n.palette.banner.link}},info:{backgroundColor:n.palette.banner.info},error:{backgroundColor:n.palette.banner.error},warning:{backgroundColor:(a=n.palette.banner.warning)!=null?a:n.palette.banner.error}}},{name:"BackstageDismissableBanner"}),Ie=n=>{var be;const{variant:a,message:u,id:d,fixed:h=!1}=n,A=ve(),w=useApi(storageApiRef).forBucket("notifications"),Y=(be=w.snapshot("dismissedBanners").value)!=null?be:[],[H,oe]=useState(new Set(Y)),de=useObservable(w.observe$("dismissedBanners"));useEffect(()=>{var Oe;if(de==null?void 0:de.value){const ut=(Oe=de==null?void 0:de.value)!=null?Oe:[];oe(new Set(ut))}},[de==null?void 0:de.value]);const Pe=()=>{w.set("dismissedBanners",[...H,d])};return React.createElement(Snackbar,{anchorOrigin:h?{vertical:"bottom",horizontal:"center"}:{vertical:"top",horizontal:"center"},open:!H.has(d),classes:{root:classNames(A.root,!h&&A.topPosition)}},React.createElement(SnackbarContent,{classes:{root:classNames(A.content,A[a]),message:A.message},message:u,action:[React.createElement(IconButton,{key:"dismiss",title:"Permanently dismiss this message",color:"inherit",onClick:Pe},React.createElement(Close,{className:A.icon}))]}))};var pe=e(60905),Te=e(90436),st=e(86284),re=e(96465),S=e(19133),z=e(3871);const ce=(0,i.Z)({generalImg:{width:"95%",zIndex:2,position:"relative",left:"50%",top:"50%",transform:"translate(-50%, 15%)"}},{name:"BackstageEmptyStateImage"}),ye=({missing:n})=>{const a=ce();switch(n){case"field":return t.createElement("img",{src:st,className:a.generalImg,alt:"annotation is missing"});case"info":return t.createElement("img",{src:re,alt:"no Information",className:a.generalImg});case"content":return t.createElement("img",{src:S,alt:"create Component",className:a.generalImg});case"data":return t.createElement("img",{src:z,alt:"no Build",className:a.generalImg});default:return null}},Ae=(0,i.Z)(n=>({root:{backgroundColor:n.palette.background.default,padding:n.spacing(2,0,0,0)},action:{marginTop:n.spacing(2)},imageContainer:{position:"relative"}}),{name:"BackstageEmptyState"});function Le(n){const{title:a,description:u,missing:d,action:h}=n,A=Ae();return t.createElement(pe.Z,{container:!0,direction:"row",justifyContent:"space-around",alignItems:"flex-start",className:A.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(Te.Z,{variant:"h5"},a)),t.createElement(pe.Z,{item:!0,xs:!0},t.createElement(Te.Z,{variant:"body1"},u)),t.createElement(pe.Z,{item:!0,xs:!0,className:A.action},h))),t.createElement(pe.Z,{item:!0,xs:12,md:6,className:A.imageContainer},t.createElement(ye,{missing:d})))}const We=`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`,V=(0,i.Z)(n=>({code:{borderRadius:6,margin:`${n.spacing(2)}px 0px`,background:n.palette.type==="dark"?"#444":"#fff"}}),{name:"BackstageMissingAnnotationEmptyState"});function E(n){const{annotation:a}=n,u=V(),d=t.createElement(t.Fragment,null,"The ",t.createElement("code",null,a)," annotation is missing. You need to add the annotation to your component if you want to enable this tool.");return t.createElement(Le,{missing:"field",title:"Missing Annotation",description:d,action:t.createElement(t.Fragment,null,t.createElement(Te.Z,{variant:"body1"},"Add the annotation to your component YAML as shown in the highlighted example below:"),t.createElement("div",{className:u.code},t.createElement(fe,{text:We.replace("ANNOTATION",a),language:"yaml",showLineNumbers:!0,highlightedNumbers:[6,7],customStyle:{background:"inherit",fontSize:"115%"}})),t.createElement(g.Z,{color:"primary",component:P,to:"https://backstage.io/docs/features/software-catalog/well-known-annotations"},"Read more"))})}var I=e(11776),M=e(38402),ee=e(49378),ae=e(41128),ue=e(27616),Re=e(8284),Ne=e(70660),Ve=e(91750),bt=e(38016);const dt=(n,a)=>(a.palette.type==="light"?ae._j:ae.$n)(a.palette[n].light,.6),Wt=(n,a)=>(a.palette.type==="light"?ae.$n:ae._j)(a.palette[n].light,.9),jt=(0,i.Z)(n=>({root:{marginRight:n.spacing(1),fill:({severity:a})=>dt(a,n)}})),Rt=({severity:n})=>{const a=jt({severity:n});return t.createElement(Ve.Z,{classes:a})},St=({severity:n})=>{const a=jt({severity:n});return t.createElement(bt.Z,{classes:a})},Nt=(0,i.Z)(n=>({panel:{backgroundColor:({severity:a})=>Wt(a,n),color:({severity:a})=>dt(a,n),verticalAlign:"middle"},summary:{display:"flex",flexDirection:"row"},summaryText:{color:({severity:a})=>dt(a,n),fontWeight:"bold"},message:{width:"100%",display:"block",color:({severity:a})=>dt(a,n),backgroundColor:({severity:a})=>Wt(a,n)},details:{width:"100%",display:"block",color:n.palette.textContrast,backgroundColor:n.palette.background.default,border:`1px solid ${n.palette.border}`,padding:n.spacing(2),fontFamily:"sans-serif"}}),{name:"BackstageWarningPanel"}),An=n=>n.charAt(0).toLocaleUpperCase("en-US")+n.slice(1);function bn(n){const{severity:a="warning",title:u,message:d,children:h,defaultExpanded:A}=n,O=Nt({severity:a}),w=An(a)+(u?`: ${u}`:"");return t.createElement(ue.Z,{defaultExpanded:A!=null?A:!1,className:O.panel,role:"alert"},t.createElement(Re.Z,{expandIcon:t.createElement(St,{severity:a}),className:O.summary},t.createElement(Rt,{severity:a}),t.createElement(Te.Z,{className:O.summaryText,variant:"subtitle1"},w)),(d||h)&&t.createElement(Ne.Z,null,t.createElement(pe.Z,{container:!0},d&&t.createElement(pe.Z,{item:!0,xs:12},t.createElement(Te.Z,{className:O.message,variant:"body1"},d)),h&&t.createElement(pe.Z,{item:!0,xs:12,className:O.details},h))))}const Bn=(0,i.Z)(n=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:n.spacing(2)},divider:{margin:n.spacing(2)}}),{name:"BackstageErrorPanel"}),xn=({error:n,message:a,stack:u,children:d})=>{const h=Bn();return t.createElement(I.Z,{dense:!0},t.createElement(M.Z,{alignItems:"flex-start"},t.createElement(ee.Z,{classes:{secondary:h.text},primary:"Error",secondary:n}),t.createElement(se,{text:n})),t.createElement(M.Z,{alignItems:"flex-start"},t.createElement(ee.Z,{classes:{secondary:h.text},primary:"Message",secondary:a}),t.createElement(se,{text:a})),u&&t.createElement(M.Z,{alignItems:"flex-start"},t.createElement(ee.Z,{classes:{secondary:h.text},primary:"Stack Trace",secondary:u}),t.createElement(se,{text:u})),d)};function Mn(n){const{title:a,error:u,defaultExpanded:d,children:h}=n;return t.createElement(bn,{severity:"error",title:a!=null?a:u.message,defaultExpanded:d},t.createElement(xn,{error:u.name,message:u.message,stack:u.stack,children:h}))}var Gn=e(85256);const cr=(0,i.Z)(n=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:n.spacing(2)},divider:{margin:n.spacing(2)}}),{name:"BackstageResponseErrorPanel"});function ur(n){var Oe;const{title:a,error:u,defaultExpanded:d}=n,h=cr();if(u.name!=="ResponseError")return t.createElement(Mn,{title:a!=null?a:u.message,defaultExpanded:d,error:u});const{body:A,cause:O}=u,{request:w,response:Y}=A,H=`${Y.statusCode}: ${O.name}`,oe=w&&`${w.method} ${w.url}`,de=O.message.replace(/\\n/g,`
|
|
12
|
+
`),Pe=(Oe=O.stack)==null?void 0:Oe.replace(/\\n/g,`
|
|
13
|
+
`),be=JSON.stringify(A,void 0,2);return t.createElement(Mn,{title:a!=null?a:u.message,defaultExpanded:d,error:{name:H,message:de,stack:Pe}},oe&&t.createElement(M.Z,{alignItems:"flex-start"},t.createElement(ee.Z,{classes:{secondary:h.text},primary:"Request",secondary:w?`${oe}`:void 0}),t.createElement(se,{text:oe})),t.createElement(t.Fragment,null,t.createElement(Gn.Z,{component:"li",className:h.divider}),t.createElement(M.Z,{alignItems:"flex-start"},t.createElement(ee.Z,{classes:{secondary:h.text},primary:"Full Error as JSON"})),t.createElement(fe,{language:"json",text:be,showCopyCodeButton:!0})))}var Kn=e(47093);function Mr(n){const a=document.createElement("div");return a.setAttribute("id",n),a}function Zr(n){document.body.insertBefore(n,document.body.lastElementChild.nextElementSibling)}function Nr(n){const a=useRef(null);useEffect(function(){const h=document.querySelector(`#${n}`),A=h||Mr(n);return h||Zr(A),A.appendChild(a.current),function(){a.current.remove(),A.childNodes.length===-1&&A.remove()}},[n]);function u(){return a.current||(a.current=document.createElement("div")),a.current}return u()}var Yn=null;const Rn="core.calloutSeen";function Jn(){const[n,a]=useState(()=>{const d=localStorage.getItem(Rn);return d?JSON.parse(d):{}}),u=useCallback((d,h)=>{const A=localStorage.getItem(Rn),w={...A?JSON.parse(A):{},[d]:h};a(w),localStorage.setItem(Rn,JSON.stringify(w))},[]);return{states:n,setState:u}}function dr(n){const{states:a,setState:u}=Jn(),d=useCallback(()=>{u(n,!0)},[u,n]);return{seen:a[n]===!0,markSeen:d}}function Zn(n){const{seen:a,markSeen:u}=dr(n);return{show:a===!1,hide:u}}const fr=(0,i.Z)({"@keyframes pulsateSlightly":{"0%":{transform:"scale(1.0)"},"100%":{transform:"scale(1.1)"}},"@keyframes pulsateAndFade":{"0%":{transform:"scale(1.0)",opacity:.9},"100%":{transform:"scale(1.5)",opacity:0}},featureWrapper:{position:"relative"},backdrop:{zIndex:2e3,position:"fixed",overflow:"hidden",left:0,right:0,top:0,bottom:0},dot:{position:"absolute",backgroundColor:"transparent",borderRadius:"100%",border:"1px solid rgba(103, 146, 180, 0.98)",boxShadow:"0px 0px 0px 20000px rgba(0, 0, 0, 0.5)",zIndex:2001,transformOrigin:"center center",animation:"$pulsateSlightly 1744ms 1.2s cubic-bezier(0.4, 0, 0.2, 1) alternate infinite"},pulseCircle:{width:"100%",height:"100%",backgroundColor:"transparent",borderRadius:"100%",border:"2px solid white",zIndex:2001,transformOrigin:"center center",animation:"$pulsateAndFade 872ms 1.2s cubic-bezier(0.4, 0, 0.2, 1) infinite"},text:{position:"absolute",color:"white",zIndex:2003}},{name:"BackstageFeatureCalloutCircular"});function Mt(n){const{featureId:a,title:u,description:d,children:h}=n,{show:A,hide:O}=useShowCallout(a),w=usePortal("core.callout"),Y=useRef(null),[H,oe]=useState(),de=fr(),Pe=useCallback(()=>{if(Y.current){const be=Y.current.getBoundingClientRect(),Oe=Math.max(be.width,be.height),ut=800,xt=be.x-(Oe-be.width)/2-ut,Jt=be.y-(Oe-be.height)/2-ut,zt=Oe+2*ut,it=450,Pt=be.x+be.width/2-it,Ot=be.y-(Oe-be.height)/2+Oe+20;oe({dotLeft:xt,dotTop:Jt,dotSize:zt,borderWidth:ut,textTop:Ot,textLeft:Pt,textWidth:it})}},[]);return useEffect(()=>(window.addEventListener("resize",Pe),window.addEventListener("scroll",Pe),()=>{window.removeEventListener("resize",Pe),window.removeEventListener("scroll",Pe)}),[Pe]),useLayoutEffect(Pe,[Y.current,Pe]),A?React.createElement(React.Fragment,null,React.createElement("div",{className:de.featureWrapper,ref:Y},h),createPortal(React.createElement("div",{className:de.backdrop},React.createElement(ClickAwayListener,{onClickAway:O},React.createElement(React.Fragment,null,React.createElement("div",{className:de.dot,"data-testid":"dot",style:{left:H==null?void 0:H.dotLeft,top:H==null?void 0:H.dotTop,width:H==null?void 0:H.dotSize,height:H==null?void 0:H.dotSize,borderWidth:H==null?void 0:H.borderWidth},onClick:O,onKeyDown:O,role:"button",tabIndex:0},React.createElement("div",{className:de.pulseCircle})),React.createElement("div",{className:de.text,"data-testid":"text",style:{left:H==null?void 0:H.textLeft,top:H==null?void 0:H.textTop,width:H==null?void 0:H.textWidth}},React.createElement(Typography,{variant:"h2",paragraph:!0},u),React.createElement(Typography,null,d))))),w)):React.createElement(React.Fragment,null,h)}var Qt=e(35292);const kn=(0,i.Z)(n=>({link:{display:"grid",justifyItems:"center",gridGap:4,textAlign:"center"},disabled:{color:"gray",cursor:"default"},primary:{color:n.palette.primary.main},secondary:{color:n.palette.secondary.main},label:{fontSize:"0.7rem",textTransform:"uppercase",fontWeight:600,letterSpacing:1.2}}),{name:"BackstageIconLinkVertical"});function mr({color:n="primary",disabled:a=!1,href:u="#",icon:d=t.createElement(Qt.Z,null),label:h,onClick:A,title:O}){const w=kn();return a?t.createElement(p.Z,{title:O,className:ie()(w.link,w.disabled),underline:"none"},d,t.createElement("span",{className:w.label},h)):t.createElement(p.Z,{title:O,className:ie()(w.link,w[n]),to:u,component:P,onClick:A},d,t.createElement("span",{className:w.label},h))}const hr=(0,i.Z)(n=>({links:{margin:n.spacing(2,0),display:"grid",gridAutoFlow:"column",gridAutoColumns:"min-content",gridGap:n.spacing(3)}}),{name:"BackstageHeaderIconLinkRow"});function $r(n){const{links:a}=n,u=hr();return t.createElement("nav",{className:u.links},a.map((d,h)=>t.createElement(mr,{key:h+1,...d})))}const gr=n=>{const a=n==="dark"?"16%":"97%";return`
|
|
14
|
+
hsl(0, 0%, ${a}) 0%,
|
|
15
|
+
hsla(0, 0%, ${a}, 0.987) 8.1%,
|
|
16
|
+
hsla(0, 0%, ${a}, 0.951) 15.5%,
|
|
17
|
+
hsla(0, 0%, ${a}, 0.896) 22.5%,
|
|
18
|
+
hsla(0, 0%, ${a}, 0.825) 29%,
|
|
19
|
+
hsla(0, 0%, ${a}, 0.741) 35.3%,
|
|
20
|
+
hsla(0, 0%, ${a}, 0.648) 41.2%,
|
|
21
|
+
hsla(0, 0%, ${a}, 0.55) 47.1%,
|
|
22
|
+
hsla(0, 0%, ${a}, 0.45) 52.9%,
|
|
23
|
+
hsla(0, 0%, ${a}, 0.352) 58.8%,
|
|
24
|
+
hsla(0, 0%, ${a}, 0.259) 64.7%,
|
|
25
|
+
hsla(0, 0%, ${a}, 0.175) 71%,
|
|
26
|
+
hsla(0, 0%, ${a}, 0.104) 77.5%,
|
|
27
|
+
hsla(0, 0%, ${a}, 0.049) 84.5%,
|
|
28
|
+
hsla(0, 0%, ${a}, 0.013) 91.9%,
|
|
29
|
+
hsla(0, 0%, ${a}, 0) 100%
|
|
30
|
+
`},Qn=100,Xn=10,Ur=(0,i.Z)(n=>({root:{position:"relative",display:"flex",flexFlow:"row nowrap",alignItems:"center"},container:{overflow:"auto",scrollbarWidth:0,"&::-webkit-scrollbar":{display:"none"}},fade:{position:"absolute",width:Qn,height:`calc(100% + ${Xn}px)`,transition:"opacity 300ms",pointerEvents:"none"},fadeLeft:{left:-Xn,background:`linear-gradient(90deg, ${gr(n.palette.type)})`},fadeRight:{right:-Xn,background:`linear-gradient(270deg, ${gr(n.palette.type)})`},fadeHidden:{opacity:0},button:{position:"absolute"},buttonLeft:{left:-n.spacing(2)},buttonRight:{right:-n.spacing(2)}}),{name:"BackstageHorizontalScrollGrid"});function wr(n){const[[a,u],d]=React.useState([0,0]);return React.useLayoutEffect(()=>{const h=n.current;if(!h){d([0,0]);return}const A=()=>{const O=h.scrollLeft,w=h.scrollWidth-h.offsetWidth-h.scrollLeft;d([O,w])};return A(),h.addEventListener("scroll",A),window.addEventListener("resize",A),()=>{h.removeEventListener("scroll",A),window.removeEventListener("resize",A)}},[n]),[a,u]}function zr(n,a,u){const[d,h]=React.useState(0);return React.useLayoutEffect(()=>{if(d===0)return;const A=performance.now(),O=requestAnimationFrame(w=>{if(!n.current)return;const Y=w-A,H=Math.abs(d)*Y/a,de=Math.max(u,H)*Math.sign(d);n.current.scrollBy({left:de});const Pe=d-de;Math.sign(d)!==Math.sign(Pe)?h(0):h(Pe)});return()=>cancelAnimationFrame(O)},[n,d,a,u]),h}function Sn(n){const{scrollStep:a=100,scrollSpeed:u=50,minScrollDistance:d=5,children:h,...A}=n,O=Ur(n),w=React.useRef(),[Y,H]=wr(w),oe=zr(w,u,d),de=Pe=>{!w.current||oe(Pe?a:-a)};return React.createElement("div",{...A,className:O.root},React.createElement(Grid,{container:!0,direction:"row",wrap:"nowrap",className:O.container,ref:w},h),React.createElement("div",{className:classNames(O.fade,O.fadeLeft,{[O.fadeHidden]:Y===0})}),React.createElement("div",{className:classNames(O.fade,O.fadeRight,{[O.fadeHidden]:H===0})}),Y>0&&React.createElement(IconButton,{title:"Scroll Left",onClick:()=>de(!1),className:classNames(O.button,O.buttonLeft,{})},React.createElement(ChevronLeftIcon,null)),H>0&&React.createElement(IconButton,{title:"Scroll Right",onClick:()=>de(!0),className:classNames(O.button,O.buttonRight,{})},React.createElement(ChevronRightIcon,null)))}const ln=(0,i.Z)({alpha:{color:"#ffffff",fontFamily:"serif",fontWeight:"normal",fontStyle:"italic"},beta:{color:"#4d65cc",fontFamily:"serif",fontWeight:"normal",fontStyle:"italic"}},{name:"BackstageLifecycle"});function Xt(n){const a=ln(n),{shorthand:u,alpha:d}=n;return u?React.createElement("span",{className:a[d?"alpha":"beta"],style:{fontSize:"120%"}},d?React.createElement(React.Fragment,null,"\u03B1"):React.createElement(React.Fragment,null,"\u03B2")):React.createElement("span",{className:a[d?"alpha":"beta"]},d?"Alpha":"Beta")}const Cn=(0,t.lazy)(()=>Promise.all([e.e(3860),e.e(8718)]).then(e.bind(e,98718)).then(n=>({default:n.RealLogViewer})));function qn(n){const{Progress:a}=(0,l.useApp)().getComponents();return t.createElement(t.Suspense,{fallback:t.createElement(a,null)},t.createElement(Cn,{...n}))}const pr=(0,i.Z)(n=>({markdown:{"& table":{borderCollapse:"collapse",border:`1px solid ${n.palette.border}`},"& th, & td":{border:`1px solid ${n.palette.border}`,padding:n.spacing(1)},"& td":{wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:n.spacing(3,2,3,2.5),borderBottom:0},"& th":{backgroundColor:n.palette.background.paper},"& tr":{backgroundColor:n.palette.background.paper},"& tr:nth-child(odd)":{backgroundColor:n.palette.background.default},"& a":{color:n.palette.link},"& img":{maxWidth:"100%"}}}),{name:"BackstageMarkdownContent"}),Nn={code:({inline:n,className:a,children:u,...d})=>{const h=String(u).replace(/\n+$/,""),A=/language-(\w+)/.exec(a||"");return!n&&A?t.createElement(fe,{language:A[1],text:h}):t.createElement("code",{className:a,...d},u)}};function Wr(n){const{content:a,dialect:u="gfm",linkTarget:d}=n,h=pr();return React.createElement(ReactMarkdown,{remarkPlugins:u==="gfm"?[gfm]:[],className:h.markdown,children:a,components:Nn,linkTarget:d})}var yr=e(10179);const $n=(0,i.Z)(n=>({root:{paddingLeft:n.spacing(3)}}),{name:"BackstageLoginRequestListItem"}),gn=({request:n,busy:a,setBusy:u})=>{const d=$n(),[h,A]=useState(),O=async()=>{u(!0);try{await n.trigger()}catch(Y){A(isError(Y)?Y.message:"An unspecified error occurred")}finally{u(!1)}},w=n.provider.icon;return React.createElement(ListItem,{button:!0,disabled:a,classes:{root:d.root}},React.createElement(ListItemAvatar,null,React.createElement(w,{fontSize:"large"})),React.createElement(ListItemText,{primary:n.provider.title,secondary:h&&React.createElement(Typography,{color:"error"},h)}),React.createElement(Button,{color:"primary",variant:"contained",onClick:O},"Log in"))};var Un=null;const On=(0,i.Z)(n=>({dialog:{paddingTop:n.spacing(1)},title:{minWidth:0},contentList:{padding:0},actionButtons:{padding:n.spacing(2,0)}}),{name:"OAuthRequestDialog"});function Er(n){const a=On(),[u,d]=useState(!1),h=useApi(oauthRequestApiRef),A=useObservable(useMemo(()=>h.authRequest$(),[h]),[]),O=()=>{A.forEach(w=>w.reject())};return React.createElement(Dialog,{open:Boolean(A.length),fullWidth:!0,maxWidth:"xs",classes:{paper:a.dialog}},React.createElement(DialogTitle,{classes:{root:a.title}},"Login Required"),React.createElement(DialogContent,{dividers:!0,classes:{root:a.contentList}},React.createElement(List,null,A.map(w=>React.createElement(LoginRequestListItem,{key:w.provider.title,request:w,busy:u,setBusy:d})))),React.createElement(DialogActions,{classes:{root:a.actionButtons}},React.createElement(Button,{onClick:O},"Reject All")))}var wn=e(15277),vr=e.n(wn),Ar=e(29862);const zn=(0,i.Z)({container:{overflow:"visible !important"}},{name:"BackstageOverflowTooltip"});function Rr(n){var O;const[a,u]=(0,t.useState)(!1),d=(0,Ar.t)(),h=zn(),A=w=>{d()&&u(w)};return t.createElement(B.ZP,{title:(O=n.title)!=null?O:n.text||"",placement:n.placement,disableHoverListener:!a},t.createElement(vr(),{text:n.text,line:n.line,onToggled:A,containerClassName:h.container}))}var Sr=e(67358);function _n(n){const[a,u]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{const d=setTimeout(()=>u(!0),250);return()=>clearTimeout(d)},[]),a?t.createElement(Sr.Z,{...n,"data-testid":"progress"}):t.createElement("div",{style:{display:"none"}})}var er=e(94339),qt=e(14503),tr=e(24579),nr=e(32552),Gt=e(15459),cn=e(95544),Cr=e(27597);const Tr=(0,i.Z)(n=>({root:{maxWidth:"fit-content",padding:n.spacing(2,2,2,2.5)},boxTitle:{margin:0,color:n.palette.textSubtle},arrow:{color:n.palette.textSubtle}}),{name:"BackstageBottomLink"});function rr(n){const{link:a,title:u,onClick:d}=n,h=Tr();return t.createElement("div",null,t.createElement(Gn.Z,null),t.createElement(P,{to:a,onClick:d,underline:"none"},t.createElement(cn.Z,{display:"flex",alignItems:"center",className:h.root},t.createElement(cn.Z,{className:h.boxTitle,fontWeight:"fontWeightBold",m:1},t.createElement(Te.Z,null,t.createElement("strong",null,u))),t.createElement(Cr.Z,{className:h.arrow}))))}const Tn=n=>{const{slackChannel:a}=n;if(a){if(typeof a=="string")return t.createElement(t.Fragment,null,"Please contact ",a," for help.");if(!a.href)return t.createElement(t.Fragment,null,"Please contact ",a.name," for help.")}else return null;return t.createElement(D,{to:a.href,variant:"contained"},a.name)},Pn=class extends t.Component{constructor(a){super(a);this.state={error:void 0,errorInfo:void 0}}componentDidCatch(a,u){console.error(`ErrorBoundary, error: ${a}, info: ${u}`),this.setState({error:a,errorInfo:u})}render(){const{slackChannel:a,children:u}=this.props,{error:d}=this.state;return d?t.createElement(Mn,{title:"Something Went Wrong",error:d},t.createElement(Tn,{slackChannel:a})):u}},Pr=(0,i.Z)(n=>({noPadding:{padding:0,"&:last-child":{paddingBottom:0}},header:{padding:n.spacing(2,2,2,2.5)},headerTitle:{fontWeight:700},headerSubheader:{paddingTop:n.spacing(1)},headerAvatar:{},headerAction:{},headerContent:{},subheader:{display:"flex"}}),{name:"BackstageInfoCard"}),Ir=(0,Gt.Z)(n=>({root:{display:"inline-block",padding:n.spacing(8,8,0,0),float:"right"}}),{name:"BackstageInfoCardCardActionsTopRight"})(qt.Z),Wn={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 In(n){const{title:a,subheader:u,divider:d=!0,deepLink:h,slackChannel:A,errorBoundaryProps:O,variant:w,children:Y,headerStyle:H,headerProps:oe,icon:de,action:Pe,actionsClassName:be,actions:Oe,cardClassName:ut,actionsTopRight:xt,className:Jt,noPadding:zt,titleTypographyProps:it}=n,Pt=Pr();let Ot={},kt={};w&&w.split(/[\s]+/g).forEach(Tt=>{Ot={...Ot,...Wn.card[Tt]},kt={...kt,...Wn.cardContent[Tt]}});const Dn=()=>t.createElement("div",{className:Pt.headerSubheader},u&&t.createElement("div",{className:Pt.subheader},u),de),fn=O||(A?{slackChannel:A}:{});return t.createElement(er.Z,{style:Ot,className:Jt},t.createElement(Pn,{...fn},a&&t.createElement(nr.Z,{classes:{root:Pt.header,title:Pt.headerTitle,subheader:Pt.headerSubheader,avatar:Pt.headerAvatar,action:Pt.headerAction,content:Pt.headerContent},title:a,subheader:Dn(),action:Pe,style:{...H},titleTypographyProps:it,...oe}),xt&&t.createElement(Ir,null,xt),d&&t.createElement(Gn.Z,null),t.createElement(tr.Z,{className:ie()(ut,{[Pt.noPadding]:zt}),style:kt},Y),Oe&&t.createElement(qt.Z,{className:be},Oe),h&&t.createElement(rr,{...h})))}var Hr=e(39307);const Lr=(0,i.Z)(n=>({root:{position:"relative",lineHeight:0},overlay:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -60%)",fontSize:45,fontWeight:"bold",color:n.palette.textContrast},description:{fontSize:"100%",top:"50%",left:"50%",transform:"translate(-50%, -50%)",position:"absolute",wordBreak:"break-all",display:"inline-block"},circle:{width:"80%",transform:"translate(10%, 0)"},colorUnknown:{}}),{name:"BackstageGauge"}),br={fractional:!0,inverse:!1,unit:"%",max:100},xr=({palette:n,value:a,inverse:u,max:d})=>{if(isNaN(a))return"#ddd";const h=d||br.max,A=u?h-a:a;return A<h/3?n.status.error:A<h*(2/3)?n.status.warning:n.status.ok};function x(n){const[a,u]=useState(null),{getColor:d=xr}=n,h=Lr(n),{palette:A}=useTheme(),{value:O,fractional:w,inverse:Y,unit:H,max:oe,description:de}={...br,...n},Pe=w?Math.round(O*oe):O,be=oe!==100?Math.round(O):Pe,[Oe,ut]=useState(!1);return useEffect(()=>{const xt=a,Jt=()=>ut(!0),zt=()=>ut(!1);return xt&&de?(xt.addEventListener("mouseenter",Jt),xt.addEventListener("mouseleave",zt),()=>{xt.removeEventListener("mouseenter",Jt),xt.removeEventListener("mouseleave",zt)}):()=>{ut(!1)}},[de,a]),React.createElement("div",{ref:u,className:h.root},React.createElement(Circle,{strokeLinecap:"butt",percent:Pe,strokeWidth:12,trailWidth:12,strokeColor:d({palette:A,value:be,inverse:Y,max:oe}),className:h.circle}),de&&Oe?React.createElement("div",{className:h.description},de):React.createElement("div",{className:h.overlay},isNaN(O)?"N/A":`${be}${H}`))}const k=(0,i.Z)({root:{height:"100%",width:250}},{name:"BackstageGaugeCard"});function he(n){const a=k(n),{title:u,subheader:d,progress:h,inverse:A,deepLink:O,description:w,icon:Y,variant:H,getColor:oe}=n,de={inverse:A,description:w,getColor:oe,value:h};return React.createElement("div",{className:a.root},React.createElement(InfoCard,{title:u,subheader:d,deepLink:O,variant:H,icon:Y},React.createElement(Gauge,{...de})))}function Me(n){const{value:a,getColor:u=getProgressColor}=n,{palette:d}=useTheme();if(isNaN(a))return null;let h=Math.round(a*100*100)/100;h>100&&(h=100);const A=u({palette:d,value:h,inverse:!1,max:100});return React.createElement(Tooltip,{title:`${h}%`},React.createElement("span",null,React.createElement(Line,{percent:h,strokeWidth:4,trailWidth:4,strokeColor:A})))}var ke=e(21324),mt=e(7089),v=e(1292),C=e(42494),F=e(74603),W=e(12231),K=e(73698),J=e(72379);const ge=(0,i.Z)(()=>(0,o.Z)({icon:{position:"absolute",right:"4px",pointerEvents:"none"}}),{name:"BackstageClosedDropdown"});var Be=()=>{const n=ge();return t.createElement(J.Z,{className:n.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{d:"M7.5 8L6 9.5L12.0703 15.5703L18.1406 9.5L16.6406 8L12.0703 12.5703L7.5 8Z",fill:"#616161"}))};const Fe=(0,i.Z)(()=>(0,o.Z)({icon:{position:"absolute",right:"4px",pointerEvents:"none"}}),{name:"BackstageOpenedDropdown"});var we=()=>{const n=Fe();return t.createElement(J.Z,{className:n.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{d:"M16.5 16L18 14.5L11.9297 8.42969L5.85938 14.5L7.35938 16L11.9297 11.4297L16.5 16Z",fill:"#616161"}))};const Ye=(0,Gt.Z)(n=>(0,o.Z)({root:{"label + &":{marginTop:n.spacing(3)}},input:{borderRadius:4,position:"relative",backgroundColor:n.palette.background.paper,border:"1px solid #ced4da",fontSize:16,padding:"10px 26px 10px 12px",transition:n.transitions.create(["border-color","box-shadow"]),fontFamily:"Helvetica Neue","&:focus":{background:n.palette.background.paper,borderRadius:4}}}),{name:"BackstageSelectInputBase"})(F.Z),ht=(0,i.Z)(n=>(0,o.Z)({formControl:{margin:`${n.spacing(1)} 0px`,maxWidth:300},label:{transform:"initial",fontWeight:"bold",fontSize:14,fontFamily:n.typography.fontFamily,color:n.palette.text.primary,"&.Mui-focused":{color:n.palette.text.primary}},chips:{display:"flex",flexWrap:"wrap"},chip:{margin:2},checkbox:{},root:{display:"flex",flexDirection:"column"}}),{name:"BackstageSelect"});function _e(n){const{multiple:a,items:u,label:d,placeholder:h,selected:A,onChange:O,triggerReset:w,native:Y=!1,disabled:H=!1}=n,oe=ht(),[de,Pe]=(0,t.useState)(A||(a?[]:"")),[be,Oe]=(0,t.useState)(!1);(0,t.useEffect)(()=>{Pe(a?[]:"")},[w,a]),(0,t.useEffect)(()=>{A!==void 0&&Pe(A)},[A]);const ut=it=>{Pe(it.target.value),O(it.target.value)},xt=it=>{if(H){it.preventDefault();return}Oe(Pt=>a&&!(it.target instanceof HTMLElement)?!0:!Pt)},Jt=()=>{Oe(!1)},zt=it=>()=>{const Pt=de.filter(Ot=>Ot!==it);Pe(Pt),O(Pt)};return t.createElement("div",{className:oe.root},t.createElement(Te.Z,{variant:"button"},d),t.createElement(v.Z,{onClickAway:Jt},t.createElement(C.Z,{className:oe.formControl},t.createElement(K.Z,{value:de,native:Y,disabled:H,"data-testid":"select",displayEmpty:!0,multiple:a,onChange:ut,onClick:xt,open:be,input:t.createElement(Ye,null),renderValue:it=>{var Pt;return a&&de.length!==0?t.createElement("div",{className:oe.chips},it.map(Ot=>{var kt,Dn;return t.createElement(mt.Z,{key:(kt=u.find(fn=>fn.value===Ot))==null?void 0:kt.value,label:(Dn=u.find(fn=>fn.value===Ot))==null?void 0:Dn.label,clickable:!0,onDelete:zt(Ot),className:oe.chip})})):t.createElement(Te.Z,null,de.length===0?h||"":(Pt=u.find(Ot=>Ot.value===it))==null?void 0:Pt.label)},IconComponent:()=>be?t.createElement(we,null):t.createElement(Be,null),MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},getContentAnchorEl:null}},h&&!a&&t.createElement(W.Z,{value:[]},h),Y?u&&u.map(it=>t.createElement("option",{value:it.value,key:it.value},it.label)):u&&u.map(it=>t.createElement(W.Z,{key:it.value,value:it.value},a&&t.createElement(ke.Z,{color:"primary",checked:de.includes(it.value)||!1,className:oe.checkbox}),it.label))))))}const Je=()=>{},vt=t.createContext({stepperLength:0,stepIndex:0,setStepIndex:Je,stepHistory:[],setStepHistory:Je,onStepChange:Je});function Ft(n){const{children:a,elevated:u,onStepChange:d,activeStep:h=0}=n,[A,O]=useState(h),[w,Y]=useState([0]);useEffect(()=>{O(h)},[h]);const H=[];let oe;return Children.forEach(a,de=>{isValidElement(de)&&(de.props.end?oe=de:H.push(de))}),React.createElement(React.Fragment,null,React.createElement(vt.Provider,{value:{stepIndex:A,setStepIndex:O,stepHistory:w,setStepHistory:Y,onStepChange:d,stepperLength:Children.count(a)}},React.createElement(MuiStepper,{activeStep:A,orientation:"vertical",elevation:u?2:0},H)),A>=Children.count(a)-1&&oe)}const _t=(0,i.Z)(n=>({root:{marginTop:n.spacing(3),"& button":{marginRight:n.spacing(1)}}}),{name:"BackstageSimpleStepperFooter"}),Kt=({text:n,handleClick:a})=>React.createElement(Button,{onClick:a},n||"Reset"),Yt=({text:n,handleClick:a,disabled:u,last:d,stepIndex:h})=>React.createElement(Button,{variant:"contained",color:"primary",disabled:u,"data-testid":`nextButton-${h}`,onClick:a},n||(d?"Finish":"Next")),pn=({text:n,handleClick:a,disabled:u,stepIndex:d})=>React.createElement(Button,{onClick:a,"data-testid":`backButton-${d}`,disabled:u},n||"Back"),un=({actions:n={},children:a})=>{const u=_t(),{stepperLength:d,stepIndex:h,setStepIndex:A,stepHistory:O,setStepHistory:w,onStepChange:Y}=useContext(VerticalStepperContext),H=(be,Oe)=>{Oe&&Oe(),Y&&Y(h,be),A(be)},oe=()=>{const be=n.nextStep?n.nextStep(h,d-1):h+1;H(be,n.onNext),w([...O,be])},de=()=>{O.pop(),H(O[O.length-1],n.onBack),w([...O])},Pe=()=>{H(0,n.onRestart),w([0])};return React.createElement("div",{className:u.root},[void 0,!0].includes(n.showBack)&&h!==0&&React.createElement(pn,{text:n.backText,handleClick:de,disabled:h===0,stepIndex:h}),[void 0,!0].includes(n.showNext)&&React.createElement(Yt,{text:n.nextText,handleClick:oe,disabled:!!d&&h>=d||!!n.canNext&&!n.canNext(),stepIndex:h}),n.showRestart&&h!==0&&React.createElement(Kt,{text:n.restartText,handleClick:Pe,stepIndex:h}),a)},ar=(0,i.Z)(n=>({end:{padding:n.spacing(3)}}),{name:"SimpleStepperStep"});function ea(n){const{title:a,children:u,end:d,actions:h,...A}=n,O=ar();return d?React.createElement("div",{className:O.end},React.createElement(Typography,{variant:"h6"},a),u,React.createElement(SimpleStepperFooter,{actions:{...h||{},showNext:!1}})):React.createElement(MuiStep,{...A},React.createElement(StepLabel,null,React.createElement(Typography,{variant:"h6"},a)),React.createElement(StepContent,null,u,React.createElement(SimpleStepperFooter,{actions:h})))}const Ut=(0,i.Z)(n=>({status:{fontWeight:500,"&::before":{width:"0.7em",height:"0.7em",display:"inline-block",marginRight:8,borderRadius:"50%",content:'""'}},ok:{"&::before":{backgroundColor:n.palette.status.ok}},warning:{"&::before":{backgroundColor:n.palette.status.warning}},error:{"&::before":{backgroundColor:n.palette.status.error}},pending:{"&::before":{backgroundColor:n.palette.status.pending}},running:{"&::before":{backgroundColor:n.palette.status.running}},aborted:{"&::before":{backgroundColor:n.palette.status.aborted}}}),{name:"BackstageStatus"});function rn(n){const a=Ut(n);return React.createElement("span",{className:classNames(a.status,a.ok),"aria-label":"Status ok","aria-hidden":"true",...n})}function Or(n){const a=Ut(n);return React.createElement("span",{className:classNames(a.status,a.warning),"aria-label":"Status warning","aria-hidden":"true",...n})}function ta(n){const a=Ut(n);return React.createElement("span",{className:classNames(a.status,a.error),"aria-label":"Status error","aria-hidden":"true",...n})}function Wi(n){const a=Ut(n);return React.createElement("span",{className:classNames(a.status,a.pending),"aria-label":"Status pending","aria-hidden":"true",...n})}function Hi(n){const a=Ut(n);return React.createElement("span",{className:classNames(a.status,a.running),"aria-label":"Status running","aria-hidden":"true",...n})}function Vi(n){const a=Ut(n);return React.createElement("span",{className:classNames(a.status,a.aborted),"aria-label":"Status aborted","aria-hidden":"true",...n})}var ji=e(74600),ga=e(15584);const ao=n=>(0,o.Z)({root:{fontWeight:"bolder",whiteSpace:"nowrap",paddingRight:n.spacing(4),border:"0",verticalAlign:"top"}}),oo={root:{border:"0",verticalAlign:"top"}},so=n=>(0,o.Z)({root:{listStyle:"none",margin:n.spacing(0,0,-1,0),padding:"0"}}),io=n=>(0,o.Z)({root:{padding:n.spacing(0,0,1,0)},random:{}}),lo=(0,Gt.Z)(ao,{name:"BackstageMetadataTableTitleCell"})(ga.Z),co=(0,Gt.Z)(oo,{name:"BackstageMetadataTableCell"})(ga.Z),Gi=({dense:n,children:a})=>React.createElement(Table,{size:n?"small":"medium"},React.createElement(TableBody,null,a)),Ki=({title:n,children:a,...u})=>React.createElement(TableRow,null,n&&React.createElement(lo,null,n),React.createElement(co,{colSpan:n?1:2,...u},a)),pa=(0,Gt.Z)(so,{name:"BackstageMetadataTableList"})(({classes:n,children:a})=>t.createElement("ul",{className:n.root},a)),Yi=(0,Gt.Z)(io,{name:"BackstageMetadataTableListItem"})(({classes:n,children:a})=>t.createElement("li",{className:n.root},a)),ya=(0,o.Z)({root:{margin:"0 0",listStyleType:"none"}}),uo=n=>(0,o.Z)({root:{...ya.root,paddingLeft:n.spacing(1)}}),Ea=(0,Gt.Z)(ya,{name:"BackstageStructuredMetadataTableList"})(({classes:n,children:a})=>t.createElement(pa,{classes:n},a)),va=(0,Gt.Z)(uo,{name:"BackstageStructuredMetadataTableNestedList"})(({classes:n,children:a})=>t.createElement(pa,{classes:n},a));function fo(n,a){const u=n.map((d,h)=>React.createElement(MetadataListItem,{key:h},na(d)));return a?React.createElement(va,null,u):React.createElement(Ea,null,u)}function mo(n,a,u){const d=Object.keys(n).map(h=>{const A=na(n[h],!0),O=u&&u.titleFormat?u.titleFormat(h):startCase(h);return React.createElement(MetadataListItem,{key:h},`${O}: `,A)});return a?React.createElement(va,null,d):React.createElement(Ea,null,d)}function na(n,a,u){return React.isValidElement(n)?React.createElement(Fragment,null,n):typeof n=="object"&&!Array.isArray(n)?mo(n,a,u):Array.isArray(n)?fo(n,u):typeof n=="boolean"?React.createElement(Fragment,null,n?"\u2705":"\u274C"):React.createElement(Fragment,null,n)}const ho=({value:n,options:a})=>React.createElement(Fragment,null,na(n,a)),go=({title:n,value:a,options:u})=>React.createElement(MetadataTableItem,{title:u&&u.titleFormat?u.titleFormat(n):startCase(n)},React.createElement(ho,{value:a,options:u}));function po(n,a){return Object.keys(n).map(u=>React.createElement(go,{key:u,title:u,value:n[u],options:a}))}function Ji(n){const{metadata:a,dense:u=!0,options:d}=n,h=po(a,d||{});return React.createElement(MetadataTable,{dense:u},h)}var yo=e(49429),Eo=e(86136),Aa=e(79784),or=e(76635),vo=e(19126),Vr=e.n(vo),Ao=e(80277);function Ro(n){return Vr().stringify(n,{strictNullHandling:!0})}function Ra(n){return Vr().parse(n,{ignoreQueryPrefix:!0,strictNullHandling:!0})}function Sa(n,a){return Ra(n)[a]}function So(n,a,u){const d={...Ra(n),[a]:u};return Ro(d)}function Co(n,a=250){const[u,d]=(0,R.lr)(),h=u.toString(),[A,O]=(0,t.useState)(Sa(h,n));return(0,t.useEffect)(()=>{const w=Sa(h,n);O(Y=>(0,or.isEqual)(w,Y)?Y:w)},[h,O,n]),(0,Ao.b)(()=>{const w=So(h,n,A);h!==w&&d(w,{replace:!0})},[d,A,h,n],a),[A,O]}const To={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/andrewthauer/backstage/blob/master/app-config.yaml"}]}]};function Ca(){const a=(0,l.useApiHolder)().get(l.configApiRef),u=a==null?void 0:a.getOptionalConfig("app.support");return u?{url:u.getString("url"),items:u.getConfigArray("items").flatMap(d=>{var h;return{title:d.getString("title"),icon:d.getOptionalString("icon"),links:((h=d.getOptionalConfigArray("links"))!=null?h:[]).flatMap(A=>({url:A.getString("url"),title:A.getString("title")}))}})}:To}var Po=e(80079);function yn(n,a){const d=(0,l.useApp)().getSystemIcon(n);return d?t.createElement(d,{...a}):t.createElement(Po.Z,{...a})}function ki(n){return yn("brokenImage",n)}function Qi(n){return yn("catalog",n)}function Xi(n){return yn("chat",n)}function qi(n){return yn("dashboard",n)}function _i(n){return yn("docs",n)}function el(n){return yn("email",n)}function tl(n){return yn("github",n)}function nl(n){return yn("group",n)}function jr(n){return yn("help",n)}function rl(n){return yn("user",n)}function al(n){return yn("warning",n)}const Io=(0,i.Z)({popoverList:{minWidth:260,maxWidth:400}},{name:"BackstageSupportButton"}),Lo=({icon:n})=>{var d;const a=(0,l.useApp)(),u=n&&(d=a.getSystemIcon(n))!=null?d:jr;return t.createElement(u,null)},bo=({link:n})=>{var a;return t.createElement(P,{to:n.url},(a=n.title)!=null?a:n.url)},xo=({item:n})=>{var a;return t.createElement(M.Z,null,t.createElement(Eo.Z,null,t.createElement(Lo,{icon:n.icon})),t.createElement(ee.Z,{primary:n.title,secondary:(a=n.links)==null?void 0:a.reduce((u,d,h)=>[...u,h>0&&t.createElement("br",{key:h}),t.createElement(bo,{link:d,key:d.url})],[])}))};function Oo(n){const{title:a,children:u}=n,{items:d}=Ca(),[h,A]=(0,t.useState)(!1),[O,w]=(0,t.useState)(null),Y=Io(),H=(0,je.Z)(Pe=>Pe.breakpoints.down("sm")),oe=Pe=>{w(Pe.currentTarget),A(!0)},de=()=>{A(!1)};return t.createElement(t.Fragment,null,t.createElement(cn.Z,{display:"flex",ml:1},H?t.createElement(b.Z,{color:"primary",size:"small",onClick:oe,"data-testid":"support-button"},t.createElement(jr,null)):t.createElement(g.Z,{"data-testid":"support-button",color:"primary",onClick:oe,startIcon:t.createElement(jr,null)},"Support")),t.createElement(Aa.ZP,{"data-testid":"support-button-popover",open:h,anchorEl:O,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},onClose:de},t.createElement(I.Z,{className:Y.popoverList},a&&t.createElement(M.Z,{alignItems:"flex-start"},t.createElement(Te.Z,{variant:"subtitle1"},a)),t.Children.map(u,(Pe,be)=>t.createElement(M.Z,{alignItems:"flex-start",key:`child-${be}`},Pe)),d&&d.map((Pe,be)=>t.createElement(xo,{item:Pe,key:`item-${be}`}))),t.createElement(yo.Z,null,t.createElement(g.Z,{color:"primary",onClick:de},"Close"))))}var ra=e(18671),dn=e(10289);const Gr=72,Ta=24,Pa=18,wt={drawerWidthClosed:Gr,drawerWidthOpen:224,defaultOpenDelayMs:100,defaultCloseDelayMs:0,defaultFadeDuration:200,logoHeight:32,iconContainerWidth:Gr,iconSize:Gr-Ta*2,iconPadding:Ta,selectedIndicatorWidth:3,userBadgePadding:Pa,userBadgeDiameter:Gr-Pa*2,mobileSidebarHeight:56},aa={drawerWidthClosed:0,drawerWidthOpen:202,defaultOpenDelayMs:wt.defaultOpenDelayMs+200},ol="@backstage/core/sidebar-intro-dismissed",Dr=(0,t.createContext)({isOpen:!1,setOpen:()=>{}}),Ia=(0,t.createContext)({isHoveredOn:!1,setIsHoveredOn:()=>{}});var Kr;(function(n){const a="sidebarPinState";n.SIDEBAR_PIN_STATE=a})(Kr||(Kr={}));const La={getSidebarPinState(){let n;try{n=JSON.parse(window.localStorage.getItem(Kr.SIDEBAR_PIN_STATE)||"true")}catch{return!0}return!!n},setSidebarPinState(n){return window.localStorage.setItem(Kr.SIDEBAR_PIN_STATE,JSON.stringify(n))}},Do=(0,i.Z)(n=>({root:{width:"100%",transition:"padding-left 0.1s ease-out",isolation:"isolate",[n.breakpoints.up("sm")]:{paddingLeft:({isPinned:a})=>a?wt.drawerWidthOpen:wt.drawerWidthClosed},[n.breakpoints.down("xs")]:{paddingBottom:wt.mobileSidebarHeight}},content:{zIndex:0,isolation:"isolate","&:focus":{outline:0}}}),{name:"BackstageSidebarPage"}),sr=(0,t.createContext)({isPinned:!0,toggleSidebarPinState:()=>{},isMobile:!1}),ba=(0,t.createContext)({content:{contentRef:void 0}});function Fo(n){const[a,u]=(0,t.useState)(()=>La.getSidebarPinState()),d=(0,t.useRef)(null),h=(0,t.useMemo)(()=>({content:{contentRef:d}}),[d]);(0,t.useEffect)(()=>{La.setSidebarPinState(a)},[a]);const A=(0,je.Z)(Y=>Y.breakpoints.down("xs"),{noSsr:!0}),O=()=>u(!a),w=Do({isPinned:a});return t.createElement(sr.Provider,{value:{isPinned:a,toggleSidebarPinState:O,isMobile:A}},t.createElement(ba.Provider,{value:h},t.createElement("div",{className:w.root},n.children)))}function oa(){const{content:n}=(0,t.useContext)(ba);return{focusContent:(0,t.useCallback)(()=>{var u,d;(d=(u=n==null?void 0:n.contentRef)==null?void 0:u.current)==null||d.focus()},[n]),contentRef:n==null?void 0:n.contentRef}}var Bo=e(50023),Mo=e(4190),Zo=e(87685),No=e(44882),$o=e(57998);const Uo=(0,i.Z)(n=>({root:{flexGrow:0,margin:n.spacing(0,2),color:n.palette.navigation.color},selected:{color:`${n.palette.navigation.selectedColor}!important`,borderTop:`solid ${wt.selectedIndicatorWidth}px ${n.palette.navigation.indicator}`,marginTop:"-1px"},label:{display:"none"}})),wo=n=>{const{to:a,label:u,icon:d,value:h}=n,A=Uo(),O=(0,dn.TH)(),{selectedMenuItemIndex:w,setSelectedMenuItemIndex:Y}=(0,t.useContext)(Da),H=(de,Pe)=>{Y(Pe===w?-1:Pe)},oe=h===w&&w>=0||h!==w&&!(w>=0)&&a===O.pathname;return t.createElement($o.Z,{label:u,icon:d,component:P,to:a||O.pathname,onChange:H,value:h,selected:oe,classes:A})},xa=n=>{const{children:a,to:u,label:d,icon:h,value:A}=n,{isMobile:O}=(0,t.useContext)(sr);return O?t.createElement(wo,{to:u,label:d,icon:h,value:A}):t.createElement(t.Fragment,null,a)},Oa=(0,i.Z)(n=>({root:{position:"fixed",backgroundColor:n.palette.navigation.background,color:n.palette.navigation.color,bottom:0,left:0,right:0,zIndex:n.zIndex.snackbar,borderTop:"1px solid #383838"},overlay:{background:n.palette.navigation.background,width:"100%",bottom:`${wt.mobileSidebarHeight}px`,height:`calc(100% - ${wt.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:{marginBottom:`${wt.mobileSidebarHeight}px`}})),zo=n=>(0,or.orderBy)(n,({props:{priority:a}})=>Number.isInteger(a)?a:-1,"desc"),Wo=t.createElement(xa).type,Ho=({children:n,label:a="Menu",open:u,onClose:d})=>{const h=Oa();return t.createElement(Mo.ZP,{anchor:"bottom",open:u,onClose:d,ModalProps:{BackdropProps:{classes:{root:h.marginMobileSidebar}}},classes:{root:h.marginMobileSidebar,paperAnchorBottom:h.overlay}},t.createElement(cn.Z,{className:h.overlayHeader},t.createElement(Te.Z,{variant:"h3"},a),t.createElement(b.Z,{onClick:d,classes:{root:h.overlayHeaderClose}},t.createElement(Zo.Z,null))),t.createElement(cn.Z,null,n))},Da=(0,t.createContext)({selectedMenuItemIndex:-1,setSelectedMenuItemIndex:()=>{}}),Vo=n=>{const{children:a}=n,u=Oa(),d=(0,dn.TH)(),[h,A]=(0,t.useState)(-1);(0,t.useEffect)(()=>{A(-1)},[d.pathname]);let O=(0,l.useElementFilter)(a,Y=>Y.getElements().filter(H=>H.type===Wo));if(a)O.length?O=zo(O):O.push(t.createElement(xa,{key:"default_menu",icon:t.createElement(No.Z,null)},a));else return null;const w=h>=0&&!O[h].props.to;return t.createElement(Dr.Provider,{value:{isOpen:!0,setOpen:()=>{}}},t.createElement(Da.Provider,{value:{selectedMenuItemIndex:h,setSelectedMenuItemIndex:A}},t.createElement(Ho,{label:O[h]&&O[h].props.label,open:w,onClose:()=>A(-1)},O[h]&&O[h].props.children),t.createElement(Bo.Z,{className:u.root,"data-testid":"mobile-sidebar-root"},O)))},Fa=(0,i.Z)(n=>({drawer:{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:wt.drawerWidthClosed,transition:n.transitions.create("width",{easing:n.transitions.easing.sharp,duration:n.transitions.duration.shortest}),"& > *":{flexShrink:0},"&::-webkit-scrollbar":{display:"none"}},drawerOpen:{width:wt.drawerWidthOpen,transition:n.transitions.create("width",{easing:n.transitions.easing.sharp,duration:n.transitions.duration.shorter})},visuallyHidden:{top:0,position:"absolute",zIndex:1e3,transform:"translateY(-200%)","&:focus":{transform:"translateY(5px)"}}}),{name:"BackstageSidebar"});var an;(function(n){n[n.Closed=0]="Closed";const u=0+1;n[n.Idle=u]="Idle";const d=u+1;n[n.Open=d]="Open"})(an||(an={}));const jo=n=>{const{openDelayMs:a=wt.defaultOpenDelayMs,closeDelayMs:u=wt.defaultCloseDelayMs,disableExpandOnHover:d,children:h}=n,A=Fa(),O=(0,je.Z)(xt=>xt.breakpoints.down("md"),{noSsr:!0}),[w,Y]=(0,t.useState)(an.Closed),H=(0,t.useRef)(),{isPinned:oe,toggleSidebarPinState:de}=(0,t.useContext)(sr),Pe=()=>{oe||d||(H.current&&(clearTimeout(H.current),H.current=void 0),w!==an.Open&&!O&&(H.current=window.setTimeout(()=>{H.current=void 0,Y(an.Open)},a),Y(an.Idle)))},be=()=>{oe||d||(H.current&&(clearTimeout(H.current),H.current=void 0),w===an.Idle?Y(an.Closed):w===an.Open&&(H.current=window.setTimeout(()=>{H.current=void 0,Y(an.Closed)},u)))},Oe=w===an.Open&&!O||oe,ut=xt=>{xt?(Y(an.Open),de()):(Y(an.Closed),de())};return t.createElement("div",{style:{}},t.createElement(Ko,null),t.createElement(Dr.Provider,{value:{isOpen:Oe,setOpen:ut}},t.createElement("div",{className:A.root,"data-testid":"sidebar-root",onMouseEnter:d?()=>{}:Pe,onFocus:d?()=>{}:Pe,onMouseLeave:d?()=>{}:be,onBlur:d?()=>{}:be},t.createElement("div",{className:ie()(A.drawer,{[A.drawerOpen]:Oe})},h))))},Go=n=>{const{children:a,openDelayMs:u,closeDelayMs:d,disableExpandOnHover:h}=n,{isMobile:A}=(0,t.useContext)(sr);return A?t.createElement(Vo,null,a):t.createElement(jo,{openDelayMs:u,closeDelayMs:d,disableExpandOnHover:h},a)};function Ko(){const{focusContent:n,contentRef:a}=oa(),u=Fa();return(a==null?void 0:a.current)?t.createElement(g.Z,{onClick:n,variant:"contained",className:ie()(u.visuallyHidden)},"Skip to content"):null}function Ba(n,a){const u=new URLSearchParams(a.search).toString(),d=Vr().parse(u),h=new URLSearchParams(n.search).toString(),A=Vr().parse(h);return(0,or.isEqual)(a.pathname,n.pathname)&&(0,or.isMatch)(A,d)}const Yo=(0,i.Z)(n=>({item:{height:48,width:"100%","&:hover":{background:"#6f6f6f",color:n.palette.navigation.selectedColor},display:"flex",alignItems:"center",color:n.palette.navigation.color,padding:20,cursor:"pointer",position:"relative",background:"none",border:"none"},itemContainer:{width:"100%"},selected:{background:"#6f6f6f",color:"#FFF"},label:{margin:14,marginLeft:7,fontSize:14},dropdownArrow:{position:"absolute",right:21},dropdown:{display:"flex",flexDirection:"column",alignItems:"end"},dropdownItem:{width:"100%",padding:"10px 0 10px 0"},textContent:{color:n.palette.navigation.color,display:"flex",justifyContent:"center",[n.breakpoints.down("xs")]:{display:"block",paddingLeft:n.spacing(4)},fontSize:"14px"}}),{name:"BackstageSidebarSubmenuItem"}),sl=n=>{const{title:a,to:u,icon:d,dropdownItems:h}=n,A=Yo(),{setIsHoveredOn:O}=useContext(SidebarItemWithSubmenuContext),w=()=>{O(!1)},Y=useResolvedPath(u),H=useLocation();let oe=isLocationMatch(H,Y);const[de,Pe]=useState(!1),be=()=>{Pe(!de)};return h!==void 0?(h.some(Oe=>{const ut=resolvePath(Oe.to);return oe=isLocationMatch(H,ut),oe}),React.createElement("div",{className:A.itemContainer},React.createElement("button",{onClick:be,onTouchStart:Oe=>Oe.stopPropagation(),className:classnames(A.item,oe?A.selected:void 0)},React.createElement(d,{fontSize:"small"}),React.createElement(Typography,{variant:"subtitle1",className:A.label},a),de?React.createElement(ArrowDropUpIcon,{className:A.dropdownArrow}):React.createElement(ArrowDropDownIcon,{className:A.dropdownArrow})),h&&de&&React.createElement("div",{className:A.dropdown},h.map((Oe,ut)=>React.createElement(Link,{to:Oe.to,underline:"none",className:A.dropdownItem,onClick:w,onTouchStart:xt=>xt.stopPropagation(),key:ut},React.createElement(Typography,{className:A.textContent},Oe.title)))))):React.createElement("div",{className:A.itemContainer},React.createElement(Link,{to:u,underline:"none",className:classnames(A.item,oe?A.selected:void 0),onClick:w,onTouchStart:Oe=>Oe.stopPropagation()},React.createElement(d,{fontSize:"small"}),React.createElement(Typography,{variant:"subtitle1",className:A.label},a)))},Jo=n=>(0,i.Z)(a=>{var u,d;return{root:{zIndex:1e3,position:"relative",overflow:"visible",width:a.spacing(7)+1},drawer:{display:"flex",flexFlow:"column nowrap",alignItems:"flex-start",position:"fixed",[a.breakpoints.up("sm")]:{marginLeft:n.left,transition:a.transitions.create("margin-left",{easing:a.transitions.easing.sharp,duration:a.transitions.duration.shortest})},top:0,bottom:0,padding:0,background:(d=(u=a.palette.navigation.submenu)==null?void 0:u.background)!=null?d:"#404040",overflowX:"hidden",msOverflowStyle:"none",scrollbarWidth:"none",cursor:"default",width:aa.drawerWidthClosed,transitionDelay:`${aa.defaultOpenDelayMs}ms`,"& > *":{flexShrink:0},"&::-webkit-scrollbar":{display:"none"}},drawerOpen:{width:aa.drawerWidthOpen,[a.breakpoints.down("xs")]:{width:"100%",position:"relative",paddingLeft:a.spacing(3),left:0,top:0}},title:{fontSize:24,fontWeight:500,color:"#FFF",padding:20,[a.breakpoints.down("xs")]:{display:"none"}}}},{name:"BackstageSidebarSubmenu"}),ko=n=>{const{isOpen:a}=(0,t.useContext)(Dr),u=a?wt.drawerWidthOpen:wt.drawerWidthClosed,d=Jo({left:u})(),{isHoveredOn:h}=(0,t.useContext)(Ia),[A,O]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{O(h)},[h]),t.createElement("div",{className:ie()(d.drawer,{[d.drawerOpen]:A})},t.createElement(Te.Z,{variant:"h5",className:d.title},n.title),n.children)};var Yr=e(76600),Qo=e(26739),Xo=e(98989),qo=e(59797),_o=e(83543);const es=(0,i.Z)({iconContainer:{display:"flex",position:"relative",width:"100%"},arrow1:{right:"6px",position:"absolute"}}),il=()=>{const n=es();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 ll=null;const ts=(0,i.Z)({iconContainer:{display:"flex",position:"relative",width:"100%"},arrow1:{right:"6px",position:"absolute"}}),cl=()=>{const n=ts();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 ul=null;const Jr=(0,i.Z)(n=>{var A,O,w,Y;const{selectedIndicatorWidth:a,drawerWidthClosed:u,drawerWidthOpen:d,iconContainerWidth:h}=wt;return{root:{color:n.palette.navigation.color,display:"flex",flexFlow:"row nowrap",alignItems:"center",height:48,cursor:"pointer"},buttonItem:{background:"none",border:"none",width:"100%",margin:0,padding:0,textAlign:"inherit",font:"inherit"},closed:{width:u,justifyContent:"center"},open:{[n.breakpoints.up("sm")]:{width:d}},highlightable:{"&:hover":{background:(O=(A=n.palette.navigation.navItem)==null?void 0:A.hoverBackground)!=null?O:"#404040"}},highlighted:{background:(Y=(w=n.palette.navigation.navItem)==null?void 0:w.hoverBackground)!=null?Y:"#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:h,marginRight:-n.spacing(2),display:"flex",alignItems:"center",justifyContent:"center"},searchRoot:{marginBottom:12},searchField:{color:"#b5b5b5",fontWeight:"bold",fontSize:n.typography.fontSize},searchFieldHTMLInput:{padding:n.spacing(2,0,2)},searchContainer:{width:d-h},secondaryAction:{width:n.spacing(6),textAlign:"center",marginRight:n.spacing(1)},closedItemIcon:{width:"100%",justifyContent:"center"},submenuArrow:{display:"flex"},expandButton:{background:"none",border:"none",color:n.palette.navigation.color,width:"100%",cursor:"pointer",position:"relative",height:48},arrows:{position:"absolute",right:10},selected:{"&$root":{borderLeft:`solid ${a}px ${n.palette.navigation.indicator}`,color:n.palette.navigation.selectedColor},"&$closed":{width:u},"& $closedItemIcon":{paddingRight:a},"& $iconContainer":{marginLeft:-a}}}},{name:"BackstageSidebarItem"}),ns=(n,a)=>(0,l.useElementFilter)(n.props.children,u=>{let d=!1;return u.getElements().forEach(({props:{to:h,dropdownItems:A}})=>{if(!d){if(A==null?void 0:A.length){A.forEach(({to:O})=>d=d||Ba(a,(0,dn.i3)(O)));return}h&&(d=Ba(a,(0,dn.i3)(h)))}}),d},[a.pathname]);function Ma(n){return n.to===void 0}const rs=t.createElement(ko).type,as=t.forwardRef(function({to:a,end:u,style:d,className:h,activeStyle:A,caseSensitive:O,activeClassName:w="active","aria-current":Y="page",...H},oe){let{pathname:de}=(0,dn.TH)(),{pathname:Pe}=(0,dn.WU)(a);O||(de=de.toLocaleLowerCase("en-US"),Pe=Pe.toLocaleLowerCase("en-US"));let be=de===Pe;!be&&!u&&(be=de.startsWith(`${Pe}/`));const Oe=be?Y:void 0;return t.createElement(R.rU,{...H,to:a,ref:oe,"aria-current":Oe,style:{...d,...be?A:void 0},className:ie()([h,be?w:void 0])})}),Za=(0,t.forwardRef)((n,a)=>{const{icon:u,text:d,hasNotifications:h=!1,disableHighlight:A=!1,onClick:O,children:w,className:Y,...H}=n,oe=Jr(),{isOpen:de}=(0,t.useContext)(Dr),Pe=t.createElement(Qo.Z,{color:"secondary",variant:"dot",overlap:"circular",invisible:!h,className:ie()({[oe.closedItemIcon]:!de})},t.createElement(u,{fontSize:"small"})),be=t.createElement(t.Fragment,null,t.createElement("div",{"data-testid":"login-button",className:oe.iconContainer},Pe),d&&t.createElement(Te.Z,{variant:"subtitle2",className:oe.label},d),t.createElement("div",{className:oe.secondaryAction},w)),Oe=de?be:Pe,ut={onClick:O,className:ie()(Y,oe.root,de?oe.open:oe.closed,Ma(n)&&oe.buttonItem,{[oe.highlightable]:!A})};return Ma(n)?t.createElement("button",{"aria-label":d,...ut,ref:a},Oe):t.createElement(as,{...ut,activeClassName:oe.selected,to:n.to?n.to:"",ref:a,"aria-label":d||n.to,...H},Oe)}),os=({children:n,...a})=>{const u=Jr(),[d,h]=(0,t.useState)(!1),A=(0,dn.TH)(),O=ns(n,A),w=(0,je.Z)(de=>de.breakpoints.down("sm")),Y=()=>{h(!0)},H=()=>{h(!1)},oe=()=>w?d?t.createElement(qo.Z,{fontSize:"small",className:u.submenuArrow}):t.createElement(_o.Z,{fontSize:"small",className:u.submenuArrow}):!d&&t.createElement(Xo.Z,{fontSize:"small",className:u.submenuArrow});return t.createElement(Ia.Provider,{value:{isHoveredOn:d,setIsHoveredOn:h}},t.createElement("div",{"data-testid":"item-with-submenu",onMouseLeave:H,onTouchStart:d?H:Y,onMouseEnter:Y,className:ie()(d&&u.highlighted)},t.createElement(Za,{className:O?u.selected:"",...a},oe()),d&&n))},Na=(0,t.forwardRef)((n,a)=>{const[u]=(0,l.useElementFilter)(n.children,d=>d.getElements().filter(h=>h.type===rs));return u?t.createElement(os,{...n},u):t.createElement(Za,{...n,ref:a})});function dl(n){const[a,u]=useState(""),d=Jr(),h=n.icon?n.icon:SearchIcon,A=()=>{n.onSearch(a),u("")},O=oe=>{oe.key==="Enter"&&(oe.preventDefault(),A())},w=oe=>{u(oe.target.value)},Y=oe=>{oe.preventDefault(),oe.stopPropagation()},H=oe=>{A(),oe.preventDefault()};return React.createElement("div",{className:d.searchRoot},React.createElement(Na,{icon:h,to:n.to,onClick:H,disableHighlight:!0},React.createElement(TextField,{placeholder:"Search",value:a,onClick:Y,onChange:w,onKeyDown:O,className:d.searchContainer,InputProps:{disableUnderline:!0,className:d.searchField},inputProps:{className:d.searchFieldHTMLInput}})))}const fl=(0,Yr.Z)("div")({flex:1},{name:"BackstageSidebarSpace"}),ml=(0,Yr.Z)("div")({height:8},{name:"BackstageSidebarSpacer"}),ss=(0,Yr.Z)("hr")({height:1,width:"100%",background:"#383838",border:"none",margin:"12px 0px"},{name:"BackstageSidebarDivider"}),is=n=>({overflowY:"auto","&::-webkit-scrollbar":{backgroundColor:n.palette.background.default,width:"5px",borderRadius:"5px"},"&::-webkit-scrollbar-thumb":{backgroundColor:n.palette.text.hint,borderRadius:"5px"}}),hl=(0,Yr.Z)("div")(({theme:n})=>{const a=is(n);return{flex:"0 1 auto",overflowX:"hidden",width:"calc(100% - 5px)",minHeight:"48px",overflowY:"hidden","@media (hover: none)":a,"&:hover":a}}),gl=()=>{const n=Jr(),{isOpen:a,setOpen:u}=useContext(SidebarContext);if(useMediaQuery(A=>A.breakpoints.down("md"),{noSsr:!0}))return null;const h=()=>{u(!a)};return React.createElement("button",{onClick:h,className:n.expandButton,"aria-label":"Expand Sidebar","data-testid":"sidebar-expand-button"},React.createElement("div",{className:n.arrows},a?React.createElement(DoubleArrowLeft,null):React.createElement(DoubleArrowRight,null)))},ls=(0,i.Z)(n=>({introCard:{color:"#b5b5b5",fontSize:12,width:wt.drawerWidthOpen,marginTop:18,marginBottom:12,paddingLeft:wt.iconPadding,paddingRight:wt.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 cs(n){const a=ls(),{text:u,onClose:d}=n,h=()=>d();return React.createElement("div",{className:a.introCard},React.createElement(Typography,{variant:"subtitle2"},u),React.createElement("div",{className:a.introDismiss},React.createElement(Link,{component:"button",onClick:h,underline:"none",className:a.introDismissLink},React.createElement(CloseIcon,{className:a.introDismissIcon}),React.createElement(Typography,{component:"span",className:a.introDismissText},"Dismiss"))))}const $a=n=>{const{text:a,onDismiss:u}=n,[d,h]=useState(!1),A=()=>{h(!0)};return React.createElement(Collapse,{in:!d,onExited:u},React.createElement(cs,{text:a,onClose:A}))},us=null,ds="And your recently viewed plugins will pop up here!";function pl(n){const{isOpen:a}=useContext(SidebarContext),u={starredItemsDismissed:!1,recentlyViewedItemsDismissed:!1},[d,h]=useLocalStorageValue(SIDEBAR_INTRO_LOCAL_STORAGE),{starredItemsDismissed:A,recentlyViewedItemsDismissed:O}=d!=null?d:{},w=()=>{h(H=>({...u,...H,starredItemsDismissed:!0}))},Y=()=>{h(H=>({...u,...H,recentlyViewedItemsDismissed:!0}))};return a?React.createElement(React.Fragment,null,!A&&React.createElement(React.Fragment,null,React.createElement($a,{text:us,onDismiss:w}),React.createElement(SidebarDivider,null)),!O&&React.createElement($a,{text:ds,onDismiss:Y})):null}const fs=(0,i.Z)(n=>({root:{gridArea:"pageContent",minWidth:0,paddingTop:n.spacing(3),paddingBottom:n.spacing(3),paddingLeft:n.spacing(2),paddingRight:n.spacing(2),[n.breakpoints.up("sm")]:{paddingLeft:n.spacing(3),paddingRight:n.spacing(3)}},stretch:{display:"flex",flexDirection:"column",flexGrow:1},noPadding:{padding:0}}),{name:"BackstageContent"});function Ua(n){const{className:a,stretch:u,noPadding:d,children:h,...A}=n,{contentRef:O}=oa(),w=fs();return t.createElement("article",{ref:O,tabIndex:-1,...A,className:ie()(w.root,a,{[w.stretch]:u,[w.noPadding]:d})},h)}var ms=e(6487),hs=e(99152);const gs=(0,i.Z)(n=>({tabsWrapper:{gridArea:"pageSubheader",backgroundColor:n.palette.background.paper,paddingLeft:n.spacing(3)},defaultTab:{padding:n.spacing(3,3),...n.typography.caption,textTransform:"uppercase",fontWeight:"bold",color:n.palette.text.secondary},selected:{color:n.palette.text.primary},tabRoot:{"&:hover":{backgroundColor:n.palette.background.default,color:n.palette.text.primary}}}),{name:"BackstageHeaderTabs"});function wa(n){const{tabs:a,onChange:u,selectedIndex:d}=n,[h,A]=(0,t.useState)(d!=null?d:0),O=gs(),w=(Y,H)=>{d===void 0&&A(H),u&&u(H)};return(0,t.useEffect)(()=>{d!==void 0&&A(d)},[d]),t.createElement("div",{className:O.tabsWrapper},t.createElement(hs.Z,{selectionFollowsFocus:!0,indicatorColor:"primary",textColor:"inherit",variant:"scrollable",scrollButtons:"auto","aria-label":"scrollable auto tabs example",onChange:w,value:h},a.map((Y,H)=>t.createElement(ms.Z,{...Y.tabProps,"data-testid":`header-tab-${H}`,label:Y.label,key:Y.id,value:H,className:O.defaultTab,classes:{selected:O.selected,root:O.tabRoot}}))))}function ps(n){var w,Y,H;const a=(0,dn.UO)(),d=n.map(({path:oe,children:de})=>({caseSensitive:!1,path:`${oe}/*`,element:de})).sort((oe,de)=>de.path.replace(/\/\*$/,"").localeCompare(oe.path.replace(/\/\*$/,""))),h=(w=(0,dn.V$)(d))!=null?w:n[0].children,[A]=(Y=(0,dn.fp)(d,`/${a["*"]}`))!=null?Y:[],O=A?n.findIndex(oe=>`${oe.path}/*`===A.route.path):0;return{index:O===-1?0:O,element:h,route:(H=n[O])!=null?H:n[0]}}function za(n){const{routes:a}=n,u=(0,dn.s0)(),{index:d,route:h,element:A}=ps(a),O=(0,t.useMemo)(()=>a.map(Y=>({id:Y.path,label:Y.title,tabProps:Y.tabProps})),[a]),w=Y=>u(a[Y].path.replace(/\/\*$/,"").replace(/^\//,""));return t.createElement(t.Fragment,null,t.createElement(wa,{tabs:O,selectedIndex:d,onChange:w}),t.createElement(Ua,null,t.createElement(ra.q,{title:h.title}),A))}const sa=()=>null;(0,l.attachComponentData)(sa,"core.gatherMountPoints",!0);function Wa(n){const a=t.createElement(sa,{path:"",title:""},t.createElement("div",null)).type;return t.Children.toArray(n).flatMap(u=>{if(!(0,t.isValidElement)(u))return[];if(u.type===t.Fragment)return Wa(u.props.children);if(u.type!==a)throw new Error("Child of TabbedLayout must be an TabbedLayout.Route");const{path:d,title:h,children:A,tabProps:O}=u.props;return[{path:d,title:h,children:A,tabProps:O}]})}function ys(n){const a=Wa(n.children);return t.createElement(za,{routes:a})}ys.Route=sa;const Es=(0,i.Z)(n=>({value:{marginBottom:"6px"},subvalue:{color:n.palette.textSubtle,fontWeight:"normal"}}),{name:"BackstageSubvalueCell"});function vs(n){const{value:a,subvalue:u}=n,d=Es();return t.createElement(t.Fragment,null,t.createElement("div",{className:d.value},a),t.createElement("div",{className:d.subvalue},u))}var As=e(21070),Rs=e(90324),Ss=e(98281),Cs=e(48049),Ha=e(51209),Va=e(33375),Ts=e(44233),Ps=e(27604),ia=e(36444),Is=e(37971),Ls=e(59709),bs=e(17373),xs=e(3702),Os=e(93111),kr=e(67222);const Ds=(0,i.Z)(n=>({root:{height:"100%",width:"315px",display:"flex",flexDirection:"column",marginRight:n.spacing(3)},value:{fontWeight:"bold",fontSize:18},header:{display:"flex",alignItems:"center",height:"60px",justifyContent:"space-between",borderBottom:`1px solid ${n.palette.grey[500]}`},filters:{display:"flex",flexDirection:"column","& > *":{marginTop:n.spacing(2)}}}),{name:"BackstageTableFilters"}),Fs=n=>{var Y;const a=Ds(),{onChangeFilters:u}=n,[d,h]=(0,t.useState)({...n.selectedFilters}),[A,O]=(0,t.useState)(!1),w=()=>{h({}),O(H=>!H)};return(0,t.useEffect)(()=>{u(d)},[d,u]),t.createElement("div",{className:a.root},t.createElement("div",{className:a.header},t.createElement("div",{className:a.value},"Filters"),t.createElement(g.Z,{color:"primary",onClick:w},"Clear all")),t.createElement("div",{className:a.filters},((Y=n.filters)==null?void 0:Y.length)&&n.filters.map(H=>t.createElement(_e,{triggerReset:A,key:H.element.label,...H.element,selected:d[H.element.label],onChange:oe=>h({...d,[H.element.label]:oe})}))))},Bs={Add:(0,t.forwardRef)((n,a)=>t.createElement(As.Z,{...n,ref:a})),Check:(0,t.forwardRef)((n,a)=>t.createElement(Ss.Z,{...n,ref:a})),Clear:(0,t.forwardRef)((n,a)=>t.createElement(Va.Z,{...n,ref:a})),Delete:(0,t.forwardRef)((n,a)=>t.createElement(Ts.Z,{...n,ref:a})),DetailPanel:(0,t.forwardRef)((n,a)=>t.createElement(Ha.Z,{...n,ref:a})),Edit:(0,t.forwardRef)((n,a)=>t.createElement(Ps.Z,{...n,ref:a})),Export:(0,t.forwardRef)((n,a)=>t.createElement(xs.Z,{...n,ref:a})),Filter:(0,t.forwardRef)((n,a)=>t.createElement(ia.Z,{...n,ref:a})),FirstPage:(0,t.forwardRef)((n,a)=>t.createElement(Is.Z,{...n,ref:a})),LastPage:(0,t.forwardRef)((n,a)=>t.createElement(Ls.Z,{...n,ref:a})),NextPage:(0,t.forwardRef)((n,a)=>t.createElement(Ha.Z,{...n,ref:a})),PreviousPage:(0,t.forwardRef)((n,a)=>t.createElement(Cs.Z,{...n,ref:a})),ResetSearch:(0,t.forwardRef)((n,a)=>t.createElement(Va.Z,{...n,ref:a})),Search:(0,t.forwardRef)((n,a)=>t.createElement(ia.Z,{...n,ref:a})),SortArrow:(0,t.forwardRef)((n,a)=>t.createElement(Rs.Z,{...n,ref:a})),ThirdStateCheck:(0,t.forwardRef)((n,a)=>t.createElement(bs.Z,{...n,ref:a})),ViewColumn:(0,t.forwardRef)((n,a)=>t.createElement(Os.Z,{...n,ref:a}))};function ja(n,a){const u=a.split(".");let d=n[u[0]];for(let h=1;h<u.length;++h){if(d===void 0)return d;const A=u[h];d=d[A]}return d}const Ms=(0,Gt.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"})(kr.W$),Ga=(0,Gt.Z)(n=>({root:{padding:n.spacing(3,0,2.5,2.5)},title:{"& > h6":{fontWeight:"bold"}},searchField:{paddingRight:n.spacing(2)}}),{name:"BackstageTableToolbar"})(kr.UW),Zs=(0,i.Z)(()=>({root:{display:"flex",alignItems:"center",justifyContent:"space-between"},title:{fontWeight:"bold",fontSize:18,whiteSpace:"nowrap"}}),{name:"BackstageTableFiltersContainer"}),Ns=(0,i.Z)(()=>({root:{display:"flex",alignItems:"start"}}),{name:"BackstageTable"});function $s(n,a){return n.map(u=>{const d={};let h=u.cellStyle||{};if(u.highlight)if(d.color=a.palette.textContrast,typeof h=="object")h.fontWeight=a.typography.fontWeightBold;else{const A=h;h=(O,w,Y)=>({...A(O,w,Y),fontWeight:a.typography.fontWeightBold})}return{...u,headerStyle:d,cellStyle:h}})}function Us(n,a){return(0,or.transform)(n,(u,d,h)=>{(0,or.isEqual)(d,a[h])||(u[h]=d)})}const Ka={search:"",filtersOpen:!1,filters:{}};function ws(n){const{toolbarRef:a,setSearch:u,hasFilters:d,selectedFiltersLength:h,toggleFilters:A}=n,O=Zs(),w=(0,t.useCallback)(Y=>{n.onSearchChanged(Y),u(Y)},[n,u]);return d?t.createElement("div",{className:O.root},t.createElement("div",{className:O.root},t.createElement(b.Z,{onClick:A,"aria-label":"filter list"},t.createElement(ia.Z,null)),t.createElement(Te.Z,{className:O.title},"Filters (",h,")")),t.createElement(Ga,{...n,ref:a,onSearchChanged:w})):t.createElement(Ga,{...n,ref:a,onSearchChanged:w})}function zs(n){const{data:a,columns:u,options:d,title:h,subtitle:A,filters:O,initialState:w,emptyContent:Y,onStateChange:H,...oe}=n,de=Ns(),Pe=(0,T.Z)(),be={...Ka,...w},[Oe,ut]=(0,t.useState)(be.filtersOpen),xt=(0,t.useCallback)(()=>ut(en=>!en),[ut]),[Jt,zt]=(0,t.useState)(0),[it,Pt]=(0,t.useState)(a),[Ot,kt]=(0,t.useState)(be.filters),Dn=$s(u,Pe),[fn,Br]=(0,t.useState)(be.search);(0,t.useEffect)(()=>{if(H){const en=Us({search:fn,filtersOpen:Oe,filters:Ot},Ka);H(en)}},[fn,Oe,Ot,H]);const Tt={headerStyle:{textTransform:"uppercase"}},Fn=(0,t.useCallback)(en=>{var on;return(on=u.find(mn=>mn.title===en))==null?void 0:on.field},[u]);(0,t.useEffect)(()=>{if(typeof a=="function")return;if(!Ot){Pt(a);return}const en=Object.values(Ot);if(a&&en.flat().length){const on=a.filter(mn=>!!Object.entries(Ot).filter(([,Vn])=>!!Vn.length).every(([Vn,Ht])=>{const Vt=ja(mn,Fn(Vn));return Array.isArray(Vt)&&Array.isArray(Ht)?Vt.some(ir=>Ht.includes(ir)):Array.isArray(Vt)?Vt.includes(Ht):Array.isArray(Ht)?Ht.includes(Vt):Vt===Ht}));Pt(on)}else Pt(a);zt(en.flat().length)},[a,Ot,Fn]);const fa=(en,on)=>{const mn=Ht=>{const Vt=new Set,ir=jn=>{jn!=null&&Vt.add(jn)};return on&&on.forEach(jn=>{const lr=ja(jn,Fn(Ht));Array.isArray(lr)?lr.forEach(ir):ir(lr)}),Vt},Vn=Ht=>({placeholder:"All results",label:Ht.column,multiple:Ht.type==="multiple-select",items:[...mn(Ht.column)].sort().map(Vt=>({label:Vt,value:Vt}))});return en.map(Ht=>({type:Ht.type,element:Vn(Ht)}))},Hn=!!(O==null?void 0:O.length),ma=(0,t.useCallback)(en=>t.createElement(ws,{setSearch:Br,hasFilters:Hn,selectedFiltersLength:Jt,toggleFilters:xt,...en}),[xt,Hn,Jt,Br]),Xr=typeof a!="function"&&a.length===0,qr=u.length,ha=(0,t.useCallback)(en=>Y&&Xr?t.createElement("tbody",null,t.createElement("tr",null,t.createElement("td",{colSpan:qr},Y))):t.createElement(kr.os,{...en}),[Xr,Y,qr]);return t.createElement("div",{className:de.root},Oe&&a&&typeof a!="function"&&(O==null?void 0:O.length)&&t.createElement(Fs,{filters:fa(O,a),selectedFilters:Ot,onChangeFilters:kt}),t.createElement(kr.ZP,{components:{Header:Ms,Toolbar:ma,Body:ha},options:{...Tt,...d},columns:Dn,icons:Bs,title:t.createElement(t.Fragment,null,t.createElement(Te.Z,{variant:"h5",component:"h3"},h),A&&t.createElement(Te.Z,{color:"textSecondary",variant:"body1"},A)),data:typeof a=="function"?a:it,style:{width:"100%"},localization:{toolbar:{searchPlaceholder:"Filter"}},...oe}))}const yl=n=>{const{children:a,value:u,index:d,...h}=n;return React.createElement("div",{role:"tabpanel",hidden:u!==d,"aria-labelledby":`scrollable-auto-tab-${d}`,...h},u===d&&React.createElement(Box,{p:3},a))},Ws=(0,i.Z)(()=>({root:{color:"#6E6E6E",overflow:"visible",fontSize:"1.5rem",textAlign:"center",borderRadius:"50%",backgroundColor:"#E6E6E6",marginLeft:n=>n.isNext?"auto":"0",marginRight:n=>n.isNext?"0":"10px","&:hover":{backgroundColor:"#E6E6E6",opacity:"1"}}}),{name:"BackstageTabIcon"}),El=n=>{const a=Ws(n),{ariaLabel:u,onClick:d}=n;return React.createElement(IconButton,{onClick:d,className:a.root,size:"small",disableRipple:!0,disableFocusRipple:!0,"aria-label":u},n.children)},Hs=(n,a)=>a?n?"20px":"0":"40px",Vs=(0,i.Z)(n=>({root:{textTransform:"none",height:"64px",fontWeight:n.typography.fontWeightBold,fontSize:n.typography.pxToRem(13),color:n.palette.textSubtle,marginLeft:a=>Hs(a.isFirstNav,a.isFirstIndex),width:"130px",minWidth:"130px","&:hover":{outline:"none",backgroundColor:"transparent",color:n.palette.textSubtle}}})),vl=n=>{const a=Vs(n),{isFirstNav:u,isFirstIndex:d,...h}=n;return React.createElement(Tab,{className:a.root,disableRipple:!0,...h})},js=(0,i.Z)(n=>({indicator:{display:"flex",justifyContent:"center",backgroundColor:n.palette.tabbar.indicator,height:"4px"},flexContainer:{alignItems:"center"},root:{"&:last-child":{marginLeft:"auto"}}}),{name:"BackstageTabBar"}),Al=n=>{const a=js(n);return React.createElement(Tabs,{classes:a,...n,TabIndicatorProps:{children:React.createElement("span",null)}})},Gs=(0,i.Z)(n=>({root:{flexGrow:1,width:"100%"},styledTabs:{backgroundColor:n.palette.background.paper},appbar:{boxShadow:"none",backgroundColor:n.palette.background.paper,paddingLeft:"10px",paddingRight:"10px"}}),{name:"BackstageTabs"});function Rl(n){const{tabs:a}=n,u=Gs(),[d,h]=useState([0,0]),[A,O]=useState(0),[w,Y]=useState(0),[H,oe]=useState([[]]),de=useRef(),{width:Pe}=useWindowSize(),be=(zt,it)=>{h([A,it])},Oe=()=>{O(A-1)},ut=()=>{O(A+1)},xt=()=>A+1<H.length;useEffect(()=>{const it=A===0?1:2,Pt=de.current.offsetWidth-20-it*30,Ot=d[0]*w+d[1],kt=Math.floor(Pt/170);Y(kt),oe(chunkArray(a,kt)),h([Math.floor(Ot/kt),Ot%kt])},[Pe,a]);const Jt=A===d[0]?d[1]:!1;return React.createElement("div",{className:u.root},React.createElement(AppBar,{ref:de,className:u.appbar,position:"static"},React.createElement("div",null,React.createElement(StyledTabs,{value:Jt,onChange:be,selectionFollowsFocus:!0},A!==0&&React.createElement(StyledIcon,{onClick:Oe,ariaLabel:"navigate-before"},React.createElement(NavigateBeforeIcon,null)),H[A].map((zt,it)=>React.createElement(StyledTab,{value:it,isFirstIndex:it===0,isFirstNav:A===0,key:it,icon:zt.icon||void 0,label:zt.label||void 0})),xt()&&React.createElement(StyledIcon,{isNext:!0,onClick:ut,ariaLabel:"navigate-next"},React.createElement(NavigateNextIcon,null))))),Jt!==!1?H[A].map((zt,it)=>React.createElement(TabPanel,{key:it,value:it,index:Jt},zt.content)):React.createElement(TabPanel,{key:"panel_outside_chunked_array",value:d[1],index:d[1]},H[d[0]][d[1]].content))}var Sl=e(44311);function Ks(n,a){const u=n[n.length-1];if(!!u)return u>=.9?a.palette.status.ok:u>=.5?a.palette.status.warning:a.palette.status.error}function Cl(n){var u;const a=useTheme();return n.data?React.createElement(Sparklines,{width:120,height:30,min:0,max:1,...n},n.title&&React.createElement("title",null,n.title),React.createElement(SparklinesLine,{color:(u=n.color)!=null?u:Ks(n.data,a)})):null}const Ys=n=>(0,i.Z)(a=>({container:{width:"100%",display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-end",alignItems:"center",marginBottom:a.spacing(2),textAlign:n.textAlign},leftItemsBox:{flex:"1 1 auto",minWidth:0,overflow:"visible"},rightItemsBox:{flex:"0 1 auto",display:"flex",flexDirection:"row",flexWrap:"wrap",alignItems:"center",marginLeft:a.spacing(1),minWidth:0,overflow:"visible"},description:{},title:{display:"inline-flex",marginBottom:0}}),{name:"BackstageContentHeader"}),Js=({title:n="Unknown page",className:a})=>t.createElement(Te.Z,{variant:"h4",component:"h2",className:a,"data-testid":"header-title"},n);function ks(n){const{description:a,title:u,titleComponent:d=void 0,children:h,textAlign:A="left"}=n,O=Ys({textAlign:A})(),w=d||t.createElement(Js,{title:u,className:O.title});return t.createElement(t.Fragment,null,t.createElement(ra.q,{title:u}),t.createElement("div",{className:O.container},t.createElement("div",{className:O.leftItemsBox},w,a&&t.createElement(Te.Z,{className:O.description,variant:"body2"},a)),t.createElement("div",{className:O.rightItemsBox},h)))}var Qs=e(29788);const Xs=(0,i.Z)(n=>({micDrop:{maxWidth:"60%",position:"absolute",bottom:n.spacing(2),right:n.spacing(2),[n.breakpoints.down("xs")]:{maxWidth:"96%",position:"relative",bottom:"unset",right:"unset",margin:`${n.spacing(10)}px auto ${n.spacing(4)}px`}}}),{name:"BackstageErrorPageMicDrop"}),_s=()=>{const n=Xs();return t.createElement("img",{src:Qs,className:n.micDrop,alt:"Girl dropping mic from her hands"})},ei=(0,i.Z)(n=>({container:{padding:n.spacing(8),[n.breakpoints.down("xs")]:{padding:n.spacing(2)}},title:{paddingBottom:n.spacing(5),[n.breakpoints.down("xs")]:{paddingBottom:n.spacing(4),fontSize:32}},subtitle:{color:n.palette.textSubtle}}),{name:"BackstageErrorPage"});function ti(n){const{status:a,statusMessage:u,additionalInfo:d,supportUrl:h}=n,A=ei(),O=(0,dn.s0)(),w=Ca();return t.createElement(pe.Z,{container:!0,spacing:0,className:A.container},t.createElement(_s,null),t.createElement(pe.Z,{item:!0,xs:12,sm:8,md:4},t.createElement(Te.Z,{"data-testid":"error",variant:"body1",className:A.subtitle},"ERROR ",a,": ",u),t.createElement(Te.Z,{variant:"body1",className:A.subtitle},d),t.createElement(Te.Z,{variant:"h2",className:A.title},"Looks like someone dropped the mic!"),t.createElement(Te.Z,{variant:"h6"},t.createElement(P,{to:"#","data-testid":"go-back-link",onClick:()=>O(-1)},"Go back"),"... or please"," ",t.createElement(P,{to:h||w.url},"contact support")," if you think this is a bug.")))}var ni=e(16173);const ri=(0,Gt.Z)({root:{textDecoration:"underline",cursor:"pointer"}},{name:"BackstageBreadcrumbsClickableText"})(Te.Z),la=(0,Gt.Z)({root:{textDecoration:"underline",color:"inherit"}},{name:"BackstageBreadcrumbsStyledBox"})(cn.Z);function ai(n){const{children:a,...u}=n,[d,h]=t.useState(null),A=t.Children.toArray(a),[O,w,...Y]=A,H=Y.length?Y.pop():A[A.length-1],oe=A.length>3,de=Oe=>{h(Oe.currentTarget)},Pe=()=>{h(null)},be=Boolean(d);return t.createElement(t.Fragment,null,t.createElement(ni.Z,{"aria-label":"breadcrumb",...u},A.length>1&&t.createElement(la,{clone:!0},O),A.length>2&&t.createElement(la,{clone:!0},w),oe&&t.createElement(ri,{onClick:de},"..."),t.createElement(cn.Z,{style:{fontStyle:"italic"}},H)),t.createElement(Aa.ZP,{open:be,anchorEl:d,onClose:Pe,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}},t.createElement(I.Z,null,Y.map((Oe,ut)=>t.createElement(M.Z,{key:ut,button:!0},t.createElement(la,{clone:!0},Oe))))))}const oi=(0,i.Z)(n=>({header:{gridArea:"pageHeader",padding:n.spacing(3),width:"100%",boxShadow:n.shadows[4],position:"relative",zIndex:100,display:"flex",flexDirection:"row",alignItems:"center",backgroundImage:n.page.backgroundImage,backgroundPosition:"center",backgroundSize:"cover",[n.breakpoints.down("sm")]:{flexWrap:"wrap"}},leftItemsBox:{maxWidth:"100%",flexGrow:1},rightItemsBox:{width:"auto"},title:{color:n.palette.bursts.fontColor,wordBreak:"break-word",fontSize:n.typography.h3.fontSize,marginBottom:0},subtitle:{color:n.palette.bursts.fontColor,opacity:.8,display:"inline-block",marginTop:n.spacing(1),maxWidth:"75ch"},type:{textTransform:"uppercase",fontSize:11,opacity:.8,marginBottom:n.spacing(1),color:n.palette.bursts.fontColor},breadcrumb:{color:n.palette.bursts.fontColor},breadcrumbType:{fontSize:"inherit",opacity:.7,marginRight:-n.spacing(.3),marginBottom:n.spacing(.3)},breadcrumbTitle:{fontSize:"inherit",marginLeft:-n.spacing(.3),marginBottom:n.spacing(.3)}}),{name:"BackstageHeader"}),si=({type:n,typeLink:a,classes:u,pageTitle:d})=>n?a?t.createElement(ai,{className:u.breadcrumb},t.createElement(P,{to:a},n),t.createElement(Te.Z,null,d)):t.createElement(Te.Z,{className:u.type},n):null,ii=({pageTitle:n,classes:a,tooltip:u})=>{const d=t.createElement(Te.Z,{className:a.title,variant:"h1"},n);return u?t.createElement(B.ZP,{title:u,placement:"top-start"},d):d},li=({classes:n,subtitle:a})=>a?typeof a!="string"?t.createElement(t.Fragment,null,a):t.createElement(Te.Z,{className:n.subtitle,variant:"subtitle2",component:"span"},a):null;function Ya(n){const{children:a,pageTitleOverride:u,style:d,subtitle:h,title:A,tooltip:O,type:w,typeLink:Y}=n,H=oi(),de=(0,l.useApi)(l.configApiRef).getOptionalString("app.title")||"Backstage",Pe=u||A,be=A||u,Oe=`${Pe} | %s | ${de}`,ut=`${Pe} | ${de}`;return t.createElement(t.Fragment,null,t.createElement(ra.q,{titleTemplate:Oe,defaultTitle:ut}),t.createElement("header",{style:d,className:H.header},t.createElement(cn.Z,{className:H.leftItemsBox},t.createElement(si,{classes:H,type:w,typeLink:Y,pageTitle:be}),t.createElement(ii,{classes:H,pageTitle:be,tooltip:O}),t.createElement(li,{classes:H,subtitle:h})),t.createElement(pe.Z,{container:!0,className:H.rightItemsBox,spacing:4},a)))}const ci=(0,i.Z)(n=>({root:{textAlign:"left"},label:{color:n.palette.common.white,fontWeight:"bold",letterSpacing:0,fontSize:n.typography.fontSize,marginBottom:n.spacing(1)/2,lineHeight:1},value:{color:"rgba(255, 255, 255, 0.8)",fontSize:n.typography.fontSize,lineHeight:1}}),{name:"BackstageHeaderLabel"}),ui=({value:n,className:a})=>t.createElement(Te.Z,{className:a},n);function di(n){const{label:a,value:u,url:d}=n,h=ci(),A=t.createElement(ui,{className:h.value,value:u||"<Unknown>"});return t.createElement(pe.Z,{item:!0},t.createElement("span",{className:h.root},t.createElement(Te.Z,{className:h.label},a),d?t.createElement(P,{to:d},A):A))}const fi={hour:"2-digit",minute:"2-digit"};function Ja(n){const a=new Date,u=window.navigator.language,d=[];if(!n.has("homepage.clocks"))return d;const h=n.getConfigArray("homepage.clocks");for(const A of h)if(A.has("label")&&A.has("timezone")){let O=A.getString("label");const w={timeZone:A.getString("timezone"),...fi};try{new Date().toLocaleString(u,w)}catch{console.warn(`The timezone ${w.timeZone} is invalid. Defaulting to GMT`),w.timeZone="GMT",O="GMT"}const Y=a.toLocaleTimeString(u,w);d.push({time:Y,label:O})}return d}function Tl(n){const a=useApi(configApiRef),u=[],[d,h]=React.useState(u);return React.useEffect(()=>{h(Ja(a));const A=setInterval(()=>{h(Ja(a))},1e3);return()=>{clearInterval(A)}},[a]),d.length!==0?React.createElement(React.Fragment,null,d.map(A=>React.createElement(HeaderLabel,{label:A.label,value:A.time,key:A.label}))):null}const mi=n=>(0,o.Z)({root:{color:n.palette.common.white,padding:n.spacing(2,2,3),backgroundImage:n.palette.bursts.gradient.linear,backgroundPosition:0,backgroundSize:"inherit"}}),hi=(0,i.Z)(mi,{name:"BackstageItemCardHeader"});function gi(n){const{title:a,subtitle:u,children:d}=n,h=hi(n);return t.createElement("div",{className:h.root},u&&t.createElement(Te.Z,{variant:"subtitle2",component:"h3"},u),a&&t.createElement(Te.Z,{variant:"h6",component:"h4"},a),d)}function Pl(n){const{description:a,tags:u,title:d,type:h,subtitle:A,label:O,onClick:w,href:Y}=n;return React.createElement(Card,null,React.createElement(CardMedia,null,React.createElement(ItemCardHeader,{title:d,subtitle:A||h})),React.createElement(CardContent,null,(u==null?void 0:u.length)?React.createElement(Box,null,u.map((H,oe)=>React.createElement(Chip,{size:"small",label:H,key:oe}))):null,a),React.createElement(CardActions,null,!Y&&React.createElement(Button,{to:"#",onClick:w,color:"primary"},O),Y&&React.createElement(Button,{to:Y,color:"primary"},O)))}const pi=n=>(0,o.Z)({root:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(22em, 1fr))",gridAutoRows:"1fr",gridGap:n.spacing(2)}}),yi=(0,i.Z)(pi,{name:"BackstageItemCardGrid"});function Ei(n){const{children:a,...u}=n,d=yi(u);return t.createElement("div",{className:d.root,...u},a)}var vi=e(41547);const Ai=(0,i.Z)(()=>({root:({isMobile:n})=>({display:"grid",gridTemplateAreas:"'pageHeader pageHeader pageHeader' 'pageSubheader pageSubheader pageSubheader' 'pageNav pageContent pageSidebar'",gridTemplateRows:"max-content auto 1fr",gridTemplateColumns:"auto 1fr auto",height:n?"100%":"100vh",overflowY:"auto"})}),{name:"BackstagePage"});function ka(n){const{themeId:a,children:u}=n,{isMobile:d}=(0,t.useContext)(sr),h=Ai({isMobile:d});return t.createElement(vi.Z,{theme:A=>({...A,page:A.getPageTheme({themeId:a})})},t.createElement("div",{className:h.root},u))}function Ri(n){const{themeId:a,children:u,...d}=n;return t.createElement(ka,{themeId:a},t.createElement(Ya,{...d}),u)}var nn=e(30195);const Il=nn.z.object({providerInfo:nn.z.object({}).catchall(nn.z.unknown()).optional(),profile:nn.z.object({email:nn.z.string().optional(),displayName:nn.z.string().optional(),picture:nn.z.string().optional()}),backstageIdentity:nn.z.object({token:nn.z.string(),identity:nn.z.object({type:nn.z.literal("user"),userEntityRef:nn.z.string(),ownershipEntityRefs:nn.z.array(nn.z.string())})})}),Qa={defaultTokenExpiryMillis:5*60*1e3,tokenExpiryMarginMillis:5*60*1e3};function Si(n){const a=new Date(Date.now()+Qa.defaultTokenExpiryMillis);if(!n)return a;const[u,d,h]=n.split("."),A=JSON.parse(atob(d));return typeof A.exp!="number"?a:new Date(A.exp*1e3-Qa.tokenExpiryMarginMillis)}class Ll{constructor(a){ne(this,"options");ne(this,"abortController");ne(this,"state");this.options=a,this.abortController=new AbortController,this.state={type:"empty"}}async start(){await this.getSessionAsync()}getUserId(){const{backstageIdentity:a}=this.getSessionSync(),u=a.identity.userEntityRef,d=/^([^:/]+:)?([^:/]+\/)?([^:/]+)$/.exec(u);if(!d)throw new TypeError(`Invalid user entity reference "${u}"`);return d[3]}async getIdToken(){return(await this.getSessionAsync()).backstageIdentity.token}getProfile(){return this.getSessionSync().profile}async getProfileInfo(){return(await this.getSessionAsync()).profile}async getBackstageIdentity(){return(await this.getSessionAsync()).backstageIdentity.identity}async getCredentials(){return{token:(await this.getSessionAsync()).backstageIdentity.token}}async signOut(){this.abortController.abort()}getSessionSync(){if(this.state.type==="active")return this.state.session;if(this.state.type==="fetching"&&this.state.previous)return this.state.previous;throw new Error("No session available. Try reloading your browser page.")}async getSessionAsync(){if(this.state.type==="fetching")return this.state.promise;if(this.state.type==="active"&&new Date<this.state.expiresAt)return this.state.session;const a=this.state.type==="active"?this.state.session:void 0,u=this.fetchSession().then(d=>(this.state={type:"active",session:d,expiresAt:Si(d.backstageIdentity.token)},d),d=>{throw this.state={type:"failed",error:d},d});return this.state={type:"fetching",promise:u,previous:a},u}async fetchSession(){const a=await this.options.discoveryApi.getBaseUrl("auth"),u=await fetch(`${a}/${this.options.provider}/refresh`,{signal:this.abortController.signal,headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"});if(!u.ok)throw await ResponseError.fromResponse(u);return proxiedSessionSchema.parse(await u.json())}}const bl=n=>{const a=useApi(discoveryApiRef),[{status:u,error:d},{execute:h}]=useAsync(async()=>{const A=new ProxiedSignInIdentity({provider:n.provider,discoveryApi:a});await A.start(),n.onSignInSuccess(A)});return useMountEffect(h),u==="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},Ci=(0,i.Z)({container:{padding:0,listStyle:"none"},item:{display:"flex",flexDirection:"column",width:"100%",maxWidth:"400px",margin:0,padding:0}},{name:"BackstageSignInPage"}),ca=({children:n})=>{const a=Ci();return t.createElement(pe.Z,{component:"li",item:!0,classes:a},n)};class ua{getUserId(){return"guest"}async getIdToken(){}getProfile(){return{email:"guest@example.com",displayName:"Guest"}}async getProfileInfo(){return{email:"guest@example.com",displayName:"Guest"}}async getBackstageIdentity(){const a="user:default/guest";return{type:"user",userEntityRef:a,ownershipEntityRefs:[a]}}async getCredentials(){return{}}async signOut(){}}function Ti(n){const[a,u,d]=n.split(".");return JSON.parse(atob(u))}class da{constructor(a){this.result=a}getUserId(){return this.result.userId}static fromResult(a){return new da(a)}async getIdToken(){var a,u;return(u=(a=this.result).getIdToken)==null?void 0:u.call(a)}getProfile(){return this.result.profile}async getProfileInfo(){return this.result.profile}async getBackstageIdentity(){const a=await this.getIdToken();if(!a){const h=`user:default/${this.getUserId()}`;return{type:"user",userEntityRef:h,ownershipEntityRefs:[h]}}const{sub:u,ent:d}=Ti(a);return{type:"user",userEntityRef:u,ownershipEntityRefs:d!=null?d:[]}}async getCredentials(){var u,d;return{token:await((d=(u=this.result).getIdToken)==null?void 0:d.call(u))}}async signOut(){var a,u;return(u=(a=this.result).signOut)==null?void 0:u.call(a)}}class Fr{constructor(a,u,d){ne(this,"profilePromise");this.identity=a,this.authApi=u,this.profile=d}static createGuest(){return new ua}static fromLegacy(a){return da.fromResult(a)}static create(a){return new Fr(a.identity,a.authApi,a.profile)}getUserId(){const a=this.identity.userEntityRef,u=/^([^:/]+:)?([^:/]+\/)?([^:/]+)$/.exec(a);if(!u)throw new TypeError(`Invalid user entity reference "${a}"`);return u[3]}async getIdToken(){return(await this.authApi.getBackstageIdentity()).token}getProfile(){if(!this.profile)throw new Error("The identity API does not implement synchronous profile fetching, use getProfileInfo() instead");return this.profile}async getProfileInfo(){if(this.profilePromise)return await this.profilePromise;try{return this.profilePromise=this.authApi.getProfile(),await this.profilePromise}catch(a){throw this.profilePromise=void 0,a}}async getBackstageIdentity(){return this.identity}async getCredentials(){return{token:(await this.authApi.getBackstageIdentity()).token}}async signOut(){return this.authApi.signOut()}}const Pi={Component:({config:n,onSignInSuccess:a})=>{const{apiRef:u,title:d,message:h}=n,A=(0,l.useApi)(u),O=(0,l.useApi)(l.errorApiRef),w=async()=>{try{const Y=await A.getBackstageIdentity({instantPopup:!0});if(!Y)throw new Error(`The ${d} provider is not configured to support sign-in`);const H=await A.getProfile();a(Fr.create({identity:Y.identity,profile:H,authApi:A}))}catch(Y){O.post(new yr.SP("Login failed",Y))}};return t.createElement(ca,null,t.createElement(In,{variant:"fullHeight",title:d,actions:t.createElement(g.Z,{color:"primary",variant:"outlined",onClick:w},"Sign In")},t.createElement(Te.Z,{variant:"body1"},h)))},loader:async(n,a)=>{const u=n.get(a),d=await u.getBackstageIdentity({optional:!0});if(!d)return;const h=await u.getProfile();return Fr.create({identity:d.identity,profile:h,authApi:u})}},Ii={Component:({onSignInSuccess:n})=>t.createElement(ca,null,t.createElement(In,{title:"Guest",variant:"fullHeight",actions:t.createElement(g.Z,{color:"primary",variant:"outlined",onClick:()=>n(new ua)},"Enter")},t.createElement(Te.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 ua};var Li=e(63955),Xa=e(86619),qa=e(74828),bi=e(45455),xi=e.n(bi);const Oi=/^[a-z0-9_\-]+\.[a-z0-9_\-]+\.[a-z0-9_\-]+$/i,Di=(0,i.Z)(n=>({form:{display:"flex",flexFlow:"column nowrap"},button:{alignSelf:"center",marginTop:n.spacing(2)}}),{name:"BackstageCustomProvider"}),_a=n=>{const{ref:a,...u}=n;return{inputRef:a,...u}},Fi={Component:({onSignInSuccess:n})=>{const a=Di(),{register:u,handleSubmit:d,formState:h}=(0,Li.cI)({mode:"onChange"}),{errors:A}=h,O=({userId:w})=>{n(Fr.fromLegacy({userId:w,profile:{email:`${w}@example.com`}}))};return t.createElement(ca,null,t.createElement(In,{title:"Custom User",variant:"fullHeight"},t.createElement(Te.Z,{variant:"body1"},"Enter your own User ID and credentials.",t.createElement("br",null),"This selection will not be stored."),t.createElement("form",{className:a.form,onSubmit:d(O)},t.createElement(C.Z,null,t.createElement(Xa.Z,{..._a(u("userId",{required:!0})),label:"User ID",margin:"normal",error:Boolean(A.userId)}),A.userId&&t.createElement(qa.Z,{error:!0},A.userId.message)),t.createElement(C.Z,null,t.createElement(Xa.Z,{..._a(u("idToken",{required:!1,validate:w=>!w||Oi.test(w)||"Token is not a valid OpenID Connect JWT Token"})),label:"ID Token (optional)",margin:"normal",autoComplete:"off",error:Boolean(A.idToken)}),A.idToken&&t.createElement(qa.Z,{error:!0},A.idToken.message)),t.createElement(g.Z,{type:"submit",color:"primary",variant:"outlined",className:a.button,disabled:!(h==null?void 0:h.isDirty)||!xi()(A)},"Continue"))))},loader:async()=>{}},Qr="@backstage/core:SignInPage:provider",eo={guest:Ii,custom:Fi,common:Pi};function to(n,a){if(n in a)throw new Error(`"${n}" ID is duplicated. IDs of identity providers have to be unique.`)}function Zl(n){return n.reduce((u,d)=>{if(typeof d=="string")return to(d,u),u[d]={components:eo[d],id:d},u;const{id:h}=d;return to(h,u),u[h]={components:eo.common,id:h,config:d},u},{})}const Nl=(n,a)=>{const u=useApi(errorApiRef),d=useApiHolder(),[h,A]=useState(!0),O=useCallback(Y=>{a(IdentityApiSignOutProxy.from({identityApi:Y,signOut:async()=>{var H;localStorage.removeItem(Qr),await((H=Y.signOut)==null?void 0:H.call(Y))}}))},[a]);useLayoutEffect(()=>{var de;if(!h)return;const Y=localStorage.getItem(Qr);if(Y===null){A(!1);return}const H=n[Y];if(!H){A(!1);return}let oe=!1;return H.components.loader(d,(de=H.config)==null?void 0:de.apiRef).then(Pe=>{oe||(Pe?O(Pe):A(!1))}).catch(Pe=>{oe||(localStorage.removeItem(Qr),u.post(Pe),A(!1))}),()=>{oe=!0}},[h,u,a,d,n,O]);const w=useMemo(()=>Object.keys(n).map(Y=>{const H=n[Y],{Component:oe}=H.components,de=Pe=>{localStorage.setItem(Qr,H.id),O(Pe)};return React.createElement(oe,{key:H.id,config:H.config,onSignInSuccess:de})}),[n,O]);return[h,w]},Bi=({onSignInSuccess:n,providers:a=[],title:u,align:d="left"})=>{const h=useApi(configApiRef),A=useStyles(),O=getSignInProviders(a),[w,Y]=useSignInProviders(O,n);return w?React.createElement(Progress,null):React.createElement(Page,{themeId:"home"},React.createElement(Header,{title:h.getString("app.title")}),React.createElement(Content,null,u&&React.createElement(ContentHeader,{title:u,textAlign:d}),React.createElement(Grid,{container:!0,justifyContent:d==="center"?d:"flex-start",spacing:2,component:"ul",classes:A},Y)))},Mi=({provider:n,auto:a,onSignInSuccess:u})=>{const d=useStyles(),h=useApi(n.apiRef),A=useApi(configApiRef),[O,w]=useState(),[Y,H]=useState(!1),oe=async({checkExisting:de,showPopup:Pe})=>{try{let be;if(de&&(be=await h.getBackstageIdentity({optional:!0})),!be&&(Pe||a)&&(H(!0),be=await h.getBackstageIdentity({instantPopup:!0}),!be))throw new Error(`The ${n.title} provider is not configured to support sign-in`);if(!be){H(!0);return}const Oe=await h.getProfile();u(UserIdentity.create({identity:be.identity,authApi:h,profile:Oe}))}catch(be){w(be),H(!0)}};return useMountEffect(()=>oe({checkExisting:!0})),Y?React.createElement(Page,{themeId:"home"},React.createElement(Header,{title:A.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:()=>{oe({showPopup:!0})}},"Sign In")},React.createElement(Typography,{variant:"body1"},n.message),O&&O.name!=="PopupRejectedError"&&React.createElement(Typography,{variant:"body1",color:"error"},O.message)))))):React.createElement(Progress,null)};function $l(n){return"provider"in n?React.createElement(Mi,{...n}):React.createElement(Bi,{...n})}const Zi=(0,i.Z)(n=>({root:{padding:n.spacing(0,2,0,2.5),minHeight:n.spacing(3)},indicator:{backgroundColor:n.palette.info.main,height:n.spacing(.3)}}),{name:"BackstageTabbedCard"}),Ni=(0,Gt.Z)(n=>({root:{padding:n.spacing(2,2,2,2.5),display:"inline-block"},title:{fontWeight:700},subheader:{paddingTop:n.spacing(1)}}),{name:"BackstageTabbedCardBoldHeader"})(nr.Z);function Ul(n){const{slackChannel:a,errorBoundaryProps:u,children:d,title:h,deepLink:A,value:O,onChange:w}=n,Y=Zi(),[H,oe]=useState(0),de=w||((Oe,ut)=>oe(ut));let Pe;O?React.Children.map(d,Oe=>{React.isValidElement(Oe)&&(Oe==null?void 0:Oe.props.value)===O&&(Pe=Oe==null?void 0:Oe.props.children)}):React.Children.map(d,(Oe,ut)=>{React.isValidElement(Oe)&&ut===H&&(Pe=Oe==null?void 0:Oe.props.children)});const be=u||(a?{slackChannel:a}:{});return React.createElement(Card,null,React.createElement(ErrorBoundary,{...be},h&&React.createElement(Ni,{title:h}),React.createElement(Tabs,{selectionFollowsFocus:!0,classes:Y,value:O||H,onChange:de},d),React.createElement(Divider,null),React.createElement(CardContent,null,Pe),A&&React.createElement(BottomLink,{...A})))}const $i=(0,i.Z)(n=>({root:{minWidth:n.spacing(6),minHeight:n.spacing(3),margin:n.spacing(0,2,0,0),padding:n.spacing(.5,0,.5,0),textTransform:"none","&:hover":{opacity:1,backgroundColor:"transparent",color:n.palette.text.primary}},selected:{fontWeight:"bold"}}),{name:"BackstageCardTab"});function wl(n){const{children:a,...u}=n,d=$i();return React.createElement(Tab,{disableRipple:!0,classes:d,...u})}},88609:function(q,s,e){"use strict";e.d(s,{Os:function(){return f},fC:function(){return y}});var r=e(76241),t=e(2784);const l=(0,r.CT)("analytics-context"),f=()=>{const o=(0,t.useContext)(l);if(o===void 0)return{routeRef:"unknown",pluginId:"root",extension:"App"};const m=o.atVersion(1);if(m===void 0)throw new Error("No context found for version 1.");return m},y=o=>{const{attributes:m,children:c}=o,p={...f(),...m},R=(0,r.EI)({1:p});return t.createElement(l.Provider,{value:R},c)};function i(o,m){const c=g=>React.createElement(y,{attributes:m},React.createElement(o,{...g}));return c.displayName=`WithAnalyticsContext(${o.displayName||o.name||"Component"})`,c}},28461:function(q,s,e){"use strict";e.d(s,{f:function(){return r.fC},z:function(){return i}});var r=e(88609),t=e(27399),l=e(2784);class f{constructor(m,c={routeRef:"unknown",pluginId:"root",extension:"App"}){this.analyticsApi=m,this.context=c}setContext(m){this.context=m}captureEvent(m,c,{value:g,attributes:p}={}){try{this.analyticsApi.captureEvent({action:m,subject:c,value:g,attributes:p,context:this.context})}catch(R){console.warn("Error during analytics event capture. %o",R)}}}function y(){try{return(0,t.useApi)(t.analyticsApiRef)}catch{return{captureEvent:()=>{}}}}function i(){const o=(0,l.useRef)(null),m=(0,r.Os)(),c=y();function g(){return o.current===null&&(o.current=new f(c)),o.current}const p=g();return p.setContext(m),p}},39135:function(q,s,e){"use strict";e.d(s,{CL:function(){return D},sM:function(){return t},$v:function(){return p},v_:function(){return R},hg:function(){return L},uB:function(){return g},bq:function(){return c},Ds:function(){return U},NW:function(){return P},VE:function(){return Q},W0:function(){return T},gP:function(){return b},F4:function(){return f},ux:function(){return i},Kp:function(){return l},$4:function(){return B},p_:function(){return o},ZM:function(){return N},D:function(){return y},gW:function(){return m},E6:function(){return j}});var r=e(86833),t;(function(se){const Ce="SignedIn";se.SignedIn=Ce;const xe="SignedOut";se.SignedOut=xe})(t||(t={}));const l=(0,r.createApiRef)({id:"core.auth.google"}),f=(0,r.createApiRef)({id:"core.auth.github"}),y=(0,r.createApiRef)({id:"core.auth.okta"}),i=(0,r.createApiRef)({id:"core.auth.gitlab"}),o=(0,r.createApiRef)({id:"core.auth.microsoft"}),m=(0,r.createApiRef)({id:"core.auth.onelogin"}),c=(0,r.createApiRef)({id:"core.auth.bitbucket"}),g=(0,r.createApiRef)({id:"core.auth.atlassian"}),p=(0,r.createApiRef)({id:"core.alert"}),R=(0,r.createApiRef)({id:"core.analytics"}),L=(0,r.createApiRef)({id:"core.apptheme"}),U=(0,r.createApiRef)({id:"core.config"}),P=(0,r.createApiRef)({id:"core.discovery"}),Q=(0,r.createApiRef)({id:"core.error"});var D;(function(se){se[se.None=0]="None";const xe=1;se[se.Active=xe]="Active"})(D||(D={}));const T=(0,r.createApiRef)({id:"core.featureflags"}),b=(0,r.createApiRef)({id:"core.fetch"}),B=(0,r.createApiRef)({id:"core.identity"}),N=(0,r.createApiRef)({id:"core.oauthrequest"}),j=(0,r.createApiRef)({id:"core.storage"})},27399:function(q,s,e){"use strict";e.d(s,{createApiFactory:function(){return r.createApiFactory},createApiRef:function(){return r.createApiRef},useApi:function(){return r.useApi},useApiHolder:function(){return r.useApiHolder},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},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}});var r=e(86833);e.o(r,"FeatureFlagState")&&e.d(s,{FeatureFlagState:function(){return r.FeatureFlagState}}),e.o(r,"SessionState")&&e.d(s,{SessionState:function(){return r.SessionState}}),e.o(r,"alertApiRef")&&e.d(s,{alertApiRef:function(){return r.alertApiRef}}),e.o(r,"analyticsApiRef")&&e.d(s,{analyticsApiRef:function(){return r.analyticsApiRef}}),e.o(r,"appThemeApiRef")&&e.d(s,{appThemeApiRef:function(){return r.appThemeApiRef}}),e.o(r,"atlassianAuthApiRef")&&e.d(s,{atlassianAuthApiRef:function(){return r.atlassianAuthApiRef}}),e.o(r,"attachComponentData")&&e.d(s,{attachComponentData:function(){return r.attachComponentData}}),e.o(r,"bitbucketAuthApiRef")&&e.d(s,{bitbucketAuthApiRef:function(){return r.bitbucketAuthApiRef}}),e.o(r,"configApiRef")&&e.d(s,{configApiRef:function(){return r.configApiRef}}),e.o(r,"createComponentExtension")&&e.d(s,{createComponentExtension:function(){return r.createComponentExtension}}),e.o(r,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return r.createExternalRouteRef}}),e.o(r,"createPlugin")&&e.d(s,{createPlugin:function(){return r.createPlugin}}),e.o(r,"createRoutableExtension")&&e.d(s,{createRoutableExtension:function(){return r.createRoutableExtension}}),e.o(r,"createRouteRef")&&e.d(s,{createRouteRef:function(){return r.createRouteRef}}),e.o(r,"discoveryApiRef")&&e.d(s,{discoveryApiRef:function(){return r.discoveryApiRef}}),e.o(r,"errorApiRef")&&e.d(s,{errorApiRef:function(){return r.errorApiRef}}),e.o(r,"featureFlagsApiRef")&&e.d(s,{featureFlagsApiRef:function(){return r.featureFlagsApiRef}}),e.o(r,"fetchApiRef")&&e.d(s,{fetchApiRef:function(){return r.fetchApiRef}}),e.o(r,"getComponentData")&&e.d(s,{getComponentData:function(){return r.getComponentData}}),e.o(r,"githubAuthApiRef")&&e.d(s,{githubAuthApiRef:function(){return r.githubAuthApiRef}}),e.o(r,"gitlabAuthApiRef")&&e.d(s,{gitlabAuthApiRef:function(){return r.gitlabAuthApiRef}}),e.o(r,"googleAuthApiRef")&&e.d(s,{googleAuthApiRef:function(){return r.googleAuthApiRef}}),e.o(r,"identityApiRef")&&e.d(s,{identityApiRef:function(){return r.identityApiRef}}),e.o(r,"microsoftAuthApiRef")&&e.d(s,{microsoftAuthApiRef:function(){return r.microsoftAuthApiRef}}),e.o(r,"oauthRequestApiRef")&&e.d(s,{oauthRequestApiRef:function(){return r.oauthRequestApiRef}}),e.o(r,"oktaAuthApiRef")&&e.d(s,{oktaAuthApiRef:function(){return r.oktaAuthApiRef}}),e.o(r,"oneloginAuthApiRef")&&e.d(s,{oneloginAuthApiRef:function(){return r.oneloginAuthApiRef}}),e.o(r,"storageApiRef")&&e.d(s,{storageApiRef:function(){return r.storageApiRef}}),e.o(r,"useApp")&&e.d(s,{useApp:function(){return r.useApp}}),e.o(r,"useElementFilter")&&e.d(s,{useElementFilter:function(){return r.useElementFilter}}),e.o(r,"useRouteRef")&&e.d(s,{useRouteRef:function(){return r.useRouteRef}}),e.o(r,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return r.useRouteRefParams}});var t=e(39135)},90515:function(q,s,e){"use strict";e.d(s,{T:function(){return t}});class r{constructor(f){if(this.config=f,!f.id.split(".").flatMap(i=>i.split("-")).every(i=>i.match(/^[a-z][a-z0-9]*$/)))throw new Error(`API id must only contain period separated lowercase alphanum tokens with dashes, got '${f.id}'`)}get id(){return this.config.id}get T(){throw new Error(`tried to read ApiRef.T of ${this}`)}toString(){return`apiRef{${this.config.id}}`}}function t(l){return new r(l)}},25182:function(q,s,e){"use strict";e.d(s,{n:function(){return r}});function r(t,l){return"id"in t?{api:t,deps:{},factory:()=>l}:t}},86833:function(q,s,e){"use strict";e.d(s,{useApi:function(){return r.h_},useApiHolder:function(){return r.I_},createApiRef:function(){return t.T},createApiFactory:function(){return y.n}});var r=e(5761),t=e(90515),l=e(16362),f=e.n(l);e.o(l,"FeatureFlagState")&&e.d(s,{FeatureFlagState:function(){return l.FeatureFlagState}}),e.o(l,"SessionState")&&e.d(s,{SessionState:function(){return l.SessionState}}),e.o(l,"alertApiRef")&&e.d(s,{alertApiRef:function(){return l.alertApiRef}}),e.o(l,"analyticsApiRef")&&e.d(s,{analyticsApiRef:function(){return l.analyticsApiRef}}),e.o(l,"appThemeApiRef")&&e.d(s,{appThemeApiRef:function(){return l.appThemeApiRef}}),e.o(l,"atlassianAuthApiRef")&&e.d(s,{atlassianAuthApiRef:function(){return l.atlassianAuthApiRef}}),e.o(l,"attachComponentData")&&e.d(s,{attachComponentData:function(){return l.attachComponentData}}),e.o(l,"bitbucketAuthApiRef")&&e.d(s,{bitbucketAuthApiRef:function(){return l.bitbucketAuthApiRef}}),e.o(l,"configApiRef")&&e.d(s,{configApiRef:function(){return l.configApiRef}}),e.o(l,"createApiFactory")&&e.d(s,{createApiFactory:function(){return l.createApiFactory}}),e.o(l,"createComponentExtension")&&e.d(s,{createComponentExtension:function(){return l.createComponentExtension}}),e.o(l,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return l.createExternalRouteRef}}),e.o(l,"createPlugin")&&e.d(s,{createPlugin:function(){return l.createPlugin}}),e.o(l,"createRoutableExtension")&&e.d(s,{createRoutableExtension:function(){return l.createRoutableExtension}}),e.o(l,"createRouteRef")&&e.d(s,{createRouteRef:function(){return l.createRouteRef}}),e.o(l,"discoveryApiRef")&&e.d(s,{discoveryApiRef:function(){return l.discoveryApiRef}}),e.o(l,"errorApiRef")&&e.d(s,{errorApiRef:function(){return l.errorApiRef}}),e.o(l,"featureFlagsApiRef")&&e.d(s,{featureFlagsApiRef:function(){return l.featureFlagsApiRef}}),e.o(l,"fetchApiRef")&&e.d(s,{fetchApiRef:function(){return l.fetchApiRef}}),e.o(l,"getComponentData")&&e.d(s,{getComponentData:function(){return l.getComponentData}}),e.o(l,"githubAuthApiRef")&&e.d(s,{githubAuthApiRef:function(){return l.githubAuthApiRef}}),e.o(l,"gitlabAuthApiRef")&&e.d(s,{gitlabAuthApiRef:function(){return l.gitlabAuthApiRef}}),e.o(l,"googleAuthApiRef")&&e.d(s,{googleAuthApiRef:function(){return l.googleAuthApiRef}}),e.o(l,"identityApiRef")&&e.d(s,{identityApiRef:function(){return l.identityApiRef}}),e.o(l,"microsoftAuthApiRef")&&e.d(s,{microsoftAuthApiRef:function(){return l.microsoftAuthApiRef}}),e.o(l,"oauthRequestApiRef")&&e.d(s,{oauthRequestApiRef:function(){return l.oauthRequestApiRef}}),e.o(l,"oktaAuthApiRef")&&e.d(s,{oktaAuthApiRef:function(){return l.oktaAuthApiRef}}),e.o(l,"oneloginAuthApiRef")&&e.d(s,{oneloginAuthApiRef:function(){return l.oneloginAuthApiRef}}),e.o(l,"storageApiRef")&&e.d(s,{storageApiRef:function(){return l.storageApiRef}}),e.o(l,"useApp")&&e.d(s,{useApp:function(){return l.useApp}}),e.o(l,"useElementFilter")&&e.d(s,{useElementFilter:function(){return l.useElementFilter}}),e.o(l,"useRouteRef")&&e.d(s,{useRouteRef:function(){return l.useRouteRef}}),e.o(l,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return l.useRouteRefParams}});var y=e(25182)},16362:function(){},5761:function(q,s,e){"use strict";e.d(s,{I_:function(){return l},h_:function(){return f}});var r=e(2784),t=e(76241);function l(){const i=(0,t.Vt)("api-context");if(!i)throw new Error("API context is not available");const o=i.atVersion(1);if(!o)throw new Error("ApiContext v1 not available");return o}function f(i){const m=l().get(i);if(!m)throw new Error(`No implementation available for ${i}`);return m}function y(i){return function(m){const c=p=>{const R=l(),L={};for(const U in i)if(i.hasOwnProperty(U)){const P=i[U],Q=R.get(P);if(!Q)throw new Error(`No implementation available for ${P}`);L[U]=Q}return React.createElement(m,{...p,...L})},g=m.displayName||m.name||"Component";return c.displayName=`withApis(${g})`,c}}},31311:function(q,s,e){"use strict";e.d(s,{useApp:function(){return r.q}});var r=e(32483),t=e(67229),l=e.n(t);e.o(t,"attachComponentData")&&e.d(s,{attachComponentData:function(){return t.attachComponentData}}),e.o(t,"createApiFactory")&&e.d(s,{createApiFactory:function(){return t.createApiFactory}}),e.o(t,"createApiRef")&&e.d(s,{createApiRef:function(){return t.createApiRef}}),e.o(t,"createComponentExtension")&&e.d(s,{createComponentExtension:function(){return t.createComponentExtension}}),e.o(t,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return t.createExternalRouteRef}}),e.o(t,"createPlugin")&&e.d(s,{createPlugin:function(){return t.createPlugin}}),e.o(t,"createRoutableExtension")&&e.d(s,{createRoutableExtension:function(){return t.createRoutableExtension}}),e.o(t,"createRouteRef")&&e.d(s,{createRouteRef:function(){return t.createRouteRef}}),e.o(t,"getComponentData")&&e.d(s,{getComponentData:function(){return t.getComponentData}}),e.o(t,"useApi")&&e.d(s,{useApi:function(){return t.useApi}}),e.o(t,"useApiHolder")&&e.d(s,{useApiHolder:function(){return t.useApiHolder}}),e.o(t,"useElementFilter")&&e.d(s,{useElementFilter:function(){return t.useElementFilter}}),e.o(t,"useRouteRef")&&e.d(s,{useRouteRef:function(){return t.useRouteRef}}),e.o(t,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return t.useRouteRefParams}})},67229:function(){},32483:function(q,s,e){"use strict";e.d(s,{q:function(){return t}});var r=e(76241);const t=()=>{const l=(0,r.Vt)("app-context");if(!l)throw new Error("App context is not available");const f=l.atVersion(1);if(!f)throw new Error("AppContext v1 not available");return f}},74181:function(q,s,e){"use strict";e.d(s,{R5:function(){return f},CO:function(){return R},P4:function(){return p},IY:function(){return y},vJ:function(){return D}});var r=e(76241);const t=(0,r.uW)("component-data-store",()=>new WeakMap),l="__backstage_data";function f(T,b,B){var se;const N=T;let j=(se=N[l])!=null?se:t.get(T);if(j||(j={map:new Map},Object.defineProperty(N,l,{enumerable:!1,configurable:!0,writable:!1,value:j}),t.set(T,j)),j.map.has(b)){const Ce=T.displayName||T.name;throw new Error(`Attempted to attach duplicate data "${b}" to component "${Ce}"`)}j.map.set(b,B)}function y(T,b){var j;if(!T)return;const B=T.type;if(!B)return;const N=(j=B[l])!=null?j:t.get(B);if(!!N)return N.map.get(b)}var i=e(2784),o=e(88609),m=e(31311),c=e(82772);class g extends i.Component{constructor(){super(...arguments);ne(this,"state",{error:void 0});ne(this,"handleErrorReset",()=>{this.setState({error:void 0})})}static getDerivedStateFromError(b){return{error:b}}render(){const{error:b}=this.state,{app:B,plugin:N}=this.props,{ErrorBoundaryFallback:j}=B.getComponents();return b?i.createElement(j,{error:b,resetError:this.handleErrorReset,plugin:N}):this.props.children}}function p(T){const{component:b,mountPoint:B,name:N}=T;return L({component:{lazy:()=>b().then(j=>{const se=xe=>{try{(0,c.tg)(B)}catch(He){if(typeof He=="object"&&He!==null){const{message:fe}=He;if(typeof fe=="string"&&fe.startsWith("No path for "))throw new Error(`Routable extension component with mount point ${B} 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 He}return i.createElement(j,{...xe})},Ce=N||j.displayName||j.name||"LazyComponent";return se.displayName=`RoutableExtension(${Ce})`,se},j=>Ce=>{const xe=(0,m.useApp)(),{BootErrorPage:He}=xe.getComponents();return i.createElement(He,{step:"load-chunk",error:j})})},data:{"core.mountPoint":B},name:N})}function R(T){const{component:b,name:B}=T;return L({component:b,name:B})}function L(T){const{data:b={},name:B}=T;B||console.warn("Declaring extensions without name is DEPRECATED. Make sure that all usages of createReactExtension, createComponentExtension and createRoutableExtension provide a name.");let N;if("lazy"in T.component){const se=T.component.lazy;N=(0,i.lazy)(()=>se().then(Ce=>({default:Ce})))}else N=T.component.sync;const j=B||N.displayName||N.name||"Component";return{expose(se){const Ce=xe=>{const He=(0,m.useApp)(),{Progress:fe}=He.getComponents(),je=b==null?void 0:b["core.mountPoint"];return i.createElement(i.Suspense,{fallback:i.createElement(fe,null)},i.createElement(g,{app:He,plugin:se},i.createElement(o.fC,{attributes:{pluginId:se.getId(),...B&&{extension:B},...je&&{routeRef:je.id}}},i.createElement(N,{...xe}))))};f(Ce,"core.plugin",se);for(const[xe,He]of Object.entries(b))f(Ce,xe,He);return Ce.displayName=`Extension(${j})`,Ce}}}var U=e(27399);function P(T,b,B,N){return i.Children.toArray(T).flatMap(j=>{if(!(0,i.isValidElement)(j))return[];if(j.type===i.Fragment)return P(j.props.children,b,B,N);if(y(j,"core.featureFlagged")){const se=j.props;return("with"in se?b.isActive(se.with):!b.isActive(se.without))?P(j.props.children,b,B,N):[]}if(B===void 0||B(j))return[j];if(N)throw new Error(N);return P(j.props.children,b,B,N)})}class Q{constructor(b,B){this.node=b,this.featureFlagsApi=B}selectByComponentData(b){const B=P(this.node,this.featureFlagsApi,N=>y(N,b.key)!==void 0,b.withStrictError);return new Q(B,this.featureFlagsApi)}findComponentData(b){return P(this.node,this.featureFlagsApi,N=>y(N,b.key)!==void 0).map(N=>y(N,b.key)).filter(N=>N!==void 0)}getElements(){return P(this.node,this.featureFlagsApi)}}function D(T,b,B=[]){const N=(0,U.useApi)(U.featureFlagsApiRef),j=new Q(T,N);return(0,i.useMemo)(()=>b(j),[T,...B])}},80274:function(){},36964:function(q,s,e){"use strict";e.d(s,{AnalyticsContext:function(){return r.f},useAnalytics:function(){return r.z},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},bitbucketAuthApiRef:function(){return t.bitbucketAuthApiRef},configApiRef:function(){return t.configApiRef},discoveryApiRef:function(){return t.discoveryApiRef},errorApiRef:function(){return t.errorApiRef},featureFlagsApiRef:function(){return t.featureFlagsApiRef},fetchApiRef:function(){return t.fetchApiRef},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},useApp:function(){return l.useApp},attachComponentData:function(){return f.R5},createComponentExtension:function(){return f.CO},createRoutableExtension:function(){return f.P4},getComponentData:function(){return f.IY},useElementFilter:function(){return f.vJ},createPlugin:function(){return o.r},createExternalRouteRef:function(){return m.x8},createRouteRef:function(){return m.NT},useRouteRef:function(){return m.tg},useRouteRefParams:function(){return m.Oi}});var r=e(28461),t=e(27399);e.o(t,"attachComponentData")&&e.d(s,{attachComponentData:function(){return t.attachComponentData}}),e.o(t,"createApiFactory")&&e.d(s,{createApiFactory:function(){return t.createApiFactory}}),e.o(t,"createApiRef")&&e.d(s,{createApiRef:function(){return t.createApiRef}}),e.o(t,"createComponentExtension")&&e.d(s,{createComponentExtension:function(){return t.createComponentExtension}}),e.o(t,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return t.createExternalRouteRef}}),e.o(t,"createPlugin")&&e.d(s,{createPlugin:function(){return t.createPlugin}}),e.o(t,"createRoutableExtension")&&e.d(s,{createRoutableExtension:function(){return t.createRoutableExtension}}),e.o(t,"createRouteRef")&&e.d(s,{createRouteRef:function(){return t.createRouteRef}}),e.o(t,"getComponentData")&&e.d(s,{getComponentData:function(){return t.getComponentData}}),e.o(t,"useApi")&&e.d(s,{useApi:function(){return t.useApi}}),e.o(t,"useApiHolder")&&e.d(s,{useApiHolder:function(){return t.useApiHolder}}),e.o(t,"useApp")&&e.d(s,{useApp:function(){return t.useApp}}),e.o(t,"useElementFilter")&&e.d(s,{useElementFilter:function(){return t.useElementFilter}}),e.o(t,"useRouteRef")&&e.d(s,{useRouteRef:function(){return t.useRouteRef}}),e.o(t,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return t.useRouteRefParams}});var l=e(31311);e.o(l,"attachComponentData")&&e.d(s,{attachComponentData:function(){return l.attachComponentData}}),e.o(l,"createApiFactory")&&e.d(s,{createApiFactory:function(){return l.createApiFactory}}),e.o(l,"createApiRef")&&e.d(s,{createApiRef:function(){return l.createApiRef}}),e.o(l,"createComponentExtension")&&e.d(s,{createComponentExtension:function(){return l.createComponentExtension}}),e.o(l,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return l.createExternalRouteRef}}),e.o(l,"createPlugin")&&e.d(s,{createPlugin:function(){return l.createPlugin}}),e.o(l,"createRoutableExtension")&&e.d(s,{createRoutableExtension:function(){return l.createRoutableExtension}}),e.o(l,"createRouteRef")&&e.d(s,{createRouteRef:function(){return l.createRouteRef}}),e.o(l,"getComponentData")&&e.d(s,{getComponentData:function(){return l.getComponentData}}),e.o(l,"useApi")&&e.d(s,{useApi:function(){return l.useApi}}),e.o(l,"useApiHolder")&&e.d(s,{useApiHolder:function(){return l.useApiHolder}}),e.o(l,"useElementFilter")&&e.d(s,{useElementFilter:function(){return l.useElementFilter}}),e.o(l,"useRouteRef")&&e.d(s,{useRouteRef:function(){return l.useRouteRef}}),e.o(l,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return l.useRouteRefParams}});var f=e(74181),y=e(80274),i=e.n(y);e.o(y,"createApiFactory")&&e.d(s,{createApiFactory:function(){return y.createApiFactory}}),e.o(y,"createApiRef")&&e.d(s,{createApiRef:function(){return y.createApiRef}}),e.o(y,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return y.createExternalRouteRef}}),e.o(y,"createPlugin")&&e.d(s,{createPlugin:function(){return y.createPlugin}}),e.o(y,"createRouteRef")&&e.d(s,{createRouteRef:function(){return y.createRouteRef}}),e.o(y,"useApi")&&e.d(s,{useApi:function(){return y.useApi}}),e.o(y,"useApiHolder")&&e.d(s,{useApiHolder:function(){return y.useApiHolder}}),e.o(y,"useRouteRef")&&e.d(s,{useRouteRef:function(){return y.useRouteRef}}),e.o(y,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return y.useRouteRefParams}});var o=e(96896),m=e(82772)},96896:function(q,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,y;return(y=(f=this.config.featureFlags)==null?void 0:f.slice())!=null?y:[]}get routes(){var f;return(f=this.config.routes)!=null?f:{}}get externalRoutes(){var f;return(f=this.config.externalRoutes)!=null?f:{}}provide(f){return f.expose(this)}toString(){return`plugin{${this.config.id}}`}}function t(l){return new r(l)}},82772:function(q,s,e){var U,P,Q;"use strict";e.d(s,{x8:function(){return c},NT:function(){return f},tg:function(){return R},Oi:function(){return L}});var r=e(76241);const t=(0,r.uW)("route-ref-type",()=>Symbol("route-ref-type"));class l{constructor(T,b){ne(this,U,"absolute");this.id=T,this.params=b}get title(){return this.id}toString(){return`routeRef{type=absolute,id=${this.id}}`}}U=t;function f(D){var T;return new l(D.id,(T=D.params)!=null?T:[])}const y=/^\w+$/;class i{constructor(T,b,B,N){ne(this,P,"sub");this.id=T,this.path=b,this.parent=B,this.params=N}toString(){return`routeRef{type=sub,id=${this.id}}`}}P=t;function o(D){const{id:T,path:b,parent:B}=D,N=b.split("/").filter(Ce=>Ce.startsWith(":")).map(Ce=>Ce.substring(1)),j=[...B.params,...N];if(B.params.some(Ce=>N.includes(Ce)))throw new Error("SubRouteRef may not have params that overlap with its parent");if(!b.startsWith("/"))throw new Error(`SubRouteRef path must start with '/', got '${b}'`);if(b.endsWith("/"))throw new Error(`SubRouteRef path must not end with '/', got '${b}'`);for(const Ce of N)if(!y.test(Ce))throw new Error(`SubRouteRef path has invalid param, got '${Ce}'`);return new i(T,b,B,j)}class m{constructor(T,b,B){ne(this,Q,"external");this.id=T,this.params=b,this.optional=B}toString(){return`routeRef{type=external,id=${this.id}}`}}Q=t;function c(D){var T;return new m(D.id,(T=D.params)!=null?T:[],Boolean(D.optional))}var g=e(2784),p=e(10289);function R(D){const T=(0,p.TH)(),b=(0,r.Vt)("routing-context");if(!b)throw new Error("Routing context is not available");const B=b.atVersion(1),N=(0,g.useMemo)(()=>B&&B.resolve(D,T),[B,D,T]);if(!b)throw new Error("useRouteRef used outside of routing context");if(!B)throw new Error("RoutingContext v1 not available");const j="optional"in D&&D.optional;if(!N&&!j)throw new Error(`No path for ${D}`);return N}function L(D){return(0,p.UO)()}},10179:function(q,s,e){"use strict";e.d(s,{SP:function(){return U},dR:function(){return p},VL:function(){return Q},BD:function(){return t}});function r(D){if(typeof D!="object"||D===null||Array.isArray(D))return!1;const T=D;return!(typeof T.name!="string"||T.name===""||typeof T.message!="string")}function t(D){if(typeof D!="object"||D===null||Array.isArray(D))throw new Error(`Encountered invalid error, not an object, got '${D}'`);const T=D;if(typeof T.name!="string"||T.name==="")throw new Error(`Encountered error object without a name, got '${D}'`);if(typeof T.message!="string")throw new Error(`Encountered error object without a message, got '${D}'`)}var l=e(24852);function f(D,T){const b=serializeErrorInternal(D),B={name:"Unknown",message:"<no reason given>",...b};return(T==null?void 0:T.includeStack)||delete B.stack,B}function y(D){const T=(0,l.deserializeError)(D);return D.stack||(T.stack=void 0),T}function i(D){if(r(D)){const T=String(D);return T!=="[object Object]"?T:`${D.name}: ${D.message}`}return`unknown error '${D}'`}class o extends Error{constructor(T,b){var N;let B=T;if(b!==void 0){const j=i(b);B?B+=`; caused by ${j}`:B=`caused by ${j}`}super(B);ne(this,"cause");(N=Error.captureStackTrace)==null||N.call(Error,this,this.constructor),this.name=this.constructor.name,this.cause=r(b)?b:void 0}}class m extends null{}class c extends null{}class g extends null{}class p extends o{}class R extends null{}class L extends null{}class U extends o{constructor(T,b){super(T,b);this.name=r(b)?b.name:"Error"}}async function P(D){var T;try{const b=await D.text();if(b){if((T=D.headers.get("content-type"))==null?void 0:T.startsWith("application/json"))try{const B=JSON.parse(b);if(B.error&&B.response)return B}catch{}return{error:{name:"Error",message:`Request failed with status ${D.status} ${D.statusText}, ${b}`},response:{statusCode:D.status}}}}catch{}return{error:{name:"Error",message:`Request failed with status ${D.status} ${D.statusText}`},response:{statusCode:D.status}}}class Q extends Error{constructor(T){super(T.message);ne(this,"response");ne(this,"body");ne(this,"cause");this.name="ResponseError",this.response=T.response,this.body=T.data,this.cause=T.cause}static async fromResponse(T){const b=await P(T),B=b.response.statusCode||T.status,N=b.error.name||T.statusText,j=`Request failed with ${B} ${N}`,se=y(b.error);return new Q({message:j,response:T,data:b,cause:se})}}},36356:function(q,s,e){var p,R,L,U,P;"use strict";e.d(s,{nW:function(){return g},ae:function(){return i},q3:function(){return o}});var r=e(36964);const t=(0,r.createApiRef)({id:"core.scmauth"});class l{constructor(T){sn(this,p,void 0);hn(this,p,T)}async getCredentials(T){const b=new URL(T.url),B=qe(this,p).find(N=>N.isUrlSupported(b));if(!B)throw new Error(`No auth provider available for '${T.url}', see https://backstage.io/link?scm-auth`);return B.getCredentials(T)}}p=new WeakMap;const Q=class{constructor(T,b,B,N){sn(this,R,void 0);sn(this,L,void 0);sn(this,U,void 0);sn(this,P,void 0);hn(this,R,b),hn(this,L,B),hn(this,U,N),hn(this,P,T)}static createDefaultApiFactory(){return createApiFactory({api:scmAuthApiRef,deps:{github:githubAuthApiRef,gitlab:gitlabAuthApiRef,azure:microsoftAuthApiRef,bitbucket:bitbucketAuthApiRef},factory:({github:T,gitlab:b,azure:B,bitbucket:N})=>Q.merge(Q.forGithub(T),Q.forGitlab(b),Q.forAzure(B),Q.forBitbucket(N))})}static forAuthApi(T,b){return new Q("generic",T,b.host,b.scopeMapping)}static forGithub(T,b){var N;const B=(N=b==null?void 0:b.host)!=null?N:"github.com";return new Q("github",T,B,{default:["repo","read:org","read:user"],repoWrite:["gist"]})}static forGitlab(T,b){var N;const B=(N=b==null?void 0:b.host)!=null?N:"gitlab.com";return new Q("gitlab",T,B,{default:["read_user","read_api","read_repository"],repoWrite:["write_repository","api"]})}static forAzure(T,b){var N;const B=(N=b==null?void 0:b.host)!=null?N:"dev.azure.com";return new Q("azure",T,B,{default:["vso.build","vso.code","vso.graph","vso.project","vso.profile"],repoWrite:["vso.code_manage"]})}static forBitbucket(T,b){var N;const B=(N=b==null?void 0:b.host)!=null?N:"bitbucket.org";return new Q("bitbucket",T,B,{default:["account","team","pullrequest","snippet","issue"],repoWrite:["pullrequest:write","snippet:write","issue:write"]})}static merge(...T){return new l(T)}isUrlSupported(T){return T.host===qe(this,L)}getAdditionalScopesForProvider(T){var b,B;return!(T==null?void 0:T.customScopes)||qe(this,P)==="generic"?[]:(B=(b=T.customScopes)==null?void 0:b[qe(this,P)])!=null?B:[]}async getCredentials(T){const{url:b,additionalScope:B,...N}=T,j=qe(this,U).default.slice();(B==null?void 0:B.repoWrite)&&j.push(...qe(this,U).repoWrite);const se=this.getAdditionalScopesForProvider(B);se.length&&j.push(...se);const Ce=[...new Set(j)],xe=await qe(this,R).getAccessToken(Ce,N);return{token:xe,headers:{Authorization:`Bearer ${xe}`}}}};let f=Q;R=new WeakMap,L=new WeakMap,U=new WeakMap,P=new WeakMap;var y=e(67512);class i{static fromConfig(T){return y.Lx.fromConfig(T)}}const o=(0,r.createApiRef)({id:"integration.scmintegrations"});var m=e(73250),c=e(2784);const g=D=>{var j;const{type:T}=D,b=(0,r.useApp)(),B=m.Z,N=T&&(j=b.getSystemIcon(T))!=null?j:B;return c.createElement(N,null)}},67512:function(q,s,e){var ie,ve,Ie,pe,Te,st,re;"use strict";e.d(s,{Lx:function(){return $},Pb:function(){return nt}});var r=e(82717),t=e.n(r),l=e(76635);function f(V){const E=new URL("http://example.com");return E.host=V,E.host===V}function y(V){try{return new URL(V),!0}catch{return!1}}function i(V,E){return{list(){return V},byUrl(I){try{const M=typeof I=="string"?new URL(I):I;return V.find(ee=>E(ee)===M.host)}catch{return}},byHost(I){return V.find(M=>E(M)===I)}}}function o(V){const{url:E,base:I,lineNumber:M}=V;try{return new URL(E),E}catch{}let ee;if(E.startsWith("/")){const{filepath:ae}=t()(I);ee=new URL(I);const ue=(0,l.trimEnd)(ee.pathname.substring(0,ee.pathname.length-ae.length),"/");ee.pathname=`${ue}${E}`}else ee=new URL(E,I);return ee.search=new URL(I).search,M&&(ee.hash=`L${M}`),ee.toString()}const m="GB",S=class{constructor(E,I,M,ee,ae,ue){sn(this,ie,void 0);sn(this,ve,void 0);sn(this,Ie,void 0);sn(this,pe,void 0);sn(this,Te,void 0);sn(this,st,void 0);sn(this,re,(...E)=>{const I=new URL(qe(this,ie));return I.pathname=E.map(M=>encodeURIComponent(M)).join("/"),I});hn(this,ie,E),hn(this,ve,I),hn(this,Ie,M),hn(this,pe,ee),hn(this,Te,ae),hn(this,st,ue)}static fromRepoUrl(E){var bt;const I=new URL(E);let M,ee,ae;const ue=I.pathname.split("/").map(dt=>decodeURIComponent(dt));if(ue[2]==="_git"?(M=ue[1],ee=ae=ue[3]):ue[3]==="_git"&&(M=ue[1],ee=ue[2],ae=ue[4]),!M||!ee||!ae)throw new Error("Azure URL must point to a git repository");const Re=(bt=I.searchParams.get("path"))!=null?bt:void 0;let Ne;const Ve=I.searchParams.get("version");if(Ve){if(Ve.slice(0,2)!=="GB")throw new Error("Azure URL version must point to a git branch");Ne=Ve.slice(2)}return new S(I.origin,M,ee,ae,Re,Ne)}toRepoUrl(){let E;return qe(this,Ie)===qe(this,pe)?E=qe(this,re).call(this,qe(this,ve),"_git",qe(this,pe)):E=qe(this,re).call(this,qe(this,ve),qe(this,Ie),"_git",qe(this,pe)),qe(this,Te)&&E.searchParams.set("path",qe(this,Te)),qe(this,st)&&E.searchParams.set("version",m+qe(this,st)),E.toString()}toFileUrl(){if(!qe(this,Te))throw new Error("Azure URL must point to a specific path to be able to download a file");const E=qe(this,re).call(this,qe(this,ve),qe(this,Ie),"_apis","git","repositories",qe(this,pe),"items");return E.searchParams.set("api-version","6.0"),E.searchParams.set("path",qe(this,Te)),qe(this,st)&&E.searchParams.set("version",qe(this,st)),E.toString()}toArchiveUrl(){const E=qe(this,re).call(this,qe(this,ve),qe(this,Ie),"_apis","git","repositories",qe(this,pe),"items");return E.searchParams.set("recursionLevel","full"),E.searchParams.set("download","true"),E.searchParams.set("api-version","6.0"),qe(this,Te)&&E.searchParams.set("scopePath",qe(this,Te)),qe(this,st)&&E.searchParams.set("version",qe(this,st)),E.toString()}toCommitsUrl(){const E=qe(this,re).call(this,qe(this,ve),qe(this,Ie),"_apis","git","repositories",qe(this,pe),"commits");return E.searchParams.set("api-version","6.0"),qe(this,st)&&E.searchParams.set("searchCriteria.itemVersion.version",qe(this,st)),E.toString()}getOwner(){return qe(this,ve)}getProject(){return qe(this,Ie)}getRepo(){return qe(this,pe)}getPath(){return qe(this,Te)}getRef(){return qe(this,st)}};let c=S;ie=new WeakMap,ve=new WeakMap,Ie=new WeakMap,pe=new WeakMap,Te=new WeakMap,st=new WeakMap,re=new WeakMap;const g="dev.azure.com";function p(V){var M;const E=(M=V.getOptionalString("host"))!=null?M:g,I=V.getOptionalString("token");if(!f(E))throw new Error(`Invalid Azure integration config, '${E}' is not a valid host`);return{host:E,token:I}}function R(V){const E=V.map(p);return E.some(I=>I.host===g)||E.push({host:g}),E}const z=class{constructor(E){this.integrationConfig=E}get type(){return"azure"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(E){var ee;const{url:I,base:M}=E;if(y(I))return I;try{const ae=c.fromRepoUrl(M),ue=new URL(M),Re=new URL(`https://a.com${(ee=ae.getPath())!=null?ee:""}`),Ne=new URL(I,Re).pathname;return ue.searchParams.set("path",Ne),E.lineNumber&&(ue.searchParams.set("line",String(E.lineNumber)),ue.searchParams.set("lineEnd",String(E.lineNumber+1)),ue.searchParams.set("lineStartColumn","1"),ue.searchParams.set("lineEndColumn","1")),ue.toString()}catch{return new URL(I,M).toString()}}resolveEditUrl(E){return E}};let L=z;ne(L,"factory",({config:E})=>{var M;const I=R((M=E.getOptionalConfigArray("integrations.azure"))!=null?M:[]);return i(I.map(ee=>new z(ee)),ee=>ee.config.host)});var U=e(48834).Buffer;function P(V){return AzureUrl.fromRepoUrl(V).toFileUrl()}function Q(V){return AzureUrl.fromRepoUrl(V).toArchiveUrl()}function D(V){return AzureUrl.fromRepoUrl(V).toCommitsUrl()}function T(V,E){const I=E?{...E}:{};if(V.token){const M=U.from(`:${V.token}`,"utf8");I.Authorization=`Basic ${M.toString("base64")}`}return{headers:I}}const b="bitbucket.org",B="https://api.bitbucket.org/2.0";function N(V){var ue;const E=(ue=V.getOptionalString("host"))!=null?ue:b;let I=V.getOptionalString("apiBaseUrl");const M=V.getOptionalString("token"),ee=V.getOptionalString("username"),ae=V.getOptionalString("appPassword");if(!f(E))throw new Error(`Invalid Bitbucket integration config, '${E}' is not a valid host`);return I?I=(0,l.trimEnd)(I,"/"):E===b?I=B:I=`https://${E}/rest/api/1.0`,{host:E,apiBaseUrl:I,token:M,username:ee,appPassword:ae}}function j(V){const E=V.map(N);return E.some(I=>I.host===b)||E.push({host:b,apiBaseUrl:B}),E}const ce=class{constructor(E){this.integrationConfig=E}get type(){return"bitbucket"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(E){const I=o(E);if(!E.lineNumber)return I;const M=new URL(I);return this.integrationConfig.host==="bitbucket.org"?M.hash=`lines-${E.lineNumber}`:M.hash=`${E.lineNumber}`,M.toString()}resolveEditUrl(E){const I=t()(E),M=new URL(E);return M.searchParams.set("mode","edit"),M.searchParams.set("spa","0"),M.searchParams.set("at",I.ref),M.toString()}};let se=ce;ne(se,"factory",({config:E})=>{var M;const I=j((M=E.getOptionalConfigArray("integrations.bitbucket"))!=null?M:[]);return i(I.map(ee=>new ce(ee)),ee=>ee.config.host)});var Ce=e(96279),xe=e(48834).Buffer;async function He(V,E){const{name:I,owner:M,resource:ee}=parseGitUrl(V),ae=ee==="bitbucket.org";let ue=ae?`${E.apiBaseUrl}/repositories/${M}/${I}`:`${E.apiBaseUrl}/projects/${M}/repos/${I}/default-branch`,Re=await fetch(ue,Qe(E));if(Re.status===404&&!ae&&(ue=`${E.apiBaseUrl}/projects/${M}/repos/${I}/branches/default`,Re=await fetch(ue,Qe(E))),!Re.ok){const Ve=`Failed to retrieve default branch from ${ue}, ${Re.status} ${Re.statusText}`;throw new Error(Ve)}let Ne;if(ae)Ne=(await Re.json()).mainbranch.name;else{const{displayId:Ve}=await Re.json();Ne=Ve}if(!Ne)throw new Error(`Failed to read default branch from ${ue}. Response ${Re.status} ${Re.json()}`);return Ne}async function fe(V,E){const{name:I,owner:M,ref:ee,protocol:ae,resource:ue,filepath:Re}=parseGitUrl(V),Ne=ue==="bitbucket.org";let Ve=ee;Ve||(Ve=await He(V,E));const bt=Re?`&path=${encodeURIComponent(Re)}`:"";return Ne?`${ae}://${ue}/${M}/${I}/get/${Ve}.tar.gz`:`${E.apiBaseUrl}/projects/${M}/repos/${I}/archive?format=tgz&at=${Ve}&prefix=${M}-${I}${bt}`}function je(V,E){try{const{owner:I,name:M,ref:ee,filepathtype:ae,filepath:ue}=parseGitUrl(V);if(!I||!M||ae!=="browse"&&ae!=="raw"&&ae!=="src")throw new Error("Invalid Bitbucket URL or file path");const Re=ue.replace(/^\//,"");if(E.host==="bitbucket.org"){if(!ee)throw new Error("Invalid Bitbucket URL or file path");return`${E.apiBaseUrl}/repositories/${I}/${M}/src/${ee}/${Re}`}return`${E.apiBaseUrl}/projects/${I}/repos/${M}/raw/${Re}?at=${ee}`}catch(I){throw new Error(`Incorrect URL: ${V}, ${I}`)}}function Qe(V){const E={};if(V.token)E.Authorization=`Bearer ${V.token}`;else if(V.username&&V.appPassword){const I=xe.from(`${V.username}:${V.appPassword}`,"utf8");E.Authorization=`Basic ${I.toString("base64")}`}return{headers:E}}function at(V){const E=V.getString("host");let I=V.getOptionalString("baseUrl");const M=V.getOptionalString("username"),ee=V.getOptionalString("password");if(f(E)){if(I&&!y(I))throw new Error(`Invalid Gerrit integration config, '${I}' is not a valid baseUrl`)}else throw new Error(`Invalid Gerrit integration config, '${E}' is not a valid host`);return I?I=(0,l.trimEnd)(I,"/"):I=`https://${E}`,{host:E,baseUrl:I,username:M,password:ee}}function et(V){return V.map(at)}const ye=class{constructor(E){this.integrationConfig=E}get type(){return"gerrit"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(E){const{url:I,base:M,lineNumber:ee}=E;let ae;return I?ae=new URL(I,M):ae=new URL(M),ee&&(ae.hash=ee.toString()),ae.toString()}resolveEditUrl(E){return E}};let tt=ye;ne(tt,"factory",({config:E})=>{var M;const I=et((M=E.getOptionalConfigArray("integrations.gerrit"))!=null?M:[]);return i(I.map(ee=>new ye(ee)),ee=>ee.config.host)});const ot="github.com",Ee="https://api.github.com",Ge="https://raw.githubusercontent.com";function lt(V){var ue,Re;const E=(ue=V.getOptionalString("host"))!=null?ue:ot;let I=V.getOptionalString("apiBaseUrl"),M=V.getOptionalString("rawBaseUrl");const ee=V.getOptionalString("token"),ae=(Re=V.getOptionalConfigArray("apps"))==null?void 0:Re.map(Ne=>({appId:Ne.getNumber("appId"),clientId:Ne.getString("clientId"),clientSecret:Ne.getString("clientSecret"),webhookSecret:Ne.getString("webhookSecret"),privateKey:Ne.getString("privateKey"),allowedInstallationOwners:Ne.getOptionalStringArray("allowedInstallationOwners")}));if(!f(E))throw new Error(`Invalid GitHub integration config, '${E}' is not a valid host`);return I?I=(0,l.trimEnd)(I,"/"):E===ot&&(I=Ee),M?M=(0,l.trimEnd)(M,"/"):E===ot&&(M=Ge),{host:E,apiBaseUrl:I,rawBaseUrl:M,token:ee,apps:ae}}function Dt(V){const E=V.map(lt);return E.some(I=>I.host===ot)||E.push({host:ot,apiBaseUrl:Ee,rawBaseUrl:Ge}),E}function gt(V,E,I){try{const{owner:M,name:ee,ref:ae,filepathtype:ue,filepath:Re}=parseGitUrl(V);if(!M||!ee||!ae||ue!=="blob"&&ue!=="raw"&&ue!=="tree")throw new Error("Invalid GitHub URL or file path");const Ne=Re.replace(/^\//,"");return ct(E,I)==="api"?`${E.apiBaseUrl}/repos/${M}/${ee}/contents/${Ne}?ref=${ae}`:`${E.rawBaseUrl}/${M}/${ee}/${ae}/${Ne}`}catch(M){throw new Error(`Incorrect URL: ${V}, ${M}`)}}function Et(V,E){const I={};return ct(V,E)==="api"&&(I.Accept="application/vnd.github.v3.raw"),E.token&&(I.Authorization=`token ${E.token}`),{headers:I}}function ct(V,E){return V.apiBaseUrl&&(E.token||!V.rawBaseUrl)?"api":"raw"}class ft{constructor(){ne(this,"tokenCache",new Map);ne(this,"isNotExpired",E=>E.diff(DateTime.local(),"minutes").minutes>50)}async getOrCreateToken(E,I){const M=this.tokenCache.get(E);if(M&&this.isNotExpired(M.expiresAt))return{accessToken:M.token};const ee=await I();return this.tokenCache.set(E,ee),{accessToken:ee.token}}}const It={Accept:"application/vnd.github.machine-man-preview+json"};class At{constructor(E,I){ne(this,"appClient");ne(this,"baseUrl");ne(this,"baseAuthConfig");ne(this,"cache",new ft);ne(this,"allowedInstallationOwners");this.allowedInstallationOwners=E.allowedInstallationOwners,this.baseUrl=I,this.baseAuthConfig={appId:E.appId,privateKey:E.privateKey.replace(/\\n/gm,`
|
|
31
|
+
`)},this.appClient=new Octokit({baseUrl:I,headers:It,authStrategy:createAppAuth,auth:this.baseAuthConfig})}async getInstallationCredentials(E,I){var ue;const{installationId:M,suspended:ee}=await this.getInstallationData(E);if(this.allowedInstallationOwners&&!((ue=this.allowedInstallationOwners)==null?void 0:ue.includes(E)))return{accessToken:void 0};if(ee)throw new Error(`The GitHub application for ${E} is suspended`);const ae=I?`${E}/${I}`:E;return this.cache.getOrCreateToken(ae,async()=>{const Re=await this.appClient.apps.createInstallationAccessToken({installation_id:M,headers:It});if(I&&Re.data.repository_selection==="selected"){const Ne=new Octokit({baseUrl:this.baseUrl,auth:Re.data.token});if(!(await Ne.paginate(Ne.apps.listReposAccessibleToInstallation)).some(dt=>dt.name===I))throw new Error(`The Backstage GitHub application used in the ${E} organization does not have access to a repository with the name ${I}`)}return{token:Re.data.token,expiresAt:DateTime.fromISO(Re.data.expires_at)}})}getInstallations(){return this.appClient.paginate(this.appClient.apps.listInstallations)}async getInstallationData(E){const M=(await this.getInstallations()).find(ae=>{var ue,Re;return((Re=(ue=ae.account)==null?void 0:ue.login)==null?void 0:Re.toLocaleLowerCase("en-US"))===E.toLocaleLowerCase("en-US")});if(M)return{installationId:M.id,suspended:Boolean(M.suspended_by)};const ee=new Error(`No app installation found for ${E} in ${this.baseAuthConfig.appId}`);throw ee.name="NotFoundError",ee}}class Bt{constructor(E){ne(this,"apps");var I,M;this.apps=(M=(I=E.apps)==null?void 0:I.map(ee=>new At(ee,E.apiBaseUrl)))!=null?M:[]}async getAllInstallations(){return this.apps.length?(await Promise.all(this.apps.map(I=>I.getInstallations()))).flat():[]}async getAppToken(E,I){if(this.apps.length===0)return;const M=await Promise.all(this.apps.map(Re=>Re.getInstallationCredentials(E,I).then(Ne=>({credentials:Ne,error:void 0}),Ne=>({credentials:void 0,error:Ne})))),ee=M.find(Re=>Re.credentials);if(ee)return ee.credentials.accessToken;const ue=M.map(Re=>Re.error).find(Re=>Re.name!=="NotFoundError");if(ue)throw ue}}class Lt{constructor(E,I){this.githubAppCredentialsMux=E,this.token=I}async getCredentials(E){const I=parseGitUrl(E.url),M=I.owner||I.name,ee=I.owner?I.name:void 0;let ae="app",ue=await this.githubAppCredentialsMux.getAppToken(M,ee);return ue||(ae="token",ue=this.token),{headers:ue?{Authorization:`Bearer ${ue}`}:void 0,token:ue,type:ae}}}ne(Lt,"create",null);class Ct{static fromIntegrations(E){const I=new Map;return E.github.list().forEach(M=>{const ee=SingleInstanceGithubCredentialsProvider.create(M.config);I.set(M.config.host,ee)}),new Ct(I)}constructor(E){this.providers=E}async getCredentials(E){const I=new URL(E.url),M=this.providers.get(I.host);if(!M)throw new Error(`There is no GitHub integration that matches ${E.url}. Please add a configuration for an integration.`);return M.getCredentials(E)}}const Ae=class{constructor(E){this.integrationConfig=E}get type(){return"github"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(E){return nt(o(E),"tree")}resolveEditUrl(E){return nt(E,"edit")}};let ze=Ae;ne(ze,"factory",({config:E})=>{var M;const I=Dt((M=E.getOptionalConfigArray("integrations.github"))!=null?M:[]);return i(I.map(ee=>new Ae(ee)),ee=>ee.config.host)});function nt(V,E){return V.replace(/\/\/([^/]+)\/([^/]+)\/([^/]+)\/(blob|tree|edit)\//,(I,M,ee,ae)=>`//${M}/${ee}/${ae}/${E}/`)}const Ke="gitlab.com",pt="https://gitlab.com/api/v4";function rt(V){const E=V.getString("host");let I=V.getOptionalString("apiBaseUrl");const M=V.getOptionalString("token");let ee=V.getOptionalString("baseUrl");if(I?I=(0,l.trimEnd)(I,"/"):E===Ke&&(I=pt),ee?ee=(0,l.trimEnd)(ee,"/"):ee=`https://${E}`,f(E)){if(!I||!y(I))throw new Error(`Invalid GitLab integration config, '${I}' is not a valid apiBaseUrl`);if(!y(ee))throw new Error(`Invalid GitLab integration config, '${ee}' is not a valid baseUrl`)}else throw new Error(`Invalid GitLab integration config, '${E}' is not a valid host`);return{host:E,token:M,apiBaseUrl:I,baseUrl:ee}}function yt(V){const E=V.map(rt);return E.some(I=>I.host===Ke)||E.push({host:Ke,apiBaseUrl:pt,baseUrl:`https://${Ke}`}),E}async function X(V,E){if(V.includes("/-/blob/")){const I=await le(V,E);return me(V,I).toString()}return te(V).toString()}function Z(V){const{token:E=""}=V;return{headers:{"PRIVATE-TOKEN":E}}}function te(V){try{const E=new URL(V),[I,M,ee,ae,...ue]=E.pathname.split("/");if(I!==""||M===""||ee===""||ae!=="blob"||!ue.join("/").match(/\.(yaml|yml)$/))throw new Error("Wrong GitLab URL");return E.pathname=[I,M,ee,"raw",...ue].join("/"),E}catch(E){throw new Error(`Incorrect url: ${V}, ${E}`)}}function me(V,E){try{const I=new URL(V),M=I.pathname.split("/-/blob/")[1],[ee,...ae]=M.split("/");return I.pathname=["/api/v4/projects",E,"repository/files",encodeURIComponent(decodeURIComponent(ae.join("/"))),"raw"].join("/"),I.search=`?ref=${ee}`,I}catch(I){throw new Error(`Incorrect url: ${V}, ${I}`)}}async function le(V,E){const I=new URL(V);if(!I.pathname.includes("/-/blob/"))throw new Error("Please provide full path to yaml file from GitLab");try{const M=I.pathname.split("/-/blob/")[0],ee=new URL(`${I.origin}/api/v4/projects/${encodeURIComponent(M.replace(/^\//,""))}`),ae=await fetch(ee.toString(),Z(E)),ue=await ae.json();if(!ae.ok)throw new Error(`GitLab Error '${ue.error}', ${ue.error_description}`);return Number(ue.id)}catch(M){throw new Error(`Could not get GitLab project ID for: ${V}, ${M}`)}}const Le=class{constructor(E){this.integrationConfig=E}get type(){return"gitlab"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(E){return o(E)}resolveEditUrl(E){return $e(E,"edit")}};let Se=Le;ne(Se,"factory",({config:E})=>{var M;const I=yt((M=E.getOptionalConfigArray("integrations.gitlab"))!=null?M:[]);return i(I.map(ee=>new Le(ee)),ee=>ee.config.host)});function $e(V,E){return V.replace(/\/\-\/(blob|tree|edit)\//,`/-/${E}/`)}const Ze="amazonaws.com";function Xe(V){var Ne;const E=V.getOptionalString("endpoint"),I=(Ne=V.getOptionalBoolean("s3ForcePathStyle"))!=null?Ne:!1;let M,ee;if(E){try{const Ve=new URL(E);M=Ve.host,ee=Ve.pathname}catch{throw new Error(`invalid awsS3 integration config, endpoint '${E}' is not a valid URL`)}if(ee!=="/")throw new Error(`invalid awsS3 integration config, endpoints cannot contain path, got '${E}'`)}else M=Ze;const ae=V.getOptionalString("accessKeyId"),ue=V.getOptionalString("secretAccessKey"),Re=V.getOptionalString("roleArn");return{host:M,endpoint:E,s3ForcePathStyle:I,accessKeyId:ae,secretAccessKey:ue,roleArn:Re}}function _(V){const E=V.map(Xe);return E.some(I=>I.host===Ze)||E.push({host:Ze}),E}const We=class{get type(){return"awsS3"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}constructor(E){this.integrationConfig=E}resolveUrl(E){return o(E)}resolveEditUrl(E){return E}};let G=We;ne(G,"factory",({config:E})=>{var M;const I=_((M=E.getOptionalConfigArray("integrations.awsS3"))!=null?M:[]);return i(I.map(ee=>new We(ee)),ee=>ee.config.host)});class ${constructor(E){ne(this,"byType");this.byType=E}static fromConfig(E){return new $({awsS3:G.factory({config:E}),azure:L.factory({config:E}),bitbucket:se.factory({config:E}),gerrit:tt.factory({config:E}),github:ze.factory({config:E}),gitlab:Se.factory({config:E})})}get awsS3(){return this.byType.awsS3}get azure(){return this.byType.azure}get bitbucket(){return this.byType.bitbucket}get gerrit(){return this.byType.gerrit}get github(){return this.byType.github}get gitlab(){return this.byType.gitlab}list(){return Object.values(this.byType).flatMap(E=>E.list())}byUrl(E){return Object.values(this.byType).map(I=>I.byUrl(E)).find(Boolean)}byHost(E){return Object.values(this.byType).map(I=>I.byHost(E)).find(Boolean)}resolveUrl(E){const I=this.byUrl(E.base);return I?I.resolveUrl(E):o(E)}resolveEditUrl(E){const I=this.byUrl(E);return I?I.resolveEditUrl(E):E}}},46054:function(q,s,e){"use strict";var r={};e.r(r),e.d(r,{TechDocsPlugin:function(){return Xt.plugin}});var t=e(2784),l=e(47093),f=e(10289),y=e(49208),i=e(36964),o=e(20221);const m=[(0,i.createApiFactory)({api:i.discoveryApiRef,deps:{configApi:i.configApiRef},factory:({configApi:x})=>y.UrlPatternDiscovery.compile(`${x.getString("backend.baseUrl")}/api/{{ pluginId }}`)}),(0,i.createApiFactory)({api:i.alertApiRef,deps:{},factory:()=>new y.AlertApiForwarder}),(0,i.createApiFactory)({api:i.analyticsApiRef,deps:{},factory:()=>new y.NoOpAnalyticsApi}),(0,i.createApiFactory)({api:i.errorApiRef,deps:{alertApi:i.alertApiRef},factory:({alertApi:x})=>{const k=new y.ErrorAlerter(x,new y.ErrorApiForwarder);return y.UnhandledErrorForwarder.forward(k,{hidden:!1}),k}}),(0,i.createApiFactory)({api:i.storageApiRef,deps:{errorApi:i.errorApiRef},factory:({errorApi:x})=>y.WebStorage.create({errorApi:x})}),(0,i.createApiFactory)({api:i.fetchApiRef,deps:{configApi:i.configApiRef,identityApi:i.identityApiRef,discoveryApi:i.discoveryApiRef},factory:({configApi:x,identityApi:k,discoveryApi:he})=>(0,y.createFetchApi)({middleware:[y.FetchMiddlewares.resolvePluginProtocol({discoveryApi:he}),y.FetchMiddlewares.injectIdentityAuth({identityApi:k,config:x})]})}),(0,i.createApiFactory)({api:i.oauthRequestApiRef,deps:{},factory:()=>new y.OAuthRequestManager}),(0,i.createApiFactory)({api:i.googleAuthApiRef,deps:{discoveryApi:i.discoveryApiRef,oauthRequestApi:i.oauthRequestApiRef,configApi:i.configApiRef},factory:({discoveryApi:x,oauthRequestApi:k,configApi:he})=>y.GoogleAuth.create({discoveryApi:x,oauthRequestApi:k,environment:he.getOptionalString("auth.environment")})}),(0,i.createApiFactory)({api:i.microsoftAuthApiRef,deps:{discoveryApi:i.discoveryApiRef,oauthRequestApi:i.oauthRequestApiRef,configApi:i.configApiRef},factory:({discoveryApi:x,oauthRequestApi:k,configApi:he})=>y.MicrosoftAuth.create({discoveryApi:x,oauthRequestApi:k,environment:he.getOptionalString("auth.environment")})}),(0,i.createApiFactory)({api:i.githubAuthApiRef,deps:{discoveryApi:i.discoveryApiRef,oauthRequestApi:i.oauthRequestApiRef,configApi:i.configApiRef},factory:({discoveryApi:x,oauthRequestApi:k,configApi:he})=>y.GithubAuth.create({discoveryApi:x,oauthRequestApi:k,defaultScopes:["read:user"],environment:he.getOptionalString("auth.environment")})}),(0,i.createApiFactory)({api:i.oktaAuthApiRef,deps:{discoveryApi:i.discoveryApiRef,oauthRequestApi:i.oauthRequestApiRef,configApi:i.configApiRef},factory:({discoveryApi:x,oauthRequestApi:k,configApi:he})=>y.OktaAuth.create({discoveryApi:x,oauthRequestApi:k,environment:he.getOptionalString("auth.environment")})}),(0,i.createApiFactory)({api:i.gitlabAuthApiRef,deps:{discoveryApi:i.discoveryApiRef,oauthRequestApi:i.oauthRequestApiRef,configApi:i.configApiRef},factory:({discoveryApi:x,oauthRequestApi:k,configApi:he})=>y.GitlabAuth.create({discoveryApi:x,oauthRequestApi:k,environment:he.getOptionalString("auth.environment")})}),(0,i.createApiFactory)({api:i.oneloginAuthApiRef,deps:{discoveryApi:i.discoveryApiRef,oauthRequestApi:i.oauthRequestApiRef,configApi:i.configApiRef},factory:({discoveryApi:x,oauthRequestApi:k,configApi:he})=>y.OneLoginAuth.create({discoveryApi:x,oauthRequestApi:k,environment:he.getOptionalString("auth.environment")})}),(0,i.createApiFactory)({api:i.bitbucketAuthApiRef,deps:{discoveryApi:i.discoveryApiRef,oauthRequestApi:i.oauthRequestApiRef,configApi:i.configApiRef},factory:({discoveryApi:x,oauthRequestApi:k,configApi:he})=>y.BitbucketAuth.create({discoveryApi:x,oauthRequestApi:k,defaultScopes:["team"],environment:he.getOptionalString("auth.environment")})}),(0,i.createApiFactory)({api:i.atlassianAuthApiRef,deps:{discoveryApi:i.discoveryApiRef,oauthRequestApi:i.oauthRequestApiRef,configApi:i.configApiRef},factory:({discoveryApi:x,oauthRequestApi:k,configApi:he})=>y.AtlassianAuth.create({discoveryApi:x,oauthRequestApi:k,environment:he.getOptionalString("auth.environment")})}),(0,i.createApiFactory)({api:o.RV,deps:{discovery:i.discoveryApiRef,identity:i.identityApiRef,config:i.configApiRef},factory:({config:x,discovery:k,identity:he})=>o.iM.create({config:x,discovery:k,identity:he})})];var c=e(77277),g=e(9118),p=e(62833);function R({children:x}){return(0,f.GV)()?t.createElement(t.Fragment,null,x):t.createElement(f.VA,null,x)}const L=()=>t.createElement(g.ErrorPage,{status:"404",statusMessage:"PAGE NOT FOUND"}),U=({step:x,error:k})=>{let he="";return x==="load-config"?he=`The configuration failed to load, someone should have a look at this error: ${k.message}`:x==="load-chunk"&&(he=`Lazy loaded chunk failed to load, try to reload the page: ${k.message}`),t.createElement(R,null,t.createElement(g.ErrorPage,{status:"501",statusMessage:he}))},P=({error:x,resetError:k,plugin:he})=>t.createElement(g.ErrorPanel,{title:`Error in ${he==null?void 0:he.getId()}`,defaultExpanded:!0,error:x},t.createElement(c.Z,{variant:"outlined",onClick:k},"Retry")),Q={Progress:g.Progress,Router:p.VK,NotFoundErrorPage:L,BootErrorPage:U,ErrorBoundaryFallback:P};var D=e(43642),T=e(80079),b=e(90941),B=e(32915),N=e(40562),j=e(21853),se=e(60744),Ce=e(66569),xe=e(30254),He=e(13384),fe=e(15933),je=e(58838),Qe=e(86737),at=e(4989),et=e(44407),tt=e(18628),ot=e(84219),Ee=e(98685),Ge=e(39781);const lt={brokenImage:T.Z,catalog:tt.Z,scaffolder:B.Z,techdocs:N.Z,search:j.Z,chat:se.Z,dashboard:Ce.Z,docs:xe.Z,email:He.Z,github:je.Z,group:ot.Z,help:Qe.Z,"kind:api":fe.Z,"kind:component":et.Z,"kind:domain":D.Z,"kind:group":ot.Z,"kind:location":at.Z,"kind:system":b.Z,"kind:user":Ee.Z,user:Ee.Z,warning:Ge.Z};var Dt=e(73689),gt=e(48032);const Et={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")`},ct={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 ft(x,k){const Me=`linear-gradient(90deg, ${(x.length===1?[x[0],x[0]]:x).join(", ")})`,ke=`${k}, ${Me}`;return{colors:x,shape:k,backgroundImage:ke}}const It={home:ft(ct.teal,Et.wave),documentation:ft(ct.pinkSea,Et.wave2),tool:ft(ct.purpleSky,Et.round),service:ft(ct.marineBlue,Et.wave),website:ft(ct.veryBlue,Et.wave),library:ft(ct.rubyRed,Et.wave),other:ft(ct.darkGrey,Et.wave),app:ft(ct.toastyOrange,Et.wave),apis:ft(ct.teal,Et.wave2)},At='"Helvetica Neue", Helvetica, Roboto, Arial, sans-serif';function Bt(x){const{palette:k,fontFamily:he=At,defaultPageTheme:Me,pageTheme:ke=It}=x;if(!ke[Me])throw new Error(`${Me} is not defined in pageTheme.`);return{palette:k,props:{MuiGrid:{spacing:2},MuiSwitch:{color:"primary"}},typography:{fontFamily:he,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[Me],getPageTheme:({themeId:mt})=>{var v;return(v=ke[mt])!=null?v:ke[Me]}}}function Lt(x){return{MuiCssBaseline:{"@global":{html:{height:"100%",fontFamily:x.typography.fontFamily},body:{height:"100%",fontFamily:x.typography.fontFamily,"overscroll-behavior-y":"none"},a:{color:"inherit",textDecoration:"none"}}},MuiTableRow:{root:{"&:nth-of-type(odd)":{backgroundColor:x.palette.background.default}},hover:{"&:hover":{cursor:"pointer"}},head:{"&:nth-of-type(odd)":{backgroundColor:x.palette.background.paper}}},MuiTableCell:{root:{wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:x.spacing(3,2,3,2.5),borderBottom:0},sizeSmall:{padding:x.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:x.palette.link,minHeight:24,textTransform:"initial",letterSpacing:"0.07em","&:hover":{color:(0,gt.darken)(x.palette.link,.3),background:(0,gt.lighten)(x.palette.link,.95)},[x.breakpoints.up("md")]:{minWidth:120,fontSize:x.typography.pxToRem(14),fontWeight:500}},textColorPrimary:{color:x.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:x.spacing(1),marginBottom:x.spacing(1),color:x.palette.grey[900]},outlined:{color:x.palette.text.primary},label:{lineHeight:`${x.spacing(2.5)}px`,fontWeight:x.typography.fontWeightMedium,fontSize:`${x.spacing(1.75)}px`},labelSmall:{fontSize:`${x.spacing(1.5)}px`},deleteIcon:{color:x.palette.grey[500],width:`${x.spacing(3)}px`,height:`${x.spacing(3)}px`,margin:`0 ${x.spacing(.75)}px 0 -${x.spacing(.75)}px`},deleteIconSmall:{width:`${x.spacing(2)}px`,height:`${x.spacing(2)}px`,margin:`0 ${x.spacing(.5)}px 0 -${x.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 Ct(x){const k=Bt(x),he=(0,Dt.Z)(k),Me=Lt(he);return{...he,overrides:Me}}var ze=e(34505);const nt=Ct({palette:{type:"light",background:{default:"#F8F8F8"},status:{ok:"#1DB954",warning:"#FF9800",error:"#E22134",running:"#2E77D0",pending:"#FFED51",aborted:"#757575"},bursts:{fontColor:"#FEFEFE",slackChannelText:"#ddd",backgroundColor:{default:"#7C3699"},gradient:{linear:"linear-gradient(-137deg, #4BB8A5 0%, #187656 100%)"}},primary:{main:"#2E77D0"},banner:{info:"#2E77D0",error:"#E22134",text:"#FFFFFF",link:"#000000",warning:"#FF9800"},border:"#E6E6E6",textContrast:"#000000",textVerySubtle:"#DDD",textSubtle:"#6E6E6E",highlight:"#FFFBCC",errorBackground:"#FFEBEE",warningBackground:"#F59B23",infoBackground:"#ebf5ff",errorText:"#CA001B",infoText:"#004e8a",warningText:"#000000",linkHover:"#2196F3",link:"#0A6EBE",gold:ze.Z.A700,navigation:{background:"#171717",indicator:"#9BF0E1",color:"#b5b5b5",selectedColor:"#FFF",navItem:{hoverBackground:"#404040"},submenu:{background:"#404040"}},pinSidebarButton:{icon:"#181818",background:"#BDBDBD"},tabbar:{indicator:"#9BF0E1"}},defaultPageTheme:"home",pageTheme:It}),Ke=Ct({palette:{type:"dark",background:{default:"#333333"},status:{ok:"#71CF88",warning:"#FFB84D",error:"#F84C55",running:"#3488E3",pending:"#FEF071",aborted:"#9E9E9E"},bursts:{fontColor:"#FEFEFE",slackChannelText:"#ddd",backgroundColor:{default:"#7C3699"},gradient:{linear:"linear-gradient(-137deg, #4BB8A5 0%, #187656 100%)"}},primary:{main:"#9CC9FF",dark:"#82BAFD"},secondary:{main:"#FF88B2"},banner:{info:"#2E77D0",error:"#E22134",text:"#FFFFFF",link:"#000000",warning:"#FF9800"},border:"#E6E6E6",textContrast:"#FFFFFF",textVerySubtle:"#727272",textSubtle:"#CCCCCC",highlight:"#FFFBCC",errorBackground:"#FFEBEE",warningBackground:"#F59B23",infoBackground:"#ebf5ff",errorText:"#CA001B",infoText:"#004e8a",warningText:"#000000",linkHover:"#82BAFD",link:"#9CC9FF",gold:ze.Z.A700,navigation:{background:"#424242",indicator:"#9BF0E1",color:"#b5b5b5",selectedColor:"#FFF",navItem:{hoverBackground:"#404040"},submenu:{background:"#404040"}},pinSidebarButton:{icon:"#404040",background:"#BDBDBD"},tabbar:{indicator:"#9BF0E1"}},defaultPageTheme:"home",pageTheme:It});var pt=e(98192),rt=e(15222),yt=e(41547),X=e(87561);const Z=[{id:"light",title:"Light Theme",variant:"light",icon:t.createElement(rt.Z,null),Provider:({children:x})=>t.createElement(yt.Z,{theme:nt},t.createElement(X.ZP,null,x))},{id:"dark",title:"Dark Theme",variant:"dark",icon:t.createElement(pt.Z,null),Provider:({children:x})=>t.createElement(yt.Z,{theme:Ke},t.createElement(X.ZP,null,x))}];function te(x){var k,he,Me;return(0,y.createSpecializedApp)({...x,apis:(k=x==null?void 0:x.apis)!=null?k:[],bindRoutes:x==null?void 0:x.bindRoutes,components:{...Q,...x==null?void 0:x.components},configLoader:x==null?void 0:x.configLoader,defaultApis:m,icons:{...lt,...x==null?void 0:x.icons},plugins:(he=x==null?void 0:x.plugins)!=null?he:[],themes:(Me=x==null?void 0:x.themes)!=null?Me:Z})}var me=e(82394),le=e.n(me),Se=e(48023),$e=e(76635);async function Ze({storageApi:x}){var mt;const k=x.forBucket("settings"),he=x.forBucket("starredEntities"),Me=k.snapshot("starredEntities").value;if(!(0,$e.isArray)(Me))return;const ke=new Set((mt=he.snapshot("entityRefs").value)!=null?mt:[]);Me.filter($e.isString).map(v=>v.split(":")).filter(v=>v.length===4&&v[0]==="entity").map(([v,C,F,W])=>(0,Se.eE)({kind:C,namespace:F,name:W})).forEach(v=>ke.add(v)),await he.set("entityRefs",Array.from(ke)),await k.remove("starredEntities")}class Xe{constructor(k){ne(this,"settingsStore");ne(this,"starredEntities");ne(this,"subscribers",new Set);ne(this,"observable",new(le())(k=>(k.next(new Set(this.starredEntities)),this.subscribers.add(k),()=>{this.subscribers.delete(k)})));var he;Ze(k).then(),this.settingsStore=k.storageApi.forBucket("starredEntities"),this.starredEntities=new Set((he=this.settingsStore.snapshot("entityRefs").value)!=null?he:[]),this.settingsStore.observe$("entityRefs").subscribe({next:Me=>{var ke;this.starredEntities=new Set((ke=Me.value)!=null?ke:[]),this.notifyChanges()}})}async toggleStarred(k){this.starredEntities.has(k)?this.starredEntities.delete(k):this.starredEntities.add(k),await this.settingsStore.set("entityRefs",Array.from(this.starredEntities))}starredEntitie$(){return this.observable}notifyChanges(){for(const k of this.subscribers)k.next(new Set(this.starredEntities))}}var _=e(39398),G=e(49782),$=e(79692);const ie=(0,$.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",wordBreak:"break-all",marginBottom:"1rem"}});function ve(x){const k=x.result,he=ie();return React.createElement(Link,{to:k.location},React.createElement(ListItem,{alignItems:"flex-start",className:he.flexContainer},React.createElement(ListItemText,{className:he.itemText,primaryTypographyProps:{variant:"h6"},primary:k.title,secondary:k.text}),React.createElement(Box,null,k.kind&&React.createElement(Chip,{label:`Kind: ${k.kind}`,size:"small"}),k.lifecycle&&React.createElement(Chip,{label:`Lifecycle: ${k.lifecycle}`,size:"small"}))),React.createElement(Divider,{component:"li"}))}var Ie=e(30097),pe=e(53479),Te=e(95544),st=e(99688),re=e(12231),S=e(86136),z=e(49378),ce=e(85256),ye=e(61837),Ae=e(79784),Le=e(50758),We=e(49166),V=e(31654),E=e(43054);const I="catalog-entity",M={name:"catalog.entity.read",attributes:{action:"read"},resourceType:I},ee={name:"catalog.entity.create",attributes:{action:"create"}},ae={name:"catalog.entity.delete",attributes:{action:"delete"},resourceType:I},ue={name:"catalog.entity.refresh",attributes:{action:"update"},resourceType:I},Re={name:"catalog.location.read",attributes:{action:"read"}},Ne={name:"catalog.location.create",attributes:{action:"create"}},Ve={name:"catalog.location.delete",attributes:{action:"delete"}},bt=(0,$.Z)({button:{color:"white"}});function dt(x){var De;const{UNSTABLE_extraContextMenuItems:k,UNSTABLE_contextMenuOptions:he,onUnregisterEntity:Me,onInspectEntity:ke}=x,[mt,v]=(0,t.useState)(),C=bt(),F=(0,pe.useEntityPermission)(ae),W=Be=>{v(Be.currentTarget)},K=()=>{v(void 0)},J=k&&[...k.map(Be=>t.createElement(re.Z,{key:Be.title,onClick:()=>{K(),Be.onClick()}},t.createElement(S.Z,null,t.createElement(Be.Icon,{fontSize:"small"})),t.createElement(z.Z,{primary:Be.title}))),t.createElement(ce.Z,{key:"the divider is here!"})],ge=(De=!F.allowed||(he==null?void 0:he.disableUnregister))!=null?De:!1;return t.createElement(t.Fragment,null,t.createElement(ye.Z,{"aria-label":"more","aria-controls":"long-menu","aria-haspopup":"true",onClick:W,"data-testid":"menu-button",className:C.button},t.createElement(E.Z,null)),t.createElement(Ae.ZP,{open:Boolean(mt),onClose:K,anchorEl:mt,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}},t.createElement(Le.Z,null,J,t.createElement(re.Z,{onClick:()=>{K(),Me()},disabled:ge},t.createElement(S.Z,null,t.createElement(We.Z,{fontSize:"small"})),t.createElement(z.Z,{primary:"Unregister entity"})),t.createElement(re.Z,{onClick:()=>{K(),ke()}},t.createElement(S.Z,null,t.createElement(V.Z,{fontSize:"small"})),t.createElement(z.Z,{primary:"Inspect entity"})))))}const Wt="plugin.catalog.entityLayoutRoute",jt=()=>null;(0,i.attachComponentData)(jt,Wt,!0),(0,i.attachComponentData)(jt,"core.gatherMountPoints",!0);function Rt(x){const{entity:k,title:he}=x;return t.createElement(Te.Z,{display:"inline-flex",alignItems:"center",height:"1em",maxWidth:"100%"},t.createElement(Te.Z,{component:"span",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},he),k&&t.createElement(pe.FavoriteEntity,{entity:k}))}function St(x,k,he,Me){var C,F,W,K,J;const ke=(C=x!=null?x:Me==null?void 0:Me.kind)!=null?C:"",mt=(F=k!=null?k:Me==null?void 0:Me.metadata.namespace)!=null?F:"";return{headerTitle:`${(J=(K=(W=Me==null?void 0:Me.metadata.title)!=null?W:he)!=null?K:Me==null?void 0:Me.metadata.name)!=null?J:""}${mt&&mt!==Se.zG?` in ${mt}`:""}`,headerType:(()=>{let ge=ke.toLocaleLowerCase("en-US");return Me&&Me.spec&&"type"in Me.spec&&(ge+=" \u2014 ",ge+=Me.spec.type.toLocaleLowerCase("en-US")),ge})()}}function Nt(x){var Me;const{entity:k}=x,he=(0,pe.getEntityRelations)(k,Se.S4);return t.createElement(t.Fragment,null,he.length>0&&t.createElement(g.HeaderLabel,{label:"Owner",value:t.createElement(pe.EntityRefLinks,{entityRefs:he,defaultKind:"Group",color:"inherit"})}),((Me=k.spec)==null?void 0:Me.lifecycle)&&t.createElement(g.HeaderLabel,{label:"Lifecycle",value:k.spec.lifecycle}))}const An=x=>{var _e,Je,vt;const{UNSTABLE_extraContextMenuItems:k,UNSTABLE_contextMenuOptions:he,children:Me}=x,{kind:ke,namespace:mt,name:v}=(0,i.useRouteRefParams)(pe.entityRouteRef),{entity:C,loading:F,error:W}=(0,pe.useAsyncEntity)(),K=(0,f.TH)(),J=(0,i.useElementFilter)(Me,Ft=>Ft.selectByComponentData({key:Wt,withStrictError:"Child of EntityLayout must be an EntityLayout.Route"}).getElements().flatMap(({props:_t})=>{if(C){if(_t.if&&!_t.if(C))return[]}else return[];return[{path:_t.path,title:_t.title,children:_t.children,tabProps:_t.tabProps}]}),[C]),{headerTitle:ge,headerType:De}=St(ke,mt,v,C),[Be,Fe]=(0,t.useState)(!1),[Ue,we]=(0,t.useState)(!1),Ye=(0,f.s0)(),ht=async()=>{Fe(!1),we(!1),Ye("/")};return(0,t.useEffect)(()=>{Fe(!1),we(!1)},[K.pathname]),t.createElement(g.Page,{themeId:(vt=(Je=(_e=C==null?void 0:C.spec)==null?void 0:_e.type)==null?void 0:Je.toString())!=null?vt:"home"},t.createElement(g.Header,{title:t.createElement(Rt,{title:ge,entity:C}),pageTitleOverride:ge,type:De},C&&t.createElement(t.Fragment,null,t.createElement(Nt,{entity:C}),t.createElement(dt,{UNSTABLE_extraContextMenuItems:k,UNSTABLE_contextMenuOptions:he,onUnregisterEntity:()=>Fe(!0),onInspectEntity:()=>we(!0)}))),F&&t.createElement(g.Progress,null),C&&t.createElement(g.RoutedTabs,{routes:J}),W&&t.createElement(g.Content,null,t.createElement(st.Z,{severity:"error"},W.toString())),!F&&!W&&!C&&t.createElement(g.Content,null,t.createElement(g.WarningPanel,{title:"Entity not found"},"There is no ",ke," with the requested"," ",t.createElement(g.Link,{to:"https://backstage.io/docs/features/software-catalog/references"},"kind, namespace, and name"),".")),t.createElement(pe.UnregisterEntityDialog,{open:Be,entity:C,onConfirm:ht,onClose:()=>Fe(!1)}),t.createElement(pe.InspectEntityDialog,{open:Ue,entity:C,onClose:()=>we(!1)}))};An.Route=jt;var bn=e(10179);function Bn(x){const{open:k,onClose:he,onConfirm:Me,entity:ke}=x,[mt,v]=useState(!1),C=useApi(catalogApiRef),F=useApi(alertApiRef),W=async()=>{v(!0);try{const K=ke.metadata.uid;await C.removeEntityByUid(K),Me()}catch(K){assertError(K),F.post({message:K.message})}finally{v(!1)}};return React.createElement(Dialog,{open:k,onClose:he},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:mt,onClick:W},"Delete"),React.createElement(Button,{onClick:he,color:"primary"},"Cancel")))}var xn=e(47851);function Mn(x){var k,he;return((he=(k=x==null?void 0:x.metadata)==null?void 0:k.annotations)==null?void 0:he["backstage.io/orphan"])==="true"}function Gn(){const x=useNavigate(),k=useRouteRef(rootRouteRef),[he,Me]=useState(!1),{entity:ke}=useEntity(),mt=async()=>{Me(!1),x(k())};return React.createElement(React.Fragment,null,React.createElement(Alert,{severity:"warning",onClick:()=>Me(!0)},"This entity is not referenced by any location and is therefore not receiving updates. Click here to delete."),React.createElement(DeleteEntityDialog,{open:he,entity:ke,onConfirm:mt,onClose:()=>Me(!1)}))}var cr=e(30001);const ur=x=>x.error&&x.level==="error"&&x.type===ENTITY_STATUS_CATALOG_PROCESSING_TYPE;async function Kn(x,k){return{items:(await k.getEntityAncestors({entityRef:x})).items.map(ke=>{var C,F;return{errors:((F=(C=ke.entity.status)==null?void 0:C.items)!=null?F:[]).filter(ur).map(W=>W.error).filter(W=>Boolean(W)),entity:ke.entity}}).filter(ke=>ke.errors.length>0)}}async function Mr(x,k){const he=k.apis.get(catalogApiRef);if(!he)throw new Error(`No implementation available for ${catalogApiRef}`);return(await Kn(stringifyEntityRef(x),he)).items.length>0}function Zr(){const{entity:x}=useEntity(),k=stringifyEntityRef(x),he=useApi(catalogApiRef),{loading:Me,error:ke,value:mt}=useAsync(async()=>Kn(k,he),[k,he]);return ke?React.createElement(Box,{mb:1},React.createElement(ResponseErrorPanel,{error:ke})):Me||!mt?null:React.createElement(React.Fragment,null,mt.items.map((v,C)=>React.createElement(Box,{key:C,mb:1},stringifyEntityRef(x)!==stringifyEntityRef(v.entity)&&React.createElement(Box,{p:1},"The error below originates from"," ",React.createElement(EntityRefLink,{entityRef:v.entity})),v.errors.map((F,W)=>React.createElement(ResponseErrorPanel,{key:W,error:F})))))}var Nr=e(64279);const Yn="core.backstage.entitySwitch",Rn=x=>null;(0,i.attachComponentData)(Rn,Yn,!0);const Jn=x=>{var v,C;const{entity:k,loading:he}=(0,pe.useAsyncEntity)(),Me=(0,i.useApiHolder)(),ke=(0,i.useElementFilter)(x.children,F=>F.selectByComponentData({key:Yn,withStrictError:"Child of EntitySwitch is not an EntitySwitch.Case"}).getElements().flatMap(W=>{var ge;if(he)return[];const{if:K,children:J}=W.props;return k?[{if:(ge=K==null?void 0:K(k,{apis:Me}))!=null?ge:!0,children:J}]:[{if:K===void 0,children:J}]}),[Me,k,he]);return ke.some(F=>typeof F.if=="object"&&"then"in F.if)?t.createElement(dr,{results:ke}):(C=(v=ke.find(F=>F.if))==null?void 0:v.children)!=null?C:null};function dr({results:x}){const{loading:k,value:he}=(0,Nr.default)(async()=>{var ke;const Me=x.map(async({if:mt,children:v})=>{try{if(await mt)return v}catch{}return null});return(ke=(await Promise.all(Me)).find(Boolean))!=null?ke:null},[x]);return k||!he?null:he}Jn.Case=Rn;const Zn=null,fr=pe.CatalogFilterLayout.Filters,Mt=pe.CatalogFilterLayout.Content,Qt=(0,i.createPlugin)({id:"catalog",apis:[(0,i.createApiFactory)({api:pe.catalogApiRef,deps:{discoveryApi:i.discoveryApiRef,fetchApi:i.fetchApiRef},factory:({discoveryApi:x,fetchApi:k})=>new cr.MS({discoveryApi:x,fetchApi:k})}),(0,i.createApiFactory)({api:pe.starredEntitiesApiRef,deps:{storageApi:i.storageApiRef},factory:({storageApi:x})=>new Xe({storageApi:x})})],routes:{catalogIndex:xn._Z,catalogEntity:pe.entityRouteRef},externalRoutes:{createComponent:xn.yw,viewTechDoc:xn.jU}}),kn=Qt.provide((0,i.createRoutableExtension)({name:"CatalogIndexPage",component:()=>e.e(7758).then(e.bind(e,7758)).then(x=>x.CatalogPage),mountPoint:xn._Z})),mr=Qt.provide((0,i.createRoutableExtension)({name:"CatalogEntityPage",component:()=>e.e(6583).then(e.bind(e,96583)).then(x=>x.CatalogEntityPage),mountPoint:pe.entityRouteRef})),hr=Qt.provide((0,i.createComponentExtension)({name:"EntityAboutCard",component:{lazy:()=>Promise.resolve().then(e.bind(e,39398)).then(x=>x.AboutCard)}})),$r=Qt.provide((0,i.createComponentExtension)({name:"EntityLinksCard",component:{lazy:()=>e.e(1959).then(e.bind(e,81959)).then(x=>x.EntityLinksCard)}})),gr=Qt.provide((0,i.createComponentExtension)({name:"EntityHasSystemsCard",component:{lazy:()=>e.e(390).then(e.bind(e,60390)).then(x=>x.HasSystemsCard)}})),Qn=Qt.provide((0,i.createComponentExtension)({name:"EntityHasComponentsCard",component:{lazy:()=>e.e(4022).then(e.bind(e,4022)).then(x=>x.HasComponentsCard)}})),Xn=Qt.provide((0,i.createComponentExtension)({name:"EntityHasSubcomponentsCard",component:{lazy:()=>e.e(8792).then(e.bind(e,38792)).then(x=>x.HasSubcomponentsCard)}})),Ur=Qt.provide((0,i.createComponentExtension)({name:"EntityHasResourcesCard",component:{lazy:()=>e.e(1553).then(e.bind(e,11553)).then(x=>x.HasResourcesCard)}})),wr=Qt.provide((0,i.createComponentExtension)({name:"EntityDependsOnComponentsCard",component:{lazy:()=>e.e(8061).then(e.bind(e,48061)).then(x=>x.DependsOnComponentsCard)}})),zr=Qt.provide((0,i.createComponentExtension)({name:"EntityDependencyOfComponentsCard",component:{lazy:()=>e.e(6235).then(e.bind(e,56235)).then(x=>x.DependencyOfComponentsCard)}})),Sn=Qt.provide((0,i.createComponentExtension)({name:"EntityDependsOnResourcesCard",component:{lazy:()=>e.e(9028).then(e.bind(e,59028)).then(x=>x.DependsOnResourcesCard)}})),ln=Qt.provide((0,i.createComponentExtension)({name:"RelatedEntitiesCard",component:{lazy:()=>e.e(2426).then(e.bind(e,62426)).then(x=>x.RelatedEntitiesCard)}}));var Xt=e(82250),Cn=e(36356);class qn{constructor({configApi:k,discoveryApi:he,identityApi:Me}){ne(this,"configApi");ne(this,"discoveryApi");ne(this,"identityApi");this.configApi=k,this.discoveryApi=he,this.identityApi=Me}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getStorageUrl(){return`${await this.discoveryApi.getBaseUrl("techdocs")}/static/docs`}async getBuilder(){return this.configApi.getString("techdocs.builder")}async getEntityDocs(k,he){const ke=`${await this.getApiOrigin()}/${he}`,mt=await fetch(`${ke.endsWith("/")?ke:`${ke}/`}index.html`);if(mt.status===404)throw new Error("Page not found");return mt.text()}async syncEntityDocs(k){return"cached"}async getBaseUrl(k,he,Me){const ke=await this.getApiOrigin();return new URL(k,`${ke}/${Me}`).toString()}}class pr{constructor({configApi:k,discoveryApi:he,identityApi:Me}){ne(this,"configApi");ne(this,"discoveryApi");ne(this,"identityApi");this.configApi=k,this.discoveryApi=he,this.identityApi=Me}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getEntityMetadata(k){return{apiVersion:"backstage.io/v1alpha1",kind:"Component",metadata:{name:"local"},spec:{owner:"test",lifecycle:"experimental"}}}async getTechDocsMetadata(k){return{site_name:"Live preview environment",site_description:""}}}const Nn=[(0,i.createApiFactory)({api:Xt.techdocsStorageApiRef,deps:{configApi:i.configApiRef,discoveryApi:i.discoveryApiRef,identityApi:i.identityApiRef},factory:({configApi:x,discoveryApi:k,identityApi:he})=>new qn({configApi:x,discoveryApi:k,identityApi:he})}),(0,i.createApiFactory)({api:Xt.techdocsApiRef,deps:{configApi:i.configApiRef,discoveryApi:i.discoveryApiRef,identityApi:i.identityApiRef},factory:({configApi:x,discoveryApi:k,identityApi:he})=>new pr({configApi:x,discoveryApi:k,identityApi:he})}),(0,i.createApiFactory)({api:Cn.q3,deps:{configApi:i.configApiRef},factory:({configApi:x})=>Cn.ae.fromConfig(x)})];var Wr=e(86689),yr=e(58845);const $n=(0,$.Z)({svg:{width:"auto",height:30},path:{fill:"#7df3e1"}});var Un=()=>{const x=$n();return t.createElement("svg",{className:x.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 2079.95 456.05"},t.createElement("path",{className:x.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 On=(0,$.Z)({svg:{width:"auto",height:28},path:{fill:"#7df3e1"}});var wn=()=>{const x=On();return t.createElement("svg",{className:x.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 337.46 428.5"},t.createElement("path",{className:x.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 vr=(0,$.Z)({root:{width:g.sidebarConfig.drawerWidthClosed,height:3*g.sidebarConfig.logoHeight,display:"flex",flexFlow:"row nowrap",alignItems:"center",marginBottom:-14},link:{width:g.sidebarConfig.drawerWidthClosed,marginLeft:24}}),Ar=()=>{const x=vr(),{isOpen:k}=(0,t.useContext)(g.SidebarContext);return t.createElement("div",{className:x.root},t.createElement(Wr.Z,{component:p.OL,to:"/docs/default/component/local/",underline:"none",className:x.link},k?t.createElement(Un,null):t.createElement(wn,null)))},zn=({children:x})=>t.createElement(g.SidebarPage,null,t.createElement(g.Sidebar,null,t.createElement(Ar,null),t.createElement(g.SidebarDivider,null),t.createElement(g.SidebarItem,{icon:yr.Z,to:"/docs/default/component/local",text:"Docs Preview"})),x);var Rr=e(80030),Sr=e(32388),_n=e(4142);const er=(0,$.Z)(x=>({headerIcon:{color:x.palette.common.white,width:"32px",height:"32px"},content:{backgroundColor:x.palette.background.default},contentToolbar:{display:"flex",justifyContent:"flex-end",padding:0}}));var qt;(function(x){const k="light";x.LIGHT=k;const he="dark";x.DARK=he})(qt||(qt={}));const tr=(0,t.createContext)({theme:qt.LIGHT,toggleTheme:()=>{}}),nr=({children:x})=>{const[k,he]=(0,t.useState)(qt.LIGHT),Me=(0,t.useCallback)(()=>{he(v=>v===qt.LIGHT?qt.DARK:qt.LIGHT)},[he]),ke={theme:k,toggleTheme:Me},mt={[qt.LIGHT]:nt,[qt.DARK]:Ke};return t.createElement(tr.Provider,{value:ke},t.createElement(yt.Z,{theme:mt[k]},x))},Gt=()=>(0,t.useContext)(tr),cn=()=>{const x=er(),{theme:k,toggleTheme:he}=Gt(),Me={[qt.LIGHT]:{icon:_n.Z,title:"Dark theme"},[qt.DARK]:{icon:Sr.Z,title:"Light theme"}},{title:ke,icon:mt}=Me[k];return t.createElement(Te.Z,{display:"flex",alignItems:"center",mr:2},t.createElement(Rr.ZP,{title:ke,arrow:!0},t.createElement(ye.Z,{size:"small",onClick:he},t.createElement(mt,{className:x.headerIcon}))))},Cr=({onReady:x,entityRef:k})=>{const he=er();return t.createElement(g.Content,{className:he.content,"data-testid":"techdocs-content"},t.createElement(Xt.Reader,{onReady:x,entityRef:k,withSearch:!1}))},Tr=()=>{const x={site_name:"Live preview environment",site_description:""};return t.createElement(Xt.TechDocsReaderPage,null,({entityRef:k,onReady:he})=>t.createElement(t.Fragment,null,t.createElement(Xt.TechDocsReaderPageHeader,{entityRef:k,techDocsMetadata:x},t.createElement(cn,null)),t.createElement(Cr,{entityRef:k,onReady:he})))},rr=t.createElement(nr,null,t.createElement(Tr,null)),Tn={backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}},Pn={backend:{baseUrl:"http://localhost:7007"},techdocs:{builder:"external"}};async function Pr(){const x=await fetch("/.detect");return x.ok?(await x.text()).trim()==="techdocs-cli-server":!1}async function Ir(){const x=await(0,y.defaultConfigLoader)(),k=await Pr();return[...x,{context:"detected",data:k?Tn:Pn}]}const Wn=te({apis:Nn,configLoader:Ir,plugins:Object.values(r)}),In=Wn.getProvider(),Hr=Wn.getRouter(),Lr=t.createElement(y.FlatRoutes,null,t.createElement(f.Fg,{key:"/",to:"/docs/default/component/local/"}),t.createElement(f.AW,{path:"/catalog/:namespace/:kind/:name",element:t.createElement(mr,null)}),t.createElement(f.AW,{path:"/docs",element:t.createElement(Xt.TechDocsIndexPage,null)},t.createElement(Xt.DefaultTechDocsHome,null)),t.createElement(f.AW,{path:"/docs/:namespace/:kind/:name/*",element:t.createElement(Xt.TechDocsReaderPage,null)},rr));var xr=()=>t.createElement(In,null,t.createElement(Hr,null,t.createElement(zn,null,Lr)));l.render(t.createElement(xr,null),document.getElementById("root"))},76241:function(q,s,e){"use strict";e.d(s,{CT:function(){return i},EI:function(){return c},uW:function(){return f},Vt:function(){return o}});function r(){return typeof window!="undefined"&&window.Math===Math?window:typeof self!="undefined"&&self.Math===Math?self:Function("return this")()}const t=r(),l=g=>`__@backstage/${g}__`;function f(g,p){const R=l(g);let L=t[R];return L||(L=p(),t[R]=L,L)}var y=e(2784);function i(g){return f(g,()=>(0,y.createContext)(void 0))}function o(g){return(0,y.useContext)(i(g))}function m(g){return{set(p){globalThis[`__@backstage/${g}__`]=createContext(createVersionedValueMap(p))},reset(){delete globalThis[`__@backstage/${g}__`]}}}function c(g){return Object.freeze(g),{atVersion(p){return g[p]}}}},53479:function(q,s,e){"use strict";e.d(s,{AsyncEntityProvider:function(){return N},CATALOG_FILTER_EXISTS:function(){return r.n3},CatalogFilterLayout:function(){return T},EntityKindFilter:function(){return X},EntityLifecyclePicker:function(){return ee},EntityListProvider:function(){return Et},EntityOwnerPicker:function(){return Ne},EntityRefLink:function(){return rt},EntityRefLinks:function(){return yt},EntityTable:function(){return St},EntityTagPicker:function(){return Bn},EntityTypePicker:function(){return Gn},FavoriteEntity:function(){return Nr},InspectEntityDialog:function(){return Pr},UnregisterEntityDialog:function(){return br},UserListPicker:function(){return ke},catalogApiRef:function(){return l},entityRouteRef:function(){return Ct},getEntityRelations:function(){return Ge},getEntitySourceLocation:function(){return lt},humanizeEntityRef:function(){return nt},starredEntitiesApiRef:function(){return f},useAsyncEntity:function(){return Ce},useEntity:function(){return se},useEntityList:function(){return ct},useEntityOwnership:function(){return pe},useEntityPermission:function(){return st},useRelatedEntities:function(){return _},useStarredEntities:function(){return ie}});var r=e(30001),t=e(36964);const l=(0,t.createApiRef)({id:"plugin.catalog.service"}),f=(0,t.createApiRef)({id:"catalog-react.starred-entities"});var y=e(82394);class i{constructor(){ne(this,"starredEntities",new Set);ne(this,"subscribers",new Set);ne(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 F of this.subscribers)F.next(new Set(this.starredEntities))}starredEntitie$(){return this.observable}}var o=e(2784),m=e(41156),c=e(60364),g=e(77277),p=e(4190),R=e(95544),L=e(90436),U=e(60905),P=e(36444);const Q=v=>{const C=(0,m.Z)(J=>J.breakpoints.down("md")),F=(0,c.Z)(),[W,K]=(0,o.useState)(!1);return C?o.createElement(o.Fragment,null,o.createElement(g.Z,{style:{marginTop:F.spacing(1),marginLeft:F.spacing(1)},onClick:()=>K(!0),startIcon:o.createElement(P.Z,null)},"Filters"),o.createElement(p.ZP,{open:W,onClose:()=>K(!1),anchor:"left",disableAutoFocus:!0,keepMounted:!0,variant:"temporary"},o.createElement(R.Z,{m:2},o.createElement(L.Z,{variant:"h6",component:"h2",style:{marginBottom:F.spacing(1)}},"Filters"),v.children))):o.createElement(U.Z,{item:!0,lg:2},v.children)},D=v=>o.createElement(U.Z,{item:!0,xs:12,lg:10},v.children),T=v=>o.createElement(U.Z,{container:!0,style:{position:"relative"}},v.children);T.Filters=Q,T.Content=D;var b=e(76241);const B=(0,b.CT)("entity-context"),N=({children:v,entity:C,loading:F,error:W,refresh:K})=>{const J={entity:C,loading:F,error:W,refresh:K};return o.createElement(B.Provider,{value:(0,b.EI)({1:J})},v)},j=({entity:v,children:C})=>React.createElement(N,{entity:v,loading:!Boolean(v),error:void 0,refresh:void 0,children:C});function se(){const v=(0,b.Vt)("entity-context");if(!v)throw new Error("Entity context is not available");const C=v.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 v=(0,b.Vt)("entity-context");if(!v)throw new Error("Entity context is not available");const C=v.atVersion(1);if(!C)throw new Error("EntityContext v1 not available");const{entity:F,loading:W,error:K,refresh:J}=C;return{entity:F,loading:W,error:K,refresh:J}}var xe=e(76635),He=e(19126),fe=e.n(He),je=e(10289),Qe=e(69294),at=e(48760),et=e(90736);function tt(v){return v.reduce((C,F)=>({...C,...F.getCatalogFilters?F.getCatalogFilters():{}}),{})}function ot(v){return C=>v.every(F=>!F.filterEntity||F.filterEntity(C))}var Ee=e(48023);function Ge(v,C,F){var K;let W=((K=v==null?void 0:v.relations)==null?void 0:K.filter(J=>J.type===C).map(J=>(0,Ee.of)(J.targetRef)))||[];return(F==null?void 0:F.kind)&&(W=W.filter(J=>J.kind.toLocaleLowerCase("en-US")===F.kind.toLocaleLowerCase("en-US"))),W}function lt(v,C){var W;const F=(W=v.metadata.annotations)==null?void 0:W[Ee.M6];if(!!F)try{const K=(0,Ee.Ou)(F),J=C.byUrl(K.target);return{locationTargetUrl:K.target,integrationType:J==null?void 0:J.type}}catch{return}}function Dt(v,C){const F=new Set([...getEntityRelations(v,RELATION_MEMBER_OF,{kind:"group"}),...v?[getCompoundEntityRef(v)]:[]].map(stringifyEntityRef)),W=getEntityRelations(C,RELATION_OWNED_BY).map(stringifyEntityRef);for(const K of W)if(F.has(K))return!0;return!1}const gt=(0,o.createContext)(void 0),Et=({children:v})=>{const C=(0,et.default)(),F=(0,t.useApi)(l),[W,K]=(0,o.useState)({}),J=(0,je.TH)(),ge=(0,o.useMemo)(()=>{var _e;return(_e=fe().parse(J.search,{ignoreQueryPrefix:!0}).filters)!=null?_e:{}},[J]),[De,Be]=(0,o.useState)(()=>({appliedFilters:{},entities:[],backendEntities:[]})),[{loading:Fe,error:Ue},we]=(0,Qe.default)(async()=>{var Kt;const _e=(0,xe.compact)(Object.values(W)),Je=ot(_e),vt=tt(_e),Ft=tt((0,xe.compact)(Object.values(De.appliedFilters))),_t=Object.keys(W).reduce((Yt,pn)=>{const un=W[pn];return(un==null?void 0:un.toQueryValue)&&(Yt[pn]=un.toQueryValue()),Yt},{});if((0,xe.isEqual)(Ft,vt))Be({appliedFilters:W,backendEntities:De.backendEntities,entities:De.backendEntities.filter(Je)});else{const Yt=await F.getEntities({filter:vt});Be({appliedFilters:W,backendEntities:Yt.items,entities:Yt.items.filter(Je)})}if(C()){const Yt=fe().parse(J.search,{ignoreQueryPrefix:!0}),pn=fe().stringify({...Yt,filters:_t},{addQueryPrefix:!0,arrayFormat:"repeat"}),un=`${window.location.pathname}${pn}`;(Kt=window.history)==null||Kt.replaceState(null,document.title,un)}},[F,ge,W,De],{loading:!0});(0,at.Z)(we,10,[W]);const Ye=(0,o.useCallback)(_e=>{K(Je=>{const vt=typeof _e=="function"?_e(Je):_e;return{...Je,...vt}})},[]),ht=(0,o.useMemo)(()=>({filters:De.appliedFilters,entities:De.entities,backendEntities:De.backendEntities,updateFilters:Ye,queryParameters:ge,loading:Fe,error:Ue}),[De,Ye,ge,Fe,Ue]);return o.createElement(gt.Provider,{value:ht},v)};function ct(){const v=(0,o.useContext)(gt);if(!v)throw new Error("useEntityList must be used within EntityListProvider");return v}var ft=e(64279),It=e(18149),At=e.n(It),Bt=e(829),Lt=e.n(Bt);const Ct=(0,b.uW)("catalog:entity-route-ref",()=>(0,t.createRouteRef)({id:"catalog:entity",params:["namespace","kind","name"]}));function ze(v){var C,F;return{kind:v.kind.toLocaleLowerCase("en-US"),namespace:(F=(C=v.metadata.namespace)==null?void 0:C.toLocaleLowerCase("en-US"))!=null?F:DEFAULT_NAMESPACE,name:v.metadata.name}}function nt(v,C){const F=C==null?void 0:C.defaultKind;let W,K,J;return"metadata"in v?(W=v.kind,K=v.metadata.namespace,J=v.metadata.name):(W=v.kind,K=v.namespace,J=v.name),K===Ee.zG&&(K=void 0),W=W.toLocaleLowerCase("en-US"),W=F&&F.toLocaleLowerCase("en-US")===W?void 0:W,`${W?`${W}:`:""}${K?`${K}/`:""}${J}`}var Ke=e(9118),pt=e(80030);const rt=(0,o.forwardRef)((v,C)=>{var _e;const{entityRef:F,defaultKind:W,title:K,children:J,...ge}=v,De=(0,t.useRouteRef)(Ct);let Be,Fe,Ue;if(typeof F=="string"){const Je=(0,Ee.of)(F);Be=Je.kind,Fe=Je.namespace,Ue=Je.name}else"metadata"in F?(Be=F.kind,Fe=F.metadata.namespace,Ue=F.metadata.name):(Be=F.kind,Fe=F.namespace,Ue=F.name);Be=Be.toLocaleLowerCase("en-US"),Fe=(_e=Fe==null?void 0:Fe.toLocaleLowerCase("en-US"))!=null?_e:Ee.zG;const we={kind:Be,namespace:Fe,name:Ue},Ye=nt({kind:Be,namespace:Fe,name:Ue},{defaultKind:W}),ht=o.createElement(Ke.Link,{...ge,ref:C,to:De(we)},J,!J&&(K!=null?K:Ye));return K?o.createElement(pt.ZP,{title:Ye},ht):ht}),yt=({entityRefs:v,defaultKind:C,...F})=>o.createElement(o.Fragment,null,v.map((W,K)=>o.createElement(o.Fragment,{key:K},K>0&&", ",o.createElement(rt,{...F,entityRef:W,defaultKind:C}))));class X{constructor(C){this.value=C}getCatalogFilters(){return{kind:this.value}}toQueryValue(){return this.value}}class Z{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 te{constructor(C){this.values=C}filterEntity(C){return this.values.every(F=>{var W;return((W=C.metadata.tags)!=null?W:[]).includes(F)})}toQueryValue(){return this.values}}class me{constructor(C){this.value=C}filterEntity(C){var W;const F=this.value.toLocaleUpperCase("en-US");return C.metadata.name.toLocaleUpperCase("en-US").includes(F)||`${C.metadata.title}`.toLocaleUpperCase("en-US").includes(F)||((W=C.metadata.tags)==null?void 0:W.join("").toLocaleUpperCase("en-US").indexOf(F))!==-1}}class le{constructor(C){this.values=C}filterEntity(C){return this.values.some(F=>Ge(C,Ee.S4).some(W=>nt(W,{defaultKind:"group"})===F))}toQueryValue(){return this.values}}class Se{constructor(C){this.values=C}filterEntity(C){return this.values.some(F=>{var W;return((W=C.spec)==null?void 0:W.lifecycle)===F})}toQueryValue(){return this.values}}class $e{constructor(C,F,W){this.value=C,this.isOwnedEntity=F,this.isStarredEntity=W}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 Ze(){var Je;const v=(0,t.useApi)(l),{filters:{kind:C,type:F},queryParameters:W,updateFilters:K}=ct(),J=(0,o.useMemo)(()=>[W.type].flat().filter(Boolean),[W]),[ge,De]=(0,o.useState)(J.length?J:(Je=F==null?void 0:F.getTypes())!=null?Je:[]);(0,o.useEffect)(()=>{J.length&&De(J)},[J]);const[Be,Fe]=(0,o.useState)([]),Ue=(0,o.useMemo)(()=>C==null?void 0:C.value,[C]),{error:we,loading:Ye,value:ht}=(0,ft.default)(async()=>Ue?await v.getEntityFacets({filter:{kind:Ue},facets:["spec.type"]}).then(Ft=>Ft.facets["spec.type"]||[]):[],[Ue,v]),_e=(0,o.useRef)(ht);return(0,o.useEffect)(()=>{const vt=_e.current;if(_e.current=ht,Ye||!Ue||vt===ht||!ht)return;const Ft=Lt()(ht,Kt=>-Kt.count).map(Kt=>Kt.value);Fe(Ft);const _t=ge.filter(Kt=>Ft.includes(Kt));At()(ge,_t)||De(_t)},[Ye,Ue,ge,De,ht]),(0,o.useEffect)(()=>{K({type:ge.length?new Z(ge):void 0})},[ge,K]),{loading:Ye,error:we,availableTypes:Be,selectedTypes:ge,setSelectedTypes:De}}const Xe=20;function _(v,C){var Be,Fe;const F=(Be=C==null?void 0:C.type)==null?void 0:Be.toLocaleLowerCase("en-US"),W=(Fe=C==null?void 0:C.kind)==null?void 0:Fe.toLocaleLowerCase("en-US"),K=(0,t.useApi)(l),{loading:J,value:ge,error:De}=(0,ft.default)(async()=>{var _e;const Ue=(_e=v.relations)==null?void 0:_e.map(Je=>({type:Je.type,target:(0,Ee.of)(Je.targetRef)})).filter(Je=>(!F||Je.type.toLocaleLowerCase("en-US")===F)&&(!W||Je.target.kind===W));if(!Ue)return[];const we=Object.values((0,xe.groupBy)(Ue,({target:Je})=>`${Je.kind}:${Je.namespace}`.toLocaleLowerCase("en-US"))),Ye=[];for(const Je of we)Ye.push({kind:Je[0].target.kind,namespace:Je[0].target.namespace,nameBatches:(0,xe.chunk)(Je.map(vt=>vt.target.name),Xe)});return(await Promise.all(Ye.flatMap(Je=>Je.nameBatches.map(vt=>K.getEntities({filter:{kind:Je.kind,"metadata.namespace":Je.namespace,"metadata.name":vt}}))))).flatMap(Je=>Je.items)},[v,F,W]);return{entities:ge,loading:J,error:De}}var G=e(72164);function $(v){return typeof v=="string"?v:(0,Ee.eE)(v)}function ie(){const v=(0,t.useApi)(f),C=(0,G.Z)(v.starredEntitie$(),new Set),F=(0,o.useCallback)(K=>C.has($(K)),[C]),W=(0,o.useCallback)(K=>v.toggleStarred($(K)).then(),[v]);return{starredEntities:C,toggleStarredEntity:W,isStarredEntity:F}}function ve(v){return typeof v=="string"?v:(0,Ee.eE)(v)}function Ie(v){const C=(0,t.useApi)(f),[F,W]=(0,o.useState)(!1);return(0,o.useEffect)(()=>{const J=C.starredEntitie$().subscribe({next(ge){W(ge.has(ve(v)))}});return()=>{J.unsubscribe()}},[v,C]),{toggleStarredEntity:(0,o.useCallback)(()=>C.toggleStarred(ve(v)).then(),[v,C]),isStarredEntity:F}}function pe(){const v=(0,t.useApi)(t.identityApiRef),{loading:C,value:F}=(0,ft.default)(async()=>{const{ownershipEntityRefs:K}=await v.getBackstageIdentity();return K},[]),W=(0,o.useMemo)(()=>{const K=new Set(F!=null?F:[]);return J=>{const ge=Ge(J,Ee.S4).map(Ee.eE);for(const De of ge)if(K.has(De))return!0;return!1}},[F]);return(0,o.useMemo)(()=>({loading:C,isOwnedEntity:W}),[C,W])}var Te=e(20221);function st(v){const{entity:C,loading:F,error:W}=Ce(),{allowed:K,loading:J,error:ge}=(0,Te.gI)(v,C?(0,Ee.eE)(C):void 0);return F||J?{loading:!0,allowed:!1}:W?{loading:!1,allowed:!1,error:W}:{loading:!1,allowed:K,error:ge}}const re=v=>{var ge;const{initialFilter:C,hidden:F}=v,{updateFilters:W,queryParameters:K}=useEntityList(),[J]=useState((ge=[K.kind].flat()[0])!=null?ge:C);return useEffect(()=>{W({kind:J?new EntityKindFilter(J):void 0})},[J,W]),F?null:React.createElement(Alert,{severity:"warning"},"Kind filter not yet available")};var S=e(79692),z=e(5806),ce=e(21324),ye=e(86619),Ae=e(19996),Le=e(25505),We=e(38016),V=e(88013);const E=(0,S.Z)({input:{}},{name:"CatalogReactEntityLifecyclePicker"}),I=o.createElement(Le.Z,{fontSize:"small"}),M=o.createElement(Ae.Z,{fontSize:"small"}),ee=()=>{var Fe,Ue;const v=E(),{updateFilters:C,backendEntities:F,filters:W,queryParameters:K}=ct(),J=(0,o.useMemo)(()=>[K.lifecycles].flat().filter(Boolean),[K]),[ge,De]=(0,o.useState)(J.length?J:(Ue=(Fe=W.lifecycles)==null?void 0:Fe.values)!=null?Ue:[]);(0,o.useEffect)(()=>{J.length&&De(J)},[J]),(0,o.useEffect)(()=>{C({lifecycles:ge.length?new Se(ge):void 0})},[ge,C]);const Be=(0,o.useMemo)(()=>[...new Set(F.map(we=>{var Ye;return(Ye=we.spec)==null?void 0:Ye.lifecycle}).filter(Boolean))].sort(),[F]);return Be.length?o.createElement(R.Z,{pb:1,pt:1},o.createElement(L.Z,{variant:"button"},"Lifecycle"),o.createElement(V.ZP,{"aria-label":"Lifecycle",multiple:!0,options:Be,value:ge,onChange:(we,Ye)=>De(Ye),renderOption:(we,{selected:Ye})=>o.createElement(z.Z,{control:o.createElement(ce.Z,{icon:I,checkedIcon:M,checked:Ye}),label:we}),size:"small",popupIcon:o.createElement(We.Z,{"data-testid":"lifecycle-picker-expand"}),renderInput:we=>o.createElement(ye.Z,{...we,className:v.input,variant:"outlined"})})):null},ae=(0,S.Z)({input:{}},{name:"CatalogReactEntityOwnerPicker"}),ue=o.createElement(Le.Z,{fontSize:"small"}),Re=o.createElement(Ae.Z,{fontSize:"small"}),Ne=()=>{var Fe,Ue;const v=ae(),{updateFilters:C,backendEntities:F,filters:W,queryParameters:K}=ct(),J=(0,o.useMemo)(()=>[K.owners].flat().filter(Boolean),[K]),[ge,De]=(0,o.useState)(J.length?J:(Ue=(Fe=W.owners)==null?void 0:Fe.values)!=null?Ue:[]);(0,o.useEffect)(()=>{J.length&&De(J)},[J]),(0,o.useEffect)(()=>{C({owners:ge.length?new le(ge):void 0})},[ge,C]);const Be=(0,o.useMemo)(()=>[...new Set(F.flatMap(we=>Ge(we,Ee.S4).map(Ye=>nt(Ye,{defaultKind:"group"}))).filter(Boolean))].sort(),[F]);return Be.length?o.createElement(R.Z,{pb:1,pt:1},o.createElement(L.Z,{variant:"button"},"Owner"),o.createElement(V.ZP,{multiple:!0,"aria-label":"Owner",options:Be,value:ge,onChange:(we,Ye)=>De(Ye),renderOption:(we,{selected:Ye})=>o.createElement(z.Z,{control:o.createElement(ce.Z,{icon:ue,checkedIcon:Re,checked:Ye}),label:we}),size:"small",popupIcon:o.createElement(We.Z,{"data-testid":"owner-picker-expand"}),renderInput:we=>o.createElement(ye.Z,{...we,className:v.input,variant:"outlined"})})):null},Ve=(0,S.Z)(v=>({searchToolbar:{paddingLeft:0,paddingRight:0},input:{}}),{name:"CatalogReactEntitySearchBar"}),bt=()=>{var J,ge;const v=Ve(),{filters:C,updateFilters:F}=useEntityList(),[W,K]=useState((ge=(J=C.text)==null?void 0:J.value)!=null?ge:"");return useDebounce(()=>{F({text:W.length?new EntityTextFilter(W):void 0})},250,[W,F]),React.createElement(Toolbar,{className:v.searchToolbar},React.createElement(FormControl,null,React.createElement(Input,{id:"input-with-icon-adornment",className:v.input,placeholder:"Search",autoComplete:"off",onChange:De=>K(De.target.value),value:W,startAdornment:React.createElement(InputAdornment,{position:"start"},React.createElement(Search,null)),endAdornment:React.createElement(InputAdornment,{position:"end"},React.createElement(IconButton,{"aria-label":"clear search",onClick:()=>K(""),edge:"end",disabled:W.length===0},React.createElement(Clear,null)))})))},dt=Object.freeze({createEntityRefColumn(v){const{defaultKind:C}=v;function F(W){var K;return((K=W.metadata)==null?void 0:K.title)||nt(W,{defaultKind:C})}return{title:"Name",highlight:!0,customFilterAndSearch(W,K){return F(K).includes(W)},customSort(W,K){return F(W).localeCompare(F(K))},render:W=>{var K;return o.createElement(rt,{entityRef:W,defaultKind:C,title:(K=W.metadata)==null?void 0:K.title})}}},createEntityRelationColumn({title:v,relation:C,defaultKind:F,filter:W}){function K(ge){return Ge(ge,C,W)}function J(ge){return K(ge).map(De=>nt(De,{defaultKind:F})).join(", ")}return{title:v,customFilterAndSearch(ge,De){return J(De).includes(ge)},customSort(ge,De){return J(ge).localeCompare(J(De))},render:ge=>o.createElement(yt,{entityRefs:K(ge),defaultKind:F})}},createOwnerColumn(){return this.createEntityRelationColumn({title:"Owner",relation:Ee.S4,defaultKind:"group"})},createDomainColumn(){return this.createEntityRelationColumn({title:"Domain",relation:Ee.cz,defaultKind:"domain",filter:{kind:"domain"}})},createSystemColumn(){return this.createEntityRelationColumn({title:"System",relation:Ee.cz,defaultKind:"system",filter:{kind:"system"}})},createMetadataDescriptionColumn(){return{title:"Description",field:"metadata.description",render:v=>o.createElement(Ke.OverflowTooltip,{text:v.metadata.description,placement:"bottom-start",line:2}),width:"auto"}},createSpecLifecycleColumn(){return{title:"Lifecycle",field:"spec.lifecycle"}},createSpecTypeColumn(){return{title:"Type",field:"spec.type"}}}),Wt=[dt.createEntityRefColumn({defaultKind:"system"}),dt.createDomainColumn(),dt.createOwnerColumn(),dt.createMetadataDescriptionColumn()],jt=[dt.createEntityRefColumn({defaultKind:"component"}),dt.createSystemColumn(),dt.createOwnerColumn(),dt.createSpecTypeColumn(),dt.createSpecLifecycleColumn(),dt.createMetadataDescriptionColumn()],Rt=(0,S.Z)(v=>({empty:{padding:v.spacing(2),display:"flex",justifyContent:"center"}})),St=v=>{const{entities:C,title:F,emptyContent:W,variant:K="gridItem",columns:J}=v,ge=Rt(),De={minWidth:"0",width:"100%"};return K==="gridItem"&&(De.height="calc(100% - 10px)"),o.createElement(Ke.Table,{columns:J,title:F,style:De,emptyContent:W&&o.createElement("div",{className:ge.empty},W),options:{search:!1,paging:!1,actionsColumnIndex:-1,padding:"dense"},data:C})};St.columns=dt,St.systemEntityColumns=Wt,St.componentEntityColumns=jt;const Nt=(0,S.Z)({input:{}},{name:"CatalogReactEntityTagPicker"}),An=o.createElement(Le.Z,{fontSize:"small"}),bn=o.createElement(Ae.Z,{fontSize:"small"}),Bn=()=>{var Fe,Ue;const v=Nt(),{updateFilters:C,backendEntities:F,filters:W,queryParameters:K}=ct(),J=(0,o.useMemo)(()=>[K.tags].flat().filter(Boolean),[K]),[ge,De]=(0,o.useState)(J.length?J:(Ue=(Fe=W.tags)==null?void 0:Fe.values)!=null?Ue:[]);(0,o.useEffect)(()=>{J.length&&De(J)},[J]),(0,o.useEffect)(()=>{C({tags:ge.length?new te(ge):void 0})},[ge,C]);const Be=(0,o.useMemo)(()=>[...new Set(F.flatMap(we=>we.metadata.tags).filter(Boolean))].sort(),[F]);return Be.length?o.createElement(R.Z,{pb:1,pt:1},o.createElement(L.Z,{variant:"button"},"Tags"),o.createElement(V.ZP,{multiple:!0,"aria-label":"Tags",options:Be,value:ge,onChange:(we,Ye)=>De(Ye),renderOption:(we,{selected:Ye})=>o.createElement(z.Z,{control:o.createElement(ce.Z,{icon:An,checkedIcon:bn,checked:Ye}),label:we}),size:"small",popupIcon:o.createElement(We.Z,{"data-testid":"tag-picker-expand"}),renderInput:we=>o.createElement(ye.Z,{...we,className:v.input,variant:"outlined"})})):null};var xn=e(82108),Mn=e.n(xn);const Gn=v=>{var Fe;const{hidden:C,initialFilter:F}=v,W=(0,t.useApi)(t.alertApiRef),{error:K,availableTypes:J,selectedTypes:ge,setSelectedTypes:De}=Ze();if((0,o.useEffect)(()=>{K&&W.post({message:"Failed to load entity types",severity:"error"}),F&&De([F])},[K,W,F,De]),J.length===0||K)return null;const Be=[{value:"all",label:"All"},...J.map(Ue=>({value:Ue,label:Mn()(Ue)}))];return C?null:o.createElement(R.Z,{pb:1,pt:1},o.createElement(Ke.Select,{label:"Type",items:Be,selected:(Fe=Be.length>1?ge[0]:void 0)!=null?Fe:"all",onChange:Ue=>De(Ue==="all"?[]:[String(Ue)])}))};var cr=e(15459),ur=e(61837),Kn=e(11640),Mr=e(28347);const Zr=(0,cr.Z)({root:{color:"#f3ba37"}})(Kn.Z),Nr=v=>{const{toggleStarredEntity:C,isStarredEntity:F}=Ie(v.entity);return o.createElement(ur.Z,{color:"inherit",...v,onClick:()=>C()},o.createElement(pt.ZP,{title:F?"Remove from favorites":"Add to favorites"},F?o.createElement(Zr,null):o.createElement(Mr.Z,null)))};var Yn=e(8629),Rn=e(79249),Jn=e(38724),dr=e(99152),Zn=e(6487),fr=e(49429),Mt=e(55999),Qt=e(72779),kn=e.n(Qt),mr=e(39412);const hr=mr.Z;function $r(v,C){if(v)return v.toLocaleLowerCase("en-US");if(C)try{return(0,Ee.of)(C).kind.toLocaleLowerCase("en-US")}catch{return}}function gr(v,C){const F=(0,t.useApp)(),W=$r(v,C);return W&&F.getSystemIcon(`kind:${W}`)||hr}function Qn(v){const{kind:C,entityRef:F,...W}=v,K=gr(C,F);return o.createElement(K,{...W})}const Xn=(0,S.Z)(v=>({node:{fill:v.palette.grey[300],stroke:v.palette.grey[300],"&.primary":{fill:v.palette.primary.light,stroke:v.palette.primary.light},"&.secondary":{fill:v.palette.secondary.light,stroke:v.palette.secondary.light}},text:{fill:v.palette.getContrastText(v.palette.grey[300]),"&.primary":{fill:v.palette.primary.contrastText},"&.secondary":{fill:v.palette.secondary.contrastText},"&.focused":{fontWeight:"bold"}},clickable:{cursor:"pointer"}}));function Ur(v){const C=(0,t.useApi)(l),F=(0,Ee.eE)(v),{loading:W,error:K,value:J}=(0,ft.default)(async()=>{const ge=await C.getEntityAncestors({entityRef:F}),De=new Array,Be=new Array;for(const Fe of ge.items){const Ue=(0,Ee.eE)(Fe.entity),we=Ue===ge.rootEntityRef;De.push({id:Ue,root:we,...Fe.entity});for(const Ye of Fe.parentEntityRefs)Be.push({from:Ue,to:Ye})}return{nodes:De,edges:Be}},[F]);return{loading:W,error:K,nodes:(J==null?void 0:J.nodes)||[],edges:(J==null?void 0:J.edges)||[]}}function wr({node:v}){const C=Xn(),F=(0,je.s0)(),W=(0,t.useRouteRef)(Ct),[K,J]=(0,o.useState)(0),[ge,De]=(0,o.useState)(0),Be=(0,o.useRef)(null);(0,o.useLayoutEffect)(()=>{if(Be.current){let{height:vt,width:Ft}=Be.current.getBBox();vt=Math.round(vt),Ft=Math.round(Ft),(vt!==ge||Ft!==K)&&(J(Ft),De(vt))}},[K,ge]);const Fe=10,Ue=ge,we=Ue+Fe,Ye=we+K+Fe*2,ht=ge+Fe*2,_e=v.metadata.title||(v.kind&&v.metadata.name&&v.metadata.namespace?nt({kind:v.kind,name:v.metadata.name,namespace:v.metadata.namespace||""}):v.id),Je=()=>{F(W({kind:v.kind,namespace:v.metadata.namespace||Ee.zG,name:v.metadata.name}))};return o.createElement("g",{onClick:Je,className:C.clickable},o.createElement("rect",{className:kn()(C.node,v.root?"secondary":"primary"),width:Ye,height:ht,rx:10}),o.createElement(Qn,{kind:v.kind,y:Fe,x:Fe,width:Ue,height:Ue,className:kn()(C.text,v.root?"secondary":"primary")}),o.createElement("text",{ref:Be,className:kn()(C.text,v.root?"secondary":"primary"),y:ht/2,x:we+(K+Fe*2)/2,textAnchor:"middle",alignmentBaseline:"middle"},_e))}function zr(v){const{loading:C,error:F,nodes:W,edges:K}=Ur(v.entity);return C?o.createElement(Ke.Progress,null):F?o.createElement(Ke.ResponseErrorPanel,{error:F}):o.createElement(o.Fragment,null,o.createElement(Mt.Z,{variant:"h2"},"Ancestry"),o.createElement(Mt.Z,{gutterBottom:!0},"This is the ancestry of entities above the current one - as in, the chain(s) of entities down to the current one, where"," ",o.createElement(Ke.Link,{to:"https://backstage.io/docs/features/software-catalog/life-of-an-entity"},"processors emitted")," ","child entities that ultimately led to the current one existing. Note that this is a completely different mechanism from relations."),o.createElement(R.Z,{mt:4},o.createElement(Ke.DependencyGraph,{nodes:W,edges:K,renderNode:wr,direction:Ke.DependencyGraphTypes.Nm.BOTTOM_TOP,zoom:"enable-on-click"})))}var Sn=e(11776),ln=e(38402),Xt=e(86136),Cn=e(99688),qn=e(49378),pr=e(54506),Nn=e(94339),Wr=e(24579),yr=e(27685);const $n=(0,S.Z)(v=>({root:{display:"flex",flexDirection:"column"},marginTop:{marginTop:v.spacing(2)},helpIcon:{marginLeft:v.spacing(1),color:v.palette.text.disabled},monospace:{fontFamily:"monospace"}}));function gn(v){const C=$n();return o.createElement(qn.Z,{...v,primaryTypographyProps:{className:C.monospace},secondaryTypographyProps:{className:C.monospace}})}function Un(v){const C=$n();return o.createElement(pr.Z,{className:C.monospace},v.children)}function On(v){return o.createElement(R.Z,{mt:2},o.createElement(Nn.Z,{variant:"outlined"},o.createElement(Wr.Z,null,o.createElement(L.Z,{variant:"h6",gutterBottom:!0},v.title,v.helpLink&&o.createElement(wn,{to:v.helpLink})),v.children)))}function Er(v){const[C,F]=v.entry;return o.createElement(ln.Z,null,v.indent&&o.createElement(Xt.Z,null),o.createElement(gn,{primary:C,secondary:F.match(/^url:https?:\/\//)?o.createElement(o.Fragment,null,F.substring(0,4),o.createElement(Ke.Link,{to:F.substring(4)},F.substring(4))):F}))}function wn(v){const C=$n();return o.createElement(Ke.Link,{to:v.to,className:C.helpIcon},o.createElement(yr.Z,{fontSize:"inherit"}))}const vr=(0,S.Z)({root:{display:"flex",flexDirection:"column"}});function Ar(v){var Be,Fe;const C=(0,t.useApi)(l),F=(0,Ee.eE)(v),W=(Be=v.metadata.annotations)==null?void 0:Be[Ee.P1],K=(Fe=v.metadata.annotations)==null?void 0:Fe[Ee.q1],{loading:J,error:ge,value:De}=(0,ft.default)(async()=>!W&&!K?[]:(await C.getEntities({filter:[...W?[{[`metadata.annotations.${Ee.P1}`]:W}]:[],...K?[{[`metadata.annotations.${Ee.q1}`]:K}]:[]]})).items,[W,K]);return{loading:J,error:ge,location:W,originLocation:K,colocatedEntities:De==null?void 0:De.filter(Ue=>(0,Ee.eE)(Ue)!==F)}}function zn(v){return o.createElement(Sn.Z,{dense:!0},v.header&&o.createElement(Er,{key:"header",entry:v.header}),v.entities.map(C=>o.createElement(ln.Z,{key:(0,Ee.eE)(C)},o.createElement(Xt.Z,null,o.createElement(Qn,{kind:C.kind})),o.createElement(gn,{primary:o.createElement(rt,{entityRef:C})}))))}function Rr(v){const{entity:C}=v,{loading:F,error:W,location:K,originLocation:J,colocatedEntities:ge}=Ar(C);if(F)return o.createElement(Ke.Progress,null);if(W)return o.createElement(Ke.ResponseErrorPanel,{error:W});if(!K&&!J)return o.createElement(Cn.Z,{severity:"warning"},"Entity had no location information.");if(!(ge==null?void 0:ge.length))return o.createElement(Cn.Z,{severity:"info"},"There were no other entities on this location.");if(K===J)return o.createElement(zn,{entities:ge});const De=ge.filter(Fe=>{var Ue;return((Ue=Fe.metadata.annotations)==null?void 0:Ue[Ee.P1])===K}),Be=ge.filter(Fe=>{var Ue;return((Ue=Fe.metadata.annotations)==null?void 0:Ue[Ee.q1])===J});return o.createElement(o.Fragment,null,De.length>0&&o.createElement(zn,{entities:De,header:["At the same location",K]}),Be.length>0&&o.createElement(zn,{entities:Be,header:["At the same origin",J]}))}function Sr(v){const C=vr();return o.createElement(o.Fragment,null,o.createElement(Mt.Z,{variant:"h2"},"Colocated"),o.createElement(Mt.Z,null,"These are the entities that are colocated with this entity - as in, they originated from the same data source (e.g. came from the same YAML file), or from the same origin (e.g. the originally registered URL)."),o.createElement("div",{className:C.root},o.createElement(Rr,{entity:v.entity})))}function _n(v){return Object.fromEntries([...Object.entries(v)].sort((C,F)=>C[0]<F[0]?-1:1))}function er(v){return o.createElement(o.Fragment,null,o.createElement(Mt.Z,{variant:"h2"},"Entity as JSON"),o.createElement(Mt.Z,null,"This is the raw entity data as received from the catalog, on JSON form."),o.createElement(Mt.Z,null,o.createElement("div",{style:{fontSize:"75%"},"data-testid":"code-snippet"},o.createElement(Ke.CodeSnippet,{text:JSON.stringify(_n(v.entity),void 0,2),language:"json",showCopyCodeButton:!0}))))}var qt=e(3440),tr=e.n(qt);const nr=(0,S.Z)({root:{display:"flex",flexDirection:"column"}});function Gt(v){var Fe,Ue;const C=nr(),{apiVersion:F,kind:W,metadata:K,spec:J,relations:ge=[],status:De={}}=v.entity,Be=tr()(Lt()(ge,we=>we.targetRef),"type");return o.createElement(o.Fragment,null,o.createElement(Mt.Z,{variant:"h2"},"Overview"),o.createElement("div",{className:C.root},o.createElement(On,{title:"Identity"},o.createElement(Sn.Z,{dense:!0},o.createElement(ln.Z,null,o.createElement(gn,{primary:"apiVersion",secondary:F})),o.createElement(ln.Z,null,o.createElement(gn,{primary:"kind",secondary:W})),(J==null?void 0:J.type)&&o.createElement(ln.Z,null,o.createElement(gn,{primary:"spec.type",secondary:J.type})),K.uid&&o.createElement(ln.Z,null,o.createElement(gn,{primary:"uid",secondary:K.uid})),K.etag&&o.createElement(ln.Z,null,o.createElement(gn,{primary:"etag",secondary:K.etag})))),o.createElement(On,{title:"Metadata"},!!Object.keys(K.annotations||{}).length&&o.createElement(Sn.Z,{dense:!0,subheader:o.createElement(Un,null,"Annotations",o.createElement(wn,{to:"https://backstage.io/docs/features/software-catalog/well-known-annotations"}))},Object.entries(K.annotations).map(we=>o.createElement(Er,{key:we[0],indent:!0,entry:we}))),!!Object.keys(K.labels||{}).length&&o.createElement(Sn.Z,{dense:!0,subheader:o.createElement(Un,null,"Labels",o.createElement(wn,{to:"https://backstage.io/docs/features/software-catalog/well-known-labels"}))},Object.entries(K.labels).map(we=>o.createElement(Er,{key:we[0],indent:!0,entry:we}))),!!((Fe=K.tags)==null?void 0:Fe.length)&&o.createElement(Sn.Z,{dense:!0,subheader:o.createElement(Un,null,"Tags")},K.tags.map((we,Ye)=>o.createElement(ln.Z,{key:`${we}-${Ye}`},o.createElement(Xt.Z,null),o.createElement(gn,{primary:we}))))),!!ge.length&&o.createElement(On,{title:"Relations",helpLink:"https://backstage.io/docs/features/software-catalog/well-known-relations"},Object.entries(Be).map(([we,Ye],ht)=>o.createElement("div",{key:ht},o.createElement(Sn.Z,{dense:!0,subheader:o.createElement(Un,null,we)},Ye.map(_e=>o.createElement(ln.Z,{key:_e.targetRef},o.createElement(Xt.Z,null,o.createElement(Qn,{entityRef:_e.targetRef})),o.createElement(gn,{primary:o.createElement(rt,{entityRef:_e.targetRef})}))))))),!!((Ue=De.items)==null?void 0:Ue.length)&&o.createElement(On,{title:"Status",helpLink:"https://backstage.io/docs/features/software-catalog/well-known-statuses"},De.items.map((we,Ye)=>o.createElement("div",{key:Ye},o.createElement(L.Z,null,we.level,": ",we.type),o.createElement(R.Z,{ml:2},we.message))))))}var cn=e(60155),Cr=e.n(cn);function Tr(v){return o.createElement(o.Fragment,null,o.createElement(Mt.Z,{variant:"h2"},"Entity as YAML"),o.createElement(Mt.Z,null,"This is the raw entity data as received from the catalog, on YAML form."),o.createElement(Mt.Z,null,o.createElement("div",{style:{fontSize:"75%"},"data-testid":"code-snippet"},o.createElement(Ke.CodeSnippet,{text:Cr().stringify(_n(v.entity)),language:"yaml",showCopyCodeButton:!0}))))}const rr=(0,S.Z)(v=>({fullHeightDialog:{height:"calc(100% - 64px)"},root:{display:"flex",flexGrow:1,width:"100%",backgroundColor:v.palette.background.paper},tabs:{borderRight:`1px solid ${v.palette.divider}`,flexShrink:0},tabContents:{flexGrow:1,overflowX:"auto"}}));function Tn(v){const{children:C,value:F,index:W,...K}=v,J=rr();return o.createElement("div",{role:"tabpanel",hidden:F!==W,id:`vertical-tabpanel-${W}`,"aria-labelledby":`vertical-tab-${W}`,className:J.tabContents,...K},F===W&&o.createElement(R.Z,{pl:3,pr:3},C))}function Pn(v){return{id:`vertical-tab-${v}`,"aria-controls":`vertical-tabpanel-${v}`}}function Pr(v){const C=rr(),[F,W]=o.useState(0);return(0,o.useEffect)(()=>{W(0)},[v.open]),v.entity?o.createElement(Yn.Z,{fullWidth:!0,maxWidth:"xl",open:v.open,onClose:v.onClose,"aria-labelledby":"entity-inspector-dialog-title",PaperProps:{className:C.fullHeightDialog}},o.createElement(Rn.Z,{id:"entity-inspector-dialog-title"},"Entity Inspector"),o.createElement(Jn.Z,{dividers:!0},o.createElement("div",{className:C.root},o.createElement(dr.Z,{orientation:"vertical",variant:"scrollable",value:F,onChange:(K,J)=>W(J),"aria-label":"Inspector options",className:C.tabs},o.createElement(Zn.Z,{label:"Overview",...Pn(0)}),o.createElement(Zn.Z,{label:"Ancestry",...Pn(1)}),o.createElement(Zn.Z,{label:"Colocated",...Pn(2)}),o.createElement(Zn.Z,{label:"Raw JSON",...Pn(3)}),o.createElement(Zn.Z,{label:"Raw YAML",...Pn(4)})),o.createElement(Tn,{value:F,index:0},o.createElement(Gt,{entity:v.entity})),o.createElement(Tn,{value:F,index:1},o.createElement(zr,{entity:v.entity})),o.createElement(Tn,{value:F,index:2},o.createElement(Sr,{entity:v.entity})),o.createElement(Tn,{value:F,index:3},o.createElement(er,{entity:v.entity})),o.createElement(Tn,{value:F,index:4},o.createElement(Tr,{entity:v.entity})))),o.createElement(fr.Z,null,o.createElement(g.Z,{onClick:v.onClose,color:"primary"},"Close"))):null}var Ir=e(85256);function Wn(v){var ht;const C=(0,t.useApi)(l),F=(ht=v.metadata.annotations)==null?void 0:ht[Ee.q1],W=v.metadata.uid,K=F==="bootstrap:bootstrap",J=(0,ft.default)(async()=>{const _e=C.getLocationByRef(F);let Je;if(!F)Je=Promise.resolve([]);else{const vt=`metadata.annotations.${Ee.q1}`;Je=C.getEntities({filter:{[vt]:F},fields:["kind","metadata.uid","metadata.name","metadata.namespace"]}).then(Ft=>Ft.items)}return Promise.all([_e,Je]).then(([vt,Ft])=>({location:vt,colocatedEntities:Ft}))},[C,v]),ge=(0,o.useCallback)(async function(){const{location:Je,colocatedEntities:vt}=J.value;await C.removeLocationById(Je.id),await Promise.allSettled(vt.map(Ft=>C.removeEntityByUid(Ft.metadata.uid)))},[C,J]),De=(0,o.useCallback)(async function(){await C.removeEntityByUid(W)},[C,W]);if(K)return{type:"bootstrap",location:F,deleteEntity:De};const{loading:Be,error:Fe,value:Ue}=J;if(Be)return{type:"loading"};if(Fe)return{type:"error",error:Fe};const{location:we,colocatedEntities:Ye}=Ue;return we?{type:"unregister",location:F,colocatedEntities:Ye.map(Ee.iB),unregisterLocation:ge,deleteEntity:De}:{type:"only-delete",deleteEntity:De}}var In=e(10179);const Hr=(0,S.Z)({advancedButton:{fontSize:"0.7em"}}),Lr=({entity:v,onConfirm:C})=>{var ht;const F=(0,t.useApi)(t.alertApiRef),W=(0,t.useApi)(t.configApiRef),K=Hr(),J=Wn(v),[ge,De]=(0,o.useState)(!1),[Be,Fe]=(0,o.useState)(!1),Ue=(ht=W.getOptionalString("app.title"))!=null?ht:"Backstage",we=(0,o.useCallback)(async function(){if("unregisterLocation"in J){Fe(!0);try{await J.unregisterLocation(),C()}catch(Je){(0,In.BD)(Je),F.post({message:Je.message})}finally{Fe(!1)}}},[F,C,J]),Ye=(0,o.useCallback)(async function(){if("deleteEntity"in J){Fe(!0);try{await J.deleteEntity(),C()}catch(Je){(0,In.BD)(Je),F.post({message:Je.message})}finally{Fe(!1)}}},[F,C,J]);return J.type==="loading"?o.createElement(Ke.Progress,null):J.type==="error"?o.createElement(Ke.ResponseErrorPanel,{error:J.error}):J.type==="bootstrap"?o.createElement(o.Fragment,null,o.createElement(Cn.Z,{severity:"info"},'You cannot unregister this entity, since it originates from a protected Backstage configuration (location "',J.location,'"). If you believe this is in error, please contact the ',Ue," ","integrator."),o.createElement(R.Z,{marginTop:2},!ge&&o.createElement(g.Z,{variant:"text",size:"small",color:"primary",className:K.advancedButton,onClick:()=>De(!0)},"Advanced Options"),ge&&o.createElement(o.Fragment,null,o.createElement(Mt.Z,null,"You have the option to delete the entity itself from the catalog. Note that this should only be done if you know that the catalog file has been deleted at, or moved from, its origin location. If that is not the case, the entity will reappear shortly as the next refresh round is performed by the catalog."),o.createElement(g.Z,{variant:"contained",color:"secondary",disabled:Be,onClick:Ye},"Delete Entity")))):J.type==="only-delete"?o.createElement(o.Fragment,null,o.createElement(Mt.Z,null,"This entity does not seem to originate from a registered location. You therefore only have the option to delete it outright from the catalog."),o.createElement(g.Z,{variant:"contained",color:"secondary",disabled:Be,onClick:Ye},"Delete Entity")):J.type==="unregister"?o.createElement(o.Fragment,null,o.createElement(Mt.Z,null,"This action will unregister the following entities:"),o.createElement(Mt.Z,{component:"ul"},J.colocatedEntities.map(_e=>o.createElement("li",{key:`${_e.kind}:${_e.namespace}/${_e.name}`},o.createElement(rt,{entityRef:_e})))),o.createElement(Mt.Z,null,"Located at the following location:"),o.createElement(Mt.Z,{component:"ul"},o.createElement("li",null,J.location)),o.createElement(Mt.Z,null,"To undo, just re-register the entity in ",Ue,"."),o.createElement(R.Z,{marginTop:2},o.createElement(g.Z,{variant:"contained",color:"secondary",disabled:Be,onClick:we},"Unregister Location"),!ge&&o.createElement(R.Z,{component:"span",marginLeft:2},o.createElement(g.Z,{variant:"text",size:"small",color:"primary",className:K.advancedButton,onClick:()=>De(!0)},"Advanced Options"))),ge&&o.createElement(o.Fragment,null,o.createElement(R.Z,{paddingTop:4,paddingBottom:4},o.createElement(Ir.Z,null)),o.createElement(Mt.Z,null,"You also have the option to delete the entity itself from the catalog. Note that this should only be done if you know that the catalog file has been deleted at, or moved from, its origin location. If that is not the case, the entity will reappear shortly as the next refresh round is performed by the catalog."),o.createElement(g.Z,{variant:"contained",color:"secondary",disabled:Be,onClick:Ye},"Delete Entity"))):o.createElement(Cn.Z,{severity:"error"},"Internal error: Unknown state")},br=v=>{const{open:C,onConfirm:F,onClose:W,entity:K}=v;return o.createElement(Yn.Z,{open:C,onClose:W},o.createElement(Rn.Z,{id:"responsive-dialog-title"},"Are you sure you want to unregister this entity?"),o.createElement(Jn.Z,null,o.createElement(Lr,{entity:K,onConfirm:F})),o.createElement(fr.Z,null,o.createElement(g.Z,{onClick:W,color:"primary"},"Cancel")))};var xr=e(12231),x=e(9520),k=e(47603);const he=(0,S.Z)(v=>({root:{backgroundColor:"rgba(0, 0, 0, .11)",boxShadow:"none",margin:v.spacing(1,0,1,0)},title:{margin:v.spacing(1,0,0,1),textTransform:"uppercase",fontSize:12,fontWeight:"bold"},listIcon:{minWidth:30,color:v.palette.text.primary},menuItem:{minHeight:v.spacing(6)},groupWrapper:{margin:v.spacing(1,1,2,1)}}),{name:"CatalogReactUserListPicker"});function Me(v){return[{name:"Personal",items:[{id:"owned",label:"Owned",icon:k.Z},{id:"starred",label:"Starred",icon:Kn.Z}]},{name:v!=null?v:"Company",items:[{id:"all",label:"All"}]}]}const ke=v=>{var ea;const{initialFilter:C,availableFilters:F}=v,W=he(),J=(ea=(0,t.useApi)(t.configApiRef).getOptionalString("organization.name"))!=null?ea:"Company",{filters:ge,updateFilters:De,backendEntities:Be,queryParameters:Fe,loading:Ue}=ct(),we=["starred","all"],Ye=Me(J).map(Ut=>({...Ut,items:Ut.items.filter(({id:rn})=>["group","user"].some(Or=>Or===Fe.kind)?we.includes(rn):!F||F.includes(rn))})).filter(({items:Ut})=>!!Ut.length),{isStarredEntity:ht}=ie(),{isOwnedEntity:_e,loading:Je}=pe(),vt=Ue||Je,Ft=(0,o.useMemo)(()=>new $e("owned",_e,ht),[_e,ht]),_t=(0,o.useMemo)(()=>new $e("starred",_e,ht),[_e,ht]),Kt=(0,o.useMemo)(()=>[Fe.user].flat()[0],[Fe]),[Yt,pn]=(0,o.useState)(Kt!=null?Kt:C),un=(0,o.useMemo)(()=>Be.filter(ot((0,xe.compact)(Object.values({...ge,user:void 0})))),[ge,Be]),ar=(0,o.useMemo)(()=>({all:un.length,starred:un.filter(Ut=>_t.filterEntity(Ut)).length,owned:un.filter(Ut=>Ft.filterEntity(Ut)).length}),[un,_t,Ft]);return(0,o.useEffect)(()=>{Kt&&pn(Kt)},[Kt]),(0,o.useEffect)(()=>{!vt&&!!Yt&&Yt!=="all"&&ar[Yt]===0&&pn("all")},[vt,ar,Yt,pn]),(0,o.useEffect)(()=>{De({user:Yt?new $e(Yt,_e,ht):void 0})},[Yt,_e,ht,De]),o.createElement(Nn.Z,{className:W.root},Ye.map(Ut=>o.createElement(o.Fragment,{key:Ut.name},o.createElement(L.Z,{variant:"subtitle2",className:W.title},Ut.name),o.createElement(Nn.Z,{className:W.groupWrapper},o.createElement(Sn.Z,{disablePadding:!0,dense:!0},Ut.items.map(rn=>{var Or,ta;return o.createElement(xr.Z,{key:rn.id,button:!0,divider:!0,onClick:()=>pn(rn.id),selected:rn.id===((Or=ge.user)==null?void 0:Or.value),className:W.menuItem,disabled:ar[rn.id]===0,"data-testid":`user-picker-${rn.id}`},rn.icon&&o.createElement(Xt.Z,{className:W.listIcon},o.createElement(rn.icon,{fontSize:"small"})),o.createElement(qn.Z,null,o.createElement(L.Z,{variant:"body1"},rn.label)),o.createElement(x.Z,null,(ta=ar[rn.id])!=null?ta:"-"))}))))))},mt=({children:v,value:C})=>{var De;const[F,W]=useState((De=C==null?void 0:C.filters)!=null?De:{}),K=useCallback(Be=>{W(Fe=>{const Ue=typeof Be=="function"?Be(Fe):Be;return{...Fe,...Ue}})},[]),J=useMemo(()=>({entities:[],backendEntities:[],queryParameters:{}}),[]),ge=useMemo(()=>{var Be,Fe,Ue,we,Ye;return{entities:(Be=C==null?void 0:C.entities)!=null?Be:J.entities,backendEntities:(Fe=C==null?void 0:C.backendEntities)!=null?Fe:J.backendEntities,updateFilters:(Ue=C==null?void 0:C.updateFilters)!=null?Ue:K,filters:F,loading:(we=C==null?void 0:C.loading)!=null?we:!1,queryParameters:(Ye=C==null?void 0:C.queryParameters)!=null?Ye:J.queryParameters,error:C==null?void 0:C.error}},[C,J,F,K]);return React.createElement(EntityListContext.Provider,{value:ge},v)}},39398:function(q,s,e){"use strict";e.r(s),e.d(s,{AboutCard:function(){return xe},AboutContent:function(){return se},AboutField:function(){return N}});var r=e(48023),t=e(9118),l=e(36964),f=e(36356),y=e(53479),i=e(79692),o=e(94339),m=e(32552),c=e(61837),g=e(85256),p=e(24579),R=e(52866),L=e(30254),U=e(27604),P=e(2784),Q=e(47851),D=e(60905),T=e(90436),b=e(7089);const B=(0,i.Z)(He=>({value:{fontWeight:"bold",overflow:"hidden",lineHeight:"24px",wordBreak:"break-word"},label:{color:He.palette.text.secondary,textTransform:"uppercase",fontSize:"10px",fontWeight:"bold",letterSpacing:.5,overflow:"hidden",whiteSpace:"nowrap"}}));function N(He){const{label:fe,value:je,gridSizes:Qe,children:at}=He,et=B(),tt=(0,l.useElementFilter)(at,Ee=>Ee.getElements()),ot=tt.length>0?tt:P.createElement(T.Z,{variant:"body2",className:et.value},je||"unknown");return P.createElement(D.Z,{item:!0,...Qe},P.createElement(T.Z,{variant:"subtitle2",className:et.label},fe),ot)}const j=(0,i.Z)({description:{wordBreak:"break-word"}});function se(He){var ct,ft,It,At,Bt,Lt;const{entity:fe}=He,je=j(),Qe=fe.kind.toLocaleLowerCase("en-US")==="system",at=fe.kind.toLocaleLowerCase("en-US")==="resource",et=fe.kind.toLocaleLowerCase("en-US")==="component",tt=fe.kind.toLocaleLowerCase("en-US")==="api",ot=fe.kind.toLocaleLowerCase("en-US")==="template",Ee=fe.kind.toLocaleLowerCase("en-US")==="location",Ge=fe.kind.toLocaleLowerCase("en-US")==="group",lt=(0,y.getEntityRelations)(fe,r.cz,{kind:"system"}),Dt=(0,y.getEntityRelations)(fe,r.cz,{kind:"component"}),gt=(0,y.getEntityRelations)(fe,r.cz,{kind:"domain"}),Et=(0,y.getEntityRelations)(fe,r.S4);return P.createElement(D.Z,{container:!0},P.createElement(N,{label:"Description",gridSizes:{xs:12}},P.createElement(T.Z,{variant:"body2",paragraph:!0,className:je.description},((ct=fe==null?void 0:fe.metadata)==null?void 0:ct.description)||"No description")),P.createElement(N,{label:"Owner",value:"No Owner",gridSizes:{xs:12,sm:6,lg:4}},Et.length>0&&P.createElement(y.EntityRefLinks,{entityRefs:Et,defaultKind:"group"})),(Qe||gt.length>0)&&P.createElement(N,{label:"Domain",value:"No Domain",gridSizes:{xs:12,sm:6,lg:4}},gt.length>0&&P.createElement(y.EntityRefLinks,{entityRefs:gt,defaultKind:"domain"})),(tt||et||at||lt.length>0)&&P.createElement(N,{label:"System",value:"No System",gridSizes:{xs:12,sm:6,lg:4}},lt.length>0&&P.createElement(y.EntityRefLinks,{entityRefs:lt,defaultKind:"system"})),et&&Dt.length>0&&P.createElement(N,{label:"Parent Component",value:"No Parent Component",gridSizes:{xs:12,sm:6,lg:4}},P.createElement(y.EntityRefLinks,{entityRefs:Dt,defaultKind:"component"})),(tt||et||at||ot||Ge||Ee||typeof((ft=fe==null?void 0:fe.spec)==null?void 0:ft.type)=="string")&&P.createElement(N,{label:"Type",value:(It=fe==null?void 0:fe.spec)==null?void 0:It.type,gridSizes:{xs:12,sm:6,lg:4}}),(tt||et||typeof((At=fe==null?void 0:fe.spec)==null?void 0:At.lifecycle)=="string")&&P.createElement(N,{label:"Lifecycle",value:(Bt=fe==null?void 0:fe.spec)==null?void 0:Bt.lifecycle,gridSizes:{xs:12,sm:6,lg:4}}),P.createElement(N,{label:"Tags",value:"No Tags",gridSizes:{xs:12,sm:6,lg:4}},(((Lt=fe==null?void 0:fe.metadata)==null?void 0:Lt.tags)||[]).map(Ct=>P.createElement(b.Z,{key:Ct,size:"small",label:Ct}))))}const Ce=(0,i.Z)({gridItemCard:{display:"flex",flexDirection:"column",height:"calc(100% - 10px)",marginBottom:"10px"},fullHeightCard:{display:"flex",flexDirection:"column",height:"100%"},gridItemCardContent:{flex:1},fullHeightCardContent:{flex:1}});function xe(He){var At,Bt,Lt;const{variant:fe}=He,je=Ce(),{entity:Qe}=(0,y.useEntity)(),at=(0,l.useApi)(f.q3),et=(0,l.useApi)(y.catalogApiRef),tt=(0,l.useApi)(l.alertApiRef),ot=(0,l.useRouteRef)(Q.jU),Ee=(0,y.getEntitySourceLocation)(Qe,at),Ge=(At=Qe.metadata.annotations)==null?void 0:At[r.Tf],lt={label:"View Source",disabled:!Ee,icon:P.createElement(f.nW,{type:Ee==null?void 0:Ee.integrationType}),href:Ee==null?void 0:Ee.locationTargetUrl},Dt={label:"View TechDocs",disabled:!((Bt=Qe.metadata.annotations)==null?void 0:Bt["backstage.io/techdocs-ref"])||!ot,icon:P.createElement(L.Z,null),href:ot&&ot({namespace:Qe.metadata.namespace||r.zG,kind:Qe.kind,name:Qe.metadata.name})};let gt="";fe==="gridItem"?gt=je.gridItemCard:fe==="fullHeight"&&(gt=je.fullHeightCard);let Et="";fe==="gridItem"?Et=je.gridItemCardContent:fe==="fullHeight"&&(Et=je.fullHeightCardContent);const ct=(Lt=Qe.metadata.annotations)==null?void 0:Lt[r.P1],ft=(ct==null?void 0:ct.startsWith("url:"))||(ct==null?void 0:ct.startsWith("file:")),It=(0,P.useCallback)(async()=>{await et.refreshEntity((0,r.eE)(Qe)),tt.post({message:"Refresh scheduled",severity:"info"})},[et,tt,Qe]);return P.createElement(o.Z,{className:gt},P.createElement(m.Z,{title:"About",action:P.createElement(P.Fragment,null,ft&&P.createElement(c.Z,{"aria-label":"Refresh",title:"Schedule entity refresh",onClick:It},P.createElement(R.Z,null)),P.createElement(c.Z,{component:t.Link,"aria-label":"Edit",disabled:!Ge,title:"Edit Metadata",to:Ge!=null?Ge:"#"},P.createElement(U.Z,null))),subheader:P.createElement(t.HeaderIconLinkRow,{links:[lt,Dt]})}),P.createElement(g.Z,null),P.createElement(p.Z,{className:Et},P.createElement(se,{entity:Qe})))}},49782:function(q,s,e){"use strict";e.d(s,{K:function(){return R}});var r=e(2784),t=e(79692),l=e(12420),f=e(97580),y=e(73698),i=e(74603),o=e(12231),m=e(53479),c=e(64279),g=e(36964);const p=(0,t.Z)(L=>(0,l.Z)({root:{...L.typography.h4}}));function R(L){var He;const{initialFilter:U="component",allowedKinds:P}=L,Q=p(),D=(0,g.useApi)(m.catalogApiRef),{value:T}=(0,c.default)(async()=>await D.getEntityFacets({facets:["kind"]}).then(fe=>{var je;return((je=fe.facets.kind)==null?void 0:je.map(Qe=>Qe.value).sort())||[]})),{updateFilters:b,queryParameters:{kind:B}}=(0,m.useEntityList)(),N=(0,r.useMemo)(()=>{var fe;return(fe=[B].flat()[0])==null?void 0:fe.toLocaleLowerCase("en-US")},[B]),[j,se]=(0,r.useState)(N!=null?N:U);(0,r.useEffect)(()=>{b({kind:j?new m.EntityKindFilter(j):void 0})},[j,b]),(0,r.useEffect)(()=>{N&&se(N)},[N]);const xe=[(0,f.Z)(j)].concat((He=T==null?void 0:T.filter(fe=>P?P.some(je=>je.toLocaleLowerCase("en-US")===fe.toLocaleLowerCase("en-US")):!0))!=null?He:[]).sort().reduce((fe,je)=>(fe[je.toLocaleLowerCase("en-US")]=je,fe),{});return r.createElement(y.Z,{input:r.createElement(i.Z,{value:j}),value:j,onChange:fe=>se(fe.target.value),classes:Q},Object.keys(xe).map(fe=>r.createElement(o.Z,{value:fe,key:fe},`${xe[fe]}s`)))}},30097:function(q,s,e){"use strict";e.d(s,{E:function(){return U}});var r=e(48023),t=e(53479),l=e(27604),f=e(2997),y=e(76635),i=e(2784),o=e(7089),m=e(9118);const c=Object.freeze({createNameColumn(P){function Q(D){var T;return((T=D.metadata)==null?void 0:T.title)||(0,t.humanizeEntityRef)(D,{defaultKind:P==null?void 0:P.defaultKind})}return{title:"Name",field:"resolved.name",highlight:!0,customSort({entity:D},{entity:T}){return Q(D).localeCompare(Q(T))},render:({entity:D})=>{var T;return i.createElement(t.EntityRefLink,{entityRef:D,defaultKind:(P==null?void 0:P.defaultKind)||"Component",title:(T=D.metadata)==null?void 0:T.title})}}},createSystemColumn(){return{title:"System",field:"resolved.partOfSystemRelationTitle",render:({resolved:P})=>i.createElement(t.EntityRefLinks,{entityRefs:P.partOfSystemRelations,defaultKind:"system"})}},createOwnerColumn(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:P})=>i.createElement(t.EntityRefLinks,{entityRefs:P.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:P})=>i.createElement(m.OverflowTooltip,{text:P.metadata.description,placement:"bottom-start"}),width:"auto"}},createTagsColumn(){return{title:"Tags",field:"entity.metadata.tags",cellStyle:{padding:"0px 16px 0px 20px"},render:({entity:P})=>i.createElement(i.Fragment,null,P.metadata.tags&&P.metadata.tags.map(Q=>i.createElement(o.Z,{key:Q,label:Q,size:"small",variant:"outlined",style:{marginBottom:"0px"}})))}}});var g=e(28347),p=e(15459),R=e(11640);const L=(0,p.Z)({root:{color:"#f3ba37"}})(R.Z),U=P=>{var et,tt,ot;const{columns:Q,actions:D}=P,{isStarredEntity:T,toggleStarredEntity:b}=(0,t.useStarredEntities)(),{loading:B,error:N,entities:j,filters:se}=(0,t.useEntityList)(),Ce=(0,i.useMemo)(()=>{var Ee;return[c.createNameColumn({defaultKind:(Ee=se.kind)==null?void 0:Ee.value}),c.createSystemColumn(),c.createOwnerColumn(),c.createSpecTypeColumn(),c.createSpecLifecycleColumn(),c.createMetadataDescriptionColumn(),c.createTagsColumn()]},[(et=se.kind)==null?void 0:et.value]),xe=se.type===void 0,He=(0,y.capitalize)((ot=(tt=se.user)==null?void 0:tt.value)!=null?ot:"all");if(N)return i.createElement("div",null,i.createElement(m.WarningPanel,{severity:"error",title:"Could not fetch catalog entities."},i.createElement(m.CodeSnippet,{language:"text",text:N.toString()})));const fe=[({entity:Ee})=>{var lt;const Ge=(lt=Ee.metadata.annotations)==null?void 0:lt[r.l2];return{icon:()=>i.createElement(f.Z,{"aria-label":"View",fontSize:"small"}),tooltip:"View",disabled:!Ge,onClick:()=>{!Ge||window.open(Ge,"_blank")}}},({entity:Ee})=>{var lt;const Ge=(lt=Ee.metadata.annotations)==null?void 0:lt[r.Tf];return{icon:()=>i.createElement(l.Z,{"aria-label":"Edit",fontSize:"small"}),tooltip:"Edit",disabled:!Ge,onClick:()=>{!Ge||window.open(Ge,"_blank")}}},({entity:Ee})=>{const Ge=T(Ee);return{cellStyle:{paddingLeft:"1em"},icon:()=>Ge?i.createElement(L,null):i.createElement(g.Z,null),tooltip:Ge?"Remove from favorites":"Add to favorites",onClick:()=>b(Ee)}}],je=j.map(Ee=>{const Ge=(0,t.getEntityRelations)(Ee,r.cz,{kind:"system"}),lt=(0,t.getEntityRelations)(Ee,r.S4);return{entity:Ee,resolved:{name:(0,t.humanizeEntityRef)(Ee,{defaultKind:"Component"}),ownedByRelationsTitle:lt.map(Dt=>(0,t.humanizeEntityRef)(Dt,{defaultKind:"group"})).join(", "),ownedByRelations:lt,partOfSystemRelationTitle:Ge.map(Dt=>(0,t.humanizeEntityRef)(Dt,{defaultKind:"system"})).join(", "),partOfSystemRelations:Ge}}}),Qe=(Q||Ce).find(Ee=>Ee.title==="Type");Qe&&(Qe.hidden=!xe);const at=je.length>20;return i.createElement(m.Table,{isLoading:B,columns:Q||Ce,options:{paging:at,pageSize:20,actionsColumnIndex:-1,loadingType:"linear",showEmptyDataSourceMessage:!B,padding:"dense",pageSizeOptions:[20,50,100]},title:`${He} (${j.length})`,data:je,actions:D||fe})};U.columns=c},47851:function(q,s,e){"use strict";e.d(s,{yw:function(){return t},jU:function(){return l},_Z:function(){return f}});var r=e(36964);const t=(0,r.createExternalRouteRef)({id:"create-component",optional:!0}),l=(0,r.createExternalRouteRef)({id:"view-techdoc",optional:!0,params:["namespace","kind","name"]}),f=(0,r.createRouteRef)({id:"catalog"})},20221:function(q,s,e){"use strict";e.d(s,{iM:function(){return L},RV:function(){return l},gI:function(){return P}});var r=e(2784),t=e(36964);const l=(0,t.createApiRef)({id:"plugin.permission.api"});var f;(function(D){const T="DENY";D.DENY=T;const b="ALLOW";D.ALLOW=b;const B="CONDITIONAL";D.CONDITIONAL=B})(f||(f={}));var y=e(10179),i=e(96279),o=e.n(i),m=e(9571),c=e(30195);const g=c.z.lazy(()=>c.z.object({rule:c.z.string(),params:c.z.array(c.z.unknown())}).strict().or(c.z.object({anyOf:c.z.array(g).nonempty()}).strict()).or(c.z.object({allOf:c.z.array(g).nonempty()}).strict()).or(c.z.object({not:g}).strict())),p=c.z.object({items:c.z.array(c.z.object({id:c.z.string(),result:c.z.literal(f.ALLOW).or(c.z.literal(f.DENY))}).or(c.z.object({id:c.z.string(),result:c.z.literal(f.CONDITIONAL),conditions:g})))});class R{constructor(T){ne(this,"enabled");ne(this,"discovery");var b;this.discovery=T.discovery,this.enabled=(b=T.config.getOptionalBoolean("permission.enabled"))!=null?b:!1}async authorize(T,b){if(!this.enabled)return T.map(xe=>({result:f.ALLOW}));const B={items:T.map(xe=>({id:m.Z(),...xe}))},N=await this.discovery.getBaseUrl("permission"),j=await o()(`${N}/authorize`,{method:"POST",body:JSON.stringify(B),headers:{...this.getAuthorizationHeader(b==null?void 0:b.token),"content-type":"application/json"}});if(!j.ok)throw await y.VL.fromResponse(j);const se=await j.json();this.assertValidResponse(B,se);const Ce=se.items.reduce((xe,He)=>(xe[He.id]=He,xe),{});return B.items.map(xe=>Ce[xe.id])}getAuthorizationHeader(T){return T?{Authorization:`Bearer ${T}`}:{}}assertValidResponse(T,b){const N=p.parse(b).items.map(se=>se.id);if(!T.items.every(se=>N.includes(se.id)))throw new Error("Unexpected authorization response from permission-backend")}}class L{constructor(T,b){this.permissionClient=T,this.identityApi=b}static create(T){const{config:b,discovery:B,identity:N}=T,j=new R({discovery:B,config:b});return new L(j,N)}async authorize(T){return(await this.permissionClient.authorize([T],await this.identityApi.getCredentials()))[0]}}var U=e(49857);const P=(D,T)=>{const b=(0,t.useApi)(l),{data:B,error:N}=(0,U.ZP)({permission:D,resourceRef:T},async j=>{const{result:se}=await b.authorize(j);return se});return N?{error:N,loading:!1,allowed:!1}:B===void 0?{loading:!0,allowed:!1}:{loading:!1,allowed:B===f.ALLOW}},Q=D=>{const{permission:T,resourceRef:b,errorComponent:B,...N}=D,j=usePermission(T,b),se=useApp(),{NotFoundErrorPage:Ce}=se.getComponents();let xe=B===void 0?React.createElement(Ce,null):B;return j.loading?xe=null:j.allowed&&(xe=D.element),React.createElement(Route,{...N,element:xe})}},91512:function(q,s,e){"use strict";e.d(s,{g:function(){return y},w:function(){return i}});var r=e(36964),t=e(10179),l=e(19126),f=e.n(l);const y=(0,r.createApiRef)({id:"plugin.search.queryservice"});class i{constructor(m){ne(this,"discoveryApi");ne(this,"identityApi");this.discoveryApi=m.discoveryApi,this.identityApi=m.identityApi}async query(m){const{token:c}=await this.identityApi.getCredentials(),g=f().stringify(m),p=`${await this.discoveryApi.getBaseUrl("search/query")}?${g}`,R=await fetch(p,{headers:c?{Authorization:`Bearer ${c}`}:{}});if(!R.ok)throw await t.VL.fromResponse(R);return R.json()}}},19941:function(q,s,e){"use strict";e.r(s),e.d(s,{DefaultResultListItem:function(){return g}});var r=e(2784),t=e(38402),l=e(86136),f=e(49378),y=e(95544),i=e(85256),o=e(9118),m=e(15277),c=e.n(m);const g=({result:p,icon:R,secondaryAction:L,lineClamp:U=5})=>r.createElement(o.Link,{to:p.location},r.createElement(t.Z,{alignItems:"center"},R&&r.createElement(l.Z,null,R),r.createElement(f.Z,{primaryTypographyProps:{variant:"h6"},primary:p.title,secondary:r.createElement(c(),{line:U,truncateText:"\u2026",text:p.text,element:"span"})}),L&&r.createElement(y.Z,{alignItems:"flex-end"},L)),r.createElement(i.Z,null))},1795:function(q,s,e){"use strict";e.r(s),e.d(s,{SearchBar:function(){return L},SearchBarBase:function(){return R}});var r=e(2784),t=e(48760),l=e(36964),f=e(50581),y=e(61837),i=e(74603),o=e(21853),m=e(33375),c=e(22313);const g=({children:U})=>{const P=(0,l.useAnalytics)(),{term:Q}=(0,c.Rx)();return(0,r.useEffect)(()=>{Q&&P.captureEvent("search",Q)},[P,Q]),r.createElement(r.Fragment,null,U)},p=()=>(0,r.useContext)(c.ci)!==void 0,R=({onChange:U,onKeyDown:P,onSubmit:Q,debounceTime:D=200,clearButton:T=!0,fullWidth:b=!0,value:B,inputProps:N={},endAdornment:j,...se})=>{const Ce=(0,l.useApi)(l.configApiRef),[xe,He]=(0,r.useState)(B),fe=p();(0,r.useEffect)(()=>{He(Ge=>Ge!==B?B:Ge)},[B]),(0,t.Z)(()=>U(xe),D,[xe]);const je=(0,r.useCallback)(Ge=>{He(Ge.target.value)},[He]),Qe=(0,r.useCallback)(Ge=>{P&&P(Ge),Q&&Ge.key==="Enter"&&Q()},[P,Q]),at=(0,r.useCallback)(()=>{U("")},[U]),et=`Search in ${Ce.getOptionalString("app.title")||"Backstage"}`,tt=r.createElement(f.Z,{position:"start"},r.createElement(y.Z,{"aria-label":"Query",disabled:!0},r.createElement(o.Z,null))),ot=r.createElement(f.Z,{position:"end"},r.createElement(y.Z,{"aria-label":"Clear",onClick:at},r.createElement(m.Z,null))),Ee=r.createElement(g,null,r.createElement(i.Z,{"data-testid":"search-bar-next",value:xe,placeholder:et,startAdornment:tt,endAdornment:T?ot:j,inputProps:{"aria-label":"Search",...N},fullWidth:b,onChange:je,onKeyDown:Qe,...se}));return fe?Ee:r.createElement(c.Nd,null,Ee)},L=({onChange:U,...P})=>{const{term:Q,setTerm:D}=(0,c.Rx)(),T=(0,r.useCallback)(b=>{U?U(b):D(b)},[U,D]);return r.createElement(R,{value:Q,onChange:T,...P})}},22313:function(q,s,e){"use strict";e.d(s,{ci:function(){return i},Nd:function(){return m},Rx:function(){return c}});var r=e(36964),t=e(2784),l=e(64279),f=e(1849),y=e(91512);const i=(0,t.createContext)(void 0),o={term:"",pageCursor:void 0,filters:{},types:[]},m=({initialState:g=o,children:p})=>{var je,Qe,at,et;const R=(0,r.useApi)(y.g),[L,U]=(0,t.useState)(g.pageCursor),[P,Q]=(0,t.useState)(g.filters),[D,T]=(0,t.useState)(g.term),[b,B]=(0,t.useState)(g.types),N=(0,f.Z)(D),j=(0,l.default)(()=>R.query({term:D,filters:P,pageCursor:L,types:b}),[D,P,b,L]),se=!j.loading&&!j.error&&((je=j.value)==null?void 0:je.nextPageCursor),Ce=!j.loading&&!j.error&&((Qe=j.value)==null?void 0:Qe.previousPageCursor),xe=(0,t.useCallback)(()=>{var tt;U((tt=j.value)==null?void 0:tt.nextPageCursor)},[(at=j.value)==null?void 0:at.nextPageCursor]),He=(0,t.useCallback)(()=>{var tt;U((tt=j.value)==null?void 0:tt.previousPageCursor)},[(et=j.value)==null?void 0:et.previousPageCursor]);(0,t.useEffect)(()=>{D&&N&&D!==N&&U(void 0)},[D,N,g.pageCursor]);const fe={result:j,filters:P,setFilters:Q,term:D,setTerm:T,types:b,setTypes:B,pageCursor:L,setPageCursor:U,fetchNextPage:se?xe:void 0,fetchPreviousPage:Ce?He:void 0};return t.createElement(r.AnalyticsContext,{attributes:{searchTypes:b.sort().join(",")}},t.createElement(i.Provider,{value:fe,children:p}))},c=()=>{const g=(0,t.useContext)(i);if(g===void 0)throw new Error("useSearch must be used within a SearchContextProvider");return g}},73032:function(q,s,e){"use strict";e.d(s,{s:function(){return se},O:function(){return Ce}});var r=e(2784),t=e(60364),l=e(79249),f=e(27556),y=e(38724),i=e(60905),o=e(85256),m=e(11776),c=e(49429),g=e(8629),p=e(69001),R=e(79692),L=e(1795),U=e(19941),P=e(39332),Q=e(22313),D=e(8542),T=e(36964),b=e(9118),B=e(20863);const N=(0,R.Z)(xe=>({container:{borderRadius:30,display:"flex",height:"2.4em"},input:{flex:1},paperFullWidth:{height:"calc(100% - 128px)"},dialogActionsContainer:{padding:xe.spacing(1,3)},viewResultsLink:{verticalAlign:"0.5em"}})),j=({toggleModal:xe})=>{const He=(0,T.useRouteRef)(B._Z),fe=N(),{term:je}=(0,Q.Rx)(),{focusContent:Qe}=(0,b.useContent)(),{transitions:at}=(0,t.Z)(),et=()=>{xe(),setTimeout(Qe,at.duration.leavingScreen)},tt=()=>{et()};return r.createElement(r.Fragment,null,r.createElement(l.Z,null,r.createElement(f.Z,{className:fe.container},r.createElement(L.SearchBar,{className:fe.input}))),r.createElement(y.Z,null,r.createElement(i.Z,{container:!0,direction:"row-reverse",justifyContent:"flex-start",alignItems:"center"},r.createElement(i.Z,{item:!0},r.createElement(b.Link,{onClick:()=>{xe(),setTimeout(Qe,at.duration.leavingScreen)},to:`${He()}?query=${je}`},r.createElement("span",{className:fe.viewResultsLink},"View Full Results"),r.createElement(p.Z,{color:"primary"})))),r.createElement(o.Z,null),r.createElement(P.SearchResult,null,({results:ot})=>r.createElement(m.Z,null,ot.map(({document:Ee})=>r.createElement("div",{role:"button",tabIndex:0,key:`${Ee.location}-btn`,onClick:et,onKeyPress:tt},r.createElement(U.DefaultResultListItem,{key:Ee.location,result:Ee})))))),r.createElement(c.Z,{className:fe.dialogActionsContainer},r.createElement(i.Z,{container:!0,direction:"row"},r.createElement(i.Z,{item:!0,xs:12},r.createElement(D.G,null)))))},se=({open:xe=!0,hidden:He,toggleModal:fe})=>{const je=N();return r.createElement(g.Z,{classes:{paperFullWidth:je.paperFullWidth},onClose:fe,"aria-labelledby":"search-modal-title",fullWidth:!0,maxWidth:"lg",open:xe,hidden:He},xe&&r.createElement(Q.Nd,null,r.createElement(j,{toggleModal:fe})))};function Ce(xe=!1){const[He,fe]=(0,r.useState)({hidden:!xe,open:xe}),je=(0,r.useCallback)(()=>fe(at=>({open:!0,hidden:!at.hidden})),[]),Qe=(0,r.useCallback)(at=>fe(et=>({open:et.open||at,hidden:!at})),[]);return{state:He,toggleModal:je,setOpen:Qe}}},3992:function(q,s,e){"use strict";e.r(s),e.d(s,{SearchPage:function(){return Ct}});var r=e(2784),t=e(1849),l=e(19126),f=e.n(l),y=e(10289),i=e(22313),o=e(60905),m=e(48760),c=e(79692),g=e(27556),p=e(74603),R=e(61837),L=e(21853),U=e(33375);const P=(0,c.Z)(()=>({root:{display:"flex",alignItems:"center"},input:{flex:1}})),Q=({searchQuery:ze,handleSearch:nt,handleClearSearchBar:Ke})=>{const pt=P();return r.createElement(g.Z,{component:"form",onSubmit:rt=>nt(rt),className:pt.root},r.createElement(R.Z,{disabled:!0,type:"submit","aria-label":"search"},r.createElement(L.Z,null)),r.createElement(p.Z,{className:pt.input,placeholder:"Search in Backstage",value:ze,onChange:rt=>nt(rt),inputProps:{"aria-label":"search backstage"}}),r.createElement(R.Z,{"aria-label":"search",onClick:()=>Ke()},r.createElement(U.Z,null)))};var D=e(85256),T=e(90436),b=e(99688),B=e(64279),N=e(53479),j=e(36444);const se=(0,c.Z)(ze=>({filters:{width:"250px",display:"flex"},icon:{margin:ze.spacing(-1,0,0,0)}})),Ce=({numberOfSelectedFilters:ze,handleToggleFilters:nt})=>{const Ke=se();return r.createElement("div",{className:Ke.filters},r.createElement(R.Z,{className:Ke.icon,"aria-label":"settings",onClick:nt},r.createElement(j.Z,null)),r.createElement(T.Z,{variant:"h6"},"Filters (",ze||0,")"))};var xe=e(94339),He=e(32552),fe=e(77277),je=e(24579),Qe=e(73698),at=e(12231),et=e(11776),tt=e(38402),ot=e(21324),Ee=e(49378);const Ge=(0,c.Z)(ze=>({filters:{background:"transparent",boxShadow:"0px 0px 0px 0px"},checkbox:{padding:ze.spacing(0,1,0,1)},dropdown:{width:"100%"}})),lt=({filters:ze,filterOptions:nt,resetFilters:Ke,updateSelected:pt,updateChecked:rt})=>{const yt=Ge();return r.createElement(xe.Z,{className:yt.filters},r.createElement(He.Z,{title:r.createElement(T.Z,{variant:"h6"},"Filters"),action:r.createElement(fe.Z,{color:"primary",onClick:()=>Ke()},"CLEAR ALL")}),r.createElement(D.Z,null),nt.kind.length===0&&nt.lifecycle.length===0&&r.createElement(je.Z,null,r.createElement(T.Z,{variant:"subtitle2"},"Filters cannot be applied to available results")),nt.kind.length>0&&r.createElement(je.Z,null,r.createElement(T.Z,{variant:"subtitle2"},"Kind"),r.createElement(Qe.Z,{id:"outlined-select",onChange:X=>{var Z;return pt((Z=X==null?void 0:X.target)==null?void 0:Z.value)},variant:"outlined",className:yt.dropdown,value:ze.selected},nt.kind.map(X=>r.createElement(at.Z,{selected:X==="",dense:!0,key:X,value:X},X)))),nt.lifecycle.length>0&&r.createElement(je.Z,null,r.createElement(T.Z,{variant:"subtitle2"},"Lifecycle"),r.createElement(et.Z,{disablePadding:!0,dense:!0},nt.lifecycle.map(X=>r.createElement(tt.Z,{key:X,dense:!0,button:!0,onClick:()=>rt(X)},r.createElement(ot.Z,{edge:"start",disableRipple:!0,className:yt.checkbox,color:"primary",checked:ze.checked.includes(X),tabIndex:-1,value:X,name:X}),r.createElement(Ee.Z,{id:X,primary:X}))))))};var Dt=e(48023),gt=e(9118),Et=e(36964);const ct=(0,c.Z)(ze=>({searchQuery:{color:ze.palette.text.primary,background:ze.palette.background.default,borderRadius:"10%"},tableHeader:{margin:ze.spacing(1,0,0,0),display:"flex"},divider:{width:"1px",margin:ze.spacing(0,2),padding:ze.spacing(2,0)}})),ft=[{title:"Name",field:"name",highlight:!0,render:ze=>r.createElement(gt.Link,{to:ze.url||""},ze.name)},{title:"Description",field:"description"},{title:"Owner",field:"owner"},{title:"Kind",field:"kind"},{title:"LifeCycle",field:"lifecycle"}],It=({searchQuery:ze,numberOfSelectedFilters:nt,numberOfResults:Ke,handleToggleFilters:pt})=>{const rt=ct();return r.createElement("div",{className:rt.tableHeader},r.createElement(Ce,{numberOfSelectedFilters:nt,handleToggleFilters:pt}),r.createElement(D.Z,{className:rt.divider,orientation:"vertical"}),r.createElement(o.Z,{item:!0,xs:12},ze?r.createElement(T.Z,{variant:"h6"},`${Ke} `,Ke>1?"results for ":"result for ",r.createElement("span",{className:rt.searchQuery},'"',ze,'"')," "):r.createElement(T.Z,{variant:"h6"},`${Ke} results`)))},At=({searchQuery:ze})=>{const nt=(0,Et.useApi)(N.catalogApiRef),[Ke,pt]=(0,r.useState)(!1),[rt,yt]=(0,r.useState)({selected:"",checked:[]}),[X,Z]=(0,r.useState)([]),{loading:te,error:me,value:le}=(0,B.default)(async()=>(await nt.getEntities()).items.map(G=>{var $,ie,ve,Ie,pe;return{name:G.metadata.name,description:G.metadata.description,owner:typeof(($=G.spec)==null?void 0:$.owner)=="string"?(ie=G.spec)==null?void 0:ie.owner:void 0,kind:G.kind,lifecycle:typeof((ve=G.spec)==null?void 0:ve.lifecycle)=="string"?(Ie=G.spec)==null?void 0:Ie.lifecycle:void 0,url:`/catalog/${((pe=G.metadata.namespace)==null?void 0:pe.toLocaleLowerCase("en-US"))||Dt.zG}/${G.kind.toLocaleLowerCase("en-US")}/${G.metadata.name}`}}),[]);if((0,r.useEffect)(()=>{if(le){let _=le;rt.selected!==""&&(_=le.filter(G=>rt.selected.includes(G.kind))),rt.checked.length>0&&(_=_.filter(G=>G.lifecycle&&rt.checked.includes(G.lifecycle))),ze&&(_=_.filter(G=>{var $,ie,ve;return(($=G.name)==null?void 0:$.toLocaleLowerCase("en-US").includes(ze))||((ie=G.name)==null?void 0:ie.toLocaleLowerCase("en-US").includes(ze.split(" ").join("-")))||((ve=G.description)==null?void 0:ve.toLocaleLowerCase("en-US").includes(ze))})),Z(_)}},[rt,ze,le]),te)return r.createElement(gt.Progress,null);if(me)return r.createElement(b.Z,{severity:"error"},"Error encountered while fetching search results. ",me.toString());if(!le||le.length===0)return r.createElement(gt.EmptyState,{missing:"data",title:"Sorry, no results were found"});const Se=()=>{yt({selected:"",checked:[]})},$e=_=>{yt(G=>({...G,selected:_}))},Ze=_=>{if(rt.checked.includes(_)){yt(G=>({...G,checked:G.checked.filter($=>$!==_)}));return}yt(G=>({...G,checked:[...G.checked,_]}))},Xe=le.reduce((_,G)=>(G.kind&&_.kind.indexOf(G.kind)<0&&_.kind.push(G.kind),G.lifecycle&&_.lifecycle.indexOf(G.lifecycle)<0&&_.lifecycle.push(G.lifecycle),_),{kind:[],lifecycle:[]});return r.createElement(r.Fragment,null,r.createElement(o.Z,{container:!0},Ke&&r.createElement(o.Z,{item:!0,xs:3},r.createElement(lt,{filters:rt,filterOptions:Xe,resetFilters:Se,updateSelected:$e,updateChecked:Ze})),r.createElement(o.Z,{item:!0,xs:Ke?9:12},r.createElement(gt.Table,{options:{paging:!0,pageSize:20,search:!1},data:X,columns:ft,title:r.createElement(It,{searchQuery:ze,numberOfResults:X.length,numberOfSelectedFilters:(rt.selected!==""?1:0)+rt.checked.length,handleToggleFilters:()=>pt(!Ke)})}))))},Bt=()=>{const[ze,nt]=(0,gt.useQueryParamState)("query"),[Ke,pt]=(0,r.useState)(ze!=null?ze:""),rt=X=>{X.preventDefault(),pt(X.target.value)};(0,r.useEffect)(()=>pt(ze!=null?ze:""),[ze]),(0,m.Z)(()=>{nt(Ke)},200,[Ke]);const yt=()=>{pt("")};return r.createElement(gt.Page,{themeId:"home"},r.createElement(gt.Header,{title:"Search"}),r.createElement(gt.Content,null,r.createElement(o.Z,{container:!0,direction:"row"},r.createElement(o.Z,{item:!0,xs:12},r.createElement(Q,{handleSearch:rt,handleClearSearchBar:yt,searchQuery:Ke})),r.createElement(o.Z,{item:!0,xs:12},r.createElement(At,{searchQuery:(ze!=null?ze:"").toLocaleLowerCase("en-US")})))))},Lt=()=>{const ze=(0,y.TH)(),{term:nt,setTerm:Ke,types:pt,setTypes:rt,pageCursor:yt,setPageCursor:X,filters:Z,setFilters:te}=(0,i.Rx)(),me=(0,t.Z)(ze.search);return(0,r.useEffect)(()=>{if(ze.search===me)return;const le=f().parse(ze.search.substring(1),{arrayLimit:0})||{};le.filters&&te(le.filters),le.query&&Ke(le.query),le.pageCursor&&X(le.pageCursor),le.types&&rt(le.types)},[me,ze,Ke,rt,X,te]),(0,r.useEffect)(()=>{const le=f().stringify({query:nt,types:pt,pageCursor:yt,filters:Z},{arrayFormat:"brackets"}),Se=`${window.location.pathname}?${le}`;window.history.replaceState(null,document.title,Se)},[nt,pt,yt,Z]),null},Ct=()=>{const ze=(0,y.pC)();return r.createElement(i.Nd,null,r.createElement(Lt,null),ze||r.createElement(Bt,null))}},39332:function(q,s,e){"use strict";e.r(s),e.d(s,{SearchResult:function(){return f}});var r=e(9118),t=e(2784),l=e(22313);const f=({children:y})=>{const{result:{loading:i,error:o,value:m}}=(0,l.Rx)();return i?t.createElement(r.Progress,null):o?t.createElement(r.ResponseErrorPanel,{title:"Error encountered while fetching search results",error:o}):(m==null?void 0:m.results.length)?t.createElement(t.Fragment,null,y({results:m.results})):t.createElement(r.EmptyState,{missing:"data",title:"Sorry, no results were found"})}},8542:function(q,s,e){"use strict";e.d(s,{G:function(){return m}});var r=e(79692),t=e(77277),l=e(35352),f=e(27742),y=e(2784),i=e(22313);const o=(0,r.Z)(c=>({root:{display:"flex",justifyContent:"space-between",gap:c.spacing(2),margin:c.spacing(2,0)}})),m=()=>{const{fetchNextPage:c,fetchPreviousPage:g}=(0,i.Rx)(),p=o();return!c&&!g?y.createElement(y.Fragment,null):y.createElement("nav",{"arial-label":"pagination navigation",className:p.root},y.createElement(t.Z,{"aria-label":"previous page",disabled:!g,onClick:g,startIcon:y.createElement(l.Z,null)},"Previous"),y.createElement(t.Z,{"aria-label":"next page",disabled:!c,onClick:c,endIcon:y.createElement(f.Z,null)},"Next"))}},20863:function(q,s,e){"use strict";e.d(s,{_Z:function(){return l}});var r=e(91512),t=e(36964);const l=(0,t.createRouteRef)({id:"search"}),f=(0,t.createRouteRef)({id:"search:next"}),y=(0,t.createPlugin)({id:"search",apis:[(0,t.createApiFactory)({api:r.g,deps:{discoveryApi:t.discoveryApiRef,identityApi:t.identityApiRef},factory:({discoveryApi:P,identityApi:Q})=>new r.w({discoveryApi:P,identityApi:Q})})],routes:{root:l,nextRoot:f}}),i=y.provide((0,t.createRoutableExtension)({name:"SearchPage",component:()=>Promise.resolve().then(e.bind(e,3992)).then(P=>P.SearchPage),mountPoint:l})),o=y.provide((0,t.createRoutableExtension)({name:"SearchPageNext",component:()=>Promise.resolve().then(e.bind(e,3992)).then(P=>P.SearchPage),mountPoint:f})),m=y.provide((0,t.createComponentExtension)({name:"SearchBar",component:{lazy:()=>Promise.resolve().then(e.bind(e,1795)).then(P=>P.SearchBar)}})),c=y.provide((0,t.createComponentExtension)({name:"SearchBarNext",component:{lazy:()=>Promise.resolve().then(e.bind(e,1795)).then(P=>P.SearchBar)}})),g=y.provide((0,t.createComponentExtension)({name:"SearchResult",component:{lazy:()=>Promise.resolve().then(e.bind(e,39332)).then(P=>P.SearchResult)}})),p=y.provide((0,t.createComponentExtension)({name:"SearchResultNext",component:{lazy:()=>Promise.resolve().then(e.bind(e,39332)).then(P=>P.SearchResult)}})),R=y.provide((0,t.createComponentExtension)({name:"SidebarSearchModal",component:{lazy:()=>e.e(3825).then(e.bind(e,43825)).then(P=>P.SidebarSearchModal)}})),L=y.provide((0,t.createComponentExtension)({name:"DefaultResultListItem",component:{lazy:()=>Promise.resolve().then(e.bind(e,19941)).then(P=>P.DefaultResultListItem)}})),U=y.provide((0,t.createComponentExtension)({name:"HomePageSearchBar",component:{lazy:()=>e.e(6105).then(e.bind(e,46105)).then(P=>P.HomePageSearchBar)}}))},94067:function(q,s,e){"use strict";e.r(s),e.d(s,{EmbeddedDocsRouter:function(){return U},Router:function(){return L},isTechDocsAvailable:function(){return R}});var r=e(2784),t=e(53479),l=e(10289),f=e(50021),y=e(75733),i=e(96393),o=e(97589),m=e(36964);const c=({entity:P})=>{var D;const Q=(0,m.useApi)(m.configApiRef);return r.createElement(i.Ej,{withSearch:!1,entityRef:{namespace:(0,o.D)((D=P.metadata.namespace)!=null?D:"default",Q),kind:(0,o.D)(P.kind,Q),name:(0,o.D)(P.metadata.name,Q)}})};var g=e(9118);const p="backstage.io/techdocs-ref",R=P=>{var Q,D;return Boolean((D=(Q=P==null?void 0:P.metadata)==null?void 0:Q.annotations)==null?void 0:D[p])},L=()=>r.createElement(l.Z5,null,r.createElement(l.AW,{path:"/",element:r.createElement(f.TechDocsIndexPage,null)}),r.createElement(l.AW,{path:"/:namespace/:kind/:name/*",element:r.createElement(y.TechDocsReaderPage,null)})),U=()=>{var D;const{entity:P}=(0,t.useEntity)();return((D=P.metadata.annotations)==null?void 0:D[p])?r.createElement(l.Z5,null,r.createElement(l.AW,{path:"/*",element:r.createElement(c,{entity:P})})):r.createElement(g.MissingAnnotationEmptyState,{annotation:p})}},3337:function(q,s,e){"use strict";e.d(s,{D:function(){return t},g:function(){return l}});var r=e(36964);const t=(0,r.createApiRef)({id:"plugin.techdocs.storageservice"}),l=(0,r.createApiRef)({id:"plugin.techdocs.service"})},42723:function(q,s,e){"use strict";e.d(s,{p:function(){return f},k:function(){return y}});var r=e(10179),t=e(76372),l=e.n(t);class f{constructor(o){ne(this,"configApi");ne(this,"discoveryApi");ne(this,"fetchApi");this.configApi=o.configApi,this.discoveryApi=o.discoveryApi,this.fetchApi=o.fetchApi}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getTechDocsMetadata(o){const{kind:m,namespace:c,name:g}=o,R=`${await this.getApiOrigin()}/metadata/techdocs/${c}/${m}/${g}`,L=await this.fetchApi.fetch(`${R}`);if(!L.ok)throw await r.VL.fromResponse(L);return await L.json()}async getEntityMetadata(o){const{kind:m,namespace:c,name:g}=o,R=`${await this.getApiOrigin()}/metadata/entity/${c}/${m}/${g}`,L=await this.fetchApi.fetch(`${R}`);if(!L.ok)throw await r.VL.fromResponse(L);return await L.json()}}class y{constructor(o){ne(this,"configApi");ne(this,"discoveryApi");ne(this,"identityApi");ne(this,"fetchApi");this.configApi=o.configApi,this.discoveryApi=o.discoveryApi,this.identityApi=o.identityApi,this.fetchApi=o.fetchApi}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getStorageUrl(){var o;return(o=this.configApi.getOptionalString("techdocs.storageUrl"))!=null?o:`${await this.discoveryApi.getBaseUrl("techdocs")}/static/docs`}async getBuilder(){return this.configApi.getString("techdocs.builder")}async getEntityDocs(o,m){const{kind:c,namespace:g,name:p}=o,L=`${await this.getStorageUrl()}/${g}/${c}/${p}/${m}`,U=await this.fetchApi.fetch(`${L.endsWith("/")?L:`${L}/`}index.html`);let P="";switch(U.status){case 404:throw P="Page not found. ",m||(P+="This could be because there is no index.md file in the root of the docs directory of this repository."),new r.dR(P);case 500:throw P="Could not generate documentation or an error in the TechDocs backend. ",new Error(P);default:break}return U.text()}async syncEntityDocs(o,m=()=>{}){const{kind:c,namespace:g,name:p}=o,L=`${await this.getApiOrigin()}/sync/${g}/${c}/${p}`,{token:U}=await this.identityApi.getCredentials();return new Promise((P,Q)=>{const D=new t.EventSourcePolyfill(L,{withCredentials:!0,headers:U?{Authorization:`Bearer ${U}`}:{}});D.addEventListener("log",T=>{T.data&&m(JSON.parse(T.data))}),D.addEventListener("finish",T=>{let b=!1;T.data&&({updated:b}=JSON.parse(T.data)),P(b?"updated":"cached")}),D.onerror=T=>{switch(D.close(),T.status){case 404:Q(new r.dR(T.message));return;default:Q(new Error(T.data));return}}})}async getBaseUrl(o,m,c){const{kind:g,namespace:p,name:R}=m,U=`${await this.getApiOrigin()}/static/docs/${p}/${g}/${R}/${c}`;return new URL(o,U.endsWith("/")?U:`${U}/`).toString()}}},97589:function(q,s,e){"use strict";e.d(s,{D:function(){return r}});function r(t,l){return l.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")?t:t.toLocaleLowerCase("en-US")}},2546:function(q,s,e){"use strict";e.d(s,{u:function(){return o}});var r=e(2784),t=e(9118),l=e(53479),f=e(1114),y=e(70335),i=e(21956);const o=m=>{const{initialFilter:c="all",columns:g,actions:p}=m;return r.createElement(f.j,null,r.createElement(t.Content,null,r.createElement(t.ContentHeader,{title:""},r.createElement(t.SupportButton,null,"Discover documentation in your ecosystem.")),r.createElement(l.EntityListProvider,null,r.createElement(l.CatalogFilterLayout,null,r.createElement(l.CatalogFilterLayout.Filters,null,r.createElement(y.f,null),r.createElement(l.UserListPicker,{initialFilter:c}),r.createElement(l.EntityOwnerPicker,null),r.createElement(l.EntityTagPicker,null)),r.createElement(l.CatalogFilterLayout.Content,null,r.createElement(i.EntityListDocsTable,{actions:p,columns:g}))))))}},51016:function(q,s,e){"use strict";e.d(s,{f:function(){return g}});var r=e(68725),t=e(97589),l=e(36964),f=e(9118),y=e(94339),i=e(16111),o=e(24579),m=e(14503),c=e(2784);const g=L=>{const{entities:U}=L,P=(0,l.useRouteRef)(r.Fw),Q=(0,l.useApi)(l.configApiRef);return U?c.createElement(f.ItemCardGrid,{"data-testid":"docs-explore"},(U==null?void 0:U.length)?U.map((D,T)=>{var b,B;return c.createElement(y.Z,{key:T},c.createElement(i.Z,null,c.createElement(f.ItemCardHeader,{title:(b=D.metadata.title)!=null?b:D.metadata.name})),c.createElement(o.Z,null,D.metadata.description),c.createElement(m.Z,null,c.createElement(f.Button,{to:P({namespace:(0,t.D)((B=D.metadata.namespace)!=null?B:"default",Q),kind:(0,t.D)(D.kind,Q),name:(0,t.D)(D.metadata.name,Q)}),color:"primary","data-testid":"read_docs"},"Read Docs")))}):null):null};var p=e(53479);const R=()=>{const{loading:L,error:U,entities:P}=useEntityList();return U?React.createElement(WarningPanel,{severity:"error",title:"Could not load available documentation."},React.createElement(CodeSnippet,{language:"text",text:U.toString()})):L||!P?React.createElement(Progress,null):(P.sort((Q,D)=>{var T,b;return((T=Q.metadata.title)!=null?T:Q.metadata.name).localeCompare((b=D.metadata.title)!=null?b:D.metadata.name)}),React.createElement(DocsCardGrid,{entities:P}))}},81290:function(q,s,e){"use strict";e.d(s,{H:function(){return p}});var r=e(2784),t=e(95074),l=e(36964),f=e(48023),y=e(53479),i=e(68725),o=e(9118),m=e(98095),c=e(3792),g=e(97589);const p=R=>{const{entities:L,title:U,loading:P,columns:Q,actions:D}=R,[,T]=(0,t.Z)(),b=(0,l.useRouteRef)(i.Fw),B=(0,l.useApi)(l.configApiRef);if(!L)return null;const N=L.map(Ce=>{var He;const xe=(0,y.getEntityRelations)(Ce,f.S4);return{entity:Ce,resolved:{docsUrl:b({namespace:(0,g.D)((He=Ce.metadata.namespace)!=null?He:"default",B),kind:(0,g.D)(Ce.kind,B),name:(0,g.D)(Ce.metadata.name,B)}),ownedByRelations:xe,ownedByRelationsTitle:xe.map(fe=>(0,y.humanizeEntityRef)(fe,{defaultKind:"group"})).join(", ")}}}),j=[c.N.createNameColumn(),c.N.createOwnerColumn(),c.N.createTypeColumn()],se=[m.n.createCopyDocsUrlAction(T)];return r.createElement(r.Fragment,null,P||N&&N.length>0?r.createElement(o.Table,{isLoading:P,options:{paging:!0,pageSize:20,search:!0,actionsColumnIndex:-1},data:N,columns:Q||j,actions:D||se,title:U?`${U} (${N.length})`:`All (${N.length})`}):r.createElement(o.EmptyState,{missing:"data",title:"No documents to show",description:"Create your own document. Check out our Getting Started Information",action:r.createElement(o.Button,{color:"primary",to:"https://backstage.io/docs/features/techdocs/getting-started",variant:"contained"},"DOCS")}))};p.columns=c.N,p.actions=m.n},12481:function(q,s,e){"use strict";e.d(s,{n:function(){return g}});var r=e(2784),t=e(95074),l=e(76635),f=e.n(l),y=e(9118),i=e(53479),o=e(81290),m=e(98095),c=e(3792);const g=p=>{var se,Ce;const{columns:R,actions:L}=p,{loading:U,error:P,entities:Q,filters:D}=(0,i.useEntityList)(),{isStarredEntity:T,toggleStarredEntity:b}=(0,i.useStarredEntities)(),[,B]=(0,t.Z)(),N=(0,l.capitalize)((Ce=(se=D.user)==null?void 0:se.value)!=null?Ce:"all"),j=[m.n.createCopyDocsUrlAction(B),m.n.createStarEntityAction(T,b)];return P?r.createElement(y.WarningPanel,{severity:"error",title:"Could not load available documentation."},r.createElement(y.CodeSnippet,{language:"text",text:P.toString()})):r.createElement(o.H,{title:N,entities:Q,loading:U,actions:L||j,columns:R})};g.columns=c.N,g.actions=m.n},98095:function(q,s,e){"use strict";e.d(s,{n:function(){return o}});var r=e(2784),t=e(39981),l=e(2337),f=e(11640),y=e(28347);const i=(0,l.Z)({root:{color:"#f3ba37"}})(f.Z),o={createCopyDocsUrlAction(m){return c=>({icon:()=>r.createElement(t.Z,{fontSize:"small"}),tooltip:"Click to copy documentation link to clipboard",onClick:()=>m(`${window.location.origin}${c.resolved.docsUrl}`)})},createStarEntityAction(m,c){return({entity:g})=>{const p=m(g);return{cellStyle:{paddingLeft:"1em"},icon:()=>p?r.createElement(i,null):r.createElement(y.Z,null),tooltip:p?"Remove from favorites":"Add to favorites",onClick:()=>c(g)}}}}},3792:function(q,s,e){"use strict";e.d(s,{N:function(){return y}});var r=e(2784),t=e(9118),l=e(53479);function f(i){return i.metadata.title||i.metadata.name}const y={createNameColumn(){return{title:"Document",field:"entity.metadata.name",highlight:!0,render:i=>r.createElement(t.SubvalueCell,{value:r.createElement(t.Link,{to:i.resolved.docsUrl},f(i.entity)),subvalue:i.entity.metadata.description})}},createOwnerColumn(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:i})=>r.createElement(l.EntityRefLinks,{entityRefs:i.ownedByRelations,defaultKind:"group"})}},createTypeColumn(){return{title:"Type",field:"entity.spec.type"}}}},21956:function(q,s,e){"use strict";e.d(s,{EntityListDocsTable:function(){return r.n},DocsTable:function(){return t.H}});var r=e(12481),t=e(81290),l=e(72580),f=e.n(l);e.o(l,"DefaultTechDocsHome")&&e.d(s,{DefaultTechDocsHome:function(){return l.DefaultTechDocsHome}})},72580:function(){},50021:function(q,s,e){"use strict";e.r(s),e.d(s,{TechDocsIndexPage:function(){return f}});var r=e(2784),t=e(10289),l=e(2546);const f=()=>(0,t.pC)()||r.createElement(l.u,null)},1114:function(q,s,e){"use strict";e.d(s,{j:function(){return f}});var r=e(2784),t=e(9118),l=e(36964);const f=y=>{var c;const{children:i}=y,m=`Documentation available in ${(c=(0,l.useApi)(l.configApiRef).getOptionalString("organization.name"))!=null?c:"Backstage"}`;return r.createElement(t.PageWithHeader,{title:"Documentation",subtitle:m,themeId:"documentation"},i)}},70335:function(q,s,e){"use strict";e.d(s,{f:function(){return f}});var r=e(2784),t=e(53479);class l{getCatalogFilters(){return{"metadata.annotations.backstage.io/techdocs-ref":t.CATALOG_FILTER_EXISTS}}}const f=()=>{const{updateFilters:y}=(0,t.useEntityList)();return(0,r.useEffect)(()=>{y({techdocs:new l})},[y]),null}},19192:function(q,s,e){"use strict";e.d(s,{DefaultTechDocsHome:function(){return l.u}});var r=e(51016),t=e(21956),l=e(2546),f=e(1114),y=e(70335)},82250:function(q,s,e){"use strict";e.d(s,{techdocsApiRef:function(){return l.g},techdocsStorageApiRef:function(){return l.D},Reader:function(){return y.Ej},TechDocsReaderPageHeader:function(){return y.SE},DefaultTechDocsHome:function(){return o.DefaultTechDocsHome},TechDocsIndexPage:function(){return m.Jl},TechDocsReaderPage:function(){return m.I6},plugin:function(){return m.s4}});var r=e(98157),t=e.n(r);e.o(r,"DefaultTechDocsHome")&&e.d(s,{DefaultTechDocsHome:function(){return r.DefaultTechDocsHome}}),e.o(r,"Reader")&&e.d(s,{Reader:function(){return r.Reader}}),e.o(r,"TechDocsReaderPageHeader")&&e.d(s,{TechDocsReaderPageHeader:function(){return r.TechDocsReaderPageHeader}}),e.o(r,"techdocsApiRef")&&e.d(s,{techdocsApiRef:function(){return r.techdocsApiRef}}),e.o(r,"techdocsStorageApiRef")&&e.d(s,{techdocsStorageApiRef:function(){return r.techdocsStorageApiRef}});var l=e(3337),f=e(42723),y=e(96393),i=e(93566),o=e(19192),m=e(20961),c=e(94067)},20961:function(q,s,e){"use strict";e.d(s,{s4:function(){return y},Jl:function(){return c},I6:function(){return g}});var r=e(3337),t=e(42723),l=e(68725),f=e(36964);const y=(0,f.createPlugin)({id:"techdocs",apis:[(0,f.createApiFactory)({api:r.D,deps:{configApi:f.configApiRef,discoveryApi:f.discoveryApiRef,identityApi:f.identityApiRef,fetchApi:f.fetchApiRef},factory:({configApi:p,discoveryApi:R,identityApi:L,fetchApi:U})=>new t.k({configApi:p,discoveryApi:R,identityApi:L,fetchApi:U})}),(0,f.createApiFactory)({api:r.g,deps:{configApi:f.configApiRef,discoveryApi:f.discoveryApiRef,fetchApi:f.fetchApiRef},factory:({configApi:p,discoveryApi:R,fetchApi:L})=>new t.p({configApi:p,discoveryApi:R,fetchApi:L})})],routes:{root:l._Z,docRoot:l.Fw,entityContent:l.pd}}),i=y.provide((0,f.createRoutableExtension)({name:"TechdocsPage",component:()=>Promise.resolve().then(e.bind(e,94067)).then(p=>p.Router),mountPoint:l._Z})),o=y.provide((0,f.createRoutableExtension)({name:"EntityTechdocsContent",component:()=>Promise.resolve().then(e.bind(e,94067)).then(p=>p.EmbeddedDocsRouter),mountPoint:l.pd})),m=y.provide((0,f.createRoutableExtension)({name:"TechDocsCustomHome",component:()=>e.e(7110).then(e.bind(e,57110)).then(p=>p.TechDocsCustomHome),mountPoint:l._Z})),c=y.provide((0,f.createRoutableExtension)({name:"TechDocsIndexPage",component:()=>Promise.resolve().then(e.bind(e,50021)).then(p=>p.TechDocsIndexPage),mountPoint:l._Z})),g=y.provide((0,f.createRoutableExtension)({name:"TechDocsReaderPage",component:()=>Promise.resolve().then(e.bind(e,75733)).then(p=>p.TechDocsReaderPage),mountPoint:l.Fw}))},53242:function(q,s,e){"use strict";e.d(s,{Ej:function(){return Xe},DK:function(){return le}});var r=e(2784),t=e(10289),l=e(79692),f=e(60364),y=e(41128),i=e(60905),o=e(36964),m=e(36356),c=e(9118),g=e(3337);const p=(_,G,$)=>{const ie=_==="src"&&G.endsWith(".svg"),ve=!G.match(/^([a-z]*:)?\/\//i),Ie=G.startsWith($);return ie&&(ve||Ie)},R=({techdocsStorageApi:_,entityId:G,path:$})=>async ie=>{const ve=await _.getApiOrigin(),Ie=async(pe,Te)=>{for(const st of pe)if(st.hasAttribute(Te)){const re=st.getAttribute(Te);if(!re)return;const S=await _.getBaseUrl(re,G,$);if(p(Te,re,ve))try{const ce=await(await fetch(S,{credentials:"include"})).text();st.setAttribute(Te,`data:image/svg+xml;base64,${btoa(ce)}`)}catch{st.setAttribute("alt",`Error: ${re}`)}else st.setAttribute(Te,S)}};return await Promise.all([Ie(ie.querySelectorAll("img"),"src"),Ie(ie.querySelectorAll("script"),"src"),Ie(ie.querySelectorAll("source"),"src"),Ie(ie.querySelectorAll("link"),"href"),Ie(ie.querySelectorAll("a[download]"),"href")]),ie};var L=e(67512),U=e(67097),P=e(47093),Q=e(82717),D=e.n(Q);const T=_=>G=>{const $=G.querySelector('[title="Edit this page"]');if(!$||!$.href)return G;const ie=new URL($.href),ve=_.byUrl(ie);if((ve==null?void 0:ve.type)!=="github"&&(ve==null?void 0:ve.type)!=="gitlab")return G;const Ie=G.querySelector("article>h1").childNodes[0].textContent,pe=encodeURIComponent(`Documentation Feedback: ${Ie}`),Te=encodeURIComponent(`Page source:
|
|
32
|
+
${$.href}
|
|
33
|
+
|
|
34
|
+
Feedback:`),st=(ve==null?void 0:ve.type)==="github"?(0,L.Pb)(ie.href,"blob"):ie.href,re=D()(st),S=`/${re.organization}/${re.name}`,z=$.cloneNode();switch(ve==null?void 0:ve.type){case"gitlab":z.href=`${ie.origin}${S}/issues/new?issue[title]=${pe}&issue[description]=${Te}`;break;case"github":z.href=`${ie.origin}${S}/issues/new?title=${pe}&body=${Te}`;break;default:return G}return P.render(r.createElement(U.Z),z),z.style.paddingLeft="5px",z.title="Leave feedback for this page",z.id="git-feedback-link",$==null||$.insertAdjacentElement("beforebegin",z),G};var b=e(44882);const B=()=>_=>{const G=_.querySelector('.md-header label[for="__drawer"]'),$=_.querySelector("article");if(!G||!$)return _;const ie=G.cloneNode();return P.render(r.createElement(b.Z),ie),ie.style.paddingLeft="5px",ie.classList.add("md-content__button"),ie.title="Toggle Sidebar",ie.id="toggle-sidebar",$==null||$.prepend(ie),_},N=()=>_=>((($,ie)=>{Array.from($).filter(ve=>ve.hasAttribute(ie)).forEach(ve=>{const Ie=ve.getAttribute(ie);if(Ie){Ie.match(/^https?:\/\//i)&&ve.setAttribute("target","_blank");try{const pe=j(window.location.href);ve.setAttribute(ie,new URL(Ie,pe).toString())}catch{ve.replaceWith(ve.textContent||Ie)}}})})(Array.from(_.getElementsByTagName("a")),"href"),_);function j(_){const G=new URL(_);return!G.pathname.endsWith("/")&&!G.pathname.endsWith(".html")&&(G.pathname+="/"),G.toString()}const se=({baseUrl:_,onClick:G})=>$=>(Array.from($.getElementsByTagName("a")).forEach(ie=>{ie.addEventListener("click",ve=>{const pe=ie.getAttribute("href");!pe||pe.startsWith(_)&&!ie.hasAttribute("download")&&(ve.preventDefault(),G(ve,pe))})}),$);var Ce=e(15459),xe=e(80030),He=e(72379),fe=e(41547);const je=(0,Ce.Z)(_=>({tooltip:{fontSize:"inherit",color:_.palette.text.primary,margin:0,padding:_.spacing(.5),backgroundColor:"transparent",boxShadow:"none"}}))(xe.ZP),Qe=()=>r.createElement(He.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"})),at=({text:_})=>{const[G,$]=(0,r.useState)(!1),ie=(0,r.useCallback)(()=>{navigator.clipboard.writeText(_),$(!0)},[_]),ve=(0,r.useCallback)(()=>{$(!1)},[$]);return r.createElement(je,{title:"Copied to clipboard",placement:"left",open:G,onClose:ve,leaveDelay:1e3},r.createElement("button",{className:"md-clipboard md-icon",onClick:ie},r.createElement(Qe,null)))},et=_=>G=>{var ie;const $=G.querySelectorAll("pre > code");for(const ve of $){const Ie=ve.textContent||"",pe=document.createElement("div");(ie=ve==null?void 0:ve.parentElement)==null||ie.prepend(pe),P.render(r.createElement(fe.Z,{theme:_},r.createElement(at,{text:Ie})),pe)}return G},tt=()=>_=>{var G;return(G=_.querySelector(".md-header"))==null||G.remove(),_},ot=()=>_=>{var G,$;return(G=_.querySelector(".md-footer .md-copyright"))==null||G.remove(),($=_.querySelector(".md-footer-copyright"))==null||$.remove(),_},Ee=({docStorageUrl:_,onLoading:G,onLoaded:$})=>ie=>{const ve=Array.from(ie.querySelectorAll('head > link[rel="stylesheet"]')).filter(pe=>{var Te;return(Te=pe.getAttribute("href"))==null?void 0:Te.startsWith(_)});let Ie=ve.length;return Ie>0&&G(ie),ve.forEach(pe=>pe.addEventListener("load",()=>{Ie-=1,Ie===0&&$(ie)})),ie};var Ge=e(35368),lt=e.n(Ge);const Dt=/main\.[A-Fa-f0-9]{8}\.min\.css$/,gt=/^https:\/\/fonts\.googleapis\.com/,Et=/^https:\/\/fonts\.gstatic\.com/,ct=_=>{if(_.nodeName&&_.nodeName==="LINK"){const G=_.getAttribute("href")||"";G.match(Dt)&&_.setAttribute("rel","stylesheet"),G.match(gt)&&_.setAttribute("rel","stylesheet"),G.match(Et)&&_.setAttribute("rel","preconnect")}return _},ft=_=>G=>{if(G.nodeName==="IFRAME"){const $=G.getAttribute("src");if(!$)return G.remove(),G;try{const ie=new URL($);_.some(Ie=>ie.host===Ie)||G.remove()}catch(ie){console.warn(`Invalid iframe src, ${ie}`),G.remove()}}return G},It=_=>{const G=(_==null?void 0:_.getOptionalStringArray("allowedIframeHosts"))||[];return $=>{lt().addHook("afterSanitizeAttributes",ct);const ie=["link"];return G.length>0&&(lt().addHook("beforeSanitizeElements",ft(G)),ie.push("iframe")),lt().sanitize($.innerHTML,{ADD_TAGS:ie,FORBID_TAGS:["style"],WHOLE_DOCUMENT:!0,RETURN_DOM:!0})}},At=({css:_})=>G=>(G.getElementsByTagName("head")[0].insertAdjacentHTML("beforeend",`<style>${_}</style>`),G),Bt=()=>_=>(setTimeout(()=>{var G;if(window.location.hash){const $=window.location.hash.slice(1);(G=_==null?void 0:_.querySelector(`#${$}`))==null||G.scrollIntoView()}},200),_),Lt=async(_,G)=>{let $;if(typeof _=="string")$=new DOMParser().parseFromString(_,"text/html").documentElement;else if(_ instanceof Element)$=_;else throw new Error("dom is not a recognized type");for(const ie of G)$=await ie($);return $};var Ct=e(93566),ze=e(23738),nt=e(64279),Ke=e(77446);function pt({contentLoading:_,content:G,activeSyncState:$}){return _||$==="BUILD_READY_RELOAD"||!G&&$==="CHECKING"?"CHECKING":!G&&$==="BUILDING"?"INITIAL_BUILD":G?$==="BUILDING"?"CONTENT_STALE_REFRESHING":$==="BUILD_READY"?"CONTENT_STALE_READY":$==="ERROR"?"CONTENT_STALE_ERROR":"CONTENT_FRESH":"CONTENT_NOT_FOUND"}function rt(_,G){const $={..._};switch(G.type){case"sync":G.state==="CHECKING"&&($.buildLog=[]),$.activeSyncState=G.state,$.syncError=G.syncError;break;case"contentLoading":$.contentLoading=!0,$.contentError=void 0;break;case"content":typeof G.path=="string"&&($.path=G.path),$.contentLoading=!1,$.content=G.content,$.contentError=G.contentError;break;case"buildLog":$.buildLog=$.buildLog.concat(G.log);break;default:throw new Error}return["BUILD_READY","BUILD_READY_RELOAD"].includes($.activeSyncState)&&["contentLoading","content"].includes(G.type)&&($.activeSyncState="UP_TO_DATE",$.buildLog=[]),$}function yt(_,G,$,ie){var S,z;const[ve,Ie]=(0,r.useReducer)(rt,{activeSyncState:"CHECKING",path:ie,contentLoading:!0,buildLog:[]}),pe=(0,o.useApi)(g.D),{retry:Te}=(0,Ke.Z)(async()=>{Ie({type:"contentLoading"});try{const ce=await pe.getEntityDocs({kind:_,namespace:G,name:$},ie);return Ie({type:"content",content:ce,path:ie}),ce}catch(ce){Ie({type:"content",contentError:ce,path:ie})}},[pe,_,G,$,ie]),st=(0,r.useRef)({content:void 0,reload:()=>{}});return st.current={content:ve.content,reload:Te},(0,nt.default)(async()=>{Ie({type:"sync",state:"CHECKING"});const ce=setTimeout(()=>{Ie({type:"sync",state:"BUILDING"})},1e3);try{switch(await pe.syncEntityDocs({kind:_,namespace:G,name:$},Ae=>{Ie({type:"buildLog",log:Ae})})){case"updated":st.current.content?Ie({type:"sync",state:"BUILD_READY"}):(st.current.reload(),Ie({type:"sync",state:"BUILD_READY_RELOAD"}));break;case"cached":Ie({type:"sync",state:"UP_TO_DATE"});break;default:Ie({type:"sync",state:"ERROR",syncError:new Error("Unexpected return state")});break}}catch(ye){Ie({type:"sync",state:"ERROR",syncError:ye})}finally{clearTimeout(ce)}},[_,$,G,pe,Ie,st]),{state:(0,r.useMemo)(()=>pt({activeSyncState:ve.activeSyncState,contentLoading:ve.contentLoading,content:ve.content}),[ve.activeSyncState,ve.content,ve.contentLoading]),contentReload:Te,path:ve.path,content:ve.content,contentErrorMessage:(S=ve.contentError)==null?void 0:S.toString(),syncErrorMessage:(z=ve.syncError)==null?void 0:z.toString(),buildLog:ve.buildLog}}const X=(0,l.Z)(_=>({searchBar:{maxWidth:"calc(100% - 16rem * 2 - 2.4rem)",marginTop:0,marginBottom:_.spacing(1),marginLeft:"calc(16rem + 1.2rem)","@media screen and (max-width: 76.1875em)":{marginLeft:"0",maxWidth:"100%"}}})),Z=(0,r.createContext)({}),te=({children:_,entityRef:G})=>{const{"*":$}=(0,t.UO)(),{kind:ie,namespace:ve,name:Ie}=G,pe=yt(ie,ve,Ie,$);return r.createElement(Z.Provider,{value:pe},_)},me=(_,G)=>$=>React.createElement(te,{entityRef:G},React.createElement(_,{...$})),le=()=>(0,r.useContext)(Z),Se=["h1","h2","h3","h4","h5","h6"],$e=_=>{const G=(0,t.s0)(),$=(0,f.Z)(),ie=(0,o.useApi)(g.D),ve=(0,o.useApi)(m.q3),Ie=(0,o.useApi)(o.configApiRef),{namespace:pe="",kind:Te="",name:st=""}=_,{state:re,path:S,content:z}=le(),ce=$.palette.type==="dark",[ye,Ae]=(0,r.useState)(),[Le,We]=(0,r.useState)(null),{isPinned:V}=(0,r.useContext)(c.SidebarPinStateContext),E=(0,r.useCallback)(()=>{if(!Le||!ye)return;const ae=Le.querySelector(".md-container > .md-tabs"),ue=window.matchMedia("screen and (max-width: 76.1875em)").matches,Re=Math.max(Le.getBoundingClientRect().top,0);ye.forEach(Ne=>{ue?Ne.style.top="0px":ae?Ne.style.top=`${Re+ae.getBoundingClientRect().height}px`:Ne.style.top=`${Re}px`})},[Le,ye]);(0,r.useEffect)(()=>(E(),window.addEventListener("scroll",E,!0),window.addEventListener("resize",E),()=>{window.removeEventListener("scroll",E,!0),window.removeEventListener("resize",E)}),[E,re]);const I=(0,r.useCallback)(()=>{if(!Le)return;const ae=Le.querySelector(".md-footer");ae&&(ae.style.width=`${Le.getBoundingClientRect().width}px`)},[Le]);(0,r.useEffect)(()=>(I(),window.addEventListener("resize",I),()=>{window.removeEventListener("resize",I)}));const M=(0,r.useCallback)((ae,ue)=>Lt(ae,[It(Ie.getOptionalConfig("techdocs.sanitizer")),R({techdocsStorageApi:ie,entityId:{kind:Te,name:st,namespace:pe},path:ue}),N(),B(),tt(),ot(),T(ve),At({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: ${$.palette.text.primary};
|
|
42
|
+
--md-default-fg-color--light: ${$.palette.text.secondary};
|
|
43
|
+
--md-default-fg-color--lighter: ${(0,y.$n)($.palette.text.secondary,.7)};
|
|
44
|
+
--md-default-fg-color--lightest: ${(0,y.$n)($.palette.text.secondary,.3)};
|
|
45
|
+
|
|
46
|
+
/* BACKGROUND */
|
|
47
|
+
--md-default-bg-color:${$.palette.background.default};
|
|
48
|
+
--md-default-bg-color--light: ${$.palette.background.paper};
|
|
49
|
+
--md-default-bg-color--lighter: ${(0,y.$n)($.palette.background.paper,.7)};
|
|
50
|
+
--md-default-bg-color--lightest: ${(0,y.$n)($.palette.background.paper,.3)};
|
|
51
|
+
|
|
52
|
+
/* PRIMARY */
|
|
53
|
+
--md-primary-fg-color: ${$.palette.primary.main};
|
|
54
|
+
--md-primary-fg-color--light: ${$.palette.primary.light};
|
|
55
|
+
--md-primary-fg-color--dark: ${$.palette.primary.dark};
|
|
56
|
+
--md-primary-bg-color: ${$.palette.primary.contrastText};
|
|
57
|
+
--md-primary-bg-color--light: ${(0,y.$n)($.palette.primary.contrastText,.7)};
|
|
58
|
+
|
|
59
|
+
/* ACCENT */
|
|
60
|
+
--md-accent-fg-color: var(--md-primary-fg-color);
|
|
61
|
+
|
|
62
|
+
/* SHADOW */
|
|
63
|
+
--md-shadow-z1: ${$.shadows[1]};
|
|
64
|
+
--md-shadow-z2: ${$.shadows[2]};
|
|
65
|
+
--md-shadow-z3: ${$.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: ${$.palette.text.primary};
|
|
102
|
+
--md-code-bg-color: ${$.palette.background.paper};
|
|
103
|
+
--md-code-hl-color: ${(0,y.Fq)($.palette.warning.main,.5)};
|
|
104
|
+
--md-code-hl-keyword-color: ${ce?$.palette.primary.light:$.palette.primary.dark};
|
|
105
|
+
--md-code-hl-function-color: ${ce?$.palette.secondary.light:$.palette.secondary.dark};
|
|
106
|
+
--md-code-hl-string-color: ${ce?$.palette.success.light:$.palette.success.dark};
|
|
107
|
+
--md-code-hl-number-color: ${ce?$.palette.error.light:$.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: ${$.palette.text.primary};
|
|
122
|
+
--md-typeset-del-color: ${ce?(0,y.Fq)($.palette.error.dark,.5):(0,y.Fq)($.palette.error.light,.5)};
|
|
123
|
+
--md-typeset-ins-color: ${ce?(0,y.Fq)($.palette.success.dark,.5):(0,y.Fq)($.palette.success.light,.5)};
|
|
124
|
+
--md-typeset-mark-color: ${ce?(0,y.Fq)($.palette.warning.dark,.5):(0,y.Fq)($.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
|
+
`}),At({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: ${$.typography.fontFamily};
|
|
145
|
+
font-family: var(--md-text-font-family);
|
|
146
|
+
background-color: unset;
|
|
147
|
+
}
|
|
148
|
+
`}),At({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:${$.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: ${$.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: ${V?"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
|
+
`}),At({css:`
|
|
336
|
+
.md-typeset {
|
|
337
|
+
font-size: var(--md-typeset-font-size);
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
${Se.reduce((Re,Ne)=>{const Ve=$.typography[Ne],{lineHeight:bt,fontFamily:dt,fontWeight:Wt,fontSize:jt}=Ve,Rt=St=>{let Nt=1;return typeof St=="number"&&(Nt=St/16*.6),typeof St=="string"&&(Nt=St.replace("rem","")),`calc(${Nt} * var(--md-typeset-font-size))`};return Re.concat(`
|
|
341
|
+
.md-typeset ${Ne} {
|
|
342
|
+
color: var(--md-default-fg-color);
|
|
343
|
+
line-height: ${bt};
|
|
344
|
+
font-family: ${dt};
|
|
345
|
+
font-weight: ${Wt};
|
|
346
|
+
font-size: ${Rt(jt)};
|
|
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 ${$.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
|
+
`}),At({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
|
+
`}),At({css:`
|
|
408
|
+
/* HIGHLIGHT */
|
|
409
|
+
.highlight .md-clipboard:after {
|
|
410
|
+
content: unset;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
.highlight .nx {
|
|
414
|
+
color: ${ce?"#ff53a3":"#ec407a"};
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
/* CODE HILITE */
|
|
418
|
+
.codehilite .gd {
|
|
419
|
+
background-color: ${ce?"rgba(248,81,73,0.65)":"#fdd"};
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
.codehilite .gi {
|
|
423
|
+
background-color: ${ce?"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: ${$.palette.action.disabledBackground};
|
|
454
|
+
}
|
|
455
|
+
.task-list-control [type="checkbox"]:checked + .task-list-indicator:before {
|
|
456
|
+
background-color: ${$.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
|
+
`})]),[Te,st,pe,ve,Ie,ie,$,ce,V]),ee=(0,r.useCallback)(async ae=>Lt(ae,[Bt(),et($),se({baseUrl:window.location.origin,onClick:(ue,Re)=>{var bt,dt;const Ne=ue.ctrlKey||ue.metaKey,Ve=new URL(Re);Ve.hash?Ne?window.open(`${Ve.pathname}${Ve.hash}`,"_blank"):(G(`${Ve.pathname}${Ve.hash}`),(bt=ae==null?void 0:ae.querySelector(`#${Ve.hash.slice(1)}`))==null||bt.scrollIntoView()):Ne?window.open(Ve.pathname,"_blank"):(G(Ve.pathname),(dt=ae==null?void 0:ae.querySelector(".md-content__inner"))==null||dt.scrollIntoView())}}),Ee({docStorageUrl:await ie.getApiOrigin(),onLoading:ue=>{ue.style.setProperty("opacity","0")},onLoaded:ue=>{var Re;ue.style.removeProperty("opacity"),(Re=ue.querySelector(".md-nav__title"))==null||Re.removeAttribute("for"),Ae(Array.from(ue.querySelectorAll(".md-sidebar")))}})]),[$,G,ie]);return(0,r.useEffect)(()=>{if(!z)return()=>{};let ae=!0;return M(z,S).then(async ue=>{if(!(ue==null?void 0:ue.innerHTML)||!ae)return;window.scroll({top:0});const Re=await ee(ue);We(Re)}),()=>{ae=!1}},[z,S,M,ee]),Le},Ze=({entityRef:_,onReady:G=()=>{},withSearch:$=!0})=>{var Te,st;const ie=X(),ve=$e(_),Ie=(0,r.useRef)(null),pe=(0,r.useRef)(G);return(0,r.useEffect)(()=>{pe.current=G},[G]),(0,r.useEffect)(()=>{if(!ve||!Ie.current)return;const re=Ie.current,S=re.shadowRoot||re.attachShadow({mode:"open"});Array.from(S.children).forEach(z=>S.removeChild(z)),S.appendChild(ve),pe.current()},[ve]),r.createElement(r.Fragment,null,r.createElement(ze.N,null),$&&((st=(Te=Ie==null?void 0:Ie.current)==null?void 0:Te.shadowRoot)==null?void 0:st.innerHTML)&&r.createElement(i.Z,{container:!0,className:ie.searchBar},r.createElement(Ct.S,{entityId:_})),r.createElement("div",{"data-testid":"techdocs-content-shadowroot",ref:Ie}))},Xe=_=>{const{entityRef:G,onReady:$=()=>{},withSearch:ie=!0}=_;return r.createElement(te,{entityRef:G},r.createElement(Ze,{entityRef:G,onReady:$,withSearch:ie}))}},75733:function(q,s,e){"use strict";e.r(s),e.d(s,{TechDocsReaderPage:function(){return c}});var r=e(2784),t=e(10289),l=e(64279),f=e(53242),y=e(75505),i=e(3337),o=e(36964),m=e(9118);const c=g=>{const{children:p}=g,{NotFoundErrorPage:R}=(0,o.useApp)().getComponents(),L=(0,t.pC)(),[U,P]=(0,r.useState)(!1),{namespace:Q,kind:D,name:T}=(0,t.UO)(),b=(0,o.useApi)(i.g),{value:B}=(0,l.default)(()=>U?b.getTechDocsMetadata({kind:D,namespace:Q,name:T}):Promise.resolve(void 0),[D,Q,T,b,U]),{value:N,error:j}=(0,l.default)(()=>b.getEntityMetadata({kind:D,namespace:Q,name:T}),[D,Q,T,b]),se=(0,r.useCallback)(()=>{P(!0)},[P]);return j?r.createElement(R,null):p?r.createElement(m.Page,{themeId:"documentation"},p instanceof Function?p({techdocsMetadataValue:B,entityMetadataValue:N,entityRef:{kind:D,namespace:Q,name:T},onReady:se}):p):L||r.createElement(m.Page,{themeId:"documentation"},r.createElement(y.S,{techDocsMetadata:B,entityMetadata:N,entityRef:{kind:D,namespace:Q,name:T}}),r.createElement(m.Content,{"data-testid":"techdocs-content"},r.createElement(f.Ej,{onReady:se,entityRef:{kind:D,namespace:Q,name:T}})))}},75505:function(q,s,e){"use strict";e.d(s,{S:function(){return m}});var r=e(2784),t=e(73250),l=e(36964),f=e(9118),y=e(48023),i=e(53479),o=e(68725);const m=c=>{const{entityRef:g,entityMetadata:p,techDocsMetadata:R,children:L}=c,{name:U}=g,{site_name:P,site_description:Q}=R||{},{locationMetadata:D,spec:T}=p||{},b=T==null?void 0:T.lifecycle,B=p?(0,i.getEntityRelations)(p,y.S4):[],N=(0,l.useRouteRef)(o._Z)(),j=r.createElement(r.Fragment,null,r.createElement(f.HeaderLabel,{label:"Component",value:r.createElement(i.EntityRefLink,{color:"inherit",entityRef:g,defaultKind:"Component"})}),B.length>0&&r.createElement(f.HeaderLabel,{label:"Owner",value:r.createElement(i.EntityRefLinks,{color:"inherit",entityRefs:B,defaultKind:"group"})}),b?r.createElement(f.HeaderLabel,{label:"Lifecycle",value:b}):null,D&&D.type!=="dir"&&D.type!=="file"?r.createElement(f.HeaderLabel,{label:"",value:r.createElement("a",{href:D.target,target:"_blank",rel:"noopener noreferrer"},r.createElement(t.Z,{style:{marginTop:"-25px",fill:"#fff"}}))}):null);return r.createElement(f.Header,{title:P||".",pageTitleOverride:P||U,subtitle:Q&&Q!=="None"?Q:"",type:"Docs",typeLink:N},j,L)}},23738:function(q,s,e){"use strict";e.d(s,{N:function(){return B}});var r=e(2784),t=e(9118),l=e(79692),f=e(4614),y=e(77277),i=e(99688),o=e(12420),m=e(60905),c=e(90436),g=e(61837),p=e(4190),R=e(87685);const L=(0,l.Z)(N=>(0,o.Z)({paper:{width:"100%",[N.breakpoints.up("sm")]:{width:"75%"},[N.breakpoints.up("md")]:{width:"50%"},padding:N.spacing(2.5)},root:{height:"100%",overflow:"hidden"},logs:{background:N.palette.background.default}})),U=({buildLog:N,onClose:j})=>{const se=L(),Ce=N.length===0?"Waiting for logs...":N.join(`
|
|
474
|
+
`);return r.createElement(m.Z,{container:!0,direction:"column",className:se.root,spacing:0,wrap:"nowrap"},r.createElement(m.Z,{item:!0,container:!0,justifyContent:"space-between",alignItems:"center",spacing:0,wrap:"nowrap"},r.createElement(c.Z,{variant:"h5"},"Build Details"),r.createElement(g.Z,{key:"dismiss",title:"Close the drawer",onClick:j,color:"inherit"},r.createElement(R.Z,null))),r.createElement(t.LogViewer,{text:Ce,classes:{root:se.logs}}))},P=({buildLog:N})=>{const j=L(),[se,Ce]=(0,r.useState)(!1);return r.createElement(r.Fragment,null,r.createElement(y.Z,{color:"inherit",onClick:()=>Ce(!0)},"Show Build Logs"),r.createElement(p.ZP,{classes:{paper:j.paper},anchor:"right",open:se,onClose:()=>Ce(!1)},r.createElement(U,{buildLog:N,onClose:()=>Ce(!1)})))};var Q=e(36964);const D=({errorMessage:N})=>{const j=(0,Q.useApi)(Q.configApiRef).getOptionalString("techdocs.builder");let se="";return j!=="local"&&(se="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:N||"Documentation not found",additionalInfo:se})};var T=e(53242);const b=(0,l.Z)(N=>({root:{marginBottom:N.spacing(2)},message:{wordBreak:"break-word",overflowWrap:"anywhere"}})),B=()=>{let N=null;const j=b(),{state:se,contentReload:Ce,contentErrorMessage:xe,syncErrorMessage:He,buildLog:fe}=(0,T.DK)(),je=se==="CHECKING"?r.createElement(t.Progress,null):null;return se==="INITIAL_BUILD"&&(N=r.createElement(i.Z,{classes:{root:j.root},variant:"outlined",severity:"info",icon:r.createElement(f.Z,{size:"24px"}),action:r.createElement(P,{buildLog:fe})},"Documentation is accessed for the first time and is being prepared. The subsequent loads are much faster.")),se==="CONTENT_STALE_REFRESHING"&&(N=r.createElement(i.Z,{variant:"outlined",severity:"info",icon:r.createElement(f.Z,{size:"24px"}),action:r.createElement(P,{buildLog:fe}),classes:{root:j.root}},"A newer version of this documentation is being prepared and will be available shortly.")),se==="CONTENT_STALE_READY"&&(N=r.createElement(i.Z,{variant:"outlined",severity:"success",action:r.createElement(y.Z,{color:"inherit",onClick:()=>Ce()},"Refresh"),classes:{root:j.root}},"A newer version of this documentation is now available, please refresh to view.")),se==="CONTENT_STALE_ERROR"&&(N=r.createElement(i.Z,{variant:"outlined",severity:"error",action:r.createElement(P,{buildLog:fe}),classes:{root:j.root,message:j.message}},"Building a newer version of this documentation failed."," ",He)),se==="CONTENT_NOT_FOUND"&&(N=r.createElement(r.Fragment,null,He&&r.createElement(i.Z,{variant:"outlined",severity:"error",action:r.createElement(P,{buildLog:fe}),classes:{root:j.root,message:j.message}},"Building a newer version of this documentation failed."," ",He),r.createElement(D,{errorMessage:xe}))),r.createElement(r.Fragment,null,je,N)}},96393:function(q,s,e){"use strict";e.d(s,{Ej:function(){return r.Ej},SE:function(){return t.S}});var r=e(53242),t=e(75505),l=e(23738)},68725:function(q,s,e){"use strict";e.d(s,{_Z:function(){return t},Fw:function(){return l},pd:function(){return f}});var r=e(36964);const t=(0,r.createRouteRef)({id:"techdocs:index-page"}),l=(0,r.createRouteRef)({id:"techdocs:reader-page",params:["namespace","kind","name"]}),f=(0,r.createRouteRef)({id:"techdocs:catalog-reader-view"})},93566:function(q,s,e){"use strict";e.d(s,{S:function(){return re}});var r=e(2784),t=e(79692),l=e(49378),f=e(38402),y=e(85256),i=e(9118),o=e(15277),m=e.n(o);const c=(0,t.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",marginBottom:"1rem"}}),g=S=>{const{result:z,lineClamp:ce=5,asListItem:ye=!0,asLink:Ae=!0,title:Le}=S,We=c(),V=()=>{var M;return r.createElement(l.Z,{className:We.itemText,primaryTypographyProps:{variant:"h6"},primary:Le||`${z.title} | ${(M=z.entityTitle)!=null?M:z.name} docs`,secondary:r.createElement(m(),{line:ce,truncateText:"\u2026",text:z.text,element:"span"})})},E=({children:M})=>Ae?r.createElement(i.Link,{to:z.location},M):r.createElement(r.Fragment,null,M),I=({children:M})=>ye?r.createElement(r.Fragment,null,r.createElement(f.Z,{alignItems:"flex-start",className:We.flexContainer},M),r.createElement(y.Z,{component:"li"})):r.createElement(r.Fragment,null,M);return r.createElement(E,null,r.createElement(I,null,r.createElement(V,null)))};var p=e(91512);const R=(0,t.Z)(S=>({filters:{width:"250px",display:"flex"},icon:{margin:S.spacing(-1,0,0,0)}})),L=({numberOfSelectedFilters:S,handleToggleFilters:z})=>{const ce=R();return React.createElement("div",{className:ce.filters},React.createElement(IconButton,{className:ce.icon,"aria-label":"settings",onClick:z},React.createElement(FilterListIcon,null)),React.createElement(Typography,{variant:"h6"},"Filters (",S||0,")"))},U=(0,t.Z)(S=>({filters:{background:"transparent",boxShadow:"0px 0px 0px 0px"},checkbox:{padding:S.spacing(0,1,0,1)},dropdown:{width:"100%"}})),P=({filters:S,filterOptions:z,resetFilters:ce,updateSelected:ye,updateChecked:Ae})=>{const Le=U();return React.createElement(Card,{className:Le.filters},React.createElement(CardHeader,{title:React.createElement(Typography,{variant:"h6"},"Filters"),action:React.createElement(Button,{color:"primary",onClick:()=>ce()},"CLEAR ALL")}),React.createElement(Divider,null),z.kind.length===0&&z.lifecycle.length===0&&React.createElement(CardContent,null,React.createElement(Typography,{variant:"subtitle2"},"Filters cannot be applied to available results")),z.kind.length>0&&React.createElement(CardContent,null,React.createElement(Typography,{variant:"subtitle2"},"Kind"),React.createElement(Select,{id:"outlined-select",onChange:We=>{var V;return ye((V=We==null?void 0:We.target)==null?void 0:V.value)},variant:"outlined",className:Le.dropdown,value:S.selected},z.kind.map(We=>React.createElement(MenuItem,{selected:We==="",dense:!0,key:We,value:We},We)))),z.lifecycle.length>0&&React.createElement(CardContent,null,React.createElement(Typography,{variant:"subtitle2"},"Lifecycle"),React.createElement(List,{disablePadding:!0,dense:!0},z.lifecycle.map(We=>React.createElement(ListItem,{key:We,dense:!0,button:!0,onClick:()=>Ae(We)},React.createElement(Checkbox,{edge:"start",disableRipple:!0,className:Le.checkbox,color:"primary",checked:S.checked.includes(We),tabIndex:-1,value:We,name:We}),React.createElement(ListItemText,{id:We,primary:We}))))))};var Q=e(1795),D=e(22313),T=e(42494),b=e(84899),B=e(5806),N=e(21324),j=e(56939),se=e(73698),Ce=e(12231),xe=e(86619),He=e(7089),fe=e(88013),je=e(69294),Qe=e(48760);const at=(S,z,ce=[],ye=250)=>{const Ae=(0,r.useRef)({}),Le=S||(()=>Promise.resolve([])),[We,V]=(0,je.default)(Le,[z],{loading:!0});if((0,Qe.Z)(()=>{Ae.current[z]===void 0&&(Ae.current[z]=V(z).then(I=>(Ae.current[z]=I,I)))},ye,[V,z]),ce.length)return{loading:!1,value:ce};const E=Ae.current[z];return Array.isArray(E)?{loading:!1,value:E}:We},et=(S,z)=>{const{setFilters:ce}=(0,D.Rx)();(0,r.useEffect)(()=>{z&&[z].flat().length>0&&ce(ye=>({...ye,[S]:z}))},[])},tt=S=>{const{className:z,defaultValue:ce,name:ye,values:Ae,valuesDebounceMs:Le,label:We,filterSelectedOptions:V,limitTags:E,multiple:I}=S,[M,ee]=(0,r.useState)("");et(ye,ce);const ae=typeof Ae=="function"?Ae:void 0,ue=typeof Ae=="function"?void 0:Ae,{value:Re,loading:Ne}=at(ae,M,ue,Le),{filters:Ve,setFilters:bt}=(0,D.Rx)(),dt=Ve[ye]||(I?[]:null),Wt=(St,Nt)=>{bt(An=>{const{[ye]:bn,...Bn}=An;return Nt?{...Bn,[ye]:Nt}:{...Bn}})},jt=St=>r.createElement(xe.Z,{...St,name:"search",variant:"outlined",label:We,fullWidth:!0}),Rt=(St,Nt)=>St.map((An,bn)=>r.createElement(He.Z,{label:An,color:"primary",...Nt({index:bn})}));return r.createElement(fe.ZP,{filterSelectedOptions:V,limitTags:E,multiple:I,className:z,id:`${I?"multi-":""}select-filter-${ye}--select`,options:Re||[],loading:Ne,value:dt,onChange:Wt,onInputChange:(St,Nt)=>ee(Nt),renderInput:jt,renderTags:Rt})},ot=(0,t.Z)({label:{textTransform:"capitalize"}}),Ee=S=>{const{className:z,defaultValue:ce,label:ye,name:Ae,values:Le=[],valuesDebounceMs:We}=S,V=ot(),{filters:E,setFilters:I}=(0,D.Rx)();et(Ae,ce);const M=typeof Le=="function"?Le:void 0,ee=typeof Le=="function"?void 0:Le,{value:ae=[],loading:ue}=at(M,"",ee,We),Re=Ne=>{const{target:{value:Ve,checked:bt}}=Ne;I(dt=>{const{[Ae]:Wt,...jt}=dt,Rt=(Wt||[]).filter(Nt=>Nt!==Ve),St=bt?[...Rt,Ve]:Rt;return St.length?{...jt,[Ae]:St}:jt})};return r.createElement(T.Z,{className:z,disabled:ue,fullWidth:!0,"data-testid":"search-checkboxfilter-next"},ye?r.createElement(b.Z,{className:V.label},ye):null,ae.map(Ne=>{var Ve;return r.createElement(B.Z,{key:Ne,control:r.createElement(N.Z,{color:"primary",tabIndex:-1,inputProps:{"aria-labelledby":Ne},value:Ne,name:Ne,onChange:Re,checked:((Ve=E[Ae])!=null?Ve:[]).includes(Ne)}),label:Ne})}))},Ge=S=>{const{className:z,defaultValue:ce,label:ye,name:Ae,values:Le,valuesDebounceMs:We}=S,V=ot();et(Ae,ce);const E=typeof Le=="function"?Le:void 0,I=typeof Le=="function"?void 0:Le,{value:M=[],loading:ee}=at(E,"",I,We),{filters:ae,setFilters:ue}=(0,D.Rx)(),Re=Ne=>{const{target:{value:Ve}}=Ne;ue(bt=>{const{[Ae]:dt,...Wt}=bt;return Ve?{...Wt,[Ae]:Ve}:Wt})};return r.createElement(T.Z,{disabled:ee,className:z,variant:"filled",fullWidth:!0,"data-testid":"search-selectfilter-next"},ye?r.createElement(j.Z,{className:V.label,margin:"dense"},ye):null,r.createElement(se.Z,{variant:"outlined",value:ae[Ae]||"",onChange:Re},r.createElement(Ce.Z,{value:""},r.createElement("em",null,"All")),M.map(Ne=>r.createElement(Ce.Z,{key:Ne,value:Ne},Ne))))},lt=({component:S,...z})=>r.createElement(S,{...z});lt.Checkbox=S=>r.createElement(lt,{...S,component:Ee}),lt.Select=S=>r.createElement(lt,{...S,component:Ge}),lt.Autocomplete=S=>r.createElement(lt,{...S,component:tt});const Dt=null;var gt=e(73032),Et=e(3992),ct=e(8542),ft=e(62155),It=e(94339),At=e(32552),Bt=e(24579),Lt=e(27616),Ct=e(8284),ze=e(70660),nt=e(11776),Ke=e(86136),pt=e(38016),rt=e(56881);const yt=(0,t.Z)(S=>({card:{backgroundColor:"rgba(0, 0, 0, .11)"},cardContent:{paddingTop:S.spacing(1)},icon:{color:S.palette.common.black},list:{width:"100%"},listItemIcon:{width:"24px",height:"24px"},accordion:{backgroundColor:S.palette.background.paper},accordionSummary:{minHeight:"auto","&.Mui-expanded":{minHeight:"auto"}},accordionSummaryContent:{margin:S.spacing(2,0),"&.Mui-expanded":{margin:S.spacing(2,0)}},accordionDetails:{padding:S.spacing(0,0,1)}})),X=S=>{const z=yt(),{setPageCursor:ce,setTypes:ye,types:Ae}=(0,D.Rx)(),[Le,We]=(0,r.useState)(!0),{defaultValue:V,name:E,types:I}=S,M=()=>We(Re=>!Re),ee=Re=>()=>{ye(Re!==""?[Re]:[]),ce(void 0),We(!1)};(0,r.useEffect)(()=>{V&&ye([V])},[]);const ae=[{value:"",name:"All",icon:r.createElement(rt.Z,null)},...I],ue=Ae[0]||"";return r.createElement(It.Z,{className:z.card},r.createElement(At.Z,{title:E,titleTypographyProps:{variant:"overline"}}),r.createElement(Bt.Z,{className:z.cardContent},r.createElement(Lt.Z,{className:z.accordion,expanded:Le,onChange:M},r.createElement(Ct.Z,{classes:{root:z.accordionSummary,content:z.accordionSummaryContent},expandIcon:r.createElement(pt.Z,{className:z.icon}),IconButtonProps:{size:"small"}},Le?"Collapse":ae.filter(Re=>Re.value===ue)[0].name),r.createElement(ze.Z,{classes:{root:z.accordionDetails}},r.createElement(nt.Z,{className:z.list,component:"nav","aria-label":"filter by type",disablePadding:!0,dense:!0},ae.map(Re=>r.createElement(r.Fragment,{key:Re.value},r.createElement(y.Z,null),r.createElement(f.Z,{selected:Ae[0]===Re.value||Ae.length===0&&Re.value==="",onClick:ee(Re.value),button:!0},r.createElement(Ke.Z,null,(0,r.cloneElement)(Re.icon,{className:z.listItemIcon})),r.createElement(l.Z,{primary:Re.name})))))))))};var Z=e(99152),te=e(6487);const me=(0,t.Z)(S=>({tabs:{borderBottom:`1px solid ${S.palette.textVerySubtle}`,padding:S.spacing(0,4)},tab:{height:"50px",fontWeight:S.typography.fontWeightBold,fontSize:S.typography.pxToRem(13),color:S.palette.textSubtle,minWidth:"130px"}})),le=S=>{const z=me(),{setPageCursor:ce,setTypes:ye,types:Ae}=(0,D.Rx)(),{defaultValue:Le,types:We}=S,V=(I,M)=>{ye(M!==""?[M]:[]),ce(void 0)};(0,r.useEffect)(()=>{Le&&ye([Le])},[]);const E=[{value:"",name:"All"},...We];return r.createElement(Z.Z,{className:z.tabs,indicatorColor:"primary",value:Ae.length===0?"":Ae[0],onChange:V},E.map(I=>r.createElement(te.Z,{className:z.tab,disableRipple:!0,label:I.name,value:I.value})))},Se=(0,t.Z)(S=>({label:{textTransform:"capitalize"},chips:{display:"flex",flexWrap:"wrap",marginTop:S.spacing(1)},chip:{margin:2}})),$e=S=>{const{className:z,defaultValue:ce,name:ye,values:Ae=[]}=S,Le=Se(),{types:We,setTypes:V}=(0,D.Rx)();(0,ft.Z)(()=>{We.length||(ce&&Array.isArray(ce)?V(ce):ce&&V([ce]))});const E=I=>{const M=I.target.value;V(M)};return r.createElement(T.Z,{className:z,variant:"filled",fullWidth:!0,"data-testid":"search-typefilter-next"},r.createElement(j.Z,{className:Le.label,margin:"dense"},ye),r.createElement(se.Z,{multiple:!0,variant:"outlined",value:We,onChange:E,placeholder:"All Results",renderValue:I=>r.createElement("div",{className:Le.chips},I.map(M=>r.createElement(He.Z,{key:M,label:M,className:Le.chip,size:"small"})))},Ae.map(I=>r.createElement(Ce.Z,{key:I,value:I},r.createElement(N.Z,{checked:We.indexOf(I)>-1}),r.createElement(l.Z,{primary:I})))))};$e.Accordion=S=>r.createElement(X,{...S}),$e.Tabs=S=>r.createElement(le,{...S});var Ze=e(19126),Xe=e(20863),_=e(36964);const G=S=>{const z=useRouteRef(rootRouteRef),{focusContent:ce}=useContent(),ye=useNavigate(),Ae=useCallback(Le=>{const We=qs.stringify({query:Le},{addQueryPrefix:!0});ce(),ye(`${z()}${We}`)},[ce,ye,z]);return React.createElement(SidebarSearchField,{icon:S.icon,onSearch:Ae,to:"/search"})};var $=e(50581),ie=e(61837),ve=e(4614),Ie=e(21853),pe=e(10289);const Te=(0,t.Z)({root:{width:"100%"}}),st=S=>{const{entityId:z,debounceTime:ce=150}=S,[ye,Ae]=(0,r.useState)(!1),Le=(0,pe.s0)(),{term:We,setTerm:V,setFilters:E,result:{loading:I,value:M}}=(0,D.Rx)(),ee=Te(),[ae,ue]=(0,r.useState)([]);(0,r.useEffect)(()=>{let Rt=!0;if(Rt&&M){const St=M.results.slice(0,10);ue(St)}return()=>{Rt=!1}},[I,M]);const[Re,Ne]=(0,r.useState)(We);(0,Qe.Z)(()=>V(Re),ce,[Re]);const{kind:Ve,name:bt,namespace:dt}=z;(0,r.useEffect)(()=>{E(Rt=>({...Rt,kind:Ve,namespace:dt,name:bt}))},[Ve,dt,bt,E]);const Wt=Rt=>{ye||Ae(!0),Ne(Rt.target.value)},jt=(Rt,St)=>{if(St==null?void 0:St.document){const{location:Nt}=St.document;Le(Nt)}};return r.createElement(fe.ZP,{classes:{root:ee.root},"data-testid":"techdocs-search-bar",size:"small",open:ye,getOptionLabel:()=>"",filterOptions:Rt=>Rt,onClose:()=>{Ae(!1)},onFocus:()=>{Ae(!0)},onChange:jt,blurOnSelect:!0,noOptionsText:"No results found",value:null,options:ae,renderOption:({document:Rt})=>r.createElement(g,{result:Rt,lineClamp:3,asListItem:!1,asLink:!1,title:Rt.title}),loading:I,renderInput:Rt=>r.createElement(xe.Z,{...Rt,"data-testid":"techdocs-search-bar-input",variant:"outlined",fullWidth:!0,placeholder:`Search ${z.name} docs`,value:Re,onChange:Wt,InputProps:{...Rt.InputProps,startAdornment:r.createElement($.Z,{position:"start"},r.createElement(ie.Z,{"aria-label":"Query",disabled:!0},r.createElement(Ie.Z,null))),endAdornment:r.createElement(r.Fragment,null,I?r.createElement(ve.Z,{color:"inherit",size:20}):null,Rt.InputProps.endAdornment)}})})},re=S=>{const z={term:"",types:["techdocs"],pageCursor:"",filters:S.entityId};return r.createElement(D.Nd,{initialState:z},r.createElement(st,{...S}))}},98157:function(){},19133:function(q,s,e){"use strict";q.exports=e.p+"static/createComponent.975d1e1e..svg"},86284:function(q,s,e){"use strict";q.exports=e.p+"static/missingAnnotation.67f79e98..svg"},3871:function(q,s,e){"use strict";q.exports=e.p+"static/noBuild.1715fa71..svg"},96465:function(q,s,e){"use strict";q.exports=e.p+"static/noInformation.4b426325..svg"},29788:function(q,s,e){"use strict";q.exports=e.p+"static/mic-drop.fe3ef4d0..svg"},53260:function(){}},function(q){var s=function(r){return q(q.s=r)};q.O(0,[2370,6202,9284,2126,7012,9035,4983,5218,4736],function(){return s(88649),s(46054)});var e=q.O()}]);})();
|
|
475
|
+
|
|
476
|
+
//# sourceMappingURL=main.0b0e8219.js.map
|