(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5405],{474721:function(e,t,i){"use strict";var r=i(564836);t.Z=void 0;var o=r(i(864938)),l=i(785893),s=(0,o.default)((0,l.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"}),"Info");t.Z=s},848317:function(e,t,i){"use strict";var r=i(564836);t.Z=void 0;var o=r(i(864938)),l=i(785893),s=(0,o.default)((0,l.jsx)("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"KeyboardArrowRight");t.Z=s},275557:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return i(67427)}])},67427:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return Y}});var r=i(785893),o=i(803447),l=i(811163),s=i(667294),n=i(744267);i(120780);var a=i(379878),x=i(999226);(0,i(690948).ZP)(x.Z)(()=>({width:20,height:20,borderWidth:3,borderRadius:"50%",borderStyle:"solid"}));var d=i(425675),c=i.n(d),p=()=>(0,r.jsx)("div",{children:(0,r.jsx)(n.Z,{sx:{display:"flex",textAlign:"center",alignItems:"center",flexDirection:"column",gap:"2rem",backgroundSize:"auto auto",backgroundRepeat:"no-repeat",backgroundSize:"100%",padding:"0"},children:(0,r.jsx)("img",{src:"../../../images/HeaderBannerBeforeAccess.svg",height:"100%",width:"100%",alt:""})})}),h=i(411057),g=i(415861),u=i(387918),f=i(434530),m=e=>{let{setShowWallet:t}=e;return(0,r.jsxs)(x.Z,{sx:{display:"flex",gap:"1.25rem",flexDirection:{sm:"column",md:"row",lg:"row",xl:"row"},flexWrap:{sm:"wrap",md:"wrap",xs:"wrap"}},children:[(0,r.jsxs)(h.Z,{sx:{p:"32px 20px 28px 20px",display:"flex",flex:1,textAlign:"center",alignItems:"center",flexDirection:"column",border:"1px solid #98ECFF",textTransform:"capitalize",borderRadius:"0",gap:"15px",boxShadow:"0px 0px 10px -2px #9ADBFF"},children:[(0,r.jsx)(x.Z,{sx:{display:"flex"},children:(0,r.jsx)(c(),{src:"/images/account_balance_wallet.svg",alt:"Loading Image",width:58,height:58})}),(0,r.jsx)(g.Z,{sx:{fontSize:"20px",fontWeight:"bold",fontWeight:600,textTransform:"capitalize",color:"#98ECFF",textShadow:"0px 0px 24px rgba(152, 236, 255, 0.86)"},children:"Get Access"}),(0,r.jsx)(g.Z,{sx:{color:"#949494",textAlign:"center",fontSize:"14px",fontStyle:"normal",fontWeight:"500",lineHeight:"20.02px",letterSpacing:"0.15px"},children:"Connect your web3 wallet to start your journey with Sharpe Base and experience Seamless DeFi management experience"}),(0,r.jsx)(x.Z,{children:(0,r.jsx)(f.Z,{})})]}),(0,r.jsxs)(h.Z,{disabled:!0,sx:{p:"32px 20px 28px 20px",display:"flex",flex:1,textAlign:"center",alignItems:"center",flexDirection:"column",border:"1px solid #B88EE3",textTransform:"capitalize",borderRadius:"0",gap:"15px",boxShadow:"0px 0px 10px -2px #B88EE3"},children:[(0,r.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",width:"100%",position:"absolute"},children:(0,r.jsx)("div",{style:{position:"relative",bottom:"90px",right:"24px"},children:(0,r.jsx)(u.Z,{size:"medium",label:"COMING SOON...",variant:"outlined",sx:{borderRadius:"0",height:"30px",fontSize:"10.5px"}})})}),(0,r.jsx)(x.Z,{sx:{display:"flex"},children:(0,r.jsx)(c(),{src:"/images/sim.png",alt:"Loading Image",width:58,height:58})}),(0,r.jsx)(g.Z,{sx:{fontSize:"20px",fontWeight:"bold",fontWeight:600,textTransform:"capitalize",color:"#B88EE3",fontWeight:500,textShadow:"0px 0px 24px rgba(184, 142, 227, 0.85)"},children:"Try Simulation"}),(0,r.jsx)(g.Z,{sx:{color:"#949494",textAlign:"center",fontSize:"14px",fontStyle:"normal",fontWeight:"500",lineHeight:"20.02px",letterSpacing:"0.15px",padding:"0px 54px"},children:"Want to give Base a spin first? Get a taste of Sharpe Base with our free Simulator powered by tenderly"}),(0,r.jsx)(h.Z,{sx:{color:"#B88EE3",textTransform:"capitalize",fontSize:"14px",padding:"8px 16px",border:"1px solid #B88EE3",textTransform:"capitalize",borderRadius:"0",gap:"15px"},variant:"outlined",children:"Explore Simulation"})]})]})},j=i(5283);i(970794);var b=i(809473);i(231429);var v=i(201954);i(766285);var y=i(100937);v.JO,y.portfolioTooltips.Asset,v.JO,y.portfolioTooltips.TokenWorth,v.JO,y.portfolioTooltips.Supplied,v.JO,y.portfolioTooltips.Borrowed,i(515337),i(85625);var Z=i(57097),w=i(886857);i(149090);var S=i(150657),F=i(6514),C=i(493946),E=i(278401),z=i(638206),W=i(474721),R=i(455798),k=i(587535),A=i(272982),D=i(487796),B=i(487106),T={src:"/_next/static/media/verticalDivider.5776ec2e.svg",height:27,width:3,blurWidth:0,blurHeight:0},I={src:"/_next/static/media/BlueCircle1.74834d25.svg",height:20,width:20,blurWidth:0,blurHeight:0},_={src:"/_next/static/media/BlueCircle2.d92a5b46.svg",height:20,width:20,blurWidth:0,blurHeight:0},O={src:"/_next/static/media/CheckBox.d9ca5880.svg",height:20,width:20,blurWidth:0,blurHeight:0},H=i(848317),P=e=>{let{open:t,onClose:i}=e,o=(0,l.useRouter)();return(0,r.jsx)(S.Z,{fullWidth:!0,open:t,onClose:i,maxWidth:"md",PaperProps:{style:{maxWidth:"500px",maxHeight:"608px",opacity:"80%",border:"1px solid #9ADBFF",boxShadow:"0px 4px 67px 0px rgba(152, 236, 255, 0.15)",borderRadius:0}},scroll:"body",children:(0,r.jsx)(F.Z,{sx:{background:"url(".concat(B.Z.src,") center / cover")},children:(0,r.jsxs)(x.Z,{sx:{padding:"125px 24px 125px 24px"},children:[(0,r.jsx)(x.Z,{children:(0,r.jsx)(C.Z,{size:"small",onClick:()=>o.push("/"),sx:{position:"absolute",right:"1rem",top:"1rem"},children:(0,r.jsx)(a.Z,{icon:"mdi:close"})})}),(0,r.jsx)(x.Z,{padding:2,children:(0,r.jsxs)(x.Z,{sx:{display:"flex",flexDirection:"column"},children:[(0,r.jsxs)(x.Z,{sx:{display:"flex",flexDirection:"column",gap:"10px"},children:[(0,r.jsx)(g.Z,{sx:{fontSize:"20px",color:"#98ECFF",textShadow:"0px 0px 22px 0px rgba(152, 236, 255, 0.35)",fontWeight:"400",lineHeight:"36px",letterSpacing:"-1.2px"},children:"You have successfully joined the sharpe Refer a Friend program."}),(0,r.jsx)(g.Z,{sx:{fontSize:"14px",color:"#E7E3FC99",fontWeight:"400",lineHeight:"20px",letterSpacing:"0.115pxpx",alignSelf:"stretch",paddingBottom:"30px"},children:"You will now receive 5% of all fees that you generate on Summer.fi. You can now go directly to the Summer.fi homepage and start exploring products to deploy capital into Defi."})]}),(0,r.jsx)(x.Z,{variant:"outlined",sx:{display:"flex",gap:"10px",padding:" 6px 16px",background:"#98ECFF",justifyContent:"center",fontSize:"12px",cursor:"default",textTransform:"capitalize",borderRadius:"0",alignItems:"center",alignSelf:"stretch",boxShadow:"0px 0px 29px 0px rgba(67, 128, 142, 0.52)"},width:"100%",onClick:()=>o.push("/"),children:(0,r.jsx)(g.Z,{color:"#0A0A0C",children:"Go to Earn homepage "})})]})})]})})})},N=e=>{let{modalOpen:t,setModalOpen:i}=e,[{wallet:n,connecting:d},p,h]=(0,o.Or)(),[u,f]=(0,s.useState)(null);console.log("ethersProvider",u);let[m,j]=(0,s.useState)(null);console.log("connecting",d),console.log("wallet",n);let v=(0,b.v9)(e=>e.accountAddress.accountAddress);console.log("Account_Address",v);let[y,Z]=(0,s.useState)(!1),N=(0,b.I0)(),[Y,M]=s.useState(!1);console.log("modalOpen",t);let[q,G]=s.useState({message:"",color:"#FFF",background:"rgba(255, 255, 255, 0.08)"});d&&(console.log("connecting",d),console.log("wallet",n),null!=n?(console.log("connecting",d),console.log("wallet",n),console.log(t),i(!0),console.log(t)):(console.log("wallet",n),i(!1))),(0,s.useEffect)(()=>{if(null==n?void 0:n.provider){var e;let{name:t,avatar:i}=null!==(e=null==n?void 0:n.accounts[0].ens)&&void 0!==e?e:{};j({address:n.accounts[0].address,balance:n.accounts[0].balance,ens:{name:t,avatar:null==i?void 0:i.url}}),N((0,A.B)(n.accounts[0].address))}},[n]),(0,s.useEffect)(()=>{(null==n?void 0:n.provider)&&(f(new R.Web3Provider(n.provider,"any")),N((0,k.h)(new R.Web3Provider(n.provider,"any"))))},[n]);let J=()=>{N((0,D.j)(!0)),p()},L=(0,l.useRouter)(),{REF:X}=L.query;(0,s.useEffect)(()=>{X&&console.log("Referral Code:",X)},[X]);let K=async()=>{try{let e=await (0,w.activateReferral)(u,m.address,X);if(e.status)console.log("Referral activation successful:",e.message),Z(!0);else{let t="",i="#FFF",r="rgba(255, 255, 255, 0.2)";switch(e.message){case"You already activated the referral":case"You can't refer yourself":t=e.message,i="#FFF280",r="rgba(255, 242, 128, 0.2)";break;case"You are not eligible for referral":case"Invalid Activation message":t=e.message,i="#FF6060",r="rgba(255, 96, 96, 0.2)";break;case"Activation message is not generated":case"Activation message expired":case"Invalid Referral code":t=e.message,i="#FF8863",r="rgba(255, 136, 99, 0.2)";break;case"Invalid signature":t=e.message,i="#FF6060",r=" rgba(255, 96, 96, 0.2)";break;default:t="Referral activation failed",i="#FF6060",r="rgba(255, 96, 96, 0.2)"}G({message:t,color:i,background:r}),M(!0)}}catch(e){console.log(e)}};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(S.Z,{fullWidth:!0,open:t,onClose:()=>{i(!1)},maxWidth:"md",PaperProps:{style:{maxWidth:"500px",maxHeight:"608px",opacity:"80%",border:"1px solid #9ADBFF",boxShadow:"0px 4px 67px 0px rgba(152, 236, 255, 0.15)",borderRadius:0}},scroll:"body",children:(0,r.jsx)(F.Z,{sx:{background:"url(".concat(B.Z.src,") center / cover")},children:(0,r.jsxs)(x.Z,{sx:{padding:"79px 24px 10px 24px"},children:[(0,r.jsx)(x.Z,{children:(0,r.jsx)(C.Z,{size:"small",onClick:()=>L.push("/"),sx:{position:"absolute",right:"1rem",top:"1rem"},children:(0,r.jsx)(a.Z,{icon:"mdi:close"})})}),(0,r.jsx)(x.Z,{children:(0,r.jsxs)(x.Z,{sx:{display:"flex",flexDirection:"column"},children:[(0,r.jsxs)(x.Z,{sx:{display:"flex",flexDirection:"column",gap:"10px"},children:[(0,r.jsx)(g.Z,{sx:{fontSize:"20px",color:"#98ECFF",textShadow:"0px 0px 22px 0px rgba(152, 236, 255, 0.35)",fontWeight:"400",lineHeight:"36px",letterSpacing:"-1.2px"},children:"You have been invited to the SHARPE REFERRAL program by 0x5b77...45881"}),(0,r.jsx)(g.Z,{sx:{fontSize:"14px",color:"#E7E3FC99",fontWeight:"400",lineHeight:"20px",letterSpacing:"0.115pxpx",alignSelf:"stretch",paddingBottom:"30px"},children:"SHARPE is the most trusted place to deploy capital into Defi. By joining our Refer a Friend program you:"})]}),(0,r.jsxs)(x.Z,{display:"flex",flexDirection:"column",children:[(0,r.jsxs)(x.Z,{display:"flex",flexDirection:"row",gap:"10px",alignContent:"center",alignItems:"center",children:[n?(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(c(),{src:_,height:20,width:20,alt:""})}):(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(c(),{src:I,height:20,width:20,alt:""})}),(0,r.jsx)(g.Z,{fontSize:"20px",fontWeight:"500",color:"#98ECFF80",children:"01"}),n?(0,r.jsx)(x.Z,{variant:"outlined",sx:{display:"flex",gap:"10px",padding:"6px 16px",background:"#0F1416",justifyContent:"center",fontSize:"12px",cursor:"default",border:"1px solid #527D87",textTransform:"capitalize",borderRadius:"0",alignItems:"center",alignSelf:"stretch",opacity:.5},width:"100%",children:(0,r.jsx)(g.Z,{color:"#98ECFF",children:"Connect Wallet"})}):(0,r.jsx)(x.Z,{variant:"outlined",sx:{display:"flex",gap:"10px",padding:"6px 16px",background:"#0F1416",justifyContent:"center",fontSize:"12px",cursor:"default",border:"1px solid #527D87",textTransform:"capitalize",borderRadius:"0",alignItems:"center",alignSelf:"stretch"},width:"100%",disabled:d,onClick:()=>J(),children:(0,r.jsx)(g.Z,{color:"#98ECFF",children:"Connect Wallet"})}),n?(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(c(),{src:O,height:20,width:20,alt:""})}):(0,r.jsx)(r.Fragment,{})]}),(0,r.jsx)(x.Z,{display:"flex",sx:{padding:"0px 10px 0px 12px"},children:(0,r.jsx)(c(),{src:T,height:30,alt:"",style:{marginLeft:"-4px"}})}),(0,r.jsxs)(x.Z,{display:"flex",flexDirection:"row",gap:"10px",alignContent:"center",alignItems:"center",paddingTop:"5px",children:[n?(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(c(),{src:I,height:20,width:20,alt:""})}):(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(c(),{src:_,height:20,width:20,alt:""})}),(0,r.jsx)(g.Z,{fontSize:"20px",fontWeight:"500",color:"#98ECFF80",children:"02"}),n?(0,r.jsx)(x.Z,{variant:"outlined",sx:{display:"flex",gap:"10px",padding:" 6px 16px",background:"#98ECFF",justifyContent:"center",fontSize:"12px",cursor:"pointer",textTransform:"capitalize",borderRadius:"0",alignItems:"center",alignSelf:"stretch"},width:"100%",onClick:()=>K(),children:(0,r.jsx)(g.Z,{color:"#0A0A0C",children:"accept invite."})}):(0,r.jsx)(x.Z,{variant:"outlined",sx:{display:"flex",gap:"10px",padding:" 6px 16px",background:"#98ECFF",justifyContent:"center",fontSize:"12px",cursor:"not-allowed",textTransform:"capitalize",borderRadius:"0",alignItems:"center",alignSelf:"stretch",opacity:.5},width:"100%",disabled:!0,children:(0,r.jsx)(g.Z,{color:"#0A0A0C",children:"accept invite."})})]})]}),(0,r.jsxs)(x.Z,{sx:{display:"flex",justifyContent:"center",paddingTop:"100px"},onClick:()=>L.push("/"),children:[(0,r.jsx)(g.Z,{color:"#98ECFF",fontSize:"12px",fontWeight:"500",sx:{cursor:"pointer"},children:"Deny Request"}),(0,r.jsx)(H.Z,{style:{fill:"#98ECFF",height:"17px",width:"25px"}})]}),(0,r.jsx)(x.Z,{sx:{width:500},children:(0,r.jsx)(E.Z,{anchorOrigin:{vertical:"bottom",horizontal:"right"},open:Y,onClose:()=>M(!1),children:(0,r.jsx)(z.Z,{sx:{color:q.color,backgroundColor:q.background,borderRadius:"0"},message:(0,r.jsxs)(x.Z,{sx:{display:"flex",alignItems:"center",gap:"10px"},children:[(0,r.jsx)(W.Z,{}),q.message]})})},"bottom-right")})]})})]})})}),(0,r.jsx)(P,{open:y,onClose:()=>Z(!1)})]})},Y=()=>{let e=(0,l.useRouter)(),[t,i]=(0,s.useState)(!1),[{wallet:n,connecting:a},x,d]=(0,o.Or)(),[c,h]=(0,s.useState)(!0),[g,u]=(0,s.useState)(!1);return(0,b.v9)(e=>e.accountAddress.accountAddress),(0,s.useEffect)(()=>{"REF"in e.query&&i(!0)},[e.query]),(0,s.useEffect)(()=>{(null==n?void 0:n.provider)?h(!1):h(!0)},[n]),(0,s.useEffect)(()=>{null==n||n.provider},[c,n]),(0,r.jsx)("div",{children:c?(0,r.jsxs)("div",{style:{width:"100%",display:"flex",flexDirection:"column"},children:[(0,r.jsx)(p,{}),(0,r.jsx)(m,{setShowWallet:h}),(0,r.jsx)(j.Z,{}),(0,r.jsx)(N,{modalOpen:t,setModalOpen:i})]}):(0,r.jsxs)("div",{style:{width:"100%"},children:[(0,r.jsx)(Z.Z,{}),(0,r.jsx)(N,{modalOpen:t,setModalOpen:i})]})})}}},function(e){e.O(0,[6886,4431,1927,5060,644,9176,9698,9774,2888,179],function(){return e(e.s=275557)}),_N_E=e.O()}]);