@sistent/sistent 0.14.206 → 0.14.207
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -89,7 +89,7 @@ Valid keys: `+JSON.stringify(Object.keys(H),null," "));var je=_e(y,O,M,F,V+"."+
|
|
|
89
89
|
#eee,
|
|
90
90
|
#999
|
|
91
91
|
)
|
|
92
|
-
`})),Gq=(0,dn.styled)("a")({color:"black",textDecoration:"none"}),y3=(0,dn.styled)("div")(({theme:e})=>({borderTop:`5px solid ${e.palette.background.brand?.default}`,borderRadius:"0.25rem",minHeight:"16rem",display:"flex",flexDirection:"column",justifyContent:"space-between",boxShadow:"0px 0.75rem 1rem 0.25rem rgba(0, 0, 0, 0.12)",position:"relative",transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"})),zq=(0,dn.styled)("div")(({theme:e})=>({background:e.palette.mode==="light"?O2:Vl,transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"})),b3=(0,dn.styled)("div")(({theme:e})=>({display:"flex",justifyContent:"space-between",padding:"1rem","& span":{border:`1px solid ${e.palette.primary.dark}`,color:e.palette.text.primary,borderRadius:"0.8rem",padding:"0.05rem 0.75rem",fontSize:"1rem",transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"},"& h3":{color:e.palette.text.primary,transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"}})),v3=(0,dn.styled)("div")(({theme:e})=>({padding:"0 1rem",".summary":{color:e.palette.grey[700],transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"},p:{fontSize:"1rem"}})),jq=(0,dn.styled)("div")(({theme:e})=>({padding:"0 1rem",position:"absolute",bottom:"0rem",p:{fontSize:"1rem",color:e.palette.text.primary,fontWeight:600,transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"}})),w3=(0,dn.styled)("div")({textAlign:"center",position:"absolute",bottom:"0.1rem",right:"0.75rem",opacity:.2,img:{height:"8.5rem",width:"8.5rem"}});var Ae=require("react/jsx-runtime"),gTe=({path:e,children:t,isExternal:r})=>e?(0,Ae.jsx)(Gq,{href:e,target:r?"_blank":void 0,rel:r?"noopener noreferrer":void 0,children:t}):(0,Ae.jsx)(Ae.Fragment,{children:t}),TTe=({tutorial:e,path:t,courseCount:r,courseType:o,cardKey:a})=>{let n=a==="create-learning-path";return(0,Ae.jsx)(Uq,{children:e.frontmatter.disabled==="yes"?(0,Ae.jsx)(zq,{children:(0,Ae.jsx)(y3,{style:{borderTop:`5px solid ${e.frontmatter.themeColor}`},children:(0,Ae.jsxs)("div",{children:[(0,Ae.jsxs)(b3,{children:[(0,Ae.jsx)("h3",{children:e.frontmatter.title?e.frontmatter.title:e.frontmatter.courseTitle}),(0,Ae.jsx)("div",{style:{whiteSpace:"nowrap"},children:(0,Ae.jsx)("span",{children:"Coming Soon"})})]}),(0,Ae.jsx)(v3,{children:(0,Ae.jsx)("p",{className:"summary",children:e.frontmatter.description})}),(0,Ae.jsx)(w3,{children:(0,Ae.jsx)("img",{src:e.frontmatter.cardImage,alt:e.frontmatter.title})})]})})}):(0,Ae.jsx)(gTe,{path:t,isExternal:n,children:n?(0,Ae.jsx)(qq,{children:(0,Ae.jsx)(y3,{style:{borderTop:`5px solid ${e.frontmatter.themeColor}`},children:(0,Ae.jsxs)("div",{children:[(0,Ae.jsxs)(b3,{children:[(0,Ae.jsx)("h3",{children:e.frontmatter.title?e.frontmatter.title:e.frontmatter.courseTitle}),n&&t&&(0,Ae.jsx)($2,{width:"24px",height:"24px"}),e.frontmatter.status?(0,Ae.jsx)("p",{children:(0,Ae.jsx)("span",{children:"New"})}):null]}),(0,Ae.jsx)(v3,{children:(0,Ae.jsx)("p",{className:"summary",children:e.frontmatter.description})}),(0,Ae.jsx)(w3,{children:(0,Ae.jsx)("img",{src:e.frontmatter.cardImage})})]})})}):(0,Ae.jsx)(Wq,{children:(0,Ae.jsx)(y3,{style:{borderTop:`5px solid ${e.frontmatter.themeColor}`},children:(0,Ae.jsxs)("div",{children:[(0,Ae.jsxs)(b3,{children:[(0,Ae.jsx)("h3",{children:e.frontmatter.title?e.frontmatter.title:e.frontmatter.courseTitle}),e.frontmatter.status?(0,Ae.jsx)("p",{children:(0,Ae.jsx)("span",{children:"New"})}):null]}),(0,Ae.jsx)(v3,{children:(0,Ae.jsx)("p",{className:"summary",children:e.frontmatter.description})}),!n&&(0,Ae.jsx)(jq,{className:"card-subdata",children:(0,Ae.jsxs)("p",{children:[r," ",o,r>1?"s":""]})}),(0,Ae.jsx)(w3,{children:(0,Ae.jsx)("img",{src:e.frontmatter.cardImage})})]})})})})})},DC=TTe;var xs=require("react");var FC=require("@mui/material");var Kq=(0,FC.styled)(Il)(()=>({minWidth:400,overflowWrap:"anywhere",textAlign:"center",padding:"5px"})),$q=(0,FC.styled)($)(()=>({display:"flex",justifyContent:"end",width:"100%",gap:"10px"}));var ea=require("react/jsx-runtime"),Gm={WARNING:"warning",DANGER:"error",SUCCESS:"success",INFO:"info"},Yq=(0,xs.forwardRef)(({variant:e},t)=>{let[r,o]=(0,xs.useState)({isOpen:!1,title:"",subtitle:"",primaryOption:"",showInfoIcon:"",variant:e,headerIcon:void 0,isChecked:!1,showCheckbox:!1}),a=(0,xs.useRef)({resolve:()=>{},reject:()=>{}}),n=(0,b.useTheme)(),i=E=>new Promise((R,k)=>{a.current={resolve:R,reject:k},o({...E,isOpen:!0,showInfoIcon:E.showInfoIcon||"",showCheckbox:!!E.showCheckbox})}),l=()=>{o(E=>({...E,isOpen:!1}))},s=()=>{o(E=>({...E,isChecked:!E.isChecked}))},u=()=>!!r.isChecked;(0,xs.useImperativeHandle)(t,()=>({show:i,getCheckboxState:u}));let{isOpen:f,primaryOption:d,title:p,subtitle:m,showInfoIcon:x,headerIcon:h,showCheckbox:g}=r,{resolve:T}=a.current;return(0,ea.jsxs)(Lr,{open:f,closeModal:l,title:p,id:"searchClick",headerIcon:h,reactNode:void 0,children:[m&&(0,ea.jsxs)(Mr,{children:[(0,ea.jsx)(Kq,{id:"alert-dialog-description",variant:"body1",component:"div",children:(0,ea.jsx)(z,{variant:"body1",component:"div",style:{color:n.palette.text.primary},children:m})}),g&&(0,ea.jsx)(Ml,{control:(0,ea.jsx)(Yr,{checked:u(),onChange:s,color:"primary"}),label:(0,ea.jsx)("span",{style:{fontSize:"1rem"},children:"Do not show again"})})]}),(0,ea.jsx)(io,{variant:"filled",helpText:x,children:(0,ea.jsxs)($q,{children:[(0,ea.jsx)(fn,{onClick:()=>{l(),T("CANCEL")},children:"Cancel"}),(0,ea.jsx)(un,{onClick:()=>{l(),T(d)},style:r.variant&&{backgroundColor:n.palette.background[r.variant]?.default,textTransform:"capitalize"},type:"submit",children:d})]})})]})});Yq.displayName="PromptComponent";var E3=Yq;var np=E3;var NC=require("@mui/material/OutlinedInput"),R3=require("@mui/material/styles"),Zq=G(require("lodash/debounce")),zm=G(require("react"));var jn=require("react/jsx-runtime"),STe=e=>(0,R3.createTheme)({typography:{fontFamily:e.typography.fontFamily},components:{MuiTextField:{styleOverrides:{root:{"--TextField-brandBorderColor":e.palette.border.strong,"--TextField-brandBorderHoverColor":e.palette.background.graphics?.default,"--TextField-brandBorderFocusedColor":e.palette.background.graphics?.default,"& label.Mui-focused":{color:"var(--TextField-brandBorderFocusedColor)"}}}},MuiOutlinedInput:{styleOverrides:{notchedOutline:{borderColor:"var(--TextField-brandBorderColor)"},root:{[`&:hover .${NC.outlinedInputClasses.notchedOutline}`]:{borderColor:"var(--TextField-brandBorderHoverColor)"},[`&.Mui-focused .${NC.outlinedInputClasses.notchedOutline}`]:{borderColor:"var(--TextField-brandBorderFocusedColor)"}}}},MuiInput:{styleOverrides:{root:{color:e.palette.text.default,"&::before":{borderBottom:"2px solid var(--TextField-brandBorderColor)"},"&:hover:not(.Mui-disabled, .Mui-error):before":{borderBottom:"2px solid var(--TextField-brandBorderHoverColor)"},"&.Mui-focused:after":{borderBottom:"2px solid var(--TextField-brandBorderFocusedColor)"}}}},MuiButton:{styleOverrides:{root:{lineHeight:"auto"}}}}});function CTe({onSearch:e,placeholder:t,onClear:r,expanded:o,setExpanded:a}){let[n,i]=zm.default.useState(""),l=zm.default.useRef(null),s=(0,b.useTheme)(),u=(0,zm.useCallback)((0,Zq.default)(m=>{e(m)},300),[e]),f=m=>{let x=m.target.value;i(x),u(x)},d=m=>{m.stopPropagation(),u(""),i(""),a(!1),r&&r()},p=m=>{m.stopPropagation(),o?(u(""),i(""),a(!1)):(a(!0),setTimeout(()=>{l.current&&l.current.focus()},300))};return(0,jn.jsx)(An,{onClickAway:m=>{m.stopPropagation();let x=m.target?.closest("#ref");n===""&&x&&d(m)},children:(0,jn.jsxs)("div",{style:{display:"flex"},children:[(0,jn.jsx)(R3.ThemeProvider,{theme:STe(s),children:(0,jn.jsx)(Qr,{variant:"standard",value:n,onChange:f,inputRef:l,placeholder:t,style:{width:o?"150px":"0",opacity:o?1:0,transition:"width 0.3s ease, opacity 0.3s ease"}})}),o?(0,jn.jsx)(zt,{title:"Close",onClick:d,icon:(0,jn.jsx)(Ft,{fill:s.palette.icon.default}),arrow:!0}):(0,jn.jsx)(zt,{title:"Search",onClick:p,icon:(0,jn.jsx)(Cd,{fill:s.palette.icon.default}),arrow:!0})]})})}var Kn=CTe;var _3=require("@mui/material");var Ki=require("react");var yTe="N/A",Qq=e=>e&&e.deleted_at&&e.deleted_at.Valid===!0?ds(e.deleted_at.Time):yTe;var zi=require("react/jsx-runtime"),Xq=(0,b.styled)("div")({display:"flex",gap:"1rem"}),hs=(0,b.styled)("div")({display:"flex",justifyContent:"space-between",width:"100%",alignItems:"center"}),O3=(0,b.styled)("div")({display:"flex",alignItems:"center",marginRight:"1rem"}),BC=(0,b.styled)("div")({boxSizing:"border-box",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}),HC=(0,b.styled)("div")({position:"absolute",top:0,right:0,bottom:0,left:0,boxSizing:"border-box",display:"block",width:"100%"}),Jq=(0,b.styled)("span")(()=>({"& svg":{cursor:"pointer",width:"2rem",height:"2rem"}})),Aft=(0,b.styled)("span")(()=>({"& svg":{width:"2rem",height:"2rem"}})),eG=(0,b.styled)("span")(({theme:e})=>({"& svg":{color:"#3C494F","&:hover":{color:e.palette.error.error}}})),jm=(0,b.styled)("span")(()=>({color:"#455a64",opacity:"0.5","& svg":{cursor:"not-allowed"}})),tG=(0,b.styled)("div")(()=>({display:"flex",justifyContent:"space-between",paddingRight:"26px"})),A3=(0,b.styled)("div")(()=>({color:"#455a64",display:"flex",cursor:"not-allowed","& svg":{cursor:"pointer"}})),rG=(0,b.styled)(Yr)({padding:0,marginRight:"0.5rem",height:"28px","& .MuiSvgIcon-root":{borderColor:"white"},color:"white","&:hover":{color:"white",cursor:"pointer"},"&.Mui-checked":{color:"white"}}),VC=(0,b.styled)(z)({fontSize:"1.25rem",fontWeight:800,"&:hover":{cursor:"default"}}),Pft=(0,b.styled)(z)({fontSize:"0.9rem",display:"flex",alignItems:"end",padding:"0 5px","&:hover":{cursor:"default"}}),_ft=(0,b.styled)("button")({background:"transparent",border:"none","&:hover":{cursor:"default"}}),UC=(0,b.styled)(z)({fontStyle:"italic",fontSize:"12px","&:hover":{cursor:"default"}}),WC=(0,b.styled)(z)({fontSize:"0.9rem",textAlign:"left",fontStyle:"italic"}),oG=(0,b.styled)(WC)({height:"fit-content",fontStyle:"normal","&:hover":{cursor:"default"}}),bTe=(0,b.styled)($)(({theme:e})=>({background:e.palette.background.brand?.default,padding:"10px 10px 1px 10px",borderRadius:"4px",height:"100%",display:"flex",width:"100%"})),Km=(0,b.styled)(bTe)({display:"flex",width:"100%",gap:"10px","@media (min-width : 600px)":{flexDirection:"column",gap:"0"}}),qC=(0,b.styled)(Me)(({theme:e})=>({width:"100%",borderRadius:"4px",background:e.palette.background.brand?.default,boxShadow:"0px 4px 4px 0px rgba(0, 0, 0, 0.25)",display:"flex",flexDirection:"column",marginBottom:"10px",color:e.palette.text.default,"&:hover":{background:e.palette.text.default},padding:"15px 10px"})),GC=(0,b.styled)("p")(({theme:e,textColor:t})=>({margin:"0",fontSize:"14px",fontWeight:"400",display:"flex",color:t||e.palette.text.constant?.white})),zC=(0,b.styled)("p")(({theme:e,textColor:t})=>({margin:"0",fontSize:"60px",fontWeight:"500",lineHeight:1,marginBottom:"5px",color:t||e.palette.text.constant?.white})),Ift=(0,b.styled)(Me)(({theme:e})=>({width:"100%",borderRadius:"4px",background:e.palette.text.default,boxShadow:"0px 4px 4px 0px rgba(0, 0, 0, 0.25)",display:"flex",flexDirection:"column",marginBottom:"10px",color:`${ie[40]}30 !important`,"&:hover":{background:e.palette.text.default},padding:"15px 10px"})),kft=(0,b.styled)("div")(({disabled:e=!1})=>({cursor:e?"not-allowed":"pointer",opacity:e?"0.5":"1",display:"flex","& svg":{cursor:e?"not-allowed":"pointer"}})),aG=(0,b.styled)(ce)(({theme:e})=>({borderBottom:`1px solid ${e.palette.divider}`,display:"flex",flexDirection:"row",padding:"5px 0"})),P3=({onClick:e,bulk:t,disabled:r,style:o,key:a,title:n="Delete"})=>{let i=(0,b.useTheme)();return(0,zi.jsx)(xe,{title:n,arrow:!0,children:(0,zi.jsx)("div",{children:(0,zi.jsx)(tt,{sx:{"&:hover":{"& svg":{fill:r?i.palette.icon.disabled:i.palette.background.error?.hover}},...o},disableRipple:!0,disabled:r,onClick:e,children:(0,zi.jsx)(co,{fill:r?i.palette.icon.disabled:i.palette.icon.default,width:t?"28":"24",height:t?"28":"24",style:o})})})},a)},$n=({onClick:e,disabled:t,bulk:r,style:o,title:a="Edit"})=>{let n=(0,b.useTheme)();return(0,zi.jsx)(xe,{title:a,arrow:!0,children:(0,zi.jsx)("div",{children:(0,zi.jsx)(tt,{onClick:e,sx:{"&:hover":{"& svg":{fill:t?n.palette.icon.disabled:n.palette.background.brand?.default}},...o},disableRipple:!0,disabled:t,children:(0,zi.jsx)(Ja,{fill:t?n.palette.icon.disabled:n.palette.icon.default,width:r?"28":"24",height:r?"28":"24",style:o})})})})},nG=(0,b.styled)(ce)({display:"flex",flexDirection:"row"}),Mft=(0,b.styled)(ce)({display:"flex",alignItems:"center",marginTop:1}),$m=(0,b.styled)(ce)({width:"100%"}),iG=(0,b.styled)(Rr)(({theme:e})=>({width:"100%",display:"flex",flexDirection:"column",backgroundColor:e.palette.background.paper,padding:e.spacing(2.5),cursor:"pointer"})),lG=(0,b.styled)(iG)(({theme:e})=>({minHeight:e.spacing(50),background:"linear-gradient(180deg, #007366 0%, #000 100%)"})),sG=(0,b.styled)(iG)(({theme:e})=>({minHeight:e.spacing(50),backgroundColor:e.palette.background.paper,boxShadow:"none"})),uG=(0,b.styled)(ce)({display:"flex",flexDirection:"row",justifyContent:"space-between"}),fG=(0,b.styled)(ce)({display:"flex",alignItems:"flex-start"}),dG=(0,b.styled)(ce)({display:"flex",alignItems:"center",justifyContent:"flex-end"}),pG=(0,b.styled)(z)(({theme:e})=>({fontSize:"1.25rem",fontWeight:600,padding:"0.5rem 0",color:e.palette.background.constant?.white})),mG=(0,b.styled)(ce)({display:"flex",flexDirection:"column",maxHeight:"14.5rem",overflowY:"scroll",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"},"-ms-overflow-style":"none"}),cG=(0,b.styled)(ce)(({theme:e})=>({display:"flex",flexDirection:"row",position:"absolute",bottom:"20px",width:"100%",color:`${e.palette.background.constant?.white}99`,justifyContent:"space-between",paddingRight:"40px"})),jC=(0,b.styled)(ce)({textAlign:"left"});var ji=require("react/jsx-runtime"),vTe=({userId:e,userName:t,userEmail:r,profileUrl:o})=>{let a=(0,b.useTheme)(),n=()=>{window.open(`${xa}/user/${e}`)};return(0,ji.jsxs)(ce,{container:!0,alignItems:"center",children:[(0,ji.jsx)(ce,{children:(0,ji.jsx)($,{sx:{color:a.palette.text.default,mr:2,cursor:"pointer"},children:(0,ji.jsx)(qt,{onClick:n,alt:t,src:o,children:o?"":(0,ji.jsx)(Ln,{})})})}),(0,ji.jsxs)(ce,{size:"grow",children:[t,(0,ji.jsx)(z,{variant:"body2",color:a.palette.text.disabled,children:r})]})]})},ku=vTe;var Fe=require("react/jsx-runtime"),wTe=({tableMeta:e,handleRemoveFromTeam:t,isRemoveFromTeamAllowed:r,theme:o})=>(0,Fe.jsx)("div",{children:r?(0,Fe.jsx)(A3,{children:(0,Fe.jsx)(zt,{id:`delete_user-${e.rowIndex}`,onClick:t(e.rowData),title:"Remove user membership from team",iconType:"delete",children:(0,Fe.jsx)(zl,{fill:o?.palette.icon.default})})}):(0,Fe.jsx)(jm,{children:(0,Fe.jsx)(zl,{fill:o?.palette.icon.disabled,secondaryFill:Xr})})}),ETe=({teamID:e,useGetUsersForOrgQuery:t,org_id:r,useRemoveUserFromTeamMutation:o,useNotificationHandlers:a,isRemoveFromTeamAllowed:n,theme:i})=>{let[l,s]=(0,Ki.useState)(0),[u,f]=(0,Ki.useState)(10),[d,p]=(0,Ki.useState)("last_login_time desc"),[m,x]=(0,Ki.useState)(""),h=[],{handleError:g,handleSuccess:T,handleInfo:E}=a(),R=(0,Ki.useRef)(null),{width:k}=Xo(),{data:D}=t({page:l,pagesize:u,search:m,order:d,teamId:e,orgId:r}),[C]=o(),v=D?.data||[],P=D?.total_count||0,B=V=>async()=>{let y=V[0];await R.current?.show({title:"Remove User From Team ?",subtitle:J(V[3],V[2]),primaryOption:"Proceed",variant:Gm.DANGER})==="Proceed"&&C({orgId:r,teamId:e,userId:y}).unwrap().then(()=>{T(`${V[4]?V[4]:""} ${V[5]?V[5]:""} removed from team`)}).catch(oe=>{let O=oe.response?.data?.message||"Failed to remove user from team";oe.response.status===404?E(O):g(O)})},_=(V,y,ee)=>{let oe=ee.findIndex(O=>O.name===y);return V[oe]},J=(V,y)=>(0,Fe.jsxs)(Fe.Fragment,{children:[(0,Fe.jsx)("p",{children:"Are you sure you want to remove this user? (This action is irreversible)"}),(0,Fe.jsxs)("p",{children:["User:"," ",(0,Fe.jsx)("i",{children:(0,Fe.jsx)("b",{children:V})})]}),(0,Fe.jsxs)("p",{children:["Email:"," ",(0,Fe.jsx)("i",{children:(0,Fe.jsx)("b",{children:y})})]})]}),X,H={search:!1,viewColumns:!1,filter:!1,rowsPerPageOptions:[10,20,25],responsive:"standard",selectableRows:"none",count:P,rowsPerPage:u,page:l,print:!1,download:!1,elevation:0,serverSide:!0,sortOrder:{name:d.split(" ")[0],direction:d.split(" ")[1]},onTableChange:(V,y)=>{let ee=y.announceText?y.announceText.split(" : "):[],oe="";switch(y.activeColumn&&(oe=`${N[y.activeColumn].name} desc`),V){case"changePage":s(y.page);break;case"changeRowsPerPage":f(y.rowsPerPage);break;case"search":X&&clearTimeout(X),X=setTimeout(()=>{m!==y.searchText&&x(y.searchText)},500);break;case"sort":ee.length==2&&(ee[1]==="ascending"?oe=`${N[y.activeColumn].name} asc`:oe=`${N[y.activeColumn].name} desc`),oe!==d&&p(oe);break}}},q=[["user_id","na"],["avatar_url","xs"],["email","na"],["username","na"],["first_name","na"],["last_name","na"],["role_names","xs"],["status","na"],["joined_at","l"],["last_login_time","l"],["deleted_at","na"]],N=[{name:"user_id",label:"User ID",options:{filter:!1,sort:!1,searchable:!1}},{name:"avatar_url",label:"Team Member",options:{filter:!1,sort:!1,searchable:!1,customBodyRender:(V,y)=>(0,Fe.jsx)($,{sx:{"& > img":{mr:2,flexShrink:0}},children:(0,Fe.jsx)(ku,{userId:_(y.rowData,"user_id",N),userName:`${y.rowData[4]} ${y.rowData[5]}`,userEmail:y.rowData[2],profileUrl:V})})}},{name:"email",label:"Email",options:{filter:!1,sort:!0,searchable:!0}},{name:"username",label:"Username",options:{filter:!1,sort:!0,searchable:!0,customBodyRender:(V,y)=>(0,Fe.jsxs)("div",{style:{display:"flex"},children:[V,V?.includes("@")?(0,Fe.jsx)(Xt,{title:`Search "${y.rowData[3]} ${y.rowData[4]}" on Google`,children:(0,Fe.jsx)("a",{href:`https://www.google.com/search?q=${y.rowData[3]}+${y.rowData[4]}`,style:{color:"inherit"},target:"_blank",rel:"noreferrer",children:(0,Fe.jsx)("div",{children:(0,Fe.jsx)(Y2,{width:20,height:20})})})}):(0,Fe.jsx)(Xt,{title:`Lookup "${V}" on GitHub`,children:(0,Fe.jsx)("a",{href:`https://www.github.com/${V}`,style:{color:"inherit"},target:"_blank",rel:"noreferrer",children:(0,Fe.jsx)("div",{children:(0,Fe.jsx)(eu,{width:22,height:22})})})})]})}},{name:"first_name",label:"First",options:{filter:!1,sort:!0,searchable:!0}},{name:"last_name",label:"Last",options:{filter:!1,sort:!0,searchable:!0}},{name:"role_names",label:"Roles",options:{filter:!0,sort:!1,searchable:!1,filterOptions:{names:h.concat(h?.map(V=>`!${V}`))},customBodyRender:V=>(0,Fe.jsx)("div",{children:V?.join(", ")})}},{name:"status",label:"Status",options:{filter:!0,sort:!0,searchable:!1}},{name:"joined_at",label:"Joined At",options:{filter:!1,sort:!0,searchable:!1,sortDescFirst:!0}},{name:"last_login_time",label:"Last Active At",options:{filter:!1,sort:!0,searchable:!1,sortDescFirst:!0}},{name:"deleted_at",label:"Deleted At",options:{filter:!0,sort:!0,searchable:!1,sortDescFirst:!0,filterOptions:{names:["Deleted","Not Deleted"],logic:(V,y)=>V!="NA"&&y.indexOf("Deleted")>=0?!0:V=="NA"&&y.indexOf("Not Deleted")>=0,fullWidth:!0},customBodyRender:(V,y)=>{let ee=v[y.rowIndex];return Qq(ee)}}},{name:"actions",label:"Actions",options:{filter:!1,sort:!1,searchable:!1,customBodyRender:(V,y)=>_(y.rowData,"deleted_at",N).Valid!==!1?(0,Fe.jsxs)(jm,{children:[(0,Fe.jsx)(Ja,{style:{marginRight:".5rem"},fill:Xr,height:"30",width:"30"}),(0,Fe.jsx)(zl,{fill:Xr,secondaryFill:Xr,height:30,width:30})]}):(0,Fe.jsx)(wTe,{tableMeta:y,handleRemoveFromTeam:B,isRemoveFromTeamAllowed:n,theme:i})}}],[L,M]=(0,Ki.useState)(N),[F]=(0,Ki.useState)(()=>{let V=Jo(q,k),y={};return N.forEach(ee=>{y[ee.name]=V[ee.name]}),y});return(0,Fe.jsxs)(F2,{initialMode:i?.palette.mode,children:[(0,Fe.jsx)("div",{style:{margin:"auto",width:"100%"},children:(0,Fe.jsx)(Vo,{columns:N,data:v,options:H,colViews:q,tableCols:L,updateCols:M,columnVisibility:F})}),(0,Fe.jsx)(np,{ref:R})]})},Ym=ETe;var ip=require("react/jsx-runtime"),RTe=(0,b.styled)(_3.Grid2)(({theme:e})=>({display:"grid",margin:"auto",paddingLeft:"0.5rem",borderRadius:"0.25rem",width:"inherit",gap:e.spacing(1)})),OTe=({teams:e,tableOptions:t,columnVisibility:r,colViews:o,tableCols:a,columns:n,updateCols:i,isRemoveFromTeamAllowed:l,org_id:s,useGetUsersForOrgQuery:u,useNotificationHandlers:f,useRemoveUserFromTeamMutation:d})=>{let p=(0,b.useTheme)();return(0,ip.jsx)(no,{children:(0,ip.jsx)(Vo,{columns:n,data:e,options:{...t,renderExpandableRow:(m,x)=>{let h=e[x.dataIndex].id;return(0,ip.jsx)(_3.TableCell,{colSpan:6,sx:{paddingInline:"4rem",backgroundColor:`${p.palette.background.secondary} !important`},children:(0,ip.jsx)(RTe,{container:!0,size:12,children:(0,ip.jsx)(Ym,{teamID:h,isRemoveFromTeamAllowed:l,org_id:s,useGetUsersForOrgQuery:u,useNotificationHandlers:f,useRemoveUserFromTeamMutation:d,theme:p})})})}},colViews:o,tableCols:a,updateCols:i,columnVisibility:r})})},Zm=OTe;var KC=require("react");var I3=require("react/jsx-runtime");function ATe({value:e,maxLength:t,...r}){return e.length>t?(0,I3.jsx)(Xt,{title:e,arrow:!0,placement:"top",children:(0,I3.jsx)("div",{style:{maxWidth:"15rem",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},...r,children:`${e.slice(0,t)}...`})}):(0,I3.jsx)("div",{style:{maxWidth:"15rem",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},...r,children:e})}var Aa=ATe;var ut=require("react/jsx-runtime");function PTe({selected:e,teams:t,deleteTeamsModalHandler:r}){let o={team_ids:[],team_names:[]};return e?.data.forEach(a=>{let n=a.index;o.team_ids.push(t[n]?.team_id),o.team_names.push(t[n]?.team_name)}),(0,ut.jsx)(Jq,{children:(0,ut.jsx)(eG,{children:(0,ut.jsx)(xe,{title:"Delete Teams",children:(0,ut.jsx)(co,{height:28,width:28,fill:Xr,onClick:()=>{r(o)}})},"delete_teams")})})}function lp({teams:e,count:t,page:r,pageSize:o,setPage:a,setPageSize:n,sortOrder:i,setSortOrder:l,bulkSelect:s,setBulkSelect:u,handleTeamView:f,handleDeleteTeam:d,handleRemoveTeamFromWorkspace:p,handleleaveTeam:m,teamId:x,workspace:h=!1,isEditTeamAllowed:g,isLeaveTeamAllowed:T,isRemoveTeamFromWorkspaceAllowed:E,isDeleteTeamAllowed:R,setSearch:k}){let{width:D}=Xo(),C=(0,b.useTheme)(),v=[["id","na"],["name","xs"],["description","m"],["owner","l"],["created_at","na"],["updated_at","xl"],["deleted_at","na"],["actions","xs"]],P=[{name:"id",label:"ID",options:{filter:!1,sort:!1,searchable:!1,customBodyRender:N=>(0,ut.jsx)(Bm,{id:N})}},{name:"name",label:"Name",options:{filter:!1,sort:!0,searchable:!0}},{name:"description",label:"Description",options:{filter:!1,sort:!0,searchable:!1,customBodyRender:N=>(0,ut.jsx)(Aa,{value:N??"",maxLength:30})}},{name:"owner",label:"Owner",options:{filter:!1,sort:!0,searchable:!0}},{name:"created_at",label:"Created At",options:{filter:!1,sort:!0,searchable:!1,sortDescFirst:!0}},{name:"updated_at",label:"Updated At",options:{filter:!1,sort:!0,searchable:!1,sortDescFirst:!0}},{name:"deleted_at",label:"Deleted At",options:{filter:!0,sort:!0,searchable:!1,sortDescFirst:!0,customBodyRender:N=>JSON.stringify(N),filterOptions:{names:["Deleted","Not Deleted"],logic:(N,L)=>N!="NA"&&L.indexOf("Deleted")>=0?!0:N=="NA"&&L.indexOf("Not Deleted")>=0,fullWidth:!0}}},{name:"actions",label:"Actions",options:{filter:!1,sort:!1,searchable:!1,customBodyRender:(N,L)=>s||L.rowData[4].Valid?(0,ut.jsxs)(jm,{children:[(0,ut.jsx)(Ja,{style:{marginRight:".5rem"}}),(0,ut.jsx)(co,{height:28,width:28,fill:Xr})]}):(0,ut.jsxs)(A3,{children:[!h&&(0,ut.jsxs)(ut.Fragment,{children:[(0,ut.jsx)(Ho,{disabled:!g,children:(0,ut.jsx)(zt,{id:`edit_team-${L.rowIndex}`,title:"Edit Team",onClick:M=>{g&&f(M,L.rowData)},iconType:"edit",children:(0,ut.jsx)(Ja,{style:{height:28.8,width:28.8},fill:Xr})})}),(0,ut.jsx)(Ho,{disabled:!T,children:(0,ut.jsx)(zt,{id:`leave_team-${L.rowIndex}`,title:"Leave Team",onClick:M=>T&&m(M,L.rowData),iconType:"delete",children:(0,ut.jsx)(zl,{fill:Xr,secondaryFill:Xr})})})]}),h?(0,ut.jsx)(Ho,{disabled:!E,children:(0,ut.jsx)(zt,{id:`remove_team-${L.rowIndex}`,title:"Move Team",onClick:()=>{E&&p&&p(L.rowData[0])},iconType:"delete",children:(0,ut.jsx)(co,{height:28,width:28,fill:C.palette.icon.default})})}):(0,ut.jsx)(Ho,{disabled:!R,children:(0,ut.jsx)(zt,{id:`delete_team-${L.rowIndex}`,title:"Delete Team",onClick:M=>{R&&d(M,L.rowData)},iconType:"delete",children:(0,ut.jsx)(co,{height:28,width:28,fill:Xr})})})]})}}],B=e?.findIndex(N=>N.id===x),_={filter:!1,selectableRows:"none",filterType:"dropdown",expandableRows:!0,expandableRowsHeader:!1,expandableRowsOnClick:!0,responsive:"standard",count:t,rowsPerPage:o,page:r,print:!1,download:!1,elevation:0,serverSide:!0,viewColumns:!1,search:!1,rowsExpanded:[B],customToolbarSelect:N=>(0,ut.jsx)(tG,{children:(0,ut.jsx)(PTe,{selected:N,teams:e,deleteTeamsModalHandler:()=>{}})}),textLabels:{selectedRows:{text:"teams(s) selected"}},onTableChange:(N,L)=>{let M=L.announceText?L.announceText.split(" : "):[],F="";switch(L.activeColumn&&(F=`${P[L.activeColumn].name} desc`),N){case"changePage":a(L.page);break;case"changeRowsPerPage":n(L.rowsPerPage);break;case"search":k(L.searchText!==null?L.searchText:"");break;case"sort":M.length==2&&(M[1]==="ascending"?F=`${P[L.activeColumn].name} asc`:F=`${P[L.activeColumn].name} desc`),F!==i&&l(F);break;case"rowSelectionChange":L.selectedRows.data.length?s||u(!0):u(!1);break;default:L.selectedRows.data.length==0&&s&&u(!1)}},isRowSelectable:N=>e[N].deleted_at.Valid!==!0,setRowProps:(N,L,M)=>(M&&M.selectedRows?M.selectedRows.data:[]).includes(L)?{style:{backgroundColor:C.palette.background.hover}}:N[6].Valid?{style:{backgroundColor:C.palette.icon.disabled}}:{style:{backgroundColor:C.palette.background.constant?.table}}},[J,X]=(0,KC.useState)(P),[H,q]=(0,KC.useState)(()=>{let N=Jo(v,D),L={};return P.forEach(M=>{L[M.name]=N[M.name]}),L});return{columns:P,tableOptions:_,tableCols:J,updateCols:X,columnVisibility:H,setColumnVisibility:q,colViews:v}}var Pa=G(require("react"));var wt=require("react/jsx-runtime"),_Te=({width:e=U,height:t=W,primaryFill:r="#00B39F",secondaryFill:o="#00D3A9",...a})=>(0,wt.jsxs)("svg",{width:e,height:t,viewBox:"0 0 135 135",...a,xmlns:"http://www.w3.org/2000/svg",children:[(0,wt.jsx)("path",{d:"M69.5 31.82V64.07L97.45 47.89L69.5 31.82Z",fill:o}),(0,wt.jsx)("path",{d:"M69.5 70.81V103.22L97.7 87.09L69.5 70.81Z",fill:o}),(0,wt.jsx)("path",{d:"M65.47 63.85V32.09L37.87 47.92L65.47 63.85Z",fill:r}),(0,wt.jsx)("path",{d:"M10.1 103.1C15.5182 111.811 22.842 119.179 31.52 124.65V90.71L10.1 103.1Z",fill:r}),(0,wt.jsx)("path",{d:"M65.47 103.06V71.05L37.8 87.07L65.47 103.06Z",fill:r}),(0,wt.jsx)("path",{d:"M35.54 122.63L63.56 106.61L35.54 90.41V122.63Z",fill:o}),(0,wt.jsx)("path",{d:"M99.62 122.8V90.63L71.64 106.63L99.62 122.8Z",fill:r}),(0,wt.jsx)("path",{d:"M127.03 99.37C131.817 90.4433 134.524 80.5502 134.95 70.43L105.78 87.11L127.03 99.37Z",fill:r}),(0,wt.jsx)("path",{d:"M103.64 83.69L131.76 67.61L103.64 51.45V83.69Z",fill:o}),(0,wt.jsx)("path",{d:"M99.62 44.5V12.52L71.77 28.49L99.62 44.5Z",fill:r}),(0,wt.jsx)("path",{d:"M99.62 83.55V51.28L71.7 67.44L99.62 83.55Z",fill:r}),(0,wt.jsx)("path",{d:"M35.54 51.22V83.73L63.66 67.45L35.54 51.22Z",fill:o}),(0,wt.jsx)("path",{d:"M65.47 0C55.1388 0.298791 45.016 2.97835 35.89 7.83L65.52 24.83L65.47 0Z",fill:r}),(0,wt.jsx)("path",{d:"M35.54 12.3V44.62L63.69 28.48L35.54 12.3Z",fill:o}),(0,wt.jsx)("path",{d:"M31.52 10.34C22.8442 15.8136 15.521 23.1813 10.1 31.89L31.52 44.25V10.34Z",fill:r}),(0,wt.jsx)("path",{d:"M99.43 8C90.2123 3.0393 79.9635 0.299881 69.5 0V25.15L99.43 8Z",fill:o}),(0,wt.jsx)("path",{d:"M0 69.87C0.348236 80.2825 3.1145 90.4711 8.08 99.63L29.77 87.07L0 69.87Z",fill:o}),(0,wt.jsx)("path",{d:"M8.07001 35.37C3.13121 44.4917 0.372439 54.6334 0.0100098 65L29.8 47.91L8.07001 35.37Z",fill:o}),(0,wt.jsx)("path",{d:"M35.78 127.13C44.9355 132.013 55.0981 134.706 65.47 135V110.15L35.78 127.13Z",fill:r}),(0,wt.jsx)("path",{d:"M124.89 32C119.512 23.3126 112.237 15.9553 103.61 10.48V44.3L124.89 32Z",fill:o}),(0,wt.jsx)("path",{d:"M103.64 124.54C112.314 119.022 119.624 111.61 125.02 102.86L103.64 90.52V124.54Z",fill:o}),(0,wt.jsx)("path",{d:"M134.96 64.81C134.572 54.5437 131.835 44.5032 126.96 35.46L105.5 47.88L134.96 64.81Z",fill:r}),(0,wt.jsx)("path",{d:"M69.5 135C79.845 134.709 89.9825 132.029 99.12 127.17L69.5 110V135Z",fill:o}),(0,wt.jsx)("path",{d:"M31.52 83.44V51.56L3.83002 67.43L31.52 83.44Z",fill:r})]}),$C=_Te;var xG=G(require("@mui/material/Tooltip")),hG=G(require("react")),YC=require("react/jsx-runtime"),ITe=hG.default.forwardRef((e,t)=>(0,YC.jsx)(xG.default,{...e,ref:t,children:(0,YC.jsx)("span",{children:e.children})})),ZC=ITe;var Yn=require("@mui/material");var gG=(0,Yn.styled)(Dt)(({theme:e})=>({padding:"5px 6px !important",color:e.palette.text.default,fontSize:"0.875rem",textTransform:"uppercase",fontWeight:400,height:"unset",borderRadius:"100px",border:`0.5px solid ${e.palette.border?.normal}`,background:e.palette.background.default,maxWidth:"14.375rem"})),TG=(0,Yn.styled)(Pn)(({theme:e})=>({width:300,height:280,overflow:"auto",backgroundColor:e.palette.background.secondary,borderRadius:"10px",boxShadow:"0px 1px 4px 0px rgba(0, 0, 0, 0.25) inset","@media (max-width: 843px)":{width:260},"@media (max-width: 768px)":{width:300},"@media (max-width: 375px)":{width:"100%"}})),QC=(0,Yn.styled)(z)(({theme:e})=>({paddingBottom:"15px",color:e.palette.text?.default,textAlign:"center",fontSize:"1rem",letterSpacing:"0.15px"})),Qm=(0,Yn.styled)(Me)(({theme:e})=>({margin:"5px 0",padding:"7px 0",borderRadius:"10px",borderColor:e.palette.border?.strong,boxShadow:"none",display:"flex",flexDirection:"row",fill:e.palette.icon.default,"&:hover":{borderColor:e.palette.border?.brand,backgroundColor:`${Ze} !important`,fill:e.palette.icon.inverse}})),XC=(0,Yn.styled)(Yn.Grid2)({padding:"0 1rem","@media (max-width: 768px)":{padding:"0",display:"flex",alignItems:"center",flexDirection:"column",width:"100%"}}),SG=(0,Yn.styled)(Yn.Grid2)({padding:"2.5rem 1rem 0 1rem","@media (max-width: 768px)":{padding:"1rem",transform:"rotate(90deg)",height:"6.25rem",marginLeft:"6.25rem"}});var Ue=require("react/jsx-runtime"),CG={CHIP:"chip",OTHER:"other"};function kTe(e){return e?{meshery:(0,Ue.jsx)($C,{}),kubernetes:(0,Ue.jsx)(dd,{}),github:(0,Ue.jsx)(eu,{})}[e]||null:(0,Ue.jsx)(dd,{})}function k3(e,t){return e.filter(r=>t.indexOf(r)===-1)}function yG(e,t){return e.filter(r=>t.indexOf(r)!==-1)}function MTe({name:e,assignableData:t,assignedData:r,assignablePage:o,assignedPage:a,originalAssignedData:n,emptyStateIconLeft:i,emtyStateMessageLeft:l,emptyStateIconRight:s,emtyStateMessageRight:u,originalLeftCount:f,originalRightCount:d,leftPermission:p=!0,rightPermission:m=!0,transferComponentType:x=CG.OTHER}){let[h,g]=Pa.default.useState([]),[T,E]=Pa.default.useState([]),[R,k]=Pa.default.useState(n),[D,C]=Pa.default.useState(0),[v,P]=Pa.default.useState(0);Pa.default.useEffect(()=>{k(n)},[n]),Pa.default.useEffect(()=>{E(t)},[t]),Pa.default.useEffect(()=>{C(f),P(d)},[f,d]);let B=yG(h,T),_=yG(h,R);Pa.default.useEffect(()=>{r(R)},[R]),Pa.default.useEffect(()=>{let M=y=>{y[0].isIntersecting&&o()},F=new IntersectionObserver(M,{threshold:1}),V=document.getElementById("leftList");return V&&F.observe(V),()=>{V&&F.unobserve(V)}},[t]),Pa.default.useEffect(()=>{let M=y=>{y[0].isIntersecting&&a()},F=new IntersectionObserver(M,{threshold:1}),V=document.getElementById("rightList");return V&&F.observe(V),()=>{V&&F.unobserve(V)}},[n]);let J=M=>()=>{let F=h.indexOf(M),V=[...h];F===-1?V.push(M):V.splice(F,1),g(V)},X=M=>{M.stopPropagation(),k(R.concat(T)),E([]),C(0),P(F=>F+D)},H=M=>{M.stopPropagation(),k(R.concat(B)),E(k3(T,B)),g(k3(h,B)),C(F=>F-B.length),P(F=>F+B.length)},q=M=>{M.stopPropagation(),E(T.concat(_)),k(k3(R,_)),g(k3(h,_)),P(F=>F-_.length),C(F=>F+_.length)},N=M=>{M.stopPropagation(),E(T.concat(R)),k([]),P(0),C(F=>F+v)},L=(M,F,V,y)=>(0,Ue.jsxs)(TG,{children:[(0,Ue.jsx)(Zr,{dense:!0,component:"div",role:"list",children:M.length>0?M.map(ee=>{let oe=`transfer-list-item-${ee.name}-label`;return(0,Ue.jsxs)(Or,{role:"listitem",sx:{display:"flex",justifyContent:"space-between","&:hover":{backgroundColor:"#00000010"}},onClick:J(ee),children:[x===CG.CHIP?(0,Ue.jsx)(ZC,{title:ee.name,placement:"top",children:(0,Ue.jsx)(gG,{sx:{paddingY:"10px"},variant:"outlined",label:ee.name,onDelete:()=>{},deleteIcon:(0,Ue.jsx)(l5,{}),icon:kTe(ee?.kind)||(0,Ue.jsx)(dd,{})})}):(0,Ue.jsx)(ZC,{title:ee.name,placement:"top",children:(0,Ue.jsx)(z,{sx:{maxWidth:"230px",height:"1.5rem",overflow:"hidden"},children:ee.name})}),(0,Ue.jsx)(Yr,{checked:h.indexOf(ee)!==-1,tabIndex:-1,disableRipple:!0,inputProps:{"aria-labelledby":oe}})]},ee.id)}):(0,Ue.jsxs)("div",{style:{textAlign:"center",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",height:"264px"},children:[F,(0,Ue.jsx)(z,{sx:{color:"#979797",px:5,py:2,lineHeight:1},children:V})]})}),(0,Ue.jsx)("div",{id:y})]});return(0,Ue.jsxs)(ce,{container:!0,justifyContent:"center",alignItems:"center",children:[(0,Ue.jsxs)(XC,{children:[(0,Ue.jsxs)(QC,{children:["Available ",e," (",T.length,")"]}),L(T,i,l,"leftList")]}),(0,Ue.jsx)(SG,{children:(0,Ue.jsxs)(ce,{container:!0,direction:"column",alignItems:"center",children:[(0,Ue.jsxs)(Qm,{variant:"outlined",size:"small",onClick:X,disabled:!m||m&&(T?.length===0||T.length<D),"aria-label":"move all right",children:[(0,Ue.jsx)(Sd,{width:18,height:18}),(0,Ue.jsx)(Sd,{style:{position:"absolute",left:"27px"},width:18,height:18})]}),(0,Ue.jsx)(Qm,{variant:"outlined",size:"small",onClick:H,disabled:!m||m&&B.length===0,"aria-label":"move selected right",children:(0,Ue.jsx)(Sd,{width:18,height:18})}),(0,Ue.jsx)(Qm,{variant:"outlined",size:"small",onClick:q,disabled:!p||p&&_.length===0,"aria-label":"move selected left",children:(0,Ue.jsx)(md,{width:18,height:18})}),(0,Ue.jsxs)(Qm,{variant:"outlined",size:"small",onClick:N,disabled:!p||p&&(R?.length===0||R.length<v),"aria-label":"move all left",children:[(0,Ue.jsx)(md,{width:18,height:18}),(0,Ue.jsx)(md,{style:{position:"absolute",left:"27px"},width:18,height:18})]})]})}),(0,Ue.jsxs)(XC,{children:[(0,Ue.jsxs)(QC,{children:["Assigned ",e," (",R.length,")"]}),L(R,s,u,"rightList")]})]})}var sp=MTe;var up=require("@mui/material"),JC=G(require("react"));var nr=require("react/jsx-runtime"),LTe=(0,up.styled)("div")(({theme:e})=>({background:e.palette.mode==="light"?Si.header:Ti.header,padding:"0.75rem 1rem",margin:"-1rem -1rem 1rem -1rem",display:"flex",justifyContent:"space-between",alignItems:"center",color:e.palette.text.constant?.white}));function DTe({filters:e,selectedFilters:t,setSelectedFilters:r,variant:o="outlined",handleApplyFilter:a,showAllOption:n=!0,id:i}){let[l,s]=JC.default.useState(null),[u,f]=JC.default.useState(!1),d=(0,b.useTheme)(),p=(0,up.useMediaQuery)(d.breakpoints.down("sm")),m=E=>{s(E.currentTarget),f(R=>!R)},x=()=>{s(null),f(!1)},h=(E,R)=>{let k=E.target.value;r(D=>({...D,[R]:k}))},g=()=>{x(),a()},T=()=>(0,nr.jsxs)("div",{children:[(0,nr.jsx)(LTe,{children:(0,nr.jsx)("h3",{children:"Filters: "})}),Object.keys(e).map(E=>{let R=e[E].options;return(0,nr.jsxs)("div",{role:"presentation",children:[(0,nr.jsx)(Ll,{id:e[E].name,children:e[E].name}),(0,nr.jsxs)(ca,{defaultValue:"All",value:t[E],variant:o,onChange:k=>h(k,E),style:{width:"20rem",marginBottom:"1rem"},inputProps:{"aria-label":"Without label"},displayEmpty:!0,children:[n&&(0,nr.jsx)(At,{value:"All",children:"All"}),R.map(k=>(0,nr.jsx)(At,{value:k.value,children:k.label},k.value))]},E)]},E)}),(0,nr.jsx)("div",{style:{display:"flex",justifyContent:"center"},children:(0,nr.jsx)(Me,{variant:"contained",onClick:g,children:"Apply"})})]});return(0,nr.jsx)(nr.Fragment,{children:(0,nr.jsxs)("div",{id:i,children:[(0,nr.jsx)(zt,{title:"Filter",onClick:m,icon:(0,nr.jsx)(W2,{fill:d.palette.icon.default}),arrow:!0}),p?(0,nr.jsx)(up.Drawer,{anchor:"bottom",open:u,onClose:x,PaperProps:{style:{padding:"0 1rem 1rem 1rem",backgroundColor:d.palette.background.surfaces}},children:T()}):(0,nr.jsx)(Yd,{id:u&&l?"transition-popper":void 0,open:u,anchorEl:l,placement:"bottom-end",children:(0,nr.jsx)(An,{onClickAway:x,mouseEvent:"onMouseDown",touchEvent:"onTouchStart",children:(0,nr.jsx)(Pn,{sx:{padding:"1rem",paddingTop:"1.8rem",boxShadow:"0px 4px 8px rgba(0, 0, 0, 0.1)",backgroundColor:d.palette.background.surfaces},children:T()})})})]})})}var bG=DTe;var vG=require("react");var ta=require("react/jsx-runtime"),pn={PUBLIC:"public",PRIVATE:"private",PUBLISHED:"published"},FTe=(0,b.styled)(Dl)(({theme:e})=>({"& .MuiPaper-root":{backgroundColor:e.palette.mode==="light"?i1:e.palette.background.constant?.table,color:e.palette.text.secondary,border:`1px solid ${e.palette.border.default}`,borderRadius:"0.25rem",padding:"0rem"},"& .MuiMenuItem-root":{fontSize:".9rem",padding:"0.5rem","&:hover":{backgroundColor:e.palette.mode==="light"?Ks:"rgba(0, 179, 159, 0.25)"}},"& .Mui-selected":{backgroundColor:e.palette.mode==="light"?Ks:"rgba(0, 179, 159, 0.25)"},"& .MuiList-padding":{padding:"0px"}})),NTe=(0,b.styled)(Me)(()=>({padding:"0px"})),BTe=(0,b.styled)("div")(({theme:e,enabled:t})=>({paddingLeft:"0.3rem",height:"1.5rem",width:"auto",paddingRight:t?"0":"0.3rem",borderRadius:"0.25rem",border:`1px solid ${Qf}`,background:e?.palette.mode==="light"?i1:e?.palette.background.constant?.table,textTransform:"uppercase",color:e?.palette.text.default,display:"flex",justifyContent:"center",alignItems:"center",fontSize:"0.75rem",fontFamily:e?.typography.fontFamily})),HTe=(0,b.styled)(At)(({theme:e})=>({textTransform:"capitalize",color:e.palette.icon.default})),VTe=(0,b.styled)("div")({marginRight:"0.5rem"}),UTe=({value:e,onChange:t,options:r,enabled:o})=>{let[a,n]=(0,vG.useState)(null),i=!!a,l=f=>{f.stopPropagation(),n(null)},s=f=>{f.stopPropagation(),o&&n(f.currentTarget)},u=(f,d)=>{f.stopPropagation(),t&&t(d),l(f)};return(0,ta.jsxs)(ta.Fragment,{children:[(0,ta.jsx)(NTe,{disabled:!o,onClick:s,"data-testid":`design-visibility-${e.toLowerCase()}`,children:(0,ta.jsxs)(BTe,{enabled:o,children:[(0,ta.jsx)("span",{style:{fontSize:"0.85rem"},children:e}),o&&(0,ta.jsx)(hF,{style:{...$o}})]})}),(0,ta.jsx)(FTe,{open:i,onClose:l,anchorEl:a,anchorReference:"anchorPosition",anchorPosition:{top:(a?.getBoundingClientRect().bottom??0)+5,left:(a?.getBoundingClientRect().left??0)+5},children:r?.map(([f,d],p)=>(0,ta.jsxs)(HTe,{"data-testid":`visibility-toggle-${f.toLowerCase()}`,onClick:m=>u(m,f),children:[(0,ta.jsx)(VTe,{children:(0,ta.jsx)(d,{width:16,height:16})}),f]},p))})]})},$i=UTe;var MG=require("@mui/material");var Uo=require("@mui/material"),wG=(0,Uo.styled)("div")(()=>({width:"85px",height:"88px",overflow:"hidden",position:"absolute",top:"-3px",left:"-3px"})),EG=(0,Uo.styled)("div")(({catalogClassName:e})=>({font:"bold 10px sans-serif",WebkitTransform:"rotate(-45deg)",textAlign:"center",transform:"rotate(-45deg)",position:"relative",padding:"4px 0",top:"15px",left:"-30px",width:"120px",display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",backgroundColor:{community:"rgba(122,132,142,.8)",official:"#EBC017",verified:"#00B39F"}[e],color:"#fff"})),RG=(0,Uo.styled)("div")(({outerStyles:e})=>({position:"relative",borderRadius:"1rem",textAlign:"center",transformStyle:"preserve-3d",transition:"all .9s ease-out",marginBottom:"1.25rem",display:"inline-flex",perspective:"1000px","&:hover":{cursor:"pointer",transform:"translateY(-2%)"},"@media (max-width:1200px)":{height:"18.75rem"},...e})),OG=(0,Uo.styled)("div")(({theme:e})=>({position:"relative",width:"100%",height:"100%",textAlign:"center",transition:"transform 0.6s",background:e.palette.background.default,boxShadow:`2px 2px 3px 0px ${e.palette.background.brand?.default}`,borderRadius:"0.9375rem"})),AG=(0,Uo.styled)("span")(({theme:e})=>({position:"absolute",top:"0",right:"0",minWidth:"3rem",padding:"0 0.75rem",fontSize:"0.875rem",textTransform:"capitalize",background:e.palette.background.brand?.default,color:e.palette.text.inverse,borderRadius:"0 1rem 0 2rem"})),fp=(0,Uo.styled)("p")(({theme:e})=>({fontSize:"1rem",textTransform:"capitalize",margin:"0rem",lineHeight:"1.5",textAlign:"center",color:e.palette.text.secondary,fontWeight:"600"})),PG=(0,Uo.styled)(Uo.Typography)(({theme:e})=>({fontWeight:"bold",textTransform:"capitalize",color:e.palette.text.default,fontSize:"1.125rem",marginTop:"2rem",padding:"0rem 1rem",position:"relative",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",textAlign:"center",width:"100%"})),_G=(0,Uo.styled)("div")(({theme:e})=>({display:"flex",justifyContent:"space-around",fontSize:"0.2rem",color:e.palette.text.secondary,padding:"0.9rem 0.1rem",background:e.palette.background.secondary,position:"absolute",bottom:"0px",marginTop:"1.2rem",borderRadius:"0 0 0.9375rem 0.9375rem",width:"100%"})),dp=(0,Uo.styled)("div")(()=>({display:"flex",alignItems:"center",gap:"4px",fontSize:"0.2rem",color:"rgba(26, 26, 26, .8)",margin:"0rem",padding:"0.1rem"})),IG=(0,Uo.styled)("div")(()=>({height:"max-content",display:"flex",marginTop:"-1rem",flexDirection:"column",padding:"0rem 1rem",justifyContent:"start",alignItems:"start","@media (max-width:1200px)":{height:"max-content"}})),kG=(0,Uo.styled)("div")(({theme:e})=>({background:e.palette.mode==="light"?"rgba(231, 239, 243, 0.40)":"#212121",display:"flex",alignItems:"center",justifyContent:"center",padding:"0.5rem",width:"100%",borderRadius:"0.5rem"}));var $e=require("react/jsx-runtime"),Cpt=(0,MG.styled)("a")(()=>({textDecoration:"none"}));var WTe=({catalogClassName:e})=>e?(0,$e.jsx)(wG,{children:(0,$e.jsx)(EG,{catalogClassName:e,children:e})}):(0,$e.jsx)($e.Fragment,{}),qTe=({pattern:e,patternType:t,cardHeight:r,cardWidth:o,cardStyles:a,onCardClick:n})=>{let i={height:r,width:o,...a};return(0,$e.jsx)(RG,{outerStyles:i,onClick:n,children:(0,$e.jsxs)(OG,{className:"innerCard",children:[(0,$e.jsx)(WTe,{catalogClassName:e?.catalog_data?.content_class}),(0,$e.jsx)(AG,{children:t}),(0,$e.jsxs)(IG,{children:[(0,$e.jsx)(PG,{style:{margin:"3rem 0 1.59rem 0",textAlign:"center"},children:e.name}),(0,$e.jsx)(kG,{children:(0,$e.jsx)(Xa,{height:"118",width:"120"})})]}),(0,$e.jsxs)(_G,{children:[(0,$e.jsxs)(dp,{children:[(0,$e.jsx)(Sa,{width:18,height:18}),(0,$e.jsx)(fp,{children:e.download_count})]}),(0,$e.jsxs)(dp,{children:[(0,$e.jsx)(td,{width:18,height:18,fill:"#51636B"}),(0,$e.jsx)(fp,{children:e.clone_count})]}),(0,$e.jsxs)(dp,{children:[(0,$e.jsx)(hd,{width:18,height:18,fill:"#51636B"}),(0,$e.jsx)(fp,{children:e.view_count})]}),(0,$e.jsxs)(dp,{children:[(0,$e.jsx)(ud,{width:18,height:18}),(0,$e.jsx)(fp,{children:e.deployment_count})]}),(0,$e.jsxs)(dp,{children:[(0,$e.jsx)(Dn,{width:18,height:18,fill:"#51636B"}),(0,$e.jsx)(fp,{children:e.share_count})]})]})]})})},ey=qTe;var qG=require("@mui/material/styles"),tc=require("react");var ec=require("react");var M3=require("react");var FG=require("lodash"),Mu=require("react");var ty=require("@mui/material");var LG=(0,ty.styled)(zs)(({style:e,theme:t})=>({fontFamily:t.typography.fontFamily,width:"100%","@media (max-width: 590px)":{marginLeft:"0.25rem",paddingLeft:"0.25rem"},display:"flex",backgroundColor:t.palette.mode==="light"?t.palette.common.white:t.palette.background.surfaces,...e})),DG=(0,ty.styled)(Vf)(({theme:e})=>({borderLeft:`1px solid ${e.palette.background.tertiary}`,height:"30px",paddingLeft:"10px"}));var Xm=require("react/jsx-runtime");function GTe({onChange:e,value:t="",label:r,sx:o,placeholder:a,endAdornment:n,debounceTime:i=300}){let l=(0,b.useTheme)(),[s,u]=(0,Mu.useState)(t);(0,Mu.useEffect)(()=>{t!==s&&u(t)},[t]);let f=m=>({target:{value:m},persist:()=>{}}),d=(0,Mu.useMemo)(()=>(0,FG.debounce)(m=>{e?.(f(m))},i),[e,i]);return(0,Mu.useEffect)(()=>{if(e)return s===""?e(f(s)):d(s),()=>{d.cancel()}},[s,e,d]),(0,Xm.jsx)(LG,{type:"search",label:r,fullWidth:!0,value:s,onChange:m=>{let x=m.target.value;u(x)},sx:o,placeholder:a??"Search",startAdornment:(0,Xm.jsx)(Vf,{position:"start",children:(0,Xm.jsx)(Cd,{fill:l.palette.background.neutral?.default})}),endAdornment:(0,Xm.jsx)(DG,{position:"end",children:n})})}var Jm=GTe;var Zn=require("@mui/material/styles");var NG=(0,Zn.styled)($)(({styleProps:e})=>({padding:"1rem",borderRadius:"1rem",width:"100%",gap:"0.5rem",boxShadow:"0px 2px 10px rgba(0, 0, 0, 0.2)",display:"flex",flexDirection:"column",height:"fit-content",backgroundColor:e.backgroundColor,"@media (max-width:900px)":{display:"none"},fontFamily:e.fontFamily,"&::-webkit-scrollbar":{width:"6px"}})),BG=(0,Zn.styled)("div")(()=>({display:"none","@media (max-width:899px)":{display:"block"}})),Fpt=(0,Zn.styled)("div")(()=>({display:"flex",justifyContent:"space-around",alignItems:"center"})),HG=(0,Zn.styled)(Me)(({theme:e})=>({backgroundColor:e.palette.primary.brand?.default,"&:hover":{backgroundColor:e.palette.background.default},height:"3.75rem","@media (max-width:450px)":{minWidth:"0px"}})),VG=(0,Zn.styled)($)(({theme:e})=>({display:"flex",justifyContent:"space-between",alignItems:"center",padding:"0.5rem 1rem",background:e.palette.mode==="light"?Si.header:Ti.header,height:"10vh"})),Npt=(0,Zn.styled)(ci)(({theme:e})=>({padding:"0.25rem 2rem",borderBottom:"1px solid",borderBottomColor:e.palette.text.disabled})),UG=(0,Zn.styled)(ci)(({theme:e})=>({backgroundColor:e.palette.background.surfaces,borderRadius:"0.5rem",marginTop:2,display:"flex",justifyContent:"space-between"})),WG=(0,Zn.styled)("p")(({theme:e})=>({color:e.palette.text.tertiary})),Bpt=(0,Zn.styled)("span")(()=>({marginLeft:"0.5rem",display:"block","@media (max-width: 853px)":{display:"none"}}));var ir=require("react/jsx-runtime"),zTe=({filterKey:e,sectionDisplayName:t,options:r=[],filters:o,openSections:a,onCheckboxChange:n,onSectionToggle:i,styleProps:l,customComponent:s})=>{let[u,f]=(0,M3.useState)(""),d=(0,M3.useCallback)(x=>{f(x.target.value)},[]),p=r.length>10,m=u&&r.length?r.filter(x=>x.label.toLowerCase().includes(u.toLowerCase())):r;return(0,ir.jsxs)(ir.Fragment,{children:[(0,ir.jsxs)(UG,{onClick:()=>i(e),style:{backgroundColor:l.sectionTitleBackgroundColor},children:[(0,ir.jsx)(z,{sx:{fontSize:"1rem"},fontWeight:"bold",fontFamily:l.fontFamily,children:(t||e).toUpperCase()}),a[e]?(0,ir.jsx)($l,{}):(0,ir.jsx)(Ko,{})]}),(0,ir.jsx)(da,{in:a[e],timeout:"auto",unmountOnExit:!0,children:s?(0,ir.jsx)(s,{}):(0,ir.jsxs)(Zr,{component:"div",sx:{overflowY:"auto",maxHeight:"25rem",backgroundColor:l.backgroundColor,"&::-webkit-scrollbar":{width:"6px"}},children:[p&&(0,ir.jsx)($,{sx:{px:"0.5rem",mb:"0.5rem"},children:(0,ir.jsx)(Jm,{value:u,onChange:d,placeholder:"Search",endAdornment:(0,ir.jsxs)(WG,{children:["Total : ",m.length??0]})})}),m.map((x,h)=>(0,ir.jsxs)(Gf,{direction:"row",alignItems:"center",px:"0.5rem",justifyContent:"space-between",children:[(0,ir.jsxs)(Gf,{direction:"row",alignItems:"center",gap:"0.35rem",children:[(0,ir.jsx)(Yr,{id:`checkbox-${x.label}`,checked:Array.isArray(o[e])?o[e].includes(x.value):o[e]===x.value,onChange:g=>n&&n(e,x.value,g.target.checked),value:x.value}),x.Icon&&(0,ir.jsx)(x.Icon,{width:"20px",height:"20px"}),(0,ir.jsx)(z,{fontFamily:l.fontFamily,children:x.label})]}),(0,ir.jsxs)(Gf,{direction:"row",alignItems:"center",gap:"0.35rem",children:[x.totalCount!==void 0&&`(${x.totalCount||0})`,x.description&&(0,ir.jsx)(Ui,{variant:"standard",helpText:x.description})]})]},`${x.value}-${h}`))]})})]})},ry=zTe;var pp=require("react/jsx-runtime"),jTe=({lists:e,onApplyFilters:t,value:r,styleProps:o})=>{let[a,n]=(0,ec.useState)(()=>{let s={};return e.forEach(u=>{s[u.filterKey]=!!u.defaultOpen}),s}),i=(0,ec.useCallback)(s=>{n(u=>({...u,[s]:!u[s]}))},[]),l=(0,ec.useCallback)((s,u,f)=>{t(d=>{let p={...d};if(e.find(x=>x.filterKey===s)?.isMultiSelect!==!1){let x=p[s];Array.isArray(x)||(x=x?[x]:[]),p[s]=f?[...x,u]:x.filter(h=>h!==u)}else p[s]=f?u:"";return p})},[e,t]);return(0,pp.jsx)(pp.Fragment,{children:e.map(s=>s.customComponent?(0,pp.jsx)(ry,{filterKey:s.filterKey,filters:r,sectionDisplayName:s.sectionDisplayName,onSectionToggle:i,styleProps:o,openSections:a,customComponent:s.customComponent},s.filterKey):(0,pp.jsx)(ry,{filterKey:s.filterKey,sectionDisplayName:s.sectionDisplayName,options:s.options,filters:r,openSections:a,onCheckboxChange:l,onSectionToggle:i,styleProps:o},s.filterKey))})},oy=jTe;var mr=require("react/jsx-runtime"),KTe=({lists:e,setData:t,value:r={},styleProps:o})=>{let a=(0,qG.useTheme)(),[n,i]=(0,tc.useState)(!1),l=(0,tc.useCallback)(()=>{i(!0)},[]),s=(0,tc.useCallback)(()=>{i(!1)},[]),f={...{backgroundColor:a.palette.mode==="light"?a.palette.background.default:a.palette.background.secondary,sectionTitleBackgroundColor:a.palette.mode==="light"?a.palette.background.surfaces:Hl.main,fontFamily:a.typography.fontFamily},...o};return(0,mr.jsxs)(mr.Fragment,{children:[(0,mr.jsx)(NG,{styleProps:f,children:(0,mr.jsx)(oy,{lists:e,onApplyFilters:t,value:r,styleProps:f})}),(0,mr.jsxs)(BG,{children:[(0,mr.jsx)(xe,{title:"Filters",placement:"bottom",children:(0,mr.jsx)(HG,{variant:"contained",onClick:l,children:(0,mr.jsx)(RF,{style:{height:"28px",width:"28px"},fill:a.palette.text.default})})}),(0,mr.jsx)(m2,{anchor:"bottom",open:n,variant:"temporary",onClose:s,style:{zIndex:"1399"},children:(0,mr.jsxs)($,{sx:{overflowY:"hidden",height:"90vh"},children:[(0,mr.jsxs)(VG,{children:[(0,mr.jsx)(z,{variant:"h6",sx:{color:a.palette.text.constant?.white},component:"div",children:"Filters"}),(0,mr.jsx)(Ou,{onClick:s,children:(0,mr.jsx)(Ft,{height:"32px",width:"32px"})})]}),(0,mr.jsx)($,{style:{height:"75vh",overflowY:"auto",background:a.palette.background.surfaces,padding:"0 16px"},children:(0,mr.jsx)(oy,{lists:e,onApplyFilters:t,value:r,styleProps:f})}),(0,mr.jsx)($,{sx:{background:a.palette.mode==="light"?Si.fotter:Ti.fotter,height:"5vh"}})]})})]})]})},ay=KTe;var Lu=require("react/jsx-runtime");function $Te({open:e,content:t,title:r,actions:o,onClose:a}){return(0,Lu.jsxs)(pa,{open:e,onClose:a,children:[(0,Lu.jsx)(Im,{children:r}),(0,Lu.jsx)(_l,{children:(0,Lu.jsx)(Il,{children:t})}),(0,Lu.jsx)(Hf,{children:o})]})}var ny=$Te;var mp=require("@mui/material"),ra=G(require("react"));var jt=require("react/jsx-runtime"),GG=require("react"),YTe=({data:e,label:t,fetchSuggestions:r,setFilterData:o,isLoading:a,type:n,disabled:i,selectedData:l,searchValue:s,setSearchValue:u,iconComponent:f=(0,jt.jsx)(N1,{..._d})})=>{let[d,p]=(0,ra.useState)(""),[m,x]=(0,ra.useState)(!1),[h,g]=(0,ra.useState)(!1),[T,E]=(0,ra.useState)(l);(0,ra.useEffect)(()=>{E(l)},[l]);let R=(0,ra.useCallback)(C=>{let v=T.filter(P=>P.id!==C);E(v),o(v)},[T,o]),k=(0,ra.useCallback)((C,v)=>{if(!v)return;if(T.some(_=>_.id===v.id)){p(`${n} already selected`);return}let B=[...T,v];E(B),o(B),p(""),u(""),x(!1)},[T,o,n,u]),D=(0,ra.useCallback)((C,v)=>{u(v),v===""?x(!1):(r(v),p(""),x(!0))},[r,u]);return(0,jt.jsxs)($,{sx:{width:"100%"},children:[(0,jt.jsx)(mp.Autocomplete,{id:`${n}-search-field`,style:{width:"100%"},options:e,getOptionLabel:()=>s,isOptionEqualToValue:(C,v)=>C.id===v.id,noOptionsText:a?"Loading...":`No ${n} found`,loading:a,open:m,onClose:()=>x(!1),disabled:i,value:void 0,inputValue:s,onChange:k,onInputChange:D,filterOptions:C=>C,disableClearable:!0,includeInputInList:!0,filterSelectedOptions:!0,disableListWrap:!0,clearOnBlur:!0,popupIcon:null,blurOnSelect:!0,forcePopupIcon:!1,renderInput:C=>(0,jt.jsx)(Qr,{...C,label:t||`Add ${n}`,error:!!d,helperText:d,fullWidth:!0,InputLabelProps:{style:{fontFamily:"inherit"}},InputProps:{...C.InputProps,endAdornment:(0,jt.jsx)(ra.default.Fragment,{children:a?(0,jt.jsx)(Gt,{color:"inherit",size:20}):null})}}),renderOption:(C,v)=>(0,GG.createElement)("li",{...C,key:v.id},(0,jt.jsx)($,{component:"li",sx:{"& > img":{mr:2,flexShrink:0}},children:(0,jt.jsxs)(mp.Grid2,{container:!0,alignItems:"center",children:[(0,jt.jsx)(mp.Grid2,{children:(0,jt.jsx)($,{sx:{color:"text.secondary",mr:2},children:f})}),(0,jt.jsx)(mp.Grid2,{size:"grow",children:(0,jt.jsx)(z,{variant:"body2",children:v.name})})]})}))}),(0,jt.jsxs)($,{sx:{display:"flex",flexWrap:"wrap",gap:.5,mt:T?.length>0?"0.5rem":""},children:[!h&&T?.length>0&&(0,jt.jsx)(Dt,{avatar:f,label:T[T.length-1]?.name,size:"small",onDelete:()=>R(T[T.length-1]?.id),deleteIcon:(0,jt.jsx)(Xt,{title:`Remove ${n}`,children:(0,jt.jsx)(Ft,{style:To})})},T[T.length-1]?.id),h&&T?.map(C=>(0,jt.jsx)(Dt,{avatar:(0,jt.jsx)(N1,{...To}),label:C.name,size:"small",onDelete:()=>R(C.id),deleteIcon:(0,jt.jsx)(Xt,{title:`Remove ${n}`,children:(0,jt.jsx)(Ft,{style:To})})},C.id)),T?.length>1&&(0,jt.jsx)(z,{onClick:()=>g(!h),sx:{cursor:"pointer"},children:h?"(hide)":`(+${T?.length-1})`})]})]})},iy=YTe;var rc=require("@mui/material"),zG=(0,rc.styled)("div")(({theme:e})=>({padding:"2.5rem",margin:"2rem 0",backgroundColor:e.palette.grey.A400,display:"flex",border:`1px solid ${e.palette.common.black}`,justifyContent:"space-between",transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)","&:hover":{transition:"background 150ms ease-out 0s, border 150ms ease-out 0s, transform 150ms ease-out 0s",transform:"translate3d(0px, -1px, 0px)",boxShadow:`${e.palette.common.black} 0px 8px 16px 0px`},"@media screen and (max-width: 992px)":{padding:"1.5rem"},"@media screen and (max-width: 500px)":{padding:"0.75rem"}})),jG=(0,rc.styled)("div")({display:"inline-flex"}),KG=(0,rc.styled)("div")(({theme:e})=>({fontSize:"2rem",margin:"0 2rem 0 1rem",color:e.palette.grey[800],alignSelf:"center",transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"})),$G=(0,rc.styled)("div")(({theme:e})=>({h2:{margin:"0.25rem 0"},p:{margin:"0.35rem 0",color:e.palette.grey[800],transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"}}));var gs=require("react/jsx-runtime"),ZTe=({chapterNum:e,chapter:t})=>(0,gs.jsx)(zG,{id:t.frontmatter.courseTitle?t.frontmatter.courseTitle:void 0,children:(0,gs.jsxs)(jG,{children:[(0,gs.jsx)(KG,{children:e}),(0,gs.jsxs)($G,{children:[(0,gs.jsx)("h2",{children:t.frontmatter.chapterTitle?t.frontmatter.chapterTitle:t.frontmatter.courseTitle}),(0,gs.jsx)("p",{children:t.frontmatter.description})]})]})}),ly=ZTe;var L3=require("@mui/material"),D3=G(require("react"));var Du=require("@mui/material/styles");var A1t=(0,Du.styled)("div")(({theme:e})=>({marginLeft:".5rem",color:e.palette.background.secondary})),YG=(0,Du.styled)(Wf)({overflowY:"auto",scrollbarWidth:"none","&::-webkit-scrollbar":{width:"0em"}}),ZG=(0,Du.styled)(Or)(()=>({pointerEvents:"auto",margin:"0.5rem 0rem 0.5rem 0rem",fontSize:"0.1rem",padding:"0"})),QG=(0,Du.styled)(Or)(()=>({pointerEvents:"auto",margin:"0rem 0rem 0rem 0.5rem",fontSize:"0.1rem"})),XG=(0,Du.styled)("div")({marginRight:"0.75rem",marginLeft:"0.5rem"}),JG=(0,Du.styled)("div")({marginRight:"0.5rem"});var Kr=require("react/jsx-runtime"),QTe=({navigationItems:e,MenuListProps:t={},ListItemTextProps:r={}})=>{let o=(0,L3.useTheme)(),a=(0,L3.useMediaQuery)(o.breakpoints.up("sm")),[n,i]=(0,D3.useState)(null),l=(s,u)=>{u.stopPropagation(),i(f=>f===s?null:s)};return(0,Kr.jsx)(YG,{...t,dense:!0,children:e.map(s=>{let u=n===s.id,f=s.permission??!0,d=s.addDivider??!1;return!(s.showOnWeb??!0)&&a?null:(0,Kr.jsxs)(D3.default.Fragment,{children:[(0,Kr.jsxs)(At,{disabled:!f,onClick:s.onClick,"data-testid":`nav-item-${s.id}`,children:[(0,Kr.jsxs)(ZG,{children:[s.icon&&(0,Kr.jsx)(XG,{children:s.icon}),(0,Kr.jsx)(Qt,{primary:s.title,...r})]}),s.subItems&&(0,Kr.jsx)(Qt,{"data-testid":`nav-toggle-${s.id}`,children:u?(0,Kr.jsx)($l,{onClick:m=>l(s.id,m)}):(0,Kr.jsx)(Ko,{onClick:m=>l(s.id,m)})})]}),s.subItems&&(0,Kr.jsx)(da,{in:u,timeout:"auto",unmountOnExit:!0,variant:"submenu",children:s.subItems.map(m=>(0,Kr.jsx)(At,{disabled:!m.permission,onClick:m.onClick,"data-testid":`nav-subitem-${m.id}`,children:(0,Kr.jsxs)(QG,{children:[m.icon&&(0,Kr.jsx)(JG,{children:m.icon}),(0,Kr.jsx)(Qt,{primary:m.title,...r})]})},m.id))}),d&&(0,Kr.jsx)(ma,{})]},s.id)})})},sy=QTe;var F3=require("@mui/material");var cp=require("react/jsx-runtime"),XTe=(0,F3.styled)("div")(({type:e,theme:t})=>({fontWeight:500,background:"#212529",color:"inherit",marginTop:"2rem",width:"100%",height:"100%",marginBottom:"2rem",padding:"0.5rem 1rem",borderRadius:0,borderStyle:"solid",borderColor:e==="warning"?t.palette.text.warning:t.palette.background.brand?.default,borderWidth:"0 0 0 4px"})),JTe=(0,F3.styled)("h4")(({type:e,theme:t})=>({color:e==="warning"?t.palette.text.warning:t.palette.background.brand?.default,fontSize:"1.35rem"})),e8e=(0,F3.styled)("p")(({theme:e})=>({color:e.palette.text.inverse})),t8e=({type:e="note",title:t,content:r})=>(0,cp.jsxs)(XTe,{type:e,children:[(0,cp.jsx)(JTe,{type:e,children:t}),(0,cp.jsx)(e8e,{children:(0,cp.jsx)(r3,{content:r})})]}),uy=t8e;var sz=require("re-resizable"),uz=G(require("react-draggable"));var Ts=require("react/jsx-runtime"),r8e=({height:e=24,width:t=24,fill:r="#E8EFF3",...o})=>(0,Ts.jsxs)("svg",{width:t,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...o,children:[(0,Ts.jsx)("g",{clipPath:"url(#clip0_34897_172744)",children:(0,Ts.jsx)("path",{d:"M6 10C4.9 10 4 10.9 4 12C4 13.1 4.9 14 6 14C7.1 14 8 13.1 8 12C8 10.9 7.1 10 6 10ZM18 10C16.9 10 16 10.9 16 12C16 13.1 16.9 14 18 14C19.1 14 20 13.1 20 12C20 10.9 19.1 10 18 10ZM12 10C10.9 10 10 10.9 10 12C10 13.1 10.9 14 12 14C13.1 14 14 13.1 14 12C14 10.9 13.1 10 12 10Z",fill:r})}),(0,Ts.jsx)("defs",{children:(0,Ts.jsx)("clipPath",{id:"clip0_34897_172744",children:(0,Ts.jsx)("rect",{width:"24",height:"24",fill:"white"})})})]}),fy=r8e;var Z1t=(0,b.styled)(Or)(({theme:e})=>({padding:e.spacing(.5,.5),marginBlock:e.spacing(1),"& .MuiListItemText-primary":{fontSize:"1rem",textTransform:"capitalize",fontWeight:700},cursor:"pointer","&:hover":{backgroundColor:e.palette.action.hover},"& .MuiSvgIcon-root":{opacity:0,transition:"opacity 0.2s"},"&:hover .MuiSvgIcon-root":{opacity:1}})),Q1t=(0,b.styled)(Or,{shouldForwardProp:e=>e!=="isVisible"})(({theme:e,isVisible:t})=>({padding:e.spacing(.05,.5),fontStyle:t?"normal":"italic",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap","& .MuiSvgIcon-root":{height:20,width:20},"& .MuiListItemIcon-root":{minWidth:0,opacity:t?.8:.3},"& .MuiTypography-root":{fontSize:"0.9rem",opacity:t?1:.5}})),ez=(0,b.styled)("div")(({theme:e})=>({display:"flex",alignItems:"center",padding:e.spacing(4,2),alignContent:"stretch",justifyContent:"space-between",cursor:"move",background:e.palette.mode==="light"?"linear-gradient(90deg, #3B687B 0%, #507D90 100%)":"linear-gradient(90deg, #28353A 0%, #3D4F57 100%)",height:"3rem",flexShrink:0})),tz=(0,b.styled)($)(({theme:e})=>({padding:e.spacing(2),backgroundColor:e.palette.background.surfaces,overflow:"auto",flex:1,minHeight:0})),rz=(0,b.styled)("div")({height:"100%",display:"flex",flexDirection:"column",minHeight:"3rem"}),oz=(0,b.styled)($)(({theme:e,intitialPosition:t})=>({borderRadius:"8px",overflow:"hidden",flexShrink:0,zIndex:100,position:"absolute",backgroundColor:e.palette.background.blur?.light,boxShadow:`0 4px 16px ${e.palette.background.blur?.light}`,maxHeight:"80%",display:"flex",boxSizing:"border-box",...t})),az=(0,b.styled)(fy)(({theme:e})=>({fill:e.palette.common.white,position:"absolute",top:"-0.3rem",left:"50%"})),nz=(0,b.styled)("div")({display:"flex",gap:"1rem",justifyContent:"flex-end",alignItems:"center"}),iz=(0,b.styled)("div")({display:"flex",justifyContent:"end",alignItems:"center",flex:"1"}),N3=(0,b.styled)(tt)(({theme:e})=>({color:e.palette.common.white})),lz=(0,b.styled)("div")(()=>({position:"absolute",left:"0",right:"0",marginInline:"auto",width:"fit-content"}));var Vt=require("react/jsx-runtime"),o8e=({isOpen:e,id:t="panel",children:r,areAllExpanded:o,toggleExpandAll:a,handleClose:n,defaultSize:i,intitialPosition:l,sx:s,minimizePanel:u,title:f=""})=>{let d=(0,b.useTheme)();return e?(0,Vt.jsx)(uz.default,{handle:".drag-handle",children:(0,Vt.jsx)(oz,{intitialPosition:l,sx:s,children:(0,Vt.jsx)(sz.Resizable,{defaultSize:{width:i?.width||"18rem",height:i?.height||"auto"},onResize:()=>{window.dispatchEvent(new Event("panel-resize"))},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},children:(0,Vt.jsx)(rz,{children:(0,Vt.jsxs)(no,{children:[(0,Vt.jsx)("div",{className:"drag-handle",children:(0,Vt.jsxs)(ez,{children:[(0,Vt.jsx)($,{display:"flex",justifyContent:"flex-end",padding:"8px",children:a&&(0,Vt.jsx)(Xt,{title:o?"Collapse All":"Expand All",children:(0,Vt.jsx)(N3,{onClick:a,children:o?(0,Vt.jsx)(B2,{}):(0,Vt.jsx)(U2,{})})})}),(0,Vt.jsx)(az,{}),(0,Vt.jsxs)(iz,{children:[(0,Vt.jsx)(nz,{id:`${t}-panel-header-actions-container`}),(0,Vt.jsx)(lz,{children:f}),u&&(0,Vt.jsx)(N3,{onClick:u,children:(0,Vt.jsx)(nd,{fill:d.palette.common.white})}),(0,Vt.jsx)(N3,{onClick:n,children:(0,Vt.jsx)(Ft,{fill:d.palette.common.white})})]})]})}),(0,Vt.jsx)(tz,{className:"panel-body",children:r})]})})})})}):null},dy=({...e})=>(0,Vt.jsx)(o8e,{...e});var ac=require("react");var dmt=(0,b.styled)($)(()=>({padding:"1rem",borderRadius:"1rem",backgroundColor:"white",width:"100%",alignSelf:"center",height:"20rem",marginBottom:"1rem",boxShadow:"0px 2px 10px rgba(0, 0, 0, 0.2)",display:"block","@media (max-width:900px)":{height:"18rem",marginInline:"0",padding:"0.5rem"}})),pmt=(0,b.styled)("div")(()=>({width:"100%",justifyContent:"center",display:"flex",alignItems:"center",marginTop:"20px"})),mmt=(0,b.styled)($)(()=>({display:"flex",justifyContent:"space-evenly",gap:"2.5rem",width:"100%"})),cmt=(0,b.styled)($)(()=>({display:"flex",flexWrap:"wrap",justifyContent:"space-evenly",gap:"2.5rem",width:"100%"})),xmt=(0,b.styled)("div")(({theme:e})=>({backgroundColor:e.palette.common.white,textAlign:"center",borderRadius:"1rem",width:"100%",padding:"1.5rem",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"})),py=(0,b.styled)($)(({theme:e})=>({background:e.palette.mode==="light"?e.palette.background.default:e.palette.background.secondary,paddingTop:e.spacing(2),borderRadius:"1rem",display:"flex",alignItems:"center",flexDirection:"column"})),fz=(0,b.styled)($)(({theme:e})=>({paddingInline:e.spacing(2),display:"flex",alignItems:"center",placeSelf:"flex-start",justifyContent:"space-between",width:"100%"})),dz=(0,b.styled)(z)(({theme:e})=>({fontSize:"1.5rem",fontWeight:600,color:e.palette.text.default})),pz=(0,b.styled)(Rr)(({theme:e})=>({width:"200px",margin:"0.5rem",height:"100%",borderRadius:"1rem",position:"relative",overflow:"hidden",transition:"all 0.3s ease-in-out",background:i3(e.palette.mode==="light"),border:"1px solid transparent",boxShadow:"2px 2px 3px 2px rgb(0, 211, 169, 0.5)","&:hover":{transform:"translateY(-4px)",boxShadow:`2px 2px 3px 2px ${e.palette.text.brand}`,cursor:"pointer"}})),mz=(0,b.styled)("div")(()=>({display:"flex",gap:"10px",flexWrap:"nowrap",justifyContent:"center",width:"100%"})),cz=(0,b.styled)($)(()=>({width:"2rem",height:"2rem",padding:"0.25rem",borderRadius:"8px",backgroundColor:"#D6FFF7",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.3s ease","& svg":{transition:"transform 0.3s ease"},"&:hover svg":{transform:"scale(1.2)"},"& .clone-icon":{width:"20px",height:"20px"}})),xz=(0,b.styled)($a)(()=>({height:"100%",display:"flex",flexDirection:"column",padding:"12px",paddingBottom:"0px !important"})),hz=(0,b.styled)($)({display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:"0.5rem",gap:"0.6rem"}),gz=(0,b.styled)(z)(({theme:e})=>({fontSize:"0.85rem",fontWeight:"bold",color:e.palette.text.default,lineHeight:1.2,marginTop:"4px",textTransform:"uppercase",letterSpacing:"0.5px",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"clip",maxWidth:"70%",height:"2.4em"})),Tz=(0,b.styled)(z)(({theme:e})=>({fontSize:"24px",fontWeight:700,color:e.palette.icon.secondary,marginBottom:"0.5rem",lineHeight:1.2})),hmt=(0,b.styled)($)(({theme:e})=>({marginBottom:"1rem",padding:"8px",borderRadius:"8px",background:e.palette.mode==="light"?"#f8fafc":_n,color:e.palette.mode==="light"?"rgba(26, 26, 26, .8)":e.palette.text.default,transition:"background 0.3s ease, filter 0.3s ease","&:hover":{filter:"brightness(0.98)"}})),Sz=(0,b.styled)(z)(({theme:e})=>({fontSize:"0.9rem",fontWeight:1e3,color:e.palette.text.default,lineHeight:1.3,marginBottom:"4px",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis",minHeight:"fit-content",maxHeight:"2.6em"})),Cz=(0,b.styled)(z)({fontSize:"0.75rem",marginBottom:"8px"}),yz=(0,b.styled)($)(({theme:e})=>({display:"flex",gap:"15px",width:"100%",padding:"20px",background:e.palette.mode==="light"?e.palette.background.default:e.palette.background.secondary,borderRadius:"12px",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.05)",paddingBottom:e.spacing(3)})),bz=(0,b.styled)($)(({theme:e})=>({padding:"1rem",color:e.palette.text.error,fontSize:"1rem",fontWeight:500}));var mn=require("react/jsx-runtime"),my=({open:e,handleClick:t})=>{let r=(0,b.useTheme)();return(0,mn.jsx)(xe,{title:e?"Hide Performers":"Show Performers",placement:"bottom",children:(0,mn.jsx)("span",{children:(0,mn.jsxs)(Me,{variant:"contained",onClick:t,sx:{height:"3.7rem",padding:"0.3rem 1rem 0.3rem 0.3rem"},style:{backgroundColor:e?void 0:r.palette.background.constant?.disabled},children:[(0,mn.jsx)(Kl,{style:{height:"2rem",width:"2rem",marginRight:"10px"}}),e?"Hide Performers":"Show Performers"]})})})},cy=({handleClick:e})=>(0,mn.jsx)(xe,{title:"Open Leaderboard",placement:"bottom",children:(0,mn.jsx)(Me,{variant:"contained",onClick:e,sx:{height:"3.7rem",padding:"0.3rem",display:{xs:"inline-flex",sm:"none"}},children:(0,mn.jsx)(Kl,{style:{height:"2rem",width:"2rem"}})})}),vz=()=>(0,mn.jsx)(mz,{children:[...Array(5)].map((e,t)=>(0,mn.jsx)(g2,{variant:"rounded",height:"13.5rem",width:"inherit",sx:{minWidth:"150px"},style:{borderRadius:"1rem"}},t))});var St=require("react/jsx-runtime"),a8e={pathType:"pattern",page:0,pagesize:1,metrics:!0,expandUser:!0,trim:!0},xy={view:{label:"Most Opens",id:"open",countKey:"view_count"},clone:{label:"Most Clones",id:"clone",countKey:"clone_count"},download:{label:"Most Downloads",id:"download",countKey:"download_count"},deployment:{label:"Most Deploys",id:"deployments",countKey:"deployment_count"},share:{label:"Most Shares",id:"share",countKey:"share_count"}},oc=e=>({...a8e,order:`${xy[e].countKey} desc`}),n8e=({label:e,countKey:t,count:r,patternName:o,pattern:a,userName:n,status:i,id:l,onCardClick:s,onIconClick:u})=>{let f=()=>{s(a)},d=(m,x)=>{m.stopPropagation(),u(x)},p=(0,b.useTheme)();return(0,St.jsx)(pz,{elevation:0,status:i,onClick:f,children:(0,St.jsxs)(xz,{cardId:l,children:[(0,St.jsxs)(hz,{children:[(0,St.jsx)(gz,{children:e}),(0,St.jsx)(cz,{onClick:m=>d(m,`${t}+desc`),children:(0,St.jsx)(e5,{...$o,fill:p.palette.common.black})})]}),(0,St.jsx)(Tz,{children:r}),(0,St.jsxs)($,{children:[(0,St.jsx)(Sz,{children:o}),(0,St.jsxs)(Cz,{children:["by ",n]})]})]})})},br=(e={})=>({search:e.search??"",order:e.order??"",pagesize:e.pagesize??0,page:e.page??0,...e}),wz=(0,ac.memo)(n8e);wz.displayName="StatCard";var i8e=e=>{let t=e(br(oc("view"))),r=e(br(oc("clone"))),o=e(br(oc("download"))),a=e(br(oc("deployment"))),n=e(br(oc("share"))),i={view:t,clone:r,download:o,deployment:a,share:n};return{queries:i,isLoading:Object.values(i).some(l=>l.isLoading),hasError:Object.values(i).some(l=>l.isError)}},l8e=(e,t)=>{let r=e[t],o=xy[t],a=r?.isSuccess&&r.data?.patterns?.[0];return a?{label:o.label,countKey:o.countKey,count:a[o.countKey],patternName:a.name||"Unknown",pattern:a,userName:a.user?.first_name||"Unknown",id:o.id,status:a?.catalog_data?.content_class}:null},s8e=({useGetCatalogFilters:e,onCardClick:t,onIconClick:r,onOpenLeaderboard:o})=>{let a=(0,b.useTheme)(),{queries:n,isLoading:i,hasError:l}=i8e(e),s=(0,b.useMediaQuery)(a.breakpoints.down("sm")),u=(0,ac.useMemo)(()=>Object.keys(xy).map(d=>l8e(n,d)).filter(d=>!!d),[n]);if(l)return(0,St.jsx)(py,{children:(0,St.jsx)(bz,{children:"Error loading statistics. Please try again later."})});let f=u.map((d,p)=>(0,St.jsx)(wz,{...d,onCardClick:t,onIconClick:r},`${d.id}-${p}`));return(0,St.jsx)(no,{children:(0,St.jsxs)(py,{children:[(0,St.jsxs)(fz,{children:[(0,St.jsxs)($,{display:"flex",alignItems:"center",gap:1,children:[(0,St.jsx)(dz,{children:"Top Performers"}),(0,St.jsx)(Kl,{style:{height:"2rem",width:"2rem",color:a.palette.icon.secondary,display:s?"none":"inline-flex"}})]}),o&&(0,St.jsx)("div",{children:(0,St.jsxs)(Me,{variant:"contained",onClick:()=>o(),children:[(0,St.jsx)(Kl,{style:{height:"2rem",width:"2rem",display:s?"inline-flex":"none"}}),(0,St.jsx)("p",{style:{margin:0,display:s?"none":"inline-flex"},children:"Open Leaderboard"})]})})]}),(0,St.jsxs)(yz,{children:[i&&(0,St.jsx)(vz,{}),(0,St.jsx)(ou,{items:f})]})]})})},hy=(0,ac.memo)(s8e);var Qn=require("@mui/material"),Ez=(0,Qn.styled)("div")({padding:"1rem 0","& h2":{margin:"1rem 0"},".get-started-desc":{margin:"1rem"}}),Rz=(0,Qn.styled)("div")(({theme:e})=>({display:"flex",cursor:"pointer",flexDirection:"row",flexWrap:"wrap","& a":{color:e.palette.text.primary,margin:"1rem"}})),Oz=(0,Qn.styled)("a")(({theme:e})=>({flex:"1",padding:"2rem",textDecoration:"none",background:e.palette.mode==="light"?"#EEEEEE":"#212121",minHeight:"21.5rem",transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)",borderRadius:"10px","&:hover":{boxShadow:`${e.palette.background.brand?.default} 0px 0px 7px`},"& a":{margin:"0 !important","&:hover":{color:e.palette.background.brand?.default}}})),Az=(0,Qn.styled)("div")({display:"flex",alignItems:"center",gap:"1rem"}),Fmt=(0,Qn.styled)("div")({flex:"0 0 25%",alignSelf:"center",margin:"0 0.5rem"}),Nmt=(0,Qn.styled)("img")({height:"3rem",width:"3rem",maxWidth:"3rem",margin:"auto"}),Bmt=(0,Qn.styled)("svg")(({theme:e})=>({fontSize:"4.15rem",alignSelf:"center",flex:"0 0 25%",margin:"0 0.5rem",filter:e.palette.mode==="light"?"0%":"invert(100%)",transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"})),Hmt=(0,Qn.styled)("h2")({fontSize:"1.75rem",margin:"1rem 0"}),Vmt=(0,Qn.styled)("p")(({theme:e})=>({color:e.palette.text.primary,transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"}));var _a=require("react/jsx-runtime"),u8e=({Steps:e,PrerequisiteLine:t})=>(0,_a.jsxs)(Ez,{children:[(0,_a.jsxs)("div",{className:"get-started-desc",id:"pre-requisites",children:[(0,_a.jsx)("h2",{children:"Prerequisites"}),(0,_a.jsx)("p",{children:t})]}),(0,_a.jsx)(Rz,{id:"Set up",children:e.map((r,o)=>(0,_a.jsxs)(Oz,{href:r.url,target:"_blank",children:[(0,_a.jsxs)(Az,{children:[(0,_a.jsx)("h2",{children:r.heading}),typeof r.Icon=="string"?(0,_a.jsx)("img",{src:r.Icon,alt:r.heading,width:"40px",height:"40px"}):r.Icon]}),(0,_a.jsx)("p",{children:r.description})]},o))})]}),gy=u8e;var Pz=require("@mui/material");var f8e=(0,Pz.styled)("div")(({theme:e})=>({color:e.palette.text.primary,transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)",".chapter-sub-heading, .chapter-sub-heading a":{color:e.palette.mode==="light"?E2:R2,transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"},".chapter-alt-heading, .chapter-alt-heading a":{color:"gray"},"& a":{color:e.palette.background.brand?.default,textDecoration:"underline","&:hover":{color:e.palette.background.brand?.default}},"& p > code":{color:"inherit",padding:".2em .4em",margin:"0",fontSize:"85%",wordBreak:"normal",backgroundColor:e.palette.background.code,borderRadius:".25rem"},"& pre":{backgroundColor:"#011627",padding:"1em",borderRadius:"0.5rem",overflowX:"auto",color:"#d6deeb",position:"relative",textAlign:"left",width:"100%",margin:"1rem auto autocompleteClasses",fontFamily:"Courier New, Courier, monospace"},"& li code":{color:"inherit",padding:".2em .4em",margin:"0",fontSize:"85%",wordBreak:"normal",backgroundColor:e.palette.background.code,borderRadius:".25rem"},"& li a":{color:e.palette.text.default,textDecoration:"underline","&:hover":{color:e.palette.background.brand?.default}}})),Ty=f8e;var Sy=require("react");var Ss=require("@mui/material"),_z=(0,Ss.styled)("div")({width:"52rem",maxWidth:"90%"}),Iz=(0,Ss.styled)("div")({display:"flex",alignItems:"center",background:"#323339",width:"100%",height:"2.875rem",borderRadius:"2px 2px 0 0"}),Zmt=(0,Ss.styled)("div")({color:"#76767d",fontFamily:"'Courier New', Courier, monospace",fontSize:"13.5px",margin:"0 auto"}),kz=(0,Ss.styled)("ul")({position:"absolute",display:"block",listStyle:"none",marginLeft:"1rem",marginTop:"0",marginBottom:"0",padding:"0","& li":{display:"inline-block",width:"0.875rem",height:"0.875rem",background:"#1d1e23",borderRadius:"0.75rem",marginRight:"7px"}}),Mz=(0,Ss.styled)("div")({width:"100%",height:"100%",background:"#1d1e23",borderRadius:"0 0 2px 2px",padding:"24px 32px"}),Lz=(0,Ss.styled)("div")({width:"100%",height:"100%",position:"relative",overflow:"scroll",msOverflowStyle:"none",scrollbarWidth:"none","&::-webkit-scrollbar":{WebkitAppearance:"none",width:"0",height:"0"},"&.no-scroll-overflow-wrapper":{"& .code-wrapper":{bottom:"0",position:"absolute",minHeight:"100%"}}}),Dz=(0,Ss.styled)("div")(({theme:e})=>({"& pre":{padding:"0",margin:"0",width:"100%",height:"100%",fontStyle:"normal",fontWeight:"normal",fontSize:"12px",lineHeight:"27px",whiteSpace:"pre-wrap",color:e.palette.info.main,"&.short":{lineHeight:"16px"},"&.navy":{color:"#66a2ff"},"&.gray":{color:"#bdbec2"},"&.white":{color:"#fff"},wrapWord:"normal",[e.breakpoints.up("sm")]:{fontSize:"13.5px",lineHeight:"26px"}}}));var vo=require("react/jsx-runtime"),d8e=({lines:e,title:t,noScroll:r})=>(0,vo.jsxs)(_z,{children:[(0,vo.jsxs)(Iz,{children:[(0,vo.jsxs)(kz,{children:[(0,vo.jsx)("li",{style:{backgroundColor:"red"}}),(0,vo.jsx)("li",{style:{backgroundColor:"yellow"}}),(0,vo.jsx)("li",{style:{backgroundColor:"green"}})]}),t&&(0,vo.jsx)("div",{className:"title",children:t})]}),(0,vo.jsx)(Mz,{children:(0,vo.jsx)(Lz,{className:r?"no-scroll-overflow-wrapper":"",children:(0,vo.jsx)(Dz,{children:e&&e.map((o,a)=>(0,vo.jsx)(Sy.Fragment,{children:(0,vo.jsxs)("pre",{className:`${o.short?"short":""}`,style:{color:o.color?o.color:"blue"},children:[o.indent&&new Array(o.indent*2).fill({}).map((n,i)=>(0,vo.jsx)(Sy.Fragment,{children:"\xA0"},i)),o.code]})},a))})})})]}),Cy=d8e;var Fz=require("@mui/material"),Nz=(0,Fz.styled)("div")(({theme:e})=>({".chapter-back":{display:"flex",justifyContent:"space-between",alignItems:"center","& a":{display:"inline-flex","& svg":{alignSelf:"center",fontSize:"1.5rem",color:e.palette.grey[600],width:"100%",maxWidth:"1.5rem"},"& h4":{fontWeight:500,textTransform:"capitalize",fontSize:"1.25rem"},"&:hover":{"& svg, & h4":{color:e.palette.text.primary}}},".toc-toggle-btn":{display:"none"},".toc-menu-icon":{width:"1.5rem",height:"1.5rem",cursor:"pointer",fill:e.palette.secondary.main,transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"}},".toc-list":{"& ul":{position:"relative",paddingInlineStart:"2.65rem",MozPaddingStart:"2.65rem","&::after":{position:"absolute",inset:"1rem auto 1rem 1.7rem",width:"auto",height:"auto",borderLeft:"1px solid rgba(177, 182, 184, 0.25)",content:'""',zIndex:0},"& li":{width:"fit-content",margin:"1rem 0","&::marker":{color:"rgba(177, 182, 184, 0.75)"},"& p":{margin:0,fontSize:"1rem","& a":{color:e.palette.mode==="light"?"rgb(0 0 0 / 0.65)":"rgb(255 255 255 / 0.65)",transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"}},"&:hover":{"&::marker, & p, & a":{color:e.palette.background.brand?.default}}},".active-link":{"&::marker, & p, & a":{color:e.palette.background.brand?.default}}}}}));var Fu=require("react/jsx-runtime"),p8e=({availableChapters:e,currentChapter:t,onClick:r})=>{let o=a=>a.split("-").map(l=>l.charAt(0).toUpperCase()+l.slice(1)).join(" ");return(0,Fu.jsx)(Nz,{children:(0,Fu.jsx)("div",{className:"toc-list",children:(0,Fu.jsx)("ul",{className:"toc-ul toc-ul-open",children:e.map(a=>(0,Fu.jsx)("li",{className:a+".mdx"===t?"active-link":"",onClick:n=>{r(a,n)},children:(0,Fu.jsxs)("p",{className:"toc-item",children:[" ",o(a)]})},a))})})})},yy=p8e;var Vz=require("react");var Bz=require("@mui/material"),Hz=(0,Bz.styled)("div")(({theme:e})=>({position:"sticky",top:"10rem",left:0,marginLeft:"-3rem",".go-back":{margin:"1rem 0",display:"flex",justifyContent:"space-between",alignItems:"center","& a":{display:"inline-flex","& svg":{alignSelf:"center",fontSize:"1.5rem",color:e.palette.text.disabled,width:"100%",maxWidth:"1.5rem"},"& h4":{fontWeight:500,textTransform:"capitalize",fontSize:"1.25rem",whiteSpace:"nowrap"},"&:hover":{"& svg, & h4":{color:e.palette.text.primary}}}},".toc-toggle-btn":{display:"none"},".toc-ul-open":{display:"flex",flexDirection:"column",marginTop:"0rem",listStyle:"none",height:"auto !important",opacity:"1 !important",transition:"all .4s !important"},".toc-menu-icon":{width:"1.5rem",height:"1.5rem",cursor:"pointer",fill:e.palette.common.white},".toc-sub-heading":{marginTop:"1rem",fontWeight:500,fontSize:"1.15rem"},".toc-item":{lineHeight:"1.5rem"},".toc-list":{"& ul":{position:"relative",paddingInlineStart:"1.5rem",listStyleType:"none","& li":{margin:"1rem 0 1rem 0.5rem",width:"fit-content","&::marker":{color:"rgba(177, 182, 184, 0.75)"},"& p":{margin:0,fontSize:"1rem","& a":{color:"rgba(0, 0, 0, 0.65)"}},"&:hover":{"&::marker, & p, & a":{color:e.palette.secondary.contrastText}}},".active-link":{"&::marker, & p, & a":{color:e.palette.secondary.contrastText}}}},"@media only screen and (max-width: 991px)":{position:"initial",marginLeft:"-0.5rem",width:"auto",".toc-toggle-btn":{display:"flex"},".go-back":{marginLeft:0},".toc-ul":{opacity:0,height:0,transition:"none",paddingLeft:".8rem !important"},".toc-item":{lineHeight:".8rem"}}}));var lr=require("react/jsx-runtime"),m8e=[{name:"Set up",link:"/cloud-native-management/meshery"},{name:"Run Meshery",link:"/cloud-native-management/meshery/getting-started"},{name:"Manage Meshery",link:"/cloud-native-management/meshery/operating-service-meshes"}],c8e=({coursesData:e})=>{let[t,r]=(0,Vz.useState)(!1);return(0,lr.jsxs)(Hz,{children:[(0,lr.jsxs)("div",{className:"go-back",children:[(0,lr.jsxs)("a",{href:"/learn/learning-paths",children:[(0,lr.jsx)(N2,{}),(0,lr.jsx)("h4",{children:"Learning Paths"})]}),(0,lr.jsx)("div",{className:"toc-toggle-btn",children:t?(0,lr.jsx)(Ft,{className:"toc-menu-icon",onClick:()=>{r(!t)}}):(0,lr.jsx)(ad,{className:"toc-menu-icon",onClick:()=>{r(!t)}})})]}),(0,lr.jsx)("div",{className:"toc-list",children:(0,lr.jsxs)("ul",{className:`toc-ul ${t?"toc-ul-open":""}`,children:[(0,lr.jsx)("a",{href:"#pre-requisites",children:(0,lr.jsx)("h5",{className:"toc-sub-heading",children:"Pre-requisites"})}),m8e.map((o,a)=>(0,lr.jsx)("li",{children:(0,lr.jsx)("p",{className:"toc-item",children:(0,lr.jsx)("a",{href:`#${o.name}`,children:o.name})})},a)),(0,lr.jsx)("a",{href:"#courses-list",children:(0,lr.jsx)("h5",{className:"toc-sub-heading",children:"Courses"})}),e.map((o,a)=>(0,lr.jsx)("li",{children:(0,lr.jsx)("p",{className:"toc-item",children:(0,lr.jsx)("a",{href:`#${o.frontmatter.courseTitle}`,children:o.frontmatter.courseTitle})})},a))]})})]})},by=c8e;var Uz=require("@mui/material"),Wz=G(require("@mui/material/Autocomplete")),vy=G(require("@mui/material/CircularProgress")),nc=require("react"),qz=require("use-debounce");var Ct=require("react/jsx-runtime"),x8e=({usersData:e,disabled:t=!1,shareWithNewUsers:r,useGetAllUsersQuery:o})=>{let[a,n]=(0,nc.useState)(!1),[i,l]=(0,nc.useState)(""),[s,u]=(0,nc.useState)([]),[f,d]=(0,nc.useState)(!1),p=(0,b.useTheme)(),[m]=(0,qz.useDebounce)(i,300),{data:x,isLoading:h}=o({search:m,page:0,pagesize:10},{skip:m.trim().length==0}),g=x?.data??[],T=async()=>{console.log("users to share with",s);try{d(!0);let v=await r(s);v.error?n(v.error):u([])}catch(v){console.log("error while sharing",v)}finally{d(!1)}},E=(v,P)=>{P&&(u(P),l(""))},R=(v,P,B)=>{B==="input"?l(P):B==="clear"&&l("")},k=g.filter(v=>!s.concat(e).find(P=>P.email===v.email)),D=t||f||s.length===0,C=({avatarObj:v,...P})=>(0,Ct.jsx)(Dt,{avatar:(0,Ct.jsx)(qt,{alt:v.first_name,src:v.avatar_url,children:v.avatar_url?"":v.first_name?.charAt(0)}),label:v.email,size:"small",...P},v.user_id);return(0,Ct.jsx)(Ct.Fragment,{children:(0,Ct.jsxs)($,{display:"flex",alignItems:"center",justifyContent:"space-between",gap:1,children:[(0,Ct.jsx)(Wz.default,{id:"user-search-field",sx:{width:"100%"},filterOptions:v=>v,options:k,renderTags:(v,P)=>v.map((B,_)=>(0,Ct.jsx)(C,{avatarObj:B,...P({index:_})})),disableClearable:!0,includeInputInList:!0,filterSelectedOptions:!0,multiple:!0,disableListWrap:!0,disabled:f,inputValue:i,loading:h,value:s,getOptionLabel:v=>v.email,noOptionsText:h?"Loading...":i==""?"Search using name or email":"No users found",onChange:E,onInputChange:R,isOptionEqualToValue:(v,P)=>v.email===P.email,renderInput:v=>(0,Ct.jsx)(Qr,{...v,placeholder:"Add Users",error:!!a,helperText:a,fullWidth:!0,label:"",disabled:D,sx:{"& .MuiOutlinedInput-root":{paddingInline:"0.5rem",paddingBlock:"0.1rem"}},InputProps:{...v.InputProps,endAdornment:(0,Ct.jsx)(Ct.Fragment,{children:h?(0,Ct.jsx)(vy.default,{color:"inherit",size:20}):null})}}),renderOption:(v,P)=>(0,Ct.jsx)($,{component:"li",sx:{"& > img":{mr:2,flexShrink:0}},...v,children:(0,Ct.jsxs)(ce,{container:!0,alignItems:"center",children:[(0,Ct.jsx)(ce,{children:(0,Ct.jsx)($,{sx:{color:"text.secondary",mr:2},children:(0,Ct.jsx)(qt,{alt:P.first_name,src:P.avatar_url,children:P.avatar_url?"":(0,Ct.jsx)(Ln,{})})})}),(0,Ct.jsx)(ce,{size:"grow",children:P.deleted_at?.Valid?(0,Ct.jsxs)(z,{variant:"body2",color:"text.secondary",children:[P.email," (deleted)"]}):(0,Ct.jsxs)(Ct.Fragment,{children:[(0,Ct.jsxs)(z,{variant:"body2",children:[P.first_name," ",P.last_name]}),(0,Ct.jsx)(z,{variant:"body2",color:"text.secondary",children:P.email})]})})]})})}),(0,Ct.jsx)(Uz.Button,{variant:"contained",sx:{"&.Mui-disabled":{color:`${p.palette.text.secondary} !important`,backgroundColor:`${p.palette.action.disabled} !important`}},onClick:T,disabled:D,children:f?(0,Ct.jsx)(vy.default,{size:24,sx:{color:"#fff"}}):"Share"})]})})},B3=x8e;var Gz=require("@mui/material"),$r=G(require("react"));var We=require("react/jsx-runtime"),h8e=({usersData:e,setUsersData:t,label:r="Add User",setDisableSave:o,handleNotifyPref:a,notifyUpdate:n,isCreate:i,searchType:l,disabled:s=!1,currentUserData:u,searchedUsers:f=[],isUserSearchLoading:d,fetchSearchedUsers:p,usersSearch:m,setUsersSearch:x})=>{let[h,g]=(0,$r.useState)(""),[T,E]=(0,$r.useState)(!1),[R,k]=(0,$r.useState)(!1),[D,C]=(0,$r.useState)(!0),[v,P]=(0,$r.useState)(""),[B,_]=(0,$r.useState)(e||[]);(0,$r.useEffect)(()=>{_(e||[])},[e]);let J=(0,$r.useMemo)(()=>{if(D&&!m&&u)return[u];let N=f.filter(L=>L.user_id!==u?.user_id);return!m&&u?[u,...N]:N},[f,u,m,D,B]),X=(0,$r.useCallback)((N,L)=>{L.stopPropagation();let M=B.filter(F=>F.user_id!==N);_(M),t(M),o&&o(!1)},[B,t,o,p,v]),H=(0,$r.useCallback)((N,L)=>{if(!L)return;let M=B.some(V=>V.user_id===L.user_id),F=L.deleted_at?.Valid===!0;if(M||F){g(M?"User already selected":"User does not exist");return}P(""),x(""),g(""),E(!1),_(V=>[...V,L]),t(V=>[...V,L]),o&&o(!1)},[B,t,o,x]),q=(0,$r.useCallback)((N,L)=>{if(P(L),L==="")E(!0),x(""),C(!0);else{let M=encodeURIComponent(L);p(M),g(""),E(!0),C(!1)}},[p]);return(0,We.jsxs)(We.Fragment,{children:[(0,We.jsx)(Gz.Autocomplete,{id:"user-search-field",style:{width:"100%"},open:T,options:J,getOptionLabel:()=>v,isOptionEqualToValue:(N,L)=>N.user_id===L.user_id,onOpen:()=>E(!0),onClose:()=>E(!1),inputValue:v,onChange:H,onInputChange:q,filterOptions:(N,{inputValue:L})=>N.filter(M=>{let F=L.toLowerCase();return M.first_name?.toLowerCase().includes(F)||M.last_name?.toLowerCase().includes(F)||M.email?.toLowerCase().includes(F)}),loading:d,disabled:s,disableClearable:!0,value:void 0,selectOnFocus:!1,blurOnSelect:!0,clearOnBlur:!0,popupIcon:null,forcePopupIcon:!1,noOptionsText:d?"Loading...":"No users found",renderInput:N=>(0,We.jsx)(Qr,{...N,label:r,error:!!h,helperText:h,InputLabelProps:{style:{fontFamily:"inherit"}},InputProps:{...N.InputProps,endAdornment:(0,We.jsx)($r.default.Fragment,{children:d?(0,We.jsx)(Gt,{color:"inherit",size:20}):null})}}),renderOption:(N,L)=>(0,We.jsx)("li",{...N,id:L.user_id,children:(0,We.jsxs)($,{sx:{"& > img":{mr:2,flexShrink:0}},children:[" ",(0,We.jsxs)(ce,{container:!0,alignItems:"center",children:[(0,We.jsx)(ce,{children:(0,We.jsx)($,{sx:{color:"text.secondary",mr:2},children:(0,We.jsx)(qt,{alt:L.first_name,src:L.avatar_url,children:L.avatar_url?"":(0,We.jsx)(Ln,{})})})}),(0,We.jsx)(ce,{size:"grow",children:L.deleted?(0,We.jsxs)(z,{variant:"body2",color:"text.secondary",children:[L.email," (deleted)"]}):(0,We.jsxs)(We.Fragment,{children:[(0,We.jsxs)(z,{variant:"body2",children:[L.first_name," ",L.last_name]}),(0,We.jsx)(z,{variant:"body2",color:"text.secondary",children:L.email})]})})]})]})})}),!i&&(0,We.jsx)(c2,{row:!0,children:(0,We.jsx)("div",{style:{display:"flex",flexWrap:"nowrap"},children:(0,We.jsx)(Ml,{control:(0,We.jsx)(Yr,{checked:n,onChange:a,name:"notify",color:"primary"}),label:`Notify ${l} of membership change`})})}),(0,We.jsxs)($,{sx:{display:"flex",flexWrap:"wrap",gap:.5,mt:e?.length>0?"0.5rem":""},children:[!R&&B?.[0]&&(0,We.jsx)(Dt,{avatar:(0,We.jsx)(qt,{alt:B[0].first_name,src:B[0].avatar_url,children:!B[0].avatar_url&&B[0].first_name?.[0]}),label:B[0].email,onDelete:N=>X(B[0].user_id,N),deleteIcon:(0,We.jsx)(Xt,{title:"Remove user",children:(0,We.jsx)(Ft,{style:To})}),size:"small"},B[0].user_id),R&&B?.map(N=>(0,We.jsx)(Dt,{avatar:(0,We.jsx)(qt,{alt:N.first_name,src:N.avatar_url,children:!N.avatar_url&&N.first_name?.[0]}),label:N.email,onDelete:L=>X(N.user_id,L),deleteIcon:(0,We.jsx)(Xt,{title:"Remove user",children:(0,We.jsx)(Ft,{style:To})}),size:"small"},N.user_id)),B?.length>1&&(0,We.jsx)(z,{onClick:()=>k(!R),sx:{cursor:"pointer"},children:R?"(hide)":`(+${B.length-1})`})]})]})},wy=h8e;var na=require("@mui/material"),Uu=require("@mui/material/StepConnector");function xp(e,...t){let r=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(o=>r.searchParams.append("args[]",o)),`Minified MUI error #${e}; visit ${r} for the full message.`}var ej=G(require("@emotion/styled"));function zz(e){for(var t=0,r,o=0,a=e.length;a>=4;++o,a-=4)r=e.charCodeAt(o)&255|(e.charCodeAt(++o)&255)<<8|(e.charCodeAt(++o)&255)<<16|(e.charCodeAt(++o)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(a){case 3:t^=(e.charCodeAt(o+2)&255)<<16;case 2:t^=(e.charCodeAt(o+1)&255)<<8;case 1:t^=e.charCodeAt(o)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var jz={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function Kz(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var g8e=!1,T8e=/[A-Z]|^ms/g,S8e=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Qz=function(t){return t.charCodeAt(1)===45},$z=function(t){return t!=null&&typeof t!="boolean"},Ey=Kz(function(e){return Qz(e)?e:e.replace(T8e,"-$&").toLowerCase()}),Yz=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(S8e,function(o,a,n){return Xn={name:a,styles:n,next:Xn},a})}return jz[t]!==1&&!Qz(t)&&typeof r=="number"&&r!==0?r+"px":r},C8e="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function ic(e,t,r){if(r==null)return"";var o=r;if(o.__emotion_styles!==void 0)return o;switch(typeof r){case"boolean":return"";case"object":{var a=r;if(a.anim===1)return Xn={name:a.name,styles:a.styles,next:Xn},a.name;var n=r;if(n.styles!==void 0){var i=n.next;if(i!==void 0)for(;i!==void 0;)Xn={name:i.name,styles:i.styles,next:Xn},i=i.next;var l=n.styles+";";return l}return y8e(e,t,r)}case"function":{if(e!==void 0){var s=Xn,u=r(e);return Xn=s,ic(e,t,u)}break}}var f=r;if(t==null)return f;var d=t[f];return d!==void 0?d:f}function y8e(e,t,r){var o="";if(Array.isArray(r))for(var a=0;a<r.length;a++)o+=ic(e,t,r[a])+";";else for(var n in r){var i=r[n];if(typeof i!="object"){var l=i;t!=null&&t[l]!==void 0?o+=n+"{"+t[l]+"}":$z(l)&&(o+=Ey(n)+":"+Yz(n,l)+";")}else{if(n==="NO_COMPONENT_SELECTOR"&&g8e)throw new Error(C8e);if(Array.isArray(i)&&typeof i[0]=="string"&&(t==null||t[i[0]]===void 0))for(var s=0;s<i.length;s++)$z(i[s])&&(o+=Ey(n)+":"+Yz(n,i[s])+";");else{var u=ic(e,t,i);switch(n){case"animation":case"animationName":{o+=Ey(n)+":"+u+";";break}default:o+=n+"{"+u+"}"}}}}return o}var Zz=/label:\s*([^\s;{]+)\s*(;|$)/g,Xn;function Xz(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var o=!0,a="";Xn=void 0;var n=e[0];if(n==null||n.raw===void 0)o=!1,a+=ic(r,t,n);else{var i=n;a+=i[0]}for(var l=1;l<e.length;l++)if(a+=ic(r,t,e[l]),o){var s=n;a+=s[l]}Zz.lastIndex=0;for(var u="",f;(f=Zz.exec(a))!==null;)u+="-"+f[1];var d=zz(a)+u;return{name:d,styles:a,next:Xn}}var Ay=require("@emotion/react");function Ry(e,t){let r=(0,ej.default)(e,t);return process.env.NODE_ENV!=="production"?(...o)=>{let a=typeof e=="string"?`"${e}"`:"component";return o.length===0?console.error([`MUI: Seems like you called \`styled(${a})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
|
|
92
|
+
`})),Gq=(0,dn.styled)("a")({color:"black",textDecoration:"none"}),y3=(0,dn.styled)("div")(({theme:e})=>({borderTop:`5px solid ${e.palette.background.brand?.default}`,borderRadius:"0.25rem",minHeight:"16rem",display:"flex",flexDirection:"column",justifyContent:"space-between",boxShadow:"0px 0.75rem 1rem 0.25rem rgba(0, 0, 0, 0.12)",position:"relative",transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"})),zq=(0,dn.styled)("div")(({theme:e})=>({background:e.palette.mode==="light"?O2:Vl,transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"})),b3=(0,dn.styled)("div")(({theme:e})=>({display:"flex",justifyContent:"space-between",padding:"1rem","& span":{border:`1px solid ${e.palette.primary.dark}`,color:e.palette.text.primary,borderRadius:"0.8rem",padding:"0.05rem 0.75rem",fontSize:"1rem",transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"},"& h3":{color:e.palette.text.primary,transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"}})),v3=(0,dn.styled)("div")(({theme:e})=>({padding:"0 1rem",".summary":{color:e.palette.grey[700],transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"},p:{fontSize:"1rem"}})),jq=(0,dn.styled)("div")(({theme:e})=>({padding:"0 1rem",position:"absolute",bottom:"0rem",p:{fontSize:"1rem",color:e.palette.text.primary,fontWeight:600,transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"}})),w3=(0,dn.styled)("div")({textAlign:"center",position:"absolute",bottom:"0.1rem",right:"0.75rem",opacity:.2,img:{height:"8.5rem",width:"8.5rem"}});var Ae=require("react/jsx-runtime"),gTe=({path:e,children:t,isExternal:r})=>e?(0,Ae.jsx)(Gq,{href:e,target:r?"_blank":void 0,rel:r?"noopener noreferrer":void 0,children:t}):(0,Ae.jsx)(Ae.Fragment,{children:t}),TTe=({tutorial:e,path:t,courseCount:r,courseType:o})=>{let a=o==="learning-card";return(0,Ae.jsx)(Uq,{children:e.frontmatter.disabled==="yes"?(0,Ae.jsx)(zq,{children:(0,Ae.jsx)(y3,{style:{borderTop:`5px solid ${e.frontmatter.themeColor}`},children:(0,Ae.jsxs)("div",{children:[(0,Ae.jsxs)(b3,{children:[(0,Ae.jsx)("h3",{children:e.frontmatter.title?e.frontmatter.title:e.frontmatter.courseTitle}),(0,Ae.jsx)("div",{style:{whiteSpace:"nowrap"},children:(0,Ae.jsx)("span",{children:"Coming Soon"})})]}),(0,Ae.jsx)(v3,{children:(0,Ae.jsx)("p",{className:"summary",children:e.frontmatter.description})}),(0,Ae.jsx)(w3,{children:(0,Ae.jsx)("img",{src:e.frontmatter.cardImage,alt:e.frontmatter.title})})]})})}):(0,Ae.jsx)(gTe,{path:t,isExternal:a,children:a?(0,Ae.jsx)(qq,{children:(0,Ae.jsx)(y3,{style:{borderTop:`5px solid ${e.frontmatter.themeColor}`},children:(0,Ae.jsxs)("div",{children:[(0,Ae.jsxs)(b3,{children:[(0,Ae.jsx)("h3",{children:e.frontmatter.title?e.frontmatter.title:e.frontmatter.courseTitle}),a&&t&&(0,Ae.jsx)($2,{width:"24px",height:"24px"}),e.frontmatter.status?(0,Ae.jsx)("p",{children:(0,Ae.jsx)("span",{children:"New"})}):null]}),(0,Ae.jsx)(v3,{children:(0,Ae.jsx)("p",{className:"summary",children:e.frontmatter.description})}),(0,Ae.jsx)(w3,{children:(0,Ae.jsx)("img",{src:e.frontmatter.cardImage})})]})})}):(0,Ae.jsx)(Wq,{children:(0,Ae.jsx)(y3,{style:{borderTop:`5px solid ${e.frontmatter.themeColor}`},children:(0,Ae.jsxs)("div",{children:[(0,Ae.jsxs)(b3,{children:[(0,Ae.jsx)("h3",{children:e.frontmatter.title?e.frontmatter.title:e.frontmatter.courseTitle}),e.frontmatter.status?(0,Ae.jsx)("p",{children:(0,Ae.jsx)("span",{children:"New"})}):null]}),(0,Ae.jsx)(v3,{children:(0,Ae.jsx)("p",{className:"summary",children:e.frontmatter.description})}),!a&&(0,Ae.jsx)(jq,{className:"card-subdata",children:(0,Ae.jsxs)("p",{children:[r," ",o,r>1?"s":""]})}),(0,Ae.jsx)(w3,{children:(0,Ae.jsx)("img",{src:e.frontmatter.cardImage})})]})})})})})},DC=TTe;var xs=require("react");var FC=require("@mui/material");var Kq=(0,FC.styled)(Il)(()=>({minWidth:400,overflowWrap:"anywhere",textAlign:"center",padding:"5px"})),$q=(0,FC.styled)($)(()=>({display:"flex",justifyContent:"end",width:"100%",gap:"10px"}));var ea=require("react/jsx-runtime"),Gm={WARNING:"warning",DANGER:"error",SUCCESS:"success",INFO:"info"},Yq=(0,xs.forwardRef)(({variant:e},t)=>{let[r,o]=(0,xs.useState)({isOpen:!1,title:"",subtitle:"",primaryOption:"",showInfoIcon:"",variant:e,headerIcon:void 0,isChecked:!1,showCheckbox:!1}),a=(0,xs.useRef)({resolve:()=>{},reject:()=>{}}),n=(0,b.useTheme)(),i=E=>new Promise((R,k)=>{a.current={resolve:R,reject:k},o({...E,isOpen:!0,showInfoIcon:E.showInfoIcon||"",showCheckbox:!!E.showCheckbox})}),l=()=>{o(E=>({...E,isOpen:!1}))},s=()=>{o(E=>({...E,isChecked:!E.isChecked}))},u=()=>!!r.isChecked;(0,xs.useImperativeHandle)(t,()=>({show:i,getCheckboxState:u}));let{isOpen:f,primaryOption:d,title:p,subtitle:m,showInfoIcon:x,headerIcon:h,showCheckbox:g}=r,{resolve:T}=a.current;return(0,ea.jsxs)(Lr,{open:f,closeModal:l,title:p,id:"searchClick",headerIcon:h,reactNode:void 0,children:[m&&(0,ea.jsxs)(Mr,{children:[(0,ea.jsx)(Kq,{id:"alert-dialog-description",variant:"body1",component:"div",children:(0,ea.jsx)(z,{variant:"body1",component:"div",style:{color:n.palette.text.primary},children:m})}),g&&(0,ea.jsx)(Ml,{control:(0,ea.jsx)(Yr,{checked:u(),onChange:s,color:"primary"}),label:(0,ea.jsx)("span",{style:{fontSize:"1rem"},children:"Do not show again"})})]}),(0,ea.jsx)(io,{variant:"filled",helpText:x,children:(0,ea.jsxs)($q,{children:[(0,ea.jsx)(fn,{onClick:()=>{l(),T("CANCEL")},children:"Cancel"}),(0,ea.jsx)(un,{onClick:()=>{l(),T(d)},style:r.variant&&{backgroundColor:n.palette.background[r.variant]?.default,textTransform:"capitalize"},type:"submit",children:d})]})})]})});Yq.displayName="PromptComponent";var E3=Yq;var np=E3;var NC=require("@mui/material/OutlinedInput"),R3=require("@mui/material/styles"),Zq=G(require("lodash/debounce")),zm=G(require("react"));var jn=require("react/jsx-runtime"),STe=e=>(0,R3.createTheme)({typography:{fontFamily:e.typography.fontFamily},components:{MuiTextField:{styleOverrides:{root:{"--TextField-brandBorderColor":e.palette.border.strong,"--TextField-brandBorderHoverColor":e.palette.background.graphics?.default,"--TextField-brandBorderFocusedColor":e.palette.background.graphics?.default,"& label.Mui-focused":{color:"var(--TextField-brandBorderFocusedColor)"}}}},MuiOutlinedInput:{styleOverrides:{notchedOutline:{borderColor:"var(--TextField-brandBorderColor)"},root:{[`&:hover .${NC.outlinedInputClasses.notchedOutline}`]:{borderColor:"var(--TextField-brandBorderHoverColor)"},[`&.Mui-focused .${NC.outlinedInputClasses.notchedOutline}`]:{borderColor:"var(--TextField-brandBorderFocusedColor)"}}}},MuiInput:{styleOverrides:{root:{color:e.palette.text.default,"&::before":{borderBottom:"2px solid var(--TextField-brandBorderColor)"},"&:hover:not(.Mui-disabled, .Mui-error):before":{borderBottom:"2px solid var(--TextField-brandBorderHoverColor)"},"&.Mui-focused:after":{borderBottom:"2px solid var(--TextField-brandBorderFocusedColor)"}}}},MuiButton:{styleOverrides:{root:{lineHeight:"auto"}}}}});function CTe({onSearch:e,placeholder:t,onClear:r,expanded:o,setExpanded:a}){let[n,i]=zm.default.useState(""),l=zm.default.useRef(null),s=(0,b.useTheme)(),u=(0,zm.useCallback)((0,Zq.default)(m=>{e(m)},300),[e]),f=m=>{let x=m.target.value;i(x),u(x)},d=m=>{m.stopPropagation(),u(""),i(""),a(!1),r&&r()},p=m=>{m.stopPropagation(),o?(u(""),i(""),a(!1)):(a(!0),setTimeout(()=>{l.current&&l.current.focus()},300))};return(0,jn.jsx)(An,{onClickAway:m=>{m.stopPropagation();let x=m.target?.closest("#ref");n===""&&x&&d(m)},children:(0,jn.jsxs)("div",{style:{display:"flex"},children:[(0,jn.jsx)(R3.ThemeProvider,{theme:STe(s),children:(0,jn.jsx)(Qr,{variant:"standard",value:n,onChange:f,inputRef:l,placeholder:t,style:{width:o?"150px":"0",opacity:o?1:0,transition:"width 0.3s ease, opacity 0.3s ease"}})}),o?(0,jn.jsx)(zt,{title:"Close",onClick:d,icon:(0,jn.jsx)(Ft,{fill:s.palette.icon.default}),arrow:!0}):(0,jn.jsx)(zt,{title:"Search",onClick:p,icon:(0,jn.jsx)(Cd,{fill:s.palette.icon.default}),arrow:!0})]})})}var Kn=CTe;var _3=require("@mui/material");var Ki=require("react");var yTe="N/A",Qq=e=>e&&e.deleted_at&&e.deleted_at.Valid===!0?ds(e.deleted_at.Time):yTe;var zi=require("react/jsx-runtime"),Xq=(0,b.styled)("div")({display:"flex",gap:"1rem"}),hs=(0,b.styled)("div")({display:"flex",justifyContent:"space-between",width:"100%",alignItems:"center"}),O3=(0,b.styled)("div")({display:"flex",alignItems:"center",marginRight:"1rem"}),BC=(0,b.styled)("div")({boxSizing:"border-box",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}),HC=(0,b.styled)("div")({position:"absolute",top:0,right:0,bottom:0,left:0,boxSizing:"border-box",display:"block",width:"100%"}),Jq=(0,b.styled)("span")(()=>({"& svg":{cursor:"pointer",width:"2rem",height:"2rem"}})),Aft=(0,b.styled)("span")(()=>({"& svg":{width:"2rem",height:"2rem"}})),eG=(0,b.styled)("span")(({theme:e})=>({"& svg":{color:"#3C494F","&:hover":{color:e.palette.error.error}}})),jm=(0,b.styled)("span")(()=>({color:"#455a64",opacity:"0.5","& svg":{cursor:"not-allowed"}})),tG=(0,b.styled)("div")(()=>({display:"flex",justifyContent:"space-between",paddingRight:"26px"})),A3=(0,b.styled)("div")(()=>({color:"#455a64",display:"flex",cursor:"not-allowed","& svg":{cursor:"pointer"}})),rG=(0,b.styled)(Yr)({padding:0,marginRight:"0.5rem",height:"28px","& .MuiSvgIcon-root":{borderColor:"white"},color:"white","&:hover":{color:"white",cursor:"pointer"},"&.Mui-checked":{color:"white"}}),VC=(0,b.styled)(z)({fontSize:"1.25rem",fontWeight:800,"&:hover":{cursor:"default"}}),Pft=(0,b.styled)(z)({fontSize:"0.9rem",display:"flex",alignItems:"end",padding:"0 5px","&:hover":{cursor:"default"}}),_ft=(0,b.styled)("button")({background:"transparent",border:"none","&:hover":{cursor:"default"}}),UC=(0,b.styled)(z)({fontStyle:"italic",fontSize:"12px","&:hover":{cursor:"default"}}),WC=(0,b.styled)(z)({fontSize:"0.9rem",textAlign:"left",fontStyle:"italic"}),oG=(0,b.styled)(WC)({height:"fit-content",fontStyle:"normal","&:hover":{cursor:"default"}}),bTe=(0,b.styled)($)(({theme:e})=>({background:e.palette.background.brand?.default,padding:"10px 10px 1px 10px",borderRadius:"4px",height:"100%",display:"flex",width:"100%"})),Km=(0,b.styled)(bTe)({display:"flex",width:"100%",gap:"10px","@media (min-width : 600px)":{flexDirection:"column",gap:"0"}}),qC=(0,b.styled)(Me)(({theme:e})=>({width:"100%",borderRadius:"4px",background:e.palette.background.brand?.default,boxShadow:"0px 4px 4px 0px rgba(0, 0, 0, 0.25)",display:"flex",flexDirection:"column",marginBottom:"10px",color:e.palette.text.default,"&:hover":{background:e.palette.text.default},padding:"15px 10px"})),GC=(0,b.styled)("p")(({theme:e,textColor:t})=>({margin:"0",fontSize:"14px",fontWeight:"400",display:"flex",color:t||e.palette.text.constant?.white})),zC=(0,b.styled)("p")(({theme:e,textColor:t})=>({margin:"0",fontSize:"60px",fontWeight:"500",lineHeight:1,marginBottom:"5px",color:t||e.palette.text.constant?.white})),Ift=(0,b.styled)(Me)(({theme:e})=>({width:"100%",borderRadius:"4px",background:e.palette.text.default,boxShadow:"0px 4px 4px 0px rgba(0, 0, 0, 0.25)",display:"flex",flexDirection:"column",marginBottom:"10px",color:`${ie[40]}30 !important`,"&:hover":{background:e.palette.text.default},padding:"15px 10px"})),kft=(0,b.styled)("div")(({disabled:e=!1})=>({cursor:e?"not-allowed":"pointer",opacity:e?"0.5":"1",display:"flex","& svg":{cursor:e?"not-allowed":"pointer"}})),aG=(0,b.styled)(ce)(({theme:e})=>({borderBottom:`1px solid ${e.palette.divider}`,display:"flex",flexDirection:"row",padding:"5px 0"})),P3=({onClick:e,bulk:t,disabled:r,style:o,key:a,title:n="Delete"})=>{let i=(0,b.useTheme)();return(0,zi.jsx)(xe,{title:n,arrow:!0,children:(0,zi.jsx)("div",{children:(0,zi.jsx)(tt,{sx:{"&:hover":{"& svg":{fill:r?i.palette.icon.disabled:i.palette.background.error?.hover}},...o},disableRipple:!0,disabled:r,onClick:e,children:(0,zi.jsx)(co,{fill:r?i.palette.icon.disabled:i.palette.icon.default,width:t?"28":"24",height:t?"28":"24",style:o})})})},a)},$n=({onClick:e,disabled:t,bulk:r,style:o,title:a="Edit"})=>{let n=(0,b.useTheme)();return(0,zi.jsx)(xe,{title:a,arrow:!0,children:(0,zi.jsx)("div",{children:(0,zi.jsx)(tt,{onClick:e,sx:{"&:hover":{"& svg":{fill:t?n.palette.icon.disabled:n.palette.background.brand?.default}},...o},disableRipple:!0,disabled:t,children:(0,zi.jsx)(Ja,{fill:t?n.palette.icon.disabled:n.palette.icon.default,width:r?"28":"24",height:r?"28":"24",style:o})})})})},nG=(0,b.styled)(ce)({display:"flex",flexDirection:"row"}),Mft=(0,b.styled)(ce)({display:"flex",alignItems:"center",marginTop:1}),$m=(0,b.styled)(ce)({width:"100%"}),iG=(0,b.styled)(Rr)(({theme:e})=>({width:"100%",display:"flex",flexDirection:"column",backgroundColor:e.palette.background.paper,padding:e.spacing(2.5),cursor:"pointer"})),lG=(0,b.styled)(iG)(({theme:e})=>({minHeight:e.spacing(50),background:"linear-gradient(180deg, #007366 0%, #000 100%)"})),sG=(0,b.styled)(iG)(({theme:e})=>({minHeight:e.spacing(50),backgroundColor:e.palette.background.paper,boxShadow:"none"})),uG=(0,b.styled)(ce)({display:"flex",flexDirection:"row",justifyContent:"space-between"}),fG=(0,b.styled)(ce)({display:"flex",alignItems:"flex-start"}),dG=(0,b.styled)(ce)({display:"flex",alignItems:"center",justifyContent:"flex-end"}),pG=(0,b.styled)(z)(({theme:e})=>({fontSize:"1.25rem",fontWeight:600,padding:"0.5rem 0",color:e.palette.background.constant?.white})),mG=(0,b.styled)(ce)({display:"flex",flexDirection:"column",maxHeight:"14.5rem",overflowY:"scroll",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"},"-ms-overflow-style":"none"}),cG=(0,b.styled)(ce)(({theme:e})=>({display:"flex",flexDirection:"row",position:"absolute",bottom:"20px",width:"100%",color:`${e.palette.background.constant?.white}99`,justifyContent:"space-between",paddingRight:"40px"})),jC=(0,b.styled)(ce)({textAlign:"left"});var ji=require("react/jsx-runtime"),vTe=({userId:e,userName:t,userEmail:r,profileUrl:o})=>{let a=(0,b.useTheme)(),n=()=>{window.open(`${xa}/user/${e}`)};return(0,ji.jsxs)(ce,{container:!0,alignItems:"center",children:[(0,ji.jsx)(ce,{children:(0,ji.jsx)($,{sx:{color:a.palette.text.default,mr:2,cursor:"pointer"},children:(0,ji.jsx)(qt,{onClick:n,alt:t,src:o,children:o?"":(0,ji.jsx)(Ln,{})})})}),(0,ji.jsxs)(ce,{size:"grow",children:[t,(0,ji.jsx)(z,{variant:"body2",color:a.palette.text.disabled,children:r})]})]})},ku=vTe;var Fe=require("react/jsx-runtime"),wTe=({tableMeta:e,handleRemoveFromTeam:t,isRemoveFromTeamAllowed:r,theme:o})=>(0,Fe.jsx)("div",{children:r?(0,Fe.jsx)(A3,{children:(0,Fe.jsx)(zt,{id:`delete_user-${e.rowIndex}`,onClick:t(e.rowData),title:"Remove user membership from team",iconType:"delete",children:(0,Fe.jsx)(zl,{fill:o?.palette.icon.default})})}):(0,Fe.jsx)(jm,{children:(0,Fe.jsx)(zl,{fill:o?.palette.icon.disabled,secondaryFill:Xr})})}),ETe=({teamID:e,useGetUsersForOrgQuery:t,org_id:r,useRemoveUserFromTeamMutation:o,useNotificationHandlers:a,isRemoveFromTeamAllowed:n,theme:i})=>{let[l,s]=(0,Ki.useState)(0),[u,f]=(0,Ki.useState)(10),[d,p]=(0,Ki.useState)("last_login_time desc"),[m,x]=(0,Ki.useState)(""),h=[],{handleError:g,handleSuccess:T,handleInfo:E}=a(),R=(0,Ki.useRef)(null),{width:k}=Xo(),{data:D}=t({page:l,pagesize:u,search:m,order:d,teamId:e,orgId:r}),[C]=o(),v=D?.data||[],P=D?.total_count||0,B=V=>async()=>{let y=V[0];await R.current?.show({title:"Remove User From Team ?",subtitle:J(V[3],V[2]),primaryOption:"Proceed",variant:Gm.DANGER})==="Proceed"&&C({orgId:r,teamId:e,userId:y}).unwrap().then(()=>{T(`${V[4]?V[4]:""} ${V[5]?V[5]:""} removed from team`)}).catch(oe=>{let O=oe.response?.data?.message||"Failed to remove user from team";oe.response.status===404?E(O):g(O)})},_=(V,y,ee)=>{let oe=ee.findIndex(O=>O.name===y);return V[oe]},J=(V,y)=>(0,Fe.jsxs)(Fe.Fragment,{children:[(0,Fe.jsx)("p",{children:"Are you sure you want to remove this user? (This action is irreversible)"}),(0,Fe.jsxs)("p",{children:["User:"," ",(0,Fe.jsx)("i",{children:(0,Fe.jsx)("b",{children:V})})]}),(0,Fe.jsxs)("p",{children:["Email:"," ",(0,Fe.jsx)("i",{children:(0,Fe.jsx)("b",{children:y})})]})]}),X,H={search:!1,viewColumns:!1,filter:!1,rowsPerPageOptions:[10,20,25],responsive:"standard",selectableRows:"none",count:P,rowsPerPage:u,page:l,print:!1,download:!1,elevation:0,serverSide:!0,sortOrder:{name:d.split(" ")[0],direction:d.split(" ")[1]},onTableChange:(V,y)=>{let ee=y.announceText?y.announceText.split(" : "):[],oe="";switch(y.activeColumn&&(oe=`${N[y.activeColumn].name} desc`),V){case"changePage":s(y.page);break;case"changeRowsPerPage":f(y.rowsPerPage);break;case"search":X&&clearTimeout(X),X=setTimeout(()=>{m!==y.searchText&&x(y.searchText)},500);break;case"sort":ee.length==2&&(ee[1]==="ascending"?oe=`${N[y.activeColumn].name} asc`:oe=`${N[y.activeColumn].name} desc`),oe!==d&&p(oe);break}}},q=[["user_id","na"],["avatar_url","xs"],["email","na"],["username","na"],["first_name","na"],["last_name","na"],["role_names","xs"],["status","na"],["joined_at","l"],["last_login_time","l"],["deleted_at","na"]],N=[{name:"user_id",label:"User ID",options:{filter:!1,sort:!1,searchable:!1}},{name:"avatar_url",label:"Team Member",options:{filter:!1,sort:!1,searchable:!1,customBodyRender:(V,y)=>(0,Fe.jsx)($,{sx:{"& > img":{mr:2,flexShrink:0}},children:(0,Fe.jsx)(ku,{userId:_(y.rowData,"user_id",N),userName:`${y.rowData[4]} ${y.rowData[5]}`,userEmail:y.rowData[2],profileUrl:V})})}},{name:"email",label:"Email",options:{filter:!1,sort:!0,searchable:!0}},{name:"username",label:"Username",options:{filter:!1,sort:!0,searchable:!0,customBodyRender:(V,y)=>(0,Fe.jsxs)("div",{style:{display:"flex"},children:[V,V?.includes("@")?(0,Fe.jsx)(Xt,{title:`Search "${y.rowData[3]} ${y.rowData[4]}" on Google`,children:(0,Fe.jsx)("a",{href:`https://www.google.com/search?q=${y.rowData[3]}+${y.rowData[4]}`,style:{color:"inherit"},target:"_blank",rel:"noreferrer",children:(0,Fe.jsx)("div",{children:(0,Fe.jsx)(Y2,{width:20,height:20})})})}):(0,Fe.jsx)(Xt,{title:`Lookup "${V}" on GitHub`,children:(0,Fe.jsx)("a",{href:`https://www.github.com/${V}`,style:{color:"inherit"},target:"_blank",rel:"noreferrer",children:(0,Fe.jsx)("div",{children:(0,Fe.jsx)(eu,{width:22,height:22})})})})]})}},{name:"first_name",label:"First",options:{filter:!1,sort:!0,searchable:!0}},{name:"last_name",label:"Last",options:{filter:!1,sort:!0,searchable:!0}},{name:"role_names",label:"Roles",options:{filter:!0,sort:!1,searchable:!1,filterOptions:{names:h.concat(h?.map(V=>`!${V}`))},customBodyRender:V=>(0,Fe.jsx)("div",{children:V?.join(", ")})}},{name:"status",label:"Status",options:{filter:!0,sort:!0,searchable:!1}},{name:"joined_at",label:"Joined At",options:{filter:!1,sort:!0,searchable:!1,sortDescFirst:!0}},{name:"last_login_time",label:"Last Active At",options:{filter:!1,sort:!0,searchable:!1,sortDescFirst:!0}},{name:"deleted_at",label:"Deleted At",options:{filter:!0,sort:!0,searchable:!1,sortDescFirst:!0,filterOptions:{names:["Deleted","Not Deleted"],logic:(V,y)=>V!="NA"&&y.indexOf("Deleted")>=0?!0:V=="NA"&&y.indexOf("Not Deleted")>=0,fullWidth:!0},customBodyRender:(V,y)=>{let ee=v[y.rowIndex];return Qq(ee)}}},{name:"actions",label:"Actions",options:{filter:!1,sort:!1,searchable:!1,customBodyRender:(V,y)=>_(y.rowData,"deleted_at",N).Valid!==!1?(0,Fe.jsxs)(jm,{children:[(0,Fe.jsx)(Ja,{style:{marginRight:".5rem"},fill:Xr,height:"30",width:"30"}),(0,Fe.jsx)(zl,{fill:Xr,secondaryFill:Xr,height:30,width:30})]}):(0,Fe.jsx)(wTe,{tableMeta:y,handleRemoveFromTeam:B,isRemoveFromTeamAllowed:n,theme:i})}}],[L,M]=(0,Ki.useState)(N),[F]=(0,Ki.useState)(()=>{let V=Jo(q,k),y={};return N.forEach(ee=>{y[ee.name]=V[ee.name]}),y});return(0,Fe.jsxs)(F2,{initialMode:i?.palette.mode,children:[(0,Fe.jsx)("div",{style:{margin:"auto",width:"100%"},children:(0,Fe.jsx)(Vo,{columns:N,data:v,options:H,colViews:q,tableCols:L,updateCols:M,columnVisibility:F})}),(0,Fe.jsx)(np,{ref:R})]})},Ym=ETe;var ip=require("react/jsx-runtime"),RTe=(0,b.styled)(_3.Grid2)(({theme:e})=>({display:"grid",margin:"auto",paddingLeft:"0.5rem",borderRadius:"0.25rem",width:"inherit",gap:e.spacing(1)})),OTe=({teams:e,tableOptions:t,columnVisibility:r,colViews:o,tableCols:a,columns:n,updateCols:i,isRemoveFromTeamAllowed:l,org_id:s,useGetUsersForOrgQuery:u,useNotificationHandlers:f,useRemoveUserFromTeamMutation:d})=>{let p=(0,b.useTheme)();return(0,ip.jsx)(no,{children:(0,ip.jsx)(Vo,{columns:n,data:e,options:{...t,renderExpandableRow:(m,x)=>{let h=e[x.dataIndex].id;return(0,ip.jsx)(_3.TableCell,{colSpan:6,sx:{paddingInline:"4rem",backgroundColor:`${p.palette.background.secondary} !important`},children:(0,ip.jsx)(RTe,{container:!0,size:12,children:(0,ip.jsx)(Ym,{teamID:h,isRemoveFromTeamAllowed:l,org_id:s,useGetUsersForOrgQuery:u,useNotificationHandlers:f,useRemoveUserFromTeamMutation:d,theme:p})})})}},colViews:o,tableCols:a,updateCols:i,columnVisibility:r})})},Zm=OTe;var KC=require("react");var I3=require("react/jsx-runtime");function ATe({value:e,maxLength:t,...r}){return e.length>t?(0,I3.jsx)(Xt,{title:e,arrow:!0,placement:"top",children:(0,I3.jsx)("div",{style:{maxWidth:"15rem",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},...r,children:`${e.slice(0,t)}...`})}):(0,I3.jsx)("div",{style:{maxWidth:"15rem",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},...r,children:e})}var Aa=ATe;var ut=require("react/jsx-runtime");function PTe({selected:e,teams:t,deleteTeamsModalHandler:r}){let o={team_ids:[],team_names:[]};return e?.data.forEach(a=>{let n=a.index;o.team_ids.push(t[n]?.team_id),o.team_names.push(t[n]?.team_name)}),(0,ut.jsx)(Jq,{children:(0,ut.jsx)(eG,{children:(0,ut.jsx)(xe,{title:"Delete Teams",children:(0,ut.jsx)(co,{height:28,width:28,fill:Xr,onClick:()=>{r(o)}})},"delete_teams")})})}function lp({teams:e,count:t,page:r,pageSize:o,setPage:a,setPageSize:n,sortOrder:i,setSortOrder:l,bulkSelect:s,setBulkSelect:u,handleTeamView:f,handleDeleteTeam:d,handleRemoveTeamFromWorkspace:p,handleleaveTeam:m,teamId:x,workspace:h=!1,isEditTeamAllowed:g,isLeaveTeamAllowed:T,isRemoveTeamFromWorkspaceAllowed:E,isDeleteTeamAllowed:R,setSearch:k}){let{width:D}=Xo(),C=(0,b.useTheme)(),v=[["id","na"],["name","xs"],["description","m"],["owner","l"],["created_at","na"],["updated_at","xl"],["deleted_at","na"],["actions","xs"]],P=[{name:"id",label:"ID",options:{filter:!1,sort:!1,searchable:!1,customBodyRender:N=>(0,ut.jsx)(Bm,{id:N})}},{name:"name",label:"Name",options:{filter:!1,sort:!0,searchable:!0}},{name:"description",label:"Description",options:{filter:!1,sort:!0,searchable:!1,customBodyRender:N=>(0,ut.jsx)(Aa,{value:N??"",maxLength:30})}},{name:"owner",label:"Owner",options:{filter:!1,sort:!0,searchable:!0}},{name:"created_at",label:"Created At",options:{filter:!1,sort:!0,searchable:!1,sortDescFirst:!0}},{name:"updated_at",label:"Updated At",options:{filter:!1,sort:!0,searchable:!1,sortDescFirst:!0}},{name:"deleted_at",label:"Deleted At",options:{filter:!0,sort:!0,searchable:!1,sortDescFirst:!0,customBodyRender:N=>JSON.stringify(N),filterOptions:{names:["Deleted","Not Deleted"],logic:(N,L)=>N!="NA"&&L.indexOf("Deleted")>=0?!0:N=="NA"&&L.indexOf("Not Deleted")>=0,fullWidth:!0}}},{name:"actions",label:"Actions",options:{filter:!1,sort:!1,searchable:!1,customBodyRender:(N,L)=>s||L.rowData[4].Valid?(0,ut.jsxs)(jm,{children:[(0,ut.jsx)(Ja,{style:{marginRight:".5rem"}}),(0,ut.jsx)(co,{height:28,width:28,fill:Xr})]}):(0,ut.jsxs)(A3,{children:[!h&&(0,ut.jsxs)(ut.Fragment,{children:[(0,ut.jsx)(Ho,{disabled:!g,children:(0,ut.jsx)(zt,{id:`edit_team-${L.rowIndex}`,title:"Edit Team",onClick:M=>{g&&f(M,L.rowData)},iconType:"edit",children:(0,ut.jsx)(Ja,{style:{height:28.8,width:28.8},fill:Xr})})}),(0,ut.jsx)(Ho,{disabled:!T,children:(0,ut.jsx)(zt,{id:`leave_team-${L.rowIndex}`,title:"Leave Team",onClick:M=>T&&m(M,L.rowData),iconType:"delete",children:(0,ut.jsx)(zl,{fill:Xr,secondaryFill:Xr})})})]}),h?(0,ut.jsx)(Ho,{disabled:!E,children:(0,ut.jsx)(zt,{id:`remove_team-${L.rowIndex}`,title:"Move Team",onClick:()=>{E&&p&&p(L.rowData[0])},iconType:"delete",children:(0,ut.jsx)(co,{height:28,width:28,fill:C.palette.icon.default})})}):(0,ut.jsx)(Ho,{disabled:!R,children:(0,ut.jsx)(zt,{id:`delete_team-${L.rowIndex}`,title:"Delete Team",onClick:M=>{R&&d(M,L.rowData)},iconType:"delete",children:(0,ut.jsx)(co,{height:28,width:28,fill:Xr})})})]})}}],B=e?.findIndex(N=>N.id===x),_={filter:!1,selectableRows:"none",filterType:"dropdown",expandableRows:!0,expandableRowsHeader:!1,expandableRowsOnClick:!0,responsive:"standard",count:t,rowsPerPage:o,page:r,print:!1,download:!1,elevation:0,serverSide:!0,viewColumns:!1,search:!1,rowsExpanded:[B],customToolbarSelect:N=>(0,ut.jsx)(tG,{children:(0,ut.jsx)(PTe,{selected:N,teams:e,deleteTeamsModalHandler:()=>{}})}),textLabels:{selectedRows:{text:"teams(s) selected"}},onTableChange:(N,L)=>{let M=L.announceText?L.announceText.split(" : "):[],F="";switch(L.activeColumn&&(F=`${P[L.activeColumn].name} desc`),N){case"changePage":a(L.page);break;case"changeRowsPerPage":n(L.rowsPerPage);break;case"search":k(L.searchText!==null?L.searchText:"");break;case"sort":M.length==2&&(M[1]==="ascending"?F=`${P[L.activeColumn].name} asc`:F=`${P[L.activeColumn].name} desc`),F!==i&&l(F);break;case"rowSelectionChange":L.selectedRows.data.length?s||u(!0):u(!1);break;default:L.selectedRows.data.length==0&&s&&u(!1)}},isRowSelectable:N=>e[N].deleted_at.Valid!==!0,setRowProps:(N,L,M)=>(M&&M.selectedRows?M.selectedRows.data:[]).includes(L)?{style:{backgroundColor:C.palette.background.hover}}:N[6].Valid?{style:{backgroundColor:C.palette.icon.disabled}}:{style:{backgroundColor:C.palette.background.constant?.table}}},[J,X]=(0,KC.useState)(P),[H,q]=(0,KC.useState)(()=>{let N=Jo(v,D),L={};return P.forEach(M=>{L[M.name]=N[M.name]}),L});return{columns:P,tableOptions:_,tableCols:J,updateCols:X,columnVisibility:H,setColumnVisibility:q,colViews:v}}var Pa=G(require("react"));var wt=require("react/jsx-runtime"),_Te=({width:e=U,height:t=W,primaryFill:r="#00B39F",secondaryFill:o="#00D3A9",...a})=>(0,wt.jsxs)("svg",{width:e,height:t,viewBox:"0 0 135 135",...a,xmlns:"http://www.w3.org/2000/svg",children:[(0,wt.jsx)("path",{d:"M69.5 31.82V64.07L97.45 47.89L69.5 31.82Z",fill:o}),(0,wt.jsx)("path",{d:"M69.5 70.81V103.22L97.7 87.09L69.5 70.81Z",fill:o}),(0,wt.jsx)("path",{d:"M65.47 63.85V32.09L37.87 47.92L65.47 63.85Z",fill:r}),(0,wt.jsx)("path",{d:"M10.1 103.1C15.5182 111.811 22.842 119.179 31.52 124.65V90.71L10.1 103.1Z",fill:r}),(0,wt.jsx)("path",{d:"M65.47 103.06V71.05L37.8 87.07L65.47 103.06Z",fill:r}),(0,wt.jsx)("path",{d:"M35.54 122.63L63.56 106.61L35.54 90.41V122.63Z",fill:o}),(0,wt.jsx)("path",{d:"M99.62 122.8V90.63L71.64 106.63L99.62 122.8Z",fill:r}),(0,wt.jsx)("path",{d:"M127.03 99.37C131.817 90.4433 134.524 80.5502 134.95 70.43L105.78 87.11L127.03 99.37Z",fill:r}),(0,wt.jsx)("path",{d:"M103.64 83.69L131.76 67.61L103.64 51.45V83.69Z",fill:o}),(0,wt.jsx)("path",{d:"M99.62 44.5V12.52L71.77 28.49L99.62 44.5Z",fill:r}),(0,wt.jsx)("path",{d:"M99.62 83.55V51.28L71.7 67.44L99.62 83.55Z",fill:r}),(0,wt.jsx)("path",{d:"M35.54 51.22V83.73L63.66 67.45L35.54 51.22Z",fill:o}),(0,wt.jsx)("path",{d:"M65.47 0C55.1388 0.298791 45.016 2.97835 35.89 7.83L65.52 24.83L65.47 0Z",fill:r}),(0,wt.jsx)("path",{d:"M35.54 12.3V44.62L63.69 28.48L35.54 12.3Z",fill:o}),(0,wt.jsx)("path",{d:"M31.52 10.34C22.8442 15.8136 15.521 23.1813 10.1 31.89L31.52 44.25V10.34Z",fill:r}),(0,wt.jsx)("path",{d:"M99.43 8C90.2123 3.0393 79.9635 0.299881 69.5 0V25.15L99.43 8Z",fill:o}),(0,wt.jsx)("path",{d:"M0 69.87C0.348236 80.2825 3.1145 90.4711 8.08 99.63L29.77 87.07L0 69.87Z",fill:o}),(0,wt.jsx)("path",{d:"M8.07001 35.37C3.13121 44.4917 0.372439 54.6334 0.0100098 65L29.8 47.91L8.07001 35.37Z",fill:o}),(0,wt.jsx)("path",{d:"M35.78 127.13C44.9355 132.013 55.0981 134.706 65.47 135V110.15L35.78 127.13Z",fill:r}),(0,wt.jsx)("path",{d:"M124.89 32C119.512 23.3126 112.237 15.9553 103.61 10.48V44.3L124.89 32Z",fill:o}),(0,wt.jsx)("path",{d:"M103.64 124.54C112.314 119.022 119.624 111.61 125.02 102.86L103.64 90.52V124.54Z",fill:o}),(0,wt.jsx)("path",{d:"M134.96 64.81C134.572 54.5437 131.835 44.5032 126.96 35.46L105.5 47.88L134.96 64.81Z",fill:r}),(0,wt.jsx)("path",{d:"M69.5 135C79.845 134.709 89.9825 132.029 99.12 127.17L69.5 110V135Z",fill:o}),(0,wt.jsx)("path",{d:"M31.52 83.44V51.56L3.83002 67.43L31.52 83.44Z",fill:r})]}),$C=_Te;var xG=G(require("@mui/material/Tooltip")),hG=G(require("react")),YC=require("react/jsx-runtime"),ITe=hG.default.forwardRef((e,t)=>(0,YC.jsx)(xG.default,{...e,ref:t,children:(0,YC.jsx)("span",{children:e.children})})),ZC=ITe;var Yn=require("@mui/material");var gG=(0,Yn.styled)(Dt)(({theme:e})=>({padding:"5px 6px !important",color:e.palette.text.default,fontSize:"0.875rem",textTransform:"uppercase",fontWeight:400,height:"unset",borderRadius:"100px",border:`0.5px solid ${e.palette.border?.normal}`,background:e.palette.background.default,maxWidth:"14.375rem"})),TG=(0,Yn.styled)(Pn)(({theme:e})=>({width:300,height:280,overflow:"auto",backgroundColor:e.palette.background.secondary,borderRadius:"10px",boxShadow:"0px 1px 4px 0px rgba(0, 0, 0, 0.25) inset","@media (max-width: 843px)":{width:260},"@media (max-width: 768px)":{width:300},"@media (max-width: 375px)":{width:"100%"}})),QC=(0,Yn.styled)(z)(({theme:e})=>({paddingBottom:"15px",color:e.palette.text?.default,textAlign:"center",fontSize:"1rem",letterSpacing:"0.15px"})),Qm=(0,Yn.styled)(Me)(({theme:e})=>({margin:"5px 0",padding:"7px 0",borderRadius:"10px",borderColor:e.palette.border?.strong,boxShadow:"none",display:"flex",flexDirection:"row",fill:e.palette.icon.default,"&:hover":{borderColor:e.palette.border?.brand,backgroundColor:`${Ze} !important`,fill:e.palette.icon.inverse}})),XC=(0,Yn.styled)(Yn.Grid2)({padding:"0 1rem","@media (max-width: 768px)":{padding:"0",display:"flex",alignItems:"center",flexDirection:"column",width:"100%"}}),SG=(0,Yn.styled)(Yn.Grid2)({padding:"2.5rem 1rem 0 1rem","@media (max-width: 768px)":{padding:"1rem",transform:"rotate(90deg)",height:"6.25rem",marginLeft:"6.25rem"}});var Ue=require("react/jsx-runtime"),CG={CHIP:"chip",OTHER:"other"};function kTe(e){return e?{meshery:(0,Ue.jsx)($C,{}),kubernetes:(0,Ue.jsx)(dd,{}),github:(0,Ue.jsx)(eu,{})}[e]||null:(0,Ue.jsx)(dd,{})}function k3(e,t){return e.filter(r=>t.indexOf(r)===-1)}function yG(e,t){return e.filter(r=>t.indexOf(r)!==-1)}function MTe({name:e,assignableData:t,assignedData:r,assignablePage:o,assignedPage:a,originalAssignedData:n,emptyStateIconLeft:i,emtyStateMessageLeft:l,emptyStateIconRight:s,emtyStateMessageRight:u,originalLeftCount:f,originalRightCount:d,leftPermission:p=!0,rightPermission:m=!0,transferComponentType:x=CG.OTHER}){let[h,g]=Pa.default.useState([]),[T,E]=Pa.default.useState([]),[R,k]=Pa.default.useState(n),[D,C]=Pa.default.useState(0),[v,P]=Pa.default.useState(0);Pa.default.useEffect(()=>{k(n)},[n]),Pa.default.useEffect(()=>{E(t)},[t]),Pa.default.useEffect(()=>{C(f),P(d)},[f,d]);let B=yG(h,T),_=yG(h,R);Pa.default.useEffect(()=>{r(R)},[R]),Pa.default.useEffect(()=>{let M=y=>{y[0].isIntersecting&&o()},F=new IntersectionObserver(M,{threshold:1}),V=document.getElementById("leftList");return V&&F.observe(V),()=>{V&&F.unobserve(V)}},[t]),Pa.default.useEffect(()=>{let M=y=>{y[0].isIntersecting&&a()},F=new IntersectionObserver(M,{threshold:1}),V=document.getElementById("rightList");return V&&F.observe(V),()=>{V&&F.unobserve(V)}},[n]);let J=M=>()=>{let F=h.indexOf(M),V=[...h];F===-1?V.push(M):V.splice(F,1),g(V)},X=M=>{M.stopPropagation(),k(R.concat(T)),E([]),C(0),P(F=>F+D)},H=M=>{M.stopPropagation(),k(R.concat(B)),E(k3(T,B)),g(k3(h,B)),C(F=>F-B.length),P(F=>F+B.length)},q=M=>{M.stopPropagation(),E(T.concat(_)),k(k3(R,_)),g(k3(h,_)),P(F=>F-_.length),C(F=>F+_.length)},N=M=>{M.stopPropagation(),E(T.concat(R)),k([]),P(0),C(F=>F+v)},L=(M,F,V,y)=>(0,Ue.jsxs)(TG,{children:[(0,Ue.jsx)(Zr,{dense:!0,component:"div",role:"list",children:M.length>0?M.map(ee=>{let oe=`transfer-list-item-${ee.name}-label`;return(0,Ue.jsxs)(Or,{role:"listitem",sx:{display:"flex",justifyContent:"space-between","&:hover":{backgroundColor:"#00000010"}},onClick:J(ee),children:[x===CG.CHIP?(0,Ue.jsx)(ZC,{title:ee.name,placement:"top",children:(0,Ue.jsx)(gG,{sx:{paddingY:"10px"},variant:"outlined",label:ee.name,onDelete:()=>{},deleteIcon:(0,Ue.jsx)(l5,{}),icon:kTe(ee?.kind)||(0,Ue.jsx)(dd,{})})}):(0,Ue.jsx)(ZC,{title:ee.name,placement:"top",children:(0,Ue.jsx)(z,{sx:{maxWidth:"230px",height:"1.5rem",overflow:"hidden"},children:ee.name})}),(0,Ue.jsx)(Yr,{checked:h.indexOf(ee)!==-1,tabIndex:-1,disableRipple:!0,inputProps:{"aria-labelledby":oe}})]},ee.id)}):(0,Ue.jsxs)("div",{style:{textAlign:"center",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",height:"264px"},children:[F,(0,Ue.jsx)(z,{sx:{color:"#979797",px:5,py:2,lineHeight:1},children:V})]})}),(0,Ue.jsx)("div",{id:y})]});return(0,Ue.jsxs)(ce,{container:!0,justifyContent:"center",alignItems:"center",children:[(0,Ue.jsxs)(XC,{children:[(0,Ue.jsxs)(QC,{children:["Available ",e," (",T.length,")"]}),L(T,i,l,"leftList")]}),(0,Ue.jsx)(SG,{children:(0,Ue.jsxs)(ce,{container:!0,direction:"column",alignItems:"center",children:[(0,Ue.jsxs)(Qm,{variant:"outlined",size:"small",onClick:X,disabled:!m||m&&(T?.length===0||T.length<D),"aria-label":"move all right",children:[(0,Ue.jsx)(Sd,{width:18,height:18}),(0,Ue.jsx)(Sd,{style:{position:"absolute",left:"27px"},width:18,height:18})]}),(0,Ue.jsx)(Qm,{variant:"outlined",size:"small",onClick:H,disabled:!m||m&&B.length===0,"aria-label":"move selected right",children:(0,Ue.jsx)(Sd,{width:18,height:18})}),(0,Ue.jsx)(Qm,{variant:"outlined",size:"small",onClick:q,disabled:!p||p&&_.length===0,"aria-label":"move selected left",children:(0,Ue.jsx)(md,{width:18,height:18})}),(0,Ue.jsxs)(Qm,{variant:"outlined",size:"small",onClick:N,disabled:!p||p&&(R?.length===0||R.length<v),"aria-label":"move all left",children:[(0,Ue.jsx)(md,{width:18,height:18}),(0,Ue.jsx)(md,{style:{position:"absolute",left:"27px"},width:18,height:18})]})]})}),(0,Ue.jsxs)(XC,{children:[(0,Ue.jsxs)(QC,{children:["Assigned ",e," (",R.length,")"]}),L(R,s,u,"rightList")]})]})}var sp=MTe;var up=require("@mui/material"),JC=G(require("react"));var nr=require("react/jsx-runtime"),LTe=(0,up.styled)("div")(({theme:e})=>({background:e.palette.mode==="light"?Si.header:Ti.header,padding:"0.75rem 1rem",margin:"-1rem -1rem 1rem -1rem",display:"flex",justifyContent:"space-between",alignItems:"center",color:e.palette.text.constant?.white}));function DTe({filters:e,selectedFilters:t,setSelectedFilters:r,variant:o="outlined",handleApplyFilter:a,showAllOption:n=!0,id:i}){let[l,s]=JC.default.useState(null),[u,f]=JC.default.useState(!1),d=(0,b.useTheme)(),p=(0,up.useMediaQuery)(d.breakpoints.down("sm")),m=E=>{s(E.currentTarget),f(R=>!R)},x=()=>{s(null),f(!1)},h=(E,R)=>{let k=E.target.value;r(D=>({...D,[R]:k}))},g=()=>{x(),a()},T=()=>(0,nr.jsxs)("div",{children:[(0,nr.jsx)(LTe,{children:(0,nr.jsx)("h3",{children:"Filters: "})}),Object.keys(e).map(E=>{let R=e[E].options;return(0,nr.jsxs)("div",{role:"presentation",children:[(0,nr.jsx)(Ll,{id:e[E].name,children:e[E].name}),(0,nr.jsxs)(ca,{defaultValue:"All",value:t[E],variant:o,onChange:k=>h(k,E),style:{width:"20rem",marginBottom:"1rem"},inputProps:{"aria-label":"Without label"},displayEmpty:!0,children:[n&&(0,nr.jsx)(At,{value:"All",children:"All"}),R.map(k=>(0,nr.jsx)(At,{value:k.value,children:k.label},k.value))]},E)]},E)}),(0,nr.jsx)("div",{style:{display:"flex",justifyContent:"center"},children:(0,nr.jsx)(Me,{variant:"contained",onClick:g,children:"Apply"})})]});return(0,nr.jsx)(nr.Fragment,{children:(0,nr.jsxs)("div",{id:i,children:[(0,nr.jsx)(zt,{title:"Filter",onClick:m,icon:(0,nr.jsx)(W2,{fill:d.palette.icon.default}),arrow:!0}),p?(0,nr.jsx)(up.Drawer,{anchor:"bottom",open:u,onClose:x,PaperProps:{style:{padding:"0 1rem 1rem 1rem",backgroundColor:d.palette.background.surfaces}},children:T()}):(0,nr.jsx)(Yd,{id:u&&l?"transition-popper":void 0,open:u,anchorEl:l,placement:"bottom-end",children:(0,nr.jsx)(An,{onClickAway:x,mouseEvent:"onMouseDown",touchEvent:"onTouchStart",children:(0,nr.jsx)(Pn,{sx:{padding:"1rem",paddingTop:"1.8rem",boxShadow:"0px 4px 8px rgba(0, 0, 0, 0.1)",backgroundColor:d.palette.background.surfaces},children:T()})})})]})})}var bG=DTe;var vG=require("react");var ta=require("react/jsx-runtime"),pn={PUBLIC:"public",PRIVATE:"private",PUBLISHED:"published"},FTe=(0,b.styled)(Dl)(({theme:e})=>({"& .MuiPaper-root":{backgroundColor:e.palette.mode==="light"?i1:e.palette.background.constant?.table,color:e.palette.text.secondary,border:`1px solid ${e.palette.border.default}`,borderRadius:"0.25rem",padding:"0rem"},"& .MuiMenuItem-root":{fontSize:".9rem",padding:"0.5rem","&:hover":{backgroundColor:e.palette.mode==="light"?Ks:"rgba(0, 179, 159, 0.25)"}},"& .Mui-selected":{backgroundColor:e.palette.mode==="light"?Ks:"rgba(0, 179, 159, 0.25)"},"& .MuiList-padding":{padding:"0px"}})),NTe=(0,b.styled)(Me)(()=>({padding:"0px"})),BTe=(0,b.styled)("div")(({theme:e,enabled:t})=>({paddingLeft:"0.3rem",height:"1.5rem",width:"auto",paddingRight:t?"0":"0.3rem",borderRadius:"0.25rem",border:`1px solid ${Qf}`,background:e?.palette.mode==="light"?i1:e?.palette.background.constant?.table,textTransform:"uppercase",color:e?.palette.text.default,display:"flex",justifyContent:"center",alignItems:"center",fontSize:"0.75rem",fontFamily:e?.typography.fontFamily})),HTe=(0,b.styled)(At)(({theme:e})=>({textTransform:"capitalize",color:e.palette.icon.default})),VTe=(0,b.styled)("div")({marginRight:"0.5rem"}),UTe=({value:e,onChange:t,options:r,enabled:o})=>{let[a,n]=(0,vG.useState)(null),i=!!a,l=f=>{f.stopPropagation(),n(null)},s=f=>{f.stopPropagation(),o&&n(f.currentTarget)},u=(f,d)=>{f.stopPropagation(),t&&t(d),l(f)};return(0,ta.jsxs)(ta.Fragment,{children:[(0,ta.jsx)(NTe,{disabled:!o,onClick:s,"data-testid":`design-visibility-${e.toLowerCase()}`,children:(0,ta.jsxs)(BTe,{enabled:o,children:[(0,ta.jsx)("span",{style:{fontSize:"0.85rem"},children:e}),o&&(0,ta.jsx)(hF,{style:{...$o}})]})}),(0,ta.jsx)(FTe,{open:i,onClose:l,anchorEl:a,anchorReference:"anchorPosition",anchorPosition:{top:(a?.getBoundingClientRect().bottom??0)+5,left:(a?.getBoundingClientRect().left??0)+5},children:r?.map(([f,d],p)=>(0,ta.jsxs)(HTe,{"data-testid":`visibility-toggle-${f.toLowerCase()}`,onClick:m=>u(m,f),children:[(0,ta.jsx)(VTe,{children:(0,ta.jsx)(d,{width:16,height:16})}),f]},p))})]})},$i=UTe;var MG=require("@mui/material");var Uo=require("@mui/material"),wG=(0,Uo.styled)("div")(()=>({width:"85px",height:"88px",overflow:"hidden",position:"absolute",top:"-3px",left:"-3px"})),EG=(0,Uo.styled)("div")(({catalogClassName:e})=>({font:"bold 10px sans-serif",WebkitTransform:"rotate(-45deg)",textAlign:"center",transform:"rotate(-45deg)",position:"relative",padding:"4px 0",top:"15px",left:"-30px",width:"120px",display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",backgroundColor:{community:"rgba(122,132,142,.8)",official:"#EBC017",verified:"#00B39F"}[e],color:"#fff"})),RG=(0,Uo.styled)("div")(({outerStyles:e})=>({position:"relative",borderRadius:"1rem",textAlign:"center",transformStyle:"preserve-3d",transition:"all .9s ease-out",marginBottom:"1.25rem",display:"inline-flex",perspective:"1000px","&:hover":{cursor:"pointer",transform:"translateY(-2%)"},"@media (max-width:1200px)":{height:"18.75rem"},...e})),OG=(0,Uo.styled)("div")(({theme:e})=>({position:"relative",width:"100%",height:"100%",textAlign:"center",transition:"transform 0.6s",background:e.palette.background.default,boxShadow:`2px 2px 3px 0px ${e.palette.background.brand?.default}`,borderRadius:"0.9375rem"})),AG=(0,Uo.styled)("span")(({theme:e})=>({position:"absolute",top:"0",right:"0",minWidth:"3rem",padding:"0 0.75rem",fontSize:"0.875rem",textTransform:"capitalize",background:e.palette.background.brand?.default,color:e.palette.text.inverse,borderRadius:"0 1rem 0 2rem"})),fp=(0,Uo.styled)("p")(({theme:e})=>({fontSize:"1rem",textTransform:"capitalize",margin:"0rem",lineHeight:"1.5",textAlign:"center",color:e.palette.text.secondary,fontWeight:"600"})),PG=(0,Uo.styled)(Uo.Typography)(({theme:e})=>({fontWeight:"bold",textTransform:"capitalize",color:e.palette.text.default,fontSize:"1.125rem",marginTop:"2rem",padding:"0rem 1rem",position:"relative",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",textAlign:"center",width:"100%"})),_G=(0,Uo.styled)("div")(({theme:e})=>({display:"flex",justifyContent:"space-around",fontSize:"0.2rem",color:e.palette.text.secondary,padding:"0.9rem 0.1rem",background:e.palette.background.secondary,position:"absolute",bottom:"0px",marginTop:"1.2rem",borderRadius:"0 0 0.9375rem 0.9375rem",width:"100%"})),dp=(0,Uo.styled)("div")(()=>({display:"flex",alignItems:"center",gap:"4px",fontSize:"0.2rem",color:"rgba(26, 26, 26, .8)",margin:"0rem",padding:"0.1rem"})),IG=(0,Uo.styled)("div")(()=>({height:"max-content",display:"flex",marginTop:"-1rem",flexDirection:"column",padding:"0rem 1rem",justifyContent:"start",alignItems:"start","@media (max-width:1200px)":{height:"max-content"}})),kG=(0,Uo.styled)("div")(({theme:e})=>({background:e.palette.mode==="light"?"rgba(231, 239, 243, 0.40)":"#212121",display:"flex",alignItems:"center",justifyContent:"center",padding:"0.5rem",width:"100%",borderRadius:"0.5rem"}));var $e=require("react/jsx-runtime"),Cpt=(0,MG.styled)("a")(()=>({textDecoration:"none"}));var WTe=({catalogClassName:e})=>e?(0,$e.jsx)(wG,{children:(0,$e.jsx)(EG,{catalogClassName:e,children:e})}):(0,$e.jsx)($e.Fragment,{}),qTe=({pattern:e,patternType:t,cardHeight:r,cardWidth:o,cardStyles:a,onCardClick:n})=>{let i={height:r,width:o,...a};return(0,$e.jsx)(RG,{outerStyles:i,onClick:n,children:(0,$e.jsxs)(OG,{className:"innerCard",children:[(0,$e.jsx)(WTe,{catalogClassName:e?.catalog_data?.content_class}),(0,$e.jsx)(AG,{children:t}),(0,$e.jsxs)(IG,{children:[(0,$e.jsx)(PG,{style:{margin:"3rem 0 1.59rem 0",textAlign:"center"},children:e.name}),(0,$e.jsx)(kG,{children:(0,$e.jsx)(Xa,{height:"118",width:"120"})})]}),(0,$e.jsxs)(_G,{children:[(0,$e.jsxs)(dp,{children:[(0,$e.jsx)(Sa,{width:18,height:18}),(0,$e.jsx)(fp,{children:e.download_count})]}),(0,$e.jsxs)(dp,{children:[(0,$e.jsx)(td,{width:18,height:18,fill:"#51636B"}),(0,$e.jsx)(fp,{children:e.clone_count})]}),(0,$e.jsxs)(dp,{children:[(0,$e.jsx)(hd,{width:18,height:18,fill:"#51636B"}),(0,$e.jsx)(fp,{children:e.view_count})]}),(0,$e.jsxs)(dp,{children:[(0,$e.jsx)(ud,{width:18,height:18}),(0,$e.jsx)(fp,{children:e.deployment_count})]}),(0,$e.jsxs)(dp,{children:[(0,$e.jsx)(Dn,{width:18,height:18,fill:"#51636B"}),(0,$e.jsx)(fp,{children:e.share_count})]})]})]})})},ey=qTe;var qG=require("@mui/material/styles"),tc=require("react");var ec=require("react");var M3=require("react");var FG=require("lodash"),Mu=require("react");var ty=require("@mui/material");var LG=(0,ty.styled)(zs)(({style:e,theme:t})=>({fontFamily:t.typography.fontFamily,width:"100%","@media (max-width: 590px)":{marginLeft:"0.25rem",paddingLeft:"0.25rem"},display:"flex",backgroundColor:t.palette.mode==="light"?t.palette.common.white:t.palette.background.surfaces,...e})),DG=(0,ty.styled)(Vf)(({theme:e})=>({borderLeft:`1px solid ${e.palette.background.tertiary}`,height:"30px",paddingLeft:"10px"}));var Xm=require("react/jsx-runtime");function GTe({onChange:e,value:t="",label:r,sx:o,placeholder:a,endAdornment:n,debounceTime:i=300}){let l=(0,b.useTheme)(),[s,u]=(0,Mu.useState)(t);(0,Mu.useEffect)(()=>{t!==s&&u(t)},[t]);let f=m=>({target:{value:m},persist:()=>{}}),d=(0,Mu.useMemo)(()=>(0,FG.debounce)(m=>{e?.(f(m))},i),[e,i]);return(0,Mu.useEffect)(()=>{if(e)return s===""?e(f(s)):d(s),()=>{d.cancel()}},[s,e,d]),(0,Xm.jsx)(LG,{type:"search",label:r,fullWidth:!0,value:s,onChange:m=>{let x=m.target.value;u(x)},sx:o,placeholder:a??"Search",startAdornment:(0,Xm.jsx)(Vf,{position:"start",children:(0,Xm.jsx)(Cd,{fill:l.palette.background.neutral?.default})}),endAdornment:(0,Xm.jsx)(DG,{position:"end",children:n})})}var Jm=GTe;var Zn=require("@mui/material/styles");var NG=(0,Zn.styled)($)(({styleProps:e})=>({padding:"1rem",borderRadius:"1rem",width:"100%",gap:"0.5rem",boxShadow:"0px 2px 10px rgba(0, 0, 0, 0.2)",display:"flex",flexDirection:"column",height:"fit-content",backgroundColor:e.backgroundColor,"@media (max-width:900px)":{display:"none"},fontFamily:e.fontFamily,"&::-webkit-scrollbar":{width:"6px"}})),BG=(0,Zn.styled)("div")(()=>({display:"none","@media (max-width:899px)":{display:"block"}})),Fpt=(0,Zn.styled)("div")(()=>({display:"flex",justifyContent:"space-around",alignItems:"center"})),HG=(0,Zn.styled)(Me)(({theme:e})=>({backgroundColor:e.palette.primary.brand?.default,"&:hover":{backgroundColor:e.palette.background.default},height:"3.75rem","@media (max-width:450px)":{minWidth:"0px"}})),VG=(0,Zn.styled)($)(({theme:e})=>({display:"flex",justifyContent:"space-between",alignItems:"center",padding:"0.5rem 1rem",background:e.palette.mode==="light"?Si.header:Ti.header,height:"10vh"})),Npt=(0,Zn.styled)(ci)(({theme:e})=>({padding:"0.25rem 2rem",borderBottom:"1px solid",borderBottomColor:e.palette.text.disabled})),UG=(0,Zn.styled)(ci)(({theme:e})=>({backgroundColor:e.palette.background.surfaces,borderRadius:"0.5rem",marginTop:2,display:"flex",justifyContent:"space-between"})),WG=(0,Zn.styled)("p")(({theme:e})=>({color:e.palette.text.tertiary})),Bpt=(0,Zn.styled)("span")(()=>({marginLeft:"0.5rem",display:"block","@media (max-width: 853px)":{display:"none"}}));var ir=require("react/jsx-runtime"),zTe=({filterKey:e,sectionDisplayName:t,options:r=[],filters:o,openSections:a,onCheckboxChange:n,onSectionToggle:i,styleProps:l,customComponent:s})=>{let[u,f]=(0,M3.useState)(""),d=(0,M3.useCallback)(x=>{f(x.target.value)},[]),p=r.length>10,m=u&&r.length?r.filter(x=>x.label.toLowerCase().includes(u.toLowerCase())):r;return(0,ir.jsxs)(ir.Fragment,{children:[(0,ir.jsxs)(UG,{onClick:()=>i(e),style:{backgroundColor:l.sectionTitleBackgroundColor},children:[(0,ir.jsx)(z,{sx:{fontSize:"1rem"},fontWeight:"bold",fontFamily:l.fontFamily,children:(t||e).toUpperCase()}),a[e]?(0,ir.jsx)($l,{}):(0,ir.jsx)(Ko,{})]}),(0,ir.jsx)(da,{in:a[e],timeout:"auto",unmountOnExit:!0,children:s?(0,ir.jsx)(s,{}):(0,ir.jsxs)(Zr,{component:"div",sx:{overflowY:"auto",maxHeight:"25rem",backgroundColor:l.backgroundColor,"&::-webkit-scrollbar":{width:"6px"}},children:[p&&(0,ir.jsx)($,{sx:{px:"0.5rem",mb:"0.5rem"},children:(0,ir.jsx)(Jm,{value:u,onChange:d,placeholder:"Search",endAdornment:(0,ir.jsxs)(WG,{children:["Total : ",m.length??0]})})}),m.map((x,h)=>(0,ir.jsxs)(Gf,{direction:"row",alignItems:"center",px:"0.5rem",justifyContent:"space-between",children:[(0,ir.jsxs)(Gf,{direction:"row",alignItems:"center",gap:"0.35rem",children:[(0,ir.jsx)(Yr,{id:`checkbox-${x.label}`,checked:Array.isArray(o[e])?o[e].includes(x.value):o[e]===x.value,onChange:g=>n&&n(e,x.value,g.target.checked),value:x.value}),x.Icon&&(0,ir.jsx)(x.Icon,{width:"20px",height:"20px"}),(0,ir.jsx)(z,{fontFamily:l.fontFamily,children:x.label})]}),(0,ir.jsxs)(Gf,{direction:"row",alignItems:"center",gap:"0.35rem",children:[x.totalCount!==void 0&&`(${x.totalCount||0})`,x.description&&(0,ir.jsx)(Ui,{variant:"standard",helpText:x.description})]})]},`${x.value}-${h}`))]})})]})},ry=zTe;var pp=require("react/jsx-runtime"),jTe=({lists:e,onApplyFilters:t,value:r,styleProps:o})=>{let[a,n]=(0,ec.useState)(()=>{let s={};return e.forEach(u=>{s[u.filterKey]=!!u.defaultOpen}),s}),i=(0,ec.useCallback)(s=>{n(u=>({...u,[s]:!u[s]}))},[]),l=(0,ec.useCallback)((s,u,f)=>{t(d=>{let p={...d};if(e.find(x=>x.filterKey===s)?.isMultiSelect!==!1){let x=p[s];Array.isArray(x)||(x=x?[x]:[]),p[s]=f?[...x,u]:x.filter(h=>h!==u)}else p[s]=f?u:"";return p})},[e,t]);return(0,pp.jsx)(pp.Fragment,{children:e.map(s=>s.customComponent?(0,pp.jsx)(ry,{filterKey:s.filterKey,filters:r,sectionDisplayName:s.sectionDisplayName,onSectionToggle:i,styleProps:o,openSections:a,customComponent:s.customComponent},s.filterKey):(0,pp.jsx)(ry,{filterKey:s.filterKey,sectionDisplayName:s.sectionDisplayName,options:s.options,filters:r,openSections:a,onCheckboxChange:l,onSectionToggle:i,styleProps:o},s.filterKey))})},oy=jTe;var mr=require("react/jsx-runtime"),KTe=({lists:e,setData:t,value:r={},styleProps:o})=>{let a=(0,qG.useTheme)(),[n,i]=(0,tc.useState)(!1),l=(0,tc.useCallback)(()=>{i(!0)},[]),s=(0,tc.useCallback)(()=>{i(!1)},[]),f={...{backgroundColor:a.palette.mode==="light"?a.palette.background.default:a.palette.background.secondary,sectionTitleBackgroundColor:a.palette.mode==="light"?a.palette.background.surfaces:Hl.main,fontFamily:a.typography.fontFamily},...o};return(0,mr.jsxs)(mr.Fragment,{children:[(0,mr.jsx)(NG,{styleProps:f,children:(0,mr.jsx)(oy,{lists:e,onApplyFilters:t,value:r,styleProps:f})}),(0,mr.jsxs)(BG,{children:[(0,mr.jsx)(xe,{title:"Filters",placement:"bottom",children:(0,mr.jsx)(HG,{variant:"contained",onClick:l,children:(0,mr.jsx)(RF,{style:{height:"28px",width:"28px"},fill:a.palette.text.default})})}),(0,mr.jsx)(m2,{anchor:"bottom",open:n,variant:"temporary",onClose:s,style:{zIndex:"1399"},children:(0,mr.jsxs)($,{sx:{overflowY:"hidden",height:"90vh"},children:[(0,mr.jsxs)(VG,{children:[(0,mr.jsx)(z,{variant:"h6",sx:{color:a.palette.text.constant?.white},component:"div",children:"Filters"}),(0,mr.jsx)(Ou,{onClick:s,children:(0,mr.jsx)(Ft,{height:"32px",width:"32px"})})]}),(0,mr.jsx)($,{style:{height:"75vh",overflowY:"auto",background:a.palette.background.surfaces,padding:"0 16px"},children:(0,mr.jsx)(oy,{lists:e,onApplyFilters:t,value:r,styleProps:f})}),(0,mr.jsx)($,{sx:{background:a.palette.mode==="light"?Si.fotter:Ti.fotter,height:"5vh"}})]})})]})]})},ay=KTe;var Lu=require("react/jsx-runtime");function $Te({open:e,content:t,title:r,actions:o,onClose:a}){return(0,Lu.jsxs)(pa,{open:e,onClose:a,children:[(0,Lu.jsx)(Im,{children:r}),(0,Lu.jsx)(_l,{children:(0,Lu.jsx)(Il,{children:t})}),(0,Lu.jsx)(Hf,{children:o})]})}var ny=$Te;var mp=require("@mui/material"),ra=G(require("react"));var jt=require("react/jsx-runtime"),GG=require("react"),YTe=({data:e,label:t,fetchSuggestions:r,setFilterData:o,isLoading:a,type:n,disabled:i,selectedData:l,searchValue:s,setSearchValue:u,iconComponent:f=(0,jt.jsx)(N1,{..._d})})=>{let[d,p]=(0,ra.useState)(""),[m,x]=(0,ra.useState)(!1),[h,g]=(0,ra.useState)(!1),[T,E]=(0,ra.useState)(l);(0,ra.useEffect)(()=>{E(l)},[l]);let R=(0,ra.useCallback)(C=>{let v=T.filter(P=>P.id!==C);E(v),o(v)},[T,o]),k=(0,ra.useCallback)((C,v)=>{if(!v)return;if(T.some(_=>_.id===v.id)){p(`${n} already selected`);return}let B=[...T,v];E(B),o(B),p(""),u(""),x(!1)},[T,o,n,u]),D=(0,ra.useCallback)((C,v)=>{u(v),v===""?x(!1):(r(v),p(""),x(!0))},[r,u]);return(0,jt.jsxs)($,{sx:{width:"100%"},children:[(0,jt.jsx)(mp.Autocomplete,{id:`${n}-search-field`,style:{width:"100%"},options:e,getOptionLabel:()=>s,isOptionEqualToValue:(C,v)=>C.id===v.id,noOptionsText:a?"Loading...":`No ${n} found`,loading:a,open:m,onClose:()=>x(!1),disabled:i,value:void 0,inputValue:s,onChange:k,onInputChange:D,filterOptions:C=>C,disableClearable:!0,includeInputInList:!0,filterSelectedOptions:!0,disableListWrap:!0,clearOnBlur:!0,popupIcon:null,blurOnSelect:!0,forcePopupIcon:!1,renderInput:C=>(0,jt.jsx)(Qr,{...C,label:t||`Add ${n}`,error:!!d,helperText:d,fullWidth:!0,InputLabelProps:{style:{fontFamily:"inherit"}},InputProps:{...C.InputProps,endAdornment:(0,jt.jsx)(ra.default.Fragment,{children:a?(0,jt.jsx)(Gt,{color:"inherit",size:20}):null})}}),renderOption:(C,v)=>(0,GG.createElement)("li",{...C,key:v.id},(0,jt.jsx)($,{component:"li",sx:{"& > img":{mr:2,flexShrink:0}},children:(0,jt.jsxs)(mp.Grid2,{container:!0,alignItems:"center",children:[(0,jt.jsx)(mp.Grid2,{children:(0,jt.jsx)($,{sx:{color:"text.secondary",mr:2},children:f})}),(0,jt.jsx)(mp.Grid2,{size:"grow",children:(0,jt.jsx)(z,{variant:"body2",children:v.name})})]})}))}),(0,jt.jsxs)($,{sx:{display:"flex",flexWrap:"wrap",gap:.5,mt:T?.length>0?"0.5rem":""},children:[!h&&T?.length>0&&(0,jt.jsx)(Dt,{avatar:f,label:T[T.length-1]?.name,size:"small",onDelete:()=>R(T[T.length-1]?.id),deleteIcon:(0,jt.jsx)(Xt,{title:`Remove ${n}`,children:(0,jt.jsx)(Ft,{style:To})})},T[T.length-1]?.id),h&&T?.map(C=>(0,jt.jsx)(Dt,{avatar:(0,jt.jsx)(N1,{...To}),label:C.name,size:"small",onDelete:()=>R(C.id),deleteIcon:(0,jt.jsx)(Xt,{title:`Remove ${n}`,children:(0,jt.jsx)(Ft,{style:To})})},C.id)),T?.length>1&&(0,jt.jsx)(z,{onClick:()=>g(!h),sx:{cursor:"pointer"},children:h?"(hide)":`(+${T?.length-1})`})]})]})},iy=YTe;var rc=require("@mui/material"),zG=(0,rc.styled)("div")(({theme:e})=>({padding:"2.5rem",margin:"2rem 0",backgroundColor:e.palette.grey.A400,display:"flex",border:`1px solid ${e.palette.common.black}`,justifyContent:"space-between",transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)","&:hover":{transition:"background 150ms ease-out 0s, border 150ms ease-out 0s, transform 150ms ease-out 0s",transform:"translate3d(0px, -1px, 0px)",boxShadow:`${e.palette.common.black} 0px 8px 16px 0px`},"@media screen and (max-width: 992px)":{padding:"1.5rem"},"@media screen and (max-width: 500px)":{padding:"0.75rem"}})),jG=(0,rc.styled)("div")({display:"inline-flex"}),KG=(0,rc.styled)("div")(({theme:e})=>({fontSize:"2rem",margin:"0 2rem 0 1rem",color:e.palette.grey[800],alignSelf:"center",transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"})),$G=(0,rc.styled)("div")(({theme:e})=>({h2:{margin:"0.25rem 0"},p:{margin:"0.35rem 0",color:e.palette.grey[800],transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"}}));var gs=require("react/jsx-runtime"),ZTe=({chapterNum:e,chapter:t})=>(0,gs.jsx)(zG,{id:t.frontmatter.courseTitle?t.frontmatter.courseTitle:void 0,children:(0,gs.jsxs)(jG,{children:[(0,gs.jsx)(KG,{children:e}),(0,gs.jsxs)($G,{children:[(0,gs.jsx)("h2",{children:t.frontmatter.chapterTitle?t.frontmatter.chapterTitle:t.frontmatter.courseTitle}),(0,gs.jsx)("p",{children:t.frontmatter.description})]})]})}),ly=ZTe;var L3=require("@mui/material"),D3=G(require("react"));var Du=require("@mui/material/styles");var A1t=(0,Du.styled)("div")(({theme:e})=>({marginLeft:".5rem",color:e.palette.background.secondary})),YG=(0,Du.styled)(Wf)({overflowY:"auto",scrollbarWidth:"none","&::-webkit-scrollbar":{width:"0em"}}),ZG=(0,Du.styled)(Or)(()=>({pointerEvents:"auto",margin:"0.5rem 0rem 0.5rem 0rem",fontSize:"0.1rem",padding:"0"})),QG=(0,Du.styled)(Or)(()=>({pointerEvents:"auto",margin:"0rem 0rem 0rem 0.5rem",fontSize:"0.1rem"})),XG=(0,Du.styled)("div")({marginRight:"0.75rem",marginLeft:"0.5rem"}),JG=(0,Du.styled)("div")({marginRight:"0.5rem"});var Kr=require("react/jsx-runtime"),QTe=({navigationItems:e,MenuListProps:t={},ListItemTextProps:r={}})=>{let o=(0,L3.useTheme)(),a=(0,L3.useMediaQuery)(o.breakpoints.up("sm")),[n,i]=(0,D3.useState)(null),l=(s,u)=>{u.stopPropagation(),i(f=>f===s?null:s)};return(0,Kr.jsx)(YG,{...t,dense:!0,children:e.map(s=>{let u=n===s.id,f=s.permission??!0,d=s.addDivider??!1;return!(s.showOnWeb??!0)&&a?null:(0,Kr.jsxs)(D3.default.Fragment,{children:[(0,Kr.jsxs)(At,{disabled:!f,onClick:s.onClick,"data-testid":`nav-item-${s.id}`,children:[(0,Kr.jsxs)(ZG,{children:[s.icon&&(0,Kr.jsx)(XG,{children:s.icon}),(0,Kr.jsx)(Qt,{primary:s.title,...r})]}),s.subItems&&(0,Kr.jsx)(Qt,{"data-testid":`nav-toggle-${s.id}`,children:u?(0,Kr.jsx)($l,{onClick:m=>l(s.id,m)}):(0,Kr.jsx)(Ko,{onClick:m=>l(s.id,m)})})]}),s.subItems&&(0,Kr.jsx)(da,{in:u,timeout:"auto",unmountOnExit:!0,variant:"submenu",children:s.subItems.map(m=>(0,Kr.jsx)(At,{disabled:!m.permission,onClick:m.onClick,"data-testid":`nav-subitem-${m.id}`,children:(0,Kr.jsxs)(QG,{children:[m.icon&&(0,Kr.jsx)(JG,{children:m.icon}),(0,Kr.jsx)(Qt,{primary:m.title,...r})]})},m.id))}),d&&(0,Kr.jsx)(ma,{})]},s.id)})})},sy=QTe;var F3=require("@mui/material");var cp=require("react/jsx-runtime"),XTe=(0,F3.styled)("div")(({type:e,theme:t})=>({fontWeight:500,background:"#212529",color:"inherit",marginTop:"2rem",width:"100%",height:"100%",marginBottom:"2rem",padding:"0.5rem 1rem",borderRadius:0,borderStyle:"solid",borderColor:e==="warning"?t.palette.text.warning:t.palette.background.brand?.default,borderWidth:"0 0 0 4px"})),JTe=(0,F3.styled)("h4")(({type:e,theme:t})=>({color:e==="warning"?t.palette.text.warning:t.palette.background.brand?.default,fontSize:"1.35rem"})),e8e=(0,F3.styled)("p")(({theme:e})=>({color:e.palette.text.inverse})),t8e=({type:e="note",title:t,content:r})=>(0,cp.jsxs)(XTe,{type:e,children:[(0,cp.jsx)(JTe,{type:e,children:t}),(0,cp.jsx)(e8e,{children:(0,cp.jsx)(r3,{content:r})})]}),uy=t8e;var sz=require("re-resizable"),uz=G(require("react-draggable"));var Ts=require("react/jsx-runtime"),r8e=({height:e=24,width:t=24,fill:r="#E8EFF3",...o})=>(0,Ts.jsxs)("svg",{width:t,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...o,children:[(0,Ts.jsx)("g",{clipPath:"url(#clip0_34897_172744)",children:(0,Ts.jsx)("path",{d:"M6 10C4.9 10 4 10.9 4 12C4 13.1 4.9 14 6 14C7.1 14 8 13.1 8 12C8 10.9 7.1 10 6 10ZM18 10C16.9 10 16 10.9 16 12C16 13.1 16.9 14 18 14C19.1 14 20 13.1 20 12C20 10.9 19.1 10 18 10ZM12 10C10.9 10 10 10.9 10 12C10 13.1 10.9 14 12 14C13.1 14 14 13.1 14 12C14 10.9 13.1 10 12 10Z",fill:r})}),(0,Ts.jsx)("defs",{children:(0,Ts.jsx)("clipPath",{id:"clip0_34897_172744",children:(0,Ts.jsx)("rect",{width:"24",height:"24",fill:"white"})})})]}),fy=r8e;var Z1t=(0,b.styled)(Or)(({theme:e})=>({padding:e.spacing(.5,.5),marginBlock:e.spacing(1),"& .MuiListItemText-primary":{fontSize:"1rem",textTransform:"capitalize",fontWeight:700},cursor:"pointer","&:hover":{backgroundColor:e.palette.action.hover},"& .MuiSvgIcon-root":{opacity:0,transition:"opacity 0.2s"},"&:hover .MuiSvgIcon-root":{opacity:1}})),Q1t=(0,b.styled)(Or,{shouldForwardProp:e=>e!=="isVisible"})(({theme:e,isVisible:t})=>({padding:e.spacing(.05,.5),fontStyle:t?"normal":"italic",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap","& .MuiSvgIcon-root":{height:20,width:20},"& .MuiListItemIcon-root":{minWidth:0,opacity:t?.8:.3},"& .MuiTypography-root":{fontSize:"0.9rem",opacity:t?1:.5}})),ez=(0,b.styled)("div")(({theme:e})=>({display:"flex",alignItems:"center",padding:e.spacing(4,2),alignContent:"stretch",justifyContent:"space-between",cursor:"move",background:e.palette.mode==="light"?"linear-gradient(90deg, #3B687B 0%, #507D90 100%)":"linear-gradient(90deg, #28353A 0%, #3D4F57 100%)",height:"3rem",flexShrink:0})),tz=(0,b.styled)($)(({theme:e})=>({padding:e.spacing(2),backgroundColor:e.palette.background.surfaces,overflow:"auto",flex:1,minHeight:0})),rz=(0,b.styled)("div")({height:"100%",display:"flex",flexDirection:"column",minHeight:"3rem"}),oz=(0,b.styled)($)(({theme:e,intitialPosition:t})=>({borderRadius:"8px",overflow:"hidden",flexShrink:0,zIndex:100,position:"absolute",backgroundColor:e.palette.background.blur?.light,boxShadow:`0 4px 16px ${e.palette.background.blur?.light}`,maxHeight:"80%",display:"flex",boxSizing:"border-box",...t})),az=(0,b.styled)(fy)(({theme:e})=>({fill:e.palette.common.white,position:"absolute",top:"-0.3rem",left:"50%"})),nz=(0,b.styled)("div")({display:"flex",gap:"1rem",justifyContent:"flex-end",alignItems:"center"}),iz=(0,b.styled)("div")({display:"flex",justifyContent:"end",alignItems:"center",flex:"1"}),N3=(0,b.styled)(tt)(({theme:e})=>({color:e.palette.common.white})),lz=(0,b.styled)("div")(()=>({position:"absolute",left:"0",right:"0",marginInline:"auto",width:"fit-content"}));var Vt=require("react/jsx-runtime"),o8e=({isOpen:e,id:t="panel",children:r,areAllExpanded:o,toggleExpandAll:a,handleClose:n,defaultSize:i,intitialPosition:l,sx:s,minimizePanel:u,title:f=""})=>{let d=(0,b.useTheme)();return e?(0,Vt.jsx)(uz.default,{handle:".drag-handle",children:(0,Vt.jsx)(oz,{intitialPosition:l,sx:s,children:(0,Vt.jsx)(sz.Resizable,{defaultSize:{width:i?.width||"18rem",height:i?.height||"auto"},onResize:()=>{window.dispatchEvent(new Event("panel-resize"))},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},children:(0,Vt.jsx)(rz,{children:(0,Vt.jsxs)(no,{children:[(0,Vt.jsx)("div",{className:"drag-handle",children:(0,Vt.jsxs)(ez,{children:[(0,Vt.jsx)($,{display:"flex",justifyContent:"flex-end",padding:"8px",children:a&&(0,Vt.jsx)(Xt,{title:o?"Collapse All":"Expand All",children:(0,Vt.jsx)(N3,{onClick:a,children:o?(0,Vt.jsx)(B2,{}):(0,Vt.jsx)(U2,{})})})}),(0,Vt.jsx)(az,{}),(0,Vt.jsxs)(iz,{children:[(0,Vt.jsx)(nz,{id:`${t}-panel-header-actions-container`}),(0,Vt.jsx)(lz,{children:f}),u&&(0,Vt.jsx)(N3,{onClick:u,children:(0,Vt.jsx)(nd,{fill:d.palette.common.white})}),(0,Vt.jsx)(N3,{onClick:n,children:(0,Vt.jsx)(Ft,{fill:d.palette.common.white})})]})]})}),(0,Vt.jsx)(tz,{className:"panel-body",children:r})]})})})})}):null},dy=({...e})=>(0,Vt.jsx)(o8e,{...e});var ac=require("react");var dmt=(0,b.styled)($)(()=>({padding:"1rem",borderRadius:"1rem",backgroundColor:"white",width:"100%",alignSelf:"center",height:"20rem",marginBottom:"1rem",boxShadow:"0px 2px 10px rgba(0, 0, 0, 0.2)",display:"block","@media (max-width:900px)":{height:"18rem",marginInline:"0",padding:"0.5rem"}})),pmt=(0,b.styled)("div")(()=>({width:"100%",justifyContent:"center",display:"flex",alignItems:"center",marginTop:"20px"})),mmt=(0,b.styled)($)(()=>({display:"flex",justifyContent:"space-evenly",gap:"2.5rem",width:"100%"})),cmt=(0,b.styled)($)(()=>({display:"flex",flexWrap:"wrap",justifyContent:"space-evenly",gap:"2.5rem",width:"100%"})),xmt=(0,b.styled)("div")(({theme:e})=>({backgroundColor:e.palette.common.white,textAlign:"center",borderRadius:"1rem",width:"100%",padding:"1.5rem",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"})),py=(0,b.styled)($)(({theme:e})=>({background:e.palette.mode==="light"?e.palette.background.default:e.palette.background.secondary,paddingTop:e.spacing(2),borderRadius:"1rem",display:"flex",alignItems:"center",flexDirection:"column"})),fz=(0,b.styled)($)(({theme:e})=>({paddingInline:e.spacing(2),display:"flex",alignItems:"center",placeSelf:"flex-start",justifyContent:"space-between",width:"100%"})),dz=(0,b.styled)(z)(({theme:e})=>({fontSize:"1.5rem",fontWeight:600,color:e.palette.text.default})),pz=(0,b.styled)(Rr)(({theme:e})=>({width:"200px",margin:"0.5rem",height:"100%",borderRadius:"1rem",position:"relative",overflow:"hidden",transition:"all 0.3s ease-in-out",background:i3(e.palette.mode==="light"),border:"1px solid transparent",boxShadow:"2px 2px 3px 2px rgb(0, 211, 169, 0.5)","&:hover":{transform:"translateY(-4px)",boxShadow:`2px 2px 3px 2px ${e.palette.text.brand}`,cursor:"pointer"}})),mz=(0,b.styled)("div")(()=>({display:"flex",gap:"10px",flexWrap:"nowrap",justifyContent:"center",width:"100%"})),cz=(0,b.styled)($)(()=>({width:"2rem",height:"2rem",padding:"0.25rem",borderRadius:"8px",backgroundColor:"#D6FFF7",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.3s ease","& svg":{transition:"transform 0.3s ease"},"&:hover svg":{transform:"scale(1.2)"},"& .clone-icon":{width:"20px",height:"20px"}})),xz=(0,b.styled)($a)(()=>({height:"100%",display:"flex",flexDirection:"column",padding:"12px",paddingBottom:"0px !important"})),hz=(0,b.styled)($)({display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:"0.5rem",gap:"0.6rem"}),gz=(0,b.styled)(z)(({theme:e})=>({fontSize:"0.85rem",fontWeight:"bold",color:e.palette.text.default,lineHeight:1.2,marginTop:"4px",textTransform:"uppercase",letterSpacing:"0.5px",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"clip",maxWidth:"70%",height:"2.4em"})),Tz=(0,b.styled)(z)(({theme:e})=>({fontSize:"24px",fontWeight:700,color:e.palette.icon.secondary,marginBottom:"0.5rem",lineHeight:1.2})),hmt=(0,b.styled)($)(({theme:e})=>({marginBottom:"1rem",padding:"8px",borderRadius:"8px",background:e.palette.mode==="light"?"#f8fafc":_n,color:e.palette.mode==="light"?"rgba(26, 26, 26, .8)":e.palette.text.default,transition:"background 0.3s ease, filter 0.3s ease","&:hover":{filter:"brightness(0.98)"}})),Sz=(0,b.styled)(z)(({theme:e})=>({fontSize:"0.9rem",fontWeight:1e3,color:e.palette.text.default,lineHeight:1.3,marginBottom:"4px",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis",minHeight:"fit-content",maxHeight:"2.6em"})),Cz=(0,b.styled)(z)({fontSize:"0.75rem",marginBottom:"8px"}),yz=(0,b.styled)($)(({theme:e})=>({display:"flex",gap:"15px",width:"100%",padding:"20px",background:e.palette.mode==="light"?e.palette.background.default:e.palette.background.secondary,borderRadius:"12px",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.05)",paddingBottom:e.spacing(3)})),bz=(0,b.styled)($)(({theme:e})=>({padding:"1rem",color:e.palette.text.error,fontSize:"1rem",fontWeight:500}));var mn=require("react/jsx-runtime"),my=({open:e,handleClick:t})=>{let r=(0,b.useTheme)();return(0,mn.jsx)(xe,{title:e?"Hide Performers":"Show Performers",placement:"bottom",children:(0,mn.jsx)("span",{children:(0,mn.jsxs)(Me,{variant:"contained",onClick:t,sx:{height:"3.7rem",padding:"0.3rem 1rem 0.3rem 0.3rem"},style:{backgroundColor:e?void 0:r.palette.background.constant?.disabled},children:[(0,mn.jsx)(Kl,{style:{height:"2rem",width:"2rem",marginRight:"10px"}}),e?"Hide Performers":"Show Performers"]})})})},cy=({handleClick:e})=>(0,mn.jsx)(xe,{title:"Open Leaderboard",placement:"bottom",children:(0,mn.jsx)(Me,{variant:"contained",onClick:e,sx:{height:"3.7rem",padding:"0.3rem",display:{xs:"inline-flex",sm:"none"}},children:(0,mn.jsx)(Kl,{style:{height:"2rem",width:"2rem"}})})}),vz=()=>(0,mn.jsx)(mz,{children:[...Array(5)].map((e,t)=>(0,mn.jsx)(g2,{variant:"rounded",height:"13.5rem",width:"inherit",sx:{minWidth:"150px"},style:{borderRadius:"1rem"}},t))});var St=require("react/jsx-runtime"),a8e={pathType:"pattern",page:0,pagesize:1,metrics:!0,expandUser:!0,trim:!0},xy={view:{label:"Most Opens",id:"open",countKey:"view_count"},clone:{label:"Most Clones",id:"clone",countKey:"clone_count"},download:{label:"Most Downloads",id:"download",countKey:"download_count"},deployment:{label:"Most Deploys",id:"deployments",countKey:"deployment_count"},share:{label:"Most Shares",id:"share",countKey:"share_count"}},oc=e=>({...a8e,order:`${xy[e].countKey} desc`}),n8e=({label:e,countKey:t,count:r,patternName:o,pattern:a,userName:n,status:i,id:l,onCardClick:s,onIconClick:u})=>{let f=()=>{s(a)},d=(m,x)=>{m.stopPropagation(),u(x)},p=(0,b.useTheme)();return(0,St.jsx)(pz,{elevation:0,status:i,onClick:f,children:(0,St.jsxs)(xz,{cardId:l,children:[(0,St.jsxs)(hz,{children:[(0,St.jsx)(gz,{children:e}),(0,St.jsx)(cz,{onClick:m=>d(m,`${t}+desc`),children:(0,St.jsx)(e5,{...$o,fill:p.palette.common.black})})]}),(0,St.jsx)(Tz,{children:r}),(0,St.jsxs)($,{children:[(0,St.jsx)(Sz,{children:o}),(0,St.jsxs)(Cz,{children:["by ",n]})]})]})})},br=(e={})=>({search:e.search??"",order:e.order??"",pagesize:e.pagesize??0,page:e.page??0,...e}),wz=(0,ac.memo)(n8e);wz.displayName="StatCard";var i8e=e=>{let t=e(br(oc("view"))),r=e(br(oc("clone"))),o=e(br(oc("download"))),a=e(br(oc("deployment"))),n=e(br(oc("share"))),i={view:t,clone:r,download:o,deployment:a,share:n};return{queries:i,isLoading:Object.values(i).some(l=>l.isLoading),hasError:Object.values(i).some(l=>l.isError)}},l8e=(e,t)=>{let r=e[t],o=xy[t],a=r?.isSuccess&&r.data?.patterns?.[0];return a?{label:o.label,countKey:o.countKey,count:a[o.countKey],patternName:a.name||"Unknown",pattern:a,userName:a.user?.first_name||"Unknown",id:o.id,status:a?.catalog_data?.content_class}:null},s8e=({useGetCatalogFilters:e,onCardClick:t,onIconClick:r,onOpenLeaderboard:o})=>{let a=(0,b.useTheme)(),{queries:n,isLoading:i,hasError:l}=i8e(e),s=(0,b.useMediaQuery)(a.breakpoints.down("sm")),u=(0,ac.useMemo)(()=>Object.keys(xy).map(d=>l8e(n,d)).filter(d=>!!d),[n]);if(l)return(0,St.jsx)(py,{children:(0,St.jsx)(bz,{children:"Error loading statistics. Please try again later."})});let f=u.map((d,p)=>(0,St.jsx)(wz,{...d,onCardClick:t,onIconClick:r},`${d.id}-${p}`));return(0,St.jsx)(no,{children:(0,St.jsxs)(py,{children:[(0,St.jsxs)(fz,{children:[(0,St.jsxs)($,{display:"flex",alignItems:"center",gap:1,children:[(0,St.jsx)(dz,{children:"Top Performers"}),(0,St.jsx)(Kl,{style:{height:"2rem",width:"2rem",color:a.palette.icon.secondary,display:s?"none":"inline-flex"}})]}),o&&(0,St.jsx)("div",{children:(0,St.jsxs)(Me,{variant:"contained",onClick:()=>o(),children:[(0,St.jsx)(Kl,{style:{height:"2rem",width:"2rem",display:s?"inline-flex":"none"}}),(0,St.jsx)("p",{style:{margin:0,display:s?"none":"inline-flex"},children:"Open Leaderboard"})]})})]}),(0,St.jsxs)(yz,{children:[i&&(0,St.jsx)(vz,{}),(0,St.jsx)(ou,{items:f})]})]})})},hy=(0,ac.memo)(s8e);var Qn=require("@mui/material"),Ez=(0,Qn.styled)("div")({padding:"1rem 0","& h2":{margin:"1rem 0"},".get-started-desc":{margin:"1rem"}}),Rz=(0,Qn.styled)("div")(({theme:e})=>({display:"flex",cursor:"pointer",flexDirection:"row",flexWrap:"wrap","& a":{color:e.palette.text.primary,margin:"1rem"}})),Oz=(0,Qn.styled)("a")(({theme:e})=>({flex:"1",padding:"2rem",textDecoration:"none",background:e.palette.mode==="light"?"#EEEEEE":"#212121",minHeight:"21.5rem",transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)",borderRadius:"10px","&:hover":{boxShadow:`${e.palette.background.brand?.default} 0px 0px 7px`},"& a":{margin:"0 !important","&:hover":{color:e.palette.background.brand?.default}}})),Az=(0,Qn.styled)("div")({display:"flex",alignItems:"center",gap:"1rem"}),Fmt=(0,Qn.styled)("div")({flex:"0 0 25%",alignSelf:"center",margin:"0 0.5rem"}),Nmt=(0,Qn.styled)("img")({height:"3rem",width:"3rem",maxWidth:"3rem",margin:"auto"}),Bmt=(0,Qn.styled)("svg")(({theme:e})=>({fontSize:"4.15rem",alignSelf:"center",flex:"0 0 25%",margin:"0 0.5rem",filter:e.palette.mode==="light"?"0%":"invert(100%)",transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"})),Hmt=(0,Qn.styled)("h2")({fontSize:"1.75rem",margin:"1rem 0"}),Vmt=(0,Qn.styled)("p")(({theme:e})=>({color:e.palette.text.primary,transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"}));var _a=require("react/jsx-runtime"),u8e=({Steps:e,PrerequisiteLine:t})=>(0,_a.jsxs)(Ez,{children:[(0,_a.jsxs)("div",{className:"get-started-desc",id:"pre-requisites",children:[(0,_a.jsx)("h2",{children:"Prerequisites"}),(0,_a.jsx)("p",{children:t})]}),(0,_a.jsx)(Rz,{id:"Set up",children:e.map((r,o)=>(0,_a.jsxs)(Oz,{href:r.url,target:"_blank",children:[(0,_a.jsxs)(Az,{children:[(0,_a.jsx)("h2",{children:r.heading}),typeof r.Icon=="string"?(0,_a.jsx)("img",{src:r.Icon,alt:r.heading,width:"40px",height:"40px"}):r.Icon]}),(0,_a.jsx)("p",{children:r.description})]},o))})]}),gy=u8e;var Pz=require("@mui/material");var f8e=(0,Pz.styled)("div")(({theme:e})=>({color:e.palette.text.primary,transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)",".chapter-sub-heading, .chapter-sub-heading a":{color:e.palette.mode==="light"?E2:R2,transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"},".chapter-alt-heading, .chapter-alt-heading a":{color:"gray"},"& a":{color:e.palette.background.brand?.default,textDecoration:"underline","&:hover":{color:e.palette.background.brand?.default}},"& p > code":{color:"inherit",padding:".2em .4em",margin:"0",fontSize:"85%",wordBreak:"normal",backgroundColor:e.palette.background.code,borderRadius:".25rem"},"& pre":{backgroundColor:"#011627",padding:"1em",borderRadius:"0.5rem",overflowX:"auto",color:"#d6deeb",position:"relative",textAlign:"left",width:"100%",margin:"1rem auto autocompleteClasses",fontFamily:"Courier New, Courier, monospace"},"& li code":{color:"inherit",padding:".2em .4em",margin:"0",fontSize:"85%",wordBreak:"normal",backgroundColor:e.palette.background.code,borderRadius:".25rem"},"& li a":{color:e.palette.text.default,textDecoration:"underline","&:hover":{color:e.palette.background.brand?.default}}})),Ty=f8e;var Sy=require("react");var Ss=require("@mui/material"),_z=(0,Ss.styled)("div")({width:"52rem",maxWidth:"90%"}),Iz=(0,Ss.styled)("div")({display:"flex",alignItems:"center",background:"#323339",width:"100%",height:"2.875rem",borderRadius:"2px 2px 0 0"}),Zmt=(0,Ss.styled)("div")({color:"#76767d",fontFamily:"'Courier New', Courier, monospace",fontSize:"13.5px",margin:"0 auto"}),kz=(0,Ss.styled)("ul")({position:"absolute",display:"block",listStyle:"none",marginLeft:"1rem",marginTop:"0",marginBottom:"0",padding:"0","& li":{display:"inline-block",width:"0.875rem",height:"0.875rem",background:"#1d1e23",borderRadius:"0.75rem",marginRight:"7px"}}),Mz=(0,Ss.styled)("div")({width:"100%",height:"100%",background:"#1d1e23",borderRadius:"0 0 2px 2px",padding:"24px 32px"}),Lz=(0,Ss.styled)("div")({width:"100%",height:"100%",position:"relative",overflow:"scroll",msOverflowStyle:"none",scrollbarWidth:"none","&::-webkit-scrollbar":{WebkitAppearance:"none",width:"0",height:"0"},"&.no-scroll-overflow-wrapper":{"& .code-wrapper":{bottom:"0",position:"absolute",minHeight:"100%"}}}),Dz=(0,Ss.styled)("div")(({theme:e})=>({"& pre":{padding:"0",margin:"0",width:"100%",height:"100%",fontStyle:"normal",fontWeight:"normal",fontSize:"12px",lineHeight:"27px",whiteSpace:"pre-wrap",color:e.palette.info.main,"&.short":{lineHeight:"16px"},"&.navy":{color:"#66a2ff"},"&.gray":{color:"#bdbec2"},"&.white":{color:"#fff"},wrapWord:"normal",[e.breakpoints.up("sm")]:{fontSize:"13.5px",lineHeight:"26px"}}}));var vo=require("react/jsx-runtime"),d8e=({lines:e,title:t,noScroll:r})=>(0,vo.jsxs)(_z,{children:[(0,vo.jsxs)(Iz,{children:[(0,vo.jsxs)(kz,{children:[(0,vo.jsx)("li",{style:{backgroundColor:"red"}}),(0,vo.jsx)("li",{style:{backgroundColor:"yellow"}}),(0,vo.jsx)("li",{style:{backgroundColor:"green"}})]}),t&&(0,vo.jsx)("div",{className:"title",children:t})]}),(0,vo.jsx)(Mz,{children:(0,vo.jsx)(Lz,{className:r?"no-scroll-overflow-wrapper":"",children:(0,vo.jsx)(Dz,{children:e&&e.map((o,a)=>(0,vo.jsx)(Sy.Fragment,{children:(0,vo.jsxs)("pre",{className:`${o.short?"short":""}`,style:{color:o.color?o.color:"blue"},children:[o.indent&&new Array(o.indent*2).fill({}).map((n,i)=>(0,vo.jsx)(Sy.Fragment,{children:"\xA0"},i)),o.code]})},a))})})})]}),Cy=d8e;var Fz=require("@mui/material"),Nz=(0,Fz.styled)("div")(({theme:e})=>({".chapter-back":{display:"flex",justifyContent:"space-between",alignItems:"center","& a":{display:"inline-flex","& svg":{alignSelf:"center",fontSize:"1.5rem",color:e.palette.grey[600],width:"100%",maxWidth:"1.5rem"},"& h4":{fontWeight:500,textTransform:"capitalize",fontSize:"1.25rem"},"&:hover":{"& svg, & h4":{color:e.palette.text.primary}}},".toc-toggle-btn":{display:"none"},".toc-menu-icon":{width:"1.5rem",height:"1.5rem",cursor:"pointer",fill:e.palette.secondary.main,transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"}},".toc-list":{"& ul":{position:"relative",paddingInlineStart:"2.65rem",MozPaddingStart:"2.65rem","&::after":{position:"absolute",inset:"1rem auto 1rem 1.7rem",width:"auto",height:"auto",borderLeft:"1px solid rgba(177, 182, 184, 0.25)",content:'""',zIndex:0},"& li":{width:"fit-content",margin:"1rem 0","&::marker":{color:"rgba(177, 182, 184, 0.75)"},"& p":{margin:0,fontSize:"1rem","& a":{color:e.palette.mode==="light"?"rgb(0 0 0 / 0.65)":"rgb(255 255 255 / 0.65)",transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"}},"&:hover":{"&::marker, & p, & a":{color:e.palette.background.brand?.default}}},".active-link":{"&::marker, & p, & a":{color:e.palette.background.brand?.default}}}}}));var Fu=require("react/jsx-runtime"),p8e=({availableChapters:e,currentChapter:t,onClick:r})=>{let o=a=>a.split("-").map(l=>l.charAt(0).toUpperCase()+l.slice(1)).join(" ");return(0,Fu.jsx)(Nz,{children:(0,Fu.jsx)("div",{className:"toc-list",children:(0,Fu.jsx)("ul",{className:"toc-ul toc-ul-open",children:e.map(a=>(0,Fu.jsx)("li",{className:a+".mdx"===t?"active-link":"",onClick:n=>{r(a,n)},children:(0,Fu.jsxs)("p",{className:"toc-item",children:[" ",o(a)]})},a))})})})},yy=p8e;var Vz=require("react");var Bz=require("@mui/material"),Hz=(0,Bz.styled)("div")(({theme:e})=>({position:"sticky",top:"10rem",left:0,marginLeft:"-3rem",".go-back":{margin:"1rem 0",display:"flex",justifyContent:"space-between",alignItems:"center","& a":{display:"inline-flex","& svg":{alignSelf:"center",fontSize:"1.5rem",color:e.palette.text.disabled,width:"100%",maxWidth:"1.5rem"},"& h4":{fontWeight:500,textTransform:"capitalize",fontSize:"1.25rem",whiteSpace:"nowrap"},"&:hover":{"& svg, & h4":{color:e.palette.text.primary}}}},".toc-toggle-btn":{display:"none"},".toc-ul-open":{display:"flex",flexDirection:"column",marginTop:"0rem",listStyle:"none",height:"auto !important",opacity:"1 !important",transition:"all .4s !important"},".toc-menu-icon":{width:"1.5rem",height:"1.5rem",cursor:"pointer",fill:e.palette.common.white},".toc-sub-heading":{marginTop:"1rem",fontWeight:500,fontSize:"1.15rem"},".toc-item":{lineHeight:"1.5rem"},".toc-list":{"& ul":{position:"relative",paddingInlineStart:"1.5rem",listStyleType:"none","& li":{margin:"1rem 0 1rem 0.5rem",width:"fit-content","&::marker":{color:"rgba(177, 182, 184, 0.75)"},"& p":{margin:0,fontSize:"1rem","& a":{color:"rgba(0, 0, 0, 0.65)"}},"&:hover":{"&::marker, & p, & a":{color:e.palette.secondary.contrastText}}},".active-link":{"&::marker, & p, & a":{color:e.palette.secondary.contrastText}}}},"@media only screen and (max-width: 991px)":{position:"initial",marginLeft:"-0.5rem",width:"auto",".toc-toggle-btn":{display:"flex"},".go-back":{marginLeft:0},".toc-ul":{opacity:0,height:0,transition:"none",paddingLeft:".8rem !important"},".toc-item":{lineHeight:".8rem"}}}));var lr=require("react/jsx-runtime"),m8e=[{name:"Set up",link:"/cloud-native-management/meshery"},{name:"Run Meshery",link:"/cloud-native-management/meshery/getting-started"},{name:"Manage Meshery",link:"/cloud-native-management/meshery/operating-service-meshes"}],c8e=({coursesData:e})=>{let[t,r]=(0,Vz.useState)(!1);return(0,lr.jsxs)(Hz,{children:[(0,lr.jsxs)("div",{className:"go-back",children:[(0,lr.jsxs)("a",{href:"/learn/learning-paths",children:[(0,lr.jsx)(N2,{}),(0,lr.jsx)("h4",{children:"Learning Paths"})]}),(0,lr.jsx)("div",{className:"toc-toggle-btn",children:t?(0,lr.jsx)(Ft,{className:"toc-menu-icon",onClick:()=>{r(!t)}}):(0,lr.jsx)(ad,{className:"toc-menu-icon",onClick:()=>{r(!t)}})})]}),(0,lr.jsx)("div",{className:"toc-list",children:(0,lr.jsxs)("ul",{className:`toc-ul ${t?"toc-ul-open":""}`,children:[(0,lr.jsx)("a",{href:"#pre-requisites",children:(0,lr.jsx)("h5",{className:"toc-sub-heading",children:"Pre-requisites"})}),m8e.map((o,a)=>(0,lr.jsx)("li",{children:(0,lr.jsx)("p",{className:"toc-item",children:(0,lr.jsx)("a",{href:`#${o.name}`,children:o.name})})},a)),(0,lr.jsx)("a",{href:"#courses-list",children:(0,lr.jsx)("h5",{className:"toc-sub-heading",children:"Courses"})}),e.map((o,a)=>(0,lr.jsx)("li",{children:(0,lr.jsx)("p",{className:"toc-item",children:(0,lr.jsx)("a",{href:`#${o.frontmatter.courseTitle}`,children:o.frontmatter.courseTitle})})},a))]})})]})},by=c8e;var Uz=require("@mui/material"),Wz=G(require("@mui/material/Autocomplete")),vy=G(require("@mui/material/CircularProgress")),nc=require("react"),qz=require("use-debounce");var Ct=require("react/jsx-runtime"),x8e=({usersData:e,disabled:t=!1,shareWithNewUsers:r,useGetAllUsersQuery:o})=>{let[a,n]=(0,nc.useState)(!1),[i,l]=(0,nc.useState)(""),[s,u]=(0,nc.useState)([]),[f,d]=(0,nc.useState)(!1),p=(0,b.useTheme)(),[m]=(0,qz.useDebounce)(i,300),{data:x,isLoading:h}=o({search:m,page:0,pagesize:10},{skip:m.trim().length==0}),g=x?.data??[],T=async()=>{console.log("users to share with",s);try{d(!0);let v=await r(s);v.error?n(v.error):u([])}catch(v){console.log("error while sharing",v)}finally{d(!1)}},E=(v,P)=>{P&&(u(P),l(""))},R=(v,P,B)=>{B==="input"?l(P):B==="clear"&&l("")},k=g.filter(v=>!s.concat(e).find(P=>P.email===v.email)),D=t||f||s.length===0,C=({avatarObj:v,...P})=>(0,Ct.jsx)(Dt,{avatar:(0,Ct.jsx)(qt,{alt:v.first_name,src:v.avatar_url,children:v.avatar_url?"":v.first_name?.charAt(0)}),label:v.email,size:"small",...P},v.user_id);return(0,Ct.jsx)(Ct.Fragment,{children:(0,Ct.jsxs)($,{display:"flex",alignItems:"center",justifyContent:"space-between",gap:1,children:[(0,Ct.jsx)(Wz.default,{id:"user-search-field",sx:{width:"100%"},filterOptions:v=>v,options:k,renderTags:(v,P)=>v.map((B,_)=>(0,Ct.jsx)(C,{avatarObj:B,...P({index:_})})),disableClearable:!0,includeInputInList:!0,filterSelectedOptions:!0,multiple:!0,disableListWrap:!0,disabled:f,inputValue:i,loading:h,value:s,getOptionLabel:v=>v.email,noOptionsText:h?"Loading...":i==""?"Search using name or email":"No users found",onChange:E,onInputChange:R,isOptionEqualToValue:(v,P)=>v.email===P.email,renderInput:v=>(0,Ct.jsx)(Qr,{...v,placeholder:"Add Users",error:!!a,helperText:a,fullWidth:!0,label:"",disabled:D,sx:{"& .MuiOutlinedInput-root":{paddingInline:"0.5rem",paddingBlock:"0.1rem"}},InputProps:{...v.InputProps,endAdornment:(0,Ct.jsx)(Ct.Fragment,{children:h?(0,Ct.jsx)(vy.default,{color:"inherit",size:20}):null})}}),renderOption:(v,P)=>(0,Ct.jsx)($,{component:"li",sx:{"& > img":{mr:2,flexShrink:0}},...v,children:(0,Ct.jsxs)(ce,{container:!0,alignItems:"center",children:[(0,Ct.jsx)(ce,{children:(0,Ct.jsx)($,{sx:{color:"text.secondary",mr:2},children:(0,Ct.jsx)(qt,{alt:P.first_name,src:P.avatar_url,children:P.avatar_url?"":(0,Ct.jsx)(Ln,{})})})}),(0,Ct.jsx)(ce,{size:"grow",children:P.deleted_at?.Valid?(0,Ct.jsxs)(z,{variant:"body2",color:"text.secondary",children:[P.email," (deleted)"]}):(0,Ct.jsxs)(Ct.Fragment,{children:[(0,Ct.jsxs)(z,{variant:"body2",children:[P.first_name," ",P.last_name]}),(0,Ct.jsx)(z,{variant:"body2",color:"text.secondary",children:P.email})]})})]})})}),(0,Ct.jsx)(Uz.Button,{variant:"contained",sx:{"&.Mui-disabled":{color:`${p.palette.text.secondary} !important`,backgroundColor:`${p.palette.action.disabled} !important`}},onClick:T,disabled:D,children:f?(0,Ct.jsx)(vy.default,{size:24,sx:{color:"#fff"}}):"Share"})]})})},B3=x8e;var Gz=require("@mui/material"),$r=G(require("react"));var We=require("react/jsx-runtime"),h8e=({usersData:e,setUsersData:t,label:r="Add User",setDisableSave:o,handleNotifyPref:a,notifyUpdate:n,isCreate:i,searchType:l,disabled:s=!1,currentUserData:u,searchedUsers:f=[],isUserSearchLoading:d,fetchSearchedUsers:p,usersSearch:m,setUsersSearch:x})=>{let[h,g]=(0,$r.useState)(""),[T,E]=(0,$r.useState)(!1),[R,k]=(0,$r.useState)(!1),[D,C]=(0,$r.useState)(!0),[v,P]=(0,$r.useState)(""),[B,_]=(0,$r.useState)(e||[]);(0,$r.useEffect)(()=>{_(e||[])},[e]);let J=(0,$r.useMemo)(()=>{if(D&&!m&&u)return[u];let N=f.filter(L=>L.user_id!==u?.user_id);return!m&&u?[u,...N]:N},[f,u,m,D,B]),X=(0,$r.useCallback)((N,L)=>{L.stopPropagation();let M=B.filter(F=>F.user_id!==N);_(M),t(M),o&&o(!1)},[B,t,o,p,v]),H=(0,$r.useCallback)((N,L)=>{if(!L)return;let M=B.some(V=>V.user_id===L.user_id),F=L.deleted_at?.Valid===!0;if(M||F){g(M?"User already selected":"User does not exist");return}P(""),x(""),g(""),E(!1),_(V=>[...V,L]),t(V=>[...V,L]),o&&o(!1)},[B,t,o,x]),q=(0,$r.useCallback)((N,L)=>{if(P(L),L==="")E(!0),x(""),C(!0);else{let M=encodeURIComponent(L);p(M),g(""),E(!0),C(!1)}},[p]);return(0,We.jsxs)(We.Fragment,{children:[(0,We.jsx)(Gz.Autocomplete,{id:"user-search-field",style:{width:"100%"},open:T,options:J,getOptionLabel:()=>v,isOptionEqualToValue:(N,L)=>N.user_id===L.user_id,onOpen:()=>E(!0),onClose:()=>E(!1),inputValue:v,onChange:H,onInputChange:q,filterOptions:(N,{inputValue:L})=>N.filter(M=>{let F=L.toLowerCase();return M.first_name?.toLowerCase().includes(F)||M.last_name?.toLowerCase().includes(F)||M.email?.toLowerCase().includes(F)}),loading:d,disabled:s,disableClearable:!0,value:void 0,selectOnFocus:!1,blurOnSelect:!0,clearOnBlur:!0,popupIcon:null,forcePopupIcon:!1,noOptionsText:d?"Loading...":"No users found",renderInput:N=>(0,We.jsx)(Qr,{...N,label:r,error:!!h,helperText:h,InputLabelProps:{style:{fontFamily:"inherit"}},InputProps:{...N.InputProps,endAdornment:(0,We.jsx)($r.default.Fragment,{children:d?(0,We.jsx)(Gt,{color:"inherit",size:20}):null})}}),renderOption:(N,L)=>(0,We.jsx)("li",{...N,id:L.user_id,children:(0,We.jsxs)($,{sx:{"& > img":{mr:2,flexShrink:0}},children:[" ",(0,We.jsxs)(ce,{container:!0,alignItems:"center",children:[(0,We.jsx)(ce,{children:(0,We.jsx)($,{sx:{color:"text.secondary",mr:2},children:(0,We.jsx)(qt,{alt:L.first_name,src:L.avatar_url,children:L.avatar_url?"":(0,We.jsx)(Ln,{})})})}),(0,We.jsx)(ce,{size:"grow",children:L.deleted?(0,We.jsxs)(z,{variant:"body2",color:"text.secondary",children:[L.email," (deleted)"]}):(0,We.jsxs)(We.Fragment,{children:[(0,We.jsxs)(z,{variant:"body2",children:[L.first_name," ",L.last_name]}),(0,We.jsx)(z,{variant:"body2",color:"text.secondary",children:L.email})]})})]})]})})}),!i&&(0,We.jsx)(c2,{row:!0,children:(0,We.jsx)("div",{style:{display:"flex",flexWrap:"nowrap"},children:(0,We.jsx)(Ml,{control:(0,We.jsx)(Yr,{checked:n,onChange:a,name:"notify",color:"primary"}),label:`Notify ${l} of membership change`})})}),(0,We.jsxs)($,{sx:{display:"flex",flexWrap:"wrap",gap:.5,mt:e?.length>0?"0.5rem":""},children:[!R&&B?.[0]&&(0,We.jsx)(Dt,{avatar:(0,We.jsx)(qt,{alt:B[0].first_name,src:B[0].avatar_url,children:!B[0].avatar_url&&B[0].first_name?.[0]}),label:B[0].email,onDelete:N=>X(B[0].user_id,N),deleteIcon:(0,We.jsx)(Xt,{title:"Remove user",children:(0,We.jsx)(Ft,{style:To})}),size:"small"},B[0].user_id),R&&B?.map(N=>(0,We.jsx)(Dt,{avatar:(0,We.jsx)(qt,{alt:N.first_name,src:N.avatar_url,children:!N.avatar_url&&N.first_name?.[0]}),label:N.email,onDelete:L=>X(N.user_id,L),deleteIcon:(0,We.jsx)(Xt,{title:"Remove user",children:(0,We.jsx)(Ft,{style:To})}),size:"small"},N.user_id)),B?.length>1&&(0,We.jsx)(z,{onClick:()=>k(!R),sx:{cursor:"pointer"},children:R?"(hide)":`(+${B.length-1})`})]})]})},wy=h8e;var na=require("@mui/material"),Uu=require("@mui/material/StepConnector");function xp(e,...t){let r=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(o=>r.searchParams.append("args[]",o)),`Minified MUI error #${e}; visit ${r} for the full message.`}var ej=G(require("@emotion/styled"));function zz(e){for(var t=0,r,o=0,a=e.length;a>=4;++o,a-=4)r=e.charCodeAt(o)&255|(e.charCodeAt(++o)&255)<<8|(e.charCodeAt(++o)&255)<<16|(e.charCodeAt(++o)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(a){case 3:t^=(e.charCodeAt(o+2)&255)<<16;case 2:t^=(e.charCodeAt(o+1)&255)<<8;case 1:t^=e.charCodeAt(o)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var jz={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function Kz(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var g8e=!1,T8e=/[A-Z]|^ms/g,S8e=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Qz=function(t){return t.charCodeAt(1)===45},$z=function(t){return t!=null&&typeof t!="boolean"},Ey=Kz(function(e){return Qz(e)?e:e.replace(T8e,"-$&").toLowerCase()}),Yz=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(S8e,function(o,a,n){return Xn={name:a,styles:n,next:Xn},a})}return jz[t]!==1&&!Qz(t)&&typeof r=="number"&&r!==0?r+"px":r},C8e="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function ic(e,t,r){if(r==null)return"";var o=r;if(o.__emotion_styles!==void 0)return o;switch(typeof r){case"boolean":return"";case"object":{var a=r;if(a.anim===1)return Xn={name:a.name,styles:a.styles,next:Xn},a.name;var n=r;if(n.styles!==void 0){var i=n.next;if(i!==void 0)for(;i!==void 0;)Xn={name:i.name,styles:i.styles,next:Xn},i=i.next;var l=n.styles+";";return l}return y8e(e,t,r)}case"function":{if(e!==void 0){var s=Xn,u=r(e);return Xn=s,ic(e,t,u)}break}}var f=r;if(t==null)return f;var d=t[f];return d!==void 0?d:f}function y8e(e,t,r){var o="";if(Array.isArray(r))for(var a=0;a<r.length;a++)o+=ic(e,t,r[a])+";";else for(var n in r){var i=r[n];if(typeof i!="object"){var l=i;t!=null&&t[l]!==void 0?o+=n+"{"+t[l]+"}":$z(l)&&(o+=Ey(n)+":"+Yz(n,l)+";")}else{if(n==="NO_COMPONENT_SELECTOR"&&g8e)throw new Error(C8e);if(Array.isArray(i)&&typeof i[0]=="string"&&(t==null||t[i[0]]===void 0))for(var s=0;s<i.length;s++)$z(i[s])&&(o+=Ey(n)+":"+Yz(n,i[s])+";");else{var u=ic(e,t,i);switch(n){case"animation":case"animationName":{o+=Ey(n)+":"+u+";";break}default:o+=n+"{"+u+"}"}}}}return o}var Zz=/label:\s*([^\s;{]+)\s*(;|$)/g,Xn;function Xz(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var o=!0,a="";Xn=void 0;var n=e[0];if(n==null||n.raw===void 0)o=!1,a+=ic(r,t,n);else{var i=n;a+=i[0]}for(var l=1;l<e.length;l++)if(a+=ic(r,t,e[l]),o){var s=n;a+=s[l]}Zz.lastIndex=0;for(var u="",f;(f=Zz.exec(a))!==null;)u+="-"+f[1];var d=zz(a)+u;return{name:d,styles:a,next:Xn}}var Ay=require("@emotion/react");function Ry(e,t){let r=(0,ej.default)(e,t);return process.env.NODE_ENV!=="production"?(...o)=>{let a=typeof e=="string"?`"${e}"`:"component";return o.length===0?console.error([`MUI: Seems like you called \`styled(${a})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
|
|
93
93
|
`)):o.some(n=>n===void 0)&&console.error(`MUI: the styled(${a})(...args) API requires all its args to be defined.`),r(...o)}:r}function tj(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}var Jz=[];function Oy(e){return Jz[0]=e,Xz(Jz)}var My=G(require("react")),Ly=G(ky());function Cs(e){if(typeof e!="object"||e===null)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function aj(e){if(My.isValidElement(e)||(0,Ly.isValidElementType)(e)||!Cs(e))return e;let t={};return Object.keys(e).forEach(r=>{t[r]=aj(e[r])}),t}function ys(e,t,r={clone:!0}){let o=r.clone?{...e}:e;return Cs(e)&&Cs(t)&&Object.keys(t).forEach(a=>{My.isValidElement(t[a])||(0,Ly.isValidElementType)(t[a])?o[a]=t[a]:Cs(t[a])&&Object.prototype.hasOwnProperty.call(e,a)&&Cs(e[a])?o[a]=ys(e[a],t[a],r):r.clone?o[a]=Cs(t[a])?aj(t[a]):t[a]:o[a]=t[a]}),o}var w8e=e=>{let t=Object.keys(e).map(r=>({key:r,val:e[r]}))||[];return t.sort((r,o)=>r.val-o.val),t.reduce((r,o)=>({...r,[o.key]:o.val}),{})};function Dy(e){let{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:o=5,...a}=e,n=w8e(t),i=Object.keys(n);function l(p){return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${r})`}function s(p){return`@media (max-width:${(typeof t[p]=="number"?t[p]:p)-o/100}${r})`}function u(p,m){let x=i.indexOf(m);return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${r}) and (max-width:${(x!==-1&&typeof t[i[x]]=="number"?t[i[x]]:m)-o/100}${r})`}function f(p){return i.indexOf(p)+1<i.length?u(p,i[i.indexOf(p)+1]):l(p)}function d(p){let m=i.indexOf(p);return m===0?l(i[1]):m===i.length-1?s(i[m]):u(p,i[i.indexOf(p)+1]).replace("@media","@media not all and")}return{keys:i,values:n,up:l,down:s,between:u,only:f,not:d,unit:r,...a}}function Fy(e,t){if(!e.containerQueries)return t;let r=Object.keys(t).filter(o=>o.startsWith("@container")).sort((o,a)=>{let n=/min-width:\s*([0-9.]+)/;return+(o.match(n)?.[1]||0)-+(a.match(n)?.[1]||0)});return r.length?r.reduce((o,a)=>{let n=t[a];return delete o[a],o[a]=n,o},{...t}):t}function Ny(e,t){return t==="@"||t.startsWith("@")&&(e.some(r=>t.startsWith(`@${r}`))||!!t.match(/^@\d/))}function By(e,t){let r=t.match(/^@([^/]+)?\/?(.+)?$/);if(!r){if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The provided shorthand ${`(${t})`} is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.
|
|
94
94
|
For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:xp(18,`(${t})`));return null}let[,o,a]=r,n=Number.isNaN(+o)?o||0:+o;return e.containerQueries(a).up(n)}function Y3(e){let t=(n,i)=>n.replace("@media",i?`@container ${i}`:"@container");function r(n,i){n.up=(...l)=>t(e.breakpoints.up(...l),i),n.down=(...l)=>t(e.breakpoints.down(...l),i),n.between=(...l)=>t(e.breakpoints.between(...l),i),n.only=(...l)=>t(e.breakpoints.only(...l),i),n.not=(...l)=>{let s=t(e.breakpoints.not(...l),i);return s.includes("not all and")?s.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):s}}let o={},a=n=>(r(o,n),o);return r(a),{...e,containerQueries:a}}var E8e={borderRadius:4},nj=E8e;var hp=G(r7()),R8e=process.env.NODE_ENV!=="production"?hp.default.oneOfType([hp.default.number,hp.default.string,hp.default.object,hp.default.array]):{},oa=R8e;function O8e(e,t){return t?ys(e,t,{clone:!1}):e}var Yi=O8e;var lc={xs:0,sm:600,md:900,lg:1200,xl:1536},ij={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${lc[e]}px)`},A8e={containerQueries:e=>({up:t=>{let r=typeof t=="number"?t:lc[t]||t;return typeof r=="number"&&(r=`${r}px`),e?`@container ${e} (min-width:${r})`:`@container (min-width:${r})`}})};function wo(e,t,r){let o=e.theme||{};if(Array.isArray(t)){let n=o.breakpoints||ij;return t.reduce((i,l,s)=>(i[n.up(n.keys[s])]=r(t[s]),i),{})}if(typeof t=="object"){let n=o.breakpoints||ij;return Object.keys(t).reduce((i,l)=>{if(Ny(n.keys,l)){let s=By(o.containerQueries?o:A8e,l);s&&(i[s]=r(t[l],l))}else if(Object.keys(n.values||lc).includes(l)){let s=n.up(l);i[s]=r(t[l],l)}else{let s=l;i[s]=t[s]}return i},{})}return r(t)}function lj(e={}){return e.keys?.reduce((r,o)=>{let a=e.up(o);return r[a]={},r},{})||{}}function sj(e,t){return e.reduce((r,o)=>{let a=r[o];return(!a||Object.keys(a).length===0)&&delete r[o],r},t)}function bs(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":xp(7));return e.charAt(0).toUpperCase()+e.slice(1)}function gp(e,t,r=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&r){let o=`vars.${t}`.split(".").reduce((a,n)=>a&&a[n]?a[n]:null,e);if(o!=null)return o}return t.split(".").reduce((o,a)=>o&&o[a]!=null?o[a]:null,e)}function sc(e,t,r,o=r){let a;return typeof e=="function"?a=e(r):Array.isArray(e)?a=e[r]||o:a=gp(e,r)||o,t&&(a=t(a,o,e)),a}function P8e(e){let{prop:t,cssProperty:r=e.prop,themeKey:o,transform:a}=e,n=i=>{if(i[t]==null)return null;let l=i[t],s=i.theme,u=gp(s,o)||{};return wo(i,l,d=>{let p=sc(u,a,d);return d===p&&typeof d=="string"&&(p=sc(u,a,`${t}${d==="default"?"":bs(d)}`,d)),r===!1?p:{[r]:p}})};return n.propTypes=process.env.NODE_ENV!=="production"?{[t]:oa}:{},n.filterProps=[t],n}var kt=P8e;function Z3(e){let t={};return r=>(t[r]===void 0&&(t[r]=e(r)),t[r])}var _8e={m:"margin",p:"padding"},I8e={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},uj={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},k8e=Z3(e=>{if(e.length>2)if(uj[e])e=uj[e];else return[e];let[t,r]=e.split(""),o=_8e[t],a=I8e[r]||"";return Array.isArray(a)?a.map(n=>o+n):[o+a]}),Q3=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],X3=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],Hy=[...Q3,...X3];function Nu(e,t,r,o){let a=gp(e,t,!0)??r;return typeof a=="number"||typeof a=="string"?n=>typeof n=="string"?n:(process.env.NODE_ENV!=="production"&&typeof n!="number"&&console.error(`MUI: Expected ${o} argument to be a number or a string, got ${n}.`),typeof a=="string"?`calc(${n} * ${a})`:a*n):Array.isArray(a)?n=>{if(typeof n=="string")return n;let i=Math.abs(n);process.env.NODE_ENV!=="production"&&(Number.isInteger(i)?i>a.length-1&&console.error([`MUI: The value provided (${i}) overflows.`,`The supported values are: ${JSON.stringify(a)}.`,`${i} > ${a.length-1}, you need to add the missing values.`].join(`
|
|
95
95
|
`)):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join(`
|
package/dist/index.mjs
CHANGED
|
@@ -89,7 +89,7 @@ Valid keys: `+JSON.stringify(Object.keys(H),null," "));var De=we(y,R,k,F,V+"."+
|
|
|
89
89
|
#eee,
|
|
90
90
|
#999
|
|
91
91
|
)
|
|
92
|
-
`})),YL=Qa("a")({color:"black",textDecoration:"none"}),I2=Qa("div")(({theme:e})=>({borderTop:`5px solid ${e.palette.background.brand?.default}`,borderRadius:"0.25rem",minHeight:"16rem",display:"flex",flexDirection:"column",justifyContent:"space-between",boxShadow:"0px 0.75rem 1rem 0.25rem rgba(0, 0, 0, 0.12)",position:"relative",transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"})),ZL=Qa("div")(({theme:e})=>({background:e.palette.mode==="light"?u4:Zl,transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"})),k2=Qa("div")(({theme:e})=>({display:"flex",justifyContent:"space-between",padding:"1rem","& span":{border:`1px solid ${e.palette.primary.dark}`,color:e.palette.text.primary,borderRadius:"0.8rem",padding:"0.05rem 0.75rem",fontSize:"1rem",transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"},"& h3":{color:e.palette.text.primary,transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"}})),M2=Qa("div")(({theme:e})=>({padding:"0 1rem",".summary":{color:e.palette.grey[700],transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"},p:{fontSize:"1rem"}})),QL=Qa("div")(({theme:e})=>({padding:"0 1rem",position:"absolute",bottom:"0rem",p:{fontSize:"1rem",color:e.palette.text.primary,fontWeight:600,transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"}})),L2=Qa("div")({textAlign:"center",position:"absolute",bottom:"0.1rem",right:"0.75rem",opacity:.2,img:{height:"8.5rem",width:"8.5rem"}});import{Fragment as p6e,jsx as Fe,jsxs as vs}from"react/jsx-runtime";var f6e=({path:e,children:t,isExternal:r})=>e?Fe(YL,{href:e,target:r?"_blank":void 0,rel:r?"noopener noreferrer":void 0,children:t}):Fe(p6e,{children:t}),d6e=({tutorial:e,path:t,courseCount:r,courseType:o,cardKey:a})=>{let n=a==="create-learning-path";return Fe(jL,{children:e.frontmatter.disabled==="yes"?Fe(ZL,{children:Fe(I2,{style:{borderTop:`5px solid ${e.frontmatter.themeColor}`},children:vs("div",{children:[vs(k2,{children:[Fe("h3",{children:e.frontmatter.title?e.frontmatter.title:e.frontmatter.courseTitle}),Fe("div",{style:{whiteSpace:"nowrap"},children:Fe("span",{children:"Coming Soon"})})]}),Fe(M2,{children:Fe("p",{className:"summary",children:e.frontmatter.description})}),Fe(L2,{children:Fe("img",{src:e.frontmatter.cardImage,alt:e.frontmatter.title})})]})})}):Fe(f6e,{path:t,isExternal:n,children:n?Fe($L,{children:Fe(I2,{style:{borderTop:`5px solid ${e.frontmatter.themeColor}`},children:vs("div",{children:[vs(k2,{children:[Fe("h3",{children:e.frontmatter.title?e.frontmatter.title:e.frontmatter.courseTitle}),n&&t&&Fe(L4,{width:"24px",height:"24px"}),e.frontmatter.status?Fe("p",{children:Fe("span",{children:"New"})}):null]}),Fe(M2,{children:Fe("p",{className:"summary",children:e.frontmatter.description})}),Fe(L2,{children:Fe("img",{src:e.frontmatter.cardImage})})]})})}):Fe(KL,{children:Fe(I2,{style:{borderTop:`5px solid ${e.frontmatter.themeColor}`},children:vs("div",{children:[vs(k2,{children:[Fe("h3",{children:e.frontmatter.title?e.frontmatter.title:e.frontmatter.courseTitle}),e.frontmatter.status?Fe("p",{children:Fe("span",{children:"New"})}):null]}),Fe(M2,{children:Fe("p",{className:"summary",children:e.frontmatter.description})}),!n&&Fe(QL,{className:"card-subdata",children:vs("p",{children:[r," ",o,r>1?"s":""]})}),Fe(L2,{children:Fe("img",{src:e.frontmatter.cardImage})})]})})})})})},XL=d6e;import{forwardRef as m6e,useImperativeHandle as c6e,useRef as x6e,useState as h6e}from"react";import{styled as JL}from"@mui/material";var eD=JL(Vl)(()=>({minWidth:400,overflowWrap:"anywhere",textAlign:"center",padding:"5px"})),tD=JL(K)(()=>({display:"flex",justifyContent:"end",width:"100%",gap:"10px"}));import{jsx as il,jsxs as D6}from"react/jsx-runtime";var D2={WARNING:"warning",DANGER:"error",SUCCESS:"success",INFO:"info"},rD=m6e(({variant:e},t)=>{let[r,o]=h6e({isOpen:!1,title:"",subtitle:"",primaryOption:"",showInfoIcon:"",variant:e,headerIcon:void 0,isChecked:!1,showCheckbox:!1}),a=x6e({resolve:()=>{},reject:()=>{}}),n=te(),i=w=>new Promise((E,I)=>{a.current={resolve:E,reject:I},o({...w,isOpen:!0,showInfoIcon:w.showInfoIcon||"",showCheckbox:!!w.showCheckbox})}),l=()=>{o(w=>({...w,isOpen:!1}))},s=()=>{o(w=>({...w,isChecked:!w.isChecked}))},u=()=>!!r.isChecked;c6e(t,()=>({show:i,getCheckboxState:u}));let{isOpen:f,primaryOption:d,title:p,subtitle:m,showInfoIcon:x,headerIcon:h,showCheckbox:g}=r,{resolve:T}=a.current;return D6(vr,{open:f,closeModal:l,title:p,id:"searchClick",headerIcon:h,reactNode:void 0,children:[m&&D6(br,{children:[il(eD,{id:"alert-dialog-description",variant:"body1",component:"div",children:il(G,{variant:"body1",component:"div",style:{color:n.palette.text.primary},children:m})}),g&&il(Wl,{control:il(Br,{checked:u(),onChange:s,color:"primary"}),label:il("span",{style:{fontSize:"1rem"},children:"Do not show again"})})]}),il(jr,{variant:"filled",helpText:x,children:D6(tD,{children:[il(Za,{onClick:()=>{l(),T("CANCEL")},children:"Cancel"}),il(Ya,{onClick:()=>{l(),T(d)},style:r.variant&&{backgroundColor:n.palette.background[r.variant]?.default,textTransform:"capitalize"},type:"submit",children:d})]})})]})});rD.displayName="PromptComponent";var F6=rD;var Sf=F6;import{outlinedInputClasses as oD}from"@mui/material/OutlinedInput";import{ThemeProvider as g6e,createTheme as T6e}from"@mui/material/styles";import S6e from"lodash/debounce";import aD,{useCallback as C6e}from"react";import{jsx as ws,jsxs as v6e}from"react/jsx-runtime";var y6e=e=>T6e({typography:{fontFamily:e.typography.fontFamily},components:{MuiTextField:{styleOverrides:{root:{"--TextField-brandBorderColor":e.palette.border.strong,"--TextField-brandBorderHoverColor":e.palette.background.graphics?.default,"--TextField-brandBorderFocusedColor":e.palette.background.graphics?.default,"& label.Mui-focused":{color:"var(--TextField-brandBorderFocusedColor)"}}}},MuiOutlinedInput:{styleOverrides:{notchedOutline:{borderColor:"var(--TextField-brandBorderColor)"},root:{[`&:hover .${oD.notchedOutline}`]:{borderColor:"var(--TextField-brandBorderHoverColor)"},[`&.Mui-focused .${oD.notchedOutline}`]:{borderColor:"var(--TextField-brandBorderFocusedColor)"}}}},MuiInput:{styleOverrides:{root:{color:e.palette.text.default,"&::before":{borderBottom:"2px solid var(--TextField-brandBorderColor)"},"&:hover:not(.Mui-disabled, .Mui-error):before":{borderBottom:"2px solid var(--TextField-brandBorderHoverColor)"},"&.Mui-focused:after":{borderBottom:"2px solid var(--TextField-brandBorderFocusedColor)"}}}},MuiButton:{styleOverrides:{root:{lineHeight:"auto"}}}}});function b6e({onSearch:e,placeholder:t,onClear:r,expanded:o,setExpanded:a}){let[n,i]=aD.useState(""),l=aD.useRef(null),s=te(),u=C6e(S6e(m=>{e(m)},300),[e]),f=m=>{let x=m.target.value;i(x),u(x)},d=m=>{m.stopPropagation(),u(""),i(""),a(!1),r&&r()},p=m=>{m.stopPropagation(),o?(u(""),i(""),a(!1)):(a(!0),setTimeout(()=>{l.current&&l.current.focus()},300))};return ws(cn,{onClickAway:m=>{m.stopPropagation();let x=m.target?.closest("#ref");n===""&&x&&d(m)},children:v6e("div",{style:{display:"flex"},children:[ws(g6e,{theme:y6e(s),children:ws(Vr,{variant:"standard",value:n,onChange:f,inputRef:l,placeholder:t,style:{width:o?"150px":"0",opacity:o?1:0,transition:"width 0.3s ease, opacity 0.3s ease"}})}),o?ws(Ht,{title:"Close",onClick:d,icon:ws(Ct,{fill:s.palette.icon.default}),arrow:!0}):ws(Ht,{title:"Search",onClick:p,icon:ws(zd,{fill:s.palette.icon.default}),arrow:!0})]})})}var qn=b6e;import{Grid2 as I6e,TableCell as k6e}from"@mui/material";import{useRef as O6e,useState as yf}from"react";var w6e="N/A",nD=e=>e&&e.deleted_at&&e.deleted_at.Valid===!0?Ss(e.deleted_at.Time):w6e;import{jsx as ll}from"react/jsx-runtime";var iD=L("div")({display:"flex",gap:"1rem"}),sl=L("div")({display:"flex",justifyContent:"space-between",width:"100%",alignItems:"center"}),F2=L("div")({display:"flex",alignItems:"center",marginRight:"1rem"}),N6=L("div")({boxSizing:"border-box",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}),B6=L("div")({position:"absolute",top:0,right:0,bottom:0,left:0,boxSizing:"border-box",display:"block",width:"100%"}),lD=L("span")(()=>({"& svg":{cursor:"pointer",width:"2rem",height:"2rem"}})),N8t=L("span")(()=>({"& svg":{width:"2rem",height:"2rem"}})),sD=L("span")(({theme:e})=>({"& svg":{color:"#3C494F","&:hover":{color:e.palette.error.error}}})),Gp=L("span")(()=>({color:"#455a64",opacity:"0.5","& svg":{cursor:"not-allowed"}})),uD=L("div")(()=>({display:"flex",justifyContent:"space-between",paddingRight:"26px"})),N2=L("div")(()=>({color:"#455a64",display:"flex",cursor:"not-allowed","& svg":{cursor:"pointer"}})),fD=L(Br)({padding:0,marginRight:"0.5rem",height:"28px","& .MuiSvgIcon-root":{borderColor:"white"},color:"white","&:hover":{color:"white",cursor:"pointer"},"&.Mui-checked":{color:"white"}}),H6=L(G)({fontSize:"1.25rem",fontWeight:800,"&:hover":{cursor:"default"}}),B8t=L(G)({fontSize:"0.9rem",display:"flex",alignItems:"end",padding:"0 5px","&:hover":{cursor:"default"}}),H8t=L("button")({background:"transparent",border:"none","&:hover":{cursor:"default"}}),V6=L(G)({fontStyle:"italic",fontSize:"12px","&:hover":{cursor:"default"}}),U6=L(G)({fontSize:"0.9rem",textAlign:"left",fontStyle:"italic"}),dD=L(U6)({height:"fit-content",fontStyle:"normal","&:hover":{cursor:"default"}}),E6e=L(K)(({theme:e})=>({background:e.palette.background.brand?.default,padding:"10px 10px 1px 10px",borderRadius:"4px",height:"100%",display:"flex",width:"100%"})),zp=L(E6e)({display:"flex",width:"100%",gap:"10px","@media (min-width : 600px)":{flexDirection:"column",gap:"0"}}),W6=L(Ae)(({theme:e})=>({width:"100%",borderRadius:"4px",background:e.palette.background.brand?.default,boxShadow:"0px 4px 4px 0px rgba(0, 0, 0, 0.25)",display:"flex",flexDirection:"column",marginBottom:"10px",color:e.palette.text.default,"&:hover":{background:e.palette.text.default},padding:"15px 10px"})),q6=L("p")(({theme:e,textColor:t})=>({margin:"0",fontSize:"14px",fontWeight:"400",display:"flex",color:t||e.palette.text.constant?.white})),G6=L("p")(({theme:e,textColor:t})=>({margin:"0",fontSize:"60px",fontWeight:"500",lineHeight:1,marginBottom:"5px",color:t||e.palette.text.constant?.white})),V8t=L(Ae)(({theme:e})=>({width:"100%",borderRadius:"4px",background:e.palette.text.default,boxShadow:"0px 4px 4px 0px rgba(0, 0, 0, 0.25)",display:"flex",flexDirection:"column",marginBottom:"10px",color:`${ie[40]}30 !important`,"&:hover":{background:e.palette.text.default},padding:"15px 10px"})),U8t=L("div")(({disabled:e=!1})=>({cursor:e?"not-allowed":"pointer",opacity:e?"0.5":"1",display:"flex","& svg":{cursor:e?"not-allowed":"pointer"}})),pD=L(me)(({theme:e})=>({borderBottom:`1px solid ${e.palette.divider}`,display:"flex",flexDirection:"row",padding:"5px 0"})),z6=({onClick:e,bulk:t,disabled:r,style:o,key:a,title:n="Delete"})=>{let i=te();return ll(ce,{title:n,arrow:!0,children:ll("div",{children:ll(rt,{sx:{"&:hover":{"& svg":{fill:r?i.palette.icon.disabled:i.palette.background.error?.hover}},...o},disableRipple:!0,disabled:r,onClick:e,children:ll(ro,{fill:r?i.palette.icon.disabled:i.palette.icon.default,width:t?"28":"24",height:t?"28":"24",style:o})})})},a)},Gn=({onClick:e,disabled:t,bulk:r,style:o,title:a="Edit"})=>{let n=te();return ll(ce,{title:a,arrow:!0,children:ll("div",{children:ll(rt,{onClick:e,sx:{"&:hover":{"& svg":{fill:t?n.palette.icon.disabled:n.palette.background.brand?.default}},...o},disableRipple:!0,disabled:t,children:ll(Ba,{fill:t?n.palette.icon.disabled:n.palette.icon.default,width:r?"28":"24",height:r?"28":"24",style:o})})})})},mD=L(me)({display:"flex",flexDirection:"row"}),W8t=L(me)({display:"flex",alignItems:"center",marginTop:1}),jp=L(me)({width:"100%"}),cD=L(gr)(({theme:e})=>({width:"100%",display:"flex",flexDirection:"column",backgroundColor:e.palette.background.paper,padding:e.spacing(2.5),cursor:"pointer"})),xD=L(cD)(({theme:e})=>({minHeight:e.spacing(50),background:"linear-gradient(180deg, #007366 0%, #000 100%)"})),hD=L(cD)(({theme:e})=>({minHeight:e.spacing(50),backgroundColor:e.palette.background.paper,boxShadow:"none"})),gD=L(me)({display:"flex",flexDirection:"row",justifyContent:"space-between"}),TD=L(me)({display:"flex",alignItems:"flex-start"}),SD=L(me)({display:"flex",alignItems:"center",justifyContent:"flex-end"}),CD=L(G)(({theme:e})=>({fontSize:"1.25rem",fontWeight:600,padding:"0.5rem 0",color:e.palette.background.constant?.white})),yD=L(me)({display:"flex",flexDirection:"column",maxHeight:"14.5rem",overflowY:"scroll",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"},"-ms-overflow-style":"none"}),bD=L(me)(({theme:e})=>({display:"flex",flexDirection:"row",position:"absolute",bottom:"20px",width:"100%",color:`${e.palette.background.constant?.white}99`,justifyContent:"space-between",paddingRight:"40px"})),j6=L(me)({textAlign:"left"});import{jsx as Kp,jsxs as vD}from"react/jsx-runtime";var R6e=({userId:e,userName:t,userEmail:r,profileUrl:o})=>{let a=te(),n=()=>{window.open(`${Lo}/user/${e}`)};return vD(me,{container:!0,alignItems:"center",children:[Kp(me,{children:Kp(K,{sx:{color:a.palette.text.default,mr:2,cursor:"pointer"},children:Kp(Mt,{onClick:n,alt:t,src:o,children:o?"":Kp(bn,{})})})}),vD(me,{size:"grow",children:[t,Kp(G,{variant:"body2",color:a.palette.text.disabled,children:r})]})]})},Cf=R6e;import{Fragment as _6e,jsx as it,jsxs as bf}from"react/jsx-runtime";var A6e=({tableMeta:e,handleRemoveFromTeam:t,isRemoveFromTeamAllowed:r,theme:o})=>it("div",{children:r?it(N2,{children:it(Ht,{id:`delete_user-${e.rowIndex}`,onClick:t(e.rowData),title:"Remove user membership from team",iconType:"delete",children:it(Ql,{fill:o?.palette.icon.default})})}):it(Gp,{children:it(Ql,{fill:o?.palette.icon.disabled,secondaryFill:Ur})})}),P6e=({teamID:e,useGetUsersForOrgQuery:t,org_id:r,useRemoveUserFromTeamMutation:o,useNotificationHandlers:a,isRemoveFromTeamAllowed:n,theme:i})=>{let[l,s]=yf(0),[u,f]=yf(10),[d,p]=yf("last_login_time desc"),[m,x]=yf(""),h=[],{handleError:g,handleSuccess:T,handleInfo:w}=a(),E=O6e(null),{width:I}=qo(),{data:D}=t({page:l,pagesize:u,search:m,order:d,teamId:e,orgId:r}),[C]=o(),b=D?.data||[],A=D?.total_count||0,B=V=>async()=>{let y=V[0];await E.current?.show({title:"Remove User From Team ?",subtitle:Q(V[3],V[2]),primaryOption:"Proceed",variant:D2.DANGER})==="Proceed"&&C({orgId:r,teamId:e,userId:y}).unwrap().then(()=>{T(`${V[4]?V[4]:""} ${V[5]?V[5]:""} removed from team`)}).catch(oe=>{let R=oe.response?.data?.message||"Failed to remove user from team";oe.response.status===404?w(R):g(R)})},P=(V,y,J)=>{let oe=J.findIndex(R=>R.name===y);return V[oe]},Q=(V,y)=>bf(_6e,{children:[it("p",{children:"Are you sure you want to remove this user? (This action is irreversible)"}),bf("p",{children:["User:"," ",it("i",{children:it("b",{children:V})})]}),bf("p",{children:["Email:"," ",it("i",{children:it("b",{children:y})})]})]}),Z,H={search:!1,viewColumns:!1,filter:!1,rowsPerPageOptions:[10,20,25],responsive:"standard",selectableRows:"none",count:A,rowsPerPage:u,page:l,print:!1,download:!1,elevation:0,serverSide:!0,sortOrder:{name:d.split(" ")[0],direction:d.split(" ")[1]},onTableChange:(V,y)=>{let J=y.announceText?y.announceText.split(" : "):[],oe="";switch(y.activeColumn&&(oe=`${N[y.activeColumn].name} desc`),V){case"changePage":s(y.page);break;case"changeRowsPerPage":f(y.rowsPerPage);break;case"search":Z&&clearTimeout(Z),Z=setTimeout(()=>{m!==y.searchText&&x(y.searchText)},500);break;case"sort":J.length==2&&(J[1]==="ascending"?oe=`${N[y.activeColumn].name} asc`:oe=`${N[y.activeColumn].name} desc`),oe!==d&&p(oe);break}}},q=[["user_id","na"],["avatar_url","xs"],["email","na"],["username","na"],["first_name","na"],["last_name","na"],["role_names","xs"],["status","na"],["joined_at","l"],["last_login_time","l"],["deleted_at","na"]],N=[{name:"user_id",label:"User ID",options:{filter:!1,sort:!1,searchable:!1}},{name:"avatar_url",label:"Team Member",options:{filter:!1,sort:!1,searchable:!1,customBodyRender:(V,y)=>it(K,{sx:{"& > img":{mr:2,flexShrink:0}},children:it(Cf,{userId:P(y.rowData,"user_id",N),userName:`${y.rowData[4]} ${y.rowData[5]}`,userEmail:y.rowData[2],profileUrl:V})})}},{name:"email",label:"Email",options:{filter:!1,sort:!0,searchable:!0}},{name:"username",label:"Username",options:{filter:!1,sort:!0,searchable:!0,customBodyRender:(V,y)=>bf("div",{style:{display:"flex"},children:[V,V?.includes("@")?it(Gt,{title:`Search "${y.rowData[3]} ${y.rowData[4]}" on Google`,children:it("a",{href:`https://www.google.com/search?q=${y.rowData[3]}+${y.rowData[4]}`,style:{color:"inherit"},target:"_blank",rel:"noreferrer",children:it("div",{children:it(F4,{width:20,height:20})})})}):it(Gt,{title:`Lookup "${V}" on GitHub`,children:it("a",{href:`https://www.github.com/${V}`,style:{color:"inherit"},target:"_blank",rel:"noreferrer",children:it("div",{children:it(Fu,{width:22,height:22})})})})]})}},{name:"first_name",label:"First",options:{filter:!1,sort:!0,searchable:!0}},{name:"last_name",label:"Last",options:{filter:!1,sort:!0,searchable:!0}},{name:"role_names",label:"Roles",options:{filter:!0,sort:!1,searchable:!1,filterOptions:{names:h.concat(h?.map(V=>`!${V}`))},customBodyRender:V=>it("div",{children:V?.join(", ")})}},{name:"status",label:"Status",options:{filter:!0,sort:!0,searchable:!1}},{name:"joined_at",label:"Joined At",options:{filter:!1,sort:!0,searchable:!1,sortDescFirst:!0}},{name:"last_login_time",label:"Last Active At",options:{filter:!1,sort:!0,searchable:!1,sortDescFirst:!0}},{name:"deleted_at",label:"Deleted At",options:{filter:!0,sort:!0,searchable:!1,sortDescFirst:!0,filterOptions:{names:["Deleted","Not Deleted"],logic:(V,y)=>V!="NA"&&y.indexOf("Deleted")>=0?!0:V=="NA"&&y.indexOf("Not Deleted")>=0,fullWidth:!0},customBodyRender:(V,y)=>{let J=b[y.rowIndex];return nD(J)}}},{name:"actions",label:"Actions",options:{filter:!1,sort:!1,searchable:!1,customBodyRender:(V,y)=>P(y.rowData,"deleted_at",N).Valid!==!1?bf(Gp,{children:[it(Ba,{style:{marginRight:".5rem"},fill:Ur,height:"30",width:"30"}),it(Ql,{fill:Ur,secondaryFill:Ur,height:30,width:30})]}):it(A6e,{tableMeta:y,handleRemoveFromTeam:B,isRemoveFromTeamAllowed:n,theme:i})}}],[M,k]=yf(N),[F]=yf(()=>{let V=Go(q,I),y={};return N.forEach(J=>{y[J.name]=V[J.name]}),y});return bf(C4,{initialMode:i?.palette.mode,children:[it("div",{style:{margin:"auto",width:"100%"},children:it(vo,{columns:N,data:b,options:H,colViews:q,tableCols:M,updateCols:k,columnVisibility:F})}),it(Sf,{ref:E})]})},B2=P6e;import{jsx as $p}from"react/jsx-runtime";var M6e=L(I6e)(({theme:e})=>({display:"grid",margin:"auto",paddingLeft:"0.5rem",borderRadius:"0.25rem",width:"inherit",gap:e.spacing(1)})),L6e=({teams:e,tableOptions:t,columnVisibility:r,colViews:o,tableCols:a,columns:n,updateCols:i,isRemoveFromTeamAllowed:l,org_id:s,useGetUsersForOrgQuery:u,useNotificationHandlers:f,useRemoveUserFromTeamMutation:d})=>{let p=te();return $p(zr,{children:$p(vo,{columns:n,data:e,options:{...t,renderExpandableRow:(m,x)=>{let h=e[x.dataIndex].id;return $p(k6e,{colSpan:6,sx:{paddingInline:"4rem",backgroundColor:`${p.palette.background.secondary} !important`},children:$p(M6e,{container:!0,size:12,children:$p(B2,{teamID:h,isRemoveFromTeamAllowed:l,org_id:s,useGetUsersForOrgQuery:u,useNotificationHandlers:f,useRemoveUserFromTeamMutation:d,theme:p})})})}},colViews:o,tableCols:a,updateCols:i,columnVisibility:r})})},H2=L6e;import{useState as wD}from"react";import{jsx as K6}from"react/jsx-runtime";function D6e({value:e,maxLength:t,...r}){return e.length>t?K6(Gt,{title:e,arrow:!0,placement:"top",children:K6("div",{style:{maxWidth:"15rem",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},...r,children:`${e.slice(0,t)}...`})}):K6("div",{style:{maxWidth:"15rem",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},...r,children:e})}var zo=D6e;import{Fragment as N6e,jsx as Vt,jsxs as $6}from"react/jsx-runtime";function F6e({selected:e,teams:t,deleteTeamsModalHandler:r}){let o={team_ids:[],team_names:[]};return e?.data.forEach(a=>{let n=a.index;o.team_ids.push(t[n]?.team_id),o.team_names.push(t[n]?.team_name)}),Vt(lD,{children:Vt(sD,{children:Vt(ce,{title:"Delete Teams",children:Vt(ro,{height:28,width:28,fill:Ur,onClick:()=>{r(o)}})},"delete_teams")})})}function Yp({teams:e,count:t,page:r,pageSize:o,setPage:a,setPageSize:n,sortOrder:i,setSortOrder:l,bulkSelect:s,setBulkSelect:u,handleTeamView:f,handleDeleteTeam:d,handleRemoveTeamFromWorkspace:p,handleleaveTeam:m,teamId:x,workspace:h=!1,isEditTeamAllowed:g,isLeaveTeamAllowed:T,isRemoveTeamFromWorkspaceAllowed:w,isDeleteTeamAllowed:E,setSearch:I}){let{width:D}=qo(),C=te(),b=[["id","na"],["name","xs"],["description","m"],["owner","l"],["created_at","na"],["updated_at","xl"],["deleted_at","na"],["actions","xs"]],A=[{name:"id",label:"ID",options:{filter:!1,sort:!1,searchable:!1,customBodyRender:N=>Vt(v2,{id:N})}},{name:"name",label:"Name",options:{filter:!1,sort:!0,searchable:!0}},{name:"description",label:"Description",options:{filter:!1,sort:!0,searchable:!1,customBodyRender:N=>Vt(zo,{value:N??"",maxLength:30})}},{name:"owner",label:"Owner",options:{filter:!1,sort:!0,searchable:!0}},{name:"created_at",label:"Created At",options:{filter:!1,sort:!0,searchable:!1,sortDescFirst:!0}},{name:"updated_at",label:"Updated At",options:{filter:!1,sort:!0,searchable:!1,sortDescFirst:!0}},{name:"deleted_at",label:"Deleted At",options:{filter:!0,sort:!0,searchable:!1,sortDescFirst:!0,customBodyRender:N=>JSON.stringify(N),filterOptions:{names:["Deleted","Not Deleted"],logic:(N,M)=>N!="NA"&&M.indexOf("Deleted")>=0?!0:N=="NA"&&M.indexOf("Not Deleted")>=0,fullWidth:!0}}},{name:"actions",label:"Actions",options:{filter:!1,sort:!1,searchable:!1,customBodyRender:(N,M)=>s||M.rowData[4].Valid?$6(Gp,{children:[Vt(Ba,{style:{marginRight:".5rem"}}),Vt(ro,{height:28,width:28,fill:Ur})]}):$6(N2,{children:[!h&&$6(N6e,{children:[Vt(lo,{disabled:!g,children:Vt(Ht,{id:`edit_team-${M.rowIndex}`,title:"Edit Team",onClick:k=>{g&&f(k,M.rowData)},iconType:"edit",children:Vt(Ba,{style:{height:28.8,width:28.8},fill:Ur})})}),Vt(lo,{disabled:!T,children:Vt(Ht,{id:`leave_team-${M.rowIndex}`,title:"Leave Team",onClick:k=>T&&m(k,M.rowData),iconType:"delete",children:Vt(Ql,{fill:Ur,secondaryFill:Ur})})})]}),h?Vt(lo,{disabled:!w,children:Vt(Ht,{id:`remove_team-${M.rowIndex}`,title:"Move Team",onClick:()=>{w&&p&&p(M.rowData[0])},iconType:"delete",children:Vt(ro,{height:28,width:28,fill:C.palette.icon.default})})}):Vt(lo,{disabled:!E,children:Vt(Ht,{id:`delete_team-${M.rowIndex}`,title:"Delete Team",onClick:k=>{E&&d(k,M.rowData)},iconType:"delete",children:Vt(ro,{height:28,width:28,fill:Ur})})})]})}}],B=e?.findIndex(N=>N.id===x),P={filter:!1,selectableRows:"none",filterType:"dropdown",expandableRows:!0,expandableRowsHeader:!1,expandableRowsOnClick:!0,responsive:"standard",count:t,rowsPerPage:o,page:r,print:!1,download:!1,elevation:0,serverSide:!0,viewColumns:!1,search:!1,rowsExpanded:[B],customToolbarSelect:N=>Vt(uD,{children:Vt(F6e,{selected:N,teams:e,deleteTeamsModalHandler:()=>{}})}),textLabels:{selectedRows:{text:"teams(s) selected"}},onTableChange:(N,M)=>{let k=M.announceText?M.announceText.split(" : "):[],F="";switch(M.activeColumn&&(F=`${A[M.activeColumn].name} desc`),N){case"changePage":a(M.page);break;case"changeRowsPerPage":n(M.rowsPerPage);break;case"search":I(M.searchText!==null?M.searchText:"");break;case"sort":k.length==2&&(k[1]==="ascending"?F=`${A[M.activeColumn].name} asc`:F=`${A[M.activeColumn].name} desc`),F!==i&&l(F);break;case"rowSelectionChange":M.selectedRows.data.length?s||u(!0):u(!1);break;default:M.selectedRows.data.length==0&&s&&u(!1)}},isRowSelectable:N=>e[N].deleted_at.Valid!==!0,setRowProps:(N,M,k)=>(k&&k.selectedRows?k.selectedRows.data:[]).includes(M)?{style:{backgroundColor:C.palette.background.hover}}:N[6].Valid?{style:{backgroundColor:C.palette.icon.disabled}}:{style:{backgroundColor:C.palette.background.constant?.table}}},[Q,Z]=wD(A),[H,q]=wD(()=>{let N=Go(b,D),M={};return A.forEach(k=>{M[k.name]=N[k.name]}),M});return{columns:A,tableOptions:P,tableCols:Q,updateCols:Z,columnVisibility:H,setColumnVisibility:q,colViews:b}}import Ca from"react";import{jsx as vt,jsxs as H6e}from"react/jsx-runtime";var B6e=({width:e=U,height:t=W,primaryFill:r="#00B39F",secondaryFill:o="#00D3A9",...a})=>H6e("svg",{width:e,height:t,viewBox:"0 0 135 135",...a,xmlns:"http://www.w3.org/2000/svg",children:[vt("path",{d:"M69.5 31.82V64.07L97.45 47.89L69.5 31.82Z",fill:o}),vt("path",{d:"M69.5 70.81V103.22L97.7 87.09L69.5 70.81Z",fill:o}),vt("path",{d:"M65.47 63.85V32.09L37.87 47.92L65.47 63.85Z",fill:r}),vt("path",{d:"M10.1 103.1C15.5182 111.811 22.842 119.179 31.52 124.65V90.71L10.1 103.1Z",fill:r}),vt("path",{d:"M65.47 103.06V71.05L37.8 87.07L65.47 103.06Z",fill:r}),vt("path",{d:"M35.54 122.63L63.56 106.61L35.54 90.41V122.63Z",fill:o}),vt("path",{d:"M99.62 122.8V90.63L71.64 106.63L99.62 122.8Z",fill:r}),vt("path",{d:"M127.03 99.37C131.817 90.4433 134.524 80.5502 134.95 70.43L105.78 87.11L127.03 99.37Z",fill:r}),vt("path",{d:"M103.64 83.69L131.76 67.61L103.64 51.45V83.69Z",fill:o}),vt("path",{d:"M99.62 44.5V12.52L71.77 28.49L99.62 44.5Z",fill:r}),vt("path",{d:"M99.62 83.55V51.28L71.7 67.44L99.62 83.55Z",fill:r}),vt("path",{d:"M35.54 51.22V83.73L63.66 67.45L35.54 51.22Z",fill:o}),vt("path",{d:"M65.47 0C55.1388 0.298791 45.016 2.97835 35.89 7.83L65.52 24.83L65.47 0Z",fill:r}),vt("path",{d:"M35.54 12.3V44.62L63.69 28.48L35.54 12.3Z",fill:o}),vt("path",{d:"M31.52 10.34C22.8442 15.8136 15.521 23.1813 10.1 31.89L31.52 44.25V10.34Z",fill:r}),vt("path",{d:"M99.43 8C90.2123 3.0393 79.9635 0.299881 69.5 0V25.15L99.43 8Z",fill:o}),vt("path",{d:"M0 69.87C0.348236 80.2825 3.1145 90.4711 8.08 99.63L29.77 87.07L0 69.87Z",fill:o}),vt("path",{d:"M8.07001 35.37C3.13121 44.4917 0.372439 54.6334 0.0100098 65L29.8 47.91L8.07001 35.37Z",fill:o}),vt("path",{d:"M35.78 127.13C44.9355 132.013 55.0981 134.706 65.47 135V110.15L35.78 127.13Z",fill:r}),vt("path",{d:"M124.89 32C119.512 23.3126 112.237 15.9553 103.61 10.48V44.3L124.89 32Z",fill:o}),vt("path",{d:"M103.64 124.54C112.314 119.022 119.624 111.61 125.02 102.86L103.64 90.52V124.54Z",fill:o}),vt("path",{d:"M134.96 64.81C134.572 54.5437 131.835 44.5032 126.96 35.46L105.5 47.88L134.96 64.81Z",fill:r}),vt("path",{d:"M69.5 135C79.845 134.709 89.9825 132.029 99.12 127.17L69.5 110V135Z",fill:o}),vt("path",{d:"M31.52 83.44V51.56L3.83002 67.43L31.52 83.44Z",fill:r})]}),Y6=B6e;import V6e from"@mui/material/Tooltip";import U6e from"react";import{jsx as ED}from"react/jsx-runtime";var W6e=U6e.forwardRef((e,t)=>ED(V6e,{...e,ref:t,children:ED("span",{children:e.children})})),Z6=W6e;import{Grid2 as RD,styled as vf}from"@mui/material";var OD=vf(St)(({theme:e})=>({padding:"5px 6px !important",color:e.palette.text.default,fontSize:"0.875rem",textTransform:"uppercase",fontWeight:400,height:"unset",borderRadius:"100px",border:`0.5px solid ${e.palette.border?.normal}`,background:e.palette.background.default,maxWidth:"14.375rem"})),AD=vf(xn)(({theme:e})=>({width:300,height:280,overflow:"auto",backgroundColor:e.palette.background.secondary,borderRadius:"10px",boxShadow:"0px 1px 4px 0px rgba(0, 0, 0, 0.25) inset","@media (max-width: 843px)":{width:260},"@media (max-width: 768px)":{width:300},"@media (max-width: 375px)":{width:"100%"}})),Q6=vf(G)(({theme:e})=>({paddingBottom:"15px",color:e.palette.text?.default,textAlign:"center",fontSize:"1rem",letterSpacing:"0.15px"})),Zp=vf(Ae)(({theme:e})=>({margin:"5px 0",padding:"7px 0",borderRadius:"10px",borderColor:e.palette.border?.strong,boxShadow:"none",display:"flex",flexDirection:"row",fill:e.palette.icon.default,"&:hover":{borderColor:e.palette.border?.brand,backgroundColor:`${qe} !important`,fill:e.palette.icon.inverse}})),X6=vf(RD)({padding:"0 1rem","@media (max-width: 768px)":{padding:"0",display:"flex",alignItems:"center",flexDirection:"column",width:"100%"}}),PD=vf(RD)({padding:"2.5rem 1rem 0 1rem","@media (max-width: 768px)":{padding:"1rem",transform:"rotate(90deg)",height:"6.25rem",marginLeft:"6.25rem"}});import{jsx as _t,jsxs as ya}from"react/jsx-runtime";var _D={CHIP:"chip",OTHER:"other"};function q6e(e){return e?{meshery:_t(Y6,{}),kubernetes:_t(Bd,{}),github:_t(Fu,{})}[e]||null:_t(Bd,{})}function V2(e,t){return e.filter(r=>t.indexOf(r)===-1)}function ID(e,t){return e.filter(r=>t.indexOf(r)!==-1)}function G6e({name:e,assignableData:t,assignedData:r,assignablePage:o,assignedPage:a,originalAssignedData:n,emptyStateIconLeft:i,emtyStateMessageLeft:l,emptyStateIconRight:s,emtyStateMessageRight:u,originalLeftCount:f,originalRightCount:d,leftPermission:p=!0,rightPermission:m=!0,transferComponentType:x=_D.OTHER}){let[h,g]=Ca.useState([]),[T,w]=Ca.useState([]),[E,I]=Ca.useState(n),[D,C]=Ca.useState(0),[b,A]=Ca.useState(0);Ca.useEffect(()=>{I(n)},[n]),Ca.useEffect(()=>{w(t)},[t]),Ca.useEffect(()=>{C(f),A(d)},[f,d]);let B=ID(h,T),P=ID(h,E);Ca.useEffect(()=>{r(E)},[E]),Ca.useEffect(()=>{let k=y=>{y[0].isIntersecting&&o()},F=new IntersectionObserver(k,{threshold:1}),V=document.getElementById("leftList");return V&&F.observe(V),()=>{V&&F.unobserve(V)}},[t]),Ca.useEffect(()=>{let k=y=>{y[0].isIntersecting&&a()},F=new IntersectionObserver(k,{threshold:1}),V=document.getElementById("rightList");return V&&F.observe(V),()=>{V&&F.unobserve(V)}},[n]);let Q=k=>()=>{let F=h.indexOf(k),V=[...h];F===-1?V.push(k):V.splice(F,1),g(V)},Z=k=>{k.stopPropagation(),I(E.concat(T)),w([]),C(0),A(F=>F+D)},H=k=>{k.stopPropagation(),I(E.concat(B)),w(V2(T,B)),g(V2(h,B)),C(F=>F-B.length),A(F=>F+B.length)},q=k=>{k.stopPropagation(),w(T.concat(P)),I(V2(E,P)),g(V2(h,P)),A(F=>F-P.length),C(F=>F+P.length)},N=k=>{k.stopPropagation(),w(T.concat(E)),I([]),A(0),C(F=>F+b)},M=(k,F,V,y)=>ya(AD,{children:[_t(Hr,{dense:!0,component:"div",role:"list",children:k.length>0?k.map(J=>{let oe=`transfer-list-item-${J.name}-label`;return ya(Tr,{role:"listitem",sx:{display:"flex",justifyContent:"space-between","&:hover":{backgroundColor:"#00000010"}},onClick:Q(J),children:[x===_D.CHIP?_t(Z6,{title:J.name,placement:"top",children:_t(OD,{sx:{paddingY:"10px"},variant:"outlined",label:J.name,onDelete:()=>{},deleteIcon:_t(Q4,{}),icon:q6e(J?.kind)||_t(Bd,{})})}):_t(Z6,{title:J.name,placement:"top",children:_t(G,{sx:{maxWidth:"230px",height:"1.5rem",overflow:"hidden"},children:J.name})}),_t(Br,{checked:h.indexOf(J)!==-1,tabIndex:-1,disableRipple:!0,inputProps:{"aria-labelledby":oe}})]},J.id)}):ya("div",{style:{textAlign:"center",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",height:"264px"},children:[F,_t(G,{sx:{color:"#979797",px:5,py:2,lineHeight:1},children:V})]})}),_t("div",{id:y})]});return ya(me,{container:!0,justifyContent:"center",alignItems:"center",children:[ya(X6,{children:[ya(Q6,{children:["Available ",e," (",T.length,")"]}),M(T,i,l,"leftList")]}),_t(PD,{children:ya(me,{container:!0,direction:"column",alignItems:"center",children:[ya(Zp,{variant:"outlined",size:"small",onClick:Z,disabled:!m||m&&(T?.length===0||T.length<D),"aria-label":"move all right",children:[_t(Gd,{width:18,height:18}),_t(Gd,{style:{position:"absolute",left:"27px"},width:18,height:18})]}),_t(Zp,{variant:"outlined",size:"small",onClick:H,disabled:!m||m&&B.length===0,"aria-label":"move selected right",children:_t(Gd,{width:18,height:18})}),_t(Zp,{variant:"outlined",size:"small",onClick:q,disabled:!p||p&&P.length===0,"aria-label":"move selected left",children:_t(Hd,{width:18,height:18})}),ya(Zp,{variant:"outlined",size:"small",onClick:N,disabled:!p||p&&(E?.length===0||E.length<b),"aria-label":"move all left",children:[_t(Hd,{width:18,height:18}),_t(Hd,{style:{position:"absolute",left:"27px"},width:18,height:18})]})]})}),ya(X6,{children:[ya(Q6,{children:["Assigned ",e," (",E.length,")"]}),M(E,s,u,"rightList")]})]})}var Qp=G6e;import{Drawer as z6e,styled as j6e,useMediaQuery as K6e}from"@mui/material";import kD from"react";import{Fragment as Q6e,jsx as so,jsxs as U2}from"react/jsx-runtime";var $6e=j6e("div")(({theme:e})=>({background:e.palette.mode==="light"?Tn.header:gn.header,padding:"0.75rem 1rem",margin:"-1rem -1rem 1rem -1rem",display:"flex",justifyContent:"space-between",alignItems:"center",color:e.palette.text.constant?.white}));function Y6e({filters:e,selectedFilters:t,setSelectedFilters:r,variant:o="outlined",handleApplyFilter:a,showAllOption:n=!0,id:i}){let[l,s]=kD.useState(null),[u,f]=kD.useState(!1),d=te(),p=K6e(d.breakpoints.down("sm")),m=w=>{s(w.currentTarget),f(E=>!E)},x=()=>{s(null),f(!1)},h=(w,E)=>{let I=w.target.value;r(D=>({...D,[E]:I}))},g=()=>{x(),a()},T=()=>U2("div",{children:[so($6e,{children:so("h3",{children:"Filters: "})}),Object.keys(e).map(w=>{let E=e[w].options;return U2("div",{role:"presentation",children:[so(ql,{id:e[w].name,children:e[w].name}),U2(ia,{defaultValue:"All",value:t[w],variant:o,onChange:I=>h(I,w),style:{width:"20rem",marginBottom:"1rem"},inputProps:{"aria-label":"Without label"},displayEmpty:!0,children:[n&&so(mt,{value:"All",children:"All"}),E.map(I=>so(mt,{value:I.value,children:I.label},I.value))]},w)]},w)}),so("div",{style:{display:"flex",justifyContent:"center"},children:so(Ae,{variant:"contained",onClick:g,children:"Apply"})})]});return so(Q6e,{children:U2("div",{id:i,children:[so(Ht,{title:"Filter",onClick:m,icon:so(A4,{fill:d.palette.icon.default}),arrow:!0}),p?so(z6e,{anchor:"bottom",open:u,onClose:x,PaperProps:{style:{padding:"0 1rem 1rem 1rem",backgroundColor:d.palette.background.surfaces}},children:T()}):so(Rp,{id:u&&l?"transition-popper":void 0,open:u,anchorEl:l,placement:"bottom-end",children:so(cn,{onClickAway:x,mouseEvent:"onMouseDown",touchEvent:"onTouchStart",children:so(xn,{sx:{padding:"1rem",paddingTop:"1.8rem",boxShadow:"0px 4px 8px rgba(0, 0, 0, 0.1)",backgroundColor:d.palette.background.surfaces},children:T()})})})]})})}var Z6e=Y6e;import{useState as X6e}from"react";import{Fragment as n7e,jsx as wf,jsxs as J6}from"react/jsx-runtime";var ba={PUBLIC:"public",PRIVATE:"private",PUBLISHED:"published"},J6e=L(Gl)(({theme:e})=>({"& .MuiPaper-root":{backgroundColor:e.palette.mode==="light"?ox:e.palette.background.constant?.table,color:e.palette.text.secondary,border:`1px solid ${e.palette.border.default}`,borderRadius:"0.25rem",padding:"0rem"},"& .MuiMenuItem-root":{fontSize:".9rem",padding:"0.5rem","&:hover":{backgroundColor:e.palette.mode==="light"?Iu:"rgba(0, 179, 159, 0.25)"}},"& .Mui-selected":{backgroundColor:e.palette.mode==="light"?Iu:"rgba(0, 179, 159, 0.25)"},"& .MuiList-padding":{padding:"0px"}})),e7e=L(Ae)(()=>({padding:"0px"})),t7e=L("div")(({theme:e,enabled:t})=>({paddingLeft:"0.3rem",height:"1.5rem",width:"auto",paddingRight:t?"0":"0.3rem",borderRadius:"0.25rem",border:`1px solid ${bd}`,background:e?.palette.mode==="light"?ox:e?.palette.background.constant?.table,textTransform:"uppercase",color:e?.palette.text.default,display:"flex",justifyContent:"center",alignItems:"center",fontSize:"0.75rem",fontFamily:e?.typography.fontFamily})),r7e=L(mt)(({theme:e})=>({textTransform:"capitalize",color:e.palette.icon.default})),o7e=L("div")({marginRight:"0.5rem"}),a7e=({value:e,onChange:t,options:r,enabled:o})=>{let[a,n]=X6e(null),i=!!a,l=f=>{f.stopPropagation(),n(null)},s=f=>{f.stopPropagation(),o&&n(f.currentTarget)},u=(f,d)=>{f.stopPropagation(),t&&t(d),l(f)};return J6(n7e,{children:[wf(e7e,{disabled:!o,onClick:s,"data-testid":`design-visibility-${e.toLowerCase()}`,children:J6(t7e,{enabled:o,children:[wf("span",{style:{fontSize:"0.85rem"},children:e}),o&&wf(vO,{style:{...Co}})]})}),wf(J6e,{open:i,onClose:l,anchorEl:a,anchorReference:"anchorPosition",anchorPosition:{top:(a?.getBoundingClientRect().bottom??0)+5,left:(a?.getBoundingClientRect().left??0)+5},children:r?.map(([f,d],p)=>J6(r7e,{"data-testid":`visibility-toggle-${f.toLowerCase()}`,onClick:m=>u(m,f),children:[wf(o7e,{children:wf(d,{width:16,height:16})}),f]},p))})]})},ul=a7e;import{styled as l7e}from"@mui/material";import{styled as va,Typography as i7e}from"@mui/material";var MD=va("div")(()=>({width:"85px",height:"88px",overflow:"hidden",position:"absolute",top:"-3px",left:"-3px"})),LD=va("div")(({catalogClassName:e})=>({font:"bold 10px sans-serif",WebkitTransform:"rotate(-45deg)",textAlign:"center",transform:"rotate(-45deg)",position:"relative",padding:"4px 0",top:"15px",left:"-30px",width:"120px",display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",backgroundColor:{community:"rgba(122,132,142,.8)",official:"#EBC017",verified:"#00B39F"}[e],color:"#fff"})),DD=va("div")(({outerStyles:e})=>({position:"relative",borderRadius:"1rem",textAlign:"center",transformStyle:"preserve-3d",transition:"all .9s ease-out",marginBottom:"1.25rem",display:"inline-flex",perspective:"1000px","&:hover":{cursor:"pointer",transform:"translateY(-2%)"},"@media (max-width:1200px)":{height:"18.75rem"},...e})),FD=va("div")(({theme:e})=>({position:"relative",width:"100%",height:"100%",textAlign:"center",transition:"transform 0.6s",background:e.palette.background.default,boxShadow:`2px 2px 3px 0px ${e.palette.background.brand?.default}`,borderRadius:"0.9375rem"})),ND=va("span")(({theme:e})=>({position:"absolute",top:"0",right:"0",minWidth:"3rem",padding:"0 0.75rem",fontSize:"0.875rem",textTransform:"capitalize",background:e.palette.background.brand?.default,color:e.palette.text.inverse,borderRadius:"0 1rem 0 2rem"})),Ef=va("p")(({theme:e})=>({fontSize:"1rem",textTransform:"capitalize",margin:"0rem",lineHeight:"1.5",textAlign:"center",color:e.palette.text.secondary,fontWeight:"600"})),BD=va(i7e)(({theme:e})=>({fontWeight:"bold",textTransform:"capitalize",color:e.palette.text.default,fontSize:"1.125rem",marginTop:"2rem",padding:"0rem 1rem",position:"relative",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",textAlign:"center",width:"100%"})),HD=va("div")(({theme:e})=>({display:"flex",justifyContent:"space-around",fontSize:"0.2rem",color:e.palette.text.secondary,padding:"0.9rem 0.1rem",background:e.palette.background.secondary,position:"absolute",bottom:"0px",marginTop:"1.2rem",borderRadius:"0 0 0.9375rem 0.9375rem",width:"100%"})),Rf=va("div")(()=>({display:"flex",alignItems:"center",gap:"4px",fontSize:"0.2rem",color:"rgba(26, 26, 26, .8)",margin:"0rem",padding:"0.1rem"})),VD=va("div")(()=>({height:"max-content",display:"flex",marginTop:"-1rem",flexDirection:"column",padding:"0rem 1rem",justifyContent:"start",alignItems:"start","@media (max-width:1200px)":{height:"max-content"}})),UD=va("div")(({theme:e})=>({background:e.palette.mode==="light"?"rgba(231, 239, 243, 0.40)":"#212121",display:"flex",alignItems:"center",justifyContent:"center",padding:"0.5rem",width:"100%",borderRadius:"0.5rem"}));import{Fragment as f7e,jsx as Jt,jsxs as fl}from"react/jsx-runtime";var X7t=l7e("a")(()=>({textDecoration:"none"}));var s7e=({catalogClassName:e})=>e?Jt(MD,{children:Jt(LD,{catalogClassName:e,children:e})}):Jt(f7e,{}),u7e=({pattern:e,patternType:t,cardHeight:r,cardWidth:o,cardStyles:a,onCardClick:n})=>{let i={height:r,width:o,...a};return Jt(DD,{outerStyles:i,onClick:n,children:fl(FD,{className:"innerCard",children:[Jt(s7e,{catalogClassName:e?.catalog_data?.content_class}),Jt(ND,{children:t}),fl(VD,{children:[Jt(BD,{style:{margin:"3rem 0 1.59rem 0",textAlign:"center"},children:e.name}),Jt(UD,{children:Jt(Na,{height:"118",width:"120"})})]}),fl(HD,{children:[fl(Rf,{children:[Jt(ua,{width:18,height:18}),Jt(Ef,{children:e.download_count})]}),fl(Rf,{children:[Jt(Rd,{width:18,height:18,fill:"#51636B"}),Jt(Ef,{children:e.clone_count})]}),fl(Rf,{children:[Jt(Ud,{width:18,height:18,fill:"#51636B"}),Jt(Ef,{children:e.view_count})]}),fl(Rf,{children:[Jt(Dd,{width:18,height:18}),Jt(Ef,{children:e.deployment_count})]}),fl(Rf,{children:[Jt(vn,{width:18,height:18,fill:"#51636B"}),Jt(Ef,{children:e.share_count})]})]})]})})},WD=u7e;import{useTheme as b7e}from"@mui/material/styles";import{useCallback as eF,useState as v7e}from"react";import{useCallback as JD,useState as S7e}from"react";import{useCallback as x7e,useState as h7e}from"react";import{debounce as d7e}from"lodash";import{useEffect as jD,useMemo as p7e,useState as m7e}from"react";import{styled as qD}from"@mui/material";var GD=qD(Ru)(({style:e,theme:t})=>({fontFamily:t.typography.fontFamily,width:"100%","@media (max-width: 590px)":{marginLeft:"0.25rem",paddingLeft:"0.25rem"},display:"flex",backgroundColor:t.palette.mode==="light"?t.palette.common.white:t.palette.background.surfaces,...e})),zD=qD(gd)(({theme:e})=>({borderLeft:`1px solid ${e.palette.background.tertiary}`,height:"30px",paddingLeft:"10px"}));import{jsx as W2}from"react/jsx-runtime";function c7e({onChange:e,value:t="",label:r,sx:o,placeholder:a,endAdornment:n,debounceTime:i=300}){let l=te(),[s,u]=m7e(t);jD(()=>{t!==s&&u(t)},[t]);let f=m=>({target:{value:m},persist:()=>{}}),d=p7e(()=>d7e(m=>{e?.(f(m))},i),[e,i]);return jD(()=>{if(e)return s===""?e(f(s)):d(s),()=>{d.cancel()}},[s,e,d]),W2(GD,{type:"search",label:r,fullWidth:!0,value:s,onChange:m=>{let x=m.target.value;u(x)},sx:o,placeholder:a??"Search",startAdornment:W2(gd,{position:"start",children:W2(zd,{fill:l.palette.background.neutral?.default})}),endAdornment:W2(zD,{position:"end",children:n})})}var q2=c7e;import{styled as zn}from"@mui/material/styles";var KD=zn(K)(({styleProps:e})=>({padding:"1rem",borderRadius:"1rem",width:"100%",gap:"0.5rem",boxShadow:"0px 2px 10px rgba(0, 0, 0, 0.2)",display:"flex",flexDirection:"column",height:"fit-content",backgroundColor:e.backgroundColor,"@media (max-width:900px)":{display:"none"},fontFamily:e.fontFamily,"&::-webkit-scrollbar":{width:"6px"}})),$D=zn("div")(()=>({display:"none","@media (max-width:899px)":{display:"block"}})),CSt=zn("div")(()=>({display:"flex",justifyContent:"space-around",alignItems:"center"})),YD=zn(Ae)(({theme:e})=>({backgroundColor:e.palette.primary.brand?.default,"&:hover":{backgroundColor:e.palette.background.default},height:"3.75rem","@media (max-width:450px)":{minWidth:"0px"}})),ZD=zn(K)(({theme:e})=>({display:"flex",justifyContent:"space-between",alignItems:"center",padding:"0.5rem 1rem",background:e.palette.mode==="light"?Tn.header:gn.header,height:"10vh"})),ySt=zn(ki)(({theme:e})=>({padding:"0.25rem 2rem",borderBottom:"1px solid",borderBottomColor:e.palette.text.disabled})),QD=zn(ki)(({theme:e})=>({backgroundColor:e.palette.background.surfaces,borderRadius:"0.5rem",marginTop:2,display:"flex",justifyContent:"space-between"})),XD=zn("p")(({theme:e})=>({color:e.palette.text.tertiary})),bSt=zn("span")(()=>({marginLeft:"0.5rem",display:"block","@media (max-width: 853px)":{display:"none"}}));import{Fragment as T7e,jsx as wa,jsxs as Es}from"react/jsx-runtime";var g7e=({filterKey:e,sectionDisplayName:t,options:r=[],filters:o,openSections:a,onCheckboxChange:n,onSectionToggle:i,styleProps:l,customComponent:s})=>{let[u,f]=h7e(""),d=x7e(x=>{f(x.target.value)},[]),p=r.length>10,m=u&&r.length?r.filter(x=>x.label.toLowerCase().includes(u.toLowerCase())):r;return Es(T7e,{children:[Es(QD,{onClick:()=>i(e),style:{backgroundColor:l.sectionTitleBackgroundColor},children:[wa(G,{sx:{fontSize:"1rem"},fontWeight:"bold",fontFamily:l.fontFamily,children:(t||e).toUpperCase()}),a[e]?wa(Vi,{}):wa(So,{})]}),wa(oa,{in:a[e],timeout:"auto",unmountOnExit:!0,children:s?wa(s,{}):Es(Hr,{component:"div",sx:{overflowY:"auto",maxHeight:"25rem",backgroundColor:l.backgroundColor,"&::-webkit-scrollbar":{width:"6px"}},children:[p&&wa(K,{sx:{px:"0.5rem",mb:"0.5rem"},children:wa(q2,{value:u,onChange:d,placeholder:"Search",endAdornment:Es(XD,{children:["Total : ",m.length??0]})})}),m.map((x,h)=>Es(yd,{direction:"row",alignItems:"center",px:"0.5rem",justifyContent:"space-between",children:[Es(yd,{direction:"row",alignItems:"center",gap:"0.35rem",children:[wa(Br,{id:`checkbox-${x.label}`,checked:Array.isArray(o[e])?o[e].includes(x.value):o[e]===x.value,onChange:g=>n&&n(e,x.value,g.target.checked),value:x.value}),x.Icon&&wa(x.Icon,{width:"20px",height:"20px"}),wa(G,{fontFamily:l.fontFamily,children:x.label})]}),Es(yd,{direction:"row",alignItems:"center",gap:"0.35rem",children:[x.totalCount!==void 0&&`(${x.totalCount||0})`,x.description&&wa(tl,{variant:"standard",helpText:x.description})]})]},`${x.value}-${h}`))]})})]})},e7=g7e;import{Fragment as y7e,jsx as t7}from"react/jsx-runtime";var C7e=({lists:e,onApplyFilters:t,value:r,styleProps:o})=>{let[a,n]=S7e(()=>{let s={};return e.forEach(u=>{s[u.filterKey]=!!u.defaultOpen}),s}),i=JD(s=>{n(u=>({...u,[s]:!u[s]}))},[]),l=JD((s,u,f)=>{t(d=>{let p={...d};if(e.find(x=>x.filterKey===s)?.isMultiSelect!==!1){let x=p[s];Array.isArray(x)||(x=x?[x]:[]),p[s]=f?[...x,u]:x.filter(h=>h!==u)}else p[s]=f?u:"";return p})},[e,t]);return t7(y7e,{children:e.map(s=>s.customComponent?t7(e7,{filterKey:s.filterKey,filters:r,sectionDisplayName:s.sectionDisplayName,onSectionToggle:i,styleProps:o,openSections:a,customComponent:s.customComponent},s.filterKey):t7(e7,{filterKey:s.filterKey,sectionDisplayName:s.sectionDisplayName,options:s.options,filters:r,openSections:a,onCheckboxChange:l,onSectionToggle:i,styleProps:o},s.filterKey))})},r7=C7e;import{Fragment as E7e,jsx as jo,jsxs as G2}from"react/jsx-runtime";var w7e=({lists:e,setData:t,value:r={},styleProps:o})=>{let a=b7e(),[n,i]=v7e(!1),l=eF(()=>{i(!0)},[]),s=eF(()=>{i(!1)},[]),f={...{backgroundColor:a.palette.mode==="light"?a.palette.background.default:a.palette.background.secondary,sectionTitleBackgroundColor:a.palette.mode==="light"?a.palette.background.surfaces:Yl.main,fontFamily:a.typography.fontFamily},...o};return G2(E7e,{children:[jo(KD,{styleProps:f,children:jo(r7,{lists:e,onApplyFilters:t,value:r,styleProps:f})}),G2($D,{children:[jo(ce,{title:"Filters",placement:"bottom",children:jo(YD,{variant:"contained",onClick:l,children:jo(RO,{style:{height:"28px",width:"28px"},fill:a.palette.text.default})})}),jo($3,{anchor:"bottom",open:n,variant:"temporary",onClose:s,style:{zIndex:"1399"},children:G2(K,{sx:{overflowY:"hidden",height:"90vh"},children:[G2(ZD,{children:[jo(G,{variant:"h6",sx:{color:a.palette.text.constant?.white},component:"div",children:"Filters"}),jo(pf,{onClick:s,children:jo(Ct,{height:"32px",width:"32px"})})]}),jo(K,{style:{height:"75vh",overflowY:"auto",background:a.palette.background.surfaces,padding:"0 16px"},children:jo(r7,{lists:e,onApplyFilters:t,value:r,styleProps:f})}),jo(K,{sx:{background:a.palette.mode==="light"?Tn.fotter:gn.fotter,height:"5vh"}})]})})]})]})},tF=w7e;import{jsx as z2,jsxs as O7e}from"react/jsx-runtime";function R7e({open:e,content:t,title:r,actions:o,onClose:a}){return O7e(aa,{open:e,onClose:a,children:[z2(h2,{children:r}),z2(Hl,{children:z2(Vl,{children:t})}),z2(hd,{children:o})]})}var rF=R7e;import{Autocomplete as A7e,Grid2 as o7}from"@mui/material";import P7e,{useCallback as a7,useEffect as _7e,useState as j2}from"react";import{jsx as sr,jsxs as n7}from"react/jsx-runtime";import{createElement as k7e}from"react";var I7e=({data:e,label:t,fetchSuggestions:r,setFilterData:o,isLoading:a,type:n,disabled:i,selectedData:l,searchValue:s,setSearchValue:u,iconComponent:f=sr(hx,{...qu})})=>{let[d,p]=j2(""),[m,x]=j2(!1),[h,g]=j2(!1),[T,w]=j2(l);_7e(()=>{w(l)},[l]);let E=a7(C=>{let b=T.filter(A=>A.id!==C);w(b),o(b)},[T,o]),I=a7((C,b)=>{if(!b)return;if(T.some(P=>P.id===b.id)){p(`${n} already selected`);return}let B=[...T,b];w(B),o(B),p(""),u(""),x(!1)},[T,o,n,u]),D=a7((C,b)=>{u(b),b===""?x(!1):(r(b),p(""),x(!0))},[r,u]);return n7(K,{sx:{width:"100%"},children:[sr(A7e,{id:`${n}-search-field`,style:{width:"100%"},options:e,getOptionLabel:()=>s,isOptionEqualToValue:(C,b)=>C.id===b.id,noOptionsText:a?"Loading...":`No ${n} found`,loading:a,open:m,onClose:()=>x(!1),disabled:i,value:void 0,inputValue:s,onChange:I,onInputChange:D,filterOptions:C=>C,disableClearable:!0,includeInputInList:!0,filterSelectedOptions:!0,disableListWrap:!0,clearOnBlur:!0,popupIcon:null,blurOnSelect:!0,forcePopupIcon:!1,renderInput:C=>sr(Vr,{...C,label:t||`Add ${n}`,error:!!d,helperText:d,fullWidth:!0,InputLabelProps:{style:{fontFamily:"inherit"}},InputProps:{...C.InputProps,endAdornment:sr(P7e.Fragment,{children:a?sr(Lt,{color:"inherit",size:20}):null})}}),renderOption:(C,b)=>k7e("li",{...C,key:b.id},sr(K,{component:"li",sx:{"& > img":{mr:2,flexShrink:0}},children:n7(o7,{container:!0,alignItems:"center",children:[sr(o7,{children:sr(K,{sx:{color:"text.secondary",mr:2},children:f})}),sr(o7,{size:"grow",children:sr(G,{variant:"body2",children:b.name})})]})}))}),n7(K,{sx:{display:"flex",flexWrap:"wrap",gap:.5,mt:T?.length>0?"0.5rem":""},children:[!h&&T?.length>0&&sr(St,{avatar:f,label:T[T.length-1]?.name,size:"small",onDelete:()=>E(T[T.length-1]?.id),deleteIcon:sr(Gt,{title:`Remove ${n}`,children:sr(Ct,{style:qr})})},T[T.length-1]?.id),h&&T?.map(C=>sr(St,{avatar:sr(hx,{...qr}),label:C.name,size:"small",onDelete:()=>E(C.id),deleteIcon:sr(Gt,{title:`Remove ${n}`,children:sr(Ct,{style:qr})})},C.id)),T?.length>1&&sr(G,{onClick:()=>g(!h),sx:{cursor:"pointer"},children:h?"(hide)":`(+${T?.length-1})`})]})]})},oF=I7e;import{styled as K2}from"@mui/material";var aF=K2("div")(({theme:e})=>({padding:"2.5rem",margin:"2rem 0",backgroundColor:e.palette.grey.A400,display:"flex",border:`1px solid ${e.palette.common.black}`,justifyContent:"space-between",transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)","&:hover":{transition:"background 150ms ease-out 0s, border 150ms ease-out 0s, transform 150ms ease-out 0s",transform:"translate3d(0px, -1px, 0px)",boxShadow:`${e.palette.common.black} 0px 8px 16px 0px`},"@media screen and (max-width: 992px)":{padding:"1.5rem"},"@media screen and (max-width: 500px)":{padding:"0.75rem"}})),nF=K2("div")({display:"inline-flex"}),iF=K2("div")(({theme:e})=>({fontSize:"2rem",margin:"0 2rem 0 1rem",color:e.palette.grey[800],alignSelf:"center",transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"})),lF=K2("div")(({theme:e})=>({h2:{margin:"0.25rem 0"},p:{margin:"0.35rem 0",color:e.palette.grey[800],transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"}}));import{jsx as $2,jsxs as sF}from"react/jsx-runtime";var M7e=({chapterNum:e,chapter:t})=>$2(aF,{id:t.frontmatter.courseTitle?t.frontmatter.courseTitle:void 0,children:sF(nF,{children:[$2(iF,{children:e}),sF(lF,{children:[$2("h2",{children:t.frontmatter.chapterTitle?t.frontmatter.chapterTitle:t.frontmatter.courseTitle}),$2("p",{children:t.frontmatter.description})]})]})}),uF=M7e;import{useMediaQuery as L7e,useTheme as D7e}from"@mui/material";import F7e,{useState as N7e}from"react";import{styled as Of}from"@mui/material/styles";var OCt=Of("div")(({theme:e})=>({marginLeft:".5rem",color:e.palette.background.secondary})),fF=Of(Sd)({overflowY:"auto",scrollbarWidth:"none","&::-webkit-scrollbar":{width:"0em"}}),dF=Of(Tr)(()=>({pointerEvents:"auto",margin:"0.5rem 0rem 0.5rem 0rem",fontSize:"0.1rem",padding:"0"})),pF=Of(Tr)(()=>({pointerEvents:"auto",margin:"0rem 0rem 0rem 0.5rem",fontSize:"0.1rem"})),mF=Of("div")({marginRight:"0.75rem",marginLeft:"0.5rem"}),cF=Of("div")({marginRight:"0.5rem"});import{jsx as Ea,jsxs as Y2}from"react/jsx-runtime";var B7e=({navigationItems:e,MenuListProps:t={},ListItemTextProps:r={}})=>{let o=D7e(),a=L7e(o.breakpoints.up("sm")),[n,i]=N7e(null),l=(s,u)=>{u.stopPropagation(),i(f=>f===s?null:s)};return Ea(fF,{...t,dense:!0,children:e.map(s=>{let u=n===s.id,f=s.permission??!0,d=s.addDivider??!1;return!(s.showOnWeb??!0)&&a?null:Y2(F7e.Fragment,{children:[Y2(mt,{disabled:!f,onClick:s.onClick,"data-testid":`nav-item-${s.id}`,children:[Y2(dF,{children:[s.icon&&Ea(mF,{children:s.icon}),Ea(qt,{primary:s.title,...r})]}),s.subItems&&Ea(qt,{"data-testid":`nav-toggle-${s.id}`,children:u?Ea(Vi,{onClick:m=>l(s.id,m)}):Ea(So,{onClick:m=>l(s.id,m)})})]}),s.subItems&&Ea(oa,{in:u,timeout:"auto",unmountOnExit:!0,variant:"submenu",children:s.subItems.map(m=>Ea(mt,{disabled:!m.permission,onClick:m.onClick,"data-testid":`nav-subitem-${m.id}`,children:Y2(pF,{children:[m.icon&&Ea(cF,{children:m.icon}),Ea(qt,{primary:m.title,...r})]})},m.id))}),d&&Ea(na,{})]},s.id)})})},xF=B7e;import{styled as l7}from"@mui/material";import{jsx as i7,jsxs as q7e}from"react/jsx-runtime";var H7e=l7("div")(({type:e,theme:t})=>({fontWeight:500,background:"#212529",color:"inherit",marginTop:"2rem",width:"100%",height:"100%",marginBottom:"2rem",padding:"0.5rem 1rem",borderRadius:0,borderStyle:"solid",borderColor:e==="warning"?t.palette.text.warning:t.palette.background.brand?.default,borderWidth:"0 0 0 4px"})),V7e=l7("h4")(({type:e,theme:t})=>({color:e==="warning"?t.palette.text.warning:t.palette.background.brand?.default,fontSize:"1.35rem"})),U7e=l7("p")(({theme:e})=>({color:e.palette.text.inverse})),W7e=({type:e="note",title:t,content:r})=>q7e(H7e,{type:e,children:[i7(V7e,{type:e,children:t}),i7(U7e,{children:i7(l2,{content:r})})]}),hF=W7e;import{Resizable as j7e}from"re-resizable";import K7e from"react-draggable";import{jsx as Xp,jsxs as z7e}from"react/jsx-runtime";var G7e=({height:e=24,width:t=24,fill:r="#E8EFF3",...o})=>z7e("svg",{width:t,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...o,children:[Xp("g",{clipPath:"url(#clip0_34897_172744)",children:Xp("path",{d:"M6 10C4.9 10 4 10.9 4 12C4 13.1 4.9 14 6 14C7.1 14 8 13.1 8 12C8 10.9 7.1 10 6 10ZM18 10C16.9 10 16 10.9 16 12C16 13.1 16.9 14 18 14C19.1 14 20 13.1 20 12C20 10.9 19.1 10 18 10ZM12 10C10.9 10 10 10.9 10 12C10 13.1 10.9 14 12 14C13.1 14 14 13.1 14 12C14 10.9 13.1 10 12 10Z",fill:r})}),Xp("defs",{children:Xp("clipPath",{id:"clip0_34897_172744",children:Xp("rect",{width:"24",height:"24",fill:"white"})})})]}),s7=G7e;var tyt=L(Tr)(({theme:e})=>({padding:e.spacing(.5,.5),marginBlock:e.spacing(1),"& .MuiListItemText-primary":{fontSize:"1rem",textTransform:"capitalize",fontWeight:700},cursor:"pointer","&:hover":{backgroundColor:e.palette.action.hover},"& .MuiSvgIcon-root":{opacity:0,transition:"opacity 0.2s"},"&:hover .MuiSvgIcon-root":{opacity:1}})),ryt=L(Tr,{shouldForwardProp:e=>e!=="isVisible"})(({theme:e,isVisible:t})=>({padding:e.spacing(.05,.5),fontStyle:t?"normal":"italic",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap","& .MuiSvgIcon-root":{height:20,width:20},"& .MuiListItemIcon-root":{minWidth:0,opacity:t?.8:.3},"& .MuiTypography-root":{fontSize:"0.9rem",opacity:t?1:.5}})),gF=L("div")(({theme:e})=>({display:"flex",alignItems:"center",padding:e.spacing(4,2),alignContent:"stretch",justifyContent:"space-between",cursor:"move",background:e.palette.mode==="light"?"linear-gradient(90deg, #3B687B 0%, #507D90 100%)":"linear-gradient(90deg, #28353A 0%, #3D4F57 100%)",height:"3rem",flexShrink:0})),TF=L(K)(({theme:e})=>({padding:e.spacing(2),backgroundColor:e.palette.background.surfaces,overflow:"auto",flex:1,minHeight:0})),SF=L("div")({height:"100%",display:"flex",flexDirection:"column",minHeight:"3rem"}),CF=L(K)(({theme:e,intitialPosition:t})=>({borderRadius:"8px",overflow:"hidden",flexShrink:0,zIndex:100,position:"absolute",backgroundColor:e.palette.background.blur?.light,boxShadow:`0 4px 16px ${e.palette.background.blur?.light}`,maxHeight:"80%",display:"flex",boxSizing:"border-box",...t})),yF=L(s7)(({theme:e})=>({fill:e.palette.common.white,position:"absolute",top:"-0.3rem",left:"50%"})),bF=L("div")({display:"flex",gap:"1rem",justifyContent:"flex-end",alignItems:"center"}),vF=L("div")({display:"flex",justifyContent:"end",alignItems:"center",flex:"1"}),Z2=L(rt)(({theme:e})=>({color:e.palette.common.white})),wF=L("div")(()=>({position:"absolute",left:"0",right:"0",marginInline:"auto",width:"fit-content"}));import{jsx as er,jsxs as u7}from"react/jsx-runtime";var $7e=({isOpen:e,id:t="panel",children:r,areAllExpanded:o,toggleExpandAll:a,handleClose:n,defaultSize:i,intitialPosition:l,sx:s,minimizePanel:u,title:f=""})=>{let d=te();return e?er(K7e,{handle:".drag-handle",children:er(CF,{intitialPosition:l,sx:s,children:er(j7e,{defaultSize:{width:i?.width||"18rem",height:i?.height||"auto"},onResize:()=>{window.dispatchEvent(new Event("panel-resize"))},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},children:er(SF,{children:u7(zr,{children:[er("div",{className:"drag-handle",children:u7(gF,{children:[er(K,{display:"flex",justifyContent:"flex-end",padding:"8px",children:a&&er(Gt,{title:o?"Collapse All":"Expand All",children:er(Z2,{onClick:a,children:o?er(b4,{}):er(O4,{})})})}),er(yF,{}),u7(vF,{children:[er(bF,{id:`${t}-panel-header-actions-container`}),er(wF,{children:f}),u&&er(Z2,{onClick:u,children:er(Pd,{fill:d.palette.common.white})}),er(Z2,{onClick:n,children:er(Ct,{fill:d.palette.common.white})})]})]})}),er(TF,{className:"panel-body",children:r})]})})})})}):null},EF=({...e})=>er($7e,{...e});import{memo as WF,useMemo as Z7e}from"react";var Syt=L(K)(()=>({padding:"1rem",borderRadius:"1rem",backgroundColor:"white",width:"100%",alignSelf:"center",height:"20rem",marginBottom:"1rem",boxShadow:"0px 2px 10px rgba(0, 0, 0, 0.2)",display:"block","@media (max-width:900px)":{height:"18rem",marginInline:"0",padding:"0.5rem"}})),Cyt=L("div")(()=>({width:"100%",justifyContent:"center",display:"flex",alignItems:"center",marginTop:"20px"})),yyt=L(K)(()=>({display:"flex",justifyContent:"space-evenly",gap:"2.5rem",width:"100%"})),byt=L(K)(()=>({display:"flex",flexWrap:"wrap",justifyContent:"space-evenly",gap:"2.5rem",width:"100%"})),vyt=L("div")(({theme:e})=>({backgroundColor:e.palette.common.white,textAlign:"center",borderRadius:"1rem",width:"100%",padding:"1.5rem",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"})),f7=L(K)(({theme:e})=>({background:e.palette.mode==="light"?e.palette.background.default:e.palette.background.secondary,paddingTop:e.spacing(2),borderRadius:"1rem",display:"flex",alignItems:"center",flexDirection:"column"})),RF=L(K)(({theme:e})=>({paddingInline:e.spacing(2),display:"flex",alignItems:"center",placeSelf:"flex-start",justifyContent:"space-between",width:"100%"})),OF=L(G)(({theme:e})=>({fontSize:"1.5rem",fontWeight:600,color:e.palette.text.default})),AF=L(gr)(({theme:e})=>({width:"200px",margin:"0.5rem",height:"100%",borderRadius:"1rem",position:"relative",overflow:"hidden",transition:"all 0.3s ease-in-out",background:f2(e.palette.mode==="light"),border:"1px solid transparent",boxShadow:"2px 2px 3px 2px rgb(0, 211, 169, 0.5)","&:hover":{transform:"translateY(-4px)",boxShadow:`2px 2px 3px 2px ${e.palette.text.brand}`,cursor:"pointer"}})),PF=L("div")(()=>({display:"flex",gap:"10px",flexWrap:"nowrap",justifyContent:"center",width:"100%"})),_F=L(K)(()=>({width:"2rem",height:"2rem",padding:"0.25rem",borderRadius:"8px",backgroundColor:"#D6FFF7",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.3s ease","& svg":{transition:"transform 0.3s ease"},"&:hover svg":{transform:"scale(1.2)"},"& .clone-icon":{width:"20px",height:"20px"}})),IF=L(Da)(()=>({height:"100%",display:"flex",flexDirection:"column",padding:"12px",paddingBottom:"0px !important"})),kF=L(K)({display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:"0.5rem",gap:"0.6rem"}),MF=L(G)(({theme:e})=>({fontSize:"0.85rem",fontWeight:"bold",color:e.palette.text.default,lineHeight:1.2,marginTop:"4px",textTransform:"uppercase",letterSpacing:"0.5px",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"clip",maxWidth:"70%",height:"2.4em"})),LF=L(G)(({theme:e})=>({fontSize:"24px",fontWeight:700,color:e.palette.icon.secondary,marginBottom:"0.5rem",lineHeight:1.2})),wyt=L(K)(({theme:e})=>({marginBottom:"1rem",padding:"8px",borderRadius:"8px",background:e.palette.mode==="light"?"#f8fafc":hn,color:e.palette.mode==="light"?"rgba(26, 26, 26, .8)":e.palette.text.default,transition:"background 0.3s ease, filter 0.3s ease","&:hover":{filter:"brightness(0.98)"}})),DF=L(G)(({theme:e})=>({fontSize:"0.9rem",fontWeight:1e3,color:e.palette.text.default,lineHeight:1.3,marginBottom:"4px",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis",minHeight:"fit-content",maxHeight:"2.6em"})),FF=L(G)({fontSize:"0.75rem",marginBottom:"8px"}),NF=L(K)(({theme:e})=>({display:"flex",gap:"15px",width:"100%",padding:"20px",background:e.palette.mode==="light"?e.palette.background.default:e.palette.background.secondary,borderRadius:"12px",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.05)",paddingBottom:e.spacing(3)})),BF=L(K)(({theme:e})=>({padding:"1rem",color:e.palette.text.error,fontSize:"1rem",fontWeight:500}));import{jsx as dl,jsxs as Y7e}from"react/jsx-runtime";var HF=({open:e,handleClick:t})=>{let r=te();return dl(ce,{title:e?"Hide Performers":"Show Performers",placement:"bottom",children:dl("span",{children:Y7e(Ae,{variant:"contained",onClick:t,sx:{height:"3.7rem",padding:"0.3rem 1rem 0.3rem 0.3rem"},style:{backgroundColor:e?void 0:r.palette.background.constant?.disabled},children:[dl(Xl,{style:{height:"2rem",width:"2rem",marginRight:"10px"}}),e?"Hide Performers":"Show Performers"]})})})},VF=({handleClick:e})=>dl(ce,{title:"Open Leaderboard",placement:"bottom",children:dl(Ae,{variant:"contained",onClick:e,sx:{height:"3.7rem",padding:"0.3rem",display:{xs:"inline-flex",sm:"none"}},children:dl(Xl,{style:{height:"2rem",width:"2rem"}})})}),UF=()=>dl(PF,{children:[...Array(5)].map((e,t)=>dl(X3,{variant:"rounded",height:"13.5rem",width:"inherit",sx:{minWidth:"150px"},style:{borderRadius:"1rem"}},t))});import{jsx as Er,jsxs as jn}from"react/jsx-runtime";var Q7e={pathType:"pattern",page:0,pagesize:1,metrics:!0,expandUser:!0,trim:!0},d7={view:{label:"Most Opens",id:"open",countKey:"view_count"},clone:{label:"Most Clones",id:"clone",countKey:"clone_count"},download:{label:"Most Downloads",id:"download",countKey:"download_count"},deployment:{label:"Most Deploys",id:"deployments",countKey:"deployment_count"},share:{label:"Most Shares",id:"share",countKey:"share_count"}},Jp=e=>({...Q7e,order:`${d7[e].countKey} desc`}),X7e=({label:e,countKey:t,count:r,patternName:o,pattern:a,userName:n,status:i,id:l,onCardClick:s,onIconClick:u})=>{let f=()=>{s(a)},d=(m,x)=>{m.stopPropagation(),u(x)},p=te();return Er(AF,{elevation:0,status:i,onClick:f,children:jn(IF,{cardId:l,children:[jn(kF,{children:[Er(MF,{children:e}),Er(_F,{onClick:m=>d(m,`${t}+desc`),children:Er(W4,{...Co,fill:p.palette.common.black})})]}),Er(LF,{children:r}),jn(K,{children:[Er(DF,{children:o}),jn(FF,{children:["by ",n]})]})]})})},tr=(e={})=>({search:e.search??"",order:e.order??"",pagesize:e.pagesize??0,page:e.page??0,...e}),qF=WF(X7e);qF.displayName="StatCard";var J7e=e=>{let t=e(tr(Jp("view"))),r=e(tr(Jp("clone"))),o=e(tr(Jp("download"))),a=e(tr(Jp("deployment"))),n=e(tr(Jp("share"))),i={view:t,clone:r,download:o,deployment:a,share:n};return{queries:i,isLoading:Object.values(i).some(l=>l.isLoading),hasError:Object.values(i).some(l=>l.isError)}},eSe=(e,t)=>{let r=e[t],o=d7[t],a=r?.isSuccess&&r.data?.patterns?.[0];return a?{label:o.label,countKey:o.countKey,count:a[o.countKey],patternName:a.name||"Unknown",pattern:a,userName:a.user?.first_name||"Unknown",id:o.id,status:a?.catalog_data?.content_class}:null},tSe=({useGetCatalogFilters:e,onCardClick:t,onIconClick:r,onOpenLeaderboard:o})=>{let a=te(),{queries:n,isLoading:i,hasError:l}=J7e(e),s=SE(a.breakpoints.down("sm")),u=Z7e(()=>Object.keys(d7).map(d=>eSe(n,d)).filter(d=>!!d),[n]);if(l)return Er(f7,{children:Er(BF,{children:"Error loading statistics. Please try again later."})});let f=u.map((d,p)=>Er(qF,{...d,onCardClick:t,onIconClick:r},`${d.id}-${p}`));return Er(zr,{children:jn(f7,{children:[jn(RF,{children:[jn(K,{display:"flex",alignItems:"center",gap:1,children:[Er(OF,{children:"Top Performers"}),Er(Xl,{style:{height:"2rem",width:"2rem",color:a.palette.icon.secondary,display:s?"none":"inline-flex"}})]}),o&&Er("div",{children:jn(Ae,{variant:"contained",onClick:()=>o(),children:[Er(Xl,{style:{height:"2rem",width:"2rem",display:s?"inline-flex":"none"}}),Er("p",{style:{margin:0,display:s?"none":"inline-flex"},children:"Open Leaderboard"})]})})]}),jn(NF,{children:[i&&Er(UF,{}),Er(Wu,{items:f})]})]})})},GF=WF(tSe);import{styled as Kn}from"@mui/material";var zF=Kn("div")({padding:"1rem 0","& h2":{margin:"1rem 0"},".get-started-desc":{margin:"1rem"}}),jF=Kn("div")(({theme:e})=>({display:"flex",cursor:"pointer",flexDirection:"row",flexWrap:"wrap","& a":{color:e.palette.text.primary,margin:"1rem"}})),KF=Kn("a")(({theme:e})=>({flex:"1",padding:"2rem",textDecoration:"none",background:e.palette.mode==="light"?"#EEEEEE":"#212121",minHeight:"21.5rem",transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)",borderRadius:"10px","&:hover":{boxShadow:`${e.palette.background.brand?.default} 0px 0px 7px`},"& a":{margin:"0 !important","&:hover":{color:e.palette.background.brand?.default}}})),$F=Kn("div")({display:"flex",alignItems:"center",gap:"1rem"}),$yt=Kn("div")({flex:"0 0 25%",alignSelf:"center",margin:"0 0.5rem"}),Yyt=Kn("img")({height:"3rem",width:"3rem",maxWidth:"3rem",margin:"auto"}),Zyt=Kn("svg")(({theme:e})=>({fontSize:"4.15rem",alignSelf:"center",flex:"0 0 25%",margin:"0 0.5rem",filter:e.palette.mode==="light"?"0%":"invert(100%)",transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"})),Qyt=Kn("h2")({fontSize:"1.75rem",margin:"1rem 0"}),Xyt=Kn("p")(({theme:e})=>({color:e.palette.text.primary,transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"}));import{jsx as Af,jsxs as Q2}from"react/jsx-runtime";var rSe=({Steps:e,PrerequisiteLine:t})=>Q2(zF,{children:[Q2("div",{className:"get-started-desc",id:"pre-requisites",children:[Af("h2",{children:"Prerequisites"}),Af("p",{children:t})]}),Af(jF,{id:"Set up",children:e.map((r,o)=>Q2(KF,{href:r.url,target:"_blank",children:[Q2($F,{children:[Af("h2",{children:r.heading}),typeof r.Icon=="string"?Af("img",{src:r.Icon,alt:r.heading,width:"40px",height:"40px"}):r.Icon]}),Af("p",{children:r.description})]},o))})]}),YF=rSe;import{styled as oSe}from"@mui/material";var aSe=oSe("div")(({theme:e})=>({color:e.palette.text.primary,transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)",".chapter-sub-heading, .chapter-sub-heading a":{color:e.palette.mode==="light"?l4:s4,transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"},".chapter-alt-heading, .chapter-alt-heading a":{color:"gray"},"& a":{color:e.palette.background.brand?.default,textDecoration:"underline","&:hover":{color:e.palette.background.brand?.default}},"& p > code":{color:"inherit",padding:".2em .4em",margin:"0",fontSize:"85%",wordBreak:"normal",backgroundColor:e.palette.background.code,borderRadius:".25rem"},"& pre":{backgroundColor:"#011627",padding:"1em",borderRadius:"0.5rem",overflowX:"auto",color:"#d6deeb",position:"relative",textAlign:"left",width:"100%",margin:"1rem auto autocompleteClasses",fontFamily:"Courier New, Courier, monospace"},"& li code":{color:"inherit",padding:".2em .4em",margin:"0",fontSize:"85%",wordBreak:"normal",backgroundColor:e.palette.background.code,borderRadius:".25rem"},"& li a":{color:e.palette.text.default,textDecoration:"underline","&:hover":{color:e.palette.background.brand?.default}}})),ZF=aSe;import{Fragment as oN}from"react";import{styled as Rs}from"@mui/material";var QF=Rs("div")({width:"52rem",maxWidth:"90%"}),XF=Rs("div")({display:"flex",alignItems:"center",background:"#323339",width:"100%",height:"2.875rem",borderRadius:"2px 2px 0 0"}),dbt=Rs("div")({color:"#76767d",fontFamily:"'Courier New', Courier, monospace",fontSize:"13.5px",margin:"0 auto"}),JF=Rs("ul")({position:"absolute",display:"block",listStyle:"none",marginLeft:"1rem",marginTop:"0",marginBottom:"0",padding:"0","& li":{display:"inline-block",width:"0.875rem",height:"0.875rem",background:"#1d1e23",borderRadius:"0.75rem",marginRight:"7px"}}),eN=Rs("div")({width:"100%",height:"100%",background:"#1d1e23",borderRadius:"0 0 2px 2px",padding:"24px 32px"}),tN=Rs("div")({width:"100%",height:"100%",position:"relative",overflow:"scroll",msOverflowStyle:"none",scrollbarWidth:"none","&::-webkit-scrollbar":{WebkitAppearance:"none",width:"0",height:"0"},"&.no-scroll-overflow-wrapper":{"& .code-wrapper":{bottom:"0",position:"absolute",minHeight:"100%"}}}),rN=Rs("div")(({theme:e})=>({"& pre":{padding:"0",margin:"0",width:"100%",height:"100%",fontStyle:"normal",fontWeight:"normal",fontSize:"12px",lineHeight:"27px",whiteSpace:"pre-wrap",color:e.palette.info.main,"&.short":{lineHeight:"16px"},"&.navy":{color:"#66a2ff"},"&.gray":{color:"#bdbec2"},"&.white":{color:"#fff"},wrapWord:"normal",[e.breakpoints.up("sm")]:{fontSize:"13.5px",lineHeight:"26px"}}}));import{jsx as $n,jsxs as X2}from"react/jsx-runtime";var nSe=({lines:e,title:t,noScroll:r})=>X2(QF,{children:[X2(XF,{children:[X2(JF,{children:[$n("li",{style:{backgroundColor:"red"}}),$n("li",{style:{backgroundColor:"yellow"}}),$n("li",{style:{backgroundColor:"green"}})]}),t&&$n("div",{className:"title",children:t})]}),$n(eN,{children:$n(tN,{className:r?"no-scroll-overflow-wrapper":"",children:$n(rN,{children:e&&e.map((o,a)=>$n(oN,{children:X2("pre",{className:`${o.short?"short":""}`,style:{color:o.color?o.color:"blue"},children:[o.indent&&new Array(o.indent*2).fill({}).map((n,i)=>$n(oN,{children:"\xA0"},i)),o.code]})},a))})})})]}),aN=nSe;import{styled as iSe}from"@mui/material";var nN=iSe("div")(({theme:e})=>({".chapter-back":{display:"flex",justifyContent:"space-between",alignItems:"center","& a":{display:"inline-flex","& svg":{alignSelf:"center",fontSize:"1.5rem",color:e.palette.grey[600],width:"100%",maxWidth:"1.5rem"},"& h4":{fontWeight:500,textTransform:"capitalize",fontSize:"1.25rem"},"&:hover":{"& svg, & h4":{color:e.palette.text.primary}}},".toc-toggle-btn":{display:"none"},".toc-menu-icon":{width:"1.5rem",height:"1.5rem",cursor:"pointer",fill:e.palette.secondary.main,transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"}},".toc-list":{"& ul":{position:"relative",paddingInlineStart:"2.65rem",MozPaddingStart:"2.65rem","&::after":{position:"absolute",inset:"1rem auto 1rem 1.7rem",width:"auto",height:"auto",borderLeft:"1px solid rgba(177, 182, 184, 0.25)",content:'""',zIndex:0},"& li":{width:"fit-content",margin:"1rem 0","&::marker":{color:"rgba(177, 182, 184, 0.75)"},"& p":{margin:0,fontSize:"1rem","& a":{color:e.palette.mode==="light"?"rgb(0 0 0 / 0.65)":"rgb(255 255 255 / 0.65)",transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"}},"&:hover":{"&::marker, & p, & a":{color:e.palette.background.brand?.default}}},".active-link":{"&::marker, & p, & a":{color:e.palette.background.brand?.default}}}}}));import{jsx as J2,jsxs as sSe}from"react/jsx-runtime";var lSe=({availableChapters:e,currentChapter:t,onClick:r})=>{let o=a=>a.split("-").map(l=>l.charAt(0).toUpperCase()+l.slice(1)).join(" ");return J2(nN,{children:J2("div",{className:"toc-list",children:J2("ul",{className:"toc-ul toc-ul-open",children:e.map(a=>J2("li",{className:a+".mdx"===t?"active-link":"",onClick:n=>{r(a,n)},children:sSe("p",{className:"toc-item",children:[" ",o(a)]})},a))})})})},iN=lSe;import{useState as fSe}from"react";import{styled as uSe}from"@mui/material";var lN=uSe("div")(({theme:e})=>({position:"sticky",top:"10rem",left:0,marginLeft:"-3rem",".go-back":{margin:"1rem 0",display:"flex",justifyContent:"space-between",alignItems:"center","& a":{display:"inline-flex","& svg":{alignSelf:"center",fontSize:"1.5rem",color:e.palette.text.disabled,width:"100%",maxWidth:"1.5rem"},"& h4":{fontWeight:500,textTransform:"capitalize",fontSize:"1.25rem",whiteSpace:"nowrap"},"&:hover":{"& svg, & h4":{color:e.palette.text.primary}}}},".toc-toggle-btn":{display:"none"},".toc-ul-open":{display:"flex",flexDirection:"column",marginTop:"0rem",listStyle:"none",height:"auto !important",opacity:"1 !important",transition:"all .4s !important"},".toc-menu-icon":{width:"1.5rem",height:"1.5rem",cursor:"pointer",fill:e.palette.common.white},".toc-sub-heading":{marginTop:"1rem",fontWeight:500,fontSize:"1.15rem"},".toc-item":{lineHeight:"1.5rem"},".toc-list":{"& ul":{position:"relative",paddingInlineStart:"1.5rem",listStyleType:"none","& li":{margin:"1rem 0 1rem 0.5rem",width:"fit-content","&::marker":{color:"rgba(177, 182, 184, 0.75)"},"& p":{margin:0,fontSize:"1rem","& a":{color:"rgba(0, 0, 0, 0.65)"}},"&:hover":{"&::marker, & p, & a":{color:e.palette.secondary.contrastText}}},".active-link":{"&::marker, & p, & a":{color:e.palette.secondary.contrastText}}}},"@media only screen and (max-width: 991px)":{position:"initial",marginLeft:"-0.5rem",width:"auto",".toc-toggle-btn":{display:"flex"},".go-back":{marginLeft:0},".toc-ul":{opacity:0,height:0,transition:"none",paddingLeft:".8rem !important"},".toc-item":{lineHeight:".8rem"}}}));import{jsx as Dr,jsxs as e5}from"react/jsx-runtime";var dSe=[{name:"Set up",link:"/cloud-native-management/meshery"},{name:"Run Meshery",link:"/cloud-native-management/meshery/getting-started"},{name:"Manage Meshery",link:"/cloud-native-management/meshery/operating-service-meshes"}],pSe=({coursesData:e})=>{let[t,r]=fSe(!1);return e5(lN,{children:[e5("div",{className:"go-back",children:[e5("a",{href:"/learn/learning-paths",children:[Dr(y4,{}),Dr("h4",{children:"Learning Paths"})]}),Dr("div",{className:"toc-toggle-btn",children:t?Dr(Ct,{className:"toc-menu-icon",onClick:()=>{r(!t)}}):Dr(Ad,{className:"toc-menu-icon",onClick:()=>{r(!t)}})})]}),Dr("div",{className:"toc-list",children:e5("ul",{className:`toc-ul ${t?"toc-ul-open":""}`,children:[Dr("a",{href:"#pre-requisites",children:Dr("h5",{className:"toc-sub-heading",children:"Pre-requisites"})}),dSe.map((o,a)=>Dr("li",{children:Dr("p",{className:"toc-item",children:Dr("a",{href:`#${o.name}`,children:o.name})})},a)),Dr("a",{href:"#courses-list",children:Dr("h5",{className:"toc-sub-heading",children:"Courses"})}),e.map((o,a)=>Dr("li",{children:Dr("p",{className:"toc-item",children:Dr("a",{href:`#${o.frontmatter.courseTitle}`,children:o.frontmatter.courseTitle})})},a))]})})]})},sN=pSe;import{Button as mSe}from"@mui/material";import cSe from"@mui/material/Autocomplete";import uN from"@mui/material/CircularProgress";import{useState as t5}from"react";import{useDebounce as xSe}from"use-debounce";import{Fragment as p7,jsx as Rr,jsxs as e1}from"react/jsx-runtime";var hSe=({usersData:e,disabled:t=!1,shareWithNewUsers:r,useGetAllUsersQuery:o})=>{let[a,n]=t5(!1),[i,l]=t5(""),[s,u]=t5([]),[f,d]=t5(!1),p=te(),[m]=xSe(i,300),{data:x,isLoading:h}=o({search:m,page:0,pagesize:10},{skip:m.trim().length==0}),g=x?.data??[],T=async()=>{console.log("users to share with",s);try{d(!0);let b=await r(s);b.error?n(b.error):u([])}catch(b){console.log("error while sharing",b)}finally{d(!1)}},w=(b,A)=>{A&&(u(A),l(""))},E=(b,A,B)=>{B==="input"?l(A):B==="clear"&&l("")},I=g.filter(b=>!s.concat(e).find(A=>A.email===b.email)),D=t||f||s.length===0,C=({avatarObj:b,...A})=>Rr(St,{avatar:Rr(Mt,{alt:b.first_name,src:b.avatar_url,children:b.avatar_url?"":b.first_name?.charAt(0)}),label:b.email,size:"small",...A},b.user_id);return Rr(p7,{children:e1(K,{display:"flex",alignItems:"center",justifyContent:"space-between",gap:1,children:[Rr(cSe,{id:"user-search-field",sx:{width:"100%"},filterOptions:b=>b,options:I,renderTags:(b,A)=>b.map((B,P)=>Rr(C,{avatarObj:B,...A({index:P})})),disableClearable:!0,includeInputInList:!0,filterSelectedOptions:!0,multiple:!0,disableListWrap:!0,disabled:f,inputValue:i,loading:h,value:s,getOptionLabel:b=>b.email,noOptionsText:h?"Loading...":i==""?"Search using name or email":"No users found",onChange:w,onInputChange:E,isOptionEqualToValue:(b,A)=>b.email===A.email,renderInput:b=>Rr(Vr,{...b,placeholder:"Add Users",error:!!a,helperText:a,fullWidth:!0,label:"",disabled:D,sx:{"& .MuiOutlinedInput-root":{paddingInline:"0.5rem",paddingBlock:"0.1rem"}},InputProps:{...b.InputProps,endAdornment:Rr(p7,{children:h?Rr(uN,{color:"inherit",size:20}):null})}}),renderOption:(b,A)=>Rr(K,{component:"li",sx:{"& > img":{mr:2,flexShrink:0}},...b,children:e1(me,{container:!0,alignItems:"center",children:[Rr(me,{children:Rr(K,{sx:{color:"text.secondary",mr:2},children:Rr(Mt,{alt:A.first_name,src:A.avatar_url,children:A.avatar_url?"":Rr(bn,{})})})}),Rr(me,{size:"grow",children:A.deleted_at?.Valid?e1(G,{variant:"body2",color:"text.secondary",children:[A.email," (deleted)"]}):e1(p7,{children:[e1(G,{variant:"body2",children:[A.first_name," ",A.last_name]}),Rr(G,{variant:"body2",color:"text.secondary",children:A.email})]})})]})})}),Rr(mSe,{variant:"contained",sx:{"&.Mui-disabled":{color:`${p.palette.text.secondary} !important`,backgroundColor:`${p.palette.action.disabled} !important`}},onClick:T,disabled:D,children:f?Rr(uN,{size:24,sx:{color:"#fff"}}):"Share"})]})})},m7=hSe;import{Autocomplete as gSe}from"@mui/material";import TSe,{useCallback as c7,useEffect as SSe,useMemo as CSe,useState as Pf}from"react";import{Fragment as fN,jsx as wt,jsxs as Os}from"react/jsx-runtime";var ySe=({usersData:e,setUsersData:t,label:r="Add User",setDisableSave:o,handleNotifyPref:a,notifyUpdate:n,isCreate:i,searchType:l,disabled:s=!1,currentUserData:u,searchedUsers:f=[],isUserSearchLoading:d,fetchSearchedUsers:p,usersSearch:m,setUsersSearch:x})=>{let[h,g]=Pf(""),[T,w]=Pf(!1),[E,I]=Pf(!1),[D,C]=Pf(!0),[b,A]=Pf(""),[B,P]=Pf(e||[]);SSe(()=>{P(e||[])},[e]);let Q=CSe(()=>{if(D&&!m&&u)return[u];let N=f.filter(M=>M.user_id!==u?.user_id);return!m&&u?[u,...N]:N},[f,u,m,D,B]),Z=c7((N,M)=>{M.stopPropagation();let k=B.filter(F=>F.user_id!==N);P(k),t(k),o&&o(!1)},[B,t,o,p,b]),H=c7((N,M)=>{if(!M)return;let k=B.some(V=>V.user_id===M.user_id),F=M.deleted_at?.Valid===!0;if(k||F){g(k?"User already selected":"User does not exist");return}A(""),x(""),g(""),w(!1),P(V=>[...V,M]),t(V=>[...V,M]),o&&o(!1)},[B,t,o,x]),q=c7((N,M)=>{if(A(M),M==="")w(!0),x(""),C(!0);else{let k=encodeURIComponent(M);p(k),g(""),w(!0),C(!1)}},[p]);return Os(fN,{children:[wt(gSe,{id:"user-search-field",style:{width:"100%"},open:T,options:Q,getOptionLabel:()=>b,isOptionEqualToValue:(N,M)=>N.user_id===M.user_id,onOpen:()=>w(!0),onClose:()=>w(!1),inputValue:b,onChange:H,onInputChange:q,filterOptions:(N,{inputValue:M})=>N.filter(k=>{let F=M.toLowerCase();return k.first_name?.toLowerCase().includes(F)||k.last_name?.toLowerCase().includes(F)||k.email?.toLowerCase().includes(F)}),loading:d,disabled:s,disableClearable:!0,value:void 0,selectOnFocus:!1,blurOnSelect:!0,clearOnBlur:!0,popupIcon:null,forcePopupIcon:!1,noOptionsText:d?"Loading...":"No users found",renderInput:N=>wt(Vr,{...N,label:r,error:!!h,helperText:h,InputLabelProps:{style:{fontFamily:"inherit"}},InputProps:{...N.InputProps,endAdornment:wt(TSe.Fragment,{children:d?wt(Lt,{color:"inherit",size:20}):null})}}),renderOption:(N,M)=>wt("li",{...N,id:M.user_id,children:Os(K,{sx:{"& > img":{mr:2,flexShrink:0}},children:[" ",Os(me,{container:!0,alignItems:"center",children:[wt(me,{children:wt(K,{sx:{color:"text.secondary",mr:2},children:wt(Mt,{alt:M.first_name,src:M.avatar_url,children:M.avatar_url?"":wt(bn,{})})})}),wt(me,{size:"grow",children:M.deleted?Os(G,{variant:"body2",color:"text.secondary",children:[M.email," (deleted)"]}):Os(fN,{children:[Os(G,{variant:"body2",children:[M.first_name," ",M.last_name]}),wt(G,{variant:"body2",color:"text.secondary",children:M.email})]})})]})]})})}),!i&&wt(Y3,{row:!0,children:wt("div",{style:{display:"flex",flexWrap:"nowrap"},children:wt(Wl,{control:wt(Br,{checked:n,onChange:a,name:"notify",color:"primary"}),label:`Notify ${l} of membership change`})})}),Os(K,{sx:{display:"flex",flexWrap:"wrap",gap:.5,mt:e?.length>0?"0.5rem":""},children:[!E&&B?.[0]&&wt(St,{avatar:wt(Mt,{alt:B[0].first_name,src:B[0].avatar_url,children:!B[0].avatar_url&&B[0].first_name?.[0]}),label:B[0].email,onDelete:N=>Z(B[0].user_id,N),deleteIcon:wt(Gt,{title:"Remove user",children:wt(Ct,{style:qr})}),size:"small"},B[0].user_id),E&&B?.map(N=>wt(St,{avatar:wt(Mt,{alt:N.first_name,src:N.avatar_url,children:!N.avatar_url&&N.first_name?.[0]}),label:N.email,onDelete:M=>Z(N.user_id,M),deleteIcon:wt(Gt,{title:"Remove user",children:wt(Ct,{style:qr})}),size:"small"},N.user_id)),B?.length>1&&wt(G,{onClick:()=>I(!E),sx:{cursor:"pointer"},children:E?"(hide)":`(+${B.length-1})`})]})]})},dN=ySe;import{Box as ICe,Stack as FN,Step as kCe,StepConnector as MCe,StepLabel as LCe,Stepper as DCe}from"@mui/material";import{stepConnectorClasses as Lf}from"@mui/material/StepConnector";function _f(e,...t){let r=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(o=>r.searchParams.append("args[]",o)),`Minified MUI error #${e}; visit ${r} for the full message.`}import OSe from"@emotion/styled";function pN(e){for(var t=0,r,o=0,a=e.length;a>=4;++o,a-=4)r=e.charCodeAt(o)&255|(e.charCodeAt(++o)&255)<<8|(e.charCodeAt(++o)&255)<<16|(e.charCodeAt(++o)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(a){case 3:t^=(e.charCodeAt(o+2)&255)<<16;case 2:t^=(e.charCodeAt(o+1)&255)<<8;case 1:t^=e.charCodeAt(o)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var mN={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function cN(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var bSe=!1,vSe=/[A-Z]|^ms/g,wSe=/_EMO_([^_]+?)_([^]*?)_EMO_/g,TN=function(t){return t.charCodeAt(1)===45},xN=function(t){return t!=null&&typeof t!="boolean"},x7=cN(function(e){return TN(e)?e:e.replace(vSe,"-$&").toLowerCase()}),hN=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(wSe,function(o,a,n){return Xa={name:a,styles:n,next:Xa},a})}return mN[t]!==1&&!TN(t)&&typeof r=="number"&&r!==0?r+"px":r},ESe="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function t1(e,t,r){if(r==null)return"";var o=r;if(o.__emotion_styles!==void 0)return o;switch(typeof r){case"boolean":return"";case"object":{var a=r;if(a.anim===1)return Xa={name:a.name,styles:a.styles,next:Xa},a.name;var n=r;if(n.styles!==void 0){var i=n.next;if(i!==void 0)for(;i!==void 0;)Xa={name:i.name,styles:i.styles,next:Xa},i=i.next;var l=n.styles+";";return l}return RSe(e,t,r)}case"function":{if(e!==void 0){var s=Xa,u=r(e);return Xa=s,t1(e,t,u)}break}}var f=r;if(t==null)return f;var d=t[f];return d!==void 0?d:f}function RSe(e,t,r){var o="";if(Array.isArray(r))for(var a=0;a<r.length;a++)o+=t1(e,t,r[a])+";";else for(var n in r){var i=r[n];if(typeof i!="object"){var l=i;t!=null&&t[l]!==void 0?o+=n+"{"+t[l]+"}":xN(l)&&(o+=x7(n)+":"+hN(n,l)+";")}else{if(n==="NO_COMPONENT_SELECTOR"&&bSe)throw new Error(ESe);if(Array.isArray(i)&&typeof i[0]=="string"&&(t==null||t[i[0]]===void 0))for(var s=0;s<i.length;s++)xN(i[s])&&(o+=x7(n)+":"+hN(n,i[s])+";");else{var u=t1(e,t,i);switch(n){case"animation":case"animationName":{o+=x7(n)+":"+u+";";break}default:o+=n+"{"+u+"}"}}}}return o}var gN=/label:\s*([^\s;{]+)\s*(;|$)/g,Xa;function SN(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var o=!0,a="";Xa=void 0;var n=e[0];if(n==null||n.raw===void 0)o=!1,a+=t1(r,t,n);else{var i=n;a+=i[0]}for(var l=1;l<e.length;l++)if(a+=t1(r,t,e[l]),o){var s=n;a+=s[l]}gN.lastIndex=0;for(var u="",f;(f=gN.exec(a))!==null;)u+="-"+f[1];var d=pN(a)+u;return{name:d,styles:a,next:Xa}}import{ThemeContext as Tvt,keyframes as Svt,css as Cvt}from"@emotion/react";function h7(e,t){let r=OSe(e,t);return process.env.NODE_ENV!=="production"?(...o)=>{let a=typeof e=="string"?`"${e}"`:"component";return o.length===0?console.error([`MUI: Seems like you called \`styled(${a})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
|
|
92
|
+
`})),YL=Qa("a")({color:"black",textDecoration:"none"}),I2=Qa("div")(({theme:e})=>({borderTop:`5px solid ${e.palette.background.brand?.default}`,borderRadius:"0.25rem",minHeight:"16rem",display:"flex",flexDirection:"column",justifyContent:"space-between",boxShadow:"0px 0.75rem 1rem 0.25rem rgba(0, 0, 0, 0.12)",position:"relative",transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"})),ZL=Qa("div")(({theme:e})=>({background:e.palette.mode==="light"?u4:Zl,transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"})),k2=Qa("div")(({theme:e})=>({display:"flex",justifyContent:"space-between",padding:"1rem","& span":{border:`1px solid ${e.palette.primary.dark}`,color:e.palette.text.primary,borderRadius:"0.8rem",padding:"0.05rem 0.75rem",fontSize:"1rem",transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"},"& h3":{color:e.palette.text.primary,transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"}})),M2=Qa("div")(({theme:e})=>({padding:"0 1rem",".summary":{color:e.palette.grey[700],transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"},p:{fontSize:"1rem"}})),QL=Qa("div")(({theme:e})=>({padding:"0 1rem",position:"absolute",bottom:"0rem",p:{fontSize:"1rem",color:e.palette.text.primary,fontWeight:600,transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"}})),L2=Qa("div")({textAlign:"center",position:"absolute",bottom:"0.1rem",right:"0.75rem",opacity:.2,img:{height:"8.5rem",width:"8.5rem"}});import{Fragment as p6e,jsx as Fe,jsxs as vs}from"react/jsx-runtime";var f6e=({path:e,children:t,isExternal:r})=>e?Fe(YL,{href:e,target:r?"_blank":void 0,rel:r?"noopener noreferrer":void 0,children:t}):Fe(p6e,{children:t}),d6e=({tutorial:e,path:t,courseCount:r,courseType:o})=>{let a=o==="learning-card";return Fe(jL,{children:e.frontmatter.disabled==="yes"?Fe(ZL,{children:Fe(I2,{style:{borderTop:`5px solid ${e.frontmatter.themeColor}`},children:vs("div",{children:[vs(k2,{children:[Fe("h3",{children:e.frontmatter.title?e.frontmatter.title:e.frontmatter.courseTitle}),Fe("div",{style:{whiteSpace:"nowrap"},children:Fe("span",{children:"Coming Soon"})})]}),Fe(M2,{children:Fe("p",{className:"summary",children:e.frontmatter.description})}),Fe(L2,{children:Fe("img",{src:e.frontmatter.cardImage,alt:e.frontmatter.title})})]})})}):Fe(f6e,{path:t,isExternal:a,children:a?Fe($L,{children:Fe(I2,{style:{borderTop:`5px solid ${e.frontmatter.themeColor}`},children:vs("div",{children:[vs(k2,{children:[Fe("h3",{children:e.frontmatter.title?e.frontmatter.title:e.frontmatter.courseTitle}),a&&t&&Fe(L4,{width:"24px",height:"24px"}),e.frontmatter.status?Fe("p",{children:Fe("span",{children:"New"})}):null]}),Fe(M2,{children:Fe("p",{className:"summary",children:e.frontmatter.description})}),Fe(L2,{children:Fe("img",{src:e.frontmatter.cardImage})})]})})}):Fe(KL,{children:Fe(I2,{style:{borderTop:`5px solid ${e.frontmatter.themeColor}`},children:vs("div",{children:[vs(k2,{children:[Fe("h3",{children:e.frontmatter.title?e.frontmatter.title:e.frontmatter.courseTitle}),e.frontmatter.status?Fe("p",{children:Fe("span",{children:"New"})}):null]}),Fe(M2,{children:Fe("p",{className:"summary",children:e.frontmatter.description})}),!a&&Fe(QL,{className:"card-subdata",children:vs("p",{children:[r," ",o,r>1?"s":""]})}),Fe(L2,{children:Fe("img",{src:e.frontmatter.cardImage})})]})})})})})},XL=d6e;import{forwardRef as m6e,useImperativeHandle as c6e,useRef as x6e,useState as h6e}from"react";import{styled as JL}from"@mui/material";var eD=JL(Vl)(()=>({minWidth:400,overflowWrap:"anywhere",textAlign:"center",padding:"5px"})),tD=JL(K)(()=>({display:"flex",justifyContent:"end",width:"100%",gap:"10px"}));import{jsx as il,jsxs as D6}from"react/jsx-runtime";var D2={WARNING:"warning",DANGER:"error",SUCCESS:"success",INFO:"info"},rD=m6e(({variant:e},t)=>{let[r,o]=h6e({isOpen:!1,title:"",subtitle:"",primaryOption:"",showInfoIcon:"",variant:e,headerIcon:void 0,isChecked:!1,showCheckbox:!1}),a=x6e({resolve:()=>{},reject:()=>{}}),n=te(),i=w=>new Promise((E,I)=>{a.current={resolve:E,reject:I},o({...w,isOpen:!0,showInfoIcon:w.showInfoIcon||"",showCheckbox:!!w.showCheckbox})}),l=()=>{o(w=>({...w,isOpen:!1}))},s=()=>{o(w=>({...w,isChecked:!w.isChecked}))},u=()=>!!r.isChecked;c6e(t,()=>({show:i,getCheckboxState:u}));let{isOpen:f,primaryOption:d,title:p,subtitle:m,showInfoIcon:x,headerIcon:h,showCheckbox:g}=r,{resolve:T}=a.current;return D6(vr,{open:f,closeModal:l,title:p,id:"searchClick",headerIcon:h,reactNode:void 0,children:[m&&D6(br,{children:[il(eD,{id:"alert-dialog-description",variant:"body1",component:"div",children:il(G,{variant:"body1",component:"div",style:{color:n.palette.text.primary},children:m})}),g&&il(Wl,{control:il(Br,{checked:u(),onChange:s,color:"primary"}),label:il("span",{style:{fontSize:"1rem"},children:"Do not show again"})})]}),il(jr,{variant:"filled",helpText:x,children:D6(tD,{children:[il(Za,{onClick:()=>{l(),T("CANCEL")},children:"Cancel"}),il(Ya,{onClick:()=>{l(),T(d)},style:r.variant&&{backgroundColor:n.palette.background[r.variant]?.default,textTransform:"capitalize"},type:"submit",children:d})]})})]})});rD.displayName="PromptComponent";var F6=rD;var Sf=F6;import{outlinedInputClasses as oD}from"@mui/material/OutlinedInput";import{ThemeProvider as g6e,createTheme as T6e}from"@mui/material/styles";import S6e from"lodash/debounce";import aD,{useCallback as C6e}from"react";import{jsx as ws,jsxs as v6e}from"react/jsx-runtime";var y6e=e=>T6e({typography:{fontFamily:e.typography.fontFamily},components:{MuiTextField:{styleOverrides:{root:{"--TextField-brandBorderColor":e.palette.border.strong,"--TextField-brandBorderHoverColor":e.palette.background.graphics?.default,"--TextField-brandBorderFocusedColor":e.palette.background.graphics?.default,"& label.Mui-focused":{color:"var(--TextField-brandBorderFocusedColor)"}}}},MuiOutlinedInput:{styleOverrides:{notchedOutline:{borderColor:"var(--TextField-brandBorderColor)"},root:{[`&:hover .${oD.notchedOutline}`]:{borderColor:"var(--TextField-brandBorderHoverColor)"},[`&.Mui-focused .${oD.notchedOutline}`]:{borderColor:"var(--TextField-brandBorderFocusedColor)"}}}},MuiInput:{styleOverrides:{root:{color:e.palette.text.default,"&::before":{borderBottom:"2px solid var(--TextField-brandBorderColor)"},"&:hover:not(.Mui-disabled, .Mui-error):before":{borderBottom:"2px solid var(--TextField-brandBorderHoverColor)"},"&.Mui-focused:after":{borderBottom:"2px solid var(--TextField-brandBorderFocusedColor)"}}}},MuiButton:{styleOverrides:{root:{lineHeight:"auto"}}}}});function b6e({onSearch:e,placeholder:t,onClear:r,expanded:o,setExpanded:a}){let[n,i]=aD.useState(""),l=aD.useRef(null),s=te(),u=C6e(S6e(m=>{e(m)},300),[e]),f=m=>{let x=m.target.value;i(x),u(x)},d=m=>{m.stopPropagation(),u(""),i(""),a(!1),r&&r()},p=m=>{m.stopPropagation(),o?(u(""),i(""),a(!1)):(a(!0),setTimeout(()=>{l.current&&l.current.focus()},300))};return ws(cn,{onClickAway:m=>{m.stopPropagation();let x=m.target?.closest("#ref");n===""&&x&&d(m)},children:v6e("div",{style:{display:"flex"},children:[ws(g6e,{theme:y6e(s),children:ws(Vr,{variant:"standard",value:n,onChange:f,inputRef:l,placeholder:t,style:{width:o?"150px":"0",opacity:o?1:0,transition:"width 0.3s ease, opacity 0.3s ease"}})}),o?ws(Ht,{title:"Close",onClick:d,icon:ws(Ct,{fill:s.palette.icon.default}),arrow:!0}):ws(Ht,{title:"Search",onClick:p,icon:ws(zd,{fill:s.palette.icon.default}),arrow:!0})]})})}var qn=b6e;import{Grid2 as I6e,TableCell as k6e}from"@mui/material";import{useRef as O6e,useState as yf}from"react";var w6e="N/A",nD=e=>e&&e.deleted_at&&e.deleted_at.Valid===!0?Ss(e.deleted_at.Time):w6e;import{jsx as ll}from"react/jsx-runtime";var iD=L("div")({display:"flex",gap:"1rem"}),sl=L("div")({display:"flex",justifyContent:"space-between",width:"100%",alignItems:"center"}),F2=L("div")({display:"flex",alignItems:"center",marginRight:"1rem"}),N6=L("div")({boxSizing:"border-box",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}),B6=L("div")({position:"absolute",top:0,right:0,bottom:0,left:0,boxSizing:"border-box",display:"block",width:"100%"}),lD=L("span")(()=>({"& svg":{cursor:"pointer",width:"2rem",height:"2rem"}})),N8t=L("span")(()=>({"& svg":{width:"2rem",height:"2rem"}})),sD=L("span")(({theme:e})=>({"& svg":{color:"#3C494F","&:hover":{color:e.palette.error.error}}})),Gp=L("span")(()=>({color:"#455a64",opacity:"0.5","& svg":{cursor:"not-allowed"}})),uD=L("div")(()=>({display:"flex",justifyContent:"space-between",paddingRight:"26px"})),N2=L("div")(()=>({color:"#455a64",display:"flex",cursor:"not-allowed","& svg":{cursor:"pointer"}})),fD=L(Br)({padding:0,marginRight:"0.5rem",height:"28px","& .MuiSvgIcon-root":{borderColor:"white"},color:"white","&:hover":{color:"white",cursor:"pointer"},"&.Mui-checked":{color:"white"}}),H6=L(G)({fontSize:"1.25rem",fontWeight:800,"&:hover":{cursor:"default"}}),B8t=L(G)({fontSize:"0.9rem",display:"flex",alignItems:"end",padding:"0 5px","&:hover":{cursor:"default"}}),H8t=L("button")({background:"transparent",border:"none","&:hover":{cursor:"default"}}),V6=L(G)({fontStyle:"italic",fontSize:"12px","&:hover":{cursor:"default"}}),U6=L(G)({fontSize:"0.9rem",textAlign:"left",fontStyle:"italic"}),dD=L(U6)({height:"fit-content",fontStyle:"normal","&:hover":{cursor:"default"}}),E6e=L(K)(({theme:e})=>({background:e.palette.background.brand?.default,padding:"10px 10px 1px 10px",borderRadius:"4px",height:"100%",display:"flex",width:"100%"})),zp=L(E6e)({display:"flex",width:"100%",gap:"10px","@media (min-width : 600px)":{flexDirection:"column",gap:"0"}}),W6=L(Ae)(({theme:e})=>({width:"100%",borderRadius:"4px",background:e.palette.background.brand?.default,boxShadow:"0px 4px 4px 0px rgba(0, 0, 0, 0.25)",display:"flex",flexDirection:"column",marginBottom:"10px",color:e.palette.text.default,"&:hover":{background:e.palette.text.default},padding:"15px 10px"})),q6=L("p")(({theme:e,textColor:t})=>({margin:"0",fontSize:"14px",fontWeight:"400",display:"flex",color:t||e.palette.text.constant?.white})),G6=L("p")(({theme:e,textColor:t})=>({margin:"0",fontSize:"60px",fontWeight:"500",lineHeight:1,marginBottom:"5px",color:t||e.palette.text.constant?.white})),V8t=L(Ae)(({theme:e})=>({width:"100%",borderRadius:"4px",background:e.palette.text.default,boxShadow:"0px 4px 4px 0px rgba(0, 0, 0, 0.25)",display:"flex",flexDirection:"column",marginBottom:"10px",color:`${ie[40]}30 !important`,"&:hover":{background:e.palette.text.default},padding:"15px 10px"})),U8t=L("div")(({disabled:e=!1})=>({cursor:e?"not-allowed":"pointer",opacity:e?"0.5":"1",display:"flex","& svg":{cursor:e?"not-allowed":"pointer"}})),pD=L(me)(({theme:e})=>({borderBottom:`1px solid ${e.palette.divider}`,display:"flex",flexDirection:"row",padding:"5px 0"})),z6=({onClick:e,bulk:t,disabled:r,style:o,key:a,title:n="Delete"})=>{let i=te();return ll(ce,{title:n,arrow:!0,children:ll("div",{children:ll(rt,{sx:{"&:hover":{"& svg":{fill:r?i.palette.icon.disabled:i.palette.background.error?.hover}},...o},disableRipple:!0,disabled:r,onClick:e,children:ll(ro,{fill:r?i.palette.icon.disabled:i.palette.icon.default,width:t?"28":"24",height:t?"28":"24",style:o})})})},a)},Gn=({onClick:e,disabled:t,bulk:r,style:o,title:a="Edit"})=>{let n=te();return ll(ce,{title:a,arrow:!0,children:ll("div",{children:ll(rt,{onClick:e,sx:{"&:hover":{"& svg":{fill:t?n.palette.icon.disabled:n.palette.background.brand?.default}},...o},disableRipple:!0,disabled:t,children:ll(Ba,{fill:t?n.palette.icon.disabled:n.palette.icon.default,width:r?"28":"24",height:r?"28":"24",style:o})})})})},mD=L(me)({display:"flex",flexDirection:"row"}),W8t=L(me)({display:"flex",alignItems:"center",marginTop:1}),jp=L(me)({width:"100%"}),cD=L(gr)(({theme:e})=>({width:"100%",display:"flex",flexDirection:"column",backgroundColor:e.palette.background.paper,padding:e.spacing(2.5),cursor:"pointer"})),xD=L(cD)(({theme:e})=>({minHeight:e.spacing(50),background:"linear-gradient(180deg, #007366 0%, #000 100%)"})),hD=L(cD)(({theme:e})=>({minHeight:e.spacing(50),backgroundColor:e.palette.background.paper,boxShadow:"none"})),gD=L(me)({display:"flex",flexDirection:"row",justifyContent:"space-between"}),TD=L(me)({display:"flex",alignItems:"flex-start"}),SD=L(me)({display:"flex",alignItems:"center",justifyContent:"flex-end"}),CD=L(G)(({theme:e})=>({fontSize:"1.25rem",fontWeight:600,padding:"0.5rem 0",color:e.palette.background.constant?.white})),yD=L(me)({display:"flex",flexDirection:"column",maxHeight:"14.5rem",overflowY:"scroll",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"},"-ms-overflow-style":"none"}),bD=L(me)(({theme:e})=>({display:"flex",flexDirection:"row",position:"absolute",bottom:"20px",width:"100%",color:`${e.palette.background.constant?.white}99`,justifyContent:"space-between",paddingRight:"40px"})),j6=L(me)({textAlign:"left"});import{jsx as Kp,jsxs as vD}from"react/jsx-runtime";var R6e=({userId:e,userName:t,userEmail:r,profileUrl:o})=>{let a=te(),n=()=>{window.open(`${Lo}/user/${e}`)};return vD(me,{container:!0,alignItems:"center",children:[Kp(me,{children:Kp(K,{sx:{color:a.palette.text.default,mr:2,cursor:"pointer"},children:Kp(Mt,{onClick:n,alt:t,src:o,children:o?"":Kp(bn,{})})})}),vD(me,{size:"grow",children:[t,Kp(G,{variant:"body2",color:a.palette.text.disabled,children:r})]})]})},Cf=R6e;import{Fragment as _6e,jsx as it,jsxs as bf}from"react/jsx-runtime";var A6e=({tableMeta:e,handleRemoveFromTeam:t,isRemoveFromTeamAllowed:r,theme:o})=>it("div",{children:r?it(N2,{children:it(Ht,{id:`delete_user-${e.rowIndex}`,onClick:t(e.rowData),title:"Remove user membership from team",iconType:"delete",children:it(Ql,{fill:o?.palette.icon.default})})}):it(Gp,{children:it(Ql,{fill:o?.palette.icon.disabled,secondaryFill:Ur})})}),P6e=({teamID:e,useGetUsersForOrgQuery:t,org_id:r,useRemoveUserFromTeamMutation:o,useNotificationHandlers:a,isRemoveFromTeamAllowed:n,theme:i})=>{let[l,s]=yf(0),[u,f]=yf(10),[d,p]=yf("last_login_time desc"),[m,x]=yf(""),h=[],{handleError:g,handleSuccess:T,handleInfo:w}=a(),E=O6e(null),{width:I}=qo(),{data:D}=t({page:l,pagesize:u,search:m,order:d,teamId:e,orgId:r}),[C]=o(),b=D?.data||[],A=D?.total_count||0,B=V=>async()=>{let y=V[0];await E.current?.show({title:"Remove User From Team ?",subtitle:Q(V[3],V[2]),primaryOption:"Proceed",variant:D2.DANGER})==="Proceed"&&C({orgId:r,teamId:e,userId:y}).unwrap().then(()=>{T(`${V[4]?V[4]:""} ${V[5]?V[5]:""} removed from team`)}).catch(oe=>{let R=oe.response?.data?.message||"Failed to remove user from team";oe.response.status===404?w(R):g(R)})},P=(V,y,J)=>{let oe=J.findIndex(R=>R.name===y);return V[oe]},Q=(V,y)=>bf(_6e,{children:[it("p",{children:"Are you sure you want to remove this user? (This action is irreversible)"}),bf("p",{children:["User:"," ",it("i",{children:it("b",{children:V})})]}),bf("p",{children:["Email:"," ",it("i",{children:it("b",{children:y})})]})]}),Z,H={search:!1,viewColumns:!1,filter:!1,rowsPerPageOptions:[10,20,25],responsive:"standard",selectableRows:"none",count:A,rowsPerPage:u,page:l,print:!1,download:!1,elevation:0,serverSide:!0,sortOrder:{name:d.split(" ")[0],direction:d.split(" ")[1]},onTableChange:(V,y)=>{let J=y.announceText?y.announceText.split(" : "):[],oe="";switch(y.activeColumn&&(oe=`${N[y.activeColumn].name} desc`),V){case"changePage":s(y.page);break;case"changeRowsPerPage":f(y.rowsPerPage);break;case"search":Z&&clearTimeout(Z),Z=setTimeout(()=>{m!==y.searchText&&x(y.searchText)},500);break;case"sort":J.length==2&&(J[1]==="ascending"?oe=`${N[y.activeColumn].name} asc`:oe=`${N[y.activeColumn].name} desc`),oe!==d&&p(oe);break}}},q=[["user_id","na"],["avatar_url","xs"],["email","na"],["username","na"],["first_name","na"],["last_name","na"],["role_names","xs"],["status","na"],["joined_at","l"],["last_login_time","l"],["deleted_at","na"]],N=[{name:"user_id",label:"User ID",options:{filter:!1,sort:!1,searchable:!1}},{name:"avatar_url",label:"Team Member",options:{filter:!1,sort:!1,searchable:!1,customBodyRender:(V,y)=>it(K,{sx:{"& > img":{mr:2,flexShrink:0}},children:it(Cf,{userId:P(y.rowData,"user_id",N),userName:`${y.rowData[4]} ${y.rowData[5]}`,userEmail:y.rowData[2],profileUrl:V})})}},{name:"email",label:"Email",options:{filter:!1,sort:!0,searchable:!0}},{name:"username",label:"Username",options:{filter:!1,sort:!0,searchable:!0,customBodyRender:(V,y)=>bf("div",{style:{display:"flex"},children:[V,V?.includes("@")?it(Gt,{title:`Search "${y.rowData[3]} ${y.rowData[4]}" on Google`,children:it("a",{href:`https://www.google.com/search?q=${y.rowData[3]}+${y.rowData[4]}`,style:{color:"inherit"},target:"_blank",rel:"noreferrer",children:it("div",{children:it(F4,{width:20,height:20})})})}):it(Gt,{title:`Lookup "${V}" on GitHub`,children:it("a",{href:`https://www.github.com/${V}`,style:{color:"inherit"},target:"_blank",rel:"noreferrer",children:it("div",{children:it(Fu,{width:22,height:22})})})})]})}},{name:"first_name",label:"First",options:{filter:!1,sort:!0,searchable:!0}},{name:"last_name",label:"Last",options:{filter:!1,sort:!0,searchable:!0}},{name:"role_names",label:"Roles",options:{filter:!0,sort:!1,searchable:!1,filterOptions:{names:h.concat(h?.map(V=>`!${V}`))},customBodyRender:V=>it("div",{children:V?.join(", ")})}},{name:"status",label:"Status",options:{filter:!0,sort:!0,searchable:!1}},{name:"joined_at",label:"Joined At",options:{filter:!1,sort:!0,searchable:!1,sortDescFirst:!0}},{name:"last_login_time",label:"Last Active At",options:{filter:!1,sort:!0,searchable:!1,sortDescFirst:!0}},{name:"deleted_at",label:"Deleted At",options:{filter:!0,sort:!0,searchable:!1,sortDescFirst:!0,filterOptions:{names:["Deleted","Not Deleted"],logic:(V,y)=>V!="NA"&&y.indexOf("Deleted")>=0?!0:V=="NA"&&y.indexOf("Not Deleted")>=0,fullWidth:!0},customBodyRender:(V,y)=>{let J=b[y.rowIndex];return nD(J)}}},{name:"actions",label:"Actions",options:{filter:!1,sort:!1,searchable:!1,customBodyRender:(V,y)=>P(y.rowData,"deleted_at",N).Valid!==!1?bf(Gp,{children:[it(Ba,{style:{marginRight:".5rem"},fill:Ur,height:"30",width:"30"}),it(Ql,{fill:Ur,secondaryFill:Ur,height:30,width:30})]}):it(A6e,{tableMeta:y,handleRemoveFromTeam:B,isRemoveFromTeamAllowed:n,theme:i})}}],[M,k]=yf(N),[F]=yf(()=>{let V=Go(q,I),y={};return N.forEach(J=>{y[J.name]=V[J.name]}),y});return bf(C4,{initialMode:i?.palette.mode,children:[it("div",{style:{margin:"auto",width:"100%"},children:it(vo,{columns:N,data:b,options:H,colViews:q,tableCols:M,updateCols:k,columnVisibility:F})}),it(Sf,{ref:E})]})},B2=P6e;import{jsx as $p}from"react/jsx-runtime";var M6e=L(I6e)(({theme:e})=>({display:"grid",margin:"auto",paddingLeft:"0.5rem",borderRadius:"0.25rem",width:"inherit",gap:e.spacing(1)})),L6e=({teams:e,tableOptions:t,columnVisibility:r,colViews:o,tableCols:a,columns:n,updateCols:i,isRemoveFromTeamAllowed:l,org_id:s,useGetUsersForOrgQuery:u,useNotificationHandlers:f,useRemoveUserFromTeamMutation:d})=>{let p=te();return $p(zr,{children:$p(vo,{columns:n,data:e,options:{...t,renderExpandableRow:(m,x)=>{let h=e[x.dataIndex].id;return $p(k6e,{colSpan:6,sx:{paddingInline:"4rem",backgroundColor:`${p.palette.background.secondary} !important`},children:$p(M6e,{container:!0,size:12,children:$p(B2,{teamID:h,isRemoveFromTeamAllowed:l,org_id:s,useGetUsersForOrgQuery:u,useNotificationHandlers:f,useRemoveUserFromTeamMutation:d,theme:p})})})}},colViews:o,tableCols:a,updateCols:i,columnVisibility:r})})},H2=L6e;import{useState as wD}from"react";import{jsx as K6}from"react/jsx-runtime";function D6e({value:e,maxLength:t,...r}){return e.length>t?K6(Gt,{title:e,arrow:!0,placement:"top",children:K6("div",{style:{maxWidth:"15rem",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},...r,children:`${e.slice(0,t)}...`})}):K6("div",{style:{maxWidth:"15rem",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},...r,children:e})}var zo=D6e;import{Fragment as N6e,jsx as Vt,jsxs as $6}from"react/jsx-runtime";function F6e({selected:e,teams:t,deleteTeamsModalHandler:r}){let o={team_ids:[],team_names:[]};return e?.data.forEach(a=>{let n=a.index;o.team_ids.push(t[n]?.team_id),o.team_names.push(t[n]?.team_name)}),Vt(lD,{children:Vt(sD,{children:Vt(ce,{title:"Delete Teams",children:Vt(ro,{height:28,width:28,fill:Ur,onClick:()=>{r(o)}})},"delete_teams")})})}function Yp({teams:e,count:t,page:r,pageSize:o,setPage:a,setPageSize:n,sortOrder:i,setSortOrder:l,bulkSelect:s,setBulkSelect:u,handleTeamView:f,handleDeleteTeam:d,handleRemoveTeamFromWorkspace:p,handleleaveTeam:m,teamId:x,workspace:h=!1,isEditTeamAllowed:g,isLeaveTeamAllowed:T,isRemoveTeamFromWorkspaceAllowed:w,isDeleteTeamAllowed:E,setSearch:I}){let{width:D}=qo(),C=te(),b=[["id","na"],["name","xs"],["description","m"],["owner","l"],["created_at","na"],["updated_at","xl"],["deleted_at","na"],["actions","xs"]],A=[{name:"id",label:"ID",options:{filter:!1,sort:!1,searchable:!1,customBodyRender:N=>Vt(v2,{id:N})}},{name:"name",label:"Name",options:{filter:!1,sort:!0,searchable:!0}},{name:"description",label:"Description",options:{filter:!1,sort:!0,searchable:!1,customBodyRender:N=>Vt(zo,{value:N??"",maxLength:30})}},{name:"owner",label:"Owner",options:{filter:!1,sort:!0,searchable:!0}},{name:"created_at",label:"Created At",options:{filter:!1,sort:!0,searchable:!1,sortDescFirst:!0}},{name:"updated_at",label:"Updated At",options:{filter:!1,sort:!0,searchable:!1,sortDescFirst:!0}},{name:"deleted_at",label:"Deleted At",options:{filter:!0,sort:!0,searchable:!1,sortDescFirst:!0,customBodyRender:N=>JSON.stringify(N),filterOptions:{names:["Deleted","Not Deleted"],logic:(N,M)=>N!="NA"&&M.indexOf("Deleted")>=0?!0:N=="NA"&&M.indexOf("Not Deleted")>=0,fullWidth:!0}}},{name:"actions",label:"Actions",options:{filter:!1,sort:!1,searchable:!1,customBodyRender:(N,M)=>s||M.rowData[4].Valid?$6(Gp,{children:[Vt(Ba,{style:{marginRight:".5rem"}}),Vt(ro,{height:28,width:28,fill:Ur})]}):$6(N2,{children:[!h&&$6(N6e,{children:[Vt(lo,{disabled:!g,children:Vt(Ht,{id:`edit_team-${M.rowIndex}`,title:"Edit Team",onClick:k=>{g&&f(k,M.rowData)},iconType:"edit",children:Vt(Ba,{style:{height:28.8,width:28.8},fill:Ur})})}),Vt(lo,{disabled:!T,children:Vt(Ht,{id:`leave_team-${M.rowIndex}`,title:"Leave Team",onClick:k=>T&&m(k,M.rowData),iconType:"delete",children:Vt(Ql,{fill:Ur,secondaryFill:Ur})})})]}),h?Vt(lo,{disabled:!w,children:Vt(Ht,{id:`remove_team-${M.rowIndex}`,title:"Move Team",onClick:()=>{w&&p&&p(M.rowData[0])},iconType:"delete",children:Vt(ro,{height:28,width:28,fill:C.palette.icon.default})})}):Vt(lo,{disabled:!E,children:Vt(Ht,{id:`delete_team-${M.rowIndex}`,title:"Delete Team",onClick:k=>{E&&d(k,M.rowData)},iconType:"delete",children:Vt(ro,{height:28,width:28,fill:Ur})})})]})}}],B=e?.findIndex(N=>N.id===x),P={filter:!1,selectableRows:"none",filterType:"dropdown",expandableRows:!0,expandableRowsHeader:!1,expandableRowsOnClick:!0,responsive:"standard",count:t,rowsPerPage:o,page:r,print:!1,download:!1,elevation:0,serverSide:!0,viewColumns:!1,search:!1,rowsExpanded:[B],customToolbarSelect:N=>Vt(uD,{children:Vt(F6e,{selected:N,teams:e,deleteTeamsModalHandler:()=>{}})}),textLabels:{selectedRows:{text:"teams(s) selected"}},onTableChange:(N,M)=>{let k=M.announceText?M.announceText.split(" : "):[],F="";switch(M.activeColumn&&(F=`${A[M.activeColumn].name} desc`),N){case"changePage":a(M.page);break;case"changeRowsPerPage":n(M.rowsPerPage);break;case"search":I(M.searchText!==null?M.searchText:"");break;case"sort":k.length==2&&(k[1]==="ascending"?F=`${A[M.activeColumn].name} asc`:F=`${A[M.activeColumn].name} desc`),F!==i&&l(F);break;case"rowSelectionChange":M.selectedRows.data.length?s||u(!0):u(!1);break;default:M.selectedRows.data.length==0&&s&&u(!1)}},isRowSelectable:N=>e[N].deleted_at.Valid!==!0,setRowProps:(N,M,k)=>(k&&k.selectedRows?k.selectedRows.data:[]).includes(M)?{style:{backgroundColor:C.palette.background.hover}}:N[6].Valid?{style:{backgroundColor:C.palette.icon.disabled}}:{style:{backgroundColor:C.palette.background.constant?.table}}},[Q,Z]=wD(A),[H,q]=wD(()=>{let N=Go(b,D),M={};return A.forEach(k=>{M[k.name]=N[k.name]}),M});return{columns:A,tableOptions:P,tableCols:Q,updateCols:Z,columnVisibility:H,setColumnVisibility:q,colViews:b}}import Ca from"react";import{jsx as vt,jsxs as H6e}from"react/jsx-runtime";var B6e=({width:e=U,height:t=W,primaryFill:r="#00B39F",secondaryFill:o="#00D3A9",...a})=>H6e("svg",{width:e,height:t,viewBox:"0 0 135 135",...a,xmlns:"http://www.w3.org/2000/svg",children:[vt("path",{d:"M69.5 31.82V64.07L97.45 47.89L69.5 31.82Z",fill:o}),vt("path",{d:"M69.5 70.81V103.22L97.7 87.09L69.5 70.81Z",fill:o}),vt("path",{d:"M65.47 63.85V32.09L37.87 47.92L65.47 63.85Z",fill:r}),vt("path",{d:"M10.1 103.1C15.5182 111.811 22.842 119.179 31.52 124.65V90.71L10.1 103.1Z",fill:r}),vt("path",{d:"M65.47 103.06V71.05L37.8 87.07L65.47 103.06Z",fill:r}),vt("path",{d:"M35.54 122.63L63.56 106.61L35.54 90.41V122.63Z",fill:o}),vt("path",{d:"M99.62 122.8V90.63L71.64 106.63L99.62 122.8Z",fill:r}),vt("path",{d:"M127.03 99.37C131.817 90.4433 134.524 80.5502 134.95 70.43L105.78 87.11L127.03 99.37Z",fill:r}),vt("path",{d:"M103.64 83.69L131.76 67.61L103.64 51.45V83.69Z",fill:o}),vt("path",{d:"M99.62 44.5V12.52L71.77 28.49L99.62 44.5Z",fill:r}),vt("path",{d:"M99.62 83.55V51.28L71.7 67.44L99.62 83.55Z",fill:r}),vt("path",{d:"M35.54 51.22V83.73L63.66 67.45L35.54 51.22Z",fill:o}),vt("path",{d:"M65.47 0C55.1388 0.298791 45.016 2.97835 35.89 7.83L65.52 24.83L65.47 0Z",fill:r}),vt("path",{d:"M35.54 12.3V44.62L63.69 28.48L35.54 12.3Z",fill:o}),vt("path",{d:"M31.52 10.34C22.8442 15.8136 15.521 23.1813 10.1 31.89L31.52 44.25V10.34Z",fill:r}),vt("path",{d:"M99.43 8C90.2123 3.0393 79.9635 0.299881 69.5 0V25.15L99.43 8Z",fill:o}),vt("path",{d:"M0 69.87C0.348236 80.2825 3.1145 90.4711 8.08 99.63L29.77 87.07L0 69.87Z",fill:o}),vt("path",{d:"M8.07001 35.37C3.13121 44.4917 0.372439 54.6334 0.0100098 65L29.8 47.91L8.07001 35.37Z",fill:o}),vt("path",{d:"M35.78 127.13C44.9355 132.013 55.0981 134.706 65.47 135V110.15L35.78 127.13Z",fill:r}),vt("path",{d:"M124.89 32C119.512 23.3126 112.237 15.9553 103.61 10.48V44.3L124.89 32Z",fill:o}),vt("path",{d:"M103.64 124.54C112.314 119.022 119.624 111.61 125.02 102.86L103.64 90.52V124.54Z",fill:o}),vt("path",{d:"M134.96 64.81C134.572 54.5437 131.835 44.5032 126.96 35.46L105.5 47.88L134.96 64.81Z",fill:r}),vt("path",{d:"M69.5 135C79.845 134.709 89.9825 132.029 99.12 127.17L69.5 110V135Z",fill:o}),vt("path",{d:"M31.52 83.44V51.56L3.83002 67.43L31.52 83.44Z",fill:r})]}),Y6=B6e;import V6e from"@mui/material/Tooltip";import U6e from"react";import{jsx as ED}from"react/jsx-runtime";var W6e=U6e.forwardRef((e,t)=>ED(V6e,{...e,ref:t,children:ED("span",{children:e.children})})),Z6=W6e;import{Grid2 as RD,styled as vf}from"@mui/material";var OD=vf(St)(({theme:e})=>({padding:"5px 6px !important",color:e.palette.text.default,fontSize:"0.875rem",textTransform:"uppercase",fontWeight:400,height:"unset",borderRadius:"100px",border:`0.5px solid ${e.palette.border?.normal}`,background:e.palette.background.default,maxWidth:"14.375rem"})),AD=vf(xn)(({theme:e})=>({width:300,height:280,overflow:"auto",backgroundColor:e.palette.background.secondary,borderRadius:"10px",boxShadow:"0px 1px 4px 0px rgba(0, 0, 0, 0.25) inset","@media (max-width: 843px)":{width:260},"@media (max-width: 768px)":{width:300},"@media (max-width: 375px)":{width:"100%"}})),Q6=vf(G)(({theme:e})=>({paddingBottom:"15px",color:e.palette.text?.default,textAlign:"center",fontSize:"1rem",letterSpacing:"0.15px"})),Zp=vf(Ae)(({theme:e})=>({margin:"5px 0",padding:"7px 0",borderRadius:"10px",borderColor:e.palette.border?.strong,boxShadow:"none",display:"flex",flexDirection:"row",fill:e.palette.icon.default,"&:hover":{borderColor:e.palette.border?.brand,backgroundColor:`${qe} !important`,fill:e.palette.icon.inverse}})),X6=vf(RD)({padding:"0 1rem","@media (max-width: 768px)":{padding:"0",display:"flex",alignItems:"center",flexDirection:"column",width:"100%"}}),PD=vf(RD)({padding:"2.5rem 1rem 0 1rem","@media (max-width: 768px)":{padding:"1rem",transform:"rotate(90deg)",height:"6.25rem",marginLeft:"6.25rem"}});import{jsx as _t,jsxs as ya}from"react/jsx-runtime";var _D={CHIP:"chip",OTHER:"other"};function q6e(e){return e?{meshery:_t(Y6,{}),kubernetes:_t(Bd,{}),github:_t(Fu,{})}[e]||null:_t(Bd,{})}function V2(e,t){return e.filter(r=>t.indexOf(r)===-1)}function ID(e,t){return e.filter(r=>t.indexOf(r)!==-1)}function G6e({name:e,assignableData:t,assignedData:r,assignablePage:o,assignedPage:a,originalAssignedData:n,emptyStateIconLeft:i,emtyStateMessageLeft:l,emptyStateIconRight:s,emtyStateMessageRight:u,originalLeftCount:f,originalRightCount:d,leftPermission:p=!0,rightPermission:m=!0,transferComponentType:x=_D.OTHER}){let[h,g]=Ca.useState([]),[T,w]=Ca.useState([]),[E,I]=Ca.useState(n),[D,C]=Ca.useState(0),[b,A]=Ca.useState(0);Ca.useEffect(()=>{I(n)},[n]),Ca.useEffect(()=>{w(t)},[t]),Ca.useEffect(()=>{C(f),A(d)},[f,d]);let B=ID(h,T),P=ID(h,E);Ca.useEffect(()=>{r(E)},[E]),Ca.useEffect(()=>{let k=y=>{y[0].isIntersecting&&o()},F=new IntersectionObserver(k,{threshold:1}),V=document.getElementById("leftList");return V&&F.observe(V),()=>{V&&F.unobserve(V)}},[t]),Ca.useEffect(()=>{let k=y=>{y[0].isIntersecting&&a()},F=new IntersectionObserver(k,{threshold:1}),V=document.getElementById("rightList");return V&&F.observe(V),()=>{V&&F.unobserve(V)}},[n]);let Q=k=>()=>{let F=h.indexOf(k),V=[...h];F===-1?V.push(k):V.splice(F,1),g(V)},Z=k=>{k.stopPropagation(),I(E.concat(T)),w([]),C(0),A(F=>F+D)},H=k=>{k.stopPropagation(),I(E.concat(B)),w(V2(T,B)),g(V2(h,B)),C(F=>F-B.length),A(F=>F+B.length)},q=k=>{k.stopPropagation(),w(T.concat(P)),I(V2(E,P)),g(V2(h,P)),A(F=>F-P.length),C(F=>F+P.length)},N=k=>{k.stopPropagation(),w(T.concat(E)),I([]),A(0),C(F=>F+b)},M=(k,F,V,y)=>ya(AD,{children:[_t(Hr,{dense:!0,component:"div",role:"list",children:k.length>0?k.map(J=>{let oe=`transfer-list-item-${J.name}-label`;return ya(Tr,{role:"listitem",sx:{display:"flex",justifyContent:"space-between","&:hover":{backgroundColor:"#00000010"}},onClick:Q(J),children:[x===_D.CHIP?_t(Z6,{title:J.name,placement:"top",children:_t(OD,{sx:{paddingY:"10px"},variant:"outlined",label:J.name,onDelete:()=>{},deleteIcon:_t(Q4,{}),icon:q6e(J?.kind)||_t(Bd,{})})}):_t(Z6,{title:J.name,placement:"top",children:_t(G,{sx:{maxWidth:"230px",height:"1.5rem",overflow:"hidden"},children:J.name})}),_t(Br,{checked:h.indexOf(J)!==-1,tabIndex:-1,disableRipple:!0,inputProps:{"aria-labelledby":oe}})]},J.id)}):ya("div",{style:{textAlign:"center",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",height:"264px"},children:[F,_t(G,{sx:{color:"#979797",px:5,py:2,lineHeight:1},children:V})]})}),_t("div",{id:y})]});return ya(me,{container:!0,justifyContent:"center",alignItems:"center",children:[ya(X6,{children:[ya(Q6,{children:["Available ",e," (",T.length,")"]}),M(T,i,l,"leftList")]}),_t(PD,{children:ya(me,{container:!0,direction:"column",alignItems:"center",children:[ya(Zp,{variant:"outlined",size:"small",onClick:Z,disabled:!m||m&&(T?.length===0||T.length<D),"aria-label":"move all right",children:[_t(Gd,{width:18,height:18}),_t(Gd,{style:{position:"absolute",left:"27px"},width:18,height:18})]}),_t(Zp,{variant:"outlined",size:"small",onClick:H,disabled:!m||m&&B.length===0,"aria-label":"move selected right",children:_t(Gd,{width:18,height:18})}),_t(Zp,{variant:"outlined",size:"small",onClick:q,disabled:!p||p&&P.length===0,"aria-label":"move selected left",children:_t(Hd,{width:18,height:18})}),ya(Zp,{variant:"outlined",size:"small",onClick:N,disabled:!p||p&&(E?.length===0||E.length<b),"aria-label":"move all left",children:[_t(Hd,{width:18,height:18}),_t(Hd,{style:{position:"absolute",left:"27px"},width:18,height:18})]})]})}),ya(X6,{children:[ya(Q6,{children:["Assigned ",e," (",E.length,")"]}),M(E,s,u,"rightList")]})]})}var Qp=G6e;import{Drawer as z6e,styled as j6e,useMediaQuery as K6e}from"@mui/material";import kD from"react";import{Fragment as Q6e,jsx as so,jsxs as U2}from"react/jsx-runtime";var $6e=j6e("div")(({theme:e})=>({background:e.palette.mode==="light"?Tn.header:gn.header,padding:"0.75rem 1rem",margin:"-1rem -1rem 1rem -1rem",display:"flex",justifyContent:"space-between",alignItems:"center",color:e.palette.text.constant?.white}));function Y6e({filters:e,selectedFilters:t,setSelectedFilters:r,variant:o="outlined",handleApplyFilter:a,showAllOption:n=!0,id:i}){let[l,s]=kD.useState(null),[u,f]=kD.useState(!1),d=te(),p=K6e(d.breakpoints.down("sm")),m=w=>{s(w.currentTarget),f(E=>!E)},x=()=>{s(null),f(!1)},h=(w,E)=>{let I=w.target.value;r(D=>({...D,[E]:I}))},g=()=>{x(),a()},T=()=>U2("div",{children:[so($6e,{children:so("h3",{children:"Filters: "})}),Object.keys(e).map(w=>{let E=e[w].options;return U2("div",{role:"presentation",children:[so(ql,{id:e[w].name,children:e[w].name}),U2(ia,{defaultValue:"All",value:t[w],variant:o,onChange:I=>h(I,w),style:{width:"20rem",marginBottom:"1rem"},inputProps:{"aria-label":"Without label"},displayEmpty:!0,children:[n&&so(mt,{value:"All",children:"All"}),E.map(I=>so(mt,{value:I.value,children:I.label},I.value))]},w)]},w)}),so("div",{style:{display:"flex",justifyContent:"center"},children:so(Ae,{variant:"contained",onClick:g,children:"Apply"})})]});return so(Q6e,{children:U2("div",{id:i,children:[so(Ht,{title:"Filter",onClick:m,icon:so(A4,{fill:d.palette.icon.default}),arrow:!0}),p?so(z6e,{anchor:"bottom",open:u,onClose:x,PaperProps:{style:{padding:"0 1rem 1rem 1rem",backgroundColor:d.palette.background.surfaces}},children:T()}):so(Rp,{id:u&&l?"transition-popper":void 0,open:u,anchorEl:l,placement:"bottom-end",children:so(cn,{onClickAway:x,mouseEvent:"onMouseDown",touchEvent:"onTouchStart",children:so(xn,{sx:{padding:"1rem",paddingTop:"1.8rem",boxShadow:"0px 4px 8px rgba(0, 0, 0, 0.1)",backgroundColor:d.palette.background.surfaces},children:T()})})})]})})}var Z6e=Y6e;import{useState as X6e}from"react";import{Fragment as n7e,jsx as wf,jsxs as J6}from"react/jsx-runtime";var ba={PUBLIC:"public",PRIVATE:"private",PUBLISHED:"published"},J6e=L(Gl)(({theme:e})=>({"& .MuiPaper-root":{backgroundColor:e.palette.mode==="light"?ox:e.palette.background.constant?.table,color:e.palette.text.secondary,border:`1px solid ${e.palette.border.default}`,borderRadius:"0.25rem",padding:"0rem"},"& .MuiMenuItem-root":{fontSize:".9rem",padding:"0.5rem","&:hover":{backgroundColor:e.palette.mode==="light"?Iu:"rgba(0, 179, 159, 0.25)"}},"& .Mui-selected":{backgroundColor:e.palette.mode==="light"?Iu:"rgba(0, 179, 159, 0.25)"},"& .MuiList-padding":{padding:"0px"}})),e7e=L(Ae)(()=>({padding:"0px"})),t7e=L("div")(({theme:e,enabled:t})=>({paddingLeft:"0.3rem",height:"1.5rem",width:"auto",paddingRight:t?"0":"0.3rem",borderRadius:"0.25rem",border:`1px solid ${bd}`,background:e?.palette.mode==="light"?ox:e?.palette.background.constant?.table,textTransform:"uppercase",color:e?.palette.text.default,display:"flex",justifyContent:"center",alignItems:"center",fontSize:"0.75rem",fontFamily:e?.typography.fontFamily})),r7e=L(mt)(({theme:e})=>({textTransform:"capitalize",color:e.palette.icon.default})),o7e=L("div")({marginRight:"0.5rem"}),a7e=({value:e,onChange:t,options:r,enabled:o})=>{let[a,n]=X6e(null),i=!!a,l=f=>{f.stopPropagation(),n(null)},s=f=>{f.stopPropagation(),o&&n(f.currentTarget)},u=(f,d)=>{f.stopPropagation(),t&&t(d),l(f)};return J6(n7e,{children:[wf(e7e,{disabled:!o,onClick:s,"data-testid":`design-visibility-${e.toLowerCase()}`,children:J6(t7e,{enabled:o,children:[wf("span",{style:{fontSize:"0.85rem"},children:e}),o&&wf(vO,{style:{...Co}})]})}),wf(J6e,{open:i,onClose:l,anchorEl:a,anchorReference:"anchorPosition",anchorPosition:{top:(a?.getBoundingClientRect().bottom??0)+5,left:(a?.getBoundingClientRect().left??0)+5},children:r?.map(([f,d],p)=>J6(r7e,{"data-testid":`visibility-toggle-${f.toLowerCase()}`,onClick:m=>u(m,f),children:[wf(o7e,{children:wf(d,{width:16,height:16})}),f]},p))})]})},ul=a7e;import{styled as l7e}from"@mui/material";import{styled as va,Typography as i7e}from"@mui/material";var MD=va("div")(()=>({width:"85px",height:"88px",overflow:"hidden",position:"absolute",top:"-3px",left:"-3px"})),LD=va("div")(({catalogClassName:e})=>({font:"bold 10px sans-serif",WebkitTransform:"rotate(-45deg)",textAlign:"center",transform:"rotate(-45deg)",position:"relative",padding:"4px 0",top:"15px",left:"-30px",width:"120px",display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",backgroundColor:{community:"rgba(122,132,142,.8)",official:"#EBC017",verified:"#00B39F"}[e],color:"#fff"})),DD=va("div")(({outerStyles:e})=>({position:"relative",borderRadius:"1rem",textAlign:"center",transformStyle:"preserve-3d",transition:"all .9s ease-out",marginBottom:"1.25rem",display:"inline-flex",perspective:"1000px","&:hover":{cursor:"pointer",transform:"translateY(-2%)"},"@media (max-width:1200px)":{height:"18.75rem"},...e})),FD=va("div")(({theme:e})=>({position:"relative",width:"100%",height:"100%",textAlign:"center",transition:"transform 0.6s",background:e.palette.background.default,boxShadow:`2px 2px 3px 0px ${e.palette.background.brand?.default}`,borderRadius:"0.9375rem"})),ND=va("span")(({theme:e})=>({position:"absolute",top:"0",right:"0",minWidth:"3rem",padding:"0 0.75rem",fontSize:"0.875rem",textTransform:"capitalize",background:e.palette.background.brand?.default,color:e.palette.text.inverse,borderRadius:"0 1rem 0 2rem"})),Ef=va("p")(({theme:e})=>({fontSize:"1rem",textTransform:"capitalize",margin:"0rem",lineHeight:"1.5",textAlign:"center",color:e.palette.text.secondary,fontWeight:"600"})),BD=va(i7e)(({theme:e})=>({fontWeight:"bold",textTransform:"capitalize",color:e.palette.text.default,fontSize:"1.125rem",marginTop:"2rem",padding:"0rem 1rem",position:"relative",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",textAlign:"center",width:"100%"})),HD=va("div")(({theme:e})=>({display:"flex",justifyContent:"space-around",fontSize:"0.2rem",color:e.palette.text.secondary,padding:"0.9rem 0.1rem",background:e.palette.background.secondary,position:"absolute",bottom:"0px",marginTop:"1.2rem",borderRadius:"0 0 0.9375rem 0.9375rem",width:"100%"})),Rf=va("div")(()=>({display:"flex",alignItems:"center",gap:"4px",fontSize:"0.2rem",color:"rgba(26, 26, 26, .8)",margin:"0rem",padding:"0.1rem"})),VD=va("div")(()=>({height:"max-content",display:"flex",marginTop:"-1rem",flexDirection:"column",padding:"0rem 1rem",justifyContent:"start",alignItems:"start","@media (max-width:1200px)":{height:"max-content"}})),UD=va("div")(({theme:e})=>({background:e.palette.mode==="light"?"rgba(231, 239, 243, 0.40)":"#212121",display:"flex",alignItems:"center",justifyContent:"center",padding:"0.5rem",width:"100%",borderRadius:"0.5rem"}));import{Fragment as f7e,jsx as Jt,jsxs as fl}from"react/jsx-runtime";var X7t=l7e("a")(()=>({textDecoration:"none"}));var s7e=({catalogClassName:e})=>e?Jt(MD,{children:Jt(LD,{catalogClassName:e,children:e})}):Jt(f7e,{}),u7e=({pattern:e,patternType:t,cardHeight:r,cardWidth:o,cardStyles:a,onCardClick:n})=>{let i={height:r,width:o,...a};return Jt(DD,{outerStyles:i,onClick:n,children:fl(FD,{className:"innerCard",children:[Jt(s7e,{catalogClassName:e?.catalog_data?.content_class}),Jt(ND,{children:t}),fl(VD,{children:[Jt(BD,{style:{margin:"3rem 0 1.59rem 0",textAlign:"center"},children:e.name}),Jt(UD,{children:Jt(Na,{height:"118",width:"120"})})]}),fl(HD,{children:[fl(Rf,{children:[Jt(ua,{width:18,height:18}),Jt(Ef,{children:e.download_count})]}),fl(Rf,{children:[Jt(Rd,{width:18,height:18,fill:"#51636B"}),Jt(Ef,{children:e.clone_count})]}),fl(Rf,{children:[Jt(Ud,{width:18,height:18,fill:"#51636B"}),Jt(Ef,{children:e.view_count})]}),fl(Rf,{children:[Jt(Dd,{width:18,height:18}),Jt(Ef,{children:e.deployment_count})]}),fl(Rf,{children:[Jt(vn,{width:18,height:18,fill:"#51636B"}),Jt(Ef,{children:e.share_count})]})]})]})})},WD=u7e;import{useTheme as b7e}from"@mui/material/styles";import{useCallback as eF,useState as v7e}from"react";import{useCallback as JD,useState as S7e}from"react";import{useCallback as x7e,useState as h7e}from"react";import{debounce as d7e}from"lodash";import{useEffect as jD,useMemo as p7e,useState as m7e}from"react";import{styled as qD}from"@mui/material";var GD=qD(Ru)(({style:e,theme:t})=>({fontFamily:t.typography.fontFamily,width:"100%","@media (max-width: 590px)":{marginLeft:"0.25rem",paddingLeft:"0.25rem"},display:"flex",backgroundColor:t.palette.mode==="light"?t.palette.common.white:t.palette.background.surfaces,...e})),zD=qD(gd)(({theme:e})=>({borderLeft:`1px solid ${e.palette.background.tertiary}`,height:"30px",paddingLeft:"10px"}));import{jsx as W2}from"react/jsx-runtime";function c7e({onChange:e,value:t="",label:r,sx:o,placeholder:a,endAdornment:n,debounceTime:i=300}){let l=te(),[s,u]=m7e(t);jD(()=>{t!==s&&u(t)},[t]);let f=m=>({target:{value:m},persist:()=>{}}),d=p7e(()=>d7e(m=>{e?.(f(m))},i),[e,i]);return jD(()=>{if(e)return s===""?e(f(s)):d(s),()=>{d.cancel()}},[s,e,d]),W2(GD,{type:"search",label:r,fullWidth:!0,value:s,onChange:m=>{let x=m.target.value;u(x)},sx:o,placeholder:a??"Search",startAdornment:W2(gd,{position:"start",children:W2(zd,{fill:l.palette.background.neutral?.default})}),endAdornment:W2(zD,{position:"end",children:n})})}var q2=c7e;import{styled as zn}from"@mui/material/styles";var KD=zn(K)(({styleProps:e})=>({padding:"1rem",borderRadius:"1rem",width:"100%",gap:"0.5rem",boxShadow:"0px 2px 10px rgba(0, 0, 0, 0.2)",display:"flex",flexDirection:"column",height:"fit-content",backgroundColor:e.backgroundColor,"@media (max-width:900px)":{display:"none"},fontFamily:e.fontFamily,"&::-webkit-scrollbar":{width:"6px"}})),$D=zn("div")(()=>({display:"none","@media (max-width:899px)":{display:"block"}})),CSt=zn("div")(()=>({display:"flex",justifyContent:"space-around",alignItems:"center"})),YD=zn(Ae)(({theme:e})=>({backgroundColor:e.palette.primary.brand?.default,"&:hover":{backgroundColor:e.palette.background.default},height:"3.75rem","@media (max-width:450px)":{minWidth:"0px"}})),ZD=zn(K)(({theme:e})=>({display:"flex",justifyContent:"space-between",alignItems:"center",padding:"0.5rem 1rem",background:e.palette.mode==="light"?Tn.header:gn.header,height:"10vh"})),ySt=zn(ki)(({theme:e})=>({padding:"0.25rem 2rem",borderBottom:"1px solid",borderBottomColor:e.palette.text.disabled})),QD=zn(ki)(({theme:e})=>({backgroundColor:e.palette.background.surfaces,borderRadius:"0.5rem",marginTop:2,display:"flex",justifyContent:"space-between"})),XD=zn("p")(({theme:e})=>({color:e.palette.text.tertiary})),bSt=zn("span")(()=>({marginLeft:"0.5rem",display:"block","@media (max-width: 853px)":{display:"none"}}));import{Fragment as T7e,jsx as wa,jsxs as Es}from"react/jsx-runtime";var g7e=({filterKey:e,sectionDisplayName:t,options:r=[],filters:o,openSections:a,onCheckboxChange:n,onSectionToggle:i,styleProps:l,customComponent:s})=>{let[u,f]=h7e(""),d=x7e(x=>{f(x.target.value)},[]),p=r.length>10,m=u&&r.length?r.filter(x=>x.label.toLowerCase().includes(u.toLowerCase())):r;return Es(T7e,{children:[Es(QD,{onClick:()=>i(e),style:{backgroundColor:l.sectionTitleBackgroundColor},children:[wa(G,{sx:{fontSize:"1rem"},fontWeight:"bold",fontFamily:l.fontFamily,children:(t||e).toUpperCase()}),a[e]?wa(Vi,{}):wa(So,{})]}),wa(oa,{in:a[e],timeout:"auto",unmountOnExit:!0,children:s?wa(s,{}):Es(Hr,{component:"div",sx:{overflowY:"auto",maxHeight:"25rem",backgroundColor:l.backgroundColor,"&::-webkit-scrollbar":{width:"6px"}},children:[p&&wa(K,{sx:{px:"0.5rem",mb:"0.5rem"},children:wa(q2,{value:u,onChange:d,placeholder:"Search",endAdornment:Es(XD,{children:["Total : ",m.length??0]})})}),m.map((x,h)=>Es(yd,{direction:"row",alignItems:"center",px:"0.5rem",justifyContent:"space-between",children:[Es(yd,{direction:"row",alignItems:"center",gap:"0.35rem",children:[wa(Br,{id:`checkbox-${x.label}`,checked:Array.isArray(o[e])?o[e].includes(x.value):o[e]===x.value,onChange:g=>n&&n(e,x.value,g.target.checked),value:x.value}),x.Icon&&wa(x.Icon,{width:"20px",height:"20px"}),wa(G,{fontFamily:l.fontFamily,children:x.label})]}),Es(yd,{direction:"row",alignItems:"center",gap:"0.35rem",children:[x.totalCount!==void 0&&`(${x.totalCount||0})`,x.description&&wa(tl,{variant:"standard",helpText:x.description})]})]},`${x.value}-${h}`))]})})]})},e7=g7e;import{Fragment as y7e,jsx as t7}from"react/jsx-runtime";var C7e=({lists:e,onApplyFilters:t,value:r,styleProps:o})=>{let[a,n]=S7e(()=>{let s={};return e.forEach(u=>{s[u.filterKey]=!!u.defaultOpen}),s}),i=JD(s=>{n(u=>({...u,[s]:!u[s]}))},[]),l=JD((s,u,f)=>{t(d=>{let p={...d};if(e.find(x=>x.filterKey===s)?.isMultiSelect!==!1){let x=p[s];Array.isArray(x)||(x=x?[x]:[]),p[s]=f?[...x,u]:x.filter(h=>h!==u)}else p[s]=f?u:"";return p})},[e,t]);return t7(y7e,{children:e.map(s=>s.customComponent?t7(e7,{filterKey:s.filterKey,filters:r,sectionDisplayName:s.sectionDisplayName,onSectionToggle:i,styleProps:o,openSections:a,customComponent:s.customComponent},s.filterKey):t7(e7,{filterKey:s.filterKey,sectionDisplayName:s.sectionDisplayName,options:s.options,filters:r,openSections:a,onCheckboxChange:l,onSectionToggle:i,styleProps:o},s.filterKey))})},r7=C7e;import{Fragment as E7e,jsx as jo,jsxs as G2}from"react/jsx-runtime";var w7e=({lists:e,setData:t,value:r={},styleProps:o})=>{let a=b7e(),[n,i]=v7e(!1),l=eF(()=>{i(!0)},[]),s=eF(()=>{i(!1)},[]),f={...{backgroundColor:a.palette.mode==="light"?a.palette.background.default:a.palette.background.secondary,sectionTitleBackgroundColor:a.palette.mode==="light"?a.palette.background.surfaces:Yl.main,fontFamily:a.typography.fontFamily},...o};return G2(E7e,{children:[jo(KD,{styleProps:f,children:jo(r7,{lists:e,onApplyFilters:t,value:r,styleProps:f})}),G2($D,{children:[jo(ce,{title:"Filters",placement:"bottom",children:jo(YD,{variant:"contained",onClick:l,children:jo(RO,{style:{height:"28px",width:"28px"},fill:a.palette.text.default})})}),jo($3,{anchor:"bottom",open:n,variant:"temporary",onClose:s,style:{zIndex:"1399"},children:G2(K,{sx:{overflowY:"hidden",height:"90vh"},children:[G2(ZD,{children:[jo(G,{variant:"h6",sx:{color:a.palette.text.constant?.white},component:"div",children:"Filters"}),jo(pf,{onClick:s,children:jo(Ct,{height:"32px",width:"32px"})})]}),jo(K,{style:{height:"75vh",overflowY:"auto",background:a.palette.background.surfaces,padding:"0 16px"},children:jo(r7,{lists:e,onApplyFilters:t,value:r,styleProps:f})}),jo(K,{sx:{background:a.palette.mode==="light"?Tn.fotter:gn.fotter,height:"5vh"}})]})})]})]})},tF=w7e;import{jsx as z2,jsxs as O7e}from"react/jsx-runtime";function R7e({open:e,content:t,title:r,actions:o,onClose:a}){return O7e(aa,{open:e,onClose:a,children:[z2(h2,{children:r}),z2(Hl,{children:z2(Vl,{children:t})}),z2(hd,{children:o})]})}var rF=R7e;import{Autocomplete as A7e,Grid2 as o7}from"@mui/material";import P7e,{useCallback as a7,useEffect as _7e,useState as j2}from"react";import{jsx as sr,jsxs as n7}from"react/jsx-runtime";import{createElement as k7e}from"react";var I7e=({data:e,label:t,fetchSuggestions:r,setFilterData:o,isLoading:a,type:n,disabled:i,selectedData:l,searchValue:s,setSearchValue:u,iconComponent:f=sr(hx,{...qu})})=>{let[d,p]=j2(""),[m,x]=j2(!1),[h,g]=j2(!1),[T,w]=j2(l);_7e(()=>{w(l)},[l]);let E=a7(C=>{let b=T.filter(A=>A.id!==C);w(b),o(b)},[T,o]),I=a7((C,b)=>{if(!b)return;if(T.some(P=>P.id===b.id)){p(`${n} already selected`);return}let B=[...T,b];w(B),o(B),p(""),u(""),x(!1)},[T,o,n,u]),D=a7((C,b)=>{u(b),b===""?x(!1):(r(b),p(""),x(!0))},[r,u]);return n7(K,{sx:{width:"100%"},children:[sr(A7e,{id:`${n}-search-field`,style:{width:"100%"},options:e,getOptionLabel:()=>s,isOptionEqualToValue:(C,b)=>C.id===b.id,noOptionsText:a?"Loading...":`No ${n} found`,loading:a,open:m,onClose:()=>x(!1),disabled:i,value:void 0,inputValue:s,onChange:I,onInputChange:D,filterOptions:C=>C,disableClearable:!0,includeInputInList:!0,filterSelectedOptions:!0,disableListWrap:!0,clearOnBlur:!0,popupIcon:null,blurOnSelect:!0,forcePopupIcon:!1,renderInput:C=>sr(Vr,{...C,label:t||`Add ${n}`,error:!!d,helperText:d,fullWidth:!0,InputLabelProps:{style:{fontFamily:"inherit"}},InputProps:{...C.InputProps,endAdornment:sr(P7e.Fragment,{children:a?sr(Lt,{color:"inherit",size:20}):null})}}),renderOption:(C,b)=>k7e("li",{...C,key:b.id},sr(K,{component:"li",sx:{"& > img":{mr:2,flexShrink:0}},children:n7(o7,{container:!0,alignItems:"center",children:[sr(o7,{children:sr(K,{sx:{color:"text.secondary",mr:2},children:f})}),sr(o7,{size:"grow",children:sr(G,{variant:"body2",children:b.name})})]})}))}),n7(K,{sx:{display:"flex",flexWrap:"wrap",gap:.5,mt:T?.length>0?"0.5rem":""},children:[!h&&T?.length>0&&sr(St,{avatar:f,label:T[T.length-1]?.name,size:"small",onDelete:()=>E(T[T.length-1]?.id),deleteIcon:sr(Gt,{title:`Remove ${n}`,children:sr(Ct,{style:qr})})},T[T.length-1]?.id),h&&T?.map(C=>sr(St,{avatar:sr(hx,{...qr}),label:C.name,size:"small",onDelete:()=>E(C.id),deleteIcon:sr(Gt,{title:`Remove ${n}`,children:sr(Ct,{style:qr})})},C.id)),T?.length>1&&sr(G,{onClick:()=>g(!h),sx:{cursor:"pointer"},children:h?"(hide)":`(+${T?.length-1})`})]})]})},oF=I7e;import{styled as K2}from"@mui/material";var aF=K2("div")(({theme:e})=>({padding:"2.5rem",margin:"2rem 0",backgroundColor:e.palette.grey.A400,display:"flex",border:`1px solid ${e.palette.common.black}`,justifyContent:"space-between",transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)","&:hover":{transition:"background 150ms ease-out 0s, border 150ms ease-out 0s, transform 150ms ease-out 0s",transform:"translate3d(0px, -1px, 0px)",boxShadow:`${e.palette.common.black} 0px 8px 16px 0px`},"@media screen and (max-width: 992px)":{padding:"1.5rem"},"@media screen and (max-width: 500px)":{padding:"0.75rem"}})),nF=K2("div")({display:"inline-flex"}),iF=K2("div")(({theme:e})=>({fontSize:"2rem",margin:"0 2rem 0 1rem",color:e.palette.grey[800],alignSelf:"center",transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"})),lF=K2("div")(({theme:e})=>({h2:{margin:"0.25rem 0"},p:{margin:"0.35rem 0",color:e.palette.grey[800],transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"}}));import{jsx as $2,jsxs as sF}from"react/jsx-runtime";var M7e=({chapterNum:e,chapter:t})=>$2(aF,{id:t.frontmatter.courseTitle?t.frontmatter.courseTitle:void 0,children:sF(nF,{children:[$2(iF,{children:e}),sF(lF,{children:[$2("h2",{children:t.frontmatter.chapterTitle?t.frontmatter.chapterTitle:t.frontmatter.courseTitle}),$2("p",{children:t.frontmatter.description})]})]})}),uF=M7e;import{useMediaQuery as L7e,useTheme as D7e}from"@mui/material";import F7e,{useState as N7e}from"react";import{styled as Of}from"@mui/material/styles";var OCt=Of("div")(({theme:e})=>({marginLeft:".5rem",color:e.palette.background.secondary})),fF=Of(Sd)({overflowY:"auto",scrollbarWidth:"none","&::-webkit-scrollbar":{width:"0em"}}),dF=Of(Tr)(()=>({pointerEvents:"auto",margin:"0.5rem 0rem 0.5rem 0rem",fontSize:"0.1rem",padding:"0"})),pF=Of(Tr)(()=>({pointerEvents:"auto",margin:"0rem 0rem 0rem 0.5rem",fontSize:"0.1rem"})),mF=Of("div")({marginRight:"0.75rem",marginLeft:"0.5rem"}),cF=Of("div")({marginRight:"0.5rem"});import{jsx as Ea,jsxs as Y2}from"react/jsx-runtime";var B7e=({navigationItems:e,MenuListProps:t={},ListItemTextProps:r={}})=>{let o=D7e(),a=L7e(o.breakpoints.up("sm")),[n,i]=N7e(null),l=(s,u)=>{u.stopPropagation(),i(f=>f===s?null:s)};return Ea(fF,{...t,dense:!0,children:e.map(s=>{let u=n===s.id,f=s.permission??!0,d=s.addDivider??!1;return!(s.showOnWeb??!0)&&a?null:Y2(F7e.Fragment,{children:[Y2(mt,{disabled:!f,onClick:s.onClick,"data-testid":`nav-item-${s.id}`,children:[Y2(dF,{children:[s.icon&&Ea(mF,{children:s.icon}),Ea(qt,{primary:s.title,...r})]}),s.subItems&&Ea(qt,{"data-testid":`nav-toggle-${s.id}`,children:u?Ea(Vi,{onClick:m=>l(s.id,m)}):Ea(So,{onClick:m=>l(s.id,m)})})]}),s.subItems&&Ea(oa,{in:u,timeout:"auto",unmountOnExit:!0,variant:"submenu",children:s.subItems.map(m=>Ea(mt,{disabled:!m.permission,onClick:m.onClick,"data-testid":`nav-subitem-${m.id}`,children:Y2(pF,{children:[m.icon&&Ea(cF,{children:m.icon}),Ea(qt,{primary:m.title,...r})]})},m.id))}),d&&Ea(na,{})]},s.id)})})},xF=B7e;import{styled as l7}from"@mui/material";import{jsx as i7,jsxs as q7e}from"react/jsx-runtime";var H7e=l7("div")(({type:e,theme:t})=>({fontWeight:500,background:"#212529",color:"inherit",marginTop:"2rem",width:"100%",height:"100%",marginBottom:"2rem",padding:"0.5rem 1rem",borderRadius:0,borderStyle:"solid",borderColor:e==="warning"?t.palette.text.warning:t.palette.background.brand?.default,borderWidth:"0 0 0 4px"})),V7e=l7("h4")(({type:e,theme:t})=>({color:e==="warning"?t.palette.text.warning:t.palette.background.brand?.default,fontSize:"1.35rem"})),U7e=l7("p")(({theme:e})=>({color:e.palette.text.inverse})),W7e=({type:e="note",title:t,content:r})=>q7e(H7e,{type:e,children:[i7(V7e,{type:e,children:t}),i7(U7e,{children:i7(l2,{content:r})})]}),hF=W7e;import{Resizable as j7e}from"re-resizable";import K7e from"react-draggable";import{jsx as Xp,jsxs as z7e}from"react/jsx-runtime";var G7e=({height:e=24,width:t=24,fill:r="#E8EFF3",...o})=>z7e("svg",{width:t,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...o,children:[Xp("g",{clipPath:"url(#clip0_34897_172744)",children:Xp("path",{d:"M6 10C4.9 10 4 10.9 4 12C4 13.1 4.9 14 6 14C7.1 14 8 13.1 8 12C8 10.9 7.1 10 6 10ZM18 10C16.9 10 16 10.9 16 12C16 13.1 16.9 14 18 14C19.1 14 20 13.1 20 12C20 10.9 19.1 10 18 10ZM12 10C10.9 10 10 10.9 10 12C10 13.1 10.9 14 12 14C13.1 14 14 13.1 14 12C14 10.9 13.1 10 12 10Z",fill:r})}),Xp("defs",{children:Xp("clipPath",{id:"clip0_34897_172744",children:Xp("rect",{width:"24",height:"24",fill:"white"})})})]}),s7=G7e;var tyt=L(Tr)(({theme:e})=>({padding:e.spacing(.5,.5),marginBlock:e.spacing(1),"& .MuiListItemText-primary":{fontSize:"1rem",textTransform:"capitalize",fontWeight:700},cursor:"pointer","&:hover":{backgroundColor:e.palette.action.hover},"& .MuiSvgIcon-root":{opacity:0,transition:"opacity 0.2s"},"&:hover .MuiSvgIcon-root":{opacity:1}})),ryt=L(Tr,{shouldForwardProp:e=>e!=="isVisible"})(({theme:e,isVisible:t})=>({padding:e.spacing(.05,.5),fontStyle:t?"normal":"italic",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap","& .MuiSvgIcon-root":{height:20,width:20},"& .MuiListItemIcon-root":{minWidth:0,opacity:t?.8:.3},"& .MuiTypography-root":{fontSize:"0.9rem",opacity:t?1:.5}})),gF=L("div")(({theme:e})=>({display:"flex",alignItems:"center",padding:e.spacing(4,2),alignContent:"stretch",justifyContent:"space-between",cursor:"move",background:e.palette.mode==="light"?"linear-gradient(90deg, #3B687B 0%, #507D90 100%)":"linear-gradient(90deg, #28353A 0%, #3D4F57 100%)",height:"3rem",flexShrink:0})),TF=L(K)(({theme:e})=>({padding:e.spacing(2),backgroundColor:e.palette.background.surfaces,overflow:"auto",flex:1,minHeight:0})),SF=L("div")({height:"100%",display:"flex",flexDirection:"column",minHeight:"3rem"}),CF=L(K)(({theme:e,intitialPosition:t})=>({borderRadius:"8px",overflow:"hidden",flexShrink:0,zIndex:100,position:"absolute",backgroundColor:e.palette.background.blur?.light,boxShadow:`0 4px 16px ${e.palette.background.blur?.light}`,maxHeight:"80%",display:"flex",boxSizing:"border-box",...t})),yF=L(s7)(({theme:e})=>({fill:e.palette.common.white,position:"absolute",top:"-0.3rem",left:"50%"})),bF=L("div")({display:"flex",gap:"1rem",justifyContent:"flex-end",alignItems:"center"}),vF=L("div")({display:"flex",justifyContent:"end",alignItems:"center",flex:"1"}),Z2=L(rt)(({theme:e})=>({color:e.palette.common.white})),wF=L("div")(()=>({position:"absolute",left:"0",right:"0",marginInline:"auto",width:"fit-content"}));import{jsx as er,jsxs as u7}from"react/jsx-runtime";var $7e=({isOpen:e,id:t="panel",children:r,areAllExpanded:o,toggleExpandAll:a,handleClose:n,defaultSize:i,intitialPosition:l,sx:s,minimizePanel:u,title:f=""})=>{let d=te();return e?er(K7e,{handle:".drag-handle",children:er(CF,{intitialPosition:l,sx:s,children:er(j7e,{defaultSize:{width:i?.width||"18rem",height:i?.height||"auto"},onResize:()=>{window.dispatchEvent(new Event("panel-resize"))},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},children:er(SF,{children:u7(zr,{children:[er("div",{className:"drag-handle",children:u7(gF,{children:[er(K,{display:"flex",justifyContent:"flex-end",padding:"8px",children:a&&er(Gt,{title:o?"Collapse All":"Expand All",children:er(Z2,{onClick:a,children:o?er(b4,{}):er(O4,{})})})}),er(yF,{}),u7(vF,{children:[er(bF,{id:`${t}-panel-header-actions-container`}),er(wF,{children:f}),u&&er(Z2,{onClick:u,children:er(Pd,{fill:d.palette.common.white})}),er(Z2,{onClick:n,children:er(Ct,{fill:d.palette.common.white})})]})]})}),er(TF,{className:"panel-body",children:r})]})})})})}):null},EF=({...e})=>er($7e,{...e});import{memo as WF,useMemo as Z7e}from"react";var Syt=L(K)(()=>({padding:"1rem",borderRadius:"1rem",backgroundColor:"white",width:"100%",alignSelf:"center",height:"20rem",marginBottom:"1rem",boxShadow:"0px 2px 10px rgba(0, 0, 0, 0.2)",display:"block","@media (max-width:900px)":{height:"18rem",marginInline:"0",padding:"0.5rem"}})),Cyt=L("div")(()=>({width:"100%",justifyContent:"center",display:"flex",alignItems:"center",marginTop:"20px"})),yyt=L(K)(()=>({display:"flex",justifyContent:"space-evenly",gap:"2.5rem",width:"100%"})),byt=L(K)(()=>({display:"flex",flexWrap:"wrap",justifyContent:"space-evenly",gap:"2.5rem",width:"100%"})),vyt=L("div")(({theme:e})=>({backgroundColor:e.palette.common.white,textAlign:"center",borderRadius:"1rem",width:"100%",padding:"1.5rem",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"})),f7=L(K)(({theme:e})=>({background:e.palette.mode==="light"?e.palette.background.default:e.palette.background.secondary,paddingTop:e.spacing(2),borderRadius:"1rem",display:"flex",alignItems:"center",flexDirection:"column"})),RF=L(K)(({theme:e})=>({paddingInline:e.spacing(2),display:"flex",alignItems:"center",placeSelf:"flex-start",justifyContent:"space-between",width:"100%"})),OF=L(G)(({theme:e})=>({fontSize:"1.5rem",fontWeight:600,color:e.palette.text.default})),AF=L(gr)(({theme:e})=>({width:"200px",margin:"0.5rem",height:"100%",borderRadius:"1rem",position:"relative",overflow:"hidden",transition:"all 0.3s ease-in-out",background:f2(e.palette.mode==="light"),border:"1px solid transparent",boxShadow:"2px 2px 3px 2px rgb(0, 211, 169, 0.5)","&:hover":{transform:"translateY(-4px)",boxShadow:`2px 2px 3px 2px ${e.palette.text.brand}`,cursor:"pointer"}})),PF=L("div")(()=>({display:"flex",gap:"10px",flexWrap:"nowrap",justifyContent:"center",width:"100%"})),_F=L(K)(()=>({width:"2rem",height:"2rem",padding:"0.25rem",borderRadius:"8px",backgroundColor:"#D6FFF7",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.3s ease","& svg":{transition:"transform 0.3s ease"},"&:hover svg":{transform:"scale(1.2)"},"& .clone-icon":{width:"20px",height:"20px"}})),IF=L(Da)(()=>({height:"100%",display:"flex",flexDirection:"column",padding:"12px",paddingBottom:"0px !important"})),kF=L(K)({display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:"0.5rem",gap:"0.6rem"}),MF=L(G)(({theme:e})=>({fontSize:"0.85rem",fontWeight:"bold",color:e.palette.text.default,lineHeight:1.2,marginTop:"4px",textTransform:"uppercase",letterSpacing:"0.5px",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"clip",maxWidth:"70%",height:"2.4em"})),LF=L(G)(({theme:e})=>({fontSize:"24px",fontWeight:700,color:e.palette.icon.secondary,marginBottom:"0.5rem",lineHeight:1.2})),wyt=L(K)(({theme:e})=>({marginBottom:"1rem",padding:"8px",borderRadius:"8px",background:e.palette.mode==="light"?"#f8fafc":hn,color:e.palette.mode==="light"?"rgba(26, 26, 26, .8)":e.palette.text.default,transition:"background 0.3s ease, filter 0.3s ease","&:hover":{filter:"brightness(0.98)"}})),DF=L(G)(({theme:e})=>({fontSize:"0.9rem",fontWeight:1e3,color:e.palette.text.default,lineHeight:1.3,marginBottom:"4px",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis",minHeight:"fit-content",maxHeight:"2.6em"})),FF=L(G)({fontSize:"0.75rem",marginBottom:"8px"}),NF=L(K)(({theme:e})=>({display:"flex",gap:"15px",width:"100%",padding:"20px",background:e.palette.mode==="light"?e.palette.background.default:e.palette.background.secondary,borderRadius:"12px",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.05)",paddingBottom:e.spacing(3)})),BF=L(K)(({theme:e})=>({padding:"1rem",color:e.palette.text.error,fontSize:"1rem",fontWeight:500}));import{jsx as dl,jsxs as Y7e}from"react/jsx-runtime";var HF=({open:e,handleClick:t})=>{let r=te();return dl(ce,{title:e?"Hide Performers":"Show Performers",placement:"bottom",children:dl("span",{children:Y7e(Ae,{variant:"contained",onClick:t,sx:{height:"3.7rem",padding:"0.3rem 1rem 0.3rem 0.3rem"},style:{backgroundColor:e?void 0:r.palette.background.constant?.disabled},children:[dl(Xl,{style:{height:"2rem",width:"2rem",marginRight:"10px"}}),e?"Hide Performers":"Show Performers"]})})})},VF=({handleClick:e})=>dl(ce,{title:"Open Leaderboard",placement:"bottom",children:dl(Ae,{variant:"contained",onClick:e,sx:{height:"3.7rem",padding:"0.3rem",display:{xs:"inline-flex",sm:"none"}},children:dl(Xl,{style:{height:"2rem",width:"2rem"}})})}),UF=()=>dl(PF,{children:[...Array(5)].map((e,t)=>dl(X3,{variant:"rounded",height:"13.5rem",width:"inherit",sx:{minWidth:"150px"},style:{borderRadius:"1rem"}},t))});import{jsx as Er,jsxs as jn}from"react/jsx-runtime";var Q7e={pathType:"pattern",page:0,pagesize:1,metrics:!0,expandUser:!0,trim:!0},d7={view:{label:"Most Opens",id:"open",countKey:"view_count"},clone:{label:"Most Clones",id:"clone",countKey:"clone_count"},download:{label:"Most Downloads",id:"download",countKey:"download_count"},deployment:{label:"Most Deploys",id:"deployments",countKey:"deployment_count"},share:{label:"Most Shares",id:"share",countKey:"share_count"}},Jp=e=>({...Q7e,order:`${d7[e].countKey} desc`}),X7e=({label:e,countKey:t,count:r,patternName:o,pattern:a,userName:n,status:i,id:l,onCardClick:s,onIconClick:u})=>{let f=()=>{s(a)},d=(m,x)=>{m.stopPropagation(),u(x)},p=te();return Er(AF,{elevation:0,status:i,onClick:f,children:jn(IF,{cardId:l,children:[jn(kF,{children:[Er(MF,{children:e}),Er(_F,{onClick:m=>d(m,`${t}+desc`),children:Er(W4,{...Co,fill:p.palette.common.black})})]}),Er(LF,{children:r}),jn(K,{children:[Er(DF,{children:o}),jn(FF,{children:["by ",n]})]})]})})},tr=(e={})=>({search:e.search??"",order:e.order??"",pagesize:e.pagesize??0,page:e.page??0,...e}),qF=WF(X7e);qF.displayName="StatCard";var J7e=e=>{let t=e(tr(Jp("view"))),r=e(tr(Jp("clone"))),o=e(tr(Jp("download"))),a=e(tr(Jp("deployment"))),n=e(tr(Jp("share"))),i={view:t,clone:r,download:o,deployment:a,share:n};return{queries:i,isLoading:Object.values(i).some(l=>l.isLoading),hasError:Object.values(i).some(l=>l.isError)}},eSe=(e,t)=>{let r=e[t],o=d7[t],a=r?.isSuccess&&r.data?.patterns?.[0];return a?{label:o.label,countKey:o.countKey,count:a[o.countKey],patternName:a.name||"Unknown",pattern:a,userName:a.user?.first_name||"Unknown",id:o.id,status:a?.catalog_data?.content_class}:null},tSe=({useGetCatalogFilters:e,onCardClick:t,onIconClick:r,onOpenLeaderboard:o})=>{let a=te(),{queries:n,isLoading:i,hasError:l}=J7e(e),s=SE(a.breakpoints.down("sm")),u=Z7e(()=>Object.keys(d7).map(d=>eSe(n,d)).filter(d=>!!d),[n]);if(l)return Er(f7,{children:Er(BF,{children:"Error loading statistics. Please try again later."})});let f=u.map((d,p)=>Er(qF,{...d,onCardClick:t,onIconClick:r},`${d.id}-${p}`));return Er(zr,{children:jn(f7,{children:[jn(RF,{children:[jn(K,{display:"flex",alignItems:"center",gap:1,children:[Er(OF,{children:"Top Performers"}),Er(Xl,{style:{height:"2rem",width:"2rem",color:a.palette.icon.secondary,display:s?"none":"inline-flex"}})]}),o&&Er("div",{children:jn(Ae,{variant:"contained",onClick:()=>o(),children:[Er(Xl,{style:{height:"2rem",width:"2rem",display:s?"inline-flex":"none"}}),Er("p",{style:{margin:0,display:s?"none":"inline-flex"},children:"Open Leaderboard"})]})})]}),jn(NF,{children:[i&&Er(UF,{}),Er(Wu,{items:f})]})]})})},GF=WF(tSe);import{styled as Kn}from"@mui/material";var zF=Kn("div")({padding:"1rem 0","& h2":{margin:"1rem 0"},".get-started-desc":{margin:"1rem"}}),jF=Kn("div")(({theme:e})=>({display:"flex",cursor:"pointer",flexDirection:"row",flexWrap:"wrap","& a":{color:e.palette.text.primary,margin:"1rem"}})),KF=Kn("a")(({theme:e})=>({flex:"1",padding:"2rem",textDecoration:"none",background:e.palette.mode==="light"?"#EEEEEE":"#212121",minHeight:"21.5rem",transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)",borderRadius:"10px","&:hover":{boxShadow:`${e.palette.background.brand?.default} 0px 0px 7px`},"& a":{margin:"0 !important","&:hover":{color:e.palette.background.brand?.default}}})),$F=Kn("div")({display:"flex",alignItems:"center",gap:"1rem"}),$yt=Kn("div")({flex:"0 0 25%",alignSelf:"center",margin:"0 0.5rem"}),Yyt=Kn("img")({height:"3rem",width:"3rem",maxWidth:"3rem",margin:"auto"}),Zyt=Kn("svg")(({theme:e})=>({fontSize:"4.15rem",alignSelf:"center",flex:"0 0 25%",margin:"0 0.5rem",filter:e.palette.mode==="light"?"0%":"invert(100%)",transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"})),Qyt=Kn("h2")({fontSize:"1.75rem",margin:"1rem 0"}),Xyt=Kn("p")(({theme:e})=>({color:e.palette.text.primary,transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"}));import{jsx as Af,jsxs as Q2}from"react/jsx-runtime";var rSe=({Steps:e,PrerequisiteLine:t})=>Q2(zF,{children:[Q2("div",{className:"get-started-desc",id:"pre-requisites",children:[Af("h2",{children:"Prerequisites"}),Af("p",{children:t})]}),Af(jF,{id:"Set up",children:e.map((r,o)=>Q2(KF,{href:r.url,target:"_blank",children:[Q2($F,{children:[Af("h2",{children:r.heading}),typeof r.Icon=="string"?Af("img",{src:r.Icon,alt:r.heading,width:"40px",height:"40px"}):r.Icon]}),Af("p",{children:r.description})]},o))})]}),YF=rSe;import{styled as oSe}from"@mui/material";var aSe=oSe("div")(({theme:e})=>({color:e.palette.text.primary,transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)",".chapter-sub-heading, .chapter-sub-heading a":{color:e.palette.mode==="light"?l4:s4,transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"},".chapter-alt-heading, .chapter-alt-heading a":{color:"gray"},"& a":{color:e.palette.background.brand?.default,textDecoration:"underline","&:hover":{color:e.palette.background.brand?.default}},"& p > code":{color:"inherit",padding:".2em .4em",margin:"0",fontSize:"85%",wordBreak:"normal",backgroundColor:e.palette.background.code,borderRadius:".25rem"},"& pre":{backgroundColor:"#011627",padding:"1em",borderRadius:"0.5rem",overflowX:"auto",color:"#d6deeb",position:"relative",textAlign:"left",width:"100%",margin:"1rem auto autocompleteClasses",fontFamily:"Courier New, Courier, monospace"},"& li code":{color:"inherit",padding:".2em .4em",margin:"0",fontSize:"85%",wordBreak:"normal",backgroundColor:e.palette.background.code,borderRadius:".25rem"},"& li a":{color:e.palette.text.default,textDecoration:"underline","&:hover":{color:e.palette.background.brand?.default}}})),ZF=aSe;import{Fragment as oN}from"react";import{styled as Rs}from"@mui/material";var QF=Rs("div")({width:"52rem",maxWidth:"90%"}),XF=Rs("div")({display:"flex",alignItems:"center",background:"#323339",width:"100%",height:"2.875rem",borderRadius:"2px 2px 0 0"}),dbt=Rs("div")({color:"#76767d",fontFamily:"'Courier New', Courier, monospace",fontSize:"13.5px",margin:"0 auto"}),JF=Rs("ul")({position:"absolute",display:"block",listStyle:"none",marginLeft:"1rem",marginTop:"0",marginBottom:"0",padding:"0","& li":{display:"inline-block",width:"0.875rem",height:"0.875rem",background:"#1d1e23",borderRadius:"0.75rem",marginRight:"7px"}}),eN=Rs("div")({width:"100%",height:"100%",background:"#1d1e23",borderRadius:"0 0 2px 2px",padding:"24px 32px"}),tN=Rs("div")({width:"100%",height:"100%",position:"relative",overflow:"scroll",msOverflowStyle:"none",scrollbarWidth:"none","&::-webkit-scrollbar":{WebkitAppearance:"none",width:"0",height:"0"},"&.no-scroll-overflow-wrapper":{"& .code-wrapper":{bottom:"0",position:"absolute",minHeight:"100%"}}}),rN=Rs("div")(({theme:e})=>({"& pre":{padding:"0",margin:"0",width:"100%",height:"100%",fontStyle:"normal",fontWeight:"normal",fontSize:"12px",lineHeight:"27px",whiteSpace:"pre-wrap",color:e.palette.info.main,"&.short":{lineHeight:"16px"},"&.navy":{color:"#66a2ff"},"&.gray":{color:"#bdbec2"},"&.white":{color:"#fff"},wrapWord:"normal",[e.breakpoints.up("sm")]:{fontSize:"13.5px",lineHeight:"26px"}}}));import{jsx as $n,jsxs as X2}from"react/jsx-runtime";var nSe=({lines:e,title:t,noScroll:r})=>X2(QF,{children:[X2(XF,{children:[X2(JF,{children:[$n("li",{style:{backgroundColor:"red"}}),$n("li",{style:{backgroundColor:"yellow"}}),$n("li",{style:{backgroundColor:"green"}})]}),t&&$n("div",{className:"title",children:t})]}),$n(eN,{children:$n(tN,{className:r?"no-scroll-overflow-wrapper":"",children:$n(rN,{children:e&&e.map((o,a)=>$n(oN,{children:X2("pre",{className:`${o.short?"short":""}`,style:{color:o.color?o.color:"blue"},children:[o.indent&&new Array(o.indent*2).fill({}).map((n,i)=>$n(oN,{children:"\xA0"},i)),o.code]})},a))})})})]}),aN=nSe;import{styled as iSe}from"@mui/material";var nN=iSe("div")(({theme:e})=>({".chapter-back":{display:"flex",justifyContent:"space-between",alignItems:"center","& a":{display:"inline-flex","& svg":{alignSelf:"center",fontSize:"1.5rem",color:e.palette.grey[600],width:"100%",maxWidth:"1.5rem"},"& h4":{fontWeight:500,textTransform:"capitalize",fontSize:"1.25rem"},"&:hover":{"& svg, & h4":{color:e.palette.text.primary}}},".toc-toggle-btn":{display:"none"},".toc-menu-icon":{width:"1.5rem",height:"1.5rem",cursor:"pointer",fill:e.palette.secondary.main,transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"}},".toc-list":{"& ul":{position:"relative",paddingInlineStart:"2.65rem",MozPaddingStart:"2.65rem","&::after":{position:"absolute",inset:"1rem auto 1rem 1.7rem",width:"auto",height:"auto",borderLeft:"1px solid rgba(177, 182, 184, 0.25)",content:'""',zIndex:0},"& li":{width:"fit-content",margin:"1rem 0","&::marker":{color:"rgba(177, 182, 184, 0.75)"},"& p":{margin:0,fontSize:"1rem","& a":{color:e.palette.mode==="light"?"rgb(0 0 0 / 0.65)":"rgb(255 255 255 / 0.65)",transition:"0.8s cubic-bezier(0.2, 0.8, 0.2, 1)"}},"&:hover":{"&::marker, & p, & a":{color:e.palette.background.brand?.default}}},".active-link":{"&::marker, & p, & a":{color:e.palette.background.brand?.default}}}}}));import{jsx as J2,jsxs as sSe}from"react/jsx-runtime";var lSe=({availableChapters:e,currentChapter:t,onClick:r})=>{let o=a=>a.split("-").map(l=>l.charAt(0).toUpperCase()+l.slice(1)).join(" ");return J2(nN,{children:J2("div",{className:"toc-list",children:J2("ul",{className:"toc-ul toc-ul-open",children:e.map(a=>J2("li",{className:a+".mdx"===t?"active-link":"",onClick:n=>{r(a,n)},children:sSe("p",{className:"toc-item",children:[" ",o(a)]})},a))})})})},iN=lSe;import{useState as fSe}from"react";import{styled as uSe}from"@mui/material";var lN=uSe("div")(({theme:e})=>({position:"sticky",top:"10rem",left:0,marginLeft:"-3rem",".go-back":{margin:"1rem 0",display:"flex",justifyContent:"space-between",alignItems:"center","& a":{display:"inline-flex","& svg":{alignSelf:"center",fontSize:"1.5rem",color:e.palette.text.disabled,width:"100%",maxWidth:"1.5rem"},"& h4":{fontWeight:500,textTransform:"capitalize",fontSize:"1.25rem",whiteSpace:"nowrap"},"&:hover":{"& svg, & h4":{color:e.palette.text.primary}}}},".toc-toggle-btn":{display:"none"},".toc-ul-open":{display:"flex",flexDirection:"column",marginTop:"0rem",listStyle:"none",height:"auto !important",opacity:"1 !important",transition:"all .4s !important"},".toc-menu-icon":{width:"1.5rem",height:"1.5rem",cursor:"pointer",fill:e.palette.common.white},".toc-sub-heading":{marginTop:"1rem",fontWeight:500,fontSize:"1.15rem"},".toc-item":{lineHeight:"1.5rem"},".toc-list":{"& ul":{position:"relative",paddingInlineStart:"1.5rem",listStyleType:"none","& li":{margin:"1rem 0 1rem 0.5rem",width:"fit-content","&::marker":{color:"rgba(177, 182, 184, 0.75)"},"& p":{margin:0,fontSize:"1rem","& a":{color:"rgba(0, 0, 0, 0.65)"}},"&:hover":{"&::marker, & p, & a":{color:e.palette.secondary.contrastText}}},".active-link":{"&::marker, & p, & a":{color:e.palette.secondary.contrastText}}}},"@media only screen and (max-width: 991px)":{position:"initial",marginLeft:"-0.5rem",width:"auto",".toc-toggle-btn":{display:"flex"},".go-back":{marginLeft:0},".toc-ul":{opacity:0,height:0,transition:"none",paddingLeft:".8rem !important"},".toc-item":{lineHeight:".8rem"}}}));import{jsx as Dr,jsxs as e5}from"react/jsx-runtime";var dSe=[{name:"Set up",link:"/cloud-native-management/meshery"},{name:"Run Meshery",link:"/cloud-native-management/meshery/getting-started"},{name:"Manage Meshery",link:"/cloud-native-management/meshery/operating-service-meshes"}],pSe=({coursesData:e})=>{let[t,r]=fSe(!1);return e5(lN,{children:[e5("div",{className:"go-back",children:[e5("a",{href:"/learn/learning-paths",children:[Dr(y4,{}),Dr("h4",{children:"Learning Paths"})]}),Dr("div",{className:"toc-toggle-btn",children:t?Dr(Ct,{className:"toc-menu-icon",onClick:()=>{r(!t)}}):Dr(Ad,{className:"toc-menu-icon",onClick:()=>{r(!t)}})})]}),Dr("div",{className:"toc-list",children:e5("ul",{className:`toc-ul ${t?"toc-ul-open":""}`,children:[Dr("a",{href:"#pre-requisites",children:Dr("h5",{className:"toc-sub-heading",children:"Pre-requisites"})}),dSe.map((o,a)=>Dr("li",{children:Dr("p",{className:"toc-item",children:Dr("a",{href:`#${o.name}`,children:o.name})})},a)),Dr("a",{href:"#courses-list",children:Dr("h5",{className:"toc-sub-heading",children:"Courses"})}),e.map((o,a)=>Dr("li",{children:Dr("p",{className:"toc-item",children:Dr("a",{href:`#${o.frontmatter.courseTitle}`,children:o.frontmatter.courseTitle})})},a))]})})]})},sN=pSe;import{Button as mSe}from"@mui/material";import cSe from"@mui/material/Autocomplete";import uN from"@mui/material/CircularProgress";import{useState as t5}from"react";import{useDebounce as xSe}from"use-debounce";import{Fragment as p7,jsx as Rr,jsxs as e1}from"react/jsx-runtime";var hSe=({usersData:e,disabled:t=!1,shareWithNewUsers:r,useGetAllUsersQuery:o})=>{let[a,n]=t5(!1),[i,l]=t5(""),[s,u]=t5([]),[f,d]=t5(!1),p=te(),[m]=xSe(i,300),{data:x,isLoading:h}=o({search:m,page:0,pagesize:10},{skip:m.trim().length==0}),g=x?.data??[],T=async()=>{console.log("users to share with",s);try{d(!0);let b=await r(s);b.error?n(b.error):u([])}catch(b){console.log("error while sharing",b)}finally{d(!1)}},w=(b,A)=>{A&&(u(A),l(""))},E=(b,A,B)=>{B==="input"?l(A):B==="clear"&&l("")},I=g.filter(b=>!s.concat(e).find(A=>A.email===b.email)),D=t||f||s.length===0,C=({avatarObj:b,...A})=>Rr(St,{avatar:Rr(Mt,{alt:b.first_name,src:b.avatar_url,children:b.avatar_url?"":b.first_name?.charAt(0)}),label:b.email,size:"small",...A},b.user_id);return Rr(p7,{children:e1(K,{display:"flex",alignItems:"center",justifyContent:"space-between",gap:1,children:[Rr(cSe,{id:"user-search-field",sx:{width:"100%"},filterOptions:b=>b,options:I,renderTags:(b,A)=>b.map((B,P)=>Rr(C,{avatarObj:B,...A({index:P})})),disableClearable:!0,includeInputInList:!0,filterSelectedOptions:!0,multiple:!0,disableListWrap:!0,disabled:f,inputValue:i,loading:h,value:s,getOptionLabel:b=>b.email,noOptionsText:h?"Loading...":i==""?"Search using name or email":"No users found",onChange:w,onInputChange:E,isOptionEqualToValue:(b,A)=>b.email===A.email,renderInput:b=>Rr(Vr,{...b,placeholder:"Add Users",error:!!a,helperText:a,fullWidth:!0,label:"",disabled:D,sx:{"& .MuiOutlinedInput-root":{paddingInline:"0.5rem",paddingBlock:"0.1rem"}},InputProps:{...b.InputProps,endAdornment:Rr(p7,{children:h?Rr(uN,{color:"inherit",size:20}):null})}}),renderOption:(b,A)=>Rr(K,{component:"li",sx:{"& > img":{mr:2,flexShrink:0}},...b,children:e1(me,{container:!0,alignItems:"center",children:[Rr(me,{children:Rr(K,{sx:{color:"text.secondary",mr:2},children:Rr(Mt,{alt:A.first_name,src:A.avatar_url,children:A.avatar_url?"":Rr(bn,{})})})}),Rr(me,{size:"grow",children:A.deleted_at?.Valid?e1(G,{variant:"body2",color:"text.secondary",children:[A.email," (deleted)"]}):e1(p7,{children:[e1(G,{variant:"body2",children:[A.first_name," ",A.last_name]}),Rr(G,{variant:"body2",color:"text.secondary",children:A.email})]})})]})})}),Rr(mSe,{variant:"contained",sx:{"&.Mui-disabled":{color:`${p.palette.text.secondary} !important`,backgroundColor:`${p.palette.action.disabled} !important`}},onClick:T,disabled:D,children:f?Rr(uN,{size:24,sx:{color:"#fff"}}):"Share"})]})})},m7=hSe;import{Autocomplete as gSe}from"@mui/material";import TSe,{useCallback as c7,useEffect as SSe,useMemo as CSe,useState as Pf}from"react";import{Fragment as fN,jsx as wt,jsxs as Os}from"react/jsx-runtime";var ySe=({usersData:e,setUsersData:t,label:r="Add User",setDisableSave:o,handleNotifyPref:a,notifyUpdate:n,isCreate:i,searchType:l,disabled:s=!1,currentUserData:u,searchedUsers:f=[],isUserSearchLoading:d,fetchSearchedUsers:p,usersSearch:m,setUsersSearch:x})=>{let[h,g]=Pf(""),[T,w]=Pf(!1),[E,I]=Pf(!1),[D,C]=Pf(!0),[b,A]=Pf(""),[B,P]=Pf(e||[]);SSe(()=>{P(e||[])},[e]);let Q=CSe(()=>{if(D&&!m&&u)return[u];let N=f.filter(M=>M.user_id!==u?.user_id);return!m&&u?[u,...N]:N},[f,u,m,D,B]),Z=c7((N,M)=>{M.stopPropagation();let k=B.filter(F=>F.user_id!==N);P(k),t(k),o&&o(!1)},[B,t,o,p,b]),H=c7((N,M)=>{if(!M)return;let k=B.some(V=>V.user_id===M.user_id),F=M.deleted_at?.Valid===!0;if(k||F){g(k?"User already selected":"User does not exist");return}A(""),x(""),g(""),w(!1),P(V=>[...V,M]),t(V=>[...V,M]),o&&o(!1)},[B,t,o,x]),q=c7((N,M)=>{if(A(M),M==="")w(!0),x(""),C(!0);else{let k=encodeURIComponent(M);p(k),g(""),w(!0),C(!1)}},[p]);return Os(fN,{children:[wt(gSe,{id:"user-search-field",style:{width:"100%"},open:T,options:Q,getOptionLabel:()=>b,isOptionEqualToValue:(N,M)=>N.user_id===M.user_id,onOpen:()=>w(!0),onClose:()=>w(!1),inputValue:b,onChange:H,onInputChange:q,filterOptions:(N,{inputValue:M})=>N.filter(k=>{let F=M.toLowerCase();return k.first_name?.toLowerCase().includes(F)||k.last_name?.toLowerCase().includes(F)||k.email?.toLowerCase().includes(F)}),loading:d,disabled:s,disableClearable:!0,value:void 0,selectOnFocus:!1,blurOnSelect:!0,clearOnBlur:!0,popupIcon:null,forcePopupIcon:!1,noOptionsText:d?"Loading...":"No users found",renderInput:N=>wt(Vr,{...N,label:r,error:!!h,helperText:h,InputLabelProps:{style:{fontFamily:"inherit"}},InputProps:{...N.InputProps,endAdornment:wt(TSe.Fragment,{children:d?wt(Lt,{color:"inherit",size:20}):null})}}),renderOption:(N,M)=>wt("li",{...N,id:M.user_id,children:Os(K,{sx:{"& > img":{mr:2,flexShrink:0}},children:[" ",Os(me,{container:!0,alignItems:"center",children:[wt(me,{children:wt(K,{sx:{color:"text.secondary",mr:2},children:wt(Mt,{alt:M.first_name,src:M.avatar_url,children:M.avatar_url?"":wt(bn,{})})})}),wt(me,{size:"grow",children:M.deleted?Os(G,{variant:"body2",color:"text.secondary",children:[M.email," (deleted)"]}):Os(fN,{children:[Os(G,{variant:"body2",children:[M.first_name," ",M.last_name]}),wt(G,{variant:"body2",color:"text.secondary",children:M.email})]})})]})]})})}),!i&&wt(Y3,{row:!0,children:wt("div",{style:{display:"flex",flexWrap:"nowrap"},children:wt(Wl,{control:wt(Br,{checked:n,onChange:a,name:"notify",color:"primary"}),label:`Notify ${l} of membership change`})})}),Os(K,{sx:{display:"flex",flexWrap:"wrap",gap:.5,mt:e?.length>0?"0.5rem":""},children:[!E&&B?.[0]&&wt(St,{avatar:wt(Mt,{alt:B[0].first_name,src:B[0].avatar_url,children:!B[0].avatar_url&&B[0].first_name?.[0]}),label:B[0].email,onDelete:N=>Z(B[0].user_id,N),deleteIcon:wt(Gt,{title:"Remove user",children:wt(Ct,{style:qr})}),size:"small"},B[0].user_id),E&&B?.map(N=>wt(St,{avatar:wt(Mt,{alt:N.first_name,src:N.avatar_url,children:!N.avatar_url&&N.first_name?.[0]}),label:N.email,onDelete:M=>Z(N.user_id,M),deleteIcon:wt(Gt,{title:"Remove user",children:wt(Ct,{style:qr})}),size:"small"},N.user_id)),B?.length>1&&wt(G,{onClick:()=>I(!E),sx:{cursor:"pointer"},children:E?"(hide)":`(+${B.length-1})`})]})]})},dN=ySe;import{Box as ICe,Stack as FN,Step as kCe,StepConnector as MCe,StepLabel as LCe,Stepper as DCe}from"@mui/material";import{stepConnectorClasses as Lf}from"@mui/material/StepConnector";function _f(e,...t){let r=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(o=>r.searchParams.append("args[]",o)),`Minified MUI error #${e}; visit ${r} for the full message.`}import OSe from"@emotion/styled";function pN(e){for(var t=0,r,o=0,a=e.length;a>=4;++o,a-=4)r=e.charCodeAt(o)&255|(e.charCodeAt(++o)&255)<<8|(e.charCodeAt(++o)&255)<<16|(e.charCodeAt(++o)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(a){case 3:t^=(e.charCodeAt(o+2)&255)<<16;case 2:t^=(e.charCodeAt(o+1)&255)<<8;case 1:t^=e.charCodeAt(o)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var mN={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function cN(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var bSe=!1,vSe=/[A-Z]|^ms/g,wSe=/_EMO_([^_]+?)_([^]*?)_EMO_/g,TN=function(t){return t.charCodeAt(1)===45},xN=function(t){return t!=null&&typeof t!="boolean"},x7=cN(function(e){return TN(e)?e:e.replace(vSe,"-$&").toLowerCase()}),hN=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(wSe,function(o,a,n){return Xa={name:a,styles:n,next:Xa},a})}return mN[t]!==1&&!TN(t)&&typeof r=="number"&&r!==0?r+"px":r},ESe="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function t1(e,t,r){if(r==null)return"";var o=r;if(o.__emotion_styles!==void 0)return o;switch(typeof r){case"boolean":return"";case"object":{var a=r;if(a.anim===1)return Xa={name:a.name,styles:a.styles,next:Xa},a.name;var n=r;if(n.styles!==void 0){var i=n.next;if(i!==void 0)for(;i!==void 0;)Xa={name:i.name,styles:i.styles,next:Xa},i=i.next;var l=n.styles+";";return l}return RSe(e,t,r)}case"function":{if(e!==void 0){var s=Xa,u=r(e);return Xa=s,t1(e,t,u)}break}}var f=r;if(t==null)return f;var d=t[f];return d!==void 0?d:f}function RSe(e,t,r){var o="";if(Array.isArray(r))for(var a=0;a<r.length;a++)o+=t1(e,t,r[a])+";";else for(var n in r){var i=r[n];if(typeof i!="object"){var l=i;t!=null&&t[l]!==void 0?o+=n+"{"+t[l]+"}":xN(l)&&(o+=x7(n)+":"+hN(n,l)+";")}else{if(n==="NO_COMPONENT_SELECTOR"&&bSe)throw new Error(ESe);if(Array.isArray(i)&&typeof i[0]=="string"&&(t==null||t[i[0]]===void 0))for(var s=0;s<i.length;s++)xN(i[s])&&(o+=x7(n)+":"+hN(n,i[s])+";");else{var u=t1(e,t,i);switch(n){case"animation":case"animationName":{o+=x7(n)+":"+u+";";break}default:o+=n+"{"+u+"}"}}}}return o}var gN=/label:\s*([^\s;{]+)\s*(;|$)/g,Xa;function SN(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var o=!0,a="";Xa=void 0;var n=e[0];if(n==null||n.raw===void 0)o=!1,a+=t1(r,t,n);else{var i=n;a+=i[0]}for(var l=1;l<e.length;l++)if(a+=t1(r,t,e[l]),o){var s=n;a+=s[l]}gN.lastIndex=0;for(var u="",f;(f=gN.exec(a))!==null;)u+="-"+f[1];var d=pN(a)+u;return{name:d,styles:a,next:Xa}}import{ThemeContext as Tvt,keyframes as Svt,css as Cvt}from"@emotion/react";function h7(e,t){let r=OSe(e,t);return process.env.NODE_ENV!=="production"?(...o)=>{let a=typeof e=="string"?`"${e}"`:"component";return o.length===0?console.error([`MUI: Seems like you called \`styled(${a})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
|
|
93
93
|
`)):o.some(n=>n===void 0)&&console.error(`MUI: the styled(${a})(...args) API requires all its args to be defined.`),r(...o)}:r}function yN(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}var CN=[];function g7(e){return CN[0]=e,SN(CN)}var v7=Nr(y7());import*as b7 from"react";function pl(e){if(typeof e!="object"||e===null)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function wN(e){if(b7.isValidElement(e)||(0,v7.isValidElementType)(e)||!pl(e))return e;let t={};return Object.keys(e).forEach(r=>{t[r]=wN(e[r])}),t}function ml(e,t,r={clone:!0}){let o=r.clone?{...e}:e;return pl(e)&&pl(t)&&Object.keys(t).forEach(a=>{b7.isValidElement(t[a])||(0,v7.isValidElementType)(t[a])?o[a]=t[a]:pl(t[a])&&Object.prototype.hasOwnProperty.call(e,a)&&pl(e[a])?o[a]=ml(e[a],t[a],r):r.clone?o[a]=pl(t[a])?wN(t[a]):t[a]:o[a]=t[a]}),o}var _Se=e=>{let t=Object.keys(e).map(r=>({key:r,val:e[r]}))||[];return t.sort((r,o)=>r.val-o.val),t.reduce((r,o)=>({...r,[o.key]:o.val}),{})};function w7(e){let{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:o=5,...a}=e,n=_Se(t),i=Object.keys(n);function l(p){return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${r})`}function s(p){return`@media (max-width:${(typeof t[p]=="number"?t[p]:p)-o/100}${r})`}function u(p,m){let x=i.indexOf(m);return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${r}) and (max-width:${(x!==-1&&typeof t[i[x]]=="number"?t[i[x]]:m)-o/100}${r})`}function f(p){return i.indexOf(p)+1<i.length?u(p,i[i.indexOf(p)+1]):l(p)}function d(p){let m=i.indexOf(p);return m===0?l(i[1]):m===i.length-1?s(i[m]):u(p,i[i.indexOf(p)+1]).replace("@media","@media not all and")}return{keys:i,values:n,up:l,down:s,between:u,only:f,not:d,unit:r,...a}}function E7(e,t){if(!e.containerQueries)return t;let r=Object.keys(t).filter(o=>o.startsWith("@container")).sort((o,a)=>{let n=/min-width:\s*([0-9.]+)/;return+(o.match(n)?.[1]||0)-+(a.match(n)?.[1]||0)});return r.length?r.reduce((o,a)=>{let n=t[a];return delete o[a],o[a]=n,o},{...t}):t}function R7(e,t){return t==="@"||t.startsWith("@")&&(e.some(r=>t.startsWith(`@${r}`))||!!t.match(/^@\d/))}function O7(e,t){let r=t.match(/^@([^/]+)?\/?(.+)?$/);if(!r){if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The provided shorthand ${`(${t})`} is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.
|
|
94
94
|
For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:_f(18,`(${t})`));return null}let[,o,a]=r,n=Number.isNaN(+o)?o||0:+o;return e.containerQueries(a).up(n)}function p5(e){let t=(n,i)=>n.replace("@media",i?`@container ${i}`:"@container");function r(n,i){n.up=(...l)=>t(e.breakpoints.up(...l),i),n.down=(...l)=>t(e.breakpoints.down(...l),i),n.between=(...l)=>t(e.breakpoints.between(...l),i),n.only=(...l)=>t(e.breakpoints.only(...l),i),n.not=(...l)=>{let s=t(e.breakpoints.not(...l),i);return s.includes("not all and")?s.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):s}}let o={},a=n=>(r(o,n),o);return r(a),{...e,containerQueries:a}}var ISe={borderRadius:4},EN=ISe;var If=Nr(oT()),kSe=process.env.NODE_ENV!=="production"?If.default.oneOfType([If.default.number,If.default.string,If.default.object,If.default.array]):{},Eo=kSe;function MSe(e,t){return t?ml(e,t,{clone:!1}):e}var Yn=MSe;var r1={xs:0,sm:600,md:900,lg:1200,xl:1536},RN={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${r1[e]}px)`},LSe={containerQueries:e=>({up:t=>{let r=typeof t=="number"?t:r1[t]||t;return typeof r=="number"&&(r=`${r}px`),e?`@container ${e} (min-width:${r})`:`@container (min-width:${r})`}})};function Kr(e,t,r){let o=e.theme||{};if(Array.isArray(t)){let n=o.breakpoints||RN;return t.reduce((i,l,s)=>(i[n.up(n.keys[s])]=r(t[s]),i),{})}if(typeof t=="object"){let n=o.breakpoints||RN;return Object.keys(t).reduce((i,l)=>{if(R7(n.keys,l)){let s=O7(o.containerQueries?o:LSe,l);s&&(i[s]=r(t[l],l))}else if(Object.keys(n.values||r1).includes(l)){let s=n.up(l);i[s]=r(t[l],l)}else{let s=l;i[s]=t[s]}return i},{})}return r(t)}function ON(e={}){return e.keys?.reduce((r,o)=>{let a=e.up(o);return r[a]={},r},{})||{}}function AN(e,t){return e.reduce((r,o)=>{let a=r[o];return(!a||Object.keys(a).length===0)&&delete r[o],r},t)}function cl(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":_f(7));return e.charAt(0).toUpperCase()+e.slice(1)}function kf(e,t,r=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&r){let o=`vars.${t}`.split(".").reduce((a,n)=>a&&a[n]?a[n]:null,e);if(o!=null)return o}return t.split(".").reduce((o,a)=>o&&o[a]!=null?o[a]:null,e)}function o1(e,t,r,o=r){let a;return typeof e=="function"?a=e(r):Array.isArray(e)?a=e[r]||o:a=kf(e,r)||o,t&&(a=t(a,o,e)),a}function DSe(e){let{prop:t,cssProperty:r=e.prop,themeKey:o,transform:a}=e,n=i=>{if(i[t]==null)return null;let l=i[t],s=i.theme,u=kf(s,o)||{};return Kr(i,l,d=>{let p=o1(u,a,d);return d===p&&typeof d=="string"&&(p=o1(u,a,`${t}${d==="default"?"":cl(d)}`,d)),r===!1?p:{[r]:p}})};return n.propTypes=process.env.NODE_ENV!=="production"?{[t]:Eo}:{},n.filterProps=[t],n}var pt=DSe;function m5(e){let t={};return r=>(t[r]===void 0&&(t[r]=e(r)),t[r])}var FSe={m:"margin",p:"padding"},NSe={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},PN={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},BSe=m5(e=>{if(e.length>2)if(PN[e])e=PN[e];else return[e];let[t,r]=e.split(""),o=FSe[t],a=NSe[r]||"";return Array.isArray(a)?a.map(n=>o+n):[o+a]}),c5=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],x5=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],A7=[...c5,...x5];function As(e,t,r,o){let a=kf(e,t,!0)??r;return typeof a=="number"||typeof a=="string"?n=>typeof n=="string"?n:(process.env.NODE_ENV!=="production"&&typeof n!="number"&&console.error(`MUI: Expected ${o} argument to be a number or a string, got ${n}.`),typeof a=="string"?`calc(${n} * ${a})`:a*n):Array.isArray(a)?n=>{if(typeof n=="string")return n;let i=Math.abs(n);process.env.NODE_ENV!=="production"&&(Number.isInteger(i)?i>a.length-1&&console.error([`MUI: The value provided (${i}) overflows.`,`The supported values are: ${JSON.stringify(a)}.`,`${i} > ${a.length-1}, you need to add the missing values.`].join(`
|
|
95
95
|
`)):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join(`
|