construct-hub-webapp 0.1.1474 → 0.1.1476
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/build/asset-manifest.json +25 -25
- package/build/index.html +1 -1
- package/build/static/js/323.d9652812.chunk.js.map +1 -1
- package/build/static/js/{332.f6f93c8a.chunk.js → 332.6ab60cf1.chunk.js} +2 -2
- package/build/static/js/{332.f6f93c8a.chunk.js.map → 332.6ab60cf1.chunk.js.map} +1 -1
- package/build/static/js/{375.a100ee61.chunk.js → 375.76065105.chunk.js} +2 -2
- package/build/static/js/{375.a100ee61.chunk.js.map → 375.76065105.chunk.js.map} +1 -1
- package/build/static/js/384.dfcff350.chunk.js +2 -0
- package/build/static/js/384.dfcff350.chunk.js.map +1 -0
- package/build/static/js/{421.252e4117.chunk.js → 421.627c9ed6.chunk.js} +2 -2
- package/build/static/js/{421.252e4117.chunk.js.map → 421.627c9ed6.chunk.js.map} +1 -1
- package/build/static/js/451.9e4eb9e2.chunk.js +2 -0
- package/build/static/js/{451.04173abf.chunk.js.map → 451.9e4eb9e2.chunk.js.map} +1 -1
- package/build/static/js/453.7fc81cd9.chunk.js.map +1 -1
- package/build/static/js/496.45435877.chunk.js.map +1 -1
- package/build/static/js/{589.69bd90c6.chunk.js → 589.5f7aba85.chunk.js} +2 -2
- package/build/static/js/{589.69bd90c6.chunk.js.map → 589.5f7aba85.chunk.js.map} +1 -1
- package/build/static/js/{619.074c2f7c.chunk.js → 619.3e311579.chunk.js} +2 -2
- package/build/static/js/{619.074c2f7c.chunk.js.map → 619.3e311579.chunk.js.map} +1 -1
- package/build/static/js/{685.cd61eeea.chunk.js → 685.6fc4e8fc.chunk.js} +3 -3
- package/build/static/js/685.6fc4e8fc.chunk.js.map +1 -0
- package/build/static/js/{773.e3ce61fb.chunk.js → 773.7518c157.chunk.js} +2 -2
- package/build/static/js/{773.e3ce61fb.chunk.js.map → 773.7518c157.chunk.js.map} +1 -1
- package/build/static/js/8.c95043b2.chunk.js.map +1 -1
- package/build/static/js/{857.84afdc16.chunk.js → 857.33485d12.chunk.js} +2 -2
- package/build/static/js/{857.84afdc16.chunk.js.map → 857.33485d12.chunk.js.map} +1 -1
- package/build/static/js/{959.1e70911e.chunk.js → 959.cfcd33ea.chunk.js} +2 -2
- package/build/static/js/{959.1e70911e.chunk.js.map → 959.cfcd33ea.chunk.js.map} +1 -1
- package/build/static/js/main.6f6fd052.js +3 -0
- package/build/static/js/main.6f6fd052.js.map +1 -0
- package/package.json +5 -5
- package/build/static/js/451.04173abf.chunk.js +0 -2
- package/build/static/js/591.5d31973a.chunk.js +0 -2
- package/build/static/js/591.5d31973a.chunk.js.map +0 -1
- package/build/static/js/685.cd61eeea.chunk.js.map +0 -1
- package/build/static/js/main.0f5610ff.js +0 -3
- package/build/static/js/main.0f5610ff.js.map +0 -1
- /package/build/static/js/{685.cd61eeea.chunk.js.LICENSE.txt → 685.6fc4e8fc.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{main.0f5610ff.js.LICENSE.txt → main.6f6fd052.js.LICENSE.txt} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunkconstruct_hub_webapp||=[]).push([[773],{19608(e,t,n){n.d(t,{f:()=>i});var a=n(31206),s=n(4450),r=n(32892),o=n(70579);const i=e=>{let{label:t,color:n,icon:i}=e;const l=(0,a.dU)("none","brightness(1.75)");return(0,o.jsxs)(s.BJ,{align:"center",direction:"row",filter:l,spacing:2,children:[(0,o.jsx)(r._V,{alt:`${t} icon`,src:i,w:4}),(0,o.jsx)(s.EY,{color:n,fontWeight:"bold",children:t})]})}},83689(e,t,n){n.d(t,{B:()=>o});var a=n(49292),s=n(68195),r=n(70579);const o=e=>{let{children:t,language:n}=e;const o=s.WX.has(n),i=s.I8[n],l=o?`Click to view documentation in ${i}`:`Documentation support for ${i} is coming soon!`;return(0,r.jsx)(a.m,{hasArrow:!0,label:l,placement:"top-start",children:(0,r.jsx)("span",{children:t})})}},10178(e,t,n){n.d(t,{h:()=>L,F:()=>a});let a=function(e){return e.Wide="wide",e}({});var s=n(65043),r=n(4450),o=n(49292),i=n(43222);const l=(0,n(81249).$)("packageCard",["author","description","downloads","languages","published","title","version","comment","wideContainer"]);var d=n(34176),c=n(55410),u=n(71154),h=n(60310),m=n(70579);const v=e=>{let{"data-testid":t,tooltip:n,value:a}=e;return(0,m.jsx)(o.m,{hasArrow:!0,isDisabled:!n,label:n,placement:"left",children:(0,m.jsx)(r.EY,{"data-testid":t,fontSize:"xs",zIndex:1,children:a})})},g=()=>{var e,t,n;const{author:a,metadata:{date:s},name:r}=I(),{data:o}=(0,d.J)(),g=null===o||void 0===o||null===(e=o.packages)||void 0===e||null===(t=e[r])||void 0===t||null===(n=t.downloads)||void 0===n?void 0:n.npm,p="string"===typeof a?a:a.name,x=new Date(s);return(0,m.jsxs)(m.Fragment,{children:[void 0!==g&&(0,m.jsx)(v,{"data-testid":l.downloads,tooltip:"Download numbers are periodically sourced from the npm registry",value:`${g.toLocaleString()} weekly downloads`}),(0,m.jsx)(v,{"data-testid":l.published,value:(0,m.jsx)(h.g,{date:x,fontSize:"xs",formattedDate:(0,i.A)(x,{addSuffix:!0})})}),(0,m.jsx)(v,{"data-testid":l.author,value:(0,m.jsxs)(m.Fragment,{children:["By"," ",(0,m.jsx)(u.k,{color:"link",to:(0,c.iS)({query:p}),children:p})]})})]})};var p=n(62582);const x=e=>{let{comment:t}=e;return(0,m.jsxs)(r.EY,{"data-testid":l.comment,fontSize:"md",lineHeight:"tall",noOfLines:4,children:[(0,m.jsxs)(r.EY,{as:"span",color:"blue.500",fontWeight:"bold",children:["Editor's note:"," "]}),t]})};var j=n(99103),f=n(4029),b=n(47415);const y=()=>{const[e]=(0,f.o)(),{dataEvent:t,description:n,comment:a,constructFrameworks:s,name:o,version:i}=I();return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(r.rI,{as:p.N_,"data-event":t?(0,j.eq)(t,"Package Card",o):void 0,to:(0,c.q$)({name:o,version:i,language:e}),children:(0,m.jsxs)(r.so,{align:"center",children:[(0,m.jsx)(b.Y,{constructFrameworks:s,mr:2,zIndex:1}),(0,m.jsx)(r.DZ,{as:"h3",color:"textPrimary","data-testid":l.title,fontSize:"md",fontWeight:"bold",wordBreak:"normal",children:o})]})}),a?(0,m.jsx)(x,{comment:a}):(0,m.jsx)(r.EY,{color:"textPrimary","data-testid":l.description,fontSize:"md",lineHeight:"tall",noOfLines:4,children:n||"No description available."})]})};var w=n(16195),S=n(19608);const k=()=>{var e,t;const{packageTags:n=[]}=null!==(e=null===(t=I())||void 0===t?void 0:t.metadata)&&void 0!==e?e:{},[a]=(0,w.um)(n);return a?(0,m.jsx)(r.az,{fontSize:"xs",children:(0,m.jsx)(S.f,{...a})}):null};var C=n(68195),T=n(83689);const D={sm:5,md:6,lg:8},E=e=>{let{isRounded:t=!1,languages:n,name:a,size:s="md",version:r}=e;const o=Object.keys(null!==n&&void 0!==n?n:{});return(0,m.jsx)(m.Fragment,{children:Object.entries(C.fN).sort((e,t)=>{let[n]=e,[a]=t;return C.Yj.indexOf(n)-C.Yj.indexOf(a)}).map(e=>{let[n,i]=e;const l=n,d=l===C.TM.TypeScript||o.includes(l),u=l===C.TM.TypeScript||C.WX.has(l);if(!d)return null;const{name:h,icon:v}=i,g=(0,m.jsx)(v,{"aria-label":`Supports ${h}`,borderRadius:t?"50%":0,h:D[s],opacity:u?1:.2,w:D[s]});return(0,m.jsx)(T.B,{language:l,children:u?(0,m.jsx)(p.N_,{"aria-label":`View package docs for ${l}`,to:(0,c.q$)({name:a,version:r,language:l}),children:g}):g},l)})})},F=()=>{const e=I();return(0,m.jsx)(E,{...e,size:"sm"})};var R=n(40483);const B=()=>{const{keywords:e=[],metadata:{packageTags:t=[]}}=I(),n=(0,w.rh)({packageTags:t,keywords:e});return(0,m.jsx)(m.Fragment,{children:n.slice(0,10).map(e=>{let{id:t,keyword:{label:n,color:a}={}}=e;return(0,m.jsx)(R.n,{value:t,variant:a,children:n},t)})})},A=()=>(0,m.jsx)(r.Qe,{_hover:{"> article":{bg:"hoverPrimary"}},children:(0,m.jsxs)(r.xA,{as:"article",bg:"bgSecondary",border:"base",borderRadius:"sm",boxShadow:"base",color:"textPrimary","data-testid":l.wideContainer,h:"full",minH:"12.5rem",templateColumns:{base:"1fr",lg:"1fr 14rem"},w:"full",children:[(0,m.jsxs)(r.so,{direction:"column",justify:"space-between",overflow:"hidden",p:5,sx:{gap:"0.5rem"},children:[(0,m.jsx)(r.BJ,{spacing:3,children:(0,m.jsx)(y,{})}),(0,m.jsx)(r.so,{align:"center",sx:{gap:"0.5rem"},wrap:"wrap",children:(0,m.jsx)(B,{})})]}),(0,m.jsxs)(r.so,{align:{base:"end",lg:"initial"},borderLeft:{lg:"base"},borderTop:{base:"base",lg:"none"},direction:{base:"row",lg:"column"},justify:"space-between",p:5,sx:{gap:"0.5rem"},children:[(0,m.jsxs)(r.BJ,{spacing:1,children:[(0,m.jsx)(k,{}),(0,m.jsx)(r.BJ,{spacing:1,children:(0,m.jsx)(g,{})})]}),(0,m.jsx)(r.BJ,{"data-testid":l.languages,direction:"row",spacing:2,children:(0,m.jsx)(F,{})})]})]})}),O=(0,s.createContext)(null),I=()=>(0,s.useContext)(O),L=e=>{let{"data-event":t,pkg:n,variant:s=a.Wide}=e;return(0,m.jsx)(O.Provider,{value:{...n,dataEvent:t},children:s===a.Wide&&(0,m.jsx)(A,{})})}},40483(e,t,n){n.d(t,{n:()=>i});var a=n(19154),s=n(55410),r=n(71154),o=n(70579);const i=e=>{let{children:t,value:n,label:i=n,zIndex:l,...d}=e;return(0,o.jsx)(r.k,{"aria-label":`Tag: ${i}`,to:(0,s.iS)({keywords:[n]}),zIndex:l,children:(0,o.jsx)(a.vw,{_hover:{textDecoration:"underline"},...d,children:(0,o.jsx)(a.d1,{children:t})})})}},50425(e,t,n){n.d(t,{Y:()=>d});var a=n(65043),s=n(41591);const r={contribute:{event:{name:"Contribute Load"}},home:{event:{name:"Home Load"}},faq:{event:{name:"Frequently Asked Questions Load"}},packageProfile:{event:{name:"Package Profile Load"}},search:{event:{name:"Search Load"}},siteTerms:{event:{name:"Site Terms Load"}},notFound:{page:{pageType:"errorPage"},event:{name:"404 Page Load"}}};var o=n(99103),i=n(49182),l=n(70579);["default-src 'self' 'unsafe-inline' http://*.awsstatic.com;","connect-src 'self' https://*.shortbread.aws.dev http://*.shortbread.aws.dev http://a0.awsstatic.com/ http://amazonwebservices.d2.sc.omtrdc.net http://aws.demdex.net http://dpm.demdex.net http://cm.everesttech.net;","frame-src http://aws.demdex.net http://dpm.demdex.net;","img-src 'self' https://* http://a0.awsstatic.com/ http://amazonwebservices.d2.sc.omtrdc.net http://aws.demdex.net http://dpm.demdex.net http://cm.everesttech.net;","object-src 'none';","style-src 'self' 'unsafe-inline';"].join(" ");const d=e=>{let{children:t,meta:n,pageName:d}=e;const c=(0,o.Or)(r[d]);(0,a.useEffect)(()=>{c()},[c]);const u=(0,i.R)("feeds")||[],{suffix:h=!0,title:m,description:v}=n,g=h?`${m} - Construct Hub`:m;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(s.m,{children:[!1,(0,l.jsx)("meta",{content:"width=device-width, initial-scale=1",name:"viewport"}),(0,l.jsx)("meta",{charSet:"utf-8"}),u.map(e=>{let{url:t,mimeType:n}=e;return(0,l.jsx)("link",{href:t,rel:"alternate",type:n},t)}),(0,l.jsx)("title",{children:g}),(0,l.jsx)("meta",{content:g,property:"og:title"}),(0,l.jsx)("meta",{content:g,name:"twitter:title"}),(0,l.jsx)("meta",{content:"summary",name:"twitter:card"}),(0,l.jsx)("meta",{content:v,name:"description"}),(0,l.jsx)("meta",{content:v,property:"og:description"}),(0,l.jsx)("meta",{content:v,name:"twitter:description"})]}),t]})}},60310(e,t,n){n.d(t,{g:()=>i});var a=n(21038),s=n(4450),r=n(7842),o=n(70579);const i=(0,a.Rf)((e,t)=>{let{date:n,format:a,formattedDate:i,...l}=e;return(0,o.jsx)(s.az,{as:"time",dateTime:n.toISOString(),ref:t,...l,children:null!==i&&void 0!==i?i:(0,r.A)(n,null!==a&&void 0!==a?a:"")})});i.displayName="Time"},49182(e,t,n){n.d(t,{R:()=>s});var a=n(75714);const s=e=>{const{data:t}=(0,a.U)();return(null!==t&&void 0!==t?t:{})[e]}},4029(e,t,n){n.d(t,{o:()=>u});var a=n(65043),s=n(91688),r=n(68195),o=n(32337),i=n(19507);const l=r.TM.TypeScript,d="preferred-language",c=e=>null!=e&&r.WX.has(e),u=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{updateUrl:t,updateSaved:n}=e,{pathname:r,hash:u}=(0,s.zy)(),{replace:h}=(0,s.W6)(),m=(0,i.s)(),v=m.get(o.uB.LANGUAGE),[g,p]=(0,a.useState)(()=>(e=>{if(c(e))return e;try{var t;const e=null!==(t=localStorage.getItem(d))&&void 0!==t?t:"";if(c(e))return e}catch{}return l})(v));(0,a.useEffect)(()=>{c(v)&&v!==g&&p(v)},[v]),(0,a.useEffect)(()=>{v!==g&&t&&(m.set(o.uB.LANGUAGE,g),h({pathname:r,hash:u,search:m.toString()}))},[g,t]);const x=(0,a.useCallback)(e=>{if(p(e),n)try{localStorage.setItem(d,e)}catch{}},[n]);return(0,a.useMemo)(()=>[g,x],[g,x])}},19507(e,t,n){n.d(t,{s:()=>r});var a=n(65043),s=n(91688);const r=()=>{const{search:e}=(0,s.zy)();return(0,a.useMemo)(()=>new URLSearchParams(e),[e])}},16195(e,t,n){var a=n(6546);const s=e=>(null!==e&&void 0!==e?e:[]).filter(e=>{var t;return Boolean(null===(t=e.keyword)||void 0===t?void 0:t.label)}).map(e=>{var t;return{...e,id:null===(t=e.keyword)||void 0===t?void 0:t.label}}),r=e=>!e||e.length<1?[]:e.filter(e=>Boolean(e)&&!a._.has(e)).map(e=>({id:e,keyword:{label:e}}));n.d(t,["rh",0,e=>{let{packageTags:t,keywords:n}=e;const a=new Array,o=new Set;for(const i of[...s(t),...r(n)]){const e=i.keyword.label.toLowerCase();o.has(e)||(a.push(i),o.add(e))}return a},"um",0,e=>!e||e.length<1?[]:e.reduce((e,t)=>t.highlight?[...e,t.highlight]:e,[])])},40773(e,t,n){n.r(t),n.d(t,{default:()=>ye});var a=n(4450),s=n(65043),r=n(95104),o=n(11453),i=n(99103);const l={[o.q.NameAsc]:"A-Z",[o.q.NameDesc]:"Z-A",[o.q.PublishDateAsc]:"Oldest",[o.q.PublishDateDesc]:"Recently updated",[o.q.DownloadsDesc]:"Most downloads",[o.q.DownloadsAsc]:"Least downloads"},d=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,i.eq)("Search",...t)},c={FILTERS:d("Filters"),RESULTS:d("Results"),SEARCH:d("Search"),SORT:d("Sort")};var u=n(14034),h=n(80572),m=n(21668),v=n(70579);const g=e=>{let{name:t,hint:n}=e;const s=(0,h.AD)({base:"auto",md:"right"});return(0,v.jsxs)(a.so,{align:"center",mb:1,children:[(0,v.jsx)(a.DZ,{as:"h3",size:"sm",w:"max-content",children:t}),n?(0,v.jsxs)(m.AM,{colorScheme:"dark",placement:s,strategy:"fixed",children:[(0,v.jsx)(m.Wv,{children:(0,v.jsx)(a.so,{"aria-label":`Hint: ${t}`,as:"button","data-event":(0,i.eq)(c.FILTERS,t,"Popover"),ml:2,children:(0,v.jsx)(u.uI,{h:3.5,w:3.5})})}),(0,v.jsxs)(m.hl,{bg:"gray.700",borderRadius:"base",color:"white",fontSize:"sm",mx:{base:"1rem",md:"initial"},shadow:"whiteAlpha.300",children:[(0,v.jsx)(m.Rp,{bg:"gray.700"}),(0,v.jsx)(m.ej,{children:(0,v.jsx)(a.EY,{children:n})})]})]}):null]})};const p=(0,n(81249).$)("searchRedesign",["page","searchDetails","nextPage","prevPage","goToPage","sortButton","sortDropdown","sortItem","filtersPanel","cdkTypeFilter","cdkVersionFilter","filterItem","languagesFilter"]),x=e=>{let{"data-testid":t,value:n,onValueChange:s,options:o,name:l,hint:d}=e;return(0,v.jsxs)(a.BJ,{"data-testid":t,spacing:1,children:[(0,v.jsx)(g,{hint:d,name:l}),(0,v.jsx)(r.z6,{onChange:s,value:n,children:(0,v.jsx)(a.BJ,{spacing:1,children:o.map(e=>{let{display:t,value:n}=e;const s=(0,i.eq)(c.FILTERS,l,"Filter",t);return(0,v.jsx)(r.sx,{"data-event":s,value:n,children:(0,v.jsx)(a.EY,{color:"textTertiary","data-event":s,"data-testid":p.filterItem,"data-value":n,isTruncated:!0,children:t})},n)})})})]})};var j=n(32337);const f=e=>{const t=parseInt(e);return"NaN"===`${t}`?0:t},b=e=>e?decodeURIComponent(e).split(","):[],y=e=>{if("undefined"===typeof window)return null;return new URL(window.location.href).searchParams.get(e)},w=()=>{var e,t,n,a;return{query:null!==(e=y(j.uB.SEARCH_QUERY))&&void 0!==e?e:"",keywords:b(y(j.uB.KEYWORDS)),cdkType:null!==(t=y(j.uB.CDK_TYPE))&&void 0!==t?t:void 0,cdkMajor:(()=>{const e=y(j.uB.CDK_MAJOR);return e?f(e):void 0})(),languages:b(y(j.uB.LANGUAGES)),offset:f(null!==(n=y(j.uB.OFFSET))&&void 0!==n?n:""),sort:null!==(a=y(j.uB.SORT))&&void 0!==a?a:void 0,tags:b(y(j.uB.TAGS))}};var S=n(19507);const k=(e,t)=>{const n=(0,S.s)().get(e);return(0,s.useMemo)(()=>t?t(n):n,[n])},C=()=>{var e;return null!==(e=k(j.uB.CDK_TYPE))&&void 0!==e?e:void 0},T=()=>k(j.uB.CDK_MAJOR,e=>e?f(e):void 0),D=()=>k(j.uB.KEYWORDS,b),E=()=>k(j.uB.LANGUAGES,b),F=()=>{var e;return null!==(e=k(j.uB.SEARCH_QUERY))&&void 0!==e?e:""},R=()=>{var e;return null!==(e=k(j.uB.SORT))&&void 0!==e?e:void 0},B=()=>k(j.uB.TAGS,b);var A=n(91688),O=n(55410);const I=()=>{const{push:e}=(0,A.W6)();return(0,s.useCallback)(t=>{const{offset:n,...a}=null!==t&&void 0!==t?t:{};e((0,O.iS)({...w(),...a,offset:null!==n&&void 0!==n?n:0}))},[e])};var L=n(99904),P=n(55754);const z=()=>{var e;const t=C(),n=T(),a=I(),r=(0,P.$)(),o=(0,s.useMemo)(()=>{const e=r.constructFrameworks,t=Object.entries(e).reduce((e,t)=>{let[n,a]=t;return a.pkgCount<1?e:{...e,[n]:{display:L.e1[n],value:n,...a}}},{});return Object.keys(t).length?t:void 0},[r]),i=(0,s.useMemo)(()=>{var e;if(!o||!t)return;const n=null===(e=o[t])||void 0===e?void 0:e.majorVersions;return n?[...n].sort((e,t)=>e-t).map(e=>({value:e.toString(),display:`${L.e1[t]} v${e}`})):void 0},[o,t]);if(!o)return null;return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(x,{"data-testid":p.cdkTypeFilter,hint:"Choose the right CDK for your IaC technology: AWS CDK for AWS CloudFormation, CDKTF for Terraform, or CDK8s for Kubernetes.",name:"CDK Type",onValueChange:e=>{a({cdkType:e?e:void 0,cdkMajor:void 0})},options:[{display:"Any CDK Type",value:""},...Object.values(o)],value:null!==t&&void 0!==t?t:""}),!!(i&&i.length>1)&&(0,v.jsx)(x,{"data-testid":p.cdkVersionFilter,hint:"Choose the major version of the CDK you're using to see only constructs that will work with that version.",name:"CDK Major Version",onValueChange:e=>{let t;e&&(t=parseInt(e,10)),a({cdkMajor:t})},options:[{display:"Any Major Version",value:""},...i],value:null!==(e=null===n||void 0===n?void 0:n.toString())&&void 0!==e?e:""})]})};var W=n(35066),$=n(49292),q=n(19754),Y=n(858),M=n(22554);const K=e=>{let{display:t,value:n,isDisabled:s,disabledHint:r,isChecked:o,onChange:i}=e;return(0,v.jsx)(W.Sc,{isChecked:o,isDisabled:s,onChange:i,children:(0,v.jsx)($.m,{hasArrow:!0,isDisabled:!s&&!r,label:r,placement:"right",children:(0,v.jsx)(a.EY,{color:"textTertiary","data-testid":p.filterItem,"data-value":n,isTruncated:!0,children:t})})},n)},J=e=>{let{"data-testid":t,initialItemCount:n,hint:r,name:o,options:l,values:d,onValueChange:h}=e;const m=(0,q.j1)(),{trackCustomEvent:p}=(0,i.st)(),x=e=>()=>{p((0,i.xO)({name:(0,i.eq)(c.FILTERS,o,"Filter",e.display)})),h(e.value)};let j=l,f=[];n&&(j=l.slice(0,n),f=l.slice(n,l.length));const b=f.length>0;return(0,v.jsxs)(a.so,{"data-testid":t,direction:"column",children:[(0,v.jsx)(g,{hint:r,name:o}),(0,v.jsxs)(a.BJ,{mt:1,spacing:1,children:[j.map(e=>(0,s.createElement)(K,{...e,isChecked:d.includes(e.value),key:e.value,onChange:x(e)})),b&&(0,v.jsx)(Y.SD,{animateOpacity:!0,in:m.isOpen,unmountOnExit:!0,children:(0,v.jsx)(a.BJ,{spacing:1,children:f.map(e=>(0,s.createElement)(K,{...e,isChecked:d.includes(e.value),key:e.value,onChange:x(e)}))})})]}),b&&(0,v.jsx)(a.so,{align:"start",mt:1,children:(0,v.jsx)(M.$n,{color:"textTertiary","data-event":(0,i.eq)(c.FILTERS,o,"Show More"),fontWeight:"normal",leftIcon:m.isOpen?(0,v.jsx)(u.Mt,{}):(0,v.jsx)(u.D3,{}),onClick:m.onToggle,size:"sm",textAlign:"left",variant:"link",w:"auto",children:m.isOpen?`Show fewer options (${j.length})`:`Show more options (${f.length})`})})]})},N=()=>{const e=D(),t=(0,P.$)().keywords,n=I(),a=(0,s.useMemo)(()=>{const n=[...t.entries()].sort((e,t)=>{let[,n]=e,[,a]=t;return n<a?1:-1}).filter(t=>{let[n]=t;return!e.includes(n)}).map(e=>{let[t]=e;return{display:t,value:t}}).slice(0,25);return[...e.filter(e=>!n.some(t=>t.value===e)).map(e=>({display:e,value:e})),...n]},[t,e]);return(0,v.jsx)(J,{"data-testid":p.languagesFilter,hint:"Focus the results by choosing one or more keywords reflecting the kind of construct you're looking for. Keywords are provided by construct authors.",initialItemCount:5,name:"Keywords",onValueChange:t=>{n({keywords:e.includes(t)?e.filter(e=>e!==t):[...e,t]})},options:a,values:e})};var U=n(68195);const V=Object.entries(U.I8).map(e=>{let[t,n]=e;return{display:n,value:t,...U.WX.has(t)?{isDisabled:!1}:{isDisabled:!0,disabledHint:`${U.I8[t]} support is coming soon!`}}}).sort((e,t)=>e.isDisabled>t.isDisabled?1:-1),H=()=>{const e=E(),t=I();return(0,v.jsx)(J,{"data-testid":p.languagesFilter,hint:"Choose one or more languages. Results include constructs for use with at least one of the selected languages.",name:"Programming Language",onValueChange:n=>{const a=n;t({languages:e.includes(a)?e.filter(e=>e!==a):[...e,a]})},options:V,values:e})};var _=n(49182);const G=()=>{const e=(0,_.R)("packageTags"),t=(0,_.R)("packageTagGroups"),n=(0,s.useMemo)(()=>{var n;const a=new Map;null===t||void 0===t||t.forEach(e=>{a.set(e.id,e)});return((e,t)=>e.reduce((e,n)=>{var a;const s=null===(a=n.searchFilter)||void 0===a?void 0:a.groupBy,r=s?t.get(s):void 0;if(s&&r){const t=e[s];return t?(t.tags=[...t.tags,n],e):{...e,[s]:{...r,tags:[n]}}}var o,i;return s?{...e,[s]:{id:s,tags:[...null!==(o=null===e||void 0===e||null===(i=e[s])||void 0===i?void 0:i.tags)&&void 0!==o?o:[],n]}}:e},{}))(null!==(n=null===e||void 0===e?void 0:e.filter(e=>Boolean(e.searchFilter)))&&void 0!==n?n:[],a)},[e,t]),a=B(),r=I(),o=e=>{r({tags:a.includes(e)?a.filter(t=>t!==e):[...a,e]})},i=(0,s.useCallback)(e=>{var t,s;const o=new Set((null!==(t=null===(s=n[e])||void 0===s?void 0:s.tags)&&void 0!==t?t:[]).map(e=>{let{id:t}=e;return t}));return e=>{const t=a.filter(e=>!o.has(e));r({tags:e?[...t,e]:t})}},[n,a,r]);return(0,v.jsx)(v.Fragment,{children:Object.values(n).map(e=>{let{filterType:t,id:n,label:r,tooltip:l,tags:d}=e;const c={hint:l,name:null!==r&&void 0!==r?r:n,options:d.map(e=>({display:e.searchFilter.display,value:e.id}))};var u,h;return"radio"===t?(0,s.createElement)(x,{...c,key:n,onValueChange:i(n),options:[{display:`Any ${c.name}`,value:""},...c.options],value:null!==(u=null===(h=d.find(e=>a.includes(e.id)))||void 0===h?void 0:h.id)&&void 0!==u?u:""}):(0,s.createElement)(J,{...c,key:n,onValueChange:o,values:a})})})};var Z=n(45329);const Q="5.75rem",X=()=>(0,v.jsx)(Z.Z,{borderRadius:"sm","data-testid":p.filtersPanel,display:{base:"none",md:"flex"},maxH:`calc(100vh - ${Q} - 1.25rem)`,maxW:"23rem",minW:"100%",overflow:"hidden auto",p:4,pos:"sticky",top:Q,zIndex:"docked",children:(0,v.jsxs)(a.BJ,{color:"textPrimary",h:"max-content",spacing:4,top:4,children:[(0,v.jsx)(a.DZ,{as:"h2",size:"sm",children:"Filters"}),(0,v.jsx)(z,{}),(0,v.jsx)(H,{}),(0,v.jsx)(G,{}),(0,v.jsx)(N,{})]})}),ee=e=>{let{"data-event":t,"data-testid":n,icon:a,label:s,onClick:r}=e;const o={"aria-label":s,borderRadius:"md",borderColor:"blue.500",colorScheme:"blue","data-event":t,"data-testid":n,icon:(0,v.jsx)(a,{color:"blue.500",h:5,w:5}),mx:2,h:10,w:10,variant:"outline"};return(0,v.jsx)(M.K0,{...o,disabled:!r,onClick:r})};var te=n(67682);const ne=e=>{let{"data-event":t,"data-testid":n,pageLimit:r,offset:o}=e;const l=I(),{trackCustomEvent:d}=(0,i.st)(),[c,u]=(0,s.useState)((o+1).toString());(0,s.useEffect)(()=>{u((o+1).toString())},[o]);return(0,v.jsxs)(a.so,{align:"center",as:"form",mx:2,onSubmit:e=>{e.preventDefault(),l({offset:parseInt(c)-1})},children:[(0,v.jsx)(te.pd,{"aria-label":"Jump to page",colorScheme:"brand","data-testid":n,h:10,max:r+1,min:1,name:"page",onChange:e=>{e.preventDefault(),u(e.target.value)},onFocus:()=>{t&&d((0,i.xO)({name:t}))},p:0,textAlign:"center",type:"number",value:c,w:10}),(0,v.jsxs)(a.EY,{ml:2,w:"max-content",children:["of ",r+1]})]})},ae=e=>{let{offset:t,pageLimit:n}=e;const s=I(),r=t<n?()=>s({offset:t+1}):void 0,o=t>0?()=>s({offset:t-1}):void 0;return(0,v.jsxs)(a.BJ,{align:"center",direction:"row",justify:"space-between",maxW:"18rem",mx:"auto",spacing:4,w:"full",children:[(0,v.jsx)(ee,{"data-event":(0,i.eq)(c.RESULTS,"Previous Page"),"data-testid":p.prevPage,icon:u.YJ,label:"Previous page button",onClick:o}),(0,v.jsx)(ne,{"data-event":(0,i.eq)(c.RESULTS,"Go to Page"),"data-testid":p.goToPage,offset:t,pageLimit:n}),(0,v.jsx)(ee,{"data-event":(0,i.eq)(c.RESULTS,"Next Page"),"data-testid":p.nextPage,icon:u.vK,label:"Next page button",onClick:r})]})};var se=n(96833);const re=()=>{const e=F(),t=I(),[n,a]=(0,s.useState)(null!==e&&void 0!==e?e:"");return(0,v.jsx)(se.IW,{bg:"bgSecondary","data-event":c.SEARCH,onChange:e=>a(e.target.value),onSubmit:e=>{e.preventDefault(),t({query:n,sort:void 0})},value:n})},oe=e=>{let{children:t}=e;return(0,v.jsx)(a.EY,{as:"strong",color:"textSecondary",children:t})},ie=e=>{let{first:t,count:n,last:a}=e;return!t&&a>=n?(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(oe,{children:n})," of ",(0,v.jsx)(oe,{children:n})]}):(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)(oe,{children:[n?t+1:n," - ",a>n?n:a]})," ","of ",(0,v.jsx)(oe,{children:n})]})},le=e=>{let{limit:t,offset:n,count:s,filtered:r,query:o}=e;const i=t*n,l=i+t,d=s>0;return(0,v.jsxs)(a.EY,{"data-testid":p.searchDetails,children:[d?(0,v.jsxs)(v.Fragment,{children:["Displaying ",(0,v.jsx)(ie,{count:s,first:i,last:l})," ",r?"search results":"constructs"]}):(0,v.jsx)(v.Fragment,{children:r?"There were no search results":"No constructs found"}),o&&(0,v.jsxs)(v.Fragment,{children:[" for ",(0,v.jsx)(oe,{children:o})]}),".",!d&&r&&(0,v.jsx)(v.Fragment,{children:" Try a different term."})]})};var de=n(62285);const ce=()=>{const e=R(),t=I();return(0,v.jsx)(x,{hint:"Sets the order of search results",name:"Sorted By",onValueChange:e=>{t({sort:e||void 0})},options:[{display:"Relevance",value:""},...Object.entries(l).map(e=>{let[t,n]=e;return{display:n,value:t}})],value:null!==e&&void 0!==e?e:""})},ue=()=>{const e=(0,q.j1)();return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(M.$n,{colorScheme:"brand",display:{md:"none"},onClick:e.onOpen,rightIcon:(0,v.jsx)(u.D3,{}),variant:"link",children:"Sorting and Filters"}),(0,v.jsxs)(de._s,{...e,placement:"bottom",children:[(0,v.jsx)(de.QP,{}),(0,v.jsxs)(de.zj,{color:"textPrimary",maxH:"full",children:[(0,v.jsx)(de.BE,{borderBottom:"base",children:"Sorting and Filters"}),(0,v.jsx)(de.s1,{}),(0,v.jsx)(de.ys,{children:(0,v.jsxs)(a.BJ,{color:"textPrimary",pb:4,spacing:4,children:[(0,v.jsx)(ce,{}),(0,v.jsx)(z,{}),(0,v.jsx)(H,{}),(0,v.jsx)(G,{}),(0,v.jsx)(N,{})]})})]})]})]})};var he=n(84454);const me=()=>{const e=R(),t=I(),n=e?l[e]:"Relevance";return(0,v.jsxs)(a.so,{align:"center",children:[(0,v.jsx)(a.EY,{children:"Sorted by"}),(0,v.jsxs)(he.W1,{children:[(0,v.jsx)(he.IU,{as:M.$n,color:"link","data-event":(0,i.eq)(c.SORT,"Menu"),"data-testid":p.sortButton,ml:2,pl:2,pr:2,py:1,rightIcon:(0,v.jsx)(u.D3,{}),variant:"link",children:n}),(0,v.jsxs)(he.cO,{"data-testid":p.sortDropdown,minW:"180",zIndex:"sticky",children:[(0,v.jsx)(he.Dr,{"data-event":(0,i.eq)(c.SORT,"Option","Relevance"),"data-testid":p.sortItem,"data-value":"",onClick:()=>t({sort:void 0}),children:"Relevance"},"Relevance"),Object.entries(l).map(e=>{let[n,a]=e;return(0,v.jsx)(he.Dr,{"data-event":(0,i.eq)(c.SORT,"Option",a),"data-testid":p.sortItem,"data-value":n,onClick:()=>t({sort:n}),children:a},n)})]})]})]})};var ve=n(4448),ge=n(10178);const pe={[ge.F.Wide]:e=>{let{"data-event":t,items:n}=e;return(0,v.jsx)(a.BJ,{spacing:4,children:n.map(e=>(0,v.jsx)(ge.h,{"data-event":t,pkg:e,variant:ge.F.Wide},`${e.name}-${e.version}`))})}},xe=(0,s.memo)(e=>{let{"data-event":t,cardView:n=ge.F.Wide,items:s,loading:r}=e;if(r||!s)return(0,v.jsx)(a.ov,{children:(0,v.jsx)(ve.y,{size:"xl"})});const o=pe[n];return(0,v.jsx)(o,{"data-event":t,items:s})});xe.displayName="PackageList";var je=n(50425),fe=n(95119);const be=()=>{const e=I(),t=k(j.uB.OFFSET,e=>f(null!==e&&void 0!==e?e:"")),n=F(),r=D(),o=E(),i=T(),l=C(),d=R(),u=B(),{page:h,pageLimit:m,results:g}=(0,fe.v)({offset:t,limit:25,query:n,keywords:r,languages:o,cdkMajor:i,cdkType:l,sort:d,tags:u});return(0,s.useEffect)(()=>{g.length&&(t<0||t>m)&&e(t<0?{offset:0}:{offset:m})},[g,t,m]),(0,s.useEffect)(()=>{window.scrollTo(0,0)},[h]),(0,v.jsx)(je.Y,{meta:{title:n||"Search",description:n?`${g.length} results for ${n} at Construct Hub`:"Search reusable components for your cloud application"},pageName:"search",children:(0,v.jsxs)(a.BJ,{direction:"column",maxW:"100vw",pb:4,px:4,spacing:4,children:[(0,v.jsx)(re,{}),(0,v.jsxs)(a.BJ,{align:{base:"start",lg:"center"},direction:{base:"column-reverse",lg:"row"},justify:{base:"initial",lg:"space-between"},spacing:4,children:[(0,v.jsx)(le,{count:g.length,filtered:!!n,limit:25,offset:t,query:n}),(0,v.jsx)(a.az,{display:{base:"none",md:"initial"},children:(0,v.jsx)(me,{})}),(0,v.jsx)(a.az,{display:{md:"none"},children:(0,v.jsx)(ue,{})})]}),(0,v.jsx)(xe,{"data-event":c.RESULTS,items:h}),(0,v.jsx)(a.az,{w:"full",children:(0,v.jsx)(ae,{offset:t,pageLimit:m})})]})})},ye=()=>(0,v.jsx)(je.Y,{meta:{title:"Search - Construct Hub",description:"Search Construct Libraries for AWS CDK, CDK8s, and CDKTF"},pageName:"search",children:(0,v.jsxs)(a.xA,{"data-testid":p.page,gap:4,h:"full",maxW:"100%",px:{base:0,md:6},py:6,templateColumns:{base:"1fr",md:"auto 1fr"},templateRows:"1fr",children:[(0,v.jsx)(X,{}),(0,v.jsx)(be,{})]})})}}]);
|
|
2
|
-
//# sourceMappingURL=773.
|
|
1
|
+
"use strict";(globalThis.webpackChunkconstruct_hub_webapp||=[]).push([[773],{19608(e,t,n){n.d(t,{f:()=>i});var a=n(31206),s=n(4450),r=n(32892),o=n(70579);const i=e=>{let{label:t,color:n,icon:i}=e;const l=(0,a.dU)("none","brightness(1.75)");return(0,o.jsxs)(s.BJ,{align:"center",direction:"row",filter:l,spacing:2,children:[(0,o.jsx)(r._V,{alt:`${t} icon`,src:i,w:4}),(0,o.jsx)(s.EY,{color:n,fontWeight:"bold",children:t})]})}},83689(e,t,n){n.d(t,{B:()=>o});var a=n(49292),s=n(68195),r=n(70579);const o=e=>{let{children:t,language:n}=e;const o=s.WX.has(n),i=s.I8[n],l=o?`Click to view documentation in ${i}`:`Documentation support for ${i} is coming soon!`;return(0,r.jsx)(a.m,{hasArrow:!0,label:l,placement:"top-start",children:(0,r.jsx)("span",{children:t})})}},10178(e,t,n){n.d(t,{h:()=>L,F:()=>a});let a=function(e){return e.Wide="wide",e}({});var s=n(65043),r=n(4450),o=n(49292),i=n(43222);const l=(0,n(81249).$)("packageCard",["author","description","downloads","languages","published","title","version","comment","wideContainer"]);var d=n(34176),c=n(55410),u=n(71154),h=n(60310),m=n(70579);const v=e=>{let{"data-testid":t,tooltip:n,value:a}=e;return(0,m.jsx)(o.m,{hasArrow:!0,isDisabled:!n,label:n,placement:"left",children:(0,m.jsx)(r.EY,{"data-testid":t,fontSize:"xs",zIndex:1,children:a})})},g=()=>{var e,t,n;const{author:a,metadata:{date:s},name:r}=I(),{data:o}=(0,d.J)(),g=null===o||void 0===o||null===(e=o.packages)||void 0===e||null===(t=e[r])||void 0===t||null===(n=t.downloads)||void 0===n?void 0:n.npm,p="string"===typeof a?a:a.name,x=new Date(s);return(0,m.jsxs)(m.Fragment,{children:[void 0!==g&&(0,m.jsx)(v,{"data-testid":l.downloads,tooltip:"Download numbers are periodically sourced from the npm registry",value:`${g.toLocaleString()} weekly downloads`}),(0,m.jsx)(v,{"data-testid":l.published,value:(0,m.jsx)(h.g,{date:x,fontSize:"xs",formattedDate:(0,i.A)(x,{addSuffix:!0})})}),(0,m.jsx)(v,{"data-testid":l.author,value:(0,m.jsxs)(m.Fragment,{children:["By"," ",(0,m.jsx)(u.k,{color:"link",to:(0,c.iS)({query:p}),children:p})]})})]})};var p=n(62582);const x=e=>{let{comment:t}=e;return(0,m.jsxs)(r.EY,{"data-testid":l.comment,fontSize:"md",lineHeight:"tall",noOfLines:4,children:[(0,m.jsxs)(r.EY,{as:"span",color:"blue.500",fontWeight:"bold",children:["Editor's note:"," "]}),t]})};var j=n(99103),f=n(4029),b=n(47415);const y=()=>{const[e]=(0,f.o)(),{dataEvent:t,description:n,comment:a,constructFrameworks:s,name:o,version:i}=I();return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(r.rI,{as:p.N_,"data-event":t?(0,j.eq)(t,"Package Card",o):void 0,to:(0,c.q$)({name:o,version:i,language:e}),children:(0,m.jsxs)(r.so,{align:"center",children:[(0,m.jsx)(b.Y,{constructFrameworks:s,mr:2,zIndex:1}),(0,m.jsx)(r.DZ,{as:"h3",color:"textPrimary","data-testid":l.title,fontSize:"md",fontWeight:"bold",wordBreak:"normal",children:o})]})}),a?(0,m.jsx)(x,{comment:a}):(0,m.jsx)(r.EY,{color:"textPrimary","data-testid":l.description,fontSize:"md",lineHeight:"tall",noOfLines:4,children:n||"No description available."})]})};var w=n(16195),S=n(19608);const k=()=>{var e,t;const{packageTags:n=[]}=null!==(e=null===(t=I())||void 0===t?void 0:t.metadata)&&void 0!==e?e:{},[a]=(0,w.um)(n);return a?(0,m.jsx)(r.az,{fontSize:"xs",children:(0,m.jsx)(S.f,{...a})}):null};var C=n(68195),T=n(83689);const D={sm:5,md:6,lg:8},E=e=>{let{isRounded:t=!1,languages:n,name:a,size:s="md",version:r}=e;const o=Object.keys(null!==n&&void 0!==n?n:{});return(0,m.jsx)(m.Fragment,{children:Object.entries(C.fN).sort((e,t)=>{let[n]=e,[a]=t;return C.Yj.indexOf(n)-C.Yj.indexOf(a)}).map(e=>{let[n,i]=e;const l=n,d=l===C.TM.TypeScript||o.includes(l),u=l===C.TM.TypeScript||C.WX.has(l);if(!d)return null;const{name:h,icon:v}=i,g=(0,m.jsx)(v,{"aria-label":`Supports ${h}`,borderRadius:t?"50%":0,h:D[s],opacity:u?1:.2,w:D[s]});return(0,m.jsx)(T.B,{language:l,children:u?(0,m.jsx)(p.N_,{"aria-label":`View package docs for ${l}`,to:(0,c.q$)({name:a,version:r,language:l}),children:g}):g},l)})})},F=()=>{const e=I();return(0,m.jsx)(E,{...e,size:"sm"})};var R=n(40483);const B=()=>{const{keywords:e=[],metadata:{packageTags:t=[]}}=I(),n=(0,w.rh)({packageTags:t,keywords:e});return(0,m.jsx)(m.Fragment,{children:n.slice(0,10).map(e=>{let{id:t,keyword:{label:n,color:a}={}}=e;return(0,m.jsx)(R.n,{value:t,variant:a,children:n},t)})})},A=()=>(0,m.jsx)(r.Qe,{_hover:{"> article":{bg:"hoverPrimary"}},children:(0,m.jsxs)(r.xA,{as:"article",bg:"bgSecondary",border:"base",borderRadius:"sm",boxShadow:"base",color:"textPrimary","data-testid":l.wideContainer,h:"full",minH:"12.5rem",templateColumns:{base:"1fr",lg:"1fr 14rem"},w:"full",children:[(0,m.jsxs)(r.so,{direction:"column",justify:"space-between",overflow:"hidden",p:5,sx:{gap:"0.5rem"},children:[(0,m.jsx)(r.BJ,{spacing:3,children:(0,m.jsx)(y,{})}),(0,m.jsx)(r.so,{align:"center",sx:{gap:"0.5rem"},wrap:"wrap",children:(0,m.jsx)(B,{})})]}),(0,m.jsxs)(r.so,{align:{base:"end",lg:"initial"},borderLeft:{lg:"base"},borderTop:{base:"base",lg:"none"},direction:{base:"row",lg:"column"},justify:"space-between",p:5,sx:{gap:"0.5rem"},children:[(0,m.jsxs)(r.BJ,{spacing:1,children:[(0,m.jsx)(k,{}),(0,m.jsx)(r.BJ,{spacing:1,children:(0,m.jsx)(g,{})})]}),(0,m.jsx)(r.BJ,{"data-testid":l.languages,direction:"row",spacing:2,children:(0,m.jsx)(F,{})})]})]})}),O=(0,s.createContext)(null),I=()=>(0,s.useContext)(O),L=e=>{let{"data-event":t,pkg:n,variant:s=a.Wide}=e;return(0,m.jsx)(O.Provider,{value:{...n,dataEvent:t},children:s===a.Wide&&(0,m.jsx)(A,{})})}},40483(e,t,n){n.d(t,{n:()=>i});var a=n(19154),s=n(55410),r=n(71154),o=n(70579);const i=e=>{let{children:t,value:n,label:i=n,zIndex:l,...d}=e;return(0,o.jsx)(r.k,{"aria-label":`Tag: ${i}`,to:(0,s.iS)({keywords:[n]}),zIndex:l,children:(0,o.jsx)(a.vw,{_hover:{textDecoration:"underline"},...d,children:(0,o.jsx)(a.d1,{children:t})})})}},50425(e,t,n){n.d(t,{Y:()=>d});var a=n(65043),s=n(38384);const r={contribute:{event:{name:"Contribute Load"}},home:{event:{name:"Home Load"}},faq:{event:{name:"Frequently Asked Questions Load"}},packageProfile:{event:{name:"Package Profile Load"}},search:{event:{name:"Search Load"}},siteTerms:{event:{name:"Site Terms Load"}},notFound:{page:{pageType:"errorPage"},event:{name:"404 Page Load"}}};var o=n(99103),i=n(49182),l=n(70579);["default-src 'self' 'unsafe-inline' http://*.awsstatic.com;","connect-src 'self' https://*.shortbread.aws.dev http://*.shortbread.aws.dev http://a0.awsstatic.com/ http://amazonwebservices.d2.sc.omtrdc.net http://aws.demdex.net http://dpm.demdex.net http://cm.everesttech.net;","frame-src http://aws.demdex.net http://dpm.demdex.net;","img-src 'self' https://* http://a0.awsstatic.com/ http://amazonwebservices.d2.sc.omtrdc.net http://aws.demdex.net http://dpm.demdex.net http://cm.everesttech.net;","object-src 'none';","style-src 'self' 'unsafe-inline';"].join(" ");const d=e=>{let{children:t,meta:n,pageName:d}=e;const c=(0,o.Or)(r[d]);(0,a.useEffect)(()=>{c()},[c]);const u=(0,i.R)("feeds")||[],{suffix:h=!0,title:m,description:v}=n,g=h?`${m} - Construct Hub`:m;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(s.m,{children:[!1,(0,l.jsx)("meta",{content:"width=device-width, initial-scale=1",name:"viewport"}),(0,l.jsx)("meta",{charSet:"utf-8"}),u.map(e=>{let{url:t,mimeType:n}=e;return(0,l.jsx)("link",{href:t,rel:"alternate",type:n},t)}),(0,l.jsx)("title",{children:g}),(0,l.jsx)("meta",{content:g,property:"og:title"}),(0,l.jsx)("meta",{content:g,name:"twitter:title"}),(0,l.jsx)("meta",{content:"summary",name:"twitter:card"}),(0,l.jsx)("meta",{content:v,name:"description"}),(0,l.jsx)("meta",{content:v,property:"og:description"}),(0,l.jsx)("meta",{content:v,name:"twitter:description"})]}),t]})}},60310(e,t,n){n.d(t,{g:()=>i});var a=n(21038),s=n(4450),r=n(7842),o=n(70579);const i=(0,a.Rf)((e,t)=>{let{date:n,format:a,formattedDate:i,...l}=e;return(0,o.jsx)(s.az,{as:"time",dateTime:n.toISOString(),ref:t,...l,children:null!==i&&void 0!==i?i:(0,r.A)(n,null!==a&&void 0!==a?a:"")})});i.displayName="Time"},49182(e,t,n){n.d(t,{R:()=>s});var a=n(75714);const s=e=>{const{data:t}=(0,a.U)();return(null!==t&&void 0!==t?t:{})[e]}},4029(e,t,n){n.d(t,{o:()=>u});var a=n(65043),s=n(91688),r=n(68195),o=n(32337),i=n(19507);const l=r.TM.TypeScript,d="preferred-language",c=e=>null!=e&&r.WX.has(e),u=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{updateUrl:t,updateSaved:n}=e,{pathname:r,hash:u}=(0,s.zy)(),{replace:h}=(0,s.W6)(),m=(0,i.s)(),v=m.get(o.uB.LANGUAGE),[g,p]=(0,a.useState)(()=>(e=>{if(c(e))return e;try{var t;const e=null!==(t=localStorage.getItem(d))&&void 0!==t?t:"";if(c(e))return e}catch{}return l})(v));(0,a.useEffect)(()=>{c(v)&&v!==g&&p(v)},[v]),(0,a.useEffect)(()=>{v!==g&&t&&(m.set(o.uB.LANGUAGE,g),h({pathname:r,hash:u,search:m.toString()}))},[g,t]);const x=(0,a.useCallback)(e=>{if(p(e),n)try{localStorage.setItem(d,e)}catch{}},[n]);return(0,a.useMemo)(()=>[g,x],[g,x])}},19507(e,t,n){n.d(t,{s:()=>r});var a=n(65043),s=n(91688);const r=()=>{const{search:e}=(0,s.zy)();return(0,a.useMemo)(()=>new URLSearchParams(e),[e])}},16195(e,t,n){var a=n(6546);const s=e=>(null!==e&&void 0!==e?e:[]).filter(e=>{var t;return Boolean(null===(t=e.keyword)||void 0===t?void 0:t.label)}).map(e=>{var t;return{...e,id:null===(t=e.keyword)||void 0===t?void 0:t.label}}),r=e=>!e||e.length<1?[]:e.filter(e=>Boolean(e)&&!a._.has(e)).map(e=>({id:e,keyword:{label:e}}));n.d(t,["rh",0,e=>{let{packageTags:t,keywords:n}=e;const a=new Array,o=new Set;for(const i of[...s(t),...r(n)]){const e=i.keyword.label.toLowerCase();o.has(e)||(a.push(i),o.add(e))}return a},"um",0,e=>!e||e.length<1?[]:e.reduce((e,t)=>t.highlight?[...e,t.highlight]:e,[])])},40773(e,t,n){n.r(t),n.d(t,{default:()=>ye});var a=n(4450),s=n(65043),r=n(95104),o=n(11453),i=n(99103);const l={[o.q.NameAsc]:"A-Z",[o.q.NameDesc]:"Z-A",[o.q.PublishDateAsc]:"Oldest",[o.q.PublishDateDesc]:"Recently updated",[o.q.DownloadsDesc]:"Most downloads",[o.q.DownloadsAsc]:"Least downloads"},d=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,i.eq)("Search",...t)},c={FILTERS:d("Filters"),RESULTS:d("Results"),SEARCH:d("Search"),SORT:d("Sort")};var u=n(14034),h=n(80572),m=n(21668),v=n(70579);const g=e=>{let{name:t,hint:n}=e;const s=(0,h.AD)({base:"auto",md:"right"});return(0,v.jsxs)(a.so,{align:"center",mb:1,children:[(0,v.jsx)(a.DZ,{as:"h3",size:"sm",w:"max-content",children:t}),n?(0,v.jsxs)(m.AM,{colorScheme:"dark",placement:s,strategy:"fixed",children:[(0,v.jsx)(m.Wv,{children:(0,v.jsx)(a.so,{"aria-label":`Hint: ${t}`,as:"button","data-event":(0,i.eq)(c.FILTERS,t,"Popover"),ml:2,children:(0,v.jsx)(u.uI,{h:3.5,w:3.5})})}),(0,v.jsxs)(m.hl,{bg:"gray.700",borderRadius:"base",color:"white",fontSize:"sm",mx:{base:"1rem",md:"initial"},shadow:"whiteAlpha.300",children:[(0,v.jsx)(m.Rp,{bg:"gray.700"}),(0,v.jsx)(m.ej,{children:(0,v.jsx)(a.EY,{children:n})})]})]}):null]})};const p=(0,n(81249).$)("searchRedesign",["page","searchDetails","nextPage","prevPage","goToPage","sortButton","sortDropdown","sortItem","filtersPanel","cdkTypeFilter","cdkVersionFilter","filterItem","languagesFilter"]),x=e=>{let{"data-testid":t,value:n,onValueChange:s,options:o,name:l,hint:d}=e;return(0,v.jsxs)(a.BJ,{"data-testid":t,spacing:1,children:[(0,v.jsx)(g,{hint:d,name:l}),(0,v.jsx)(r.z6,{onChange:s,value:n,children:(0,v.jsx)(a.BJ,{spacing:1,children:o.map(e=>{let{display:t,value:n}=e;const s=(0,i.eq)(c.FILTERS,l,"Filter",t);return(0,v.jsx)(r.sx,{"data-event":s,value:n,children:(0,v.jsx)(a.EY,{color:"textTertiary","data-event":s,"data-testid":p.filterItem,"data-value":n,isTruncated:!0,children:t})},n)})})})]})};var j=n(32337);const f=e=>{const t=parseInt(e);return"NaN"===`${t}`?0:t},b=e=>e?decodeURIComponent(e).split(","):[],y=e=>{if("undefined"===typeof window)return null;return new URL(window.location.href).searchParams.get(e)},w=()=>{var e,t,n,a;return{query:null!==(e=y(j.uB.SEARCH_QUERY))&&void 0!==e?e:"",keywords:b(y(j.uB.KEYWORDS)),cdkType:null!==(t=y(j.uB.CDK_TYPE))&&void 0!==t?t:void 0,cdkMajor:(()=>{const e=y(j.uB.CDK_MAJOR);return e?f(e):void 0})(),languages:b(y(j.uB.LANGUAGES)),offset:f(null!==(n=y(j.uB.OFFSET))&&void 0!==n?n:""),sort:null!==(a=y(j.uB.SORT))&&void 0!==a?a:void 0,tags:b(y(j.uB.TAGS))}};var S=n(19507);const k=(e,t)=>{const n=(0,S.s)().get(e);return(0,s.useMemo)(()=>t?t(n):n,[n])},C=()=>{var e;return null!==(e=k(j.uB.CDK_TYPE))&&void 0!==e?e:void 0},T=()=>k(j.uB.CDK_MAJOR,e=>e?f(e):void 0),D=()=>k(j.uB.KEYWORDS,b),E=()=>k(j.uB.LANGUAGES,b),F=()=>{var e;return null!==(e=k(j.uB.SEARCH_QUERY))&&void 0!==e?e:""},R=()=>{var e;return null!==(e=k(j.uB.SORT))&&void 0!==e?e:void 0},B=()=>k(j.uB.TAGS,b);var A=n(91688),O=n(55410);const I=()=>{const{push:e}=(0,A.W6)();return(0,s.useCallback)(t=>{const{offset:n,...a}=null!==t&&void 0!==t?t:{};e((0,O.iS)({...w(),...a,offset:null!==n&&void 0!==n?n:0}))},[e])};var L=n(99904),P=n(55754);const z=()=>{var e;const t=C(),n=T(),a=I(),r=(0,P.$)(),o=(0,s.useMemo)(()=>{const e=r.constructFrameworks,t=Object.entries(e).reduce((e,t)=>{let[n,a]=t;return a.pkgCount<1?e:{...e,[n]:{display:L.e1[n],value:n,...a}}},{});return Object.keys(t).length?t:void 0},[r]),i=(0,s.useMemo)(()=>{var e;if(!o||!t)return;const n=null===(e=o[t])||void 0===e?void 0:e.majorVersions;return n?[...n].sort((e,t)=>e-t).map(e=>({value:e.toString(),display:`${L.e1[t]} v${e}`})):void 0},[o,t]);if(!o)return null;return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(x,{"data-testid":p.cdkTypeFilter,hint:"Choose the right CDK for your IaC technology: AWS CDK for AWS CloudFormation, CDKTF for Terraform, or CDK8s for Kubernetes.",name:"CDK Type",onValueChange:e=>{a({cdkType:e?e:void 0,cdkMajor:void 0})},options:[{display:"Any CDK Type",value:""},...Object.values(o)],value:null!==t&&void 0!==t?t:""}),!!(i&&i.length>1)&&(0,v.jsx)(x,{"data-testid":p.cdkVersionFilter,hint:"Choose the major version of the CDK you're using to see only constructs that will work with that version.",name:"CDK Major Version",onValueChange:e=>{let t;e&&(t=parseInt(e,10)),a({cdkMajor:t})},options:[{display:"Any Major Version",value:""},...i],value:null!==(e=null===n||void 0===n?void 0:n.toString())&&void 0!==e?e:""})]})};var W=n(35066),$=n(49292),q=n(15550),Y=n(858),M=n(22554);const K=e=>{let{display:t,value:n,isDisabled:s,disabledHint:r,isChecked:o,onChange:i}=e;return(0,v.jsx)(W.Sc,{isChecked:o,isDisabled:s,onChange:i,children:(0,v.jsx)($.m,{hasArrow:!0,isDisabled:!s&&!r,label:r,placement:"right",children:(0,v.jsx)(a.EY,{color:"textTertiary","data-testid":p.filterItem,"data-value":n,isTruncated:!0,children:t})})},n)},J=e=>{let{"data-testid":t,initialItemCount:n,hint:r,name:o,options:l,values:d,onValueChange:h}=e;const m=(0,q.j1)(),{trackCustomEvent:p}=(0,i.st)(),x=e=>()=>{p((0,i.xO)({name:(0,i.eq)(c.FILTERS,o,"Filter",e.display)})),h(e.value)};let j=l,f=[];n&&(j=l.slice(0,n),f=l.slice(n,l.length));const b=f.length>0;return(0,v.jsxs)(a.so,{"data-testid":t,direction:"column",children:[(0,v.jsx)(g,{hint:r,name:o}),(0,v.jsxs)(a.BJ,{mt:1,spacing:1,children:[j.map(e=>(0,s.createElement)(K,{...e,isChecked:d.includes(e.value),key:e.value,onChange:x(e)})),b&&(0,v.jsx)(Y.SD,{animateOpacity:!0,in:m.isOpen,unmountOnExit:!0,children:(0,v.jsx)(a.BJ,{spacing:1,children:f.map(e=>(0,s.createElement)(K,{...e,isChecked:d.includes(e.value),key:e.value,onChange:x(e)}))})})]}),b&&(0,v.jsx)(a.so,{align:"start",mt:1,children:(0,v.jsx)(M.$n,{color:"textTertiary","data-event":(0,i.eq)(c.FILTERS,o,"Show More"),fontWeight:"normal",leftIcon:m.isOpen?(0,v.jsx)(u.Mt,{}):(0,v.jsx)(u.D3,{}),onClick:m.onToggle,size:"sm",textAlign:"left",variant:"link",w:"auto",children:m.isOpen?`Show fewer options (${j.length})`:`Show more options (${f.length})`})})]})},N=()=>{const e=D(),t=(0,P.$)().keywords,n=I(),a=(0,s.useMemo)(()=>{const n=[...t.entries()].sort((e,t)=>{let[,n]=e,[,a]=t;return n<a?1:-1}).filter(t=>{let[n]=t;return!e.includes(n)}).map(e=>{let[t]=e;return{display:t,value:t}}).slice(0,25);return[...e.filter(e=>!n.some(t=>t.value===e)).map(e=>({display:e,value:e})),...n]},[t,e]);return(0,v.jsx)(J,{"data-testid":p.languagesFilter,hint:"Focus the results by choosing one or more keywords reflecting the kind of construct you're looking for. Keywords are provided by construct authors.",initialItemCount:5,name:"Keywords",onValueChange:t=>{n({keywords:e.includes(t)?e.filter(e=>e!==t):[...e,t]})},options:a,values:e})};var U=n(68195);const V=Object.entries(U.I8).map(e=>{let[t,n]=e;return{display:n,value:t,...U.WX.has(t)?{isDisabled:!1}:{isDisabled:!0,disabledHint:`${U.I8[t]} support is coming soon!`}}}).sort((e,t)=>e.isDisabled>t.isDisabled?1:-1),H=()=>{const e=E(),t=I();return(0,v.jsx)(J,{"data-testid":p.languagesFilter,hint:"Choose one or more languages. Results include constructs for use with at least one of the selected languages.",name:"Programming Language",onValueChange:n=>{const a=n;t({languages:e.includes(a)?e.filter(e=>e!==a):[...e,a]})},options:V,values:e})};var _=n(49182);const G=()=>{const e=(0,_.R)("packageTags"),t=(0,_.R)("packageTagGroups"),n=(0,s.useMemo)(()=>{var n;const a=new Map;null===t||void 0===t||t.forEach(e=>{a.set(e.id,e)});return((e,t)=>e.reduce((e,n)=>{var a;const s=null===(a=n.searchFilter)||void 0===a?void 0:a.groupBy,r=s?t.get(s):void 0;if(s&&r){const t=e[s];return t?(t.tags=[...t.tags,n],e):{...e,[s]:{...r,tags:[n]}}}var o,i;return s?{...e,[s]:{id:s,tags:[...null!==(o=null===e||void 0===e||null===(i=e[s])||void 0===i?void 0:i.tags)&&void 0!==o?o:[],n]}}:e},{}))(null!==(n=null===e||void 0===e?void 0:e.filter(e=>Boolean(e.searchFilter)))&&void 0!==n?n:[],a)},[e,t]),a=B(),r=I(),o=e=>{r({tags:a.includes(e)?a.filter(t=>t!==e):[...a,e]})},i=(0,s.useCallback)(e=>{var t,s;const o=new Set((null!==(t=null===(s=n[e])||void 0===s?void 0:s.tags)&&void 0!==t?t:[]).map(e=>{let{id:t}=e;return t}));return e=>{const t=a.filter(e=>!o.has(e));r({tags:e?[...t,e]:t})}},[n,a,r]);return(0,v.jsx)(v.Fragment,{children:Object.values(n).map(e=>{let{filterType:t,id:n,label:r,tooltip:l,tags:d}=e;const c={hint:l,name:null!==r&&void 0!==r?r:n,options:d.map(e=>({display:e.searchFilter.display,value:e.id}))};var u,h;return"radio"===t?(0,s.createElement)(x,{...c,key:n,onValueChange:i(n),options:[{display:`Any ${c.name}`,value:""},...c.options],value:null!==(u=null===(h=d.find(e=>a.includes(e.id)))||void 0===h?void 0:h.id)&&void 0!==u?u:""}):(0,s.createElement)(J,{...c,key:n,onValueChange:o,values:a})})})};var Z=n(45329);const Q="5.75rem",X=()=>(0,v.jsx)(Z.Z,{borderRadius:"sm","data-testid":p.filtersPanel,display:{base:"none",md:"flex"},maxH:`calc(100vh - ${Q} - 1.25rem)`,maxW:"23rem",minW:"100%",overflow:"hidden auto",p:4,pos:"sticky",top:Q,zIndex:"docked",children:(0,v.jsxs)(a.BJ,{color:"textPrimary",h:"max-content",spacing:4,top:4,children:[(0,v.jsx)(a.DZ,{as:"h2",size:"sm",children:"Filters"}),(0,v.jsx)(z,{}),(0,v.jsx)(H,{}),(0,v.jsx)(G,{}),(0,v.jsx)(N,{})]})}),ee=e=>{let{"data-event":t,"data-testid":n,icon:a,label:s,onClick:r}=e;const o={"aria-label":s,borderRadius:"md",borderColor:"blue.500",colorScheme:"blue","data-event":t,"data-testid":n,icon:(0,v.jsx)(a,{color:"blue.500",h:5,w:5}),mx:2,h:10,w:10,variant:"outline"};return(0,v.jsx)(M.K0,{...o,disabled:!r,onClick:r})};var te=n(67682);const ne=e=>{let{"data-event":t,"data-testid":n,pageLimit:r,offset:o}=e;const l=I(),{trackCustomEvent:d}=(0,i.st)(),[c,u]=(0,s.useState)((o+1).toString());(0,s.useEffect)(()=>{u((o+1).toString())},[o]);return(0,v.jsxs)(a.so,{align:"center",as:"form",mx:2,onSubmit:e=>{e.preventDefault(),l({offset:parseInt(c)-1})},children:[(0,v.jsx)(te.pd,{"aria-label":"Jump to page",colorScheme:"brand","data-testid":n,h:10,max:r+1,min:1,name:"page",onChange:e=>{e.preventDefault(),u(e.target.value)},onFocus:()=>{t&&d((0,i.xO)({name:t}))},p:0,textAlign:"center",type:"number",value:c,w:10}),(0,v.jsxs)(a.EY,{ml:2,w:"max-content",children:["of ",r+1]})]})},ae=e=>{let{offset:t,pageLimit:n}=e;const s=I(),r=t<n?()=>s({offset:t+1}):void 0,o=t>0?()=>s({offset:t-1}):void 0;return(0,v.jsxs)(a.BJ,{align:"center",direction:"row",justify:"space-between",maxW:"18rem",mx:"auto",spacing:4,w:"full",children:[(0,v.jsx)(ee,{"data-event":(0,i.eq)(c.RESULTS,"Previous Page"),"data-testid":p.prevPage,icon:u.YJ,label:"Previous page button",onClick:o}),(0,v.jsx)(ne,{"data-event":(0,i.eq)(c.RESULTS,"Go to Page"),"data-testid":p.goToPage,offset:t,pageLimit:n}),(0,v.jsx)(ee,{"data-event":(0,i.eq)(c.RESULTS,"Next Page"),"data-testid":p.nextPage,icon:u.vK,label:"Next page button",onClick:r})]})};var se=n(96833);const re=()=>{const e=F(),t=I(),[n,a]=(0,s.useState)(null!==e&&void 0!==e?e:"");return(0,v.jsx)(se.IW,{bg:"bgSecondary","data-event":c.SEARCH,onChange:e=>a(e.target.value),onSubmit:e=>{e.preventDefault(),t({query:n,sort:void 0})},value:n})},oe=e=>{let{children:t}=e;return(0,v.jsx)(a.EY,{as:"strong",color:"textSecondary",children:t})},ie=e=>{let{first:t,count:n,last:a}=e;return!t&&a>=n?(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(oe,{children:n})," of ",(0,v.jsx)(oe,{children:n})]}):(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)(oe,{children:[n?t+1:n," - ",a>n?n:a]})," ","of ",(0,v.jsx)(oe,{children:n})]})},le=e=>{let{limit:t,offset:n,count:s,filtered:r,query:o}=e;const i=t*n,l=i+t,d=s>0;return(0,v.jsxs)(a.EY,{"data-testid":p.searchDetails,children:[d?(0,v.jsxs)(v.Fragment,{children:["Displaying ",(0,v.jsx)(ie,{count:s,first:i,last:l})," ",r?"search results":"constructs"]}):(0,v.jsx)(v.Fragment,{children:r?"There were no search results":"No constructs found"}),o&&(0,v.jsxs)(v.Fragment,{children:[" for ",(0,v.jsx)(oe,{children:o})]}),".",!d&&r&&(0,v.jsx)(v.Fragment,{children:" Try a different term."})]})};var de=n(62285);const ce=()=>{const e=R(),t=I();return(0,v.jsx)(x,{hint:"Sets the order of search results",name:"Sorted By",onValueChange:e=>{t({sort:e||void 0})},options:[{display:"Relevance",value:""},...Object.entries(l).map(e=>{let[t,n]=e;return{display:n,value:t}})],value:null!==e&&void 0!==e?e:""})},ue=()=>{const e=(0,q.j1)();return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(M.$n,{colorScheme:"brand",display:{md:"none"},onClick:e.onOpen,rightIcon:(0,v.jsx)(u.D3,{}),variant:"link",children:"Sorting and Filters"}),(0,v.jsxs)(de._s,{...e,placement:"bottom",children:[(0,v.jsx)(de.QP,{}),(0,v.jsxs)(de.zj,{color:"textPrimary",maxH:"full",children:[(0,v.jsx)(de.BE,{borderBottom:"base",children:"Sorting and Filters"}),(0,v.jsx)(de.s1,{}),(0,v.jsx)(de.ys,{children:(0,v.jsxs)(a.BJ,{color:"textPrimary",pb:4,spacing:4,children:[(0,v.jsx)(ce,{}),(0,v.jsx)(z,{}),(0,v.jsx)(H,{}),(0,v.jsx)(G,{}),(0,v.jsx)(N,{})]})})]})]})]})};var he=n(84454);const me=()=>{const e=R(),t=I(),n=e?l[e]:"Relevance";return(0,v.jsxs)(a.so,{align:"center",children:[(0,v.jsx)(a.EY,{children:"Sorted by"}),(0,v.jsxs)(he.W1,{children:[(0,v.jsx)(he.IU,{as:M.$n,color:"link","data-event":(0,i.eq)(c.SORT,"Menu"),"data-testid":p.sortButton,ml:2,pl:2,pr:2,py:1,rightIcon:(0,v.jsx)(u.D3,{}),variant:"link",children:n}),(0,v.jsxs)(he.cO,{"data-testid":p.sortDropdown,minW:"180",zIndex:"sticky",children:[(0,v.jsx)(he.Dr,{"data-event":(0,i.eq)(c.SORT,"Option","Relevance"),"data-testid":p.sortItem,"data-value":"",onClick:()=>t({sort:void 0}),children:"Relevance"},"Relevance"),Object.entries(l).map(e=>{let[n,a]=e;return(0,v.jsx)(he.Dr,{"data-event":(0,i.eq)(c.SORT,"Option",a),"data-testid":p.sortItem,"data-value":n,onClick:()=>t({sort:n}),children:a},n)})]})]})]})};var ve=n(4448),ge=n(10178);const pe={[ge.F.Wide]:e=>{let{"data-event":t,items:n}=e;return(0,v.jsx)(a.BJ,{spacing:4,children:n.map(e=>(0,v.jsx)(ge.h,{"data-event":t,pkg:e,variant:ge.F.Wide},`${e.name}-${e.version}`))})}},xe=(0,s.memo)(e=>{let{"data-event":t,cardView:n=ge.F.Wide,items:s,loading:r}=e;if(r||!s)return(0,v.jsx)(a.ov,{children:(0,v.jsx)(ve.y,{size:"xl"})});const o=pe[n];return(0,v.jsx)(o,{"data-event":t,items:s})});xe.displayName="PackageList";var je=n(50425),fe=n(95119);const be=()=>{const e=I(),t=k(j.uB.OFFSET,e=>f(null!==e&&void 0!==e?e:"")),n=F(),r=D(),o=E(),i=T(),l=C(),d=R(),u=B(),{page:h,pageLimit:m,results:g}=(0,fe.v)({offset:t,limit:25,query:n,keywords:r,languages:o,cdkMajor:i,cdkType:l,sort:d,tags:u});return(0,s.useEffect)(()=>{g.length&&(t<0||t>m)&&e(t<0?{offset:0}:{offset:m})},[g,t,m]),(0,s.useEffect)(()=>{window.scrollTo(0,0)},[h]),(0,v.jsx)(je.Y,{meta:{title:n||"Search",description:n?`${g.length} results for ${n} at Construct Hub`:"Search reusable components for your cloud application"},pageName:"search",children:(0,v.jsxs)(a.BJ,{direction:"column",maxW:"100vw",pb:4,px:4,spacing:4,children:[(0,v.jsx)(re,{}),(0,v.jsxs)(a.BJ,{align:{base:"start",lg:"center"},direction:{base:"column-reverse",lg:"row"},justify:{base:"initial",lg:"space-between"},spacing:4,children:[(0,v.jsx)(le,{count:g.length,filtered:!!n,limit:25,offset:t,query:n}),(0,v.jsx)(a.az,{display:{base:"none",md:"initial"},children:(0,v.jsx)(me,{})}),(0,v.jsx)(a.az,{display:{md:"none"},children:(0,v.jsx)(ue,{})})]}),(0,v.jsx)(xe,{"data-event":c.RESULTS,items:h}),(0,v.jsx)(a.az,{w:"full",children:(0,v.jsx)(ae,{offset:t,pageLimit:m})})]})})},ye=()=>(0,v.jsx)(je.Y,{meta:{title:"Search - Construct Hub",description:"Search Construct Libraries for AWS CDK, CDK8s, and CDKTF"},pageName:"search",children:(0,v.jsxs)(a.xA,{"data-testid":p.page,gap:4,h:"full",maxW:"100%",px:{base:0,md:6},py:6,templateColumns:{base:"1fr",md:"auto 1fr"},templateRows:"1fr",children:[(0,v.jsx)(X,{}),(0,v.jsx)(be,{})]})})}}]);
|
|
2
|
+
//# sourceMappingURL=773.7518c157.chunk.js.map
|