@kuadrant/kuadrant-backstage-plugin-frontend 0.0.2-dev-7d09bfa → 0.0.2-dev-e6e0dbf
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -4
- package/dist/index.esm.js +1 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/plugin.esm.js +1 -9
- package/dist/plugin.esm.js.map +1 -1
- package/dist-scalprum/internal.plugin-kuadrant.1ec7b1dc71663b4b9a17.js +2 -0
- package/dist-scalprum/internal.plugin-kuadrant.1ec7b1dc71663b4b9a17.js.map +1 -0
- package/dist-scalprum/plugin-manifest.json +2 -2
- package/dist-scalprum/static/1085.d17e689a.chunk.js +3 -0
- package/dist-scalprum/static/1085.d17e689a.chunk.js.map +1 -0
- package/dist-scalprum/static/1645.db086648.chunk.js +3 -0
- package/dist-scalprum/static/{5568.5dbce633.chunk.js.LICENSE.txt → 1645.db086648.chunk.js.LICENSE.txt} +0 -9
- package/dist-scalprum/static/1645.db086648.chunk.js.map +1 -0
- package/dist-scalprum/static/2233.bf0c10d7.chunk.js +3 -0
- package/dist-scalprum/static/2233.bf0c10d7.chunk.js.LICENSE.txt +9 -0
- package/dist-scalprum/static/2233.bf0c10d7.chunk.js.map +1 -0
- package/dist-scalprum/static/2628.20156dc1.chunk.js +3 -0
- package/dist-scalprum/static/2628.20156dc1.chunk.js.map +1 -0
- package/dist-scalprum/static/2946.a35243f1.chunk.js +3 -0
- package/dist-scalprum/static/{9510.e4112e19.chunk.js.LICENSE.txt → 2946.a35243f1.chunk.js.LICENSE.txt} +10 -0
- package/dist-scalprum/static/2946.a35243f1.chunk.js.map +1 -0
- package/dist-scalprum/static/2952.b3c7e41c.chunk.js +2 -0
- package/dist-scalprum/static/2952.b3c7e41c.chunk.js.map +1 -0
- package/dist-scalprum/static/{2967.8d9c1b1f.chunk.js → 2967.6a1db3ad.chunk.js} +2 -2
- package/dist-scalprum/static/2967.6a1db3ad.chunk.js.map +1 -0
- package/dist-scalprum/static/3091.9a74ea5f.chunk.js +2 -0
- package/dist-scalprum/static/{65.0e01be7c.chunk.js.map → 3091.9a74ea5f.chunk.js.map} +1 -1
- package/dist-scalprum/static/{327.cd6b3fee.chunk.js → 327.a9a99299.chunk.js} +2 -2
- package/dist-scalprum/static/327.a9a99299.chunk.js.map +1 -0
- package/dist-scalprum/static/3504.1c2f2e54.chunk.js +3 -0
- package/dist-scalprum/static/3504.1c2f2e54.chunk.js.LICENSE.txt +9 -0
- package/dist-scalprum/static/3504.1c2f2e54.chunk.js.map +1 -0
- package/dist-scalprum/static/3657.882640ca.chunk.js +3 -0
- package/dist-scalprum/static/3657.882640ca.chunk.js.LICENSE.txt +8 -0
- package/dist-scalprum/static/3657.882640ca.chunk.js.map +1 -0
- package/dist-scalprum/static/3954.12dd8006.chunk.js +3 -0
- package/dist-scalprum/static/3954.12dd8006.chunk.js.LICENSE.txt +9 -0
- package/dist-scalprum/static/3954.12dd8006.chunk.js.map +1 -0
- package/dist-scalprum/static/3984.647ef00c.chunk.js +2 -0
- package/dist-scalprum/static/3984.647ef00c.chunk.js.map +1 -0
- package/dist-scalprum/static/4026.d652a7a1.chunk.js +2 -0
- package/dist-scalprum/static/4026.d652a7a1.chunk.js.map +1 -0
- package/dist-scalprum/static/{6386.6386.ce38cef3.css → 4093.4093.3597955d.css} +1 -1
- package/dist-scalprum/static/4093.4093.3597955d.css.map +1 -0
- package/dist-scalprum/static/4093.ee6f0452.chunk.js +3 -0
- package/dist-scalprum/static/4093.ee6f0452.chunk.js.map +1 -0
- package/dist-scalprum/static/4382.a7363415.chunk.js +3 -0
- package/dist-scalprum/static/4382.a7363415.chunk.js.map +1 -0
- package/dist-scalprum/static/4614.23f2a85b.chunk.js +2 -0
- package/dist-scalprum/static/4614.23f2a85b.chunk.js.map +1 -0
- package/dist-scalprum/static/{4682.3c7098a8.chunk.js → 4682.bd2dfccd.chunk.js} +2 -2
- package/dist-scalprum/static/4682.bd2dfccd.chunk.js.map +1 -0
- package/dist-scalprum/static/4935.e14465ff.chunk.js +3 -0
- package/dist-scalprum/static/4935.e14465ff.chunk.js.LICENSE.txt +9 -0
- package/dist-scalprum/static/4935.e14465ff.chunk.js.map +1 -0
- package/dist-scalprum/static/5010.0cd6c959.chunk.js +3 -0
- package/dist-scalprum/static/5010.0cd6c959.chunk.js.map +1 -0
- package/dist-scalprum/static/{5203.43732b3f.chunk.js → 5203.539ed3ec.chunk.js} +2 -2
- package/dist-scalprum/static/{5203.43732b3f.chunk.js.map → 5203.539ed3ec.chunk.js.map} +1 -1
- package/dist-scalprum/static/{5453.b3ee2392.chunk.js → 5453.ecdee66d.chunk.js} +2 -2
- package/dist-scalprum/static/{5453.b3ee2392.chunk.js.map → 5453.ecdee66d.chunk.js.map} +1 -1
- package/dist-scalprum/static/6038.63d1f832.chunk.js +3 -0
- package/dist-scalprum/static/6038.63d1f832.chunk.js.LICENSE.txt +8 -0
- package/dist-scalprum/static/6038.63d1f832.chunk.js.map +1 -0
- package/dist-scalprum/static/635.e030b18a.chunk.js +3 -0
- package/dist-scalprum/static/635.e030b18a.chunk.js.LICENSE.txt +9 -0
- package/dist-scalprum/static/635.e030b18a.chunk.js.map +1 -0
- package/dist-scalprum/static/6371.d45f37cc.chunk.js +2 -0
- package/dist-scalprum/static/6371.d45f37cc.chunk.js.map +1 -0
- package/dist-scalprum/static/{6800.8ec3a2eb.chunk.js → 6800.6e2a08fe.chunk.js} +2 -2
- package/dist-scalprum/static/{6800.8ec3a2eb.chunk.js.map → 6800.6e2a08fe.chunk.js.map} +1 -1
- package/dist-scalprum/static/{6840.6cc88a16.chunk.js → 6840.3bd67cf4.chunk.js} +2 -2
- package/dist-scalprum/static/{6840.6cc88a16.chunk.js.map → 6840.3bd67cf4.chunk.js.map} +1 -1
- package/dist-scalprum/static/7164.5dc4bc72.chunk.js +2 -0
- package/dist-scalprum/static/7164.5dc4bc72.chunk.js.map +1 -0
- package/dist-scalprum/static/{7791.55db7365.chunk.js → 7791.8135d440.chunk.js} +2 -2
- package/dist-scalprum/static/{7791.55db7365.chunk.js.map → 7791.8135d440.chunk.js.map} +1 -1
- package/dist-scalprum/static/8083.4763f88b.chunk.js +206 -0
- package/dist-scalprum/static/8083.4763f88b.chunk.js.LICENSE.txt +9 -0
- package/dist-scalprum/static/8083.4763f88b.chunk.js.map +1 -0
- package/dist-scalprum/static/{8172.e89bbae7.chunk.js → 8172.cbe1f2c4.chunk.js} +2 -2
- package/dist-scalprum/static/8172.cbe1f2c4.chunk.js.map +1 -0
- package/dist-scalprum/static/{8799.4ea4639c.chunk.js → 8799.83d049f3.chunk.js} +2 -2
- package/dist-scalprum/static/{8799.4ea4639c.chunk.js.map → 8799.83d049f3.chunk.js.map} +1 -1
- package/dist-scalprum/static/{3587.490690d6.chunk.js → 9316.d9f2fe18.chunk.js} +2 -2
- package/dist-scalprum/static/{3587.490690d6.chunk.js.map → 9316.d9f2fe18.chunk.js.map} +1 -1
- package/dist-scalprum/static/{5568.5dbce633.chunk.js → 9655.db0c82b2.chunk.js} +3 -3
- package/dist-scalprum/static/9655.db0c82b2.chunk.js.LICENSE.txt +8 -0
- package/dist-scalprum/static/9655.db0c82b2.chunk.js.map +1 -0
- package/dist-scalprum/static/9710.7ec34777.chunk.js +2 -0
- package/dist-scalprum/static/9710.7ec34777.chunk.js.map +1 -0
- package/dist-scalprum/static/{4302.9a59485e.chunk.js → 9738.b037daf3.chunk.js} +2 -2
- package/dist-scalprum/static/9738.b037daf3.chunk.js.map +1 -0
- package/dist-scalprum/static/exposed-PluginRoot.c3fd0cc1.chunk.js +2 -0
- package/dist-scalprum/static/exposed-PluginRoot.c3fd0cc1.chunk.js.map +1 -0
- package/dist-scalprum/static/react-syntax-highlighter_languages_highlight_http.a55e168b.chunk.js +2 -0
- package/dist-scalprum/static/{react-syntax-highlighter_languages_highlight_http.5859273c.chunk.js.map → react-syntax-highlighter_languages_highlight_http.a55e168b.chunk.js.map} +1 -1
- package/package.json +10 -11
- package/dist/components/ApprovalQueueCard/ApprovalQueueCard.esm.js +0 -761
- package/dist/components/ApprovalQueueCard/ApprovalQueueCard.esm.js.map +0 -1
- package/dist/components/ApprovalQueueCard/index.esm.js +0 -2
- package/dist/components/ApprovalQueueCard/index.esm.js.map +0 -1
- package/dist-scalprum/internal.plugin-kuadrant.5d9e1e73c7f21bbed39a.js +0 -2
- package/dist-scalprum/internal.plugin-kuadrant.5d9e1e73c7f21bbed39a.js.map +0 -1
- package/dist-scalprum/static/1994.19e6a1c5.chunk.js +0 -3
- package/dist-scalprum/static/1994.19e6a1c5.chunk.js.map +0 -1
- package/dist-scalprum/static/2628.0605e07f.chunk.js +0 -3
- package/dist-scalprum/static/2628.0605e07f.chunk.js.map +0 -1
- package/dist-scalprum/static/2752.df63f31c.chunk.js +0 -2
- package/dist-scalprum/static/2752.df63f31c.chunk.js.map +0 -1
- package/dist-scalprum/static/2967.8d9c1b1f.chunk.js.map +0 -1
- package/dist-scalprum/static/3097.582b68d3.chunk.js +0 -2
- package/dist-scalprum/static/3097.582b68d3.chunk.js.map +0 -1
- package/dist-scalprum/static/327.cd6b3fee.chunk.js.map +0 -1
- package/dist-scalprum/static/3584.c820a5c7.chunk.js +0 -2
- package/dist-scalprum/static/3584.c820a5c7.chunk.js.map +0 -1
- package/dist-scalprum/static/3647.67079e5f.chunk.js +0 -2
- package/dist-scalprum/static/3647.67079e5f.chunk.js.map +0 -1
- package/dist-scalprum/static/3984.7bc07774.chunk.js +0 -2
- package/dist-scalprum/static/3984.7bc07774.chunk.js.map +0 -1
- package/dist-scalprum/static/4302.9a59485e.chunk.js.map +0 -1
- package/dist-scalprum/static/4682.3c7098a8.chunk.js.map +0 -1
- package/dist-scalprum/static/5010.2228c754.chunk.js +0 -3
- package/dist-scalprum/static/5010.2228c754.chunk.js.map +0 -1
- package/dist-scalprum/static/5568.5dbce633.chunk.js.map +0 -1
- package/dist-scalprum/static/6272.ef31cb1c.chunk.js +0 -2
- package/dist-scalprum/static/6272.ef31cb1c.chunk.js.map +0 -1
- package/dist-scalprum/static/6371.c4899d73.chunk.js +0 -3
- package/dist-scalprum/static/6371.c4899d73.chunk.js.map +0 -1
- package/dist-scalprum/static/6386.6386.ce38cef3.css.map +0 -1
- package/dist-scalprum/static/6386.903891f3.chunk.js +0 -3
- package/dist-scalprum/static/6386.903891f3.chunk.js.map +0 -1
- package/dist-scalprum/static/65.0e01be7c.chunk.js +0 -2
- package/dist-scalprum/static/6753.76832e72.chunk.js +0 -2
- package/dist-scalprum/static/6753.76832e72.chunk.js.map +0 -1
- package/dist-scalprum/static/8172.e89bbae7.chunk.js.map +0 -1
- package/dist-scalprum/static/8627.111cbac9.chunk.js +0 -2
- package/dist-scalprum/static/8627.111cbac9.chunk.js.map +0 -1
- package/dist-scalprum/static/9510.e4112e19.chunk.js +0 -3
- package/dist-scalprum/static/9510.e4112e19.chunk.js.map +0 -1
- package/dist-scalprum/static/9644.7d342123.chunk.js +0 -2
- package/dist-scalprum/static/9644.7d342123.chunk.js.map +0 -1
- package/dist-scalprum/static/993.c164940e.chunk.js +0 -2
- package/dist-scalprum/static/993.c164940e.chunk.js.map +0 -1
- package/dist-scalprum/static/exposed-PluginRoot.5b6638e2.chunk.js +0 -2
- package/dist-scalprum/static/exposed-PluginRoot.5b6638e2.chunk.js.map +0 -1
- package/dist-scalprum/static/react-syntax-highlighter_languages_highlight_http.5859273c.chunk.js +0 -2
- /package/dist-scalprum/static/{6371.c4899d73.chunk.js.LICENSE.txt → 1085.d17e689a.chunk.js.LICENSE.txt} +0 -0
- /package/dist-scalprum/static/{2628.0605e07f.chunk.js.LICENSE.txt → 2628.20156dc1.chunk.js.LICENSE.txt} +0 -0
- /package/dist-scalprum/static/{6386.903891f3.chunk.js.LICENSE.txt → 4093.ee6f0452.chunk.js.LICENSE.txt} +0 -0
- /package/dist-scalprum/static/{1994.19e6a1c5.chunk.js.LICENSE.txt → 4382.a7363415.chunk.js.LICENSE.txt} +0 -0
- /package/dist-scalprum/static/{5010.2228c754.chunk.js.LICENSE.txt → 5010.0cd6c959.chunk.js.LICENSE.txt} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkinternal_plugin_kuadrant=self.webpackChunkinternal_plugin_kuadrant||[]).push([[4302],{14302:(e,t,n)=>{n.r(t),n.d(t,{AnalyticsContext:()=>c,AnalyticsImplementationBlueprint:()=>Je,ApiBlueprint:()=>et,AppRootElementBlueprint:()=>rt,AppRootWrapperBlueprint:()=>it,ErrorDisplay:()=>yt,ExtensionBoundary:()=>Pt,FeatureFlagState:()=>Y,IconBundleBlueprint:()=>st,NavContentBlueprint:()=>ut,NavItemBlueprint:()=>dt,NotFoundErrorPage:()=>gt,PageBlueprint:()=>Tt,Progress:()=>ht,RouterBlueprint:()=>jt,SessionState:()=>w,SignInPageBlueprint:()=>_t,SwappableComponentBlueprint:()=>Ct,ThemeBlueprint:()=>Zt,TranslationBlueprint:()=>Mt,alertApiRef:()=>_,analyticsApiRef:()=>h,appLanguageApiRef:()=>I,appThemeApiRef:()=>Z,appTreeApiRef:()=>b,atlassianAuthApiRef:()=>S,bitbucketAuthApiRef:()=>E,bitbucketServerAuthApiRef:()=>T,configApiRef:()=>M,coreExtensionData:()=>nt,createApiFactory:()=>H,createApiRef:()=>m,createExtension:()=>Ve,createExtensionBlueprint:()=>Ke,createExtensionBlueprintParams:()=>Ge,createExtensionDataRef:()=>Ie,createExtensionInput:()=>rn,createExternalRouteRef:()=>Gt,createFrontendFeatureLoader:()=>dn,createFrontendModule:()=>pn,createFrontendPlugin:()=>un,createRouteRef:()=>Dt,createSubRouteRef:()=>Vt,createSwappableComponent:()=>mt,createTranslationMessages:()=>Xt,createTranslationRef:()=>en,createTranslationResource:()=>Jt,dialogApiRef:()=>U,discoveryApiRef:()=>F,errorApiRef:()=>C,featureFlagsApiRef:()=>z,fetchApiRef:()=>L,githubAuthApiRef:()=>x,gitlabAuthApiRef:()=>R,googleAuthApiRef:()=>k,iconsApiRef:()=>D,identityApiRef:()=>B,microsoftAuthApiRef:()=>$,oauthRequestApiRef:()=>V,oktaAuthApiRef:()=>A,oneloginAuthApiRef:()=>P,openshiftAuthApiRef:()=>O,routeResolutionApiRef:()=>q,storageApiRef:()=>G,swappableComponentsApiRef:()=>N,translationApiRef:()=>W,useAnalytics:()=>v,useApi:()=>d,useApiHolder:()=>p,useAppNode:()=>Rt,useRouteRef:()=>Ht,useRouteRefParams:()=>Kt,useTranslationRef:()=>nn,vmwareCloudAuthApiRef:()=>j,withApis:()=>l});var r=n(31085),a=n(15427),i=n(95478);const o=(0,a.createVersionedContext)("analytics-context"),s=()=>{const e=(0,i.useContext)(o);if(void 0===e)return{pluginId:"app",extensionId:"app"};const t=e.atVersion(1);if(void 0===t)throw new Error("No context found for version 1.");return t},c=e=>{const{attributes:t,children:n}=e,i={...s(),...t},c=(0,a.createVersionedValueMap)({1:i});return(0,r.jsx)(o.Provider,{value:c,children:n})};var u=n(57556);function p(){const e=(0,a.useVersionedContext)("api-context");if(!e)throw new u.EH("API context is not available");const t=e.atVersion(1);if(!t)throw new u.EH("ApiContext v1 not available");return t}function d(e){const t=p().get(e);if(!t)throw new u.EH(`No implementation available for ${e}`);return t}function l(e){return function(t){const n=n=>{const a=p(),i={};for(const t in e)if(e.hasOwnProperty(t)){const n=e[t],r=a.get(n);if(!r)throw new u.EH(`No implementation available for ${n}`);i[t]=r}return(0,r.jsx)(t,{...n,...i})},a=t.displayName||t.name||"Component";return n.displayName=`withApis(${a})`,n}}class f{constructor(e){if(this.config=e,!e.id.split(".").flatMap(e=>e.split("-")).every(e=>e.match(/^[a-z][a-z0-9]*$/)))throw new Error(`API id must only contain period separated lowercase alphanum tokens with dashes, got '${e.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 m(e){return new f(e)}const h=m({id:"core.analytics"}),g=(0,a.getOrCreateGlobalSingleton)("core-plugin-api:analytics-tracker-events",()=>({mostRecentGatheredNavigation:void 0,mostRecentRoutableExtensionRender:void 0,beforeUnloadRegistered:!1}));class y{analyticsApi;context;constructor(e,t={pluginId:"root",extensionId:"App"}){this.analyticsApi=e,this.context=t,g.beforeUnloadRegistered||(addEventListener("beforeunload",()=>{g.mostRecentGatheredNavigation&&(this.analyticsApi.captureEvent({...g.mostRecentGatheredNavigation,...g.mostRecentRoutableExtensionRender}),g.mostRecentGatheredNavigation=void 0,g.mostRecentRoutableExtensionRender=void 0)},{once:!0,passive:!0}),g.beforeUnloadRegistered=!0)}setContext(e){this.context=e}captureEvent(e,t,{value:n,attributes:r}={}){const a=this.context;if("_ROUTABLE-EXTENSION-RENDERED"!==e){if(g.mostRecentGatheredNavigation){try{this.analyticsApi.captureEvent({...g.mostRecentGatheredNavigation,...g.mostRecentRoutableExtensionRender})}catch(e){console.warn("Error during analytics event capture. %o",e)}g.mostRecentGatheredNavigation=void 0,g.mostRecentRoutableExtensionRender=void 0}if("navigate"!==e||"root"!==a.pluginId)try{this.analyticsApi.captureEvent({action:e,subject:t,value:n,attributes:r,context:a})}catch(e){console.warn("Error during analytics event capture. %o",e)}else g.mostRecentGatheredNavigation={action:e,subject:t,value:n,attributes:r,context:a}}else g.mostRecentGatheredNavigation&&(g.mostRecentRoutableExtensionRender={context:{...a,extensionId:"App"}})}}function v(){const e=(0,i.useRef)(null),t=s(),n=function(){try{return d(h)}catch(e){if("NotImplementedError"===e.name)return{captureEvent:()=>{}};throw e}}(),r=(null===e.current&&(e.current=new y(n)),e.current);return r.setContext(t),r}const b=m({id:"core.app-tree"}),w={SignedIn:"SignedIn",SignedOut:"SignedOut"},k=m({id:"core.auth.google"}),x=m({id:"core.auth.github"}),A=m({id:"core.auth.okta"}),R=m({id:"core.auth.gitlab"}),$=m({id:"core.auth.microsoft"}),P=m({id:"core.auth.onelogin"}),E=m({id:"core.auth.bitbucket"}),T=m({id:"core.auth.bitbucket-server"}),S=m({id:"core.auth.atlassian"}),j=m({id:"core.auth.vmware-cloud"}),O=m({id:"core.auth.openshift"}),_=m({id:"core.alert"}),I=m({id:"core.applanguage"}),Z=m({id:"core.apptheme"}),N=m({id:"core.swappable-components"}),M=m({id:"core.config"}),F=m({id:"core.discovery"}),C=m({id:"core.error"}),Y={None:0,Active:1},z=m({id:"core.featureflags"}),L=m({id:"core.fetch"}),D=m({id:"core.icons"}),B=m({id:"core.identity"}),U=m({id:"core.dialog"}),V=m({id:"core.oauthrequest"}),q=m({id:"core.route-resolution"}),G=m({id:"core.storage"}),W=m({id:"core.translation"});function H(e,t){return"id"in e?{api:e,deps:{},factory:()=>t}:e}const K=Symbol("Let zodToJsonSchema decide on which parser to use"),X={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",target:"jsonSchema7",strictUnions:!1,definitions:{},errorMessages:!1,markdownDescription:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref",openAiAnyTypeName:"OpenAiAnyType"};var J=n(53215);const Q=(e,t)=>{let n=0;for(;n<e.length&&n<t.length&&e[n]===t[n];n++);return[(e.length-n).toString(),...t.slice(n)].join("/")};function ee(e){if("openAi"!==e.target)return{};const t=[...e.basePath,e.definitionPath,e.openAiAnyTypeName];return e.flags.hasReferencedOpenAiAnyType=!0,{$ref:"relative"===e.$refStrategy?Q(t,e.currentPath):t.join("/")}}function te(e,t,n,r){r?.errorMessages&&n&&(e.errorMessage={...e.errorMessage,[t]:n})}function ne(e,t,n,r,a){e[t]=n,te(e,t,r,a)}function re(e,t){return Se(e.type._def,t)}function ae(e,t,n){const r=n??t.dateStrategy;if(Array.isArray(r))return{anyOf:r.map((n,r)=>ae(e,t,n))};switch(r){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return ie(e,t)}}const ie=(e,t)=>{const n={type:"integer",format:"unix-time"};if("openApi3"===t.target)return n;for(const r of e.checks)switch(r.kind){case"min":ne(n,"minimum",r.value,r.message,t);break;case"max":ne(n,"maximum",r.value,r.message,t)}return n};let oe;const se=/^[cC][^\s-]{8,}$/,ce=/^[0-9a-z]+$/,ue=/^[0-9A-HJKMNP-TV-Z]{26}$/,pe=/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,de=()=>(void 0===oe&&(oe=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),oe),le=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,fe=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,me=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,he=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,ge=/^[a-zA-Z0-9_-]{21}$/,ye=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/;function ve(e,t){const n={type:"string"};if(e.checks)for(const r of e.checks)switch(r.kind){case"min":ne(n,"minLength","number"==typeof n.minLength?Math.max(n.minLength,r.value):r.value,r.message,t);break;case"max":ne(n,"maxLength","number"==typeof n.maxLength?Math.min(n.maxLength,r.value):r.value,r.message,t);break;case"email":switch(t.emailStrategy){case"format:email":ke(n,"email",r.message,t);break;case"format:idn-email":ke(n,"idn-email",r.message,t);break;case"pattern:zod":xe(n,pe,r.message,t)}break;case"url":ke(n,"uri",r.message,t);break;case"uuid":ke(n,"uuid",r.message,t);break;case"regex":xe(n,r.regex,r.message,t);break;case"cuid":xe(n,se,r.message,t);break;case"cuid2":xe(n,ce,r.message,t);break;case"startsWith":xe(n,RegExp(`^${be(r.value,t)}`),r.message,t);break;case"endsWith":xe(n,RegExp(`${be(r.value,t)}$`),r.message,t);break;case"datetime":ke(n,"date-time",r.message,t);break;case"date":ke(n,"date",r.message,t);break;case"time":ke(n,"time",r.message,t);break;case"duration":ke(n,"duration",r.message,t);break;case"length":ne(n,"minLength","number"==typeof n.minLength?Math.max(n.minLength,r.value):r.value,r.message,t),ne(n,"maxLength","number"==typeof n.maxLength?Math.min(n.maxLength,r.value):r.value,r.message,t);break;case"includes":xe(n,RegExp(be(r.value,t)),r.message,t);break;case"ip":"v6"!==r.version&&ke(n,"ipv4",r.message,t),"v4"!==r.version&&ke(n,"ipv6",r.message,t);break;case"base64url":xe(n,he,r.message,t);break;case"jwt":xe(n,ye,r.message,t);break;case"cidr":"v6"!==r.version&&xe(n,le,r.message,t),"v4"!==r.version&&xe(n,fe,r.message,t);break;case"emoji":xe(n,de(),r.message,t);break;case"ulid":xe(n,ue,r.message,t);break;case"base64":switch(t.base64Strategy){case"format:binary":ke(n,"binary",r.message,t);break;case"contentEncoding:base64":ne(n,"contentEncoding","base64",r.message,t);break;case"pattern:zod":xe(n,me,r.message,t)}break;case"nanoid":xe(n,ge,r.message,t);case"toLowerCase":case"toUpperCase":case"trim":break;default:(()=>{})()}return n}function be(e,t){return"escape"===t.patternStrategy?function(e){let t="";for(let n=0;n<e.length;n++)we.has(e[n])||(t+="\\"),t+=e[n];return t}(e):e}const we=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function ke(e,t,n,r){e.format||e.anyOf?.some(e=>e.format)?(e.anyOf||(e.anyOf=[]),e.format&&(e.anyOf.push({format:e.format,...e.errorMessage&&r.errorMessages&&{errorMessage:{format:e.errorMessage.format}}}),delete e.format,e.errorMessage&&(delete e.errorMessage.format,0===Object.keys(e.errorMessage).length&&delete e.errorMessage)),e.anyOf.push({format:t,...n&&r.errorMessages&&{errorMessage:{format:n}}})):ne(e,"format",t,n,r)}function xe(e,t,n,r){e.pattern||e.allOf?.some(e=>e.pattern)?(e.allOf||(e.allOf=[]),e.pattern&&(e.allOf.push({pattern:e.pattern,...e.errorMessage&&r.errorMessages&&{errorMessage:{pattern:e.errorMessage.pattern}}}),delete e.pattern,e.errorMessage&&(delete e.errorMessage.pattern,0===Object.keys(e.errorMessage).length&&delete e.errorMessage)),e.allOf.push({pattern:Ae(t,r),...n&&r.errorMessages&&{errorMessage:{pattern:n}}})):ne(e,"pattern",Ae(t,r),n,r)}function Ae(e,t){if(!t.applyRegexFlags||!e.flags)return e.source;const n=e.flags.includes("i"),r=e.flags.includes("m"),a=e.flags.includes("s"),i=n?e.source.toLowerCase():e.source;let o="",s=!1,c=!1,u=!1;for(let e=0;e<i.length;e++)if(s)o+=i[e],s=!1;else{if(n)if(c){if(i[e].match(/[a-z]/)){u?(o+=i[e],o+=`${i[e-2]}-${i[e]}`.toUpperCase(),u=!1):"-"===i[e+1]&&i[e+2]?.match(/[a-z]/)?(o+=i[e],u=!0):o+=`${i[e]}${i[e].toUpperCase()}`;continue}}else if(i[e].match(/[a-z]/)){o+=`[${i[e]}${i[e].toUpperCase()}]`;continue}if(r){if("^"===i[e]){o+="(^|(?<=[\r\n]))";continue}if("$"===i[e]){o+="($|(?=[\r\n]))";continue}}a&&"."===i[e]?o+=c?`${i[e]}\r\n`:`[${i[e]}\r\n]`:(o+=i[e],"\\"===i[e]?s=!0:c&&"]"===i[e]?c=!1:c||"["!==i[e]||(c=!0))}try{new RegExp(o)}catch{return console.warn(`Could not convert regex pattern at ${t.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),e.source}return o}function Re(e,t){if("openAi"===t.target&&console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead."),"openApi3"===t.target&&e.keyType?._def.typeName===J.kY.ZodEnum)return{type:"object",required:e.keyType._def.values,properties:e.keyType._def.values.reduce((n,r)=>({...n,[r]:Se(e.valueType._def,{...t,currentPath:[...t.currentPath,"properties",r]})??ee(t)}),{}),additionalProperties:t.rejectedAdditionalProperties};const n={type:"object",additionalProperties:Se(e.valueType._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]})??t.allowedAdditionalProperties};if("openApi3"===t.target)return n;if(e.keyType?._def.typeName===J.kY.ZodString&&e.keyType._def.checks?.length){const{type:r,...a}=ve(e.keyType._def,t);return{...n,propertyNames:a}}if(e.keyType?._def.typeName===J.kY.ZodEnum)return{...n,propertyNames:{enum:e.keyType._def.values}};if(e.keyType?._def.typeName===J.kY.ZodBranded&&e.keyType._def.type._def.typeName===J.kY.ZodString&&e.keyType._def.type._def.checks?.length){const{type:r,...a}=re(e.keyType._def,t);return{...n,propertyNames:a}}return n}const $e={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"},Pe=(e,t)=>{const n=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((e,n)=>Se(e._def,{...t,currentPath:[...t.currentPath,"anyOf",`${n}`]})).filter(e=>!!e&&(!t.strictUnions||"object"==typeof e&&Object.keys(e).length>0));return n.length?{anyOf:n}:void 0};function Ee(e){try{return e.isOptional()}catch{return!0}}const Te=(e,t,n)=>{switch(t){case J.kY.ZodString:return ve(e,n);case J.kY.ZodNumber:return function(e,t){const n={type:"number"};if(!e.checks)return n;for(const r of e.checks)switch(r.kind){case"int":n.type="integer",te(n,"type",r.message,t);break;case"min":"jsonSchema7"===t.target?r.inclusive?ne(n,"minimum",r.value,r.message,t):ne(n,"exclusiveMinimum",r.value,r.message,t):(r.inclusive||(n.exclusiveMinimum=!0),ne(n,"minimum",r.value,r.message,t));break;case"max":"jsonSchema7"===t.target?r.inclusive?ne(n,"maximum",r.value,r.message,t):ne(n,"exclusiveMaximum",r.value,r.message,t):(r.inclusive||(n.exclusiveMaximum=!0),ne(n,"maximum",r.value,r.message,t));break;case"multipleOf":ne(n,"multipleOf",r.value,r.message,t)}return n}(e,n);case J.kY.ZodObject:return function(e,t){const n="openAi"===t.target,r={type:"object",properties:{}},a=[],i=e.shape();for(const e in i){let o=i[e];if(void 0===o||void 0===o._def)continue;let s=Ee(o);s&&n&&("ZodOptional"===o._def.typeName&&(o=o._def.innerType),o.isNullable()||(o=o.nullable()),s=!1);const c=Se(o._def,{...t,currentPath:[...t.currentPath,"properties",e],propertyPath:[...t.currentPath,"properties",e]});void 0!==c&&(r.properties[e]=c,s||a.push(e))}a.length&&(r.required=a);const o=function(e,t){if("ZodNever"!==e.catchall._def.typeName)return Se(e.catchall._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]});switch(e.unknownKeys){case"passthrough":return t.allowedAdditionalProperties;case"strict":return t.rejectedAdditionalProperties;case"strip":return"strict"===t.removeAdditionalStrategy?t.allowedAdditionalProperties:t.rejectedAdditionalProperties}}(e,t);return void 0!==o&&(r.additionalProperties=o),r}(e,n);case J.kY.ZodBigInt:return function(e,t){const n={type:"integer",format:"int64"};if(!e.checks)return n;for(const r of e.checks)switch(r.kind){case"min":"jsonSchema7"===t.target?r.inclusive?ne(n,"minimum",r.value,r.message,t):ne(n,"exclusiveMinimum",r.value,r.message,t):(r.inclusive||(n.exclusiveMinimum=!0),ne(n,"minimum",r.value,r.message,t));break;case"max":"jsonSchema7"===t.target?r.inclusive?ne(n,"maximum",r.value,r.message,t):ne(n,"exclusiveMaximum",r.value,r.message,t):(r.inclusive||(n.exclusiveMaximum=!0),ne(n,"maximum",r.value,r.message,t));break;case"multipleOf":ne(n,"multipleOf",r.value,r.message,t)}return n}(e,n);case J.kY.ZodBoolean:return{type:"boolean"};case J.kY.ZodDate:return ae(e,n);case J.kY.ZodUndefined:return function(e){return{not:ee(e)}}(n);case J.kY.ZodNull:return function(e){return"openApi3"===e.target?{enum:["null"],nullable:!0}:{type:"null"}}(n);case J.kY.ZodArray:return function(e,t){const n={type:"array"};return e.type?._def&&e.type?._def?.typeName!==J.kY.ZodAny&&(n.items=Se(e.type._def,{...t,currentPath:[...t.currentPath,"items"]})),e.minLength&&ne(n,"minItems",e.minLength.value,e.minLength.message,t),e.maxLength&&ne(n,"maxItems",e.maxLength.value,e.maxLength.message,t),e.exactLength&&(ne(n,"minItems",e.exactLength.value,e.exactLength.message,t),ne(n,"maxItems",e.exactLength.value,e.exactLength.message,t)),n}(e,n);case J.kY.ZodUnion:case J.kY.ZodDiscriminatedUnion:return function(e,t){if("openApi3"===t.target)return Pe(e,t);const n=e.options instanceof Map?Array.from(e.options.values()):e.options;if(n.every(e=>e._def.typeName in $e&&(!e._def.checks||!e._def.checks.length))){const e=n.reduce((e,t)=>{const n=$e[t._def.typeName];return n&&!e.includes(n)?[...e,n]:e},[]);return{type:e.length>1?e:e[0]}}if(n.every(e=>"ZodLiteral"===e._def.typeName&&!e.description)){const e=n.reduce((e,t)=>{const n=typeof t._def.value;switch(n){case"string":case"number":case"boolean":return[...e,n];case"bigint":return[...e,"integer"];case"object":if(null===t._def.value)return[...e,"null"];default:return e}},[]);if(e.length===n.length){const t=e.filter((e,t,n)=>n.indexOf(e)===t);return{type:t.length>1?t:t[0],enum:n.reduce((e,t)=>e.includes(t._def.value)?e:[...e,t._def.value],[])}}}else if(n.every(e=>"ZodEnum"===e._def.typeName))return{type:"string",enum:n.reduce((e,t)=>[...e,...t._def.values.filter(t=>!e.includes(t))],[])};return Pe(e,t)}(e,n);case J.kY.ZodIntersection:return function(e,t){const n=[Se(e.left._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),Se(e.right._def,{...t,currentPath:[...t.currentPath,"allOf","1"]})].filter(e=>!!e);let r="jsonSchema2019-09"===t.target?{unevaluatedProperties:!1}:void 0;const a=[];return n.forEach(e=>{if("type"in(t=e)&&"string"===t.type||!("allOf"in t)){let t=e;if("additionalProperties"in e&&!1===e.additionalProperties){const{additionalProperties:n,...r}=e;t=r}else r=void 0;a.push(t)}else a.push(...e.allOf),void 0===e.unevaluatedProperties&&(r=void 0);var t}),a.length?{allOf:a,...r}:void 0}(e,n);case J.kY.ZodTuple:return function(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map((e,n)=>Se(e._def,{...t,currentPath:[...t.currentPath,"items",`${n}`]})).reduce((e,t)=>void 0===t?e:[...e,t],[]),additionalItems:Se(e.rest._def,{...t,currentPath:[...t.currentPath,"additionalItems"]})}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map((e,n)=>Se(e._def,{...t,currentPath:[...t.currentPath,"items",`${n}`]})).reduce((e,t)=>void 0===t?e:[...e,t],[])}}(e,n);case J.kY.ZodRecord:return Re(e,n);case J.kY.ZodLiteral:return function(e,t){const n=typeof e.value;return"bigint"!==n&&"number"!==n&&"boolean"!==n&&"string"!==n?{type:Array.isArray(e.value)?"array":"object"}:"openApi3"===t.target?{type:"bigint"===n?"integer":n,enum:[e.value]}:{type:"bigint"===n?"integer":n,const:e.value}}(e,n);case J.kY.ZodEnum:return function(e){return{type:"string",enum:Array.from(e.values)}}(e);case J.kY.ZodNativeEnum:return function(e){const t=e.values,n=Object.keys(e.values).filter(e=>"number"!=typeof t[t[e]]).map(e=>t[e]),r=Array.from(new Set(n.map(e=>typeof e)));return{type:1===r.length?"string"===r[0]?"string":"number":["string","number"],enum:n}}(e);case J.kY.ZodNullable:return function(e,t){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return"openApi3"===t.target?{type:$e[e.innerType._def.typeName],nullable:!0}:{type:[$e[e.innerType._def.typeName],"null"]};if("openApi3"===t.target){const n=Se(e.innerType._def,{...t,currentPath:[...t.currentPath]});return n&&"$ref"in n?{allOf:[n],nullable:!0}:n&&{...n,nullable:!0}}const n=Se(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","0"]});return n&&{anyOf:[n,{type:"null"}]}}(e,n);case J.kY.ZodOptional:return((e,t)=>{if(t.currentPath.toString()===t.propertyPath?.toString())return Se(e.innerType._def,t);const n=Se(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","1"]});return n?{anyOf:[{not:ee(t)},n]}:ee(t)})(e,n);case J.kY.ZodMap:return function(e,t){return"record"===t.mapStrategy?Re(e,t):{type:"array",maxItems:125,items:{type:"array",items:[Se(e.keyType._def,{...t,currentPath:[...t.currentPath,"items","items","0"]})||ee(t),Se(e.valueType._def,{...t,currentPath:[...t.currentPath,"items","items","1"]})||ee(t)],minItems:2,maxItems:2}}}(e,n);case J.kY.ZodSet:return function(e,t){const n={type:"array",uniqueItems:!0,items:Se(e.valueType._def,{...t,currentPath:[...t.currentPath,"items"]})};return e.minSize&&ne(n,"minItems",e.minSize.value,e.minSize.message,t),e.maxSize&&ne(n,"maxItems",e.maxSize.value,e.maxSize.message,t),n}(e,n);case J.kY.ZodLazy:return()=>e.getter()._def;case J.kY.ZodPromise:return function(e,t){return Se(e.type._def,t)}(e,n);case J.kY.ZodNaN:case J.kY.ZodNever:return function(e){return"openAi"===e.target?void 0:{not:ee({...e,currentPath:[...e.currentPath,"not"]})}}(n);case J.kY.ZodEffects:return function(e,t){return"input"===t.effectStrategy?Se(e.schema._def,t):ee(t)}(e,n);case J.kY.ZodAny:return ee(n);case J.kY.ZodUnknown:return function(e){return ee(e)}(n);case J.kY.ZodDefault:return function(e,t){return{...Se(e.innerType._def,t),default:e.defaultValue()}}(e,n);case J.kY.ZodBranded:return re(e,n);case J.kY.ZodReadonly:case J.kY.ZodCatch:return((e,t)=>Se(e.innerType._def,t))(e,n);case J.kY.ZodPipeline:return((e,t)=>{if("input"===t.pipeStrategy)return Se(e.in._def,t);if("output"===t.pipeStrategy)return Se(e.out._def,t);const n=Se(e.in._def,{...t,currentPath:[...t.currentPath,"allOf","0"]});return{allOf:[n,Se(e.out._def,{...t,currentPath:[...t.currentPath,"allOf",n?"1":"0"]})].filter(e=>void 0!==e)}})(e,n);case J.kY.ZodFunction:case J.kY.ZodVoid:case J.kY.ZodSymbol:default:return}};function Se(e,t,n=!1){const r=t.seen.get(e);if(t.override){const a=t.override?.(e,t,r,n);if(a!==K)return a}if(r&&!n){const e=je(r,t);if(void 0!==e)return e}const a={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,a);const i=Te(e,e.typeName,t),o="function"==typeof i?Se(i(),t):i;if(o&&Oe(e,t,o),t.postProcess){const n=t.postProcess(o,e,t);return a.jsonSchema=o,n}return a.jsonSchema=o,o}const je=(e,t)=>{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:Q(t.currentPath,e.path)};case"none":case"seen":return e.path.length<t.currentPath.length&&e.path.every((e,n)=>t.currentPath[n]===e)?(console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`),ee(t)):"seen"===t.$refStrategy?ee(t):void 0}},Oe=(e,t,n)=>(e.description&&(n.description=e.description,t.markdownDescription&&(n.markdownDescription=e.description)),n),_e=(e,t)=>{const n=(e=>{const t=(e=>"string"==typeof e?{...X,name:e}:{...X,...e})(e),n=void 0!==t.name?[...t.basePath,t.definitionPath,t.name]:t.basePath;return{...t,flags:{hasReferencedOpenAiAnyType:!1},currentPath:n,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map(([e,n])=>[n._def,{def:n._def,path:[...t.basePath,t.definitionPath,e],jsonSchema:void 0}]))}})(t);let r="object"==typeof t&&t.definitions?Object.entries(t.definitions).reduce((e,[t,r])=>({...e,[t]:Se(r._def,{...n,currentPath:[...n.basePath,n.definitionPath,t]},!0)??ee(n)}),{}):void 0;const a="string"==typeof t?t:"title"===t?.nameStrategy?void 0:t?.name,i=Se(e._def,void 0===a?n:{...n,currentPath:[...n.basePath,n.definitionPath,a]},!1)??ee(n),o="object"==typeof t&&void 0!==t.name&&"title"===t.nameStrategy?t.name:void 0;void 0!==o&&(i.title=o),n.flags.hasReferencedOpenAiAnyType&&(r||(r={}),r[n.openAiAnyTypeName]||(r[n.openAiAnyTypeName]={type:["string","number","integer","boolean","array","null"],items:{$ref:"relative"===n.$refStrategy?"1":[...n.basePath,n.definitionPath,n.openAiAnyTypeName].join("/")}}));const s=void 0===a?r?{...i,[n.definitionPath]:r}:i:{$ref:[..."relative"===n.$refStrategy?[]:n.basePath,n.definitionPath,a].join("/"),[n.definitionPath]:{...r,[a]:i}};return"jsonSchema7"===n.target?s.$schema="http://json-schema.org/draft-07/schema#":"jsonSchema2019-09"!==n.target&&"openAi"!==n.target||(s.$schema="https://json-schema.org/draft/2019-09/schema#"),"openAi"===n.target&&("anyOf"in s||"oneOf"in s||"allOf"in s||"type"in s&&Array.isArray(s.type))&&console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property."),s};function Ie(){const e=e=>Object.assign(t=>({$$type:"@backstage/ExtensionDataValue",id:e,value:t}),{id:e,$$type:"@backstage/ExtensionDataRef",config:{},optional(){return{...this,config:{...this.config,optional:!0}}},toString(){const t=Boolean(this.config.optional);return`ExtensionDataRef{id=${e},optional=${t}}`}});return{with:t=>e(t.id)}}function Ze(e,t,n){if("object"!=typeof e||!e?.[Symbol.iterator])throw new Error(`${t} did not provide an iterable object`);const r=new Map,a=n&&new Map(n.map(e=>[e.id,e]));for(const t of e){if(a&&!a.delete(t.id))throw new Error(`extension data '${t.id}' was provided but not declared`);r.set(t.id,t)}const i=a&&Array.from(a.values()).filter(e=>!e.config.optional);if(i&&i.length>0)throw new Error(`missing required extension data value(s) '${i.map(e=>e.id).join(", ")}'`);return{get:e=>r.get(e.id)?.value,[Symbol.iterator]:()=>r.values()}}function Ne(e){return e}function Me(e){return e}function Fe(e,t,n){if(!e||!t||!n)return t;const r={};for(const a in e){if(!Object.hasOwn(e,a))continue;const i=e[a],o=n[a];if(i.config.singleton){const e=Me(t[a]);if(o){const t=Ze(o,"extension input override",i.extensionData);if(!e)throw new Error(`attempted to override data of input '${a}' but it is not present in the original inputs`);r[a]=Object.assign(t,{node:e.node})}}else{const e=Ne(t[a]);if(!Array.isArray(o))throw new Error(`override data provided for input '${a}' must be an array`);if(0===o.length)r[a]=[];else{const t=o.filter(e=>"node"in e).length;if(0===t){if(e.length!==o.length)throw new Error(`override data provided for input '${a}' must match the length of the original inputs`);r[a]=o.map((t,n)=>{const r=Ze(t,"extension input override",i.extensionData);return Object.assign(r,{node:e[n].node})})}else{if(t!==o.length)throw new Error(`override data for input '${a}' may not mix forwarded inputs with data overrides`);r[a]=o}}}}return r}var Ce=n(33587);function Ye(e){if("invalid_union"===e.code)return Ye(e.unionErrors[0].issues[0]);let t=e.message;return"Required"===t&&(t="Missing required value"),e.path.length&&(t+=` at '${e.path.join(".")}'`),t}class ze{static create(e){return new ze(e.type,new Set(e.versions))}#e;#t;constructor(e,t){this.#e=e,this.#t=t}TPublic=void 0;TInternal=void 0;isType=e=>this.#n(e);toInternal=e=>{if(!this.#n(e))throw new TypeError(`Invalid opaque type, expected '${this.#e}', but got '${this.#r(e)}'`);if(!this.#t.has(e.version)){const t=Array.from(this.#t).map(this.#a);t.length>1&&(t[t.length-1]=`or ${t[t.length-1]}`);const n=t.length>2?t.join(", "):t.join(" ");throw new TypeError(`Invalid opaque type instance, got version ${this.#a(e.version)}, expected ${n}`)}return e};createInstance(e,t){return Object.assign(t,{$$type:this.#e,...e&&{version:e}})}#n(e){return null!==e&&"object"==typeof e&&e.$$type===this.#e}#r(e){return"object"!=typeof e?`<${typeof e}>`:null===e?"<null>":String("$$type"in e?e.$$type:e)}#a=e=>e?`'${e}'`:"undefined"}const Le=ze.create({type:"@backstage/ExtensionDefinition",versions:["v1","v2"]}),De=ze.create({type:"@backstage/ExtensionInput",versions:[void 0]}),Be=Symbol("params");function Ue(e,t,n){return e?Object.fromEntries(Object.entries(e).map(([e,r])=>[e,De.toInternal(r).withContext?.({kind:t,name:n,input:e})??r])):{}}function Ve(e){const t=e.config?.schema,n=t&&function(){const e=(n=Ce).object(Object.fromEntries(Object.entries(t).map(([e,t])=>[e,t(n)])));var n;return{parse:t=>{const n=e.safeParse(t);if(n.success)return n.data;throw new Error(n.error.issues.map(Ye).join("; "))},schema:_e(e)}}();return Le.createInstance("v2",{T:void 0,kind:e.kind,name:e.name,attachTo:e.attachTo,disabled:e.disabled??!1,inputs:Ue(e.inputs,e.kind,e.name),output:e.output,configSchema:n,factory:e.factory,toString(){const t=[];e.kind&&t.push(`kind=${e.kind}`),e.name&&t.push(`name=${e.name}`);const n=[e.attachTo].flat().map(e=>{const t=e;if(De.isType(t)){const{context:e}=De.toInternal(t);if(!e)return"<detached-input>";let n="<plugin>";return e?.kind&&(n=`${e?.kind}:${n}`),e?.name&&(n=`${n}/${e?.name}`),`${n}@${e.input}`}if("relative"in t&&t.relative){let e="<plugin>";return t.relative.kind&&(e=`${t.relative.kind}:${e}`),t.relative.name&&(e=`${e}/${t.relative.name}`),`${e}@${t.input}`}if("id"in t)return`${t.id}@${t.input}`;throw new Error("Invalid attachment point specification")}).join("+");return t.push(`attachTo=${n}`),`ExtensionDefinition{${t.join(",")}}`},override(t){if(!Array.isArray(e.output))throw new Error("Cannot override an extension that is not declared using the new format with outputs as an array");if(t.output&&!t.factory)throw new Error("Refused to override output without also overriding factory");if(t.params&&t.factory)throw new Error("Refused to override params and factory at the same time");return Ve({kind:e.kind,name:e.name,attachTo:t.attachTo??e.attachTo,disabled:t.disabled??e.disabled,inputs:Ue({...e.inputs??{},...t.inputs??{}},e.kind,e.name),output:t.output??e.output,config:e.config||t.config?{schema:{...e.config?.schema,...t.config?.schema}}:void 0,factory:({node:n,apis:r,config:a,inputs:i})=>{if(!t.factory)return e.factory({node:n,apis:r,config:a,inputs:i,[Be]:t.params});const o=t.factory(t=>Ze(e.factory({node:n,apis:r,config:t?.config??a,inputs:Fe(e.inputs,i,t?.inputs),[Be]:t?.params}),"original extension factory",e.output),{node:n,apis:r,config:a,inputs:i});if("object"!=typeof o||!o?.[Symbol.iterator])throw new Error("extension factory override did not provide an iterable object");const s=new Map;for(const e of o)s.set(e.id,e);return s.values()}})}})}const qe=ze.create({type:"@backstage/BlueprintParams",versions:["v1"]});function Ge(e){return qe.createInstance("v1",{T:null,params:e})}function We(e,t,n){const r=e(t);try{return qe.toInternal(r).params}catch(e){throw new TypeError(`Invalid invocation of blueprint with kind '${n}', the parameter definition callback function did not return a valid parameter definition object; Caused by: ${e.message}`)}}function He(e,t,n,r){const a=t[Be];if(n){if(a){if("function"!=typeof a)throw new TypeError(`Invalid extension override of blueprint with kind '${r}', the override params were passed as a plain object, but this blueprint requires them to be passed in callback form`);return We(a,n,r)}if("function"!=typeof e)throw new TypeError(`Invalid invocation of blueprint with kind '${r}', the parameters where passed as a plain object, but this blueprint requires them to be passed in callback form`);return We(e,n,r)}return{..."function"==typeof e?We(e,Ge,r):e,..."function"==typeof a?We(a,Ge,r):a}}function Ke(e){const t=e.defineParams;return{dataRefs:e.dataRefs,make:n=>Ve({kind:e.kind,name:n.name,attachTo:n.attachTo??e.attachTo,disabled:n.disabled??e.disabled,inputs:e.inputs,output:e.output,config:e.config,factory:r=>e.factory(He(n.params,r,t,e.kind),r)}),makeWithOverrides:n=>Ve({kind:e.kind,name:n.name,attachTo:n.attachTo??e.attachTo,disabled:n.disabled??e.disabled,inputs:{...n.inputs,...e.inputs},output:n.output??e.output,config:e.config||n.config?{schema:{...e.config?.schema,...n.config?.schema}}:void 0,factory:r=>{const{node:a,config:i,inputs:o,apis:s}=r;return n.factory((n,c)=>Ze(e.factory(He(n,r,t,e.kind),{apis:s,node:a,config:c?.config??i,inputs:Fe(e.inputs,o,c?.inputs)}),"original blueprint factory",e.output),{apis:s,node:a,config:i,inputs:o})}})}}const Xe=Ie().with({id:"core.analytics.factory"}),Je=Ke({kind:"analytics",attachTo:[{id:"api:app/analytics",input:"implementations"}],output:[Xe],dataRefs:{factory:Xe},defineParams:e=>Ge(e),*factory(e){yield Xe(e)}}),Qe=Ie().with({id:"core.api.factory"}),et=Ke({kind:"api",attachTo:{id:"root",input:"apis"},output:[Qe],dataRefs:{factory:Qe},defineParams:e=>Ge(e),*factory(e){yield Qe(e)}});var tt=n(35121);const nt={title:Ie().with({id:"core.title"}),reactElement:Ie().with({id:"core.reactElement"}),routePath:Ie().with({id:"core.routing.path"}),routeRef:Ie().with({id:"core.routing.ref"})},rt=Ke({kind:"app-root-element",attachTo:{id:"app/root",input:"elements"},output:[nt.reactElement],*factory(e,{node:t}){yield nt.reactElement((0,r.jsx)(tt.ExtensionBoundary,{node:t,errorPresentation:"error-api",children:e.element}))}}),at=Ie().with({id:"app.root.wrapper"}),it=Ke({kind:"app-root-wrapper",attachTo:{id:"app/root",input:"wrappers"},output:[at],dataRefs:{component:at},*factory(e){yield at(e.component)}}),ot=Ie().with({id:"core.icons"}),st=Ke({kind:"icon-bundle",attachTo:{id:"api:app/icons",input:"icons"},output:[ot],factory:e=>[ot(e.icons)],dataRefs:{icons:ot}}),ct=Ie().with({id:"core.nav-content.component"}),ut=Ke({kind:"nav-content",attachTo:{id:"app/nav",input:"content"},output:[ct],dataRefs:{component:ct},*factory(e){yield ct(e.component)}}),pt=Ie().with({id:"core.nav-item.target"}),dt=Ke({kind:"nav-item",attachTo:{id:"app/nav",input:"items"},output:[pt],dataRefs:{target:pt},factory:({icon:e,routeRef:t,title:n},{config:r})=>[pt({title:r.title??n,icon:e,routeRef:t})],config:{schema:{title:e=>e.string().optional()}}}),lt=ze.create({versions:["v1"],type:"@backstage/SwappableComponentRef"}),ft=()=>{try{return d(N)}catch(e){return}};function mt(e){const t=t=>(0,r.jsx)("div",{"data-testid":e.id,...t}),n=lt.createInstance("v1",{id:e.id,TProps:null,TExternalProps:null,toString:()=>`SwappableComponentRef{id=${e.id}}`,defaultComponent:(0,i.lazy)(async()=>({default:await(e.loader?.())??t})),transformProps:e.transformProps}),a=e=>{const t=ft();if(!t){const t=lt.toInternal(n),a=t.defaultComponent,i=t.transformProps?.(e)??e;return(0,r.jsx)(a,{...i})}const a=t.getComponent(n);return(0,r.jsx)(a,{...e})};return Object.assign(a,{ref:n}),a}const ht=mt({id:"core-progress"}),gt=mt({id:"core-not-found-error-page"}),yt=mt({id:"core-error-display",loader:()=>e=>(0,r.jsx)("div",{"data-testid":"core-error-display",children:e.error.message})});class vt extends i.Component{static getDerivedStateFromError(e){return{error:e}}state={error:void 0};handleErrorReset=()=>{this.setState({error:void 0})};render(){const{error:e}=this.state,{plugin:t,children:n}=this.props;return e?(0,r.jsx)(yt,{plugin:t,error:e,resetError:this.handleErrorReset}):n}}class bt extends i.Component{static getDerivedStateFromError(e){return{error:e}}state={error:void 0};componentDidCatch(e,t){const{node:n,errorApi:r}=this.props;r?.post(new u.HK(`Error in extension '${n.spec.id}'`,e))}render(){return this.state.error?null:this.props.children}}(0,a.getOrCreateGlobalSingleton)("core-plugin-api:analytics-tracker-events",()=>({mostRecentGatheredNavigation:void 0,mostRecentRoutableExtensionRender:void 0,beforeUnloadRegistered:!1}));const wt=(0,tt.createApiRef)({id:"core.plugin-wrapper.alpha"}),kt="app-node-context",xt=(0,a.createVersionedContext)(kt);function At({node:e,children:t}){const n=(0,a.createVersionedValueMap)({1:{node:e}});return(0,r.jsx)(xt.Provider,{value:n,children:t})}function Rt(){const e=(0,a.useVersionedContext)(kt);if(!e)return;const t=e.atVersion(1);if(!t)throw new Error("AppNodeContext v1 not available");return t.node}const $t=e=>{const{enabled:t,children:n}=e,a=v();return(0,i.useEffect)(()=>{t&&a.captureEvent("_ROUTABLE-EXTENSION-RENDERED","")},[a,t]),(0,r.jsx)(r.Fragment,{children:n})};function Pt(e){const{node:t,children:n}=e,a=function(){try{return d(C)}catch{return}}(),o=Boolean(t.instance?.getData(nt.routePath)),s=t.spec.plugin,u=s.id??"app",p=function(){try{return d(wt)}catch{return}}(),l=(0,i.useMemo)(()=>p?.getPluginWrapper(u),[p,u]),f={extensionId:t.spec.id,pluginId:u};let m=(0,r.jsx)(c,{attributes:f,children:(0,r.jsx)($t,{enabled:o,children:n})});return l&&(m=(0,r.jsx)(l,{children:m})),m="error-api"===e.errorPresentation?(0,r.jsx)(bt,{node:t,errorApi:a,children:m}):(0,r.jsx)(vt,{plugin:s,children:m}),(0,r.jsx)(At,{node:t,children:(0,r.jsx)(i.Suspense,{fallback:(0,r.jsx)(ht,{}),children:m})})}var Et;(Et=Pt||(Pt={})).lazy=function(e,t){const n=(0,i.lazy)(()=>t().then(e=>({default:()=>e})));return(0,r.jsx)(Et,{node:e,children:(0,r.jsx)(n,{})})},Et.lazyComponent=function(e,t){const n=(0,i.lazy)(()=>t().then(e=>({default:e})));return t=>(0,r.jsx)(Et,{node:e,children:(0,r.jsx)(n,{...t})})};const Tt=Ke({kind:"page",attachTo:{id:"app/routes",input:"routes"},output:[nt.routePath,nt.reactElement,nt.routeRef.optional()],config:{schema:{path:e=>e.string().optional()}},*factory(e,{config:t,node:n}){yield nt.routePath(t.path??e.path),yield nt.reactElement(Pt.lazy(n,e.loader)),e.routeRef&&(yield nt.routeRef(e.routeRef))}}),St=Ie().with({id:"app.router.wrapper"}),jt=Ke({kind:"app-router-component",attachTo:{id:"app/root",input:"router"},output:[St],dataRefs:{component:St},*factory(e){yield St(e.component)}}),Ot=Ie().with({id:"core.sign-in-page.component"}),_t=Ke({kind:"sign-in-page",attachTo:{id:"app/root",input:"signInPage"},output:[Ot],dataRefs:{component:Ot},*factory({loader:e},{node:t}){const n=(0,i.lazy)(()=>e().then(e=>({default:e})));yield Ot(e=>(0,r.jsx)(Pt,{node:t,children:(0,r.jsx)(n,{...e})}))}}),It=Ie().with({id:"core.theme.theme"}),Zt=Ke({kind:"theme",attachTo:{id:"api:app/app-theme",input:"themes"},output:[It],dataRefs:{theme:It},factory:({theme:e})=>[It(e)]}),Nt=Ie().with({id:"core.translation.translation"}),Mt=Ke({kind:"translation",attachTo:{id:"api:app/translations",input:"translations"},output:[Nt],dataRefs:{translation:Nt},factory:({resource:e})=>[Nt(e)]}),Ft=Ie().with({id:"core.swappableComponent"}),Ct=Ke({kind:"component",attachTo:{id:"api:app/swappable-components",input:"components"},output:[Ft],dataRefs:{component:Ft},defineParams:e=>Ge(e),factory:e=>[Ft({ref:e.component.ref,loader:e.loader})]}),Yt="eHgtF5hmbrXyiEvo";function zt(e=Error){const{stack:t}=new e(Yt);if(!t)return"<unknown>";const n=t.includes(Yt)?t.indexOf("\n")+1:0,r=t.indexOf("\n",t.indexOf("\n",n)+1)+1,a=t.indexOf("\n",r),i=t.substring(r,a).trim();return i?i.includes("(")?i.substring(i.indexOf("(")+1,i.indexOf(")")):i.includes("@")?i.substring(i.indexOf("@")+1):i:"unknown"}const Lt=ze.create({type:"@backstage/RouteRef",versions:["v1"]});function Dt(e){const t=e?.params??[],n=zt();let r;return Lt.createInstance("v1",{T:void 0,getParams:()=>t,getDescription:()=>r||`created at '${n}'`,alias:e?.aliasFor,setId(e){if(!e)throw new Error("RouteRef id must be a non-empty string");if(r&&r!==e)throw new Error(`RouteRef was referenced twice as both '${r}' and '${e}'`);r=e},toString:()=>`routeRef{id=${r},at='${n}'}`})}const Bt=ze.create({type:"@backstage/SubRouteRef",versions:["v1"]}),Ut=/^\w+$/;function Vt(e){const{path:t,parent:n}=e,r=Lt.toInternal(n),a=r.getParams(),i=r.getDescription(),o=t.split("/").filter(e=>e.startsWith(":")).map(e=>e.substring(1)),s=[...a,...o];if(a.some(e=>o.includes(e)))throw new Error("SubRouteRef may not have params that overlap with its parent");if(!t.startsWith("/"))throw new Error(`SubRouteRef path must start with '/', got '${t}'`);if(t.endsWith("/"))throw new Error(`SubRouteRef path must not end with '/', got '${t}'`);for(const e of o)if(!Ut.test(e))throw new Error(`SubRouteRef path has invalid param, got '${e}'`);return Bt.createInstance("v1",{T:void 0,path:t,getParams:()=>s,getParent:()=>n,getDescription:()=>`at ${t} with parent ${i}`,toString:()=>`subRouteRef{path='${t}',parent=${n}}`})}const qt=ze.create({type:"@backstage/ExternalRouteRef",versions:["v1"]});function Gt(e){const t=e?.params??[],n=zt();let r;return qt.createInstance("v1",{T:void 0,getParams:()=>t,getDescription:()=>r||`created at '${n}'`,getDefaultTarget:()=>e?.defaultTarget,setId(e){if(!e)throw new Error("ExternalRouteRef id must be a non-empty string");if(r&&r!==e)throw new Error(`ExternalRouteRef was referenced twice as both '${r}' and '${e}'`);r=e},toString:()=>`externalRouteRef{id=${r},at='${n}'}`})}var Wt=n(49634);function Ht(e){const{pathname:t}=(0,Wt.useLocation)(),n=d(q);return(0,i.useMemo)(()=>n.resolve(e,{sourcePath:t}),[n,e,t])}function Kt(e){return(0,Wt.useParams)()}function Xt(e){return{$$type:"@backstage/TranslationMessages",id:e.ref.id,full:Boolean(e.full),messages:e.messages}}function Jt(e){return{$$type:"@backstage/TranslationResource",version:"v1",id:e.ref.id,resources:Object.entries(e.translations).map(([e,t])=>({language:e,loader:()=>t().then(e=>{const t=e.default;return{messages:"@backstage/TranslationMessages"===t?.$$type?t.messages:t}})}))}}class Qt{#i;#o;#s;constructor(e){this.#i=e.id,this.#o=function(e){const t=new Array;return function e(n,r){for(const[a,i]of Object.entries(n))"string"==typeof i?t.push([r+a,i]):e(i,`${r}${a}.`)}(e,""),Object.fromEntries(t)}(e.messages)}$$type="@backstage/TranslationRef";version="v1";get id(){return this.#i}get T(){throw new Error("Not implemented")}getDefaultMessages(){return this.#o}setDefaultResource(e){this.#s=e}getDefaultResource(){return this.#s}toString(){return`TranslationRef{id=${this.id}}`}}function en(e){const t=new Qt(e);return e.translations&&t.setDefaultResource(Jt({ref:t,translations:e.translations})),t}const tn=new WeakSet,nn=e=>{const t=d(C),n=d(W),[r,a]=(0,i.useState)(()=>n.getTranslation(e)),o=(0,i.useMemo)(()=>n.translation$(e),[n,e]),s=(0,i.useCallback)(n=>{if(!tn.has(e)){const r=`Failed to load translation resource '${e.id}'; caused by ${n}`;console.error(r),t.post(new Error(r)),tn.add(e)}},[t,e]);(0,i.useEffect)(()=>{const e=o.subscribe({next(e){e.ready&&a(e)},error(e){s(e)}});return()=>{e.unsubscribe()}},[o,s]);const c=(0,i.useRef)(!0);if((0,i.useEffect)(()=>{c.current?c.current=!1:a(n.getTranslation(e))},[n,e]),!r.ready)throw new Promise(e=>{const t=o.subscribe({next(n){n.ready&&(t.unsubscribe(),e())},error(n){t.unsubscribe(),s(n),e()}})});return{t:r.t}};function rn(e,t){const n={extensionData:e,config:{singleton:Boolean(t?.singleton),optional:Boolean(t?.optional)},replaces:t?.replaces};return function e(t){return De.createInstance(void 0,{...n,context:t,withContext:e})}()}function an(e,t,n){const r=n&&t?`${t}/${n}`:t||n;if(!r)throw new Error(`Extension must declare an explicit namespace or name as it could not be resolved from context, kind=${e} namespace=${t} name=${n}`);return e?`${e}:${r}`:r}function on(e,t){const n=e=>{if(De.isType(e)){const{context:n}=De.toInternal(e);if(!n)throw new Error("Invalid input object without a parent extension used as attachment point");return{id:an(n.kind,t,n.name),input:n.input}}if("relative"in e&&e.relative)return{id:an(e.relative.kind,t,e.relative.name),input:e.input};if("id"in e)return{id:e.id,input:e.input};throw new Error("Invalid attachment point specification")};return Array.isArray(e)?e.map(n):n(e)}function sn(e,t){const n=Le.toInternal(e),{name:r,kind:a,namespace:i,override:o,attachTo:s,...c}=n,u=i??t?.namespace,p=an(a,u,r);return{...c,attachTo:on(s,u),$$type:"@backstage/Extension",version:n.version,id:p,toString:()=>`Extension{id=${p}}`}}const cn=ze.create({type:"@backstage/FrontendPlugin",versions:["v1"]});function un(e){const t=e.pluginId,n=new Array,r=new Map;for(const a of e.extensions??[]){const e=Le.toInternal(a),i=sn(a,{namespace:t});n.push(i),r.set(i.id,{...e,namespace:t})}if(n.length!==r.size){const e=n.map(e=>e.id),r=Array.from(new Set(e.filter((t,n)=>e.indexOf(t)!==n)));throw new Error(`Plugin '${t}' provided duplicate extensions: ${r.join(", ")}`)}return cn.createInstance("v1",{id:t,routes:e.routes??{},externalRoutes:e.externalRoutes??{},featureFlags:e.featureFlags??[],extensions:n,infoOptions:e.info,async info(){throw new Error(`Attempted to load plugin info for plugin '${t}', but the plugin instance is not installed in an app`)},getExtension(e){const n=r.get(e);if(!n)throw new Error(`Attempted to get non-existent extension '${e}' from plugin '${t}'`);return n},toString:()=>`Plugin{id=${t}}`,withOverrides(n){const r=new Set(n.extensions.map(e=>sn(e,{namespace:t}).id)),a=(e.extensions??[]).filter(e=>!r.has(sn(e,{namespace:t}).id));return un({...e,pluginId:t,extensions:[...a,...n.extensions],info:{...e.info,...n.info}})}})}function pn(e){const{pluginId:t}=e,n=new Array,r=new Map;for(const a of e.extensions??[]){const e=Le.toInternal(a),i=sn(a,{namespace:t});n.push(i),r.set(i.id,{...e,namespace:t})}if(n.length!==r.size){const e=n.map(e=>e.id),r=Array.from(new Set(e.filter((t,n)=>e.indexOf(t)!==n)));throw new Error(`Plugin '${t}' provided duplicate extensions: ${r.join(", ")}`)}return{$$type:"@backstage/FrontendModule",version:"v1",pluginId:t,featureFlags:e.featureFlags??[],extensions:n,toString:()=>`Module{pluginId=${t}}`}}function dn(e){const t=`created at '${zt()}'`;return{$$type:"@backstage/FrontendFeatureLoader",version:"v1",description:t,toString:()=>`FeatureLoader{description=${t}}`,async loader(t){const n=await e.loader(t),r=new Array;for await(const e of n)if(ln(e))r.push(e);else{if(!("default"in e))throw new Error(`Invalid item "${e}"`);r.push(e.default)}return r}}}function ln(e){return null!==e&&"object"==typeof e&&"$$type"in e&&("@backstage/FrontendPlugin"===e.$$type||"@backstage/FrontendModule"===e.$$type||"@backstage/FrontendFeatureLoader"===e.$$type)}}}]);
|
|
2
|
-
//# sourceMappingURL=
|
|
1
|
+
"use strict";(self.webpackChunkinternal_plugin_kuadrant=self.webpackChunkinternal_plugin_kuadrant||[]).push([[9738],{19738:(e,t,n)=>{n.r(t),n.d(t,{AnalyticsContext:()=>c,AnalyticsImplementationBlueprint:()=>Je,ApiBlueprint:()=>et,AppRootElementBlueprint:()=>rt,AppRootWrapperBlueprint:()=>it,ErrorDisplay:()=>yt,ExtensionBoundary:()=>Pt,FeatureFlagState:()=>Y,IconBundleBlueprint:()=>st,NavContentBlueprint:()=>ut,NavItemBlueprint:()=>dt,NotFoundErrorPage:()=>gt,PageBlueprint:()=>Tt,Progress:()=>ht,RouterBlueprint:()=>jt,SessionState:()=>w,SignInPageBlueprint:()=>_t,SwappableComponentBlueprint:()=>Ct,ThemeBlueprint:()=>Zt,TranslationBlueprint:()=>Mt,alertApiRef:()=>_,analyticsApiRef:()=>h,appLanguageApiRef:()=>I,appThemeApiRef:()=>Z,appTreeApiRef:()=>b,atlassianAuthApiRef:()=>S,bitbucketAuthApiRef:()=>E,bitbucketServerAuthApiRef:()=>T,configApiRef:()=>M,coreExtensionData:()=>nt,createApiFactory:()=>H,createApiRef:()=>m,createExtension:()=>Ve,createExtensionBlueprint:()=>Ke,createExtensionBlueprintParams:()=>Ge,createExtensionDataRef:()=>Ie,createExtensionInput:()=>rn,createExternalRouteRef:()=>Gt,createFrontendFeatureLoader:()=>dn,createFrontendModule:()=>pn,createFrontendPlugin:()=>un,createRouteRef:()=>Dt,createSubRouteRef:()=>Vt,createSwappableComponent:()=>mt,createTranslationMessages:()=>Xt,createTranslationRef:()=>en,createTranslationResource:()=>Jt,dialogApiRef:()=>U,discoveryApiRef:()=>F,errorApiRef:()=>C,featureFlagsApiRef:()=>z,fetchApiRef:()=>L,githubAuthApiRef:()=>x,gitlabAuthApiRef:()=>R,googleAuthApiRef:()=>k,iconsApiRef:()=>D,identityApiRef:()=>B,microsoftAuthApiRef:()=>$,oauthRequestApiRef:()=>V,oktaAuthApiRef:()=>A,oneloginAuthApiRef:()=>P,openshiftAuthApiRef:()=>O,routeResolutionApiRef:()=>q,storageApiRef:()=>G,swappableComponentsApiRef:()=>N,translationApiRef:()=>W,useAnalytics:()=>v,useApi:()=>d,useApiHolder:()=>p,useAppNode:()=>Rt,useRouteRef:()=>Ht,useRouteRefParams:()=>Kt,useTranslationRef:()=>nn,vmwareCloudAuthApiRef:()=>j,withApis:()=>l});var r=n(31085),a=n(15427),i=n(95478);const o=(0,a.createVersionedContext)("analytics-context"),s=()=>{const e=(0,i.useContext)(o);if(void 0===e)return{pluginId:"app",extensionId:"app"};const t=e.atVersion(1);if(void 0===t)throw new Error("No context found for version 1.");return t},c=e=>{const{attributes:t,children:n}=e,i={...s(),...t},c=(0,a.createVersionedValueMap)({1:i});return(0,r.jsx)(o.Provider,{value:c,children:n})};var u=n(57556);function p(){const e=(0,a.useVersionedContext)("api-context");if(!e)throw new u.EH("API context is not available");const t=e.atVersion(1);if(!t)throw new u.EH("ApiContext v1 not available");return t}function d(e){const t=p().get(e);if(!t)throw new u.EH(`No implementation available for ${e}`);return t}function l(e){return function(t){const n=n=>{const a=p(),i={};for(const t in e)if(e.hasOwnProperty(t)){const n=e[t],r=a.get(n);if(!r)throw new u.EH(`No implementation available for ${n}`);i[t]=r}return(0,r.jsx)(t,{...n,...i})},a=t.displayName||t.name||"Component";return n.displayName=`withApis(${a})`,n}}class f{constructor(e){if(this.config=e,!e.id.split(".").flatMap(e=>e.split("-")).every(e=>e.match(/^[a-z][a-z0-9]*$/)))throw new Error(`API id must only contain period separated lowercase alphanum tokens with dashes, got '${e.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 m(e){return new f(e)}const h=m({id:"core.analytics"}),g=(0,a.getOrCreateGlobalSingleton)("core-plugin-api:analytics-tracker-events",()=>({mostRecentGatheredNavigation:void 0,mostRecentRoutableExtensionRender:void 0,beforeUnloadRegistered:!1}));class y{analyticsApi;context;constructor(e,t={pluginId:"root",extensionId:"App"}){this.analyticsApi=e,this.context=t,g.beforeUnloadRegistered||(addEventListener("beforeunload",()=>{g.mostRecentGatheredNavigation&&(this.analyticsApi.captureEvent({...g.mostRecentGatheredNavigation,...g.mostRecentRoutableExtensionRender}),g.mostRecentGatheredNavigation=void 0,g.mostRecentRoutableExtensionRender=void 0)},{once:!0,passive:!0}),g.beforeUnloadRegistered=!0)}setContext(e){this.context=e}captureEvent(e,t,{value:n,attributes:r}={}){const a=this.context;if("_ROUTABLE-EXTENSION-RENDERED"!==e){if(g.mostRecentGatheredNavigation){try{this.analyticsApi.captureEvent({...g.mostRecentGatheredNavigation,...g.mostRecentRoutableExtensionRender})}catch(e){console.warn("Error during analytics event capture. %o",e)}g.mostRecentGatheredNavigation=void 0,g.mostRecentRoutableExtensionRender=void 0}if("navigate"!==e||"root"!==a.pluginId)try{this.analyticsApi.captureEvent({action:e,subject:t,value:n,attributes:r,context:a})}catch(e){console.warn("Error during analytics event capture. %o",e)}else g.mostRecentGatheredNavigation={action:e,subject:t,value:n,attributes:r,context:a}}else g.mostRecentGatheredNavigation&&(g.mostRecentRoutableExtensionRender={context:{...a,extensionId:"App"}})}}function v(){const e=(0,i.useRef)(null),t=s(),n=function(){try{return d(h)}catch(e){if("NotImplementedError"===e.name)return{captureEvent:()=>{}};throw e}}(),r=(null===e.current&&(e.current=new y(n)),e.current);return r.setContext(t),r}const b=m({id:"core.app-tree"}),w={SignedIn:"SignedIn",SignedOut:"SignedOut"},k=m({id:"core.auth.google"}),x=m({id:"core.auth.github"}),A=m({id:"core.auth.okta"}),R=m({id:"core.auth.gitlab"}),$=m({id:"core.auth.microsoft"}),P=m({id:"core.auth.onelogin"}),E=m({id:"core.auth.bitbucket"}),T=m({id:"core.auth.bitbucket-server"}),S=m({id:"core.auth.atlassian"}),j=m({id:"core.auth.vmware-cloud"}),O=m({id:"core.auth.openshift"}),_=m({id:"core.alert"}),I=m({id:"core.applanguage"}),Z=m({id:"core.apptheme"}),N=m({id:"core.swappable-components"}),M=m({id:"core.config"}),F=m({id:"core.discovery"}),C=m({id:"core.error"}),Y={None:0,Active:1},z=m({id:"core.featureflags"}),L=m({id:"core.fetch"}),D=m({id:"core.icons"}),B=m({id:"core.identity"}),U=m({id:"core.dialog"}),V=m({id:"core.oauthrequest"}),q=m({id:"core.route-resolution"}),G=m({id:"core.storage"}),W=m({id:"core.translation"});function H(e,t){return"id"in e?{api:e,deps:{},factory:()=>t}:e}const K=Symbol("Let zodToJsonSchema decide on which parser to use"),X={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",target:"jsonSchema7",strictUnions:!1,definitions:{},errorMessages:!1,markdownDescription:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref",openAiAnyTypeName:"OpenAiAnyType"};var J=n(53215);const Q=(e,t)=>{let n=0;for(;n<e.length&&n<t.length&&e[n]===t[n];n++);return[(e.length-n).toString(),...t.slice(n)].join("/")};function ee(e){if("openAi"!==e.target)return{};const t=[...e.basePath,e.definitionPath,e.openAiAnyTypeName];return e.flags.hasReferencedOpenAiAnyType=!0,{$ref:"relative"===e.$refStrategy?Q(t,e.currentPath):t.join("/")}}function te(e,t,n,r){r?.errorMessages&&n&&(e.errorMessage={...e.errorMessage,[t]:n})}function ne(e,t,n,r,a){e[t]=n,te(e,t,r,a)}function re(e,t){return Se(e.type._def,t)}function ae(e,t,n){const r=n??t.dateStrategy;if(Array.isArray(r))return{anyOf:r.map((n,r)=>ae(e,t,n))};switch(r){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return ie(e,t)}}const ie=(e,t)=>{const n={type:"integer",format:"unix-time"};if("openApi3"===t.target)return n;for(const r of e.checks)switch(r.kind){case"min":ne(n,"minimum",r.value,r.message,t);break;case"max":ne(n,"maximum",r.value,r.message,t)}return n};let oe;const se=/^[cC][^\s-]{8,}$/,ce=/^[0-9a-z]+$/,ue=/^[0-9A-HJKMNP-TV-Z]{26}$/,pe=/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,de=()=>(void 0===oe&&(oe=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),oe),le=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,fe=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,me=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,he=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,ge=/^[a-zA-Z0-9_-]{21}$/,ye=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/;function ve(e,t){const n={type:"string"};if(e.checks)for(const r of e.checks)switch(r.kind){case"min":ne(n,"minLength","number"==typeof n.minLength?Math.max(n.minLength,r.value):r.value,r.message,t);break;case"max":ne(n,"maxLength","number"==typeof n.maxLength?Math.min(n.maxLength,r.value):r.value,r.message,t);break;case"email":switch(t.emailStrategy){case"format:email":ke(n,"email",r.message,t);break;case"format:idn-email":ke(n,"idn-email",r.message,t);break;case"pattern:zod":xe(n,pe,r.message,t)}break;case"url":ke(n,"uri",r.message,t);break;case"uuid":ke(n,"uuid",r.message,t);break;case"regex":xe(n,r.regex,r.message,t);break;case"cuid":xe(n,se,r.message,t);break;case"cuid2":xe(n,ce,r.message,t);break;case"startsWith":xe(n,RegExp(`^${be(r.value,t)}`),r.message,t);break;case"endsWith":xe(n,RegExp(`${be(r.value,t)}$`),r.message,t);break;case"datetime":ke(n,"date-time",r.message,t);break;case"date":ke(n,"date",r.message,t);break;case"time":ke(n,"time",r.message,t);break;case"duration":ke(n,"duration",r.message,t);break;case"length":ne(n,"minLength","number"==typeof n.minLength?Math.max(n.minLength,r.value):r.value,r.message,t),ne(n,"maxLength","number"==typeof n.maxLength?Math.min(n.maxLength,r.value):r.value,r.message,t);break;case"includes":xe(n,RegExp(be(r.value,t)),r.message,t);break;case"ip":"v6"!==r.version&&ke(n,"ipv4",r.message,t),"v4"!==r.version&&ke(n,"ipv6",r.message,t);break;case"base64url":xe(n,he,r.message,t);break;case"jwt":xe(n,ye,r.message,t);break;case"cidr":"v6"!==r.version&&xe(n,le,r.message,t),"v4"!==r.version&&xe(n,fe,r.message,t);break;case"emoji":xe(n,de(),r.message,t);break;case"ulid":xe(n,ue,r.message,t);break;case"base64":switch(t.base64Strategy){case"format:binary":ke(n,"binary",r.message,t);break;case"contentEncoding:base64":ne(n,"contentEncoding","base64",r.message,t);break;case"pattern:zod":xe(n,me,r.message,t)}break;case"nanoid":xe(n,ge,r.message,t);case"toLowerCase":case"toUpperCase":case"trim":break;default:(()=>{})()}return n}function be(e,t){return"escape"===t.patternStrategy?function(e){let t="";for(let n=0;n<e.length;n++)we.has(e[n])||(t+="\\"),t+=e[n];return t}(e):e}const we=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function ke(e,t,n,r){e.format||e.anyOf?.some(e=>e.format)?(e.anyOf||(e.anyOf=[]),e.format&&(e.anyOf.push({format:e.format,...e.errorMessage&&r.errorMessages&&{errorMessage:{format:e.errorMessage.format}}}),delete e.format,e.errorMessage&&(delete e.errorMessage.format,0===Object.keys(e.errorMessage).length&&delete e.errorMessage)),e.anyOf.push({format:t,...n&&r.errorMessages&&{errorMessage:{format:n}}})):ne(e,"format",t,n,r)}function xe(e,t,n,r){e.pattern||e.allOf?.some(e=>e.pattern)?(e.allOf||(e.allOf=[]),e.pattern&&(e.allOf.push({pattern:e.pattern,...e.errorMessage&&r.errorMessages&&{errorMessage:{pattern:e.errorMessage.pattern}}}),delete e.pattern,e.errorMessage&&(delete e.errorMessage.pattern,0===Object.keys(e.errorMessage).length&&delete e.errorMessage)),e.allOf.push({pattern:Ae(t,r),...n&&r.errorMessages&&{errorMessage:{pattern:n}}})):ne(e,"pattern",Ae(t,r),n,r)}function Ae(e,t){if(!t.applyRegexFlags||!e.flags)return e.source;const n=e.flags.includes("i"),r=e.flags.includes("m"),a=e.flags.includes("s"),i=n?e.source.toLowerCase():e.source;let o="",s=!1,c=!1,u=!1;for(let e=0;e<i.length;e++)if(s)o+=i[e],s=!1;else{if(n)if(c){if(i[e].match(/[a-z]/)){u?(o+=i[e],o+=`${i[e-2]}-${i[e]}`.toUpperCase(),u=!1):"-"===i[e+1]&&i[e+2]?.match(/[a-z]/)?(o+=i[e],u=!0):o+=`${i[e]}${i[e].toUpperCase()}`;continue}}else if(i[e].match(/[a-z]/)){o+=`[${i[e]}${i[e].toUpperCase()}]`;continue}if(r){if("^"===i[e]){o+="(^|(?<=[\r\n]))";continue}if("$"===i[e]){o+="($|(?=[\r\n]))";continue}}a&&"."===i[e]?o+=c?`${i[e]}\r\n`:`[${i[e]}\r\n]`:(o+=i[e],"\\"===i[e]?s=!0:c&&"]"===i[e]?c=!1:c||"["!==i[e]||(c=!0))}try{new RegExp(o)}catch{return console.warn(`Could not convert regex pattern at ${t.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),e.source}return o}function Re(e,t){if("openAi"===t.target&&console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead."),"openApi3"===t.target&&e.keyType?._def.typeName===J.kY.ZodEnum)return{type:"object",required:e.keyType._def.values,properties:e.keyType._def.values.reduce((n,r)=>({...n,[r]:Se(e.valueType._def,{...t,currentPath:[...t.currentPath,"properties",r]})??ee(t)}),{}),additionalProperties:t.rejectedAdditionalProperties};const n={type:"object",additionalProperties:Se(e.valueType._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]})??t.allowedAdditionalProperties};if("openApi3"===t.target)return n;if(e.keyType?._def.typeName===J.kY.ZodString&&e.keyType._def.checks?.length){const{type:r,...a}=ve(e.keyType._def,t);return{...n,propertyNames:a}}if(e.keyType?._def.typeName===J.kY.ZodEnum)return{...n,propertyNames:{enum:e.keyType._def.values}};if(e.keyType?._def.typeName===J.kY.ZodBranded&&e.keyType._def.type._def.typeName===J.kY.ZodString&&e.keyType._def.type._def.checks?.length){const{type:r,...a}=re(e.keyType._def,t);return{...n,propertyNames:a}}return n}const $e={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"},Pe=(e,t)=>{const n=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((e,n)=>Se(e._def,{...t,currentPath:[...t.currentPath,"anyOf",`${n}`]})).filter(e=>!!e&&(!t.strictUnions||"object"==typeof e&&Object.keys(e).length>0));return n.length?{anyOf:n}:void 0};function Ee(e){try{return e.isOptional()}catch{return!0}}const Te=(e,t,n)=>{switch(t){case J.kY.ZodString:return ve(e,n);case J.kY.ZodNumber:return function(e,t){const n={type:"number"};if(!e.checks)return n;for(const r of e.checks)switch(r.kind){case"int":n.type="integer",te(n,"type",r.message,t);break;case"min":"jsonSchema7"===t.target?r.inclusive?ne(n,"minimum",r.value,r.message,t):ne(n,"exclusiveMinimum",r.value,r.message,t):(r.inclusive||(n.exclusiveMinimum=!0),ne(n,"minimum",r.value,r.message,t));break;case"max":"jsonSchema7"===t.target?r.inclusive?ne(n,"maximum",r.value,r.message,t):ne(n,"exclusiveMaximum",r.value,r.message,t):(r.inclusive||(n.exclusiveMaximum=!0),ne(n,"maximum",r.value,r.message,t));break;case"multipleOf":ne(n,"multipleOf",r.value,r.message,t)}return n}(e,n);case J.kY.ZodObject:return function(e,t){const n="openAi"===t.target,r={type:"object",properties:{}},a=[],i=e.shape();for(const e in i){let o=i[e];if(void 0===o||void 0===o._def)continue;let s=Ee(o);s&&n&&("ZodOptional"===o._def.typeName&&(o=o._def.innerType),o.isNullable()||(o=o.nullable()),s=!1);const c=Se(o._def,{...t,currentPath:[...t.currentPath,"properties",e],propertyPath:[...t.currentPath,"properties",e]});void 0!==c&&(r.properties[e]=c,s||a.push(e))}a.length&&(r.required=a);const o=function(e,t){if("ZodNever"!==e.catchall._def.typeName)return Se(e.catchall._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]});switch(e.unknownKeys){case"passthrough":return t.allowedAdditionalProperties;case"strict":return t.rejectedAdditionalProperties;case"strip":return"strict"===t.removeAdditionalStrategy?t.allowedAdditionalProperties:t.rejectedAdditionalProperties}}(e,t);return void 0!==o&&(r.additionalProperties=o),r}(e,n);case J.kY.ZodBigInt:return function(e,t){const n={type:"integer",format:"int64"};if(!e.checks)return n;for(const r of e.checks)switch(r.kind){case"min":"jsonSchema7"===t.target?r.inclusive?ne(n,"minimum",r.value,r.message,t):ne(n,"exclusiveMinimum",r.value,r.message,t):(r.inclusive||(n.exclusiveMinimum=!0),ne(n,"minimum",r.value,r.message,t));break;case"max":"jsonSchema7"===t.target?r.inclusive?ne(n,"maximum",r.value,r.message,t):ne(n,"exclusiveMaximum",r.value,r.message,t):(r.inclusive||(n.exclusiveMaximum=!0),ne(n,"maximum",r.value,r.message,t));break;case"multipleOf":ne(n,"multipleOf",r.value,r.message,t)}return n}(e,n);case J.kY.ZodBoolean:return{type:"boolean"};case J.kY.ZodDate:return ae(e,n);case J.kY.ZodUndefined:return function(e){return{not:ee(e)}}(n);case J.kY.ZodNull:return function(e){return"openApi3"===e.target?{enum:["null"],nullable:!0}:{type:"null"}}(n);case J.kY.ZodArray:return function(e,t){const n={type:"array"};return e.type?._def&&e.type?._def?.typeName!==J.kY.ZodAny&&(n.items=Se(e.type._def,{...t,currentPath:[...t.currentPath,"items"]})),e.minLength&&ne(n,"minItems",e.minLength.value,e.minLength.message,t),e.maxLength&&ne(n,"maxItems",e.maxLength.value,e.maxLength.message,t),e.exactLength&&(ne(n,"minItems",e.exactLength.value,e.exactLength.message,t),ne(n,"maxItems",e.exactLength.value,e.exactLength.message,t)),n}(e,n);case J.kY.ZodUnion:case J.kY.ZodDiscriminatedUnion:return function(e,t){if("openApi3"===t.target)return Pe(e,t);const n=e.options instanceof Map?Array.from(e.options.values()):e.options;if(n.every(e=>e._def.typeName in $e&&(!e._def.checks||!e._def.checks.length))){const e=n.reduce((e,t)=>{const n=$e[t._def.typeName];return n&&!e.includes(n)?[...e,n]:e},[]);return{type:e.length>1?e:e[0]}}if(n.every(e=>"ZodLiteral"===e._def.typeName&&!e.description)){const e=n.reduce((e,t)=>{const n=typeof t._def.value;switch(n){case"string":case"number":case"boolean":return[...e,n];case"bigint":return[...e,"integer"];case"object":if(null===t._def.value)return[...e,"null"];default:return e}},[]);if(e.length===n.length){const t=e.filter((e,t,n)=>n.indexOf(e)===t);return{type:t.length>1?t:t[0],enum:n.reduce((e,t)=>e.includes(t._def.value)?e:[...e,t._def.value],[])}}}else if(n.every(e=>"ZodEnum"===e._def.typeName))return{type:"string",enum:n.reduce((e,t)=>[...e,...t._def.values.filter(t=>!e.includes(t))],[])};return Pe(e,t)}(e,n);case J.kY.ZodIntersection:return function(e,t){const n=[Se(e.left._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),Se(e.right._def,{...t,currentPath:[...t.currentPath,"allOf","1"]})].filter(e=>!!e);let r="jsonSchema2019-09"===t.target?{unevaluatedProperties:!1}:void 0;const a=[];return n.forEach(e=>{if("type"in(t=e)&&"string"===t.type||!("allOf"in t)){let t=e;if("additionalProperties"in e&&!1===e.additionalProperties){const{additionalProperties:n,...r}=e;t=r}else r=void 0;a.push(t)}else a.push(...e.allOf),void 0===e.unevaluatedProperties&&(r=void 0);var t}),a.length?{allOf:a,...r}:void 0}(e,n);case J.kY.ZodTuple:return function(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map((e,n)=>Se(e._def,{...t,currentPath:[...t.currentPath,"items",`${n}`]})).reduce((e,t)=>void 0===t?e:[...e,t],[]),additionalItems:Se(e.rest._def,{...t,currentPath:[...t.currentPath,"additionalItems"]})}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map((e,n)=>Se(e._def,{...t,currentPath:[...t.currentPath,"items",`${n}`]})).reduce((e,t)=>void 0===t?e:[...e,t],[])}}(e,n);case J.kY.ZodRecord:return Re(e,n);case J.kY.ZodLiteral:return function(e,t){const n=typeof e.value;return"bigint"!==n&&"number"!==n&&"boolean"!==n&&"string"!==n?{type:Array.isArray(e.value)?"array":"object"}:"openApi3"===t.target?{type:"bigint"===n?"integer":n,enum:[e.value]}:{type:"bigint"===n?"integer":n,const:e.value}}(e,n);case J.kY.ZodEnum:return function(e){return{type:"string",enum:Array.from(e.values)}}(e);case J.kY.ZodNativeEnum:return function(e){const t=e.values,n=Object.keys(e.values).filter(e=>"number"!=typeof t[t[e]]).map(e=>t[e]),r=Array.from(new Set(n.map(e=>typeof e)));return{type:1===r.length?"string"===r[0]?"string":"number":["string","number"],enum:n}}(e);case J.kY.ZodNullable:return function(e,t){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return"openApi3"===t.target?{type:$e[e.innerType._def.typeName],nullable:!0}:{type:[$e[e.innerType._def.typeName],"null"]};if("openApi3"===t.target){const n=Se(e.innerType._def,{...t,currentPath:[...t.currentPath]});return n&&"$ref"in n?{allOf:[n],nullable:!0}:n&&{...n,nullable:!0}}const n=Se(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","0"]});return n&&{anyOf:[n,{type:"null"}]}}(e,n);case J.kY.ZodOptional:return((e,t)=>{if(t.currentPath.toString()===t.propertyPath?.toString())return Se(e.innerType._def,t);const n=Se(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","1"]});return n?{anyOf:[{not:ee(t)},n]}:ee(t)})(e,n);case J.kY.ZodMap:return function(e,t){return"record"===t.mapStrategy?Re(e,t):{type:"array",maxItems:125,items:{type:"array",items:[Se(e.keyType._def,{...t,currentPath:[...t.currentPath,"items","items","0"]})||ee(t),Se(e.valueType._def,{...t,currentPath:[...t.currentPath,"items","items","1"]})||ee(t)],minItems:2,maxItems:2}}}(e,n);case J.kY.ZodSet:return function(e,t){const n={type:"array",uniqueItems:!0,items:Se(e.valueType._def,{...t,currentPath:[...t.currentPath,"items"]})};return e.minSize&&ne(n,"minItems",e.minSize.value,e.minSize.message,t),e.maxSize&&ne(n,"maxItems",e.maxSize.value,e.maxSize.message,t),n}(e,n);case J.kY.ZodLazy:return()=>e.getter()._def;case J.kY.ZodPromise:return function(e,t){return Se(e.type._def,t)}(e,n);case J.kY.ZodNaN:case J.kY.ZodNever:return function(e){return"openAi"===e.target?void 0:{not:ee({...e,currentPath:[...e.currentPath,"not"]})}}(n);case J.kY.ZodEffects:return function(e,t){return"input"===t.effectStrategy?Se(e.schema._def,t):ee(t)}(e,n);case J.kY.ZodAny:return ee(n);case J.kY.ZodUnknown:return function(e){return ee(e)}(n);case J.kY.ZodDefault:return function(e,t){return{...Se(e.innerType._def,t),default:e.defaultValue()}}(e,n);case J.kY.ZodBranded:return re(e,n);case J.kY.ZodReadonly:case J.kY.ZodCatch:return((e,t)=>Se(e.innerType._def,t))(e,n);case J.kY.ZodPipeline:return((e,t)=>{if("input"===t.pipeStrategy)return Se(e.in._def,t);if("output"===t.pipeStrategy)return Se(e.out._def,t);const n=Se(e.in._def,{...t,currentPath:[...t.currentPath,"allOf","0"]});return{allOf:[n,Se(e.out._def,{...t,currentPath:[...t.currentPath,"allOf",n?"1":"0"]})].filter(e=>void 0!==e)}})(e,n);case J.kY.ZodFunction:case J.kY.ZodVoid:case J.kY.ZodSymbol:default:return}};function Se(e,t,n=!1){const r=t.seen.get(e);if(t.override){const a=t.override?.(e,t,r,n);if(a!==K)return a}if(r&&!n){const e=je(r,t);if(void 0!==e)return e}const a={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,a);const i=Te(e,e.typeName,t),o="function"==typeof i?Se(i(),t):i;if(o&&Oe(e,t,o),t.postProcess){const n=t.postProcess(o,e,t);return a.jsonSchema=o,n}return a.jsonSchema=o,o}const je=(e,t)=>{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:Q(t.currentPath,e.path)};case"none":case"seen":return e.path.length<t.currentPath.length&&e.path.every((e,n)=>t.currentPath[n]===e)?(console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`),ee(t)):"seen"===t.$refStrategy?ee(t):void 0}},Oe=(e,t,n)=>(e.description&&(n.description=e.description,t.markdownDescription&&(n.markdownDescription=e.description)),n),_e=(e,t)=>{const n=(e=>{const t=(e=>"string"==typeof e?{...X,name:e}:{...X,...e})(e),n=void 0!==t.name?[...t.basePath,t.definitionPath,t.name]:t.basePath;return{...t,flags:{hasReferencedOpenAiAnyType:!1},currentPath:n,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map(([e,n])=>[n._def,{def:n._def,path:[...t.basePath,t.definitionPath,e],jsonSchema:void 0}]))}})(t);let r="object"==typeof t&&t.definitions?Object.entries(t.definitions).reduce((e,[t,r])=>({...e,[t]:Se(r._def,{...n,currentPath:[...n.basePath,n.definitionPath,t]},!0)??ee(n)}),{}):void 0;const a="string"==typeof t?t:"title"===t?.nameStrategy?void 0:t?.name,i=Se(e._def,void 0===a?n:{...n,currentPath:[...n.basePath,n.definitionPath,a]},!1)??ee(n),o="object"==typeof t&&void 0!==t.name&&"title"===t.nameStrategy?t.name:void 0;void 0!==o&&(i.title=o),n.flags.hasReferencedOpenAiAnyType&&(r||(r={}),r[n.openAiAnyTypeName]||(r[n.openAiAnyTypeName]={type:["string","number","integer","boolean","array","null"],items:{$ref:"relative"===n.$refStrategy?"1":[...n.basePath,n.definitionPath,n.openAiAnyTypeName].join("/")}}));const s=void 0===a?r?{...i,[n.definitionPath]:r}:i:{$ref:[..."relative"===n.$refStrategy?[]:n.basePath,n.definitionPath,a].join("/"),[n.definitionPath]:{...r,[a]:i}};return"jsonSchema7"===n.target?s.$schema="http://json-schema.org/draft-07/schema#":"jsonSchema2019-09"!==n.target&&"openAi"!==n.target||(s.$schema="https://json-schema.org/draft/2019-09/schema#"),"openAi"===n.target&&("anyOf"in s||"oneOf"in s||"allOf"in s||"type"in s&&Array.isArray(s.type))&&console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property."),s};function Ie(){const e=e=>Object.assign(t=>({$$type:"@backstage/ExtensionDataValue",id:e,value:t}),{id:e,$$type:"@backstage/ExtensionDataRef",config:{},optional(){return{...this,config:{...this.config,optional:!0}}},toString(){const t=Boolean(this.config.optional);return`ExtensionDataRef{id=${e},optional=${t}}`}});return{with:t=>e(t.id)}}function Ze(e,t,n){if("object"!=typeof e||!e?.[Symbol.iterator])throw new Error(`${t} did not provide an iterable object`);const r=new Map,a=n&&new Map(n.map(e=>[e.id,e]));for(const t of e){if(a&&!a.delete(t.id))throw new Error(`extension data '${t.id}' was provided but not declared`);r.set(t.id,t)}const i=a&&Array.from(a.values()).filter(e=>!e.config.optional);if(i&&i.length>0)throw new Error(`missing required extension data value(s) '${i.map(e=>e.id).join(", ")}'`);return{get:e=>r.get(e.id)?.value,[Symbol.iterator]:()=>r.values()}}function Ne(e){return e}function Me(e){return e}function Fe(e,t,n){if(!e||!t||!n)return t;const r={};for(const a in e){if(!Object.hasOwn(e,a))continue;const i=e[a],o=n[a];if(i.config.singleton){const e=Me(t[a]);if(o){const t=Ze(o,"extension input override",i.extensionData);if(!e)throw new Error(`attempted to override data of input '${a}' but it is not present in the original inputs`);r[a]=Object.assign(t,{node:e.node})}}else{const e=Ne(t[a]);if(!Array.isArray(o))throw new Error(`override data provided for input '${a}' must be an array`);if(0===o.length)r[a]=[];else{const t=o.filter(e=>"node"in e).length;if(0===t){if(e.length!==o.length)throw new Error(`override data provided for input '${a}' must match the length of the original inputs`);r[a]=o.map((t,n)=>{const r=Ze(t,"extension input override",i.extensionData);return Object.assign(r,{node:e[n].node})})}else{if(t!==o.length)throw new Error(`override data for input '${a}' may not mix forwarded inputs with data overrides`);r[a]=o}}}}return r}var Ce=n(33587);function Ye(e){if("invalid_union"===e.code)return Ye(e.unionErrors[0].issues[0]);let t=e.message;return"Required"===t&&(t="Missing required value"),e.path.length&&(t+=` at '${e.path.join(".")}'`),t}class ze{static create(e){return new ze(e.type,new Set(e.versions))}#e;#t;constructor(e,t){this.#e=e,this.#t=t}TPublic=void 0;TInternal=void 0;isType=e=>this.#n(e);toInternal=e=>{if(!this.#n(e))throw new TypeError(`Invalid opaque type, expected '${this.#e}', but got '${this.#r(e)}'`);if(!this.#t.has(e.version)){const t=Array.from(this.#t).map(this.#a);t.length>1&&(t[t.length-1]=`or ${t[t.length-1]}`);const n=t.length>2?t.join(", "):t.join(" ");throw new TypeError(`Invalid opaque type instance, got version ${this.#a(e.version)}, expected ${n}`)}return e};createInstance(e,t){return Object.assign(t,{$$type:this.#e,...e&&{version:e}})}#n(e){return null!==e&&"object"==typeof e&&e.$$type===this.#e}#r(e){return"object"!=typeof e?`<${typeof e}>`:null===e?"<null>":String("$$type"in e?e.$$type:e)}#a=e=>e?`'${e}'`:"undefined"}const Le=ze.create({type:"@backstage/ExtensionDefinition",versions:["v1","v2"]}),De=ze.create({type:"@backstage/ExtensionInput",versions:[void 0]}),Be=Symbol("params");function Ue(e,t,n){return e?Object.fromEntries(Object.entries(e).map(([e,r])=>[e,De.toInternal(r).withContext?.({kind:t,name:n,input:e})??r])):{}}function Ve(e){const t=e.config?.schema,n=t&&function(){const e=(n=Ce).object(Object.fromEntries(Object.entries(t).map(([e,t])=>[e,t(n)])));var n;return{parse:t=>{const n=e.safeParse(t);if(n.success)return n.data;throw new Error(n.error.issues.map(Ye).join("; "))},schema:_e(e)}}();return Le.createInstance("v2",{T:void 0,kind:e.kind,name:e.name,attachTo:e.attachTo,disabled:e.disabled??!1,inputs:Ue(e.inputs,e.kind,e.name),output:e.output,configSchema:n,factory:e.factory,toString(){const t=[];e.kind&&t.push(`kind=${e.kind}`),e.name&&t.push(`name=${e.name}`);const n=[e.attachTo].flat().map(e=>{const t=e;if(De.isType(t)){const{context:e}=De.toInternal(t);if(!e)return"<detached-input>";let n="<plugin>";return e?.kind&&(n=`${e?.kind}:${n}`),e?.name&&(n=`${n}/${e?.name}`),`${n}@${e.input}`}if("relative"in t&&t.relative){let e="<plugin>";return t.relative.kind&&(e=`${t.relative.kind}:${e}`),t.relative.name&&(e=`${e}/${t.relative.name}`),`${e}@${t.input}`}if("id"in t)return`${t.id}@${t.input}`;throw new Error("Invalid attachment point specification")}).join("+");return t.push(`attachTo=${n}`),`ExtensionDefinition{${t.join(",")}}`},override(t){if(!Array.isArray(e.output))throw new Error("Cannot override an extension that is not declared using the new format with outputs as an array");if(t.output&&!t.factory)throw new Error("Refused to override output without also overriding factory");if(t.params&&t.factory)throw new Error("Refused to override params and factory at the same time");return Ve({kind:e.kind,name:e.name,attachTo:t.attachTo??e.attachTo,disabled:t.disabled??e.disabled,inputs:Ue({...e.inputs??{},...t.inputs??{}},e.kind,e.name),output:t.output??e.output,config:e.config||t.config?{schema:{...e.config?.schema,...t.config?.schema}}:void 0,factory:({node:n,apis:r,config:a,inputs:i})=>{if(!t.factory)return e.factory({node:n,apis:r,config:a,inputs:i,[Be]:t.params});const o=t.factory(t=>Ze(e.factory({node:n,apis:r,config:t?.config??a,inputs:Fe(e.inputs,i,t?.inputs),[Be]:t?.params}),"original extension factory",e.output),{node:n,apis:r,config:a,inputs:i});if("object"!=typeof o||!o?.[Symbol.iterator])throw new Error("extension factory override did not provide an iterable object");const s=new Map;for(const e of o)s.set(e.id,e);return s.values()}})}})}const qe=ze.create({type:"@backstage/BlueprintParams",versions:["v1"]});function Ge(e){return qe.createInstance("v1",{T:null,params:e})}function We(e,t,n){const r=e(t);try{return qe.toInternal(r).params}catch(e){throw new TypeError(`Invalid invocation of blueprint with kind '${n}', the parameter definition callback function did not return a valid parameter definition object; Caused by: ${e.message}`)}}function He(e,t,n,r){const a=t[Be];if(n){if(a){if("function"!=typeof a)throw new TypeError(`Invalid extension override of blueprint with kind '${r}', the override params were passed as a plain object, but this blueprint requires them to be passed in callback form`);return We(a,n,r)}if("function"!=typeof e)throw new TypeError(`Invalid invocation of blueprint with kind '${r}', the parameters where passed as a plain object, but this blueprint requires them to be passed in callback form`);return We(e,n,r)}return{..."function"==typeof e?We(e,Ge,r):e,..."function"==typeof a?We(a,Ge,r):a}}function Ke(e){const t=e.defineParams;return{dataRefs:e.dataRefs,make:n=>Ve({kind:e.kind,name:n.name,attachTo:n.attachTo??e.attachTo,disabled:n.disabled??e.disabled,inputs:e.inputs,output:e.output,config:e.config,factory:r=>e.factory(He(n.params,r,t,e.kind),r)}),makeWithOverrides:n=>Ve({kind:e.kind,name:n.name,attachTo:n.attachTo??e.attachTo,disabled:n.disabled??e.disabled,inputs:{...n.inputs,...e.inputs},output:n.output??e.output,config:e.config||n.config?{schema:{...e.config?.schema,...n.config?.schema}}:void 0,factory:r=>{const{node:a,config:i,inputs:o,apis:s}=r;return n.factory((n,c)=>Ze(e.factory(He(n,r,t,e.kind),{apis:s,node:a,config:c?.config??i,inputs:Fe(e.inputs,o,c?.inputs)}),"original blueprint factory",e.output),{apis:s,node:a,config:i,inputs:o})}})}}const Xe=Ie().with({id:"core.analytics.factory"}),Je=Ke({kind:"analytics",attachTo:[{id:"api:app/analytics",input:"implementations"}],output:[Xe],dataRefs:{factory:Xe},defineParams:e=>Ge(e),*factory(e){yield Xe(e)}}),Qe=Ie().with({id:"core.api.factory"}),et=Ke({kind:"api",attachTo:{id:"root",input:"apis"},output:[Qe],dataRefs:{factory:Qe},defineParams:e=>Ge(e),*factory(e){yield Qe(e)}});var tt=n(75501);const nt={title:Ie().with({id:"core.title"}),reactElement:Ie().with({id:"core.reactElement"}),routePath:Ie().with({id:"core.routing.path"}),routeRef:Ie().with({id:"core.routing.ref"})},rt=Ke({kind:"app-root-element",attachTo:{id:"app/root",input:"elements"},output:[nt.reactElement],*factory(e,{node:t}){yield nt.reactElement((0,r.jsx)(tt.ExtensionBoundary,{node:t,errorPresentation:"error-api",children:e.element}))}}),at=Ie().with({id:"app.root.wrapper"}),it=Ke({kind:"app-root-wrapper",attachTo:{id:"app/root",input:"wrappers"},output:[at],dataRefs:{component:at},*factory(e){yield at(e.component)}}),ot=Ie().with({id:"core.icons"}),st=Ke({kind:"icon-bundle",attachTo:{id:"api:app/icons",input:"icons"},output:[ot],factory:e=>[ot(e.icons)],dataRefs:{icons:ot}}),ct=Ie().with({id:"core.nav-content.component"}),ut=Ke({kind:"nav-content",attachTo:{id:"app/nav",input:"content"},output:[ct],dataRefs:{component:ct},*factory(e){yield ct(e.component)}}),pt=Ie().with({id:"core.nav-item.target"}),dt=Ke({kind:"nav-item",attachTo:{id:"app/nav",input:"items"},output:[pt],dataRefs:{target:pt},factory:({icon:e,routeRef:t,title:n},{config:r})=>[pt({title:r.title??n,icon:e,routeRef:t})],config:{schema:{title:e=>e.string().optional()}}}),lt=ze.create({versions:["v1"],type:"@backstage/SwappableComponentRef"}),ft=()=>{try{return d(N)}catch(e){return}};function mt(e){const t=t=>(0,r.jsx)("div",{"data-testid":e.id,...t}),n=lt.createInstance("v1",{id:e.id,TProps:null,TExternalProps:null,toString:()=>`SwappableComponentRef{id=${e.id}}`,defaultComponent:(0,i.lazy)(async()=>({default:await(e.loader?.())??t})),transformProps:e.transformProps}),a=e=>{const t=ft();if(!t){const t=lt.toInternal(n),a=t.defaultComponent,i=t.transformProps?.(e)??e;return(0,r.jsx)(a,{...i})}const a=t.getComponent(n);return(0,r.jsx)(a,{...e})};return Object.assign(a,{ref:n}),a}const ht=mt({id:"core-progress"}),gt=mt({id:"core-not-found-error-page"}),yt=mt({id:"core-error-display",loader:()=>e=>(0,r.jsx)("div",{"data-testid":"core-error-display",children:e.error.message})});class vt extends i.Component{static getDerivedStateFromError(e){return{error:e}}state={error:void 0};handleErrorReset=()=>{this.setState({error:void 0})};render(){const{error:e}=this.state,{plugin:t,children:n}=this.props;return e?(0,r.jsx)(yt,{plugin:t,error:e,resetError:this.handleErrorReset}):n}}class bt extends i.Component{static getDerivedStateFromError(e){return{error:e}}state={error:void 0};componentDidCatch(e,t){const{node:n,errorApi:r}=this.props;r?.post(new u.HK(`Error in extension '${n.spec.id}'`,e))}render(){return this.state.error?null:this.props.children}}(0,a.getOrCreateGlobalSingleton)("core-plugin-api:analytics-tracker-events",()=>({mostRecentGatheredNavigation:void 0,mostRecentRoutableExtensionRender:void 0,beforeUnloadRegistered:!1}));const wt=(0,tt.createApiRef)({id:"core.plugin-wrapper.alpha"}),kt="app-node-context",xt=(0,a.createVersionedContext)(kt);function At({node:e,children:t}){const n=(0,a.createVersionedValueMap)({1:{node:e}});return(0,r.jsx)(xt.Provider,{value:n,children:t})}function Rt(){const e=(0,a.useVersionedContext)(kt);if(!e)return;const t=e.atVersion(1);if(!t)throw new Error("AppNodeContext v1 not available");return t.node}const $t=e=>{const{enabled:t,children:n}=e,a=v();return(0,i.useEffect)(()=>{t&&a.captureEvent("_ROUTABLE-EXTENSION-RENDERED","")},[a,t]),(0,r.jsx)(r.Fragment,{children:n})};function Pt(e){const{node:t,children:n}=e,a=function(){try{return d(C)}catch{return}}(),o=Boolean(t.instance?.getData(nt.routePath)),s=t.spec.plugin,u=s.id??"app",p=function(){try{return d(wt)}catch{return}}(),l=(0,i.useMemo)(()=>p?.getPluginWrapper(u),[p,u]),f={extensionId:t.spec.id,pluginId:u};let m=(0,r.jsx)(c,{attributes:f,children:(0,r.jsx)($t,{enabled:o,children:n})});return l&&(m=(0,r.jsx)(l,{children:m})),m="error-api"===e.errorPresentation?(0,r.jsx)(bt,{node:t,errorApi:a,children:m}):(0,r.jsx)(vt,{plugin:s,children:m}),(0,r.jsx)(At,{node:t,children:(0,r.jsx)(i.Suspense,{fallback:(0,r.jsx)(ht,{}),children:m})})}var Et;(Et=Pt||(Pt={})).lazy=function(e,t){const n=(0,i.lazy)(()=>t().then(e=>({default:()=>e})));return(0,r.jsx)(Et,{node:e,children:(0,r.jsx)(n,{})})},Et.lazyComponent=function(e,t){const n=(0,i.lazy)(()=>t().then(e=>({default:e})));return t=>(0,r.jsx)(Et,{node:e,children:(0,r.jsx)(n,{...t})})};const Tt=Ke({kind:"page",attachTo:{id:"app/routes",input:"routes"},output:[nt.routePath,nt.reactElement,nt.routeRef.optional()],config:{schema:{path:e=>e.string().optional()}},*factory(e,{config:t,node:n}){yield nt.routePath(t.path??e.path),yield nt.reactElement(Pt.lazy(n,e.loader)),e.routeRef&&(yield nt.routeRef(e.routeRef))}}),St=Ie().with({id:"app.router.wrapper"}),jt=Ke({kind:"app-router-component",attachTo:{id:"app/root",input:"router"},output:[St],dataRefs:{component:St},*factory(e){yield St(e.component)}}),Ot=Ie().with({id:"core.sign-in-page.component"}),_t=Ke({kind:"sign-in-page",attachTo:{id:"app/root",input:"signInPage"},output:[Ot],dataRefs:{component:Ot},*factory({loader:e},{node:t}){const n=(0,i.lazy)(()=>e().then(e=>({default:e})));yield Ot(e=>(0,r.jsx)(Pt,{node:t,children:(0,r.jsx)(n,{...e})}))}}),It=Ie().with({id:"core.theme.theme"}),Zt=Ke({kind:"theme",attachTo:{id:"api:app/app-theme",input:"themes"},output:[It],dataRefs:{theme:It},factory:({theme:e})=>[It(e)]}),Nt=Ie().with({id:"core.translation.translation"}),Mt=Ke({kind:"translation",attachTo:{id:"api:app/translations",input:"translations"},output:[Nt],dataRefs:{translation:Nt},factory:({resource:e})=>[Nt(e)]}),Ft=Ie().with({id:"core.swappableComponent"}),Ct=Ke({kind:"component",attachTo:{id:"api:app/swappable-components",input:"components"},output:[Ft],dataRefs:{component:Ft},defineParams:e=>Ge(e),factory:e=>[Ft({ref:e.component.ref,loader:e.loader})]}),Yt="eHgtF5hmbrXyiEvo";function zt(e=Error){const{stack:t}=new e(Yt);if(!t)return"<unknown>";const n=t.includes(Yt)?t.indexOf("\n")+1:0,r=t.indexOf("\n",t.indexOf("\n",n)+1)+1,a=t.indexOf("\n",r),i=t.substring(r,a).trim();return i?i.includes("(")?i.substring(i.indexOf("(")+1,i.indexOf(")")):i.includes("@")?i.substring(i.indexOf("@")+1):i:"unknown"}const Lt=ze.create({type:"@backstage/RouteRef",versions:["v1"]});function Dt(e){const t=e?.params??[],n=zt();let r;return Lt.createInstance("v1",{T:void 0,getParams:()=>t,getDescription:()=>r||`created at '${n}'`,alias:e?.aliasFor,setId(e){if(!e)throw new Error("RouteRef id must be a non-empty string");if(r&&r!==e)throw new Error(`RouteRef was referenced twice as both '${r}' and '${e}'`);r=e},toString:()=>`routeRef{id=${r},at='${n}'}`})}const Bt=ze.create({type:"@backstage/SubRouteRef",versions:["v1"]}),Ut=/^\w+$/;function Vt(e){const{path:t,parent:n}=e,r=Lt.toInternal(n),a=r.getParams(),i=r.getDescription(),o=t.split("/").filter(e=>e.startsWith(":")).map(e=>e.substring(1)),s=[...a,...o];if(a.some(e=>o.includes(e)))throw new Error("SubRouteRef may not have params that overlap with its parent");if(!t.startsWith("/"))throw new Error(`SubRouteRef path must start with '/', got '${t}'`);if(t.endsWith("/"))throw new Error(`SubRouteRef path must not end with '/', got '${t}'`);for(const e of o)if(!Ut.test(e))throw new Error(`SubRouteRef path has invalid param, got '${e}'`);return Bt.createInstance("v1",{T:void 0,path:t,getParams:()=>s,getParent:()=>n,getDescription:()=>`at ${t} with parent ${i}`,toString:()=>`subRouteRef{path='${t}',parent=${n}}`})}const qt=ze.create({type:"@backstage/ExternalRouteRef",versions:["v1"]});function Gt(e){const t=e?.params??[],n=zt();let r;return qt.createInstance("v1",{T:void 0,getParams:()=>t,getDescription:()=>r||`created at '${n}'`,getDefaultTarget:()=>e?.defaultTarget,setId(e){if(!e)throw new Error("ExternalRouteRef id must be a non-empty string");if(r&&r!==e)throw new Error(`ExternalRouteRef was referenced twice as both '${r}' and '${e}'`);r=e},toString:()=>`externalRouteRef{id=${r},at='${n}'}`})}var Wt=n(49634);function Ht(e){const{pathname:t}=(0,Wt.useLocation)(),n=d(q);return(0,i.useMemo)(()=>n.resolve(e,{sourcePath:t}),[n,e,t])}function Kt(e){return(0,Wt.useParams)()}function Xt(e){return{$$type:"@backstage/TranslationMessages",id:e.ref.id,full:Boolean(e.full),messages:e.messages}}function Jt(e){return{$$type:"@backstage/TranslationResource",version:"v1",id:e.ref.id,resources:Object.entries(e.translations).map(([e,t])=>({language:e,loader:()=>t().then(e=>{const t=e.default;return{messages:"@backstage/TranslationMessages"===t?.$$type?t.messages:t}})}))}}class Qt{#i;#o;#s;constructor(e){this.#i=e.id,this.#o=function(e){const t=new Array;return function e(n,r){for(const[a,i]of Object.entries(n))"string"==typeof i?t.push([r+a,i]):e(i,`${r}${a}.`)}(e,""),Object.fromEntries(t)}(e.messages)}$$type="@backstage/TranslationRef";version="v1";get id(){return this.#i}get T(){throw new Error("Not implemented")}getDefaultMessages(){return this.#o}setDefaultResource(e){this.#s=e}getDefaultResource(){return this.#s}toString(){return`TranslationRef{id=${this.id}}`}}function en(e){const t=new Qt(e);return e.translations&&t.setDefaultResource(Jt({ref:t,translations:e.translations})),t}const tn=new WeakSet,nn=e=>{const t=d(C),n=d(W),[r,a]=(0,i.useState)(()=>n.getTranslation(e)),o=(0,i.useMemo)(()=>n.translation$(e),[n,e]),s=(0,i.useCallback)(n=>{if(!tn.has(e)){const r=`Failed to load translation resource '${e.id}'; caused by ${n}`;console.error(r),t.post(new Error(r)),tn.add(e)}},[t,e]);(0,i.useEffect)(()=>{const e=o.subscribe({next(e){e.ready&&a(e)},error(e){s(e)}});return()=>{e.unsubscribe()}},[o,s]);const c=(0,i.useRef)(!0);if((0,i.useEffect)(()=>{c.current?c.current=!1:a(n.getTranslation(e))},[n,e]),!r.ready)throw new Promise(e=>{const t=o.subscribe({next(n){n.ready&&(t.unsubscribe(),e())},error(n){t.unsubscribe(),s(n),e()}})});return{t:r.t}};function rn(e,t){const n={extensionData:e,config:{singleton:Boolean(t?.singleton),optional:Boolean(t?.optional)},replaces:t?.replaces};return function e(t){return De.createInstance(void 0,{...n,context:t,withContext:e})}()}function an(e,t,n){const r=n&&t?`${t}/${n}`:t||n;if(!r)throw new Error(`Extension must declare an explicit namespace or name as it could not be resolved from context, kind=${e} namespace=${t} name=${n}`);return e?`${e}:${r}`:r}function on(e,t){const n=e=>{if(De.isType(e)){const{context:n}=De.toInternal(e);if(!n)throw new Error("Invalid input object without a parent extension used as attachment point");return{id:an(n.kind,t,n.name),input:n.input}}if("relative"in e&&e.relative)return{id:an(e.relative.kind,t,e.relative.name),input:e.input};if("id"in e)return{id:e.id,input:e.input};throw new Error("Invalid attachment point specification")};return Array.isArray(e)?e.map(n):n(e)}function sn(e,t){const n=Le.toInternal(e),{name:r,kind:a,namespace:i,override:o,attachTo:s,...c}=n,u=i??t?.namespace,p=an(a,u,r);return{...c,attachTo:on(s,u),$$type:"@backstage/Extension",version:n.version,id:p,toString:()=>`Extension{id=${p}}`}}const cn=ze.create({type:"@backstage/FrontendPlugin",versions:["v1"]});function un(e){const t=e.pluginId,n=new Array,r=new Map;for(const a of e.extensions??[]){const e=Le.toInternal(a),i=sn(a,{namespace:t});n.push(i),r.set(i.id,{...e,namespace:t})}if(n.length!==r.size){const e=n.map(e=>e.id),r=Array.from(new Set(e.filter((t,n)=>e.indexOf(t)!==n)));throw new Error(`Plugin '${t}' provided duplicate extensions: ${r.join(", ")}`)}return cn.createInstance("v1",{id:t,routes:e.routes??{},externalRoutes:e.externalRoutes??{},featureFlags:e.featureFlags??[],extensions:n,infoOptions:e.info,async info(){throw new Error(`Attempted to load plugin info for plugin '${t}', but the plugin instance is not installed in an app`)},getExtension(e){const n=r.get(e);if(!n)throw new Error(`Attempted to get non-existent extension '${e}' from plugin '${t}'`);return n},toString:()=>`Plugin{id=${t}}`,withOverrides(n){const r=new Set(n.extensions.map(e=>sn(e,{namespace:t}).id)),a=(e.extensions??[]).filter(e=>!r.has(sn(e,{namespace:t}).id));return un({...e,pluginId:t,extensions:[...a,...n.extensions],info:{...e.info,...n.info}})}})}function pn(e){const{pluginId:t}=e,n=new Array,r=new Map;for(const a of e.extensions??[]){const e=Le.toInternal(a),i=sn(a,{namespace:t});n.push(i),r.set(i.id,{...e,namespace:t})}if(n.length!==r.size){const e=n.map(e=>e.id),r=Array.from(new Set(e.filter((t,n)=>e.indexOf(t)!==n)));throw new Error(`Plugin '${t}' provided duplicate extensions: ${r.join(", ")}`)}return{$$type:"@backstage/FrontendModule",version:"v1",pluginId:t,featureFlags:e.featureFlags??[],extensions:n,toString:()=>`Module{pluginId=${t}}`}}function dn(e){const t=`created at '${zt()}'`;return{$$type:"@backstage/FrontendFeatureLoader",version:"v1",description:t,toString:()=>`FeatureLoader{description=${t}}`,async loader(t){const n=await e.loader(t),r=new Array;for await(const e of n)if(ln(e))r.push(e);else{if(!("default"in e))throw new Error(`Invalid item "${e}"`);r.push(e.default)}return r}}}function ln(e){return null!==e&&"object"==typeof e&&"$$type"in e&&("@backstage/FrontendPlugin"===e.$$type||"@backstage/FrontendModule"===e.$$type||"@backstage/FrontendFeatureLoader"===e.$$type)}}}]);
|
|
2
|
+
//# sourceMappingURL=9738.b037daf3.chunk.js.map
|