@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.
Files changed (31) hide show
  1. package/dist/techdocs-preview-bundle/.config-schema.json +20 -20
  2. package/dist/techdocs-preview-bundle/index.html +1 -1
  3. package/dist/techdocs-preview-bundle/static/{1553.faaba42c.chunk.js → 1553.8531b2f3.chunk.js} +1 -1
  4. package/dist/techdocs-preview-bundle/static/{1553.faaba42c.chunk.js.map → 1553.8531b2f3.chunk.js.map} +1 -1
  5. package/dist/techdocs-preview-bundle/static/{1959.4ef8f55d.chunk.js → 1959.615646f2.chunk.js} +1 -1
  6. package/dist/techdocs-preview-bundle/static/{1959.4ef8f55d.chunk.js.map → 1959.615646f2.chunk.js.map} +1 -1
  7. package/dist/techdocs-preview-bundle/static/{3825.f21b7877.chunk.js → 3825.3ef318a6.chunk.js} +1 -1
  8. package/dist/techdocs-preview-bundle/static/{3825.f21b7877.chunk.js.map → 3825.3ef318a6.chunk.js.map} +1 -1
  9. package/dist/techdocs-preview-bundle/static/{390.69ed17c8.chunk.js → 390.4d92e8b4.chunk.js} +1 -1
  10. package/dist/techdocs-preview-bundle/static/{390.69ed17c8.chunk.js.map → 390.4d92e8b4.chunk.js.map} +1 -1
  11. package/dist/techdocs-preview-bundle/static/{4022.87d787cb.chunk.js → 4022.d2e6166c.chunk.js} +1 -1
  12. package/dist/techdocs-preview-bundle/static/{4022.87d787cb.chunk.js.map → 4022.d2e6166c.chunk.js.map} +1 -1
  13. package/dist/techdocs-preview-bundle/static/{4960.a3a524a8.chunk.js → 4960.73981fd4.chunk.js} +1 -1
  14. package/dist/techdocs-preview-bundle/static/{4960.a3a524a8.chunk.js.map → 4960.73981fd4.chunk.js.map} +1 -1
  15. package/dist/techdocs-preview-bundle/static/{6235.47f4b5f0.chunk.js → 6235.09f519e0.chunk.js} +1 -1
  16. package/dist/techdocs-preview-bundle/static/{6235.47f4b5f0.chunk.js.map → 6235.09f519e0.chunk.js.map} +1 -1
  17. package/dist/techdocs-preview-bundle/static/{8061.ea281ba6.chunk.js → 8061.8431f41e.chunk.js} +1 -1
  18. package/dist/techdocs-preview-bundle/static/{8061.ea281ba6.chunk.js.map → 8061.8431f41e.chunk.js.map} +1 -1
  19. package/dist/techdocs-preview-bundle/static/{8792.08576b88.chunk.js → 8792.8bd4e401.chunk.js} +1 -1
  20. package/dist/techdocs-preview-bundle/static/{8792.08576b88.chunk.js.map → 8792.8bd4e401.chunk.js.map} +1 -1
  21. package/dist/techdocs-preview-bundle/static/{9028.9a6b5c5d.chunk.js → 9028.4d923ca4.chunk.js} +1 -1
  22. package/dist/techdocs-preview-bundle/static/{9028.9a6b5c5d.chunk.js.map → 9028.4d923ca4.chunk.js.map} +1 -1
  23. package/dist/techdocs-preview-bundle/static/main.c8633ec5.js +143 -0
  24. package/dist/techdocs-preview-bundle/static/main.c8633ec5.js.map +1 -0
  25. package/dist/techdocs-preview-bundle/static/{runtime.8fe8af36.js → runtime.c8633ec5.js} +3 -3
  26. package/dist/techdocs-preview-bundle/static/{runtime.8fe8af36.js.map → runtime.c8633ec5.js.map} +1 -1
  27. package/dist/techdocs-preview-bundle/static/{vendor.8fe8af36.js → vendor.c8633ec5.js} +1 -1
  28. package/dist/techdocs-preview-bundle/static/{vendor.8fe8af36.js.map → vendor.c8633ec5.js.map} +1 -1
  29. package/package.json +7 -7
  30. package/dist/techdocs-preview-bundle/static/main.8fe8af36.js +0 -143
  31. package/dist/techdocs-preview-bundle/static/main.8fe8af36.js.map +0 -1
@@ -0,0 +1,143 @@
1
+ var vi=Object.defineProperty;var Ri=(Q,o,e)=>o in Q?vi(Q,o,{enumerable:!0,configurable:!0,writable:!0,value:e}):Q[o]=e;var q=(Q,o,e)=>(Ri(Q,typeof o!="symbol"?o+"":o,e),e),io=(Q,o,e)=>{if(!o.has(Q))throw TypeError("Cannot "+e)};var tt=(Q,o,e)=>(io(Q,o,"read from private field"),e?e.call(Q):o.get(Q)),En=(Q,o,e)=>{if(o.has(Q))throw TypeError("Cannot add the same private member more than once");o instanceof WeakSet?o.add(Q):o.set(Q,e)},Tn=(Q,o,e,r)=>(io(Q,o,"write to private field"),r?r.call(Q,e):o.set(Q,e),e);(self.webpackChunkembedded_techdocs_app=self.webpackChunkembedded_techdocs_app||[]).push([[179],{30001:function(Q,o,e){"use strict";e.d(o,{n3:function(){return g},MS:function(){return s}});var r=e(52890),t=e(10179),l=e(96279),u=e.n(l);const g=Symbol("CATALOG_FILTER_EXISTS");class s{constructor(d){q(this,"discoveryApi");q(this,"fetchApi");this.discoveryApi=d.discoveryApi,this.fetchApi=d.fetchApi||{fetch:u()}}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:{},P=[m].flat(),j=[];for(const D of P){const X=[];for(const[V,ce]of Object.entries(D))for(const Se of[ce].flat())Se===g?X.push(encodeURIComponent(V)):typeof Se=="string"&&X.push(`${encodeURIComponent(V)}=${encodeURIComponent(Se)}`);X.length&&j.push(`filter=${X.join(",")}`)}E.length&&j.push(`fields=${E.map(encodeURIComponent).join(",")}`),i!==void 0&&j.push(`offset=${i}`),S!==void 0&&j.push(`limit=${S}`),b!==void 0&&j.push(`after=${encodeURIComponent(b)}`);const F=j.length?`?${j.join("&")}`:"",B=await this.requestRequired("GET",`/entities${F}`,y),N=(D,X)=>{var Se,we;if(((Se=D.metadata)==null?void 0:Se.name)===void 0||D.kind===void 0||((we=X.metadata)==null?void 0:we.name)===void 0||X.kind===void 0)return 0;const V=(0,r.eE)(D),ce=(0,r.eE)(X);return V<ce?-1:V>ce?1:0};return{items:B.sort(N)}}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:P,exists:j}=await S.json();if(!b)throw new Error(`Location wasn't added: ${y}`);return{location:b,entities:P,exists:j}}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 t.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 t.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 t.VL.fromResponse(S)}return await S.json()}}},52890:function(Q,o,e){"use strict";e.d(o,{J1:function(){return u},sk:function(){return r},Jl:function(){return I},lb:function(){return K},w$:function(){return nt},nP:function(){return We},aS:function(){return ze},hr:function(){return He},S4:function(){return U},cz:function(){return Ce},M_:function(){return ge},wX:function(){return ee},wh:function(){return l},C_:function(){return Je},of:function(){return _e},Me:function(){return Ae},TH:function(){return mt},eE:function(){return dt},Bt:function(){return me}});const r="default",t=null,l="backstage.io/view-url",u="backstage.io/edit-url";var g=e(76635),s=e.n(g);class c{constructor(w=ENTITY_DEFAULT_NAMESPACE){q(this,"namespace");this.namespace=w}async enforce(w){return w.metadata.namespace?w:lodash.merge({metadata:{namespace:this.namespace}},w)}}class d{static isValidPrefixAndOrSuffix(w,_,ye,Ve){if(typeof w!="string")return!1;const et=w.split(_);return et.length===1?Ve(et[0]):et.length===2?ye(et[0])&&Ve(et[1]):!1}static isJsonSafe(w){try{return s().isEqual(w,JSON.parse(JSON.stringify(w)))}catch{return!1}}static isValidDnsSubdomain(w){return typeof w=="string"&&w.length>=1&&w.length<=253&&w.split(".").every(d.isValidDnsLabel)}static isValidDnsLabel(w){return typeof w=="string"&&w.length>=1&&w.length<=63&&/^[a-z0-9]+(\-[a-z0-9]+)*$/.test(w)}static isValidTag(w){return typeof w=="string"&&w.length>=1&&w.length<=63&&/^[a-z0-9+#]+(\-[a-z0-9+#]+)*$/.test(w)}static isValidUrl(w){if(typeof w!="string")return!1;try{return new URL(w),!0}catch{return!1}}static isValidString(w){var _;return typeof w=="string"&&((_=w==null?void 0:w.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=e(48231),E=JSON.parse(`{"$schema":"http://json-schema.org/draft-07/schema","$id":"Entity","description":"The parts of the format that's common to all versions/kinds of entity.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Component","metadata":{"name":"LoremService","description":"Creates Lorems like a pro.","labels":{"product_name":"Random value Generator"},"annotations":{"docs":"https://github.com/..../tree/develop/doc"}},"spec":{"type":"service","lifecycle":"production","owner":"tools"}}],"type":"object","required":["apiVersion","kind","metadata"],"additionalProperties":false,"properties":{"apiVersion":{"type":"string","description":"The version of specification format for this particular entity that this is written against.","minLength":1,"examples":["backstage.io/v1alpha1","my-company.net/v1","1.0"]},"kind":{"type":"string","description":"The high level entity type being described.","minLength":1,"examples":["API","Component","Domain","Group","Location","Resource","System","Template","User"]},"metadata":{"$ref":"EntityMeta"},"spec":{"type":"object","description":"The specification data describing the entity itself."},"relations":{"type":"array","description":"The relations that this entity has with other entities.","items":{"$ref":"common#relation"}},"status":{"$ref":"common#status"}}}`),i=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"EntityMeta","description":"Metadata fields common to all versions/kinds of entity.","examples":[{"uid":"e01199ab-08cc-44c2-8e19-5c29ded82521","etag":"lsndfkjsndfkjnsdfkjnsd==","generation":13,"name":"my-component-yay","namespace":"the-namespace","labels":{"backstage.io/custom":"ValueStuff"},"annotations":{"example.com/bindings":"are-secret"},"tags":["java","data"]}],"type":"object","required":["name"],"additionalProperties":true,"properties":{"uid":{"type":"string","description":"A globally unique ID for the entity. This field can not be set by the user at creation time, and the server will reject an attempt to do so. The field will be populated in read operations. The field can (optionally) be specified when performing update or delete operations, but the server is free to reject requests that do so in such a way that it breaks semantics.","examples":["e01199ab-08cc-44c2-8e19-5c29ded82521"],"minLength":1},"etag":{"type":"string","description":"An opaque string that changes for each update operation to any part of the entity, including metadata. This field can not be set by the user at creation time, and the server will reject an attempt to do so. The field will be populated in read operations. The field can (optionally) be specified when performing update or delete operations, and the server will then reject the operation if it does not match the current stored value.","examples":["lsndfkjsndfkjnsdfkjnsd=="],"minLength":1},"generation":{"type":"integer","description":"A positive nonzero number that indicates the current generation of data for this entity; the value is incremented each time the spec changes. This field can not be set by the user at creation time, and the server will reject an attempt to do so. The field will be populated in read operations.","examples":[1],"minimum":1},"name":{"type":"string","description":"The name of the entity. Must be unique within the catalog at any given point in time, for any given namespace + kind pair.","examples":["metadata-proxy"],"minLength":1},"namespace":{"type":"string","description":"The namespace that the entity belongs to.","default":"default","examples":["default","admin"],"minLength":1},"title":{"type":"string","description":"A display name of the entity, to be presented in user interfaces instead of the name property, when available.","examples":["React SSR Template"],"minLength":1},"description":{"type":"string","description":"A short (typically relatively few words, on one line) description of the entity."},"labels":{"type":"object","description":"Key/value pairs of identifying information attached to the entity.","additionalProperties":true,"patternProperties":{"^.+$":{"type":"string"}}},"annotations":{"type":"object","description":"Key/value pairs of non-identifying auxiliary information attached to the entity.","additionalProperties":true,"patternProperties":{"^.+$":{"type":"string"}}},"tags":{"type":"array","description":"A list of single-valued strings, to for example classify catalog entities in various ways.","items":{"type":"string","minLength":1}},"links":{"type":"array","description":"A list of external hyperlinks related to the entity. Links can provide additional contextual information that may be located outside of Backstage itself. For example, an admin dashboard or external CMS page.","items":{"type":"object","required":["url"],"properties":{"url":{"type":"string","description":"A url in a standard uri format.","examples":["https://admin.example-org.com"],"minLength":1},"title":{"type":"string","description":"A user friendly display name for the link.","examples":["Admin Dashboard"],"minLength":1},"icon":{"type":"string","description":"A key representing a visual icon to be displayed in the UI.","examples":["dashboard"],"minLength":1}}}}}}'),S=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"common","type":"object","description":"Common definitions to import from other schemas","definitions":{"reference":{"$id":"#reference","type":"object","description":"A reference by name to another entity.","required":["kind","namespace","name"],"additionalProperties":false,"properties":{"kind":{"type":"string","description":"The kind field of the entity.","minLength":1},"namespace":{"type":"string","description":"The metadata.namespace field of the entity.","minLength":1},"name":{"type":"string","description":"The metadata.name field of the entity.","minLength":1}}},"relation":{"$id":"#relation","type":"object","description":"A directed relation from one entity to another.","required":["type","target"],"additionalProperties":false,"properties":{"type":{"type":"string","minLength":1,"pattern":"^\\\\w+$","description":"The type of relation."},"target":{"$ref":"#reference"}}},"status":{"$id":"#status","type":"object","description":"The current status of the entity, as claimed by various sources.","required":[],"additionalProperties":true,"properties":{"items":{"type":"array","items":{"$ref":"#statusItem"}}}},"statusItem":{"$id":"#statusItem","type":"object","description":"A specific status item on a well known format.","required":["type","level","message"],"additionalProperties":true,"properties":{"type":{"type":"string","minLength":1},"level":{"$ref":"#statusLevel","description":"The status level / severity of the status item."},"message":{"type":"string","description":"A brief message describing the status, intended for human consumption."},"error":{"$ref":"#error","description":"An optional serialized error object related to the status."}}},"statusLevel":{"$id":"#statusLevel","type":"string","description":"A status level / severity.","enum":["info","warning","error"]},"error":{"$id":"#error","type":"object","description":"A serialized error object.","required":["name","message"],"additionalProperties":true,"properties":{"name":{"type":"string","examples":["Error","InputError"],"description":"The type name of the error","minLength":1},"message":{"type":"string","description":"The message of the error"},"code":{"type":"string","description":"An error code associated with the error"},"stack":{"type":"string","description":"An error stack trace"}}}}}');const b=new Map,P=[y,E,i,S];function j(ie){if(!(ie==null?void 0:ie.length))throw new TypeError("Unknown error");const w=ie[0];throw new TypeError(`${w.dataPath||"<root>"} ${w.message}${w.params?` - ${Object.entries(w.params).map(([_,ye])=>`${_}: ${ye}`).join(", ")}`:""}`)}function F(ie,w={}){var bt;const _=(bt=w==null?void 0:w.disableCache)!=null?bt:!1,ye=_?"":JSON.stringify(ie);if(!_){const an=b.get(ye);if(an)return an}const Ve=B(ie),et=new m.ZP({allowUnionTypes:!0,allErrors:!0,validateSchema:!0});Ve.length&&et.addSchema(Ve,void 0,void 0,!0);const pt=et.compile(ie);return _||b.set(ye,pt),pt}function B(ie){if(typeof ie!="object")return[];const w=new Set;ie.$id&&w.add(ie.$id);const _=new Array,ye=[ie];for(;ye.length;){const Ve=ye.pop();for(const et of N(Ve))if(!w.has(et)){w.add(et);const pt=P.find(bt=>bt.$id===et);pt&&(_.push(pt),ye.push(pt))}}return _}function*N(ie){const w=[ie];for(;w.length;){const _=w.pop();if(typeof _=="object"&&_)for(const[ye,Ve]of Object.entries(_))ye==="$ref"&&typeof Ve=="string"?yield Ve.split("#")[0]:w.push(Ve)}}function D(ie){const w=compileAjvSchema(ie||entityEnvelopeSchema);return _=>{if(w(_)===!0)return _;throw throwAjvError(w.errors)}}function X(ie){const w=F(ie);return _=>{var et;if(w(_)===!0)return _;const Ve=(et=w.errors)==null?void 0:et.filter(pt=>["/kind","/apiVersion"].includes(pt.dataPath));if((Ve==null?void 0:Ve.length)&&Ve.every(pt=>pt.keyword==="enum"))return!1;throw j(w.errors)}}function V(ie){const w=compileAjvSchema(ie||entitySchema);return _=>{if(w(_)===!0)return _;throw throwAjvError(w.errors)}}class ce{static isValidApiVersion(w){return d.isValidPrefixAndOrSuffix(w,"/",d.isValidDnsSubdomain,_=>_.length>=1&&_.length<=63&&/^[a-z0-9A-Z]+$/.test(_))}static isValidKind(w){return typeof w=="string"&&w.length>=1&&w.length<=63&&/^[a-zA-Z][a-z0-9A-Z]*$/.test(w)}static isValidObjectName(w){return typeof w=="string"&&w.length>=1&&w.length<=63&&/^([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$/.test(w)}static isValidNamespace(w){return d.isValidDnsLabel(w)}static isValidLabelKey(w){return d.isValidPrefixAndOrSuffix(w,"/",d.isValidDnsSubdomain,ce.isValidObjectName)}static isValidLabelValue(w){return w===""||ce.isValidObjectName(w)}static isValidAnnotationKey(w){return d.isValidPrefixAndOrSuffix(w,"/",d.isValidDnsSubdomain,ce.isValidObjectName)}static isValidAnnotationValue(w){return typeof w=="string"}}const Se={isValidApiVersion:ce.isValidApiVersion,isValidKind:ce.isValidKind,isValidEntityName:ce.isValidObjectName,isValidNamespace:ce.isValidNamespace,isValidLabelKey:ce.isValidLabelKey,isValidLabelValue:ce.isValidLabelValue,isValidAnnotationKey:ce.isValidAnnotationKey,isValidAnnotationValue:ce.isValidAnnotationValue,isValidTag:d.isValidTag};function we(ie={}){return{...Se,...ie}}class he{constructor(w=makeValidator()){q(this,"validators");this.validators=w}async enforce(w){var pt,bt,an,hn,Qn,Pn,In;function _(gt,wt,sn){if(wt==null)throw new Error(`${gt} must have a value`);let On;try{On=sn(wt)}catch(Vt){throw new Error(`${gt} could not be validated, ${Vt}`)}if(!On){let Vt;switch(sn.name){case"isValidLabelValue":case"isValidObjectName":Vt="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":Vt="a valid prefix and/or suffix";break;case"isValidNamespace":case"isValidDnsLabel":Vt="a string that is sequences of [a-z0-9] separated by [-], at most 63 characters in total";break;case"isValidTag":Vt="a string that is sequences of [a-z0-9+#] separated by [-], at most 63 characters in total";break;case"isValidAnnotationValue":Vt="a string";break;case"isValidKind":Vt="a string that is a sequence of [a-zA-Z][a-z0-9A-Z], at most 63 characters in total";break;case"isValidUrl":Vt="a string that is a valid url";break;case"isValidString":Vt="a non empty string";break;default:Vt=void 0;break}const Un=Vt?` expected ${Vt} but found "${wt}".`:"";throw new Error(`"${gt}" 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 ye(gt,wt,sn){return wt===void 0||_(gt,wt,sn)}_("apiVersion",w.apiVersion,this.validators.isValidApiVersion),_("kind",w.kind,this.validators.isValidKind),_("metadata.name",w.metadata.name,this.validators.isValidEntityName),ye("metadata.namespace",w.metadata.namespace,this.validators.isValidNamespace);for(const[gt,wt]of Object.entries((pt=w.metadata.labels)!=null?pt:[]))_(`labels.${gt}`,gt,this.validators.isValidLabelKey),_(`labels.${gt}`,wt,this.validators.isValidLabelValue);for(const[gt,wt]of Object.entries((bt=w.metadata.annotations)!=null?bt:[]))_(`annotations.${gt}`,gt,this.validators.isValidAnnotationKey),_(`annotations.${gt}`,wt,this.validators.isValidAnnotationValue);const Ve=(an=w.metadata.tags)!=null?an:[];for(let gt=0;gt<Ve.length;++gt)_(`tags.${gt}`,Ve[gt],this.validators.isValidTag);const et=(hn=w.metadata.links)!=null?hn:[];for(let gt=0;gt<et.length;++gt)_(`links.${gt}.url`,(Qn=et[gt])==null?void 0:Qn.url,CommonValidatorFunctions.isValidUrl),ye(`links.${gt}.title`,(Pn=et[gt])==null?void 0:Pn.title,CommonValidatorFunctions.isValidString),ye(`links.${gt}.icon`,(In=et[gt])==null?void 0:In.icon,KubernetesValidatorFunctions.isValidObjectName);return w}}class Ge{constructor(){q(this,"validate")}async enforce(w){if(!this.validate){const Ve=new Ajv({allowUnionTypes:!0});this.validate=Ve.addSchema([commonSchema,entityMetaSchema],void 0,void 0,!0).compile(entitySchema)}if(this.validate(w)===!0)return w;const[ye]=this.validate.errors||[];throw ye?new Error(`Malformed envelope, ${ye.dataPath||"<root>"} ${ye.message}`):new Error("Malformed envelope, Unknown error")}}function Le(ie){var _,ye;const w=/^([^:/]+:)?([^:/]+\/)?([^:/]+)$/.exec(ie.trim());if(!w)throw new TypeError(`Entity reference "${ie}" was not on the form [<kind>:][<namespace>/]<name>`);return{kind:(_=w[1])==null?void 0:_.slice(0,-1),namespace:(ye=w[2])==null?void 0:ye.slice(0,-1),name:w[3]}}function Je(ie){return{kind:ie.kind,namespace:ie.metadata.namespace||r,name:ie.metadata.name}}function ot(ie,w={}){const{kind:_,namespace:ye,name:Ve}=_e(ie,{defaultNamespace:ENTITY_DEFAULT_NAMESPACE,...w});if(!_)throw new Error(`Entity reference ${ye}/${Ve} did not contain a kind`);return{kind:_,namespace:ye,name:Ve}}function _e(ie,w={}){var et,pt;if(!ie)throw new Error("Entity reference must not be empty");if(typeof ie=="string"){const bt=Le(ie);return{kind:(et=bt.kind)!=null?et:w.defaultKind,namespace:(pt=bt.namespace)!=null?pt:w.defaultNamespace,name:bt.name}}const{kind:_,namespace:ye,name:Ve}=ie;if(_==="")throw new Error("Entity reference kinds must not be empty");if(ye==="")throw new Error("Entity reference namespaces must not be empty");if(!Ve)throw new Error("Entity references must contain a name");return{kind:_!=null?_:w.defaultKind,namespace:ye!=null?ye:w.defaultNamespace,name:Ve}}function mt(ie){let w,_,ye;return"metadata"in ie?(w=ie.kind,_=ie.metadata.namespace,ye=ie.metadata.name):(w=ie.kind,_=ie.namespace,ye=ie.name),(w==null?void 0:w.includes(":"))||(w==null?void 0:w.includes("/"))||(_==null?void 0:_.includes(":"))||(_==null?void 0:_.includes("/"))||ye.includes(":")||ye.includes("/")?{kind:w,namespace:_,name:ye}:`${w?`${w}:`:""}${_?`${_}/`:""}${ye}`}function dt(ie){var Ve,et;let w,_,ye;return"metadata"in ie?(w=ie.kind,_=(Ve=ie.metadata.namespace)!=null?Ve:r,ye=ie.metadata.name):(w=ie.kind,_=(et=ie.namespace)!=null?et:r,ye=ie.name),`${w.toLocaleLowerCase("en-US")}:${_.toLocaleLowerCase("en-US")}/${ye.toLocaleLowerCase("en-US")}`}function ct(ie,w,_){const ye=ie.kind,Ve=ie.metadata.namespace||ENTITY_DEFAULT_NAMESPACE,et=ie.metadata.name;let pt,bt,an;if(typeof w=="string"){const hn=Le(w);pt=hn.kind||(_==null?void 0:_.defaultKind),bt=hn.namespace||(_==null?void 0:_.defaultNamespace)||ENTITY_DEFAULT_NAMESPACE,an=hn.name}else pt=w.kind||(_==null?void 0:_.defaultKind),bt=w.namespace||(_==null?void 0:_.defaultNamespace)||ENTITY_DEFAULT_NAMESPACE,an=w.name;if(!pt||!bt)throw new Error("Entity reference or context did not contain kind and namespace");return ye.toLocaleLowerCase("en-US")===pt.toLocaleLowerCase("en-US")&&Ve.toLocaleLowerCase("en-US")===bt.toLocaleLowerCase("en-US")&&et.toLocaleLowerCase("en-US")===an.toLocaleLowerCase("en-US")}var Et=e(48834).Buffer;function vt(){return uuidv4()}function It(){return Et.from(uuidv4(),"utf8").toString("base64").replace(/[^\w]/g,"")}function At(ie,w){const _=lodash.cloneDeep(ie),ye=lodash.cloneDeep(w);return _.metadata.labels||(_.metadata.labels={}),ye.metadata.labels||(ye.metadata.labels={}),_.metadata.annotations||(_.metadata.annotations={}),ye.metadata.annotations||(ye.metadata.annotations={}),_.metadata.tags||(_.metadata.tags=[]),ye.metadata.tags||(ye.metadata.tags=[]),delete _.metadata.uid,delete _.metadata.etag,delete _.metadata.generation,delete ye.metadata.uid,delete ye.metadata.etag,delete ye.metadata.generation,delete _.relations,delete _.status,delete ye.relations,delete ye.status,!lodash.isEqual(_,ye)}function ht(ie,w){const{uid:_,etag:ye,generation:Ve}=ie.metadata;if(!_||!ye||!Ve)throw new Error("Previous entity must have uid, etag and generation");const et=lodash.cloneDeep(w),pt=At(ie,et),bt=!lodash.isEqual(ie.spec,et.spec);return et.metadata.uid=_,et.metadata.etag=pt?It():ye,et.metadata.generation=bt?Ve+1:Ve,et}class Ut{constructor(w){this.policies=w}async enforce(w){let _=w;for(const ye of this.policies){const Ve=await ye.enforce(_);if(!Ve)throw new Error(`Policy ${ye.constructor.name} did not return a result`);_=Ve}return _}}class Nt{constructor(w){this.policies=w}async enforce(w){for(const _ of this.policies){const ye=await _.enforce(w);if(ye)return ye}throw new Error("The entity did not match any known policy")}}const Dt={allOf(ie){return new Ut(ie)},oneOf(ie){return new Nt(ie)}};var Lt=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 st(ie){const w=X(ie);return{async check(_){return w(_)===_}}}const Rt=st(Lt);var Zt=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"ComponentV1alpha1","description":"A Component describes a software component. It is typically intimately linked to the source code that constitutes the component, and should be what a developer may regard a \\"unit of software\\", usually with a distinct deployable or linkable artifact.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Component","metadata":{"name":"LoremService","description":"Creates Lorems like a pro.","labels":{"product_name":"Random value Generator"},"annotations":{"docs":"https://github.com/..../tree/develop/doc"}},"spec":{"type":"service","lifecycle":"production","owner":"tools"}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1alpha1","backstage.io/v1beta1"]},"kind":{"enum":["Component"]},"spec":{"type":"object","required":["type","lifecycle","owner"],"properties":{"type":{"type":"string","description":"The type of component.","examples":["service","website","library"],"minLength":1},"lifecycle":{"type":"string","description":"The lifecycle state of the component.","examples":["experimental","production","deprecated"],"minLength":1},"owner":{"type":"string","description":"An entity reference to the owner of the component.","examples":["artist-relations-team","user:john.johnson"],"minLength":1},"system":{"type":"string","description":"An entity reference to the system that the component belongs to.","minLength":1},"subcomponentOf":{"type":"string","description":"An entity reference to another component of which the component is a part.","minLength":1},"providesApis":{"type":"array","description":"An array of entity references to the APIs that are provided by the component.","items":{"type":"string","minLength":1}},"consumesApis":{"type":"array","description":"An array of entity references to the APIs that are consumed by the component.","items":{"type":"string","minLength":1}},"dependsOn":{"type":"array","description":"An array of references to other entities that the component depends on to function.","items":{"type":"string","minLength":1}}}}}}]}');const De=st(Zt);var it=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"DomainV1alpha1","description":"A Domain groups a collection of systems that share terminology, domain models, business purpose, or documentation, i.e. form a bounded context.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Domain","metadata":{"name":"artists","description":"Everything about artists"},"spec":{"owner":"artist-relations-team"}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1alpha1","backstage.io/v1beta1"]},"kind":{"enum":["Domain"]},"spec":{"type":"object","required":["owner"],"properties":{"owner":{"type":"string","description":"An entity reference to the owner of the component.","examples":["artist-relations-team","user:john.johnson"],"minLength":1}}}}}]}');const lt=st(it);var se=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 T=st(se);var R=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 O=st(R),U="ownedBy",G="ownerOf",ne="consumesApi",ue="apiConsumedBy",ge="providesApi",Oe="apiProvidedBy",We="dependsOn",nt="dependencyOf",Ie="parentOf",pe="childOf",He="memberOf",de="hasMember",Ce="partOf",ze="hasPart";var je=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 Fe=st(je);var at=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"SystemV1alpha1","description":"A system is a collection of resources and components. The system may expose or consume one or several APIs. It is viewed as abstraction level that provides potential consumers insights into exposed features without needing a too detailed view into the details of all components. This also gives the owning team the possibility to decide about published artifacts and APIs.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"System","metadata":{"name":"artist-engagement-portal","description":"Handy tools to keep artists in the loop"},"spec":{"owner":"artist-relations-team","domain":"artists"}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1alpha1","backstage.io/v1beta1"]},"kind":{"enum":["System"]},"spec":{"type":"object","required":["owner"],"properties":{"owner":{"type":"string","description":"An entity reference to the owner of the component.","examples":["artist-relations-team","user:john.johnson"],"minLength":1},"domain":{"type":"string","description":"An entity reference to the domain that the system belongs to.","examples":["artists"],"minLength":1}}}}}]}');const Be=st(at);var Xe=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 ke=st(Xe);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 v=st(J),I="backstage.io/managed-by-location",K="backstage.io/managed-by-origin-location",ee="backstage.io/source-location";function Ae(ie){if(typeof ie!="string")throw new TypeError(`Unable to parse location reference '${ie}', unexpected argument ${typeof ie}`);const w=ie.indexOf(":");if(w<0)throw new TypeError(`Unable to parse location reference '${ie}', expected '<type>:<target>', e.g. 'url:https://host/path'`);const _=ie.substr(0,w).trim(),ye=ie.substr(w+1).trim();if(!_||!ye)throw new TypeError(`Unable to parse location reference '${ie}', expected '<type>:<target>', e.g. 'url:https://host/path'`);if(_==="http"||_==="https")throw new TypeError(`Invalid location reference '${ie}', please prefix it with 'url:', e.g. 'url:${ie}'`);return{type:_,target:ye}}function me(ie){const{type:w,target:_}=ie;if(w){if(!_)throw new TypeError("Unable to stringify location reference, empty target")}else throw new TypeError("Unable to stringify location reference, empty type");return`${w}:${_}`}function be(ie){var _,ye,Ve,et,pt;const w=(pt=(ye=(_=ie.metadata)==null?void 0:_.annotations)==null?void 0:ye[SOURCE_LOCATION_ANNOTATION])!=null?pt:(et=(Ve=ie.metadata)==null?void 0:Ve.annotations)==null?void 0:et[LOCATION_ANNOTATION];if(!w)throw new Error(`Entity '${stringifyEntityRef(ie)}' is missing location`);return Ae(w)}var Me=e(9699);const yt=Me.Ry({type:Me.Z_().required(),target:Me.Z_().required(),presence:Me.nK().oneOf(["required","optional"])}).noUnknown().required(),Xt=Me.Ry({id:Me.Z_().required(),type:Me.Z_().required(),target:Me.Z_().required(),presence:Me.nK().oneOf(["required","optional"])}).noUnknown().required(),on=Me.Ry({location:yt}).noUnknown().required()},23235:function(Q,o,e){"use strict";e.d(o,{C:function(){return t}});var r=e(98005);class t{constructor(){q(this,"subject",new r.J)}post(u){this.subject.next(u)}alert$(){return this.subject}}},47150:function(Q,o,e){"use strict";e.d(o,{g:function(){return r}});class r{captureEvent(l){}}},58652:function(Q,o,e){"use strict";e.d(o,{C:function(){return l}});var r=e(98005);const t="theme";class l{constructor(g){q(this,"activeThemeId");q(this,"subject",new r.X(void 0));this.themes=g}static createWithStorage(g){var d;const s=new l(g);if(!window.localStorage)return s;const c=(d=window.localStorage.getItem(t))!=null?d:void 0;return s.setActiveThemeId(c),s.activeThemeId$().subscribe(y=>{y?window.localStorage.setItem(t,y):window.localStorage.removeItem(t)}),window.addEventListener("storage",y=>{var m;if(y.key===t){const E=(m=localStorage.getItem(t))!=null?m:void 0;s.setActiveThemeId(E)}}),s}getInstalledThemes(){return this.themes.slice()}activeThemeId$(){return this.subject}getActiveThemeId(){return this.activeThemeId}setActiveThemeId(g){this.activeThemeId=g,this.subject.next(g)}}},14721:function(Q,o,e){"use strict";e.d(o,{m:function(){return y}});var r=e(9850),t=e.n(r),l=e(12782),u=e.n(l);const g=/^[a-z][a-z0-9]*(?:[-_][a-z][a-z0-9]*)*$/i;function s(m){return typeof m=="object"&&m!==null&&!Array.isArray(m)}function c(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:P})=>{const j=new y(S,b,i);return j.filteredKeys=P,j},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=t()(this.readValue(E)),S=(b=this.fallback)==null?void 0:b.getOptional(E);return i===void 0?S:S===void 0?i:u()({},{value:S},{value:i},(P,j)=>!s(j)||!s(P)?j: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,c(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,P]of S.entries())if(!s(P))return{expected:"object-array",value:P,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 P;const S=this.readValue(E);if(S===void 0)return(P=this.fallback)==null?void 0:P.readConfigValue(E,i);const b=i(S);if(b!==!0){const{key:j=E,value:F=S,expected:B}=b;throw new TypeError(d.type(this.fullKey(j),this.context,c(F),B))}return S}readValue(E){const i=E?E.split("."):[];for(const b of i)if(!g.test(b))throw new TypeError(`Invalid config key '${E}'`);if(this.data===void 0)return;let S=this.data;for(const[b,P]of i.entries())if(s(S))S=S[P];else if(S!==void 0){const j=this.fullKey(i.slice(0,b).join("."));throw new TypeError(d.type(j,this.context,c(S),"object"))}return S}}},4333:function(Q,o,e){"use strict";e.d(o,{p:function(){return t}});const r="Invalid discovery URL pattern,";class t{static compile(u){const g=u.split(/\{\{\s*pluginId\s*\}\}/),s=g.join("pluginId");let c;try{c=new URL(s)}catch{throw new Error(`${r} URL '${s}' is invalid`)}if(c.hash)throw new Error(`${r} URL must not have a hash`);if(c.search)throw new Error(`${r} URL must not have a query`);if(s.endsWith("/"))throw new Error(`${r} URL must not end with a slash`);return new t(g)}constructor(u){this.parts=u}async getBaseUrl(u){return this.parts.join(u)}}},89536:function(Q,o,e){"use strict";e.d(o,{KN:function(){return r},gr:function(){return l},Jv:function(){return u}});class r{constructor(s,c){this.alertApi=s,this.errorApi=c}post(s,c){return(c==null?void 0:c.hidden)||this.alertApi.post({message:s.message,severity:"error"}),this.errorApi.post(s,c)}error$(){return this.errorApi.error$()}}var t=e(98005);class l{constructor(){q(this,"subject",new t.J)}post(s,c){this.subject.next({error:s,context:c})}error$(){return this.subject}}class u{static forward(s,c){window.addEventListener("unhandledrejection",d=>{s.post(d.reason,c)})}}},14884:function(Q,o,e){"use strict";e.d(o,{b:function(){return l}});var r=e(36964);function t(u){if(u.length<3)throw new Error(`The '${u}' feature flag must have a minimum length of three characters.`);if(u.length>150)throw new Error(`The '${u}' feature flag must not exceed 150 characters.`);if(!u.match(/^[a-z]+[a-z0-9-]+$/))throw new Error(`The '${u}' feature flag must start with a lowercase letter and only contain lowercase letters, numbers and hyphens. Examples: feature-flag-one, alpha, release-2020`)}class l{constructor(){q(this,"registeredFeatureFlags",[]);q(this,"flags")}registerFlag(g){t(g.name),this.registeredFeatureFlags.push(g)}getRegisteredFlags(){return this.registeredFeatureFlags.slice()}isActive(g){return this.flags||(this.flags=this.load()),this.flags.get(g)===r.FeatureFlagState.Active}save(g){this.flags||(this.flags=this.load()),g.merge||this.flags.clear();for(const[c,d]of Object.entries(g.states))this.flags.set(c,d);const s=Array.from(this.flags.entries()).filter(([,c])=>c===r.FeatureFlagState.Active);window.localStorage.setItem("featureFlags",JSON.stringify(Object.fromEntries(s)))}load(){try{const g=window.localStorage.getItem("featureFlags");if(!g)return new Map;const s=JSON.parse(g);if(typeof s!="object"||s===null||Array.isArray(s))return new Map;const c=Object.entries(s).filter(([d,y])=>(t(d),y===r.FeatureFlagState.Active));return new Map(c)}catch{return new Map}}}},50160:function(Q,o,e){"use strict";e.d(o,{I:function(){return g},j:function(){return r}});function r(s){var y;let c=s.baseImplementation||e.g.fetch;const d=[(y=s.middleware)!=null?y:[]].flat().reverse();for(const m of d)c=m.apply(c);return{fetch:c}}class t{static create(c){var E,i;const d=[];c.urlPrefixAllowlist?d.push(...c.urlPrefixAllowlist):c.config&&d.push(c.config.getString("backend.baseUrl"));const y=((E=c.header)==null?void 0:E.name)||"authorization",m=((i=c.header)==null?void 0:i.value)||(S=>`Bearer ${S}`);return new t(c.identityApi,d.map(S=>S.replace(/\/$/,"")),y,m)}constructor(c,d,y,m){this.identityApi=c,this.urlPrefixAllowlist=d,this.headerName=y,this.headerValue=m}apply(c){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?c(d,y):(m.headers.set(this.headerName,this.headerValue(E)),c(m))}}}function l(s,c){return!c||c==="/"?s:`${s.replace(/\/$/,"")}/${c.replace(/^\//,"")}`}class u{constructor(c){this.discoveryApi=c}apply(c){return async(d,y)=>{const m=new Request(d,y),E="plugin://";if(!m.url.startsWith(E))return c(d,y);const{hostname:i,pathname:S,search:b,hash:P,username:j,password:F}=new URL(`http://${m.url.substring(E.length)}`);let B=await this.discoveryApi.getBaseUrl(i);if(j||F){const D=new URL(B),X=`${j}${F?`:${F}`:""}@`;B=`${D.protocol}//${X}${D.host}${D.pathname}`}const N=`${l(B,S)}${b}${P}`;return c(N,m)}}}class g{static resolvePluginProtocol(c){return new u(c.discoveryApi)}static injectIdentityAuth(c){return t.create(c)}constructor(){}}},11358:function(Q,o,e){"use strict";e.d(o,{Y:function(){return g}});var r=e(98005);function t(s,c){for(const d of c)if(!s.has(d))return!1;return!0}function l(s,...c){const d=new Set(s);for(const y of c)for(const m of y)d.add(m);return d}class u{constructor(){q(this,"requests",[]);q(this,"subject",new r.X(this.getCurrentPending()))}request(c){return new Promise((d,y)=>{this.requests.push({scopes:c,resolve:d,reject:y}),this.subject.next(this.getCurrentPending())})}resolve(c,d){this.requests=this.requests.filter(y=>t(c,y.scopes)?(y.resolve(d),!1):!0),this.subject.next(this.getCurrentPending())}reject(c){this.requests.forEach(d=>d.reject(c)),this.requests=[],this.subject.next(this.getCurrentPending())}pending(){return this.subject}getCurrentPending(){const c=this.requests.length===0?void 0:this.requests.slice(1).reduce((d,y)=>l(d,y.scopes),this.requests[0].scopes);return{scopes:c,resolve:d=>{c&&this.resolve(c,d)},reject:d=>{c&&this.reject(d)}}}}class g{constructor(){q(this,"subject",new r.X([]));q(this,"currentRequests",[]);q(this,"handlerCount",0)}createAuthRequester(c){c.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 u,y=this.handlerCount;return this.handlerCount++,d.pending().subscribe({next:m=>{const E=this.currentRequests.slice(),i=this.makeAuthRequest(m,c);i?E[y]=i:delete E[y],this.currentRequests=E,this.subject.next(E.filter(Boolean))}}),m=>d.request(m)}makeAuthRequest(c,d){const{scopes:y}=c;if(!!y)return{provider:d.provider,trigger:async()=>{const m=await d.onAuthRequest(y);c.resolve(m)},reject:()=>{const m=new Error("Login failed, rejected by user");m.name="RejectedError",c.reject(m)}}}authRequest$(){return this.subject}}},56054:function(Q,o,e){"use strict";e.d(o,{C:function(){return u}});var r=e(82394),t=e.n(r);const l=new Map;class u{constructor(s,c){q(this,"subscribers",new Set);q(this,"observable",new(t())(s=>(this.subscribers.add(s),()=>{this.subscribers.delete(s)})));this.namespace=s,this.errorApi=c}static create(s){var c;return new u((c=s.namespace)!=null?c:"",s.errorApi)}get(s){return this.snapshot(s).value}snapshot(s){let c,d="absent";try{const y=localStorage.getItem(this.getKeyName(s));y&&(c=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:c,newValue:c,presence:d}}forBucket(s){const c=`${this.namespace}/${s}`;return l.has(c)||l.set(c,new u(c,this.errorApi)),l.get(c)}async set(s,c){localStorage.setItem(this.getKeyName(s),JSON.stringify(c)),this.notifyChanges(s)}async remove(s){localStorage.removeItem(this.getKeyName(s)),this.notifyChanges(s)}observe$(s){return this.observable.filter(({key:c})=>c===s)}getKeyName(s){return`${this.namespace}/${encodeURIComponent(s)}`}notifyChanges(s){const c=this.snapshot(s);for(const d of this.subscribers)d.next(c)}}},59589:function(Q,o,e){"use strict";e.d(o,{u:function(){return l}});var r=e(91205);const t={id:"atlassian",title:"Atlassian",icon:()=>null};class l{static create(g){const{discoveryApi:s,environment:c="development",provider:d=t,oauthRequestApi:y}=g;return r.L.create({discoveryApi:s,oauthRequestApi:y,provider:d,environment:c})}}},92293:function(Q,o,e){"use strict";e.d(o,{Z:function(){return l}});var r=e(91205);const t={id:"auth0",title:"Auth0",icon:()=>null};class l{static create(g){const{discoveryApi:s,environment:c="development",provider:d=t,oauthRequestApi:y,defaultScopes:m=["openid","email","profile"]}=g;return r.L.create({discoveryApi:s,oauthRequestApi:y,provider:d,environment:c,defaultScopes:m})}}},6098:function(Q,o,e){"use strict";e.d(o,{Z:function(){return l}});var r=e(91205);const t={id:"bitbucket",title:"Bitbucket",icon:()=>null};class l{static create(g){const{discoveryApi:s,environment:c="development",provider:d=t,oauthRequestApi:y,defaultScopes:m=["team"]}=g;return r.L.create({discoveryApi:s,oauthRequestApi:y,provider:d,environment:c,defaultScopes:m})}}},44431:function(Q,o,e){"use strict";e.d(o,{x:function(){return l.Z}});var r=e(19347),t=e.n(r);e.o(r,"AlertApiForwarder")&&e.d(o,{AlertApiForwarder:function(){return r.AlertApiForwarder}}),e.o(r,"AppThemeSelector")&&e.d(o,{AppThemeSelector:function(){return r.AppThemeSelector}}),e.o(r,"AtlassianAuth")&&e.d(o,{AtlassianAuth:function(){return r.AtlassianAuth}}),e.o(r,"ConfigReader")&&e.d(o,{ConfigReader:function(){return r.ConfigReader}}),e.o(r,"ErrorAlerter")&&e.d(o,{ErrorAlerter:function(){return r.ErrorAlerter}}),e.o(r,"ErrorApiForwarder")&&e.d(o,{ErrorApiForwarder:function(){return r.ErrorApiForwarder}}),e.o(r,"FetchMiddlewares")&&e.d(o,{FetchMiddlewares:function(){return r.FetchMiddlewares}}),e.o(r,"FlatRoutes")&&e.d(o,{FlatRoutes:function(){return r.FlatRoutes}}),e.o(r,"LocalStorageFeatureFlags")&&e.d(o,{LocalStorageFeatureFlags:function(){return r.LocalStorageFeatureFlags}}),e.o(r,"NoOpAnalyticsApi")&&e.d(o,{NoOpAnalyticsApi:function(){return r.NoOpAnalyticsApi}}),e.o(r,"OAuthRequestManager")&&e.d(o,{OAuthRequestManager:function(){return r.OAuthRequestManager}}),e.o(r,"UnhandledErrorForwarder")&&e.d(o,{UnhandledErrorForwarder:function(){return r.UnhandledErrorForwarder}}),e.o(r,"UrlPatternDiscovery")&&e.d(o,{UrlPatternDiscovery:function(){return r.UrlPatternDiscovery}}),e.o(r,"WebStorage")&&e.d(o,{WebStorage:function(){return r.WebStorage}}),e.o(r,"createFetchApi")&&e.d(o,{createFetchApi:function(){return r.createFetchApi}}),e.o(r,"createSpecializedApp")&&e.d(o,{createSpecializedApp:function(){return r.createSpecializedApp}});var l=e(6098)},19347:function(){},55551:function(Q,o,e){"use strict";e.d(o,{T:function(){return d}});var r=e(96176),t=e(54842),l=e(91405);class u{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 g=e(30195);const s=g.z.object({providerInfo:g.z.object({accessToken:g.z.string(),scopes:g.z.set(g.z.string()),expiresAt:g.z.date().optional()}),profile:g.z.object({email:g.z.string().optional(),displayName:g.z.string().optional(),picture:g.z.string().optional()}),backstageIdentity:g.z.object({id:g.z.string(),token:g.z.string(),identity:g.z.object({type:g.z.literal("user"),userEntityRef:g.z.string(),ownershipEntityRefs:g.z.array(g.z.string())})})}),c={id:"github",title:"GitHub",icon:()=>null};class d{static create(m){const{discoveryApi:E,environment:i="development",provider:S=c,oauthRequestApi:b,defaultScopes:P=["read:user"]}=m,j=new r.y({discoveryApi:E,environment:i,provider:S,oauthRequestApi:b,sessionTransform(D){return{...D,providerInfo:{accessToken:D.providerInfo.accessToken,scopes:d.normalizeScope(D.providerInfo.scope),expiresAt:D.providerInfo.expiresInSeconds?new Date(Date.now()+D.providerInfo.expiresInSeconds*1e3):void 0}}}}),F=new t.q2({connector:j,defaultScopes:new Set(P),sessionScopes:D=>D.providerInfo.scopes,sessionShouldRefresh:D=>{const{expiresAt:X}=D.providerInfo;return X?(X.getTime()-Date.now())/1e3<60*5:!1}}),B=new t.Hc({manager:new t.k1({connector:j,defaultScopes:new Set(P),sessionScopes:D=>D.providerInfo.scopes}),storageKey:`${S.id}Session`,schema:s,sessionScopes:D=>D.providerInfo.scopes}),N=new u({refreshingSessionManager:F,staticSessionManager:B,sessionCanRefresh:D=>D.providerInfo.expiresAt!==void 0});return new d(N)}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(Q,o,e){"use strict";e.d(o,{a:function(){return l}});var r=e(91205);const t={id:"gitlab",title:"GitLab",icon:()=>null};class l{static create(g){const{discoveryApi:s,environment:c="development",provider:d=t,oauthRequestApi:y,defaultScopes:m=["read_user"]}=g;return r.L.create({discoveryApi:s,oauthRequestApi:y,provider:d,environment:c,defaultScopes:m})}}},59938:function(Q,o,e){"use strict";e.d(o,{e:function(){return u}});var r=e(91205);const t={id:"google",title:"Google",icon:()=>null},l="https://www.googleapis.com/auth/";class u{static create(s){const{discoveryApi:c,oauthRequestApi:d,environment:y="development",provider:m=t,defaultScopes:E=["openid",`${l}userinfo.email`,`${l}userinfo.profile`]}=s;return r.L.create({discoveryApi:c,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(Q,o,e){"use strict";e.d(o,{Td:function(){return r.T},aq:function(){return t.a},eE:function(){return l.e},OAuth2:function(){return u.L},OktaAuth:function(){return g.s},SamlAuth:function(){return s.n},Auth0Auth:function(){return c.Z},MicrosoftAuth:function(){return d._},OneLoginAuth:function(){return y.$},BitbucketAuth:function(){return m.x},AtlassianAuth:function(){return E.u}});var r=e(55551),t=e(2922),l=e(59938),u=e(91205);e.o(u,"AlertApiForwarder")&&e.d(o,{AlertApiForwarder:function(){return u.AlertApiForwarder}}),e.o(u,"AppThemeSelector")&&e.d(o,{AppThemeSelector:function(){return u.AppThemeSelector}}),e.o(u,"AtlassianAuth")&&e.d(o,{AtlassianAuth:function(){return u.AtlassianAuth}}),e.o(u,"Auth0Auth")&&e.d(o,{Auth0Auth:function(){return u.Auth0Auth}}),e.o(u,"BitbucketAuth")&&e.d(o,{BitbucketAuth:function(){return u.BitbucketAuth}}),e.o(u,"ConfigReader")&&e.d(o,{ConfigReader:function(){return u.ConfigReader}}),e.o(u,"ErrorAlerter")&&e.d(o,{ErrorAlerter:function(){return u.ErrorAlerter}}),e.o(u,"ErrorApiForwarder")&&e.d(o,{ErrorApiForwarder:function(){return u.ErrorApiForwarder}}),e.o(u,"FetchMiddlewares")&&e.d(o,{FetchMiddlewares:function(){return u.FetchMiddlewares}}),e.o(u,"FlatRoutes")&&e.d(o,{FlatRoutes:function(){return u.FlatRoutes}}),e.o(u,"LocalStorageFeatureFlags")&&e.d(o,{LocalStorageFeatureFlags:function(){return u.LocalStorageFeatureFlags}}),e.o(u,"MicrosoftAuth")&&e.d(o,{MicrosoftAuth:function(){return u.MicrosoftAuth}}),e.o(u,"NoOpAnalyticsApi")&&e.d(o,{NoOpAnalyticsApi:function(){return u.NoOpAnalyticsApi}}),e.o(u,"OAuthRequestManager")&&e.d(o,{OAuthRequestManager:function(){return u.OAuthRequestManager}}),e.o(u,"OktaAuth")&&e.d(o,{OktaAuth:function(){return u.OktaAuth}}),e.o(u,"OneLoginAuth")&&e.d(o,{OneLoginAuth:function(){return u.OneLoginAuth}}),e.o(u,"SamlAuth")&&e.d(o,{SamlAuth:function(){return u.SamlAuth}}),e.o(u,"UnhandledErrorForwarder")&&e.d(o,{UnhandledErrorForwarder:function(){return u.UnhandledErrorForwarder}}),e.o(u,"UrlPatternDiscovery")&&e.d(o,{UrlPatternDiscovery:function(){return u.UrlPatternDiscovery}}),e.o(u,"WebStorage")&&e.d(o,{WebStorage:function(){return u.WebStorage}}),e.o(u,"createFetchApi")&&e.d(o,{createFetchApi:function(){return u.createFetchApi}}),e.o(u,"createSpecializedApp")&&e.d(o,{createSpecializedApp:function(){return u.createSpecializedApp}});var g=e(26079),s=e(67578),c=e(92293),d=e(38482),y=e(58381),m=e(44431);e.o(m,"AlertApiForwarder")&&e.d(o,{AlertApiForwarder:function(){return m.AlertApiForwarder}}),e.o(m,"AppThemeSelector")&&e.d(o,{AppThemeSelector:function(){return m.AppThemeSelector}}),e.o(m,"AtlassianAuth")&&e.d(o,{AtlassianAuth:function(){return m.AtlassianAuth}}),e.o(m,"ConfigReader")&&e.d(o,{ConfigReader:function(){return m.ConfigReader}}),e.o(m,"ErrorAlerter")&&e.d(o,{ErrorAlerter:function(){return m.ErrorAlerter}}),e.o(m,"ErrorApiForwarder")&&e.d(o,{ErrorApiForwarder:function(){return m.ErrorApiForwarder}}),e.o(m,"FetchMiddlewares")&&e.d(o,{FetchMiddlewares:function(){return m.FetchMiddlewares}}),e.o(m,"FlatRoutes")&&e.d(o,{FlatRoutes:function(){return m.FlatRoutes}}),e.o(m,"LocalStorageFeatureFlags")&&e.d(o,{LocalStorageFeatureFlags:function(){return m.LocalStorageFeatureFlags}}),e.o(m,"NoOpAnalyticsApi")&&e.d(o,{NoOpAnalyticsApi:function(){return m.NoOpAnalyticsApi}}),e.o(m,"OAuthRequestManager")&&e.d(o,{OAuthRequestManager:function(){return m.OAuthRequestManager}}),e.o(m,"UnhandledErrorForwarder")&&e.d(o,{UnhandledErrorForwarder:function(){return m.UnhandledErrorForwarder}}),e.o(m,"UrlPatternDiscovery")&&e.d(o,{UrlPatternDiscovery:function(){return m.UrlPatternDiscovery}}),e.o(m,"WebStorage")&&e.d(o,{WebStorage:function(){return m.WebStorage}}),e.o(m,"createFetchApi")&&e.d(o,{createFetchApi:function(){return m.createFetchApi}}),e.o(m,"createSpecializedApp")&&e.d(o,{createSpecializedApp:function(){return m.createSpecializedApp}});var E=e(59589)},38482:function(Q,o,e){"use strict";e.d(o,{_:function(){return l}});var r=e(91205);const t={id:"microsoft",title:"Microsoft",icon:()=>null};class l{static create(g){const{environment:s="development",provider:c=t,oauthRequestApi:d,discoveryApi:y,defaultScopes:m=["openid","offline_access","profile","email","User.Read"]}=g;return r.L.create({discoveryApi:y,oauthRequestApi:d,provider:c,environment:s,defaultScopes:m})}}},95792:function(Q,o,e){"use strict";e.d(o,{Z:function(){return u}});var r=e(96176),t=e(54842);const l={id:"oauth2",title:"Your Identity Provider",icon:()=>null};class u{constructor(s){q(this,"sessionManager");q(this,"scopeTransform");this.sessionManager=s.sessionManager,this.scopeTransform=s.scopeTransform}static create(s){const{discoveryApi:c,environment:d="development",provider:y=l,oauthRequestApi:m,defaultScopes:E=[],scopeTransform:i=P=>P}=s,S=new r.y({discoveryApi:c,environment:d,provider:y,oauthRequestApi:m,sessionTransform(P){return{...P,providerInfo:{idToken:P.providerInfo.idToken,accessToken:P.providerInfo.accessToken,scopes:u.normalizeScopes(i,P.providerInfo.scope),expiresAt:new Date(Date.now()+P.providerInfo.expiresInSeconds*1e3)}}}}),b=new t.q2({connector:S,defaultScopes:new Set(E),sessionScopes:P=>P.providerInfo.scopes,sessionShouldRefresh:P=>(P.providerInfo.expiresAt.getTime()-Date.now())/1e3<60*5});return new u({sessionManager:b,scopeTransform:i})}async signIn(){await this.getAccessToken()}async signOut(){await this.sessionManager.removeSession()}sessionState$(){return this.sessionManager.sessionState$()}async getAccessToken(s,c){var m;const d=u.normalizeScopes(this.scopeTransform,s),y=await this.sessionManager.getSession({...c,scopes:d});return(m=y==null?void 0:y.providerInfo.accessToken)!=null?m:""}async getIdToken(s={}){var d;const c=await this.sessionManager.getSession(s);return(d=c==null?void 0:c.providerInfo.idToken)!=null?d:""}async getBackstageIdentity(s={}){const c=await this.sessionManager.getSession(s);return c==null?void 0:c.backstageIdentity}async getProfile(s={}){const c=await this.sessionManager.getSession(s);return c==null?void 0:c.profile}static normalizeScopes(s,c){if(!c)return new Set;const d=Array.isArray(c)?c:c.split(/[\s|,]/).filter(Boolean);return new Set(s(d))}}},91205:function(Q,o,e){"use strict";e.d(o,{L:function(){return r.Z}});var r=e(95792),t=e(5973),l=e.n(t);e.o(t,"AlertApiForwarder")&&e.d(o,{AlertApiForwarder:function(){return t.AlertApiForwarder}}),e.o(t,"AppThemeSelector")&&e.d(o,{AppThemeSelector:function(){return t.AppThemeSelector}}),e.o(t,"AtlassianAuth")&&e.d(o,{AtlassianAuth:function(){return t.AtlassianAuth}}),e.o(t,"Auth0Auth")&&e.d(o,{Auth0Auth:function(){return t.Auth0Auth}}),e.o(t,"BitbucketAuth")&&e.d(o,{BitbucketAuth:function(){return t.BitbucketAuth}}),e.o(t,"ConfigReader")&&e.d(o,{ConfigReader:function(){return t.ConfigReader}}),e.o(t,"ErrorAlerter")&&e.d(o,{ErrorAlerter:function(){return t.ErrorAlerter}}),e.o(t,"ErrorApiForwarder")&&e.d(o,{ErrorApiForwarder:function(){return t.ErrorApiForwarder}}),e.o(t,"FetchMiddlewares")&&e.d(o,{FetchMiddlewares:function(){return t.FetchMiddlewares}}),e.o(t,"FlatRoutes")&&e.d(o,{FlatRoutes:function(){return t.FlatRoutes}}),e.o(t,"LocalStorageFeatureFlags")&&e.d(o,{LocalStorageFeatureFlags:function(){return t.LocalStorageFeatureFlags}}),e.o(t,"MicrosoftAuth")&&e.d(o,{MicrosoftAuth:function(){return t.MicrosoftAuth}}),e.o(t,"NoOpAnalyticsApi")&&e.d(o,{NoOpAnalyticsApi:function(){return t.NoOpAnalyticsApi}}),e.o(t,"OAuthRequestManager")&&e.d(o,{OAuthRequestManager:function(){return t.OAuthRequestManager}}),e.o(t,"OktaAuth")&&e.d(o,{OktaAuth:function(){return t.OktaAuth}}),e.o(t,"OneLoginAuth")&&e.d(o,{OneLoginAuth:function(){return t.OneLoginAuth}}),e.o(t,"SamlAuth")&&e.d(o,{SamlAuth:function(){return t.SamlAuth}}),e.o(t,"UnhandledErrorForwarder")&&e.d(o,{UnhandledErrorForwarder:function(){return t.UnhandledErrorForwarder}}),e.o(t,"UrlPatternDiscovery")&&e.d(o,{UrlPatternDiscovery:function(){return t.UrlPatternDiscovery}}),e.o(t,"WebStorage")&&e.d(o,{WebStorage:function(){return t.WebStorage}}),e.o(t,"createFetchApi")&&e.d(o,{createFetchApi:function(){return t.createFetchApi}}),e.o(t,"createSpecializedApp")&&e.d(o,{createSpecializedApp:function(){return t.createSpecializedApp}})},5973:function(){},26079:function(Q,o,e){"use strict";e.d(o,{s:function(){return g}});var r=e(91205);const t={id:"okta",title:"Okta",icon:()=>null},l=new Set(["openid","profile","email","phone","address","groups","offline_access"]),u="okta.";class g{static create(c){const{discoveryApi:d,environment:y="development",provider:m=t,oauthRequestApi:E,defaultScopes:i=["openid","email","profile","offline_access"]}=c;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(u)?b:`${u}${b}`)}})}}},58381:function(Q,o,e){"use strict";e.d(o,{$:function(){return g}});var r=e(91205);const t={id:"onelogin",title:"onelogin",icon:()=>null},l=new Set(["openid","profile","email","phone","address","groups","offline_access"]),u="onelogin.";class g{static create(c){const{discoveryApi:d,environment:y="development",provider:m=t,oauthRequestApi:E}=c;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(u)?S:`${u}${S}`)}})}}},67578:function(Q,o,e){"use strict";e.d(o,{n:function(){return c}});var r=e(17678);class t{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=e(54842),u=e(30195);const g=u.z.object({profile:u.z.object({email:u.z.string().optional(),displayName:u.z.string().optional(),picture:u.z.string().optional()}),backstageIdentity:u.z.object({id:u.z.string(),token:u.z.string(),identity:u.z.object({type:u.z.literal("user"),userEntityRef:u.z.string(),ownershipEntityRefs:u.z.array(u.z.string())})})}),s={id:"saml",title:"SAML",icon:()=>null};class c{static create(y){const{discoveryApi:m,environment:E="development",provider:i=s}=y,S=new t({discoveryApi:m,environment:E,provider:i}),b=new l.k1({connector:S}),P=new l.Hc({manager:b,storageKey:`${i.id}Session`,schema:g});return new c(P)}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(Q,o,e){"use strict";e.d(o,{AtlassianAuth:function(){return r.AtlassianAuth},Auth0Auth:function(){return r.Auth0Auth},GithubAuth:function(){return r.Td},GitlabAuth:function(){return r.aq},GoogleAuth:function(){return r.eE},MicrosoftAuth:function(){return r.MicrosoftAuth},OktaAuth:function(){return r.OktaAuth},OneLoginAuth:function(){return r.OneLoginAuth},SamlAuth:function(){return r.SamlAuth},AlertApiForwarder:function(){return t.C},NoOpAnalyticsApi:function(){return l.g},AppThemeSelector:function(){return u.C},ConfigReader:function(){return g.m},UrlPatternDiscovery:function(){return s.p},ErrorAlerter:function(){return c.KN},ErrorApiForwarder:function(){return c.gr},UnhandledErrorForwarder:function(){return c.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=e(91668);e.o(r,"AlertApiForwarder")&&e.d(o,{AlertApiForwarder:function(){return r.AlertApiForwarder}}),e.o(r,"AppThemeSelector")&&e.d(o,{AppThemeSelector:function(){return r.AppThemeSelector}}),e.o(r,"BitbucketAuth")&&e.d(o,{BitbucketAuth:function(){return r.BitbucketAuth}}),e.o(r,"ConfigReader")&&e.d(o,{ConfigReader:function(){return r.ConfigReader}}),e.o(r,"ErrorAlerter")&&e.d(o,{ErrorAlerter:function(){return r.ErrorAlerter}}),e.o(r,"ErrorApiForwarder")&&e.d(o,{ErrorApiForwarder:function(){return r.ErrorApiForwarder}}),e.o(r,"FetchMiddlewares")&&e.d(o,{FetchMiddlewares:function(){return r.FetchMiddlewares}}),e.o(r,"FlatRoutes")&&e.d(o,{FlatRoutes:function(){return r.FlatRoutes}}),e.o(r,"LocalStorageFeatureFlags")&&e.d(o,{LocalStorageFeatureFlags:function(){return r.LocalStorageFeatureFlags}}),e.o(r,"NoOpAnalyticsApi")&&e.d(o,{NoOpAnalyticsApi:function(){return r.NoOpAnalyticsApi}}),e.o(r,"OAuth2")&&e.d(o,{OAuth2:function(){return r.OAuth2}}),e.o(r,"OAuthRequestManager")&&e.d(o,{OAuthRequestManager:function(){return r.OAuthRequestManager}}),e.o(r,"UnhandledErrorForwarder")&&e.d(o,{UnhandledErrorForwarder:function(){return r.UnhandledErrorForwarder}}),e.o(r,"UrlPatternDiscovery")&&e.d(o,{UrlPatternDiscovery:function(){return r.UrlPatternDiscovery}}),e.o(r,"WebStorage")&&e.d(o,{WebStorage:function(){return r.WebStorage}}),e.o(r,"createFetchApi")&&e.d(o,{createFetchApi:function(){return r.createFetchApi}}),e.o(r,"createSpecializedApp")&&e.d(o,{createSpecializedApp:function(){return r.createSpecializedApp}});var t=e(23235),l=e(47150),u=e(58652),g=e(14721),s=e(4333),c=e(89536),d=e(14884),y=e(50160),m=e(11358),E=e(56054)},56494:function(Q,o,e){"use strict";e.d(o,{ApiProvider:function(){return r.gs},AlertApiForwarder:function(){return t.AlertApiForwarder},AppThemeSelector:function(){return t.AppThemeSelector},ConfigReader:function(){return t.ConfigReader},ErrorAlerter:function(){return t.ErrorAlerter},ErrorApiForwarder:function(){return t.ErrorApiForwarder},FetchMiddlewares:function(){return t.FetchMiddlewares},LocalStorageFeatureFlags:function(){return t.LocalStorageFeatureFlags},NoOpAnalyticsApi:function(){return t.NoOpAnalyticsApi},OAuthRequestManager:function(){return t.OAuthRequestManager},UnhandledErrorForwarder:function(){return t.UnhandledErrorForwarder},UrlPatternDiscovery:function(){return t.UrlPatternDiscovery},WebStorage:function(){return t.WebStorage},createFetchApi:function(){return t.createFetchApi}});var r=e(76105);e.o(r,"AlertApiForwarder")&&e.d(o,{AlertApiForwarder:function(){return r.AlertApiForwarder}}),e.o(r,"AppThemeSelector")&&e.d(o,{AppThemeSelector:function(){return r.AppThemeSelector}}),e.o(r,"AtlassianAuth")&&e.d(o,{AtlassianAuth:function(){return r.AtlassianAuth}}),e.o(r,"Auth0Auth")&&e.d(o,{Auth0Auth:function(){return r.Auth0Auth}}),e.o(r,"BitbucketAuth")&&e.d(o,{BitbucketAuth:function(){return r.BitbucketAuth}}),e.o(r,"ConfigReader")&&e.d(o,{ConfigReader:function(){return r.ConfigReader}}),e.o(r,"ErrorAlerter")&&e.d(o,{ErrorAlerter:function(){return r.ErrorAlerter}}),e.o(r,"ErrorApiForwarder")&&e.d(o,{ErrorApiForwarder:function(){return r.ErrorApiForwarder}}),e.o(r,"FetchMiddlewares")&&e.d(o,{FetchMiddlewares:function(){return r.FetchMiddlewares}}),e.o(r,"FlatRoutes")&&e.d(o,{FlatRoutes:function(){return r.FlatRoutes}}),e.o(r,"GithubAuth")&&e.d(o,{GithubAuth:function(){return r.GithubAuth}}),e.o(r,"GitlabAuth")&&e.d(o,{GitlabAuth:function(){return r.GitlabAuth}}),e.o(r,"GoogleAuth")&&e.d(o,{GoogleAuth:function(){return r.GoogleAuth}}),e.o(r,"LocalStorageFeatureFlags")&&e.d(o,{LocalStorageFeatureFlags:function(){return r.LocalStorageFeatureFlags}}),e.o(r,"MicrosoftAuth")&&e.d(o,{MicrosoftAuth:function(){return r.MicrosoftAuth}}),e.o(r,"NoOpAnalyticsApi")&&e.d(o,{NoOpAnalyticsApi:function(){return r.NoOpAnalyticsApi}}),e.o(r,"OAuth2")&&e.d(o,{OAuth2:function(){return r.OAuth2}}),e.o(r,"OAuthRequestManager")&&e.d(o,{OAuthRequestManager:function(){return r.OAuthRequestManager}}),e.o(r,"OktaAuth")&&e.d(o,{OktaAuth:function(){return r.OktaAuth}}),e.o(r,"OneLoginAuth")&&e.d(o,{OneLoginAuth:function(){return r.OneLoginAuth}}),e.o(r,"SamlAuth")&&e.d(o,{SamlAuth:function(){return r.SamlAuth}}),e.o(r,"UnhandledErrorForwarder")&&e.d(o,{UnhandledErrorForwarder:function(){return r.UnhandledErrorForwarder}}),e.o(r,"UrlPatternDiscovery")&&e.d(o,{UrlPatternDiscovery:function(){return r.UrlPatternDiscovery}}),e.o(r,"WebStorage")&&e.d(o,{WebStorage:function(){return r.WebStorage}}),e.o(r,"createFetchApi")&&e.d(o,{createFetchApi:function(){return r.createFetchApi}}),e.o(r,"createSpecializedApp")&&e.d(o,{createSpecializedApp:function(){return r.createSpecializedApp}});var t=e(91631);e.o(t,"AtlassianAuth")&&e.d(o,{AtlassianAuth:function(){return t.AtlassianAuth}}),e.o(t,"Auth0Auth")&&e.d(o,{Auth0Auth:function(){return t.Auth0Auth}}),e.o(t,"BitbucketAuth")&&e.d(o,{BitbucketAuth:function(){return t.BitbucketAuth}}),e.o(t,"FlatRoutes")&&e.d(o,{FlatRoutes:function(){return t.FlatRoutes}}),e.o(t,"GithubAuth")&&e.d(o,{GithubAuth:function(){return t.GithubAuth}}),e.o(t,"GitlabAuth")&&e.d(o,{GitlabAuth:function(){return t.GitlabAuth}}),e.o(t,"GoogleAuth")&&e.d(o,{GoogleAuth:function(){return t.GoogleAuth}}),e.o(t,"MicrosoftAuth")&&e.d(o,{MicrosoftAuth:function(){return t.MicrosoftAuth}}),e.o(t,"OAuth2")&&e.d(o,{OAuth2:function(){return t.OAuth2}}),e.o(t,"OktaAuth")&&e.d(o,{OktaAuth:function(){return t.OktaAuth}}),e.o(t,"OneLoginAuth")&&e.d(o,{OneLoginAuth:function(){return t.OneLoginAuth}}),e.o(t,"SamlAuth")&&e.d(o,{SamlAuth:function(){return t.SamlAuth}}),e.o(t,"createSpecializedApp")&&e.d(o,{createSpecializedApp:function(){return t.createSpecializedApp}})},80396:function(Q,o,e){"use strict";e.d(o,{p:function(){return t}});var r;(function(l){l[l.default=10]="default";const u=50;l[l.app=u]="app",l[l.static=100]="static"})(r||(r={}));class t{constructor(){q(this,"factories",new Map)}register(u,g){const s=r[u],c=this.factories.get(g.api.id);return c&&c.priority>=s?!1:(this.factories.set(g.api.id,{priority:s,factory:g}),!0)}get(u){const g=this.factories.get(u.id);if(!!g)return g.factory}getAllApis(){const u=new Set;for(const{factory:g}of this.factories.values())u.add(g.api);return u}}},14406:function(Q,o,e){"use strict";e.d(o,{g:function(){return c}});var r=e(2784),t=e(13980),l=e.n(t);class u{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 g=e(76241);const s=(0,g.CT)("api-context"),c=d=>{var S;const{apis:y,children:m}=d,E=(S=(0,r.useContext)(s))==null?void 0:S.atVersion(1),i=E?new u(y,E):y;return r.createElement(s.Provider,{value:(0,g.EI)({1:i}),children:m})};c.propTypes={apis:l().shape({get:l().func.isRequired}).isRequired,children:l().node}},12132:function(Q,o,e){"use strict";e.d(o,{M:function(){return r}});class r{constructor(l){q(this,"apis",new Map);this.factories=l}static validateFactories(l,u){for(const g of u){const s=[g],c=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===g.id)throw new Error(`Circular dependency of api factory for ${g}`);c.has(m)||(c.add(m),s.push(m))}}}}get(l){return this.load(l)}load(l,u=[]){const g=this.apis.get(l.id);if(g)return g;const s=this.factories.get(l);if(!s)return;if(u.includes(s.api))throw new Error(`Circular dependency of api factory for ${s.api}`);const c=this.loadDeps(l,s.deps,[...u,s.api]),d=s.factory(c);return this.apis.set(l.id,d),d}loadDeps(l,u,g){const s={};for(const c in u)if(u.hasOwnProperty(c)){const d=u[c],y=this.load(d,g);if(!y)throw new Error(`No API factory available for dependency ${d} of dependent ${l}`);s[c]=y}return s}}},76105:function(Q,o,e){"use strict";e.d(o,{gs:function(){return r.g},MM:function(){return t.M},pv:function(){return l.p}});var r=e(14406),t=e(12132),l=e(80396),u=e(82488),g=e.n(u);e.o(u,"AlertApiForwarder")&&e.d(o,{AlertApiForwarder:function(){return u.AlertApiForwarder}}),e.o(u,"AppThemeSelector")&&e.d(o,{AppThemeSelector:function(){return u.AppThemeSelector}}),e.o(u,"AtlassianAuth")&&e.d(o,{AtlassianAuth:function(){return u.AtlassianAuth}}),e.o(u,"Auth0Auth")&&e.d(o,{Auth0Auth:function(){return u.Auth0Auth}}),e.o(u,"BitbucketAuth")&&e.d(o,{BitbucketAuth:function(){return u.BitbucketAuth}}),e.o(u,"ConfigReader")&&e.d(o,{ConfigReader:function(){return u.ConfigReader}}),e.o(u,"ErrorAlerter")&&e.d(o,{ErrorAlerter:function(){return u.ErrorAlerter}}),e.o(u,"ErrorApiForwarder")&&e.d(o,{ErrorApiForwarder:function(){return u.ErrorApiForwarder}}),e.o(u,"FetchMiddlewares")&&e.d(o,{FetchMiddlewares:function(){return u.FetchMiddlewares}}),e.o(u,"FlatRoutes")&&e.d(o,{FlatRoutes:function(){return u.FlatRoutes}}),e.o(u,"GithubAuth")&&e.d(o,{GithubAuth:function(){return u.GithubAuth}}),e.o(u,"GitlabAuth")&&e.d(o,{GitlabAuth:function(){return u.GitlabAuth}}),e.o(u,"GoogleAuth")&&e.d(o,{GoogleAuth:function(){return u.GoogleAuth}}),e.o(u,"LocalStorageFeatureFlags")&&e.d(o,{LocalStorageFeatureFlags:function(){return u.LocalStorageFeatureFlags}}),e.o(u,"MicrosoftAuth")&&e.d(o,{MicrosoftAuth:function(){return u.MicrosoftAuth}}),e.o(u,"NoOpAnalyticsApi")&&e.d(o,{NoOpAnalyticsApi:function(){return u.NoOpAnalyticsApi}}),e.o(u,"OAuth2")&&e.d(o,{OAuth2:function(){return u.OAuth2}}),e.o(u,"OAuthRequestManager")&&e.d(o,{OAuthRequestManager:function(){return u.OAuthRequestManager}}),e.o(u,"OktaAuth")&&e.d(o,{OktaAuth:function(){return u.OktaAuth}}),e.o(u,"OneLoginAuth")&&e.d(o,{OneLoginAuth:function(){return u.OneLoginAuth}}),e.o(u,"SamlAuth")&&e.d(o,{SamlAuth:function(){return u.SamlAuth}}),e.o(u,"UnhandledErrorForwarder")&&e.d(o,{UnhandledErrorForwarder:function(){return u.UnhandledErrorForwarder}}),e.o(u,"UrlPatternDiscovery")&&e.d(o,{UrlPatternDiscovery:function(){return u.UrlPatternDiscovery}}),e.o(u,"WebStorage")&&e.d(o,{WebStorage:function(){return u.WebStorage}}),e.o(u,"createFetchApi")&&e.d(o,{createFetchApi:function(){return u.createFetchApi}}),e.o(u,"createSpecializedApp")&&e.d(o,{createSpecializedApp:function(){return u.createSpecializedApp}})},82488:function(){},21998:function(Q,o,e){"use strict";e.d(o,{b:function(){return se}});var r=e(2784),t=e(10289),l=e(64279),u=e(56494),g=e(36964),s=e(76105);function c(T){const R={};for(const U in T.collectors)T.collectors.hasOwnProperty(U)&&(R[U]=T.collectors[U]());const O=[{node:r.Children.toArray(T.root),parent:void 0,contexts:{}}];for(;O.length!==0;){const{node:U,parent:G,contexts:ne}=O.shift();r.Children.forEach(U,ue=>{if(!(0,r.isValidElement)(ue))return;const ge={};for(const Oe in R)if(R.hasOwnProperty(Oe)){const We=R[Oe];ge[Oe]=We.visit(We.accumulator,ue,G,ne[Oe])}for(const Oe of T.discoverers){const We=Oe(ue);We&&O.push({node:We,parent:ue,contexts:ge})}})}return Object.fromEntries(Object.entries(R).map(([U,G])=>[U,G.accumulator]))}function d(T,R){return()=>({accumulator:T(),visit:R})}function y(T){var R;return(R=T.props)==null?void 0:R.children}function m(T){var R,O,U;if(((R=T.props)==null?void 0:R.path)&&((O=T.props)==null?void 0:O.element))return(U=T.props)==null?void 0:U.element}const E=d(()=>new Set,(T,R)=>{const O=(0,g.getComponentData)(R,"core.plugin");O&&T.add(O)});var i=e(88934);function S(T){var U;const R=(U=T.props)==null?void 0:U.element;let O=(0,g.getComponentData)(T,"core.mountPoint");return!O&&(0,r.isValidElement)(R)&&(O=(0,g.getComponentData)(R,"core.mountPoint")),O}const b=d(()=>new Map,(T,R,O,U)=>{var ue,ge;let G=U;if((O==null?void 0:O.props.element)===R)return G;if((0,g.getComponentData)(R,"core.gatherMountPoints")){const Oe=(ue=R.props)==null?void 0:ue.path;if(!Oe)throw new Error("Mount point gatherer must have a path");G=Oe}const ne=S(R);if(ne){let Oe=(ge=R.props)==null?void 0:ge.path;if(G&&(Oe?G=void 0:Oe=G),!Oe)throw new Error("Mounted routable extension must have a path");T.set(ne,Oe)}return G}),P=d(()=>new Map,(T,R,O,U)=>{var ue;if((O==null?void 0:O.props.element)===R)return U;let G=U;const ne=S(R);return ne&&(U&&"sticky"in U?(T.set(ne,U.sticky),((ue=R.props)==null?void 0:ue.path)?G=ne:G=U):(T.set(ne,U),G=ne)),(0,g.getComponentData)(R,"core.gatherMountPoints")?{sticky:G}:G}),j={caseSensitive:!1,path:"/*",element:"match-all",routeRefs:new Set},F=d(()=>Array(),(T,R,O,U)=>{var We,nt,Ie;const G=(We=U==null?void 0:U.children)!=null?We:T;if((O==null?void 0:O.props.element)===R)return U;const ne=(nt=R.props)==null?void 0:nt.path,ue=Boolean((Ie=R.props)==null?void 0:Ie.caseSensitive),ge=S(R);if(ge){if(ne){const pe={caseSensitive:ue,path:ne,element:"mounted",routeRefs:new Set([ge]),children:[j],plugin:(0,g.getComponentData)(R.props.element,"core.plugin")};return G.push(pe),pe}U==null||U.routeRefs.add(ge)}if((0,g.getComponentData)(R,"core.gatherMountPoints")){if(!ne)throw new Error("Mount point gatherer must have a path");const pe={caseSensitive:ue,path:ne,element:"gathered",routeRefs:new Set,children:[j],plugin:U==null?void 0:U.plugin};return G.push(pe),pe}return U}),B=d(()=>new Set,(T,R)=>{if(R.type===i.L){const O=R.props;T.add("with"in O?O.with:O.without)}});var N=e(76241);const D=(0,N.uW)("route-ref-type",()=>Symbol("route-ref-type"));function X(T){return T[D]==="absolute"}function V(T){return T[D]==="sub"}function ce(T){return T[D]==="external"}function Se(...T){const R=T.join("/").replace(/\/\/+/g,"/");return R!=="/"&&R.endsWith("/")?R.slice(0,-1):R}function we(T,R,O){let U,G="";if(X(T))U=T;else if(V(T))U=T.parent,G=T.path;else if(ce(T)){const ge=O.get(T);if(!ge)return[void 0,""];if(X(ge))U=ge;else if(V(ge))U=ge.parent,G=ge.path;else throw new Error(`ExternalRouteRef was bound to invalid target, ${ge}`)}else throw T[D]?new Error(`Unknown or invalid route ref type, ${T[D]}`):new Error(`Unknown object passed to useRouteRef, got ${T}`);if(!U)return[void 0,""];const ne=R.get(U);if(!ne)return[void 0,""];const ue=Se(ne,G);return[U,ue]}function he(T,R,O,U,G){var nt;const ne=(nt=(0,t.fp)(G,R))!=null?nt:[],ue=Array();let ge=-1;for(let Ie=T;Ie&&(ge=ne.findIndex(pe=>pe.route.routeRefs.has(Ie)),ge===-1);Ie=U.get(Ie))ue.unshift(Ie);ue.length===0&&(ge-=1);const Oe=ge===-1?"":ne[ge].pathname,We=Se(...ue.slice(0,-1).map(Ie=>{const pe=O.get(Ie);if(!pe)throw new Error(`No path for ${Ie}`);if(pe.includes(":"))throw new Error(`Cannot route to ${T} with parent ${Ie} as it has parameters`);return pe}));return Oe+We}class Ge{constructor(R,O,U,G,ne){this.routePaths=R,this.routeParents=O,this.routeObjects=U,this.routeBindings=G,this.appBasePath=ne}resolve(R,O){const[U,G]=we(R,this.routePaths,this.routeBindings);if(!U)return;let ne;typeof O=="string"?ne=this.trimPath(O):O.pathname?ne={...O,pathname:this.trimPath(O.pathname)}:ne=O;const ue=this.appBasePath+he(U,ne,this.routePaths,this.routeParents,this.routeObjects);return(...[Oe])=>ue+(0,t.Gn)(G,Oe)}trimPath(R){return R&&(R.startsWith(this.appBasePath)?R.slice(this.appBasePath.length):R)}}const Le=(0,N.CT)("routing-context"),Je=({routePaths:T,routeParents:R,routeObjects:O,routeBindings:U,basePath:G="",children:ne})=>{const ue=new Ge(T,R,O,U,G),ge=(0,N.EI)({1:ue});return r.createElement(Le.Provider,{value:ge},ne)},ot=(T,R)=>{var O,U;try{const G=(0,t.fp)(R,{pathname:T}),ne=(O=G==null?void 0:G.filter(ge=>{var Oe;return((Oe=ge==null?void 0:ge.route.routeRefs)==null?void 0:Oe.size)>0}).pop())==null?void 0:O.route;if(!ne)return{};let ue;return ne.routeRefs.size===1&&(ue=ne.routeRefs.values().next().value),{extension:"App",pluginId:((U=ne.plugin)==null?void 0:U.getId())||"root",...ue?{routeRef:ue.id}:{}}}catch{return{}}},_e=({pathname:T,search:R,hash:O})=>{const U=(0,g.useAnalytics)();return(0,r.useEffect)(()=>{U.captureEvent("navigate",`${T}${R}${O}`)},[U,T,R,O]),null},mt=({tree:T})=>{const{pathname:R,search:O,hash:U}=(0,t.TH)(),{routeObjects:G}=(0,r.useMemo)(()=>c({root:T,discoverers:[y,m],collectors:{routeObjects:F}}),[T]);return r.createElement(g.AnalyticsContext,{attributes:ot(R,G)},r.createElement(_e,{pathname:R,search:O,hash:U}))};function dt(T,R){const O=new Set(R.values());O.delete(void 0);for(const U of R.keys()){if(O.has(U))continue;let G=U,ne="";for(;G;){const ge=T.get(G);if(!ge)throw new Error(`No path for ${G}`);ne=`${ge}${ne}`,G=R.get(G)}const ue=ne.match(/:(\w+)/g);if(ue){for(let ge=0;ge<ue.length;ge++)for(let Oe=ge+1;Oe<ue.length;Oe++)if(ue[Oe]===ue[ge])throw new Error(`Parameter ${ue[Oe]} is duplicated in path ${ne}`)}}}const ct=(0,N.CT)("app-context"),Et=({appContext:T,children:R})=>{const O=(0,N.EI)({1:T});return r.createElement(ct.Provider,{value:O,children:R})};function vt(T){return new Error(`Tried to access IdentityApi ${T} before app was loaded`)}class It{constructor(){q(this,"target")}setTarget(R){this.target=R}getUserId(){if(!this.target)throw vt("getUserId");return this.target.getUserId()}getProfile(){if(!this.target)throw vt("getProfile");return this.target.getProfile()}async getProfileInfo(){if(!this.target)throw vt("getProfileInfo");return this.target.getProfileInfo()}async getBackstageIdentity(){if(!this.target)throw vt("getBackstageIdentity");return this.target.getBackstageIdentity()}async getCredentials(){if(!this.target)throw vt("getCredentials");return this.target.getCredentials()}async getIdToken(){if(!this.target)throw vt("getIdToken");return this.target.getIdToken()}async signOut(){if(!this.target)throw vt("signOut");await this.target.signOut(),location.reload()}}var At=e(72164);function ht(T,R,O){if(T!==void 0){const G=O.find(ne=>ne.id===T);if(G)return G}if(R){const G=O.find(ne=>ne.variant==="dark");if(G)return G}const U=O.find(G=>G.variant==="light");return U||O[0]}const Ut=()=>{const T=(0,r.useMemo)(()=>window.matchMedia("(prefers-color-scheme: dark)"),[]),[R,O]=(0,r.useState)(T.matches);return(0,r.useEffect)(()=>{const U=G=>{O(G.matches)};return T.addListener(U),()=>{T.removeListener(U)}},[T]),R};function Nt({children:T}){const R=(0,g.useApi)(g.appThemeApiRef),O=(0,At.Z)(R.activeThemeId$(),R.getActiveThemeId()),U=Boolean(window.matchMedia)?Ut():!1,G=ht(O,U,R.getInstalledThemes());if(!G)throw new Error("App has no themes");return r.createElement(G.Provider,{children:T})}const Dt=async(T="__APP_INJECTED_RUNTIME_CONFIG__")=>{const R=[{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(!R)throw new Error("No static configuration provided");if(!Array.isArray(R))throw new Error("Static configuration has invalid format");const O=R.slice();if(T!=="__app_injected_runtime_config__".toLocaleUpperCase("en-US"))try{const G=JSON.parse(T);Array.isArray(G)?O.push(...G):O.push({data:G,context:"env"})}catch(G){throw new Error(`Failed to load runtime configuration, ${G}`)}const U=window.__APP_CONFIG__;return U&&O.push({context:"window",data:U}),O};class Lt{constructor(){q(this,"apis",[])}add(R,O){return this.apis.push([R.id,O]),O}build(){return new st(new Map(this.apis))}}class st{static builder(){return new Lt}static from(R){return new st(new Map(R.map(([O,U])=>[O.id,U])))}static with(R,O){return new st(new Map([[R.id,O]]))}constructor(R){this.apis=R}with(R,O){return new st(new Map([...this.apis,[R.id,O]]))}get(R){return this.apis.get(R.id)}}function Rt(T){const R=new Map;return T&&T({bind:(U,G)=>{for(const[ne,ue]of Object.entries(G)){const ge=U[ne];if(!ge)throw new Error(`Key ${ne} is not an existing external route`);if(!ue&&!ge.optional)throw new Error(`External route ${ne} is required but was undefined`);ue&&R.set(ge,ue)}}}),R}function Zt(T){var O;let{pathname:R}=new URL((O=T.getOptionalString("app.baseUrl"))!=null?O:"/","http://dummy.dev");return R=R.replace(/\/*$/,""),R}function De(T,R,O){var Oe;const U=Boolean(T),G=(0,l.default)(T||(()=>Promise.resolve([])));let ne;if(U&&G.loading){const{Progress:We}=R;ne=r.createElement(We,null)}else if(G.error){const{BootErrorPage:We}=R;ne=r.createElement(We,{step:"load-config",error:G.error})}const{ThemeProvider:ue=Nt}=R;return ne?{node:r.createElement(u.ApiProvider,{apis:st.with(g.appThemeApiRef,O)},r.createElement(ue,null,ne))}:{api:u.ConfigReader.fromConfigs((Oe=G.value)!=null?Oe:[])}}class it{constructor(R){this.app=R}getPlugins(){return this.app.getPlugins()}getSystemIcon(R){return this.app.getSystemIcon(R)}getComponents(){return this.app.getComponents()}}class lt{constructor(R){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 It);q(this,"apiFactoryRegistry");var O,U,G,ne;this.apis=(O=R.apis)!=null?O:[],this.icons=R.icons,this.plugins=new Set((U=R.plugins)!=null?U:[]),this.components=R.components,this.themes=R.themes,this.configLoader=(G=R.configLoader)!=null?G:Dt,this.defaultApis=(ne=R.defaultApis)!=null?ne:[],this.bindRoutes=R.bindRoutes,this.apiFactoryRegistry=new s.pv}getPlugins(){return Array.from(this.plugins)}getSystemIcon(R){return this.icons[R]}getComponents(){return this.components}getProvider(){const R=new it(this);return({children:U})=>{const G=(0,r.useMemo)(()=>u.AppThemeSelector.createWithStorage(this.themes),[]),{routePaths:ne,routeParents:ue,routeObjects:ge,featureFlags:Oe}=(0,r.useMemo)(()=>{const pe=c({root:U,discoverers:[y,m],collectors:{routePaths:b,routeParents:P,routeObjects:F,collectedPlugins:E,featureFlags:B}});return dt(pe.routePaths,pe.routeParents),pe.collectedPlugins.forEach(He=>this.plugins.add(He)),this.verifyPlugins(this.plugins),this.getApiHolder(),pe},[U]),We=De(this.configLoader,this.components,G),nt="api"in We;if(nt){const{api:pe}=We;this.configApi=pe}if((0,r.useEffect)(()=>{if(nt){const pe=this.getApiHolder().get(g.featureFlagsApiRef);for(const He of this.plugins.values())if("getFeatureFlags"in He)for(const de of He.getFeatureFlags())pe.registerFlag({name:de.name,pluginId:He.getId()});else for(const de of He.output())de.type==="feature-flag"&&pe.registerFlag({name:de.name,pluginId:He.getId()});for(const He of Oe)pe.registerFlag({name:He,pluginId:""})}},[nt,We,Oe]),"node"in We)return We.node;const{ThemeProvider:Ie=Nt}=this.components;return r.createElement(u.ApiProvider,{apis:this.getApiHolder()},r.createElement(Et,{appContext:R},r.createElement(Ie,null,r.createElement(Je,{routePaths:ne,routeParents:ue,routeObjects:ge,routeBindings:Rt(this.bindRoutes),basePath:Zt(We.api)},U))))}}getRouter(){const{Router:R,SignInPage:O}=this.components,U=({component:ne,children:ue})=>{const[ge,Oe]=(0,r.useState)();return ge?(this.appIdentityProxy.setTarget(ge),ue):r.createElement(ne,{onSignInSuccess:Oe})};return({children:ne})=>{const ue=(0,g.useApi)(g.configApiRef),ge=`${Zt(ue)}/*`;return O?r.createElement(R,null,r.createElement(mt,{tree:ne}),r.createElement(U,{component:O},r.createElement(t.Z5,null,r.createElement(t.AW,{path:ge,element:r.createElement(r.Fragment,null,ne)})))):(this.appIdentityProxy.setTarget({getUserId:()=>"guest",getIdToken:async()=>{},getProfile:()=>({email:"guest@example.com",displayName:"Guest"}),getProfileInfo:async()=>({email:"guest@example.com",displayName:"Guest"}),getBackstageIdentity:async()=>({type:"user",userEntityRef:"user:default/guest",ownershipEntityRefs:["user:default/guest"]}),getCredentials:async()=>({}),signOut:async()=>{}}),r.createElement(R,null,r.createElement(mt,{tree:ne}),r.createElement(t.Z5,null,r.createElement(t.AW,{path:ge,element:r.createElement(r.Fragment,null,ne)}))))}}getApiHolder(){if(this.apiHolder){for(const R of this.plugins)for(const O of R.getApis())this.apiFactoryRegistry.get(O.api)||this.apiFactoryRegistry.register("default",O);return s.MM.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder}this.apiFactoryRegistry.register("static",{api:g.appThemeApiRef,deps:{},factory:()=>u.AppThemeSelector.createWithStorage(this.themes)}),this.apiFactoryRegistry.register("static",{api:g.configApiRef,deps:{},factory:()=>{if(!this.configApi)throw new Error("Tried to access config API before config was loaded");return this.configApi}}),this.apiFactoryRegistry.register("static",{api:g.identityApiRef,deps:{},factory:()=>this.appIdentityProxy}),this.apiFactoryRegistry.register("default",{api:g.featureFlagsApiRef,deps:{},factory:()=>new u.LocalStorageFeatureFlags});for(const R of this.defaultApis)this.apiFactoryRegistry.register("default",R);for(const R of this.plugins)for(const O of R.getApis())if(!this.apiFactoryRegistry.register("default",O))throw new Error(`Plugin ${R.getId()} tried to register duplicate or forbidden API factory for ${O.api}`);for(const R of this.apis)if(!this.apiFactoryRegistry.register("app",R))throw new Error(`Duplicate or forbidden API factory for ${R.api} in app`);return s.MM.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder=new s.MM(this.apiFactoryRegistry),this.apiHolder}verifyPlugins(R){const O=new Set;for(const U of R){const G=U.getId();if(O.has(G))throw new Error(`Duplicate plugin found '${G}'`);O.add(G)}}}function se(T){return new lt(T)}},44056:function(Q,o,e){"use strict";e.d(o,{b:function(){return r.b}});var r=e(21998),t=e(73495),l=e.n(t);e.o(t,"AtlassianAuth")&&e.d(o,{AtlassianAuth:function(){return t.AtlassianAuth}}),e.o(t,"Auth0Auth")&&e.d(o,{Auth0Auth:function(){return t.Auth0Auth}}),e.o(t,"BitbucketAuth")&&e.d(o,{BitbucketAuth:function(){return t.BitbucketAuth}}),e.o(t,"FlatRoutes")&&e.d(o,{FlatRoutes:function(){return t.FlatRoutes}}),e.o(t,"GithubAuth")&&e.d(o,{GithubAuth:function(){return t.GithubAuth}}),e.o(t,"GitlabAuth")&&e.d(o,{GitlabAuth:function(){return t.GitlabAuth}}),e.o(t,"GoogleAuth")&&e.d(o,{GoogleAuth:function(){return t.GoogleAuth}}),e.o(t,"MicrosoftAuth")&&e.d(o,{MicrosoftAuth:function(){return t.MicrosoftAuth}}),e.o(t,"OAuth2")&&e.d(o,{OAuth2:function(){return t.OAuth2}}),e.o(t,"OktaAuth")&&e.d(o,{OktaAuth:function(){return t.OktaAuth}}),e.o(t,"OneLoginAuth")&&e.d(o,{OneLoginAuth:function(){return t.OneLoginAuth}}),e.o(t,"SamlAuth")&&e.d(o,{SamlAuth:function(){return t.SamlAuth}})},73495:function(){},49208:function(Q,o,e){"use strict";e.d(o,{AlertApiForwarder:function(){return r.AlertApiForwarder},ErrorAlerter:function(){return r.ErrorAlerter},ErrorApiForwarder:function(){return r.ErrorApiForwarder},FetchMiddlewares:function(){return r.FetchMiddlewares},NoOpAnalyticsApi:function(){return r.NoOpAnalyticsApi},OAuthRequestManager:function(){return r.OAuthRequestManager},UnhandledErrorForwarder:function(){return r.UnhandledErrorForwarder},UrlPatternDiscovery:function(){return r.UrlPatternDiscovery},WebStorage:function(){return r.WebStorage},createFetchApi:function(){return r.createFetchApi},createSpecializedApp:function(){return t.b},FlatRoutes:function(){return l.w}});var r=e(56494);e.o(r,"AtlassianAuth")&&e.d(o,{AtlassianAuth:function(){return r.AtlassianAuth}}),e.o(r,"Auth0Auth")&&e.d(o,{Auth0Auth:function(){return r.Auth0Auth}}),e.o(r,"BitbucketAuth")&&e.d(o,{BitbucketAuth:function(){return r.BitbucketAuth}}),e.o(r,"FlatRoutes")&&e.d(o,{FlatRoutes:function(){return r.FlatRoutes}}),e.o(r,"GithubAuth")&&e.d(o,{GithubAuth:function(){return r.GithubAuth}}),e.o(r,"GitlabAuth")&&e.d(o,{GitlabAuth:function(){return r.GitlabAuth}}),e.o(r,"GoogleAuth")&&e.d(o,{GoogleAuth:function(){return r.GoogleAuth}}),e.o(r,"MicrosoftAuth")&&e.d(o,{MicrosoftAuth:function(){return r.MicrosoftAuth}}),e.o(r,"OAuth2")&&e.d(o,{OAuth2:function(){return r.OAuth2}}),e.o(r,"OktaAuth")&&e.d(o,{OktaAuth:function(){return r.OktaAuth}}),e.o(r,"OneLoginAuth")&&e.d(o,{OneLoginAuth:function(){return r.OneLoginAuth}}),e.o(r,"SamlAuth")&&e.d(o,{SamlAuth:function(){return r.SamlAuth}}),e.o(r,"createSpecializedApp")&&e.d(o,{createSpecializedApp:function(){return r.createSpecializedApp}});var t=e(44056);e.o(t,"AtlassianAuth")&&e.d(o,{AtlassianAuth:function(){return t.AtlassianAuth}}),e.o(t,"Auth0Auth")&&e.d(o,{Auth0Auth:function(){return t.Auth0Auth}}),e.o(t,"BitbucketAuth")&&e.d(o,{BitbucketAuth:function(){return t.BitbucketAuth}}),e.o(t,"FlatRoutes")&&e.d(o,{FlatRoutes:function(){return t.FlatRoutes}}),e.o(t,"GithubAuth")&&e.d(o,{GithubAuth:function(){return t.GithubAuth}}),e.o(t,"GitlabAuth")&&e.d(o,{GitlabAuth:function(){return t.GitlabAuth}}),e.o(t,"GoogleAuth")&&e.d(o,{GoogleAuth:function(){return t.GoogleAuth}}),e.o(t,"MicrosoftAuth")&&e.d(o,{MicrosoftAuth:function(){return t.MicrosoftAuth}}),e.o(t,"OAuth2")&&e.d(o,{OAuth2:function(){return t.OAuth2}}),e.o(t,"OktaAuth")&&e.d(o,{OktaAuth:function(){return t.OktaAuth}}),e.o(t,"OneLoginAuth")&&e.d(o,{OneLoginAuth:function(){return t.OneLoginAuth}}),e.o(t,"SamlAuth")&&e.d(o,{SamlAuth:function(){return t.SamlAuth}});var l=e(63938)},96176:function(Q,o,e){"use strict";e.d(o,{y:function(){return l}});var r=e(17678);function t(u){return[...u].join(" ")}class l{constructor(g){q(this,"discoveryApi");q(this,"environment");q(this,"provider");q(this,"joinScopesFunc");q(this,"authRequester");q(this,"sessionTransform");const{discoveryApi:s,environment:c,provider:d,joinScopes:y=t,oauthRequestApi:m,sessionTransform:E=i=>i}=g;this.authRequester=m.createAuthRequester({provider:d,onAuthRequest:i=>this.showPopup(i)}),this.discoveryApi=s,this.environment=c,this.provider=d,this.joinScopesFunc=y,this.sessionTransform=E}async createSession(g){return g.instantPopup?this.showPopup(g.scopes):this.authRequester(g.scopes)}async refreshSession(){const g=await fetch(await this.buildUrl("/refresh",{optional:!0}),{headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(c=>{throw new Error(`Auth refresh request failed, ${c}`)});if(!g.ok){const c=new Error(`Auth refresh request failed, ${g.statusText}`);throw c.status=g.status,c}const s=await g.json();if(s.error){const c=new Error(s.error.message);throw s.error.name&&(c.name=s.error.name),c}return await this.sessionTransform(s)}async removeSession(){const g=await fetch(await this.buildUrl("/logout"),{method:"POST",headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(s=>{throw new Error(`Logout request failed, ${s}`)});if(!g.ok){const s=new Error(`Logout request failed, ${g.statusText}`);throw s.status=g.status,s}}async showPopup(g){const s=this.joinScopesFunc(g),c=await this.buildUrl("/start",{scope:s,origin:location.origin}),d=await(0,r.d)({url:c,name:`${this.provider.title} Login`,origin:new URL(c).origin,width:450,height:730});return await this.sessionTransform(d)}async buildUrl(g,s){const c=await this.discoveryApi.getBaseUrl("auth"),d=this.buildQueryString({...s,env:this.environment});return`${c}/${this.provider.id}${g}${d}`}buildQueryString(g){if(!g)return"";const s=Object.entries(g).map(([c,d])=>{if(typeof d=="string")return`${encodeURIComponent(c)}=${encodeURIComponent(d)}`;if(d)return encodeURIComponent(c)}).filter(Boolean).join("&");return s?`?${s}`:""}}},91405:function(Q,o,e){"use strict";e.d(o,{l:function(){return l}});var r=e(98005),t=e(36964);class l{constructor(){q(this,"subject",new r.X(t.SessionState.SignedOut));q(this,"signedIn",!1)}setIsSignedIn(g){this.signedIn!==g&&(this.signedIn=g,this.subject.next(this.signedIn?t.SessionState.SignedIn:t.SessionState.SignedOut))}sessionState$(){return this.subject}}},54842:function(Q,o,e){"use strict";e.d(o,{Hc:function(){return s},q2:function(){return u},k1:function(){return g}});function r(c,d){for(const y of d)if(!c.has(y))return!1;return!0}class t{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=e(91405);class u{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 t({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 g{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 t({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 t({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(Q,o,e){"use strict";e.d(o,{d:function(){return r}});function r(t){return new Promise((l,u)=>{const g=t.width||500,s=t.height||700,c=window.screen.width/2-g/2,d=window.screen.height/2-s/2,y=window.open(t.url,t.name,`menubar=no,location=no,resizable=no,scrollbars=no,status=no,width=${g},height=${s},top=${d},left=${c}`);let m="";if(!y||typeof y.closed=="undefined"||y.closed){const b=new Error("Failed to open auth popup.");b.name="PopupRejectedError",u(b);return}const E=b=>{if(b.source!==y||b.origin!==t.origin)return;const{data:P}=b;if(P.type==="config_info"){m=P.targetOrigin;return}if(P.type!=="authorization_response")return;const j=P;if("error"in j){const F=new Error(j.error.message);F.name=j.error.name,u(F)}else l(j.response);S()},i=setInterval(()=>{if(y.closed){const b=`Login failed, ${m&&m!==window.location.origin?`Incorrect app origin, expected ${m}`:"popup was closed"}`,P=new Error(b);P.name="PopupClosedError",u(P),S()}},100);function S(){window.removeEventListener("message",E),clearInterval(i)}window.addEventListener("message",E)})}},98005:function(Q,o,e){"use strict";e.d(o,{J:function(){return l},X:function(){return u}});var r=e(82394),t=e.n(r);class l{constructor(){q(this,"isClosed",!1);q(this,"terminatingError");q(this,"observable",new(t())(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(c=>c.next(s))}error(s){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.terminatingError=s,this.subscribers.forEach(c=>c.error(s))}complete(){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.subscribers.forEach(s=>s.complete())}subscribe(s,c,d){const y=typeof s=="function"?{next:s,error:c,complete:d}:s;return this.observable.subscribe(y)}}class u{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(t())(c=>this.isClosed?(this.terminatingError?c.error(this.terminatingError):c.complete(),()=>{}):(c.next(this.currentValue),this.subscribers.add(c),()=>{this.subscribers.delete(c)}))}[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(c=>c.next(s))}error(s){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.terminatingError=s,this.subscribers.forEach(c=>c.error(s))}complete(){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.subscribers.forEach(s=>s.complete())}subscribe(s,c,d){const y=typeof s=="function"?{next:s,error:c,complete:d}:s;return this.observable.subscribe(y)}}},88934:function(Q,o,e){"use strict";e.d(o,{L:function(){return l}});var r=e(36964),t=e(2784);const l=u=>{const{children:g}=u,s=(0,r.useApi)(r.featureFlagsApiRef),c="with"in u?s.isActive(u.with):!s.isActive(u.without);return t.createElement(t.Fragment,null,c?g:null)};(0,r.attachComponentData)(l,"core.featureFlagged",!0)},63938:function(Q,o,e){"use strict";e.d(o,{w:function(){return u}});var r=e(2784),t=e(10289),l=e(36964);const u=s=>{const c=(0,l.useApp)(),{NotFoundErrorPage:d}=c.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,t.V$)(y)};var g=e(88934)},41682:function(Q,o,e){"use strict";e.d(o,{Button:function(){return F},CodeSnippet:function(){return Ge},Content:function(){return Ma},ContentHeader:function(){return fs},CreateButton:function(){return ot},DependencyGraph:function(){return pe},DependencyGraphTypes:function(){return r},EmptyState:function(){return K},ErrorPage:function(){return ys},ErrorPanel:function(){return wt},Header:function(){return ja},HeaderIconLinkRow:function(){return cr},HeaderLabel:function(){return Ls},HeaderTabs:function(){return Na},InfoCard:function(){return Ze},ItemCardGrid:function(){return Ms},ItemCardHeader:function(){return Fs},Link:function(){return P},LogViewer:function(){return Pr},MissingAnnotationEmptyState:function(){return me},OverflowTooltip:function(){return hr},Page:function(){return Ga},PageWithHeader:function(){return $s},Progress:function(){return Mr},ResponseErrorPanel:function(){return Vt},RoutedTabs:function(){return Ua},Select:function(){return Ur},Sidebar:function(){return Hs},SidebarContext:function(){return Er},SidebarDivider:function(){return ks},SidebarItem:function(){return _a},SidebarPage:function(){return ws},SidebarPinStateContext:function(){return ma},SubvalueCell:function(){return Uo},SupportButton:function(){return Oo},Table:function(){return rs},WarningPanel:function(){return Pn},sidebarConfig:function(){return cn},useQueryParamState:function(){return Ro}});var r={};e.r(r),e.d(r,{Nm:function(){return _e},ht:function(){return ct},LJ:function(){return dt}});var t=e(2784),l=e(36964),u=e(19928);function g(n){const[a,f]=useState([]),h=useApi(alertApiRef);if(useEffect(()=>{const x=h.alert$().subscribe(W=>f(Y=>Y.concat(W)));return()=>{x.unsubscribe()}},[h]),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=e(79692),c=e(12420);const d=(0,s.Z)(n=>(0,c.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:h}=n,p=d();return React.createElement(MaterialAvatar,{alt:a,src:f,className:p.avatar,style:{backgroundColor:stringToColor(a||f||""),...h}},a&&extractInitials(a))}var m=e(77277),E=e(86689),i=e(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):""},P=t.forwardRef(({onClick:n,...a},f)=>{const h=(0,l.useAnalytics)(),p=String(a.to),C=b(a.children)||p,x=S(p),W=x&&!!/^https?:/.exec(p),Y=z=>{n==null||n(z),h.captureEvent("click",C,{attributes:{to:p}})};return x?t.createElement(E.Z,{ref:f,href:p,onClick:Y,...W?{target:"_blank",rel:"noopener"}:{},...a}):t.createElement(E.Z,{ref:f,component:i.rU,onClick:Y,...a})}),j=t.forwardRef((n,a)=>t.createElement(P,{ref:a,...n,color:"initial"})),F=t.forwardRef((n,a)=>t.createElement(m.Z,{ref:a,component:j,...n}));var B=e(60364),N=e(61837),D=e(80030),X=e(19353),V=e(95074);function ce(n){const{text:a,tooltipDelay:f=1e3,tooltipText:h="Text copied to clipboard"}=n,p=(0,l.useApi)(l.errorApiRef),[C,x]=(0,t.useState)(!1),[{error:W},Y]=(0,V.Z)();(0,t.useEffect)(()=>{W&&p.post(W)},[W,p]);const z=ae=>{ae.stopPropagation(),x(!0),Y(a)};return t.createElement(t.Fragment,null,t.createElement(D.ZP,{id:"copy-test-tooltip",title:h,placement:"top",leaveDelay:f,onClose:()=>x(!1),open:C},t.createElement(N.Z,{onClick:z},t.createElement(X.Z,null))))}var Se=e(96259),we=e(397),he=e(74943);function Ge(n){const{text:a,language:f,showLineNumbers:h=!1,highlightedNumbers:p,customStyle:C,showCopyCodeButton:x=!1}=n,W=(0,B.Z)(),Y=W.palette.type==="dark"?we.Z:he.Z,z=W.palette.type==="dark"?"#256bf3":"#e6ffed";return t.createElement("div",{style:{position:"relative"}},t.createElement(Se.Z,{customStyle:C,language:f,style:Y,showLineNumbers:h,wrapLines:!0,lineNumberStyle:{color:W.palette.textVerySubtle},lineProps:ae=>(p==null?void 0:p.includes(ae))?{style:{backgroundColor:z}}:{}},a),x&&t.createElement("div",{style:{position:"absolute",top:0,right:0}},t.createElement(ce,{text:a})))}var Le=e(41156),Je=e(88188);function ot(n){const{title:a,to:f}=n,h=(0,Le.Z)(p=>p.breakpoints.down("xs"));return f?h?t.createElement(N.Z,{component:i.rU,color:"primary",title:a,size:"small",to:f},t.createElement(Je.Z,null)):t.createElement(m.Z,{component:i.rU,variant:"contained",color:"primary",to:f},a):null}var _e;(function(n){const a="TB";n.TOP_BOTTOM=a;const f="BT";n.BOTTOM_TOP=f;const h="LR";n.LEFT_RIGHT=h;const p="RL";n.RIGHT_LEFT=p})(_e||(_e={}));var mt;(function(n){const a="UL";n.UP_LEFT=a;const f="UR";n.UP_RIGHT=f;const h="DL";n.DOWN_LEFT=h;const p="DR";n.DOWN_RIGHT=p})(mt||(mt={}));var dt;(function(n){const a="network-simplex";n.NETWORK_SIMPLEX=a;const f="tight-tree";n.TIGHT_TREE=f;const h="longest-path";n.LONGEST_PATH=h})(dt||(dt={}));var ct;(function(n){const a="l";n.LEFT=a;const f="r";n.RIGHT=f;const h="c";n.CENTER=h})(ct||(ct={}));var Et=e(13387),vt=e(11105),It=e(97963),At=e(46506),ht=e.n(At),Ut=e(54073),Nt=e.n(Ut),Dt=e(10368);const Lt=(0,s.Z)(n=>({node:{fill:n.palette.primary.light,stroke:n.palette.primary.light},text:{fill:n.palette.primary.contrastText}}),{name:"BackstageDependencyGraphDefaultNode"});function st({node:{id:n}}){const a=Lt(),[f,h]=t.useState(0),[p,C]=t.useState(0),x=t.useRef(null);t.useLayoutEffect(()=>{if(x.current){let{height:ae,width:oe}=x.current.getBBox();ae=Math.round(ae),oe=Math.round(oe),(ae!==p||oe!==f)&&(h(oe),C(ae))}},[f,p]);const W=10,Y=f+W*2,z=p+W*2;return t.createElement("g",null,t.createElement("rect",{className:a.node,width:Y,height:z,rx:10}),t.createElement("text",{ref:x,className:a.text,y:z/2,x:Y/2,textAnchor:"middle",alignmentBaseline:"middle"},n))}const Rt="arrow-marker",Zt="node",De="edge",it="label",lt=(0,Dt.Z)(n=>({node:{transition:`${n.transitions.duration.shortest}ms`}}),{name:"BackstageDependencyGraphNode"}),se=n=>t.createElement(st,{...n});function T({render:n=se,setNode:a,node:f}){const{width:h,height:p,x:C=0,y:x=0}=f,W=f,Y=lt(),z=t.useRef(null);return t.useLayoutEffect(()=>{if(z.current){let{height:ae,width:oe}=z.current.getBBox();ae=Math.round(ae),oe=Math.round(oe),(ae!==p||oe!==h)&&a(f.id,{...f,height:ae,width:oe})}},[f,h,p,a]),t.createElement("g",{ref:z,"data-testid":Zt,className:Y.node,transform:`translate(${C-h/2},${x-p/2})`},n({node:W}))}var R=e(55876),O=e(66481),U=e(19574),G=e.n(U);const ne=(0,Dt.Z)(n=>({text:{fill:n.palette.textContrast}}),{name:"BackstageDependencyGraphDefaultLabel"});function ue({edge:{label:n}}){const a=ne();return t.createElement("text",{className:a.text,textAnchor:"middle"},n)}const ge=(0,Dt.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"}),Oe=n=>t.createElement(ue,{...n}),We=R.Z().x(n=>n.x).y(n=>n.y).curve(O.Z);function nt({render:n=Oe,setEdge:a,id:f,edge:h}){const{x:p=0,y:C=0,width:x,height:W,points:Y}=h,z=h,ae=ge(),oe=t.useRef(null);t.useLayoutEffect(()=>{if(oe.current){let{height:Re,width:Pe}=oe.current.getBBox();Re=Math.round(Re),Pe=Math.round(Pe),(Re!==W||Pe!==x)&&a(f,{...h,height:Re,width:Pe})}},[h,W,x,a,f]);let ve="";if(Y){const Re=Y.filter(Pe=>G()(Pe.x)&&G()(Pe.y));ve=We(Re)||""}return t.createElement(t.Fragment,null,ve&&t.createElement("path",{"data-testid":De,className:ae.path,markerEnd:`url(#${Rt})`,d:ve}),z.label?t.createElement("g",{ref:oe,"data-testid":it,className:ae.label,transform:`translate(${p},${C})`},n({edge:z})):null)}const Ie="workspace";function pe(n){var nr,so;const{edges:a,nodes:f,renderNode:h,direction:p=_e.TOP_BOTTOM,align:C,nodeMargin:x=50,edgeMargin:W=10,rankMargin:Y=50,paddingX:z=0,paddingY:ae=0,acyclicer:oe,ranker:ve=dt.NETWORK_SIMPLEX,labelPosition:Re=ct.RIGHT,labelOffset:Pe=10,edgeRanks:ut=1,edgeWeight:tn=1,renderLabel:qt,defs:Ht,zoom:Qe="enabled",...Ft}=n,Pt=(0,It.Z)(),[_t,Gn]=t.useState(100),[fn,Vr]=t.useState(100),Bt=t.useRef(new(ht()).graphlib.Graph),[Nn,Ea]=t.useState(((nr=Bt.current.graph())==null?void 0:nr.width)||0),[Kn,Aa]=t.useState(((so=Bt.current.graph())==null?void 0:so.height)||0),[Gr,Kr]=t.useState([]),[va,nn]=t.useState([]),mn=Math.max(Nn,_t),yn=Math.max(Kn,fn),Jn=t.useMemo(()=>Nt()(jt=>{if(!jt)return;const rn=vt.Z(jt),zt=vt.Z(jt.getElementById(Ie));function Sn(){rn.call(Et.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)),zt.attr("transform",Fn.transform)}))}Qe==="enabled"?Sn():Qe==="enable-on-click"&&rn.on("click",()=>Sn());const{width:Cn,height:Jr}=jt.getBoundingClientRect();_t!==Cn&&Gn(Cn),fn!==Jr&&Vr(Jr)},100),[fn,_t,mn,yn,Qe]),Yt=t.useCallback(()=>{const jt=Bt.current.nodes(),rn=Bt.current.edges();jt.forEach(zt=>{f.some(Cn=>Cn.id===zt)||Bt.current.removeNode(zt)}),rn.forEach(zt=>{a.some(Cn=>Cn.from===zt.v&&Cn.to===zt.w)||Bt.current.removeEdge(zt.v,zt.w)}),f.forEach(zt=>{const Sn=Bt.current.nodes().find(Cn=>zt.id===Cn);if(Sn&&Bt.current.node(Sn)){const{width:Cn,height:Jr,x:Fn,y:Ai}=Bt.current.node(Sn);Bt.current.setNode(Sn,{...zt,width:Cn,height:Jr,x:Fn,y:Ai})}else Bt.current.setNode(zt.id,{...zt,width:0,height:0})}),a.forEach(zt=>{Bt.current.setEdge(zt.from,zt.to,{...zt,label:zt.label,width:0,height:0,labelpos:Re,labeloffset:Pe,weight:tn,minlen:ut})})},[a,f,Re,Pe,tn,ut]),Qt=t.useMemo(()=>Nt()(()=>{ht().layout(Bt.current);const{height:jt,width:rn}=Bt.current.graph(),zt=Math.max(0,jt||0),Sn=Math.max(0,rn||0);Ea(Sn),Aa(zt),Kr(Bt.current.nodes()),nn(Bt.current.edges())},250,{leading:!0}),[]);t.useEffect(()=>(Bt.current.setGraph({rankdir:p,align:C,nodesep:x,edgesep:W,ranksep:Y,marginx:z,marginy:ae,acyclicer:oe,ranker:ve}),Yt(),Qt(),Qt.cancel),[oe,C,p,W,z,ae,x,Y,ve,Yt,Qt]);function tr(jt,rn){return Bt.current.setNode(jt,rn),Qt(),Bt.current}function Yn(jt,rn){return Bt.current.setEdge(jt,rn),Qt(),Bt.current}return t.createElement("svg",{ref:Jn,...Ft,width:"100%",height:yn,viewBox:`0 0 ${mn} ${yn}`},t.createElement("defs",null,t.createElement("marker",{id:Rt,viewBox:"0 0 24 24",markerWidth:"14",markerHeight:"14",refX:"16",refY:"12",orient:"auto",markerUnits:"strokeWidth"},t.createElement("path",{fill:Pt.palette.textSubtle,d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})),Ht),t.createElement("g",{id:Ie},t.createElement("svg",{width:Nn,height:Kn,y:yn/2-Kn/2,x:mn/2-Nn/2,viewBox:`0 0 ${Nn} ${Kn}`},va.map(jt=>{const rn=Bt.current.edge(jt);return rn?t.createElement(nt,{key:`${jt.v}-${jt.w}`,id:jt,setEdge:Yn,render:qt,edge:rn}):null}),Gr.map(jt=>{const rn=Bt.current.node(jt);return rn?t.createElement(T,{key:jt,setNode:tr,render:h,node:rn}):null}))))}var He=e(72779),de=e.n(He);const Ce=(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"}),ze=n=>{var Re;const{variant:a,message:f,id:h,fixed:p=!1}=n,C=Ce(),W=useApi(storageApiRef).forBucket("notifications"),Y=(Re=W.get("dismissedBanners"))!=null?Re:[],[z,ae]=useState(new Set(Y)),oe=useObservable(W.observe$("dismissedBanners"));useEffect(()=>{var Pe;if(oe==null?void 0:oe.newValue){const ut=(Pe=oe==null?void 0:oe.newValue)!=null?Pe:[];ae(new Set(ut))}},[oe==null?void 0:oe.newValue]);const ve=()=>{W.set("dismissedBanners",[...z,h])};return React.createElement(Snackbar,{anchorOrigin:p?{vertical:"bottom",horizontal:"center"}:{vertical:"top",horizontal:"center"},open:!z.has(h),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:ve},React.createElement(Close,{className:C.icon}))]}))};var je=e(60905),Fe=e(90436),at=e(86284),Be=e(96465),Xe=e(19133),ke=e(3871);const J=(0,s.Z)({generalImg:{width:"95%",zIndex:2,position:"relative",left:"50%",top:"50%",transform:"translate(-50%, 15%)"}},{name:"BackstageEmptyStateImage"}),v=({missing:n})=>{const a=J();switch(n){case"field":return t.createElement("img",{src:at,className:a.generalImg,alt:"annotation is missing"});case"info":return t.createElement("img",{src:Be,alt:"no Information",className:a.generalImg});case"content":return t.createElement("img",{src:Xe,alt:"create Component",className:a.generalImg});case"data":return t.createElement("img",{src:ke,alt:"no Build",className:a.generalImg});default:return null}},I=(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 K(n){const{title:a,description:f,missing:h,action:p}=n,C=I();return t.createElement(je.Z,{container:!0,direction:"row",justifyContent:"space-around",alignItems:"flex-start",className:C.root,spacing:2},t.createElement(je.Z,{item:!0,xs:12,md:6},t.createElement(je.Z,{container:!0,direction:"column"},t.createElement(je.Z,{item:!0,xs:!0},t.createElement(Fe.Z,{variant:"h5"},a)),t.createElement(je.Z,{item:!0,xs:!0},t.createElement(Fe.Z,{variant:"body1"},f)),t.createElement(je.Z,{item:!0,xs:!0,className:C.action},p))),t.createElement(je.Z,{item:!0,xs:12,md:6,className:C.imageContainer},t.createElement(v,{missing:h})))}const ee=`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`,Ae=(0,s.Z)(n=>({code:{borderRadius:6,margin:`${n.spacing(2)}px 0px`,background:n.palette.type==="dark"?"#444":"#fff"}}),{name:"BackstageMissingAnnotationEmptyState"});function me(n){const{annotation:a}=n,f=Ae(),h=t.createElement(t.Fragment,null,"The ",t.createElement("code",null,a)," annotation is missing. You need to add the annotation to your component if you want to enable this tool.");return t.createElement(K,{missing:"field",title:"Missing Annotation",description:h,action:t.createElement(t.Fragment,null,t.createElement(Fe.Z,{variant:"body1"},"Add the annotation to your component YAML as shown in the highlighted example below:"),t.createElement("div",{className:f.code},t.createElement(Ge,{text:ee.replace("ANNOTATION",a),language:"yaml",showLineNumbers:!0,highlightedNumbers:[6,7],customStyle:{background:"inherit",fontSize:"115%"}})),t.createElement(m.Z,{color:"primary",component:P,to:"https://backstage.io/docs/features/software-catalog/well-known-annotations"},"Read more"))})}var be=e(11776),Me=e(38402),yt=e(49378),Xt=e(41128),on=e(27616),ie=e(8284),w=e(70660),_=e(91750),ye=e(38016);const Ve=(n,a)=>(a.palette.type==="light"?Xt._j:Xt.$n)(a.palette[n].light,.6),et=(n,a)=>(a.palette.type==="light"?Xt.$n:Xt._j)(a.palette[n].light,.9),pt=(0,s.Z)(n=>({root:{marginRight:n.spacing(1),fill:({severity:a})=>Ve(a,n)}})),bt=({severity:n})=>{const a=pt({severity:n});return t.createElement(_.Z,{classes:a})},an=({severity:n})=>{const a=pt({severity:n});return t.createElement(ye.Z,{classes:a})},hn=(0,s.Z)(n=>({panel:{backgroundColor:({severity:a})=>et(a,n),color:({severity:a})=>Ve(a,n),verticalAlign:"middle"},summary:{display:"flex",flexDirection:"row"},summaryText:{color:({severity:a})=>Ve(a,n),fontWeight:"bold"},message:{width:"100%",display:"block",color:({severity:a})=>Ve(a,n),backgroundColor:({severity:a})=>et(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"}),Qn=n=>n.charAt(0).toLocaleUpperCase("en-US")+n.slice(1);function Pn(n){const{severity:a="warning",title:f,message:h,children:p,defaultExpanded:C}=n,x=hn({severity:a}),W=Qn(a)+(f?`: ${f}`:"");return t.createElement(on.Z,{defaultExpanded:C!=null?C:!1,className:x.panel,role:"alert"},t.createElement(ie.Z,{expandIcon:t.createElement(an,{severity:a}),className:x.summary},t.createElement(bt,{severity:a}),t.createElement(Fe.Z,{className:x.summaryText,variant:"subtitle1"},W)),(h||p)&&t.createElement(w.Z,null,t.createElement(je.Z,{container:!0},h&&t.createElement(je.Z,{item:!0,xs:12},t.createElement(Fe.Z,{className:x.message,variant:"body1"},h)),p&&t.createElement(je.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"}),gt=({error:n,message:a,stack:f,children:h})=>{const p=In();return t.createElement(be.Z,{dense:!0},t.createElement(Me.Z,{alignItems:"flex-start"},t.createElement(yt.Z,{classes:{secondary:p.text},primary:"Error",secondary:n}),t.createElement(ce,{text:n})),t.createElement(Me.Z,{alignItems:"flex-start"},t.createElement(yt.Z,{classes:{secondary:p.text},primary:"Message",secondary:a}),t.createElement(ce,{text:a})),f&&t.createElement(Me.Z,{alignItems:"flex-start"},t.createElement(yt.Z,{classes:{secondary:p.text},primary:"Stack Trace",secondary:f}),t.createElement(ce,{text:f})),h)};function wt(n){const{title:a,error:f,defaultExpanded:h,children:p}=n;return t.createElement(Pn,{severity:"error",title:a!=null?a:f.message,defaultExpanded:h},t.createElement(gt,{error:f.name,message:f.message,stack:f.stack,children:p}))}var sn=e(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 Vt(n){var Pe;const{title:a,error:f,defaultExpanded:h}=n,p=On();if(f.name!=="ResponseError")return t.createElement(wt,{title:a!=null?a:f.message,defaultExpanded:h,error:f});const{body:C,cause:x}=f,{request:W,response:Y}=C,z=`${Y.statusCode}: ${x.name}`,ae=W&&`${W.method} ${W.url}`,oe=x.message.replace(/\\n/g,`
12
+ `),ve=(Pe=x.stack)==null?void 0:Pe.replace(/\\n/g,`
13
+ `),Re=JSON.stringify(C,void 0,2);return t.createElement(wt,{title:a!=null?a:f.message,defaultExpanded:h,error:{name:z,message:oe,stack:ve}},ae&&t.createElement(Me.Z,{alignItems:"flex-start"},t.createElement(yt.Z,{classes:{secondary:p.text},primary:"Request",secondary:W?`${ae}`:void 0}),t.createElement(ce,{text:ae})),t.createElement(t.Fragment,null,t.createElement(sn.Z,{component:"li",className:p.divider}),t.createElement(Me.Z,{alignItems:"flex-start"},t.createElement(yt.Z,{classes:{secondary:p.text},primary:"Full Error as JSON"})),t.createElement(Ge,{language:"json",text:Re,showCopyCodeButton:!0})))}var Un=e(9832);function rr(n){const a=document.createElement("div");return a.setAttribute("id",n),a}function $n(n){document.body.insertBefore(n,document.body.lastElementChild.nextElementSibling)}function vr(n){const a=useRef(null);useEffect(function(){const p=document.querySelector(`#${n}`),C=p||rr(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 ar(){const[n,a]=useState(()=>{const h=localStorage.getItem(wn);return h?JSON.parse(h):{}}),f=useCallback((h,p)=>{const C=localStorage.getItem(wn),W={...C?JSON.parse(C):{},[h]:p};a(W),localStorage.setItem(wn,JSON.stringify(W))},[]);return{states:n,setState:f}}function or(n){const{states:a,setState:f}=ar(),h=useCallback(()=>{f(n,!0)},[f,n]);return{seen:a[n]===!0,markSeen:h}}function sr(n){const{seen:a,markSeen:f}=or(n);return{show:a===!1,hide:f}}const Xn=(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 Rr(n){const{featureId:a,title:f,description:h,children:p}=n,{show:C,hide:x}=useShowCallout(a),W=usePortal("core.callout"),Y=useRef(null),[z,ae]=useState(),oe=Xn(),ve=useCallback(()=>{if(Y.current){const Re=Y.current.getBoundingClientRect(),Pe=Math.max(Re.width,Re.height),ut=800,tn=Re.x-(Pe-Re.width)/2-ut,qt=Re.y-(Pe-Re.height)/2-ut,Ht=Pe+2*ut,Qe=450,Ft=Re.x+Re.width/2-Qe,Pt=Re.y-(Pe-Re.height)/2+Pe+20;ae({dotLeft:tn,dotTop:qt,dotSize:Ht,borderWidth:ut,textTop:Pt,textLeft:Ft,textWidth:Qe})}},[]);return useEffect(()=>(window.addEventListener("resize",ve),window.addEventListener("scroll",ve),()=>{window.removeEventListener("resize",ve),window.removeEventListener("scroll",ve)}),[ve]),useLayoutEffect(ve,[Y.current,ve]),C?React.createElement(React.Fragment,null,React.createElement("div",{className:oe.featureWrapper,ref:Y},p),createPortal(React.createElement("div",{className:oe.backdrop},React.createElement(ClickAwayListener,{onClickAway:x},React.createElement(React.Fragment,null,React.createElement("div",{className:oe.dot,"data-testid":"dot",style:{left:z==null?void 0:z.dotLeft,top:z==null?void 0:z.dotTop,width:z==null?void 0:z.dotSize,height:z==null?void 0:z.dotSize,borderWidth:z==null?void 0:z.borderWidth},onClick:x,onKeyDown:x,role:"button",tabIndex:0},React.createElement("div",{className:oe.pulseCircle})),React.createElement("div",{className:oe.text,"data-testid":"text",style:{left:z==null?void 0:z.textLeft,top:z==null?void 0:z.textTop,width:z==null?void 0:z.textWidth}},React.createElement(Typography,{variant:"h2",paragraph:!0},f),React.createElement(Typography,null,h))))),W)):React.createElement(React.Fragment,null,p)}var ir=e(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 Sr({color:n="primary",disabled:a=!1,href:f="#",icon:h=t.createElement(ir.Z,null),label:p,onClick:C,title:x}){const W=Wn();return a?t.createElement(E.Z,{title:x,className:de()(W.link,W.disabled),underline:"none"},h,t.createElement("span",{className:W.label},p)):t.createElement(E.Z,{title:x,className:de()(W.link,W[n]),to:f,component:P,onClick:C},h,t.createElement("span",{className:W.label},p))}const lr=(0,s.Z)(n=>({links:{margin:n.spacing(2,0),display:"grid",gridAutoFlow:"column",gridAutoColumns:"min-content",gridGap:n.spacing(3)}}),{name:"BackstageHeaderIconLinkRow"});function cr(n){const{links:a}=n,f=lr();return t.createElement("nav",{className:f.links},a.map((h,p)=>t.createElement(Sr,{key:p+1,...h})))}const ur=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
+ `},kn=100,zn=10,dr=(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:kn,height:`calc(100% + ${zn}px)`,transition:"opacity 300ms",pointerEvents:"none"},fadeLeft:{left:-zn,background:`linear-gradient(90deg, ${ur(n.palette.type)})`},fadeRight:{right:-zn,background:`linear-gradient(270deg, ${ur(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],h]=React.useState([0,0]);return React.useLayoutEffect(()=>{const p=n.current;if(!p){h([0,0]);return}const C=()=>{const x=p.scrollLeft,W=p.scrollWidth-p.offsetWidth-p.scrollLeft;h([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[h,p]=React.useState(0);return React.useLayoutEffect(()=>{if(h===0)return;const C=performance.now(),x=requestAnimationFrame(W=>{if(!n.current)return;const Y=W-C,z=Math.abs(h)*Y/a,oe=Math.max(f,z)*Math.sign(h);n.current.scrollBy({left:oe});const ve=h-oe;Math.sign(h)!==Math.sign(ve)?p(0):p(ve)});return()=>cancelAnimationFrame(x)},[n,h,a,f]),p}function Cr(n){const{scrollStep:a=100,scrollSpeed:f=50,minScrollDistance:h=5,children:p,...C}=n,x=dr(n),W=React.useRef(),[Y,z]=An(W),ae=gn(W,f,h),oe=ve=>{!W.current||ae(ve?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]:z===0})}),Y>0&&React.createElement(IconButton,{title:"Scroll Left",onClick:()=>oe(!1),className:classNames(x.button,x.buttonLeft,{})},React.createElement(ChevronLeftIcon,null)),z>0&&React.createElement(IconButton,{title:"Scroll Right",onClick:()=>oe(!0),className:classNames(x.button,x.buttonRight,{})},React.createElement(ChevronRightIcon,null)))}const Tr=(0,s.Z)({alpha:{color:"#ffffff",fontFamily:"serif",fontWeight:"normal",fontStyle:"italic"},beta:{color:"#4d65cc",fontFamily:"serif",fontWeight:"normal",fontStyle:"italic"}},{name:"BackstageLifecycle"});function fr(n){const a=Tr(n),{shorthand:f,alpha:h}=n;return f?React.createElement("span",{className:a[h?"alpha":"beta"],style:{fontSize:"120%"}},h?React.createElement(React.Fragment,null,"\u03B1"):React.createElement(React.Fragment,null,"\u03B2")):React.createElement("span",{className:a[h?"alpha":"beta"]},h?"Alpha":"Beta")}const en=(0,t.lazy)(()=>Promise.all([e.e(1110),e.e(8718)]).then(e.bind(e,98718)).then(n=>({default:n.RealLogViewer})));function Pr(n){const{Progress:a}=(0,l.useApp)().getComponents();return t.createElement(t.Suspense,{fallback:t.createElement(a,null)},t.createElement(en,{...n}))}const qn=(0,s.Z)(n=>({markdown:{"& table":{borderCollapse:"collapse",border:`1px solid ${n.palette.border}`},"& th, & td":{border:`1px solid ${n.palette.border}`,padding:n.spacing(1)},"& td":{wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:n.spacing(3,2,3,2.5),borderBottom:0},"& th":{backgroundColor:n.palette.background.paper},"& tr":{backgroundColor:n.palette.background.paper},"& tr:nth-child(odd)":{backgroundColor:n.palette.background.default},"& a":{color:n.palette.link},"& img":{maxWidth:"100%"}}}),{name:"BackstageMarkdownContent"}),Ir={code:({inline:n,className:a,children:f,...h})=>{const p=String(f).replace(/\n+$/,""),C=/language-(\w+)/.exec(a||"");return!n&&C?t.createElement(Ge,{language:C[1],text:p}):t.createElement("code",{className:a,...h},f)}};function Lr(n){const{content:a,dialect:f="gfm"}=n,h=qn();return React.createElement(ReactMarkdown,{remarkPlugins:f==="gfm"?[gfm]:[],className:h.markdown,children:a,components:Ir})}var Or=e(10179);const xr=(0,s.Z)(n=>({root:{paddingLeft:n.spacing(3)}}),{name:"BackstageLoginRequestListItem"}),Yr=({request:n,busy:a,setBusy:f})=>{const h=xr(),[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:h.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 Dr=null;const Fr=(0,s.Z)(n=>({dialog:{paddingTop:n.spacing(1)},title:{minWidth:0},contentList:{padding:0},actionButtons:{padding:n.spacing(2,0)}}),{name:"OAuthRequestDialog"});function Qr(n){const a=Fr(),[f,h]=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:h})))),React.createElement(DialogActions,{classes:{root:a.actionButtons}},React.createElement(Button,{onClick:x},"Reject All")))}var Br=e(15277),br=e.n(Br),Bn=e(90736);const mr=(0,s.Z)({container:{overflow:"visible !important"}},{name:"BackstageOverflowTooltip"});function hr(n){var x;const[a,f]=(0,t.useState)(!1),h=(0,Bn.default)(),p=mr(),C=W=>{h()&&f(W)};return t.createElement(D.ZP,{title:(x=n.title)!=null?x:n.text||"",placement:n.placement,disableHoverListener:!a},t.createElement(br(),{text:n.text,line:n.line,onToggled:C,containerClassName:p.container}))}var gr=e(67358);function Mr(n){const[a,f]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{const h=setTimeout(()=>f(!0),250);return()=>clearTimeout(h)},[]),a?t.createElement(gr.Z,{...n,"data-testid":"progress"}):t.createElement("div",{style:{display:"none"}})}var Nr=e(94339),pr=e(14503),$=e(24579),M=e(32552),Z=e(15459),k=e(95544),le=e(27597);const te=(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 fe(n){const{link:a,title:f,onClick:h}=n,p=te();return t.createElement("div",null,t.createElement(sn.Z,null),t.createElement(P,{to:a,onClick:h,underline:"none"},t.createElement(k.Z,{display:"flex",alignItems:"center",className:p.root},t.createElement(k.Z,{className:p.boxTitle,fontWeight:"fontWeightBold",m:1},t.createElement(Fe.Z,null,t.createElement("strong",null,f))),t.createElement(le.Z,{className:p.arrow}))))}const Ue=n=>{const{slackChannel:a}=n;if(a){if(typeof a=="string")return t.createElement(t.Fragment,null,"Please contact ",a," for help.");if(!a.href)return t.createElement(t.Fragment,null,"Please contact ",a.name," for help.")}else return null;return t.createElement(F,{to:a.href,variant:"contained"},a.name)},qe=class extends t.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:h}=this.state;return h?t.createElement(wt,{title:"Something Went Wrong",error:h},t.createElement(Ue,{slackChannel:a})):f}},rt=(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"}),Ye=(0,Z.Z)(n=>({root:{display:"inline-block",padding:n.spacing(8,8,0,0),float:"right"}}),{name:"BackstageInfoCardCardActionsTopRight"})(pr.Z),xe={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 Ze(n){const{title:a,subheader:f,divider:h=!0,deepLink:p,slackChannel:C,errorBoundaryProps:x,variant:W,children:Y,headerStyle:z,headerProps:ae,action:oe,actionsClassName:ve,actions:Re,cardClassName:Pe,actionsTopRight:ut,className:tn,noPadding:qt,titleTypographyProps:Ht}=n,Qe=rt();let Ft={},Pt={};W&&W.split(/[\s]+/g).forEach(fn=>{Ft={...Ft,...xe.card[fn]},Pt={...Pt,...xe.cardContent[fn]}});const _t=x||(C?{slackChannel:C}:{});return t.createElement(Nr.Z,{style:Ft,className:tn},t.createElement(qe,{..._t},a&&t.createElement(M.Z,{classes:{root:Qe.header,title:Qe.headerTitle,subheader:Qe.headerSubheader,avatar:Qe.headerAvatar,action:Qe.headerAction,content:Qe.headerContent},title:a,subheader:f,action:oe,style:{...z},titleTypographyProps:Ht,...ae}),ut&&t.createElement(Ye,null,ut),h&&t.createElement(sn.Z,null),t.createElement($.Z,{className:de()(Pe,{[Qe.noPadding]:qt}),style:Pt},Y),Re&&t.createElement(pr.Z,{className:ve},Re),p&&t.createElement(fe,{...p})))}var St=e(94137);const Ot=(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"}),Mt={fractional:!0,inverse:!1,unit:"%",max:100},kt=({palette:n,value:a,inverse:f,max:h})=>{if(isNaN(a))return"#ddd";const p=h||Mt.max,C=f?p-a:a;return C<p/3?n.status.error:C<p*(2/3)?n.status.warning:n.status.ok};function Kt(n){const{getColor:a=kt}=n,f=Ot(n),{palette:h}=useTheme(),{value:p,fractional:C,inverse:x,unit:W,max:Y}={...Mt,...n},z=C?Math.round(p*Y):p,ae=Y!==100?Math.round(p):z;return React.createElement("div",{className:f.root},React.createElement(Circle,{strokeLinecap:"butt",percent:z,strokeWidth:12,trailWidth:12,strokeColor:a({palette:h,value:ae,inverse:x,max:Y}),className:f.circle}),React.createElement("div",{className:f.overlay},isNaN(p)?"N/A":`${ae}${W}`))}const Jt=(0,s.Z)({root:{height:"100%",width:250}},{name:"BackstageGaugeCard"});function ln(n){const a=Jt(n),{title:f,subheader:h,progress:p,inverse:C,deepLink:x,variant:W,getColor:Y}=n,z={inverse:C,getColor:Y,value:p};return React.createElement("div",{className:a.root},React.createElement(InfoCard,{title:f,subheader:h,deepLink:x,variant:W},React.createElement(Gauge,{...z})))}function $t(n){const{value:a,getColor:f=getProgressColor}=n,{palette:h}=useTheme();if(isNaN(a))return null;let p=Math.round(a*100*100)/100;p>100&&(p=100);const C=f({palette:h,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=e(21324),Ln=e(7089),Wt=e(1292),Gt=e(42494),bn=e(74603),Hn=e(12231),Xr=e(73698),kr=e(72379);const qr=(0,s.Z)(()=>(0,c.Z)({icon:{position:"absolute",right:"4px",pointerEvents:"none"}}),{name:"BackstageClosedDropdown"});var Sa=()=>{const n=qr();return t.createElement(kr.Z,{className:n.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{d:"M7.5 8L6 9.5L12.0703 15.5703L18.1406 9.5L16.6406 8L12.0703 12.5703L7.5 8Z",fill:"#616161"}))};const _r=(0,s.Z)(()=>(0,c.Z)({icon:{position:"absolute",right:"4px",pointerEvents:"none"}}),{name:"BackstageOpenedDropdown"});var ea=()=>{const n=_r();return t.createElement(kr.Z,{className:n.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{d:"M16.5 16L18 14.5L11.9297 8.42969L5.85938 14.5L7.35938 16L11.9297 11.4297L16.5 16Z",fill:"#616161"}))};const ta=(0,Z.Z)(n=>(0,c.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),na=(0,s.Z)(n=>(0,c.Z)({formControl:{margin:`${n.spacing(1)} 0px`,maxWidth:300},label:{transform:"initial",fontWeight:"bold",fontSize:14,fontFamily:n.typography.fontFamily,color:n.palette.text.primary,"&.Mui-focused":{color:n.palette.text.primary}},chips:{display:"flex",flexWrap:"wrap"},chip:{margin:2},checkbox:{},root:{display:"flex",flexDirection:"column"}}),{name:"BackstageSelect"});function Ur(n){const{multiple:a,items:f,label:h,placeholder:p,selected:C,onChange:x,triggerReset:W,native:Y=!1,disabled:z=!1}=n,ae=na(),[oe,ve]=(0,t.useState)(C||(a?[]:"")),[Re,Pe]=(0,t.useState)(!1);(0,t.useEffect)(()=>{ve(a?[]:"")},[W,a]),(0,t.useEffect)(()=>{C!==void 0&&ve(C)},[C]);const ut=Qe=>{ve(Qe.target.value),x(Qe.target.value)},tn=Qe=>{if(z){Qe.preventDefault();return}Pe(Ft=>a&&!(Qe.target instanceof HTMLElement)?!0:!Ft)},qt=()=>{Pe(!1)},Ht=Qe=>()=>{const Ft=oe.filter(Pt=>Pt!==Qe);ve(Ft),x(Ft)};return t.createElement("div",{className:ae.root},t.createElement(Fe.Z,{variant:"button"},h),t.createElement(Wt.Z,{onClickAway:qt},t.createElement(Gt.Z,{className:ae.formControl},t.createElement(Xr.Z,{value:oe,native:Y,disabled:z,"data-testid":"select",displayEmpty:!0,multiple:a,onChange:ut,onClick:tn,open:Re,input:t.createElement(ta,null),renderValue:Qe=>{var Ft;return a&&oe.length!==0?t.createElement("div",{className:ae.chips},Qe.map(Pt=>{var _t,Gn;return t.createElement(Ln.Z,{key:(_t=f.find(fn=>fn.value===Pt))==null?void 0:_t.value,label:(Gn=f.find(fn=>fn.value===Pt))==null?void 0:Gn.label,clickable:!0,onDelete:Ht(Pt),className:ae.chip})})):t.createElement(Fe.Z,null,oe.length===0?p||"":(Ft=f.find(Pt=>Pt.value===Qe))==null?void 0:Ft.label)},IconComponent:()=>Re?t.createElement(ea,null):t.createElement(Sa,null),MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},getContentAnchorEl:null}},p&&!a&&t.createElement(Hn.Z,{value:[]},p),Y?f&&f.map(Qe=>t.createElement("option",{value:Qe.value,key:Qe.value},Qe.label)):f&&f.map(Qe=>t.createElement(Hn.Z,{key:Qe.value,value:Qe.value},a&&t.createElement(pn.Z,{color:"primary",checked:oe.includes(Qe.value)||!1,className:ae.checkbox}),Qe.label))))))}const _n=()=>{},ra=t.createContext({stepperLength:0,stepIndex:0,setStepIndex:_n,stepHistory:[],setStepHistory:_n,onStepChange:_n});function Ta(n){const{children:a,elevated:f,onStepChange:h,activeStep:p=0}=n,[C,x]=useState(p),[W,Y]=useState([0]);useEffect(()=>{x(p)},[p]);const z=[];let ae;return Children.forEach(a,oe=>{isValidElement(oe)&&(oe.props.end?ae=oe:z.push(oe))}),React.createElement(React.Fragment,null,React.createElement(ra.Provider,{value:{stepIndex:C,setStepIndex:x,stepHistory:W,setStepHistory:Y,onStepChange:h,stepperLength:Children.count(a)}},React.createElement(MuiStepper,{activeStep:C,orientation:"vertical",elevation:f?2:0},z)),C>=Children.count(a)-1&&ae)}const aa=(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"),oa=({text:n,handleClick:a,disabled:f,last:h,stepIndex:p})=>React.createElement(Button,{variant:"contained",color:"primary",disabled:f,"data-testid":`nextButton-${p}`,onClick:a},n||(h?"Finish":"Next")),A=({text:n,handleClick:a,disabled:f,stepIndex:h})=>React.createElement(Button,{onClick:a,"data-testid":`backButton-${h}`,disabled:f},n||"Back"),L=({actions:n={},children:a})=>{const f=aa(),{stepperLength:h,stepIndex:p,setStepIndex:C,stepHistory:x,setStepHistory:W,onStepChange:Y}=useContext(VerticalStepperContext),z=(Re,Pe)=>{Pe&&Pe(),Y&&Y(p,Re),C(Re)},ae=()=>{const Re=n.nextStep?n.nextStep(p,h-1):p+1;z(Re,n.onNext),W([...x,Re])},oe=()=>{x.pop(),z(x[x.length-1],n.onBack),W([...x])},ve=()=>{z(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:oe,disabled:p===0,stepIndex:p}),[void 0,!0].includes(n.showNext)&&React.createElement(oa,{text:n.nextText,handleClick:ae,disabled:!!h&&p>=h||!!n.canNext&&!n.canNext(),stepIndex:p}),n.showRestart&&p!==0&&React.createElement(Pa,{text:n.restartText,handleClick:ve,stepIndex:p}),a)},H=(0,s.Z)(n=>({end:{padding:n.spacing(3)}}),{name:"SimpleStepperStep"});function re(n){const{title:a,children:f,end:h,actions:p,...C}=n,x=H();return h?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 Ee=(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 Ne(n){const a=Ee(n);return React.createElement("span",{className:classNames(a.status,a.ok),"aria-label":"Status ok","aria-hidden":"true",...n})}function Te(n){const a=Ee(n);return React.createElement("span",{className:classNames(a.status,a.warning),"aria-label":"Status warning","aria-hidden":"true",...n})}function Ke(n){const a=Ee(n);return React.createElement("span",{className:classNames(a.status,a.error),"aria-label":"Status error","aria-hidden":"true",...n})}function $e(n){const a=Ee(n);return React.createElement("span",{className:classNames(a.status,a.pending),"aria-label":"Status pending","aria-hidden":"true",...n})}function ft(n){const a=Ee(n);return React.createElement("span",{className:classNames(a.status,a.running),"aria-label":"Status running","aria-hidden":"true",...n})}function xt(n){const a=Ee(n);return React.createElement("span",{className:classNames(a.status,a.aborted),"aria-label":"Status aborted","aria-hidden":"true",...n})}var Ct=e(74600),Tt=e(15584);const un=n=>(0,c.Z)({root:{fontWeight:"bolder",whiteSpace:"nowrap",paddingRight:n.spacing(4),border:"0",verticalAlign:"top"}}),dn={root:{border:"0",verticalAlign:"top"}},Mn=n=>(0,c.Z)({root:{listStyle:"none",margin:n.spacing(0,0,-1,0),padding:"0"}}),er=n=>(0,c.Z)({root:{padding:n.spacing(0,0,1,0)},random:{}}),jn=(0,Z.Z)(un,{name:"BackstageMetadataTableTitleCell"})(Tt.Z),Vn=(0,Z.Z)(dn,{name:"BackstageMetadataTableCell"})(Tt.Z),sa=({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.Z)(Mn,{name:"BackstageMetadataTableList"})(({classes:n,children:a})=>t.createElement("ul",{className:n.root},a)),Si=(0,Z.Z)(er,{name:"BackstageMetadataTableListItem"})(({classes:n,children:a})=>t.createElement("li",{className:n.root},a)),La=(0,c.Z)({root:{margin:"0 0",listStyleType:"none"}}),lo=n=>(0,c.Z)({root:{...La.root,paddingLeft:n.spacing(1)}}),Oa=(0,Z.Z)(La,{name:"BackstageStructuredMetadataTableList"})(({classes:n,children:a})=>t.createElement(xn,{classes:n},a)),xa=(0,Z.Z)(lo,{name:"BackstageStructuredMetadataTableNestedList"})(({classes:n,children:a})=>t.createElement(xn,{classes:n},a));function co(n,a){const f=n.map((h,p)=>React.createElement(MetadataListItem,{key:p},ia(h)));return a?React.createElement(xa,null,f):React.createElement(Oa,null,f)}function uo(n,a,f){const h=Object.keys(n).map(p=>{const C=ia(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,h):React.createElement(Oa,null,h)}function ia(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,ia(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:h}=n,p=ho(a,h||{});return React.createElement(MetadataTable,{dense:f},p)}var go=e(49429),po=e(86136),Da=e(79784),yr=e(76635),yo=e(19126),$r=e.n(yo),Eo=e(48760);function Ao(n){return $r().stringify(n,{strictNullHandling:!0})}function Fa(n){return $r().parse(n,{ignoreQueryPrefix:!0,strictNullHandling:!0})}function Ba(n,a){return Fa(n)[a]}function vo(n,a,f){const h={...Fa(n),[a]:f};return Ao(h)}function Ro(n,a=250){const[f,h]=(0,i.lr)(),p=f.toString(),[C,x]=(0,t.useState)(Ba(p,n));return(0,t.useEffect)(()=>{const W=Ba(p,n);x(Y=>(0,yr.isEqual)(W,Y)?Y:W)},[p,x,n]),(0,Eo.Z)(()=>{const W=vo(p,n,C);p!==W&&h(W,{replace:!0})},a,[h,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 h;return{title:f.getString("title"),icon:f.getOptionalString("icon"),links:((h=f.getOptionalConfigArray("links"))!=null?h:[]).flatMap(p=>({url:p.getString("url"),title:p.getString("title")}))}})}:So}var Co=e(80079);function vn(n,a){const h=(0,l.useApp)().getSystemIcon(n);return h?t.createElement(h,{...a}):t.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 Zr(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 h;const a=(0,l.useApp)(),f=n&&(h=a.getSystemIcon(n))!=null?h:Zr;return t.createElement(f,null)},Io=({link:n})=>{var a;return t.createElement(P,{to:n.url},(a=n.title)!=null?a:n.url)},Lo=({item:n})=>{var a;return t.createElement(Me.Z,null,t.createElement(po.Z,null,t.createElement(Po,{icon:n.icon})),t.createElement(yt.Z,{primary:n.title,secondary:(a=n.links)==null?void 0:a.reduce((f,h,p)=>[...f,p>0&&t.createElement("br",{key:p}),t.createElement(Io,{link:h,key:h.url})],[])}))};function Oo(n){const{title:a,children:f}=n,{items:h}=ba(),[p,C]=(0,t.useState)(!1),[x,W]=(0,t.useState)(null),Y=To(),z=(0,Le.Z)(ve=>ve.breakpoints.down("sm")),ae=ve=>{W(ve.currentTarget),C(!0)},oe=()=>{C(!1)};return t.createElement(t.Fragment,null,t.createElement(k.Z,{display:"flex",ml:1},z?t.createElement(N.Z,{color:"primary",size:"small",onClick:ae,"data-testid":"support-button"},t.createElement(Zr,null)):t.createElement(m.Z,{"data-testid":"support-button",color:"primary",onClick:ae,startIcon:t.createElement(Zr,null)},"Support")),t.createElement(Da.ZP,{"data-testid":"support-button-popover",open:p,anchorEl:x,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},onClose:oe},t.createElement(be.Z,{className:Y.popoverList},a&&t.createElement(Me.Z,{alignItems:"flex-start"},t.createElement(Fe.Z,{variant:"subtitle1"},a)),t.Children.map(f,(ve,Re)=>t.createElement(Me.Z,{alignItems:"flex-start",key:`child-${Re}`},ve)),h&&h.map((ve,Re)=>t.createElement(Lo,{item:ve,key:`item-${Re}`}))),t.createElement(go.Z,null,t.createElement(m.Z,{color:"primary",onClick:oe},"Close"))))}var la=e(18671),Dn=e(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:h,children:p,...C}=n,x=xo();return t.createElement("article",{...C,className:de()(x.root,a,{[x.stretch]:f,[x.noPadding]:h})},p)}var Do=e(6487),Fo=e(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:h}=n,[p,C]=(0,t.useState)(h!=null?h:0),x=Bo(),W=(Y,z)=>{h===void 0&&C(z),f&&f(z)};return(0,t.useEffect)(()=>{h!==void 0&&C(h)},[h]),t.createElement("div",{className:x.tabsWrapper},t.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,z)=>t.createElement(Do.Z,{...Y.tabProps,"data-testid":`header-tab-${z}`,label:Y.label,key:Y.id,value:z,className:x.defaultTab,classes:{selected:x.selected,root:x.tabRoot}}))))}function bo(n){var W,Y,z;const a=(0,Dn.UO)(),h=n.map(({path:ae,children:oe})=>({caseSensitive:!1,path:`${ae}/*`,element:oe})).sort((ae,oe)=>oe.path.replace(/\/\*$/,"").localeCompare(ae.path.replace(/\/\*$/,""))),p=(W=(0,Dn.V$)(h))!=null?W:n[0].children,[C]=(Y=(0,Dn.fp)(h,`/${a["*"]}`))!=null?Y:[],x=C?n.findIndex(ae=>`${ae.path}/*`===C.route.path):0;return{index:x===-1?0:x,element:p,route:(z=n[x])!=null?z:n[0]}}function Ua(n){const{routes:a}=n,f=(0,Dn.s0)(),{index:h,route:p,element:C}=bo(a),x=(0,t.useMemo)(()=>a.map(Y=>({id:Y.path,label:Y.title,tabProps:Y.tabProps})),[a]),W=Y=>f(a[Y].path.replace(/\/\*$/,"").replace(/^\//,""));return t.createElement(t.Fragment,null,t.createElement(Na,{tabs:x,selectedIndex:h,onChange:W}),t.createElement(Ma,null,t.createElement(la.q,{title:p.title}),C))}const ca=()=>null;(0,l.attachComponentData)(ca,"core.gatherMountPoints",!0);function $a(n){const a=t.createElement(ca,{path:"",title:""},t.createElement("div",null)).type;return t.Children.toArray(n).flatMap(f=>{if(!(0,t.isValidElement)(f))return[];if(f.type===t.Fragment)return $a(f.props.children);if(f.type!==a)throw new Error("Child of TabbedLayout must be an TabbedLayout.Route");const{path:h,title:p,children:C,tabProps:x}=f.props;return[{path:h,title:p,children:C,tabProps:x}]})}function Mo(n){const a=$a(n.children);return t.createElement(Ua,{routes:a})}Mo.Route=ca;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,h=No();return t.createElement(t.Fragment,null,t.createElement("div",{className:h.value},a),t.createElement("div",{className:h.subvalue},f))}var $o=e(21070),Zo=e(90324),wo=e(98281),Wo=e(48049),Za=e(51209),wa=e(33375),zo=e(44233),Ho=e(27604),ua=e(36444),jo=e(37971),Vo=e(59709),Go=e(17373),Ko=e(3702),Jo=e(93111),wr=e(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,[h,p]=(0,t.useState)({...n.selectedFilters}),[C,x]=(0,t.useState)(!1),W=()=>{p({}),x(z=>!z)};return(0,t.useEffect)(()=>{f(h)},[h,f]),t.createElement("div",{className:a.root},t.createElement("div",{className:a.header},t.createElement("div",{className:a.value},"Filters"),t.createElement(m.Z,{color:"primary",onClick:W},"Clear all")),t.createElement("div",{className:a.filters},((Y=n.filters)==null?void 0:Y.length)&&n.filters.map(z=>t.createElement(Ur,{triggerReset:C,key:z.element.label,...z.element,selected:h[z.element.label],onChange:ae=>p({...h,[z.element.label]:ae})}))))},Xo={Add:(0,t.forwardRef)((n,a)=>t.createElement($o.Z,{...n,ref:a})),Check:(0,t.forwardRef)((n,a)=>t.createElement(wo.Z,{...n,ref:a})),Clear:(0,t.forwardRef)((n,a)=>t.createElement(wa.Z,{...n,ref:a})),Delete:(0,t.forwardRef)((n,a)=>t.createElement(zo.Z,{...n,ref:a})),DetailPanel:(0,t.forwardRef)((n,a)=>t.createElement(Za.Z,{...n,ref:a})),Edit:(0,t.forwardRef)((n,a)=>t.createElement(Ho.Z,{...n,ref:a})),Export:(0,t.forwardRef)((n,a)=>t.createElement(Ko.Z,{...n,ref:a})),Filter:(0,t.forwardRef)((n,a)=>t.createElement(ua.Z,{...n,ref:a})),FirstPage:(0,t.forwardRef)((n,a)=>t.createElement(jo.Z,{...n,ref:a})),LastPage:(0,t.forwardRef)((n,a)=>t.createElement(Vo.Z,{...n,ref:a})),NextPage:(0,t.forwardRef)((n,a)=>t.createElement(Za.Z,{...n,ref:a})),PreviousPage:(0,t.forwardRef)((n,a)=>t.createElement(Wo.Z,{...n,ref:a})),ResetSearch:(0,t.forwardRef)((n,a)=>t.createElement(wa.Z,{...n,ref:a})),Search:(0,t.forwardRef)((n,a)=>t.createElement(ua.Z,{...n,ref:a})),SortArrow:(0,t.forwardRef)((n,a)=>t.createElement(Zo.Z,{...n,ref:a})),ThirdStateCheck:(0,t.forwardRef)((n,a)=>t.createElement(Go.Z,{...n,ref:a})),ViewColumn:(0,t.forwardRef)((n,a)=>t.createElement(Jo.Z,{...n,ref:a}))};function Wa(n,a){const f=a.split(".");let h=n[f[0]];for(let p=1;p<f.length;++p){if(h===void 0)return h;const C=f[p];h=h[C]}return h}const ko=(0,Z.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.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 es(n,a){return n.map(f=>{const h={};let p=f.cellStyle||{};if(f.highlight)if(h.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:h,cellStyle:p}})}function ts(n,a){return(0,yr.transform)(n,(f,h,p)=>{(0,yr.isEqual)(h,a[p])||(f[p]=h)})}const Ha={search:"",filtersOpen:!1,filters:{}};function ns(n){const{toolbarRef:a,setSearch:f,hasFilters:h,selectedFiltersLength:p,toggleFilters:C}=n,x=qo(),W=(0,t.useCallback)(Y=>{n.onSearchChanged(Y),f(Y)},[n,f]);return h?t.createElement("div",{className:x.root},t.createElement("div",{className:x.root},t.createElement(N.Z,{onClick:C,"aria-label":"filter list"},t.createElement(ua.Z,null)),t.createElement(Fe.Z,{className:x.title},"Filters (",p,")")),t.createElement(za,{...n,ref:a,onSearchChanged:W})):t.createElement(za,{...n,ref:a,onSearchChanged:W})}function rs(n){const{data:a,columns:f,options:h,title:p,subtitle:C,filters:x,initialState:W,emptyContent:Y,onStateChange:z,...ae}=n,oe=_o(),ve=(0,B.Z)(),Re={...Ha,...W},[Pe,ut]=(0,t.useState)(Re.filtersOpen),tn=(0,t.useCallback)(()=>ut(nn=>!nn),[ut]),[qt,Ht]=(0,t.useState)(0),[Qe,Ft]=(0,t.useState)(a),[Pt,_t]=(0,t.useState)(Re.filters),Gn=es(f,ve),[fn,Vr]=(0,t.useState)(Re.search);(0,t.useEffect)(()=>{if(z){const nn=ts({search:fn,filtersOpen:Pe,filters:Pt},Ha);z(nn)}},[fn,Pe,Pt,z]);const Bt={headerStyle:{textTransform:"uppercase"}},Nn=(0,t.useCallback)(nn=>{var mn;return(mn=f.find(yn=>yn.title===nn))==null?void 0:mn.field},[f]);(0,t.useEffect)(()=>{if(typeof a=="function")return;if(!Pt){Ft(a);return}const nn=Object.values(Pt);if(a&&nn.flat().length){const mn=a.filter(yn=>!!Object.entries(Pt).filter(([,Jn])=>!!Jn.length).every(([Jn,Yt])=>{const Qt=Wa(yn,Nn(Jn));return Array.isArray(Qt)&&Array.isArray(Yt)?Qt.some(tr=>Yt.includes(tr)):Array.isArray(Qt)?Qt.includes(Yt):Array.isArray(Yt)?Yt.includes(Qt):Qt===Yt}));Ft(mn)}else Ft(a);Ht(nn.flat().length)},[a,Pt,Nn]);const Ea=(nn,mn)=>{const yn=Yt=>{const Qt=new Set,tr=Yn=>{Yn!=null&&Qt.add(Yn)};return mn&&mn.forEach(Yn=>{const nr=Wa(Yn,Nn(Yt));Array.isArray(nr)?nr.forEach(tr):tr(nr)}),Qt},Jn=Yt=>({placeholder:"All results",label:Yt.column,multiple:Yt.type==="multiple-select",items:[...yn(Yt.column)].sort().map(Qt=>({label:Qt,value:Qt}))});return nn.map(Yt=>({type:Yt.type,element:Jn(Yt)}))},Kn=!!(x==null?void 0:x.length),Aa=(0,t.useCallback)(nn=>t.createElement(ns,{setSearch:Vr,hasFilters:Kn,selectedFiltersLength:qt,toggleFilters:tn,...nn}),[tn,Kn,qt,Vr]),Gr=typeof a!="function"&&a.length===0,Kr=f.length,va=(0,t.useCallback)(nn=>Y&&Gr?t.createElement("tbody",null,t.createElement("tr",null,t.createElement("td",{colSpan:Kr},Y))):t.createElement(wr.os,{...nn}),[Gr,Y,Kr]);return t.createElement("div",{className:oe.root},Pe&&a&&typeof a!="function"&&(x==null?void 0:x.length)&&t.createElement(Qo,{filters:Ea(x,a),selectedFilters:Pt,onChangeFilters:_t}),t.createElement(wr.ZP,{components:{Header:ko,Toolbar:Aa,Body:va},options:{...Bt,...h},columns:Gn,icons:Xo,title:t.createElement(t.Fragment,null,t.createElement(Fe.Z,{variant:"h5",component:"h3"},p),C&&t.createElement(Fe.Z,{color:"textSecondary",variant:"body1"},C)),data:typeof a=="function"?a:Qe,style:{width:"100%"},localization:{toolbar:{searchPlaceholder:"Filter"}},...ae}))}const Mi=n=>{const{children:a,value:f,index:h,...p}=n;return React.createElement("div",{role:"tabpanel",hidden:f!==h,"aria-labelledby":`scrollable-auto-tab-${h}`,...p},f===h&&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:h}=n;return React.createElement(IconButton,{onClick:h,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:h,...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(),[h,p]=useState([0,0]),[C,x]=useState(0),[W,Y]=useState(0),[z,ae]=useState([[]]),oe=useRef(),{width:ve}=useWindowSize(),Re=(Ht,Qe)=>{p([C,Qe])},Pe=()=>{x(C-1)},ut=()=>{x(C+1)},tn=()=>C+1<z.length;useEffect(()=>{const Ht=20,Qe=C===0?1:2,Ft=oe.current.offsetWidth-Ht-Qe*30,Pt=h[0]*W+h[1],_t=Math.floor(Ft/170);Y(_t),ae(chunkArray(a,_t)),p([Math.floor(Pt/_t),Pt%_t])},[ve,a]);const qt=C===h[0]?h[1]:!1;return React.createElement("div",{className:f.root},React.createElement(AppBar,{ref:oe,className:f.appbar,position:"static"},React.createElement("div",null,React.createElement(StyledTabs,{value:qt,onChange:Re,selectionFollowsFocus:!0},C!==0&&React.createElement(StyledIcon,{onClick:Pe,ariaLabel:"navigate-before"},React.createElement(NavigateBeforeIcon,null)),z[C].map((Ht,Qe)=>React.createElement(StyledTab,{value:Qe,isFirstIndex:Qe===0,isFirstNav:C===0,key:Qe,icon:Ht.icon||void 0,label:Ht.label||void 0})),tn()&&React.createElement(StyledIcon,{isNext:!0,onClick:ut,ariaLabel:"navigate-next"},React.createElement(NavigateNextIcon,null))))),qt!==!1?z[C].map((Ht,Qe)=>React.createElement(TabPanel,{key:Qe,value:Qe,index:qt},Ht.content)):React.createElement(TabPanel,{key:"panel_outside_chunked_array",value:h[1],index:h[1]},z[h[0]][h[1]].content))}var wi=e(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})=>t.createElement(Fe.Z,{variant:"h4",component:"h2",className:a,"data-testid":"header-title"},n);function fs(n){const{description:a,title:f,titleComponent:h=void 0,children:p,textAlign:C="left"}=n,x=us({textAlign:C})(),W=h||t.createElement(ds,{title:f,className:x.title});return t.createElement(t.Fragment,null,t.createElement(la.q,{title:f}),t.createElement("div",{className:x.container},t.createElement("div",{className:x.leftItemsBox},W,a&&t.createElement(Fe.Z,{className:x.description,variant:"body2"},a)),t.createElement("div",{className:x.rightItemsBox},p)))}var ms=e(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 t.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:h}=n,p=ps(),C=(0,Dn.s0)(),x=ba();return t.createElement(je.Z,{container:!0,spacing:0,className:p.container},t.createElement(gs,null),t.createElement(je.Z,{item:!0,xs:12,sm:8,md:4},t.createElement(Fe.Z,{"data-testid":"error",variant:"body1",className:p.subtitle},"ERROR ",a,": ",f),t.createElement(Fe.Z,{variant:"body1",className:p.subtitle},h),t.createElement(Fe.Z,{variant:"h2",className:p.title},"Looks like someone dropped the mic!"),t.createElement(Fe.Z,{variant:"h6"},t.createElement(P,{to:"#","data-testid":"go-back-link",onClick:()=>C(-1)},"Go back"),"... or please ",t.createElement(P,{to:x.url},"contact support")," if you think this is a bug.")))}var Es=e(16173);const As=(0,Z.Z)({root:{textDecoration:"underline",cursor:"pointer"}},{name:"BackstageBreadcrumbsClickableText"})(Fe.Z),da=(0,Z.Z)({root:{textDecoration:"underline",color:"inherit"}},{name:"BackstageBreadcrumbsStyledBox"})(k.Z);function vs(n){const{children:a,...f}=n,[h,p]=t.useState(null),C=t.Children.toArray(a),[x,W,...Y]=C,z=Y.length?Y.pop():C[C.length-1],ae=C.length>3,oe=Pe=>{p(Pe.currentTarget)},ve=()=>{p(null)},Re=Boolean(h);return t.createElement(t.Fragment,null,t.createElement(Es.Z,{"aria-label":"breadcrumb",...f},C.length>1&&t.createElement(da,{clone:!0},x),C.length>2&&t.createElement(da,{clone:!0},W),ae&&t.createElement(As,{onClick:oe},"..."),t.createElement(k.Z,{style:{fontStyle:"italic"}},z)),t.createElement(Da.ZP,{open:Re,anchorEl:h,onClose:ve,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}},t.createElement(be.Z,null,Y.map((Pe,ut)=>t.createElement(Me.Z,{key:ut,button:!0},t.createElement(da,{clone:!0},Pe))))))}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:h})=>n?a?t.createElement(vs,{className:f.breadcrumb},t.createElement(P,{to:a},n),t.createElement(Fe.Z,null,h)):t.createElement(Fe.Z,{className:f.type},n):null,Cs=({pageTitle:n,classes:a,tooltip:f})=>{const h=t.createElement(Fe.Z,{className:a.title,variant:"h1"},n);return f?t.createElement(D.ZP,{title:f,placement:"top-start"},h):h},Ts=({classes:n,subtitle:a})=>a?typeof a!="string"?t.createElement(t.Fragment,null,a):t.createElement(Fe.Z,{className:n.subtitle,variant:"subtitle2",component:"span"},a):null;function ja(n){const{children:a,pageTitleOverride:f,style:h,subtitle:p,title:C,tooltip:x,type:W,typeLink:Y}=n,z=Rs(),oe=(0,l.useApi)(l.configApiRef).getOptionalString("app.title")||"Backstage",ve=f||C,Re=C||f,Pe=`${ve} | %s | ${oe}`,ut=`${ve} | ${oe}`;return t.createElement(t.Fragment,null,t.createElement(la.q,{titleTemplate:Pe,defaultTitle:ut}),t.createElement("header",{style:h,className:z.header},t.createElement(k.Z,{className:z.leftItemsBox},t.createElement(Ss,{classes:z,type:W,typeLink:Y,pageTitle:Re}),t.createElement(Cs,{classes:z,pageTitle:Re,tooltip:x}),t.createElement(Ts,{classes:z,subtitle:p})),t.createElement(je.Z,{container:!0,className:z.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})=>t.createElement(Fe.Z,{className:a},n);function Ls(n){const{label:a,value:f,url:h}=n,p=Ps(),C=t.createElement(Is,{className:p.value,value:f||"<Unknown>"});return t.createElement(je.Z,{item:!0},t.createElement("span",{className:p.root},t.createElement(Fe.Z,{className:p.label},a),h?t.createElement(P,{to:h},C):C))}const Os={hour:"2-digit",minute:"2-digit"};function Va(n){const a=new Date,f=window.navigator.language,h=[];if(!n.has("homepage.clocks"))return h;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);h.push({time:Y,label:x})}return h}function zi(n){const a=useApi(configApiRef),f=[],[h,p]=React.useState(f);return React.useEffect(()=>{p(Va(a));const C=setInterval(()=>{p(Va(a))},1e3);return()=>{clearInterval(C)}},[a]),h.length!==0?React.createElement(React.Fragment,null,h.map(C=>React.createElement(HeaderLabel,{label:C.label,value:C.time,key:C.label}))):null}const xs=n=>(0,c.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:h}=n,p=Ds(n);return t.createElement("div",{className:p.root},f&&t.createElement(Fe.Z,{variant:"subtitle2",component:"h3"},f),a&&t.createElement(Fe.Z,{variant:"h6",component:"h4"},a),h)}function Hi(n){const{description:a,tags:f,title:h,type:p,subtitle:C,label:x,onClick:W,href:Y}=n;return React.createElement(Card,null,React.createElement(CardMedia,null,React.createElement(ItemCardHeader,{title:h,subtitle:C||p})),React.createElement(CardContent,null,(f==null?void 0:f.length)?React.createElement(Box,null,f.map((z,ae)=>React.createElement(Chip,{size:"small",label:z,key:ae}))):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,c.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,h=bs(f);return t.createElement("div",{className:h.root,...f},a)}var Ns=e(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,h=Us();return t.createElement(Ns.Z,{theme:p=>({...p,page:p.getPageTheme({themeId:a})})},t.createElement("div",{className:h.root},f))}function $s(n){const{themeId:a,children:f,...h}=n;return t.createElement(Ga,{themeId:a},t.createElement(ja,{...h}),f)}const Wr=72,Ka=24,Ja=18,cn={drawerWidthClosed:Wr,drawerWidthOpen:224,defaultOpenDelayMs:100,defaultCloseDelayMs:0,defaultFadeDuration:200,logoHeight:32,iconContainerWidth:Wr,iconSize:Wr-Ka*2,iconPadding:Ka,selectedIndicatorWidth:3,userBadgePadding:Ja,userBadgeDiameter:Wr-Ja*2},fa={drawerWidthClosed:0,drawerWidthOpen:202,defaultOpenDelayMs:cn.defaultOpenDelayMs+200},ji="@backstage/core/sidebar-intro-dismissed",Er=(0,t.createContext)({isOpen:!1,setOpen:n=>{}}),Ya=(0,t.createContext)({isHoveredOn:!1,setIsHoveredOn:()=>{}});var zr;(function(n){const a="sidebarPinState";n.SIDEBAR_PIN_STATE=a})(zr||(zr={}));const Qa={getSidebarPinState(){let n;try{n=JSON.parse(window.localStorage.getItem(zr.SIDEBAR_PIN_STATE)||"true")}catch{return!0}return!!n},setSidebarPinState(n){return window.localStorage.setItem(zr.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?cn.drawerWidthOpen:cn.drawerWidthClosed}},{name:"BackstageSidebarPage"}),ma=(0,t.createContext)({isPinned:!0,toggleSidebarPinState:()=>{}});function ws(n){const[a,f]=(0,t.useState)(()=>Qa.getSidebarPinState());(0,t.useEffect)(()=>{Qa.setSidebarPinState(a)},[a]);const h=()=>f(!a),p=Zs({isPinned:a});return t.createElement(ma.Provider,{value:{isPinned:a,toggleSidebarPinState:h}},t.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:cn.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:cn.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 h=f+1;n[n.Open=h]="Open"})(Rn||(Rn={}));function Hs(n){const{disableExpandOnHover:a=!1,openDelayMs:f=cn.defaultOpenDelayMs,closeDelayMs:h=cn.defaultCloseDelayMs,children:p}=n,C=Xa(),x=(0,Le.Z)(ut=>ut.breakpoints.down("md")),[W,Y]=(0,t.useState)(Rn.Closed),z=(0,t.useRef)(),{isPinned:ae}=(0,t.useContext)(ma),oe=()=>{ae||(z.current&&(clearTimeout(z.current),z.current=void 0),W!==Rn.Open&&!x&&(z.current=window.setTimeout(()=>{z.current=void 0,Y(Rn.Open)},f),Y(Rn.Idle)))},ve=()=>{ae||(z.current&&(clearTimeout(z.current),z.current=void 0),W===Rn.Idle?Y(Rn.Closed):W===Rn.Open&&(z.current=window.setTimeout(()=>{z.current=void 0,Y(Rn.Closed)},h)))},Re=W===Rn.Open&&!x||ae,Pe=ut=>{ut?oe():ve()};return t.createElement("div",{className:C.root,"data-testid":"sidebar-root",onMouseEnter:a?()=>{}:oe,onFocus:a?()=>{}:oe,onMouseLeave:a?()=>{}:ve,onBlur:a?()=>{}:ve},t.createElement(Er.Provider,{value:{isOpen:Re,setOpen:Pe}},t.createElement("div",{className:de()(C.drawer,{[C.drawerOpen]:Re})},p)))}const Yi=()=>{const n=Xa(),{isOpen:a,setOpen:f}=useContext(SidebarContext),{isPinned:h}=useContext(SidebarPinStateContext),p=useMediaQuery(x=>x.breakpoints.down("md")),C=()=>{f(!a)};return h||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(),h=$r().parse(f),p=new URLSearchParams(n.search).toString(),C=$r().parse(p);return(0,yr.isEqual)(a.pathname,n.pathname)&&(0,yr.isMatch)(C,h)}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:h,dropdownItems:p}=n,C=Vs(),{setIsHoveredOn:x}=useContext(SidebarItemWithSubmenuContext),W=()=>{x(!1)},Y=useResolvedPath(f),z=useLocation();let ae=isLocationMatch(z,Y);const[oe,ve]=useState(!1),Re=()=>{ve(!oe)};return p!==void 0?(p.some(Pe=>{const ut=resolvePath(Pe.to);return ae=isLocationMatch(z,ut),ae}),React.createElement("div",{className:C.itemContainer},React.createElement("button",{onClick:Re,className:classnames(C.item,ae?C.selected:void 0)},React.createElement(h,{fontSize:"small"}),React.createElement(Typography,{variant:"subtitle1",className:C.label},a),oe?React.createElement(ArrowDropUpIcon,{className:C.dropdownArrow}):React.createElement(ArrowDropDownIcon,{className:C.dropdownArrow})),p&&oe&&React.createElement("div",{className:C.dropdown},p.map((Pe,ut)=>React.createElement(Link,{component:NavLink,to:Pe.to,underline:"none",className:C.dropdownItem,onClick:W,key:ut},React.createElement(Typography,{className:C.textContent},Pe.title)))))):React.createElement("div",{className:C.itemContainer},React.createElement(Link,{component:NavLink,to:f,underline:"none",className:classnames(C.item,ae?C.selected:void 0),onClick:W},React.createElement(h,{fontSize:"small"}),React.createElement(Typography,{variant:"subtitle1",className:C.label},a)))},Gs=n=>(0,s.Z)(a=>{var f,h;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:(h=(f=a.palette.navigation.submenu)==null?void 0:f.background)!=null?h:"#404040",overflowX:"hidden",msOverflowStyle:"none",scrollbarWidth:"none",cursor:"default",width:fa.drawerWidthClosed,transitionDelay:`${fa.defaultOpenDelayMs}ms`,"& > *":{flexShrink:0},"&::-webkit-scrollbar":{display:"none"}},drawerOpen:{width:fa.drawerWidthOpen},title:{fontSize:24,fontWeight:500,color:"#FFF",padding:20}}}),Ks=n=>{const{isOpen:a}=(0,t.useContext)(Er),f=a?cn.drawerWidthOpen:cn.drawerWidthClosed,h=Gs({left:f})(),{isHoveredOn:p}=(0,t.useContext)(Ya),[C,x]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{x(p)},[p]),t.createElement("div",{className:de()(h.drawer,{[h.drawerOpen]:C})},t.createElement(Fe.Z,{variant:"h5",className:h.title},n.title),n.children)};var Hr=e(76600),ka=e(26739),Js=e(98989);const ha=(0,s.Z)(n=>{var C,x,W,Y;const{selectedIndicatorWidth:a,drawerWidthClosed:f,drawerWidthOpen:h,iconContainerWidth:p}=cn;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:h},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:h-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 h=!1,p;return t.Children.forEach(n,C=>{!t.isValidElement(C)||(p=C.props.children)}),t.Children.forEach(p,C=>{!t.isValidElement(C)||(C.props.dropdownItems?C.props.dropdownItems.map(x=>f.push(x.to)):C.props.to&&f.push(C.props.to))}),h=f.some(C=>{const x=(0,Dn.i3)(C);return js(a,x)}),h}const Qs=({text:n,hasNotifications:a=!1,icon:f,children:h})=>{const p=ha(),[C,x]=(0,t.useState)(!1),W=(0,Dn.TH)(),Y=Ys(h,W),z=()=>{x(!0)},ae=()=>{x(!1)},{isOpen:oe}=(0,t.useContext)(Er),ve=t.createElement(ka.Z,{color:"secondary",variant:"dot",overlap:"circular",className:oe?"":p.closedItemIcon,invisible:!a},t.createElement(f,{fontSize:"small"})),Re=t.createElement(t.Fragment,null,t.createElement("div",{"data-testid":"login-button",className:p.iconContainer},ve),n&&t.createElement(Fe.Z,{variant:"subtitle2",className:p.label},n),t.createElement("div",{className:p.secondaryAction})),Pe=ve;return t.createElement(Ya.Provider,{value:{isHoveredOn:C,setIsHoveredOn:x}},t.createElement("div",{onMouseLeave:ae,className:de()(C&&p.highlighted)},t.createElement("div",{onMouseEnter:z,"data-testid":"item-with-submenu",className:de()(p.root,oe?p.open:p.closed,Y&&p.selected,p.highlightable,C&&p.highlighted)},oe?Re:Pe,!C&&t.createElement(Js.Z,{fontSize:"small",className:p.submenuArrow})),C&&h))};function qa(n){return n.to===void 0}const Xs=t.forwardRef(function({to:a,end:f,style:h,className:p,activeStyle:C,caseSensitive:x,activeClassName:W="active","aria-current":Y="page",...z},ae){let{pathname:oe}=(0,Dn.TH)(),{pathname:ve}=(0,Dn.WU)(a);x||(oe=oe.toLocaleLowerCase("en-US"),ve=ve.toLocaleLowerCase("en-US"));let Re=oe===ve;!Re&&!f&&(Re=oe.startsWith(`${ve}/`));const Pe=Re?Y:void 0;return t.createElement(i.rU,{...z,to:a,ref:ae,"aria-current":Pe,style:{...h,...Re?C:void 0},className:de()([p,Re?W:void 0])})}),_a=(0,t.forwardRef)((n,a)=>{const{icon:f,text:h,hasNotifications:p=!1,disableHighlight:C=!1,onClick:x,children:W,className:Y,...z}=n,ae=ha(),{isOpen:oe}=(0,t.useContext)(Er),ve=t.createElement(ka.Z,{color:"secondary",variant:"dot",overlap:"circular",invisible:!p,className:de()({[ae.closedItemIcon]:!oe})},t.createElement(f,{fontSize:"small"})),Re=ve,Pe=t.createElement(t.Fragment,null,t.createElement("div",{"data-testid":"login-button",className:ae.iconContainer},ve),h&&t.createElement(Fe.Z,{variant:"subtitle2",className:ae.label},h),t.createElement("div",{className:ae.secondaryAction},W)),ut=oe?Pe:Re,tn={onClick:x,className:de()(Y,ae.root,oe?ae.open:ae.closed,qa(n)&&ae.buttonItem,{[ae.highlightable]:!C})};let qt=!1,Ht;const Qe=t.createElement(Ks,null,t.createElement(t.Fragment,null)).type,Ft=(0,l.useElementFilter)(W,Pt=>Pt.getElements().filter(_t=>_t.type===Qe));if(Ft.length>1)throw new Error("Cannot render more than one SidebarSubmenu inside a SidebarItem");return Ft.length===1&&(qt=!0,Ht=Ft[0]),qt?t.createElement(Qs,{text:h,icon:f,hasNotifications:p},Ht):qa(n)?t.createElement("button",{"aria-label":h,...tn,ref:a},ut):t.createElement(Xs,{...tn,activeClassName:ae.selected,to:n.to?n.to:"",ref:a,"aria-label":h||n.to,...z},ut)});function Xi(n){const[a,f]=useState(""),h=ha(),p=n.icon?n.icon:SearchIcon,C=()=>{n.onSearch(a),f("")},x=ae=>{ae.key==="Enter"&&(ae.preventDefault(),C())},W=ae=>{f(ae.target.value)},Y=ae=>{ae.preventDefault(),ae.stopPropagation()},z=ae=>{C(),ae.preventDefault()};return React.createElement("div",{className:h.searchRoot},React.createElement(_a,{icon:p,to:n.to,onClick:z,disableHighlight:!0},React.createElement(TextField,{placeholder:"Search",value:a,onClick:Y,onChange:W,onKeyDown:x,className:h.searchContainer,InputProps:{disableUnderline:!0,className:h.searchField},inputProps:{className:h.searchFieldHTMLInput}})))}const ki=(0,Hr.Z)("div")({flex:1},{name:"BackstageSidebarSpace"}),qi=(0,Hr.Z)("div")({height:8},{name:"BackstageSidebarSpacer"}),ks=(0,Hr.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,Hr.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}}),ei=(0,s.Z)(n=>({introCard:{color:"#b5b5b5",fontSize:12,width:cn.drawerWidthOpen,marginTop:18,marginBottom:12,paddingLeft:cn.iconPadding,paddingRight:cn.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 ti(n){const a=ei(),{text:f,onClose:h}=n,p=()=>h();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 eo=n=>{const{text:a,onDismiss:f}=n,[h,p]=useState(!1),C=()=>{p(!0)};return React.createElement(Collapse,{in:!h,onExited:f},React.createElement(ti,{text:a,onClose:C}))},ni=null,ri="And your recently viewed plugins will pop up here!";function el(n){const{isOpen:a}=useContext(SidebarContext),f={starredItemsDismissed:!1,recentlyViewedItemsDismissed:!1},[h,p]=useLocalStorage(SIDEBAR_INTRO_LOCAL_STORAGE),{starredItemsDismissed:C,recentlyViewedItemsDismissed:x}=h!=null?h:{},W=()=>{p(z=>({...f,...z,starredItemsDismissed:!0}))},Y=()=>{p(z=>({...f,...z,recentlyViewedItemsDismissed:!0}))};return a?React.createElement(React.Fragment,null,!C&&React.createElement(React.Fragment,null,React.createElement(eo,{text:ni,onDismiss:W}),React.createElement(SidebarDivider,null)),!x&&React.createElement(eo,{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 t.createElement(je.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,h]=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:h}=oi(a);return{type:"user",userEntityRef:f,ownershipEntityRefs:h!=null?h:[]}}async getCredentials(){var f,h;return{token:await((h=(f=this.result).getIdToken)==null?void 0:h.call(f))}}async signOut(){var a,f;return(f=(a=this.result).signOut)==null?void 0:f.call(a)}}class Ar{constructor(a,f,h){q(this,"profilePromise");this.identity=a,this.authApi=f,this.profile=h}static createGuest(){return new pa}static fromLegacy(a){return ya.fromResult(a)}static create(a){return new Ar(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:h,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 ${h} provider is not configured to support sign-in`);const z=await C.getProfile();a(Ar.create({identity:Y.identity,profile:z,authApi:C}))}catch(Y){x.post(new Or.SP("Login failed",Y))}};return t.createElement(ga,null,t.createElement(Ze,{variant:"fullHeight",title:h,actions:t.createElement(m.Z,{color:"primary",variant:"outlined",onClick:W},"Sign In")},t.createElement(Fe.Z,{variant:"body1"},p)))},loader:async(n,a)=>{const f=n.get(a),h=await f.getBackstageIdentity({optional:!0});if(!h)return;const p=await f.getProfile();return Ar.create({identity:h.identity,profile:p,authApi:f})}},ii={Component:({onSignInSuccess:n})=>t.createElement(ga,null,t.createElement(Ze,{title:"Guest",variant:"fullHeight",actions:t.createElement(m.Z,{color:"primary",variant:"outlined",onClick:()=>n(new pa)},"Enter")},t.createElement(Fe.Z,{variant:"body1"},"Enter as a Guest User.",t.createElement("br",null),"You will not have a verified identity,",t.createElement("br",null),"meaning some features might be unavailable."))),loader:async()=>new pa};var li=e(94106),to=e(86619),no=e(74828),ci=e(45455),ui=e.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:h,formState:p}=(0,li.cI)({mode:"onChange"}),{errors:C}=p,x=({userId:W})=>{n(Ar.fromLegacy({userId:W,profile:{email:`${W}@example.com`}}))};return t.createElement(ga,null,t.createElement(Ze,{title:"Custom User",variant:"fullHeight"},t.createElement(Fe.Z,{variant:"body1"},"Enter your own User ID and credentials.",t.createElement("br",null),"This selection will not be stored."),t.createElement("form",{className:a.form,onSubmit:h(x)},t.createElement(Gt.Z,null,t.createElement(to.Z,{...ro(f("userId",{required:!0})),label:"User ID",margin:"normal",error:Boolean(C.userId)}),C.userId&&t.createElement(no.Z,{error:!0},C.userId.message)),t.createElement(Gt.Z,null,t.createElement(to.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&&t.createElement(no.Z,{error:!0},C.idToken.message)),t.createElement(m.Z,{type:"submit",color:"primary",variant:"outlined",className:a.button,disabled:!(p==null?void 0:p.isDirty)||!ui()(C)},"Continue"))))},loader:async()=>{}},jr="@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,h)=>{if(typeof h=="string")return oo(h,f),f[h]={components:ao[h],id:h},f;const{id:p}=h;return oo(p,f),f[p]={components:ao.common,id:p,config:h},f},{})}const ll=(n,a)=>{const f=useApi(errorApiRef),h=useApiHolder(),[p,C]=useState(!0),x=useCallback(Y=>{a(IdentityApiSignOutProxy.from({identityApi:Y,signOut:async()=>{var z;localStorage.removeItem(jr),await((z=Y.signOut)==null?void 0:z.call(Y))}}))},[a]);useLayoutEffect(()=>{var oe;if(!p)return;const Y=localStorage.getItem(jr);if(Y===null){C(!1);return}const z=n[Y];if(!z){C(!1);return}let ae=!1;return z.components.loader(h,(oe=z.config)==null?void 0:oe.apiRef).then(ve=>{ae||(ve?x(ve):C(!1))}).catch(ve=>{ae||(localStorage.removeItem(jr),f.post(ve),C(!1))}),()=>{ae=!0}},[p,f,a,h,n,x]);const W=useMemo(()=>Object.keys(n).map(Y=>{const z=n[Y],{Component:ae}=z.components,oe=ve=>{localStorage.setItem(jr,z.id),x(ve)};return React.createElement(ae,{key:z.id,config:z.config,onSignInSuccess:oe})}),[n,x]);return[p,W]},hi=({onSignInSuccess:n,providers:a=[],title:f,align:h="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:h}),React.createElement(Grid,{container:!0,justifyContent:h==="center"?h:"flex-start",spacing:2,component:"ul",classes:C},Y)))},gi=({provider:n,auto:a,onSignInSuccess:f})=>{const h=useStyles(),p=useApi(n.apiRef),C=useApi(configApiRef),[x,W]=useState(),[Y,z]=useState(!1),ae=async({checkExisting:oe,showPopup:ve})=>{try{let Re;if(oe&&(Re=await p.getBackstageIdentity({optional:!0})),!Re&&(ve||a)&&(z(!0),Re=await p.getBackstageIdentity({instantPopup:!0}),!Re))throw new Error(`The ${n.title} provider is not configured to support sign-in`);if(!Re){z(!0);return}const Pe=await p.getProfile();f(UserIdentity.create({identity:Re.identity,authApi:p,profile:Pe}))}catch(Re){W(Re),z(!0)}};return useMount(()=>ae({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:h},React.createElement(GridItem,null,React.createElement(InfoCard,{variant:"fullHeight",title:n.title,actions:React.createElement(Button,{color:"primary",variant:"outlined",onClick:()=>{ae({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.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:h,title:p,deepLink:C,value:x,onChange:W}=n,Y=pi(),[z,ae]=useState(0),oe=W||((Pe,ut)=>ae(ut));let ve;x?React.Children.map(h,Pe=>{(Pe==null?void 0:Pe.props.value)===x&&(ve=Pe==null?void 0:Pe.props.children)}):React.Children.map(h,(Pe,ut)=>{ut===z&&(ve=Pe==null?void 0:Pe.props.children)});const Re=f||(a?{slackChannel:a}:{});return React.createElement(Card,null,React.createElement(ErrorBoundary,{...Re},p&&React.createElement(yi,{title:p}),React.createElement(Tabs,{selectionFollowsFocus:!0,classes:Y,value:x||z,onChange:oe},h),React.createElement(Divider,null),React.createElement(CardContent,null,ve),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,h=Ei();return React.createElement(Tab,{disableRipple:!0,classes:h,...f})}},88609:function(Q,o,e){"use strict";e.d(o,{Os:function(){return u},fC:function(){return g}});var r=e(76241),t=e(2784);const l=(0,r.CT)("analytics-context"),u=()=>{const c=(0,t.useContext)(l);if(c===void 0)return{routeRef:"unknown",pluginId:"root",extension:"App"};const d=c.atVersion(1);if(d===void 0)throw new Error("No context found for version 1.");return d},g=c=>{const{attributes:d,children:y}=c,E={...u(),...d},i=(0,r.EI)({1:E});return t.createElement(l.Provider,{value:i},y)};function s(c,d){const y=m=>React.createElement(g,{attributes:d},React.createElement(c,{...m}));return y.displayName=`WithAnalyticsContext(${c.displayName||c.name||"Component"})`,y}},28461:function(Q,o,e){"use strict";e.d(o,{f:function(){return r.fC},z:function(){return s}});var r=e(88609),t=e(27399),l=e(2784);class u{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 g(){try{return(0,t.useApi)(t.analyticsApiRef)}catch{return{captureEvent:()=>{}}}}function s(){const c=(0,l.useRef)(null),d=(0,r.Os)(),y=g();function m(){return c.current===null&&(c.current=new u(y)),c.current}const E=m();return E.setContext(d),E}},39135:function(Q,o,e){"use strict";e.d(o,{CL:function(){return X},sM:function(){return t},$v:function(){return P},v_:function(){return j},hg:function(){return F},uB:function(){return b},iW:function(){return c},bq:function(){return S},Ds:function(){return B},NW:function(){return N},VE:function(){return D},W0:function(){return V},gP:function(){return ce},F4:function(){return u},ux:function(){return s},Kp:function(){return l},$4:function(){return Se},p_:function(){return d},br:function(){return y},ZM:function(){return we},eC:function(){return m},D:function(){return g},gW:function(){return i},Yp:function(){return E},E6:function(){return he}});var r=e(86833),t;(function(Ge){const Le="SignedIn";Ge.SignedIn=Le;const Je="SignedOut";Ge.SignedOut=Je})(t||(t={}));const l=(0,r.T0)({id:"core.auth.google"}),u=(0,r.T0)({id:"core.auth.github"}),g=(0,r.T0)({id:"core.auth.okta"}),s=(0,r.T0)({id:"core.auth.gitlab"}),c=(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"}),P=(0,r.T0)({id:"core.alert"}),j=(0,r.T0)({id:"core.analytics"}),F=(0,r.T0)({id:"core.apptheme"}),B=(0,r.T0)({id:"core.config"}),N=(0,r.T0)({id:"core.discovery"}),D=(0,r.T0)({id:"core.error"});var X;(function(Ge){const Le=0;Ge[Ge.None=Le]="None";const Je=1;Ge[Ge.Active=Je]="Active"})(X||(X={}));const V=(0,r.T0)({id:"core.featureflags"}),ce=(0,r.T0)({id:"core.fetch"}),Se=(0,r.T0)({id:"core.identity"}),we=(0,r.T0)({id:"core.oauthrequest"}),he=(0,r.T0)({id:"core.storage"})},27399:function(Q,o,e){"use strict";e.d(o,{createApiFactory:function(){return r.createApiFactory},createApiRef:function(){return r.T0},useApi:function(){return r.h_},useApiHolder:function(){return r.I_},FeatureFlagState:function(){return t.CL},SessionState:function(){return t.sM},alertApiRef:function(){return t.$v},analyticsApiRef:function(){return t.v_},appThemeApiRef:function(){return t.hg},atlassianAuthApiRef:function(){return t.uB},auth0AuthApiRef:function(){return t.iW},bitbucketAuthApiRef:function(){return t.bq},configApiRef:function(){return t.Ds},discoveryApiRef:function(){return t.NW},errorApiRef:function(){return t.VE},featureFlagsApiRef:function(){return t.W0},fetchApiRef:function(){return t.gP},githubAuthApiRef:function(){return t.F4},gitlabAuthApiRef:function(){return t.ux},googleAuthApiRef:function(){return t.Kp},identityApiRef:function(){return t.$4},microsoftAuthApiRef:function(){return t.p_},oauth2ApiRef:function(){return t.br},oauthRequestApiRef:function(){return t.ZM},oidcAuthApiRef:function(){return t.eC},oktaAuthApiRef:function(){return t.D},oneloginAuthApiRef:function(){return t.gW},samlAuthApiRef:function(){return t.Yp},storageApiRef:function(){return t.E6}});var r=e(86833);e.o(r,"FeatureFlagState")&&e.d(o,{FeatureFlagState:function(){return r.FeatureFlagState}}),e.o(r,"SessionState")&&e.d(o,{SessionState:function(){return r.SessionState}}),e.o(r,"alertApiRef")&&e.d(o,{alertApiRef:function(){return r.alertApiRef}}),e.o(r,"analyticsApiRef")&&e.d(o,{analyticsApiRef:function(){return r.analyticsApiRef}}),e.o(r,"appThemeApiRef")&&e.d(o,{appThemeApiRef:function(){return r.appThemeApiRef}}),e.o(r,"atlassianAuthApiRef")&&e.d(o,{atlassianAuthApiRef:function(){return r.atlassianAuthApiRef}}),e.o(r,"attachComponentData")&&e.d(o,{attachComponentData:function(){return r.attachComponentData}}),e.o(r,"auth0AuthApiRef")&&e.d(o,{auth0AuthApiRef:function(){return r.auth0AuthApiRef}}),e.o(r,"bitbucketAuthApiRef")&&e.d(o,{bitbucketAuthApiRef:function(){return r.bitbucketAuthApiRef}}),e.o(r,"configApiRef")&&e.d(o,{configApiRef:function(){return r.configApiRef}}),e.o(r,"createComponentExtension")&&e.d(o,{createComponentExtension:function(){return r.createComponentExtension}}),e.o(r,"createExternalRouteRef")&&e.d(o,{createExternalRouteRef:function(){return r.createExternalRouteRef}}),e.o(r,"createPlugin")&&e.d(o,{createPlugin:function(){return r.createPlugin}}),e.o(r,"createRoutableExtension")&&e.d(o,{createRoutableExtension:function(){return r.createRoutableExtension}}),e.o(r,"createRouteRef")&&e.d(o,{createRouteRef:function(){return r.createRouteRef}}),e.o(r,"discoveryApiRef")&&e.d(o,{discoveryApiRef:function(){return r.discoveryApiRef}}),e.o(r,"errorApiRef")&&e.d(o,{errorApiRef:function(){return r.errorApiRef}}),e.o(r,"featureFlagsApiRef")&&e.d(o,{featureFlagsApiRef:function(){return r.featureFlagsApiRef}}),e.o(r,"fetchApiRef")&&e.d(o,{fetchApiRef:function(){return r.fetchApiRef}}),e.o(r,"getComponentData")&&e.d(o,{getComponentData:function(){return r.getComponentData}}),e.o(r,"githubAuthApiRef")&&e.d(o,{githubAuthApiRef:function(){return r.githubAuthApiRef}}),e.o(r,"gitlabAuthApiRef")&&e.d(o,{gitlabAuthApiRef:function(){return r.gitlabAuthApiRef}}),e.o(r,"googleAuthApiRef")&&e.d(o,{googleAuthApiRef:function(){return r.googleAuthApiRef}}),e.o(r,"identityApiRef")&&e.d(o,{identityApiRef:function(){return r.identityApiRef}}),e.o(r,"microsoftAuthApiRef")&&e.d(o,{microsoftAuthApiRef:function(){return r.microsoftAuthApiRef}}),e.o(r,"oauth2ApiRef")&&e.d(o,{oauth2ApiRef:function(){return r.oauth2ApiRef}}),e.o(r,"oauthRequestApiRef")&&e.d(o,{oauthRequestApiRef:function(){return r.oauthRequestApiRef}}),e.o(r,"oidcAuthApiRef")&&e.d(o,{oidcAuthApiRef:function(){return r.oidcAuthApiRef}}),e.o(r,"oktaAuthApiRef")&&e.d(o,{oktaAuthApiRef:function(){return r.oktaAuthApiRef}}),e.o(r,"oneloginAuthApiRef")&&e.d(o,{oneloginAuthApiRef:function(){return r.oneloginAuthApiRef}}),e.o(r,"samlAuthApiRef")&&e.d(o,{samlAuthApiRef:function(){return r.samlAuthApiRef}}),e.o(r,"storageApiRef")&&e.d(o,{storageApiRef:function(){return r.storageApiRef}}),e.o(r,"useApp")&&e.d(o,{useApp:function(){return r.useApp}}),e.o(r,"useElementFilter")&&e.d(o,{useElementFilter:function(){return r.useElementFilter}}),e.o(r,"useRouteRef")&&e.d(o,{useRouteRef:function(){return r.useRouteRef}}),e.o(r,"useRouteRefParams")&&e.d(o,{useRouteRefParams:function(){return r.useRouteRefParams}});var t=e(39135)},90515:function(Q,o,e){"use strict";e.d(o,{T:function(){return t}});class r{constructor(u){if(this.config=u,!u.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 '${u.id}'`)}get id(){return this.config.id}get T(){throw new Error(`tried to read ApiRef.T of ${this}`)}toString(){return`apiRef{${this.config.id}}`}}function t(l){return new r(l)}},25182:function(Q,o,e){"use strict";e.d(o,{n:function(){return r}});function r(t,l){return"id"in t?{api:t,deps:{},factory:()=>l}:t}},86833:function(Q,o,e){"use strict";e.d(o,{h_:function(){return r.h_},I_:function(){return r.I_},T0:function(){return t.T},createApiFactory:function(){return g.n}});var r=e(5761),t=e(90515),l=e(16362),u=e.n(l);e.o(l,"FeatureFlagState")&&e.d(o,{FeatureFlagState:function(){return l.FeatureFlagState}}),e.o(l,"SessionState")&&e.d(o,{SessionState:function(){return l.SessionState}}),e.o(l,"alertApiRef")&&e.d(o,{alertApiRef:function(){return l.alertApiRef}}),e.o(l,"analyticsApiRef")&&e.d(o,{analyticsApiRef:function(){return l.analyticsApiRef}}),e.o(l,"appThemeApiRef")&&e.d(o,{appThemeApiRef:function(){return l.appThemeApiRef}}),e.o(l,"atlassianAuthApiRef")&&e.d(o,{atlassianAuthApiRef:function(){return l.atlassianAuthApiRef}}),e.o(l,"attachComponentData")&&e.d(o,{attachComponentData:function(){return l.attachComponentData}}),e.o(l,"auth0AuthApiRef")&&e.d(o,{auth0AuthApiRef:function(){return l.auth0AuthApiRef}}),e.o(l,"bitbucketAuthApiRef")&&e.d(o,{bitbucketAuthApiRef:function(){return l.bitbucketAuthApiRef}}),e.o(l,"configApiRef")&&e.d(o,{configApiRef:function(){return l.configApiRef}}),e.o(l,"createApiFactory")&&e.d(o,{createApiFactory:function(){return l.createApiFactory}}),e.o(l,"createComponentExtension")&&e.d(o,{createComponentExtension:function(){return l.createComponentExtension}}),e.o(l,"createExternalRouteRef")&&e.d(o,{createExternalRouteRef:function(){return l.createExternalRouteRef}}),e.o(l,"createPlugin")&&e.d(o,{createPlugin:function(){return l.createPlugin}}),e.o(l,"createRoutableExtension")&&e.d(o,{createRoutableExtension:function(){return l.createRoutableExtension}}),e.o(l,"createRouteRef")&&e.d(o,{createRouteRef:function(){return l.createRouteRef}}),e.o(l,"discoveryApiRef")&&e.d(o,{discoveryApiRef:function(){return l.discoveryApiRef}}),e.o(l,"errorApiRef")&&e.d(o,{errorApiRef:function(){return l.errorApiRef}}),e.o(l,"featureFlagsApiRef")&&e.d(o,{featureFlagsApiRef:function(){return l.featureFlagsApiRef}}),e.o(l,"fetchApiRef")&&e.d(o,{fetchApiRef:function(){return l.fetchApiRef}}),e.o(l,"getComponentData")&&e.d(o,{getComponentData:function(){return l.getComponentData}}),e.o(l,"githubAuthApiRef")&&e.d(o,{githubAuthApiRef:function(){return l.githubAuthApiRef}}),e.o(l,"gitlabAuthApiRef")&&e.d(o,{gitlabAuthApiRef:function(){return l.gitlabAuthApiRef}}),e.o(l,"googleAuthApiRef")&&e.d(o,{googleAuthApiRef:function(){return l.googleAuthApiRef}}),e.o(l,"identityApiRef")&&e.d(o,{identityApiRef:function(){return l.identityApiRef}}),e.o(l,"microsoftAuthApiRef")&&e.d(o,{microsoftAuthApiRef:function(){return l.microsoftAuthApiRef}}),e.o(l,"oauth2ApiRef")&&e.d(o,{oauth2ApiRef:function(){return l.oauth2ApiRef}}),e.o(l,"oauthRequestApiRef")&&e.d(o,{oauthRequestApiRef:function(){return l.oauthRequestApiRef}}),e.o(l,"oidcAuthApiRef")&&e.d(o,{oidcAuthApiRef:function(){return l.oidcAuthApiRef}}),e.o(l,"oktaAuthApiRef")&&e.d(o,{oktaAuthApiRef:function(){return l.oktaAuthApiRef}}),e.o(l,"oneloginAuthApiRef")&&e.d(o,{oneloginAuthApiRef:function(){return l.oneloginAuthApiRef}}),e.o(l,"samlAuthApiRef")&&e.d(o,{samlAuthApiRef:function(){return l.samlAuthApiRef}}),e.o(l,"storageApiRef")&&e.d(o,{storageApiRef:function(){return l.storageApiRef}}),e.o(l,"useApp")&&e.d(o,{useApp:function(){return l.useApp}}),e.o(l,"useElementFilter")&&e.d(o,{useElementFilter:function(){return l.useElementFilter}}),e.o(l,"useRouteRef")&&e.d(o,{useRouteRef:function(){return l.useRouteRef}}),e.o(l,"useRouteRefParams")&&e.d(o,{useRouteRefParams:function(){return l.useRouteRefParams}});var g=e(25182)},16362:function(){},5761:function(Q,o,e){"use strict";e.d(o,{I_:function(){return l},h_:function(){return u}});var r=e(2784),t=e(76241);function l(){const s=(0,t.Vt)("api-context");if(!s)throw new Error("API context is not available");const c=s.atVersion(1);if(!c)throw new Error("ApiContext v1 not available");return c}function u(s){const d=l().get(s);if(!d)throw new Error(`No implementation available for ${s}`);return d}function g(s){return function(d){const y=E=>{const i=l(),S={};for(const b in s)if(s.hasOwnProperty(b)){const P=s[b],j=i.get(P);if(!j)throw new Error(`No implementation available for ${P}`);S[b]=j}return React.createElement(d,{...E,...S})},m=d.displayName||d.name||"Component";return y.displayName=`withApis(${m})`,y}}},31311:function(Q,o,e){"use strict";e.d(o,{q:function(){return r.q}});var r=e(32483),t=e(67229),l=e.n(t);e.o(t,"attachComponentData")&&e.d(o,{attachComponentData:function(){return t.attachComponentData}}),e.o(t,"createApiFactory")&&e.d(o,{createApiFactory:function(){return t.createApiFactory}}),e.o(t,"createApiRef")&&e.d(o,{createApiRef:function(){return t.createApiRef}}),e.o(t,"createComponentExtension")&&e.d(o,{createComponentExtension:function(){return t.createComponentExtension}}),e.o(t,"createExternalRouteRef")&&e.d(o,{createExternalRouteRef:function(){return t.createExternalRouteRef}}),e.o(t,"createPlugin")&&e.d(o,{createPlugin:function(){return t.createPlugin}}),e.o(t,"createRoutableExtension")&&e.d(o,{createRoutableExtension:function(){return t.createRoutableExtension}}),e.o(t,"createRouteRef")&&e.d(o,{createRouteRef:function(){return t.createRouteRef}}),e.o(t,"getComponentData")&&e.d(o,{getComponentData:function(){return t.getComponentData}}),e.o(t,"useApi")&&e.d(o,{useApi:function(){return t.useApi}}),e.o(t,"useApiHolder")&&e.d(o,{useApiHolder:function(){return t.useApiHolder}}),e.o(t,"useElementFilter")&&e.d(o,{useElementFilter:function(){return t.useElementFilter}}),e.o(t,"useRouteRef")&&e.d(o,{useRouteRef:function(){return t.useRouteRef}}),e.o(t,"useRouteRefParams")&&e.d(o,{useRouteRefParams:function(){return t.useRouteRefParams}})},67229:function(){},32483:function(Q,o,e){"use strict";e.d(o,{q:function(){return t}});var r=e(76241);const t=()=>{const l=(0,r.Vt)("app-context");if(!l)throw new Error("App context is not available");const u=l.atVersion(1);if(!u)throw new Error("AppContext v1 not available");return u}},74181:function(Q,o,e){"use strict";e.d(o,{R5:function(){return u},CO:function(){return i},P4:function(){return E},IY:function(){return g},vJ:function(){return F}});var r=e(76241);const t=(0,r.uW)("component-data-store",()=>new WeakMap),l="__backstage_data";function u(B,N,D){var ce;const X=B;let V=(ce=X[l])!=null?ce:t.get(B);if(V||(V={map:new Map},Object.defineProperty(X,l,{enumerable:!1,configurable:!0,writable:!1,value:V}),t.set(B,V)),V.map.has(N)){const Se=B.displayName||B.name;throw new Error(`Attempted to attach duplicate data "${N}" to component "${Se}"`)}V.map.set(N,D)}function g(B,N){var V;if(!B)return;const D=B.type;if(!D)return;const X=(V=D[l])!=null?V:t.get(D);if(!!X)return X.map.get(N)}var s=e(2784),c=e(88609),d=e(31311),y=e(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(N){return{error:N}}render(){const{error:N}=this.state,{app:D,plugin:X}=this.props,{ErrorBoundaryFallback:V}=D.getComponents();return N?s.createElement(V,{error:N,resetError:this.handleErrorReset,plugin:X}):this.props.children}}function E(B){const{component:N,mountPoint:D,name:X}=B;return S({component:{lazy:()=>N().then(V=>{const ce=we=>{try{(0,y.tg)(D)}catch(he){if(typeof he=="object"&&he!==null){const{message:Ge}=he;if(typeof Ge=="string"&&Ge.startsWith("No path for "))throw new Error(`Routable extension component with mount point ${D} was not discovered in the app element tree. Routable extension components may not be rendered by other components and must be directly available as an element within the App provider component.`)}throw he}return s.createElement(V,{...we})},Se=X||V.displayName||V.name||"LazyComponent";return ce.displayName=`RoutableExtension(${Se})`,ce},V=>Se=>{const we=(0,d.q)(),{BootErrorPage:he}=we.getComponents();return s.createElement(he,{step:"load-chunk",error:V})})},data:{"core.mountPoint":D},name:X})}function i(B){const{component:N,name:D}=B;return S({component:N,name:D})}function S(B){const{data:N={},name:D}=B;D||console.warn("Declaring extensions without name is DEPRECATED. Make sure that all usages of createReactExtension, createComponentExtension and createRoutableExtension provide a name.");let X;if("lazy"in B.component){const ce=B.component.lazy;X=(0,s.lazy)(()=>ce().then(Se=>({default:Se})))}else X=B.component.sync;const V=D||X.displayName||X.name||"Component";return{expose(ce){const Se=we=>{const he=(0,d.q)(),{Progress:Ge}=he.getComponents(),Le=N==null?void 0:N["core.mountPoint"];return s.createElement(s.Suspense,{fallback:s.createElement(Ge,null)},s.createElement(m,{app:he,plugin:ce},s.createElement(c.fC,{attributes:{pluginId:ce.getId(),...D&&{extension:D},...Le&&{routeRef:Le.id}}},s.createElement(X,{...we}))))};u(Se,"core.plugin",ce);for(const[we,he]of Object.entries(N))u(Se,we,he);return Se.displayName=`Extension(${V})`,Se}}}var b=e(27399);function P(B,N,D,X){return s.Children.toArray(B).flatMap(V=>{if(!(0,s.isValidElement)(V))return[];if(V.type===s.Fragment)return P(V.props.children,N,D,X);if(g(V,"core.featureFlagged")){const ce=V.props;return("with"in ce?N.isActive(ce.with):!N.isActive(ce.without))?P(V.props.children,N,D,X):[]}if(D===void 0||D(V))return[V];if(X)throw new Error(X);return P(V.props.children,N,D,X)})}class j{constructor(N,D){this.node=N,this.featureFlagsApi=D}selectByComponentData(N){const D=P(this.node,this.featureFlagsApi,X=>g(X,N.key)!==void 0,N.withStrictError);return new j(D,this.featureFlagsApi)}findComponentData(N){return P(this.node,this.featureFlagsApi,X=>g(X,N.key)!==void 0).map(X=>g(X,N.key)).filter(X=>X!==void 0)}getElements(){return P(this.node,this.featureFlagsApi)}}function F(B,N,D=[]){const X=(0,b.useApi)(b.featureFlagsApiRef),V=new j(B,X);return(0,s.useMemo)(()=>N(V),[B,...D])}},80274:function(){},36964:function(Q,o,e){"use strict";e.d(o,{AnalyticsContext:function(){return r.f},useAnalytics:function(){return r.z},FeatureFlagState:function(){return t.FeatureFlagState},SessionState:function(){return t.SessionState},alertApiRef:function(){return t.alertApiRef},analyticsApiRef:function(){return t.analyticsApiRef},appThemeApiRef:function(){return t.appThemeApiRef},atlassianAuthApiRef:function(){return t.atlassianAuthApiRef},auth0AuthApiRef:function(){return t.auth0AuthApiRef},bitbucketAuthApiRef:function(){return t.bitbucketAuthApiRef},configApiRef:function(){return t.configApiRef},discoveryApiRef:function(){return t.discoveryApiRef},errorApiRef:function(){return t.errorApiRef},featureFlagsApiRef:function(){return t.featureFlagsApiRef},fetchApiRef:function(){return t.fetchApiRef},githubAuthApiRef:function(){return t.githubAuthApiRef},gitlabAuthApiRef:function(){return t.gitlabAuthApiRef},googleAuthApiRef:function(){return t.googleAuthApiRef},identityApiRef:function(){return t.identityApiRef},microsoftAuthApiRef:function(){return t.microsoftAuthApiRef},oauth2ApiRef:function(){return t.oauth2ApiRef},oauthRequestApiRef:function(){return t.oauthRequestApiRef},oidcAuthApiRef:function(){return t.oidcAuthApiRef},oktaAuthApiRef:function(){return t.oktaAuthApiRef},oneloginAuthApiRef:function(){return t.oneloginAuthApiRef},samlAuthApiRef:function(){return t.samlAuthApiRef},storageApiRef:function(){return t.storageApiRef},useApp:function(){return l.q},attachComponentData:function(){return u.R5},createComponentExtension:function(){return u.CO},createRoutableExtension:function(){return u.P4},getComponentData:function(){return u.IY},useElementFilter:function(){return u.vJ},createPlugin:function(){return c.r},createExternalRouteRef:function(){return d.x8},createRouteRef:function(){return d.NT},useRouteRef:function(){return d.tg},useRouteRefParams:function(){return d.Oi}});var r=e(28461),t=e(27399);e.o(t,"attachComponentData")&&e.d(o,{attachComponentData:function(){return t.attachComponentData}}),e.o(t,"createApiFactory")&&e.d(o,{createApiFactory:function(){return t.createApiFactory}}),e.o(t,"createApiRef")&&e.d(o,{createApiRef:function(){return t.createApiRef}}),e.o(t,"createComponentExtension")&&e.d(o,{createComponentExtension:function(){return t.createComponentExtension}}),e.o(t,"createExternalRouteRef")&&e.d(o,{createExternalRouteRef:function(){return t.createExternalRouteRef}}),e.o(t,"createPlugin")&&e.d(o,{createPlugin:function(){return t.createPlugin}}),e.o(t,"createRoutableExtension")&&e.d(o,{createRoutableExtension:function(){return t.createRoutableExtension}}),e.o(t,"createRouteRef")&&e.d(o,{createRouteRef:function(){return t.createRouteRef}}),e.o(t,"getComponentData")&&e.d(o,{getComponentData:function(){return t.getComponentData}}),e.o(t,"useApi")&&e.d(o,{useApi:function(){return t.useApi}}),e.o(t,"useApiHolder")&&e.d(o,{useApiHolder:function(){return t.useApiHolder}}),e.o(t,"useApp")&&e.d(o,{useApp:function(){return t.useApp}}),e.o(t,"useElementFilter")&&e.d(o,{useElementFilter:function(){return t.useElementFilter}}),e.o(t,"useRouteRef")&&e.d(o,{useRouteRef:function(){return t.useRouteRef}}),e.o(t,"useRouteRefParams")&&e.d(o,{useRouteRefParams:function(){return t.useRouteRefParams}});var l=e(31311);e.o(l,"attachComponentData")&&e.d(o,{attachComponentData:function(){return l.attachComponentData}}),e.o(l,"createApiFactory")&&e.d(o,{createApiFactory:function(){return l.createApiFactory}}),e.o(l,"createApiRef")&&e.d(o,{createApiRef:function(){return l.createApiRef}}),e.o(l,"createComponentExtension")&&e.d(o,{createComponentExtension:function(){return l.createComponentExtension}}),e.o(l,"createExternalRouteRef")&&e.d(o,{createExternalRouteRef:function(){return l.createExternalRouteRef}}),e.o(l,"createPlugin")&&e.d(o,{createPlugin:function(){return l.createPlugin}}),e.o(l,"createRoutableExtension")&&e.d(o,{createRoutableExtension:function(){return l.createRoutableExtension}}),e.o(l,"createRouteRef")&&e.d(o,{createRouteRef:function(){return l.createRouteRef}}),e.o(l,"getComponentData")&&e.d(o,{getComponentData:function(){return l.getComponentData}}),e.o(l,"useApi")&&e.d(o,{useApi:function(){return l.useApi}}),e.o(l,"useApiHolder")&&e.d(o,{useApiHolder:function(){return l.useApiHolder}}),e.o(l,"useElementFilter")&&e.d(o,{useElementFilter:function(){return l.useElementFilter}}),e.o(l,"useRouteRef")&&e.d(o,{useRouteRef:function(){return l.useRouteRef}}),e.o(l,"useRouteRefParams")&&e.d(o,{useRouteRefParams:function(){return l.useRouteRefParams}});var u=e(74181),g=e(80274),s=e.n(g);e.o(g,"createApiFactory")&&e.d(o,{createApiFactory:function(){return g.createApiFactory}}),e.o(g,"createApiRef")&&e.d(o,{createApiRef:function(){return g.createApiRef}}),e.o(g,"createExternalRouteRef")&&e.d(o,{createExternalRouteRef:function(){return g.createExternalRouteRef}}),e.o(g,"createPlugin")&&e.d(o,{createPlugin:function(){return g.createPlugin}}),e.o(g,"createRouteRef")&&e.d(o,{createRouteRef:function(){return g.createRouteRef}}),e.o(g,"useApi")&&e.d(o,{useApi:function(){return g.useApi}}),e.o(g,"useApiHolder")&&e.d(o,{useApiHolder:function(){return g.useApiHolder}}),e.o(g,"useRouteRef")&&e.d(o,{useRouteRef:function(){return g.useRouteRef}}),e.o(g,"useRouteRefParams")&&e.d(o,{useRouteRefParams:function(){return g.useRouteRefParams}});var c=e(96896),d=e(82772)},96896:function(Q,o,e){"use strict";e.d(o,{r:function(){return t}});class r{constructor(u){this.config=u}getId(){return this.config.id}getApis(){var u;return(u=this.config.apis)!=null?u:[]}getFeatureFlags(){var u,g;return(g=(u=this.config.featureFlags)==null?void 0:u.slice())!=null?g:[]}get routes(){var u;return(u=this.config.routes)!=null?u:{}}get externalRoutes(){var u;return(u=this.config.externalRoutes)!=null?u:{}}provide(u){return u.expose(this)}toString(){return`plugin{${this.config.id}}`}}function t(l){return new r(l)}},82772:function(Q,o,e){var b,P,j;"use strict";e.d(o,{x8:function(){return y},NT:function(){return u},tg:function(){return i},Oi:function(){return S}});var r=e(76241);const t=(0,r.uW)("route-ref-type",()=>Symbol("route-ref-type"));class l{constructor(B,N){q(this,b,"absolute");this.id=B,this.params=N}get title(){return this.id}toString(){return`routeRef{type=absolute,id=${this.id}}`}}b=t;function u(F){var B;return new l(F.id,(B=F.params)!=null?B:[])}const g=/^\w+$/;class s{constructor(B,N,D,X){q(this,P,"sub");this.id=B,this.path=N,this.parent=D,this.params=X}toString(){return`routeRef{type=sub,id=${this.id}}`}}P=t;function c(F){const{id:B,path:N,parent:D}=F,X=N.split("/").filter(Se=>Se.startsWith(":")).map(Se=>Se.substring(1)),V=[...D.params,...X];if(D.params.some(Se=>X.includes(Se)))throw new Error("SubRouteRef may not have params that overlap with its parent");if(!N.startsWith("/"))throw new Error(`SubRouteRef path must start with '/', got '${N}'`);if(N.endsWith("/"))throw new Error(`SubRouteRef path must not end with '/', got '${N}'`);for(const Se of X)if(!g.test(Se))throw new Error(`SubRouteRef path has invalid param, got '${Se}'`);return new s(B,N,D,V)}class d{constructor(B,N,D){q(this,j,"external");this.id=B,this.params=N,this.optional=D}toString(){return`routeRef{type=external,id=${this.id}}`}}j=t;function y(F){var B;return new d(F.id,(B=F.params)!=null?B:[],Boolean(F.optional))}var m=e(2784),E=e(10289);function i(F){const B=(0,E.TH)(),N=(0,r.Vt)("routing-context");if(!N)throw new Error("Routing context is not available");const D=N.atVersion(1),X=(0,m.useMemo)(()=>D&&D.resolve(F,B),[D,F,B]);if(!N)throw new Error("useRouteRef used outside of routing context");if(!D)throw new Error("RoutingContext v1 not available");const V="optional"in F&&F.optional;if(!X&&!V)throw new Error(`No path for ${F}`);return X}function S(F){return(0,E.UO)()}},63865:function(Q,o,e){"use strict";var r={};e.r(r),e.d(r,{TechDocsPlugin:function(){return xe}});var t=e(2784),l=e(9832),u=e(10289),g=e(49208),s=e(36964);const c=(0,s.createApiRef)({id:"plugin.permission.api"});var d;(function(A){const L="DENY";A.DENY=L;const H="ALLOW";A.ALLOW=H;const re="CONDITIONAL";A.CONDITIONAL=re})(d||(d={}));var y=e(10179),m=e(96279),E=e.n(m),i=e(9571),S=e(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}))),P=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 j{constructor(L){q(this,"enabled");q(this,"discovery");var H;this.discovery=L.discovery,this.enabled=(H=L.config.getOptionalBoolean("permission.enabled"))!=null?H:!1}async authorize(L,H){if(!this.enabled)return L.map($e=>({result:d.ALLOW}));const re=L.map($e=>({id:i.Z(),...$e})),Ee=await this.discovery.getBaseUrl("permission"),Ne=await E()(`${Ee}/authorize`,{method:"POST",body:JSON.stringify(re),headers:{...this.getAuthorizationHeader(H==null?void 0:H.token),"content-type":"application/json"}});if(!Ne.ok)throw await y.VL.fromResponse(Ne);const Te=await Ne.json();this.assertValidResponses(re,Te);const Ke=Te.reduce(($e,ft)=>($e[ft.id]=ft,$e),{});return re.map($e=>Ke[$e.id])}getAuthorizationHeader(L){return L?{Authorization:`Bearer ${L}`}:{}}assertValidResponses(L,H){const Ee=P.parse(H).map(Te=>Te.id);if(!L.every(Te=>Ee.includes(Te.id)))throw new Error("Unexpected authorization response from permission-backend")}}class F{constructor(L,H){this.permissionClient=L,this.identityApi=H}static create(L){const{config:H,discovery:re,identity:Ee}=L,Ne=new j({discovery:re,config:H});return new F(Ne,Ee)}async authorize(L){return(await this.permissionClient.authorize([L],{token:await this.identityApi.getIdToken()}))[0]}}const B=(A,L)=>{const H=useApi(permissionApiRef),{loading:re,error:Ee,value:Ne}=useAsync(async()=>{const{result:Te}=await H.authorize({permission:A,resourceRef:L});return Te},[H,A,L]);return re?{loading:!0,allowed:!1}:Ee?{error:Ee,loading:!1,allowed:!1}:{loading:!1,allowed:Ne===AuthorizeResult.ALLOW}},N=A=>{const{permission:L,resourceRef:H,errorComponent:re,...Ee}=A,Ne=usePermission(L,H),Te=useApp(),{NotFoundErrorPage:Ke}=Te.getComponents();let $e=re===void 0?React.createElement(Ke,null):re;return Ne.loading?$e=null:Ne.allowed&&($e=A.element),React.createElement(Route,{...Ee,element:$e})},D=[(0,s.createApiFactory)({api:s.discoveryApiRef,deps:{configApi:s.configApiRef},factory:({configApi:A})=>g.UrlPatternDiscovery.compile(`${A.getString("backend.baseUrl")}/api/{{ pluginId }}`)}),(0,s.createApiFactory)({api:s.alertApiRef,deps:{},factory:()=>new g.AlertApiForwarder}),(0,s.createApiFactory)({api:s.analyticsApiRef,deps:{},factory:()=>new g.NoOpAnalyticsApi}),(0,s.createApiFactory)({api:s.errorApiRef,deps:{alertApi:s.alertApiRef},factory:({alertApi:A})=>{const L=new g.ErrorAlerter(A,new g.ErrorApiForwarder);return g.UnhandledErrorForwarder.forward(L,{hidden:!1}),L}}),(0,s.createApiFactory)({api:s.storageApiRef,deps:{errorApi:s.errorApiRef},factory:({errorApi:A})=>g.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:H})=>(0,g.createFetchApi)({middleware:[g.FetchMiddlewares.resolvePluginProtocol({discoveryApi:H}),g.FetchMiddlewares.injectIdentityAuth({identityApi:L,config:A})]})}),(0,s.createApiFactory)({api:s.oauthRequestApiRef,deps:{},factory:()=>new g.OAuthRequestManager}),(0,s.createApiFactory)({api:s.googleAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:A,oauthRequestApi:L,configApi:H})=>g.GoogleAuth.create({discoveryApi:A,oauthRequestApi:L,environment:H.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:H})=>g.MicrosoftAuth.create({discoveryApi:A,oauthRequestApi:L,environment:H.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:H})=>g.GithubAuth.create({discoveryApi:A,oauthRequestApi:L,defaultScopes:["read:user"],environment:H.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:H})=>g.OktaAuth.create({discoveryApi:A,oauthRequestApi:L,environment:H.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:H})=>g.GitlabAuth.create({discoveryApi:A,oauthRequestApi:L,environment:H.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:H})=>g.Auth0Auth.create({discoveryApi:A,oauthRequestApi:L,environment:H.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:H})=>g.OAuth2.create({discoveryApi:A,oauthRequestApi:L,environment:H.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.samlAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,configApi:s.configApiRef},factory:({discoveryApi:A,configApi:L})=>g.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:H})=>g.OneLoginAuth.create({discoveryApi:A,oauthRequestApi:L,environment:H.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:H})=>g.OAuth2.create({discoveryApi:A,oauthRequestApi:L,provider:{id:"oidc",title:"Your Identity Provider",icon:()=>null},environment:H.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:H})=>g.BitbucketAuth.create({discoveryApi:A,oauthRequestApi:L,defaultScopes:["team"],environment:H.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:H})=>g.AtlassianAuth.create({discoveryApi:A,oauthRequestApi:L,environment:H.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:c,deps:{discovery:s.discoveryApiRef,identity:s.identityApiRef,config:s.configApiRef},factory:({config:A,discovery:L,identity:H})=>F.create({config:A,discovery:L,identity:H})})];var X=e(77277),V=e(41682),ce=e(62833);function Se({children:A}){return(0,u.GV)()?t.createElement(t.Fragment,null,A):t.createElement(u.VA,null,A)}const we=()=>t.createElement(V.ErrorPage,{status:"404",statusMessage:"PAGE NOT FOUND"}),he=({step:A,error:L})=>{let H="";return A==="load-config"?H=`The configuration failed to load, someone should have a look at this error: ${L.message}`:A==="load-chunk"&&(H=`Lazy loaded chunk failed to load, try to reload the page: ${L.message}`),t.createElement(Se,null,t.createElement(V.ErrorPage,{status:"501",statusMessage:H}))},Ge=({error:A,resetError:L,plugin:H})=>t.createElement(V.ErrorPanel,{title:`Error in ${H==null?void 0:H.getId()}`,defaultExpanded:!0,error:A},t.createElement(X.Z,{variant:"outlined",onClick:L},"Retry")),Le={Progress:V.Progress,Router:ce.VK,NotFoundErrorPage:we,BootErrorPage:he,ErrorBoundaryFallback:Ge};var Je=e(43642),ot=e(80079),_e=e(90941),mt=e(32915),dt=e(40562),ct=e(21853),Et=e(60744),vt=e(66569),It=e(30254),At=e(13384),ht=e(15933),Ut=e(58838),Nt=e(86737),Dt=e(4989),Lt=e(44407),st=e(18628),Rt=e(84219),Zt=e(98685),De=e(39781);const it={brokenImage:ot.Z,catalog:st.Z,scaffolder:mt.Z,techdocs:dt.Z,search:ct.Z,chat:Et.Z,dashboard:vt.Z,docs:It.Z,email:At.Z,github:Ut.Z,group:Rt.Z,help:Nt.Z,"kind:api":ht.Z,"kind:component":Lt.Z,"kind:domain":Je.Z,"kind:group":Rt.Z,"kind:location":Dt.Z,"kind:system":_e.Z,"kind:user":Zt.Z,user:Zt.Z,warning:De.Z};var lt=e(73689),se=e(48032);const T={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")`},R={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 O(A,L){const re=`linear-gradient(90deg, ${(A.length===1?[A[0],A[0]]:A).join(", ")})`,Ee=`${L}, ${re}`;return{colors:A,shape:L,backgroundImage:Ee}}const U={home:O(R.teal,T.wave),documentation:O(R.pinkSea,T.wave2),tool:O(R.purpleSky,T.round),service:O(R.marineBlue,T.wave),website:O(R.veryBlue,T.wave),library:O(R.rubyRed,T.wave),other:O(R.darkGrey,T.wave),app:O(R.toastyOrange,T.wave),apis:O(R.teal,T.wave2)},G='"Helvetica Neue", Helvetica, Roboto, Arial, sans-serif';function ne(A){const{palette:L,fontFamily:H=G,defaultPageTheme:re,pageTheme:Ee=U}=A;if(!Ee[re])throw new Error(`${re} is not defined in pageTheme.`);return{palette:L,props:{MuiGrid:{spacing:2},MuiSwitch:{color:"primary"}},typography:{fontFamily:H,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:Ee[re],getPageTheme:({themeId:Ne})=>{var Te;return(Te=Ee[Ne])!=null?Te:Ee[re]}}}function ue(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,se.darken)(A.palette.link,.3),background:(0,se.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 ge(A){const L=ne(A),H=(0,lt.Z)(L),re=ue(H);return{...H,overrides:re}}var Oe=e(34505);const We=ge({palette:{type:"light",background:{default:"#F8F8F8"},status:{ok:"#1DB954",warning:"#FF9800",error:"#E22134",running:"#2E77D0",pending:"#FFED51",aborted:"#757575"},bursts:{fontColor:"#FEFEFE",slackChannelText:"#ddd",backgroundColor:{default:"#7C3699"},gradient:{linear:"linear-gradient(-137deg, #4BB8A5 0%, #187656 100%)"}},primary:{main:"#2E77D0"},banner:{info:"#2E77D0",error:"#E22134",text:"#FFFFFF",link:"#000000",warning:"#FF9800"},border:"#E6E6E6",textContrast:"#000000",textVerySubtle:"#DDD",textSubtle:"#6E6E6E",highlight:"#FFFBCC",errorBackground:"#FFEBEE",warningBackground:"#F59B23",infoBackground:"#ebf5ff",errorText:"#CA001B",infoText:"#004e8a",warningText:"#000000",linkHover:"#2196F3",link:"#0A6EBE",gold:Oe.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:U}),nt=ge({palette:{type:"dark",background:{default:"#333333"},status:{ok:"#71CF88",warning:"#FFB84D",error:"#F84C55",running:"#3488E3",pending:"#FEF071",aborted:"#9E9E9E"},bursts:{fontColor:"#FEFEFE",slackChannelText:"#ddd",backgroundColor:{default:"#7C3699"},gradient:{linear:"linear-gradient(-137deg, #4BB8A5 0%, #187656 100%)"}},primary:{main:"#9CC9FF",dark:"#82BAFD"},secondary:{main:"#FF88B2"},banner:{info:"#2E77D0",error:"#E22134",text:"#FFFFFF",link:"#000000",warning:"#FF9800"},border:"#E6E6E6",textContrast:"#FFFFFF",textVerySubtle:"#727272",textSubtle:"#CCCCCC",highlight:"#FFFBCC",errorBackground:"#FFEBEE",warningBackground:"#F59B23",infoBackground:"#ebf5ff",errorText:"#CA001B",infoText:"#004e8a",warningText:"#000000",linkHover:"#82BAFD",link:"#9CC9FF",gold:Oe.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:U});var Ie=e(98192),pe=e(15222),He=e(41547),de=e(87561);const Ce=[{id:"light",title:"Light Theme",variant:"light",icon:t.createElement(pe.Z,null),Provider:({children:A})=>t.createElement(He.Z,{theme:We},t.createElement(de.ZP,null,A))},{id:"dark",title:"Dark Theme",variant:"dark",icon:t.createElement(Ie.Z,null),Provider:({children:A})=>t.createElement(He.Z,{theme:nt},t.createElement(de.ZP,null,A))}];function ze(A){var L,H,re;return(0,g.createSpecializedApp)({...A,apis:(L=A==null?void 0:A.apis)!=null?L:[],bindRoutes:A==null?void 0:A.bindRoutes,components:{...Le,...A==null?void 0:A.components},configLoader:A==null?void 0:A.configLoader,defaultApis:D,icons:{...it,...A==null?void 0:A.icons},plugins:(H=A==null?void 0:A.plugins)!=null?H:[],themes:(re=A==null?void 0:A.themes)!=null?re:Ce})}var je=e(39398),Fe=e(49782),at=e(79692);const Be=(0,at.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",marginBottom:"1rem"}}),Xe=({result:A})=>{const L=Be();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 ke=e(91730),J=e(17499),v=e(52890),I=e(85653),K=e(95544),ee=e(99688),Ae=e(12231),me=e(86136),be=e(49378),Me=e(85256),yt=e(61837),Xt=e(79784),on=e(50758),ie=e(49166),w=e(43054);const _=(0,at.Z)({button:{color:"white"}}),ye=({UNSTABLE_extraContextMenuItems:A,UNSTABLE_contextMenuOptions:L,onUnregisterEntity:H})=>{var xt;const[re,Ee]=(0,t.useState)(),Ne=_(),Te=Ct=>{Ee(Ct.currentTarget)},Ke=()=>{Ee(void 0)},$e=A&&[...A.map(Ct=>t.createElement(Ae.Z,{key:Ct.title,onClick:()=>{Ke(),Ct.onClick()}},t.createElement(me.Z,null,t.createElement(Ct.Icon,{fontSize:"small"})),t.createElement(be.Z,{primary:Ct.title}))),t.createElement(Me.Z,{key:"the divider is here!"})],ft=(xt=L==null?void 0:L.disableUnregister)!=null?xt:!1;return t.createElement(t.Fragment,null,t.createElement(yt.Z,{"aria-label":"more","aria-controls":"long-menu","aria-haspopup":"true",onClick:Te,"data-testid":"menu-button",className:Ne.button},t.createElement(w.Z,null)),t.createElement(Xt.ZP,{open:Boolean(re),onClose:Ke,anchorEl:re,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}},t.createElement(on.Z,null,$e,t.createElement(Ae.Z,{onClick:()=>{Ke(),H()},disabled:ft},t.createElement(me.Z,null,t.createElement(ie.Z,{fontSize:"small"})),t.createElement(be.Z,{primary:"Unregister entity"})))))},Ve="plugin.catalog.entityLayoutRoute",et=()=>null;(0,s.attachComponentData)(et,Ve,!0),(0,s.attachComponentData)(et,"core.gatherMountPoints",!0);const pt=({entity:A,title:L})=>t.createElement(K.Z,{display:"inline-flex",alignItems:"center",height:"1em",maxWidth:"100%"},t.createElement(K.Z,{component:"span",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},L),A&&t.createElement(I.FavoriteEntity,{entity:A})),bt=(A,L,H,re)=>{var Ke,$e,ft,xt,Ct;const Ee=(Ke=A!=null?A:re==null?void 0:re.kind)!=null?Ke:"",Ne=($e=L!=null?L:re==null?void 0:re.metadata.namespace)!=null?$e:"";return{headerTitle:`${(Ct=(xt=(ft=re==null?void 0:re.metadata.title)!=null?ft:H)!=null?xt:re==null?void 0:re.metadata.name)!=null?Ct:""}${Ne&&Ne!==v.sk?` in ${Ne}`:""}`,headerType:(()=>{let Tt=Ee.toLocaleLowerCase("en-US");return re&&re.spec&&"type"in re.spec&&(Tt+=" \u2014 ",Tt+=re.spec.type.toLocaleLowerCase("en-US")),Tt})()}},an=({entity:A})=>{var H;const L=(0,I.getEntityRelations)(A,v.S4);return t.createElement(t.Fragment,null,L.length>0&&t.createElement(V.HeaderLabel,{label:"Owner",value:t.createElement(I.EntityRefLinks,{entityRefs:L,defaultKind:"Group",color:"inherit"})}),((H=A.spec)==null?void 0:H.lifecycle)&&t.createElement(V.HeaderLabel,{label:"Lifecycle",value:A.spec.lifecycle}))},hn=({UNSTABLE_extraContextMenuItems:A,UNSTABLE_contextMenuOptions:L,children:H})=>{var jn,Vn,sa;const{kind:re,namespace:Ee,name:Ne}=(0,I.useEntityCompoundName)(),{entity:Te,loading:Ke,error:$e}=(0,t.useContext)(I.EntityContext),ft=(0,s.useElementFilter)(H,Ia=>Ia.selectByComponentData({key:Ve,withStrictError:"Child of EntityLayout must be an EntityLayout.Route"}).getElements().flatMap(({props:xn})=>xn.if&&Te&&!xn.if(Te)?[]:[{path:xn.path,title:xn.title,children:xn.children,tabProps:xn.tabProps}]),[Te]),{headerTitle:xt,headerType:Ct}=bt(re,Ee,Ne,Te),[Tt,un]=(0,t.useState)(!1),dn=(0,u.s0)(),Mn=async()=>{un(!1),dn("/")},er=()=>un(!0);return t.createElement(V.Page,{themeId:(sa=(Vn=(jn=Te==null?void 0:Te.spec)==null?void 0:jn.type)==null?void 0:Vn.toString())!=null?sa:"home"},t.createElement(V.Header,{title:t.createElement(pt,{title:xt,entity:Te}),pageTitleOverride:xt,type:Ct},Te&&t.createElement(t.Fragment,null,t.createElement(an,{entity:Te}),t.createElement(ye,{UNSTABLE_extraContextMenuItems:A,UNSTABLE_contextMenuOptions:L,onUnregisterEntity:er}))),Ke&&t.createElement(V.Progress,null),Te&&t.createElement(V.RoutedTabs,{routes:ft}),$e&&t.createElement(V.Content,null,t.createElement(ee.Z,{severity:"error"},$e.toString())),!Ke&&!$e&&!Te&&t.createElement(V.Content,null,t.createElement(V.WarningPanel,{title:"Entity not found"},"There is no ",re," with the requested"," ",t.createElement(V.Link,{to:"https://backstage.io/docs/features/software-catalog/references"},"kind, namespace, and name"),".")),t.createElement(I.UnregisterEntityDialog,{open:Tt,entity:Te,onConfirm:Mn,onClose:()=>un(!1)}))};hn.Route=et;const Qn=({open:A,onClose:L,onConfirm:H,entity:re})=>{const[Ee,Ne]=useState(!1),Te=useApi(catalogApiRef),Ke=useApi(alertApiRef),$e=async()=>{Ne(!0);try{const ft=re.metadata.uid;await Te.removeEntityByUid(ft),H()}catch(ft){assertError(ft),Ke.post({message:ft.message})}finally{Ne(!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:Ee,onClick:$e},"Delete"),React.createElement(Button,{onClick:L,color:"primary"},"Cancel")))},Pn=A=>{var L,H;return((H=(L=A==null?void 0:A.metadata)==null?void 0:L.annotations)==null?void 0:H["backstage.io/orphan"])==="true"},In=()=>{const A=useNavigate(),L=useRouteRef(catalogRouteRef),[H,re]=useState(!1),{entity:Ee}=useEntity(),Ne=async()=>{re(!1),A(L())};return React.createElement(React.Fragment,null,React.createElement(Alert,{severity:"warning",onClick:()=>re(!0)},"This entity is not referenced by any location and is therefore not receiving updates. Click here to delete."),React.createElement(DeleteEntityDialog,{open:H,entity:Ee,onConfirm:Ne,onClose:()=>re(!1)}))};var gt=e(30001);const wt=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(Ee=>{var Ke,$e;return{errors:(($e=(Ke=Ee.entity.status)==null?void 0:Ke.items)!=null?$e:[]).filter(wt).map(ft=>ft.error).filter(ft=>Boolean(ft)),entity:Ee.entity}}).filter(Ee=>Ee.errors.length>0)}}const On=async(A,L)=>{const H=L.apis.get(catalogApiRef);if(!H)throw new Error(`No implementation available for ${catalogApiRef}`);return(await sn(stringifyEntityRef(A),H)).items.length>0},Vt=()=>{const{entity:A}=useEntity(),L=stringifyEntityRef(A),H=useApi(catalogApiRef),{loading:re,error:Ee,value:Ne}=useAsync(async()=>sn(L,H),[L,H]);return Ee?React.createElement(Box,{mb:1},React.createElement(ResponseErrorPanel,{error:Ee})):re||!Ne?null:React.createElement(React.Fragment,null,Ne.items.map((Te,Ke)=>React.createElement(Box,{key:Ke,mb:1},!compareEntityToRef(A,stringifyEntityRef(Te.entity))&&React.createElement(Box,{p:1},"The error below originates from"," ",React.createElement(EntityRefLink,{entityRef:Te.entity})),Te.errors.map(($e,ft)=>React.createElement(ResponseErrorPanel,{key:ft,error:$e})))))};var Un=e(18671);const rr=(A,L,H=0)=>{if(!A)return H;const re=L.findIndex(Ee=>Ee.id===A.route.path);return~re?re:H},$n={Layout:({children:A})=>{var Ct,Tt,un;const L=[],H=[],re=(0,u.UO)(),Ee=(0,u.s0)();t.Children.forEach(A,dn=>{if(!t.isValidElement(dn))return;if(dn.type!==$n.Content)throw new Error("This component only accepts Content elements as direct children. Check the code of the EntityPage.");const Mn=dn.props.path;H.push({id:Mn,label:dn.props.title}),L.push({path:Mn,element:dn.props.element})}),((Tt=(Ct=L==null?void 0:L[0])==null?void 0:Ct.path)!=null?Tt:"")!==""&&L.push({path:"/*",element:t.createElement(u.Fg,{to:L[0].path})});const[Ne]=(un=(0,u.fp)(L,`/${re["*"]}`))!=null?un:[],Te=rr(Ne,H),Ke=H[Te],$e=Ke==null?void 0:Ke.label,ft=dn=>Ee(H[dn].id.replace(/\/\*$/,"").replace(/^\//,"")),xt=(0,u.V$)(L);return Ke?t.createElement(t.Fragment,null,t.createElement(V.HeaderTabs,{tabs:H,selectedIndex:Te,onChange:ft}),t.createElement(V.Content,null,t.createElement(Un.q,{title:$e}),xt)):null},Content:A=>null},vr=({entity:A,title:L})=>t.createElement(K.Z,{display:"inline-flex",alignItems:"center",height:"1em"},L,A&&t.createElement(I.FavoriteEntity,{entity:A})),Zn=({entity:A})=>{var H;const L=(0,I.getEntityRelations)(A,v.S4);return t.createElement(t.Fragment,null,L.length>0&&t.createElement(V.HeaderLabel,{label:"Owner",value:t.createElement(I.EntityRefLinks,{entityRefs:L,defaultKind:"Group",color:"inherit"})}),((H=A.spec)==null?void 0:H.lifecycle)&&t.createElement(V.HeaderLabel,{label:"Lifecycle",value:A.spec.lifecycle}))},wn=(A,L,H,re)=>({headerTitle:`${H}${L&&L!==v.sk?` in ${L}`:""}`,headerType:(()=>{let Ee=A.toLocaleLowerCase("en-US");return re&&re.spec&&"type"in re.spec&&(Ee+=" \u2014 ",Ee+=re.spec.type.toLocaleLowerCase("en-US")),Ee})()}),ar=({children:A,UNSTABLE_extraContextMenuItems:L,UNSTABLE_contextMenuOptions:H})=>{var er,jn,Vn;const{kind:re,namespace:Ee,name:Ne}=(0,I.useEntityCompoundName)(),{entity:Te,loading:Ke,error:$e}=(0,t.useContext)(I.EntityContext),{headerTitle:ft,headerType:xt}=wn(re,Ee,Ne,Te),[Ct,Tt]=(0,t.useState)(!1),un=(0,u.s0)(),dn=async()=>{Tt(!1),un("/")},Mn=()=>Tt(!0);return t.createElement(V.Page,{themeId:(Vn=(jn=(er=Te==null?void 0:Te.spec)==null?void 0:er.type)==null?void 0:jn.toString())!=null?Vn:"home"},t.createElement(V.Header,{title:t.createElement(vr,{title:ft,entity:Te}),pageTitleOverride:ft,type:xt},Te&&t.createElement(t.Fragment,null,t.createElement(Zn,{entity:Te}),t.createElement(ye,{UNSTABLE_extraContextMenuItems:L,UNSTABLE_contextMenuOptions:H,onUnregisterEntity:Mn}))),Ke&&t.createElement(V.Content,null,t.createElement(V.Progress,null)),Te&&t.createElement($n.Layout,null,A),$e&&t.createElement(V.Content,null,t.createElement(V.ResponseErrorPanel,{error:$e})),!Ke&&!$e&&!Te&&t.createElement(V.Content,null,t.createElement(V.WarningPanel,{title:"Entity not found"},"There is no ",re," with the requested"," ",t.createElement(V.Link,{to:"https://backstage.io/docs/features/software-catalog/references"},"kind, namespace, and name"),".")),t.createElement(I.UnregisterEntityDialog,{open:Ct,entity:Te,onConfirm:dn,onClose:()=>Tt(!1)}))};ar.Content=$n.Content;var or=e(64279);const sr="core.backstage.entitySwitch",Xn=A=>null;(0,s.attachComponentData)(Xn,sr,!0);const Rr=({children:A})=>{var Ne,Te;const{entity:L}=(0,I.useEntity)(),H=(0,s.useApiHolder)(),re=(0,s.useElementFilter)(A,Ke=>Ke.selectByComponentData({key:sr,withStrictError:"Child of EntitySwitch is not an EntitySwitch.Case"}).getElements().flatMap($e=>{var Ct;const{if:ft,children:xt}=$e.props;return[{if:(Ct=ft==null?void 0:ft(L,{apis:H}))!=null?Ct:!0,children:xt}]}),[H,L]);return re.some(Ke=>typeof Ke.if=="object"&&"then"in Ke.if)?t.createElement(ir,{results:re}):(Te=(Ne=re.find(Ke=>Ke.if))==null?void 0:Ne.children)!=null?Te:null};function ir({results:A}){const{loading:L,value:H}=(0,or.default)(async()=>{var Ee;const re=A.map(async({if:Ne,children:Te})=>{try{if(await Ne)return Te}catch{}return null});return(Ee=(await Promise.all(re)).find(Boolean))!=null?Ee:null},[A]);return L||!H?null:H}Rr.Case=Xn;var Wn=e(26997),Sr=e(7758),lr=e(219);const cr=(0,at.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`}}})),ur=()=>{const A=cr();return React.createElement("img",{src:IlloSvgUrl,className:A.illo,alt:"Illustration on entity not found page"})},kn=(0,at.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=kn();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")))},dr=()=>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:H,error:re}=useEntity();return H?React.createElement(EntityPageLayout,null):re||!L?React.createElement(EntityNotFound,null):React.createElement(A,null)},gn=()=>{var Te;const{optionalNamespaceAndName:A,"*":L}=useParams(),[H,re]=A.split(":").reverse(),Ee=(Te=re==null?void 0:re.toLocaleLowerCase("en-US"))!=null?Te:ENTITY_DEFAULT_NAMESPACE,Ne=L?`/${L}`:"";return React.createElement(Navigate,{to:`../../${Ee}/component/${H}${Ne}`})},Cr=A=>React.createElement(AsyncEntityProvider,{...useEntityFromUrl(),...A}),Tr=({EntityPage:A=dr})=>React.createElement(Routes,null,React.createElement(Route,{path:"/",element:React.createElement(CatalogPage,null)}),React.createElement(Route,{path:"/:namespace/:kind/:name",element:React.createElement(Cr,null,React.createElement(An,{EntityPage:A}))}),React.createElement(Route,{path:"Component/:optionalNamespaceAndName/*",element:React.createElement(gn,null)}));var fr=e(47851);const en=(0,s.createPlugin)({id:"catalog",apis:[(0,s.createApiFactory)({api:I.Ah,deps:{discoveryApi:s.discoveryApiRef,fetchApi:s.fetchApiRef},factory:({discoveryApi:A,fetchApi:L})=>new gt.MS({discoveryApi:A,fetchApi:L})}),(0,s.createApiFactory)({api:I.starredEntitiesApiRef,deps:{storageApi:s.storageApiRef},factory:({storageApi:A})=>new I.DefaultStarredEntitiesApi({storageApi:A})})],routes:{catalogIndex:I.M4,catalogEntity:I.wi},externalRoutes:{createComponent:fr.y,viewTechDoc:fr.j}}),Pr=en.provide((0,s.createRoutableExtension)({name:"CatalogIndexPage",component:()=>Promise.resolve().then(e.bind(e,7758)).then(A=>A.CatalogPage),mountPoint:I.M4})),qn=en.provide((0,s.createRoutableExtension)({name:"CatalogEntityPage",component:()=>e.e(6650).then(e.bind(e,76650)).then(A=>A.CatalogEntityPage),mountPoint:I.wi})),Ir=en.provide((0,s.createComponentExtension)({name:"EntityAboutCard",component:{lazy:()=>Promise.resolve().then(e.bind(e,39398)).then(A=>A.AboutCard)}})),Lr=en.provide((0,s.createComponentExtension)({name:"EntityLinksCard",component:{lazy:()=>e.e(1959).then(e.bind(e,81959)).then(A=>A.EntityLinksCard)}})),Or=en.provide((0,s.createComponentExtension)({name:"EntityHasSystemsCard",component:{lazy:()=>e.e(390).then(e.bind(e,60390)).then(A=>A.HasSystemsCard)}})),xr=en.provide((0,s.createComponentExtension)({name:"EntityHasComponentsCard",component:{lazy:()=>e.e(4022).then(e.bind(e,4022)).then(A=>A.HasComponentsCard)}})),Yr=en.provide((0,s.createComponentExtension)({name:"EntityHasSubcomponentsCard",component:{lazy:()=>e.e(8792).then(e.bind(e,38792)).then(A=>A.HasSubcomponentsCard)}})),Dr=en.provide((0,s.createComponentExtension)({name:"EntityHasResourcesCard",component:{lazy:()=>e.e(1553).then(e.bind(e,11553)).then(A=>A.HasResourcesCard)}})),Fr=en.provide((0,s.createComponentExtension)({name:"EntityDependsOnComponentsCard",component:{lazy:()=>e.e(8061).then(e.bind(e,48061)).then(A=>A.DependsOnComponentsCard)}})),Qr=en.provide((0,s.createComponentExtension)({name:"EntityDependencyOfComponentsCard",component:{lazy:()=>e.e(6235).then(e.bind(e,56235)).then(A=>A.DependencyOfComponentsCard)}})),Br=en.provide((0,s.createComponentExtension)({name:"EntityDependsOnResourcesCard",component:{lazy:()=>e.e(9028).then(e.bind(e,59028)).then(A=>A.DependsOnResourcesCard)}})),br=en.provide((0,s.createComponentExtension)({name:"EntitySystemDiagramCard",component:{lazy:()=>e.e(4960).then(e.bind(e,14960)).then(A=>A.SystemDiagramCard)}}));var Bn=e(3337),mr=e(76372);class hr{constructor({configApi:L,discoveryApi:H,identityApi:re}){q(this,"configApi");q(this,"discoveryApi");q(this,"identityApi");this.configApi=L,this.discoveryApi=H,this.identityApi=re}async getApiOrigin(){var L;return(L=this.configApi.getOptionalString("techdocs.requestUrl"))!=null?L:await this.discoveryApi.getBaseUrl("techdocs")}async getTechDocsMetadata(L){const{kind:H,namespace:re,name:Ee}=L,Te=`${await this.getApiOrigin()}/metadata/techdocs/${re}/${H}/${Ee}`,Ke=await this.identityApi.getIdToken(),$e=await fetch(`${Te}`,{headers:Ke?{Authorization:`Bearer ${Ke}`}:{}});if(!$e.ok)throw await y.VL.fromResponse($e);return await $e.json()}async getEntityMetadata(L){const{kind:H,namespace:re,name:Ee}=L,Te=`${await this.getApiOrigin()}/metadata/entity/${re}/${H}/${Ee}`,Ke=await this.identityApi.getIdToken(),$e=await fetch(`${Te}`,{headers:Ke?{Authorization:`Bearer ${Ke}`}:{}});if(!$e.ok)throw await y.VL.fromResponse($e);return await $e.json()}}class gr{constructor({configApi:L,discoveryApi:H,identityApi:re}){q(this,"configApi");q(this,"discoveryApi");q(this,"identityApi");this.configApi=L,this.discoveryApi=H,this.identityApi=re}async getApiOrigin(){var L;return(L=this.configApi.getOptionalString("techdocs.requestUrl"))!=null?L:await this.discoveryApi.getBaseUrl("techdocs")}async getStorageUrl(){var L;return(L=this.configApi.getOptionalString("techdocs.storageUrl"))!=null?L:`${await this.discoveryApi.getBaseUrl("techdocs")}/static/docs`}async getBuilder(){return this.configApi.getString("techdocs.builder")}async getEntityDocs(L,H){const{kind:re,namespace:Ee,name:Ne}=L,Ke=`${await this.getStorageUrl()}/${Ee}/${re}/${Ne}/${H}`,$e=await this.identityApi.getIdToken(),ft=await fetch(`${Ke.endsWith("/")?Ke:`${Ke}/`}index.html`,{headers:$e?{Authorization:`Bearer ${$e}`}:{}});let xt="";switch(ft.status){case 404:throw xt="Page not found. ",H||(xt+="This could be because there is no index.md file in the root of the docs directory of this repository."),new y.dR(xt);case 500:throw xt="Could not generate documentation or an error in the TechDocs backend. ",new Error(xt);default:break}return ft.text()}async syncEntityDocs(L,H=()=>{}){const{kind:re,namespace:Ee,name:Ne}=L,Ke=`${await this.getApiOrigin()}/sync/${Ee}/${re}/${Ne}`,$e=await this.identityApi.getIdToken();return new Promise((ft,xt)=>{const Ct=new mr.EventSourcePolyfill(Ke,{withCredentials:!0,headers:$e?{Authorization:`Bearer ${$e}`}:{}});Ct.addEventListener("log",Tt=>{Tt.data&&H(JSON.parse(Tt.data))}),Ct.addEventListener("finish",Tt=>{let un=!1;Tt.data&&({updated:un}=JSON.parse(Tt.data)),ft(un?"updated":"cached")}),Ct.onerror=Tt=>{switch(Ct.close(),Tt.status){case 404:xt(new y.dR(Tt.message));return;default:xt(new Error(Tt.data));return}}})}async getBaseUrl(L,H,re){const{kind:Ee,namespace:Ne,name:Te}=H,$e=`${await this.getApiOrigin()}/static/docs/${Ne}/${Ee}/${Te}/${re}`;return new URL(L,$e.endsWith("/")?$e:`${$e}/`).toString()}}var Mr=e(71226),Nr=e(95074),pr=e(76635),$=e(83201),M=e(50294),Z=e(67430);const k=({columns:A,actions:L})=>{var Ct,Tt;const{loading:H,error:re,entities:Ee,filters:Ne}=(0,I.useEntityListProvider)(),{isStarredEntity:Te,toggleStarredEntity:Ke}=(0,I.useStarredEntities)(),[,$e]=(0,Nr.Z)(),ft=(0,pr.capitalize)((Tt=(Ct=Ne.user)==null?void 0:Ct.value)!=null?Tt:"all"),xt=[M.createCopyDocsUrlAction($e),M.createStarEntityAction(Te,Ke)];return re?t.createElement(V.WarningPanel,{severity:"error",title:"Could not load available documentation."},t.createElement(V.CodeSnippet,{language:"text",text:re.toString()})):t.createElement($.DocsTable,{title:ft,entities:Ee,loading:H,actions:L||xt,columns:A})};k.columns=Z,k.actions=M;var le=e(1114);class te{getCatalogFilters(){return{"metadata.annotations.backstage.io/techdocs-ref":I.n3}}}const fe=()=>{const{updateFilters:A}=(0,I.useEntityListProvider)();return(0,t.useEffect)(()=>{A({techdocs:new te})},[A]),null},Ue=({initialFilter:A="all",columns:L,actions:H})=>t.createElement(le.j,null,t.createElement(V.Content,null,t.createElement(V.ContentHeader,{title:""},t.createElement(V.SupportButton,null,"Discover documentation in your ecosystem.")),t.createElement(I.EntityListProvider,null,t.createElement(Wn.q7,null,t.createElement(Wn.Gh,null,t.createElement(fe,null),t.createElement(I.UserListPicker,{initialFilter:A}),t.createElement(I.EntityOwnerPicker,null),t.createElement(I.EntityTagPicker,null)),t.createElement(Wn.Nz,null,t.createElement(k,{actions:H,columns:L}))))));var qe=e(10187);const rt=()=>{const{loading:A,error:L,entities:H}=useEntityListProvider();return L?React.createElement(WarningPanel,{severity:"error",title:"Could not load available documentation."},React.createElement(CodeSnippet,{language:"text",text:L.toString()})):A||!H?React.createElement(Progress,null):(H.sort((re,Ee)=>{var Ne,Te;return((Ne=re.metadata.title)!=null?Ne:re.metadata.name).localeCompare((Te=Ee.metadata.title)!=null?Te:Ee.metadata.name)}),React.createElement(DocsCardGrid,{entities:H}))};var Ye=e(68725);const xe=(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:H})=>new gr({configApi:A,discoveryApi:L,identityApi:H})}),(0,s.createApiFactory)({api:Bn.g,deps:{configApi:s.configApiRef,discoveryApi:s.discoveryApiRef,identityApi:s.identityApiRef},factory:({configApi:A,discoveryApi:L,identityApi:H})=>new hr({configApi:A,discoveryApi:L,identityApi:H})})],routes:{root:Ye._Z,docRoot:Ye.Fw,entityContent:Ye.pd}}),Ze=xe.provide((0,s.createRoutableExtension)({name:"TechdocsPage",component:()=>Promise.resolve().then(e.bind(e,94067)).then(A=>A.Router),mountPoint:Ye._Z})),St=xe.provide((0,s.createRoutableExtension)({name:"EntityTechdocsContent",component:()=>Promise.resolve().then(e.bind(e,94067)).then(A=>A.EmbeddedDocsRouter),mountPoint:Ye.pd})),Ot=xe.provide((0,s.createComponentExtension)({name:"DocsCardGrid",component:{lazy:()=>Promise.resolve().then(e.bind(e,10187)).then(A=>A.DocsCardGrid)}})),Mt=xe.provide((0,s.createComponentExtension)({name:"DocsTable",component:{lazy:()=>Promise.resolve().then(e.bind(e,83201)).then(A=>A.DocsTable)}})),kt=xe.provide((0,s.createRoutableExtension)({name:"TechDocsCustomHome",component:()=>Promise.resolve().then(e.bind(e,57110)).then(A=>A.TechDocsCustomHome),mountPoint:Ye._Z})),Kt=xe.provide((0,s.createRoutableExtension)({name:"TechDocsIndexPage",component:()=>Promise.resolve().then(e.bind(e,41481)).then(A=>A.TechDocsIndexPage),mountPoint:Ye._Z})),Jt=xe.provide((0,s.createRoutableExtension)({name:"TechDocsReaderPage",component:()=>Promise.resolve().then(e.bind(e,31752)).then(A=>A.TechDocsPage),mountPoint:Ye.Fw}));var ln=e(73873),$t=e(94067),pn=e(36356);class Ln{constructor({configApi:L,discoveryApi:H,identityApi:re}){q(this,"configApi");q(this,"discoveryApi");q(this,"identityApi");this.configApi=L,this.discoveryApi=H,this.identityApi=re}async getApiOrigin(){var L;return(L=this.configApi.getOptionalString("techdocs.requestUrl"))!=null?L:await this.discoveryApi.getBaseUrl("techdocs")}async getStorageUrl(){var L;return(L=this.configApi.getOptionalString("techdocs.storageUrl"))!=null?L:`${await this.discoveryApi.getBaseUrl("techdocs")}/static/docs`}async getBuilder(){return this.configApi.getString("techdocs.builder")}async getEntityDocs(L,H){const Ee=`${await this.getApiOrigin()}/${H}`,Ne=await fetch(`${Ee.endsWith("/")?Ee:`${Ee}/`}index.html`);if(Ne.status===404)throw new Error("Page not found");return Ne.text()}async syncEntityDocs(L){return"cached"}async getBaseUrl(L,H,re){const Ee=await this.getApiOrigin();return new URL(L,`${Ee}/${re}`).toString()}}class Wt{constructor({configApi:L,discoveryApi:H,identityApi:re}){q(this,"configApi");q(this,"discoveryApi");q(this,"identityApi");this.configApi=L,this.discoveryApi=H,this.identityApi=re}async getApiOrigin(){var L;return(L=this.configApi.getOptionalString("techdocs.requestUrl"))!=null?L:await this.discoveryApi.getBaseUrl("techdocs")}async getEntityMetadata(L){return{apiVersion:"backstage.io/v1alpha1",kind:"Component",metadata:{name:"local"},spec:{owner:"test",lifecycle:"experimental"}}}async getTechDocsMetadata(L){return{site_name:"Live preview environment",site_description:""}}}const Gt=[(0,s.createApiFactory)({api:Bn.D,deps:{configApi:s.configApiRef,discoveryApi:s.discoveryApiRef,identityApi:s.identityApiRef},factory:({configApi:A,discoveryApi:L,identityApi:H})=>new Ln({configApi:A,discoveryApi:L,identityApi:H})}),(0,s.createApiFactory)({api:Bn.g,deps:{configApi:s.configApiRef,discoveryApi:s.discoveryApiRef,identityApi:s.identityApiRef},factory:({configApi:A,discoveryApi:L,identityApi:H})=>new Wt({configApi:A,discoveryApi:L,identityApi:H})}),(0,s.createApiFactory)({api:pn.q3,deps:{configApi:s.configApiRef},factory:({configApi:A})=>pn.ae.fromConfig(A)})];var bn=e(86689),Hn=e(58845);const Xr=(0,at.Z)({svg:{width:"auto",height:30},path:{fill:"#7df3e1"}});var qr=()=>{const A=Xr();return t.createElement("svg",{className:A.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 2079.95 456.05"},t.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,at.Z)({svg:{width:"auto",height:28},path:{fill:"#7df3e1"}});var _r=()=>{const A=Ra();return t.createElement("svg",{className:A.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 337.46 428.5"},t.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,at.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}}),ea=()=>{const A=Ca(),{isOpen:L}=(0,t.useContext)(V.SidebarContext);return t.createElement("div",{className:A.root},t.createElement(bn.Z,{component:ce.OL,to:"/docs/default/component/local/",underline:"none",className:A.link},L?t.createElement(qr,null):t.createElement(_r,null)))},ta=({children:A})=>t.createElement(V.SidebarPage,null,t.createElement(V.Sidebar,null,t.createElement(ea,null),t.createElement(V.SidebarDivider,null),t.createElement(V.SidebarItem,{icon:Hn.Z,to:"docs/default/component/local/",text:"Docs Preview"})),A),na=()=>{const A={site_name:"Live preview environment",site_description:""};return t.createElement(ln.EV,null,({entityRef:L,onReady:H})=>t.createElement(t.Fragment,null,t.createElement(ln.nN,{techDocsMetadata:A,entityRef:L}),t.createElement(V.Content,{"data-testid":"techdocs-content"},t.createElement(ln.Ej,{onReady:H,entityRef:L,withSearch:!1}))))},Ur=t.createElement(na,null),_n=ze({apis:Gt,plugins:Object.values(r)}),ra=_n.getProvider(),Ta=_n.getRouter(),aa=t.createElement(g.FlatRoutes,null,t.createElement(u.Fg,{key:"/",to:"/docs/default/component/local/"}),t.createElement(u.AW,{path:"/catalog/:namespace/:kind/:name",element:t.createElement(qn,null)}),t.createElement(u.AW,{path:"/docs",element:t.createElement(Kt,null)},t.createElement(Ue,null)),t.createElement(u.AW,{path:"/docs/:namespace/:kind/:name/*",element:t.createElement(Jt,null)},Ur));var oa=()=>t.createElement(ra,null,t.createElement(Ta,null,t.createElement(ta,null,aa)));l.render(t.createElement(oa,null),document.getElementById("root"))},10179:function(Q,o,e){"use strict";e.d(o,{SP:function(){return b},dR:function(){return E},VL:function(){return j},BD:function(){return t}});function r(F){if(typeof F!="object"||F===null||Array.isArray(F))return!1;const B=F;return!(typeof B.name!="string"||B.name===""||typeof B.message!="string")}function t(F){if(typeof F!="object"||F===null||Array.isArray(F))throw new Error(`Encountered invalid error, not an object, got '${F}'`);const B=F;if(typeof B.name!="string"||B.name==="")throw new Error(`Encountered error object without a name, got '${F}'`);if(typeof B.message!="string")throw new Error(`Encountered error object without a message, got '${F}'`)}var l=e(24852);function u(F,B){const N=serializeErrorInternal(F),D={name:"Unknown",message:"<no reason given>",...N};return(B==null?void 0:B.includeStack)||delete D.stack,D}function g(F){const B=(0,l.deserializeError)(F);return F.stack||(B.stack=void 0),B}function s(F){if(r(F)){const B=String(F);return B!=="[object Object]"?B:`${F.name}: ${F.message}`}return`unknown error '${F}'`}class c extends Error{constructor(B,N){var X;let D=B;if(N!==void 0){const V=s(N);D?D+=`; caused by ${V}`:D=`caused by ${V}`}super(D);q(this,"cause");(X=Error.captureStackTrace)==null||X.call(Error,this,this.constructor),this.name=this.constructor.name,this.cause=r(N)?N:void 0}}class d extends null{}class y extends null{}class m extends null{}class E extends c{}class i extends null{}class S extends null{}class b extends c{constructor(B,N){super(B,N);this.name=r(N)?N.name:"Error"}}async function P(F){var B;try{const N=await F.text();if(N){if((B=F.headers.get("content-type"))==null?void 0:B.startsWith("application/json"))try{const D=JSON.parse(N);if(D.error&&D.response)return D}catch{}return{error:{name:"Error",message:`Request failed with status ${F.status} ${F.statusText}, ${N}`},response:{statusCode:F.status}}}}catch{}return{error:{name:"Error",message:`Request failed with status ${F.status} ${F.statusText}`},response:{statusCode:F.status}}}class j 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 N=await P(B),D=N.response.statusCode||B.status,X=N.error.name||B.statusText,V=`Request failed with ${D} ${X}`,ce=g(N.error);return new j({message:V,response:B,data:N,cause:ce})}}},36356:function(Q,o,e){var E,i,S,b;"use strict";e.d(o,{nW:function(){return m},ae:function(){return s},q3:function(){return c}});var r=e(36964);const t=(0,r.createApiRef)({id:"core.scmauth"});class l{constructor(F){En(this,E,void 0);Tn(this,E,F)}async getCredentials(F){const B=new URL(F.url),N=tt(this,E).find(D=>D.isUrlSupported(B));if(!N)throw new Error(`No authentication provider available for access to '${F.url}'`);return N.getCredentials(F)}}E=new WeakMap;const P=class{constructor(F,B,N){En(this,i,void 0);En(this,S,void 0);En(this,b,void 0);Tn(this,i,F),Tn(this,S,B),Tn(this,b,N)}static createDefaultApiFactory(){return createApiFactory({api:scmAuthApiRef,deps:{github:githubAuthApiRef,gitlab:gitlabAuthApiRef,azure:microsoftAuthApiRef},factory:({github:F,gitlab:B,azure:N})=>P.merge(P.forGithub(F),P.forGitlab(B),P.forAzure(N))})}static forAuthApi(F,B){return new P(F,B.host,B.scopeMapping)}static forGithub(F,B){var D;const N=(D=B==null?void 0:B.host)!=null?D:"github.com";return new P(F,N,{default:["repo","read:org","read:user"],repoWrite:["gist"]})}static forGitlab(F,B){var D;const N=(D=B==null?void 0:B.host)!=null?D:"gitlab.com";return new P(F,N,{default:["read_user","read_api","read_repository"],repoWrite:["write_repository","api"]})}static forAzure(F,B){var D;const N=(D=B==null?void 0:B.host)!=null?D:"dev.azure.com";return new P(F,N,{default:["vso.build","vso.code","vso.graph","vso.project","vso.profile"],repoWrite:["vso.code_manage"]})}static forBitbucket(F,B){var D;const N=(D=B==null?void 0:B.host)!=null?D:"bitbucket.org";return new P(F,N,{default:["account","team","pullrequest","snippet","issue"],repoWrite:["pullrequest:write","snippet:write","issue:write"]})}static merge(...F){return new l(F)}isUrlSupported(F){return F.host===tt(this,S)}async getCredentials(F){const{url:B,additionalScope:N,...D}=F,X=tt(this,b).default.slice();(N==null?void 0:N.repoWrite)&&X.push(...tt(this,b).repoWrite);const V=await tt(this,i).getAccessToken(X,D);return{token:V,headers:{Authorization:`Bearer ${V}`}}}};let u=P;i=new WeakMap,S=new WeakMap,b=new WeakMap;var g=e(94594);class s{static fromConfig(F){return g.Lx.fromConfig(F)}}const c=(0,r.createApiRef)({id:"integration.scmintegrations"});var d=e(73250),y=e(2784);const m=j=>{var X;const{type:F}=j,B=(0,r.useApp)(),N=d.Z,D=F&&(X=B.getSystemIcon(F))!=null?X:N;return y.createElement(D,null)}},94594:function(Q,o,e){var nt,Ie,pe,He,de,Ce,ze;"use strict";e.d(o,{Lx:function(){return We},Pb:function(){return st}});var r=e(82717),t=e.n(r),l=e(76635);function u(J){const v=new URL("http://example.com");return v.host=J,v.host===J}function g(J){try{return new URL(J),!0}catch{return!1}}function s(J,v){return{list(){return J},byUrl(I){try{const K=typeof I=="string"?new URL(I):I;return J.find(ee=>v(ee)===K.host)}catch{return}},byHost(I){return J.find(K=>v(K)===I)}}}function c(J){const{url:v,base:I,lineNumber:K}=J;try{return new URL(v),v}catch{}let ee;if(v.startsWith("/")){const{filepath:Ae}=t()(I);ee=new URL(I);const me=(0,l.trimEnd)(ee.pathname.substring(0,ee.pathname.length-Ae.length),"/");ee.pathname=`${me}${v}`}else ee=new URL(v,I);return ee.search=new URL(I).search,K&&(ee.hash=`L${K}`),ee.toString()}const d="GB",je=class{constructor(v,I,K,ee,Ae,me){En(this,nt,void 0);En(this,Ie,void 0);En(this,pe,void 0);En(this,He,void 0);En(this,de,void 0);En(this,Ce,void 0);En(this,ze,(...v)=>{const I=new URL(tt(this,nt));return I.pathname=v.map(K=>encodeURIComponent(K)).join("/"),I});Tn(this,nt,v),Tn(this,Ie,I),Tn(this,pe,K),Tn(this,He,ee),Tn(this,de,Ae),Tn(this,Ce,me)}static fromRepoUrl(v){var Xt;const I=new URL(v);let K,ee,Ae;const me=I.pathname.split("/").map(on=>decodeURIComponent(on));if(me[2]==="_git"?(K=me[1],ee=Ae=me[3]):me[3]==="_git"&&(K=me[1],ee=me[2],Ae=me[4]),!K||!ee||!Ae)throw new Error("Azure URL must point to a git repository");const be=(Xt=I.searchParams.get("path"))!=null?Xt:void 0;let Me;const yt=I.searchParams.get("version");if(yt){if(yt.slice(0,2)!=="GB")throw new Error("Azure URL version must point to a git branch");Me=yt.slice(2)}return new je(I.origin,K,ee,Ae,be,Me)}toRepoUrl(){let v;return tt(this,pe)===tt(this,He)?v=tt(this,ze).call(this,tt(this,Ie),"_git",tt(this,He)):v=tt(this,ze).call(this,tt(this,Ie),tt(this,pe),"_git",tt(this,He)),tt(this,de)&&v.searchParams.set("path",tt(this,de)),tt(this,Ce)&&v.searchParams.set("version",d+tt(this,Ce)),v.toString()}toFileUrl(){if(!tt(this,de))throw new Error("Azure URL must point to a specific path to be able to download a file");const v=tt(this,ze).call(this,tt(this,Ie),tt(this,pe),"_apis","git","repositories",tt(this,He),"items");return v.searchParams.set("api-version","6.0"),v.searchParams.set("path",tt(this,de)),tt(this,Ce)&&v.searchParams.set("version",tt(this,Ce)),v.toString()}toArchiveUrl(){const v=tt(this,ze).call(this,tt(this,Ie),tt(this,pe),"_apis","git","repositories",tt(this,He),"items");return v.searchParams.set("recursionLevel","full"),v.searchParams.set("download","true"),v.searchParams.set("api-version","6.0"),tt(this,de)&&v.searchParams.set("scopePath",tt(this,de)),tt(this,Ce)&&v.searchParams.set("version",tt(this,Ce)),v.toString()}toCommitsUrl(){const v=tt(this,ze).call(this,tt(this,Ie),tt(this,pe),"_apis","git","repositories",tt(this,He),"commits");return v.searchParams.set("api-version","6.0"),tt(this,Ce)&&v.searchParams.set("searchCriteria.itemVersion.version",tt(this,Ce)),v.toString()}getOwner(){return tt(this,Ie)}getProject(){return tt(this,pe)}getRepo(){return tt(this,He)}getPath(){return tt(this,de)}getRef(){return tt(this,Ce)}};let y=je;nt=new WeakMap,Ie=new WeakMap,pe=new WeakMap,He=new WeakMap,de=new WeakMap,Ce=new WeakMap,ze=new WeakMap;const m="dev.azure.com";function E(J){var K;const v=(K=J.getOptionalString("host"))!=null?K:m,I=J.getOptionalString("token");if(!u(v))throw new Error(`Invalid Azure integration config, '${v}' is not a valid host`);return{host:v,token:I}}function i(J){const v=J.map(E);return v.some(I=>I.host===m)||v.push({host:m}),v}const Fe=class{constructor(v){this.integrationConfig=v}get type(){return"azure"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(v){var ee;const{url:I,base:K}=v;if(g(I))return I;try{const Ae=y.fromRepoUrl(K),me=new URL(K),be=new URL(`https://a.com${(ee=Ae.getPath())!=null?ee:""}`),Me=new URL(I,be).pathname;return me.searchParams.set("path",Me),v.lineNumber&&(me.searchParams.set("line",String(v.lineNumber)),me.searchParams.set("lineEnd",String(v.lineNumber+1)),me.searchParams.set("lineStartColumn","1"),me.searchParams.set("lineEndColumn","1")),me.toString()}catch{return new URL(I,K).toString()}}resolveEditUrl(v){return v}};let S=Fe;q(S,"factory",({config:v})=>{var K;const I=i((K=v.getOptionalConfigArray("integrations.azure"))!=null?K:[]);return s(I.map(ee=>new Fe(ee)),ee=>ee.config.host)});var b=e(48834).Buffer;function P(J){return AzureUrl.fromRepoUrl(J).toFileUrl()}function j(J){return AzureUrl.fromRepoUrl(J).toArchiveUrl()}function F(J){return AzureUrl.fromRepoUrl(J).toCommitsUrl()}function B(J,v){const I=v?{...v}:{};if(J.token){const K=b.from(`:${J.token}`,"utf8");I.Authorization=`Basic ${K.toString("base64")}`}return{headers:I}}const N="bitbucket.org",D="https://api.bitbucket.org/2.0";function X(J){var me;const v=(me=J.getOptionalString("host"))!=null?me:N;let I=J.getOptionalString("apiBaseUrl");const K=J.getOptionalString("token"),ee=J.getOptionalString("username"),Ae=J.getOptionalString("appPassword");if(!u(v))throw new Error(`Invalid Bitbucket integration config, '${v}' is not a valid host`);return I?I=(0,l.trimEnd)(I,"/"):v===N&&(I=D),{host:v,apiBaseUrl:I,token:K,username:ee,appPassword:Ae}}function V(J){const v=J.map(X);return v.some(I=>I.host===N)||v.push({host:N,apiBaseUrl:D}),v}const at=class{constructor(v){this.integrationConfig=v}get type(){return"bitbucket"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(v){const I=c(v);if(v.lineNumber){const K=new URL(I),ee=K.pathname.split("/").slice(-1)[0];return K.hash=`${ee}-${v.lineNumber}`,K.toString()}return I}resolveEditUrl(v){const I=t()(v),K=new URL(v);return K.searchParams.set("mode","edit"),K.searchParams.set("spa","0"),K.searchParams.set("at",I.ref),K.toString()}};let ce=at;q(ce,"factory",({config:v})=>{var K;const I=V((K=v.getOptionalConfigArray("integrations.bitbucket"))!=null?K:[]);return s(I.map(ee=>new at(ee)),ee=>ee.config.host)});var Se=e(96279),we=e(48834).Buffer;async function he(J,v){const{name:I,owner:K,resource:ee}=parseGitUrl(J),Ae=ee==="bitbucket.org";let me=Ae?`${v.apiBaseUrl}/repositories/${K}/${I}`:`${v.apiBaseUrl}/projects/${K}/repos/${I}/default-branch`,be=await fetch(me,Je(v));if(be.status===404&&!Ae&&(me=`${v.apiBaseUrl}/projects/${K}/repos/${I}/branches/default`,be=await fetch(me,Je(v))),!be.ok){const yt=`Failed to retrieve default branch from ${me}, ${be.status} ${be.statusText}`;throw new Error(yt)}let Me;if(Ae)Me=(await be.json()).mainbranch.name;else{const{displayId:yt}=await be.json();Me=yt}if(!Me)throw new Error(`Failed to read default branch from ${me}. Response ${be.status} ${be.json()}`);return Me}async function Ge(J,v){const{name:I,owner:K,ref:ee,protocol:Ae,resource:me,filepath:be}=parseGitUrl(J),Me=me==="bitbucket.org";let yt=ee;yt||(yt=await he(J,v));const Xt=be?`&path=${encodeURIComponent(be)}`:"";return Me?`${Ae}://${me}/${K}/${I}/get/${yt}.tar.gz`:`${v.apiBaseUrl}/projects/${K}/repos/${I}/archive?format=tgz&at=${yt}&prefix=${K}-${I}${Xt}`}function Le(J,v){try{const{owner:I,name:K,ref:ee,filepathtype:Ae,filepath:me}=parseGitUrl(J);if(!I||!K||Ae!=="browse"&&Ae!=="raw"&&Ae!=="src")throw new Error("Invalid Bitbucket URL or file path");const be=me.replace(/^\//,"");if(v.host==="bitbucket.org"){if(!ee)throw new Error("Invalid Bitbucket URL or file path");return`${v.apiBaseUrl}/repositories/${I}/${K}/src/${ee}/${be}`}return`${v.apiBaseUrl}/projects/${I}/repos/${K}/raw/${be}?at=${ee}`}catch(I){throw new Error(`Incorrect URL: ${J}, ${I}`)}}function Je(J){const v={};if(J.token)v.Authorization=`Bearer ${J.token}`;else if(J.username&&J.appPassword){const I=we.from(`${J.username}:${J.appPassword}`,"utf8");v.Authorization=`Basic ${I.toString("base64")}`}return{headers:v}}const ot="github.com",_e="https://api.github.com",mt="https://raw.githubusercontent.com";function dt(J){var me,be;const v=(me=J.getOptionalString("host"))!=null?me:ot;let I=J.getOptionalString("apiBaseUrl"),K=J.getOptionalString("rawBaseUrl");const ee=J.getOptionalString("token"),Ae=(be=J.getOptionalConfigArray("apps"))==null?void 0:be.map(Me=>({appId:Me.getNumber("appId"),clientId:Me.getString("clientId"),clientSecret:Me.getString("clientSecret"),webhookSecret:Me.getString("webhookSecret"),privateKey:Me.getString("privateKey"),allowedInstallationOwners:Me.getOptionalStringArray("allowedInstallationOwners")}));if(!u(v))throw new Error(`Invalid GitHub integration config, '${v}' is not a valid host`);return I?I=(0,l.trimEnd)(I,"/"):v===ot&&(I=_e),K?K=(0,l.trimEnd)(K,"/"):v===ot&&(K=mt),{host:v,apiBaseUrl:I,rawBaseUrl:K,token:ee,apps:Ae}}function ct(J){const v=J.map(dt);return v.some(I=>I.host===ot)||v.push({host:ot,apiBaseUrl:_e,rawBaseUrl:mt}),v}function Et(J,v,I){try{const{owner:K,name:ee,ref:Ae,filepathtype:me,filepath:be}=parseGitUrl(J);if(!K||!ee||!Ae||me!=="blob"&&me!=="raw"&&me!=="tree")throw new Error("Invalid GitHub URL or file path");const Me=be.replace(/^\//,"");return It(v,I)==="api"?`${v.apiBaseUrl}/repos/${K}/${ee}/contents/${Me}?ref=${Ae}`:`${v.rawBaseUrl}/${K}/${ee}/${Ae}/${Me}`}catch(K){throw new Error(`Incorrect URL: ${J}, ${K}`)}}function vt(J,v){const I={};return It(J,v)==="api"&&(I.Accept="application/vnd.github.v3.raw"),v.token&&(I.Authorization=`token ${v.token}`),{headers:I}}function It(J,v){return J.apiBaseUrl&&(v.token||!J.rawBaseUrl)?"api":"raw"}class At{constructor(){q(this,"tokenCache",new Map);q(this,"isNotExpired",v=>v.diff(DateTime.local(),"minutes").minutes>50)}async getOrCreateToken(v,I){const K=this.tokenCache.get(v);if(K&&this.isNotExpired(K.expiresAt))return{accessToken:K.token};const ee=await I();return this.tokenCache.set(v,ee),{accessToken:ee.token}}}const ht={Accept:"application/vnd.github.machine-man-preview+json"};class Ut{constructor(v,I){q(this,"appClient");q(this,"baseUrl");q(this,"baseAuthConfig");q(this,"cache",new At);q(this,"allowedInstallationOwners");this.allowedInstallationOwners=v.allowedInstallationOwners,this.baseUrl=I,this.baseAuthConfig={appId:v.appId,privateKey:v.privateKey.replace(/\\n/gm,`
31
+ `)},this.appClient=new Octokit({baseUrl:I,headers:ht,authStrategy:createAppAuth,auth:this.baseAuthConfig})}async getInstallationCredentials(v,I){var me;const{installationId:K,suspended:ee}=await this.getInstallationData(v);if(this.allowedInstallationOwners&&!((me=this.allowedInstallationOwners)==null?void 0:me.includes(v)))throw new Error(`The GitHub application for ${v} is not included in the allowed installation list (${K}).`);if(ee)throw new Error(`The GitHub application for ${v} is suspended`);const Ae=I?`${v}/${I}`:v;return this.cache.getOrCreateToken(Ae,async()=>{const be=await this.appClient.apps.createInstallationAccessToken({installation_id:K,headers:ht});if(I&&be.data.repository_selection==="selected"){const Me=new Octokit({baseUrl:this.baseUrl,auth:be.data.token});if(!(await Me.paginate(Me.apps.listReposAccessibleToInstallation)).some(on=>on.name===I))throw new Error(`The Backstage GitHub application used in the ${v} organization does not have access to a repository with the name ${I}`)}return{token:be.data.token,expiresAt:DateTime.fromISO(be.data.expires_at)}})}getInstallations(){return this.appClient.paginate(this.appClient.apps.listInstallations)}async getInstallationData(v){const K=(await this.getInstallations()).find(Ae=>{var me,be;return((be=(me=Ae.account)==null?void 0:me.login)==null?void 0:be.toLocaleLowerCase("en-US"))===v.toLocaleLowerCase("en-US")});if(K)return{installationId:K.id,suspended:Boolean(K.suspended_by)};const ee=new Error(`No app installation found for ${v} in ${this.baseAuthConfig.appId}`);throw ee.name="NotFoundError",ee}}class Nt{constructor(v){q(this,"apps");var I,K;this.apps=(K=(I=v.apps)==null?void 0:I.map(ee=>new Ut(ee,v.apiBaseUrl)))!=null?K:[]}async getAllInstallations(){return this.apps.length?(await Promise.all(this.apps.map(I=>I.getInstallations()))).flat():[]}async getAppToken(v,I){if(this.apps.length===0)return;const K=await Promise.all(this.apps.map(be=>be.getInstallationCredentials(v,I).then(Me=>({credentials:Me,error:void 0}),Me=>({credentials:void 0,error:Me})))),ee=K.find(be=>be.credentials);if(ee)return ee.credentials.accessToken;const me=K.map(be=>be.error).find(be=>be.name!=="NotFoundError");if(me)throw me}}class Dt{constructor(v,I){this.githubAppCredentialsMux=v,this.token=I}async getCredentials(v){const I=parseGitUrl(v.url),K=I.owner||I.name,ee=I.owner?I.name:void 0;let Ae="app",me=await this.githubAppCredentialsMux.getAppToken(K,ee);return me||(Ae="token",me=this.token),{headers:me?{Authorization:`Bearer ${me}`}:void 0,token:me,type:Ae}}}q(Dt,"create",null);const Be=class{constructor(v){this.integrationConfig=v}get type(){return"github"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(v){return st(c(v),"tree")}resolveEditUrl(v){return st(v,"edit")}};let Lt=Be;q(Lt,"factory",({config:v})=>{var K;const I=ct((K=v.getOptionalConfigArray("integrations.github"))!=null?K:[]);return s(I.map(ee=>new Be(ee)),ee=>ee.config.host)});function st(J,v){return J.replace(/\/\/([^/]+)\/([^/]+)\/([^/]+)\/(blob|tree|edit)\//,(I,K,ee,Ae)=>`//${K}/${ee}/${Ae}/${v}/`)}const Rt="gitlab.com",Zt="https://gitlab.com/api/v4";function De(J){const v=J.getString("host");let I=J.getOptionalString("apiBaseUrl");const K=J.getOptionalString("token");let ee=J.getOptionalString("baseUrl");if(I?I=(0,l.trimEnd)(I,"/"):v===Rt&&(I=Zt),ee?ee=(0,l.trimEnd)(ee,"/"):ee=`https://${v}`,v.includes(":"))throw new Error(`Invalid GitLab integration config, host '${v}' should just be the host name (e.g. "github.com"), not a URL`);if(u(v)){if(!I||!g(I))throw new Error(`Invalid GitLab integration config, '${I}' is not a valid apiBaseUrl`);if(!g(ee))throw new Error(`Invalid GitLab integration config, '${ee}' is not a valid baseUrl`)}else throw new Error(`Invalid GitLab integration config, '${v}' is not a valid host`);return{host:v,token:K,apiBaseUrl:I,baseUrl:ee}}function it(J){const v=J.map(De);return v.some(I=>I.host===Rt)||v.push({host:Rt,apiBaseUrl:Zt,baseUrl:`https://${Rt}`}),v}async function lt(J,v){if(J.includes("/-/blob/")){const I=await O(J,v);return R(J,I).toString()}return T(J).toString()}function se(J){const{token:v=""}=J;return{headers:{"PRIVATE-TOKEN":v}}}function T(J){try{const v=new URL(J),[I,K,ee,Ae,...me]=v.pathname.split("/");if(I!==""||K===""||ee===""||Ae!=="blob"||!me.join("/").match(/\.(yaml|yml)$/))throw new Error("Wrong GitLab URL");return v.pathname=[I,K,ee,"raw",...me].join("/"),v}catch(v){throw new Error(`Incorrect url: ${J}, ${v}`)}}function R(J,v){try{const I=new URL(J),K=I.pathname.split("/-/blob/")[1],[ee,...Ae]=K.split("/");return I.pathname=["/api/v4/projects",v,"repository/files",encodeURIComponent(decodeURIComponent(Ae.join("/"))),"raw"].join("/"),I.search=`?ref=${ee}`,I}catch(I){throw new Error(`Incorrect url: ${J}, ${I}`)}}async function O(J,v){const I=new URL(J);if(!I.pathname.includes("/-/blob/"))throw new Error("Please provide full path to yaml file from GitLab");try{const K=I.pathname.split("/-/blob/")[0],ee=new URL(`${I.protocol+I.hostname}/api/v4/projects/${encodeURIComponent(K.replace(/^\//,""))}`),Ae=await fetch(ee.toString(),se(v)),me=await Ae.json();if(!Ae.ok)throw new Error(`GitLab Error '${me.error}', ${me.error_description}`);return Number(me.id)}catch(K){throw new Error(`Could not get GitLab project ID for: ${J}, ${K}`)}}const Xe=class{constructor(v){this.integrationConfig=v}get type(){return"gitlab"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(v){return c(v)}resolveEditUrl(v){return G(v,"edit")}};let U=Xe;q(U,"factory",({config:v})=>{var K;const I=it((K=v.getOptionalConfigArray("integrations.gitlab"))!=null?K:[]);return s(I.map(ee=>new Xe(ee)),ee=>ee.config.host)});function G(J,v){return J.replace(/\/\-\/(blob|tree|edit)\//,`/-/${v}/`)}const ne="amazonaws.com";function ue(J){var Me;const v=J.getOptionalString("endpoint"),I=(Me=J.getOptionalBoolean("s3ForcePathStyle"))!=null?Me:!1;let K,ee;if(v){try{const yt=new URL(v);K=yt.host,ee=yt.pathname}catch{throw new Error(`invalid awsS3 integration config, endpoint '${v}' is not a valid URL`)}if(ee!=="/")throw new Error(`invalid awsS3 integration config, endpoints cannot contain path, got '${v}'`)}else K=ne;const Ae=J.getOptionalString("accessKeyId"),me=J.getOptionalString("secretAccessKey"),be=J.getOptionalString("roleArn");return{host:K,endpoint:v,s3ForcePathStyle:I,accessKeyId:Ae,secretAccessKey:me,roleArn:be}}function ge(J){const v=J.map(ue);return v.some(I=>I.host===ne)||v.push({host:ne}),v}const ke=class{get type(){return"awsS3"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}constructor(v){this.integrationConfig=v}resolveUrl(v){return c(v)}resolveEditUrl(v){return v}};let Oe=ke;q(Oe,"factory",({config:v})=>{var K;const I=ge((K=v.getOptionalConfigArray("integrations.awsS3"))!=null?K:[]);return s(I.map(ee=>new ke(ee)),ee=>ee.config.host)});class We{constructor(v){q(this,"byType");this.byType=v}static fromConfig(v){return new We({awsS3:Oe.factory({config:v}),azure:S.factory({config:v}),bitbucket:ce.factory({config:v}),github:Lt.factory({config:v}),gitlab:U.factory({config:v})})}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(v=>v.list())}byUrl(v){return Object.values(this.byType).map(I=>I.byUrl(v)).find(Boolean)}byHost(v){return Object.values(this.byType).map(I=>I.byHost(v)).find(Boolean)}resolveUrl(v){const I=this.byUrl(v.base);return I?I.resolveUrl(v):c(v)}resolveEditUrl(v){const I=this.byUrl(v);return I?I.resolveEditUrl(v):v}}},76241:function(Q,o,e){"use strict";e.d(o,{CT:function(){return s},EI:function(){return y},uW:function(){return u},Vt:function(){return c}});function r(){return typeof window!="undefined"&&window.Math===Math?window:typeof self!="undefined"&&self.Math===Math?self:Function("return this")()}const t=r(),l=m=>`__@backstage/${m}__`;function u(m,E){const i=l(m);let S=t[i];return S||(S=E(),t[i]=S,S)}var g=e(2784);function s(m){return u(m,()=>(0,g.createContext)(void 0))}function c(m){return(0,g.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(Q,o,e){"use strict";e.d(o,{AsyncEntityProvider:function(){return we},n3:function(){return t.n3},DefaultStarredEntitiesApi:function(){return m},EntityContext:function(){return V},EntityKindFilter:function(){return O},EntityLifecyclePicker:function(){return Ve},EntityListProvider:function(){return Lt},EntityOwnerPicker:function(){return an},EntityRefLink:function(){return T},EntityRefLinks:function(){return R},EntityTable:function(){return Zn},EntityTagPicker:function(){return sr},EntityTypePicker:function(){return ir},FavoriteEntity:function(){return dr},UnregisterEntityDialog:function(){return Yr},UserListPicker:function(){return Mr},Ah:function(){return u},M4:function(){return F},wi:function(){return N},favoriteEntityIcon:function(){return zn},favoriteEntityTooltip:function(){return kn},formatEntityRefTitle:function(){return it},getEntityMetadataEditUrl:function(){return At},getEntityMetadataViewUrl:function(){return It},getEntityRelations:function(){return ht},getEntitySourceLocation:function(){return Ut},isOwnerOf:function(){return Nt},starredEntitiesApiRef:function(){return E},useEntity:function(){return Je},useEntityCompoundName:function(){return X},useEntityFromUrl:function(){return Le},useEntityKinds:function(){return nt},useEntityListProvider:function(){return st},useOwnUser:function(){return Ie},useRelatedEntities:function(){return He},useStarredEntities:function(){return ze}});var r={};e.r(r),e.d(r,{createDomainColumn:function(){return wt},createEntityRefColumn:function(){return Pn},createEntityRelationColumn:function(){return In},createMetadataDescriptionColumn:function(){return On},createOwnerColumn:function(){return gt},createSpecLifecycleColumn:function(){return Vt},createSpecTypeColumn:function(){return Un},createSystemColumn:function(){return sn}});var t=e(30001),l=e(36964);const u=(0,l.createApiRef)({id:"plugin.catalog.service"});var g=e(82394),s=e.n(g),c=e(52890),d=e(76635);async function y({storageApi:$}){var te;const M=$.forBucket("settings"),Z=$.forBucket("starredEntities"),k=M.get("starredEntities");if(!(0,d.isArray)(k))return;const le=new Set((te=Z.get("entityRefs"))!=null?te:[]);k.filter(d.isString).map(fe=>fe.split(":")).filter(fe=>fe.length===4&&fe[0]==="entity").map(([fe,Ue,qe,rt])=>(0,c.eE)({kind:Ue,namespace:qe,name:rt})).forEach(fe=>le.add(fe)),await Z.set("entityRefs",Array.from(le)),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 Z;y(M).then(),this.settingsStore=M.storageApi.forBucket("starredEntities"),this.starredEntities=new Set((Z=this.settingsStore.get("entityRefs"))!=null?Z:[]),this.settingsStore.observe$("entityRefs").subscribe({next:k=>{var le;this.starredEntities=new Set((le=k.newValue)!=null?le:[]),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=e(2784),S=e(76241),b=e(10289),P=e(77446);const F=(0,l.createRouteRef)({id:"catalog"}),N=(0,l.createRouteRef)({id:"catalog:entity",params:["namespace","kind","name"]});function D($){var M,Z;return{kind:$.kind.toLocaleLowerCase("en-US"),namespace:(Z=(M=$.metadata.namespace)==null?void 0:M.toLocaleLowerCase("en-US"))!=null?Z:ENTITY_DEFAULT_NAMESPACE,name:$.metadata.name}}const X=()=>{const{kind:$,namespace:M,name:Z}=(0,l.useRouteRefParams)(N);return{kind:$,namespace:M,name:Z}},V=(0,i.createContext)({entity:void 0,loading:!0,error:void 0,refresh:()=>{}}),ce=V.Provider,Se=(0,S.CT)("entity-context"),we=({children:$,entity:M,loading:Z,error:k,refresh:le})=>{const te={entity:M,loading:Z,error:k,refresh:le};return i.createElement(ce,{value:te},i.createElement(Se.Provider,{value:(0,S.EI)({1:te})},$))},he=({entity:$,children:M})=>React.createElement(we,{entity:$,loading:!Boolean($),error:void 0,refresh:void 0,children:M}),Ge=({value:$,children:M})=>i.createElement(we,{...$,children:M});V.Provider=Ge;const Le=()=>{const{kind:$,namespace:M,name:Z}=X(),k=(0,b.s0)(),le=(0,l.useApi)(l.errorApiRef),te=(0,l.useApi)(u),{value:fe,error:Ue,loading:qe,retry:rt}=(0,P.Z)(()=>te.getEntityByName({kind:$,namespace:M,name:Z}),[te,$,M,Z]);return(0,i.useEffect)(()=>{Z||(le.post(new Error("No name provided!")),k("/"))},[le,k,Ue,qe,fe,Z]),{entity:fe,loading:qe,error:Ue,refresh:rt}};function Je(){const $=(0,S.Vt)("entity-context");if(!$)return{entity:void 0,loading:!0,error:void 0,refresh:()=>{}};const M=$.atVersion(1);if(!M)throw new Error("EntityContext v1 not available");const{entity:Z,loading:k,error:le,refresh:te}=M;return{entity:Z,loading:k,error:le,refresh:te}}var ot=e(19126),_e=e.n(ot),mt=e(69294),dt=e(48760),ct=e(90736);function Et($){return $.reduce((M,Z)=>({...M,...Z.getCatalogFilters?Z.getCatalogFilters():{}}),{})}function vt($){return M=>$.every(Z=>!Z.filterEntity||Z.filterEntity(M))}function It($){var M;return(M=$.metadata.annotations)==null?void 0:M[c.wh]}function At($){var M;return(M=$.metadata.annotations)==null?void 0:M[c.J1]}function ht($,M,Z){var le,te;let k=((te=(le=$==null?void 0:$.relations)==null?void 0:le.filter(fe=>fe.type===M))==null?void 0:te.map(fe=>fe.target))||[];return(Z==null?void 0:Z.kind)&&(k=k==null?void 0:k.filter(fe=>fe.kind.toLocaleLowerCase("en-US")===Z.kind.toLocaleLowerCase("en-US"))),k}function Ut($,M){var k;const Z=(k=$.metadata.annotations)==null?void 0:k[c.wX];if(!!Z)try{const le=(0,c.Me)(Z),te=M.byUrl(le.target);return{locationTargetUrl:le.target,integrationType:te==null?void 0:te.type}}catch{return}}function Nt($,M){const Z=new Set([...ht($,c.hr,{kind:"group"}),...$?[(0,c.C_)($)]:[]].map(c.eE)),k=ht(M,c.S4).map(c.eE);for(const le of k)if(Z.has(le))return!0;return!1}const Dt=(0,i.createContext)(void 0),Lt=({children:$})=>{const M=(0,ct.default)(),Z=(0,l.useApi)(u),[k,le]=(0,i.useState)({}),[te,fe]=(0,i.useState)(()=>{var St;const Ze=_e().parse(window.location.search,{ignoreQueryPrefix:!0});return{appliedFilters:{},entities:[],backendEntities:[],queryParameters:(St=Ze.filters)!=null?St:{}}}),[{loading:Ue,error:qe},rt]=(0,mt.default)(async()=>{var Kt;const Ze=(0,d.compact)(Object.values(k)),St=vt(Ze),Ot=Et(Ze),Mt=Et((0,d.compact)(Object.values(te.appliedFilters))),kt=Object.keys(k).reduce((Jt,ln)=>{const $t=k[ln];return($t==null?void 0:$t.toQueryValue)&&(Jt[ln]=$t.toQueryValue()),Jt},{});if((0,d.isEqual)(Mt,Ot))fe({appliedFilters:k,backendEntities:te.backendEntities,entities:te.backendEntities.filter(St),queryParameters:kt});else{const Jt=await Z.getEntities({filter:Ot});fe({appliedFilters:k,backendEntities:Jt.items,entities:Jt.items.filter(St),queryParameters:kt})}if(M()){const Jt=_e().parse(window.location.search,{ignoreQueryPrefix:!0}),ln=_e().stringify({...Jt,filters:kt},{addQueryPrefix:!0}),$t=`${window.location.pathname}${ln}`;(Kt=window.history)==null||Kt.replaceState(null,document.title,$t)}},[Z,k,te],{loading:!0});(0,dt.Z)(rt,10,[k]);const Ye=(0,i.useCallback)(Ze=>{le(St=>{const Ot=typeof Ze=="function"?Ze(St):Ze;return{...St,...Ot}})},[]),xe=(0,i.useMemo)(()=>({filters:te.appliedFilters,entities:te.entities,backendEntities:te.backendEntities,updateFilters:Ye,queryParameters:te.queryParameters,loading:Ue,error:qe}),[te,Ye,Ue,qe]);return i.createElement(Dt.Provider,{value:xe},$)};function st(){const $=(0,i.useContext)(Dt);if(!$)throw new Error("useEntityListProvider must be used within EntityListProvider");return $}var Rt=e(64279),Zt=e(18149),De=e.n(Zt);function it($,M){const Z=M==null?void 0:M.defaultKind;let k,le,te;return"metadata"in $?(k=$.kind,le=$.metadata.namespace,te=$.metadata.name):(k=$.kind,le=$.namespace,te=$.name),le===c.sk&&(le=void 0),k=k.toLocaleLowerCase("en-US"),`${(0,c.TH)({kind:Z&&Z.toLocaleLowerCase("en-US")===k?void 0:k,name:te,namespace:le})}`}var lt=e(41682),se=e(80030);const T=(0,i.forwardRef)(($,M)=>{var Ot;const{entityRef:Z,defaultKind:k,title:le,children:te,...fe}=$,Ue=(0,l.useRouteRef)(N);let qe,rt,Ye;"metadata"in Z?(qe=Z.kind,rt=Z.metadata.namespace,Ye=Z.metadata.name):(qe=Z.kind,rt=Z.namespace,Ye=Z.name),qe=qe.toLocaleLowerCase("en-US");const xe={kind:qe,namespace:(Ot=rt==null?void 0:rt.toLocaleLowerCase("en-US"))!=null?Ot:c.sk,name:Ye},Ze=it(Z,{defaultKind:k}),St=i.createElement(lt.Link,{...fe,ref:M,to:Ue(xe)},te,!te&&(le!=null?le:Ze));return le?i.createElement(se.ZP,{title:Ze},St):St}),R=({entityRefs:$,defaultKind:M,...Z})=>i.createElement(i.Fragment,null,$.map((k,le)=>i.createElement(i.Fragment,{key:le},le>0&&", ",i.createElement(T,{...Z,entityRef:k,defaultKind:M}))));class O{constructor(M){this.value=M}getCatalogFilters(){return{kind:this.value}}toQueryValue(){return this.value}}class U{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 G{constructor(M){this.values=M}filterEntity(M){return this.values.every(Z=>{var k;return((k=M.metadata.tags)!=null?k:[]).includes(Z)})}toQueryValue(){return this.values}}class ne{constructor(M){this.value=M}filterEntity(M){var k;const Z=this.value.toLocaleUpperCase("en-US");return M.metadata.name.toLocaleUpperCase("en-US").includes(Z)||`${M.metadata.title}`.toLocaleUpperCase("en-US").includes(Z)||((k=M.metadata.tags)==null?void 0:k.join("").toLocaleUpperCase("en-US").indexOf(Z))!==-1}}class ue{constructor(M){this.values=M}filterEntity(M){return this.values.some(Z=>ht(M,c.S4).some(k=>it(k,{defaultKind:"group"})===Z))}toQueryValue(){return this.values}}class ge{constructor(M){this.values=M}filterEntity(M){return this.values.some(Z=>{var k;return((k=M.spec)==null?void 0:k.lifecycle)===Z})}toQueryValue(){return this.values}}class Oe{constructor(M,Z,k){this.value=M,this.isOwnedEntity=Z,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 We(){var Mt;const $=(0,l.useApi)(u),{filters:{kind:M,type:Z},queryParameters:k,updateFilters:le}=st(),te=[k.type].flat().filter(Boolean),[fe,Ue]=(0,i.useState)(te.length?te:(Mt=Z==null?void 0:Z.getTypes())!=null?Mt:[]),[qe,rt]=(0,i.useState)([]),Ye=(0,i.useMemo)(()=>M==null?void 0:M.value,[M]),{error:xe,loading:Ze,value:St}=(0,Rt.default)(async()=>Ye?await $.getEntities({filter:{kind:Ye},fields:["spec.type"]}).then(Kt=>Kt.items):[],[Ye,$]),Ot=(0,i.useRef)(St);return(0,i.useEffect)(()=>{const kt=Ot.current;if(Ot.current=St,Ze||!Ye||kt===St||!St)return;const Kt=St.reduce(($t,pn)=>{var Wt;if(typeof((Wt=pn.spec)==null?void 0:Wt.type)!="string")return $t;const Ln=pn.spec.type.toLocaleLowerCase("en-US");return $t[Ln]||($t[Ln]=0),$t[Ln]+=1,$t},{}),Jt=Object.entries(Kt).sort(([,$t],[,pn])=>pn-$t).map(([$t])=>$t);rt(Jt);const ln=fe.filter($t=>Jt.includes($t));De()(fe,ln)||Ue(ln)},[Ze,Ye,fe,Ue,St]),(0,i.useEffect)(()=>{le({type:fe.length?new U(fe):void 0})},[fe,le]),{loading:Ze,error:xe,availableTypes:qe,selectedTypes:fe,setSelectedTypes:Ue}}function nt(){const $=(0,l.useApi)(u),{error:M,loading:Z,value:k}=(0,Rt.default)(async()=>{const le=await $.getEntities({fields:["kind"]}).then(te=>te.items);return[...new Set(le.map(te=>te.kind))].sort()});return{error:M,loading:Z,kinds:k}}function Ie(){const $=(0,l.useApi)(u),M=(0,l.useApi)(l.identityApiRef);return(0,Rt.default)(()=>$.getEntityByName({kind:"User",namespace:"default",name:M.getUserId()}),[$,M])}const pe=20;function He($,{type:M,kind:Z}){const k=(0,l.useApi)(u),{loading:le,value:te,error:fe}=(0,Rt.default)(async()=>{const Ue=$.relations&&$.relations.filter(xe=>(!M||xe.type.toLocaleLowerCase("en-US")===M.toLocaleLowerCase("en-US"))&&(!Z||xe.target.kind.toLocaleLowerCase("en-US")===Z.toLocaleLowerCase("en-US")));if(!Ue)return[];const qe=Object.values((0,d.groupBy)(Ue,({target:xe})=>`${xe.kind}:${xe.namespace}`.toLocaleLowerCase("en-US"))),rt=[];for(const xe of qe)rt.push({kind:xe[0].target.kind,namespace:xe[0].target.namespace,nameBatches:(0,d.chunk)(xe.map(Ze=>Ze.target.name),pe)});return(await Promise.all(rt.flatMap(xe=>xe.nameBatches.map(Ze=>k.getEntities({filter:{kind:xe.kind,"metadata.namespace":xe.namespace,"metadata.name":Ze}}))))).flatMap(xe=>xe.items)},[$,M]);return{entities:te,loading:le,error:fe}}var de=e(72164);function Ce($){return typeof $=="string"?$:(0,c.eE)($)}function ze(){const $=(0,l.useApi)(E),M=(0,de.Z)($.starredEntitie$(),new Set),Z=(0,i.useCallback)(le=>M.has(Ce(le)),[M]),k=(0,i.useCallback)(le=>$.toggleStarred(Ce(le)).then(),[$]);return{starredEntities:M,toggleStarredEntity:k,isStarredEntity:Z}}function je($){return typeof $=="string"?$:(0,c.eE)($)}function Fe($){const M=(0,l.useApi)(E),[Z,k]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{const te=M.starredEntitie$().subscribe({next(fe){k(fe.has(je($)))}});return()=>{te.unsubscribe()}},[$,M]),{toggleStarredEntity:(0,i.useCallback)(()=>M.toggleStarred(je($)).then(),[$,M]),isStarredEntity:Z}}var at=e(51949);function Be($){try{const M=(0,c.of)($,{defaultKind:"User",defaultNamespace:"default"});return(0,c.eE)(M)}catch{return $}}async function Xe($){const M=$.getUserId(),Z=await $.getIdToken(),k=[];if(M&&k.push(Be(M)),Z)try{const le=(0,at.Z)(Z);(le==null?void 0:le.ent)&&[le.ent].flat().filter(te=>typeof te=="string").map(te=>te.toLocaleLowerCase("en-US")).forEach(te=>k.push(te))}catch{}return k}async function ke($,M){const Z=new Array,k=M.find(le=>le.startsWith("user:"));if(k){const le=await $.getEntityByName((0,c.of)(k));if(le){const te=ht(le,c.hr,{kind:"Group"});for(const fe of te)Z.push((0,c.eE)(fe))}}return Z}function J(){const $=(0,l.useApi)(l.identityApiRef),M=(0,l.useApi)(u),{loading:Z,value:k}=(0,Rt.default)(async()=>{const te=await Xe($),fe=await ke(M,te);return new Set([...te,...fe])},[]),le=(0,i.useMemo)(()=>{const te=new Set(k!=null?k:[]);return fe=>{const Ue=("metadata"in fe?ht(fe,c.S4):[fe]).map(c.eE);for(const qe of Ue)if(te.has(qe))return!0;return!1}},[k]);return(0,i.useMemo)(()=>({loading:Z,isOwnedEntity:le}),[Z,le])}function v($){const M=useApi(identityApiRef),Z=useApi(catalogApiRef),{loading:k,value:le}=useAsync(async()=>{const fe=await loadIdentityOwnerRefs(M),Ue=await loadCatalogOwnerRefs(Z,fe);return await Z.getEntities($?{filter:{kind:$,[`relations.${RELATION_OWNED_BY}`]:[...fe,...Ue]}}:{filter:{[`relations.${RELATION_OWNED_BY}`]:[...fe,...Ue]}})},[]),te=useMemo(()=>le,[le]);return useMemo(()=>({loading:k,ownedEntities:te}),[k,te])}const I=({initialFilter:$,hidden:M})=>{var te;const{updateFilters:Z,queryParameters:k}=useEntityListProvider(),[le]=useState((te=[k.kind].flat()[0])!=null?te:$);return useEffect(()=>{Z({kind:le?new EntityKindFilter(le):void 0})},[le,Z]),M?null:React.createElement(Alert,{severity:"warning"},"Kind filter not yet available")};var K=e(79692),ee=e(95544),Ae=e(90436),me=e(5806),be=e(21324),Me=e(86619),yt=e(19996),Xt=e(25505),on=e(38016),ie=e(88013);const w=(0,K.Z)({input:{}},{name:"CatalogReactEntityLifecyclePicker"}),_=i.createElement(Xt.Z,{fontSize:"small"}),ye=i.createElement(yt.Z,{fontSize:"small"}),Ve=()=>{var rt,Ye;const $=w(),{updateFilters:M,backendEntities:Z,filters:k,queryParameters:le}=st(),te=[le.lifecycles].flat().filter(Boolean),[fe,Ue]=(0,i.useState)(te.length?te:(Ye=(rt=k.lifecycles)==null?void 0:rt.values)!=null?Ye:[]);(0,i.useEffect)(()=>{M({lifecycles:fe.length?new ge(fe):void 0})},[fe,M]);const qe=(0,i.useMemo)(()=>[...new Set(Z.map(xe=>{var Ze;return(Ze=xe.spec)==null?void 0:Ze.lifecycle}).filter(Boolean))].sort(),[Z]);return qe.length?i.createElement(ee.Z,{pb:1,pt:1},i.createElement(Ae.Z,{variant:"button"},"Lifecycle"),i.createElement(ie.ZP,{"aria-label":"Lifecycle",multiple:!0,options:qe,value:fe,onChange:(xe,Ze)=>Ue(Ze),renderOption:(xe,{selected:Ze})=>i.createElement(me.Z,{control:i.createElement(be.Z,{icon:_,checkedIcon:ye,checked:Ze}),label:xe}),size:"small",popupIcon:i.createElement(on.Z,{"data-testid":"lifecycle-picker-expand"}),renderInput:xe=>i.createElement(Me.Z,{...xe,className:$.input,variant:"outlined"})})):null},et=(0,K.Z)({input:{}},{name:"CatalogReactEntityOwnerPicker"}),pt=i.createElement(Xt.Z,{fontSize:"small"}),bt=i.createElement(yt.Z,{fontSize:"small"}),an=()=>{var rt,Ye;const $=et(),{updateFilters:M,backendEntities:Z,filters:k,queryParameters:le}=st(),te=[le.owners].flat().filter(Boolean),[fe,Ue]=(0,i.useState)(te.length?te:(Ye=(rt=k.owners)==null?void 0:rt.values)!=null?Ye:[]);(0,i.useEffect)(()=>{M({owners:fe.length?new ue(fe):void 0})},[fe,M]);const qe=(0,i.useMemo)(()=>[...new Set(Z.flatMap(xe=>ht(xe,c.S4).map(Ze=>it(Ze,{defaultKind:"group"}))).filter(Boolean))].sort(),[Z]);return qe.length?i.createElement(ee.Z,{pb:1,pt:1},i.createElement(Ae.Z,{variant:"button"},"Owner"),i.createElement(ie.ZP,{multiple:!0,"aria-label":"Owner",options:qe,value:fe,onChange:(xe,Ze)=>Ue(Ze),renderOption:(xe,{selected:Ze})=>i.createElement(me.Z,{control:i.createElement(be.Z,{icon:pt,checkedIcon:bt,checked:Ze}),label:xe}),size:"small",popupIcon:i.createElement(on.Z,{"data-testid":"owner-picker-expand"}),renderInput:xe=>i.createElement(Me.Z,{...xe,className:$.input,variant:"outlined"})})):null},hn=(0,K.Z)($=>({searchToolbar:{paddingLeft:0,paddingRight:0},input:{}}),{name:"CatalogReactEntitySearchBar"}),Qn=()=>{var te,fe;const $=hn(),{filters:M,updateFilters:Z}=useEntityListProvider(),[k,le]=useState((fe=(te=M.text)==null?void 0:te.value)!=null?fe:"");return useDebounce(()=>{Z({text:k.length?new EntityTextFilter(k):void 0})},250,[k,Z]),React.createElement(Toolbar,{className:$.searchToolbar},React.createElement(FormControl,null,React.createElement(Input,{id:"input-with-icon-adornment",className:$.input,placeholder:"Search",autoComplete:"off",onChange:Ue=>le(Ue.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:()=>le(""),edge:"end",disabled:k.length===0},React.createElement(Clear,null)))})))};function Pn({defaultKind:$}){function M(Z){var k;return((k=Z.metadata)==null?void 0:k.title)||it(Z,{defaultKind:$})}return{title:"Name",highlight:!0,customFilterAndSearch(Z,k){return M(k).includes(Z)},customSort(Z,k){return M(Z).localeCompare(M(k))},render:Z=>{var k;return i.createElement(T,{entityRef:Z,defaultKind:$,title:(k=Z.metadata)==null?void 0:k.title})}}}function In({title:$,relation:M,defaultKind:Z,filter:k}){function le(fe){return ht(fe,M,k)}function te(fe){return le(fe).map(Ue=>it(Ue,{defaultKind:Z})).join(", ")}return{title:$,customFilterAndSearch(fe,Ue){return te(Ue).includes(fe)},customSort(fe,Ue){return te(fe).localeCompare(te(Ue))},render:fe=>i.createElement(R,{entityRefs:le(fe),defaultKind:Z})}}function gt(){return In({title:"Owner",relation:c.S4,defaultKind:"group"})}function wt(){return In({title:"Domain",relation:c.cz,defaultKind:"domain",filter:{kind:"domain"}})}function sn(){return In({title:"System",relation:c.cz,defaultKind:"system",filter:{kind:"system"}})}function On(){return{title:"Description",field:"metadata.description",render:$=>i.createElement(lt.OverflowTooltip,{text:$.metadata.description,placement:"bottom-start",line:2}),width:"auto"}}function Vt(){return{title:"Lifecycle",field:"spec.lifecycle"}}function Un(){return{title:"Type",field:"spec.type"}}const rr=[Pn({defaultKind:"system"}),wt(),gt(),On()],$n=[Pn({defaultKind:"component"}),sn(),gt(),Un(),Vt(),On()],vr=(0,K.Z)($=>({empty:{padding:$.spacing(2),display:"flex",justifyContent:"center"}}));function Zn({entities:$,title:M,emptyContent:Z,variant:k="gridItem",columns:le}){const te=vr(),fe={minWidth:"0",width:"100%"};return k==="gridItem"&&(fe.height="calc(100% - 10px)"),i.createElement(lt.Table,{columns:le,title:M,style:fe,emptyContent:Z&&i.createElement("div",{className:te.empty},Z),options:{search:!1,paging:!1,actionsColumnIndex:-1,padding:"dense"},data:$})}Zn.columns=r,Zn.systemEntityColumns=rr,Zn.componentEntityColumns=$n;const wn=(0,K.Z)({input:{}},{name:"CatalogReactEntityTagPicker"}),ar=i.createElement(Xt.Z,{fontSize:"small"}),or=i.createElement(yt.Z,{fontSize:"small"}),sr=()=>{var rt,Ye;const $=wn(),{updateFilters:M,backendEntities:Z,filters:k,queryParameters:le}=st(),te=[le.tags].flat().filter(Boolean),[fe,Ue]=(0,i.useState)(te.length?te:(Ye=(rt=k.tags)==null?void 0:rt.values)!=null?Ye:[]);(0,i.useEffect)(()=>{M({tags:fe.length?new G(fe):void 0})},[fe,M]);const qe=(0,i.useMemo)(()=>[...new Set(Z.flatMap(xe=>xe.metadata.tags).filter(Boolean))].sort(),[Z]);return qe.length?i.createElement(ee.Z,{pb:1,pt:1},i.createElement(Ae.Z,{variant:"button"},"Tags"),i.createElement(ie.ZP,{multiple:!0,"aria-label":"Tags",options:qe,value:fe,onChange:(xe,Ze)=>Ue(Ze),renderOption:(xe,{selected:Ze})=>i.createElement(me.Z,{control:i.createElement(be.Z,{icon:ar,checkedIcon:or,checked:Ze}),label:xe}),size:"small",popupIcon:i.createElement(on.Z,{"data-testid":"tag-picker-expand"}),renderInput:xe=>i.createElement(Me.Z,{...xe,className:$.input,variant:"outlined"})})):null};var Xn=e(82108),Rr=e.n(Xn);const ir=$=>{var rt;const{hidden:M,initialFilter:Z}=$,k=(0,l.useApi)(l.alertApiRef),{error:le,availableTypes:te,selectedTypes:fe,setSelectedTypes:Ue}=We();if((0,i.useEffect)(()=>{le&&k.post({message:"Failed to load entity types",severity:"error"}),Z&&Ue([Z])},[le,k,Z,Ue]),te.length===0||le)return null;const qe=[{value:"all",label:"All"},...te.map(Ye=>({value:Ye,label:Rr()(Ye)}))];return M?null:i.createElement(ee.Z,{pb:1,pt:1},i.createElement(lt.Select,{label:"Type",items:qe,selected:(rt=qe.length>1?fe[0]:void 0)!=null?rt:"all",onChange:Ye=>Ue(Ye==="all"?[]:[String(Ye)])}))};var Wn=e(15459),Sr=e(61837),lr=e(11640),cr=e(28347);const ur=(0,Wn.Z)({root:{color:"#f3ba37"}})(lr.Z),kn=$=>$?"Remove from favorites":"Add to favorites",zn=$=>$?i.createElement(ur,null):i.createElement(cr.Z,null),dr=$=>{const{toggleStarredEntity:M,isStarredEntity:Z}=Fe($.entity);return i.createElement(Sr.Z,{color:"inherit",...$,onClick:()=>M()},i.createElement(se.ZP,{title:kn(Z)},zn(Z)))};var An=e(77277),gn=e(55999),Cr=e(85256),Tr=e(8629),fr=e(79249),en=e(38724),Pr=e(49429),qn=e(99688);function Ir($){var St;const M=(0,l.useApi)(u),Z=(St=$.metadata.annotations)==null?void 0:St[c.lb],k=$.metadata.uid,le=Z==="bootstrap:bootstrap",te=(0,Rt.default)(async()=>{const Ot=M.getOriginLocationByEntity($);let Mt;if(!Z)Mt=Promise.resolve([]);else{const kt=`metadata.annotations.${c.lb}`;Mt=M.getEntities({filter:{[kt]:Z},fields:["kind","metadata.uid","metadata.name","metadata.namespace"]}).then(Kt=>Kt.items)}return Promise.all([Ot,Mt]).then(([kt,Kt])=>({location:kt,colocatedEntities:Kt}))},[M,$]),fe=(0,i.useCallback)(async function(){const{location:Mt,colocatedEntities:kt}=te.value;await M.removeLocationById(Mt.id),await Promise.allSettled(kt.map(Kt=>M.removeEntityByUid(Kt.metadata.uid)))},[M,te]),Ue=(0,i.useCallback)(async function(){await M.removeEntityByUid(k)},[M,k]);if(le)return{type:"bootstrap",location:Z,deleteEntity:Ue};const{loading:qe,error:rt,value:Ye}=te;if(qe)return{type:"loading"};if(rt)return{type:"error",error:rt};const{location:xe,colocatedEntities:Ze}=Ye;return xe?{type:"unregister",location:Z,colocatedEntities:Ze.map(c.C_),unregisterLocation:fe,deleteEntity:Ue}:{type:"only-delete",deleteEntity:Ue}}var Lr=e(10179);const Or=(0,K.Z)({advancedButton:{fontSize:"0.7em"}}),xr=({entity:$,onConfirm:M})=>{var St;const Z=(0,l.useApi)(l.alertApiRef),k=(0,l.useApi)(l.configApiRef),le=Or(),te=Ir($),[fe,Ue]=(0,i.useState)(!1),[qe,rt]=(0,i.useState)(!1),Ye=(St=k.getOptionalString("app.title"))!=null?St:"Backstage",xe=(0,i.useCallback)(async function(){if("unregisterLocation"in te){rt(!0);try{await te.unregisterLocation(),M()}catch(Mt){(0,Lr.BD)(Mt),Z.post({message:Mt.message})}finally{rt(!1)}}},[Z,M,te]),Ze=(0,i.useCallback)(async function(){if("deleteEntity"in te){rt(!0);try{await te.deleteEntity(),M()}catch(Mt){(0,Lr.BD)(Mt),Z.post({message:Mt.message})}finally{rt(!1)}}},[Z,M,te]);return te.type==="loading"?i.createElement(lt.Progress,null):te.type==="error"?i.createElement(lt.ResponseErrorPanel,{error:te.error}):te.type==="bootstrap"?i.createElement(i.Fragment,null,i.createElement(qn.Z,{severity:"info"},'You cannot unregister this entity, since it originates from a protected Backstage configuration (location "',te.location,'"). If you believe this is in error, please contact the ',Ye," ","integrator."),i.createElement(ee.Z,{marginTop:2},!fe&&i.createElement(An.Z,{variant:"text",size:"small",color:"primary",className:le.advancedButton,onClick:()=>Ue(!0)},"Advanced Options"),fe&&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:qe,onClick:Ze},"Delete Entity")))):te.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:qe,onClick:Ze},"Delete Entity")):te.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"},te.colocatedEntities.map(Ot=>i.createElement("li",{key:`${Ot.kind}:${Ot.namespace}/${Ot.name}`},i.createElement(T,{entityRef:Ot})))),i.createElement(gn.Z,null,"Located at the following location:"),i.createElement(gn.Z,{component:"ul"},i.createElement("li",null,te.location)),i.createElement(gn.Z,null,"To undo, just re-register the entity in ",Ye,"."),i.createElement(ee.Z,{marginTop:2},i.createElement(An.Z,{variant:"contained",color:"secondary",disabled:qe,onClick:xe},"Unregister Location"),!fe&&i.createElement(ee.Z,{component:"span",marginLeft:2},i.createElement(An.Z,{variant:"text",size:"small",color:"primary",className:le.advancedButton,onClick:()=>Ue(!0)},"Advanced Options"))),fe&&i.createElement(i.Fragment,null,i.createElement(ee.Z,{paddingTop:4,paddingBottom:4},i.createElement(Cr.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:qe,onClick:Ze},"Delete Entity"))):i.createElement(qn.Z,{severity:"error"},"Internal error: Unknown state")},Yr=({open:$,onConfirm:M,onClose:Z,entity:k})=>i.createElement(Tr.Z,{open:$,onClose:Z},i.createElement(fr.Z,{id:"responsive-dialog-title"},"Are you sure you want to unregister this entity?"),i.createElement(en.Z,null,i.createElement(xr,{entity:k,onConfirm:M})),i.createElement(Pr.Z,null,i.createElement(An.Z,{onClick:Z,color:"primary"},"Cancel")));var Dr=e(94339),Fr=e(11776),Qr=e(12231),Br=e(86136),br=e(49378),Bn=e(9520),mr=e(47603);const hr=(0,K.Z)($=>({root:{backgroundColor:"rgba(0, 0, 0, .11)",boxShadow:"none",margin:$.spacing(1,0,1,0)},title:{margin:$.spacing(1,0,0,1),textTransform:"uppercase",fontSize:12,fontWeight:"bold"},listIcon:{minWidth:30,color:$.palette.text.primary},menuItem:{minHeight:$.spacing(6)},groupWrapper:{margin:$.spacing(1,1,2,1)}}),{name:"CatalogReactUserListPicker"});function gr($){return[{name:"Personal",items:[{id:"owned",label:"Owned",icon:mr.Z},{id:"starred",label:"Starred",icon:lr.Z}]},{name:$!=null?$:"Company",items:[{id:"all",label:"All"}]}]}const Mr=({initialFilter:$,availableFilters:M})=>{var pn,Ln;const Z=hr(),le=(pn=(0,l.useApi)(l.configApiRef).getOptionalString("organization.name"))!=null?pn:"Company",{filters:te,updateFilters:fe,backendEntities:Ue,queryParameters:qe}=st(),rt=["starred","all"],Ye=gr(le).map(Wt=>({...Wt,items:Wt.items.filter(({id:Gt})=>["group","user"].some(bn=>bn===qe.kind)?rt.includes(Gt):!M||M.includes(Gt))})).filter(({items:Wt})=>!!Wt.length),{isStarredEntity:xe}=ze(),{isOwnedEntity:Ze}=J(),St=(0,i.useMemo)(()=>new Oe("owned",Ze,xe),[Ze,xe]),Ot=(0,i.useMemo)(()=>new Oe("starred",Ze,xe),[Ze,xe]),[Mt,kt]=(0,i.useState)(Ue),Kt=Mt.filter(Wt=>St.filterEntity(Wt)).length,[Jt,ln]=(0,i.useState)(Kt>0?(Ln=[qe.user].flat()[0])!=null?Ln:$:"all");(0,i.useEffect)(()=>{fe({user:Jt?new Oe(Jt,Ze,xe):void 0})},[Jt,Ze,xe,fe]),(0,i.useEffect)(()=>{const Wt=vt((0,d.compact)(Object.values({...te,user:void 0})));kt(Ue.filter(Wt))},[te,Ue]);function $t(Wt){switch(Wt){case"owned":return Kt;case"starred":return Mt.filter(Gt=>Ot.filterEntity(Gt)).length;default:return Mt.length}}return i.createElement(Dr.Z,{className:Z.root},Ye.map(Wt=>i.createElement(i.Fragment,{key:Wt.name},i.createElement(Ae.Z,{variant:"subtitle2",className:Z.title},Wt.name),i.createElement(Dr.Z,{className:Z.groupWrapper},i.createElement(Fr.Z,{disablePadding:!0,dense:!0},Wt.items.map(Gt=>{var bn,Hn;return i.createElement(Qr.Z,{key:Gt.id,button:!0,divider:!0,onClick:()=>ln(Gt.id),selected:Gt.id===((bn=te.user)==null?void 0:bn.value),className:Z.menuItem},Gt.icon&&i.createElement(Br.Z,{className:Z.listIcon},i.createElement(Gt.icon,{fontSize:"small"})),i.createElement(br.Z,null,i.createElement(Ae.Z,{variant:"body1","data-testid":`user-picker-${Gt.id}`},Gt.label)),i.createElement(Bn.Z,null,(Hn=$t(Gt.id))!=null?Hn:"-"))}))))))},Nr=({children:$,value:M})=>{var qe;const[Z,k]=useState((qe=M==null?void 0:M.filters)!=null?qe:{}),le=useCallback(rt=>{k(Ye=>{const xe=typeof rt=="function"?rt(Ye):rt;return{...Ye,...xe}})},[]),te={entities:[],backendEntities:[],updateFilters:le,filters:Z,loading:!1,queryParameters:{}},{filters:fe,...Ue}=M!=null?M:{};return React.createElement(EntityListContext.Provider,{value:{...te,...Ue}},$)};var pr=e(92787)},92787:function(){},39398:function(Q,o,e){"use strict";e.r(o),e.d(o,{AboutCard:function(){return we},AboutContent:function(){return ce},AboutField:function(){return X}});var r=e(52890),t=e(41682),l=e(36964),u=e(36356),g=e(85653),s=e(79692),c=e(94339),d=e(32552),y=e(61837),m=e(85256),E=e(24579),i=e(52866),S=e(30254),b=e(27604),P=e(2784),j=e(47851),F=e(60905),B=e(90436),N=e(7089);const D=(0,s.Z)(he=>({value:{fontWeight:"bold",overflow:"hidden",lineHeight:"24px",wordBreak:"break-word"},label:{color:he.palette.text.secondary,textTransform:"uppercase",fontSize:"10px",fontWeight:"bold",letterSpacing:.5,overflow:"hidden",whiteSpace:"nowrap"}})),X=({label:he,value:Ge,gridSizes:Le,children:Je})=>{const ot=D(),_e=(0,l.useElementFilter)(Je,dt=>dt.getElements()),mt=_e.length>0?_e:P.createElement(B.Z,{variant:"body2",className:ot.value},Ge||"unknown");return P.createElement(F.Z,{item:!0,...Le},P.createElement(B.Z,{variant:"subtitle2",className:ot.label},he),mt)},V=(0,s.Z)({description:{wordBreak:"break-word"}}),ce=({entity:he})=>{var ht,Ut,Nt,Dt,Lt,st;const Ge=V(),Le=he.kind.toLocaleLowerCase("en-US")==="system",Je=he.kind.toLocaleLowerCase("en-US")==="resource",ot=he.kind.toLocaleLowerCase("en-US")==="component",_e=he.kind.toLocaleLowerCase("en-US")==="api",mt=he.kind.toLocaleLowerCase("en-US")==="template",dt=he.kind.toLocaleLowerCase("en-US")==="location",ct=he.kind.toLocaleLowerCase("en-US")==="group",Et=(0,g.getEntityRelations)(he,r.cz,{kind:"system"}),vt=(0,g.getEntityRelations)(he,r.cz,{kind:"component"}),It=(0,g.getEntityRelations)(he,r.cz,{kind:"domain"}),At=(0,g.getEntityRelations)(he,r.S4);return P.createElement(F.Z,{container:!0},P.createElement(X,{label:"Description",gridSizes:{xs:12}},P.createElement(B.Z,{variant:"body2",paragraph:!0,className:Ge.description},((ht=he==null?void 0:he.metadata)==null?void 0:ht.description)||"No description")),P.createElement(X,{label:"Owner",value:"No Owner",gridSizes:{xs:12,sm:6,lg:4}},At.length>0&&P.createElement(g.EntityRefLinks,{entityRefs:At,defaultKind:"group"})),(Le||It.length>0)&&P.createElement(X,{label:"Domain",value:"No Domain",gridSizes:{xs:12,sm:6,lg:4}},It.length>0&&P.createElement(g.EntityRefLinks,{entityRefs:It,defaultKind:"domain"})),(_e||ot||Je||Et.length>0)&&P.createElement(X,{label:"System",value:"No System",gridSizes:{xs:12,sm:6,lg:4}},Et.length>0&&P.createElement(g.EntityRefLinks,{entityRefs:Et,defaultKind:"system"})),ot&&vt.length>0&&P.createElement(X,{label:"Parent Component",value:"No Parent Component",gridSizes:{xs:12,sm:6,lg:4}},P.createElement(g.EntityRefLinks,{entityRefs:vt,defaultKind:"component"})),(_e||ot||Je||mt||ct||dt||typeof((Ut=he==null?void 0:he.spec)==null?void 0:Ut.type)=="string")&&P.createElement(X,{label:"Type",value:(Nt=he==null?void 0:he.spec)==null?void 0:Nt.type,gridSizes:{xs:12,sm:6,lg:4}}),(_e||ot||typeof((Dt=he==null?void 0:he.spec)==null?void 0:Dt.lifecycle)=="string")&&P.createElement(X,{label:"Lifecycle",value:(Lt=he==null?void 0:he.spec)==null?void 0:Lt.lifecycle,gridSizes:{xs:12,sm:6,lg:4}}),P.createElement(X,{label:"Tags",value:"No Tags",gridSizes:{xs:12,sm:6,lg:4}},(((st=he==null?void 0:he.metadata)==null?void 0:st.tags)||[]).map(Rt=>P.createElement(N.Z,{key:Rt,size:"small",label:Rt}))))},Se=(0,s.Z)({gridItemCard:{display:"flex",flexDirection:"column",height:"calc(100% - 10px)",marginBottom:"10px"},fullHeightCard:{display:"flex",flexDirection:"column",height:"100%"},gridItemCardContent:{flex:1},fullHeightCardContent:{flex:1}});function we({variant:he}){var Dt,Lt;const Ge=Se(),{entity:Le}=(0,g.useEntity)(),Je=(0,l.useApi)(u.q3),ot=(0,l.useApi)(g.Ah),_e=(0,l.useApi)(l.alertApiRef),mt=(0,l.useRouteRef)(j.j),dt=(0,g.getEntitySourceLocation)(Le,Je),ct=(0,g.getEntityMetadataEditUrl)(Le),Et={label:"View Source",disabled:!dt,icon:P.createElement(u.nW,{type:dt==null?void 0:dt.integrationType}),href:dt==null?void 0:dt.locationTargetUrl},vt={label:"View TechDocs",disabled:!((Dt=Le.metadata.annotations)==null?void 0:Dt["backstage.io/techdocs-ref"])||!mt,icon:P.createElement(S.Z,null),href:mt&&mt({namespace:Le.metadata.namespace||r.sk,kind:Le.kind,name:Le.metadata.name})};let It="";he==="gridItem"?It=Ge.gridItemCard:he==="fullHeight"&&(It=Ge.fullHeightCard);let At="";he==="gridItem"?At=Ge.gridItemCardContent:he==="fullHeight"&&(At=Ge.fullHeightCardContent);const ht=(Lt=Le.metadata.annotations)==null?void 0:Lt[r.Jl],Ut=(ht==null?void 0:ht.startsWith("url:"))||(ht==null?void 0:ht.startsWith("file:")),Nt=(0,P.useCallback)(async()=>{await ot.refreshEntity((0,r.eE)(Le)),_e.post({message:"Refresh scheduled",severity:"info"})},[ot,_e,Le]);return P.createElement(c.Z,{className:It},P.createElement(d.Z,{title:"About",action:P.createElement(P.Fragment,null,Ut&&P.createElement(y.Z,{"aria-label":"Refresh",title:"Schedule entity refresh",onClick:Nt},P.createElement(i.Z,null)),P.createElement(y.Z,{component:t.Link,"aria-label":"Edit",disabled:!ct,title:"Edit Metadata",to:ct!=null?ct:"#"},P.createElement(b.Z,null))),subheader:P.createElement(t.HeaderIconLinkRow,{links:[Et,vt]})}),P.createElement(m.Z,null),P.createElement(E.Z,{className:At},P.createElement(ce,{entity:Le})))}},49782:function(Q,o,e){"use strict";e.d(o,{K:function(){return m}});var r=e(2784),t=e(79692),l=e(12420),u=e(97580),g=e(73698),s=e(74603),c=e(12231),d=e(85653);const y=(0,t.Z)(E=>(0,l.Z)({root:{...E.typography.h4}})),m=({initialFilter:E="component"})=>{var N;const i=y(),{kinds:S=[]}=(0,d.useEntityKinds)(),{updateFilters:b,queryParameters:P}=(0,d.useEntityListProvider)(),[j,F]=(0,r.useState)(((N=[P.kind].flat()[0])!=null?N:E).toLocaleLowerCase("en-US"));(0,r.useEffect)(()=>{b({kind:j?new d.EntityKindFilter(j):void 0})},[j,b]);const B=[(0,u.Z)(j)].concat(S).sort().reduce((D,X)=>(D[X.toLocaleLowerCase("en-US")]=X,D),{});return r.createElement(g.Z,{input:r.createElement(s.Z,{value:j}),value:j,onChange:D=>F(D.target.value),classes:i},Object.keys(B).map(D=>r.createElement(c.Z,{value:D,key:D},`${B[D]}s`)))}},7758:function(Q,o,e){"use strict";e.r(o),e.d(o,{CatalogPage:function(){return E},DefaultCatalogPage:function(){return m}});var r=e(2784),t=e(10289),l=e(41682),u=e(36964),g=e(85653),s=e(47851),c=e(91730),d=e(26997),y=e(49782);const m=({columns:i,actions:S,initiallySelectedFilter:b="owned"})=>{var F;const P=(F=(0,u.useApi)(u.configApiRef).getOptionalString("organization.name"))!=null?F:"Backstage",j=(0,u.useRouteRef)(s.y);return r.createElement(l.PageWithHeader,{title:`${P} Catalog`,themeId:"home"},r.createElement(g.EntityListProvider,null,r.createElement(l.Content,null,r.createElement(l.ContentHeader,{titleComponent:r.createElement(y.K,null)},r.createElement(l.CreateButton,{title:"Create Component",to:j&&j()}),r.createElement(l.SupportButton,null,"All your software catalog entities")),r.createElement(d.q7,null,r.createElement(d.Gh,null,r.createElement(g.EntityTypePicker,null),r.createElement(g.UserListPicker,{initialFilter:b}),r.createElement(g.EntityOwnerPicker,null),r.createElement(g.EntityLifecyclePicker,null),r.createElement(g.EntityTagPicker,null)),r.createElement(d.Nz,null,r.createElement(c.E,{columns:i,actions:S}))))))},E=i=>(0,t.pC)()||r.createElement(m,{...i})},17499:function(Q,o,e){"use strict";e.r(o),e.d(o,{createNameColumn:function(){return g},createSystemColumn:function(){return s},createOwnerColumn:function(){return c},createSpecTypeColumn:function(){return d},createSpecLifecycleColumn:function(){return y},createMetadataDescriptionColumn:function(){return m},createTagsColumn:function(){return E}});var r=e(2784),t=e(85653),l=e(7089),u=e(41682);function g(i){function S(b){var P;return((P=b.metadata)==null?void 0:P.title)||(0,t.formatEntityRefTitle)(b,{defaultKind:i==null?void 0:i.defaultKind})}return{title:"Name",field:"resolved.name",highlight:!0,customSort({entity:b},{entity:P}){return S(b).localeCompare(S(P))},render:({entity:b})=>{var P;return r.createElement(t.EntityRefLink,{entityRef:b,defaultKind:(i==null?void 0:i.defaultKind)||"Component",title:(P=b.metadata)==null?void 0:P.title})}}}function s(){return{title:"System",field:"resolved.partOfSystemRelationTitle",render:({resolved:i})=>r.createElement(t.EntityRefLinks,{entityRefs:i.partOfSystemRelations,defaultKind:"system"})}}function c(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:i})=>r.createElement(t.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(u.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(Q,o,e){"use strict";e.d(o,{E:function(){return y}});var r=e(52890),t=e(85653),l=e(27604),u=e(2997),g=e(76635),s=e(2784),c=e(17499),d=e(41682);const y=({columns:m,actions:E})=>{var we,he,Ge;const{isStarredEntity:i,toggleStarredEntity:S}=(0,t.useStarredEntities)(),{loading:b,error:P,entities:j,filters:F}=(0,t.useEntityListProvider)(),B=(0,s.useMemo)(()=>{var Le;return[c.createNameColumn({defaultKind:(Le=F.kind)==null?void 0:Le.value}),c.createSystemColumn(),c.createOwnerColumn(),c.createSpecTypeColumn(),c.createSpecLifecycleColumn(),c.createMetadataDescriptionColumn(),c.createTagsColumn()]},[(we=F.kind)==null?void 0:we.value]),N=F.type===void 0,D=(0,g.capitalize)((Ge=(he=F.user)==null?void 0:he.value)!=null?Ge:"all");if(P)return s.createElement("div",null,s.createElement(d.WarningPanel,{severity:"error",title:"Could not fetch catalog entities."},s.createElement(d.CodeSnippet,{language:"text",text:P.toString()})));const X=[({entity:Le})=>{const Je=(0,t.getEntityMetadataViewUrl)(Le);return{icon:()=>s.createElement(u.Z,{"aria-label":"View",fontSize:"small"}),tooltip:"View",disabled:!Je,onClick:()=>{!Je||window.open(Je,"_blank")}}},({entity:Le})=>{const Je=(0,t.getEntityMetadataEditUrl)(Le);return{icon:()=>s.createElement(l.Z,{"aria-label":"Edit",fontSize:"small"}),tooltip:"Edit",disabled:!Je,onClick:()=>{!Je||window.open(Je,"_blank")}}},({entity:Le})=>{const Je=i(Le);return{cellStyle:{paddingLeft:"1em"},icon:()=>(0,t.favoriteEntityIcon)(Je),tooltip:(0,t.favoriteEntityTooltip)(Je),onClick:()=>S(Le)}}],V=j.map(Le=>{const Je=(0,t.getEntityRelations)(Le,r.cz,{kind:"system"}),ot=(0,t.getEntityRelations)(Le,r.S4);return{entity:Le,resolved:{name:(0,t.formatEntityRefTitle)(Le,{defaultKind:"Component"}),ownedByRelationsTitle:ot.map(_e=>(0,t.formatEntityRefTitle)(_e,{defaultKind:"group"})).join(", "),ownedByRelations:ot,partOfSystemRelationTitle:Je.map(_e=>(0,t.formatEntityRefTitle)(_e,{defaultKind:"system"})).join(", "),partOfSystemRelations:Je}}}),ce=(m||B).find(Le=>Le.title==="Type");ce&&(ce.hidden=!N);const Se=V.length>20;return s.createElement(d.Table,{isLoading:b,columns:m||B,options:{paging:Se,pageSize:20,actionsColumnIndex:-1,loadingType:"linear",showEmptyDataSourceMessage:!b,padding:"dense",pageSizeOptions:[20,50,100]},title:`${D} (${j.length})`,data:V,actions:E||X})};y.columns=c},26997:function(Q,o,e){"use strict";e.d(o,{Nz:function(){return i},Gh:function(){return E},q7:function(){return l}});var r=e(60905),t=e(2784);const l=({children:S})=>t.createElement(r.Z,{container:!0,style:{position:"relative"}},S);var u=e(41156),g=e(60364),s=e(77277),c=e(4190),d=e(95544),y=e(90436),m=e(36444);const E=({children:S})=>{const b=(0,u.Z)(B=>B.breakpoints.down("md")),P=(0,g.Z)(),[j,F]=(0,t.useState)(!1);return b?t.createElement(t.Fragment,null,t.createElement(s.Z,{style:{marginTop:P.spacing(1),marginLeft:P.spacing(1)},onClick:()=>F(!0),startIcon:t.createElement(m.Z,null)},"Filters"),t.createElement(c.ZP,{open:j,onClose:()=>F(!1),anchor:"left",disableAutoFocus:!0,keepMounted:!0,variant:"temporary"},t.createElement(d.Z,{m:2},t.createElement(y.Z,{variant:"h6",component:"h2",style:{marginBottom:P.spacing(1)}},"Filters"),S))):t.createElement(r.Z,{item:!0,lg:2},S)},i=({children:S})=>t.createElement(r.Z,{item:!0,xs:12,lg:10},S)},47851:function(Q,o,e){"use strict";e.d(o,{y:function(){return t},j:function(){return l}});var r=e(36964);const t=(0,r.createExternalRouteRef)({id:"create-component",optional:!0}),l=(0,r.createExternalRouteRef)({id:"view-techdoc",optional:!0,params:["namespace","kind","name"]})},91512:function(Q,o,e){"use strict";e.d(o,{g:function(){return g},w:function(){return s}});var r=e(36964),t=e(10179),l=e(19126),u=e.n(l);const g=(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=u().stringify(d),E=`${await this.discoveryApi.getBaseUrl("search/query")}?${m}`,i=await fetch(E,{headers:y?{Authorization:`Bearer ${y}`}:{}});if(!i.ok)throw await t.VL.fromResponse(i);return i.json()}}},19941:function(Q,o,e){"use strict";e.r(o),e.d(o,{DefaultResultListItem:function(){return d}});var r=e(2784),t=e(38402),l=e(86136),u=e(49378),g=e(95544),s=e(85256),c=e(41682);const d=({result:y,icon:m,secondaryAction:E})=>r.createElement(c.Link,{to:y.location},r.createElement(t.Z,{alignItems:"center"},m&&r.createElement(l.Z,null,m),r.createElement(u.Z,{primaryTypographyProps:{variant:"h6"},primary:y.title,secondary:y.text}),E&&r.createElement(g.Z,{alignItems:"flex-end"},E)),r.createElement(s.Z,null))},1795:function(Q,o,e){"use strict";e.r(o),e.d(o,{SearchBar:function(){return S},SearchBarBase:function(){return i}});var r=e(2784),t=e(48760),l=e(36964),u=e(50581),g=e(61837),s=e(74603),c=e(21853),d=e(33375),y=e(22313);const m=({children:b})=>{const P=(0,l.useAnalytics)(),{term:j}=(0,y.Rx)();return(0,r.useEffect)(()=>{j&&P.captureEvent("search",j)},[P,j]),r.createElement(r.Fragment,null,b)},E=()=>(0,r.useContext)(y.ci)!==void 0,i=({onChange:b,onKeyDown:P,onSubmit:j,debounceTime:F=200,clearButton:B=!0,fullWidth:N=!0,value:D,inputProps:X={},endAdornment:V,...ce})=>{const Se=(0,l.useApi)(l.configApiRef),[we,he]=(0,r.useState)(D),Ge=E();(0,r.useEffect)(()=>{he(Et=>Et!==D?D:Et)},[D]),(0,t.Z)(()=>b(we),F,[we]);const Le=(0,r.useCallback)(Et=>{he(Et.target.value)},[he]),Je=(0,r.useCallback)(Et=>{P&&P(Et),j&&Et.key==="Enter"&&j()},[P,j]),ot=(0,r.useCallback)(()=>{b("")},[b]),_e=`Search in ${Se.getOptionalString("app.title")||"Backstage"}`,mt=r.createElement(u.Z,{position:"start"},r.createElement(g.Z,{"aria-label":"Query",disabled:!0},r.createElement(c.Z,null))),dt=r.createElement(u.Z,{position:"end"},r.createElement(g.Z,{"aria-label":"Clear",onClick:ot},r.createElement(d.Z,null))),ct=r.createElement(m,null,r.createElement(s.Z,{"data-testid":"search-bar-next",value:we,placeholder:_e,startAdornment:mt,endAdornment:B?dt:V,inputProps:{"aria-label":"Search",...X},fullWidth:N,onChange:Le,onKeyDown:Je,...ce}));return Ge?ct:r.createElement(y.Nd,null,ct)},S=({onChange:b,...P})=>{const{term:j,setTerm:F}=(0,y.Rx)(),B=N=>{b?b(N):F(N)};return r.createElement(i,{value:j,onChange:B,...P})}},22313:function(Q,o,e){"use strict";e.d(o,{ci:function(){return s},Nd:function(){return c},Rx:function(){return d}});var r=e(36964),t=e(2784),l=e(64279),u=e(1849),g=e(91512);const s=(0,t.createContext)(void 0),c=({initialState:y={term:"",pageCursor:void 0,filters:{},types:[]},children:m})=>{var ot,_e,mt,dt;const E=(0,r.useApi)(g.g),[i,S]=(0,t.useState)(y.pageCursor),[b,P]=(0,t.useState)(y.filters),[j,F]=(0,t.useState)(y.term),[B,N]=(0,t.useState)(y.types),[D,X]=(0,t.useState)(!1),V=(0,t.useCallback)(()=>X(ct=>!ct),[]),ce=(0,u.Z)(j),Se=(0,l.default)(()=>E.query({term:j,filters:b,pageCursor:i,types:B}),[j,b,B,i]),we=!Se.loading&&!Se.error&&((ot=Se.value)==null?void 0:ot.nextPageCursor),he=!Se.loading&&!Se.error&&((_e=Se.value)==null?void 0:_e.previousPageCursor),Ge=(0,t.useCallback)(()=>{var ct;S((ct=Se.value)==null?void 0:ct.nextPageCursor)},[(mt=Se.value)==null?void 0:mt.nextPageCursor]),Le=(0,t.useCallback)(()=>{var ct;S((ct=Se.value)==null?void 0:ct.previousPageCursor)},[(dt=Se.value)==null?void 0:dt.previousPageCursor]);(0,t.useEffect)(()=>{j&&ce&&j!==ce&&S(void 0)},[j,ce,y.pageCursor]);const Je={result:Se,filters:b,setFilters:P,open:D,toggleModal:V,term:j,setTerm:F,types:B,setTypes:N,pageCursor:i,setPageCursor:S,fetchNextPage:we?Ge:void 0,fetchPreviousPage:he?Le:void 0};return t.createElement(r.AnalyticsContext,{attributes:{searchTypes:B.sort().join(",")}},t.createElement(s.Provider,{value:Je,children:m}))},d=()=>{const y=(0,t.useContext)(s);if(y===void 0)throw new Error("useSearch must be used within a SearchContextProvider");return y}},65678:function(Q,o,e){"use strict";e.d(o,{s:function(){return V}});var r=e(2784),t=e(8629),l=e(79249),u=e(27556),g=e(38724),s=e(60905),c=e(85256),d=e(11776),y=e(49429),m=e(69001),E=e(79692),i=e(1795),S=e(19941),b=e(39332),P=e(22313),j=e(8542),F=e(36964),B=e(41682),N=e(20863);const D=(0,E.Z)(ce=>({container:{borderRadius:30,display:"flex",height:"2.4em"},input:{flex:1},paperFullWidth:{height:"calc(100% - 128px)"},dialogActionsContainer:{padding:ce.spacing(1,3)},viewResultsLink:{verticalAlign:"0.5em"}})),X=({open:ce=!0,toggleModal:Se})=>{const we=(0,F.useRouteRef)(N._Z),he=D(),{term:Ge}=(0,P.Rx)(),Le=()=>{Se()},Je=()=>{Le()};return r.createElement(t.Z,{classes:{paperFullWidth:he.paperFullWidth},onClose:Se,"aria-labelledby":"search-modal-title",open:ce,fullWidth:!0,maxWidth:"lg"},r.createElement(l.Z,null,r.createElement(u.Z,{className:he.container},r.createElement(i.SearchBar,{className:he.input}))),r.createElement(g.Z,null,r.createElement(s.Z,{container:!0,direction:"row-reverse",justifyContent:"flex-start",alignItems:"center"},r.createElement(s.Z,{item:!0},r.createElement(B.Link,{onClick:Se,to:`${we()}?query=${Ge}`},r.createElement("span",{className:he.viewResultsLink},"View Full Results"),r.createElement(m.Z,{color:"primary"})))),r.createElement(c.Z,null),r.createElement(b.SearchResult,null,({results:ot})=>r.createElement(d.Z,null,ot.map(({document:_e})=>r.createElement("div",{role:"button",tabIndex:0,key:`${_e.location}-btn`,onClick:Le,onKeyPress:Je},r.createElement(S.DefaultResultListItem,{key:_e.location,result:_e})))))),r.createElement(y.Z,{className:he.dialogActionsContainer},r.createElement(s.Z,{container:!0,direction:"row"},r.createElement(s.Z,{item:!0,xs:12},r.createElement(j.G,null)))))},V=({open:ce=!0,toggleModal:Se})=>r.createElement(P.Nd,null,r.createElement(X,{open:ce,toggleModal:Se}))},3992:function(Q,o,e){"use strict";e.r(o),e.d(o,{SearchPage:function(){return Zt}});var r=e(2784),t=e(1849),l=e(19126),u=e.n(l),g=e(10289),s=e(22313),c=e(60905),d=e(48760),y=e(79692),m=e(27556),E=e(74603),i=e(61837),S=e(21853),b=e(33375);const P=(0,y.Z)(()=>({root:{display:"flex",alignItems:"center"},input:{flex:1}})),j=({searchQuery:De,handleSearch:it,handleClearSearchBar:lt})=>{const se=P();return r.createElement(m.Z,{component:"form",onSubmit:T=>it(T),className:se.root},r.createElement(i.Z,{disabled:!0,type:"submit","aria-label":"search"},r.createElement(S.Z,null)),r.createElement(E.Z,{className:se.input,placeholder:"Search in Backstage",value:De,onChange:T=>it(T),inputProps:{"aria-label":"search backstage"}}),r.createElement(i.Z,{"aria-label":"search",onClick:()=>lt()},r.createElement(b.Z,null)))};var F=e(85256),B=e(90436),N=e(99688),D=e(64279),X=e(85653),V=e(36444);const ce=(0,y.Z)(De=>({filters:{width:"250px",display:"flex"},icon:{margin:De.spacing(-1,0,0,0)}})),Se=({numberOfSelectedFilters:De,handleToggleFilters:it})=>{const lt=ce();return r.createElement("div",{className:lt.filters},r.createElement(i.Z,{className:lt.icon,"aria-label":"settings",onClick:it},r.createElement(V.Z,null)),r.createElement(B.Z,{variant:"h6"},"Filters (",De||0,")"))};var we=e(94339),he=e(32552),Ge=e(77277),Le=e(24579),Je=e(73698),ot=e(12231),_e=e(11776),mt=e(38402),dt=e(21324),ct=e(49378);const Et=(0,y.Z)(De=>({filters:{background:"transparent",boxShadow:"0px 0px 0px 0px"},checkbox:{padding:De.spacing(0,1,0,1)},dropdown:{width:"100%"}})),vt=({filters:De,filterOptions:it,resetFilters:lt,updateSelected:se,updateChecked:T})=>{const R=Et();return r.createElement(we.Z,{className:R.filters},r.createElement(he.Z,{title:r.createElement(B.Z,{variant:"h6"},"Filters"),action:r.createElement(Ge.Z,{color:"primary",onClick:()=>lt()},"CLEAR ALL")}),r.createElement(F.Z,null),it.kind.length===0&&it.lifecycle.length===0&&r.createElement(Le.Z,null,r.createElement(B.Z,{variant:"subtitle2"},"Filters cannot be applied to available results")),it.kind.length>0&&r.createElement(Le.Z,null,r.createElement(B.Z,{variant:"subtitle2"},"Kind"),r.createElement(Je.Z,{id:"outlined-select",onChange:O=>{var U;return se((U=O==null?void 0:O.target)==null?void 0:U.value)},variant:"outlined",className:R.dropdown,value:De.selected},it.kind.map(O=>r.createElement(ot.Z,{selected:O==="",dense:!0,key:O,value:O},O)))),it.lifecycle.length>0&&r.createElement(Le.Z,null,r.createElement(B.Z,{variant:"subtitle2"},"Lifecycle"),r.createElement(_e.Z,{disablePadding:!0,dense:!0},it.lifecycle.map(O=>r.createElement(mt.Z,{key:O,dense:!0,button:!0,onClick:()=>T(O)},r.createElement(dt.Z,{edge:"start",disableRipple:!0,className:R.checkbox,color:"primary",checked:De.checked.includes(O),tabIndex:-1,value:O,name:O}),r.createElement(ct.Z,{id:O,primary:O}))))))};var It=e(52890),At=e(41682),ht=e(36964);const Ut=(0,y.Z)(De=>({searchQuery:{color:De.palette.text.primary,background:De.palette.background.default,borderRadius:"10%"},tableHeader:{margin:De.spacing(1,0,0,0),display:"flex"},divider:{width:"1px",margin:De.spacing(0,2),padding:De.spacing(2,0)}})),Nt=[{title:"Name",field:"name",highlight:!0,render:De=>r.createElement(At.Link,{to:De.url||""},De.name)},{title:"Description",field:"description"},{title:"Owner",field:"owner"},{title:"Kind",field:"kind"},{title:"LifeCycle",field:"lifecycle"}],Dt=({searchQuery:De,numberOfSelectedFilters:it,numberOfResults:lt,handleToggleFilters:se})=>{const T=Ut();return r.createElement("div",{className:T.tableHeader},r.createElement(Se,{numberOfSelectedFilters:it,handleToggleFilters:se}),r.createElement(F.Z,{className:T.divider,orientation:"vertical"}),r.createElement(c.Z,{item:!0,xs:12},De?r.createElement(B.Z,{variant:"h6"},`${lt} `,lt>1?"results for ":"result for ",r.createElement("span",{className:T.searchQuery},'"',De,'"')," "):r.createElement(B.Z,{variant:"h6"},`${lt} results`)))},Lt=({searchQuery:De})=>{const it=(0,ht.useApi)(X.Ah),[lt,se]=(0,r.useState)(!1),[T,R]=(0,r.useState)({selected:"",checked:[]}),[O,U]=(0,r.useState)([]),{loading:G,error:ne,value:ue}=(0,D.default)(async()=>(await it.getEntities()).items.map(pe=>{var He,de,Ce,ze,je;return{name:pe.metadata.name,description:pe.metadata.description,owner:typeof((He=pe.spec)==null?void 0:He.owner)=="string"?(de=pe.spec)==null?void 0:de.owner:void 0,kind:pe.kind,lifecycle:typeof((Ce=pe.spec)==null?void 0:Ce.lifecycle)=="string"?(ze=pe.spec)==null?void 0:ze.lifecycle:void 0,url:`/catalog/${((je=pe.metadata.namespace)==null?void 0:je.toLocaleLowerCase("en-US"))||It.sk}/${pe.kind.toLocaleLowerCase("en-US")}/${pe.metadata.name}`}}),[]);if((0,r.useEffect)(()=>{if(ue){let Ie=ue;T.selected!==""&&(Ie=ue.filter(pe=>T.selected.includes(pe.kind))),T.checked.length>0&&(Ie=Ie.filter(pe=>pe.lifecycle&&T.checked.includes(pe.lifecycle))),De&&(Ie=Ie.filter(pe=>{var He,de,Ce;return((He=pe.name)==null?void 0:He.toLocaleLowerCase("en-US").includes(De))||((de=pe.name)==null?void 0:de.toLocaleLowerCase("en-US").includes(De.split(" ").join("-")))||((Ce=pe.description)==null?void 0:Ce.toLocaleLowerCase("en-US").includes(De))})),U(Ie)}},[T,De,ue]),G)return r.createElement(At.Progress,null);if(ne)return r.createElement(N.Z,{severity:"error"},"Error encountered while fetching search results. ",ne.toString());if(!ue||ue.length===0)return r.createElement(At.EmptyState,{missing:"data",title:"Sorry, no results were found"});const ge=()=>{R({selected:"",checked:[]})},Oe=Ie=>{R(pe=>({...pe,selected:Ie}))},We=Ie=>{if(T.checked.includes(Ie)){R(pe=>({...pe,checked:pe.checked.filter(He=>He!==Ie)}));return}R(pe=>({...pe,checked:[...pe.checked,Ie]}))},nt=ue.reduce((Ie,pe)=>(pe.kind&&Ie.kind.indexOf(pe.kind)<0&&Ie.kind.push(pe.kind),pe.lifecycle&&Ie.lifecycle.indexOf(pe.lifecycle)<0&&Ie.lifecycle.push(pe.lifecycle),Ie),{kind:[],lifecycle:[]});return r.createElement(r.Fragment,null,r.createElement(c.Z,{container:!0},lt&&r.createElement(c.Z,{item:!0,xs:3},r.createElement(vt,{filters:T,filterOptions:nt,resetFilters:ge,updateSelected:Oe,updateChecked:We})),r.createElement(c.Z,{item:!0,xs:lt?9:12},r.createElement(At.Table,{options:{paging:!0,pageSize:20,search:!1},data:O,columns:Nt,title:r.createElement(Dt,{searchQuery:De,numberOfResults:O.length,numberOfSelectedFilters:(T.selected!==""?1:0)+T.checked.length,handleToggleFilters:()=>se(!lt)})}))))},st=()=>{const[De,it]=(0,At.useQueryParamState)("query"),[lt,se]=(0,r.useState)(De!=null?De:""),T=O=>{O.preventDefault(),se(O.target.value)};(0,r.useEffect)(()=>se(De!=null?De:""),[De]),(0,d.Z)(()=>{it(lt)},200,[lt]);const R=()=>{se("")};return r.createElement(At.Page,{themeId:"home"},r.createElement(At.Header,{title:"Search"}),r.createElement(At.Content,null,r.createElement(c.Z,{container:!0,direction:"row"},r.createElement(c.Z,{item:!0,xs:12},r.createElement(j,{handleSearch:T,handleClearSearchBar:R,searchQuery:lt})),r.createElement(c.Z,{item:!0,xs:12},r.createElement(Lt,{searchQuery:(De!=null?De:"").toLocaleLowerCase("en-US")})))))},Rt=()=>{const De=(0,g.TH)(),{term:it,setTerm:lt,types:se,setTypes:T,pageCursor:R,setPageCursor:O,filters:U,setFilters:G}=(0,s.Rx)(),ne=(0,t.Z)(De.search);return(0,r.useEffect)(()=>{if(De.search===ne)return;const ue=u().parse(De.search.substring(1),{arrayLimit:0})||{};ue.filters&&G(ue.filters),ue.query&&lt(ue.query),ue.pageCursor&&O(ue.pageCursor),ue.types&&T(ue.types)},[ne,De,lt,T,O,G]),(0,r.useEffect)(()=>{const ue=u().stringify({query:it,types:se,pageCursor:R,filters:U},{arrayFormat:"brackets"}),ge=`${window.location.pathname}?${ue}`;window.history.replaceState(null,document.title,ge)},[it,se,R,U]),null},Zt=()=>{const De=(0,g.pC)();return r.createElement(s.Nd,null,r.createElement(Rt,null),De||r.createElement(st,null))}},39332:function(Q,o,e){"use strict";e.r(o),e.d(o,{SearchResult:function(){return u}});var r=e(41682),t=e(2784),l=e(22313);const u=({children:g})=>{const{result:{loading:s,error:c,value:d}}=(0,l.Rx)();return s?t.createElement(r.Progress,null):c?t.createElement(r.ResponseErrorPanel,{title:"Error encountered while fetching search results",error:c}):(d==null?void 0:d.results.length)?t.createElement(t.Fragment,null,g({results:d.results})):t.createElement(r.EmptyState,{missing:"data",title:"Sorry, no results were found"})}},8542:function(Q,o,e){"use strict";e.d(o,{G:function(){return d}});var r=e(79692),t=e(77277),l=e(35352),u=e(27742),g=e(2784),s=e(22313);const c=(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=c();return!y&&!m?g.createElement(g.Fragment,null):g.createElement("nav",{"arial-label":"pagination navigation",className:E.root},g.createElement(t.Z,{"aria-label":"previous page",disabled:!m,onClick:m,startIcon:g.createElement(l.Z,null)},"Previous"),g.createElement(t.Z,{"aria-label":"next page",disabled:!y,onClick:y,endIcon:g.createElement(u.Z,null)},"Next"))}},20863:function(Q,o,e){"use strict";e.d(o,{_Z:function(){return l}});var r=e(91512),t=e(36964);const l=(0,t.createRouteRef)({id:"search"}),u=(0,t.createRouteRef)({id:"search:next"}),g=(0,t.createPlugin)({id:"search",apis:[(0,t.createApiFactory)({api:r.g,deps:{discoveryApi:t.discoveryApiRef,identityApi:t.identityApiRef},factory:({discoveryApi:P,identityApi:j})=>new r.w({discoveryApi:P,identityApi:j})})],routes:{root:l,nextRoot:u}}),s=g.provide((0,t.createRoutableExtension)({name:"SearchPage",component:()=>Promise.resolve().then(e.bind(e,3992)).then(P=>P.SearchPage),mountPoint:l})),c=g.provide((0,t.createRoutableExtension)({name:"SearchPageNext",component:()=>Promise.resolve().then(e.bind(e,3992)).then(P=>P.SearchPage),mountPoint:u})),d=g.provide((0,t.createComponentExtension)({name:"SearchBar",component:{lazy:()=>Promise.resolve().then(e.bind(e,1795)).then(P=>P.SearchBar)}})),y=g.provide((0,t.createComponentExtension)({name:"SearchBarNext",component:{lazy:()=>Promise.resolve().then(e.bind(e,1795)).then(P=>P.SearchBar)}})),m=g.provide((0,t.createComponentExtension)({name:"SearchResult",component:{lazy:()=>Promise.resolve().then(e.bind(e,39332)).then(P=>P.SearchResult)}})),E=g.provide((0,t.createComponentExtension)({name:"SearchResultNext",component:{lazy:()=>Promise.resolve().then(e.bind(e,39332)).then(P=>P.SearchResult)}})),i=g.provide((0,t.createComponentExtension)({name:"SidebarSearchModal",component:{lazy:()=>e.e(3825).then(e.bind(e,43825)).then(P=>P.SidebarSearchModal)}})),S=g.provide((0,t.createComponentExtension)({name:"DefaultResultListItem",component:{lazy:()=>Promise.resolve().then(e.bind(e,19941)).then(P=>P.DefaultResultListItem)}})),b=g.provide((0,t.createComponentExtension)({name:"HomePageSearchBar",component:{lazy:()=>e.e(6105).then(e.bind(e,46105)).then(P=>P.HomePageSearchBar)}}))},94067:function(Q,o,e){"use strict";e.r(o),e.d(o,{EmbeddedDocsRouter:function(){return b},Router:function(){return S},isTechDocsAvailable:function(){return i}});var r=e(2784),t=e(85653),l=e(10289),u=e(41481),g=e(31752),s=e(73873),c=e(97589),d=e(36964);const y=({entity:P})=>{var F;const j=(0,d.useApi)(d.configApiRef);return r.createElement(s.Ej,{withSearch:!1,entityRef:{namespace:(0,c.D)((F=P.metadata.namespace)!=null?F:"default",j),kind:(0,c.D)(P.kind,j),name:(0,c.D)(P.metadata.name,j)}})};var m=e(41682);const E="backstage.io/techdocs-ref",i=P=>{var j,F;return Boolean((F=(j=P==null?void 0:P.metadata)==null?void 0:j.annotations)==null?void 0:F[E])},S=()=>r.createElement(l.Z5,null,r.createElement(l.AW,{path:"/",element:r.createElement(u.TechDocsIndexPage,null)}),r.createElement(l.AW,{path:"/:namespace/:kind/:name/*",element:r.createElement(g.TechDocsPage,null)})),b=P=>{var B;const{entity:j}=(0,t.useEntity)();return((B=j.metadata.annotations)==null?void 0:B[E])?r.createElement(l.Z5,null,r.createElement(l.AW,{path:"/*",element:r.createElement(y,{entity:j})})):r.createElement(m.MissingAnnotationEmptyState,{annotation:E})}},3337:function(Q,o,e){"use strict";e.d(o,{D:function(){return t},g:function(){return l}});var r=e(36964);const t=(0,r.createApiRef)({id:"plugin.techdocs.storageservice"}),l=(0,r.createApiRef)({id:"plugin.techdocs.service"})},71226:function(Q,o,e){"use strict";e.d(o,{O:function(){return m}});var r=e(2784),t=e(79692),l=e(49378),u=e(38402),g=e(85256),s=e(41682),c=e(15277),d=e.n(c);const y=(0,t.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",marginBottom:"1rem"}}),m=({result:E,lineClamp:i=5,asListItem:S=!0,asLink:b=!0,title:P})=>{const j=y(),F=()=>{var D;return r.createElement(l.Z,{className:j.itemText,primaryTypographyProps:{variant:"h6"},primary:P||`${E.title} | ${(D=E.entityTitle)!=null?D:E.name} docs`,secondary:r.createElement(d(),{line:i,truncateText:"\u2026",text:E.text,element:"span"})})},B=({children:D})=>b?r.createElement(s.Link,{to:E.location},D):r.createElement(r.Fragment,null,D),N=({children:D})=>S?r.createElement(r.Fragment,null,r.createElement(u.Z,{alignItems:"flex-start",className:j.flexContainer},D),r.createElement(g.Z,{component:"li"})):r.createElement(r.Fragment,null,D);return r.createElement(B,null,r.createElement(N,null,r.createElement(F,null)))}},97589:function(Q,o,e){"use strict";e.d(o,{D:function(){return r}});function r(t,l){return l.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")?t:t.toLocaleLowerCase("en-US")}},10187:function(Q,o,e){"use strict";e.r(o),e.d(o,{DocsCardGrid:function(){return m}});var r=e(2784),t=e(36964),l=e(94339),u=e(16111),g=e(24579),s=e(14503),c=e(68725),d=e(41682),y=e(97589);const m=({entities:E})=>{const i=(0,t.useRouteRef)(c.Fw),S=(0,t.useApi)(t.configApiRef);return E?r.createElement(d.ItemCardGrid,{"data-testid":"docs-explore"},(E==null?void 0:E.length)?E.map((b,P)=>{var j,F;return r.createElement(l.Z,{key:P},r.createElement(u.Z,null,r.createElement(d.ItemCardHeader,{title:(j=b.metadata.title)!=null?j:b.metadata.name})),r.createElement(g.Z,null,b.metadata.description),r.createElement(s.Z,null,r.createElement(d.Button,{to:i({namespace:(0,y.D)((F=b.metadata.namespace)!=null?F:"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(Q,o,e){"use strict";e.r(o),e.d(o,{DocsTable:function(){return E}});var r=e(2784),t=e(95074),l=e(36964),u=e(52890),g=e(85653),s=e(68725),c=e(41682),d=e(50294),y=e(67430),m=e(97589);const E=({entities:i,title:S,loading:b,columns:P,actions:j})=>{const[,F]=(0,t.Z)(),B=(0,l.useRouteRef)(s.Fw),N=(0,l.useApi)(l.configApiRef);if(!i)return null;const D=i.map(ce=>{var we;const Se=(0,g.getEntityRelations)(ce,u.S4);return{entity:ce,resolved:{docsUrl:B({namespace:(0,m.D)((we=ce.metadata.namespace)!=null?we:"default",N),kind:(0,m.D)(ce.kind,N),name:(0,m.D)(ce.metadata.name,N)}),ownedByRelations:Se,ownedByRelationsTitle:Se.map(he=>(0,g.formatEntityRefTitle)(he,{defaultKind:"group"})).join(", ")}}}),X=[y.createNameColumn(),y.createOwnerColumn(),y.createTypeColumn()],V=[d.createCopyDocsUrlAction(F)];return r.createElement(r.Fragment,null,b||D&&D.length>0?r.createElement(c.Table,{isLoading:b,options:{paging:!0,pageSize:20,search:!0,actionsColumnIndex:-1},data:D,columns:P||X,actions:j||V,title:S?`${S} (${D.length})`:`All (${D.length})`}):r.createElement(c.EmptyState,{missing:"data",title:"No documents to show",description:"Create your own document. Check out our Getting Started Information",action:r.createElement(c.Button,{color:"primary",to:"https://backstage.io/docs/features/techdocs/getting-started",variant:"contained"},"DOCS")}))}},57110:function(Q,o,e){"use strict";e.r(o),e.d(o,{TechDocsCustomHome:function(){return i}});var r=e(2784),t=e(64279),l=e(79692),u=e(85653),g=e(83201),s=e(10187),c=e(1114),d=e(41682),y=e(36964);const m={DocsTable:g.DocsTable,DocsCardGrid:s.DocsCardGrid},E=({config:S,entities:b,index:P})=>{const F=(0,l.Z)({panelContainer:{marginBottom:"2rem",...S.panelCSS?S.panelCSS:{}}})(),{value:B}=(0,u.useOwnUser)(),N=m[S.panelType],D=b.filter(X=>S.filterPredicate==="ownedByUser"?B?(0,u.isOwnerOf)(B,X):!1:typeof S.filterPredicate=="function"&&S.filterPredicate(X));return r.createElement(r.Fragment,null,r.createElement(d.ContentHeader,{title:S.title,description:S.description},P===0?r.createElement(d.SupportButton,null,"Discover documentation in your ecosystem."):null),r.createElement("div",{className:F.panelContainer},r.createElement(N,{"data-testid":"techdocs-custom-panel",entities:D})))},i=({tabsConfig:S})=>{const[b,P]=(0,r.useState)(0),j=(0,y.useApi)(u.Ah),{value:F,loading:B,error:N}=(0,t.default)(async()=>(await j.getEntities({filter:{"metadata.annotations.backstage.io/techdocs-ref":u.n3},fields:["apiVersion","kind","metadata","relations","spec.owner","spec.type"]})).items.filter(V=>{var ce;return!!((ce=V.metadata.annotations)==null?void 0:ce["backstage.io/techdocs-ref"])})),D=S[b];return B?r.createElement(c.j,null,r.createElement(d.Content,null,r.createElement(d.Progress,null))):N?r.createElement(c.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:N.toString()})))):r.createElement(c.j,null,r.createElement(d.HeaderTabs,{selectedIndex:b,onChange:X=>P(X),tabs:S.map(({label:X},V)=>({id:V.toString(),label:X}))}),r.createElement(d.Content,{"data-testid":"techdocs-content"},D.panels.map((X,V)=>r.createElement(E,{key:V,config:X,entities:F||[],index:V}))))}},41481:function(Q,o,e){"use strict";e.r(o),e.d(o,{TechDocsIndexPage:function(){return g}});var r=e(2784),t=e(10289),l=e(57110);const u=()=>{const s=[{label:"Overview",panels:[{title:"Overview",description:"Explore your internal technical ecosystem through documentation.",panelType:"DocsCardGrid",filterPredicate:()=>!0}]},{label:"Owned Documents",panels:[{title:"Owned documents",description:"Access your documentation.",panelType:"DocsTable",filterPredicate:"ownedByUser"}]}];return r.createElement(l.TechDocsCustomHome,{tabsConfig:s})},g=()=>(0,t.pC)()||r.createElement(u,null)},1114:function(Q,o,e){"use strict";e.d(o,{j:function(){return u}});var r=e(2784),t=e(41682),l=e(36964);const u=({children:g})=>{var d;const c=`Documentation available in ${(d=(0,l.useApi)(l.configApiRef).getOptionalString("organization.name"))!=null?d:"Backstage"}`;return r.createElement(t.PageWithHeader,{title:"Documentation",subtitle:c,themeId:"documentation"},g)}},50294:function(Q,o,e){"use strict";e.r(o),e.d(o,{createCopyDocsUrlAction:function(){return u},createStarEntityAction:function(){return g}});var r=e(2784),t=e(39981),l=e(85653);function u(s){return c=>({icon:()=>r.createElement(t.Z,{fontSize:"small"}),tooltip:"Click to copy documentation link to clipboard",onClick:()=>s(`${window.location.origin}${c.resolved.docsUrl}`)})}function g(s,c){return({entity:d})=>{const y=s(d);return{cellStyle:{paddingLeft:"1em"},icon:()=>(0,l.favoriteEntityIcon)(y),tooltip:(0,l.favoriteEntityTooltip)(y),onClick:()=>c(d)}}}},67430:function(Q,o,e){"use strict";e.r(o),e.d(o,{createNameColumn:function(){return g},createOwnerColumn:function(){return s},createTypeColumn:function(){return c}});var r=e(2784),t=e(41682),l=e(85653);function u(d){return d.metadata.title||d.metadata.name}function g(){return{title:"Document",field:"entity.metadata.name",highlight:!0,render:d=>r.createElement(t.SubvalueCell,{value:r.createElement(t.Link,{to:d.resolved.docsUrl},u(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 c(){return{title:"Type",field:"entity.spec.type"}}},75448:function(Q,o,e){"use strict";e.d(o,{Ej:function(){return lt},DK:function(){return Zt}});var r=e(2784),t=e(10289),l=e(79692),u=e(60364),g=e(60905),s=e(36964),c=e(36356),d=e(41682),y=e(3337);const m=(se,T,R)=>{const O=se==="src"&&T.endsWith(".svg"),U=!T.match(/^([a-z]*:)?\/\//i),G=T.startsWith(R);return O&&(U||G)},E=({techdocsStorageApi:se,entityId:T,path:R})=>async O=>{const U=await se.getApiOrigin(),G=async(ne,ue)=>{for(const ge of ne)if(ge.hasAttribute(ue)){const Oe=ge.getAttribute(ue);if(!Oe)return;const We=await se.getBaseUrl(Oe,T,R);if(m(ue,Oe,U))try{const Ie=await(await fetch(We,{credentials:"include"})).text();ge.setAttribute(ue,`data:image/svg+xml;base64,${btoa(Ie)}`)}catch{ge.setAttribute("alt",`Error: ${Oe}`)}else ge.setAttribute(ue,We)}};return await Promise.all([G(O.querySelectorAll("img"),"src"),G(O.querySelectorAll("script"),"src"),G(O.querySelectorAll("link"),"href"),G(O.querySelectorAll("a[download]"),"href")]),O};var i=e(94594),S=e(67097),b=e(9832),P=e(82717),j=e.n(P);const F=se=>T=>{const R=T.querySelector('[title="Edit this page"]');if(!R||!R.href)return T;const O=new URL(R.href),U=se.byUrl(O);if((U==null?void 0:U.type)!=="github"&&(U==null?void 0:U.type)!=="gitlab")return T;const G=T.querySelector("article>h1").childNodes[0].textContent,ne=encodeURIComponent(`Documentation Feedback: ${G}`),ue=encodeURIComponent(`Page source:
32
+ ${R.href}
33
+
34
+ Feedback:`),ge=(U==null?void 0:U.type)==="github"?(0,i.Pb)(O.href,"blob"):O.href,Oe=j()(ge),We=`/${Oe.organization}/${Oe.name}`,nt=R.cloneNode();switch(U==null?void 0:U.type){case"gitlab":nt.href=`${O.origin}${We}/issues/new?issue[title]=${ne}&issue[description]=${ue}`;break;case"github":nt.href=`${O.origin}${We}/issues/new?title=${ne}&body=${ue}`;break;default:return T}return b.render(r.createElement(S.Z),nt),nt.style.paddingLeft="5px",nt.title="Leave feedback for this page",nt.id="git-feedback-link",R==null||R.insertAdjacentElement("beforebegin",nt),T},B=()=>se=>(((R,O)=>{Array.from(R).filter(U=>U.hasAttribute(O)).forEach(U=>{const G=U.getAttribute(O);if(G){G.match(/^https?:\/\//i)&&U.setAttribute("target","_blank");try{const ne=N(window.location.href);U.setAttribute(O,new URL(G,ne).toString())}catch{U.replaceWith(U.textContent||G)}}})})(Array.from(se.getElementsByTagName("a")),"href"),se);function N(se){const T=new URL(se);return!T.pathname.endsWith("/")&&!T.pathname.endsWith(".html")&&(T.pathname+="/"),T.toString()}const D=({baseUrl:se,onClick:T})=>R=>(Array.from(R.getElementsByTagName("a")).forEach(O=>{O.addEventListener("click",U=>{const ne=O.getAttribute("href");!ne||ne.startsWith(se)&&(U.preventDefault(),T(U,ne))})}),R),X=()=>se=>{var T;return(T=se.querySelector(".md-header"))==null||T.remove(),se},V=()=>se=>{var T;return(T=se.querySelector(".md-footer-copyright"))==null||T.remove(),se},ce=({docStorageUrl:se,onLoading:T,onLoaded:R})=>O=>{const U=Array.from(O.querySelectorAll('head > link[rel="stylesheet"]')).filter(ne=>{var ue;return(ue=ne.getAttribute("href"))==null?void 0:ue.startsWith(se)});let G=U.length;return G>0&&T(O),U.forEach(ne=>ne.addEventListener("load",()=>{G-=1,G===0&&R(O)})),O};var Se=e(35368),we=e.n(Se);const he=/main\.[A-Fa-f0-9]{8}\.min\.css$/,Ge=/^https:\/\/fonts\.googleapis\.com/,Le=/^https:\/\/fonts\.gstatic\.com/,Je=se=>{if(se.nodeName&&se.nodeName==="LINK"){const T=se.getAttribute("href")||"";T.match(he)&&se.setAttribute("rel","stylesheet"),T.match(Ge)&&se.setAttribute("rel","stylesheet"),T.match(Le)&&se.setAttribute("rel","preconnect")}return se},ot=se=>T=>{if(T.nodeName==="IFRAME"){const R=T.getAttribute("src");if(!R)return T.remove(),T;try{const O=new URL(R);se.some(G=>O.host===G)||T.remove()}catch(O){console.warn(`Invalid iframe src, ${O}`),T.remove()}}return T},_e=se=>{const T=(se==null?void 0:se.getOptionalStringArray("allowedIframeHosts"))||[];return R=>{we().addHook("afterSanitizeAttributes",Je);const O=["link"];return T.length>0&&(we().addHook("beforeSanitizeElements",ot(T)),O.push("iframe")),we().sanitize(R.innerHTML,{ADD_TAGS:O,FORBID_TAGS:["style"],WHOLE_DOCUMENT:!0,RETURN_DOM:!0})}},mt=({css:se})=>T=>(T.getElementsByTagName("head")[0].insertAdjacentHTML("beforeend",`<style>${se}</style>`),T),dt=()=>se=>(setTimeout(()=>{var T;if(window.location.hash){const R=window.location.hash.slice(1);(T=se==null?void 0:se.querySelector(`#${R}`))==null||T.scrollIntoView()}},200),se),ct=async(se,T)=>{let R;if(typeof se=="string")R=new DOMParser().parseFromString(se,"text/html").documentElement;else if(se instanceof Element)R=se;else throw new Error("dom is not a recognized type");for(const O of T)R=await O(R);return R};var Et=e(7735),vt=e(25921),It=e(64279),At=e(77446);function ht({contentLoading:se,content:T,activeSyncState:R}){return se||R==="BUILD_READY_RELOAD"||!T&&R==="CHECKING"?"CHECKING":!T&&R==="BUILDING"?"INITIAL_BUILD":T?R==="BUILDING"?"CONTENT_STALE_REFRESHING":R==="BUILD_READY"?"CONTENT_STALE_READY":R==="ERROR"?"CONTENT_STALE_ERROR":"CONTENT_FRESH":"CONTENT_NOT_FOUND"}function Ut(se,T){const R={...se};switch(T.type){case"sync":T.state==="CHECKING"&&(R.buildLog=[]),R.activeSyncState=T.state,R.syncError=T.syncError;break;case"contentLoading":R.contentLoading=!0,R.contentError=void 0;break;case"content":typeof T.path=="string"&&(R.path=T.path),R.contentLoading=!1,R.content=T.content,R.contentError=T.contentError;break;case"buildLog":R.buildLog=R.buildLog.concat(T.log);break;default:throw new Error}return["BUILD_READY","BUILD_READY_RELOAD"].includes(R.activeSyncState)&&["contentLoading","content"].includes(T.type)&&(R.activeSyncState="UP_TO_DATE",R.buildLog=[]),R}function Nt(se,T,R,O){var We,nt;const[U,G]=(0,r.useReducer)(Ut,{activeSyncState:"CHECKING",path:O,contentLoading:!0,buildLog:[]}),ne=(0,s.useApi)(y.D),{retry:ue}=(0,At.Z)(async()=>{G({type:"contentLoading"});try{const Ie=await ne.getEntityDocs({kind:se,namespace:T,name:R},O);return G({type:"content",content:Ie,path:O}),Ie}catch(Ie){G({type:"content",contentError:Ie,path:O})}},[ne,se,T,R,O]),ge=(0,r.useRef)({content:void 0,reload:()=>{}});return ge.current={content:U.content,reload:ue},(0,It.default)(async()=>{G({type:"sync",state:"CHECKING"});const Ie=setTimeout(()=>{G({type:"sync",state:"BUILDING"})},1e3);try{switch(await ne.syncEntityDocs({kind:se,namespace:T,name:R},He=>{G({type:"buildLog",log:He})})){case"updated":ge.current.content?G({type:"sync",state:"BUILD_READY"}):(ge.current.reload(),G({type:"sync",state:"BUILD_READY_RELOAD"}));break;case"cached":G({type:"sync",state:"UP_TO_DATE"});break;default:G({type:"sync",state:"ERROR",syncError:new Error("Unexpected return state")});break}}catch(pe){G({type:"sync",state:"ERROR",syncError:pe})}finally{clearTimeout(Ie)}},[se,R,T,ne,G,ge]),{state:(0,r.useMemo)(()=>ht({activeSyncState:U.activeSyncState,contentLoading:U.contentLoading,content:U.content}),[U.activeSyncState,U.content,U.contentLoading]),contentReload:ue,path:U.path,content:U.content,contentErrorMessage:(We=U.contentError)==null?void 0:We.toString(),syncErrorMessage:(nt=U.syncError)==null?void 0:nt.toString(),buildLog:U.buildLog}}const Dt=(0,l.Z)(se=>({searchBar:{marginLeft:"20rem",maxWidth:"calc(100% - 20rem * 2 - 3rem)",marginTop:se.spacing(1),"@media screen and (max-width: 76.1875em)":{marginLeft:"10rem",maxWidth:"calc(100% - 10rem)"}}})),Lt=(0,r.createContext)({}),st=({children:se,entityRef:T})=>{const{"*":R}=(0,t.UO)(),{kind:O,namespace:U,name:G}=T,ne=Nt(O,U,G,R);return r.createElement(Lt.Provider,{value:ne},se)},Rt=(se,T)=>R=>React.createElement(st,{entityRef:T},React.createElement(se,{...R})),Zt=()=>(0,r.useContext)(Lt),De=se=>{const T=(0,t.s0)(),R=(0,u.Z)(),O=(0,s.useApi)(y.D),U=(0,s.useApi)(c.q3),G=(0,s.useApi)(s.configApiRef),{namespace:ne="",kind:ue="",name:ge=""}=se,{state:Oe,path:We,content:nt}=Zt(),[Ie,pe]=(0,r.useState)(),[He,de]=(0,r.useState)(null),{isPinned:Ce}=(0,r.useContext)(d.SidebarPinStateContext),ze=(0,r.useCallback)(()=>{if(!He||!Ie)return;const Be=He.querySelector(".md-container > .md-tabs");Ie.forEach(Xe=>{const ke=Math.max(He.getBoundingClientRect().top,0);Xe.style.top=Be?`${ke+Be.getBoundingClientRect().height}px`:`${ke}px`})},[He,Ie]);(0,r.useEffect)(()=>(ze(),window.addEventListener("scroll",ze,!0),window.addEventListener("resize",ze),()=>{window.removeEventListener("scroll",ze,!0),window.removeEventListener("resize",ze)}),[ze,Oe]);const je=(0,r.useCallback)(()=>{if(!He)return;const Be=He.querySelector(".md-footer");Be&&(Be.style.width=`${He.getBoundingClientRect().width}px`)},[He]);(0,r.useEffect)(()=>(je(),window.addEventListener("resize",je),()=>{window.removeEventListener("resize",je)}));const Fe=(0,r.useCallback)((Be,Xe)=>ct(Be,[_e(G.getOptionalConfig("techdocs.sanitizer")),E({techdocsStorageApi:O,entityId:{kind:ue,name:ge,namespace:ne},path:Xe}),B(),X(),V(),F(U),mt({css:`
35
+ body {
36
+ font-family: ${R.typography.fontFamily};
37
+ --md-text-color: ${R.palette.text.primary};
38
+ --md-text-link-color: ${R.palette.primary.main};
39
+
40
+ --md-code-fg-color: ${R.palette.text.primary};
41
+ --md-code-bg-color: ${R.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 ${R.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 ${R.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: ${R.palette.action.disabledBackground};
71
+ }
72
+ .md-typeset .task-list-control [type="checkbox"]:checked + .task-list-indicator:before {
73
+ background-color: ${R.palette.success.main};
74
+ }
75
+ /**/
76
+
77
+ @media screen and (max-width: 76.1875em) {
78
+ .md-nav {
79
+ background-color: ${R.palette.background.default};
80
+ transition: none !important
81
+ }
82
+ .md-sidebar--secondary { display: none; }
83
+ .md-sidebar--primary { left: ${Ce?"242px":"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
+ `}),mt({css:`
105
+ .md-nav__link, .md-typeset a, .md-typeset a::before, .md-typeset .headerlink {
106
+ transition: none;
107
+ }
108
+ `}),mt({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
+ `}),mt({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
+ `})]),[ue,ge,ne,U,O,G,R.palette.action.disabledBackground,R.palette.background.default,R.palette.background.paper,R.palette.primary.main,R.palette.success.main,R.palette.text.primary,R.typography.fontFamily,Ce]),at=(0,r.useCallback)(async Be=>ct(Be,[dt(),D({baseUrl:window.location.origin,onClick:(Xe,ke)=>{var I,K;const J=Xe.ctrlKey||Xe.metaKey,v=new URL(ke);v.hash?J?window.open(`${v.pathname}${v.hash}`,"_blank"):(T(`${v.pathname}${v.hash}`),(I=Be==null?void 0:Be.querySelector(`#${v.hash.slice(1)}`))==null||I.scrollIntoView()):J?window.open(v.pathname,"_blank"):(T(v.pathname),(K=Be==null?void 0:Be.querySelector(".md-content__inner"))==null||K.scrollIntoView())}}),ce({docStorageUrl:await O.getApiOrigin(),onLoading:Xe=>{Xe.style.setProperty("opacity","0")},onLoaded:Xe=>{var ke;Xe.style.removeProperty("opacity"),(ke=Xe.querySelector(".md-nav__title"))==null||ke.removeAttribute("for"),pe(Array.from(Xe.querySelectorAll(".md-sidebar")))}})]),[T,O]);return(0,r.useEffect)(()=>{if(!nt)return()=>{};let Be=!0;return Fe(nt,We).then(async Xe=>{if(!(Xe==null?void 0:Xe.innerHTML)||!Be)return;window.scroll({top:0});const ke=await at(Xe);de(ke)}),()=>{Be=!1}},[nt,We,Fe,at]),He},it=({entityRef:se,onReady:T=()=>{},withSearch:R=!0})=>{var ue,ge;const O=Dt(),U=De(se),G=(0,r.useRef)(null),ne=(0,r.useRef)(T);return(0,r.useEffect)(()=>{ne.current=T},[T]),(0,r.useEffect)(()=>{if(!U||!G.current)return;const Oe=G.current,We=Oe.shadowRoot||Oe.attachShadow({mode:"open"});Array.from(We.children).forEach(nt=>We.removeChild(nt)),We.appendChild(U),ne.current()},[U]),r.createElement(r.Fragment,null,r.createElement(vt.N,null),R&&((ge=(ue=G==null?void 0:G.current)==null?void 0:ue.shadowRoot)==null?void 0:ge.innerHTML)&&r.createElement(g.Z,{container:!0,className:O.searchBar},r.createElement(Et.S,{entityId:se})),r.createElement("div",{"data-testid":"techdocs-content-shadowroot",ref:G}))},lt=({entityRef:se,onReady:T=()=>{},withSearch:R=!0})=>r.createElement(st,{entityRef:se},r.createElement(it,{entityRef:se,onReady:T,withSearch:R}))},94252:function(Q,o,e){"use strict";e.d(o,{T:function(){return u}});var r=e(2784),t=e(36964),l=e(41682);const u=({errorMessage:g})=>{const s=(0,t.useApi)(t.configApiRef).getOptionalString("techdocs.builder");let c="";return s!=="local"&&(c="Note that techdocs.builder is not set to 'local' in your config, which means this Backstage app will not generate docs if they are not found. Make sure the project's docs are generated and published by some external process (e.g. CI/CD pipeline). Or change techdocs.builder to 'local' to generate docs from this Backstage instance."),r.createElement(l.ErrorPage,{status:"404",statusMessage:g||"Documentation not found",additionalInfo:c})}},31752:function(Q,o,e){"use strict";e.r(o),e.d(o,{TechDocsPage:function(){return E}});var r=e(2784),t=e(10289),l=e(64279),u=e(3337),g=e(94252),s=e(36964),c=e(41682),d=e(75448),y=e(46025);const m=()=>{const[i,S]=(0,r.useState)(!1),{namespace:b,kind:P,name:j}=(0,t.UO)(),F=(0,s.useApi)(u.g),{value:B}=(0,l.default)(()=>i?F.getTechDocsMetadata({kind:P,namespace:b,name:j}):Promise.resolve(void 0),[P,b,j,F,i]),{value:N,error:D}=(0,l.default)(()=>F.getEntityMetadata({kind:P,namespace:b,name:j}),[P,b,j,F]),X=(0,r.useCallback)(()=>{S(!0)},[S]);return D?r.createElement(g.T,{errorMessage:D.message}):r.createElement(c.Page,{themeId:"documentation"},r.createElement(y.n,{techDocsMetadata:B,entityMetadata:N,entityRef:{kind:P,namespace:b,name:j}}),r.createElement(c.Content,{"data-testid":"techdocs-content"},r.createElement(d.Ej,{onReady:X,entityRef:{kind:P,namespace:b,name:j}})))},E=({children:i})=>{const S=(0,t.pC)(),[b,P]=(0,r.useState)(!1),{namespace:j,kind:F,name:B}=(0,t.UO)(),N=(0,s.useApi)(u.g),{value:D}=(0,l.default)(()=>b?N.getTechDocsMetadata({kind:F,namespace:j,name:B}):Promise.resolve(void 0),[F,j,B,N,b]),{value:X,error:V}=(0,l.default)(()=>N.getEntityMetadata({kind:F,namespace:j,name:B}),[F,j,B,N]),ce=(0,r.useCallback)(()=>{P(!0)},[P]);return V?r.createElement(g.T,{errorMessage:V.message}):i?r.createElement(c.Page,{themeId:"documentation"},i instanceof Function?i({techdocsMetadataValue:D,entityMetadataValue:X,entityRef:{kind:F,namespace:j,name:B},onReady:ce}):i):S||r.createElement(m,null)}},46025:function(Q,o,e){"use strict";e.d(o,{n:function(){return d}});var r=e(52890),t=e(41682),l=e(36964),u=e(85653),g=e(73250),s=e(2784),c=e(68725);const d=({entityRef:y,entityMetadata:m,techDocsMetadata:E})=>{const{name:i}=y,{site_name:S,site_description:b}=E||{},{locationMetadata:P,spec:j}=m||{},F=j==null?void 0:j.lifecycle,B=m?(0,u.getEntityRelations)(m,r.S4):[],N=(0,l.useRouteRef)(c._Z)(),D=s.createElement(s.Fragment,null,s.createElement(t.HeaderLabel,{label:"Component",value:s.createElement(u.EntityRefLink,{color:"inherit",entityRef:y,defaultKind:"Component"})}),B.length>0&&s.createElement(t.HeaderLabel,{label:"Owner",value:s.createElement(u.EntityRefLinks,{color:"inherit",entityRefs:B,defaultKind:"group"})}),F?s.createElement(t.HeaderLabel,{label:"Lifecycle",value:F}):null,P&&P.type!=="dir"&&P.type!=="file"?s.createElement(t.HeaderLabel,{label:"",value:s.createElement("a",{href:P.target,target:"_blank",rel:"noopener noreferrer"},s.createElement(g.Z,{style:{marginTop:"-25px",fill:"#fff"}}))}):null);return s.createElement(t.Header,{title:S||".",pageTitleOverride:S||i,subtitle:b&&b!=="None"?b:"",type:"Docs",typeLink:N},D)}},7735:function(Q,o,e){"use strict";e.d(o,{S:function(){return He}});var r=e(91512),t=e(2784),l=e(79692);const u=(0,l.Z)(de=>({filters:{width:"250px",display:"flex"},icon:{margin:de.spacing(-1,0,0,0)}})),g=({numberOfSelectedFilters:de,handleToggleFilters:Ce})=>{const ze=u();return React.createElement("div",{className:ze.filters},React.createElement(IconButton,{className:ze.icon,"aria-label":"settings",onClick:Ce},React.createElement(FilterListIcon,null)),React.createElement(Typography,{variant:"h6"},"Filters (",de||0,")"))},s=(0,l.Z)(de=>({filters:{background:"transparent",boxShadow:"0px 0px 0px 0px"},checkbox:{padding:de.spacing(0,1,0,1)},dropdown:{width:"100%"}})),c=({filters:de,filterOptions:Ce,resetFilters:ze,updateSelected:je,updateChecked:Fe})=>{const at=s();return React.createElement(Card,{className:at.filters},React.createElement(CardHeader,{title:React.createElement(Typography,{variant:"h6"},"Filters"),action:React.createElement(Button,{color:"primary",onClick:()=>ze()},"CLEAR ALL")}),React.createElement(Divider,null),Ce.kind.length===0&&Ce.lifecycle.length===0&&React.createElement(CardContent,null,React.createElement(Typography,{variant:"subtitle2"},"Filters cannot be applied to available results")),Ce.kind.length>0&&React.createElement(CardContent,null,React.createElement(Typography,{variant:"subtitle2"},"Kind"),React.createElement(Select,{id:"outlined-select",onChange:Be=>{var Xe;return je((Xe=Be==null?void 0:Be.target)==null?void 0:Xe.value)},variant:"outlined",className:at.dropdown,value:de.selected},Ce.kind.map(Be=>React.createElement(MenuItem,{selected:Be==="",dense:!0,key:Be,value:Be},Be)))),Ce.lifecycle.length>0&&React.createElement(CardContent,null,React.createElement(Typography,{variant:"subtitle2"},"Lifecycle"),React.createElement(List,{disablePadding:!0,dense:!0},Ce.lifecycle.map(Be=>React.createElement(ListItem,{key:Be,dense:!0,button:!0,onClick:()=>Fe(Be)},React.createElement(Checkbox,{edge:"start",disableRipple:!0,className:at.checkbox,color:"primary",checked:de.checked.includes(Be),tabIndex:-1,value:Be,name:Be}),React.createElement(ListItemText,{id:Be,primary:Be}))))))};var d=e(1795),y=e(22313),m=e(42494),E=e(84899),i=e(5806),S=e(21324),b=e(56939),P=e(73698),j=e(12231);const F=(0,l.Z)({label:{textTransform:"capitalize"}}),B=({className:de,name:Ce,defaultValue:ze,values:je=[]})=>{const Fe=F(),{filters:at,setFilters:Be}=(0,y.Rx)();(0,t.useEffect)(()=>{Array.isArray(ze)&&Be(ke=>({...ke,[Ce]:ze}))},[]);const Xe=ke=>{const{target:{value:J,checked:v}}=ke;Be(I=>{const{[Ce]:K,...ee}=I,Ae=(K||[]).filter(be=>be!==J),me=v?[...Ae,J]:Ae;return me.length?{...ee,[Ce]:me}:ee})};return t.createElement(m.Z,{className:de,fullWidth:!0,"data-testid":"search-checkboxfilter-next"},t.createElement(E.Z,{className:Fe.label},Ce),je.map(ke=>{var J;return t.createElement(i.Z,{key:ke,control:t.createElement(S.Z,{color:"primary",tabIndex:-1,inputProps:{"aria-labelledby":ke},value:ke,name:ke,onChange:Xe,checked:((J=at[Ce])!=null?J:[]).includes(ke)}),label:ke})}))},N=({className:de,name:Ce,defaultValue:ze,values:je=[]})=>{const Fe=F(),{filters:at,setFilters:Be}=(0,y.Rx)();(0,t.useEffect)(()=>{typeof ze=="string"&&Be(ke=>({...ke,[Ce]:ze}))},[]);const Xe=ke=>{const{target:{value:J}}=ke;Be(v=>{const{[Ce]:I,...K}=v;return J?{...K,[Ce]:J}:K})};return t.createElement(m.Z,{className:de,variant:"filled",fullWidth:!0,"data-testid":"search-selectfilter-next"},t.createElement(b.Z,{className:Fe.label,margin:"dense"},Ce),t.createElement(P.Z,{variant:"outlined",value:at[Ce]||"",onChange:Xe},t.createElement(j.Z,{value:""},t.createElement("em",null,"All")),je.map(ke=>t.createElement(j.Z,{key:ke,value:ke},ke))))},D=({component:de,...Ce})=>t.createElement(de,{...Ce});D.Checkbox=de=>t.createElement(D,{...de,component:B}),D.Select=de=>t.createElement(D,{...de,component:N});const X=null;var V=e(65678),ce=e(3992),Se=e(8542),we=e(7089),he=e(49378),Ge=e(62155),Le=e(94339),Je=e(32552),ot=e(24579),_e=e(27616),mt=e(8284),dt=e(70660),ct=e(11776),Et=e(85256),vt=e(38402),It=e(86136),At=e(38016),ht=e(56881);const Ut=(0,l.Z)(de=>({card:{backgroundColor:"rgba(0, 0, 0, .11)"},cardContent:{paddingTop:de.spacing(1)},icon:{color:de.palette.common.black},list:{width:"100%"},listItemIcon:{width:"24px",height:"24px"},accordion:{backgroundColor:de.palette.background.paper},accordionSummary:{minHeight:"auto","&.Mui-expanded":{minHeight:"auto"}},accordionSummaryContent:{margin:de.spacing(2,0),"&.Mui-expanded":{margin:de.spacing(2,0)}},accordionDetails:{padding:de.spacing(0,0,1)}})),Nt=de=>{const Ce=Ut(),{setPageCursor:ze,setTypes:je,types:Fe}=(0,y.Rx)(),[at,Be]=(0,t.useState)(!0),{defaultValue:Xe,name:ke,types:J}=de,v=()=>Be(Ae=>!Ae),I=Ae=>()=>{je(Ae!==""?[Ae]:[]),ze(void 0),Be(!1)};(0,t.useEffect)(()=>{Xe&&je([Xe])},[]);const K=[{value:"",name:"All",icon:t.createElement(ht.Z,null)},...J],ee=Fe[0]||"";return t.createElement(Le.Z,{className:Ce.card},t.createElement(Je.Z,{title:ke,titleTypographyProps:{variant:"overline"}}),t.createElement(ot.Z,{className:Ce.cardContent},t.createElement(_e.Z,{className:Ce.accordion,expanded:at,onChange:v},t.createElement(mt.Z,{classes:{root:Ce.accordionSummary,content:Ce.accordionSummaryContent},expandIcon:t.createElement(At.Z,{className:Ce.icon}),IconButtonProps:{size:"small"}},at?"Collapse":K.filter(Ae=>Ae.value===ee)[0].name),t.createElement(dt.Z,{classes:{root:Ce.accordionDetails}},t.createElement(ct.Z,{className:Ce.list,component:"nav","aria-label":"filter by type",disablePadding:!0,dense:!0},K.map(Ae=>t.createElement(t.Fragment,{key:Ae.value},t.createElement(Et.Z,null),t.createElement(vt.Z,{selected:Fe[0]===Ae.value||Fe.length===0&&Ae.value==="",onClick:I(Ae.value),button:!0},t.createElement(It.Z,null,(0,t.cloneElement)(Ae.icon,{className:Ce.listItemIcon})),t.createElement(he.Z,{primary:Ae.name})))))))))};var Dt=e(99152),Lt=e(6487);const st=(0,l.Z)(de=>({tabs:{borderBottom:`1px solid ${de.palette.textVerySubtle}`,padding:de.spacing(0,4)},tab:{height:"50px",fontWeight:de.typography.fontWeightBold,fontSize:de.typography.pxToRem(13),color:de.palette.textSubtle,minWidth:"130px"}})),Rt=de=>{const Ce=st(),{setPageCursor:ze,setTypes:je,types:Fe}=(0,y.Rx)(),{defaultValue:at,types:Be}=de,Xe=(J,v)=>{je(v!==""?[v]:[]),ze(void 0)};(0,t.useEffect)(()=>{at&&je([at])},[]);const ke=[{value:"",name:"All"},...Be];return t.createElement(Dt.Z,{className:Ce.tabs,indicatorColor:"primary",value:Fe.length===0?"":Fe[0],onChange:Xe},ke.map(J=>t.createElement(Lt.Z,{className:Ce.tab,disableRipple:!0,label:J.name,value:J.value})))},Zt=(0,l.Z)(de=>({label:{textTransform:"capitalize"},chips:{display:"flex",flexWrap:"wrap",marginTop:de.spacing(1)},chip:{margin:2}})),De=de=>{const{className:Ce,defaultValue:ze,name:je,values:Fe=[]}=de,at=Zt(),{types:Be,setTypes:Xe}=(0,y.Rx)();(0,Ge.Z)(()=>{Be.length||(ze&&Array.isArray(ze)?Xe(ze):ze&&Xe([ze]))});const ke=J=>{const v=J.target.value;Xe(v)};return t.createElement(m.Z,{className:Ce,variant:"filled",fullWidth:!0,"data-testid":"search-typefilter-next"},t.createElement(b.Z,{className:at.label,margin:"dense"},je),t.createElement(P.Z,{multiple:!0,variant:"outlined",value:Be,onChange:ke,placeholder:"All Results",renderValue:J=>t.createElement("div",{className:at.chips},J.map(v=>t.createElement(we.Z,{key:v,label:v,className:at.chip,size:"small"})))},Fe.map(J=>t.createElement(j.Z,{key:J,value:J},t.createElement(S.Z,{checked:Be.indexOf(J)>-1}),t.createElement(he.Z,{primary:J})))))};De.Accordion=de=>t.createElement(Nt,{...de}),De.Tabs=de=>t.createElement(Rt,{...de});var it=e(19126),lt=e(20863),se=e(41682),T=e(36964);const R=de=>{const Ce=useRouteRef(rootRouteRef),ze=useNavigate(),je=useCallback(Fe=>{const at=qs.stringify({query:Fe},{addQueryPrefix:!0});ze(`${Ce()}${at}`)},[ze,Ce]);return React.createElement(SidebarSearchField,{icon:de.icon,onSearch:je,to:"/search"})};var O=e(60905),U=e(86619),G=e(50581),ne=e(61837),ue=e(4614),ge=e(21853),Oe=e(88013),We=e(10289),nt=e(48760),Ie=e(71226);const pe=({entityId:de,debounceTime:Ce=150})=>{const[ze,je]=(0,t.useState)(!1),Fe=(0,We.s0)(),{term:at,setTerm:Be,result:{loading:Xe,value:ke}}=(0,y.Rx)(),[J,v]=(0,t.useState)([]);(0,t.useEffect)(()=>{let me=!0;if(me&&ke){const be=ke.results.slice(0,10);v(be)}return()=>{me=!1}},[Xe,ke]);const[I,K]=(0,t.useState)(at);(0,nt.Z)(()=>Be(I),Ce,[I]);const ee=me=>{ze||je(!0),K(me.target.value)},Ae=(me,be)=>{if(be==null?void 0:be.document){const{location:Me}=be.document;Fe(Me)}};return t.createElement(O.Z,{item:!0,xs:12},t.createElement(Oe.ZP,{"data-testid":"techdocs-search-bar",size:"small",open:ze,getOptionLabel:()=>"",filterOptions:me=>me,onClose:()=>{je(!1)},onFocus:()=>{je(!0)},onChange:Ae,blurOnSelect:!0,noOptionsText:"No results found",value:null,options:J,renderOption:({document:me})=>t.createElement(Ie.O,{result:me,lineClamp:3,asListItem:!1,asLink:!1,title:me.title}),loading:Xe,renderInput:me=>t.createElement(U.Z,{...me,"data-testid":"techdocs-search-bar-input",variant:"outlined",fullWidth:!0,placeholder:`Search ${de.name} docs`,value:I,onChange:ee,InputProps:{...me.InputProps,startAdornment:t.createElement(G.Z,{position:"start"},t.createElement(ne.Z,{"aria-label":"Query",disabled:!0},t.createElement(ge.Z,null))),endAdornment:t.createElement(t.Fragment,null,Xe?t.createElement(ue.Z,{color:"inherit",size:20}):null,me.InputProps.endAdornment)}})}))},He=de=>{const Ce={term:"",types:["techdocs"],pageCursor:"",filters:de.entityId};return t.createElement(y.Nd,{initialState:Ce},t.createElement(pe,{...de}))}},25921:function(Q,o,e){"use strict";e.d(o,{N:function(){return N}});var r=e(2784),t=e(41682),l=e(79692),u=e(4614),g=e(77277),s=e(99688),c=e(12420),d=e(60905),y=e(90436),m=e(61837),E=e(4190),i=e(87685);const S=(0,l.Z)(D=>(0,c.Z)({paper:{width:"100%",[D.breakpoints.up("sm")]:{width:"75%"},[D.breakpoints.up("md")]:{width:"50%"},padding:D.spacing(2.5)},root:{height:"100%",overflow:"hidden"},logs:{background:D.palette.background.default}})),b=({buildLog:D,onClose:X})=>{const V=S(),ce=D.length===0?"Waiting for logs...":D.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:X,color:"inherit"},r.createElement(i.Z,null))),r.createElement(t.LogViewer,{text:ce,classes:{root:V.logs}}))},P=({buildLog:D})=>{const X=S(),[V,ce]=(0,r.useState)(!1);return r.createElement(r.Fragment,null,r.createElement(g.Z,{color:"inherit",onClick:()=>ce(!0)},"Show Build Logs"),r.createElement(E.ZP,{classes:{paper:X.paper},anchor:"right",open:V,onClose:()=>ce(!1)},r.createElement(b,{buildLog:D,onClose:()=>ce(!1)})))};var j=e(94252),F=e(75448);const B=(0,l.Z)(()=>({message:{wordBreak:"break-word",overflowWrap:"anywhere"}})),N=()=>{let D=null;const X=B(),{state:V,contentReload:ce,contentErrorMessage:Se,syncErrorMessage:we,buildLog:he}=(0,F.DK)(),Ge=V==="CHECKING"?r.createElement(t.Progress,null):null;return V==="INITIAL_BUILD"&&(D=r.createElement(s.Z,{variant:"outlined",severity:"info",icon:r.createElement(u.Z,{size:"24px"}),action:r.createElement(P,{buildLog:he})},"Documentation is accessed for the first time and is being prepared. The subsequent loads are much faster.")),V==="CONTENT_STALE_REFRESHING"&&(D=r.createElement(s.Z,{variant:"outlined",severity:"info",icon:r.createElement(u.Z,{size:"24px"}),action:r.createElement(P,{buildLog:he})},"A newer version of this documentation is being prepared and will be available shortly.")),V==="CONTENT_STALE_READY"&&(D=r.createElement(s.Z,{variant:"outlined",severity:"success",action:r.createElement(g.Z,{color:"inherit",onClick:()=>ce()},"Refresh")},"A newer version of this documentation is now available, please refresh to view.")),V==="CONTENT_STALE_ERROR"&&(D=r.createElement(s.Z,{variant:"outlined",severity:"error",action:r.createElement(P,{buildLog:he}),classes:{message:X.message}},"Building a newer version of this documentation failed."," ",we)),V==="CONTENT_NOT_FOUND"&&(D=r.createElement(r.Fragment,null,we&&r.createElement(s.Z,{variant:"outlined",severity:"error",action:r.createElement(P,{buildLog:he}),classes:{message:X.message}},"Building a newer version of this documentation failed."," ",we),r.createElement(j.T,{errorMessage:Se}))),r.createElement(r.Fragment,null,Ge,D)}},73873:function(Q,o,e){"use strict";e.d(o,{Ej:function(){return r.Ej},EV:function(){return t.TechDocsPage},nN:function(){return l.n}});var r=e(75448),t=e(31752),l=e(46025),u=e(25921),g=e(7735)},68725:function(Q,o,e){"use strict";e.d(o,{_Z:function(){return t},Fw:function(){return l},pd:function(){return u}});var r=e(36964);const t=(0,r.createRouteRef)({id:"techdocs:index-page"}),l=(0,r.createRouteRef)({id:"techdocs:reader-page",params:["namespace","kind","name"]}),u=(0,r.createRouteRef)({id:"techdocs:catalog-reader-view"})},19133:function(Q,o,e){"use strict";Q.exports=e.p+"static/createComponent.975d1e1e..svg"},86284:function(Q,o,e){"use strict";Q.exports=e.p+"static/missingAnnotation.67f79e98..svg"},3871:function(Q,o,e){"use strict";Q.exports=e.p+"static/noBuild.1715fa71..svg"},96465:function(Q,o,e){"use strict";Q.exports=e.p+"static/noInformation.4b426325..svg"},29788:function(Q,o,e){"use strict";Q.exports=e.p+"static/mic-drop.fe3ef4d0..svg"},219:function(Q,o,e){"use strict";Q.exports=e.p+"static/illo.7884c54f..svg"},53260:function(){}},function(Q){var o=function(r){return Q(Q.s=r)};Q.O(0,[2370,6202,9284,2126,7012,5218,4983,4736],function(){return o(88649),o(63865)});var e=Q.O()}]);
142
+
143
+ //# sourceMappingURL=main.c8633ec5.js.map