1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2490],{35883:function(){},46601:function(){},89214:function(){},42480:function(){},85568:function(){},69386:function(){},31616:function(){},20131:function(){},16026:function(){},75992:function(){},62575:function(){},33370:function(){},84430:function(e,t,s){"use strict";s.d(t,{$C:function(){return l},Mf:function(){return o},Zn:function(){return i},y3:function(){return n}});var r=s(57437),a=s(76630);let n=e=>{let{className:t}=e;return(0,r.jsxs)("svg",{className:(0,a.AK)("h-4 w-4 animate-spin",t),xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,r.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,r.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})},o=e=>{let{className:t}=e;return(0,r.jsx)("div",{className:(0,a.AK)("w-full animate-pulse",t),children:(0,r.jsx)("div",{className:"h-9 rounded bg-slate-300 dark:bg-slate-700"})})},l=e=>{let{className:t}=e;return(0,r.jsxs)("div",{className:(0,a.AK)("animate-pulse",t),children:[(0,r.jsx)("div",{className:"mb-6 h-4 rounded bg-gray-200"}),(0,r.jsx)("div",{className:"mb-6 h-4 rounded bg-gray-300"}),(0,r.jsx)("div",{className:"mb-6 h-4 rounded bg-gray-200"}),(0,r.jsx)("div",{className:"mb-6 h-4 rounded bg-gray-300"}),(0,r.jsx)("div",{className:"h-4 rounded bg-gray-200"})]})},i=e=>{let{className:t}=e;return(0,r.jsxs)("div",{className:(0,a.AK)("flex w-full animate-pulse gap-x-6",t),children:[(0,r.jsx)("div",{className:"h-20 max-h-20 min-h-20 w-20 min-w-20 max-w-20 rounded-full bg-gray-300"}),(0,r.jsxs)("div",{className:"w-full",children:[(0,r.jsxs)("div",{className:"mb-8 flex items-center",children:[(0,r.jsx)("div",{className:"mr-7 h-12 w-1/3 rounded bg-gray-300"}),(0,r.jsx)("div",{className:"mr-5 h-6 w-6 rounded bg-gray-300"}),(0,r.jsx)("div",{className:"mr-2 h-6 w-6 rounded bg-gray-300"})]}),(0,r.jsx)("div",{className:"mb-3 h-5 rounded bg-gray-200"}),(0,r.jsx)("div",{className:"h-5 w-2/3 rounded bg-gray-200"})]})]})}},22122:function(e,t,s){"use strict";var r=s(57437),a=s(2265),n=s(31103),o=s(76630);let l={default:"px-4 py-3",dense:"px-2 py-1"};t.Z=e=>{var t;let{children:s,className:i,classNameChildren:c,getContent:d,stayOpenOnHover:u,placement:m,theme:g}=e,[f,h]=(0,a.useState)(null),[b,x]=(0,a.useState)(null),[y,p]=(0,a.useState)(null),[v,w]=(0,a.useState)(!1),{styles:k,attributes:j,update:N}=(0,n.D)(f,b,{placement:m||"bottom",strategy:"fixed",modifiers:[{name:"offset",options:{offset:[0,12]}},{name:"arrow",options:{element:y}}]}),_=null;(0,a.useEffect)(()=>{N&&N()},[N,v]);let C=async e=>{_&&clearTimeout(_),e?w(!0):u?_=setTimeout(()=>{w(!1)},50):w(!1)},S=null!==(t=j.popper&&j.popper["data-popper-placement"])&&void 0!==t?t:"bottom";return(0,r.jsxs)("div",{className:i,onMouseLeave:()=>C(!1),children:[(0,r.jsx)("div",{onMouseEnter:()=>C(!0),onMouseLeave:()=>C(!1),ref:h,className:c,children:s}),v&&(0,r.jsxs)("div",{onMouseEnter:()=>u?C(!0):null,ref:x,className:(0,o.AK)("z-[100] max-w-[90%] rounded-lg border border-gray-200 bg-white text-sm leading-relaxed text-gray-900 opacity-100 shadow-xl dark:border-gray-500 dark:bg-gray-700 dark:text-gray-300",v?"block":"hidden",l[g||"default"]),style:k.popper,...j.popper,children:[d(),(0,r.jsx)("div",{onMouseEnter:()=>u?C(!0):null,className:(0,o.AK)("relative h-4 w-4 transform before:absolute before:left-1/2 before:h-2 before:w-2 before:-translate-x-1/2 before:-translate-y-1/2 before:rotate-45 before:transform before:border-gray-200 before:bg-white before:dark:border-gray-500 before:dark:bg-gray-700","bottom"===S?"-top-3 before:top-[11px] before:border-l before:border-t":"top"===m?"-bottom-3 before:top-[5px] before:border-b before:border-r":"left"===m?"-right-2 before:top-[9px] before:border-r before:border-t":"right"===m?"-left-2 before:top-[9px] before:border-b before:border-l":"hidden"),ref:p,style:k.arrow})]})]})}},8015:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return G}});var r=s(57437),a=s(76630),n=s(84430),o=s(2265),l=s(77244),i=s(19422),c=s(31882),d=s(68651),u=s(75435),m=s(97754),g=s(14723),f=s(50995),h=s(46332);function b(e){let{chainKey:t,validator:s,classNameConnected:n,onDisconnect:i,onConnect:c,onConnected:d}=e,{username:u,status:g,connect:b,disconnect:x,wallet:y,openView:p,message:v,address:w}=(0,l.Ab)((null==t?void 0:t.replace("-",""))||(null==s?void 0:s.chainKey.replace("-",""))||"cosmoshub",!1),k=(0,o.useRef)();return((0,o.useEffect)(()=>{k.current!==g&&(g===m.PR.Connected&&(null==d||d()),k.current=g)},[g,d]),g===m.PR.Connecting)?(0,r.jsx)("div",{className:(0,a.AK)("flex"),children:(0,r.jsxs)("button",{className:"flex items-center justify-center gap-x-1.5 rounded-md border bg-gray-100 px-2.5 py-1.5 text-sm shadow-sm transition-colors duration-150 hover:bg-gray-200 focus-visible:outline focus-visible:outline-2 dark:border-gray-600 dark:bg-gray-800 dark:hover:border-gray-600 dark:hover:bg-gray-700",onClick:()=>b(),children:[(0,r.jsx)(f.Z,{className:"h-4 w-4"}),"Connecting ".concat(null==y?void 0:y.prettyName)]})}):g===m.PR.Connected?(0,r.jsxs)("div",{className:(0,a.AK)("flex",n||""),children:[(0,r.jsx)("button",{className:"flex items-center justify-center gap-x-1.5 rounded-md border bg-gray-100 px-2.5 py-1.5 text-sm shadow-sm transition-colors duration-150 hover:bg-gray-200 focus-visible:outline focus-visible:outline-2 dark:border-gray-600 dark:bg-gray-800 dark:hover:border-gray-600 dark:hover:bg-gray-700",onClick:()=>p(),children:(0,r.jsxs)("div",{className:"flex items-center justify-center space-x-2",children:[(0,r.jsx)("span",{className:"mb-2 flex h-2 w-2 translate-y-1 rounded-full bg-green-500 leading-4"}),(0,r.jsxs)("span",{children:[null==y?void 0:y.prettyName,":"," ",(0,r.jsx)("span",{className:"font-mono text-xs",children:(0,a.Tg)(w)})," ",u?"(".concat((0,a.Sy)(u),")"):""]})]})}),(0,r.jsxs)("button",{className:"ml-2 flex items-center justify-center gap-x-1.5 rounded-md border border-red-800 bg-red-700 px-2.5 py-1.5 text-sm font-semibold text-white shadow-sm transition-colors duration-150 hover:bg-red-800 focus-visible:outline focus-visible:outline-2 dark:border-red-700 dark:bg-red-800 dark:hover:border-red-700 dark:hover:bg-red-700",onClick:async()=>{await x(),null==i||i()},children:[(0,r.jsx)(h.Z,{className:"h-4 w-4"}),"Disconnect"]})]}):(0,r.jsxs)("div",{className:"flex flex-col items-end justify-end",children:[(0,r.jsx)("button",{className:"ml-2 flex items-center justify-center gap-x-1.5 rounded-md border border-transparent bg-blue-600 px-2.5 py-1.5 text-sm font-semibold text-white shadow-sm transition-colors duration-150 focus-visible:outline focus-visible:outline-2 enabled:hover:bg-blue-700 disabled:cursor-not-allowed disabled:opacity-50 dark:enabled:hover:bg-blue-500",onClick:()=>{b(),null==c||c()},children:"Connect Wallet"}),g===m.PR.Error&&(0,r.jsx)("div",{className:"mt-1 max-w-60 break-words text-right text-xs text-red-600 dark:text-red-400",children:v})]})}var x=s(93991),y=s(64002),p=s(12739),v=s(1560),w=s(36149),k=s(43933),j=s(12639),N=s(2666
15),_=s(47721),C=s(38430),S=s(26490),E=s(21811),K=s(48283),A=s(20407);let B=["dymension_1100-1","evmos_9001-2","acre_9052-1","canto_7700-1","blockx_100-1"];async function P(e){let{client:t,signer:s,chain:r,signerAddress:a,messages:n,fee:o,memo:l}=e,c=await fetch("https://rest.cosmos.directory/".concat(r.chain_name,"/cosmos/auth/v1beta1/accounts/").concat(a));if(i.r8&&console.log("signEvmWithKeplr accountRes",c),!c.ok)throw Error("Failed to retrieve account from signer: "+(c.statusText||c.status));let d=await c.json();i.r8&&console.log("signEvmWithKeplr account",d.account);let u=BigInt("base_account"in d.account?d.account.base_account.sequence:d.account.sequence),m=Number("base_account"in d.account?d.account.base_account.account_number:d.account.account_number),g=(await s.getAccounts()).find(e=>e.address===a);if(!g)throw Error("Failed to retrieve account from signer");let f=g.pubkey,h=C.Any.fromPartial({typeUrl:"/ethermint.crypto.v1.ethsecp256k1.PubKey",value:S.PubKey.encode({key:f}).finish()}),b={typeUrl:"/cosmos.tx.v1beta1.TxBody",value:{messages:n,memo:l}};i.r8&&console.log("signEvmWithKeplr txBodyEncodeObject",b),i.r8&&console.log("signEvmWithKeplr fee",o);let x=t.registry.encode(b),y=_.Y8.fromString(o.gas).toNumber(),p=(0,N.makeAuthInfoBytes)([{pubkey:h,sequence:u}],o.amount,y,void 0,void 0),v=(0,N.makeSignDoc)(x,p,r.chain_id,m);i.r8&&console.log("signEvmWithKeplr signDoc",v);let{signature:w,signed:k}=await s.signDirect(a,v);return E.TxRaw.encode({bodyBytes:k.bodyBytes,authInfoBytes:k.authInfoBytes,signatures:[(0,j.fromBase64)(w.signature)]}).finish()}async function T(e){let{client:t,signer:s,chain:r,signerAddress:a,messages:n,memo:o}=e,l=await fetch("https://rest.cosmos.directory/".concat(r.chain_name,"/cosmos/auth/v1beta1/accounts/").concat(a));if(i.r8&&console.log("signEvmWithKeplr accountRes",l),!l.ok)throw Error("Failed to retrieve account from signer: "+(l.statusText||l.status));let c=await l.json();i.r8&&console.log("signEvmWithKeplr account",c.account);let d=BigInt("base_account"in c.account?c.account.base_account.sequence:c.account.sequence),u=(await s.getAccounts()).find(e=>e.address===a);if(!u)throw Error("Failed to retrieve account from signer");let m=u.pubkey,g=C.Any.fromPartial({typeUrl:"/ethermint.crypto.v1.ethsecp256k1.PubKey",value:S.PubKey.encode({key:m}).finish()});i.r8&&console.log("signEvmWithKeplr txBodyEncodeObject",{typeUrl:"/cosmos.tx.v1beta1.TxBody",value:{messages:n,memo:o}});let f=n.map(e=>t.registry.encodeAsAny(e));i.r8&&console.log("signEvmWithKeplr anyMsgs",f);let h=E.Tx.fromPartial({authInfo:E.AuthInfo.fromPartial({fee:E.Fee.fromPartial({}),signerInfos:[{publicKey:g,sequence:d,modeInfo:{single:{mode:K.SignMode.SIGN_MODE_UNSPECIFIED}}}]}),body:E.TxBody.fromPartial({messages:Array.from(f),memo:o}),signatures:[new Uint8Array]}),b=A.SimulateRequest.fromPartial({txBytes:E.Tx.encode(h).finish()});i.r8&&console.log("signEvmWithKeplr toBase64(request.txBytes)",(0,j.toBase64)(b.txBytes));let x=await fetch("https://rest.cosmos.directory/".concat(r.chain_name,"/cosmos/tx/v1beta1/simulate"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({tx_bytes:(0,j.toBase64)(b.txBytes)})});if(!x.ok)throw console.error("Failed to simulate transaction:",x.statusText),Error("Failed to simulate transaction: "+(x.statusText||x.status));let y=await x.json();return i.r8&&console.log("signEvmWithKeplr data",y),y.gas_info.gas_used}var M=s(97387),R=s(27280),Z=s(22122),W=s(83066),F=e=>{var t;let{validator:s,showMemo:f,showStats:h,title:j}=e,[_,C]=(0,o.useState)(!1),{stakeWayMemo:S}=(0,g.I8)(),{getSigningStargateClient:E,chain:K,status:A,address:F,openView:I,chainWallet:D,walletRepo:O,getRpcEndpoint:V,getOfflineSignerDirect:U}=(0,l.Ab)(s.chainKey.replace("-",""),!0),L=(0,o.useMemo)(()=>c.assets.find(e=>e.chain_name===s.chainKey.replace("-","")),[s.chainKey]),q=(0,o.useMemo)(()=>L.assets.find(e=>e.symbol.split(".")[0]===s.ticker),[L,s.ticker]),G=(0,o.useMemo)(()=>{var e;return null===(e=q.denom_units.find(e=>e.denom===q.display))||void 0===e?void 0:e.exponent},[q]),[H,$]=(0,o.useState)(new d.Z(0)),[z,J]=(0,o.useState)(!1),[Q,Y]=(0,o.useState)(!1),[X,ee]=(0,o.useState)(""),{htmlElRef:et,setFocus:es}=(0,w.K)(),er=(0,o.useRef)(!1),[ea,en]=(0,o.useState)({floatValue:void 0,formattedValue:"",value:""});function eo(e){void 0!==e&&(e=parseFloat(e.toFixed(G))),en({...ea,floatValue:e})}let[el,ei]=(0,o.useState)(S),[ec,ed]=(0,o.useState)(""),[eu,em]=(0,o.useState)(!1),[eg,ef]=(0,o.useState)(""),eh=(0,o.useMemo)(()=>
1{if(!K||!K.explorers||!K.explorers[0])return;let e="columbus-5"===K.chain_id&&K.explorers.find(e=>"finder"===e.kind)||K.explorers[0];return e.tx_page?e.tx_page.replace("${txHash}",eg):e.url+"/tx/"+eg},[K,eg]),eb=(0,o.useCallback)(async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s.isTestnet?"https://rpc.testcosmos.directory/".concat(s.chainKey.replace("-","")):"https://rpc.cosmos.directory/".concat(s.chainKey),t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(i.r8&&console.log("getBalance",e,t?"retried":""),!F){$(new d.Z(0)),ee("Address undefined");return}J(!0);try{var r;let t=await u.cosmos.ClientFactory.createRPCQueryClient({rpcEndpoint:e}),s=await t.cosmos.bank.v1beta1.balance({address:F,denom:null==L?void 0:L.assets[0].base}),a=new d.Z((null===(r=s.balance)||void 0===r?void 0:r.amount)||0).multipliedBy(10**-G);er.current||(es(),er.current=!0),$(a),ee("")}catch(e){if(console.error("â getBalance",s.chainKey,typeof e,e.toString(),Object.keys(e),e.code,e.key,e.message),!t&&e.toString().includes("Failed to fetch")){let e=await V();return eb("string"==typeof e?e:e.url,!0)}ee(e.message||e.error||e.toString())}J(!1)},[F,null==L?void 0:L.assets,G,V,es,s.chainKey,s.isTestnet]),ex=(0,o.useRef)();(0,o.useEffect)(()=>{F&&F!=ex.current&&(eb(),ex.current=F)},[F,eb]);let ey=(e,t)=>{let{delegate:r}=u.cosmos.staking.v1beta1.MessageComposer.withTypeUrl,a=r({amount:{denom:q.denom_units[0].denom,amount:t},validatorAddress:s.operatorAddress,delegatorAddress:e});return i.r8&&console.log("getDelegateMsg",a),a},ep=async()=>{var e,t;if(!F){ed("address undefined");return}if(!H){ed("balance undefined");return}ed(""),Y(!0);let s=5e6,r=new d.Z(s*(K.fees&&K.fees.fee_tokens&&(null===(e=K.fees.fee_tokens[0])||void 0===e?void 0:e.high_gas_price)||.03)).multipliedBy(10**-G);try{let e=await E();if(!e){ed("stargateClient undefined");return}i.r8&&console.log("simulate balance",H,H.toString(),"estimatedGas:",r.toString());let a=H.minus("1").multipliedBy(10**G).toString();if(B.includes(K.chain_id)){let t=await T({client:e,signer:U(),chain:K,signerAddress:F,messages:[ey(F,a)],memo:el});i.r8&&console.log("signEvmWithKeplr evmGas",t),s=t}else s=await e.simulate(F,[ey(F,a)],el),i.r8&&console.log("setMaxAmount simulated gas",s);r=new d.Z(s).multipliedBy(9).multipliedBy(K.fees&&K.fees.fee_tokens&&(null===(t=K.fees.fee_tokens[0])||void 0===t?void 0:t.high_gas_price)||.03).multipliedBy(10**-G)}catch(e){console.error("setMaxAmount simulated",e)}Y(!1);let a=H.minus(r).toNumber();i.r8&&console.log("estimatedGas",r,H.toNumber(),r.toNumber(),"newAmount:",a),eo(Math.max(0,a))},ev=async()=>{if(!F){ed("address undefined");return}let e=ea.floatValue;if(!e||e<=0){ed("amount undefined");return}em(!1),ed(""),C(!0);try{let t;let r=await E();if(!r){ed("stargateClient undefined");return}let a=(0,d.Z)(e).multipliedBy(10**G).toString(),n=2e6;try{if(B.includes(K.chain_id)){let e=await T({client:r,signer:U(),chain:K,signerAddress:F,messages:[ey(F,a)],memo:el});i.r8&&console.log("signEvmWithKeplr evmGas",e),n=e}else n=await r.simulate(F,[ey(F,a)],el);n=(0,d.Z)(n).multipliedBy(1.3).integerValue(d.Z.ROUND_CEIL).toNumber()}catch(e){console.error("simulated",e),C(!1),ed(e.message),await eb();return}let o={amount:[{denom:q.base,amount:"1"}],gas:String(n)};if(console.log(K.chain_id),B.includes(K.chain_id)){let e=await P({client:r,signer:U(),chain:K,signerAddress:F,messages:[ey(F,a)],memo:el,fee:o});i.r8&&console.log("signEvmWithKeplr txBytes",e),t=await r.broadcastTx(e),i.r8&&console.log("signEvmWithKeplr response",t)}else if("columbus-5"===K.chain_id){let e=ey(F,a),s=[...u.wE],r={...u.cM},n=new N.Registry(s),l=new W.AminoTypes(r),i=await W.SigningStargateClient.connectWithSigner("https://terra-classic-rpc.publicnode.com/",U(),{registry:n,aminoTypes:l});t=await i.signAndBroadcast(F,[e],o,el)}else t=await r.delegateTokens(F,s.operatorAddress,{denom:q.denom_units[0].denom,amount:a},o,el),i.r8&&console.log("delegateTokens response",t);(0,k.a$)(s,"StakePanelCosmos",F,e,t.transactionHash,el),ef(t.transactionHash),0===t.code?em(!0):ed(t.rawLog||"Transaction failed"),eo(void 0),eb()}catch(e){console.error("delegateTokens",e),(0,k.OR)(s,"StakePanelCosmos",F,e),ed(e.message||e.error||e.toString()),C(!1),eb();return}finally{C(!1)}},ew=H.toNumber(),ek=ea.floatValue,ej=ew>0&&ek&&ek<=ew;return(0,r.jsxs)("div",{children:[j,h&&(0,r.jsx)(M.Z,{validator:s}),(0,r.jsxs)("div",{className:"mt-5 flex items-center justify-between gap-2",children:[A!==m.PR.Connected&&(0,r.jsx)("span",{children:"Connect wallet to stake:"}),(0,r.jsx)(b,{chainKey:s.chainKey,classNameConnected:"w-full justify-between",onDisconnect:()=>{er.current=!1,ex.current=void 0,em(!1),ed(""),C(!1),eo(void 0)},onConnect:()=>{(0,k.SS)(s,"StakePanelCosmos")},onConnected:()=>{(0,k.o$)(s,"StakePanelCosmos")}})]}),(0,r.jsxs)("div",{className:"mt-7 flex flex-col",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)("label",{htmlFor:"amount",className:"block text-sm font-medium leading-6 text-gray-900 dark:text-white",children:"Amount"}),(0,r.jsx)("div",{className:(0,a.AK)("flex items-center justify-end gap-1 truncate text-sm",ew?"text-gray-800 dark:text-gray-100":"text-gray-500 dark:text-gray-400"),children:A!==m.PR.Connected?(0,r.jsx)("div",{children:"-"}):z?(0,r.jsxs)("div",{className:"flex cursor-wait items-center gap-1",children:["Available: ",(0,r.jsx)(n.y3,{className:"!h-3 !w-3"})]}):(0,r.jsxs)("div",{className:"flex max-w-full items-center gap-2",children:[X&&(0,r.jsx)("div",{className:"truncate overflow-ellipsis pl-2 text-red-600 dark:text-red-400",children:X}),Q&&(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:"italic",children:"Calculating gas fee"}),(0,r.jsx)(n.y3,{className:"!h-3 !w-3"})]}),!Q&&(0,r.jsx)(Z.Z,{theme:"dense",placement:"left",getContent:()=>(0,r.jsx)("div",{className:"text-xs",children:"Refresh your balance"}),stayOpenOnHover:!0,classNameChildren:"flex",children:(0,r.jsx)("button",{onClick:()=>eb(),children:(0,r.jsx)(R.Z,{className:"h-3 w-3 cursor-pointer hover:text-gray-900 dark:hover:text-white"})})}),(0,r.jsxs)("button",{type:"button",disabled:!ew,onClick:()=>ep(),className:"enabled:cursor-pointer",children:["Available: ",a.V2.format(ew)]})]})})]}),(0,r.jsxs)("div",{className:"relative mt-1 rounded-md shadow-sm",children:[(0,r.jsx)(v.h3,{getInputRef:et,value:null!==(t=ea.floatValue)&&void 0!==t?t:"",className:"block h-10 w-full rounded-lg border border-gray-300 bg-gray-50 py-1.5 pl-2 pr-16 text-sm text-gray-900 focus:border-blue-500 focus:ring-inset focus:ring-blue-500 dark:border-gray-600 dark:bg-gray-800 dark:text-white dark:placeholder-gray-400 dark:focus:border-blue-500 dark:focus:ring-blue-500",placeholder:"0.00",allowNegative:!1,thousandSeparator:",",valueIsNumericString:!0,allowLeadingZeros:!1,decimalScale:G,onValueChange:(e,t)=>
1{en(e)}}),(0,r.jsx)("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",children:(0,r.jsx)("span",{className:"text-gray-600 dark:text-gray-400 sm:text-sm",id:"price-currency",children:s.ticker})})]}),f&&(0,r.jsxs)("div",{className:"mt-3",children:[(0,r.jsx)("label",{htmlFor:"memo",className:"block text-sm font-medium leading-6 text-gray-900 dark:text-white",children:"Memo"}),(0,r.jsx)("div",{className:"relative mt-1 rounded-md shadow-sm",children:(0,r.jsx)("input",{type:"text",name:"memo",id:"memo",className:"block h-10 w-full rounded-lg border border-gray-300 bg-gray-50 py-1.5 pl-2 pr-2 text-sm text-gray-900 focus:border-blue-500 focus:ring-inset focus:ring-blue-500 dark:border-gray-600 dark:bg-gray-800 dark:text-white dark:placeholder-gray-400 dark:focus:border-blue-500 dark:focus:ring-blue-500",placeholder:"Memo (optional)","aria-describedby":"memo",value:el,onChange:e=>ei(e.target.value)})})]}),(0,r.jsxs)("div",{className:"mt-3",children:[(0,r.jsxs)("div",{className:"min-h-6 text-base text-red-600 dark:text-red-400",children:[!ej&&null!=ek&&ek>0&&(0,r.jsx)("div",{children:"Not enough balance to stake"}),ec&&(0,r.jsx)("div",{className:"w-full break-words",children:ec}),eu&&(0,r.jsx)("div",{className:"text-green-600 dark:text-green-400",children:"Successfully staked, thank you! \uD83D\uDE4C"}),eg&&(eh?(0,r.jsxs)(p.Z,{className:"font-mono text-[0.7rem] text-gray-700 hover:text-primary-500 dark:text-gray-200 dark:hover:text-primary-400",href:eh,children:[eg," ",(0,r.jsx)(y.Z,{className:"inline h-3 w-3"})]}):(0,r.jsx)("span",{className:"font-mono text-xs text-gray-700 dark:text-gray-200",children:eg}))]}),(0,r.jsx)("button",{type:"button",className:"mt-3 flex w-full items-center justify-center rounded-md border border-transparent bg-blue-600 px-2.5 py-1.5 text-base font-semibold text-white shadow-sm transition-colors duration-150 focus-visible:outline focus-visible:outline-2 enabled:hover:bg-blue-700 disabled:cursor-not-allowed disabled:opacity-50 dark:enabled:hover:bg-blue-500",disabled:_||!ek||ek<=0||!ej||A!==m.PR.Connected,onClick:()=>ev(),children:_?(0,r.jsxs)("span",{className:"flex items-center justify-center",children:[(0,r.jsx)(n.y3,{className:"mr-2 mt-0.5"})," Staking..."]}):(0,r.jsxs)("span",{children:["Stake ",s.ticker]})})]}),(0,r.jsx)(x.Z,{validator:s,title:"Direct links:"})]})]})},I=s(58501),D=s(1344),O=s(25922);let V=c.chains.filter(e=>!["thorchain"].includes(e.chain_name)),U=c.assets,L=e=>V.some(t=>t.chain_id===e||t.chain_name===e||t.chain_id===e.replace("-","")||t.chain_name===e.replace("-",""));function q(e){let{children:t}=e,{theme:s}=(0,O.F)(),{modalTheme:a,setModalTheme:n}=(0,l.ZE)();return(0,o.useEffect)(()=>{a!==s&&n(s)},[a,n,s]),(0,r.jsx)(l.WZ,{chains:V,assetLists:U,wallets:D.fh,modalTheme:{defaultTheme:s,modalChildrenClassName:"cosmos-modal-children",modalContentStyles:{}},throwErrors:!1,logLevel:i.r8?"DEBUG":"WARN",walletConnectOptions:{signClient:{projectId:i.F1}},allowedIframeParentOrigins:[],children:t})}var G=e=>{let{validator:t,showMemo:s,showStats:a,title:n}=e;return L(t.chainKey)?(0,r.jsx)(q,{children:(0,r.jsx)(F,{validator:t,showMemo:s,showStats:a,title:n})}):(0,r.jsx)(I.Z,{validator:t,title:n})}},36149:function(e,t,s){"use strict";s.d(t,{K:function(){return a}});var r=s(2265);let a=()=>{let e=(0,r.useRef)(null);return{htmlElRef:e,setFocus:()=>{e.current&&e.current.focus()}}}}}]);
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.