1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5900],{10768:e=>{e.exports={actions_container:"AdminEpochRequiredVersionsLayout_actions_container__N8dMj"}},10914:function(e,t,a){"use strict";var s,n=this&&this.__createBinding||(Object.create?function(e,t,a,s){void 0===s&&(s=a);var n=Object.getOwnPropertyDescriptor(t,a);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[a]}}),Object.defineProperty(e,s,n)}:function(e,t,a,s){void 0===s&&(s=a),e[s]=t[a]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||(s=function(e){return(s=Object.getOwnPropertyNames||function(e){var t=[];for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[t.length]=a);return t})(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a=s(e),i=0;i<a.length;i++)"default"!==a[i]&&n(t,e,a[i]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.editRequiredVersionYupSchema=t.addRequiredVersionYupSchema=void 0;let l=i(a(47623)),d=a(77012),o=l.string().test("is-semver","Invalid semver format",e=>!e||!!(0,d.valid)(e));function c(e,t){return o.test("is-greater-than-min-version",`${t} max version must be greater than or equal to min version`,(t,a)=>{let s=a.parent[e];return!(t&&(0,d.valid)(s)&&(0,d.valid)(t))||(0,d.lte)(s,t)}).nullable()}let m={agave_min_version:o.required("Agave min version is required"),agave_max_version:c("agave_min_version","Agave"),firedancer_min_version:o.required("Frankendancer min version is required"),firedancer_max_version:c("firedancer_min_version","Frankendancer"),firedancer_full_min_version:o.required("Firedancer (full) min version is required"),firedancer_full_max_version:c("firedancer_full_min_version","Firedancer (full)").transform(e=>""===e?null:e)};t.addRequiredVersionYupSchema=l.object().shape({epoch:l.number().required(),cluster:l.string().oneOf(["mainnet-beta","testnet"]).required(),...m}),t.editRequiredVersionYupSchema=l.object().shape({id:l.number().required(),...m})},19256:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>d,renderNetworkBadge:()=>l});var s=a(6029);a(55729);var n=a(33457),r=a(61017),i=a.n(r);let l=(e,t)=>{if(!e)return null;let a=n.BS[e];return a?(0,s.jsxs)("span",{className:`badge text-uppercase px-2 py-1 border-1 rounded-1 d-flex align-items-center justify-content-center ${i().networkBadge} ${a.className} ${t||""}`,children:[a.icon,a.label]}):null},d=({notifications:e=[],validators:t=[]})=>{let a=[...e].sort((e,t)=>new Date(t.timestamp).getTime()-new Date(e.timestamp).getTime());return(0,s.jsx)("div",{className:"card w-100",children:(0,s.jsxs)("div",{className:"card-body d-flex flex-column pb-0",children:[(0,s.jsxs)("h5",{className:"card-title",children:["Notifications \xa0",(0,s.jsx)("span",{className:"badge bg-secondary",children:a.length})]}),a.length>0?(0,s.jsx)("ul",{className:`list-unstyled overflow-auto flex-grow-1 ${i().notificationsList}`,children:a.map((e,a)=>{let r=t.find(t=>t.validatorPubkey===e?.validatorPubkey),d=l(r?.network)||null;return(0,s.jsxs)("li",{className:"d-flex gap-3 mb-3 border-bottom pb-2",children:[(0,s.jsx)("div",{className:"d-flex align-items-center",children:n.I9[e.action]?.icon??null}),(0,s.jsxs)("div",{className:"d-flex flex-column flex-grow-1 lh-1",children:[(0,s.jsxs)("div",{className:"d-flex justify-content-between align-items-center",children:[(0,s.jsx)("div",{className:"me-2",children:(e=>{let{action:t,reason:a,roleName:s="a"}=e,r=n.wz[a]||a;switch(t){case"role_assigned":return`Validator granted ${s} role on Discord`;case"role_removed":return r||"Role removed";case"role_not_assigned":return r||"Role not assigned";default:return n.I9[t]?.reason||n.wz[a]||a||"Notification"}})(e)}),(0,s.jsx)("span",{className:`badge badge-secondary bg-light text-dark text-truncate rounded-1 ${i().validatorPubkeyBadge}`,children:e.validatorPubkey})]}),(0,s.jsxs)("div",{className:"d-flex justify-content-between align-items-center mt-1",children:[(0,s.jsx)("small",{className:"text-secondary lh-1",children:new Date(e.timestamp).toLocaleStr
1ing("en-US",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"})}),d]})]})]},`${e.validatorPubkey}-${e.timestamp}-${a}`)})}):(0,s.jsx)("p",{className:"card-text",children:"Add a validator to get notifications"})]})})}},21652:e=>{e.exports={"content-section":"AdminLogin_content-section__i8cHq"}},22936:e=>{e.exports={container:"AdminEpochRequiredVersionsAction_container__IJO_7"}},30243:(e,t,a)=>{"use strict";a.d(t,{A:()=>c});var s=a(6029),n=a(52229),r=a(55729),i=a(37571),l=a(96723),d=a(21652),o=a.n(d);let c=({clientId:e})=>{let t=(0,n.useRouter)();return!function({callback:e}){let t=async t=>{try{let a=await (0,l.A)("/admin/auth/admin-login",{method:"POST",body:{credential:t.credential},withCredentials:!0});if("success"!==a.message)throw Error("Login failed");e()}catch(e){console.error("Error logging in with Google: ",e),alert(e.message||"Something went wrong")}};(0,r.useEffect)(()=>{window.googleAuthCallback=t},[t])}({callback:()=>{t.push("/admin")}}),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(i.m,{children:(0,s.jsx)("script",{src:"https://accounts.google.com/gsi/client",async:!0,defer:!0})}),(0,s.jsxs)("div",{className:o()["content-section"],children:[(0,s.jsx)("h1",{children:"Admin login"}),(0,s.jsx)("p",{children:"For authorized Solana Foundation staff only"}),(0,s.jsx)("div",{id:"g_id_onload","data-client_id":e,"data-callback":"googleAuthCallback"}),(0,s.jsx)("div",{className:"g_id_signin","data-testid":"google-signin-container","data-type":"standard","data-size":"large","data-theme":"outline","data-text":"sign_in_with","data-shape":"rectangular","data-logo_alignment":"left"})]})]})}},33457:(e,t,a)=>{"use strict";a.d(t,{BS:()=>x,I9:()=>_,oD:()=>u,pM:()=>h,wz:()=>p});var s=a(55729),n=a(11112),r=a(91035),i=a(89041),l=a(32967),d=a(48194),o=a(47241),c=a(61017),m=a.n(c);let u=50,h={ASSIGNED:{label:"Role assigned",dotClass:"bg-success",subtext:"",subtextClass:"",description:"",icon:null},AT_RISK_BELOW_THRESHOLD:{label:"Role assigned",dotClass:"bg-success",subtext:"Role at risk",subtextClass:"text-danger",description:"Your active stake is below the 50 SOL minimum. Increase it within 48 hours to keep your role.",icon:s.createElement(n.A,{size:20,className:"text-warning"})},AT_RISK_DELINQUENT:{label:"Role assigned",dotClass:"bg-success",subtext:"Role at risk",subtextClass:"text-danger",description:"Your validator is delinquent. Bring it back online within 48 hours to keep your role.",icon:s.createElement(n.A,{size:20,className:"text-warning"})},UNASSIGNED:{label:"No role assigned yet",dotClass:"bg-secondary",subtext:"Assigning roles can take up to 4 hours",subtextClass:m().subtleText,description:"",icon:s.createElement(s.Fragment)},SOFT_REMOVED:{label:"Role Removed",dotClass:"bg-warning",subtext:`Validator must have > ${u} SOL staked`,subtextClass:m().subtleText,description:"Active stake is below 50 SOL. Role has been removed and will be reassigned once stake exceeds 50 SOL.",icon:s.createElement(r.A,{size:20,className:"text-danger"})},ROLE_NOT_ASSIGNED_BELOW_THRESHOLD:{label:"Role not assigned",dotClass:"bg-warning",subtext:`Validator must have > ${u} SOL staked`,subtextClass:m().subtleText,description:`Active stake is below 50 SOL. Stake must exceed ${u} SOL to qualify for a role.`,icon:s.createElement(n.A,{size:20,className:"text-warning"})},ROLE_NOT_ASSIGNED_DELINQUENT:{label:"Role not assigned",dotClass:"bg-warning",subtext:"Validator is delinquent",subtextClass:m().subtleText,description:"Validator is down and delinquent. Bring it back online to qualify for a role.",icon:s.createElement(n.A,{size:20,className:"text-warning"})},REMOVED_DELINQUENT:{label:"Role removed or not assigned",dotClass:"bg-danger",subtext:"Validator is delinquent",subtextClass:m().subtleText,description:"Validator is down and delinquent. Role has been removed and will be reassigned once it's running again.",icon:s.createElement(r.A,{size:20,className:"text-danger"})},ERROR:{label:"No role assigned yet",dotClass:"bg-danger",subtext:"Error assigning role",subtextClass:"text-danger",description:"An error occurred while assigning the role. Please try again later.",icon:s.createElement(r.A,{size:20,className:"text-danger"})}},x={NOT_FOUND:{label:"Not Found",className:`${m().statusPill} ${m().statusError}`},unknown:{label:"Pending Sync",className:`${m().statusPill} ${m().statusPending}`},"mainnet-beta":{label:"Mainnet",className:`${m().statusPill} ${m().statusMainnet}`,icon:s.createElement(i.A,{size:16,className:"me-1"})},testnet:{label:"Testnet",className:`${m().statusPill} ${m().statusTestnet}`,icon:s.createElement(l.A,{size:16,className:"me-1"})}},_={role_assigned:{icon:s.createElement(d.A,{size:24,className:"text-success"})},role_removed:{icon:s.createElement(o.A,{size:24,className:"text-danger"})},role_not_assigned:{icon:s.createElement(n.A,{size:24,className:"text-warning"})}},p={no_qualifying_validators:"No qualifying validators found for role assignment",no_qualifying_validators_for_role:"No qualifying validators found for this role",grace_expired:"Role removed due to delinquency or low stake.",no_validators:"You have no validators; role removed",validator_delinquent:"Validator is delinquent",below_stake_threshold:`Role removed. Validator must have > ${u} SOL staked`,validator_removed_by_user:"Validator manually removed by user"}},35900:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>eS});var s=a(6029),n=a(55729),r=a(50212),i=a(90636),l=a(96723);let d=(e,t="",a=!0)=>{let s=new Blob([e],{type:"text/csv"}),n=window.URL.createObjectURL(s),r=a?`${t}-${new Date().toISOString()}.csv`:t,i=document.createElement("a");i.href=n,i.setAttribute("download",r),document.body.appendChild(i),i.click(),i.parentNode?.removeChild(i),window.URL.revokeObjectURL(n)};var o=a(85458),c=a.n(o);let m=e=>{let{children:t,errorMessage:a,disableButton:r,buttonCallback:l}
1=e,[d,o]=(0,n.useState)(!1),[c,m]=(0,n.useState)(!1),[u,h]=(0,n.useState)(a),x=async e=>{e.preventDefault(),o(!0),m(!1);try{await l()}catch(e){console.error(e),m(!0),e instanceof Error&&h(e.message)}finally{o(!1)}};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("button",{onClick:x,disabled:d||r,children:[t,d&&(0,s.jsxs)(s.Fragment,{children:["\xa0",(0,s.jsx)(i.A,{})]})]}),c&&(0,s.jsx)("div",{className:"danger-message",role:"alert",children:u})]})},u="Failed to download CSV file",h=e=>{let{children:t,apiUrl:a,csvFileName:r,apiOptions:i={},isAdmin:o=!0,printDate:c=!0}=e,[h,x]=(0,n.useState)("");async function _(){x("");try{let e=await (0,l.A)(a,{json:!1,withCredentials:o,...i});if(!e.ok)return void x(u);let t=await e.text();d(t,r,c)}catch(a){let e=u,t=a?.message;t&&(e+=`: ${t}`),x(e)}}return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(m,{buttonCallback:_,children:t}),h&&(0,s.jsx)("div",{className:"warning-message",role:"alert",children:h})]})};var x=a(98938),_=a(53442);let p=new Date().getFullYear(),v=Intl.NumberFormat("en-US",{minimumFractionDigits:2,maximumFractionDigits:2}),j=Intl.NumberFormat("en-US");var b=a(64988),g=a.n(b),f=a(21567);let y=e=>{let{actionType:t,dataTestId:a="admin-bulk-action-form"}=e,r={rekyc:(0,s.jsxs)("div",{children:["Paste the Testnet, Mainnet Beta, or Participant pubkeys of participants you would like to mark as needing to re-verify their identity via the KYC process.",(0,s.jsxs)("ul",{children:[(0,s.jsx)("li",{children:"Participants who have failed to re-KYC by an expiration date will not be marked as needing to re-KYC; such participants are marked for removal from the program"}),(0,s.jsx)("li",{children:"Participants that are not currently marked as needing to re-KYC will be marked as needing to re-KYC"}),(0,s.jsx)("li",{children:"Participants that are currently marked as needing to re-KYC will have the expiration date updated"})]})]})},i=`key1 2key2 3... 4keyN 5 6OR 7 8key1,key2, ..., keyN`,[l,d]=(0,n.useState)(""),[o,c]=(0,n.useState)(""),[m,u]=(0,n.useState)(""),h=(0,n.useMemo)(()=>l.split(/[^a-zA-Z0-9]/).filter(e=>e.length>0),[l]);return(0,s.jsx)("div",{className:g()["bulk-action-participants"],"data-testid":a,children:(0,s.jsxs)("form",{children:[(0,s.jsx)("label",{htmlFor:"participants",children:r[t]}),(0,s.jsx)("textarea",{id:"participants",name:"participants",rows:8,cols:55,placeholder:i,value:l,onChange:e=>{let{value:t}=e.target;d(t)}}),"rekyc"===t&&(0,s.jsx)(f.A,{pubkeys:h,className:g()["set-kyc-date"],setSuccessMessage:u,setErrorMessage:c}),m&&(0,s.jsx)("div",{className:`success-message ${g()["pre-line"]}`,children:m}),o&&(0,s.jsx)("div",{className:`danger-message ${g()["pre-line"]}`,children:o})]})})};var N=a(47623),w=a(98324);let S=N.object().shape({validatorPublicKeys:N.string().required("Validator pubkeys are required."),note:N.string().required("Note is required.")}),k={validatorPublicKeys:"",note:""};var A=a(8765),C=a(12482),E=a(91488),F=a(51497),P=a(90377),T=a(24595),$=a(16932);function R({show:e,record:t,onDeleted:a,onClose:n}){let r=(0,$.n)({mutationFn:async({id:e})=>(0,l.A)("/admin/epoch/delete_required_versions",{method:"DELETE",withCredentials:!0,params:{id:e}})});return(0,s.jsxs)(T.u,{show:e,isConfirming:r.isPending,title:"Delete",handleClose:n,handleConfirm:()=>{t&&r.mutate({id:t.id},{onSuccess:()=>{n(),a()},onError:e=>{console.error("Failure encountered when attempting to delete record.",e),alert("Failure encountered when attempting to delete record.")}})},children:["Are you sure you want to delete the required versions for ",(0,s.jsxs)("strong",{children:["Epoch ",t?.epoch]})," on"," ",(0,s.jsxs)("strong",{children:["Network ",t?.cluster]}),"?"]})}var D=a(89401),O=a(86552),q=a.n(O),M=a(64994),V=a(10914);function L({cluster:e,initialValues:t,onSubmit:a,isLoading:n,isEditMode:r}){let l=r?V.editRequiredVersionYupSchema:V.addRequiredVersionYupSchema;return(0,s.jsx)(w.l1,{enableReinitialize:!0,initialValues:{cluster:e,id:t?.id,epoch:t?.epoch??"",agave_min_version:t?.agave_min_version??"",agave_max_version:t?.agave_max_version??null,firedancer_min_version:t?.firedancer_min_version??"",firedancer_max_version:t?.firedancer_max_version??null,firedancer_full_min_version:t?.firedancer_full_min_version??"",firedancer_full_max_version:t?.firedancer_full_max_version??null},validationSchema:l,initialTouched:{cluster:!0,epoch:!0,agave_min_version:!0,agave_max_version:!0,firedancer_min_version:!0,firedancer_max_version:!0,firedancer_full_min_version:!0,firedancer_full_max_version:!0},onSubmit:e=>{a({...e,epoch:Number(e.epoch)})},children:({errors:e,isSubmitting:t,isValid:a,dirty:l,touched:d,values:o})=>(0,s.jsx)(w.lV,{children:(0,s.jsxs)("div",{className:q().container,children:[(0,s.jsxs)("div",{className:q().fields_wrapper,children:[(0,s.jsxs)("div",{className:q().field,children:[(0,s.jsx)("label",{htmlFor:"agave_min_version",children:"Min Agave"}),(0,s.jsx)(w.D0,{id:"agave_min_version",name:"agave_min_version",type:"text",placeholder:"Min Agave",className:d.agave_min_version&&e.agave_min_version?q().error:""}),(0,s.jsx)(w.Kw,{name:"agave_min_version",children:e=>(0,s.jsx)(M.A,{msg:e})})]}),(0,s.jsxs)("div",{className:q().field,children:[(0,s.jsx)("label",{htmlFor:"agave_max_version",children:"Max Agave"}),(0,s.jsx)(w.D0,{id:"agave_max_version",name:"agave_max_version",type:"text",value:o.agave_max_version??"",placeholder:"Max Agave",className:d.agave_max_version&&e.agave_max_version?q().error:""}),(0,s.jsx)(w.Kw,{name:"agave_max_version",children:e=>(0,s.jsx)(M.A,{msg:e})})]})]}),(0,s.jsxs)("div",{className:q().fields_wrapper,children:[(0,s.jsxs)("div",{className:q().field,children:[(0,s.jsx)("label",{htmlFor:"firedancer_min_version",children:"Min Frankendancer"}),(0,s.jsx)(w.D0,{id:"firedancer_min_version",name:"firedancer_min_version",type:"text",placeholder:"Min Frankendancer",className:d.firedancer_min_version&&e.firedancer_min_version?q().error:""}),(0,s.jsx)(w.Kw,{name:"firedancer_min_version",children:e=>(0,s.jsx)(M.A,{msg:e})})]}),(0,s.jsxs)("div",{className:q().field,children:[(0,s.jsx)("label",{htmlFor:"firedancer_max_version",children:"Max Frankendancer"}),(0,s.jsx)(w.D0,{id:"firedancer_max_version",name:"firedancer_max_version",type:"text",value:o.firedancer_max_version??"",placeholder:"Max Frankendancer",className:d.firedancer_max_version&&e.firedancer_max_version?q().error:""}),(0,s.jsx)(w.Kw,{name:"firedancer_max_version",children:e=>(0,s.jsx)(M.A,{msg:e})})]})]}),(0,s.jsxs)("div",{className:q().fields_wrapper,children:[(0,s.jsxs)("div",{className:q().field,children:[(0,s.jsx)("label",{htmlFor:"firedancer_full_min_version",children:"Min Firedancer (full)"}),(0,s.jsx)(w.D0,{id:"firedancer_full_min_version",name:"firedancer_full_min_version",type:"text",placeholder:"Min Firedancer (full)",className:d.firedancer_full_min_version&&e.firedancer_full_min_version?q().error:""}),(0,s.jsx)(w.Kw,{name:"firedancer_full_min_version",children:e=>(0,s.jsx)(M.A,{msg:e})})]}),(0,s.jsxs)("div",{className:q().field,children:[(0,s.jsx)("label",{htmlFor:"firedancer_full_max_version",children:"Max Firedancer (full)"}),(0,s.jsx)(w.D0,{id:"firedancer_full_max_version",name:"firedancer_full_max_version",type:"text",value:o.firedancer_full_max_version??"",placeholder:"Max Firedancer (full)",className:d.firedancer_full_max_version&&e.firedancer_full_max_version?q().error:""}),(0,s.jsx)(w.Kw,{name:"firedancer_full_max_version",children:e=>(0,s.jsx)(M.A,{msg:e})})]})]}),r?null:(0,s.jsxs)("div",{className:q().fields_wrapper,children:[(0,s.jsxs)("div",{className:q().field,children:[(0,s.jsx)("label",{htmlFor:"epoch",children:"Epoch"}),(0,s.jsx)(w.D0,{id:"epoch",name:"epoch",type:"text",placeholder:"Epoch",className:d.epoch&&e.epoch?q().error:""}),(0,s.jsx)(w.Kw,{name:"epoch",children:e=>(0,s.jsx)(M.A,{msg:e})})]}),(0,s.jsx)("div",{className:q().field})]}),(0,s.jsxs)("button",{type:"submit",disabled:t||n||!l||!a,children:[(t||n)&&(0,s.jsx)(i.A,{}),"Submit"]})]})})})}function B({cluster:e,show:t,record:a,onEdited:n,onClose:r}){let i=(0,$.n)({mutationFn:async e=>(0,l.A)("/admin/epoch/edit_required_version",{method:"PUT",withCredentials:!0,body:e})});return(0,s.jsx)(D.A,{title:(0,s.jsxs)("h5",{children:["Edit Epoch - ","mainnet-beta"===e?"Mainnet Beta":"Testnet"]}),show:t,close:()=>{i.isPending||r()},children:(0,s.jsx)(L,{isEditMode:!0,cluster:e,isLoading:i.isPending,initialValues:a,onSubmit:e=>{i.mutate(e,{onSuccess:()=>{n(),r()},onError:e=>{console.error("Failure encountered when attempting to edit record.",e),alert("Failure encountered when attempting to edit record.")}})}})})}var I=a(44496),U=a.n(I),z=a(55987);function K({cluster:e,show:t,initialValues:a,onAdded:n,onClose:r}){let i=(0,$.n)({mutationFn:async e=>(0,l.A)("/admin/epoch/add_required_version",{method:"POST",withCredentials:!0,body:e})});return(0,s.jsx)(D.A,{title:(0,s.jsxs)("h5",{children:["Add Epoch - ","mainnet-beta"===e?"Mainnet Beta":"Testnet"]}),show:t,close:()=>{i.isPending||r()},children:(0,s.jsx)(L,{initialValues:a,cluster:e,isLoading:i.isPending,onSubmit:e=>{i.mutate(e,{onSuccess:()=>{n(),r()},onError:e=>{console.error("Failed to add epoch",e),alert(e)}})}})})}function Y({cluster:e,rows:t,onRefetch:a}
8){let[i,l]=(0,n.useState)(null),[d,o]=(0,n.useState)(null),c=()=>{l(null),o(null)},m=(0,n.useMemo)(()=>{if(d)return(0,z.A)(d,["epoch","agave_min_version","firedancer_min_version","firedancer_full_min_version"])},[d]);return(0,s.jsxs)(s.Fragment,{children:[t.length?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("table",{className:(0,r.A)("table-body-border table-striped",U().container),children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{children:"Epoch"}),(0,s.jsx)("th",{children:"Cluster"}),(0,s.jsx)("th",{children:"Min Agave"}),(0,s.jsx)("th",{children:"Max Agave"}),(0,s.jsx)("th",{children:"Min Frankendancer"}),(0,s.jsx)("th",{children:"Max Frankendancer"}),(0,s.jsx)("th",{children:"Min Firedancer (full)"}),(0,s.jsx)("th",{children:"Max Firedancer (full)"}),(0,s.jsx)("th",{children:"Actions"})]})}),(0,s.jsx)("tbody",{children:t.map((e,t)=>(0,s.jsxs)("tr",{children:[(0,s.jsxs)("td",{children:[e.epoch," ",e.inherited_from_prev_epoch?"*":void 0]}),(0,s.jsx)("td",{children:e.cluster}),(0,s.jsx)("td",{children:e.agave_min_version}),(0,s.jsx)("td",{children:e.agave_max_version||"-"}),(0,s.jsx)("td",{children:e.firedancer_min_version}),(0,s.jsx)("td",{children:e.firedancer_max_version||"-"}),(0,s.jsx)("td",{children:e.firedancer_full_min_version||"-"}),(0,s.jsx)("td",{children:e.firedancer_full_max_version||"-"}),(0,s.jsx)("td",{children:(0,s.jsx)("div",{className:U().action_container,children:e.inherited_from_prev_epoch?(0,s.jsx)("button",{type:"button",className:(0,r.A)(U().action_btn,U().action_btn_edit),onClick:()=>{o(e),l("add")},children:(0,s.jsx)(E.A,{className:U().action_btn_svg})}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("button",{type:"button",className:(0,r.A)(U().action_btn,U().action_btn_edit),onClick:()=>{o(e),l("edit")},children:(0,s.jsx)(F.A,{className:U().action_btn_svg})}),(0,s.jsx)("button",{type:"button",className:(0,r.A)(U().action_btn,U().action_btn_trash),onClick:()=>{o(e),l("delete")},children:(0,s.jsx)(P.A,{className:U().action_btn_svg})})]})})})]},t))})]}),(0,s.jsxs)("div",{className:U().footnotes,children:[(0,s.jsx)("p",{children:"* Inherited from previous epoch"}),(0,s.jsx)("p",{children:"Version matching examples:"}),(0,s.jsxs)("ul",{children:[(0,s.jsx)("li",{children:(0,s.jsx)("code",{children:"1.1.0-beta.1 satisfies >=1.0.0"})}),(0,s.jsx)("li",{children:(0,s.jsx)("code",{children:"1.0.0 satisfies >=1.0.0-beta.4"})}),(0,s.jsx)("li",{children:(0,s.jsx)("code",{children:"1.0.0-beta.5 satisfies >=1.0.0-beta.4"})}),(0,s.jsx)("li",{children:(0,s.jsx)("code",{children:"1.0.0-beta.1 DOES NOT satisfy >=1.0.0 because a prerelease is lower than the corresponding stable release"})})]})]})]}):(0,s.jsx)("div",{children:"No records."}),(0,s.jsx)(K,{show:"add"===i,cluster:e,initialValues:m,onClose:c,onAdded:a}),(0,s.jsx)(R,{show:"delete"===i,record:d??void 0,onClose:c,onDeleted:a}),(0,s.jsx)(B,{show:"edit"===i,cluster:e,record:d??void 0,onClose:c,onEdited:a})]})}let G=[{label:"Mainnet Beta",value:"mainnet-beta"},{label:"Testnet",value:"testnet"}];function W({onChange:e,value:t}){return(0,s.jsx)("div",{children:(0,s.jsxs)("label",{children:["Cluster:",(0,s.jsx)("select",{value:t,onChange:t=>e(t.target.value),children:G.map(({label:e,value:t})=>(0,s.jsx)("option",{value:t,children:e},t))})]})})}var Q=a(22936),H=a.n(Q);function X({cluster:e,onRefetch:t}){let[a,r]=(0,n.useReducer)(e=>!e,!1);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:H().container,children:(0,s.jsx)("button",{className:H().add_epoch_button,onClick:r,children:"Add New Epoch"})}),a&&(0,s.jsx)(K,{show:a,cluster:e,onAdded:t,onClose:r})]})}var Z=a(10768),J=a.n(Z),ee=a(501),et=a(17791);let ea=e=>{let t=e.toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:2});return`${t} SOL`};var es=a(39275),en=a(55105);let er=({participants:e})=>{let{sortedData:t,handleSort:a,getSortIcon:n}=(0,es.K)(e,"thirdPartyStakeSOL",1);return(0,s.jsx)("div",{style:{display:"contents"},children:(0,s.jsxs)("table",{children:[(0,s.jsx)("thead",{style:{backgroundColor:"var(--bg-color-table-header)",position:"sticky",top:0,zIndex:2},children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{style:{borderBottom:"1px solid var(--border-table)"},children:"MB Identity Key"}),(0,s.jsx)("th",{style:{borderBottom:"1px solid var(--border-table)",width:"100px"},children:"Name"}),(0,s.jsxs)("th",{style:{cursor:"pointer",userSelect:"none",borderBottom:"1px solid var(--border-table)",width:"180px"},onClick:()=>a("thirdPartyStakeSOL"),title:"Click to sort",children:[n("thirdPartyStakeSOL")," 3rd-Party Stake"]}),(0,s.jsxs)("th",{style:{cursor:"pointer",userSelect:"none",borderBottom:"1px solid var(--border-table)",whiteSpace:"nowrap"},onClick:()=>a("onboardingEpoch"),title:"Click to sort",children:[n("onboardingEpoch")," Onboarded"]}),(0,s.jsx)("th",{style:{borderBottom:"1px solid var(--border-table)"},children:"Details"})]})}),(0,s.jsx)("tbody",{children:t.map((e,t)=>{let a;return(0,s.jsxs)("tr",{style:{backgroundColor:t%2==0?"var(--bg-color-table-odd)":"var(--bg-color-table-even)"},children:[(0,s.jsx)("td",{children:(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,s.jsx)(ee.m,{text:e.mainnetBetaPubkey}),(0,s.jsxs)("a",{href:`/admin/sfdp/participants?pubkey=${e.mainnetBetaPubkey}`,target:"_blank",rel:"noopener noreferrer",children:["\xa0",(0,en.wM)(e.mainnetBetaPubkey,8)]})]})}),(0,s.jsx)("td",{children:e.name}),(0,s.jsx)("td",{style:{textAlign:"right"},children:(0,s.jsx)("span",{style:{fontFamily:"monospace"},children:ea(e.thirdPartyStakeSOL)})}),(0,s.jsx)("td",{children:e.onboardingEpoch?(0,s.jsxs)("div",{style:{textAlign:"center"},children:[(0,s.jsxs)("div",{style:{fontWeight:"bold"},children:["Epoch ",e.onboardingEpoch]}),null!==(a=(e=>{if(!e)return null;let t=et.c9.fromSeconds(e);return Math.floor(et.c9.now().diff(t,"months").months)})(e.onboardingTimestamp))&&(0,s.jsxs)("em",{children:["(",a," months)"]})]}):"N/A"}),(0,s.jsxs)("td",{children:[(0,s.jsxs)("div",{style:{display:"flex",justifyContent:"space-between"},children:[(0,s.jsx)("span",{children:"Total:"}),(0,s.jsx)("span",{style:{fontFamily:"monospace"},children:ea(e.activatedStakeSOL)})]}),(0,s.jsxs)("div",{style:{display:"flex",justifyContent:"space-between"},children:[(0,s.jsx)("span",{children:"Foundation:"}),(0,s.jsx)("span",{style:{fontFamily:"monospace"},children:ea(e.foundationStakeSOL)})]})]})]},e.id)})})]})})};var ei=a(19256),el=a(61017),ed=a.n(el);let eo=[{title:"Configuration",items:[{name:"Epoch Versions",value:"epoch-required-versions",Component:function(){var e;
8let[t,a]=(0,n.useState)("mainnet-beta"),r=(e=t,(0,C.I)({enabled:!!e,queryKey:["AdminEpochRequiredVersions",{cluster:e}],queryFn:async function(){return(0,l.A)("/admin/epoch/required_versions",{method:"GET",withCredentials:!0,params:{cluster:e}})}})),i=()=>r.refetch();return(0,s.jsx)("div",{"data-testid":"admin-epoch-requirements-layout",children:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:J().actions_container,children:[(0,s.jsx)(W,{value:t,onChange:a}),(0,s.jsx)(X,{cluster:t,onRefetch:i})]}),r.isFetching?(0,s.jsx)(A.A,{}):r.isSuccess?(0,s.jsx)(Y,{cluster:t,rows:r.data.data,onRefetch:i}):r.isError?(0,s.jsxs)("div",{className:"alert alert-danger",role:"alert",children:[(0,s.jsx)("h4",{className:"alert-heading",children:"Error"}),(0,s.jsx)("pre",{children:JSON.stringify(r.error,null,2)})]}):null]})})}}]},{title:"SFDP Participants",items:[{name:"Bulk Reject",value:"bulk-reject-sfdp-participants",Component:()=>{let[e,t]=(0,n.useState)(""),[a,r]=(0,n.useState)(null),[d,o]=(0,n.useState)(""),c=async e=>{t(""),r(null),o("");let a=e.validatorPublicKeys.split(/[^a-zA-Z0-9]+/).filter(e=>e.length>0);try{let s=await (0,l.A)("/admin/validators/update-status",{method:"POST",withCredentials:!0,body:JSON.stringify({publicKeys:a,state:"Rejected",note:e.note})});t(s.humanMessage),r(s.notFoundPubkeys)}catch(e){o(e.responseData?.message||e.message)}};return(0,s.jsxs)("div",{"data-testid":"admin-bulk-sfdp-rejection-form",children:[(0,s.jsx)(w.l1,{initialValues:k,onSubmit:c,validationSchema:S,children:({dirty:e,handleSubmit:t,isValid:a,isSubmitting:n})=>(0,s.jsxs)("form",{onSubmit:t,children:[(0,s.jsxs)("div",{className:"form-group",children:[(0,s.jsx)("label",{htmlFor:"validatorPublicKeys",children:"Validator Public Keys"}),(0,s.jsx)(w.D0,{name:"validatorPublicKeys",as:"textarea",rows:8,cols:55,placeholder:"Enter validator public keys separated by commas or whitespace."}),(0,s.jsx)("div",{})]}),(0,s.jsxs)("div",{className:"form-group",children:[(0,s.jsx)("label",{htmlFor:"note",children:"Note"}),(0,s.jsx)(w.D0,{name:"note"})]}),(0,s.jsxs)("button",{type:"submit",disabled:n||!(e&&a),children:["Submit",n&&(0,s.jsxs)(s.Fragment,{children:["\xa0",(0,s.jsx)(i.A,{})]})]})]})}),e&&(0,s.jsx)("div",{className:"success-message",children:e}),a&&(0,s.jsxs)("div",{className:"warning-message",children:["Participants with the following validator pubkeys could not be found:",(0,s.jsx)("ul",{children:a.map(e=>(0,s.jsx)("li",{children:e},e))})]}),d&&(0,s.jsx)("div",{className:"error-message",children:d})]})}},{name:"Re-KYC Required",value:"mark-sfdp-participants-as-needing-to-re-kyc",Component:()=>(0,s.jsx)(y,{actionType:"rekyc",dataTestId:"admin-bulk-action-form-re-kyc"})},{name:"Download Signups",value:"download-signups-csv",Component:()=>{let[e,t]=(0,n.useState)(""),[a,r]=(0,n.useState)(""),[o,m]=(0,n.use
8State)(!1),u=async e=>{e.preventDefault(),r(""),t(""),m(!0);try{let e=await (0,l.A)("/admin/validators/csvdump",{method:"GET",withCredentials:!0,json:!1});if(!e.ok)throw Error(`Error: ${e.status} ${e.statusText}`);let a=await e.text();d(a,"sfdp-signups"),t("CSV download ready")}catch(e){r(e.responseData?.message||e.message),console.error(e)}finally{m(!1)}};return o?(0,s.jsx)(i.A,{}):(0,s.jsxs)("div",{className:c().container,"data-testid":"admin-download-signups-csv",children:[(0,s.jsx)("button",{type:"button",className:c().button,onClick:u,children:"Download signups CSV"}),e&&(0,s.jsx)("p",{className:"success-message",children:e}),a&&(0,s.jsx)("p",{className:"danger-message",children:a})]})}},{name:"Retirement Queue",value:"retirement-queue",Component:()=>{let[e,t]=(0,n.useState)([]),[a,r]=(0,n.useState)(!0),[i,d]=(0,n.useState)(null),[o,c]=(0,n.useState)(12);(0,n.useEffect)(()=>{m()},[o]);let m=async()=>{try{r(!0),d(null);let e=await (0,l.A)(`/admin/validators/retirement-queue?months=${o}`,{method:"GET",withCredentials:!0});if(!e.participants)throw Error("Invalid response format from server");t(e.participants)}catch(e){d(e.message||"Failed to fetch retirement queue data")}finally{r(!1)}};return a?(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{children:"Retirement Queue"}),(0,s.jsx)(A.A,{text:"Loading retirement queue..."})]}):i?(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{children:"Retirement Queue"}),(0,s.jsx)("div",{className:"danger-message",style:{margin:"1rem 0"},children:i}),(0,s.jsx)("button",{onClick:m,className:"button primary",children:"Retry"})]}):(0,s.jsxs)("div",{"data-testid":"admin-retirement-queue",children:[(0,s.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"1rem"},children:[(0,s.jsx)("h3",{children:"Retirement Queue"}),(0,s.jsx)("button",{onClick:m,className:"button primary",children:"Refresh"})]}),(0,s.jsxs)("p",{children:["Participants onboarded to mainnet who have been eligible for a delegation from Solana Foundation for at least"," ",(0,s.jsxs)("select",{value:o,onChange:e=>c(parseInt(e.target.value)),style:{border:"2px solid var(--primary)",padding:"0.2rem 0.4rem",width:"auto"},children:[(0,s.jsx)("option",{value:24,children:"24 months"}),(0,s.jsx)("option",{value:18,children:"18 months"}),(0,s.jsx)("option",{value:12,children:"12 months"}),(0,s.jsx)("option",{value:6,children:"6 months"}),(0,s.jsx)("option",{value:3,children:"3 months"})]})]}),(0,s.jsxs)("p",{children:["Total participants: ",e.length]}),0===e.length?(0,s.jsx)("div",{style:{textAlign:"center"},children:"No participants found in the retirement queue."}):(0,s.jsx)(er,{participants:e})]})}}]},{title:"TdS22",items:[{name:"Payments Stats",value:"tds22-payments-stats",Component:()=>{let[e,t]=(0,n.useState)(p),[a,r]=(0,n.useState)([]),[d,o]=(0,n.useState)(!0);(0,n.useEffect)(()=>{r([]),(async()=>{let{data:t}=await (0,l.A)("/admin/tds22/payments-stats",{withCredentials:!0,params:{year:e,filterOutNotDefaultPayments:`${d}`}}),a=t.paymentsStatistics,n=0,i=0,o=0,c=a.map(e=>{let{total_payment_sol:t,total_payment_usd:a,total_payments:r,payment_month:l,min_payment_sol:d,max_payment_sol:c,avg_payment_sol:m,min_payment_usd:u,max_payment_usd:h,avg_payment_usd:x}=e;n+=t,i+=a,o+=r;let p=new Date(l).toLocaleString("en-US",{month:"long"});return[(0,s.jsx)("td",{children:p},p),(0,s.jsx)("td",{className:`${_.payment} ${_.sol} ${_.number}`,children:v.format(d)},d),(0,s.jsx)("td",{className:`${_.payment} ${_.sol} ${_.number}`,children:v.format(c)},c),(0,s.jsx)("td",{className:`${_.payment} ${_.sol} ${_.number}`,children:v.format(m)},m),(0,s.jsx)("td",{className:`${_.payment} ${_.sol} ${_.number}`,children:v.format(t)},t),(0,s.jsxs)("td",{className:`${_.payment} ${_.usd} ${_.number}`,children:["$",v.format(u)]},u),(0,s.jsxs)("td",{className:`${_.payment} ${_.usd} ${_.number}`,children:["$",v.format(h)]},h),(0,s.jsxs)("td",{className:`${_.payment} ${_.usd} ${_.number}`,children:["$",v.format(x)]},x),(0,s.jsxs)("td",{className:`${_.payment} ${_.usd} ${_.number}`,children:["$",v.format(a)]},a),(0,s.jsx)("td",{colSpan:2,className:`${_["total-payment"]} ${_.number}`,children:j.format(r)},r)]});c.push([(0,s.jsx)("td",{children:""},1),(0,s.jsxs)("td",{colSpan:3,className:`${_["yearly-total"]} ${_.sol}`,children:["Total paid SOL in ",e]},`total-paid-sol-for-${e}`),(0,s.jsx)("td",{className:`${_["yearly-total"]} ${_.sol} ${_.number}`,children:v.format(n)},`total-paid-sol-for-${n}`),(0,s.jsxs)("td",{colSpan:3,className:`${_["yearly-total"]} ${_.usd}`,children:["Total paid USD in ",e]},`total-paid-usd-for-${e}`),(0,s.jsxs)("td",{className:`${_["yearly-total"]} ${_.usd} ${_.number}`,children:["$",v.format(i)]},`total-paid-usd-for-${i}`),(0,s.jsxs)("td",{className:_["total-year-payments"],children:["Payments in ",e," "]},o+e),(0,s.jsx)("td",{className:`${_["total-year-payments"]} ${_.number}
8`,children:j.format(o)},o)]),r(c)})()},[e,d]);let c=[];for(let e=p;e>=2022;e--)c.push((0,s.jsx)("option",{value:e,children:e},e));return(0,s.jsxs)("div",{"data-testid":"admin-tds22-payment-stats",children:[(0,s.jsxs)("div",{className:_["inputs-container"],children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{htmlFor:"year",children:"Select year:"}),(0,s.jsx)("select",{name:"year",value:e,onChange:e=>{t(Number(e.target.value))},children:c})]}),(0,s.jsx)("div",{className:_["checkbox-container"],children:(0,s.jsxs)("label",{children:[(0,s.jsx)("input",{type:"checkbox",checked:d,onChange:e=>{o(e.target.checked)}}),(0,s.jsx)("p",{children:"Filter out not default type payments"})]})})]}),(0,s.jsxs)("table",{className:_.table,children:[(0,s.jsxs)("thead",{children:[(0,s.jsxs)("tr",{className:_.currencies,children:[(0,s.jsx)("th",{children:"Currency"}),(0,s.jsx)("th",{colSpan:4,className:_.sol,children:"SOL"}),(0,s.jsx)("th",{colSpan:4,className:_.usd,children:"USD"}),(0,s.jsx)("th",{rowSpan:2,colSpan:2,style:{verticalAlign:"middle"},children:"Number of payments"})]}),(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{children:"Month \\ Payment"}),(0,s.jsx)("th",{className:_.sol,children:"Min"}),(0,s.jsx)("th",{className:_.sol,children:"Max"}),(0,s.jsx)("th",{className:_.sol,children:"Median"}),(0,s.jsx)("th",{className:_.sol,children:"Total"}),(0,s.jsx)("th",{className:_.usd,children:"Min"}),(0,s.jsx)("th",{className:_.usd,children:"Max"}),(0,s.jsx)("th",{className:_.usd,children:"Median"}),(0,s.jsx)("th",{className:_.usd,children:"Total"})]})]}),(0,s.jsx)("tbody",{children:0===a.length?(0,s.jsx)("tr",{children:(0,s.jsx)("td",{children:(0,s.jsxs)("p",{className:"info-message",children:["Loading stats ",(0,s.jsx)(i.A,{})]})})}):a.map((e,t)=>(0,s.jsx)("tr",{children:e.map(e=>e)},t))})]})]})}},{name:"Participation Data",value:"download-tds22-participation-data",Component:()=>(0,s.jsx)("div",{className:x.container,"data-testid":"admin-download-tds22-participation-csv",children:(0,s.jsx)(h,{apiUrl:"/admin/tds22/admin-download-rewards",csvFileName:"tds22-participation",children:"Download TdS 22 participation data"})})}]},{title:"Validators Portal",items:[{name:"Validators Portal Admin",value:"validators-portal",Component:()=>{let[e,t]=(0,n.useState)(null),[a,r]=(0,n.useState)(!0),[i,d]=(0,n.useState)(null),[o,c]=(0,n.useState)(!1),[m,u]=(0,n.useState)(null);(0,n.useEffect)(()=>{h()},[]);let h=async()=>{try{r(!0),d(null);let e=await (0,l.A)("/admin/portal/users",{method:"GET",withCredentials:!0});t(e)}catch(e){d(e.message||"Failed to fetch portal users")}finally{r(!1)}},x=async()=>{try{c(!0),u(null);let e=await (0,l.A)("/admin/portal/sync",{method:"POST",withCredentials:!0});u(e),await h()}catch(e){d(e.message||"Failed to trigger sync")}finally{c(!1)}};return a?(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{children:"Validators Portal Admin"}),(0,s.jsx)(A.A,{text:"Loading portal users..."})]}):i&&!e?(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{children:"Validators Portal Admin"}),(0,s.jsx)("div",{className:"danger-message my-3 mx-0",children:i}),(0,s.jsx)("button",{onClick:h,className:"button primary",children:"Retry"})]}):(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"d-flex justify-content-between align-items-center w-100 mb-4",children:[(0,s.jsx)("h3",{className:"mb-0",children:"Validators Portal Admin"}),(0,s.jsxs)("div",{className:"d-flex gap-2",children:[(0,s.jsx)("button",{onClick:x,className:"button primary",disabled:o,children:o?"Syncing...":"Trigger Sync"}),(0,s.jsx)("button",{onClick:h,className:"button tertiary",children:"Refresh"})]})]}),e&&(0,s.jsxs)("div",{className:"row g-3 mb-4",children:[(0,s.jsx)("div",{className:"col-md-3",children:(0,s.jsxs)("div",{className:"card p-3",children:[(0,s.jsx)("div",{className:"text-muted small mb-1",children:"Total Users"}),(0,s.jsx)("div",{className:"h2 mb-0 fw-bold",children:e.stats.totalUsers})]})}),(0,s.jsx)("div",{className:"col-md-3",children:(0,s.jsxs)("div",{className:"card p-3",children:[(0,s.jsx)("div",{className:"text-muted small mb-1",children:"Total Validators"}),(0,s.jsx)("div",{className:"h2 mb-0 fw-bold",children:e.stats.totalValidators})]})}),(0,s.jsx)("div",{className:"col-md-3",children:(0,s.jsxs)("div",{className:"card p-3",children:[(0,s.jsx)("div",{className:"text-muted small mb-1",children:"Mainnet Validators"}),(0,s.jsx)("div",{className:"h2 mb-0 fw-bold",children:e.stats.usersWithMainnetRole})]})}),(0,s.jsx)("div",{className:"col-md-3",children:(0,s.jsxs)("div",{className:"card p-3",children:[(0,s.jsx)("div",{className:"text-muted small mb-1",children:"Testnet Validators"}),(0,s.jsx)("div",{className:"h2 mb-0 fw-bold",children:e.stats.usersWithTestnetRole})]})})]}),m&&(0,s.jsxs)("div",{className:"alert alert-success mb-4",role:"alert",children:[(0,s.jsx)("h5",{className:"alert-heading mb-2",children:"â
Sync Completed"}),(0,s.jsxs)("div",{className:"small",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("strong",{children:"Duration:"})," ",m.duration]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("strong",{children:"Validators Updated:"})," ",m.result.validatorsUpdated]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("strong",{children:"Role Changes:"})," +",m.result.roleChanges.rolesAdded," / -",m.result.roleChanges.rolesRemoved]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("strong",{children:"User that are not in the discord server: "}),m.result.usersOutsideDiscordServer]}),m.result.errors.length>0&&(0,s.jsxs)("div",{className:"text-danger mt-2",children:[(0,s.jsx)("strong",{children:"Errors:"})," ",m.result.errors.length]})]})]}),i&&(0,s.jsx)("div",{className:"alert alert-danger mb-4",role:"alert",children:i}),e&&0===e.users.length?(0,s.jsx)("div",{className:"text-center py-5 text-muted",children:"No portal users found."}):(0,s.jsxs)("table",{className:ed()["admin-table"],children:[(0,s.jsx)("thead",{className:"text-bg-light sticky-top fw-medium",children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{scope:"col",children:"Discord User"}),(0,s.jsx)("th",{children:"Validator Public Key"}),(0,s.jsx)("th",{className:"text-end",children:"Network"}),(0,s.jsx)("th",{className:"text-end",children:"Active Stake"}),(0,s.jsx)("th",{className:"text-center",children:"Roles"})]})}),(0,s.jsx)("tbody",{children:e?.users.flatMap((e,t)=>{let a=e.validators.length>0?e.validators:[null];return a.map((n,r)=>(0,s.jsxs)("tr",{className:t%2==0?ed()["striped-row"]:"",children:[0===r&&(0,s.jsx)("th",{scope:"row",rowSpan:a.length,className:`fw-bold ${e.isInDiscordGuild?"":"text-danger"}`,title:e.isInDiscordGuild?"":"User is not in the Discord guild",children:e.discordUsername}),n?[(0,s.jsx)("td",{className:"font-monospace small",children:(0,s.jsx)("div",{className:`text-truncate ${ed().validatorPubkeyBadgeLong}`,children:n.validatorPubkey})},"1"),(0,s.jsx)("td",{className:"text-end",children:(0,ei.renderNetworkBadge)(n.network,"w-auto")},"2"),(0,s.jsx)("td",{className:"text-end font-monospace small",children:(0,s.jsx)("span",{className:"text-nowrap",children:(e=>{if(!e)return"N/A";let t=Math.floor(Number(e)/1e9);
8return`${t.toLocaleString()} SOL`})(n.activeStake)})},"3")]:(0,s.jsx)("td",{colSpan:3,className:"text-italic text-muted",children:"No validators verified"}),0===r&&(0,s.jsx)("td",{rowSpan:a.length,className:"text-center",children:e.isInDiscordGuild?0===e.currentDiscordRoles.length?(0,s.jsx)("span",{className:"text-muted",children:"None"}):(0,s.jsx)("div",{className:"d-flex justify-content-center flex-column gap-1",children:e.currentDiscordRoles.map(e=>(0,s.jsx)("span",{className:"badge rounded-1 bg-primary",children:e.roleName},e.roleId))}):(0,s.jsx)("span",{className:"badge rounded-1 bg-danger",children:"Not in Discord"})})]},n?`${e.id}-${n.id}`:e.id))})})]})]})}}]}];var ec=a(67950),em=a.n(ec);let eu=()=>{let e=eo[0]?.items[0],[t,a]=(0,n.useState)(e?.value||""),i=null;for(let e of eo){let a=e.items.find(({value:e})=>e===t);if(a){i=a.Component;break}}return!i&&e&&(i=e.Component),(0,s.jsxs)("div",{className:"row","data-testid":"admin-select-action",children:[(0,s.jsx)("div",{className:(0,r.A)(em().sidebar,"col-3"),children:(0,s.jsx)("nav",{className:(0,r.A)(em().sidebar_nav,"border rounded-3 py-1"),"aria-label":"Admin actions navigation",children:(0,s.jsx)("div",{className:"p-0",children:eo.map((e,n)=>(0,s.jsxs)("div",{className:(0,r.A)("d-flex flex-column",{"border-top":0!==n}),children:[(0,s.jsx)("h3",{className:(0,r.A)(em().directory,"p-3 text-uppercase fw-light"),children:e.title}),(0,s.jsx)("ul",{className:"list-unstyled mb-0 d-flex flex-column",children:e.items.map(({value:e,name:n})=>(0,s.jsx)("li",{children:(0,s.jsx)("button",{type:"button",className:(0,r.A)(em().action_button,"w-100 rounded-0 border-0 justify-content-start p-3",{[em().action_button__selected]:e===t}),onClick:()=>{a(e)},children:n})},e))})]},n))})})}),(0,s.jsx)("div",{className:"col-9","data-testid":"admin-select-action-content",children:(0,s.jsx)("div",{className:(0,r.A)(em().content,"border rounded-3 p-0"),children:(0,s.jsx)("div",{className:"p-4",children:i&&(0,s.jsx)(i,{})})})})]})},eh=()=>(0,s.jsx)(eu,{});var ex=a(30243),e_=a(82203),ep=a.n(e_),ev=a(52690),ej=a.n(ev),eb=a(82396),eg=a(67549),ef=a(3264);let ey=()=>{let e=(0,eg.md)(ef.E);return(0,s.jsx)("nav",{className:ej().admin_nav,children:(0,s.jsxs)(ep(),{href:e,className:ej().admin_nav_link,children:["SFDP Participant admin ",(0,s.jsx)(eb.A,{})]})})};var eN=a(86816),ew=a(480);function eS(){let e=(0,eN._)();return(0,s.jsx)(s.Fragment,{children:e?(0,s.jsxs)(ew.default,{children:[(0,s.jsx)(ey,{}),(0,s.jsx)(eh,{})]}):(0,s.jsx)(ex.A,{clientId:"166063034996-1gt4u1vhepbgnmtj7dd87mkisudfoabj.apps.googleusercontent.com"})})}},44496:e=>{e.exports={container:"AdminEpochRequiredVersionsTable_container__jNyF0",action_container:"AdminEpochRequiredVersionsTable_action_container__6poiR",action_btn:"AdminEpochRequiredVersionsTable_action_btn__1sXFo",action_btn_edit:"AdminEpochRequiredVersionsTable_action_btn_edit__DL47t",action_btn_trash:"AdminEpochRequiredVersionsTable_action_btn_trash__OhVc1",action_btn_svg:"AdminEpochRequiredVersionsTable_action_btn_svg___0l8j",footnotes:"AdminEpochRequiredVersionsTable_footnotes__BsrIH"}},52690:e=>{e.exports={admin_nav:"AdminNavigation_admin_nav__zSnPv",admin_nav_link:"AdminNavigation_admin_nav_link__OI_tC"}},53442:e=>{e.exports={"inputs-container":"Tds22PaymentsStats_inputs-container__m85Vk","checkbox-container":"Tds22PaymentsStats_checkbox-container__McURe",table:"Tds22PaymentsStats_table__V3VsW",sol:"Tds22PaymentsStats_sol__7T4Yh",usd:"Tds22PaymentsStats_usd__NGNJF","yearly-total":"Tds22PaymentsStats_yearly-total__ULIih","total-year-payments":"Tds22PaymentsStats_total-year-payments__ymayf",payment:"Tds22PaymentsStats_payment__0kcx5","total-payment":"Tds22PaymentsStats_total-payment__tUfd0",number:"Tds22PaymentsStats_number__YUUoZ"}},61017:e=>{e.exports={xs:"0",sm:"640",md:"768",lg:"1024",xl:"1280",xxl:"1536",validatorsTable:"portal_validatorsTable__Rz3nX",hiddenOnXsAn
8dMd:"portal_hiddenOnXsAndMd__8XxaF",statusMainnet:"portal_statusMainnet__vWXtX",statusTestnet:"portal_statusTestnet__unxr4",statusPending:"portal_statusPending__PtOwQ",statusError:"portal_statusError__Wgjjn",stepBlock:"portal_stepBlock__uxea_",codeBlock:"portal_codeBlock__zaIky",highlight:"portal_highlight__NdLNz",discordAvatar:"portal_discordAvatar__quZ1W",subtleText:"portal_subtleText__bSaeq",solanaLogo:"portal_solanaLogo__k0xTT",headerRibbon:"portal_headerRibbon__NQ2sm",headerRibbonContent:"portal_headerRibbonContent__NISn0",notificationsList:"portal_notificationsList__8Mqw0",validatorPubkeyBadge:"portal_validatorPubkeyBadge__1XZk1",validatorPubkeyBadgeLong:"portal_validatorPubkeyBadgeLong__Isgbd",networkBadge:"portal_networkBadge__ia_8d",validatorStatusDot:"portal_validatorStatusDot__85kF1",smallTd:"portal_smallTd__R1Q1R",formSpinner:"portal_formSpinner__jFVxf",updateOverlay:"portal_updateOverlay__CkoRc","admin-table":"portal_admin-table__yUo03","striped-row":"portal_striped-row__WkoWc"}},64988:e=>{e.exports={"bulk-action-participants":"BulkActionForm_bulk-action-participants__p6n5d","radio-buttons":"BulkActionForm_radio-buttons__rzrzn","radio-button":"BulkActionForm_radio-button__3HKyu","pre-line":"BulkActionForm_pre-line__lYlZm","set-kyc-date":"BulkActionForm_set-kyc-date__tdh4m"}},67950:e=>{e.exports={sidebar:"SelectAction_sidebar__TLzyb",directory:"SelectAction_directory__ADwFf",action_button:"SelectAction_action_button__INUo_",action_button__selected:"SelectAction_action_button__selected__Wcgi0",content:"SelectAction_content__9x1yB"}},85458:e=>{e.exports={container:"DownloadSignupsCsv_container__T2D_v",button:"DownloadSignupsCsv_button__c_nN7"}},86552:e=>{e.exports={container:"AdminEpochForm_container__lXSrc",fields_wrapper:"AdminEpochForm_fields_wrapper__BPHu9",field:"AdminEpochForm_field__2qaFu",error:"AdminEpochForm_error__LVMrx",submit_button:"AdminEpochForm_submit_button__xwcaH"}},98938:e=>{e.exports={container:"DownloadTds22RewardsCsv_container__3DzaV",inputs:"DownloadTds22RewardsCsv_inputs__VkfFm"}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.