@techdocs/cli 0.0.0-nightly-202201921950 → 0.0.0-nightly-202202022734
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 +5 -5
- package/dist/techdocs-preview-bundle/index.html +1 -1
- package/dist/techdocs-preview-bundle/static/1553.2e6cd39a.chunk.js +3 -0
- package/dist/techdocs-preview-bundle/static/1553.2e6cd39a.chunk.js.map +1 -0
- package/dist/techdocs-preview-bundle/static/{1959.e4e37559.chunk.js → 1959.17374c3e.chunk.js} +1 -1
- package/dist/techdocs-preview-bundle/static/{1959.e4e37559.chunk.js.map → 1959.17374c3e.chunk.js.map} +1 -1
- package/dist/techdocs-preview-bundle/static/2426.03dc8391.chunk.js +3 -0
- package/dist/techdocs-preview-bundle/static/2426.03dc8391.chunk.js.map +1 -0
- package/dist/techdocs-preview-bundle/static/{3825.a9a691f4.chunk.js → 3825.ba0db915.chunk.js} +1 -1
- package/dist/techdocs-preview-bundle/static/{3825.a9a691f4.chunk.js.map → 3825.ba0db915.chunk.js.map} +1 -1
- package/dist/techdocs-preview-bundle/static/390.1bc5fb93.chunk.js +3 -0
- package/dist/techdocs-preview-bundle/static/390.1bc5fb93.chunk.js.map +1 -0
- package/dist/techdocs-preview-bundle/static/4022.b7308cf9.chunk.js +3 -0
- package/dist/techdocs-preview-bundle/static/4022.b7308cf9.chunk.js.map +1 -0
- package/dist/techdocs-preview-bundle/static/{4960.f6567d97.chunk.js → 4960.35dd8ba1.chunk.js} +1 -1
- package/dist/techdocs-preview-bundle/static/{4960.f6567d97.chunk.js.map → 4960.35dd8ba1.chunk.js.map} +1 -1
- package/dist/techdocs-preview-bundle/static/6235.a7c0be0f.chunk.js +3 -0
- package/dist/techdocs-preview-bundle/static/6235.a7c0be0f.chunk.js.map +1 -0
- package/dist/techdocs-preview-bundle/static/8061.327821c0.chunk.js +3 -0
- package/dist/techdocs-preview-bundle/static/8061.327821c0.chunk.js.map +1 -0
- package/dist/techdocs-preview-bundle/static/8792.56cea1cf.chunk.js +3 -0
- package/dist/techdocs-preview-bundle/static/8792.56cea1cf.chunk.js.map +1 -0
- package/dist/techdocs-preview-bundle/static/9028.81a54132.chunk.js +3 -0
- package/dist/techdocs-preview-bundle/static/9028.81a54132.chunk.js.map +1 -0
- package/dist/techdocs-preview-bundle/static/main.bd8a508f.js +150 -0
- package/dist/techdocs-preview-bundle/static/main.bd8a508f.js.map +1 -0
- package/dist/techdocs-preview-bundle/static/{runtime.bd87150d.js → runtime.bd8a508f.js} +3 -3
- package/dist/techdocs-preview-bundle/static/runtime.bd8a508f.js.map +1 -0
- package/dist/techdocs-preview-bundle/static/vendor.bd8a508f.js +150 -0
- package/dist/techdocs-preview-bundle/static/vendor.bd8a508f.js.map +1 -0
- package/package.json +7 -7
- package/dist/techdocs-preview-bundle/static/1553.7cf96a24.chunk.js +0 -3
- package/dist/techdocs-preview-bundle/static/1553.7cf96a24.chunk.js.map +0 -1
- package/dist/techdocs-preview-bundle/static/390.0ac36f38.chunk.js +0 -3
- package/dist/techdocs-preview-bundle/static/390.0ac36f38.chunk.js.map +0 -1
- package/dist/techdocs-preview-bundle/static/4022.2a4c3ef2.chunk.js +0 -3
- package/dist/techdocs-preview-bundle/static/4022.2a4c3ef2.chunk.js.map +0 -1
- package/dist/techdocs-preview-bundle/static/6235.17d44e1e.chunk.js +0 -3
- package/dist/techdocs-preview-bundle/static/6235.17d44e1e.chunk.js.map +0 -1
- package/dist/techdocs-preview-bundle/static/8061.b7c32996.chunk.js +0 -3
- package/dist/techdocs-preview-bundle/static/8061.b7c32996.chunk.js.map +0 -1
- package/dist/techdocs-preview-bundle/static/8792.7b20dc6e.chunk.js +0 -3
- package/dist/techdocs-preview-bundle/static/8792.7b20dc6e.chunk.js.map +0 -1
- package/dist/techdocs-preview-bundle/static/9028.6f75c2de.chunk.js +0 -3
- package/dist/techdocs-preview-bundle/static/9028.6f75c2de.chunk.js.map +0 -1
- package/dist/techdocs-preview-bundle/static/main.bd87150d.js +0 -150
- package/dist/techdocs-preview-bundle/static/main.bd87150d.js.map +0 -1
- package/dist/techdocs-preview-bundle/static/runtime.bd87150d.js.map +0 -1
- package/dist/techdocs-preview-bundle/static/vendor.bd87150d.js +0 -150
- package/dist/techdocs-preview-bundle/static/vendor.bd87150d.js.map +0 -1
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
var Gi=Object.defineProperty;var Ki=(J,o,e)=>o in J?Gi(J,o,{enumerable:!0,configurable:!0,writable:!0,value:e}):J[o]=e;var k=(J,o,e)=>(Ki(J,typeof o!="symbol"?o+"":o,e),e),Eo=(J,o,e)=>{if(!o.has(J))throw TypeError("Cannot "+e)};var _e=(J,o,e)=>(Eo(J,o,"read from private field"),e?e.call(J):o.get(J)),vn=(J,o,e)=>{if(o.has(J))throw TypeError("Cannot add the same private member more than once");o instanceof WeakSet?o.add(J):o.set(J,e)},In=(J,o,e,r)=>(Eo(J,o,"write to private field"),r?r.call(J,e):o.set(J,e),e);(self.webpackChunkembedded_techdocs_app=self.webpackChunkembedded_techdocs_app||[]).push([[179],{30001:function(J,o,e){"use strict";e.d(o,{n3:function(){return g},MS:function(){return s}});var r=e(52890),t=e(10179),l=e(96279),f=e.n(l);const g=Symbol("CATALOG_FILTER_EXISTS");class s{constructor(m){k(this,"discoveryApi");k(this,"fetchApi");this.discoveryApi=m.discoveryApi,this.fetchApi=m.fetchApi||{fetch:f()}}async getEntityAncestors(m,y){const{kind:h,namespace:E,name:i}=(0,r.of)(m.entityRef);return await this.requestRequired("GET",`/entities/by-name/${encodeURIComponent(h)}/${encodeURIComponent(E)}/${encodeURIComponent(i)}/ancestry`,y)}async getLocationById(m,y){return await this.requestOptional("GET",`/locations/${encodeURIComponent(m)}`,y)}async getEntities(m,y){const{filter:h=[],fields:E=[],offset:i,limit:S,after:F}=m!=null?m:{},T=[h].flat(),j=[];for(const O of T){const Y=[];for(const[G,fe]of Object.entries(O))for(const Re of[fe].flat())Re===g?Y.push(encodeURIComponent(G)):typeof Re=="string"&&Y.push(`${encodeURIComponent(G)}=${encodeURIComponent(Re)}`);Y.length&&j.push(`filter=${Y.join(",")}`)}E.length&&j.push(`fields=${E.map(encodeURIComponent).join(",")}`),i!==void 0&&j.push(`offset=${i}`),S!==void 0&&j.push(`limit=${S}`),F!==void 0&&j.push(`after=${encodeURIComponent(F)}`);const x=j.length?`?${j.join("&")}`:"",b=await this.requestRequired("GET",`/entities${x}`,y),M=(O,Y)=>{var Re,we;if(((Re=O.metadata)==null?void 0:Re.name)===void 0||O.kind===void 0||((we=Y.metadata)==null?void 0:we.name)===void 0||Y.kind===void 0)return 0;const G=(0,r.eE)(O),fe=(0,r.eE)(Y);return G<fe?-1:G>fe?1:0};return{items:b.sort(M)}}async getEntityByName(m,y){const{kind:h,namespace:E="default",name:i}=m;return this.requestOptional("GET",`/entities/by-name/${encodeURIComponent(h)}/${encodeURIComponent(E)}/${encodeURIComponent(i)}`,y)}async refreshEntity(m,y){const h=await this.fetchApi.fetch(`${await this.discoveryApi.getBaseUrl("catalog")}/refresh`,{headers:{"Content-Type":"application/json",...(y==null?void 0:y.token)&&{Authorization:`Bearer ${y==null?void 0:y.token}`}},method:"POST",body:JSON.stringify({entityRef:m})});if(h.status!==200)throw new Error(await h.text())}async addLocation({type:m="url",target:y,dryRun:h,presence:E},i){const S=await this.fetchApi.fetch(`${await this.discoveryApi.getBaseUrl("catalog")}/locations${h?"?dryRun=true":""}`,{headers:{"Content-Type":"application/json",...(i==null?void 0:i.token)&&{Authorization:`Bearer ${i==null?void 0:i.token}`}},method:"POST",body:JSON.stringify({type:m,target:y,presence:E})});if(S.status!==201)throw new Error(await S.text());const{location:F,entities:T,exists:j}=await S.json();if(!F)throw new Error(`Location wasn't added: ${y}`);return{location:F,entities:T,exists:j}}async getOriginLocationByEntity(m,y){var i;const h=(i=m.metadata.annotations)==null?void 0:i[r.lb];return h?(await this.requestRequired("GET","/locations",y)).map(S=>S.data).find(S=>h===(0,r.Bt)(S)):void 0}async getLocationByEntity(m,y){var i;const h=(i=m.metadata.annotations)==null?void 0:i[r.Jl];return h?(await this.requestRequired("GET","/locations",y)).map(S=>S.data).find(S=>h===(0,r.Bt)(S)):void 0}async removeLocationById(m,y){await this.requestIgnored("DELETE",`/locations/${encodeURIComponent(m)}`,y)}async removeEntityByUid(m,y){await this.requestIgnored("DELETE",`/entities/by-uid/${encodeURIComponent(m)}`,y)}async requestIgnored(m,y,h){const E=`${await this.discoveryApi.getBaseUrl("catalog")}${y}`,i=(h==null?void 0:h.token)?{Authorization:`Bearer ${h.token}`}:{},S=await this.fetchApi.fetch(E,{method:m,headers:i});if(!S.ok)throw await t.VL.fromResponse(S)}async requestRequired(m,y,h){const E=`${await this.discoveryApi.getBaseUrl("catalog")}${y}`,i=(h==null?void 0:h.token)?{Authorization:`Bearer ${h.token}`}:{},S=await this.fetchApi.fetch(E,{method:m,headers:i});if(!S.ok)throw await t.VL.fromResponse(S);return await S.json()}async requestOptional(m,y,h){const E=`${await this.discoveryApi.getBaseUrl("catalog")}${y}`,i=(h==null?void 0:h.token)?{Authorization:`Bearer ${h.token}`}:{},S=await this.fetchApi.fetch(E,{method:m,headers:i});if(!S.ok){if(S.status===404)return;throw await t.VL.fromResponse(S)}return await S.json()}}},52890:function(J,o,e){"use strict";e.d(o,{J1:function(){return f},sk:function(){return r},Jl:function(){return A},lb:function(){return D},w$:function(){return ze},nP:function(){return xe},aS:function(){return Ne},hr:function(){return Fe},S4:function(){return B},cz:function(){return Ee},M_:function(){return ge},wX:function(){return X},wh:function(){return l},C_:function(){return Je},of:function(){return et},Me:function(){return q},TH:function(){return ut},eE:function(){return ct},Bt:function(){return Se}});const r="default",t=null,l="backstage.io/view-url",f="backstage.io/edit-url";var g=e(76635),s=e.n(g);class u{constructor($=ENTITY_DEFAULT_NAMESPACE){k(this,"namespace");this.namespace=$}async enforce($){return $.metadata.namespace?$:lodash.merge({metadata:{namespace:this.namespace}},$)}}class m{static isValidPrefixAndOrSuffix($,ee,pe,Ve){if(typeof $!="string")return!1;const ke=$.split(ee);return ke.length===1?Ve(ke[0]):ke.length===2?pe(ke[0])&&Ve(ke[1]):!1}static isJsonSafe($){try{return s().isEqual($,JSON.parse(JSON.stringify($)))}catch{return!1}}static isValidDnsSubdomain($){return typeof $=="string"&&$.length>=1&&$.length<=253&&$.split(".").every(m.isValidDnsLabel)}static isValidDnsLabel($){return typeof $=="string"&&$.length>=1&&$.length<=63&&/^[a-z0-9]+(\-[a-z0-9]+)*$/.test($)}static isValidTag($){return typeof $=="string"&&$.length>=1&&$.length<=63&&/^[a-z0-9+#]+(\-[a-z0-9+#]+)*$/.test($)}static isValidUrl($){if(typeof $!="string")return!1;try{return new URL($),!0}catch{return!1}}static isValidString($){var ee;return typeof $=="string"&&((ee=$==null?void 0:$.trim())==null?void 0:ee.length)>=1}}var y=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}}}}}'),h=e(48231),E=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"}}}`),i=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==","generation":13,"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},"generation":{"type":"integer","description":"A positive nonzero number that indicates the current generation of data for this entity; the value is incremented each time the spec changes. 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.","examples":[1],"minimum":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}}}}}}'),S=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 F=new Map,T=[y,E,i,S];function j(ie){if(!(ie==null?void 0:ie.length))throw new TypeError("Unknown error");const $=ie[0];throw new TypeError(`${$.dataPath||"<root>"} ${$.message}${$.params?` - ${Object.entries($.params).map(([ee,pe])=>`${ee}: ${pe}`).join(", ")}`:""}`)}function x(ie,$={}){var Bt;const ee=(Bt=$==null?void 0:$.disableCache)!=null?Bt:!1,pe=ee?"":JSON.stringify(ie);if(!ee){const an=F.get(pe);if(an)return an}const Ve=b(ie),ke=new h.ZP({allowUnionTypes:!0,allErrors:!0,validateSchema:!0});Ve.length&&ke.addSchema(Ve,void 0,void 0,!0);const At=ke.compile(ie);return ee||F.set(pe,At),At}function b(ie){if(typeof ie!="object")return[];const $=new Set;ie.$id&&$.add(ie.$id);const ee=new Array,pe=[ie];for(;pe.length;){const Ve=pe.pop();for(const ke of M(Ve))if(!$.has(ke)){$.add(ke);const At=T.find(Bt=>Bt.$id===ke);At&&(ee.push(At),pe.push(At))}}return ee}function*M(ie){const $=[ie];for(;$.length;){const ee=$.pop();if(typeof ee=="object"&&ee)for(const[pe,Ve]of Object.entries(ee))pe==="$ref"&&typeof Ve=="string"?yield Ve.split("#")[0]:$.push(Ve)}}function O(ie){const $=compileAjvSchema(ie||entityEnvelopeSchema);return ee=>{if($(ee)===!0)return ee;throw throwAjvError($.errors)}}function Y(ie){const $=x(ie);return ee=>{var ke;if($(ee)===!0)return ee;const Ve=(ke=$.errors)==null?void 0:ke.filter(At=>["/kind","/apiVersion"].includes(At.dataPath));if((Ve==null?void 0:Ve.length)&&Ve.every(At=>At.keyword==="enum"))return!1;throw j($.errors)}}function G(ie){const $=compileAjvSchema(ie||entitySchema);return ee=>{if($(ee)===!0)return ee;throw throwAjvError($.errors)}}class fe{static isValidApiVersion($){return m.isValidPrefixAndOrSuffix($,"/",m.isValidDnsSubdomain,ee=>ee.length>=1&&ee.length<=63&&/^[a-z0-9A-Z]+$/.test(ee))}static isValidKind($){return typeof $=="string"&&$.length>=1&&$.length<=63&&/^[a-zA-Z][a-z0-9A-Z]*$/.test($)}static isValidObjectName($){return typeof $=="string"&&$.length>=1&&$.length<=63&&/^([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$/.test($)}static isValidNamespace($){return m.isValidDnsLabel($)}static isValidLabelKey($){return m.isValidPrefixAndOrSuffix($,"/",m.isValidDnsSubdomain,fe.isValidObjectName)}static isValidLabelValue($){return $===""||fe.isValidObjectName($)}static isValidAnnotationKey($){return m.isValidPrefixAndOrSuffix($,"/",m.isValidDnsSubdomain,fe.isValidObjectName)}static isValidAnnotationValue($){return typeof $=="string"}}const Re={isValidApiVersion:fe.isValidApiVersion,isValidKind:fe.isValidKind,isValidEntityName:fe.isValidObjectName,isValidNamespace:fe.isValidNamespace,isValidLabelKey:fe.isValidLabelKey,isValidLabelValue:fe.isValidLabelValue,isValidAnnotationKey:fe.isValidAnnotationKey,isValidAnnotationValue:fe.isValidAnnotationValue,isValidTag:m.isValidTag};function we(ie={}){return{...Re,...ie}}class me{constructor($=makeValidator()){k(this,"validators");this.validators=$}async enforce($){var At,Bt,an,on,Ln,On,Fn;function ee(Et,Zt,sn){if(Zt==null)throw new Error(`${Et} must have a value`);let Bn;try{Bn=sn(Zt)}catch(Kt){throw new Error(`${Et} could not be validated, ${Kt}`)}if(!Bn){let Kt;switch(sn.name){case"isValidLabelValue":case"isValidObjectName":Kt="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":Kt="a valid prefix and/or suffix";break;case"isValidNamespace":case"isValidDnsLabel":Kt="a string that is sequences of [a-z0-9] separated by [-], at most 63 characters in total";break;case"isValidTag":Kt="a string that is sequences of [a-z0-9+#] separated by [-], at most 63 characters in total";break;case"isValidAnnotationValue":Kt="a string";break;case"isValidKind":Kt="a string that is a sequence of [a-zA-Z][a-z0-9A-Z], at most 63 characters in total";break;case"isValidUrl":Kt="a string that is a valid url";break;case"isValidString":Kt="a non empty string";break;default:Kt=void 0;break}const Jn=Kt?` expected ${Kt} but found "${Zt}".`:"";throw new Error(`"${Et}" is not valid;${Jn} To learn more about catalog file format, visit: https://github.com/backstage/backstage/blob/master/docs/architecture-decisions/adr002-default-catalog-file-format.md`)}}function pe(Et,Zt,sn){return Zt===void 0||ee(Et,Zt,sn)}ee("apiVersion",$.apiVersion,this.validators.isValidApiVersion),ee("kind",$.kind,this.validators.isValidKind),ee("metadata.name",$.metadata.name,this.validators.isValidEntityName),pe("metadata.namespace",$.metadata.namespace,this.validators.isValidNamespace);for(const[Et,Zt]of Object.entries((At=$.metadata.labels)!=null?At:[]))ee(`labels.${Et}`,Et,this.validators.isValidLabelKey),ee(`labels.${Et}`,Zt,this.validators.isValidLabelValue);for(const[Et,Zt]of Object.entries((Bt=$.metadata.annotations)!=null?Bt:[]))ee(`annotations.${Et}`,Et,this.validators.isValidAnnotationKey),ee(`annotations.${Et}`,Zt,this.validators.isValidAnnotationValue);const Ve=(an=$.metadata.tags)!=null?an:[];for(let Et=0;Et<Ve.length;++Et)ee(`tags.${Et}`,Ve[Et],this.validators.isValidTag);const ke=(on=$.metadata.links)!=null?on:[];for(let Et=0;Et<ke.length;++Et)ee(`links.${Et}.url`,(Ln=ke[Et])==null?void 0:Ln.url,CommonValidatorFunctions.isValidUrl),pe(`links.${Et}.title`,(On=ke[Et])==null?void 0:On.title,CommonValidatorFunctions.isValidString),pe(`links.${Et}.icon`,(Fn=ke[Et])==null?void 0:Fn.icon,KubernetesValidatorFunctions.isValidObjectName);return $}}class je{constructor(){k(this,"validate")}async enforce($){if(!this.validate){const Ve=new Ajv({allowUnionTypes:!0});this.validate=Ve.addSchema([commonSchema,entityMetaSchema],void 0,void 0,!0).compile(entitySchema)}if(this.validate($)===!0)return $;const[pe]=this.validate.errors||[];throw pe?new Error(`Malformed envelope, ${pe.dataPath||"<root>"} ${pe.message}`):new Error("Malformed envelope, Unknown error")}}function Oe(ie){var ee,pe;const $=/^([^:/]+:)?([^:/]+\/)?([^:/]+)$/.exec(ie.trim());if(!$)throw new TypeError(`Entity reference "${ie}" was not on the form [<kind>:][<namespace>/]<name>`);return{kind:(ee=$[1])==null?void 0:ee.slice(0,-1),namespace:(pe=$[2])==null?void 0:pe.slice(0,-1),name:$[3]}}function Je(ie){return{kind:ie.kind,namespace:ie.metadata.namespace||r,name:ie.metadata.name}}function rt(ie,$={}){const{kind:ee,namespace:pe,name:Ve}=et(ie,{defaultNamespace:ENTITY_DEFAULT_NAMESPACE,...$});if(!ee)throw new Error(`Entity reference ${pe}/${Ve} did not contain a kind`);return{kind:ee,namespace:pe,name:Ve}}function et(ie,$={}){var ke,At;if(!ie)throw new Error("Entity reference must not be empty");if(typeof ie=="string"){const Bt=Oe(ie);return{kind:(ke=Bt.kind)!=null?ke:$.defaultKind,namespace:(At=Bt.namespace)!=null?At:$.defaultNamespace,name:Bt.name}}const{kind:ee,namespace:pe,name:Ve}=ie;if(ee==="")throw new Error("Entity reference kinds must not be empty");if(pe==="")throw new Error("Entity reference namespaces must not be empty");if(!Ve)throw new Error("Entity references must contain a name");return{kind:ee!=null?ee:$.defaultKind,namespace:pe!=null?pe:$.defaultNamespace,name:Ve}}function ut(ie){let $,ee,pe;return"metadata"in ie?($=ie.kind,ee=ie.metadata.namespace,pe=ie.metadata.name):($=ie.kind,ee=ie.namespace,pe=ie.name),($==null?void 0:$.includes(":"))||($==null?void 0:$.includes("/"))||(ee==null?void 0:ee.includes(":"))||(ee==null?void 0:ee.includes("/"))||pe.includes(":")||pe.includes("/")?{kind:$,namespace:ee,name:pe}:`${$?`${$}:`:""}${ee?`${ee}/`:""}${pe}`}function ct(ie){var Ve,ke;let $,ee,pe;return"metadata"in ie?($=ie.kind,ee=(Ve=ie.metadata.namespace)!=null?Ve:r,pe=ie.metadata.name):($=ie.kind,ee=(ke=ie.namespace)!=null?ke:r,pe=ie.name),`${$.toLocaleLowerCase("en-US")}:${ee.toLocaleLowerCase("en-US")}/${pe.toLocaleLowerCase("en-US")}`}function at(ie,$,ee){const pe=ie.kind,Ve=ie.metadata.namespace||ENTITY_DEFAULT_NAMESPACE,ke=ie.metadata.name;let At,Bt,an;if(typeof $=="string"){const on=Oe($);At=on.kind||(ee==null?void 0:ee.defaultKind),Bt=on.namespace||(ee==null?void 0:ee.defaultNamespace)||ENTITY_DEFAULT_NAMESPACE,an=on.name}else At=$.kind||(ee==null?void 0:ee.defaultKind),Bt=$.namespace||(ee==null?void 0:ee.defaultNamespace)||ENTITY_DEFAULT_NAMESPACE,an=$.name;if(!At||!Bt)throw new Error("Entity reference or context did not contain kind and namespace");return pe.toLocaleLowerCase("en-US")===At.toLocaleLowerCase("en-US")&&Ve.toLocaleLowerCase("en-US")===Bt.toLocaleLowerCase("en-US")&&ke.toLocaleLowerCase("en-US")===an.toLocaleLowerCase("en-US")}var Rt=e(48834).Buffer;function Pt(){return uuidv4()}function It(){return Rt.from(uuidv4(),"utf8").toString("base64").replace(/[^\w]/g,"")}function St(ie,$){const ee=lodash.cloneDeep(ie),pe=lodash.cloneDeep($);return ee.metadata.labels||(ee.metadata.labels={}),pe.metadata.labels||(pe.metadata.labels={}),ee.metadata.annotations||(ee.metadata.annotations={}),pe.metadata.annotations||(pe.metadata.annotations={}),ee.metadata.tags||(ee.metadata.tags=[]),pe.metadata.tags||(pe.metadata.tags=[]),delete ee.metadata.uid,delete ee.metadata.etag,delete ee.metadata.generation,delete pe.metadata.uid,delete pe.metadata.etag,delete pe.metadata.generation,delete ee.relations,delete ee.status,delete pe.relations,delete pe.status,!lodash.isEqual(ee,pe)}function yt(ie,$){const{uid:ee,etag:pe,generation:Ve}=ie.metadata;if(!ee||!pe||!Ve)throw new Error("Previous entity must have uid, etag and generation");const ke=lodash.cloneDeep($),At=St(ie,ke),Bt=!lodash.isEqual(ie.spec,ke.spec);return ke.metadata.uid=ee,ke.metadata.etag=At?It():pe,ke.metadata.generation=Bt?Ve+1:Ve,ke}class Nt{constructor($){this.policies=$}async enforce($){let ee=$;for(const pe of this.policies){const Ve=await pe.enforce(ee);if(!Ve)throw new Error(`Policy ${pe.constructor.name} did not return a result`);ee=Ve}return ee}}class Ut{constructor($){this.policies=$}async enforce($){for(const ee of this.policies){const pe=await ee.enforce($);if(pe)return pe}throw new Error("The entity did not match any known policy")}}const Ot={allOf(ie){return new Nt(ie)},oneOf(ie){return new Ut(ie)}};var bt=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 gt(ie){const $=Y(ie);return{async check(ee){return $(ee)===ee}}}const vt=gt(bt);var $t=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 De=gt($t);var it=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"DomainV1alpha1","description":"A Domain groups a collection of systems that share terminology, domain models, business purpose, or documentation, i.e. form a bounded context.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Domain","metadata":{"name":"artists","description":"Everything about artists"},"spec":{"owner":"artist-relations-team"}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1alpha1","backstage.io/v1beta1"]},"kind":{"enum":["Domain"]},"spec":{"type":"object","required":["owner"],"properties":{"owner":{"type":"string","description":"An entity reference to the owner of the component.","examples":["artist-relations-team","user:john.johnson"],"minLength":1}}}}}]}');const lt=gt(it);var le=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 Q=gt(le);var P=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 C=gt(P),B="ownedBy",z="ownerOf",_="consumesApi",ne="apiConsumedBy",ge="providesApi",ye="apiProvidedBy",xe="dependsOn",ze="dependencyOf",Me="parentOf",Te="childOf",Fe="memberOf",ue="hasMember",Ee="partOf",Ne="hasPart";var Ue=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 Be=gt(Ue);var st=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 be=gt(st);var Qe=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"TemplateV1beta2","description":"A Template describes a scaffolding task for use with the Scaffolder. It describes the required parameters as well as a series of steps that will be taken to execute the scaffolding task.","examples":[{"apiVersion":"backstage.io/v1beta2","kind":"Template","metadata":{"name":"react-ssr-template","title":"React SSR Template","description":"Next.js application skeleton for creating isomorphic web applications.","tags":["recommended","react"]},"spec":{"owner":"artist-relations-team","type":"website","parameters":{"required":["name","description"],"properties":{"name":{"title":"Name","type":"string","description":"Unique name of the component"},"description":{"title":"Description","type":"string","description":"Description of the component"}}},"steps":[{"id":"fetch","name":"Fetch","action":"fetch:plain","parameters":{"url":"./template"}},{"id":"publish","name":"Publish to GitHub","action":"publish:github","parameters":{"repoUrl":"{{ parameters.repoUrl }}"},"if":"{{ parameters.repoUrl }}"}],"output":{"catalogInfoUrl":"{{ steps.publish.output.catalogInfoUrl }}"}}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1beta2"]},"kind":{"enum":["Template"]},"spec":{"type":"object","required":["type","steps"],"properties":{"type":{"type":"string","description":"The type of component created by the template. The software catalog accepts any type value, but an organization should take great care to establish a proper taxonomy for these. Tools including Backstage itself may read this field and behave differently depending on its value. For example, a website type component may present tooling in the Backstage interface that is specific to just websites.","examples":["service","website","library"],"minLength":1},"parameters":{"oneOf":[{"type":"object","description":"The JSONSchema describing the inputs for the template."},{"type":"array","description":"A list of separate forms to collect parameters.","items":{"type":"object","description":"The JSONSchema describing the inputs for the template."}}]},"steps":{"type":"array","description":"A list of steps to execute.","items":{"type":"object","description":"A description of the step to execute.","required":["action"],"properties":{"id":{"type":"string","description":"The ID of the step, which can be used to refer to its outputs."},"name":{"type":"string","description":"The name of the step, which will be displayed in the UI during the scaffolding process."},"action":{"type":"string","description":"The name of the action to execute."},"input":{"type":"object","description":"A templated object describing the inputs to the action."},"if":{"type":["string","boolean"],"description":"A templated condition that skips the step when evaluated to false. If the condition is true or not defined, the step is executed. The condition is true, if the input is not `false`, `undefined`, `null`, `\\"\\"`, `0`, or `[]`."}}}},"output":{"type":"object","description":"A templated object describing the outputs of the scaffolding task.","properties":{"links":{"type":"array","description":"A list of external hyperlinks, typically pointing to resources created or updated by the template","items":{"type":"object","required":[],"properties":{"url":{"type":"string","description":"A url in a standard uri format.","examples":["https://github.com/my-org/my-new-repo"],"minLength":1},"entityRef":{"type":"string","description":"An entity reference to an entity in the catalog.","examples":["Component:default/my-app"],"minLength":1},"title":{"type":"string","description":"A user friendly display name for the link.","examples":["View new repo"],"minLength":1},"icon":{"type":"string","description":"A key representing a visual icon to be displayed in the UI.","examples":["dashboard"],"minLength":1}}}}},"additionalProperties":{"type":"string"}},"owner":{"type":"string","description":"The user (or group) owner of the template","minLength":1}}}}}]}');const Xe=gt(Qe);var dt=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 K=gt(dt),A="backstage.io/managed-by-location",D="backstage.io/managed-by-origin-location",X="backstage.io/source-location";function q(ie){if(typeof ie!="string")throw new TypeError(`Unable to parse location reference '${ie}', unexpected argument ${typeof ie}`);const $=ie.indexOf(":");if($<0)throw new TypeError(`Unable to parse location reference '${ie}', expected '<type>:<target>', e.g. 'url:https://host/path'`);const ee=ie.substr(0,$).trim(),pe=ie.substr($+1).trim();if(!ee||!pe)throw new TypeError(`Unable to parse location reference '${ie}', expected '<type>:<target>', e.g. 'url:https://host/path'`);if(ee==="http"||ee==="https")throw new TypeError(`Invalid location reference '${ie}', please prefix it with 'url:', e.g. 'url:${ie}'`);return{type:ee,target:pe}}function Se(ie){const{type:$,target:ee}=ie;if($){if(!ee)throw new TypeError("Unable to stringify location reference, empty target")}else throw new TypeError("Unable to stringify location reference, empty type");return`${$}:${ee}`}function he(ie){var ee,pe,Ve,ke,At;const $=(At=(pe=(ee=ie.metadata)==null?void 0:ee.annotations)==null?void 0:pe[SOURCE_LOCATION_ANNOTATION])!=null?At:(ke=(Ve=ie.metadata)==null?void 0:Ve.annotations)==null?void 0:ke[LOCATION_ANNOTATION];if(!$)throw new Error(`Entity '${stringifyEntityRef(ie)}' is missing location`);return q($)}var Le=e(9699);const tt=Le.Ry({type:Le.Z_().required(),target:Le.Z_().required(),presence:Le.nK().oneOf(["required","optional"])}).noUnknown().required(),Tt=Le.Ry({id:Le.Z_().required(),type:Le.Z_().required(),target:Le.Z_().required(),presence:Le.nK().oneOf(["required","optional"])}).noUnknown().required(),gn=Le.Ry({location:tt}).noUnknown().required()},23235:function(J,o,e){"use strict";e.d(o,{C:function(){return t}});var r=e(98005);class t{constructor(){k(this,"subject",new r.J)}post(f){this.subject.next(f)}alert$(){return this.subject}}},47150:function(J,o,e){"use strict";e.d(o,{g:function(){return r}});class r{captureEvent(l){}}},58652:function(J,o,e){"use strict";e.d(o,{C:function(){return l}});var r=e(98005);const t="theme";class l{constructor(g){k(this,"activeThemeId");k(this,"subject",new r.X(void 0));this.themes=g}static createWithStorage(g){var m;const s=new l(g);if(!window.localStorage)return s;const u=(m=window.localStorage.getItem(t))!=null?m:void 0;return s.setActiveThemeId(u),s.activeThemeId$().subscribe(y=>{y?window.localStorage.setItem(t,y):window.localStorage.removeItem(t)}),window.addEventListener("storage",y=>{var h;if(y.key===t){const E=(h=localStorage.getItem(t))!=null?h:void 0;s.setActiveThemeId(E)}}),s}getInstalledThemes(){return this.themes.slice()}activeThemeId$(){return this.subject}getActiveThemeId(){return this.activeThemeId}setActiveThemeId(g){this.activeThemeId=g,this.subject.next(g)}}},14721:function(J,o,e){"use strict";e.d(o,{m:function(){return y}});var r=e(9850),t=e.n(r),l=e(12782),f=e.n(l);const g=/^[a-z][a-z0-9]*(?:[-_][a-z][a-z0-9]*)*$/i;function s(h){return typeof h=="object"&&h!==null&&!Array.isArray(h)}function u(h){if(h===null)return"null";if(Array.isArray(h))return"array";const E=typeof h;return E==="number"&&isNaN(h)?"nan":E==="string"&&h===""?"empty-string":E}const m={type(h,E,i,S){return`Invalid type in config for key '${h}' in '${E}', got ${i}, wanted ${S}`},missing(h){return`Missing required config value at '${h}'`},convert(h,E,i){return`Unable to convert config value for key '${h}' in '${E}' to a ${i}`}};class y{constructor(E,i="mock-config",S,F=""){k(this,"filteredKeys");k(this,"notifiedFilteredKeys",new Set);this.data=E,this.context=i,this.fallback=S,this.prefix=F}static fromConfigs(E){return E.length===0?new y(void 0):E.reduce((i,{data:S,context:F,filteredKeys:T,deprecatedKeys:j})=>{const x=new y(S,F,i);if(x.filteredKeys=T,j)for(const{key:b,description:M}of j)console.warn(`The configuration key '${b}' of ${F} is deprecated and may be removed soon. ${M||""}`);return x},void 0)}has(E){var S,F;return this.readValue(E)!==void 0?!0:(F=(S=this.fallback)==null?void 0:S.has(E))!=null?F:!1}keys(){var S,F;const E=this.data?Object.keys(this.data):[],i=(F=(S=this.fallback)==null?void 0:S.keys())!=null?F:[];return[...new Set([...E,...i])]}get(E){const i=this.getOptional(E);if(i===void 0)throw new Error(m.missing(this.fullKey(E!=null?E:"")));return i}getOptional(E){var F;const i=t()(this.readValue(E)),S=(F=this.fallback)==null?void 0:F.getOptional(E);return i===void 0?S:S===void 0?i:f()({},{value:S},{value:i},(T,j)=>!s(j)||!s(T)?j:void 0).value}getConfig(E){const i=this.getOptionalConfig(E);if(i===void 0)throw new Error(m.missing(this.fullKey(E)));return i}getOptionalConfig(E){var F;const i=this.readValue(E),S=(F=this.fallback)==null?void 0:F.getOptionalConfig(E);if(s(i))return this.copy(i,E,S);if(i!==void 0)throw new TypeError(m.type(this.fullKey(E),this.context,u(i),"object"));return S}getConfigArray(E){const i=this.getOptionalConfigArray(E);if(i===void 0)throw new Error(m.missing(this.fullKey(E)));return i}getOptionalConfigArray(E){const i=this.readConfigValue(E,S=>{if(!Array.isArray(S))return{expected:"object-array"};for(const[F,T]of S.entries())if(!s(T))return{expected:"object-array",value:T,key:`${E}[${F}]`};return!0});if(!!i)return i.map((S,F)=>this.copy(S,`${E}[${F}]`))}getNumber(E){const i=this.getOptionalNumber(E);if(i===void 0)throw new Error(m.missing(this.fullKey(E)));return i}getOptionalNumber(E){const i=this.readConfigValue(E,F=>typeof F=="number"||typeof F=="string"||{expected:"number"});if(typeof i=="number"||i===void 0)return i;const S=Number(i);if(!Number.isFinite(S))throw new Error(m.convert(this.fullKey(E),this.context,"number"));return S}getBoolean(E){const i=this.getOptionalBoolean(E);if(i===void 0)throw new Error(m.missing(this.fullKey(E)));return i}getOptionalBoolean(E){return this.readConfigValue(E,i=>typeof i=="boolean"||{expected:"boolean"})}getString(E){const i=this.getOptionalString(E);if(i===void 0)throw new Error(m.missing(this.fullKey(E)));return i}getOptionalString(E){return this.readConfigValue(E,i=>typeof i=="string"&&i!==""||{expected:"string"})}getStringArray(E){const i=this.getOptionalStringArray(E);if(i===void 0)throw new Error(m.missing(this.fullKey(E)));return i}getOptionalStringArray(E){return this.readConfigValue(E,i=>{if(!Array.isArray(i))return{expected:"string-array"};for(const[S,F]of i.entries())if(typeof F!="string"||F==="")return{expected:"string-array",value:F,key:`${E}[${S}]`};return!0})}fullKey(E){return`${this.prefix}${this.prefix?".":""}${E}`}copy(E,i,S){const F=new y(E,this.context,S,this.fullKey(i));return F.filteredKeys=this.filteredKeys,F}readConfigValue(E,i){var T;const S=this.readValue(E);if(S===void 0)return(T=this.fallback)==null?void 0:T.readConfigValue(E,i);const F=i(S);if(F!==!0){const{key:j=E,value:x=S,expected:b}=F;throw new TypeError(m.type(this.fullKey(j),this.context,u(x),b))}return S}readValue(E){const i=E?E.split("."):[];for(const F of i)if(!g.test(F))throw new TypeError(`Invalid config key '${E}'`);if(this.data===void 0)return;let S=this.data;for(const[F,T]of i.entries())if(s(S))S=S[T];else if(S!==void 0){const j=this.fullKey(i.slice(0,F).join("."));throw new TypeError(m.type(j,this.context,u(S),"object"))}return S}}},4333:function(J,o,e){"use strict";e.d(o,{p:function(){return t}});const r="Invalid discovery URL pattern,";class t{static compile(f){const g=f.split(/\{\{\s*pluginId\s*\}\}/),s=g.join("pluginId");let u;try{u=new URL(s)}catch{throw new Error(`${r} URL '${s}' is invalid`)}if(u.hash)throw new Error(`${r} URL must not have a hash`);if(u.search)throw new Error(`${r} URL must not have a query`);if(s.endsWith("/"))throw new Error(`${r} URL must not end with a slash`);return new t(g)}constructor(f){this.parts=f}async getBaseUrl(f){return this.parts.join(f)}}},89536:function(J,o,e){"use strict";e.d(o,{KN:function(){return r},gr:function(){return l},Jv:function(){return f}});class r{constructor(s,u){this.alertApi=s,this.errorApi=u}post(s,u){return(u==null?void 0:u.hidden)||this.alertApi.post({message:s.message,severity:"error"}),this.errorApi.post(s,u)}error$(){return this.errorApi.error$()}}var t=e(98005);class l{constructor(){k(this,"subject",new t.J)}post(s,u){this.subject.next({error:s,context:u})}error$(){return this.subject}}class f{static forward(s,u){window.addEventListener("unhandledrejection",m=>{s.post(m.reason,u)})}}},14884:function(J,o,e){"use strict";e.d(o,{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(){k(this,"registeredFeatureFlags",[]);k(this,"flags")}registerFlag(g){t(g.name),this.registeredFeatureFlags.push(g)}getRegisteredFlags(){return this.registeredFeatureFlags.slice()}isActive(g){return this.flags||(this.flags=this.load()),this.flags.get(g)===r.FeatureFlagState.Active}save(g){this.flags||(this.flags=this.load()),g.merge||this.flags.clear();for(const[u,m]of Object.entries(g.states))this.flags.set(u,m);const s=Array.from(this.flags.entries()).filter(([,u])=>u===r.FeatureFlagState.Active);window.localStorage.setItem("featureFlags",JSON.stringify(Object.fromEntries(s)))}load(){try{const g=window.localStorage.getItem("featureFlags");if(!g)return new Map;const s=JSON.parse(g);if(typeof s!="object"||s===null||Array.isArray(s))return new Map;const u=Object.entries(s).filter(([m,y])=>(t(m),y===r.FeatureFlagState.Active));return new Map(u)}catch{return new Map}}}},50160:function(J,o,e){"use strict";e.d(o,{I:function(){return g},j:function(){return r}});function r(s){var y;let u=s.baseImplementation||e.g.fetch;const m=[(y=s.middleware)!=null?y:[]].flat().reverse();for(const h of m)u=h.apply(u);return{fetch:u}}class t{static create(u){var E,i;const m=[];u.urlPrefixAllowlist?m.push(...u.urlPrefixAllowlist):u.config&&m.push(u.config.getString("backend.baseUrl"));const y=((E=u.header)==null?void 0:E.name)||"authorization",h=((i=u.header)==null?void 0:i.value)||(S=>`Bearer ${S}`);return new t(u.identityApi,m.map(S=>S.replace(/\/$/,"")),y,h)}constructor(u,m,y,h){this.identityApi=u,this.urlPrefixAllowlist=m,this.headerName=y,this.headerValue=h}apply(u){return async(m,y)=>{const h=new Request(m,y),{token:E}=await this.identityApi.getCredentials();return h.headers.get(this.headerName)||!this.urlPrefixAllowlist.some(i=>h.url===i||h.url.startsWith(`${i}/`))||typeof E!="string"||!E?u(m,y):(h.headers.set(this.headerName,this.headerValue(E)),u(h))}}}function l(s,u){return!u||u==="/"?s:`${s.replace(/\/$/,"")}/${u.replace(/^\//,"")}`}class f{constructor(u){this.discoveryApi=u}apply(u){return async(m,y)=>{const h=new Request(m,y),E="plugin://";if(!h.url.startsWith(E))return u(m,y);const{hostname:i,pathname:S,search:F,hash:T,username:j,password:x}=new URL(`http://${h.url.substring(E.length)}`);let b=await this.discoveryApi.getBaseUrl(i);if(j||x){const O=new URL(b),Y=`${j}${x?`:${x}`:""}@`;b=`${O.protocol}//${Y}${O.host}${O.pathname}`}const M=`${l(b,S)}${F}${T}`;return u(M,h)}}}class g{static resolvePluginProtocol(u){return new f(u.discoveryApi)}static injectIdentityAuth(u){return t.create(u)}constructor(){}}},11358:function(J,o,e){"use strict";e.d(o,{Y:function(){return g}});var r=e(98005);function t(s,u){for(const m of u)if(!s.has(m))return!1;return!0}function l(s,...u){const m=new Set(s);for(const y of u)for(const h of y)m.add(h);return m}class f{constructor(){k(this,"requests",[]);k(this,"subject",new r.X(this.getCurrentPending()))}request(u){return new Promise((m,y)=>{this.requests.push({scopes:u,resolve:m,reject:y}),this.subject.next(this.getCurrentPending())})}resolve(u,m){this.requests=this.requests.filter(y=>t(u,y.scopes)?(y.resolve(m),!1):!0),this.subject.next(this.getCurrentPending())}reject(u){this.requests.forEach(m=>m.reject(u)),this.requests=[],this.subject.next(this.getCurrentPending())}pending(){return this.subject}getCurrentPending(){const u=this.requests.length===0?void 0:this.requests.slice(1).reduce((m,y)=>l(m,y.scopes),this.requests[0].scopes);return{scopes:u,resolve:m=>{u&&this.resolve(u,m)},reject:m=>{u&&this.reject(m)}}}}class g{constructor(){k(this,"subject",new r.X([]));k(this,"currentRequests",[]);k(this,"handlerCount",0)}createAuthRequester(u){u.provider.id||console.warn("DEPRECATION WARNING: Not passing a provider id to createAuthRequester is deprecated, it will be required in the future");const m=new f,y=this.handlerCount;return this.handlerCount++,m.pending().subscribe({next:h=>{const E=this.currentRequests.slice(),i=this.makeAuthRequest(h,u);i?E[y]=i:delete E[y],this.currentRequests=E,this.subject.next(E.filter(Boolean))}}),h=>m.request(h)}makeAuthRequest(u,m){const{scopes:y}=u;if(!!y)return{provider:m.provider,trigger:async()=>{const h=await m.onAuthRequest(y);u.resolve(h)},reject:()=>{const h=new Error("Login failed, rejected by user");h.name="RejectedError",u.reject(h)}}}authRequest$(){return this.subject}}},56054:function(J,o,e){"use strict";e.d(o,{C:function(){return f}});var r=e(82394),t=e.n(r);const l=new Map;class f{constructor(s,u){k(this,"subscribers",new Set);k(this,"observable",new(t())(s=>(this.subscribers.add(s),()=>{this.subscribers.delete(s)})));this.namespace=s,this.errorApi=u}static create(s){var u;return new f((u=s.namespace)!=null?u:"",s.errorApi)}get(s){return this.snapshot(s).value}snapshot(s){let u,m="absent";try{const y=localStorage.getItem(this.getKeyName(s));y&&(u=JSON.parse(y,(h,E)=>(typeof E=="object"&&E!==null&&Object.freeze(E),E)),m="present")}catch{this.errorApi.post(new Error(`Error when parsing JSON config from storage for: ${s}`))}return{key:s,value:u,newValue:u,presence:m}}forBucket(s){const u=`${this.namespace}/${s}`;return l.has(u)||l.set(u,new f(u,this.errorApi)),l.get(u)}async set(s,u){localStorage.setItem(this.getKeyName(s),JSON.stringify(u)),this.notifyChanges(s)}async remove(s){localStorage.removeItem(this.getKeyName(s)),this.notifyChanges(s)}observe$(s){return this.observable.filter(({key:u})=>u===s)}getKeyName(s){return`${this.namespace}/${encodeURIComponent(s)}`}notifyChanges(s){const u=this.snapshot(s);for(const m of this.subscribers)m.next(u)}}},59589:function(J,o,e){"use strict";e.d(o,{u:function(){return l}});var r=e(91205);const t={id:"atlassian",title:"Atlassian",icon:()=>null};class l{static create(g){const{discoveryApi:s,environment:u="development",provider:m=t,oauthRequestApi:y}=g;return r.L.create({discoveryApi:s,oauthRequestApi:y,provider:m,environment:u})}}},92293:function(J,o,e){"use strict";e.d(o,{Z:function(){return l}});var r=e(91205);const t={id:"auth0",title:"Auth0",icon:()=>null};class l{static create(g){const{discoveryApi:s,environment:u="development",provider:m=t,oauthRequestApi:y,defaultScopes:h=["openid","email","profile"]}=g;return r.L.create({discoveryApi:s,oauthRequestApi:y,provider:m,environment:u,defaultScopes:h})}}},6098:function(J,o,e){"use strict";e.d(o,{Z:function(){return l}});var r=e(91205);const t={id:"bitbucket",title:"Bitbucket",icon:()=>null};class l{static create(g){const{discoveryApi:s,environment:u="development",provider:m=t,oauthRequestApi:y,defaultScopes:h=["team"]}=g;return r.L.create({discoveryApi:s,oauthRequestApi:y,provider:m,environment:u,defaultScopes:h})}}},44431:function(J,o,e){"use strict";e.d(o,{x:function(){return l.Z}});var r=e(19347),t=e.n(r);e.o(r,"AlertApiForwarder")&&e.d(o,{AlertApiForwarder:function(){return r.AlertApiForwarder}}),e.o(r,"AppThemeSelector")&&e.d(o,{AppThemeSelector:function(){return r.AppThemeSelector}}),e.o(r,"AtlassianAuth")&&e.d(o,{AtlassianAuth:function(){return r.AtlassianAuth}}),e.o(r,"ConfigReader")&&e.d(o,{ConfigReader:function(){return r.ConfigReader}}),e.o(r,"ErrorAlerter")&&e.d(o,{ErrorAlerter:function(){return r.ErrorAlerter}}),e.o(r,"ErrorApiForwarder")&&e.d(o,{ErrorApiForwarder:function(){return r.ErrorApiForwarder}}),e.o(r,"FetchMiddlewares")&&e.d(o,{FetchMiddlewares:function(){return r.FetchMiddlewares}}),e.o(r,"FlatRoutes")&&e.d(o,{FlatRoutes:function(){return r.FlatRoutes}}),e.o(r,"LocalStorageFeatureFlags")&&e.d(o,{LocalStorageFeatureFlags:function(){return r.LocalStorageFeatureFlags}}),e.o(r,"NoOpAnalyticsApi")&&e.d(o,{NoOpAnalyticsApi:function(){return r.NoOpAnalyticsApi}}),e.o(r,"OAuthRequestManager")&&e.d(o,{OAuthRequestManager:function(){return r.OAuthRequestManager}}),e.o(r,"UnhandledErrorForwarder")&&e.d(o,{UnhandledErrorForwarder:function(){return r.UnhandledErrorForwarder}}),e.o(r,"UrlPatternDiscovery")&&e.d(o,{UrlPatternDiscovery:function(){return r.UrlPatternDiscovery}}),e.o(r,"WebStorage")&&e.d(o,{WebStorage:function(){return r.WebStorage}}),e.o(r,"createFetchApi")&&e.d(o,{createFetchApi:function(){return r.createFetchApi}}),e.o(r,"createSpecializedApp")&&e.d(o,{createSpecializedApp:function(){return r.createSpecializedApp}});var l=e(6098)},19347:function(){},55551:function(J,o,e){"use strict";e.d(o,{T:function(){return m}});var r=e(96176),t=e(54842),l=e(91405);class f{constructor(h){k(this,"stateTracker",new l.l);k(this,"sessionCanRefresh");k(this,"staticSessionManager");k(this,"refreshingSessionManager");this.sessionCanRefresh=h.sessionCanRefresh,this.staticSessionManager=h.staticSessionManager,this.refreshingSessionManager=h.refreshingSessionManager}async getSession(h){const E=await this.staticSessionManager.getSession({...h,optional:!0});if(E)return this.stateTracker.setIsSignedIn(!0),E;const i=await this.refreshingSessionManager.getSession(h);if(!i){this.stateTracker.setIsSignedIn(!1);return}return this.sessionCanRefresh(i)?(this.stateTracker.setIsSignedIn(!0),i):(this.staticSessionManager.setSession(i),this.stateTracker.setIsSignedIn(!0),i)}async removeSession(){await Promise.all([this.refreshingSessionManager.removeSession(),this.staticSessionManager.removeSession()]),this.stateTracker.setIsSignedIn(!1)}sessionState$(){return this.stateTracker.sessionState$()}}var g=e(30195);const s=g.z.object({providerInfo:g.z.object({accessToken:g.z.string(),scopes:g.z.set(g.z.string()),expiresAt:g.z.date().optional()}),profile:g.z.object({email:g.z.string().optional(),displayName:g.z.string().optional(),picture:g.z.string().optional()}),backstageIdentity:g.z.object({id:g.z.string(),token:g.z.string(),identity:g.z.object({type:g.z.literal("user"),userEntityRef:g.z.string(),ownershipEntityRefs:g.z.array(g.z.string())})})}),u={id:"github",title:"GitHub",icon:()=>null};class m{static create(h){const{discoveryApi:E,environment:i="development",provider:S=u,oauthRequestApi:F,defaultScopes:T=["read:user"]}=h,j=new r.y({discoveryApi:E,environment:i,provider:S,oauthRequestApi:F,sessionTransform(O){return{...O,providerInfo:{accessToken:O.providerInfo.accessToken,scopes:m.normalizeScope(O.providerInfo.scope),expiresAt:O.providerInfo.expiresInSeconds?new Date(Date.now()+O.providerInfo.expiresInSeconds*1e3):void 0}}}}),x=new t.q2({connector:j,defaultScopes:new Set(T),sessionScopes:O=>O.providerInfo.scopes,sessionShouldRefresh:O=>{const{expiresAt:Y}=O.providerInfo;return Y?(Y.getTime()-Date.now())/1e3<60*5:!1}}),b=new t.Hc({manager:new t.k1({connector:j,defaultScopes:new Set(T),sessionScopes:O=>O.providerInfo.scopes}),storageKey:`${S.id}Session`,schema:s,sessionScopes:O=>O.providerInfo.scopes}),M=new f({refreshingSessionManager:x,staticSessionManager:b,sessionCanRefresh:O=>O.providerInfo.expiresAt!==void 0});return new m(M)}constructor(h){this.sessionManager=h}async signIn(){await this.getAccessToken()}async signOut(){await this.sessionManager.removeSession()}sessionState$(){return this.sessionManager.sessionState$()}async getAccessToken(h,E){var S;const i=await this.sessionManager.getSession({...E,scopes:m.normalizeScope(h)});return(S=i==null?void 0:i.providerInfo.accessToken)!=null?S:""}async getBackstageIdentity(h={}){const E=await this.sessionManager.getSession(h);return E==null?void 0:E.backstageIdentity}async getProfile(h={}){const E=await this.sessionManager.getSession(h);return E==null?void 0:E.profile}static normalizeScope(h){if(!h)return new Set;const E=Array.isArray(h)?h:h.split(/[\s|,]/).filter(Boolean);return new Set(E)}}},2922:function(J,o,e){"use strict";e.d(o,{a:function(){return l}});var r=e(91205);const t={id:"gitlab",title:"GitLab",icon:()=>null};class l{static create(g){const{discoveryApi:s,environment:u="development",provider:m=t,oauthRequestApi:y,defaultScopes:h=["read_user"]}=g;return r.L.create({discoveryApi:s,oauthRequestApi:y,provider:m,environment:u,defaultScopes:h})}}},59938:function(J,o,e){"use strict";e.d(o,{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(s){const{discoveryApi:u,oauthRequestApi:m,environment:y="development",provider:h=t,defaultScopes:E=["openid",`${l}userinfo.email`,`${l}userinfo.profile`]}=s;return r.L.create({discoveryApi:u,oauthRequestApi:m,provider:h,environment:y,defaultScopes:E,scopeTransform(i){return i.map(S=>S==="openid"?S:S==="profile"||S==="email"?`${l}userinfo.${S}`:S.startsWith(l)?S:`${l}${S}`)}})}}},91668:function(J,o,e){"use strict";e.d(o,{Td:function(){return r.T},aq:function(){return t.a},eE:function(){return l.e},OAuth2:function(){return f.L},OktaAuth:function(){return g.s},SamlAuth:function(){return s.n},Auth0Auth:function(){return u.Z},MicrosoftAuth:function(){return m._},OneLoginAuth:function(){return y.$},BitbucketAuth:function(){return h.x},AtlassianAuth:function(){return E.u}});var r=e(55551),t=e(2922),l=e(59938),f=e(91205);e.o(f,"AlertApiForwarder")&&e.d(o,{AlertApiForwarder:function(){return f.AlertApiForwarder}}),e.o(f,"AppThemeSelector")&&e.d(o,{AppThemeSelector:function(){return f.AppThemeSelector}}),e.o(f,"AtlassianAuth")&&e.d(o,{AtlassianAuth:function(){return f.AtlassianAuth}}),e.o(f,"Auth0Auth")&&e.d(o,{Auth0Auth:function(){return f.Auth0Auth}}),e.o(f,"BitbucketAuth")&&e.d(o,{BitbucketAuth:function(){return f.BitbucketAuth}}),e.o(f,"ConfigReader")&&e.d(o,{ConfigReader:function(){return f.ConfigReader}}),e.o(f,"ErrorAlerter")&&e.d(o,{ErrorAlerter:function(){return f.ErrorAlerter}}),e.o(f,"ErrorApiForwarder")&&e.d(o,{ErrorApiForwarder:function(){return f.ErrorApiForwarder}}),e.o(f,"FetchMiddlewares")&&e.d(o,{FetchMiddlewares:function(){return f.FetchMiddlewares}}),e.o(f,"FlatRoutes")&&e.d(o,{FlatRoutes:function(){return f.FlatRoutes}}),e.o(f,"LocalStorageFeatureFlags")&&e.d(o,{LocalStorageFeatureFlags:function(){return f.LocalStorageFeatureFlags}}),e.o(f,"MicrosoftAuth")&&e.d(o,{MicrosoftAuth:function(){return f.MicrosoftAuth}}),e.o(f,"NoOpAnalyticsApi")&&e.d(o,{NoOpAnalyticsApi:function(){return f.NoOpAnalyticsApi}}),e.o(f,"OAuthRequestManager")&&e.d(o,{OAuthRequestManager:function(){return f.OAuthRequestManager}}),e.o(f,"OktaAuth")&&e.d(o,{OktaAuth:function(){return f.OktaAuth}}),e.o(f,"OneLoginAuth")&&e.d(o,{OneLoginAuth:function(){return f.OneLoginAuth}}),e.o(f,"SamlAuth")&&e.d(o,{SamlAuth:function(){return f.SamlAuth}}),e.o(f,"UnhandledErrorForwarder")&&e.d(o,{UnhandledErrorForwarder:function(){return f.UnhandledErrorForwarder}}),e.o(f,"UrlPatternDiscovery")&&e.d(o,{UrlPatternDiscovery:function(){return f.UrlPatternDiscovery}}),e.o(f,"WebStorage")&&e.d(o,{WebStorage:function(){return f.WebStorage}}),e.o(f,"createFetchApi")&&e.d(o,{createFetchApi:function(){return f.createFetchApi}}),e.o(f,"createSpecializedApp")&&e.d(o,{createSpecializedApp:function(){return f.createSpecializedApp}});var g=e(26079),s=e(67578),u=e(92293),m=e(38482),y=e(58381),h=e(44431);e.o(h,"AlertApiForwarder")&&e.d(o,{AlertApiForwarder:function(){return h.AlertApiForwarder}}),e.o(h,"AppThemeSelector")&&e.d(o,{AppThemeSelector:function(){return h.AppThemeSelector}}),e.o(h,"AtlassianAuth")&&e.d(o,{AtlassianAuth:function(){return h.AtlassianAuth}}),e.o(h,"ConfigReader")&&e.d(o,{ConfigReader:function(){return h.ConfigReader}}),e.o(h,"ErrorAlerter")&&e.d(o,{ErrorAlerter:function(){return h.ErrorAlerter}}),e.o(h,"ErrorApiForwarder")&&e.d(o,{ErrorApiForwarder:function(){return h.ErrorApiForwarder}}),e.o(h,"FetchMiddlewares")&&e.d(o,{FetchMiddlewares:function(){return h.FetchMiddlewares}}),e.o(h,"FlatRoutes")&&e.d(o,{FlatRoutes:function(){return h.FlatRoutes}}),e.o(h,"LocalStorageFeatureFlags")&&e.d(o,{LocalStorageFeatureFlags:function(){return h.LocalStorageFeatureFlags}}),e.o(h,"NoOpAnalyticsApi")&&e.d(o,{NoOpAnalyticsApi:function(){return h.NoOpAnalyticsApi}}),e.o(h,"OAuthRequestManager")&&e.d(o,{OAuthRequestManager:function(){return h.OAuthRequestManager}}),e.o(h,"UnhandledErrorForwarder")&&e.d(o,{UnhandledErrorForwarder:function(){return h.UnhandledErrorForwarder}}),e.o(h,"UrlPatternDiscovery")&&e.d(o,{UrlPatternDiscovery:function(){return h.UrlPatternDiscovery}}),e.o(h,"WebStorage")&&e.d(o,{WebStorage:function(){return h.WebStorage}}),e.o(h,"createFetchApi")&&e.d(o,{createFetchApi:function(){return h.createFetchApi}}),e.o(h,"createSpecializedApp")&&e.d(o,{createSpecializedApp:function(){return h.createSpecializedApp}});var E=e(59589)},38482:function(J,o,e){"use strict";e.d(o,{_:function(){return l}});var r=e(91205);const t={id:"microsoft",title:"Microsoft",icon:()=>null};class l{static create(g){const{environment:s="development",provider:u=t,oauthRequestApi:m,discoveryApi:y,defaultScopes:h=["openid","offline_access","profile","email","User.Read"]}=g;return r.L.create({discoveryApi:y,oauthRequestApi:m,provider:u,environment:s,defaultScopes:h})}}},95792:function(J,o,e){"use strict";e.d(o,{Z:function(){return f}});var r=e(96176),t=e(54842);const l={id:"oauth2",title:"Your Identity Provider",icon:()=>null};class f{constructor(s){k(this,"sessionManager");k(this,"scopeTransform");this.sessionManager=s.sessionManager,this.scopeTransform=s.scopeTransform}static create(s){const{discoveryApi:u,environment:m="development",provider:y=l,oauthRequestApi:h,defaultScopes:E=[],scopeTransform:i=T=>T}=s,S=new r.y({discoveryApi:u,environment:m,provider:y,oauthRequestApi:h,sessionTransform(T){return{...T,providerInfo:{idToken:T.providerInfo.idToken,accessToken:T.providerInfo.accessToken,scopes:f.normalizeScopes(i,T.providerInfo.scope),expiresAt:new Date(Date.now()+T.providerInfo.expiresInSeconds*1e3)}}}}),F=new t.q2({connector:S,defaultScopes:new Set(E),sessionScopes:T=>T.providerInfo.scopes,sessionShouldRefresh:T=>(T.providerInfo.expiresAt.getTime()-Date.now())/1e3<60*5});return new f({sessionManager:F,scopeTransform:i})}async signIn(){await this.getAccessToken()}async signOut(){await this.sessionManager.removeSession()}sessionState$(){return this.sessionManager.sessionState$()}async getAccessToken(s,u){var h;const m=f.normalizeScopes(this.scopeTransform,s),y=await this.sessionManager.getSession({...u,scopes:m});return(h=y==null?void 0:y.providerInfo.accessToken)!=null?h:""}async getIdToken(s={}){var m;const u=await this.sessionManager.getSession(s);return(m=u==null?void 0:u.providerInfo.idToken)!=null?m:""}async getBackstageIdentity(s={}){const u=await this.sessionManager.getSession(s);return u==null?void 0:u.backstageIdentity}async getProfile(s={}){const u=await this.sessionManager.getSession(s);return u==null?void 0:u.profile}static normalizeScopes(s,u){if(!u)return new Set;const m=Array.isArray(u)?u:u.split(/[\s|,]/).filter(Boolean);return new Set(s(m))}}},91205:function(J,o,e){"use strict";e.d(o,{L:function(){return r.Z}});var r=e(95792),t=e(5973),l=e.n(t);e.o(t,"AlertApiForwarder")&&e.d(o,{AlertApiForwarder:function(){return t.AlertApiForwarder}}),e.o(t,"AppThemeSelector")&&e.d(o,{AppThemeSelector:function(){return t.AppThemeSelector}}),e.o(t,"AtlassianAuth")&&e.d(o,{AtlassianAuth:function(){return t.AtlassianAuth}}),e.o(t,"Auth0Auth")&&e.d(o,{Auth0Auth:function(){return t.Auth0Auth}}),e.o(t,"BitbucketAuth")&&e.d(o,{BitbucketAuth:function(){return t.BitbucketAuth}}),e.o(t,"ConfigReader")&&e.d(o,{ConfigReader:function(){return t.ConfigReader}}),e.o(t,"ErrorAlerter")&&e.d(o,{ErrorAlerter:function(){return t.ErrorAlerter}}),e.o(t,"ErrorApiForwarder")&&e.d(o,{ErrorApiForwarder:function(){return t.ErrorApiForwarder}}),e.o(t,"FetchMiddlewares")&&e.d(o,{FetchMiddlewares:function(){return t.FetchMiddlewares}}),e.o(t,"FlatRoutes")&&e.d(o,{FlatRoutes:function(){return t.FlatRoutes}}),e.o(t,"LocalStorageFeatureFlags")&&e.d(o,{LocalStorageFeatureFlags:function(){return t.LocalStorageFeatureFlags}}),e.o(t,"MicrosoftAuth")&&e.d(o,{MicrosoftAuth:function(){return t.MicrosoftAuth}}),e.o(t,"NoOpAnalyticsApi")&&e.d(o,{NoOpAnalyticsApi:function(){return t.NoOpAnalyticsApi}}),e.o(t,"OAuthRequestManager")&&e.d(o,{OAuthRequestManager:function(){return t.OAuthRequestManager}}),e.o(t,"OktaAuth")&&e.d(o,{OktaAuth:function(){return t.OktaAuth}}),e.o(t,"OneLoginAuth")&&e.d(o,{OneLoginAuth:function(){return t.OneLoginAuth}}),e.o(t,"SamlAuth")&&e.d(o,{SamlAuth:function(){return t.SamlAuth}}),e.o(t,"UnhandledErrorForwarder")&&e.d(o,{UnhandledErrorForwarder:function(){return t.UnhandledErrorForwarder}}),e.o(t,"UrlPatternDiscovery")&&e.d(o,{UrlPatternDiscovery:function(){return t.UrlPatternDiscovery}}),e.o(t,"WebStorage")&&e.d(o,{WebStorage:function(){return t.WebStorage}}),e.o(t,"createFetchApi")&&e.d(o,{createFetchApi:function(){return t.createFetchApi}}),e.o(t,"createSpecializedApp")&&e.d(o,{createSpecializedApp:function(){return t.createSpecializedApp}})},5973:function(){},26079:function(J,o,e){"use strict";e.d(o,{s:function(){return g}});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 g{static create(u){const{discoveryApi:m,environment:y="development",provider:h=t,oauthRequestApi:E,defaultScopes:i=["openid","email","profile","offline_access"]}=u;return r.L.create({discoveryApi:m,oauthRequestApi:E,provider:h,environment:y,defaultScopes:i,scopeTransform(S){return S.map(F=>l.has(F)||F.startsWith(f)?F:`${f}${F}`)}})}}},58381:function(J,o,e){"use strict";e.d(o,{$:function(){return g}});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 g{static create(u){const{discoveryApi:m,environment:y="development",provider:h=t,oauthRequestApi:E}=u;return r.L.create({discoveryApi:m,oauthRequestApi:E,provider:h,environment:y,defaultScopes:["openid","email","profile","offline_access"],scopeTransform(i){return i.map(S=>l.has(S)||S.startsWith(f)?S:`${f}${S}`)}})}}},67578:function(J,o,e){"use strict";e.d(o,{n:function(){return u}});var r=e(17678);class t{constructor(y){k(this,"discoveryApi");k(this,"environment");k(this,"provider");const{discoveryApi:h,environment:E,provider:i}=y;this.discoveryApi=h,this.environment=E,this.provider=i}async createSession(){const y=await this.buildUrl("/start"),h=await(0,r.d)({url:y,name:`${this.provider.title} Login`,origin:new URL(y).origin,width:450,height:730});return{...h,id:h.profile.email}}async refreshSession(){}async removeSession(){const y=await fetch(await this.buildUrl("/logout"),{method:"POST",headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(h=>{throw new Error(`Logout request failed, ${h}`)});if(!y.ok){const h=new Error(`Logout request failed, ${y.statusText}`);throw h.status=y.status,h}}async buildUrl(y){return`${await this.discoveryApi.getBaseUrl("auth")}/${this.provider.id}${y}?env=${this.environment}`}}var l=e(54842),f=e(30195);const g=f.z.object({profile:f.z.object({email:f.z.string().optional(),displayName:f.z.string().optional(),picture:f.z.string().optional()}),backstageIdentity:f.z.object({id:f.z.string(),token:f.z.string(),identity:f.z.object({type:f.z.literal("user"),userEntityRef:f.z.string(),ownershipEntityRefs:f.z.array(f.z.string())})})}),s={id:"saml",title:"SAML",icon:()=>null};class u{static create(y){const{discoveryApi:h,environment:E="development",provider:i=s}=y,S=new t({discoveryApi:h,environment:E,provider:i}),F=new l.k1({connector:S}),T=new l.Hc({manager:F,storageKey:`${i.id}Session`,schema:g});return new u(T)}sessionState$(){return this.sessionManager.sessionState$()}constructor(y){this.sessionManager=y}async signIn(){await this.getBackstageIdentity({})}async signOut(){await this.sessionManager.removeSession()}async getBackstageIdentity(y={}){const h=await this.sessionManager.getSession(y);return h==null?void 0:h.backstageIdentity}async getProfile(y={}){const h=await this.sessionManager.getSession(y);return h==null?void 0:h.profile}}},91631:function(J,o,e){"use strict";e.d(o,{AtlassianAuth:function(){return r.AtlassianAuth},Auth0Auth:function(){return r.Auth0Auth},GithubAuth:function(){return r.Td},GitlabAuth:function(){return r.aq},GoogleAuth:function(){return r.eE},MicrosoftAuth:function(){return r.MicrosoftAuth},OktaAuth:function(){return r.OktaAuth},OneLoginAuth:function(){return r.OneLoginAuth},SamlAuth:function(){return r.SamlAuth},AlertApiForwarder:function(){return t.C},NoOpAnalyticsApi:function(){return l.g},AppThemeSelector:function(){return f.C},ConfigReader:function(){return g.m},UrlPatternDiscovery:function(){return s.p},ErrorAlerter:function(){return u.KN},ErrorApiForwarder:function(){return u.gr},UnhandledErrorForwarder:function(){return u.Jv},LocalStorageFeatureFlags:function(){return m.b},FetchMiddlewares:function(){return y.I},createFetchApi:function(){return y.j},OAuthRequestManager:function(){return h.Y},WebStorage:function(){return E.C}});var r=e(91668);e.o(r,"AlertApiForwarder")&&e.d(o,{AlertApiForwarder:function(){return r.AlertApiForwarder}}),e.o(r,"AppThemeSelector")&&e.d(o,{AppThemeSelector:function(){return r.AppThemeSelector}}),e.o(r,"BitbucketAuth")&&e.d(o,{BitbucketAuth:function(){return r.BitbucketAuth}}),e.o(r,"ConfigReader")&&e.d(o,{ConfigReader:function(){return r.ConfigReader}}),e.o(r,"ErrorAlerter")&&e.d(o,{ErrorAlerter:function(){return r.ErrorAlerter}}),e.o(r,"ErrorApiForwarder")&&e.d(o,{ErrorApiForwarder:function(){return r.ErrorApiForwarder}}),e.o(r,"FetchMiddlewares")&&e.d(o,{FetchMiddlewares:function(){return r.FetchMiddlewares}}),e.o(r,"FlatRoutes")&&e.d(o,{FlatRoutes:function(){return r.FlatRoutes}}),e.o(r,"LocalStorageFeatureFlags")&&e.d(o,{LocalStorageFeatureFlags:function(){return r.LocalStorageFeatureFlags}}),e.o(r,"NoOpAnalyticsApi")&&e.d(o,{NoOpAnalyticsApi:function(){return r.NoOpAnalyticsApi}}),e.o(r,"OAuth2")&&e.d(o,{OAuth2:function(){return r.OAuth2}}),e.o(r,"OAuthRequestManager")&&e.d(o,{OAuthRequestManager:function(){return r.OAuthRequestManager}}),e.o(r,"UnhandledErrorForwarder")&&e.d(o,{UnhandledErrorForwarder:function(){return r.UnhandledErrorForwarder}}),e.o(r,"UrlPatternDiscovery")&&e.d(o,{UrlPatternDiscovery:function(){return r.UrlPatternDiscovery}}),e.o(r,"WebStorage")&&e.d(o,{WebStorage:function(){return r.WebStorage}}),e.o(r,"createFetchApi")&&e.d(o,{createFetchApi:function(){return r.createFetchApi}}),e.o(r,"createSpecializedApp")&&e.d(o,{createSpecializedApp:function(){return r.createSpecializedApp}});var t=e(23235),l=e(47150),f=e(58652),g=e(14721),s=e(4333),u=e(89536),m=e(14884),y=e(50160),h=e(11358),E=e(56054)},56494:function(J,o,e){"use strict";e.d(o,{ApiProvider:function(){return r.gs},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(o,{AlertApiForwarder:function(){return r.AlertApiForwarder}}),e.o(r,"AppThemeSelector")&&e.d(o,{AppThemeSelector:function(){return r.AppThemeSelector}}),e.o(r,"AtlassianAuth")&&e.d(o,{AtlassianAuth:function(){return r.AtlassianAuth}}),e.o(r,"Auth0Auth")&&e.d(o,{Auth0Auth:function(){return r.Auth0Auth}}),e.o(r,"BitbucketAuth")&&e.d(o,{BitbucketAuth:function(){return r.BitbucketAuth}}),e.o(r,"ConfigReader")&&e.d(o,{ConfigReader:function(){return r.ConfigReader}}),e.o(r,"ErrorAlerter")&&e.d(o,{ErrorAlerter:function(){return r.ErrorAlerter}}),e.o(r,"ErrorApiForwarder")&&e.d(o,{ErrorApiForwarder:function(){return r.ErrorApiForwarder}}),e.o(r,"FetchMiddlewares")&&e.d(o,{FetchMiddlewares:function(){return r.FetchMiddlewares}}),e.o(r,"FlatRoutes")&&e.d(o,{FlatRoutes:function(){return r.FlatRoutes}}),e.o(r,"GithubAuth")&&e.d(o,{GithubAuth:function(){return r.GithubAuth}}),e.o(r,"GitlabAuth")&&e.d(o,{GitlabAuth:function(){return r.GitlabAuth}}),e.o(r,"GoogleAuth")&&e.d(o,{GoogleAuth:function(){return r.GoogleAuth}}),e.o(r,"LocalStorageFeatureFlags")&&e.d(o,{LocalStorageFeatureFlags:function(){return r.LocalStorageFeatureFlags}}),e.o(r,"MicrosoftAuth")&&e.d(o,{MicrosoftAuth:function(){return r.MicrosoftAuth}}),e.o(r,"NoOpAnalyticsApi")&&e.d(o,{NoOpAnalyticsApi:function(){return r.NoOpAnalyticsApi}}),e.o(r,"OAuth2")&&e.d(o,{OAuth2:function(){return r.OAuth2}}),e.o(r,"OAuthRequestManager")&&e.d(o,{OAuthRequestManager:function(){return r.OAuthRequestManager}}),e.o(r,"OktaAuth")&&e.d(o,{OktaAuth:function(){return r.OktaAuth}}),e.o(r,"OneLoginAuth")&&e.d(o,{OneLoginAuth:function(){return r.OneLoginAuth}}),e.o(r,"SamlAuth")&&e.d(o,{SamlAuth:function(){return r.SamlAuth}}),e.o(r,"UnhandledErrorForwarder")&&e.d(o,{UnhandledErrorForwarder:function(){return r.UnhandledErrorForwarder}}),e.o(r,"UrlPatternDiscovery")&&e.d(o,{UrlPatternDiscovery:function(){return r.UrlPatternDiscovery}}),e.o(r,"WebStorage")&&e.d(o,{WebStorage:function(){return r.WebStorage}}),e.o(r,"createFetchApi")&&e.d(o,{createFetchApi:function(){return r.createFetchApi}}),e.o(r,"createSpecializedApp")&&e.d(o,{createSpecializedApp:function(){return r.createSpecializedApp}});var t=e(91631);e.o(t,"AtlassianAuth")&&e.d(o,{AtlassianAuth:function(){return t.AtlassianAuth}}),e.o(t,"Auth0Auth")&&e.d(o,{Auth0Auth:function(){return t.Auth0Auth}}),e.o(t,"BitbucketAuth")&&e.d(o,{BitbucketAuth:function(){return t.BitbucketAuth}}),e.o(t,"FlatRoutes")&&e.d(o,{FlatRoutes:function(){return t.FlatRoutes}}),e.o(t,"GithubAuth")&&e.d(o,{GithubAuth:function(){return t.GithubAuth}}),e.o(t,"GitlabAuth")&&e.d(o,{GitlabAuth:function(){return t.GitlabAuth}}),e.o(t,"GoogleAuth")&&e.d(o,{GoogleAuth:function(){return t.GoogleAuth}}),e.o(t,"MicrosoftAuth")&&e.d(o,{MicrosoftAuth:function(){return t.MicrosoftAuth}}),e.o(t,"OAuth2")&&e.d(o,{OAuth2:function(){return t.OAuth2}}),e.o(t,"OktaAuth")&&e.d(o,{OktaAuth:function(){return t.OktaAuth}}),e.o(t,"OneLoginAuth")&&e.d(o,{OneLoginAuth:function(){return t.OneLoginAuth}}),e.o(t,"SamlAuth")&&e.d(o,{SamlAuth:function(){return t.SamlAuth}}),e.o(t,"createSpecializedApp")&&e.d(o,{createSpecializedApp:function(){return t.createSpecializedApp}})},80396:function(J,o,e){"use strict";e.d(o,{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(){k(this,"factories",new Map)}register(f,g){const s=r[f],u=this.factories.get(g.api.id);return u&&u.priority>=s?!1:(this.factories.set(g.api.id,{priority:s,factory:g}),!0)}get(f){const g=this.factories.get(f.id);if(!!g)return g.factory}getAllApis(){const f=new Set;for(const{factory:g}of this.factories.values())f.add(g.api);return f}}},14406:function(J,o,e){"use strict";e.d(o,{g:function(){return u}});var r=e(2784),t=e(13980),l=e.n(t);class f{constructor(...y){k(this,"holders");this.holders=y}get(y){for(const h of this.holders){const E=h.get(y);if(E)return E}}}var g=e(76241);const s=(0,g.CT)("api-context"),u=m=>{var S;const{apis:y,children:h}=m,E=(S=(0,r.useContext)(s))==null?void 0:S.atVersion(1),i=E?new f(y,E):y;return r.createElement(s.Provider,{value:(0,g.EI)({1:i}),children:h})};u.propTypes={apis:l().shape({get:l().func.isRequired}).isRequired,children:l().node}},12132:function(J,o,e){"use strict";e.d(o,{M:function(){return r}});class r{constructor(l){k(this,"apis",new Map);this.factories=l}static validateFactories(l,f){for(const g of f){const s=[g],u=new Set;for(;s.length;){const m=s.shift(),y=l.get(m);if(!!y)for(const h of Object.values(y.deps)){if(h.id===g.id)throw new Error(`Circular dependency of api factory for ${g}`);u.has(h)||(u.add(h),s.push(h))}}}}get(l){return this.load(l)}load(l,f=[]){const g=this.apis.get(l.id);if(g)return g;const s=this.factories.get(l);if(!s)return;if(f.includes(s.api))throw new Error(`Circular dependency of api factory for ${s.api}`);const u=this.loadDeps(l,s.deps,[...f,s.api]),m=s.factory(u);return this.apis.set(l.id,m),m}loadDeps(l,f,g){const s={};for(const u in f)if(f.hasOwnProperty(u)){const m=f[u],y=this.load(m,g);if(!y)throw new Error(`No API factory available for dependency ${m} of dependent ${l}`);s[u]=y}return s}}},76105:function(J,o,e){"use strict";e.d(o,{gs:function(){return r.g},MM:function(){return t.M},pv:function(){return l.p}});var r=e(14406),t=e(12132),l=e(80396),f=e(82488),g=e.n(f);e.o(f,"AlertApiForwarder")&&e.d(o,{AlertApiForwarder:function(){return f.AlertApiForwarder}}),e.o(f,"AppThemeSelector")&&e.d(o,{AppThemeSelector:function(){return f.AppThemeSelector}}),e.o(f,"AtlassianAuth")&&e.d(o,{AtlassianAuth:function(){return f.AtlassianAuth}}),e.o(f,"Auth0Auth")&&e.d(o,{Auth0Auth:function(){return f.Auth0Auth}}),e.o(f,"BitbucketAuth")&&e.d(o,{BitbucketAuth:function(){return f.BitbucketAuth}}),e.o(f,"ConfigReader")&&e.d(o,{ConfigReader:function(){return f.ConfigReader}}),e.o(f,"ErrorAlerter")&&e.d(o,{ErrorAlerter:function(){return f.ErrorAlerter}}),e.o(f,"ErrorApiForwarder")&&e.d(o,{ErrorApiForwarder:function(){return f.ErrorApiForwarder}}),e.o(f,"FetchMiddlewares")&&e.d(o,{FetchMiddlewares:function(){return f.FetchMiddlewares}}),e.o(f,"FlatRoutes")&&e.d(o,{FlatRoutes:function(){return f.FlatRoutes}}),e.o(f,"GithubAuth")&&e.d(o,{GithubAuth:function(){return f.GithubAuth}}),e.o(f,"GitlabAuth")&&e.d(o,{GitlabAuth:function(){return f.GitlabAuth}}),e.o(f,"GoogleAuth")&&e.d(o,{GoogleAuth:function(){return f.GoogleAuth}}),e.o(f,"LocalStorageFeatureFlags")&&e.d(o,{LocalStorageFeatureFlags:function(){return f.LocalStorageFeatureFlags}}),e.o(f,"MicrosoftAuth")&&e.d(o,{MicrosoftAuth:function(){return f.MicrosoftAuth}}),e.o(f,"NoOpAnalyticsApi")&&e.d(o,{NoOpAnalyticsApi:function(){return f.NoOpAnalyticsApi}}),e.o(f,"OAuth2")&&e.d(o,{OAuth2:function(){return f.OAuth2}}),e.o(f,"OAuthRequestManager")&&e.d(o,{OAuthRequestManager:function(){return f.OAuthRequestManager}}),e.o(f,"OktaAuth")&&e.d(o,{OktaAuth:function(){return f.OktaAuth}}),e.o(f,"OneLoginAuth")&&e.d(o,{OneLoginAuth:function(){return f.OneLoginAuth}}),e.o(f,"SamlAuth")&&e.d(o,{SamlAuth:function(){return f.SamlAuth}}),e.o(f,"UnhandledErrorForwarder")&&e.d(o,{UnhandledErrorForwarder:function(){return f.UnhandledErrorForwarder}}),e.o(f,"UrlPatternDiscovery")&&e.d(o,{UrlPatternDiscovery:function(){return f.UrlPatternDiscovery}}),e.o(f,"WebStorage")&&e.d(o,{WebStorage:function(){return f.WebStorage}}),e.o(f,"createFetchApi")&&e.d(o,{createFetchApi:function(){return f.createFetchApi}}),e.o(f,"createSpecializedApp")&&e.d(o,{createSpecializedApp:function(){return f.createSpecializedApp}})},82488:function(){},21998:function(J,o,e){"use strict";e.d(o,{b:function(){return Q}});var r=e(2784),t=e(10289),l=e(64279),f=e(56494),g=e(36964),s=e(76105);function u(P){const C={};for(const z in P.collectors)P.collectors.hasOwnProperty(z)&&(C[z]=P.collectors[z]());const B=[{node:r.Children.toArray(P.root),parent:void 0,contexts:{}}];for(;B.length!==0;){const{node:z,parent:_,contexts:ne}=B.shift();r.Children.forEach(z,ge=>{if(!(0,r.isValidElement)(ge))return;const ye={};for(const xe in C)if(C.hasOwnProperty(xe)){const ze=C[xe];ye[xe]=ze.visit(ze.accumulator,ge,_,ne[xe])}for(const xe of P.discoverers){const ze=xe(ge);ze&&B.push({node:ze,parent:ge,contexts:ye})}})}return Object.fromEntries(Object.entries(C).map(([z,_])=>[z,_.accumulator]))}function m(P,C){return()=>({accumulator:P(),visit:C})}function y(P){var C;return(C=P.props)==null?void 0:C.children}function h(P){var C,B,z;if(((C=P.props)==null?void 0:C.path)&&((B=P.props)==null?void 0:B.element))return(z=P.props)==null?void 0:z.element}const E=m(()=>new Set,(P,C)=>{const B=(0,g.getComponentData)(C,"core.plugin");B&&P.add(B)});var i=e(88934);function S(P){var z;const C=(z=P.props)==null?void 0:z.element;let B=(0,g.getComponentData)(P,"core.mountPoint");return!B&&(0,r.isValidElement)(C)&&(B=(0,g.getComponentData)(C,"core.mountPoint")),B}const F=m(()=>new Map,(P,C,B,z)=>{var ge,ye;let _=z;if((B==null?void 0:B.props.element)===C)return _;if((0,g.getComponentData)(C,"core.gatherMountPoints")){const xe=(ge=C.props)==null?void 0:ge.path;if(!xe)throw new Error("Mount point gatherer must have a path");_=xe}const ne=S(C);if(ne){let xe=(ye=C.props)==null?void 0:ye.path;if(_&&(xe?_=void 0:xe=_),!xe)throw new Error("Mounted routable extension must have a path");P.set(ne,xe)}return _}),T=m(()=>new Map,(P,C,B,z)=>{var ge;if((B==null?void 0:B.props.element)===C)return z;let _=z;const ne=S(C);return ne&&(z&&"sticky"in z?(P.set(ne,z.sticky),((ge=C.props)==null?void 0:ge.path)?_=ne:_=z):(P.set(ne,z),_=ne)),(0,g.getComponentData)(C,"core.gatherMountPoints")?{sticky:_}:_}),j={caseSensitive:!1,path:"/*",element:"match-all",routeRefs:new Set},x=m(()=>Array(),(P,C,B,z)=>{var ze,Me,Te;const _=(ze=z==null?void 0:z.children)!=null?ze:P;if((B==null?void 0:B.props.element)===C)return z;const ne=(Me=C.props)==null?void 0:Me.path,ge=Boolean((Te=C.props)==null?void 0:Te.caseSensitive),ye=S(C);if(ye){if(ne){const Fe={caseSensitive:ge,path:ne,element:"mounted",routeRefs:new Set([ye]),children:[j],plugin:(0,g.getComponentData)(C.props.element,"core.plugin")};return _.push(Fe),Fe}z==null||z.routeRefs.add(ye)}if((0,g.getComponentData)(C,"core.gatherMountPoints")){if(!ne)throw new Error("Mount point gatherer must have a path");const Fe={caseSensitive:ge,path:ne,element:"gathered",routeRefs:new Set,children:[j],plugin:z==null?void 0:z.plugin};return _.push(Fe),Fe}return z}),b=m(()=>new Set,(P,C)=>{if(C.type===i.L){const B=C.props;P.add("with"in B?B.with:B.without)}});var M=e(76241);const O=(0,M.uW)("route-ref-type",()=>Symbol("route-ref-type"));function Y(P){return P[O]==="absolute"}function G(P){return P[O]==="sub"}function fe(P){return P[O]==="external"}function Re(...P){const C=P.join("/").replace(/\/\/+/g,"/");return C!=="/"&&C.endsWith("/")?C.slice(0,-1):C}function we(P,C,B){let z,_="";if(Y(P))z=P;else if(G(P))z=P.parent,_=P.path;else if(fe(P)){const ye=B.get(P);if(!ye)return[void 0,""];if(Y(ye))z=ye;else if(G(ye))z=ye.parent,_=ye.path;else throw new Error(`ExternalRouteRef was bound to invalid target, ${ye}`)}else throw P[O]?new Error(`Unknown or invalid route ref type, ${P[O]}`):new Error(`Unknown object passed to useRouteRef, got ${P}`);if(!z)return[void 0,""];const ne=C.get(z);if(!ne)return[void 0,""];const ge=Re(ne,_);return[z,ge]}function me(P,C,B,z,_){var Me;const ne=(Me=(0,t.fp)(_,C))!=null?Me:[],ge=Array();let ye=-1;for(let Te=P;Te&&(ye=ne.findIndex(Fe=>Fe.route.routeRefs.has(Te)),ye===-1);Te=z.get(Te))ge.unshift(Te);ge.length===0&&(ye-=1);const xe=ye===-1?"":ne[ye].pathname,ze=Re(...ge.slice(0,-1).map(Te=>{const Fe=B.get(Te);if(!Fe)throw new Error(`No path for ${Te}`);if(Fe.includes(":"))throw new Error(`Cannot route to ${P} with parent ${Te} as it has parameters`);return Fe}));return xe+ze}class je{constructor(C,B,z,_,ne){this.routePaths=C,this.routeParents=B,this.routeObjects=z,this.routeBindings=_,this.appBasePath=ne}resolve(C,B){const[z,_]=we(C,this.routePaths,this.routeBindings);if(!z)return;let ne;typeof B=="string"?ne=this.trimPath(B):B.pathname?ne={...B,pathname:this.trimPath(B.pathname)}:ne=B;const ge=this.appBasePath+me(z,ne,this.routePaths,this.routeParents,this.routeObjects);return(...[xe])=>ge+(0,t.Gn)(_,xe)}trimPath(C){return C&&(C.startsWith(this.appBasePath)?C.slice(this.appBasePath.length):C)}}const Oe=(0,M.CT)("routing-context"),Je=({routePaths:P,routeParents:C,routeObjects:B,routeBindings:z,basePath:_="",children:ne})=>{const ge=new je(P,C,B,z,_),ye=(0,M.EI)({1:ge});return r.createElement(Oe.Provider,{value:ye},ne)},rt=(P,C)=>{var B,z;try{const _=(0,t.fp)(C,{pathname:P}),ne=(B=_==null?void 0:_.filter(ye=>{var xe;return((xe=ye==null?void 0:ye.route.routeRefs)==null?void 0:xe.size)>0}).pop())==null?void 0:B.route;if(!ne)return{};let ge;return ne.routeRefs.size===1&&(ge=ne.routeRefs.values().next().value),{extension:"App",pluginId:((z=ne.plugin)==null?void 0:z.getId())||"root",...ge?{routeRef:ge.id}:{}}}catch{return{}}},et=({pathname:P,search:C,hash:B})=>{const z=(0,g.useAnalytics)();return(0,r.useEffect)(()=>{z.captureEvent("navigate",`${P}${C}${B}`)},[z,P,C,B]),null},ut=({tree:P})=>{const{pathname:C,search:B,hash:z}=(0,t.TH)(),{routeObjects:_}=(0,r.useMemo)(()=>u({root:P,discoverers:[y,h],collectors:{routeObjects:x}}),[P]);return r.createElement(g.AnalyticsContext,{attributes:rt(C,_)},r.createElement(et,{pathname:C,search:B,hash:z}))};function ct(P,C){const B=new Set(C.values());B.delete(void 0);for(const z of C.keys()){if(B.has(z))continue;let _=z,ne="";for(;_;){const ye=P.get(_);if(!ye)throw new Error(`No path for ${_}`);ne=`${ye}${ne}`,_=C.get(_)}const ge=ne.match(/:(\w+)/g);if(ge){for(let ye=0;ye<ge.length;ye++)for(let xe=ye+1;xe<ge.length;xe++)if(ge[xe]===ge[ye])throw new Error(`Parameter ${ge[xe]} is duplicated in path ${ne}`)}}}const at=(0,M.CT)("app-context"),Rt=({appContext:P,children:C})=>{const B=(0,M.EI)({1:P});return r.createElement(at.Provider,{value:B,children:C})};function Pt(P){return new Error(`Tried to access IdentityApi ${P} before app was loaded`)}function It(P){console.warn(`WARNING: Call to ${P} is deprecated and will break in the future`)}class St{constructor(){k(this,"target")}setTarget(C){this.target=C}getUserId(){if(!this.target)throw Pt("getUserId");if(!this.target.getUserId)throw new Error("IdentityApi does not implement getUserId");return It("getUserId"),this.target.getUserId()}getProfile(){if(!this.target)throw Pt("getProfile");if(!this.target.getProfile)throw new Error("IdentityApi does not implement getProfile");return It("getProfile"),this.target.getProfile()}async getProfileInfo(){if(!this.target)throw Pt("getProfileInfo");return this.target.getProfileInfo()}async getBackstageIdentity(){if(!this.target)throw Pt("getBackstageIdentity");const C=await this.target.getBackstageIdentity();return C.userEntityRef.match(/^.*:.*\/.*$/)||console.warn(`WARNING: The App IdentityApi provided an invalid userEntityRef, '${C.userEntityRef}'. It must be a full Entity Reference of the form '<kind>:<namespace>/<name>'.`),C}async getCredentials(){if(!this.target)throw Pt("getCredentials");return this.target.getCredentials()}async getIdToken(){if(!this.target)throw Pt("getIdToken");if(!this.target.getIdToken)throw new Error("IdentityApi does not implement getIdToken");return It("getIdToken"),this.target.getIdToken()}async signOut(){if(!this.target)throw Pt("signOut");await this.target.signOut(),location.reload()}}var yt=e(72164);function Nt(P,C,B){if(P!==void 0){const _=B.find(ne=>ne.id===P);if(_)return _}if(C){const _=B.find(ne=>ne.variant==="dark");if(_)return _}const z=B.find(_=>_.variant==="light");return z||B[0]}const Ut=()=>{const P=(0,r.useMemo)(()=>window.matchMedia("(prefers-color-scheme: dark)"),[]),[C,B]=(0,r.useState)(P.matches);return(0,r.useEffect)(()=>{const z=_=>{B(_.matches)};return P.addListener(z),()=>{P.removeListener(z)}},[P]),C};function Ot({children:P}){const C=(0,g.useApi)(g.appThemeApiRef),B=(0,yt.Z)(C.activeThemeId$(),C.getActiveThemeId()),z=Boolean(window.matchMedia)?Ut():!1,_=Nt(B,z,C.getInstalledThemes());if(!_)throw new Error("App has no themes");return r.createElement(_.Provider,{children:P})}const bt=async(P="__APP_INJECTED_RUNTIME_CONFIG__")=>{const C=[{context:"app-config.yaml",data:{app:{title:"Techdocs Preview App",baseUrl:"http://localhost:3000"},backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external",requestUrl:"http://localhost:3000/api"}}}];if(!C)throw new Error("No static configuration provided");if(!Array.isArray(C))throw new Error("Static configuration has invalid format");const B=C.slice();if(P!=="__app_injected_runtime_config__".toLocaleUpperCase("en-US"))try{const _=JSON.parse(P);Array.isArray(_)?B.push(..._):B.push({data:_,context:"env"})}catch(_){throw new Error(`Failed to load runtime configuration, ${_}`)}const z=window.__APP_CONFIG__;return z&&B.push({context:"window",data:z}),B};class gt{constructor(){k(this,"apis",[])}add(C,B){return this.apis.push([C.id,B]),B}build(){return new vt(new Map(this.apis))}}class vt{static builder(){return new gt}static from(C){return new vt(new Map(C.map(([B,z])=>[B.id,z])))}static with(C,B){return new vt(new Map([[C.id,B]]))}constructor(C){this.apis=C}with(C,B){return new vt(new Map([...this.apis,[C.id,B]]))}get(C){return this.apis.get(C.id)}}function $t(P){const C=new Map;return P&&P({bind:(z,_)=>{for(const[ne,ge]of Object.entries(_)){const ye=z[ne];if(!ye)throw new Error(`Key ${ne} is not an existing external route`);if(!ge&&!ye.optional)throw new Error(`External route ${ne} is required but was undefined`);ge&&C.set(ye,ge)}}}),C}function De(P){var B;let{pathname:C}=new URL((B=P.getOptionalString("app.baseUrl"))!=null?B:"/","http://dummy.dev");return C=C.replace(/\/*$/,""),C}function it(P,C,B){var xe;const z=Boolean(P),_=(0,l.default)(P||(()=>Promise.resolve([])));let ne;if(z&&_.loading){const{Progress:ze}=C;ne=r.createElement(ze,null)}else if(_.error){const{BootErrorPage:ze}=C;ne=r.createElement(ze,{step:"load-config",error:_.error})}const{ThemeProvider:ge=Ot}=C;return ne?{node:r.createElement(f.ApiProvider,{apis:vt.with(g.appThemeApiRef,B)},r.createElement(ge,null,ne))}:{api:f.ConfigReader.fromConfigs((xe=_.value)!=null?xe:[])}}class lt{constructor(C){this.app=C}getPlugins(){return this.app.getPlugins()}getSystemIcon(C){return this.app.getSystemIcon(C)}getComponents(){return this.app.getComponents()}}class le{constructor(C){k(this,"apiHolder");k(this,"configApi");k(this,"apis");k(this,"icons");k(this,"plugins");k(this,"components");k(this,"themes");k(this,"configLoader");k(this,"defaultApis");k(this,"bindRoutes");k(this,"appIdentityProxy",new St);k(this,"apiFactoryRegistry");var B,z,_,ne;this.apis=(B=C.apis)!=null?B:[],this.icons=C.icons,this.plugins=new Set((z=C.plugins)!=null?z:[]),this.components=C.components,this.themes=C.themes,this.configLoader=(_=C.configLoader)!=null?_:bt,this.defaultApis=(ne=C.defaultApis)!=null?ne:[],this.bindRoutes=C.bindRoutes,this.apiFactoryRegistry=new s.pv}getPlugins(){return Array.from(this.plugins)}getSystemIcon(C){return this.icons[C]}getComponents(){return this.components}getProvider(){const C=new lt(this);return({children:z})=>{const _=(0,r.useMemo)(()=>f.AppThemeSelector.createWithStorage(this.themes),[]),{routePaths:ne,routeParents:ge,routeObjects:ye,featureFlags:xe}=(0,r.useMemo)(()=>{const Fe=u({root:z,discoverers:[y,h],collectors:{routePaths:F,routeParents:T,routeObjects:x,collectedPlugins:E,featureFlags:b}});return ct(Fe.routePaths,Fe.routeParents),Fe.collectedPlugins.forEach(ue=>this.plugins.add(ue)),this.verifyPlugins(this.plugins),this.getApiHolder(),Fe},[z]),ze=it(this.configLoader,this.components,_),Me="api"in ze;if(Me){const{api:Fe}=ze;this.configApi=Fe}if((0,r.useEffect)(()=>{if(Me){const Fe=this.getApiHolder().get(g.featureFlagsApiRef);for(const ue of this.plugins.values())if("getFeatureFlags"in ue)for(const Ee of ue.getFeatureFlags())Fe.registerFlag({name:Ee.name,pluginId:ue.getId()});else for(const Ee of ue.output())Ee.type==="feature-flag"&&Fe.registerFlag({name:Ee.name,pluginId:ue.getId()});for(const ue of xe)Fe.registerFlag({name:ue,pluginId:""})}},[Me,ze,xe]),"node"in ze)return ze.node;const{ThemeProvider:Te=Ot}=this.components;return r.createElement(f.ApiProvider,{apis:this.getApiHolder()},r.createElement(Rt,{appContext:C},r.createElement(Te,null,r.createElement(Je,{routePaths:ne,routeParents:ge,routeObjects:ye,routeBindings:$t(this.bindRoutes),basePath:De(ze.api)},z))))}}getRouter(){const{Router:C,SignInPage:B}=this.components,z=({component:ne,children:ge})=>{const[ye,xe]=(0,r.useState)();return ye?(this.appIdentityProxy.setTarget(ye),ge):r.createElement(ne,{onSignInSuccess:xe})};return({children:ne})=>{const ge=(0,g.useApi)(g.configApiRef),ye=`${De(ge)}/*`;return B?r.createElement(C,null,r.createElement(ut,{tree:ne}),r.createElement(z,{component:B},r.createElement(t.Z5,null,r.createElement(t.AW,{path:ye,element:r.createElement(r.Fragment,null,ne)})))):(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(C,null,r.createElement(ut,{tree:ne}),r.createElement(t.Z5,null,r.createElement(t.AW,{path:ye,element:r.createElement(r.Fragment,null,ne)}))))}}getApiHolder(){if(this.apiHolder){for(const C of this.plugins)for(const B of C.getApis())this.apiFactoryRegistry.get(B.api)||this.apiFactoryRegistry.register("default",B);return s.MM.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder}this.apiFactoryRegistry.register("static",{api:g.appThemeApiRef,deps:{},factory:()=>f.AppThemeSelector.createWithStorage(this.themes)}),this.apiFactoryRegistry.register("static",{api:g.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:g.identityApiRef,deps:{},factory:()=>this.appIdentityProxy}),this.apiFactoryRegistry.register("default",{api:g.featureFlagsApiRef,deps:{},factory:()=>new f.LocalStorageFeatureFlags});for(const C of this.defaultApis)this.apiFactoryRegistry.register("default",C);for(const C of this.plugins)for(const B of C.getApis())if(!this.apiFactoryRegistry.register("default",B))throw new Error(`Plugin ${C.getId()} tried to register duplicate or forbidden API factory for ${B.api}`);for(const C of this.apis)if(!this.apiFactoryRegistry.register("app",C))throw new Error(`Duplicate or forbidden API factory for ${C.api} in app`);return s.MM.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder=new s.MM(this.apiFactoryRegistry),this.apiHolder}verifyPlugins(C){const B=new Set;for(const z of C){const _=z.getId();if(B.has(_))throw new Error(`Duplicate plugin found '${_}'`);B.add(_)}}}function Q(P){return new le(P)}},44056:function(J,o,e){"use strict";e.d(o,{b:function(){return r.b}});var r=e(21998),t=e(73495),l=e.n(t);e.o(t,"AtlassianAuth")&&e.d(o,{AtlassianAuth:function(){return t.AtlassianAuth}}),e.o(t,"Auth0Auth")&&e.d(o,{Auth0Auth:function(){return t.Auth0Auth}}),e.o(t,"BitbucketAuth")&&e.d(o,{BitbucketAuth:function(){return t.BitbucketAuth}}),e.o(t,"FlatRoutes")&&e.d(o,{FlatRoutes:function(){return t.FlatRoutes}}),e.o(t,"GithubAuth")&&e.d(o,{GithubAuth:function(){return t.GithubAuth}}),e.o(t,"GitlabAuth")&&e.d(o,{GitlabAuth:function(){return t.GitlabAuth}}),e.o(t,"GoogleAuth")&&e.d(o,{GoogleAuth:function(){return t.GoogleAuth}}),e.o(t,"MicrosoftAuth")&&e.d(o,{MicrosoftAuth:function(){return t.MicrosoftAuth}}),e.o(t,"OAuth2")&&e.d(o,{OAuth2:function(){return t.OAuth2}}),e.o(t,"OktaAuth")&&e.d(o,{OktaAuth:function(){return t.OktaAuth}}),e.o(t,"OneLoginAuth")&&e.d(o,{OneLoginAuth:function(){return t.OneLoginAuth}}),e.o(t,"SamlAuth")&&e.d(o,{SamlAuth:function(){return t.SamlAuth}})},73495:function(){},49208:function(J,o,e){"use strict";e.d(o,{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.b},FlatRoutes:function(){return l.w}});var r=e(56494);e.o(r,"AtlassianAuth")&&e.d(o,{AtlassianAuth:function(){return r.AtlassianAuth}}),e.o(r,"Auth0Auth")&&e.d(o,{Auth0Auth:function(){return r.Auth0Auth}}),e.o(r,"BitbucketAuth")&&e.d(o,{BitbucketAuth:function(){return r.BitbucketAuth}}),e.o(r,"FlatRoutes")&&e.d(o,{FlatRoutes:function(){return r.FlatRoutes}}),e.o(r,"GithubAuth")&&e.d(o,{GithubAuth:function(){return r.GithubAuth}}),e.o(r,"GitlabAuth")&&e.d(o,{GitlabAuth:function(){return r.GitlabAuth}}),e.o(r,"GoogleAuth")&&e.d(o,{GoogleAuth:function(){return r.GoogleAuth}}),e.o(r,"MicrosoftAuth")&&e.d(o,{MicrosoftAuth:function(){return r.MicrosoftAuth}}),e.o(r,"OAuth2")&&e.d(o,{OAuth2:function(){return r.OAuth2}}),e.o(r,"OktaAuth")&&e.d(o,{OktaAuth:function(){return r.OktaAuth}}),e.o(r,"OneLoginAuth")&&e.d(o,{OneLoginAuth:function(){return r.OneLoginAuth}}),e.o(r,"SamlAuth")&&e.d(o,{SamlAuth:function(){return r.SamlAuth}}),e.o(r,"createSpecializedApp")&&e.d(o,{createSpecializedApp:function(){return r.createSpecializedApp}});var t=e(44056);e.o(t,"AtlassianAuth")&&e.d(o,{AtlassianAuth:function(){return t.AtlassianAuth}}),e.o(t,"Auth0Auth")&&e.d(o,{Auth0Auth:function(){return t.Auth0Auth}}),e.o(t,"BitbucketAuth")&&e.d(o,{BitbucketAuth:function(){return t.BitbucketAuth}}),e.o(t,"FlatRoutes")&&e.d(o,{FlatRoutes:function(){return t.FlatRoutes}}),e.o(t,"GithubAuth")&&e.d(o,{GithubAuth:function(){return t.GithubAuth}}),e.o(t,"GitlabAuth")&&e.d(o,{GitlabAuth:function(){return t.GitlabAuth}}),e.o(t,"GoogleAuth")&&e.d(o,{GoogleAuth:function(){return t.GoogleAuth}}),e.o(t,"MicrosoftAuth")&&e.d(o,{MicrosoftAuth:function(){return t.MicrosoftAuth}}),e.o(t,"OAuth2")&&e.d(o,{OAuth2:function(){return t.OAuth2}}),e.o(t,"OktaAuth")&&e.d(o,{OktaAuth:function(){return t.OktaAuth}}),e.o(t,"OneLoginAuth")&&e.d(o,{OneLoginAuth:function(){return t.OneLoginAuth}}),e.o(t,"SamlAuth")&&e.d(o,{SamlAuth:function(){return t.SamlAuth}});var l=e(63938)},96176:function(J,o,e){"use strict";e.d(o,{y:function(){return l}});var r=e(17678);function t(f){return[...f].join(" ")}class l{constructor(g){k(this,"discoveryApi");k(this,"environment");k(this,"provider");k(this,"joinScopesFunc");k(this,"authRequester");k(this,"sessionTransform");const{discoveryApi:s,environment:u,provider:m,joinScopes:y=t,oauthRequestApi:h,sessionTransform:E=i=>i}=g;this.authRequester=h.createAuthRequester({provider:m,onAuthRequest:i=>this.showPopup(i)}),this.discoveryApi=s,this.environment=u,this.provider=m,this.joinScopesFunc=y,this.sessionTransform=E}async createSession(g){return g.instantPopup?this.showPopup(g.scopes):this.authRequester(g.scopes)}async refreshSession(){const g=await fetch(await this.buildUrl("/refresh",{optional:!0}),{headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(u=>{throw new Error(`Auth refresh request failed, ${u}`)});if(!g.ok){const u=new Error(`Auth refresh request failed, ${g.statusText}`);throw u.status=g.status,u}const s=await g.json();if(s.error){const u=new Error(s.error.message);throw s.error.name&&(u.name=s.error.name),u}return await this.sessionTransform(s)}async removeSession(){const g=await fetch(await this.buildUrl("/logout"),{method:"POST",headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(s=>{throw new Error(`Logout request failed, ${s}`)});if(!g.ok){const s=new Error(`Logout request failed, ${g.statusText}`);throw s.status=g.status,s}}async showPopup(g){const s=this.joinScopesFunc(g),u=await this.buildUrl("/start",{scope:s,origin:location.origin}),m=await(0,r.d)({url:u,name:`${this.provider.title} Login`,origin:new URL(u).origin,width:450,height:730});return await this.sessionTransform(m)}async buildUrl(g,s){const u=await this.discoveryApi.getBaseUrl("auth"),m=this.buildQueryString({...s,env:this.environment});return`${u}/${this.provider.id}${g}${m}`}buildQueryString(g){if(!g)return"";const s=Object.entries(g).map(([u,m])=>{if(typeof m=="string")return`${encodeURIComponent(u)}=${encodeURIComponent(m)}`;if(m)return encodeURIComponent(u)}).filter(Boolean).join("&");return s?`?${s}`:""}}},91405:function(J,o,e){"use strict";e.d(o,{l:function(){return l}});var r=e(98005),t=e(36964);class l{constructor(){k(this,"subject",new r.X(t.SessionState.SignedOut));k(this,"signedIn",!1)}setIsSignedIn(g){this.signedIn!==g&&(this.signedIn=g,this.subject.next(this.signedIn?t.SessionState.SignedIn:t.SessionState.SignedOut))}sessionState$(){return this.subject}}},54842:function(J,o,e){"use strict";e.d(o,{Hc:function(){return s},q2:function(){return f},k1:function(){return g}});function r(u,m){for(const y of m)if(!u.has(y))return!1;return!0}class t{constructor(m){this.options=m}sessionExistsAndHasScope(m,y){if(!m)return!1;if(!y||this.options.sessionScopes===void 0)return!0;const h=this.options.sessionScopes(m);return r(h,y)}getExtendedScope(m,y){const h=new Set(this.options.defaultScopes);if(m&&this.options.sessionScopes!==void 0){const E=this.options.sessionScopes(m);for(const i of E)h.add(i)}if(y)for(const E of y)h.add(E);return h}}var l=e(91405);class f{constructor(m){k(this,"connector");k(this,"helper");k(this,"sessionScopesFunc");k(this,"sessionShouldRefreshFunc");k(this,"stateTracker",new l.l);k(this,"refreshPromise");k(this,"currentSession");const{connector:y,defaultScopes:h=new Set,sessionScopes:E,sessionShouldRefresh:i}=m;this.connector=y,this.sessionScopesFunc=E,this.sessionShouldRefreshFunc=i,this.helper=new t({sessionScopes:E,defaultScopes:h})}async getSession(m){if(this.helper.sessionExistsAndHasScope(this.currentSession,m.scopes)){if(!this.sessionShouldRefreshFunc(this.currentSession))return this.currentSession;try{const h=await this.collapsedSessionRefresh(),E=this.sessionScopesFunc(this.currentSession),i=this.sessionScopesFunc(h);return r(i,E)&&(this.currentSession=h),h}catch(h){if(m.optional)return;throw h}}if(!this.currentSession&&!m.instantPopup)try{const y=await this.collapsedSessionRefresh();return this.currentSession=y,this.getSession(m)}catch{}if(!m.optional)return this.currentSession=await this.connector.createSession({...m,scopes:this.helper.getExtendedScope(this.currentSession,m.scopes)}),this.stateTracker.setIsSignedIn(!0),this.currentSession}async removeSession(){this.currentSession=void 0,await this.connector.removeSession(),this.stateTracker.setIsSignedIn(!1)}sessionState$(){return this.stateTracker.sessionState$()}async collapsedSessionRefresh(){if(this.refreshPromise)return this.refreshPromise;this.refreshPromise=this.connector.refreshSession();try{const m=await this.refreshPromise;return this.stateTracker.setIsSignedIn(!0),m}finally{delete this.refreshPromise}}}class g{constructor(m){k(this,"connector");k(this,"helper");k(this,"stateTracker",new l.l);k(this,"currentSession");const{connector:y,defaultScopes:h=new Set,sessionScopes:E}=m;this.connector=y,this.helper=new t({sessionScopes:E,defaultScopes:h})}setSession(m){this.currentSession=m,this.stateTracker.setIsSignedIn(Boolean(m))}async getSession(m){if(this.helper.sessionExistsAndHasScope(this.currentSession,m.scopes))return this.currentSession;if(!m.optional)return this.currentSession=await this.connector.createSession({...m,scopes:this.helper.getExtendedScope(this.currentSession,m.scopes)}),this.stateTracker.setIsSignedIn(!0),this.currentSession}async removeSession(){this.currentSession=void 0,this.stateTracker.setIsSignedIn(!1)}sessionState$(){return this.stateTracker.sessionState$()}}class s{constructor(m){k(this,"manager");k(this,"storageKey");k(this,"schema");k(this,"sessionShouldRefreshFunc");k(this,"helper");const{manager:y,storageKey:h,schema:E,sessionScopes:i,sessionShouldRefresh:S=()=>!1}=m;this.manager=y,this.storageKey=h,this.schema=E,this.sessionShouldRefreshFunc=S,this.helper=new t({sessionScopes:i,defaultScopes:new Set})}setSession(m){this.manager.setSession(m),this.saveSession(m)}async getSession(m){const{scopes:y}=m,h=this.loadSession();if(this.helper.sessionExistsAndHasScope(h,y)&&!this.sessionShouldRefreshFunc(h))return this.manager.setSession(h),h;const E=await this.manager.getSession(m);return this.saveSession(E),E}async removeSession(){localStorage.removeItem(this.storageKey),await this.manager.removeSession()}sessionState$(){return this.manager.sessionState$()}loadSession(){try{const m=localStorage.getItem(this.storageKey);if(m){const y=JSON.parse(m,(h,E)=>(E==null?void 0:E.__type)==="Set"?new Set(E.__value):E);try{return this.schema.parse(y)}catch(h){throw console.log(`Failed to load session from local storage because it did not conform to the expected schema, ${h}`),h}}return}catch{localStorage.removeItem(this.storageKey);return}}saveSession(m){if(m===void 0){localStorage.removeItem(this.storageKey);return}try{this.schema.parse(m)}catch(y){console.warn(`Failed to save session to local storage because it did not conform to the expected schema, ${y}`);return}localStorage.setItem(this.storageKey,JSON.stringify(m,(y,h)=>h instanceof Set?{__type:"Set",__value:Array.from(h)}:h))}}},17678:function(J,o,e){"use strict";e.d(o,{d:function(){return r}});function r(t){return new Promise((l,f)=>{const g=t.width||500,s=t.height||700,u=window.screen.width/2-g/2,m=window.screen.height/2-s/2,y=window.open(t.url,t.name,`menubar=no,location=no,resizable=no,scrollbars=no,status=no,width=${g},height=${s},top=${m},left=${u}`);let h="";if(!y||typeof y.closed=="undefined"||y.closed){const F=new Error("Failed to open auth popup.");F.name="PopupRejectedError",f(F);return}const E=F=>{if(F.source!==y||F.origin!==t.origin)return;const{data:T}=F;if(T.type==="config_info"){h=T.targetOrigin;return}if(T.type!=="authorization_response")return;const j=T;if("error"in j){const x=new Error(j.error.message);x.name=j.error.name,f(x)}else l(j.response);S()},i=setInterval(()=>{if(y.closed){const F=`Login failed, ${h&&h!==window.location.origin?`Incorrect app origin, expected ${h}`:"popup was closed"}`,T=new Error(F);T.name="PopupClosedError",f(T),S()}},100);function S(){window.removeEventListener("message",E),clearInterval(i)}window.addEventListener("message",E)})}},98005:function(J,o,e){"use strict";e.d(o,{J:function(){return l},X:function(){return f}});var r=e(82394),t=e.n(r);class l{constructor(){k(this,"isClosed",!1);k(this,"terminatingError");k(this,"observable",new(t())(s=>this.isClosed?(this.terminatingError?s.error(this.terminatingError):s.complete(),()=>{}):(this.subscribers.add(s),()=>{this.subscribers.delete(s)})));k(this,"subscribers",new Set)}[Symbol.observable](){return this}get closed(){return this.isClosed}next(s){if(this.isClosed)throw new Error("PublishSubject is closed");this.subscribers.forEach(u=>u.next(s))}error(s){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.terminatingError=s,this.subscribers.forEach(u=>u.error(s))}complete(){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.subscribers.forEach(s=>s.complete())}subscribe(s,u,m){const y=typeof s=="function"?{next:s,error:u,complete:m}:s;return this.observable.subscribe(y)}}class f{constructor(s){k(this,"isClosed");k(this,"currentValue");k(this,"terminatingError");k(this,"observable");k(this,"subscribers",new Set);this.isClosed=!1,this.currentValue=s,this.terminatingError=void 0,this.observable=new(t())(u=>this.isClosed?(this.terminatingError?u.error(this.terminatingError):u.complete(),()=>{}):(u.next(this.currentValue),this.subscribers.add(u),()=>{this.subscribers.delete(u)}))}[Symbol.observable](){return this}get closed(){return this.isClosed}next(s){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.currentValue=s,this.subscribers.forEach(u=>u.next(s))}error(s){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.terminatingError=s,this.subscribers.forEach(u=>u.error(s))}complete(){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.subscribers.forEach(s=>s.complete())}subscribe(s,u,m){const y=typeof s=="function"?{next:s,error:u,complete:m}:s;return this.observable.subscribe(y)}}},88934:function(J,o,e){"use strict";e.d(o,{L:function(){return l}});var r=e(36964),t=e(2784);const l=f=>{const{children:g}=f,s=(0,r.useApi)(r.featureFlagsApiRef),u="with"in f?s.isActive(f.with):!s.isActive(f.without);return t.createElement(t.Fragment,null,u?g:null)};(0,r.attachComponentData)(l,"core.featureFlagged",!0)},63938:function(J,o,e){"use strict";e.d(o,{w:function(){return f}});var r=e(2784),t=e(10289),l=e(36964);const f=s=>{const u=(0,l.useApp)(),{NotFoundErrorPage:m}=u.getComponents(),y=(0,l.useElementFilter)(s.children,h=>h.getElements().flatMap(E=>{var S;let i=E.props.path;return i===""?[]:(i=(S=i==null?void 0:i.replace(/\/\*$/,""))!=null?S:"/",[{path:i,element:E,children:E.props.children?[{path:i==="/"?"/":"/*",element:E.props.children}]:void 0}])}).sort((E,i)=>i.path.localeCompare(E.path)).map(E=>(E.path=E.path==="/"?"/":`${E.path}/*`,E)));return y.push({element:r.createElement(m,null),path:"/*"}),(0,t.V$)(y)};var g=e(88934)},9118:function(J,o,e){"use strict";e.d(o,{Button:function(){return x},CodeSnippet:function(){return je},Content:function(){return qa},ContentHeader:function(){return ni},CreateButton:function(){return rt},DependencyGraph:function(){return Te},DependencyGraphTypes:function(){return r},EmptyState:function(){return D},ErrorPage:function(){return ii},ErrorPanel:function(){return Zt},Header:function(){return io},HeaderIconLinkRow:function(){return Qn},HeaderLabel:function(){return yi},HeaderTabs:function(){return _a},InfoCard:function(){return mt},ItemCardGrid:function(){return Ti},ItemCardHeader:function(){return Ri},Link:function(){return T},LogViewer:function(){return Pr},MissingAnnotationEmptyState:function(){return Se},OverflowTooltip:function(){return mr},Page:function(){return co},PageWithHeader:function(){return Li},Progress:function(){return Br},ResponseErrorPanel:function(){return Kt},RoutedTabs:function(){return eo},Select:function(){return Ur},Sidebar:function(){return qo},SidebarContext:function(){return gr},SidebarDivider:function(){return fs},SidebarItem:function(){return Xa},SidebarPage:function(){return zo},SidebarPinStateContext:function(){return pr},SubvalueCell:function(){return Ps},SupportButton:function(){return Zo},Table:function(){return Ks},WarningPanel:function(){return On},sidebarConfig:function(){return Qt},useContent:function(){return ha},useQueryParamState:function(){return bo}});var r={};e.r(r),e.d(r,{Nm:function(){return et},ht:function(){return at},LJ:function(){return ct}});var t=e(2784),l=e(36964),f=e(19928);function g(n){const[a,c]=useState([]),d=useApi(alertApiRef);if(useEffect(()=>{const I=d.alert$().subscribe(U=>c(V=>V.concat(U)));return()=>{I.unsubscribe()}},[d]),a.length===0)return null;const[p]=a,R=()=>{c(I=>I.filter(U=>U!==p))};return React.createElement(Snackbar,{open:!0,anchorOrigin:{vertical:"top",horizontal:"center"}},React.createElement(Alert,{action:React.createElement(IconButton,{color:"inherit",size:"small",onClick:R,"data-testid":"error-button-close"},React.createElement(CloseIcon,null)),severity:p.severity},React.createElement("span",null,p.message.toString(),a.length>1&&React.createElement("em",null,` (${a.length-1} older ${pluralize("message",a.length-1)})`))))}var s=e(79692),u=e(12420);const m=(0,s.Z)(n=>(0,u.Z)({avatar:{width:"4rem",height:"4rem",color:"#fff",fontWeight:n.typography.fontWeightBold,letterSpacing:"1px",textTransform:"uppercase"}}),{name:"BackstageAvatar"});function y(n){const{displayName:a,picture:c,customStyles:d}=n,p=m();return React.createElement(MaterialAvatar,{alt:a,src:c,className:p.avatar,style:{backgroundColor:stringToColor(a||c||""),...d}},a&&extractInitials(a))}var h=e(77277),E=e(86689),i=e(62833);const S=n=>/^([a-z+.-]+):/.test(n),F=n=>{var a;return n instanceof Array?n.map(F).join(" ").trim():typeof n=="object"&&n?F((a=n==null?void 0:n.props)==null?void 0:a.children):["string","number"].includes(typeof n)?String(n):""},T=t.forwardRef(({onClick:n,...a},c)=>{const d=(0,l.useAnalytics)(),p=String(a.to),R=F(a.children)||p,I=S(p),U=I&&!!/^https?:/.exec(p),V=Z=>{n==null||n(Z),d.captureEvent("click",R,{attributes:{to:p}})};return I?t.createElement(E.Z,{ref:c,href:p,onClick:V,...U?{target:"_blank",rel:"noopener"}:{},...a}):t.createElement(E.Z,{ref:c,component:i.rU,onClick:V,...a})}),j=t.forwardRef((n,a)=>t.createElement(T,{ref:a,...n,color:"initial"})),x=t.forwardRef((n,a)=>t.createElement(h.Z,{ref:a,component:j,...n}));var b=e(60364),M=e(61837),O=e(80030),Y=e(19353),G=e(95074);function fe(n){const{text:a,tooltipDelay:c=1e3,tooltipText:d="Text copied to clipboard"}=n,p=(0,l.useApi)(l.errorApiRef),[R,I]=(0,t.useState)(!1),[{error:U},V]=(0,G.Z)();(0,t.useEffect)(()=>{U&&p.post(U)},[U,p]);const Z=oe=>{oe.stopPropagation(),I(!0),V(a)};return t.createElement(t.Fragment,null,t.createElement(O.ZP,{id:"copy-test-tooltip",title:d,placement:"top",leaveDelay:c,onClose:()=>I(!1),open:R},t.createElement(M.Z,{onClick:Z},t.createElement(Y.Z,null))))}var Re=e(96259),we=e(397),me=e(74943);function je(n){const{text:a,language:c,showLineNumbers:d=!1,highlightedNumbers:p,customStyle:R,showCopyCodeButton:I=!1}=n,U=(0,b.Z)(),V=U.palette.type==="dark"?we.Z:me.Z,Z=U.palette.type==="dark"?"#256bf3":"#e6ffed";return t.createElement("div",{style:{position:"relative"}},t.createElement(Re.Z,{customStyle:R,language:c,style:V,showLineNumbers:d,wrapLines:!0,lineNumberStyle:{color:U.palette.textVerySubtle},lineProps:oe=>(p==null?void 0:p.includes(oe))?{style:{backgroundColor:Z}}:{}},a),I&&t.createElement("div",{style:{position:"absolute",top:0,right:0}},t.createElement(fe,{text:a})))}var Oe=e(41156),Je=e(88188);function rt(n){const{title:a,to:c}=n,d=(0,Oe.Z)(p=>p.breakpoints.down("xs"));return c?d?t.createElement(M.Z,{component:i.rU,color:"primary",title:a,size:"small",to:c},t.createElement(Je.Z,null)):t.createElement(h.Z,{component:i.rU,variant:"contained",color:"primary",to:c},a):null}var et;(function(n){const a="TB";n.TOP_BOTTOM=a;const c="BT";n.BOTTOM_TOP=c;const d="LR";n.LEFT_RIGHT=d;const p="RL";n.RIGHT_LEFT=p})(et||(et={}));var ut;(function(n){const a="UL";n.UP_LEFT=a;const c="UR";n.UP_RIGHT=c;const d="DL";n.DOWN_LEFT=d;const p="DR";n.DOWN_RIGHT=p})(ut||(ut={}));var ct;(function(n){const a="network-simplex";n.NETWORK_SIMPLEX=a;const c="tight-tree";n.TIGHT_TREE=c;const d="longest-path";n.LONGEST_PATH=d})(ct||(ct={}));var at;(function(n){const a="l";n.LEFT=a;const c="r";n.RIGHT=c;const d="c";n.CENTER=d})(at||(at={}));var Rt=e(13387),Pt=e(11105),It=e(97963),St=e(46506),yt=e.n(St),Nt=e(54073),Ut=e.n(Nt),Ot=e(10368);const bt=(0,s.Z)(n=>({node:{fill:n.palette.primary.light,stroke:n.palette.primary.light},text:{fill:n.palette.primary.contrastText}}),{name:"BackstageDependencyGraphDefaultNode"});function gt({node:{id:n}}){const a=bt(),[c,d]=t.useState(0),[p,R]=t.useState(0),I=t.useRef(null);t.useLayoutEffect(()=>{if(I.current){let{height:oe,width:ce}=I.current.getBBox();oe=Math.round(oe),ce=Math.round(ce),(oe!==p||ce!==c)&&(d(ce),R(oe))}},[c,p]);const U=10,V=c+U*2,Z=p+U*2;return t.createElement("g",null,t.createElement("rect",{className:a.node,width:V,height:Z,rx:10}),t.createElement("text",{ref:I,className:a.text,y:Z/2,x:V/2,textAnchor:"middle",alignmentBaseline:"middle"},n))}const vt="arrow-marker",$t="node",De="edge",it="label",lt=(0,Ot.Z)(n=>({node:{transition:`${n.transitions.duration.shortest}ms`}}),{name:"BackstageDependencyGraphNode"}),le=n=>t.createElement(gt,{...n});function Q({render:n=le,setNode:a,node:c}){const{width:d,height:p,x:R=0,y:I=0}=c,U=c,V=lt(),Z=t.useRef(null);return t.useLayoutEffect(()=>{if(Z.current){let{height:oe,width:ce}=Z.current.getBBox();oe=Math.round(oe),ce=Math.round(ce),(oe!==p||ce!==d)&&a(c.id,{...c,height:oe,width:ce})}},[c,d,p,a]),t.createElement("g",{ref:Z,"data-testid":$t,className:V.node,transform:`translate(${R-d/2},${I-p/2})`},n({node:U}))}var P=e(55876),C=e(66481),B=e(19574),z=e.n(B);const _=(0,Ot.Z)(n=>({text:{fill:n.palette.textContrast}}),{name:"BackstageDependencyGraphDefaultLabel"});function ne({edge:{label:n}}){const a=_();return t.createElement("text",{className:a.text,textAnchor:"middle"},n)}const ge=(0,Ot.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"}),ye=n=>t.createElement(ne,{...n}),xe=P.Z().x(n=>n.x).y(n=>n.y).curve(C.Z);function ze({render:n=ye,setEdge:a,id:c,edge:d}){const{x:p=0,y:R=0,width:I,height:U,points:V}=d,Z=d,oe=ge(),ce=t.useRef(null);t.useLayoutEffect(()=>{if(ce.current){let{height:ve,width:Ie}=ce.current.getBBox();ve=Math.round(ve),Ie=Math.round(Ie),(ve!==U||Ie!==I)&&a(c,{...d,height:ve,width:Ie})}},[d,U,I,a,c]);let Ae="";if(V){const ve=V.filter(Ie=>z()(Ie.x)&&z()(Ie.y));Ae=xe(ve)||""}return t.createElement(t.Fragment,null,Ae&&t.createElement("path",{"data-testid":De,className:oe.path,markerEnd:`url(#${vt})`,d:Ae}),Z.label?t.createElement("g",{ref:ce,"data-testid":it,className:oe.label,transform:`translate(${p},${R})`},n({edge:Z})):null)}const Me="workspace";function Te(n){var nr,yo;const{edges:a,nodes:c,renderNode:d,direction:p=et.TOP_BOTTOM,align:R,nodeMargin:I=50,edgeMargin:U=10,rankMargin:V=50,paddingX:Z=0,paddingY:oe=0,acyclicer:ce,ranker:Ae=ct.NETWORK_SIMPLEX,labelPosition:ve=at.RIGHT,labelOffset:Ie=10,edgeRanks:pt=1,edgeWeight:Gt=1,renderLabel:cn,defs:en,zoom:qe="enabled",...zt}=n,Dt=(0,It.Z)(),[rn,jn]=t.useState(100),[mn,Jr]=t.useState(100),Ft=t.useRef(new(yt()).graphlib.Graph),[wn,Ra]=t.useState(((nr=Ft.current.graph())==null?void 0:nr.width)||0),[Vn,Sa]=t.useState(((yo=Ft.current.graph())==null?void 0:yo.height)||0),[Yr,Qr]=t.useState([]),[Ca,tn]=t.useState([]),hn=Math.max(wn,rn),An=Math.max(Vn,mn),Gn=t.useMemo(()=>Ut()(jt=>{if(!jt)return;const nn=Pt.Z(jt),Wt=Pt.Z(jt.getElementById(Me));function Tn(){nn.call(Rt.sP().scaleExtent([1,10]).on("zoom",bn=>{bn.transform.x=Math.min(0,Math.max(bn.transform.x,hn-hn*bn.transform.k)),bn.transform.y=Math.min(0,Math.max(bn.transform.y,An-An*bn.transform.k)),Wt.attr("transform",bn.transform)}))}qe==="enabled"?Tn():qe==="enable-on-click"&&nn.on("click",()=>Tn());const{width:Pn,height:Xr}=jt.getBoundingClientRect();rn!==Pn&&jn(Pn),mn!==Xr&&Jr(Xr)},100),[mn,rn,hn,An,qe]),Xt=t.useCallback(()=>{const jt=Ft.current.nodes(),nn=Ft.current.edges();jt.forEach(Wt=>{c.some(Pn=>Pn.id===Wt)||Ft.current.removeNode(Wt)}),nn.forEach(Wt=>{a.some(Pn=>Pn.from===Wt.v&&Pn.to===Wt.w)||Ft.current.removeEdge(Wt.v,Wt.w)}),c.forEach(Wt=>{const Tn=Ft.current.nodes().find(Pn=>Wt.id===Pn);if(Tn&&Ft.current.node(Tn)){const{width:Pn,height:Xr,x:bn,y:Vi}=Ft.current.node(Tn);Ft.current.setNode(Tn,{...Wt,width:Pn,height:Xr,x:bn,y:Vi})}else Ft.current.setNode(Wt.id,{...Wt,width:0,height:0})}),a.forEach(Wt=>{Ft.current.setEdge(Wt.from,Wt.to,{...Wt,label:Wt.label,width:0,height:0,labelpos:ve,labeloffset:Ie,weight:Gt,minlen:pt})})},[a,c,ve,Ie,Gt,pt]),kt=t.useMemo(()=>Ut()(()=>{yt().layout(Ft.current);const{height:jt,width:nn}=Ft.current.graph(),Wt=Math.max(0,jt||0),Tn=Math.max(0,nn||0);Ra(Tn),Sa(Wt),Qr(Ft.current.nodes()),tn(Ft.current.edges())},250,{leading:!0}),[]);t.useEffect(()=>(Ft.current.setGraph({rankdir:p,align:R,nodesep:I,edgesep:U,ranksep:V,marginx:Z,marginy:oe,acyclicer:ce,ranker:Ae}),Xt(),kt(),kt.cancel),[ce,R,p,U,Z,oe,I,V,Ae,Xt,kt]);function tr(jt,nn){return Ft.current.setNode(jt,nn),kt(),Ft.current}function Kn(jt,nn){return Ft.current.setEdge(jt,nn),kt(),Ft.current}return t.createElement("svg",{ref:Gn,...zt,width:"100%",height:An,viewBox:`0 0 ${hn} ${An}`},t.createElement("defs",null,t.createElement("marker",{id:vt,viewBox:"0 0 24 24",markerWidth:"14",markerHeight:"14",refX:"16",refY:"12",orient:"auto",markerUnits:"strokeWidth"},t.createElement("path",{fill:Dt.palette.textSubtle,d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})),en),t.createElement("g",{id:Me},t.createElement("svg",{width:wn,height:Vn,y:An/2-Vn/2,x:hn/2-wn/2,viewBox:`0 0 ${wn} ${Vn}`},Ca.map(jt=>{const nn=Ft.current.edge(jt);return nn?t.createElement(ze,{key:`${jt.v}-${jt.w}`,id:jt,setEdge:Kn,render:cn,edge:nn}):null}),Yr.map(jt=>{const nn=Ft.current.node(jt);return nn?t.createElement(Q,{key:jt,setNode:tr,render:d,node:nn}):null}))))}var Fe=e(72779),ue=e.n(Fe);const Ee=(0,s.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"}),Ne=n=>{var ve;const{variant:a,message:c,id:d,fixed:p=!1}=n,R=Ee(),U=useApi(storageApiRef).forBucket("notifications"),V=(ve=U.get("dismissedBanners"))!=null?ve:[],[Z,oe]=useState(new Set(V)),ce=useObservable(U.observe$("dismissedBanners"));useEffect(()=>{var Ie;if(ce==null?void 0:ce.newValue){const pt=(Ie=ce==null?void 0:ce.newValue)!=null?Ie:[];oe(new Set(pt))}},[ce==null?void 0:ce.newValue]);const Ae=()=>{U.set("dismissedBanners",[...Z,d])};return React.createElement(Snackbar,{anchorOrigin:p?{vertical:"bottom",horizontal:"center"}:{vertical:"top",horizontal:"center"},open:!Z.has(d),classes:{root:classNames(R.root,!p&&R.topPosition)}},React.createElement(SnackbarContent,{classes:{root:classNames(R.content,R[a]),message:R.message},message:c,action:[React.createElement(IconButton,{key:"dismiss",title:"Permanently dismiss this message",color:"inherit",onClick:Ae},React.createElement(Close,{className:R.icon}))]}))};var Ue=e(60905),Be=e(90436),st=e(86284),be=e(96465),Qe=e(19133),Xe=e(3871);const dt=(0,s.Z)({generalImg:{width:"95%",zIndex:2,position:"relative",left:"50%",top:"50%",transform:"translate(-50%, 15%)"}},{name:"BackstageEmptyStateImage"}),K=({missing:n})=>{const a=dt();switch(n){case"field":return t.createElement("img",{src:st,className:a.generalImg,alt:"annotation is missing"});case"info":return t.createElement("img",{src:be,alt:"no Information",className:a.generalImg});case"content":return t.createElement("img",{src:Qe,alt:"create Component",className:a.generalImg});case"data":return t.createElement("img",{src:Xe,alt:"no Build",className:a.generalImg});default:return null}},A=(0,s.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 D(n){const{title:a,description:c,missing:d,action:p}=n,R=A();return t.createElement(Ue.Z,{container:!0,direction:"row",justifyContent:"space-around",alignItems:"flex-start",className:R.root,spacing:2},t.createElement(Ue.Z,{item:!0,xs:12,md:6},t.createElement(Ue.Z,{container:!0,direction:"column"},t.createElement(Ue.Z,{item:!0,xs:!0},t.createElement(Be.Z,{variant:"h5"},a)),t.createElement(Ue.Z,{item:!0,xs:!0},t.createElement(Be.Z,{variant:"body1"},c)),t.createElement(Ue.Z,{item:!0,xs:!0,className:R.action},p))),t.createElement(Ue.Z,{item:!0,xs:12,md:6,className:R.imageContainer},t.createElement(K,{missing:d})))}const X=`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`,q=(0,s.Z)(n=>({code:{borderRadius:6,margin:`${n.spacing(2)}px 0px`,background:n.palette.type==="dark"?"#444":"#fff"}}),{name:"BackstageMissingAnnotationEmptyState"});function Se(n){const{annotation:a}=n,c=q(),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(D,{missing:"field",title:"Missing Annotation",description:d,action:t.createElement(t.Fragment,null,t.createElement(Be.Z,{variant:"body1"},"Add the annotation to your component YAML as shown in the highlighted example below:"),t.createElement("div",{className:c.code},t.createElement(je,{text:X.replace("ANNOTATION",a),language:"yaml",showLineNumbers:!0,highlightedNumbers:[6,7],customStyle:{background:"inherit",fontSize:"115%"}})),t.createElement(h.Z,{color:"primary",component:T,to:"https://backstage.io/docs/features/software-catalog/well-known-annotations"},"Read more"))})}var he=e(11776),Le=e(38402),tt=e(49378),Tt=e(41128),gn=e(27616),ie=e(8284),$=e(70660),ee=e(91750),pe=e(38016);const Ve=(n,a)=>(a.palette.type==="light"?Tt._j:Tt.$n)(a.palette[n].light,.6),ke=(n,a)=>(a.palette.type==="light"?Tt.$n:Tt._j)(a.palette[n].light,.9),At=(0,s.Z)(n=>({root:{marginRight:n.spacing(1),fill:({severity:a})=>Ve(a,n)}})),Bt=({severity:n})=>{const a=At({severity:n});return t.createElement(ee.Z,{classes:a})},an=({severity:n})=>{const a=At({severity:n});return t.createElement(pe.Z,{classes:a})},on=(0,s.Z)(n=>({panel:{backgroundColor:({severity:a})=>ke(a,n),color:({severity:a})=>Ve(a,n),verticalAlign:"middle"},summary:{display:"flex",flexDirection:"row"},summaryText:{color:({severity:a})=>Ve(a,n),fontWeight:"bold"},message:{width:"100%",display:"block",color:({severity:a})=>Ve(a,n),backgroundColor:({severity:a})=>ke(a,n)},details:{width:"100%",display:"block",color:n.palette.textContrast,backgroundColor:n.palette.background.default,border:`1px solid ${n.palette.border}`,padding:n.spacing(2),fontFamily:"sans-serif"}}),{name:"BackstageWarningPanel"}),Ln=n=>n.charAt(0).toLocaleUpperCase("en-US")+n.slice(1);function On(n){const{severity:a="warning",title:c,message:d,children:p,defaultExpanded:R}=n,I=on({severity:a}),U=Ln(a)+(c?`: ${c}`:"");return t.createElement(gn.Z,{defaultExpanded:R!=null?R:!1,className:I.panel,role:"alert"},t.createElement(ie.Z,{expandIcon:t.createElement(an,{severity:a}),className:I.summary},t.createElement(Bt,{severity:a}),t.createElement(Be.Z,{className:I.summaryText,variant:"subtitle1"},U)),(d||p)&&t.createElement($.Z,null,t.createElement(Ue.Z,{container:!0},d&&t.createElement(Ue.Z,{item:!0,xs:12},t.createElement(Be.Z,{className:I.message,variant:"body1"},d)),p&&t.createElement(Ue.Z,{item:!0,xs:12,className:I.details},p))))}const Fn=(0,s.Z)(n=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:n.spacing(2)},divider:{margin:n.spacing(2)}}),{name:"BackstageErrorPanel"}),Et=({error:n,message:a,stack:c,children:d})=>{const p=Fn();return t.createElement(he.Z,{dense:!0},t.createElement(Le.Z,{alignItems:"flex-start"},t.createElement(tt.Z,{classes:{secondary:p.text},primary:"Error",secondary:n}),t.createElement(fe,{text:n})),t.createElement(Le.Z,{alignItems:"flex-start"},t.createElement(tt.Z,{classes:{secondary:p.text},primary:"Message",secondary:a}),t.createElement(fe,{text:a})),c&&t.createElement(Le.Z,{alignItems:"flex-start"},t.createElement(tt.Z,{classes:{secondary:p.text},primary:"Stack Trace",secondary:c}),t.createElement(fe,{text:c})),d)};function Zt(n){const{title:a,error:c,defaultExpanded:d,children:p}=n;return t.createElement(On,{severity:"error",title:a!=null?a:c.message,defaultExpanded:d},t.createElement(Et,{error:c.name,message:c.message,stack:c.stack,children:p}))}var sn=e(85256);const Bn=(0,s.Z)(n=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:n.spacing(2)},divider:{margin:n.spacing(2)}}),{name:"BackstageResponseErrorPanel"});function Kt(n){var Ie;const{title:a,error:c,defaultExpanded:d}=n,p=Bn();if(c.name!=="ResponseError")return t.createElement(Zt,{title:a!=null?a:c.message,defaultExpanded:d,error:c});const{body:R,cause:I}=c,{request:U,response:V}=R,Z=`${V.statusCode}: ${I.name}`,oe=U&&`${U.method} ${U.url}`,ce=I.message.replace(/\\n/g,`
|
|
12
|
+
`),Ae=(Ie=I.stack)==null?void 0:Ie.replace(/\\n/g,`
|
|
13
|
+
`),ve=JSON.stringify(R,void 0,2);return t.createElement(Zt,{title:a!=null?a:c.message,defaultExpanded:d,error:{name:Z,message:ce,stack:Ae}},oe&&t.createElement(Le.Z,{alignItems:"flex-start"},t.createElement(tt.Z,{classes:{secondary:p.text},primary:"Request",secondary:U?`${oe}`:void 0}),t.createElement(fe,{text:oe})),t.createElement(t.Fragment,null,t.createElement(sn.Z,{component:"li",className:p.divider}),t.createElement(Le.Z,{alignItems:"flex-start"},t.createElement(tt.Z,{classes:{secondary:p.text},primary:"Full Error as JSON"})),t.createElement(je,{language:"json",text:ve,showCopyCodeButton:!0})))}var Jn=e(9832);function rr(n){const a=document.createElement("div");return a.setAttribute("id",n),a}function xn(n){document.body.insertBefore(n,document.body.lastElementChild.nextElementSibling)}function Er(n){const a=useRef(null);useEffect(function(){const p=document.querySelector(`#${n}`),R=p||rr(n);return p||xn(R),R.appendChild(a.current),function(){a.current.remove(),R.childNodes.length===-1&&R.remove()}},[n]);function c(){return a.current||(a.current=document.createElement("div")),a.current}return c()}var Ar=null;const zn="core.calloutSeen";function ar(){const[n,a]=useState(()=>{const d=localStorage.getItem(zn);return d?JSON.parse(d):{}}),c=useCallback((d,p)=>{const R=localStorage.getItem(zn),U={...R?JSON.parse(R):{},[d]:p};a(U),localStorage.setItem(zn,JSON.stringify(U))},[]);return{states:n,setState:c}}function or(n){const{states:a,setState:c}=ar(),d=useCallback(()=>{c(n,!0)},[c,n]);return{seen:a[n]===!0,markSeen:d}}function sr(n){const{seen:a,markSeen:c}=or(n);return{show:a===!1,hide:c}}const Yn=(0,s.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 vr(n){const{featureId:a,title:c,description:d,children:p}=n,{show:R,hide:I}=useShowCallout(a),U=usePortal("core.callout"),V=useRef(null),[Z,oe]=useState(),ce=Yn(),Ae=useCallback(()=>{if(V.current){const ve=V.current.getBoundingClientRect(),Ie=Math.max(ve.width,ve.height),pt=800,Gt=ve.x-(Ie-ve.width)/2-pt,cn=ve.y-(Ie-ve.height)/2-pt,en=Ie+2*pt,qe=450,zt=ve.x+ve.width/2-qe,Dt=ve.y-(Ie-ve.height)/2+Ie+20;oe({dotLeft:Gt,dotTop:cn,dotSize:en,borderWidth:pt,textTop:Dt,textLeft:zt,textWidth:qe})}},[]);return useEffect(()=>(window.addEventListener("resize",Ae),window.addEventListener("scroll",Ae),()=>{window.removeEventListener("resize",Ae),window.removeEventListener("scroll",Ae)}),[Ae]),useLayoutEffect(Ae,[V.current,Ae]),R?React.createElement(React.Fragment,null,React.createElement("div",{className:ce.featureWrapper,ref:V},p),createPortal(React.createElement("div",{className:ce.backdrop},React.createElement(ClickAwayListener,{onClickAway:I},React.createElement(React.Fragment,null,React.createElement("div",{className:ce.dot,"data-testid":"dot",style:{left:Z==null?void 0:Z.dotLeft,top:Z==null?void 0:Z.dotTop,width:Z==null?void 0:Z.dotSize,height:Z==null?void 0:Z.dotSize,borderWidth:Z==null?void 0:Z.borderWidth},onClick:I,onKeyDown:I,role:"button",tabIndex:0},React.createElement("div",{className:ce.pulseCircle})),React.createElement("div",{className:ce.text,"data-testid":"text",style:{left:Z==null?void 0:Z.textLeft,top:Z==null?void 0:Z.textTop,width:Z==null?void 0:Z.textWidth}},React.createElement(Typography,{variant:"h2",paragraph:!0},c),React.createElement(Typography,null,d))))),U)):React.createElement(React.Fragment,null,p)}var ir=e(35292);const Mn=(0,s.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 Rr({color:n="primary",disabled:a=!1,href:c="#",icon:d=t.createElement(ir.Z,null),label:p,onClick:R,title:I}){const U=Mn();return a?t.createElement(E.Z,{title:I,className:ue()(U.link,U.disabled),underline:"none"},d,t.createElement("span",{className:U.label},p)):t.createElement(E.Z,{title:I,className:ue()(U.link,U[n]),to:c,component:T,onClick:R},d,t.createElement("span",{className:U.label},p))}const Sr=(0,s.Z)(n=>({links:{margin:n.spacing(2,0),display:"grid",gridAutoFlow:"column",gridAutoColumns:"min-content",gridGap:n.spacing(3)}}),{name:"BackstageHeaderIconLinkRow"});function Qn(n){const{links:a}=n,c=Sr();return t.createElement("nav",{className:c.links},a.map((d,p)=>t.createElement(Rr,{key:p+1,...d})))}const Xn=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
|
+
`},lr=100,pn=10,yn=(0,s.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:lr,height:`calc(100% + ${pn}px)`,transition:"opacity 300ms",pointerEvents:"none"},fadeLeft:{left:-pn,background:`linear-gradient(90deg, ${Xn(n.palette.type)})`},fadeRight:{right:-pn,background:`linear-gradient(270deg, ${Xn(n.palette.type)})`},fadeHidden:{opacity:0},button:{position:"absolute"},buttonLeft:{left:-n.spacing(2)},buttonRight:{right:-n.spacing(2)}}),{name:"BackstageHorizontalScrollGrid"});function cr(n){const[[a,c],d]=React.useState([0,0]);return React.useLayoutEffect(()=>{const p=n.current;if(!p){d([0,0]);return}const R=()=>{const I=p.scrollLeft,U=p.scrollWidth-p.offsetWidth-p.scrollLeft;d([I,U])};return R(),p.addEventListener("scroll",R),window.addEventListener("resize",R),()=>{p.removeEventListener("scroll",R),window.removeEventListener("resize",R)}},[n]),[a,c]}function ur(n,a,c){const[d,p]=React.useState(0);return React.useLayoutEffect(()=>{if(d===0)return;const R=performance.now(),I=requestAnimationFrame(U=>{if(!n.current)return;const V=U-R,Z=Math.abs(d)*V/a,ce=Math.max(c,Z)*Math.sign(d);n.current.scrollBy({left:ce});const Ae=d-ce;Math.sign(d)!==Math.sign(Ae)?p(0):p(Ae)});return()=>cancelAnimationFrame(I)},[n,d,a,c]),p}function Cr(n){const{scrollStep:a=100,scrollSpeed:c=50,minScrollDistance:d=5,children:p,...R}=n,I=yn(n),U=React.useRef(),[V,Z]=cr(U),oe=ur(U,c,d),ce=Ae=>{!U.current||oe(Ae?a:-a)};return React.createElement("div",{...R,className:I.root},React.createElement(Grid,{container:!0,direction:"row",wrap:"nowrap",className:I.container,ref:U},p),React.createElement("div",{className:classNames(I.fade,I.fadeLeft,{[I.fadeHidden]:V===0})}),React.createElement("div",{className:classNames(I.fade,I.fadeRight,{[I.fadeHidden]:Z===0})}),V>0&&React.createElement(IconButton,{title:"Scroll Left",onClick:()=>ce(!1),className:classNames(I.button,I.buttonLeft,{})},React.createElement(ChevronLeftIcon,null)),Z>0&&React.createElement(IconButton,{title:"Scroll Right",onClick:()=>ce(!0),className:classNames(I.button,I.buttonRight,{})},React.createElement(ChevronRightIcon,null)))}const Tr=(0,s.Z)({alpha:{color:"#ffffff",fontFamily:"serif",fontWeight:"normal",fontStyle:"italic"},beta:{color:"#4d65cc",fontFamily:"serif",fontWeight:"normal",fontStyle:"italic"}},{name:"BackstageLifecycle"});function dr(n){const a=Tr(n),{shorthand:c,alpha:d}=n;return c?React.createElement("span",{className:a[d?"alpha":"beta"],style:{fontSize:"120%"}},d?React.createElement(React.Fragment,null,"\u03B1"):React.createElement(React.Fragment,null,"\u03B2")):React.createElement("span",{className:a[d?"alpha":"beta"]},d?"Alpha":"Beta")}const Jt=(0,t.lazy)(()=>Promise.all([e.e(1110),e.e(8718)]).then(e.bind(e,98718)).then(n=>({default:n.RealLogViewer})));function Pr(n){const{Progress:a}=(0,l.useApp)().getComponents();return t.createElement(t.Suspense,{fallback:t.createElement(a,null)},t.createElement(Jt,{...n}))}const kn=(0,s.Z)(n=>({markdown:{"& table":{borderCollapse:"collapse",border:`1px solid ${n.palette.border}`},"& th, & td":{border:`1px solid ${n.palette.border}`,padding:n.spacing(1)},"& td":{wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:n.spacing(3,2,3,2.5),borderBottom:0},"& th":{backgroundColor:n.palette.background.paper},"& tr":{backgroundColor:n.palette.background.paper},"& tr:nth-child(odd)":{backgroundColor:n.palette.background.default},"& a":{color:n.palette.link},"& img":{maxWidth:"100%"}}}),{name:"BackstageMarkdownContent"}),Ir={code:({inline:n,className:a,children:c,...d})=>{const p=String(c).replace(/\n+$/,""),R=/language-(\w+)/.exec(a||"");return!n&&R?t.createElement(je,{language:R[1],text:p}):t.createElement("code",{className:a,...d},c)}};function kr(n){const{content:a,dialect:c="gfm"}=n,d=kn();return React.createElement(ReactMarkdown,{remarkPlugins:c==="gfm"?[gfm]:[],className:d.markdown,children:a,components:Ir})}var Lr=e(10179);const fr=(0,s.Z)(n=>({root:{paddingLeft:n.spacing(3)}}),{name:"BackstageLoginRequestListItem"}),qr=({request:n,busy:a,setBusy:c})=>{const d=fr(),[p,R]=useState(),I=async()=>{c(!0);try{await n.trigger()}catch(V){R(isError(V)?V.message:"An unspecified error occurred")}finally{c(!1)}},U=n.provider.icon;return React.createElement(ListItem,{button:!0,disabled:a,classes:{root:d.root}},React.createElement(ListItemAvatar,null,React.createElement(U,{fontSize:"large"})),React.createElement(ListItemText,{primary:n.provider.title,secondary:p&&React.createElement(Typography,{color:"error"},p)}),React.createElement(Button,{color:"primary",variant:"contained",onClick:I},"Log in"))};var _r=null;const Or=(0,s.Z)(n=>({dialog:{paddingTop:n.spacing(1)},title:{minWidth:0},contentList:{padding:0},actionButtons:{padding:n.spacing(2,0)}}),{name:"OAuthRequestDialog"});function ea(n){const a=Or(),[c,d]=useState(!1),p=useApi(oauthRequestApiRef),R=useObservable(useMemo(()=>p.authRequest$(),[p]),[]),I=()=>{R.forEach(U=>U.reject())};return React.createElement(Dialog,{open:Boolean(R.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,R.map(U=>React.createElement(LoginRequestListItem,{key:U.provider.title,request:U,busy:c,setBusy:d})))),React.createElement(DialogActions,{classes:{root:a.actionButtons}},React.createElement(Button,{onClick:I},"Reject All")))}var xr=e(15277),Dr=e.n(xr),br=e(90736);const Nn=(0,s.Z)({container:{overflow:"visible !important"}},{name:"BackstageOverflowTooltip"});function mr(n){var I;const[a,c]=(0,t.useState)(!1),d=(0,br.default)(),p=Nn(),R=U=>{d()&&c(U)};return t.createElement(O.ZP,{title:(I=n.title)!=null?I:n.text||"",placement:n.placement,disableHoverListener:!a},t.createElement(Dr(),{text:n.text,line:n.line,onToggled:R,containerClassName:p.container}))}var Fr=e(67358);function Br(n){const[a,c]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{const d=setTimeout(()=>c(!0),250);return()=>clearTimeout(d)},[]),a?t.createElement(Fr.Z,{...n,"data-testid":"progress"}):t.createElement("div",{style:{display:"none"}})}var w=e(94339),N=e(14503),H=e(24579),te=e(32552),se=e(15459),ae=e(95544),de=e(27597);const We=(0,s.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 Ye(n){const{link:a,title:c,onClick:d}=n,p=We();return t.createElement("div",null,t.createElement(sn.Z,null),t.createElement(T,{to:a,onClick:d,underline:"none"},t.createElement(ae.Z,{display:"flex",alignItems:"center",className:p.root},t.createElement(ae.Z,{className:p.boxTitle,fontWeight:"fontWeightBold",m:1},t.createElement(Be.Z,null,t.createElement("strong",null,c))),t.createElement(de.Z,{className:p.arrow}))))}const nt=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(x,{to:a.href,variant:"contained"},a.name)},ot=class extends t.Component{constructor(a){super(a);this.state={error:void 0,errorInfo:void 0}}componentDidCatch(a,c){console.error(`ErrorBoundary, error: ${a}, info: ${c}`),this.setState({error:a,errorInfo:c})}render(){const{slackChannel:a,children:c}=this.props,{error:d}=this.state;return d?t.createElement(Zt,{title:"Something Went Wrong",error:d},t.createElement(nt,{slackChannel:a})):c}},$e=(0,s.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:{}}),{name:"BackstageInfoCard"}),Ge=(0,se.Z)(n=>({root:{display:"inline-block",padding:n.spacing(8,8,0,0),float:"right"}}),{name:"BackstageInfoCardCardActionsTopRight"})(N.Z),ft={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 mt(n){const{title:a,subheader:c,divider:d=!0,deepLink:p,slackChannel:R,errorBoundaryProps:I,variant:U,children:V,headerStyle:Z,headerProps:oe,action:ce,actionsClassName:Ae,actions:ve,cardClassName:Ie,actionsTopRight:pt,className:Gt,noPadding:cn,titleTypographyProps:en}=n,qe=$e();let zt={},Dt={};U&&U.split(/[\s]+/g).forEach(mn=>{zt={...zt,...ft.card[mn]},Dt={...Dt,...ft.cardContent[mn]}});const rn=I||(R?{slackChannel:R}:{});return t.createElement(w.Z,{style:zt,className:Gt},t.createElement(ot,{...rn},a&&t.createElement(te.Z,{classes:{root:qe.header,title:qe.headerTitle,subheader:qe.headerSubheader,avatar:qe.headerAvatar,action:qe.headerAction,content:qe.headerContent},title:a,subheader:c,action:ce,style:{...Z},titleTypographyProps:en,...oe}),pt&&t.createElement(Ge,null,pt),d&&t.createElement(sn.Z,null),t.createElement(H.Z,{className:ue()(Ie,{[qe.noPadding]:cn}),style:Dt},V),ve&&t.createElement(N.Z,{className:Ae},ve),p&&t.createElement(Ye,{...p})))}var wt=e(94137);const qt=(0,s.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},circle:{width:"80%",transform:"translate(10%, 0)"},colorUnknown:{}}),{name:"BackstageGauge"}),Vt={fractional:!0,inverse:!1,unit:"%",max:100},_t=({palette:n,value:a,inverse:c,max:d})=>{if(isNaN(a))return"#ddd";const p=d||Vt.max,R=c?p-a:a;return R<p/3?n.status.error:R<p*(2/3)?n.status.warning:n.status.ok};function Rn(n){const{getColor:a=_t}=n,c=qt(n),{palette:d}=useTheme(),{value:p,fractional:R,inverse:I,unit:U,max:V}={...Vt,...n},Z=R?Math.round(p*V):p,oe=V!==100?Math.round(p):Z;return React.createElement("div",{className:c.root},React.createElement(Circle,{strokeLinecap:"butt",percent:Z,strokeWidth:12,trailWidth:12,strokeColor:a({palette:d,value:oe,inverse:I,max:V}),className:c.circle}),React.createElement("div",{className:c.overlay},isNaN(p)?"N/A":`${oe}${U}`))}const Mt=(0,s.Z)({root:{height:"100%",width:250}},{name:"BackstageGaugeCard"});function Dn(n){const a=Mt(n),{title:c,subheader:d,progress:p,inverse:R,deepLink:I,variant:U,getColor:V}=n,Z={inverse:R,getColor:V,value:p};return React.createElement("div",{className:a.root},React.createElement(InfoCard,{title:c,subheader:d,deepLink:I,variant:U},React.createElement(Gauge,{...Z})))}function Sn(n){const{value:a,getColor:c=getProgressColor}=n,{palette:d}=useTheme();if(isNaN(a))return null;let p=Math.round(a*100*100)/100;p>100&&(p=100);const R=c({palette:d,value:p,inverse:!1,max:100});return React.createElement(Tooltip,{title:`${p}%`},React.createElement("span",null,React.createElement(Line,{percent:p,strokeWidth:4,trailWidth:4,strokeColor:R})))}var Ht=e(21324),Yt=e(7089),Un=e(1292),$n=e(42494),ta=e(74603),Mr=e(12231),na=e(73698),Nr=e(72379);const Ta=(0,s.Z)(()=>(0,u.Z)({icon:{position:"absolute",right:"4px",pointerEvents:"none"}}),{name:"BackstageClosedDropdown"});var ra=()=>{const n=Ta();return t.createElement(Nr.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 Ia=(0,s.Z)(()=>(0,u.Z)({icon:{position:"absolute",right:"4px",pointerEvents:"none"}}),{name:"BackstageOpenedDropdown"});var aa=()=>{const n=Ia();return t.createElement(Nr.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 oa=(0,se.Z)(n=>(0,u.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"})(ta.Z),sa=(0,s.Z)(n=>(0,u.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 Ur(n){const{multiple:a,items:c,label:d,placeholder:p,selected:R,onChange:I,triggerReset:U,native:V=!1,disabled:Z=!1}=n,oe=sa(),[ce,Ae]=(0,t.useState)(R||(a?[]:"")),[ve,Ie]=(0,t.useState)(!1);(0,t.useEffect)(()=>{Ae(a?[]:"")},[U,a]),(0,t.useEffect)(()=>{R!==void 0&&Ae(R)},[R]);const pt=qe=>{Ae(qe.target.value),I(qe.target.value)},Gt=qe=>{if(Z){qe.preventDefault();return}Ie(zt=>a&&!(qe.target instanceof HTMLElement)?!0:!zt)},cn=()=>{Ie(!1)},en=qe=>()=>{const zt=ce.filter(Dt=>Dt!==qe);Ae(zt),I(zt)};return t.createElement("div",{className:oe.root},t.createElement(Be.Z,{variant:"button"},d),t.createElement(Un.Z,{onClickAway:cn},t.createElement($n.Z,{className:oe.formControl},t.createElement(na.Z,{value:ce,native:V,disabled:Z,"data-testid":"select",displayEmpty:!0,multiple:a,onChange:pt,onClick:Gt,open:ve,input:t.createElement(oa,null),renderValue:qe=>{var zt;return a&&ce.length!==0?t.createElement("div",{className:oe.chips},qe.map(Dt=>{var rn,jn;return t.createElement(Yt.Z,{key:(rn=c.find(mn=>mn.value===Dt))==null?void 0:rn.value,label:(jn=c.find(mn=>mn.value===Dt))==null?void 0:jn.label,clickable:!0,onDelete:en(Dt),className:oe.chip})})):t.createElement(Be.Z,null,ce.length===0?p||"":(zt=c.find(Dt=>Dt.value===qe))==null?void 0:zt.label)},IconComponent:()=>ve?t.createElement(aa,null):t.createElement(ra,null),MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},getContentAnchorEl:null}},p&&!a&&t.createElement(Mr.Z,{value:[]},p),V?c&&c.map(qe=>t.createElement("option",{value:qe.value,key:qe.value},qe.label)):c&&c.map(qe=>t.createElement(Mr.Z,{key:qe.value,value:qe.value},a&&t.createElement(Ht.Z,{color:"primary",checked:ce.includes(qe.value)||!1,className:oe.checkbox}),qe.label))))))}const hr=()=>{},$r=t.createContext({stepperLength:0,stepIndex:0,setStepIndex:hr,stepHistory:[],setStepHistory:hr,onStepChange:hr});function Oa(n){const{children:a,elevated:c,onStepChange:d,activeStep:p=0}=n,[R,I]=useState(p),[U,V]=useState([0]);useEffect(()=>{I(p)},[p]);const Z=[];let oe;return Children.forEach(a,ce=>{isValidElement(ce)&&(ce.props.end?oe=ce:Z.push(ce))}),React.createElement(React.Fragment,null,React.createElement($r.Provider,{value:{stepIndex:R,setStepIndex:I,stepHistory:U,setStepHistory:V,onStepChange:d,stepperLength:Children.count(a)}},React.createElement(MuiStepper,{activeStep:R,orientation:"vertical",elevation:c?2:0},Z)),R>=Children.count(a)-1&&oe)}const ia=(0,s.Z)(n=>({root:{marginTop:n.spacing(3),"& button":{marginRight:n.spacing(1)}}}),{name:"BackstageSimpleStepperFooter"}),la=({text:n,handleClick:a})=>React.createElement(Button,{onClick:a},n||"Reset"),xa=({text:n,handleClick:a,disabled:c,last:d,stepIndex:p})=>React.createElement(Button,{variant:"contained",color:"primary",disabled:c,"data-testid":`nextButton-${p}`,onClick:a},n||(d?"Finish":"Next")),ca=({text:n,handleClick:a,disabled:c,stepIndex:d})=>React.createElement(Button,{onClick:a,"data-testid":`backButton-${d}`,disabled:c},n||"Back"),v=({actions:n={},children:a})=>{const c=ia(),{stepperLength:d,stepIndex:p,setStepIndex:R,stepHistory:I,setStepHistory:U,onStepChange:V}=useContext(VerticalStepperContext),Z=(ve,Ie)=>{Ie&&Ie(),V&&V(p,ve),R(ve)},oe=()=>{const ve=n.nextStep?n.nextStep(p,d-1):p+1;Z(ve,n.onNext),U([...I,ve])},ce=()=>{I.pop(),Z(I[I.length-1],n.onBack),U([...I])},Ae=()=>{Z(0,n.onRestart),U([0])};return React.createElement("div",{className:c.root},[void 0,!0].includes(n.showBack)&&p!==0&&React.createElement(ca,{text:n.backText,handleClick:ce,disabled:p===0,stepIndex:p}),[void 0,!0].includes(n.showNext)&&React.createElement(xa,{text:n.nextText,handleClick:oe,disabled:!!d&&p>=d||!!n.canNext&&!n.canNext(),stepIndex:p}),n.showRestart&&p!==0&&React.createElement(la,{text:n.restartText,handleClick:Ae,stepIndex:p}),a)},L=(0,s.Z)(n=>({end:{padding:n.spacing(3)}}),{name:"SimpleStepperStep"});function W(n){const{title:a,children:c,end:d,actions:p,...R}=n,I=L();return d?React.createElement("div",{className:I.end},React.createElement(Typography,{variant:"h6"},a),c,React.createElement(SimpleStepperFooter,{actions:{...p||{},showNext:!1}})):React.createElement(MuiStep,{...R},React.createElement(StepLabel,null,React.createElement(Typography,{variant:"h6"},a)),React.createElement(StepContent,null,c,React.createElement(SimpleStepperFooter,{actions:p})))}const re=(0,s.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 Ce(n){const a=re(n);return React.createElement("span",{className:classNames(a.status,a.ok),"aria-label":"Status ok","aria-hidden":"true",...n})}function Ze(n){const a=re(n);return React.createElement("span",{className:classNames(a.status,a.warning),"aria-label":"Status warning","aria-hidden":"true",...n})}function Pe(n){const a=re(n);return React.createElement("span",{className:classNames(a.status,a.error),"aria-label":"Status error","aria-hidden":"true",...n})}function Ke(n){const a=re(n);return React.createElement("span",{className:classNames(a.status,a.pending),"aria-label":"Status pending","aria-hidden":"true",...n})}function He(n){const a=re(n);return React.createElement("span",{className:classNames(a.status,a.running),"aria-label":"Status running","aria-hidden":"true",...n})}function ht(n){const a=re(n);return React.createElement("span",{className:classNames(a.status,a.aborted),"aria-label":"Status aborted","aria-hidden":"true",...n})}var xt=e(74600),Ct=e(15584);const Lt=n=>(0,u.Z)({root:{fontWeight:"bolder",whiteSpace:"nowrap",paddingRight:n.spacing(4),border:"0",verticalAlign:"top"}}),un={root:{border:"0",verticalAlign:"top"}},dn=n=>(0,u.Z)({root:{listStyle:"none",margin:n.spacing(0,0,-1,0),padding:"0"}}),Zn=n=>(0,u.Z)({root:{padding:n.spacing(0,0,1,0)},random:{}}),qn=(0,se.Z)(Lt,{name:"BackstageMetadataTableTitleCell"})(Ct.Z),Wn=(0,se.Z)(un,{name:"BackstageMetadataTableCell"})(Ct.Z),_n=({dense:n,children:a})=>React.createElement(Table,{size:n?"small":"medium"},React.createElement(TableBody,null,a)),ua=({title:n,children:a,...c})=>React.createElement(TableRow,null,n&&React.createElement(qn,null,n),React.createElement(Wn,{colSpan:n?1:2,...c},a)),Zr=(0,se.Z)(dn,{name:"BackstageMetadataTableList"})(({classes:n,children:a})=>t.createElement("ul",{className:n.root},a)),Hn=(0,se.Z)(Zn,{name:"BackstageMetadataTableListItem"})(({classes:n,children:a})=>t.createElement("li",{className:n.root},a)),Da=(0,u.Z)({root:{margin:"0 0",listStyleType:"none"}}),Ao=n=>(0,u.Z)({root:{...Da.root,paddingLeft:n.spacing(1)}}),ba=(0,se.Z)(Da,{name:"BackstageStructuredMetadataTableList"})(({classes:n,children:a})=>t.createElement(Zr,{classes:n},a)),Fa=(0,se.Z)(Ao,{name:"BackstageStructuredMetadataTableNestedList"})(({classes:n,children:a})=>t.createElement(Zr,{classes:n},a));function vo(n,a){const c=n.map((d,p)=>React.createElement(MetadataListItem,{key:p},da(d)));return a?React.createElement(Fa,null,c):React.createElement(ba,null,c)}function Ro(n,a,c){const d=Object.keys(n).map(p=>{const R=da(n[p],!0),I=c&&c.titleFormat?c.titleFormat(p):startCase(p);return React.createElement(MetadataListItem,{key:p},`${I}: `,R)});return a?React.createElement(Fa,null,d):React.createElement(ba,null,d)}function da(n,a,c){return React.isValidElement(n)?React.createElement(Fragment,null,n):typeof n=="object"&&!Array.isArray(n)?Ro(n,a,c):Array.isArray(n)?vo(n,c):typeof n=="boolean"?React.createElement(Fragment,null,n?"\u2705":"\u274C"):React.createElement(Fragment,null,n)}const So=({value:n,options:a})=>React.createElement(Fragment,null,da(n,a)),Co=({title:n,value:a,options:c})=>React.createElement(MetadataTableItem,{title:c&&c.titleFormat?c.titleFormat(n):startCase(n)},React.createElement(So,{value:a,options:c}));function To(n,a){return Object.keys(n).map(c=>React.createElement(Co,{key:c,title:c,value:n[c],options:a}))}function Ji(n){const{metadata:a,dense:c=!0,options:d}=n,p=To(a,d||{});return React.createElement(MetadataTable,{dense:c},p)}var Po=e(49429),Io=e(86136),Ba=e(79784),er=e(76635),Lo=e(19126),wr=e.n(Lo),Oo=e(48760);function xo(n){return wr().stringify(n,{strictNullHandling:!0})}function Ma(n){return wr().parse(n,{ignoreQueryPrefix:!0,strictNullHandling:!0})}function Na(n,a){return Ma(n)[a]}function Do(n,a,c){const d={...Ma(n),[a]:c};return xo(d)}function bo(n,a=250){const[c,d]=(0,i.lr)(),p=c.toString(),[R,I]=(0,t.useState)(Na(p,n));return(0,t.useEffect)(()=>{const U=Na(p,n);I(V=>(0,er.isEqual)(U,V)?V:U)},[p,I,n]),(0,Oo.Z)(()=>{const U=Do(p,n,R);p!==U&&d(U,{replace:!0})},a,[d,R,p,n]),[R,I]}const Fo={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 Ua(){const a=(0,l.useApi)(l.configApiRef).getOptionalConfig("app.support");return a?{url:a.getString("url"),items:a.getConfigArray("items").flatMap(c=>{var d;return{title:c.getString("title"),icon:c.getOptionalString("icon"),links:((d=c.getOptionalConfigArray("links"))!=null?d:[]).flatMap(p=>({url:p.getString("url"),title:p.getString("title")}))}})}:Fo}var Bo=e(80079);function Cn(n,a){const d=(0,l.useApp)().getSystemIcon(n);return d?t.createElement(d,{...a}):t.createElement(Bo.Z,{...a})}function Yi(n){return Cn("brokenImage",n)}function Qi(n){return Cn("catalog",n)}function Xi(n){return Cn("chat",n)}function ki(n){return Cn("dashboard",n)}function qi(n){return Cn("docs",n)}function _i(n){return Cn("email",n)}function el(n){return Cn("github",n)}function tl(n){return Cn("group",n)}function zr(n){return Cn("help",n)}function nl(n){return Cn("user",n)}function rl(n){return Cn("warning",n)}const Mo=(0,s.Z)({popoverList:{minWidth:260,maxWidth:400}},{name:"BackstageSupportButton"}),No=({icon:n})=>{var d;const a=(0,l.useApp)(),c=n&&(d=a.getSystemIcon(n))!=null?d:zr;return t.createElement(c,null)},Uo=({link:n})=>{var a;return t.createElement(T,{to:n.url},(a=n.title)!=null?a:n.url)},$o=({item:n})=>{var a;return t.createElement(Le.Z,null,t.createElement(Io.Z,null,t.createElement(No,{icon:n.icon})),t.createElement(tt.Z,{primary:n.title,secondary:(a=n.links)==null?void 0:a.reduce((c,d,p)=>[...c,p>0&&t.createElement("br",{key:p}),t.createElement(Uo,{link:d,key:d.url})],[])}))};function Zo(n){const{title:a,children:c}=n,{items:d}=Ua(),[p,R]=(0,t.useState)(!1),[I,U]=(0,t.useState)(null),V=Mo(),Z=(0,Oe.Z)(Ae=>Ae.breakpoints.down("sm")),oe=Ae=>{U(Ae.currentTarget),R(!0)},ce=()=>{R(!1)};return t.createElement(t.Fragment,null,t.createElement(ae.Z,{display:"flex",ml:1},Z?t.createElement(M.Z,{color:"primary",size:"small",onClick:oe,"data-testid":"support-button"},t.createElement(zr,null)):t.createElement(h.Z,{"data-testid":"support-button",color:"primary",onClick:oe,startIcon:t.createElement(zr,null)},"Support")),t.createElement(Ba.ZP,{"data-testid":"support-button-popover",open:p,anchorEl:I,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},onClose:ce},t.createElement(he.Z,{className:V.popoverList},a&&t.createElement(Le.Z,{alignItems:"flex-start"},t.createElement(Be.Z,{variant:"subtitle1"},a)),t.Children.map(c,(Ae,ve)=>t.createElement(Le.Z,{alignItems:"flex-start",key:`child-${ve}`},Ae)),d&&d.map((Ae,ve)=>t.createElement($o,{item:Ae,key:`item-${ve}`}))),t.createElement(Po.Z,null,t.createElement(h.Z,{color:"primary",onClick:ce},"Close"))))}var fa=e(18671),En=e(10289);const Wr=72,$a=24,Za=18,Qt={drawerWidthClosed:Wr,drawerWidthOpen:224,defaultOpenDelayMs:100,defaultCloseDelayMs:0,defaultFadeDuration:200,logoHeight:32,iconContainerWidth:Wr,iconSize:Wr-$a*2,iconPadding:$a,selectedIndicatorWidth:3,userBadgePadding:Za,userBadgeDiameter:Wr-Za*2,mobileSidebarHeight:56},ma={drawerWidthClosed:0,drawerWidthOpen:202,defaultOpenDelayMs:Qt.defaultOpenDelayMs+200},al="@backstage/core/sidebar-intro-dismissed",gr=(0,t.createContext)({isOpen:!1,setOpen:()=>{}}),wa=(0,t.createContext)({isHoveredOn:!1,setIsHoveredOn:()=>{}});var Hr;(function(n){const a="sidebarPinState";n.SIDEBAR_PIN_STATE=a})(Hr||(Hr={}));const za={getSidebarPinState(){let n;try{n=JSON.parse(window.localStorage.getItem(Hr.SIDEBAR_PIN_STATE)||"true")}catch{return!0}return!!n},setSidebarPinState(n){return window.localStorage.setItem(Hr.SIDEBAR_PIN_STATE,JSON.stringify(n))}},wo=(0,s.Z)(n=>({root:{width:"100%",transition:"padding-left 0.1s ease-out",isolation:"isolate",[n.breakpoints.up("sm")]:{paddingLeft:({isPinned:a})=>a?Qt.drawerWidthOpen:Qt.drawerWidthClosed},[n.breakpoints.down("xs")]:{paddingBottom:Qt.mobileSidebarHeight}},content:{zIndex:0,isolation:"isolate","&:focus":{outline:0}}}),{name:"BackstageSidebarPage"}),pr=(0,t.createContext)({isPinned:!0,toggleSidebarPinState:()=>{},isMobile:!1}),Wa=(0,t.createContext)({content:{contentRef:void 0}});function zo(n){const[a,c]=(0,t.useState)(()=>za.getSidebarPinState()),d=(0,t.useRef)(null),p=(0,t.useMemo)(()=>({content:{contentRef:d}}),[d]);(0,t.useEffect)(()=>{za.setSidebarPinState(a)},[a]);const R=(0,Oe.Z)(V=>V.breakpoints.down("xs"),{noSsr:!0}),I=()=>c(!a),U=wo({isPinned:a});return t.createElement(pr.Provider,{value:{isPinned:a,toggleSidebarPinState:I,isMobile:R}},t.createElement(Wa.Provider,{value:p},t.createElement("div",{className:U.root},n.children)))}function ha(){const{content:n}=(0,t.useContext)(Wa);return{focusContent:(0,t.useCallback)(()=>{var c,d;(d=(c=n==null?void 0:n.contentRef)==null?void 0:c.current)==null||d.focus()},[n]),contentRef:n==null?void 0:n.contentRef}}var Wo=e(50023),Ho=e(4190),jo=e(87685),Vo=e(44882),Go=e(57998);const Ko=(0,s.Z)(n=>({root:{flexGrow:0,margin:n.spacing(0,2),color:n.palette.navigation.color},selected:{color:`${n.palette.navigation.selectedColor}!important`,borderTop:`solid ${Qt.selectedIndicatorWidth}px ${n.palette.navigation.indicator}`,marginTop:"-1px"},label:{display:"none"}})),Jo=n=>{const{to:a,label:c,icon:d,value:p}=n,R=Ko(),I=(0,En.TH)(),{selectedMenuItemIndex:U,setSelectedMenuItemIndex:V}=(0,t.useContext)(Va),Z=(ce,Ae)=>{V(Ae===U?-1:Ae)},oe=p===U&&U>=0||p!==U&&!(U>=0)&&a===I.pathname;return t.createElement(Go.Z,{label:c,icon:d,component:T,to:a||I.pathname,onChange:Z,value:p,selected:oe,classes:R})},Ha=n=>{const{children:a,to:c,label:d,icon:p,value:R}=n,{isMobile:I}=(0,t.useContext)(pr);return I?t.createElement(Jo,{to:c,label:d,icon:p,value:R}):t.createElement(t.Fragment,null,a)},ja=(0,s.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:`${Qt.mobileSidebarHeight}px`,height:`calc(100% - ${Qt.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}})),Yo=n=>(0,er.orderBy)(n,({props:{priority:a}})=>Number.isInteger(a)?a:-1,"desc"),Qo=({children:n,label:a="Menu",open:c,onClose:d})=>{const p=ja();return t.createElement(Ho.ZP,{anchor:"bottom",open:c,onClose:d,classes:{paperAnchorBottom:p.overlay}},t.createElement(ae.Z,{className:p.overlayHeader},t.createElement(Be.Z,{variant:"h3"},a),t.createElement(M.Z,{onClick:d,classes:{root:p.overlayHeaderClose}},t.createElement(jo.Z,null))),t.createElement(ae.Z,null,n))},Va=(0,t.createContext)({selectedMenuItemIndex:-1,setSelectedMenuItemIndex:()=>{}}),Xo=n=>{const{children:a}=n,c=ja(),d=(0,En.TH)(),[p,R]=(0,t.useState)(-1);(0,t.useEffect)(()=>{R(-1)},[d.pathname]);let I=(0,l.useElementFilter)(a,V=>V.getElements().filter(Z=>Z.type===Ha));if(a)I.length?I=Yo(I):I.push(t.createElement(Ha,{key:"default_menu",icon:t.createElement(Vo.Z,null)},a));else return null;const U=p>=0&&!I[p].props.to;return t.createElement(gr.Provider,{value:{isOpen:!0,setOpen:()=>{}}},t.createElement(Va.Provider,{value:{selectedMenuItemIndex:p,setSelectedMenuItemIndex:R}},t.createElement(Qo,{label:I[p]&&I[p].props.label,open:U,onClose:()=>R(-1)},I[p]&&I[p].props.children),t.createElement(Wo.Z,{className:c.root,"data-testid":"mobile-sidebar-root"},I)))},Ga=(0,s.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:Qt.drawerWidthClosed,transition:n.transitions.create("width",{easing:n.transitions.easing.sharp,duration:n.transitions.duration.shortest}),"& > *":{flexShrink:0},"&::-webkit-scrollbar":{display:"none"}},drawerOpen:{width:Qt.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 fn;(function(n){const a=0;n[n.Closed=a]="Closed";const c=a+1;n[n.Idle=c]="Idle";const d=c+1;n[n.Open=d]="Open"})(fn||(fn={}));const ko=n=>{const{openDelayMs:a=Qt.defaultOpenDelayMs,closeDelayMs:c=Qt.defaultCloseDelayMs,disableExpandOnHover:d,children:p}=n,R=Ga(),I=(0,Oe.Z)(Gt=>Gt.breakpoints.down("md"),{noSsr:!0}),[U,V]=(0,t.useState)(fn.Closed),Z=(0,t.useRef)(),{isPinned:oe,toggleSidebarPinState:ce}=(0,t.useContext)(pr),Ae=()=>{oe||d||(Z.current&&(clearTimeout(Z.current),Z.current=void 0),U!==fn.Open&&!I&&(Z.current=window.setTimeout(()=>{Z.current=void 0,V(fn.Open)},a),V(fn.Idle)))},ve=()=>{oe||d||(Z.current&&(clearTimeout(Z.current),Z.current=void 0),U===fn.Idle?V(fn.Closed):U===fn.Open&&(Z.current=window.setTimeout(()=>{Z.current=void 0,V(fn.Closed)},c)))},Ie=U===fn.Open&&!I||oe,pt=Gt=>{Gt?(V(fn.Open),ce()):(V(fn.Closed),ce())};return t.createElement("div",{style:{}},t.createElement(_o,null),t.createElement(gr.Provider,{value:{isOpen:Ie,setOpen:pt}},t.createElement("div",{className:R.root,"data-testid":"sidebar-root",onMouseEnter:d?()=>{}:Ae,onFocus:d?()=>{}:Ka(Ae),onMouseLeave:d?()=>{}:ve,onBlur:d?()=>{}:Ka(ve)},t.createElement("div",{className:ue()(R.drawer,{[R.drawerOpen]:Ie})},p))))},qo=n=>{const{children:a,openDelayMs:c,closeDelayMs:d,disableExpandOnHover:p}=n,{isMobile:R}=(0,t.useContext)(pr);return R?t.createElement(Xo,null,a):t.createElement(ko,{openDelayMs:c,closeDelayMs:d,disableExpandOnHover:p},a)};function _o(){const{focusContent:n,contentRef:a}=ha(),c=Ga();return(a==null?void 0:a.current)?t.createElement(h.Z,{onClick:n,variant:"contained",className:ue()(c.visuallyHidden)},"Skip to content"):null}function Ka(n){return a=>{const c=a==null?void 0:a.currentTarget;(c==null?void 0:c.contains(a.relatedTarget))||n(a)}}function Ja(n,a){const c=new URLSearchParams(a.search).toString(),d=wr().parse(c),p=new URLSearchParams(n.search).toString(),R=wr().parse(p);return(0,er.isEqual)(a.pathname,n.pathname)&&(0,er.isMatch)(R,d)}const es=(0,s.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"}})),ol=n=>{const{title:a,to:c,icon:d,dropdownItems:p}=n,R=es(),{setIsHoveredOn:I}=useContext(SidebarItemWithSubmenuContext),U=()=>{I(!1)},V=useResolvedPath(c),Z=useLocation();let oe=isLocationMatch(Z,V);const[ce,Ae]=useState(!1),ve=()=>{Ae(!ce)};return p!==void 0?(p.some(Ie=>{const pt=resolvePath(Ie.to);return oe=isLocationMatch(Z,pt),oe}),React.createElement("div",{className:R.itemContainer},React.createElement("button",{onClick:ve,onTouchStart:Ie=>Ie.stopPropagation(),className:classnames(R.item,oe?R.selected:void 0)},React.createElement(d,{fontSize:"small"}),React.createElement(Typography,{variant:"subtitle1",className:R.label},a),ce?React.createElement(ArrowDropUpIcon,{className:R.dropdownArrow}):React.createElement(ArrowDropDownIcon,{className:R.dropdownArrow})),p&&ce&&React.createElement("div",{className:R.dropdown},p.map((Ie,pt)=>React.createElement(Link,{component:NavLink,to:Ie.to,underline:"none",className:R.dropdownItem,onClick:U,onTouchStart:Gt=>Gt.stopPropagation(),key:pt},React.createElement(Typography,{className:R.textContent},Ie.title)))))):React.createElement("div",{className:R.itemContainer},React.createElement(Link,{component:NavLink,to:c,underline:"none",className:classnames(R.item,oe?R.selected:void 0),onClick:U,onTouchStart:Ie=>Ie.stopPropagation()},React.createElement(d,{fontSize:"small"}),React.createElement(Typography,{variant:"subtitle1",className:R.label},a)))},ts=n=>(0,s.Z)(a=>{var c,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=(c=a.palette.navigation.submenu)==null?void 0:c.background)!=null?d:"#404040",overflowX:"hidden",msOverflowStyle:"none",scrollbarWidth:"none",cursor:"default",width:ma.drawerWidthClosed,transitionDelay:`${ma.defaultOpenDelayMs}ms`,"& > *":{flexShrink:0},"&::-webkit-scrollbar":{display:"none"}},drawerOpen:{width:ma.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"}}}}),ns=n=>{const{isOpen:a}=(0,t.useContext)(gr),c=a?Qt.drawerWidthOpen:Qt.drawerWidthClosed,d=ts({left:c})(),{isHoveredOn:p}=(0,t.useContext)(wa),[R,I]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{I(p)},[p]),t.createElement("div",{className:ue()(d.drawer,{[d.drawerOpen]:R})},t.createElement(Be.Z,{variant:"h5",className:d.title},n.title),n.children)};var jr=e(76600),rs=e(26739),as=e(98989),os=e(59797),ss=e(83543);const is=(0,s.Z)({iconContainer:{display:"flex",position:"relative",width:"100%"},arrow1:{right:"6px",position:"absolute"}}),sl=()=>{const n=is();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 il=null;const ls=(0,s.Z)({iconContainer:{display:"flex",position:"relative",width:"100%"},arrow1:{right:"6px",position:"absolute"}}),ll=()=>{const n=ls();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 cl=null;const Vr=(0,s.Z)(n=>{var R,I,U,V;const{selectedIndicatorWidth:a,drawerWidthClosed:c,drawerWidthOpen:d,iconContainerWidth:p}=Qt;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:c,justifyContent:"center"},open:{[n.breakpoints.up("sm")]:{width:d}},highlightable:{"&:hover":{background:(I=(R=n.palette.navigation.navItem)==null?void 0:R.hoverBackground)!=null?I:"#404040"}},highlighted:{background:(V=(U=n.palette.navigation.navItem)==null?void 0:U.hoverBackground)!=null?V:"#404040"},label:{fontWeight:"bold",whiteSpace:"nowrap",lineHeight:"auto",flex:"3 1 auto",width:"110px",overflow:"hidden","text-overflow":"ellipsis"},iconContainer:{boxSizing:"border-box",height:"100%",width:p,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-p},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:c},"& $closedItemIcon":{paddingRight:a},"& $iconContainer":{marginLeft:-a}}}},{name:"BackstageSidebarItem"}),cs=(n,a)=>(0,l.useElementFilter)(n.props.children,c=>{let d=!1;return c.getElements().forEach(({props:{to:p,dropdownItems:R}})=>{if(!d){if(R==null?void 0:R.length){R.forEach(({to:I})=>d=d||Ja(a,(0,En.i3)(I)));return}p&&(d=Ja(a,(0,En.i3)(p)))}}),d},[a.pathname]);function Ya(n){return n.to===void 0}const us=t.forwardRef(function({to:a,end:c,style:d,className:p,activeStyle:R,caseSensitive:I,activeClassName:U="active","aria-current":V="page",...Z},oe){let{pathname:ce}=(0,En.TH)(),{pathname:Ae}=(0,En.WU)(a);I||(ce=ce.toLocaleLowerCase("en-US"),Ae=Ae.toLocaleLowerCase("en-US"));let ve=ce===Ae;!ve&&!c&&(ve=ce.startsWith(`${Ae}/`));const Ie=ve?V:void 0;return t.createElement(i.rU,{...Z,to:a,ref:oe,"aria-current":Ie,style:{...d,...ve?R:void 0},className:ue()([p,ve?U:void 0])})}),Qa=(0,t.forwardRef)((n,a)=>{const{icon:c,text:d,hasNotifications:p=!1,disableHighlight:R=!1,onClick:I,children:U,className:V,...Z}=n,oe=Vr(),{isOpen:ce}=(0,t.useContext)(gr),Ae=t.createElement(rs.Z,{color:"secondary",variant:"dot",overlap:"circular",invisible:!p,className:ue()({[oe.closedItemIcon]:!ce})},t.createElement(c,{fontSize:"small"})),ve=t.createElement(t.Fragment,null,t.createElement("div",{"data-testid":"login-button",className:oe.iconContainer},Ae),d&&t.createElement(Be.Z,{variant:"subtitle2",className:oe.label},d),t.createElement("div",{className:oe.secondaryAction},U)),Ie=ce?ve:Ae,pt={onClick:I,className:ue()(V,oe.root,ce?oe.open:oe.closed,Ya(n)&&oe.buttonItem,{[oe.highlightable]:!R})};return Ya(n)?t.createElement("button",{"aria-label":d,...pt,ref:a},Ie):t.createElement(us,{...pt,activeClassName:oe.selected,to:n.to?n.to:"",ref:a,"aria-label":d||n.to,...Z},Ie)}),ds=({children:n,...a})=>{const c=Vr(),[d,p]=(0,t.useState)(!1),R=(0,En.TH)(),I=cs(n,R),U=(0,Oe.Z)(ce=>ce.breakpoints.down("sm")),V=()=>{p(!0)},Z=()=>{p(!1)},oe=()=>U?d?t.createElement(os.Z,{fontSize:"small",className:c.submenuArrow}):t.createElement(ss.Z,{fontSize:"small",className:c.submenuArrow}):!d&&t.createElement(as.Z,{fontSize:"small",className:c.submenuArrow});return t.createElement(wa.Provider,{value:{isHoveredOn:d,setIsHoveredOn:p}},t.createElement("div",{"data-testid":"item-with-submenu",onMouseLeave:Z,onTouchStart:d?Z:V,onMouseEnter:V,className:ue()(d&&c.highlighted)},t.createElement(Qa,{className:I?c.selected:"",...a},oe()),d&&n))},Xa=(0,t.forwardRef)((n,a)=>{const[c]=(0,l.useElementFilter)(n.children,d=>d.getElements().filter(p=>p.type===ns));return c?t.createElement(ds,{...n},c):t.createElement(Qa,{...n,ref:a})});function ul(n){const[a,c]=useState(""),d=Vr(),p=n.icon?n.icon:SearchIcon,R=()=>{n.onSearch(a),c("")},I=oe=>{oe.key==="Enter"&&(oe.preventDefault(),R())},U=oe=>{c(oe.target.value)},V=oe=>{oe.preventDefault(),oe.stopPropagation()},Z=oe=>{R(),oe.preventDefault()};return React.createElement("div",{className:d.searchRoot},React.createElement(Xa,{icon:p,to:n.to,onClick:Z,disableHighlight:!0},React.createElement(TextField,{placeholder:"Search",value:a,onClick:V,onChange:U,onKeyDown:I,className:d.searchContainer,InputProps:{disableUnderline:!0,className:d.searchField},inputProps:{className:d.searchFieldHTMLInput}})))}const dl=(0,jr.Z)("div")({flex:1},{name:"BackstageSidebarSpace"}),fl=(0,jr.Z)("div")({height:8},{name:"BackstageSidebarSpacer"}),fs=(0,jr.Z)("hr")({height:1,width:"100%",background:"#383838",border:"none",margin:"12px 0px"},{name:"BackstageSidebarDivider"}),ms=n=>({overflowY:"auto","&::-webkit-scrollbar":{backgroundColor:n.palette.background.default,width:"5px",borderRadius:"5px"},"&::-webkit-scrollbar-thumb":{backgroundColor:n.palette.text.hint,borderRadius:"5px"}}),ml=(0,jr.Z)("div")(({theme:n})=>{const a=ms(n);return{flex:"0 1 auto",overflowX:"hidden",width:"calc(100% - 5px)",minHeight:"48px",overflowY:"hidden","@media (hover: none)":a,"&:hover":a}}),hl=()=>{const n=Vr(),{isOpen:a,setOpen:c}=useContext(SidebarContext);if(useMediaQuery(R=>R.breakpoints.down("md"),{noSsr:!0}))return null;const p=()=>{c(!a)};return React.createElement("button",{onClick:p,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)))},hs=(0,s.Z)(n=>({introCard:{color:"#b5b5b5",fontSize:12,width:Qt.drawerWidthOpen,marginTop:18,marginBottom:12,paddingLeft:Qt.iconPadding,paddingRight:Qt.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 gs(n){const a=hs(),{text:c,onClose:d}=n,p=()=>d();return React.createElement("div",{className:a.introCard},React.createElement(Typography,{variant:"subtitle2"},c),React.createElement("div",{className:a.introDismiss},React.createElement(Link,{component:"button",onClick:p,underline:"none",className:a.introDismissLink},React.createElement(CloseIcon,{className:a.introDismissIcon}),React.createElement(Typography,{component:"span",className:a.introDismissText},"Dismiss"))))}const ka=n=>{const{text:a,onDismiss:c}=n,[d,p]=useState(!1),R=()=>{p(!0)};return React.createElement(Collapse,{in:!d,onExited:c},React.createElement(gs,{text:a,onClose:R}))},ps=null,ys="And your recently viewed plugins will pop up here!";function gl(n){const{isOpen:a}=useContext(SidebarContext),c={starredItemsDismissed:!1,recentlyViewedItemsDismissed:!1},[d,p]=useLocalStorage(SIDEBAR_INTRO_LOCAL_STORAGE),{starredItemsDismissed:R,recentlyViewedItemsDismissed:I}=d!=null?d:{},U=()=>{p(Z=>({...c,...Z,starredItemsDismissed:!0}))},V=()=>{p(Z=>({...c,...Z,recentlyViewedItemsDismissed:!0}))};return a?React.createElement(React.Fragment,null,!R&&React.createElement(React.Fragment,null,React.createElement(ka,{text:ps,onDismiss:U}),React.createElement(SidebarDivider,null)),!I&&React.createElement(ka,{text:ys,onDismiss:V})):null}const Es=(0,s.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 qa(n){const{className:a,stretch:c,noPadding:d,children:p,...R}=n,{contentRef:I}=ha(),U=Es();return t.createElement("article",{ref:I,tabIndex:-1,...R,className:ue()(U.root,a,{[U.stretch]:c,[U.noPadding]:d})},p)}var As=e(6487),vs=e(99152);const Rs=(0,s.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 _a(n){const{tabs:a,onChange:c,selectedIndex:d}=n,[p,R]=(0,t.useState)(d!=null?d:0),I=Rs(),U=(V,Z)=>{d===void 0&&R(Z),c&&c(Z)};return(0,t.useEffect)(()=>{d!==void 0&&R(d)},[d]),t.createElement("div",{className:I.tabsWrapper},t.createElement(vs.Z,{selectionFollowsFocus:!0,indicatorColor:"primary",textColor:"inherit",variant:"scrollable",scrollButtons:"auto","aria-label":"scrollable auto tabs example",onChange:U,value:p},a.map((V,Z)=>t.createElement(As.Z,{...V.tabProps,"data-testid":`header-tab-${Z}`,label:V.label,key:V.id,value:Z,className:I.defaultTab,classes:{selected:I.selected,root:I.tabRoot}}))))}function Ss(n){var U,V,Z;const a=(0,En.UO)(),d=n.map(({path:oe,children:ce})=>({caseSensitive:!1,path:`${oe}/*`,element:ce})).sort((oe,ce)=>ce.path.replace(/\/\*$/,"").localeCompare(oe.path.replace(/\/\*$/,""))),p=(U=(0,En.V$)(d))!=null?U:n[0].children,[R]=(V=(0,En.fp)(d,`/${a["*"]}`))!=null?V:[],I=R?n.findIndex(oe=>`${oe.path}/*`===R.route.path):0;return{index:I===-1?0:I,element:p,route:(Z=n[I])!=null?Z:n[0]}}function eo(n){const{routes:a}=n,c=(0,En.s0)(),{index:d,route:p,element:R}=Ss(a),I=(0,t.useMemo)(()=>a.map(V=>({id:V.path,label:V.title,tabProps:V.tabProps})),[a]),U=V=>c(a[V].path.replace(/\/\*$/,"").replace(/^\//,""));return t.createElement(t.Fragment,null,t.createElement(_a,{tabs:I,selectedIndex:d,onChange:U}),t.createElement(qa,null,t.createElement(fa.q,{title:p.title}),R))}const ga=()=>null;(0,l.attachComponentData)(ga,"core.gatherMountPoints",!0);function to(n){const a=t.createElement(ga,{path:"",title:""},t.createElement("div",null)).type;return t.Children.toArray(n).flatMap(c=>{if(!(0,t.isValidElement)(c))return[];if(c.type===t.Fragment)return to(c.props.children);if(c.type!==a)throw new Error("Child of TabbedLayout must be an TabbedLayout.Route");const{path:d,title:p,children:R,tabProps:I}=c.props;return[{path:d,title:p,children:R,tabProps:I}]})}function Cs(n){const a=to(n.children);return t.createElement(eo,{routes:a})}Cs.Route=ga;const Ts=(0,s.Z)(n=>({value:{marginBottom:"6px"},subvalue:{color:n.palette.textSubtle,fontWeight:"normal"}}),{name:"BackstageSubvalueCell"});function Ps(n){const{value:a,subvalue:c}=n,d=Ts();return t.createElement(t.Fragment,null,t.createElement("div",{className:d.value},a),t.createElement("div",{className:d.subvalue},c))}var Is=e(21070),Ls=e(90324),Os=e(98281),xs=e(48049),no=e(51209),ro=e(33375),Ds=e(44233),bs=e(27604),pa=e(36444),Fs=e(37971),Bs=e(59709),Ms=e(17373),Ns=e(3702),Us=e(93111),Gr=e(67222);const $s=(0,s.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"}),Zs=n=>{var V;const a=$s(),{onChangeFilters:c}=n,[d,p]=(0,t.useState)({...n.selectedFilters}),[R,I]=(0,t.useState)(!1),U=()=>{p({}),I(Z=>!Z)};return(0,t.useEffect)(()=>{c(d)},[d,c]),t.createElement("div",{className:a.root},t.createElement("div",{className:a.header},t.createElement("div",{className:a.value},"Filters"),t.createElement(h.Z,{color:"primary",onClick:U},"Clear all")),t.createElement("div",{className:a.filters},((V=n.filters)==null?void 0:V.length)&&n.filters.map(Z=>t.createElement(Ur,{triggerReset:R,key:Z.element.label,...Z.element,selected:d[Z.element.label],onChange:oe=>p({...d,[Z.element.label]:oe})}))))},ws={Add:(0,t.forwardRef)((n,a)=>t.createElement(Is.Z,{...n,ref:a})),Check:(0,t.forwardRef)((n,a)=>t.createElement(Os.Z,{...n,ref:a})),Clear:(0,t.forwardRef)((n,a)=>t.createElement(ro.Z,{...n,ref:a})),Delete:(0,t.forwardRef)((n,a)=>t.createElement(Ds.Z,{...n,ref:a})),DetailPanel:(0,t.forwardRef)((n,a)=>t.createElement(no.Z,{...n,ref:a})),Edit:(0,t.forwardRef)((n,a)=>t.createElement(bs.Z,{...n,ref:a})),Export:(0,t.forwardRef)((n,a)=>t.createElement(Ns.Z,{...n,ref:a})),Filter:(0,t.forwardRef)((n,a)=>t.createElement(pa.Z,{...n,ref:a})),FirstPage:(0,t.forwardRef)((n,a)=>t.createElement(Fs.Z,{...n,ref:a})),LastPage:(0,t.forwardRef)((n,a)=>t.createElement(Bs.Z,{...n,ref:a})),NextPage:(0,t.forwardRef)((n,a)=>t.createElement(no.Z,{...n,ref:a})),PreviousPage:(0,t.forwardRef)((n,a)=>t.createElement(xs.Z,{...n,ref:a})),ResetSearch:(0,t.forwardRef)((n,a)=>t.createElement(ro.Z,{...n,ref:a})),Search:(0,t.forwardRef)((n,a)=>t.createElement(pa.Z,{...n,ref:a})),SortArrow:(0,t.forwardRef)((n,a)=>t.createElement(Ls.Z,{...n,ref:a})),ThirdStateCheck:(0,t.forwardRef)((n,a)=>t.createElement(Ms.Z,{...n,ref:a})),ViewColumn:(0,t.forwardRef)((n,a)=>t.createElement(Us.Z,{...n,ref:a}))};function ao(n,a){const c=a.split(".");let d=n[c[0]];for(let p=1;p<c.length;++p){if(d===void 0)return d;const R=c[p];d=d[R]}return d}const zs=(0,se.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"})(Gr.W$),oo=(0,se.Z)(n=>({root:{padding:n.spacing(3,0,2.5,2.5)},title:{"& > h6":{fontWeight:"bold"}},searchField:{paddingRight:n.spacing(2)}}),{name:"BackstageTableToolbar"})(Gr.UW),Ws=(0,s.Z)(()=>({root:{display:"flex",alignItems:"center",justifyContent:"space-between"},title:{fontWeight:"bold",fontSize:18,whiteSpace:"nowrap"}}),{name:"BackstageTableFiltersContainer"}),Hs=(0,s.Z)(()=>({root:{display:"flex",alignItems:"start"}}),{name:"BackstageTable"});function js(n,a){return n.map(c=>{const d={};let p=c.cellStyle||{};if(c.highlight)if(d.color=a.palette.textContrast,typeof p=="object")p.fontWeight=a.typography.fontWeightBold;else{const R=p;p=(I,U,V)=>({...R(I,U,V),fontWeight:a.typography.fontWeightBold})}return{...c,headerStyle:d,cellStyle:p}})}function Vs(n,a){return(0,er.transform)(n,(c,d,p)=>{(0,er.isEqual)(d,a[p])||(c[p]=d)})}const so={search:"",filtersOpen:!1,filters:{}};function Gs(n){const{toolbarRef:a,setSearch:c,hasFilters:d,selectedFiltersLength:p,toggleFilters:R}=n,I=Ws(),U=(0,t.useCallback)(V=>{n.onSearchChanged(V),c(V)},[n,c]);return d?t.createElement("div",{className:I.root},t.createElement("div",{className:I.root},t.createElement(M.Z,{onClick:R,"aria-label":"filter list"},t.createElement(pa.Z,null)),t.createElement(Be.Z,{className:I.title},"Filters (",p,")")),t.createElement(oo,{...n,ref:a,onSearchChanged:U})):t.createElement(oo,{...n,ref:a,onSearchChanged:U})}function Ks(n){const{data:a,columns:c,options:d,title:p,subtitle:R,filters:I,initialState:U,emptyContent:V,onStateChange:Z,...oe}=n,ce=Hs(),Ae=(0,b.Z)(),ve={...so,...U},[Ie,pt]=(0,t.useState)(ve.filtersOpen),Gt=(0,t.useCallback)(()=>pt(tn=>!tn),[pt]),[cn,en]=(0,t.useState)(0),[qe,zt]=(0,t.useState)(a),[Dt,rn]=(0,t.useState)(ve.filters),jn=js(c,Ae),[mn,Jr]=(0,t.useState)(ve.search);(0,t.useEffect)(()=>{if(Z){const tn=Vs({search:mn,filtersOpen:Ie,filters:Dt},so);Z(tn)}},[mn,Ie,Dt,Z]);const Ft={headerStyle:{textTransform:"uppercase"}},wn=(0,t.useCallback)(tn=>{var hn;return(hn=c.find(An=>An.title===tn))==null?void 0:hn.field},[c]);(0,t.useEffect)(()=>{if(typeof a=="function")return;if(!Dt){zt(a);return}const tn=Object.values(Dt);if(a&&tn.flat().length){const hn=a.filter(An=>!!Object.entries(Dt).filter(([,Gn])=>!!Gn.length).every(([Gn,Xt])=>{const kt=ao(An,wn(Gn));return Array.isArray(kt)&&Array.isArray(Xt)?kt.some(tr=>Xt.includes(tr)):Array.isArray(kt)?kt.includes(Xt):Array.isArray(Xt)?Xt.includes(kt):kt===Xt}));zt(hn)}else zt(a);en(tn.flat().length)},[a,Dt,wn]);const Ra=(tn,hn)=>{const An=Xt=>{const kt=new Set,tr=Kn=>{Kn!=null&&kt.add(Kn)};return hn&&hn.forEach(Kn=>{const nr=ao(Kn,wn(Xt));Array.isArray(nr)?nr.forEach(tr):tr(nr)}),kt},Gn=Xt=>({placeholder:"All results",label:Xt.column,multiple:Xt.type==="multiple-select",items:[...An(Xt.column)].sort().map(kt=>({label:kt,value:kt}))});return tn.map(Xt=>({type:Xt.type,element:Gn(Xt)}))},Vn=!!(I==null?void 0:I.length),Sa=(0,t.useCallback)(tn=>t.createElement(Gs,{setSearch:Jr,hasFilters:Vn,selectedFiltersLength:cn,toggleFilters:Gt,...tn}),[Gt,Vn,cn,Jr]),Yr=typeof a!="function"&&a.length===0,Qr=c.length,Ca=(0,t.useCallback)(tn=>V&&Yr?t.createElement("tbody",null,t.createElement("tr",null,t.createElement("td",{colSpan:Qr},V))):t.createElement(Gr.os,{...tn}),[Yr,V,Qr]);return t.createElement("div",{className:ce.root},Ie&&a&&typeof a!="function"&&(I==null?void 0:I.length)&&t.createElement(Zs,{filters:Ra(I,a),selectedFilters:Dt,onChangeFilters:rn}),t.createElement(Gr.ZP,{components:{Header:zs,Toolbar:Sa,Body:Ca},options:{...Ft,...d},columns:jn,icons:ws,title:t.createElement(t.Fragment,null,t.createElement(Be.Z,{variant:"h5",component:"h3"},p),R&&t.createElement(Be.Z,{color:"textSecondary",variant:"body1"},R)),data:typeof a=="function"?a:qe,style:{width:"100%"},localization:{toolbar:{searchPlaceholder:"Filter"}},...oe}))}const pl=n=>{const{children:a,value:c,index:d,...p}=n;return React.createElement("div",{role:"tabpanel",hidden:c!==d,"aria-labelledby":`scrollable-auto-tab-${d}`,...p},c===d&&React.createElement(Box,{p:3},a))},Js=(0,s.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"}),yl=n=>{const a=Js(n),{ariaLabel:c,onClick:d}=n;return React.createElement(IconButton,{onClick:d,className:a.root,size:"small",disableRipple:!0,disableFocusRipple:!0,"aria-label":c},n.children)},Ys=(n,a)=>a?n?"20px":"0":"40px",Qs=(0,s.Z)(n=>({root:{textTransform:"none",height:"64px",fontWeight:n.typography.fontWeightBold,fontSize:n.typography.pxToRem(13),color:n.palette.textSubtle,marginLeft:a=>Ys(a.isFirstNav,a.isFirstIndex),width:"130px",minWidth:"130px","&:hover":{outline:"none",backgroundColor:"transparent",color:n.palette.textSubtle}}})),El=n=>{const a=Qs(n),{isFirstNav:c,isFirstIndex:d,...p}=n;return React.createElement(Tab,{className:a.root,disableRipple:!0,...p})},Xs=(0,s.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=Xs(n);return React.createElement(Tabs,{classes:a,...n,TabIndicatorProps:{children:React.createElement("span",null)}})},ks=(0,s.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 vl(n){const{tabs:a}=n,c=ks(),[d,p]=useState([0,0]),[R,I]=useState(0),[U,V]=useState(0),[Z,oe]=useState([[]]),ce=useRef(),{width:Ae}=useWindowSize(),ve=(en,qe)=>{p([R,qe])},Ie=()=>{I(R-1)},pt=()=>{I(R+1)},Gt=()=>R+1<Z.length;useEffect(()=>{const en=20,qe=R===0?1:2,zt=ce.current.offsetWidth-en-qe*30,Dt=d[0]*U+d[1],rn=Math.floor(zt/170);V(rn),oe(chunkArray(a,rn)),p([Math.floor(Dt/rn),Dt%rn])},[Ae,a]);const cn=R===d[0]?d[1]:!1;return React.createElement("div",{className:c.root},React.createElement(AppBar,{ref:ce,className:c.appbar,position:"static"},React.createElement("div",null,React.createElement(StyledTabs,{value:cn,onChange:ve,selectionFollowsFocus:!0},R!==0&&React.createElement(StyledIcon,{onClick:Ie,ariaLabel:"navigate-before"},React.createElement(NavigateBeforeIcon,null)),Z[R].map((en,qe)=>React.createElement(StyledTab,{value:qe,isFirstIndex:qe===0,isFirstNav:R===0,key:qe,icon:en.icon||void 0,label:en.label||void 0})),Gt()&&React.createElement(StyledIcon,{isNext:!0,onClick:pt,ariaLabel:"navigate-next"},React.createElement(NavigateNextIcon,null))))),cn!==!1?Z[R].map((en,qe)=>React.createElement(TabPanel,{key:qe,value:qe,index:cn},en.content)):React.createElement(TabPanel,{key:"panel_outside_chunked_array",value:d[1],index:d[1]},Z[d[0]][d[1]].content))}var Rl=e(44311);function _s(n,a){const c=n[n.length-1];if(!!c)return c>=.9?a.palette.status.ok:c>=.5?a.palette.status.warning:a.palette.status.error}function Sl(n){var c;const a=useTheme();return n.data?React.createElement(Sparklines,{width:120,height:30,min:0,max:1,...n},n.title&&React.createElement("title",null,n.title),React.createElement(SparklinesLine,{color:(c=n.color)!=null?c:_s(n.data,a)})):null}const ei=n=>(0,s.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"}),ti=({title:n="Unknown page",className:a})=>t.createElement(Be.Z,{variant:"h4",component:"h2",className:a,"data-testid":"header-title"},n);function ni(n){const{description:a,title:c,titleComponent:d=void 0,children:p,textAlign:R="left"}=n,I=ei({textAlign:R})(),U=d||t.createElement(ti,{title:c,className:I.title});return t.createElement(t.Fragment,null,t.createElement(fa.q,{title:c}),t.createElement("div",{className:I.container},t.createElement("div",{className:I.leftItemsBox},U,a&&t.createElement(Be.Z,{className:I.description,variant:"body2"},a)),t.createElement("div",{className:I.rightItemsBox},p)))}var ri=e(29788);const ai=(0,s.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"}),oi=()=>{const n=ai();return t.createElement("img",{src:ri,className:n.micDrop,alt:"Girl dropping mic from her hands"})},si=(0,s.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 ii(n){const{status:a,statusMessage:c,additionalInfo:d}=n,p=si(),R=(0,En.s0)(),I=Ua();return t.createElement(Ue.Z,{container:!0,spacing:0,className:p.container},t.createElement(oi,null),t.createElement(Ue.Z,{item:!0,xs:12,sm:8,md:4},t.createElement(Be.Z,{"data-testid":"error",variant:"body1",className:p.subtitle},"ERROR ",a,": ",c),t.createElement(Be.Z,{variant:"body1",className:p.subtitle},d),t.createElement(Be.Z,{variant:"h2",className:p.title},"Looks like someone dropped the mic!"),t.createElement(Be.Z,{variant:"h6"},t.createElement(T,{to:"#","data-testid":"go-back-link",onClick:()=>R(-1)},"Go back"),"... or please ",t.createElement(T,{to:I.url},"contact support")," if you think this is a bug.")))}var li=e(16173);const ci=(0,se.Z)({root:{textDecoration:"underline",cursor:"pointer"}},{name:"BackstageBreadcrumbsClickableText"})(Be.Z),ya=(0,se.Z)({root:{textDecoration:"underline",color:"inherit"}},{name:"BackstageBreadcrumbsStyledBox"})(ae.Z);function ui(n){const{children:a,...c}=n,[d,p]=t.useState(null),R=t.Children.toArray(a),[I,U,...V]=R,Z=V.length?V.pop():R[R.length-1],oe=R.length>3,ce=Ie=>{p(Ie.currentTarget)},Ae=()=>{p(null)},ve=Boolean(d);return t.createElement(t.Fragment,null,t.createElement(li.Z,{"aria-label":"breadcrumb",...c},R.length>1&&t.createElement(ya,{clone:!0},I),R.length>2&&t.createElement(ya,{clone:!0},U),oe&&t.createElement(ci,{onClick:ce},"..."),t.createElement(ae.Z,{style:{fontStyle:"italic"}},Z)),t.createElement(Ba.ZP,{open:ve,anchorEl:d,onClose:Ae,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}},t.createElement(he.Z,null,V.map((Ie,pt)=>t.createElement(Le.Z,{key:pt,button:!0},t.createElement(ya,{clone:!0},Ie))))))}const di=(0,s.Z)(n=>({header:{gridArea:"pageHeader",padding:n.spacing(3),width:"100%",boxShadow:n.shadows[4],position:"relative",zIndex:100,display:"flex",flexDirection:"row",flexWrap:"wrap",alignItems:"center",backgroundImage:n.page.backgroundImage,backgroundPosition:"center",backgroundSize:"cover"},leftItemsBox:{maxWidth:"100%",flexGrow:1},rightItemsBox:{width:"auto"},title:{color:n.palette.bursts.fontColor,wordBreak:"break-all",fontSize:n.typography.h3.fontSize,marginBottom:0},subtitle:{color:n.palette.common.white,opacity:.8,display:"inline-block",marginTop:n.spacing(1)},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"}),fi=({type:n,typeLink:a,classes:c,pageTitle:d})=>n?a?t.createElement(ui,{className:c.breadcrumb},t.createElement(T,{to:a},n),t.createElement(Be.Z,null,d)):t.createElement(Be.Z,{className:c.type},n):null,mi=({pageTitle:n,classes:a,tooltip:c})=>{const d=t.createElement(Be.Z,{className:a.title,variant:"h1"},n);return c?t.createElement(O.ZP,{title:c,placement:"top-start"},d):d},hi=({classes:n,subtitle:a})=>a?typeof a!="string"?t.createElement(t.Fragment,null,a):t.createElement(Be.Z,{className:n.subtitle,variant:"subtitle2",component:"span"},a):null;function io(n){const{children:a,pageTitleOverride:c,style:d,subtitle:p,title:R,tooltip:I,type:U,typeLink:V}=n,Z=di(),ce=(0,l.useApi)(l.configApiRef).getOptionalString("app.title")||"Backstage",Ae=c||R,ve=R||c,Ie=`${Ae} | %s | ${ce}`,pt=`${Ae} | ${ce}`;return t.createElement(t.Fragment,null,t.createElement(fa.q,{titleTemplate:Ie,defaultTitle:pt}),t.createElement("header",{style:d,className:Z.header},t.createElement(ae.Z,{className:Z.leftItemsBox},t.createElement(fi,{classes:Z,type:U,typeLink:V,pageTitle:ve}),t.createElement(mi,{classes:Z,pageTitle:ve,tooltip:I}),t.createElement(hi,{classes:Z,subtitle:p})),t.createElement(Ue.Z,{container:!0,className:Z.rightItemsBox,spacing:4},a)))}const gi=(0,s.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"}),pi=({value:n,className:a})=>t.createElement(Be.Z,{className:a},n);function yi(n){const{label:a,value:c,url:d}=n,p=gi(),R=t.createElement(pi,{className:p.value,value:c||"<Unknown>"});return t.createElement(Ue.Z,{item:!0},t.createElement("span",{className:p.root},t.createElement(Be.Z,{className:p.label},a),d?t.createElement(T,{to:d},R):R))}const Ei={hour:"2-digit",minute:"2-digit"};function lo(n){const a=new Date,c=window.navigator.language,d=[];if(!n.has("homepage.clocks"))return d;const p=n.getConfigArray("homepage.clocks");for(const R of p)if(R.has("label")&&R.has("timezone")){let I=R.getString("label");const U={timeZone:R.getString("timezone"),...Ei};try{new Date().toLocaleString(c,U)}catch{console.warn(`The timezone ${U.timeZone} is invalid. Defaulting to GMT`),U.timeZone="GMT",I="GMT"}const V=a.toLocaleTimeString(c,U);d.push({time:V,label:I})}return d}function Cl(n){const a=useApi(configApiRef),c=[],[d,p]=React.useState(c);return React.useEffect(()=>{p(lo(a));const R=setInterval(()=>{p(lo(a))},1e3);return()=>{clearInterval(R)}},[a]),d.length!==0?React.createElement(React.Fragment,null,d.map(R=>React.createElement(HeaderLabel,{label:R.label,value:R.time,key:R.label}))):null}const Ai=n=>(0,u.Z)({root:{color:n.palette.common.white,padding:n.spacing(2,2,3),backgroundImage:n.palette.bursts.gradient.linear,backgroundPosition:0,backgroundSize:"inherit"}}),vi=(0,s.Z)(Ai,{name:"BackstageItemCardHeader"});function Ri(n){const{title:a,subtitle:c,children:d}=n,p=vi(n);return t.createElement("div",{className:p.root},c&&t.createElement(Be.Z,{variant:"subtitle2",component:"h3"},c),a&&t.createElement(Be.Z,{variant:"h6",component:"h4"},a),d)}function Tl(n){const{description:a,tags:c,title:d,type:p,subtitle:R,label:I,onClick:U,href:V}=n;return React.createElement(Card,null,React.createElement(CardMedia,null,React.createElement(ItemCardHeader,{title:d,subtitle:R||p})),React.createElement(CardContent,null,(c==null?void 0:c.length)?React.createElement(Box,null,c.map((Z,oe)=>React.createElement(Chip,{size:"small",label:Z,key:oe}))):null,a),React.createElement(CardActions,null,!V&&React.createElement(Button,{to:"#",onClick:U,color:"primary"},I),V&&React.createElement(Button,{to:V,color:"primary"},I)))}const Si=n=>(0,u.Z)({root:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(22em, 1fr))",gridAutoRows:"1fr",gridGap:n.spacing(2)}}),Ci=(0,s.Z)(Si,{name:"BackstageItemCardGrid"});function Ti(n){const{children:a,...c}=n,d=Ci(c);return t.createElement("div",{className:d.root,...c},a)}var Pi=e(41547);const Ii=(0,s.Z)(()=>({root:{display:"grid",gridTemplateAreas:"'pageHeader pageHeader pageHeader' 'pageSubheader pageSubheader pageSubheader' 'pageNav pageContent pageSidebar'",gridTemplateRows:"max-content auto 1fr",gridTemplateColumns:"auto 1fr auto",height:"100%",overflowY:"auto"}}),{name:"BackstagePage"});function co(n){const{themeId:a,children:c}=n,d=Ii();return t.createElement(Pi.Z,{theme:p=>({...p,page:p.getPageTheme({themeId:a})})},t.createElement("div",{className:d.root},c))}function Li(n){const{themeId:a,children:c,...d}=n;return t.createElement(co,{themeId:a},t.createElement(io,{...d}),c)}var ln=e(30195);const Pl=ln.z.object({providerInfo:ln.z.object({}).catchall(ln.z.unknown()).optional(),profile:ln.z.object({email:ln.z.string().optional(),displayName:ln.z.string().optional(),picture:ln.z.string().optional()}),backstageIdentity:ln.z.object({token:ln.z.string(),identity:ln.z.object({type:ln.z.literal("user"),userEntityRef:ln.z.string(),ownershipEntityRefs:ln.z.array(ln.z.string())})})}),uo={defaultTokenExpiryMillis:5*60*1e3,tokenExpiryMarginMillis:5*60*1e3};function Oi(n){const a=new Date(Date.now()+uo.defaultTokenExpiryMillis);if(!n)return a;const[c,d,p]=n.split("."),R=JSON.parse(atob(d));return typeof R.exp!="number"?a:new Date(R.exp*1e3-uo.tokenExpiryMarginMillis)}class Il{constructor(a){k(this,"options");k(this,"abortController");k(this,"state");this.options=a,this.abortController=new AbortController,this.state={type:"empty"}}async start(){await this.getSessionAsync()}getUserId(){const{backstageIdentity:a}=this.getSessionSync(),c=a.identity.userEntityRef,d=/^([^:/]+:)?([^:/]+\/)?([^:/]+)$/.exec(c);if(!d)throw new TypeError(`Invalid user entity reference "${c}"`);return d[3]}async getIdToken(){return(await this.getSessionAsync()).backstageIdentity.token}getProfile(){return this.getSessionSync().profile}async getProfileInfo(){return(await this.getSessionAsync()).profile}async getBackstageIdentity(){return(await this.getSessionAsync()).backstageIdentity.identity}async getCredentials(){return{token:(await this.getSessionAsync()).backstageIdentity.token}}async signOut(){this.abortController.abort()}getSessionSync(){if(this.state.type==="active")return this.state.session;if(this.state.type==="fetching"&&this.state.previous)return this.state.previous;throw new Error("No session available. Try reloading your browser page.")}async getSessionAsync(){if(this.state.type==="fetching")return this.state.promise;if(this.state.type==="active"&&new Date<this.state.expiresAt)return this.state.session;const a=this.state.type==="active"?this.state.session:void 0,c=this.fetchSession().then(d=>(this.state={type:"active",session:d,expiresAt:Oi(d.backstageIdentity.token)},d),d=>{throw this.state={type:"failed",error:d},d});return this.state={type:"fetching",promise:c,previous:a},c}async fetchSession(){const a=await this.options.discoveryApi.getBaseUrl("auth"),c=await fetch(`${a}/${this.options.provider}/refresh`,{signal:this.abortController.signal,headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"});if(!c.ok)throw await ResponseError.fromResponse(c);return proxiedSessionSchema.parse(await c.json())}}const Ll=n=>{const a=useApi(discoveryApiRef),{loading:c,error:d}=useAsync(async()=>{const p=new ProxiedSignInIdentity({provider:n.provider,discoveryApi:a});await p.start(),n.onSignInSuccess(p)},[]);return c?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},xi=(0,s.Z)({container:{padding:0,listStyle:"none"},item:{display:"flex",flexDirection:"column",width:"100%",maxWidth:"400px",margin:0,padding:0}},{name:"BackstageSignInPage"}),Ea=({children:n})=>{const a=xi();return t.createElement(Ue.Z,{component:"li",item:!0,classes:a},n)};class Aa{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 Di(n){const[a,c,d]=n.split(".");return JSON.parse(atob(c))}class va{constructor(a){this.result=a}getUserId(){return this.result.userId}static fromResult(a){return new va(a)}async getIdToken(){var a,c;return(c=(a=this.result).getIdToken)==null?void 0:c.call(a)}getProfile(){return this.result.profile}async getProfileInfo(){return this.result.profile}async getBackstageIdentity(){const a=await this.getIdToken();if(!a){const p=`user:default/${this.getUserId()}`;return{type:"user",userEntityRef:p,ownershipEntityRefs:[p]}}const{sub:c,ent:d}=Di(a);return{type:"user",userEntityRef:c,ownershipEntityRefs:d!=null?d:[]}}async getCredentials(){var c,d;return{token:await((d=(c=this.result).getIdToken)==null?void 0:d.call(c))}}async signOut(){var a,c;return(c=(a=this.result).signOut)==null?void 0:c.call(a)}}class yr{constructor(a,c,d){k(this,"profilePromise");this.identity=a,this.authApi=c,this.profile=d}static createGuest(){return new Aa}static fromLegacy(a){return va.fromResult(a)}static create(a){return new yr(a.identity,a.authApi,a.profile)}getUserId(){const a=this.identity.userEntityRef,c=/^([^:/]+:)?([^:/]+\/)?([^:/]+)$/.exec(a);if(!c)throw new TypeError(`Invalid user entity reference "${a}"`);return c[3]}async getIdToken(){return(await this.authApi.getBackstageIdentity()).token}getProfile(){if(!this.profile)throw new Error("The identity API does not implement synchronous profile fetching, use getProfileInfo() instead");return this.profile}async getProfileInfo(){if(this.profilePromise)return await this.profilePromise;try{return this.profilePromise=this.authApi.getProfile(),await this.profilePromise}catch(a){throw this.profilePromise=void 0,a}}async getBackstageIdentity(){return this.identity}async getCredentials(){return{token:(await this.authApi.getBackstageIdentity()).token}}async signOut(){return this.authApi.signOut()}}const bi={Component:({config:n,onSignInSuccess:a})=>{const{apiRef:c,title:d,message:p}=n,R=(0,l.useApi)(c),I=(0,l.useApi)(l.errorApiRef),U=async()=>{try{const V=await R.getBackstageIdentity({instantPopup:!0});if(!V)throw new Error(`The ${d} provider is not configured to support sign-in`);const Z=await R.getProfile();a(yr.create({identity:V.identity,profile:Z,authApi:R}))}catch(V){I.post(new Lr.SP("Login failed",V))}};return t.createElement(Ea,null,t.createElement(mt,{variant:"fullHeight",title:d,actions:t.createElement(h.Z,{color:"primary",variant:"outlined",onClick:U},"Sign In")},t.createElement(Be.Z,{variant:"body1"},p)))},loader:async(n,a)=>{const c=n.get(a),d=await c.getBackstageIdentity({optional:!0});if(!d)return;const p=await c.getProfile();return yr.create({identity:d.identity,profile:p,authApi:c})}},Fi={Component:({onSignInSuccess:n})=>t.createElement(Ea,null,t.createElement(mt,{title:"Guest",variant:"fullHeight",actions:t.createElement(h.Z,{color:"primary",variant:"outlined",onClick:()=>n(new Aa)},"Enter")},t.createElement(Be.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 Aa};var Bi=e(94106),fo=e(86619),mo=e(74828),Mi=e(45455),Ni=e.n(Mi);const Ui=/^[a-z0-9_\-]+\.[a-z0-9_\-]+\.[a-z0-9_\-]+$/i,$i=(0,s.Z)(n=>({form:{display:"flex",flexFlow:"column nowrap"},button:{alignSelf:"center",marginTop:n.spacing(2)}}),{name:"BackstageCustomProvider"}),ho=n=>{const{ref:a,...c}=n;return{inputRef:a,...c}},Zi={Component:({onSignInSuccess:n})=>{const a=$i(),{register:c,handleSubmit:d,formState:p}=(0,Bi.cI)({mode:"onChange"}),{errors:R}=p,I=({userId:U})=>{n(yr.fromLegacy({userId:U,profile:{email:`${U}@example.com`}}))};return t.createElement(Ea,null,t.createElement(mt,{title:"Custom User",variant:"fullHeight"},t.createElement(Be.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(I)},t.createElement($n.Z,null,t.createElement(fo.Z,{...ho(c("userId",{required:!0})),label:"User ID",margin:"normal",error:Boolean(R.userId)}),R.userId&&t.createElement(mo.Z,{error:!0},R.userId.message)),t.createElement($n.Z,null,t.createElement(fo.Z,{...ho(c("idToken",{required:!1,validate:U=>!U||Ui.test(U)||"Token is not a valid OpenID Connect JWT Token"})),label:"ID Token (optional)",margin:"normal",autoComplete:"off",error:Boolean(R.idToken)}),R.idToken&&t.createElement(mo.Z,{error:!0},R.idToken.message)),t.createElement(h.Z,{type:"submit",color:"primary",variant:"outlined",className:a.button,disabled:!(p==null?void 0:p.isDirty)||!Ni()(R)},"Continue"))))},loader:async()=>{}},Kr="@backstage/core:SignInPage:provider",go={guest:Fi,custom:Zi,common:bi};function po(n,a){if(n in a)throw new Error(`"${n}" ID is duplicated. IDs of identity providers have to be unique.`)}function Ml(n){return n.reduce((c,d)=>{if(typeof d=="string")return po(d,c),c[d]={components:go[d],id:d},c;const{id:p}=d;return po(p,c),c[p]={components:go.common,id:p,config:d},c},{})}const Nl=(n,a)=>{const c=useApi(errorApiRef),d=useApiHolder(),[p,R]=useState(!0),I=useCallback(V=>{a(IdentityApiSignOutProxy.from({identityApi:V,signOut:async()=>{var Z;localStorage.removeItem(Kr),await((Z=V.signOut)==null?void 0:Z.call(V))}}))},[a]);useLayoutEffect(()=>{var ce;if(!p)return;const V=localStorage.getItem(Kr);if(V===null){R(!1);return}const Z=n[V];if(!Z){R(!1);return}let oe=!1;return Z.components.loader(d,(ce=Z.config)==null?void 0:ce.apiRef).then(Ae=>{oe||(Ae?I(Ae):R(!1))}).catch(Ae=>{oe||(localStorage.removeItem(Kr),c.post(Ae),R(!1))}),()=>{oe=!0}},[p,c,a,d,n,I]);const U=useMemo(()=>Object.keys(n).map(V=>{const Z=n[V],{Component:oe}=Z.components,ce=Ae=>{localStorage.setItem(Kr,Z.id),I(Ae)};return React.createElement(oe,{key:Z.id,config:Z.config,onSignInSuccess:ce})}),[n,I]);return[p,U]},wi=({onSignInSuccess:n,providers:a=[],title:c,align:d="left"})=>{const p=useApi(configApiRef),R=useStyles(),I=getSignInProviders(a),[U,V]=useSignInProviders(I,n);return U?React.createElement(Progress,null):React.createElement(Page,{themeId:"home"},React.createElement(Header,{title:p.getString("app.title")}),React.createElement(Content,null,c&&React.createElement(ContentHeader,{title:c,textAlign:d}),React.createElement(Grid,{container:!0,justifyContent:d==="center"?d:"flex-start",spacing:2,component:"ul",classes:R},V)))},zi=({provider:n,auto:a,onSignInSuccess:c})=>{const d=useStyles(),p=useApi(n.apiRef),R=useApi(configApiRef),[I,U]=useState(),[V,Z]=useState(!1),oe=async({checkExisting:ce,showPopup:Ae})=>{try{let ve;if(ce&&(ve=await p.getBackstageIdentity({optional:!0})),!ve&&(Ae||a)&&(Z(!0),ve=await p.getBackstageIdentity({instantPopup:!0}),!ve))throw new Error(`The ${n.title} provider is not configured to support sign-in`);if(!ve){Z(!0);return}const Ie=await p.getProfile();c(UserIdentity.create({identity:ve.identity,authApi:p,profile:Ie}))}catch(ve){U(ve),Z(!0)}};return useMount(()=>oe({checkExisting:!0})),V?React.createElement(Page,{themeId:"home"},React.createElement(Header,{title:R.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),I&&I.name!=="PopupRejectedError"&&React.createElement(Typography,{variant:"body1",color:"error"},I.message)))))):React.createElement(Progress,null)};function Ul(n){return"provider"in n?React.createElement(zi,{...n}):React.createElement(wi,{...n})}const Wi=(0,s.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"}),Hi=(0,se.Z)(n=>({root:{padding:n.spacing(2,2,2,2.5),display:"inline-block"},title:{fontWeight:700},subheader:{paddingTop:n.spacing(1)}}),{name:"BackstageTabbedCardBoldHeader"})(te.Z);function $l(n){const{slackChannel:a,errorBoundaryProps:c,children:d,title:p,deepLink:R,value:I,onChange:U}=n,V=Wi(),[Z,oe]=useState(0),ce=U||((Ie,pt)=>oe(pt));let Ae;I?React.Children.map(d,Ie=>{(Ie==null?void 0:Ie.props.value)===I&&(Ae=Ie==null?void 0:Ie.props.children)}):React.Children.map(d,(Ie,pt)=>{pt===Z&&(Ae=Ie==null?void 0:Ie.props.children)});const ve=c||(a?{slackChannel:a}:{});return React.createElement(Card,null,React.createElement(ErrorBoundary,{...ve},p&&React.createElement(Hi,{title:p}),React.createElement(Tabs,{selectionFollowsFocus:!0,classes:V,value:I||Z,onChange:ce},d),React.createElement(Divider,null),React.createElement(CardContent,null,Ae),R&&React.createElement(BottomLink,{...R})))}const ji=(0,s.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 Zl(n){const{children:a,...c}=n,d=ji();return React.createElement(Tab,{disableRipple:!0,classes:d,...c})}},88609:function(J,o,e){"use strict";e.d(o,{Os:function(){return f},fC:function(){return g}});var r=e(76241),t=e(2784);const l=(0,r.CT)("analytics-context"),f=()=>{const u=(0,t.useContext)(l);if(u===void 0)return{routeRef:"unknown",pluginId:"root",extension:"App"};const m=u.atVersion(1);if(m===void 0)throw new Error("No context found for version 1.");return m},g=u=>{const{attributes:m,children:y}=u,E={...f(),...m},i=(0,r.EI)({1:E});return t.createElement(l.Provider,{value:i},y)};function s(u,m){const y=h=>React.createElement(g,{attributes:m},React.createElement(u,{...h}));return y.displayName=`WithAnalyticsContext(${u.displayName||u.name||"Component"})`,y}},28461:function(J,o,e){"use strict";e.d(o,{f:function(){return r.fC},z:function(){return s}});var r=e(88609),t=e(27399),l=e(2784);class f{constructor(m,y={routeRef:"unknown",pluginId:"root",extension:"App"}){this.analyticsApi=m,this.context=y}setContext(m){this.context=m}captureEvent(m,y,{value:h,attributes:E}={}){try{this.analyticsApi.captureEvent({action:m,subject:y,value:h,attributes:E,context:this.context})}catch(i){console.warn("Error during analytics event capture. %o",i)}}}function g(){try{return(0,t.useApi)(t.analyticsApiRef)}catch{return{captureEvent:()=>{}}}}function s(){const u=(0,l.useRef)(null),m=(0,r.Os)(),y=g();function h(){return u.current===null&&(u.current=new f(y)),u.current}const E=h();return E.setContext(m),E}},39135:function(J,o,e){"use strict";e.d(o,{CL:function(){return Y},sM:function(){return t},$v:function(){return T},v_:function(){return j},hg:function(){return x},uB:function(){return F},iW:function(){return u},bq:function(){return S},Ds:function(){return b},NW:function(){return M},VE:function(){return O},W0:function(){return G},gP:function(){return fe},F4:function(){return f},ux:function(){return s},Kp:function(){return l},$4:function(){return Re},p_:function(){return m},br:function(){return y},ZM:function(){return we},eC:function(){return h},D:function(){return g},gW:function(){return i},Yp:function(){return E},E6:function(){return me}});var r=e(86833),t;(function(je){const Oe="SignedIn";je.SignedIn=Oe;const Je="SignedOut";je.SignedOut=Je})(t||(t={}));const l=(0,r.T0)({id:"core.auth.google"}),f=(0,r.T0)({id:"core.auth.github"}),g=(0,r.T0)({id:"core.auth.okta"}),s=(0,r.T0)({id:"core.auth.gitlab"}),u=(0,r.T0)({id:"core.auth.auth0"}),m=(0,r.T0)({id:"core.auth.microsoft"}),y=(0,r.T0)({id:"core.auth.oauth2"}),h=(0,r.T0)({id:"core.auth.oidc"}),E=(0,r.T0)({id:"core.auth.saml"}),i=(0,r.T0)({id:"core.auth.onelogin"}),S=(0,r.T0)({id:"core.auth.bitbucket"}),F=(0,r.T0)({id:"core.auth.atlassian"}),T=(0,r.T0)({id:"core.alert"}),j=(0,r.T0)({id:"core.analytics"}),x=(0,r.T0)({id:"core.apptheme"}),b=(0,r.T0)({id:"core.config"}),M=(0,r.T0)({id:"core.discovery"}),O=(0,r.T0)({id:"core.error"});var Y;(function(je){const Oe=0;je[je.None=Oe]="None";const Je=1;je[je.Active=Je]="Active"})(Y||(Y={}));const G=(0,r.T0)({id:"core.featureflags"}),fe=(0,r.T0)({id:"core.fetch"}),Re=(0,r.T0)({id:"core.identity"}),we=(0,r.T0)({id:"core.oauthrequest"}),me=(0,r.T0)({id:"core.storage"})},27399:function(J,o,e){"use strict";e.d(o,{createApiFactory:function(){return r.createApiFactory},createApiRef:function(){return r.T0},useApi:function(){return r.h_},useApiHolder:function(){return r.I_},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},auth0AuthApiRef:function(){return t.iW},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_},oauth2ApiRef:function(){return t.br},oauthRequestApiRef:function(){return t.ZM},oidcAuthApiRef:function(){return t.eC},oktaAuthApiRef:function(){return t.D},oneloginAuthApiRef:function(){return t.gW},samlAuthApiRef:function(){return t.Yp},storageApiRef:function(){return t.E6}});var r=e(86833);e.o(r,"FeatureFlagState")&&e.d(o,{FeatureFlagState:function(){return r.FeatureFlagState}}),e.o(r,"SessionState")&&e.d(o,{SessionState:function(){return r.SessionState}}),e.o(r,"alertApiRef")&&e.d(o,{alertApiRef:function(){return r.alertApiRef}}),e.o(r,"analyticsApiRef")&&e.d(o,{analyticsApiRef:function(){return r.analyticsApiRef}}),e.o(r,"appThemeApiRef")&&e.d(o,{appThemeApiRef:function(){return r.appThemeApiRef}}),e.o(r,"atlassianAuthApiRef")&&e.d(o,{atlassianAuthApiRef:function(){return r.atlassianAuthApiRef}}),e.o(r,"attachComponentData")&&e.d(o,{attachComponentData:function(){return r.attachComponentData}}),e.o(r,"auth0AuthApiRef")&&e.d(o,{auth0AuthApiRef:function(){return r.auth0AuthApiRef}}),e.o(r,"bitbucketAuthApiRef")&&e.d(o,{bitbucketAuthApiRef:function(){return r.bitbucketAuthApiRef}}),e.o(r,"configApiRef")&&e.d(o,{configApiRef:function(){return r.configApiRef}}),e.o(r,"createComponentExtension")&&e.d(o,{createComponentExtension:function(){return r.createComponentExtension}}),e.o(r,"createExternalRouteRef")&&e.d(o,{createExternalRouteRef:function(){return r.createExternalRouteRef}}),e.o(r,"createPlugin")&&e.d(o,{createPlugin:function(){return r.createPlugin}}),e.o(r,"createRoutableExtension")&&e.d(o,{createRoutableExtension:function(){return r.createRoutableExtension}}),e.o(r,"createRouteRef")&&e.d(o,{createRouteRef:function(){return r.createRouteRef}}),e.o(r,"discoveryApiRef")&&e.d(o,{discoveryApiRef:function(){return r.discoveryApiRef}}),e.o(r,"errorApiRef")&&e.d(o,{errorApiRef:function(){return r.errorApiRef}}),e.o(r,"featureFlagsApiRef")&&e.d(o,{featureFlagsApiRef:function(){return r.featureFlagsApiRef}}),e.o(r,"fetchApiRef")&&e.d(o,{fetchApiRef:function(){return r.fetchApiRef}}),e.o(r,"getComponentData")&&e.d(o,{getComponentData:function(){return r.getComponentData}}),e.o(r,"githubAuthApiRef")&&e.d(o,{githubAuthApiRef:function(){return r.githubAuthApiRef}}),e.o(r,"gitlabAuthApiRef")&&e.d(o,{gitlabAuthApiRef:function(){return r.gitlabAuthApiRef}}),e.o(r,"googleAuthApiRef")&&e.d(o,{googleAuthApiRef:function(){return r.googleAuthApiRef}}),e.o(r,"identityApiRef")&&e.d(o,{identityApiRef:function(){return r.identityApiRef}}),e.o(r,"microsoftAuthApiRef")&&e.d(o,{microsoftAuthApiRef:function(){return r.microsoftAuthApiRef}}),e.o(r,"oauth2ApiRef")&&e.d(o,{oauth2ApiRef:function(){return r.oauth2ApiRef}}),e.o(r,"oauthRequestApiRef")&&e.d(o,{oauthRequestApiRef:function(){return r.oauthRequestApiRef}}),e.o(r,"oidcAuthApiRef")&&e.d(o,{oidcAuthApiRef:function(){return r.oidcAuthApiRef}}),e.o(r,"oktaAuthApiRef")&&e.d(o,{oktaAuthApiRef:function(){return r.oktaAuthApiRef}}),e.o(r,"oneloginAuthApiRef")&&e.d(o,{oneloginAuthApiRef:function(){return r.oneloginAuthApiRef}}),e.o(r,"samlAuthApiRef")&&e.d(o,{samlAuthApiRef:function(){return r.samlAuthApiRef}}),e.o(r,"storageApiRef")&&e.d(o,{storageApiRef:function(){return r.storageApiRef}}),e.o(r,"useApp")&&e.d(o,{useApp:function(){return r.useApp}}),e.o(r,"useElementFilter")&&e.d(o,{useElementFilter:function(){return r.useElementFilter}}),e.o(r,"useRouteRef")&&e.d(o,{useRouteRef:function(){return r.useRouteRef}}),e.o(r,"useRouteRefParams")&&e.d(o,{useRouteRefParams:function(){return r.useRouteRefParams}});var t=e(39135)},90515:function(J,o,e){"use strict";e.d(o,{T:function(){return t}});class r{constructor(f){if(this.config=f,!f.id.split(".").flatMap(s=>s.split("-")).every(s=>s.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(J,o,e){"use strict";e.d(o,{n:function(){return r}});function r(t,l){return"id"in t?{api:t,deps:{},factory:()=>l}:t}},86833:function(J,o,e){"use strict";e.d(o,{h_:function(){return r.h_},I_:function(){return r.I_},T0:function(){return t.T},createApiFactory:function(){return g.n}});var r=e(5761),t=e(90515),l=e(16362),f=e.n(l);e.o(l,"FeatureFlagState")&&e.d(o,{FeatureFlagState:function(){return l.FeatureFlagState}}),e.o(l,"SessionState")&&e.d(o,{SessionState:function(){return l.SessionState}}),e.o(l,"alertApiRef")&&e.d(o,{alertApiRef:function(){return l.alertApiRef}}),e.o(l,"analyticsApiRef")&&e.d(o,{analyticsApiRef:function(){return l.analyticsApiRef}}),e.o(l,"appThemeApiRef")&&e.d(o,{appThemeApiRef:function(){return l.appThemeApiRef}}),e.o(l,"atlassianAuthApiRef")&&e.d(o,{atlassianAuthApiRef:function(){return l.atlassianAuthApiRef}}),e.o(l,"attachComponentData")&&e.d(o,{attachComponentData:function(){return l.attachComponentData}}),e.o(l,"auth0AuthApiRef")&&e.d(o,{auth0AuthApiRef:function(){return l.auth0AuthApiRef}}),e.o(l,"bitbucketAuthApiRef")&&e.d(o,{bitbucketAuthApiRef:function(){return l.bitbucketAuthApiRef}}),e.o(l,"configApiRef")&&e.d(o,{configApiRef:function(){return l.configApiRef}}),e.o(l,"createApiFactory")&&e.d(o,{createApiFactory:function(){return l.createApiFactory}}),e.o(l,"createComponentExtension")&&e.d(o,{createComponentExtension:function(){return l.createComponentExtension}}),e.o(l,"createExternalRouteRef")&&e.d(o,{createExternalRouteRef:function(){return l.createExternalRouteRef}}),e.o(l,"createPlugin")&&e.d(o,{createPlugin:function(){return l.createPlugin}}),e.o(l,"createRoutableExtension")&&e.d(o,{createRoutableExtension:function(){return l.createRoutableExtension}}),e.o(l,"createRouteRef")&&e.d(o,{createRouteRef:function(){return l.createRouteRef}}),e.o(l,"discoveryApiRef")&&e.d(o,{discoveryApiRef:function(){return l.discoveryApiRef}}),e.o(l,"errorApiRef")&&e.d(o,{errorApiRef:function(){return l.errorApiRef}}),e.o(l,"featureFlagsApiRef")&&e.d(o,{featureFlagsApiRef:function(){return l.featureFlagsApiRef}}),e.o(l,"fetchApiRef")&&e.d(o,{fetchApiRef:function(){return l.fetchApiRef}}),e.o(l,"getComponentData")&&e.d(o,{getComponentData:function(){return l.getComponentData}}),e.o(l,"githubAuthApiRef")&&e.d(o,{githubAuthApiRef:function(){return l.githubAuthApiRef}}),e.o(l,"gitlabAuthApiRef")&&e.d(o,{gitlabAuthApiRef:function(){return l.gitlabAuthApiRef}}),e.o(l,"googleAuthApiRef")&&e.d(o,{googleAuthApiRef:function(){return l.googleAuthApiRef}}),e.o(l,"identityApiRef")&&e.d(o,{identityApiRef:function(){return l.identityApiRef}}),e.o(l,"microsoftAuthApiRef")&&e.d(o,{microsoftAuthApiRef:function(){return l.microsoftAuthApiRef}}),e.o(l,"oauth2ApiRef")&&e.d(o,{oauth2ApiRef:function(){return l.oauth2ApiRef}}),e.o(l,"oauthRequestApiRef")&&e.d(o,{oauthRequestApiRef:function(){return l.oauthRequestApiRef}}),e.o(l,"oidcAuthApiRef")&&e.d(o,{oidcAuthApiRef:function(){return l.oidcAuthApiRef}}),e.o(l,"oktaAuthApiRef")&&e.d(o,{oktaAuthApiRef:function(){return l.oktaAuthApiRef}}),e.o(l,"oneloginAuthApiRef")&&e.d(o,{oneloginAuthApiRef:function(){return l.oneloginAuthApiRef}}),e.o(l,"samlAuthApiRef")&&e.d(o,{samlAuthApiRef:function(){return l.samlAuthApiRef}}),e.o(l,"storageApiRef")&&e.d(o,{storageApiRef:function(){return l.storageApiRef}}),e.o(l,"useApp")&&e.d(o,{useApp:function(){return l.useApp}}),e.o(l,"useElementFilter")&&e.d(o,{useElementFilter:function(){return l.useElementFilter}}),e.o(l,"useRouteRef")&&e.d(o,{useRouteRef:function(){return l.useRouteRef}}),e.o(l,"useRouteRefParams")&&e.d(o,{useRouteRefParams:function(){return l.useRouteRefParams}});var g=e(25182)},16362:function(){},5761:function(J,o,e){"use strict";e.d(o,{I_:function(){return l},h_:function(){return f}});var r=e(2784),t=e(76241);function l(){const s=(0,t.Vt)("api-context");if(!s)throw new Error("API context is not available");const u=s.atVersion(1);if(!u)throw new Error("ApiContext v1 not available");return u}function f(s){const m=l().get(s);if(!m)throw new Error(`No implementation available for ${s}`);return m}function g(s){return function(m){const y=E=>{const i=l(),S={};for(const F in s)if(s.hasOwnProperty(F)){const T=s[F],j=i.get(T);if(!j)throw new Error(`No implementation available for ${T}`);S[F]=j}return React.createElement(m,{...E,...S})},h=m.displayName||m.name||"Component";return y.displayName=`withApis(${h})`,y}}},31311:function(J,o,e){"use strict";e.d(o,{q:function(){return r.q}});var r=e(32483),t=e(67229),l=e.n(t);e.o(t,"attachComponentData")&&e.d(o,{attachComponentData:function(){return t.attachComponentData}}),e.o(t,"createApiFactory")&&e.d(o,{createApiFactory:function(){return t.createApiFactory}}),e.o(t,"createApiRef")&&e.d(o,{createApiRef:function(){return t.createApiRef}}),e.o(t,"createComponentExtension")&&e.d(o,{createComponentExtension:function(){return t.createComponentExtension}}),e.o(t,"createExternalRouteRef")&&e.d(o,{createExternalRouteRef:function(){return t.createExternalRouteRef}}),e.o(t,"createPlugin")&&e.d(o,{createPlugin:function(){return t.createPlugin}}),e.o(t,"createRoutableExtension")&&e.d(o,{createRoutableExtension:function(){return t.createRoutableExtension}}),e.o(t,"createRouteRef")&&e.d(o,{createRouteRef:function(){return t.createRouteRef}}),e.o(t,"getComponentData")&&e.d(o,{getComponentData:function(){return t.getComponentData}}),e.o(t,"useApi")&&e.d(o,{useApi:function(){return t.useApi}}),e.o(t,"useApiHolder")&&e.d(o,{useApiHolder:function(){return t.useApiHolder}}),e.o(t,"useElementFilter")&&e.d(o,{useElementFilter:function(){return t.useElementFilter}}),e.o(t,"useRouteRef")&&e.d(o,{useRouteRef:function(){return t.useRouteRef}}),e.o(t,"useRouteRefParams")&&e.d(o,{useRouteRefParams:function(){return t.useRouteRefParams}})},67229:function(){},32483:function(J,o,e){"use strict";e.d(o,{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(J,o,e){"use strict";e.d(o,{R5:function(){return f},CO:function(){return i},P4:function(){return E},IY:function(){return g},vJ:function(){return x}});var r=e(76241);const t=(0,r.uW)("component-data-store",()=>new WeakMap),l="__backstage_data";function f(b,M,O){var fe;const Y=b;let G=(fe=Y[l])!=null?fe:t.get(b);if(G||(G={map:new Map},Object.defineProperty(Y,l,{enumerable:!1,configurable:!0,writable:!1,value:G}),t.set(b,G)),G.map.has(M)){const Re=b.displayName||b.name;throw new Error(`Attempted to attach duplicate data "${M}" to component "${Re}"`)}G.map.set(M,O)}function g(b,M){var G;if(!b)return;const O=b.type;if(!O)return;const Y=(G=O[l])!=null?G:t.get(O);if(!!Y)return Y.map.get(M)}var s=e(2784),u=e(88609),m=e(31311),y=e(82772);class h extends s.Component{constructor(){super(...arguments);k(this,"state",{error:void 0});k(this,"handleErrorReset",()=>{this.setState({error:void 0})})}static getDerivedStateFromError(M){return{error:M}}render(){const{error:M}=this.state,{app:O,plugin:Y}=this.props,{ErrorBoundaryFallback:G}=O.getComponents();return M?s.createElement(G,{error:M,resetError:this.handleErrorReset,plugin:Y}):this.props.children}}function E(b){const{component:M,mountPoint:O,name:Y}=b;return S({component:{lazy:()=>M().then(G=>{const fe=we=>{try{(0,y.tg)(O)}catch(me){if(typeof me=="object"&&me!==null){const{message:je}=me;if(typeof je=="string"&&je.startsWith("No path for "))throw new Error(`Routable extension component with mount point ${O} 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 me}return s.createElement(G,{...we})},Re=Y||G.displayName||G.name||"LazyComponent";return fe.displayName=`RoutableExtension(${Re})`,fe},G=>Re=>{const we=(0,m.q)(),{BootErrorPage:me}=we.getComponents();return s.createElement(me,{step:"load-chunk",error:G})})},data:{"core.mountPoint":O},name:Y})}function i(b){const{component:M,name:O}=b;return S({component:M,name:O})}function S(b){const{data:M={},name:O}=b;O||console.warn("Declaring extensions without name is DEPRECATED. Make sure that all usages of createReactExtension, createComponentExtension and createRoutableExtension provide a name.");let Y;if("lazy"in b.component){const fe=b.component.lazy;Y=(0,s.lazy)(()=>fe().then(Re=>({default:Re})))}else Y=b.component.sync;const G=O||Y.displayName||Y.name||"Component";return{expose(fe){const Re=we=>{const me=(0,m.q)(),{Progress:je}=me.getComponents(),Oe=M==null?void 0:M["core.mountPoint"];return s.createElement(s.Suspense,{fallback:s.createElement(je,null)},s.createElement(h,{app:me,plugin:fe},s.createElement(u.fC,{attributes:{pluginId:fe.getId(),...O&&{extension:O},...Oe&&{routeRef:Oe.id}}},s.createElement(Y,{...we}))))};f(Re,"core.plugin",fe);for(const[we,me]of Object.entries(M))f(Re,we,me);return Re.displayName=`Extension(${G})`,Re}}}var F=e(27399);function T(b,M,O,Y){return s.Children.toArray(b).flatMap(G=>{if(!(0,s.isValidElement)(G))return[];if(G.type===s.Fragment)return T(G.props.children,M,O,Y);if(g(G,"core.featureFlagged")){const fe=G.props;return("with"in fe?M.isActive(fe.with):!M.isActive(fe.without))?T(G.props.children,M,O,Y):[]}if(O===void 0||O(G))return[G];if(Y)throw new Error(Y);return T(G.props.children,M,O,Y)})}class j{constructor(M,O){this.node=M,this.featureFlagsApi=O}selectByComponentData(M){const O=T(this.node,this.featureFlagsApi,Y=>g(Y,M.key)!==void 0,M.withStrictError);return new j(O,this.featureFlagsApi)}findComponentData(M){return T(this.node,this.featureFlagsApi,Y=>g(Y,M.key)!==void 0).map(Y=>g(Y,M.key)).filter(Y=>Y!==void 0)}getElements(){return T(this.node,this.featureFlagsApi)}}function x(b,M,O=[]){const Y=(0,F.useApi)(F.featureFlagsApiRef),G=new j(b,Y);return(0,s.useMemo)(()=>M(G),[b,...O])}},80274:function(){},36964:function(J,o,e){"use strict";e.d(o,{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},auth0AuthApiRef:function(){return t.auth0AuthApiRef},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},oauth2ApiRef:function(){return t.oauth2ApiRef},oauthRequestApiRef:function(){return t.oauthRequestApiRef},oidcAuthApiRef:function(){return t.oidcAuthApiRef},oktaAuthApiRef:function(){return t.oktaAuthApiRef},oneloginAuthApiRef:function(){return t.oneloginAuthApiRef},samlAuthApiRef:function(){return t.samlAuthApiRef},storageApiRef:function(){return t.storageApiRef},useApp:function(){return l.q},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 u.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(o,{attachComponentData:function(){return t.attachComponentData}}),e.o(t,"createApiFactory")&&e.d(o,{createApiFactory:function(){return t.createApiFactory}}),e.o(t,"createApiRef")&&e.d(o,{createApiRef:function(){return t.createApiRef}}),e.o(t,"createComponentExtension")&&e.d(o,{createComponentExtension:function(){return t.createComponentExtension}}),e.o(t,"createExternalRouteRef")&&e.d(o,{createExternalRouteRef:function(){return t.createExternalRouteRef}}),e.o(t,"createPlugin")&&e.d(o,{createPlugin:function(){return t.createPlugin}}),e.o(t,"createRoutableExtension")&&e.d(o,{createRoutableExtension:function(){return t.createRoutableExtension}}),e.o(t,"createRouteRef")&&e.d(o,{createRouteRef:function(){return t.createRouteRef}}),e.o(t,"getComponentData")&&e.d(o,{getComponentData:function(){return t.getComponentData}}),e.o(t,"useApi")&&e.d(o,{useApi:function(){return t.useApi}}),e.o(t,"useApiHolder")&&e.d(o,{useApiHolder:function(){return t.useApiHolder}}),e.o(t,"useApp")&&e.d(o,{useApp:function(){return t.useApp}}),e.o(t,"useElementFilter")&&e.d(o,{useElementFilter:function(){return t.useElementFilter}}),e.o(t,"useRouteRef")&&e.d(o,{useRouteRef:function(){return t.useRouteRef}}),e.o(t,"useRouteRefParams")&&e.d(o,{useRouteRefParams:function(){return t.useRouteRefParams}});var l=e(31311);e.o(l,"attachComponentData")&&e.d(o,{attachComponentData:function(){return l.attachComponentData}}),e.o(l,"createApiFactory")&&e.d(o,{createApiFactory:function(){return l.createApiFactory}}),e.o(l,"createApiRef")&&e.d(o,{createApiRef:function(){return l.createApiRef}}),e.o(l,"createComponentExtension")&&e.d(o,{createComponentExtension:function(){return l.createComponentExtension}}),e.o(l,"createExternalRouteRef")&&e.d(o,{createExternalRouteRef:function(){return l.createExternalRouteRef}}),e.o(l,"createPlugin")&&e.d(o,{createPlugin:function(){return l.createPlugin}}),e.o(l,"createRoutableExtension")&&e.d(o,{createRoutableExtension:function(){return l.createRoutableExtension}}),e.o(l,"createRouteRef")&&e.d(o,{createRouteRef:function(){return l.createRouteRef}}),e.o(l,"getComponentData")&&e.d(o,{getComponentData:function(){return l.getComponentData}}),e.o(l,"useApi")&&e.d(o,{useApi:function(){return l.useApi}}),e.o(l,"useApiHolder")&&e.d(o,{useApiHolder:function(){return l.useApiHolder}}),e.o(l,"useElementFilter")&&e.d(o,{useElementFilter:function(){return l.useElementFilter}}),e.o(l,"useRouteRef")&&e.d(o,{useRouteRef:function(){return l.useRouteRef}}),e.o(l,"useRouteRefParams")&&e.d(o,{useRouteRefParams:function(){return l.useRouteRefParams}});var f=e(74181),g=e(80274),s=e.n(g);e.o(g,"createApiFactory")&&e.d(o,{createApiFactory:function(){return g.createApiFactory}}),e.o(g,"createApiRef")&&e.d(o,{createApiRef:function(){return g.createApiRef}}),e.o(g,"createExternalRouteRef")&&e.d(o,{createExternalRouteRef:function(){return g.createExternalRouteRef}}),e.o(g,"createPlugin")&&e.d(o,{createPlugin:function(){return g.createPlugin}}),e.o(g,"createRouteRef")&&e.d(o,{createRouteRef:function(){return g.createRouteRef}}),e.o(g,"useApi")&&e.d(o,{useApi:function(){return g.useApi}}),e.o(g,"useApiHolder")&&e.d(o,{useApiHolder:function(){return g.useApiHolder}}),e.o(g,"useRouteRef")&&e.d(o,{useRouteRef:function(){return g.useRouteRef}}),e.o(g,"useRouteRefParams")&&e.d(o,{useRouteRefParams:function(){return g.useRouteRefParams}});var u=e(96896),m=e(82772)},96896:function(J,o,e){"use strict";e.d(o,{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,g;return(g=(f=this.config.featureFlags)==null?void 0:f.slice())!=null?g:[]}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(J,o,e){var F,T,j;"use strict";e.d(o,{x8:function(){return y},NT:function(){return f},tg:function(){return i},Oi:function(){return S}});var r=e(76241);const t=(0,r.uW)("route-ref-type",()=>Symbol("route-ref-type"));class l{constructor(b,M){k(this,F,"absolute");this.id=b,this.params=M}get title(){return this.id}toString(){return`routeRef{type=absolute,id=${this.id}}`}}F=t;function f(x){var b;return new l(x.id,(b=x.params)!=null?b:[])}const g=/^\w+$/;class s{constructor(b,M,O,Y){k(this,T,"sub");this.id=b,this.path=M,this.parent=O,this.params=Y}toString(){return`routeRef{type=sub,id=${this.id}}`}}T=t;function u(x){const{id:b,path:M,parent:O}=x,Y=M.split("/").filter(Re=>Re.startsWith(":")).map(Re=>Re.substring(1)),G=[...O.params,...Y];if(O.params.some(Re=>Y.includes(Re)))throw new Error("SubRouteRef may not have params that overlap with its parent");if(!M.startsWith("/"))throw new Error(`SubRouteRef path must start with '/', got '${M}'`);if(M.endsWith("/"))throw new Error(`SubRouteRef path must not end with '/', got '${M}'`);for(const Re of Y)if(!g.test(Re))throw new Error(`SubRouteRef path has invalid param, got '${Re}'`);return new s(b,M,O,G)}class m{constructor(b,M,O){k(this,j,"external");this.id=b,this.params=M,this.optional=O}toString(){return`routeRef{type=external,id=${this.id}}`}}j=t;function y(x){var b;return new m(x.id,(b=x.params)!=null?b:[],Boolean(x.optional))}var h=e(2784),E=e(10289);function i(x){const b=(0,E.TH)(),M=(0,r.Vt)("routing-context");if(!M)throw new Error("Routing context is not available");const O=M.atVersion(1),Y=(0,h.useMemo)(()=>O&&O.resolve(x,b),[O,x,b]);if(!M)throw new Error("useRouteRef used outside of routing context");if(!O)throw new Error("RoutingContext v1 not available");const G="optional"in x&&x.optional;if(!Y&&!G)throw new Error(`No path for ${x}`);return Y}function S(x){return(0,E.UO)()}},63865:function(J,o,e){"use strict";var r={};e.r(r),e.d(r,{TechDocsPlugin:function(){return mt}});var t=e(2784),l=e(9832),f=e(10289),g=e(49208),s=e(36964);const u=(0,s.createApiRef)({id:"plugin.permission.api"});var m;(function(v){const L="DENY";v.DENY=L;const W="ALLOW";v.ALLOW=W;const re="CONDITIONAL";v.CONDITIONAL=re})(m||(m={}));var y=e(10179),h=e(96279),E=e.n(h),i=e(9571),S=e(30195);const F=S.z.lazy(()=>S.z.object({rule:S.z.string(),params:S.z.array(S.z.unknown())}).or(S.z.object({anyOf:S.z.array(F)})).or(S.z.object({allOf:S.z.array(F)})).or(S.z.object({not:F}))),T=S.z.object({items:S.z.array(S.z.object({id:S.z.string(),result:S.z.literal(m.ALLOW).or(S.z.literal(m.DENY))}).or(S.z.object({id:S.z.string(),result:S.z.literal(m.CONDITIONAL),conditions:F})))});class j{constructor(L){k(this,"enabled");k(this,"discovery");var W;this.discovery=L.discovery,this.enabled=(W=L.config.getOptionalBoolean("permission.enabled"))!=null?W:!1}async authorize(L,W){if(!this.enabled)return L.map(He=>({result:m.ALLOW}));const re={items:L.map(He=>({id:i.Z(),...He}))},Ce=await this.discovery.getBaseUrl("permission"),Ze=await E()(`${Ce}/authorize`,{method:"POST",body:JSON.stringify(re),headers:{...this.getAuthorizationHeader(W==null?void 0:W.token),"content-type":"application/json"}});if(!Ze.ok)throw await y.VL.fromResponse(Ze);const Pe=await Ze.json();this.assertValidResponse(re,Pe);const Ke=Pe.items.reduce((He,ht)=>(He[ht.id]=ht,He),{});return re.items.map(He=>Ke[He.id])}getAuthorizationHeader(L){return L?{Authorization:`Bearer ${L}`}:{}}assertValidResponse(L,W){const Ce=T.parse(W).items.map(Pe=>Pe.id);if(!L.items.every(Pe=>Ce.includes(Pe.id)))throw new Error("Unexpected authorization response from permission-backend")}}class x{constructor(L,W){this.permissionClient=L,this.identityApi=W}static create(L){const{config:W,discovery:re,identity:Ce}=L,Ze=new j({discovery:re,config:W});return new x(Ze,Ce)}async authorize(L){return(await this.permissionClient.authorize([L],await this.identityApi.getCredentials()))[0]}}const b=(v,L)=>{const W=useApi(permissionApiRef),{loading:re,error:Ce,value:Ze}=useAsync(async()=>{const{result:Pe}=await W.authorize({permission:v,resourceRef:L});return Pe},[W,v,L]);return re?{loading:!0,allowed:!1}:Ce?{error:Ce,loading:!1,allowed:!1}:{loading:!1,allowed:Ze===AuthorizeResult.ALLOW}},M=v=>{const{permission:L,resourceRef:W,errorComponent:re,...Ce}=v,Ze=usePermission(L,W),Pe=useApp(),{NotFoundErrorPage:Ke}=Pe.getComponents();let He=re===void 0?React.createElement(Ke,null):re;return Ze.loading?He=null:Ze.allowed&&(He=v.element),React.createElement(Route,{...Ce,element:He})},O=[(0,s.createApiFactory)({api:s.discoveryApiRef,deps:{configApi:s.configApiRef},factory:({configApi:v})=>g.UrlPatternDiscovery.compile(`${v.getString("backend.baseUrl")}/api/{{ pluginId }}`)}),(0,s.createApiFactory)({api:s.alertApiRef,deps:{},factory:()=>new g.AlertApiForwarder}),(0,s.createApiFactory)({api:s.analyticsApiRef,deps:{},factory:()=>new g.NoOpAnalyticsApi}),(0,s.createApiFactory)({api:s.errorApiRef,deps:{alertApi:s.alertApiRef},factory:({alertApi:v})=>{const L=new g.ErrorAlerter(v,new g.ErrorApiForwarder);return g.UnhandledErrorForwarder.forward(L,{hidden:!1}),L}}),(0,s.createApiFactory)({api:s.storageApiRef,deps:{errorApi:s.errorApiRef},factory:({errorApi:v})=>g.WebStorage.create({errorApi:v})}),(0,s.createApiFactory)({api:s.fetchApiRef,deps:{configApi:s.configApiRef,identityApi:s.identityApiRef,discoveryApi:s.discoveryApiRef},factory:({configApi:v,identityApi:L,discoveryApi:W})=>(0,g.createFetchApi)({middleware:[g.FetchMiddlewares.resolvePluginProtocol({discoveryApi:W}),g.FetchMiddlewares.injectIdentityAuth({identityApi:L,config:v})]})}),(0,s.createApiFactory)({api:s.oauthRequestApiRef,deps:{},factory:()=>new g.OAuthRequestManager}),(0,s.createApiFactory)({api:s.googleAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:v,oauthRequestApi:L,configApi:W})=>g.GoogleAuth.create({discoveryApi:v,oauthRequestApi:L,environment:W.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.microsoftAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:v,oauthRequestApi:L,configApi:W})=>g.MicrosoftAuth.create({discoveryApi:v,oauthRequestApi:L,environment:W.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.githubAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:v,oauthRequestApi:L,configApi:W})=>g.GithubAuth.create({discoveryApi:v,oauthRequestApi:L,defaultScopes:["read:user"],environment:W.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.oktaAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:v,oauthRequestApi:L,configApi:W})=>g.OktaAuth.create({discoveryApi:v,oauthRequestApi:L,environment:W.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.gitlabAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:v,oauthRequestApi:L,configApi:W})=>g.GitlabAuth.create({discoveryApi:v,oauthRequestApi:L,environment:W.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.auth0AuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:v,oauthRequestApi:L,configApi:W})=>g.Auth0Auth.create({discoveryApi:v,oauthRequestApi:L,environment:W.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.oauth2ApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:v,oauthRequestApi:L,configApi:W})=>g.OAuth2.create({discoveryApi:v,oauthRequestApi:L,environment:W.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.samlAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,configApi:s.configApiRef},factory:({discoveryApi:v,configApi:L})=>g.SamlAuth.create({discoveryApi:v,environment:L.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.oneloginAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:v,oauthRequestApi:L,configApi:W})=>g.OneLoginAuth.create({discoveryApi:v,oauthRequestApi:L,environment:W.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.oidcAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:v,oauthRequestApi:L,configApi:W})=>g.OAuth2.create({discoveryApi:v,oauthRequestApi:L,provider:{id:"oidc",title:"Your Identity Provider",icon:()=>null},environment:W.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.bitbucketAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:v,oauthRequestApi:L,configApi:W})=>g.BitbucketAuth.create({discoveryApi:v,oauthRequestApi:L,defaultScopes:["team"],environment:W.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.atlassianAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:v,oauthRequestApi:L,configApi:W})=>g.AtlassianAuth.create({discoveryApi:v,oauthRequestApi:L,environment:W.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:u,deps:{discovery:s.discoveryApiRef,identity:s.identityApiRef,config:s.configApiRef},factory:({config:v,discovery:L,identity:W})=>x.create({config:v,discovery:L,identity:W})})];var Y=e(77277),G=e(9118),fe=e(62833);function Re({children:v}){return(0,f.GV)()?t.createElement(t.Fragment,null,v):t.createElement(f.VA,null,v)}const we=()=>t.createElement(G.ErrorPage,{status:"404",statusMessage:"PAGE NOT FOUND"}),me=({step:v,error:L})=>{let W="";return v==="load-config"?W=`The configuration failed to load, someone should have a look at this error: ${L.message}`:v==="load-chunk"&&(W=`Lazy loaded chunk failed to load, try to reload the page: ${L.message}`),t.createElement(Re,null,t.createElement(G.ErrorPage,{status:"501",statusMessage:W}))},je=({error:v,resetError:L,plugin:W})=>t.createElement(G.ErrorPanel,{title:`Error in ${W==null?void 0:W.getId()}`,defaultExpanded:!0,error:v},t.createElement(Y.Z,{variant:"outlined",onClick:L},"Retry")),Oe={Progress:G.Progress,Router:fe.VK,NotFoundErrorPage:we,BootErrorPage:me,ErrorBoundaryFallback:je};var Je=e(43642),rt=e(80079),et=e(90941),ut=e(32915),ct=e(40562),at=e(21853),Rt=e(60744),Pt=e(66569),It=e(30254),St=e(13384),yt=e(15933),Nt=e(58838),Ut=e(86737),Ot=e(4989),bt=e(44407),gt=e(18628),vt=e(84219),$t=e(98685),De=e(39781);const it={brokenImage:rt.Z,catalog:gt.Z,scaffolder:ut.Z,techdocs:ct.Z,search:at.Z,chat:Rt.Z,dashboard:Pt.Z,docs:It.Z,email:St.Z,github:Nt.Z,group:vt.Z,help:Ut.Z,"kind:api":yt.Z,"kind:component":bt.Z,"kind:domain":Je.Z,"kind:group":vt.Z,"kind:location":Ot.Z,"kind:system":et.Z,"kind:user":$t.Z,user:$t.Z,warning:De.Z};var lt=e(73689),le=e(48032);const Q={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")`},P={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 C(v,L){const re=`linear-gradient(90deg, ${(v.length===1?[v[0],v[0]]:v).join(", ")})`,Ce=`${L}, ${re}`;return{colors:v,shape:L,backgroundImage:Ce}}const B={home:C(P.teal,Q.wave),documentation:C(P.pinkSea,Q.wave2),tool:C(P.purpleSky,Q.round),service:C(P.marineBlue,Q.wave),website:C(P.veryBlue,Q.wave),library:C(P.rubyRed,Q.wave),other:C(P.darkGrey,Q.wave),app:C(P.toastyOrange,Q.wave),apis:C(P.teal,Q.wave2)},z='"Helvetica Neue", Helvetica, Roboto, Arial, sans-serif';function _(v){const{palette:L,fontFamily:W=z,defaultPageTheme:re,pageTheme:Ce=B}=v;if(!Ce[re])throw new Error(`${re} is not defined in pageTheme.`);return{palette:L,props:{MuiGrid:{spacing:2},MuiSwitch:{color:"primary"}},typography:{fontFamily:W,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:Ce[re],getPageTheme:({themeId:Ze})=>{var Pe;return(Pe=Ce[Ze])!=null?Pe:Ce[re]}}}function ne(v){return{MuiCssBaseline:{"@global":{html:{height:"100%",fontFamily:v.typography.fontFamily},body:{height:"100%",fontFamily:v.typography.fontFamily,"overscroll-behavior-y":"none"},a:{color:"inherit",textDecoration:"none"}}},MuiTableRow:{root:{"&:nth-of-type(odd)":{backgroundColor:v.palette.background.default}},hover:{"&:hover":{cursor:"pointer"}},head:{"&:nth-of-type(odd)":{backgroundColor:v.palette.background.paper}}},MuiTableCell:{root:{wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:v.spacing(3,2,3,2.5),borderBottom:0},sizeSmall:{padding:v.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:v.palette.link,minHeight:24,textTransform:"initial",letterSpacing:"0.07em","&:hover":{color:(0,le.darken)(v.palette.link,.3),background:(0,le.lighten)(v.palette.link,.95)},[v.breakpoints.up("md")]:{minWidth:120,fontSize:v.typography.pxToRem(14),fontWeight:500}},textColorPrimary:{color:v.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:v.spacing(1),marginBottom:v.spacing(1),color:v.palette.grey[900]},outlined:{color:v.palette.text.primary},label:{lineHeight:`${v.spacing(2.5)}px`,fontWeight:v.typography.fontWeightMedium,fontSize:`${v.spacing(1.75)}px`},labelSmall:{fontSize:`${v.spacing(1.5)}px`},deleteIcon:{color:v.palette.grey[500],width:`${v.spacing(3)}px`,height:`${v.spacing(3)}px`,margin:`0 ${v.spacing(.75)}px 0 -${v.spacing(.75)}px`},deleteIconSmall:{width:`${v.spacing(2)}px`,height:`${v.spacing(2)}px`,margin:`0 ${v.spacing(.5)}px 0 -${v.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 ge(v){const L=_(v),W=(0,lt.Z)(L),re=ne(W);return{...W,overrides:re}}var ye=e(34505);const xe=ge({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:ye.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:B}),ze=ge({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:ye.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:B});var Me=e(98192),Te=e(15222),Fe=e(41547),ue=e(87561);const Ee=[{id:"light",title:"Light Theme",variant:"light",icon:t.createElement(Te.Z,null),Provider:({children:v})=>t.createElement(Fe.Z,{theme:xe},t.createElement(ue.ZP,null,v))},{id:"dark",title:"Dark Theme",variant:"dark",icon:t.createElement(Me.Z,null),Provider:({children:v})=>t.createElement(Fe.Z,{theme:ze},t.createElement(ue.ZP,null,v))}];function Ne(v){var L,W,re;return(0,g.createSpecializedApp)({...v,apis:(L=v==null?void 0:v.apis)!=null?L:[],bindRoutes:v==null?void 0:v.bindRoutes,components:{...Oe,...v==null?void 0:v.components},configLoader:v==null?void 0:v.configLoader,defaultApis:O,icons:{...it,...v==null?void 0:v.icons},plugins:(W=v==null?void 0:v.plugins)!=null?W:[],themes:(re=v==null?void 0:v.themes)!=null?re:Ee})}var Ue=e(39398),Be=e(49782),st=e(79692);const be=(0,st.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",wordBreak:"break-all",marginBottom:"1rem"}}),Qe=({result:v})=>{const L=be();return React.createElement(Link,{to:v.location},React.createElement(ListItem,{alignItems:"flex-start",className:L.flexContainer},React.createElement(ListItemText,{className:L.itemText,primaryTypographyProps:{variant:"h6"},primary:v.title,secondary:v.text}),React.createElement(Box,null,v.kind&&React.createElement(Chip,{label:`Kind: ${v.kind}`,size:"small"}),v.lifecycle&&React.createElement(Chip,{label:`Lifecycle: ${v.lifecycle}`,size:"small"}))),React.createElement(Divider,{component:"li"}))};var Xe=e(91730),dt=e(17499),K=e(52890),A=e(85653),D=e(95544),X=e(99688),q=e(12231),Se=e(86136),he=e(49378),Le=e(85256),tt=e(61837),Tt=e(79784),gn=e(50758),ie=e(49166),$=e(43054);const ee=(0,st.Z)({button:{color:"white"}}),pe=({UNSTABLE_extraContextMenuItems:v,UNSTABLE_contextMenuOptions:L,onUnregisterEntity:W})=>{var xt;const[re,Ce]=(0,t.useState)(),Ze=ee(),Pe=Ct=>{Ce(Ct.currentTarget)},Ke=()=>{Ce(void 0)},He=v&&[...v.map(Ct=>t.createElement(q.Z,{key:Ct.title,onClick:()=>{Ke(),Ct.onClick()}},t.createElement(Se.Z,null,t.createElement(Ct.Icon,{fontSize:"small"})),t.createElement(he.Z,{primary:Ct.title}))),t.createElement(Le.Z,{key:"the divider is here!"})],ht=(xt=L==null?void 0:L.disableUnregister)!=null?xt:!1;return t.createElement(t.Fragment,null,t.createElement(tt.Z,{"aria-label":"more","aria-controls":"long-menu","aria-haspopup":"true",onClick:Pe,"data-testid":"menu-button",className:Ze.button},t.createElement($.Z,null)),t.createElement(Tt.ZP,{open:Boolean(re),onClose:Ke,anchorEl:re,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}},t.createElement(gn.Z,null,He,t.createElement(q.Z,{onClick:()=>{Ke(),W()},disabled:ht},t.createElement(Se.Z,null,t.createElement(ie.Z,{fontSize:"small"})),t.createElement(he.Z,{primary:"Unregister entity"})))))},Ve="plugin.catalog.entityLayoutRoute",ke=()=>null;(0,s.attachComponentData)(ke,Ve,!0),(0,s.attachComponentData)(ke,"core.gatherMountPoints",!0);const At=({entity:v,title:L})=>t.createElement(D.Z,{display:"inline-flex",alignItems:"center",height:"1em",maxWidth:"100%"},t.createElement(D.Z,{component:"span",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},L),v&&t.createElement(A.FavoriteEntity,{entity:v})),Bt=(v,L,W,re)=>{var Ke,He,ht,xt,Ct;const Ce=(Ke=v!=null?v:re==null?void 0:re.kind)!=null?Ke:"",Ze=(He=L!=null?L:re==null?void 0:re.metadata.namespace)!=null?He:"";return{headerTitle:`${(Ct=(xt=(ht=re==null?void 0:re.metadata.title)!=null?ht:W)!=null?xt:re==null?void 0:re.metadata.name)!=null?Ct:""}${Ze&&Ze!==K.sk?` in ${Ze}`:""}`,headerType:(()=>{let Lt=Ce.toLocaleLowerCase("en-US");return re&&re.spec&&"type"in re.spec&&(Lt+=" \u2014 ",Lt+=re.spec.type.toLocaleLowerCase("en-US")),Lt})()}},an=({entity:v})=>{var W;const L=(0,A.getEntityRelations)(v,K.S4);return t.createElement(t.Fragment,null,L.length>0&&t.createElement(G.HeaderLabel,{label:"Owner",value:t.createElement(A.EntityRefLinks,{entityRefs:L,defaultKind:"Group",color:"inherit"})}),((W=v.spec)==null?void 0:W.lifecycle)&&t.createElement(G.HeaderLabel,{label:"Lifecycle",value:v.spec.lifecycle}))},on=({UNSTABLE_extraContextMenuItems:v,UNSTABLE_contextMenuOptions:L,children:W})=>{var Wn,_n,ua;const{kind:re,namespace:Ce,name:Ze}=(0,A.useEntityCompoundName)(),{entity:Pe,loading:Ke,error:He}=(0,t.useContext)(A.EntityContext),ht=(0,s.useElementFilter)(W,Zr=>Zr.selectByComponentData({key:Ve,withStrictError:"Child of EntityLayout must be an EntityLayout.Route"}).getElements().flatMap(({props:Hn})=>Hn.if&&Pe&&!Hn.if(Pe)?[]:[{path:Hn.path,title:Hn.title,children:Hn.children,tabProps:Hn.tabProps}]),[Pe]),{headerTitle:xt,headerType:Ct}=Bt(re,Ce,Ze,Pe),[Lt,un]=(0,t.useState)(!1),dn=(0,f.s0)(),Zn=async()=>{un(!1),dn("/")},qn=()=>un(!0);return t.createElement(G.Page,{themeId:(ua=(_n=(Wn=Pe==null?void 0:Pe.spec)==null?void 0:Wn.type)==null?void 0:_n.toString())!=null?ua:"home"},t.createElement(G.Header,{title:t.createElement(At,{title:xt,entity:Pe}),pageTitleOverride:xt,type:Ct},Pe&&t.createElement(t.Fragment,null,t.createElement(an,{entity:Pe}),t.createElement(pe,{UNSTABLE_extraContextMenuItems:v,UNSTABLE_contextMenuOptions:L,onUnregisterEntity:qn}))),Ke&&t.createElement(G.Progress,null),Pe&&t.createElement(G.RoutedTabs,{routes:ht}),He&&t.createElement(G.Content,null,t.createElement(X.Z,{severity:"error"},He.toString())),!Ke&&!He&&!Pe&&t.createElement(G.Content,null,t.createElement(G.WarningPanel,{title:"Entity not found"},"There is no ",re," with the requested"," ",t.createElement(G.Link,{to:"https://backstage.io/docs/features/software-catalog/references"},"kind, namespace, and name"),".")),t.createElement(A.UnregisterEntityDialog,{open:Lt,entity:Pe,onConfirm:Zn,onClose:()=>un(!1)}))};on.Route=ke;const Ln=({open:v,onClose:L,onConfirm:W,entity:re})=>{const[Ce,Ze]=useState(!1),Pe=useApi(catalogApiRef),Ke=useApi(alertApiRef),He=async()=>{Ze(!0);try{const ht=re.metadata.uid;await Pe.removeEntityByUid(ht),W()}catch(ht){assertError(ht),Ke.post({message:ht.message})}finally{Ze(!1)}};return React.createElement(Dialog,{open:v,onClose:L},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:Ce,onClick:He},"Delete"),React.createElement(Button,{onClick:L,color:"primary"},"Cancel")))},On=v=>{var L,W;return((W=(L=v==null?void 0:v.metadata)==null?void 0:L.annotations)==null?void 0:W["backstage.io/orphan"])==="true"},Fn=()=>{const v=useNavigate(),L=useRouteRef(catalogRouteRef),[W,re]=useState(!1),{entity:Ce}=useEntity(),Ze=async()=>{re(!1),v(L())};return React.createElement(React.Fragment,null,React.createElement(Alert,{severity:"warning",onClick:()=>re(!0)},"This entity is not referenced by any location and is therefore not receiving updates. Click here to delete."),React.createElement(DeleteEntityDialog,{open:W,entity:Ce,onConfirm:Ze,onClose:()=>re(!1)}))};var Et=e(30001);const Zt=v=>v.error&&v.level==="error"&&v.type===ENTITY_STATUS_CATALOG_PROCESSING_TYPE;async function sn(v,L){return{items:(await L.getEntityAncestors({entityRef:v})).items.map(Ce=>{var Ke,He;return{errors:((He=(Ke=Ce.entity.status)==null?void 0:Ke.items)!=null?He:[]).filter(Zt).map(ht=>ht.error).filter(ht=>Boolean(ht)),entity:Ce.entity}}).filter(Ce=>Ce.errors.length>0)}}const Bn=async(v,L)=>{const W=L.apis.get(catalogApiRef);if(!W)throw new Error(`No implementation available for ${catalogApiRef}`);return(await sn(stringifyEntityRef(v),W)).items.length>0},Kt=()=>{const{entity:v}=useEntity(),L=stringifyEntityRef(v),W=useApi(catalogApiRef),{loading:re,error:Ce,value:Ze}=useAsync(async()=>sn(L,W),[L,W]);return Ce?React.createElement(Box,{mb:1},React.createElement(ResponseErrorPanel,{error:Ce})):re||!Ze?null:React.createElement(React.Fragment,null,Ze.items.map((Pe,Ke)=>React.createElement(Box,{key:Ke,mb:1},!compareEntityToRef(v,stringifyEntityRef(Pe.entity))&&React.createElement(Box,{p:1},"The error below originates from"," ",React.createElement(EntityRefLink,{entityRef:Pe.entity})),Pe.errors.map((He,ht)=>React.createElement(ResponseErrorPanel,{key:ht,error:He})))))};var Jn=e(18671);const rr=(v,L,W=0)=>{if(!v)return W;const re=L.findIndex(Ce=>Ce.id===v.route.path);return~re?re:W},xn={Layout:({children:v})=>{var Ct,Lt,un;const L=[],W=[],re=(0,f.UO)(),Ce=(0,f.s0)();t.Children.forEach(v,dn=>{if(!t.isValidElement(dn))return;if(dn.type!==xn.Content)throw new Error("This component only accepts Content elements as direct children. Check the code of the EntityPage.");const Zn=dn.props.path;W.push({id:Zn,label:dn.props.title}),L.push({path:Zn,element:dn.props.element})}),((Lt=(Ct=L==null?void 0:L[0])==null?void 0:Ct.path)!=null?Lt:"")!==""&&L.push({path:"/*",element:t.createElement(f.Fg,{to:L[0].path})});const[Ze]=(un=(0,f.fp)(L,`/${re["*"]}`))!=null?un:[],Pe=rr(Ze,W),Ke=W[Pe],He=Ke==null?void 0:Ke.label,ht=dn=>Ce(W[dn].id.replace(/\/\*$/,"").replace(/^\//,"")),xt=(0,f.V$)(L);return Ke?t.createElement(t.Fragment,null,t.createElement(G.HeaderTabs,{tabs:W,selectedIndex:Pe,onChange:ht}),t.createElement(G.Content,null,t.createElement(Jn.q,{title:He}),xt)):null},Content:v=>null},Er=({entity:v,title:L})=>t.createElement(D.Z,{display:"inline-flex",alignItems:"center",height:"1em"},L,v&&t.createElement(A.FavoriteEntity,{entity:v})),Ar=({entity:v})=>{var W;const L=(0,A.getEntityRelations)(v,K.S4);return t.createElement(t.Fragment,null,L.length>0&&t.createElement(G.HeaderLabel,{label:"Owner",value:t.createElement(A.EntityRefLinks,{entityRefs:L,defaultKind:"Group",color:"inherit"})}),((W=v.spec)==null?void 0:W.lifecycle)&&t.createElement(G.HeaderLabel,{label:"Lifecycle",value:v.spec.lifecycle}))},zn=(v,L,W,re)=>({headerTitle:`${W}${L&&L!==K.sk?` in ${L}`:""}`,headerType:(()=>{let Ce=v.toLocaleLowerCase("en-US");return re&&re.spec&&"type"in re.spec&&(Ce+=" \u2014 ",Ce+=re.spec.type.toLocaleLowerCase("en-US")),Ce})()}),ar=({children:v,UNSTABLE_extraContextMenuItems:L,UNSTABLE_contextMenuOptions:W})=>{var qn,Wn,_n;const{kind:re,namespace:Ce,name:Ze}=(0,A.useEntityCompoundName)(),{entity:Pe,loading:Ke,error:He}=(0,t.useContext)(A.EntityContext),{headerTitle:ht,headerType:xt}=zn(re,Ce,Ze,Pe),[Ct,Lt]=(0,t.useState)(!1),un=(0,f.s0)(),dn=async()=>{Lt(!1),un("/")},Zn=()=>Lt(!0);return t.createElement(G.Page,{themeId:(_n=(Wn=(qn=Pe==null?void 0:Pe.spec)==null?void 0:qn.type)==null?void 0:Wn.toString())!=null?_n:"home"},t.createElement(G.Header,{title:t.createElement(Er,{title:ht,entity:Pe}),pageTitleOverride:ht,type:xt},Pe&&t.createElement(t.Fragment,null,t.createElement(Ar,{entity:Pe}),t.createElement(pe,{UNSTABLE_extraContextMenuItems:L,UNSTABLE_contextMenuOptions:W,onUnregisterEntity:Zn}))),Ke&&t.createElement(G.Content,null,t.createElement(G.Progress,null)),Pe&&t.createElement(xn.Layout,null,v),He&&t.createElement(G.Content,null,t.createElement(G.ResponseErrorPanel,{error:He})),!Ke&&!He&&!Pe&&t.createElement(G.Content,null,t.createElement(G.WarningPanel,{title:"Entity not found"},"There is no ",re," with the requested"," ",t.createElement(G.Link,{to:"https://backstage.io/docs/features/software-catalog/references"},"kind, namespace, and name"),".")),t.createElement(A.UnregisterEntityDialog,{open:Ct,entity:Pe,onConfirm:dn,onClose:()=>Lt(!1)}))};ar.Content=xn.Content;var or=e(64279);const sr="core.backstage.entitySwitch",Yn=v=>null;(0,s.attachComponentData)(Yn,sr,!0);const vr=({children:v})=>{var Ze,Pe;const{entity:L}=(0,A.useEntity)(),W=(0,s.useApiHolder)(),re=(0,s.useElementFilter)(v,Ke=>Ke.selectByComponentData({key:sr,withStrictError:"Child of EntitySwitch is not an EntitySwitch.Case"}).getElements().flatMap(He=>{var Ct;const{if:ht,children:xt}=He.props;return[{if:(Ct=ht==null?void 0:ht(L,{apis:W}))!=null?Ct:!0,children:xt}]}),[W,L]);return re.some(Ke=>typeof Ke.if=="object"&&"then"in Ke.if)?t.createElement(ir,{results:re}):(Pe=(Ze=re.find(Ke=>Ke.if))==null?void 0:Ze.children)!=null?Pe:null};function ir({results:v}){const{loading:L,value:W}=(0,or.default)(async()=>{var Ce;const re=v.map(async({if:Ze,children:Pe})=>{try{if(await Ze)return Pe}catch{}return null});return(Ce=(await Promise.all(re)).find(Boolean))!=null?Ce:null},[v]);return L||!W?null:W}vr.Case=Yn;var Mn=e(26997),Rr=e(7758),Sr=e(219);const Qn=(0,st.Z)(v=>({illo:{maxWidth:"60%",top:100,right:20,position:"absolute",[v.breakpoints.down("xs")]:{maxWidth:"96%",position:"relative",top:"unset",right:"unset",margin:`${v.spacing(10)}px auto ${v.spacing(4)}px`}}})),Xn=()=>{const v=Qn();return React.createElement("img",{src:IlloSvgUrl,className:v.illo,alt:"Illustration on entity not found page"})},lr=(0,st.Z)(v=>({container:{paddingTop:v.spacing(24),paddingLeft:v.spacing(8),[v.breakpoints.down("xs")]:{padding:v.spacing(2)}},title:{paddingBottom:v.spacing(2),[v.breakpoints.down("xs")]:{fontSize:32}},body:{paddingBottom:v.spacing(6),[v.breakpoints.down("xs")]:{paddingBottom:v.spacing(5)}}})),pn=()=>{const v=lr();return React.createElement(Grid,{container:!0,spacing:0,className:v.container},React.createElement(Illo,null),React.createElement(Grid,{item:!0,xs:12,sm:6},React.createElement(Typography,{variant:"h2",className:v.title},"Entity was not found"),React.createElement(Typography,{variant:"body1",className:v.body},"Want to help us build this? Check out our Getting Started documentation."),React.createElement(Button,{variant:"contained",color:"primary",href:"https://backstage.io/docs"},"DOCS")))},yn=()=>React.createElement(EntityPageLayout,null,React.createElement(EntityPageLayout.Content,{path:"/",title:"Overview",element:React.createElement(Content,null,React.createElement(Typography,{variant:"h2"},"This is the default entity page."),React.createElement(Typography,{variant:"body1"},"To override this component with your custom implementation, read docs on"," ",React.createElement(Link,{to:"https://backstage.io/docs"},"backstage.io/docs")))})),cr=({EntityPage:v})=>{const{entity:L,loading:W,error:re}=useEntity();return W?React.createElement(EntityPageLayout,null):re||!L?React.createElement(EntityNotFound,null):React.createElement(v,null)},ur=()=>{var Pe;const{optionalNamespaceAndName:v,"*":L}=useParams(),[W,re]=v.split(":").reverse(),Ce=(Pe=re==null?void 0:re.toLocaleLowerCase("en-US"))!=null?Pe:ENTITY_DEFAULT_NAMESPACE,Ze=L?`/${L}`:"";return React.createElement(Navigate,{to:`../../${Ce}/component/${W}${Ze}`})},Cr=v=>React.createElement(AsyncEntityProvider,{...useEntityFromUrl(),...v}),Tr=({EntityPage:v=yn})=>React.createElement(Routes,null,React.createElement(Route,{path:"/",element:React.createElement(CatalogPage,null)}),React.createElement(Route,{path:"/:namespace/:kind/:name",element:React.createElement(Cr,null,React.createElement(cr,{EntityPage:v}))}),React.createElement(Route,{path:"Component/:optionalNamespaceAndName/*",element:React.createElement(ur,null)}));var dr=e(47851);const Jt=(0,s.createPlugin)({id:"catalog",apis:[(0,s.createApiFactory)({api:A.Ah,deps:{discoveryApi:s.discoveryApiRef,fetchApi:s.fetchApiRef},factory:({discoveryApi:v,fetchApi:L})=>new Et.MS({discoveryApi:v,fetchApi:L})}),(0,s.createApiFactory)({api:A.starredEntitiesApiRef,deps:{storageApi:s.storageApiRef},factory:({storageApi:v})=>new A.DefaultStarredEntitiesApi({storageApi:v})})],routes:{catalogIndex:A.M4,catalogEntity:A.wi},externalRoutes:{createComponent:dr.y,viewTechDoc:dr.j}}),Pr=Jt.provide((0,s.createRoutableExtension)({name:"CatalogIndexPage",component:()=>Promise.resolve().then(e.bind(e,7758)).then(v=>v.CatalogPage),mountPoint:A.M4})),kn=Jt.provide((0,s.createRoutableExtension)({name:"CatalogEntityPage",component:()=>e.e(6650).then(e.bind(e,76650)).then(v=>v.CatalogEntityPage),mountPoint:A.wi})),Ir=Jt.provide((0,s.createComponentExtension)({name:"EntityAboutCard",component:{lazy:()=>Promise.resolve().then(e.bind(e,39398)).then(v=>v.AboutCard)}})),kr=Jt.provide((0,s.createComponentExtension)({name:"EntityLinksCard",component:{lazy:()=>e.e(1959).then(e.bind(e,81959)).then(v=>v.EntityLinksCard)}})),Lr=Jt.provide((0,s.createComponentExtension)({name:"EntityHasSystemsCard",component:{lazy:()=>e.e(390).then(e.bind(e,60390)).then(v=>v.HasSystemsCard)}})),fr=Jt.provide((0,s.createComponentExtension)({name:"EntityHasComponentsCard",component:{lazy:()=>e.e(4022).then(e.bind(e,4022)).then(v=>v.HasComponentsCard)}})),qr=Jt.provide((0,s.createComponentExtension)({name:"EntityHasSubcomponentsCard",component:{lazy:()=>e.e(8792).then(e.bind(e,38792)).then(v=>v.HasSubcomponentsCard)}})),_r=Jt.provide((0,s.createComponentExtension)({name:"EntityHasResourcesCard",component:{lazy:()=>e.e(1553).then(e.bind(e,11553)).then(v=>v.HasResourcesCard)}})),Or=Jt.provide((0,s.createComponentExtension)({name:"EntityDependsOnComponentsCard",component:{lazy:()=>e.e(8061).then(e.bind(e,48061)).then(v=>v.DependsOnComponentsCard)}})),ea=Jt.provide((0,s.createComponentExtension)({name:"EntityDependencyOfComponentsCard",component:{lazy:()=>e.e(6235).then(e.bind(e,56235)).then(v=>v.DependencyOfComponentsCard)}})),xr=Jt.provide((0,s.createComponentExtension)({name:"EntityDependsOnResourcesCard",component:{lazy:()=>e.e(9028).then(e.bind(e,59028)).then(v=>v.DependsOnResourcesCard)}})),Dr=Jt.provide((0,s.createComponentExtension)({name:"EntitySystemDiagramCard",component:{lazy:()=>e.e(4960).then(e.bind(e,14960)).then(v=>v.SystemDiagramCard)}})),br=Jt.provide((0,s.createComponentExtension)({name:"RelatedEntitiesCard",component:{lazy:()=>e.e(2426).then(e.bind(e,62426)).then(v=>v.RelatedEntitiesCard)}}));var Nn=e(3337),mr=e(76372);class Fr{constructor({configApi:L,discoveryApi:W,identityApi:re}){k(this,"configApi");k(this,"discoveryApi");k(this,"identityApi");this.configApi=L,this.discoveryApi=W,this.identityApi=re}async getApiOrigin(){var L;return(L=this.configApi.getOptionalString("techdocs.requestUrl"))!=null?L:await this.discoveryApi.getBaseUrl("techdocs")}async getTechDocsMetadata(L){const{kind:W,namespace:re,name:Ce}=L,Pe=`${await this.getApiOrigin()}/metadata/techdocs/${re}/${W}/${Ce}`,{token:Ke}=await this.identityApi.getCredentials(),He=await fetch(`${Pe}`,{headers:Ke?{Authorization:`Bearer ${Ke}`}:{}});if(!He.ok)throw await y.VL.fromResponse(He);return await He.json()}async getEntityMetadata(L){const{kind:W,namespace:re,name:Ce}=L,Pe=`${await this.getApiOrigin()}/metadata/entity/${re}/${W}/${Ce}`,{token:Ke}=await this.identityApi.getCredentials(),He=await fetch(`${Pe}`,{headers:Ke?{Authorization:`Bearer ${Ke}`}:{}});if(!He.ok)throw await y.VL.fromResponse(He);return await He.json()}}class Br{constructor({configApi:L,discoveryApi:W,identityApi:re}){k(this,"configApi");k(this,"discoveryApi");k(this,"identityApi");this.configApi=L,this.discoveryApi=W,this.identityApi=re}async getApiOrigin(){var L;return(L=this.configApi.getOptionalString("techdocs.requestUrl"))!=null?L:await this.discoveryApi.getBaseUrl("techdocs")}async getStorageUrl(){var L;return(L=this.configApi.getOptionalString("techdocs.storageUrl"))!=null?L:`${await this.discoveryApi.getBaseUrl("techdocs")}/static/docs`}async getBuilder(){return this.configApi.getString("techdocs.builder")}async getEntityDocs(L,W){const{kind:re,namespace:Ce,name:Ze}=L,Ke=`${await this.getStorageUrl()}/${Ce}/${re}/${Ze}/${W}`,{token:He}=await this.identityApi.getCredentials(),ht=await fetch(`${Ke.endsWith("/")?Ke:`${Ke}/`}index.html`,{headers:He?{Authorization:`Bearer ${He}`}:{}});let xt="";switch(ht.status){case 404:throw xt="Page not found. ",W||(xt+="This could be because there is no index.md file in the root of the docs directory of this repository."),new y.dR(xt);case 500:throw xt="Could not generate documentation or an error in the TechDocs backend. ",new Error(xt);default:break}return ht.text()}async syncEntityDocs(L,W=()=>{}){const{kind:re,namespace:Ce,name:Ze}=L,Ke=`${await this.getApiOrigin()}/sync/${Ce}/${re}/${Ze}`,{token:He}=await this.identityApi.getCredentials();return new Promise((ht,xt)=>{const Ct=new mr.EventSourcePolyfill(Ke,{withCredentials:!0,headers:He?{Authorization:`Bearer ${He}`}:{}});Ct.addEventListener("log",Lt=>{Lt.data&&W(JSON.parse(Lt.data))}),Ct.addEventListener("finish",Lt=>{let un=!1;Lt.data&&({updated:un}=JSON.parse(Lt.data)),ht(un?"updated":"cached")}),Ct.onerror=Lt=>{switch(Ct.close(),Lt.status){case 404:xt(new y.dR(Lt.message));return;default:xt(new Error(Lt.data));return}}})}async getBaseUrl(L,W,re){const{kind:Ce,namespace:Ze,name:Pe}=W,He=`${await this.getApiOrigin()}/static/docs/${Ze}/${Ce}/${Pe}/${re}`;return new URL(L,He.endsWith("/")?He:`${He}/`).toString()}}var w=e(71226),N=e(95074),H=e(76635),te=e(83201),se=e(50294),ae=e(67430);const de=({columns:v,actions:L})=>{var Ct,Lt;const{loading:W,error:re,entities:Ce,filters:Ze}=(0,A.useEntityListProvider)(),{isStarredEntity:Pe,toggleStarredEntity:Ke}=(0,A.useStarredEntities)(),[,He]=(0,N.Z)(),ht=(0,H.capitalize)((Lt=(Ct=Ze.user)==null?void 0:Ct.value)!=null?Lt:"all"),xt=[se.createCopyDocsUrlAction(He),se.createStarEntityAction(Pe,Ke)];return re?t.createElement(G.WarningPanel,{severity:"error",title:"Could not load available documentation."},t.createElement(G.CodeSnippet,{language:"text",text:re.toString()})):t.createElement(te.DocsTable,{title:ht,entities:Ce,loading:W,actions:L||xt,columns:v})};de.columns=ae,de.actions=se;var We=e(1114);class Ye{getCatalogFilters(){return{"metadata.annotations.backstage.io/techdocs-ref":A.n3}}}const nt=()=>{const{updateFilters:v}=(0,A.useEntityListProvider)();return(0,t.useEffect)(()=>{v({techdocs:new Ye})},[v]),null},ot=({initialFilter:v="all",columns:L,actions:W})=>t.createElement(We.j,null,t.createElement(G.Content,null,t.createElement(G.ContentHeader,{title:""},t.createElement(G.SupportButton,null,"Discover documentation in your ecosystem.")),t.createElement(A.EntityListProvider,null,t.createElement(Mn.q7,null,t.createElement(Mn.Gh,null,t.createElement(nt,null),t.createElement(A.UserListPicker,{initialFilter:v}),t.createElement(A.EntityOwnerPicker,null),t.createElement(A.EntityTagPicker,null)),t.createElement(Mn.Nz,null,t.createElement(de,{actions:W,columns:L}))))));var $e=e(10187);const Ge=()=>{const{loading:v,error:L,entities:W}=useEntityListProvider();return L?React.createElement(WarningPanel,{severity:"error",title:"Could not load available documentation."},React.createElement(CodeSnippet,{language:"text",text:L.toString()})):v||!W?React.createElement(Progress,null):(W.sort((re,Ce)=>{var Ze,Pe;return((Ze=re.metadata.title)!=null?Ze:re.metadata.name).localeCompare((Pe=Ce.metadata.title)!=null?Pe:Ce.metadata.name)}),React.createElement(DocsCardGrid,{entities:W}))};var ft=e(68725);const mt=(0,s.createPlugin)({id:"techdocs",apis:[(0,s.createApiFactory)({api:Nn.D,deps:{configApi:s.configApiRef,discoveryApi:s.discoveryApiRef,identityApi:s.identityApiRef},factory:({configApi:v,discoveryApi:L,identityApi:W})=>new Br({configApi:v,discoveryApi:L,identityApi:W})}),(0,s.createApiFactory)({api:Nn.g,deps:{configApi:s.configApiRef,discoveryApi:s.discoveryApiRef,identityApi:s.identityApiRef},factory:({configApi:v,discoveryApi:L,identityApi:W})=>new Fr({configApi:v,discoveryApi:L,identityApi:W})})],routes:{root:ft._Z,docRoot:ft.Fw,entityContent:ft.pd}}),wt=mt.provide((0,s.createRoutableExtension)({name:"TechdocsPage",component:()=>Promise.resolve().then(e.bind(e,94067)).then(v=>v.Router),mountPoint:ft._Z})),qt=mt.provide((0,s.createRoutableExtension)({name:"EntityTechdocsContent",component:()=>Promise.resolve().then(e.bind(e,94067)).then(v=>v.EmbeddedDocsRouter),mountPoint:ft.pd})),Vt=mt.provide((0,s.createComponentExtension)({name:"DocsCardGrid",component:{lazy:()=>Promise.resolve().then(e.bind(e,10187)).then(v=>v.DocsCardGrid)}})),_t=mt.provide((0,s.createComponentExtension)({name:"DocsTable",component:{lazy:()=>Promise.resolve().then(e.bind(e,83201)).then(v=>v.DocsTable)}})),Rn=mt.provide((0,s.createRoutableExtension)({name:"TechDocsCustomHome",component:()=>Promise.resolve().then(e.bind(e,57110)).then(v=>v.TechDocsCustomHome),mountPoint:ft._Z})),Mt=mt.provide((0,s.createRoutableExtension)({name:"TechDocsIndexPage",component:()=>Promise.resolve().then(e.bind(e,41481)).then(v=>v.TechDocsIndexPage),mountPoint:ft._Z})),Dn=mt.provide((0,s.createRoutableExtension)({name:"TechDocsReaderPage",component:()=>Promise.resolve().then(e.bind(e,31752)).then(v=>v.TechDocsPage),mountPoint:ft.Fw}));var Sn=e(73873),Ht=e(94067),Yt=e(36356);class Un{constructor({configApi:L,discoveryApi:W,identityApi:re}){k(this,"configApi");k(this,"discoveryApi");k(this,"identityApi");this.configApi=L,this.discoveryApi=W,this.identityApi=re}async getApiOrigin(){var L;return(L=this.configApi.getOptionalString("techdocs.requestUrl"))!=null?L:await this.discoveryApi.getBaseUrl("techdocs")}async getStorageUrl(){var L;return(L=this.configApi.getOptionalString("techdocs.storageUrl"))!=null?L:`${await this.discoveryApi.getBaseUrl("techdocs")}/static/docs`}async getBuilder(){return this.configApi.getString("techdocs.builder")}async getEntityDocs(L,W){const Ce=`${await this.getApiOrigin()}/${W}`,Ze=await fetch(`${Ce.endsWith("/")?Ce:`${Ce}/`}index.html`);if(Ze.status===404)throw new Error("Page not found");return Ze.text()}async syncEntityDocs(L){return"cached"}async getBaseUrl(L,W,re){const Ce=await this.getApiOrigin();return new URL(L,`${Ce}/${re}`).toString()}}class $n{constructor({configApi:L,discoveryApi:W,identityApi:re}){k(this,"configApi");k(this,"discoveryApi");k(this,"identityApi");this.configApi=L,this.discoveryApi=W,this.identityApi=re}async getApiOrigin(){var L;return(L=this.configApi.getOptionalString("techdocs.requestUrl"))!=null?L:await this.discoveryApi.getBaseUrl("techdocs")}async getEntityMetadata(L){return{apiVersion:"backstage.io/v1alpha1",kind:"Component",metadata:{name:"local"},spec:{owner:"test",lifecycle:"experimental"}}}async getTechDocsMetadata(L){return{site_name:"Live preview environment",site_description:""}}}const ta=[(0,s.createApiFactory)({api:Nn.D,deps:{configApi:s.configApiRef,discoveryApi:s.discoveryApiRef,identityApi:s.identityApiRef},factory:({configApi:v,discoveryApi:L,identityApi:W})=>new Un({configApi:v,discoveryApi:L,identityApi:W})}),(0,s.createApiFactory)({api:Nn.g,deps:{configApi:s.configApiRef,discoveryApi:s.discoveryApiRef,identityApi:s.identityApiRef},factory:({configApi:v,discoveryApi:L,identityApi:W})=>new $n({configApi:v,discoveryApi:L,identityApi:W})}),(0,s.createApiFactory)({api:Yt.q3,deps:{configApi:s.configApiRef},factory:({configApi:v})=>Yt.ae.fromConfig(v)})];var Mr=e(86689),na=e(58845);const Nr=(0,st.Z)({svg:{width:"auto",height:30},path:{fill:"#7df3e1"}});var Pa=()=>{const v=Nr();return t.createElement("svg",{className:v.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 2079.95 456.05"},t.createElement("path",{className:v.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 ra=(0,st.Z)({svg:{width:"auto",height:28},path:{fill:"#7df3e1"}});var La=()=>{const v=ra();return t.createElement("svg",{className:v.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 337.46 428.5"},t.createElement("path",{className:v.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 aa=(0,st.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}}),oa=()=>{const v=aa(),{isOpen:L}=(0,t.useContext)(G.SidebarContext);return t.createElement("div",{className:v.root},t.createElement(Mr.Z,{component:fe.OL,to:"/docs/default/component/local/",underline:"none",className:v.link},L?t.createElement(Pa,null):t.createElement(La,null)))},sa=({children:v})=>t.createElement(G.SidebarPage,null,t.createElement(G.Sidebar,null,t.createElement(oa,null),t.createElement(G.SidebarDivider,null),t.createElement(G.SidebarItem,{icon:na.Z,to:"docs/default/component/local/",text:"Docs Preview"})),v),Ur=()=>{const v={site_name:"Live preview environment",site_description:""};return t.createElement(Sn.EV,null,({entityRef:L,onReady:W})=>t.createElement(t.Fragment,null,t.createElement(Sn.nN,{techDocsMetadata:v,entityRef:L}),t.createElement(G.Content,{"data-testid":"techdocs-content"},t.createElement(Sn.Ej,{onReady:W,entityRef:L,withSearch:!1}))))},hr=t.createElement(Ur,null),$r=Ne({apis:ta,plugins:Object.values(r)}),Oa=$r.getProvider(),ia=$r.getRouter(),la=t.createElement(g.FlatRoutes,null,t.createElement(f.Fg,{key:"/",to:"/docs/default/component/local/"}),t.createElement(f.AW,{path:"/catalog/:namespace/:kind/:name",element:t.createElement(kn,null)}),t.createElement(f.AW,{path:"/docs",element:t.createElement(Mt,null)},t.createElement(ot,null)),t.createElement(f.AW,{path:"/docs/:namespace/:kind/:name/*",element:t.createElement(Dn,null)},hr));var ca=()=>t.createElement(Oa,null,t.createElement(ia,null,t.createElement(sa,null,la)));l.render(t.createElement(ca,null),document.getElementById("root"))},10179:function(J,o,e){"use strict";e.d(o,{SP:function(){return F},dR:function(){return E},VL:function(){return j},BD:function(){return t}});function r(x){if(typeof x!="object"||x===null||Array.isArray(x))return!1;const b=x;return!(typeof b.name!="string"||b.name===""||typeof b.message!="string")}function t(x){if(typeof x!="object"||x===null||Array.isArray(x))throw new Error(`Encountered invalid error, not an object, got '${x}'`);const b=x;if(typeof b.name!="string"||b.name==="")throw new Error(`Encountered error object without a name, got '${x}'`);if(typeof b.message!="string")throw new Error(`Encountered error object without a message, got '${x}'`)}var l=e(24852);function f(x,b){const M=serializeErrorInternal(x),O={name:"Unknown",message:"<no reason given>",...M};return(b==null?void 0:b.includeStack)||delete O.stack,O}function g(x){const b=(0,l.deserializeError)(x);return x.stack||(b.stack=void 0),b}function s(x){if(r(x)){const b=String(x);return b!=="[object Object]"?b:`${x.name}: ${x.message}`}return`unknown error '${x}'`}class u extends Error{constructor(b,M){var Y;let O=b;if(M!==void 0){const G=s(M);O?O+=`; caused by ${G}`:O=`caused by ${G}`}super(O);k(this,"cause");(Y=Error.captureStackTrace)==null||Y.call(Error,this,this.constructor),this.name=this.constructor.name,this.cause=r(M)?M:void 0}}class m extends null{}class y extends null{}class h extends null{}class E extends u{}class i extends null{}class S extends null{}class F extends u{constructor(b,M){super(b,M);this.name=r(M)?M.name:"Error"}}async function T(x){var b;try{const M=await x.text();if(M){if((b=x.headers.get("content-type"))==null?void 0:b.startsWith("application/json"))try{const O=JSON.parse(M);if(O.error&&O.response)return O}catch{}return{error:{name:"Error",message:`Request failed with status ${x.status} ${x.statusText}, ${M}`},response:{statusCode:x.status}}}}catch{}return{error:{name:"Error",message:`Request failed with status ${x.status} ${x.statusText}`},response:{statusCode:x.status}}}class j extends Error{constructor(b){super(b.message);k(this,"response");k(this,"body");k(this,"cause");this.name="ResponseError",this.response=b.response,this.body=b.data,this.cause=b.cause}static async fromResponse(b){const M=await T(b),O=M.response.statusCode||b.status,Y=M.error.name||b.statusText,G=`Request failed with ${O} ${Y}`,fe=g(M.error);return new j({message:G,response:b,data:M,cause:fe})}}},36356:function(J,o,e){var E,i,S,F;"use strict";e.d(o,{nW:function(){return h},ae:function(){return s},q3:function(){return u}});var r=e(36964);const t=(0,r.createApiRef)({id:"core.scmauth"});class l{constructor(x){vn(this,E,void 0);In(this,E,x)}async getCredentials(x){const b=new URL(x.url),M=_e(this,E).find(O=>O.isUrlSupported(b));if(!M)throw new Error(`No authentication provider available for access to '${x.url}'`);return M.getCredentials(x)}}E=new WeakMap;const T=class{constructor(x,b,M){vn(this,i,void 0);vn(this,S,void 0);vn(this,F,void 0);In(this,i,x),In(this,S,b),In(this,F,M)}static createDefaultApiFactory(){return createApiFactory({api:scmAuthApiRef,deps:{github:githubAuthApiRef,gitlab:gitlabAuthApiRef,azure:microsoftAuthApiRef},factory:({github:x,gitlab:b,azure:M})=>T.merge(T.forGithub(x),T.forGitlab(b),T.forAzure(M))})}static forAuthApi(x,b){return new T(x,b.host,b.scopeMapping)}static forGithub(x,b){var O;const M=(O=b==null?void 0:b.host)!=null?O:"github.com";return new T(x,M,{default:["repo","read:org","read:user"],repoWrite:["gist"]})}static forGitlab(x,b){var O;const M=(O=b==null?void 0:b.host)!=null?O:"gitlab.com";return new T(x,M,{default:["read_user","read_api","read_repository"],repoWrite:["write_repository","api"]})}static forAzure(x,b){var O;const M=(O=b==null?void 0:b.host)!=null?O:"dev.azure.com";return new T(x,M,{default:["vso.build","vso.code","vso.graph","vso.project","vso.profile"],repoWrite:["vso.code_manage"]})}static forBitbucket(x,b){var O;const M=(O=b==null?void 0:b.host)!=null?O:"bitbucket.org";return new T(x,M,{default:["account","team","pullrequest","snippet","issue"],repoWrite:["pullrequest:write","snippet:write","issue:write"]})}static merge(...x){return new l(x)}isUrlSupported(x){return x.host===_e(this,S)}async getCredentials(x){const{url:b,additionalScope:M,...O}=x,Y=_e(this,F).default.slice();(M==null?void 0:M.repoWrite)&&Y.push(..._e(this,F).repoWrite);const G=await _e(this,i).getAccessToken(Y,O);return{token:G,headers:{Authorization:`Bearer ${G}`}}}};let f=T;i=new WeakMap,S=new WeakMap,F=new WeakMap;var g=e(63925);class s{static fromConfig(x){return g.Lx.fromConfig(x)}}const u=(0,r.createApiRef)({id:"integration.scmintegrations"});var m=e(73250),y=e(2784);const h=j=>{var Y;const{type:x}=j,b=(0,r.useApp)(),M=m.Z,O=x&&(Y=b.getSystemIcon(x))!=null?Y:M;return y.createElement(O,null)}},63925:function(J,o,e){var Me,Te,Fe,ue,Ee,Ne,Ue;"use strict";e.d(o,{Lx:function(){return ze},Pb:function(){return vt}});var r=e(82717),t=e.n(r),l=e(76635);function f(K){const A=new URL("http://example.com");return A.host=K,A.host===K}function g(K){try{return new URL(K),!0}catch{return!1}}function s(K,A){return{list(){return K},byUrl(D){try{const X=typeof D=="string"?new URL(D):D;return K.find(q=>A(q)===X.host)}catch{return}},byHost(D){return K.find(X=>A(X)===D)}}}function u(K){const{url:A,base:D,lineNumber:X}=K;try{return new URL(A),A}catch{}let q;if(A.startsWith("/")){const{filepath:Se}=t()(D);q=new URL(D);const he=(0,l.trimEnd)(q.pathname.substring(0,q.pathname.length-Se.length),"/");q.pathname=`${he}${A}`}else q=new URL(A,D);return q.search=new URL(D).search,X&&(q.hash=`L${X}`),q.toString()}const m="GB",Be=class{constructor(A,D,X,q,Se,he){vn(this,Me,void 0);vn(this,Te,void 0);vn(this,Fe,void 0);vn(this,ue,void 0);vn(this,Ee,void 0);vn(this,Ne,void 0);vn(this,Ue,(...A)=>{const D=new URL(_e(this,Me));return D.pathname=A.map(X=>encodeURIComponent(X)).join("/"),D});In(this,Me,A),In(this,Te,D),In(this,Fe,X),In(this,ue,q),In(this,Ee,Se),In(this,Ne,he)}static fromRepoUrl(A){var gn;const D=new URL(A);let X,q,Se;const he=D.pathname.split("/").map(ie=>decodeURIComponent(ie));if(he[2]==="_git"?(X=he[1],q=Se=he[3]):he[3]==="_git"&&(X=he[1],q=he[2],Se=he[4]),!X||!q||!Se)throw new Error("Azure URL must point to a git repository");const Le=(gn=D.searchParams.get("path"))!=null?gn:void 0;let tt;const Tt=D.searchParams.get("version");if(Tt){if(Tt.slice(0,2)!=="GB")throw new Error("Azure URL version must point to a git branch");tt=Tt.slice(2)}return new Be(D.origin,X,q,Se,Le,tt)}toRepoUrl(){let A;return _e(this,Fe)===_e(this,ue)?A=_e(this,Ue).call(this,_e(this,Te),"_git",_e(this,ue)):A=_e(this,Ue).call(this,_e(this,Te),_e(this,Fe),"_git",_e(this,ue)),_e(this,Ee)&&A.searchParams.set("path",_e(this,Ee)),_e(this,Ne)&&A.searchParams.set("version",m+_e(this,Ne)),A.toString()}toFileUrl(){if(!_e(this,Ee))throw new Error("Azure URL must point to a specific path to be able to download a file");const A=_e(this,Ue).call(this,_e(this,Te),_e(this,Fe),"_apis","git","repositories",_e(this,ue),"items");return A.searchParams.set("api-version","6.0"),A.searchParams.set("path",_e(this,Ee)),_e(this,Ne)&&A.searchParams.set("version",_e(this,Ne)),A.toString()}toArchiveUrl(){const A=_e(this,Ue).call(this,_e(this,Te),_e(this,Fe),"_apis","git","repositories",_e(this,ue),"items");return A.searchParams.set("recursionLevel","full"),A.searchParams.set("download","true"),A.searchParams.set("api-version","6.0"),_e(this,Ee)&&A.searchParams.set("scopePath",_e(this,Ee)),_e(this,Ne)&&A.searchParams.set("version",_e(this,Ne)),A.toString()}toCommitsUrl(){const A=_e(this,Ue).call(this,_e(this,Te),_e(this,Fe),"_apis","git","repositories",_e(this,ue),"commits");return A.searchParams.set("api-version","6.0"),_e(this,Ne)&&A.searchParams.set("searchCriteria.itemVersion.version",_e(this,Ne)),A.toString()}getOwner(){return _e(this,Te)}getProject(){return _e(this,Fe)}getRepo(){return _e(this,ue)}getPath(){return _e(this,Ee)}getRef(){return _e(this,Ne)}};let y=Be;Me=new WeakMap,Te=new WeakMap,Fe=new WeakMap,ue=new WeakMap,Ee=new WeakMap,Ne=new WeakMap,Ue=new WeakMap;const h="dev.azure.com";function E(K){var X;const A=(X=K.getOptionalString("host"))!=null?X:h,D=K.getOptionalString("token");if(!f(A))throw new Error(`Invalid Azure integration config, '${A}' is not a valid host`);return{host:A,token:D}}function i(K){const A=K.map(E);return A.some(D=>D.host===h)||A.push({host:h}),A}const st=class{constructor(A){this.integrationConfig=A}get type(){return"azure"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(A){var q;const{url:D,base:X}=A;if(g(D))return D;try{const Se=y.fromRepoUrl(X),he=new URL(X),Le=new URL(`https://a.com${(q=Se.getPath())!=null?q:""}`),tt=new URL(D,Le).pathname;return he.searchParams.set("path",tt),A.lineNumber&&(he.searchParams.set("line",String(A.lineNumber)),he.searchParams.set("lineEnd",String(A.lineNumber+1)),he.searchParams.set("lineStartColumn","1"),he.searchParams.set("lineEndColumn","1")),he.toString()}catch{return new URL(D,X).toString()}}resolveEditUrl(A){return A}};let S=st;k(S,"factory",({config:A})=>{var X;const D=i((X=A.getOptionalConfigArray("integrations.azure"))!=null?X:[]);return s(D.map(q=>new st(q)),q=>q.config.host)});var F=e(48834).Buffer;function T(K){return AzureUrl.fromRepoUrl(K).toFileUrl()}function j(K){return AzureUrl.fromRepoUrl(K).toArchiveUrl()}function x(K){return AzureUrl.fromRepoUrl(K).toCommitsUrl()}function b(K,A){const D=A?{...A}:{};if(K.token){const X=F.from(`:${K.token}`,"utf8");D.Authorization=`Basic ${X.toString("base64")}`}return{headers:D}}const M="bitbucket.org",O="https://api.bitbucket.org/2.0";function Y(K){var he;const A=(he=K.getOptionalString("host"))!=null?he:M;let D=K.getOptionalString("apiBaseUrl");const X=K.getOptionalString("token"),q=K.getOptionalString("username"),Se=K.getOptionalString("appPassword");if(!f(A))throw new Error(`Invalid Bitbucket integration config, '${A}' is not a valid host`);return D?D=(0,l.trimEnd)(D,"/"):A===M&&(D=O),{host:A,apiBaseUrl:D,token:X,username:q,appPassword:Se}}function G(K){const A=K.map(Y);return A.some(D=>D.host===M)||A.push({host:M,apiBaseUrl:O}),A}const be=class{constructor(A){this.integrationConfig=A}get type(){return"bitbucket"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(A){const D=u(A);if(A.lineNumber){const X=new URL(D),q=X.pathname.split("/").slice(-1)[0];return X.hash=`${q}-${A.lineNumber}`,X.toString()}return D}resolveEditUrl(A){const D=t()(A),X=new URL(A);return X.searchParams.set("mode","edit"),X.searchParams.set("spa","0"),X.searchParams.set("at",D.ref),X.toString()}};let fe=be;k(fe,"factory",({config:A})=>{var X;const D=G((X=A.getOptionalConfigArray("integrations.bitbucket"))!=null?X:[]);return s(D.map(q=>new be(q)),q=>q.config.host)});var Re=e(96279),we=e(48834).Buffer;async function me(K,A){const{name:D,owner:X,resource:q}=parseGitUrl(K),Se=q==="bitbucket.org";let he=Se?`${A.apiBaseUrl}/repositories/${X}/${D}`:`${A.apiBaseUrl}/projects/${X}/repos/${D}/default-branch`,Le=await fetch(he,Je(A));if(Le.status===404&&!Se&&(he=`${A.apiBaseUrl}/projects/${X}/repos/${D}/branches/default`,Le=await fetch(he,Je(A))),!Le.ok){const Tt=`Failed to retrieve default branch from ${he}, ${Le.status} ${Le.statusText}`;throw new Error(Tt)}let tt;if(Se)tt=(await Le.json()).mainbranch.name;else{const{displayId:Tt}=await Le.json();tt=Tt}if(!tt)throw new Error(`Failed to read default branch from ${he}. Response ${Le.status} ${Le.json()}`);return tt}async function je(K,A){const{name:D,owner:X,ref:q,protocol:Se,resource:he,filepath:Le}=parseGitUrl(K),tt=he==="bitbucket.org";let Tt=q;Tt||(Tt=await me(K,A));const gn=Le?`&path=${encodeURIComponent(Le)}`:"";return tt?`${Se}://${he}/${X}/${D}/get/${Tt}.tar.gz`:`${A.apiBaseUrl}/projects/${X}/repos/${D}/archive?format=tgz&at=${Tt}&prefix=${X}-${D}${gn}`}function Oe(K,A){try{const{owner:D,name:X,ref:q,filepathtype:Se,filepath:he}=parseGitUrl(K);if(!D||!X||Se!=="browse"&&Se!=="raw"&&Se!=="src")throw new Error("Invalid Bitbucket URL or file path");const Le=he.replace(/^\//,"");if(A.host==="bitbucket.org"){if(!q)throw new Error("Invalid Bitbucket URL or file path");return`${A.apiBaseUrl}/repositories/${D}/${X}/src/${q}/${Le}`}return`${A.apiBaseUrl}/projects/${D}/repos/${X}/raw/${Le}?at=${q}`}catch(D){throw new Error(`Incorrect URL: ${K}, ${D}`)}}function Je(K){const A={};if(K.token)A.Authorization=`Bearer ${K.token}`;else if(K.username&&K.appPassword){const D=we.from(`${K.username}:${K.appPassword}`,"utf8");A.Authorization=`Basic ${D.toString("base64")}`}return{headers:A}}const rt="github.com",et="https://api.github.com",ut="https://raw.githubusercontent.com";function ct(K){var he,Le;const A=(he=K.getOptionalString("host"))!=null?he:rt;let D=K.getOptionalString("apiBaseUrl"),X=K.getOptionalString("rawBaseUrl");const q=K.getOptionalString("token"),Se=(Le=K.getOptionalConfigArray("apps"))==null?void 0:Le.map(tt=>({appId:tt.getNumber("appId"),clientId:tt.getString("clientId"),clientSecret:tt.getString("clientSecret"),webhookSecret:tt.getString("webhookSecret"),privateKey:tt.getString("privateKey"),allowedInstallationOwners:tt.getOptionalStringArray("allowedInstallationOwners")}));if(!f(A))throw new Error(`Invalid GitHub integration config, '${A}' is not a valid host`);return D?D=(0,l.trimEnd)(D,"/"):A===rt&&(D=et),X?X=(0,l.trimEnd)(X,"/"):A===rt&&(X=ut),{host:A,apiBaseUrl:D,rawBaseUrl:X,token:q,apps:Se}}function at(K){const A=K.map(ct);return A.some(D=>D.host===rt)||A.push({host:rt,apiBaseUrl:et,rawBaseUrl:ut}),A}function Rt(K,A,D){try{const{owner:X,name:q,ref:Se,filepathtype:he,filepath:Le}=parseGitUrl(K);if(!X||!q||!Se||he!=="blob"&&he!=="raw"&&he!=="tree")throw new Error("Invalid GitHub URL or file path");const tt=Le.replace(/^\//,"");return It(A,D)==="api"?`${A.apiBaseUrl}/repos/${X}/${q}/contents/${tt}?ref=${Se}`:`${A.rawBaseUrl}/${X}/${q}/${Se}/${tt}`}catch(X){throw new Error(`Incorrect URL: ${K}, ${X}`)}}function Pt(K,A){const D={};return It(K,A)==="api"&&(D.Accept="application/vnd.github.v3.raw"),A.token&&(D.Authorization=`token ${A.token}`),{headers:D}}function It(K,A){return K.apiBaseUrl&&(A.token||!K.rawBaseUrl)?"api":"raw"}class St{constructor(){k(this,"tokenCache",new Map);k(this,"isNotExpired",A=>A.diff(DateTime.local(),"minutes").minutes>50)}async getOrCreateToken(A,D){const X=this.tokenCache.get(A);if(X&&this.isNotExpired(X.expiresAt))return{accessToken:X.token};const q=await D();return this.tokenCache.set(A,q),{accessToken:q.token}}}const yt={Accept:"application/vnd.github.machine-man-preview+json"};class Nt{constructor(A,D){k(this,"appClient");k(this,"baseUrl");k(this,"baseAuthConfig");k(this,"cache",new St);k(this,"allowedInstallationOwners");this.allowedInstallationOwners=A.allowedInstallationOwners,this.baseUrl=D,this.baseAuthConfig={appId:A.appId,privateKey:A.privateKey.replace(/\\n/gm,`
|
|
31
|
+
`)},this.appClient=new Octokit({baseUrl:D,headers:yt,authStrategy:createAppAuth,auth:this.baseAuthConfig})}async getInstallationCredentials(A,D){var he;const{installationId:X,suspended:q}=await this.getInstallationData(A);if(this.allowedInstallationOwners&&!((he=this.allowedInstallationOwners)==null?void 0:he.includes(A)))return{accessToken:void 0};if(q)throw new Error(`The GitHub application for ${A} is suspended`);const Se=D?`${A}/${D}`:A;return this.cache.getOrCreateToken(Se,async()=>{const Le=await this.appClient.apps.createInstallationAccessToken({installation_id:X,headers:yt});if(D&&Le.data.repository_selection==="selected"){const tt=new Octokit({baseUrl:this.baseUrl,auth:Le.data.token});if(!(await tt.paginate(tt.apps.listReposAccessibleToInstallation)).some(ie=>ie.name===D))throw new Error(`The Backstage GitHub application used in the ${A} organization does not have access to a repository with the name ${D}`)}return{token:Le.data.token,expiresAt:DateTime.fromISO(Le.data.expires_at)}})}getInstallations(){return this.appClient.paginate(this.appClient.apps.listInstallations)}async getInstallationData(A){const X=(await this.getInstallations()).find(Se=>{var he,Le;return((Le=(he=Se.account)==null?void 0:he.login)==null?void 0:Le.toLocaleLowerCase("en-US"))===A.toLocaleLowerCase("en-US")});if(X)return{installationId:X.id,suspended:Boolean(X.suspended_by)};const q=new Error(`No app installation found for ${A} in ${this.baseAuthConfig.appId}`);throw q.name="NotFoundError",q}}class Ut{constructor(A){k(this,"apps");var D,X;this.apps=(X=(D=A.apps)==null?void 0:D.map(q=>new Nt(q,A.apiBaseUrl)))!=null?X:[]}async getAllInstallations(){return this.apps.length?(await Promise.all(this.apps.map(D=>D.getInstallations()))).flat():[]}async getAppToken(A,D){if(this.apps.length===0)return;const X=await Promise.all(this.apps.map(Le=>Le.getInstallationCredentials(A,D).then(tt=>({credentials:tt,error:void 0}),tt=>({credentials:void 0,error:tt})))),q=X.find(Le=>Le.credentials);if(q)return q.credentials.accessToken;const he=X.map(Le=>Le.error).find(Le=>Le.name!=="NotFoundError");if(he)throw he}}class Ot{constructor(A,D){this.githubAppCredentialsMux=A,this.token=D}async getCredentials(A){const D=parseGitUrl(A.url),X=D.owner||D.name,q=D.owner?D.name:void 0;let Se="app",he=await this.githubAppCredentialsMux.getAppToken(X,q);return he||(Se="token",he=this.token),{headers:he?{Authorization:`Bearer ${he}`}:void 0,token:he,type:Se}}}k(Ot,"create",null);class bt{static fromIntegrations(A){const D=new Map;return A.github.list().forEach(X=>{const q=SingleInstanceGithubCredentialsProvider.create(X.config);D.set(X.config.host,q)}),new bt(D)}constructor(A){this.providers=A}async getCredentials(A){const D=new URL(A.url),X=this.providers.get(D.host);if(!X)throw new Error(`There is no GitHub integration that matches ${A.url}. Please add a configuration for an integration.`);return X.getCredentials(A)}}const Qe=class{constructor(A){this.integrationConfig=A}get type(){return"github"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(A){return vt(u(A),"tree")}resolveEditUrl(A){return vt(A,"edit")}};let gt=Qe;k(gt,"factory",({config:A})=>{var X;const D=at((X=A.getOptionalConfigArray("integrations.github"))!=null?X:[]);return s(D.map(q=>new Qe(q)),q=>q.config.host)});function vt(K,A){return K.replace(/\/\/([^/]+)\/([^/]+)\/([^/]+)\/(blob|tree|edit)\//,(D,X,q,Se)=>`//${X}/${q}/${Se}/${A}/`)}const $t="gitlab.com",De="https://gitlab.com/api/v4";function it(K){const A=K.getString("host");let D=K.getOptionalString("apiBaseUrl");const X=K.getOptionalString("token");let q=K.getOptionalString("baseUrl");if(D?D=(0,l.trimEnd)(D,"/"):A===$t&&(D=De),q?q=(0,l.trimEnd)(q,"/"):q=`https://${A}`,A.includes(":"))throw new Error(`Invalid GitLab integration config, host '${A}' should just be the host name (e.g. "github.com"), not a URL`);if(f(A)){if(!D||!g(D))throw new Error(`Invalid GitLab integration config, '${D}' is not a valid apiBaseUrl`);if(!g(q))throw new Error(`Invalid GitLab integration config, '${q}' is not a valid baseUrl`)}else throw new Error(`Invalid GitLab integration config, '${A}' is not a valid host`);return{host:A,token:X,apiBaseUrl:D,baseUrl:q}}function lt(K){const A=K.map(it);return A.some(D=>D.host===$t)||A.push({host:$t,apiBaseUrl:De,baseUrl:`https://${$t}`}),A}async function le(K,A){if(K.includes("/-/blob/")){const D=await B(K,A);return C(K,D).toString()}return P(K).toString()}function Q(K){const{token:A=""}=K;return{headers:{"PRIVATE-TOKEN":A}}}function P(K){try{const A=new URL(K),[D,X,q,Se,...he]=A.pathname.split("/");if(D!==""||X===""||q===""||Se!=="blob"||!he.join("/").match(/\.(yaml|yml)$/))throw new Error("Wrong GitLab URL");return A.pathname=[D,X,q,"raw",...he].join("/"),A}catch(A){throw new Error(`Incorrect url: ${K}, ${A}`)}}function C(K,A){try{const D=new URL(K),X=D.pathname.split("/-/blob/")[1],[q,...Se]=X.split("/");return D.pathname=["/api/v4/projects",A,"repository/files",encodeURIComponent(decodeURIComponent(Se.join("/"))),"raw"].join("/"),D.search=`?ref=${q}`,D}catch(D){throw new Error(`Incorrect url: ${K}, ${D}`)}}async function B(K,A){const D=new URL(K);if(!D.pathname.includes("/-/blob/"))throw new Error("Please provide full path to yaml file from GitLab");try{const X=D.pathname.split("/-/blob/")[0],q=new URL(`${D.protocol+D.hostname}/api/v4/projects/${encodeURIComponent(X.replace(/^\//,""))}`),Se=await fetch(q.toString(),Q(A)),he=await Se.json();if(!Se.ok)throw new Error(`GitLab Error '${he.error}', ${he.error_description}`);return Number(he.id)}catch(X){throw new Error(`Could not get GitLab project ID for: ${K}, ${X}`)}}const Xe=class{constructor(A){this.integrationConfig=A}get type(){return"gitlab"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(A){return u(A)}resolveEditUrl(A){return _(A,"edit")}};let z=Xe;k(z,"factory",({config:A})=>{var X;const D=lt((X=A.getOptionalConfigArray("integrations.gitlab"))!=null?X:[]);return s(D.map(q=>new Xe(q)),q=>q.config.host)});function _(K,A){return K.replace(/\/\-\/(blob|tree|edit)\//,`/-/${A}/`)}const ne="amazonaws.com";function ge(K){var tt;const A=K.getOptionalString("endpoint"),D=(tt=K.getOptionalBoolean("s3ForcePathStyle"))!=null?tt:!1;let X,q;if(A){try{const Tt=new URL(A);X=Tt.host,q=Tt.pathname}catch{throw new Error(`invalid awsS3 integration config, endpoint '${A}' is not a valid URL`)}if(q!=="/")throw new Error(`invalid awsS3 integration config, endpoints cannot contain path, got '${A}'`)}else X=ne;const Se=K.getOptionalString("accessKeyId"),he=K.getOptionalString("secretAccessKey"),Le=K.getOptionalString("roleArn");return{host:X,endpoint:A,s3ForcePathStyle:D,accessKeyId:Se,secretAccessKey:he,roleArn:Le}}function ye(K){const A=K.map(ge);return A.some(D=>D.host===ne)||A.push({host:ne}),A}const dt=class{get type(){return"awsS3"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}constructor(A){this.integrationConfig=A}resolveUrl(A){return u(A)}resolveEditUrl(A){return A}};let xe=dt;k(xe,"factory",({config:A})=>{var X;const D=ye((X=A.getOptionalConfigArray("integrations.awsS3"))!=null?X:[]);return s(D.map(q=>new dt(q)),q=>q.config.host)});class ze{constructor(A){k(this,"byType");this.byType=A}static fromConfig(A){return new ze({awsS3:xe.factory({config:A}),azure:S.factory({config:A}),bitbucket:fe.factory({config:A}),github:gt.factory({config:A}),gitlab:z.factory({config:A})})}get awsS3(){return this.byType.awsS3}get azure(){return this.byType.azure}get bitbucket(){return this.byType.bitbucket}get github(){return this.byType.github}get gitlab(){return this.byType.gitlab}list(){return Object.values(this.byType).flatMap(A=>A.list())}byUrl(A){return Object.values(this.byType).map(D=>D.byUrl(A)).find(Boolean)}byHost(A){return Object.values(this.byType).map(D=>D.byHost(A)).find(Boolean)}resolveUrl(A){const D=this.byUrl(A.base);return D?D.resolveUrl(A):u(A)}resolveEditUrl(A){const D=this.byUrl(A);return D?D.resolveEditUrl(A):A}}},76241:function(J,o,e){"use strict";e.d(o,{CT:function(){return s},EI:function(){return y},uW:function(){return f},Vt:function(){return u}});function r(){return typeof window!="undefined"&&window.Math===Math?window:typeof self!="undefined"&&self.Math===Math?self:Function("return this")()}const t=r(),l=h=>`__@backstage/${h}__`;function f(h,E){const i=l(h);let S=t[i];return S||(S=E(),t[i]=S,S)}var g=e(2784);function s(h){return f(h,()=>(0,g.createContext)(void 0))}function u(h){return(0,g.useContext)(s(h))}function m(h){return{set(E){globalThis[`__@backstage/${h}__`]=createContext(createVersionedValueMap(E))},reset(){delete globalThis[`__@backstage/${h}__`]}}}function y(h){return Object.freeze(h),{atVersion(E){return h[E]}}}},85653:function(J,o,e){"use strict";e.d(o,{AsyncEntityProvider:function(){return we},n3:function(){return t.n3},DefaultStarredEntitiesApi:function(){return h},EntityContext:function(){return G},EntityKindFilter:function(){return C},EntityLifecyclePicker:function(){return ee},EntityListProvider:function(){return bt},EntityOwnerPicker:function(){return At},EntityRefLink:function(){return Q},EntityRefLinks:function(){return P},EntityTable:function(){return xn},EntityTagPicker:function(){return ar},EntityTypePicker:function(){return Yn},FavoriteEntity:function(){return lr},UnregisterEntityDialog:function(){return Lr},UserListPicker:function(){return mr},Ah:function(){return f},M4:function(){return x},wi:function(){return M},favoriteEntityIcon:function(){return Xn},favoriteEntityTooltip:function(){return Qn},formatEntityRefTitle:function(){return it},getEntityMetadataEditUrl:function(){return St},getEntityMetadataViewUrl:function(){return It},getEntityRelations:function(){return yt},getEntitySourceLocation:function(){return Nt},isOwnerOf:function(){return Ut},starredEntitiesApiRef:function(){return E},useEntity:function(){return Je},useEntityCompoundName:function(){return Y},useEntityFromUrl:function(){return Oe},useEntityKinds:function(){return ze},useEntityListProvider:function(){return gt},useOwnUser:function(){return Me},useRelatedEntities:function(){return Fe},useStarredEntities:function(){return Ne}});var r={};e.r(r),e.d(r,{createDomainColumn:function(){return Fn},createEntityRefColumn:function(){return on},createEntityRelationColumn:function(){return Ln},createMetadataDescriptionColumn:function(){return Zt},createOwnerColumn:function(){return On},createSpecLifecycleColumn:function(){return sn},createSpecTypeColumn:function(){return Bn},createSystemColumn:function(){return Et}});var t=e(30001),l=e(36964);const f=(0,l.createApiRef)({id:"plugin.catalog.service"});var g=e(82394),s=e.n(g),u=e(52890),m=e(76635);async function y({storageApi:w}){var ae;const N=w.forBucket("settings"),H=w.forBucket("starredEntities"),te=N.get("starredEntities");if(!(0,m.isArray)(te))return;const se=new Set((ae=H.get("entityRefs"))!=null?ae:[]);te.filter(m.isString).map(de=>de.split(":")).filter(de=>de.length===4&&de[0]==="entity").map(([de,We,Ye,nt])=>(0,u.eE)({kind:We,namespace:Ye,name:nt})).forEach(de=>se.add(de)),await H.set("entityRefs",Array.from(se)),await N.remove("starredEntities")}class h{constructor(N){k(this,"settingsStore");k(this,"starredEntities");k(this,"subscribers",new Set);k(this,"observable",new(s())(N=>(N.next(this.starredEntities),this.subscribers.add(N),()=>{this.subscribers.delete(N)})));var H;y(N).then(),this.settingsStore=N.storageApi.forBucket("starredEntities"),this.starredEntities=new Set((H=this.settingsStore.get("entityRefs"))!=null?H:[]),this.settingsStore.observe$("entityRefs").subscribe({next:te=>{var se;this.starredEntities=new Set((se=te.newValue)!=null?se:[]),this.notifyChanges()}})}async toggleStarred(N){this.starredEntities.has(N)?this.starredEntities.delete(N):this.starredEntities.add(N),await this.settingsStore.set("entityRefs",Array.from(this.starredEntities))}starredEntitie$(){return this.observable}isStarred(N){return this.starredEntities.has(N)}notifyChanges(){for(const N of this.subscribers)N.next(this.starredEntities)}}const E=(0,l.createApiRef)({id:"catalog-react.starred-entities"});var i=e(2784),S=e(76241),F=e(10289),T=e(77446);const x=(0,l.createRouteRef)({id:"catalog"}),M=(0,l.createRouteRef)({id:"catalog:entity",params:["namespace","kind","name"]});function O(w){var N,H;return{kind:w.kind.toLocaleLowerCase("en-US"),namespace:(H=(N=w.metadata.namespace)==null?void 0:N.toLocaleLowerCase("en-US"))!=null?H:ENTITY_DEFAULT_NAMESPACE,name:w.metadata.name}}const Y=()=>{const{kind:w,namespace:N,name:H}=(0,l.useRouteRefParams)(M);return{kind:w,namespace:N,name:H}},G=(0,i.createContext)({entity:void 0,loading:!0,error:void 0,refresh:()=>{}}),fe=G.Provider,Re=(0,S.CT)("entity-context"),we=({children:w,entity:N,loading:H,error:te,refresh:se})=>{const ae={entity:N,loading:H,error:te,refresh:se};return i.createElement(fe,{value:ae},i.createElement(Re.Provider,{value:(0,S.EI)({1:ae})},w))},me=({entity:w,children:N})=>React.createElement(we,{entity:w,loading:!Boolean(w),error:void 0,refresh:void 0,children:N}),je=({value:w,children:N})=>i.createElement(we,{...w,children:N});G.Provider=je;const Oe=()=>{const{kind:w,namespace:N,name:H}=Y(),te=(0,F.s0)(),se=(0,l.useApi)(l.errorApiRef),ae=(0,l.useApi)(f),{value:de,error:We,loading:Ye,retry:nt}=(0,T.Z)(()=>ae.getEntityByName({kind:w,namespace:N,name:H}),[ae,w,N,H]);return(0,i.useEffect)(()=>{H||(se.post(new Error("No name provided!")),te("/"))},[se,te,We,Ye,de,H]),{entity:de,loading:Ye,error:We,refresh:nt}};function Je(){const w=(0,S.Vt)("entity-context");if(!w)return{entity:void 0,loading:!0,error:void 0,refresh:()=>{}};const N=w.atVersion(1);if(!N)throw new Error("EntityContext v1 not available");const{entity:H,loading:te,error:se,refresh:ae}=N;return{entity:H,loading:te,error:se,refresh:ae}}var rt=e(19126),et=e.n(rt),ut=e(69294),ct=e(48760),at=e(90736);function Rt(w){return w.reduce((N,H)=>({...N,...H.getCatalogFilters?H.getCatalogFilters():{}}),{})}function Pt(w){return N=>w.every(H=>!H.filterEntity||H.filterEntity(N))}function It(w){var N;return(N=w.metadata.annotations)==null?void 0:N[u.wh]}function St(w){var N;return(N=w.metadata.annotations)==null?void 0:N[u.J1]}function yt(w,N,H){var se,ae;let te=((ae=(se=w==null?void 0:w.relations)==null?void 0:se.filter(de=>de.type===N))==null?void 0:ae.map(de=>de.target))||[];return(H==null?void 0:H.kind)&&(te=te==null?void 0:te.filter(de=>de.kind.toLocaleLowerCase("en-US")===H.kind.toLocaleLowerCase("en-US"))),te}function Nt(w,N){var te;const H=(te=w.metadata.annotations)==null?void 0:te[u.wX];if(!!H)try{const se=(0,u.Me)(H),ae=N.byUrl(se.target);return{locationTargetUrl:se.target,integrationType:ae==null?void 0:ae.type}}catch{return}}function Ut(w,N){const H=new Set([...yt(w,u.hr,{kind:"group"}),...w?[(0,u.C_)(w)]:[]].map(u.eE)),te=yt(N,u.S4).map(u.eE);for(const se of te)if(H.has(se))return!0;return!1}const Ot=(0,i.createContext)(void 0),bt=({children:w})=>{const N=(0,at.default)(),H=(0,l.useApi)(f),[te,se]=(0,i.useState)({}),[ae,de]=(0,i.useState)(()=>{var ft;const Ge=et().parse(window.location.search,{ignoreQueryPrefix:!0});return{appliedFilters:{},entities:[],backendEntities:[],queryParameters:(ft=Ge.filters)!=null?ft:{}}}),[{loading:We,error:Ye},nt]=(0,ut.default)(async()=>{var Vt;const Ge=(0,m.compact)(Object.values(te)),ft=Pt(Ge),mt=Rt(Ge),wt=Rt((0,m.compact)(Object.values(ae.appliedFilters))),qt=Object.keys(te).reduce((_t,Rn)=>{const Mt=te[Rn];return(Mt==null?void 0:Mt.toQueryValue)&&(_t[Rn]=Mt.toQueryValue()),_t},{});if((0,m.isEqual)(wt,mt))de({appliedFilters:te,backendEntities:ae.backendEntities,entities:ae.backendEntities.filter(ft),queryParameters:qt});else{const _t=await H.getEntities({filter:mt});de({appliedFilters:te,backendEntities:_t.items,entities:_t.items.filter(ft),queryParameters:qt})}if(N()){const _t=et().parse(window.location.search,{ignoreQueryPrefix:!0}),Rn=et().stringify({..._t,filters:qt},{addQueryPrefix:!0}),Mt=`${window.location.pathname}${Rn}`;(Vt=window.history)==null||Vt.replaceState(null,document.title,Mt)}},[H,te,ae],{loading:!0});(0,ct.Z)(nt,10,[te]);const ot=(0,i.useCallback)(Ge=>{se(ft=>{const mt=typeof Ge=="function"?Ge(ft):Ge;return{...ft,...mt}})},[]),$e=(0,i.useMemo)(()=>({filters:ae.appliedFilters,entities:ae.entities,backendEntities:ae.backendEntities,updateFilters:ot,queryParameters:ae.queryParameters,loading:We,error:Ye}),[ae,ot,We,Ye]);return i.createElement(Ot.Provider,{value:$e},w)};function gt(){const w=(0,i.useContext)(Ot);if(!w)throw new Error("useEntityListProvider must be used within EntityListProvider");return w}var vt=e(64279),$t=e(18149),De=e.n($t);function it(w,N){const H=N==null?void 0:N.defaultKind;let te,se,ae;return"metadata"in w?(te=w.kind,se=w.metadata.namespace,ae=w.metadata.name):(te=w.kind,se=w.namespace,ae=w.name),se===u.sk&&(se=void 0),te=te.toLocaleLowerCase("en-US"),`${(0,u.TH)({kind:H&&H.toLocaleLowerCase("en-US")===te?void 0:te,name:ae,namespace:se})}`}var lt=e(9118),le=e(80030);const Q=(0,i.forwardRef)((w,N)=>{var mt;const{entityRef:H,defaultKind:te,title:se,children:ae,...de}=w,We=(0,l.useRouteRef)(M);let Ye,nt,ot;"metadata"in H?(Ye=H.kind,nt=H.metadata.namespace,ot=H.metadata.name):(Ye=H.kind,nt=H.namespace,ot=H.name),Ye=Ye.toLocaleLowerCase("en-US");const $e={kind:Ye,namespace:(mt=nt==null?void 0:nt.toLocaleLowerCase("en-US"))!=null?mt:u.sk,name:ot},Ge=it(H,{defaultKind:te}),ft=i.createElement(lt.Link,{...de,ref:N,to:We($e)},ae,!ae&&(se!=null?se:Ge));return se?i.createElement(le.ZP,{title:Ge},ft):ft}),P=({entityRefs:w,defaultKind:N,...H})=>i.createElement(i.Fragment,null,w.map((te,se)=>i.createElement(i.Fragment,{key:se},se>0&&", ",i.createElement(Q,{...H,entityRef:te,defaultKind:N}))));class C{constructor(N){this.value=N}getCatalogFilters(){return{kind:this.value}}toQueryValue(){return this.value}}class B{constructor(N){this.value=N}getTypes(){return Array.isArray(this.value)?this.value:[this.value]}getCatalogFilters(){return{"spec.type":this.getTypes()}}toQueryValue(){return this.getTypes()}}class z{constructor(N){this.values=N}filterEntity(N){return this.values.every(H=>{var te;return((te=N.metadata.tags)!=null?te:[]).includes(H)})}toQueryValue(){return this.values}}class _{constructor(N){this.value=N}filterEntity(N){var te;const H=this.value.toLocaleUpperCase("en-US");return N.metadata.name.toLocaleUpperCase("en-US").includes(H)||`${N.metadata.title}`.toLocaleUpperCase("en-US").includes(H)||((te=N.metadata.tags)==null?void 0:te.join("").toLocaleUpperCase("en-US").indexOf(H))!==-1}}class ne{constructor(N){this.values=N}filterEntity(N){return this.values.some(H=>yt(N,u.S4).some(te=>it(te,{defaultKind:"group"})===H))}toQueryValue(){return this.values}}class ge{constructor(N){this.values=N}filterEntity(N){return this.values.some(H=>{var te;return((te=N.spec)==null?void 0:te.lifecycle)===H})}toQueryValue(){return this.values}}class ye{constructor(N,H,te){this.value=N,this.isOwnedEntity=H,this.isStarredEntity=te}filterEntity(N){switch(this.value){case"owned":return this.isOwnedEntity(N);case"starred":return this.isStarredEntity(N);default:return!0}}toQueryValue(){return this.value}}function xe(){var wt;const w=(0,l.useApi)(f),{filters:{kind:N,type:H},queryParameters:te,updateFilters:se}=gt(),ae=[te.type].flat().filter(Boolean),[de,We]=(0,i.useState)(ae.length?ae:(wt=H==null?void 0:H.getTypes())!=null?wt:[]),[Ye,nt]=(0,i.useState)([]),ot=(0,i.useMemo)(()=>N==null?void 0:N.value,[N]),{error:$e,loading:Ge,value:ft}=(0,vt.default)(async()=>ot?await w.getEntities({filter:{kind:ot},fields:["spec.type"]}).then(Vt=>Vt.items):[],[ot,w]),mt=(0,i.useRef)(ft);return(0,i.useEffect)(()=>{const qt=mt.current;if(mt.current=ft,Ge||!ot||qt===ft||!ft)return;const Vt=ft.reduce((Mt,Dn)=>{var Ht;if(typeof((Ht=Dn.spec)==null?void 0:Ht.type)!="string")return Mt;const Sn=Dn.spec.type.toLocaleLowerCase("en-US");return Mt[Sn]||(Mt[Sn]=0),Mt[Sn]+=1,Mt},{}),_t=Object.entries(Vt).sort(([,Mt],[,Dn])=>Dn-Mt).map(([Mt])=>Mt);nt(_t);const Rn=de.filter(Mt=>_t.includes(Mt));De()(de,Rn)||We(Rn)},[Ge,ot,de,We,ft]),(0,i.useEffect)(()=>{se({type:de.length?new B(de):void 0})},[de,se]),{loading:Ge,error:$e,availableTypes:Ye,selectedTypes:de,setSelectedTypes:We}}function ze(){const w=(0,l.useApi)(f),{error:N,loading:H,value:te}=(0,vt.default)(async()=>{const se=await w.getEntities({fields:["kind"]}).then(ae=>ae.items);return[...new Set(se.map(ae=>ae.kind))].sort()});return{error:N,loading:H,kinds:te}}function Me(){const w=(0,l.useApi)(f),N=(0,l.useApi)(l.identityApiRef);return(0,vt.default)(async()=>{const H=await N.getBackstageIdentity();return w.getEntityByName((0,u.of)(H.userEntityRef,{defaultKind:"User",defaultNamespace:u.sk}))},[w,N])}const Te=20;function Fe(w,{type:N,kind:H}){const te=(0,l.useApi)(f),{loading:se,value:ae,error:de}=(0,vt.default)(async()=>{const We=w.relations&&w.relations.filter($e=>(!N||$e.type.toLocaleLowerCase("en-US")===N.toLocaleLowerCase("en-US"))&&(!H||$e.target.kind.toLocaleLowerCase("en-US")===H.toLocaleLowerCase("en-US")));if(!We)return[];const Ye=Object.values((0,m.groupBy)(We,({target:$e})=>`${$e.kind}:${$e.namespace}`.toLocaleLowerCase("en-US"))),nt=[];for(const $e of Ye)nt.push({kind:$e[0].target.kind,namespace:$e[0].target.namespace,nameBatches:(0,m.chunk)($e.map(Ge=>Ge.target.name),Te)});return(await Promise.all(nt.flatMap($e=>$e.nameBatches.map(Ge=>te.getEntities({filter:{kind:$e.kind,"metadata.namespace":$e.namespace,"metadata.name":Ge}}))))).flatMap($e=>$e.items)},[w,N]);return{entities:ae,loading:se,error:de}}var ue=e(72164);function Ee(w){return typeof w=="string"?w:(0,u.eE)(w)}function Ne(){const w=(0,l.useApi)(E),N=(0,ue.Z)(w.starredEntitie$(),new Set),H=(0,i.useCallback)(se=>N.has(Ee(se)),[N]),te=(0,i.useCallback)(se=>w.toggleStarred(Ee(se)).then(),[w]);return{starredEntities:N,toggleStarredEntity:te,isStarredEntity:H}}function Ue(w){return typeof w=="string"?w:(0,u.eE)(w)}function Be(w){const N=(0,l.useApi)(E),[H,te]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{const ae=N.starredEntitie$().subscribe({next(de){te(de.has(Ue(w)))}});return()=>{ae.unsubscribe()}},[w,N]),{toggleStarredEntity:(0,i.useCallback)(()=>N.toggleStarred(Ue(w)).then(),[w,N]),isStarredEntity:H}}async function st(w){return(await w.getBackstageIdentity()).ownershipEntityRefs}async function be(w,N){const H=new Array,te=N.find(se=>se.startsWith("user:"));if(te){const se=await w.getEntityByName((0,u.of)(te));if(se){const ae=yt(se,u.hr,{kind:"Group"});for(const de of ae)H.push((0,u.eE)(de))}}return H}function Qe(){const w=(0,l.useApi)(l.identityApiRef),N=(0,l.useApi)(f),{loading:H,value:te}=(0,vt.default)(async()=>{const{ownershipEntityRefs:ae}=await w.getBackstageIdentity(),de=await be(N,ae);return new Set([...ae,...de])},[]),se=(0,i.useMemo)(()=>{const ae=new Set(te!=null?te:[]);return de=>{const We=("metadata"in de?yt(de,u.S4):[de]).map(u.eE);for(const Ye of We)if(ae.has(Ye))return!0;return!1}},[te]);return(0,i.useMemo)(()=>({loading:H,isOwnedEntity:se}),[H,se])}function Xe(w){const N=useApi(identityApiRef),H=useApi(catalogApiRef),{loading:te,value:se}=useAsync(async()=>{const de=await loadIdentityOwnerRefs(N),We=await loadCatalogOwnerRefs(H,de);return await H.getEntities(w?{filter:{kind:w,[`relations.${RELATION_OWNED_BY}`]:[...de,...We]}}:{filter:{[`relations.${RELATION_OWNED_BY}`]:[...de,...We]}})},[]),ae=useMemo(()=>se,[se]);return useMemo(()=>({loading:te,ownedEntities:ae}),[te,ae])}const dt=({initialFilter:w,hidden:N})=>{var ae;const{updateFilters:H,queryParameters:te}=useEntityListProvider(),[se]=useState((ae=[te.kind].flat()[0])!=null?ae:w);return useEffect(()=>{H({kind:se?new EntityKindFilter(se):void 0})},[se,H]),N?null:React.createElement(Alert,{severity:"warning"},"Kind filter not yet available")};var K=e(79692),A=e(95544),D=e(90436),X=e(5806),q=e(21324),Se=e(86619),he=e(19996),Le=e(25505),tt=e(38016),Tt=e(88013);const gn=(0,K.Z)({input:{}},{name:"CatalogReactEntityLifecyclePicker"}),ie=i.createElement(Le.Z,{fontSize:"small"}),$=i.createElement(he.Z,{fontSize:"small"}),ee=()=>{var nt,ot;const w=gn(),{updateFilters:N,backendEntities:H,filters:te,queryParameters:se}=gt(),ae=[se.lifecycles].flat().filter(Boolean),[de,We]=(0,i.useState)(ae.length?ae:(ot=(nt=te.lifecycles)==null?void 0:nt.values)!=null?ot:[]);(0,i.useEffect)(()=>{N({lifecycles:de.length?new ge(de):void 0})},[de,N]);const Ye=(0,i.useMemo)(()=>[...new Set(H.map($e=>{var Ge;return(Ge=$e.spec)==null?void 0:Ge.lifecycle}).filter(Boolean))].sort(),[H]);return Ye.length?i.createElement(A.Z,{pb:1,pt:1},i.createElement(D.Z,{variant:"button"},"Lifecycle"),i.createElement(Tt.ZP,{"aria-label":"Lifecycle",multiple:!0,options:Ye,value:de,onChange:($e,Ge)=>We(Ge),renderOption:($e,{selected:Ge})=>i.createElement(X.Z,{control:i.createElement(q.Z,{icon:ie,checkedIcon:$,checked:Ge}),label:$e}),size:"small",popupIcon:i.createElement(tt.Z,{"data-testid":"lifecycle-picker-expand"}),renderInput:$e=>i.createElement(Se.Z,{...$e,className:w.input,variant:"outlined"})})):null},pe=(0,K.Z)({input:{}},{name:"CatalogReactEntityOwnerPicker"}),Ve=i.createElement(Le.Z,{fontSize:"small"}),ke=i.createElement(he.Z,{fontSize:"small"}),At=()=>{var nt,ot;const w=pe(),{updateFilters:N,backendEntities:H,filters:te,queryParameters:se}=gt(),ae=[se.owners].flat().filter(Boolean),[de,We]=(0,i.useState)(ae.length?ae:(ot=(nt=te.owners)==null?void 0:nt.values)!=null?ot:[]);(0,i.useEffect)(()=>{N({owners:de.length?new ne(de):void 0})},[de,N]);const Ye=(0,i.useMemo)(()=>[...new Set(H.flatMap($e=>yt($e,u.S4).map(Ge=>it(Ge,{defaultKind:"group"}))).filter(Boolean))].sort(),[H]);return Ye.length?i.createElement(A.Z,{pb:1,pt:1},i.createElement(D.Z,{variant:"button"},"Owner"),i.createElement(Tt.ZP,{multiple:!0,"aria-label":"Owner",options:Ye,value:de,onChange:($e,Ge)=>We(Ge),renderOption:($e,{selected:Ge})=>i.createElement(X.Z,{control:i.createElement(q.Z,{icon:Ve,checkedIcon:ke,checked:Ge}),label:$e}),size:"small",popupIcon:i.createElement(tt.Z,{"data-testid":"owner-picker-expand"}),renderInput:$e=>i.createElement(Se.Z,{...$e,className:w.input,variant:"outlined"})})):null},Bt=(0,K.Z)(w=>({searchToolbar:{paddingLeft:0,paddingRight:0},input:{}}),{name:"CatalogReactEntitySearchBar"}),an=()=>{var ae,de;const w=Bt(),{filters:N,updateFilters:H}=useEntityListProvider(),[te,se]=useState((de=(ae=N.text)==null?void 0:ae.value)!=null?de:"");return useDebounce(()=>{H({text:te.length?new EntityTextFilter(te):void 0})},250,[te,H]),React.createElement(Toolbar,{className:w.searchToolbar},React.createElement(FormControl,null,React.createElement(Input,{id:"input-with-icon-adornment",className:w.input,placeholder:"Search",autoComplete:"off",onChange:We=>se(We.target.value),value:te,startAdornment:React.createElement(InputAdornment,{position:"start"},React.createElement(Search,null)),endAdornment:React.createElement(InputAdornment,{position:"end"},React.createElement(IconButton,{"aria-label":"clear search",onClick:()=>se(""),edge:"end",disabled:te.length===0},React.createElement(Clear,null)))})))};function on({defaultKind:w}){function N(H){var te;return((te=H.metadata)==null?void 0:te.title)||it(H,{defaultKind:w})}return{title:"Name",highlight:!0,customFilterAndSearch(H,te){return N(te).includes(H)},customSort(H,te){return N(H).localeCompare(N(te))},render:H=>{var te;return i.createElement(Q,{entityRef:H,defaultKind:w,title:(te=H.metadata)==null?void 0:te.title})}}}function Ln({title:w,relation:N,defaultKind:H,filter:te}){function se(de){return yt(de,N,te)}function ae(de){return se(de).map(We=>it(We,{defaultKind:H})).join(", ")}return{title:w,customFilterAndSearch(de,We){return ae(We).includes(de)},customSort(de,We){return ae(de).localeCompare(ae(We))},render:de=>i.createElement(P,{entityRefs:se(de),defaultKind:H})}}function On(){return Ln({title:"Owner",relation:u.S4,defaultKind:"group"})}function Fn(){return Ln({title:"Domain",relation:u.cz,defaultKind:"domain",filter:{kind:"domain"}})}function Et(){return Ln({title:"System",relation:u.cz,defaultKind:"system",filter:{kind:"system"}})}function Zt(){return{title:"Description",field:"metadata.description",render:w=>i.createElement(lt.OverflowTooltip,{text:w.metadata.description,placement:"bottom-start",line:2}),width:"auto"}}function sn(){return{title:"Lifecycle",field:"spec.lifecycle"}}function Bn(){return{title:"Type",field:"spec.type"}}const Kt=[on({defaultKind:"system"}),Fn(),On(),Zt()],Jn=[on({defaultKind:"component"}),Et(),On(),Bn(),sn(),Zt()],rr=(0,K.Z)(w=>({empty:{padding:w.spacing(2),display:"flex",justifyContent:"center"}}));function xn({entities:w,title:N,emptyContent:H,variant:te="gridItem",columns:se}){const ae=rr(),de={minWidth:"0",width:"100%"};return te==="gridItem"&&(de.height="calc(100% - 10px)"),i.createElement(lt.Table,{columns:se,title:N,style:de,emptyContent:H&&i.createElement("div",{className:ae.empty},H),options:{search:!1,paging:!1,actionsColumnIndex:-1,padding:"dense"},data:w})}xn.columns=r,xn.systemEntityColumns=Kt,xn.componentEntityColumns=Jn;const Er=(0,K.Z)({input:{}},{name:"CatalogReactEntityTagPicker"}),Ar=i.createElement(Le.Z,{fontSize:"small"}),zn=i.createElement(he.Z,{fontSize:"small"}),ar=()=>{var nt,ot;const w=Er(),{updateFilters:N,backendEntities:H,filters:te,queryParameters:se}=gt(),ae=[se.tags].flat().filter(Boolean),[de,We]=(0,i.useState)(ae.length?ae:(ot=(nt=te.tags)==null?void 0:nt.values)!=null?ot:[]);(0,i.useEffect)(()=>{N({tags:de.length?new z(de):void 0})},[de,N]);const Ye=(0,i.useMemo)(()=>[...new Set(H.flatMap($e=>$e.metadata.tags).filter(Boolean))].sort(),[H]);return Ye.length?i.createElement(A.Z,{pb:1,pt:1},i.createElement(D.Z,{variant:"button"},"Tags"),i.createElement(Tt.ZP,{multiple:!0,"aria-label":"Tags",options:Ye,value:de,onChange:($e,Ge)=>We(Ge),renderOption:($e,{selected:Ge})=>i.createElement(X.Z,{control:i.createElement(q.Z,{icon:Ar,checkedIcon:zn,checked:Ge}),label:$e}),size:"small",popupIcon:i.createElement(tt.Z,{"data-testid":"tag-picker-expand"}),renderInput:$e=>i.createElement(Se.Z,{...$e,className:w.input,variant:"outlined"})})):null};var or=e(82108),sr=e.n(or);const Yn=w=>{var nt;const{hidden:N,initialFilter:H}=w,te=(0,l.useApi)(l.alertApiRef),{error:se,availableTypes:ae,selectedTypes:de,setSelectedTypes:We}=xe();if((0,i.useEffect)(()=>{se&&te.post({message:"Failed to load entity types",severity:"error"}),H&&We([H])},[se,te,H,We]),ae.length===0||se)return null;const Ye=[{value:"all",label:"All"},...ae.map(ot=>({value:ot,label:sr()(ot)}))];return N?null:i.createElement(A.Z,{pb:1,pt:1},i.createElement(lt.Select,{label:"Type",items:Ye,selected:(nt=Ye.length>1?de[0]:void 0)!=null?nt:"all",onChange:ot=>We(ot==="all"?[]:[String(ot)])}))};var vr=e(15459),ir=e(61837),Mn=e(11640),Rr=e(28347);const Sr=(0,vr.Z)({root:{color:"#f3ba37"}})(Mn.Z),Qn=w=>w?"Remove from favorites":"Add to favorites",Xn=w=>w?i.createElement(Sr,null):i.createElement(Rr.Z,null),lr=w=>{const{toggleStarredEntity:N,isStarredEntity:H}=Be(w.entity);return i.createElement(ir.Z,{color:"inherit",...w,onClick:()=>N()},i.createElement(le.ZP,{title:Qn(H)},Xn(H)))};var pn=e(77277),yn=e(55999),cr=e(85256),ur=e(8629),Cr=e(79249),Tr=e(38724),dr=e(49429),Jt=e(99688);function Pr(w){var ft;const N=(0,l.useApi)(f),H=(ft=w.metadata.annotations)==null?void 0:ft[u.lb],te=w.metadata.uid,se=H==="bootstrap:bootstrap",ae=(0,vt.default)(async()=>{const mt=N.getOriginLocationByEntity(w);let wt;if(!H)wt=Promise.resolve([]);else{const qt=`metadata.annotations.${u.lb}`;wt=N.getEntities({filter:{[qt]:H},fields:["kind","metadata.uid","metadata.name","metadata.namespace"]}).then(Vt=>Vt.items)}return Promise.all([mt,wt]).then(([qt,Vt])=>({location:qt,colocatedEntities:Vt}))},[N,w]),de=(0,i.useCallback)(async function(){const{location:wt,colocatedEntities:qt}=ae.value;await N.removeLocationById(wt.id),await Promise.allSettled(qt.map(Vt=>N.removeEntityByUid(Vt.metadata.uid)))},[N,ae]),We=(0,i.useCallback)(async function(){await N.removeEntityByUid(te)},[N,te]);if(se)return{type:"bootstrap",location:H,deleteEntity:We};const{loading:Ye,error:nt,value:ot}=ae;if(Ye)return{type:"loading"};if(nt)return{type:"error",error:nt};const{location:$e,colocatedEntities:Ge}=ot;return $e?{type:"unregister",location:H,colocatedEntities:Ge.map(u.C_),unregisterLocation:de,deleteEntity:We}:{type:"only-delete",deleteEntity:We}}var kn=e(10179);const Ir=(0,K.Z)({advancedButton:{fontSize:"0.7em"}}),kr=({entity:w,onConfirm:N})=>{var ft;const H=(0,l.useApi)(l.alertApiRef),te=(0,l.useApi)(l.configApiRef),se=Ir(),ae=Pr(w),[de,We]=(0,i.useState)(!1),[Ye,nt]=(0,i.useState)(!1),ot=(ft=te.getOptionalString("app.title"))!=null?ft:"Backstage",$e=(0,i.useCallback)(async function(){if("unregisterLocation"in ae){nt(!0);try{await ae.unregisterLocation(),N()}catch(wt){(0,kn.BD)(wt),H.post({message:wt.message})}finally{nt(!1)}}},[H,N,ae]),Ge=(0,i.useCallback)(async function(){if("deleteEntity"in ae){nt(!0);try{await ae.deleteEntity(),N()}catch(wt){(0,kn.BD)(wt),H.post({message:wt.message})}finally{nt(!1)}}},[H,N,ae]);return ae.type==="loading"?i.createElement(lt.Progress,null):ae.type==="error"?i.createElement(lt.ResponseErrorPanel,{error:ae.error}):ae.type==="bootstrap"?i.createElement(i.Fragment,null,i.createElement(Jt.Z,{severity:"info"},'You cannot unregister this entity, since it originates from a protected Backstage configuration (location "',ae.location,'"). If you believe this is in error, please contact the ',ot," ","integrator."),i.createElement(A.Z,{marginTop:2},!de&&i.createElement(pn.Z,{variant:"text",size:"small",color:"primary",className:se.advancedButton,onClick:()=>We(!0)},"Advanced Options"),de&&i.createElement(i.Fragment,null,i.createElement(yn.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."),i.createElement(pn.Z,{variant:"contained",color:"secondary",disabled:Ye,onClick:Ge},"Delete Entity")))):ae.type==="only-delete"?i.createElement(i.Fragment,null,i.createElement(yn.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."),i.createElement(pn.Z,{variant:"contained",color:"secondary",disabled:Ye,onClick:Ge},"Delete Entity")):ae.type==="unregister"?i.createElement(i.Fragment,null,i.createElement(yn.Z,null,"This action will unregister the following entities:"),i.createElement(yn.Z,{component:"ul"},ae.colocatedEntities.map(mt=>i.createElement("li",{key:`${mt.kind}:${mt.namespace}/${mt.name}`},i.createElement(Q,{entityRef:mt})))),i.createElement(yn.Z,null,"Located at the following location:"),i.createElement(yn.Z,{component:"ul"},i.createElement("li",null,ae.location)),i.createElement(yn.Z,null,"To undo, just re-register the entity in ",ot,"."),i.createElement(A.Z,{marginTop:2},i.createElement(pn.Z,{variant:"contained",color:"secondary",disabled:Ye,onClick:$e},"Unregister Location"),!de&&i.createElement(A.Z,{component:"span",marginLeft:2},i.createElement(pn.Z,{variant:"text",size:"small",color:"primary",className:se.advancedButton,onClick:()=>We(!0)},"Advanced Options"))),de&&i.createElement(i.Fragment,null,i.createElement(A.Z,{paddingTop:4,paddingBottom:4},i.createElement(cr.Z,null)),i.createElement(yn.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."),i.createElement(pn.Z,{variant:"contained",color:"secondary",disabled:Ye,onClick:Ge},"Delete Entity"))):i.createElement(Jt.Z,{severity:"error"},"Internal error: Unknown state")},Lr=({open:w,onConfirm:N,onClose:H,entity:te})=>i.createElement(ur.Z,{open:w,onClose:H},i.createElement(Cr.Z,{id:"responsive-dialog-title"},"Are you sure you want to unregister this entity?"),i.createElement(Tr.Z,null,i.createElement(kr,{entity:te,onConfirm:N})),i.createElement(dr.Z,null,i.createElement(pn.Z,{onClick:H,color:"primary"},"Cancel")));var fr=e(94339),qr=e(11776),_r=e(12231),Or=e(86136),ea=e(49378),xr=e(9520),Dr=e(47603);const br=(0,K.Z)(w=>({root:{backgroundColor:"rgba(0, 0, 0, .11)",boxShadow:"none",margin:w.spacing(1,0,1,0)},title:{margin:w.spacing(1,0,0,1),textTransform:"uppercase",fontSize:12,fontWeight:"bold"},listIcon:{minWidth:30,color:w.palette.text.primary},menuItem:{minHeight:w.spacing(6)},groupWrapper:{margin:w.spacing(1,1,2,1)}}),{name:"CatalogReactUserListPicker"});function Nn(w){return[{name:"Personal",items:[{id:"owned",label:"Owned",icon:Dr.Z},{id:"starred",label:"Starred",icon:Mn.Z}]},{name:w!=null?w:"Company",items:[{id:"all",label:"All"}]}]}const mr=({initialFilter:w,availableFilters:N})=>{var Dn,Sn;const H=br(),se=(Dn=(0,l.useApi)(l.configApiRef).getOptionalString("organization.name"))!=null?Dn:"Company",{filters:ae,updateFilters:de,backendEntities:We,queryParameters:Ye}=gt(),nt=["starred","all"],ot=Nn(se).map(Ht=>({...Ht,items:Ht.items.filter(({id:Yt})=>["group","user"].some(Un=>Un===Ye.kind)?nt.includes(Yt):!N||N.includes(Yt))})).filter(({items:Ht})=>!!Ht.length),{isStarredEntity:$e}=Ne(),{isOwnedEntity:Ge}=Qe(),ft=(0,i.useMemo)(()=>new ye("owned",Ge,$e),[Ge,$e]),mt=(0,i.useMemo)(()=>new ye("starred",Ge,$e),[Ge,$e]),[wt,qt]=(0,i.useState)(We),Vt=wt.filter(Ht=>ft.filterEntity(Ht)).length,[_t,Rn]=(0,i.useState)(Vt>0?(Sn=[Ye.user].flat()[0])!=null?Sn:w:"all");(0,i.useEffect)(()=>{de({user:_t?new ye(_t,Ge,$e):void 0})},[_t,Ge,$e,de]),(0,i.useEffect)(()=>{const Ht=Pt((0,m.compact)(Object.values({...ae,user:void 0})));qt(We.filter(Ht))},[ae,We]);function Mt(Ht){switch(Ht){case"owned":return Vt;case"starred":return wt.filter(Yt=>mt.filterEntity(Yt)).length;default:return wt.length}}return i.createElement(fr.Z,{className:H.root},ot.map(Ht=>i.createElement(i.Fragment,{key:Ht.name},i.createElement(D.Z,{variant:"subtitle2",className:H.title},Ht.name),i.createElement(fr.Z,{className:H.groupWrapper},i.createElement(qr.Z,{disablePadding:!0,dense:!0},Ht.items.map(Yt=>{var Un,$n;return i.createElement(_r.Z,{key:Yt.id,button:!0,divider:!0,onClick:()=>Rn(Yt.id),selected:Yt.id===((Un=ae.user)==null?void 0:Un.value),className:H.menuItem},Yt.icon&&i.createElement(Or.Z,{className:H.listIcon},i.createElement(Yt.icon,{fontSize:"small"})),i.createElement(ea.Z,null,i.createElement(D.Z,{variant:"body1","data-testid":`user-picker-${Yt.id}`},Yt.label)),i.createElement(xr.Z,null,($n=Mt(Yt.id))!=null?$n:"-"))}))))))},Fr=({children:w,value:N})=>{var Ye;const[H,te]=useState((Ye=N==null?void 0:N.filters)!=null?Ye:{}),se=useCallback(nt=>{te(ot=>{const $e=typeof nt=="function"?nt(ot):nt;return{...ot,...$e}})},[]),ae={entities:[],backendEntities:[],updateFilters:se,filters:H,loading:!1,queryParameters:{}},{filters:de,...We}=N!=null?N:{};return React.createElement(EntityListContext.Provider,{value:{...ae,...We}},w)};var Br=e(92787)},92787:function(){},39398:function(J,o,e){"use strict";e.r(o),e.d(o,{AboutCard:function(){return we},AboutContent:function(){return fe},AboutField:function(){return Y}});var r=e(52890),t=e(9118),l=e(36964),f=e(36356),g=e(85653),s=e(79692),u=e(94339),m=e(32552),y=e(61837),h=e(85256),E=e(24579),i=e(52866),S=e(30254),F=e(27604),T=e(2784),j=e(47851),x=e(60905),b=e(90436),M=e(7089);const O=(0,s.Z)(me=>({value:{fontWeight:"bold",overflow:"hidden",lineHeight:"24px",wordBreak:"break-word"},label:{color:me.palette.text.secondary,textTransform:"uppercase",fontSize:"10px",fontWeight:"bold",letterSpacing:.5,overflow:"hidden",whiteSpace:"nowrap"}})),Y=({label:me,value:je,gridSizes:Oe,children:Je})=>{const rt=O(),et=(0,l.useElementFilter)(Je,ct=>ct.getElements()),ut=et.length>0?et:T.createElement(b.Z,{variant:"body2",className:rt.value},je||"unknown");return T.createElement(x.Z,{item:!0,...Oe},T.createElement(b.Z,{variant:"subtitle2",className:rt.label},me),ut)},G=(0,s.Z)({description:{wordBreak:"break-word"}}),fe=({entity:me})=>{var yt,Nt,Ut,Ot,bt,gt;const je=G(),Oe=me.kind.toLocaleLowerCase("en-US")==="system",Je=me.kind.toLocaleLowerCase("en-US")==="resource",rt=me.kind.toLocaleLowerCase("en-US")==="component",et=me.kind.toLocaleLowerCase("en-US")==="api",ut=me.kind.toLocaleLowerCase("en-US")==="template",ct=me.kind.toLocaleLowerCase("en-US")==="location",at=me.kind.toLocaleLowerCase("en-US")==="group",Rt=(0,g.getEntityRelations)(me,r.cz,{kind:"system"}),Pt=(0,g.getEntityRelations)(me,r.cz,{kind:"component"}),It=(0,g.getEntityRelations)(me,r.cz,{kind:"domain"}),St=(0,g.getEntityRelations)(me,r.S4);return T.createElement(x.Z,{container:!0},T.createElement(Y,{label:"Description",gridSizes:{xs:12}},T.createElement(b.Z,{variant:"body2",paragraph:!0,className:je.description},((yt=me==null?void 0:me.metadata)==null?void 0:yt.description)||"No description")),T.createElement(Y,{label:"Owner",value:"No Owner",gridSizes:{xs:12,sm:6,lg:4}},St.length>0&&T.createElement(g.EntityRefLinks,{entityRefs:St,defaultKind:"group"})),(Oe||It.length>0)&&T.createElement(Y,{label:"Domain",value:"No Domain",gridSizes:{xs:12,sm:6,lg:4}},It.length>0&&T.createElement(g.EntityRefLinks,{entityRefs:It,defaultKind:"domain"})),(et||rt||Je||Rt.length>0)&&T.createElement(Y,{label:"System",value:"No System",gridSizes:{xs:12,sm:6,lg:4}},Rt.length>0&&T.createElement(g.EntityRefLinks,{entityRefs:Rt,defaultKind:"system"})),rt&&Pt.length>0&&T.createElement(Y,{label:"Parent Component",value:"No Parent Component",gridSizes:{xs:12,sm:6,lg:4}},T.createElement(g.EntityRefLinks,{entityRefs:Pt,defaultKind:"component"})),(et||rt||Je||ut||at||ct||typeof((Nt=me==null?void 0:me.spec)==null?void 0:Nt.type)=="string")&&T.createElement(Y,{label:"Type",value:(Ut=me==null?void 0:me.spec)==null?void 0:Ut.type,gridSizes:{xs:12,sm:6,lg:4}}),(et||rt||typeof((Ot=me==null?void 0:me.spec)==null?void 0:Ot.lifecycle)=="string")&&T.createElement(Y,{label:"Lifecycle",value:(bt=me==null?void 0:me.spec)==null?void 0:bt.lifecycle,gridSizes:{xs:12,sm:6,lg:4}}),T.createElement(Y,{label:"Tags",value:"No Tags",gridSizes:{xs:12,sm:6,lg:4}},(((gt=me==null?void 0:me.metadata)==null?void 0:gt.tags)||[]).map(vt=>T.createElement(M.Z,{key:vt,size:"small",label:vt}))))},Re=(0,s.Z)({gridItemCard:{display:"flex",flexDirection:"column",height:"calc(100% - 10px)",marginBottom:"10px"},fullHeightCard:{display:"flex",flexDirection:"column",height:"100%"},gridItemCardContent:{flex:1},fullHeightCardContent:{flex:1}});function we({variant:me}){var Ot,bt;const je=Re(),{entity:Oe}=(0,g.useEntity)(),Je=(0,l.useApi)(f.q3),rt=(0,l.useApi)(g.Ah),et=(0,l.useApi)(l.alertApiRef),ut=(0,l.useRouteRef)(j.j),ct=(0,g.getEntitySourceLocation)(Oe,Je),at=(0,g.getEntityMetadataEditUrl)(Oe),Rt={label:"View Source",disabled:!ct,icon:T.createElement(f.nW,{type:ct==null?void 0:ct.integrationType}),href:ct==null?void 0:ct.locationTargetUrl},Pt={label:"View TechDocs",disabled:!((Ot=Oe.metadata.annotations)==null?void 0:Ot["backstage.io/techdocs-ref"])||!ut,icon:T.createElement(S.Z,null),href:ut&&ut({namespace:Oe.metadata.namespace||r.sk,kind:Oe.kind,name:Oe.metadata.name})};let It="";me==="gridItem"?It=je.gridItemCard:me==="fullHeight"&&(It=je.fullHeightCard);let St="";me==="gridItem"?St=je.gridItemCardContent:me==="fullHeight"&&(St=je.fullHeightCardContent);const yt=(bt=Oe.metadata.annotations)==null?void 0:bt[r.Jl],Nt=(yt==null?void 0:yt.startsWith("url:"))||(yt==null?void 0:yt.startsWith("file:")),Ut=(0,T.useCallback)(async()=>{await rt.refreshEntity((0,r.eE)(Oe)),et.post({message:"Refresh scheduled",severity:"info"})},[rt,et,Oe]);return T.createElement(u.Z,{className:It},T.createElement(m.Z,{title:"About",action:T.createElement(T.Fragment,null,Nt&&T.createElement(y.Z,{"aria-label":"Refresh",title:"Schedule entity refresh",onClick:Ut},T.createElement(i.Z,null)),T.createElement(y.Z,{component:t.Link,"aria-label":"Edit",disabled:!at,title:"Edit Metadata",to:at!=null?at:"#"},T.createElement(F.Z,null))),subheader:T.createElement(t.HeaderIconLinkRow,{links:[Rt,Pt]})}),T.createElement(h.Z,null),T.createElement(E.Z,{className:St},T.createElement(fe,{entity:Oe})))}},49782:function(J,o,e){"use strict";e.d(o,{K:function(){return h}});var r=e(2784),t=e(79692),l=e(12420),f=e(97580),g=e(73698),s=e(74603),u=e(12231),m=e(85653);const y=(0,t.Z)(E=>(0,l.Z)({root:{...E.typography.h4}})),h=({initialFilter:E="component"})=>{var M;const i=y(),{kinds:S=[]}=(0,m.useEntityKinds)(),{updateFilters:F,queryParameters:T}=(0,m.useEntityListProvider)(),[j,x]=(0,r.useState)(((M=[T.kind].flat()[0])!=null?M:E).toLocaleLowerCase("en-US"));(0,r.useEffect)(()=>{F({kind:j?new m.EntityKindFilter(j):void 0})},[j,F]);const b=[(0,f.Z)(j)].concat(S).sort().reduce((O,Y)=>(O[Y.toLocaleLowerCase("en-US")]=Y,O),{});return r.createElement(g.Z,{input:r.createElement(s.Z,{value:j}),value:j,onChange:O=>x(O.target.value),classes:i},Object.keys(b).map(O=>r.createElement(u.Z,{value:O,key:O},`${b[O]}s`)))}},7758:function(J,o,e){"use strict";e.r(o),e.d(o,{CatalogPage:function(){return E},DefaultCatalogPage:function(){return h}});var r=e(2784),t=e(10289),l=e(9118),f=e(36964),g=e(85653),s=e(47851),u=e(91730),m=e(26997),y=e(49782);const h=({columns:i,actions:S,initiallySelectedFilter:F="owned"})=>{var x;const T=(x=(0,f.useApi)(f.configApiRef).getOptionalString("organization.name"))!=null?x:"Backstage",j=(0,f.useRouteRef)(s.y);return r.createElement(l.PageWithHeader,{title:`${T} Catalog`,themeId:"home"},r.createElement(g.EntityListProvider,null,r.createElement(l.Content,null,r.createElement(l.ContentHeader,{titleComponent:r.createElement(y.K,null)},r.createElement(l.CreateButton,{title:"Create Component",to:j&&j()}),r.createElement(l.SupportButton,null,"All your software catalog entities")),r.createElement(m.q7,null,r.createElement(m.Gh,null,r.createElement(g.EntityTypePicker,null),r.createElement(g.UserListPicker,{initialFilter:F}),r.createElement(g.EntityOwnerPicker,null),r.createElement(g.EntityLifecyclePicker,null),r.createElement(g.EntityTagPicker,null)),r.createElement(m.Nz,null,r.createElement(u.E,{columns:i,actions:S}))))))},E=i=>(0,t.pC)()||r.createElement(h,{...i})},17499:function(J,o,e){"use strict";e.r(o),e.d(o,{createNameColumn:function(){return g},createSystemColumn:function(){return s},createOwnerColumn:function(){return u},createSpecTypeColumn:function(){return m},createSpecLifecycleColumn:function(){return y},createMetadataDescriptionColumn:function(){return h},createTagsColumn:function(){return E}});var r=e(2784),t=e(85653),l=e(7089),f=e(9118);function g(i){function S(F){var T;return((T=F.metadata)==null?void 0:T.title)||(0,t.formatEntityRefTitle)(F,{defaultKind:i==null?void 0:i.defaultKind})}return{title:"Name",field:"resolved.name",highlight:!0,customSort({entity:F},{entity:T}){return S(F).localeCompare(S(T))},render:({entity:F})=>{var T;return r.createElement(t.EntityRefLink,{entityRef:F,defaultKind:(i==null?void 0:i.defaultKind)||"Component",title:(T=F.metadata)==null?void 0:T.title})}}}function s(){return{title:"System",field:"resolved.partOfSystemRelationTitle",render:({resolved:i})=>r.createElement(t.EntityRefLinks,{entityRefs:i.partOfSystemRelations,defaultKind:"system"})}}function u(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:i})=>r.createElement(t.EntityRefLinks,{entityRefs:i.ownedByRelations,defaultKind:"group"})}}function m(){return{title:"Type",field:"entity.spec.type",hidden:!0}}function y(){return{title:"Lifecycle",field:"entity.spec.lifecycle"}}function h(){return{title:"Description",field:"entity.metadata.description",render:({entity:i})=>r.createElement(f.OverflowTooltip,{text:i.metadata.description,placement:"bottom-start"}),width:"auto"}}function E(){return{title:"Tags",field:"entity.metadata.tags",cellStyle:{padding:"0px 16px 0px 20px"},render:({entity:i})=>r.createElement(r.Fragment,null,i.metadata.tags&&i.metadata.tags.map(S=>r.createElement(l.Z,{key:S,label:S,size:"small",variant:"outlined",style:{marginBottom:"0px"}})))}}},91730:function(J,o,e){"use strict";e.d(o,{E:function(){return y}});var r=e(52890),t=e(85653),l=e(27604),f=e(2997),g=e(76635),s=e(2784),u=e(17499),m=e(9118);const y=({columns:h,actions:E})=>{var we,me,je;const{isStarredEntity:i,toggleStarredEntity:S}=(0,t.useStarredEntities)(),{loading:F,error:T,entities:j,filters:x}=(0,t.useEntityListProvider)(),b=(0,s.useMemo)(()=>{var Oe;return[u.createNameColumn({defaultKind:(Oe=x.kind)==null?void 0:Oe.value}),u.createSystemColumn(),u.createOwnerColumn(),u.createSpecTypeColumn(),u.createSpecLifecycleColumn(),u.createMetadataDescriptionColumn(),u.createTagsColumn()]},[(we=x.kind)==null?void 0:we.value]),M=x.type===void 0,O=(0,g.capitalize)((je=(me=x.user)==null?void 0:me.value)!=null?je:"all");if(T)return s.createElement("div",null,s.createElement(m.WarningPanel,{severity:"error",title:"Could not fetch catalog entities."},s.createElement(m.CodeSnippet,{language:"text",text:T.toString()})));const Y=[({entity:Oe})=>{const Je=(0,t.getEntityMetadataViewUrl)(Oe);return{icon:()=>s.createElement(f.Z,{"aria-label":"View",fontSize:"small"}),tooltip:"View",disabled:!Je,onClick:()=>{!Je||window.open(Je,"_blank")}}},({entity:Oe})=>{const Je=(0,t.getEntityMetadataEditUrl)(Oe);return{icon:()=>s.createElement(l.Z,{"aria-label":"Edit",fontSize:"small"}),tooltip:"Edit",disabled:!Je,onClick:()=>{!Je||window.open(Je,"_blank")}}},({entity:Oe})=>{const Je=i(Oe);return{cellStyle:{paddingLeft:"1em"},icon:()=>(0,t.favoriteEntityIcon)(Je),tooltip:(0,t.favoriteEntityTooltip)(Je),onClick:()=>S(Oe)}}],G=j.map(Oe=>{const Je=(0,t.getEntityRelations)(Oe,r.cz,{kind:"system"}),rt=(0,t.getEntityRelations)(Oe,r.S4);return{entity:Oe,resolved:{name:(0,t.formatEntityRefTitle)(Oe,{defaultKind:"Component"}),ownedByRelationsTitle:rt.map(et=>(0,t.formatEntityRefTitle)(et,{defaultKind:"group"})).join(", "),ownedByRelations:rt,partOfSystemRelationTitle:Je.map(et=>(0,t.formatEntityRefTitle)(et,{defaultKind:"system"})).join(", "),partOfSystemRelations:Je}}}),fe=(h||b).find(Oe=>Oe.title==="Type");fe&&(fe.hidden=!M);const Re=G.length>20;return s.createElement(m.Table,{isLoading:F,columns:h||b,options:{paging:Re,pageSize:20,actionsColumnIndex:-1,loadingType:"linear",showEmptyDataSourceMessage:!F,padding:"dense",pageSizeOptions:[20,50,100]},title:`${O} (${j.length})`,data:G,actions:E||Y})};y.columns=u},26997:function(J,o,e){"use strict";e.d(o,{Nz:function(){return i},Gh:function(){return E},q7:function(){return l}});var r=e(60905),t=e(2784);const l=({children:S})=>t.createElement(r.Z,{container:!0,style:{position:"relative"}},S);var f=e(41156),g=e(60364),s=e(77277),u=e(4190),m=e(95544),y=e(90436),h=e(36444);const E=({children:S})=>{const F=(0,f.Z)(b=>b.breakpoints.down("md")),T=(0,g.Z)(),[j,x]=(0,t.useState)(!1);return F?t.createElement(t.Fragment,null,t.createElement(s.Z,{style:{marginTop:T.spacing(1),marginLeft:T.spacing(1)},onClick:()=>x(!0),startIcon:t.createElement(h.Z,null)},"Filters"),t.createElement(u.ZP,{open:j,onClose:()=>x(!1),anchor:"left",disableAutoFocus:!0,keepMounted:!0,variant:"temporary"},t.createElement(m.Z,{m:2},t.createElement(y.Z,{variant:"h6",component:"h2",style:{marginBottom:T.spacing(1)}},"Filters"),S))):t.createElement(r.Z,{item:!0,lg:2},S)},i=({children:S})=>t.createElement(r.Z,{item:!0,xs:12,lg:10},S)},47851:function(J,o,e){"use strict";e.d(o,{y:function(){return t},j:function(){return l}});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"]})},91512:function(J,o,e){"use strict";e.d(o,{g:function(){return g},w:function(){return s}});var r=e(36964),t=e(10179),l=e(19126),f=e.n(l);const g=(0,r.createApiRef)({id:"plugin.search.queryservice"});class s{constructor(m){k(this,"discoveryApi");k(this,"identityApi");this.discoveryApi=m.discoveryApi,this.identityApi=m.identityApi}async query(m){const{token:y}=await this.identityApi.getCredentials(),h=f().stringify(m),E=`${await this.discoveryApi.getBaseUrl("search/query")}?${h}`,i=await fetch(E,{headers:y?{Authorization:`Bearer ${y}`}:{}});if(!i.ok)throw await t.VL.fromResponse(i);return i.json()}}},19941:function(J,o,e){"use strict";e.r(o),e.d(o,{DefaultResultListItem:function(){return m}});var r=e(2784),t=e(38402),l=e(86136),f=e(49378),g=e(95544),s=e(85256),u=e(9118);const m=({result:y,icon:h,secondaryAction:E})=>r.createElement(u.Link,{to:y.location},r.createElement(t.Z,{alignItems:"center"},h&&r.createElement(l.Z,null,h),r.createElement(f.Z,{primaryTypographyProps:{variant:"h6"},primary:y.title,secondary:y.text}),E&&r.createElement(g.Z,{alignItems:"flex-end"},E)),r.createElement(s.Z,null))},1795:function(J,o,e){"use strict";e.r(o),e.d(o,{SearchBar:function(){return S},SearchBarBase:function(){return i}});var r=e(2784),t=e(48760),l=e(36964),f=e(50581),g=e(61837),s=e(74603),u=e(21853),m=e(33375),y=e(22313);const h=({children:F})=>{const T=(0,l.useAnalytics)(),{term:j}=(0,y.Rx)();return(0,r.useEffect)(()=>{j&&T.captureEvent("search",j)},[T,j]),r.createElement(r.Fragment,null,F)},E=()=>(0,r.useContext)(y.ci)!==void 0,i=({onChange:F,onKeyDown:T,onSubmit:j,debounceTime:x=200,clearButton:b=!0,fullWidth:M=!0,value:O,inputProps:Y={},endAdornment:G,...fe})=>{const Re=(0,l.useApi)(l.configApiRef),[we,me]=(0,r.useState)(O),je=E();(0,r.useEffect)(()=>{me(Rt=>Rt!==O?O:Rt)},[O]),(0,t.Z)(()=>F(we),x,[we]);const Oe=(0,r.useCallback)(Rt=>{me(Rt.target.value)},[me]),Je=(0,r.useCallback)(Rt=>{T&&T(Rt),j&&Rt.key==="Enter"&&j()},[T,j]),rt=(0,r.useCallback)(()=>{F("")},[F]),et=`Search in ${Re.getOptionalString("app.title")||"Backstage"}`,ut=r.createElement(f.Z,{position:"start"},r.createElement(g.Z,{"aria-label":"Query",disabled:!0},r.createElement(u.Z,null))),ct=r.createElement(f.Z,{position:"end"},r.createElement(g.Z,{"aria-label":"Clear",onClick:rt},r.createElement(m.Z,null))),at=r.createElement(h,null,r.createElement(s.Z,{"data-testid":"search-bar-next",value:we,placeholder:et,startAdornment:ut,endAdornment:b?ct:G,inputProps:{"aria-label":"Search",...Y},fullWidth:M,onChange:Oe,onKeyDown:Je,...fe}));return je?at:r.createElement(y.Nd,null,at)},S=({onChange:F,...T})=>{const{term:j,setTerm:x}=(0,y.Rx)(),b=M=>{F?F(M):x(M)};return r.createElement(i,{value:j,onChange:b,...T})}},22313:function(J,o,e){"use strict";e.d(o,{ci:function(){return s},Nd:function(){return u},Rx:function(){return m}});var r=e(36964),t=e(2784),l=e(64279),f=e(1849),g=e(91512);const s=(0,t.createContext)(void 0),u=({initialState:y={term:"",pageCursor:void 0,filters:{},types:[]},children:h})=>{var rt,et,ut,ct;const E=(0,r.useApi)(g.g),[i,S]=(0,t.useState)(y.pageCursor),[F,T]=(0,t.useState)(y.filters),[j,x]=(0,t.useState)(y.term),[b,M]=(0,t.useState)(y.types),[O,Y]=(0,t.useState)(!1),G=(0,t.useCallback)(()=>Y(at=>!at),[]),fe=(0,f.Z)(j),Re=(0,l.default)(()=>E.query({term:j,filters:F,pageCursor:i,types:b}),[j,F,b,i]),we=!Re.loading&&!Re.error&&((rt=Re.value)==null?void 0:rt.nextPageCursor),me=!Re.loading&&!Re.error&&((et=Re.value)==null?void 0:et.previousPageCursor),je=(0,t.useCallback)(()=>{var at;S((at=Re.value)==null?void 0:at.nextPageCursor)},[(ut=Re.value)==null?void 0:ut.nextPageCursor]),Oe=(0,t.useCallback)(()=>{var at;S((at=Re.value)==null?void 0:at.previousPageCursor)},[(ct=Re.value)==null?void 0:ct.previousPageCursor]);(0,t.useEffect)(()=>{j&&fe&&j!==fe&&S(void 0)},[j,fe,y.pageCursor]);const Je={result:Re,filters:F,setFilters:T,open:O,toggleModal:G,term:j,setTerm:x,types:b,setTypes:M,pageCursor:i,setPageCursor:S,fetchNextPage:we?je:void 0,fetchPreviousPage:me?Oe:void 0};return t.createElement(r.AnalyticsContext,{attributes:{searchTypes:b.sort().join(",")}},t.createElement(s.Provider,{value:Je,children:h}))},m=()=>{const y=(0,t.useContext)(s);if(y===void 0)throw new Error("useSearch must be used within a SearchContextProvider");return y}},65678:function(J,o,e){"use strict";e.d(o,{s:function(){return fe}});var r=e(2784),t=e(60364),l=e(8629),f=e(79249),g=e(27556),s=e(38724),u=e(60905),m=e(85256),y=e(11776),h=e(49429),E=e(69001),i=e(79692),S=e(1795),F=e(19941),T=e(39332),j=e(22313),x=e(8542),b=e(36964),M=e(9118),O=e(20863);const Y=(0,i.Z)(Re=>({container:{borderRadius:30,display:"flex",height:"2.4em"},input:{flex:1},paperFullWidth:{height:"calc(100% - 128px)"},dialogActionsContainer:{padding:Re.spacing(1,3)},viewResultsLink:{verticalAlign:"0.5em"}})),G=({open:Re=!0,toggleModal:we})=>{const me=(0,b.useRouteRef)(O._Z),je=Y(),{term:Oe}=(0,j.Rx)(),{focusContent:Je}=(0,M.useContent)(),{transitions:rt}=(0,t.Z)(),et=()=>{we(),setTimeout(Je,rt.duration.leavingScreen)},ut=()=>{et()};return r.createElement(l.Z,{classes:{paperFullWidth:je.paperFullWidth},onClose:we,"aria-labelledby":"search-modal-title",open:Re,fullWidth:!0,maxWidth:"lg"},r.createElement(f.Z,null,r.createElement(g.Z,{className:je.container},r.createElement(S.SearchBar,{className:je.input}))),r.createElement(s.Z,null,r.createElement(u.Z,{container:!0,direction:"row-reverse",justifyContent:"flex-start",alignItems:"center"},r.createElement(u.Z,{item:!0},r.createElement(M.Link,{onClick:()=>{we(),setTimeout(Je,rt.duration.leavingScreen)},to:`${me()}?query=${Oe}`},r.createElement("span",{className:je.viewResultsLink},"View Full Results"),r.createElement(E.Z,{color:"primary"})))),r.createElement(m.Z,null),r.createElement(T.SearchResult,null,({results:ct})=>r.createElement(y.Z,null,ct.map(({document:at})=>r.createElement("div",{role:"button",tabIndex:0,key:`${at.location}-btn`,onClick:et,onKeyPress:ut},r.createElement(F.DefaultResultListItem,{key:at.location,result:at})))))),r.createElement(h.Z,{className:je.dialogActionsContainer},r.createElement(u.Z,{container:!0,direction:"row"},r.createElement(u.Z,{item:!0,xs:12},r.createElement(x.G,null)))))},fe=({open:Re=!0,toggleModal:we})=>r.createElement(j.Nd,null,r.createElement(G,{open:Re,toggleModal:we}))},3992:function(J,o,e){"use strict";e.r(o),e.d(o,{SearchPage:function(){return $t}});var r=e(2784),t=e(1849),l=e(19126),f=e.n(l),g=e(10289),s=e(22313),u=e(60905),m=e(48760),y=e(79692),h=e(27556),E=e(74603),i=e(61837),S=e(21853),F=e(33375);const T=(0,y.Z)(()=>({root:{display:"flex",alignItems:"center"},input:{flex:1}})),j=({searchQuery:De,handleSearch:it,handleClearSearchBar:lt})=>{const le=T();return r.createElement(h.Z,{component:"form",onSubmit:Q=>it(Q),className:le.root},r.createElement(i.Z,{disabled:!0,type:"submit","aria-label":"search"},r.createElement(S.Z,null)),r.createElement(E.Z,{className:le.input,placeholder:"Search in Backstage",value:De,onChange:Q=>it(Q),inputProps:{"aria-label":"search backstage"}}),r.createElement(i.Z,{"aria-label":"search",onClick:()=>lt()},r.createElement(F.Z,null)))};var x=e(85256),b=e(90436),M=e(99688),O=e(64279),Y=e(85653),G=e(36444);const fe=(0,y.Z)(De=>({filters:{width:"250px",display:"flex"},icon:{margin:De.spacing(-1,0,0,0)}})),Re=({numberOfSelectedFilters:De,handleToggleFilters:it})=>{const lt=fe();return r.createElement("div",{className:lt.filters},r.createElement(i.Z,{className:lt.icon,"aria-label":"settings",onClick:it},r.createElement(G.Z,null)),r.createElement(b.Z,{variant:"h6"},"Filters (",De||0,")"))};var we=e(94339),me=e(32552),je=e(77277),Oe=e(24579),Je=e(73698),rt=e(12231),et=e(11776),ut=e(38402),ct=e(21324),at=e(49378);const Rt=(0,y.Z)(De=>({filters:{background:"transparent",boxShadow:"0px 0px 0px 0px"},checkbox:{padding:De.spacing(0,1,0,1)},dropdown:{width:"100%"}})),Pt=({filters:De,filterOptions:it,resetFilters:lt,updateSelected:le,updateChecked:Q})=>{const P=Rt();return r.createElement(we.Z,{className:P.filters},r.createElement(me.Z,{title:r.createElement(b.Z,{variant:"h6"},"Filters"),action:r.createElement(je.Z,{color:"primary",onClick:()=>lt()},"CLEAR ALL")}),r.createElement(x.Z,null),it.kind.length===0&&it.lifecycle.length===0&&r.createElement(Oe.Z,null,r.createElement(b.Z,{variant:"subtitle2"},"Filters cannot be applied to available results")),it.kind.length>0&&r.createElement(Oe.Z,null,r.createElement(b.Z,{variant:"subtitle2"},"Kind"),r.createElement(Je.Z,{id:"outlined-select",onChange:C=>{var B;return le((B=C==null?void 0:C.target)==null?void 0:B.value)},variant:"outlined",className:P.dropdown,value:De.selected},it.kind.map(C=>r.createElement(rt.Z,{selected:C==="",dense:!0,key:C,value:C},C)))),it.lifecycle.length>0&&r.createElement(Oe.Z,null,r.createElement(b.Z,{variant:"subtitle2"},"Lifecycle"),r.createElement(et.Z,{disablePadding:!0,dense:!0},it.lifecycle.map(C=>r.createElement(ut.Z,{key:C,dense:!0,button:!0,onClick:()=>Q(C)},r.createElement(ct.Z,{edge:"start",disableRipple:!0,className:P.checkbox,color:"primary",checked:De.checked.includes(C),tabIndex:-1,value:C,name:C}),r.createElement(at.Z,{id:C,primary:C}))))))};var It=e(52890),St=e(9118),yt=e(36964);const Nt=(0,y.Z)(De=>({searchQuery:{color:De.palette.text.primary,background:De.palette.background.default,borderRadius:"10%"},tableHeader:{margin:De.spacing(1,0,0,0),display:"flex"},divider:{width:"1px",margin:De.spacing(0,2),padding:De.spacing(2,0)}})),Ut=[{title:"Name",field:"name",highlight:!0,render:De=>r.createElement(St.Link,{to:De.url||""},De.name)},{title:"Description",field:"description"},{title:"Owner",field:"owner"},{title:"Kind",field:"kind"},{title:"LifeCycle",field:"lifecycle"}],Ot=({searchQuery:De,numberOfSelectedFilters:it,numberOfResults:lt,handleToggleFilters:le})=>{const Q=Nt();return r.createElement("div",{className:Q.tableHeader},r.createElement(Re,{numberOfSelectedFilters:it,handleToggleFilters:le}),r.createElement(x.Z,{className:Q.divider,orientation:"vertical"}),r.createElement(u.Z,{item:!0,xs:12},De?r.createElement(b.Z,{variant:"h6"},`${lt} `,lt>1?"results for ":"result for ",r.createElement("span",{className:Q.searchQuery},'"',De,'"')," "):r.createElement(b.Z,{variant:"h6"},`${lt} results`)))},bt=({searchQuery:De})=>{const it=(0,yt.useApi)(Y.Ah),[lt,le]=(0,r.useState)(!1),[Q,P]=(0,r.useState)({selected:"",checked:[]}),[C,B]=(0,r.useState)([]),{loading:z,error:_,value:ne}=(0,O.default)(async()=>(await it.getEntities()).items.map(Te=>{var Fe,ue,Ee,Ne,Ue;return{name:Te.metadata.name,description:Te.metadata.description,owner:typeof((Fe=Te.spec)==null?void 0:Fe.owner)=="string"?(ue=Te.spec)==null?void 0:ue.owner:void 0,kind:Te.kind,lifecycle:typeof((Ee=Te.spec)==null?void 0:Ee.lifecycle)=="string"?(Ne=Te.spec)==null?void 0:Ne.lifecycle:void 0,url:`/catalog/${((Ue=Te.metadata.namespace)==null?void 0:Ue.toLocaleLowerCase("en-US"))||It.sk}/${Te.kind.toLocaleLowerCase("en-US")}/${Te.metadata.name}`}}),[]);if((0,r.useEffect)(()=>{if(ne){let Me=ne;Q.selected!==""&&(Me=ne.filter(Te=>Q.selected.includes(Te.kind))),Q.checked.length>0&&(Me=Me.filter(Te=>Te.lifecycle&&Q.checked.includes(Te.lifecycle))),De&&(Me=Me.filter(Te=>{var Fe,ue,Ee;return((Fe=Te.name)==null?void 0:Fe.toLocaleLowerCase("en-US").includes(De))||((ue=Te.name)==null?void 0:ue.toLocaleLowerCase("en-US").includes(De.split(" ").join("-")))||((Ee=Te.description)==null?void 0:Ee.toLocaleLowerCase("en-US").includes(De))})),B(Me)}},[Q,De,ne]),z)return r.createElement(St.Progress,null);if(_)return r.createElement(M.Z,{severity:"error"},"Error encountered while fetching search results. ",_.toString());if(!ne||ne.length===0)return r.createElement(St.EmptyState,{missing:"data",title:"Sorry, no results were found"});const ge=()=>{P({selected:"",checked:[]})},ye=Me=>{P(Te=>({...Te,selected:Me}))},xe=Me=>{if(Q.checked.includes(Me)){P(Te=>({...Te,checked:Te.checked.filter(Fe=>Fe!==Me)}));return}P(Te=>({...Te,checked:[...Te.checked,Me]}))},ze=ne.reduce((Me,Te)=>(Te.kind&&Me.kind.indexOf(Te.kind)<0&&Me.kind.push(Te.kind),Te.lifecycle&&Me.lifecycle.indexOf(Te.lifecycle)<0&&Me.lifecycle.push(Te.lifecycle),Me),{kind:[],lifecycle:[]});return r.createElement(r.Fragment,null,r.createElement(u.Z,{container:!0},lt&&r.createElement(u.Z,{item:!0,xs:3},r.createElement(Pt,{filters:Q,filterOptions:ze,resetFilters:ge,updateSelected:ye,updateChecked:xe})),r.createElement(u.Z,{item:!0,xs:lt?9:12},r.createElement(St.Table,{options:{paging:!0,pageSize:20,search:!1},data:C,columns:Ut,title:r.createElement(Ot,{searchQuery:De,numberOfResults:C.length,numberOfSelectedFilters:(Q.selected!==""?1:0)+Q.checked.length,handleToggleFilters:()=>le(!lt)})}))))},gt=()=>{const[De,it]=(0,St.useQueryParamState)("query"),[lt,le]=(0,r.useState)(De!=null?De:""),Q=C=>{C.preventDefault(),le(C.target.value)};(0,r.useEffect)(()=>le(De!=null?De:""),[De]),(0,m.Z)(()=>{it(lt)},200,[lt]);const P=()=>{le("")};return r.createElement(St.Page,{themeId:"home"},r.createElement(St.Header,{title:"Search"}),r.createElement(St.Content,null,r.createElement(u.Z,{container:!0,direction:"row"},r.createElement(u.Z,{item:!0,xs:12},r.createElement(j,{handleSearch:Q,handleClearSearchBar:P,searchQuery:lt})),r.createElement(u.Z,{item:!0,xs:12},r.createElement(bt,{searchQuery:(De!=null?De:"").toLocaleLowerCase("en-US")})))))},vt=()=>{const De=(0,g.TH)(),{term:it,setTerm:lt,types:le,setTypes:Q,pageCursor:P,setPageCursor:C,filters:B,setFilters:z}=(0,s.Rx)(),_=(0,t.Z)(De.search);return(0,r.useEffect)(()=>{if(De.search===_)return;const ne=f().parse(De.search.substring(1),{arrayLimit:0})||{};ne.filters&&z(ne.filters),ne.query&<(ne.query),ne.pageCursor&&C(ne.pageCursor),ne.types&&Q(ne.types)},[_,De,lt,Q,C,z]),(0,r.useEffect)(()=>{const ne=f().stringify({query:it,types:le,pageCursor:P,filters:B},{arrayFormat:"brackets"}),ge=`${window.location.pathname}?${ne}`;window.history.replaceState(null,document.title,ge)},[it,le,P,B]),null},$t=()=>{const De=(0,g.pC)();return r.createElement(s.Nd,null,r.createElement(vt,null),De||r.createElement(gt,null))}},39332:function(J,o,e){"use strict";e.r(o),e.d(o,{SearchResult:function(){return f}});var r=e(9118),t=e(2784),l=e(22313);const f=({children:g})=>{const{result:{loading:s,error:u,value:m}}=(0,l.Rx)();return s?t.createElement(r.Progress,null):u?t.createElement(r.ResponseErrorPanel,{title:"Error encountered while fetching search results",error:u}):(m==null?void 0:m.results.length)?t.createElement(t.Fragment,null,g({results:m.results})):t.createElement(r.EmptyState,{missing:"data",title:"Sorry, no results were found"})}},8542:function(J,o,e){"use strict";e.d(o,{G:function(){return m}});var r=e(79692),t=e(77277),l=e(35352),f=e(27742),g=e(2784),s=e(22313);const u=(0,r.Z)(y=>({root:{display:"flex",justifyContent:"space-between",gap:y.spacing(2),margin:y.spacing(2,0)}})),m=()=>{const{fetchNextPage:y,fetchPreviousPage:h}=(0,s.Rx)(),E=u();return!y&&!h?g.createElement(g.Fragment,null):g.createElement("nav",{"arial-label":"pagination navigation",className:E.root},g.createElement(t.Z,{"aria-label":"previous page",disabled:!h,onClick:h,startIcon:g.createElement(l.Z,null)},"Previous"),g.createElement(t.Z,{"aria-label":"next page",disabled:!y,onClick:y,endIcon:g.createElement(f.Z,null)},"Next"))}},20863:function(J,o,e){"use strict";e.d(o,{_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"}),g=(0,t.createPlugin)({id:"search",apis:[(0,t.createApiFactory)({api:r.g,deps:{discoveryApi:t.discoveryApiRef,identityApi:t.identityApiRef},factory:({discoveryApi:T,identityApi:j})=>new r.w({discoveryApi:T,identityApi:j})})],routes:{root:l,nextRoot:f}}),s=g.provide((0,t.createRoutableExtension)({name:"SearchPage",component:()=>Promise.resolve().then(e.bind(e,3992)).then(T=>T.SearchPage),mountPoint:l})),u=g.provide((0,t.createRoutableExtension)({name:"SearchPageNext",component:()=>Promise.resolve().then(e.bind(e,3992)).then(T=>T.SearchPage),mountPoint:f})),m=g.provide((0,t.createComponentExtension)({name:"SearchBar",component:{lazy:()=>Promise.resolve().then(e.bind(e,1795)).then(T=>T.SearchBar)}})),y=g.provide((0,t.createComponentExtension)({name:"SearchBarNext",component:{lazy:()=>Promise.resolve().then(e.bind(e,1795)).then(T=>T.SearchBar)}})),h=g.provide((0,t.createComponentExtension)({name:"SearchResult",component:{lazy:()=>Promise.resolve().then(e.bind(e,39332)).then(T=>T.SearchResult)}})),E=g.provide((0,t.createComponentExtension)({name:"SearchResultNext",component:{lazy:()=>Promise.resolve().then(e.bind(e,39332)).then(T=>T.SearchResult)}})),i=g.provide((0,t.createComponentExtension)({name:"SidebarSearchModal",component:{lazy:()=>e.e(3825).then(e.bind(e,43825)).then(T=>T.SidebarSearchModal)}})),S=g.provide((0,t.createComponentExtension)({name:"DefaultResultListItem",component:{lazy:()=>Promise.resolve().then(e.bind(e,19941)).then(T=>T.DefaultResultListItem)}})),F=g.provide((0,t.createComponentExtension)({name:"HomePageSearchBar",component:{lazy:()=>e.e(6105).then(e.bind(e,46105)).then(T=>T.HomePageSearchBar)}}))},94067:function(J,o,e){"use strict";e.r(o),e.d(o,{EmbeddedDocsRouter:function(){return F},Router:function(){return S},isTechDocsAvailable:function(){return i}});var r=e(2784),t=e(85653),l=e(10289),f=e(41481),g=e(31752),s=e(73873),u=e(97589),m=e(36964);const y=({entity:T})=>{var x;const j=(0,m.useApi)(m.configApiRef);return r.createElement(s.Ej,{withSearch:!1,entityRef:{namespace:(0,u.D)((x=T.metadata.namespace)!=null?x:"default",j),kind:(0,u.D)(T.kind,j),name:(0,u.D)(T.metadata.name,j)}})};var h=e(9118);const E="backstage.io/techdocs-ref",i=T=>{var j,x;return Boolean((x=(j=T==null?void 0:T.metadata)==null?void 0:j.annotations)==null?void 0:x[E])},S=()=>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(g.TechDocsPage,null)})),F=T=>{var b;const{entity:j}=(0,t.useEntity)();return((b=j.metadata.annotations)==null?void 0:b[E])?r.createElement(l.Z5,null,r.createElement(l.AW,{path:"/*",element:r.createElement(y,{entity:j})})):r.createElement(h.MissingAnnotationEmptyState,{annotation:E})}},3337:function(J,o,e){"use strict";e.d(o,{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"})},71226:function(J,o,e){"use strict";e.d(o,{O:function(){return h}});var r=e(2784),t=e(79692),l=e(49378),f=e(38402),g=e(85256),s=e(9118),u=e(15277),m=e.n(u);const y=(0,t.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",marginBottom:"1rem"}}),h=({result:E,lineClamp:i=5,asListItem:S=!0,asLink:F=!0,title:T})=>{const j=y(),x=()=>{var O;return r.createElement(l.Z,{className:j.itemText,primaryTypographyProps:{variant:"h6"},primary:T||`${E.title} | ${(O=E.entityTitle)!=null?O:E.name} docs`,secondary:r.createElement(m(),{line:i,truncateText:"\u2026",text:E.text,element:"span"})})},b=({children:O})=>F?r.createElement(s.Link,{to:E.location},O):r.createElement(r.Fragment,null,O),M=({children:O})=>S?r.createElement(r.Fragment,null,r.createElement(f.Z,{alignItems:"flex-start",className:j.flexContainer},O),r.createElement(g.Z,{component:"li"})):r.createElement(r.Fragment,null,O);return r.createElement(b,null,r.createElement(M,null,r.createElement(x,null)))}},97589:function(J,o,e){"use strict";e.d(o,{D:function(){return r}});function r(t,l){return l.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")?t:t.toLocaleLowerCase("en-US")}},10187:function(J,o,e){"use strict";e.r(o),e.d(o,{DocsCardGrid:function(){return h}});var r=e(2784),t=e(36964),l=e(94339),f=e(16111),g=e(24579),s=e(14503),u=e(68725),m=e(9118),y=e(97589);const h=({entities:E})=>{const i=(0,t.useRouteRef)(u.Fw),S=(0,t.useApi)(t.configApiRef);return E?r.createElement(m.ItemCardGrid,{"data-testid":"docs-explore"},(E==null?void 0:E.length)?E.map((F,T)=>{var j,x;return r.createElement(l.Z,{key:T},r.createElement(f.Z,null,r.createElement(m.ItemCardHeader,{title:(j=F.metadata.title)!=null?j:F.metadata.name})),r.createElement(g.Z,null,F.metadata.description),r.createElement(s.Z,null,r.createElement(m.Button,{to:i({namespace:(0,y.D)((x=F.metadata.namespace)!=null?x:"default",S),kind:(0,y.D)(F.kind,S),name:(0,y.D)(F.metadata.name,S)}),color:"primary","data-testid":"read_docs"},"Read Docs")))}):null):null}},83201:function(J,o,e){"use strict";e.r(o),e.d(o,{DocsTable:function(){return E}});var r=e(2784),t=e(95074),l=e(36964),f=e(52890),g=e(85653),s=e(68725),u=e(9118),m=e(50294),y=e(67430),h=e(97589);const E=({entities:i,title:S,loading:F,columns:T,actions:j})=>{const[,x]=(0,t.Z)(),b=(0,l.useRouteRef)(s.Fw),M=(0,l.useApi)(l.configApiRef);if(!i)return null;const O=i.map(fe=>{var we;const Re=(0,g.getEntityRelations)(fe,f.S4);return{entity:fe,resolved:{docsUrl:b({namespace:(0,h.D)((we=fe.metadata.namespace)!=null?we:"default",M),kind:(0,h.D)(fe.kind,M),name:(0,h.D)(fe.metadata.name,M)}),ownedByRelations:Re,ownedByRelationsTitle:Re.map(me=>(0,g.formatEntityRefTitle)(me,{defaultKind:"group"})).join(", ")}}}),Y=[y.createNameColumn(),y.createOwnerColumn(),y.createTypeColumn()],G=[m.createCopyDocsUrlAction(x)];return r.createElement(r.Fragment,null,F||O&&O.length>0?r.createElement(u.Table,{isLoading:F,options:{paging:!0,pageSize:20,search:!0,actionsColumnIndex:-1},data:O,columns:T||Y,actions:j||G,title:S?`${S} (${O.length})`:`All (${O.length})`}):r.createElement(u.EmptyState,{missing:"data",title:"No documents to show",description:"Create your own document. Check out our Getting Started Information",action:r.createElement(u.Button,{color:"primary",to:"https://backstage.io/docs/features/techdocs/getting-started",variant:"contained"},"DOCS")}))}},57110:function(J,o,e){"use strict";e.r(o),e.d(o,{TechDocsCustomHome:function(){return i}});var r=e(2784),t=e(64279),l=e(79692),f=e(85653),g=e(83201),s=e(10187),u=e(1114),m=e(9118),y=e(36964);const h={DocsTable:g.DocsTable,DocsCardGrid:s.DocsCardGrid},E=({config:S,entities:F,index:T})=>{const x=(0,l.Z)({panelContainer:{marginBottom:"2rem",...S.panelCSS?S.panelCSS:{}}})(),{value:b}=(0,f.useOwnUser)(),M=h[S.panelType],O=F.filter(Y=>S.filterPredicate==="ownedByUser"?b?(0,f.isOwnerOf)(b,Y):!1:typeof S.filterPredicate=="function"&&S.filterPredicate(Y));return r.createElement(r.Fragment,null,r.createElement(m.ContentHeader,{title:S.title,description:S.description},T===0?r.createElement(m.SupportButton,null,"Discover documentation in your ecosystem."):null),r.createElement("div",{className:x.panelContainer},r.createElement(M,{"data-testid":"techdocs-custom-panel",entities:O})))},i=({tabsConfig:S})=>{const[F,T]=(0,r.useState)(0),j=(0,y.useApi)(f.Ah),{value:x,loading:b,error:M}=(0,t.default)(async()=>(await j.getEntities({filter:{"metadata.annotations.backstage.io/techdocs-ref":f.n3},fields:["apiVersion","kind","metadata","relations","spec.owner","spec.type"]})).items.filter(G=>{var fe;return!!((fe=G.metadata.annotations)==null?void 0:fe["backstage.io/techdocs-ref"])})),O=S[F];return b?r.createElement(u.j,null,r.createElement(m.Content,null,r.createElement(m.Progress,null))):M?r.createElement(u.j,null,r.createElement(m.Content,null,r.createElement(m.WarningPanel,{severity:"error",title:"Could not load available documentation."},r.createElement(m.CodeSnippet,{language:"text",text:M.toString()})))):r.createElement(u.j,null,r.createElement(m.HeaderTabs,{selectedIndex:F,onChange:Y=>T(Y),tabs:S.map(({label:Y},G)=>({id:G.toString(),label:Y}))}),r.createElement(m.Content,{"data-testid":"techdocs-content"},O.panels.map((Y,G)=>r.createElement(E,{key:G,config:Y,entities:x||[],index:G}))))}},41481:function(J,o,e){"use strict";e.r(o),e.d(o,{TechDocsIndexPage:function(){return g}});var r=e(2784),t=e(10289),l=e(57110);const f=()=>{const s=[{label:"Overview",panels:[{title:"Overview",description:"Explore your internal technical ecosystem through documentation.",panelType:"DocsCardGrid",filterPredicate:()=>!0}]},{label:"Owned Documents",panels:[{title:"Owned documents",description:"Access your documentation.",panelType:"DocsTable",filterPredicate:"ownedByUser"}]}];return r.createElement(l.TechDocsCustomHome,{tabsConfig:s})},g=()=>(0,t.pC)()||r.createElement(f,null)},1114:function(J,o,e){"use strict";e.d(o,{j:function(){return f}});var r=e(2784),t=e(9118),l=e(36964);const f=({children:g})=>{var m;const u=`Documentation available in ${(m=(0,l.useApi)(l.configApiRef).getOptionalString("organization.name"))!=null?m:"Backstage"}`;return r.createElement(t.PageWithHeader,{title:"Documentation",subtitle:u,themeId:"documentation"},g)}},50294:function(J,o,e){"use strict";e.r(o),e.d(o,{createCopyDocsUrlAction:function(){return f},createStarEntityAction:function(){return g}});var r=e(2784),t=e(39981),l=e(85653);function f(s){return u=>({icon:()=>r.createElement(t.Z,{fontSize:"small"}),tooltip:"Click to copy documentation link to clipboard",onClick:()=>s(`${window.location.origin}${u.resolved.docsUrl}`)})}function g(s,u){return({entity:m})=>{const y=s(m);return{cellStyle:{paddingLeft:"1em"},icon:()=>(0,l.favoriteEntityIcon)(y),tooltip:(0,l.favoriteEntityTooltip)(y),onClick:()=>u(m)}}}},67430:function(J,o,e){"use strict";e.r(o),e.d(o,{createNameColumn:function(){return g},createOwnerColumn:function(){return s},createTypeColumn:function(){return u}});var r=e(2784),t=e(9118),l=e(85653);function f(m){return m.metadata.title||m.metadata.name}function g(){return{title:"Document",field:"entity.metadata.name",highlight:!0,render:m=>r.createElement(t.SubvalueCell,{value:r.createElement(t.Link,{to:m.resolved.docsUrl},f(m.entity)),subvalue:m.entity.metadata.description})}}function s(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:m})=>r.createElement(l.EntityRefLinks,{entityRefs:m.ownedByRelations,defaultKind:"group"})}}function u(){return{title:"Type",field:"entity.spec.type"}}},75448:function(J,o,e){"use strict";e.d(o,{Ej:function(){return lt},DK:function(){return $t}});var r=e(2784),t=e(10289),l=e(79692),f=e(60364),g=e(60905),s=e(36964),u=e(36356),m=e(9118),y=e(3337);const h=(le,Q,P)=>{const C=le==="src"&&Q.endsWith(".svg"),B=!Q.match(/^([a-z]*:)?\/\//i),z=Q.startsWith(P);return C&&(B||z)},E=({techdocsStorageApi:le,entityId:Q,path:P})=>async C=>{const B=await le.getApiOrigin(),z=async(_,ne)=>{for(const ge of _)if(ge.hasAttribute(ne)){const ye=ge.getAttribute(ne);if(!ye)return;const xe=await le.getBaseUrl(ye,Q,P);if(h(ne,ye,B))try{const Me=await(await fetch(xe,{credentials:"include"})).text();ge.setAttribute(ne,`data:image/svg+xml;base64,${btoa(Me)}`)}catch{ge.setAttribute("alt",`Error: ${ye}`)}else ge.setAttribute(ne,xe)}};return await Promise.all([z(C.querySelectorAll("img"),"src"),z(C.querySelectorAll("script"),"src"),z(C.querySelectorAll("link"),"href"),z(C.querySelectorAll("a[download]"),"href")]),C};var i=e(63925),S=e(67097),F=e(9832),T=e(82717),j=e.n(T);const x=le=>Q=>{const P=Q.querySelector('[title="Edit this page"]');if(!P||!P.href)return Q;const C=new URL(P.href),B=le.byUrl(C);if((B==null?void 0:B.type)!=="github"&&(B==null?void 0:B.type)!=="gitlab")return Q;const z=Q.querySelector("article>h1").childNodes[0].textContent,_=encodeURIComponent(`Documentation Feedback: ${z}`),ne=encodeURIComponent(`Page source:
|
|
32
|
+
${P.href}
|
|
33
|
+
|
|
34
|
+
Feedback:`),ge=(B==null?void 0:B.type)==="github"?(0,i.Pb)(C.href,"blob"):C.href,ye=j()(ge),xe=`/${ye.organization}/${ye.name}`,ze=P.cloneNode();switch(B==null?void 0:B.type){case"gitlab":ze.href=`${C.origin}${xe}/issues/new?issue[title]=${_}&issue[description]=${ne}`;break;case"github":ze.href=`${C.origin}${xe}/issues/new?title=${_}&body=${ne}`;break;default:return Q}return F.render(r.createElement(S.Z),ze),ze.style.paddingLeft="5px",ze.title="Leave feedback for this page",ze.id="git-feedback-link",P==null||P.insertAdjacentElement("beforebegin",ze),Q},b=()=>le=>(((P,C)=>{Array.from(P).filter(B=>B.hasAttribute(C)).forEach(B=>{const z=B.getAttribute(C);if(z){z.match(/^https?:\/\//i)&&B.setAttribute("target","_blank");try{const _=M(window.location.href);B.setAttribute(C,new URL(z,_).toString())}catch{B.replaceWith(B.textContent||z)}}})})(Array.from(le.getElementsByTagName("a")),"href"),le);function M(le){const Q=new URL(le);return!Q.pathname.endsWith("/")&&!Q.pathname.endsWith(".html")&&(Q.pathname+="/"),Q.toString()}const O=({baseUrl:le,onClick:Q})=>P=>(Array.from(P.getElementsByTagName("a")).forEach(C=>{C.addEventListener("click",B=>{const _=C.getAttribute("href");!_||_.startsWith(le)&&(B.preventDefault(),Q(B,_))})}),P),Y=()=>le=>{var Q;return(Q=le.querySelector(".md-header"))==null||Q.remove(),le},G=()=>le=>{var Q;return(Q=le.querySelector(".md-footer-copyright"))==null||Q.remove(),le},fe=({docStorageUrl:le,onLoading:Q,onLoaded:P})=>C=>{const B=Array.from(C.querySelectorAll('head > link[rel="stylesheet"]')).filter(_=>{var ne;return(ne=_.getAttribute("href"))==null?void 0:ne.startsWith(le)});let z=B.length;return z>0&&Q(C),B.forEach(_=>_.addEventListener("load",()=>{z-=1,z===0&&P(C)})),C};var Re=e(35368),we=e.n(Re);const me=/main\.[A-Fa-f0-9]{8}\.min\.css$/,je=/^https:\/\/fonts\.googleapis\.com/,Oe=/^https:\/\/fonts\.gstatic\.com/,Je=le=>{if(le.nodeName&&le.nodeName==="LINK"){const Q=le.getAttribute("href")||"";Q.match(me)&&le.setAttribute("rel","stylesheet"),Q.match(je)&&le.setAttribute("rel","stylesheet"),Q.match(Oe)&&le.setAttribute("rel","preconnect")}return le},rt=le=>Q=>{if(Q.nodeName==="IFRAME"){const P=Q.getAttribute("src");if(!P)return Q.remove(),Q;try{const C=new URL(P);le.some(z=>C.host===z)||Q.remove()}catch(C){console.warn(`Invalid iframe src, ${C}`),Q.remove()}}return Q},et=le=>{const Q=(le==null?void 0:le.getOptionalStringArray("allowedIframeHosts"))||[];return P=>{we().addHook("afterSanitizeAttributes",Je);const C=["link"];return Q.length>0&&(we().addHook("beforeSanitizeElements",rt(Q)),C.push("iframe")),we().sanitize(P.innerHTML,{ADD_TAGS:C,FORBID_TAGS:["style"],WHOLE_DOCUMENT:!0,RETURN_DOM:!0})}},ut=({css:le})=>Q=>(Q.getElementsByTagName("head")[0].insertAdjacentHTML("beforeend",`<style>${le}</style>`),Q),ct=()=>le=>(setTimeout(()=>{var Q;if(window.location.hash){const P=window.location.hash.slice(1);(Q=le==null?void 0:le.querySelector(`#${P}`))==null||Q.scrollIntoView()}},200),le),at=async(le,Q)=>{let P;if(typeof le=="string")P=new DOMParser().parseFromString(le,"text/html").documentElement;else if(le instanceof Element)P=le;else throw new Error("dom is not a recognized type");for(const C of Q)P=await C(P);return P};var Rt=e(7735),Pt=e(25921),It=e(64279),St=e(77446);function yt({contentLoading:le,content:Q,activeSyncState:P}){return le||P==="BUILD_READY_RELOAD"||!Q&&P==="CHECKING"?"CHECKING":!Q&&P==="BUILDING"?"INITIAL_BUILD":Q?P==="BUILDING"?"CONTENT_STALE_REFRESHING":P==="BUILD_READY"?"CONTENT_STALE_READY":P==="ERROR"?"CONTENT_STALE_ERROR":"CONTENT_FRESH":"CONTENT_NOT_FOUND"}function Nt(le,Q){const P={...le};switch(Q.type){case"sync":Q.state==="CHECKING"&&(P.buildLog=[]),P.activeSyncState=Q.state,P.syncError=Q.syncError;break;case"contentLoading":P.contentLoading=!0,P.contentError=void 0;break;case"content":typeof Q.path=="string"&&(P.path=Q.path),P.contentLoading=!1,P.content=Q.content,P.contentError=Q.contentError;break;case"buildLog":P.buildLog=P.buildLog.concat(Q.log);break;default:throw new Error}return["BUILD_READY","BUILD_READY_RELOAD"].includes(P.activeSyncState)&&["contentLoading","content"].includes(Q.type)&&(P.activeSyncState="UP_TO_DATE",P.buildLog=[]),P}function Ut(le,Q,P,C){var xe,ze;const[B,z]=(0,r.useReducer)(Nt,{activeSyncState:"CHECKING",path:C,contentLoading:!0,buildLog:[]}),_=(0,s.useApi)(y.D),{retry:ne}=(0,St.Z)(async()=>{z({type:"contentLoading"});try{const Me=await _.getEntityDocs({kind:le,namespace:Q,name:P},C);return z({type:"content",content:Me,path:C}),Me}catch(Me){z({type:"content",contentError:Me,path:C})}},[_,le,Q,P,C]),ge=(0,r.useRef)({content:void 0,reload:()=>{}});return ge.current={content:B.content,reload:ne},(0,It.default)(async()=>{z({type:"sync",state:"CHECKING"});const Me=setTimeout(()=>{z({type:"sync",state:"BUILDING"})},1e3);try{switch(await _.syncEntityDocs({kind:le,namespace:Q,name:P},Fe=>{z({type:"buildLog",log:Fe})})){case"updated":ge.current.content?z({type:"sync",state:"BUILD_READY"}):(ge.current.reload(),z({type:"sync",state:"BUILD_READY_RELOAD"}));break;case"cached":z({type:"sync",state:"UP_TO_DATE"});break;default:z({type:"sync",state:"ERROR",syncError:new Error("Unexpected return state")});break}}catch(Te){z({type:"sync",state:"ERROR",syncError:Te})}finally{clearTimeout(Me)}},[le,P,Q,_,z,ge]),{state:(0,r.useMemo)(()=>yt({activeSyncState:B.activeSyncState,contentLoading:B.contentLoading,content:B.content}),[B.activeSyncState,B.content,B.contentLoading]),contentReload:ne,path:B.path,content:B.content,contentErrorMessage:(xe=B.contentError)==null?void 0:xe.toString(),syncErrorMessage:(ze=B.syncError)==null?void 0:ze.toString(),buildLog:B.buildLog}}const Ot=(0,l.Z)(le=>({searchBar:{marginLeft:"20rem",maxWidth:"calc(100% - 20rem * 2 - 3rem)",marginTop:le.spacing(1),"@media screen and (max-width: 76.1875em)":{marginLeft:"10rem",maxWidth:"calc(100% - 10rem)"}}})),bt=(0,r.createContext)({}),gt=({children:le,entityRef:Q})=>{const{"*":P}=(0,t.UO)(),{kind:C,namespace:B,name:z}=Q,_=Ut(C,B,z,P);return r.createElement(bt.Provider,{value:_},le)},vt=(le,Q)=>P=>React.createElement(gt,{entityRef:Q},React.createElement(le,{...P})),$t=()=>(0,r.useContext)(bt),De=le=>{const Q=(0,t.s0)(),P=(0,f.Z)(),C=(0,s.useApi)(y.D),B=(0,s.useApi)(u.q3),z=(0,s.useApi)(s.configApiRef),{namespace:_="",kind:ne="",name:ge=""}=le,{state:ye,path:xe,content:ze}=$t(),[Me,Te]=(0,r.useState)(),[Fe,ue]=(0,r.useState)(null),{isPinned:Ee}=(0,r.useContext)(m.SidebarPinStateContext),Ne=(0,r.useCallback)(()=>{if(!Fe||!Me)return;const be=Fe.querySelector(".md-container > .md-tabs");Me.forEach(Qe=>{const Xe=Math.max(Fe.getBoundingClientRect().top,0);Qe.style.top=be?`${Xe+be.getBoundingClientRect().height}px`:`${Xe}px`})},[Fe,Me]);(0,r.useEffect)(()=>(Ne(),window.addEventListener("scroll",Ne,!0),window.addEventListener("resize",Ne),()=>{window.removeEventListener("scroll",Ne,!0),window.removeEventListener("resize",Ne)}),[Ne,ye]);const Ue=(0,r.useCallback)(()=>{if(!Fe)return;const be=Fe.querySelector(".md-footer");be&&(be.style.width=`${Fe.getBoundingClientRect().width}px`)},[Fe]);(0,r.useEffect)(()=>(Ue(),window.addEventListener("resize",Ue),()=>{window.removeEventListener("resize",Ue)}));const Be=(0,r.useCallback)((be,Qe)=>at(be,[et(z.getOptionalConfig("techdocs.sanitizer")),E({techdocsStorageApi:C,entityId:{kind:ne,name:ge,namespace:_},path:Qe}),b(),Y(),G(),x(B),ut({css:`
|
|
35
|
+
body {
|
|
36
|
+
font-family: ${P.typography.fontFamily};
|
|
37
|
+
--md-text-color: ${P.palette.text.primary};
|
|
38
|
+
--md-text-link-color: ${P.palette.primary.main};
|
|
39
|
+
|
|
40
|
+
--md-code-fg-color: ${P.palette.text.primary};
|
|
41
|
+
--md-code-bg-color: ${P.palette.background.paper};
|
|
42
|
+
}
|
|
43
|
+
.md-main__inner { margin-top: 0; }
|
|
44
|
+
.md-sidebar { position: fixed; bottom: 100px; width: 20rem; }
|
|
45
|
+
.md-sidebar--secondary { right: 2rem; }
|
|
46
|
+
.md-content { margin-bottom: 50px }
|
|
47
|
+
.md-footer { position: fixed; bottom: 0px; }
|
|
48
|
+
.md-footer-nav__link { width: 20rem;}
|
|
49
|
+
.md-content { margin-left: 20rem; max-width: calc(100% - 20rem * 2 - 3rem); }
|
|
50
|
+
.md-typeset { font-size: 1rem; }
|
|
51
|
+
.md-typeset h1, .md-typeset h2, .md-typeset h3 { font-weight: bold; }
|
|
52
|
+
.md-nav { font-size: 1rem; }
|
|
53
|
+
.md-grid { max-width: 90vw; margin: 0 }
|
|
54
|
+
.md-typeset blockquote {
|
|
55
|
+
color: ${P.palette.textSubtle};
|
|
56
|
+
border-left: 0.2rem solid ${P.palette.textVerySubtle};
|
|
57
|
+
}
|
|
58
|
+
.md-typeset hr {
|
|
59
|
+
border-bottom: 0.05rem dotted ${P.palette.textVerySubtle};
|
|
60
|
+
}
|
|
61
|
+
.md-typeset table:not([class]) {
|
|
62
|
+
font-size: 1rem;
|
|
63
|
+
border: 1px solid ${P.palette.text.primary};
|
|
64
|
+
border-bottom: none;
|
|
65
|
+
border-collapse: collapse;
|
|
66
|
+
}
|
|
67
|
+
.md-typeset table:not([class]) td, .md-typeset table:not([class]) th {
|
|
68
|
+
border-bottom: 1px solid ${P.palette.text.primary};
|
|
69
|
+
}
|
|
70
|
+
.md-typeset table:not([class]) th { font-weight: bold; }
|
|
71
|
+
.md-typeset .admonition, .md-typeset details {
|
|
72
|
+
font-size: 1rem;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/* style the checkmarks of the task list */
|
|
76
|
+
.md-typeset .task-list-control .task-list-indicator::before {
|
|
77
|
+
background-color: ${P.palette.action.disabledBackground};
|
|
78
|
+
}
|
|
79
|
+
.md-typeset .task-list-control [type="checkbox"]:checked + .task-list-indicator:before {
|
|
80
|
+
background-color: ${P.palette.success.main};
|
|
81
|
+
}
|
|
82
|
+
/**/
|
|
83
|
+
|
|
84
|
+
@media screen and (max-width: 76.1875em) {
|
|
85
|
+
.md-nav {
|
|
86
|
+
background-color: ${P.palette.background.default};
|
|
87
|
+
transition: none !important
|
|
88
|
+
}
|
|
89
|
+
.md-sidebar--secondary { display: none; }
|
|
90
|
+
.md-sidebar--primary { left: ${Ee?"242px":"72px"}; width: 10rem }
|
|
91
|
+
.md-content { margin-left: 10rem; max-width: calc(100% - 10rem); }
|
|
92
|
+
.md-content__inner { font-size: 0.9rem }
|
|
93
|
+
.md-footer {
|
|
94
|
+
position: static;
|
|
95
|
+
padding-left: 10rem;
|
|
96
|
+
}
|
|
97
|
+
.md-footer-nav__link {
|
|
98
|
+
/* footer links begin to overlap at small sizes without setting width */
|
|
99
|
+
width: 50%;
|
|
100
|
+
}
|
|
101
|
+
.md-nav--primary .md-nav__title {
|
|
102
|
+
white-space: normal;
|
|
103
|
+
height: auto;
|
|
104
|
+
line-height: 1rem;
|
|
105
|
+
cursor: auto;
|
|
106
|
+
}
|
|
107
|
+
.md-nav--primary > .md-nav__title [for="none"] {
|
|
108
|
+
padding-top: 0;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
`}),ut({css:`
|
|
112
|
+
.md-nav__link, .md-typeset a, .md-typeset a::before, .md-typeset .headerlink {
|
|
113
|
+
transition: none;
|
|
114
|
+
}
|
|
115
|
+
`}),ut({css:`
|
|
116
|
+
.md-typeset pre > code::-webkit-scrollbar-thumb {
|
|
117
|
+
background-color: hsla(0, 0%, 0%, 0.32);
|
|
118
|
+
}
|
|
119
|
+
.md-typeset pre > code::-webkit-scrollbar-thumb:hover {
|
|
120
|
+
background-color: hsla(0, 0%, 0%, 0.87);
|
|
121
|
+
}
|
|
122
|
+
`}),ut({css:`
|
|
123
|
+
:host {
|
|
124
|
+
--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>');
|
|
125
|
+
--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>');
|
|
126
|
+
--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>');
|
|
127
|
+
--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>');
|
|
128
|
+
--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>');
|
|
129
|
+
--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>');
|
|
130
|
+
--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>');
|
|
131
|
+
--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>');
|
|
132
|
+
--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>');
|
|
133
|
+
--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>');
|
|
134
|
+
--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>');
|
|
135
|
+
--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>');
|
|
136
|
+
}
|
|
137
|
+
:host {
|
|
138
|
+
--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>');
|
|
139
|
+
}
|
|
140
|
+
:host {
|
|
141
|
+
--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.58L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.42z"/></svg>');
|
|
142
|
+
}
|
|
143
|
+
:host {
|
|
144
|
+
--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>');
|
|
145
|
+
--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>');
|
|
146
|
+
}
|
|
147
|
+
`})]),[ne,ge,_,B,C,z,P.palette.action.disabledBackground,P.palette.background.default,P.palette.background.paper,P.palette.primary.main,P.palette.success.main,P.palette.text.primary,P.palette.textSubtle,P.palette.textVerySubtle,P.typography.fontFamily,Ee]),st=(0,r.useCallback)(async be=>at(be,[ct(),O({baseUrl:window.location.origin,onClick:(Qe,Xe)=>{var A,D;const dt=Qe.ctrlKey||Qe.metaKey,K=new URL(Xe);K.hash?dt?window.open(`${K.pathname}${K.hash}`,"_blank"):(Q(`${K.pathname}${K.hash}`),(A=be==null?void 0:be.querySelector(`#${K.hash.slice(1)}`))==null||A.scrollIntoView()):dt?window.open(K.pathname,"_blank"):(Q(K.pathname),(D=be==null?void 0:be.querySelector(".md-content__inner"))==null||D.scrollIntoView())}}),fe({docStorageUrl:await C.getApiOrigin(),onLoading:Qe=>{Qe.style.setProperty("opacity","0")},onLoaded:Qe=>{var Xe;Qe.style.removeProperty("opacity"),(Xe=Qe.querySelector(".md-nav__title"))==null||Xe.removeAttribute("for"),Te(Array.from(Qe.querySelectorAll(".md-sidebar")))}})]),[Q,C]);return(0,r.useEffect)(()=>{if(!ze)return()=>{};let be=!0;return Be(ze,xe).then(async Qe=>{if(!(Qe==null?void 0:Qe.innerHTML)||!be)return;window.scroll({top:0});const Xe=await st(Qe);ue(Xe)}),()=>{be=!1}},[ze,xe,Be,st]),Fe},it=({entityRef:le,onReady:Q=()=>{},withSearch:P=!0})=>{var ne,ge;const C=Ot(),B=De(le),z=(0,r.useRef)(null),_=(0,r.useRef)(Q);return(0,r.useEffect)(()=>{_.current=Q},[Q]),(0,r.useEffect)(()=>{if(!B||!z.current)return;const ye=z.current,xe=ye.shadowRoot||ye.attachShadow({mode:"open"});Array.from(xe.children).forEach(ze=>xe.removeChild(ze)),xe.appendChild(B),_.current()},[B]),r.createElement(r.Fragment,null,r.createElement(Pt.N,null),P&&((ge=(ne=z==null?void 0:z.current)==null?void 0:ne.shadowRoot)==null?void 0:ge.innerHTML)&&r.createElement(g.Z,{container:!0,className:C.searchBar},r.createElement(Rt.S,{entityId:le})),r.createElement("div",{"data-testid":"techdocs-content-shadowroot",ref:z}))},lt=({entityRef:le,onReady:Q=()=>{},withSearch:P=!0})=>r.createElement(gt,{entityRef:le},r.createElement(it,{entityRef:le,onReady:Q,withSearch:P}))},94252:function(J,o,e){"use strict";e.d(o,{T:function(){return f}});var r=e(2784),t=e(36964),l=e(9118);const f=({errorMessage:g})=>{const s=(0,t.useApi)(t.configApiRef).getOptionalString("techdocs.builder");let u="";return s!=="local"&&(u="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(l.ErrorPage,{status:"404",statusMessage:g||"Documentation not found",additionalInfo:u})}},31752:function(J,o,e){"use strict";e.r(o),e.d(o,{TechDocsPage:function(){return E}});var r=e(2784),t=e(10289),l=e(64279),f=e(3337),g=e(94252),s=e(36964),u=e(9118),m=e(75448),y=e(46025);const h=()=>{const[i,S]=(0,r.useState)(!1),{namespace:F,kind:T,name:j}=(0,t.UO)(),x=(0,s.useApi)(f.g),{value:b}=(0,l.default)(()=>i?x.getTechDocsMetadata({kind:T,namespace:F,name:j}):Promise.resolve(void 0),[T,F,j,x,i]),{value:M,error:O}=(0,l.default)(()=>x.getEntityMetadata({kind:T,namespace:F,name:j}),[T,F,j,x]),Y=(0,r.useCallback)(()=>{S(!0)},[S]);return O?r.createElement(g.T,{errorMessage:O.message}):r.createElement(u.Page,{themeId:"documentation"},r.createElement(y.n,{techDocsMetadata:b,entityMetadata:M,entityRef:{kind:T,namespace:F,name:j}}),r.createElement(u.Content,{"data-testid":"techdocs-content"},r.createElement(m.Ej,{onReady:Y,entityRef:{kind:T,namespace:F,name:j}})))},E=({children:i})=>{const S=(0,t.pC)(),[F,T]=(0,r.useState)(!1),{namespace:j,kind:x,name:b}=(0,t.UO)(),M=(0,s.useApi)(f.g),{value:O}=(0,l.default)(()=>F?M.getTechDocsMetadata({kind:x,namespace:j,name:b}):Promise.resolve(void 0),[x,j,b,M,F]),{value:Y,error:G}=(0,l.default)(()=>M.getEntityMetadata({kind:x,namespace:j,name:b}),[x,j,b,M]),fe=(0,r.useCallback)(()=>{T(!0)},[T]);return G?r.createElement(g.T,{errorMessage:G.message}):i?r.createElement(u.Page,{themeId:"documentation"},i instanceof Function?i({techdocsMetadataValue:O,entityMetadataValue:Y,entityRef:{kind:x,namespace:j,name:b},onReady:fe}):i):S||r.createElement(h,null)}},46025:function(J,o,e){"use strict";e.d(o,{n:function(){return m}});var r=e(52890),t=e(9118),l=e(36964),f=e(85653),g=e(73250),s=e(2784),u=e(68725);const m=({entityRef:y,entityMetadata:h,techDocsMetadata:E})=>{const{name:i}=y,{site_name:S,site_description:F}=E||{},{locationMetadata:T,spec:j}=h||{},x=j==null?void 0:j.lifecycle,b=h?(0,f.getEntityRelations)(h,r.S4):[],M=(0,l.useRouteRef)(u._Z)(),O=s.createElement(s.Fragment,null,s.createElement(t.HeaderLabel,{label:"Component",value:s.createElement(f.EntityRefLink,{color:"inherit",entityRef:y,defaultKind:"Component"})}),b.length>0&&s.createElement(t.HeaderLabel,{label:"Owner",value:s.createElement(f.EntityRefLinks,{color:"inherit",entityRefs:b,defaultKind:"group"})}),x?s.createElement(t.HeaderLabel,{label:"Lifecycle",value:x}):null,T&&T.type!=="dir"&&T.type!=="file"?s.createElement(t.HeaderLabel,{label:"",value:s.createElement("a",{href:T.target,target:"_blank",rel:"noopener noreferrer"},s.createElement(g.Z,{style:{marginTop:"-25px",fill:"#fff"}}))}):null);return s.createElement(t.Header,{title:S||".",pageTitleOverride:S||i,subtitle:F&&F!=="None"?F:"",type:"Docs",typeLink:M},O)}},7735:function(J,o,e){"use strict";e.d(o,{S:function(){return Fe}});var r=e(91512),t=e(2784),l=e(79692);const f=(0,l.Z)(ue=>({filters:{width:"250px",display:"flex"},icon:{margin:ue.spacing(-1,0,0,0)}})),g=({numberOfSelectedFilters:ue,handleToggleFilters:Ee})=>{const Ne=f();return React.createElement("div",{className:Ne.filters},React.createElement(IconButton,{className:Ne.icon,"aria-label":"settings",onClick:Ee},React.createElement(FilterListIcon,null)),React.createElement(Typography,{variant:"h6"},"Filters (",ue||0,")"))},s=(0,l.Z)(ue=>({filters:{background:"transparent",boxShadow:"0px 0px 0px 0px"},checkbox:{padding:ue.spacing(0,1,0,1)},dropdown:{width:"100%"}})),u=({filters:ue,filterOptions:Ee,resetFilters:Ne,updateSelected:Ue,updateChecked:Be})=>{const st=s();return React.createElement(Card,{className:st.filters},React.createElement(CardHeader,{title:React.createElement(Typography,{variant:"h6"},"Filters"),action:React.createElement(Button,{color:"primary",onClick:()=>Ne()},"CLEAR ALL")}),React.createElement(Divider,null),Ee.kind.length===0&&Ee.lifecycle.length===0&&React.createElement(CardContent,null,React.createElement(Typography,{variant:"subtitle2"},"Filters cannot be applied to available results")),Ee.kind.length>0&&React.createElement(CardContent,null,React.createElement(Typography,{variant:"subtitle2"},"Kind"),React.createElement(Select,{id:"outlined-select",onChange:be=>{var Qe;return Ue((Qe=be==null?void 0:be.target)==null?void 0:Qe.value)},variant:"outlined",className:st.dropdown,value:ue.selected},Ee.kind.map(be=>React.createElement(MenuItem,{selected:be==="",dense:!0,key:be,value:be},be)))),Ee.lifecycle.length>0&&React.createElement(CardContent,null,React.createElement(Typography,{variant:"subtitle2"},"Lifecycle"),React.createElement(List,{disablePadding:!0,dense:!0},Ee.lifecycle.map(be=>React.createElement(ListItem,{key:be,dense:!0,button:!0,onClick:()=>Be(be)},React.createElement(Checkbox,{edge:"start",disableRipple:!0,className:st.checkbox,color:"primary",checked:ue.checked.includes(be),tabIndex:-1,value:be,name:be}),React.createElement(ListItemText,{id:be,primary:be}))))))};var m=e(1795),y=e(22313),h=e(42494),E=e(84899),i=e(5806),S=e(21324),F=e(56939),T=e(73698),j=e(12231);const x=(0,l.Z)({label:{textTransform:"capitalize"}}),b=({className:ue,name:Ee,defaultValue:Ne,values:Ue=[]})=>{const Be=x(),{filters:st,setFilters:be}=(0,y.Rx)();(0,t.useEffect)(()=>{Array.isArray(Ne)&&be(Xe=>({...Xe,[Ee]:Ne}))},[]);const Qe=Xe=>{const{target:{value:dt,checked:K}}=Xe;be(A=>{const{[Ee]:D,...X}=A,q=(D||[]).filter(he=>he!==dt),Se=K?[...q,dt]:q;return Se.length?{...X,[Ee]:Se}:X})};return t.createElement(h.Z,{className:ue,fullWidth:!0,"data-testid":"search-checkboxfilter-next"},t.createElement(E.Z,{className:Be.label},Ee),Ue.map(Xe=>{var dt;return t.createElement(i.Z,{key:Xe,control:t.createElement(S.Z,{color:"primary",tabIndex:-1,inputProps:{"aria-labelledby":Xe},value:Xe,name:Xe,onChange:Qe,checked:((dt=st[Ee])!=null?dt:[]).includes(Xe)}),label:Xe})}))},M=({className:ue,name:Ee,defaultValue:Ne,values:Ue=[]})=>{const Be=x(),{filters:st,setFilters:be}=(0,y.Rx)();(0,t.useEffect)(()=>{typeof Ne=="string"&&be(Xe=>({...Xe,[Ee]:Ne}))},[]);const Qe=Xe=>{const{target:{value:dt}}=Xe;be(K=>{const{[Ee]:A,...D}=K;return dt?{...D,[Ee]:dt}:D})};return t.createElement(h.Z,{className:ue,variant:"filled",fullWidth:!0,"data-testid":"search-selectfilter-next"},t.createElement(F.Z,{className:Be.label,margin:"dense"},Ee),t.createElement(T.Z,{variant:"outlined",value:st[Ee]||"",onChange:Qe},t.createElement(j.Z,{value:""},t.createElement("em",null,"All")),Ue.map(Xe=>t.createElement(j.Z,{key:Xe,value:Xe},Xe))))},O=({component:ue,...Ee})=>t.createElement(ue,{...Ee});O.Checkbox=ue=>t.createElement(O,{...ue,component:b}),O.Select=ue=>t.createElement(O,{...ue,component:M});const Y=null;var G=e(65678),fe=e(3992),Re=e(8542),we=e(7089),me=e(49378),je=e(62155),Oe=e(94339),Je=e(32552),rt=e(24579),et=e(27616),ut=e(8284),ct=e(70660),at=e(11776),Rt=e(85256),Pt=e(38402),It=e(86136),St=e(38016),yt=e(56881);const Nt=(0,l.Z)(ue=>({card:{backgroundColor:"rgba(0, 0, 0, .11)"},cardContent:{paddingTop:ue.spacing(1)},icon:{color:ue.palette.common.black},list:{width:"100%"},listItemIcon:{width:"24px",height:"24px"},accordion:{backgroundColor:ue.palette.background.paper},accordionSummary:{minHeight:"auto","&.Mui-expanded":{minHeight:"auto"}},accordionSummaryContent:{margin:ue.spacing(2,0),"&.Mui-expanded":{margin:ue.spacing(2,0)}},accordionDetails:{padding:ue.spacing(0,0,1)}})),Ut=ue=>{const Ee=Nt(),{setPageCursor:Ne,setTypes:Ue,types:Be}=(0,y.Rx)(),[st,be]=(0,t.useState)(!0),{defaultValue:Qe,name:Xe,types:dt}=ue,K=()=>be(q=>!q),A=q=>()=>{Ue(q!==""?[q]:[]),Ne(void 0),be(!1)};(0,t.useEffect)(()=>{Qe&&Ue([Qe])},[]);const D=[{value:"",name:"All",icon:t.createElement(yt.Z,null)},...dt],X=Be[0]||"";return t.createElement(Oe.Z,{className:Ee.card},t.createElement(Je.Z,{title:Xe,titleTypographyProps:{variant:"overline"}}),t.createElement(rt.Z,{className:Ee.cardContent},t.createElement(et.Z,{className:Ee.accordion,expanded:st,onChange:K},t.createElement(ut.Z,{classes:{root:Ee.accordionSummary,content:Ee.accordionSummaryContent},expandIcon:t.createElement(St.Z,{className:Ee.icon}),IconButtonProps:{size:"small"}},st?"Collapse":D.filter(q=>q.value===X)[0].name),t.createElement(ct.Z,{classes:{root:Ee.accordionDetails}},t.createElement(at.Z,{className:Ee.list,component:"nav","aria-label":"filter by type",disablePadding:!0,dense:!0},D.map(q=>t.createElement(t.Fragment,{key:q.value},t.createElement(Rt.Z,null),t.createElement(Pt.Z,{selected:Be[0]===q.value||Be.length===0&&q.value==="",onClick:A(q.value),button:!0},t.createElement(It.Z,null,(0,t.cloneElement)(q.icon,{className:Ee.listItemIcon})),t.createElement(me.Z,{primary:q.name})))))))))};var Ot=e(99152),bt=e(6487);const gt=(0,l.Z)(ue=>({tabs:{borderBottom:`1px solid ${ue.palette.textVerySubtle}`,padding:ue.spacing(0,4)},tab:{height:"50px",fontWeight:ue.typography.fontWeightBold,fontSize:ue.typography.pxToRem(13),color:ue.palette.textSubtle,minWidth:"130px"}})),vt=ue=>{const Ee=gt(),{setPageCursor:Ne,setTypes:Ue,types:Be}=(0,y.Rx)(),{defaultValue:st,types:be}=ue,Qe=(dt,K)=>{Ue(K!==""?[K]:[]),Ne(void 0)};(0,t.useEffect)(()=>{st&&Ue([st])},[]);const Xe=[{value:"",name:"All"},...be];return t.createElement(Ot.Z,{className:Ee.tabs,indicatorColor:"primary",value:Be.length===0?"":Be[0],onChange:Qe},Xe.map(dt=>t.createElement(bt.Z,{className:Ee.tab,disableRipple:!0,label:dt.name,value:dt.value})))},$t=(0,l.Z)(ue=>({label:{textTransform:"capitalize"},chips:{display:"flex",flexWrap:"wrap",marginTop:ue.spacing(1)},chip:{margin:2}})),De=ue=>{const{className:Ee,defaultValue:Ne,name:Ue,values:Be=[]}=ue,st=$t(),{types:be,setTypes:Qe}=(0,y.Rx)();(0,je.Z)(()=>{be.length||(Ne&&Array.isArray(Ne)?Qe(Ne):Ne&&Qe([Ne]))});const Xe=dt=>{const K=dt.target.value;Qe(K)};return t.createElement(h.Z,{className:Ee,variant:"filled",fullWidth:!0,"data-testid":"search-typefilter-next"},t.createElement(F.Z,{className:st.label,margin:"dense"},Ue),t.createElement(T.Z,{multiple:!0,variant:"outlined",value:be,onChange:Xe,placeholder:"All Results",renderValue:dt=>t.createElement("div",{className:st.chips},dt.map(K=>t.createElement(we.Z,{key:K,label:K,className:st.chip,size:"small"})))},Be.map(dt=>t.createElement(j.Z,{key:dt,value:dt},t.createElement(S.Z,{checked:be.indexOf(dt)>-1}),t.createElement(me.Z,{primary:dt})))))};De.Accordion=ue=>t.createElement(Ut,{...ue}),De.Tabs=ue=>t.createElement(vt,{...ue});var it=e(19126),lt=e(20863),le=e(36964),Q=e(9118);const P=ue=>{const Ee=useRouteRef(rootRouteRef),{focusContent:Ne}=useContent(),Ue=useNavigate(),Be=useCallback(st=>{const be=qs.stringify({query:st},{addQueryPrefix:!0});Ne(),Ue(`${Ee()}${be}`)},[Ne,Ue,Ee]);return React.createElement(SidebarSearchField,{icon:ue.icon,onSearch:Be,to:"/search"})};var C=e(60905),B=e(86619),z=e(50581),_=e(61837),ne=e(4614),ge=e(21853),ye=e(88013),xe=e(10289),ze=e(48760),Me=e(71226);const Te=({entityId:ue,debounceTime:Ee=150})=>{const[Ne,Ue]=(0,t.useState)(!1),Be=(0,xe.s0)(),{term:st,setTerm:be,result:{loading:Qe,value:Xe}}=(0,y.Rx)(),[dt,K]=(0,t.useState)([]);(0,t.useEffect)(()=>{let Se=!0;if(Se&&Xe){const he=Xe.results.slice(0,10);K(he)}return()=>{Se=!1}},[Qe,Xe]);const[A,D]=(0,t.useState)(st);(0,ze.Z)(()=>be(A),Ee,[A]);const X=Se=>{Ne||Ue(!0),D(Se.target.value)},q=(Se,he)=>{if(he==null?void 0:he.document){const{location:Le}=he.document;Be(Le)}};return t.createElement(C.Z,{item:!0,xs:12},t.createElement(ye.ZP,{"data-testid":"techdocs-search-bar",size:"small",open:Ne,getOptionLabel:()=>"",filterOptions:Se=>Se,onClose:()=>{Ue(!1)},onFocus:()=>{Ue(!0)},onChange:q,blurOnSelect:!0,noOptionsText:"No results found",value:null,options:dt,renderOption:({document:Se})=>t.createElement(Me.O,{result:Se,lineClamp:3,asListItem:!1,asLink:!1,title:Se.title}),loading:Qe,renderInput:Se=>t.createElement(B.Z,{...Se,"data-testid":"techdocs-search-bar-input",variant:"outlined",fullWidth:!0,placeholder:`Search ${ue.name} docs`,value:A,onChange:X,InputProps:{...Se.InputProps,startAdornment:t.createElement(z.Z,{position:"start"},t.createElement(_.Z,{"aria-label":"Query",disabled:!0},t.createElement(ge.Z,null))),endAdornment:t.createElement(t.Fragment,null,Qe?t.createElement(ne.Z,{color:"inherit",size:20}):null,Se.InputProps.endAdornment)}})}))},Fe=ue=>{const Ee={term:"",types:["techdocs"],pageCursor:"",filters:ue.entityId};return t.createElement(y.Nd,{initialState:Ee},t.createElement(Te,{...ue}))}},25921:function(J,o,e){"use strict";e.d(o,{N:function(){return M}});var r=e(2784),t=e(9118),l=e(79692),f=e(4614),g=e(77277),s=e(99688),u=e(12420),m=e(60905),y=e(90436),h=e(61837),E=e(4190),i=e(87685);const S=(0,l.Z)(O=>(0,u.Z)({paper:{width:"100%",[O.breakpoints.up("sm")]:{width:"75%"},[O.breakpoints.up("md")]:{width:"50%"},padding:O.spacing(2.5)},root:{height:"100%",overflow:"hidden"},logs:{background:O.palette.background.default}})),F=({buildLog:O,onClose:Y})=>{const G=S(),fe=O.length===0?"Waiting for logs...":O.join(`
|
|
148
|
+
`);return r.createElement(m.Z,{container:!0,direction:"column",className:G.root,spacing:0,wrap:"nowrap"},r.createElement(m.Z,{item:!0,container:!0,justifyContent:"space-between",alignItems:"center",spacing:0,wrap:"nowrap"},r.createElement(y.Z,{variant:"h5"},"Build Details"),r.createElement(h.Z,{key:"dismiss",title:"Close the drawer",onClick:Y,color:"inherit"},r.createElement(i.Z,null))),r.createElement(t.LogViewer,{text:fe,classes:{root:G.logs}}))},T=({buildLog:O})=>{const Y=S(),[G,fe]=(0,r.useState)(!1);return r.createElement(r.Fragment,null,r.createElement(g.Z,{color:"inherit",onClick:()=>fe(!0)},"Show Build Logs"),r.createElement(E.ZP,{classes:{paper:Y.paper},anchor:"right",open:G,onClose:()=>fe(!1)},r.createElement(F,{buildLog:O,onClose:()=>fe(!1)})))};var j=e(94252),x=e(75448);const b=(0,l.Z)(()=>({message:{wordBreak:"break-word",overflowWrap:"anywhere"}})),M=()=>{let O=null;const Y=b(),{state:G,contentReload:fe,contentErrorMessage:Re,syncErrorMessage:we,buildLog:me}=(0,x.DK)(),je=G==="CHECKING"?r.createElement(t.Progress,null):null;return G==="INITIAL_BUILD"&&(O=r.createElement(s.Z,{variant:"outlined",severity:"info",icon:r.createElement(f.Z,{size:"24px"}),action:r.createElement(T,{buildLog:me})},"Documentation is accessed for the first time and is being prepared. The subsequent loads are much faster.")),G==="CONTENT_STALE_REFRESHING"&&(O=r.createElement(s.Z,{variant:"outlined",severity:"info",icon:r.createElement(f.Z,{size:"24px"}),action:r.createElement(T,{buildLog:me})},"A newer version of this documentation is being prepared and will be available shortly.")),G==="CONTENT_STALE_READY"&&(O=r.createElement(s.Z,{variant:"outlined",severity:"success",action:r.createElement(g.Z,{color:"inherit",onClick:()=>fe()},"Refresh")},"A newer version of this documentation is now available, please refresh to view.")),G==="CONTENT_STALE_ERROR"&&(O=r.createElement(s.Z,{variant:"outlined",severity:"error",action:r.createElement(T,{buildLog:me}),classes:{message:Y.message}},"Building a newer version of this documentation failed."," ",we)),G==="CONTENT_NOT_FOUND"&&(O=r.createElement(r.Fragment,null,we&&r.createElement(s.Z,{variant:"outlined",severity:"error",action:r.createElement(T,{buildLog:me}),classes:{message:Y.message}},"Building a newer version of this documentation failed."," ",we),r.createElement(j.T,{errorMessage:Re}))),r.createElement(r.Fragment,null,je,O)}},73873:function(J,o,e){"use strict";e.d(o,{Ej:function(){return r.Ej},EV:function(){return t.TechDocsPage},nN:function(){return l.n}});var r=e(75448),t=e(31752),l=e(46025),f=e(25921),g=e(7735)},68725:function(J,o,e){"use strict";e.d(o,{_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"})},19133:function(J,o,e){"use strict";J.exports=e.p+"static/createComponent.975d1e1e..svg"},86284:function(J,o,e){"use strict";J.exports=e.p+"static/missingAnnotation.67f79e98..svg"},3871:function(J,o,e){"use strict";J.exports=e.p+"static/noBuild.1715fa71..svg"},96465:function(J,o,e){"use strict";J.exports=e.p+"static/noInformation.4b426325..svg"},29788:function(J,o,e){"use strict";J.exports=e.p+"static/mic-drop.fe3ef4d0..svg"},219:function(J,o,e){"use strict";J.exports=e.p+"static/illo.7884c54f..svg"},53260:function(){}},function(J){var o=function(r){return J(J.s=r)};J.O(0,[2370,6202,9284,2126,7012,5218,4983,4736],function(){return o(88649),o(63865)});var e=J.O()}]);
|
|
149
|
+
|
|
150
|
+
//# sourceMappingURL=main.bd8a508f.js.map
|