@techdocs/cli 0.0.0-nightly-20220623347 → 0.0.0-nightly-202201122931
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/dist/techdocs-preview-bundle/.config-schema.json +20 -20
- package/dist/techdocs-preview-bundle/index.html +1 -1
- package/dist/techdocs-preview-bundle/static/{1553.faaba42c.chunk.js → 1553.8531b2f3.chunk.js} +1 -1
- package/dist/techdocs-preview-bundle/static/{1553.faaba42c.chunk.js.map → 1553.8531b2f3.chunk.js.map} +1 -1
- package/dist/techdocs-preview-bundle/static/{1959.4ef8f55d.chunk.js → 1959.615646f2.chunk.js} +1 -1
- package/dist/techdocs-preview-bundle/static/{1959.4ef8f55d.chunk.js.map → 1959.615646f2.chunk.js.map} +1 -1
- package/dist/techdocs-preview-bundle/static/{3825.f21b7877.chunk.js → 3825.3ef318a6.chunk.js} +1 -1
- package/dist/techdocs-preview-bundle/static/{3825.f21b7877.chunk.js.map → 3825.3ef318a6.chunk.js.map} +1 -1
- package/dist/techdocs-preview-bundle/static/{390.69ed17c8.chunk.js → 390.4d92e8b4.chunk.js} +1 -1
- package/dist/techdocs-preview-bundle/static/{390.69ed17c8.chunk.js.map → 390.4d92e8b4.chunk.js.map} +1 -1
- package/dist/techdocs-preview-bundle/static/{4022.87d787cb.chunk.js → 4022.d2e6166c.chunk.js} +1 -1
- package/dist/techdocs-preview-bundle/static/{4022.87d787cb.chunk.js.map → 4022.d2e6166c.chunk.js.map} +1 -1
- package/dist/techdocs-preview-bundle/static/{4960.a3a524a8.chunk.js → 4960.73981fd4.chunk.js} +1 -1
- package/dist/techdocs-preview-bundle/static/{4960.a3a524a8.chunk.js.map → 4960.73981fd4.chunk.js.map} +1 -1
- package/dist/techdocs-preview-bundle/static/{6235.47f4b5f0.chunk.js → 6235.09f519e0.chunk.js} +1 -1
- package/dist/techdocs-preview-bundle/static/{6235.47f4b5f0.chunk.js.map → 6235.09f519e0.chunk.js.map} +1 -1
- package/dist/techdocs-preview-bundle/static/{8061.ea281ba6.chunk.js → 8061.8431f41e.chunk.js} +1 -1
- package/dist/techdocs-preview-bundle/static/{8061.ea281ba6.chunk.js.map → 8061.8431f41e.chunk.js.map} +1 -1
- package/dist/techdocs-preview-bundle/static/{8792.08576b88.chunk.js → 8792.8bd4e401.chunk.js} +1 -1
- package/dist/techdocs-preview-bundle/static/{8792.08576b88.chunk.js.map → 8792.8bd4e401.chunk.js.map} +1 -1
- package/dist/techdocs-preview-bundle/static/{9028.9a6b5c5d.chunk.js → 9028.4d923ca4.chunk.js} +1 -1
- package/dist/techdocs-preview-bundle/static/{9028.9a6b5c5d.chunk.js.map → 9028.4d923ca4.chunk.js.map} +1 -1
- package/dist/techdocs-preview-bundle/static/main.c8633ec5.js +143 -0
- package/dist/techdocs-preview-bundle/static/main.c8633ec5.js.map +1 -0
- package/dist/techdocs-preview-bundle/static/{runtime.8fe8af36.js → runtime.c8633ec5.js} +3 -3
- package/dist/techdocs-preview-bundle/static/{runtime.8fe8af36.js.map → runtime.c8633ec5.js.map} +1 -1
- package/dist/techdocs-preview-bundle/static/{vendor.8fe8af36.js → vendor.c8633ec5.js} +1 -1
- package/dist/techdocs-preview-bundle/static/{vendor.8fe8af36.js.map → vendor.c8633ec5.js.map} +1 -1
- package/package.json +7 -7
- package/dist/techdocs-preview-bundle/static/main.8fe8af36.js +0 -143
- package/dist/techdocs-preview-bundle/static/main.8fe8af36.js.map +0 -1
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
var vi=Object.defineProperty;var Ri=(X,o,t)=>o in X?vi(X,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):X[o]=t;var q=(X,o,t)=>(Ri(X,typeof o!="symbol"?o+"":o,t),t),io=(X,o,t)=>{if(!o.has(X))throw TypeError("Cannot "+t)};var te=(X,o,t)=>(io(X,o,"read from private field"),t?t.call(X):o.get(X)),En=(X,o,t)=>{if(o.has(X))throw TypeError("Cannot add the same private member more than once");o instanceof WeakSet?o.add(X):o.set(X,t)},Tn=(X,o,t,r)=>(io(X,o,"write to private field"),r?r.call(X,t):o.set(X,t),t);(self.webpackChunkembedded_techdocs_app=self.webpackChunkembedded_techdocs_app||[]).push([[179],{30001:function(X,o,t){"use strict";t.d(o,{n3:function(){return c},MS:function(){return s}});var r=t(52890),e=t(10179),l=t(96279),h=t.n(l);const c=Symbol("CATALOG_FILTER_EXISTS");class s{constructor(d){q(this,"discoveryApi");q(this,"fetchApi");this.discoveryApi=d.discoveryApi,this.fetchApi=d.fetchApi||{fetch:h()}}async getEntityAncestors(d,y){const{kind:m,namespace:E,name:i}=(0,r.of)(d.entityRef);return await this.requestRequired("GET",`/entities/by-name/${encodeURIComponent(m)}/${encodeURIComponent(E)}/${encodeURIComponent(i)}/ancestry`,y)}async getLocationById(d,y){return await this.requestOptional("GET",`/locations/${encodeURIComponent(d)}`,y)}async getEntities(d,y){const{filter:m=[],fields:E=[],offset:i,limit:S,after:B}=d!=null?d:{},T=[m].flat(),G=[];for(const I of T){const K=[];for(const[V,st]of Object.entries(I))for(const At of[st].flat())At===c?K.push(encodeURIComponent(V)):typeof At=="string"&&K.push(`${encodeURIComponent(V)}=${encodeURIComponent(At)}`);K.length&&G.push(`filter=${K.join(",")}`)}E.length&&G.push(`fields=${E.map(encodeURIComponent).join(",")}`),i!==void 0&&G.push(`offset=${i}`),S!==void 0&&G.push(`limit=${S}`),B!==void 0&&G.push(`after=${encodeURIComponent(B)}`);const H=G.length?`?${G.join("&")}`:"",D=await this.requestRequired("GET",`/entities${H}`,y),b=(I,K)=>{var At,zt;if(((At=I.metadata)==null?void 0:At.name)===void 0||I.kind===void 0||((zt=K.metadata)==null?void 0:zt.name)===void 0||K.kind===void 0)return 0;const V=(0,r.eE)(I),st=(0,r.eE)(K);return V<st?-1:V>st?1:0};return{items:D.sort(b)}}async getEntityByName(d,y){const{kind:m,namespace:E="default",name:i}=d;return this.requestOptional("GET",`/entities/by-name/${encodeURIComponent(m)}/${encodeURIComponent(E)}/${encodeURIComponent(i)}`,y)}async refreshEntity(d,y){const m=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:d})});if(m.status!==200)throw new Error(await m.text())}async addLocation({type:d="url",target:y,dryRun:m,presence:E},i){const S=await this.fetchApi.fetch(`${await this.discoveryApi.getBaseUrl("catalog")}/locations${m?"?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:d,target:y,presence:E})});if(S.status!==201)throw new Error(await S.text());const{location:B,entities:T,exists:G}=await S.json();if(!B)throw new Error(`Location wasn't added: ${y}`);return{location:B,entities:T,exists:G}}async getOriginLocationByEntity(d,y){var i;const m=(i=d.metadata.annotations)==null?void 0:i[r.lb];return m?(await this.requestRequired("GET","/locations",y)).map(S=>S.data).find(S=>m===(0,r.Bt)(S)):void 0}async getLocationByEntity(d,y){var i;const m=(i=d.metadata.annotations)==null?void 0:i[r.Jl];return m?(await this.requestRequired("GET","/locations",y)).map(S=>S.data).find(S=>m===(0,r.Bt)(S)):void 0}async removeLocationById(d,y){await this.requestIgnored("DELETE",`/locations/${encodeURIComponent(d)}`,y)}async removeEntityByUid(d,y){await this.requestIgnored("DELETE",`/entities/by-uid/${encodeURIComponent(d)}`,y)}async requestIgnored(d,y,m){const E=`${await this.discoveryApi.getBaseUrl("catalog")}${y}`,i=(m==null?void 0:m.token)?{Authorization:`Bearer ${m.token}`}:{},S=await this.fetchApi.fetch(E,{method:d,headers:i});if(!S.ok)throw await e.VL.fromResponse(S)}async requestRequired(d,y,m){const E=`${await this.discoveryApi.getBaseUrl("catalog")}${y}`,i=(m==null?void 0:m.token)?{Authorization:`Bearer ${m.token}`}:{},S=await this.fetchApi.fetch(E,{method:d,headers:i});if(!S.ok)throw await e.VL.fromResponse(S);return await S.json()}async requestOptional(d,y,m){const E=`${await this.discoveryApi.getBaseUrl("catalog")}${y}`,i=(m==null?void 0:m.token)?{Authorization:`Bearer ${m.token}`}:{},S=await this.fetchApi.fetch(E,{method:d,headers:i});if(!S.ok){if(S.status===404)return;throw await e.VL.fromResponse(S)}return await S.json()}}},52890:function(X,o,t){"use strict";t.d(o,{J1:function(){return h},sk:function(){return r},Jl:function(){return O},lb:function(){return Q},w$:function(){return ee},nP:function(){return re},aS:function(){return Yt},hr:function(){return ce},S4:function(){return j},cz:function(){return Ct},M_:function(){return Dt},wX:function(){return tt},wh:function(){return l},C_:function(){return Jt},of:function(){return Kt},Me:function(){return Et},TH:function(){return pe},eE:function(){return se},Bt:function(){return mt}});const r="default",e=null,l="backstage.io/view-url",h="backstage.io/edit-url";var c=t(76635),s=t.n(c);class u{constructor(Z=ENTITY_DEFAULT_NAMESPACE){q(this,"namespace");this.namespace=Z}async enforce(Z){return Z.metadata.namespace?Z:lodash.merge({metadata:{namespace:this.namespace}},Z)}}class d{static isValidPrefixAndOrSuffix(Z,_,pt,Ht){if(typeof Z!="string")return!1;const _t=Z.split(_);return _t.length===1?Ht(_t[0]):_t.length===2?pt(_t[0])&&Ht(_t[1]):!1}static isJsonSafe(Z){try{return s().isEqual(Z,JSON.parse(JSON.stringify(Z)))}catch{return!1}}static isValidDnsSubdomain(Z){return typeof Z=="string"&&Z.length>=1&&Z.length<=253&&Z.split(".").every(d.isValidDnsLabel)}static isValidDnsLabel(Z){return typeof Z=="string"&&Z.length>=1&&Z.length<=63&&/^[a-z0-9]+(\-[a-z0-9]+)*$/.test(Z)}static isValidTag(Z){return typeof Z=="string"&&Z.length>=1&&Z.length<=63&&/^[a-z0-9+#]+(\-[a-z0-9+#]+)*$/.test(Z)}static isValidUrl(Z){if(typeof Z!="string")return!1;try{return new URL(Z),!0}catch{return!1}}static isValidString(Z){var _;return typeof Z=="string"&&((_=Z==null?void 0:Z.trim())==null?void 0:_.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}}}}}'),m=t(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 B=new Map,T=[y,E,i,S];function G(lt){if(!(lt==null?void 0:lt.length))throw new TypeError("Unknown error");const Z=lt[0];throw new TypeError(`${Z.dataPath||"<root>"} ${Z.message}${Z.params?` - ${Object.entries(Z.params).map(([_,pt])=>`${_}: ${pt}`).join(", ")}`:""}`)}function H(lt,Z={}){var Be;const _=(Be=Z==null?void 0:Z.disableCache)!=null?Be:!1,pt=_?"":JSON.stringify(lt);if(!_){const an=B.get(pt);if(an)return an}const Ht=D(lt),_t=new m.ZP({allowUnionTypes:!0,allErrors:!0,validateSchema:!0});Ht.length&&_t.addSchema(Ht,void 0,void 0,!0);const ge=_t.compile(lt);return _||B.set(pt,ge),ge}function D(lt){if(typeof lt!="object")return[];const Z=new Set;lt.$id&&Z.add(lt.$id);const _=new Array,pt=[lt];for(;pt.length;){const Ht=pt.pop();for(const _t of b(Ht))if(!Z.has(_t)){Z.add(_t);const ge=T.find(Be=>Be.$id===_t);ge&&(_.push(ge),pt.push(ge))}}return _}function*b(lt){const Z=[lt];for(;Z.length;){const _=Z.pop();if(typeof _=="object"&&_)for(const[pt,Ht]of Object.entries(_))pt==="$ref"&&typeof Ht=="string"?yield Ht.split("#")[0]:Z.push(Ht)}}function I(lt){const Z=compileAjvSchema(lt||entityEnvelopeSchema);return _=>{if(Z(_)===!0)return _;throw throwAjvError(Z.errors)}}function K(lt){const Z=H(lt);return _=>{var _t;if(Z(_)===!0)return _;const Ht=(_t=Z.errors)==null?void 0:_t.filter(ge=>["/kind","/apiVersion"].includes(ge.dataPath));if((Ht==null?void 0:Ht.length)&&Ht.every(ge=>ge.keyword==="enum"))return!1;throw G(Z.errors)}}function V(lt){const Z=compileAjvSchema(lt||entitySchema);return _=>{if(Z(_)===!0)return _;throw throwAjvError(Z.errors)}}class st{static isValidApiVersion(Z){return d.isValidPrefixAndOrSuffix(Z,"/",d.isValidDnsSubdomain,_=>_.length>=1&&_.length<=63&&/^[a-z0-9A-Z]+$/.test(_))}static isValidKind(Z){return typeof Z=="string"&&Z.length>=1&&Z.length<=63&&/^[a-zA-Z][a-z0-9A-Z]*$/.test(Z)}static isValidObjectName(Z){return typeof Z=="string"&&Z.length>=1&&Z.length<=63&&/^([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$/.test(Z)}static isValidNamespace(Z){return d.isValidDnsLabel(Z)}static isValidLabelKey(Z){return d.isValidPrefixAndOrSuffix(Z,"/",d.isValidDnsSubdomain,st.isValidObjectName)}static isValidLabelValue(Z){return Z===""||st.isValidObjectName(Z)}static isValidAnnotationKey(Z){return d.isValidPrefixAndOrSuffix(Z,"/",d.isValidDnsSubdomain,st.isValidObjectName)}static isValidAnnotationValue(Z){return typeof Z=="string"}}const At={isValidApiVersion:st.isValidApiVersion,isValidKind:st.isValidKind,isValidEntityName:st.isValidObjectName,isValidNamespace:st.isValidNamespace,isValidLabelKey:st.isValidLabelKey,isValidLabelValue:st.isValidLabelValue,isValidAnnotationKey:st.isValidAnnotationKey,isValidAnnotationValue:st.isValidAnnotationValue,isValidTag:d.isValidTag};function zt(lt={}){return{...At,...lt}}class ht{constructor(Z=makeValidator()){q(this,"validators");this.validators=Z}async enforce(Z){var ge,Be,an,hn,Xn,Pn,In;function _(fe,Ze,sn){if(Ze==null)throw new Error(`${fe} must have a value`);let On;try{On=sn(Ze)}catch(Ve){throw new Error(`${fe} could not be validated, ${Ve}`)}if(!On){let Ve;switch(sn.name){case"isValidLabelValue":case"isValidObjectName":Ve="a string that is sequences of [a-zA-Z0-9] separated by any of [-_.], at most 63 characters in total";break;case"isValidLabelKey":case"isValidApiVersion":case"isValidAnnotationKey":Ve="a valid prefix and/or suffix";break;case"isValidNamespace":case"isValidDnsLabel":Ve="a string that is sequences of [a-z0-9] separated by [-], at most 63 characters in total";break;case"isValidTag":Ve="a string that is sequences of [a-z0-9+#] separated by [-], at most 63 characters in total";break;case"isValidAnnotationValue":Ve="a string";break;case"isValidKind":Ve="a string that is a sequence of [a-zA-Z][a-z0-9A-Z], at most 63 characters in total";break;case"isValidUrl":Ve="a string that is a valid url";break;case"isValidString":Ve="a non empty string";break;default:Ve=void 0;break}const Un=Ve?` expected ${Ve} but found "${Ze}".`:"";throw new Error(`"${fe}" is not valid;${Un} 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 pt(fe,Ze,sn){return Ze===void 0||_(fe,Ze,sn)}_("apiVersion",Z.apiVersion,this.validators.isValidApiVersion),_("kind",Z.kind,this.validators.isValidKind),_("metadata.name",Z.metadata.name,this.validators.isValidEntityName),pt("metadata.namespace",Z.metadata.namespace,this.validators.isValidNamespace);for(const[fe,Ze]of Object.entries((ge=Z.metadata.labels)!=null?ge:[]))_(`labels.${fe}`,fe,this.validators.isValidLabelKey),_(`labels.${fe}`,Ze,this.validators.isValidLabelValue);for(const[fe,Ze]of Object.entries((Be=Z.metadata.annotations)!=null?Be:[]))_(`annotations.${fe}`,fe,this.validators.isValidAnnotationKey),_(`annotations.${fe}`,Ze,this.validators.isValidAnnotationValue);const Ht=(an=Z.metadata.tags)!=null?an:[];for(let fe=0;fe<Ht.length;++fe)_(`tags.${fe}`,Ht[fe],this.validators.isValidTag);const _t=(hn=Z.metadata.links)!=null?hn:[];for(let fe=0;fe<_t.length;++fe)_(`links.${fe}.url`,(Xn=_t[fe])==null?void 0:Xn.url,CommonValidatorFunctions.isValidUrl),pt(`links.${fe}.title`,(Pn=_t[fe])==null?void 0:Pn.title,CommonValidatorFunctions.isValidString),pt(`links.${fe}.icon`,(In=_t[fe])==null?void 0:In.icon,KubernetesValidatorFunctions.isValidObjectName);return Z}}class jt{constructor(){q(this,"validate")}async enforce(Z){if(!this.validate){const Ht=new Ajv({allowUnionTypes:!0});this.validate=Ht.addSchema([commonSchema,entityMetaSchema],void 0,void 0,!0).compile(entitySchema)}if(this.validate(Z)===!0)return Z;const[pt]=this.validate.errors||[];throw pt?new Error(`Malformed envelope, ${pt.dataPath||"<root>"} ${pt.message}`):new Error("Malformed envelope, Unknown error")}}function Ot(lt){var _,pt;const Z=/^([^:/]+:)?([^:/]+\/)?([^:/]+)$/.exec(lt.trim());if(!Z)throw new TypeError(`Entity reference "${lt}" was not on the form [<kind>:][<namespace>/]<name>`);return{kind:(_=Z[1])==null?void 0:_.slice(0,-1),namespace:(pt=Z[2])==null?void 0:pt.slice(0,-1),name:Z[3]}}function Jt(lt){return{kind:lt.kind,namespace:lt.metadata.namespace||r,name:lt.metadata.name}}function ae(lt,Z={}){const{kind:_,namespace:pt,name:Ht}=Kt(lt,{defaultNamespace:ENTITY_DEFAULT_NAMESPACE,...Z});if(!_)throw new Error(`Entity reference ${pt}/${Ht} did not contain a kind`);return{kind:_,namespace:pt,name:Ht}}function Kt(lt,Z={}){var _t,ge;if(!lt)throw new Error("Entity reference must not be empty");if(typeof lt=="string"){const Be=Ot(lt);return{kind:(_t=Be.kind)!=null?_t:Z.defaultKind,namespace:(ge=Be.namespace)!=null?ge:Z.defaultNamespace,name:Be.name}}const{kind:_,namespace:pt,name:Ht}=lt;if(_==="")throw new Error("Entity reference kinds must not be empty");if(pt==="")throw new Error("Entity reference namespaces must not be empty");if(!Ht)throw new Error("Entity references must contain a name");return{kind:_!=null?_:Z.defaultKind,namespace:pt!=null?pt:Z.defaultNamespace,name:Ht}}function pe(lt){let Z,_,pt;return"metadata"in lt?(Z=lt.kind,_=lt.metadata.namespace,pt=lt.metadata.name):(Z=lt.kind,_=lt.namespace,pt=lt.name),(Z==null?void 0:Z.includes(":"))||(Z==null?void 0:Z.includes("/"))||(_==null?void 0:_.includes(":"))||(_==null?void 0:_.includes("/"))||pt.includes(":")||pt.includes("/")?{kind:Z,namespace:_,name:pt}:`${Z?`${Z}:`:""}${_?`${_}/`:""}${pt}`}function se(lt){var Ht,_t;let Z,_,pt;return"metadata"in lt?(Z=lt.kind,_=(Ht=lt.metadata.namespace)!=null?Ht:r,pt=lt.metadata.name):(Z=lt.kind,_=(_t=lt.namespace)!=null?_t:r,pt=lt.name),`${Z.toLocaleLowerCase("en-US")}:${_.toLocaleLowerCase("en-US")}/${pt.toLocaleLowerCase("en-US")}`}function le(lt,Z,_){const pt=lt.kind,Ht=lt.metadata.namespace||ENTITY_DEFAULT_NAMESPACE,_t=lt.metadata.name;let ge,Be,an;if(typeof Z=="string"){const hn=Ot(Z);ge=hn.kind||(_==null?void 0:_.defaultKind),Be=hn.namespace||(_==null?void 0:_.defaultNamespace)||ENTITY_DEFAULT_NAMESPACE,an=hn.name}else ge=Z.kind||(_==null?void 0:_.defaultKind),Be=Z.namespace||(_==null?void 0:_.defaultNamespace)||ENTITY_DEFAULT_NAMESPACE,an=Z.name;if(!ge||!Be)throw new Error("Entity reference or context did not contain kind and namespace");return pt.toLocaleLowerCase("en-US")===ge.toLocaleLowerCase("en-US")&&Ht.toLocaleLowerCase("en-US")===Be.toLocaleLowerCase("en-US")&&_t.toLocaleLowerCase("en-US")===an.toLocaleLowerCase("en-US")}var Ae=t(48834).Buffer;function Me(){return uuidv4()}function ye(){return Ae.from(uuidv4(),"utf8").toString("base64").replace(/[^\w]/g,"")}function ve(lt,Z){const _=lodash.cloneDeep(lt),pt=lodash.cloneDeep(Z);return _.metadata.labels||(_.metadata.labels={}),pt.metadata.labels||(pt.metadata.labels={}),_.metadata.annotations||(_.metadata.annotations={}),pt.metadata.annotations||(pt.metadata.annotations={}),_.metadata.tags||(_.metadata.tags=[]),pt.metadata.tags||(pt.metadata.tags=[]),delete _.metadata.uid,delete _.metadata.etag,delete _.metadata.generation,delete pt.metadata.uid,delete pt.metadata.etag,delete pt.metadata.generation,delete _.relations,delete _.status,delete pt.relations,delete pt.status,!lodash.isEqual(_,pt)}function de(lt,Z){const{uid:_,etag:pt,generation:Ht}=lt.metadata;if(!_||!pt||!Ht)throw new Error("Previous entity must have uid, etag and generation");const _t=lodash.cloneDeep(Z),ge=ve(lt,_t),Be=!lodash.isEqual(lt.spec,_t.spec);return _t.metadata.uid=_,_t.metadata.etag=ge?ye():pt,_t.metadata.generation=Be?Ht+1:Ht,_t}class Ne{constructor(Z){this.policies=Z}async enforce(Z){let _=Z;for(const pt of this.policies){const Ht=await pt.enforce(_);if(!Ht)throw new Error(`Policy ${pt.constructor.name} did not return a result`);_=Ht}return _}}class Ue{constructor(Z){this.policies=Z}async enforce(Z){for(const _ of this.policies){const pt=await _.enforce(Z);if(pt)return pt}throw new Error("The entity did not match any known policy")}}const Ie={allOf(lt){return new Ne(lt)},oneOf(lt){return new Ue(lt)}};var Le=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"ApiV1alpha1","description":"An API describes an interface that can be exposed by a component. The API can be defined in different formats, like OpenAPI, AsyncAPI, GraphQL, gRPC, or other formats.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"API","metadata":{"name":"artist-api","description":"Retrieve artist details","labels":{"product_name":"Random value Generator"},"annotations":{"docs":"https://github.com/..../tree/develop/doc"}},"spec":{"type":"openapi","lifecycle":"production","owner":"artist-relations-team","system":"artist-engagement-portal","definition":"openapi: \\"3.0.0\\"\\ninfo:..."}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1alpha1","backstage.io/v1beta1"]},"kind":{"enum":["API"]},"spec":{"type":"object","required":["type","lifecycle","owner","definition"],"properties":{"type":{"type":"string","description":"The type of the API definition.","examples":["openapi","asyncapi","graphql","grpc"],"minLength":1},"lifecycle":{"type":"string","description":"The lifecycle state of the API.","examples":["experimental","production","deprecated"],"minLength":1},"owner":{"type":"string","description":"An entity reference to the owner of the API.","examples":["artist-relations-team","user:john.johnson"],"minLength":1},"system":{"type":"string","description":"An entity reference to the system that the API belongs to.","minLength":1},"definition":{"type":"string","description":"The definition of the API, based on the format defined by the type.","minLength":1}}}}}]}');function me(lt){const Z=K(lt);return{async check(_){return Z(_)===_}}}const Re=me(Le);var je=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"ComponentV1alpha1","description":"A Component describes a software component. It is typically intimately linked to the source code that constitutes the component, and should be what a developer may regard a \\"unit of software\\", usually with a distinct deployable or linkable artifact.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Component","metadata":{"name":"LoremService","description":"Creates Lorems like a pro.","labels":{"product_name":"Random value Generator"},"annotations":{"docs":"https://github.com/..../tree/develop/doc"}},"spec":{"type":"service","lifecycle":"production","owner":"tools"}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1alpha1","backstage.io/v1beta1"]},"kind":{"enum":["Component"]},"spec":{"type":"object","required":["type","lifecycle","owner"],"properties":{"type":{"type":"string","description":"The type of component.","examples":["service","website","library"],"minLength":1},"lifecycle":{"type":"string","description":"The lifecycle state of the component.","examples":["experimental","production","deprecated"],"minLength":1},"owner":{"type":"string","description":"An entity reference to the owner of the component.","examples":["artist-relations-team","user:john.johnson"],"minLength":1},"system":{"type":"string","description":"An entity reference to the system that the component belongs to.","minLength":1},"subcomponentOf":{"type":"string","description":"An entity reference to another component of which the component is a part.","minLength":1},"providesApis":{"type":"array","description":"An array of entity references to the APIs that are provided by the component.","items":{"type":"string","minLength":1}},"consumesApis":{"type":"array","description":"An array of entity references to the APIs that are consumed by the component.","items":{"type":"string","minLength":1}},"dependsOn":{"type":"array","description":"An array of references to other entities that the component depends on to function.","items":{"type":"string","minLength":1}}}}}}]}');const Ft=me(je);var oe=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 ot=me(oe);var P=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 v=me(P);var N=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 F=me(N),j="ownedBy",nt="ownerOf",gt="consumesApi",ct="apiConsumedBy",Dt="providesApi",Zt="apiProvidedBy",re="dependsOn",ee="dependencyOf",Lt="parentOf",Tt="childOf",ce="memberOf",dt="hasMember",Ct="partOf",Yt="hasPart";var Vt=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 vt=me(Vt);var Nt=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 Wt=me(Nt);var he=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 qt=me(he);var J=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 R=me(J),O="backstage.io/managed-by-location",Q="backstage.io/managed-by-origin-location",tt="backstage.io/source-location";function Et(lt){if(typeof lt!="string")throw new TypeError(`Unable to parse location reference '${lt}', unexpected argument ${typeof lt}`);const Z=lt.indexOf(":");if(Z<0)throw new TypeError(`Unable to parse location reference '${lt}', expected '<type>:<target>', e.g. 'url:https://host/path'`);const _=lt.substr(0,Z).trim(),pt=lt.substr(Z+1).trim();if(!_||!pt)throw new TypeError(`Unable to parse location reference '${lt}', expected '<type>:<target>', e.g. 'url:https://host/path'`);if(_==="http"||_==="https")throw new TypeError(`Invalid location reference '${lt}', please prefix it with 'url:', e.g. 'url:${lt}'`);return{type:_,target:pt}}function mt(lt){const{type:Z,target:_}=lt;if(Z){if(!_)throw new TypeError("Unable to stringify location reference, empty target")}else throw new TypeError("Unable to stringify location reference, empty type");return`${Z}:${_}`}function Bt(lt){var _,pt,Ht,_t,ge;const Z=(ge=(pt=(_=lt.metadata)==null?void 0:_.annotations)==null?void 0:pt[SOURCE_LOCATION_ANNOTATION])!=null?ge:(_t=(Ht=lt.metadata)==null?void 0:Ht.annotations)==null?void 0:_t[LOCATION_ANNOTATION];if(!Z)throw new Error(`Entity '${stringifyEntityRef(lt)}' is missing location`);return Et(Z)}var bt=t(9699);const Ee=bt.Ry({type:bt.Z_().required(),target:bt.Z_().required(),presence:bt.nK().oneOf(["required","optional"])}).noUnknown().required(),Xe=bt.Ry({id:bt.Z_().required(),type:bt.Z_().required(),target:bt.Z_().required(),presence:bt.nK().oneOf(["required","optional"])}).noUnknown().required(),on=bt.Ry({location:Ee}).noUnknown().required()},23235:function(X,o,t){"use strict";t.d(o,{C:function(){return e}});var r=t(98005);class e{constructor(){q(this,"subject",new r.J)}post(h){this.subject.next(h)}alert$(){return this.subject}}},47150:function(X,o,t){"use strict";t.d(o,{g:function(){return r}});class r{captureEvent(l){}}},58652:function(X,o,t){"use strict";t.d(o,{C:function(){return l}});var r=t(98005);const e="theme";class l{constructor(c){q(this,"activeThemeId");q(this,"subject",new r.X(void 0));this.themes=c}static createWithStorage(c){var d;const s=new l(c);if(!window.localStorage)return s;const u=(d=window.localStorage.getItem(e))!=null?d:void 0;return s.setActiveThemeId(u),s.activeThemeId$().subscribe(y=>{y?window.localStorage.setItem(e,y):window.localStorage.removeItem(e)}),window.addEventListener("storage",y=>{var m;if(y.key===e){const E=(m=localStorage.getItem(e))!=null?m:void 0;s.setActiveThemeId(E)}}),s}getInstalledThemes(){return this.themes.slice()}activeThemeId$(){return this.subject}getActiveThemeId(){return this.activeThemeId}setActiveThemeId(c){this.activeThemeId=c,this.subject.next(c)}}},14721:function(X,o,t){"use strict";t.d(o,{m:function(){return y}});var r=t(9850),e=t.n(r),l=t(12782),h=t.n(l);const c=/^[a-z][a-z0-9]*(?:[-_][a-z][a-z0-9]*)*$/i;function s(m){return typeof m=="object"&&m!==null&&!Array.isArray(m)}function u(m){if(m===null)return"null";if(Array.isArray(m))return"array";const E=typeof m;return E==="number"&&isNaN(m)?"nan":E==="string"&&m===""?"empty-string":E}const d={type(m,E,i,S){return`Invalid type in config for key '${m}' in '${E}', got ${i}, wanted ${S}`},missing(m){return`Missing required config value at '${m}'`},convert(m,E,i){return`Unable to convert config value for key '${m}' in '${E}' to a ${i}`}};class y{constructor(E,i="mock-config",S,B=""){q(this,"filteredKeys");q(this,"notifiedFilteredKeys",new Set);this.data=E,this.context=i,this.fallback=S,this.prefix=B}static fromConfigs(E){return E.length===0?new y(void 0):E.reduce((i,{data:S,context:B,filteredKeys:T})=>{const G=new y(S,B,i);return G.filteredKeys=T,G},void 0)}has(E){var S,B;return this.readValue(E)!==void 0?!0:(B=(S=this.fallback)==null?void 0:S.has(E))!=null?B:!1}keys(){var S,B;const E=this.data?Object.keys(this.data):[],i=(B=(S=this.fallback)==null?void 0:S.keys())!=null?B:[];return[...new Set([...E,...i])]}get(E){const i=this.getOptional(E);if(i===void 0)throw new Error(d.missing(this.fullKey(E!=null?E:"")));return i}getOptional(E){var B;const i=this.readValue(E),S=(B=this.fallback)==null?void 0:B.getOptional(E);return i===void 0?S:S===void 0?i:h()({},{value:e()(S)},{value:i},(T,G)=>!s(G)||!s(T)?G:void 0).value}getConfig(E){const i=this.getOptionalConfig(E);if(i===void 0)throw new Error(d.missing(this.fullKey(E)));return i}getOptionalConfig(E){var B;const i=this.readValue(E),S=(B=this.fallback)==null?void 0:B.getOptionalConfig(E);if(s(i))return this.copy(i,E,S);if(i!==void 0)throw new TypeError(d.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(d.missing(this.fullKey(E)));return i}getOptionalConfigArray(E){const i=this.readConfigValue(E,S=>{if(!Array.isArray(S))return{expected:"object-array"};for(const[B,T]of S.entries())if(!s(T))return{expected:"object-array",value:T,key:`${E}[${B}]`};return!0});if(!!i)return i.map((S,B)=>this.copy(S,`${E}[${B}]`))}getNumber(E){const i=this.getOptionalNumber(E);if(i===void 0)throw new Error(d.missing(this.fullKey(E)));return i}getOptionalNumber(E){const i=this.readConfigValue(E,B=>typeof B=="number"||typeof B=="string"||{expected:"number"});if(typeof i=="number"||i===void 0)return i;const S=Number(i);if(!Number.isFinite(S))throw new Error(d.convert(this.fullKey(E),this.context,"number"));return S}getBoolean(E){const i=this.getOptionalBoolean(E);if(i===void 0)throw new Error(d.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(d.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(d.missing(this.fullKey(E)));return i}getOptionalStringArray(E){return this.readConfigValue(E,i=>{if(!Array.isArray(i))return{expected:"string-array"};for(const[S,B]of i.entries())if(typeof B!="string"||B==="")return{expected:"string-array",value:B,key:`${E}[${S}]`};return!0})}fullKey(E){return`${this.prefix}${this.prefix?".":""}${E}`}copy(E,i,S){const B=new y(E,this.context,S,this.fullKey(i));return B.filteredKeys=this.filteredKeys,B}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 B=i(S);if(B!==!0){const{key:G=E,value:H=S,expected:D}=B;throw new TypeError(d.type(this.fullKey(G),this.context,u(H),D))}return S}readValue(E){const i=E?E.split("."):[];for(const B of i)if(!c.test(B))throw new TypeError(`Invalid config key '${E}'`);if(this.data===void 0)return;let S=this.data;for(const[B,T]of i.entries())if(s(S))S=S[T];else if(S!==void 0){const G=this.fullKey(i.slice(0,B).join("."));throw new TypeError(d.type(G,this.context,u(S),"object"))}return S}}},4333:function(X,o,t){"use strict";t.d(o,{p:function(){return e}});const r="Invalid discovery URL pattern,";class e{static compile(h){const c=h.split(/\{\{\s*pluginId\s*\}\}/),s=c.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 e(c)}constructor(h){this.parts=h}async getBaseUrl(h){return this.parts.join(h)}}},89536:function(X,o,t){"use strict";t.d(o,{KN:function(){return r},gr:function(){return l},Jv:function(){return h}});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 e=t(98005);class l{constructor(){q(this,"subject",new e.J)}post(s,u){this.subject.next({error:s,context:u})}error$(){return this.subject}}class h{static forward(s,u){window.addEventListener("unhandledrejection",d=>{s.post(d.reason,u)})}}},14884:function(X,o,t){"use strict";t.d(o,{b:function(){return l}});var r=t(36964);function e(h){if(h.length<3)throw new Error(`The '${h}' feature flag must have a minimum length of three characters.`);if(h.length>150)throw new Error(`The '${h}' feature flag must not exceed 150 characters.`);if(!h.match(/^[a-z]+[a-z0-9-]+$/))throw new Error(`The '${h}' feature flag must start with a lowercase letter and only contain lowercase letters, numbers and hyphens. Examples: feature-flag-one, alpha, release-2020`)}class l{constructor(){q(this,"registeredFeatureFlags",[]);q(this,"flags")}registerFlag(c){e(c.name),this.registeredFeatureFlags.push(c)}getRegisteredFlags(){return this.registeredFeatureFlags.slice()}isActive(c){return this.flags||(this.flags=this.load()),this.flags.get(c)===r.FeatureFlagState.Active}save(c){this.flags||(this.flags=this.load()),c.merge||this.flags.clear();for(const[u,d]of Object.entries(c.states))this.flags.set(u,d);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 c=window.localStorage.getItem("featureFlags");if(!c)return new Map;const s=JSON.parse(c);if(typeof s!="object"||s===null||Array.isArray(s))return new Map;const u=Object.entries(s).filter(([d,y])=>(e(d),y===r.FeatureFlagState.Active));return new Map(u)}catch{return new Map}}}},50160:function(X,o,t){"use strict";t.d(o,{I:function(){return c},j:function(){return r}});function r(s){var y;let u=s.baseImplementation||t.g.fetch;const d=[(y=s.middleware)!=null?y:[]].flat().reverse();for(const m of d)u=m.apply(u);return{fetch:u}}class e{static create(u){var E,i;const d=[];u.urlPrefixAllowlist?d.push(...u.urlPrefixAllowlist):u.config&&d.push(u.config.getString("backend.baseUrl"));const y=((E=u.header)==null?void 0:E.name)||"authorization",m=((i=u.header)==null?void 0:i.value)||(S=>`Bearer ${S}`);return new e(u.identityApi,d.map(S=>S.replace(/\/$/,"")),y,m)}constructor(u,d,y,m){this.identityApi=u,this.urlPrefixAllowlist=d,this.headerName=y,this.headerValue=m}apply(u){return async(d,y)=>{const m=new Request(d,y),{token:E}=await this.identityApi.getCredentials();return m.headers.get(this.headerName)||!this.urlPrefixAllowlist.some(i=>m.url===i||m.url.startsWith(`${i}/`))||typeof E!="string"||!E?u(d,y):(m.headers.set(this.headerName,this.headerValue(E)),u(m))}}}function l(s,u){return!u||u==="/"?s:`${s.replace(/\/$/,"")}/${u.replace(/^\//,"")}`}class h{constructor(u){this.discoveryApi=u}apply(u){return async(d,y)=>{const m=new Request(d,y),E="plugin://";if(!m.url.startsWith(E))return u(d,y);const{hostname:i,pathname:S,search:B,hash:T,username:G,password:H}=new URL(`http://${m.url.substring(E.length)}`);let D=await this.discoveryApi.getBaseUrl(i);if(G||H){const I=new URL(D),K=`${G}${H?`:${H}`:""}@`;D=`${I.protocol}//${K}${I.host}${I.pathname}`}const b=`${l(D,S)}${B}${T}`;return u(b,m)}}}class c{static resolvePluginProtocol(u){return new h(u.discoveryApi)}static injectIdentityAuth(u){return e.create(u)}constructor(){}}},11358:function(X,o,t){"use strict";t.d(o,{Y:function(){return c}});var r=t(98005);function e(s,u){for(const d of u)if(!s.has(d))return!1;return!0}function l(s,...u){const d=new Set(s);for(const y of u)for(const m of y)d.add(m);return d}class h{constructor(){q(this,"requests",[]);q(this,"subject",new r.X(this.getCurrentPending()))}request(u){return new Promise((d,y)=>{this.requests.push({scopes:u,resolve:d,reject:y}),this.subject.next(this.getCurrentPending())})}resolve(u,d){this.requests=this.requests.filter(y=>e(u,y.scopes)?(y.resolve(d),!1):!0),this.subject.next(this.getCurrentPending())}reject(u){this.requests.forEach(d=>d.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((d,y)=>l(d,y.scopes),this.requests[0].scopes);return{scopes:u,resolve:d=>{u&&this.resolve(u,d)},reject:d=>{u&&this.reject(d)}}}}class c{constructor(){q(this,"subject",new r.X([]));q(this,"currentRequests",[]);q(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 d=new h,y=this.handlerCount;return this.handlerCount++,d.pending().subscribe({next:m=>{const E=this.currentRequests.slice(),i=this.makeAuthRequest(m,u);i?E[y]=i:delete E[y],this.currentRequests=E,this.subject.next(E.filter(Boolean))}}),m=>d.request(m)}makeAuthRequest(u,d){const{scopes:y}=u;if(!!y)return{provider:d.provider,trigger:async()=>{const m=await d.onAuthRequest(y);u.resolve(m)},reject:()=>{const m=new Error("Login failed, rejected by user");m.name="RejectedError",u.reject(m)}}}authRequest$(){return this.subject}}},56054:function(X,o,t){"use strict";t.d(o,{C:function(){return h}});var r=t(82394),e=t.n(r);const l=new Map;class h{constructor(s,u){q(this,"subscribers",new Set);q(this,"observable",new(e())(s=>(this.subscribers.add(s),()=>{this.subscribers.delete(s)})));this.namespace=s,this.errorApi=u}static create(s){var u;return new h((u=s.namespace)!=null?u:"",s.errorApi)}get(s){return this.snapshot(s).value}snapshot(s){let u,d="absent";try{const y=localStorage.getItem(this.getKeyName(s));y&&(u=JSON.parse(y,(m,E)=>(typeof E=="object"&&E!==null&&Object.freeze(E),E)),d="present")}catch{this.errorApi.post(new Error(`Error when parsing JSON config from storage for: ${s}`))}return{key:s,value:u,newValue:u,presence:d}}forBucket(s){const u=`${this.namespace}/${s}`;return l.has(u)||l.set(u,new h(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 d of this.subscribers)d.next(u)}}},59589:function(X,o,t){"use strict";t.d(o,{u:function(){return l}});var r=t(91205);const e={id:"atlassian",title:"Atlassian",icon:()=>null};class l{static create(c){const{discoveryApi:s,environment:u="development",provider:d=e,oauthRequestApi:y}=c;return r.L.create({discoveryApi:s,oauthRequestApi:y,provider:d,environment:u})}}},92293:function(X,o,t){"use strict";t.d(o,{Z:function(){return l}});var r=t(91205);const e={id:"auth0",title:"Auth0",icon:()=>null};class l{static create(c){const{discoveryApi:s,environment:u="development",provider:d=e,oauthRequestApi:y,defaultScopes:m=["openid","email","profile"]}=c;return r.L.create({discoveryApi:s,oauthRequestApi:y,provider:d,environment:u,defaultScopes:m})}}},6098:function(X,o,t){"use strict";t.d(o,{Z:function(){return l}});var r=t(91205);const e={id:"bitbucket",title:"Bitbucket",icon:()=>null};class l{static create(c){const{discoveryApi:s,environment:u="development",provider:d=e,oauthRequestApi:y,defaultScopes:m=["team"]}=c;return r.L.create({discoveryApi:s,oauthRequestApi:y,provider:d,environment:u,defaultScopes:m})}}},44431:function(X,o,t){"use strict";t.d(o,{x:function(){return l.Z}});var r=t(19347),e=t.n(r);t.o(r,"AlertApiForwarder")&&t.d(o,{AlertApiForwarder:function(){return r.AlertApiForwarder}}),t.o(r,"AppThemeSelector")&&t.d(o,{AppThemeSelector:function(){return r.AppThemeSelector}}),t.o(r,"AtlassianAuth")&&t.d(o,{AtlassianAuth:function(){return r.AtlassianAuth}}),t.o(r,"ConfigReader")&&t.d(o,{ConfigReader:function(){return r.ConfigReader}}),t.o(r,"ErrorAlerter")&&t.d(o,{ErrorAlerter:function(){return r.ErrorAlerter}}),t.o(r,"ErrorApiForwarder")&&t.d(o,{ErrorApiForwarder:function(){return r.ErrorApiForwarder}}),t.o(r,"FetchMiddlewares")&&t.d(o,{FetchMiddlewares:function(){return r.FetchMiddlewares}}),t.o(r,"FlatRoutes")&&t.d(o,{FlatRoutes:function(){return r.FlatRoutes}}),t.o(r,"LocalStorageFeatureFlags")&&t.d(o,{LocalStorageFeatureFlags:function(){return r.LocalStorageFeatureFlags}}),t.o(r,"NoOpAnalyticsApi")&&t.d(o,{NoOpAnalyticsApi:function(){return r.NoOpAnalyticsApi}}),t.o(r,"OAuthRequestManager")&&t.d(o,{OAuthRequestManager:function(){return r.OAuthRequestManager}}),t.o(r,"UnhandledErrorForwarder")&&t.d(o,{UnhandledErrorForwarder:function(){return r.UnhandledErrorForwarder}}),t.o(r,"UrlPatternDiscovery")&&t.d(o,{UrlPatternDiscovery:function(){return r.UrlPatternDiscovery}}),t.o(r,"WebStorage")&&t.d(o,{WebStorage:function(){return r.WebStorage}}),t.o(r,"createFetchApi")&&t.d(o,{createFetchApi:function(){return r.createFetchApi}}),t.o(r,"createSpecializedApp")&&t.d(o,{createSpecializedApp:function(){return r.createSpecializedApp}});var l=t(6098)},19347:function(){},55551:function(X,o,t){"use strict";t.d(o,{T:function(){return d}});var r=t(96176),e=t(54842),l=t(91405);class h{constructor(m){q(this,"stateTracker",new l.l);q(this,"sessionCanRefresh");q(this,"staticSessionManager");q(this,"refreshingSessionManager");this.sessionCanRefresh=m.sessionCanRefresh,this.staticSessionManager=m.staticSessionManager,this.refreshingSessionManager=m.refreshingSessionManager}async getSession(m){const E=await this.staticSessionManager.getSession({...m,optional:!0});if(E)return this.stateTracker.setIsSignedIn(!0),E;const i=await this.refreshingSessionManager.getSession(m);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 c=t(30195);const s=c.z.object({providerInfo:c.z.object({accessToken:c.z.string(),scopes:c.z.set(c.z.string()),expiresAt:c.z.date().optional()}),profile:c.z.object({email:c.z.string().optional(),displayName:c.z.string().optional(),picture:c.z.string().optional()}),backstageIdentity:c.z.object({id:c.z.string(),token:c.z.string(),identity:c.z.object({type:c.z.literal("user"),userEntityRef:c.z.string(),ownershipEntityRefs:c.z.array(c.z.string())})})}),u={id:"github",title:"GitHub",icon:()=>null};class d{static create(m){const{discoveryApi:E,environment:i="development",provider:S=u,oauthRequestApi:B,defaultScopes:T=["read:user"]}=m,G=new r.y({discoveryApi:E,environment:i,provider:S,oauthRequestApi:B,sessionTransform(I){return{...I,providerInfo:{accessToken:I.providerInfo.accessToken,scopes:d.normalizeScope(I.providerInfo.scope),expiresAt:I.providerInfo.expiresInSeconds?new Date(Date.now()+I.providerInfo.expiresInSeconds*1e3):void 0}}}}),H=new e.q2({connector:G,defaultScopes:new Set(T),sessionScopes:I=>I.providerInfo.scopes,sessionShouldRefresh:I=>{const{expiresAt:K}=I.providerInfo;return K?(K.getTime()-Date.now())/1e3<60*5:!1}}),D=new e.Hc({manager:new e.k1({connector:G,defaultScopes:new Set(T),sessionScopes:I=>I.providerInfo.scopes}),storageKey:`${S.id}Session`,schema:s,sessionScopes:I=>I.providerInfo.scopes}),b=new h({refreshingSessionManager:H,staticSessionManager:D,sessionCanRefresh:I=>I.providerInfo.expiresAt!==void 0});return new d(b)}constructor(m){this.sessionManager=m}async signIn(){await this.getAccessToken()}async signOut(){await this.sessionManager.removeSession()}sessionState$(){return this.sessionManager.sessionState$()}async getAccessToken(m,E){var S;const i=await this.sessionManager.getSession({...E,scopes:d.normalizeScope(m)});return(S=i==null?void 0:i.providerInfo.accessToken)!=null?S:""}async getBackstageIdentity(m={}){const E=await this.sessionManager.getSession(m);return E==null?void 0:E.backstageIdentity}async getProfile(m={}){const E=await this.sessionManager.getSession(m);return E==null?void 0:E.profile}static normalizeScope(m){if(!m)return new Set;const E=Array.isArray(m)?m:m.split(/[\s|,]/).filter(Boolean);return new Set(E)}}},2922:function(X,o,t){"use strict";t.d(o,{a:function(){return l}});var r=t(91205);const e={id:"gitlab",title:"GitLab",icon:()=>null};class l{static create(c){const{discoveryApi:s,environment:u="development",provider:d=e,oauthRequestApi:y,defaultScopes:m=["read_user"]}=c;return r.L.create({discoveryApi:s,oauthRequestApi:y,provider:d,environment:u,defaultScopes:m})}}},59938:function(X,o,t){"use strict";t.d(o,{e:function(){return h}});var r=t(91205);const e={id:"google",title:"Google",icon:()=>null},l="https://www.googleapis.com/auth/";class h{static create(s){const{discoveryApi:u,oauthRequestApi:d,environment:y="development",provider:m=e,defaultScopes:E=["openid",`${l}userinfo.email`,`${l}userinfo.profile`]}=s;return r.L.create({discoveryApi:u,oauthRequestApi:d,provider:m,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(X,o,t){"use strict";t.d(o,{Td:function(){return r.T},aq:function(){return e.a},eE:function(){return l.e},OAuth2:function(){return h.L},OktaAuth:function(){return c.s},SamlAuth:function(){return s.n},Auth0Auth:function(){return u.Z},MicrosoftAuth:function(){return d._},OneLoginAuth:function(){return y.$},BitbucketAuth:function(){return m.x},AtlassianAuth:function(){return E.u}});var r=t(55551),e=t(2922),l=t(59938),h=t(91205);t.o(h,"AlertApiForwarder")&&t.d(o,{AlertApiForwarder:function(){return h.AlertApiForwarder}}),t.o(h,"AppThemeSelector")&&t.d(o,{AppThemeSelector:function(){return h.AppThemeSelector}}),t.o(h,"AtlassianAuth")&&t.d(o,{AtlassianAuth:function(){return h.AtlassianAuth}}),t.o(h,"Auth0Auth")&&t.d(o,{Auth0Auth:function(){return h.Auth0Auth}}),t.o(h,"BitbucketAuth")&&t.d(o,{BitbucketAuth:function(){return h.BitbucketAuth}}),t.o(h,"ConfigReader")&&t.d(o,{ConfigReader:function(){return h.ConfigReader}}),t.o(h,"ErrorAlerter")&&t.d(o,{ErrorAlerter:function(){return h.ErrorAlerter}}),t.o(h,"ErrorApiForwarder")&&t.d(o,{ErrorApiForwarder:function(){return h.ErrorApiForwarder}}),t.o(h,"FetchMiddlewares")&&t.d(o,{FetchMiddlewares:function(){return h.FetchMiddlewares}}),t.o(h,"FlatRoutes")&&t.d(o,{FlatRoutes:function(){return h.FlatRoutes}}),t.o(h,"LocalStorageFeatureFlags")&&t.d(o,{LocalStorageFeatureFlags:function(){return h.LocalStorageFeatureFlags}}),t.o(h,"MicrosoftAuth")&&t.d(o,{MicrosoftAuth:function(){return h.MicrosoftAuth}}),t.o(h,"NoOpAnalyticsApi")&&t.d(o,{NoOpAnalyticsApi:function(){return h.NoOpAnalyticsApi}}),t.o(h,"OAuthRequestManager")&&t.d(o,{OAuthRequestManager:function(){return h.OAuthRequestManager}}),t.o(h,"OktaAuth")&&t.d(o,{OktaAuth:function(){return h.OktaAuth}}),t.o(h,"OneLoginAuth")&&t.d(o,{OneLoginAuth:function(){return h.OneLoginAuth}}),t.o(h,"SamlAuth")&&t.d(o,{SamlAuth:function(){return h.SamlAuth}}),t.o(h,"UnhandledErrorForwarder")&&t.d(o,{UnhandledErrorForwarder:function(){return h.UnhandledErrorForwarder}}),t.o(h,"UrlPatternDiscovery")&&t.d(o,{UrlPatternDiscovery:function(){return h.UrlPatternDiscovery}}),t.o(h,"WebStorage")&&t.d(o,{WebStorage:function(){return h.WebStorage}}),t.o(h,"createFetchApi")&&t.d(o,{createFetchApi:function(){return h.createFetchApi}}),t.o(h,"createSpecializedApp")&&t.d(o,{createSpecializedApp:function(){return h.createSpecializedApp}});var c=t(26079),s=t(67578),u=t(92293),d=t(38482),y=t(58381),m=t(44431);t.o(m,"AlertApiForwarder")&&t.d(o,{AlertApiForwarder:function(){return m.AlertApiForwarder}}),t.o(m,"AppThemeSelector")&&t.d(o,{AppThemeSelector:function(){return m.AppThemeSelector}}),t.o(m,"AtlassianAuth")&&t.d(o,{AtlassianAuth:function(){return m.AtlassianAuth}}),t.o(m,"ConfigReader")&&t.d(o,{ConfigReader:function(){return m.ConfigReader}}),t.o(m,"ErrorAlerter")&&t.d(o,{ErrorAlerter:function(){return m.ErrorAlerter}}),t.o(m,"ErrorApiForwarder")&&t.d(o,{ErrorApiForwarder:function(){return m.ErrorApiForwarder}}),t.o(m,"FetchMiddlewares")&&t.d(o,{FetchMiddlewares:function(){return m.FetchMiddlewares}}),t.o(m,"FlatRoutes")&&t.d(o,{FlatRoutes:function(){return m.FlatRoutes}}),t.o(m,"LocalStorageFeatureFlags")&&t.d(o,{LocalStorageFeatureFlags:function(){return m.LocalStorageFeatureFlags}}),t.o(m,"NoOpAnalyticsApi")&&t.d(o,{NoOpAnalyticsApi:function(){return m.NoOpAnalyticsApi}}),t.o(m,"OAuthRequestManager")&&t.d(o,{OAuthRequestManager:function(){return m.OAuthRequestManager}}),t.o(m,"UnhandledErrorForwarder")&&t.d(o,{UnhandledErrorForwarder:function(){return m.UnhandledErrorForwarder}}),t.o(m,"UrlPatternDiscovery")&&t.d(o,{UrlPatternDiscovery:function(){return m.UrlPatternDiscovery}}),t.o(m,"WebStorage")&&t.d(o,{WebStorage:function(){return m.WebStorage}}),t.o(m,"createFetchApi")&&t.d(o,{createFetchApi:function(){return m.createFetchApi}}),t.o(m,"createSpecializedApp")&&t.d(o,{createSpecializedApp:function(){return m.createSpecializedApp}});var E=t(59589)},38482:function(X,o,t){"use strict";t.d(o,{_:function(){return l}});var r=t(91205);const e={id:"microsoft",title:"Microsoft",icon:()=>null};class l{static create(c){const{environment:s="development",provider:u=e,oauthRequestApi:d,discoveryApi:y,defaultScopes:m=["openid","offline_access","profile","email","User.Read"]}=c;return r.L.create({discoveryApi:y,oauthRequestApi:d,provider:u,environment:s,defaultScopes:m})}}},95792:function(X,o,t){"use strict";t.d(o,{Z:function(){return h}});var r=t(96176),e=t(54842);const l={id:"oauth2",title:"Your Identity Provider",icon:()=>null};class h{constructor(s){q(this,"sessionManager");q(this,"scopeTransform");this.sessionManager=s.sessionManager,this.scopeTransform=s.scopeTransform}static create(s){const{discoveryApi:u,environment:d="development",provider:y=l,oauthRequestApi:m,defaultScopes:E=[],scopeTransform:i=T=>T}=s,S=new r.y({discoveryApi:u,environment:d,provider:y,oauthRequestApi:m,sessionTransform(T){return{...T,providerInfo:{idToken:T.providerInfo.idToken,accessToken:T.providerInfo.accessToken,scopes:h.normalizeScopes(i,T.providerInfo.scope),expiresAt:new Date(Date.now()+T.providerInfo.expiresInSeconds*1e3)}}}}),B=new e.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 h({sessionManager:B,scopeTransform:i})}async signIn(){await this.getAccessToken()}async signOut(){await this.sessionManager.removeSession()}sessionState$(){return this.sessionManager.sessionState$()}async getAccessToken(s,u){var m;const d=h.normalizeScopes(this.scopeTransform,s),y=await this.sessionManager.getSession({...u,scopes:d});return(m=y==null?void 0:y.providerInfo.accessToken)!=null?m:""}async getIdToken(s={}){var d;const u=await this.sessionManager.getSession(s);return(d=u==null?void 0:u.providerInfo.idToken)!=null?d:""}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 d=Array.isArray(u)?u:u.split(/[\s|,]/).filter(Boolean);return new Set(s(d))}}},91205:function(X,o,t){"use strict";t.d(o,{L:function(){return r.Z}});var r=t(95792),e=t(5973),l=t.n(e);t.o(e,"AlertApiForwarder")&&t.d(o,{AlertApiForwarder:function(){return e.AlertApiForwarder}}),t.o(e,"AppThemeSelector")&&t.d(o,{AppThemeSelector:function(){return e.AppThemeSelector}}),t.o(e,"AtlassianAuth")&&t.d(o,{AtlassianAuth:function(){return e.AtlassianAuth}}),t.o(e,"Auth0Auth")&&t.d(o,{Auth0Auth:function(){return e.Auth0Auth}}),t.o(e,"BitbucketAuth")&&t.d(o,{BitbucketAuth:function(){return e.BitbucketAuth}}),t.o(e,"ConfigReader")&&t.d(o,{ConfigReader:function(){return e.ConfigReader}}),t.o(e,"ErrorAlerter")&&t.d(o,{ErrorAlerter:function(){return e.ErrorAlerter}}),t.o(e,"ErrorApiForwarder")&&t.d(o,{ErrorApiForwarder:function(){return e.ErrorApiForwarder}}),t.o(e,"FetchMiddlewares")&&t.d(o,{FetchMiddlewares:function(){return e.FetchMiddlewares}}),t.o(e,"FlatRoutes")&&t.d(o,{FlatRoutes:function(){return e.FlatRoutes}}),t.o(e,"LocalStorageFeatureFlags")&&t.d(o,{LocalStorageFeatureFlags:function(){return e.LocalStorageFeatureFlags}}),t.o(e,"MicrosoftAuth")&&t.d(o,{MicrosoftAuth:function(){return e.MicrosoftAuth}}),t.o(e,"NoOpAnalyticsApi")&&t.d(o,{NoOpAnalyticsApi:function(){return e.NoOpAnalyticsApi}}),t.o(e,"OAuthRequestManager")&&t.d(o,{OAuthRequestManager:function(){return e.OAuthRequestManager}}),t.o(e,"OktaAuth")&&t.d(o,{OktaAuth:function(){return e.OktaAuth}}),t.o(e,"OneLoginAuth")&&t.d(o,{OneLoginAuth:function(){return e.OneLoginAuth}}),t.o(e,"SamlAuth")&&t.d(o,{SamlAuth:function(){return e.SamlAuth}}),t.o(e,"UnhandledErrorForwarder")&&t.d(o,{UnhandledErrorForwarder:function(){return e.UnhandledErrorForwarder}}),t.o(e,"UrlPatternDiscovery")&&t.d(o,{UrlPatternDiscovery:function(){return e.UrlPatternDiscovery}}),t.o(e,"WebStorage")&&t.d(o,{WebStorage:function(){return e.WebStorage}}),t.o(e,"createFetchApi")&&t.d(o,{createFetchApi:function(){return e.createFetchApi}}),t.o(e,"createSpecializedApp")&&t.d(o,{createSpecializedApp:function(){return e.createSpecializedApp}})},5973:function(){},26079:function(X,o,t){"use strict";t.d(o,{s:function(){return c}});var r=t(91205);const e={id:"okta",title:"Okta",icon:()=>null},l=new Set(["openid","profile","email","phone","address","groups","offline_access"]),h="okta.";class c{static create(u){const{discoveryApi:d,environment:y="development",provider:m=e,oauthRequestApi:E,defaultScopes:i=["openid","email","profile","offline_access"]}=u;return r.L.create({discoveryApi:d,oauthRequestApi:E,provider:m,environment:y,defaultScopes:i,scopeTransform(S){return S.map(B=>l.has(B)||B.startsWith(h)?B:`${h}${B}`)}})}}},58381:function(X,o,t){"use strict";t.d(o,{$:function(){return c}});var r=t(91205);const e={id:"onelogin",title:"onelogin",icon:()=>null},l=new Set(["openid","profile","email","phone","address","groups","offline_access"]),h="onelogin.";class c{static create(u){const{discoveryApi:d,environment:y="development",provider:m=e,oauthRequestApi:E}=u;return r.L.create({discoveryApi:d,oauthRequestApi:E,provider:m,environment:y,defaultScopes:["openid","email","profile","offline_access"],scopeTransform(i){return i.map(S=>l.has(S)||S.startsWith(h)?S:`${h}${S}`)}})}}},67578:function(X,o,t){"use strict";t.d(o,{n:function(){return u}});var r=t(17678);class e{constructor(y){q(this,"discoveryApi");q(this,"environment");q(this,"provider");const{discoveryApi:m,environment:E,provider:i}=y;this.discoveryApi=m,this.environment=E,this.provider=i}async createSession(){const y=await this.buildUrl("/start"),m=await(0,r.d)({url:y,name:`${this.provider.title} Login`,origin:new URL(y).origin,width:450,height:730});return{...m,id:m.profile.email}}async refreshSession(){}async removeSession(){const y=await fetch(await this.buildUrl("/logout"),{method:"POST",headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(m=>{throw new Error(`Logout request failed, ${m}`)});if(!y.ok){const m=new Error(`Logout request failed, ${y.statusText}`);throw m.status=y.status,m}}async buildUrl(y){return`${await this.discoveryApi.getBaseUrl("auth")}/${this.provider.id}${y}?env=${this.environment}`}}var l=t(54842),h=t(30195);const c=h.z.object({userId:h.z.string(),profile:h.z.object({email:h.z.string().optional(),displayName:h.z.string().optional(),picture:h.z.string().optional()}),backstageIdentity:h.z.object({id:h.z.string(),token:h.z.string(),identity:h.z.object({type:h.z.literal("user"),userEntityRef:h.z.string(),ownershipEntityRefs:h.z.array(h.z.string())})})}),s={id:"saml",title:"SAML",icon:()=>null};class u{static create(y){const{discoveryApi:m,environment:E="development",provider:i=s}=y,S=new e({discoveryApi:m,environment:E,provider:i}),B=new l.k1({connector:S}),T=new l.Hc({manager:B,storageKey:`${i.id}Session`,schema:c});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 m=await this.sessionManager.getSession(y);return m==null?void 0:m.backstageIdentity}async getProfile(y={}){const m=await this.sessionManager.getSession(y);return m==null?void 0:m.profile}}},91631:function(X,o,t){"use strict";t.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 e.C},NoOpAnalyticsApi:function(){return l.g},AppThemeSelector:function(){return h.C},ConfigReader:function(){return c.m},UrlPatternDiscovery:function(){return s.p},ErrorAlerter:function(){return u.KN},ErrorApiForwarder:function(){return u.gr},UnhandledErrorForwarder:function(){return u.Jv},LocalStorageFeatureFlags:function(){return d.b},FetchMiddlewares:function(){return y.I},createFetchApi:function(){return y.j},OAuthRequestManager:function(){return m.Y},WebStorage:function(){return E.C}});var r=t(91668);t.o(r,"AlertApiForwarder")&&t.d(o,{AlertApiForwarder:function(){return r.AlertApiForwarder}}),t.o(r,"AppThemeSelector")&&t.d(o,{AppThemeSelector:function(){return r.AppThemeSelector}}),t.o(r,"BitbucketAuth")&&t.d(o,{BitbucketAuth:function(){return r.BitbucketAuth}}),t.o(r,"ConfigReader")&&t.d(o,{ConfigReader:function(){return r.ConfigReader}}),t.o(r,"ErrorAlerter")&&t.d(o,{ErrorAlerter:function(){return r.ErrorAlerter}}),t.o(r,"ErrorApiForwarder")&&t.d(o,{ErrorApiForwarder:function(){return r.ErrorApiForwarder}}),t.o(r,"FetchMiddlewares")&&t.d(o,{FetchMiddlewares:function(){return r.FetchMiddlewares}}),t.o(r,"FlatRoutes")&&t.d(o,{FlatRoutes:function(){return r.FlatRoutes}}),t.o(r,"LocalStorageFeatureFlags")&&t.d(o,{LocalStorageFeatureFlags:function(){return r.LocalStorageFeatureFlags}}),t.o(r,"NoOpAnalyticsApi")&&t.d(o,{NoOpAnalyticsApi:function(){return r.NoOpAnalyticsApi}}),t.o(r,"OAuth2")&&t.d(o,{OAuth2:function(){return r.OAuth2}}),t.o(r,"OAuthRequestManager")&&t.d(o,{OAuthRequestManager:function(){return r.OAuthRequestManager}}),t.o(r,"UnhandledErrorForwarder")&&t.d(o,{UnhandledErrorForwarder:function(){return r.UnhandledErrorForwarder}}),t.o(r,"UrlPatternDiscovery")&&t.d(o,{UrlPatternDiscovery:function(){return r.UrlPatternDiscovery}}),t.o(r,"WebStorage")&&t.d(o,{WebStorage:function(){return r.WebStorage}}),t.o(r,"createFetchApi")&&t.d(o,{createFetchApi:function(){return r.createFetchApi}}),t.o(r,"createSpecializedApp")&&t.d(o,{createSpecializedApp:function(){return r.createSpecializedApp}});var e=t(23235),l=t(47150),h=t(58652),c=t(14721),s=t(4333),u=t(89536),d=t(14884),y=t(50160),m=t(11358),E=t(56054)},56494:function(X,o,t){"use strict";t.d(o,{ApiProvider:function(){return r.gs},ApiRegistry:function(){return r.GW},AlertApiForwarder:function(){return e.AlertApiForwarder},AppThemeSelector:function(){return e.AppThemeSelector},ConfigReader:function(){return e.ConfigReader},ErrorAlerter:function(){return e.ErrorAlerter},ErrorApiForwarder:function(){return e.ErrorApiForwarder},FetchMiddlewares:function(){return e.FetchMiddlewares},LocalStorageFeatureFlags:function(){return e.LocalStorageFeatureFlags},NoOpAnalyticsApi:function(){return e.NoOpAnalyticsApi},OAuthRequestManager:function(){return e.OAuthRequestManager},UnhandledErrorForwarder:function(){return e.UnhandledErrorForwarder},UrlPatternDiscovery:function(){return e.UrlPatternDiscovery},WebStorage:function(){return e.WebStorage},createFetchApi:function(){return e.createFetchApi}});var r=t(76105);t.o(r,"AlertApiForwarder")&&t.d(o,{AlertApiForwarder:function(){return r.AlertApiForwarder}}),t.o(r,"AppThemeSelector")&&t.d(o,{AppThemeSelector:function(){return r.AppThemeSelector}}),t.o(r,"AtlassianAuth")&&t.d(o,{AtlassianAuth:function(){return r.AtlassianAuth}}),t.o(r,"Auth0Auth")&&t.d(o,{Auth0Auth:function(){return r.Auth0Auth}}),t.o(r,"BitbucketAuth")&&t.d(o,{BitbucketAuth:function(){return r.BitbucketAuth}}),t.o(r,"ConfigReader")&&t.d(o,{ConfigReader:function(){return r.ConfigReader}}),t.o(r,"ErrorAlerter")&&t.d(o,{ErrorAlerter:function(){return r.ErrorAlerter}}),t.o(r,"ErrorApiForwarder")&&t.d(o,{ErrorApiForwarder:function(){return r.ErrorApiForwarder}}),t.o(r,"FetchMiddlewares")&&t.d(o,{FetchMiddlewares:function(){return r.FetchMiddlewares}}),t.o(r,"FlatRoutes")&&t.d(o,{FlatRoutes:function(){return r.FlatRoutes}}),t.o(r,"GithubAuth")&&t.d(o,{GithubAuth:function(){return r.GithubAuth}}),t.o(r,"GitlabAuth")&&t.d(o,{GitlabAuth:function(){return r.GitlabAuth}}),t.o(r,"GoogleAuth")&&t.d(o,{GoogleAuth:function(){return r.GoogleAuth}}),t.o(r,"LocalStorageFeatureFlags")&&t.d(o,{LocalStorageFeatureFlags:function(){return r.LocalStorageFeatureFlags}}),t.o(r,"MicrosoftAuth")&&t.d(o,{MicrosoftAuth:function(){return r.MicrosoftAuth}}),t.o(r,"NoOpAnalyticsApi")&&t.d(o,{NoOpAnalyticsApi:function(){return r.NoOpAnalyticsApi}}),t.o(r,"OAuth2")&&t.d(o,{OAuth2:function(){return r.OAuth2}}),t.o(r,"OAuthRequestManager")&&t.d(o,{OAuthRequestManager:function(){return r.OAuthRequestManager}}),t.o(r,"OktaAuth")&&t.d(o,{OktaAuth:function(){return r.OktaAuth}}),t.o(r,"OneLoginAuth")&&t.d(o,{OneLoginAuth:function(){return r.OneLoginAuth}}),t.o(r,"SamlAuth")&&t.d(o,{SamlAuth:function(){return r.SamlAuth}}),t.o(r,"UnhandledErrorForwarder")&&t.d(o,{UnhandledErrorForwarder:function(){return r.UnhandledErrorForwarder}}),t.o(r,"UrlPatternDiscovery")&&t.d(o,{UrlPatternDiscovery:function(){return r.UrlPatternDiscovery}}),t.o(r,"WebStorage")&&t.d(o,{WebStorage:function(){return r.WebStorage}}),t.o(r,"createFetchApi")&&t.d(o,{createFetchApi:function(){return r.createFetchApi}}),t.o(r,"createSpecializedApp")&&t.d(o,{createSpecializedApp:function(){return r.createSpecializedApp}});var e=t(91631);t.o(e,"AtlassianAuth")&&t.d(o,{AtlassianAuth:function(){return e.AtlassianAuth}}),t.o(e,"Auth0Auth")&&t.d(o,{Auth0Auth:function(){return e.Auth0Auth}}),t.o(e,"BitbucketAuth")&&t.d(o,{BitbucketAuth:function(){return e.BitbucketAuth}}),t.o(e,"FlatRoutes")&&t.d(o,{FlatRoutes:function(){return e.FlatRoutes}}),t.o(e,"GithubAuth")&&t.d(o,{GithubAuth:function(){return e.GithubAuth}}),t.o(e,"GitlabAuth")&&t.d(o,{GitlabAuth:function(){return e.GitlabAuth}}),t.o(e,"GoogleAuth")&&t.d(o,{GoogleAuth:function(){return e.GoogleAuth}}),t.o(e,"MicrosoftAuth")&&t.d(o,{MicrosoftAuth:function(){return e.MicrosoftAuth}}),t.o(e,"OAuth2")&&t.d(o,{OAuth2:function(){return e.OAuth2}}),t.o(e,"OktaAuth")&&t.d(o,{OktaAuth:function(){return e.OktaAuth}}),t.o(e,"OneLoginAuth")&&t.d(o,{OneLoginAuth:function(){return e.OneLoginAuth}}),t.o(e,"SamlAuth")&&t.d(o,{SamlAuth:function(){return e.SamlAuth}}),t.o(e,"createSpecializedApp")&&t.d(o,{createSpecializedApp:function(){return e.createSpecializedApp}})},80396:function(X,o,t){"use strict";t.d(o,{p:function(){return e}});var r;(function(l){l[l.default=10]="default";const h=50;l[l.app=h]="app",l[l.static=100]="static"})(r||(r={}));class e{constructor(){q(this,"factories",new Map)}register(h,c){const s=r[h],u=this.factories.get(c.api.id);return u&&u.priority>=s?!1:(this.factories.set(c.api.id,{priority:s,factory:c}),!0)}get(h){const c=this.factories.get(h.id);if(!!c)return c.factory}getAllApis(){const h=new Set;for(const{factory:c}of this.factories.values())h.add(c.api);return h}}},14406:function(X,o,t){"use strict";t.d(o,{g:function(){return u}});var r=t(2784),e=t(13980),l=t.n(e);class h{constructor(...y){q(this,"holders");this.holders=y}get(y){for(const m of this.holders){const E=m.get(y);if(E)return E}}}var c=t(76241);const s=(0,c.CT)("api-context"),u=d=>{var S;const{apis:y,children:m}=d,E=(S=(0,r.useContext)(s))==null?void 0:S.atVersion(1),i=E?new h(y,E):y;return r.createElement(s.Provider,{value:(0,c.EI)({1:i}),children:m})};u.propTypes={apis:l().shape({get:l().func.isRequired}).isRequired,children:l().node}},31964:function(X,o,t){"use strict";t.d(o,{G:function(){return e}});class r{constructor(){q(this,"apis",[])}add(h,c){return this.apis.push([h.id,c]),c}build(){return new e(new Map(this.apis))}}class e{static builder(){return new r}static from(h){return new e(new Map(h.map(([c,s])=>[c.id,s])))}static with(h,c){return new e(new Map([[h.id,c]]))}constructor(h){this.apis=h}with(h,c){return new e(new Map([...this.apis,[h.id,c]]))}get(h){return this.apis.get(h.id)}}},12132:function(X,o,t){"use strict";t.d(o,{M:function(){return r}});class r{constructor(l){q(this,"apis",new Map);this.factories=l}static validateFactories(l,h){for(const c of h){const s=[c],u=new Set;for(;s.length;){const d=s.shift(),y=l.get(d);if(!!y)for(const m of Object.values(y.deps)){if(m.id===c.id)throw new Error(`Circular dependency of api factory for ${c}`);u.has(m)||(u.add(m),s.push(m))}}}}get(l){return this.load(l)}load(l,h=[]){const c=this.apis.get(l.id);if(c)return c;const s=this.factories.get(l);if(!s)return;if(h.includes(s.api))throw new Error(`Circular dependency of api factory for ${s.api}`);const u=this.loadDeps(l,s.deps,[...h,s.api]),d=s.factory(u);return this.apis.set(l.id,d),d}loadDeps(l,h,c){const s={};for(const u in h)if(h.hasOwnProperty(u)){const d=h[u],y=this.load(d,c);if(!y)throw new Error(`No API factory available for dependency ${d} of dependent ${l}`);s[u]=y}return s}}},76105:function(X,o,t){"use strict";t.d(o,{gs:function(){return r.g},GW:function(){return e.G},MM:function(){return l.M},pv:function(){return h.p}});var r=t(14406),e=t(31964),l=t(12132),h=t(80396),c=t(82488),s=t.n(c);t.o(c,"AlertApiForwarder")&&t.d(o,{AlertApiForwarder:function(){return c.AlertApiForwarder}}),t.o(c,"AppThemeSelector")&&t.d(o,{AppThemeSelector:function(){return c.AppThemeSelector}}),t.o(c,"AtlassianAuth")&&t.d(o,{AtlassianAuth:function(){return c.AtlassianAuth}}),t.o(c,"Auth0Auth")&&t.d(o,{Auth0Auth:function(){return c.Auth0Auth}}),t.o(c,"BitbucketAuth")&&t.d(o,{BitbucketAuth:function(){return c.BitbucketAuth}}),t.o(c,"ConfigReader")&&t.d(o,{ConfigReader:function(){return c.ConfigReader}}),t.o(c,"ErrorAlerter")&&t.d(o,{ErrorAlerter:function(){return c.ErrorAlerter}}),t.o(c,"ErrorApiForwarder")&&t.d(o,{ErrorApiForwarder:function(){return c.ErrorApiForwarder}}),t.o(c,"FetchMiddlewares")&&t.d(o,{FetchMiddlewares:function(){return c.FetchMiddlewares}}),t.o(c,"FlatRoutes")&&t.d(o,{FlatRoutes:function(){return c.FlatRoutes}}),t.o(c,"GithubAuth")&&t.d(o,{GithubAuth:function(){return c.GithubAuth}}),t.o(c,"GitlabAuth")&&t.d(o,{GitlabAuth:function(){return c.GitlabAuth}}),t.o(c,"GoogleAuth")&&t.d(o,{GoogleAuth:function(){return c.GoogleAuth}}),t.o(c,"LocalStorageFeatureFlags")&&t.d(o,{LocalStorageFeatureFlags:function(){return c.LocalStorageFeatureFlags}}),t.o(c,"MicrosoftAuth")&&t.d(o,{MicrosoftAuth:function(){return c.MicrosoftAuth}}),t.o(c,"NoOpAnalyticsApi")&&t.d(o,{NoOpAnalyticsApi:function(){return c.NoOpAnalyticsApi}}),t.o(c,"OAuth2")&&t.d(o,{OAuth2:function(){return c.OAuth2}}),t.o(c,"OAuthRequestManager")&&t.d(o,{OAuthRequestManager:function(){return c.OAuthRequestManager}}),t.o(c,"OktaAuth")&&t.d(o,{OktaAuth:function(){return c.OktaAuth}}),t.o(c,"OneLoginAuth")&&t.d(o,{OneLoginAuth:function(){return c.OneLoginAuth}}),t.o(c,"SamlAuth")&&t.d(o,{SamlAuth:function(){return c.SamlAuth}}),t.o(c,"UnhandledErrorForwarder")&&t.d(o,{UnhandledErrorForwarder:function(){return c.UnhandledErrorForwarder}}),t.o(c,"UrlPatternDiscovery")&&t.d(o,{UrlPatternDiscovery:function(){return c.UrlPatternDiscovery}}),t.o(c,"WebStorage")&&t.d(o,{WebStorage:function(){return c.WebStorage}}),t.o(c,"createFetchApi")&&t.d(o,{createFetchApi:function(){return c.createFetchApi}}),t.o(c,"createSpecializedApp")&&t.d(o,{createSpecializedApp:function(){return c.createSpecializedApp}})},82488:function(){},92166:function(X,o,t){"use strict";t.d(o,{b:function(){return ot}});var r=t(2784),e=t(10289),l=t(64279),h=t(56494),c=t(36964),s=t(41682),u=t(76105);function d(P){const v={};for(const F in P.collectors)P.collectors.hasOwnProperty(F)&&(v[F]=P.collectors[F]());const N=[{node:r.Children.toArray(P.root),parent:void 0,contexts:{}}];for(;N.length!==0;){const{node:F,parent:j,contexts:nt}=N.shift();r.Children.forEach(F,gt=>{if(!(0,r.isValidElement)(gt))return;const ct={};for(const Dt in v)if(v.hasOwnProperty(Dt)){const Zt=v[Dt];ct[Dt]=Zt.visit(Zt.accumulator,gt,j,nt[Dt])}for(const Dt of P.discoverers){const Zt=Dt(gt);Zt&&N.push({node:Zt,parent:gt,contexts:ct})}})}return Object.fromEntries(Object.entries(v).map(([F,j])=>[F,j.accumulator]))}function y(P,v){return()=>({accumulator:P(),visit:v})}function m(P){var v;return(v=P.props)==null?void 0:v.children}function E(P){var v,N,F;if(((v=P.props)==null?void 0:v.path)&&((N=P.props)==null?void 0:N.element))return(F=P.props)==null?void 0:F.element}const i=y(()=>new Set,(P,v)=>{const N=(0,c.getComponentData)(v,"core.plugin");N&&P.add(N)});var S=t(88934);function B(P){var F;const v=(F=P.props)==null?void 0:F.element;let N=(0,c.getComponentData)(P,"core.mountPoint");return!N&&(0,r.isValidElement)(v)&&(N=(0,c.getComponentData)(v,"core.mountPoint")),N}const T=y(()=>new Map,(P,v,N,F)=>{var gt,ct;let j=F;if((N==null?void 0:N.props.element)===v)return j;if((0,c.getComponentData)(v,"core.gatherMountPoints")){const Dt=(gt=v.props)==null?void 0:gt.path;if(!Dt)throw new Error("Mount point gatherer must have a path");j=Dt}const nt=B(v);if(nt){let Dt=(ct=v.props)==null?void 0:ct.path;if(j&&(Dt?j=void 0:Dt=j),!Dt)throw new Error("Mounted routable extension must have a path");P.set(nt,Dt)}return j}),G=y(()=>new Map,(P,v,N,F)=>{var gt;if((N==null?void 0:N.props.element)===v)return F;let j=F;const nt=B(v);return nt&&(F&&"sticky"in F?(P.set(nt,F.sticky),((gt=v.props)==null?void 0:gt.path)?j=nt:j=F):(P.set(nt,F),j=nt)),(0,c.getComponentData)(v,"core.gatherMountPoints")?{sticky:j}:j}),H={caseSensitive:!1,path:"/*",element:"match-all",routeRefs:new Set},D=y(()=>Array(),(P,v,N,F)=>{var Zt,re,ee;const j=(Zt=F==null?void 0:F.children)!=null?Zt:P;if((N==null?void 0:N.props.element)===v)return F;const nt=(re=v.props)==null?void 0:re.path,gt=Boolean((ee=v.props)==null?void 0:ee.caseSensitive),ct=B(v);if(ct){if(nt){const Lt={caseSensitive:gt,path:nt,element:"mounted",routeRefs:new Set([ct]),children:[H],plugin:(0,c.getComponentData)(v.props.element,"core.plugin")};return j.push(Lt),Lt}F==null||F.routeRefs.add(ct)}if((0,c.getComponentData)(v,"core.gatherMountPoints")){if(!nt)throw new Error("Mount point gatherer must have a path");const Lt={caseSensitive:gt,path:nt,element:"gathered",routeRefs:new Set,children:[H],plugin:F==null?void 0:F.plugin};return j.push(Lt),Lt}return F}),b=y(()=>new Set,(P,v)=>{if(v.type===S.L){const N=v.props;P.add("with"in N?N.with:N.without)}});var I=t(76241);const K=(0,I.uW)("route-ref-type",()=>Symbol("route-ref-type"));function V(P){return P[K]==="absolute"}function st(P){return P[K]==="sub"}function At(P){return P[K]==="external"}function zt(...P){const v=P.join("/").replace(/\/\/+/g,"/");return v!=="/"&&v.endsWith("/")?v.slice(0,-1):v}function ht(P,v,N){let F,j="";if(V(P))F=P;else if(st(P))F=P.parent,j=P.path;else if(At(P)){const ct=N.get(P);if(!ct)return[void 0,""];if(V(ct))F=ct;else if(st(ct))F=ct.parent,j=ct.path;else throw new Error(`ExternalRouteRef was bound to invalid target, ${ct}`)}else throw P[K]?new Error(`Unknown or invalid route ref type, ${P[K]}`):new Error(`Unknown object passed to useRouteRef, got ${P}`);if(!F)return[void 0,""];const nt=v.get(F);if(!nt)return[void 0,""];const gt=zt(nt,j);return[F,gt]}function jt(P,v,N,F,j){var re;const nt=(re=(0,e.fp)(j,v))!=null?re:[],gt=Array();let ct=-1;for(let ee=P;ee&&(ct=nt.findIndex(Lt=>Lt.route.routeRefs.has(ee)),ct===-1);ee=F.get(ee))gt.unshift(ee);gt.length===0&&(ct-=1);const Dt=ct===-1?"":nt[ct].pathname,Zt=zt(...gt.slice(0,-1).map(ee=>{const Lt=N.get(ee);if(!Lt)throw new Error(`No path for ${ee}`);if(Lt.includes(":"))throw new Error(`Cannot route to ${P} with parent ${ee} as it has parameters`);return Lt}));return Dt+Zt}class Ot{constructor(v,N,F,j,nt){this.routePaths=v,this.routeParents=N,this.routeObjects=F,this.routeBindings=j,this.appBasePath=nt}resolve(v,N){const[F,j]=ht(v,this.routePaths,this.routeBindings);if(!F)return;let nt;typeof N=="string"?nt=this.trimPath(N):N.pathname?nt={...N,pathname:this.trimPath(N.pathname)}:nt=N;const gt=this.appBasePath+jt(F,nt,this.routePaths,this.routeParents,this.routeObjects);return(...[Dt])=>gt+(0,e.Gn)(j,Dt)}trimPath(v){return v&&(v.startsWith(this.appBasePath)?v.slice(this.appBasePath.length):v)}}const Jt=(0,I.CT)("routing-context"),ae=({routePaths:P,routeParents:v,routeObjects:N,routeBindings:F,basePath:j="",children:nt})=>{const gt=new Ot(P,v,N,F,j),ct=(0,I.EI)({1:gt});return r.createElement(Jt.Provider,{value:ct},nt)},Kt=(P,v)=>{var N,F;try{const j=(0,e.fp)(v,{pathname:P}),nt=(N=j==null?void 0:j.filter(ct=>{var Dt;return((Dt=ct==null?void 0:ct.route.routeRefs)==null?void 0:Dt.size)>0}).pop())==null?void 0:N.route;if(!nt)return{};let gt;return nt.routeRefs.size===1&&(gt=nt.routeRefs.values().next().value),{extension:"App",pluginId:((F=nt.plugin)==null?void 0:F.getId())||"root",...gt?{routeRef:gt.id}:{}}}catch{return{}}},pe=({pathname:P,search:v,hash:N})=>{const F=(0,c.useAnalytics)();return(0,r.useEffect)(()=>{F.captureEvent("navigate",`${P}${v}${N}`)},[F,P,v,N]),null},se=({tree:P})=>{const{pathname:v,search:N,hash:F}=(0,e.TH)(),{routeObjects:j}=(0,r.useMemo)(()=>d({root:P,discoverers:[m,E],collectors:{routeObjects:D}}),[P]);return r.createElement(c.AnalyticsContext,{attributes:Kt(v,j)},r.createElement(pe,{pathname:v,search:N,hash:F}))};function le(P,v){const N=new Set(v.values());N.delete(void 0);for(const F of v.keys()){if(N.has(F))continue;let j=F,nt="";for(;j;){const ct=P.get(j);if(!ct)throw new Error(`No path for ${j}`);nt=`${ct}${nt}`,j=v.get(j)}const gt=nt.match(/:(\w+)/g);if(gt){for(let ct=0;ct<gt.length;ct++)for(let Dt=ct+1;Dt<gt.length;Dt++)if(gt[Dt]===gt[ct])throw new Error(`Parameter ${gt[Dt]} is duplicated in path ${nt}`)}}}const Ae=(0,I.CT)("app-context"),Me=({appContext:P,children:v})=>{const N=(0,I.EI)({1:P});return r.createElement(Ae.Provider,{value:N,children:v})};function ye(P){return new Error(`Tried to access IdentityApi ${P} before app was loaded`)}class ve{constructor(){q(this,"target")}setTarget(v){this.target=v}getUserId(){if(!this.target)throw ye("getUserId");return this.target.getUserId()}getProfile(){if(!this.target)throw ye("getProfile");return this.target.getProfile()}async getProfileInfo(){if(!this.target)throw ye("getProfileInfo");return this.target.getProfileInfo()}async getBackstageIdentity(){if(!this.target)throw ye("getBackstageIdentity");return this.target.getBackstageIdentity()}async getCredentials(){if(!this.target)throw ye("getCredentials");return this.target.getCredentials()}async getIdToken(){if(!this.target)throw ye("getIdToken");return this.target.getIdToken()}async signOut(){if(!this.target)throw ye("signOut");await this.target.signOut(),location.reload()}}var de=t(72164);function Ne(P,v,N){if(P!==void 0){const j=N.find(nt=>nt.id===P);if(j)return j}if(v){const j=N.find(nt=>nt.variant==="dark");if(j)return j}const F=N.find(j=>j.variant==="light");return F||N[0]}const Ue=()=>{const P=(0,r.useMemo)(()=>window.matchMedia("(prefers-color-scheme: dark)"),[]),[v,N]=(0,r.useState)(P.matches);return(0,r.useEffect)(()=>{const F=j=>{N(j.matches)};return P.addListener(F),()=>{P.removeListener(F)}},[P]),v};function Ie({children:P}){const v=(0,c.useApi)(c.appThemeApiRef),N=(0,de.Z)(v.activeThemeId$(),v.getActiveThemeId()),F=Boolean(window.matchMedia)?Ue():!1,j=Ne(N,F,v.getInstalledThemes());if(!j)throw new Error("App has no themes");return r.createElement(j.Provider,{children:P})}const Le=async(P="__APP_INJECTED_RUNTIME_CONFIG__")=>{const v=[{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(!v)throw new Error("No static configuration provided");if(!Array.isArray(v))throw new Error("Static configuration has invalid format");const N=v.slice();if(P!=="__app_injected_runtime_config__".toLocaleUpperCase("en-US"))try{const j=JSON.parse(P);Array.isArray(j)?N.push(...j):N.push({data:j,context:"env"})}catch(j){throw new Error(`Failed to load runtime configuration, ${j}`)}const F=window.__APP_CONFIG__;return F&&N.push({context:"window",data:F}),N};function me(P){const v=new Map;return P&&P({bind:(F,j)=>{for(const[nt,gt]of Object.entries(j)){const ct=F[nt];if(!ct)throw new Error(`Key ${nt} is not an existing external route`);if(!gt&&!ct.optional)throw new Error(`External route ${nt} is required but was undefined`);gt&&v.set(ct,gt)}}}),v}function Re(P){var N;let{pathname:v}=new URL((N=P.getOptionalString("app.baseUrl"))!=null?N:"/","http://dummy.dev");return v=v.replace(/\/*$/,""),v}function je(P,v,N){var Dt;const F=Boolean(P),j=(0,l.default)(P||(()=>Promise.resolve([])));let nt;if(F&&j.loading){const{Progress:Zt}=v;nt=r.createElement(Zt,null)}else if(j.error){const{BootErrorPage:Zt}=v;nt=r.createElement(Zt,{step:"load-config",error:j.error})}const{ThemeProvider:gt=Ie}=v;return nt?{node:r.createElement(h.ApiProvider,{apis:h.ApiRegistry.from([[c.appThemeApiRef,N]])},r.createElement(gt,null,nt))}:{api:h.ConfigReader.fromConfigs((Dt=j.value)!=null?Dt:[])}}class Ft{constructor(v){this.app=v}getPlugins(){return this.app.getPlugins()}getSystemIcon(v){return this.app.getSystemIcon(v)}getComponents(){return this.app.getComponents()}}class oe{constructor(v){q(this,"apiHolder");q(this,"configApi");q(this,"apis");q(this,"icons");q(this,"plugins");q(this,"components");q(this,"themes");q(this,"configLoader");q(this,"defaultApis");q(this,"bindRoutes");q(this,"appIdentityProxy",new ve);q(this,"apiFactoryRegistry");var N,F,j,nt;this.apis=(N=v.apis)!=null?N:[],this.icons=v.icons,this.plugins=new Set((F=v.plugins)!=null?F:[]),this.components=v.components,this.themes=v.themes,this.configLoader=(j=v.configLoader)!=null?j:Le,this.defaultApis=(nt=v.defaultApis)!=null?nt:[],this.bindRoutes=v.bindRoutes,this.apiFactoryRegistry=new u.pv}getPlugins(){return Array.from(this.plugins)}getSystemIcon(v){return this.icons[v]}getComponents(){return this.components}getProvider(){const v=new Ft(this);return({children:F})=>{const j=(0,r.useMemo)(()=>h.AppThemeSelector.createWithStorage(this.themes),[]),{routePaths:nt,routeParents:gt,routeObjects:ct,featureFlags:Dt}=(0,r.useMemo)(()=>{const Lt=d({root:F,discoverers:[m,E],collectors:{routePaths:T,routeParents:G,routeObjects:D,collectedPlugins:i,featureFlags:b}});return le(Lt.routePaths,Lt.routeParents),Lt.collectedPlugins.forEach(Tt=>this.plugins.add(Tt)),this.verifyPlugins(this.plugins),this.getApiHolder(),Lt},[F]),Zt=je(this.configLoader,this.components,j),re="api"in Zt;if(re){const{api:Lt}=Zt;this.configApi=Lt}if((0,r.useEffect)(()=>{if(re){const Lt=this.getApiHolder().get(c.featureFlagsApiRef);for(const Tt of this.plugins.values())if("getFeatureFlags"in Tt)for(const ce of Tt.getFeatureFlags())Lt.registerFlag({name:ce.name,pluginId:Tt.getId()});else for(const ce of Tt.output())switch(ce.type){case"feature-flag":{Lt.registerFlag({name:ce.name,pluginId:Tt.getId()});break}default:break}for(const Tt of Dt)Lt.registerFlag({name:Tt,pluginId:""})}},[re,Zt,Dt]),"node"in Zt)return Zt.node;const{ThemeProvider:ee=Ie}=this.components;return r.createElement(h.ApiProvider,{apis:this.getApiHolder()},r.createElement(Me,{appContext:v},r.createElement(ee,null,r.createElement(ae,{routePaths:nt,routeParents:gt,routeObjects:ct,routeBindings:me(this.bindRoutes),basePath:Re(Zt.api)},F))))}}getRouter(){const{Router:v,SignInPage:N}=this.components,F=({component:nt,children:gt})=>{const[ct,Dt]=(0,r.useState)();return ct?(this.appIdentityProxy.setTarget(ct),gt):r.createElement(nt,{onSignInSuccess:Dt})};return({children:nt})=>{const gt=(0,c.useApi)(c.configApiRef),ct=`${Re(gt)}/*`;return N?r.createElement(v,null,r.createElement(se,{tree:nt}),r.createElement(F,{component:N},r.createElement(e.Z5,null,r.createElement(e.AW,{path:ct,element:r.createElement(r.Fragment,null,nt)})))):(this.appIdentityProxy.setTarget(s.UserIdentity.createGuest()),r.createElement(v,null,r.createElement(se,{tree:nt}),r.createElement(e.Z5,null,r.createElement(e.AW,{path:ct,element:r.createElement(r.Fragment,null,nt)}))))}}getApiHolder(){if(this.apiHolder){for(const v of this.plugins)for(const N of v.getApis())this.apiFactoryRegistry.get(N.api)||this.apiFactoryRegistry.register("default",N);return u.MM.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder}this.apiFactoryRegistry.register("static",{api:c.appThemeApiRef,deps:{},factory:()=>h.AppThemeSelector.createWithStorage(this.themes)}),this.apiFactoryRegistry.register("static",{api:c.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:c.identityApiRef,deps:{},factory:()=>this.appIdentityProxy}),this.apiFactoryRegistry.register("default",{api:c.featureFlagsApiRef,deps:{},factory:()=>new h.LocalStorageFeatureFlags});for(const v of this.defaultApis)this.apiFactoryRegistry.register("default",v);for(const v of this.plugins)for(const N of v.getApis())if(!this.apiFactoryRegistry.register("default",N))throw new Error(`Plugin ${v.getId()} tried to register duplicate or forbidden API factory for ${N.api}`);for(const v of this.apis)if(!this.apiFactoryRegistry.register("app",v))throw new Error(`Duplicate or forbidden API factory for ${v.api} in app`);return u.MM.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder=new u.MM(this.apiFactoryRegistry),this.apiHolder}verifyPlugins(v){const N=new Set;for(const F of v){const j=F.getId();if(N.has(j))throw new Error(`Duplicate plugin found '${j}'`);N.add(j)}}}function ot(P){return new oe(P)}},44056:function(X,o,t){"use strict";t.d(o,{b:function(){return r.b}});var r=t(92166),e=t(73495),l=t.n(e);t.o(e,"AtlassianAuth")&&t.d(o,{AtlassianAuth:function(){return e.AtlassianAuth}}),t.o(e,"Auth0Auth")&&t.d(o,{Auth0Auth:function(){return e.Auth0Auth}}),t.o(e,"BitbucketAuth")&&t.d(o,{BitbucketAuth:function(){return e.BitbucketAuth}}),t.o(e,"FlatRoutes")&&t.d(o,{FlatRoutes:function(){return e.FlatRoutes}}),t.o(e,"GithubAuth")&&t.d(o,{GithubAuth:function(){return e.GithubAuth}}),t.o(e,"GitlabAuth")&&t.d(o,{GitlabAuth:function(){return e.GitlabAuth}}),t.o(e,"GoogleAuth")&&t.d(o,{GoogleAuth:function(){return e.GoogleAuth}}),t.o(e,"MicrosoftAuth")&&t.d(o,{MicrosoftAuth:function(){return e.MicrosoftAuth}}),t.o(e,"OAuth2")&&t.d(o,{OAuth2:function(){return e.OAuth2}}),t.o(e,"OktaAuth")&&t.d(o,{OktaAuth:function(){return e.OktaAuth}}),t.o(e,"OneLoginAuth")&&t.d(o,{OneLoginAuth:function(){return e.OneLoginAuth}}),t.o(e,"SamlAuth")&&t.d(o,{SamlAuth:function(){return e.SamlAuth}})},73495:function(){},49208:function(X,o,t){"use strict";t.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 e.b},FlatRoutes:function(){return l.w}});var r=t(56494);t.o(r,"AtlassianAuth")&&t.d(o,{AtlassianAuth:function(){return r.AtlassianAuth}}),t.o(r,"Auth0Auth")&&t.d(o,{Auth0Auth:function(){return r.Auth0Auth}}),t.o(r,"BitbucketAuth")&&t.d(o,{BitbucketAuth:function(){return r.BitbucketAuth}}),t.o(r,"FlatRoutes")&&t.d(o,{FlatRoutes:function(){return r.FlatRoutes}}),t.o(r,"GithubAuth")&&t.d(o,{GithubAuth:function(){return r.GithubAuth}}),t.o(r,"GitlabAuth")&&t.d(o,{GitlabAuth:function(){return r.GitlabAuth}}),t.o(r,"GoogleAuth")&&t.d(o,{GoogleAuth:function(){return r.GoogleAuth}}),t.o(r,"MicrosoftAuth")&&t.d(o,{MicrosoftAuth:function(){return r.MicrosoftAuth}}),t.o(r,"OAuth2")&&t.d(o,{OAuth2:function(){return r.OAuth2}}),t.o(r,"OktaAuth")&&t.d(o,{OktaAuth:function(){return r.OktaAuth}}),t.o(r,"OneLoginAuth")&&t.d(o,{OneLoginAuth:function(){return r.OneLoginAuth}}),t.o(r,"SamlAuth")&&t.d(o,{SamlAuth:function(){return r.SamlAuth}}),t.o(r,"createSpecializedApp")&&t.d(o,{createSpecializedApp:function(){return r.createSpecializedApp}});var e=t(44056);t.o(e,"AtlassianAuth")&&t.d(o,{AtlassianAuth:function(){return e.AtlassianAuth}}),t.o(e,"Auth0Auth")&&t.d(o,{Auth0Auth:function(){return e.Auth0Auth}}),t.o(e,"BitbucketAuth")&&t.d(o,{BitbucketAuth:function(){return e.BitbucketAuth}}),t.o(e,"FlatRoutes")&&t.d(o,{FlatRoutes:function(){return e.FlatRoutes}}),t.o(e,"GithubAuth")&&t.d(o,{GithubAuth:function(){return e.GithubAuth}}),t.o(e,"GitlabAuth")&&t.d(o,{GitlabAuth:function(){return e.GitlabAuth}}),t.o(e,"GoogleAuth")&&t.d(o,{GoogleAuth:function(){return e.GoogleAuth}}),t.o(e,"MicrosoftAuth")&&t.d(o,{MicrosoftAuth:function(){return e.MicrosoftAuth}}),t.o(e,"OAuth2")&&t.d(o,{OAuth2:function(){return e.OAuth2}}),t.o(e,"OktaAuth")&&t.d(o,{OktaAuth:function(){return e.OktaAuth}}),t.o(e,"OneLoginAuth")&&t.d(o,{OneLoginAuth:function(){return e.OneLoginAuth}}),t.o(e,"SamlAuth")&&t.d(o,{SamlAuth:function(){return e.SamlAuth}});var l=t(63938)},96176:function(X,o,t){"use strict";t.d(o,{y:function(){return l}});var r=t(17678);function e(h){return[...h].join(" ")}class l{constructor(c){q(this,"discoveryApi");q(this,"environment");q(this,"provider");q(this,"joinScopesFunc");q(this,"authRequester");q(this,"sessionTransform");const{discoveryApi:s,environment:u,provider:d,joinScopes:y=e,oauthRequestApi:m,sessionTransform:E=i=>i}=c;this.authRequester=m.createAuthRequester({provider:d,onAuthRequest:i=>this.showPopup(i)}),this.discoveryApi=s,this.environment=u,this.provider=d,this.joinScopesFunc=y,this.sessionTransform=E}async createSession(c){return c.instantPopup?this.showPopup(c.scopes):this.authRequester(c.scopes)}async refreshSession(){const c=await fetch(await this.buildUrl("/refresh",{optional:!0}),{headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(u=>{throw new Error(`Auth refresh request failed, ${u}`)});if(!c.ok){const u=new Error(`Auth refresh request failed, ${c.statusText}`);throw u.status=c.status,u}const s=await c.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 c=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(!c.ok){const s=new Error(`Logout request failed, ${c.statusText}`);throw s.status=c.status,s}}async showPopup(c){const s=this.joinScopesFunc(c),u=await this.buildUrl("/start",{scope:s,origin:location.origin}),d=await(0,r.d)({url:u,name:`${this.provider.title} Login`,origin:new URL(u).origin,width:450,height:730});return await this.sessionTransform(d)}async buildUrl(c,s){const u=await this.discoveryApi.getBaseUrl("auth"),d=this.buildQueryString({...s,env:this.environment});return`${u}/${this.provider.id}${c}${d}`}buildQueryString(c){if(!c)return"";const s=Object.entries(c).map(([u,d])=>{if(typeof d=="string")return`${encodeURIComponent(u)}=${encodeURIComponent(d)}`;if(d)return encodeURIComponent(u)}).filter(Boolean).join("&");return s?`?${s}`:""}}},91405:function(X,o,t){"use strict";t.d(o,{l:function(){return l}});var r=t(98005),e=t(36964);class l{constructor(){q(this,"subject",new r.X(e.SessionState.SignedOut));q(this,"signedIn",!1)}setIsSignedIn(c){this.signedIn!==c&&(this.signedIn=c,this.subject.next(this.signedIn?e.SessionState.SignedIn:e.SessionState.SignedOut))}sessionState$(){return this.subject}}},54842:function(X,o,t){"use strict";t.d(o,{Hc:function(){return s},q2:function(){return h},k1:function(){return c}});function r(u,d){for(const y of d)if(!u.has(y))return!1;return!0}class e{constructor(d){this.options=d}sessionExistsAndHasScope(d,y){if(!d)return!1;if(!y||this.options.sessionScopes===void 0)return!0;const m=this.options.sessionScopes(d);return r(m,y)}getExtendedScope(d,y){const m=new Set(this.options.defaultScopes);if(d&&this.options.sessionScopes!==void 0){const E=this.options.sessionScopes(d);for(const i of E)m.add(i)}if(y)for(const E of y)m.add(E);return m}}var l=t(91405);class h{constructor(d){q(this,"connector");q(this,"helper");q(this,"sessionScopesFunc");q(this,"sessionShouldRefreshFunc");q(this,"stateTracker",new l.l);q(this,"refreshPromise");q(this,"currentSession");const{connector:y,defaultScopes:m=new Set,sessionScopes:E,sessionShouldRefresh:i}=d;this.connector=y,this.sessionScopesFunc=E,this.sessionShouldRefreshFunc=i,this.helper=new e({sessionScopes:E,defaultScopes:m})}async getSession(d){if(this.helper.sessionExistsAndHasScope(this.currentSession,d.scopes)){if(!this.sessionShouldRefreshFunc(this.currentSession))return this.currentSession;try{const m=await this.collapsedSessionRefresh(),E=this.sessionScopesFunc(this.currentSession),i=this.sessionScopesFunc(m);return r(i,E)&&(this.currentSession=m),m}catch(m){if(d.optional)return;throw m}}if(!this.currentSession&&!d.instantPopup)try{const y=await this.collapsedSessionRefresh();return this.currentSession=y,this.getSession(d)}catch{}if(!d.optional)return this.currentSession=await this.connector.createSession({...d,scopes:this.helper.getExtendedScope(this.currentSession,d.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 d=await this.refreshPromise;return this.stateTracker.setIsSignedIn(!0),d}finally{delete this.refreshPromise}}}class c{constructor(d){q(this,"connector");q(this,"helper");q(this,"stateTracker",new l.l);q(this,"currentSession");const{connector:y,defaultScopes:m=new Set,sessionScopes:E}=d;this.connector=y,this.helper=new e({sessionScopes:E,defaultScopes:m})}setSession(d){this.currentSession=d,this.stateTracker.setIsSignedIn(Boolean(d))}async getSession(d){if(this.helper.sessionExistsAndHasScope(this.currentSession,d.scopes))return this.currentSession;if(!d.optional)return this.currentSession=await this.connector.createSession({...d,scopes:this.helper.getExtendedScope(this.currentSession,d.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(d){q(this,"manager");q(this,"storageKey");q(this,"schema");q(this,"sessionShouldRefreshFunc");q(this,"helper");const{manager:y,storageKey:m,schema:E,sessionScopes:i,sessionShouldRefresh:S=()=>!1}=d;this.manager=y,this.storageKey=m,this.schema=E,this.sessionShouldRefreshFunc=S,this.helper=new e({sessionScopes:i,defaultScopes:new Set})}setSession(d){this.manager.setSession(d),this.saveSession(d)}async getSession(d){const{scopes:y}=d,m=this.loadSession();if(this.helper.sessionExistsAndHasScope(m,y)&&!this.sessionShouldRefreshFunc(m))return this.manager.setSession(m),m;const E=await this.manager.getSession(d);return this.saveSession(E),E}async removeSession(){localStorage.removeItem(this.storageKey),await this.manager.removeSession()}sessionState$(){return this.manager.sessionState$()}loadSession(){try{const d=localStorage.getItem(this.storageKey);if(d){const y=JSON.parse(d,(m,E)=>(E==null?void 0:E.__type)==="Set"?new Set(E.__value):E);try{return this.schema.parse(y)}catch(m){throw console.log(`Failed to load session from local storage because it did not conform to the expected schema, ${m}`),m}}return}catch{localStorage.removeItem(this.storageKey);return}}saveSession(d){if(d===void 0){localStorage.removeItem(this.storageKey);return}try{this.schema.parse(d)}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(d,(y,m)=>m instanceof Set?{__type:"Set",__value:Array.from(m)}:m))}}},17678:function(X,o,t){"use strict";t.d(o,{d:function(){return r}});function r(e){return new Promise((l,h)=>{const c=e.width||500,s=e.height||700,u=window.screen.width/2-c/2,d=window.screen.height/2-s/2,y=window.open(e.url,e.name,`menubar=no,location=no,resizable=no,scrollbars=no,status=no,width=${c},height=${s},top=${d},left=${u}`);let m="";if(!y||typeof y.closed=="undefined"||y.closed){const B=new Error("Failed to open auth popup.");B.name="PopupRejectedError",h(B);return}const E=B=>{if(B.source!==y||B.origin!==e.origin)return;const{data:T}=B;if(T.type==="config_info"){m=T.targetOrigin;return}if(T.type!=="authorization_response")return;const G=T;if("error"in G){const H=new Error(G.error.message);H.name=G.error.name,h(H)}else l(G.response);S()},i=setInterval(()=>{if(y.closed){const B=`Login failed, ${m&&m!==window.location.origin?`Incorrect app origin, expected ${m}`:"popup was closed"}`,T=new Error(B);T.name="PopupClosedError",h(T),S()}},100);function S(){window.removeEventListener("message",E),clearInterval(i)}window.addEventListener("message",E)})}},98005:function(X,o,t){"use strict";t.d(o,{J:function(){return l},X:function(){return h}});var r=t(82394),e=t.n(r);class l{constructor(){q(this,"isClosed",!1);q(this,"terminatingError");q(this,"observable",new(e())(s=>this.isClosed?(this.terminatingError?s.error(this.terminatingError):s.complete(),()=>{}):(this.subscribers.add(s),()=>{this.subscribers.delete(s)})));q(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,d){const y=typeof s=="function"?{next:s,error:u,complete:d}:s;return this.observable.subscribe(y)}}class h{constructor(s){q(this,"isClosed");q(this,"currentValue");q(this,"terminatingError");q(this,"observable");q(this,"subscribers",new Set);this.isClosed=!1,this.currentValue=s,this.terminatingError=void 0,this.observable=new(e())(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,d){const y=typeof s=="function"?{next:s,error:u,complete:d}:s;return this.observable.subscribe(y)}}},88934:function(X,o,t){"use strict";t.d(o,{L:function(){return l}});var r=t(36964),e=t(2784);const l=h=>{const{children:c}=h,s=(0,r.useApi)(r.featureFlagsApiRef),u="with"in h?s.isActive(h.with):!s.isActive(h.without);return e.createElement(e.Fragment,null,u?c:null)};(0,r.attachComponentData)(l,"core.featureFlagged",!0)},63938:function(X,o,t){"use strict";t.d(o,{w:function(){return h}});var r=t(2784),e=t(10289),l=t(36964);const h=s=>{const u=(0,l.useApp)(),{NotFoundErrorPage:d}=u.getComponents(),y=(0,l.useElementFilter)(s.children,m=>m.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(d,null),path:"/*"}),(0,e.V$)(y)};var c=t(88934)},41682:function(X,o,t){"use strict";t.d(o,{Button:function(){return H},CodeSnippet:function(){return jt},Content:function(){return Ma},ContentHeader:function(){return fs},CreateButton:function(){return ae},DependencyGraph:function(){return Tt},DependencyGraphTypes:function(){return r},EmptyState:function(){return Q},ErrorPage:function(){return ys},ErrorPanel:function(){return Ze},Header:function(){return ja},HeaderIconLinkRow:function(){return dr},HeaderLabel:function(){return Ls},HeaderTabs:function(){return Na},InfoCard:function(){return wt},ItemCardGrid:function(){return Ms},ItemCardHeader:function(){return Fs},Link:function(){return T},LogViewer:function(){return Ir},MissingAnnotationEmptyState:function(){return mt},OverflowTooltip:function(){return pr},Page:function(){return Ga},PageWithHeader:function(){return $s},Progress:function(){return Nr},ResponseErrorPanel:function(){return Ve},RoutedTabs:function(){return Ua},Select:function(){return $r},Sidebar:function(){return Hs},SidebarContext:function(){return vr},SidebarDivider:function(){return ks},SidebarItem:function(){return _a},SidebarPage:function(){return ws},SubvalueCell:function(){return Uo},SupportButton:function(){return Oo},Table:function(){return rs},UserIdentity:function(){return nr},WarningPanel:function(){return Pn},sidebarConfig:function(){return dn},useQueryParamState:function(){return Ro}});var r={};t.r(r),t.d(r,{Nm:function(){return Kt},ht:function(){return le},LJ:function(){return se}});var e=t(2784),l=t(36964),h=t(19928);function c(n){const[a,f]=useState([]),g=useApi(alertApiRef);if(useEffect(()=>{const x=g.alert$().subscribe(w=>f(Y=>Y.concat(w)));return()=>{x.unsubscribe()}},[g]),a.length===0)return null;const[p]=a,C=()=>{f(x=>x.filter(w=>w!==p))};return React.createElement(Snackbar,{open:!0,anchorOrigin:{vertical:"top",horizontal:"center"}},React.createElement(Alert,{action:React.createElement(IconButton,{color:"inherit",size:"small",onClick:C,"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=t(79692),u=t(12420);const d=(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:f,customStyles:g}=n,p=d();return React.createElement(MaterialAvatar,{alt:a,src:f,className:p.avatar,style:{backgroundColor:stringToColor(a||f||""),...g}},a&&extractInitials(a))}var m=t(77277),E=t(86689),i=t(62833);const S=n=>/^([a-z+.-]+):/.test(n),B=n=>{var a;return n instanceof Array?n.map(B).join(" ").trim():typeof n=="object"&&n?B((a=n==null?void 0:n.props)==null?void 0:a.children):["string","number"].includes(typeof n)?String(n):""},T=e.forwardRef(({onClick:n,...a},f)=>{const g=(0,l.useAnalytics)(),p=String(a.to),C=B(a.children)||p,x=S(p),w=x&&!!/^https?:/.exec(p),Y=W=>{n==null||n(W),g.captureEvent("click",C,{attributes:{to:p}})};return x?e.createElement(E.Z,{ref:f,href:p,onClick:Y,...w?{target:"_blank",rel:"noopener"}:{},...a}):e.createElement(E.Z,{ref:f,component:i.rU,onClick:Y,...a})}),G=e.forwardRef((n,a)=>e.createElement(T,{ref:a,...n,color:"initial"})),H=e.forwardRef((n,a)=>e.createElement(m.Z,{ref:a,component:G,...n}));var D=t(60364),b=t(61837),I=t(80030),K=t(19353),V=t(95074);function st(n){const{text:a,tooltipDelay:f=1e3,tooltipText:g="Text copied to clipboard"}=n,p=(0,l.useApi)(l.errorApiRef),[C,x]=(0,e.useState)(!1),[{error:w},Y]=(0,V.Z)();(0,e.useEffect)(()=>{w&&p.post(w)},[w,p]);const W=at=>{at.stopPropagation(),x(!0),Y(a)};return e.createElement(e.Fragment,null,e.createElement(I.ZP,{id:"copy-test-tooltip",title:g,placement:"top",leaveDelay:f,onClose:()=>x(!1),open:C},e.createElement(b.Z,{onClick:W},e.createElement(K.Z,null))))}var At=t(96259),zt=t(397),ht=t(74943);function jt(n){const{text:a,language:f,showLineNumbers:g=!1,highlightedNumbers:p,customStyle:C,showCopyCodeButton:x=!1}=n,w=(0,D.Z)(),Y=w.palette.type==="dark"?zt.Z:ht.Z,W=w.palette.type==="dark"?"#256bf3":"#e6ffed";return e.createElement("div",{style:{position:"relative"}},e.createElement(At.Z,{customStyle:C,language:f,style:Y,showLineNumbers:g,wrapLines:!0,lineNumberStyle:{color:w.palette.textVerySubtle},lineProps:at=>(p==null?void 0:p.includes(at))?{style:{backgroundColor:W}}:{}},a),x&&e.createElement("div",{style:{position:"absolute",top:0,right:0}},e.createElement(st,{text:a})))}var Ot=t(41156),Jt=t(88188);function ae(n){const{title:a,to:f}=n,g=(0,Ot.Z)(p=>p.breakpoints.down("xs"));return f?g?e.createElement(b.Z,{component:i.rU,color:"primary",title:a,size:"small",to:f},e.createElement(Jt.Z,null)):e.createElement(m.Z,{component:i.rU,variant:"contained",color:"primary",to:f},a):null}var Kt;(function(n){const a="TB";n.TOP_BOTTOM=a;const f="BT";n.BOTTOM_TOP=f;const g="LR";n.LEFT_RIGHT=g;const p="RL";n.RIGHT_LEFT=p})(Kt||(Kt={}));var pe;(function(n){const a="UL";n.UP_LEFT=a;const f="UR";n.UP_RIGHT=f;const g="DL";n.DOWN_LEFT=g;const p="DR";n.DOWN_RIGHT=p})(pe||(pe={}));var se;(function(n){const a="network-simplex";n.NETWORK_SIMPLEX=a;const f="tight-tree";n.TIGHT_TREE=f;const g="longest-path";n.LONGEST_PATH=g})(se||(se={}));var le;(function(n){const a="l";n.LEFT=a;const f="r";n.RIGHT=f;const g="c";n.CENTER=g})(le||(le={}));var Ae=t(13387),Me=t(11105),ye=t(97963),ve=t(46506),de=t.n(ve),Ne=t(54073),Ue=t.n(Ne),Ie=t(10368);const Le=(0,s.Z)(n=>({node:{fill:n.palette.primary.light,stroke:n.palette.primary.light},text:{fill:n.palette.primary.contrastText}}),{name:"BackstageDependencyGraphDefaultNode"});function me({node:{id:n}}){const a=Le(),[f,g]=e.useState(0),[p,C]=e.useState(0),x=e.useRef(null);e.useLayoutEffect(()=>{if(x.current){let{height:at,width:it}=x.current.getBBox();at=Math.round(at),it=Math.round(it),(at!==p||it!==f)&&(g(it),C(at))}},[f,p]);const w=10,Y=f+w*2,W=p+w*2;return e.createElement("g",null,e.createElement("rect",{className:a.node,width:Y,height:W,rx:10}),e.createElement("text",{ref:x,className:a.text,y:W/2,x:Y/2,textAnchor:"middle",alignmentBaseline:"middle"},n))}const Re="arrow-marker",je="node",Ft="edge",oe="label",ot=(0,Ie.Z)(n=>({node:{transition:`${n.transitions.duration.shortest}ms`}}),{name:"BackstageDependencyGraphNode"}),P=n=>e.createElement(me,{...n});function v({render:n=P,setNode:a,node:f}){const{width:g,height:p,x:C=0,y:x=0}=f,w=f,Y=ot(),W=e.useRef(null);return e.useLayoutEffect(()=>{if(W.current){let{height:at,width:it}=W.current.getBBox();at=Math.round(at),it=Math.round(it),(at!==p||it!==g)&&a(f.id,{...f,height:at,width:it})}},[f,g,p,a]),e.createElement("g",{ref:W,"data-testid":je,className:Y.node,transform:`translate(${C-g/2},${x-p/2})`},n({node:w}))}var N=t(55876),F=t(66481),j=t(19574),nt=t.n(j);const gt=(0,Ie.Z)(n=>({text:{fill:n.palette.textContrast}}),{name:"BackstageDependencyGraphDefaultLabel"});function ct({edge:{label:n}}){const a=gt();return e.createElement("text",{className:a.text,textAnchor:"middle"},n)}const Dt=(0,Ie.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"}),Zt=n=>e.createElement(ct,{...n}),re=N.Z().x(n=>n.x).y(n=>n.y).curve(F.Z);function ee({render:n=Zt,setEdge:a,id:f,edge:g}){const{x:p=0,y:C=0,width:x,height:w,points:Y}=g,W=g,at=Dt(),it=e.useRef(null);e.useLayoutEffect(()=>{if(it.current){let{height:St,width:It}=it.current.getBBox();St=Math.round(St),It=Math.round(It),(St!==w||It!==x)&&a(f,{...g,height:St,width:It})}},[g,w,x,a,f]);let Rt="";if(Y){const St=Y.filter(It=>nt()(It.x)&&nt()(It.y));Rt=re(St)||""}return e.createElement(e.Fragment,null,Rt&&e.createElement("path",{"data-testid":Ft,className:at.path,markerEnd:`url(#${Re})`,d:Rt}),W.label?e.createElement("g",{ref:it,"data-testid":oe,className:at.label,transform:`translate(${p},${C})`},n({edge:W})):null)}const Lt="workspace";function Tt(n){var ar,so;const{edges:a,nodes:f,renderNode:g,direction:p=Kt.TOP_BOTTOM,align:C,nodeMargin:x=50,edgeMargin:w=10,rankMargin:Y=50,paddingX:W=0,paddingY:at=0,acyclicer:it,ranker:Rt=se.NETWORK_SIMPLEX,labelPosition:St=le.RIGHT,labelOffset:It=10,edgeRanks:ie=1,edgeWeight:en=1,renderLabel:qe,defs:ze,zoom:Xt="enabled",...De}=n,Pe=(0,ye.Z)(),[_e,Kn]=e.useState(100),[fn,Kr]=e.useState(100),Fe=e.useRef(new(de()).graphlib.Graph),[Nn,Ea]=e.useState(((ar=Fe.current.graph())==null?void 0:ar.width)||0),[Jn,Aa]=e.useState(((so=Fe.current.graph())==null?void 0:so.height)||0),[Jr,Yr]=e.useState([]),[va,nn]=e.useState([]),mn=Math.max(Nn,_e),yn=Math.max(Jn,fn),Yn=e.useMemo(()=>Ue()(He=>{if(!He)return;const rn=Me.Z(He),We=Me.Z(He.getElementById(Lt));function Sn(){rn.call(Ae.sP().scaleExtent([1,10]).on("zoom",Fn=>{Fn.transform.x=Math.min(0,Math.max(Fn.transform.x,mn-mn*Fn.transform.k)),Fn.transform.y=Math.min(0,Math.max(Fn.transform.y,yn-yn*Fn.transform.k)),We.attr("transform",Fn.transform)}))}Xt==="enabled"?Sn():Xt==="enable-on-click"&&rn.on("click",()=>Sn());const{width:Cn,height:Qr}=He.getBoundingClientRect();_e!==Cn&&Kn(Cn),fn!==Qr&&Kr(Qr)},100),[fn,_e,mn,yn,Xt]),Ye=e.useCallback(()=>{const He=Fe.current.nodes(),rn=Fe.current.edges();He.forEach(We=>{f.some(Cn=>Cn.id===We)||Fe.current.removeNode(We)}),rn.forEach(We=>{a.some(Cn=>Cn.from===We.v&&Cn.to===We.w)||Fe.current.removeEdge(We.v,We.w)}),f.forEach(We=>{const Sn=Fe.current.nodes().find(Cn=>We.id===Cn);if(Sn&&Fe.current.node(Sn)){const{width:Cn,height:Qr,x:Fn,y:Ai}=Fe.current.node(Sn);Fe.current.setNode(Sn,{...We,width:Cn,height:Qr,x:Fn,y:Ai})}else Fe.current.setNode(We.id,{...We,width:0,height:0})}),a.forEach(We=>{Fe.current.setEdge(We.from,We.to,{...We,label:We.label,width:0,height:0,labelpos:St,labeloffset:It,weight:en,minlen:ie})})},[a,f,St,It,en,ie]),Qe=e.useMemo(()=>Ue()(()=>{de().layout(Fe.current);const{height:He,width:rn}=Fe.current.graph(),We=Math.max(0,He||0),Sn=Math.max(0,rn||0);Ea(Sn),Aa(We),Yr(Fe.current.nodes()),nn(Fe.current.edges())},250,{leading:!0}),[]);e.useEffect(()=>(Fe.current.setGraph({rankdir:p,align:C,nodesep:x,edgesep:w,ranksep:Y,marginx:W,marginy:at,acyclicer:it,ranker:Rt}),Ye(),Qe(),Qe.cancel),[it,C,p,w,W,at,x,Y,Rt,Ye,Qe]);function rr(He,rn){return Fe.current.setNode(He,rn),Qe(),Fe.current}function Qn(He,rn){return Fe.current.setEdge(He,rn),Qe(),Fe.current}return e.createElement("svg",{ref:Yn,...De,width:"100%",height:yn,viewBox:`0 0 ${mn} ${yn}`},e.createElement("defs",null,e.createElement("marker",{id:Re,viewBox:"0 0 24 24",markerWidth:"14",markerHeight:"14",refX:"16",refY:"12",orient:"auto",markerUnits:"strokeWidth"},e.createElement("path",{fill:Pe.palette.textSubtle,d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})),ze),e.createElement("g",{id:Lt},e.createElement("svg",{width:Nn,height:Jn,y:yn/2-Jn/2,x:mn/2-Nn/2,viewBox:`0 0 ${Nn} ${Jn}`},va.map(He=>{const rn=Fe.current.edge(He);return rn?e.createElement(ee,{key:`${He.v}-${He.w}`,id:He,setEdge:Qn,render:qe,edge:rn}):null}),Jr.map(He=>{const rn=Fe.current.node(He);return rn?e.createElement(v,{key:He,setNode:rr,render:g,node:rn}):null}))))}var ce=t(72779),dt=t.n(ce);const Ct=(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"}),Yt=n=>{var St;const{variant:a,message:f,id:g,fixed:p=!1}=n,C=Ct(),w=useApi(storageApiRef).forBucket("notifications"),Y=(St=w.get("dismissedBanners"))!=null?St:[],[W,at]=useState(new Set(Y)),it=useObservable(w.observe$("dismissedBanners"));useEffect(()=>{var It;if(it==null?void 0:it.newValue){const ie=(It=it==null?void 0:it.newValue)!=null?It:[];at(new Set(ie))}},[it==null?void 0:it.newValue]);const Rt=()=>{w.set("dismissedBanners",[...W,g])};return React.createElement(Snackbar,{anchorOrigin:p?{vertical:"bottom",horizontal:"center"}:{vertical:"top",horizontal:"center"},open:!W.has(g),classes:{root:classNames(C.root,!p&&C.topPosition)}},React.createElement(SnackbarContent,{classes:{root:classNames(C.content,C[a]),message:C.message},message:f,action:[React.createElement(IconButton,{key:"dismiss",title:"Permanently dismiss this message",color:"inherit",onClick:Rt},React.createElement(Close,{className:C.icon}))]}))};var Vt=t(60905),vt=t(90436),Nt=t(86284),Wt=t(96465),he=t(19133),qt=t(3871);const J=(0,s.Z)({generalImg:{width:"95%",zIndex:2,position:"relative",left:"50%",top:"50%",transform:"translate(-50%, 15%)"}},{name:"BackstageEmptyStateImage"}),R=({missing:n})=>{const a=J();switch(n){case"field":return e.createElement("img",{src:Nt,className:a.generalImg,alt:"annotation is missing"});case"info":return e.createElement("img",{src:Wt,alt:"no Information",className:a.generalImg});case"content":return e.createElement("img",{src:he,alt:"create Component",className:a.generalImg});case"data":return e.createElement("img",{src:qt,alt:"no Build",className:a.generalImg});default:return null}},O=(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 Q(n){const{title:a,description:f,missing:g,action:p}=n,C=O();return e.createElement(Vt.Z,{container:!0,direction:"row",justifyContent:"space-around",alignItems:"flex-start",className:C.root,spacing:2},e.createElement(Vt.Z,{item:!0,xs:12,md:6},e.createElement(Vt.Z,{container:!0,direction:"column"},e.createElement(Vt.Z,{item:!0,xs:!0},e.createElement(vt.Z,{variant:"h5"},a)),e.createElement(Vt.Z,{item:!0,xs:!0},e.createElement(vt.Z,{variant:"body1"},f)),e.createElement(Vt.Z,{item:!0,xs:!0,className:C.action},p))),e.createElement(Vt.Z,{item:!0,xs:12,md:6,className:C.imageContainer},e.createElement(R,{missing:g})))}const tt=`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`,Et=(0,s.Z)(n=>({code:{borderRadius:6,margin:`${n.spacing(2)}px 0px`,background:n.palette.type==="dark"?"#444":"#fff"}}),{name:"BackstageMissingAnnotationEmptyState"});function mt(n){const{annotation:a}=n,f=Et(),g=e.createElement(e.Fragment,null,"The ",e.createElement("code",null,a)," annotation is missing. You need to add the annotation to your component if you want to enable this tool.");return e.createElement(Q,{missing:"field",title:"Missing Annotation",description:g,action:e.createElement(e.Fragment,null,e.createElement(vt.Z,{variant:"body1"},"Add the annotation to your component YAML as shown in the highlighted example below:"),e.createElement("div",{className:f.code},e.createElement(jt,{text:tt.replace("ANNOTATION",a),language:"yaml",showLineNumbers:!0,highlightedNumbers:[6,7],customStyle:{background:"inherit",fontSize:"115%"}})),e.createElement(m.Z,{color:"primary",component:T,to:"https://backstage.io/docs/features/software-catalog/well-known-annotations"},"Read more"))})}var Bt=t(11776),bt=t(38402),Ee=t(49378),Xe=t(41128),on=t(27616),lt=t(8284),Z=t(70660),_=t(91750),pt=t(38016);const Ht=(n,a)=>(a.palette.type==="light"?Xe._j:Xe.$n)(a.palette[n].light,.6),_t=(n,a)=>(a.palette.type==="light"?Xe.$n:Xe._j)(a.palette[n].light,.9),ge=(0,s.Z)(n=>({root:{marginRight:n.spacing(1),fill:({severity:a})=>Ht(a,n)}})),Be=({severity:n})=>{const a=ge({severity:n});return e.createElement(_.Z,{classes:a})},an=({severity:n})=>{const a=ge({severity:n});return e.createElement(pt.Z,{classes:a})},hn=(0,s.Z)(n=>({panel:{backgroundColor:({severity:a})=>_t(a,n),color:({severity:a})=>Ht(a,n),verticalAlign:"middle"},summary:{display:"flex",flexDirection:"row"},summaryText:{color:({severity:a})=>Ht(a,n),fontWeight:"bold"},message:{width:"100%",display:"block",color:({severity:a})=>Ht(a,n),backgroundColor:({severity:a})=>_t(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"}),Xn=n=>n.charAt(0).toLocaleUpperCase("en-US")+n.slice(1);function Pn(n){const{severity:a="warning",title:f,message:g,children:p,defaultExpanded:C}=n,x=hn({severity:a}),w=Xn(a)+(f?`: ${f}`:"");return e.createElement(on.Z,{defaultExpanded:C!=null?C:!1,className:x.panel,role:"alert"},e.createElement(lt.Z,{expandIcon:e.createElement(an,{severity:a}),className:x.summary},e.createElement(Be,{severity:a}),e.createElement(vt.Z,{className:x.summaryText,variant:"subtitle1"},w)),(g||p)&&e.createElement(Z.Z,null,e.createElement(Vt.Z,{container:!0},g&&e.createElement(Vt.Z,{item:!0,xs:12},e.createElement(vt.Z,{className:x.message,variant:"body1"},g)),p&&e.createElement(Vt.Z,{item:!0,xs:12,className:x.details},p))))}const In=(0,s.Z)(n=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:n.spacing(2)},divider:{margin:n.spacing(2)}}),{name:"BackstageErrorPanel"}),fe=({error:n,message:a,stack:f,children:g})=>{const p=In();return e.createElement(Bt.Z,{dense:!0},e.createElement(bt.Z,{alignItems:"flex-start"},e.createElement(Ee.Z,{classes:{secondary:p.text},primary:"Error",secondary:n}),e.createElement(st,{text:n})),e.createElement(bt.Z,{alignItems:"flex-start"},e.createElement(Ee.Z,{classes:{secondary:p.text},primary:"Message",secondary:a}),e.createElement(st,{text:a})),f&&e.createElement(bt.Z,{alignItems:"flex-start"},e.createElement(Ee.Z,{classes:{secondary:p.text},primary:"Stack Trace",secondary:f}),e.createElement(st,{text:f})),g)};function Ze(n){const{title:a,error:f,defaultExpanded:g,children:p}=n;return e.createElement(Pn,{severity:"error",title:a!=null?a:f.message,defaultExpanded:g},e.createElement(fe,{error:f.name,message:f.message,stack:f.stack,children:p}))}var sn=t(85256);const On=(0,s.Z)(n=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:n.spacing(2)},divider:{margin:n.spacing(2)}}),{name:"BackstageResponseErrorPanel"});function Ve(n){var It;const{title:a,error:f,defaultExpanded:g}=n,p=On();if(f.name!=="ResponseError")return e.createElement(Ze,{title:a!=null?a:f.message,defaultExpanded:g,error:f});const{data:C,cause:x}=f,{request:w,response:Y}=C,W=`${Y.statusCode}: ${x.name}`,at=w&&`${w.method} ${w.url}`,it=x.message.replace(/\\n/g,`
|
|
12
|
-
`),Rt=(It=x.stack)==null?void 0:It.replace(/\\n/g,`
|
|
13
|
-
`),St=JSON.stringify(C,void 0,2);return e.createElement(Ze,{title:a!=null?a:f.message,defaultExpanded:g,error:{name:W,message:it,stack:Rt}},at&&e.createElement(bt.Z,{alignItems:"flex-start"},e.createElement(Ee.Z,{classes:{secondary:p.text},primary:"Request",secondary:w?`${at}`:void 0}),e.createElement(st,{text:at})),e.createElement(e.Fragment,null,e.createElement(sn.Z,{component:"li",className:p.divider}),e.createElement(bt.Z,{alignItems:"flex-start"},e.createElement(Ee.Z,{classes:{secondary:p.text},primary:"Full Error as JSON"})),e.createElement(jt,{language:"json",text:St,showCopyCodeButton:!0})))}var Un=t(9832);function or(n){const a=document.createElement("div");return a.setAttribute("id",n),a}function $n(n){document.body.insertBefore(n,document.body.lastElementChild.nextElementSibling)}function Rr(n){const a=useRef(null);useEffect(function(){const p=document.querySelector(`#${n}`),C=p||or(n);return p||$n(C),C.appendChild(a.current),function(){a.current.remove(),C.childNodes.length===-1&&C.remove()}},[n]);function f(){return a.current||(a.current=document.createElement("div")),a.current}return f()}var Zn=null;const wn="core.calloutSeen";function sr(){const[n,a]=useState(()=>{const g=localStorage.getItem(wn);return g?JSON.parse(g):{}}),f=useCallback((g,p)=>{const C=localStorage.getItem(wn),w={...C?JSON.parse(C):{},[g]:p};a(w),localStorage.setItem(wn,JSON.stringify(w))},[]);return{states:n,setState:f}}function ir(n){const{states:a,setState:f}=sr(),g=useCallback(()=>{f(n,!0)},[f,n]);return{seen:a[n]===!0,markSeen:g}}function lr(n){const{seen:a,markSeen:f}=ir(n);return{show:a===!1,hide:f}}const kn=(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 Sr(n){const{featureId:a,title:f,description:g,children:p}=n,{show:C,hide:x}=useShowCallout(a),w=usePortal("core.callout"),Y=useRef(null),[W,at]=useState(),it=kn(),Rt=useCallback(()=>{if(Y.current){const St=Y.current.getBoundingClientRect(),It=Math.max(St.width,St.height),ie=800,en=St.x-(It-St.width)/2-ie,qe=St.y-(It-St.height)/2-ie,ze=It+2*ie,Xt=450,De=St.x+St.width/2-Xt,Pe=St.y-(It-St.height)/2+It+20;at({dotLeft:en,dotTop:qe,dotSize:ze,borderWidth:ie,textTop:Pe,textLeft:De,textWidth:Xt})}},[]);return useEffect(()=>(window.addEventListener("resize",Rt),window.addEventListener("scroll",Rt),()=>{window.removeEventListener("resize",Rt),window.removeEventListener("scroll",Rt)}),[Rt]),useLayoutEffect(Rt,[Y.current,Rt]),C?React.createElement(React.Fragment,null,React.createElement("div",{className:it.featureWrapper,ref:Y},p),createPortal(React.createElement("div",{className:it.backdrop},React.createElement(ClickAwayListener,{onClickAway:x},React.createElement(React.Fragment,null,React.createElement("div",{className:it.dot,"data-testid":"dot",style:{left:W==null?void 0:W.dotLeft,top:W==null?void 0:W.dotTop,width:W==null?void 0:W.dotSize,height:W==null?void 0:W.dotSize,borderWidth:W==null?void 0:W.borderWidth},onClick:x,onKeyDown:x,role:"button",tabIndex:0},React.createElement("div",{className:it.pulseCircle})),React.createElement("div",{className:it.text,"data-testid":"text",style:{left:W==null?void 0:W.textLeft,top:W==null?void 0:W.textTop,width:W==null?void 0:W.textWidth}},React.createElement(Typography,{variant:"h2",paragraph:!0},f),React.createElement(Typography,null,g))))),w)):React.createElement(React.Fragment,null,p)}var cr=t(35292);const Wn=(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 Cr({color:n="primary",disabled:a=!1,href:f="#",icon:g=e.createElement(cr.Z,null),label:p,onClick:C,title:x}){const w=Wn();return a?e.createElement(E.Z,{title:x,className:dt()(w.link,w.disabled),underline:"none"},g,e.createElement("span",{className:w.label},p)):e.createElement(E.Z,{title:x,className:dt()(w.link,w[n]),to:f,component:T,onClick:C},g,e.createElement("span",{className:w.label},p))}const ur=(0,s.Z)(n=>({links:{margin:n.spacing(2,0),display:"grid",gridAutoFlow:"column",gridAutoColumns:"min-content",gridGap:n.spacing(3)}}),{name:"BackstageHeaderIconLinkRow"});function dr(n){const{links:a}=n,f=ur();return e.createElement("nav",{className:f.links},a.map((g,p)=>e.createElement(Cr,{key:p+1,...g})))}const fr=n=>{const a=n==="dark"?"16%":"97%";return`
|
|
14
|
-
hsl(0, 0%, ${a}) 0%,
|
|
15
|
-
hsla(0, 0%, ${a}, 0.987) 8.1%,
|
|
16
|
-
hsla(0, 0%, ${a}, 0.951) 15.5%,
|
|
17
|
-
hsla(0, 0%, ${a}, 0.896) 22.5%,
|
|
18
|
-
hsla(0, 0%, ${a}, 0.825) 29%,
|
|
19
|
-
hsla(0, 0%, ${a}, 0.741) 35.3%,
|
|
20
|
-
hsla(0, 0%, ${a}, 0.648) 41.2%,
|
|
21
|
-
hsla(0, 0%, ${a}, 0.55) 47.1%,
|
|
22
|
-
hsla(0, 0%, ${a}, 0.45) 52.9%,
|
|
23
|
-
hsla(0, 0%, ${a}, 0.352) 58.8%,
|
|
24
|
-
hsla(0, 0%, ${a}, 0.259) 64.7%,
|
|
25
|
-
hsla(0, 0%, ${a}, 0.175) 71%,
|
|
26
|
-
hsla(0, 0%, ${a}, 0.104) 77.5%,
|
|
27
|
-
hsla(0, 0%, ${a}, 0.049) 84.5%,
|
|
28
|
-
hsla(0, 0%, ${a}, 0.013) 91.9%,
|
|
29
|
-
hsla(0, 0%, ${a}, 0) 100%
|
|
30
|
-
`},qn=100,zn=10,mr=(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:qn,height:`calc(100% + ${zn}px)`,transition:"opacity 300ms",pointerEvents:"none"},fadeLeft:{left:-zn,background:`linear-gradient(90deg, ${fr(n.palette.type)})`},fadeRight:{right:-zn,background:`linear-gradient(270deg, ${fr(n.palette.type)})`},fadeHidden:{opacity:0},button:{position:"absolute"},buttonLeft:{left:-n.spacing(2)},buttonRight:{right:-n.spacing(2)}}),{name:"BackstageHorizontalScrollGrid"});function An(n){const[[a,f],g]=React.useState([0,0]);return React.useLayoutEffect(()=>{const p=n.current;if(!p){g([0,0]);return}const C=()=>{const x=p.scrollLeft,w=p.scrollWidth-p.offsetWidth-p.scrollLeft;g([x,w])};return C(),p.addEventListener("scroll",C),window.addEventListener("resize",C),()=>{p.removeEventListener("scroll",C),window.removeEventListener("resize",C)}},[n]),[a,f]}function gn(n,a,f){const[g,p]=React.useState(0);return React.useLayoutEffect(()=>{if(g===0)return;const C=performance.now(),x=requestAnimationFrame(w=>{if(!n.current)return;const Y=w-C,W=Math.abs(g)*Y/a,it=Math.max(f,W)*Math.sign(g);n.current.scrollBy({left:it});const Rt=g-it;Math.sign(g)!==Math.sign(Rt)?p(0):p(Rt)});return()=>cancelAnimationFrame(x)},[n,g,a,f]),p}function Tr(n){const{scrollStep:a=100,scrollSpeed:f=50,minScrollDistance:g=5,children:p,...C}=n,x=mr(n),w=React.useRef(),[Y,W]=An(w),at=gn(w,f,g),it=Rt=>{!w.current||at(Rt?a:-a)};return React.createElement("div",{...C,className:x.root},React.createElement(Grid,{container:!0,direction:"row",wrap:"nowrap",className:x.container,ref:w},p),React.createElement("div",{className:classNames(x.fade,x.fadeLeft,{[x.fadeHidden]:Y===0})}),React.createElement("div",{className:classNames(x.fade,x.fadeRight,{[x.fadeHidden]:W===0})}),Y>0&&React.createElement(IconButton,{title:"Scroll Left",onClick:()=>it(!1),className:classNames(x.button,x.buttonLeft,{})},React.createElement(ChevronLeftIcon,null)),W>0&&React.createElement(IconButton,{title:"Scroll Right",onClick:()=>it(!0),className:classNames(x.button,x.buttonRight,{})},React.createElement(ChevronRightIcon,null)))}const Pr=(0,s.Z)({alpha:{color:"#ffffff",fontFamily:"serif",fontWeight:"normal",fontStyle:"italic"},beta:{color:"#4d65cc",fontFamily:"serif",fontWeight:"normal",fontStyle:"italic"}},{name:"BackstageLifecycle"});function hr(n){const a=Pr(n),{shorthand:f,alpha:g}=n;return f?React.createElement("span",{className:a[g?"alpha":"beta"],style:{fontSize:"120%"}},g?React.createElement(React.Fragment,null,"\u03B1"):React.createElement(React.Fragment,null,"\u03B2")):React.createElement("span",{className:a[g?"alpha":"beta"]},g?"Alpha":"Beta")}const tn=(0,e.lazy)(()=>Promise.all([t.e(1110),t.e(8718)]).then(t.bind(t,98718)).then(n=>({default:n.RealLogViewer})));function Ir(n){const{Progress:a}=(0,l.useApp)().getComponents();return e.createElement(e.Suspense,{fallback:e.createElement(a,null)},e.createElement(tn,{...n}))}const _n=(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"}),Lr={code:({inline:n,className:a,children:f,...g})=>{const p=String(f).replace(/\n+$/,""),C=/language-(\w+)/.exec(a||"");return!n&&C?e.createElement(jt,{language:C[1],text:p}):e.createElement("code",{className:a,...g},f)}};function Or(n){const{content:a,dialect:f="gfm"}=n,g=_n();return React.createElement(ReactMarkdown,{remarkPlugins:f==="gfm"?[gfm]:[],className:g.markdown,children:a,components:Lr})}var xr=t(10179);const Dr=(0,s.Z)(n=>({root:{paddingLeft:n.spacing(3)}}),{name:"BackstageLoginRequestListItem"}),Xr=({request:n,busy:a,setBusy:f})=>{const g=Dr(),[p,C]=useState(),x=async()=>{f(!0);try{await n.trigger()}catch(Y){C(isError(Y)?Y.message:"An unspecified error occurred")}finally{f(!1)}},w=n.provider.icon;return React.createElement(ListItem,{button:!0,disabled:a,classes:{root:g.root}},React.createElement(ListItemAvatar,null,React.createElement(w,{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:x},"Log in"))};var Fr=null;const Br=(0,s.Z)(n=>({dialog:{paddingTop:n.spacing(1)},title:{minWidth:0},contentList:{padding:0},actionButtons:{padding:n.spacing(2,0)}}),{name:"OAuthRequestDialog"});function kr(n){const a=Br(),[f,g]=useState(!1),p=useApi(oauthRequestApiRef),C=useObservable(useMemo(()=>p.authRequest$(),[p]),[]),x=()=>{C.forEach(w=>w.reject())};return React.createElement(Dialog,{open:Boolean(C.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,C.map(w=>React.createElement(LoginRequestListItem,{key:w.provider.title,request:w,busy:f,setBusy:g})))),React.createElement(DialogActions,{classes:{root:a.actionButtons}},React.createElement(Button,{onClick:x},"Reject All")))}var br=t(15277),Mr=t.n(br),Bn=t(90736);const gr=(0,s.Z)({container:{overflow:"visible !important"}},{name:"BackstageOverflowTooltip"});function pr(n){var x;const[a,f]=(0,e.useState)(!1),g=(0,Bn.default)(),p=gr(),C=w=>{g()&&f(w)};return e.createElement(I.ZP,{title:(x=n.title)!=null?x:n.text||"",placement:n.placement,disableHoverListener:!a},e.createElement(Mr(),{text:n.text,line:n.line,onToggled:C,containerClassName:p.container}))}var yr=t(67358);function Nr(n){const[a,f]=(0,e.useState)(!1);return(0,e.useEffect)(()=>{const g=setTimeout(()=>f(!0),250);return()=>clearTimeout(g)},[]),a?e.createElement(yr.Z,{...n,"data-testid":"progress"}):e.createElement("div",{style:{display:"none"}})}var Ur=t(94339),Er=t(14503),U=t(24579),M=t(32552),$=t(15459),k=t(95544),ut=t(27597);const et=(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 ft(n){const{link:a,title:f,onClick:g}=n,p=et();return e.createElement("div",null,e.createElement(sn.Z,null),e.createElement(T,{to:a,onClick:g,underline:"none"},e.createElement(k.Z,{display:"flex",alignItems:"center",className:p.root},e.createElement(k.Z,{className:p.boxTitle,fontWeight:"fontWeightBold",m:1},e.createElement(vt.Z,null,e.createElement("strong",null,f))),e.createElement(ut.Z,{className:p.arrow}))))}const Ut=n=>{const{slackChannel:a}=n;if(a){if(typeof a=="string")return e.createElement(e.Fragment,null,"Please contact ",a," for help.");if(!a.href)return e.createElement(e.Fragment,null,"Please contact ",a.name," for help.")}else return null;return e.createElement(H,{to:a.href,variant:"contained"},a.name)},kt=class extends e.Component{constructor(a){super(a);this.state={error:void 0,errorInfo:void 0}}componentDidCatch(a,f){console.error(`ErrorBoundary, error: ${a}, info: ${f}`),this.setState({error:a,errorInfo:f})}render(){const{slackChannel:a,children:f}=this.props,{error:g}=this.state;return g?e.createElement(Ze,{title:"Something Went Wrong",error:g},e.createElement(Ut,{slackChannel:a})):f}},ne=(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"}),Qt=(0,$.Z)(n=>({root:{display:"inline-block",padding:n.spacing(8,8,0,0),float:"right"}}),{name:"BackstageInfoCardCardActionsTopRight"})(Er.Z),xt={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 wt(n){const{title:a,subheader:f,divider:g=!0,deepLink:p,slackChannel:C,errorBoundaryProps:x,variant:w,children:Y,headerStyle:W,headerProps:at,action:it,actionsClassName:Rt,actions:St,cardClassName:It,actionsTopRight:ie,className:en,noPadding:qe,titleTypographyProps:ze}=n,Xt=ne();let De={},Pe={};w&&w.split(/[\s]+/g).forEach(fn=>{De={...De,...xt.card[fn]},Pe={...Pe,...xt.cardContent[fn]}});const _e=x||(C?{slackChannel:C}:{});return e.createElement(Ur.Z,{style:De,className:en},e.createElement(kt,{..._e},a&&e.createElement(M.Z,{classes:{root:Xt.header,title:Xt.headerTitle,subheader:Xt.headerSubheader,avatar:Xt.headerAvatar,action:Xt.headerAction,content:Xt.headerContent},title:a,subheader:f,action:it,style:{...W},titleTypographyProps:ze,...at}),ie&&e.createElement(Qt,null,ie),g&&e.createElement(sn.Z,null),e.createElement(U.Z,{className:dt()(It,{[Xt.noPadding]:qe}),style:Pe},Y),St&&e.createElement(Er.Z,{className:Rt},St),p&&e.createElement(ft,{...p})))}var Se=t(94137);const Oe=(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"}),be={fractional:!0,inverse:!1,unit:"%",max:100},ke=({palette:n,value:a,inverse:f,max:g})=>{if(isNaN(a))return"#ddd";const p=g||be.max,C=f?p-a:a;return C<p/3?n.status.error:C<p*(2/3)?n.status.warning:n.status.ok};function Ke(n){const{getColor:a=ke}=n,f=Oe(n),{palette:g}=useTheme(),{value:p,fractional:C,inverse:x,unit:w,max:Y}={...be,...n},W=C?Math.round(p*Y):p,at=Y!==100?Math.round(p):W;return React.createElement("div",{className:f.root},React.createElement(Circle,{strokeLinecap:"butt",percent:W,strokeWidth:12,trailWidth:12,strokeColor:a({palette:g,value:at,inverse:x,max:Y}),className:f.circle}),React.createElement("div",{className:f.overlay},isNaN(p)?"N/A":`${at}${w}`))}const Je=(0,s.Z)({root:{height:"100%",width:250}},{name:"BackstageGaugeCard"});function ln(n){const a=Je(n),{title:f,subheader:g,progress:p,inverse:C,deepLink:x,variant:w,getColor:Y}=n,W={inverse:C,getColor:Y,value:p};return React.createElement("div",{className:a.root},React.createElement(InfoCard,{title:f,subheader:g,deepLink:x,variant:w},React.createElement(Gauge,{...W})))}function $e(n){const{value:a,getColor:f=getProgressColor}=n,{palette:g}=useTheme();if(isNaN(a))return null;let p=Math.round(a*100*100)/100;p>100&&(p=100);const C=f({palette:g,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:C})))}var pn=t(21324),Ln=t(7089),we=t(1292),Ge=t(42494),bn=t(74603),Hn=t(12231),qr=t(73698),_r=t(72379);const ta=(0,s.Z)(()=>(0,u.Z)({icon:{position:"absolute",right:"4px",pointerEvents:"none"}}),{name:"BackstageClosedDropdown"});var Sa=()=>{const n=ta();return e.createElement(_r.Z,{className:n.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("path",{d:"M7.5 8L6 9.5L12.0703 15.5703L18.1406 9.5L16.6406 8L12.0703 12.5703L7.5 8Z",fill:"#616161"}))};const ea=(0,s.Z)(()=>(0,u.Z)({icon:{position:"absolute",right:"4px",pointerEvents:"none"}}),{name:"BackstageOpenedDropdown"});var na=()=>{const n=ea();return e.createElement(_r.Z,{className:n.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("path",{d:"M16.5 16L18 14.5L11.9297 8.42969L5.85938 14.5L7.35938 16L11.9297 11.4297L16.5 16Z",fill:"#616161"}))};const ra=(0,$.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"})(bn.Z),aa=(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 $r(n){const{multiple:a,items:f,label:g,placeholder:p,selected:C,onChange:x,triggerReset:w,native:Y=!1,disabled:W=!1}=n,at=aa(),[it,Rt]=(0,e.useState)(C||(a?[]:"")),[St,It]=(0,e.useState)(!1);(0,e.useEffect)(()=>{Rt(a?[]:"")},[w,a]),(0,e.useEffect)(()=>{C!==void 0&&Rt(C)},[C]);const ie=Xt=>{Rt(Xt.target.value),x(Xt.target.value)},en=Xt=>{if(W){Xt.preventDefault();return}It(De=>a&&!(Xt.target instanceof HTMLElement)?!0:!De)},qe=()=>{It(!1)},ze=Xt=>()=>{const De=it.filter(Pe=>Pe!==Xt);Rt(De),x(De)};return e.createElement("div",{className:at.root},e.createElement(vt.Z,{variant:"button"},g),e.createElement(we.Z,{onClickAway:qe},e.createElement(Ge.Z,{className:at.formControl},e.createElement(qr.Z,{value:it,native:Y,disabled:W,"data-testid":"select",displayEmpty:!0,multiple:a,onChange:ie,onClick:en,open:St,input:e.createElement(ra,null),renderValue:Xt=>{var De;return a&&it.length!==0?e.createElement("div",{className:at.chips},Xt.map(Pe=>{var _e,Kn;return e.createElement(Ln.Z,{key:(_e=f.find(fn=>fn.value===Pe))==null?void 0:_e.value,label:(Kn=f.find(fn=>fn.value===Pe))==null?void 0:Kn.label,clickable:!0,onDelete:ze(Pe),className:at.chip})})):e.createElement(vt.Z,null,it.length===0?p||"":(De=f.find(Pe=>Pe.value===Xt))==null?void 0:De.label)},IconComponent:()=>St?e.createElement(na,null):e.createElement(Sa,null),MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},getContentAnchorEl:null}},p&&!a&&e.createElement(Hn.Z,{value:[]},p),Y?f&&f.map(Xt=>e.createElement("option",{value:Xt.value,key:Xt.value},Xt.label)):f&&f.map(Xt=>e.createElement(Hn.Z,{key:Xt.value,value:Xt.value},a&&e.createElement(pn.Z,{color:"primary",checked:it.includes(Xt.value)||!1,className:at.checkbox}),Xt.label))))))}const tr=()=>{},oa=e.createContext({stepperLength:0,stepIndex:0,setStepIndex:tr,stepHistory:[],setStepHistory:tr,onStepChange:tr});function Ta(n){const{children:a,elevated:f,onStepChange:g,activeStep:p=0}=n,[C,x]=useState(p),[w,Y]=useState([0]);useEffect(()=>{x(p)},[p]);const W=[];let at;return Children.forEach(a,it=>{isValidElement(it)&&(it.props.end?at=it:W.push(it))}),React.createElement(React.Fragment,null,React.createElement(oa.Provider,{value:{stepIndex:C,setStepIndex:x,stepHistory:w,setStepHistory:Y,onStepChange:g,stepperLength:Children.count(a)}},React.createElement(MuiStepper,{activeStep:C,orientation:"vertical",elevation:f?2:0},W)),C>=Children.count(a)-1&&at)}const sa=(0,s.Z)(n=>({root:{marginTop:n.spacing(3),"& button":{marginRight:n.spacing(1)}}}),{name:"BackstageSimpleStepperFooter"}),Pa=({text:n,handleClick:a})=>React.createElement(Button,{onClick:a},n||"Reset"),ia=({text:n,handleClick:a,disabled:f,last:g,stepIndex:p})=>React.createElement(Button,{variant:"contained",color:"primary",disabled:f,"data-testid":`nextButton-${p}`,onClick:a},n||(g?"Finish":"Next")),A=({text:n,handleClick:a,disabled:f,stepIndex:g})=>React.createElement(Button,{onClick:a,"data-testid":`backButton-${g}`,disabled:f},n||"Back"),L=({actions:n={},children:a})=>{const f=sa(),{stepperLength:g,stepIndex:p,setStepIndex:C,stepHistory:x,setStepHistory:w,onStepChange:Y}=useContext(VerticalStepperContext),W=(St,It)=>{It&&It(),Y&&Y(p,St),C(St)},at=()=>{const St=n.nextStep?n.nextStep(p,g-1):p+1;W(St,n.onNext),w([...x,St])},it=()=>{x.pop(),W(x[x.length-1],n.onBack),w([...x])},Rt=()=>{W(0,n.onRestart),w([0])};return React.createElement("div",{className:f.root},[void 0,!0].includes(n.showBack)&&p!==0&&React.createElement(A,{text:n.backText,handleClick:it,disabled:p===0,stepIndex:p}),[void 0,!0].includes(n.showNext)&&React.createElement(ia,{text:n.nextText,handleClick:at,disabled:!!g&&p>=g||!!n.canNext&&!n.canNext(),stepIndex:p}),n.showRestart&&p!==0&&React.createElement(Pa,{text:n.restartText,handleClick:Rt,stepIndex:p}),a)},z=(0,s.Z)(n=>({end:{padding:n.spacing(3)}}),{name:"SimpleStepperStep"});function rt(n){const{title:a,children:f,end:g,actions:p,...C}=n,x=z();return g?React.createElement("div",{className:x.end},React.createElement(Typography,{variant:"h6"},a),f,React.createElement(SimpleStepperFooter,{actions:{...p||{},showNext:!1}})):React.createElement(MuiStep,{...C},React.createElement(StepLabel,null,React.createElement(Typography,{variant:"h6"},a)),React.createElement(StepContent,null,f,React.createElement(SimpleStepperFooter,{actions:p})))}const yt=(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 Mt(n){const a=yt(n);return React.createElement("span",{className:classNames(a.status,a.ok),"aria-label":"Status ok","aria-hidden":"true",...n})}function Pt(n){const a=yt(n);return React.createElement("span",{className:classNames(a.status,a.warning),"aria-label":"Status warning","aria-hidden":"true",...n})}function Gt(n){const a=yt(n);return React.createElement("span",{className:classNames(a.status,a.error),"aria-label":"Status error","aria-hidden":"true",...n})}function $t(n){const a=yt(n);return React.createElement("span",{className:classNames(a.status,a.pending),"aria-label":"Status pending","aria-hidden":"true",...n})}function ue(n){const a=yt(n);return React.createElement("span",{className:classNames(a.status,a.running),"aria-label":"Status running","aria-hidden":"true",...n})}function xe(n){const a=yt(n);return React.createElement("span",{className:classNames(a.status,a.aborted),"aria-label":"Status aborted","aria-hidden":"true",...n})}var Ce=t(74600),Te=t(15584);const cn=n=>(0,u.Z)({root:{fontWeight:"bolder",whiteSpace:"nowrap",paddingRight:n.spacing(4),border:"0",verticalAlign:"top"}}),un={root:{border:"0",verticalAlign:"top"}},Mn=n=>(0,u.Z)({root:{listStyle:"none",margin:n.spacing(0,0,-1,0),padding:"0"}}),er=n=>(0,u.Z)({root:{padding:n.spacing(0,0,1,0)},random:{}}),jn=(0,$.Z)(cn,{name:"BackstageMetadataTableTitleCell"})(Te.Z),Vn=(0,$.Z)(un,{name:"BackstageMetadataTableCell"})(Te.Z),la=({dense:n,children:a})=>React.createElement(Table,{size:n?"small":"medium"},React.createElement(TableBody,null,a)),Ia=({title:n,children:a,...f})=>React.createElement(TableRow,null,n&&React.createElement(jn,null,n),React.createElement(Vn,{colSpan:n?1:2,...f},a)),xn=(0,$.Z)(Mn,{name:"BackstageMetadataTableList"})(({classes:n,children:a})=>e.createElement("ul",{className:n.root},a)),Si=(0,$.Z)(er,{name:"BackstageMetadataTableListItem"})(({classes:n,children:a})=>e.createElement("li",{className:n.root},a)),La=(0,u.Z)({root:{margin:"0 0",listStyleType:"none"}}),lo=n=>(0,u.Z)({root:{...La.root,paddingLeft:n.spacing(1)}}),Oa=(0,$.Z)(La,{name:"BackstageStructuredMetadataTableList"})(({classes:n,children:a})=>e.createElement(xn,{classes:n},a)),xa=(0,$.Z)(lo,{name:"BackstageStructuredMetadataTableNestedList"})(({classes:n,children:a})=>e.createElement(xn,{classes:n},a));function co(n,a){const f=n.map((g,p)=>React.createElement(MetadataListItem,{key:p},ca(g)));return a?React.createElement(xa,null,f):React.createElement(Oa,null,f)}function uo(n,a,f){const g=Object.keys(n).map(p=>{const C=ca(n[p],!0),x=f&&f.titleFormat?f.titleFormat(p):startCase(p);return React.createElement(MetadataListItem,{key:p},`${x}: `,C)});return a?React.createElement(xa,null,g):React.createElement(Oa,null,g)}function ca(n,a,f){return React.isValidElement(n)?React.createElement(Fragment,null,n):typeof n=="object"&&!Array.isArray(n)?uo(n,a,f):Array.isArray(n)?co(n,f):typeof n=="boolean"?React.createElement(Fragment,null,n?"\u2705":"\u274C"):React.createElement(Fragment,null,n)}const fo=({value:n,options:a})=>React.createElement(Fragment,null,ca(n,a)),mo=({title:n,value:a,options:f})=>React.createElement(MetadataTableItem,{title:f&&f.titleFormat?f.titleFormat(n):startCase(n)},React.createElement(fo,{value:a,options:f}));function ho(n,a){return Object.keys(n).map(f=>React.createElement(mo,{key:f,title:f,value:n[f],options:a}))}function Ci(n){const{metadata:a,dense:f=!0,options:g}=n,p=ho(a,g||{});return React.createElement(MetadataTable,{dense:f},p)}var go=t(49429),po=t(86136),Da=t(79784),Ar=t(76635),yo=t(19126),Zr=t.n(yo),Eo=t(48760);function Ao(n){return Zr().stringify(n,{strictNullHandling:!0})}function Fa(n){return Zr().parse(n,{ignoreQueryPrefix:!0,strictNullHandling:!0})}function Ba(n,a){return Fa(n)[a]}function vo(n,a,f){const g={...Fa(n),[a]:f};return Ao(g)}function Ro(n,a=250){const[f,g]=(0,i.lr)(),p=f.toString(),[C,x]=(0,e.useState)(Ba(p,n));return(0,e.useEffect)(()=>{const w=Ba(p,n);x(Y=>(0,Ar.isEqual)(w,Y)?Y:w)},[p,x,n]),(0,Eo.Z)(()=>{const w=vo(p,n,C);p!==w&&g(w,{replace:!0})},a,[g,C,p,n]),[C,x]}const So={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 ba(){const a=(0,l.useApi)(l.configApiRef).getOptionalConfig("app.support");return a?{url:a.getString("url"),items:a.getConfigArray("items").flatMap(f=>{var g;return{title:f.getString("title"),icon:f.getOptionalString("icon"),links:((g=f.getOptionalConfigArray("links"))!=null?g:[]).flatMap(p=>({url:p.getString("url"),title:p.getString("title")}))}})}:So}var Co=t(80079);function vn(n,a){const g=(0,l.useApp)().getSystemIcon(n);return g?e.createElement(g,{...a}):e.createElement(Co.Z,{...a})}function Ti(n){return vn("brokenImage",n)}function Pi(n){return vn("catalog",n)}function Ii(n){return vn("chat",n)}function Li(n){return vn("dashboard",n)}function Oi(n){return vn("docs",n)}function xi(n){return vn("email",n)}function Di(n){return vn("github",n)}function Fi(n){return vn("group",n)}function wr(n){return vn("help",n)}function Bi(n){return vn("user",n)}function bi(n){return vn("warning",n)}const To=(0,s.Z)({popoverList:{minWidth:260,maxWidth:400}},{name:"BackstageSupportButton"}),Po=({icon:n})=>{var g;const a=(0,l.useApp)(),f=n&&(g=a.getSystemIcon(n))!=null?g:wr;return e.createElement(f,null)},Io=({link:n})=>{var a;return e.createElement(T,{to:n.url},(a=n.title)!=null?a:n.url)},Lo=({item:n})=>{var a;return e.createElement(bt.Z,null,e.createElement(po.Z,null,e.createElement(Po,{icon:n.icon})),e.createElement(Ee.Z,{primary:n.title,secondary:(a=n.links)==null?void 0:a.reduce((f,g,p)=>[...f,p>0&&e.createElement("br",{key:p}),e.createElement(Io,{link:g,key:g.url})],[])}))};function Oo(n){const{title:a,children:f}=n,{items:g}=ba(),[p,C]=(0,e.useState)(!1),[x,w]=(0,e.useState)(null),Y=To(),W=(0,Ot.Z)(Rt=>Rt.breakpoints.down("sm")),at=Rt=>{w(Rt.currentTarget),C(!0)},it=()=>{C(!1)};return e.createElement(e.Fragment,null,e.createElement(k.Z,{display:"flex",ml:1},W?e.createElement(b.Z,{color:"primary",size:"small",onClick:at,"data-testid":"support-button"},e.createElement(wr,null)):e.createElement(m.Z,{"data-testid":"support-button",color:"primary",onClick:at,startIcon:e.createElement(wr,null)},"Support")),e.createElement(Da.ZP,{"data-testid":"support-button-popover",open:p,anchorEl:x,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},onClose:it},e.createElement(Bt.Z,{className:Y.popoverList},a&&e.createElement(bt.Z,{alignItems:"flex-start"},e.createElement(vt.Z,{variant:"subtitle1"},a)),e.Children.map(f,(Rt,St)=>e.createElement(bt.Z,{alignItems:"flex-start",key:`child-${St}`},Rt)),g&&g.map((Rt,St)=>e.createElement(Lo,{item:Rt,key:`item-${St}`}))),e.createElement(go.Z,null,e.createElement(m.Z,{color:"primary",onClick:it},"Close"))))}var ua=t(18671),Dn=t(10289);const xo=(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 Ma(n){const{className:a,stretch:f,noPadding:g,children:p,...C}=n,x=xo();return e.createElement("article",{...C,className:dt()(x.root,a,{[x.stretch]:f,[x.noPadding]:g})},p)}var Do=t(6487),Fo=t(99152);const Bo=(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 Na(n){const{tabs:a,onChange:f,selectedIndex:g}=n,[p,C]=(0,e.useState)(g!=null?g:0),x=Bo(),w=(Y,W)=>{g===void 0&&C(W),f&&f(W)};return(0,e.useEffect)(()=>{g!==void 0&&C(g)},[g]),e.createElement("div",{className:x.tabsWrapper},e.createElement(Fo.Z,{selectionFollowsFocus:!0,indicatorColor:"primary",textColor:"inherit",variant:"scrollable",scrollButtons:"auto","aria-label":"scrollable auto tabs example",onChange:w,value:p},a.map((Y,W)=>e.createElement(Do.Z,{...Y.tabProps,"data-testid":`header-tab-${W}`,label:Y.label,key:Y.id,value:W,className:x.defaultTab,classes:{selected:x.selected,root:x.tabRoot}}))))}function bo(n){var w,Y,W;const a=(0,Dn.UO)(),g=n.map(({path:at,children:it})=>({caseSensitive:!1,path:`${at}/*`,element:it})).sort((at,it)=>it.path.replace(/\/\*$/,"").localeCompare(at.path.replace(/\/\*$/,""))),p=(w=(0,Dn.V$)(g))!=null?w:n[0].children,[C]=(Y=(0,Dn.fp)(g,`/${a["*"]}`))!=null?Y:[],x=C?n.findIndex(at=>`${at.path}/*`===C.route.path):0;return{index:x===-1?0:x,element:p,route:(W=n[x])!=null?W:n[0]}}function Ua(n){const{routes:a}=n,f=(0,Dn.s0)(),{index:g,route:p,element:C}=bo(a),x=(0,e.useMemo)(()=>a.map(Y=>({id:Y.path,label:Y.title,tabProps:Y.tabProps})),[a]),w=Y=>f(a[Y].path.replace(/\/\*$/,"").replace(/^\//,""));return e.createElement(e.Fragment,null,e.createElement(Na,{tabs:x,selectedIndex:g,onChange:w}),e.createElement(Ma,null,e.createElement(ua.q,{title:p.title}),C))}const da=()=>null;(0,l.attachComponentData)(da,"core.gatherMountPoints",!0);function $a(n){const a=e.createElement(da,{path:"",title:""},e.createElement("div",null)).type;return e.Children.toArray(n).flatMap(f=>{if(!(0,e.isValidElement)(f))return[];if(f.type===e.Fragment)return $a(f.props.children);if(f.type!==a)throw new Error("Child of TabbedLayout must be an TabbedLayout.Route");const{path:g,title:p,children:C,tabProps:x}=f.props;return[{path:g,title:p,children:C,tabProps:x}]})}function Mo(n){const a=$a(n.children);return e.createElement(Ua,{routes:a})}Mo.Route=da;const No=(0,s.Z)(n=>({value:{marginBottom:"6px"},subvalue:{color:n.palette.textSubtle,fontWeight:"normal"}}),{name:"BackstageSubvalueCell"});function Uo(n){const{value:a,subvalue:f}=n,g=No();return e.createElement(e.Fragment,null,e.createElement("div",{className:g.value},a),e.createElement("div",{className:g.subvalue},f))}var $o=t(21070),Zo=t(90324),wo=t(98281),Wo=t(48049),Za=t(51209),wa=t(33375),zo=t(44233),Ho=t(27604),fa=t(36444),jo=t(37971),Vo=t(59709),Go=t(17373),Ko=t(3702),Jo=t(93111),Wr=t(67222);const Yo=(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"}),Qo=n=>{var Y;const a=Yo(),{onChangeFilters:f}=n,[g,p]=(0,e.useState)({...n.selectedFilters}),[C,x]=(0,e.useState)(!1),w=()=>{p({}),x(W=>!W)};return(0,e.useEffect)(()=>{f(g)},[g,f]),e.createElement("div",{className:a.root},e.createElement("div",{className:a.header},e.createElement("div",{className:a.value},"Filters"),e.createElement(m.Z,{color:"primary",onClick:w},"Clear all")),e.createElement("div",{className:a.filters},((Y=n.filters)==null?void 0:Y.length)&&n.filters.map(W=>e.createElement($r,{triggerReset:C,key:W.element.label,...W.element,selected:g[W.element.label],onChange:at=>p({...g,[W.element.label]:at})}))))},Xo={Add:(0,e.forwardRef)((n,a)=>e.createElement($o.Z,{...n,ref:a})),Check:(0,e.forwardRef)((n,a)=>e.createElement(wo.Z,{...n,ref:a})),Clear:(0,e.forwardRef)((n,a)=>e.createElement(wa.Z,{...n,ref:a})),Delete:(0,e.forwardRef)((n,a)=>e.createElement(zo.Z,{...n,ref:a})),DetailPanel:(0,e.forwardRef)((n,a)=>e.createElement(Za.Z,{...n,ref:a})),Edit:(0,e.forwardRef)((n,a)=>e.createElement(Ho.Z,{...n,ref:a})),Export:(0,e.forwardRef)((n,a)=>e.createElement(Ko.Z,{...n,ref:a})),Filter:(0,e.forwardRef)((n,a)=>e.createElement(fa.Z,{...n,ref:a})),FirstPage:(0,e.forwardRef)((n,a)=>e.createElement(jo.Z,{...n,ref:a})),LastPage:(0,e.forwardRef)((n,a)=>e.createElement(Vo.Z,{...n,ref:a})),NextPage:(0,e.forwardRef)((n,a)=>e.createElement(Za.Z,{...n,ref:a})),PreviousPage:(0,e.forwardRef)((n,a)=>e.createElement(Wo.Z,{...n,ref:a})),ResetSearch:(0,e.forwardRef)((n,a)=>e.createElement(wa.Z,{...n,ref:a})),Search:(0,e.forwardRef)((n,a)=>e.createElement(fa.Z,{...n,ref:a})),SortArrow:(0,e.forwardRef)((n,a)=>e.createElement(Zo.Z,{...n,ref:a})),ThirdStateCheck:(0,e.forwardRef)((n,a)=>e.createElement(Go.Z,{...n,ref:a})),ViewColumn:(0,e.forwardRef)((n,a)=>e.createElement(Jo.Z,{...n,ref:a}))};function Wa(n,a){const f=a.split(".");let g=n[f[0]];for(let p=1;p<f.length;++p){if(g===void 0)return g;const C=f[p];g=g[C]}return g}const ko=(0,$.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"})(Wr.W$),za=(0,$.Z)(n=>({root:{padding:n.spacing(3,0,2.5,2.5)},title:{"& > h6":{fontWeight:"bold"}},searchField:{paddingRight:n.spacing(2)}}),{name:"BackstageTableToolbar"})(Wr.UW),qo=(0,s.Z)(()=>({root:{display:"flex",alignItems:"center",justifyContent:"space-between"},title:{fontWeight:"bold",fontSize:18,whiteSpace:"nowrap"}}),{name:"BackstageTableFiltersContainer"}),_o=(0,s.Z)(()=>({root:{display:"flex",alignItems:"start"}}),{name:"BackstageTable"});function ts(n,a){return n.map(f=>{const g={};let p=f.cellStyle||{};if(f.highlight)if(g.color=a.palette.textContrast,typeof p=="object")p.fontWeight=a.typography.fontWeightBold;else{const C=p;p=(x,w,Y)=>({...C(x,w,Y),fontWeight:a.typography.fontWeightBold})}return{...f,headerStyle:g,cellStyle:p}})}function es(n,a){return(0,Ar.transform)(n,(f,g,p)=>{(0,Ar.isEqual)(g,a[p])||(f[p]=g)})}const Ha={search:"",filtersOpen:!1,filters:{}};function ns(n){const{toolbarRef:a,setSearch:f,hasFilters:g,selectedFiltersLength:p,toggleFilters:C}=n,x=qo(),w=(0,e.useCallback)(Y=>{n.onSearchChanged(Y),f(Y)},[n,f]);return g?e.createElement("div",{className:x.root},e.createElement("div",{className:x.root},e.createElement(b.Z,{onClick:C,"aria-label":"filter list"},e.createElement(fa.Z,null)),e.createElement(vt.Z,{className:x.title},"Filters (",p,")")),e.createElement(za,{...n,ref:a,onSearchChanged:w})):e.createElement(za,{...n,ref:a,onSearchChanged:w})}function rs(n){const{data:a,columns:f,options:g,title:p,subtitle:C,filters:x,initialState:w,emptyContent:Y,onStateChange:W,...at}=n,it=_o(),Rt=(0,D.Z)(),St={...Ha,...w},[It,ie]=(0,e.useState)(St.filtersOpen),en=(0,e.useCallback)(()=>ie(nn=>!nn),[ie]),[qe,ze]=(0,e.useState)(0),[Xt,De]=(0,e.useState)(a),[Pe,_e]=(0,e.useState)(St.filters),Kn=ts(f,Rt),[fn,Kr]=(0,e.useState)(St.search);(0,e.useEffect)(()=>{if(W){const nn=es({search:fn,filtersOpen:It,filters:Pe},Ha);W(nn)}},[fn,It,Pe,W]);const Fe={headerStyle:{textTransform:"uppercase"}},Nn=(0,e.useCallback)(nn=>{var mn;return(mn=f.find(yn=>yn.title===nn))==null?void 0:mn.field},[f]);(0,e.useEffect)(()=>{if(typeof a=="function")return;if(!Pe){De(a);return}const nn=Object.values(Pe);if(a&&nn.flat().length){const mn=a.filter(yn=>!!Object.entries(Pe).filter(([,Yn])=>!!Yn.length).every(([Yn,Ye])=>{const Qe=Wa(yn,Nn(Yn));return Array.isArray(Qe)&&Array.isArray(Ye)?Qe.some(rr=>Ye.includes(rr)):Array.isArray(Qe)?Qe.includes(Ye):Array.isArray(Ye)?Ye.includes(Qe):Qe===Ye}));De(mn)}else De(a);ze(nn.flat().length)},[a,Pe,Nn]);const Ea=(nn,mn)=>{const yn=Ye=>{const Qe=new Set,rr=Qn=>{Qn!=null&&Qe.add(Qn)};return mn&&mn.forEach(Qn=>{const ar=Wa(Qn,Nn(Ye));Array.isArray(ar)?ar.forEach(rr):rr(ar)}),Qe},Yn=Ye=>({placeholder:"All results",label:Ye.column,multiple:Ye.type==="multiple-select",items:[...yn(Ye.column)].sort().map(Qe=>({label:Qe,value:Qe}))});return nn.map(Ye=>({type:Ye.type,element:Yn(Ye)}))},Jn=!!(x==null?void 0:x.length),Aa=(0,e.useCallback)(nn=>e.createElement(ns,{setSearch:Kr,hasFilters:Jn,selectedFiltersLength:qe,toggleFilters:en,...nn}),[en,Jn,qe,Kr]),Jr=typeof a!="function"&&a.length===0,Yr=f.length,va=(0,e.useCallback)(nn=>Y&&Jr?e.createElement("tbody",null,e.createElement("tr",null,e.createElement("td",{colSpan:Yr},Y))):e.createElement(Wr.os,{...nn}),[Jr,Y,Yr]);return e.createElement("div",{className:it.root},It&&a&&typeof a!="function"&&(x==null?void 0:x.length)&&e.createElement(Qo,{filters:Ea(x,a),selectedFilters:Pe,onChangeFilters:_e}),e.createElement(Wr.ZP,{components:{Header:ko,Toolbar:Aa,Body:va},options:{...Fe,...g},columns:Kn,icons:Xo,title:e.createElement(e.Fragment,null,e.createElement(vt.Z,{variant:"h5",component:"h3"},p),C&&e.createElement(vt.Z,{color:"textSecondary",variant:"body1"},C)),data:typeof a=="function"?a:Xt,style:{width:"100%"},localization:{toolbar:{searchPlaceholder:"Filter"}},...at}))}const Mi=n=>{const{children:a,value:f,index:g,...p}=n;return React.createElement("div",{role:"tabpanel",hidden:f!==g,"aria-labelledby":`scrollable-auto-tab-${g}`,...p},f===g&&React.createElement(Box,{p:3},a))},as=(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"}),Ni=n=>{const a=as(n),{ariaLabel:f,onClick:g}=n;return React.createElement(IconButton,{onClick:g,className:a.root,size:"small",disableRipple:!0,disableFocusRipple:!0,"aria-label":f},n.children)},os=(n,a)=>a?n?"20px":"0":"40px",ss=(0,s.Z)(n=>({root:{textTransform:"none",height:"64px",fontWeight:n.typography.fontWeightBold,fontSize:n.typography.pxToRem(13),color:n.palette.textSubtle,marginLeft:a=>os(a.isFirstNav,a.isFirstIndex),width:"130px",minWidth:"130px","&:hover":{outline:"none",backgroundColor:"transparent",color:n.palette.textSubtle}}})),Ui=n=>{const a=ss(n),{isFirstNav:f,isFirstIndex:g,...p}=n;return React.createElement(Tab,{className:a.root,disableRipple:!0,...p})},is=(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"}),$i=n=>{const a=is(n);return React.createElement(Tabs,{classes:a,...n,TabIndicatorProps:{children:React.createElement("span",null)}})},ls=(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 Zi(n){const{tabs:a}=n,f=ls(),[g,p]=useState([0,0]),[C,x]=useState(0),[w,Y]=useState(0),[W,at]=useState([[]]),it=useRef(),{width:Rt}=useWindowSize(),St=(ze,Xt)=>{p([C,Xt])},It=()=>{x(C-1)},ie=()=>{x(C+1)},en=()=>C+1<W.length;useEffect(()=>{const ze=20,Xt=C===0?1:2,De=it.current.offsetWidth-ze-Xt*30,Pe=g[0]*w+g[1],_e=Math.floor(De/170);Y(_e),at(chunkArray(a,_e)),p([Math.floor(Pe/_e),Pe%_e])},[Rt,a]);const qe=C===g[0]?g[1]:!1;return React.createElement("div",{className:f.root},React.createElement(AppBar,{ref:it,className:f.appbar,position:"static"},React.createElement("div",null,React.createElement(StyledTabs,{value:qe,onChange:St,selectionFollowsFocus:!0},C!==0&&React.createElement(StyledIcon,{onClick:It,ariaLabel:"navigate-before"},React.createElement(NavigateBeforeIcon,null)),W[C].map((ze,Xt)=>React.createElement(StyledTab,{value:Xt,isFirstIndex:Xt===0,isFirstNav:C===0,key:Xt,icon:ze.icon||void 0,label:ze.label||void 0})),en()&&React.createElement(StyledIcon,{isNext:!0,onClick:ie,ariaLabel:"navigate-next"},React.createElement(NavigateNextIcon,null))))),qe!==!1?W[C].map((ze,Xt)=>React.createElement(TabPanel,{key:Xt,value:Xt,index:qe},ze.content)):React.createElement(TabPanel,{key:"panel_outside_chunked_array",value:g[1],index:g[1]},W[g[0]][g[1]].content))}var wi=t(44311);function cs(n,a){const f=n[n.length-1];if(!!f)return f>=.9?a.palette.status.ok:f>=.5?a.palette.status.warning:a.palette.status.error}function Wi(n){var f;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:(f=n.color)!=null?f:cs(n.data,a)})):null}const us=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"}),ds=({title:n="Unknown page",className:a})=>e.createElement(vt.Z,{variant:"h4",component:"h2",className:a,"data-testid":"header-title"},n);function fs(n){const{description:a,title:f,titleComponent:g=void 0,children:p,textAlign:C="left"}=n,x=us({textAlign:C})(),w=g||e.createElement(ds,{title:f,className:x.title});return e.createElement(e.Fragment,null,e.createElement(ua.q,{title:f}),e.createElement("div",{className:x.container},e.createElement("div",{className:x.leftItemsBox},w,a&&e.createElement(vt.Z,{className:x.description,variant:"body2"},a)),e.createElement("div",{className:x.rightItemsBox},p)))}var ms=t(29788);const hs=(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"}),gs=()=>{const n=hs();return e.createElement("img",{src:ms,className:n.micDrop,alt:"Girl dropping mic from her hands"})},ps=(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 ys(n){const{status:a,statusMessage:f,additionalInfo:g}=n,p=ps(),C=(0,Dn.s0)(),x=ba();return e.createElement(Vt.Z,{container:!0,spacing:0,className:p.container},e.createElement(gs,null),e.createElement(Vt.Z,{item:!0,xs:12,sm:8,md:4},e.createElement(vt.Z,{"data-testid":"error",variant:"body1",className:p.subtitle},"ERROR ",a,": ",f),e.createElement(vt.Z,{variant:"body1",className:p.subtitle},g),e.createElement(vt.Z,{variant:"h2",className:p.title},"Looks like someone dropped the mic!"),e.createElement(vt.Z,{variant:"h6"},e.createElement(T,{to:"#","data-testid":"go-back-link",onClick:()=>C(-1)},"Go back"),"... or please ",e.createElement(T,{to:x.url},"contact support")," if you think this is a bug.")))}var Es=t(16173);const As=(0,$.Z)({root:{textDecoration:"underline",cursor:"pointer"}},{name:"BackstageBreadcrumbsClickableText"})(vt.Z),ma=(0,$.Z)({root:{textDecoration:"underline",color:"inherit"}},{name:"BackstageBreadcrumbsStyledBox"})(k.Z);function vs(n){const{children:a,...f}=n,[g,p]=e.useState(null),C=e.Children.toArray(a),[x,w,...Y]=C,W=Y.length?Y.pop():C[C.length-1],at=C.length>3,it=It=>{p(It.currentTarget)},Rt=()=>{p(null)},St=Boolean(g);return e.createElement(e.Fragment,null,e.createElement(Es.Z,{"aria-label":"breadcrumb",...f},C.length>1&&e.createElement(ma,{clone:!0},x),C.length>2&&e.createElement(ma,{clone:!0},w),at&&e.createElement(As,{onClick:it},"..."),e.createElement(k.Z,{style:{fontStyle:"italic"}},W)),e.createElement(Da.ZP,{open:St,anchorEl:g,onClose:Rt,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}},e.createElement(Bt.Z,null,Y.map((It,ie)=>e.createElement(bt.Z,{key:ie,button:!0},e.createElement(ma,{clone:!0},It))))))}const Rs=(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"}),Ss=({type:n,typeLink:a,classes:f,pageTitle:g})=>n?a?e.createElement(vs,{className:f.breadcrumb},e.createElement(T,{to:a},n),e.createElement(vt.Z,null,g)):e.createElement(vt.Z,{className:f.type},n):null,Cs=({pageTitle:n,classes:a,tooltip:f})=>{const g=e.createElement(vt.Z,{className:a.title,variant:"h1"},n);return f?e.createElement(I.ZP,{title:f,placement:"top-start"},g):g},Ts=({classes:n,subtitle:a})=>a?typeof a!="string"?e.createElement(e.Fragment,null,a):e.createElement(vt.Z,{className:n.subtitle,variant:"subtitle2",component:"span"},a):null;function ja(n){const{children:a,pageTitleOverride:f,style:g,subtitle:p,title:C,tooltip:x,type:w,typeLink:Y}=n,W=Rs(),it=(0,l.useApi)(l.configApiRef).getOptionalString("app.title")||"Backstage",Rt=f||C,St=C||f,It=`${Rt} | %s | ${it}`,ie=`${Rt} | ${it}`;return e.createElement(e.Fragment,null,e.createElement(ua.q,{titleTemplate:It,defaultTitle:ie}),e.createElement("header",{style:g,className:W.header},e.createElement(k.Z,{className:W.leftItemsBox},e.createElement(Ss,{classes:W,type:w,typeLink:Y,pageTitle:St}),e.createElement(Cs,{classes:W,pageTitle:St,tooltip:x}),e.createElement(Ts,{classes:W,subtitle:p})),e.createElement(Vt.Z,{container:!0,className:W.rightItemsBox,spacing:4},a)))}const Ps=(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"}),Is=({value:n,className:a})=>e.createElement(vt.Z,{className:a},n);function Ls(n){const{label:a,value:f,url:g}=n,p=Ps(),C=e.createElement(Is,{className:p.value,value:f||"<Unknown>"});return e.createElement(Vt.Z,{item:!0},e.createElement("span",{className:p.root},e.createElement(vt.Z,{className:p.label},a),g?e.createElement(T,{to:g},C):C))}const Os={hour:"2-digit",minute:"2-digit"};function Va(n){const a=new Date,f=window.navigator.language,g=[];if(!n.has("homepage.clocks"))return g;const p=n.getConfigArray("homepage.clocks");for(const C of p)if(C.has("label")&&C.has("timezone")){let x=C.getString("label");const w={timeZone:C.getString("timezone"),...Os};try{new Date().toLocaleString(f,w)}catch{console.warn(`The timezone ${w.timeZone} is invalid. Defaulting to GMT`),w.timeZone="GMT",x="GMT"}const Y=a.toLocaleTimeString(f,w);g.push({time:Y,label:x})}return g}function zi(n){const a=useApi(configApiRef),f=[],[g,p]=React.useState(f);return React.useEffect(()=>{p(Va(a));const C=setInterval(()=>{p(Va(a))},1e3);return()=>{clearInterval(C)}},[a]),g.length!==0?React.createElement(React.Fragment,null,g.map(C=>React.createElement(HeaderLabel,{label:C.label,value:C.time,key:C.label}))):null}const xs=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"}}),Ds=(0,s.Z)(xs,{name:"BackstageItemCardHeader"});function Fs(n){const{title:a,subtitle:f,children:g}=n,p=Ds(n);return e.createElement("div",{className:p.root},f&&e.createElement(vt.Z,{variant:"subtitle2",component:"h3"},f),a&&e.createElement(vt.Z,{variant:"h6",component:"h4"},a),g)}function Hi(n){const{description:a,tags:f,title:g,type:p,subtitle:C,label:x,onClick:w,href:Y}=n;return React.createElement(Card,null,React.createElement(CardMedia,null,React.createElement(ItemCardHeader,{title:g,subtitle:C||p})),React.createElement(CardContent,null,(f==null?void 0:f.length)?React.createElement(Box,null,f.map((W,at)=>React.createElement(Chip,{size:"small",label:W,key:at}))):null,a),React.createElement(CardActions,null,!Y&&React.createElement(Button,{to:"#",onClick:w,color:"primary"},x),Y&&React.createElement(Button,{to:Y,color:"primary"},x)))}const Bs=n=>(0,u.Z)({root:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(22em, 1fr))",gridAutoRows:"1fr",gridGap:n.spacing(2)}}),bs=(0,s.Z)(Bs,{name:"BackstageItemCardGrid"});function Ms(n){const{children:a,...f}=n,g=bs(f);return e.createElement("div",{className:g.root,...f},a)}var Ns=t(41547);const Us=(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:"100vh",overflowY:"auto"}}),{name:"BackstagePage"});function Ga(n){const{themeId:a,children:f}=n,g=Us();return e.createElement(Ns.Z,{theme:p=>({...p,page:p.getPageTheme({themeId:a})})},e.createElement("div",{className:g.root},f))}function $s(n){const{themeId:a,children:f,...g}=n;return e.createElement(Ga,{themeId:a},e.createElement(ja,{...g}),f)}const Gn=72,zr=24,Hr=18,dn={drawerWidthClosed:Gn,drawerWidthOpen:224,defaultOpenDelayMs:100,defaultCloseDelayMs:0,defaultFadeDuration:200,logoHeight:32,iconContainerWidth:Gn,iconSize:Gn-zr*2,iconPadding:zr,selectedIndicatorWidth:3,userBadgePadding:Hr,userBadgeDiameter:Gn-Hr*2},Ka={drawerWidthClosed:0,drawerWidthOpen:202,defaultOpenDelayMs:100,defaultCloseDelayMs:0,defaultFadeDuration:200,logoHeight:32,iconContainerWidth:Gn,iconSize:Gn-zr*2,iconPadding:zr,selectedIndicatorWidth:3,userBadgePadding:Hr,userBadgeDiameter:Gn-Hr*2},ji="@backstage/core/sidebar-intro-dismissed",vr=(0,e.createContext)({isOpen:!1,setOpen:n=>{}}),Ja=(0,e.createContext)({isHoveredOn:!1,setIsHoveredOn:()=>{}});var jr;(function(n){const a="sidebarPinState";n.SIDEBAR_PIN_STATE=a})(jr||(jr={}));const Ya={getSidebarPinState(){let n;try{n=JSON.parse(window.localStorage.getItem(jr.SIDEBAR_PIN_STATE)||"true")}catch{return!0}return!!n},setSidebarPinState(n){return window.localStorage.setItem(jr.SIDEBAR_PIN_STATE,JSON.stringify(n))}},Zs=(0,s.Z)({root:{width:"100%",minHeight:"100%",transition:"padding-left 0.1s ease-out",paddingLeft:({isPinned:n})=>n?dn.drawerWidthOpen:dn.drawerWidthClosed}},{name:"BackstageSidebarPage"}),Qa=(0,e.createContext)({isPinned:!0,toggleSidebarPinState:()=>{}});function ws(n){const[a,f]=(0,e.useState)(()=>Ya.getSidebarPinState());(0,e.useEffect)(()=>{Ya.setSidebarPinState(a)},[a]);const g=()=>f(!a),p=Zs({isPinned:a});return e.createElement(Qa.Provider,{value:{isPinned:a,toggleSidebarPinState:g}},e.createElement("div",{className:p.root},n.children))}const Ws=(0,s.Z)({iconContainer:{display:"flex",position:"relative",width:"100%"},arrow1:{right:"6px",position:"absolute"}}),Vi=()=>{const n=Ws();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 Gi=null;const zs=(0,s.Z)({iconContainer:{display:"flex",position:"relative",width:"100%"},arrow1:{right:"6px",position:"absolute"}}),Ki=()=>{const n=zs();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 Ji=null;const Xa=(0,s.Z)(n=>({root:{zIndex:1e3,position:"relative",overflow:"visible",width:n.spacing(7)+1},drawer:{display:"flex",flexFlow:"column nowrap",alignItems:"flex-start",position:"fixed",left:0,top:0,bottom:0,padding:0,background:n.palette.navigation.background,overflowX:"hidden",msOverflowStyle:"none",scrollbarWidth:"none",width:dn.drawerWidthClosed,transition:n.transitions.create("width",{easing:n.transitions.easing.sharp,duration:n.transitions.duration.shortest}),"& > *":{flexShrink:0},"&::-webkit-scrollbar":{display:"none"}},expandButton:{background:"none",border:"none",color:n.palette.navigation.color,width:"100%",cursor:"pointer",position:"relative",height:48},arrows:{position:"absolute",right:10},drawerOpen:{width:dn.drawerWidthOpen,transition:n.transitions.create("width",{easing:n.transitions.easing.sharp,duration:n.transitions.duration.shorter})}}),{name:"BackstageSidebar"});var Rn;(function(n){const a=0;n[n.Closed=a]="Closed";const f=a+1;n[n.Idle=f]="Idle";const g=f+1;n[n.Open=g]="Open"})(Rn||(Rn={}));function Hs(n){const{disableExpandOnHover:a=!1,openDelayMs:f=dn.defaultOpenDelayMs,closeDelayMs:g=dn.defaultCloseDelayMs,children:p}=n,C=Xa(),x=(0,Ot.Z)(ie=>ie.breakpoints.down("md")),[w,Y]=(0,e.useState)(Rn.Closed),W=(0,e.useRef)(),{isPinned:at}=(0,e.useContext)(Qa),it=()=>{at||(W.current&&(clearTimeout(W.current),W.current=void 0),w!==Rn.Open&&!x&&(W.current=window.setTimeout(()=>{W.current=void 0,Y(Rn.Open)},f),Y(Rn.Idle)))},Rt=()=>{at||(W.current&&(clearTimeout(W.current),W.current=void 0),w===Rn.Idle?Y(Rn.Closed):w===Rn.Open&&(W.current=window.setTimeout(()=>{W.current=void 0,Y(Rn.Closed)},g)))},St=w===Rn.Open&&!x||at,It=ie=>{ie?it():Rt()};return e.createElement("div",{className:C.root,"data-testid":"sidebar-root",onMouseEnter:a?()=>{}:it,onFocus:a?()=>{}:it,onMouseLeave:a?()=>{}:Rt,onBlur:a?()=>{}:Rt},e.createElement(vr.Provider,{value:{isOpen:St,setOpen:It}},e.createElement("div",{className:dt()(C.drawer,{[C.drawerOpen]:St})},p)))}const Yi=()=>{const n=Xa(),{isOpen:a,setOpen:f}=useContext(SidebarContext),{isPinned:g}=useContext(SidebarPinStateContext),p=useMediaQuery(x=>x.breakpoints.down("md")),C=()=>{f(!a)};return g||p?null:React.createElement("button",{onClick:C,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)))};function js(n,a){const f=new URLSearchParams(a.search).toString(),g=Zr().parse(f),p=new URLSearchParams(n.search).toString(),C=Zr().parse(p);return(0,Ar.isEqual)(a.pathname,n.pathname)&&(0,Ar.isMatch)(C,g)}const Vs=(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",fontSize:"14px"}})),Qi=n=>{const{title:a,to:f,icon:g,dropdownItems:p}=n,C=Vs(),{setIsHoveredOn:x}=useContext(SidebarItemWithSubmenuContext),w=()=>{x(!1)},Y=useResolvedPath(f),W=useLocation();let at=isLocationMatch(W,Y);const[it,Rt]=useState(!1),St=()=>{Rt(!it)};return p!==void 0?(p.some(It=>{const ie=resolvePath(It.to);return at=isLocationMatch(W,ie),at}),React.createElement("div",{className:C.itemContainer},React.createElement("button",{onClick:St,className:classnames(C.item,at?C.selected:void 0)},React.createElement(g,{fontSize:"small"}),React.createElement(Typography,{variant:"subtitle1",className:C.label},a),it?React.createElement(ArrowDropUpIcon,{className:C.dropdownArrow}):React.createElement(ArrowDropDownIcon,{className:C.dropdownArrow})),p&&it&&React.createElement("div",{className:C.dropdown},p.map((It,ie)=>React.createElement(Link,{component:NavLink,to:It.to,underline:"none",className:C.dropdownItem,onClick:w,key:ie},React.createElement(Typography,{className:C.textContent},It.title)))))):React.createElement("div",{className:C.itemContainer},React.createElement(Link,{component:NavLink,to:f,underline:"none",className:classnames(C.item,at?C.selected:void 0),onClick:w},React.createElement(g,{fontSize:"small"}),React.createElement(Typography,{variant:"subtitle1",className:C.label},a)))},Gs=n=>(0,s.Z)(a=>{var f,g;return{root:{zIndex:1e3,position:"relative",overflow:"visible",width:a.spacing(7)+1},drawer:{display:"flex",flexFlow:"column nowrap",alignItems:"flex-start",position:"fixed",left:n.left,top:0,bottom:0,padding:0,background:(g=(f=a.palette.navigation.submenu)==null?void 0:f.background)!=null?g:"#404040",overflowX:"hidden",msOverflowStyle:"none",scrollbarWidth:"none",cursor:"default",width:Ka.drawerWidthClosed,borderRight:"1px solid #383838","& > *":{flexShrink:0},"&::-webkit-scrollbar":{display:"none"}},drawerOpen:{width:Ka.drawerWidthOpen},title:{fontSize:24,fontWeight:500,color:"#FFF",padding:20}}}),Ks=n=>{const{isOpen:a}=(0,e.useContext)(vr),f=a?dn.drawerWidthOpen:dn.drawerWidthClosed,g=Gs({left:f})(),{isHoveredOn:p}=(0,e.useContext)(Ja);return e.createElement("div",{className:dt()(g.drawer,{[g.drawerOpen]:p})},e.createElement(vt.Z,{variant:"h5",className:g.title},n.title),n.children)};var Vr=t(76600),ka=t(26739),Js=t(98989);const ha=(0,s.Z)(n=>{var C,x,w,Y;const{selectedIndicatorWidth:a,drawerWidthClosed:f,drawerWidthOpen:g,iconContainerWidth:p}=dn;return{root:{color:n.palette.navigation.color,display:"flex",flexFlow:"row nowrap",alignItems:"center",height:48,cursor:"pointer"},buttonItem:{background:"none",border:"none",width:"auto",margin:0,padding:0,textAlign:"inherit",font:"inherit"},closed:{width:f,justifyContent:"center"},open:{width:g},highlightable:{"&:hover":{background:(x=(C=n.palette.navigation.navItem)==null?void 0:C.hoverBackground)!=null?x:"#404040"}},highlighted:{background:(Y=(w=n.palette.navigation.navItem)==null?void 0:w.hoverBackground)!=null?Y:"#404040"},label:{fontWeight:"bold",whiteSpace:"nowrap",lineHeight:"auto",flex:"3 1 auto",width:"110px",overflow:"hidden","text-overflow":"ellipsis"},iconContainer:{boxSizing:"border-box",height:"100%",width: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 ${n.spacing(2)}`},searchContainer:{width:g-p},secondaryAction:{width:n.spacing(6),textAlign:"center",marginRight:n.spacing(1)},closedItemIcon:{width:"100%",justifyContent:"center"},submenuArrow:{position:"absolute",right:0},selected:{"&$root":{borderLeft:`solid ${a}px ${n.palette.navigation.indicator}`,color:n.palette.navigation.selectedColor},"&$closed":{width:f},"& $closedItemIcon":{paddingRight:a},"& $iconContainer":{marginLeft:-a}}}},{name:"BackstageSidebarItem"});function Ys(n,a){const f=[];let g=!1,p;return e.Children.forEach(n,C=>{!e.isValidElement(C)||(p=C.props.children)}),e.Children.forEach(p,C=>{!e.isValidElement(C)||(C.props.dropdownItems?C.props.dropdownItems.map(x=>f.push(x.to)):C.props.to&&f.push(C.props.to))}),g=f.some(C=>{const x=(0,Dn.i3)(C);return js(a,x)}),g}const Qs=({text:n,hasNotifications:a=!1,icon:f,children:g})=>{const p=ha(),[C,x]=(0,e.useState)(!1),w=(0,Dn.TH)(),Y=Ys(g,w),W=()=>{x(!0)},at=()=>{x(!1)},{isOpen:it}=(0,e.useContext)(vr),Rt=e.createElement(ka.Z,{color:"secondary",variant:"dot",overlap:"circular",className:it?"":p.closedItemIcon,invisible:!a},e.createElement(f,{fontSize:"small"})),St=e.createElement(e.Fragment,null,e.createElement("div",{"data-testid":"login-button",className:p.iconContainer},Rt),n&&e.createElement(vt.Z,{variant:"subtitle2",className:p.label},n),e.createElement("div",{className:p.secondaryAction})),It=Rt;return e.createElement(Ja.Provider,{value:{isHoveredOn:C,setIsHoveredOn:x}},e.createElement("div",{onMouseLeave:at,className:dt()(C&&p.highlighted)},e.createElement("div",{onMouseEnter:W,"data-testid":"item-with-submenu",className:dt()(p.root,it?p.open:p.closed,Y&&p.selected,p.highlightable,C&&p.highlighted)},it?St:It,!C&&e.createElement(Js.Z,{fontSize:"small",className:p.submenuArrow})),C&&g))};function qa(n){return n.to===void 0}const Xs=e.forwardRef(function({to:a,end:f,style:g,className:p,activeStyle:C,caseSensitive:x,activeClassName:w="active","aria-current":Y="page",...W},at){let{pathname:it}=(0,Dn.TH)(),{pathname:Rt}=(0,Dn.WU)(a);x||(it=it.toLocaleLowerCase("en-US"),Rt=Rt.toLocaleLowerCase("en-US"));let St=it===Rt;!St&&!f&&(St=it.startsWith(`${Rt}/`));const It=St?Y:void 0;return e.createElement(i.rU,{...W,to:a,ref:at,"aria-current":It,style:{...g,...St?C:void 0},className:dt()([p,St?w:void 0])})}),_a=(0,e.forwardRef)((n,a)=>{const{icon:f,text:g,hasNotifications:p=!1,disableHighlight:C=!1,onClick:x,children:w,className:Y,...W}=n,at=ha(),{isOpen:it}=(0,e.useContext)(vr),Rt=e.createElement(ka.Z,{color:"secondary",variant:"dot",overlap:"circular",invisible:!p,className:dt()({[at.closedItemIcon]:!it})},e.createElement(f,{fontSize:"small"})),St=Rt,It=e.createElement(e.Fragment,null,e.createElement("div",{"data-testid":"login-button",className:at.iconContainer},Rt),g&&e.createElement(vt.Z,{variant:"subtitle2",className:at.label},g),e.createElement("div",{className:at.secondaryAction},w)),ie=it?It:St,en={onClick:x,className:dt()(Y,at.root,it?at.open:at.closed,qa(n)&&at.buttonItem,{[at.highlightable]:!C})};let qe=!1,ze;const Xt=e.createElement(Ks,null,e.createElement(e.Fragment,null)).type,De=(0,l.useElementFilter)(w,Pe=>Pe.getElements().filter(_e=>_e.type===Xt));if(De.length>1)throw new Error("Cannot render more than one SidebarSubmenu inside a SidebarItem");return De.length===1&&(qe=!0,ze=De[0]),qe?e.createElement(Qs,{text:g,icon:f,hasNotifications:p},ze):qa(n)?e.createElement("button",{"aria-label":g,...en,ref:a},ie):e.createElement(Xs,{...en,activeClassName:at.selected,to:n.to?n.to:"",ref:a,"aria-label":g||n.to,...W},ie)});function Xi(n){const[a,f]=useState(""),g=ha(),p=n.icon?n.icon:SearchIcon,C=()=>{n.onSearch(a),f("")},x=at=>{at.key==="Enter"&&(at.preventDefault(),C())},w=at=>{f(at.target.value)},Y=at=>{at.preventDefault(),at.stopPropagation()},W=at=>{C(),at.preventDefault()};return React.createElement("div",{className:g.searchRoot},React.createElement(_a,{icon:p,to:n.to,onClick:W,disableHighlight:!0},React.createElement(TextField,{placeholder:"Search",value:a,onClick:Y,onChange:w,onKeyDown:x,className:g.searchContainer,InputProps:{disableUnderline:!0,className:g.searchField},inputProps:{className:g.searchFieldHTMLInput}})))}const ki=(0,Vr.Z)("div")({flex:1},{name:"BackstageSidebarSpace"}),qi=(0,Vr.Z)("div")({height:8},{name:"BackstageSidebarSpacer"}),ks=(0,Vr.Z)("hr")({height:1,width:"100%",background:"#383838",border:"none",margin:"12px 0px"},{name:"BackstageSidebarDivider"}),_s=n=>({overflowY:"auto","&::-webkit-scrollbar":{backgroundColor:n.palette.background.default,width:"5px",borderRadius:"5px"},"&::-webkit-scrollbar-thumb":{backgroundColor:n.palette.text.hint,borderRadius:"5px"}}),_i=(0,Vr.Z)("div")(({theme:n})=>{const a=_s(n);return{flex:"0 1 auto",overflowX:"hidden",width:"calc(100% - 5px)",minHeight:"48px",overflowY:"hidden","@media (hover: none)":a,"&:hover":a}}),ti=(0,s.Z)(n=>({introCard:{color:"#b5b5b5",fontSize:12,width:dn.drawerWidthOpen,marginTop:18,marginBottom:12,paddingLeft:dn.iconPadding,paddingRight:dn.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 ei(n){const a=ti(),{text:f,onClose:g}=n,p=()=>g();return React.createElement("div",{className:a.introCard},React.createElement(Typography,{variant:"subtitle2"},f),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 to=n=>{const{text:a,onDismiss:f}=n,[g,p]=useState(!1),C=()=>{p(!0)};return React.createElement(Collapse,{in:!g,onExited:f},React.createElement(ei,{text:a,onClose:C}))},ni=null,ri="And your recently viewed plugins will pop up here!";function tl(n){const{isOpen:a}=useContext(SidebarContext),f={starredItemsDismissed:!1,recentlyViewedItemsDismissed:!1},[g,p]=useLocalStorage(SIDEBAR_INTRO_LOCAL_STORAGE),{starredItemsDismissed:C,recentlyViewedItemsDismissed:x}=g!=null?g:{},w=()=>{p(W=>({...f,...W,starredItemsDismissed:!0}))},Y=()=>{p(W=>({...f,...W,recentlyViewedItemsDismissed:!0}))};return a?React.createElement(React.Fragment,null,!C&&React.createElement(React.Fragment,null,React.createElement(to,{text:ni,onDismiss:w}),React.createElement(SidebarDivider,null)),!x&&React.createElement(to,{text:ri,onDismiss:Y})):null}const ai=(0,s.Z)({container:{padding:0,listStyle:"none"},item:{display:"flex",flexDirection:"column",width:"100%",maxWidth:"400px",margin:0,padding:0}},{name:"BackstageSignInPage"}),ga=({children:n})=>{const a=ai();return e.createElement(Vt.Z,{component:"li",item:!0,classes:a},n)};class pa{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 oi(n){const[a,f,g]=n.split(".");return JSON.parse(atob(f))}class ya{constructor(a){this.result=a}getUserId(){return this.result.userId}static fromResult(a){return new ya(a)}async getIdToken(){var a,f;return(f=(a=this.result).getIdToken)==null?void 0:f.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:f,ent:g}=oi(a);return{type:"user",userEntityRef:f,ownershipEntityRefs:g!=null?g:[]}}async getCredentials(){var f,g;return{token:await((g=(f=this.result).getIdToken)==null?void 0:g.call(f))}}async signOut(){var a,f;return(f=(a=this.result).signOut)==null?void 0:f.call(a)}}class nr{constructor(a,f,g){q(this,"profilePromise");this.identity=a,this.authApi=f,this.profile=g}static createGuest(){return new pa}static fromLegacy(a){return ya.fromResult(a)}static create(a){return new nr(a.identity,a.authApi,a.profile)}getUserId(){const a=this.identity.userEntityRef,f=/^([^:/]+:)?([^:/]+\/)?([^:/]+)$/.exec(a);if(!f)throw new TypeError(`Invalid user entity reference "${a}"`);return f[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 si={Component:({config:n,onSignInSuccess:a})=>{const{apiRef:f,title:g,message:p}=n,C=(0,l.useApi)(f),x=(0,l.useApi)(l.errorApiRef),w=async()=>{try{const Y=await C.getBackstageIdentity({instantPopup:!0});if(!Y)throw new Error(`The ${g} provider is not configured to support sign-in`);const W=await C.getProfile();a(nr.create({identity:Y.identity,profile:W,authApi:C}))}catch(Y){x.post(new xr.SP("Login failed",Y))}};return e.createElement(ga,null,e.createElement(wt,{variant:"fullHeight",title:g,actions:e.createElement(m.Z,{color:"primary",variant:"outlined",onClick:w},"Sign In")},e.createElement(vt.Z,{variant:"body1"},p)))},loader:async(n,a)=>{const f=n.get(a),g=await f.getBackstageIdentity({optional:!0});if(!g)return;const p=await f.getProfile();return nr.create({identity:g.identity,profile:p,authApi:f})}},ii={Component:({onSignInSuccess:n})=>e.createElement(ga,null,e.createElement(wt,{title:"Guest",variant:"fullHeight",actions:e.createElement(m.Z,{color:"primary",variant:"outlined",onClick:()=>n(new pa)},"Enter")},e.createElement(vt.Z,{variant:"body1"},"Enter as a Guest User.",e.createElement("br",null),"You will not have a verified identity,",e.createElement("br",null),"meaning some features might be unavailable."))),loader:async()=>new pa};var li=t(94106),eo=t(86619),no=t(74828),ci=t(45455),ui=t.n(ci);const di=/^[a-z0-9_\-]+\.[a-z0-9_\-]+\.[a-z0-9_\-]+$/i,fi=(0,s.Z)(n=>({form:{display:"flex",flexFlow:"column nowrap"},button:{alignSelf:"center",marginTop:n.spacing(2)}}),{name:"BackstageCustomProvider"}),ro=n=>{const{ref:a,...f}=n;return{inputRef:a,...f}},mi={Component:({onSignInSuccess:n})=>{const a=fi(),{register:f,handleSubmit:g,formState:p}=(0,li.cI)({mode:"onChange"}),{errors:C}=p,x=({userId:w})=>{n(nr.fromLegacy({userId:w,profile:{email:`${w}@example.com`}}))};return e.createElement(ga,null,e.createElement(wt,{title:"Custom User",variant:"fullHeight"},e.createElement(vt.Z,{variant:"body1"},"Enter your own User ID and credentials.",e.createElement("br",null),"This selection will not be stored."),e.createElement("form",{className:a.form,onSubmit:g(x)},e.createElement(Ge.Z,null,e.createElement(eo.Z,{...ro(f("userId",{required:!0})),label:"User ID",margin:"normal",error:Boolean(C.userId)}),C.userId&&e.createElement(no.Z,{error:!0},C.userId.message)),e.createElement(Ge.Z,null,e.createElement(eo.Z,{...ro(f("idToken",{required:!1,validate:w=>!w||di.test(w)||"Token is not a valid OpenID Connect JWT Token"})),label:"ID Token (optional)",margin:"normal",autoComplete:"off",error:Boolean(C.idToken)}),C.idToken&&e.createElement(no.Z,{error:!0},C.idToken.message)),e.createElement(m.Z,{type:"submit",color:"primary",variant:"outlined",className:a.button,disabled:!(p==null?void 0:p.isDirty)||!ui()(C)},"Continue"))))},loader:async()=>{}},Gr="@backstage/core:SignInPage:provider",ao={guest:ii,custom:mi,common:si};function oo(n,a){if(n in a)throw new Error(`"${n}" ID is duplicated. IDs of identity providers have to be unique.`)}function il(n){return n.reduce((f,g)=>{if(typeof g=="string")return oo(g,f),f[g]={components:ao[g],id:g},f;const{id:p}=g;return oo(p,f),f[p]={components:ao.common,id:p,config:g},f},{})}const ll=(n,a)=>{const f=useApi(errorApiRef),g=useApiHolder(),[p,C]=useState(!0),x=useCallback(Y=>{a(IdentityApiSignOutProxy.from({identityApi:Y,signOut:async()=>{var W;localStorage.removeItem(Gr),await((W=Y.signOut)==null?void 0:W.call(Y))}}))},[a]);useLayoutEffect(()=>{var it;if(!p)return;const Y=localStorage.getItem(Gr);if(Y===null){C(!1);return}const W=n[Y];if(!W){C(!1);return}let at=!1;return W.components.loader(g,(it=W.config)==null?void 0:it.apiRef).then(Rt=>{at||(Rt?x(Rt):C(!1))}).catch(Rt=>{at||(localStorage.removeItem(Gr),f.post(Rt),C(!1))}),()=>{at=!0}},[p,f,a,g,n,x]);const w=useMemo(()=>Object.keys(n).map(Y=>{const W=n[Y],{Component:at}=W.components,it=Rt=>{localStorage.setItem(Gr,W.id),x(Rt)};return React.createElement(at,{key:W.id,config:W.config,onSignInSuccess:it})}),[n,x]);return[p,w]},hi=({onSignInSuccess:n,providers:a=[],title:f,align:g="left"})=>{const p=useApi(configApiRef),C=useStyles(),x=getSignInProviders(a),[w,Y]=useSignInProviders(x,n);return w?React.createElement(Progress,null):React.createElement(Page,{themeId:"home"},React.createElement(Header,{title:p.getString("app.title")}),React.createElement(Content,null,f&&React.createElement(ContentHeader,{title:f,textAlign:g}),React.createElement(Grid,{container:!0,justifyContent:g==="center"?g:"flex-start",spacing:2,component:"ul",classes:C},Y)))},gi=({provider:n,auto:a,onSignInSuccess:f})=>{const g=useStyles(),p=useApi(n.apiRef),C=useApi(configApiRef),[x,w]=useState(),[Y,W]=useState(!1),at=async({checkExisting:it,showPopup:Rt})=>{try{let St;if(it&&(St=await p.getBackstageIdentity({optional:!0})),!St&&(Rt||a)&&(W(!0),St=await p.getBackstageIdentity({instantPopup:!0}),!St))throw new Error(`The ${n.title} provider is not configured to support sign-in`);if(!St){W(!0);return}const It=await p.getProfile();f(UserIdentity.create({identity:St.identity,authApi:p,profile:It}))}catch(St){w(St),W(!0)}};return useMount(()=>at({checkExisting:!0})),Y?React.createElement(Page,{themeId:"home"},React.createElement(Header,{title:C.getString("app.title")}),React.createElement(Content,null,React.createElement(Grid,{container:!0,justifyContent:"center",spacing:2,component:"ul",classes:g},React.createElement(GridItem,null,React.createElement(InfoCard,{variant:"fullHeight",title:n.title,actions:React.createElement(Button,{color:"primary",variant:"outlined",onClick:()=>{at({showPopup:!0})}},"Sign In")},React.createElement(Typography,{variant:"body1"},n.message),x&&x.name!=="PopupRejectedError"&&React.createElement(Typography,{variant:"body1",color:"error"},x.message)))))):React.createElement(Progress,null)};function cl(n){return"provider"in n?React.createElement(gi,{...n}):React.createElement(hi,{...n})}const pi=(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"}),yi=(0,$.Z)(n=>({root:{padding:n.spacing(2,2,2,2.5),display:"inline-block"},title:{fontWeight:700},subheader:{paddingTop:n.spacing(1)}}),{name:"BackstageTabbedCardBoldHeader"})(M.Z);function ul(n){const{slackChannel:a,errorBoundaryProps:f,children:g,title:p,deepLink:C,value:x,onChange:w}=n,Y=pi(),[W,at]=useState(0),it=w||((It,ie)=>at(ie));let Rt;x?React.Children.map(g,It=>{(It==null?void 0:It.props.value)===x&&(Rt=It==null?void 0:It.props.children)}):React.Children.map(g,(It,ie)=>{ie===W&&(Rt=It==null?void 0:It.props.children)});const St=f||(a?{slackChannel:a}:{});return React.createElement(Card,null,React.createElement(ErrorBoundary,{...St},p&&React.createElement(yi,{title:p}),React.createElement(Tabs,{selectionFollowsFocus:!0,classes:Y,value:x||W,onChange:it},g),React.createElement(Divider,null),React.createElement(CardContent,null,Rt),C&&React.createElement(BottomLink,{...C})))}const Ei=(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 dl(n){const{children:a,...f}=n,g=Ei();return React.createElement(Tab,{disableRipple:!0,classes:g,...f})}},88609:function(X,o,t){"use strict";t.d(o,{Os:function(){return h},fC:function(){return c}});var r=t(76241),e=t(2784);const l=(0,r.CT)("analytics-context"),h=()=>{const u=(0,e.useContext)(l);if(u===void 0)return{routeRef:"unknown",pluginId:"root",extension:"App"};const d=u.atVersion(1);if(d===void 0)throw new Error("No context found for version 1.");return d},c=u=>{const{attributes:d,children:y}=u,E={...h(),...d},i=(0,r.EI)({1:E});return e.createElement(l.Provider,{value:i},y)};function s(u,d){const y=m=>React.createElement(c,{attributes:d},React.createElement(u,{...m}));return y.displayName=`WithAnalyticsContext(${u.displayName||u.name||"Component"})`,y}},28461:function(X,o,t){"use strict";t.d(o,{f:function(){return r.fC},z:function(){return s}});var r=t(88609),e=t(27399),l=t(2784);class h{constructor(d,y={routeRef:"unknown",pluginId:"root",extension:"App"}){this.analyticsApi=d,this.context=y}setContext(d){this.context=d}captureEvent(d,y,{value:m,attributes:E}={}){try{this.analyticsApi.captureEvent({action:d,subject:y,value:m,attributes:E,context:this.context})}catch(i){console.warn("Error during analytics event capture. %o",i)}}}function c(){try{return(0,e.useApi)(e.analyticsApiRef)}catch{return{captureEvent:()=>{}}}}function s(){const u=(0,l.useRef)(null),d=(0,r.Os)(),y=c();function m(){return u.current===null&&(u.current=new h(y)),u.current}const E=m();return E.setContext(d),E}},39135:function(X,o,t){"use strict";t.d(o,{CL:function(){return K},sM:function(){return e},$v:function(){return T},v_:function(){return G},hg:function(){return H},uB:function(){return B},iW:function(){return u},bq:function(){return S},Ds:function(){return D},NW:function(){return b},VE:function(){return I},W0:function(){return V},gP:function(){return st},F4:function(){return h},ux:function(){return s},Kp:function(){return l},$4:function(){return At},p_:function(){return d},br:function(){return y},ZM:function(){return zt},eC:function(){return m},D:function(){return c},gW:function(){return i},Yp:function(){return E},E6:function(){return ht}});var r=t(86833),e;(function(jt){const Ot="SignedIn";jt.SignedIn=Ot;const Jt="SignedOut";jt.SignedOut=Jt})(e||(e={}));const l=(0,r.T0)({id:"core.auth.google"}),h=(0,r.T0)({id:"core.auth.github"}),c=(0,r.T0)({id:"core.auth.okta"}),s=(0,r.T0)({id:"core.auth.gitlab"}),u=(0,r.T0)({id:"core.auth.auth0"}),d=(0,r.T0)({id:"core.auth.microsoft"}),y=(0,r.T0)({id:"core.auth.oauth2"}),m=(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"}),B=(0,r.T0)({id:"core.auth.atlassian"}),T=(0,r.T0)({id:"core.alert"}),G=(0,r.T0)({id:"core.analytics"}),H=(0,r.T0)({id:"core.apptheme"}),D=(0,r.T0)({id:"core.config"}),b=(0,r.T0)({id:"core.discovery"}),I=(0,r.T0)({id:"core.error"});var K;(function(jt){const Ot=0;jt[jt.None=Ot]="None";const Jt=1;jt[jt.Active=Jt]="Active"})(K||(K={}));const V=(0,r.T0)({id:"core.featureflags"}),st=(0,r.T0)({id:"core.fetch"}),At=(0,r.T0)({id:"core.identity"}),zt=(0,r.T0)({id:"core.oauthrequest"}),ht=(0,r.T0)({id:"core.storage"})},27399:function(X,o,t){"use strict";t.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 e.CL},SessionState:function(){return e.sM},alertApiRef:function(){return e.$v},analyticsApiRef:function(){return e.v_},appThemeApiRef:function(){return e.hg},atlassianAuthApiRef:function(){return e.uB},auth0AuthApiRef:function(){return e.iW},bitbucketAuthApiRef:function(){return e.bq},configApiRef:function(){return e.Ds},discoveryApiRef:function(){return e.NW},errorApiRef:function(){return e.VE},featureFlagsApiRef:function(){return e.W0},fetchApiRef:function(){return e.gP},githubAuthApiRef:function(){return e.F4},gitlabAuthApiRef:function(){return e.ux},googleAuthApiRef:function(){return e.Kp},identityApiRef:function(){return e.$4},microsoftAuthApiRef:function(){return e.p_},oauth2ApiRef:function(){return e.br},oauthRequestApiRef:function(){return e.ZM},oidcAuthApiRef:function(){return e.eC},oktaAuthApiRef:function(){return e.D},oneloginAuthApiRef:function(){return e.gW},samlAuthApiRef:function(){return e.Yp},storageApiRef:function(){return e.E6}});var r=t(86833);t.o(r,"FeatureFlagState")&&t.d(o,{FeatureFlagState:function(){return r.FeatureFlagState}}),t.o(r,"SessionState")&&t.d(o,{SessionState:function(){return r.SessionState}}),t.o(r,"alertApiRef")&&t.d(o,{alertApiRef:function(){return r.alertApiRef}}),t.o(r,"analyticsApiRef")&&t.d(o,{analyticsApiRef:function(){return r.analyticsApiRef}}),t.o(r,"appThemeApiRef")&&t.d(o,{appThemeApiRef:function(){return r.appThemeApiRef}}),t.o(r,"atlassianAuthApiRef")&&t.d(o,{atlassianAuthApiRef:function(){return r.atlassianAuthApiRef}}),t.o(r,"attachComponentData")&&t.d(o,{attachComponentData:function(){return r.attachComponentData}}),t.o(r,"auth0AuthApiRef")&&t.d(o,{auth0AuthApiRef:function(){return r.auth0AuthApiRef}}),t.o(r,"bitbucketAuthApiRef")&&t.d(o,{bitbucketAuthApiRef:function(){return r.bitbucketAuthApiRef}}),t.o(r,"configApiRef")&&t.d(o,{configApiRef:function(){return r.configApiRef}}),t.o(r,"createComponentExtension")&&t.d(o,{createComponentExtension:function(){return r.createComponentExtension}}),t.o(r,"createExternalRouteRef")&&t.d(o,{createExternalRouteRef:function(){return r.createExternalRouteRef}}),t.o(r,"createPlugin")&&t.d(o,{createPlugin:function(){return r.createPlugin}}),t.o(r,"createRoutableExtension")&&t.d(o,{createRoutableExtension:function(){return r.createRoutableExtension}}),t.o(r,"createRouteRef")&&t.d(o,{createRouteRef:function(){return r.createRouteRef}}),t.o(r,"discoveryApiRef")&&t.d(o,{discoveryApiRef:function(){return r.discoveryApiRef}}),t.o(r,"errorApiRef")&&t.d(o,{errorApiRef:function(){return r.errorApiRef}}),t.o(r,"featureFlagsApiRef")&&t.d(o,{featureFlagsApiRef:function(){return r.featureFlagsApiRef}}),t.o(r,"fetchApiRef")&&t.d(o,{fetchApiRef:function(){return r.fetchApiRef}}),t.o(r,"getComponentData")&&t.d(o,{getComponentData:function(){return r.getComponentData}}),t.o(r,"githubAuthApiRef")&&t.d(o,{githubAuthApiRef:function(){return r.githubAuthApiRef}}),t.o(r,"gitlabAuthApiRef")&&t.d(o,{gitlabAuthApiRef:function(){return r.gitlabAuthApiRef}}),t.o(r,"googleAuthApiRef")&&t.d(o,{googleAuthApiRef:function(){return r.googleAuthApiRef}}),t.o(r,"identityApiRef")&&t.d(o,{identityApiRef:function(){return r.identityApiRef}}),t.o(r,"microsoftAuthApiRef")&&t.d(o,{microsoftAuthApiRef:function(){return r.microsoftAuthApiRef}}),t.o(r,"oauth2ApiRef")&&t.d(o,{oauth2ApiRef:function(){return r.oauth2ApiRef}}),t.o(r,"oauthRequestApiRef")&&t.d(o,{oauthRequestApiRef:function(){return r.oauthRequestApiRef}}),t.o(r,"oidcAuthApiRef")&&t.d(o,{oidcAuthApiRef:function(){return r.oidcAuthApiRef}}),t.o(r,"oktaAuthApiRef")&&t.d(o,{oktaAuthApiRef:function(){return r.oktaAuthApiRef}}),t.o(r,"oneloginAuthApiRef")&&t.d(o,{oneloginAuthApiRef:function(){return r.oneloginAuthApiRef}}),t.o(r,"samlAuthApiRef")&&t.d(o,{samlAuthApiRef:function(){return r.samlAuthApiRef}}),t.o(r,"storageApiRef")&&t.d(o,{storageApiRef:function(){return r.storageApiRef}}),t.o(r,"useApp")&&t.d(o,{useApp:function(){return r.useApp}}),t.o(r,"useElementFilter")&&t.d(o,{useElementFilter:function(){return r.useElementFilter}}),t.o(r,"useRouteRef")&&t.d(o,{useRouteRef:function(){return r.useRouteRef}}),t.o(r,"useRouteRefParams")&&t.d(o,{useRouteRefParams:function(){return r.useRouteRefParams}});var e=t(39135)},90515:function(X,o,t){"use strict";t.d(o,{T:function(){return e}});class r{constructor(h){if(this.config=h,!h.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 '${h.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 e(l){return new r(l)}},25182:function(X,o,t){"use strict";t.d(o,{n:function(){return r}});function r(e,l){return"id"in e?{api:e,deps:{},factory:()=>l}:e}},86833:function(X,o,t){"use strict";t.d(o,{h_:function(){return r.h_},I_:function(){return r.I_},T0:function(){return e.T},createApiFactory:function(){return c.n}});var r=t(5761),e=t(90515),l=t(16362),h=t.n(l);t.o(l,"FeatureFlagState")&&t.d(o,{FeatureFlagState:function(){return l.FeatureFlagState}}),t.o(l,"SessionState")&&t.d(o,{SessionState:function(){return l.SessionState}}),t.o(l,"alertApiRef")&&t.d(o,{alertApiRef:function(){return l.alertApiRef}}),t.o(l,"analyticsApiRef")&&t.d(o,{analyticsApiRef:function(){return l.analyticsApiRef}}),t.o(l,"appThemeApiRef")&&t.d(o,{appThemeApiRef:function(){return l.appThemeApiRef}}),t.o(l,"atlassianAuthApiRef")&&t.d(o,{atlassianAuthApiRef:function(){return l.atlassianAuthApiRef}}),t.o(l,"attachComponentData")&&t.d(o,{attachComponentData:function(){return l.attachComponentData}}),t.o(l,"auth0AuthApiRef")&&t.d(o,{auth0AuthApiRef:function(){return l.auth0AuthApiRef}}),t.o(l,"bitbucketAuthApiRef")&&t.d(o,{bitbucketAuthApiRef:function(){return l.bitbucketAuthApiRef}}),t.o(l,"configApiRef")&&t.d(o,{configApiRef:function(){return l.configApiRef}}),t.o(l,"createApiFactory")&&t.d(o,{createApiFactory:function(){return l.createApiFactory}}),t.o(l,"createComponentExtension")&&t.d(o,{createComponentExtension:function(){return l.createComponentExtension}}),t.o(l,"createExternalRouteRef")&&t.d(o,{createExternalRouteRef:function(){return l.createExternalRouteRef}}),t.o(l,"createPlugin")&&t.d(o,{createPlugin:function(){return l.createPlugin}}),t.o(l,"createRoutableExtension")&&t.d(o,{createRoutableExtension:function(){return l.createRoutableExtension}}),t.o(l,"createRouteRef")&&t.d(o,{createRouteRef:function(){return l.createRouteRef}}),t.o(l,"discoveryApiRef")&&t.d(o,{discoveryApiRef:function(){return l.discoveryApiRef}}),t.o(l,"errorApiRef")&&t.d(o,{errorApiRef:function(){return l.errorApiRef}}),t.o(l,"featureFlagsApiRef")&&t.d(o,{featureFlagsApiRef:function(){return l.featureFlagsApiRef}}),t.o(l,"fetchApiRef")&&t.d(o,{fetchApiRef:function(){return l.fetchApiRef}}),t.o(l,"getComponentData")&&t.d(o,{getComponentData:function(){return l.getComponentData}}),t.o(l,"githubAuthApiRef")&&t.d(o,{githubAuthApiRef:function(){return l.githubAuthApiRef}}),t.o(l,"gitlabAuthApiRef")&&t.d(o,{gitlabAuthApiRef:function(){return l.gitlabAuthApiRef}}),t.o(l,"googleAuthApiRef")&&t.d(o,{googleAuthApiRef:function(){return l.googleAuthApiRef}}),t.o(l,"identityApiRef")&&t.d(o,{identityApiRef:function(){return l.identityApiRef}}),t.o(l,"microsoftAuthApiRef")&&t.d(o,{microsoftAuthApiRef:function(){return l.microsoftAuthApiRef}}),t.o(l,"oauth2ApiRef")&&t.d(o,{oauth2ApiRef:function(){return l.oauth2ApiRef}}),t.o(l,"oauthRequestApiRef")&&t.d(o,{oauthRequestApiRef:function(){return l.oauthRequestApiRef}}),t.o(l,"oidcAuthApiRef")&&t.d(o,{oidcAuthApiRef:function(){return l.oidcAuthApiRef}}),t.o(l,"oktaAuthApiRef")&&t.d(o,{oktaAuthApiRef:function(){return l.oktaAuthApiRef}}),t.o(l,"oneloginAuthApiRef")&&t.d(o,{oneloginAuthApiRef:function(){return l.oneloginAuthApiRef}}),t.o(l,"samlAuthApiRef")&&t.d(o,{samlAuthApiRef:function(){return l.samlAuthApiRef}}),t.o(l,"storageApiRef")&&t.d(o,{storageApiRef:function(){return l.storageApiRef}}),t.o(l,"useApp")&&t.d(o,{useApp:function(){return l.useApp}}),t.o(l,"useElementFilter")&&t.d(o,{useElementFilter:function(){return l.useElementFilter}}),t.o(l,"useRouteRef")&&t.d(o,{useRouteRef:function(){return l.useRouteRef}}),t.o(l,"useRouteRefParams")&&t.d(o,{useRouteRefParams:function(){return l.useRouteRefParams}});var c=t(25182)},16362:function(){},5761:function(X,o,t){"use strict";t.d(o,{I_:function(){return l},h_:function(){return h}});var r=t(2784),e=t(76241);function l(){const s=(0,e.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 h(s){const d=l().get(s);if(!d)throw new Error(`No implementation available for ${s}`);return d}function c(s){return function(d){const y=E=>{const i=l(),S={};for(const B in s)if(s.hasOwnProperty(B)){const T=s[B],G=i.get(T);if(!G)throw new Error(`No implementation available for ${T}`);S[B]=G}return React.createElement(d,{...E,...S})},m=d.displayName||d.name||"Component";return y.displayName=`withApis(${m})`,y}}},31311:function(X,o,t){"use strict";t.d(o,{q:function(){return r.q}});var r=t(32483),e=t(67229),l=t.n(e);t.o(e,"attachComponentData")&&t.d(o,{attachComponentData:function(){return e.attachComponentData}}),t.o(e,"createApiFactory")&&t.d(o,{createApiFactory:function(){return e.createApiFactory}}),t.o(e,"createApiRef")&&t.d(o,{createApiRef:function(){return e.createApiRef}}),t.o(e,"createComponentExtension")&&t.d(o,{createComponentExtension:function(){return e.createComponentExtension}}),t.o(e,"createExternalRouteRef")&&t.d(o,{createExternalRouteRef:function(){return e.createExternalRouteRef}}),t.o(e,"createPlugin")&&t.d(o,{createPlugin:function(){return e.createPlugin}}),t.o(e,"createRoutableExtension")&&t.d(o,{createRoutableExtension:function(){return e.createRoutableExtension}}),t.o(e,"createRouteRef")&&t.d(o,{createRouteRef:function(){return e.createRouteRef}}),t.o(e,"getComponentData")&&t.d(o,{getComponentData:function(){return e.getComponentData}}),t.o(e,"useApi")&&t.d(o,{useApi:function(){return e.useApi}}),t.o(e,"useApiHolder")&&t.d(o,{useApiHolder:function(){return e.useApiHolder}}),t.o(e,"useElementFilter")&&t.d(o,{useElementFilter:function(){return e.useElementFilter}}),t.o(e,"useRouteRef")&&t.d(o,{useRouteRef:function(){return e.useRouteRef}}),t.o(e,"useRouteRefParams")&&t.d(o,{useRouteRefParams:function(){return e.useRouteRefParams}})},67229:function(){},32483:function(X,o,t){"use strict";t.d(o,{q:function(){return e}});var r=t(76241);const e=()=>{const l=(0,r.Vt)("app-context");if(!l)throw new Error("App context is not available");const h=l.atVersion(1);if(!h)throw new Error("AppContext v1 not available");return h}},74181:function(X,o,t){"use strict";t.d(o,{R5:function(){return h},CO:function(){return i},P4:function(){return E},IY:function(){return c},vJ:function(){return H}});var r=t(76241);const e=(0,r.uW)("component-data-store",()=>new WeakMap),l="__backstage_data";function h(D,b,I){var st;const K=D;let V=(st=K[l])!=null?st:e.get(D);if(V||(V={map:new Map},Object.defineProperty(K,l,{enumerable:!1,configurable:!0,writable:!1,value:V}),e.set(D,V)),V.map.has(b)){const At=D.displayName||D.name;throw new Error(`Attempted to attach duplicate data "${b}" to component "${At}"`)}V.map.set(b,I)}function c(D,b){var V;if(!D)return;const I=D.type;if(!I)return;const K=(V=I[l])!=null?V:e.get(I);if(!!K)return K.map.get(b)}var s=t(2784),u=t(88609),d=t(31311),y=t(82772);class m extends s.Component{constructor(){super(...arguments);q(this,"state",{error:void 0});q(this,"handleErrorReset",()=>{this.setState({error:void 0})})}static getDerivedStateFromError(b){return{error:b}}render(){const{error:b}=this.state,{app:I,plugin:K}=this.props,{ErrorBoundaryFallback:V}=I.getComponents();return b?s.createElement(V,{error:b,resetError:this.handleErrorReset,plugin:K}):this.props.children}}function E(D){const{component:b,mountPoint:I,name:K}=D;return S({component:{lazy:()=>b().then(V=>{const st=zt=>{try{(0,y.tg)(I)}catch(ht){if(typeof ht=="object"&&ht!==null){const{message:jt}=ht;if(typeof jt=="string"&&jt.startsWith("No path for "))throw new Error(`Routable extension component with mount point ${I} 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 ht}return s.createElement(V,{...zt})},At=K||V.displayName||V.name||"LazyComponent";return st.displayName=`RoutableExtension(${At})`,st},V=>At=>{const zt=(0,d.q)(),{BootErrorPage:ht}=zt.getComponents();return s.createElement(ht,{step:"load-chunk",error:V})})},data:{"core.mountPoint":I},name:K})}function i(D){const{component:b,name:I}=D;return S({component:b,name:I})}function S(D){const{data:b={},name:I}=D;I||console.warn("Declaring extensions without name is DEPRECATED. Make sure that all usages of createReactExtension, createComponentExtension and createRoutableExtension provide a name.");let K;if("lazy"in D.component){const st=D.component.lazy;K=(0,s.lazy)(()=>st().then(At=>({default:At})))}else K=D.component.sync;const V=I||K.displayName||K.name||"Component";return{expose(st){const At=zt=>{const ht=(0,d.q)(),{Progress:jt}=ht.getComponents(),Ot=b==null?void 0:b["core.mountPoint"];return s.createElement(s.Suspense,{fallback:s.createElement(jt,null)},s.createElement(m,{app:ht,plugin:st},s.createElement(u.fC,{attributes:{pluginId:st.getId(),...I&&{extension:I},...Ot&&{routeRef:Ot.id}}},s.createElement(K,{...zt}))))};h(At,"core.plugin",st);for(const[zt,ht]of Object.entries(b))h(At,zt,ht);return At.displayName=`Extension(${V})`,At}}}var B=t(27399);function T(D,b,I,K){return s.Children.toArray(D).flatMap(V=>{if(!(0,s.isValidElement)(V))return[];if(V.type===s.Fragment)return T(V.props.children,b,I,K);if(c(V,"core.featureFlagged")){const st=V.props;return("with"in st?b.isActive(st.with):!b.isActive(st.without))?T(V.props.children,b,I,K):[]}if(I===void 0||I(V))return[V];if(K)throw new Error(K);return T(V.props.children,b,I,K)})}class G{constructor(b,I){this.node=b,this.featureFlagsApi=I}selectByComponentData(b){const I=T(this.node,this.featureFlagsApi,K=>c(K,b.key)!==void 0,b.withStrictError);return new G(I,this.featureFlagsApi)}findComponentData(b){return T(this.node,this.featureFlagsApi,K=>c(K,b.key)!==void 0).map(K=>c(K,b.key)).filter(K=>K!==void 0)}getElements(){return T(this.node,this.featureFlagsApi)}}function H(D,b,I=[]){const K=(0,B.useApi)(B.featureFlagsApiRef),V=new G(D,K);return(0,s.useMemo)(()=>b(V),[D,...I])}},80274:function(){},36964:function(X,o,t){"use strict";t.d(o,{AnalyticsContext:function(){return r.f},useAnalytics:function(){return r.z},FeatureFlagState:function(){return e.FeatureFlagState},SessionState:function(){return e.SessionState},alertApiRef:function(){return e.alertApiRef},analyticsApiRef:function(){return e.analyticsApiRef},appThemeApiRef:function(){return e.appThemeApiRef},atlassianAuthApiRef:function(){return e.atlassianAuthApiRef},auth0AuthApiRef:function(){return e.auth0AuthApiRef},bitbucketAuthApiRef:function(){return e.bitbucketAuthApiRef},configApiRef:function(){return e.configApiRef},discoveryApiRef:function(){return e.discoveryApiRef},errorApiRef:function(){return e.errorApiRef},featureFlagsApiRef:function(){return e.featureFlagsApiRef},fetchApiRef:function(){return e.fetchApiRef},githubAuthApiRef:function(){return e.githubAuthApiRef},gitlabAuthApiRef:function(){return e.gitlabAuthApiRef},googleAuthApiRef:function(){return e.googleAuthApiRef},identityApiRef:function(){return e.identityApiRef},microsoftAuthApiRef:function(){return e.microsoftAuthApiRef},oauth2ApiRef:function(){return e.oauth2ApiRef},oauthRequestApiRef:function(){return e.oauthRequestApiRef},oidcAuthApiRef:function(){return e.oidcAuthApiRef},oktaAuthApiRef:function(){return e.oktaAuthApiRef},oneloginAuthApiRef:function(){return e.oneloginAuthApiRef},samlAuthApiRef:function(){return e.samlAuthApiRef},storageApiRef:function(){return e.storageApiRef},useApp:function(){return l.q},attachComponentData:function(){return h.R5},createComponentExtension:function(){return h.CO},createRoutableExtension:function(){return h.P4},getComponentData:function(){return h.IY},useElementFilter:function(){return h.vJ},createPlugin:function(){return u.r},createExternalRouteRef:function(){return d.x8},createRouteRef:function(){return d.NT},useRouteRef:function(){return d.tg},useRouteRefParams:function(){return d.Oi}});var r=t(28461),e=t(27399);t.o(e,"attachComponentData")&&t.d(o,{attachComponentData:function(){return e.attachComponentData}}),t.o(e,"createApiFactory")&&t.d(o,{createApiFactory:function(){return e.createApiFactory}}),t.o(e,"createApiRef")&&t.d(o,{createApiRef:function(){return e.createApiRef}}),t.o(e,"createComponentExtension")&&t.d(o,{createComponentExtension:function(){return e.createComponentExtension}}),t.o(e,"createExternalRouteRef")&&t.d(o,{createExternalRouteRef:function(){return e.createExternalRouteRef}}),t.o(e,"createPlugin")&&t.d(o,{createPlugin:function(){return e.createPlugin}}),t.o(e,"createRoutableExtension")&&t.d(o,{createRoutableExtension:function(){return e.createRoutableExtension}}),t.o(e,"createRouteRef")&&t.d(o,{createRouteRef:function(){return e.createRouteRef}}),t.o(e,"getComponentData")&&t.d(o,{getComponentData:function(){return e.getComponentData}}),t.o(e,"useApi")&&t.d(o,{useApi:function(){return e.useApi}}),t.o(e,"useApiHolder")&&t.d(o,{useApiHolder:function(){return e.useApiHolder}}),t.o(e,"useApp")&&t.d(o,{useApp:function(){return e.useApp}}),t.o(e,"useElementFilter")&&t.d(o,{useElementFilter:function(){return e.useElementFilter}}),t.o(e,"useRouteRef")&&t.d(o,{useRouteRef:function(){return e.useRouteRef}}),t.o(e,"useRouteRefParams")&&t.d(o,{useRouteRefParams:function(){return e.useRouteRefParams}});var l=t(31311);t.o(l,"attachComponentData")&&t.d(o,{attachComponentData:function(){return l.attachComponentData}}),t.o(l,"createApiFactory")&&t.d(o,{createApiFactory:function(){return l.createApiFactory}}),t.o(l,"createApiRef")&&t.d(o,{createApiRef:function(){return l.createApiRef}}),t.o(l,"createComponentExtension")&&t.d(o,{createComponentExtension:function(){return l.createComponentExtension}}),t.o(l,"createExternalRouteRef")&&t.d(o,{createExternalRouteRef:function(){return l.createExternalRouteRef}}),t.o(l,"createPlugin")&&t.d(o,{createPlugin:function(){return l.createPlugin}}),t.o(l,"createRoutableExtension")&&t.d(o,{createRoutableExtension:function(){return l.createRoutableExtension}}),t.o(l,"createRouteRef")&&t.d(o,{createRouteRef:function(){return l.createRouteRef}}),t.o(l,"getComponentData")&&t.d(o,{getComponentData:function(){return l.getComponentData}}),t.o(l,"useApi")&&t.d(o,{useApi:function(){return l.useApi}}),t.o(l,"useApiHolder")&&t.d(o,{useApiHolder:function(){return l.useApiHolder}}),t.o(l,"useElementFilter")&&t.d(o,{useElementFilter:function(){return l.useElementFilter}}),t.o(l,"useRouteRef")&&t.d(o,{useRouteRef:function(){return l.useRouteRef}}),t.o(l,"useRouteRefParams")&&t.d(o,{useRouteRefParams:function(){return l.useRouteRefParams}});var h=t(74181),c=t(80274),s=t.n(c);t.o(c,"createApiFactory")&&t.d(o,{createApiFactory:function(){return c.createApiFactory}}),t.o(c,"createApiRef")&&t.d(o,{createApiRef:function(){return c.createApiRef}}),t.o(c,"createExternalRouteRef")&&t.d(o,{createExternalRouteRef:function(){return c.createExternalRouteRef}}),t.o(c,"createPlugin")&&t.d(o,{createPlugin:function(){return c.createPlugin}}),t.o(c,"createRouteRef")&&t.d(o,{createRouteRef:function(){return c.createRouteRef}}),t.o(c,"useApi")&&t.d(o,{useApi:function(){return c.useApi}}),t.o(c,"useApiHolder")&&t.d(o,{useApiHolder:function(){return c.useApiHolder}}),t.o(c,"useRouteRef")&&t.d(o,{useRouteRef:function(){return c.useRouteRef}}),t.o(c,"useRouteRefParams")&&t.d(o,{useRouteRefParams:function(){return c.useRouteRefParams}});var u=t(96896),d=t(82772)},96896:function(X,o,t){"use strict";t.d(o,{r:function(){return e}});class r{constructor(h){q(this,"storedOutput");this.config=h}getId(){return this.config.id}getApis(){var h;return(h=this.config.apis)!=null?h:[]}getFeatureFlags(){return this.output().filter(({type:c})=>c==="feature-flag").map(({name:c})=>({name:c}))}get routes(){var h;return(h=this.config.routes)!=null?h:{}}get externalRoutes(){var h;return(h=this.config.externalRoutes)!=null?h:{}}output(){if(this.storedOutput)return this.storedOutput;const h=new Array;if(this.storedOutput=h,this.config.featureFlags)for(const c of this.config.featureFlags)h.push({type:"feature-flag",name:c.name});return this.config.register?(this.config.register({featureFlags:{register(c){h.push({type:"feature-flag",name:c})}}}),this.storedOutput):h}provide(h){return h.expose(this)}toString(){return`plugin{${this.config.id}}`}}function e(l){return new r(l)}},82772:function(X,o,t){var B,T,G;"use strict";t.d(o,{x8:function(){return y},NT:function(){return h},tg:function(){return i},Oi:function(){return S}});var r=t(76241);const e=(0,r.uW)("route-ref-type",()=>Symbol("route-ref-type"));class l{constructor(D,b){q(this,B,"absolute");this.id=D,this.params=b}get title(){return this.id}toString(){return`routeRef{type=absolute,id=${this.id}}`}}B=e;function h(H){var D;return new l(H.id,(D=H.params)!=null?D:[])}const c=/^\w+$/;class s{constructor(D,b,I,K){q(this,T,"sub");this.id=D,this.path=b,this.parent=I,this.params=K}toString(){return`routeRef{type=sub,id=${this.id}}`}}T=e;function u(H){const{id:D,path:b,parent:I}=H,K=b.split("/").filter(At=>At.startsWith(":")).map(At=>At.substring(1)),V=[...I.params,...K];if(I.params.some(At=>K.includes(At)))throw new Error("SubRouteRef may not have params that overlap with its parent");if(!b.startsWith("/"))throw new Error(`SubRouteRef path must start with '/', got '${b}'`);if(b.endsWith("/"))throw new Error(`SubRouteRef path must not end with '/', got '${b}'`);for(const At of K)if(!c.test(At))throw new Error(`SubRouteRef path has invalid param, got '${At}'`);return new s(D,b,I,V)}class d{constructor(D,b,I){q(this,G,"external");this.id=D,this.params=b,this.optional=I}toString(){return`routeRef{type=external,id=${this.id}}`}}G=e;function y(H){var D;return new d(H.id,(D=H.params)!=null?D:[],Boolean(H.optional))}var m=t(2784),E=t(10289);function i(H){const D=(0,E.TH)(),b=(0,r.Vt)("routing-context");if(!b)throw new Error("Routing context is not available");const I=b.atVersion(1),K=(0,m.useMemo)(()=>I&&I.resolve(H,D),[I,H,D]);if(!b)throw new Error("useRouteRef used outside of routing context");if(!I)throw new Error("RoutingContext v1 not available");const V="optional"in H&&H.optional;if(!K&&!V)throw new Error(`No path for ${H}`);return K}function S(H){return(0,E.UO)()}},63865:function(X,o,t){"use strict";var r={};t.r(r),t.d(r,{TechDocsPlugin:function(){return xt}});var e=t(2784),l=t(9832),h=t(10289),c=t(49208),s=t(36964);const u=(0,s.createApiRef)({id:"plugin.permission.api"});var d;(function(A){const L="DENY";A.DENY=L;const z="ALLOW";A.ALLOW=z;const rt="CONDITIONAL";A.CONDITIONAL=rt})(d||(d={}));var y=t(10179),m=t(96279),E=t.n(m),i=t(9571),S=t(30195);const B=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(B)})).or(S.z.object({allOf:S.z.array(B)})).or(S.z.object({not:B}))),T=S.z.array(S.z.object({id:S.z.string(),result:S.z.literal(d.ALLOW).or(S.z.literal(d.DENY))}).or(S.z.object({id:S.z.string(),result:S.z.literal(d.CONDITIONAL),conditions:B})));class G{constructor(L){q(this,"enabled");q(this,"discovery");var z;this.discovery=L.discovery,this.enabled=(z=L.config.getOptionalBoolean("permission.enabled"))!=null?z:!1}async authorize(L,z){if(!this.enabled)return L.map($t=>({result:d.ALLOW}));const rt=L.map($t=>({id:i.Z(),...$t})),yt=await this.discovery.getBaseUrl("permission"),Mt=await E()(`${yt}/authorize`,{method:"POST",body:JSON.stringify(rt),headers:{...this.getAuthorizationHeader(z==null?void 0:z.token),"content-type":"application/json"}});if(!Mt.ok)throw await y.VL.fromResponse(Mt);const Pt=await Mt.json();this.assertValidResponses(rt,Pt);const Gt=Pt.reduce(($t,ue)=>($t[ue.id]=ue,$t),{});return rt.map($t=>Gt[$t.id])}getAuthorizationHeader(L){return L?{Authorization:`Bearer ${L}`}:{}}assertValidResponses(L,z){const yt=T.parse(z).map(Pt=>Pt.id);if(!L.every(Pt=>yt.includes(Pt.id)))throw new Error("Unexpected authorization response from permission-backend")}}class H{constructor(L,z){this.permissionClient=L,this.identityApi=z}static create(L){const{config:z,discovery:rt,identity:yt}=L,Mt=new G({discovery:rt,config:z});return new H(Mt,yt)}async authorize(L){return(await this.permissionClient.authorize([L],{token:await this.identityApi.getIdToken()}))[0]}}const D=(A,L)=>{const z=useApi(permissionApiRef),{loading:rt,error:yt,value:Mt}=useAsync(async()=>{const{result:Pt}=await z.authorize({permission:A,resourceRef:L});return Pt},[z,A,L]);return rt?{loading:!0,allowed:!1}:yt?{error:yt,loading:!1,allowed:!1}:{loading:!1,allowed:Mt===AuthorizeResult.ALLOW}},b=A=>{const{permission:L,resourceRef:z,errorComponent:rt,...yt}=A,Mt=usePermission(L,z),Pt=useApp(),{NotFoundErrorPage:Gt}=Pt.getComponents();let $t=rt===void 0?React.createElement(Gt,null):rt;return Mt.loading?$t=null:Mt.allowed&&($t=A.element),React.createElement(Route,{...yt,element:$t})},I=[(0,s.createApiFactory)({api:s.discoveryApiRef,deps:{configApi:s.configApiRef},factory:({configApi:A})=>c.UrlPatternDiscovery.compile(`${A.getString("backend.baseUrl")}/api/{{ pluginId }}`)}),(0,s.createApiFactory)({api:s.alertApiRef,deps:{},factory:()=>new c.AlertApiForwarder}),(0,s.createApiFactory)({api:s.analyticsApiRef,deps:{},factory:()=>new c.NoOpAnalyticsApi}),(0,s.createApiFactory)({api:s.errorApiRef,deps:{alertApi:s.alertApiRef},factory:({alertApi:A})=>{const L=new c.ErrorAlerter(A,new c.ErrorApiForwarder);return c.UnhandledErrorForwarder.forward(L,{hidden:!1}),L}}),(0,s.createApiFactory)({api:s.storageApiRef,deps:{errorApi:s.errorApiRef},factory:({errorApi:A})=>c.WebStorage.create({errorApi:A})}),(0,s.createApiFactory)({api:s.fetchApiRef,deps:{configApi:s.configApiRef,identityApi:s.identityApiRef,discoveryApi:s.discoveryApiRef},factory:({configApi:A,identityApi:L,discoveryApi:z})=>(0,c.createFetchApi)({middleware:[c.FetchMiddlewares.resolvePluginProtocol({discoveryApi:z}),c.FetchMiddlewares.injectIdentityAuth({identityApi:L,config:A})]})}),(0,s.createApiFactory)({api:s.oauthRequestApiRef,deps:{},factory:()=>new c.OAuthRequestManager}),(0,s.createApiFactory)({api:s.googleAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:A,oauthRequestApi:L,configApi:z})=>c.GoogleAuth.create({discoveryApi:A,oauthRequestApi:L,environment:z.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.microsoftAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:A,oauthRequestApi:L,configApi:z})=>c.MicrosoftAuth.create({discoveryApi:A,oauthRequestApi:L,environment:z.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.githubAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:A,oauthRequestApi:L,configApi:z})=>c.GithubAuth.create({discoveryApi:A,oauthRequestApi:L,defaultScopes:["read:user"],environment:z.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.oktaAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:A,oauthRequestApi:L,configApi:z})=>c.OktaAuth.create({discoveryApi:A,oauthRequestApi:L,environment:z.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.gitlabAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:A,oauthRequestApi:L,configApi:z})=>c.GitlabAuth.create({discoveryApi:A,oauthRequestApi:L,environment:z.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.auth0AuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:A,oauthRequestApi:L,configApi:z})=>c.Auth0Auth.create({discoveryApi:A,oauthRequestApi:L,environment:z.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.oauth2ApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:A,oauthRequestApi:L,configApi:z})=>c.OAuth2.create({discoveryApi:A,oauthRequestApi:L,environment:z.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.samlAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,configApi:s.configApiRef},factory:({discoveryApi:A,configApi:L})=>c.SamlAuth.create({discoveryApi:A,environment:L.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.oneloginAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:A,oauthRequestApi:L,configApi:z})=>c.OneLoginAuth.create({discoveryApi:A,oauthRequestApi:L,environment:z.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.oidcAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:A,oauthRequestApi:L,configApi:z})=>c.OAuth2.create({discoveryApi:A,oauthRequestApi:L,provider:{id:"oidc",title:"Your Identity Provider",icon:()=>null},environment:z.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.bitbucketAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:A,oauthRequestApi:L,configApi:z})=>c.BitbucketAuth.create({discoveryApi:A,oauthRequestApi:L,defaultScopes:["team"],environment:z.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.atlassianAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:A,oauthRequestApi:L,configApi:z})=>c.AtlassianAuth.create({discoveryApi:A,oauthRequestApi:L,environment:z.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:u,deps:{discovery:s.discoveryApiRef,identity:s.identityApiRef,config:s.configApiRef},factory:({config:A,discovery:L,identity:z})=>H.create({config:A,discovery:L,identity:z})})];var K=t(77277),V=t(41682),st=t(62833);function At({children:A}){return(0,h.GV)()?e.createElement(e.Fragment,null,A):e.createElement(h.VA,null,A)}const zt=()=>e.createElement(V.ErrorPage,{status:"404",statusMessage:"PAGE NOT FOUND"}),ht=({step:A,error:L})=>{let z="";return A==="load-config"?z=`The configuration failed to load, someone should have a look at this error: ${L.message}`:A==="load-chunk"&&(z=`Lazy loaded chunk failed to load, try to reload the page: ${L.message}`),e.createElement(At,null,e.createElement(V.ErrorPage,{status:"501",statusMessage:z}))},jt=({error:A,resetError:L,plugin:z})=>e.createElement(V.ErrorPanel,{title:`Error in ${z==null?void 0:z.getId()}`,defaultExpanded:!0,error:A},e.createElement(K.Z,{variant:"outlined",onClick:L},"Retry")),Ot={Progress:V.Progress,Router:st.VK,NotFoundErrorPage:zt,BootErrorPage:ht,ErrorBoundaryFallback:jt};var Jt=t(43642),ae=t(80079),Kt=t(90941),pe=t(32915),se=t(40562),le=t(21853),Ae=t(60744),Me=t(66569),ye=t(30254),ve=t(13384),de=t(15933),Ne=t(58838),Ue=t(86737),Ie=t(4989),Le=t(44407),me=t(18628),Re=t(84219),je=t(98685),Ft=t(39781);const oe={brokenImage:ae.Z,catalog:me.Z,scaffolder:pe.Z,techdocs:se.Z,search:le.Z,chat:Ae.Z,dashboard:Me.Z,docs:ye.Z,email:ve.Z,github:Ne.Z,group:Re.Z,help:Ue.Z,"kind:api":de.Z,"kind:component":Le.Z,"kind:domain":Jt.Z,"kind:group":Re.Z,"kind:location":Ie.Z,"kind:system":Kt.Z,"kind:user":je.Z,user:je.Z,warning:Ft.Z};var ot=t(73689),P=t(48032);const v={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")`},N={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 F(A,L){const rt=`linear-gradient(90deg, ${(A.length===1?[A[0],A[0]]:A).join(", ")})`,yt=`${L}, ${rt}`;return{colors:A,shape:L,backgroundImage:yt}}const j={home:F(N.teal,v.wave),documentation:F(N.pinkSea,v.wave2),tool:F(N.purpleSky,v.round),service:F(N.marineBlue,v.wave),website:F(N.veryBlue,v.wave),library:F(N.rubyRed,v.wave),other:F(N.darkGrey,v.wave),app:F(N.toastyOrange,v.wave),apis:F(N.teal,v.wave2)},nt='"Helvetica Neue", Helvetica, Roboto, Arial, sans-serif';function gt(A){const{palette:L,fontFamily:z=nt,defaultPageTheme:rt,pageTheme:yt=j}=A;if(!yt[rt])throw new Error(`${rt} is not defined in pageTheme.`);return{palette:L,props:{MuiGrid:{spacing:2},MuiSwitch:{color:"primary"}},typography:{fontFamily:z,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:yt[rt],getPageTheme:({themeId:Mt})=>{var Pt;return(Pt=yt[Mt])!=null?Pt:yt[rt]}}}function ct(A){return{MuiCssBaseline:{"@global":{html:{height:"100%",fontFamily:A.typography.fontFamily},body:{height:"100%",fontFamily:A.typography.fontFamily,"overscroll-behavior-y":"none"},a:{color:"inherit",textDecoration:"none"}}},MuiTableRow:{root:{"&:nth-of-type(odd)":{backgroundColor:A.palette.background.default}},hover:{"&:hover":{cursor:"pointer"}},head:{"&:nth-of-type(odd)":{backgroundColor:A.palette.background.paper}}},MuiTableCell:{root:{wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:A.spacing(3,2,3,2.5),borderBottom:0},sizeSmall:{padding:A.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:A.palette.link,minHeight:24,textTransform:"initial",letterSpacing:"0.07em","&:hover":{color:(0,P.darken)(A.palette.link,.3),background:(0,P.lighten)(A.palette.link,.95)},[A.breakpoints.up("md")]:{minWidth:120,fontSize:A.typography.pxToRem(14),fontWeight:500}},textColorPrimary:{color:A.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:A.spacing(1),marginBottom:A.spacing(1),color:A.palette.grey[900]},outlined:{color:A.palette.text.primary},label:{lineHeight:`${A.spacing(2.5)}px`,fontWeight:A.typography.fontWeightMedium,fontSize:`${A.spacing(1.75)}px`},labelSmall:{fontSize:`${A.spacing(1.5)}px`},deleteIcon:{color:A.palette.grey[500],width:`${A.spacing(3)}px`,height:`${A.spacing(3)}px`,margin:`0 ${A.spacing(.75)}px 0 -${A.spacing(.75)}px`},deleteIconSmall:{width:`${A.spacing(2)}px`,height:`${A.spacing(2)}px`,margin:`0 ${A.spacing(.5)}px 0 -${A.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 Dt(A){const L=gt(A),z=(0,ot.Z)(L),rt=ct(z);return{...z,overrides:rt}}var Zt=t(34505);const re=Dt({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:Zt.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:j}),ee=Dt({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:Zt.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:j});var Lt=t(98192),Tt=t(15222),ce=t(41547),dt=t(87561);const Ct=[{id:"light",title:"Light Theme",variant:"light",icon:e.createElement(Tt.Z,null),Provider:({children:A})=>e.createElement(ce.Z,{theme:re},e.createElement(dt.ZP,null,A))},{id:"dark",title:"Dark Theme",variant:"dark",icon:e.createElement(Lt.Z,null),Provider:({children:A})=>e.createElement(ce.Z,{theme:ee},e.createElement(dt.ZP,null,A))}];function Yt(A){var L,z,rt;return(0,c.createSpecializedApp)({...A,apis:(L=A==null?void 0:A.apis)!=null?L:[],bindRoutes:A==null?void 0:A.bindRoutes,components:{...Ot,...A==null?void 0:A.components},configLoader:A==null?void 0:A.configLoader,defaultApis:I,icons:{...oe,...A==null?void 0:A.icons},plugins:(z=A==null?void 0:A.plugins)!=null?z:[],themes:(rt=A==null?void 0:A.themes)!=null?rt:Ct})}var Vt=t(39398),vt=t(49782),Nt=t(79692);const Wt=(0,Nt.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",marginBottom:"1rem"}}),he=({result:A})=>{const L=Wt();return React.createElement(Link,{to:A.location},React.createElement(ListItem,{alignItems:"flex-start",className:L.flexContainer},React.createElement(ListItemText,{className:L.itemText,primaryTypographyProps:{variant:"h6"},primary:A.title,secondary:A.text}),React.createElement(Box,null,A.kind&&React.createElement(Chip,{label:`Kind: ${A.kind}`,size:"small"}),A.lifecycle&&React.createElement(Chip,{label:`Lifecycle: ${A.lifecycle}`,size:"small"}))),React.createElement(Divider,{component:"li"}))};var qt=t(91730),J=t(17499),R=t(52890),O=t(85653),Q=t(95544),tt=t(99688),Et=t(12231),mt=t(86136),Bt=t(49378),bt=t(85256),Ee=t(61837),Xe=t(79784),on=t(50758),lt=t(49166),Z=t(43054);const _=(0,Nt.Z)({button:{color:"white"}}),pt=({UNSTABLE_extraContextMenuItems:A,UNSTABLE_contextMenuOptions:L,onUnregisterEntity:z})=>{var xe;const[rt,yt]=(0,e.useState)(),Mt=_(),Pt=Ce=>{yt(Ce.currentTarget)},Gt=()=>{yt(void 0)},$t=A&&[...A.map(Ce=>e.createElement(Et.Z,{key:Ce.title,onClick:()=>{Gt(),Ce.onClick()}},e.createElement(mt.Z,null,e.createElement(Ce.Icon,{fontSize:"small"})),e.createElement(Bt.Z,{primary:Ce.title}))),e.createElement(bt.Z,{key:"the divider is here!"})],ue=(xe=L==null?void 0:L.disableUnregister)!=null?xe:!1;return e.createElement(e.Fragment,null,e.createElement(Ee.Z,{"aria-label":"more","aria-controls":"long-menu","aria-haspopup":"true",onClick:Pt,"data-testid":"menu-button",className:Mt.button},e.createElement(Z.Z,null)),e.createElement(Xe.ZP,{open:Boolean(rt),onClose:Gt,anchorEl:rt,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}},e.createElement(on.Z,null,$t,e.createElement(Et.Z,{onClick:()=>{Gt(),z()},disabled:ue},e.createElement(mt.Z,null,e.createElement(lt.Z,{fontSize:"small"})),e.createElement(Bt.Z,{primary:"Unregister entity"})))))},Ht="plugin.catalog.entityLayoutRoute",_t=()=>null;(0,s.attachComponentData)(_t,Ht,!0),(0,s.attachComponentData)(_t,"core.gatherMountPoints",!0);const ge=({entity:A,title:L})=>e.createElement(Q.Z,{display:"inline-flex",alignItems:"center",height:"1em",maxWidth:"100%"},e.createElement(Q.Z,{component:"span",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},L),A&&e.createElement(O.FavoriteEntity,{entity:A})),Be=(A,L,z,rt)=>{var Gt,$t,ue,xe,Ce;const yt=(Gt=A!=null?A:rt==null?void 0:rt.kind)!=null?Gt:"",Mt=($t=L!=null?L:rt==null?void 0:rt.metadata.namespace)!=null?$t:"";return{headerTitle:`${(Ce=(xe=(ue=rt==null?void 0:rt.metadata.title)!=null?ue:z)!=null?xe:rt==null?void 0:rt.metadata.name)!=null?Ce:""}${Mt&&Mt!==R.sk?` in ${Mt}`:""}`,headerType:(()=>{let Te=yt.toLocaleLowerCase("en-US");return rt&&rt.spec&&"type"in rt.spec&&(Te+=" \u2014 ",Te+=rt.spec.type.toLocaleLowerCase("en-US")),Te})()}},an=({entity:A})=>{var z;const L=(0,O.getEntityRelations)(A,R.S4);return e.createElement(e.Fragment,null,L.length>0&&e.createElement(V.HeaderLabel,{label:"Owner",value:e.createElement(O.EntityRefLinks,{entityRefs:L,defaultKind:"Group",color:"inherit"})}),((z=A.spec)==null?void 0:z.lifecycle)&&e.createElement(V.HeaderLabel,{label:"Lifecycle",value:A.spec.lifecycle}))},hn=({UNSTABLE_extraContextMenuItems:A,UNSTABLE_contextMenuOptions:L,children:z})=>{var jn,Vn,la;const{kind:rt,namespace:yt,name:Mt}=(0,O.useEntityCompoundName)(),{entity:Pt,loading:Gt,error:$t}=(0,e.useContext)(O.EntityContext),ue=(0,s.useElementFilter)(z,Ia=>Ia.selectByComponentData({key:Ht,withStrictError:"Child of EntityLayout must be an EntityLayout.Route"}).getElements().flatMap(({props:xn})=>xn.if&&Pt&&!xn.if(Pt)?[]:[{path:xn.path,title:xn.title,children:xn.children,tabProps:xn.tabProps}]),[Pt]),{headerTitle:xe,headerType:Ce}=Be(rt,yt,Mt,Pt),[Te,cn]=(0,e.useState)(!1),un=(0,h.s0)(),Mn=async()=>{cn(!1),un("/")},er=()=>cn(!0);return e.createElement(V.Page,{themeId:(la=(Vn=(jn=Pt==null?void 0:Pt.spec)==null?void 0:jn.type)==null?void 0:Vn.toString())!=null?la:"home"},e.createElement(V.Header,{title:e.createElement(ge,{title:xe,entity:Pt}),pageTitleOverride:xe,type:Ce},Pt&&e.createElement(e.Fragment,null,e.createElement(an,{entity:Pt}),e.createElement(pt,{UNSTABLE_extraContextMenuItems:A,UNSTABLE_contextMenuOptions:L,onUnregisterEntity:er}))),Gt&&e.createElement(V.Progress,null),Pt&&e.createElement(V.RoutedTabs,{routes:ue}),$t&&e.createElement(V.Content,null,e.createElement(tt.Z,{severity:"error"},$t.toString())),!Gt&&!$t&&!Pt&&e.createElement(V.Content,null,e.createElement(V.WarningPanel,{title:"Entity not found"},"There is no ",rt," with the requested"," ",e.createElement(V.Link,{to:"https://backstage.io/docs/features/software-catalog/references"},"kind, namespace, and name"),".")),e.createElement(O.UnregisterEntityDialog,{open:Te,entity:Pt,onConfirm:Mn,onClose:()=>cn(!1)}))};hn.Route=_t;const Xn=({open:A,onClose:L,onConfirm:z,entity:rt})=>{const[yt,Mt]=useState(!1),Pt=useApi(catalogApiRef),Gt=useApi(alertApiRef),$t=async()=>{Mt(!0);try{const ue=rt.metadata.uid;await Pt.removeEntityByUid(ue),z()}catch(ue){assertError(ue),Gt.post({message:ue.message})}finally{Mt(!1)}};return React.createElement(Dialog,{open:A,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:yt,onClick:$t},"Delete"),React.createElement(Button,{onClick:L,color:"primary"},"Cancel")))},Pn=A=>{var L,z;return((z=(L=A==null?void 0:A.metadata)==null?void 0:L.annotations)==null?void 0:z["backstage.io/orphan"])==="true"},In=()=>{const A=useNavigate(),L=useRouteRef(catalogRouteRef),[z,rt]=useState(!1),{entity:yt}=useEntity(),Mt=async()=>{rt(!1),A(L())};return React.createElement(React.Fragment,null,React.createElement(Alert,{severity:"warning",onClick:()=>rt(!0)},"This entity is not referenced by any location and is therefore not receiving updates. Click here to delete."),React.createElement(DeleteEntityDialog,{open:z,entity:yt,onConfirm:Mt,onClose:()=>rt(!1)}))};var fe=t(30001);const Ze=A=>A.error&&A.level==="error"&&A.type===ENTITY_STATUS_CATALOG_PROCESSING_TYPE;async function sn(A,L){return{items:(await L.getEntityAncestors({entityRef:A})).items.map(yt=>{var Gt,$t;return{errors:(($t=(Gt=yt.entity.status)==null?void 0:Gt.items)!=null?$t:[]).filter(Ze).map(ue=>ue.error).filter(ue=>Boolean(ue)),entity:yt.entity}}).filter(yt=>yt.errors.length>0)}}const On=async(A,L)=>{const z=L.apis.get(catalogApiRef);if(!z)throw new Error(`No implementation available for ${catalogApiRef}`);return(await sn(stringifyEntityRef(A),z)).items.length>0},Ve=()=>{const{entity:A}=useEntity(),L=stringifyEntityRef(A),z=useApi(catalogApiRef),{loading:rt,error:yt,value:Mt}=useAsync(async()=>sn(L,z),[L,z]);return yt?React.createElement(Box,{mb:1},React.createElement(ResponseErrorPanel,{error:yt})):rt||!Mt?null:React.createElement(React.Fragment,null,Mt.items.map((Pt,Gt)=>React.createElement(Box,{key:Gt,mb:1},!compareEntityToRef(A,stringifyEntityRef(Pt.entity))&&React.createElement(Box,{p:1},"The error below originates from"," ",React.createElement(EntityRefLink,{entityRef:Pt.entity})),Pt.errors.map(($t,ue)=>React.createElement(ResponseErrorPanel,{key:ue,error:$t})))))};var Un=t(18671);const or=(A,L,z=0)=>{if(!A)return z;const rt=L.findIndex(yt=>yt.id===A.route.path);return~rt?rt:z},$n={Layout:({children:A})=>{var Ce,Te,cn;const L=[],z=[],rt=(0,h.UO)(),yt=(0,h.s0)();e.Children.forEach(A,un=>{if(!e.isValidElement(un))return;if(un.type!==$n.Content)throw new Error("This component only accepts Content elements as direct children. Check the code of the EntityPage.");const Mn=un.props.path;z.push({id:Mn,label:un.props.title}),L.push({path:Mn,element:un.props.element})}),((Te=(Ce=L==null?void 0:L[0])==null?void 0:Ce.path)!=null?Te:"")!==""&&L.push({path:"/*",element:e.createElement(h.Fg,{to:L[0].path})});const[Mt]=(cn=(0,h.fp)(L,`/${rt["*"]}`))!=null?cn:[],Pt=or(Mt,z),Gt=z[Pt],$t=Gt==null?void 0:Gt.label,ue=un=>yt(z[un].id.replace(/\/\*$/,"").replace(/^\//,"")),xe=(0,h.V$)(L);return Gt?e.createElement(e.Fragment,null,e.createElement(V.HeaderTabs,{tabs:z,selectedIndex:Pt,onChange:ue}),e.createElement(V.Content,null,e.createElement(Un.q,{title:$t}),xe)):null},Content:A=>null},Rr=({entity:A,title:L})=>e.createElement(Q.Z,{display:"inline-flex",alignItems:"center",height:"1em"},L,A&&e.createElement(O.FavoriteEntity,{entity:A})),Zn=({entity:A})=>{var z;const L=(0,O.getEntityRelations)(A,R.S4);return e.createElement(e.Fragment,null,L.length>0&&e.createElement(V.HeaderLabel,{label:"Owner",value:e.createElement(O.EntityRefLinks,{entityRefs:L,defaultKind:"Group",color:"inherit"})}),((z=A.spec)==null?void 0:z.lifecycle)&&e.createElement(V.HeaderLabel,{label:"Lifecycle",value:A.spec.lifecycle}))},wn=(A,L,z,rt)=>({headerTitle:`${z}${L&&L!==R.sk?` in ${L}`:""}`,headerType:(()=>{let yt=A.toLocaleLowerCase("en-US");return rt&&rt.spec&&"type"in rt.spec&&(yt+=" \u2014 ",yt+=rt.spec.type.toLocaleLowerCase("en-US")),yt})()}),sr=({children:A,UNSTABLE_extraContextMenuItems:L,UNSTABLE_contextMenuOptions:z})=>{var er,jn,Vn;const{kind:rt,namespace:yt,name:Mt}=(0,O.useEntityCompoundName)(),{entity:Pt,loading:Gt,error:$t}=(0,e.useContext)(O.EntityContext),{headerTitle:ue,headerType:xe}=wn(rt,yt,Mt,Pt),[Ce,Te]=(0,e.useState)(!1),cn=(0,h.s0)(),un=async()=>{Te(!1),cn("/")},Mn=()=>Te(!0);return e.createElement(V.Page,{themeId:(Vn=(jn=(er=Pt==null?void 0:Pt.spec)==null?void 0:er.type)==null?void 0:jn.toString())!=null?Vn:"home"},e.createElement(V.Header,{title:e.createElement(Rr,{title:ue,entity:Pt}),pageTitleOverride:ue,type:xe},Pt&&e.createElement(e.Fragment,null,e.createElement(Zn,{entity:Pt}),e.createElement(pt,{UNSTABLE_extraContextMenuItems:L,UNSTABLE_contextMenuOptions:z,onUnregisterEntity:Mn}))),Gt&&e.createElement(V.Content,null,e.createElement(V.Progress,null)),Pt&&e.createElement($n.Layout,null,A),$t&&e.createElement(V.Content,null,e.createElement(V.ResponseErrorPanel,{error:$t})),!Gt&&!$t&&!Pt&&e.createElement(V.Content,null,e.createElement(V.WarningPanel,{title:"Entity not found"},"There is no ",rt," with the requested"," ",e.createElement(V.Link,{to:"https://backstage.io/docs/features/software-catalog/references"},"kind, namespace, and name"),".")),e.createElement(O.UnregisterEntityDialog,{open:Ce,entity:Pt,onConfirm:un,onClose:()=>Te(!1)}))};sr.Content=$n.Content;var ir=t(64279);const lr="core.backstage.entitySwitch",kn=A=>null;(0,s.attachComponentData)(kn,lr,!0);const Sr=({children:A})=>{var Mt,Pt;const{entity:L}=(0,O.useEntity)(),z=(0,s.useApiHolder)(),rt=(0,s.useElementFilter)(A,Gt=>Gt.selectByComponentData({key:lr,withStrictError:"Child of EntitySwitch is not an EntitySwitch.Case"}).getElements().flatMap($t=>{var Ce;const{if:ue,children:xe}=$t.props;return[{if:(Ce=ue==null?void 0:ue(L,{apis:z}))!=null?Ce:!0,children:xe}]}),[z,L]);return rt.some(Gt=>typeof Gt.if=="object"&&"then"in Gt.if)?e.createElement(cr,{results:rt}):(Pt=(Mt=rt.find(Gt=>Gt.if))==null?void 0:Mt.children)!=null?Pt:null};function cr({results:A}){const{loading:L,value:z}=(0,ir.default)(async()=>{var yt;const rt=A.map(async({if:Mt,children:Pt})=>{try{if(await Mt)return Pt}catch{}return null});return(yt=(await Promise.all(rt)).find(Boolean))!=null?yt:null},[A]);return L||!z?null:z}Sr.Case=kn;var Wn=t(26997),Cr=t(7758),ur=t(219);const dr=(0,Nt.Z)(A=>({illo:{maxWidth:"60%",top:100,right:20,position:"absolute",[A.breakpoints.down("xs")]:{maxWidth:"96%",position:"relative",top:"unset",right:"unset",margin:`${A.spacing(10)}px auto ${A.spacing(4)}px`}}})),fr=()=>{const A=dr();return React.createElement("img",{src:IlloSvgUrl,className:A.illo,alt:"Illustration on entity not found page"})},qn=(0,Nt.Z)(A=>({container:{paddingTop:A.spacing(24),paddingLeft:A.spacing(8),[A.breakpoints.down("xs")]:{padding:A.spacing(2)}},title:{paddingBottom:A.spacing(2),[A.breakpoints.down("xs")]:{fontSize:32}},body:{paddingBottom:A.spacing(6),[A.breakpoints.down("xs")]:{paddingBottom:A.spacing(5)}}})),zn=()=>{const A=qn();return React.createElement(Grid,{container:!0,spacing:0,className:A.container},React.createElement(Illo,null),React.createElement(Grid,{item:!0,xs:12,sm:6},React.createElement(Typography,{variant:"h2",className:A.title},"Entity was not found"),React.createElement(Typography,{variant:"body1",className:A.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")))},mr=()=>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")))})),An=({EntityPage:A})=>{const{entity:L,loading:z,error:rt}=useEntity();return z?React.createElement(EntityPageLayout,null):rt||!L?React.createElement(EntityNotFound,null):React.createElement(A,null)},gn=()=>{var Pt;const{optionalNamespaceAndName:A,"*":L}=useParams(),[z,rt]=A.split(":").reverse(),yt=(Pt=rt==null?void 0:rt.toLocaleLowerCase("en-US"))!=null?Pt:ENTITY_DEFAULT_NAMESPACE,Mt=L?`/${L}`:"";return React.createElement(Navigate,{to:`../../${yt}/component/${z}${Mt}`})},Tr=A=>React.createElement(AsyncEntityProvider,{...useEntityFromUrl(),...A}),Pr=({EntityPage:A=mr})=>React.createElement(Routes,null,React.createElement(Route,{path:"/",element:React.createElement(CatalogPage,null)}),React.createElement(Route,{path:"/:namespace/:kind/:name",element:React.createElement(Tr,null,React.createElement(An,{EntityPage:A}))}),React.createElement(Route,{path:"Component/:optionalNamespaceAndName/*",element:React.createElement(gn,null)}));var hr=t(47851);const tn=(0,s.createPlugin)({id:"catalog",apis:[(0,s.createApiFactory)({api:O.Ah,deps:{discoveryApi:s.discoveryApiRef,fetchApi:s.fetchApiRef},factory:({discoveryApi:A,fetchApi:L})=>new fe.MS({discoveryApi:A,fetchApi:L})}),(0,s.createApiFactory)({api:O.starredEntitiesApiRef,deps:{storageApi:s.storageApiRef},factory:({storageApi:A})=>new O.DefaultStarredEntitiesApi({storageApi:A})})],routes:{catalogIndex:O.M4,catalogEntity:O.wi},externalRoutes:{createComponent:hr.y,viewTechDoc:hr.j}}),Ir=tn.provide((0,s.createRoutableExtension)({name:"CatalogIndexPage",component:()=>Promise.resolve().then(t.bind(t,7758)).then(A=>A.CatalogPage),mountPoint:O.M4})),_n=tn.provide((0,s.createRoutableExtension)({name:"CatalogEntityPage",component:()=>t.e(6650).then(t.bind(t,76650)).then(A=>A.CatalogEntityPage),mountPoint:O.wi})),Lr=tn.provide((0,s.createComponentExtension)({name:"EntityAboutCard",component:{lazy:()=>Promise.resolve().then(t.bind(t,39398)).then(A=>A.AboutCard)}})),Or=tn.provide((0,s.createComponentExtension)({name:"EntityLinksCard",component:{lazy:()=>t.e(1959).then(t.bind(t,81959)).then(A=>A.EntityLinksCard)}})),xr=tn.provide((0,s.createComponentExtension)({name:"EntityHasSystemsCard",component:{lazy:()=>t.e(390).then(t.bind(t,60390)).then(A=>A.HasSystemsCard)}})),Dr=tn.provide((0,s.createComponentExtension)({name:"EntityHasComponentsCard",component:{lazy:()=>t.e(4022).then(t.bind(t,4022)).then(A=>A.HasComponentsCard)}})),Xr=tn.provide((0,s.createComponentExtension)({name:"EntityHasSubcomponentsCard",component:{lazy:()=>t.e(8792).then(t.bind(t,38792)).then(A=>A.HasSubcomponentsCard)}})),Fr=tn.provide((0,s.createComponentExtension)({name:"EntityHasResourcesCard",component:{lazy:()=>t.e(1553).then(t.bind(t,11553)).then(A=>A.HasResourcesCard)}})),Br=tn.provide((0,s.createComponentExtension)({name:"EntityDependsOnComponentsCard",component:{lazy:()=>t.e(8061).then(t.bind(t,48061)).then(A=>A.DependsOnComponentsCard)}})),kr=tn.provide((0,s.createComponentExtension)({name:"EntityDependencyOfComponentsCard",component:{lazy:()=>t.e(6235).then(t.bind(t,56235)).then(A=>A.DependencyOfComponentsCard)}})),br=tn.provide((0,s.createComponentExtension)({name:"EntityDependsOnResourcesCard",component:{lazy:()=>t.e(9028).then(t.bind(t,59028)).then(A=>A.DependsOnResourcesCard)}})),Mr=tn.provide((0,s.createComponentExtension)({name:"EntitySystemDiagramCard",component:{lazy:()=>t.e(4960).then(t.bind(t,14960)).then(A=>A.SystemDiagramCard)}}));var Bn=t(3337),gr=t(76372);class pr{constructor({configApi:L,discoveryApi:z,identityApi:rt}){q(this,"configApi");q(this,"discoveryApi");q(this,"identityApi");this.configApi=L,this.discoveryApi=z,this.identityApi=rt}async getApiOrigin(){var L;return(L=this.configApi.getOptionalString("techdocs.requestUrl"))!=null?L:await this.discoveryApi.getBaseUrl("techdocs")}async getTechDocsMetadata(L){const{kind:z,namespace:rt,name:yt}=L,Pt=`${await this.getApiOrigin()}/metadata/techdocs/${rt}/${z}/${yt}`,Gt=await this.identityApi.getIdToken(),$t=await fetch(`${Pt}`,{headers:Gt?{Authorization:`Bearer ${Gt}`}:{}});if(!$t.ok)throw await y.VL.fromResponse($t);return await $t.json()}async getEntityMetadata(L){const{kind:z,namespace:rt,name:yt}=L,Pt=`${await this.getApiOrigin()}/metadata/entity/${rt}/${z}/${yt}`,Gt=await this.identityApi.getIdToken(),$t=await fetch(`${Pt}`,{headers:Gt?{Authorization:`Bearer ${Gt}`}:{}});if(!$t.ok)throw await y.VL.fromResponse($t);return await $t.json()}}class yr{constructor({configApi:L,discoveryApi:z,identityApi:rt}){q(this,"configApi");q(this,"discoveryApi");q(this,"identityApi");this.configApi=L,this.discoveryApi=z,this.identityApi=rt}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,z){const{kind:rt,namespace:yt,name:Mt}=L,Gt=`${await this.getStorageUrl()}/${yt}/${rt}/${Mt}/${z}`,$t=await this.identityApi.getIdToken(),ue=await fetch(`${Gt.endsWith("/")?Gt:`${Gt}/`}index.html`,{headers:$t?{Authorization:`Bearer ${$t}`}:{}});let xe="";switch(ue.status){case 404:throw xe="Page not found. ",z||(xe+="This could be because there is no index.md file in the root of the docs directory of this repository."),new y.dR(xe);case 500:throw xe="Could not generate documentation or an error in the TechDocs backend. ",new Error(xe);default:break}return ue.text()}async syncEntityDocs(L,z=()=>{}){const{kind:rt,namespace:yt,name:Mt}=L,Gt=`${await this.getApiOrigin()}/sync/${yt}/${rt}/${Mt}`,$t=await this.identityApi.getIdToken();return new Promise((ue,xe)=>{const Ce=new gr.EventSourcePolyfill(Gt,{withCredentials:!0,headers:$t?{Authorization:`Bearer ${$t}`}:{}});Ce.addEventListener("log",Te=>{Te.data&&z(JSON.parse(Te.data))}),Ce.addEventListener("finish",Te=>{let cn=!1;Te.data&&({updated:cn}=JSON.parse(Te.data)),ue(cn?"updated":"cached")}),Ce.onerror=Te=>{switch(Ce.close(),Te.status){case 404:xe(new y.dR(Te.message));return;default:xe(new Error(Te.data));return}}})}async getBaseUrl(L,z,rt){const{kind:yt,namespace:Mt,name:Pt}=z,$t=`${await this.getApiOrigin()}/static/docs/${Mt}/${yt}/${Pt}/${rt}`;return new URL(L,$t.endsWith("/")?$t:`${$t}/`).toString()}}var Nr=t(71226),Ur=t(95074),Er=t(76635),U=t(83201),M=t(50294),$=t(67430);const k=({columns:A,actions:L})=>{var Ce,Te;const{loading:z,error:rt,entities:yt,filters:Mt}=(0,O.useEntityListProvider)(),{isStarredEntity:Pt,toggleStarredEntity:Gt}=(0,O.useStarredEntities)(),[,$t]=(0,Ur.Z)(),ue=(0,Er.capitalize)((Te=(Ce=Mt.user)==null?void 0:Ce.value)!=null?Te:"all"),xe=[M.createCopyDocsUrlAction($t),M.createStarEntityAction(Pt,Gt)];return rt?e.createElement(V.WarningPanel,{severity:"error",title:"Could not load available documentation."},e.createElement(V.CodeSnippet,{language:"text",text:rt.toString()})):e.createElement(U.DocsTable,{title:ue,entities:yt,loading:z,actions:L||xe,columns:A})};k.columns=$,k.actions=M;var ut=t(1114);class et{getCatalogFilters(){return{"metadata.annotations.backstage.io/techdocs-ref":O.n3}}}const ft=()=>{const{updateFilters:A}=(0,O.useEntityListProvider)();return(0,e.useEffect)(()=>{A({techdocs:new et})},[A]),null},Ut=({initialFilter:A="all",columns:L,actions:z})=>e.createElement(ut.j,null,e.createElement(V.Content,null,e.createElement(V.ContentHeader,{title:""},e.createElement(V.SupportButton,null,"Discover documentation in your ecosystem.")),e.createElement(O.EntityListProvider,null,e.createElement(Wn.q7,null,e.createElement(Wn.Gh,null,e.createElement(ft,null),e.createElement(O.UserListPicker,{initialFilter:A}),e.createElement(O.EntityOwnerPicker,null),e.createElement(O.EntityTagPicker,null)),e.createElement(Wn.Nz,null,e.createElement(k,{actions:z,columns:L}))))));var kt=t(10187);const ne=()=>{const{loading:A,error:L,entities:z}=useEntityListProvider();return L?React.createElement(WarningPanel,{severity:"error",title:"Could not load available documentation."},React.createElement(CodeSnippet,{language:"text",text:L.toString()})):A||!z?React.createElement(Progress,null):(z.sort((rt,yt)=>{var Mt,Pt;return((Mt=rt.metadata.title)!=null?Mt:rt.metadata.name).localeCompare((Pt=yt.metadata.title)!=null?Pt:yt.metadata.name)}),React.createElement(DocsCardGrid,{entities:z}))};var Qt=t(68725);const xt=(0,s.createPlugin)({id:"techdocs",apis:[(0,s.createApiFactory)({api:Bn.D,deps:{configApi:s.configApiRef,discoveryApi:s.discoveryApiRef,identityApi:s.identityApiRef},factory:({configApi:A,discoveryApi:L,identityApi:z})=>new yr({configApi:A,discoveryApi:L,identityApi:z})}),(0,s.createApiFactory)({api:Bn.g,deps:{configApi:s.configApiRef,discoveryApi:s.discoveryApiRef,identityApi:s.identityApiRef},factory:({configApi:A,discoveryApi:L,identityApi:z})=>new pr({configApi:A,discoveryApi:L,identityApi:z})})],routes:{root:Qt._Z,docRoot:Qt.Fw,entityContent:Qt.pd}}),wt=xt.provide((0,s.createRoutableExtension)({name:"TechdocsPage",component:()=>Promise.resolve().then(t.bind(t,94067)).then(A=>A.Router),mountPoint:Qt._Z})),Se=xt.provide((0,s.createRoutableExtension)({name:"EntityTechdocsContent",component:()=>Promise.resolve().then(t.bind(t,94067)).then(A=>A.EmbeddedDocsRouter),mountPoint:Qt.pd})),Oe=xt.provide((0,s.createComponentExtension)({name:"DocsCardGrid",component:{lazy:()=>Promise.resolve().then(t.bind(t,10187)).then(A=>A.DocsCardGrid)}})),be=xt.provide((0,s.createComponentExtension)({name:"DocsTable",component:{lazy:()=>Promise.resolve().then(t.bind(t,83201)).then(A=>A.DocsTable)}})),ke=xt.provide((0,s.createRoutableExtension)({name:"TechDocsCustomHome",component:()=>Promise.resolve().then(t.bind(t,57110)).then(A=>A.TechDocsCustomHome),mountPoint:Qt._Z})),Ke=xt.provide((0,s.createRoutableExtension)({name:"TechDocsIndexPage",component:()=>Promise.resolve().then(t.bind(t,41481)).then(A=>A.TechDocsIndexPage),mountPoint:Qt._Z})),Je=xt.provide((0,s.createRoutableExtension)({name:"TechDocsReaderPage",component:()=>Promise.resolve().then(t.bind(t,31752)).then(A=>A.TechDocsPage),mountPoint:Qt.Fw}));var ln=t(73873),$e=t(94067),pn=t(36356);class Ln{constructor({configApi:L,discoveryApi:z,identityApi:rt}){q(this,"configApi");q(this,"discoveryApi");q(this,"identityApi");this.configApi=L,this.discoveryApi=z,this.identityApi=rt}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,z){const yt=`${await this.getApiOrigin()}/${z}`,Mt=await fetch(`${yt.endsWith("/")?yt:`${yt}/`}index.html`);if(Mt.status===404)throw new Error("Page not found");return Mt.text()}async syncEntityDocs(L){return"cached"}async getBaseUrl(L,z,rt){const yt=await this.getApiOrigin();return new URL(L,`${yt}/${rt}`).toString()}}class we{constructor({configApi:L,discoveryApi:z,identityApi:rt}){q(this,"configApi");q(this,"discoveryApi");q(this,"identityApi");this.configApi=L,this.discoveryApi=z,this.identityApi=rt}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 Ge=[(0,s.createApiFactory)({api:Bn.D,deps:{configApi:s.configApiRef,discoveryApi:s.discoveryApiRef,identityApi:s.identityApiRef},factory:({configApi:A,discoveryApi:L,identityApi:z})=>new Ln({configApi:A,discoveryApi:L,identityApi:z})}),(0,s.createApiFactory)({api:Bn.g,deps:{configApi:s.configApiRef,discoveryApi:s.discoveryApiRef,identityApi:s.identityApiRef},factory:({configApi:A,discoveryApi:L,identityApi:z})=>new we({configApi:A,discoveryApi:L,identityApi:z})}),(0,s.createApiFactory)({api:pn.q3,deps:{configApi:s.configApiRef},factory:({configApi:A})=>pn.ae.fromConfig(A)})];var bn=t(86689),Hn=t(58845);const qr=(0,Nt.Z)({svg:{width:"auto",height:30},path:{fill:"#7df3e1"}});var ta=()=>{const A=qr();return e.createElement("svg",{className:A.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 2079.95 456.05"},e.createElement("path",{className:A.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,Nt.Z)({svg:{width:"auto",height:28},path:{fill:"#7df3e1"}});var ea=()=>{const A=Ra();return e.createElement("svg",{className:A.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 337.46 428.5"},e.createElement("path",{className:A.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 Ca=(0,Nt.Z)({root:{width:V.sidebarConfig.drawerWidthClosed,height:3*V.sidebarConfig.logoHeight,display:"flex",flexFlow:"row nowrap",alignItems:"center",marginBottom:-14},link:{width:V.sidebarConfig.drawerWidthClosed,marginLeft:24}}),na=()=>{const A=Ca(),{isOpen:L}=(0,e.useContext)(V.SidebarContext);return e.createElement("div",{className:A.root},e.createElement(bn.Z,{component:st.OL,to:"/docs/default/component/local/",underline:"none",className:A.link},L?e.createElement(ta,null):e.createElement(ea,null)))},ra=({children:A})=>e.createElement(V.SidebarPage,null,e.createElement(V.Sidebar,null,e.createElement(na,null),e.createElement(V.SidebarDivider,null),e.createElement(V.SidebarItem,{icon:Hn.Z,to:"docs/default/component/local/",text:"Docs Preview"})),A),aa=()=>{const A={site_name:"Live preview environment",site_description:""};return e.createElement(ln.EV,null,({entityRef:L,onReady:z})=>e.createElement(e.Fragment,null,e.createElement(ln.nN,{techDocsMetadata:A,entityRef:L}),e.createElement(V.Content,{"data-testid":"techdocs-content"},e.createElement(ln.Ej,{onReady:z,entityRef:L,withSearch:!1}))))},$r=e.createElement(aa,null),tr=Yt({apis:Ge,plugins:Object.values(r)}),oa=tr.getProvider(),Ta=tr.getRouter(),sa=e.createElement(c.FlatRoutes,null,e.createElement(h.Fg,{key:"/",to:"/docs/default/component/local/"}),e.createElement(h.AW,{path:"/catalog/:namespace/:kind/:name",element:e.createElement(_n,null)}),e.createElement(h.AW,{path:"/docs",element:e.createElement(Ke,null)},e.createElement(Ut,null)),e.createElement(h.AW,{path:"/docs/:namespace/:kind/:name/*",element:e.createElement(Je,null)},$r));var ia=()=>e.createElement(oa,null,e.createElement(Ta,null,e.createElement(ra,null,sa)));l.render(e.createElement(ia,null),document.getElementById("root"))},10179:function(X,o,t){"use strict";t.d(o,{SP:function(){return B},dR:function(){return E},VL:function(){return H},BD:function(){return e}});function r(D){if(typeof D!="object"||D===null||Array.isArray(D))return!1;const b=D;return!(typeof b.name!="string"||b.name===""||typeof b.message!="string")}function e(D){if(typeof D!="object"||D===null||Array.isArray(D))throw new Error(`Encountered invalid error, not an object, got '${D}'`);const b=D;if(typeof b.name!="string"||b.name==="")throw new Error(`Encountered error object without a name, got '${D}'`);if(typeof b.message!="string")throw new Error(`Encountered error object without a message, got '${D}'`)}var l=t(24852);function h(D,b){const I=serializeErrorInternal(D),K={name:"Unknown",message:"<no reason given>",...I};return(b==null?void 0:b.includeStack)||delete K.stack,K}function c(D){const b=(0,l.deserializeError)(D);return D.stack||(b.stack=void 0),b}function s(D){if(r(D)){const b=String(D);return b!=="[object Object]"?b:`${D.name}: ${D.message}`}return`unknown error '${D}'`}class u extends Error{constructor(b,I){var V;let K=b;if(I!==void 0){const st=s(I);K?K+=`; caused by ${st}`:K=`caused by ${st}`}super(K);q(this,"cause");(V=Error.captureStackTrace)==null||V.call(Error,this,this.constructor),this.name=this.constructor.name,this.cause=r(I)?I:void 0}}class d extends null{}class y extends null{}class m extends null{}class E extends u{}class i extends null{}class S extends null{}class B extends u{constructor(b,I){super(b,I);this.name=r(I)?I.name:"Error"}}async function T(D){return G(D)}async function G(D){var b;try{const I=await D.text();if(I){if((b=D.headers.get("content-type"))==null?void 0:b.startsWith("application/json"))try{const K=JSON.parse(I);if(K.error&&K.response)return K}catch{}return{error:{name:"Error",message:`Request failed with status ${D.status} ${D.statusText}, ${I}`},response:{statusCode:D.status}}}}catch{}return{error:{name:"Error",message:`Request failed with status ${D.status} ${D.statusText}`},response:{statusCode:D.status}}}class H extends Error{constructor(b){super(b.message);q(this,"response");q(this,"body");q(this,"cause");this.name="ResponseError",this.response=b.response,this.body=b.data,this.cause=b.cause}static async fromResponse(b){const I=await G(b),K=I.response.statusCode||b.status,V=I.error.name||b.statusText,st=`Request failed with ${K} ${V}`,At=c(I.error);return new H({message:st,response:b,data:I,cause:At})}get data(){return console.warn("ErrorResponse.data is deprecated, use .body instead."),this.body}}},36356:function(X,o,t){var E,i,S,B;"use strict";t.d(o,{nW:function(){return m},ae:function(){return s},q3:function(){return u}});var r=t(36964);const e=(0,r.createApiRef)({id:"core.scmauth"});class l{constructor(H){En(this,E,void 0);Tn(this,E,H)}async getCredentials(H){const D=new URL(H.url),b=te(this,E).find(I=>I.isUrlSupported(D));if(!b)throw new Error(`No authentication provider available for access to '${H.url}'`);return b.getCredentials(H)}}E=new WeakMap;const T=class{constructor(H,D,b){En(this,i,void 0);En(this,S,void 0);En(this,B,void 0);Tn(this,i,H),Tn(this,S,D),Tn(this,B,b)}static createDefaultApiFactory(){return createApiFactory({api:scmAuthApiRef,deps:{github:githubAuthApiRef,gitlab:gitlabAuthApiRef,azure:microsoftAuthApiRef},factory:({github:H,gitlab:D,azure:b})=>T.merge(T.forGithub(H),T.forGitlab(D),T.forAzure(b))})}static forAuthApi(H,D){return new T(H,D.host,D.scopeMapping)}static forGithub(H,D){var I;const b=(I=D==null?void 0:D.host)!=null?I:"github.com";return new T(H,b,{default:["repo","read:org","read:user"],repoWrite:["gist"]})}static forGitlab(H,D){var I;const b=(I=D==null?void 0:D.host)!=null?I:"gitlab.com";return new T(H,b,{default:["read_user","read_api","read_repository"],repoWrite:["write_repository","api"]})}static forAzure(H,D){var I;const b=(I=D==null?void 0:D.host)!=null?I:"dev.azure.com";return new T(H,b,{default:["vso.build","vso.code","vso.graph","vso.project","vso.profile"],repoWrite:["vso.code_manage"]})}static forBitbucket(H,D){var I;const b=(I=D==null?void 0:D.host)!=null?I:"bitbucket.org";return new T(H,b,{default:["account","team","pullrequest","snippet","issue"],repoWrite:["pullrequest:write","snippet:write","issue:write"]})}static merge(...H){return new l(H)}isUrlSupported(H){return H.host===te(this,S)}async getCredentials(H){const{url:D,additionalScope:b,...I}=H,K=te(this,B).default.slice();(b==null?void 0:b.repoWrite)&&K.push(...te(this,B).repoWrite);const V=await te(this,i).getAccessToken(K,I);return{token:V,headers:{Authorization:`Bearer ${V}`}}}};let h=T;i=new WeakMap,S=new WeakMap,B=new WeakMap;var c=t(94594);class s{static fromConfig(H){return c.Lx.fromConfig(H)}}const u=(0,r.createApiRef)({id:"integration.scmintegrations"});var d=t(73250),y=t(2784);const m=G=>{var K;const{type:H}=G,D=(0,r.useApp)(),b=d.Z,I=H&&(K=D.getSystemIcon(H))!=null?K:b;return y.createElement(I,null)}},94594:function(X,o,t){var ee,Lt,Tt,ce,dt,Ct,Yt;"use strict";t.d(o,{Lx:function(){return re},Pb:function(){return me}});var r=t(82717),e=t.n(r),l=t(76635);function h(J){const R=new URL("http://example.com");return R.host=J,R.host===J}function c(J){try{return new URL(J),!0}catch{return!1}}function s(J,R){return{list(){return J},byUrl(O){try{const Q=typeof O=="string"?new URL(O):O;return J.find(tt=>R(tt)===Q.host)}catch{return}},byHost(O){return J.find(Q=>R(Q)===O)}}}function u(J){const{url:R,base:O,lineNumber:Q}=J;try{return new URL(R),R}catch{}let tt;if(R.startsWith("/")){const{filepath:Et}=e()(O);tt=new URL(O);const mt=(0,l.trimEnd)(tt.pathname.substring(0,tt.pathname.length-Et.length),"/");tt.pathname=`${mt}${R}`}else tt=new URL(R,O);return tt.search=new URL(O).search,Q&&(tt.hash=`L${Q}`),tt.toString()}const d="GB",Vt=class{constructor(R,O,Q,tt,Et,mt){En(this,ee,void 0);En(this,Lt,void 0);En(this,Tt,void 0);En(this,ce,void 0);En(this,dt,void 0);En(this,Ct,void 0);En(this,Yt,(...R)=>{const O=new URL(te(this,ee));return O.pathname=R.map(Q=>encodeURIComponent(Q)).join("/"),O});Tn(this,ee,R),Tn(this,Lt,O),Tn(this,Tt,Q),Tn(this,ce,tt),Tn(this,dt,Et),Tn(this,Ct,mt)}static fromRepoUrl(R){var Xe;const O=new URL(R);let Q,tt,Et;const mt=O.pathname.split("/").map(on=>decodeURIComponent(on));if(mt[2]==="_git"?(Q=mt[1],tt=Et=mt[3]):mt[3]==="_git"&&(Q=mt[1],tt=mt[2],Et=mt[4]),!Q||!tt||!Et)throw new Error("Azure URL must point to a git repository");const Bt=(Xe=O.searchParams.get("path"))!=null?Xe:void 0;let bt;const Ee=O.searchParams.get("version");if(Ee){if(Ee.slice(0,2)!=="GB")throw new Error("Azure URL version must point to a git branch");bt=Ee.slice(2)}return new Vt(O.origin,Q,tt,Et,Bt,bt)}toRepoUrl(){let R;return te(this,Tt)===te(this,ce)?R=te(this,Yt).call(this,te(this,Lt),"_git",te(this,ce)):R=te(this,Yt).call(this,te(this,Lt),te(this,Tt),"_git",te(this,ce)),te(this,dt)&&R.searchParams.set("path",te(this,dt)),te(this,Ct)&&R.searchParams.set("version",d+te(this,Ct)),R.toString()}toFileUrl(){if(!te(this,dt))throw new Error("Azure URL must point to a specific path to be able to download a file");const R=te(this,Yt).call(this,te(this,Lt),te(this,Tt),"_apis","git","repositories",te(this,ce),"items");return R.searchParams.set("api-version","6.0"),R.searchParams.set("path",te(this,dt)),te(this,Ct)&&R.searchParams.set("version",te(this,Ct)),R.toString()}toArchiveUrl(){const R=te(this,Yt).call(this,te(this,Lt),te(this,Tt),"_apis","git","repositories",te(this,ce),"items");return R.searchParams.set("recursionLevel","full"),R.searchParams.set("download","true"),R.searchParams.set("api-version","6.0"),te(this,dt)&&R.searchParams.set("scopePath",te(this,dt)),te(this,Ct)&&R.searchParams.set("version",te(this,Ct)),R.toString()}toCommitsUrl(){const R=te(this,Yt).call(this,te(this,Lt),te(this,Tt),"_apis","git","repositories",te(this,ce),"commits");return R.searchParams.set("api-version","6.0"),te(this,Ct)&&R.searchParams.set("searchCriteria.itemVersion.version",te(this,Ct)),R.toString()}getOwner(){return te(this,Lt)}getProject(){return te(this,Tt)}getRepo(){return te(this,ce)}getPath(){return te(this,dt)}getRef(){return te(this,Ct)}};let y=Vt;ee=new WeakMap,Lt=new WeakMap,Tt=new WeakMap,ce=new WeakMap,dt=new WeakMap,Ct=new WeakMap,Yt=new WeakMap;const m="dev.azure.com";function E(J){var Q;const R=(Q=J.getOptionalString("host"))!=null?Q:m,O=J.getOptionalString("token");if(!h(R))throw new Error(`Invalid Azure integration config, '${R}' is not a valid host`);return{host:R,token:O}}function i(J){const R=J.map(E);return R.some(O=>O.host===m)||R.push({host:m}),R}const vt=class{constructor(R){this.integrationConfig=R}get type(){return"azure"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(R){var tt;const{url:O,base:Q}=R;if(c(O))return O;try{const Et=y.fromRepoUrl(Q),mt=new URL(Q),Bt=new URL(`https://a.com${(tt=Et.getPath())!=null?tt:""}`),bt=new URL(O,Bt).pathname;return mt.searchParams.set("path",bt),R.lineNumber&&(mt.searchParams.set("line",String(R.lineNumber)),mt.searchParams.set("lineEnd",String(R.lineNumber+1)),mt.searchParams.set("lineStartColumn","1"),mt.searchParams.set("lineEndColumn","1")),mt.toString()}catch{return new URL(O,Q).toString()}}resolveEditUrl(R){return R}};let S=vt;q(S,"factory",({config:R})=>{var Q;const O=i((Q=R.getOptionalConfigArray("integrations.azure"))!=null?Q:[]);return s(O.map(tt=>new vt(tt)),tt=>tt.config.host)});var B=t(48834).Buffer;function T(J){return AzureUrl.fromRepoUrl(J).toFileUrl()}function G(J){return AzureUrl.fromRepoUrl(J).toArchiveUrl()}function H(J){return AzureUrl.fromRepoUrl(J).toCommitsUrl()}function D(J,R){const O=R?{...R}:{};if(J.token){const Q=B.from(`:${J.token}`,"utf8");O.Authorization=`Basic ${Q.toString("base64")}`}return{headers:O}}const b="bitbucket.org",I="https://api.bitbucket.org/2.0";function K(J){var mt;const R=(mt=J.getOptionalString("host"))!=null?mt:b;let O=J.getOptionalString("apiBaseUrl");const Q=J.getOptionalString("token"),tt=J.getOptionalString("username"),Et=J.getOptionalString("appPassword");if(!h(R))throw new Error(`Invalid Bitbucket integration config, '${R}' is not a valid host`);return O?O=(0,l.trimEnd)(O,"/"):R===b&&(O=I),{host:R,apiBaseUrl:O,token:Q,username:tt,appPassword:Et}}function V(J){const R=J.map(K);return R.some(O=>O.host===b)||R.push({host:b,apiBaseUrl:I}),R}const Nt=class{constructor(R){this.integrationConfig=R}get type(){return"bitbucket"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(R){const O=u(R);if(R.lineNumber){const Q=new URL(O),tt=Q.pathname.split("/").slice(-1)[0];return Q.hash=`${tt}-${R.lineNumber}`,Q.toString()}return O}resolveEditUrl(R){const O=e()(R),Q=new URL(R);return Q.searchParams.set("mode","edit"),Q.searchParams.set("spa","0"),Q.searchParams.set("at",O.ref),Q.toString()}};let st=Nt;q(st,"factory",({config:R})=>{var Q;const O=V((Q=R.getOptionalConfigArray("integrations.bitbucket"))!=null?Q:[]);return s(O.map(tt=>new Nt(tt)),tt=>tt.config.host)});var At=t(96279),zt=t(48834).Buffer;async function ht(J,R){const{name:O,owner:Q,resource:tt}=parseGitUrl(J),Et=tt==="bitbucket.org";let mt=Et?`${R.apiBaseUrl}/repositories/${Q}/${O}`:`${R.apiBaseUrl}/projects/${Q}/repos/${O}/default-branch`,Bt=await fetch(mt,Jt(R));if(Bt.status===404&&!Et&&(mt=`${R.apiBaseUrl}/projects/${Q}/repos/${O}/branches/default`,Bt=await fetch(mt,Jt(R))),!Bt.ok){const Ee=`Failed to retrieve default branch from ${mt}, ${Bt.status} ${Bt.statusText}`;throw new Error(Ee)}let bt;if(Et)bt=(await Bt.json()).mainbranch.name;else{const{displayId:Ee}=await Bt.json();bt=Ee}if(!bt)throw new Error(`Failed to read default branch from ${mt}. Response ${Bt.status} ${Bt.json()}`);return bt}async function jt(J,R){const{name:O,owner:Q,ref:tt,protocol:Et,resource:mt,filepath:Bt}=parseGitUrl(J),bt=mt==="bitbucket.org";let Ee=tt;Ee||(Ee=await ht(J,R));const Xe=Bt?`&path=${encodeURIComponent(Bt)}`:"";return bt?`${Et}://${mt}/${Q}/${O}/get/${Ee}.tar.gz`:`${R.apiBaseUrl}/projects/${Q}/repos/${O}/archive?format=tgz&at=${Ee}&prefix=${Q}-${O}${Xe}`}function Ot(J,R){try{const{owner:O,name:Q,ref:tt,filepathtype:Et,filepath:mt}=parseGitUrl(J);if(!O||!Q||Et!=="browse"&&Et!=="raw"&&Et!=="src")throw new Error("Invalid Bitbucket URL or file path");const Bt=mt.replace(/^\//,"");if(R.host==="bitbucket.org"){if(!tt)throw new Error("Invalid Bitbucket URL or file path");return`${R.apiBaseUrl}/repositories/${O}/${Q}/src/${tt}/${Bt}`}return`${R.apiBaseUrl}/projects/${O}/repos/${Q}/raw/${Bt}?at=${tt}`}catch(O){throw new Error(`Incorrect URL: ${J}, ${O}`)}}function Jt(J){const R={};if(J.token)R.Authorization=`Bearer ${J.token}`;else if(J.username&&J.appPassword){const O=zt.from(`${J.username}:${J.appPassword}`,"utf8");R.Authorization=`Basic ${O.toString("base64")}`}return{headers:R}}const ae="github.com",Kt="https://api.github.com",pe="https://raw.githubusercontent.com";function se(J){var mt,Bt;const R=(mt=J.getOptionalString("host"))!=null?mt:ae;let O=J.getOptionalString("apiBaseUrl"),Q=J.getOptionalString("rawBaseUrl");const tt=J.getOptionalString("token"),Et=(Bt=J.getOptionalConfigArray("apps"))==null?void 0:Bt.map(bt=>({appId:bt.getNumber("appId"),clientId:bt.getString("clientId"),clientSecret:bt.getString("clientSecret"),webhookSecret:bt.getString("webhookSecret"),privateKey:bt.getString("privateKey"),allowedInstallationOwners:bt.getOptionalStringArray("allowedInstallationOwners")}));if(!h(R))throw new Error(`Invalid GitHub integration config, '${R}' is not a valid host`);return O?O=(0,l.trimEnd)(O,"/"):R===ae&&(O=Kt),Q?Q=(0,l.trimEnd)(Q,"/"):R===ae&&(Q=pe),{host:R,apiBaseUrl:O,rawBaseUrl:Q,token:tt,apps:Et}}function le(J){const R=J.map(se);return R.some(O=>O.host===ae)||R.push({host:ae,apiBaseUrl:Kt,rawBaseUrl:pe}),R}function Ae(J,R,O){try{const{owner:Q,name:tt,ref:Et,filepathtype:mt,filepath:Bt}=parseGitUrl(J);if(!Q||!tt||!Et||mt!=="blob"&&mt!=="raw"&&mt!=="tree")throw new Error("Invalid GitHub URL or file path");const bt=Bt.replace(/^\//,"");return ye(R,O)==="api"?`${R.apiBaseUrl}/repos/${Q}/${tt}/contents/${bt}?ref=${Et}`:`${R.rawBaseUrl}/${Q}/${tt}/${Et}/${bt}`}catch(Q){throw new Error(`Incorrect URL: ${J}, ${Q}`)}}function Me(J,R){const O={};return ye(J,R)==="api"&&(O.Accept="application/vnd.github.v3.raw"),R.token&&(O.Authorization=`token ${R.token}`),{headers:O}}function ye(J,R){return J.apiBaseUrl&&(R.token||!J.rawBaseUrl)?"api":"raw"}class ve{constructor(){q(this,"tokenCache",new Map);q(this,"isNotExpired",R=>R.diff(DateTime.local(),"minutes").minutes>50)}async getOrCreateToken(R,O){const Q=this.tokenCache.get(R);if(Q&&this.isNotExpired(Q.expiresAt))return{accessToken:Q.token};const tt=await O();return this.tokenCache.set(R,tt),{accessToken:tt.token}}}const de={Accept:"application/vnd.github.machine-man-preview+json"};class Ne{constructor(R,O){q(this,"appClient");q(this,"baseUrl");q(this,"baseAuthConfig");q(this,"cache",new ve);q(this,"allowedInstallationOwners");this.allowedInstallationOwners=R.allowedInstallationOwners,this.baseUrl=O,this.baseAuthConfig={appId:R.appId,privateKey:R.privateKey.replace(/\\n/gm,`
|
|
31
|
-
`)},this.appClient=new Octokit({baseUrl:O,headers:de,authStrategy:createAppAuth,auth:this.baseAuthConfig})}async getInstallationCredentials(R,O){var mt;const{installationId:Q,suspended:tt}=await this.getInstallationData(R);if(this.allowedInstallationOwners&&!((mt=this.allowedInstallationOwners)==null?void 0:mt.includes(R)))throw new Error(`The GitHub application for ${R} is not included in the allowed installation list (${Q}).`);if(tt)throw new Error(`The GitHub application for ${R} is suspended`);const Et=O?`${R}/${O}`:R;return this.cache.getOrCreateToken(Et,async()=>{const Bt=await this.appClient.apps.createInstallationAccessToken({installation_id:Q,headers:de});if(O&&Bt.data.repository_selection==="selected"){const bt=new Octokit({baseUrl:this.baseUrl,auth:Bt.data.token});if(!(await bt.paginate(bt.apps.listReposAccessibleToInstallation)).some(on=>on.name===O))throw new Error(`The Backstage GitHub application used in the ${R} organization does not have access to a repository with the name ${O}`)}return{token:Bt.data.token,expiresAt:DateTime.fromISO(Bt.data.expires_at)}})}getInstallations(){return this.appClient.paginate(this.appClient.apps.listInstallations)}async getInstallationData(R){const Q=(await this.getInstallations()).find(Et=>{var mt,Bt;return((Bt=(mt=Et.account)==null?void 0:mt.login)==null?void 0:Bt.toLocaleLowerCase("en-US"))===R.toLocaleLowerCase("en-US")});if(Q)return{installationId:Q.id,suspended:Boolean(Q.suspended_by)};const tt=new Error(`No app installation found for ${R} in ${this.baseAuthConfig.appId}`);throw tt.name="NotFoundError",tt}}class Ue{constructor(R){q(this,"apps");var O,Q;this.apps=(Q=(O=R.apps)==null?void 0:O.map(tt=>new Ne(tt,R.apiBaseUrl)))!=null?Q:[]}async getAllInstallations(){return this.apps.length?(await Promise.all(this.apps.map(O=>O.getInstallations()))).flat():[]}async getAppToken(R,O){if(this.apps.length===0)return;const Q=await Promise.all(this.apps.map(Bt=>Bt.getInstallationCredentials(R,O).then(bt=>({credentials:bt,error:void 0}),bt=>({credentials:void 0,error:bt})))),tt=Q.find(Bt=>Bt.credentials);if(tt)return tt.credentials.accessToken;const mt=Q.map(Bt=>Bt.error).find(Bt=>Bt.name!=="NotFoundError");if(mt)throw mt}}class Ie{constructor(R,O){this.githubAppCredentialsMux=R,this.token=O}async getCredentials(R){const O=parseGitUrl(R.url),Q=O.owner||O.name,tt=O.owner?O.name:void 0;let Et="app",mt=await this.githubAppCredentialsMux.getAppToken(Q,tt);return mt||(Et="token",mt=this.token),{headers:mt?{Authorization:`Bearer ${mt}`}:void 0,token:mt,type:Et}}}q(Ie,"create",null);const Wt=class{constructor(R){this.integrationConfig=R}get type(){return"github"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(R){return me(u(R),"tree")}resolveEditUrl(R){return me(R,"edit")}};let Le=Wt;q(Le,"factory",({config:R})=>{var Q;const O=le((Q=R.getOptionalConfigArray("integrations.github"))!=null?Q:[]);return s(O.map(tt=>new Wt(tt)),tt=>tt.config.host)});function me(J,R){return J.replace(/\/\/([^/]+)\/([^/]+)\/([^/]+)\/(blob|tree|edit)\//,(O,Q,tt,Et)=>`//${Q}/${tt}/${Et}/${R}/`)}const Re="gitlab.com",je="https://gitlab.com/api/v4";function Ft(J){const R=J.getString("host");let O=J.getOptionalString("apiBaseUrl");const Q=J.getOptionalString("token");let tt=J.getOptionalString("baseUrl");if(O?O=(0,l.trimEnd)(O,"/"):R===Re&&(O=je),tt?tt=(0,l.trimEnd)(tt,"/"):tt=`https://${R}`,R.includes(":"))throw new Error(`Invalid GitLab integration config, host '${R}' should just be the host name (e.g. "github.com"), not a URL`);if(h(R)){if(!O||!c(O))throw new Error(`Invalid GitLab integration config, '${O}' is not a valid apiBaseUrl`);if(!c(tt))throw new Error(`Invalid GitLab integration config, '${tt}' is not a valid baseUrl`)}else throw new Error(`Invalid GitLab integration config, '${R}' is not a valid host`);return{host:R,token:Q,apiBaseUrl:O,baseUrl:tt}}function oe(J){const R=J.map(Ft);return R.some(O=>O.host===Re)||R.push({host:Re,apiBaseUrl:je,baseUrl:`https://${Re}`}),R}async function ot(J,R){if(J.includes("/-/blob/")){const O=await F(J,R);return N(J,O).toString()}return v(J).toString()}function P(J){const{token:R=""}=J;return{headers:{"PRIVATE-TOKEN":R}}}function v(J){try{const R=new URL(J),[O,Q,tt,Et,...mt]=R.pathname.split("/");if(O!==""||Q===""||tt===""||Et!=="blob"||!mt.join("/").match(/\.(yaml|yml)$/))throw new Error("Wrong GitLab URL");return R.pathname=[O,Q,tt,"raw",...mt].join("/"),R}catch(R){throw new Error(`Incorrect url: ${J}, ${R}`)}}function N(J,R){try{const O=new URL(J),Q=O.pathname.split("/-/blob/")[1],[tt,...Et]=Q.split("/");return O.pathname=["/api/v4/projects",R,"repository/files",encodeURIComponent(decodeURIComponent(Et.join("/"))),"raw"].join("/"),O.search=`?ref=${tt}`,O}catch(O){throw new Error(`Incorrect url: ${J}, ${O}`)}}async function F(J,R){const O=new URL(J);if(!O.pathname.includes("/-/blob/"))throw new Error("Please provide full path to yaml file from GitLab");try{const Q=O.pathname.split("/-/blob/")[0],tt=new URL(`${O.protocol+O.hostname}/api/v4/projects/${encodeURIComponent(Q.replace(/^\//,""))}`),Et=await fetch(tt.toString(),P(R)),mt=await Et.json();if(!Et.ok)throw new Error(`GitLab Error '${mt.error}', ${mt.error_description}`);return Number(mt.id)}catch(Q){throw new Error(`Could not get GitLab project ID for: ${J}, ${Q}`)}}const he=class{constructor(R){this.integrationConfig=R}get type(){return"gitlab"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(R){return u(R)}resolveEditUrl(R){return nt(R,"edit")}};let j=he;q(j,"factory",({config:R})=>{var Q;const O=oe((Q=R.getOptionalConfigArray("integrations.gitlab"))!=null?Q:[]);return s(O.map(tt=>new he(tt)),tt=>tt.config.host)});function nt(J,R){return J.replace(/\/\-\/(blob|tree|edit)\//,`/-/${R}/`)}const gt="amazonaws.com";function ct(J){var bt;const R=J.getOptionalString("endpoint"),O=(bt=J.getOptionalBoolean("s3ForcePathStyle"))!=null?bt:!1;let Q,tt;if(R){try{const Ee=new URL(R);Q=Ee.host,tt=Ee.pathname}catch{throw new Error(`invalid awsS3 integration config, endpoint '${R}' is not a valid URL`)}if(tt!=="/")throw new Error(`invalid awsS3 integration config, endpoints cannot contain path, got '${R}'`)}else Q=gt;const Et=J.getOptionalString("accessKeyId"),mt=J.getOptionalString("secretAccessKey"),Bt=J.getOptionalString("roleArn");return{host:Q,endpoint:R,s3ForcePathStyle:O,accessKeyId:Et,secretAccessKey:mt,roleArn:Bt}}function Dt(J){const R=J.map(ct);return R.some(O=>O.host===gt)||R.push({host:gt}),R}const qt=class{get type(){return"awsS3"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}constructor(R){this.integrationConfig=R}resolveUrl(R){return u(R)}resolveEditUrl(R){return R}};let Zt=qt;q(Zt,"factory",({config:R})=>{var Q;const O=Dt((Q=R.getOptionalConfigArray("integrations.awsS3"))!=null?Q:[]);return s(O.map(tt=>new qt(tt)),tt=>tt.config.host)});class re{constructor(R){q(this,"byType");this.byType=R}static fromConfig(R){return new re({awsS3:Zt.factory({config:R}),azure:S.factory({config:R}),bitbucket:st.factory({config:R}),github:Le.factory({config:R}),gitlab:j.factory({config:R})})}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(R=>R.list())}byUrl(R){return Object.values(this.byType).map(O=>O.byUrl(R)).find(Boolean)}byHost(R){return Object.values(this.byType).map(O=>O.byHost(R)).find(Boolean)}resolveUrl(R){const O=this.byUrl(R.base);return O?O.resolveUrl(R):u(R)}resolveEditUrl(R){const O=this.byUrl(R);return O?O.resolveEditUrl(R):R}}},76241:function(X,o,t){"use strict";t.d(o,{CT:function(){return s},EI:function(){return y},uW:function(){return h},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 e=r(),l=m=>`__@backstage/${m}__`;function h(m,E){const i=l(m);let S=e[i];return S||(S=E(),e[i]=S,S)}var c=t(2784);function s(m){return h(m,()=>(0,c.createContext)(void 0))}function u(m){return(0,c.useContext)(s(m))}function d(m){return{set(E){globalThis[`__@backstage/${m}__`]=createContext(createVersionedValueMap(E))},reset(){delete globalThis[`__@backstage/${m}__`]}}}function y(m){return Object.freeze(m),{atVersion(E){return m[E]}}}},85653:function(X,o,t){"use strict";t.d(o,{AsyncEntityProvider:function(){return zt},n3:function(){return e.n3},DefaultStarredEntitiesApi:function(){return m},EntityContext:function(){return V},EntityKindFilter:function(){return F},EntityLifecyclePicker:function(){return Ht},EntityListProvider:function(){return Le},EntityOwnerPicker:function(){return an},EntityRefLink:function(){return v},EntityRefLinks:function(){return N},EntityTable:function(){return Zn},EntityTagPicker:function(){return lr},EntityTypePicker:function(){return cr},FavoriteEntity:function(){return mr},UnregisterEntityDialog:function(){return Xr},UserListPicker:function(){return Nr},Ah:function(){return h},M4:function(){return H},wi:function(){return b},favoriteEntityIcon:function(){return zn},favoriteEntityTooltip:function(){return qn},formatEntityRefTitle:function(){return oe},getEntityMetadataEditUrl:function(){return ve},getEntityMetadataViewUrl:function(){return ye},getEntityRelations:function(){return de},getEntitySourceLocation:function(){return Ne},isOwnerOf:function(){return Ue},starredEntitiesApiRef:function(){return E},useEntity:function(){return Jt},useEntityCompoundName:function(){return K},useEntityFromUrl:function(){return Ot},useEntityKinds:function(){return ee},useEntityListProvider:function(){return me},useOwnUser:function(){return Lt},useRelatedEntities:function(){return ce},useStarredEntities:function(){return Yt}});var r={};t.r(r),t.d(r,{createDomainColumn:function(){return Ze},createEntityRefColumn:function(){return Pn},createEntityRelationColumn:function(){return In},createMetadataDescriptionColumn:function(){return On},createOwnerColumn:function(){return fe},createSpecLifecycleColumn:function(){return Ve},createSpecTypeColumn:function(){return Un},createSystemColumn:function(){return sn}});var e=t(30001),l=t(36964);const h=(0,l.createApiRef)({id:"plugin.catalog.service"});var c=t(82394),s=t.n(c),u=t(52890),d=t(76635);async function y({storageApi:U}){var et;const M=U.forBucket("settings"),$=U.forBucket("starredEntities"),k=M.get("starredEntities");if(!(0,d.isArray)(k))return;const ut=new Set((et=$.get("entityRefs"))!=null?et:[]);k.filter(d.isString).map(ft=>ft.split(":")).filter(ft=>ft.length===4&&ft[0]==="entity").map(([ft,Ut,kt,ne])=>(0,u.eE)({kind:Ut,namespace:kt,name:ne})).forEach(ft=>ut.add(ft)),await $.set("entityRefs",Array.from(ut)),await M.remove("starredEntities")}class m{constructor(M){q(this,"settingsStore");q(this,"starredEntities");q(this,"subscribers",new Set);q(this,"observable",new(s())(M=>(M.next(this.starredEntities),this.subscribers.add(M),()=>{this.subscribers.delete(M)})));var $;y(M).then(),this.settingsStore=M.storageApi.forBucket("starredEntities"),this.starredEntities=new Set(($=this.settingsStore.get("entityRefs"))!=null?$:[]),this.settingsStore.observe$("entityRefs").subscribe({next:k=>{var ut;this.starredEntities=new Set((ut=k.newValue)!=null?ut:[]),this.notifyChanges()}})}async toggleStarred(M){this.starredEntities.has(M)?this.starredEntities.delete(M):this.starredEntities.add(M),await this.settingsStore.set("entityRefs",Array.from(this.starredEntities))}starredEntitie$(){return this.observable}isStarred(M){return this.starredEntities.has(M)}notifyChanges(){for(const M of this.subscribers)M.next(this.starredEntities)}}const E=(0,l.createApiRef)({id:"catalog-react.starred-entities"});var i=t(2784),S=t(76241),B=t(10289),T=t(77446);const H=(0,l.createRouteRef)({id:"catalog"}),b=(0,l.createRouteRef)({id:"catalog:entity",params:["namespace","kind","name"]});function I(U){var M,$;return{kind:U.kind.toLocaleLowerCase("en-US"),namespace:($=(M=U.metadata.namespace)==null?void 0:M.toLocaleLowerCase("en-US"))!=null?$:ENTITY_DEFAULT_NAMESPACE,name:U.metadata.name}}const K=()=>{const{kind:U,namespace:M,name:$}=(0,l.useRouteRefParams)(b);return{kind:U,namespace:M,name:$}},V=(0,i.createContext)({entity:void 0,loading:!0,error:void 0,refresh:()=>{}}),st=V.Provider,At=(0,S.CT)("entity-context"),zt=({children:U,entity:M,loading:$,error:k,refresh:ut})=>{const et={entity:M,loading:$,error:k,refresh:ut};return i.createElement(st,{value:et},i.createElement(At.Provider,{value:(0,S.EI)({1:et})},U))},ht=({entity:U,children:M})=>React.createElement(zt,{entity:U,loading:!Boolean(U),error:void 0,refresh:void 0,children:M}),jt=({value:U,children:M})=>i.createElement(zt,{...U,children:M});V.Provider=jt;const Ot=()=>{const{kind:U,namespace:M,name:$}=K(),k=(0,B.s0)(),ut=(0,l.useApi)(l.errorApiRef),et=(0,l.useApi)(h),{value:ft,error:Ut,loading:kt,retry:ne}=(0,T.Z)(()=>et.getEntityByName({kind:U,namespace:M,name:$}),[et,U,M,$]);return(0,i.useEffect)(()=>{$||(ut.post(new Error("No name provided!")),k("/"))},[ut,k,Ut,kt,ft,$]),{entity:ft,loading:kt,error:Ut,refresh:ne}};function Jt(){const U=(0,S.Vt)("entity-context");if(!U)return{entity:void 0,loading:!0,error:void 0,refresh:()=>{}};const M=U.atVersion(1);if(!M)throw new Error("EntityContext v1 not available");const{entity:$,loading:k,error:ut,refresh:et}=M;return{entity:$,loading:k,error:ut,refresh:et}}var ae=t(19126),Kt=t.n(ae),pe=t(69294),se=t(48760),le=t(90736);function Ae(U){return U.reduce((M,$)=>({...M,...$.getCatalogFilters?$.getCatalogFilters():{}}),{})}function Me(U){return M=>U.every($=>!$.filterEntity||$.filterEntity(M))}function ye(U){var M;return(M=U.metadata.annotations)==null?void 0:M[u.wh]}function ve(U){var M;return(M=U.metadata.annotations)==null?void 0:M[u.J1]}function de(U,M,$){var ut,et;let k=((et=(ut=U==null?void 0:U.relations)==null?void 0:ut.filter(ft=>ft.type===M))==null?void 0:et.map(ft=>ft.target))||[];return($==null?void 0:$.kind)&&(k=k==null?void 0:k.filter(ft=>ft.kind.toLocaleLowerCase("en-US")===$.kind.toLocaleLowerCase("en-US"))),k}function Ne(U,M){var k;const $=(k=U.metadata.annotations)==null?void 0:k[u.wX];if(!!$)try{const ut=(0,u.Me)($),et=M.byUrl(ut.target);return{locationTargetUrl:ut.target,integrationType:et==null?void 0:et.type}}catch{return}}function Ue(U,M){const $=new Set([...de(U,u.hr,{kind:"group"}),...U?[(0,u.C_)(U)]:[]].map(u.eE)),k=de(M,u.S4).map(u.eE);for(const ut of k)if($.has(ut))return!0;return!1}const Ie=(0,i.createContext)(void 0),Le=({children:U})=>{const M=(0,le.default)(),$=(0,l.useApi)(h),[k,ut]=(0,i.useState)({}),[et,ft]=(0,i.useState)(()=>{var Se;const wt=Kt().parse(window.location.search,{ignoreQueryPrefix:!0});return{appliedFilters:{},entities:[],backendEntities:[],queryParameters:(Se=wt.filters)!=null?Se:{}}}),[{loading:Ut,error:kt},ne]=(0,pe.default)(async()=>{var Ke;const wt=(0,d.compact)(Object.values(k)),Se=Me(wt),Oe=Ae(wt),be=Ae((0,d.compact)(Object.values(et.appliedFilters))),ke=Object.keys(k).reduce((Je,ln)=>{const $e=k[ln];return($e==null?void 0:$e.toQueryValue)&&(Je[ln]=$e.toQueryValue()),Je},{});if((0,d.isEqual)(be,Oe))ft({appliedFilters:k,backendEntities:et.backendEntities,entities:et.backendEntities.filter(Se),queryParameters:ke});else{const Je=await $.getEntities({filter:Oe});ft({appliedFilters:k,backendEntities:Je.items,entities:Je.items.filter(Se),queryParameters:ke})}if(M()){const Je=Kt().parse(window.location.search,{ignoreQueryPrefix:!0}),ln=Kt().stringify({...Je,filters:ke},{addQueryPrefix:!0}),$e=`${window.location.pathname}${ln}`;(Ke=window.history)==null||Ke.replaceState(null,document.title,$e)}},[$,k,et],{loading:!0});(0,se.Z)(ne,10,[k]);const Qt=(0,i.useCallback)(wt=>{ut(Se=>{const Oe=typeof wt=="function"?wt(Se):wt;return{...Se,...Oe}})},[]),xt=(0,i.useMemo)(()=>({filters:et.appliedFilters,entities:et.entities,backendEntities:et.backendEntities,updateFilters:Qt,queryParameters:et.queryParameters,loading:Ut,error:kt}),[et,Qt,Ut,kt]);return i.createElement(Ie.Provider,{value:xt},U)};function me(){const U=(0,i.useContext)(Ie);if(!U)throw new Error("useEntityListProvider must be used within EntityListProvider");return U}var Re=t(64279),je=t(18149),Ft=t.n(je);function oe(U,M){const $=M==null?void 0:M.defaultKind;let k,ut,et;return"metadata"in U?(k=U.kind,ut=U.metadata.namespace,et=U.metadata.name):(k=U.kind,ut=U.namespace,et=U.name),ut===u.sk&&(ut=void 0),k=k.toLocaleLowerCase("en-US"),`${(0,u.TH)({kind:$&&$.toLocaleLowerCase("en-US")===k?void 0:k,name:et,namespace:ut})}`}var ot=t(41682),P=t(80030);const v=(0,i.forwardRef)((U,M)=>{var Oe;const{entityRef:$,defaultKind:k,title:ut,children:et,...ft}=U,Ut=(0,l.useRouteRef)(b);let kt,ne,Qt;"metadata"in $?(kt=$.kind,ne=$.metadata.namespace,Qt=$.metadata.name):(kt=$.kind,ne=$.namespace,Qt=$.name),kt=kt.toLocaleLowerCase("en-US");const xt={kind:kt,namespace:(Oe=ne==null?void 0:ne.toLocaleLowerCase("en-US"))!=null?Oe:u.sk,name:Qt},wt=oe($,{defaultKind:k}),Se=i.createElement(ot.Link,{...ft,ref:M,to:Ut(xt)},et,!et&&(ut!=null?ut:wt));return ut?i.createElement(P.ZP,{title:wt},Se):Se}),N=({entityRefs:U,defaultKind:M,...$})=>i.createElement(i.Fragment,null,U.map((k,ut)=>i.createElement(i.Fragment,{key:ut},ut>0&&", ",i.createElement(v,{...$,entityRef:k,defaultKind:M}))));class F{constructor(M){this.value=M}getCatalogFilters(){return{kind:this.value}}toQueryValue(){return this.value}}class j{constructor(M){this.value=M}getTypes(){return Array.isArray(this.value)?this.value:[this.value]}getCatalogFilters(){return{"spec.type":this.getTypes()}}toQueryValue(){return this.getTypes()}}class nt{constructor(M){this.values=M}filterEntity(M){return this.values.every($=>{var k;return((k=M.metadata.tags)!=null?k:[]).includes($)})}toQueryValue(){return this.values}}class gt{constructor(M){this.value=M}filterEntity(M){var k;const $=this.value.toLocaleUpperCase("en-US");return M.metadata.name.toLocaleUpperCase("en-US").includes($)||`${M.metadata.title}`.toLocaleUpperCase("en-US").includes($)||((k=M.metadata.tags)==null?void 0:k.join("").toLocaleUpperCase("en-US").indexOf($))!==-1}}class ct{constructor(M){this.values=M}filterEntity(M){return this.values.some($=>de(M,u.S4).some(k=>oe(k,{defaultKind:"group"})===$))}toQueryValue(){return this.values}}class Dt{constructor(M){this.values=M}filterEntity(M){return this.values.some($=>{var k;return((k=M.spec)==null?void 0:k.lifecycle)===$})}toQueryValue(){return this.values}}class Zt{constructor(M,$,k){this.value=M,this.isOwnedEntity=$,this.isStarredEntity=k}filterEntity(M){switch(this.value){case"owned":return this.isOwnedEntity(M);case"starred":return this.isStarredEntity(M);default:return!0}}toQueryValue(){return this.value}}function re(){var be;const U=(0,l.useApi)(h),{filters:{kind:M,type:$},queryParameters:k,updateFilters:ut}=me(),et=[k.type].flat().filter(Boolean),[ft,Ut]=(0,i.useState)(et.length?et:(be=$==null?void 0:$.getTypes())!=null?be:[]),[kt,ne]=(0,i.useState)([]),Qt=(0,i.useMemo)(()=>M==null?void 0:M.value,[M]),{error:xt,loading:wt,value:Se}=(0,Re.default)(async()=>Qt?await U.getEntities({filter:{kind:Qt},fields:["spec.type"]}).then(Ke=>Ke.items):[],[Qt,U]),Oe=(0,i.useRef)(Se);return(0,i.useEffect)(()=>{const ke=Oe.current;if(Oe.current=Se,wt||!Qt||ke===Se||!Se)return;const Ke=Se.reduce(($e,pn)=>{var we;if(typeof((we=pn.spec)==null?void 0:we.type)!="string")return $e;const Ln=pn.spec.type.toLocaleLowerCase("en-US");return $e[Ln]||($e[Ln]=0),$e[Ln]+=1,$e},{}),Je=Object.entries(Ke).sort(([,$e],[,pn])=>pn-$e).map(([$e])=>$e);ne(Je);const ln=ft.filter($e=>Je.includes($e));Ft()(ft,ln)||Ut(ln)},[wt,Qt,ft,Ut,Se]),(0,i.useEffect)(()=>{ut({type:ft.length?new j(ft):void 0})},[ft,ut]),{loading:wt,error:xt,availableTypes:kt,selectedTypes:ft,setSelectedTypes:Ut}}function ee(){const U=(0,l.useApi)(h),{error:M,loading:$,value:k}=(0,Re.default)(async()=>{const ut=await U.getEntities({fields:["kind"]}).then(et=>et.items);return[...new Set(ut.map(et=>et.kind))].sort()});return{error:M,loading:$,kinds:k}}function Lt(){const U=(0,l.useApi)(h),M=(0,l.useApi)(l.identityApiRef);return(0,Re.default)(()=>U.getEntityByName({kind:"User",namespace:"default",name:M.getUserId()}),[U,M])}const Tt=20;function ce(U,{type:M,kind:$}){const k=(0,l.useApi)(h),{loading:ut,value:et,error:ft}=(0,Re.default)(async()=>{const Ut=U.relations&&U.relations.filter(xt=>(!M||xt.type.toLocaleLowerCase("en-US")===M.toLocaleLowerCase("en-US"))&&(!$||xt.target.kind.toLocaleLowerCase("en-US")===$.toLocaleLowerCase("en-US")));if(!Ut)return[];const kt=Object.values((0,d.groupBy)(Ut,({target:xt})=>`${xt.kind}:${xt.namespace}`.toLocaleLowerCase("en-US"))),ne=[];for(const xt of kt)ne.push({kind:xt[0].target.kind,namespace:xt[0].target.namespace,nameBatches:(0,d.chunk)(xt.map(wt=>wt.target.name),Tt)});return(await Promise.all(ne.flatMap(xt=>xt.nameBatches.map(wt=>k.getEntities({filter:{kind:xt.kind,"metadata.namespace":xt.namespace,"metadata.name":wt}}))))).flatMap(xt=>xt.items)},[U,M]);return{entities:et,loading:ut,error:ft}}var dt=t(72164);function Ct(U){return typeof U=="string"?U:(0,u.eE)(U)}function Yt(){const U=(0,l.useApi)(E),M=(0,dt.Z)(U.starredEntitie$(),new Set),$=(0,i.useCallback)(ut=>M.has(Ct(ut)),[M]),k=(0,i.useCallback)(ut=>U.toggleStarred(Ct(ut)).then(),[U]);return{starredEntities:M,toggleStarredEntity:k,isStarredEntity:$}}function Vt(U){return typeof U=="string"?U:(0,u.eE)(U)}function vt(U){const M=(0,l.useApi)(E),[$,k]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{const et=M.starredEntitie$().subscribe({next(ft){k(ft.has(Vt(U)))}});return()=>{et.unsubscribe()}},[U,M]),{toggleStarredEntity:(0,i.useCallback)(()=>M.toggleStarred(Vt(U)).then(),[U,M]),isStarredEntity:$}}var Nt=t(51949);function Wt(U){try{const M=(0,u.of)(U,{defaultKind:"User",defaultNamespace:"default"});return(0,u.eE)(M)}catch{return U}}async function he(U){const M=U.getUserId(),$=await U.getIdToken(),k=[];if(M&&k.push(Wt(M)),$)try{const ut=(0,Nt.Z)($);(ut==null?void 0:ut.ent)&&[ut.ent].flat().filter(et=>typeof et=="string").map(et=>et.toLocaleLowerCase("en-US")).forEach(et=>k.push(et))}catch{}return k}async function qt(U,M){const $=new Array,k=M.find(ut=>ut.startsWith("user:"));if(k){const ut=await U.getEntityByName((0,u.of)(k));if(ut){const et=de(ut,u.hr,{kind:"Group"});for(const ft of et)$.push((0,u.eE)(ft))}}return $}function J(){const U=(0,l.useApi)(l.identityApiRef),M=(0,l.useApi)(h),{loading:$,value:k}=(0,Re.default)(async()=>{const et=await he(U),ft=await qt(M,et);return new Set([...et,...ft])},[]),ut=(0,i.useMemo)(()=>{const et=new Set(k!=null?k:[]);return ft=>{const Ut=("metadata"in ft?de(ft,u.S4):[ft]).map(u.eE);for(const kt of Ut)if(et.has(kt))return!0;return!1}},[k]);return(0,i.useMemo)(()=>({loading:$,isOwnedEntity:ut}),[$,ut])}function R(U){const M=useApi(identityApiRef),$=useApi(catalogApiRef),{loading:k,value:ut}=useAsync(async()=>{const ft=await loadIdentityOwnerRefs(M),Ut=await loadCatalogOwnerRefs($,ft);return await $.getEntities(U?{filter:{kind:U,[`relations.${RELATION_OWNED_BY}`]:[...ft,...Ut]}}:{filter:{[`relations.${RELATION_OWNED_BY}`]:[...ft,...Ut]}})},[]),et=useMemo(()=>ut,[ut]);return useMemo(()=>({loading:k,ownedEntities:et}),[k,et])}const O=({initialFilter:U,hidden:M})=>{var et;const{updateFilters:$,queryParameters:k}=useEntityListProvider(),[ut]=useState((et=[k.kind].flat()[0])!=null?et:U);return useEffect(()=>{$({kind:ut?new EntityKindFilter(ut):void 0})},[ut,$]),M?null:React.createElement(Alert,{severity:"warning"},"Kind filter not yet available")};var Q=t(79692),tt=t(95544),Et=t(90436),mt=t(5806),Bt=t(21324),bt=t(86619),Ee=t(19996),Xe=t(25505),on=t(38016),lt=t(88013);const Z=(0,Q.Z)({input:{}},{name:"CatalogReactEntityLifecyclePicker"}),_=i.createElement(Xe.Z,{fontSize:"small"}),pt=i.createElement(Ee.Z,{fontSize:"small"}),Ht=()=>{var ne,Qt;const U=Z(),{updateFilters:M,backendEntities:$,filters:k,queryParameters:ut}=me(),et=[ut.lifecycles].flat().filter(Boolean),[ft,Ut]=(0,i.useState)(et.length?et:(Qt=(ne=k.lifecycles)==null?void 0:ne.values)!=null?Qt:[]);(0,i.useEffect)(()=>{M({lifecycles:ft.length?new Dt(ft):void 0})},[ft,M]);const kt=(0,i.useMemo)(()=>[...new Set($.map(xt=>{var wt;return(wt=xt.spec)==null?void 0:wt.lifecycle}).filter(Boolean))].sort(),[$]);return kt.length?i.createElement(tt.Z,{pb:1,pt:1},i.createElement(Et.Z,{variant:"button"},"Lifecycle"),i.createElement(lt.ZP,{"aria-label":"Lifecycle",multiple:!0,options:kt,value:ft,onChange:(xt,wt)=>Ut(wt),renderOption:(xt,{selected:wt})=>i.createElement(mt.Z,{control:i.createElement(Bt.Z,{icon:_,checkedIcon:pt,checked:wt}),label:xt}),size:"small",popupIcon:i.createElement(on.Z,{"data-testid":"lifecycle-picker-expand"}),renderInput:xt=>i.createElement(bt.Z,{...xt,className:U.input,variant:"outlined"})})):null},_t=(0,Q.Z)({input:{}},{name:"CatalogReactEntityOwnerPicker"}),ge=i.createElement(Xe.Z,{fontSize:"small"}),Be=i.createElement(Ee.Z,{fontSize:"small"}),an=()=>{var ne,Qt;const U=_t(),{updateFilters:M,backendEntities:$,filters:k,queryParameters:ut}=me(),et=[ut.owners].flat().filter(Boolean),[ft,Ut]=(0,i.useState)(et.length?et:(Qt=(ne=k.owners)==null?void 0:ne.values)!=null?Qt:[]);(0,i.useEffect)(()=>{M({owners:ft.length?new ct(ft):void 0})},[ft,M]);const kt=(0,i.useMemo)(()=>[...new Set($.flatMap(xt=>de(xt,u.S4).map(wt=>oe(wt,{defaultKind:"group"}))).filter(Boolean))].sort(),[$]);return kt.length?i.createElement(tt.Z,{pb:1,pt:1},i.createElement(Et.Z,{variant:"button"},"Owner"),i.createElement(lt.ZP,{multiple:!0,"aria-label":"Owner",options:kt,value:ft,onChange:(xt,wt)=>Ut(wt),renderOption:(xt,{selected:wt})=>i.createElement(mt.Z,{control:i.createElement(Bt.Z,{icon:ge,checkedIcon:Be,checked:wt}),label:xt}),size:"small",popupIcon:i.createElement(on.Z,{"data-testid":"owner-picker-expand"}),renderInput:xt=>i.createElement(bt.Z,{...xt,className:U.input,variant:"outlined"})})):null},hn=(0,Q.Z)(U=>({searchToolbar:{paddingLeft:0,paddingRight:0},input:{}}),{name:"CatalogReactEntitySearchBar"}),Xn=()=>{var et,ft;const U=hn(),{filters:M,updateFilters:$}=useEntityListProvider(),[k,ut]=useState((ft=(et=M.text)==null?void 0:et.value)!=null?ft:"");return useDebounce(()=>{$({text:k.length?new EntityTextFilter(k):void 0})},250,[k,$]),React.createElement(Toolbar,{className:U.searchToolbar},React.createElement(FormControl,null,React.createElement(Input,{id:"input-with-icon-adornment",className:U.input,placeholder:"Search",autoComplete:"off",onChange:Ut=>ut(Ut.target.value),value:k,startAdornment:React.createElement(InputAdornment,{position:"start"},React.createElement(Search,null)),endAdornment:React.createElement(InputAdornment,{position:"end"},React.createElement(IconButton,{"aria-label":"clear search",onClick:()=>ut(""),edge:"end",disabled:k.length===0},React.createElement(Clear,null)))})))};function Pn({defaultKind:U}){function M($){var k;return((k=$.metadata)==null?void 0:k.title)||oe($,{defaultKind:U})}return{title:"Name",highlight:!0,customFilterAndSearch($,k){return M(k).includes($)},customSort($,k){return M($).localeCompare(M(k))},render:$=>{var k;return i.createElement(v,{entityRef:$,defaultKind:U,title:(k=$.metadata)==null?void 0:k.title})}}}function In({title:U,relation:M,defaultKind:$,filter:k}){function ut(ft){return de(ft,M,k)}function et(ft){return ut(ft).map(Ut=>oe(Ut,{defaultKind:$})).join(", ")}return{title:U,customFilterAndSearch(ft,Ut){return et(Ut).includes(ft)},customSort(ft,Ut){return et(ft).localeCompare(et(Ut))},render:ft=>i.createElement(N,{entityRefs:ut(ft),defaultKind:$})}}function fe(){return In({title:"Owner",relation:u.S4,defaultKind:"group"})}function Ze(){return In({title:"Domain",relation:u.cz,defaultKind:"domain",filter:{kind:"domain"}})}function sn(){return In({title:"System",relation:u.cz,defaultKind:"system",filter:{kind:"system"}})}function On(){return{title:"Description",field:"metadata.description",render:U=>i.createElement(ot.OverflowTooltip,{text:U.metadata.description,placement:"bottom-start",line:2}),width:"auto"}}function Ve(){return{title:"Lifecycle",field:"spec.lifecycle"}}function Un(){return{title:"Type",field:"spec.type"}}const or=[Pn({defaultKind:"system"}),Ze(),fe(),On()],$n=[Pn({defaultKind:"component"}),sn(),fe(),Un(),Ve(),On()],Rr=(0,Q.Z)(U=>({empty:{padding:U.spacing(2),display:"flex",justifyContent:"center"}}));function Zn({entities:U,title:M,emptyContent:$,variant:k="gridItem",columns:ut}){const et=Rr(),ft={minWidth:"0",width:"100%"};return k==="gridItem"&&(ft.height="calc(100% - 10px)"),i.createElement(ot.Table,{columns:ut,title:M,style:ft,emptyContent:$&&i.createElement("div",{className:et.empty},$),options:{search:!1,paging:!1,actionsColumnIndex:-1,padding:"dense"},data:U})}Zn.columns=r,Zn.systemEntityColumns=or,Zn.componentEntityColumns=$n;const wn=(0,Q.Z)({input:{}},{name:"CatalogReactEntityTagPicker"}),sr=i.createElement(Xe.Z,{fontSize:"small"}),ir=i.createElement(Ee.Z,{fontSize:"small"}),lr=()=>{var ne,Qt;const U=wn(),{updateFilters:M,backendEntities:$,filters:k,queryParameters:ut}=me(),et=[ut.tags].flat().filter(Boolean),[ft,Ut]=(0,i.useState)(et.length?et:(Qt=(ne=k.tags)==null?void 0:ne.values)!=null?Qt:[]);(0,i.useEffect)(()=>{M({tags:ft.length?new nt(ft):void 0})},[ft,M]);const kt=(0,i.useMemo)(()=>[...new Set($.flatMap(xt=>xt.metadata.tags).filter(Boolean))].sort(),[$]);return kt.length?i.createElement(tt.Z,{pb:1,pt:1},i.createElement(Et.Z,{variant:"button"},"Tags"),i.createElement(lt.ZP,{multiple:!0,"aria-label":"Tags",options:kt,value:ft,onChange:(xt,wt)=>Ut(wt),renderOption:(xt,{selected:wt})=>i.createElement(mt.Z,{control:i.createElement(Bt.Z,{icon:sr,checkedIcon:ir,checked:wt}),label:xt}),size:"small",popupIcon:i.createElement(on.Z,{"data-testid":"tag-picker-expand"}),renderInput:xt=>i.createElement(bt.Z,{...xt,className:U.input,variant:"outlined"})})):null};var kn=t(82108),Sr=t.n(kn);const cr=U=>{var ne;const{hidden:M,initialFilter:$}=U,k=(0,l.useApi)(l.alertApiRef),{error:ut,availableTypes:et,selectedTypes:ft,setSelectedTypes:Ut}=re();if((0,i.useEffect)(()=>{ut&&k.post({message:"Failed to load entity types",severity:"error"}),$&&Ut([$])},[ut,k,$,Ut]),et.length===0||ut)return null;const kt=[{value:"all",label:"All"},...et.map(Qt=>({value:Qt,label:Sr()(Qt)}))];return M?null:i.createElement(tt.Z,{pb:1,pt:1},i.createElement(ot.Select,{label:"Type",items:kt,selected:(ne=kt.length>1?ft[0]:void 0)!=null?ne:"all",onChange:Qt=>Ut(Qt==="all"?[]:[String(Qt)])}))};var Wn=t(15459),Cr=t(61837),ur=t(11640),dr=t(28347);const fr=(0,Wn.Z)({root:{color:"#f3ba37"}})(ur.Z),qn=U=>U?"Remove from favorites":"Add to favorites",zn=U=>U?i.createElement(fr,null):i.createElement(dr.Z,null),mr=U=>{const{toggleStarredEntity:M,isStarredEntity:$}=vt(U.entity);return i.createElement(Cr.Z,{color:"inherit",...U,onClick:()=>M()},i.createElement(P.ZP,{title:qn($)},zn($)))};var An=t(77277),gn=t(55999),Tr=t(85256),Pr=t(8629),hr=t(79249),tn=t(38724),Ir=t(49429),_n=t(99688);function Lr(U){var Se;const M=(0,l.useApi)(h),$=(Se=U.metadata.annotations)==null?void 0:Se[u.lb],k=U.metadata.uid,ut=$==="bootstrap:bootstrap",et=(0,Re.default)(async()=>{const Oe=M.getOriginLocationByEntity(U);let be;if(!$)be=Promise.resolve([]);else{const ke=`metadata.annotations.${u.lb}`;be=M.getEntities({filter:{[ke]:$},fields:["kind","metadata.uid","metadata.name","metadata.namespace"]}).then(Ke=>Ke.items)}return Promise.all([Oe,be]).then(([ke,Ke])=>({location:ke,colocatedEntities:Ke}))},[M,U]),ft=(0,i.useCallback)(async function(){const{location:be,colocatedEntities:ke}=et.value;await M.removeLocationById(be.id),await Promise.allSettled(ke.map(Ke=>M.removeEntityByUid(Ke.metadata.uid)))},[M,et]),Ut=(0,i.useCallback)(async function(){await M.removeEntityByUid(k)},[M,k]);if(ut)return{type:"bootstrap",location:$,deleteEntity:Ut};const{loading:kt,error:ne,value:Qt}=et;if(kt)return{type:"loading"};if(ne)return{type:"error",error:ne};const{location:xt,colocatedEntities:wt}=Qt;return xt?{type:"unregister",location:$,colocatedEntities:wt.map(u.C_),unregisterLocation:ft,deleteEntity:Ut}:{type:"only-delete",deleteEntity:Ut}}var Or=t(10179);const xr=(0,Q.Z)({advancedButton:{fontSize:"0.7em"}}),Dr=({entity:U,onConfirm:M})=>{var Se;const $=(0,l.useApi)(l.alertApiRef),k=(0,l.useApi)(l.configApiRef),ut=xr(),et=Lr(U),[ft,Ut]=(0,i.useState)(!1),[kt,ne]=(0,i.useState)(!1),Qt=(Se=k.getOptionalString("app.title"))!=null?Se:"Backstage",xt=(0,i.useCallback)(async function(){if("unregisterLocation"in et){ne(!0);try{await et.unregisterLocation(),M()}catch(be){(0,Or.BD)(be),$.post({message:be.message})}finally{ne(!1)}}},[$,M,et]),wt=(0,i.useCallback)(async function(){if("deleteEntity"in et){ne(!0);try{await et.deleteEntity(),M()}catch(be){(0,Or.BD)(be),$.post({message:be.message})}finally{ne(!1)}}},[$,M,et]);return et.type==="loading"?i.createElement(ot.Progress,null):et.type==="error"?i.createElement(ot.ResponseErrorPanel,{error:et.error}):et.type==="bootstrap"?i.createElement(i.Fragment,null,i.createElement(_n.Z,{severity:"info"},'You cannot unregister this entity, since it originates from a protected Backstage configuration (location "',et.location,'"). If you believe this is in error, please contact the ',Qt," ","integrator."),i.createElement(tt.Z,{marginTop:2},!ft&&i.createElement(An.Z,{variant:"text",size:"small",color:"primary",className:ut.advancedButton,onClick:()=>Ut(!0)},"Advanced Options"),ft&&i.createElement(i.Fragment,null,i.createElement(gn.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(An.Z,{variant:"contained",color:"secondary",disabled:kt,onClick:wt},"Delete Entity")))):et.type==="only-delete"?i.createElement(i.Fragment,null,i.createElement(gn.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(An.Z,{variant:"contained",color:"secondary",disabled:kt,onClick:wt},"Delete Entity")):et.type==="unregister"?i.createElement(i.Fragment,null,i.createElement(gn.Z,null,"This action will unregister the following entities:"),i.createElement(gn.Z,{component:"ul"},et.colocatedEntities.map(Oe=>i.createElement("li",{key:`${Oe.kind}:${Oe.namespace}/${Oe.name}`},i.createElement(v,{entityRef:Oe})))),i.createElement(gn.Z,null,"Located at the following location:"),i.createElement(gn.Z,{component:"ul"},i.createElement("li",null,et.location)),i.createElement(gn.Z,null,"To undo, just re-register the entity in ",Qt,"."),i.createElement(tt.Z,{marginTop:2},i.createElement(An.Z,{variant:"contained",color:"secondary",disabled:kt,onClick:xt},"Unregister Location"),!ft&&i.createElement(tt.Z,{component:"span",marginLeft:2},i.createElement(An.Z,{variant:"text",size:"small",color:"primary",className:ut.advancedButton,onClick:()=>Ut(!0)},"Advanced Options"))),ft&&i.createElement(i.Fragment,null,i.createElement(tt.Z,{paddingTop:4,paddingBottom:4},i.createElement(Tr.Z,null)),i.createElement(gn.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(An.Z,{variant:"contained",color:"secondary",disabled:kt,onClick:wt},"Delete Entity"))):i.createElement(_n.Z,{severity:"error"},"Internal error: Unknown state")},Xr=({open:U,onConfirm:M,onClose:$,entity:k})=>i.createElement(Pr.Z,{open:U,onClose:$},i.createElement(hr.Z,{id:"responsive-dialog-title"},"Are you sure you want to unregister this entity?"),i.createElement(tn.Z,null,i.createElement(Dr,{entity:k,onConfirm:M})),i.createElement(Ir.Z,null,i.createElement(An.Z,{onClick:$,color:"primary"},"Cancel")));var Fr=t(94339),Br=t(11776),kr=t(12231),br=t(86136),Mr=t(49378),Bn=t(9520),gr=t(47603);const pr=(0,Q.Z)(U=>({root:{backgroundColor:"rgba(0, 0, 0, .11)",boxShadow:"none",margin:U.spacing(1,0,1,0)},title:{margin:U.spacing(1,0,0,1),textTransform:"uppercase",fontSize:12,fontWeight:"bold"},listIcon:{minWidth:30,color:U.palette.text.primary},menuItem:{minHeight:U.spacing(6)},groupWrapper:{margin:U.spacing(1,1,2,1)}}),{name:"CatalogReactUserListPicker"});function yr(U){return[{name:"Personal",items:[{id:"owned",label:"Owned",icon:gr.Z},{id:"starred",label:"Starred",icon:ur.Z}]},{name:U!=null?U:"Company",items:[{id:"all",label:"All"}]}]}const Nr=({initialFilter:U,availableFilters:M})=>{var pn,Ln;const $=pr(),ut=(pn=(0,l.useApi)(l.configApiRef).getOptionalString("organization.name"))!=null?pn:"Company",{filters:et,updateFilters:ft,backendEntities:Ut,queryParameters:kt}=me(),ne=["starred","all"],Qt=yr(ut).map(we=>({...we,items:we.items.filter(({id:Ge})=>["group","user"].some(bn=>bn===kt.kind)?ne.includes(Ge):!M||M.includes(Ge))})).filter(({items:we})=>!!we.length),{isStarredEntity:xt}=Yt(),{isOwnedEntity:wt}=J(),Se=(0,i.useMemo)(()=>new Zt("owned",wt,xt),[wt,xt]),Oe=(0,i.useMemo)(()=>new Zt("starred",wt,xt),[wt,xt]),[be,ke]=(0,i.useState)(Ut),Ke=be.filter(we=>Se.filterEntity(we)).length,[Je,ln]=(0,i.useState)(Ke>0?(Ln=[kt.user].flat()[0])!=null?Ln:U:"all");(0,i.useEffect)(()=>{ft({user:Je?new Zt(Je,wt,xt):void 0})},[Je,wt,xt,ft]),(0,i.useEffect)(()=>{const we=Me((0,d.compact)(Object.values({...et,user:void 0})));ke(Ut.filter(we))},[et,Ut]);function $e(we){switch(we){case"owned":return Ke;case"starred":return be.filter(Ge=>Oe.filterEntity(Ge)).length;default:return be.length}}return i.createElement(Fr.Z,{className:$.root},Qt.map(we=>i.createElement(i.Fragment,{key:we.name},i.createElement(Et.Z,{variant:"subtitle2",className:$.title},we.name),i.createElement(Fr.Z,{className:$.groupWrapper},i.createElement(Br.Z,{disablePadding:!0,dense:!0},we.items.map(Ge=>{var bn,Hn;return i.createElement(kr.Z,{key:Ge.id,button:!0,divider:!0,onClick:()=>ln(Ge.id),selected:Ge.id===((bn=et.user)==null?void 0:bn.value),className:$.menuItem},Ge.icon&&i.createElement(br.Z,{className:$.listIcon},i.createElement(Ge.icon,{fontSize:"small"})),i.createElement(Mr.Z,null,i.createElement(Et.Z,{variant:"body1","data-testid":`user-picker-${Ge.id}`},Ge.label)),i.createElement(Bn.Z,null,(Hn=$e(Ge.id))!=null?Hn:"-"))}))))))},Ur=({children:U,value:M})=>{var kt;const[$,k]=useState((kt=M==null?void 0:M.filters)!=null?kt:{}),ut=useCallback(ne=>{k(Qt=>{const xt=typeof ne=="function"?ne(Qt):ne;return{...Qt,...xt}})},[]),et={entities:[],backendEntities:[],updateFilters:ut,filters:$,loading:!1,queryParameters:{}},{filters:ft,...Ut}=M!=null?M:{};return React.createElement(EntityListContext.Provider,{value:{...et,...Ut}},U)};var Er=t(92787)},92787:function(){},39398:function(X,o,t){"use strict";t.r(o),t.d(o,{AboutCard:function(){return zt},AboutContent:function(){return st},AboutField:function(){return K}});var r=t(52890),e=t(41682),l=t(36964),h=t(36356),c=t(85653),s=t(79692),u=t(94339),d=t(32552),y=t(61837),m=t(85256),E=t(24579),i=t(52866),S=t(30254),B=t(27604),T=t(2784),G=t(47851),H=t(60905),D=t(90436),b=t(7089);const I=(0,s.Z)(ht=>({value:{fontWeight:"bold",overflow:"hidden",lineHeight:"24px",wordBreak:"break-word"},label:{color:ht.palette.text.secondary,textTransform:"uppercase",fontSize:"10px",fontWeight:"bold",letterSpacing:.5,overflow:"hidden",whiteSpace:"nowrap"}})),K=({label:ht,value:jt,gridSizes:Ot,children:Jt})=>{const ae=I(),Kt=(0,l.useElementFilter)(Jt,se=>se.getElements()),pe=Kt.length>0?Kt:T.createElement(D.Z,{variant:"body2",className:ae.value},jt||"unknown");return T.createElement(H.Z,{item:!0,...Ot},T.createElement(D.Z,{variant:"subtitle2",className:ae.label},ht),pe)},V=(0,s.Z)({description:{wordBreak:"break-word"}}),st=({entity:ht})=>{var de,Ne,Ue,Ie,Le,me;const jt=V(),Ot=ht.kind.toLocaleLowerCase("en-US")==="system",Jt=ht.kind.toLocaleLowerCase("en-US")==="resource",ae=ht.kind.toLocaleLowerCase("en-US")==="component",Kt=ht.kind.toLocaleLowerCase("en-US")==="api",pe=ht.kind.toLocaleLowerCase("en-US")==="template",se=ht.kind.toLocaleLowerCase("en-US")==="location",le=ht.kind.toLocaleLowerCase("en-US")==="group",Ae=(0,c.getEntityRelations)(ht,r.cz,{kind:"system"}),Me=(0,c.getEntityRelations)(ht,r.cz,{kind:"component"}),ye=(0,c.getEntityRelations)(ht,r.cz,{kind:"domain"}),ve=(0,c.getEntityRelations)(ht,r.S4);return T.createElement(H.Z,{container:!0},T.createElement(K,{label:"Description",gridSizes:{xs:12}},T.createElement(D.Z,{variant:"body2",paragraph:!0,className:jt.description},((de=ht==null?void 0:ht.metadata)==null?void 0:de.description)||"No description")),T.createElement(K,{label:"Owner",value:"No Owner",gridSizes:{xs:12,sm:6,lg:4}},ve.length>0&&T.createElement(c.EntityRefLinks,{entityRefs:ve,defaultKind:"group"})),(Ot||ye.length>0)&&T.createElement(K,{label:"Domain",value:"No Domain",gridSizes:{xs:12,sm:6,lg:4}},ye.length>0&&T.createElement(c.EntityRefLinks,{entityRefs:ye,defaultKind:"domain"})),(Kt||ae||Jt||Ae.length>0)&&T.createElement(K,{label:"System",value:"No System",gridSizes:{xs:12,sm:6,lg:4}},Ae.length>0&&T.createElement(c.EntityRefLinks,{entityRefs:Ae,defaultKind:"system"})),ae&&Me.length>0&&T.createElement(K,{label:"Parent Component",value:"No Parent Component",gridSizes:{xs:12,sm:6,lg:4}},T.createElement(c.EntityRefLinks,{entityRefs:Me,defaultKind:"component"})),(Kt||ae||Jt||pe||le||se||typeof((Ne=ht==null?void 0:ht.spec)==null?void 0:Ne.type)=="string")&&T.createElement(K,{label:"Type",value:(Ue=ht==null?void 0:ht.spec)==null?void 0:Ue.type,gridSizes:{xs:12,sm:6,lg:4}}),(Kt||ae||typeof((Ie=ht==null?void 0:ht.spec)==null?void 0:Ie.lifecycle)=="string")&&T.createElement(K,{label:"Lifecycle",value:(Le=ht==null?void 0:ht.spec)==null?void 0:Le.lifecycle,gridSizes:{xs:12,sm:6,lg:4}}),T.createElement(K,{label:"Tags",value:"No Tags",gridSizes:{xs:12,sm:6,lg:4}},(((me=ht==null?void 0:ht.metadata)==null?void 0:me.tags)||[]).map(Re=>T.createElement(b.Z,{key:Re,size:"small",label:Re}))))},At=(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 zt({variant:ht}){var Ie,Le;const jt=At(),{entity:Ot}=(0,c.useEntity)(),Jt=(0,l.useApi)(h.q3),ae=(0,l.useApi)(c.Ah),Kt=(0,l.useApi)(l.alertApiRef),pe=(0,l.useRouteRef)(G.j),se=(0,c.getEntitySourceLocation)(Ot,Jt),le=(0,c.getEntityMetadataEditUrl)(Ot),Ae={label:"View Source",disabled:!se,icon:T.createElement(h.nW,{type:se==null?void 0:se.integrationType}),href:se==null?void 0:se.locationTargetUrl},Me={label:"View TechDocs",disabled:!((Ie=Ot.metadata.annotations)==null?void 0:Ie["backstage.io/techdocs-ref"])||!pe,icon:T.createElement(S.Z,null),href:pe&&pe({namespace:Ot.metadata.namespace||r.sk,kind:Ot.kind,name:Ot.metadata.name})};let ye="";ht==="gridItem"?ye=jt.gridItemCard:ht==="fullHeight"&&(ye=jt.fullHeightCard);let ve="";ht==="gridItem"?ve=jt.gridItemCardContent:ht==="fullHeight"&&(ve=jt.fullHeightCardContent);const de=(Le=Ot.metadata.annotations)==null?void 0:Le[r.Jl],Ne=(de==null?void 0:de.startsWith("url:"))||(de==null?void 0:de.startsWith("file:")),Ue=(0,T.useCallback)(async()=>{await ae.refreshEntity((0,r.eE)(Ot)),Kt.post({message:"Refresh scheduled",severity:"info"})},[ae,Kt,Ot]);return T.createElement(u.Z,{className:ye},T.createElement(d.Z,{title:"About",action:T.createElement(T.Fragment,null,Ne&&T.createElement(y.Z,{"aria-label":"Refresh",title:"Schedule entity refresh",onClick:Ue},T.createElement(i.Z,null)),T.createElement(y.Z,{component:e.Link,"aria-label":"Edit",disabled:!le,title:"Edit Metadata",to:le!=null?le:"#"},T.createElement(B.Z,null))),subheader:T.createElement(e.HeaderIconLinkRow,{links:[Ae,Me]})}),T.createElement(m.Z,null),T.createElement(E.Z,{className:ve},T.createElement(st,{entity:Ot})))}},49782:function(X,o,t){"use strict";t.d(o,{K:function(){return m}});var r=t(2784),e=t(79692),l=t(12420),h=t(97580),c=t(73698),s=t(74603),u=t(12231),d=t(85653);const y=(0,e.Z)(E=>(0,l.Z)({root:{...E.typography.h4}})),m=({initialFilter:E="component"})=>{var b;const i=y(),{kinds:S=[]}=(0,d.useEntityKinds)(),{updateFilters:B,queryParameters:T}=(0,d.useEntityListProvider)(),[G,H]=(0,r.useState)(((b=[T.kind].flat()[0])!=null?b:E).toLocaleLowerCase("en-US"));(0,r.useEffect)(()=>{B({kind:G?new d.EntityKindFilter(G):void 0})},[G,B]);const D=[(0,h.Z)(G)].concat(S).sort().reduce((I,K)=>(I[K.toLocaleLowerCase("en-US")]=K,I),{});return r.createElement(c.Z,{input:r.createElement(s.Z,{value:G}),value:G,onChange:I=>H(I.target.value),classes:i},Object.keys(D).map(I=>r.createElement(u.Z,{value:I,key:I},`${D[I]}s`)))}},7758:function(X,o,t){"use strict";t.r(o),t.d(o,{CatalogPage:function(){return E},DefaultCatalogPage:function(){return m}});var r=t(2784),e=t(10289),l=t(41682),h=t(36964),c=t(85653),s=t(47851),u=t(91730),d=t(26997),y=t(49782);const m=({columns:i,actions:S,initiallySelectedFilter:B="owned"})=>{var H;const T=(H=(0,h.useApi)(h.configApiRef).getOptionalString("organization.name"))!=null?H:"Backstage",G=(0,h.useRouteRef)(s.y);return r.createElement(l.PageWithHeader,{title:`${T} Catalog`,themeId:"home"},r.createElement(c.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:G&&G()}),r.createElement(l.SupportButton,null,"All your software catalog entities")),r.createElement(d.q7,null,r.createElement(d.Gh,null,r.createElement(c.EntityTypePicker,null),r.createElement(c.UserListPicker,{initialFilter:B}),r.createElement(c.EntityOwnerPicker,null),r.createElement(c.EntityLifecyclePicker,null),r.createElement(c.EntityTagPicker,null)),r.createElement(d.Nz,null,r.createElement(u.E,{columns:i,actions:S}))))))},E=i=>(0,e.pC)()||r.createElement(m,{...i})},17499:function(X,o,t){"use strict";t.r(o),t.d(o,{createNameColumn:function(){return c},createSystemColumn:function(){return s},createOwnerColumn:function(){return u},createSpecTypeColumn:function(){return d},createSpecLifecycleColumn:function(){return y},createMetadataDescriptionColumn:function(){return m},createTagsColumn:function(){return E}});var r=t(2784),e=t(85653),l=t(7089),h=t(41682);function c(i){function S(B){var T;return((T=B.metadata)==null?void 0:T.title)||(0,e.formatEntityRefTitle)(B,{defaultKind:i==null?void 0:i.defaultKind})}return{title:"Name",field:"resolved.name",highlight:!0,customSort({entity:B},{entity:T}){return S(B).localeCompare(S(T))},render:({entity:B})=>{var T;return r.createElement(e.EntityRefLink,{entityRef:B,defaultKind:(i==null?void 0:i.defaultKind)||"Component",title:(T=B.metadata)==null?void 0:T.title})}}}function s(){return{title:"System",field:"resolved.partOfSystemRelationTitle",render:({resolved:i})=>r.createElement(e.EntityRefLinks,{entityRefs:i.partOfSystemRelations,defaultKind:"system"})}}function u(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:i})=>r.createElement(e.EntityRefLinks,{entityRefs:i.ownedByRelations,defaultKind:"group"})}}function d(){return{title:"Type",field:"entity.spec.type",hidden:!0}}function y(){return{title:"Lifecycle",field:"entity.spec.lifecycle"}}function m(){return{title:"Description",field:"entity.metadata.description",render:({entity:i})=>r.createElement(h.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(X,o,t){"use strict";t.d(o,{E:function(){return y}});var r=t(52890),e=t(85653),l=t(27604),h=t(2997),c=t(76635),s=t(2784),u=t(17499),d=t(41682);const y=({columns:m,actions:E})=>{var zt,ht,jt;const{isStarredEntity:i,toggleStarredEntity:S}=(0,e.useStarredEntities)(),{loading:B,error:T,entities:G,filters:H}=(0,e.useEntityListProvider)(),D=(0,s.useMemo)(()=>{var Ot;return[u.createNameColumn({defaultKind:(Ot=H.kind)==null?void 0:Ot.value}),u.createSystemColumn(),u.createOwnerColumn(),u.createSpecTypeColumn(),u.createSpecLifecycleColumn(),u.createMetadataDescriptionColumn(),u.createTagsColumn()]},[(zt=H.kind)==null?void 0:zt.value]),b=H.type===void 0,I=(0,c.capitalize)((jt=(ht=H.user)==null?void 0:ht.value)!=null?jt:"all");if(T)return s.createElement("div",null,s.createElement(d.WarningPanel,{severity:"error",title:"Could not fetch catalog entities."},s.createElement(d.CodeSnippet,{language:"text",text:T.toString()})));const K=[({entity:Ot})=>{const Jt=(0,e.getEntityMetadataViewUrl)(Ot);return{icon:()=>s.createElement(h.Z,{"aria-label":"View",fontSize:"small"}),tooltip:"View",disabled:!Jt,onClick:()=>{!Jt||window.open(Jt,"_blank")}}},({entity:Ot})=>{const Jt=(0,e.getEntityMetadataEditUrl)(Ot);return{icon:()=>s.createElement(l.Z,{"aria-label":"Edit",fontSize:"small"}),tooltip:"Edit",disabled:!Jt,onClick:()=>{!Jt||window.open(Jt,"_blank")}}},({entity:Ot})=>{const Jt=i(Ot);return{cellStyle:{paddingLeft:"1em"},icon:()=>(0,e.favoriteEntityIcon)(Jt),tooltip:(0,e.favoriteEntityTooltip)(Jt),onClick:()=>S(Ot)}}],V=G.map(Ot=>{const Jt=(0,e.getEntityRelations)(Ot,r.cz,{kind:"system"}),ae=(0,e.getEntityRelations)(Ot,r.S4);return{entity:Ot,resolved:{name:(0,e.formatEntityRefTitle)(Ot,{defaultKind:"Component"}),ownedByRelationsTitle:ae.map(Kt=>(0,e.formatEntityRefTitle)(Kt,{defaultKind:"group"})).join(", "),ownedByRelations:ae,partOfSystemRelationTitle:Jt.map(Kt=>(0,e.formatEntityRefTitle)(Kt,{defaultKind:"system"})).join(", "),partOfSystemRelations:Jt}}}),st=(m||D).find(Ot=>Ot.title==="Type");st&&(st.hidden=!b);const At=V.length>20;return s.createElement(d.Table,{isLoading:B,columns:m||D,options:{paging:At,pageSize:20,actionsColumnIndex:-1,loadingType:"linear",showEmptyDataSourceMessage:!B,padding:"dense",pageSizeOptions:[20,50,100]},title:`${I} (${G.length})`,data:V,actions:E||K})};y.columns=u},26997:function(X,o,t){"use strict";t.d(o,{Nz:function(){return i},Gh:function(){return E},q7:function(){return l}});var r=t(60905),e=t(2784);const l=({children:S})=>e.createElement(r.Z,{container:!0,style:{position:"relative"}},S);var h=t(41156),c=t(60364),s=t(77277),u=t(4190),d=t(95544),y=t(90436),m=t(36444);const E=({children:S})=>{const B=(0,h.Z)(D=>D.breakpoints.down("md")),T=(0,c.Z)(),[G,H]=(0,e.useState)(!1);return B?e.createElement(e.Fragment,null,e.createElement(s.Z,{style:{marginTop:T.spacing(1),marginLeft:T.spacing(1)},onClick:()=>H(!0),startIcon:e.createElement(m.Z,null)},"Filters"),e.createElement(u.ZP,{open:G,onClose:()=>H(!1),anchor:"left",disableAutoFocus:!0,keepMounted:!0,variant:"temporary"},e.createElement(d.Z,{m:2},e.createElement(y.Z,{variant:"h6",component:"h2",style:{marginBottom:T.spacing(1)}},"Filters"),S))):e.createElement(r.Z,{item:!0,lg:2},S)},i=({children:S})=>e.createElement(r.Z,{item:!0,xs:12,lg:10},S)},47851:function(X,o,t){"use strict";t.d(o,{y:function(){return e},j:function(){return l}});var r=t(36964);const e=(0,r.createExternalRouteRef)({id:"create-component",optional:!0}),l=(0,r.createExternalRouteRef)({id:"view-techdoc",optional:!0,params:["namespace","kind","name"]})},91512:function(X,o,t){"use strict";t.d(o,{g:function(){return c},w:function(){return s}});var r=t(36964),e=t(10179),l=t(19126),h=t.n(l);const c=(0,r.createApiRef)({id:"plugin.search.queryservice"});class s{constructor(d){q(this,"discoveryApi");q(this,"identityApi");this.discoveryApi=d.discoveryApi,this.identityApi=d.identityApi}async query(d){const y=await this.identityApi.getIdToken(),m=h().stringify(d),E=`${await this.discoveryApi.getBaseUrl("search/query")}?${m}`,i=await fetch(E,{headers:y?{Authorization:`Bearer ${y}`}:{}});if(!i.ok)throw await e.VL.fromResponse(i);return i.json()}}},19941:function(X,o,t){"use strict";t.r(o),t.d(o,{DefaultResultListItem:function(){return d}});var r=t(2784),e=t(38402),l=t(86136),h=t(49378),c=t(95544),s=t(85256),u=t(41682);const d=({result:y,icon:m,secondaryAction:E})=>r.createElement(u.Link,{to:y.location},r.createElement(e.Z,{alignItems:"center"},m&&r.createElement(l.Z,null,m),r.createElement(h.Z,{primaryTypographyProps:{variant:"h6"},primary:y.title,secondary:y.text}),E&&r.createElement(c.Z,{alignItems:"flex-end"},E)),r.createElement(s.Z,null))},1795:function(X,o,t){"use strict";t.r(o),t.d(o,{SearchBar:function(){return S},SearchBarBase:function(){return i}});var r=t(2784),e=t(48760),l=t(36964),h=t(50581),c=t(61837),s=t(74603),u=t(21853),d=t(33375),y=t(22313);const m=({children:B})=>{const T=(0,l.useAnalytics)(),{term:G}=(0,y.Rx)();return(0,r.useEffect)(()=>{G&&T.captureEvent("search",G)},[T,G]),r.createElement(r.Fragment,null,B)},E=()=>(0,r.useContext)(y.ci)!==void 0,i=({onChange:B,onKeyDown:T,onSubmit:G,debounceTime:H=200,clearButton:D=!0,fullWidth:b=!0,value:I,inputProps:K={},endAdornment:V,...st})=>{const At=(0,l.useApi)(l.configApiRef),[zt,ht]=(0,r.useState)(I),jt=E();(0,r.useEffect)(()=>{ht(Ae=>Ae!==I?I:Ae)},[I]),(0,e.Z)(()=>B(zt),H,[zt]);const Ot=(0,r.useCallback)(Ae=>{ht(Ae.target.value)},[ht]),Jt=(0,r.useCallback)(Ae=>{T&&T(Ae),G&&Ae.key==="Enter"&&G()},[T,G]),ae=(0,r.useCallback)(()=>{B("")},[B]),Kt=`Search in ${At.getOptionalString("app.title")||"Backstage"}`,pe=r.createElement(h.Z,{position:"start"},r.createElement(c.Z,{"aria-label":"Query",disabled:!0},r.createElement(u.Z,null))),se=r.createElement(h.Z,{position:"end"},r.createElement(c.Z,{"aria-label":"Clear",onClick:ae},r.createElement(d.Z,null))),le=r.createElement(m,null,r.createElement(s.Z,{"data-testid":"search-bar-next",value:zt,placeholder:Kt,startAdornment:pe,endAdornment:D?se:V,inputProps:{"aria-label":"Search",...K},fullWidth:b,onChange:Ot,onKeyDown:Jt,...st}));return jt?le:r.createElement(y.Nd,null,le)},S=({onChange:B,...T})=>{const{term:G,setTerm:H}=(0,y.Rx)(),D=b=>{B?B(b):H(b)};return r.createElement(i,{value:G,onChange:D,...T})}},22313:function(X,o,t){"use strict";t.d(o,{ci:function(){return s},Nd:function(){return u},Rx:function(){return d}});var r=t(36964),e=t(2784),l=t(64279),h=t(1849),c=t(91512);const s=(0,e.createContext)(void 0),u=({initialState:y={term:"",pageCursor:void 0,filters:{},types:[]},children:m})=>{var ae,Kt,pe,se;const E=(0,r.useApi)(c.g),[i,S]=(0,e.useState)(y.pageCursor),[B,T]=(0,e.useState)(y.filters),[G,H]=(0,e.useState)(y.term),[D,b]=(0,e.useState)(y.types),[I,K]=(0,e.useState)(!1),V=(0,e.useCallback)(()=>K(le=>!le),[]),st=(0,h.Z)(G),At=(0,l.default)(()=>E.query({term:G,filters:B,pageCursor:i,types:D}),[G,B,D,i]),zt=!At.loading&&!At.error&&((ae=At.value)==null?void 0:ae.nextPageCursor),ht=!At.loading&&!At.error&&((Kt=At.value)==null?void 0:Kt.previousPageCursor),jt=(0,e.useCallback)(()=>{var le;S((le=At.value)==null?void 0:le.nextPageCursor)},[(pe=At.value)==null?void 0:pe.nextPageCursor]),Ot=(0,e.useCallback)(()=>{var le;S((le=At.value)==null?void 0:le.previousPageCursor)},[(se=At.value)==null?void 0:se.previousPageCursor]);(0,e.useEffect)(()=>{G&&st&&G!==st&&S(void 0)},[G,st,y.pageCursor]);const Jt={result:At,filters:B,setFilters:T,open:I,toggleModal:V,term:G,setTerm:H,types:D,setTypes:b,pageCursor:i,setPageCursor:S,fetchNextPage:zt?jt:void 0,fetchPreviousPage:ht?Ot:void 0};return e.createElement(r.AnalyticsContext,{attributes:{searchTypes:D.sort().join(",")}},e.createElement(s.Provider,{value:Jt,children:m}))},d=()=>{const y=(0,e.useContext)(s);if(y===void 0)throw new Error("useSearch must be used within a SearchContextProvider");return y}},65678:function(X,o,t){"use strict";t.d(o,{s:function(){return V}});var r=t(2784),e=t(8629),l=t(79249),h=t(27556),c=t(38724),s=t(60905),u=t(85256),d=t(11776),y=t(49429),m=t(69001),E=t(79692),i=t(1795),S=t(19941),B=t(39332),T=t(22313),G=t(8542),H=t(36964),D=t(41682),b=t(20863);const I=(0,E.Z)(st=>({container:{borderRadius:30,display:"flex",height:"2.4em"},input:{flex:1},paperFullWidth:{height:"calc(100% - 128px)"},dialogActionsContainer:{padding:st.spacing(1,3)},viewResultsLink:{verticalAlign:"0.5em"}})),K=({open:st=!0,toggleModal:At})=>{const zt=(0,H.useRouteRef)(b._Z),ht=I(),{term:jt}=(0,T.Rx)(),Ot=()=>{At()},Jt=()=>{Ot()};return r.createElement(e.Z,{classes:{paperFullWidth:ht.paperFullWidth},onClose:At,"aria-labelledby":"search-modal-title",open:st,fullWidth:!0,maxWidth:"lg"},r.createElement(l.Z,null,r.createElement(h.Z,{className:ht.container},r.createElement(i.SearchBar,{className:ht.input}))),r.createElement(c.Z,null,r.createElement(s.Z,{container:!0,direction:"row-reverse",justifyContent:"flex-start",alignItems:"center"},r.createElement(s.Z,{item:!0},r.createElement(D.Link,{onClick:At,to:`${zt()}?query=${jt}`},r.createElement("span",{className:ht.viewResultsLink},"View Full Results"),r.createElement(m.Z,{color:"primary"})))),r.createElement(u.Z,null),r.createElement(B.SearchResult,null,({results:ae})=>r.createElement(d.Z,null,ae.map(({document:Kt})=>r.createElement("div",{role:"button",tabIndex:0,key:`${Kt.location}-btn`,onClick:Ot,onKeyPress:Jt},r.createElement(S.DefaultResultListItem,{key:Kt.location,result:Kt})))))),r.createElement(y.Z,{className:ht.dialogActionsContainer},r.createElement(s.Z,{container:!0,direction:"row"},r.createElement(s.Z,{item:!0,xs:12},r.createElement(G.G,null)))))},V=({open:st=!0,toggleModal:At})=>r.createElement(T.Nd,null,r.createElement(K,{open:st,toggleModal:At}))},3992:function(X,o,t){"use strict";t.r(o),t.d(o,{SearchPage:function(){return je}});var r=t(2784),e=t(1849),l=t(19126),h=t.n(l),c=t(10289),s=t(22313),u=t(60905),d=t(48760),y=t(79692),m=t(27556),E=t(74603),i=t(61837),S=t(21853),B=t(33375);const T=(0,y.Z)(()=>({root:{display:"flex",alignItems:"center"},input:{flex:1}})),G=({searchQuery:Ft,handleSearch:oe,handleClearSearchBar:ot})=>{const P=T();return r.createElement(m.Z,{component:"form",onSubmit:v=>oe(v),className:P.root},r.createElement(i.Z,{disabled:!0,type:"submit","aria-label":"search"},r.createElement(S.Z,null)),r.createElement(E.Z,{className:P.input,placeholder:"Search in Backstage",value:Ft,onChange:v=>oe(v),inputProps:{"aria-label":"search backstage"}}),r.createElement(i.Z,{"aria-label":"search",onClick:()=>ot()},r.createElement(B.Z,null)))};var H=t(85256),D=t(90436),b=t(99688),I=t(64279),K=t(85653),V=t(36444);const st=(0,y.Z)(Ft=>({filters:{width:"250px",display:"flex"},icon:{margin:Ft.spacing(-1,0,0,0)}})),At=({numberOfSelectedFilters:Ft,handleToggleFilters:oe})=>{const ot=st();return r.createElement("div",{className:ot.filters},r.createElement(i.Z,{className:ot.icon,"aria-label":"settings",onClick:oe},r.createElement(V.Z,null)),r.createElement(D.Z,{variant:"h6"},"Filters (",Ft||0,")"))};var zt=t(94339),ht=t(32552),jt=t(77277),Ot=t(24579),Jt=t(73698),ae=t(12231),Kt=t(11776),pe=t(38402),se=t(21324),le=t(49378);const Ae=(0,y.Z)(Ft=>({filters:{background:"transparent",boxShadow:"0px 0px 0px 0px"},checkbox:{padding:Ft.spacing(0,1,0,1)},dropdown:{width:"100%"}})),Me=({filters:Ft,filterOptions:oe,resetFilters:ot,updateSelected:P,updateChecked:v})=>{const N=Ae();return r.createElement(zt.Z,{className:N.filters},r.createElement(ht.Z,{title:r.createElement(D.Z,{variant:"h6"},"Filters"),action:r.createElement(jt.Z,{color:"primary",onClick:()=>ot()},"CLEAR ALL")}),r.createElement(H.Z,null),oe.kind.length===0&&oe.lifecycle.length===0&&r.createElement(Ot.Z,null,r.createElement(D.Z,{variant:"subtitle2"},"Filters cannot be applied to available results")),oe.kind.length>0&&r.createElement(Ot.Z,null,r.createElement(D.Z,{variant:"subtitle2"},"Kind"),r.createElement(Jt.Z,{id:"outlined-select",onChange:F=>{var j;return P((j=F==null?void 0:F.target)==null?void 0:j.value)},variant:"outlined",className:N.dropdown,value:Ft.selected},oe.kind.map(F=>r.createElement(ae.Z,{selected:F==="",dense:!0,key:F,value:F},F)))),oe.lifecycle.length>0&&r.createElement(Ot.Z,null,r.createElement(D.Z,{variant:"subtitle2"},"Lifecycle"),r.createElement(Kt.Z,{disablePadding:!0,dense:!0},oe.lifecycle.map(F=>r.createElement(pe.Z,{key:F,dense:!0,button:!0,onClick:()=>v(F)},r.createElement(se.Z,{edge:"start",disableRipple:!0,className:N.checkbox,color:"primary",checked:Ft.checked.includes(F),tabIndex:-1,value:F,name:F}),r.createElement(le.Z,{id:F,primary:F}))))))};var ye=t(52890),ve=t(41682),de=t(36964);const Ne=(0,y.Z)(Ft=>({searchQuery:{color:Ft.palette.text.primary,background:Ft.palette.background.default,borderRadius:"10%"},tableHeader:{margin:Ft.spacing(1,0,0,0),display:"flex"},divider:{width:"1px",margin:Ft.spacing(0,2),padding:Ft.spacing(2,0)}})),Ue=[{title:"Name",field:"name",highlight:!0,render:Ft=>r.createElement(ve.Link,{to:Ft.url||""},Ft.name)},{title:"Description",field:"description"},{title:"Owner",field:"owner"},{title:"Kind",field:"kind"},{title:"LifeCycle",field:"lifecycle"}],Ie=({searchQuery:Ft,numberOfSelectedFilters:oe,numberOfResults:ot,handleToggleFilters:P})=>{const v=Ne();return r.createElement("div",{className:v.tableHeader},r.createElement(At,{numberOfSelectedFilters:oe,handleToggleFilters:P}),r.createElement(H.Z,{className:v.divider,orientation:"vertical"}),r.createElement(u.Z,{item:!0,xs:12},Ft?r.createElement(D.Z,{variant:"h6"},`${ot} `,ot>1?"results for ":"result for ",r.createElement("span",{className:v.searchQuery},'"',Ft,'"')," "):r.createElement(D.Z,{variant:"h6"},`${ot} results`)))},Le=({searchQuery:Ft})=>{const oe=(0,de.useApi)(K.Ah),[ot,P]=(0,r.useState)(!1),[v,N]=(0,r.useState)({selected:"",checked:[]}),[F,j]=(0,r.useState)([]),{loading:nt,error:gt,value:ct}=(0,I.default)(async()=>(await oe.getEntities()).items.map(Tt=>{var ce,dt,Ct,Yt,Vt;return{name:Tt.metadata.name,description:Tt.metadata.description,owner:typeof((ce=Tt.spec)==null?void 0:ce.owner)=="string"?(dt=Tt.spec)==null?void 0:dt.owner:void 0,kind:Tt.kind,lifecycle:typeof((Ct=Tt.spec)==null?void 0:Ct.lifecycle)=="string"?(Yt=Tt.spec)==null?void 0:Yt.lifecycle:void 0,url:`/catalog/${((Vt=Tt.metadata.namespace)==null?void 0:Vt.toLocaleLowerCase("en-US"))||ye.sk}/${Tt.kind.toLocaleLowerCase("en-US")}/${Tt.metadata.name}`}}),[]);if((0,r.useEffect)(()=>{if(ct){let Lt=ct;v.selected!==""&&(Lt=ct.filter(Tt=>v.selected.includes(Tt.kind))),v.checked.length>0&&(Lt=Lt.filter(Tt=>Tt.lifecycle&&v.checked.includes(Tt.lifecycle))),Ft&&(Lt=Lt.filter(Tt=>{var ce,dt,Ct;return((ce=Tt.name)==null?void 0:ce.toLocaleLowerCase("en-US").includes(Ft))||((dt=Tt.name)==null?void 0:dt.toLocaleLowerCase("en-US").includes(Ft.split(" ").join("-")))||((Ct=Tt.description)==null?void 0:Ct.toLocaleLowerCase("en-US").includes(Ft))})),j(Lt)}},[v,Ft,ct]),nt)return r.createElement(ve.Progress,null);if(gt)return r.createElement(b.Z,{severity:"error"},"Error encountered while fetching search results. ",gt.toString());if(!ct||ct.length===0)return r.createElement(ve.EmptyState,{missing:"data",title:"Sorry, no results were found"});const Dt=()=>{N({selected:"",checked:[]})},Zt=Lt=>{N(Tt=>({...Tt,selected:Lt}))},re=Lt=>{if(v.checked.includes(Lt)){N(Tt=>({...Tt,checked:Tt.checked.filter(ce=>ce!==Lt)}));return}N(Tt=>({...Tt,checked:[...Tt.checked,Lt]}))},ee=ct.reduce((Lt,Tt)=>(Tt.kind&&Lt.kind.indexOf(Tt.kind)<0&&Lt.kind.push(Tt.kind),Tt.lifecycle&&Lt.lifecycle.indexOf(Tt.lifecycle)<0&&Lt.lifecycle.push(Tt.lifecycle),Lt),{kind:[],lifecycle:[]});return r.createElement(r.Fragment,null,r.createElement(u.Z,{container:!0},ot&&r.createElement(u.Z,{item:!0,xs:3},r.createElement(Me,{filters:v,filterOptions:ee,resetFilters:Dt,updateSelected:Zt,updateChecked:re})),r.createElement(u.Z,{item:!0,xs:ot?9:12},r.createElement(ve.Table,{options:{paging:!0,pageSize:20,search:!1},data:F,columns:Ue,title:r.createElement(Ie,{searchQuery:Ft,numberOfResults:F.length,numberOfSelectedFilters:(v.selected!==""?1:0)+v.checked.length,handleToggleFilters:()=>P(!ot)})}))))},me=()=>{const[Ft,oe]=(0,ve.useQueryParamState)("query"),[ot,P]=(0,r.useState)(Ft!=null?Ft:""),v=F=>{F.preventDefault(),P(F.target.value)};(0,r.useEffect)(()=>P(Ft!=null?Ft:""),[Ft]),(0,d.Z)(()=>{oe(ot)},200,[ot]);const N=()=>{P("")};return r.createElement(ve.Page,{themeId:"home"},r.createElement(ve.Header,{title:"Search"}),r.createElement(ve.Content,null,r.createElement(u.Z,{container:!0,direction:"row"},r.createElement(u.Z,{item:!0,xs:12},r.createElement(G,{handleSearch:v,handleClearSearchBar:N,searchQuery:ot})),r.createElement(u.Z,{item:!0,xs:12},r.createElement(Le,{searchQuery:(Ft!=null?Ft:"").toLocaleLowerCase("en-US")})))))},Re=()=>{const Ft=(0,c.TH)(),{term:oe,setTerm:ot,types:P,setTypes:v,pageCursor:N,setPageCursor:F,filters:j,setFilters:nt}=(0,s.Rx)(),gt=(0,e.Z)(Ft.search);return(0,r.useEffect)(()=>{if(Ft.search===gt)return;const ct=h().parse(Ft.search.substring(1),{arrayLimit:0})||{};ct.filters&&nt(ct.filters),ct.query&&ot(ct.query),ct.pageCursor&&F(ct.pageCursor),ct.types&&v(ct.types)},[gt,Ft,ot,v,F,nt]),(0,r.useEffect)(()=>{const ct=h().stringify({query:oe,types:P,pageCursor:N,filters:j},{arrayFormat:"brackets"}),Dt=`${window.location.pathname}?${ct}`;window.history.replaceState(null,document.title,Dt)},[oe,P,N,j]),null},je=()=>{const Ft=(0,c.pC)();return r.createElement(s.Nd,null,r.createElement(Re,null),Ft||r.createElement(me,null))}},39332:function(X,o,t){"use strict";t.r(o),t.d(o,{SearchResult:function(){return h}});var r=t(41682),e=t(2784),l=t(22313);const h=({children:c})=>{const{result:{loading:s,error:u,value:d}}=(0,l.Rx)();return s?e.createElement(r.Progress,null):u?e.createElement(r.ResponseErrorPanel,{title:"Error encountered while fetching search results",error:u}):(d==null?void 0:d.results.length)?e.createElement(e.Fragment,null,c({results:d.results})):e.createElement(r.EmptyState,{missing:"data",title:"Sorry, no results were found"})}},8542:function(X,o,t){"use strict";t.d(o,{G:function(){return d}});var r=t(79692),e=t(77277),l=t(35352),h=t(27742),c=t(2784),s=t(22313);const u=(0,r.Z)(y=>({root:{display:"flex",justifyContent:"space-between",gap:y.spacing(2),margin:y.spacing(2,0)}})),d=()=>{const{fetchNextPage:y,fetchPreviousPage:m}=(0,s.Rx)(),E=u();return!y&&!m?c.createElement(c.Fragment,null):c.createElement("nav",{"arial-label":"pagination navigation",className:E.root},c.createElement(e.Z,{"aria-label":"previous page",disabled:!m,onClick:m,startIcon:c.createElement(l.Z,null)},"Previous"),c.createElement(e.Z,{"aria-label":"next page",disabled:!y,onClick:y,endIcon:c.createElement(h.Z,null)},"Next"))}},20863:function(X,o,t){"use strict";t.d(o,{_Z:function(){return l}});var r=t(91512),e=t(36964);const l=(0,e.createRouteRef)({id:"search"}),h=(0,e.createRouteRef)({id:"search:next"}),c=(0,e.createPlugin)({id:"search",apis:[(0,e.createApiFactory)({api:r.g,deps:{discoveryApi:e.discoveryApiRef,identityApi:e.identityApiRef},factory:({discoveryApi:T,identityApi:G})=>new r.w({discoveryApi:T,identityApi:G})})],routes:{root:l,nextRoot:h}}),s=c.provide((0,e.createRoutableExtension)({name:"SearchPage",component:()=>Promise.resolve().then(t.bind(t,3992)).then(T=>T.SearchPage),mountPoint:l})),u=c.provide((0,e.createRoutableExtension)({name:"SearchPageNext",component:()=>Promise.resolve().then(t.bind(t,3992)).then(T=>T.SearchPage),mountPoint:h})),d=c.provide((0,e.createComponentExtension)({name:"SearchBar",component:{lazy:()=>Promise.resolve().then(t.bind(t,1795)).then(T=>T.SearchBar)}})),y=c.provide((0,e.createComponentExtension)({name:"SearchBarNext",component:{lazy:()=>Promise.resolve().then(t.bind(t,1795)).then(T=>T.SearchBar)}})),m=c.provide((0,e.createComponentExtension)({name:"SearchResult",component:{lazy:()=>Promise.resolve().then(t.bind(t,39332)).then(T=>T.SearchResult)}})),E=c.provide((0,e.createComponentExtension)({name:"SearchResultNext",component:{lazy:()=>Promise.resolve().then(t.bind(t,39332)).then(T=>T.SearchResult)}})),i=c.provide((0,e.createComponentExtension)({name:"SidebarSearchModal",component:{lazy:()=>t.e(3825).then(t.bind(t,43825)).then(T=>T.SidebarSearchModal)}})),S=c.provide((0,e.createComponentExtension)({name:"DefaultResultListItem",component:{lazy:()=>Promise.resolve().then(t.bind(t,19941)).then(T=>T.DefaultResultListItem)}})),B=c.provide((0,e.createComponentExtension)({name:"HomePageSearchBar",component:{lazy:()=>t.e(6105).then(t.bind(t,46105)).then(T=>T.HomePageSearchBar)}}))},94067:function(X,o,t){"use strict";t.r(o),t.d(o,{EmbeddedDocsRouter:function(){return B},Router:function(){return S},isTechDocsAvailable:function(){return i}});var r=t(2784),e=t(85653),l=t(10289),h=t(41481),c=t(31752),s=t(73873),u=t(97589),d=t(36964);const y=({entity:T})=>{var H;const G=(0,d.useApi)(d.configApiRef);return r.createElement(s.Ej,{withSearch:!1,entityRef:{namespace:(0,u.D)((H=T.metadata.namespace)!=null?H:"default",G),kind:(0,u.D)(T.kind,G),name:(0,u.D)(T.metadata.name,G)}})};var m=t(41682);const E="backstage.io/techdocs-ref",i=T=>{var G,H;return Boolean((H=(G=T==null?void 0:T.metadata)==null?void 0:G.annotations)==null?void 0:H[E])},S=()=>r.createElement(l.Z5,null,r.createElement(l.AW,{path:"/",element:r.createElement(h.TechDocsIndexPage,null)}),r.createElement(l.AW,{path:"/:namespace/:kind/:name/*",element:r.createElement(c.TechDocsPage,null)})),B=T=>{var D;const{entity:G}=(0,e.useEntity)();return((D=G.metadata.annotations)==null?void 0:D[E])?r.createElement(l.Z5,null,r.createElement(l.AW,{path:"/*",element:r.createElement(y,{entity:G})})):r.createElement(m.MissingAnnotationEmptyState,{annotation:E})}},3337:function(X,o,t){"use strict";t.d(o,{D:function(){return e},g:function(){return l}});var r=t(36964);const e=(0,r.createApiRef)({id:"plugin.techdocs.storageservice"}),l=(0,r.createApiRef)({id:"plugin.techdocs.service"})},71226:function(X,o,t){"use strict";t.d(o,{O:function(){return m}});var r=t(2784),e=t(79692),l=t(49378),h=t(38402),c=t(85256),s=t(41682),u=t(15277),d=t.n(u);const y=(0,e.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",marginBottom:"1rem"}}),m=({result:E,lineClamp:i=5,asListItem:S=!0,asLink:B=!0,title:T})=>{const G=y(),H=()=>{var I;return r.createElement(l.Z,{className:G.itemText,primaryTypographyProps:{variant:"h6"},primary:T||`${E.title} | ${(I=E.entityTitle)!=null?I:E.name} docs`,secondary:r.createElement(d(),{line:i,truncateText:"\u2026",text:E.text,element:"span"})})},D=({children:I})=>B?r.createElement(s.Link,{to:E.location},I):r.createElement(r.Fragment,null,I),b=({children:I})=>S?r.createElement(r.Fragment,null,r.createElement(h.Z,{alignItems:"flex-start",className:G.flexContainer},I),r.createElement(c.Z,{component:"li"})):r.createElement(r.Fragment,null,I);return r.createElement(D,null,r.createElement(b,null,r.createElement(H,null)))}},97589:function(X,o,t){"use strict";t.d(o,{D:function(){return r}});function r(e,l){return l.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")?e:e.toLocaleLowerCase("en-US")}},10187:function(X,o,t){"use strict";t.r(o),t.d(o,{DocsCardGrid:function(){return m}});var r=t(2784),e=t(36964),l=t(94339),h=t(16111),c=t(24579),s=t(14503),u=t(68725),d=t(41682),y=t(97589);const m=({entities:E})=>{const i=(0,e.useRouteRef)(u.Fw),S=(0,e.useApi)(e.configApiRef);return E?r.createElement(d.ItemCardGrid,{"data-testid":"docs-explore"},(E==null?void 0:E.length)?E.map((B,T)=>{var G,H;return r.createElement(l.Z,{key:T},r.createElement(h.Z,null,r.createElement(d.ItemCardHeader,{title:(G=B.metadata.title)!=null?G:B.metadata.name})),r.createElement(c.Z,null,B.metadata.description),r.createElement(s.Z,null,r.createElement(d.Button,{to:i({namespace:(0,y.D)((H=B.metadata.namespace)!=null?H:"default",S),kind:(0,y.D)(B.kind,S),name:(0,y.D)(B.metadata.name,S)}),color:"primary","data-testid":"read_docs"},"Read Docs")))}):null):null}},83201:function(X,o,t){"use strict";t.r(o),t.d(o,{DocsTable:function(){return E}});var r=t(2784),e=t(95074),l=t(36964),h=t(52890),c=t(85653),s=t(68725),u=t(41682),d=t(50294),y=t(67430),m=t(97589);const E=({entities:i,title:S,loading:B,columns:T,actions:G})=>{const[,H]=(0,e.Z)(),D=(0,l.useRouteRef)(s.Fw),b=(0,l.useApi)(l.configApiRef);if(!i)return null;const I=i.map(st=>{var zt;const At=(0,c.getEntityRelations)(st,h.S4);return{entity:st,resolved:{docsUrl:D({namespace:(0,m.D)((zt=st.metadata.namespace)!=null?zt:"default",b),kind:(0,m.D)(st.kind,b),name:(0,m.D)(st.metadata.name,b)}),ownedByRelations:At,ownedByRelationsTitle:At.map(ht=>(0,c.formatEntityRefTitle)(ht,{defaultKind:"group"})).join(", ")}}}),K=[y.createNameColumn(),y.createOwnerColumn(),y.createTypeColumn()],V=[d.createCopyDocsUrlAction(H)];return r.createElement(r.Fragment,null,B||I&&I.length>0?r.createElement(u.Table,{isLoading:B,options:{paging:!0,pageSize:20,search:!0,actionsColumnIndex:-1},data:I,columns:T||K,actions:G||V,title:S?`${S} (${I.length})`:`All (${I.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(X,o,t){"use strict";t.r(o),t.d(o,{TechDocsCustomHome:function(){return i}});var r=t(2784),e=t(64279),l=t(79692),h=t(85653),c=t(83201),s=t(10187),u=t(1114),d=t(41682),y=t(36964);const m={DocsTable:c.DocsTable,DocsCardGrid:s.DocsCardGrid},E=({config:S,entities:B,index:T})=>{const H=(0,l.Z)({panelContainer:{marginBottom:"2rem",...S.panelCSS?S.panelCSS:{}}})(),{value:D}=(0,h.useOwnUser)(),b=m[S.panelType],I=B.filter(K=>S.filterPredicate==="ownedByUser"?D?(0,h.isOwnerOf)(D,K):!1:typeof S.filterPredicate=="function"&&S.filterPredicate(K));return r.createElement(r.Fragment,null,r.createElement(d.ContentHeader,{title:S.title,description:S.description},T===0?r.createElement(d.SupportButton,null,"Discover documentation in your ecosystem."):null),r.createElement("div",{className:H.panelContainer},r.createElement(b,{"data-testid":"techdocs-custom-panel",entities:I})))},i=({tabsConfig:S})=>{const[B,T]=(0,r.useState)(0),G=(0,y.useApi)(h.Ah),{value:H,loading:D,error:b}=(0,e.default)(async()=>(await G.getEntities({filter:{"metadata.annotations.backstage.io/techdocs-ref":h.n3},fields:["apiVersion","kind","metadata","relations","spec.owner","spec.type"]})).items.filter(V=>{var st;return!!((st=V.metadata.annotations)==null?void 0:st["backstage.io/techdocs-ref"])})),I=S[B];return D?r.createElement(u.j,null,r.createElement(d.Content,null,r.createElement(d.Progress,null))):b?r.createElement(u.j,null,r.createElement(d.Content,null,r.createElement(d.WarningPanel,{severity:"error",title:"Could not load available documentation."},r.createElement(d.CodeSnippet,{language:"text",text:b.toString()})))):r.createElement(u.j,null,r.createElement(d.HeaderTabs,{selectedIndex:B,onChange:K=>T(K),tabs:S.map(({label:K},V)=>({id:V.toString(),label:K}))}),r.createElement(d.Content,{"data-testid":"techdocs-content"},I.panels.map((K,V)=>r.createElement(E,{key:V,config:K,entities:H||[],index:V}))))}},41481:function(X,o,t){"use strict";t.r(o),t.d(o,{TechDocsIndexPage:function(){return c}});var r=t(2784),e=t(10289),l=t(57110);const h=()=>{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})},c=()=>(0,e.pC)()||r.createElement(h,null)},1114:function(X,o,t){"use strict";t.d(o,{j:function(){return h}});var r=t(2784),e=t(41682),l=t(36964);const h=({children:c})=>{var d;const u=`Documentation available in ${(d=(0,l.useApi)(l.configApiRef).getOptionalString("organization.name"))!=null?d:"Backstage"}`;return r.createElement(e.PageWithHeader,{title:"Documentation",subtitle:u,themeId:"documentation"},c)}},50294:function(X,o,t){"use strict";t.r(o),t.d(o,{createCopyDocsUrlAction:function(){return h},createStarEntityAction:function(){return c}});var r=t(2784),e=t(39981),l=t(85653);function h(s){return u=>({icon:()=>r.createElement(e.Z,{fontSize:"small"}),tooltip:"Click to copy documentation link to clipboard",onClick:()=>s(`${window.location.origin}${u.resolved.docsUrl}`)})}function c(s,u){return({entity:d})=>{const y=s(d);return{cellStyle:{paddingLeft:"1em"},icon:()=>(0,l.favoriteEntityIcon)(y),tooltip:(0,l.favoriteEntityTooltip)(y),onClick:()=>u(d)}}}},67430:function(X,o,t){"use strict";t.r(o),t.d(o,{createNameColumn:function(){return c},createOwnerColumn:function(){return s},createTypeColumn:function(){return u}});var r=t(2784),e=t(41682),l=t(85653);function h(d){return d.metadata.title||d.metadata.name}function c(){return{title:"Document",field:"entity.metadata.name",highlight:!0,render:d=>r.createElement(e.SubvalueCell,{value:r.createElement(e.Link,{to:d.resolved.docsUrl},h(d.entity)),subvalue:d.entity.metadata.description})}}function s(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:d})=>r.createElement(l.EntityRefLinks,{entityRefs:d.ownedByRelations,defaultKind:"group"})}}function u(){return{title:"Type",field:"entity.spec.type"}}},75448:function(X,o,t){"use strict";t.d(o,{Ej:function(){return oe},DK:function(){return Re}});var r=t(2784),e=t(10289),l=t(79692),h=t(60364),c=t(60905),s=t(36964),u=t(36356),d=t(3337);const y=(ot,P,v)=>{const N=ot==="src"&&P.endsWith(".svg"),F=!P.match(/^([a-z]*:)?\/\//i),j=P.startsWith(v);return N&&(F||j)},m=({techdocsStorageApi:ot,entityId:P,path:v})=>async N=>{const F=await ot.getApiOrigin(),j=async(nt,gt)=>{for(const ct of nt)if(ct.hasAttribute(gt)){const Dt=ct.getAttribute(gt);if(!Dt)return;const Zt=await ot.getBaseUrl(Dt,P,v);if(y(gt,Dt,F))try{const ee=await(await fetch(Zt,{credentials:"include"})).text();ct.setAttribute(gt,`data:image/svg+xml;base64,${btoa(ee)}`)}catch{ct.setAttribute("alt",`Error: ${Dt}`)}else ct.setAttribute(gt,Zt)}};return await Promise.all([j(N.querySelectorAll("img"),"src"),j(N.querySelectorAll("script"),"src"),j(N.querySelectorAll("link"),"href"),j(N.querySelectorAll("a[download]"),"href")]),N};var E=t(94594),i=t(67097),S=t(9832),B=t(82717),T=t.n(B);const G=ot=>P=>{const v=P.querySelector('[title="Edit this page"]');if(!v||!v.href)return P;const N=new URL(v.href),F=ot.byUrl(N);if((F==null?void 0:F.type)!=="github"&&(F==null?void 0:F.type)!=="gitlab")return P;const j=P.querySelector("article>h1").childNodes[0].textContent,nt=encodeURIComponent(`Documentation Feedback: ${j}`),gt=encodeURIComponent(`Page source:
|
|
32
|
-
${v.href}
|
|
33
|
-
|
|
34
|
-
Feedback:`),ct=(F==null?void 0:F.type)==="github"?(0,E.Pb)(N.href,"blob"):N.href,Dt=T()(ct),Zt=`/${Dt.organization}/${Dt.name}`,re=v.cloneNode();switch(F==null?void 0:F.type){case"gitlab":re.href=`${N.origin}${Zt}/issues/new?issue[title]=${nt}&issue[description]=${gt}`;break;case"github":re.href=`${N.origin}${Zt}/issues/new?title=${nt}&body=${gt}`;break;default:return P}return S.render(r.createElement(i.Z),re),re.style.paddingLeft="5px",re.title="Leave feedback for this page",re.id="git-feedback-link",v==null||v.insertAdjacentElement("beforebegin",re),P},H=()=>ot=>(((v,N)=>{Array.from(v).filter(F=>F.hasAttribute(N)).forEach(F=>{const j=F.getAttribute(N);if(j){j.match(/^https?:\/\//i)&&F.setAttribute("target","_blank");try{const nt=D(window.location.href);F.setAttribute(N,new URL(j,nt).toString())}catch{F.replaceWith(F.textContent||j)}}})})(Array.from(ot.getElementsByTagName("a")),"href"),ot);function D(ot){const P=new URL(ot);return!P.pathname.endsWith("/")&&!P.pathname.endsWith(".html")&&(P.pathname+="/"),P.toString()}const b=({baseUrl:ot,onClick:P})=>v=>(Array.from(v.getElementsByTagName("a")).forEach(N=>{N.addEventListener("click",F=>{const nt=N.getAttribute("href");!nt||nt.startsWith(ot)&&(F.preventDefault(),P(F,nt))})}),v),I=()=>ot=>{var P;return(P=ot.querySelector(".md-header"))==null||P.remove(),ot},K=()=>ot=>{var P;return(P=ot.querySelector(".md-footer-copyright"))==null||P.remove(),ot},V=({docStorageUrl:ot,onLoading:P,onLoaded:v})=>N=>{const F=Array.from(N.querySelectorAll('head > link[rel="stylesheet"]')).filter(nt=>{var gt;return(gt=nt.getAttribute("href"))==null?void 0:gt.startsWith(ot)});let j=F.length;return j>0&&P(N),F.forEach(nt=>nt.addEventListener("load",()=>{j-=1,j===0&&v(N)})),N};var st=t(35368),At=t.n(st);const zt=/main\.[A-Fa-f0-9]{8}\.min\.css$/,ht=/^https:\/\/fonts\.googleapis\.com/,jt=/^https:\/\/fonts\.gstatic\.com/,Ot=ot=>{if(ot.nodeName&&ot.nodeName==="LINK"){const P=ot.getAttribute("href")||"";P.match(zt)&&ot.setAttribute("rel","stylesheet"),P.match(ht)&&ot.setAttribute("rel","stylesheet"),P.match(jt)&&ot.setAttribute("rel","preconnect")}return ot},Jt=ot=>P=>{if(P.nodeName==="IFRAME"){const v=P.getAttribute("src");if(!v)return P.remove(),P;try{const N=new URL(v);ot.some(j=>N.host===j)||P.remove()}catch(N){console.warn(`Invalid iframe src, ${N}`),P.remove()}}return P},ae=ot=>{const P=(ot==null?void 0:ot.getOptionalStringArray("allowedIframeHosts"))||[];return v=>{At().addHook("afterSanitizeAttributes",Ot);const N=["link"];return P.length>0&&(At().addHook("beforeSanitizeElements",Jt(P)),N.push("iframe")),At().sanitize(v.innerHTML,{ADD_TAGS:N,FORBID_TAGS:["style"],WHOLE_DOCUMENT:!0,RETURN_DOM:!0})}},Kt=({css:ot})=>P=>(P.getElementsByTagName("head")[0].insertAdjacentHTML("beforeend",`<style>${ot}</style>`),P),pe=()=>ot=>(setTimeout(()=>{var P;if(window.location.hash){const v=window.location.hash.slice(1);(P=ot==null?void 0:ot.querySelector(`#${v}`))==null||P.scrollIntoView()}},200),ot),se=async(ot,P)=>{let v;if(typeof ot=="string")v=new DOMParser().parseFromString(ot,"text/html").documentElement;else if(ot instanceof Element)v=ot;else throw new Error("dom is not a recognized type");for(const N of P)v=await N(v);return v};var le=t(7735),Ae=t(25921),Me=t(64279),ye=t(77446);function ve({contentLoading:ot,content:P,activeSyncState:v}){return ot||v==="BUILD_READY_RELOAD"||!P&&v==="CHECKING"?"CHECKING":!P&&v==="BUILDING"?"INITIAL_BUILD":P?v==="BUILDING"?"CONTENT_STALE_REFRESHING":v==="BUILD_READY"?"CONTENT_STALE_READY":v==="ERROR"?"CONTENT_STALE_ERROR":"CONTENT_FRESH":"CONTENT_NOT_FOUND"}function de(ot,P){const v={...ot};switch(P.type){case"sync":P.state==="CHECKING"&&(v.buildLog=[]),v.activeSyncState=P.state,v.syncError=P.syncError;break;case"contentLoading":v.contentLoading=!0,v.contentError=void 0;break;case"content":typeof P.path=="string"&&(v.path=P.path),v.contentLoading=!1,v.content=P.content,v.contentError=P.contentError;break;case"buildLog":v.buildLog=v.buildLog.concat(P.log);break;default:throw new Error}return["BUILD_READY","BUILD_READY_RELOAD"].includes(v.activeSyncState)&&["contentLoading","content"].includes(P.type)&&(v.activeSyncState="UP_TO_DATE",v.buildLog=[]),v}function Ne(ot,P,v,N){var Zt,re;const[F,j]=(0,r.useReducer)(de,{activeSyncState:"CHECKING",path:N,contentLoading:!0,buildLog:[]}),nt=(0,s.useApi)(d.D),{retry:gt}=(0,ye.Z)(async()=>{j({type:"contentLoading"});try{const ee=await nt.getEntityDocs({kind:ot,namespace:P,name:v},N);return j({type:"content",content:ee,path:N}),ee}catch(ee){j({type:"content",contentError:ee,path:N})}},[nt,ot,P,v,N]),ct=(0,r.useRef)({content:void 0,reload:()=>{}});return ct.current={content:F.content,reload:gt},(0,Me.default)(async()=>{j({type:"sync",state:"CHECKING"});const ee=setTimeout(()=>{j({type:"sync",state:"BUILDING"})},1e3);try{switch(await nt.syncEntityDocs({kind:ot,namespace:P,name:v},Tt=>{j({type:"buildLog",log:Tt})})){case"updated":ct.current.content?j({type:"sync",state:"BUILD_READY"}):(ct.current.reload(),j({type:"sync",state:"BUILD_READY_RELOAD"}));break;case"cached":j({type:"sync",state:"UP_TO_DATE"});break;default:j({type:"sync",state:"ERROR",syncError:new Error("Unexpected return state")});break}}catch(Lt){j({type:"sync",state:"ERROR",syncError:Lt})}finally{clearTimeout(ee)}},[ot,v,P,nt,j,ct]),{state:(0,r.useMemo)(()=>ve({activeSyncState:F.activeSyncState,contentLoading:F.contentLoading,content:F.content}),[F.activeSyncState,F.content,F.contentLoading]),contentReload:gt,path:F.path,content:F.content,contentErrorMessage:(Zt=F.contentError)==null?void 0:Zt.toString(),syncErrorMessage:(re=F.syncError)==null?void 0:re.toString(),buildLog:F.buildLog}}const Ue=(0,l.Z)(ot=>({searchBar:{marginLeft:"20rem",maxWidth:"calc(100% - 20rem * 2 - 3rem)",marginTop:ot.spacing(1),"@media screen and (max-width: 76.1875em)":{marginLeft:"10rem",maxWidth:"calc(100% - 10rem)"}}})),Ie=(0,r.createContext)({}),Le=({children:ot,entityRef:P})=>{const{"*":v}=(0,e.UO)(),{kind:N,namespace:F,name:j}=P,nt=Ne(N,F,j,v);return r.createElement(Ie.Provider,{value:nt},ot)},me=(ot,P)=>v=>React.createElement(Le,{entityRef:P},React.createElement(ot,{...v})),Re=()=>(0,r.useContext)(Ie),je=ot=>{const P=(0,e.s0)(),v=(0,h.Z)(),N=(0,s.useApi)(d.D),F=(0,s.useApi)(u.q3),j=(0,s.useApi)(s.configApiRef),{namespace:nt="",kind:gt="",name:ct=""}=ot,{state:Dt,path:Zt,content:re}=Re(),[ee,Lt]=(0,r.useState)(),[Tt,ce]=(0,r.useState)(null),dt=(0,r.useCallback)(()=>{if(!Tt||!ee)return;const vt=Tt.querySelector(".md-container > .md-tabs");ee.forEach(Nt=>{const Wt=Math.max(Tt.getBoundingClientRect().top,0);Nt.style.top=vt?`${Wt+vt.getBoundingClientRect().height}px`:`${Wt}px`})},[Tt,ee]);(0,r.useEffect)(()=>(dt(),window.addEventListener("scroll",dt,!0),window.addEventListener("resize",dt),()=>{window.removeEventListener("scroll",dt,!0),window.removeEventListener("resize",dt)}),[dt,Dt]);const Ct=(0,r.useCallback)(()=>{if(!Tt)return;const vt=Tt.querySelector(".md-footer");vt&&(vt.style.width=`${Tt.getBoundingClientRect().width}px`)},[Tt]);(0,r.useEffect)(()=>(Ct(),window.addEventListener("resize",Ct),()=>{window.removeEventListener("resize",Ct)}));const Yt=(0,r.useCallback)((vt,Nt)=>se(vt,[ae(j.getOptionalConfig("techdocs.sanitizer")),m({techdocsStorageApi:N,entityId:{kind:gt,name:ct,namespace:nt},path:Nt}),H(),I(),K(),G(F),Kt({css:`
|
|
35
|
-
body {
|
|
36
|
-
font-family: ${v.typography.fontFamily};
|
|
37
|
-
--md-text-color: ${v.palette.text.primary};
|
|
38
|
-
--md-text-link-color: ${v.palette.primary.main};
|
|
39
|
-
|
|
40
|
-
--md-code-fg-color: ${v.palette.text.primary};
|
|
41
|
-
--md-code-bg-color: ${v.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 table:not([class]) {
|
|
55
|
-
font-size: 1rem;
|
|
56
|
-
border: 1px solid ${v.palette.text.primary};
|
|
57
|
-
border-bottom: none;
|
|
58
|
-
border-collapse: collapse;
|
|
59
|
-
}
|
|
60
|
-
.md-typeset table:not([class]) td, .md-typeset table:not([class]) th {
|
|
61
|
-
border-bottom: 1px solid ${v.palette.text.primary};
|
|
62
|
-
}
|
|
63
|
-
.md-typeset table:not([class]) th { font-weight: bold; }
|
|
64
|
-
.md-typeset .admonition, .md-typeset details {
|
|
65
|
-
font-size: 1rem;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
/* style the checkmarks of the task list */
|
|
69
|
-
.md-typeset .task-list-control .task-list-indicator::before {
|
|
70
|
-
background-color: ${v.palette.action.disabledBackground};
|
|
71
|
-
}
|
|
72
|
-
.md-typeset .task-list-control [type="checkbox"]:checked + .task-list-indicator:before {
|
|
73
|
-
background-color: ${v.palette.success.main};
|
|
74
|
-
}
|
|
75
|
-
/**/
|
|
76
|
-
|
|
77
|
-
@media screen and (max-width: 76.1875em) {
|
|
78
|
-
.md-nav {
|
|
79
|
-
background-color: ${v.palette.background.default};
|
|
80
|
-
transition: none !important
|
|
81
|
-
}
|
|
82
|
-
.md-sidebar--secondary { display: none; }
|
|
83
|
-
.md-sidebar--primary { left: 72px; width: 10rem }
|
|
84
|
-
.md-content { margin-left: 10rem; max-width: calc(100% - 10rem); }
|
|
85
|
-
.md-content__inner { font-size: 0.9rem }
|
|
86
|
-
.md-footer {
|
|
87
|
-
position: static;
|
|
88
|
-
padding-left: 10rem;
|
|
89
|
-
}
|
|
90
|
-
.md-footer-nav__link {
|
|
91
|
-
/* footer links begin to overlap at small sizes without setting width */
|
|
92
|
-
width: 50%;
|
|
93
|
-
}
|
|
94
|
-
.md-nav--primary .md-nav__title {
|
|
95
|
-
white-space: normal;
|
|
96
|
-
height: auto;
|
|
97
|
-
line-height: 1rem;
|
|
98
|
-
cursor: auto;
|
|
99
|
-
}
|
|
100
|
-
.md-nav--primary > .md-nav__title [for="none"] {
|
|
101
|
-
padding-top: 0;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
`}),Kt({css:`
|
|
105
|
-
.md-nav__link, .md-typeset a, .md-typeset a::before, .md-typeset .headerlink {
|
|
106
|
-
transition: none;
|
|
107
|
-
}
|
|
108
|
-
`}),Kt({css:`
|
|
109
|
-
.md-typeset pre > code::-webkit-scrollbar-thumb {
|
|
110
|
-
background-color: hsla(0, 0%, 0%, 0.32);
|
|
111
|
-
}
|
|
112
|
-
.md-typeset pre > code::-webkit-scrollbar-thumb:hover {
|
|
113
|
-
background-color: hsla(0, 0%, 0%, 0.87);
|
|
114
|
-
}
|
|
115
|
-
`}),Kt({css:`
|
|
116
|
-
:host {
|
|
117
|
-
--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>');
|
|
118
|
-
--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>');
|
|
119
|
-
--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>');
|
|
120
|
-
--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>');
|
|
121
|
-
--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>');
|
|
122
|
-
--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>');
|
|
123
|
-
--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>');
|
|
124
|
-
--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>');
|
|
125
|
-
--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>');
|
|
126
|
-
--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>');
|
|
127
|
-
--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>');
|
|
128
|
-
--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>');
|
|
129
|
-
}
|
|
130
|
-
:host {
|
|
131
|
-
--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>');
|
|
132
|
-
}
|
|
133
|
-
:host {
|
|
134
|
-
--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>');
|
|
135
|
-
}
|
|
136
|
-
:host {
|
|
137
|
-
--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>');
|
|
138
|
-
--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>');
|
|
139
|
-
}
|
|
140
|
-
`})]),[gt,ct,nt,F,N,j,v.palette.action.disabledBackground,v.palette.background.default,v.palette.background.paper,v.palette.primary.main,v.palette.success.main,v.palette.text.primary,v.typography.fontFamily]),Vt=(0,r.useCallback)(async vt=>se(vt,[pe(),b({baseUrl:window.location.origin,onClick:(Nt,Wt)=>{var J,R;const he=Nt.ctrlKey||Nt.metaKey,qt=new URL(Wt);qt.hash?he?window.open(`${qt.pathname}${qt.hash}`,"_blank"):(P(`${qt.pathname}${qt.hash}`),(J=vt==null?void 0:vt.querySelector(`#${qt.hash.slice(1)}`))==null||J.scrollIntoView()):he?window.open(qt.pathname,"_blank"):(P(qt.pathname),(R=vt==null?void 0:vt.querySelector(".md-content__inner"))==null||R.scrollIntoView())}}),V({docStorageUrl:await N.getApiOrigin(),onLoading:Nt=>{Nt.style.setProperty("opacity","0")},onLoaded:Nt=>{var Wt;Nt.style.removeProperty("opacity"),(Wt=Nt.querySelector(".md-nav__title"))==null||Wt.removeAttribute("for"),Lt(Array.from(Nt.querySelectorAll(".md-sidebar")))}})]),[P,N]);return(0,r.useEffect)(()=>{if(!re)return()=>{};let vt=!0;return Yt(re,Zt).then(async Nt=>{if(!(Nt==null?void 0:Nt.innerHTML)||!vt)return;window.scroll({top:0});const Wt=await Vt(Nt);ce(Wt)}),()=>{vt=!1}},[re,Zt,Yt,Vt]),Tt},Ft=({entityRef:ot,onReady:P=()=>{},withSearch:v=!0})=>{var gt,ct;const N=Ue(),F=je(ot),j=(0,r.useRef)(null),nt=(0,r.useRef)(P);return(0,r.useEffect)(()=>{nt.current=P},[P]),(0,r.useEffect)(()=>{if(!F||!j.current)return;const Dt=j.current,Zt=Dt.shadowRoot||Dt.attachShadow({mode:"open"});Array.from(Zt.children).forEach(re=>Zt.removeChild(re)),Zt.appendChild(F),nt.current()},[F]),r.createElement(r.Fragment,null,r.createElement(Ae.N,null),v&&((ct=(gt=j==null?void 0:j.current)==null?void 0:gt.shadowRoot)==null?void 0:ct.innerHTML)&&r.createElement(c.Z,{container:!0,className:N.searchBar},r.createElement(le.S,{entityId:ot})),r.createElement("div",{"data-testid":"techdocs-content-shadowroot",ref:j}))},oe=({entityRef:ot,onReady:P=()=>{},withSearch:v=!0})=>r.createElement(Le,{entityRef:ot},r.createElement(Ft,{entityRef:ot,onReady:P,withSearch:v}))},94252:function(X,o,t){"use strict";t.d(o,{T:function(){return h}});var r=t(2784),e=t(36964),l=t(41682);const h=({errorMessage:c})=>{const s=(0,e.useApi)(e.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:c||"Documentation not found",additionalInfo:u})}},31752:function(X,o,t){"use strict";t.r(o),t.d(o,{TechDocsPage:function(){return E}});var r=t(2784),e=t(10289),l=t(64279),h=t(3337),c=t(94252),s=t(36964),u=t(41682),d=t(75448),y=t(46025);const m=()=>{const[i,S]=(0,r.useState)(!1),{namespace:B,kind:T,name:G}=(0,e.UO)(),H=(0,s.useApi)(h.g),{value:D}=(0,l.default)(()=>i?H.getTechDocsMetadata({kind:T,namespace:B,name:G}):Promise.resolve(void 0),[T,B,G,H,i]),{value:b,error:I}=(0,l.default)(()=>H.getEntityMetadata({kind:T,namespace:B,name:G}),[T,B,G,H]),K=(0,r.useCallback)(()=>{S(!0)},[S]);return I?r.createElement(c.T,{errorMessage:I.message}):r.createElement(u.Page,{themeId:"documentation"},r.createElement(y.n,{techDocsMetadata:D,entityMetadata:b,entityRef:{kind:T,namespace:B,name:G}}),r.createElement(u.Content,{"data-testid":"techdocs-content"},r.createElement(d.Ej,{onReady:K,entityRef:{kind:T,namespace:B,name:G}})))},E=({children:i})=>{const S=(0,e.pC)(),[B,T]=(0,r.useState)(!1),{namespace:G,kind:H,name:D}=(0,e.UO)(),b=(0,s.useApi)(h.g),{value:I}=(0,l.default)(()=>B?b.getTechDocsMetadata({kind:H,namespace:G,name:D}):Promise.resolve(void 0),[H,G,D,b,B]),{value:K,error:V}=(0,l.default)(()=>b.getEntityMetadata({kind:H,namespace:G,name:D}),[H,G,D,b]),st=(0,r.useCallback)(()=>{T(!0)},[T]);return V?r.createElement(c.T,{errorMessage:V.message}):i?r.createElement(u.Page,{themeId:"documentation"},i instanceof Function?i({techdocsMetadataValue:I,entityMetadataValue:K,entityRef:{kind:H,namespace:G,name:D},onReady:st}):i):S||r.createElement(m,null)}},46025:function(X,o,t){"use strict";t.d(o,{n:function(){return d}});var r=t(52890),e=t(41682),l=t(36964),h=t(85653),c=t(73250),s=t(2784),u=t(68725);const d=({entityRef:y,entityMetadata:m,techDocsMetadata:E})=>{const{name:i}=y,{site_name:S,site_description:B}=E||{},{locationMetadata:T,spec:G}=m||{},H=G==null?void 0:G.lifecycle,D=m?(0,h.getEntityRelations)(m,r.S4):[],b=(0,l.useRouteRef)(u._Z)(),I=s.createElement(s.Fragment,null,s.createElement(e.HeaderLabel,{label:"Component",value:s.createElement(h.EntityRefLink,{color:"inherit",entityRef:y,defaultKind:"Component"})}),D.length>0&&s.createElement(e.HeaderLabel,{label:"Owner",value:s.createElement(h.EntityRefLinks,{color:"inherit",entityRefs:D,defaultKind:"group"})}),H?s.createElement(e.HeaderLabel,{label:"Lifecycle",value:H}):null,T&&T.type!=="dir"&&T.type!=="file"?s.createElement(e.HeaderLabel,{label:"",value:s.createElement("a",{href:T.target,target:"_blank",rel:"noopener noreferrer"},s.createElement(c.Z,{style:{marginTop:"-25px",fill:"#fff"}}))}):null);return s.createElement(e.Header,{title:S||".",pageTitleOverride:S||i,subtitle:B&&B!=="None"?B:"",type:"Docs",typeLink:b},I)}},7735:function(X,o,t){"use strict";t.d(o,{S:function(){return ce}});var r=t(91512),e=t(2784),l=t(79692);const h=(0,l.Z)(dt=>({filters:{width:"250px",display:"flex"},icon:{margin:dt.spacing(-1,0,0,0)}})),c=({numberOfSelectedFilters:dt,handleToggleFilters:Ct})=>{const Yt=h();return React.createElement("div",{className:Yt.filters},React.createElement(IconButton,{className:Yt.icon,"aria-label":"settings",onClick:Ct},React.createElement(FilterListIcon,null)),React.createElement(Typography,{variant:"h6"},"Filters (",dt||0,")"))},s=(0,l.Z)(dt=>({filters:{background:"transparent",boxShadow:"0px 0px 0px 0px"},checkbox:{padding:dt.spacing(0,1,0,1)},dropdown:{width:"100%"}})),u=({filters:dt,filterOptions:Ct,resetFilters:Yt,updateSelected:Vt,updateChecked:vt})=>{const Nt=s();return React.createElement(Card,{className:Nt.filters},React.createElement(CardHeader,{title:React.createElement(Typography,{variant:"h6"},"Filters"),action:React.createElement(Button,{color:"primary",onClick:()=>Yt()},"CLEAR ALL")}),React.createElement(Divider,null),Ct.kind.length===0&&Ct.lifecycle.length===0&&React.createElement(CardContent,null,React.createElement(Typography,{variant:"subtitle2"},"Filters cannot be applied to available results")),Ct.kind.length>0&&React.createElement(CardContent,null,React.createElement(Typography,{variant:"subtitle2"},"Kind"),React.createElement(Select,{id:"outlined-select",onChange:Wt=>{var he;return Vt((he=Wt==null?void 0:Wt.target)==null?void 0:he.value)},variant:"outlined",className:Nt.dropdown,value:dt.selected},Ct.kind.map(Wt=>React.createElement(MenuItem,{selected:Wt==="",dense:!0,key:Wt,value:Wt},Wt)))),Ct.lifecycle.length>0&&React.createElement(CardContent,null,React.createElement(Typography,{variant:"subtitle2"},"Lifecycle"),React.createElement(List,{disablePadding:!0,dense:!0},Ct.lifecycle.map(Wt=>React.createElement(ListItem,{key:Wt,dense:!0,button:!0,onClick:()=>vt(Wt)},React.createElement(Checkbox,{edge:"start",disableRipple:!0,className:Nt.checkbox,color:"primary",checked:dt.checked.includes(Wt),tabIndex:-1,value:Wt,name:Wt}),React.createElement(ListItemText,{id:Wt,primary:Wt}))))))};var d=t(1795),y=t(22313),m=t(42494),E=t(84899),i=t(5806),S=t(21324),B=t(56939),T=t(73698),G=t(12231);const H=(0,l.Z)({label:{textTransform:"capitalize"}}),D=({className:dt,name:Ct,defaultValue:Yt,values:Vt=[]})=>{const vt=H(),{filters:Nt,setFilters:Wt}=(0,y.Rx)();(0,e.useEffect)(()=>{Array.isArray(Yt)&&Wt(qt=>({...qt,[Ct]:Yt}))},[]);const he=qt=>{const{target:{value:J,checked:R}}=qt;Wt(O=>{const{[Ct]:Q,...tt}=O,Et=(Q||[]).filter(Bt=>Bt!==J),mt=R?[...Et,J]:Et;return mt.length?{...tt,[Ct]:mt}:tt})};return e.createElement(m.Z,{className:dt,fullWidth:!0,"data-testid":"search-checkboxfilter-next"},e.createElement(E.Z,{className:vt.label},Ct),Vt.map(qt=>{var J;return e.createElement(i.Z,{key:qt,control:e.createElement(S.Z,{color:"primary",tabIndex:-1,inputProps:{"aria-labelledby":qt},value:qt,name:qt,onChange:he,checked:((J=Nt[Ct])!=null?J:[]).includes(qt)}),label:qt})}))},b=({className:dt,name:Ct,defaultValue:Yt,values:Vt=[]})=>{const vt=H(),{filters:Nt,setFilters:Wt}=(0,y.Rx)();(0,e.useEffect)(()=>{typeof Yt=="string"&&Wt(qt=>({...qt,[Ct]:Yt}))},[]);const he=qt=>{const{target:{value:J}}=qt;Wt(R=>{const{[Ct]:O,...Q}=R;return J?{...Q,[Ct]:J}:Q})};return e.createElement(m.Z,{className:dt,variant:"filled",fullWidth:!0,"data-testid":"search-selectfilter-next"},e.createElement(B.Z,{className:vt.label,margin:"dense"},Ct),e.createElement(T.Z,{variant:"outlined",value:Nt[Ct]||"",onChange:he},e.createElement(G.Z,{value:""},e.createElement("em",null,"All")),Vt.map(qt=>e.createElement(G.Z,{key:qt,value:qt},qt))))},I=({component:dt,...Ct})=>e.createElement(dt,{...Ct});I.Checkbox=dt=>e.createElement(I,{...dt,component:D}),I.Select=dt=>e.createElement(I,{...dt,component:b});const K=null;var V=t(65678),st=t(3992),At=t(8542),zt=t(7089),ht=t(49378),jt=t(62155),Ot=t(94339),Jt=t(32552),ae=t(24579),Kt=t(27616),pe=t(8284),se=t(70660),le=t(11776),Ae=t(85256),Me=t(38402),ye=t(86136),ve=t(38016),de=t(56881);const Ne=(0,l.Z)(dt=>({card:{backgroundColor:"rgba(0, 0, 0, .11)"},cardContent:{paddingTop:dt.spacing(1)},icon:{color:dt.palette.common.black},list:{width:"100%"},listItemIcon:{width:"24px",height:"24px"},accordion:{backgroundColor:dt.palette.background.paper},accordionSummary:{minHeight:"auto","&.Mui-expanded":{minHeight:"auto"}},accordionSummaryContent:{margin:dt.spacing(2,0),"&.Mui-expanded":{margin:dt.spacing(2,0)}},accordionDetails:{padding:dt.spacing(0,0,1)}})),Ue=dt=>{const Ct=Ne(),{setPageCursor:Yt,setTypes:Vt,types:vt}=(0,y.Rx)(),[Nt,Wt]=(0,e.useState)(!0),{defaultValue:he,name:qt,types:J}=dt,R=()=>Wt(Et=>!Et),O=Et=>()=>{Vt(Et!==""?[Et]:[]),Yt(void 0),Wt(!1)};(0,e.useEffect)(()=>{he&&Vt([he])},[]);const Q=[{value:"",name:"All",icon:e.createElement(de.Z,null)},...J],tt=vt[0]||"";return e.createElement(Ot.Z,{className:Ct.card},e.createElement(Jt.Z,{title:qt,titleTypographyProps:{variant:"overline"}}),e.createElement(ae.Z,{className:Ct.cardContent},e.createElement(Kt.Z,{className:Ct.accordion,expanded:Nt,onChange:R},e.createElement(pe.Z,{classes:{root:Ct.accordionSummary,content:Ct.accordionSummaryContent},expandIcon:e.createElement(ve.Z,{className:Ct.icon}),IconButtonProps:{size:"small"}},Nt?"Collapse":Q.filter(Et=>Et.value===tt)[0].name),e.createElement(se.Z,{classes:{root:Ct.accordionDetails}},e.createElement(le.Z,{className:Ct.list,component:"nav","aria-label":"filter by type",disablePadding:!0,dense:!0},Q.map(Et=>e.createElement(e.Fragment,{key:Et.value},e.createElement(Ae.Z,null),e.createElement(Me.Z,{selected:vt[0]===Et.value||vt.length===0&&Et.value==="",onClick:O(Et.value),button:!0},e.createElement(ye.Z,null,(0,e.cloneElement)(Et.icon,{className:Ct.listItemIcon})),e.createElement(ht.Z,{primary:Et.name})))))))))};var Ie=t(99152),Le=t(6487);const me=(0,l.Z)(dt=>({tabs:{borderBottom:`1px solid ${dt.palette.textVerySubtle}`,padding:dt.spacing(0,4)},tab:{height:"50px",fontWeight:dt.typography.fontWeightBold,fontSize:dt.typography.pxToRem(13),color:dt.palette.textSubtle,minWidth:"130px"}})),Re=dt=>{const Ct=me(),{setPageCursor:Yt,setTypes:Vt,types:vt}=(0,y.Rx)(),{defaultValue:Nt,types:Wt}=dt,he=(J,R)=>{Vt(R!==""?[R]:[]),Yt(void 0)};(0,e.useEffect)(()=>{Nt&&Vt([Nt])},[]);const qt=[{value:"",name:"All"},...Wt];return e.createElement(Ie.Z,{className:Ct.tabs,indicatorColor:"primary",value:vt.length===0?"":vt[0],onChange:he},qt.map(J=>e.createElement(Le.Z,{className:Ct.tab,disableRipple:!0,label:J.name,value:J.value})))},je=(0,l.Z)(dt=>({label:{textTransform:"capitalize"},chips:{display:"flex",flexWrap:"wrap",marginTop:dt.spacing(1)},chip:{margin:2}})),Ft=dt=>{const{className:Ct,defaultValue:Yt,name:Vt,values:vt=[]}=dt,Nt=je(),{types:Wt,setTypes:he}=(0,y.Rx)();(0,jt.Z)(()=>{Wt.length||(Yt&&Array.isArray(Yt)?he(Yt):Yt&&he([Yt]))});const qt=J=>{const R=J.target.value;he(R)};return e.createElement(m.Z,{className:Ct,variant:"filled",fullWidth:!0,"data-testid":"search-typefilter-next"},e.createElement(B.Z,{className:Nt.label,margin:"dense"},Vt),e.createElement(T.Z,{multiple:!0,variant:"outlined",value:Wt,onChange:qt,placeholder:"All Results",renderValue:J=>e.createElement("div",{className:Nt.chips},J.map(R=>e.createElement(zt.Z,{key:R,label:R,className:Nt.chip,size:"small"})))},vt.map(J=>e.createElement(G.Z,{key:J,value:J},e.createElement(S.Z,{checked:Wt.indexOf(J)>-1}),e.createElement(ht.Z,{primary:J})))))};Ft.Accordion=dt=>e.createElement(Ue,{...dt}),Ft.Tabs=dt=>e.createElement(Re,{...dt});var oe=t(19126),ot=t(20863),P=t(41682),v=t(36964);const N=dt=>{const Ct=useRouteRef(rootRouteRef),Yt=useNavigate(),Vt=useCallback(vt=>{const Nt=qs.stringify({query:vt},{addQueryPrefix:!0});Yt(`${Ct()}${Nt}`)},[Yt,Ct]);return React.createElement(SidebarSearchField,{icon:dt.icon,onSearch:Vt,to:"/search"})};var F=t(60905),j=t(86619),nt=t(50581),gt=t(61837),ct=t(4614),Dt=t(21853),Zt=t(88013),re=t(10289),ee=t(48760),Lt=t(71226);const Tt=({entityId:dt,debounceTime:Ct=150})=>{const[Yt,Vt]=(0,e.useState)(!1),vt=(0,re.s0)(),{term:Nt,setTerm:Wt,result:{loading:he,value:qt}}=(0,y.Rx)(),[J,R]=(0,e.useState)([]);(0,e.useEffect)(()=>{let mt=!0;if(mt&&qt){const Bt=qt.results.slice(0,10);R(Bt)}return()=>{mt=!1}},[he,qt]);const[O,Q]=(0,e.useState)(Nt);(0,ee.Z)(()=>Wt(O),Ct,[O]);const tt=mt=>{Yt||Vt(!0),Q(mt.target.value)},Et=(mt,Bt)=>{if(Bt==null?void 0:Bt.document){const{location:bt}=Bt.document;vt(bt)}};return e.createElement(F.Z,{item:!0,xs:12},e.createElement(Zt.ZP,{"data-testid":"techdocs-search-bar",size:"small",open:Yt,getOptionLabel:()=>"",filterOptions:mt=>mt,onClose:()=>{Vt(!1)},onFocus:()=>{Vt(!0)},onChange:Et,blurOnSelect:!0,noOptionsText:"No results found",value:null,options:J,renderOption:({document:mt})=>e.createElement(Lt.O,{result:mt,lineClamp:3,asListItem:!1,asLink:!1,title:mt.title}),loading:he,renderInput:mt=>e.createElement(j.Z,{...mt,"data-testid":"techdocs-search-bar-input",variant:"outlined",fullWidth:!0,placeholder:`Search ${dt.name} docs`,value:O,onChange:tt,InputProps:{...mt.InputProps,startAdornment:e.createElement(nt.Z,{position:"start"},e.createElement(gt.Z,{"aria-label":"Query",disabled:!0},e.createElement(Dt.Z,null))),endAdornment:e.createElement(e.Fragment,null,he?e.createElement(ct.Z,{color:"inherit",size:20}):null,mt.InputProps.endAdornment)}})}))},ce=dt=>{const Ct={term:"",types:["techdocs"],pageCursor:"",filters:dt.entityId};return e.createElement(y.Nd,{initialState:Ct},e.createElement(Tt,{...dt}))}},25921:function(X,o,t){"use strict";t.d(o,{N:function(){return b}});var r=t(2784),e=t(41682),l=t(79692),h=t(4614),c=t(77277),s=t(99688),u=t(12420),d=t(60905),y=t(90436),m=t(61837),E=t(4190),i=t(87685);const S=(0,l.Z)(I=>(0,u.Z)({paper:{width:"100%",[I.breakpoints.up("sm")]:{width:"75%"},[I.breakpoints.up("md")]:{width:"50%"},padding:I.spacing(2.5)},root:{height:"100%",overflow:"hidden"},logs:{background:I.palette.background.default}})),B=({buildLog:I,onClose:K})=>{const V=S(),st=I.length===0?"Waiting for logs...":I.join(`
|
|
141
|
-
`);return r.createElement(d.Z,{container:!0,direction:"column",className:V.root,spacing:0,wrap:"nowrap"},r.createElement(d.Z,{item:!0,container:!0,justifyContent:"space-between",alignItems:"center",spacing:0,wrap:"nowrap"},r.createElement(y.Z,{variant:"h5"},"Build Details"),r.createElement(m.Z,{key:"dismiss",title:"Close the drawer",onClick:K,color:"inherit"},r.createElement(i.Z,null))),r.createElement(e.LogViewer,{text:st,classes:{root:V.logs}}))},T=({buildLog:I})=>{const K=S(),[V,st]=(0,r.useState)(!1);return r.createElement(r.Fragment,null,r.createElement(c.Z,{color:"inherit",onClick:()=>st(!0)},"Show Build Logs"),r.createElement(E.ZP,{classes:{paper:K.paper},anchor:"right",open:V,onClose:()=>st(!1)},r.createElement(B,{buildLog:I,onClose:()=>st(!1)})))};var G=t(94252),H=t(75448);const D=(0,l.Z)(()=>({message:{wordBreak:"break-word",overflowWrap:"anywhere"}})),b=()=>{let I=null;const K=D(),{state:V,contentReload:st,contentErrorMessage:At,syncErrorMessage:zt,buildLog:ht}=(0,H.DK)(),jt=V==="CHECKING"?r.createElement(e.Progress,null):null;return V==="INITIAL_BUILD"&&(I=r.createElement(s.Z,{variant:"outlined",severity:"info",icon:r.createElement(h.Z,{size:"24px"}),action:r.createElement(T,{buildLog:ht})},"Documentation is accessed for the first time and is being prepared. The subsequent loads are much faster.")),V==="CONTENT_STALE_REFRESHING"&&(I=r.createElement(s.Z,{variant:"outlined",severity:"info",icon:r.createElement(h.Z,{size:"24px"}),action:r.createElement(T,{buildLog:ht})},"A newer version of this documentation is being prepared and will be available shortly.")),V==="CONTENT_STALE_READY"&&(I=r.createElement(s.Z,{variant:"outlined",severity:"success",action:r.createElement(c.Z,{color:"inherit",onClick:()=>st()},"Refresh")},"A newer version of this documentation is now available, please refresh to view.")),V==="CONTENT_STALE_ERROR"&&(I=r.createElement(s.Z,{variant:"outlined",severity:"error",action:r.createElement(T,{buildLog:ht}),classes:{message:K.message}},"Building a newer version of this documentation failed."," ",zt)),V==="CONTENT_NOT_FOUND"&&(I=r.createElement(r.Fragment,null,zt&&r.createElement(s.Z,{variant:"outlined",severity:"error",action:r.createElement(T,{buildLog:ht}),classes:{message:K.message}},"Building a newer version of this documentation failed."," ",zt),r.createElement(G.T,{errorMessage:At}))),r.createElement(r.Fragment,null,jt,I)}},73873:function(X,o,t){"use strict";t.d(o,{Ej:function(){return r.Ej},EV:function(){return e.TechDocsPage},nN:function(){return l.n}});var r=t(75448),e=t(31752),l=t(46025),h=t(25921),c=t(7735)},68725:function(X,o,t){"use strict";t.d(o,{_Z:function(){return e},Fw:function(){return l},pd:function(){return h}});var r=t(36964);const e=(0,r.createRouteRef)({id:"techdocs:index-page"}),l=(0,r.createRouteRef)({id:"techdocs:reader-page",params:["namespace","kind","name"]}),h=(0,r.createRouteRef)({id:"techdocs:catalog-reader-view"})},19133:function(X,o,t){"use strict";X.exports=t.p+"static/createComponent.975d1e1e..svg"},86284:function(X,o,t){"use strict";X.exports=t.p+"static/missingAnnotation.67f79e98..svg"},3871:function(X,o,t){"use strict";X.exports=t.p+"static/noBuild.1715fa71..svg"},96465:function(X,o,t){"use strict";X.exports=t.p+"static/noInformation.4b426325..svg"},29788:function(X,o,t){"use strict";X.exports=t.p+"static/mic-drop.fe3ef4d0..svg"},219:function(X,o,t){"use strict";X.exports=t.p+"static/illo.7884c54f..svg"},53260:function(){}},function(X){var o=function(r){return X(X.s=r)};X.O(0,[2370,6202,9284,2126,7012,5218,4983,4736],function(){return o(88649),o(63865)});var t=X.O()}]);
|
|
142
|
-
|
|
143
|
-
//# sourceMappingURL=main.8fe8af36.js.map
|