1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5915],{1450:(e,a,t)=>{"use strict";t.d(a,{A:()=>u});var s=t(67141),r=t(17654),l=t.n(r),o=t(80646),c=t(62280),i=t(89619),d=t(31804),n=t(55725),x=t(67896);let p=l()(async(e,a,t,s)=>(0,x.A)(`${d.Rh.root}/api/vote/dao/${e}/proposal/${a}`),{promise:!0,maxAge:1e3*n.Kn,primitive:!0}),u=(e,a)=>{let{blockNumber:t}=(0,s.useContext)(i.A),[r,l]=(0,o.A)({}),d=`${e}-${a}`,x=(0,s.useCallback)(()=>r,[r]),u="list"===a||r[d]?.proposal?.isActive===!0,h=(0,c.A)(n.Kn,u),v=u?t:null;return(0,s.useEffect)(()=>{void 0!==e&&void 0!==a&&p(e,a,v,h).then(e=>{l({...x(),[d]:e})}).catch(e=>{console.error(e),l({...x(),[d]:null})})},[e,a,v,h]),r[d]}},5268:(e,a,t)=>{"use strict";t.d(a,{K:()=>r,Z:()=>l});var s=t(66629);let r=(e,a)=>{if(null==e)return e;let{currentProposal:t,activeGaugesData:r}=e;if(null==t)return e;if(void 0===a||a.proposalId!==t.proposalId)return;let l=(0,s.pl)((r||[]).map(e=>[e.gaugeAddress,e]));return{...e,currentProposal:{...t,allGaugeVotes:Object.entries(a.gaugeVotes).flatMap(([e,a])=>e in l?[{...l[e],votedVlcvx:a,proposalId:t.proposalId}]:[]),totalVotedVlcvx:a.totalVotedVlcvx,voterCount:a.voterCount}}},l=(e,a,t)=>void 0===t?.account||void 0===t.readAtBlock||!0===t.hasLatestReadFailed?a:e.get(t.readAtBlock)??a},7062:(e,a,t)=>{"use strict";t.d(a,{A:()=>c});var s=t(67141),r=t(37851),l=t(66629),o=t(73367);let c=(e,a,t,c=!0)=>{let i=(0,s.useMemo)(()=>{if(!t||c&&(!e||!a))return;let s=[...e?.incentives||[],...a?.incentives||[]];return(0,l.pl)(t.allGaugeVotes.map(e=>{let a=s.filter(({gaugeAddress:a})=>a===e.rootGaugeAddress);return[e.gaugeAddress,a]}))},[t?.allGaugeVotes?.length,e,a,c]);return(0,s.useMemo)(()=>{if(!i||!t)return;let e=t.totalVotedVlcvx,s=(0,o.hx)(a,t);return t.allGaugeVotes.map(a=>{let t=a.votedVlcvx||0,c=i?.[a.gaugeAddress]||[],d=c.map(e=>(0,o.Ay)(e,t,s,!0)),n=(0,l.cz)(d.map(({amountUsd:e})=>e)),x=(0,l.cz)(d.map(({perVlcvx:e})=>e)),p=0===t?0:(0,r.A)(t).times(x).toNumber();return{...a,allWeightPcent:0!==e?(0,r.A)(a.votedVlcvx).div(e).times(100).decimalPlaces(2,r.A.ROUND_HALF_UP).toNumber():void 0,totalUsdIncentives:n,totalDistributedUsdIncentives:p,incentivesPerVlcvx:x,incentives:c.map((e,a)=>({...e,...d[a]}))}})},[t,i,a])}},8320:(e,a,t)=>{Promise.resolve().then(t.bind(t,17373))},13798:(e,a,t)=>{"use strict";t.d(a,{A:()=>i});var s=t(98977),r=t(25842),l=t(95052),o=t(7062),c=t(3913);let i=e=>{let a=(0,c.A)(e),t=(0,s.A)(e,a?"current":void 0,!1),i=t?.pastProposalIds?.slice(-1)?.[0],d=(0,s.A)(e,i,!1)?.previousProposal,n=(0,r.A)(e,d?.proposalId),x=(0,l.A)(e,d?.proposalId),p=(0,o.A)(n,x,d);return{proposal:d,gaugesData:p,voteMarketInfo:x,cvxPrice:n?.cvxPrice}}},17373:(e,a,t)=>{"use strict";t.r(a),t.d(a,{default:()=>Z});var s=t(66305),r=t(96295),l=t.n(r),o=t(67141),c=t(59551),i=t(58511),d=t.n(i),n=t(16019),x=t(37851),p=t(66671),u=t(86497),h=t(46281),v=t(69025),m=t(4386),b=t(66629),j=t(89619),g=t(38350),f=t(41326),A=t(15406),N=t(38677),y=t(57427),C=t(55725);let w=({locksData:e,children:a=null})=>{let{blockNumber:t}=(0,o.useContext)(j.A),r=(0,g.A)(t),c=(0,f.A)(),i=(()=>{let{ethereumWeb3:{account:e}}=(0,o.useContext)(A.A),a=(0,N.A)(null,e,!1,"curve"),t=(0,y.A)(null,e,!1,"curve"),s=a?.userEffectiveWeight?.delegated??0,r=t?.userEffectiveWeight?.delegated??0,l=r>0||s>0;return{delegatedWeightGauges:s,delegatedWeightDao:r,hasDelegatedWeight:l,hasUnevenDelegatedWeight:l&&r!==s}})(),{delegatedWeightGauges:d,delegatedWeightDao:n,hasDelegatedWeight:w,hasUnevenDelegatedWeight:k}=i,V=void 0!==e,D=e?.unlockable>0,W=void 0!==r?.CvxLocker&&void 0!==r?.CvxLockerV2?r.CvxLocker.plus(r.CvxLockerV2):void 0,P=V?(0,b.FC)([(0,x.A)(e.voteWeight).plus(d),w&&k?(0,x.A)(e.voteWeight).plus(n):null]):void 0,I=void 0!==P&&void 0!==W&&void 0!==c?(0,b.pl)(Array.from(Object.entries(c)).map(([e,{convex:a}])=>{let t=(0,C.qW)(m.wZ.find(a=>a.symbol===e).votingId);return[e,(P.length>1&&t?.hasGauge&&t?.hasDao?P:P.length>1&&t?.hasGauge&&!t?.hasDao?[P[0]]:P.length>1&&!t?.hasGauge&&t?.hasDao?[P[1]]:[P[0]]).map(e=>a.times(e).div(W))]})):void 0;return(0,s.jsxs)("div",{className:"jsx-cae767be435c59ce container",children:[(0,s.jsx)(p.ER,{Header:(0,s.jsx)(p.Jk,{children:"Governance stats"}),Content:(0,s.jsxs)(p.Pj,{children:[(0,s.jsx)("p",{className:"jsx-cae767be435c59ce section-title",children:"Platform stats"}),(0,s.jsx)("table",{className:"jsx-cae767be435c59ce",children:(0,s.jsxs)("tbody",{className:"jsx-cae767be435c59ce",children:[(0,s.jsxs)("tr",{className:"jsx-cae767be435c59ce",children:[(0,s.jsx)("td",{className:"jsx-cae767be435c59ce",children:"Total vlCVX:"}),(0,s.jsx)("td",{colSpan:"2",className:"jsx-cae767be435c59ce ve-balance",children:void 0!==W?(0,s.jsxs)(s.Fragment,{children:[(0,v.sz)(W)," ",(0,s.jsx)("span",{className:"jsx-cae767be435c59ce small",children:"vlCVX"})]}):"â"})]}),m.sE.filter(e=>"vePRISMA"!==e).map(e=>(0,s.jsxs)("tr",{className:"jsx-cae767be435c59ce",children:[(0,s.jsxs)("td",{className:"jsx-cae767be435c59ce",children:["Total ",e," controlled:"]}),(0,s.jsx)("td",{className:"jsx-cae767be435c59ce ve-balance",children:void 0!==c?(0,s.jsxs)(s.Fragment,{children:[(0,v.sz)(c[e].convex,0,1e3)," ",(0,s.jsx)("span",{className:"jsx-cae767be435c59ce small",children:e})]}):"â"}),(0,s.jsx)("td",{className:"jsx-cae767be435c59ce",children:(0,s.jsx)("span",{className:"jsx-cae767be435c59ce small",children:void 0!==c?(0,s.jsxs)(s.Fragment,{children:["(",c[e].convex.div(c[e].total).times(100).toFixed(0),"%)"]}):null})})]},`${e}-total`))]})}),(0,s.jsx)("hr",{className:"jsx-cae767be435c59ce"}),(0,s.jsx)("p",{className:"jsx-cae767be435c59ce section-title",children:"Your stats"}),(0,s.jsx)("table",{className:"jsx-cae767be435c59ce",children:(0,s.jsxs)("tbody",{className:"jsx-cae767be435c59ce",children:[(0,s.jsxs)("tr",{className:"jsx-cae767be435c59ce",children:[(0,s.jsx)("td",{className:"jsx-cae767be435c59ce",children:"Vote weight:"}),(0,s.jsx)("td",{className:"jsx-cae767be435c59ce ve-balance",children:(0,s.jsx)(h.A,{voteWeight:e?.voteWeight,delegatedWeightInfo:i})})]}),m.sE.filter(e=>"vePRISMA"!==e).map(e=>(0,s.jsxs)("tr",{className:"jsx-cae767be435c59ce",children:[(0,s.jsxs)("td",{className:"jsx-cae767be435c59ce",children:[e," controlled:"]}),(0,s.jsx)("td",{className:"jsx-cae767be435c59ce ve-balance",children:void 0!==I?(0,s.jsxs)(s.Fragment,{children:[I[e].map(e=>(0,v.sz)(e)).join(" / ")," ",(0,s.jsx)("span",{className:"jsx-cae767be435c59ce small",children:e})]}):"â"})]},`${e}-share`)),D&&(0,s.jsxs)("tr",{className:"jsx-cae767be435c59ce",children:[(0,s.jsx)("td",{className:"jsx-cae767be435c59ce",children:"Relockable:"}),(0,s.jsxs)("td",{className:"jsx-cae767be435c59ce",children:[(0,v.sz)(e.unlockable)," ",(0,s.jsx)("span",{className:"jsx-cae767be435c59ce small",children:"vlCVX"})," ",(0,s.jsx)(u.A,{})]})]})]})}),a]})}),(0,s.jsx)(l(),{id:"cae767be435c59ce",children:".container.jsx-cae767be435c59ce>.container{margin-top:0}.container.jsx-cae767be435c59ce .help-tooltip{font-weight:bold;height:16px;display:inline-block}.section-title.jsx-cae767be435c59ce{font-weight:700;margin:0 0 12px}.container.jsx-cae767be435c59ce table{width:100%;margin-bottom:15px;border-collapse:collapse}.container.jsx-cae767be435c59ce table td{padding:2px 0}.container.jsx-cae767be435c59ce table td:first-child{}.container.jsx-cae767be435c59ce table td:last-child{}.container.jsx-cae767be435c59ce table td:not(:first-child){text-align:right}.container.jsx-cae767be435c59ce table td.ve-balance{font-weight:bold;white-space:nowrap}.container.jsx-cae767be435c59ce .small{font-size:.8em}.container.jsx-cae767be435c59ce hr{border:0;margin:16px 0;padding:0;width:100%;height:1px;background-color:rgb(245,245,245)}"})]})};w.propTypes={locksData:d().object,children:d().node};let k=({locksData:e})=>{let a=e?.unlockable>0;return(0,s.jsxs)("div",{className:"jsx-8576c60fdde7db87 container",children:[(0,s.jsx)(w,{locksData:e,children:(0,s.jsxs)("div",{className:"jsx-8576c60fdde7db87 button-container",children:[a&&(0,s.jsx)(n.A,{href:"/lock-cvx",size:"small",children:"Relock expired locks"}),(0,s.jsx)(n.A,{href:"/lock-cvx",size:"small",children:"Manage vote weight"})]})}),(0,s.jsx)(l(),{id:"8576c60fdde7db87",children:".container.jsx-8576c60fdde7db87 .button-container .Mu
1iButtonBase-root{width:100%;text-align:center}.container.jsx-8576c60fdde7db87 .button-container .MuiButtonBase-root:first-child{margin-bottom:5px}.container.jsx-8576c60fdde7db87 .button-container .MuiButtonBase-root .MuiSvgIcon-root{margin-left:3px;font-size:1.2em}"})]})};k.propTypes={locksData:d().object};var V=t(46357),D=t(80543),W=t(56474);let P=({activeCount:e,pastCount:a})=>(0,s.jsxs)("div",{className:"badges",children:[void 0!==e&&e>0&&(0,s.jsx)(W.A,{title:"Active votes",arrow:!0,children:(0,s.jsx)("div",{className:"active-count",children:e})}),void 0!==a&&a>0&&(0,s.jsx)(W.A,{title:"Past votes",arrow:!0,children:(0,s.jsx)("div",{className:"past-count",children:a})}),(0,s.jsx)("style",{children:` 2 .badges { 3 float: right; 4 margin-top: -1px; 5 } 6 7 .active-count, 8 .past-count { 9 display: inline-block; 10 box-sizing: border-box; 11 height: 22px; 12 line-height: 22px; 13 min-width: 22px; 14 margin-left: 3px; 15 padding: 0 6px; 16 text-align: center; 17 border-radius: 15px; 18 background-color: #d7d7d745; 19 color: #fff; 20 font-size: 13px; 21 font-weight: 500; 22 } 23 24 .active-count { 25 background-color: ${D.Tj.blue}; 26 } 27 `})]});P.propTypes={activeCount:d().number,pastCount:d().number};var I=t(14239),S=t(1450);let E=({projectName:e,projectId:a,logoId:t})=>{let r=(0,S.A)(a,"list"),o=void 0===r,c=r?.activeCount||0,i=r?.pastCount||0,d=c>0,x=r?.proposals?.[0]?.proposalId;return(0,s.jsx)(I.A,{children:(0,s.jsxs)("div",{className:"jsx-259e57abfba93f20 container",children:[(0,s.jsx)(p.Ay,{Header:(0,s.jsx)(p.d6,{children:(0,s.jsxs)(p.eB,{orientation:"horizontal",children:[(0,s.jsx)(V.A,{big:!0,customId:t,className:"icon"}),(0,s.jsxs)(p.hE,{children:[e," DAO Proposals"]}),(0,s.jsx)("div",{className:"jsx-259e57abfba93f20 badges-container",children:(0,s.jsx)(P,{activeCount:c,pastCount:i})})]})}),Content:(0,s.jsxs)(p.Bo,{children:[(0,s.jsxs)("p",{className:"jsx-259e57abfba93f20",children:["Vote on all ",e," DAO decisions"]}),(0,s.jsxs)("div",{className:"jsx-259e57abfba93f20",children:[(0,s.jsx)("div",{className:"jsx-259e57abfba93f20 button-container",children:(0,s.jsx)(n.A,{href:`/vote/dao/${a}`,size:"small",color:d?"primary":"secondary",children:d?`Vote on ${e} DAO proposals`:`View ${e} DAO proposals`})}),(0,s.jsx)("div",{className:"jsx-259e57abfba93f20 footer",children:o?(0,s.jsx)(s.Fragment,{children:"â"}):d?(0,s.jsxs)(s.Fragment,{children:[c," active ",1===c?"proposal":"proposals"]}):i>0?(0,s.jsxs)(s.Fragment,{children:["Last proposal: ",void 0!==x?`#${x}`:"â"]}):(0,s.jsx)("i",{className:"jsx-259e57abfba93f20",children:"No proposal yet"})})]})]}),variant:"primary",expanded:!0}),(0,s.jsx)(l(),{id:"259e57abfba93f20",children:".container.jsx-259e57abfba93f20 .button-container{text-align:center}"})]})})};var $=t(28806),F=t(34668),z=t(98977),L=t(45545),M=t(25842),T=t(95052),B=t(7062),O=t(73367),R=t(3913);let G=({platform:e="curve"})=>{let a=(0,C.qW)(e),t=(0,R.A)(e),{currentProposalData:r}=(0,L.A)(e),c=!!r?.currentProposal,i=r?.pastProposalIds?.length,d=r?.currentProposal,u=r?.pastProposalIds?.slice(-1)?.[0],h=(0,z.A)(e,u)?.previousProposal,m=null!=d,b=null!=h,j=void 0===r||!m&&void 0!==u&&void 0===h,g=(0,M.A)(e,t?h?.proposalId:void 0),f=(0,T.A)(e,t?h?.proposalId:void 0),A=(0,B.A)(g,f,h,t),N=g?.cvxPrice,y=(0,o.useMemo)(()=>(0,O.MN)(A,N),[A,N]),w=t&&m?d.proposalId:void 0,k=(0,M.A)(e,w),D=(0,T.A)(e,w),W=(0,o.useMemo)(()=>(0,O.$i)(k,D,d,t),[k,D,d,t]);return(0,s.jsx)(I.A,{children:(0,s.jsxs)("div",{className:"jsx-afc90e8bb3de8087 container",children:[(0,s.jsx)(p.Ay,{Header:(0,s.jsx)(p.d6,{children:(0,s.jsxs)(p.eB,{orientation:"horizontal",children:[(0,s.jsx)(V.A,{big:!0,customId:a?.logoId||"crv",className:"icon"}),(0,s.jsxs)(p.hE,{children:[a?.name||"Curve"," Gauge Weights"]}),(0,s.jsx)("div",{className:"jsx-afc90e8bb3de8087 badges-container",children:(0,s.jsx)(P,{activeCount:+!!c,pastCount:i})})]})}),Content:(0,s.jsxs)(p.Bo,{children:[(0,s.jsxs)("p",{className:"jsx-afc90e8bb3de8087",children:["Vote every two weeks to direct ",a?.emissionTokenName," emissions to ",a?.shortName," pools"]}),(0,s.jsxs)("div",{className:"jsx-afc90e8bb3de8087",children:[(0,s.jsx)("div",{className:"jsx-afc90e8bb3de8087 button-container",children:(0,s.jsx)(n.A,{href:`/vote/weights/${e}`,size:"small",color:c?"primary":"secondary",children:m?(0,s.jsxs)(s.Fragment,{children:["Vote for ",a?.name||"Curve"," gauge weights"]}):(0,s.jsxs)(s.Fragment,{children:["View ",a?.name||"Curve"," gauge votes"]})})}),(0,s.jsx)("div",{className:"jsx-afc90e8bb3de8087 footer",children:j?(0,s.jsx)(s.Fragment,{children:"â"}):m?(0,s.jsxs)("p",{className:"jsx-afc90e8bb3de8087",children:["Vote ends in ",(0,s.jsx)($.Ay,{date:1e3*d.endTime,renderer:F.JU}),t&&(0,s.jsxs)("span",{className:"jsx-afc90e8bb3de8087 incentives-available",children:[" â ",(0,s.jsxs)("span",{className:"jsx-afc90e8bb3de8087 figure",children:[(0,s.jsx)("span",{className:"jsx-afc90e8bb3de8087 small",children:"$"}),void 0===W?"â":(0,v.sz)((0,x.A)(W),2,void 0,!0)]})," incentives available"]})]}):b?t?(0,s.jsxs)("p",{className:"jsx-afc90e8bb3de8087",children:["Last round incentives APR: ",void 0===y?"â":(0,s.jsxs)("span",{className:"jsx-afc90e8bb3de8087 figure",children:[(0,v.o)((0,x.A)(y),2),(0,s.jsx)("span",{className:"jsx-afc90e8bb3de8087 small",children:"%"})]})," (ended ",(0,F.T9)((0,F.j2)(),h.endTime)," ago)"]}):(0,s.jsxs)(s.Fragment,{children:["Last vote ended ",(0,F.T9)((0,F.j2)(),h.endTime)," ago"]}):(0,s.jsx)("i",{className:"jsx-afc90e8bb3de8087",children:"No proposal yet"})})]})]}),variant:"primary",expanded:!0}),(0,s.jsx)(l(),{id:"afc90e8bb3de8087",children:".container.jsx-afc90e8bb3de8087 .figure{font-weight:bold}.container.jsx-afc90e8bb3de8087 .incentives-available{white-space:nowrap}.container.jsx-afc90e8bb3de8087 .small{font-size:.8em}.container.jsx-afc90e8bb3de8087 .button-container{text-align:center}"})]})})};var _=t(56503),U=t(34890);let Z=()=>{let e=(0,U.A)();return(0,s.jsxs)("div",{className:"jsx-aed91f50d245d208 container",children:[(0,s.jsxs)("div",{className:"jsx-aed91f50d245d208",children:[(0,s.jsx)("h2",{className:"jsx-aed91f50d245d208 white",children:"Vote with your vlCVX"}),(0,s.jsxs)("div",{className:"jsx-aed91f50d245d208 boxes",children:[C.D2.map(e=>(0,s.jsx)(G,{platform:e.id},`WeightActionBox-${e.id}`)),C.AM.map(({id:e,name:a,logoId:t})=>(0,s.jsx)(E,{projectName:a,projectId:e,logoId:t},`ProposalActionBox-${e}`))]})]}),(0,s.jsxs)("div",{className:"jsx-aed91f50d245d208",children:[(0,s.jsx)(k,{locksData:e}),(0,s.jsx)(_.A,{}),(0,s.jsx)(c.A,{})]}),(0,s.jsx)(l(),{id:"aed91f50d245d208",children:".container.jsx-aed91f50d245d208{display:flex;gap:20px}.container.jsx-aed91f50d245d208>div:first-child{flex:2.1}.container.jsx-aed91f50d245d208>div:last-child{margin-top:37px;flex:1}h2.white.white.jsx-aed91f50d245d208{margin-top:0}.boxes.jsx-aed91f50d245d208{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));grid-gap:20px}.container.jsx-aed91f50d245d208 .snapshot-link .MuiSvgIcon-root{position:relative;top:2px}@media screen and (max-width:1050px){.container.jsx-aed91f50d245d208{display:block}.container.jsx-aed91f50d245d208>div:last-child{display:flex;flex-direction:column}}"})]})}},26569:(e,a,t)=>{"use strict";t.d(a,{A:()=>i});var s=t(66305);t(67141);var r=t(58511),l=t.n(r),o=t(59336);let c=({label:e,defaultValue:a,helperText:t,...r})=>(0,s.jsx)(o.A,{label:e,defaultValue:a,helperText:t,variant:"outlined",...r});c.propTypes={label:l().string,defaultValue:l().string,helperText:l().string};let i=c},38350:(e,a,t)=>{"use strict";t.d(a,{A:()=>c});
27var s=t(67141),r=t(80646),l=t(15406),o=t(94481);let c=(e,{enabled:a=!0}={})=>{let{ethereumWeb3:{account:t,library:c,chainId:i}}=(0,s.useContext)(l.A),[d,n]=(0,r.A)({});return(0,s.useEffect)(()=>{a&&c&&(0,o.A)(t,c,i).then(e=>{n(e)})},[e,t,c,i,a]),d}},41326:(e,a,t)=>{"use strict";t.d(a,{A:()=>m});var s=t(67141),r=t(80646),l=t(15406),o=t(17654),c=t.n(o),i=t(87233),d=t(74320),n=t(66629),x=t(64904),p=t(4386),u=t(68056),h=t.n(u);let v=c()(async(e,a,t,s)=>{let r=await (0,i.Ay)((0,n.ed)(p.wZ.map(({address:t,balanceHolder:s,contractAbi:r,balanceOfMethod:l,totalSupplyMethod:o})=>[{address:t,abi:r||x.Ay.Cvx.abi,methodName:l||"balanceOf",params:[s],metaData:{type:"balance"},web3Data:{account:"",library:e,chainId:a}},{address:t,abi:r||x.Ay.Cvx.abi,methodName:o||"totalSupply",metaData:{type:"totalSupply"},web3Data:{account:"",library:e,chainId:a}}]))),{balance:l,totalSupply:o}=h()(r,({metaData:{type:e}})=>e),c=await (0,i.Ay)((0,n.ed)(p.FO.map(({address:e,balanceHolder:a,contractAbi:r,balanceOfMethod:l,totalSupplyMethod:o})=>[{address:e,abi:r||x.Ay.Cvx.abi,methodName:l||"balanceOf",params:[a],metaData:{type:"balance"},web3Data:{account:"",library:t,chainId:s}},{address:e,abi:r||x.Ay.Cvx.abi,methodName:o||"totalSupply",metaData:{type:"totalSupply"},web3Data:{account:"",library:t,chainId:s}}]))),{balance:[u],totalSupply:[v]}=h()(c,({metaData:{type:e}})=>e);return(0,n.pl)(p.wZ.map(({symbol:e,decimals:a},t)=>{let s="veFXS"===e?(0,d.wt)(l[t].data,a).plus((0,d.wt)(u.data,a)):(0,d.wt)(l[t].data,a),r="veFXS"===e?(0,d.wt)(o[t].data,a).plus((0,d.wt)(v.data,a)):(0,d.wt)(o[t].data,a);return[e,{convex:s,total:r}]}))},{promise:!0,maxAge:6e5,length:0}),m=()=>{let{ethereumWeb3:{library:e,chainId:a},fraxtalWeb3:{library:t,chainId:o}}=(0,s.useContext)(l.A),[c,i]=(0,r.A)(void 0);return(0,s.useEffect)(()=>{e&&t&&v(e,a,t,o).then(e=>{i(e)})},[e,a,t,o]),c}},45545:(e,a,t)=>{"use strict";t.d(a,{A:()=>m});var s=t(67141),r=t(98977),l=t(17654),o=t.n(l),c=t(73101),i=t.n(c),d=t(62280),n=t(31804),x=t(55725),p=t(34668),u=t(67896);let h=o()(async(e,a,t)=>(0,u.A)(`${n.Rh.root}/api/vote/weights/${e}/proposal/${a}/tally`),{promise:!0,maxAge:1e3*x.PZ,primitive:!0});var v=t(5268);let m=(e,{withReadAtBlock:a=!1}={})=>{let t=(0,r.A)(e,"current"),{tally:l,readAtBlock:o}=((e,a,{withReadAtBlock:t=!1}={})=>{let[r,l]=(0,s.useState)(void 0),o=`${e}-${a}`;(0,s.useEffect)(()=>{if(void 0===e||void 0===a)return;let s=!0,r=()=>{h(e,a,(0,p.Ne)(x.PZ)).then(({readAtBlock:e,...a})=>{s&&void 0!==a.proposalId&&l(s=>{let r=s?.key===o&&i()(s.tally,a);return r&&(!t||s.readAtBlock===e)?s:{key:o,tally:r?s.tally:a,readAtBlock:t?e:void 0}})}).catch(e=>{console.error(e)})};r();let c=(0,d.m)(x.PZ,r);return()=>{s=!1,c()}},[e,a,t]);let c=r?.key===o;return{tally:c?r.tally:void 0,readAtBlock:c?r.readAtBlock:void 0}})(e,t?.currentProposal?.proposalId,{withReadAtBlock:a});return{currentProposalData:(0,s.useMemo)(()=>(0,v.K)(t,l),[t,l]),readAtBlock:o}}},57427:(e,a,t)=>{"use strict";t.d(a,{A:()=>j});var s=t(67141),r=t(17654),l=t.n(r),o=t(87233),c=t(74320),i=t(80646),d=t(15406),n=t(5901),x=t(64904),p=t(53443),u=t(33027),h=t(55725),v=t(99482),m=t(89619);let b=l()(async(e,a,t,s,r,l)=>{if(!s)return;let c=x.Ay.DaoDelegation,i=x.Ay.CvxLockerV2,d={account:s,library:r,chainId:l};if(void 0===a){let[e,a]=await (0,o.Ay)([{address:i.address,abi:i.abi,methodName:"balanceOf",params:[s],web3Data:d},{address:c.address,abi:c.abi,methodName:"balanceOf",params:[s],web3Data:d,superConfig:{silenceErrorInDev:!0}}]);return{proposalId:void 0,account:s,userVoteData:void 0,userInfo:void 0,vlcvxWeightAtEpoch:e,delegatedWeightAtEpoch:a,delegate:void 0}}let n=x.Ay[e],[p,u,h,v,m]=await (0,o.Ay)([{address:n.address,abi:n.abi,methodName:"getVote",params:[a,s],web3Data:d},{address:n.address,abi:n.abi,methodName:"userInfo",params:[a,s],web3Data:d},{address:i.address,abi:i.abi,methodName:"balanceAtEpochOf",params:[t,s],web3Data:d},{address:c.address,abi:c.abi,methodName:"balanceAtEpochOf",params:[t,s],web3Data:d,superConfig:{silenceErrorInDev:!0}},{address:c.address,abi:c.abi,methodName:"getDelegateAtEpoch",params:[s,t],web3Data:d,superConfig:{silenceErrorInDev:!0}}]);return{proposalId:a,account:s,userVoteData:p,userInfo:u,vlcvxWeightAtEpoch:h,delegatedWeightAtEpoch:v,delegate:m}}
27,{promise:!0,normalizer:([e,a,t,s])=>`${e}-${a}-${t}-${s}`,maxAge:8e3}),j=(e,a,t=!1,r="curve")=>{let l,o=(0,n.lc)(a),j=e?.proposalId,g=e?.epoch,f=(0,h.lk)(r),{ethereumWeb3:{library:A,chainId:N}}=(0,s.useContext)(d.A),[y,C]=(0,i.A)(void 0),[w,k]=(0,s.useState)(void 0),V=(0,p.A)();t?l=1:{blockNumber:l}=(0,s.useContext)(m.A);let D=`${f}-${j}-${g}-${o}`,W=(0,s.useRef)(D);(0,s.useEffect)(()=>{W.current=D,A&&(0,x.zE)()&&b(f,j,g,o,A,N).then(e=>{W.current===D&&(C(e),k(e=>e===D?void 0:e))}).catch(e=>{console.error(e),W.current===D&&k(D)})},[D,l,typeof A,V]);let P=o===y?.account&&j===y?.proposalId,I=void 0!==y?.userVoteData&&null!==y.userVoteData&&P,S=I?y.userVoteData.voted:void 0,E=P?I&&S?{own:(0,c.wt)(y.userVoteData.baseWeight,18).toNumber(),delegated:(0,c.wt)(y.userVoteData.adjustedWeight,18).toNumber(),total:(0,c.wt)(y.userVoteData.baseWeight,18).plus((0,c.wt)(y.userVoteData.adjustedWeight,18)).toNumber()}:void 0!==y?.vlcvxWeightAtEpoch?{own:(0,c.wt)(y.vlcvxWeightAtEpoch||0,18).toNumber(),delegated:(0,c.wt)(y.delegatedWeightAtEpoch||0,18).plus((0,c.wt)(y.userVoteData?.adjustedWeight||0,18)).toNumber(),total:(0,c.wt)(y.vlcvxWeightAtEpoch||0,18).plus((0,c.wt)(y.delegatedWeightAtEpoch||0,18)).plus((0,c.wt)(y.userVoteData?.adjustedWeight||0,18)).toNumber()}:void 0:void 0,$=I&&y.delegate&&(0,n.lc)(y.delegate)!==(0,n.lc)(u.cF)?y.delegate:null,F=w===D&&!P,z=void 0!==o&&!P&&!F;return(0,s.useMemo)(()=>({proposalId:j,account:a,userEffectiveWeight:E,delegate:$,isLoading:z,hasFailed:F,hasUncommittedVoteWeight:(0,v.J9)(S,y?.userInfo?.totalDelegationWeight,y?.delegatedWeightAtEpoch),uncommittedVoteWeight:(0,v.v)(S,y?.userInfo?.totalDelegationWeight,y?.delegatedWeightAtEpoch),userVoteData:I?{voted:y.userVoteData.voted,votedViaSurrogate:"VotedViaSurrogate"===h.gt[Number(y.userInfo?.voteStatus)],yesWeight:Number(y.userVoteData.yesWeight),noWeight:Number(y.userVoteData.noWeight)}:void 0}),[a,j,y,I,z,F])}},86497:(e,a,t)=>{"use strict";t.d(a,{A:()=>i});var s=t(66305),r=t(96295),l=t.n(r);t(67141);var o=t(56474),c=t(43316);let i=()=>(0,s.jsxs)("span",{className:"jsx-4f08cc18707dc8d8",children:[(0,s.jsx)(o.A,{arrow:!0,title:"You can increase your vote weight by relocking those!",children:(0,s.jsx)(c.A,{})}),(0,s.jsx)(l(),{id:"4f08cc18707dc8d8",children:"span.jsx-4f08cc18707dc8d8 svg{font-size:15px;position:relative;top:2px;cursor:help}"})]})},94481:(e,a,t)=>{"use strict";t.d(a,{A:()=>v});var s=t(17654),r=t.n(s),l=t(87233),o=t(74320),c=t(48491),i=t(66629),d=t(31804),n=t(64904),x=t(41732),p=t(45969);let u=r()(()=>"root"===d.yl?["CvxCrvWrapper","CvxRewards","CvxPrismaStaking","CvxFxsStaking","CvxFpisStaking","CvxFxnStaking","CvxCrv","CvxLockerV2","CvxLocker","CvxLockerOld",...(0,c.getCurvePools)("ethereum").map(({rewardContractKey:e})=>e),...(0,c.getCurveLendingVaults)("ethereum").map(({rewardContractKey:e})=>e)]:"curve"===d.yl?["CvxCrvRewards","CvxCrvWrapper","CvxRewards","Cvx","CvxCrv",...(0,c.getCurvePools)("ethereum").map(({rewardContractKey:e})=>e),...(0,c.getCurveLendingVaults)("ethereum").map(({rewardContractKey:e})=>e)]:"frax"===d.yl?["CvxFxs","Cvx","CvxFxsStaking","CvxFpisStaking",...(0,c.getCurvePools)("ethereum").map(({rewardContractKey:e})=>e)]:"prisma"===d.yl?["CvxPrisma","Cvx","CvxPrismaStaking","StabilityPoolMkusd","StabilityPoolUltra",...(0,c.getCurvePools)("ethereum").map(({rewardContractKey:e})=>e),...p.default.map(({stakingTokenContractKey:e})=>e)]:"fxp"===d.yl?["CvxFxn","Cvx","CvxFxnStaking",...(0,c.getCurvePools)("ethereum").map(({rewardContractKey:e})=>e)]:[],{normalizer:()=>(0,c.arePoolsLoaded)()&&(0,c.areLendingVaultsLoaded)()&&(0,n.zE)(),max:2}),h={CvxLockerOld:"lockedSupply",CvxLocker:"lockedSupply",CvxLockerV2:"lockedSupply",StabilityPoolMkusd:"getTotalDebtTokenDeposits",StabilityPoolUltra:"getTotalDebtTokenDeposits",default:"totalSupply"},v=r()(async(e,a,t)=>{await (0,x.Kc)(()=>(0,c.arePoolsLoaded)()&&(0,c.areLendingVaultsLoaded)()&&(0,n.zE)());let s=u(),r=s.map(s=>({address:n.Ay[s].address,abi:n.Ay[s].abi,methodName:h[s]||h.default,web3Data:{account:e,library:a,chainId:t}})),d=await (0,l.Ay)(r);return(0,i.pl)(s.map((e,a)=>[e,(0,o.wt)(d[a],n.Ay[e].decimals)]))},{promise:!0,maxAge:8e3,length:0})}},e=>{e.O(0,[4313,5416,8699,103,4784,6112,3058,6863,8350,2952,2968,2387,3764,1786,4259,429,3731,7334,7358],()=>e(e.s=8320)),_N_E=e.O()}]);
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.