@techdocs/cli 0.0.0-nightly-20220617024804 → 0.0.0-nightly-20220618024418

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,13 +1,13 @@
1
1
  # @techdocs/cli
2
2
 
3
- ## 0.0.0-nightly-20220617024804
3
+ ## 0.0.0-nightly-20220618024418
4
4
 
5
5
  ### Patch Changes
6
6
 
7
7
  - 14ce0d9347: Fixed a bug that prevented docker images from being pulled by default when generating TechDocs.
8
8
  - Updated dependencies
9
- - @backstage/backend-common@0.0.0-nightly-20220617024804
10
- - @backstage/catalog-model@0.0.0-nightly-20220617024804
9
+ - @backstage/backend-common@0.0.0-nightly-20220618024418
10
+ - @backstage/catalog-model@0.0.0-nightly-20220618024418
11
11
 
12
12
  ## 1.1.2
13
13
 
@@ -1 +1 @@
1
- <!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Backstage is an open platform for building developer portals"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json" crossorigin="use-credentials"/><link rel="icon" href="/favicon.ico"/><link rel="shortcut icon" href="/favicon.ico"/><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"/><link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"/><link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"/><link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5"/><title>Techdocs Preview App</title><script defer="defer" src="/static/runtime.b639eb27.js"></script><script defer="defer" src="/static/module-material-ui.1e05f502.js"></script><script defer="defer" src="/static/module-lodash.32f2edbb.js"></script><script defer="defer" src="/static/module-date-fns.667c4862.js"></script><script defer="defer" src="/static/module-ajv.f2ae340e.js"></script><script defer="defer" src="/static/module-material-table.cd3af251.js"></script><script defer="defer" src="/static/module-yaml.63d08f2d.js"></script><script defer="defer" src="/static/module-hot-loader.baa19dda.js"></script><script defer="defer" src="/static/module-jss.df150ef8.js"></script><script defer="defer" src="/static/module-zod.2193e794.js"></script><script defer="defer" src="/static/module-react-beautiful-dnd.6085a9b0.js"></script><script defer="defer" src="/static/vendor.b639eb27.js"></script><script defer="defer" src="/static/main.b639eb27.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
1
+ <!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Backstage is an open platform for building developer portals"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json" crossorigin="use-credentials"/><link rel="icon" href="/favicon.ico"/><link rel="shortcut icon" href="/favicon.ico"/><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"/><link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"/><link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"/><link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5"/><title>Techdocs Preview App</title><script defer="defer" src="/static/runtime.c4918ca8.js"></script><script defer="defer" src="/static/module-material-ui.1e05f502.js"></script><script defer="defer" src="/static/module-lodash.32f2edbb.js"></script><script defer="defer" src="/static/module-date-fns.667c4862.js"></script><script defer="defer" src="/static/module-ajv.f2ae340e.js"></script><script defer="defer" src="/static/module-material-table.cd3af251.js"></script><script defer="defer" src="/static/module-yaml.63d08f2d.js"></script><script defer="defer" src="/static/module-hot-loader.baa19dda.js"></script><script defer="defer" src="/static/module-jss.df150ef8.js"></script><script defer="defer" src="/static/module-zod.2193e794.js"></script><script defer="defer" src="/static/module-react-beautiful-dnd.6085a9b0.js"></script><script defer="defer" src="/static/vendor.c4918ca8.js"></script><script defer="defer" src="/static/main.c4918ca8.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
@@ -482,6 +482,6 @@ ${Et.reduce((re,Ee)=>{const Te=x.typography[Ee],{lineHeight:Le,fontFamily:Je,fon
482
482
  `;const Ke=[Xe,mt,Ye,oe,fe,tt],Ne=()=>(0,A.useSidebarPinState)(),ct=()=>{const x=Ne(),re=(0,ue.Z)();return(0,r.useMemo)(()=>{const Ee={theme:re,sidebar:x};return Ke.reduce((Te,Le)=>Te+Le(Ee),"")},[re,x])},X=()=>{const x=ct();return(0,r.useCallback)(re=>(re.getElementsByTagName("head")[0].insertAdjacentHTML("beforeend",`<style>${x}</style>`),re),[x])},Z=(x,re,Ee)=>{const Te=x==="src"&&re.endsWith(".svg"),Le=!re.match(/^([a-z]*:)?\/\//i),Je=re.startsWith(Ee);return Te&&(Le||Je)},Q=({techdocsStorageApi:x,entityId:re,path:Ee})=>async Te=>{const Le=await x.getApiOrigin(),Je=async(it,Kt)=>{for(const Ht of it)if(Ht.hasAttribute(Kt)){const Dt=Ht.getAttribute(Kt);if(!Dt)return;const Ft=await x.getBaseUrl(Dt,re,Ee);if(Z(Kt,Dt,Le))try{const kt=await(await fetch(Ft,{credentials:"include"})).text();Ht.setAttribute(Kt,`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(kt)))}`)}catch{Ht.setAttribute("alt",`Error: ${Dt}`)}else Ht.setAttribute(Kt,Ft)}};return await Promise.all([Je(Te.querySelectorAll("img"),"src"),Je(Te.querySelectorAll("script"),"src"),Je(Te.querySelectorAll("source"),"src"),Je(Te.querySelectorAll("link"),"href"),Je(Te.querySelectorAll("a[download]"),"href")]),Te};var se=e(68370),le=e(67097),be=e(47093),Oe=e(82717),Ae=e.n(Oe);const ke=x=>re=>{var kt;const Ee=re.querySelector('[title="Edit this page"]');if(!Ee||!Ee.href)return re;const Te=new URL(Ee.href),Le=x.byUrl(Te);if((Le==null?void 0:Le.type)!=="github"&&(Le==null?void 0:Le.type)!=="gitlab")return re;const Je=((kt=re.querySelector("article>h1"))==null?void 0:kt.childNodes[0].textContent)||"",it=encodeURIComponent(`Documentation Feedback: ${Je}`),Kt=encodeURIComponent(`Page source:
483
483
  ${Ee.href}
484
484
 
485
- Feedback:`),Ht=(Le==null?void 0:Le.type)==="github"?(0,se.Pb)(Te.href,"blob"):Te.href,Dt=Ae()(Ht),Ft=`/${Dt.organization}/${Dt.name}`,ut=Ee.cloneNode();switch(Le==null?void 0:Le.type){case"gitlab":ut.href=`${Te.origin}${Ft}/issues/new?issue[title]=${it}&issue[description]=${Kt}`;break;case"github":ut.href=`${Te.origin}${Ft}/issues/new?title=${it}&body=${Kt}`;break;default:return re}return be.render(r.createElement(le.Z),ut),ut.style.paddingLeft="5px",ut.title="Leave feedback for this page",ut.id="git-feedback-link",Ee==null||Ee.insertAdjacentElement("beforebegin",ut),re};var We=e(44882);const gt=()=>x=>{const re=x.querySelector('.md-header label[for="__drawer"]'),Ee=x.querySelector("article");if(!re||!Ee)return x;const Te=re.cloneNode();return be.render(r.createElement(We.Z),Te),Te.id="toggle-sidebar",Te.title="Toggle Sidebar",Te.classList.add("md-content__button"),Te.style.setProperty("padding","0 0 0 5px"),Te.style.setProperty("margin","0.4rem 0 0.4rem 0.4rem"),Ee==null||Ee.prepend(Te),x},It=()=>x=>(((Ee,Te)=>{Array.from(Ee).filter(Le=>Le.hasAttribute(Te)).forEach(Le=>{const Je=Le.getAttribute(Te);if(Je){Je.match(/^https?:\/\//i)&&Le.setAttribute("target","_blank");try{const it=lt(window.location.href);Le.setAttribute(Te,new URL(Je,it).toString())}catch{Le.replaceWith(Le.textContent||Je)}}})})(Array.from(x.getElementsByTagName("a")),"href"),x);function lt(x){const re=new URL(x);return!re.pathname.endsWith("/")&&!re.pathname.endsWith(".html")&&(re.pathname+="/"),re.toString()}const Tt=({baseUrl:x,onClick:re})=>Ee=>(Array.from(Ee.getElementsByTagName("a")).forEach(Te=>{Te.addEventListener("click",Le=>{const it=Te.getAttribute("href");!it||it.startsWith(x)&&!Te.hasAttribute("download")&&(Le.preventDefault(),re(Le,it))})}),Ee);var Lt=e(15459),Rt=e(80030),Nt=e(72379),Zt=e(41547);const vt=(0,Lt.Z)(x=>({tooltip:{fontSize:"inherit",color:x.palette.text.primary,margin:0,padding:x.spacing(.5),backgroundColor:"transparent",boxShadow:"none"}}))(Rt.ZP),at=()=>r.createElement(Nt.Z,null,r.createElement("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"})),zt=({text:x})=>{const[re,Ee]=(0,r.useState)(!1),Te=(0,r.useCallback)(()=>{navigator.clipboard.writeText(x),Ee(!0)},[x]),Le=(0,r.useCallback)(()=>{Ee(!1)},[Ee]);return r.createElement(vt,{title:"Copied to clipboard",placement:"left",open:re,onClose:Le,leaveDelay:1e3},r.createElement("button",{className:"md-clipboard md-icon",onClick:Te},r.createElement(at,null)))},ae=x=>re=>{var Te;const Ee=re.querySelectorAll("pre > code");for(const Le of Ee){const Je=Le.textContent||"",it=document.createElement("div");(Te=Le==null?void 0:Le.parentElement)==null||Te.prepend(it),be.render(r.createElement(Zt.Z,{theme:x},r.createElement(zt,{text:Je})),it)}return re},V=()=>x=>{var re;return(re=x.querySelector(".md-header"))==null||re.remove(),x},ye=()=>x=>{var re,Ee;return(re=x.querySelector(".md-footer .md-copyright"))==null||re.remove(),(Ee=x.querySelector(".md-footer-copyright"))==null||Ee.remove(),x},He=({onLoading:x,onLoaded:re})=>Ee=>(x(),Ee.addEventListener(u.Ox,function Te(){re(),Ee.removeEventListener(u.Ox,Te)}),Ee),qe=()=>x=>(setTimeout(()=>{var re;if(window.location.hash){const Ee=window.location.hash.slice(1);(re=x==null?void 0:x.querySelector(`[id="${Ee}"]`))==null||re.scrollIntoView()}},200),x),ot=async(x,re)=>{let Ee;if(typeof x=="string")Ee=new DOMParser().parseFromString(x,"text/html").documentElement;else if(x instanceof Element)Ee=x;else throw new Error("dom is not a recognized type");for(const Te of re)Ee=await Te(Ee);return Ee},bt="screen and (max-width: 76.1875em)",Wt=x=>{const re=(0,te.s0)(),Ee=(0,ue.Z)(),Te=(0,Re.Z)(bt),Le=Ue(),Je=X(),it=(0,b.useApi)(u.Dl),Kt=(0,b.useApi)(we.q3),{state:Ht,path:Dt,content:Ft}=(0,D.DK)(),[ut,kt]=(0,r.useState)(null),tn=(0,u.ux)(ut),jt=(0,r.useCallback)(()=>{if(!ut)return;ut.querySelectorAll(".md-sidebar").forEach($t=>{var hn,yn;if(Te)$t.style.top="0px";else{const an=(hn=ut.getBoundingClientRect().top)!=null?hn:0,fn=ut.querySelector(".md-container > .md-tabs"),Wn=(yn=fn==null?void 0:fn.getBoundingClientRect().height)!=null?yn:0;$t.style.top=`${Math.max(an,0)+Wn}px`}$t.style.setProperty("opacity","1")})},[ut,Te]);(0,r.useEffect)(()=>(window.addEventListener("resize",jt),window.addEventListener("scroll",jt,!0),()=>{window.removeEventListener("resize",jt),window.removeEventListener("scroll",jt,!0)}),[ut,jt]);const Vt=(0,r.useCallback)(()=>{if(!ut)return;const wt=ut.querySelector(".md-footer");wt&&(wt.style.width=`${ut.getBoundingClientRect().width}px`)},[ut]);(0,r.useEffect)(()=>(window.addEventListener("resize",Vt),()=>{window.removeEventListener("resize",Vt)}),[ut,Vt]),(0,r.useEffect)(()=>{tn||(Vt(),jt())},[Ht,tn,Vt,jt]);const cn=(0,r.useCallback)((wt,$t)=>ot(wt,[Le,Q({techdocsStorageApi:it,entityId:x,path:$t}),It(),gt(),V(),ye(),ke(Kt),Je]),[x,Kt,it,Le,Je]),Tn=(0,r.useCallback)(async wt=>ot(wt,[qe(),ae(Ee),Tt({baseUrl:window.location.origin,onClick:($t,hn)=>{var fn;const yn=$t.ctrlKey||$t.metaKey,an=new URL(hn);an.hash?yn?window.open(`${an.pathname}${an.hash}`,"_blank"):(re(`${an.pathname}${an.hash}`),(fn=wt==null?void 0:wt.querySelector(`#${an.hash.slice(1)}`))==null||fn.scrollIntoView()):yn?window.open(an.pathname,"_blank"):re(an.pathname)}}),He({onLoading:()=>{},onLoaded:()=>{var $t;($t=wt.querySelector(".md-nav__title"))==null||$t.removeAttribute("for")}}),He({onLoading:()=>{Array.from(wt.querySelectorAll(".md-sidebar")).forEach(hn=>{hn.style.setProperty("opacity","0")})},onLoaded:()=>{}})]),[Ee,re]);return(0,r.useEffect)(()=>{if(!Ft)return()=>{};let wt=!0;return cn(Ft,Dt).then(async $t=>{if(!($t!=null&&$t.innerHTML)||!wt)return;window.scroll({top:0});const hn=await Tn($t);kt(hn)}),()=>{wt=!1}},[Ft,Dt,cn,Tn]),ut};var Xt=e(8560);const un=()=>{const x=(0,u.$L)(),{shadowRoot:re}=(0,u.x1)(),Ee=re==null?void 0:re.querySelector('[data-md-component="content"]'),Te=re==null?void 0:re.querySelector('div[data-md-component="sidebar"][data-md-type="navigation"], div[data-md-component="navigation"]');let Le=Te==null?void 0:Te.querySelector('[data-techdocs-addons-location="primary sidebar"]');Le||(Le=document.createElement("div"),Le.setAttribute("data-techdocs-addons-location","primary sidebar"),Te==null||Te.prepend(Le));const Je=re==null?void 0:re.querySelector('div[data-md-component="sidebar"][data-md-type="toc"], div[data-md-component="toc"]');let it=Je==null?void 0:Je.querySelector('[data-techdocs-addons-location="secondary sidebar"]');return it||(it=document.createElement("div"),it.setAttribute("data-techdocs-addons-location","secondary sidebar"),Je==null||Je.prepend(it)),r.createElement(r.Fragment,null,r.createElement(Xt.Z,{container:Le},x.renderComponentsByLocation(u.oZ.PrimarySidebar)),r.createElement(Xt.Z,{container:Ee},x.renderComponentsByLocation(u.oZ.Content)),r.createElement(Xt.Z,{container:it},x.renderComponentsByLocation(u.oZ.SecondarySidebar)))},dn=(0,t.Z)({search:{width:"100%","@media (min-width: 76.1875em)":{width:"calc(100% - 34.4rem)",margin:"0 auto"}}}),xt=(0,D.m1)(x=>{var Ft;const{withSearch:re=!0,onReady:Ee}=x,Te=dn(),{entityMetadata:{value:Le,loading:Je},entityRef:it,setShadowRoot:Kt}=(0,u.x1)(),Ht=Wt(it),Dt=(0,r.useCallback)(ut=>{Kt(ut),Ee instanceof Function&&Ee()},[Kt,Ee]);return Je===!1&&!Le?r.createElement(A.ErrorPage,{status:"404",statusMessage:"PAGE NOT FOUND"}):Ht?r.createElement(A.Content,null,r.createElement(l.Z,{container:!0},r.createElement(l.Z,{xs:12,item:!0},r.createElement(Y,null)),re&&r.createElement(l.Z,{className:Te.search,xs:"auto",item:!0},r.createElement(m.S,{entityId:it,entityTitle:(Ft=Le==null?void 0:Le.metadata)==null?void 0:Ft.title})),r.createElement(l.Z,{xs:12,item:!0},r.createElement(u.VA,{element:Ht,onAppend:Dt},r.createElement(un,null))))):r.createElement(A.Content,null,r.createElement(l.Z,{container:!0},r.createElement(l.Z,{xs:12,item:!0},r.createElement(Y,null))))}),qt=null},99954:function(ee,s,e){"use strict";e.d(s,{S:function(){return E}});var r=e(2784),t=e(18671),l=e(98069),u=e(73250),A=e(26136),m=e(53479),o=e(48023),c=e(82339),f=e(36964),y=e(68725);const p=r.createElement(l.Z,{animation:"wave",variant:"text",height:40}),E=T=>{const{children:I}=T,B=(0,A.$L)(),j=(0,f.useApi)(f.configApiRef),{title:M,setTitle:b,subtitle:L,setSubtitle:D,entityRef:U,metadata:{value:Y,loading:te},entityMetadata:{value:ue,loading:Re}}=(0,A.x1)();(0,r.useEffect)(()=>{!Y||(b(Ve=>{const{site_name:ie}=Y;return Ve||ie}),D(Ve=>{let{site_description:ie}=Y;return(!ie||ie==="None")&&(ie="Home"),Ve||ie}))},[Y,b,D]);const we=j.getOptional("app.title")||"Backstage",ge=[L,M,we].filter(Boolean).join(" | "),{locationMetadata:ze,spec:_e}=ue||{},et=_e==null?void 0:_e.lifecycle,st=ue?(0,m.getEntityRelations)(ue,o.S4):[],Ct=(0,f.useRouteRef)(y._Z)(),yt=r.createElement(r.Fragment,null,r.createElement(c.HeaderLabel,{label:"Component",value:r.createElement(m.EntityRefLink,{color:"inherit",entityRef:U,title:ue==null?void 0:ue.metadata.title,defaultKind:"Component"})}),st.length>0&&r.createElement(c.HeaderLabel,{label:"Owner",value:r.createElement(m.EntityRefLinks,{color:"inherit",entityRefs:st,defaultKind:"group"})}),et?r.createElement(c.HeaderLabel,{label:"Lifecycle",value:et}):null,ze&&ze.type!=="dir"&&ze.type!=="file"?r.createElement(c.HeaderLabel,{label:"",value:r.createElement("a",{href:ze.target,target:"_blank",rel:"noopener noreferrer"},r.createElement(u.Z,{style:{marginTop:"-25px",fill:"#fff"}}))}):null);return!Re&&ue===void 0||!te&&Y===void 0?null:r.createElement(c.Header,{type:"Documentation",typeLink:Ct,title:M||p,subtitle:L||p},r.createElement(t.Z,{titleTemplate:"%s"},r.createElement("title",null,ge)),yt,I,B.renderComponentsByLocation(A.oZ.Header))}},16172:function(ee,s,e){"use strict";e.d(s,{b:function(){return p}});var r=e(2784),t=e(79692),l=e(15223),u=e(95544),A=e(80030),m=e(61837),o=e(48348),c=e(47603),f=e(26136);const y=(0,t.Z)(E=>({root:{gridArea:"pageSubheader",flexDirection:"column",minHeight:"auto",padding:E.spacing(3,3,0)}})),p=({toolbarProps:E})=>{const T=y(),[I,B]=(0,r.useState)(null),j=(0,r.useCallback)(te=>{B(te.currentTarget)},[]),M=(0,r.useCallback)(()=>{B(null)},[]),{entityMetadata:{value:b,loading:L}}=(0,f.x1)(),D=(0,f.$L)(),U=D.renderComponentsByLocation(f.oZ.Subheader),Y=D.renderComponentsByLocation(f.oZ.Settings);return!U&&!Y||L===!1&&!b?null:r.createElement(l.Z,{classes:T,...E},r.createElement(u.Z,{display:"flex",justifyContent:"flex-end",width:"100%",flexWrap:"wrap"},U,Y?r.createElement(r.Fragment,null,r.createElement(A.ZP,{title:"Settings"},r.createElement(m.Z,{"aria-controls":"tech-docs-reader-page-settings","aria-haspopup":"true",onClick:j},r.createElement(c.Z,null))),r.createElement(o.Z,{id:"tech-docs-reader-page-settings",getContentAnchorEl:null,anchorEl:I,anchorOrigin:{vertical:"bottom",horizontal:"right"},open:Boolean(I),onClose:M,keepMounted:!0},Y)):null))}},2263:function(ee,s,e){"use strict";e.d(s,{DK:function(){return p},m1:function(){return T}});var r=e(2784),t=e(10289),l=e(26136),u=e(36964),A=e(64279),m=e(77446);function o({contentLoading:I,content:B,activeSyncState:j}){return I||j==="BUILD_READY_RELOAD"||!B&&j==="CHECKING"?"CHECKING":!B&&j==="BUILDING"?"INITIAL_BUILD":B?j==="BUILDING"?"CONTENT_STALE_REFRESHING":j==="BUILD_READY"?"CONTENT_STALE_READY":j==="ERROR"?"CONTENT_STALE_ERROR":"CONTENT_FRESH":"CONTENT_NOT_FOUND"}function c(I,B){const j={...I};switch(B.type){case"sync":B.state==="CHECKING"&&(j.buildLog=[]),j.activeSyncState=B.state,j.syncError=B.syncError;break;case"contentLoading":j.contentLoading=!0,j.contentError=void 0;break;case"content":typeof B.path=="string"&&(j.path=B.path),j.contentLoading=!1,j.content=B.content,j.contentError=B.contentError;break;case"buildLog":j.buildLog=j.buildLog.concat(B.log);break;default:throw new Error}return["BUILD_READY","BUILD_READY_RELOAD"].includes(j.activeSyncState)&&["contentLoading","content"].includes(B.type)&&(j.activeSyncState="UP_TO_DATE",j.buildLog=[]),j}function f(I,B,j,M){var ue,Re;const[b,L]=(0,r.useReducer)(c,{activeSyncState:"CHECKING",path:M,contentLoading:!0,buildLog:[]}),D=(0,u.useApi)(l.Dl),{retry:U}=(0,m.Z)(async()=>{L({type:"contentLoading"});try{const we=await D.getEntityDocs({kind:I,namespace:B,name:j},M);return L({type:"content",content:we,path:M}),we}catch(we){L({type:"content",contentError:we,path:M})}},[D,I,B,j,M]),Y=(0,r.useRef)({content:void 0,reload:()=>{}});return Y.current={content:b.content,reload:U},(0,A.default)(async()=>{L({type:"sync",state:"CHECKING"});const we=setTimeout(()=>{L({type:"sync",state:"BUILDING"})},1e3);try{switch(await D.syncEntityDocs({kind:I,namespace:B,name:j},ze=>{L({type:"buildLog",log:ze})})){case"updated":Y.current.content?L({type:"sync",state:"BUILD_READY"}):(Y.current.reload(),L({type:"sync",state:"BUILD_READY_RELOAD"}));break;case"cached":L({type:"sync",state:"UP_TO_DATE"});break;default:L({type:"sync",state:"ERROR",syncError:new Error("Unexpected return state")});break}}catch(ge){L({type:"sync",state:"ERROR",syncError:ge})}finally{clearTimeout(we)}},[I,j,B,D,L,Y]),{state:(0,r.useMemo)(()=>o({activeSyncState:b.activeSyncState,contentLoading:b.contentLoading,content:b.content}),[b.activeSyncState,b.content,b.contentLoading]),contentReload:U,path:b.path,content:b.content,contentErrorMessage:(ue=b.contentError)==null?void 0:ue.toString(),syncErrorMessage:(Re=b.syncError)==null?void 0:Re.toString(),buildLog:b.buildLog}}const y=(0,r.createContext)({}),p=()=>(0,r.useContext)(y),E=({children:I})=>{const{"*":B=""}=(0,t.UO)(),{entityRef:j}=(0,l.x1)(),{kind:M,namespace:b,name:L}=j,D=f(M,b,L,B);return r.createElement(y.Provider,{value:D},I instanceof Function?I(D):I)},T=I=>B=>r.createElement(E,null,r.createElement(I,{...B}))},96393:function(ee,s,e){"use strict";e.d(s,{Fq:function(){return u.F},SE:function(){return l.S}});var r=e(2263),t=e(26220),l=e(99954),u=e(63126),A=e(16172)},68725:function(ee,s,e){"use strict";e.d(s,{Fw:function(){return l},_Z:function(){return t},pd:function(){return u}});var r=e(36964);const t=(0,r.createRouteRef)({id:"techdocs:index-page"}),l=(0,r.createRouteRef)({id:"techdocs:reader-page",params:["namespace","kind","name"]}),u=(0,r.createRouteRef)({id:"techdocs:catalog-reader-view"})},47861:function(ee,s,e){"use strict";e.d(s,{S:function(){return Y}});var r=e(2784),t=e(79692),l=e(49378),u=e(38402),A=e(86136),m=e(85256),o=e(82339),c=e(36964),f=e(74450);const y=(0,t.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",marginBottom:"1rem"}}),p=te=>{const{result:ue,highlight:Re,rank:we,lineClamp:ge=5,asListItem:ze=!0,asLink:_e=!0,title:et,icon:st}=te,Ct=y(),yt=(0,c.useAnalytics)(),Pe=()=>{yt.captureEvent("discover",ue.title,{attributes:{to:ue.location},value:we})},ht=()=>{const de=Re!=null&&Re.fields.title?r.createElement(f.FA,{text:Re.fields.title,preTag:Re.preTag,postTag:Re.postTag}):ue.title,Ue=Re!=null&&Re.fields.entityTitle?r.createElement(f.FA,{text:Re.fields.entityTitle,preTag:Re.preTag,postTag:Re.postTag}):ue.entityTitle,Be=Re!=null&&Re.fields.name?r.createElement(f.FA,{text:Re.fields.name,preTag:Re.preTag,postTag:Re.postTag}):ue.name;return r.createElement(l.Z,{className:Ct.itemText,primaryTypographyProps:{variant:"h6"},primary:et||r.createElement(r.Fragment,null,de," | ",Ue!=null?Ue:Be," docs"),secondary:r.createElement("span",{style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:ge,overflow:"hidden"}},Re!=null&&Re.fields.text?r.createElement(f.FA,{text:Re.fields.text,preTag:Re.preTag,postTag:Re.postTag}):ue.text)})},Ve=({children:de})=>_e?r.createElement(o.Link,{noTrack:!0,to:ue.location,onClick:Pe},de):r.createElement(r.Fragment,null,de),ie=({children:de})=>ze?r.createElement(r.Fragment,null,r.createElement(u.Z,{alignItems:"flex-start"},st&&r.createElement(A.Z,null,st),r.createElement("div",{className:Ct.flexContainer},de)),r.createElement(m.Z,{component:"li"})):r.createElement(r.Fragment,null,de);return r.createElement(Ve,null,r.createElement(ie,null,r.createElement(ht,null)))};var E=e(86619),T=e(50581),I=e(61837),B=e(4614),j=e(21853),M=e(88013),b=e(10289),L=e(48760);const D=(0,t.Z)({root:{width:"100%"}}),U=te=>{const{entityId:ue,entityTitle:Re,debounceTime:we=150}=te,[ge,ze]=(0,r.useState)(!1),_e=(0,b.s0)(),{term:et,setTerm:st,setFilters:Ct,result:{loading:yt,value:Pe}}=(0,f.Rx)(),ht=D(),[Ve,ie]=(0,r.useState)([]);(0,r.useEffect)(()=>{let oe=!0;if(oe&&Pe){const fe=Pe.results.slice(0,10);ie(fe)}return()=>{oe=!1}},[yt,Pe]);const[de,Ue]=(0,r.useState)(et);(0,L.Z)(()=>st(de),we,[de]);const{kind:Be,name:Xe,namespace:mt}=ue;(0,r.useEffect)(()=>{Ct(oe=>({...oe,kind:Be,namespace:mt,name:Xe}))},[Be,mt,Xe,Ct]);const Ye=oe=>{ge||ze(!0),Ue(oe.target.value)},Et=(oe,fe)=>{if(fe!=null&&fe.document){const{location:tt}=fe.document;_e(tt)}};return r.createElement(M.ZP,{classes:{root:ht.root},"data-testid":"techdocs-search-bar",size:"small",open:ge,getOptionLabel:()=>"",filterOptions:oe=>oe,onClose:()=>{ze(!1)},onFocus:()=>{ze(!0)},onChange:Et,blurOnSelect:!0,noOptionsText:"No results found",value:null,options:Ve,renderOption:({document:oe,highlight:fe})=>r.createElement(p,{result:oe,lineClamp:3,asListItem:!1,asLink:!1,title:oe.title,highlight:fe}),loading:yt,renderInput:oe=>r.createElement(E.Z,{...oe,"data-testid":"techdocs-search-bar-input",variant:"outlined",fullWidth:!0,placeholder:`Search ${Re||ue.name} docs`,value:de,onChange:Ye,InputProps:{...oe.InputProps,startAdornment:r.createElement(T.Z,{position:"start"},r.createElement(I.Z,{"aria-label":"Query",disabled:!0},r.createElement(j.Z,null))),endAdornment:r.createElement(r.Fragment,null,yt?r.createElement(B.Z,{color:"inherit",size:20}):null,oe.InputProps.endAdornment)}})})},Y=te=>{const ue={term:"",types:["techdocs"],pageCursor:"",filters:te.entityId};return r.createElement(f.Nd,{initialState:ue},r.createElement(U,{...te}))}},98157:function(){},53260:function(){}},function(ee){var s=function(r){return ee(ee.s=r)};ee.O(0,[2370,6202,9284,2126,7012,9035,4983,3222,6816,5218,4736],function(){return s(88649),s(46054)});var e=ee.O()}]);})();
485
+ Feedback:`),Ht=(Le==null?void 0:Le.type)==="github"?(0,se.Pb)(Te.href,"blob"):Te.href,Dt=Ae()(Ht),Ft=`/${Dt.organization}/${Dt.name}`,ut=Ee.cloneNode();switch(Le==null?void 0:Le.type){case"gitlab":ut.href=`${Te.origin}${Ft}/issues/new?issue[title]=${it}&issue[description]=${Kt}`;break;case"github":ut.href=`${Te.origin}${Ft}/issues/new?title=${it}&body=${Kt}`;break;default:return re}return be.render(r.createElement(le.Z),ut),ut.style.paddingLeft="5px",ut.title="Leave feedback for this page",ut.id="git-feedback-link",Ee==null||Ee.insertAdjacentElement("beforebegin",ut),re};var We=e(44882);const gt=()=>x=>{const re=x.querySelector('.md-header label[for="__drawer"]'),Ee=x.querySelector("article");if(!re||!Ee)return x;const Te=re.cloneNode();return be.render(r.createElement(We.Z),Te),Te.id="toggle-sidebar",Te.title="Toggle Sidebar",Te.classList.add("md-content__button"),Te.style.setProperty("padding","0 0 0 5px"),Te.style.setProperty("margin","0.4rem 0 0.4rem 0.4rem"),Ee==null||Ee.prepend(Te),x},It=()=>x=>(((Ee,Te)=>{Array.from(Ee).filter(Le=>Le.hasAttribute(Te)).forEach(Le=>{const Je=Le.getAttribute(Te);if(Je){Je.match(/^https?:\/\//i)&&Le.setAttribute("target","_blank");try{const it=lt(window.location.href);Le.setAttribute(Te,new URL(Je,it).toString())}catch{Le.replaceWith(Le.textContent||Je)}}})})(Array.from(x.getElementsByTagName("a")),"href"),x);function lt(x){const re=new URL(x);return!re.pathname.endsWith("/")&&!re.pathname.endsWith(".html")&&(re.pathname+="/"),re.toString()}const Tt=({baseUrl:x,onClick:re})=>Ee=>(Array.from(Ee.getElementsByTagName("a")).forEach(Te=>{Te.addEventListener("click",Le=>{const it=Te.getAttribute("href");!it||it.startsWith(x)&&!Te.hasAttribute("download")&&(Le.preventDefault(),re(Le,it))})}),Ee);var Lt=e(15459),Rt=e(80030),Nt=e(72379),Zt=e(41547);const vt=(0,Lt.Z)(x=>({tooltip:{fontSize:"inherit",color:x.palette.text.primary,margin:0,padding:x.spacing(.5),backgroundColor:"transparent",boxShadow:"none"}}))(Rt.ZP),at=()=>r.createElement(Nt.Z,null,r.createElement("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"})),zt=({text:x})=>{const[re,Ee]=(0,r.useState)(!1),Te=(0,r.useCallback)(()=>{navigator.clipboard.writeText(x),Ee(!0)},[x]),Le=(0,r.useCallback)(()=>{Ee(!1)},[Ee]);return r.createElement(vt,{title:"Copied to clipboard",placement:"left",open:re,onClose:Le,leaveDelay:1e3},r.createElement("button",{className:"md-clipboard md-icon",onClick:Te},r.createElement(at,null)))},ae=x=>re=>{var Te;const Ee=re.querySelectorAll("pre > code");for(const Le of Ee){const Je=Le.textContent||"",it=document.createElement("div");(Te=Le==null?void 0:Le.parentElement)==null||Te.prepend(it),be.render(r.createElement(Zt.Z,{theme:x},r.createElement(zt,{text:Je})),it)}return re},V=()=>x=>{var re;return(re=x.querySelector(".md-header"))==null||re.remove(),x},ye=()=>x=>{var re,Ee;return(re=x.querySelector(".md-footer .md-copyright"))==null||re.remove(),(Ee=x.querySelector(".md-footer-copyright"))==null||Ee.remove(),x},He=({onLoading:x,onLoaded:re})=>Ee=>(x(),Ee.addEventListener(u.Ox,function Te(){re(),Ee.removeEventListener(u.Ox,Te)}),Ee),qe=()=>x=>(setTimeout(()=>{var re;if(window.location.hash){const Ee=window.location.hash.slice(1);(re=x==null?void 0:x.querySelector(`[id="${Ee}"]`))==null||re.scrollIntoView()}},200),x),ot=async(x,re)=>{let Ee;if(typeof x=="string")Ee=new DOMParser().parseFromString(x,"text/html").documentElement;else if(x instanceof Element)Ee=x;else throw new Error("dom is not a recognized type");for(const Te of re)Ee=await Te(Ee);return Ee},bt="screen and (max-width: 76.1875em)",Wt=x=>{const re=(0,te.s0)(),Ee=(0,ue.Z)(),Te=(0,Re.Z)(bt),Le=Ue(),Je=X(),it=(0,b.useApi)(u.Dl),Kt=(0,b.useApi)(we.q3),{state:Ht,path:Dt,content:Ft}=(0,D.DK)(),[ut,kt]=(0,r.useState)(null),tn=(0,u.ux)(ut),jt=(0,r.useCallback)(()=>{if(!ut)return;ut.querySelectorAll(".md-sidebar").forEach($t=>{var hn,yn;if(Te)$t.style.top="0px";else{const an=(hn=ut.getBoundingClientRect().top)!=null?hn:0,fn=ut.querySelector(".md-container > .md-tabs"),Wn=(yn=fn==null?void 0:fn.getBoundingClientRect().height)!=null?yn:0;$t.style.top=`${Math.max(an,0)+Wn}px`}$t.style.setProperty("opacity","1")})},[ut,Te]);(0,r.useEffect)(()=>(window.addEventListener("resize",jt),window.addEventListener("scroll",jt,!0),()=>{window.removeEventListener("resize",jt),window.removeEventListener("scroll",jt,!0)}),[ut,jt]);const Vt=(0,r.useCallback)(()=>{if(!ut)return;const wt=ut.querySelector(".md-footer");wt&&(wt.style.width=`${ut.getBoundingClientRect().width}px`)},[ut]);(0,r.useEffect)(()=>(window.addEventListener("resize",Vt),()=>{window.removeEventListener("resize",Vt)}),[ut,Vt]),(0,r.useEffect)(()=>{tn||(Vt(),jt())},[Ht,tn,Vt,jt]);const cn=(0,r.useCallback)((wt,$t)=>ot(wt,[Le,Q({techdocsStorageApi:it,entityId:x,path:$t}),It(),gt(),V(),ye(),ke(Kt),Je]),[x,Kt,it,Le,Je]),Tn=(0,r.useCallback)(async wt=>ot(wt,[qe(),ae(Ee),Tt({baseUrl:window.location.origin,onClick:($t,hn)=>{var fn;const yn=$t.ctrlKey||$t.metaKey,an=new URL(hn);an.hash?yn?window.open(`${an.pathname}${an.hash}`,"_blank"):(re(`${an.pathname}${an.hash}`),(fn=wt==null?void 0:wt.querySelector(`#${an.hash.slice(1)}`))==null||fn.scrollIntoView()):yn?window.open(an.pathname,"_blank"):re(an.pathname)}}),He({onLoading:()=>{},onLoaded:()=>{var $t;($t=wt.querySelector(".md-nav__title"))==null||$t.removeAttribute("for")}}),He({onLoading:()=>{Array.from(wt.querySelectorAll(".md-sidebar")).forEach(hn=>{hn.style.setProperty("opacity","0")})},onLoaded:()=>{}})]),[Ee,re]);return(0,r.useEffect)(()=>{if(!Ft)return()=>{};let wt=!0;return cn(Ft,Dt).then(async $t=>{if(!($t!=null&&$t.innerHTML)||!wt)return;window.scroll({top:0});const hn=await Tn($t);kt(hn)}),()=>{wt=!1}},[Ft,Dt,cn,Tn]),ut};var Xt=e(8560);const un=()=>{const x=(0,u.$L)(),{shadowRoot:re}=(0,u.x1)(),Ee=re==null?void 0:re.querySelector('[data-md-component="content"]'),Te=re==null?void 0:re.querySelector('div[data-md-component="sidebar"][data-md-type="navigation"], div[data-md-component="navigation"]');let Le=Te==null?void 0:Te.querySelector('[data-techdocs-addons-location="primary sidebar"]');Le||(Le=document.createElement("div"),Le.setAttribute("data-techdocs-addons-location","primary sidebar"),Te==null||Te.prepend(Le));const Je=re==null?void 0:re.querySelector('div[data-md-component="sidebar"][data-md-type="toc"], div[data-md-component="toc"]');let it=Je==null?void 0:Je.querySelector('[data-techdocs-addons-location="secondary sidebar"]');return it||(it=document.createElement("div"),it.setAttribute("data-techdocs-addons-location","secondary sidebar"),Je==null||Je.prepend(it)),r.createElement(r.Fragment,null,r.createElement(Xt.Z,{container:Le},x.renderComponentsByLocation(u.oZ.PrimarySidebar)),r.createElement(Xt.Z,{container:Ee},x.renderComponentsByLocation(u.oZ.Content)),r.createElement(Xt.Z,{container:it},x.renderComponentsByLocation(u.oZ.SecondarySidebar)))},dn=(0,t.Z)({search:{width:"100%","@media (min-width: 76.1875em)":{width:"calc(100% - 34.4rem)",margin:"0 auto"}}}),xt=(0,D.m1)(x=>{var Ft;const{withSearch:re=!0,onReady:Ee}=x,Te=dn(),{entityMetadata:{value:Le,loading:Je},entityRef:it,setShadowRoot:Kt}=(0,u.x1)(),Ht=Wt(it),Dt=(0,r.useCallback)(ut=>{Kt(ut),Ee instanceof Function&&Ee()},[Kt,Ee]);return Je===!1&&!Le?r.createElement(A.ErrorPage,{status:"404",statusMessage:"PAGE NOT FOUND"}):Ht?r.createElement(A.Content,null,r.createElement(l.Z,{container:!0},r.createElement(l.Z,{xs:12,item:!0},r.createElement(Y,null)),re&&r.createElement(l.Z,{className:Te.search,xs:"auto",item:!0},r.createElement(m.S,{entityId:it,entityTitle:(Ft=Le==null?void 0:Le.metadata)==null?void 0:Ft.title})),r.createElement(l.Z,{xs:12,item:!0},r.createElement(u.VA,{element:Ht,onAppend:Dt},r.createElement(un,null))))):r.createElement(A.Content,null,r.createElement(l.Z,{container:!0},r.createElement(l.Z,{xs:12,item:!0},r.createElement(Y,null))))}),qt=null},99954:function(ee,s,e){"use strict";e.d(s,{S:function(){return E}});var r=e(2784),t=e(18671),l=e(98069),u=e(73250),A=e(26136),m=e(53479),o=e(48023),c=e(82339),f=e(36964),y=e(68725);const p=r.createElement(l.Z,{animation:"wave",variant:"text",height:40}),E=T=>{const{children:I}=T,B=(0,A.$L)(),j=(0,f.useApi)(f.configApiRef),{title:M,setTitle:b,subtitle:L,setSubtitle:D,entityRef:U,metadata:{value:Y,loading:te},entityMetadata:{value:ue,loading:Re}}=(0,A.x1)();(0,r.useEffect)(()=>{!Y||(b(Ve=>{const{site_name:ie}=Y;return Ve||ie}),D(Ve=>{let{site_description:ie}=Y;return(!ie||ie==="None")&&(ie="Home"),Ve||ie}))},[Y,b,D]);const we=j.getOptional("app.title")||"Backstage",ge=[M,L,we].filter(Boolean).join(" | "),{locationMetadata:ze,spec:_e}=ue||{},et=_e==null?void 0:_e.lifecycle,st=ue?(0,m.getEntityRelations)(ue,o.S4):[],Ct=(0,f.useRouteRef)(y._Z)(),yt=r.createElement(r.Fragment,null,r.createElement(c.HeaderLabel,{label:"Component",value:r.createElement(m.EntityRefLink,{color:"inherit",entityRef:U,title:ue==null?void 0:ue.metadata.title,defaultKind:"Component"})}),st.length>0&&r.createElement(c.HeaderLabel,{label:"Owner",value:r.createElement(m.EntityRefLinks,{color:"inherit",entityRefs:st,defaultKind:"group"})}),et?r.createElement(c.HeaderLabel,{label:"Lifecycle",value:et}):null,ze&&ze.type!=="dir"&&ze.type!=="file"?r.createElement(c.HeaderLabel,{label:"",value:r.createElement("a",{href:ze.target,target:"_blank",rel:"noopener noreferrer"},r.createElement(u.Z,{style:{marginTop:"-25px",fill:"#fff"}}))}):null);return!Re&&ue===void 0||!te&&Y===void 0?null:r.createElement(c.Header,{type:"Documentation",typeLink:Ct,title:M||p,subtitle:L||p},r.createElement(t.Z,{titleTemplate:"%s"},r.createElement("title",null,ge)),yt,I,B.renderComponentsByLocation(A.oZ.Header))}},16172:function(ee,s,e){"use strict";e.d(s,{b:function(){return p}});var r=e(2784),t=e(79692),l=e(15223),u=e(95544),A=e(80030),m=e(61837),o=e(48348),c=e(47603),f=e(26136);const y=(0,t.Z)(E=>({root:{gridArea:"pageSubheader",flexDirection:"column",minHeight:"auto",padding:E.spacing(3,3,0)}})),p=({toolbarProps:E})=>{const T=y(),[I,B]=(0,r.useState)(null),j=(0,r.useCallback)(te=>{B(te.currentTarget)},[]),M=(0,r.useCallback)(()=>{B(null)},[]),{entityMetadata:{value:b,loading:L}}=(0,f.x1)(),D=(0,f.$L)(),U=D.renderComponentsByLocation(f.oZ.Subheader),Y=D.renderComponentsByLocation(f.oZ.Settings);return!U&&!Y||L===!1&&!b?null:r.createElement(l.Z,{classes:T,...E},r.createElement(u.Z,{display:"flex",justifyContent:"flex-end",width:"100%",flexWrap:"wrap"},U,Y?r.createElement(r.Fragment,null,r.createElement(A.ZP,{title:"Settings"},r.createElement(m.Z,{"aria-controls":"tech-docs-reader-page-settings","aria-haspopup":"true",onClick:j},r.createElement(c.Z,null))),r.createElement(o.Z,{id:"tech-docs-reader-page-settings",getContentAnchorEl:null,anchorEl:I,anchorOrigin:{vertical:"bottom",horizontal:"right"},open:Boolean(I),onClose:M,keepMounted:!0},Y)):null))}},2263:function(ee,s,e){"use strict";e.d(s,{DK:function(){return p},m1:function(){return T}});var r=e(2784),t=e(10289),l=e(26136),u=e(36964),A=e(64279),m=e(77446);function o({contentLoading:I,content:B,activeSyncState:j}){return I||j==="BUILD_READY_RELOAD"||!B&&j==="CHECKING"?"CHECKING":!B&&j==="BUILDING"?"INITIAL_BUILD":B?j==="BUILDING"?"CONTENT_STALE_REFRESHING":j==="BUILD_READY"?"CONTENT_STALE_READY":j==="ERROR"?"CONTENT_STALE_ERROR":"CONTENT_FRESH":"CONTENT_NOT_FOUND"}function c(I,B){const j={...I};switch(B.type){case"sync":B.state==="CHECKING"&&(j.buildLog=[]),j.activeSyncState=B.state,j.syncError=B.syncError;break;case"contentLoading":j.contentLoading=!0,j.contentError=void 0;break;case"content":typeof B.path=="string"&&(j.path=B.path),j.contentLoading=!1,j.content=B.content,j.contentError=B.contentError;break;case"buildLog":j.buildLog=j.buildLog.concat(B.log);break;default:throw new Error}return["BUILD_READY","BUILD_READY_RELOAD"].includes(j.activeSyncState)&&["contentLoading","content"].includes(B.type)&&(j.activeSyncState="UP_TO_DATE",j.buildLog=[]),j}function f(I,B,j,M){var ue,Re;const[b,L]=(0,r.useReducer)(c,{activeSyncState:"CHECKING",path:M,contentLoading:!0,buildLog:[]}),D=(0,u.useApi)(l.Dl),{retry:U}=(0,m.Z)(async()=>{L({type:"contentLoading"});try{const we=await D.getEntityDocs({kind:I,namespace:B,name:j},M);return L({type:"content",content:we,path:M}),we}catch(we){L({type:"content",contentError:we,path:M})}},[D,I,B,j,M]),Y=(0,r.useRef)({content:void 0,reload:()=>{}});return Y.current={content:b.content,reload:U},(0,A.default)(async()=>{L({type:"sync",state:"CHECKING"});const we=setTimeout(()=>{L({type:"sync",state:"BUILDING"})},1e3);try{switch(await D.syncEntityDocs({kind:I,namespace:B,name:j},ze=>{L({type:"buildLog",log:ze})})){case"updated":Y.current.content?L({type:"sync",state:"BUILD_READY"}):(Y.current.reload(),L({type:"sync",state:"BUILD_READY_RELOAD"}));break;case"cached":L({type:"sync",state:"UP_TO_DATE"});break;default:L({type:"sync",state:"ERROR",syncError:new Error("Unexpected return state")});break}}catch(ge){L({type:"sync",state:"ERROR",syncError:ge})}finally{clearTimeout(we)}},[I,j,B,D,L,Y]),{state:(0,r.useMemo)(()=>o({activeSyncState:b.activeSyncState,contentLoading:b.contentLoading,content:b.content}),[b.activeSyncState,b.content,b.contentLoading]),contentReload:U,path:b.path,content:b.content,contentErrorMessage:(ue=b.contentError)==null?void 0:ue.toString(),syncErrorMessage:(Re=b.syncError)==null?void 0:Re.toString(),buildLog:b.buildLog}}const y=(0,r.createContext)({}),p=()=>(0,r.useContext)(y),E=({children:I})=>{const{"*":B=""}=(0,t.UO)(),{entityRef:j}=(0,l.x1)(),{kind:M,namespace:b,name:L}=j,D=f(M,b,L,B);return r.createElement(y.Provider,{value:D},I instanceof Function?I(D):I)},T=I=>B=>r.createElement(E,null,r.createElement(I,{...B}))},96393:function(ee,s,e){"use strict";e.d(s,{Fq:function(){return u.F},SE:function(){return l.S}});var r=e(2263),t=e(26220),l=e(99954),u=e(63126),A=e(16172)},68725:function(ee,s,e){"use strict";e.d(s,{Fw:function(){return l},_Z:function(){return t},pd:function(){return u}});var r=e(36964);const t=(0,r.createRouteRef)({id:"techdocs:index-page"}),l=(0,r.createRouteRef)({id:"techdocs:reader-page",params:["namespace","kind","name"]}),u=(0,r.createRouteRef)({id:"techdocs:catalog-reader-view"})},47861:function(ee,s,e){"use strict";e.d(s,{S:function(){return Y}});var r=e(2784),t=e(79692),l=e(49378),u=e(38402),A=e(86136),m=e(85256),o=e(82339),c=e(36964),f=e(74450);const y=(0,t.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",marginBottom:"1rem"}}),p=te=>{const{result:ue,highlight:Re,rank:we,lineClamp:ge=5,asListItem:ze=!0,asLink:_e=!0,title:et,icon:st}=te,Ct=y(),yt=(0,c.useAnalytics)(),Pe=()=>{yt.captureEvent("discover",ue.title,{attributes:{to:ue.location},value:we})},ht=()=>{const de=Re!=null&&Re.fields.title?r.createElement(f.FA,{text:Re.fields.title,preTag:Re.preTag,postTag:Re.postTag}):ue.title,Ue=Re!=null&&Re.fields.entityTitle?r.createElement(f.FA,{text:Re.fields.entityTitle,preTag:Re.preTag,postTag:Re.postTag}):ue.entityTitle,Be=Re!=null&&Re.fields.name?r.createElement(f.FA,{text:Re.fields.name,preTag:Re.preTag,postTag:Re.postTag}):ue.name;return r.createElement(l.Z,{className:Ct.itemText,primaryTypographyProps:{variant:"h6"},primary:et||r.createElement(r.Fragment,null,de," | ",Ue!=null?Ue:Be," docs"),secondary:r.createElement("span",{style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:ge,overflow:"hidden"}},Re!=null&&Re.fields.text?r.createElement(f.FA,{text:Re.fields.text,preTag:Re.preTag,postTag:Re.postTag}):ue.text)})},Ve=({children:de})=>_e?r.createElement(o.Link,{noTrack:!0,to:ue.location,onClick:Pe},de):r.createElement(r.Fragment,null,de),ie=({children:de})=>ze?r.createElement(r.Fragment,null,r.createElement(u.Z,{alignItems:"flex-start"},st&&r.createElement(A.Z,null,st),r.createElement("div",{className:Ct.flexContainer},de)),r.createElement(m.Z,{component:"li"})):r.createElement(r.Fragment,null,de);return r.createElement(Ve,null,r.createElement(ie,null,r.createElement(ht,null)))};var E=e(86619),T=e(50581),I=e(61837),B=e(4614),j=e(21853),M=e(88013),b=e(10289),L=e(48760);const D=(0,t.Z)({root:{width:"100%"}}),U=te=>{const{entityId:ue,entityTitle:Re,debounceTime:we=150}=te,[ge,ze]=(0,r.useState)(!1),_e=(0,b.s0)(),{term:et,setTerm:st,setFilters:Ct,result:{loading:yt,value:Pe}}=(0,f.Rx)(),ht=D(),[Ve,ie]=(0,r.useState)([]);(0,r.useEffect)(()=>{let oe=!0;if(oe&&Pe){const fe=Pe.results.slice(0,10);ie(fe)}return()=>{oe=!1}},[yt,Pe]);const[de,Ue]=(0,r.useState)(et);(0,L.Z)(()=>st(de),we,[de]);const{kind:Be,name:Xe,namespace:mt}=ue;(0,r.useEffect)(()=>{Ct(oe=>({...oe,kind:Be,namespace:mt,name:Xe}))},[Be,mt,Xe,Ct]);const Ye=oe=>{ge||ze(!0),Ue(oe.target.value)},Et=(oe,fe)=>{if(fe!=null&&fe.document){const{location:tt}=fe.document;_e(tt)}};return r.createElement(M.ZP,{classes:{root:ht.root},"data-testid":"techdocs-search-bar",size:"small",open:ge,getOptionLabel:()=>"",filterOptions:oe=>oe,onClose:()=>{ze(!1)},onFocus:()=>{ze(!0)},onChange:Et,blurOnSelect:!0,noOptionsText:"No results found",value:null,options:Ve,renderOption:({document:oe,highlight:fe})=>r.createElement(p,{result:oe,lineClamp:3,asListItem:!1,asLink:!1,title:oe.title,highlight:fe}),loading:yt,renderInput:oe=>r.createElement(E.Z,{...oe,"data-testid":"techdocs-search-bar-input",variant:"outlined",fullWidth:!0,placeholder:`Search ${Re||ue.name} docs`,value:de,onChange:Ye,InputProps:{...oe.InputProps,startAdornment:r.createElement(T.Z,{position:"start"},r.createElement(I.Z,{"aria-label":"Query",disabled:!0},r.createElement(j.Z,null))),endAdornment:r.createElement(r.Fragment,null,yt?r.createElement(B.Z,{color:"inherit",size:20}):null,oe.InputProps.endAdornment)}})})},Y=te=>{const ue={term:"",types:["techdocs"],pageCursor:"",filters:te.entityId};return r.createElement(f.Nd,{initialState:ue},r.createElement(U,{...te}))}},98157:function(){},53260:function(){}},function(ee){var s=function(r){return ee(ee.s=r)};ee.O(0,[2370,6202,9284,2126,7012,9035,4983,3222,6816,5218,4736],function(){return s(88649),s(46054)});var e=ee.O()}]);})();
486
486
 
487
- //# sourceMappingURL=main.b639eb27.js.map
487
+ //# sourceMappingURL=main.c4918ca8.js.map