diff --git a/assets/ChallengeView-BdZ9aHLk.js b/assets/ChallengeView-39hjMaQL.js similarity index 73% rename from assets/ChallengeView-BdZ9aHLk.js rename to assets/ChallengeView-39hjMaQL.js index 8640595..e42b99c 100644 --- a/assets/ChallengeView-BdZ9aHLk.js +++ b/assets/ChallengeView-39hjMaQL.js @@ -1 +1 @@ -import{z as K,k as I,t as N,A as X,g as Y,B as tt,J as et,c as U,C as G,_ as q,u as st,a as at,b as O,d as E,r as x,o as b,e as D,f as t,h as w,w as S,v as k,Z as j,n as p,p as nt,i as it,F as L,j as ot,l as B,m as F,q as lt}from"./index-BEOb6O_H.js";import{G as rt,a as dt,U as ct,B as ft,g as pt}from"./gameView-BG60hCBX.js";BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141");BigInt("1000000000000000000");const vt=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");BigInt("0x8000000000000000000000000000000000000000000000000000000000000000")*BigInt(-1);BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");async function ut(o,l,d,i){const f="https://ib9fm6yjjg.execute-api.ap-northeast-2.amazonaws.com/ctp/ctp/create-prompt",h={prompt_hash:o,prompt:l,secret_hash:d,secret:i};try{const y=await(await fetch(f,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(h)})).json();console.log(y.message)}catch(v){console.error("Error:",v)}}const wt="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='11'%20height='18'%20viewBox='0%200%2011%2018'%20fill='none'%3e%3crect%20x='8.59265'%20y='0.928223'%20width='2.69743'%20height='11.4442'%20transform='rotate(45%208.59265%200.928223)'%20fill='black'/%3e%3crect%20width='2.69743'%20height='11.4447'%20transform='matrix(0.707107%20-0.707107%20-0.707107%20-0.707107%208.59265%2017.1123)'%20fill='black'/%3e%3c/svg%3e",mt="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='11'%20height='18'%20viewBox='0%200%2011%2018'%20fill='none'%3e%3crect%20width='2.69743'%20height='11.4442'%20transform='matrix(-0.707107%200.707107%200.707107%200.707107%202.40735%200.928223)'%20fill='black'/%3e%3crect%20x='2.40735'%20y='17.1123'%20width='2.69743'%20height='11.4447'%20transform='rotate(-135%202.40735%2017.1123)'%20fill='black'/%3e%3c/svg%3e",z="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='21'%20height='21'%20viewBox='0%200%2021%2021'%20fill='none'%3e%3ccircle%20cx='10.5'%20cy='10.0203'%20r='9'%20fill='%234DC4CF'%20stroke='black'%20stroke-width='2'/%3e%3cline%20x1='6.44978'%20y1='5.07048'%20x2='15.6422'%20y2='14.2629'%20stroke='black'%20stroke-width='2'/%3e%3cline%20x1='5.7426'%20y1='14.2629'%20x2='14.935'%20y2='5.07048'%20stroke='black'%20stroke-width='2'/%3e%3c/svg%3e";let $,M,_={Game:void 0,GameFrontend:void 0,Award:void 0,Badge:void 0};const J={gasPrice:"100000000001"};async function H(o){if(!$)try{$=new tt(o)}catch(l){console.log(l),$=new et(U.rpcUrl)}console.log($),M=await $.getSigner(),_.Game||(_.Game=new G(U.contracts.Game,rt.abi,$)),_.GameFrontend||(_.GameFrontend=new G(U.contracts.GameFrontend,dt.abi,$)),_.Award||(_.Award=new G(U.contracts.Award,ct.abi,$)),_.Badge||(_.Badge=new G(U.contracts.Badge,ft.abi,$))}function gt(o){return new Promise(l=>setTimeout(l,o))}async function W(o){for(let d=0;d<10;d++){const i=await $.getTransactionReceipt(o);if(i)return i.status==1;await gt(1e3)}return!1}async function ht(o,l){await H(o);let d=await _.Award.connect(M).allowance(M.address,await _.Game.getAddress());if(console.log(d),d{const u="https://ib9fm6yjjg.execute-api.ap-northeast-2.amazonaws.com/ctp/ctp/qa",s={token_id:v.nft.id.toString(),user:i.value,prompt_hash:v.nft.promptHash,question:g.value};try{const r=await(await fetch(u,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)})).json();console.log(r.message),m.value=r.message}catch(e){console.error("Error:",e)}},V=async()=>{await yt(d.value,v.nft.tokenId,C.value)},A=()=>{y("closeModal")},c=u=>{const s=new Date(u*1e3),e=String(s.getUTCMonth()+1).padStart(2,"0"),r=String(s.getUTCDate()).padStart(2,"0"),P=s.getUTCHours(),R=String(s.getUTCMinutes()).padStart(2,"0"),Z=P>=12?"PM":"AM",Q=P%12||12;return`${e}.${r} ${Q}:${R} ${Z}`},a=(u,s)=>{const r=(s-u)/(60*60*24);return Math.round(r)},n=u=>(u/1e18).toFixed(2);return(u,s)=>(b(),D("div",_t,[t("div",bt,[s[14]||(s[14]=t("div",{class:"modal-title-text"},"Challenge",-1)),t("div",$t,[t("div",{class:"close-wrapper"},[t("img",{src:z,alt:"close",onClick:A})]),t("div",Ct,[t("div",St,[t("img",{src:o.nft.imageUri||"@/assets/nft/0.png",alt:"nft"},null,8,kt),t("div",Dt,[s[4]||(s[4]=t("div",{class:"live-wrapper"},[t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none"},[t("circle",{cx:"6",cy:"6.02026",r:"5.5",fill:"#53926D"})]),t("div",{class:"live-text"},"Live")],-1)),t("div",Mt,[t("div",Tt,w(o.nft.name),1),t("div",At,[t("div",Ut,w(o.nft.gameType),1)]),t("div",Bt,w(o.nft.description),1)])])]),t("div",It,[t("div",Vt,[s[5]||(s[5]=t("div",{class:"details-title-text"},"Start Date",-1)),t("div",Pt,w(c(o.nft.startDate)),1)]),t("div",Gt,[s[6]||(s[6]=t("div",{class:"details-title-text"},"End Date",-1)),t("div",Nt,w(c(o.nft.endDate)),1)]),t("div",jt,[s[7]||(s[7]=t("div",{class:"details-title-text"},"Remaining",-1)),t("div",Ft,w(a(o.nft.startDate,o.nft.endDate))+" days ",1)]),t("div",qt,[s[8]||(s[8]=t("div",{class:"details-award-text"},"Awards",-1)),t("div",Ht,w(n(o.nft.awards))+" USDC ",1)])])]),t("div",Lt,[t("div",Ot,[s[10]||(s[10]=t("div",{class:"question-title-text"},"Question",-1)),t("div",Et,[S(t("textarea",{class:"question-content-input",type:"text","onUpdate:modelValue":s[0]||(s[0]=e=>g.value=e)},null,512),[[k,g.value]]),t("div",{class:"submit-btn",onClick:s[1]||(s[1]=e=>T())},s[9]||(s[9]=[t("div",{class:"submit-text"},"Submit",-1)]))])]),t("div",zt,[s[11]||(s[11]=t("div",{class:"answer-title-text"},"Answer",-1)),t("div",Jt,w(m.value),1)]),t("div",Wt,[s[13]||(s[13]=t("div",{class:"pk-title-text"},"Secret",-1)),t("div",Rt,[S(t("textarea",{class:"pk-content-input",type:"text","onUpdate:modelValue":s[2]||(s[2]=e=>C.value=e)},null,512),[[k,C.value]]),t("div",{class:"submit-btn",onClick:s[3]||(s[3]=e=>V())},s[12]||(s[12]=[t("div",{class:"submit-text"},"Submit",-1)]))])])])])])]))}},Qt=q(Zt,[["__scopeId","data-v-8ffc91c1"]]),Kt={class:"modal"},Xt={class:"modal-container"},Yt={class:"modal-wrapper"},te={class:"content-wrapper"},ee={class:"content-left-wrapper"},se={class:"name-wrapper"},ae={class:"description-wrapper"},ne={class:"date-wrapper"},ie={class:"date-input-wrapper"},oe={class:"date-wrapper"},le={class:"date-input-wrapper"},re={class:"award-wrapper"},de={class:"award-input-wrapper"},ce={class:"content-right-wrapper"},fe={class:"type-wrapper"},pe={class:"type-content-secret-wrapper"},ve={class:"description-wrapper"},ue={class:"name-wrapper"},we={__name:"CreateModal",emits:["closeCreateModal"],setup(o,{emit:l}){const d=l,i=x({name:"",description:"",award:"",gameType:"secret",prompt:"",secret:"",start:0,end:0,winner:j}),f=x(""),h=x(""),v=x(""),y=x(""),g=x(""),m=x(0),{walletProvider:C}=O(),{address:T,chainId:V,isConnected:A}=E(),c=()=>{d("closeCreateModal")},a=s=>{m.value=s},n=()=>{if(f.value===""||h.value==""||v.value==""||y.value==""||g.value==""||!A.value||!h.value.includes(v.value))return!1;const s=new Date(y.value).getTime()/1e3,e=new Date(g.value).getTime()/1e3;return!(s>=e)},u=async()=>{if(n()){i.value.start=new Date(y.value).getTime()/1e3,i.value.end=new Date(g.value).getTime()/1e3,i.value.prompt=I(N(h.value)),i.value.secret=I(I(N(v.value)));const s=nt(f.value.toString(),18);await ut(i.value.prompt,h.value,i.value.secret,v.value),await ht(C.value,s),await xt(C.value,T.value,i.value,s)}};return(s,e)=>(b(),D("div",Kt,[t("div",Xt,[e[23]||(e[23]=t("div",{class:"title-text"},"Get started with a CTP",-1)),t("div",Yt,[t("div",{class:"close-wrapper"},[t("img",{src:z,alt:"close",onClick:c})]),e[22]||(e[22]=t("div",{class:"about-wrapper"},[t("div",{class:"about-text"},"Create A New Challenge")],-1)),t("div",te,[t("div",ee,[t("div",se,[e[8]||(e[8]=t("div",{class:"name-text"},"Name",-1)),S(t("input",{class:"name-input","onUpdate:modelValue":e[0]||(e[0]=r=>i.value.name=r),placeholder:"Name",type:"text"},null,512),[[k,i.value.name]])]),t("div",ae,[e[9]||(e[9]=t("div",{class:"description-text"},"Description",-1)),S(t("textarea",{class:"description-input","onUpdate:modelValue":e[1]||(e[1]=r=>i.value.description=r),placeholder:"Description"},null,512),[[k,i.value.description]])]),t("div",ne,[e[10]||(e[10]=t("div",{class:"date-text"},"Start Date",-1)),t("div",ie,[S(t("input",{class:"date-input","onUpdate:modelValue":e[2]||(e[2]=r=>y.value=r),type:"datetime-local"},null,512),[[k,y.value]])])]),t("div",oe,[e[11]||(e[11]=t("div",{class:"date-text"},"End Date",-1)),t("div",le,[S(t("input",{class:"date-input","onUpdate:modelValue":e[3]||(e[3]=r=>g.value=r),type:"datetime-local"},null,512),[[k,g.value]])])]),t("div",re,[e[13]||(e[13]=t("div",{class:"award-text"},"Award",-1)),t("div",de,[S(t("input",{class:"award-input","onUpdate:modelValue":e[4]||(e[4]=r=>f.value=r),type:"number"},null,512),[[k,f.value]]),e[12]||(e[12]=t("div",{class:"usdc-wrapper"},[t("div",{class:"usdc-text"},"USDC")],-1))])])]),t("div",ce,[t("div",fe,[e[17]||(e[17]=t("div",{class:"type-text"},"Type",-1)),t("div",pe,[t("div",{class:p(["type-content-wrapper",{"is-type-active":m.value==0}]),onClick:e[5]||(e[5]=r=>a(0))},e[14]||(e[14]=[t("div",{class:"type-content-text"},"Secret",-1)]),2),t("div",{class:p(["type-content-wrapper",{"is-type-active":m.value==1}])},e[15]||(e[15]=[t("div",{class:"type-content-text"},"Slang",-1)]),2),t("div",{class:p(["type-content-wrapper",{"is-type-active":m.value==2}])},e[16]||(e[16]=[t("div",{class:"type-content-text"},"Mismatch",-1)]),2)])]),t("div",ve,[e[18]||(e[18]=t("div",{class:"description-text"},"Prompt",-1)),S(t("textarea",{class:"prompt-input","onUpdate:modelValue":e[6]||(e[6]=r=>h.value=r),placeholder:"Prompt"},null,512),[[k,h.value]])]),t("div",ue,[e[19]||(e[19]=t("div",{class:"name-text"},"Secret",-1)),S(t("input",{class:"name-input","onUpdate:modelValue":e[7]||(e[7]=r=>v.value=r),placeholder:"Secret",type:"text"},null,512),[[k,v.value]])]),t("div",{class:"submit-wrapper"},[e[21]||(e[21]=t("div",{class:"empty-text"},null,-1)),t("div",{class:"submit-btn-wrapper",onClick:u},e[20]||(e[20]=[t("div",{class:"submit-btn-text"},"Submit",-1)]))])])])])])]))}},me=q(we,[["__scopeId","data-v-99ad3ca0"]]),ge={key:0,class:"challenge"},he={class:"challenge-wrapper"},xe={class:"challenge-live-filter"},ye={class:"challenge-type-filter-wrapper"},_e={class:"challenge-type-filter"},be={class:"nfts"},$e={class:"nft-content-wrapper"},Ce={class:"nft-content-top-wrapper"},Se=["src"],ke={class:"nft-content-top-title-wrapper"},De={class:"live-wrapper"},Me={key:0,xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none"},Te=["fill"],Ae={key:1,xmlns:"http://www.w3.org/2000/svg",width:"19",height:"19",viewBox:"0 0 19 19",fill:"none"},Ue={class:"live-text"},Be={class:"live-title-wrapper"},Ie={class:"live-title-text"},Ve={class:"type-wrapper"},Pe={class:"type-text"},Ge={class:"nft-description"},Ne={class:"nft-date-wrapper"},je={class:"nft-date-content-wrapper"},Fe={class:"nft-date-content-text"},qe={class:"nft-date-content-text"},He={class:"nft-duration-wrapper"},Le={class:"nft-duration-content-text"},Oe={class:"nft-award-wrapper"},Ee=["onClick"],ze={class:"nft-btn-text"},Je={class:"pagination"},We={class:"pagination-wrapper"},Re={class:"number-wrapper"},Ze={__name:"ChallengePage",setup(o){const l=x(!1),d=x(!1),i=x(null),f=x([]),h=c=>{c.status==="Live"&&(i.value=c,l.value=!0)},v=()=>{l.value=!1},y=()=>{d.value=!0},g=()=>{d.value=!1},m=async()=>{const c=await pt(0,12);f.value=c.map(a=>{const n=a[11],u=Math.floor(Date.now()/1e3);console.log(n);let s="Live";return n.toLowerCase()==="0xffffffffffffffffffffffffffffffffffffffff"||n===j&&u>Number(a[9])?s="Verified":n!==j&&(s="Solved"),{status:s,winnerAddress:n,id:a[0],tokenId:a[1],name:a[2],description:a[3],gameType:a[4],promptHash:a[5],secretHash:a[6],imageUri:a[7],startDate:Number(a[8]),endDate:Number(a[9]),awards:Number(a[10])}}).reverse(),console.log(f.value)},C=c=>{const a=new Date(c*1e3),n=String(a.getUTCMonth()+1).padStart(2,"0"),u=String(a.getUTCDate()).padStart(2,"0"),s=a.getUTCHours(),e=String(a.getUTCMinutes()).padStart(2,"0"),r=s>=12?"PM":"AM",P=s%12||12;return`${n}.${u} ${P}:${e} ${r}`},T=(c,a)=>{const u=(a-c)/(60*60*24);return Math.round(u)},V=c=>lt(c.toLocaleString("fullwide",{useGrouping:!1}),18),A=c=>c&&`Winner: ${c.slice(0,6)}...${c.slice(-4)}`;return it(()=>{m()}),(c,a)=>(b(),D(L,null,[!l.value&&!d.value?(b(),D("div",ge,[t("div",he,[a[9]||(a[9]=t("div",{class:"challenge-title-text"},"Challenges",-1)),t("div",xe,[t("div",{class:p(["challenge-live-filter-btn",{"is-live-active":!0}])}," All "),t("div",{class:p(["challenge-live-filter-btn",{"is-live-active":!1}])}," Live "),t("div",{class:p(["challenge-live-filter-btn",{"is-live-active":!1}])}," End ")]),t("div",ye,[t("div",_e,[t("div",{class:p(["challenge-type-filter-btn",{"is-type-active":!0}])},[t("div",{class:p(["challenge-type-filter-btn-text",{"is-type-text-active":!0}])}," All Type ")]),t("div",{class:p(["challenge-type-filter-btn",{"is-type-active":!1}])},[t("div",{class:p(["challenge-type-filter-btn-text",{"is-type-text-active":!1}])}," Secret ")]),t("div",{class:p(["challenge-type-filter-btn",{"is-type-active":!1}])},[t("div",{class:p(["challenge-type-filter-btn-text",{"is-type-text-active":!1}])}," Slang ")]),t("div",{class:p(["challenge-type-filter-btn",{"is-type-active":!1}])},[t("div",{class:p(["challenge-type-filter-btn-text",{"is-type-text-active":!1}])}," Mismatch ")])]),t("div",{class:"challenge-create-new-btn",onClick:y}," + Create A New Challange ")]),t("div",be,[(b(!0),D(L,null,ot(f.value,(n,u)=>(b(),D("div",{key:n.id,class:p(["nft-wrapper",{"is-verified-nft":n.status==="Verified"}])},[t("div",$e,[t("div",Ce,[t("img",{src:n.imageUri?n.imageUri:"@/assets/nft/0.png",alt:"nft"},null,8,Se),t("div",ke,[t("div",De,[n.status!=="Verified"?(b(),D("svg",Me,[t("circle",{cx:"6",cy:"6.02026",r:"5.5",fill:n.status==="Live"?"#53926D":"#CC0000"},null,8,Te)])):B("",!0),n.status==="Verified"?(b(),D("svg",Ae,a[0]||(a[0]=[t("circle",{cx:"9.5",cy:"9.5",r:"8",fill:"#4DC4CF",stroke:"black","stroke-width":"2"},null,-1),t("rect",{x:"3.5",y:"7.91431",width:"2",height:"8.48528",transform:"rotate(-45 3.5 7.91431)",fill:"black"},null,-1),t("rect",{width:"2",height:"8.48563",transform:"matrix(-0.707107 -0.707107 -0.707107 0.707107 15.5 7.91431)",fill:"black"},null,-1)]))):B("",!0),t("div",Ue,w(n.status),1)]),t("div",Be,[t("div",Ie,w(n.name),1),t("div",Ve,[t("div",Pe,w(n.gameType),1)])])])]),t("div",Ge,w(n.description),1),t("div",Ne,[a[1]||(a[1]=t("div",{class:"nft-date-text"},"Date",-1)),t("div",je,[t("div",Fe,w(C(n.startDate)),1),t("div",qe," ~ "+w(C(n.endDate)),1)])]),t("div",He,[a[2]||(a[2]=t("div",{class:"nft-duration-text"},"Remaining",-1)),t("div",Le,w(T(n.startDate,n.endDate))+" days ",1)]),t("div",Oe,[t("div",{class:p(["nft-award-text",{"is-verified-nft-text":n.status==="Verified"}])}," Award ",2),t("div",{class:p(["nft-award-content-text",{"is-verified-nft-text":n.status==="Verified","is-solved-nft-text":n.status==="Solved"}])},w(V(n.awards))+" USDC ",3)])]),t("div",{class:p(["nft-btn",{"is-live":n.status==="Live","is-verified":n.status==="Verified"}]),onClick:s=>n.status!=="Solved"&&h(n)},[t("div",ze,w(n.status==="Solved"?A(n.winnerAddress):n.status==="Verified"?"Verified":"Challenge"),1)],10,Ee)],2))),128))]),t("div",Je,[t("div",We,[a[7]||(a[7]=t("img",{src:wt,alt:"left"},null,-1)),t("div",Re,[t("div",{class:p(["number-text",{"is-pagination-active":!0}])}," 1 "),a[3]||(a[3]=t("div",{class:"number-text"},"2",-1)),a[4]||(a[4]=t("div",{class:"number-text"},"3",-1)),a[5]||(a[5]=t("div",{class:"number-text"},"4",-1)),a[6]||(a[6]=t("div",{class:"number-text"},"5",-1))]),a[8]||(a[8]=t("img",{src:mt,alt:"right"},null,-1))])])])])):B("",!0),l.value?(b(),F(Qt,{key:1,nft:i.value,onCloseModal:v},null,8,["nft"])):B("",!0),d.value?(b(),F(me,{key:2,onCloseCreateModal:g})):B("",!0)],64))}},Qe=q(Ze,[["__scopeId","data-v-f15a648d"]]),Ye={__name:"ChallengeView",setup(o){return(l,d)=>(b(),F(Qe))}};export{Ye as default}; +import{z as K,k as I,t as N,A as X,g as Y,B as tt,J as et,c as U,C as G,_ as q,u as st,a as at,b as O,d as E,r as x,o as b,e as D,f as t,h as w,w as S,v as k,Z as j,n as p,p as nt,i as it,F as L,j as ot,l as B,m as F,q as lt}from"./index-b6Nsj3zY.js";import{G as rt,a as dt,U as ct,B as ft,g as pt}from"./gameView-AmYzYg1A.js";BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141");BigInt("1000000000000000000");const vt=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");BigInt("0x8000000000000000000000000000000000000000000000000000000000000000")*BigInt(-1);BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");async function ut(o,l,d,i){const f="https://ib9fm6yjjg.execute-api.ap-northeast-2.amazonaws.com/ctp/ctp/create-prompt",h={prompt_hash:o,prompt:l,secret_hash:d,secret:i};try{const y=await(await fetch(f,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(h)})).json();console.log(y.message)}catch(v){console.error("Error:",v)}}const wt="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='11'%20height='18'%20viewBox='0%200%2011%2018'%20fill='none'%3e%3crect%20x='8.59265'%20y='0.928223'%20width='2.69743'%20height='11.4442'%20transform='rotate(45%208.59265%200.928223)'%20fill='black'/%3e%3crect%20width='2.69743'%20height='11.4447'%20transform='matrix(0.707107%20-0.707107%20-0.707107%20-0.707107%208.59265%2017.1123)'%20fill='black'/%3e%3c/svg%3e",mt="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='11'%20height='18'%20viewBox='0%200%2011%2018'%20fill='none'%3e%3crect%20width='2.69743'%20height='11.4442'%20transform='matrix(-0.707107%200.707107%200.707107%200.707107%202.40735%200.928223)'%20fill='black'/%3e%3crect%20x='2.40735'%20y='17.1123'%20width='2.69743'%20height='11.4447'%20transform='rotate(-135%202.40735%2017.1123)'%20fill='black'/%3e%3c/svg%3e",z="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='21'%20height='21'%20viewBox='0%200%2021%2021'%20fill='none'%3e%3ccircle%20cx='10.5'%20cy='10.0203'%20r='9'%20fill='%234DC4CF'%20stroke='black'%20stroke-width='2'/%3e%3cline%20x1='6.44978'%20y1='5.07048'%20x2='15.6422'%20y2='14.2629'%20stroke='black'%20stroke-width='2'/%3e%3cline%20x1='5.7426'%20y1='14.2629'%20x2='14.935'%20y2='5.07048'%20stroke='black'%20stroke-width='2'/%3e%3c/svg%3e";let $,M,_={Game:void 0,GameFrontend:void 0,Award:void 0,Badge:void 0};const J={gasPrice:"100000000001"};async function H(o){if(!$)try{$=new tt(o)}catch(l){console.log(l),$=new et(U.rpcUrl)}console.log($),M=await $.getSigner(),_.Game||(_.Game=new G(U.contracts.Game,rt.abi,$)),_.GameFrontend||(_.GameFrontend=new G(U.contracts.GameFrontend,dt.abi,$)),_.Award||(_.Award=new G(U.contracts.Award,ct.abi,$)),_.Badge||(_.Badge=new G(U.contracts.Badge,ft.abi,$))}function gt(o){return new Promise(l=>setTimeout(l,o))}async function W(o){for(let d=0;d<10;d++){const i=await $.getTransactionReceipt(o);if(i)return i.status==1;await gt(1e3)}return!1}async function ht(o,l){await H(o);let d=await _.Award.connect(M).allowance(M.address,await _.Game.getAddress());if(console.log(d),d{const u="https://ib9fm6yjjg.execute-api.ap-northeast-2.amazonaws.com/ctp/ctp/qa",s={token_id:v.nft.id.toString(),user:i.value,prompt_hash:v.nft.promptHash,question:g.value};try{const r=await(await fetch(u,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)})).json();console.log(r.message),m.value=r.message}catch(e){console.error("Error:",e)}},V=async()=>{await yt(d.value,v.nft.tokenId,C.value)},A=()=>{y("closeModal")},c=u=>{const s=new Date(u*1e3),e=String(s.getUTCMonth()+1).padStart(2,"0"),r=String(s.getUTCDate()).padStart(2,"0"),P=s.getUTCHours(),R=String(s.getUTCMinutes()).padStart(2,"0"),Z=P>=12?"PM":"AM",Q=P%12||12;return`${e}.${r} ${Q}:${R} ${Z}`},a=(u,s)=>{const r=(s-u)/(60*60*24);return Math.round(r)},n=u=>(u/1e18).toFixed(2);return(u,s)=>(b(),D("div",_t,[t("div",bt,[s[14]||(s[14]=t("div",{class:"modal-title-text"},"Challenge",-1)),t("div",$t,[t("div",{class:"close-wrapper"},[t("img",{src:z,alt:"close",onClick:A})]),t("div",Ct,[t("div",St,[t("img",{src:o.nft.imageUri||"@/assets/nft/0.png",alt:"nft"},null,8,kt),t("div",Dt,[s[4]||(s[4]=t("div",{class:"live-wrapper"},[t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none"},[t("circle",{cx:"6",cy:"6.02026",r:"5.5",fill:"#53926D"})]),t("div",{class:"live-text"},"Live")],-1)),t("div",Mt,[t("div",Tt,w(o.nft.name),1),t("div",At,[t("div",Ut,w(o.nft.gameType),1)]),t("div",Bt,w(o.nft.description),1)])])]),t("div",It,[t("div",Vt,[s[5]||(s[5]=t("div",{class:"details-title-text"},"Start Date",-1)),t("div",Pt,w(c(o.nft.startDate)),1)]),t("div",Gt,[s[6]||(s[6]=t("div",{class:"details-title-text"},"End Date",-1)),t("div",Nt,w(c(o.nft.endDate)),1)]),t("div",jt,[s[7]||(s[7]=t("div",{class:"details-title-text"},"Remaining",-1)),t("div",Ft,w(a(o.nft.startDate,o.nft.endDate))+" days ",1)]),t("div",qt,[s[8]||(s[8]=t("div",{class:"details-award-text"},"Awards",-1)),t("div",Ht,w(n(o.nft.awards))+" USDC ",1)])])]),t("div",Lt,[t("div",Ot,[s[10]||(s[10]=t("div",{class:"question-title-text"},"Question",-1)),t("div",Et,[S(t("textarea",{class:"question-content-input",type:"text","onUpdate:modelValue":s[0]||(s[0]=e=>g.value=e)},null,512),[[k,g.value]]),t("div",{class:"submit-btn",onClick:s[1]||(s[1]=e=>T())},s[9]||(s[9]=[t("div",{class:"submit-text"},"Submit",-1)]))])]),t("div",zt,[s[11]||(s[11]=t("div",{class:"answer-title-text"},"Answer",-1)),t("div",Jt,w(m.value),1)]),t("div",Wt,[s[13]||(s[13]=t("div",{class:"pk-title-text"},"Secret",-1)),t("div",Rt,[S(t("textarea",{class:"pk-content-input",type:"text","onUpdate:modelValue":s[2]||(s[2]=e=>C.value=e)},null,512),[[k,C.value]]),t("div",{class:"submit-btn",onClick:s[3]||(s[3]=e=>V())},s[12]||(s[12]=[t("div",{class:"submit-text"},"Submit",-1)]))])])])])])]))}},Qt=q(Zt,[["__scopeId","data-v-8ffc91c1"]]),Kt={class:"modal"},Xt={class:"modal-container"},Yt={class:"modal-wrapper"},te={class:"content-wrapper"},ee={class:"content-left-wrapper"},se={class:"name-wrapper"},ae={class:"description-wrapper"},ne={class:"date-wrapper"},ie={class:"date-input-wrapper"},oe={class:"date-wrapper"},le={class:"date-input-wrapper"},re={class:"award-wrapper"},de={class:"award-input-wrapper"},ce={class:"content-right-wrapper"},fe={class:"type-wrapper"},pe={class:"type-content-secret-wrapper"},ve={class:"description-wrapper"},ue={class:"name-wrapper"},we={__name:"CreateModal",emits:["closeCreateModal"],setup(o,{emit:l}){const d=l,i=x({name:"",description:"",award:"",gameType:"secret",prompt:"",secret:"",start:0,end:0,winner:j}),f=x(""),h=x(""),v=x(""),y=x(""),g=x(""),m=x(0),{walletProvider:C}=O(),{address:T,chainId:V,isConnected:A}=E(),c=()=>{d("closeCreateModal")},a=s=>{m.value=s},n=()=>{if(f.value===""||h.value==""||v.value==""||y.value==""||g.value==""||!A.value||!h.value.includes(v.value))return!1;const s=new Date(y.value).getTime()/1e3,e=new Date(g.value).getTime()/1e3;return!(s>=e)},u=async()=>{if(n()){i.value.start=new Date(y.value).getTime()/1e3,i.value.end=new Date(g.value).getTime()/1e3,i.value.prompt=I(N(h.value)),i.value.secret=I(I(N(v.value)));const s=nt(f.value.toString(),18);await ut(i.value.prompt,h.value,i.value.secret,v.value),await ht(C.value,s),await xt(C.value,T.value,i.value,s)}};return(s,e)=>(b(),D("div",Kt,[t("div",Xt,[e[23]||(e[23]=t("div",{class:"title-text"},"Get started with a CTP",-1)),t("div",Yt,[t("div",{class:"close-wrapper"},[t("img",{src:z,alt:"close",onClick:c})]),e[22]||(e[22]=t("div",{class:"about-wrapper"},[t("div",{class:"about-text"},"Create A New Challenge")],-1)),t("div",te,[t("div",ee,[t("div",se,[e[8]||(e[8]=t("div",{class:"name-text"},"Name",-1)),S(t("input",{class:"name-input","onUpdate:modelValue":e[0]||(e[0]=r=>i.value.name=r),placeholder:"Name",type:"text"},null,512),[[k,i.value.name]])]),t("div",ae,[e[9]||(e[9]=t("div",{class:"description-text"},"Description",-1)),S(t("textarea",{class:"description-input","onUpdate:modelValue":e[1]||(e[1]=r=>i.value.description=r),placeholder:"Description"},null,512),[[k,i.value.description]])]),t("div",ne,[e[10]||(e[10]=t("div",{class:"date-text"},"Start Date",-1)),t("div",ie,[S(t("input",{class:"date-input","onUpdate:modelValue":e[2]||(e[2]=r=>y.value=r),type:"datetime-local"},null,512),[[k,y.value]])])]),t("div",oe,[e[11]||(e[11]=t("div",{class:"date-text"},"End Date",-1)),t("div",le,[S(t("input",{class:"date-input","onUpdate:modelValue":e[3]||(e[3]=r=>g.value=r),type:"datetime-local"},null,512),[[k,g.value]])])]),t("div",re,[e[13]||(e[13]=t("div",{class:"award-text"},"Award",-1)),t("div",de,[S(t("input",{class:"award-input","onUpdate:modelValue":e[4]||(e[4]=r=>f.value=r),type:"number"},null,512),[[k,f.value]]),e[12]||(e[12]=t("div",{class:"usdc-wrapper"},[t("div",{class:"usdc-text"},"USDC")],-1))])])]),t("div",ce,[t("div",fe,[e[17]||(e[17]=t("div",{class:"type-text"},"Type",-1)),t("div",pe,[t("div",{class:p(["type-content-wrapper",{"is-type-active":m.value==0}]),onClick:e[5]||(e[5]=r=>a(0))},e[14]||(e[14]=[t("div",{class:"type-content-text"},"Secret",-1)]),2),t("div",{class:p(["type-content-wrapper",{"is-type-active":m.value==1}])},e[15]||(e[15]=[t("div",{class:"type-content-text"},"Slang",-1)]),2),t("div",{class:p(["type-content-wrapper",{"is-type-active":m.value==2}])},e[16]||(e[16]=[t("div",{class:"type-content-text"},"Mismatch",-1)]),2)])]),t("div",ve,[e[18]||(e[18]=t("div",{class:"description-text"},"Prompt",-1)),S(t("textarea",{class:"prompt-input","onUpdate:modelValue":e[6]||(e[6]=r=>h.value=r),placeholder:"Prompt"},null,512),[[k,h.value]])]),t("div",ue,[e[19]||(e[19]=t("div",{class:"name-text"},"Secret",-1)),S(t("input",{class:"name-input","onUpdate:modelValue":e[7]||(e[7]=r=>v.value=r),placeholder:"Secret",type:"text"},null,512),[[k,v.value]])]),t("div",{class:"submit-wrapper"},[e[21]||(e[21]=t("div",{class:"empty-text"},null,-1)),t("div",{class:"submit-btn-wrapper",onClick:u},e[20]||(e[20]=[t("div",{class:"submit-btn-text"},"Submit",-1)]))])])])])])]))}},me=q(we,[["__scopeId","data-v-99ad3ca0"]]),ge={key:0,class:"challenge"},he={class:"challenge-wrapper"},xe={class:"challenge-live-filter"},ye={class:"challenge-type-filter-wrapper"},_e={class:"challenge-type-filter"},be={class:"nfts"},$e={class:"nft-content-wrapper"},Ce={class:"nft-content-top-wrapper"},Se=["src"],ke={class:"nft-content-top-title-wrapper"},De={class:"live-wrapper"},Me={key:0,xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none"},Te=["fill"],Ae={key:1,xmlns:"http://www.w3.org/2000/svg",width:"19",height:"19",viewBox:"0 0 19 19",fill:"none"},Ue={class:"live-text"},Be={class:"live-title-wrapper"},Ie={class:"live-title-text"},Ve={class:"type-wrapper"},Pe={class:"type-text"},Ge={class:"nft-description"},Ne={class:"nft-date-wrapper"},je={class:"nft-date-content-wrapper"},Fe={class:"nft-date-content-text"},qe={class:"nft-date-content-text"},He={class:"nft-duration-wrapper"},Le={class:"nft-duration-content-text"},Oe={class:"nft-award-wrapper"},Ee=["onClick"],ze={class:"nft-btn-text"},Je={class:"pagination"},We={class:"pagination-wrapper"},Re={class:"number-wrapper"},Ze={__name:"ChallengePage",setup(o){const l=x(!1),d=x(!1),i=x(null),f=x([]),h=c=>{c.status==="Live"&&(i.value=c,l.value=!0)},v=()=>{l.value=!1},y=()=>{d.value=!0},g=()=>{d.value=!1},m=async()=>{const c=await pt(0,100);f.value=c.map(a=>{const n=a[11],u=Math.floor(Date.now()/1e3);console.log(n);let s="Live";return n.toLowerCase()==="0xffffffffffffffffffffffffffffffffffffffff"||n===j&&u>Number(a[9])?s="Verified":n!==j&&(s="Solved"),{status:s,winnerAddress:n,id:a[0],tokenId:a[1],name:a[2],description:a[3],gameType:a[4],promptHash:a[5],secretHash:a[6],imageUri:a[7],startDate:Number(a[8]),endDate:Number(a[9]),awards:Number(a[10])}}).reverse(),console.log(f.value)},C=c=>{const a=new Date(c*1e3),n=String(a.getUTCMonth()+1).padStart(2,"0"),u=String(a.getUTCDate()).padStart(2,"0"),s=a.getUTCHours(),e=String(a.getUTCMinutes()).padStart(2,"0"),r=s>=12?"PM":"AM",P=s%12||12;return`${n}.${u} ${P}:${e} ${r}`},T=(c,a)=>{const u=(a-c)/(60*60*24);return Math.round(u)},V=c=>lt(c.toLocaleString("fullwide",{useGrouping:!1}),18),A=c=>c&&`Winner: ${c.slice(0,6)}...${c.slice(-4)}`;return it(()=>{m()}),(c,a)=>(b(),D(L,null,[!l.value&&!d.value?(b(),D("div",ge,[t("div",he,[a[9]||(a[9]=t("div",{class:"challenge-title-text"},"Challenges",-1)),t("div",xe,[t("div",{class:p(["challenge-live-filter-btn",{"is-live-active":!0}])}," All "),t("div",{class:p(["challenge-live-filter-btn",{"is-live-active":!1}])}," Live "),t("div",{class:p(["challenge-live-filter-btn",{"is-live-active":!1}])}," End ")]),t("div",ye,[t("div",_e,[t("div",{class:p(["challenge-type-filter-btn",{"is-type-active":!0}])},[t("div",{class:p(["challenge-type-filter-btn-text",{"is-type-text-active":!0}])}," All Type ")]),t("div",{class:p(["challenge-type-filter-btn",{"is-type-active":!1}])},[t("div",{class:p(["challenge-type-filter-btn-text",{"is-type-text-active":!1}])}," Secret ")]),t("div",{class:p(["challenge-type-filter-btn",{"is-type-active":!1}])},[t("div",{class:p(["challenge-type-filter-btn-text",{"is-type-text-active":!1}])}," Slang ")]),t("div",{class:p(["challenge-type-filter-btn",{"is-type-active":!1}])},[t("div",{class:p(["challenge-type-filter-btn-text",{"is-type-text-active":!1}])}," Mismatch ")])]),t("div",{class:"challenge-create-new-btn",onClick:y}," + Create A New Challange ")]),t("div",be,[(b(!0),D(L,null,ot(f.value,(n,u)=>(b(),D("div",{key:n.id,class:p(["nft-wrapper",{"is-verified-nft":n.status==="Verified"}])},[t("div",$e,[t("div",Ce,[t("img",{src:n.imageUri?n.imageUri:"@/assets/nft/0.png",alt:"nft"},null,8,Se),t("div",ke,[t("div",De,[n.status!=="Verified"?(b(),D("svg",Me,[t("circle",{cx:"6",cy:"6.02026",r:"5.5",fill:n.status==="Live"?"#53926D":"#CC0000"},null,8,Te)])):B("",!0),n.status==="Verified"?(b(),D("svg",Ae,a[0]||(a[0]=[t("circle",{cx:"9.5",cy:"9.5",r:"8",fill:"#4DC4CF",stroke:"black","stroke-width":"2"},null,-1),t("rect",{x:"3.5",y:"7.91431",width:"2",height:"8.48528",transform:"rotate(-45 3.5 7.91431)",fill:"black"},null,-1),t("rect",{width:"2",height:"8.48563",transform:"matrix(-0.707107 -0.707107 -0.707107 0.707107 15.5 7.91431)",fill:"black"},null,-1)]))):B("",!0),t("div",Ue,w(n.status),1)]),t("div",Be,[t("div",Ie,w(n.name),1),t("div",Ve,[t("div",Pe,w(n.gameType),1)])])])]),t("div",Ge,w(n.description),1),t("div",Ne,[a[1]||(a[1]=t("div",{class:"nft-date-text"},"Date",-1)),t("div",je,[t("div",Fe,w(C(n.startDate)),1),t("div",qe," ~ "+w(C(n.endDate)),1)])]),t("div",He,[a[2]||(a[2]=t("div",{class:"nft-duration-text"},"Remaining",-1)),t("div",Le,w(T(n.startDate,n.endDate))+" days ",1)]),t("div",Oe,[t("div",{class:p(["nft-award-text",{"is-verified-nft-text":n.status==="Verified"}])}," Award ",2),t("div",{class:p(["nft-award-content-text",{"is-verified-nft-text":n.status==="Verified","is-solved-nft-text":n.status==="Solved"}])},w(V(n.awards))+" USDC ",3)])]),t("div",{class:p(["nft-btn",{"is-live":n.status==="Live","is-verified":n.status==="Verified"}]),onClick:s=>n.status!=="Solved"&&h(n)},[t("div",ze,w(n.status==="Solved"?A(n.winnerAddress):n.status==="Verified"?"Verified":"Challenge"),1)],10,Ee)],2))),128))]),t("div",Je,[t("div",We,[a[7]||(a[7]=t("img",{src:wt,alt:"left"},null,-1)),t("div",Re,[t("div",{class:p(["number-text",{"is-pagination-active":!0}])}," 1 "),a[3]||(a[3]=t("div",{class:"number-text"},"2",-1)),a[4]||(a[4]=t("div",{class:"number-text"},"3",-1)),a[5]||(a[5]=t("div",{class:"number-text"},"4",-1)),a[6]||(a[6]=t("div",{class:"number-text"},"5",-1))]),a[8]||(a[8]=t("img",{src:mt,alt:"right"},null,-1))])])])])):B("",!0),l.value?(b(),F(Qt,{key:1,nft:i.value,onCloseModal:v},null,8,["nft"])):B("",!0),d.value?(b(),F(me,{key:2,onCloseCreateModal:g})):B("",!0)],64))}},Qe=q(Ze,[["__scopeId","data-v-a21cdfb5"]]),Ye={__name:"ChallengeView",setup(o){return(l,d)=>(b(),F(Qe))}};export{Ye as default}; diff --git a/assets/ChallengeView-CI4EQmJy.css b/assets/ChallengeView-DdqT5rDU.css similarity index 82% rename from assets/ChallengeView-CI4EQmJy.css rename to assets/ChallengeView-DdqT5rDU.css index bd4f9be..84a239e 100644 --- a/assets/ChallengeView-CI4EQmJy.css +++ b/assets/ChallengeView-DdqT5rDU.css @@ -1 +1 @@ -.modal[data-v-8ffc91c1]{display:flex;flex-direction:column;align-items:center}.modal-container[data-v-8ffc91c1]{display:flex;width:944px;flex-direction:column;align-items:flex-start;gap:22px}.modal-title-text[data-v-8ffc91c1]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:30px;font-style:normal;font-weight:800;line-height:normal}.modal-wrapper[data-v-8ffc91c1]{display:flex;padding:24px 20px;flex-direction:column;align-items:center;align-self:stretch;border-radius:20px;border:2px solid #000;background:#f5f3f3}.close-wrapper[data-v-8ffc91c1]{display:flex;padding:0 10px;justify-content:flex-end;align-items:center;gap:20px;align-self:stretch}.close-wrapper[data-v-8ffc91c1]{cursor:pointer}.modal-info[data-v-8ffc91c1]{display:flex;flex-direction:column;align-items:flex-start;gap:20px;align-self:stretch}.modal-info-top[data-v-8ffc91c1]{display:flex;padding:10px 43px;align-items:center;gap:18px;align-self:stretch}.modal-info-top img[data-v-8ffc91c1]{width:138px;height:138px;border-radius:10px;border:2px solid #000}.modal-info-title-wrapper[data-v-8ffc91c1]{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:20px;flex:1 0 0;align-self:stretch}.live-wrapper[data-v-8ffc91c1]{display:flex;align-items:center;gap:4px}.live-text[data-v-8ffc91c1]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:14px;font-style:normal;font-weight:400;line-height:normal}.title-wrapper[data-v-8ffc91c1]{display:flex;flex-direction:column;align-items:flex-start;gap:7px;align-self:stretch}.title-text[data-v-8ffc91c1]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:22px;font-style:normal;font-weight:700;line-height:normal}.type-wrapper[data-v-8ffc91c1]{display:flex;padding:6px 10px;justify-content:center;align-items:center;gap:10px;border-radius:20px;border:1px solid #000}.type-text[data-v-8ffc91c1]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:12px;font-style:normal;font-weight:400;line-height:normal}.title-description[data-v-8ffc91c1]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:14px;font-style:normal;font-weight:400;line-height:20px}.modal-info-bottom[data-v-8ffc91c1]{display:flex;padding:0 44px;justify-content:center;align-items:center;align-content:center;gap:10px 58px;align-self:stretch;flex-wrap:wrap}.details-title-wrapper[data-v-8ffc91c1]{display:flex;flex-direction:column;align-items:flex-start;gap:10px}.details-title-text[data-v-8ffc91c1]{color:#000000b3;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:14px;font-style:normal;font-weight:700;line-height:normal}.details-content-text[data-v-8ffc91c1]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:21px;font-style:normal;font-weight:700;line-height:normal}.details-award-text[data-v-8ffc91c1]{color:#4dc4cf;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:14px;font-style:normal;font-weight:700;line-height:normal}.details-award-text[data-v-8ffc91c1]{color:#4dc4cf;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:21px;font-style:normal;font-weight:700;line-height:normal}.bottom-wrapper[data-v-8ffc91c1]{display:flex;padding:20px 41px;flex-direction:column;align-items:flex-start;gap:20px;align-self:stretch}.question-wrapper[data-v-8ffc91c1]{display:flex;flex-direction:column;align-items:flex-start;gap:10px;align-self:stretch}.question-title-text[data-v-8ffc91c1]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:22px;font-style:normal;font-weight:700;line-height:normal}.question-content-wrapper[data-v-8ffc91c1]{display:flex;justify-content:flex-end;align-items:flex-end;gap:12px;align-self:stretch}.question-content-input[data-v-8ffc91c1]{height:112px;flex:1 0 0;padding:20px 30px;border-radius:20px;border:2px solid #000;background:#fff;color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:18px;font-style:normal;font-weight:400;line-height:normal;box-sizing:border-box}.submit-btn[data-v-8ffc91c1]{display:flex;width:120px;padding:10px 30px;justify-content:center;align-items:center;gap:10px;border-radius:20px;border:2px solid #000;background:#53926d;cursor:pointer}.submit-text[data-v-8ffc91c1]{color:#000;text-align:right;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:14px;font-style:normal;font-weight:700;line-height:normal}.answer-wrapper[data-v-8ffc91c1]{display:flex;flex-direction:column;align-items:flex-start;gap:10px;align-self:stretch}.answer-title-text[data-v-8ffc91c1]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:22px;font-style:normal;font-weight:700;line-height:normal}.answer-content-input[data-v-8ffc91c1]{padding:20px 30px;min-height:40px;width:100%;border-radius:20px;border:2px solid #000;background:#fff;color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:18px;font-style:normal;font-weight:400;line-height:normal;box-sizing:border-box;overflow-wrap:break-word;white-space:normal}.pk-wrapper[data-v-8ffc91c1]{display:flex;flex-direction:column;align-items:flex-start;gap:12px;align-self:stretch}.pk-title-text[data-v-8ffc91c1]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:22px;font-style:normal;font-weight:700;line-height:normal}.pk-content-wrapper[data-v-8ffc91c1]{display:flex;justify-content:center;align-items:center;gap:12px;align-self:stretch}.pk-content-input[data-v-8ffc91c1]{display:flex;padding:8px 30px;height:40px;flex:1 0 0;border-radius:20px;border:2px solid #000;background:#fff;color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:18px;font-style:normal;font-weight:400;line-height:normal;box-sizing:border-box}.modal[data-v-99ad3ca0]{display:flex;flex-direction:column;align-items:center}.modal-container[data-v-99ad3ca0]{display:flex;flex-direction:column;align-items:flex-start;gap:22px}.title-text[data-v-99ad3ca0]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:30px;font-style:normal;font-weight:800;line-height:normal}.modal-wrapper[data-v-99ad3ca0]{display:flex;padding:24px 20px;flex-direction:column;justify-content:center;align-items:center;align-self:stretch;border-radius:20px;border:2px solid #000;background:#f5f3f3}.close-wrapper[data-v-99ad3ca0]{display:flex;padding:0 10px;justify-content:flex-end;align-items:center;gap:20px;align-self:stretch}.close-wrapper img[data-v-99ad3ca0]{cursor:pointer}.about-wrapper[data-v-99ad3ca0]{display:flex;padding:0 43px;align-items:center;gap:3px;align-self:stretch}.about-text[data-v-99ad3ca0]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:22px;font-style:normal;font-weight:700;line-height:normal}.content-wrapper[data-v-99ad3ca0]{display:flex;padding:32px 43px;align-items:flex-start;gap:60px;align-self:stretch}.content-left-wrapper[data-v-99ad3ca0]{display:flex;width:448px;flex-direction:column;align-items:flex-start;gap:20px;flex:1 0 0}.name-wrapper[data-v-99ad3ca0]{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:10px;align-self:stretch}.name-text[data-v-99ad3ca0]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:18px;font-style:normal;font-weight:700;line-height:normal}.name-input[data-v-99ad3ca0]{display:flex;height:40px;padding:8px 30px;align-items:center;gap:10px;align-self:stretch;border-radius:20px;border:2px solid #000;background:#fff;color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:18px;font-style:normal;font-weight:400;line-height:normal;box-sizing:border-box}.description-wrapper[data-v-99ad3ca0]{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:10px;align-self:stretch}.description-text[data-v-99ad3ca0]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:18px;font-style:normal;font-weight:700;line-height:normal}.description-input[data-v-99ad3ca0],.prompt-input[data-v-99ad3ca0]{display:flex;height:201px;padding:20px 30px;align-items:center;gap:10px;align-self:stretch;border-radius:20px;border:2px solid #000;background:#fff;color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:18px;font-style:normal;font-weight:400;line-height:normal;box-sizing:border-box}.description-input[data-v-99ad3ca0]{height:111px}.date-wrapper[data-v-99ad3ca0]{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:10px;align-self:stretch}.date-text[data-v-99ad3ca0]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:18px;font-style:normal;font-weight:700;line-height:normal}.date-input-wrapper[data-v-99ad3ca0]{display:flex;flex-direction:column;align-items:flex-start;gap:12px;align-self:stretch}.date-input[data-v-99ad3ca0]{display:flex;height:40px;padding:8px 30px;justify-content:center;align-items:center;gap:10px;width:100%;border-radius:20px;border:2px solid #000;background:#fff;box-sizing:border-box;color:#000;text-align:center;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:18px;font-style:normal;font-weight:400;line-height:normal}.award-wrapper[data-v-99ad3ca0]{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:16px;align-self:stretch}.award-text[data-v-99ad3ca0]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:18px;font-style:normal;font-weight:700;line-height:normal}.award-input-wrapper[data-v-99ad3ca0]{display:flex;align-items:flex-start;gap:20px;align-self:stretch}.award-input[data-v-99ad3ca0]{display:flex;height:40px;padding:8px 30px;justify-content:center;align-items:center;gap:10px;flex:1 0 0;border-radius:20px;border:2px solid #000;background:#fff;color:#000;text-align:center;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:18px;font-style:normal;font-weight:400;line-height:normal;box-sizing:border-box}.award-input[data-v-99ad3ca0]::-webkit-inner-spin-button,.award-input[data-v-99ad3ca0]::-webkit-outer-spin-button{-webkit-appearance:none}.award-input[data-v-99ad3ca0]:focus{outline:none}.usdc-wrapper[data-v-99ad3ca0]{display:flex;height:40px;padding:8px 30px;justify-content:center;align-items:center;gap:10px;flex:1 0 0;border-radius:20px;border:2px solid #000;background:#cacaca;box-sizing:border-box}.usdc-text[data-v-99ad3ca0]{color:#000;text-align:center;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:18px;font-style:normal;font-weight:400;line-height:normal}.content-right-wrapper[data-v-99ad3ca0]{display:flex;width:448px;flex-direction:column;justify-content:center;align-items:flex-end;gap:20px;flex:1 0 0}.type-wrapper[data-v-99ad3ca0]{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:10px;align-self:stretch}.type-text[data-v-99ad3ca0]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:18px;font-style:normal;font-weight:700;line-height:normal}.type-content-secret-wrapper[data-v-99ad3ca0]{display:flex;align-items:flex-start;gap:20px;align-self:stretch}.type-content-wrapper[data-v-99ad3ca0]{display:flex;height:40px;padding:8px 30px;justify-content:center;align-items:center;gap:10px;flex:1 0 0;border-radius:20px;border:2px solid #000;background:#fff;cursor:pointer;box-sizing:border-box}.is-type-active[data-v-99ad3ca0]{background:#cacaca}.type-content-text[data-v-99ad3ca0]{color:#000;text-align:center;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:18px;font-style:normal;font-weight:700;line-height:normal}.submit-wrapper[data-v-99ad3ca0]{display:flex;flex-direction:column;justify-content:center;align-items:flex-end;gap:16px}.empty-text[data-v-99ad3ca0]{height:20px}.submit-btn-wrapper[data-v-99ad3ca0]{width:175px;height:40px;padding:8px 30px;text-align:center;align-items:center;gap:10px;border-radius:20px;border:2px solid #000;background:#53926d;cursor:pointer;box-sizing:border-box}.submit-btn-text[data-v-99ad3ca0]{color:#000;text-align:center;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:18px;font-style:normal;font-weight:800;line-height:normal}.challenge[data-v-f15a648d]{display:flex;flex-direction:column;align-items:center;gap:30px}.challenge-wrapper[data-v-f15a648d]{display:flex;width:1004px;flex-direction:column;align-items:flex-start;gap:20px}.challenge-title-text[data-v-f15a648d]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:30px;font-style:normal;font-weight:800;line-height:normal}.challenge-live-filter[data-v-f15a648d]{display:flex;align-items:flex-start;gap:20px;align-self:stretch}.challenge-live-filter-btn[data-v-f15a648d]{color:#747474;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:22px;font-style:normal;font-weight:800;line-height:normal;cursor:pointer}.is-live-active[data-v-f15a648d]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:22px;font-style:normal;font-weight:800;line-height:normal;text-decoration-line:underline;cursor:pointer}.challenge-type-filter-wrapper[data-v-f15a648d]{display:flex;justify-content:space-between;align-items:center;align-self:stretch}.challenge-type-filter[data-v-f15a648d]{display:flex;align-items:center;gap:10px}.challenge-type-filter-btn[data-v-f15a648d]{display:flex;padding:6px 10px;justify-content:center;align-items:center;gap:10px;border-radius:20px;border:1px solid #000;background:#fff}.is-type-active[data-v-f15a648d]{border-radius:20px;border:2px solid #000;background:#f5f3f3}.challenge-type-filter-btn-text[data-v-f15a648d]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:12px;font-style:normal;font-weight:400;line-height:normal}.is-type-text-active[data-v-f15a648d]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:12px;font-style:normal;font-weight:700;line-height:normal}.challenge-create-new-btn[data-v-f15a648d]{color:#000;text-align:right;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:16px;font-style:normal;font-weight:800;line-height:normal;cursor:pointer}.nfts[data-v-f15a648d]{display:flex;align-items:center;align-content:center;gap:16px;align-self:stretch;flex-wrap:wrap}.nft-wrapper[data-v-f15a648d]{display:flex;width:324px;height:420px;padding:24px 20px;flex-direction:column;align-items:center;justify-content:space-between;border-radius:20px;border:2px solid #000;background:#f5f3f3;box-sizing:border-box}.is-verified-nft[data-v-f15a648d]{background:#4dc4cf}.nft-content-wrapper[data-v-f15a648d]{display:flex;flex-direction:column;align-items:flex-start;gap:12px;align-self:stretch}.nft-content-top-wrapper[data-v-f15a648d]{display:flex;align-items:center;gap:18px;align-self:stretch}.nft-content-top-wrapper img[data-v-f15a648d]{width:130px;height:130px;border-radius:10px;border:2px solid #000}.nft-content-top-title-wrapper[data-v-f15a648d]{display:flex;flex-direction:column;justify-content:center;align-items:flex-end;gap:30px;flex:1 0 0;align-self:stretch}.live-wrapper[data-v-f15a648d]{display:flex;align-items:center;gap:4px}.live-text[data-v-f15a648d]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:14px;font-style:normal;font-weight:400;line-height:normal}.live-title-wrapper[data-v-f15a648d]{display:flex;flex-direction:column;align-items:flex-start;gap:7px;align-self:stretch}.live-title-text[data-v-f15a648d]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:22px;font-style:normal;font-weight:700;line-height:normal}.type-wrapper[data-v-f15a648d]{display:flex;padding:6px 10px;justify-content:center;align-items:center;gap:10px;border-radius:20px;border:1px solid #000;background:#fff}.type-text[data-v-f15a648d]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:12px;font-style:normal;font-weight:400;line-height:normal}.nft-description[data-v-f15a648d]{display:flex;padding:10px;justify-content:center;align-items:center;gap:10px;align-self:stretch;color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:12px;font-style:normal;font-weight:400;line-height:20px}.nft-date-wrapper[data-v-f15a648d]{display:flex;justify-content:space-between;align-items:flex-start;align-self:stretch}.nft-date-text[data-v-f15a648d]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:14px;font-style:normal;font-weight:700;line-height:normal}.nft-date-content-wrapper[data-v-f15a648d]{display:flex;flex-direction:column;align-items:flex-end;gap:7px}.nft-date-content-text[data-v-f15a648d]{color:#000;text-align:right;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:14px;font-style:normal;font-weight:400;line-height:normal}.nft-duration-wrapper[data-v-f15a648d]{display:flex;justify-content:space-between;align-items:center;align-self:stretch}.nft-duration-text[data-v-f15a648d]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:14px;font-style:normal;font-weight:700;line-height:normal}.nft-duration-content-text[data-v-f15a648d]{color:#000;text-align:right;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:14px;font-style:normal;font-weight:400;line-height:normal}.nft-award-wrapper[data-v-f15a648d]{display:flex;justify-content:space-between;align-items:center;align-self:stretch}.nft-award-text[data-v-f15a648d]{color:#4dc4cf;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:14px;font-style:normal;font-weight:700;line-height:normal}.nft-award-content-text[data-v-f15a648d]{color:#4dc4cf;text-align:right;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:14px;font-style:normal;font-weight:700;line-height:normal}.is-verified-nft-text[data-v-f15a648d]{color:#000}.is-solved-nft-text[data-v-f15a648d]{text-decoration-line:line-through}.nft-btn[data-v-f15a648d]{display:flex;padding:10px 30px;justify-content:center;align-items:center;gap:10px;border-radius:20px;border:2px solid #000;background:#cacaca}.is-live[data-v-f15a648d]{background:#53926d;cursor:pointer}.is-verified[data-v-f15a648d]{background:#4dc4cf}.nft-btn-text[data-v-f15a648d]{color:#000;text-align:right;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:14px;font-style:normal;font-weight:700;line-height:normal}.pagination[data-v-f15a648d]{display:flex;justify-content:center;align-items:center;align-self:stretch}.pagination-wrapper[data-v-f15a648d]{display:flex;align-items:center;gap:30px}.pagination-wrapper img[data-v-f15a648d]{cursor:pointer}.number-wrapper[data-v-f15a648d]{display:flex;align-items:center;gap:10px}.number-text[data-v-f15a648d]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:20px;font-style:normal;font-weight:400;line-height:normal;cursor:pointer}.is-pagination-active[data-v-f15a648d]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:20px;font-style:normal;font-weight:700;line-height:normal;text-decoration-line:underline} +.modal[data-v-8ffc91c1]{display:flex;flex-direction:column;align-items:center}.modal-container[data-v-8ffc91c1]{display:flex;width:944px;flex-direction:column;align-items:flex-start;gap:22px}.modal-title-text[data-v-8ffc91c1]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:30px;font-style:normal;font-weight:800;line-height:normal}.modal-wrapper[data-v-8ffc91c1]{display:flex;padding:24px 20px;flex-direction:column;align-items:center;align-self:stretch;border-radius:20px;border:2px solid #000;background:#f5f3f3}.close-wrapper[data-v-8ffc91c1]{display:flex;padding:0 10px;justify-content:flex-end;align-items:center;gap:20px;align-self:stretch}.close-wrapper[data-v-8ffc91c1]{cursor:pointer}.modal-info[data-v-8ffc91c1]{display:flex;flex-direction:column;align-items:flex-start;gap:20px;align-self:stretch}.modal-info-top[data-v-8ffc91c1]{display:flex;padding:10px 43px;align-items:center;gap:18px;align-self:stretch}.modal-info-top img[data-v-8ffc91c1]{width:138px;height:138px;border-radius:10px;border:2px solid #000}.modal-info-title-wrapper[data-v-8ffc91c1]{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:20px;flex:1 0 0;align-self:stretch}.live-wrapper[data-v-8ffc91c1]{display:flex;align-items:center;gap:4px}.live-text[data-v-8ffc91c1]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:14px;font-style:normal;font-weight:400;line-height:normal}.title-wrapper[data-v-8ffc91c1]{display:flex;flex-direction:column;align-items:flex-start;gap:7px;align-self:stretch}.title-text[data-v-8ffc91c1]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:22px;font-style:normal;font-weight:700;line-height:normal}.type-wrapper[data-v-8ffc91c1]{display:flex;padding:6px 10px;justify-content:center;align-items:center;gap:10px;border-radius:20px;border:1px solid #000}.type-text[data-v-8ffc91c1]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:12px;font-style:normal;font-weight:400;line-height:normal}.title-description[data-v-8ffc91c1]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:14px;font-style:normal;font-weight:400;line-height:20px}.modal-info-bottom[data-v-8ffc91c1]{display:flex;padding:0 44px;justify-content:center;align-items:center;align-content:center;gap:10px 58px;align-self:stretch;flex-wrap:wrap}.details-title-wrapper[data-v-8ffc91c1]{display:flex;flex-direction:column;align-items:flex-start;gap:10px}.details-title-text[data-v-8ffc91c1]{color:#000000b3;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:14px;font-style:normal;font-weight:700;line-height:normal}.details-content-text[data-v-8ffc91c1]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:21px;font-style:normal;font-weight:700;line-height:normal}.details-award-text[data-v-8ffc91c1]{color:#4dc4cf;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:14px;font-style:normal;font-weight:700;line-height:normal}.details-award-text[data-v-8ffc91c1]{color:#4dc4cf;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:21px;font-style:normal;font-weight:700;line-height:normal}.bottom-wrapper[data-v-8ffc91c1]{display:flex;padding:20px 41px;flex-direction:column;align-items:flex-start;gap:20px;align-self:stretch}.question-wrapper[data-v-8ffc91c1]{display:flex;flex-direction:column;align-items:flex-start;gap:10px;align-self:stretch}.question-title-text[data-v-8ffc91c1]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:22px;font-style:normal;font-weight:700;line-height:normal}.question-content-wrapper[data-v-8ffc91c1]{display:flex;justify-content:flex-end;align-items:flex-end;gap:12px;align-self:stretch}.question-content-input[data-v-8ffc91c1]{height:112px;flex:1 0 0;padding:20px 30px;border-radius:20px;border:2px solid #000;background:#fff;color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:18px;font-style:normal;font-weight:400;line-height:normal;box-sizing:border-box}.submit-btn[data-v-8ffc91c1]{display:flex;width:120px;padding:10px 30px;justify-content:center;align-items:center;gap:10px;border-radius:20px;border:2px solid #000;background:#53926d;cursor:pointer}.submit-text[data-v-8ffc91c1]{color:#000;text-align:right;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:14px;font-style:normal;font-weight:700;line-height:normal}.answer-wrapper[data-v-8ffc91c1]{display:flex;flex-direction:column;align-items:flex-start;gap:10px;align-self:stretch}.answer-title-text[data-v-8ffc91c1]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:22px;font-style:normal;font-weight:700;line-height:normal}.answer-content-input[data-v-8ffc91c1]{padding:20px 30px;min-height:40px;width:100%;border-radius:20px;border:2px solid #000;background:#fff;color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:18px;font-style:normal;font-weight:400;line-height:normal;box-sizing:border-box;overflow-wrap:break-word;white-space:normal}.pk-wrapper[data-v-8ffc91c1]{display:flex;flex-direction:column;align-items:flex-start;gap:12px;align-self:stretch}.pk-title-text[data-v-8ffc91c1]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:22px;font-style:normal;font-weight:700;line-height:normal}.pk-content-wrapper[data-v-8ffc91c1]{display:flex;justify-content:center;align-items:center;gap:12px;align-self:stretch}.pk-content-input[data-v-8ffc91c1]{display:flex;padding:8px 30px;height:40px;flex:1 0 0;border-radius:20px;border:2px solid #000;background:#fff;color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:18px;font-style:normal;font-weight:400;line-height:normal;box-sizing:border-box}.modal[data-v-99ad3ca0]{display:flex;flex-direction:column;align-items:center}.modal-container[data-v-99ad3ca0]{display:flex;flex-direction:column;align-items:flex-start;gap:22px}.title-text[data-v-99ad3ca0]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:30px;font-style:normal;font-weight:800;line-height:normal}.modal-wrapper[data-v-99ad3ca0]{display:flex;padding:24px 20px;flex-direction:column;justify-content:center;align-items:center;align-self:stretch;border-radius:20px;border:2px solid #000;background:#f5f3f3}.close-wrapper[data-v-99ad3ca0]{display:flex;padding:0 10px;justify-content:flex-end;align-items:center;gap:20px;align-self:stretch}.close-wrapper img[data-v-99ad3ca0]{cursor:pointer}.about-wrapper[data-v-99ad3ca0]{display:flex;padding:0 43px;align-items:center;gap:3px;align-self:stretch}.about-text[data-v-99ad3ca0]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:22px;font-style:normal;font-weight:700;line-height:normal}.content-wrapper[data-v-99ad3ca0]{display:flex;padding:32px 43px;align-items:flex-start;gap:60px;align-self:stretch}.content-left-wrapper[data-v-99ad3ca0]{display:flex;width:448px;flex-direction:column;align-items:flex-start;gap:20px;flex:1 0 0}.name-wrapper[data-v-99ad3ca0]{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:10px;align-self:stretch}.name-text[data-v-99ad3ca0]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:18px;font-style:normal;font-weight:700;line-height:normal}.name-input[data-v-99ad3ca0]{display:flex;height:40px;padding:8px 30px;align-items:center;gap:10px;align-self:stretch;border-radius:20px;border:2px solid #000;background:#fff;color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:18px;font-style:normal;font-weight:400;line-height:normal;box-sizing:border-box}.description-wrapper[data-v-99ad3ca0]{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:10px;align-self:stretch}.description-text[data-v-99ad3ca0]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:18px;font-style:normal;font-weight:700;line-height:normal}.description-input[data-v-99ad3ca0],.prompt-input[data-v-99ad3ca0]{display:flex;height:201px;padding:20px 30px;align-items:center;gap:10px;align-self:stretch;border-radius:20px;border:2px solid #000;background:#fff;color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:18px;font-style:normal;font-weight:400;line-height:normal;box-sizing:border-box}.description-input[data-v-99ad3ca0]{height:111px}.date-wrapper[data-v-99ad3ca0]{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:10px;align-self:stretch}.date-text[data-v-99ad3ca0]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:18px;font-style:normal;font-weight:700;line-height:normal}.date-input-wrapper[data-v-99ad3ca0]{display:flex;flex-direction:column;align-items:flex-start;gap:12px;align-self:stretch}.date-input[data-v-99ad3ca0]{display:flex;height:40px;padding:8px 30px;justify-content:center;align-items:center;gap:10px;width:100%;border-radius:20px;border:2px solid #000;background:#fff;box-sizing:border-box;color:#000;text-align:center;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:18px;font-style:normal;font-weight:400;line-height:normal}.award-wrapper[data-v-99ad3ca0]{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:16px;align-self:stretch}.award-text[data-v-99ad3ca0]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:18px;font-style:normal;font-weight:700;line-height:normal}.award-input-wrapper[data-v-99ad3ca0]{display:flex;align-items:flex-start;gap:20px;align-self:stretch}.award-input[data-v-99ad3ca0]{display:flex;height:40px;padding:8px 30px;justify-content:center;align-items:center;gap:10px;flex:1 0 0;border-radius:20px;border:2px solid #000;background:#fff;color:#000;text-align:center;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:18px;font-style:normal;font-weight:400;line-height:normal;box-sizing:border-box}.award-input[data-v-99ad3ca0]::-webkit-inner-spin-button,.award-input[data-v-99ad3ca0]::-webkit-outer-spin-button{-webkit-appearance:none}.award-input[data-v-99ad3ca0]:focus{outline:none}.usdc-wrapper[data-v-99ad3ca0]{display:flex;height:40px;padding:8px 30px;justify-content:center;align-items:center;gap:10px;flex:1 0 0;border-radius:20px;border:2px solid #000;background:#cacaca;box-sizing:border-box}.usdc-text[data-v-99ad3ca0]{color:#000;text-align:center;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:18px;font-style:normal;font-weight:400;line-height:normal}.content-right-wrapper[data-v-99ad3ca0]{display:flex;width:448px;flex-direction:column;justify-content:center;align-items:flex-end;gap:20px;flex:1 0 0}.type-wrapper[data-v-99ad3ca0]{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:10px;align-self:stretch}.type-text[data-v-99ad3ca0]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:18px;font-style:normal;font-weight:700;line-height:normal}.type-content-secret-wrapper[data-v-99ad3ca0]{display:flex;align-items:flex-start;gap:20px;align-self:stretch}.type-content-wrapper[data-v-99ad3ca0]{display:flex;height:40px;padding:8px 30px;justify-content:center;align-items:center;gap:10px;flex:1 0 0;border-radius:20px;border:2px solid #000;background:#fff;cursor:pointer;box-sizing:border-box}.is-type-active[data-v-99ad3ca0]{background:#cacaca}.type-content-text[data-v-99ad3ca0]{color:#000;text-align:center;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:18px;font-style:normal;font-weight:700;line-height:normal}.submit-wrapper[data-v-99ad3ca0]{display:flex;flex-direction:column;justify-content:center;align-items:flex-end;gap:16px}.empty-text[data-v-99ad3ca0]{height:20px}.submit-btn-wrapper[data-v-99ad3ca0]{width:175px;height:40px;padding:8px 30px;text-align:center;align-items:center;gap:10px;border-radius:20px;border:2px solid #000;background:#53926d;cursor:pointer;box-sizing:border-box}.submit-btn-text[data-v-99ad3ca0]{color:#000;text-align:center;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:18px;font-style:normal;font-weight:800;line-height:normal}.challenge[data-v-a21cdfb5]{display:flex;flex-direction:column;align-items:center;gap:30px}.challenge-wrapper[data-v-a21cdfb5]{display:flex;width:1004px;flex-direction:column;align-items:flex-start;gap:20px}.challenge-title-text[data-v-a21cdfb5]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:30px;font-style:normal;font-weight:800;line-height:normal}.challenge-live-filter[data-v-a21cdfb5]{display:flex;align-items:flex-start;gap:20px;align-self:stretch}.challenge-live-filter-btn[data-v-a21cdfb5]{color:#747474;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:22px;font-style:normal;font-weight:800;line-height:normal;cursor:pointer}.is-live-active[data-v-a21cdfb5]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:22px;font-style:normal;font-weight:800;line-height:normal;text-decoration-line:underline;cursor:pointer}.challenge-type-filter-wrapper[data-v-a21cdfb5]{display:flex;justify-content:space-between;align-items:center;align-self:stretch}.challenge-type-filter[data-v-a21cdfb5]{display:flex;align-items:center;gap:10px}.challenge-type-filter-btn[data-v-a21cdfb5]{display:flex;padding:6px 10px;justify-content:center;align-items:center;gap:10px;border-radius:20px;border:1px solid #000;background:#fff}.is-type-active[data-v-a21cdfb5]{border-radius:20px;border:2px solid #000;background:#f5f3f3}.challenge-type-filter-btn-text[data-v-a21cdfb5]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:12px;font-style:normal;font-weight:400;line-height:normal}.is-type-text-active[data-v-a21cdfb5]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:12px;font-style:normal;font-weight:700;line-height:normal}.challenge-create-new-btn[data-v-a21cdfb5]{color:#000;text-align:right;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:16px;font-style:normal;font-weight:800;line-height:normal;cursor:pointer}.nfts[data-v-a21cdfb5]{display:flex;align-items:center;align-content:center;gap:16px;align-self:stretch;flex-wrap:wrap}.nft-wrapper[data-v-a21cdfb5]{display:flex;width:324px;height:420px;padding:24px 20px;flex-direction:column;align-items:center;justify-content:space-between;border-radius:20px;border:2px solid #000;background:#f5f3f3;box-sizing:border-box}.is-verified-nft[data-v-a21cdfb5]{background:#4dc4cf}.nft-content-wrapper[data-v-a21cdfb5]{display:flex;flex-direction:column;align-items:flex-start;gap:12px;align-self:stretch}.nft-content-top-wrapper[data-v-a21cdfb5]{display:flex;align-items:center;gap:18px;align-self:stretch}.nft-content-top-wrapper img[data-v-a21cdfb5]{width:130px;height:130px;border-radius:10px;border:2px solid #000}.nft-content-top-title-wrapper[data-v-a21cdfb5]{display:flex;flex-direction:column;justify-content:center;align-items:flex-end;gap:30px;flex:1 0 0;align-self:stretch}.live-wrapper[data-v-a21cdfb5]{display:flex;align-items:center;gap:4px}.live-text[data-v-a21cdfb5]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:14px;font-style:normal;font-weight:400;line-height:normal}.live-title-wrapper[data-v-a21cdfb5]{display:flex;flex-direction:column;align-items:flex-start;gap:7px;align-self:stretch}.live-title-text[data-v-a21cdfb5]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:22px;font-style:normal;font-weight:700;line-height:normal}.type-wrapper[data-v-a21cdfb5]{display:flex;padding:6px 10px;justify-content:center;align-items:center;gap:10px;border-radius:20px;border:1px solid #000;background:#fff}.type-text[data-v-a21cdfb5]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:12px;font-style:normal;font-weight:400;line-height:normal}.nft-description[data-v-a21cdfb5]{display:flex;padding:10px;justify-content:center;align-items:center;gap:10px;align-self:stretch;color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:12px;font-style:normal;font-weight:400;line-height:20px}.nft-date-wrapper[data-v-a21cdfb5]{display:flex;justify-content:space-between;align-items:flex-start;align-self:stretch}.nft-date-text[data-v-a21cdfb5]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:14px;font-style:normal;font-weight:700;line-height:normal}.nft-date-content-wrapper[data-v-a21cdfb5]{display:flex;flex-direction:column;align-items:flex-end;gap:7px}.nft-date-content-text[data-v-a21cdfb5]{color:#000;text-align:right;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:14px;font-style:normal;font-weight:400;line-height:normal}.nft-duration-wrapper[data-v-a21cdfb5]{display:flex;justify-content:space-between;align-items:center;align-self:stretch}.nft-duration-text[data-v-a21cdfb5]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:14px;font-style:normal;font-weight:700;line-height:normal}.nft-duration-content-text[data-v-a21cdfb5]{color:#000;text-align:right;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:14px;font-style:normal;font-weight:400;line-height:normal}.nft-award-wrapper[data-v-a21cdfb5]{display:flex;justify-content:space-between;align-items:center;align-self:stretch}.nft-award-text[data-v-a21cdfb5]{color:#4dc4cf;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:14px;font-style:normal;font-weight:700;line-height:normal}.nft-award-content-text[data-v-a21cdfb5]{color:#4dc4cf;text-align:right;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:14px;font-style:normal;font-weight:700;line-height:normal}.is-verified-nft-text[data-v-a21cdfb5]{color:#000}.is-solved-nft-text[data-v-a21cdfb5]{text-decoration-line:line-through}.nft-btn[data-v-a21cdfb5]{display:flex;padding:10px 30px;justify-content:center;align-items:center;gap:10px;border-radius:20px;border:2px solid #000;background:#cacaca}.is-live[data-v-a21cdfb5]{background:#53926d;cursor:pointer}.is-verified[data-v-a21cdfb5]{background:#4dc4cf}.nft-btn-text[data-v-a21cdfb5]{color:#000;text-align:right;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:14px;font-style:normal;font-weight:700;line-height:normal}.pagination[data-v-a21cdfb5]{display:flex;justify-content:center;align-items:center;align-self:stretch}.pagination-wrapper[data-v-a21cdfb5]{display:flex;align-items:center;gap:30px}.pagination-wrapper img[data-v-a21cdfb5]{cursor:pointer}.number-wrapper[data-v-a21cdfb5]{display:flex;align-items:center;gap:10px}.number-text[data-v-a21cdfb5]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:20px;font-style:normal;font-weight:400;line-height:normal;cursor:pointer}.is-pagination-active[data-v-a21cdfb5]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:20px;font-style:normal;font-weight:700;line-height:normal;text-decoration-line:underline} diff --git a/assets/LeaderboardView-CDr9g18M.js b/assets/LeaderboardView-2RIHWFwK.js similarity index 95% rename from assets/LeaderboardView-CDr9g18M.js rename to assets/LeaderboardView-2RIHWFwK.js index ddd68d7..998fa73 100644 --- a/assets/LeaderboardView-CDr9g18M.js +++ b/assets/LeaderboardView-2RIHWFwK.js @@ -1 +1 @@ -import{b as w,c as u}from"./gameView-BG60hCBX.js";import{_ as f,r as c,i as x,o as l,e as n,f as e,h as r,s as C,F as b,j as m,q as S,m as k}from"./index-BEOb6O_H.js";const y={class:"leaderboard"},L={class:"leaderboard-container"},B={class:"overview-wrapper"},V={class:"overview-content-wrapper"},A={class:"data-wrapper"},E={class:"title-wrapper"},O={class:"content-text"},T={class:"title-wrapper"},$={class:"content-text"},F={class:"title-wrapper"},N={class:"content-text"},P={class:"title-wrapper"},j={class:"content-verified-text"},q={class:"leaderboard-wrapper"},D={class:"table"},I={class:"rank-content-text"},M={class:"challenger-content-text"},R={class:"award-content-text"},U={class:"solved-content-text"},z={__name:"LeaderboardPage",setup(v){const a=c({totalChallenges:0,ongoingChallenges:0,solvedChallenges:0,verifiedChallenges:0}),d=c([{address:"",solved:"",award:""}]),_=async()=>{try{const t=await w();a.value.totalChallenges=t[0],a.value.ongoingChallenges=t[1],a.value.solvedChallenges=t[2],a.value.verifiedChallenges=t[3]}catch(t){console.error("Error fetching overview data:",t)}},g=async()=>{try{const t=await u(10);t[0].length!=0&&(d.value=t[0].map((s,o)=>({address:s,solved:t[1][o],award:t[2][o].toString()})).sort((s,o)=>o.award-s.award))}catch(t){console.error("Error fetching leaderboard data:",t)}},p=t=>t==""?"":S(t.toString(),18),h=t=>t&&`${t.slice(0,6)}...${t.slice(-4)}`;return x(()=>{_(),g()}),(t,s)=>(l(),n("div",y,[e("div",L,[e("div",B,[s[4]||(s[4]=e("div",{class:"overview-text"},"Overview",-1)),e("div",V,[e("div",A,[e("div",E,[s[0]||(s[0]=e("div",{class:"title-text"},"Total Challenges",-1)),e("div",O,r(a.value.totalChallenges),1)]),e("div",T,[s[1]||(s[1]=e("div",{class:"title-text"},"Ongoing Challenges",-1)),e("div",$,r(a.value.ongoingChallenges),1)]),e("div",F,[s[2]||(s[2]=e("div",{class:"title-text"},"Solved Challenges",-1)),e("div",N,r(a.value.solvedChallenges),1)]),e("div",P,[s[3]||(s[3]=e("div",{class:"title-verified-text"},"Verified Challenges",-1)),e("div",j,r(a.value.verifiedChallenges),1)])])])]),e("div",q,[s[6]||(s[6]=e("div",{class:"leaderboard-text"},"Leaderboard",-1)),e("div",D,[s[5]||(s[5]=C('
Rank
Challenger
Total Award
Solved
',1)),(l(!0),n(b,null,m(d.value,(o,i)=>(l(),n("div",{key:i,class:"table-content-wrapper"},[e("div",I,r(o.award==""?"":i+1),1),e("div",M,r(h(o.address)),1),e("div",R,r(p(o.award)),1),e("div",U,r(o.solved),1)]))),128))])])])]))}},G=f(z,[["__scopeId","data-v-5899c30c"]]),K={__name:"LeaderboardView",setup(v){return(a,d)=>(l(),k(G))}};export{K as default}; +import{b as w,c as u}from"./gameView-AmYzYg1A.js";import{_ as f,r as c,i as x,o as l,e as n,f as e,h as r,s as C,F as b,j as m,q as S,m as k}from"./index-b6Nsj3zY.js";const y={class:"leaderboard"},L={class:"leaderboard-container"},B={class:"overview-wrapper"},V={class:"overview-content-wrapper"},A={class:"data-wrapper"},E={class:"title-wrapper"},O={class:"content-text"},T={class:"title-wrapper"},$={class:"content-text"},F={class:"title-wrapper"},N={class:"content-text"},P={class:"title-wrapper"},j={class:"content-verified-text"},q={class:"leaderboard-wrapper"},D={class:"table"},I={class:"rank-content-text"},M={class:"challenger-content-text"},R={class:"award-content-text"},U={class:"solved-content-text"},z={__name:"LeaderboardPage",setup(v){const a=c({totalChallenges:0,ongoingChallenges:0,solvedChallenges:0,verifiedChallenges:0}),d=c([{address:"",solved:"",award:""}]),_=async()=>{try{const t=await w();a.value.totalChallenges=t[0],a.value.ongoingChallenges=t[1],a.value.solvedChallenges=t[2],a.value.verifiedChallenges=t[3]}catch(t){console.error("Error fetching overview data:",t)}},g=async()=>{try{const t=await u(10);t[0].length!=0&&(d.value=t[0].map((s,o)=>({address:s,solved:t[1][o],award:t[2][o].toString()})).sort((s,o)=>o.award-s.award))}catch(t){console.error("Error fetching leaderboard data:",t)}},p=t=>t==""?"":S(t.toString(),18),h=t=>t&&`${t.slice(0,6)}...${t.slice(-4)}`;return x(()=>{_(),g()}),(t,s)=>(l(),n("div",y,[e("div",L,[e("div",B,[s[4]||(s[4]=e("div",{class:"overview-text"},"Overview",-1)),e("div",V,[e("div",A,[e("div",E,[s[0]||(s[0]=e("div",{class:"title-text"},"Total Challenges",-1)),e("div",O,r(a.value.totalChallenges),1)]),e("div",T,[s[1]||(s[1]=e("div",{class:"title-text"},"Ongoing Challenges",-1)),e("div",$,r(a.value.ongoingChallenges),1)]),e("div",F,[s[2]||(s[2]=e("div",{class:"title-text"},"Solved Challenges",-1)),e("div",N,r(a.value.solvedChallenges),1)]),e("div",P,[s[3]||(s[3]=e("div",{class:"title-verified-text"},"Verified Challenges",-1)),e("div",j,r(a.value.verifiedChallenges),1)])])])]),e("div",q,[s[6]||(s[6]=e("div",{class:"leaderboard-text"},"Leaderboard",-1)),e("div",D,[s[5]||(s[5]=C('
Rank
Challenger
Total Award
Solved
',1)),(l(!0),n(b,null,m(d.value,(o,i)=>(l(),n("div",{key:i,class:"table-content-wrapper"},[e("div",I,r(o.award==""?"":i+1),1),e("div",M,r(h(o.address)),1),e("div",R,r(p(o.award)),1),e("div",U,r(o.solved),1)]))),128))])])])]))}},G=f(z,[["__scopeId","data-v-5899c30c"]]),K={__name:"LeaderboardView",setup(v){return(a,d)=>(l(),k(G))}};export{K as default}; diff --git a/assets/PortfolioView-CYtqoMkr.js b/assets/PortfolioView-BzZYjV41.js similarity index 98% rename from assets/PortfolioView-CYtqoMkr.js rename to assets/PortfolioView-BzZYjV41.js index 671be89..91ebd9b 100644 --- a/assets/PortfolioView-CYtqoMkr.js +++ b/assets/PortfolioView-BzZYjV41.js @@ -1 +1 @@ -import{_ as P,r as g,i as B,o as i,e as n,f as e,F as x,j as f,l as c,s as _,d as m,h as a,q as N,m as T}from"./index-BEOb6O_H.js";import{d as U,e as V}from"./gameView-BG60hCBX.js";const A={class:"portfolio"},C={class:"portfolio-container"},I={class:"maker"},L={class:"maker-wrapper"},$={key:0,class:"maker-content-wrapper"},F={class:"maker-nfts"},E={class:"nft-status-wrapper"},H={class:"type-wrapper"},R={class:"type-text"},Z={class:"live-wrapper"},j={class:"live-text"},q=["src"],W={class:"nft-title-wrapper"},z={class:"nft-title"},G={class:"nft-date-wrapper"},J={class:"nft-date-content-wrapper"},K={class:"nft-date-content-text"},O={class:"nft-date-content-text"},Q={class:"nft-duration-wrapper"},X={class:"nft-duration-content-text"},Y={class:"nft-award-wrapper"},tt={class:"nft-award-content-text"},et={class:"detail"},st={class:"detail-table"},at={class:"detail-content-text"},ot={class:"detail-content-name-text"},dt={class:"detail-content-text"},it={class:"detail-content-text"},nt={class:"detail-content-date-text"},lt={class:"detail-content-text"},rt={key:1,class:"detail-table-content"},ct={class:"solver"},vt={class:"solver-table"},_t={class:"solver-content-text"},pt={class:"solver-content-name-text"},ut={class:"solver-content-name-text"},xt={class:"detail-content-date-text"},ft={class:"detail-content-text"},ht={key:1,class:"solver-table-content"},wt={__name:"PortfolioPage",setup(k){const l=o=>{const t=new Date(o*1e3),s=String(t.getUTCMonth()+1).padStart(2,"0"),d=String(t.getUTCDate()).padStart(2,"0"),w=t.getUTCHours(),S=String(t.getUTCMinutes()).padStart(2,"0"),b=w>=12?"PM":"AM",M=w%12||12;return`${s}.${d} ${M}:${S} ${b}`},h=(o,t)=>{const d=(t-o)/(60*60*24);return Math.round(d)},p=o=>N(o.toString(),18),r=g({nfts:[],details:[]}),v=g({details:[]}),u=o=>o.map(t=>({id:t[0].toString(),tokenId:t[1],name:t[2],description:t[3],type:t[4],promptHash:t[5],secretHash:t[6],image:t[7],startDate:Number(t[8]),endDate:Number(t[9]),award:t[10],status:t[11]==="0x0000000000000000000000000000000000000000"?"Live":"End"})),y=async()=>{const{address:o}=m();try{const t=await U(o.value);r.value={nfts:u(t.slice(-4)),details:u(t.slice(-4))}}catch(t){console.error("Error fetching Maker portfolio:",t)}},D=async()=>{const{address:o}=m();try{const t=await V(o.value);v.value={details:u(t)}}catch(t){console.error("Error fetching Solver portfolio:",t)}};return B(()=>{y(),D()}),(o,t)=>(i(),n("div",A,[e("div",C,[e("div",I,[e("div",L,[t[6]||(t[6]=e("div",{class:"maker-text"},"Maker",-1)),r.value.nfts.length>0?(i(),n("div",$,[t[4]||(t[4]=e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"27",height:"45",viewBox:"0 0 27 45",fill:"none"},[e("path",{d:"M25.75 2.56444L2.05336 22.5L25.75 42.4356V2.56444Z",fill:"#F5F3F3",stroke:"black","stroke-width":"2"})],-1)),e("div",F,[(i(!0),n(x,null,f(r.value.nfts,(s,d)=>(i(),n("div",{key:d,class:"nft-wrapper"},[e("div",E,[e("div",H,[e("div",R,a(s.type),1)]),e("div",Z,[t[0]||(t[0]=e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none"},[e("circle",{cx:"6",cy:"6.02026",r:"5.5",fill:"#53926D"})],-1)),e("div",j,a(s.status),1)])]),e("img",{src:s.image,alt:"nft"},null,8,q),e("div",W,[e("div",z,a(s.name),1)]),e("div",G,[t[1]||(t[1]=e("div",{class:"nft-date-text"},"Date",-1)),e("div",J,[e("div",K,a(l(s.startDate)),1),e("div",O," ~ "+a(l(s.endDate)),1)])]),e("div",Q,[t[2]||(t[2]=e("div",{class:"nft-duration-text"},"Remaining",-1)),e("div",X,a(h(s.startDate,s.endDate))+" days ",1)]),e("div",Y,[t[3]||(t[3]=e("div",{class:"nft-award-text"},"Award",-1)),e("div",tt,a(p(s.award)+" USDC"),1)])]))),128))]),t[5]||(t[5]=e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"27",height:"45",viewBox:"0 0 27 45",fill:"none"},[e("path",{d:"M1.25 2.56444L24.9466 22.5L1.25 42.4356V2.56444Z",fill:"#53926D",stroke:"black","stroke-width":"2"})],-1))])):c("",!0)]),e("div",et,[t[9]||(t[9]=e("div",{class:"detail-text"},"View Details",-1)),e("div",st,[t[8]||(t[8]=_('
Id
Name
Status
Type
Date
Award
',1)),r.value.details.length!=0?(i(!0),n(x,{key:0},f(r.value.details,(s,d)=>(i(),n("div",{key:d,class:"detail-table-content"},[e("div",at,a(d+1),1),e("div",ot,a(s.name),1),e("div",dt,a(s.status),1),e("div",it,a(s.type),1),e("div",nt,a(l(s.startDate))+" ~ "+a(l(s.endDate))+" (UST) ",1),e("div",lt,a(p(s.award)),1)]))),128)):c("",!0),r.value.details.length==0?(i(),n("div",rt,t[7]||(t[7]=[_('
',6)]))):c("",!0)])])]),e("div",ct,[t[12]||(t[12]=e("div",{class:"solver-title-text"},"Solver",-1)),e("div",vt,[t[11]||(t[11]=_('
Id
Name
Type
Solved
Award
',1)),v.value.details.length!=0?(i(!0),n(x,{key:0},f(v.value.details,(s,d)=>(i(),n("div",{key:d,class:"solver-table-content"},[e("div",_t,a(d+1),1),e("div",pt,a(s.name),1),e("div",ut,a(s.type),1),e("div",xt,a(l(s.startDate))+" ~ "+a(l(s.endDate)),1),e("div",ft,a(p(s.award)),1)]))),128)):c("",!0),v.value.details.length==0?(i(),n("div",ht,t[10]||(t[10]=[_('
',6)]))):c("",!0)])])])]))}},gt=P(wt,[["__scopeId","data-v-c8821199"]]),yt={__name:"PortfolioView",setup(k){return(l,h)=>(i(),T(gt))}};export{yt as default}; +import{_ as P,r as g,i as B,o as i,e as n,f as e,F as x,j as f,l as c,s as _,d as m,h as a,q as N,m as T}from"./index-b6Nsj3zY.js";import{d as U,e as V}from"./gameView-AmYzYg1A.js";const A={class:"portfolio"},C={class:"portfolio-container"},I={class:"maker"},L={class:"maker-wrapper"},$={key:0,class:"maker-content-wrapper"},F={class:"maker-nfts"},E={class:"nft-status-wrapper"},H={class:"type-wrapper"},R={class:"type-text"},Z={class:"live-wrapper"},j={class:"live-text"},q=["src"],W={class:"nft-title-wrapper"},z={class:"nft-title"},G={class:"nft-date-wrapper"},J={class:"nft-date-content-wrapper"},K={class:"nft-date-content-text"},O={class:"nft-date-content-text"},Q={class:"nft-duration-wrapper"},X={class:"nft-duration-content-text"},Y={class:"nft-award-wrapper"},tt={class:"nft-award-content-text"},et={class:"detail"},st={class:"detail-table"},at={class:"detail-content-text"},ot={class:"detail-content-name-text"},dt={class:"detail-content-text"},it={class:"detail-content-text"},nt={class:"detail-content-date-text"},lt={class:"detail-content-text"},rt={key:1,class:"detail-table-content"},ct={class:"solver"},vt={class:"solver-table"},_t={class:"solver-content-text"},pt={class:"solver-content-name-text"},ut={class:"solver-content-name-text"},xt={class:"detail-content-date-text"},ft={class:"detail-content-text"},ht={key:1,class:"solver-table-content"},wt={__name:"PortfolioPage",setup(k){const l=o=>{const t=new Date(o*1e3),s=String(t.getUTCMonth()+1).padStart(2,"0"),d=String(t.getUTCDate()).padStart(2,"0"),w=t.getUTCHours(),S=String(t.getUTCMinutes()).padStart(2,"0"),b=w>=12?"PM":"AM",M=w%12||12;return`${s}.${d} ${M}:${S} ${b}`},h=(o,t)=>{const d=(t-o)/(60*60*24);return Math.round(d)},p=o=>N(o.toString(),18),r=g({nfts:[],details:[]}),v=g({details:[]}),u=o=>o.map(t=>({id:t[0].toString(),tokenId:t[1],name:t[2],description:t[3],type:t[4],promptHash:t[5],secretHash:t[6],image:t[7],startDate:Number(t[8]),endDate:Number(t[9]),award:t[10],status:t[11]==="0x0000000000000000000000000000000000000000"?"Live":"End"})),y=async()=>{const{address:o}=m();try{const t=await U(o.value);r.value={nfts:u(t.slice(-4)),details:u(t.slice(-4))}}catch(t){console.error("Error fetching Maker portfolio:",t)}},D=async()=>{const{address:o}=m();try{const t=await V(o.value);v.value={details:u(t)}}catch(t){console.error("Error fetching Solver portfolio:",t)}};return B(()=>{y(),D()}),(o,t)=>(i(),n("div",A,[e("div",C,[e("div",I,[e("div",L,[t[6]||(t[6]=e("div",{class:"maker-text"},"Maker",-1)),r.value.nfts.length>0?(i(),n("div",$,[t[4]||(t[4]=e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"27",height:"45",viewBox:"0 0 27 45",fill:"none"},[e("path",{d:"M25.75 2.56444L2.05336 22.5L25.75 42.4356V2.56444Z",fill:"#F5F3F3",stroke:"black","stroke-width":"2"})],-1)),e("div",F,[(i(!0),n(x,null,f(r.value.nfts,(s,d)=>(i(),n("div",{key:d,class:"nft-wrapper"},[e("div",E,[e("div",H,[e("div",R,a(s.type),1)]),e("div",Z,[t[0]||(t[0]=e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none"},[e("circle",{cx:"6",cy:"6.02026",r:"5.5",fill:"#53926D"})],-1)),e("div",j,a(s.status),1)])]),e("img",{src:s.image,alt:"nft"},null,8,q),e("div",W,[e("div",z,a(s.name),1)]),e("div",G,[t[1]||(t[1]=e("div",{class:"nft-date-text"},"Date",-1)),e("div",J,[e("div",K,a(l(s.startDate)),1),e("div",O," ~ "+a(l(s.endDate)),1)])]),e("div",Q,[t[2]||(t[2]=e("div",{class:"nft-duration-text"},"Remaining",-1)),e("div",X,a(h(s.startDate,s.endDate))+" days ",1)]),e("div",Y,[t[3]||(t[3]=e("div",{class:"nft-award-text"},"Award",-1)),e("div",tt,a(p(s.award)+" USDC"),1)])]))),128))]),t[5]||(t[5]=e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"27",height:"45",viewBox:"0 0 27 45",fill:"none"},[e("path",{d:"M1.25 2.56444L24.9466 22.5L1.25 42.4356V2.56444Z",fill:"#53926D",stroke:"black","stroke-width":"2"})],-1))])):c("",!0)]),e("div",et,[t[9]||(t[9]=e("div",{class:"detail-text"},"View Details",-1)),e("div",st,[t[8]||(t[8]=_('
Id
Name
Status
Type
Date
Award
',1)),r.value.details.length!=0?(i(!0),n(x,{key:0},f(r.value.details,(s,d)=>(i(),n("div",{key:d,class:"detail-table-content"},[e("div",at,a(d+1),1),e("div",ot,a(s.name),1),e("div",dt,a(s.status),1),e("div",it,a(s.type),1),e("div",nt,a(l(s.startDate))+" ~ "+a(l(s.endDate))+" (UST) ",1),e("div",lt,a(p(s.award)),1)]))),128)):c("",!0),r.value.details.length==0?(i(),n("div",rt,t[7]||(t[7]=[_('
',6)]))):c("",!0)])])]),e("div",ct,[t[12]||(t[12]=e("div",{class:"solver-title-text"},"Solver",-1)),e("div",vt,[t[11]||(t[11]=_('
Id
Name
Type
Solved
Award
',1)),v.value.details.length!=0?(i(!0),n(x,{key:0},f(v.value.details,(s,d)=>(i(),n("div",{key:d,class:"solver-table-content"},[e("div",_t,a(d+1),1),e("div",pt,a(s.name),1),e("div",ut,a(s.type),1),e("div",xt,a(l(s.startDate))+" ~ "+a(l(s.endDate)),1),e("div",ft,a(p(s.award)),1)]))),128)):c("",!0),v.value.details.length==0?(i(),n("div",ht,t[10]||(t[10]=[_('
',6)]))):c("",!0)])])])]))}},gt=P(wt,[["__scopeId","data-v-c8821199"]]),yt={__name:"PortfolioView",setup(k){return(l,h)=>(i(),T(gt))}};export{yt as default}; diff --git a/assets/gameView-BG60hCBX.js b/assets/gameView-AmYzYg1A.js similarity index 99% rename from assets/gameView-BG60hCBX.js rename to assets/gameView-AmYzYg1A.js index 2d16224..6081996 100644 --- a/assets/gameView-BG60hCBX.js +++ b/assets/gameView-AmYzYg1A.js @@ -1 +1 @@ -import{J as c,c as a,C as n}from"./index-BEOb6O_H.js";const i="hh-sol-artifact-1",s="Game",p="contracts/Game.sol",r=[{inputs:[],stateMutability:"nonpayable",type:"constructor"},{inputs:[{internalType:"address",name:"target",type:"address"}],name:"AddressEmptyCode",type:"error"},{inputs:[],name:"ECDSAInvalidSignature",type:"error"},{inputs:[{internalType:"uint256",name:"length",type:"uint256"}],name:"ECDSAInvalidSignatureLength",type:"error"},{inputs:[{internalType:"bytes32",name:"s",type:"bytes32"}],name:"ECDSAInvalidSignatureS",type:"error"},{inputs:[],name:"ERC721EnumerableForbiddenBatchMint",type:"error"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"address",name:"owner",type:"address"}],name:"ERC721IncorrectOwner",type:"error"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ERC721InsufficientApproval",type:"error"},{inputs:[{internalType:"address",name:"approver",type:"address"}],name:"ERC721InvalidApprover",type:"error"},{inputs:[{internalType:"address",name:"operator",type:"address"}],name:"ERC721InvalidOperator",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"ERC721InvalidOwner",type:"error"},{inputs:[{internalType:"address",name:"receiver",type:"address"}],name:"ERC721InvalidReceiver",type:"error"},{inputs:[{internalType:"address",name:"sender",type:"address"}],name:"ERC721InvalidSender",type:"error"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ERC721NonexistentToken",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"index",type:"uint256"}],name:"ERC721OutOfBoundsIndex",type:"error"},{inputs:[],name:"FailedInnerCall",type:"error"},{inputs:[],name:"InvalidInitialization",type:"error"},{inputs:[],name:"NotInitializing",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"OwnableInvalidOwner",type:"error"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"OwnableUnauthorizedAccount",type:"error"},{inputs:[{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"length",type:"uint256"}],name:"StringsInsufficientHexLength",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint64",name:"version",type:"uint64"}],name:"Initialized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"accountImplementation",outputs:[{internalType:"contract Wallet",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"}],name:"addAllowlist",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"allowlist",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"awardToken",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"counter",type:"uint256"}],name:"counterToTokenId",outputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"createAccount",outputs:[{internalType:"contract Wallet",name:"ret",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"}],name:"delAllowlist",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"salt",type:"uint256"}],name:"getAccountAddress",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"getAccountAddress",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"address",name:"nftAddress",type:"address"}],name:"hasBadge",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"initialOwner_",type:"address"},{internalType:"address",name:"awardToken_",type:"address"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"isEnded",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"isOngoing",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"isSolved",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"id",type:"uint256"}],name:"metas",outputs:[{components:[{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"description",type:"string"},{internalType:"string",name:"gameType",type:"string"},{internalType:"bytes32",name:"prompt",type:"bytes32"},{internalType:"bytes32",name:"secret",type:"bytes32"},{internalType:"uint128",name:"start",type:"uint128"},{internalType:"uint128",name:"end",type:"uint128"},{internalType:"address",name:"winner",type:"address"}],internalType:"struct Metadata",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"}],name:"mint",outputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{components:[{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"description",type:"string"},{internalType:"string",name:"gameType",type:"string"},{internalType:"bytes32",name:"prompt",type:"bytes32"},{internalType:"bytes32",name:"secret",type:"bytes32"},{internalType:"uint128",name:"start",type:"uint128"},{internalType:"uint128",name:"end",type:"uint128"},{internalType:"address",name:"winner",type:"address"}],internalType:"struct Metadata",name:"metadata",type:"tuple"},{internalType:"uint256",name:"awards",type:"uint256"}],name:"mint",outputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"solver",type:"address"}],name:"registeredSolver",outputs:[{internalType:"bool",name:"registered",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"salts",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes32",name:"secretHash",type:"bytes32"},{internalType:"address",name:"winner",type:"address"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"solved",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"solver",type:"address"}],name:"solvedAwards",outputs:[{internalType:"uint256",name:"totalAwards",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"solver",type:"address"}],name:"solvedCounts",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"solver",type:"address"},{internalType:"uint256",name:"",type:"uint256"}],name:"solvedGames",outputs:[{internalType:"uint256",name:"tokenIds",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"}],name:"solvedGamesTokenIds",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"solverList",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"solverListLength",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"index",type:"uint256"}],name:"tokenByIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenIdToCounter",outputs:[{internalType:"uint256",name:"counter",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"index",type:"uint256"}],name:"tokenOfOwnerByIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalEnd",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalOngoing",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSolved",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalVerified",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"address",name:"nftAddress",type:"address"}],name:"verified",outputs:[],stateMutability:"nonpayable",type:"function"}],y="0x60806040523480156200001157600080fd5b506200001c6200002c565b620000266200002c565b620000e0565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff16156200007d5760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b0390811614620000dd5780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b615bbf80620000f06000396000f3fe60806040523480156200001157600080fd5b5060043610620003695760003560e01c8063715018a611620001dc578063b23e44801162000119578063e715de2811620000af578063f2fde38b1162000086578063f2fde38b1462000888578063f9bc3f40146200089f578063fe7f43da14620008a9578063fe9eba1514620008c057600080fd5b8063e715de281462000850578063e985e9c51462000867578063ef792662146200087e57600080fd5b8063c516e15611620000f0578063c516e1561462000805578063c87b56dd146200080e578063d2da7bca1462000825578063d3c6fd90146200083957600080fd5b8063b23e448014620007b4578063b66f7a8b14620007d7578063b88d4fde14620007ee57600080fd5b806395d89b41116200018f5780639dd3e25511620001665780639dd3e255146200072e578063a22cb4651462000751578063a7cd52cb1462000768578063ac9650d8146200078e57600080fd5b806395d89b4114620006f657806395ecc64214620007005780639859387b146200071757600080fd5b8063715018a6146200065e57806374de69e314620006685780637b80e8e6146200067f57806385604ba41462000688578063867211f314620006ae5780638da5cb5b14620006c557600080fd5b8063415fa50a11620002ab57806354c87af4116200025e5780636352211e11620002355780636352211e14620005f3578063676db981146200060a5780636a627842146200063057806370a08231146200064757600080fd5b806354c87af414620005a25780635872fe4514620005c55780635f6928e214620005dc57600080fd5b8063415fa50a146200050c57806342842e0e146200052f578063485cc95514620005465780634cd88b76146200055d5780634f6ccce71462000574578063502c040b146200058b57600080fd5b80630d253d76116200032157806323b872dd11620002f857806323b872dd14620004a157806324d7356714620004b8578063277ecfbb14620004cf5780632f745c5914620004f557600080fd5b80630d253d76146200045f57806311464fbe146200047657806318160ddd146200048a57600080fd5b80627c94b6146200036e57806301ffc9a714620003a45780630661d1dc14620003cc57806306fdde0314620003fd578063081812fc1462000416578063095ea7b31462000446575b600080fd5b620003916200037f36600462003be6565b600a6020526000908152604090205481565b6040519081526020015b60405180910390f35b620003bb620003b536600462003c1b565b620008c9565b60405190151581526020016200039b565b620003bb620003dd36600462003c3b565b6000908152600360205260409020600601546001600160a01b0316151590565b62000407620008f7565b6040516200039b919062003ca9565b6200042d6200042736600462003c3b565b620009a4565b6040516001600160a01b0390911681526020016200039b565b6200045d6200045736600462003cbe565b620009bd565b005b6200042d6200047036600462003cbe565b620009ce565b6000546200042d906001600160a01b031681565b60008051602062005b6a8339815191525462000391565b6200045d620004b236600462003ceb565b62000a96565b6200045d620004c936600462003d2c565b62000b2b565b620004e6620004e036600462003c3b565b62000d64565b6040516200039b919062003d5b565b620003916200050636600462003cbe565b62000fde565b620003916200051d36600462003be6565b600b6020526000908152604090205481565b6200045d6200054036600462003ceb565b62001057565b6200045d6200055736600462003e21565b62001079565b6200045d6200056e36600462003f26565b6200120c565b620003916200058536600462003c3b565b620012e8565b620003bb6200059c36600462003d2c565b62001368565b62000391620005b336600462003c3b565b60066020526000908152604090205481565b6200042d620005d636600462003be6565b620013e2565b6200045d620005ed36600462003be6565b62001445565b6200042d6200060436600462003c3b565b62001473565b620003bb6200061b36600462003be6565b600c6020526000908152604090205460ff1681565b620003916200064136600462003be6565b62001480565b620003916200065836600462003be6565b620014b8565b6200045d62001517565b620003916200067936600462003cbe565b6200152f565b600d5462000391565b6200069f6200069936600462003be6565b62001561565b6040516200039b919062003f90565b6200045d620006bf36600462003be6565b620015cf565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b03166200042d565b62000407620015fa565b620003bb6200071136600462003c3b565b6200163c565b6200042d6200072836600462003be6565b6200189d565b620003916200073f36600462003c3b565b60056020526000908152604090205481565b6200045d6200076236600462003fe5565b6200197a565b620003bb6200077936600462003be6565b60046020526000908152604090205460ff1681565b620007a56200079f36600462004021565b62001987565b6040516200039b91906200409a565b62000391620007c536600462003be6565b60016020526000908152604090205481565b620003bb620007e836600462003c3b565b62001a81565b6200045d620007ff36600462004102565b62001cc8565b60075462000391565b620004076200081f36600462003c3b565b62001ce3565b6002546200042d906001600160a01b031681565b6200045d6200084a36600462004171565b62002079565b6200039162000861366004620041d5565b62002501565b620003bb6200087836600462003e21565b6200271e565b620003916200276b565b6200045d6200089936600462003be6565b62002799565b62000391620027dd565b6200042d620008ba36600462003c3b565b620027f1565b60085462000391565b60006001600160e01b0319821663780e9d6360e01b1480620008f15750620008f1826200281c565b92915050565b60008051602062005ac283398151915280546060919081906200091a9062004302565b80601f0160208091040260200160405190810160405280929190818152602001828054620009489062004302565b8015620009995780601f106200096d5761010080835404028352916020019162000999565b820191906000526020600020905b8154815290600101906020018083116200097b57829003601f168201915b505050505091505090565b6000620009b1826200286f565b50620008f182620028ab565b620009ca828233620028e5565b5050565b600062000a8f8260001b60405180602001620009ea9062003bad565b601f1982820381018352601f9091011660408190526000546001600160a01b03888116602484015216906044015b60408051601f19818403018152918152602080830180516001600160e01b031663189acdbd60e31b179052905162000a53939291016200433e565b60408051601f198184030181529082905262000a73929160200162004382565b60405160208183030381529060405280519060200120620028f4565b9392505050565b6001600160a01b03821662000ac657604051633250574960e11b8152600060048201526024015b60405180910390fd5b600062000ad583833362002903565b9050836001600160a01b0316816001600160a01b03161462000b25576040516364283d7b60e01b81526001600160a01b038086166004830152602482018490528216604482015260640162000abd565b50505050565b3360009081526004602052604090205460ff1662000b7b5760405162461bcd60e51b815260206004820152600c60248201526b2737ba1030b63637bbb2b21760a11b604482015260640162000abd565b60008281526003602052604090206005810154426001600160801b03909116111562000bd55760405162461bcd60e51b81526020600482015260086024820152672737ba103cb2ba1760c11b604482015260640162000abd565b600581015442600160801b9091046001600160801b0316101562000c285760405162461bcd60e51b815260206004820152600960248201526827baba3230ba32b21760b91b604482015260640162000abd565b60068101546001600160a01b03161562000c775760405162461bcd60e51b815260206004820152600f60248201526e20b63932b0b23c9039b7b63b32b21760891b604482015260640162000abd565b6040516370a0823160e01b81526001600160a01b0384811660048301528316906370a0823190602401602060405180830381865afa15801562000cbe573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000ce49190620043b5565b60000362000d275760405162461bcd60e51b815260206004820152600f60248201526e2430bb32903737903130b233b2b99760891b604482015260640162000abd565b6006810180546001600160a01b0319166001600160a01b03179055600880546001919060009062000d5a908490620043e5565b9091555050505050565b604080516101008101825260608082526020820181905291810182905260009181018290526080810182905260a0810182905260c0810182905260e0810191909152600082815260036020526040908190208151610100810190925280548290829062000dd19062004302565b80601f016020809104026020016040519081016040528092919081815260200182805462000dff9062004302565b801562000e505780601f1062000e245761010080835404028352916020019162000e50565b820191906000526020600020905b81548152906001019060200180831162000e3257829003601f168201915b5050505050815260200160018201805462000e6b9062004302565b80601f016020809104026020016040519081016040528092919081815260200182805462000e999062004302565b801562000eea5780601f1062000ebe5761010080835404028352916020019162000eea565b820191906000526020600020905b81548152906001019060200180831162000ecc57829003601f168201915b5050505050815260200160028201805462000f059062004302565b80601f016020809104026020016040519081016040528092919081815260200182805462000f339062004302565b801562000f845780601f1062000f585761010080835404028352916020019162000f84565b820191906000526020600020905b81548152906001019060200180831162000f6657829003601f168201915b5050509183525050600382015460208201526004820154604082015260058201546001600160801b038082166060840152600160801b9091041660808201526006909101546001600160a01b031660a09091015292915050565b600060008051602062005aa283398151915262000ffb84620014b8565b83106200102e5760405163295f44f760e21b81526001600160a01b03851660048201526024810184905260440162000abd565b6001600160a01b0384166000908152602091825260408082208583529092522054905092915050565b620010748383836040518060200160405280600081525062001cc8565b505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff1615906001600160401b0316600081158015620010bf5750825b90506000826001600160401b03166001148015620010dc5750303b155b905081158015620010eb575080155b156200110a5760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff1916600117855583156200113557845460ff60401b1916600160401b1785555b620011916040518060400160405280601781526020017f436170747572652d7468652d50726f6d70742047616d650000000000000000008152506040518060400160405280600381526020016204354560ec1b81525062002a14565b6200119b62002a4c565b620011a562002a56565b620011b08762002a6a565b620011bc878762002a74565b83156200120357845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50505050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff1615906001600160401b0316600081158015620012525750825b90506000826001600160401b031660011480156200126f5750303b155b9050811580156200127e575080155b156200129d5760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff191660011785558315620012c857845460ff60401b1916600160401b1785555b620012d4878762002a14565b620012de62002a4c565b620011bc62002a56565b600060008051602062005aa28339815191526200131260008051602062005b6a8339815191525490565b83106200133d5760405163295f44f760e21b8152600060048201526024810184905260440162000abd565b806002018381548110620013555762001355620043fb565b9060005260206000200154915050919050565b6040516370a0823160e01b81526001600160a01b038381166004830152600091908316906370a0823190602401602060405180830381865afa158015620013b3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620013d99190620043b5565b15159392505050565b6001600160a01b0381166000908152600160209081526040808320549051620008f1926200141290820162003bad565b601f1982820381018352601f9091011660408190526000546001600160a01b038781166024840152169060440162000a18565b6200144f62002ab6565b6001600160a01b03166000908152600460205260409020805460ff19166001179055565b6000620008f1826200286f565b60405162461bcd60e51b81526020600482015260096024820152682234b9b0b13632b21760b91b604482015260009060640162000abd565b600060008051602062005ac28339815191526001600160a01b038316620014f6576040516322718ad960e21b81526000600482015260240162000abd565b6001600160a01b039092166000908152600390920160205250604090205490565b6200152162002ab6565b6200152d600062002b14565b565b600960205281600052604060002081815481106200154c57600080fd5b90600052602060002001600091509150505481565b6001600160a01b038116600090815260096020908152604091829020805483518184028101840190945280845260609392830182828015620015c357602002820191906000526020600020905b815481526020019060010190808311620015ae575b50505050509050919050565b620015d962002ab6565b6001600160a01b03166000908152600460205260409020805460ff19169055565b7f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079301805460609160008051602062005ac2833981519152916200091a9062004302565b60008181526003602052604080822081516101008101909252805483929190829082906200166a9062004302565b80601f0160208091040260200160405190810160405280929190818152602001828054620016989062004302565b8015620016e95780601f10620016bd57610100808354040283529160200191620016e9565b820191906000526020600020905b815481529060010190602001808311620016cb57829003601f168201915b50505050508152602001600182018054620017049062004302565b80601f0160208091040260200160405190810160405280929190818152602001828054620017329062004302565b8015620017835780601f10620017575761010080835404028352916020019162001783565b820191906000526020600020905b8154815290600101906020018083116200176557829003601f168201915b505050505081526020016002820180546200179e9062004302565b80601f0160208091040260200160405190810160405280929190818152602001828054620017cc9062004302565b80156200181d5780601f10620017f1576101008083540402835291602001916200181d565b820191906000526020600020905b815481529060010190602001808311620017ff57829003601f168201915b5050509183525050600382015460208201526004820154604082015260058201546001600160801b038082166060840152600160801b909104811660808301526006909201546001600160a01b031660a0918201528201519192504291161180159062000a8f5750428160c001516001600160801b031610159392505050565b600080620018ab83620013e2565b90506001600160a01b0381163b8015620018c6575092915050565b6001600160a01b0384166000908152600160205260408120805491620018ec8362004411565b909155506000546040516001600160a01b0387811660248301529091169060440160408051601f198184030181529181526020820180516001600160e01b031663189acdbd60e31b17905251620019439062003bad565b620019509291906200433e565b8190604051809103906000f590508015801562001971573d6000803e3d6000fd5b50949350505050565b620009ca33838362002b85565b604080516000815260208101909152606090826001600160401b03811115620019b457620019b462003e50565b604051908082528060200260200182016040528015620019e957816020015b6060815260200190600190039081620019d35790505b50915060005b8381101562001a795762001a503086868481811062001a125762001a12620043fb565b905060200281019062001a26919062004443565b8560405160200162001a3b9392919062004493565b60405160208183030381529060405262002c39565b83828151811062001a655762001a65620043fb565b6020908102919091010152600101620019ef565b505092915050565b600081815260036020526040808220815161010081019092528054839291908290829062001aaf9062004302565b80601f016020809104026020016040519081016040528092919081815260200182805462001add9062004302565b801562001b2e5780601f1062001b025761010080835404028352916020019162001b2e565b820191906000526020600020905b81548152906001019060200180831162001b1057829003601f168201915b5050505050815260200160018201805462001b499062004302565b80601f016020809104026020016040519081016040528092919081815260200182805462001b779062004302565b801562001bc85780601f1062001b9c5761010080835404028352916020019162001bc8565b820191906000526020600020905b81548152906001019060200180831162001baa57829003601f168201915b5050505050815260200160028201805462001be39062004302565b80601f016020809104026020016040519081016040528092919081815260200182805462001c119062004302565b801562001c625780601f1062001c365761010080835404028352916020019162001c62565b820191906000526020600020905b81548152906001019060200180831162001c4457829003601f168201915b5050509183525050600382015460208201526004820154604082015260058201546001600160801b038082166060840152600160801b909104811660808301526006909201546001600160a01b031660a09091015260c090910151429116109392505050565b62001cd584848462000a96565b62000b258484848462002cb5565b606062001cf0826200286f565b506000828152600360205260408082208151610100810190925280548290829062001d1b9062004302565b80601f016020809104026020016040519081016040528092919081815260200182805462001d499062004302565b801562001d9a5780601f1062001d6e5761010080835404028352916020019162001d9a565b820191906000526020600020905b81548152906001019060200180831162001d7c57829003601f168201915b5050505050815260200160018201805462001db59062004302565b80601f016020809104026020016040519081016040528092919081815260200182805462001de39062004302565b801562001e345780601f1062001e085761010080835404028352916020019162001e34565b820191906000526020600020905b81548152906001019060200180831162001e1657829003601f168201915b5050505050815260200160028201805462001e4f9062004302565b80601f016020809104026020016040519081016040528092919081815260200182805462001e7d9062004302565b801562001ece5780601f1062001ea25761010080835404028352916020019162001ece565b820191906000526020600020905b81548152906001019060200180831162001eb057829003601f168201915b505050918352505060038201546020808301919091526004830154604083015260058301546001600160801b03808216606080860191909152600160801b9092041660808401526006909301546001600160a01b031660a09092019190915282820151929350909160009162001f45919062002deb565b608084015162001f5790602062002deb565b60405160200162001f6a929190620044bc565b604051602081830303815290604052905082604001518162001f998560a001516001600160801b031662002f80565b62001fb18660c001516001600160801b031662002f80565b62001fc98760e001516001600160a01b031662003019565b60405160200162001fdf9594939291906200456e565b6040516020818303038152906040529150506200204f826000015183602001516200200962003031565b600088815260066020526040902054620020239062002f80565b856040516020016200203a9594939291906200474e565b60405160208183030381529060405262003052565b60405160200162002061919062004872565b60405160208183030381529060405292505050919050565b3360009081526004602052604090205460ff16620020c95760405162461bcd60e51b815260206004820152600c60248201526b2737ba1030b63637bbb2b21760a11b604482015260640162000abd565b604080516020808201879052818301869052825180830384018152606090920190925280519101207f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c90206001600160a01b038316620021378284620031c3565b6001600160a01b031614620021845760405162461bcd60e51b815260206004820152601260248201527124b73b30b634b21039b4b3b730ba3ab9329760711b604482015260640162000abd565b6000858152600360209081526040918290208251918201879052910160405160208183030381529060405280519060200120816004015414620022005760405162461bcd60e51b815260206004820152601360248201527224b73b30b634b21039b2b1b932ba2430b9b41760691b604482015260640162000abd565b6005810154426001600160801b0390911611156200224c5760405162461bcd60e51b81526020600482015260086024820152672737ba103cb2ba1760c11b604482015260640162000abd565b600581015442600160801b9091046001600160801b031610156200229f5760405162461bcd60e51b815260206004820152600960248201526827baba3230ba32b21760b91b604482015260640162000abd565b60068101546001600160a01b031615620022ee5760405162461bcd60e51b815260206004820152600f60248201526e20b63932b0b23c9039b7b63b32b21760891b604482015260640162000abd565b6006810180546001600160a01b0319166001600160a01b038616179055600780546001919060009062002323908490620043e5565b90915550506001600160a01b0384166000818152600960209081526040808320805460018181018355918552838520018b9055938352600a9091528120805490919062002372908490620043e5565b90915550506002546040516370a0823160e01b81526001600160a01b038881166004830152909116906370a0823190602401602060405180830381865afa158015620023c2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620023e89190620043b5565b6001600160a01b0385166000908152600b60205260408120805490919062002412908490620043e5565b909155505060405163189acdbd60e31b81526001600160a01b03858116600483015287169063c4d66de890602401600060405180830381600087803b1580156200245b57600080fd5b505af115801562002470573d6000803e3d6000fd5b505050506001600160a01b0384166000908152600c602052604090205460ff16620024f957600d805460018082019092557fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb50180546001600160a01b0319166001600160a01b0387169081179091556000908152600c60205260409020805460ff191690911790555b505050505050565b6000806200250f856200189d565b9050806001600160a01b03169150620025298583620031f1565b8215620025c0576002546001600160a01b03166323b872dd336040516001600160e01b031960e084901b1681526001600160a01b0391821660048201529084166024820152604481018690526064016020604051808303816000875af115801562002598573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620025be9190620048b9565b505b5060006001620025dd60008051602062005b6a8339815191525490565b620025e991906200442d565b600081815260056020908152604080832086905585835260068252808320939093558251610100810184528751815287820151818301528784015181850152606080890151908201526080808901519082015260a0808901516001600160801b039081169183019190915260c0808a01519091169082015260e081018390528583526003909152919020815191925090819062002687908262004925565b50602082015160018201906200269e908262004925565b5060408201516002820190620026b5908262004925565b50606082015160038201556080820151600482015560a082015160c08301516001600160801b03908116600160801b02911617600582015560e090910151600690910180546001600160a01b039092166001600160a01b03199092169190911790559392505050565b6001600160a01b0391821660009081527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab00793056020908152604080832093909416825291909152205460ff1690565b600062002777620027dd565b60008051602062005b6a833981519152546200279491906200442d565b905090565b620027a362002ab6565b6001600160a01b038116620027cf57604051631e4fbdf760e01b81526000600482015260240162000abd565b620027da8162002b14565b50565b6000600854600754620027949190620043e5565b600d81815481106200280257600080fd5b6000918252602090912001546001600160a01b0316905081565b60006001600160e01b031982166380ac58cd60e01b14806200284e57506001600160e01b03198216635b5e139f60e01b145b80620008f157506301ffc9a760e01b6001600160e01b0319831614620008f1565b6000806200287d836200325c565b90506001600160a01b038116620008f157604051637e27328960e01b81526004810184905260240162000abd565b60009081527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930460205260409020546001600160a01b031690565b62001074838383600162003296565b600062000a8f838330620033b8565b60008062002913858585620033e2565b90506001600160a01b038116620029a0576200299a8460008051602062005b6a833981519152805460008381527f645e039705490088daad89bae25049a34f4a9072d398537b1ab2425f24cbed0360205260408120829055600182018355919091527fa42f15e5d656f8155fd7419d740a6073999f19cd6e061449ce4a257150545bf20155565b620029c6565b846001600160a01b0316816001600160a01b031614620029c657620029c68185620034f6565b6001600160a01b038516620029e657620029e0846200359e565b62002a0c565b846001600160a01b0316816001600160a01b03161462002a0c5762002a0c858562003682565b949350505050565b62002a1e620036e2565b60008051602062005ac28339815191528062002a3b848262004925565b506001810162000b25838262004925565b6200152d620036e2565b62002a60620036e2565b6200152d6200372c565b620027a3620036e2565b62002a7e620036e2565b600280546001600160a01b0319166001600160a01b03928316179055166000908152600460205260409020805460ff19166001179055565b3362002ae97f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b0316146200152d5760405163118cdaa760e01b815233600482015260240162000abd565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b60008051602062005ac28339815191526001600160a01b03831662002bc957604051630b61174360e31b81526001600160a01b038416600482015260240162000abd565b6001600160a01b038481166000818152600584016020908152604080832094881680845294825291829020805460ff191687151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a350505050565b6060600080846001600160a01b03168460405162002c589190620049f1565b600060405180830381855af49150503d806000811462002c95576040519150601f19603f3d011682016040523d82523d6000602084013e62002c9a565b606091505b509150915062002cac8583836200377a565b95945050505050565b6001600160a01b0383163b1562000b2557604051630a85bd0160e11b81526001600160a01b0384169063150b7a029062002cfa90339088908790879060040162004a0f565b6020604051808303816000875af192505050801562002d38575060408051601f3d908101601f1916820190925262002d359181019062004a4e565b60015b62002da6573d80801562002d69576040519150601f19603f3d011682016040523d82523d6000602084013e62002d6e565b606091505b50805160000362002d9e57604051633250574960e11b81526001600160a01b038516600482015260240162000abd565b805181602001fd5b6001600160e01b03198116630a85bd0160e11b1462002de457604051633250574960e11b81526001600160a01b038516600482015260240162000abd565b5050505050565b606082600062002dfd84600262004a6e565b62002e0a906002620043e5565b6001600160401b0381111562002e245762002e2462003e50565b6040519080825280601f01601f19166020018201604052801562002e4f576020820181803683370190505b509050600360fc1b8160008151811062002e6d5762002e6d620043fb565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811062002e9f5762002e9f620043fb565b60200101906001600160f81b031916908160001a905350600062002ec585600262004a6e565b62002ed2906001620043e5565b90505b600181111562002f54576f181899199a1a9b1b9c1cb0b131b232b360811b83600f166010811062002f0a5762002f0a620043fb565b1a60f81b82828151811062002f235762002f23620043fb565b60200101906001600160f81b031916908160001a90535060049290921c9162002f4c8162004a88565b905062002ed5565b50811562002a0c5760405163e22e27eb60e01b8152600481018690526024810185905260440162000abd565b6060600062002f8f83620037de565b60010190506000816001600160401b0381111562002fb15762002fb162003e50565b6040519080825280601f01601f19166020018201604052801562002fdc576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508462002fe657509392505050565b6060620008f16001600160a01b038316601462002deb565b606060405180608001604052806048815260200162005ae260489139905090565b606081516000036200307257505060408051602081019091526000815290565b600060405180606001604052806040815260200162005b2a6040913990506000600384516002620030a49190620043e5565b620030b0919062004aa2565b620030bd90600462004a6e565b6001600160401b03811115620030d757620030d762003e50565b6040519080825280601f01601f19166020018201604052801562003102576020820181803683370190505b50905060018201602082018586518701602081018051600082525b828410156200317a576003840193508351603f8160121c168701518653600186019550603f81600c1c168701518653600186019550603f8160061c168701518653600186019550603f81168701518653506001850194506200311d565b90525050855160039006600181146200319c5760028114620031b057620031b8565b603d6001830353603d6002830353620031b8565b603d60018303535b509195945050505050565b600080600080620031d58686620038bd565b925092509250620031e782826200390e565b5090949350505050565b6001600160a01b0382166200321d57604051633250574960e11b81526000600482015260240162000abd565b60006200322d8383600062002903565b90506001600160a01b0381161562001074576040516339e3563760e11b81526000600482015260240162000abd565b60009081527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930260205260409020546001600160a01b031690565b60008051602062005ac28339815191528180620032bb57506001600160a01b03831615155b1562003387576000620032ce856200286f565b90506001600160a01b03841615801590620032fb5750836001600160a01b0316816001600160a01b031614155b80156200331157506200330f81856200271e565b155b156200333c5760405163a9fbf51f60e01b81526001600160a01b038516600482015260240162000abd565b8215620033855784866001600160a01b0316826001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45b505b600093845260040160205250506040902080546001600160a01b0319166001600160a01b0392909216919091179055565b6000604051836040820152846020820152828152600b8101905060ff815360559020949350505050565b600060008051602062005ac28339815191528162003400856200325c565b90506001600160a01b038416156200341f576200341f818587620039d9565b6001600160a01b0381161562003462576200343f60008660008062003296565b6001600160a01b0381166000908152600383016020526040902080546000190190555b6001600160a01b0386161562003494576001600160a01b03861660009081526003830160205260409020805460010190555b600085815260028301602052604080822080546001600160a01b0319166001600160a01b038a811691821790925591518893918516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a495945050505050565b60008051602062005aa283398151915260006200351384620014b8565b600084815260018401602052604090205490915080821462003569576001600160a01b03851660009081526020848152604080832085845282528083205484845281842081905583526001860190915290208190555b50600092835260018201602090815260408085208590556001600160a01b039095168452918252838320908352905290812055565b60008051602062005b6a8339815191525460008051602062005aa283398151915290600090620035d1906001906200442d565b6000848152600384016020526040812054600285018054939450909284908110620036005762003600620043fb565b9060005260206000200154905080846002018381548110620036265762003626620043fb565b60009182526020808320909101929092558281526003860190915260408082208490558682528120556002840180548062003665576200366562004ac5565b600190038181906000526020600020016000905590555050505050565b60008051602062005aa283398151915260006001620036a185620014b8565b620036ad91906200442d565b6001600160a01b0390941660009081526020838152604080832087845282528083208690559482526001909301909252502055565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff166200152d57604051631afcd79f60e31b815260040160405180910390fd5b6040516200373a9062003bbb565b604051809103906000f08015801562003757573d6000803e3d6000fd5b50600080546001600160a01b0319166001600160a01b0392909216919091179055565b60608262003793576200378d8262003a43565b62000a8f565b8151158015620037ab57506001600160a01b0384163b155b15620037d657604051639996b31560e01b81526001600160a01b038516600482015260240162000abd565b508062000a8f565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106200381e5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef810000000083106200384b576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106200386a57662386f26fc10000830492506010015b6305f5e100831062003883576305f5e100830492506008015b61271083106200389857612710830492506004015b60648310620038ab576064830492506002015b600a8310620008f15760010192915050565b60008060008351604103620038fb5760208401516040850151606086015160001a620038ec8882858562003a6d565b95509550955050505062003907565b50508151600091506002905b9250925092565b600082600381111562003925576200392562004adb565b036200392f575050565b600182600381111562003946576200394662004adb565b03620039655760405163f645eedf60e01b815260040160405180910390fd5b60028260038111156200397c576200397c62004adb565b036200399f5760405163fce698f760e01b81526004810182905260240162000abd565b6003826003811115620039b657620039b662004adb565b03620009ca576040516335e2f38360e21b81526004810182905260240162000abd565b620039e683838362003b41565b62001074576001600160a01b03831662003a1757604051637e27328960e01b81526004810182905260240162000abd565b60405163177e802f60e01b81526001600160a01b03831660048201526024810182905260440162000abd565b80511562003a545780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a084111562003aaa575060009150600390508262003b37565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa15801562003aff573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811662003b2d5750600092506001915082905062003b37565b9250600091508190505b9450945094915050565b60006001600160a01b0383161580159062002a0c5750826001600160a01b0316846001600160a01b0316148062003b7f575062003b7f84846200271e565b8062002a0c5750826001600160a01b031662003b9b83620028ab565b6001600160a01b031614949350505050565b61040a8062004af283390190565b610ba68062004efc83390190565b80356001600160a01b038116811462003be157600080fd5b919050565b60006020828403121562003bf957600080fd5b62000a8f8262003bc9565b6001600160e01b031981168114620027da57600080fd5b60006020828403121562003c2e57600080fd5b813562000a8f8162003c04565b60006020828403121562003c4e57600080fd5b5035919050565b60005b8381101562003c7257818101518382015260200162003c58565b50506000910152565b6000815180845262003c9581602086016020860162003c55565b601f01601f19169290920160200192915050565b60208152600062000a8f602083018462003c7b565b6000806040838503121562003cd257600080fd5b62003cdd8362003bc9565b946020939093013593505050565b60008060006060848603121562003d0157600080fd5b62003d0c8462003bc9565b925062003d1c6020850162003bc9565b9150604084013590509250925092565b6000806040838503121562003d4057600080fd5b8235915062003d526020840162003bc9565b90509250929050565b602081526000825161010080602085015262003d7c61012085018362003c7b565b91506020850151601f198086850301604087015262003d9c848362003c7b565b935060408701519150808685030160608701525062003dbc838262003c7b565b92505060608501516080850152608085015160a085015260a085015162003dee60c08601826001600160801b03169052565b5060c08501516001600160801b03811660e08601525060e08501516001600160a01b038116858301525090949350505050565b6000806040838503121562003e3557600080fd5b62003e408362003bc9565b915062003d526020840162003bc9565b634e487b7160e01b600052604160045260246000fd5b60405161010081016001600160401b038111828210171562003e8c5762003e8c62003e50565b60405290565b600082601f83011262003ea457600080fd5b81356001600160401b038082111562003ec15762003ec162003e50565b604051601f8301601f19908116603f0116810190828211818310171562003eec5762003eec62003e50565b8160405283815286602085880101111562003f0657600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000806040838503121562003f3a57600080fd5b82356001600160401b038082111562003f5257600080fd5b62003f608683870162003e92565b9350602085013591508082111562003f7757600080fd5b5062003f868582860162003e92565b9150509250929050565b6020808252825182820181905260009190848201906040850190845b8181101562003fca5783518352928401929184019160010162003fac565b50909695505050505050565b8015158114620027da57600080fd5b6000806040838503121562003ff957600080fd5b620040048362003bc9565b91506020830135620040168162003fd6565b809150509250929050565b600080602083850312156200403557600080fd5b82356001600160401b03808211156200404d57600080fd5b818501915085601f8301126200406257600080fd5b8135818111156200407257600080fd5b8660208260051b85010111156200408857600080fd5b60209290920196919550909350505050565b600060208083016020845280855180835260408601915060408160051b87010192506020870160005b82811015620040f557603f19888603018452620040e285835162003c7b565b94509285019290850190600101620040c3565b5092979650505050505050565b600080600080608085870312156200411957600080fd5b620041248562003bc9565b9350620041346020860162003bc9565b92506040850135915060608501356001600160401b038111156200415757600080fd5b620041658782880162003e92565b91505092959194509250565b600080600080608085870312156200418857600080fd5b8435935060208501359250620041a16040860162003bc9565b915060608501356001600160401b038111156200415757600080fd5b80356001600160801b038116811462003be157600080fd5b600080600060608486031215620041eb57600080fd5b620041f68462003bc9565b925060208401356001600160401b03808211156200421357600080fd5b9085019061010082880312156200422957600080fd5b6200423362003e66565b8235828111156200424357600080fd5b620042518982860162003e92565b8252506020830135828111156200426757600080fd5b620042758982860162003e92565b6020830152506040830135828111156200428e57600080fd5b6200429c8982860162003e92565b6040830152506060830135606082015260808301356080820152620042c460a08401620041bd565b60a0820152620042d760c08401620041bd565b60c0820152620042ea60e0840162003bc9565b60e08201529497949650505050604092909201359150565b600181811c908216806200431757607f821691505b6020821081036200433857634e487b7160e01b600052602260045260246000fd5b50919050565b6001600160a01b038316815260406020820181905260009062002a0c9083018462003c7b565b600081516200437881856020860162003c55565b9290920192915050565b600083516200439681846020880162003c55565b835190830190620043ac81836020880162003c55565b01949350505050565b600060208284031215620043c857600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b80820180821115620008f157620008f1620043cf565b634e487b7160e01b600052603260045260246000fd5b600060018201620044265762004426620043cf565b5060010190565b81810381811115620008f157620008f1620043cf565b6000808335601e198436030181126200445b57600080fd5b8301803591506001600160401b038211156200447657600080fd5b6020019150368190038213156200448c57600080fd5b9250929050565b828482376000838201600081528351620044b281836020880162003c55565b0195945050505050565b7f7b2274726169745f74797065223a202250726f6d7074222c202276616c75652281526000621d101160e91b80602084015284516200450381602386016020890162003c55565b62089f4b60ea1b60239185019182018190527f7b2274726169745f74797065223a2022536563726574222c202276616c756522602683015260468201929092528451916200455983604984016020890162003c55565b91016049810191909152604c01949350505050565b605b60f81b81527f7b2274726169745f74797065223a202254797065222c202276616c7565223a206001820152601160f91b60218201528551600090620045bd816022850160208b0162003c55565b62089f4b60ea1b6022918401918201528651620045e2816025840160208b0162003c55565b7f7b22646973706c61795f74797065223a202264617465222c202274726169745f602592909101918201527f74797065223a202253746172742064617465222c202276616c7565223a2022006045820152855162004648816064840160208a0162003c55565b6200474162004734620047266200471f620046e2620046d3620046cc6200467d6064898b010162089f4b60ea1b815260030190565b7f7b22646973706c61795f74797065223a202264617465222c202274726169745f81527f74797065223a2022456e642064617465222c202276616c7565223a20220000006020820152603d0190565b8c62004364565b62089f4b60ea1b815260030190565b7f7b2274726169745f74797065223a202257696e6e65722061646472657373222c81526a10113b30b63ab2911d101160a91b6020820152602b0190565b8862004364565b61227d60f01b815260020190565b605d60f81b815260010190565b9998505050505050505050565b607b60f81b815268113730b6b2911d101160b91b600182015285516000906200477f81600a850160208b0162003c55565b6201116160ed1b600a9184019182018190526f113232b9b1b934b83a34b7b7111d101160811b600d8301528751620047bf81601d850160208c0162003c55565b80830192505080601d83015250691134b6b0b3b2911d101160b11b60208201528551620047f481602a840160208a0162003c55565b85519101906200480c81602a84016020890162003c55565b62004741620048656200485e6200484562004836602a86880101632e706e6760e01b815260040190565b6201116160ed1b815260030190565b6c1130ba3a3934b13aba32b9911d60991b8152600d0190565b8762004364565b607d60f81b815260010190565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c000000815260008251620048ac81601d85016020870162003c55565b91909101601d0192915050565b600060208284031215620048cc57600080fd5b815162000a8f8162003fd6565b601f82111562001074576000816000526020600020601f850160051c81016020861015620049045750805b601f850160051c820191505b81811015620024f95782815560010162004910565b81516001600160401b0381111562004941576200494162003e50565b620049598162004952845462004302565b84620048d9565b602080601f831160018114620049915760008415620049785750858301515b600019600386901b1c1916600185901b178555620024f9565b600085815260208120601f198616915b82811015620049c257888601518255948401946001909101908401620049a1565b5085821015620049e15787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6000825162004a0581846020870162003c55565b9190910192915050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009062004a449083018462003c7b565b9695505050505050565b60006020828403121562004a6157600080fd5b815162000a8f8162003c04565b8082028115828204841417620008f157620008f1620043cf565b60008162004a9a5762004a9a620043cf565b506000190190565b60008262004ac057634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052602160045260246000fdfe608060405260405161040a38038061040a83398101604081905261002291610268565b61002c8282610033565b5050610352565b61003c82610092565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a280511561008657610081828261010e565b505050565b61008e610185565b5050565b806001600160a01b03163b6000036100cd57604051634c9c8ce360e01b81526001600160a01b03821660048201526024015b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b03168460405161012b9190610336565b600060405180830381855af49150503d8060008114610166576040519150601f19603f3d011682016040523d82523d6000602084013e61016b565b606091505b50909250905061017c8583836101a6565b95945050505050565b34156101a45760405163b398979f60e01b815260040160405180910390fd5b565b6060826101bb576101b682610205565b6101fe565b81511580156101d257506001600160a01b0384163b155b156101fb57604051639996b31560e01b81526001600160a01b03851660048201526024016100c4565b50805b9392505050565b8051156102155780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b634e487b7160e01b600052604160045260246000fd5b60005b8381101561025f578181015183820152602001610247565b50506000910152565b6000806040838503121561027b57600080fd5b82516001600160a01b038116811461029257600080fd5b60208401519092506001600160401b03808211156102af57600080fd5b818501915085601f8301126102c357600080fd5b8151818111156102d5576102d561022e565b604051601f8201601f19908116603f011681019083821181831017156102fd576102fd61022e565b8160405282815288602084870101111561031657600080fd5b610327836020830160208801610244565b80955050505050509250929050565b60008251610348818460208701610244565b9190910192915050565b60aa806103606000396000f3fe6080604052600a600c565b005b60186014601a565b6051565b565b6000604c7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e808015606f573d6000f35b3d6000fdfea2646970667358221220bd42728c374f7f0ddc17b53ec61cdb40d51094c5fa601cbd894add86d0771b8264736f6c6343000818003360a060405234801561001057600080fd5b50338061003757604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b6100408161004a565b503360805261009a565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b608051610aea6100bc6000396000818161017001526104d40152610aea6000f3fe60806040526004361061007f5760003560e01c8063b61d27f61161004e578063b61d27f61461013e578063c45a01551461015e578063c4d66de814610192578063f2fde38b146101b257600080fd5b8063150b7a021461008b57806347e1da2a146100d5578063715018a6146100f55780638da5cb5b1461010c57600080fd5b3661008657005b600080fd5b34801561009757600080fd5b506100b76100a63660046106e7565b630a85bd0160e11b95945050505050565b6040516001600160e01b031990911681526020015b60405180910390f35b6100e86100e336600461079b565b6101d2565b6040516100cc9190610885565b34801561010157600080fd5b5061010a610461565b005b34801561011857600080fd5b506000546001600160a01b03165b6040516001600160a01b0390911681526020016100cc565b61015161014c3660046108e9565b610475565b6040516100cc9190610943565b34801561016a57600080fd5b506101267f000000000000000000000000000000000000000000000000000000000000000081565b34801561019e57600080fd5b5061010a6101ad36600461095d565b6104c9565b3480156101be57600080fd5b5061010a6101cd36600461095d565b610520565b60606101dc610552565b85821480156101f257508315806101f257508382145b6102385760405162461bcd60e51b81526020600482015260126024820152710eee4dedcce40c2e4e4c2f240d8cadccee8d60731b60448201526064015b60405180910390fd5b8167ffffffffffffffff81111561025157610251610978565b60405190808252806020026020018201604052801561028457816020015b606081526020019060019003908161026f5790505b509050600084900361036a5760005b868110156103645760008888838181106102af576102af61098e565b90506020020160208101906102c4919061095d565b90503660008686858181106102db576102db61098e565b90506020028101906102ed91906109a4565b91509150600061033584600085858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061057f92505050565b90508086868151811061034a5761034a61098e565b602002602001018190525084600101945050505050610293565b50610457565b60005b868110156104555760008888838181106103895761038961098e565b905060200201602081019061039e919061095d565b90503660008686858181106103b5576103b561098e565b90506020028101906103c791906109a4565b915091506000610426848b8b888181106103e3576103e361098e565b9050602002013585858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061057f92505050565b90508086868151811061043b5761043b61098e565b60200260200101819052508460010194505050505061036d565b505b9695505050505050565b610469610552565b6104736000610632565b565b606061047f610552565b6104c0858585858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061057f92505050565b95945050505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105145760405163118cdaa760e01b815233600482015260240161022f565b61051d81610632565b50565b610528610552565b6001600160a01b03811661051457604051631e4fbdf760e01b81526000600482015260240161022f565b6000546001600160a01b031633146104735760405163118cdaa760e01b815233600482015260240161022f565b60606000846001600160a01b0316848460405161059c91906109eb565b60006040518083038185875af1925050503d80600081146105d9576040519150601f19603f3d011682016040523d82523d6000602084013e6105de565b606091505b50925090508061062a576044825110156105f757600080fd5b600482019150818060200190518101906106119190610a07565b60405162461bcd60e51b815260040161022f9190610943565b509392505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80356001600160a01b038116811461069957600080fd5b919050565b60008083601f8401126106b057600080fd5b50813567ffffffffffffffff8111156106c857600080fd5b6020830191508360208285010111156106e057600080fd5b9250929050565b6000806000806000608086880312156106ff57600080fd5b61070886610682565b945061071660208701610682565b935060408601359250606086013567ffffffffffffffff81111561073957600080fd5b6107458882890161069e565b969995985093965092949392505050565b60008083601f84011261076857600080fd5b50813567ffffffffffffffff81111561078057600080fd5b6020830191508360208260051b85010111156106e057600080fd5b600080600080600080606087890312156107b457600080fd5b863567ffffffffffffffff808211156107cc57600080fd5b6107d88a838b01610756565b909850965060208901359150808211156107f157600080fd5b6107fd8a838b01610756565b9096509450604089013591508082111561081657600080fd5b5061082389828a01610756565b979a9699509497509295939492505050565b60005b83811015610850578181015183820152602001610838565b50506000910152565b60008151808452610871816020860160208601610835565b601f01601f19169290920160200192915050565b600060208083016020845280855180835260408601915060408160051b87010192506020870160005b828110156108dc57603f198886030184526108ca858351610859565b945092850192908501906001016108ae565b5092979650505050505050565b600080600080606085870312156108ff57600080fd5b61090885610682565b935060208501359250604085013567ffffffffffffffff81111561092b57600080fd5b6109378782880161069e565b95989497509550505050565b6020815260006109566020830184610859565b9392505050565b60006020828403121561096f57600080fd5b61095682610682565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000808335601e198436030181126109bb57600080fd5b83018035915067ffffffffffffffff8211156109d657600080fd5b6020019150368190038213156106e057600080fd5b600082516109fd818460208701610835565b9190910192915050565b600060208284031215610a1957600080fd5b815167ffffffffffffffff80821115610a3157600080fd5b818401915084601f830112610a4557600080fd5b815181811115610a5757610a57610978565b604051601f8201601f19908116603f01168101908382118183101715610a7f57610a7f610978565b81604052828152876020848701011115610a9857600080fd5b610aa9836020830160208801610835565b97965050505050505056fea26469706673582212209388cc9441e0986bee120b32be1c29eda96e129a50bcb254300c50efe2aac76364736f6c63430008180033645e039705490088daad89bae25049a34f4a9072d398537b1ab2425f24cbed0080bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930068747470733a2f2f7261772e67697468756275736572636f6e74656e742e636f6d2f70726f6d70746f7765722f7765626170702f6d61696e2f7372632f6173736574732f6e66742f4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f645e039705490088daad89bae25049a34f4a9072d398537b1ab2425f24cbed02a26469706673582212209806f4695177392d95c50d803f661803c0627a402b2916094032b9b05b081a6d64736f6c63430008180033",u="0x60806040523480156200001157600080fd5b5060043610620003695760003560e01c8063715018a611620001dc578063b23e44801162000119578063e715de2811620000af578063f2fde38b1162000086578063f2fde38b1462000888578063f9bc3f40146200089f578063fe7f43da14620008a9578063fe9eba1514620008c057600080fd5b8063e715de281462000850578063e985e9c51462000867578063ef792662146200087e57600080fd5b8063c516e15611620000f0578063c516e1561462000805578063c87b56dd146200080e578063d2da7bca1462000825578063d3c6fd90146200083957600080fd5b8063b23e448014620007b4578063b66f7a8b14620007d7578063b88d4fde14620007ee57600080fd5b806395d89b41116200018f5780639dd3e25511620001665780639dd3e255146200072e578063a22cb4651462000751578063a7cd52cb1462000768578063ac9650d8146200078e57600080fd5b806395d89b4114620006f657806395ecc64214620007005780639859387b146200071757600080fd5b8063715018a6146200065e57806374de69e314620006685780637b80e8e6146200067f57806385604ba41462000688578063867211f314620006ae5780638da5cb5b14620006c557600080fd5b8063415fa50a11620002ab57806354c87af4116200025e5780636352211e11620002355780636352211e14620005f3578063676db981146200060a5780636a627842146200063057806370a08231146200064757600080fd5b806354c87af414620005a25780635872fe4514620005c55780635f6928e214620005dc57600080fd5b8063415fa50a146200050c57806342842e0e146200052f578063485cc95514620005465780634cd88b76146200055d5780634f6ccce71462000574578063502c040b146200058b57600080fd5b80630d253d76116200032157806323b872dd11620002f857806323b872dd14620004a157806324d7356714620004b8578063277ecfbb14620004cf5780632f745c5914620004f557600080fd5b80630d253d76146200045f57806311464fbe146200047657806318160ddd146200048a57600080fd5b80627c94b6146200036e57806301ffc9a714620003a45780630661d1dc14620003cc57806306fdde0314620003fd578063081812fc1462000416578063095ea7b31462000446575b600080fd5b620003916200037f36600462003be6565b600a6020526000908152604090205481565b6040519081526020015b60405180910390f35b620003bb620003b536600462003c1b565b620008c9565b60405190151581526020016200039b565b620003bb620003dd36600462003c3b565b6000908152600360205260409020600601546001600160a01b0316151590565b62000407620008f7565b6040516200039b919062003ca9565b6200042d6200042736600462003c3b565b620009a4565b6040516001600160a01b0390911681526020016200039b565b6200045d6200045736600462003cbe565b620009bd565b005b6200042d6200047036600462003cbe565b620009ce565b6000546200042d906001600160a01b031681565b60008051602062005b6a8339815191525462000391565b6200045d620004b236600462003ceb565b62000a96565b6200045d620004c936600462003d2c565b62000b2b565b620004e6620004e036600462003c3b565b62000d64565b6040516200039b919062003d5b565b620003916200050636600462003cbe565b62000fde565b620003916200051d36600462003be6565b600b6020526000908152604090205481565b6200045d6200054036600462003ceb565b62001057565b6200045d6200055736600462003e21565b62001079565b6200045d6200056e36600462003f26565b6200120c565b620003916200058536600462003c3b565b620012e8565b620003bb6200059c36600462003d2c565b62001368565b62000391620005b336600462003c3b565b60066020526000908152604090205481565b6200042d620005d636600462003be6565b620013e2565b6200045d620005ed36600462003be6565b62001445565b6200042d6200060436600462003c3b565b62001473565b620003bb6200061b36600462003be6565b600c6020526000908152604090205460ff1681565b620003916200064136600462003be6565b62001480565b620003916200065836600462003be6565b620014b8565b6200045d62001517565b620003916200067936600462003cbe565b6200152f565b600d5462000391565b6200069f6200069936600462003be6565b62001561565b6040516200039b919062003f90565b6200045d620006bf36600462003be6565b620015cf565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b03166200042d565b62000407620015fa565b620003bb6200071136600462003c3b565b6200163c565b6200042d6200072836600462003be6565b6200189d565b620003916200073f36600462003c3b565b60056020526000908152604090205481565b6200045d6200076236600462003fe5565b6200197a565b620003bb6200077936600462003be6565b60046020526000908152604090205460ff1681565b620007a56200079f36600462004021565b62001987565b6040516200039b91906200409a565b62000391620007c536600462003be6565b60016020526000908152604090205481565b620003bb620007e836600462003c3b565b62001a81565b6200045d620007ff36600462004102565b62001cc8565b60075462000391565b620004076200081f36600462003c3b565b62001ce3565b6002546200042d906001600160a01b031681565b6200045d6200084a36600462004171565b62002079565b6200039162000861366004620041d5565b62002501565b620003bb6200087836600462003e21565b6200271e565b620003916200276b565b6200045d6200089936600462003be6565b62002799565b62000391620027dd565b6200042d620008ba36600462003c3b565b620027f1565b60085462000391565b60006001600160e01b0319821663780e9d6360e01b1480620008f15750620008f1826200281c565b92915050565b60008051602062005ac283398151915280546060919081906200091a9062004302565b80601f0160208091040260200160405190810160405280929190818152602001828054620009489062004302565b8015620009995780601f106200096d5761010080835404028352916020019162000999565b820191906000526020600020905b8154815290600101906020018083116200097b57829003601f168201915b505050505091505090565b6000620009b1826200286f565b50620008f182620028ab565b620009ca828233620028e5565b5050565b600062000a8f8260001b60405180602001620009ea9062003bad565b601f1982820381018352601f9091011660408190526000546001600160a01b03888116602484015216906044015b60408051601f19818403018152918152602080830180516001600160e01b031663189acdbd60e31b179052905162000a53939291016200433e565b60408051601f198184030181529082905262000a73929160200162004382565b60405160208183030381529060405280519060200120620028f4565b9392505050565b6001600160a01b03821662000ac657604051633250574960e11b8152600060048201526024015b60405180910390fd5b600062000ad583833362002903565b9050836001600160a01b0316816001600160a01b03161462000b25576040516364283d7b60e01b81526001600160a01b038086166004830152602482018490528216604482015260640162000abd565b50505050565b3360009081526004602052604090205460ff1662000b7b5760405162461bcd60e51b815260206004820152600c60248201526b2737ba1030b63637bbb2b21760a11b604482015260640162000abd565b60008281526003602052604090206005810154426001600160801b03909116111562000bd55760405162461bcd60e51b81526020600482015260086024820152672737ba103cb2ba1760c11b604482015260640162000abd565b600581015442600160801b9091046001600160801b0316101562000c285760405162461bcd60e51b815260206004820152600960248201526827baba3230ba32b21760b91b604482015260640162000abd565b60068101546001600160a01b03161562000c775760405162461bcd60e51b815260206004820152600f60248201526e20b63932b0b23c9039b7b63b32b21760891b604482015260640162000abd565b6040516370a0823160e01b81526001600160a01b0384811660048301528316906370a0823190602401602060405180830381865afa15801562000cbe573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000ce49190620043b5565b60000362000d275760405162461bcd60e51b815260206004820152600f60248201526e2430bb32903737903130b233b2b99760891b604482015260640162000abd565b6006810180546001600160a01b0319166001600160a01b03179055600880546001919060009062000d5a908490620043e5565b9091555050505050565b604080516101008101825260608082526020820181905291810182905260009181018290526080810182905260a0810182905260c0810182905260e0810191909152600082815260036020526040908190208151610100810190925280548290829062000dd19062004302565b80601f016020809104026020016040519081016040528092919081815260200182805462000dff9062004302565b801562000e505780601f1062000e245761010080835404028352916020019162000e50565b820191906000526020600020905b81548152906001019060200180831162000e3257829003601f168201915b5050505050815260200160018201805462000e6b9062004302565b80601f016020809104026020016040519081016040528092919081815260200182805462000e999062004302565b801562000eea5780601f1062000ebe5761010080835404028352916020019162000eea565b820191906000526020600020905b81548152906001019060200180831162000ecc57829003601f168201915b5050505050815260200160028201805462000f059062004302565b80601f016020809104026020016040519081016040528092919081815260200182805462000f339062004302565b801562000f845780601f1062000f585761010080835404028352916020019162000f84565b820191906000526020600020905b81548152906001019060200180831162000f6657829003601f168201915b5050509183525050600382015460208201526004820154604082015260058201546001600160801b038082166060840152600160801b9091041660808201526006909101546001600160a01b031660a09091015292915050565b600060008051602062005aa283398151915262000ffb84620014b8565b83106200102e5760405163295f44f760e21b81526001600160a01b03851660048201526024810184905260440162000abd565b6001600160a01b0384166000908152602091825260408082208583529092522054905092915050565b620010748383836040518060200160405280600081525062001cc8565b505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff1615906001600160401b0316600081158015620010bf5750825b90506000826001600160401b03166001148015620010dc5750303b155b905081158015620010eb575080155b156200110a5760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff1916600117855583156200113557845460ff60401b1916600160401b1785555b620011916040518060400160405280601781526020017f436170747572652d7468652d50726f6d70742047616d650000000000000000008152506040518060400160405280600381526020016204354560ec1b81525062002a14565b6200119b62002a4c565b620011a562002a56565b620011b08762002a6a565b620011bc878762002a74565b83156200120357845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50505050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff1615906001600160401b0316600081158015620012525750825b90506000826001600160401b031660011480156200126f5750303b155b9050811580156200127e575080155b156200129d5760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff191660011785558315620012c857845460ff60401b1916600160401b1785555b620012d4878762002a14565b620012de62002a4c565b620011bc62002a56565b600060008051602062005aa28339815191526200131260008051602062005b6a8339815191525490565b83106200133d5760405163295f44f760e21b8152600060048201526024810184905260440162000abd565b806002018381548110620013555762001355620043fb565b9060005260206000200154915050919050565b6040516370a0823160e01b81526001600160a01b038381166004830152600091908316906370a0823190602401602060405180830381865afa158015620013b3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620013d99190620043b5565b15159392505050565b6001600160a01b0381166000908152600160209081526040808320549051620008f1926200141290820162003bad565b601f1982820381018352601f9091011660408190526000546001600160a01b038781166024840152169060440162000a18565b6200144f62002ab6565b6001600160a01b03166000908152600460205260409020805460ff19166001179055565b6000620008f1826200286f565b60405162461bcd60e51b81526020600482015260096024820152682234b9b0b13632b21760b91b604482015260009060640162000abd565b600060008051602062005ac28339815191526001600160a01b038316620014f6576040516322718ad960e21b81526000600482015260240162000abd565b6001600160a01b039092166000908152600390920160205250604090205490565b6200152162002ab6565b6200152d600062002b14565b565b600960205281600052604060002081815481106200154c57600080fd5b90600052602060002001600091509150505481565b6001600160a01b038116600090815260096020908152604091829020805483518184028101840190945280845260609392830182828015620015c357602002820191906000526020600020905b815481526020019060010190808311620015ae575b50505050509050919050565b620015d962002ab6565b6001600160a01b03166000908152600460205260409020805460ff19169055565b7f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079301805460609160008051602062005ac2833981519152916200091a9062004302565b60008181526003602052604080822081516101008101909252805483929190829082906200166a9062004302565b80601f0160208091040260200160405190810160405280929190818152602001828054620016989062004302565b8015620016e95780601f10620016bd57610100808354040283529160200191620016e9565b820191906000526020600020905b815481529060010190602001808311620016cb57829003601f168201915b50505050508152602001600182018054620017049062004302565b80601f0160208091040260200160405190810160405280929190818152602001828054620017329062004302565b8015620017835780601f10620017575761010080835404028352916020019162001783565b820191906000526020600020905b8154815290600101906020018083116200176557829003601f168201915b505050505081526020016002820180546200179e9062004302565b80601f0160208091040260200160405190810160405280929190818152602001828054620017cc9062004302565b80156200181d5780601f10620017f1576101008083540402835291602001916200181d565b820191906000526020600020905b815481529060010190602001808311620017ff57829003601f168201915b5050509183525050600382015460208201526004820154604082015260058201546001600160801b038082166060840152600160801b909104811660808301526006909201546001600160a01b031660a0918201528201519192504291161180159062000a8f5750428160c001516001600160801b031610159392505050565b600080620018ab83620013e2565b90506001600160a01b0381163b8015620018c6575092915050565b6001600160a01b0384166000908152600160205260408120805491620018ec8362004411565b909155506000546040516001600160a01b0387811660248301529091169060440160408051601f198184030181529181526020820180516001600160e01b031663189acdbd60e31b17905251620019439062003bad565b620019509291906200433e565b8190604051809103906000f590508015801562001971573d6000803e3d6000fd5b50949350505050565b620009ca33838362002b85565b604080516000815260208101909152606090826001600160401b03811115620019b457620019b462003e50565b604051908082528060200260200182016040528015620019e957816020015b6060815260200190600190039081620019d35790505b50915060005b8381101562001a795762001a503086868481811062001a125762001a12620043fb565b905060200281019062001a26919062004443565b8560405160200162001a3b9392919062004493565b60405160208183030381529060405262002c39565b83828151811062001a655762001a65620043fb565b6020908102919091010152600101620019ef565b505092915050565b600081815260036020526040808220815161010081019092528054839291908290829062001aaf9062004302565b80601f016020809104026020016040519081016040528092919081815260200182805462001add9062004302565b801562001b2e5780601f1062001b025761010080835404028352916020019162001b2e565b820191906000526020600020905b81548152906001019060200180831162001b1057829003601f168201915b5050505050815260200160018201805462001b499062004302565b80601f016020809104026020016040519081016040528092919081815260200182805462001b779062004302565b801562001bc85780601f1062001b9c5761010080835404028352916020019162001bc8565b820191906000526020600020905b81548152906001019060200180831162001baa57829003601f168201915b5050505050815260200160028201805462001be39062004302565b80601f016020809104026020016040519081016040528092919081815260200182805462001c119062004302565b801562001c625780601f1062001c365761010080835404028352916020019162001c62565b820191906000526020600020905b81548152906001019060200180831162001c4457829003601f168201915b5050509183525050600382015460208201526004820154604082015260058201546001600160801b038082166060840152600160801b909104811660808301526006909201546001600160a01b031660a09091015260c090910151429116109392505050565b62001cd584848462000a96565b62000b258484848462002cb5565b606062001cf0826200286f565b506000828152600360205260408082208151610100810190925280548290829062001d1b9062004302565b80601f016020809104026020016040519081016040528092919081815260200182805462001d499062004302565b801562001d9a5780601f1062001d6e5761010080835404028352916020019162001d9a565b820191906000526020600020905b81548152906001019060200180831162001d7c57829003601f168201915b5050505050815260200160018201805462001db59062004302565b80601f016020809104026020016040519081016040528092919081815260200182805462001de39062004302565b801562001e345780601f1062001e085761010080835404028352916020019162001e34565b820191906000526020600020905b81548152906001019060200180831162001e1657829003601f168201915b5050505050815260200160028201805462001e4f9062004302565b80601f016020809104026020016040519081016040528092919081815260200182805462001e7d9062004302565b801562001ece5780601f1062001ea25761010080835404028352916020019162001ece565b820191906000526020600020905b81548152906001019060200180831162001eb057829003601f168201915b505050918352505060038201546020808301919091526004830154604083015260058301546001600160801b03808216606080860191909152600160801b9092041660808401526006909301546001600160a01b031660a09092019190915282820151929350909160009162001f45919062002deb565b608084015162001f5790602062002deb565b60405160200162001f6a929190620044bc565b604051602081830303815290604052905082604001518162001f998560a001516001600160801b031662002f80565b62001fb18660c001516001600160801b031662002f80565b62001fc98760e001516001600160a01b031662003019565b60405160200162001fdf9594939291906200456e565b6040516020818303038152906040529150506200204f826000015183602001516200200962003031565b600088815260066020526040902054620020239062002f80565b856040516020016200203a9594939291906200474e565b60405160208183030381529060405262003052565b60405160200162002061919062004872565b60405160208183030381529060405292505050919050565b3360009081526004602052604090205460ff16620020c95760405162461bcd60e51b815260206004820152600c60248201526b2737ba1030b63637bbb2b21760a11b604482015260640162000abd565b604080516020808201879052818301869052825180830384018152606090920190925280519101207f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c90206001600160a01b038316620021378284620031c3565b6001600160a01b031614620021845760405162461bcd60e51b815260206004820152601260248201527124b73b30b634b21039b4b3b730ba3ab9329760711b604482015260640162000abd565b6000858152600360209081526040918290208251918201879052910160405160208183030381529060405280519060200120816004015414620022005760405162461bcd60e51b815260206004820152601360248201527224b73b30b634b21039b2b1b932ba2430b9b41760691b604482015260640162000abd565b6005810154426001600160801b0390911611156200224c5760405162461bcd60e51b81526020600482015260086024820152672737ba103cb2ba1760c11b604482015260640162000abd565b600581015442600160801b9091046001600160801b031610156200229f5760405162461bcd60e51b815260206004820152600960248201526827baba3230ba32b21760b91b604482015260640162000abd565b60068101546001600160a01b031615620022ee5760405162461bcd60e51b815260206004820152600f60248201526e20b63932b0b23c9039b7b63b32b21760891b604482015260640162000abd565b6006810180546001600160a01b0319166001600160a01b038616179055600780546001919060009062002323908490620043e5565b90915550506001600160a01b0384166000818152600960209081526040808320805460018181018355918552838520018b9055938352600a9091528120805490919062002372908490620043e5565b90915550506002546040516370a0823160e01b81526001600160a01b038881166004830152909116906370a0823190602401602060405180830381865afa158015620023c2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620023e89190620043b5565b6001600160a01b0385166000908152600b60205260408120805490919062002412908490620043e5565b909155505060405163189acdbd60e31b81526001600160a01b03858116600483015287169063c4d66de890602401600060405180830381600087803b1580156200245b57600080fd5b505af115801562002470573d6000803e3d6000fd5b505050506001600160a01b0384166000908152600c602052604090205460ff16620024f957600d805460018082019092557fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb50180546001600160a01b0319166001600160a01b0387169081179091556000908152600c60205260409020805460ff191690911790555b505050505050565b6000806200250f856200189d565b9050806001600160a01b03169150620025298583620031f1565b8215620025c0576002546001600160a01b03166323b872dd336040516001600160e01b031960e084901b1681526001600160a01b0391821660048201529084166024820152604481018690526064016020604051808303816000875af115801562002598573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620025be9190620048b9565b505b5060006001620025dd60008051602062005b6a8339815191525490565b620025e991906200442d565b600081815260056020908152604080832086905585835260068252808320939093558251610100810184528751815287820151818301528784015181850152606080890151908201526080808901519082015260a0808901516001600160801b039081169183019190915260c0808a01519091169082015260e081018390528583526003909152919020815191925090819062002687908262004925565b50602082015160018201906200269e908262004925565b5060408201516002820190620026b5908262004925565b50606082015160038201556080820151600482015560a082015160c08301516001600160801b03908116600160801b02911617600582015560e090910151600690910180546001600160a01b039092166001600160a01b03199092169190911790559392505050565b6001600160a01b0391821660009081527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab00793056020908152604080832093909416825291909152205460ff1690565b600062002777620027dd565b60008051602062005b6a833981519152546200279491906200442d565b905090565b620027a362002ab6565b6001600160a01b038116620027cf57604051631e4fbdf760e01b81526000600482015260240162000abd565b620027da8162002b14565b50565b6000600854600754620027949190620043e5565b600d81815481106200280257600080fd5b6000918252602090912001546001600160a01b0316905081565b60006001600160e01b031982166380ac58cd60e01b14806200284e57506001600160e01b03198216635b5e139f60e01b145b80620008f157506301ffc9a760e01b6001600160e01b0319831614620008f1565b6000806200287d836200325c565b90506001600160a01b038116620008f157604051637e27328960e01b81526004810184905260240162000abd565b60009081527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930460205260409020546001600160a01b031690565b62001074838383600162003296565b600062000a8f838330620033b8565b60008062002913858585620033e2565b90506001600160a01b038116620029a0576200299a8460008051602062005b6a833981519152805460008381527f645e039705490088daad89bae25049a34f4a9072d398537b1ab2425f24cbed0360205260408120829055600182018355919091527fa42f15e5d656f8155fd7419d740a6073999f19cd6e061449ce4a257150545bf20155565b620029c6565b846001600160a01b0316816001600160a01b031614620029c657620029c68185620034f6565b6001600160a01b038516620029e657620029e0846200359e565b62002a0c565b846001600160a01b0316816001600160a01b03161462002a0c5762002a0c858562003682565b949350505050565b62002a1e620036e2565b60008051602062005ac28339815191528062002a3b848262004925565b506001810162000b25838262004925565b6200152d620036e2565b62002a60620036e2565b6200152d6200372c565b620027a3620036e2565b62002a7e620036e2565b600280546001600160a01b0319166001600160a01b03928316179055166000908152600460205260409020805460ff19166001179055565b3362002ae97f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b0316146200152d5760405163118cdaa760e01b815233600482015260240162000abd565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b60008051602062005ac28339815191526001600160a01b03831662002bc957604051630b61174360e31b81526001600160a01b038416600482015260240162000abd565b6001600160a01b038481166000818152600584016020908152604080832094881680845294825291829020805460ff191687151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a350505050565b6060600080846001600160a01b03168460405162002c589190620049f1565b600060405180830381855af49150503d806000811462002c95576040519150601f19603f3d011682016040523d82523d6000602084013e62002c9a565b606091505b509150915062002cac8583836200377a565b95945050505050565b6001600160a01b0383163b1562000b2557604051630a85bd0160e11b81526001600160a01b0384169063150b7a029062002cfa90339088908790879060040162004a0f565b6020604051808303816000875af192505050801562002d38575060408051601f3d908101601f1916820190925262002d359181019062004a4e565b60015b62002da6573d80801562002d69576040519150601f19603f3d011682016040523d82523d6000602084013e62002d6e565b606091505b50805160000362002d9e57604051633250574960e11b81526001600160a01b038516600482015260240162000abd565b805181602001fd5b6001600160e01b03198116630a85bd0160e11b1462002de457604051633250574960e11b81526001600160a01b038516600482015260240162000abd565b5050505050565b606082600062002dfd84600262004a6e565b62002e0a906002620043e5565b6001600160401b0381111562002e245762002e2462003e50565b6040519080825280601f01601f19166020018201604052801562002e4f576020820181803683370190505b509050600360fc1b8160008151811062002e6d5762002e6d620043fb565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811062002e9f5762002e9f620043fb565b60200101906001600160f81b031916908160001a905350600062002ec585600262004a6e565b62002ed2906001620043e5565b90505b600181111562002f54576f181899199a1a9b1b9c1cb0b131b232b360811b83600f166010811062002f0a5762002f0a620043fb565b1a60f81b82828151811062002f235762002f23620043fb565b60200101906001600160f81b031916908160001a90535060049290921c9162002f4c8162004a88565b905062002ed5565b50811562002a0c5760405163e22e27eb60e01b8152600481018690526024810185905260440162000abd565b6060600062002f8f83620037de565b60010190506000816001600160401b0381111562002fb15762002fb162003e50565b6040519080825280601f01601f19166020018201604052801562002fdc576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508462002fe657509392505050565b6060620008f16001600160a01b038316601462002deb565b606060405180608001604052806048815260200162005ae260489139905090565b606081516000036200307257505060408051602081019091526000815290565b600060405180606001604052806040815260200162005b2a6040913990506000600384516002620030a49190620043e5565b620030b0919062004aa2565b620030bd90600462004a6e565b6001600160401b03811115620030d757620030d762003e50565b6040519080825280601f01601f19166020018201604052801562003102576020820181803683370190505b50905060018201602082018586518701602081018051600082525b828410156200317a576003840193508351603f8160121c168701518653600186019550603f81600c1c168701518653600186019550603f8160061c168701518653600186019550603f81168701518653506001850194506200311d565b90525050855160039006600181146200319c5760028114620031b057620031b8565b603d6001830353603d6002830353620031b8565b603d60018303535b509195945050505050565b600080600080620031d58686620038bd565b925092509250620031e782826200390e565b5090949350505050565b6001600160a01b0382166200321d57604051633250574960e11b81526000600482015260240162000abd565b60006200322d8383600062002903565b90506001600160a01b0381161562001074576040516339e3563760e11b81526000600482015260240162000abd565b60009081527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930260205260409020546001600160a01b031690565b60008051602062005ac28339815191528180620032bb57506001600160a01b03831615155b1562003387576000620032ce856200286f565b90506001600160a01b03841615801590620032fb5750836001600160a01b0316816001600160a01b031614155b80156200331157506200330f81856200271e565b155b156200333c5760405163a9fbf51f60e01b81526001600160a01b038516600482015260240162000abd565b8215620033855784866001600160a01b0316826001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45b505b600093845260040160205250506040902080546001600160a01b0319166001600160a01b0392909216919091179055565b6000604051836040820152846020820152828152600b8101905060ff815360559020949350505050565b600060008051602062005ac28339815191528162003400856200325c565b90506001600160a01b038416156200341f576200341f818587620039d9565b6001600160a01b0381161562003462576200343f60008660008062003296565b6001600160a01b0381166000908152600383016020526040902080546000190190555b6001600160a01b0386161562003494576001600160a01b03861660009081526003830160205260409020805460010190555b600085815260028301602052604080822080546001600160a01b0319166001600160a01b038a811691821790925591518893918516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a495945050505050565b60008051602062005aa283398151915260006200351384620014b8565b600084815260018401602052604090205490915080821462003569576001600160a01b03851660009081526020848152604080832085845282528083205484845281842081905583526001860190915290208190555b50600092835260018201602090815260408085208590556001600160a01b039095168452918252838320908352905290812055565b60008051602062005b6a8339815191525460008051602062005aa283398151915290600090620035d1906001906200442d565b6000848152600384016020526040812054600285018054939450909284908110620036005762003600620043fb565b9060005260206000200154905080846002018381548110620036265762003626620043fb565b60009182526020808320909101929092558281526003860190915260408082208490558682528120556002840180548062003665576200366562004ac5565b600190038181906000526020600020016000905590555050505050565b60008051602062005aa283398151915260006001620036a185620014b8565b620036ad91906200442d565b6001600160a01b0390941660009081526020838152604080832087845282528083208690559482526001909301909252502055565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff166200152d57604051631afcd79f60e31b815260040160405180910390fd5b6040516200373a9062003bbb565b604051809103906000f08015801562003757573d6000803e3d6000fd5b50600080546001600160a01b0319166001600160a01b0392909216919091179055565b60608262003793576200378d8262003a43565b62000a8f565b8151158015620037ab57506001600160a01b0384163b155b15620037d657604051639996b31560e01b81526001600160a01b038516600482015260240162000abd565b508062000a8f565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106200381e5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef810000000083106200384b576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106200386a57662386f26fc10000830492506010015b6305f5e100831062003883576305f5e100830492506008015b61271083106200389857612710830492506004015b60648310620038ab576064830492506002015b600a8310620008f15760010192915050565b60008060008351604103620038fb5760208401516040850151606086015160001a620038ec8882858562003a6d565b95509550955050505062003907565b50508151600091506002905b9250925092565b600082600381111562003925576200392562004adb565b036200392f575050565b600182600381111562003946576200394662004adb565b03620039655760405163f645eedf60e01b815260040160405180910390fd5b60028260038111156200397c576200397c62004adb565b036200399f5760405163fce698f760e01b81526004810182905260240162000abd565b6003826003811115620039b657620039b662004adb565b03620009ca576040516335e2f38360e21b81526004810182905260240162000abd565b620039e683838362003b41565b62001074576001600160a01b03831662003a1757604051637e27328960e01b81526004810182905260240162000abd565b60405163177e802f60e01b81526001600160a01b03831660048201526024810182905260440162000abd565b80511562003a545780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a084111562003aaa575060009150600390508262003b37565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa15801562003aff573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811662003b2d5750600092506001915082905062003b37565b9250600091508190505b9450945094915050565b60006001600160a01b0383161580159062002a0c5750826001600160a01b0316846001600160a01b0316148062003b7f575062003b7f84846200271e565b8062002a0c5750826001600160a01b031662003b9b83620028ab565b6001600160a01b031614949350505050565b61040a8062004af283390190565b610ba68062004efc83390190565b80356001600160a01b038116811462003be157600080fd5b919050565b60006020828403121562003bf957600080fd5b62000a8f8262003bc9565b6001600160e01b031981168114620027da57600080fd5b60006020828403121562003c2e57600080fd5b813562000a8f8162003c04565b60006020828403121562003c4e57600080fd5b5035919050565b60005b8381101562003c7257818101518382015260200162003c58565b50506000910152565b6000815180845262003c9581602086016020860162003c55565b601f01601f19169290920160200192915050565b60208152600062000a8f602083018462003c7b565b6000806040838503121562003cd257600080fd5b62003cdd8362003bc9565b946020939093013593505050565b60008060006060848603121562003d0157600080fd5b62003d0c8462003bc9565b925062003d1c6020850162003bc9565b9150604084013590509250925092565b6000806040838503121562003d4057600080fd5b8235915062003d526020840162003bc9565b90509250929050565b602081526000825161010080602085015262003d7c61012085018362003c7b565b91506020850151601f198086850301604087015262003d9c848362003c7b565b935060408701519150808685030160608701525062003dbc838262003c7b565b92505060608501516080850152608085015160a085015260a085015162003dee60c08601826001600160801b03169052565b5060c08501516001600160801b03811660e08601525060e08501516001600160a01b038116858301525090949350505050565b6000806040838503121562003e3557600080fd5b62003e408362003bc9565b915062003d526020840162003bc9565b634e487b7160e01b600052604160045260246000fd5b60405161010081016001600160401b038111828210171562003e8c5762003e8c62003e50565b60405290565b600082601f83011262003ea457600080fd5b81356001600160401b038082111562003ec15762003ec162003e50565b604051601f8301601f19908116603f0116810190828211818310171562003eec5762003eec62003e50565b8160405283815286602085880101111562003f0657600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000806040838503121562003f3a57600080fd5b82356001600160401b038082111562003f5257600080fd5b62003f608683870162003e92565b9350602085013591508082111562003f7757600080fd5b5062003f868582860162003e92565b9150509250929050565b6020808252825182820181905260009190848201906040850190845b8181101562003fca5783518352928401929184019160010162003fac565b50909695505050505050565b8015158114620027da57600080fd5b6000806040838503121562003ff957600080fd5b620040048362003bc9565b91506020830135620040168162003fd6565b809150509250929050565b600080602083850312156200403557600080fd5b82356001600160401b03808211156200404d57600080fd5b818501915085601f8301126200406257600080fd5b8135818111156200407257600080fd5b8660208260051b85010111156200408857600080fd5b60209290920196919550909350505050565b600060208083016020845280855180835260408601915060408160051b87010192506020870160005b82811015620040f557603f19888603018452620040e285835162003c7b565b94509285019290850190600101620040c3565b5092979650505050505050565b600080600080608085870312156200411957600080fd5b620041248562003bc9565b9350620041346020860162003bc9565b92506040850135915060608501356001600160401b038111156200415757600080fd5b620041658782880162003e92565b91505092959194509250565b600080600080608085870312156200418857600080fd5b8435935060208501359250620041a16040860162003bc9565b915060608501356001600160401b038111156200415757600080fd5b80356001600160801b038116811462003be157600080fd5b600080600060608486031215620041eb57600080fd5b620041f68462003bc9565b925060208401356001600160401b03808211156200421357600080fd5b9085019061010082880312156200422957600080fd5b6200423362003e66565b8235828111156200424357600080fd5b620042518982860162003e92565b8252506020830135828111156200426757600080fd5b620042758982860162003e92565b6020830152506040830135828111156200428e57600080fd5b6200429c8982860162003e92565b6040830152506060830135606082015260808301356080820152620042c460a08401620041bd565b60a0820152620042d760c08401620041bd565b60c0820152620042ea60e0840162003bc9565b60e08201529497949650505050604092909201359150565b600181811c908216806200431757607f821691505b6020821081036200433857634e487b7160e01b600052602260045260246000fd5b50919050565b6001600160a01b038316815260406020820181905260009062002a0c9083018462003c7b565b600081516200437881856020860162003c55565b9290920192915050565b600083516200439681846020880162003c55565b835190830190620043ac81836020880162003c55565b01949350505050565b600060208284031215620043c857600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b80820180821115620008f157620008f1620043cf565b634e487b7160e01b600052603260045260246000fd5b600060018201620044265762004426620043cf565b5060010190565b81810381811115620008f157620008f1620043cf565b6000808335601e198436030181126200445b57600080fd5b8301803591506001600160401b038211156200447657600080fd5b6020019150368190038213156200448c57600080fd5b9250929050565b828482376000838201600081528351620044b281836020880162003c55565b0195945050505050565b7f7b2274726169745f74797065223a202250726f6d7074222c202276616c75652281526000621d101160e91b80602084015284516200450381602386016020890162003c55565b62089f4b60ea1b60239185019182018190527f7b2274726169745f74797065223a2022536563726574222c202276616c756522602683015260468201929092528451916200455983604984016020890162003c55565b91016049810191909152604c01949350505050565b605b60f81b81527f7b2274726169745f74797065223a202254797065222c202276616c7565223a206001820152601160f91b60218201528551600090620045bd816022850160208b0162003c55565b62089f4b60ea1b6022918401918201528651620045e2816025840160208b0162003c55565b7f7b22646973706c61795f74797065223a202264617465222c202274726169745f602592909101918201527f74797065223a202253746172742064617465222c202276616c7565223a2022006045820152855162004648816064840160208a0162003c55565b6200474162004734620047266200471f620046e2620046d3620046cc6200467d6064898b010162089f4b60ea1b815260030190565b7f7b22646973706c61795f74797065223a202264617465222c202274726169745f81527f74797065223a2022456e642064617465222c202276616c7565223a20220000006020820152603d0190565b8c62004364565b62089f4b60ea1b815260030190565b7f7b2274726169745f74797065223a202257696e6e65722061646472657373222c81526a10113b30b63ab2911d101160a91b6020820152602b0190565b8862004364565b61227d60f01b815260020190565b605d60f81b815260010190565b9998505050505050505050565b607b60f81b815268113730b6b2911d101160b91b600182015285516000906200477f81600a850160208b0162003c55565b6201116160ed1b600a9184019182018190526f113232b9b1b934b83a34b7b7111d101160811b600d8301528751620047bf81601d850160208c0162003c55565b80830192505080601d83015250691134b6b0b3b2911d101160b11b60208201528551620047f481602a840160208a0162003c55565b85519101906200480c81602a84016020890162003c55565b62004741620048656200485e6200484562004836602a86880101632e706e6760e01b815260040190565b6201116160ed1b815260030190565b6c1130ba3a3934b13aba32b9911d60991b8152600d0190565b8762004364565b607d60f81b815260010190565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c000000815260008251620048ac81601d85016020870162003c55565b91909101601d0192915050565b600060208284031215620048cc57600080fd5b815162000a8f8162003fd6565b601f82111562001074576000816000526020600020601f850160051c81016020861015620049045750805b601f850160051c820191505b81811015620024f95782815560010162004910565b81516001600160401b0381111562004941576200494162003e50565b620049598162004952845462004302565b84620048d9565b602080601f831160018114620049915760008415620049785750858301515b600019600386901b1c1916600185901b178555620024f9565b600085815260208120601f198616915b82811015620049c257888601518255948401946001909101908401620049a1565b5085821015620049e15787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6000825162004a0581846020870162003c55565b9190910192915050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009062004a449083018462003c7b565b9695505050505050565b60006020828403121562004a6157600080fd5b815162000a8f8162003c04565b8082028115828204841417620008f157620008f1620043cf565b60008162004a9a5762004a9a620043cf565b506000190190565b60008262004ac057634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052602160045260246000fdfe608060405260405161040a38038061040a83398101604081905261002291610268565b61002c8282610033565b5050610352565b61003c82610092565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a280511561008657610081828261010e565b505050565b61008e610185565b5050565b806001600160a01b03163b6000036100cd57604051634c9c8ce360e01b81526001600160a01b03821660048201526024015b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b03168460405161012b9190610336565b600060405180830381855af49150503d8060008114610166576040519150601f19603f3d011682016040523d82523d6000602084013e61016b565b606091505b50909250905061017c8583836101a6565b95945050505050565b34156101a45760405163b398979f60e01b815260040160405180910390fd5b565b6060826101bb576101b682610205565b6101fe565b81511580156101d257506001600160a01b0384163b155b156101fb57604051639996b31560e01b81526001600160a01b03851660048201526024016100c4565b50805b9392505050565b8051156102155780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b634e487b7160e01b600052604160045260246000fd5b60005b8381101561025f578181015183820152602001610247565b50506000910152565b6000806040838503121561027b57600080fd5b82516001600160a01b038116811461029257600080fd5b60208401519092506001600160401b03808211156102af57600080fd5b818501915085601f8301126102c357600080fd5b8151818111156102d5576102d561022e565b604051601f8201601f19908116603f011681019083821181831017156102fd576102fd61022e565b8160405282815288602084870101111561031657600080fd5b610327836020830160208801610244565b80955050505050509250929050565b60008251610348818460208701610244565b9190910192915050565b60aa806103606000396000f3fe6080604052600a600c565b005b60186014601a565b6051565b565b6000604c7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e808015606f573d6000f35b3d6000fdfea2646970667358221220bd42728c374f7f0ddc17b53ec61cdb40d51094c5fa601cbd894add86d0771b8264736f6c6343000818003360a060405234801561001057600080fd5b50338061003757604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b6100408161004a565b503360805261009a565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b608051610aea6100bc6000396000818161017001526104d40152610aea6000f3fe60806040526004361061007f5760003560e01c8063b61d27f61161004e578063b61d27f61461013e578063c45a01551461015e578063c4d66de814610192578063f2fde38b146101b257600080fd5b8063150b7a021461008b57806347e1da2a146100d5578063715018a6146100f55780638da5cb5b1461010c57600080fd5b3661008657005b600080fd5b34801561009757600080fd5b506100b76100a63660046106e7565b630a85bd0160e11b95945050505050565b6040516001600160e01b031990911681526020015b60405180910390f35b6100e86100e336600461079b565b6101d2565b6040516100cc9190610885565b34801561010157600080fd5b5061010a610461565b005b34801561011857600080fd5b506000546001600160a01b03165b6040516001600160a01b0390911681526020016100cc565b61015161014c3660046108e9565b610475565b6040516100cc9190610943565b34801561016a57600080fd5b506101267f000000000000000000000000000000000000000000000000000000000000000081565b34801561019e57600080fd5b5061010a6101ad36600461095d565b6104c9565b3480156101be57600080fd5b5061010a6101cd36600461095d565b610520565b60606101dc610552565b85821480156101f257508315806101f257508382145b6102385760405162461bcd60e51b81526020600482015260126024820152710eee4dedcce40c2e4e4c2f240d8cadccee8d60731b60448201526064015b60405180910390fd5b8167ffffffffffffffff81111561025157610251610978565b60405190808252806020026020018201604052801561028457816020015b606081526020019060019003908161026f5790505b509050600084900361036a5760005b868110156103645760008888838181106102af576102af61098e565b90506020020160208101906102c4919061095d565b90503660008686858181106102db576102db61098e565b90506020028101906102ed91906109a4565b91509150600061033584600085858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061057f92505050565b90508086868151811061034a5761034a61098e565b602002602001018190525084600101945050505050610293565b50610457565b60005b868110156104555760008888838181106103895761038961098e565b905060200201602081019061039e919061095d565b90503660008686858181106103b5576103b561098e565b90506020028101906103c791906109a4565b915091506000610426848b8b888181106103e3576103e361098e565b9050602002013585858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061057f92505050565b90508086868151811061043b5761043b61098e565b60200260200101819052508460010194505050505061036d565b505b9695505050505050565b610469610552565b6104736000610632565b565b606061047f610552565b6104c0858585858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061057f92505050565b95945050505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105145760405163118cdaa760e01b815233600482015260240161022f565b61051d81610632565b50565b610528610552565b6001600160a01b03811661051457604051631e4fbdf760e01b81526000600482015260240161022f565b6000546001600160a01b031633146104735760405163118cdaa760e01b815233600482015260240161022f565b60606000846001600160a01b0316848460405161059c91906109eb565b60006040518083038185875af1925050503d80600081146105d9576040519150601f19603f3d011682016040523d82523d6000602084013e6105de565b606091505b50925090508061062a576044825110156105f757600080fd5b600482019150818060200190518101906106119190610a07565b60405162461bcd60e51b815260040161022f9190610943565b509392505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80356001600160a01b038116811461069957600080fd5b919050565b60008083601f8401126106b057600080fd5b50813567ffffffffffffffff8111156106c857600080fd5b6020830191508360208285010111156106e057600080fd5b9250929050565b6000806000806000608086880312156106ff57600080fd5b61070886610682565b945061071660208701610682565b935060408601359250606086013567ffffffffffffffff81111561073957600080fd5b6107458882890161069e565b969995985093965092949392505050565b60008083601f84011261076857600080fd5b50813567ffffffffffffffff81111561078057600080fd5b6020830191508360208260051b85010111156106e057600080fd5b600080600080600080606087890312156107b457600080fd5b863567ffffffffffffffff808211156107cc57600080fd5b6107d88a838b01610756565b909850965060208901359150808211156107f157600080fd5b6107fd8a838b01610756565b9096509450604089013591508082111561081657600080fd5b5061082389828a01610756565b979a9699509497509295939492505050565b60005b83811015610850578181015183820152602001610838565b50506000910152565b60008151808452610871816020860160208601610835565b601f01601f19169290920160200192915050565b600060208083016020845280855180835260408601915060408160051b87010192506020870160005b828110156108dc57603f198886030184526108ca858351610859565b945092850192908501906001016108ae565b5092979650505050505050565b600080600080606085870312156108ff57600080fd5b61090885610682565b935060208501359250604085013567ffffffffffffffff81111561092b57600080fd5b6109378782880161069e565b95989497509550505050565b6020815260006109566020830184610859565b9392505050565b60006020828403121561096f57600080fd5b61095682610682565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000808335601e198436030181126109bb57600080fd5b83018035915067ffffffffffffffff8211156109d657600080fd5b6020019150368190038213156106e057600080fd5b600082516109fd818460208701610835565b9190910192915050565b600060208284031215610a1957600080fd5b815167ffffffffffffffff80821115610a3157600080fd5b818401915084601f830112610a4557600080fd5b815181811115610a5757610a57610978565b604051601f8201601f19908116603f01168101908382118183101715610a7f57610a7f610978565b81604052828152876020848701011115610a9857600080fd5b610aa9836020830160208801610835565b97965050505050505056fea26469706673582212209388cc9441e0986bee120b32be1c29eda96e129a50bcb254300c50efe2aac76364736f6c63430008180033645e039705490088daad89bae25049a34f4a9072d398537b1ab2425f24cbed0080bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930068747470733a2f2f7261772e67697468756275736572636f6e74656e742e636f6d2f70726f6d70746f7765722f7765626170702f6d61696e2f7372632f6173736574732f6e66742f4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f645e039705490088daad89bae25049a34f4a9072d398537b1ab2425f24cbed02a26469706673582212209806f4695177392d95c50d803f661803c0627a402b2916094032b9b05b081a6d64736f6c63430008180033",o={},l={},m={_format:i,contractName:s,sourceName:p,abi:r,bytecode:y,deployedBytecode:u,linkReferences:o,deployedLinkReferences:l},T="hh-sol-artifact-1",v="GameFrontend",w="contracts/GameFrontend.sol",g=[{inputs:[{internalType:"address",name:"gameContract_",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"gameContract",outputs:[{internalType:"contract IGame",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"gameStatus",outputs:[{internalType:"uint256",name:"totalChallanges",type:"uint256"},{internalType:"uint256",name:"ongoingChallanges",type:"uint256"},{internalType:"uint256",name:"solvedChallanges",type:"uint256"},{internalType:"uint256",name:"verifiedChallanges",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"startNumber",type:"uint256"},{internalType:"uint256",name:"endNumber",type:"uint256"}],name:"getNfts",outputs:[{components:[{internalType:"uint256",name:"id",type:"uint256"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"description",type:"string"},{internalType:"string",name:"gameType",type:"string"},{internalType:"bytes32",name:"prompt",type:"bytes32"},{internalType:"bytes32",name:"secret",type:"bytes32"},{internalType:"string",name:"imageUri",type:"string"},{internalType:"uint128",name:"startDate",type:"uint128"},{internalType:"uint128",name:"endDate",type:"uint128"},{internalType:"uint256",name:"awards",type:"uint256"},{internalType:"address",name:"winner",type:"address"}],internalType:"struct NftData[]",name:"data",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"}],name:"getPortfolioMaker",outputs:[{components:[{internalType:"uint256",name:"id",type:"uint256"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"description",type:"string"},{internalType:"string",name:"gameType",type:"string"},{internalType:"bytes32",name:"prompt",type:"bytes32"},{internalType:"bytes32",name:"secret",type:"bytes32"},{internalType:"string",name:"imageUri",type:"string"},{internalType:"uint128",name:"startDate",type:"uint128"},{internalType:"uint128",name:"endDate",type:"uint128"},{internalType:"uint256",name:"awards",type:"uint256"},{internalType:"address",name:"winner",type:"address"}],internalType:"struct NftData[]",name:"data",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"}],name:"getPortfolioSolver",outputs:[{components:[{internalType:"uint256",name:"id",type:"uint256"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"description",type:"string"},{internalType:"string",name:"gameType",type:"string"},{internalType:"bytes32",name:"prompt",type:"bytes32"},{internalType:"bytes32",name:"secret",type:"bytes32"},{internalType:"string",name:"imageUri",type:"string"},{internalType:"uint128",name:"startDate",type:"uint128"},{internalType:"uint128",name:"endDate",type:"uint128"},{internalType:"uint256",name:"awards",type:"uint256"},{internalType:"address",name:"winner",type:"address"}],internalType:"struct NftData[]",name:"data",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"topk",type:"uint256"}],name:"getTopSolvers",outputs:[{internalType:"address[]",name:"solvers",type:"address[]"},{internalType:"uint256[]",name:"counts",type:"uint256[]"},{internalType:"uint256[]",name:"awards",type:"uint256[]"}],stateMutability:"view",type:"function"}],M="0x60a060405234801561001057600080fd5b506040516200239e3803806200239e83398101604081905261003191610042565b6001600160a01b0316608052610072565b60006020828403121561005457600080fd5b81516001600160a01b038116811461006b57600080fd5b9392505050565b608051612246620001586000396000818160f2015281816101480152818161031f015281816103ab015281816103da015281816104f8015281816105270152818161063d0152818161066c015281816107a1015281816108c4015281816109ab01528181610a5301528181610b1201528181610c0701528181610cb801528181610dd301528181610f1401528181610f96015281816110180152818161109a0152818161114d01528181611242015281816112d3015281816113620152818161147d015281816115bb015281816116ca01528181611761015261187c01526122466000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c80631cb04b7814610067578063572edf7914610092578063722fed7e146100b2578063a4abc3f9146100da578063d3f33009146100ed578063fac6350d1461012c575b600080fd5b61007a610075366004611bc9565b61013f565b60405161008993929190611c1e565b60405180910390f35b6100a56100a0366004611cac565b610aed565b6040516100899190611d20565b6100ba610f0c565b604080519485526020850193909352918301526060820152608001610089565b6100a56100e8366004611cac565b611128565b6101147f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610089565b6100a561013a366004611e59565b6115b5565b606080606060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316637b80e8e66040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101c89190611e7b565b9050808511156101d6578094505b50836001600160401b038111156101ef576101ef611e94565b604051908082528060200260200182016040528015610218578160200160208202803683370190505b509250836001600160401b0381111561023357610233611e94565b60405190808252806020026020018201604052801561025c578160200160208202803683370190505b509150836001600160401b0381111561027757610277611e94565b6040519080825280602002602001820160405280156102a0578160200160208202803683370190505b5090506000846001600160401b038111156102bd576102bd611e94565b6040519080825280602002602001820160405280156102e6578160200160208202803683370190505b50905060005b8581101561031a578082828151811061030757610307611eaa565b60209081029190910101526001016102ec565b50845b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316637b80e8e66040518163ffffffff1660e01b8152600401602060405180830381865afa15801561037b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061039f9190611e7b565b8110156108b4576000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663415fa50a7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663fe7f43da87868151811061041957610419611eaa565b60200260200101516040518263ffffffff1660e01b815260040161043f91815260200190565b602060405180830381865afa15801561045c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104809190611ed0565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa1580156104c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104e89190611e7b565b905060015b8881101561078857817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663415fa50a7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663fe7f43da89868151811061056657610566611eaa565b60200260200101516040518263ffffffff1660e01b815260040161058c91815260200190565b602060405180830381865afa1580156105a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105cd9190611ed0565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015610611573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106359190611e7b565b1015610780577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663415fa50a7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663fe7f43da8885815181106106ab576106ab611eaa565b60200260200101516040518263ffffffff1660e01b81526004016106d191815260200190565b602060405180830381865afa1580156106ee573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107129190611ed0565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015610756573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061077a9190611e7b565b91508092505b6001016104ed565b50604051637f3fa1ed60e11b81526004810184905281907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063415fa50a90829063fe7f43da90602401602060405180830381865afa1580156107f8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061081c9190611ed0565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015610860573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108849190611e7b565b11156108aa578284838151811061089d5761089d611eaa565b6020026020010181815250505b505060010161031d565b5060005b85811015610ae45760007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663fe7f43da84848151811061090357610903611eaa565b60200260200101516040518263ffffffff1660e01b815260040161092991815260200190565b602060405180830381865afa158015610946573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061096a9190611ed0565b90508086838151811061097f5761097f611eaa565b6001600160a01b039283166020918202929092010152604051623e4a5b60e11b815282821660048201527f000000000000000000000000000000000000000000000000000000000000000090911690627c94b690602401602060405180830381865afa1580156109f3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a179190611e7b565b858381518110610a2957610a29611eaa565b60209081029190910101526040516320afd28560e11b81526001600160a01b0382811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063415fa50a90602401602060405180830381865afa158015610a9a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610abe9190611e7b565b848381518110610ad057610ad0611eaa565b6020908102919091010152506001016108b8565b50509193909250565b60405163215812e960e21b81526001600160a01b0382811660048301526060916000917f000000000000000000000000000000000000000000000000000000000000000016906385604ba490602401600060405180830381865afa158015610b59573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610b819190810190611f46565b8051909150806001600160401b03811115610b9e57610b9e611e94565b604051908082528060200260200182016040528015610bd757816020015b610bc4611b47565b815260200190600190039081610bbc5790505b50925060005b81811015610f04576000838281518110610bf957610bf9611eaa565b6020026020010151905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166354c87af4836040518263ffffffff1660e01b8152600401610c5391815260200190565b602060405180830381865afa158015610c70573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c949190611e7b565b60405163277ecfbb60e01b8152600481018490529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063277ecfbb90602401600060405180830381865afa158015610cff573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610d27919081019061206d565b905060006040518061018001604052808481526020018581526020018360000151815260200183602001518152602001836040015181526020018360600151815260200183608001518152602001610d7d6119bc565b610d86866119dc565b604051602001610d97929190612169565b60405160208183030381529060405281526020018360a001516001600160801b031681526020018360c001516001600160801b031681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d2da7bca6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e2f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e539190611ed0565b6040516370a0823160e01b81526001600160a01b03888116600483015291909116906370a0823190602401602060405180830381865afa158015610e9b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ebf9190611e7b565b81526020018360e001516001600160a01b0316815250905080888681518110610eea57610eea611eaa565b602002602001018190525084600101945050505050610bdd565b505050919050565b6000806000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f70573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f949190611e7b565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ef7926626040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ff2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110169190611e7b565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663c516e1566040518163ffffffff1660e01b8152600401602060405180830381865afa158015611074573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110989190611e7b565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663fe9eba156040518163ffffffff1660e01b8152600401602060405180830381865afa1580156110f6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061111a9190611e7b565b935093509350935090919293565b6040516370a0823160e01b81526001600160a01b0382811660048301526060916000917f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015611194573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111b89190611e7b565b9050806001600160401b038111156111d2576111d2611e94565b60405190808252806020026020018201604052801561120b57816020015b6111f8611b47565b8152602001906001900390816111f05790505b50915060005b818110156115ae57604051632f745c5960e01b81526001600160a01b038581166004830152602482018390526000917f000000000000000000000000000000000000000000000000000000000000000090911690632f745c5990604401602060405180830381865afa15801561128b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112af9190611e7b565b6040516315321ebd60e21b8152600481018290529091506000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906354c87af490602401602060405180830381865afa15801561131a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061133e9190611e7b565b60405163277ecfbb60e01b8152600481018490529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063277ecfbb90602401600060405180830381865afa1580156113a9573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526113d1919081019061206d565b9050600060405180610180016040528084815260200185815260200183600001518152602001836020015181526020018360400151815260200183606001518152602001836080015181526020016114276119bc565b611430866119dc565b604051602001611441929190612169565b60405160208183030381529060405281526020018360a001516001600160801b031681526020018360c001516001600160801b031681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d2da7bca6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156114d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114fd9190611ed0565b6040516370a0823160e01b81526001600160a01b03888116600483015291909116906370a0823190602401602060405180830381865afa158015611545573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115699190611e7b565b81526020018360e001516001600160a01b031681525090508087868151811061159457611594611eaa565b602002602001018190525084600101945050505050611211565b5050919050565b606060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611617573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061163b9190611e7b565b905080831115611649578092505b5061165483836121a7565b6001600160401b0381111561166b5761166b611e94565b6040519080825280602002602001820160405280156116a457816020015b611691611b47565b8152602001906001900390816116895790505b509050825b828110156119b557604051639dd3e25560e01b8152600481018290526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690639dd3e25590602401602060405180830381865afa158015611719573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061173d9190611e7b565b60405163277ecfbb60e01b8152600481018290529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063277ecfbb90602401600060405180830381865afa1580156117a8573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526117d0919081019061206d565b9050600060405180610180016040528085815260200184815260200183600001518152602001836020015181526020018360400151815260200183606001518152602001836080015181526020016118266119bc565b61182f876119dc565b604051602001611840929190612169565b60405160208183030381529060405281526020018360a001516001600160801b031681526020018360c001516001600160801b031681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d2da7bca6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156118d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118fc9190611ed0565b6040516370a0823160e01b81526001600160a01b03878116600483015291909116906370a0823190602401602060405180830381865afa158015611944573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119689190611e7b565b815260e08401516001600160a01b03166020909101529050808561198c89876121a7565b8151811061199c5761199c611eaa565b60200260200101819052508360010193505050506116a9565b5092915050565b60606040518060800160405280604881526020016121c960489139905090565b606060006119e983611a6e565b60010190506000816001600160401b03811115611a0857611a08611e94565b6040519080825280601f01601f191660200182016040528015611a32576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084611a3c57509392505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310611aad5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310611ad9576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310611af757662386f26fc10000830492506010015b6305f5e1008310611b0f576305f5e100830492506008015b6127108310611b2357612710830492506004015b60648310611b35576064830492506002015b600a8310611b41576001015b92915050565b604051806101800160405280600081526020016000815260200160608152602001606081526020016060815260200160008019168152602001600080191681526020016060815260200160006001600160801b0316815260200160006001600160801b031681526020016000815260200160006001600160a01b031681525090565b600060208284031215611bdb57600080fd5b5035919050565b60008151808452602080850194506020840160005b83811015611c1357815187529582019590820190600101611bf7565b509495945050505050565b606080825284519082018190526000906020906080840190828801845b82811015611c605781516001600160a01b031684529284019290840190600101611c3b565b5050508381036020850152611c758187611be2565b9150508281036040840152611c8a8185611be2565b9695505050505050565b6001600160a01b0381168114611ca957600080fd5b50565b600060208284031215611cbe57600080fd5b8135611cc981611c94565b9392505050565b60005b83811015611ceb578181015183820152602001611cd3565b50506000910152565b60008151808452611d0c816020860160208601611cd0565b601f01601f19169290920160200192915050565b600060208083018184528085518083526040925060408601915060408160051b87010184880160005b83811015611e4b57603f198984030185528151610180815185528882015189860152878201518189870152611d8082870182611cf4565b91505060608083015186830382880152611d9a8382611cf4565b9250505060808083015186830382880152611db58382611cf4565b9250505060a080830151818701525060c080830151818701525060e08083015186830382880152611de68382611cf4565b9250505061010080830151611e05828801826001600160801b03169052565b5050610120828101516001600160801b0316908601526101408083015190860152610160918201516001600160a01b031691909401529386019390860190600101611d49565b509098975050505050505050565b60008060408385031215611e6c57600080fd5b50508035926020909101359150565b600060208284031215611e8d57600080fd5b5051919050565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b8051611ecb81611c94565b919050565b600060208284031215611ee257600080fd5b8151611cc981611c94565b60405161010081016001600160401b0381118282101715611f1057611f10611e94565b60405290565b604051601f8201601f191681016001600160401b0381118282101715611f3e57611f3e611e94565b604052919050565b60006020808385031215611f5957600080fd5b82516001600160401b0380821115611f7057600080fd5b818501915085601f830112611f8457600080fd5b815181811115611f9657611f96611e94565b8060051b9150611fa7848301611f16565b8181529183018401918481019088841115611fc157600080fd5b938501935b83851015611fdf57845182529385019390850190611fc6565b98975050505050505050565b600082601f830112611ffc57600080fd5b81516001600160401b0381111561201557612015611e94565b612028601f8201601f1916602001611f16565b81815284602083860101111561203d57600080fd5b61204e826020830160208701611cd0565b949350505050565b80516001600160801b0381168114611ecb57600080fd5b60006020828403121561207f57600080fd5b81516001600160401b038082111561209657600080fd5b9083019061010082860312156120ab57600080fd5b6120b3611eed565b8251828111156120c257600080fd5b6120ce87828601611feb565b8252506020830151828111156120e357600080fd5b6120ef87828601611feb565b60208301525060408301518281111561210757600080fd5b61211387828601611feb565b604083015250606083015160608201526080830151608082015261213960a08401612056565b60a082015261214a60c08401612056565b60c082015261215b60e08401611ec0565b60e082015295945050505050565b6000835161217b818460208801611cd0565b83519083019061218f818360208801611cd0565b632e706e6760e01b9101908152600401949350505050565b81810381811115611b4157634e487b7160e01b600052601160045260246000fdfe68747470733a2f2f7261772e67697468756275736572636f6e74656e742e636f6d2f70726f6d70746f7765722f7765626170702f6d61696e2f7372632f6173736574732f6e66742fa264697066735822122087cd3dfe1ee388c3f05f8be6f1699de697e25b4b426d3230877658d6bd5bea7f64736f6c63430008180033",I="0x608060405234801561001057600080fd5b50600436106100625760003560e01c80631cb04b7814610067578063572edf7914610092578063722fed7e146100b2578063a4abc3f9146100da578063d3f33009146100ed578063fac6350d1461012c575b600080fd5b61007a610075366004611bc9565b61013f565b60405161008993929190611c1e565b60405180910390f35b6100a56100a0366004611cac565b610aed565b6040516100899190611d20565b6100ba610f0c565b604080519485526020850193909352918301526060820152608001610089565b6100a56100e8366004611cac565b611128565b6101147f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610089565b6100a561013a366004611e59565b6115b5565b606080606060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316637b80e8e66040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101c89190611e7b565b9050808511156101d6578094505b50836001600160401b038111156101ef576101ef611e94565b604051908082528060200260200182016040528015610218578160200160208202803683370190505b509250836001600160401b0381111561023357610233611e94565b60405190808252806020026020018201604052801561025c578160200160208202803683370190505b509150836001600160401b0381111561027757610277611e94565b6040519080825280602002602001820160405280156102a0578160200160208202803683370190505b5090506000846001600160401b038111156102bd576102bd611e94565b6040519080825280602002602001820160405280156102e6578160200160208202803683370190505b50905060005b8581101561031a578082828151811061030757610307611eaa565b60209081029190910101526001016102ec565b50845b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316637b80e8e66040518163ffffffff1660e01b8152600401602060405180830381865afa15801561037b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061039f9190611e7b565b8110156108b4576000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663415fa50a7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663fe7f43da87868151811061041957610419611eaa565b60200260200101516040518263ffffffff1660e01b815260040161043f91815260200190565b602060405180830381865afa15801561045c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104809190611ed0565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa1580156104c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104e89190611e7b565b905060015b8881101561078857817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663415fa50a7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663fe7f43da89868151811061056657610566611eaa565b60200260200101516040518263ffffffff1660e01b815260040161058c91815260200190565b602060405180830381865afa1580156105a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105cd9190611ed0565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015610611573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106359190611e7b565b1015610780577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663415fa50a7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663fe7f43da8885815181106106ab576106ab611eaa565b60200260200101516040518263ffffffff1660e01b81526004016106d191815260200190565b602060405180830381865afa1580156106ee573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107129190611ed0565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015610756573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061077a9190611e7b565b91508092505b6001016104ed565b50604051637f3fa1ed60e11b81526004810184905281907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063415fa50a90829063fe7f43da90602401602060405180830381865afa1580156107f8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061081c9190611ed0565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015610860573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108849190611e7b565b11156108aa578284838151811061089d5761089d611eaa565b6020026020010181815250505b505060010161031d565b5060005b85811015610ae45760007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663fe7f43da84848151811061090357610903611eaa565b60200260200101516040518263ffffffff1660e01b815260040161092991815260200190565b602060405180830381865afa158015610946573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061096a9190611ed0565b90508086838151811061097f5761097f611eaa565b6001600160a01b039283166020918202929092010152604051623e4a5b60e11b815282821660048201527f000000000000000000000000000000000000000000000000000000000000000090911690627c94b690602401602060405180830381865afa1580156109f3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a179190611e7b565b858381518110610a2957610a29611eaa565b60209081029190910101526040516320afd28560e11b81526001600160a01b0382811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063415fa50a90602401602060405180830381865afa158015610a9a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610abe9190611e7b565b848381518110610ad057610ad0611eaa565b6020908102919091010152506001016108b8565b50509193909250565b60405163215812e960e21b81526001600160a01b0382811660048301526060916000917f000000000000000000000000000000000000000000000000000000000000000016906385604ba490602401600060405180830381865afa158015610b59573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610b819190810190611f46565b8051909150806001600160401b03811115610b9e57610b9e611e94565b604051908082528060200260200182016040528015610bd757816020015b610bc4611b47565b815260200190600190039081610bbc5790505b50925060005b81811015610f04576000838281518110610bf957610bf9611eaa565b6020026020010151905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166354c87af4836040518263ffffffff1660e01b8152600401610c5391815260200190565b602060405180830381865afa158015610c70573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c949190611e7b565b60405163277ecfbb60e01b8152600481018490529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063277ecfbb90602401600060405180830381865afa158015610cff573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610d27919081019061206d565b905060006040518061018001604052808481526020018581526020018360000151815260200183602001518152602001836040015181526020018360600151815260200183608001518152602001610d7d6119bc565b610d86866119dc565b604051602001610d97929190612169565b60405160208183030381529060405281526020018360a001516001600160801b031681526020018360c001516001600160801b031681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d2da7bca6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e2f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e539190611ed0565b6040516370a0823160e01b81526001600160a01b03888116600483015291909116906370a0823190602401602060405180830381865afa158015610e9b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ebf9190611e7b565b81526020018360e001516001600160a01b0316815250905080888681518110610eea57610eea611eaa565b602002602001018190525084600101945050505050610bdd565b505050919050565b6000806000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f70573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f949190611e7b565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ef7926626040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ff2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110169190611e7b565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663c516e1566040518163ffffffff1660e01b8152600401602060405180830381865afa158015611074573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110989190611e7b565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663fe9eba156040518163ffffffff1660e01b8152600401602060405180830381865afa1580156110f6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061111a9190611e7b565b935093509350935090919293565b6040516370a0823160e01b81526001600160a01b0382811660048301526060916000917f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015611194573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111b89190611e7b565b9050806001600160401b038111156111d2576111d2611e94565b60405190808252806020026020018201604052801561120b57816020015b6111f8611b47565b8152602001906001900390816111f05790505b50915060005b818110156115ae57604051632f745c5960e01b81526001600160a01b038581166004830152602482018390526000917f000000000000000000000000000000000000000000000000000000000000000090911690632f745c5990604401602060405180830381865afa15801561128b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112af9190611e7b565b6040516315321ebd60e21b8152600481018290529091506000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906354c87af490602401602060405180830381865afa15801561131a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061133e9190611e7b565b60405163277ecfbb60e01b8152600481018490529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063277ecfbb90602401600060405180830381865afa1580156113a9573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526113d1919081019061206d565b9050600060405180610180016040528084815260200185815260200183600001518152602001836020015181526020018360400151815260200183606001518152602001836080015181526020016114276119bc565b611430866119dc565b604051602001611441929190612169565b60405160208183030381529060405281526020018360a001516001600160801b031681526020018360c001516001600160801b031681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d2da7bca6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156114d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114fd9190611ed0565b6040516370a0823160e01b81526001600160a01b03888116600483015291909116906370a0823190602401602060405180830381865afa158015611545573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115699190611e7b565b81526020018360e001516001600160a01b031681525090508087868151811061159457611594611eaa565b602002602001018190525084600101945050505050611211565b5050919050565b606060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611617573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061163b9190611e7b565b905080831115611649578092505b5061165483836121a7565b6001600160401b0381111561166b5761166b611e94565b6040519080825280602002602001820160405280156116a457816020015b611691611b47565b8152602001906001900390816116895790505b509050825b828110156119b557604051639dd3e25560e01b8152600481018290526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690639dd3e25590602401602060405180830381865afa158015611719573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061173d9190611e7b565b60405163277ecfbb60e01b8152600481018290529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063277ecfbb90602401600060405180830381865afa1580156117a8573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526117d0919081019061206d565b9050600060405180610180016040528085815260200184815260200183600001518152602001836020015181526020018360400151815260200183606001518152602001836080015181526020016118266119bc565b61182f876119dc565b604051602001611840929190612169565b60405160208183030381529060405281526020018360a001516001600160801b031681526020018360c001516001600160801b031681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d2da7bca6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156118d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118fc9190611ed0565b6040516370a0823160e01b81526001600160a01b03878116600483015291909116906370a0823190602401602060405180830381865afa158015611944573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119689190611e7b565b815260e08401516001600160a01b03166020909101529050808561198c89876121a7565b8151811061199c5761199c611eaa565b60200260200101819052508360010193505050506116a9565b5092915050565b60606040518060800160405280604881526020016121c960489139905090565b606060006119e983611a6e565b60010190506000816001600160401b03811115611a0857611a08611e94565b6040519080825280601f01601f191660200182016040528015611a32576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084611a3c57509392505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310611aad5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310611ad9576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310611af757662386f26fc10000830492506010015b6305f5e1008310611b0f576305f5e100830492506008015b6127108310611b2357612710830492506004015b60648310611b35576064830492506002015b600a8310611b41576001015b92915050565b604051806101800160405280600081526020016000815260200160608152602001606081526020016060815260200160008019168152602001600080191681526020016060815260200160006001600160801b0316815260200160006001600160801b031681526020016000815260200160006001600160a01b031681525090565b600060208284031215611bdb57600080fd5b5035919050565b60008151808452602080850194506020840160005b83811015611c1357815187529582019590820190600101611bf7565b509495945050505050565b606080825284519082018190526000906020906080840190828801845b82811015611c605781516001600160a01b031684529284019290840190600101611c3b565b5050508381036020850152611c758187611be2565b9150508281036040840152611c8a8185611be2565b9695505050505050565b6001600160a01b0381168114611ca957600080fd5b50565b600060208284031215611cbe57600080fd5b8135611cc981611c94565b9392505050565b60005b83811015611ceb578181015183820152602001611cd3565b50506000910152565b60008151808452611d0c816020860160208601611cd0565b601f01601f19169290920160200192915050565b600060208083018184528085518083526040925060408601915060408160051b87010184880160005b83811015611e4b57603f198984030185528151610180815185528882015189860152878201518189870152611d8082870182611cf4565b91505060608083015186830382880152611d9a8382611cf4565b9250505060808083015186830382880152611db58382611cf4565b9250505060a080830151818701525060c080830151818701525060e08083015186830382880152611de68382611cf4565b9250505061010080830151611e05828801826001600160801b03169052565b5050610120828101516001600160801b0316908601526101408083015190860152610160918201516001600160a01b031691909401529386019390860190600101611d49565b509098975050505050505050565b60008060408385031215611e6c57600080fd5b50508035926020909101359150565b600060208284031215611e8d57600080fd5b5051919050565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b8051611ecb81611c94565b919050565b600060208284031215611ee257600080fd5b8151611cc981611c94565b60405161010081016001600160401b0381118282101715611f1057611f10611e94565b60405290565b604051601f8201601f191681016001600160401b0381118282101715611f3e57611f3e611e94565b604052919050565b60006020808385031215611f5957600080fd5b82516001600160401b0380821115611f7057600080fd5b818501915085601f830112611f8457600080fd5b815181811115611f9657611f96611e94565b8060051b9150611fa7848301611f16565b8181529183018401918481019088841115611fc157600080fd5b938501935b83851015611fdf57845182529385019390850190611fc6565b98975050505050505050565b600082601f830112611ffc57600080fd5b81516001600160401b0381111561201557612015611e94565b612028601f8201601f1916602001611f16565b81815284602083860101111561203d57600080fd5b61204e826020830160208701611cd0565b949350505050565b80516001600160801b0381168114611ecb57600080fd5b60006020828403121561207f57600080fd5b81516001600160401b038082111561209657600080fd5b9083019061010082860312156120ab57600080fd5b6120b3611eed565b8251828111156120c257600080fd5b6120ce87828601611feb565b8252506020830151828111156120e357600080fd5b6120ef87828601611feb565b60208301525060408301518281111561210757600080fd5b61211387828601611feb565b604083015250606083015160608201526080830151608082015261213960a08401612056565b60a082015261214a60c08401612056565b60c082015261215b60e08401611ec0565b60e082015295945050505050565b6000835161217b818460208801611cd0565b83519083019061218f818360208801611cd0565b632e706e6760e01b9101908152600401949350505050565b81810381811115611b4157634e487b7160e01b600052601160045260246000fdfe68747470733a2f2f7261772e67697468756275736572636f6e74656e742e636f6d2f70726f6d70746f7765722f7765626170702f6d61696e2f7372632f6173736574732f6e66742fa264697066735822122087cd3dfe1ee388c3f05f8be6f1699de697e25b4b426d3230877658d6bd5bea7f64736f6c63430008180033",k={},A={},x={_format:T,contractName:v,sourceName:w,abi:g,bytecode:M,deployedBytecode:I,linkReferences:k,deployedLinkReferences:A},R="hh-sol-artifact-1",C="USDC",O="contracts/utils/USDC.sol",E=[{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"allowance",type:"uint256"},{internalType:"uint256",name:"needed",type:"uint256"}],name:"ERC20InsufficientAllowance",type:"error"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"needed",type:"uint256"}],name:"ERC20InsufficientBalance",type:"error"},{inputs:[{internalType:"address",name:"approver",type:"address"}],name:"ERC20InvalidApprover",type:"error"},{inputs:[{internalType:"address",name:"receiver",type:"address"}],name:"ERC20InvalidReceiver",type:"error"},{inputs:[{internalType:"address",name:"sender",type:"address"}],name:"ERC20InvalidSender",type:"error"},{inputs:[{internalType:"address",name:"spender",type:"address"}],name:"ERC20InvalidSpender",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}],h="0x60803462000339576040906001600160401b03908083018281118282101762000323578352600981526020916854657374205553444360b81b838301528351928484018481108382111762000323578552600493848152635553444360e01b828201528351908382116200030e576003928354926001968785811c9516801562000303575b83861014620002ee578190601f9586811162000298575b508390868311600114620002315760009262000225575b505060001982871b1c191690871b1784555b8151948511620002105786548681811c9116801562000205575b82821014620001f057838111620001a5575b50809285116001146200013757509383949184926000956200012b575b50501b92600019911b1c19161790555b51610b2790816200033f8239f35b0151935038806200010d565b92919084601f1981168860005285600020956000905b898383106200018a57505050106200016f575b50505050811b0190556200011d565b01519060f884600019921b161c191690553880808062000160565b8587015189559097019694850194889350908101906200014d565b87600052816000208480880160051c820192848910620001e6575b0160051c019087905b828110620001d9575050620000f0565b60008155018790620001c9565b92508192620001c0565b602288634e487b7160e01b6000525260246000fd5b90607f1690620000de565b604187634e487b7160e01b6000525260246000fd5b015190503880620000b2565b90899350601f1983169188600052856000209260005b8782821062000281575050841162000268575b505050811b018455620000c4565b015160001983891b60f8161c191690553880806200025a565b8385015186558d9790950194938401930162000247565b90915086600052836000208680850160051c820192868610620002e4575b918b91869594930160051c01915b828110620002d45750506200009b565b600081558594508b9101620002c4565b92508192620002b6565b602289634e487b7160e01b6000525260246000fd5b94607f169462000084565b604186634e487b7160e01b6000525260246000fd5b634e487b7160e01b600052604160045260246000fd5b600080fdfe608060408181526004918236101561001657600080fd5b600092833560e01c91826306fdde03146107bf57508163095ea7b3146106ba57816318160ddd1461067d57816323b872dd146104f3578163313ce567146104b957816340c10f19146103b057816370a082311461034f57816395d89b411461015757508063a9059cbb146101095763dd62ed3e1461009357600080fd5b3461010557807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261010557806020926100cd610965565b6100d561098d565b73ffffffffffffffffffffffffffffffffffffffff91821683526001865283832091168252845220549051908152f35b5080fd5b503461010557807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261010557602090610150610146610965565b60243590336109b0565b5160018152f35b83833461010557817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101055780519082845460018160011c9060018316928315610345575b60209384841081146103195783885287959493929181156102be5750600114610242575b50505003601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019267ffffffffffffffff84118385101761021657508291826102129252826108ff565b0390f35b806041867f4e487b71000000000000000000000000000000000000000000000000000000006024945252fd5b8888529193925086917f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b5b8284106102a857505050907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe092601f928201019181936101c4565b805488850187015287945092850192810161026d565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016848701525050151560051b830101905081601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe06101c4565b60248960228c7f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b91607f16916101a0565b5050346101055760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610105578060209273ffffffffffffffffffffffffffffffffffffffff6103a1610965565b16815280845220549051908152f35b919050346104b557807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104b5576103e9610965565b9073ffffffffffffffffffffffffffffffffffffffff6024359216928315610487576002549083820180921161045b575084927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9260209260025585855284835280852082815401905551908152a380f35b8560116024927f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b8460249251917fec442f05000000000000000000000000000000000000000000000000000000008352820152fd5b8280fd5b50503461010557817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610105576020905160128152f35b9050823461067a5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261067a5761052d610965565b61053561098d565b916044359373ffffffffffffffffffffffffffffffffffffffff8316808352600160205286832033845260205286832054917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff830361059d575b6020886101508989896109b0565b8683106106355781156106065733156105d7575082526001602090815286832033845281529186902090859003905582906101508761058f565b602490848951917f94280d62000000000000000000000000000000000000000000000000000000008352820152fd5b602490848951917fe602df05000000000000000000000000000000000000000000000000000000008352820152fd5b87517ffb8f41b2000000000000000000000000000000000000000000000000000000008152339181019182526020820193909352604081018790528291506060010390fd5b80fd5b50503461010557817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610105576020906002549051908152f35b9050346104b557817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104b5576106f2610965565b6024359033156107905773ffffffffffffffffffffffffffffffffffffffff1691821561076157508083602095338152600187528181208582528752205582519081527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925843392a35160018152f35b602490858551917f94280d62000000000000000000000000000000000000000000000000000000008352820152fd5b602483868651917fe602df05000000000000000000000000000000000000000000000000000000008352820152fd5b849084346104b557827ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104b5578260035460018160011c90600183169283156108f5575b60209384841081146103195783885287959493929181156102be57506001146108785750505003601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019267ffffffffffffffff84118385101761021657508291826102129252826108ff565b600388529193925086917fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b8284106108df57505050907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe092601f928201019181936101c4565b80548885018701528794509285019281016108a4565b91607f1691610807565b60208082528251818301819052939260005b858110610951575050507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8460006040809697860101520116010190565b818101830151848201604001528201610911565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361098857565b600080fd5b6024359073ffffffffffffffffffffffffffffffffffffffff8216820361098857565b9173ffffffffffffffffffffffffffffffffffffffff808416928315610ac05716928315610a8f5760009083825281602052604082205490838210610a37575091604082827fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef958760209652828652038282205586815220818154019055604051908152a3565b6040517fe450d38c00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff919091166004820152602481019190915260448101839052606490fd5b60246040517fec442f0500000000000000000000000000000000000000000000000000000000815260006004820152fd5b60246040517f96c6fd1e00000000000000000000000000000000000000000000000000000000815260006004820152fdfea264697066735822122067ce05df6d7ffb0e8f689c413f5cac896b68ec4b04d38d85186f104968cf2b0564736f6c63430008180033",S="0x608060408181526004918236101561001657600080fd5b600092833560e01c91826306fdde03146107bf57508163095ea7b3146106ba57816318160ddd1461067d57816323b872dd146104f3578163313ce567146104b957816340c10f19146103b057816370a082311461034f57816395d89b411461015757508063a9059cbb146101095763dd62ed3e1461009357600080fd5b3461010557807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261010557806020926100cd610965565b6100d561098d565b73ffffffffffffffffffffffffffffffffffffffff91821683526001865283832091168252845220549051908152f35b5080fd5b503461010557807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261010557602090610150610146610965565b60243590336109b0565b5160018152f35b83833461010557817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101055780519082845460018160011c9060018316928315610345575b60209384841081146103195783885287959493929181156102be5750600114610242575b50505003601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019267ffffffffffffffff84118385101761021657508291826102129252826108ff565b0390f35b806041867f4e487b71000000000000000000000000000000000000000000000000000000006024945252fd5b8888529193925086917f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b5b8284106102a857505050907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe092601f928201019181936101c4565b805488850187015287945092850192810161026d565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016848701525050151560051b830101905081601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe06101c4565b60248960228c7f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b91607f16916101a0565b5050346101055760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610105578060209273ffffffffffffffffffffffffffffffffffffffff6103a1610965565b16815280845220549051908152f35b919050346104b557807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104b5576103e9610965565b9073ffffffffffffffffffffffffffffffffffffffff6024359216928315610487576002549083820180921161045b575084927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9260209260025585855284835280852082815401905551908152a380f35b8560116024927f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b8460249251917fec442f05000000000000000000000000000000000000000000000000000000008352820152fd5b8280fd5b50503461010557817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610105576020905160128152f35b9050823461067a5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261067a5761052d610965565b61053561098d565b916044359373ffffffffffffffffffffffffffffffffffffffff8316808352600160205286832033845260205286832054917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff830361059d575b6020886101508989896109b0565b8683106106355781156106065733156105d7575082526001602090815286832033845281529186902090859003905582906101508761058f565b602490848951917f94280d62000000000000000000000000000000000000000000000000000000008352820152fd5b602490848951917fe602df05000000000000000000000000000000000000000000000000000000008352820152fd5b87517ffb8f41b2000000000000000000000000000000000000000000000000000000008152339181019182526020820193909352604081018790528291506060010390fd5b80fd5b50503461010557817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610105576020906002549051908152f35b9050346104b557817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104b5576106f2610965565b6024359033156107905773ffffffffffffffffffffffffffffffffffffffff1691821561076157508083602095338152600187528181208582528752205582519081527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925843392a35160018152f35b602490858551917f94280d62000000000000000000000000000000000000000000000000000000008352820152fd5b602483868651917fe602df05000000000000000000000000000000000000000000000000000000008352820152fd5b849084346104b557827ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104b5578260035460018160011c90600183169283156108f5575b60209384841081146103195783885287959493929181156102be57506001146108785750505003601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019267ffffffffffffffff84118385101761021657508291826102129252826108ff565b600388529193925086917fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b8284106108df57505050907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe092601f928201019181936101c4565b80548885018701528794509285019281016108a4565b91607f1691610807565b60208082528251818301819052939260005b858110610951575050507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8460006040809697860101520116010190565b818101830151848201604001528201610911565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361098857565b600080fd5b6024359073ffffffffffffffffffffffffffffffffffffffff8216820361098857565b9173ffffffffffffffffffffffffffffffffffffffff808416928315610ac05716928315610a8f5760009083825281602052604082205490838210610a37575091604082827fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef958760209652828652038282205586815220818154019055604051908152a3565b6040517fe450d38c00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff919091166004820152602481019190915260448101839052606490fd5b60246040517fec442f0500000000000000000000000000000000000000000000000000000000815260006004820152fd5b60246040517f96c6fd1e00000000000000000000000000000000000000000000000000000000815260006004820152fdfea264697066735822122067ce05df6d7ffb0e8f689c413f5cac896b68ec4b04d38d85186f104968cf2b0564736f6c63430008180033",F={},N={},G={_format:R,contractName:C,sourceName:O,abi:E,bytecode:h,deployedBytecode:S,linkReferences:F,deployedLinkReferences:N},$="hh-sol-artifact-1",B="Verified",D="contracts/Badge.sol",L=[{inputs:[],stateMutability:"nonpayable",type:"constructor"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"address",name:"owner",type:"address"}],name:"ERC721IncorrectOwner",type:"error"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ERC721InsufficientApproval",type:"error"},{inputs:[{internalType:"address",name:"approver",type:"address"}],name:"ERC721InvalidApprover",type:"error"},{inputs:[{internalType:"address",name:"operator",type:"address"}],name:"ERC721InvalidOperator",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"ERC721InvalidOwner",type:"error"},{inputs:[{internalType:"address",name:"receiver",type:"address"}],name:"ERC721InvalidReceiver",type:"error"},{inputs:[{internalType:"address",name:"sender",type:"address"}],name:"ERC721InvalidSender",type:"error"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ERC721NonexistentToken",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"OwnableInvalidOwner",type:"error"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"OwnableUnauthorizedAccount",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"}],_="0x6080346200037f576001600160401b039060408181018381118382101762000369578152600e82526020916d566572696669656420426164676560901b838201528151938285018581108282111762000369578352600885526715995c9a599a595960c21b84860152815181811162000369576000948554916001948584811c941680156200035e575b838510146200034a578190601f94858111620002f7575b5083908583116001146200029357899262000287575b5050600019600383901b1c191690851b1786555b8651928311620002735783548481811c9116801562000268575b8282101462000254578281116200020c575b5080918311600114620001a557508495829394959262000199575b5050600019600383901b1c191690821b1790555b3315620001815760068054336001600160a01b03198216811790925591519290916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a36112919081620003858239f35b51631e4fbdf760e01b81526004810191909152602490fd5b01519050388062000111565b90601f198316968487528287209287905b898210620001f4575050838596979810620001da575b505050811b01905562000125565b015160001960f88460031b161c19169055388080620001cc565b808785968294968601518155019501930190620001b6565b8487528187208380860160051c8201928487106200024a575b0160051c019085905b8281106200023e575050620000f6565b8881550185906200022e565b9250819262000225565b634e487b7160e01b87526022600452602487fd5b90607f1690620000e4565b634e487b7160e01b86526041600452602486fd5b015190503880620000b6565b898052848a208894509190601f1984168b5b87828210620002e05750508411620002c6575b505050811b018655620000ca565b015160001960f88460031b161c19169055388080620002b8565b8385015186558b97909501949384019301620002a5565b9091508880528389208580850160051c82019286861062000340575b918991869594930160051c01915b82811062000331575050620000a0565b8b815585945089910162000321565b9250819262000313565b634e487b7160e01b88526022600452602488fd5b93607f169362000089565b634e487b7160e01b600052604160045260246000fd5b600080fdfe6080604081815260048036101561001557600080fd5b600092833560e01c90816301ffc9a714610eec5750806306fdde0314610e01578063081812fc14610d9d578063095ea7b314610c4d57806318160ddd14610c1057806323b872dd14610bfb57806342842e0e14610b605780636352211e14610b055780636a6278421461091f57806370a0823114610886578063715018a6146107e85780638da5cb5b1461079557806395d89b4114610623578063a22cb46514610520578063b88d4fde146102be578063c87b56dd1461024d578063e985e9c5146101d05763f2fde38b146100e957600080fd5b346101cc5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101cc57610120611038565b9061012961120a565b73ffffffffffffffffffffffffffffffffffffffff80921692831561019d575050600654827fffffffffffffffffffffffff0000000000000000000000000000000000000000821617600655167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b908460249251917f1e4fbdf7000000000000000000000000000000000000000000000000000000008352820152fd5b8280fd5b50503461024957807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102495760ff8160209361020e611038565b610216611060565b73ffffffffffffffffffffffffffffffffffffffff91821683526005875283832091168252855220549151911615158152f35b5080fd5b509190346102495760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102495761028c6102ba93356111a9565b50818151610299816110e3565b528051916102a6836110e3565b825251918291602083526020830190610fda565b0390f35b50346101cc5760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101cc576102f6611038565b916102ff611060565b906064359367ffffffffffffffff851161051c573660238601121561051c5784840135948661032d8761116f565b9161033a8551938461112e565b87835260209736602482840101116101cc578060248a93018386013783010152833b610364578680f35b856103d89173ffffffffffffffffffffffffffffffffffffffff98949596979880971696865193849283927f150b7a020000000000000000000000000000000000000000000000000000000097888552338d8601521660248401526044356044840152608060648401526084830190610fda565b038186895af18391816104c0575b5061045a5750503d15610452573d6103fd8161116f565b9061040a8451928361112e565b81528091863d92013e5b8051948561044c5750506024935051917f64a0ae92000000000000000000000000000000000000000000000000000000008352820152fd5b85925001fd5b506060610414565b7fffffffff00000000000000000000000000000000000000000000000000000000919296501603610492575050503880808080808680f35b6024935051917f64a0ae92000000000000000000000000000000000000000000000000000000008352820152fd5b9091508781813d8311610515575b6104d8818361112e565b8101031261051157517fffffffff00000000000000000000000000000000000000000000000000000000811681036105115790386103e6565b8380fd5b503d6104ce565b8580fd5b5090346101cc57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101cc57610558611038565b906024359182151580930361061f5773ffffffffffffffffffffffffffffffffffffffff169283156105f1575033845260056020528084208385526020528084207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0081541660ff8416179055519081527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160203392a380f35b8360249251917f5b08ba18000000000000000000000000000000000000000000000000000000008352820152fd5b8480fd5b50913461079257807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126107925781519181600192600154938460011c9160018616958615610788575b602096878510811461075c578899509688969785829a5291826000146107175750506001146106bb575b5050506102ba92916106ac91038561112e565b51928284938452830190610fda565b9190869350600183527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf65b8284106106ff57505050820101816106ac6102ba610699565b8054848a0186015288955087949093019281016106e6565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168782015293151560051b860190930193508492506106ac91506102ba9050610699565b60248360228c7f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b92607f169261066f565b80fd5b50503461024957817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102495760209073ffffffffffffffffffffffffffffffffffffffff600654169051908152f35b833461079257807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126107925761081f61120a565b8073ffffffffffffffffffffffffffffffffffffffff6006547fffffffffffffffffffffffff00000000000000000000000000000000000000008116600655167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b5091346107925760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126107925773ffffffffffffffffffffffffffffffffffffffff6108d4611038565b169283156108f15750806020938392526003845220549051908152f35b9060249251917f89c62b64000000000000000000000000000000000000000000000000000000008352820152fd5b50346101cc57602091827ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261051157610959611038565b61096161120a565b600754907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff92838314610ad9576001830160075573ffffffffffffffffffffffffffffffffffffffff809216918215610aaa576002908489528188528289205416968715159586610a68575b50838952600381528289206001815401905584895252808720827fffffffffffffffffffffffff000000000000000000000000000000000000000082541617905551947fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8780a4610a3c578280f35b916024927f73c6ac6e000000000000000000000000000000000000000000000000000000008352820152fd5b878252838a207fffffffffffffffffffffffff00000000000000000000000000000000000000008154169055888a5260038252838a20908154019055386109cd565b602486898451917f64a0ae92000000000000000000000000000000000000000000000000000000008352820152fd5b6024876011877f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b5091346107925760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610792575073ffffffffffffffffffffffffffffffffffffffff610b58602093356111a9565b915191168152f35b5090346101cc57610b7036611083565b9291908251610b7e816110e3565b868152813b610b8b578680f35b906103d896929173ffffffffffffffffffffffffffffffffffffffff809216958551927f150b7a020000000000000000000000000000000000000000000000000000000094858552338a86015216602484015260448301526080606483015281806020998a936084830190610fda565b833461079257610c0a36611083565b50505080f35b50503461024957817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610249576020906007549051908152f35b5090346101cc57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101cc57610c85611038565b91602435610c92816111a9565b33151580610d7d575b80610d48575b610d1957819073ffffffffffffffffffffffffffffffffffffffff809616958691167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258880a484526020528220907fffffffffffffffffffffffff000000000000000000000000000000000000000082541617905580f35b83517fa9fbf51f0000000000000000000000000000000000000000000000000000000081523381850152602490fd5b5073ffffffffffffffffffffffffffffffffffffffff81168652600560205283862033875260205260ff848720541615610ca1565b503373ffffffffffffffffffffffffffffffffffffffff82161415610c9b565b50346101cc5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101cc57816020938273ffffffffffffffffffffffffffffffffffffffff9335610df2816111a9565b50825285522054169051908152f35b50913461079257807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610792578151918182549260018460011c9160018616958615610ee2575b602096878510811461075c578899509688969785829a529182600014610717575050600114610e87575050506102ba92916106ac91038561112e565b91908693508280527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5635b828410610eca57505050820101816106ac6102ba610699565b8054848a018601528895508794909301928101610eb1565b92607f1692610e4b565b925050346101cc5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101cc57357fffffffff0000000000000000000000000000000000000000000000000000000081168091036101cc57602092507f80ac58cd000000000000000000000000000000000000000000000000000000008114908115610fb0575b8115610f86575b5015158152f35b7f01ffc9a70000000000000000000000000000000000000000000000000000000091501438610f7f565b7f5b5e139f0000000000000000000000000000000000000000000000000000000081149150610f78565b919082519283825260005b8481106110245750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8460006020809697860101520116010190565b602081830181015184830182015201610fe5565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361105b57565b600080fd5b6024359073ffffffffffffffffffffffffffffffffffffffff8216820361105b57565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc606091011261105b5773ffffffffffffffffffffffffffffffffffffffff90600435828116810361105b5791602435908116810361105b579060443590565b6020810190811067ffffffffffffffff8211176110ff57604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176110ff57604052565b67ffffffffffffffff81116110ff57601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b80600052600260205273ffffffffffffffffffffffffffffffffffffffff604060002054169081156111d9575090565b602490604051907f7e2732890000000000000000000000000000000000000000000000000000000082526004820152fd5b73ffffffffffffffffffffffffffffffffffffffff60065416330361122b57565b60246040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152fdfea2646970667358221220083e7fa1c032fb5a4bba76690b0323350a9739b613a134d4a7afbcd7453c0bb864736f6c63430008180033",U="0x6080604081815260048036101561001557600080fd5b600092833560e01c90816301ffc9a714610eec5750806306fdde0314610e01578063081812fc14610d9d578063095ea7b314610c4d57806318160ddd14610c1057806323b872dd14610bfb57806342842e0e14610b605780636352211e14610b055780636a6278421461091f57806370a0823114610886578063715018a6146107e85780638da5cb5b1461079557806395d89b4114610623578063a22cb46514610520578063b88d4fde146102be578063c87b56dd1461024d578063e985e9c5146101d05763f2fde38b146100e957600080fd5b346101cc5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101cc57610120611038565b9061012961120a565b73ffffffffffffffffffffffffffffffffffffffff80921692831561019d575050600654827fffffffffffffffffffffffff0000000000000000000000000000000000000000821617600655167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b908460249251917f1e4fbdf7000000000000000000000000000000000000000000000000000000008352820152fd5b8280fd5b50503461024957807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102495760ff8160209361020e611038565b610216611060565b73ffffffffffffffffffffffffffffffffffffffff91821683526005875283832091168252855220549151911615158152f35b5080fd5b509190346102495760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102495761028c6102ba93356111a9565b50818151610299816110e3565b528051916102a6836110e3565b825251918291602083526020830190610fda565b0390f35b50346101cc5760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101cc576102f6611038565b916102ff611060565b906064359367ffffffffffffffff851161051c573660238601121561051c5784840135948661032d8761116f565b9161033a8551938461112e565b87835260209736602482840101116101cc578060248a93018386013783010152833b610364578680f35b856103d89173ffffffffffffffffffffffffffffffffffffffff98949596979880971696865193849283927f150b7a020000000000000000000000000000000000000000000000000000000097888552338d8601521660248401526044356044840152608060648401526084830190610fda565b038186895af18391816104c0575b5061045a5750503d15610452573d6103fd8161116f565b9061040a8451928361112e565b81528091863d92013e5b8051948561044c5750506024935051917f64a0ae92000000000000000000000000000000000000000000000000000000008352820152fd5b85925001fd5b506060610414565b7fffffffff00000000000000000000000000000000000000000000000000000000919296501603610492575050503880808080808680f35b6024935051917f64a0ae92000000000000000000000000000000000000000000000000000000008352820152fd5b9091508781813d8311610515575b6104d8818361112e565b8101031261051157517fffffffff00000000000000000000000000000000000000000000000000000000811681036105115790386103e6565b8380fd5b503d6104ce565b8580fd5b5090346101cc57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101cc57610558611038565b906024359182151580930361061f5773ffffffffffffffffffffffffffffffffffffffff169283156105f1575033845260056020528084208385526020528084207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0081541660ff8416179055519081527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160203392a380f35b8360249251917f5b08ba18000000000000000000000000000000000000000000000000000000008352820152fd5b8480fd5b50913461079257807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126107925781519181600192600154938460011c9160018616958615610788575b602096878510811461075c578899509688969785829a5291826000146107175750506001146106bb575b5050506102ba92916106ac91038561112e565b51928284938452830190610fda565b9190869350600183527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf65b8284106106ff57505050820101816106ac6102ba610699565b8054848a0186015288955087949093019281016106e6565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168782015293151560051b860190930193508492506106ac91506102ba9050610699565b60248360228c7f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b92607f169261066f565b80fd5b50503461024957817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102495760209073ffffffffffffffffffffffffffffffffffffffff600654169051908152f35b833461079257807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126107925761081f61120a565b8073ffffffffffffffffffffffffffffffffffffffff6006547fffffffffffffffffffffffff00000000000000000000000000000000000000008116600655167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b5091346107925760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126107925773ffffffffffffffffffffffffffffffffffffffff6108d4611038565b169283156108f15750806020938392526003845220549051908152f35b9060249251917f89c62b64000000000000000000000000000000000000000000000000000000008352820152fd5b50346101cc57602091827ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261051157610959611038565b61096161120a565b600754907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff92838314610ad9576001830160075573ffffffffffffffffffffffffffffffffffffffff809216918215610aaa576002908489528188528289205416968715159586610a68575b50838952600381528289206001815401905584895252808720827fffffffffffffffffffffffff000000000000000000000000000000000000000082541617905551947fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8780a4610a3c578280f35b916024927f73c6ac6e000000000000000000000000000000000000000000000000000000008352820152fd5b878252838a207fffffffffffffffffffffffff00000000000000000000000000000000000000008154169055888a5260038252838a20908154019055386109cd565b602486898451917f64a0ae92000000000000000000000000000000000000000000000000000000008352820152fd5b6024876011877f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b5091346107925760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610792575073ffffffffffffffffffffffffffffffffffffffff610b58602093356111a9565b915191168152f35b5090346101cc57610b7036611083565b9291908251610b7e816110e3565b868152813b610b8b578680f35b906103d896929173ffffffffffffffffffffffffffffffffffffffff809216958551927f150b7a020000000000000000000000000000000000000000000000000000000094858552338a86015216602484015260448301526080606483015281806020998a936084830190610fda565b833461079257610c0a36611083565b50505080f35b50503461024957817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610249576020906007549051908152f35b5090346101cc57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101cc57610c85611038565b91602435610c92816111a9565b33151580610d7d575b80610d48575b610d1957819073ffffffffffffffffffffffffffffffffffffffff809616958691167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258880a484526020528220907fffffffffffffffffffffffff000000000000000000000000000000000000000082541617905580f35b83517fa9fbf51f0000000000000000000000000000000000000000000000000000000081523381850152602490fd5b5073ffffffffffffffffffffffffffffffffffffffff81168652600560205283862033875260205260ff848720541615610ca1565b503373ffffffffffffffffffffffffffffffffffffffff82161415610c9b565b50346101cc5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101cc57816020938273ffffffffffffffffffffffffffffffffffffffff9335610df2816111a9565b50825285522054169051908152f35b50913461079257807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610792578151918182549260018460011c9160018616958615610ee2575b602096878510811461075c578899509688969785829a529182600014610717575050600114610e87575050506102ba92916106ac91038561112e565b91908693508280527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5635b828410610eca57505050820101816106ac6102ba610699565b8054848a018601528895508794909301928101610eb1565b92607f1692610e4b565b925050346101cc5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101cc57357fffffffff0000000000000000000000000000000000000000000000000000000081168091036101cc57602092507f80ac58cd000000000000000000000000000000000000000000000000000000008114908115610fb0575b8115610f86575b5015158152f35b7f01ffc9a70000000000000000000000000000000000000000000000000000000091501438610f7f565b7f5b5e139f0000000000000000000000000000000000000000000000000000000081149150610f78565b919082519283825260005b8481106110245750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8460006020809697860101520116010190565b602081830181015184830182015201610fe5565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361105b57565b600080fd5b6024359073ffffffffffffffffffffffffffffffffffffffff8216820361105b57565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc606091011261105b5773ffffffffffffffffffffffffffffffffffffffff90600435828116810361105b5791602435908116810361105b579060443590565b6020810190811067ffffffffffffffff8211176110ff57604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176110ff57604052565b67ffffffffffffffff81116110ff57601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b80600052600260205273ffffffffffffffffffffffffffffffffffffffff604060002054169081156111d9575090565b602490604051907f7e2732890000000000000000000000000000000000000000000000000000000082526004820152fd5b73ffffffffffffffffffffffffffffffffffffffff60065416330361122b57565b60246040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152fdfea2646970667358221220083e7fa1c032fb5a4bba76690b0323350a9739b613a134d4a7afbcd7453c0bb864736f6c63430008180033",z={},P={},H={_format:$,contractName:B,sourceName:D,abi:L,bytecode:_,deployedBytecode:U,linkReferences:z,deployedLinkReferences:P};let e,f={Game:void 0,GameFrontend:void 0,Award:void 0,Badge:void 0};async function d(){e||(e=new c(a.rpcUrl)),f.Game||(f.Game=new n(a.contracts.Game,m.abi,e)),f.GameFrontend||(f.GameFrontend=new n(a.contracts.GameFrontend,x.abi,e)),f.Award||(f.Award=new n(a.contracts.Award,G.abi,e)),f.Badge||(f.Badge=new n(a.contracts.Badge,H.abi,e))}async function W(b,t){return await d(),await f.GameFrontend.getNfts(b,t)}async function j(){return await d(),await f.GameFrontend.gameStatus()}async function q(b){return await d(),await f.GameFrontend.getTopSolvers(b)}async function K(b){return await d(),await f.GameFrontend.getPortfolioMaker(b)}async function Q(b){return await d(),await f.GameFrontend.getPortfolioSolver(b)}export{H as B,m as G,G as U,x as a,j as b,q as c,K as d,Q as e,W as g}; +import{J as c,c as a,C as n}from"./index-b6Nsj3zY.js";const i="hh-sol-artifact-1",s="Game",p="contracts/Game.sol",r=[{inputs:[],stateMutability:"nonpayable",type:"constructor"},{inputs:[{internalType:"address",name:"target",type:"address"}],name:"AddressEmptyCode",type:"error"},{inputs:[],name:"ECDSAInvalidSignature",type:"error"},{inputs:[{internalType:"uint256",name:"length",type:"uint256"}],name:"ECDSAInvalidSignatureLength",type:"error"},{inputs:[{internalType:"bytes32",name:"s",type:"bytes32"}],name:"ECDSAInvalidSignatureS",type:"error"},{inputs:[],name:"ERC721EnumerableForbiddenBatchMint",type:"error"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"address",name:"owner",type:"address"}],name:"ERC721IncorrectOwner",type:"error"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ERC721InsufficientApproval",type:"error"},{inputs:[{internalType:"address",name:"approver",type:"address"}],name:"ERC721InvalidApprover",type:"error"},{inputs:[{internalType:"address",name:"operator",type:"address"}],name:"ERC721InvalidOperator",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"ERC721InvalidOwner",type:"error"},{inputs:[{internalType:"address",name:"receiver",type:"address"}],name:"ERC721InvalidReceiver",type:"error"},{inputs:[{internalType:"address",name:"sender",type:"address"}],name:"ERC721InvalidSender",type:"error"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ERC721NonexistentToken",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"index",type:"uint256"}],name:"ERC721OutOfBoundsIndex",type:"error"},{inputs:[],name:"FailedInnerCall",type:"error"},{inputs:[],name:"InvalidInitialization",type:"error"},{inputs:[],name:"NotInitializing",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"OwnableInvalidOwner",type:"error"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"OwnableUnauthorizedAccount",type:"error"},{inputs:[{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"length",type:"uint256"}],name:"StringsInsufficientHexLength",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint64",name:"version",type:"uint64"}],name:"Initialized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"accountImplementation",outputs:[{internalType:"contract Wallet",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"}],name:"addAllowlist",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"allowlist",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"awardToken",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"counter",type:"uint256"}],name:"counterToTokenId",outputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"createAccount",outputs:[{internalType:"contract Wallet",name:"ret",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"}],name:"delAllowlist",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"salt",type:"uint256"}],name:"getAccountAddress",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"getAccountAddress",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"address",name:"nftAddress",type:"address"}],name:"hasBadge",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"initialOwner_",type:"address"},{internalType:"address",name:"awardToken_",type:"address"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"isEnded",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"isOngoing",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"isSolved",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"id",type:"uint256"}],name:"metas",outputs:[{components:[{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"description",type:"string"},{internalType:"string",name:"gameType",type:"string"},{internalType:"bytes32",name:"prompt",type:"bytes32"},{internalType:"bytes32",name:"secret",type:"bytes32"},{internalType:"uint128",name:"start",type:"uint128"},{internalType:"uint128",name:"end",type:"uint128"},{internalType:"address",name:"winner",type:"address"}],internalType:"struct Metadata",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"}],name:"mint",outputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{components:[{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"description",type:"string"},{internalType:"string",name:"gameType",type:"string"},{internalType:"bytes32",name:"prompt",type:"bytes32"},{internalType:"bytes32",name:"secret",type:"bytes32"},{internalType:"uint128",name:"start",type:"uint128"},{internalType:"uint128",name:"end",type:"uint128"},{internalType:"address",name:"winner",type:"address"}],internalType:"struct Metadata",name:"metadata",type:"tuple"},{internalType:"uint256",name:"awards",type:"uint256"}],name:"mint",outputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"solver",type:"address"}],name:"registeredSolver",outputs:[{internalType:"bool",name:"registered",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"salts",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes32",name:"secretHash",type:"bytes32"},{internalType:"address",name:"winner",type:"address"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"solved",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"solver",type:"address"}],name:"solvedAwards",outputs:[{internalType:"uint256",name:"totalAwards",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"solver",type:"address"}],name:"solvedCounts",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"solver",type:"address"},{internalType:"uint256",name:"",type:"uint256"}],name:"solvedGames",outputs:[{internalType:"uint256",name:"tokenIds",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"}],name:"solvedGamesTokenIds",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"solverList",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"solverListLength",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"index",type:"uint256"}],name:"tokenByIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenIdToCounter",outputs:[{internalType:"uint256",name:"counter",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"index",type:"uint256"}],name:"tokenOfOwnerByIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalEnd",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalOngoing",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSolved",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalVerified",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"address",name:"nftAddress",type:"address"}],name:"verified",outputs:[],stateMutability:"nonpayable",type:"function"}],y="0x60806040523480156200001157600080fd5b506200001c6200002c565b620000266200002c565b620000e0565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff16156200007d5760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b0390811614620000dd5780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b615bbf80620000f06000396000f3fe60806040523480156200001157600080fd5b5060043610620003695760003560e01c8063715018a611620001dc578063b23e44801162000119578063e715de2811620000af578063f2fde38b1162000086578063f2fde38b1462000888578063f9bc3f40146200089f578063fe7f43da14620008a9578063fe9eba1514620008c057600080fd5b8063e715de281462000850578063e985e9c51462000867578063ef792662146200087e57600080fd5b8063c516e15611620000f0578063c516e1561462000805578063c87b56dd146200080e578063d2da7bca1462000825578063d3c6fd90146200083957600080fd5b8063b23e448014620007b4578063b66f7a8b14620007d7578063b88d4fde14620007ee57600080fd5b806395d89b41116200018f5780639dd3e25511620001665780639dd3e255146200072e578063a22cb4651462000751578063a7cd52cb1462000768578063ac9650d8146200078e57600080fd5b806395d89b4114620006f657806395ecc64214620007005780639859387b146200071757600080fd5b8063715018a6146200065e57806374de69e314620006685780637b80e8e6146200067f57806385604ba41462000688578063867211f314620006ae5780638da5cb5b14620006c557600080fd5b8063415fa50a11620002ab57806354c87af4116200025e5780636352211e11620002355780636352211e14620005f3578063676db981146200060a5780636a627842146200063057806370a08231146200064757600080fd5b806354c87af414620005a25780635872fe4514620005c55780635f6928e214620005dc57600080fd5b8063415fa50a146200050c57806342842e0e146200052f578063485cc95514620005465780634cd88b76146200055d5780634f6ccce71462000574578063502c040b146200058b57600080fd5b80630d253d76116200032157806323b872dd11620002f857806323b872dd14620004a157806324d7356714620004b8578063277ecfbb14620004cf5780632f745c5914620004f557600080fd5b80630d253d76146200045f57806311464fbe146200047657806318160ddd146200048a57600080fd5b80627c94b6146200036e57806301ffc9a714620003a45780630661d1dc14620003cc57806306fdde0314620003fd578063081812fc1462000416578063095ea7b31462000446575b600080fd5b620003916200037f36600462003be6565b600a6020526000908152604090205481565b6040519081526020015b60405180910390f35b620003bb620003b536600462003c1b565b620008c9565b60405190151581526020016200039b565b620003bb620003dd36600462003c3b565b6000908152600360205260409020600601546001600160a01b0316151590565b62000407620008f7565b6040516200039b919062003ca9565b6200042d6200042736600462003c3b565b620009a4565b6040516001600160a01b0390911681526020016200039b565b6200045d6200045736600462003cbe565b620009bd565b005b6200042d6200047036600462003cbe565b620009ce565b6000546200042d906001600160a01b031681565b60008051602062005b6a8339815191525462000391565b6200045d620004b236600462003ceb565b62000a96565b6200045d620004c936600462003d2c565b62000b2b565b620004e6620004e036600462003c3b565b62000d64565b6040516200039b919062003d5b565b620003916200050636600462003cbe565b62000fde565b620003916200051d36600462003be6565b600b6020526000908152604090205481565b6200045d6200054036600462003ceb565b62001057565b6200045d6200055736600462003e21565b62001079565b6200045d6200056e36600462003f26565b6200120c565b620003916200058536600462003c3b565b620012e8565b620003bb6200059c36600462003d2c565b62001368565b62000391620005b336600462003c3b565b60066020526000908152604090205481565b6200042d620005d636600462003be6565b620013e2565b6200045d620005ed36600462003be6565b62001445565b6200042d6200060436600462003c3b565b62001473565b620003bb6200061b36600462003be6565b600c6020526000908152604090205460ff1681565b620003916200064136600462003be6565b62001480565b620003916200065836600462003be6565b620014b8565b6200045d62001517565b620003916200067936600462003cbe565b6200152f565b600d5462000391565b6200069f6200069936600462003be6565b62001561565b6040516200039b919062003f90565b6200045d620006bf36600462003be6565b620015cf565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b03166200042d565b62000407620015fa565b620003bb6200071136600462003c3b565b6200163c565b6200042d6200072836600462003be6565b6200189d565b620003916200073f36600462003c3b565b60056020526000908152604090205481565b6200045d6200076236600462003fe5565b6200197a565b620003bb6200077936600462003be6565b60046020526000908152604090205460ff1681565b620007a56200079f36600462004021565b62001987565b6040516200039b91906200409a565b62000391620007c536600462003be6565b60016020526000908152604090205481565b620003bb620007e836600462003c3b565b62001a81565b6200045d620007ff36600462004102565b62001cc8565b60075462000391565b620004076200081f36600462003c3b565b62001ce3565b6002546200042d906001600160a01b031681565b6200045d6200084a36600462004171565b62002079565b6200039162000861366004620041d5565b62002501565b620003bb6200087836600462003e21565b6200271e565b620003916200276b565b6200045d6200089936600462003be6565b62002799565b62000391620027dd565b6200042d620008ba36600462003c3b565b620027f1565b60085462000391565b60006001600160e01b0319821663780e9d6360e01b1480620008f15750620008f1826200281c565b92915050565b60008051602062005ac283398151915280546060919081906200091a9062004302565b80601f0160208091040260200160405190810160405280929190818152602001828054620009489062004302565b8015620009995780601f106200096d5761010080835404028352916020019162000999565b820191906000526020600020905b8154815290600101906020018083116200097b57829003601f168201915b505050505091505090565b6000620009b1826200286f565b50620008f182620028ab565b620009ca828233620028e5565b5050565b600062000a8f8260001b60405180602001620009ea9062003bad565b601f1982820381018352601f9091011660408190526000546001600160a01b03888116602484015216906044015b60408051601f19818403018152918152602080830180516001600160e01b031663189acdbd60e31b179052905162000a53939291016200433e565b60408051601f198184030181529082905262000a73929160200162004382565b60405160208183030381529060405280519060200120620028f4565b9392505050565b6001600160a01b03821662000ac657604051633250574960e11b8152600060048201526024015b60405180910390fd5b600062000ad583833362002903565b9050836001600160a01b0316816001600160a01b03161462000b25576040516364283d7b60e01b81526001600160a01b038086166004830152602482018490528216604482015260640162000abd565b50505050565b3360009081526004602052604090205460ff1662000b7b5760405162461bcd60e51b815260206004820152600c60248201526b2737ba1030b63637bbb2b21760a11b604482015260640162000abd565b60008281526003602052604090206005810154426001600160801b03909116111562000bd55760405162461bcd60e51b81526020600482015260086024820152672737ba103cb2ba1760c11b604482015260640162000abd565b600581015442600160801b9091046001600160801b0316101562000c285760405162461bcd60e51b815260206004820152600960248201526827baba3230ba32b21760b91b604482015260640162000abd565b60068101546001600160a01b03161562000c775760405162461bcd60e51b815260206004820152600f60248201526e20b63932b0b23c9039b7b63b32b21760891b604482015260640162000abd565b6040516370a0823160e01b81526001600160a01b0384811660048301528316906370a0823190602401602060405180830381865afa15801562000cbe573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000ce49190620043b5565b60000362000d275760405162461bcd60e51b815260206004820152600f60248201526e2430bb32903737903130b233b2b99760891b604482015260640162000abd565b6006810180546001600160a01b0319166001600160a01b03179055600880546001919060009062000d5a908490620043e5565b9091555050505050565b604080516101008101825260608082526020820181905291810182905260009181018290526080810182905260a0810182905260c0810182905260e0810191909152600082815260036020526040908190208151610100810190925280548290829062000dd19062004302565b80601f016020809104026020016040519081016040528092919081815260200182805462000dff9062004302565b801562000e505780601f1062000e245761010080835404028352916020019162000e50565b820191906000526020600020905b81548152906001019060200180831162000e3257829003601f168201915b5050505050815260200160018201805462000e6b9062004302565b80601f016020809104026020016040519081016040528092919081815260200182805462000e999062004302565b801562000eea5780601f1062000ebe5761010080835404028352916020019162000eea565b820191906000526020600020905b81548152906001019060200180831162000ecc57829003601f168201915b5050505050815260200160028201805462000f059062004302565b80601f016020809104026020016040519081016040528092919081815260200182805462000f339062004302565b801562000f845780601f1062000f585761010080835404028352916020019162000f84565b820191906000526020600020905b81548152906001019060200180831162000f6657829003601f168201915b5050509183525050600382015460208201526004820154604082015260058201546001600160801b038082166060840152600160801b9091041660808201526006909101546001600160a01b031660a09091015292915050565b600060008051602062005aa283398151915262000ffb84620014b8565b83106200102e5760405163295f44f760e21b81526001600160a01b03851660048201526024810184905260440162000abd565b6001600160a01b0384166000908152602091825260408082208583529092522054905092915050565b620010748383836040518060200160405280600081525062001cc8565b505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff1615906001600160401b0316600081158015620010bf5750825b90506000826001600160401b03166001148015620010dc5750303b155b905081158015620010eb575080155b156200110a5760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff1916600117855583156200113557845460ff60401b1916600160401b1785555b620011916040518060400160405280601781526020017f436170747572652d7468652d50726f6d70742047616d650000000000000000008152506040518060400160405280600381526020016204354560ec1b81525062002a14565b6200119b62002a4c565b620011a562002a56565b620011b08762002a6a565b620011bc878762002a74565b83156200120357845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50505050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff1615906001600160401b0316600081158015620012525750825b90506000826001600160401b031660011480156200126f5750303b155b9050811580156200127e575080155b156200129d5760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff191660011785558315620012c857845460ff60401b1916600160401b1785555b620012d4878762002a14565b620012de62002a4c565b620011bc62002a56565b600060008051602062005aa28339815191526200131260008051602062005b6a8339815191525490565b83106200133d5760405163295f44f760e21b8152600060048201526024810184905260440162000abd565b806002018381548110620013555762001355620043fb565b9060005260206000200154915050919050565b6040516370a0823160e01b81526001600160a01b038381166004830152600091908316906370a0823190602401602060405180830381865afa158015620013b3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620013d99190620043b5565b15159392505050565b6001600160a01b0381166000908152600160209081526040808320549051620008f1926200141290820162003bad565b601f1982820381018352601f9091011660408190526000546001600160a01b038781166024840152169060440162000a18565b6200144f62002ab6565b6001600160a01b03166000908152600460205260409020805460ff19166001179055565b6000620008f1826200286f565b60405162461bcd60e51b81526020600482015260096024820152682234b9b0b13632b21760b91b604482015260009060640162000abd565b600060008051602062005ac28339815191526001600160a01b038316620014f6576040516322718ad960e21b81526000600482015260240162000abd565b6001600160a01b039092166000908152600390920160205250604090205490565b6200152162002ab6565b6200152d600062002b14565b565b600960205281600052604060002081815481106200154c57600080fd5b90600052602060002001600091509150505481565b6001600160a01b038116600090815260096020908152604091829020805483518184028101840190945280845260609392830182828015620015c357602002820191906000526020600020905b815481526020019060010190808311620015ae575b50505050509050919050565b620015d962002ab6565b6001600160a01b03166000908152600460205260409020805460ff19169055565b7f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079301805460609160008051602062005ac2833981519152916200091a9062004302565b60008181526003602052604080822081516101008101909252805483929190829082906200166a9062004302565b80601f0160208091040260200160405190810160405280929190818152602001828054620016989062004302565b8015620016e95780601f10620016bd57610100808354040283529160200191620016e9565b820191906000526020600020905b815481529060010190602001808311620016cb57829003601f168201915b50505050508152602001600182018054620017049062004302565b80601f0160208091040260200160405190810160405280929190818152602001828054620017329062004302565b8015620017835780601f10620017575761010080835404028352916020019162001783565b820191906000526020600020905b8154815290600101906020018083116200176557829003601f168201915b505050505081526020016002820180546200179e9062004302565b80601f0160208091040260200160405190810160405280929190818152602001828054620017cc9062004302565b80156200181d5780601f10620017f1576101008083540402835291602001916200181d565b820191906000526020600020905b815481529060010190602001808311620017ff57829003601f168201915b5050509183525050600382015460208201526004820154604082015260058201546001600160801b038082166060840152600160801b909104811660808301526006909201546001600160a01b031660a0918201528201519192504291161180159062000a8f5750428160c001516001600160801b031610159392505050565b600080620018ab83620013e2565b90506001600160a01b0381163b8015620018c6575092915050565b6001600160a01b0384166000908152600160205260408120805491620018ec8362004411565b909155506000546040516001600160a01b0387811660248301529091169060440160408051601f198184030181529181526020820180516001600160e01b031663189acdbd60e31b17905251620019439062003bad565b620019509291906200433e565b8190604051809103906000f590508015801562001971573d6000803e3d6000fd5b50949350505050565b620009ca33838362002b85565b604080516000815260208101909152606090826001600160401b03811115620019b457620019b462003e50565b604051908082528060200260200182016040528015620019e957816020015b6060815260200190600190039081620019d35790505b50915060005b8381101562001a795762001a503086868481811062001a125762001a12620043fb565b905060200281019062001a26919062004443565b8560405160200162001a3b9392919062004493565b60405160208183030381529060405262002c39565b83828151811062001a655762001a65620043fb565b6020908102919091010152600101620019ef565b505092915050565b600081815260036020526040808220815161010081019092528054839291908290829062001aaf9062004302565b80601f016020809104026020016040519081016040528092919081815260200182805462001add9062004302565b801562001b2e5780601f1062001b025761010080835404028352916020019162001b2e565b820191906000526020600020905b81548152906001019060200180831162001b1057829003601f168201915b5050505050815260200160018201805462001b499062004302565b80601f016020809104026020016040519081016040528092919081815260200182805462001b779062004302565b801562001bc85780601f1062001b9c5761010080835404028352916020019162001bc8565b820191906000526020600020905b81548152906001019060200180831162001baa57829003601f168201915b5050505050815260200160028201805462001be39062004302565b80601f016020809104026020016040519081016040528092919081815260200182805462001c119062004302565b801562001c625780601f1062001c365761010080835404028352916020019162001c62565b820191906000526020600020905b81548152906001019060200180831162001c4457829003601f168201915b5050509183525050600382015460208201526004820154604082015260058201546001600160801b038082166060840152600160801b909104811660808301526006909201546001600160a01b031660a09091015260c090910151429116109392505050565b62001cd584848462000a96565b62000b258484848462002cb5565b606062001cf0826200286f565b506000828152600360205260408082208151610100810190925280548290829062001d1b9062004302565b80601f016020809104026020016040519081016040528092919081815260200182805462001d499062004302565b801562001d9a5780601f1062001d6e5761010080835404028352916020019162001d9a565b820191906000526020600020905b81548152906001019060200180831162001d7c57829003601f168201915b5050505050815260200160018201805462001db59062004302565b80601f016020809104026020016040519081016040528092919081815260200182805462001de39062004302565b801562001e345780601f1062001e085761010080835404028352916020019162001e34565b820191906000526020600020905b81548152906001019060200180831162001e1657829003601f168201915b5050505050815260200160028201805462001e4f9062004302565b80601f016020809104026020016040519081016040528092919081815260200182805462001e7d9062004302565b801562001ece5780601f1062001ea25761010080835404028352916020019162001ece565b820191906000526020600020905b81548152906001019060200180831162001eb057829003601f168201915b505050918352505060038201546020808301919091526004830154604083015260058301546001600160801b03808216606080860191909152600160801b9092041660808401526006909301546001600160a01b031660a09092019190915282820151929350909160009162001f45919062002deb565b608084015162001f5790602062002deb565b60405160200162001f6a929190620044bc565b604051602081830303815290604052905082604001518162001f998560a001516001600160801b031662002f80565b62001fb18660c001516001600160801b031662002f80565b62001fc98760e001516001600160a01b031662003019565b60405160200162001fdf9594939291906200456e565b6040516020818303038152906040529150506200204f826000015183602001516200200962003031565b600088815260066020526040902054620020239062002f80565b856040516020016200203a9594939291906200474e565b60405160208183030381529060405262003052565b60405160200162002061919062004872565b60405160208183030381529060405292505050919050565b3360009081526004602052604090205460ff16620020c95760405162461bcd60e51b815260206004820152600c60248201526b2737ba1030b63637bbb2b21760a11b604482015260640162000abd565b604080516020808201879052818301869052825180830384018152606090920190925280519101207f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c90206001600160a01b038316620021378284620031c3565b6001600160a01b031614620021845760405162461bcd60e51b815260206004820152601260248201527124b73b30b634b21039b4b3b730ba3ab9329760711b604482015260640162000abd565b6000858152600360209081526040918290208251918201879052910160405160208183030381529060405280519060200120816004015414620022005760405162461bcd60e51b815260206004820152601360248201527224b73b30b634b21039b2b1b932ba2430b9b41760691b604482015260640162000abd565b6005810154426001600160801b0390911611156200224c5760405162461bcd60e51b81526020600482015260086024820152672737ba103cb2ba1760c11b604482015260640162000abd565b600581015442600160801b9091046001600160801b031610156200229f5760405162461bcd60e51b815260206004820152600960248201526827baba3230ba32b21760b91b604482015260640162000abd565b60068101546001600160a01b031615620022ee5760405162461bcd60e51b815260206004820152600f60248201526e20b63932b0b23c9039b7b63b32b21760891b604482015260640162000abd565b6006810180546001600160a01b0319166001600160a01b038616179055600780546001919060009062002323908490620043e5565b90915550506001600160a01b0384166000818152600960209081526040808320805460018181018355918552838520018b9055938352600a9091528120805490919062002372908490620043e5565b90915550506002546040516370a0823160e01b81526001600160a01b038881166004830152909116906370a0823190602401602060405180830381865afa158015620023c2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620023e89190620043b5565b6001600160a01b0385166000908152600b60205260408120805490919062002412908490620043e5565b909155505060405163189acdbd60e31b81526001600160a01b03858116600483015287169063c4d66de890602401600060405180830381600087803b1580156200245b57600080fd5b505af115801562002470573d6000803e3d6000fd5b505050506001600160a01b0384166000908152600c602052604090205460ff16620024f957600d805460018082019092557fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb50180546001600160a01b0319166001600160a01b0387169081179091556000908152600c60205260409020805460ff191690911790555b505050505050565b6000806200250f856200189d565b9050806001600160a01b03169150620025298583620031f1565b8215620025c0576002546001600160a01b03166323b872dd336040516001600160e01b031960e084901b1681526001600160a01b0391821660048201529084166024820152604481018690526064016020604051808303816000875af115801562002598573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620025be9190620048b9565b505b5060006001620025dd60008051602062005b6a8339815191525490565b620025e991906200442d565b600081815260056020908152604080832086905585835260068252808320939093558251610100810184528751815287820151818301528784015181850152606080890151908201526080808901519082015260a0808901516001600160801b039081169183019190915260c0808a01519091169082015260e081018390528583526003909152919020815191925090819062002687908262004925565b50602082015160018201906200269e908262004925565b5060408201516002820190620026b5908262004925565b50606082015160038201556080820151600482015560a082015160c08301516001600160801b03908116600160801b02911617600582015560e090910151600690910180546001600160a01b039092166001600160a01b03199092169190911790559392505050565b6001600160a01b0391821660009081527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab00793056020908152604080832093909416825291909152205460ff1690565b600062002777620027dd565b60008051602062005b6a833981519152546200279491906200442d565b905090565b620027a362002ab6565b6001600160a01b038116620027cf57604051631e4fbdf760e01b81526000600482015260240162000abd565b620027da8162002b14565b50565b6000600854600754620027949190620043e5565b600d81815481106200280257600080fd5b6000918252602090912001546001600160a01b0316905081565b60006001600160e01b031982166380ac58cd60e01b14806200284e57506001600160e01b03198216635b5e139f60e01b145b80620008f157506301ffc9a760e01b6001600160e01b0319831614620008f1565b6000806200287d836200325c565b90506001600160a01b038116620008f157604051637e27328960e01b81526004810184905260240162000abd565b60009081527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930460205260409020546001600160a01b031690565b62001074838383600162003296565b600062000a8f838330620033b8565b60008062002913858585620033e2565b90506001600160a01b038116620029a0576200299a8460008051602062005b6a833981519152805460008381527f645e039705490088daad89bae25049a34f4a9072d398537b1ab2425f24cbed0360205260408120829055600182018355919091527fa42f15e5d656f8155fd7419d740a6073999f19cd6e061449ce4a257150545bf20155565b620029c6565b846001600160a01b0316816001600160a01b031614620029c657620029c68185620034f6565b6001600160a01b038516620029e657620029e0846200359e565b62002a0c565b846001600160a01b0316816001600160a01b03161462002a0c5762002a0c858562003682565b949350505050565b62002a1e620036e2565b60008051602062005ac28339815191528062002a3b848262004925565b506001810162000b25838262004925565b6200152d620036e2565b62002a60620036e2565b6200152d6200372c565b620027a3620036e2565b62002a7e620036e2565b600280546001600160a01b0319166001600160a01b03928316179055166000908152600460205260409020805460ff19166001179055565b3362002ae97f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b0316146200152d5760405163118cdaa760e01b815233600482015260240162000abd565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b60008051602062005ac28339815191526001600160a01b03831662002bc957604051630b61174360e31b81526001600160a01b038416600482015260240162000abd565b6001600160a01b038481166000818152600584016020908152604080832094881680845294825291829020805460ff191687151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a350505050565b6060600080846001600160a01b03168460405162002c589190620049f1565b600060405180830381855af49150503d806000811462002c95576040519150601f19603f3d011682016040523d82523d6000602084013e62002c9a565b606091505b509150915062002cac8583836200377a565b95945050505050565b6001600160a01b0383163b1562000b2557604051630a85bd0160e11b81526001600160a01b0384169063150b7a029062002cfa90339088908790879060040162004a0f565b6020604051808303816000875af192505050801562002d38575060408051601f3d908101601f1916820190925262002d359181019062004a4e565b60015b62002da6573d80801562002d69576040519150601f19603f3d011682016040523d82523d6000602084013e62002d6e565b606091505b50805160000362002d9e57604051633250574960e11b81526001600160a01b038516600482015260240162000abd565b805181602001fd5b6001600160e01b03198116630a85bd0160e11b1462002de457604051633250574960e11b81526001600160a01b038516600482015260240162000abd565b5050505050565b606082600062002dfd84600262004a6e565b62002e0a906002620043e5565b6001600160401b0381111562002e245762002e2462003e50565b6040519080825280601f01601f19166020018201604052801562002e4f576020820181803683370190505b509050600360fc1b8160008151811062002e6d5762002e6d620043fb565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811062002e9f5762002e9f620043fb565b60200101906001600160f81b031916908160001a905350600062002ec585600262004a6e565b62002ed2906001620043e5565b90505b600181111562002f54576f181899199a1a9b1b9c1cb0b131b232b360811b83600f166010811062002f0a5762002f0a620043fb565b1a60f81b82828151811062002f235762002f23620043fb565b60200101906001600160f81b031916908160001a90535060049290921c9162002f4c8162004a88565b905062002ed5565b50811562002a0c5760405163e22e27eb60e01b8152600481018690526024810185905260440162000abd565b6060600062002f8f83620037de565b60010190506000816001600160401b0381111562002fb15762002fb162003e50565b6040519080825280601f01601f19166020018201604052801562002fdc576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508462002fe657509392505050565b6060620008f16001600160a01b038316601462002deb565b606060405180608001604052806048815260200162005ae260489139905090565b606081516000036200307257505060408051602081019091526000815290565b600060405180606001604052806040815260200162005b2a6040913990506000600384516002620030a49190620043e5565b620030b0919062004aa2565b620030bd90600462004a6e565b6001600160401b03811115620030d757620030d762003e50565b6040519080825280601f01601f19166020018201604052801562003102576020820181803683370190505b50905060018201602082018586518701602081018051600082525b828410156200317a576003840193508351603f8160121c168701518653600186019550603f81600c1c168701518653600186019550603f8160061c168701518653600186019550603f81168701518653506001850194506200311d565b90525050855160039006600181146200319c5760028114620031b057620031b8565b603d6001830353603d6002830353620031b8565b603d60018303535b509195945050505050565b600080600080620031d58686620038bd565b925092509250620031e782826200390e565b5090949350505050565b6001600160a01b0382166200321d57604051633250574960e11b81526000600482015260240162000abd565b60006200322d8383600062002903565b90506001600160a01b0381161562001074576040516339e3563760e11b81526000600482015260240162000abd565b60009081527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930260205260409020546001600160a01b031690565b60008051602062005ac28339815191528180620032bb57506001600160a01b03831615155b1562003387576000620032ce856200286f565b90506001600160a01b03841615801590620032fb5750836001600160a01b0316816001600160a01b031614155b80156200331157506200330f81856200271e565b155b156200333c5760405163a9fbf51f60e01b81526001600160a01b038516600482015260240162000abd565b8215620033855784866001600160a01b0316826001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45b505b600093845260040160205250506040902080546001600160a01b0319166001600160a01b0392909216919091179055565b6000604051836040820152846020820152828152600b8101905060ff815360559020949350505050565b600060008051602062005ac28339815191528162003400856200325c565b90506001600160a01b038416156200341f576200341f818587620039d9565b6001600160a01b0381161562003462576200343f60008660008062003296565b6001600160a01b0381166000908152600383016020526040902080546000190190555b6001600160a01b0386161562003494576001600160a01b03861660009081526003830160205260409020805460010190555b600085815260028301602052604080822080546001600160a01b0319166001600160a01b038a811691821790925591518893918516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a495945050505050565b60008051602062005aa283398151915260006200351384620014b8565b600084815260018401602052604090205490915080821462003569576001600160a01b03851660009081526020848152604080832085845282528083205484845281842081905583526001860190915290208190555b50600092835260018201602090815260408085208590556001600160a01b039095168452918252838320908352905290812055565b60008051602062005b6a8339815191525460008051602062005aa283398151915290600090620035d1906001906200442d565b6000848152600384016020526040812054600285018054939450909284908110620036005762003600620043fb565b9060005260206000200154905080846002018381548110620036265762003626620043fb565b60009182526020808320909101929092558281526003860190915260408082208490558682528120556002840180548062003665576200366562004ac5565b600190038181906000526020600020016000905590555050505050565b60008051602062005aa283398151915260006001620036a185620014b8565b620036ad91906200442d565b6001600160a01b0390941660009081526020838152604080832087845282528083208690559482526001909301909252502055565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff166200152d57604051631afcd79f60e31b815260040160405180910390fd5b6040516200373a9062003bbb565b604051809103906000f08015801562003757573d6000803e3d6000fd5b50600080546001600160a01b0319166001600160a01b0392909216919091179055565b60608262003793576200378d8262003a43565b62000a8f565b8151158015620037ab57506001600160a01b0384163b155b15620037d657604051639996b31560e01b81526001600160a01b038516600482015260240162000abd565b508062000a8f565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106200381e5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef810000000083106200384b576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106200386a57662386f26fc10000830492506010015b6305f5e100831062003883576305f5e100830492506008015b61271083106200389857612710830492506004015b60648310620038ab576064830492506002015b600a8310620008f15760010192915050565b60008060008351604103620038fb5760208401516040850151606086015160001a620038ec8882858562003a6d565b95509550955050505062003907565b50508151600091506002905b9250925092565b600082600381111562003925576200392562004adb565b036200392f575050565b600182600381111562003946576200394662004adb565b03620039655760405163f645eedf60e01b815260040160405180910390fd5b60028260038111156200397c576200397c62004adb565b036200399f5760405163fce698f760e01b81526004810182905260240162000abd565b6003826003811115620039b657620039b662004adb565b03620009ca576040516335e2f38360e21b81526004810182905260240162000abd565b620039e683838362003b41565b62001074576001600160a01b03831662003a1757604051637e27328960e01b81526004810182905260240162000abd565b60405163177e802f60e01b81526001600160a01b03831660048201526024810182905260440162000abd565b80511562003a545780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a084111562003aaa575060009150600390508262003b37565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa15801562003aff573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811662003b2d5750600092506001915082905062003b37565b9250600091508190505b9450945094915050565b60006001600160a01b0383161580159062002a0c5750826001600160a01b0316846001600160a01b0316148062003b7f575062003b7f84846200271e565b8062002a0c5750826001600160a01b031662003b9b83620028ab565b6001600160a01b031614949350505050565b61040a8062004af283390190565b610ba68062004efc83390190565b80356001600160a01b038116811462003be157600080fd5b919050565b60006020828403121562003bf957600080fd5b62000a8f8262003bc9565b6001600160e01b031981168114620027da57600080fd5b60006020828403121562003c2e57600080fd5b813562000a8f8162003c04565b60006020828403121562003c4e57600080fd5b5035919050565b60005b8381101562003c7257818101518382015260200162003c58565b50506000910152565b6000815180845262003c9581602086016020860162003c55565b601f01601f19169290920160200192915050565b60208152600062000a8f602083018462003c7b565b6000806040838503121562003cd257600080fd5b62003cdd8362003bc9565b946020939093013593505050565b60008060006060848603121562003d0157600080fd5b62003d0c8462003bc9565b925062003d1c6020850162003bc9565b9150604084013590509250925092565b6000806040838503121562003d4057600080fd5b8235915062003d526020840162003bc9565b90509250929050565b602081526000825161010080602085015262003d7c61012085018362003c7b565b91506020850151601f198086850301604087015262003d9c848362003c7b565b935060408701519150808685030160608701525062003dbc838262003c7b565b92505060608501516080850152608085015160a085015260a085015162003dee60c08601826001600160801b03169052565b5060c08501516001600160801b03811660e08601525060e08501516001600160a01b038116858301525090949350505050565b6000806040838503121562003e3557600080fd5b62003e408362003bc9565b915062003d526020840162003bc9565b634e487b7160e01b600052604160045260246000fd5b60405161010081016001600160401b038111828210171562003e8c5762003e8c62003e50565b60405290565b600082601f83011262003ea457600080fd5b81356001600160401b038082111562003ec15762003ec162003e50565b604051601f8301601f19908116603f0116810190828211818310171562003eec5762003eec62003e50565b8160405283815286602085880101111562003f0657600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000806040838503121562003f3a57600080fd5b82356001600160401b038082111562003f5257600080fd5b62003f608683870162003e92565b9350602085013591508082111562003f7757600080fd5b5062003f868582860162003e92565b9150509250929050565b6020808252825182820181905260009190848201906040850190845b8181101562003fca5783518352928401929184019160010162003fac565b50909695505050505050565b8015158114620027da57600080fd5b6000806040838503121562003ff957600080fd5b620040048362003bc9565b91506020830135620040168162003fd6565b809150509250929050565b600080602083850312156200403557600080fd5b82356001600160401b03808211156200404d57600080fd5b818501915085601f8301126200406257600080fd5b8135818111156200407257600080fd5b8660208260051b85010111156200408857600080fd5b60209290920196919550909350505050565b600060208083016020845280855180835260408601915060408160051b87010192506020870160005b82811015620040f557603f19888603018452620040e285835162003c7b565b94509285019290850190600101620040c3565b5092979650505050505050565b600080600080608085870312156200411957600080fd5b620041248562003bc9565b9350620041346020860162003bc9565b92506040850135915060608501356001600160401b038111156200415757600080fd5b620041658782880162003e92565b91505092959194509250565b600080600080608085870312156200418857600080fd5b8435935060208501359250620041a16040860162003bc9565b915060608501356001600160401b038111156200415757600080fd5b80356001600160801b038116811462003be157600080fd5b600080600060608486031215620041eb57600080fd5b620041f68462003bc9565b925060208401356001600160401b03808211156200421357600080fd5b9085019061010082880312156200422957600080fd5b6200423362003e66565b8235828111156200424357600080fd5b620042518982860162003e92565b8252506020830135828111156200426757600080fd5b620042758982860162003e92565b6020830152506040830135828111156200428e57600080fd5b6200429c8982860162003e92565b6040830152506060830135606082015260808301356080820152620042c460a08401620041bd565b60a0820152620042d760c08401620041bd565b60c0820152620042ea60e0840162003bc9565b60e08201529497949650505050604092909201359150565b600181811c908216806200431757607f821691505b6020821081036200433857634e487b7160e01b600052602260045260246000fd5b50919050565b6001600160a01b038316815260406020820181905260009062002a0c9083018462003c7b565b600081516200437881856020860162003c55565b9290920192915050565b600083516200439681846020880162003c55565b835190830190620043ac81836020880162003c55565b01949350505050565b600060208284031215620043c857600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b80820180821115620008f157620008f1620043cf565b634e487b7160e01b600052603260045260246000fd5b600060018201620044265762004426620043cf565b5060010190565b81810381811115620008f157620008f1620043cf565b6000808335601e198436030181126200445b57600080fd5b8301803591506001600160401b038211156200447657600080fd5b6020019150368190038213156200448c57600080fd5b9250929050565b828482376000838201600081528351620044b281836020880162003c55565b0195945050505050565b7f7b2274726169745f74797065223a202250726f6d7074222c202276616c75652281526000621d101160e91b80602084015284516200450381602386016020890162003c55565b62089f4b60ea1b60239185019182018190527f7b2274726169745f74797065223a2022536563726574222c202276616c756522602683015260468201929092528451916200455983604984016020890162003c55565b91016049810191909152604c01949350505050565b605b60f81b81527f7b2274726169745f74797065223a202254797065222c202276616c7565223a206001820152601160f91b60218201528551600090620045bd816022850160208b0162003c55565b62089f4b60ea1b6022918401918201528651620045e2816025840160208b0162003c55565b7f7b22646973706c61795f74797065223a202264617465222c202274726169745f602592909101918201527f74797065223a202253746172742064617465222c202276616c7565223a2022006045820152855162004648816064840160208a0162003c55565b6200474162004734620047266200471f620046e2620046d3620046cc6200467d6064898b010162089f4b60ea1b815260030190565b7f7b22646973706c61795f74797065223a202264617465222c202274726169745f81527f74797065223a2022456e642064617465222c202276616c7565223a20220000006020820152603d0190565b8c62004364565b62089f4b60ea1b815260030190565b7f7b2274726169745f74797065223a202257696e6e65722061646472657373222c81526a10113b30b63ab2911d101160a91b6020820152602b0190565b8862004364565b61227d60f01b815260020190565b605d60f81b815260010190565b9998505050505050505050565b607b60f81b815268113730b6b2911d101160b91b600182015285516000906200477f81600a850160208b0162003c55565b6201116160ed1b600a9184019182018190526f113232b9b1b934b83a34b7b7111d101160811b600d8301528751620047bf81601d850160208c0162003c55565b80830192505080601d83015250691134b6b0b3b2911d101160b11b60208201528551620047f481602a840160208a0162003c55565b85519101906200480c81602a84016020890162003c55565b62004741620048656200485e6200484562004836602a86880101632e706e6760e01b815260040190565b6201116160ed1b815260030190565b6c1130ba3a3934b13aba32b9911d60991b8152600d0190565b8762004364565b607d60f81b815260010190565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c000000815260008251620048ac81601d85016020870162003c55565b91909101601d0192915050565b600060208284031215620048cc57600080fd5b815162000a8f8162003fd6565b601f82111562001074576000816000526020600020601f850160051c81016020861015620049045750805b601f850160051c820191505b81811015620024f95782815560010162004910565b81516001600160401b0381111562004941576200494162003e50565b620049598162004952845462004302565b84620048d9565b602080601f831160018114620049915760008415620049785750858301515b600019600386901b1c1916600185901b178555620024f9565b600085815260208120601f198616915b82811015620049c257888601518255948401946001909101908401620049a1565b5085821015620049e15787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6000825162004a0581846020870162003c55565b9190910192915050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009062004a449083018462003c7b565b9695505050505050565b60006020828403121562004a6157600080fd5b815162000a8f8162003c04565b8082028115828204841417620008f157620008f1620043cf565b60008162004a9a5762004a9a620043cf565b506000190190565b60008262004ac057634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052602160045260246000fdfe608060405260405161040a38038061040a83398101604081905261002291610268565b61002c8282610033565b5050610352565b61003c82610092565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a280511561008657610081828261010e565b505050565b61008e610185565b5050565b806001600160a01b03163b6000036100cd57604051634c9c8ce360e01b81526001600160a01b03821660048201526024015b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b03168460405161012b9190610336565b600060405180830381855af49150503d8060008114610166576040519150601f19603f3d011682016040523d82523d6000602084013e61016b565b606091505b50909250905061017c8583836101a6565b95945050505050565b34156101a45760405163b398979f60e01b815260040160405180910390fd5b565b6060826101bb576101b682610205565b6101fe565b81511580156101d257506001600160a01b0384163b155b156101fb57604051639996b31560e01b81526001600160a01b03851660048201526024016100c4565b50805b9392505050565b8051156102155780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b634e487b7160e01b600052604160045260246000fd5b60005b8381101561025f578181015183820152602001610247565b50506000910152565b6000806040838503121561027b57600080fd5b82516001600160a01b038116811461029257600080fd5b60208401519092506001600160401b03808211156102af57600080fd5b818501915085601f8301126102c357600080fd5b8151818111156102d5576102d561022e565b604051601f8201601f19908116603f011681019083821181831017156102fd576102fd61022e565b8160405282815288602084870101111561031657600080fd5b610327836020830160208801610244565b80955050505050509250929050565b60008251610348818460208701610244565b9190910192915050565b60aa806103606000396000f3fe6080604052600a600c565b005b60186014601a565b6051565b565b6000604c7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e808015606f573d6000f35b3d6000fdfea2646970667358221220bd42728c374f7f0ddc17b53ec61cdb40d51094c5fa601cbd894add86d0771b8264736f6c6343000818003360a060405234801561001057600080fd5b50338061003757604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b6100408161004a565b503360805261009a565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b608051610aea6100bc6000396000818161017001526104d40152610aea6000f3fe60806040526004361061007f5760003560e01c8063b61d27f61161004e578063b61d27f61461013e578063c45a01551461015e578063c4d66de814610192578063f2fde38b146101b257600080fd5b8063150b7a021461008b57806347e1da2a146100d5578063715018a6146100f55780638da5cb5b1461010c57600080fd5b3661008657005b600080fd5b34801561009757600080fd5b506100b76100a63660046106e7565b630a85bd0160e11b95945050505050565b6040516001600160e01b031990911681526020015b60405180910390f35b6100e86100e336600461079b565b6101d2565b6040516100cc9190610885565b34801561010157600080fd5b5061010a610461565b005b34801561011857600080fd5b506000546001600160a01b03165b6040516001600160a01b0390911681526020016100cc565b61015161014c3660046108e9565b610475565b6040516100cc9190610943565b34801561016a57600080fd5b506101267f000000000000000000000000000000000000000000000000000000000000000081565b34801561019e57600080fd5b5061010a6101ad36600461095d565b6104c9565b3480156101be57600080fd5b5061010a6101cd36600461095d565b610520565b60606101dc610552565b85821480156101f257508315806101f257508382145b6102385760405162461bcd60e51b81526020600482015260126024820152710eee4dedcce40c2e4e4c2f240d8cadccee8d60731b60448201526064015b60405180910390fd5b8167ffffffffffffffff81111561025157610251610978565b60405190808252806020026020018201604052801561028457816020015b606081526020019060019003908161026f5790505b509050600084900361036a5760005b868110156103645760008888838181106102af576102af61098e565b90506020020160208101906102c4919061095d565b90503660008686858181106102db576102db61098e565b90506020028101906102ed91906109a4565b91509150600061033584600085858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061057f92505050565b90508086868151811061034a5761034a61098e565b602002602001018190525084600101945050505050610293565b50610457565b60005b868110156104555760008888838181106103895761038961098e565b905060200201602081019061039e919061095d565b90503660008686858181106103b5576103b561098e565b90506020028101906103c791906109a4565b915091506000610426848b8b888181106103e3576103e361098e565b9050602002013585858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061057f92505050565b90508086868151811061043b5761043b61098e565b60200260200101819052508460010194505050505061036d565b505b9695505050505050565b610469610552565b6104736000610632565b565b606061047f610552565b6104c0858585858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061057f92505050565b95945050505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105145760405163118cdaa760e01b815233600482015260240161022f565b61051d81610632565b50565b610528610552565b6001600160a01b03811661051457604051631e4fbdf760e01b81526000600482015260240161022f565b6000546001600160a01b031633146104735760405163118cdaa760e01b815233600482015260240161022f565b60606000846001600160a01b0316848460405161059c91906109eb565b60006040518083038185875af1925050503d80600081146105d9576040519150601f19603f3d011682016040523d82523d6000602084013e6105de565b606091505b50925090508061062a576044825110156105f757600080fd5b600482019150818060200190518101906106119190610a07565b60405162461bcd60e51b815260040161022f9190610943565b509392505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80356001600160a01b038116811461069957600080fd5b919050565b60008083601f8401126106b057600080fd5b50813567ffffffffffffffff8111156106c857600080fd5b6020830191508360208285010111156106e057600080fd5b9250929050565b6000806000806000608086880312156106ff57600080fd5b61070886610682565b945061071660208701610682565b935060408601359250606086013567ffffffffffffffff81111561073957600080fd5b6107458882890161069e565b969995985093965092949392505050565b60008083601f84011261076857600080fd5b50813567ffffffffffffffff81111561078057600080fd5b6020830191508360208260051b85010111156106e057600080fd5b600080600080600080606087890312156107b457600080fd5b863567ffffffffffffffff808211156107cc57600080fd5b6107d88a838b01610756565b909850965060208901359150808211156107f157600080fd5b6107fd8a838b01610756565b9096509450604089013591508082111561081657600080fd5b5061082389828a01610756565b979a9699509497509295939492505050565b60005b83811015610850578181015183820152602001610838565b50506000910152565b60008151808452610871816020860160208601610835565b601f01601f19169290920160200192915050565b600060208083016020845280855180835260408601915060408160051b87010192506020870160005b828110156108dc57603f198886030184526108ca858351610859565b945092850192908501906001016108ae565b5092979650505050505050565b600080600080606085870312156108ff57600080fd5b61090885610682565b935060208501359250604085013567ffffffffffffffff81111561092b57600080fd5b6109378782880161069e565b95989497509550505050565b6020815260006109566020830184610859565b9392505050565b60006020828403121561096f57600080fd5b61095682610682565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000808335601e198436030181126109bb57600080fd5b83018035915067ffffffffffffffff8211156109d657600080fd5b6020019150368190038213156106e057600080fd5b600082516109fd818460208701610835565b9190910192915050565b600060208284031215610a1957600080fd5b815167ffffffffffffffff80821115610a3157600080fd5b818401915084601f830112610a4557600080fd5b815181811115610a5757610a57610978565b604051601f8201601f19908116603f01168101908382118183101715610a7f57610a7f610978565b81604052828152876020848701011115610a9857600080fd5b610aa9836020830160208801610835565b97965050505050505056fea26469706673582212209388cc9441e0986bee120b32be1c29eda96e129a50bcb254300c50efe2aac76364736f6c63430008180033645e039705490088daad89bae25049a34f4a9072d398537b1ab2425f24cbed0080bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930068747470733a2f2f7261772e67697468756275736572636f6e74656e742e636f6d2f70726f6d70746f7765722f7765626170702f6d61696e2f7372632f6173736574732f6e66742f4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f645e039705490088daad89bae25049a34f4a9072d398537b1ab2425f24cbed02a26469706673582212209806f4695177392d95c50d803f661803c0627a402b2916094032b9b05b081a6d64736f6c63430008180033",u="0x60806040523480156200001157600080fd5b5060043610620003695760003560e01c8063715018a611620001dc578063b23e44801162000119578063e715de2811620000af578063f2fde38b1162000086578063f2fde38b1462000888578063f9bc3f40146200089f578063fe7f43da14620008a9578063fe9eba1514620008c057600080fd5b8063e715de281462000850578063e985e9c51462000867578063ef792662146200087e57600080fd5b8063c516e15611620000f0578063c516e1561462000805578063c87b56dd146200080e578063d2da7bca1462000825578063d3c6fd90146200083957600080fd5b8063b23e448014620007b4578063b66f7a8b14620007d7578063b88d4fde14620007ee57600080fd5b806395d89b41116200018f5780639dd3e25511620001665780639dd3e255146200072e578063a22cb4651462000751578063a7cd52cb1462000768578063ac9650d8146200078e57600080fd5b806395d89b4114620006f657806395ecc64214620007005780639859387b146200071757600080fd5b8063715018a6146200065e57806374de69e314620006685780637b80e8e6146200067f57806385604ba41462000688578063867211f314620006ae5780638da5cb5b14620006c557600080fd5b8063415fa50a11620002ab57806354c87af4116200025e5780636352211e11620002355780636352211e14620005f3578063676db981146200060a5780636a627842146200063057806370a08231146200064757600080fd5b806354c87af414620005a25780635872fe4514620005c55780635f6928e214620005dc57600080fd5b8063415fa50a146200050c57806342842e0e146200052f578063485cc95514620005465780634cd88b76146200055d5780634f6ccce71462000574578063502c040b146200058b57600080fd5b80630d253d76116200032157806323b872dd11620002f857806323b872dd14620004a157806324d7356714620004b8578063277ecfbb14620004cf5780632f745c5914620004f557600080fd5b80630d253d76146200045f57806311464fbe146200047657806318160ddd146200048a57600080fd5b80627c94b6146200036e57806301ffc9a714620003a45780630661d1dc14620003cc57806306fdde0314620003fd578063081812fc1462000416578063095ea7b31462000446575b600080fd5b620003916200037f36600462003be6565b600a6020526000908152604090205481565b6040519081526020015b60405180910390f35b620003bb620003b536600462003c1b565b620008c9565b60405190151581526020016200039b565b620003bb620003dd36600462003c3b565b6000908152600360205260409020600601546001600160a01b0316151590565b62000407620008f7565b6040516200039b919062003ca9565b6200042d6200042736600462003c3b565b620009a4565b6040516001600160a01b0390911681526020016200039b565b6200045d6200045736600462003cbe565b620009bd565b005b6200042d6200047036600462003cbe565b620009ce565b6000546200042d906001600160a01b031681565b60008051602062005b6a8339815191525462000391565b6200045d620004b236600462003ceb565b62000a96565b6200045d620004c936600462003d2c565b62000b2b565b620004e6620004e036600462003c3b565b62000d64565b6040516200039b919062003d5b565b620003916200050636600462003cbe565b62000fde565b620003916200051d36600462003be6565b600b6020526000908152604090205481565b6200045d6200054036600462003ceb565b62001057565b6200045d6200055736600462003e21565b62001079565b6200045d6200056e36600462003f26565b6200120c565b620003916200058536600462003c3b565b620012e8565b620003bb6200059c36600462003d2c565b62001368565b62000391620005b336600462003c3b565b60066020526000908152604090205481565b6200042d620005d636600462003be6565b620013e2565b6200045d620005ed36600462003be6565b62001445565b6200042d6200060436600462003c3b565b62001473565b620003bb6200061b36600462003be6565b600c6020526000908152604090205460ff1681565b620003916200064136600462003be6565b62001480565b620003916200065836600462003be6565b620014b8565b6200045d62001517565b620003916200067936600462003cbe565b6200152f565b600d5462000391565b6200069f6200069936600462003be6565b62001561565b6040516200039b919062003f90565b6200045d620006bf36600462003be6565b620015cf565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b03166200042d565b62000407620015fa565b620003bb6200071136600462003c3b565b6200163c565b6200042d6200072836600462003be6565b6200189d565b620003916200073f36600462003c3b565b60056020526000908152604090205481565b6200045d6200076236600462003fe5565b6200197a565b620003bb6200077936600462003be6565b60046020526000908152604090205460ff1681565b620007a56200079f36600462004021565b62001987565b6040516200039b91906200409a565b62000391620007c536600462003be6565b60016020526000908152604090205481565b620003bb620007e836600462003c3b565b62001a81565b6200045d620007ff36600462004102565b62001cc8565b60075462000391565b620004076200081f36600462003c3b565b62001ce3565b6002546200042d906001600160a01b031681565b6200045d6200084a36600462004171565b62002079565b6200039162000861366004620041d5565b62002501565b620003bb6200087836600462003e21565b6200271e565b620003916200276b565b6200045d6200089936600462003be6565b62002799565b62000391620027dd565b6200042d620008ba36600462003c3b565b620027f1565b60085462000391565b60006001600160e01b0319821663780e9d6360e01b1480620008f15750620008f1826200281c565b92915050565b60008051602062005ac283398151915280546060919081906200091a9062004302565b80601f0160208091040260200160405190810160405280929190818152602001828054620009489062004302565b8015620009995780601f106200096d5761010080835404028352916020019162000999565b820191906000526020600020905b8154815290600101906020018083116200097b57829003601f168201915b505050505091505090565b6000620009b1826200286f565b50620008f182620028ab565b620009ca828233620028e5565b5050565b600062000a8f8260001b60405180602001620009ea9062003bad565b601f1982820381018352601f9091011660408190526000546001600160a01b03888116602484015216906044015b60408051601f19818403018152918152602080830180516001600160e01b031663189acdbd60e31b179052905162000a53939291016200433e565b60408051601f198184030181529082905262000a73929160200162004382565b60405160208183030381529060405280519060200120620028f4565b9392505050565b6001600160a01b03821662000ac657604051633250574960e11b8152600060048201526024015b60405180910390fd5b600062000ad583833362002903565b9050836001600160a01b0316816001600160a01b03161462000b25576040516364283d7b60e01b81526001600160a01b038086166004830152602482018490528216604482015260640162000abd565b50505050565b3360009081526004602052604090205460ff1662000b7b5760405162461bcd60e51b815260206004820152600c60248201526b2737ba1030b63637bbb2b21760a11b604482015260640162000abd565b60008281526003602052604090206005810154426001600160801b03909116111562000bd55760405162461bcd60e51b81526020600482015260086024820152672737ba103cb2ba1760c11b604482015260640162000abd565b600581015442600160801b9091046001600160801b0316101562000c285760405162461bcd60e51b815260206004820152600960248201526827baba3230ba32b21760b91b604482015260640162000abd565b60068101546001600160a01b03161562000c775760405162461bcd60e51b815260206004820152600f60248201526e20b63932b0b23c9039b7b63b32b21760891b604482015260640162000abd565b6040516370a0823160e01b81526001600160a01b0384811660048301528316906370a0823190602401602060405180830381865afa15801562000cbe573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000ce49190620043b5565b60000362000d275760405162461bcd60e51b815260206004820152600f60248201526e2430bb32903737903130b233b2b99760891b604482015260640162000abd565b6006810180546001600160a01b0319166001600160a01b03179055600880546001919060009062000d5a908490620043e5565b9091555050505050565b604080516101008101825260608082526020820181905291810182905260009181018290526080810182905260a0810182905260c0810182905260e0810191909152600082815260036020526040908190208151610100810190925280548290829062000dd19062004302565b80601f016020809104026020016040519081016040528092919081815260200182805462000dff9062004302565b801562000e505780601f1062000e245761010080835404028352916020019162000e50565b820191906000526020600020905b81548152906001019060200180831162000e3257829003601f168201915b5050505050815260200160018201805462000e6b9062004302565b80601f016020809104026020016040519081016040528092919081815260200182805462000e999062004302565b801562000eea5780601f1062000ebe5761010080835404028352916020019162000eea565b820191906000526020600020905b81548152906001019060200180831162000ecc57829003601f168201915b5050505050815260200160028201805462000f059062004302565b80601f016020809104026020016040519081016040528092919081815260200182805462000f339062004302565b801562000f845780601f1062000f585761010080835404028352916020019162000f84565b820191906000526020600020905b81548152906001019060200180831162000f6657829003601f168201915b5050509183525050600382015460208201526004820154604082015260058201546001600160801b038082166060840152600160801b9091041660808201526006909101546001600160a01b031660a09091015292915050565b600060008051602062005aa283398151915262000ffb84620014b8565b83106200102e5760405163295f44f760e21b81526001600160a01b03851660048201526024810184905260440162000abd565b6001600160a01b0384166000908152602091825260408082208583529092522054905092915050565b620010748383836040518060200160405280600081525062001cc8565b505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff1615906001600160401b0316600081158015620010bf5750825b90506000826001600160401b03166001148015620010dc5750303b155b905081158015620010eb575080155b156200110a5760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff1916600117855583156200113557845460ff60401b1916600160401b1785555b620011916040518060400160405280601781526020017f436170747572652d7468652d50726f6d70742047616d650000000000000000008152506040518060400160405280600381526020016204354560ec1b81525062002a14565b6200119b62002a4c565b620011a562002a56565b620011b08762002a6a565b620011bc878762002a74565b83156200120357845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50505050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff1615906001600160401b0316600081158015620012525750825b90506000826001600160401b031660011480156200126f5750303b155b9050811580156200127e575080155b156200129d5760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff191660011785558315620012c857845460ff60401b1916600160401b1785555b620012d4878762002a14565b620012de62002a4c565b620011bc62002a56565b600060008051602062005aa28339815191526200131260008051602062005b6a8339815191525490565b83106200133d5760405163295f44f760e21b8152600060048201526024810184905260440162000abd565b806002018381548110620013555762001355620043fb565b9060005260206000200154915050919050565b6040516370a0823160e01b81526001600160a01b038381166004830152600091908316906370a0823190602401602060405180830381865afa158015620013b3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620013d99190620043b5565b15159392505050565b6001600160a01b0381166000908152600160209081526040808320549051620008f1926200141290820162003bad565b601f1982820381018352601f9091011660408190526000546001600160a01b038781166024840152169060440162000a18565b6200144f62002ab6565b6001600160a01b03166000908152600460205260409020805460ff19166001179055565b6000620008f1826200286f565b60405162461bcd60e51b81526020600482015260096024820152682234b9b0b13632b21760b91b604482015260009060640162000abd565b600060008051602062005ac28339815191526001600160a01b038316620014f6576040516322718ad960e21b81526000600482015260240162000abd565b6001600160a01b039092166000908152600390920160205250604090205490565b6200152162002ab6565b6200152d600062002b14565b565b600960205281600052604060002081815481106200154c57600080fd5b90600052602060002001600091509150505481565b6001600160a01b038116600090815260096020908152604091829020805483518184028101840190945280845260609392830182828015620015c357602002820191906000526020600020905b815481526020019060010190808311620015ae575b50505050509050919050565b620015d962002ab6565b6001600160a01b03166000908152600460205260409020805460ff19169055565b7f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079301805460609160008051602062005ac2833981519152916200091a9062004302565b60008181526003602052604080822081516101008101909252805483929190829082906200166a9062004302565b80601f0160208091040260200160405190810160405280929190818152602001828054620016989062004302565b8015620016e95780601f10620016bd57610100808354040283529160200191620016e9565b820191906000526020600020905b815481529060010190602001808311620016cb57829003601f168201915b50505050508152602001600182018054620017049062004302565b80601f0160208091040260200160405190810160405280929190818152602001828054620017329062004302565b8015620017835780601f10620017575761010080835404028352916020019162001783565b820191906000526020600020905b8154815290600101906020018083116200176557829003601f168201915b505050505081526020016002820180546200179e9062004302565b80601f0160208091040260200160405190810160405280929190818152602001828054620017cc9062004302565b80156200181d5780601f10620017f1576101008083540402835291602001916200181d565b820191906000526020600020905b815481529060010190602001808311620017ff57829003601f168201915b5050509183525050600382015460208201526004820154604082015260058201546001600160801b038082166060840152600160801b909104811660808301526006909201546001600160a01b031660a0918201528201519192504291161180159062000a8f5750428160c001516001600160801b031610159392505050565b600080620018ab83620013e2565b90506001600160a01b0381163b8015620018c6575092915050565b6001600160a01b0384166000908152600160205260408120805491620018ec8362004411565b909155506000546040516001600160a01b0387811660248301529091169060440160408051601f198184030181529181526020820180516001600160e01b031663189acdbd60e31b17905251620019439062003bad565b620019509291906200433e565b8190604051809103906000f590508015801562001971573d6000803e3d6000fd5b50949350505050565b620009ca33838362002b85565b604080516000815260208101909152606090826001600160401b03811115620019b457620019b462003e50565b604051908082528060200260200182016040528015620019e957816020015b6060815260200190600190039081620019d35790505b50915060005b8381101562001a795762001a503086868481811062001a125762001a12620043fb565b905060200281019062001a26919062004443565b8560405160200162001a3b9392919062004493565b60405160208183030381529060405262002c39565b83828151811062001a655762001a65620043fb565b6020908102919091010152600101620019ef565b505092915050565b600081815260036020526040808220815161010081019092528054839291908290829062001aaf9062004302565b80601f016020809104026020016040519081016040528092919081815260200182805462001add9062004302565b801562001b2e5780601f1062001b025761010080835404028352916020019162001b2e565b820191906000526020600020905b81548152906001019060200180831162001b1057829003601f168201915b5050505050815260200160018201805462001b499062004302565b80601f016020809104026020016040519081016040528092919081815260200182805462001b779062004302565b801562001bc85780601f1062001b9c5761010080835404028352916020019162001bc8565b820191906000526020600020905b81548152906001019060200180831162001baa57829003601f168201915b5050505050815260200160028201805462001be39062004302565b80601f016020809104026020016040519081016040528092919081815260200182805462001c119062004302565b801562001c625780601f1062001c365761010080835404028352916020019162001c62565b820191906000526020600020905b81548152906001019060200180831162001c4457829003601f168201915b5050509183525050600382015460208201526004820154604082015260058201546001600160801b038082166060840152600160801b909104811660808301526006909201546001600160a01b031660a09091015260c090910151429116109392505050565b62001cd584848462000a96565b62000b258484848462002cb5565b606062001cf0826200286f565b506000828152600360205260408082208151610100810190925280548290829062001d1b9062004302565b80601f016020809104026020016040519081016040528092919081815260200182805462001d499062004302565b801562001d9a5780601f1062001d6e5761010080835404028352916020019162001d9a565b820191906000526020600020905b81548152906001019060200180831162001d7c57829003601f168201915b5050505050815260200160018201805462001db59062004302565b80601f016020809104026020016040519081016040528092919081815260200182805462001de39062004302565b801562001e345780601f1062001e085761010080835404028352916020019162001e34565b820191906000526020600020905b81548152906001019060200180831162001e1657829003601f168201915b5050505050815260200160028201805462001e4f9062004302565b80601f016020809104026020016040519081016040528092919081815260200182805462001e7d9062004302565b801562001ece5780601f1062001ea25761010080835404028352916020019162001ece565b820191906000526020600020905b81548152906001019060200180831162001eb057829003601f168201915b505050918352505060038201546020808301919091526004830154604083015260058301546001600160801b03808216606080860191909152600160801b9092041660808401526006909301546001600160a01b031660a09092019190915282820151929350909160009162001f45919062002deb565b608084015162001f5790602062002deb565b60405160200162001f6a929190620044bc565b604051602081830303815290604052905082604001518162001f998560a001516001600160801b031662002f80565b62001fb18660c001516001600160801b031662002f80565b62001fc98760e001516001600160a01b031662003019565b60405160200162001fdf9594939291906200456e565b6040516020818303038152906040529150506200204f826000015183602001516200200962003031565b600088815260066020526040902054620020239062002f80565b856040516020016200203a9594939291906200474e565b60405160208183030381529060405262003052565b60405160200162002061919062004872565b60405160208183030381529060405292505050919050565b3360009081526004602052604090205460ff16620020c95760405162461bcd60e51b815260206004820152600c60248201526b2737ba1030b63637bbb2b21760a11b604482015260640162000abd565b604080516020808201879052818301869052825180830384018152606090920190925280519101207f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c90206001600160a01b038316620021378284620031c3565b6001600160a01b031614620021845760405162461bcd60e51b815260206004820152601260248201527124b73b30b634b21039b4b3b730ba3ab9329760711b604482015260640162000abd565b6000858152600360209081526040918290208251918201879052910160405160208183030381529060405280519060200120816004015414620022005760405162461bcd60e51b815260206004820152601360248201527224b73b30b634b21039b2b1b932ba2430b9b41760691b604482015260640162000abd565b6005810154426001600160801b0390911611156200224c5760405162461bcd60e51b81526020600482015260086024820152672737ba103cb2ba1760c11b604482015260640162000abd565b600581015442600160801b9091046001600160801b031610156200229f5760405162461bcd60e51b815260206004820152600960248201526827baba3230ba32b21760b91b604482015260640162000abd565b60068101546001600160a01b031615620022ee5760405162461bcd60e51b815260206004820152600f60248201526e20b63932b0b23c9039b7b63b32b21760891b604482015260640162000abd565b6006810180546001600160a01b0319166001600160a01b038616179055600780546001919060009062002323908490620043e5565b90915550506001600160a01b0384166000818152600960209081526040808320805460018181018355918552838520018b9055938352600a9091528120805490919062002372908490620043e5565b90915550506002546040516370a0823160e01b81526001600160a01b038881166004830152909116906370a0823190602401602060405180830381865afa158015620023c2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620023e89190620043b5565b6001600160a01b0385166000908152600b60205260408120805490919062002412908490620043e5565b909155505060405163189acdbd60e31b81526001600160a01b03858116600483015287169063c4d66de890602401600060405180830381600087803b1580156200245b57600080fd5b505af115801562002470573d6000803e3d6000fd5b505050506001600160a01b0384166000908152600c602052604090205460ff16620024f957600d805460018082019092557fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb50180546001600160a01b0319166001600160a01b0387169081179091556000908152600c60205260409020805460ff191690911790555b505050505050565b6000806200250f856200189d565b9050806001600160a01b03169150620025298583620031f1565b8215620025c0576002546001600160a01b03166323b872dd336040516001600160e01b031960e084901b1681526001600160a01b0391821660048201529084166024820152604481018690526064016020604051808303816000875af115801562002598573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620025be9190620048b9565b505b5060006001620025dd60008051602062005b6a8339815191525490565b620025e991906200442d565b600081815260056020908152604080832086905585835260068252808320939093558251610100810184528751815287820151818301528784015181850152606080890151908201526080808901519082015260a0808901516001600160801b039081169183019190915260c0808a01519091169082015260e081018390528583526003909152919020815191925090819062002687908262004925565b50602082015160018201906200269e908262004925565b5060408201516002820190620026b5908262004925565b50606082015160038201556080820151600482015560a082015160c08301516001600160801b03908116600160801b02911617600582015560e090910151600690910180546001600160a01b039092166001600160a01b03199092169190911790559392505050565b6001600160a01b0391821660009081527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab00793056020908152604080832093909416825291909152205460ff1690565b600062002777620027dd565b60008051602062005b6a833981519152546200279491906200442d565b905090565b620027a362002ab6565b6001600160a01b038116620027cf57604051631e4fbdf760e01b81526000600482015260240162000abd565b620027da8162002b14565b50565b6000600854600754620027949190620043e5565b600d81815481106200280257600080fd5b6000918252602090912001546001600160a01b0316905081565b60006001600160e01b031982166380ac58cd60e01b14806200284e57506001600160e01b03198216635b5e139f60e01b145b80620008f157506301ffc9a760e01b6001600160e01b0319831614620008f1565b6000806200287d836200325c565b90506001600160a01b038116620008f157604051637e27328960e01b81526004810184905260240162000abd565b60009081527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930460205260409020546001600160a01b031690565b62001074838383600162003296565b600062000a8f838330620033b8565b60008062002913858585620033e2565b90506001600160a01b038116620029a0576200299a8460008051602062005b6a833981519152805460008381527f645e039705490088daad89bae25049a34f4a9072d398537b1ab2425f24cbed0360205260408120829055600182018355919091527fa42f15e5d656f8155fd7419d740a6073999f19cd6e061449ce4a257150545bf20155565b620029c6565b846001600160a01b0316816001600160a01b031614620029c657620029c68185620034f6565b6001600160a01b038516620029e657620029e0846200359e565b62002a0c565b846001600160a01b0316816001600160a01b03161462002a0c5762002a0c858562003682565b949350505050565b62002a1e620036e2565b60008051602062005ac28339815191528062002a3b848262004925565b506001810162000b25838262004925565b6200152d620036e2565b62002a60620036e2565b6200152d6200372c565b620027a3620036e2565b62002a7e620036e2565b600280546001600160a01b0319166001600160a01b03928316179055166000908152600460205260409020805460ff19166001179055565b3362002ae97f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b0316146200152d5760405163118cdaa760e01b815233600482015260240162000abd565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b60008051602062005ac28339815191526001600160a01b03831662002bc957604051630b61174360e31b81526001600160a01b038416600482015260240162000abd565b6001600160a01b038481166000818152600584016020908152604080832094881680845294825291829020805460ff191687151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a350505050565b6060600080846001600160a01b03168460405162002c589190620049f1565b600060405180830381855af49150503d806000811462002c95576040519150601f19603f3d011682016040523d82523d6000602084013e62002c9a565b606091505b509150915062002cac8583836200377a565b95945050505050565b6001600160a01b0383163b1562000b2557604051630a85bd0160e11b81526001600160a01b0384169063150b7a029062002cfa90339088908790879060040162004a0f565b6020604051808303816000875af192505050801562002d38575060408051601f3d908101601f1916820190925262002d359181019062004a4e565b60015b62002da6573d80801562002d69576040519150601f19603f3d011682016040523d82523d6000602084013e62002d6e565b606091505b50805160000362002d9e57604051633250574960e11b81526001600160a01b038516600482015260240162000abd565b805181602001fd5b6001600160e01b03198116630a85bd0160e11b1462002de457604051633250574960e11b81526001600160a01b038516600482015260240162000abd565b5050505050565b606082600062002dfd84600262004a6e565b62002e0a906002620043e5565b6001600160401b0381111562002e245762002e2462003e50565b6040519080825280601f01601f19166020018201604052801562002e4f576020820181803683370190505b509050600360fc1b8160008151811062002e6d5762002e6d620043fb565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811062002e9f5762002e9f620043fb565b60200101906001600160f81b031916908160001a905350600062002ec585600262004a6e565b62002ed2906001620043e5565b90505b600181111562002f54576f181899199a1a9b1b9c1cb0b131b232b360811b83600f166010811062002f0a5762002f0a620043fb565b1a60f81b82828151811062002f235762002f23620043fb565b60200101906001600160f81b031916908160001a90535060049290921c9162002f4c8162004a88565b905062002ed5565b50811562002a0c5760405163e22e27eb60e01b8152600481018690526024810185905260440162000abd565b6060600062002f8f83620037de565b60010190506000816001600160401b0381111562002fb15762002fb162003e50565b6040519080825280601f01601f19166020018201604052801562002fdc576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508462002fe657509392505050565b6060620008f16001600160a01b038316601462002deb565b606060405180608001604052806048815260200162005ae260489139905090565b606081516000036200307257505060408051602081019091526000815290565b600060405180606001604052806040815260200162005b2a6040913990506000600384516002620030a49190620043e5565b620030b0919062004aa2565b620030bd90600462004a6e565b6001600160401b03811115620030d757620030d762003e50565b6040519080825280601f01601f19166020018201604052801562003102576020820181803683370190505b50905060018201602082018586518701602081018051600082525b828410156200317a576003840193508351603f8160121c168701518653600186019550603f81600c1c168701518653600186019550603f8160061c168701518653600186019550603f81168701518653506001850194506200311d565b90525050855160039006600181146200319c5760028114620031b057620031b8565b603d6001830353603d6002830353620031b8565b603d60018303535b509195945050505050565b600080600080620031d58686620038bd565b925092509250620031e782826200390e565b5090949350505050565b6001600160a01b0382166200321d57604051633250574960e11b81526000600482015260240162000abd565b60006200322d8383600062002903565b90506001600160a01b0381161562001074576040516339e3563760e11b81526000600482015260240162000abd565b60009081527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930260205260409020546001600160a01b031690565b60008051602062005ac28339815191528180620032bb57506001600160a01b03831615155b1562003387576000620032ce856200286f565b90506001600160a01b03841615801590620032fb5750836001600160a01b0316816001600160a01b031614155b80156200331157506200330f81856200271e565b155b156200333c5760405163a9fbf51f60e01b81526001600160a01b038516600482015260240162000abd565b8215620033855784866001600160a01b0316826001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45b505b600093845260040160205250506040902080546001600160a01b0319166001600160a01b0392909216919091179055565b6000604051836040820152846020820152828152600b8101905060ff815360559020949350505050565b600060008051602062005ac28339815191528162003400856200325c565b90506001600160a01b038416156200341f576200341f818587620039d9565b6001600160a01b0381161562003462576200343f60008660008062003296565b6001600160a01b0381166000908152600383016020526040902080546000190190555b6001600160a01b0386161562003494576001600160a01b03861660009081526003830160205260409020805460010190555b600085815260028301602052604080822080546001600160a01b0319166001600160a01b038a811691821790925591518893918516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a495945050505050565b60008051602062005aa283398151915260006200351384620014b8565b600084815260018401602052604090205490915080821462003569576001600160a01b03851660009081526020848152604080832085845282528083205484845281842081905583526001860190915290208190555b50600092835260018201602090815260408085208590556001600160a01b039095168452918252838320908352905290812055565b60008051602062005b6a8339815191525460008051602062005aa283398151915290600090620035d1906001906200442d565b6000848152600384016020526040812054600285018054939450909284908110620036005762003600620043fb565b9060005260206000200154905080846002018381548110620036265762003626620043fb565b60009182526020808320909101929092558281526003860190915260408082208490558682528120556002840180548062003665576200366562004ac5565b600190038181906000526020600020016000905590555050505050565b60008051602062005aa283398151915260006001620036a185620014b8565b620036ad91906200442d565b6001600160a01b0390941660009081526020838152604080832087845282528083208690559482526001909301909252502055565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff166200152d57604051631afcd79f60e31b815260040160405180910390fd5b6040516200373a9062003bbb565b604051809103906000f08015801562003757573d6000803e3d6000fd5b50600080546001600160a01b0319166001600160a01b0392909216919091179055565b60608262003793576200378d8262003a43565b62000a8f565b8151158015620037ab57506001600160a01b0384163b155b15620037d657604051639996b31560e01b81526001600160a01b038516600482015260240162000abd565b508062000a8f565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106200381e5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef810000000083106200384b576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106200386a57662386f26fc10000830492506010015b6305f5e100831062003883576305f5e100830492506008015b61271083106200389857612710830492506004015b60648310620038ab576064830492506002015b600a8310620008f15760010192915050565b60008060008351604103620038fb5760208401516040850151606086015160001a620038ec8882858562003a6d565b95509550955050505062003907565b50508151600091506002905b9250925092565b600082600381111562003925576200392562004adb565b036200392f575050565b600182600381111562003946576200394662004adb565b03620039655760405163f645eedf60e01b815260040160405180910390fd5b60028260038111156200397c576200397c62004adb565b036200399f5760405163fce698f760e01b81526004810182905260240162000abd565b6003826003811115620039b657620039b662004adb565b03620009ca576040516335e2f38360e21b81526004810182905260240162000abd565b620039e683838362003b41565b62001074576001600160a01b03831662003a1757604051637e27328960e01b81526004810182905260240162000abd565b60405163177e802f60e01b81526001600160a01b03831660048201526024810182905260440162000abd565b80511562003a545780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a084111562003aaa575060009150600390508262003b37565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa15801562003aff573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811662003b2d5750600092506001915082905062003b37565b9250600091508190505b9450945094915050565b60006001600160a01b0383161580159062002a0c5750826001600160a01b0316846001600160a01b0316148062003b7f575062003b7f84846200271e565b8062002a0c5750826001600160a01b031662003b9b83620028ab565b6001600160a01b031614949350505050565b61040a8062004af283390190565b610ba68062004efc83390190565b80356001600160a01b038116811462003be157600080fd5b919050565b60006020828403121562003bf957600080fd5b62000a8f8262003bc9565b6001600160e01b031981168114620027da57600080fd5b60006020828403121562003c2e57600080fd5b813562000a8f8162003c04565b60006020828403121562003c4e57600080fd5b5035919050565b60005b8381101562003c7257818101518382015260200162003c58565b50506000910152565b6000815180845262003c9581602086016020860162003c55565b601f01601f19169290920160200192915050565b60208152600062000a8f602083018462003c7b565b6000806040838503121562003cd257600080fd5b62003cdd8362003bc9565b946020939093013593505050565b60008060006060848603121562003d0157600080fd5b62003d0c8462003bc9565b925062003d1c6020850162003bc9565b9150604084013590509250925092565b6000806040838503121562003d4057600080fd5b8235915062003d526020840162003bc9565b90509250929050565b602081526000825161010080602085015262003d7c61012085018362003c7b565b91506020850151601f198086850301604087015262003d9c848362003c7b565b935060408701519150808685030160608701525062003dbc838262003c7b565b92505060608501516080850152608085015160a085015260a085015162003dee60c08601826001600160801b03169052565b5060c08501516001600160801b03811660e08601525060e08501516001600160a01b038116858301525090949350505050565b6000806040838503121562003e3557600080fd5b62003e408362003bc9565b915062003d526020840162003bc9565b634e487b7160e01b600052604160045260246000fd5b60405161010081016001600160401b038111828210171562003e8c5762003e8c62003e50565b60405290565b600082601f83011262003ea457600080fd5b81356001600160401b038082111562003ec15762003ec162003e50565b604051601f8301601f19908116603f0116810190828211818310171562003eec5762003eec62003e50565b8160405283815286602085880101111562003f0657600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000806040838503121562003f3a57600080fd5b82356001600160401b038082111562003f5257600080fd5b62003f608683870162003e92565b9350602085013591508082111562003f7757600080fd5b5062003f868582860162003e92565b9150509250929050565b6020808252825182820181905260009190848201906040850190845b8181101562003fca5783518352928401929184019160010162003fac565b50909695505050505050565b8015158114620027da57600080fd5b6000806040838503121562003ff957600080fd5b620040048362003bc9565b91506020830135620040168162003fd6565b809150509250929050565b600080602083850312156200403557600080fd5b82356001600160401b03808211156200404d57600080fd5b818501915085601f8301126200406257600080fd5b8135818111156200407257600080fd5b8660208260051b85010111156200408857600080fd5b60209290920196919550909350505050565b600060208083016020845280855180835260408601915060408160051b87010192506020870160005b82811015620040f557603f19888603018452620040e285835162003c7b565b94509285019290850190600101620040c3565b5092979650505050505050565b600080600080608085870312156200411957600080fd5b620041248562003bc9565b9350620041346020860162003bc9565b92506040850135915060608501356001600160401b038111156200415757600080fd5b620041658782880162003e92565b91505092959194509250565b600080600080608085870312156200418857600080fd5b8435935060208501359250620041a16040860162003bc9565b915060608501356001600160401b038111156200415757600080fd5b80356001600160801b038116811462003be157600080fd5b600080600060608486031215620041eb57600080fd5b620041f68462003bc9565b925060208401356001600160401b03808211156200421357600080fd5b9085019061010082880312156200422957600080fd5b6200423362003e66565b8235828111156200424357600080fd5b620042518982860162003e92565b8252506020830135828111156200426757600080fd5b620042758982860162003e92565b6020830152506040830135828111156200428e57600080fd5b6200429c8982860162003e92565b6040830152506060830135606082015260808301356080820152620042c460a08401620041bd565b60a0820152620042d760c08401620041bd565b60c0820152620042ea60e0840162003bc9565b60e08201529497949650505050604092909201359150565b600181811c908216806200431757607f821691505b6020821081036200433857634e487b7160e01b600052602260045260246000fd5b50919050565b6001600160a01b038316815260406020820181905260009062002a0c9083018462003c7b565b600081516200437881856020860162003c55565b9290920192915050565b600083516200439681846020880162003c55565b835190830190620043ac81836020880162003c55565b01949350505050565b600060208284031215620043c857600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b80820180821115620008f157620008f1620043cf565b634e487b7160e01b600052603260045260246000fd5b600060018201620044265762004426620043cf565b5060010190565b81810381811115620008f157620008f1620043cf565b6000808335601e198436030181126200445b57600080fd5b8301803591506001600160401b038211156200447657600080fd5b6020019150368190038213156200448c57600080fd5b9250929050565b828482376000838201600081528351620044b281836020880162003c55565b0195945050505050565b7f7b2274726169745f74797065223a202250726f6d7074222c202276616c75652281526000621d101160e91b80602084015284516200450381602386016020890162003c55565b62089f4b60ea1b60239185019182018190527f7b2274726169745f74797065223a2022536563726574222c202276616c756522602683015260468201929092528451916200455983604984016020890162003c55565b91016049810191909152604c01949350505050565b605b60f81b81527f7b2274726169745f74797065223a202254797065222c202276616c7565223a206001820152601160f91b60218201528551600090620045bd816022850160208b0162003c55565b62089f4b60ea1b6022918401918201528651620045e2816025840160208b0162003c55565b7f7b22646973706c61795f74797065223a202264617465222c202274726169745f602592909101918201527f74797065223a202253746172742064617465222c202276616c7565223a2022006045820152855162004648816064840160208a0162003c55565b6200474162004734620047266200471f620046e2620046d3620046cc6200467d6064898b010162089f4b60ea1b815260030190565b7f7b22646973706c61795f74797065223a202264617465222c202274726169745f81527f74797065223a2022456e642064617465222c202276616c7565223a20220000006020820152603d0190565b8c62004364565b62089f4b60ea1b815260030190565b7f7b2274726169745f74797065223a202257696e6e65722061646472657373222c81526a10113b30b63ab2911d101160a91b6020820152602b0190565b8862004364565b61227d60f01b815260020190565b605d60f81b815260010190565b9998505050505050505050565b607b60f81b815268113730b6b2911d101160b91b600182015285516000906200477f81600a850160208b0162003c55565b6201116160ed1b600a9184019182018190526f113232b9b1b934b83a34b7b7111d101160811b600d8301528751620047bf81601d850160208c0162003c55565b80830192505080601d83015250691134b6b0b3b2911d101160b11b60208201528551620047f481602a840160208a0162003c55565b85519101906200480c81602a84016020890162003c55565b62004741620048656200485e6200484562004836602a86880101632e706e6760e01b815260040190565b6201116160ed1b815260030190565b6c1130ba3a3934b13aba32b9911d60991b8152600d0190565b8762004364565b607d60f81b815260010190565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c000000815260008251620048ac81601d85016020870162003c55565b91909101601d0192915050565b600060208284031215620048cc57600080fd5b815162000a8f8162003fd6565b601f82111562001074576000816000526020600020601f850160051c81016020861015620049045750805b601f850160051c820191505b81811015620024f95782815560010162004910565b81516001600160401b0381111562004941576200494162003e50565b620049598162004952845462004302565b84620048d9565b602080601f831160018114620049915760008415620049785750858301515b600019600386901b1c1916600185901b178555620024f9565b600085815260208120601f198616915b82811015620049c257888601518255948401946001909101908401620049a1565b5085821015620049e15787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6000825162004a0581846020870162003c55565b9190910192915050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009062004a449083018462003c7b565b9695505050505050565b60006020828403121562004a6157600080fd5b815162000a8f8162003c04565b8082028115828204841417620008f157620008f1620043cf565b60008162004a9a5762004a9a620043cf565b506000190190565b60008262004ac057634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052602160045260246000fdfe608060405260405161040a38038061040a83398101604081905261002291610268565b61002c8282610033565b5050610352565b61003c82610092565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a280511561008657610081828261010e565b505050565b61008e610185565b5050565b806001600160a01b03163b6000036100cd57604051634c9c8ce360e01b81526001600160a01b03821660048201526024015b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b03168460405161012b9190610336565b600060405180830381855af49150503d8060008114610166576040519150601f19603f3d011682016040523d82523d6000602084013e61016b565b606091505b50909250905061017c8583836101a6565b95945050505050565b34156101a45760405163b398979f60e01b815260040160405180910390fd5b565b6060826101bb576101b682610205565b6101fe565b81511580156101d257506001600160a01b0384163b155b156101fb57604051639996b31560e01b81526001600160a01b03851660048201526024016100c4565b50805b9392505050565b8051156102155780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b634e487b7160e01b600052604160045260246000fd5b60005b8381101561025f578181015183820152602001610247565b50506000910152565b6000806040838503121561027b57600080fd5b82516001600160a01b038116811461029257600080fd5b60208401519092506001600160401b03808211156102af57600080fd5b818501915085601f8301126102c357600080fd5b8151818111156102d5576102d561022e565b604051601f8201601f19908116603f011681019083821181831017156102fd576102fd61022e565b8160405282815288602084870101111561031657600080fd5b610327836020830160208801610244565b80955050505050509250929050565b60008251610348818460208701610244565b9190910192915050565b60aa806103606000396000f3fe6080604052600a600c565b005b60186014601a565b6051565b565b6000604c7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e808015606f573d6000f35b3d6000fdfea2646970667358221220bd42728c374f7f0ddc17b53ec61cdb40d51094c5fa601cbd894add86d0771b8264736f6c6343000818003360a060405234801561001057600080fd5b50338061003757604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b6100408161004a565b503360805261009a565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b608051610aea6100bc6000396000818161017001526104d40152610aea6000f3fe60806040526004361061007f5760003560e01c8063b61d27f61161004e578063b61d27f61461013e578063c45a01551461015e578063c4d66de814610192578063f2fde38b146101b257600080fd5b8063150b7a021461008b57806347e1da2a146100d5578063715018a6146100f55780638da5cb5b1461010c57600080fd5b3661008657005b600080fd5b34801561009757600080fd5b506100b76100a63660046106e7565b630a85bd0160e11b95945050505050565b6040516001600160e01b031990911681526020015b60405180910390f35b6100e86100e336600461079b565b6101d2565b6040516100cc9190610885565b34801561010157600080fd5b5061010a610461565b005b34801561011857600080fd5b506000546001600160a01b03165b6040516001600160a01b0390911681526020016100cc565b61015161014c3660046108e9565b610475565b6040516100cc9190610943565b34801561016a57600080fd5b506101267f000000000000000000000000000000000000000000000000000000000000000081565b34801561019e57600080fd5b5061010a6101ad36600461095d565b6104c9565b3480156101be57600080fd5b5061010a6101cd36600461095d565b610520565b60606101dc610552565b85821480156101f257508315806101f257508382145b6102385760405162461bcd60e51b81526020600482015260126024820152710eee4dedcce40c2e4e4c2f240d8cadccee8d60731b60448201526064015b60405180910390fd5b8167ffffffffffffffff81111561025157610251610978565b60405190808252806020026020018201604052801561028457816020015b606081526020019060019003908161026f5790505b509050600084900361036a5760005b868110156103645760008888838181106102af576102af61098e565b90506020020160208101906102c4919061095d565b90503660008686858181106102db576102db61098e565b90506020028101906102ed91906109a4565b91509150600061033584600085858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061057f92505050565b90508086868151811061034a5761034a61098e565b602002602001018190525084600101945050505050610293565b50610457565b60005b868110156104555760008888838181106103895761038961098e565b905060200201602081019061039e919061095d565b90503660008686858181106103b5576103b561098e565b90506020028101906103c791906109a4565b915091506000610426848b8b888181106103e3576103e361098e565b9050602002013585858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061057f92505050565b90508086868151811061043b5761043b61098e565b60200260200101819052508460010194505050505061036d565b505b9695505050505050565b610469610552565b6104736000610632565b565b606061047f610552565b6104c0858585858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061057f92505050565b95945050505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105145760405163118cdaa760e01b815233600482015260240161022f565b61051d81610632565b50565b610528610552565b6001600160a01b03811661051457604051631e4fbdf760e01b81526000600482015260240161022f565b6000546001600160a01b031633146104735760405163118cdaa760e01b815233600482015260240161022f565b60606000846001600160a01b0316848460405161059c91906109eb565b60006040518083038185875af1925050503d80600081146105d9576040519150601f19603f3d011682016040523d82523d6000602084013e6105de565b606091505b50925090508061062a576044825110156105f757600080fd5b600482019150818060200190518101906106119190610a07565b60405162461bcd60e51b815260040161022f9190610943565b509392505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80356001600160a01b038116811461069957600080fd5b919050565b60008083601f8401126106b057600080fd5b50813567ffffffffffffffff8111156106c857600080fd5b6020830191508360208285010111156106e057600080fd5b9250929050565b6000806000806000608086880312156106ff57600080fd5b61070886610682565b945061071660208701610682565b935060408601359250606086013567ffffffffffffffff81111561073957600080fd5b6107458882890161069e565b969995985093965092949392505050565b60008083601f84011261076857600080fd5b50813567ffffffffffffffff81111561078057600080fd5b6020830191508360208260051b85010111156106e057600080fd5b600080600080600080606087890312156107b457600080fd5b863567ffffffffffffffff808211156107cc57600080fd5b6107d88a838b01610756565b909850965060208901359150808211156107f157600080fd5b6107fd8a838b01610756565b9096509450604089013591508082111561081657600080fd5b5061082389828a01610756565b979a9699509497509295939492505050565b60005b83811015610850578181015183820152602001610838565b50506000910152565b60008151808452610871816020860160208601610835565b601f01601f19169290920160200192915050565b600060208083016020845280855180835260408601915060408160051b87010192506020870160005b828110156108dc57603f198886030184526108ca858351610859565b945092850192908501906001016108ae565b5092979650505050505050565b600080600080606085870312156108ff57600080fd5b61090885610682565b935060208501359250604085013567ffffffffffffffff81111561092b57600080fd5b6109378782880161069e565b95989497509550505050565b6020815260006109566020830184610859565b9392505050565b60006020828403121561096f57600080fd5b61095682610682565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000808335601e198436030181126109bb57600080fd5b83018035915067ffffffffffffffff8211156109d657600080fd5b6020019150368190038213156106e057600080fd5b600082516109fd818460208701610835565b9190910192915050565b600060208284031215610a1957600080fd5b815167ffffffffffffffff80821115610a3157600080fd5b818401915084601f830112610a4557600080fd5b815181811115610a5757610a57610978565b604051601f8201601f19908116603f01168101908382118183101715610a7f57610a7f610978565b81604052828152876020848701011115610a9857600080fd5b610aa9836020830160208801610835565b97965050505050505056fea26469706673582212209388cc9441e0986bee120b32be1c29eda96e129a50bcb254300c50efe2aac76364736f6c63430008180033645e039705490088daad89bae25049a34f4a9072d398537b1ab2425f24cbed0080bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930068747470733a2f2f7261772e67697468756275736572636f6e74656e742e636f6d2f70726f6d70746f7765722f7765626170702f6d61696e2f7372632f6173736574732f6e66742f4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f645e039705490088daad89bae25049a34f4a9072d398537b1ab2425f24cbed02a26469706673582212209806f4695177392d95c50d803f661803c0627a402b2916094032b9b05b081a6d64736f6c63430008180033",o={},l={},m={_format:i,contractName:s,sourceName:p,abi:r,bytecode:y,deployedBytecode:u,linkReferences:o,deployedLinkReferences:l},T="hh-sol-artifact-1",v="GameFrontend",w="contracts/GameFrontend.sol",g=[{inputs:[{internalType:"address",name:"gameContract_",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"gameContract",outputs:[{internalType:"contract IGame",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"gameStatus",outputs:[{internalType:"uint256",name:"totalChallanges",type:"uint256"},{internalType:"uint256",name:"ongoingChallanges",type:"uint256"},{internalType:"uint256",name:"solvedChallanges",type:"uint256"},{internalType:"uint256",name:"verifiedChallanges",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"startNumber",type:"uint256"},{internalType:"uint256",name:"endNumber",type:"uint256"}],name:"getNfts",outputs:[{components:[{internalType:"uint256",name:"id",type:"uint256"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"description",type:"string"},{internalType:"string",name:"gameType",type:"string"},{internalType:"bytes32",name:"prompt",type:"bytes32"},{internalType:"bytes32",name:"secret",type:"bytes32"},{internalType:"string",name:"imageUri",type:"string"},{internalType:"uint128",name:"startDate",type:"uint128"},{internalType:"uint128",name:"endDate",type:"uint128"},{internalType:"uint256",name:"awards",type:"uint256"},{internalType:"address",name:"winner",type:"address"}],internalType:"struct NftData[]",name:"data",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"}],name:"getPortfolioMaker",outputs:[{components:[{internalType:"uint256",name:"id",type:"uint256"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"description",type:"string"},{internalType:"string",name:"gameType",type:"string"},{internalType:"bytes32",name:"prompt",type:"bytes32"},{internalType:"bytes32",name:"secret",type:"bytes32"},{internalType:"string",name:"imageUri",type:"string"},{internalType:"uint128",name:"startDate",type:"uint128"},{internalType:"uint128",name:"endDate",type:"uint128"},{internalType:"uint256",name:"awards",type:"uint256"},{internalType:"address",name:"winner",type:"address"}],internalType:"struct NftData[]",name:"data",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"}],name:"getPortfolioSolver",outputs:[{components:[{internalType:"uint256",name:"id",type:"uint256"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"description",type:"string"},{internalType:"string",name:"gameType",type:"string"},{internalType:"bytes32",name:"prompt",type:"bytes32"},{internalType:"bytes32",name:"secret",type:"bytes32"},{internalType:"string",name:"imageUri",type:"string"},{internalType:"uint128",name:"startDate",type:"uint128"},{internalType:"uint128",name:"endDate",type:"uint128"},{internalType:"uint256",name:"awards",type:"uint256"},{internalType:"address",name:"winner",type:"address"}],internalType:"struct NftData[]",name:"data",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"topk",type:"uint256"}],name:"getTopSolvers",outputs:[{internalType:"address[]",name:"solvers",type:"address[]"},{internalType:"uint256[]",name:"counts",type:"uint256[]"},{internalType:"uint256[]",name:"awards",type:"uint256[]"}],stateMutability:"view",type:"function"}],M="0x60a060405234801561001057600080fd5b506040516200239e3803806200239e83398101604081905261003191610042565b6001600160a01b0316608052610072565b60006020828403121561005457600080fd5b81516001600160a01b038116811461006b57600080fd5b9392505050565b608051612246620001586000396000818160f2015281816101480152818161031f015281816103ab015281816103da015281816104f8015281816105270152818161063d0152818161066c015281816107a1015281816108c4015281816109ab01528181610a5301528181610b1201528181610c0701528181610cb801528181610dd301528181610f1401528181610f96015281816110180152818161109a0152818161114d01528181611242015281816112d3015281816113620152818161147d015281816115bb015281816116ca01528181611761015261187c01526122466000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c80631cb04b7814610067578063572edf7914610092578063722fed7e146100b2578063a4abc3f9146100da578063d3f33009146100ed578063fac6350d1461012c575b600080fd5b61007a610075366004611bc9565b61013f565b60405161008993929190611c1e565b60405180910390f35b6100a56100a0366004611cac565b610aed565b6040516100899190611d20565b6100ba610f0c565b604080519485526020850193909352918301526060820152608001610089565b6100a56100e8366004611cac565b611128565b6101147f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610089565b6100a561013a366004611e59565b6115b5565b606080606060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316637b80e8e66040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101c89190611e7b565b9050808511156101d6578094505b50836001600160401b038111156101ef576101ef611e94565b604051908082528060200260200182016040528015610218578160200160208202803683370190505b509250836001600160401b0381111561023357610233611e94565b60405190808252806020026020018201604052801561025c578160200160208202803683370190505b509150836001600160401b0381111561027757610277611e94565b6040519080825280602002602001820160405280156102a0578160200160208202803683370190505b5090506000846001600160401b038111156102bd576102bd611e94565b6040519080825280602002602001820160405280156102e6578160200160208202803683370190505b50905060005b8581101561031a578082828151811061030757610307611eaa565b60209081029190910101526001016102ec565b50845b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316637b80e8e66040518163ffffffff1660e01b8152600401602060405180830381865afa15801561037b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061039f9190611e7b565b8110156108b4576000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663415fa50a7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663fe7f43da87868151811061041957610419611eaa565b60200260200101516040518263ffffffff1660e01b815260040161043f91815260200190565b602060405180830381865afa15801561045c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104809190611ed0565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa1580156104c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104e89190611e7b565b905060015b8881101561078857817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663415fa50a7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663fe7f43da89868151811061056657610566611eaa565b60200260200101516040518263ffffffff1660e01b815260040161058c91815260200190565b602060405180830381865afa1580156105a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105cd9190611ed0565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015610611573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106359190611e7b565b1015610780577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663415fa50a7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663fe7f43da8885815181106106ab576106ab611eaa565b60200260200101516040518263ffffffff1660e01b81526004016106d191815260200190565b602060405180830381865afa1580156106ee573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107129190611ed0565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015610756573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061077a9190611e7b565b91508092505b6001016104ed565b50604051637f3fa1ed60e11b81526004810184905281907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063415fa50a90829063fe7f43da90602401602060405180830381865afa1580156107f8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061081c9190611ed0565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015610860573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108849190611e7b565b11156108aa578284838151811061089d5761089d611eaa565b6020026020010181815250505b505060010161031d565b5060005b85811015610ae45760007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663fe7f43da84848151811061090357610903611eaa565b60200260200101516040518263ffffffff1660e01b815260040161092991815260200190565b602060405180830381865afa158015610946573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061096a9190611ed0565b90508086838151811061097f5761097f611eaa565b6001600160a01b039283166020918202929092010152604051623e4a5b60e11b815282821660048201527f000000000000000000000000000000000000000000000000000000000000000090911690627c94b690602401602060405180830381865afa1580156109f3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a179190611e7b565b858381518110610a2957610a29611eaa565b60209081029190910101526040516320afd28560e11b81526001600160a01b0382811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063415fa50a90602401602060405180830381865afa158015610a9a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610abe9190611e7b565b848381518110610ad057610ad0611eaa565b6020908102919091010152506001016108b8565b50509193909250565b60405163215812e960e21b81526001600160a01b0382811660048301526060916000917f000000000000000000000000000000000000000000000000000000000000000016906385604ba490602401600060405180830381865afa158015610b59573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610b819190810190611f46565b8051909150806001600160401b03811115610b9e57610b9e611e94565b604051908082528060200260200182016040528015610bd757816020015b610bc4611b47565b815260200190600190039081610bbc5790505b50925060005b81811015610f04576000838281518110610bf957610bf9611eaa565b6020026020010151905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166354c87af4836040518263ffffffff1660e01b8152600401610c5391815260200190565b602060405180830381865afa158015610c70573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c949190611e7b565b60405163277ecfbb60e01b8152600481018490529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063277ecfbb90602401600060405180830381865afa158015610cff573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610d27919081019061206d565b905060006040518061018001604052808481526020018581526020018360000151815260200183602001518152602001836040015181526020018360600151815260200183608001518152602001610d7d6119bc565b610d86866119dc565b604051602001610d97929190612169565b60405160208183030381529060405281526020018360a001516001600160801b031681526020018360c001516001600160801b031681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d2da7bca6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e2f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e539190611ed0565b6040516370a0823160e01b81526001600160a01b03888116600483015291909116906370a0823190602401602060405180830381865afa158015610e9b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ebf9190611e7b565b81526020018360e001516001600160a01b0316815250905080888681518110610eea57610eea611eaa565b602002602001018190525084600101945050505050610bdd565b505050919050565b6000806000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f70573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f949190611e7b565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ef7926626040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ff2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110169190611e7b565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663c516e1566040518163ffffffff1660e01b8152600401602060405180830381865afa158015611074573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110989190611e7b565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663fe9eba156040518163ffffffff1660e01b8152600401602060405180830381865afa1580156110f6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061111a9190611e7b565b935093509350935090919293565b6040516370a0823160e01b81526001600160a01b0382811660048301526060916000917f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015611194573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111b89190611e7b565b9050806001600160401b038111156111d2576111d2611e94565b60405190808252806020026020018201604052801561120b57816020015b6111f8611b47565b8152602001906001900390816111f05790505b50915060005b818110156115ae57604051632f745c5960e01b81526001600160a01b038581166004830152602482018390526000917f000000000000000000000000000000000000000000000000000000000000000090911690632f745c5990604401602060405180830381865afa15801561128b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112af9190611e7b565b6040516315321ebd60e21b8152600481018290529091506000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906354c87af490602401602060405180830381865afa15801561131a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061133e9190611e7b565b60405163277ecfbb60e01b8152600481018490529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063277ecfbb90602401600060405180830381865afa1580156113a9573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526113d1919081019061206d565b9050600060405180610180016040528084815260200185815260200183600001518152602001836020015181526020018360400151815260200183606001518152602001836080015181526020016114276119bc565b611430866119dc565b604051602001611441929190612169565b60405160208183030381529060405281526020018360a001516001600160801b031681526020018360c001516001600160801b031681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d2da7bca6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156114d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114fd9190611ed0565b6040516370a0823160e01b81526001600160a01b03888116600483015291909116906370a0823190602401602060405180830381865afa158015611545573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115699190611e7b565b81526020018360e001516001600160a01b031681525090508087868151811061159457611594611eaa565b602002602001018190525084600101945050505050611211565b5050919050565b606060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611617573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061163b9190611e7b565b905080831115611649578092505b5061165483836121a7565b6001600160401b0381111561166b5761166b611e94565b6040519080825280602002602001820160405280156116a457816020015b611691611b47565b8152602001906001900390816116895790505b509050825b828110156119b557604051639dd3e25560e01b8152600481018290526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690639dd3e25590602401602060405180830381865afa158015611719573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061173d9190611e7b565b60405163277ecfbb60e01b8152600481018290529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063277ecfbb90602401600060405180830381865afa1580156117a8573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526117d0919081019061206d565b9050600060405180610180016040528085815260200184815260200183600001518152602001836020015181526020018360400151815260200183606001518152602001836080015181526020016118266119bc565b61182f876119dc565b604051602001611840929190612169565b60405160208183030381529060405281526020018360a001516001600160801b031681526020018360c001516001600160801b031681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d2da7bca6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156118d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118fc9190611ed0565b6040516370a0823160e01b81526001600160a01b03878116600483015291909116906370a0823190602401602060405180830381865afa158015611944573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119689190611e7b565b815260e08401516001600160a01b03166020909101529050808561198c89876121a7565b8151811061199c5761199c611eaa565b60200260200101819052508360010193505050506116a9565b5092915050565b60606040518060800160405280604881526020016121c960489139905090565b606060006119e983611a6e565b60010190506000816001600160401b03811115611a0857611a08611e94565b6040519080825280601f01601f191660200182016040528015611a32576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084611a3c57509392505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310611aad5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310611ad9576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310611af757662386f26fc10000830492506010015b6305f5e1008310611b0f576305f5e100830492506008015b6127108310611b2357612710830492506004015b60648310611b35576064830492506002015b600a8310611b41576001015b92915050565b604051806101800160405280600081526020016000815260200160608152602001606081526020016060815260200160008019168152602001600080191681526020016060815260200160006001600160801b0316815260200160006001600160801b031681526020016000815260200160006001600160a01b031681525090565b600060208284031215611bdb57600080fd5b5035919050565b60008151808452602080850194506020840160005b83811015611c1357815187529582019590820190600101611bf7565b509495945050505050565b606080825284519082018190526000906020906080840190828801845b82811015611c605781516001600160a01b031684529284019290840190600101611c3b565b5050508381036020850152611c758187611be2565b9150508281036040840152611c8a8185611be2565b9695505050505050565b6001600160a01b0381168114611ca957600080fd5b50565b600060208284031215611cbe57600080fd5b8135611cc981611c94565b9392505050565b60005b83811015611ceb578181015183820152602001611cd3565b50506000910152565b60008151808452611d0c816020860160208601611cd0565b601f01601f19169290920160200192915050565b600060208083018184528085518083526040925060408601915060408160051b87010184880160005b83811015611e4b57603f198984030185528151610180815185528882015189860152878201518189870152611d8082870182611cf4565b91505060608083015186830382880152611d9a8382611cf4565b9250505060808083015186830382880152611db58382611cf4565b9250505060a080830151818701525060c080830151818701525060e08083015186830382880152611de68382611cf4565b9250505061010080830151611e05828801826001600160801b03169052565b5050610120828101516001600160801b0316908601526101408083015190860152610160918201516001600160a01b031691909401529386019390860190600101611d49565b509098975050505050505050565b60008060408385031215611e6c57600080fd5b50508035926020909101359150565b600060208284031215611e8d57600080fd5b5051919050565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b8051611ecb81611c94565b919050565b600060208284031215611ee257600080fd5b8151611cc981611c94565b60405161010081016001600160401b0381118282101715611f1057611f10611e94565b60405290565b604051601f8201601f191681016001600160401b0381118282101715611f3e57611f3e611e94565b604052919050565b60006020808385031215611f5957600080fd5b82516001600160401b0380821115611f7057600080fd5b818501915085601f830112611f8457600080fd5b815181811115611f9657611f96611e94565b8060051b9150611fa7848301611f16565b8181529183018401918481019088841115611fc157600080fd5b938501935b83851015611fdf57845182529385019390850190611fc6565b98975050505050505050565b600082601f830112611ffc57600080fd5b81516001600160401b0381111561201557612015611e94565b612028601f8201601f1916602001611f16565b81815284602083860101111561203d57600080fd5b61204e826020830160208701611cd0565b949350505050565b80516001600160801b0381168114611ecb57600080fd5b60006020828403121561207f57600080fd5b81516001600160401b038082111561209657600080fd5b9083019061010082860312156120ab57600080fd5b6120b3611eed565b8251828111156120c257600080fd5b6120ce87828601611feb565b8252506020830151828111156120e357600080fd5b6120ef87828601611feb565b60208301525060408301518281111561210757600080fd5b61211387828601611feb565b604083015250606083015160608201526080830151608082015261213960a08401612056565b60a082015261214a60c08401612056565b60c082015261215b60e08401611ec0565b60e082015295945050505050565b6000835161217b818460208801611cd0565b83519083019061218f818360208801611cd0565b632e706e6760e01b9101908152600401949350505050565b81810381811115611b4157634e487b7160e01b600052601160045260246000fdfe68747470733a2f2f7261772e67697468756275736572636f6e74656e742e636f6d2f70726f6d70746f7765722f7765626170702f6d61696e2f7372632f6173736574732f6e66742fa264697066735822122087cd3dfe1ee388c3f05f8be6f1699de697e25b4b426d3230877658d6bd5bea7f64736f6c63430008180033",I="0x608060405234801561001057600080fd5b50600436106100625760003560e01c80631cb04b7814610067578063572edf7914610092578063722fed7e146100b2578063a4abc3f9146100da578063d3f33009146100ed578063fac6350d1461012c575b600080fd5b61007a610075366004611bc9565b61013f565b60405161008993929190611c1e565b60405180910390f35b6100a56100a0366004611cac565b610aed565b6040516100899190611d20565b6100ba610f0c565b604080519485526020850193909352918301526060820152608001610089565b6100a56100e8366004611cac565b611128565b6101147f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610089565b6100a561013a366004611e59565b6115b5565b606080606060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316637b80e8e66040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101c89190611e7b565b9050808511156101d6578094505b50836001600160401b038111156101ef576101ef611e94565b604051908082528060200260200182016040528015610218578160200160208202803683370190505b509250836001600160401b0381111561023357610233611e94565b60405190808252806020026020018201604052801561025c578160200160208202803683370190505b509150836001600160401b0381111561027757610277611e94565b6040519080825280602002602001820160405280156102a0578160200160208202803683370190505b5090506000846001600160401b038111156102bd576102bd611e94565b6040519080825280602002602001820160405280156102e6578160200160208202803683370190505b50905060005b8581101561031a578082828151811061030757610307611eaa565b60209081029190910101526001016102ec565b50845b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316637b80e8e66040518163ffffffff1660e01b8152600401602060405180830381865afa15801561037b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061039f9190611e7b565b8110156108b4576000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663415fa50a7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663fe7f43da87868151811061041957610419611eaa565b60200260200101516040518263ffffffff1660e01b815260040161043f91815260200190565b602060405180830381865afa15801561045c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104809190611ed0565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa1580156104c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104e89190611e7b565b905060015b8881101561078857817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663415fa50a7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663fe7f43da89868151811061056657610566611eaa565b60200260200101516040518263ffffffff1660e01b815260040161058c91815260200190565b602060405180830381865afa1580156105a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105cd9190611ed0565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015610611573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106359190611e7b565b1015610780577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663415fa50a7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663fe7f43da8885815181106106ab576106ab611eaa565b60200260200101516040518263ffffffff1660e01b81526004016106d191815260200190565b602060405180830381865afa1580156106ee573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107129190611ed0565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015610756573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061077a9190611e7b565b91508092505b6001016104ed565b50604051637f3fa1ed60e11b81526004810184905281907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063415fa50a90829063fe7f43da90602401602060405180830381865afa1580156107f8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061081c9190611ed0565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015610860573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108849190611e7b565b11156108aa578284838151811061089d5761089d611eaa565b6020026020010181815250505b505060010161031d565b5060005b85811015610ae45760007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663fe7f43da84848151811061090357610903611eaa565b60200260200101516040518263ffffffff1660e01b815260040161092991815260200190565b602060405180830381865afa158015610946573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061096a9190611ed0565b90508086838151811061097f5761097f611eaa565b6001600160a01b039283166020918202929092010152604051623e4a5b60e11b815282821660048201527f000000000000000000000000000000000000000000000000000000000000000090911690627c94b690602401602060405180830381865afa1580156109f3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a179190611e7b565b858381518110610a2957610a29611eaa565b60209081029190910101526040516320afd28560e11b81526001600160a01b0382811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063415fa50a90602401602060405180830381865afa158015610a9a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610abe9190611e7b565b848381518110610ad057610ad0611eaa565b6020908102919091010152506001016108b8565b50509193909250565b60405163215812e960e21b81526001600160a01b0382811660048301526060916000917f000000000000000000000000000000000000000000000000000000000000000016906385604ba490602401600060405180830381865afa158015610b59573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610b819190810190611f46565b8051909150806001600160401b03811115610b9e57610b9e611e94565b604051908082528060200260200182016040528015610bd757816020015b610bc4611b47565b815260200190600190039081610bbc5790505b50925060005b81811015610f04576000838281518110610bf957610bf9611eaa565b6020026020010151905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166354c87af4836040518263ffffffff1660e01b8152600401610c5391815260200190565b602060405180830381865afa158015610c70573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c949190611e7b565b60405163277ecfbb60e01b8152600481018490529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063277ecfbb90602401600060405180830381865afa158015610cff573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610d27919081019061206d565b905060006040518061018001604052808481526020018581526020018360000151815260200183602001518152602001836040015181526020018360600151815260200183608001518152602001610d7d6119bc565b610d86866119dc565b604051602001610d97929190612169565b60405160208183030381529060405281526020018360a001516001600160801b031681526020018360c001516001600160801b031681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d2da7bca6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e2f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e539190611ed0565b6040516370a0823160e01b81526001600160a01b03888116600483015291909116906370a0823190602401602060405180830381865afa158015610e9b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ebf9190611e7b565b81526020018360e001516001600160a01b0316815250905080888681518110610eea57610eea611eaa565b602002602001018190525084600101945050505050610bdd565b505050919050565b6000806000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f70573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f949190611e7b565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ef7926626040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ff2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110169190611e7b565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663c516e1566040518163ffffffff1660e01b8152600401602060405180830381865afa158015611074573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110989190611e7b565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663fe9eba156040518163ffffffff1660e01b8152600401602060405180830381865afa1580156110f6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061111a9190611e7b565b935093509350935090919293565b6040516370a0823160e01b81526001600160a01b0382811660048301526060916000917f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015611194573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111b89190611e7b565b9050806001600160401b038111156111d2576111d2611e94565b60405190808252806020026020018201604052801561120b57816020015b6111f8611b47565b8152602001906001900390816111f05790505b50915060005b818110156115ae57604051632f745c5960e01b81526001600160a01b038581166004830152602482018390526000917f000000000000000000000000000000000000000000000000000000000000000090911690632f745c5990604401602060405180830381865afa15801561128b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112af9190611e7b565b6040516315321ebd60e21b8152600481018290529091506000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906354c87af490602401602060405180830381865afa15801561131a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061133e9190611e7b565b60405163277ecfbb60e01b8152600481018490529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063277ecfbb90602401600060405180830381865afa1580156113a9573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526113d1919081019061206d565b9050600060405180610180016040528084815260200185815260200183600001518152602001836020015181526020018360400151815260200183606001518152602001836080015181526020016114276119bc565b611430866119dc565b604051602001611441929190612169565b60405160208183030381529060405281526020018360a001516001600160801b031681526020018360c001516001600160801b031681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d2da7bca6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156114d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114fd9190611ed0565b6040516370a0823160e01b81526001600160a01b03888116600483015291909116906370a0823190602401602060405180830381865afa158015611545573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115699190611e7b565b81526020018360e001516001600160a01b031681525090508087868151811061159457611594611eaa565b602002602001018190525084600101945050505050611211565b5050919050565b606060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611617573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061163b9190611e7b565b905080831115611649578092505b5061165483836121a7565b6001600160401b0381111561166b5761166b611e94565b6040519080825280602002602001820160405280156116a457816020015b611691611b47565b8152602001906001900390816116895790505b509050825b828110156119b557604051639dd3e25560e01b8152600481018290526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690639dd3e25590602401602060405180830381865afa158015611719573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061173d9190611e7b565b60405163277ecfbb60e01b8152600481018290529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063277ecfbb90602401600060405180830381865afa1580156117a8573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526117d0919081019061206d565b9050600060405180610180016040528085815260200184815260200183600001518152602001836020015181526020018360400151815260200183606001518152602001836080015181526020016118266119bc565b61182f876119dc565b604051602001611840929190612169565b60405160208183030381529060405281526020018360a001516001600160801b031681526020018360c001516001600160801b031681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d2da7bca6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156118d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118fc9190611ed0565b6040516370a0823160e01b81526001600160a01b03878116600483015291909116906370a0823190602401602060405180830381865afa158015611944573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119689190611e7b565b815260e08401516001600160a01b03166020909101529050808561198c89876121a7565b8151811061199c5761199c611eaa565b60200260200101819052508360010193505050506116a9565b5092915050565b60606040518060800160405280604881526020016121c960489139905090565b606060006119e983611a6e565b60010190506000816001600160401b03811115611a0857611a08611e94565b6040519080825280601f01601f191660200182016040528015611a32576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084611a3c57509392505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310611aad5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310611ad9576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310611af757662386f26fc10000830492506010015b6305f5e1008310611b0f576305f5e100830492506008015b6127108310611b2357612710830492506004015b60648310611b35576064830492506002015b600a8310611b41576001015b92915050565b604051806101800160405280600081526020016000815260200160608152602001606081526020016060815260200160008019168152602001600080191681526020016060815260200160006001600160801b0316815260200160006001600160801b031681526020016000815260200160006001600160a01b031681525090565b600060208284031215611bdb57600080fd5b5035919050565b60008151808452602080850194506020840160005b83811015611c1357815187529582019590820190600101611bf7565b509495945050505050565b606080825284519082018190526000906020906080840190828801845b82811015611c605781516001600160a01b031684529284019290840190600101611c3b565b5050508381036020850152611c758187611be2565b9150508281036040840152611c8a8185611be2565b9695505050505050565b6001600160a01b0381168114611ca957600080fd5b50565b600060208284031215611cbe57600080fd5b8135611cc981611c94565b9392505050565b60005b83811015611ceb578181015183820152602001611cd3565b50506000910152565b60008151808452611d0c816020860160208601611cd0565b601f01601f19169290920160200192915050565b600060208083018184528085518083526040925060408601915060408160051b87010184880160005b83811015611e4b57603f198984030185528151610180815185528882015189860152878201518189870152611d8082870182611cf4565b91505060608083015186830382880152611d9a8382611cf4565b9250505060808083015186830382880152611db58382611cf4565b9250505060a080830151818701525060c080830151818701525060e08083015186830382880152611de68382611cf4565b9250505061010080830151611e05828801826001600160801b03169052565b5050610120828101516001600160801b0316908601526101408083015190860152610160918201516001600160a01b031691909401529386019390860190600101611d49565b509098975050505050505050565b60008060408385031215611e6c57600080fd5b50508035926020909101359150565b600060208284031215611e8d57600080fd5b5051919050565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b8051611ecb81611c94565b919050565b600060208284031215611ee257600080fd5b8151611cc981611c94565b60405161010081016001600160401b0381118282101715611f1057611f10611e94565b60405290565b604051601f8201601f191681016001600160401b0381118282101715611f3e57611f3e611e94565b604052919050565b60006020808385031215611f5957600080fd5b82516001600160401b0380821115611f7057600080fd5b818501915085601f830112611f8457600080fd5b815181811115611f9657611f96611e94565b8060051b9150611fa7848301611f16565b8181529183018401918481019088841115611fc157600080fd5b938501935b83851015611fdf57845182529385019390850190611fc6565b98975050505050505050565b600082601f830112611ffc57600080fd5b81516001600160401b0381111561201557612015611e94565b612028601f8201601f1916602001611f16565b81815284602083860101111561203d57600080fd5b61204e826020830160208701611cd0565b949350505050565b80516001600160801b0381168114611ecb57600080fd5b60006020828403121561207f57600080fd5b81516001600160401b038082111561209657600080fd5b9083019061010082860312156120ab57600080fd5b6120b3611eed565b8251828111156120c257600080fd5b6120ce87828601611feb565b8252506020830151828111156120e357600080fd5b6120ef87828601611feb565b60208301525060408301518281111561210757600080fd5b61211387828601611feb565b604083015250606083015160608201526080830151608082015261213960a08401612056565b60a082015261214a60c08401612056565b60c082015261215b60e08401611ec0565b60e082015295945050505050565b6000835161217b818460208801611cd0565b83519083019061218f818360208801611cd0565b632e706e6760e01b9101908152600401949350505050565b81810381811115611b4157634e487b7160e01b600052601160045260246000fdfe68747470733a2f2f7261772e67697468756275736572636f6e74656e742e636f6d2f70726f6d70746f7765722f7765626170702f6d61696e2f7372632f6173736574732f6e66742fa264697066735822122087cd3dfe1ee388c3f05f8be6f1699de697e25b4b426d3230877658d6bd5bea7f64736f6c63430008180033",k={},A={},x={_format:T,contractName:v,sourceName:w,abi:g,bytecode:M,deployedBytecode:I,linkReferences:k,deployedLinkReferences:A},R="hh-sol-artifact-1",C="USDC",O="contracts/utils/USDC.sol",E=[{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"allowance",type:"uint256"},{internalType:"uint256",name:"needed",type:"uint256"}],name:"ERC20InsufficientAllowance",type:"error"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"needed",type:"uint256"}],name:"ERC20InsufficientBalance",type:"error"},{inputs:[{internalType:"address",name:"approver",type:"address"}],name:"ERC20InvalidApprover",type:"error"},{inputs:[{internalType:"address",name:"receiver",type:"address"}],name:"ERC20InvalidReceiver",type:"error"},{inputs:[{internalType:"address",name:"sender",type:"address"}],name:"ERC20InvalidSender",type:"error"},{inputs:[{internalType:"address",name:"spender",type:"address"}],name:"ERC20InvalidSpender",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}],h="0x60803462000339576040906001600160401b03908083018281118282101762000323578352600981526020916854657374205553444360b81b838301528351928484018481108382111762000323578552600493848152635553444360e01b828201528351908382116200030e576003928354926001968785811c9516801562000303575b83861014620002ee578190601f9586811162000298575b508390868311600114620002315760009262000225575b505060001982871b1c191690871b1784555b8151948511620002105786548681811c9116801562000205575b82821014620001f057838111620001a5575b50809285116001146200013757509383949184926000956200012b575b50501b92600019911b1c19161790555b51610b2790816200033f8239f35b0151935038806200010d565b92919084601f1981168860005285600020956000905b898383106200018a57505050106200016f575b50505050811b0190556200011d565b01519060f884600019921b161c191690553880808062000160565b8587015189559097019694850194889350908101906200014d565b87600052816000208480880160051c820192848910620001e6575b0160051c019087905b828110620001d9575050620000f0565b60008155018790620001c9565b92508192620001c0565b602288634e487b7160e01b6000525260246000fd5b90607f1690620000de565b604187634e487b7160e01b6000525260246000fd5b015190503880620000b2565b90899350601f1983169188600052856000209260005b8782821062000281575050841162000268575b505050811b018455620000c4565b015160001983891b60f8161c191690553880806200025a565b8385015186558d9790950194938401930162000247565b90915086600052836000208680850160051c820192868610620002e4575b918b91869594930160051c01915b828110620002d45750506200009b565b600081558594508b9101620002c4565b92508192620002b6565b602289634e487b7160e01b6000525260246000fd5b94607f169462000084565b604186634e487b7160e01b6000525260246000fd5b634e487b7160e01b600052604160045260246000fd5b600080fdfe608060408181526004918236101561001657600080fd5b600092833560e01c91826306fdde03146107bf57508163095ea7b3146106ba57816318160ddd1461067d57816323b872dd146104f3578163313ce567146104b957816340c10f19146103b057816370a082311461034f57816395d89b411461015757508063a9059cbb146101095763dd62ed3e1461009357600080fd5b3461010557807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261010557806020926100cd610965565b6100d561098d565b73ffffffffffffffffffffffffffffffffffffffff91821683526001865283832091168252845220549051908152f35b5080fd5b503461010557807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261010557602090610150610146610965565b60243590336109b0565b5160018152f35b83833461010557817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101055780519082845460018160011c9060018316928315610345575b60209384841081146103195783885287959493929181156102be5750600114610242575b50505003601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019267ffffffffffffffff84118385101761021657508291826102129252826108ff565b0390f35b806041867f4e487b71000000000000000000000000000000000000000000000000000000006024945252fd5b8888529193925086917f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b5b8284106102a857505050907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe092601f928201019181936101c4565b805488850187015287945092850192810161026d565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016848701525050151560051b830101905081601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe06101c4565b60248960228c7f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b91607f16916101a0565b5050346101055760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610105578060209273ffffffffffffffffffffffffffffffffffffffff6103a1610965565b16815280845220549051908152f35b919050346104b557807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104b5576103e9610965565b9073ffffffffffffffffffffffffffffffffffffffff6024359216928315610487576002549083820180921161045b575084927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9260209260025585855284835280852082815401905551908152a380f35b8560116024927f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b8460249251917fec442f05000000000000000000000000000000000000000000000000000000008352820152fd5b8280fd5b50503461010557817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610105576020905160128152f35b9050823461067a5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261067a5761052d610965565b61053561098d565b916044359373ffffffffffffffffffffffffffffffffffffffff8316808352600160205286832033845260205286832054917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff830361059d575b6020886101508989896109b0565b8683106106355781156106065733156105d7575082526001602090815286832033845281529186902090859003905582906101508761058f565b602490848951917f94280d62000000000000000000000000000000000000000000000000000000008352820152fd5b602490848951917fe602df05000000000000000000000000000000000000000000000000000000008352820152fd5b87517ffb8f41b2000000000000000000000000000000000000000000000000000000008152339181019182526020820193909352604081018790528291506060010390fd5b80fd5b50503461010557817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610105576020906002549051908152f35b9050346104b557817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104b5576106f2610965565b6024359033156107905773ffffffffffffffffffffffffffffffffffffffff1691821561076157508083602095338152600187528181208582528752205582519081527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925843392a35160018152f35b602490858551917f94280d62000000000000000000000000000000000000000000000000000000008352820152fd5b602483868651917fe602df05000000000000000000000000000000000000000000000000000000008352820152fd5b849084346104b557827ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104b5578260035460018160011c90600183169283156108f5575b60209384841081146103195783885287959493929181156102be57506001146108785750505003601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019267ffffffffffffffff84118385101761021657508291826102129252826108ff565b600388529193925086917fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b8284106108df57505050907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe092601f928201019181936101c4565b80548885018701528794509285019281016108a4565b91607f1691610807565b60208082528251818301819052939260005b858110610951575050507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8460006040809697860101520116010190565b818101830151848201604001528201610911565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361098857565b600080fd5b6024359073ffffffffffffffffffffffffffffffffffffffff8216820361098857565b9173ffffffffffffffffffffffffffffffffffffffff808416928315610ac05716928315610a8f5760009083825281602052604082205490838210610a37575091604082827fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef958760209652828652038282205586815220818154019055604051908152a3565b6040517fe450d38c00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff919091166004820152602481019190915260448101839052606490fd5b60246040517fec442f0500000000000000000000000000000000000000000000000000000000815260006004820152fd5b60246040517f96c6fd1e00000000000000000000000000000000000000000000000000000000815260006004820152fdfea264697066735822122067ce05df6d7ffb0e8f689c413f5cac896b68ec4b04d38d85186f104968cf2b0564736f6c63430008180033",S="0x608060408181526004918236101561001657600080fd5b600092833560e01c91826306fdde03146107bf57508163095ea7b3146106ba57816318160ddd1461067d57816323b872dd146104f3578163313ce567146104b957816340c10f19146103b057816370a082311461034f57816395d89b411461015757508063a9059cbb146101095763dd62ed3e1461009357600080fd5b3461010557807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261010557806020926100cd610965565b6100d561098d565b73ffffffffffffffffffffffffffffffffffffffff91821683526001865283832091168252845220549051908152f35b5080fd5b503461010557807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261010557602090610150610146610965565b60243590336109b0565b5160018152f35b83833461010557817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101055780519082845460018160011c9060018316928315610345575b60209384841081146103195783885287959493929181156102be5750600114610242575b50505003601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019267ffffffffffffffff84118385101761021657508291826102129252826108ff565b0390f35b806041867f4e487b71000000000000000000000000000000000000000000000000000000006024945252fd5b8888529193925086917f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b5b8284106102a857505050907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe092601f928201019181936101c4565b805488850187015287945092850192810161026d565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016848701525050151560051b830101905081601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe06101c4565b60248960228c7f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b91607f16916101a0565b5050346101055760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610105578060209273ffffffffffffffffffffffffffffffffffffffff6103a1610965565b16815280845220549051908152f35b919050346104b557807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104b5576103e9610965565b9073ffffffffffffffffffffffffffffffffffffffff6024359216928315610487576002549083820180921161045b575084927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9260209260025585855284835280852082815401905551908152a380f35b8560116024927f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b8460249251917fec442f05000000000000000000000000000000000000000000000000000000008352820152fd5b8280fd5b50503461010557817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610105576020905160128152f35b9050823461067a5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261067a5761052d610965565b61053561098d565b916044359373ffffffffffffffffffffffffffffffffffffffff8316808352600160205286832033845260205286832054917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff830361059d575b6020886101508989896109b0565b8683106106355781156106065733156105d7575082526001602090815286832033845281529186902090859003905582906101508761058f565b602490848951917f94280d62000000000000000000000000000000000000000000000000000000008352820152fd5b602490848951917fe602df05000000000000000000000000000000000000000000000000000000008352820152fd5b87517ffb8f41b2000000000000000000000000000000000000000000000000000000008152339181019182526020820193909352604081018790528291506060010390fd5b80fd5b50503461010557817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610105576020906002549051908152f35b9050346104b557817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104b5576106f2610965565b6024359033156107905773ffffffffffffffffffffffffffffffffffffffff1691821561076157508083602095338152600187528181208582528752205582519081527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925843392a35160018152f35b602490858551917f94280d62000000000000000000000000000000000000000000000000000000008352820152fd5b602483868651917fe602df05000000000000000000000000000000000000000000000000000000008352820152fd5b849084346104b557827ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104b5578260035460018160011c90600183169283156108f5575b60209384841081146103195783885287959493929181156102be57506001146108785750505003601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019267ffffffffffffffff84118385101761021657508291826102129252826108ff565b600388529193925086917fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b8284106108df57505050907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe092601f928201019181936101c4565b80548885018701528794509285019281016108a4565b91607f1691610807565b60208082528251818301819052939260005b858110610951575050507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8460006040809697860101520116010190565b818101830151848201604001528201610911565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361098857565b600080fd5b6024359073ffffffffffffffffffffffffffffffffffffffff8216820361098857565b9173ffffffffffffffffffffffffffffffffffffffff808416928315610ac05716928315610a8f5760009083825281602052604082205490838210610a37575091604082827fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef958760209652828652038282205586815220818154019055604051908152a3565b6040517fe450d38c00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff919091166004820152602481019190915260448101839052606490fd5b60246040517fec442f0500000000000000000000000000000000000000000000000000000000815260006004820152fd5b60246040517f96c6fd1e00000000000000000000000000000000000000000000000000000000815260006004820152fdfea264697066735822122067ce05df6d7ffb0e8f689c413f5cac896b68ec4b04d38d85186f104968cf2b0564736f6c63430008180033",F={},N={},G={_format:R,contractName:C,sourceName:O,abi:E,bytecode:h,deployedBytecode:S,linkReferences:F,deployedLinkReferences:N},$="hh-sol-artifact-1",B="Verified",D="contracts/Badge.sol",L=[{inputs:[],stateMutability:"nonpayable",type:"constructor"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"address",name:"owner",type:"address"}],name:"ERC721IncorrectOwner",type:"error"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ERC721InsufficientApproval",type:"error"},{inputs:[{internalType:"address",name:"approver",type:"address"}],name:"ERC721InvalidApprover",type:"error"},{inputs:[{internalType:"address",name:"operator",type:"address"}],name:"ERC721InvalidOperator",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"ERC721InvalidOwner",type:"error"},{inputs:[{internalType:"address",name:"receiver",type:"address"}],name:"ERC721InvalidReceiver",type:"error"},{inputs:[{internalType:"address",name:"sender",type:"address"}],name:"ERC721InvalidSender",type:"error"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ERC721NonexistentToken",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"OwnableInvalidOwner",type:"error"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"OwnableUnauthorizedAccount",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"}],_="0x6080346200037f576001600160401b039060408181018381118382101762000369578152600e82526020916d566572696669656420426164676560901b838201528151938285018581108282111762000369578352600885526715995c9a599a595960c21b84860152815181811162000369576000948554916001948584811c941680156200035e575b838510146200034a578190601f94858111620002f7575b5083908583116001146200029357899262000287575b5050600019600383901b1c191690851b1786555b8651928311620002735783548481811c9116801562000268575b8282101462000254578281116200020c575b5080918311600114620001a557508495829394959262000199575b5050600019600383901b1c191690821b1790555b3315620001815760068054336001600160a01b03198216811790925591519290916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a36112919081620003858239f35b51631e4fbdf760e01b81526004810191909152602490fd5b01519050388062000111565b90601f198316968487528287209287905b898210620001f4575050838596979810620001da575b505050811b01905562000125565b015160001960f88460031b161c19169055388080620001cc565b808785968294968601518155019501930190620001b6565b8487528187208380860160051c8201928487106200024a575b0160051c019085905b8281106200023e575050620000f6565b8881550185906200022e565b9250819262000225565b634e487b7160e01b87526022600452602487fd5b90607f1690620000e4565b634e487b7160e01b86526041600452602486fd5b015190503880620000b6565b898052848a208894509190601f1984168b5b87828210620002e05750508411620002c6575b505050811b018655620000ca565b015160001960f88460031b161c19169055388080620002b8565b8385015186558b97909501949384019301620002a5565b9091508880528389208580850160051c82019286861062000340575b918991869594930160051c01915b82811062000331575050620000a0565b8b815585945089910162000321565b9250819262000313565b634e487b7160e01b88526022600452602488fd5b93607f169362000089565b634e487b7160e01b600052604160045260246000fd5b600080fdfe6080604081815260048036101561001557600080fd5b600092833560e01c90816301ffc9a714610eec5750806306fdde0314610e01578063081812fc14610d9d578063095ea7b314610c4d57806318160ddd14610c1057806323b872dd14610bfb57806342842e0e14610b605780636352211e14610b055780636a6278421461091f57806370a0823114610886578063715018a6146107e85780638da5cb5b1461079557806395d89b4114610623578063a22cb46514610520578063b88d4fde146102be578063c87b56dd1461024d578063e985e9c5146101d05763f2fde38b146100e957600080fd5b346101cc5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101cc57610120611038565b9061012961120a565b73ffffffffffffffffffffffffffffffffffffffff80921692831561019d575050600654827fffffffffffffffffffffffff0000000000000000000000000000000000000000821617600655167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b908460249251917f1e4fbdf7000000000000000000000000000000000000000000000000000000008352820152fd5b8280fd5b50503461024957807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102495760ff8160209361020e611038565b610216611060565b73ffffffffffffffffffffffffffffffffffffffff91821683526005875283832091168252855220549151911615158152f35b5080fd5b509190346102495760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102495761028c6102ba93356111a9565b50818151610299816110e3565b528051916102a6836110e3565b825251918291602083526020830190610fda565b0390f35b50346101cc5760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101cc576102f6611038565b916102ff611060565b906064359367ffffffffffffffff851161051c573660238601121561051c5784840135948661032d8761116f565b9161033a8551938461112e565b87835260209736602482840101116101cc578060248a93018386013783010152833b610364578680f35b856103d89173ffffffffffffffffffffffffffffffffffffffff98949596979880971696865193849283927f150b7a020000000000000000000000000000000000000000000000000000000097888552338d8601521660248401526044356044840152608060648401526084830190610fda565b038186895af18391816104c0575b5061045a5750503d15610452573d6103fd8161116f565b9061040a8451928361112e565b81528091863d92013e5b8051948561044c5750506024935051917f64a0ae92000000000000000000000000000000000000000000000000000000008352820152fd5b85925001fd5b506060610414565b7fffffffff00000000000000000000000000000000000000000000000000000000919296501603610492575050503880808080808680f35b6024935051917f64a0ae92000000000000000000000000000000000000000000000000000000008352820152fd5b9091508781813d8311610515575b6104d8818361112e565b8101031261051157517fffffffff00000000000000000000000000000000000000000000000000000000811681036105115790386103e6565b8380fd5b503d6104ce565b8580fd5b5090346101cc57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101cc57610558611038565b906024359182151580930361061f5773ffffffffffffffffffffffffffffffffffffffff169283156105f1575033845260056020528084208385526020528084207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0081541660ff8416179055519081527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160203392a380f35b8360249251917f5b08ba18000000000000000000000000000000000000000000000000000000008352820152fd5b8480fd5b50913461079257807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126107925781519181600192600154938460011c9160018616958615610788575b602096878510811461075c578899509688969785829a5291826000146107175750506001146106bb575b5050506102ba92916106ac91038561112e565b51928284938452830190610fda565b9190869350600183527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf65b8284106106ff57505050820101816106ac6102ba610699565b8054848a0186015288955087949093019281016106e6565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168782015293151560051b860190930193508492506106ac91506102ba9050610699565b60248360228c7f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b92607f169261066f565b80fd5b50503461024957817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102495760209073ffffffffffffffffffffffffffffffffffffffff600654169051908152f35b833461079257807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126107925761081f61120a565b8073ffffffffffffffffffffffffffffffffffffffff6006547fffffffffffffffffffffffff00000000000000000000000000000000000000008116600655167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b5091346107925760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126107925773ffffffffffffffffffffffffffffffffffffffff6108d4611038565b169283156108f15750806020938392526003845220549051908152f35b9060249251917f89c62b64000000000000000000000000000000000000000000000000000000008352820152fd5b50346101cc57602091827ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261051157610959611038565b61096161120a565b600754907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff92838314610ad9576001830160075573ffffffffffffffffffffffffffffffffffffffff809216918215610aaa576002908489528188528289205416968715159586610a68575b50838952600381528289206001815401905584895252808720827fffffffffffffffffffffffff000000000000000000000000000000000000000082541617905551947fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8780a4610a3c578280f35b916024927f73c6ac6e000000000000000000000000000000000000000000000000000000008352820152fd5b878252838a207fffffffffffffffffffffffff00000000000000000000000000000000000000008154169055888a5260038252838a20908154019055386109cd565b602486898451917f64a0ae92000000000000000000000000000000000000000000000000000000008352820152fd5b6024876011877f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b5091346107925760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610792575073ffffffffffffffffffffffffffffffffffffffff610b58602093356111a9565b915191168152f35b5090346101cc57610b7036611083565b9291908251610b7e816110e3565b868152813b610b8b578680f35b906103d896929173ffffffffffffffffffffffffffffffffffffffff809216958551927f150b7a020000000000000000000000000000000000000000000000000000000094858552338a86015216602484015260448301526080606483015281806020998a936084830190610fda565b833461079257610c0a36611083565b50505080f35b50503461024957817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610249576020906007549051908152f35b5090346101cc57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101cc57610c85611038565b91602435610c92816111a9565b33151580610d7d575b80610d48575b610d1957819073ffffffffffffffffffffffffffffffffffffffff809616958691167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258880a484526020528220907fffffffffffffffffffffffff000000000000000000000000000000000000000082541617905580f35b83517fa9fbf51f0000000000000000000000000000000000000000000000000000000081523381850152602490fd5b5073ffffffffffffffffffffffffffffffffffffffff81168652600560205283862033875260205260ff848720541615610ca1565b503373ffffffffffffffffffffffffffffffffffffffff82161415610c9b565b50346101cc5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101cc57816020938273ffffffffffffffffffffffffffffffffffffffff9335610df2816111a9565b50825285522054169051908152f35b50913461079257807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610792578151918182549260018460011c9160018616958615610ee2575b602096878510811461075c578899509688969785829a529182600014610717575050600114610e87575050506102ba92916106ac91038561112e565b91908693508280527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5635b828410610eca57505050820101816106ac6102ba610699565b8054848a018601528895508794909301928101610eb1565b92607f1692610e4b565b925050346101cc5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101cc57357fffffffff0000000000000000000000000000000000000000000000000000000081168091036101cc57602092507f80ac58cd000000000000000000000000000000000000000000000000000000008114908115610fb0575b8115610f86575b5015158152f35b7f01ffc9a70000000000000000000000000000000000000000000000000000000091501438610f7f565b7f5b5e139f0000000000000000000000000000000000000000000000000000000081149150610f78565b919082519283825260005b8481106110245750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8460006020809697860101520116010190565b602081830181015184830182015201610fe5565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361105b57565b600080fd5b6024359073ffffffffffffffffffffffffffffffffffffffff8216820361105b57565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc606091011261105b5773ffffffffffffffffffffffffffffffffffffffff90600435828116810361105b5791602435908116810361105b579060443590565b6020810190811067ffffffffffffffff8211176110ff57604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176110ff57604052565b67ffffffffffffffff81116110ff57601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b80600052600260205273ffffffffffffffffffffffffffffffffffffffff604060002054169081156111d9575090565b602490604051907f7e2732890000000000000000000000000000000000000000000000000000000082526004820152fd5b73ffffffffffffffffffffffffffffffffffffffff60065416330361122b57565b60246040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152fdfea2646970667358221220083e7fa1c032fb5a4bba76690b0323350a9739b613a134d4a7afbcd7453c0bb864736f6c63430008180033",U="0x6080604081815260048036101561001557600080fd5b600092833560e01c90816301ffc9a714610eec5750806306fdde0314610e01578063081812fc14610d9d578063095ea7b314610c4d57806318160ddd14610c1057806323b872dd14610bfb57806342842e0e14610b605780636352211e14610b055780636a6278421461091f57806370a0823114610886578063715018a6146107e85780638da5cb5b1461079557806395d89b4114610623578063a22cb46514610520578063b88d4fde146102be578063c87b56dd1461024d578063e985e9c5146101d05763f2fde38b146100e957600080fd5b346101cc5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101cc57610120611038565b9061012961120a565b73ffffffffffffffffffffffffffffffffffffffff80921692831561019d575050600654827fffffffffffffffffffffffff0000000000000000000000000000000000000000821617600655167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b908460249251917f1e4fbdf7000000000000000000000000000000000000000000000000000000008352820152fd5b8280fd5b50503461024957807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102495760ff8160209361020e611038565b610216611060565b73ffffffffffffffffffffffffffffffffffffffff91821683526005875283832091168252855220549151911615158152f35b5080fd5b509190346102495760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102495761028c6102ba93356111a9565b50818151610299816110e3565b528051916102a6836110e3565b825251918291602083526020830190610fda565b0390f35b50346101cc5760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101cc576102f6611038565b916102ff611060565b906064359367ffffffffffffffff851161051c573660238601121561051c5784840135948661032d8761116f565b9161033a8551938461112e565b87835260209736602482840101116101cc578060248a93018386013783010152833b610364578680f35b856103d89173ffffffffffffffffffffffffffffffffffffffff98949596979880971696865193849283927f150b7a020000000000000000000000000000000000000000000000000000000097888552338d8601521660248401526044356044840152608060648401526084830190610fda565b038186895af18391816104c0575b5061045a5750503d15610452573d6103fd8161116f565b9061040a8451928361112e565b81528091863d92013e5b8051948561044c5750506024935051917f64a0ae92000000000000000000000000000000000000000000000000000000008352820152fd5b85925001fd5b506060610414565b7fffffffff00000000000000000000000000000000000000000000000000000000919296501603610492575050503880808080808680f35b6024935051917f64a0ae92000000000000000000000000000000000000000000000000000000008352820152fd5b9091508781813d8311610515575b6104d8818361112e565b8101031261051157517fffffffff00000000000000000000000000000000000000000000000000000000811681036105115790386103e6565b8380fd5b503d6104ce565b8580fd5b5090346101cc57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101cc57610558611038565b906024359182151580930361061f5773ffffffffffffffffffffffffffffffffffffffff169283156105f1575033845260056020528084208385526020528084207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0081541660ff8416179055519081527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160203392a380f35b8360249251917f5b08ba18000000000000000000000000000000000000000000000000000000008352820152fd5b8480fd5b50913461079257807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126107925781519181600192600154938460011c9160018616958615610788575b602096878510811461075c578899509688969785829a5291826000146107175750506001146106bb575b5050506102ba92916106ac91038561112e565b51928284938452830190610fda565b9190869350600183527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf65b8284106106ff57505050820101816106ac6102ba610699565b8054848a0186015288955087949093019281016106e6565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168782015293151560051b860190930193508492506106ac91506102ba9050610699565b60248360228c7f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b92607f169261066f565b80fd5b50503461024957817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102495760209073ffffffffffffffffffffffffffffffffffffffff600654169051908152f35b833461079257807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126107925761081f61120a565b8073ffffffffffffffffffffffffffffffffffffffff6006547fffffffffffffffffffffffff00000000000000000000000000000000000000008116600655167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b5091346107925760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126107925773ffffffffffffffffffffffffffffffffffffffff6108d4611038565b169283156108f15750806020938392526003845220549051908152f35b9060249251917f89c62b64000000000000000000000000000000000000000000000000000000008352820152fd5b50346101cc57602091827ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261051157610959611038565b61096161120a565b600754907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff92838314610ad9576001830160075573ffffffffffffffffffffffffffffffffffffffff809216918215610aaa576002908489528188528289205416968715159586610a68575b50838952600381528289206001815401905584895252808720827fffffffffffffffffffffffff000000000000000000000000000000000000000082541617905551947fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8780a4610a3c578280f35b916024927f73c6ac6e000000000000000000000000000000000000000000000000000000008352820152fd5b878252838a207fffffffffffffffffffffffff00000000000000000000000000000000000000008154169055888a5260038252838a20908154019055386109cd565b602486898451917f64a0ae92000000000000000000000000000000000000000000000000000000008352820152fd5b6024876011877f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b5091346107925760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610792575073ffffffffffffffffffffffffffffffffffffffff610b58602093356111a9565b915191168152f35b5090346101cc57610b7036611083565b9291908251610b7e816110e3565b868152813b610b8b578680f35b906103d896929173ffffffffffffffffffffffffffffffffffffffff809216958551927f150b7a020000000000000000000000000000000000000000000000000000000094858552338a86015216602484015260448301526080606483015281806020998a936084830190610fda565b833461079257610c0a36611083565b50505080f35b50503461024957817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610249576020906007549051908152f35b5090346101cc57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101cc57610c85611038565b91602435610c92816111a9565b33151580610d7d575b80610d48575b610d1957819073ffffffffffffffffffffffffffffffffffffffff809616958691167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258880a484526020528220907fffffffffffffffffffffffff000000000000000000000000000000000000000082541617905580f35b83517fa9fbf51f0000000000000000000000000000000000000000000000000000000081523381850152602490fd5b5073ffffffffffffffffffffffffffffffffffffffff81168652600560205283862033875260205260ff848720541615610ca1565b503373ffffffffffffffffffffffffffffffffffffffff82161415610c9b565b50346101cc5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101cc57816020938273ffffffffffffffffffffffffffffffffffffffff9335610df2816111a9565b50825285522054169051908152f35b50913461079257807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610792578151918182549260018460011c9160018616958615610ee2575b602096878510811461075c578899509688969785829a529182600014610717575050600114610e87575050506102ba92916106ac91038561112e565b91908693508280527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5635b828410610eca57505050820101816106ac6102ba610699565b8054848a018601528895508794909301928101610eb1565b92607f1692610e4b565b925050346101cc5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101cc57357fffffffff0000000000000000000000000000000000000000000000000000000081168091036101cc57602092507f80ac58cd000000000000000000000000000000000000000000000000000000008114908115610fb0575b8115610f86575b5015158152f35b7f01ffc9a70000000000000000000000000000000000000000000000000000000091501438610f7f565b7f5b5e139f0000000000000000000000000000000000000000000000000000000081149150610f78565b919082519283825260005b8481106110245750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8460006020809697860101520116010190565b602081830181015184830182015201610fe5565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361105b57565b600080fd5b6024359073ffffffffffffffffffffffffffffffffffffffff8216820361105b57565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc606091011261105b5773ffffffffffffffffffffffffffffffffffffffff90600435828116810361105b5791602435908116810361105b579060443590565b6020810190811067ffffffffffffffff8211176110ff57604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176110ff57604052565b67ffffffffffffffff81116110ff57601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b80600052600260205273ffffffffffffffffffffffffffffffffffffffff604060002054169081156111d9575090565b602490604051907f7e2732890000000000000000000000000000000000000000000000000000000082526004820152fd5b73ffffffffffffffffffffffffffffffffffffffff60065416330361122b57565b60246040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152fdfea2646970667358221220083e7fa1c032fb5a4bba76690b0323350a9739b613a134d4a7afbcd7453c0bb864736f6c63430008180033",z={},P={},H={_format:$,contractName:B,sourceName:D,abi:L,bytecode:_,deployedBytecode:U,linkReferences:z,deployedLinkReferences:P};let e,f={Game:void 0,GameFrontend:void 0,Award:void 0,Badge:void 0};async function d(){e||(e=new c(a.rpcUrl)),f.Game||(f.Game=new n(a.contracts.Game,m.abi,e)),f.GameFrontend||(f.GameFrontend=new n(a.contracts.GameFrontend,x.abi,e)),f.Award||(f.Award=new n(a.contracts.Award,G.abi,e)),f.Badge||(f.Badge=new n(a.contracts.Badge,H.abi,e))}async function W(b,t){return await d(),await f.GameFrontend.getNfts(b,t)}async function j(){return await d(),await f.GameFrontend.gameStatus()}async function q(b){return await d(),await f.GameFrontend.getTopSolvers(b)}async function K(b){return await d(),await f.GameFrontend.getPortfolioMaker(b)}async function Q(b){return await d(),await f.GameFrontend.getPortfolioSolver(b)}export{H as B,m as G,G as U,x as a,j as b,q as c,K as d,Q as e,W as g}; diff --git a/assets/index-TjmV1Ump.js b/assets/index-CYoDjwKk.js similarity index 97% rename from assets/index-TjmV1Ump.js rename to assets/index-CYoDjwKk.js index 1d2ad93..50209d7 100644 --- a/assets/index-TjmV1Ump.js +++ b/assets/index-CYoDjwKk.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-S7ZByve3.js","assets/index-BEOb6O_H.js","assets/index-CVeTJdZw.css"])))=>i.map(i=>d[i]); -import{x as u,D as h,bj as R,bf as V}from"./index-BEOb6O_H.js";const n=u({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),x={state:n,subscribe(e){return h(n,()=>e(n))},push(e,t){e!==n.view&&(n.view=e,t&&(n.data=t),n.history.push(e))},reset(e){n.view=e,n.history=[e]},replace(e){n.history.length>1&&(n.history[n.history.length-1]=e,n.view=e)},goBack(){if(n.history.length>1){n.history.pop();const[e]=n.history.slice(-1);n.view=e}},setData(e){n.data=e}},r={WALLETCONNECT_DEEPLINK_CHOICE:"WALLETCONNECT_DEEPLINK_CHOICE",WCM_VERSION:"WCM_VERSION",RECOMMENDED_WALLET_AMOUNT:9,isMobile(){return typeof window<"u"?!!(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)):!1},isAndroid(){return r.isMobile()&&navigator.userAgent.toLowerCase().includes("android")},isIos(){const e=navigator.userAgent.toLowerCase();return r.isMobile()&&(e.includes("iphone")||e.includes("ipad"))},isHttpUrl(e){return e.startsWith("http://")||e.startsWith("https://")},isArray(e){return Array.isArray(e)&&e.length>0},formatNativeUrl(e,t,s){if(r.isHttpUrl(e))return this.formatUniversalUrl(e,t,s);let o=e;o.includes("://")||(o=e.replaceAll("/","").replaceAll(":",""),o=`${o}://`),o.endsWith("/")||(o=`${o}/`),this.setWalletConnectDeepLink(o,s);const i=encodeURIComponent(t);return`${o}wc?uri=${i}`},formatUniversalUrl(e,t,s){if(!r.isHttpUrl(e))return this.formatNativeUrl(e,t,s);let o=e;o.endsWith("/")||(o=`${o}/`),this.setWalletConnectDeepLink(o,s);const i=encodeURIComponent(t);return`${o}wc?uri=${i}`},async wait(e){return new Promise(t=>{setTimeout(t,e)})},openHref(e,t){window.open(e,t,"noreferrer noopener")},setWalletConnectDeepLink(e,t){try{localStorage.setItem(r.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:e,name:t}))}catch{console.info("Unable to set WalletConnect deep link")}},setWalletConnectAndroidDeepLink(e){try{const[t]=e.split("?");localStorage.setItem(r.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:t,name:"Android"}))}catch{console.info("Unable to set WalletConnect android deep link")}},removeWalletConnectDeepLink(){try{localStorage.removeItem(r.WALLETCONNECT_DEEPLINK_CHOICE)}catch{console.info("Unable to remove WalletConnect deep link")}},setModalVersionInStorage(){try{typeof localStorage<"u"&&localStorage.setItem(r.WCM_VERSION,"2.6.2")}catch{console.info("Unable to set Web3Modal version in storage")}},getWalletRouterData(){var e;const t=(e=x.state.data)==null?void 0:e.Wallet;if(!t)throw new Error('Missing "Wallet" view data');return t}},H=typeof location<"u"&&(location.hostname.includes("localhost")||location.protocol.includes("https")),a=u({enabled:H,userSessionId:"",events:[],connectedWalletId:void 0}),B={state:a,subscribe(e){return h(a.events,()=>e(R(a.events[a.events.length-1])))},initialize(){a.enabled&&typeof(crypto==null?void 0:crypto.randomUUID)<"u"&&(a.userSessionId=crypto.randomUUID())},setConnectedWalletId(e){a.connectedWalletId=e},click(e){if(a.enabled){const t={type:"CLICK",name:e.name,userSessionId:a.userSessionId,timestamp:Date.now(),data:e};a.events.push(t)}},track(e){if(a.enabled){const t={type:"TRACK",name:e.name,userSessionId:a.userSessionId,timestamp:Date.now(),data:e};a.events.push(t)}},view(e){if(a.enabled){const t={type:"VIEW",name:e.name,userSessionId:a.userSessionId,timestamp:Date.now(),data:e};a.events.push(t)}}},d=u({chains:void 0,walletConnectUri:void 0,isAuth:!1,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1}),c={state:d,subscribe(e){return h(d,()=>e(d))},setChains(e){d.chains=e},setWalletConnectUri(e){d.walletConnectUri=e},setIsCustomDesktop(e){d.isCustomDesktop=e},setIsCustomMobile(e){d.isCustomMobile=e},setIsDataLoaded(e){d.isDataLoaded=e},setIsUiLoaded(e){d.isUiLoaded=e},setIsAuth(e){d.isAuth=e}},w=u({projectId:"",mobileWallets:void 0,desktopWallets:void 0,walletImages:void 0,chains:void 0,enableAuthMode:!1,enableExplorer:!0,explorerExcludedWalletIds:void 0,explorerRecommendedWalletIds:void 0,termsOfServiceUrl:void 0,privacyPolicyUrl:void 0}),v={state:w,subscribe(e){return h(w,()=>e(w))},setConfig(e){var t,s;B.initialize(),c.setChains(e.chains),c.setIsAuth(!!e.enableAuthMode),c.setIsCustomMobile(!!((t=e.mobileWallets)!=null&&t.length)),c.setIsCustomDesktop(!!((s=e.desktopWallets)!=null&&s.length)),r.setModalVersionInStorage(),Object.assign(w,e)}};var K=Object.defineProperty,j=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,J=Object.prototype.propertyIsEnumerable,D=(e,t,s)=>t in e?K(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,q=(e,t)=>{for(var s in t||(t={}))z.call(t,s)&&D(e,s,t[s]);if(j)for(var s of j(t))J.call(t,s)&&D(e,s,t[s]);return e};const E="https://explorer-api.walletconnect.com",O="wcm",A="js-2.6.2";async function W(e,t){const s=q({sdkType:O,sdkVersion:A},t),o=new URL(e,E);return o.searchParams.append("projectId",v.state.projectId),Object.entries(s).forEach(([i,l])=>{l&&o.searchParams.append(i,String(l))}),(await fetch(o)).json()}const m={async getDesktopListings(e){return W("/w3m/v1/getDesktopListings",e)},async getMobileListings(e){return W("/w3m/v1/getMobileListings",e)},async getInjectedListings(e){return W("/w3m/v1/getInjectedListings",e)},async getAllListings(e){return W("/w3m/v1/getAllListings",e)},getWalletImageUrl(e){return`${E}/w3m/v1/getWalletImage/${e}?projectId=${v.state.projectId}&sdkType=${O}&sdkVersion=${A}`},getAssetImageUrl(e){return`${E}/w3m/v1/getAssetImage/${e}?projectId=${v.state.projectId}&sdkType=${O}&sdkVersion=${A}`}};var F=Object.defineProperty,k=Object.getOwnPropertySymbols,G=Object.prototype.hasOwnProperty,Q=Object.prototype.propertyIsEnumerable,_=(e,t,s)=>t in e?F(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,X=(e,t)=>{for(var s in t||(t={}))G.call(t,s)&&_(e,s,t[s]);if(k)for(var s of k(t))Q.call(t,s)&&_(e,s,t[s]);return e};const S=r.isMobile(),p=u({wallets:{listings:[],total:0,page:1},search:{listings:[],total:0,page:1},recomendedWallets:[]}),ae={state:p,async getRecomendedWallets(){const{explorerRecommendedWalletIds:e,explorerExcludedWalletIds:t}=v.state;if(e==="NONE"||t==="ALL"&&!e)return p.recomendedWallets;if(r.isArray(e)){const s={recommendedIds:e.join(",")},{listings:o}=await m.getAllListings(s),i=Object.values(o);i.sort((l,b)=>{const y=e.indexOf(l.id),C=e.indexOf(b.id);return y-C}),p.recomendedWallets=i}else{const{chains:s,isAuth:o}=c.state,i=s==null?void 0:s.join(","),l=r.isArray(t),b={page:1,sdks:o?"auth_v1":void 0,entries:r.RECOMMENDED_WALLET_AMOUNT,chains:i,version:2,excludedIds:l?t.join(","):void 0},{listings:y}=S?await m.getMobileListings(b):await m.getDesktopListings(b);p.recomendedWallets=Object.values(y)}return p.recomendedWallets},async getWallets(e){const t=X({},e),{explorerRecommendedWalletIds:s,explorerExcludedWalletIds:o}=v.state,{recomendedWallets:i}=p;if(o==="ALL")return p.wallets;i.length?t.excludedIds=i.map($=>$.id).join(","):r.isArray(s)&&(t.excludedIds=s.join(",")),r.isArray(o)&&(t.excludedIds=[t.excludedIds,o].filter(Boolean).join(",")),c.state.isAuth&&(t.sdks="auth_v1");const{page:l,search:b}=e,{listings:y,total:C}=S?await m.getMobileListings(t):await m.getDesktopListings(t),U=Object.values(y),M=b?"search":"wallets";return p[M]={listings:[...p[M].listings,...U],total:C,page:l??1},{listings:U,total:C}},getWalletImageUrl(e){return m.getWalletImageUrl(e)},getAssetImageUrl(e){return m.getAssetImageUrl(e)},resetSearch(){p.search={listings:[],total:0,page:1}}},I=u({open:!1}),L={state:I,subscribe(e){return h(I,()=>e(I))},async open(e){return new Promise(t=>{const{isUiLoaded:s,isDataLoaded:o}=c.state;if(r.removeWalletConnectDeepLink(),c.setWalletConnectUri(e==null?void 0:e.uri),c.setChains(e==null?void 0:e.chains),x.reset("ConnectWallet"),s&&o)I.open=!0,t();else{const i=setInterval(()=>{const l=c.state;l.isUiLoaded&&l.isDataLoaded&&(clearInterval(i),I.open=!0,t())},200)}})},close(){I.open=!1}};var Y=Object.defineProperty,N=Object.getOwnPropertySymbols,Z=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,T=(e,t,s)=>t in e?Y(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,te=(e,t)=>{for(var s in t||(t={}))Z.call(t,s)&&T(e,s,t[s]);if(N)for(var s of N(t))ee.call(t,s)&&T(e,s,t[s]);return e};function se(){return typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches}const f=u({themeMode:se()?"dark":"light"}),P={state:f,subscribe(e){return h(f,()=>e(f))},setThemeConfig(e){const{themeMode:t,themeVariables:s}=e;t&&(f.themeMode=t),s&&(f.themeVariables=te({},s))}},g=u({open:!1,message:"",variant:"success"}),re={state:g,subscribe(e){return h(g,()=>e(g))},openToast(e,t){g.open=!0,g.message=e,g.variant=t},closeToast(){g.open=!1}};class oe{constructor(t){this.openModal=L.open,this.closeModal=L.close,this.subscribeModal=L.subscribe,this.setTheme=P.setThemeConfig,P.setThemeConfig(t),v.setConfig(t),this.initUi()}async initUi(){if(typeof window<"u"){await V(()=>import("./index-S7ZByve3.js"),__vite__mapDeps([0,1,2]));const t=document.createElement("wcm-modal");document.body.insertAdjacentElement("beforeend",t),c.setIsUiLoaded(!0)}}}const ie=Object.freeze(Object.defineProperty({__proto__:null,WalletConnectModal:oe},Symbol.toStringTag,{value:"Module"}));export{B as R,x as T,r as a,ie as i,P as n,re as o,c as p,L as s,ae as t,v as y}; +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-Dp7lYt7G.js","assets/index-b6Nsj3zY.js","assets/index-CVeTJdZw.css"])))=>i.map(i=>d[i]); +import{x as u,D as h,bj as R,bf as V}from"./index-b6Nsj3zY.js";const n=u({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),x={state:n,subscribe(e){return h(n,()=>e(n))},push(e,t){e!==n.view&&(n.view=e,t&&(n.data=t),n.history.push(e))},reset(e){n.view=e,n.history=[e]},replace(e){n.history.length>1&&(n.history[n.history.length-1]=e,n.view=e)},goBack(){if(n.history.length>1){n.history.pop();const[e]=n.history.slice(-1);n.view=e}},setData(e){n.data=e}},r={WALLETCONNECT_DEEPLINK_CHOICE:"WALLETCONNECT_DEEPLINK_CHOICE",WCM_VERSION:"WCM_VERSION",RECOMMENDED_WALLET_AMOUNT:9,isMobile(){return typeof window<"u"?!!(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)):!1},isAndroid(){return r.isMobile()&&navigator.userAgent.toLowerCase().includes("android")},isIos(){const e=navigator.userAgent.toLowerCase();return r.isMobile()&&(e.includes("iphone")||e.includes("ipad"))},isHttpUrl(e){return e.startsWith("http://")||e.startsWith("https://")},isArray(e){return Array.isArray(e)&&e.length>0},formatNativeUrl(e,t,s){if(r.isHttpUrl(e))return this.formatUniversalUrl(e,t,s);let o=e;o.includes("://")||(o=e.replaceAll("/","").replaceAll(":",""),o=`${o}://`),o.endsWith("/")||(o=`${o}/`),this.setWalletConnectDeepLink(o,s);const i=encodeURIComponent(t);return`${o}wc?uri=${i}`},formatUniversalUrl(e,t,s){if(!r.isHttpUrl(e))return this.formatNativeUrl(e,t,s);let o=e;o.endsWith("/")||(o=`${o}/`),this.setWalletConnectDeepLink(o,s);const i=encodeURIComponent(t);return`${o}wc?uri=${i}`},async wait(e){return new Promise(t=>{setTimeout(t,e)})},openHref(e,t){window.open(e,t,"noreferrer noopener")},setWalletConnectDeepLink(e,t){try{localStorage.setItem(r.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:e,name:t}))}catch{console.info("Unable to set WalletConnect deep link")}},setWalletConnectAndroidDeepLink(e){try{const[t]=e.split("?");localStorage.setItem(r.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:t,name:"Android"}))}catch{console.info("Unable to set WalletConnect android deep link")}},removeWalletConnectDeepLink(){try{localStorage.removeItem(r.WALLETCONNECT_DEEPLINK_CHOICE)}catch{console.info("Unable to remove WalletConnect deep link")}},setModalVersionInStorage(){try{typeof localStorage<"u"&&localStorage.setItem(r.WCM_VERSION,"2.6.2")}catch{console.info("Unable to set Web3Modal version in storage")}},getWalletRouterData(){var e;const t=(e=x.state.data)==null?void 0:e.Wallet;if(!t)throw new Error('Missing "Wallet" view data');return t}},H=typeof location<"u"&&(location.hostname.includes("localhost")||location.protocol.includes("https")),a=u({enabled:H,userSessionId:"",events:[],connectedWalletId:void 0}),B={state:a,subscribe(e){return h(a.events,()=>e(R(a.events[a.events.length-1])))},initialize(){a.enabled&&typeof(crypto==null?void 0:crypto.randomUUID)<"u"&&(a.userSessionId=crypto.randomUUID())},setConnectedWalletId(e){a.connectedWalletId=e},click(e){if(a.enabled){const t={type:"CLICK",name:e.name,userSessionId:a.userSessionId,timestamp:Date.now(),data:e};a.events.push(t)}},track(e){if(a.enabled){const t={type:"TRACK",name:e.name,userSessionId:a.userSessionId,timestamp:Date.now(),data:e};a.events.push(t)}},view(e){if(a.enabled){const t={type:"VIEW",name:e.name,userSessionId:a.userSessionId,timestamp:Date.now(),data:e};a.events.push(t)}}},d=u({chains:void 0,walletConnectUri:void 0,isAuth:!1,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1}),c={state:d,subscribe(e){return h(d,()=>e(d))},setChains(e){d.chains=e},setWalletConnectUri(e){d.walletConnectUri=e},setIsCustomDesktop(e){d.isCustomDesktop=e},setIsCustomMobile(e){d.isCustomMobile=e},setIsDataLoaded(e){d.isDataLoaded=e},setIsUiLoaded(e){d.isUiLoaded=e},setIsAuth(e){d.isAuth=e}},w=u({projectId:"",mobileWallets:void 0,desktopWallets:void 0,walletImages:void 0,chains:void 0,enableAuthMode:!1,enableExplorer:!0,explorerExcludedWalletIds:void 0,explorerRecommendedWalletIds:void 0,termsOfServiceUrl:void 0,privacyPolicyUrl:void 0}),v={state:w,subscribe(e){return h(w,()=>e(w))},setConfig(e){var t,s;B.initialize(),c.setChains(e.chains),c.setIsAuth(!!e.enableAuthMode),c.setIsCustomMobile(!!((t=e.mobileWallets)!=null&&t.length)),c.setIsCustomDesktop(!!((s=e.desktopWallets)!=null&&s.length)),r.setModalVersionInStorage(),Object.assign(w,e)}};var K=Object.defineProperty,j=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,J=Object.prototype.propertyIsEnumerable,D=(e,t,s)=>t in e?K(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,q=(e,t)=>{for(var s in t||(t={}))z.call(t,s)&&D(e,s,t[s]);if(j)for(var s of j(t))J.call(t,s)&&D(e,s,t[s]);return e};const E="https://explorer-api.walletconnect.com",O="wcm",A="js-2.6.2";async function W(e,t){const s=q({sdkType:O,sdkVersion:A},t),o=new URL(e,E);return o.searchParams.append("projectId",v.state.projectId),Object.entries(s).forEach(([i,l])=>{l&&o.searchParams.append(i,String(l))}),(await fetch(o)).json()}const m={async getDesktopListings(e){return W("/w3m/v1/getDesktopListings",e)},async getMobileListings(e){return W("/w3m/v1/getMobileListings",e)},async getInjectedListings(e){return W("/w3m/v1/getInjectedListings",e)},async getAllListings(e){return W("/w3m/v1/getAllListings",e)},getWalletImageUrl(e){return`${E}/w3m/v1/getWalletImage/${e}?projectId=${v.state.projectId}&sdkType=${O}&sdkVersion=${A}`},getAssetImageUrl(e){return`${E}/w3m/v1/getAssetImage/${e}?projectId=${v.state.projectId}&sdkType=${O}&sdkVersion=${A}`}};var F=Object.defineProperty,k=Object.getOwnPropertySymbols,G=Object.prototype.hasOwnProperty,Q=Object.prototype.propertyIsEnumerable,_=(e,t,s)=>t in e?F(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,X=(e,t)=>{for(var s in t||(t={}))G.call(t,s)&&_(e,s,t[s]);if(k)for(var s of k(t))Q.call(t,s)&&_(e,s,t[s]);return e};const S=r.isMobile(),p=u({wallets:{listings:[],total:0,page:1},search:{listings:[],total:0,page:1},recomendedWallets:[]}),ae={state:p,async getRecomendedWallets(){const{explorerRecommendedWalletIds:e,explorerExcludedWalletIds:t}=v.state;if(e==="NONE"||t==="ALL"&&!e)return p.recomendedWallets;if(r.isArray(e)){const s={recommendedIds:e.join(",")},{listings:o}=await m.getAllListings(s),i=Object.values(o);i.sort((l,b)=>{const y=e.indexOf(l.id),C=e.indexOf(b.id);return y-C}),p.recomendedWallets=i}else{const{chains:s,isAuth:o}=c.state,i=s==null?void 0:s.join(","),l=r.isArray(t),b={page:1,sdks:o?"auth_v1":void 0,entries:r.RECOMMENDED_WALLET_AMOUNT,chains:i,version:2,excludedIds:l?t.join(","):void 0},{listings:y}=S?await m.getMobileListings(b):await m.getDesktopListings(b);p.recomendedWallets=Object.values(y)}return p.recomendedWallets},async getWallets(e){const t=X({},e),{explorerRecommendedWalletIds:s,explorerExcludedWalletIds:o}=v.state,{recomendedWallets:i}=p;if(o==="ALL")return p.wallets;i.length?t.excludedIds=i.map($=>$.id).join(","):r.isArray(s)&&(t.excludedIds=s.join(",")),r.isArray(o)&&(t.excludedIds=[t.excludedIds,o].filter(Boolean).join(",")),c.state.isAuth&&(t.sdks="auth_v1");const{page:l,search:b}=e,{listings:y,total:C}=S?await m.getMobileListings(t):await m.getDesktopListings(t),U=Object.values(y),M=b?"search":"wallets";return p[M]={listings:[...p[M].listings,...U],total:C,page:l??1},{listings:U,total:C}},getWalletImageUrl(e){return m.getWalletImageUrl(e)},getAssetImageUrl(e){return m.getAssetImageUrl(e)},resetSearch(){p.search={listings:[],total:0,page:1}}},I=u({open:!1}),L={state:I,subscribe(e){return h(I,()=>e(I))},async open(e){return new Promise(t=>{const{isUiLoaded:s,isDataLoaded:o}=c.state;if(r.removeWalletConnectDeepLink(),c.setWalletConnectUri(e==null?void 0:e.uri),c.setChains(e==null?void 0:e.chains),x.reset("ConnectWallet"),s&&o)I.open=!0,t();else{const i=setInterval(()=>{const l=c.state;l.isUiLoaded&&l.isDataLoaded&&(clearInterval(i),I.open=!0,t())},200)}})},close(){I.open=!1}};var Y=Object.defineProperty,N=Object.getOwnPropertySymbols,Z=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,T=(e,t,s)=>t in e?Y(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,te=(e,t)=>{for(var s in t||(t={}))Z.call(t,s)&&T(e,s,t[s]);if(N)for(var s of N(t))ee.call(t,s)&&T(e,s,t[s]);return e};function se(){return typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches}const f=u({themeMode:se()?"dark":"light"}),P={state:f,subscribe(e){return h(f,()=>e(f))},setThemeConfig(e){const{themeMode:t,themeVariables:s}=e;t&&(f.themeMode=t),s&&(f.themeVariables=te({},s))}},g=u({open:!1,message:"",variant:"success"}),re={state:g,subscribe(e){return h(g,()=>e(g))},openToast(e,t){g.open=!0,g.message=e,g.variant=t},closeToast(){g.open=!1}};class oe{constructor(t){this.openModal=L.open,this.closeModal=L.close,this.subscribeModal=L.subscribe,this.setTheme=P.setThemeConfig,P.setThemeConfig(t),v.setConfig(t),this.initUi()}async initUi(){if(typeof window<"u"){await V(()=>import("./index-Dp7lYt7G.js"),__vite__mapDeps([0,1,2]));const t=document.createElement("wcm-modal");document.body.insertAdjacentElement("beforeend",t),c.setIsUiLoaded(!0)}}}const ie=Object.freeze(Object.defineProperty({__proto__:null,WalletConnectModal:oe},Symbol.toStringTag,{value:"Module"}));export{B as R,x as T,r as a,ie as i,P as n,re as o,c as p,L as s,ae as t,v as y}; diff --git a/assets/index-CJHEREZQ.js b/assets/index-DeuSBMQS.js similarity index 99% rename from assets/index-CJHEREZQ.js rename to assets/index-DeuSBMQS.js index a824cac..35ab263 100644 --- a/assets/index-CJHEREZQ.js +++ b/assets/index-DeuSBMQS.js @@ -1,4 +1,4 @@ -import{x as St,y as wt,D as vt,E as Ct,O as F,G as pt,H as S,M as tt,I as H,N as I,W as k,S as et,K as bt,R as Et}from"./index-BEOb6O_H.js";import{L as ne,Q as re,P as oe}from"./index-BEOb6O_H.js";const p=St({status:"uninitialized"}),E={state:p,subscribeKey(n,t){return wt(p,n,t)},subscribe(n){return vt(p,()=>n(p))},_getClient(){if(!p._client)throw new Error("SIWEController client not set");return p._client},async getNonce(n){const e=await this._getClient().getNonce(n);return this.setNonce(e),e},async getSession(){try{const t=await this._getClient().getSession();return t&&(this.setSession(t),this.setStatus("success")),t}catch{return}},createMessage(n){const e=this._getClient().createMessage(n);return this.setMessage(e),e},async verifyMessage(n){return await this._getClient().verifyMessage(n)},async signIn(){return await this._getClient().signIn()},async signOut(){var t;const n=this._getClient();await n.signOut(),this.setStatus("ready"),this.setSession(void 0),(t=n.onSignOut)==null||t.call(n)},onSignIn(n){var e;const t=this._getClient();(e=t.onSignIn)==null||e.call(t,n)},onSignOut(){var t;const n=this._getClient();(t=n.onSignOut)==null||t.call(n)},setSIWEClient(n){p._client=Ct(n),p.status="ready",F.setIsSiweEnabled(n.options.enabled)},setNonce(n){p.nonce=n},setStatus(n){p.status=n},setMessage(n){p.message=n},setSession(n){p.session=n,p.status=n?"success":"ready"}};/** +import{x as St,y as wt,D as vt,E as Ct,O as F,G as pt,H as S,M as tt,I as H,N as I,W as k,S as et,K as bt,R as Et}from"./index-b6Nsj3zY.js";import{L as ne,Q as re,P as oe}from"./index-b6Nsj3zY.js";const p=St({status:"uninitialized"}),E={state:p,subscribeKey(n,t){return wt(p,n,t)},subscribe(n){return vt(p,()=>n(p))},_getClient(){if(!p._client)throw new Error("SIWEController client not set");return p._client},async getNonce(n){const e=await this._getClient().getNonce(n);return this.setNonce(e),e},async getSession(){try{const t=await this._getClient().getSession();return t&&(this.setSession(t),this.setStatus("success")),t}catch{return}},createMessage(n){const e=this._getClient().createMessage(n);return this.setMessage(e),e},async verifyMessage(n){return await this._getClient().verifyMessage(n)},async signIn(){return await this._getClient().signIn()},async signOut(){var t;const n=this._getClient();await n.signOut(),this.setStatus("ready"),this.setSession(void 0),(t=n.onSignOut)==null||t.call(n)},onSignIn(n){var e;const t=this._getClient();(e=t.onSignIn)==null||e.call(t,n)},onSignOut(){var t;const n=this._getClient();(t=n.onSignOut)==null||t.call(n)},setSIWEClient(n){p._client=Ct(n),p.status="ready",F.setIsSiweEnabled(n.options.enabled)},setNonce(n){p.nonce=n},setStatus(n){p.status=n},setMessage(n){p.message=n},setSession(n){p.session=n,p.status=n?"success":"ready"}};/** * @license * Copyright 2019 Google LLC * SPDX-License-Identifier: BSD-3-Clause diff --git a/assets/index-S7ZByve3.js b/assets/index-Dp7lYt7G.js similarity index 99% rename from assets/index-S7ZByve3.js rename to assets/index-Dp7lYt7G.js index 72e3825..e062b4c 100644 --- a/assets/index-S7ZByve3.js +++ b/assets/index-Dp7lYt7G.js @@ -1,4 +1,4 @@ -import{n as fe,s as Ke,T as k,t as P,a as g,o as Y,R as Dr,p as H,y as ae}from"./index-TjmV1Ump.js";import{bk as Ur}from"./index-BEOb6O_H.js";/** +import{n as fe,s as Ke,T as k,t as P,a as g,o as Y,R as Dr,p as H,y as ae}from"./index-CYoDjwKk.js";import{bk as Ur}from"./index-b6Nsj3zY.js";/** * @license * Copyright 2019 Google LLC * SPDX-License-Identifier: BSD-3-Clause diff --git a/assets/index-DYbLUhpm.js b/assets/index-DsCc12Qo.js similarity index 98% rename from assets/index-DYbLUhpm.js rename to assets/index-DsCc12Qo.js index dcba1d8..c9307be 100644 --- a/assets/index-DYbLUhpm.js +++ b/assets/index-DsCc12Qo.js @@ -1,4 +1,4 @@ -import{T as a}from"./index-BEOb6O_H.js";import{U as e,a0 as n,$ as L,aa as o,ab as W,ac as l,aU as r,aZ as M,a_ as Z,ad as V,a1 as d,af as p,ae as H,ag as c,aX as m,aY as k,ah as _,ai as h,aj as b,ak as g,al as I,am as T,an as B,b8 as v,b9 as w,a2 as S,ao as f,b4 as x,ap as A,a3 as N,b1 as U,aq as D,ar as E,as as G,at as P,aP as O,b3 as z,b5 as F,aQ as Q,b0 as X,au as Y,aR as $,b6 as j,a$ as q,ax as y,aS as J,a4 as K,a5 as R,a6 as a1,az as i1,ay as s1,aA as C1,aB as u1,aO as t1,aC as e1,b2 as n1,aV as L1,aW as o1,aT as W1,aD as l1,aE as r1,b7 as M1,ba as Z1,a7 as V1,aF as d1,aG as p1,aI as H1,a8 as c1,aH as m1,aK as k1,aJ as _1,av as h1,aw as b1,aL as g1,a9 as I1,aM as T1,aN as B1,G as v1,V as w1,X as S1,Y as f1}from"./index-BEOb6O_H.js";const s=a` +import{T as a}from"./index-b6Nsj3zY.js";import{U as e,a0 as n,$ as L,aa as o,ab as W,ac as l,aU as r,aZ as M,a_ as Z,ad as V,a1 as d,af as p,ae as H,ag as c,aX as m,aY as k,ah as _,ai as h,aj as b,ak as g,al as I,am as T,an as B,b8 as v,b9 as w,a2 as S,ao as f,b4 as x,ap as A,a3 as N,b1 as U,aq as D,ar as E,as as G,at as P,aP as O,b3 as z,b5 as F,aQ as Q,b0 as X,au as Y,aR as $,b6 as j,a$ as q,ax as y,aS as J,a4 as K,a5 as R,a6 as a1,az as i1,ay as s1,aA as C1,aB as u1,aO as t1,aC as e1,b2 as n1,aV as L1,aW as o1,aT as W1,aD as l1,aE as r1,b7 as M1,ba as Z1,a7 as V1,aF as d1,aG as p1,aI as H1,a8 as c1,aH as m1,aK as k1,aJ as _1,av as h1,aw as b1,aL as g1,a9 as I1,aM as T1,aN as B1,G as v1,V as w1,X as S1,Y as f1}from"./index-b6Nsj3zY.js";const s=a` i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ChallengeView-39hjMaQL.js","assets/gameView-AmYzYg1A.js","assets/ChallengeView-DdqT5rDU.css","assets/LeaderboardView-2RIHWFwK.js","assets/LeaderboardView-DPZctv-c.css","assets/PortfolioView-BzZYjV41.js","assets/PortfolioView-CSbDkrVY.css"])))=>i.map(i=>d[i]); var see=Object.defineProperty;var cN=r=>{throw TypeError(r)};var oee=(r,e,t)=>e in r?see(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var Oe=(r,e,t)=>oee(r,typeof e!="symbol"?e+"":e,t),zA=(r,e,t)=>e.has(r)||cN("Cannot "+t);var ee=(r,e,t)=>(zA(r,e,"read from private field"),t?t.call(r):e.get(r)),Le=(r,e,t)=>e.has(r)?cN("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,t),de=(r,e,t,n)=>(zA(r,e,"write to private field"),n?n.call(r,t):e.set(r,t),t),rt=(r,e,t)=>(zA(r,e,"access private method"),t);var M2=(r,e,t,n)=>({set _(i){de(r,e,i,t)},get _(){return ee(r,e,n)}});(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function t(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(i){if(i.ep)return;i.ep=!0;const s=t(i);fetch(i.href,s)}})();/** * @vue/shared v3.5.3 * (c) 2018-present Yuxi (Evan) You and Vue contributors @@ -5872,7 +5872,7 @@ Minimum version required to store current data is: `+s+`. padding: 0px 10px; background-color: var(--wui-color-modal-bg); } -`;var VF=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let M6=class extends vt{constructor(){super(...arguments),this.text=""}render(){return Pe`${this.template()}`}template(){return this.text?Pe`${this.text}`:null}};M6.styles=[Rt,Jhe];VF([he()],M6.prototype,"text",void 0);M6=VF([Re("wui-separator")],M6);const F5={interpolate(r,e,t){if(r.length!==2||e.length!==2)throw new Error("inputRange and outputRange must be an array of length 2");const n=r[0]||0,i=r[1]||0,s=e[0]||0,o=e[1]||0;return ti?o:(o-s)/(i-n)*(t-n)+s}},Xhe=3,ede=["receive","deposit","borrow","claim"],tde=["withdraw","repay","burn"],G0={getMonthName(r){const e=new Date;return e.setMonth(r),e.toLocaleString("en-US",{month:"long"})},getTransactionGroupTitle(r,e){const t=iI.getYear(),n=this.getMonthName(e);return r===t?n:`${n} ${r}`},getTransactionImages(r){const[e,t]=r,n=!!e&&(r==null?void 0:r.every(o=>!!o.nft_info)),i=(r==null?void 0:r.length)>1;return(r==null?void 0:r.length)===2&&!n?[this.getTransactionImage(e),this.getTransactionImage(t)]:i?r.map(o=>this.getTransactionImage(o)):[this.getTransactionImage(e)]},getTransactionImage(r){return{type:G0.getTransactionTransferTokenType(r),url:G0.getTransactionImageURL(r)}},getTransactionImageURL(r){var i,s,o,a,c;let e;const t=!!(r!=null&&r.nft_info),n=!!(r!=null&&r.fungible_info);return r&&t?e=(o=(s=(i=r==null?void 0:r.nft_info)==null?void 0:i.content)==null?void 0:s.preview)==null?void 0:o.url:r&&n&&(e=(c=(a=r==null?void 0:r.fungible_info)==null?void 0:a.icon)==null?void 0:c.url),e},getTransactionTransferTokenType(r){if(r!=null&&r.fungible_info)return"FUNGIBLE";if(r!=null&&r.nft_info)return"NFT"},getTransactionDescriptions(r){var f,v,y;const e=(f=r==null?void 0:r.metadata)==null?void 0:f.operationType,t=r==null?void 0:r.transfers,n=((v=r==null?void 0:r.transfers)==null?void 0:v.length)>0,i=((y=r==null?void 0:r.transfers)==null?void 0:y.length)>1,s=n&&(t==null?void 0:t.every(A=>!!(A!=null&&A.fungible_info))),[o,a]=t;let c=this.getTransferDescription(o),l=this.getTransferDescription(a);if(!n)return(e==="send"||e==="receive")&&s?(c=Qt.getTruncateString({string:r==null?void 0:r.metadata.sentFrom,charsStart:4,charsEnd:6,truncate:"middle"}),l=Qt.getTruncateString({string:r==null?void 0:r.metadata.sentTo,charsStart:4,charsEnd:6,truncate:"middle"}),[c,l]):[r.metadata.status];if(i)return t.map(A=>this.getTransferDescription(A));let h="";return ede.includes(e)?h="+":tde.includes(e)&&(h="-"),c=h.concat(c),[c]},getTransferDescription(r){var t;let e="";return r&&(r!=null&&r.nft_info?e=((t=r==null?void 0:r.nft_info)==null?void 0:t.name)||"-":r!=null&&r.fungible_info&&(e=this.getFungibleTransferDescription(r)||"-")),e},getFungibleTransferDescription(r){var n;return r?[this.getQuantityFixedValue(r==null?void 0:r.quantity.numeric),(n=r==null?void 0:r.fungible_info)==null?void 0:n.symbol].join(" ").trim():null},getQuantityFixedValue(r){return r?parseFloat(r).toFixed(Xhe):null}};let HP=!1;class rde{constructor(e){var t;this.initPromise=void 0,this.setIsConnected=(n,i)=>{De.setIsConnected(n,i)},this.getIsConnectedState=()=>De.state.isConnected,this.setAllAccounts=(n,i)=>{De.setAllAccounts(n,i),bt.setHasMultipleAddresses((n==null?void 0:n.length)>1)},this.addAddressLabel=(n,i,s)=>{De.addAddressLabel(n,i,s)},this.removeAddressLabel=(n,i)=>{De.removeAddressLabel(n,i)},this.getCaipAddress=()=>De.state.caipAddress,this.setCaipAddress=(n,i)=>{De.setCaipAddress(n,i)},this.setBalance=(n,i,s)=>{De.setBalance(n,i,s)},this.setProfileName=(n,i)=>{De.setProfileName(n,i)},this.setProfileImage=(n,i)=>{De.setProfileImage(n,i)},this.resetAccount=n=>{De.resetAccount(n)},this.setCaipNetwork=n=>{it.setCaipNetwork(n)},this.getCaipNetwork=()=>it.state.caipNetwork,this.setRequestedCaipNetworks=(n,i)=>{it.setRequestedCaipNetworks(n,i)},this.getApprovedCaipNetworkIds=()=>it.getApprovedCaipNetworkIds(),this.setApprovedCaipNetworksData=n=>it.setApprovedCaipNetworksData(n),this.resetNetwork=()=>{it.resetNetwork()},this.setConnectors=n=>{Mt.setConnectors(n)},this.addConnector=n=>{Mt.addConnector(n)},this.getConnectors=()=>Mt.getConnectors(),this.resetWcConnection=()=>{or.resetWcConnection()},this.fetchIdentity=n=>Hn.fetchIdentity(n),this.setAddressExplorerUrl=(n,i)=>{De.setAddressExplorerUrl(n,i)},this.setSmartAccountDeployed=(n,i)=>{De.setSmartAccountDeployed(n,i)},this.setConnectedWalletInfo=(n,i)=>{De.setConnectedWalletInfo(n,i)},this.setSmartAccountEnabledNetworks=(n,i)=>{it.setSmartAccountEnabledNetworks(n,i)},this.setPreferredAccountType=(n,i)=>{De.setPreferredAccountType(n,i)},this.getWalletConnectName=n=>Fl.getNamesForAddress(n),this.resolveWalletConnectName=async n=>{var a;const i=n.replace(vn.WC_NAME_SUFFIX,""),s=await Fl.resolveName(i);return((a=(Object.values(s==null?void 0:s.addresses)||[])[0])==null?void 0:a.address)||!1},this.setEIP6963Enabled=n=>{bt.setEIP6963Enabled(n)},this.setClientId=n=>{Hn.setClientId(n)},this.getConnectorImage=n=>Lr.getConnectorImage(n),this.adapter=(t=e.adapters)==null?void 0:t[0],this.initControllers(e),this.initOrContinue()}static getInstance(){return this.instance}async open(e){await this.initOrContinue(),nr.open(e)}async close(){await this.initOrContinue(),nr.close()}setLoading(e){nr.setLoading(e)}getError(){var e,t;return(t=(e=this.adapter)==null?void 0:e.getError)==null?void 0:t.call(e)}getChainId(){var e,t;return(t=(e=this.adapter)==null?void 0:e.getChainId)==null?void 0:t.call(e)}getAddress(){var e,t;return(t=(e=this.adapter)==null?void 0:e.getAddress)==null?void 0:t.call(e)}switchNetwork(e){var t,n;return(n=(t=this.adapter)==null?void 0:t.switchNetwork)==null?void 0:n.call(t,e)}getIsConnected(){var e,t;return(t=(e=this.adapter)==null?void 0:e.getIsConnected)==null?void 0:t.call(e)}getWalletProvider(){var e,t;return(t=(e=this.adapter)==null?void 0:e.getWalletProvider)==null?void 0:t.call(e)}getWalletProviderType(){var e,t;return(t=(e=this.adapter)==null?void 0:e.getWalletProviderType)==null?void 0:t.call(e)}subscribeProvider(e){var t,n;return(n=(t=this.adapter)==null?void 0:t.subscribeProvider)==null?void 0:n.call(t,e)}getThemeMode(){return ii.state.themeMode}getThemeVariables(){return ii.state.themeVariables}setThemeMode(e){ii.setThemeMode(e),pF(ii.state.themeMode)}setThemeVariables(e){ii.setThemeVariables(e),Mae(ii.state.themeVariables)}subscribeTheme(e){return ii.subscribe(e)}getWalletInfo(){return De.state.connectedWalletInfo}subscribeWalletInfo(e){return De.subscribeKey("connectedWalletInfo",e)}subscribeShouldUpdateToAddress(e){De.subscribeKey("shouldUpdateToAddress",e)}subscribeCaipNetworkChange(e){it.subscribeKey("caipNetwork",e)}getState(){return gu.state}subscribeState(e){return gu.subscribe(e)}showErrorMessage(e){Vt.showError(e)}showSuccessMessage(e){Vt.showSuccess(e)}getEvent(){return{...It.state}}subscribeEvents(e){return It.subscribe(e)}replace(e){Te.replace(e)}redirect(e){Te.push(e)}popTransactionStack(e){Te.popTransactionStack(e)}isOpen(){return nr.state.open}isTransactionStackEmpty(){return Te.state.transactionStack.length===0}isTransactionShouldReplaceView(){var e;return(e=Te.state.transactionStack[Te.state.transactionStack.length-1])==null?void 0:e.replace}async initControllers(e){var n,i;if(bt.setProjectId(e.projectId),bt.setSdkVersion(e.sdkVersion),st.initialize(e.adapters||[]),(n=e.adapters)==null||n.forEach(s=>{var o;(o=s.construct)==null||o.call(s,this,e),it.setAllowUnsupportedChain(e.allowUnsupportedChain,s.chain),it.setDefaultCaipNetwork(e.defaultChain)}),bt.setAllWallets(e.allWallets),bt.setIncludeWalletIds(e.includeWalletIds),bt.setExcludeWalletIds(e.excludeWalletIds),bt.setFeaturedWalletIds(e.featuredWalletIds),bt.setTokens(e.tokens),bt.setTermsConditionsUrl(e.termsConditionsUrl),bt.setPrivacyPolicyUrl(e.privacyPolicyUrl),bt.setCustomWallets(e.customWallets),bt.setEnableAnalytics(e.enableAnalytics),bt.setOnrampEnabled(e.enableOnramp!==!1),bt.setEnableSwaps(e.enableSwaps!==!1),e.metadata&&bt.setMetadata(e.metadata),e.themeMode&&ii.setThemeMode(e.themeMode),e.themeVariables&&ii.setThemeVariables(e.themeVariables),e.disableAppend&&bt.setDisableAppend(!!e.disableAppend),((i=e.adapters)==null?void 0:i.find(s=>s.chain===vn.CHAIN.EVM))&&e.siweConfig){const{SIWEController:s}=await lc(async()=>{const{SIWEController:o}=await import("./index-CJHEREZQ.js");return{SIWEController:o}},[]);s.setSIWEClient(e.siweConfig)}}async initOrContinue(){return!this.initPromise&&!HP&&ot.isClient()&&(HP=!0,this.initPromise=new Promise(async e=>{await Promise.all([lc(()=>import("./index-DYbLUhpm.js"),[]),lc(()=>import("./w3m-modal-cMICv7Lr.js"),[])]);const t=document.createElement("w3m-modal");bt.state.disableAppend||document.body.insertAdjacentElement("beforeend",t),e()})),this.initPromise}}/** +`;var VF=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let M6=class extends vt{constructor(){super(...arguments),this.text=""}render(){return Pe`${this.template()}`}template(){return this.text?Pe`${this.text}`:null}};M6.styles=[Rt,Jhe];VF([he()],M6.prototype,"text",void 0);M6=VF([Re("wui-separator")],M6);const F5={interpolate(r,e,t){if(r.length!==2||e.length!==2)throw new Error("inputRange and outputRange must be an array of length 2");const n=r[0]||0,i=r[1]||0,s=e[0]||0,o=e[1]||0;return ti?o:(o-s)/(i-n)*(t-n)+s}},Xhe=3,ede=["receive","deposit","borrow","claim"],tde=["withdraw","repay","burn"],G0={getMonthName(r){const e=new Date;return e.setMonth(r),e.toLocaleString("en-US",{month:"long"})},getTransactionGroupTitle(r,e){const t=iI.getYear(),n=this.getMonthName(e);return r===t?n:`${n} ${r}`},getTransactionImages(r){const[e,t]=r,n=!!e&&(r==null?void 0:r.every(o=>!!o.nft_info)),i=(r==null?void 0:r.length)>1;return(r==null?void 0:r.length)===2&&!n?[this.getTransactionImage(e),this.getTransactionImage(t)]:i?r.map(o=>this.getTransactionImage(o)):[this.getTransactionImage(e)]},getTransactionImage(r){return{type:G0.getTransactionTransferTokenType(r),url:G0.getTransactionImageURL(r)}},getTransactionImageURL(r){var i,s,o,a,c;let e;const t=!!(r!=null&&r.nft_info),n=!!(r!=null&&r.fungible_info);return r&&t?e=(o=(s=(i=r==null?void 0:r.nft_info)==null?void 0:i.content)==null?void 0:s.preview)==null?void 0:o.url:r&&n&&(e=(c=(a=r==null?void 0:r.fungible_info)==null?void 0:a.icon)==null?void 0:c.url),e},getTransactionTransferTokenType(r){if(r!=null&&r.fungible_info)return"FUNGIBLE";if(r!=null&&r.nft_info)return"NFT"},getTransactionDescriptions(r){var f,v,y;const e=(f=r==null?void 0:r.metadata)==null?void 0:f.operationType,t=r==null?void 0:r.transfers,n=((v=r==null?void 0:r.transfers)==null?void 0:v.length)>0,i=((y=r==null?void 0:r.transfers)==null?void 0:y.length)>1,s=n&&(t==null?void 0:t.every(A=>!!(A!=null&&A.fungible_info))),[o,a]=t;let c=this.getTransferDescription(o),l=this.getTransferDescription(a);if(!n)return(e==="send"||e==="receive")&&s?(c=Qt.getTruncateString({string:r==null?void 0:r.metadata.sentFrom,charsStart:4,charsEnd:6,truncate:"middle"}),l=Qt.getTruncateString({string:r==null?void 0:r.metadata.sentTo,charsStart:4,charsEnd:6,truncate:"middle"}),[c,l]):[r.metadata.status];if(i)return t.map(A=>this.getTransferDescription(A));let h="";return ede.includes(e)?h="+":tde.includes(e)&&(h="-"),c=h.concat(c),[c]},getTransferDescription(r){var t;let e="";return r&&(r!=null&&r.nft_info?e=((t=r==null?void 0:r.nft_info)==null?void 0:t.name)||"-":r!=null&&r.fungible_info&&(e=this.getFungibleTransferDescription(r)||"-")),e},getFungibleTransferDescription(r){var n;return r?[this.getQuantityFixedValue(r==null?void 0:r.quantity.numeric),(n=r==null?void 0:r.fungible_info)==null?void 0:n.symbol].join(" ").trim():null},getQuantityFixedValue(r){return r?parseFloat(r).toFixed(Xhe):null}};let HP=!1;class rde{constructor(e){var t;this.initPromise=void 0,this.setIsConnected=(n,i)=>{De.setIsConnected(n,i)},this.getIsConnectedState=()=>De.state.isConnected,this.setAllAccounts=(n,i)=>{De.setAllAccounts(n,i),bt.setHasMultipleAddresses((n==null?void 0:n.length)>1)},this.addAddressLabel=(n,i,s)=>{De.addAddressLabel(n,i,s)},this.removeAddressLabel=(n,i)=>{De.removeAddressLabel(n,i)},this.getCaipAddress=()=>De.state.caipAddress,this.setCaipAddress=(n,i)=>{De.setCaipAddress(n,i)},this.setBalance=(n,i,s)=>{De.setBalance(n,i,s)},this.setProfileName=(n,i)=>{De.setProfileName(n,i)},this.setProfileImage=(n,i)=>{De.setProfileImage(n,i)},this.resetAccount=n=>{De.resetAccount(n)},this.setCaipNetwork=n=>{it.setCaipNetwork(n)},this.getCaipNetwork=()=>it.state.caipNetwork,this.setRequestedCaipNetworks=(n,i)=>{it.setRequestedCaipNetworks(n,i)},this.getApprovedCaipNetworkIds=()=>it.getApprovedCaipNetworkIds(),this.setApprovedCaipNetworksData=n=>it.setApprovedCaipNetworksData(n),this.resetNetwork=()=>{it.resetNetwork()},this.setConnectors=n=>{Mt.setConnectors(n)},this.addConnector=n=>{Mt.addConnector(n)},this.getConnectors=()=>Mt.getConnectors(),this.resetWcConnection=()=>{or.resetWcConnection()},this.fetchIdentity=n=>Hn.fetchIdentity(n),this.setAddressExplorerUrl=(n,i)=>{De.setAddressExplorerUrl(n,i)},this.setSmartAccountDeployed=(n,i)=>{De.setSmartAccountDeployed(n,i)},this.setConnectedWalletInfo=(n,i)=>{De.setConnectedWalletInfo(n,i)},this.setSmartAccountEnabledNetworks=(n,i)=>{it.setSmartAccountEnabledNetworks(n,i)},this.setPreferredAccountType=(n,i)=>{De.setPreferredAccountType(n,i)},this.getWalletConnectName=n=>Fl.getNamesForAddress(n),this.resolveWalletConnectName=async n=>{var a;const i=n.replace(vn.WC_NAME_SUFFIX,""),s=await Fl.resolveName(i);return((a=(Object.values(s==null?void 0:s.addresses)||[])[0])==null?void 0:a.address)||!1},this.setEIP6963Enabled=n=>{bt.setEIP6963Enabled(n)},this.setClientId=n=>{Hn.setClientId(n)},this.getConnectorImage=n=>Lr.getConnectorImage(n),this.adapter=(t=e.adapters)==null?void 0:t[0],this.initControllers(e),this.initOrContinue()}static getInstance(){return this.instance}async open(e){await this.initOrContinue(),nr.open(e)}async close(){await this.initOrContinue(),nr.close()}setLoading(e){nr.setLoading(e)}getError(){var e,t;return(t=(e=this.adapter)==null?void 0:e.getError)==null?void 0:t.call(e)}getChainId(){var e,t;return(t=(e=this.adapter)==null?void 0:e.getChainId)==null?void 0:t.call(e)}getAddress(){var e,t;return(t=(e=this.adapter)==null?void 0:e.getAddress)==null?void 0:t.call(e)}switchNetwork(e){var t,n;return(n=(t=this.adapter)==null?void 0:t.switchNetwork)==null?void 0:n.call(t,e)}getIsConnected(){var e,t;return(t=(e=this.adapter)==null?void 0:e.getIsConnected)==null?void 0:t.call(e)}getWalletProvider(){var e,t;return(t=(e=this.adapter)==null?void 0:e.getWalletProvider)==null?void 0:t.call(e)}getWalletProviderType(){var e,t;return(t=(e=this.adapter)==null?void 0:e.getWalletProviderType)==null?void 0:t.call(e)}subscribeProvider(e){var t,n;return(n=(t=this.adapter)==null?void 0:t.subscribeProvider)==null?void 0:n.call(t,e)}getThemeMode(){return ii.state.themeMode}getThemeVariables(){return ii.state.themeVariables}setThemeMode(e){ii.setThemeMode(e),pF(ii.state.themeMode)}setThemeVariables(e){ii.setThemeVariables(e),Mae(ii.state.themeVariables)}subscribeTheme(e){return ii.subscribe(e)}getWalletInfo(){return De.state.connectedWalletInfo}subscribeWalletInfo(e){return De.subscribeKey("connectedWalletInfo",e)}subscribeShouldUpdateToAddress(e){De.subscribeKey("shouldUpdateToAddress",e)}subscribeCaipNetworkChange(e){it.subscribeKey("caipNetwork",e)}getState(){return gu.state}subscribeState(e){return gu.subscribe(e)}showErrorMessage(e){Vt.showError(e)}showSuccessMessage(e){Vt.showSuccess(e)}getEvent(){return{...It.state}}subscribeEvents(e){return It.subscribe(e)}replace(e){Te.replace(e)}redirect(e){Te.push(e)}popTransactionStack(e){Te.popTransactionStack(e)}isOpen(){return nr.state.open}isTransactionStackEmpty(){return Te.state.transactionStack.length===0}isTransactionShouldReplaceView(){var e;return(e=Te.state.transactionStack[Te.state.transactionStack.length-1])==null?void 0:e.replace}async initControllers(e){var n,i;if(bt.setProjectId(e.projectId),bt.setSdkVersion(e.sdkVersion),st.initialize(e.adapters||[]),(n=e.adapters)==null||n.forEach(s=>{var o;(o=s.construct)==null||o.call(s,this,e),it.setAllowUnsupportedChain(e.allowUnsupportedChain,s.chain),it.setDefaultCaipNetwork(e.defaultChain)}),bt.setAllWallets(e.allWallets),bt.setIncludeWalletIds(e.includeWalletIds),bt.setExcludeWalletIds(e.excludeWalletIds),bt.setFeaturedWalletIds(e.featuredWalletIds),bt.setTokens(e.tokens),bt.setTermsConditionsUrl(e.termsConditionsUrl),bt.setPrivacyPolicyUrl(e.privacyPolicyUrl),bt.setCustomWallets(e.customWallets),bt.setEnableAnalytics(e.enableAnalytics),bt.setOnrampEnabled(e.enableOnramp!==!1),bt.setEnableSwaps(e.enableSwaps!==!1),e.metadata&&bt.setMetadata(e.metadata),e.themeMode&&ii.setThemeMode(e.themeMode),e.themeVariables&&ii.setThemeVariables(e.themeVariables),e.disableAppend&&bt.setDisableAppend(!!e.disableAppend),((i=e.adapters)==null?void 0:i.find(s=>s.chain===vn.CHAIN.EVM))&&e.siweConfig){const{SIWEController:s}=await lc(async()=>{const{SIWEController:o}=await import("./index-DeuSBMQS.js");return{SIWEController:o}},[]);s.setSIWEClient(e.siweConfig)}}async initOrContinue(){return!this.initPromise&&!HP&&ot.isClient()&&(HP=!0,this.initPromise=new Promise(async e=>{await Promise.all([lc(()=>import("./index-DsCc12Qo.js"),[]),lc(()=>import("./w3m-modal-DChjK9c6.js"),[])]);const t=document.createElement("w3m-modal");bt.state.disableAppend||document.body.insertAdjacentElement("beforeend",t),e()})),this.initPromise}}/** * @license * Copyright 2019 Google LLC * SPDX-License-Identifier: BSD-3-Clause @@ -6528,7 +6528,7 @@ Minimum version required to store current data is: `+s+`. `)}onConnector(e){var n,i;st.setActiveChain(e.chain);const t=(i=(n=this.activeConnector)==null?void 0:n.providers)==null?void 0:i.find(s=>s.chain===e.chain);if(!t){Vt.showError("Failed to find connector");return}t.type==="WALLET_CONNECT"?ot.isMobile()?Te.push("AllWallets"):Te.push("ConnectingWalletConnect"):Te.push("ConnectingExternal",{connector:t})}};L6.styles=$de;tj([ge()],L6.prototype,"activeConnector",void 0);L6=tj([Re("w3m-connecting-multi-chain-view")],L6);var jI=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let U6=class extends et{constructor(){var e;super(),this.interval=void 0,this.lastRetry=Date.now(),this.wallet=(e=Te.state.data)==null?void 0:e.wallet,this.platform=void 0,this.platforms=[],this.initializeConnection(),this.interval=setInterval(this.initializeConnection.bind(this),Ci.TEN_SEC_MS)}disconnectedCallback(){clearTimeout(this.interval)}render(){return this.wallet?(this.determinePlatforms(),ne` ${this.headerTemplate()}
${this.platformTemplate()}
- `):ne``}async initializeConnection(e=!1){try{const{wcPairingExpiry:t}=or.state;if(e||ot.isPairingExpired(t))if(await or.connectWalletConnect(),this.finalizeConnection(),en.getConnectedConnector()==="AUTH"&&bt.state.hasMultipleAddresses)Te.push("SelectAddresses");else if(bt.state.isSiweEnabled){const{SIWEController:n}=await lc(async()=>{const{SIWEController:i}=await import("./index-CJHEREZQ.js");return{SIWEController:i}},[]);n.state.status==="success"?nr.close():Te.push("ConnectingSiwe")}else nr.close()}catch(t){It.sendEvent({type:"track",event:"CONNECT_ERROR",properties:{message:(t==null?void 0:t.message)??"Unknown"}}),or.setWcError(!0),ot.isAllowedRetry(this.lastRetry)&&(Vt.showError("Declined"),this.lastRetry=Date.now(),this.initializeConnection(!0))}}finalizeConnection(){var n;const{wcLinking:e,recentWallet:t}=or.state;e&&en.setWalletConnectDeepLink(e),t&&en.setWeb3ModalRecent(t),It.sendEvent({type:"track",event:"CONNECT_SUCCESS",properties:{method:e?"mobile":"qrcode",name:((n=this.wallet)==null?void 0:n.name)||"Unknown"}})}determinePlatforms(){if(!this.wallet)throw new Error("w3m-connecting-wc-view:determinePlatforms No wallet");if(this.platform)return;const{mobile_link:e,desktop_link:t,webapp_link:n,injected:i,rdns:s}=this.wallet,o=i==null?void 0:i.map(({injected_id:A})=>A).filter(Boolean),a=s?[s]:o??[],c=bt.state.isUniversalProvider?!1:a.length,l=e,h=n,f=or.checkInstalled(a),v=c&&f,y=t&&!ot.isMobile();v&&this.platforms.push("browser"),l&&this.platforms.push(ot.isMobile()?"mobile":"qrcode"),h&&this.platforms.push("web"),y&&this.platforms.push("desktop"),!v&&c&&this.platforms.push("unsupported"),this.platform=this.platforms[0]}platformTemplate(){switch(this.platform){case"browser":return ne``;case"desktop":return ne` + `):ne``}async initializeConnection(e=!1){try{const{wcPairingExpiry:t}=or.state;if(e||ot.isPairingExpired(t))if(await or.connectWalletConnect(),this.finalizeConnection(),en.getConnectedConnector()==="AUTH"&&bt.state.hasMultipleAddresses)Te.push("SelectAddresses");else if(bt.state.isSiweEnabled){const{SIWEController:n}=await lc(async()=>{const{SIWEController:i}=await import("./index-DeuSBMQS.js");return{SIWEController:i}},[]);n.state.status==="success"?nr.close():Te.push("ConnectingSiwe")}else nr.close()}catch(t){It.sendEvent({type:"track",event:"CONNECT_ERROR",properties:{message:(t==null?void 0:t.message)??"Unknown"}}),or.setWcError(!0),ot.isAllowedRetry(this.lastRetry)&&(Vt.showError("Declined"),this.lastRetry=Date.now(),this.initializeConnection(!0))}}finalizeConnection(){var n;const{wcLinking:e,recentWallet:t}=or.state;e&&en.setWalletConnectDeepLink(e),t&&en.setWeb3ModalRecent(t),It.sendEvent({type:"track",event:"CONNECT_SUCCESS",properties:{method:e?"mobile":"qrcode",name:((n=this.wallet)==null?void 0:n.name)||"Unknown"}})}determinePlatforms(){if(!this.wallet)throw new Error("w3m-connecting-wc-view:determinePlatforms No wallet");if(this.platform)return;const{mobile_link:e,desktop_link:t,webapp_link:n,injected:i,rdns:s}=this.wallet,o=i==null?void 0:i.map(({injected_id:A})=>A).filter(Boolean),a=s?[s]:o??[],c=bt.state.isUniversalProvider?!1:a.length,l=e,h=n,f=or.checkInstalled(a),v=c&&f,y=t&&!ot.isMobile();v&&this.platforms.push("browser"),l&&this.platforms.push(ot.isMobile()?"mobile":"qrcode"),h&&this.platforms.push("web"),y&&this.platforms.push("desktop"),!v&&c&&this.platforms.push("unsupported"),this.platform=this.platforms[0]}platformTemplate(){switch(this.platform){case"browser":return ne``;case"desktop":return ne` this.initializeConnection(!0)}> `;case"web":return ne` @@ -6856,7 +6856,7 @@ Minimum version required to store current data is: `+s+`. display: block; opacity: 1; } -`,HI={onNetworkChange:async()=>{var r,e;if(bt.state.isSiweEnabled){const{SIWEController:t}=await lc(async()=>{const{SIWEController:n}=await import("./index-CJHEREZQ.js");return{SIWEController:n}},[]);(e=(r=t.state._client)==null?void 0:r.options)!=null&&e.signOutOnNetworkChange?await t.signOut():P9.navigateAfterNetworkSwitch()}else P9.navigateAfterNetworkSwitch()}};var WI=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let Mv=class extends et{constructor(){var e;super(),this.network=(e=Te.state.data)==null?void 0:e.network,this.unsubscribe=[],this.showRetry=!1,this.error=!1}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}firstUpdated(){this.onSwitchNetwork()}render(){if(!this.network)throw new Error("w3m-network-switch-view: No network provided");this.onShowRetry();const e=this.getLabel(),t=this.getSubLabel();return ne` +`,HI={onNetworkChange:async()=>{var r,e;if(bt.state.isSiweEnabled){const{SIWEController:t}=await lc(async()=>{const{SIWEController:n}=await import("./index-DeuSBMQS.js");return{SIWEController:n}},[]);(e=(r=t.state._client)==null?void 0:r.options)!=null&&e.signOutOnNetworkChange?await t.signOut():P9.navigateAfterNetworkSwitch()}else P9.navigateAfterNetworkSwitch()}};var WI=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let Mv=class extends et{constructor(){var e;super(),this.network=(e=Te.state.data)==null?void 0:e.network,this.unsubscribe=[],this.showRetry=!1,this.error=!1}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}firstUpdated(){this.onSwitchNetwork()}render(){if(!this.network)throw new Error("w3m-network-switch-view: No network provided");this.onShowRetry();const e=this.getLabel(),t=this.getSubLabel();return ne` ${this.dynamicButtonTemplate()} ${this.titleTemplate()} ${this.closeButtonTemplate()} - `}onWalletHelp(){It.sendEvent({type:"track",event:"CLICK_WALLET_HELP"}),Te.push("WhatIsAWallet")}async onClose(){if(this.isSiweEnabled){const{SIWEController:e}=await lc(async()=>{const{SIWEController:i}=await import("./index-CJHEREZQ.js");return{SIWEController:i}},[]),t=Te.state.view==="ApproveTransaction";e.state.status!=="success"&&t?Te.popTransactionStack(!0):nr.close()}else nr.close()}closeButtonTemplate(){const e=Te.state.view==="ConnectingSiwe";return this.isSiweEnabled&&e?ne`
`:ne` + `}onWalletHelp(){It.sendEvent({type:"track",event:"CLICK_WALLET_HELP"}),Te.push("WhatIsAWallet")}async onClose(){if(this.isSiweEnabled){const{SIWEController:e}=await lc(async()=>{const{SIWEController:i}=await import("./index-DeuSBMQS.js");return{SIWEController:i}},[]),t=Te.state.view==="ApproveTransaction";e.state.status!=="success"&&t?Te.popTransactionStack(!0):nr.close()}else nr.close()}closeButtonTemplate(){const e=Te.state.view==="ConnectingSiwe";return this.isSiweEnabled&&e?ne`
`:ne` =ae)return u;var _e=_-K1(j);if(_e<1)return j;var ke=ve?Dd(ve,0,_e).join(""):u.slice(0,_e);if(re===t)return ke+j;if(ve&&(_e+=ke.length-_e),MA(re)){if(u.slice(_e).search(re)){var Ke,Ge=ke;for(re.global||(re=Yx(re.source,cn(Pt.exec(re))+"g")),re.lastIndex=0;Ke=re.exec(Ge);)var Xe=Ke.index;ke=ke.slice(0,Xe===t?_e:Xe)}}else if(u.indexOf(Go(re),_e)!=_e){var Ct=ke.lastIndexOf(re);Ct>-1&&(ke=ke.slice(0,Ct))}return ke+j}function vX(u){return u=cn(u),u&&pt.test(u)?u.replace(Ht,KK):u}var yX=eg(function(u,p,_){return u+(_?" ":"")+p.toUpperCase()}),BA=ok("toUpperCase");function iN(u,p,_){return u=cn(u),p=_?t:p,p===t?HK(u)?YK(u):OK(u):u.match(p)||[]}var sN=Nr(function(u,p){try{return Ui(u,t,p)}catch(_){return OA(_)?_:new hr(_)}}),bX=ch(function(u,p){return Ia(p,function(_){_=Pl(_),oh(u,_,NA(u[_],u))}),u});function _X(u){var p=u==null?0:u.length,_=rr();return u=p?Fn(u,function(j){if(typeof j[1]!="function")throw new Ta(o);return[_(j[0]),j[1]]}):[],Nr(function(j){for(var re=-1;++reC)return[];var _=w,j=ws(u,w);p=rr(p),u-=w;for(var re=Kx(j,p);++_0||p<0)?new Dr(_):(u<0?_=_.takeRight(-u):u&&(_=_.drop(u)),p!==t&&(p=Cr(p),_=p<0?_.dropRight(-p):_.take(p-u)),_)},Dr.prototype.takeRightWhile=function(u){return this.reverse().takeWhile(u).reverse()},Dr.prototype.toArray=function(){return this.take(w)},kl(Dr.prototype,function(u,p){var _=/^(?:filter|find|map|reject)|While$/.test(p),j=/^(?:head|last)$/.test(p),re=se[j?"take"+(p=="last"?"Right":""):p],ae=j||/^find/.test(p);re&&(se.prototype[p]=function(){var ve=this.__wrapped__,_e=j?[1]:arguments,ke=ve instanceof Dr,Ke=_e[0],Ge=ke||pr(ve),Xe=function(Or){var Wr=re.apply(se,Rd([Or],_e));return j&&Ct?Wr[0]:Wr};Ge&&_&&typeof Ke=="function"&&Ke.length!=1&&(ke=Ge=!1);var Ct=this.__chain__,Kt=!!this.__actions__.length,ir=ae&&!Ct,Tr=ke&&!Kt;if(!ae&&Ge){ve=Tr?ve:new Dr(this);var sr=u.apply(ve,_e);return sr.__actions__.push({func:y5,args:[Xe],thisArg:t}),new Ra(sr,Ct)}return ir&&Tr?u.apply(this,_e):(sr=this.thru(Xe),ir?j?sr.value()[0]:sr.value():sr)})}),Ia(["pop","push","shift","sort","splice","unshift"],function(u){var p=Vb[u],_=/^(?:push|sort|unshift)$/.test(u)?"tap":"thru",j=/^(?:pop|shift)$/.test(u);se.prototype[u]=function(){var re=arguments;if(j&&!this.__chain__){var ae=this.value();return p.apply(pr(ae)?ae:[],re)}return this[_](function(ve){return p.apply(pr(ve)?ve:[],re)})}}),kl(Dr.prototype,function(u,p){var _=se[p];if(_){var j=_.name+"";dn.call(Q1,j)||(Q1[j]=[]),Q1[j].push({name:p,func:_})}}),Q1[d5(t,L).name]=[{name:"wrapper",func:t}],Dr.prototype.clone=vG,Dr.prototype.reverse=yG,Dr.prototype.value=bG,se.prototype.at=ZY,se.prototype.chain=YY,se.prototype.commit=QY,se.prototype.next=JY,se.prototype.plant=eQ,se.prototype.reverse=tQ,se.prototype.toJSON=se.prototype.valueOf=se.prototype.value=rQ,se.prototype.first=se.prototype.head,b2&&(se.prototype[b2]=XY),se},G1=QK();oi?((oi.exports=G1)._=G1,An._=G1):Hr._=G1}).call(Q2)})(DC,DC.exports);var D4e=Object.defineProperty,$4e=Object.defineProperties,B4e=Object.getOwnPropertyDescriptors,ED=Object.getOwnPropertySymbols,L4e=Object.prototype.hasOwnProperty,U4e=Object.prototype.propertyIsEnumerable,CD=(r,e,t)=>e in r?D4e(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Z5=(r,e)=>{for(var t in e||(e={}))L4e.call(e,t)&&CD(r,t,e[t]);if(ED)for(var t of ED(e))U4e.call(e,t)&&CD(r,t,e[t]);return r},F4e=(r,e)=>$4e(r,B4e(e));function wl(r,e,t){var n;const i=O3(r);return((n=e.rpcMap)==null?void 0:n[i.reference])||`${M4e}?chainId=${i.namespace}:${i.reference}&projectId=${t}`}function O1(r){return r.includes(":")?r.split(":")[1]:r}function IW(r){return r.map(e=>`${e.split(":")[0]}:${e.split(":")[1]}`)}function j4e(r,e){const t=Object.keys(e.namespaces).filter(i=>i.includes(r));if(!t.length)return[];const n=[];return t.forEach(i=>{const s=e.namespaces[i].accounts;n.push(...s)}),n}function l7(r={},e={}){const t=SD(r),n=SD(e);return DC.exports.merge(t,n)}function SD(r){var e,t,n,i;const s={};if(!Vv(r))return s;for(const[o,a]of Object.entries(r)){const c=fT(o)?[o]:a.chains,l=a.methods||[],h=a.events||[],f=a.rpcMap||{},v=l3(o);s[v]=F4e(Z5(Z5({},s[v]),a),{chains:k4(c,(e=s[v])==null?void 0:e.chains),methods:k4(l,(t=s[v])==null?void 0:t.methods),events:k4(h,(n=s[v])==null?void 0:n.events),rpcMap:Z5(Z5({},f),(i=s[v])==null?void 0:i.rpcMap)})}return s}function H4e(r){return r.includes(":")?r.split(":")[2]:r}function ID(r){const e={};for(const[t,n]of Object.entries(r)){const i=n.methods||[],s=n.events||[],o=n.accounts||[],a=fT(t)?[t]:n.chains?n.chains:IW(n.accounts);e[t]={chains:a,methods:i,events:s,accounts:o}}return e}function u7(r){return typeof r=="number"?r:r.includes("0x")?parseInt(r,16):(r=r.includes(":")?r.split(":")[1]:r,isNaN(Number(r))?r:Number(r))}const TW={},hn=r=>TW[r],h7=(r,e)=>{TW[r]=e};class W4e{constructor(e){this.name="polkadot",this.namespace=e.namespace,this.events=hn("events"),this.client=hn("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(Cl.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getAccounts(){const e=this.namespace.accounts;return e?e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2])||[]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var n;const i=O1(t);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||wl(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new El(new Xu(n,hn("disableProviderPing")))}}var z4e=Object.defineProperty,V4e=Object.defineProperties,q4e=Object.getOwnPropertyDescriptors,TD=Object.getOwnPropertySymbols,K4e=Object.prototype.hasOwnProperty,G4e=Object.prototype.propertyIsEnumerable,RD=(r,e,t)=>e in r?z4e(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,kD=(r,e)=>{for(var t in e||(e={}))K4e.call(e,t)&&RD(r,t,e[t]);if(TD)for(var t of TD(e))G4e.call(e,t)&&RD(r,t,e[t]);return r},ND=(r,e)=>V4e(r,q4e(e));class Z4e{constructor(e){this.name="eip155",this.namespace=e.namespace,this.events=hn("events"),this.client=hn("client"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain())}async request(e){switch(e.request.method){case"eth_requestAccounts":return this.getAccounts();case"eth_accounts":return this.getAccounts();case"wallet_switchEthereumChain":return await this.handleSwitchChain(e);case"eth_chainId":return parseInt(this.getDefaultChain());case"wallet_getCapabilities":return await this.getCapabilities(e)}return this.namespace.methods.includes(e.request.method)?await this.client.request(e):this.getHttpProvider().request(e.request)}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(parseInt(e),t),this.chainId=parseInt(e),this.events.emit(Cl.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId.toString();if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}createHttpProvider(e,t){const n=t||wl(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new El(new Xu(n,hn("disableProviderPing")))}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var n;const i=parseInt(O1(t));e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[t])}),e}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}getHttpProvider(){const e=this.chainId,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}async handleSwitchChain(e){var t,n;let i=e.request.params?(t=e.request.params[0])==null?void 0:t.chainId:"0x0";i=i.startsWith("0x")?i:`0x${i}`;const s=parseInt(i,16);if(this.isChainApproved(s))this.setDefaultChain(`${s}`);else if(this.namespace.methods.includes("wallet_switchEthereumChain"))await this.client.request({topic:e.topic,request:{method:e.request.method,params:[{chainId:i}]},chainId:(n=this.namespace.chains)==null?void 0:n[0]}),this.setDefaultChain(`${s}`);else throw new Error(`Failed to switch to chain 'eip155:${s}'. The chain is not approved or the wallet does not support 'wallet_switchEthereumChain' method.`);return null}isChainApproved(e){return this.namespace.chains.includes(`${this.name}:${e}`)}async getCapabilities(e){var t,n,i;const s=(n=(t=e.request)==null?void 0:t.params)==null?void 0:n[0];if(!s)throw new Error("Missing address parameter in `wallet_getCapabilities` request");const o=this.client.session.get(e.topic),a=((i=o==null?void 0:o.sessionProperties)==null?void 0:i.capabilities)||{};if(a!=null&&a[s])return a==null?void 0:a[s];const c=await this.client.request(e);try{await this.client.session.update(e.topic,{sessionProperties:ND(kD({},o.sessionProperties||{}),{capabilities:ND(kD({},a||{}),{[s]:c})})})}catch(l){console.warn("Failed to update session with capabilities",l)}return c}}class Y4e{constructor(e){this.name="solana",this.namespace=e.namespace,this.events=hn("events"),this.client=hn("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(Cl.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var n;const i=O1(t);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||wl(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new El(new Xu(n,hn("disableProviderPing")))}}class Q4e{constructor(e){this.name="cosmos",this.namespace=e.namespace,this.events=hn("events"),this.client=hn("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(Cl.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var n;const i=O1(t);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||wl(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new El(new Xu(n,hn("disableProviderPing")))}}class J4e{constructor(e){this.name="algorand",this.namespace=e.namespace,this.events=hn("events"),this.client=hn("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(!this.httpProviders[e]){const n=t||wl(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.chainId=e,this.events.emit(Cl.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var n;e[t]=this.createHttpProvider(t,(n=this.namespace.rpcMap)==null?void 0:n[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||wl(e,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new El(new Xu(n,hn("disableProviderPing")))}}class X4e{constructor(e){this.name="cip34",this.namespace=e.namespace,this.events=hn("events"),this.client=hn("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(Cl.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{const n=this.getCardanoRPCUrl(t),i=O1(t);e[i]=this.createHttpProvider(i,n)}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}getCardanoRPCUrl(e){const t=this.namespace.rpcMap;if(t)return t[e]}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||this.getCardanoRPCUrl(e);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new El(new Xu(n,hn("disableProviderPing")))}}class e6e{constructor(e){this.name="elrond",this.namespace=e.namespace,this.events=hn("events"),this.client=hn("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(Cl.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var n;const i=O1(t);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||wl(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new El(new Xu(n,hn("disableProviderPing")))}}class t6e{constructor(e){this.name="multiversx",this.namespace=e.namespace,this.events=hn("events"),this.client=hn("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(Cl.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var n;const i=O1(t);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||wl(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new El(new Xu(n,hn("disableProviderPing")))}}class r6e{constructor(e){this.name="near",this.namespace=e.namespace,this.events=hn("events"),this.client=hn("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(this.chainId=e,!this.httpProviders[e]){const n=t||wl(`${this.name}:${e}`,this.namespace);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.events.emit(Cl.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2])||[]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var n;e[t]=this.createHttpProvider(t,(n=this.namespace.rpcMap)==null?void 0:n[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||wl(e,this.namespace);return typeof n>"u"?void 0:new El(new Xu(n,hn("disableProviderPing")))}}class n6e{constructor(e){this.name=Ig,this.namespace=e.namespace,this.events=hn("events"),this.client=hn("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace.chains=[...new Set((this.namespace.chains||[]).concat(e.chains||[]))],this.namespace.accounts=[...new Set((this.namespace.accounts||[]).concat(e.accounts||[]))],this.namespace.methods=[...new Set((this.namespace.methods||[]).concat(e.methods||[]))],this.namespace.events=[...new Set((this.namespace.events||[]).concat(e.events||[]))],this.httpProviders=this.createHttpProviders()}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider(e.chainId).request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(Cl.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){var e,t;const n={};return(t=(e=this.namespace)==null?void 0:e.accounts)==null||t.forEach(i=>{const s=O3(i);n[`${s.namespace}:${s.reference}`]=this.createHttpProvider(i)}),n}getHttpProvider(e){const t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||wl(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new El(new Xu(n,hn("disableProviderPing")))}}var i6e=Object.defineProperty,s6e=Object.defineProperties,o6e=Object.getOwnPropertyDescriptors,PD=Object.getOwnPropertySymbols,a6e=Object.prototype.hasOwnProperty,c6e=Object.prototype.propertyIsEnumerable,OD=(r,e,t)=>e in r?i6e(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Y5=(r,e)=>{for(var t in e||(e={}))a6e.call(e,t)&&OD(r,t,e[t]);if(PD)for(var t of PD(e))c6e.call(e,t)&&OD(r,t,e[t]);return r},d7=(r,e)=>s6e(r,o6e(e));let l6e=class RW{constructor(e){this.events=new QI,this.rpcProviders={},this.shouldAbortPairingAttempt=!1,this.maxPairingAttempts=10,this.disableProviderPing=!1,this.providerOpts=e,this.logger=typeof(e==null?void 0:e.logger)<"u"&&typeof(e==null?void 0:e.logger)!="string"?e.logger:Sy(Ry({level:(e==null?void 0:e.logger)||xD})),this.disableProviderPing=(e==null?void 0:e.disableProviderPing)||!1}static async init(e){const t=new RW(e);return await t.initialize(),t}async request(e,t,n){const[i,s]=this.validateChain(t);if(!this.session)throw new Error("Please call connect() before request()");return await this.getProvider(i).request({request:Y5({},e),chainId:`${i}:${s}`,topic:this.session.topic,expiry:n})}sendAsync(e,t,n,i){const s=new Date().getTime();this.request(e,n,i).then(o=>t(null,H_(s,o))).catch(o=>t(o,void 0))}async enable(){if(!this.client)throw new Error("Sign Client not initialized");return this.session||await this.connect({namespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties}),await this.requestAccounts()}async disconnect(){var e;if(!this.session)throw new Error("Please call connect() before enable()");await this.client.disconnect({topic:(e=this.session)==null?void 0:e.topic,reason:pn("USER_DISCONNECTED")}),await this.cleanup()}async connect(e){if(!this.client)throw new Error("Sign Client not initialized");if(this.setNamespaces(e),await this.cleanupPendingPairings(),!e.skipPairing)return await this.pair(e.pairingTopic)}async authenticate(e){if(!this.client)throw new Error("Sign Client not initialized");this.setNamespaces(e),await this.cleanupPendingPairings();const{uri:t,response:n}=await this.client.authenticate(e);t&&(this.uri=t,this.events.emit("display_uri",t));const i=await n();if(this.session=i.session,this.session){const s=ID(this.session.namespaces);this.namespaces=l7(this.namespaces,s),this.persist("namespaces",this.namespaces),this.onConnect()}return i}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}removeListener(e,t){this.events.removeListener(e,t)}off(e,t){this.events.off(e,t)}get isWalletConnect(){return!0}async pair(e){this.shouldAbortPairingAttempt=!1;let t=0;do{if(this.shouldAbortPairingAttempt)throw new Error("Pairing aborted");if(t>=this.maxPairingAttempts)throw new Error("Max auto pairing attempts reached");const{uri:n,approval:i}=await this.client.connect({pairingTopic:e,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties});n&&(this.uri=n,this.events.emit("display_uri",n)),await i().then(s=>{this.session=s;const o=ID(s.namespaces);this.namespaces=l7(this.namespaces,o),this.persist("namespaces",this.namespaces)}).catch(s=>{if(s.message!==CW)throw s;t++})}while(!this.session);return this.onConnect(),this.session}setDefaultChain(e,t){try{if(!this.session)return;const[n,i]=this.validateChain(e),s=this.getProvider(n);s.name===Ig?s.setDefaultChain(`${n}:${i}`,t):s.setDefaultChain(i,t)}catch(n){if(!/Please call connect/.test(n.message))throw n}}async cleanupPendingPairings(e={}){this.logger.info("Cleaning up inactive pairings...");const t=this.client.pairing.getAll();if(Hu(t)){for(const n of t)e.deletePairings?this.client.core.expirer.set(n.topic,0):await this.client.core.relayer.subscriber.unsubscribe(n.topic);this.logger.info(`Inactive pairings cleared: ${t.length}`)}}abortPairingAttempt(){this.shouldAbortPairingAttempt=!0}async checkStorage(){if(this.namespaces=await this.getFromStore("namespaces"),this.optionalNamespaces=await this.getFromStore("optionalNamespaces")||{},this.client.session.length){const e=this.client.session.keys.length-1;this.session=this.client.session.get(this.client.session.keys[e]),this.createProviders()}}async initialize(){this.logger.trace("Initialized"),await this.createClient(),await this.checkStorage(),this.registerEventListeners()}async createClient(){this.client=this.providerOpts.client||await x4e.init({logger:this.providerOpts.logger||xD,relayUrl:this.providerOpts.relayUrl||N4e,projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata,storageOptions:this.providerOpts.storageOptions,storage:this.providerOpts.storage,name:this.providerOpts.name}),this.logger.trace("SignClient Initialized")}createProviders(){if(!this.client)throw new Error("Sign Client not initialized");if(!this.session)throw new Error("Session not initialized. Please call connect() before enable()");const e=[...new Set(Object.keys(this.session.namespaces).map(t=>l3(t)))];h7("client",this.client),h7("events",this.events),h7("disableProviderPing",this.disableProviderPing),e.forEach(t=>{if(!this.session)return;const n=j4e(t,this.session),i=IW(n),s=l7(this.namespaces,this.optionalNamespaces),o=d7(Y5({},s[t]),{accounts:n,chains:i});switch(t){case"eip155":this.rpcProviders[t]=new Z4e({namespace:o});break;case"algorand":this.rpcProviders[t]=new J4e({namespace:o});break;case"solana":this.rpcProviders[t]=new Y4e({namespace:o});break;case"cosmos":this.rpcProviders[t]=new Q4e({namespace:o});break;case"polkadot":this.rpcProviders[t]=new W4e({namespace:o});break;case"cip34":this.rpcProviders[t]=new X4e({namespace:o});break;case"elrond":this.rpcProviders[t]=new e6e({namespace:o});break;case"multiversx":this.rpcProviders[t]=new t6e({namespace:o});break;case"near":this.rpcProviders[t]=new r6e({namespace:o});break;default:this.rpcProviders[Ig]?this.rpcProviders[Ig].updateNamespace(o):this.rpcProviders[Ig]=new n6e({namespace:o})}})}registerEventListeners(){if(typeof this.client>"u")throw new Error("Sign Client is not initialized");this.client.on("session_ping",e=>{this.events.emit("session_ping",e)}),this.client.on("session_event",e=>{const{params:t}=e,{event:n}=t;if(n.name==="accountsChanged"){const i=n.data;i&&Hu(i)&&this.events.emit("accountsChanged",i.map(H4e))}else if(n.name==="chainChanged"){const i=t.chainId,s=t.event.data,o=l3(i),a=u7(i)!==u7(s)?`${o}:${u7(s)}`:i;this.onChainChanged(a)}else this.events.emit(n.name,n.data);this.events.emit("session_event",e)}),this.client.on("session_update",({topic:e,params:t})=>{var n;const{namespaces:i}=t,s=(n=this.client)==null?void 0:n.session.get(e);this.session=d7(Y5({},s),{namespaces:i}),this.onSessionUpdate(),this.events.emit("session_update",{topic:e,params:t})}),this.client.on("session_delete",async e=>{await this.cleanup(),this.events.emit("session_delete",e),this.events.emit("disconnect",d7(Y5({},pn("USER_DISCONNECTED")),{data:e.topic}))}),this.on(Cl.DEFAULT_CHAIN_CHANGED,e=>{this.onChainChanged(e,!0)})}getProvider(e){return this.rpcProviders[e]||this.rpcProviders[Ig]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach(e=>{var t;this.getProvider(e).updateNamespace((t=this.session)==null?void 0:t.namespaces[e])})}setNamespaces(e){const{namespaces:t,optionalNamespaces:n,sessionProperties:i}=e;t&&Object.keys(t).length&&(this.namespaces=t),n&&Object.keys(n).length&&(this.optionalNamespaces=n),this.sessionProperties=i,this.persist("namespaces",t),this.persist("optionalNamespaces",n)}validateChain(e){const[t,n]=(e==null?void 0:e.split(":"))||["",""];if(!this.namespaces||!Object.keys(this.namespaces).length)return[t,n];if(t&&!Object.keys(this.namespaces||{}).map(o=>l3(o)).includes(t))throw new Error(`Namespace '${t}' is not configured. Please call connect() first with namespace config.`);if(t&&n)return[t,n];const i=l3(Object.keys(this.namespaces)[0]),s=this.rpcProviders[i].getDefaultChain();return[i,s]}async requestAccounts(){const[e]=this.validateChain();return await this.getProvider(e).requestAccounts()}onChainChanged(e,t=!1){if(!this.namespaces)return;const[n,i]=this.validateChain(e);i&&(t||this.getProvider(n).setDefaultChain(i),this.namespaces[n]?this.namespaces[n].defaultChain=i:this.namespaces[`${n}:${i}`]?this.namespaces[`${n}:${i}`].defaultChain=i:this.namespaces[`${n}:${i}`]={defaultChain:i},this.persist("namespaces",this.namespaces),this.events.emit("chainChanged",i))}onConnect(){this.createProviders(),this.events.emit("connect",{session:this.session})}async cleanup(){this.session=void 0,this.namespaces=void 0,this.optionalNamespaces=void 0,this.sessionProperties=void 0,this.persist("namespaces",void 0),this.persist("optionalNamespaces",void 0),this.persist("sessionProperties",void 0),await this.cleanupPendingPairings({deletePairings:!0})}persist(e,t){this.client.core.storage.setItem(`${AD}/${e}`,t)}async getFromStore(e){return await this.client.core.storage.getItem(`${AD}/${e}`)}};const u6e=l6e,h6e="wc",d6e="ethereum_provider",f6e=`${h6e}@2:${d6e}:`,p6e="https://rpc.walletconnect.com/v1/",$C=["eth_sendTransaction","personal_sign"],kW=["eth_accounts","eth_requestAccounts","eth_sendRawTransaction","eth_sign","eth_signTransaction","eth_signTypedData","eth_signTypedData_v3","eth_signTypedData_v4","eth_sendTransaction","personal_sign","wallet_switchEthereumChain","wallet_addEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode","wallet_sendCalls","wallet_getCapabilities","wallet_getCallsStatus","wallet_showCallsStatus"],BC=["chainChanged","accountsChanged"],g6e=["chainChanged","accountsChanged","message","disconnect","connect"];var m6e=Object.defineProperty,w6e=Object.defineProperties,v6e=Object.getOwnPropertyDescriptors,MD=Object.getOwnPropertySymbols,y6e=Object.prototype.hasOwnProperty,b6e=Object.prototype.propertyIsEnumerable,DD=(r,e,t)=>e in r?m6e(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Tg=(r,e)=>{for(var t in e||(e={}))y6e.call(e,t)&&DD(r,t,e[t]);if(MD)for(var t of MD(e))b6e.call(e,t)&&DD(r,t,e[t]);return r},f7=(r,e)=>w6e(r,v6e(e));function p8(r){return Number(r[0].split(":")[1])}function Q5(r){return`0x${r.toString(16)}`}function _6e(r){const{chains:e,optionalChains:t,methods:n,optionalMethods:i,events:s,optionalEvents:o,rpcMap:a}=r;if(!Hu(e))throw new Error("Invalid chains");const c={chains:e,methods:n||$C,events:s||BC,rpcMap:Tg({},e.length?{[p8(e)]:a[p8(e)]}:{})},l=s==null?void 0:s.filter(y=>!BC.includes(y)),h=n==null?void 0:n.filter(y=>!$C.includes(y));if(!t&&!o&&!i&&!(l!=null&&l.length)&&!(h!=null&&h.length))return{required:e.length?c:void 0};const f=(l==null?void 0:l.length)&&(h==null?void 0:h.length)||!t,v={chains:[...new Set(f?c.chains.concat(t||[]):t)],methods:[...new Set(c.methods.concat(i!=null&&i.length?i:kW))],events:[...new Set(c.events.concat(o!=null&&o.length?o:g6e))],rpcMap:a};return{required:e.length?c:void 0,optional:t.length?v:void 0}}let x6e=class NW{constructor(){this.events=new mo.EventEmitter,this.namespace="eip155",this.accounts=[],this.chainId=1,this.STORAGE_KEY=f6e,this.on=(e,t)=>(this.events.on(e,t),this),this.once=(e,t)=>(this.events.once(e,t),this),this.removeListener=(e,t)=>(this.events.removeListener(e,t),this),this.off=(e,t)=>(this.events.off(e,t),this),this.parseAccount=e=>this.isCompatibleChainId(e)?this.parseAccountId(e).address:e,this.signer={},this.rpc={}}static async init(e){const t=new NW;return await t.initialize(e),t}async request(e,t){return await this.signer.request(e,this.formatChainId(this.chainId),t)}sendAsync(e,t,n){this.signer.sendAsync(e,t,this.formatChainId(this.chainId),n)}get connected(){return this.signer.client?this.signer.client.core.relayer.connected:!1}get connecting(){return this.signer.client?this.signer.client.core.relayer.connecting:!1}async enable(){return this.session||await this.connect(),await this.request({method:"eth_requestAccounts"})}async connect(e){if(!this.signer.client)throw new Error("Provider not initialized. Call init() first");this.loadConnectOpts(e);const{required:t,optional:n}=_6e(this.rpc);try{const i=await new Promise(async(o,a)=>{var c;this.rpc.showQrModal&&((c=this.modal)==null||c.subscribeModal(l=>{!l.open&&!this.signer.session&&(this.signer.abortPairingAttempt(),a(new Error("Connection request reset. Please try again.")))})),await this.signer.connect(f7(Tg({namespaces:Tg({},t&&{[this.namespace]:t})},n&&{optionalNamespaces:{[this.namespace]:n}}),{pairingTopic:e==null?void 0:e.pairingTopic})).then(l=>{o(l)}).catch(l=>{a(new Error(l.message))})});if(!i)return;const s=VO(i.namespaces,[this.namespace]);this.setChainIds(this.rpc.chains.length?this.rpc.chains:s),this.setAccounts(s),this.events.emit("connect",{chainId:Q5(this.chainId)})}catch(i){throw this.signer.logger.error(i),i}finally{this.modal&&this.modal.closeModal()}}async authenticate(e){if(!this.signer.client)throw new Error("Provider not initialized. Call init() first");this.loadConnectOpts({chains:e==null?void 0:e.chains});try{const t=await new Promise(async(i,s)=>{var o;this.rpc.showQrModal&&((o=this.modal)==null||o.subscribeModal(a=>{!a.open&&!this.signer.session&&(this.signer.abortPairingAttempt(),s(new Error("Connection request reset. Please try again.")))})),await this.signer.authenticate(f7(Tg({},e),{chains:this.rpc.chains})).then(a=>{i(a)}).catch(a=>{s(new Error(a.message))})}),n=t.session;if(n){const i=VO(n.namespaces,[this.namespace]);this.setChainIds(this.rpc.chains.length?this.rpc.chains:i),this.setAccounts(i),this.events.emit("connect",{chainId:Q5(this.chainId)})}return t}catch(t){throw this.signer.logger.error(t),t}finally{this.modal&&this.modal.closeModal()}}async disconnect(){this.session&&await this.signer.disconnect(),this.reset()}get isWalletConnect(){return!0}get session(){return this.signer.session}registerEventListeners(){this.signer.on("session_event",e=>{const{params:t}=e,{event:n}=t;n.name==="accountsChanged"?(this.accounts=this.parseAccounts(n.data),this.events.emit("accountsChanged",this.accounts)):n.name==="chainChanged"?this.setChainId(this.formatChainId(n.data)):this.events.emit(n.name,n.data),this.events.emit("session_event",e)}),this.signer.on("chainChanged",e=>{const t=parseInt(e);this.chainId=t,this.events.emit("chainChanged",Q5(this.chainId)),this.persist()}),this.signer.on("session_update",e=>{this.events.emit("session_update",e)}),this.signer.on("session_delete",e=>{this.reset(),this.events.emit("session_delete",e),this.events.emit("disconnect",f7(Tg({},pn("USER_DISCONNECTED")),{data:e.topic,name:"USER_DISCONNECTED"}))}),this.signer.on("display_uri",e=>{var t,n;this.rpc.showQrModal&&((t=this.modal)==null||t.closeModal(),(n=this.modal)==null||n.openModal({uri:e})),this.events.emit("display_uri",e)})}switchEthereumChain(e){this.request({method:"wallet_switchEthereumChain",params:[{chainId:e.toString(16)}]})}isCompatibleChainId(e){return typeof e=="string"?e.startsWith(`${this.namespace}:`):!1}formatChainId(e){return`${this.namespace}:${e}`}parseChainId(e){return Number(e.split(":")[1])}setChainIds(e){const t=e.filter(n=>this.isCompatibleChainId(n)).map(n=>this.parseChainId(n));t.length&&(this.chainId=t[0],this.events.emit("chainChanged",Q5(this.chainId)),this.persist())}setChainId(e){if(this.isCompatibleChainId(e)){const t=this.parseChainId(e);this.chainId=t,this.switchEthereumChain(t)}}parseAccountId(e){const[t,n,i]=e.split(":");return{chainId:`${t}:${n}`,address:i}}setAccounts(e){this.accounts=e.filter(t=>this.parseChainId(this.parseAccountId(t).chainId)===this.chainId).map(t=>this.parseAccountId(t).address),this.events.emit("accountsChanged",this.accounts)}getRpcConfig(e){var t,n;const i=(t=e==null?void 0:e.chains)!=null?t:[],s=(n=e==null?void 0:e.optionalChains)!=null?n:[],o=i.concat(s);if(!o.length)throw new Error("No chains specified in either `chains` or `optionalChains`");const a=i.length?(e==null?void 0:e.methods)||$C:[],c=i.length?(e==null?void 0:e.events)||BC:[],l=(e==null?void 0:e.optionalMethods)||[],h=(e==null?void 0:e.optionalEvents)||[],f=(e==null?void 0:e.rpcMap)||this.buildRpcMap(o,e.projectId),v=(e==null?void 0:e.qrModalOptions)||void 0;return{chains:i==null?void 0:i.map(y=>this.formatChainId(y)),optionalChains:s.map(y=>this.formatChainId(y)),methods:a,events:c,optionalMethods:l,optionalEvents:h,rpcMap:f,showQrModal:!!(e!=null&&e.showQrModal),qrModalOptions:v,projectId:e.projectId,metadata:e.metadata}}buildRpcMap(e,t){const n={};return e.forEach(i=>{n[i]=this.getRpcUrl(i,t)}),n}async initialize(e){if(this.rpc=this.getRpcConfig(e),this.chainId=this.rpc.chains.length?p8(this.rpc.chains):p8(this.rpc.optionalChains),this.signer=await u6e.init({projectId:this.rpc.projectId,metadata:this.rpc.metadata,disableProviderPing:e.disableProviderPing,relayUrl:e.relayUrl,storageOptions:e.storageOptions}),this.registerEventListeners(),await this.loadPersistedSession(),this.rpc.showQrModal){let t;try{const{WalletConnectModal:n}=await lc(()=>import("./index-TjmV1Ump.js").then(i=>i.i),[]);t=n}catch{throw new Error("To use QR modal, please install @walletconnect/modal package")}if(t)try{this.modal=new t(Tg({projectId:this.rpc.projectId},this.rpc.qrModalOptions))}catch(n){throw this.signer.logger.error(n),new Error("Could not generate WalletConnectModal Instance")}}}loadConnectOpts(e){if(!e)return;const{chains:t,optionalChains:n,rpcMap:i}=e;t&&Hu(t)&&(this.rpc.chains=t.map(s=>this.formatChainId(s)),t.forEach(s=>{this.rpc.rpcMap[s]=(i==null?void 0:i[s])||this.getRpcUrl(s)})),n&&Hu(n)&&(this.rpc.optionalChains=[],this.rpc.optionalChains=n==null?void 0:n.map(s=>this.formatChainId(s)),n.forEach(s=>{this.rpc.rpcMap[s]=(i==null?void 0:i[s])||this.getRpcUrl(s)}))}getRpcUrl(e,t){var n;return((n=this.rpc.rpcMap)==null?void 0:n[e])||`${p6e}?chainId=eip155:${e}&projectId=${t||this.rpc.projectId}`}async loadPersistedSession(){if(this.session)try{const e=await this.signer.client.core.storage.getItem(`${this.STORAGE_KEY}/chainId`),t=this.session.namespaces[`${this.namespace}:${e}`]?this.session.namespaces[`${this.namespace}:${e}`]:this.session.namespaces[this.namespace];this.setChainIds(e?[this.formatChainId(e)]:t==null?void 0:t.accounts),this.setAccounts(t==null?void 0:t.accounts)}catch(e){this.signer.logger.error("Failed to load persisted session, clearing state..."),this.signer.logger.error(e),await this.disconnect().catch(t=>this.signer.logger.warn(t))}}reset(){this.chainId=1,this.accounts=[]}persist(){this.session&&this.signer.client.core.storage.setItem(`${this.STORAGE_KEY}/chainId`,this.chainId)}parseAccounts(e){return typeof e=="string"||e instanceof String?[this.parseAccount(e)]:e.map(t=>this.parseAccount(t))}};const PW=":";function A6e(r){const{namespace:e,reference:t}=r;return[e,t].join(PW)}function E6e(r){const[e,t,n]=r.split(PW);return{namespace:e,reference:t,address:n}}function C6e(r,e){const t=[];return r.forEach(n=>{const i=e(n);t.includes(i)||t.push(i)}),t}function S6e(r){const{namespace:e,reference:t}=E6e(r);return A6e({namespace:e,reference:t})}function I6e(r){return C6e(r,S6e)}var OW=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function T6e(r){var e=r.default;if(typeof e=="function"){var t=function(){return e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(r).forEach(function(n){var i=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return r[n]}})}),t}var R6e={exports:{}};/** +}`;var Tr=sN(function(){return rn(ae,Kt+"return "+Xe).apply(t,ve)});if(Tr.source=Xe,OA(Tr))throw Tr;return Tr}function dX(u){return cn(u).toLowerCase()}function fX(u){return cn(u).toUpperCase()}function pX(u,p,_){if(u=cn(u),u&&(_||p===t))return pR(u);if(!u||!(p=Go(p)))return u;var j=Ec(u),re=Ec(p),ae=gR(j,re),ve=mR(j,re)+1;return Dd(j,ae,ve).join("")}function gX(u,p,_){if(u=cn(u),u&&(_||p===t))return u.slice(0,vR(u)+1);if(!u||!(p=Go(p)))return u;var j=Ec(u),re=mR(j,Ec(p))+1;return Dd(j,0,re).join("")}function mX(u,p,_){if(u=cn(u),u&&(_||p===t))return u.replace(mt,"");if(!u||!(p=Go(p)))return u;var j=Ec(u),re=gR(j,Ec(p));return Dd(j,re).join("")}function wX(u,p){var _=Q,j=te;if(Kn(p)){var re="separator"in p?p.separator:re;_="length"in p?Cr(p.length):_,j="omission"in p?Go(p.omission):j}u=cn(u);var ae=u.length;if(q1(u)){var ve=Ec(u);ae=ve.length}if(_>=ae)return u;var _e=_-K1(j);if(_e<1)return j;var ke=ve?Dd(ve,0,_e).join(""):u.slice(0,_e);if(re===t)return ke+j;if(ve&&(_e+=ke.length-_e),MA(re)){if(u.slice(_e).search(re)){var Ke,Ge=ke;for(re.global||(re=Yx(re.source,cn(Pt.exec(re))+"g")),re.lastIndex=0;Ke=re.exec(Ge);)var Xe=Ke.index;ke=ke.slice(0,Xe===t?_e:Xe)}}else if(u.indexOf(Go(re),_e)!=_e){var Ct=ke.lastIndexOf(re);Ct>-1&&(ke=ke.slice(0,Ct))}return ke+j}function vX(u){return u=cn(u),u&&pt.test(u)?u.replace(Ht,KK):u}var yX=eg(function(u,p,_){return u+(_?" ":"")+p.toUpperCase()}),BA=ok("toUpperCase");function iN(u,p,_){return u=cn(u),p=_?t:p,p===t?HK(u)?YK(u):OK(u):u.match(p)||[]}var sN=Nr(function(u,p){try{return Ui(u,t,p)}catch(_){return OA(_)?_:new hr(_)}}),bX=ch(function(u,p){return Ia(p,function(_){_=Pl(_),oh(u,_,NA(u[_],u))}),u});function _X(u){var p=u==null?0:u.length,_=rr();return u=p?Fn(u,function(j){if(typeof j[1]!="function")throw new Ta(o);return[_(j[0]),j[1]]}):[],Nr(function(j){for(var re=-1;++reC)return[];var _=w,j=ws(u,w);p=rr(p),u-=w;for(var re=Kx(j,p);++_0||p<0)?new Dr(_):(u<0?_=_.takeRight(-u):u&&(_=_.drop(u)),p!==t&&(p=Cr(p),_=p<0?_.dropRight(-p):_.take(p-u)),_)},Dr.prototype.takeRightWhile=function(u){return this.reverse().takeWhile(u).reverse()},Dr.prototype.toArray=function(){return this.take(w)},kl(Dr.prototype,function(u,p){var _=/^(?:filter|find|map|reject)|While$/.test(p),j=/^(?:head|last)$/.test(p),re=se[j?"take"+(p=="last"?"Right":""):p],ae=j||/^find/.test(p);re&&(se.prototype[p]=function(){var ve=this.__wrapped__,_e=j?[1]:arguments,ke=ve instanceof Dr,Ke=_e[0],Ge=ke||pr(ve),Xe=function(Or){var Wr=re.apply(se,Rd([Or],_e));return j&&Ct?Wr[0]:Wr};Ge&&_&&typeof Ke=="function"&&Ke.length!=1&&(ke=Ge=!1);var Ct=this.__chain__,Kt=!!this.__actions__.length,ir=ae&&!Ct,Tr=ke&&!Kt;if(!ae&&Ge){ve=Tr?ve:new Dr(this);var sr=u.apply(ve,_e);return sr.__actions__.push({func:y5,args:[Xe],thisArg:t}),new Ra(sr,Ct)}return ir&&Tr?u.apply(this,_e):(sr=this.thru(Xe),ir?j?sr.value()[0]:sr.value():sr)})}),Ia(["pop","push","shift","sort","splice","unshift"],function(u){var p=Vb[u],_=/^(?:push|sort|unshift)$/.test(u)?"tap":"thru",j=/^(?:pop|shift)$/.test(u);se.prototype[u]=function(){var re=arguments;if(j&&!this.__chain__){var ae=this.value();return p.apply(pr(ae)?ae:[],re)}return this[_](function(ve){return p.apply(pr(ve)?ve:[],re)})}}),kl(Dr.prototype,function(u,p){var _=se[p];if(_){var j=_.name+"";dn.call(Q1,j)||(Q1[j]=[]),Q1[j].push({name:p,func:_})}}),Q1[d5(t,L).name]=[{name:"wrapper",func:t}],Dr.prototype.clone=vG,Dr.prototype.reverse=yG,Dr.prototype.value=bG,se.prototype.at=ZY,se.prototype.chain=YY,se.prototype.commit=QY,se.prototype.next=JY,se.prototype.plant=eQ,se.prototype.reverse=tQ,se.prototype.toJSON=se.prototype.valueOf=se.prototype.value=rQ,se.prototype.first=se.prototype.head,b2&&(se.prototype[b2]=XY),se},G1=QK();oi?((oi.exports=G1)._=G1,An._=G1):Hr._=G1}).call(Q2)})(DC,DC.exports);var D4e=Object.defineProperty,$4e=Object.defineProperties,B4e=Object.getOwnPropertyDescriptors,ED=Object.getOwnPropertySymbols,L4e=Object.prototype.hasOwnProperty,U4e=Object.prototype.propertyIsEnumerable,CD=(r,e,t)=>e in r?D4e(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Z5=(r,e)=>{for(var t in e||(e={}))L4e.call(e,t)&&CD(r,t,e[t]);if(ED)for(var t of ED(e))U4e.call(e,t)&&CD(r,t,e[t]);return r},F4e=(r,e)=>$4e(r,B4e(e));function wl(r,e,t){var n;const i=O3(r);return((n=e.rpcMap)==null?void 0:n[i.reference])||`${M4e}?chainId=${i.namespace}:${i.reference}&projectId=${t}`}function O1(r){return r.includes(":")?r.split(":")[1]:r}function IW(r){return r.map(e=>`${e.split(":")[0]}:${e.split(":")[1]}`)}function j4e(r,e){const t=Object.keys(e.namespaces).filter(i=>i.includes(r));if(!t.length)return[];const n=[];return t.forEach(i=>{const s=e.namespaces[i].accounts;n.push(...s)}),n}function l7(r={},e={}){const t=SD(r),n=SD(e);return DC.exports.merge(t,n)}function SD(r){var e,t,n,i;const s={};if(!Vv(r))return s;for(const[o,a]of Object.entries(r)){const c=fT(o)?[o]:a.chains,l=a.methods||[],h=a.events||[],f=a.rpcMap||{},v=l3(o);s[v]=F4e(Z5(Z5({},s[v]),a),{chains:k4(c,(e=s[v])==null?void 0:e.chains),methods:k4(l,(t=s[v])==null?void 0:t.methods),events:k4(h,(n=s[v])==null?void 0:n.events),rpcMap:Z5(Z5({},f),(i=s[v])==null?void 0:i.rpcMap)})}return s}function H4e(r){return r.includes(":")?r.split(":")[2]:r}function ID(r){const e={};for(const[t,n]of Object.entries(r)){const i=n.methods||[],s=n.events||[],o=n.accounts||[],a=fT(t)?[t]:n.chains?n.chains:IW(n.accounts);e[t]={chains:a,methods:i,events:s,accounts:o}}return e}function u7(r){return typeof r=="number"?r:r.includes("0x")?parseInt(r,16):(r=r.includes(":")?r.split(":")[1]:r,isNaN(Number(r))?r:Number(r))}const TW={},hn=r=>TW[r],h7=(r,e)=>{TW[r]=e};class W4e{constructor(e){this.name="polkadot",this.namespace=e.namespace,this.events=hn("events"),this.client=hn("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(Cl.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getAccounts(){const e=this.namespace.accounts;return e?e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2])||[]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var n;const i=O1(t);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||wl(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new El(new Xu(n,hn("disableProviderPing")))}}var z4e=Object.defineProperty,V4e=Object.defineProperties,q4e=Object.getOwnPropertyDescriptors,TD=Object.getOwnPropertySymbols,K4e=Object.prototype.hasOwnProperty,G4e=Object.prototype.propertyIsEnumerable,RD=(r,e,t)=>e in r?z4e(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,kD=(r,e)=>{for(var t in e||(e={}))K4e.call(e,t)&&RD(r,t,e[t]);if(TD)for(var t of TD(e))G4e.call(e,t)&&RD(r,t,e[t]);return r},ND=(r,e)=>V4e(r,q4e(e));class Z4e{constructor(e){this.name="eip155",this.namespace=e.namespace,this.events=hn("events"),this.client=hn("client"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain())}async request(e){switch(e.request.method){case"eth_requestAccounts":return this.getAccounts();case"eth_accounts":return this.getAccounts();case"wallet_switchEthereumChain":return await this.handleSwitchChain(e);case"eth_chainId":return parseInt(this.getDefaultChain());case"wallet_getCapabilities":return await this.getCapabilities(e)}return this.namespace.methods.includes(e.request.method)?await this.client.request(e):this.getHttpProvider().request(e.request)}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(parseInt(e),t),this.chainId=parseInt(e),this.events.emit(Cl.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId.toString();if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}createHttpProvider(e,t){const n=t||wl(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new El(new Xu(n,hn("disableProviderPing")))}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var n;const i=parseInt(O1(t));e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[t])}),e}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}getHttpProvider(){const e=this.chainId,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}async handleSwitchChain(e){var t,n;let i=e.request.params?(t=e.request.params[0])==null?void 0:t.chainId:"0x0";i=i.startsWith("0x")?i:`0x${i}`;const s=parseInt(i,16);if(this.isChainApproved(s))this.setDefaultChain(`${s}`);else if(this.namespace.methods.includes("wallet_switchEthereumChain"))await this.client.request({topic:e.topic,request:{method:e.request.method,params:[{chainId:i}]},chainId:(n=this.namespace.chains)==null?void 0:n[0]}),this.setDefaultChain(`${s}`);else throw new Error(`Failed to switch to chain 'eip155:${s}'. The chain is not approved or the wallet does not support 'wallet_switchEthereumChain' method.`);return null}isChainApproved(e){return this.namespace.chains.includes(`${this.name}:${e}`)}async getCapabilities(e){var t,n,i;const s=(n=(t=e.request)==null?void 0:t.params)==null?void 0:n[0];if(!s)throw new Error("Missing address parameter in `wallet_getCapabilities` request");const o=this.client.session.get(e.topic),a=((i=o==null?void 0:o.sessionProperties)==null?void 0:i.capabilities)||{};if(a!=null&&a[s])return a==null?void 0:a[s];const c=await this.client.request(e);try{await this.client.session.update(e.topic,{sessionProperties:ND(kD({},o.sessionProperties||{}),{capabilities:ND(kD({},a||{}),{[s]:c})})})}catch(l){console.warn("Failed to update session with capabilities",l)}return c}}class Y4e{constructor(e){this.name="solana",this.namespace=e.namespace,this.events=hn("events"),this.client=hn("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(Cl.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var n;const i=O1(t);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||wl(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new El(new Xu(n,hn("disableProviderPing")))}}class Q4e{constructor(e){this.name="cosmos",this.namespace=e.namespace,this.events=hn("events"),this.client=hn("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(Cl.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var n;const i=O1(t);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||wl(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new El(new Xu(n,hn("disableProviderPing")))}}class J4e{constructor(e){this.name="algorand",this.namespace=e.namespace,this.events=hn("events"),this.client=hn("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(!this.httpProviders[e]){const n=t||wl(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.chainId=e,this.events.emit(Cl.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var n;e[t]=this.createHttpProvider(t,(n=this.namespace.rpcMap)==null?void 0:n[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||wl(e,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new El(new Xu(n,hn("disableProviderPing")))}}class X4e{constructor(e){this.name="cip34",this.namespace=e.namespace,this.events=hn("events"),this.client=hn("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(Cl.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{const n=this.getCardanoRPCUrl(t),i=O1(t);e[i]=this.createHttpProvider(i,n)}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}getCardanoRPCUrl(e){const t=this.namespace.rpcMap;if(t)return t[e]}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||this.getCardanoRPCUrl(e);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new El(new Xu(n,hn("disableProviderPing")))}}class e6e{constructor(e){this.name="elrond",this.namespace=e.namespace,this.events=hn("events"),this.client=hn("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(Cl.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var n;const i=O1(t);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||wl(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new El(new Xu(n,hn("disableProviderPing")))}}class t6e{constructor(e){this.name="multiversx",this.namespace=e.namespace,this.events=hn("events"),this.client=hn("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(Cl.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var n;const i=O1(t);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||wl(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new El(new Xu(n,hn("disableProviderPing")))}}class r6e{constructor(e){this.name="near",this.namespace=e.namespace,this.events=hn("events"),this.client=hn("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(this.chainId=e,!this.httpProviders[e]){const n=t||wl(`${this.name}:${e}`,this.namespace);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.events.emit(Cl.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2])||[]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var n;e[t]=this.createHttpProvider(t,(n=this.namespace.rpcMap)==null?void 0:n[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||wl(e,this.namespace);return typeof n>"u"?void 0:new El(new Xu(n,hn("disableProviderPing")))}}class n6e{constructor(e){this.name=Ig,this.namespace=e.namespace,this.events=hn("events"),this.client=hn("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace.chains=[...new Set((this.namespace.chains||[]).concat(e.chains||[]))],this.namespace.accounts=[...new Set((this.namespace.accounts||[]).concat(e.accounts||[]))],this.namespace.methods=[...new Set((this.namespace.methods||[]).concat(e.methods||[]))],this.namespace.events=[...new Set((this.namespace.events||[]).concat(e.events||[]))],this.httpProviders=this.createHttpProviders()}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider(e.chainId).request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(Cl.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){var e,t;const n={};return(t=(e=this.namespace)==null?void 0:e.accounts)==null||t.forEach(i=>{const s=O3(i);n[`${s.namespace}:${s.reference}`]=this.createHttpProvider(i)}),n}getHttpProvider(e){const t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||wl(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new El(new Xu(n,hn("disableProviderPing")))}}var i6e=Object.defineProperty,s6e=Object.defineProperties,o6e=Object.getOwnPropertyDescriptors,PD=Object.getOwnPropertySymbols,a6e=Object.prototype.hasOwnProperty,c6e=Object.prototype.propertyIsEnumerable,OD=(r,e,t)=>e in r?i6e(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Y5=(r,e)=>{for(var t in e||(e={}))a6e.call(e,t)&&OD(r,t,e[t]);if(PD)for(var t of PD(e))c6e.call(e,t)&&OD(r,t,e[t]);return r},d7=(r,e)=>s6e(r,o6e(e));let l6e=class RW{constructor(e){this.events=new QI,this.rpcProviders={},this.shouldAbortPairingAttempt=!1,this.maxPairingAttempts=10,this.disableProviderPing=!1,this.providerOpts=e,this.logger=typeof(e==null?void 0:e.logger)<"u"&&typeof(e==null?void 0:e.logger)!="string"?e.logger:Sy(Ry({level:(e==null?void 0:e.logger)||xD})),this.disableProviderPing=(e==null?void 0:e.disableProviderPing)||!1}static async init(e){const t=new RW(e);return await t.initialize(),t}async request(e,t,n){const[i,s]=this.validateChain(t);if(!this.session)throw new Error("Please call connect() before request()");return await this.getProvider(i).request({request:Y5({},e),chainId:`${i}:${s}`,topic:this.session.topic,expiry:n})}sendAsync(e,t,n,i){const s=new Date().getTime();this.request(e,n,i).then(o=>t(null,H_(s,o))).catch(o=>t(o,void 0))}async enable(){if(!this.client)throw new Error("Sign Client not initialized");return this.session||await this.connect({namespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties}),await this.requestAccounts()}async disconnect(){var e;if(!this.session)throw new Error("Please call connect() before enable()");await this.client.disconnect({topic:(e=this.session)==null?void 0:e.topic,reason:pn("USER_DISCONNECTED")}),await this.cleanup()}async connect(e){if(!this.client)throw new Error("Sign Client not initialized");if(this.setNamespaces(e),await this.cleanupPendingPairings(),!e.skipPairing)return await this.pair(e.pairingTopic)}async authenticate(e){if(!this.client)throw new Error("Sign Client not initialized");this.setNamespaces(e),await this.cleanupPendingPairings();const{uri:t,response:n}=await this.client.authenticate(e);t&&(this.uri=t,this.events.emit("display_uri",t));const i=await n();if(this.session=i.session,this.session){const s=ID(this.session.namespaces);this.namespaces=l7(this.namespaces,s),this.persist("namespaces",this.namespaces),this.onConnect()}return i}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}removeListener(e,t){this.events.removeListener(e,t)}off(e,t){this.events.off(e,t)}get isWalletConnect(){return!0}async pair(e){this.shouldAbortPairingAttempt=!1;let t=0;do{if(this.shouldAbortPairingAttempt)throw new Error("Pairing aborted");if(t>=this.maxPairingAttempts)throw new Error("Max auto pairing attempts reached");const{uri:n,approval:i}=await this.client.connect({pairingTopic:e,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties});n&&(this.uri=n,this.events.emit("display_uri",n)),await i().then(s=>{this.session=s;const o=ID(s.namespaces);this.namespaces=l7(this.namespaces,o),this.persist("namespaces",this.namespaces)}).catch(s=>{if(s.message!==CW)throw s;t++})}while(!this.session);return this.onConnect(),this.session}setDefaultChain(e,t){try{if(!this.session)return;const[n,i]=this.validateChain(e),s=this.getProvider(n);s.name===Ig?s.setDefaultChain(`${n}:${i}`,t):s.setDefaultChain(i,t)}catch(n){if(!/Please call connect/.test(n.message))throw n}}async cleanupPendingPairings(e={}){this.logger.info("Cleaning up inactive pairings...");const t=this.client.pairing.getAll();if(Hu(t)){for(const n of t)e.deletePairings?this.client.core.expirer.set(n.topic,0):await this.client.core.relayer.subscriber.unsubscribe(n.topic);this.logger.info(`Inactive pairings cleared: ${t.length}`)}}abortPairingAttempt(){this.shouldAbortPairingAttempt=!0}async checkStorage(){if(this.namespaces=await this.getFromStore("namespaces"),this.optionalNamespaces=await this.getFromStore("optionalNamespaces")||{},this.client.session.length){const e=this.client.session.keys.length-1;this.session=this.client.session.get(this.client.session.keys[e]),this.createProviders()}}async initialize(){this.logger.trace("Initialized"),await this.createClient(),await this.checkStorage(),this.registerEventListeners()}async createClient(){this.client=this.providerOpts.client||await x4e.init({logger:this.providerOpts.logger||xD,relayUrl:this.providerOpts.relayUrl||N4e,projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata,storageOptions:this.providerOpts.storageOptions,storage:this.providerOpts.storage,name:this.providerOpts.name}),this.logger.trace("SignClient Initialized")}createProviders(){if(!this.client)throw new Error("Sign Client not initialized");if(!this.session)throw new Error("Session not initialized. Please call connect() before enable()");const e=[...new Set(Object.keys(this.session.namespaces).map(t=>l3(t)))];h7("client",this.client),h7("events",this.events),h7("disableProviderPing",this.disableProviderPing),e.forEach(t=>{if(!this.session)return;const n=j4e(t,this.session),i=IW(n),s=l7(this.namespaces,this.optionalNamespaces),o=d7(Y5({},s[t]),{accounts:n,chains:i});switch(t){case"eip155":this.rpcProviders[t]=new Z4e({namespace:o});break;case"algorand":this.rpcProviders[t]=new J4e({namespace:o});break;case"solana":this.rpcProviders[t]=new Y4e({namespace:o});break;case"cosmos":this.rpcProviders[t]=new Q4e({namespace:o});break;case"polkadot":this.rpcProviders[t]=new W4e({namespace:o});break;case"cip34":this.rpcProviders[t]=new X4e({namespace:o});break;case"elrond":this.rpcProviders[t]=new e6e({namespace:o});break;case"multiversx":this.rpcProviders[t]=new t6e({namespace:o});break;case"near":this.rpcProviders[t]=new r6e({namespace:o});break;default:this.rpcProviders[Ig]?this.rpcProviders[Ig].updateNamespace(o):this.rpcProviders[Ig]=new n6e({namespace:o})}})}registerEventListeners(){if(typeof this.client>"u")throw new Error("Sign Client is not initialized");this.client.on("session_ping",e=>{this.events.emit("session_ping",e)}),this.client.on("session_event",e=>{const{params:t}=e,{event:n}=t;if(n.name==="accountsChanged"){const i=n.data;i&&Hu(i)&&this.events.emit("accountsChanged",i.map(H4e))}else if(n.name==="chainChanged"){const i=t.chainId,s=t.event.data,o=l3(i),a=u7(i)!==u7(s)?`${o}:${u7(s)}`:i;this.onChainChanged(a)}else this.events.emit(n.name,n.data);this.events.emit("session_event",e)}),this.client.on("session_update",({topic:e,params:t})=>{var n;const{namespaces:i}=t,s=(n=this.client)==null?void 0:n.session.get(e);this.session=d7(Y5({},s),{namespaces:i}),this.onSessionUpdate(),this.events.emit("session_update",{topic:e,params:t})}),this.client.on("session_delete",async e=>{await this.cleanup(),this.events.emit("session_delete",e),this.events.emit("disconnect",d7(Y5({},pn("USER_DISCONNECTED")),{data:e.topic}))}),this.on(Cl.DEFAULT_CHAIN_CHANGED,e=>{this.onChainChanged(e,!0)})}getProvider(e){return this.rpcProviders[e]||this.rpcProviders[Ig]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach(e=>{var t;this.getProvider(e).updateNamespace((t=this.session)==null?void 0:t.namespaces[e])})}setNamespaces(e){const{namespaces:t,optionalNamespaces:n,sessionProperties:i}=e;t&&Object.keys(t).length&&(this.namespaces=t),n&&Object.keys(n).length&&(this.optionalNamespaces=n),this.sessionProperties=i,this.persist("namespaces",t),this.persist("optionalNamespaces",n)}validateChain(e){const[t,n]=(e==null?void 0:e.split(":"))||["",""];if(!this.namespaces||!Object.keys(this.namespaces).length)return[t,n];if(t&&!Object.keys(this.namespaces||{}).map(o=>l3(o)).includes(t))throw new Error(`Namespace '${t}' is not configured. Please call connect() first with namespace config.`);if(t&&n)return[t,n];const i=l3(Object.keys(this.namespaces)[0]),s=this.rpcProviders[i].getDefaultChain();return[i,s]}async requestAccounts(){const[e]=this.validateChain();return await this.getProvider(e).requestAccounts()}onChainChanged(e,t=!1){if(!this.namespaces)return;const[n,i]=this.validateChain(e);i&&(t||this.getProvider(n).setDefaultChain(i),this.namespaces[n]?this.namespaces[n].defaultChain=i:this.namespaces[`${n}:${i}`]?this.namespaces[`${n}:${i}`].defaultChain=i:this.namespaces[`${n}:${i}`]={defaultChain:i},this.persist("namespaces",this.namespaces),this.events.emit("chainChanged",i))}onConnect(){this.createProviders(),this.events.emit("connect",{session:this.session})}async cleanup(){this.session=void 0,this.namespaces=void 0,this.optionalNamespaces=void 0,this.sessionProperties=void 0,this.persist("namespaces",void 0),this.persist("optionalNamespaces",void 0),this.persist("sessionProperties",void 0),await this.cleanupPendingPairings({deletePairings:!0})}persist(e,t){this.client.core.storage.setItem(`${AD}/${e}`,t)}async getFromStore(e){return await this.client.core.storage.getItem(`${AD}/${e}`)}};const u6e=l6e,h6e="wc",d6e="ethereum_provider",f6e=`${h6e}@2:${d6e}:`,p6e="https://rpc.walletconnect.com/v1/",$C=["eth_sendTransaction","personal_sign"],kW=["eth_accounts","eth_requestAccounts","eth_sendRawTransaction","eth_sign","eth_signTransaction","eth_signTypedData","eth_signTypedData_v3","eth_signTypedData_v4","eth_sendTransaction","personal_sign","wallet_switchEthereumChain","wallet_addEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode","wallet_sendCalls","wallet_getCapabilities","wallet_getCallsStatus","wallet_showCallsStatus"],BC=["chainChanged","accountsChanged"],g6e=["chainChanged","accountsChanged","message","disconnect","connect"];var m6e=Object.defineProperty,w6e=Object.defineProperties,v6e=Object.getOwnPropertyDescriptors,MD=Object.getOwnPropertySymbols,y6e=Object.prototype.hasOwnProperty,b6e=Object.prototype.propertyIsEnumerable,DD=(r,e,t)=>e in r?m6e(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Tg=(r,e)=>{for(var t in e||(e={}))y6e.call(e,t)&&DD(r,t,e[t]);if(MD)for(var t of MD(e))b6e.call(e,t)&&DD(r,t,e[t]);return r},f7=(r,e)=>w6e(r,v6e(e));function p8(r){return Number(r[0].split(":")[1])}function Q5(r){return`0x${r.toString(16)}`}function _6e(r){const{chains:e,optionalChains:t,methods:n,optionalMethods:i,events:s,optionalEvents:o,rpcMap:a}=r;if(!Hu(e))throw new Error("Invalid chains");const c={chains:e,methods:n||$C,events:s||BC,rpcMap:Tg({},e.length?{[p8(e)]:a[p8(e)]}:{})},l=s==null?void 0:s.filter(y=>!BC.includes(y)),h=n==null?void 0:n.filter(y=>!$C.includes(y));if(!t&&!o&&!i&&!(l!=null&&l.length)&&!(h!=null&&h.length))return{required:e.length?c:void 0};const f=(l==null?void 0:l.length)&&(h==null?void 0:h.length)||!t,v={chains:[...new Set(f?c.chains.concat(t||[]):t)],methods:[...new Set(c.methods.concat(i!=null&&i.length?i:kW))],events:[...new Set(c.events.concat(o!=null&&o.length?o:g6e))],rpcMap:a};return{required:e.length?c:void 0,optional:t.length?v:void 0}}let x6e=class NW{constructor(){this.events=new mo.EventEmitter,this.namespace="eip155",this.accounts=[],this.chainId=1,this.STORAGE_KEY=f6e,this.on=(e,t)=>(this.events.on(e,t),this),this.once=(e,t)=>(this.events.once(e,t),this),this.removeListener=(e,t)=>(this.events.removeListener(e,t),this),this.off=(e,t)=>(this.events.off(e,t),this),this.parseAccount=e=>this.isCompatibleChainId(e)?this.parseAccountId(e).address:e,this.signer={},this.rpc={}}static async init(e){const t=new NW;return await t.initialize(e),t}async request(e,t){return await this.signer.request(e,this.formatChainId(this.chainId),t)}sendAsync(e,t,n){this.signer.sendAsync(e,t,this.formatChainId(this.chainId),n)}get connected(){return this.signer.client?this.signer.client.core.relayer.connected:!1}get connecting(){return this.signer.client?this.signer.client.core.relayer.connecting:!1}async enable(){return this.session||await this.connect(),await this.request({method:"eth_requestAccounts"})}async connect(e){if(!this.signer.client)throw new Error("Provider not initialized. Call init() first");this.loadConnectOpts(e);const{required:t,optional:n}=_6e(this.rpc);try{const i=await new Promise(async(o,a)=>{var c;this.rpc.showQrModal&&((c=this.modal)==null||c.subscribeModal(l=>{!l.open&&!this.signer.session&&(this.signer.abortPairingAttempt(),a(new Error("Connection request reset. Please try again.")))})),await this.signer.connect(f7(Tg({namespaces:Tg({},t&&{[this.namespace]:t})},n&&{optionalNamespaces:{[this.namespace]:n}}),{pairingTopic:e==null?void 0:e.pairingTopic})).then(l=>{o(l)}).catch(l=>{a(new Error(l.message))})});if(!i)return;const s=VO(i.namespaces,[this.namespace]);this.setChainIds(this.rpc.chains.length?this.rpc.chains:s),this.setAccounts(s),this.events.emit("connect",{chainId:Q5(this.chainId)})}catch(i){throw this.signer.logger.error(i),i}finally{this.modal&&this.modal.closeModal()}}async authenticate(e){if(!this.signer.client)throw new Error("Provider not initialized. Call init() first");this.loadConnectOpts({chains:e==null?void 0:e.chains});try{const t=await new Promise(async(i,s)=>{var o;this.rpc.showQrModal&&((o=this.modal)==null||o.subscribeModal(a=>{!a.open&&!this.signer.session&&(this.signer.abortPairingAttempt(),s(new Error("Connection request reset. Please try again.")))})),await this.signer.authenticate(f7(Tg({},e),{chains:this.rpc.chains})).then(a=>{i(a)}).catch(a=>{s(new Error(a.message))})}),n=t.session;if(n){const i=VO(n.namespaces,[this.namespace]);this.setChainIds(this.rpc.chains.length?this.rpc.chains:i),this.setAccounts(i),this.events.emit("connect",{chainId:Q5(this.chainId)})}return t}catch(t){throw this.signer.logger.error(t),t}finally{this.modal&&this.modal.closeModal()}}async disconnect(){this.session&&await this.signer.disconnect(),this.reset()}get isWalletConnect(){return!0}get session(){return this.signer.session}registerEventListeners(){this.signer.on("session_event",e=>{const{params:t}=e,{event:n}=t;n.name==="accountsChanged"?(this.accounts=this.parseAccounts(n.data),this.events.emit("accountsChanged",this.accounts)):n.name==="chainChanged"?this.setChainId(this.formatChainId(n.data)):this.events.emit(n.name,n.data),this.events.emit("session_event",e)}),this.signer.on("chainChanged",e=>{const t=parseInt(e);this.chainId=t,this.events.emit("chainChanged",Q5(this.chainId)),this.persist()}),this.signer.on("session_update",e=>{this.events.emit("session_update",e)}),this.signer.on("session_delete",e=>{this.reset(),this.events.emit("session_delete",e),this.events.emit("disconnect",f7(Tg({},pn("USER_DISCONNECTED")),{data:e.topic,name:"USER_DISCONNECTED"}))}),this.signer.on("display_uri",e=>{var t,n;this.rpc.showQrModal&&((t=this.modal)==null||t.closeModal(),(n=this.modal)==null||n.openModal({uri:e})),this.events.emit("display_uri",e)})}switchEthereumChain(e){this.request({method:"wallet_switchEthereumChain",params:[{chainId:e.toString(16)}]})}isCompatibleChainId(e){return typeof e=="string"?e.startsWith(`${this.namespace}:`):!1}formatChainId(e){return`${this.namespace}:${e}`}parseChainId(e){return Number(e.split(":")[1])}setChainIds(e){const t=e.filter(n=>this.isCompatibleChainId(n)).map(n=>this.parseChainId(n));t.length&&(this.chainId=t[0],this.events.emit("chainChanged",Q5(this.chainId)),this.persist())}setChainId(e){if(this.isCompatibleChainId(e)){const t=this.parseChainId(e);this.chainId=t,this.switchEthereumChain(t)}}parseAccountId(e){const[t,n,i]=e.split(":");return{chainId:`${t}:${n}`,address:i}}setAccounts(e){this.accounts=e.filter(t=>this.parseChainId(this.parseAccountId(t).chainId)===this.chainId).map(t=>this.parseAccountId(t).address),this.events.emit("accountsChanged",this.accounts)}getRpcConfig(e){var t,n;const i=(t=e==null?void 0:e.chains)!=null?t:[],s=(n=e==null?void 0:e.optionalChains)!=null?n:[],o=i.concat(s);if(!o.length)throw new Error("No chains specified in either `chains` or `optionalChains`");const a=i.length?(e==null?void 0:e.methods)||$C:[],c=i.length?(e==null?void 0:e.events)||BC:[],l=(e==null?void 0:e.optionalMethods)||[],h=(e==null?void 0:e.optionalEvents)||[],f=(e==null?void 0:e.rpcMap)||this.buildRpcMap(o,e.projectId),v=(e==null?void 0:e.qrModalOptions)||void 0;return{chains:i==null?void 0:i.map(y=>this.formatChainId(y)),optionalChains:s.map(y=>this.formatChainId(y)),methods:a,events:c,optionalMethods:l,optionalEvents:h,rpcMap:f,showQrModal:!!(e!=null&&e.showQrModal),qrModalOptions:v,projectId:e.projectId,metadata:e.metadata}}buildRpcMap(e,t){const n={};return e.forEach(i=>{n[i]=this.getRpcUrl(i,t)}),n}async initialize(e){if(this.rpc=this.getRpcConfig(e),this.chainId=this.rpc.chains.length?p8(this.rpc.chains):p8(this.rpc.optionalChains),this.signer=await u6e.init({projectId:this.rpc.projectId,metadata:this.rpc.metadata,disableProviderPing:e.disableProviderPing,relayUrl:e.relayUrl,storageOptions:e.storageOptions}),this.registerEventListeners(),await this.loadPersistedSession(),this.rpc.showQrModal){let t;try{const{WalletConnectModal:n}=await lc(()=>import("./index-CYoDjwKk.js").then(i=>i.i),[]);t=n}catch{throw new Error("To use QR modal, please install @walletconnect/modal package")}if(t)try{this.modal=new t(Tg({projectId:this.rpc.projectId},this.rpc.qrModalOptions))}catch(n){throw this.signer.logger.error(n),new Error("Could not generate WalletConnectModal Instance")}}}loadConnectOpts(e){if(!e)return;const{chains:t,optionalChains:n,rpcMap:i}=e;t&&Hu(t)&&(this.rpc.chains=t.map(s=>this.formatChainId(s)),t.forEach(s=>{this.rpc.rpcMap[s]=(i==null?void 0:i[s])||this.getRpcUrl(s)})),n&&Hu(n)&&(this.rpc.optionalChains=[],this.rpc.optionalChains=n==null?void 0:n.map(s=>this.formatChainId(s)),n.forEach(s=>{this.rpc.rpcMap[s]=(i==null?void 0:i[s])||this.getRpcUrl(s)}))}getRpcUrl(e,t){var n;return((n=this.rpc.rpcMap)==null?void 0:n[e])||`${p6e}?chainId=eip155:${e}&projectId=${t||this.rpc.projectId}`}async loadPersistedSession(){if(this.session)try{const e=await this.signer.client.core.storage.getItem(`${this.STORAGE_KEY}/chainId`),t=this.session.namespaces[`${this.namespace}:${e}`]?this.session.namespaces[`${this.namespace}:${e}`]:this.session.namespaces[this.namespace];this.setChainIds(e?[this.formatChainId(e)]:t==null?void 0:t.accounts),this.setAccounts(t==null?void 0:t.accounts)}catch(e){this.signer.logger.error("Failed to load persisted session, clearing state..."),this.signer.logger.error(e),await this.disconnect().catch(t=>this.signer.logger.warn(t))}}reset(){this.chainId=1,this.accounts=[]}persist(){this.session&&this.signer.client.core.storage.setItem(`${this.STORAGE_KEY}/chainId`,this.chainId)}parseAccounts(e){return typeof e=="string"||e instanceof String?[this.parseAccount(e)]:e.map(t=>this.parseAccount(t))}};const PW=":";function A6e(r){const{namespace:e,reference:t}=r;return[e,t].join(PW)}function E6e(r){const[e,t,n]=r.split(PW);return{namespace:e,reference:t,address:n}}function C6e(r,e){const t=[];return r.forEach(n=>{const i=e(n);t.includes(i)||t.push(i)}),t}function S6e(r){const{namespace:e,reference:t}=E6e(r);return A6e({namespace:e,reference:t})}function I6e(r){return C6e(r,S6e)}var OW=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function T6e(r){var e=r.default;if(typeof e=="function"){var t=function(){return e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(r).forEach(function(n){var i=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return r[n]}})}),t}var R6e={exports:{}};/** * [js-sha3]{@link https://github.com/emn178/js-sha3} * * @version 0.8.0 * @author Chen, Yi-Cyuan [emn178@gmail.com] * @copyright Chen, Yi-Cyuan 2015-2018 * @license MIT -*/(function(r){(function(){var e="input is invalid type",t="finalize already called",n=typeof window=="object",i=n?window:{};i.JS_SHA3_NO_WINDOW&&(n=!1);var s=!n&&typeof self=="object",o=!i.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;o?i=OW:s&&(i=self);var a=!i.JS_SHA3_NO_COMMON_JS&&!0&&r.exports,c=!i.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",l="0123456789abcdef".split(""),h=[31,7936,2031616,520093696],f=[4,1024,262144,67108864],v=[1,256,65536,16777216],y=[6,1536,393216,100663296],A=[0,8,16,24],M=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],$=[224,256,384,512],L=[128,256],P=["hex","buffer","arrayBuffer","array","digest"],H={128:168,256:136};(i.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(x){return Object.prototype.toString.call(x)==="[object Array]"}),c&&(i.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(x){return typeof x=="object"&&x.buffer&&x.buffer.constructor===ArrayBuffer});for(var F=function(x,Z,k){return function(W){return new O(x,Z,x).update(W)[k]()}},q=function(x,Z,k){return function(W,J){return new O(x,Z,J).update(W)[k]()}},Y=function(x,Z,k){return function(W,J,S,D){return g["cshake"+x].update(W,J,S,D)[k]()}},I=function(x,Z,k){return function(W,J,S,D){return g["kmac"+x].update(W,J,S,D)[k]()}},T=function(x,Z,k,W){for(var J=0;J>5,this.byteCount=this.blockCount<<2,this.outputBlocks=k>>5,this.extraBytes=(k&31)>>3;for(var W=0;W<50;++W)this.s[W]=0}O.prototype.update=function(x){if(this.finalized)throw new Error(t);var Z,k=typeof x;if(k!=="string"){if(k==="object"){if(x===null)throw new Error(e);if(c&&x.constructor===ArrayBuffer)x=new Uint8Array(x);else if(!Array.isArray(x)&&(!c||!ArrayBuffer.isView(x)))throw new Error(e)}else throw new Error(e);Z=!0}for(var W=this.blocks,J=this.byteCount,S=x.length,D=this.blockCount,G=0,z=this.s,K,ue;G>2]|=x[G]<>2]|=ue<>2]|=(192|ue>>6)<>2]|=(128|ue&63)<=57344?(W[K>>2]|=(224|ue>>12)<>2]|=(128|ue>>6&63)<>2]|=(128|ue&63)<>2]|=(240|ue>>18)<>2]|=(128|ue>>12&63)<>2]|=(128|ue>>6&63)<>2]|=(128|ue&63)<=J){for(this.start=K-J,this.block=W[D],K=0;K>8,k=x&255;k>0;)J.unshift(k),x=x>>8,k=x&255,++W;return Z?J.push(W):J.unshift(W),this.update(J),J.length},O.prototype.encodeString=function(x){var Z,k=typeof x;if(k!=="string"){if(k==="object"){if(x===null)throw new Error(e);if(c&&x.constructor===ArrayBuffer)x=new Uint8Array(x);else if(!Array.isArray(x)&&(!c||!ArrayBuffer.isView(x)))throw new Error(e)}else throw new Error(e);Z=!0}var W=0,J=x.length;if(Z)W=J;else for(var S=0;S=57344?W+=3:(D=65536+((D&1023)<<10|x.charCodeAt(++S)&1023),W+=4)}return W+=this.encode(W*8),this.update(x),W},O.prototype.bytepad=function(x,Z){for(var k=this.encode(Z),W=0;W>2]|=this.padding[Z&3],this.lastByteIndex===this.byteCount)for(x[0]=x[k],Z=1;Z>4&15]+l[G&15]+l[G>>12&15]+l[G>>8&15]+l[G>>20&15]+l[G>>16&15]+l[G>>28&15]+l[G>>24&15];S%x===0&&(be(Z),J=0)}return W&&(G=Z[J],D+=l[G>>4&15]+l[G&15],W>1&&(D+=l[G>>12&15]+l[G>>8&15]),W>2&&(D+=l[G>>20&15]+l[G>>16&15])),D},O.prototype.arrayBuffer=function(){this.finalize();var x=this.blockCount,Z=this.s,k=this.outputBlocks,W=this.extraBytes,J=0,S=0,D=this.outputBits>>3,G;W?G=new ArrayBuffer(k+1<<2):G=new ArrayBuffer(D);for(var z=new Uint32Array(G);S>8&255,D[G+2]=z>>16&255,D[G+3]=z>>24&255;S%x===0&&be(Z)}return W&&(G=S<<2,z=Z[J],D[G]=z&255,W>1&&(D[G+1]=z>>8&255),W>2&&(D[G+2]=z>>16&255)),D};function pe(x,Z,k){O.call(this,x,Z,k)}pe.prototype=new O,pe.prototype.finalize=function(){return this.encode(this.outputBits,!0),O.prototype.finalize.call(this)};var be=function(x){var Z,k,W,J,S,D,G,z,K,ue,ye,we,je,Me,Ie,Be,xe,$e,We,Ne,Ue,X,N,U,ie,le,me,Ee,ze,qe,St,Je,nt,jr,jt,Ht,bn,pt,ht,yr,gt,ft,ur,_t,xt,br,At,mt,Er,wt,lt,Ir,Et,Gt,Vn,Zt,Pt,Nn,Pn,On,Mn,Dn,tn;for(W=0;W<48;W+=2)J=x[0]^x[10]^x[20]^x[30]^x[40],S=x[1]^x[11]^x[21]^x[31]^x[41],D=x[2]^x[12]^x[22]^x[32]^x[42],G=x[3]^x[13]^x[23]^x[33]^x[43],z=x[4]^x[14]^x[24]^x[34]^x[44],K=x[5]^x[15]^x[25]^x[35]^x[45],ue=x[6]^x[16]^x[26]^x[36]^x[46],ye=x[7]^x[17]^x[27]^x[37]^x[47],we=x[8]^x[18]^x[28]^x[38]^x[48],je=x[9]^x[19]^x[29]^x[39]^x[49],Z=we^(D<<1|G>>>31),k=je^(G<<1|D>>>31),x[0]^=Z,x[1]^=k,x[10]^=Z,x[11]^=k,x[20]^=Z,x[21]^=k,x[30]^=Z,x[31]^=k,x[40]^=Z,x[41]^=k,Z=J^(z<<1|K>>>31),k=S^(K<<1|z>>>31),x[2]^=Z,x[3]^=k,x[12]^=Z,x[13]^=k,x[22]^=Z,x[23]^=k,x[32]^=Z,x[33]^=k,x[42]^=Z,x[43]^=k,Z=D^(ue<<1|ye>>>31),k=G^(ye<<1|ue>>>31),x[4]^=Z,x[5]^=k,x[14]^=Z,x[15]^=k,x[24]^=Z,x[25]^=k,x[34]^=Z,x[35]^=k,x[44]^=Z,x[45]^=k,Z=z^(we<<1|je>>>31),k=K^(je<<1|we>>>31),x[6]^=Z,x[7]^=k,x[16]^=Z,x[17]^=k,x[26]^=Z,x[27]^=k,x[36]^=Z,x[37]^=k,x[46]^=Z,x[47]^=k,Z=ue^(J<<1|S>>>31),k=ye^(S<<1|J>>>31),x[8]^=Z,x[9]^=k,x[18]^=Z,x[19]^=k,x[28]^=Z,x[29]^=k,x[38]^=Z,x[39]^=k,x[48]^=Z,x[49]^=k,Me=x[0],Ie=x[1],br=x[11]<<4|x[10]>>>28,At=x[10]<<4|x[11]>>>28,Ee=x[20]<<3|x[21]>>>29,ze=x[21]<<3|x[20]>>>29,On=x[31]<<9|x[30]>>>23,Mn=x[30]<<9|x[31]>>>23,ft=x[40]<<18|x[41]>>>14,ur=x[41]<<18|x[40]>>>14,jr=x[2]<<1|x[3]>>>31,jt=x[3]<<1|x[2]>>>31,Be=x[13]<<12|x[12]>>>20,xe=x[12]<<12|x[13]>>>20,mt=x[22]<<10|x[23]>>>22,Er=x[23]<<10|x[22]>>>22,qe=x[33]<<13|x[32]>>>19,St=x[32]<<13|x[33]>>>19,Dn=x[42]<<2|x[43]>>>30,tn=x[43]<<2|x[42]>>>30,Gt=x[5]<<30|x[4]>>>2,Vn=x[4]<<30|x[5]>>>2,Ht=x[14]<<6|x[15]>>>26,bn=x[15]<<6|x[14]>>>26,$e=x[25]<<11|x[24]>>>21,We=x[24]<<11|x[25]>>>21,wt=x[34]<<15|x[35]>>>17,lt=x[35]<<15|x[34]>>>17,Je=x[45]<<29|x[44]>>>3,nt=x[44]<<29|x[45]>>>3,U=x[6]<<28|x[7]>>>4,ie=x[7]<<28|x[6]>>>4,Zt=x[17]<<23|x[16]>>>9,Pt=x[16]<<23|x[17]>>>9,pt=x[26]<<25|x[27]>>>7,ht=x[27]<<25|x[26]>>>7,Ne=x[36]<<21|x[37]>>>11,Ue=x[37]<<21|x[36]>>>11,Ir=x[47]<<24|x[46]>>>8,Et=x[46]<<24|x[47]>>>8,_t=x[8]<<27|x[9]>>>5,xt=x[9]<<27|x[8]>>>5,le=x[18]<<20|x[19]>>>12,me=x[19]<<20|x[18]>>>12,Nn=x[29]<<7|x[28]>>>25,Pn=x[28]<<7|x[29]>>>25,yr=x[38]<<8|x[39]>>>24,gt=x[39]<<8|x[38]>>>24,X=x[48]<<14|x[49]>>>18,N=x[49]<<14|x[48]>>>18,x[0]=Me^~Be&$e,x[1]=Ie^~xe&We,x[10]=U^~le&Ee,x[11]=ie^~me&ze,x[20]=jr^~Ht&pt,x[21]=jt^~bn&ht,x[30]=_t^~br&mt,x[31]=xt^~At&Er,x[40]=Gt^~Zt&Nn,x[41]=Vn^~Pt&Pn,x[2]=Be^~$e&Ne,x[3]=xe^~We&Ue,x[12]=le^~Ee&qe,x[13]=me^~ze&St,x[22]=Ht^~pt&yr,x[23]=bn^~ht>,x[32]=br^~mt&wt,x[33]=At^~Er<,x[42]=Zt^~Nn&On,x[43]=Pt^~Pn&Mn,x[4]=$e^~Ne&X,x[5]=We^~Ue&N,x[14]=Ee^~qe&Je,x[15]=ze^~St&nt,x[24]=pt^~yr&ft,x[25]=ht^~gt&ur,x[34]=mt^~wt&Ir,x[35]=Er^~lt&Et,x[44]=Nn^~On&Dn,x[45]=Pn^~Mn&tn,x[6]=Ne^~X&Me,x[7]=Ue^~N&Ie,x[16]=qe^~Je&U,x[17]=St^~nt&ie,x[26]=yr^~ft&jr,x[27]=gt^~ur&jt,x[36]=wt^~Ir&_t,x[37]=lt^~Et&xt,x[46]=On^~Dn&Gt,x[47]=Mn^~tn&Vn,x[8]=X^~Me&Be,x[9]=N^~Ie&xe,x[18]=Je^~U&le,x[19]=nt^~ie&me,x[28]=ft^~jr&Ht,x[29]=ur^~jt&bn,x[38]=Ir^~_t&br,x[39]=Et^~xt&At,x[48]=Dn^~Gt&Zt,x[49]=tn^~Vn&Pt,x[0]^=M[W],x[1]^=M[W+1]};if(a)r.exports=g;else for(b=0;b{try{if("test".normalize(e)!=="test")throw new Error("bad normalize")}catch{r.push(e)}}),r.length)throw new Error("missing "+r.join(", "));if("é".normalize("NFD")!=="é")throw new Error("broken implementation")}catch(r){return r.message}return null}const UD=N6e();var LC;(function(r){r.DEBUG="DEBUG",r.INFO="INFO",r.WARNING="WARNING",r.ERROR="ERROR",r.OFF="OFF"})(LC||(LC={}));var Fc;(function(r){r.UNKNOWN_ERROR="UNKNOWN_ERROR",r.NOT_IMPLEMENTED="NOT_IMPLEMENTED",r.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",r.NETWORK_ERROR="NETWORK_ERROR",r.SERVER_ERROR="SERVER_ERROR",r.TIMEOUT="TIMEOUT",r.BUFFER_OVERRUN="BUFFER_OVERRUN",r.NUMERIC_FAULT="NUMERIC_FAULT",r.MISSING_NEW="MISSING_NEW",r.INVALID_ARGUMENT="INVALID_ARGUMENT",r.MISSING_ARGUMENT="MISSING_ARGUMENT",r.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",r.CALL_EXCEPTION="CALL_EXCEPTION",r.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",r.NONCE_EXPIRED="NONCE_EXPIRED",r.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",r.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",r.TRANSACTION_REPLACED="TRANSACTION_REPLACED",r.ACTION_REJECTED="ACTION_REJECTED"})(Fc||(Fc={}));const FD="0123456789abcdef";let Lo=class Ni{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){const n=e.toLowerCase();U4[n]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(LD>U4[n])&&console.log.apply(console,t)}debug(...e){this._log(Ni.levels.DEBUG,e)}info(...e){this._log(Ni.levels.INFO,e)}warn(...e){this._log(Ni.levels.WARNING,e)}makeError(e,t,n){if(BD)return this.makeError("censored error",t,{});t||(t=Ni.errors.UNKNOWN_ERROR),n||(n={});const i=[];Object.keys(n).forEach(c=>{const l=n[c];try{if(l instanceof Uint8Array){let h="";for(let f=0;f>4],h+=FD[l[f]&15];i.push(c+"=Uint8Array(0x"+h+")")}else i.push(c+"="+JSON.stringify(l))}catch{i.push(c+"="+JSON.stringify(n[c].toString()))}}),i.push(`code=${t}`),i.push(`version=${this.version}`);const s=e;let o="";switch(t){case Fc.NUMERIC_FAULT:{o="NUMERIC_FAULT";const c=e;switch(c){case"overflow":case"underflow":case"division-by-zero":o+="-"+c;break;case"negative-power":case"negative-width":o+="-unsupported";break;case"unbound-bitwise-result":o+="-unbound-result";break}break}case Fc.CALL_EXCEPTION:case Fc.INSUFFICIENT_FUNDS:case Fc.MISSING_NEW:case Fc.NONCE_EXPIRED:case Fc.REPLACEMENT_UNDERPRICED:case Fc.TRANSACTION_REPLACED:case Fc.UNPREDICTABLE_GAS_LIMIT:o=t;break}o&&(e+=" [ See: https://links.ethers.org/v5-errors-"+o+" ]"),i.length&&(e+=" ("+i.join(", ")+")");const a=new Error(e);return a.reason=s,a.code=t,Object.keys(n).forEach(function(c){a[c]=n[c]}),a}throwError(e,t,n){throw this.makeError(e,t,n)}throwArgumentError(e,t,n){return this.throwError(e,Ni.errors.INVALID_ARGUMENT,{argument:t,value:n})}assert(e,t,n,i){e||this.throwError(t,n,i)}assertArgument(e,t,n,i){e||this.throwArgumentError(t,n,i)}checkNormalize(e){UD&&this.throwError("platform missing String.prototype.normalize",Ni.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:UD})}checkSafeUint53(e,t){typeof e=="number"&&(t==null&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,Ni.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,Ni.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,n){n?n=": "+n:n="",et&&this.throwError("too many arguments"+n,Ni.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){(e===Object||e==null)&&this.throwError("missing new",Ni.errors.MISSING_NEW,{name:t.name})}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",Ni.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",Ni.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return p7||(p7=new Ni(k6e)),p7}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",Ni.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),$D){if(!e)return;this.globalLogger().throwError("error censorship permanent",Ni.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}BD=!!e,$D=!!t}static setLogLevel(e){const t=U4[e.toLowerCase()];if(t==null){Ni.globalLogger().warn("invalid log level - "+e);return}LD=t}static from(e){return new Ni(e)}};Lo.errors=Fc,Lo.levels=LC;const P6e="bytes/5.7.0",$f=new Lo(P6e);function MW(r){return!!r.toHexString}function F4(r){return r.slice||(r.slice=function(){const e=Array.prototype.slice.call(arguments);return F4(new Uint8Array(Array.prototype.slice.apply(r,e)))}),r}function jD(r){return typeof r=="number"&&r==r&&r%1===0}function ob(r){if(r==null)return!1;if(r.constructor===Uint8Array)return!0;if(typeof r=="string"||!jD(r.length)||r.length<0)return!1;for(let e=0;e=256)return!1}return!0}function DW(r,e){if(e||(e={}),typeof r=="number"){$f.checkSafeUint53(r,"invalid arrayify value");const t=[];for(;r;)t.unshift(r&255),r=parseInt(String(r/256));return t.length===0&&t.push(0),F4(new Uint8Array(t))}if(e.allowMissingPrefix&&typeof r=="string"&&r.substring(0,2)!=="0x"&&(r="0x"+r),MW(r)&&(r=r.toHexString()),kw(r)){let t=r.substring(2);t.length%2&&(e.hexPad==="left"?t="0"+t:e.hexPad==="right"?t+="0":$f.throwArgumentError("hex data is odd-length","value",r));const n=[];for(let i=0;i>4]+g7[i&15]}return t}return $f.throwArgumentError("invalid hexlify value","value",r)}function g8(r,e){for(typeof r!="string"?r=$W(r):kw(r)||$f.throwArgumentError("invalid hex string","value",r),r.length>2*e+2&&$f.throwArgumentError("value out of range","value",arguments[1]);r.length<2*e+2;)r="0x0"+r.substring(2);return r}var BW={exports:{}},O6e={},M6e=Object.freeze({__proto__:null,default:O6e}),D6e=T6e(M6e);(function(r){(function(e,t){function n(d,g){if(!d)throw new Error(g||"Assertion failed")}function i(d,g){d.super_=g;var m=function(){};m.prototype=g.prototype,d.prototype=new m,d.prototype.constructor=d}function s(d,g,m){if(s.isBN(d))return d;this.negative=0,this.words=null,this.length=0,this.red=null,d!==null&&((g==="le"||g==="be")&&(m=g,g=10),this._init(d||0,g||10,m||"be"))}typeof e=="object"?e.exports=s:t.BN=s,s.BN=s,s.wordSize=26;var o;try{typeof window<"u"&&typeof window.Buffer<"u"?o=window.Buffer:o=D6e.Buffer}catch{}s.isBN=function(d){return d instanceof s?!0:d!==null&&typeof d=="object"&&d.constructor.wordSize===s.wordSize&&Array.isArray(d.words)},s.max=function(d,g){return d.cmp(g)>0?d:g},s.min=function(d,g){return d.cmp(g)<0?d:g},s.prototype._init=function(d,g,m){if(typeof d=="number")return this._initNumber(d,g,m);if(typeof d=="object")return this._initArray(d,g,m);g==="hex"&&(g=16),n(g===(g|0)&&g>=2&&g<=36),d=d.toString().replace(/\s+/g,"");var b=0;d[0]==="-"&&(b++,this.negative=1),b=0;b-=3)C=d[b]|d[b-1]<<8|d[b-2]<<16,this.words[E]|=C<>>26-B&67108863,B+=24,B>=26&&(B-=26,E++);else if(m==="le")for(b=0,E=0;b>>26-B&67108863,B+=24,B>=26&&(B-=26,E++);return this._strip()};function a(d,g){var m=d.charCodeAt(g);if(m>=48&&m<=57)return m-48;if(m>=65&&m<=70)return m-55;if(m>=97&&m<=102)return m-87;n(!1,"Invalid character in "+d)}function c(d,g,m){var b=a(d,m);return m-1>=g&&(b|=a(d,m-1)<<4),b}s.prototype._parseHex=function(d,g,m){this.length=Math.ceil((d.length-g)/6),this.words=new Array(this.length);for(var b=0;b=g;b-=2)B=c(d,g,b)<=18?(E-=18,C+=1,this.words[C]|=B>>>26):E+=8;else{var R=d.length-g;for(b=R%2===0?g+1:g;b=18?(E-=18,C+=1,this.words[C]|=B>>>26):E+=8}this._strip()};function l(d,g,m,b){for(var E=0,C=0,B=Math.min(d.length,m),R=g;R=49?C=w-49+10:w>=17?C=w-17+10:C=w,n(w>=0&&C1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},s.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{s.prototype[Symbol.for("nodejs.util.inspect.custom")]=f}catch{s.prototype.inspect=f}else s.prototype.inspect=f;function f(){return(this.red?""}var v=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],y=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],A=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];s.prototype.toString=function(d,g){d=d||10,g=g|0||1;var m;if(d===16||d==="hex"){m="";for(var b=0,E=0,C=0;C>>24-b&16777215,b+=2,b>=26&&(b-=26,C--),E!==0||C!==this.length-1?m=v[6-R.length]+R+m:m=R+m}for(E!==0&&(m=E.toString(16)+m);m.length%g!==0;)m="0"+m;return this.negative!==0&&(m="-"+m),m}if(d===(d|0)&&d>=2&&d<=36){var w=y[d],O=A[d];m="";var pe=this.clone();for(pe.negative=0;!pe.isZero();){var be=pe.modrn(O).toString(d);pe=pe.idivn(O),pe.isZero()?m=be+m:m=v[w-be.length]+be+m}for(this.isZero()&&(m="0"+m);m.length%g!==0;)m="0"+m;return this.negative!==0&&(m="-"+m),m}n(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var d=this.words[0];return this.length===2?d+=this.words[1]*67108864:this.length===3&&this.words[2]===1?d+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-d:d},s.prototype.toJSON=function(){return this.toString(16,2)},o&&(s.prototype.toBuffer=function(d,g){return this.toArrayLike(o,d,g)}),s.prototype.toArray=function(d,g){return this.toArrayLike(Array,d,g)};var M=function(d,g){return d.allocUnsafe?d.allocUnsafe(g):new d(g)};s.prototype.toArrayLike=function(d,g,m){this._strip();var b=this.byteLength(),E=m||Math.max(1,b);n(b<=E,"byte array longer than desired length"),n(E>0,"Requested array length <= 0");var C=M(d,E),B=g==="le"?"LE":"BE";return this["_toArrayLike"+B](C,b),C},s.prototype._toArrayLikeLE=function(d,g){for(var m=0,b=0,E=0,C=0;E>8&255),m>16&255),C===6?(m>24&255),b=0,C=0):(b=B>>>24,C+=2)}if(m=0&&(d[m--]=B>>8&255),m>=0&&(d[m--]=B>>16&255),C===6?(m>=0&&(d[m--]=B>>24&255),b=0,C=0):(b=B>>>24,C+=2)}if(m>=0)for(d[m--]=b;m>=0;)d[m--]=0},Math.clz32?s.prototype._countBits=function(d){return 32-Math.clz32(d)}:s.prototype._countBits=function(d){var g=d,m=0;return g>=4096&&(m+=13,g>>>=13),g>=64&&(m+=7,g>>>=7),g>=8&&(m+=4,g>>>=4),g>=2&&(m+=2,g>>>=2),m+g},s.prototype._zeroBits=function(d){if(d===0)return 26;var g=d,m=0;return g&8191||(m+=13,g>>>=13),g&127||(m+=7,g>>>=7),g&15||(m+=4,g>>>=4),g&3||(m+=2,g>>>=2),g&1||m++,m},s.prototype.bitLength=function(){var d=this.words[this.length-1],g=this._countBits(d);return(this.length-1)*26+g};function $(d){for(var g=new Array(d.bitLength()),m=0;m>>E&1}return g}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var d=0,g=0;gd.length?this.clone().ior(d):d.clone().ior(this)},s.prototype.uor=function(d){return this.length>d.length?this.clone().iuor(d):d.clone().iuor(this)},s.prototype.iuand=function(d){var g;this.length>d.length?g=d:g=this;for(var m=0;md.length?this.clone().iand(d):d.clone().iand(this)},s.prototype.uand=function(d){return this.length>d.length?this.clone().iuand(d):d.clone().iuand(this)},s.prototype.iuxor=function(d){var g,m;this.length>d.length?(g=this,m=d):(g=d,m=this);for(var b=0;bd.length?this.clone().ixor(d):d.clone().ixor(this)},s.prototype.uxor=function(d){return this.length>d.length?this.clone().iuxor(d):d.clone().iuxor(this)},s.prototype.inotn=function(d){n(typeof d=="number"&&d>=0);var g=Math.ceil(d/26)|0,m=d%26;this._expand(g),m>0&&g--;for(var b=0;b0&&(this.words[b]=~this.words[b]&67108863>>26-m),this._strip()},s.prototype.notn=function(d){return this.clone().inotn(d)},s.prototype.setn=function(d,g){n(typeof d=="number"&&d>=0);var m=d/26|0,b=d%26;return this._expand(m+1),g?this.words[m]=this.words[m]|1<d.length?(m=this,b=d):(m=d,b=this);for(var E=0,C=0;C>>26;for(;E!==0&&C>>26;if(this.length=m.length,E!==0)this.words[this.length]=E,this.length++;else if(m!==this)for(;Cd.length?this.clone().iadd(d):d.clone().iadd(this)},s.prototype.isub=function(d){if(d.negative!==0){d.negative=0;var g=this.iadd(d);return d.negative=1,g._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(d),this.negative=1,this._normSign();var m=this.cmp(d);if(m===0)return this.negative=0,this.length=1,this.words[0]=0,this;var b,E;m>0?(b=this,E=d):(b=d,E=this);for(var C=0,B=0;B>26,this.words[B]=g&67108863;for(;C!==0&&B>26,this.words[B]=g&67108863;if(C===0&&B>>26,be=w&67108863,x=Math.min(O,g.length-1),Z=Math.max(0,O-d.length+1);Z<=x;Z++){var k=O-Z|0;E=d.words[k]|0,C=g.words[Z]|0,B=E*C+be,pe+=B/67108864|0,be=B&67108863}m.words[O]=be|0,w=pe|0}return w!==0?m.words[O]=w|0:m.length--,m._strip()}var P=function(d,g,m){var b=d.words,E=g.words,C=m.words,B=0,R,w,O,pe=b[0]|0,be=pe&8191,x=pe>>>13,Z=b[1]|0,k=Z&8191,W=Z>>>13,J=b[2]|0,S=J&8191,D=J>>>13,G=b[3]|0,z=G&8191,K=G>>>13,ue=b[4]|0,ye=ue&8191,we=ue>>>13,je=b[5]|0,Me=je&8191,Ie=je>>>13,Be=b[6]|0,xe=Be&8191,$e=Be>>>13,We=b[7]|0,Ne=We&8191,Ue=We>>>13,X=b[8]|0,N=X&8191,U=X>>>13,ie=b[9]|0,le=ie&8191,me=ie>>>13,Ee=E[0]|0,ze=Ee&8191,qe=Ee>>>13,St=E[1]|0,Je=St&8191,nt=St>>>13,jr=E[2]|0,jt=jr&8191,Ht=jr>>>13,bn=E[3]|0,pt=bn&8191,ht=bn>>>13,yr=E[4]|0,gt=yr&8191,ft=yr>>>13,ur=E[5]|0,_t=ur&8191,xt=ur>>>13,br=E[6]|0,At=br&8191,mt=br>>>13,Er=E[7]|0,wt=Er&8191,lt=Er>>>13,Ir=E[8]|0,Et=Ir&8191,Gt=Ir>>>13,Vn=E[9]|0,Zt=Vn&8191,Pt=Vn>>>13;m.negative=d.negative^g.negative,m.length=19,R=Math.imul(be,ze),w=Math.imul(be,qe),w=w+Math.imul(x,ze)|0,O=Math.imul(x,qe);var Nn=(B+R|0)+((w&8191)<<13)|0;B=(O+(w>>>13)|0)+(Nn>>>26)|0,Nn&=67108863,R=Math.imul(k,ze),w=Math.imul(k,qe),w=w+Math.imul(W,ze)|0,O=Math.imul(W,qe),R=R+Math.imul(be,Je)|0,w=w+Math.imul(be,nt)|0,w=w+Math.imul(x,Je)|0,O=O+Math.imul(x,nt)|0;var Pn=(B+R|0)+((w&8191)<<13)|0;B=(O+(w>>>13)|0)+(Pn>>>26)|0,Pn&=67108863,R=Math.imul(S,ze),w=Math.imul(S,qe),w=w+Math.imul(D,ze)|0,O=Math.imul(D,qe),R=R+Math.imul(k,Je)|0,w=w+Math.imul(k,nt)|0,w=w+Math.imul(W,Je)|0,O=O+Math.imul(W,nt)|0,R=R+Math.imul(be,jt)|0,w=w+Math.imul(be,Ht)|0,w=w+Math.imul(x,jt)|0,O=O+Math.imul(x,Ht)|0;var On=(B+R|0)+((w&8191)<<13)|0;B=(O+(w>>>13)|0)+(On>>>26)|0,On&=67108863,R=Math.imul(z,ze),w=Math.imul(z,qe),w=w+Math.imul(K,ze)|0,O=Math.imul(K,qe),R=R+Math.imul(S,Je)|0,w=w+Math.imul(S,nt)|0,w=w+Math.imul(D,Je)|0,O=O+Math.imul(D,nt)|0,R=R+Math.imul(k,jt)|0,w=w+Math.imul(k,Ht)|0,w=w+Math.imul(W,jt)|0,O=O+Math.imul(W,Ht)|0,R=R+Math.imul(be,pt)|0,w=w+Math.imul(be,ht)|0,w=w+Math.imul(x,pt)|0,O=O+Math.imul(x,ht)|0;var Mn=(B+R|0)+((w&8191)<<13)|0;B=(O+(w>>>13)|0)+(Mn>>>26)|0,Mn&=67108863,R=Math.imul(ye,ze),w=Math.imul(ye,qe),w=w+Math.imul(we,ze)|0,O=Math.imul(we,qe),R=R+Math.imul(z,Je)|0,w=w+Math.imul(z,nt)|0,w=w+Math.imul(K,Je)|0,O=O+Math.imul(K,nt)|0,R=R+Math.imul(S,jt)|0,w=w+Math.imul(S,Ht)|0,w=w+Math.imul(D,jt)|0,O=O+Math.imul(D,Ht)|0,R=R+Math.imul(k,pt)|0,w=w+Math.imul(k,ht)|0,w=w+Math.imul(W,pt)|0,O=O+Math.imul(W,ht)|0,R=R+Math.imul(be,gt)|0,w=w+Math.imul(be,ft)|0,w=w+Math.imul(x,gt)|0,O=O+Math.imul(x,ft)|0;var Dn=(B+R|0)+((w&8191)<<13)|0;B=(O+(w>>>13)|0)+(Dn>>>26)|0,Dn&=67108863,R=Math.imul(Me,ze),w=Math.imul(Me,qe),w=w+Math.imul(Ie,ze)|0,O=Math.imul(Ie,qe),R=R+Math.imul(ye,Je)|0,w=w+Math.imul(ye,nt)|0,w=w+Math.imul(we,Je)|0,O=O+Math.imul(we,nt)|0,R=R+Math.imul(z,jt)|0,w=w+Math.imul(z,Ht)|0,w=w+Math.imul(K,jt)|0,O=O+Math.imul(K,Ht)|0,R=R+Math.imul(S,pt)|0,w=w+Math.imul(S,ht)|0,w=w+Math.imul(D,pt)|0,O=O+Math.imul(D,ht)|0,R=R+Math.imul(k,gt)|0,w=w+Math.imul(k,ft)|0,w=w+Math.imul(W,gt)|0,O=O+Math.imul(W,ft)|0,R=R+Math.imul(be,_t)|0,w=w+Math.imul(be,xt)|0,w=w+Math.imul(x,_t)|0,O=O+Math.imul(x,xt)|0;var tn=(B+R|0)+((w&8191)<<13)|0;B=(O+(w>>>13)|0)+(tn>>>26)|0,tn&=67108863,R=Math.imul(xe,ze),w=Math.imul(xe,qe),w=w+Math.imul($e,ze)|0,O=Math.imul($e,qe),R=R+Math.imul(Me,Je)|0,w=w+Math.imul(Me,nt)|0,w=w+Math.imul(Ie,Je)|0,O=O+Math.imul(Ie,nt)|0,R=R+Math.imul(ye,jt)|0,w=w+Math.imul(ye,Ht)|0,w=w+Math.imul(we,jt)|0,O=O+Math.imul(we,Ht)|0,R=R+Math.imul(z,pt)|0,w=w+Math.imul(z,ht)|0,w=w+Math.imul(K,pt)|0,O=O+Math.imul(K,ht)|0,R=R+Math.imul(S,gt)|0,w=w+Math.imul(S,ft)|0,w=w+Math.imul(D,gt)|0,O=O+Math.imul(D,ft)|0,R=R+Math.imul(k,_t)|0,w=w+Math.imul(k,xt)|0,w=w+Math.imul(W,_t)|0,O=O+Math.imul(W,xt)|0,R=R+Math.imul(be,At)|0,w=w+Math.imul(be,mt)|0,w=w+Math.imul(x,At)|0,O=O+Math.imul(x,mt)|0;var $i=(B+R|0)+((w&8191)<<13)|0;B=(O+(w>>>13)|0)+($i>>>26)|0,$i&=67108863,R=Math.imul(Ne,ze),w=Math.imul(Ne,qe),w=w+Math.imul(Ue,ze)|0,O=Math.imul(Ue,qe),R=R+Math.imul(xe,Je)|0,w=w+Math.imul(xe,nt)|0,w=w+Math.imul($e,Je)|0,O=O+Math.imul($e,nt)|0,R=R+Math.imul(Me,jt)|0,w=w+Math.imul(Me,Ht)|0,w=w+Math.imul(Ie,jt)|0,O=O+Math.imul(Ie,Ht)|0,R=R+Math.imul(ye,pt)|0,w=w+Math.imul(ye,ht)|0,w=w+Math.imul(we,pt)|0,O=O+Math.imul(we,ht)|0,R=R+Math.imul(z,gt)|0,w=w+Math.imul(z,ft)|0,w=w+Math.imul(K,gt)|0,O=O+Math.imul(K,ft)|0,R=R+Math.imul(S,_t)|0,w=w+Math.imul(S,xt)|0,w=w+Math.imul(D,_t)|0,O=O+Math.imul(D,xt)|0,R=R+Math.imul(k,At)|0,w=w+Math.imul(k,mt)|0,w=w+Math.imul(W,At)|0,O=O+Math.imul(W,mt)|0,R=R+Math.imul(be,wt)|0,w=w+Math.imul(be,lt)|0,w=w+Math.imul(x,wt)|0,O=O+Math.imul(x,lt)|0;var $s=(B+R|0)+((w&8191)<<13)|0;B=(O+(w>>>13)|0)+($s>>>26)|0,$s&=67108863,R=Math.imul(N,ze),w=Math.imul(N,qe),w=w+Math.imul(U,ze)|0,O=Math.imul(U,qe),R=R+Math.imul(Ne,Je)|0,w=w+Math.imul(Ne,nt)|0,w=w+Math.imul(Ue,Je)|0,O=O+Math.imul(Ue,nt)|0,R=R+Math.imul(xe,jt)|0,w=w+Math.imul(xe,Ht)|0,w=w+Math.imul($e,jt)|0,O=O+Math.imul($e,Ht)|0,R=R+Math.imul(Me,pt)|0,w=w+Math.imul(Me,ht)|0,w=w+Math.imul(Ie,pt)|0,O=O+Math.imul(Ie,ht)|0,R=R+Math.imul(ye,gt)|0,w=w+Math.imul(ye,ft)|0,w=w+Math.imul(we,gt)|0,O=O+Math.imul(we,ft)|0,R=R+Math.imul(z,_t)|0,w=w+Math.imul(z,xt)|0,w=w+Math.imul(K,_t)|0,O=O+Math.imul(K,xt)|0,R=R+Math.imul(S,At)|0,w=w+Math.imul(S,mt)|0,w=w+Math.imul(D,At)|0,O=O+Math.imul(D,mt)|0,R=R+Math.imul(k,wt)|0,w=w+Math.imul(k,lt)|0,w=w+Math.imul(W,wt)|0,O=O+Math.imul(W,lt)|0,R=R+Math.imul(be,Et)|0,w=w+Math.imul(be,Gt)|0,w=w+Math.imul(x,Et)|0,O=O+Math.imul(x,Gt)|0;var Bi=(B+R|0)+((w&8191)<<13)|0;B=(O+(w>>>13)|0)+(Bi>>>26)|0,Bi&=67108863,R=Math.imul(le,ze),w=Math.imul(le,qe),w=w+Math.imul(me,ze)|0,O=Math.imul(me,qe),R=R+Math.imul(N,Je)|0,w=w+Math.imul(N,nt)|0,w=w+Math.imul(U,Je)|0,O=O+Math.imul(U,nt)|0,R=R+Math.imul(Ne,jt)|0,w=w+Math.imul(Ne,Ht)|0,w=w+Math.imul(Ue,jt)|0,O=O+Math.imul(Ue,Ht)|0,R=R+Math.imul(xe,pt)|0,w=w+Math.imul(xe,ht)|0,w=w+Math.imul($e,pt)|0,O=O+Math.imul($e,ht)|0,R=R+Math.imul(Me,gt)|0,w=w+Math.imul(Me,ft)|0,w=w+Math.imul(Ie,gt)|0,O=O+Math.imul(Ie,ft)|0,R=R+Math.imul(ye,_t)|0,w=w+Math.imul(ye,xt)|0,w=w+Math.imul(we,_t)|0,O=O+Math.imul(we,xt)|0,R=R+Math.imul(z,At)|0,w=w+Math.imul(z,mt)|0,w=w+Math.imul(K,At)|0,O=O+Math.imul(K,mt)|0,R=R+Math.imul(S,wt)|0,w=w+Math.imul(S,lt)|0,w=w+Math.imul(D,wt)|0,O=O+Math.imul(D,lt)|0,R=R+Math.imul(k,Et)|0,w=w+Math.imul(k,Gt)|0,w=w+Math.imul(W,Et)|0,O=O+Math.imul(W,Gt)|0,R=R+Math.imul(be,Zt)|0,w=w+Math.imul(be,Pt)|0,w=w+Math.imul(x,Zt)|0,O=O+Math.imul(x,Pt)|0;var Bs=(B+R|0)+((w&8191)<<13)|0;B=(O+(w>>>13)|0)+(Bs>>>26)|0,Bs&=67108863,R=Math.imul(le,Je),w=Math.imul(le,nt),w=w+Math.imul(me,Je)|0,O=Math.imul(me,nt),R=R+Math.imul(N,jt)|0,w=w+Math.imul(N,Ht)|0,w=w+Math.imul(U,jt)|0,O=O+Math.imul(U,Ht)|0,R=R+Math.imul(Ne,pt)|0,w=w+Math.imul(Ne,ht)|0,w=w+Math.imul(Ue,pt)|0,O=O+Math.imul(Ue,ht)|0,R=R+Math.imul(xe,gt)|0,w=w+Math.imul(xe,ft)|0,w=w+Math.imul($e,gt)|0,O=O+Math.imul($e,ft)|0,R=R+Math.imul(Me,_t)|0,w=w+Math.imul(Me,xt)|0,w=w+Math.imul(Ie,_t)|0,O=O+Math.imul(Ie,xt)|0,R=R+Math.imul(ye,At)|0,w=w+Math.imul(ye,mt)|0,w=w+Math.imul(we,At)|0,O=O+Math.imul(we,mt)|0,R=R+Math.imul(z,wt)|0,w=w+Math.imul(z,lt)|0,w=w+Math.imul(K,wt)|0,O=O+Math.imul(K,lt)|0,R=R+Math.imul(S,Et)|0,w=w+Math.imul(S,Gt)|0,w=w+Math.imul(D,Et)|0,O=O+Math.imul(D,Gt)|0,R=R+Math.imul(k,Zt)|0,w=w+Math.imul(k,Pt)|0,w=w+Math.imul(W,Zt)|0,O=O+Math.imul(W,Pt)|0;var Ls=(B+R|0)+((w&8191)<<13)|0;B=(O+(w>>>13)|0)+(Ls>>>26)|0,Ls&=67108863,R=Math.imul(le,jt),w=Math.imul(le,Ht),w=w+Math.imul(me,jt)|0,O=Math.imul(me,Ht),R=R+Math.imul(N,pt)|0,w=w+Math.imul(N,ht)|0,w=w+Math.imul(U,pt)|0,O=O+Math.imul(U,ht)|0,R=R+Math.imul(Ne,gt)|0,w=w+Math.imul(Ne,ft)|0,w=w+Math.imul(Ue,gt)|0,O=O+Math.imul(Ue,ft)|0,R=R+Math.imul(xe,_t)|0,w=w+Math.imul(xe,xt)|0,w=w+Math.imul($e,_t)|0,O=O+Math.imul($e,xt)|0,R=R+Math.imul(Me,At)|0,w=w+Math.imul(Me,mt)|0,w=w+Math.imul(Ie,At)|0,O=O+Math.imul(Ie,mt)|0,R=R+Math.imul(ye,wt)|0,w=w+Math.imul(ye,lt)|0,w=w+Math.imul(we,wt)|0,O=O+Math.imul(we,lt)|0,R=R+Math.imul(z,Et)|0,w=w+Math.imul(z,Gt)|0,w=w+Math.imul(K,Et)|0,O=O+Math.imul(K,Gt)|0,R=R+Math.imul(S,Zt)|0,w=w+Math.imul(S,Pt)|0,w=w+Math.imul(D,Zt)|0,O=O+Math.imul(D,Pt)|0;var Li=(B+R|0)+((w&8191)<<13)|0;B=(O+(w>>>13)|0)+(Li>>>26)|0,Li&=67108863,R=Math.imul(le,pt),w=Math.imul(le,ht),w=w+Math.imul(me,pt)|0,O=Math.imul(me,ht),R=R+Math.imul(N,gt)|0,w=w+Math.imul(N,ft)|0,w=w+Math.imul(U,gt)|0,O=O+Math.imul(U,ft)|0,R=R+Math.imul(Ne,_t)|0,w=w+Math.imul(Ne,xt)|0,w=w+Math.imul(Ue,_t)|0,O=O+Math.imul(Ue,xt)|0,R=R+Math.imul(xe,At)|0,w=w+Math.imul(xe,mt)|0,w=w+Math.imul($e,At)|0,O=O+Math.imul($e,mt)|0,R=R+Math.imul(Me,wt)|0,w=w+Math.imul(Me,lt)|0,w=w+Math.imul(Ie,wt)|0,O=O+Math.imul(Ie,lt)|0,R=R+Math.imul(ye,Et)|0,w=w+Math.imul(ye,Gt)|0,w=w+Math.imul(we,Et)|0,O=O+Math.imul(we,Gt)|0,R=R+Math.imul(z,Zt)|0,w=w+Math.imul(z,Pt)|0,w=w+Math.imul(K,Zt)|0,O=O+Math.imul(K,Pt)|0;var gs=(B+R|0)+((w&8191)<<13)|0;B=(O+(w>>>13)|0)+(gs>>>26)|0,gs&=67108863,R=Math.imul(le,gt),w=Math.imul(le,ft),w=w+Math.imul(me,gt)|0,O=Math.imul(me,ft),R=R+Math.imul(N,_t)|0,w=w+Math.imul(N,xt)|0,w=w+Math.imul(U,_t)|0,O=O+Math.imul(U,xt)|0,R=R+Math.imul(Ne,At)|0,w=w+Math.imul(Ne,mt)|0,w=w+Math.imul(Ue,At)|0,O=O+Math.imul(Ue,mt)|0,R=R+Math.imul(xe,wt)|0,w=w+Math.imul(xe,lt)|0,w=w+Math.imul($e,wt)|0,O=O+Math.imul($e,lt)|0,R=R+Math.imul(Me,Et)|0,w=w+Math.imul(Me,Gt)|0,w=w+Math.imul(Ie,Et)|0,O=O+Math.imul(Ie,Gt)|0,R=R+Math.imul(ye,Zt)|0,w=w+Math.imul(ye,Pt)|0,w=w+Math.imul(we,Zt)|0,O=O+Math.imul(we,Pt)|0;var ms=(B+R|0)+((w&8191)<<13)|0;B=(O+(w>>>13)|0)+(ms>>>26)|0,ms&=67108863,R=Math.imul(le,_t),w=Math.imul(le,xt),w=w+Math.imul(me,_t)|0,O=Math.imul(me,xt),R=R+Math.imul(N,At)|0,w=w+Math.imul(N,mt)|0,w=w+Math.imul(U,At)|0,O=O+Math.imul(U,mt)|0,R=R+Math.imul(Ne,wt)|0,w=w+Math.imul(Ne,lt)|0,w=w+Math.imul(Ue,wt)|0,O=O+Math.imul(Ue,lt)|0,R=R+Math.imul(xe,Et)|0,w=w+Math.imul(xe,Gt)|0,w=w+Math.imul($e,Et)|0,O=O+Math.imul($e,Gt)|0,R=R+Math.imul(Me,Zt)|0,w=w+Math.imul(Me,Pt)|0,w=w+Math.imul(Ie,Zt)|0,O=O+Math.imul(Ie,Pt)|0;var qn=(B+R|0)+((w&8191)<<13)|0;B=(O+(w>>>13)|0)+(qn>>>26)|0,qn&=67108863,R=Math.imul(le,At),w=Math.imul(le,mt),w=w+Math.imul(me,At)|0,O=Math.imul(me,mt),R=R+Math.imul(N,wt)|0,w=w+Math.imul(N,lt)|0,w=w+Math.imul(U,wt)|0,O=O+Math.imul(U,lt)|0,R=R+Math.imul(Ne,Et)|0,w=w+Math.imul(Ne,Gt)|0,w=w+Math.imul(Ue,Et)|0,O=O+Math.imul(Ue,Gt)|0,R=R+Math.imul(xe,Zt)|0,w=w+Math.imul(xe,Pt)|0,w=w+Math.imul($e,Zt)|0,O=O+Math.imul($e,Pt)|0;var yc=(B+R|0)+((w&8191)<<13)|0;B=(O+(w>>>13)|0)+(yc>>>26)|0,yc&=67108863,R=Math.imul(le,wt),w=Math.imul(le,lt),w=w+Math.imul(me,wt)|0,O=Math.imul(me,lt),R=R+Math.imul(N,Et)|0,w=w+Math.imul(N,Gt)|0,w=w+Math.imul(U,Et)|0,O=O+Math.imul(U,Gt)|0,R=R+Math.imul(Ne,Zt)|0,w=w+Math.imul(Ne,Pt)|0,w=w+Math.imul(Ue,Zt)|0,O=O+Math.imul(Ue,Pt)|0;var bc=(B+R|0)+((w&8191)<<13)|0;B=(O+(w>>>13)|0)+(bc>>>26)|0,bc&=67108863,R=Math.imul(le,Et),w=Math.imul(le,Gt),w=w+Math.imul(me,Et)|0,O=Math.imul(me,Gt),R=R+Math.imul(N,Zt)|0,w=w+Math.imul(N,Pt)|0,w=w+Math.imul(U,Zt)|0,O=O+Math.imul(U,Pt)|0;var _c=(B+R|0)+((w&8191)<<13)|0;B=(O+(w>>>13)|0)+(_c>>>26)|0,_c&=67108863,R=Math.imul(le,Zt),w=Math.imul(le,Pt),w=w+Math.imul(me,Zt)|0,O=Math.imul(me,Pt);var xc=(B+R|0)+((w&8191)<<13)|0;return B=(O+(w>>>13)|0)+(xc>>>26)|0,xc&=67108863,C[0]=Nn,C[1]=Pn,C[2]=On,C[3]=Mn,C[4]=Dn,C[5]=tn,C[6]=$i,C[7]=$s,C[8]=Bi,C[9]=Bs,C[10]=Ls,C[11]=Li,C[12]=gs,C[13]=ms,C[14]=qn,C[15]=yc,C[16]=bc,C[17]=_c,C[18]=xc,B!==0&&(C[19]=B,m.length++),m};Math.imul||(P=L);function H(d,g,m){m.negative=g.negative^d.negative,m.length=d.length+g.length;for(var b=0,E=0,C=0;C>>26)|0,E+=B>>>26,B&=67108863}m.words[C]=R,b=B,B=E}return b!==0?m.words[C]=b:m.length--,m._strip()}function F(d,g,m){return H(d,g,m)}s.prototype.mulTo=function(d,g){var m,b=this.length+d.length;return this.length===10&&d.length===10?m=P(this,d,g):b<63?m=L(this,d,g):b<1024?m=H(this,d,g):m=F(this,d,g),m},s.prototype.mul=function(d){var g=new s(null);return g.words=new Array(this.length+d.length),this.mulTo(d,g)},s.prototype.mulf=function(d){var g=new s(null);return g.words=new Array(this.length+d.length),F(this,d,g)},s.prototype.imul=function(d){return this.clone().mulTo(d,this)},s.prototype.imuln=function(d){var g=d<0;g&&(d=-d),n(typeof d=="number"),n(d<67108864);for(var m=0,b=0;b>=26,m+=E/67108864|0,m+=C>>>26,this.words[b]=C&67108863}return m!==0&&(this.words[b]=m,this.length++),g?this.ineg():this},s.prototype.muln=function(d){return this.clone().imuln(d)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(d){var g=$(d);if(g.length===0)return new s(1);for(var m=this,b=0;b=0);var g=d%26,m=(d-g)/26,b=67108863>>>26-g<<26-g,E;if(g!==0){var C=0;for(E=0;E>>26-g}C&&(this.words[E]=C,this.length++)}if(m!==0){for(E=this.length-1;E>=0;E--)this.words[E+m]=this.words[E];for(E=0;E=0);var b;g?b=(g-g%26)/26:b=0;var E=d%26,C=Math.min((d-E)/26,this.length),B=67108863^67108863>>>E<C)for(this.length-=C,w=0;w=0&&(O!==0||w>=b);w--){var pe=this.words[w]|0;this.words[w]=O<<26-E|pe>>>E,O=pe&B}return R&&O!==0&&(R.words[R.length++]=O),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},s.prototype.ishrn=function(d,g,m){return n(this.negative===0),this.iushrn(d,g,m)},s.prototype.shln=function(d){return this.clone().ishln(d)},s.prototype.ushln=function(d){return this.clone().iushln(d)},s.prototype.shrn=function(d){return this.clone().ishrn(d)},s.prototype.ushrn=function(d){return this.clone().iushrn(d)},s.prototype.testn=function(d){n(typeof d=="number"&&d>=0);var g=d%26,m=(d-g)/26,b=1<=0);var g=d%26,m=(d-g)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=m)return this;if(g!==0&&m++,this.length=Math.min(m,this.length),g!==0){var b=67108863^67108863>>>g<=67108864;g++)this.words[g]-=67108864,g===this.length-1?this.words[g+1]=1:this.words[g+1]++;return this.length=Math.max(this.length,g+1),this},s.prototype.isubn=function(d){if(n(typeof d=="number"),n(d<67108864),d<0)return this.iaddn(-d);if(this.negative!==0)return this.negative=0,this.iaddn(d),this.negative=1,this;if(this.words[0]-=d,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var g=0;g>26)-(R/67108864|0),this.words[E+m]=C&67108863}for(;E>26,this.words[E+m]=C&67108863;if(B===0)return this._strip();for(n(B===-1),B=0,E=0;E>26,this.words[E]=C&67108863;return this.negative=1,this._strip()},s.prototype._wordDiv=function(d,g){var m=this.length-d.length,b=this.clone(),E=d,C=E.words[E.length-1]|0,B=this._countBits(C);m=26-B,m!==0&&(E=E.ushln(m),b.iushln(m),C=E.words[E.length-1]|0);var R=b.length-E.length,w;if(g!=="mod"){w=new s(null),w.length=R+1,w.words=new Array(w.length);for(var O=0;O=0;be--){var x=(b.words[E.length+be]|0)*67108864+(b.words[E.length+be-1]|0);for(x=Math.min(x/C|0,67108863),b._ishlnsubmul(E,x,be);b.negative!==0;)x--,b.negative=0,b._ishlnsubmul(E,1,be),b.isZero()||(b.negative^=1);w&&(w.words[be]=x)}return w&&w._strip(),b._strip(),g!=="div"&&m!==0&&b.iushrn(m),{div:w||null,mod:b}},s.prototype.divmod=function(d,g,m){if(n(!d.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var b,E,C;return this.negative!==0&&d.negative===0?(C=this.neg().divmod(d,g),g!=="mod"&&(b=C.div.neg()),g!=="div"&&(E=C.mod.neg(),m&&E.negative!==0&&E.iadd(d)),{div:b,mod:E}):this.negative===0&&d.negative!==0?(C=this.divmod(d.neg(),g),g!=="mod"&&(b=C.div.neg()),{div:b,mod:C.mod}):this.negative&d.negative?(C=this.neg().divmod(d.neg(),g),g!=="div"&&(E=C.mod.neg(),m&&E.negative!==0&&E.isub(d)),{div:C.div,mod:E}):d.length>this.length||this.cmp(d)<0?{div:new s(0),mod:this}:d.length===1?g==="div"?{div:this.divn(d.words[0]),mod:null}:g==="mod"?{div:null,mod:new s(this.modrn(d.words[0]))}:{div:this.divn(d.words[0]),mod:new s(this.modrn(d.words[0]))}:this._wordDiv(d,g)},s.prototype.div=function(d){return this.divmod(d,"div",!1).div},s.prototype.mod=function(d){return this.divmod(d,"mod",!1).mod},s.prototype.umod=function(d){return this.divmod(d,"mod",!0).mod},s.prototype.divRound=function(d){var g=this.divmod(d);if(g.mod.isZero())return g.div;var m=g.div.negative!==0?g.mod.isub(d):g.mod,b=d.ushrn(1),E=d.andln(1),C=m.cmp(b);return C<0||E===1&&C===0?g.div:g.div.negative!==0?g.div.isubn(1):g.div.iaddn(1)},s.prototype.modrn=function(d){var g=d<0;g&&(d=-d),n(d<=67108863);for(var m=(1<<26)%d,b=0,E=this.length-1;E>=0;E--)b=(m*b+(this.words[E]|0))%d;return g?-b:b},s.prototype.modn=function(d){return this.modrn(d)},s.prototype.idivn=function(d){var g=d<0;g&&(d=-d),n(d<=67108863);for(var m=0,b=this.length-1;b>=0;b--){var E=(this.words[b]|0)+m*67108864;this.words[b]=E/d|0,m=E%d}return this._strip(),g?this.ineg():this},s.prototype.divn=function(d){return this.clone().idivn(d)},s.prototype.egcd=function(d){n(d.negative===0),n(!d.isZero());var g=this,m=d.clone();g.negative!==0?g=g.umod(d):g=g.clone();for(var b=new s(1),E=new s(0),C=new s(0),B=new s(1),R=0;g.isEven()&&m.isEven();)g.iushrn(1),m.iushrn(1),++R;for(var w=m.clone(),O=g.clone();!g.isZero();){for(var pe=0,be=1;!(g.words[0]&be)&&pe<26;++pe,be<<=1);if(pe>0)for(g.iushrn(pe);pe-- >0;)(b.isOdd()||E.isOdd())&&(b.iadd(w),E.isub(O)),b.iushrn(1),E.iushrn(1);for(var x=0,Z=1;!(m.words[0]&Z)&&x<26;++x,Z<<=1);if(x>0)for(m.iushrn(x);x-- >0;)(C.isOdd()||B.isOdd())&&(C.iadd(w),B.isub(O)),C.iushrn(1),B.iushrn(1);g.cmp(m)>=0?(g.isub(m),b.isub(C),E.isub(B)):(m.isub(g),C.isub(b),B.isub(E))}return{a:C,b:B,gcd:m.iushln(R)}},s.prototype._invmp=function(d){n(d.negative===0),n(!d.isZero());var g=this,m=d.clone();g.negative!==0?g=g.umod(d):g=g.clone();for(var b=new s(1),E=new s(0),C=m.clone();g.cmpn(1)>0&&m.cmpn(1)>0;){for(var B=0,R=1;!(g.words[0]&R)&&B<26;++B,R<<=1);if(B>0)for(g.iushrn(B);B-- >0;)b.isOdd()&&b.iadd(C),b.iushrn(1);for(var w=0,O=1;!(m.words[0]&O)&&w<26;++w,O<<=1);if(w>0)for(m.iushrn(w);w-- >0;)E.isOdd()&&E.iadd(C),E.iushrn(1);g.cmp(m)>=0?(g.isub(m),b.isub(E)):(m.isub(g),E.isub(b))}var pe;return g.cmpn(1)===0?pe=b:pe=E,pe.cmpn(0)<0&&pe.iadd(d),pe},s.prototype.gcd=function(d){if(this.isZero())return d.abs();if(d.isZero())return this.abs();var g=this.clone(),m=d.clone();g.negative=0,m.negative=0;for(var b=0;g.isEven()&&m.isEven();b++)g.iushrn(1),m.iushrn(1);do{for(;g.isEven();)g.iushrn(1);for(;m.isEven();)m.iushrn(1);var E=g.cmp(m);if(E<0){var C=g;g=m,m=C}else if(E===0||m.cmpn(1)===0)break;g.isub(m)}while(!0);return m.iushln(b)},s.prototype.invm=function(d){return this.egcd(d).a.umod(d)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(d){return this.words[0]&d},s.prototype.bincn=function(d){n(typeof d=="number");var g=d%26,m=(d-g)/26,b=1<>>26,B&=67108863,this.words[C]=B}return E!==0&&(this.words[C]=E,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(d){var g=d<0;if(this.negative!==0&&!g)return-1;if(this.negative===0&&g)return 1;this._strip();var m;if(this.length>1)m=1;else{g&&(d=-d),n(d<=67108863,"Number is too big");var b=this.words[0]|0;m=b===d?0:bd.length)return 1;if(this.length=0;m--){var b=this.words[m]|0,E=d.words[m]|0;if(b!==E){bE&&(g=1);break}}return g},s.prototype.gtn=function(d){return this.cmpn(d)===1},s.prototype.gt=function(d){return this.cmp(d)===1},s.prototype.gten=function(d){return this.cmpn(d)>=0},s.prototype.gte=function(d){return this.cmp(d)>=0},s.prototype.ltn=function(d){return this.cmpn(d)===-1},s.prototype.lt=function(d){return this.cmp(d)===-1},s.prototype.lten=function(d){return this.cmpn(d)<=0},s.prototype.lte=function(d){return this.cmp(d)<=0},s.prototype.eqn=function(d){return this.cmpn(d)===0},s.prototype.eq=function(d){return this.cmp(d)===0},s.red=function(d){return new te(d)},s.prototype.toRed=function(d){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),d.convertTo(this)._forceRed(d)},s.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(d){return this.red=d,this},s.prototype.forceRed=function(d){return n(!this.red,"Already a number in reduction context"),this._forceRed(d)},s.prototype.redAdd=function(d){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,d)},s.prototype.redIAdd=function(d){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,d)},s.prototype.redSub=function(d){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,d)},s.prototype.redISub=function(d){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,d)},s.prototype.redShl=function(d){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,d)},s.prototype.redMul=function(d){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,d),this.red.mul(this,d)},s.prototype.redIMul=function(d){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,d),this.red.imul(this,d)},s.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(d){return n(this.red&&!d.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,d)};var q={k256:null,p224:null,p192:null,p25519:null};function Y(d,g){this.name=d,this.p=new s(g,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}Y.prototype._tmp=function(){var d=new s(null);return d.words=new Array(Math.ceil(this.n/13)),d},Y.prototype.ireduce=function(d){var g=d,m;do this.split(g,this.tmp),g=this.imulK(g),g=g.iadd(this.tmp),m=g.bitLength();while(m>this.n);var b=m0?g.isub(this.p):g.strip!==void 0?g.strip():g._strip(),g},Y.prototype.split=function(d,g){d.iushrn(this.n,0,g)},Y.prototype.imulK=function(d){return d.imul(this.k)};function I(){Y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(I,Y),I.prototype.split=function(d,g){for(var m=4194303,b=Math.min(d.length,9),E=0;E>>22,C=B}C>>>=22,d.words[E-10]=C,C===0&&d.length>10?d.length-=10:d.length-=9},I.prototype.imulK=function(d){d.words[d.length]=0,d.words[d.length+1]=0,d.length+=2;for(var g=0,m=0;m>>=26,d.words[m]=E,g=b}return g!==0&&(d.words[d.length++]=g),d},s._prime=function(d){if(q[d])return q[d];var g;if(d==="k256")g=new I;else if(d==="p224")g=new T;else if(d==="p192")g=new V;else if(d==="p25519")g=new Q;else throw new Error("Unknown prime "+d);return q[d]=g,g};function te(d){if(typeof d=="string"){var g=s._prime(d);this.m=g.p,this.prime=g}else n(d.gtn(1),"modulus must be greater than 1"),this.m=d,this.prime=null}te.prototype._verify1=function(d){n(d.negative===0,"red works only with positives"),n(d.red,"red works only with red numbers")},te.prototype._verify2=function(d,g){n((d.negative|g.negative)===0,"red works only with positives"),n(d.red&&d.red===g.red,"red works only with red numbers")},te.prototype.imod=function(d){return this.prime?this.prime.ireduce(d)._forceRed(this):(h(d,d.umod(this.m)._forceRed(this)),d)},te.prototype.neg=function(d){return d.isZero()?d.clone():this.m.sub(d)._forceRed(this)},te.prototype.add=function(d,g){this._verify2(d,g);var m=d.add(g);return m.cmp(this.m)>=0&&m.isub(this.m),m._forceRed(this)},te.prototype.iadd=function(d,g){this._verify2(d,g);var m=d.iadd(g);return m.cmp(this.m)>=0&&m.isub(this.m),m},te.prototype.sub=function(d,g){this._verify2(d,g);var m=d.sub(g);return m.cmpn(0)<0&&m.iadd(this.m),m._forceRed(this)},te.prototype.isub=function(d,g){this._verify2(d,g);var m=d.isub(g);return m.cmpn(0)<0&&m.iadd(this.m),m},te.prototype.shl=function(d,g){return this._verify1(d),this.imod(d.ushln(g))},te.prototype.imul=function(d,g){return this._verify2(d,g),this.imod(d.imul(g))},te.prototype.mul=function(d,g){return this._verify2(d,g),this.imod(d.mul(g))},te.prototype.isqr=function(d){return this.imul(d,d.clone())},te.prototype.sqr=function(d){return this.mul(d,d)},te.prototype.sqrt=function(d){if(d.isZero())return d.clone();var g=this.m.andln(3);if(n(g%2===1),g===3){var m=this.m.add(new s(1)).iushrn(2);return this.pow(d,m)}for(var b=this.m.subn(1),E=0;!b.isZero()&&b.andln(1)===0;)E++,b.iushrn(1);n(!b.isZero());var C=new s(1).toRed(this),B=C.redNeg(),R=this.m.subn(1).iushrn(1),w=this.m.bitLength();for(w=new s(2*w*w).toRed(this);this.pow(w,R).cmp(B)!==0;)w.redIAdd(B);for(var O=this.pow(w,b),pe=this.pow(d,b.addn(1).iushrn(1)),be=this.pow(d,b),x=E;be.cmp(C)!==0;){for(var Z=be,k=0;Z.cmp(C)!==0;k++)Z=Z.redSqr();n(k=0;E--){for(var O=g.words[E],pe=w-1;pe>=0;pe--){var be=O>>pe&1;if(C!==b[0]&&(C=this.sqr(C)),be===0&&B===0){R=0;continue}B<<=1,B|=be,R++,!(R!==m&&(E!==0||pe!==0))&&(C=this.mul(C,b[B]),R=0,B=0)}w=26}return C},te.prototype.convertTo=function(d){var g=d.umod(this.m);return g===d?g.clone():g},te.prototype.convertFrom=function(d){var g=d.clone();return g.red=null,g},s.mont=function(d){return new oe(d)};function oe(d){te.call(this,d),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(oe,te),oe.prototype.convertTo=function(d){return this.imod(d.ushln(this.shift))},oe.prototype.convertFrom=function(d){var g=this.imod(d.mul(this.rinv));return g.red=null,g},oe.prototype.imul=function(d,g){if(d.isZero()||g.isZero())return d.words[0]=0,d.length=1,d;var m=d.imul(g),b=m.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),E=m.isub(b).iushrn(this.shift),C=E;return E.cmp(this.m)>=0?C=E.isub(this.m):E.cmpn(0)<0&&(C=E.iadd(this.m)),C._forceRed(this)},oe.prototype.mul=function(d,g){if(d.isZero()||g.isZero())return new s(0)._forceRed(this);var m=d.mul(g),b=m.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),E=m.isub(b).iushrn(this.shift),C=E;return E.cmp(this.m)>=0?C=E.isub(this.m):E.cmpn(0)<0&&(C=E.iadd(this.m)),C._forceRed(this)},oe.prototype.invm=function(d){var g=this.imod(d._invmp(this.m).mul(this.r2));return g._forceRed(this)}})(r,OW)})(BW);var wr=BW.exports;const LW="bignumber/5.7.0";var UC=wr.BN;const Ih=new Lo(LW),m7={},HD=9007199254740991;function $6e(r){return r!=null&&(fo.isBigNumber(r)||typeof r=="number"&&r%1===0||typeof r=="string"&&!!r.match(/^-?[0-9]+$/)||kw(r)||typeof r=="bigint"||ob(r))}let WD=!1,fo=class Mc{constructor(e,t){e!==m7&&Ih.throwError("cannot call constructor directly; use BigNumber.from",Lo.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=t,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return Eo(Br(this).fromTwos(e))}toTwos(e){return Eo(Br(this).toTwos(e))}abs(){return this._hex[0]==="-"?Mc.from(this._hex.substring(1)):this}add(e){return Eo(Br(this).add(Br(e)))}sub(e){return Eo(Br(this).sub(Br(e)))}div(e){return Mc.from(e).isZero()&&ja("division-by-zero","div"),Eo(Br(this).div(Br(e)))}mul(e){return Eo(Br(this).mul(Br(e)))}mod(e){const t=Br(e);return t.isNeg()&&ja("division-by-zero","mod"),Eo(Br(this).umod(t))}pow(e){const t=Br(e);return t.isNeg()&&ja("negative-power","pow"),Eo(Br(this).pow(t))}and(e){const t=Br(e);return(this.isNegative()||t.isNeg())&&ja("unbound-bitwise-result","and"),Eo(Br(this).and(t))}or(e){const t=Br(e);return(this.isNegative()||t.isNeg())&&ja("unbound-bitwise-result","or"),Eo(Br(this).or(t))}xor(e){const t=Br(e);return(this.isNegative()||t.isNeg())&&ja("unbound-bitwise-result","xor"),Eo(Br(this).xor(t))}mask(e){return(this.isNegative()||e<0)&&ja("negative-width","mask"),Eo(Br(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&ja("negative-width","shl"),Eo(Br(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&ja("negative-width","shr"),Eo(Br(this).shrn(e))}eq(e){return Br(this).eq(Br(e))}lt(e){return Br(this).lt(Br(e))}lte(e){return Br(this).lte(Br(e))}gt(e){return Br(this).gt(Br(e))}gte(e){return Br(this).gte(Br(e))}isNegative(){return this._hex[0]==="-"}isZero(){return Br(this).isZero()}toNumber(){try{return Br(this).toNumber()}catch{ja("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return Ih.throwError("this platform does not support BigInt",Lo.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?WD||(WD=!0,Ih.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?Ih.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",Lo.errors.UNEXPECTED_ARGUMENT,{}):Ih.throwError("BigNumber.toString does not accept parameters",Lo.errors.UNEXPECTED_ARGUMENT,{})),Br(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof Mc)return e;if(typeof e=="string")return e.match(/^-?0x[0-9a-f]+$/i)?new Mc(m7,qv(e)):e.match(/^-?[0-9]+$/)?new Mc(m7,qv(new UC(e))):Ih.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&ja("underflow","BigNumber.from",e),(e>=HD||e<=-HD)&&ja("overflow","BigNumber.from",e),Mc.from(String(e));const t=e;if(typeof t=="bigint")return Mc.from(t.toString());if(ob(t))return Mc.from($W(t));if(t)if(t.toHexString){const n=t.toHexString();if(typeof n=="string")return Mc.from(n)}else{let n=t._hex;if(n==null&&t.type==="BigNumber"&&(n=t.hex),typeof n=="string"&&(kw(n)||n[0]==="-"&&kw(n.substring(1))))return Mc.from(n)}return Ih.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}};function qv(r){if(typeof r!="string")return qv(r.toString(16));if(r[0]==="-")return r=r.substring(1),r[0]==="-"&&Ih.throwArgumentError("invalid hex","value",r),r=qv(r),r==="0x00"?r:"-"+r;if(r.substring(0,2)!=="0x"&&(r="0x"+r),r==="0x")return"0x00";for(r.length%2&&(r="0x0"+r.substring(2));r.length>4&&r.substring(0,4)==="0x00";)r="0x"+r.substring(4);return r}function Eo(r){return fo.from(qv(r))}function Br(r){const e=fo.from(r).toHexString();return e[0]==="-"?new UC("-"+e.substring(3),16):new UC(e.substring(2),16)}function ja(r,e,t){const n={fault:r,operation:e};return t!=null&&(n.value=t),Ih.throwError(r,Lo.errors.NUMERIC_FAULT,n)}const Js=new Lo(LW),B3={},UW=fo.from(0),FW=fo.from(-1);function jW(r,e,t,n){const i={fault:e,operation:t};return n!==void 0&&(i.value=n),Js.throwError(r,Lo.errors.NUMERIC_FAULT,i)}let L3="0";for(;L3.length<256;)L3+=L3;function _T(r){if(typeof r!="number")try{r=fo.from(r).toNumber()}catch{}return typeof r=="number"&&r>=0&&r<=256&&!(r%1)?"1"+L3.substring(0,r):Js.throwArgumentError("invalid decimal size","decimals",r)}function w7(r,e){e==null&&(e=0);const t=_T(e);r=fo.from(r);const n=r.lt(UW);n&&(r=r.mul(FW));let i=r.mod(t).toString();for(;i.length2&&Js.throwArgumentError("too many decimal points","value",r);let s=i[0],o=i[1];for(s||(s="0"),o||(o="0");o[o.length-1]==="0";)o=o.substring(0,o.length-1);for(o.length>t.length-1&&jW("fractional component exceeds decimals","underflow","parseFixed"),o===""&&(o="0");o.lengthe[o]==null?c:(typeof e[o]!==a&&Js.throwArgumentError("invalid fixed format ("+o+" not "+a+")","format."+o,e[o]),e[o]);t=s("signed","boolean",t),n=s("width","number",n),i=s("decimals","number",i)}return n%8&&Js.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",n),i>80&&Js.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",i),new nm(B3,t,n,i)}}class ss{constructor(e,t,n,i){e!==B3&&Js.throwError("cannot use FixedNumber constructor; use FixedNumber.from",Lo.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=i,this._hex=t,this._value=n,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(e){this.format.name!==e.format.name&&Js.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);const t=_h(this._value,this.format.decimals),n=_h(e._value,e.format.decimals);return ss.fromValue(t.add(n),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);const t=_h(this._value,this.format.decimals),n=_h(e._value,e.format.decimals);return ss.fromValue(t.sub(n),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);const t=_h(this._value,this.format.decimals),n=_h(e._value,e.format.decimals);return ss.fromValue(t.mul(n).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);const t=_h(this._value,this.format.decimals),n=_h(e._value,e.format.decimals);return ss.fromValue(t.mul(this.format._multiplier).div(n),this.format.decimals,this.format)}floor(){const e=this.toString().split(".");e.length===1&&e.push("0");let t=ss.from(e[0],this.format);const n=!e[1].match(/^(0*)$/);return this.isNegative()&&n&&(t=t.subUnsafe(zD.toFormat(t.format))),t}ceiling(){const e=this.toString().split(".");e.length===1&&e.push("0");let t=ss.from(e[0],this.format);const n=!e[1].match(/^(0*)$/);return!this.isNegative()&&n&&(t=t.addUnsafe(zD.toFormat(t.format))),t}round(e){e==null&&(e=0);const t=this.toString().split(".");if(t.length===1&&t.push("0"),(e<0||e>80||e%1)&&Js.throwArgumentError("invalid decimal count","decimals",e),t[1].length<=e)return this;const n=ss.from("1"+L3.substring(0,e),this.format),i=B6e.toFormat(this.format);return this.mulUnsafe(n).addUnsafe(i).floor().divUnsafe(n)}isZero(){return this._value==="0.0"||this._value==="0"}isNegative(){return this._value[0]==="-"}toString(){return this._value}toHexString(e){if(e==null)return this._hex;e%8&&Js.throwArgumentError("invalid byte width","width",e);const t=fo.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return g8(t,e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return ss.fromString(this._value,e)}static fromValue(e,t,n){return n==null&&t!=null&&!$6e(t)&&(n=t,t=null),t==null&&(t=0),n==null&&(n="fixed"),ss.fromString(w7(e,t),nm.from(n))}static fromString(e,t){t==null&&(t="fixed");const n=nm.from(t),i=_h(e,n.decimals);!n.signed&&i.lt(UW)&&jW("unsigned value cannot be negative","overflow","value",e);let s=null;n.signed?s=i.toTwos(n.width).toHexString():(s=i.toHexString(),s=g8(s,n.width/8));const o=w7(i,n.decimals);return new ss(B3,s,o,n)}static fromBytes(e,t){t==null&&(t="fixed");const n=nm.from(t);if(DW(e).length>n.width/8)throw new Error("overflow");let i=fo.from(e);n.signed&&(i=i.fromTwos(n.width));const s=i.toTwos((n.signed?0:1)+n.width).toHexString(),o=w7(i,n.decimals);return new ss(B3,s,o,n)}static from(e,t){if(typeof e=="string")return ss.fromString(e,t);if(ob(e))return ss.fromBytes(e,t);try{return ss.fromValue(e,0,t)}catch(n){if(n.code!==Lo.errors.INVALID_ARGUMENT)throw n}return Js.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}}const zD=ss.from(1),B6e=ss.from("0.5");var VD;(function(r){r.current="",r.NFC="NFC",r.NFD="NFD",r.NFKC="NFKC",r.NFKD="NFKD"})(VD||(VD={}));var qD;(function(r){r.UNEXPECTED_CONTINUE="unexpected continuation byte",r.BAD_PREFIX="bad codepoint prefix",r.OVERRUN="string overrun",r.MISSING_CONTINUE="missing continuation byte",r.OUT_OF_RANGE="out of UTF-8 range",r.UTF16_SURROGATE="UTF-16 surrogate",r.OVERLONG="overlong representation"})(qD||(qD={}));function L6e(r){if(r.length%4!==0)throw new Error("bad data");let e=[];for(let t=0;t{let s=i.split(":");t+=parseInt(s[0],16),n[t]=e(s[1])}),n}function KD(r){let e=0;return r.split(",").map(t=>{let n=t.split("-");n.length===1?n[1]="0":n[1]===""&&(n[1]="1");let i=e+parseInt(n[0],16);return e=parseInt(n[1],16),{l:i,h:e}})}KD("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),"ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(r=>parseInt(r,16)),v7("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),v7("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),v7("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",L6e),KD("80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001");function U6e(r){r=atob(r);const e=[];for(let t=0;t0&&Array.isArray(a)?i(a,o-1):t.push(a)})};return i(r,e),t}function F6e(r){const e={};for(let t=0;t>--c&1}const f=31,v=Math.pow(2,f),y=v>>>1,A=y>>1,M=v-1;let $=0;for(let q=0;q1;){let Q=Y+I>>>1;q>>1|h(),T=T<<1^y,V=(V^y)<<1|y|1;P=T,H=1+V-T}let F=n-4;return L.map(q=>{switch(q-F){case 3:return F+65792+(r[a++]<<16|r[a++]<<8|r[a++]);case 2:return F+256+(r[a++]<<8|r[a++]);case 1:return F+r[a++];default:return q-1}})}function H6e(r){let e=0;return()=>r[e++]}function W6e(r){return H6e(j6e(r))}function z6e(r){return r&1?~r>>1:r>>1}function V6e(r,e){let t=Array(r);for(let n=0;ne[o]):t}function K6e(r){let e=[];for(;;){let t=r();if(t==0)break;e.push(Z6e(t,r))}for(;;){let t=r()-1;if(t<0)break;e.push(Y6e(t,r))}return F6e(HW(e))}function G6e(r){let e=[];for(;;){let t=r();if(t==0)break;e.push(t)}return e}function WW(r,e,t){let n=Array(r).fill(void 0).map(()=>[]);for(let i=0;in[o].push(s));return n}function Z6e(r,e){let t=1+e(),n=e(),i=G6e(e),s=WW(i.length,1+r,e);return HW(s.map((o,a)=>{const c=o[0],l=o.slice(1);return Array(i[a]).fill(void 0).map((h,f)=>{let v=f*n;return[c+f*t,l.map(y=>y+v)]})}))}function Y6e(r,e){let t=1+e();return WW(t,1+r,e).map(n=>[n[0],n.slice(1)])}function Q6e(r){let e=m8(r).sort((n,i)=>n-i);return t();function t(){let n=[];for(;;){let l=m8(r,e);if(l.length==0)break;n.push({set:new Set(l),node:t()})}n.sort((l,h)=>h.set.size-l.set.size);let i=r(),s=i%3;i=i/3|0;let o=!!(i&1);i>>=1;let a=i==1,c=i==2;return{branches:n,valid:s,fe0f:o,save:a,check:c}}}function J6e(){return W6e(U6e("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"))}const J5=J6e();new Set(m8(J5)),new Set(m8(J5)),K6e(J5),Q6e(J5);const X6e=new Uint8Array(32);X6e.fill(0);const e8e=new Uint8Array(32);e8e.fill(0),fo.from(-1);const t8e=fo.from(0),r8e=fo.from(1);fo.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),g8(r8e.toHexString(),32),g8(t8e.toHexString(),32);var Vl={},Fr={},ab=zW;function zW(r,e){if(!r)throw new Error(e||"Assertion failed")}zW.equal=function(r,e,t){if(r!=e)throw new Error(t||"Assertion failed: "+r+" != "+e)};var FC={exports:{}};typeof Object.create=="function"?FC.exports=function(r,e){e&&(r.super_=e,r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}))}:FC.exports=function(r,e){if(e){r.super_=e;var t=function(){};t.prototype=e.prototype,r.prototype=new t,r.prototype.constructor=r}};var n8e=ab,i8e=FC.exports;Fr.inherits=i8e;function s8e(r,e){return(r.charCodeAt(e)&64512)!==55296||e<0||e+1>=r.length?!1:(r.charCodeAt(e+1)&64512)===56320}function o8e(r,e){if(Array.isArray(r))return r.slice();if(!r)return[];var t=[];if(typeof r=="string")if(e){if(e==="hex")for(r=r.replace(/[^a-z0-9]+/ig,""),r.length%2!==0&&(r="0"+r),i=0;i>6|192,t[n++]=s&63|128):s8e(r,i)?(s=65536+((s&1023)<<10)+(r.charCodeAt(++i)&1023),t[n++]=s>>18|240,t[n++]=s>>12&63|128,t[n++]=s>>6&63|128,t[n++]=s&63|128):(t[n++]=s>>12|224,t[n++]=s>>6&63|128,t[n++]=s&63|128)}else for(i=0;i>>24|r>>>8&65280|r<<8&16711680|(r&255)<<24;return e>>>0}Fr.htonl=VW;function c8e(r,e){for(var t="",n=0;n>>0}return s}Fr.join32=l8e;function u8e(r,e){for(var t=new Array(r.length*4),n=0,i=0;n>>24,t[i+1]=s>>>16&255,t[i+2]=s>>>8&255,t[i+3]=s&255):(t[i+3]=s>>>24,t[i+2]=s>>>16&255,t[i+1]=s>>>8&255,t[i]=s&255)}return t}Fr.split32=u8e;function h8e(r,e){return r>>>e|r<<32-e}Fr.rotr32=h8e;function d8e(r,e){return r<>>32-e}Fr.rotl32=d8e;function f8e(r,e){return r+e>>>0}Fr.sum32=f8e;function p8e(r,e,t){return r+e+t>>>0}Fr.sum32_3=p8e;function g8e(r,e,t,n){return r+e+t+n>>>0}Fr.sum32_4=g8e;function m8e(r,e,t,n,i){return r+e+t+n+i>>>0}Fr.sum32_5=m8e;function w8e(r,e,t,n){var i=r[e],s=r[e+1],o=n+s>>>0,a=(o>>0,r[e+1]=o}Fr.sum64=w8e;function v8e(r,e,t,n){var i=e+n>>>0,s=(i>>0}Fr.sum64_hi=v8e;function y8e(r,e,t,n){var i=e+n;return i>>>0}Fr.sum64_lo=y8e;function b8e(r,e,t,n,i,s,o,a){var c=0,l=e;l=l+n>>>0,c+=l>>0,c+=l>>0,c+=l>>0}Fr.sum64_4_hi=b8e;function _8e(r,e,t,n,i,s,o,a){var c=e+n+s+a;return c>>>0}Fr.sum64_4_lo=_8e;function x8e(r,e,t,n,i,s,o,a,c,l){var h=0,f=e;f=f+n>>>0,h+=f>>0,h+=f>>0,h+=f>>0,h+=f>>0}Fr.sum64_5_hi=x8e;function A8e(r,e,t,n,i,s,o,a,c,l){var h=e+n+s+a+l;return h>>>0}Fr.sum64_5_lo=A8e;function E8e(r,e,t){var n=e<<32-t|r>>>t;return n>>>0}Fr.rotr64_hi=E8e;function C8e(r,e,t){var n=r<<32-t|e>>>t;return n>>>0}Fr.rotr64_lo=C8e;function S8e(r,e,t){return r>>>t}Fr.shr64_hi=S8e;function I8e(r,e,t){var n=r<<32-t|e>>>t;return n>>>0}Fr.shr64_lo=I8e;var c2={},ZD=Fr,T8e=ab;function X5(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}c2.BlockHash=X5,X5.prototype.update=function(r,e){if(r=ZD.toArray(r,e),this.pending?this.pending=this.pending.concat(r):this.pending=r,this.pendingTotal+=r.length,this.pending.length>=this._delta8){r=this.pending;var t=r.length%this._delta8;this.pending=r.slice(r.length-t,r.length),this.pending.length===0&&(this.pending=null),r=ZD.join32(r,0,r.length-t,this.endian);for(var n=0;n>>24&255,n[i++]=r>>>16&255,n[i++]=r>>>8&255,n[i++]=r&255}else for(n[i++]=r&255,n[i++]=r>>>8&255,n[i++]=r>>>16&255,n[i++]=r>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,s=8;s>>3}eh.g0_256=O8e;function M8e(r){return xu(r,17)^xu(r,19)^r>>>10}eh.g1_256=M8e;var Nw=Fr,D8e=c2,$8e=eh,y7=Nw.rotl32,J2=Nw.sum32,B8e=Nw.sum32_5,L8e=$8e.ft_1,QW=D8e.BlockHash,U8e=[1518500249,1859775393,2400959708,3395469782];function au(){if(!(this instanceof au))return new au;QW.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}Nw.inherits(au,QW);var F8e=au;au.blockSize=512,au.outSize=160,au.hmacStrength=80,au.padLength=64,au.prototype._update=function(r,e){for(var t=this.W,n=0;n<16;n++)t[n]=r[e+n];for(;nthis.blockSize&&(r=new this.Hash().update(r).digest()),I_e(r.length<=this.blockSize);for(var e=r.length;e>8,v=h&255;f?c.push(f,v):c.push(v)}return c}t.toArray=n;function i(o){return o.length===1?"0"+o:o}t.zero2=i;function s(o){for(var a="",c=0;c(v>>1)-1?M=(v>>1)-$:M=$,y.isubn(M)):M=0,f[A]=M,y.iushrn(1)}return f}t.getNAF=n;function i(c,l){var h=[[],[]];c=c.clone(),l=l.clone();for(var f=0,v=0,y;c.cmpn(-f)>0||l.cmpn(-v)>0;){var A=c.andln(3)+f&3,M=l.andln(3)+v&3;A===3&&(A=-1),M===3&&(M=-1);var $;A&1?(y=c.andln(7)+f&7,(y===3||y===5)&&M===2?$=-A:$=A):$=0,h[0].push($);var L;M&1?(y=l.andln(7)+v&7,(y===3||y===5)&&A===2?L=-M:L=M):L=0,h[1].push(L),2*f===$+1&&(f=1-f),2*v===L+1&&(v=1-v),c.iushrn(1),l.iushrn(1)}return h}t.getJSF=i;function s(c,l,h){var f="_"+l;c.prototype[l]=function(){return this[f]!==void 0?this[f]:this[f]=h.call(this)}}t.cachedProperty=s;function o(c){return typeof c=="string"?t.toArray(c,"hex"):c}t.parseBytes=o;function a(c){return new wr(c,"hex","le")}t.intFromLE=a}),t4=ya.getNAF,k_e=ya.getJSF,w8=ya.assert;function af(r,e){this.type=r,this.p=new wr(e.p,16),this.red=e.prime?wr.red(e.prime):wr.mont(this.p),this.zero=new wr(0).toRed(this.red),this.one=new wr(1).toRed(this.red),this.two=new wr(2).toRed(this.red),this.n=e.n&&new wr(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var t=this.n&&this.p.div(this.n);!t||t.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var M1=af;af.prototype.point=function(){throw new Error("Not implemented")},af.prototype.validate=function(){throw new Error("Not implemented")},af.prototype._fixedNafMul=function(r,e){w8(r.precomputed);var t=r._getDoubles(),n=t4(e,1,this._bitLength),i=(1<=o;c--)a=(a<<1)+n[c];s.push(a)}for(var l=this.jpoint(null,null,null),h=this.jpoint(null,null,null),f=i;f>0;f--){for(o=0;o=0;a--){for(var c=0;a>=0&&s[a]===0;a--)c++;if(a>=0&&c++,o=o.dblp(c),a<0)break;var l=s[a];w8(l!==0),r.type==="affine"?l>0?o=o.mixedAdd(i[l-1>>1]):o=o.mixedAdd(i[-l-1>>1].neg()):l>0?o=o.add(i[l-1>>1]):o=o.add(i[-l-1>>1].neg())}return r.type==="affine"?o.toP():o},af.prototype._wnafMulAdd=function(r,e,t,n,i){var s=this._wnafT1,o=this._wnafT2,a=this._wnafT3,c=0,l,h,f;for(l=0;l=1;l-=2){var y=l-1,A=l;if(s[y]!==1||s[A]!==1){a[y]=t4(t[y],s[y],this._bitLength),a[A]=t4(t[A],s[A],this._bitLength),c=Math.max(a[y].length,c),c=Math.max(a[A].length,c);continue}var M=[e[y],null,null,e[A]];e[y].y.cmp(e[A].y)===0?(M[1]=e[y].add(e[A]),M[2]=e[y].toJ().mixedAdd(e[A].neg())):e[y].y.cmp(e[A].y.redNeg())===0?(M[1]=e[y].toJ().mixedAdd(e[A]),M[2]=e[y].add(e[A].neg())):(M[1]=e[y].toJ().mixedAdd(e[A]),M[2]=e[y].toJ().mixedAdd(e[A].neg()));var $=[-3,-1,-5,-7,0,7,5,1,3],L=k_e(t[y],t[A]);for(c=Math.max(L[0].length,c),a[y]=new Array(c),a[A]=new Array(c),h=0;h=0;l--){for(var Y=0;l>=0;){var I=!0;for(h=0;h=0&&Y++,F=F.dblp(Y),l<0)break;for(h=0;h0?f=o[h][T-1>>1]:T<0&&(f=o[h][-T-1>>1].neg()),f.type==="affine"?F=F.mixedAdd(f):F=F.add(f))}}for(l=0;l=Math.ceil((r.bitLength()+1)/e.step):!1},Ha.prototype._getDoubles=function(r,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var t=[this],n=this,i=0;i=0&&(v=c,y=l),h.negative&&(h=h.neg(),f=f.neg()),v.negative&&(v=v.neg(),y=y.neg()),[{a:h,b:f},{a:v,b:y}]},ac.prototype._endoSplit=function(r){var e=this.endo.basis,t=e[0],n=e[1],i=n.b.mul(r).divRound(this.n),s=t.b.neg().mul(r).divRound(this.n),o=i.mul(t.a),a=s.mul(n.a),c=i.mul(t.b),l=s.mul(n.b),h=r.sub(o).sub(a),f=c.add(l).neg();return{k1:h,k2:f}},ac.prototype.pointFromX=function(r,e){r=new wr(r,16),r.red||(r=r.toRed(this.red));var t=r.redSqr().redMul(r).redIAdd(r.redMul(this.a)).redIAdd(this.b),n=t.redSqrt();if(n.redSqr().redSub(t).cmp(this.zero)!==0)throw new Error("invalid point");var i=n.fromRed().isOdd();return(e&&!i||!e&&i)&&(n=n.redNeg()),this.point(r,n)},ac.prototype.validate=function(r){if(r.inf)return!0;var e=r.x,t=r.y,n=this.a.redMul(e),i=e.redSqr().redMul(e).redIAdd(n).redIAdd(this.b);return t.redSqr().redISub(i).cmpn(0)===0},ac.prototype._endoWnafMulAdd=function(r,e,t){for(var n=this._endoWnafT1,i=this._endoWnafT2,s=0;s":""},Vi.prototype.isInfinity=function(){return this.inf},Vi.prototype.add=function(r){if(this.inf)return r;if(r.inf)return this;if(this.eq(r))return this.dbl();if(this.neg().eq(r))return this.curve.point(null,null);if(this.x.cmp(r.x)===0)return this.curve.point(null,null);var e=this.y.redSub(r.y);e.cmpn(0)!==0&&(e=e.redMul(this.x.redSub(r.x).redInvm()));var t=e.redSqr().redISub(this.x).redISub(r.x),n=e.redMul(this.x.redSub(t)).redISub(this.y);return this.curve.point(t,n)},Vi.prototype.dbl=function(){if(this.inf)return this;var r=this.y.redAdd(this.y);if(r.cmpn(0)===0)return this.curve.point(null,null);var e=this.curve.a,t=this.x.redSqr(),n=r.redInvm(),i=t.redAdd(t).redIAdd(t).redIAdd(e).redMul(n),s=i.redSqr().redISub(this.x.redAdd(this.x)),o=i.redMul(this.x.redSub(s)).redISub(this.y);return this.curve.point(s,o)},Vi.prototype.getX=function(){return this.x.fromRed()},Vi.prototype.getY=function(){return this.y.fromRed()},Vi.prototype.mul=function(r){return r=new wr(r,16),this.isInfinity()?this:this._hasDoubles(r)?this.curve._fixedNafMul(this,r):this.curve.endo?this.curve._endoWnafMulAdd([this],[r]):this.curve._wnafMul(this,r)},Vi.prototype.mulAdd=function(r,e,t){var n=[this,e],i=[r,t];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},Vi.prototype.jmulAdd=function(r,e,t){var n=[this,e],i=[r,t];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},Vi.prototype.eq=function(r){return this===r||this.inf===r.inf&&(this.inf||this.x.cmp(r.x)===0&&this.y.cmp(r.y)===0)},Vi.prototype.neg=function(r){if(this.inf)return this;var e=this.curve.point(this.x,this.y.redNeg());if(r&&this.precomputed){var t=this.precomputed,n=function(i){return i.neg()};e.precomputed={naf:t.naf&&{wnd:t.naf.wnd,points:t.naf.points.map(n)},doubles:t.doubles&&{step:t.doubles.step,points:t.doubles.points.map(n)}}}return e},Vi.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var r=this.curve.jpoint(this.x,this.y,this.curve.one);return r};function rs(r,e,t,n){M1.BasePoint.call(this,r,"jacobian"),e===null&&t===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new wr(0)):(this.x=new wr(e,16),this.y=new wr(t,16),this.z=new wr(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}AT(rs,M1.BasePoint),ac.prototype.jpoint=function(r,e,t){return new rs(this,r,e,t)},rs.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var r=this.z.redInvm(),e=r.redSqr(),t=this.x.redMul(e),n=this.y.redMul(e).redMul(r);return this.curve.point(t,n)},rs.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},rs.prototype.add=function(r){if(this.isInfinity())return r;if(r.isInfinity())return this;var e=r.z.redSqr(),t=this.z.redSqr(),n=this.x.redMul(e),i=r.x.redMul(t),s=this.y.redMul(e.redMul(r.z)),o=r.y.redMul(t.redMul(this.z)),a=n.redSub(i),c=s.redSub(o);if(a.cmpn(0)===0)return c.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var l=a.redSqr(),h=l.redMul(a),f=n.redMul(l),v=c.redSqr().redIAdd(h).redISub(f).redISub(f),y=c.redMul(f.redISub(v)).redISub(s.redMul(h)),A=this.z.redMul(r.z).redMul(a);return this.curve.jpoint(v,y,A)},rs.prototype.mixedAdd=function(r){if(this.isInfinity())return r.toJ();if(r.isInfinity())return this;var e=this.z.redSqr(),t=this.x,n=r.x.redMul(e),i=this.y,s=r.y.redMul(e).redMul(this.z),o=t.redSub(n),a=i.redSub(s);if(o.cmpn(0)===0)return a.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var c=o.redSqr(),l=c.redMul(o),h=t.redMul(c),f=a.redSqr().redIAdd(l).redISub(h).redISub(h),v=a.redMul(h.redISub(f)).redISub(i.redMul(l)),y=this.z.redMul(o);return this.curve.jpoint(f,v,y)},rs.prototype.dblp=function(r){if(r===0)return this;if(this.isInfinity())return this;if(!r)return this.dbl();var e;if(this.curve.zeroA||this.curve.threeA){var t=this;for(e=0;e=0)return!1;if(t.redIAdd(i),this.x.cmp(t)===0)return!0}},rs.prototype.inspect=function(){return this.isInfinity()?"":""},rs.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var j4=u2(function(r,e){var t=e;t.base=M1,t.short=P_e,t.mont=null,t.edwards=null}),H4=u2(function(r,e){var t=e,n=ya.assert;function i(a){a.type==="short"?this.curve=new j4.short(a):a.type==="edwards"?this.curve=new j4.edwards(a):this.curve=new j4.mont(a),this.g=this.curve.g,this.n=this.curve.n,this.hash=a.hash,n(this.g.validate(),"Invalid curve"),n(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}t.PresetCurve=i;function s(a,c){Object.defineProperty(t,a,{configurable:!0,enumerable:!0,get:function(){var l=new i(c);return Object.defineProperty(t,a,{configurable:!0,enumerable:!0,value:l}),l}})}s("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:Vl.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),s("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:Vl.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),s("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:Vl.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),s("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:Vl.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),s("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:Vl.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),s("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Vl.sha256,gRed:!1,g:["9"]}),s("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Vl.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var o;try{o=null.crash()}catch{o=void 0}s("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:Vl.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",o]})});function cf(r){if(!(this instanceof cf))return new cf(r);this.hash=r.hash,this.predResist=!!r.predResist,this.outLen=this.hash.outSize,this.minEntropy=r.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=nl.toArray(r.entropy,r.entropyEnc||"hex"),t=nl.toArray(r.nonce,r.nonceEnc||"hex"),n=nl.toArray(r.pers,r.persEnc||"hex");xT(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,t,n)}var XD=cf;cf.prototype._init=function(r,e,t){var n=r.concat(e).concat(t);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(r.concat(t||[])),this._reseed=1},cf.prototype.generate=function(r,e,t,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof e!="string"&&(n=t,t=e,e=null),t&&(t=nl.toArray(t,n||"hex"),this._update(t));for(var i=[];i.length"};var O_e=ya.assert;function K_(r,e){if(r instanceof K_)return r;this._importDER(r,e)||(O_e(r.r&&r.s,"Signature without r or s"),this.r=new wr(r.r,16),this.s=new wr(r.s,16),r.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=r.recoveryParam)}var r4=K_;function M_e(){this.place=0}function E7(r,e){var t=r[e.place++];if(!(t&128))return t;var n=t&15;if(n===0||n>4)return!1;for(var i=0,s=0,o=e.place;s>>=0;return i<=127?!1:(e.place=o,i)}function e$(r){for(var e=0,t=r.length-1;!r[e]&&!(r[e+1]&128)&&e>>3);for(r.push(t|128);--t;)r.push(e>>>(t<<3)&255);r.push(e)}K_.prototype.toDER=function(r){var e=this.r.toArray(),t=this.s.toArray();for(e[0]&128&&(e=[0].concat(e)),t[0]&128&&(t=[0].concat(t)),e=e$(e),t=e$(t);!t[0]&&!(t[1]&128);)t=t.slice(1);var n=[2];C7(n,e.length),n=n.concat(e),n.push(2),C7(n,t.length);var i=n.concat(t),s=[48];return C7(s,i.length),s=s.concat(i),ya.encode(s,r)};var D_e=function(){throw new Error("unsupported")},lz=ya.assert;function Xa(r){if(!(this instanceof Xa))return new Xa(r);typeof r=="string"&&(lz(Object.prototype.hasOwnProperty.call(H4,r),"Unknown curve "+r),r=H4[r]),r instanceof H4.PresetCurve&&(r={curve:r}),this.curve=r.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=r.curve.g,this.g.precompute(r.curve.n.bitLength()+1),this.hash=r.hash||r.curve.hash}var $_e=Xa;Xa.prototype.keyPair=function(r){return new A7(this,r)},Xa.prototype.keyFromPrivate=function(r,e){return A7.fromPrivate(this,r,e)},Xa.prototype.keyFromPublic=function(r,e){return A7.fromPublic(this,r,e)},Xa.prototype.genKeyPair=function(r){r||(r={});for(var e=new XD({hash:this.hash,pers:r.pers,persEnc:r.persEnc||"utf8",entropy:r.entropy||D_e(this.hash.hmacStrength),entropyEnc:r.entropy&&r.entropyEnc||"utf8",nonce:this.n.toArray()}),t=this.n.byteLength(),n=this.n.sub(new wr(2));;){var i=new wr(e.generate(t));if(!(i.cmp(n)>0))return i.iaddn(1),this.keyFromPrivate(i)}},Xa.prototype._truncateToN=function(r,e){var t=r.byteLength()*8-this.n.bitLength();return t>0&&(r=r.ushrn(t)),!e&&r.cmp(this.n)>=0?r.sub(this.n):r},Xa.prototype.sign=function(r,e,t,n){typeof t=="object"&&(n=t,t=null),n||(n={}),e=this.keyFromPrivate(e,t),r=this._truncateToN(new wr(r,16));for(var i=this.n.byteLength(),s=e.getPrivate().toArray("be",i),o=r.toArray("be",i),a=new XD({hash:this.hash,entropy:s,nonce:o,pers:n.pers,persEnc:n.persEnc||"utf8"}),c=this.n.sub(new wr(1)),l=0;;l++){var h=n.k?n.k(l):new wr(a.generate(this.n.byteLength()));if(h=this._truncateToN(h,!0),!(h.cmpn(1)<=0||h.cmp(c)>=0)){var f=this.g.mul(h);if(!f.isInfinity()){var v=f.getX(),y=v.umod(this.n);if(y.cmpn(0)!==0){var A=h.invm(this.n).mul(y.mul(e.getPrivate()).iadd(r));if(A=A.umod(this.n),A.cmpn(0)!==0){var M=(f.getY().isOdd()?1:0)|(v.cmp(y)!==0?2:0);return n.canonical&&A.cmp(this.nh)>0&&(A=this.n.sub(A),M^=1),new r4({r:y,s:A,recoveryParam:M})}}}}}},Xa.prototype.verify=function(r,e,t,n){r=this._truncateToN(new wr(r,16)),t=this.keyFromPublic(t,n),e=new r4(e,"hex");var i=e.r,s=e.s;if(i.cmpn(1)<0||i.cmp(this.n)>=0||s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var o=s.invm(this.n),a=o.mul(r).umod(this.n),c=o.mul(i).umod(this.n),l;return this.curve._maxwellTrick?(l=this.g.jmulAdd(a,t.getPublic(),c),l.isInfinity()?!1:l.eqXToP(i)):(l=this.g.mulAdd(a,t.getPublic(),c),l.isInfinity()?!1:l.getX().umod(this.n).cmp(i)===0)},Xa.prototype.recoverPubKey=function(r,e,t,n){lz((3&t)===t,"The recovery param is more than two bits"),e=new r4(e,n);var i=this.n,s=new wr(r),o=e.r,a=e.s,c=t&1,l=t>>1;if(o.cmp(this.curve.p.umod(this.curve.n))>=0&&l)throw new Error("Unable to find sencond key candinate");l?o=this.curve.pointFromX(o.add(this.curve.n),c):o=this.curve.pointFromX(o,c);var h=e.r.invm(i),f=i.sub(s).mul(h).umod(i),v=a.mul(h).umod(i);return this.g.mulAdd(f,o,v)},Xa.prototype.getKeyRecoveryParam=function(r,e,t,n){if(e=new r4(e,n),e.recoveryParam!==null)return e.recoveryParam;for(var i=0;i<4;i++){var s;try{s=this.recoverPubKey(r,e,i)}catch{continue}if(s.eq(t))return i}throw new Error("Unable to find valid recovery factor")};var B_e=u2(function(r,e){var t=e;t.version="6.5.4",t.utils=ya,t.rand=function(){throw new Error("unsupported")},t.curve=j4,t.curves=H4,t.ec=$_e,t.eddsa=null});B_e.ec;var t$;(function(r){r[r.legacy=0]="legacy",r[r.eip2930=1]="eip2930",r[r.eip1559=2]="eip1559"})(t$||(t$={}));const L_e="6.13.2";function U_e(r,e,t){const n=e.split("|").map(s=>s.trim());for(let s=0;sPromise.resolve(r[n])))).reduce((n,i,s)=>(n[e[s]]=i,n),{})}function tr(r,e,t){for(let n in e){let i=e[n];const s=t?t[n]:null;s&&U_e(i,s,n),Object.defineProperty(r,n,{enumerable:!0,value:i,writable:!1})}}function Mg(r){if(r==null)return"null";if(Array.isArray(r))return"[ "+r.map(Mg).join(", ")+" ]";if(r instanceof Uint8Array){const e="0123456789abcdef";let t="0x";for(let n=0;n>4],t+=e[r[n]&15];return t}if(typeof r=="object"&&typeof r.toJSON=="function")return Mg(r.toJSON());switch(typeof r){case"boolean":case"symbol":return r.toString();case"bigint":return BigInt(r).toString();case"number":return r.toString();case"string":return JSON.stringify(r);case"object":{const e=Object.keys(r);return e.sort(),"{ "+e.map(t=>`${Mg(t)}: ${Mg(r[t])}`).join(", ")+" }"}}return"[ COULD NOT SERIALIZE ]"}function ks(r,e){return r&&r.code===e}function ET(r){return ks(r,"CALL_EXCEPTION")}function jn(r,e,t){let n=r;{const s=[];if(t){if("message"in t||"code"in t||"name"in t)throw new Error(`value will overwrite populated values: ${Mg(t)}`);for(const o in t){if(o==="shortMessage")continue;const a=t[o];s.push(o+"="+Mg(a))}}s.push(`code=${e}`),s.push(`version=${L_e}`),s.length&&(r+=" ("+s.join(", ")+")")}let i;switch(e){case"INVALID_ARGUMENT":i=new TypeError(r);break;case"NUMERIC_FAULT":case"BUFFER_OVERRUN":i=new RangeError(r);break;default:i=new Error(r)}return tr(i,{code:e}),t&&Object.assign(i,t),i.shortMessage==null&&tr(i,{shortMessage:n}),i}function Ze(r,e,t,n){if(!r)throw jn(e,t,n)}function Ae(r,e,t,n){Ze(r,e,"INVALID_ARGUMENT",{argument:t,value:n})}function uz(r,e,t){t==null&&(t=""),t&&(t=": "+t),Ze(r>=e,"missing arguemnt"+t,"MISSING_ARGUMENT",{count:r,expectedCount:e}),Ze(r<=e,"too many arguments"+t,"UNEXPECTED_ARGUMENT",{count:r,expectedCount:e})}["NFD","NFC","NFKD","NFKC"].reduce((r,e)=>{try{if("test".normalize(e)!=="test")throw new Error("bad");if(e==="NFD"&&"é".normalize("NFD")!=="é")throw new Error("broken");r.push(e)}catch{}return r},[]);function cb(r,e,t){if(t==null&&(t=""),r!==e){let n=t,i="new";t&&(n+=".",i+=" "+t),Ze(!1,`private constructor; use ${n}from* methods`,"UNSUPPORTED_OPERATION",{operation:i})}}function hz(r,e,t){if(r instanceof Uint8Array)return t?new Uint8Array(r):r;if(typeof r=="string"&&r.match(/^0x(?:[0-9a-f][0-9a-f])*$/i)){const n=new Uint8Array((r.length-2)/2);let i=2;for(let s=0;s>4]+r$[i&15]}return t}function vi(r){return"0x"+r.map(e=>Ft(e).substring(2)).join("")}function sm(r){return Tn(r,!0)?(r.length-2)/2:Zr(r).length}function ni(r,e,t){const n=Zr(r);return t!=null&&t>n.length&&Ze(!1,"cannot slice beyond data bounds","BUFFER_OVERRUN",{buffer:n,length:n.length,offset:t}),Ft(n.slice(e??0,t??n.length))}function dz(r,e,t){const n=Zr(r);Ze(e>=n.length,"padding exceeds data length","BUFFER_OVERRUN",{buffer:new Uint8Array(n),length:e,offset:e+1});const i=new Uint8Array(e);return i.fill(0),t?i.set(n,e-n.length):i.set(n,0),Ft(i)}function a1(r,e){return dz(r,e,!0)}function F_e(r,e){return dz(r,e,!1)}const G_=BigInt(0),Xc=BigInt(1),Dg=9007199254740991;function v8(r,e){const t=Z_(r,"value"),n=BigInt(Sr(e,"width"));if(Ze(t>>n===G_,"overflow","NUMERIC_FAULT",{operation:"fromTwos",fault:"overflow",value:r}),t>>n-Xc){const i=(Xc<=-Dg&&r<=Dg,"overflow",e||"value",r),BigInt(r);case"string":try{if(r==="")throw new Error("empty string");return r[0]==="-"&&r[1]!=="-"?-BigInt(r.substring(1)):BigInt(r)}catch(t){Ae(!1,`invalid BigNumberish string: ${t.message}`,e||"value",r)}}Ae(!1,"invalid BigNumberish value",e||"value",r)}function Z_(r,e){const t=qt(r,e);return Ze(t>=G_,"unsigned value cannot be negative","NUMERIC_FAULT",{fault:"overflow",operation:"getUint",value:r}),t}const n$="0123456789abcdef";function Y_(r){if(r instanceof Uint8Array){let e="0x0";for(const t of r)e+=n$[t>>4],e+=n$[t&15];return BigInt(e)}return qt(r)}function Sr(r,e){switch(typeof r){case"bigint":return Ae(r>=-Dg&&r<=Dg,"overflow",e||"value",r),Number(r);case"number":return Ae(Number.isInteger(r),"underflow",e||"value",r),Ae(r>=-Dg&&r<=Dg,"overflow",e||"value",r),r;case"string":try{if(r==="")throw new Error("empty string");return Sr(BigInt(r),e)}catch(t){Ae(!1,`invalid numeric string: ${t.message}`,e||"value",r)}}Ae(!1,"invalid numeric value",e||"value",r)}function j_e(r){return Sr(Y_(r))}function Zf(r,e){let n=Z_(r,"value").toString(16);if(e==null)n.length%2&&(n="0"+n);else{const i=Sr(e,"width");for(Ze(i*2>=n.length,`value exceeds width (${i} bytes)`,"NUMERIC_FAULT",{operation:"toBeHex",fault:"overflow",value:r});n.length>6===2;o++)s++;return s}return r==="OVERRUN"?t.length-e-1:0}function q_e(r,e,t,n,i){return r==="OVERLONG"?(Ae(typeof i=="number","invalid bad code point for replacement","badCodepoint",i),n.push(i),0):(n.push(65533),gz(r,e,t))}const K_e=Object.freeze({error:V_e,ignore:gz,replace:q_e});function G_e(r,e){e==null&&(e=K_e.error);const t=Zr(r,"bytes"),n=[];let i=0;for(;i>7)){n.push(s);continue}let o=null,a=null;if((s&224)===192)o=1,a=127;else if((s&240)===224)o=2,a=2047;else if((s&248)===240)o=3,a=65535;else{(s&192)===128?i+=e("UNEXPECTED_CONTINUE",i-1,t,n):i+=e("BAD_PREFIX",i-1,t,n);continue}if(i-1+o>=t.length){i+=e("OVERRUN",i-1,t,n);continue}let c=s&(1<<8-o-1)-1;for(let l=0;l1114111){i+=e("OUT_OF_RANGE",i-1-o,t,n,c);continue}if(c>=55296&&c<=57343){i+=e("UTF16_SURROGATE",i-1-o,t,n,c);continue}if(c<=a){i+=e("OVERLONG",i-1-o,t,n,c);continue}n.push(c)}}return n}function Cu(r,e){Ae(typeof r=="string","invalid string value","str",r);let t=[];for(let n=0;n>6|192),t.push(i&63|128);else if((i&64512)==55296){n++;const s=r.charCodeAt(n);Ae(n>18|240),t.push(o>>12&63|128),t.push(o>>6&63|128),t.push(o&63|128)}else t.push(i>>12|224),t.push(i>>6&63|128),t.push(i&63|128)}return new Uint8Array(t)}function Z_e(r){return r.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function y8(r,e){return Z_e(G_e(r,e))}function mz(r){async function e(t,n){Ze(n==null||!n.cancelled,"request cancelled before sending","CANCELLED");const i=t.url.split(":")[0].toLowerCase();Ze(i==="http"||i==="https",`unsupported protocol ${i}`,"UNSUPPORTED_OPERATION",{info:{protocol:i},operation:"request"}),Ze(i==="https"||!t.credentials||t.allowInsecureAuthentication,"insecure authorized connections unsupported","UNSUPPORTED_OPERATION",{operation:"request"});let s=null;const o=new AbortController,a=setTimeout(()=>{s=jn("request timeout","TIMEOUT"),o.abort()},t.timeout);n&&n.addListener(()=>{s=jn("request cancelled","CANCELLED"),o.abort()});const c={method:t.method,headers:new Headers(Array.from(t)),body:t.body||void 0,signal:o.signal};let l;try{l=await fetch(t.url,c)}catch(y){throw clearTimeout(a),s||y}clearTimeout(a);const h={};l.headers.forEach((y,A)=>{h[A.toLowerCase()]=y});const f=await l.arrayBuffer(),v=f==null?null:new Uint8Array(f);return{statusCode:l.status,statusMessage:l.statusText,headers:h,body:v}}return e}const Y_e=12,Q_e=250;let o$=mz();const J_e=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),X_e=new RegExp("^ipfs://(ipfs/)?(.*)$","i");let S7=!1;async function wz(r,e){try{const t=r.match(J_e);if(!t)throw new Error("invalid data");return new Bf(200,"OK",{"content-type":t[1]||"text/plain"},t[2]?W_e(t[3]):txe(t[3]))}catch{return new Bf(599,"BAD REQUEST (invalid data: URI)",{},null,new Wu(r))}}function vz(r){async function e(t,n){try{const i=t.match(X_e);if(!i)throw new Error("invalid link");return new Wu(`${r}${i[2]}`)}catch{return new Bf(599,"BAD REQUEST (invalid IPFS URI)",{},null,new Wu(t))}}return e}const n4={data:wz,ipfs:vz("https://gateway.ipfs.io/ipfs/")},yz=new WeakMap;var np,lf;class exe{constructor(e){Le(this,np);Le(this,lf);de(this,np,[]),de(this,lf,!1),yz.set(e,()=>{if(!ee(this,lf)){de(this,lf,!0);for(const t of ee(this,np))setTimeout(()=>{t()},0);de(this,np,[])}})}addListener(e){Ze(!ee(this,lf),"singal already cancelled","UNSUPPORTED_OPERATION",{operation:"fetchCancelSignal.addCancelListener"}),ee(this,np).push(e)}get cancelled(){return ee(this,lf)}checkSignal(){Ze(!this.cancelled,"cancelled","CANCELLED",{})}}np=new WeakMap,lf=new WeakMap;function i4(r){if(r==null)throw new Error("missing signal; should not happen");return r.checkSignal(),r}var fm,pm,Hc,Oh,gm,mm,Yi,ta,Mh,ip,sp,op,Zl,Wc,uf,ap,h3;const B8=class B8{constructor(e){Le(this,ap);Le(this,fm);Le(this,pm);Le(this,Hc);Le(this,Oh);Le(this,gm);Le(this,mm);Le(this,Yi);Le(this,ta);Le(this,Mh);Le(this,ip);Le(this,sp);Le(this,op);Le(this,Zl);Le(this,Wc);Le(this,uf);de(this,mm,String(e)),de(this,fm,!1),de(this,pm,!0),de(this,Hc,{}),de(this,Oh,""),de(this,gm,3e5),de(this,Wc,{slotInterval:Q_e,maxAttempts:Y_e}),de(this,uf,null)}get url(){return ee(this,mm)}set url(e){de(this,mm,String(e))}get body(){return ee(this,Yi)==null?null:new Uint8Array(ee(this,Yi))}set body(e){if(e==null)de(this,Yi,void 0),de(this,ta,void 0);else if(typeof e=="string")de(this,Yi,Cu(e)),de(this,ta,"text/plain");else if(e instanceof Uint8Array)de(this,Yi,e),de(this,ta,"application/octet-stream");else if(typeof e=="object")de(this,Yi,Cu(JSON.stringify(e))),de(this,ta,"application/json");else throw new Error("invalid body")}hasBody(){return ee(this,Yi)!=null}get method(){return ee(this,Oh)?ee(this,Oh):this.hasBody()?"POST":"GET"}set method(e){e==null&&(e=""),de(this,Oh,String(e).toUpperCase())}get headers(){const e=Object.assign({},ee(this,Hc));return ee(this,Mh)&&(e.authorization=`Basic ${z_e(Cu(ee(this,Mh)))}`),this.allowGzip&&(e["accept-encoding"]="gzip"),e["content-type"]==null&&ee(this,ta)&&(e["content-type"]=ee(this,ta)),this.body&&(e["content-length"]=String(this.body.length)),e}getHeader(e){return this.headers[e.toLowerCase()]}setHeader(e,t){ee(this,Hc)[String(e).toLowerCase()]=String(t)}clearHeaders(){de(this,Hc,{})}[Symbol.iterator](){const e=this.headers,t=Object.keys(e);let n=0;return{next:()=>{if(n=0,"timeout must be non-zero","timeout",e),de(this,gm,e)}get preflightFunc(){return ee(this,ip)||null}set preflightFunc(e){de(this,ip,e)}get processFunc(){return ee(this,sp)||null}set processFunc(e){de(this,sp,e)}get retryFunc(){return ee(this,op)||null}set retryFunc(e){de(this,op,e)}get getUrlFunc(){return ee(this,uf)||o$}set getUrlFunc(e){de(this,uf,e)}toString(){return``}setThrottleParams(e){e.slotInterval!=null&&(ee(this,Wc).slotInterval=e.slotInterval),e.maxAttempts!=null&&(ee(this,Wc).maxAttempts=e.maxAttempts)}send(){return Ze(ee(this,Zl)==null,"request already sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.send"}),de(this,Zl,new exe(this)),rt(this,ap,h3).call(this,0,a$()+this.timeout,0,this,new Bf(0,"",{},null,this))}cancel(){Ze(ee(this,Zl)!=null,"request has not been sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.cancel"});const e=yz.get(this);if(!e)throw new Error("missing signal; should not happen");e()}redirect(e){const t=this.url.split(":")[0].toLowerCase(),n=e.split(":")[0].toLowerCase();Ze(this.method==="GET"&&(t!=="https"||n!=="http")&&e.match(/^https?:/),"unsupported redirect","UNSUPPORTED_OPERATION",{operation:`redirect(${this.method} ${JSON.stringify(this.url)} => ${JSON.stringify(e)})`});const i=new B8(e);return i.method="GET",i.allowGzip=this.allowGzip,i.timeout=this.timeout,de(i,Hc,Object.assign({},ee(this,Hc))),ee(this,Yi)&&de(i,Yi,new Uint8Array(ee(this,Yi))),de(i,ta,ee(this,ta)),i}clone(){const e=new B8(this.url);return de(e,Oh,ee(this,Oh)),ee(this,Yi)&&de(e,Yi,ee(this,Yi)),de(e,ta,ee(this,ta)),de(e,Hc,Object.assign({},ee(this,Hc))),de(e,Mh,ee(this,Mh)),this.allowGzip&&(e.allowGzip=!0),e.timeout=this.timeout,this.allowInsecureAuthentication&&(e.allowInsecureAuthentication=!0),de(e,ip,ee(this,ip)),de(e,sp,ee(this,sp)),de(e,op,ee(this,op)),de(e,Wc,Object.assign({},ee(this,Wc))),de(e,uf,ee(this,uf)),e}static lockConfig(){S7=!0}static getGateway(e){return n4[e.toLowerCase()]||null}static registerGateway(e,t){if(e=e.toLowerCase(),e==="http"||e==="https")throw new Error(`cannot intercept ${e}; use registerGetUrl`);if(S7)throw new Error("gateways locked");n4[e]=t}static registerGetUrl(e){if(S7)throw new Error("gateways locked");o$=e}static createGetUrlFunc(e){return mz()}static createDataGateway(){return wz}static createIpfsGatewayFunc(e){return vz(e)}};fm=new WeakMap,pm=new WeakMap,Hc=new WeakMap,Oh=new WeakMap,gm=new WeakMap,mm=new WeakMap,Yi=new WeakMap,ta=new WeakMap,Mh=new WeakMap,ip=new WeakMap,sp=new WeakMap,op=new WeakMap,Zl=new WeakMap,Wc=new WeakMap,uf=new WeakMap,ap=new WeakSet,h3=async function(e,t,n,i,s){var h,f,v;if(e>=ee(this,Wc).maxAttempts)return s.makeServerError("exceeded maximum retry limit");Ze(a$()<=t,"timeout","TIMEOUT",{operation:"request.send",reason:"timeout",request:i}),n>0&&await rxe(n);let o=this.clone();const a=(o.url.split(":")[0]||"").toLowerCase();if(a in n4){const y=await n4[a](o.url,i4(ee(i,Zl)));if(y instanceof Bf){let A=y;if(this.processFunc){i4(ee(i,Zl));try{A=await this.processFunc(o,A)}catch(M){(M.throttle==null||typeof M.stall!="number")&&A.makeServerError("error in post-processing function",M).assertOk()}}return A}o=y}this.preflightFunc&&(o=await this.preflightFunc(o));const c=await this.getUrlFunc(o,i4(ee(i,Zl)));let l=new Bf(c.statusCode,c.statusMessage,c.headers,c.body,i);if(l.statusCode===301||l.statusCode===302){try{const y=l.headers.location||"";return rt(h=o.redirect(y),ap,h3).call(h,e+1,t,0,i,l)}catch{}return l}else if(l.statusCode===429&&(this.retryFunc==null||await this.retryFunc(o,l,e))){const y=l.headers["retry-after"];let A=ee(this,Wc).slotInterval*Math.trunc(Math.random()*Math.pow(2,e));return typeof y=="string"&&y.match(/^[1-9][0-9]*$/)&&(A=parseInt(y)),rt(f=o.clone(),ap,h3).call(f,e+1,t,A,i,l)}if(this.processFunc){i4(ee(i,Zl));try{l=await this.processFunc(o,l)}catch(y){(y.throttle==null||typeof y.stall!="number")&&l.makeServerError("error in post-processing function",y).assertOk();let A=ee(this,Wc).slotInterval*Math.trunc(Math.random()*Math.pow(2,e));return y.stall>=0&&(A=y.stall),rt(v=o.clone(),ap,h3).call(v,e+1,t,A,i,l)}}return l};let Wu=B8;var oy,ay,cy,ra,wm,cp;const oR=class oR{constructor(e,t,n,i,s){Le(this,oy);Le(this,ay);Le(this,cy);Le(this,ra);Le(this,wm);Le(this,cp);de(this,oy,e),de(this,ay,t),de(this,cy,Object.keys(n).reduce((o,a)=>(o[a.toLowerCase()]=String(n[a]),o),{})),de(this,ra,i==null?null:new Uint8Array(i)),de(this,wm,s||null),de(this,cp,{message:""})}toString(){return``}get statusCode(){return ee(this,oy)}get statusMessage(){return ee(this,ay)}get headers(){return Object.assign({},ee(this,cy))}get body(){return ee(this,ra)==null?null:new Uint8Array(ee(this,ra))}get bodyText(){try{return ee(this,ra)==null?"":y8(ee(this,ra))}catch{Ze(!1,"response body is not valid UTF-8 data","UNSUPPORTED_OPERATION",{operation:"bodyText",info:{response:this}})}}get bodyJson(){try{return JSON.parse(this.bodyText)}catch{Ze(!1,"response body is not valid JSON","UNSUPPORTED_OPERATION",{operation:"bodyJson",info:{response:this}})}}[Symbol.iterator](){const e=this.headers,t=Object.keys(e);let n=0;return{next:()=>{if(n=0,"invalid stall timeout","stall",t);const n=new Error(e||"throttling requests");throw tr(n,{stall:t,throttle:!0}),n}getHeader(e){return this.headers[e.toLowerCase()]}hasBody(){return ee(this,ra)!=null}get request(){return ee(this,wm)}ok(){return ee(this,cp).message===""&&this.statusCode>=200&&this.statusCode<300}assertOk(){if(this.ok())return;let{message:e,error:t}=ee(this,cp);e===""&&(e=`server response ${this.statusCode} ${this.statusMessage}`);let n=null;this.request&&(n=this.request.url);let i=null;try{ee(this,ra)&&(i=y8(ee(this,ra)))}catch{}Ze(!1,e,"SERVER_ERROR",{request:this.request||"unknown request",response:this,error:t,info:{requestUrl:n,responseBody:i,responseStatus:`${this.statusCode} ${this.statusMessage}`}})}};oy=new WeakMap,ay=new WeakMap,cy=new WeakMap,ra=new WeakMap,wm=new WeakMap,cp=new WeakMap;let Bf=oR;function a$(){return new Date().getTime()}function txe(r){return Cu(r.replace(/%([0-9a-f][0-9a-f])/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))}function rxe(r){return new Promise(e=>setTimeout(e,r))}const nxe=BigInt(-1),Bc=BigInt(0),Bg=BigInt(1),ixe=BigInt(5),hg={};let om="0000";for(;om.length<80;)om+=om;function $0(r){let e=om;for(;e.length=-i&&rBc?r=v8(X0(r,n),n):r=-v8(X0(-r,n),n)}else{const i=Bg<=0&&rs[a]==null?l:(Ae(typeof s[a]===c,"invalid fixed format ("+a+" not "+c+")","format."+a,s[a]),s[a]);e=o("signed","boolean",e),t=o("width","number",t),n=o("decimals","number",n)}Ae(t%8===0,"invalid FixedNumber width (not byte aligned)","format.width",t),Ae(n<=80,"invalid FixedNumber decimals (too large)","format.decimals",n);const i=(e?"":"u")+"fixed"+String(t)+"x"+String(n);return{signed:e,width:t,decimals:n,name:i}}function sxe(r,e){let t="";r0?n*=$0(i):i<0&&(t*=$0(-i)),tn?1:0}eq(e){return this.cmp(e)===0}lt(e){return this.cmp(e)<0}lte(e){return this.cmp(e)<=0}gt(e){return this.cmp(e)>0}gte(e){return this.cmp(e)>=0}floor(){let e=ee(this,wn);return ee(this,wn)Bc&&(e+=ee(this,Vs)-Bg),e=ee(this,wn)/ee(this,Vs)*ee(this,Vs),rt(this,ln,Eh).call(this,e,"ceiling")}round(e){if(e==null&&(e=0),e>=this.decimals)return this;const t=this.decimals-e,n=ixe*$0(t-1);let i=this.value+n;const s=$0(t);return i=i/s*s,e3(i,ee(this,zc),"round"),new ef(hg,i,ee(this,zc))}isZero(){return ee(this,wn)===Bc}isNegative(){return ee(this,wn)0){const c=$0(a);Ze(o%c===Bc,"value loses precision for format","NUMERIC_FAULT",{operation:"fromValue",fault:"underflow",value:e}),o/=c}else a<0&&(o*=$0(-a));return e3(o,s,"fromValue"),new ef(hg,o,s)}static fromString(e,t){const n=e.match(/^(-?)([0-9]*)\.?([0-9]*)$/);Ae(n&&n[2].length+n[3].length>0,"invalid FixedNumber string value","value",e);const i=I7(t);let s=n[2]||"0",o=n[3]||"";for(;o.length{Ze(n<=r.length,"data short segment too short","BUFFER_OVERRUN",{buffer:r,length:r.length,offset:n})};if(r[e]>=248){const n=r[e]-247;t(e+1+n);const i=c$(r,e+1,n);return t(e+1+n+i),l$(r,e,e+1+n,n+i)}else if(r[e]>=192){const n=r[e]-192;return t(e+1+n),l$(r,e,e+1,n)}else if(r[e]>=184){const n=r[e]-183;t(e+1+n);const i=c$(r,e+1,n);t(e+1+n+i);const s=Ft(r.slice(e+1+n,e+1+n+i));return{consumed:1+n+i,result:s}}else if(r[e]>=128){const n=r[e]-128;t(e+1+n);const i=Ft(r.slice(e+1,e+1+n));return{consumed:1+n,result:i}}return{consumed:1,result:oxe(r[e])}}function Q_(r){const e=Zr(r,"data"),t=bz(e,0);return Ae(t.consumed===e.length,"unexpected junk after rlp payload","data",r),t.result}function u$(r){const e=[];for(;r;)e.unshift(r&255),r>>=8;return e}function _z(r){if(Array.isArray(r)){let n=[];if(r.forEach(function(s){n=n.concat(_z(s))}),n.length<=55)return n.unshift(192+n.length),n;const i=u$(n.length);return i.unshift(247+i.length),i.concat(n)}const e=Array.prototype.slice.call(Zr(r,"object"));if(e.length===1&&e[0]<=127)return e;if(e.length<=55)return e.unshift(128+e.length),e;const t=u$(e.length);return t.unshift(183+t.length),t.concat(e)}const h$="0123456789abcdef";function c1(r){let e="0x";for(const t of _z(r))e+=h$[t>>4],e+=h$[t&15];return e}const xz=["wei","kwei","mwei","gwei","szabo","finney","ether"];function Az(r,e){let t=18;if(typeof e=="string"){const n=xz.indexOf(e);Ae(n>=0,"invalid unit","unit",e),t=3*n}else e!=null&&(t=Sr(e,"unit"));return b8.fromValue(r,t,{decimals:t,width:512}).toString()}function axe(r,e){Ae(typeof r=="string","value must be a string","value",r);let t=18;if(typeof e=="string"){const n=xz.indexOf(e);Ae(n>=0,"invalid unit","unit",e),t=3*n}else e!=null&&(t=Sr(e,"unit"));return b8.fromString(r,{decimals:t,width:512}).value}function cxe(r){return Az(r,18)}const ro=32,KC=new Uint8Array(ro),lxe=["then"],s4={},Ez=new WeakMap;function j0(r){return Ez.get(r)}function d$(r,e){Ez.set(r,e)}function t3(r,e){const t=new Error(`deferred error during ABI decoding triggered accessing ${r}`);throw t.error=e,t}function GC(r,e,t){return r.indexOf(null)>=0?e.map((n,i)=>n instanceof Ow?GC(j0(n),n,t):n):r.reduce((n,i,s)=>{let o=e.getValue(i);return i in n||(t&&o instanceof Ow&&(o=GC(j0(o),o,t)),n[i]=o),n},{})}var vm;const Ug=class Ug extends Array{constructor(...t){const n=t[0];let i=t[1],s=(t[2]||[]).slice(),o=!0;n!==s4&&(i=t,s=[],o=!1);super(i.length);Le(this,vm);i.forEach((l,h)=>{this[h]=l});const a=s.reduce((l,h)=>(typeof h=="string"&&l.set(h,(l.get(h)||0)+1),l),new Map);if(d$(this,Object.freeze(i.map((l,h)=>{const f=s[h];return f!=null&&a.get(f)===1?f:null}))),de(this,vm,[]),ee(this,vm)==null&&ee(this,vm),!o)return;Object.freeze(this);const c=new Proxy(this,{get:(l,h,f)=>{if(typeof h=="string"){if(h.match(/^[0-9]+$/)){const y=Sr(h,"%index");if(y<0||y>=this.length)throw new RangeError("out of result range");const A=l[y];return A instanceof Error&&t3(`index ${y}`,A),A}if(lxe.indexOf(h)>=0)return Reflect.get(l,h,f);const v=l[h];if(v instanceof Function)return function(...y){return v.apply(this===f?l:this,y)};if(!(h in l))return l.getValue.apply(this===f?l:this,[h])}return Reflect.get(l,h,f)}});return d$(c,j0(this)),c}toArray(t){const n=[];return this.forEach((i,s)=>{i instanceof Error&&t3(`index ${s}`,i),t&&i instanceof Ug&&(i=i.toArray(t)),n.push(i)}),n}toObject(t){const n=j0(this);return n.reduce((i,s,o)=>(Ze(s!=null,`value at index ${o} unnamed`,"UNSUPPORTED_OPERATION",{operation:"toObject()"}),GC(n,this,t)),{})}slice(t,n){t==null&&(t=0),t<0&&(t+=this.length,t<0&&(t=0)),n==null&&(n=this.length),n<0&&(n+=this.length,n<0&&(n=0)),n>this.length&&(n=this.length);const i=j0(this),s=[],o=[];for(let a=t;a{ee(this,Dh)[e]=f$(t)}}}Dh=new WeakMap,lp=new WeakMap,ym=new WeakSet,W4=function(e){return ee(this,Dh).push(e),de(this,lp,ee(this,lp)+e.length),e.length};var Ro,na,up,hp,hf,p1,QC,Cz;const aR=class aR{constructor(e,t,n){Le(this,p1);Oe(this,"allowLoose");Le(this,Ro);Le(this,na);Le(this,up);Le(this,hp);Le(this,hf);tr(this,{allowLoose:!!t}),de(this,Ro,Xs(e)),de(this,up,0),de(this,hp,null),de(this,hf,n??1024),de(this,na,0)}get data(){return Ft(ee(this,Ro))}get dataLength(){return ee(this,Ro).length}get consumed(){return ee(this,na)}get bytes(){return new Uint8Array(ee(this,Ro))}subReader(e){const t=new aR(ee(this,Ro).slice(ee(this,na)+e),this.allowLoose,ee(this,hf));return de(t,hp,this),t}readBytes(e,t){let n=rt(this,p1,Cz).call(this,0,e,!!t);return rt(this,p1,QC).call(this,e),de(this,na,ee(this,na)+n.length),n.slice(0,e)}readValue(){return Y_(this.readBytes(ro))}readIndex(){return j_e(this.readBytes(ro))}};Ro=new WeakMap,na=new WeakMap,up=new WeakMap,hp=new WeakMap,hf=new WeakMap,p1=new WeakSet,QC=function(e){var t;if(ee(this,hp))return rt(t=ee(this,hp),p1,QC).call(t,e);de(this,up,ee(this,up)+e),Ze(ee(this,hf)<1||ee(this,up)<=ee(this,hf)*this.dataLength,`compressed ABI data exceeds inflation ratio of ${ee(this,hf)} ( see: https://github.com/ethers-io/ethers.js/issues/4537 )`,"BUFFER_OVERRUN",{buffer:Xs(ee(this,Ro)),offset:ee(this,na),length:e,info:{bytesRead:ee(this,up),dataLength:this.dataLength}})},Cz=function(e,t,n){let i=Math.ceil(t/ro)*ro;return ee(this,na)+i>ee(this,Ro).length&&(this.allowLoose&&n&&ee(this,na)+t<=ee(this,Ro).length?i=t:Ze(!1,"data out-of-bounds","BUFFER_OVERRUN",{buffer:Xs(ee(this,Ro)),length:ee(this,Ro).length,offset:ee(this,na)+i})),ee(this,Ro).slice(ee(this,na),ee(this,na)+i)};let YC=aR;function _8(r){if(!Number.isSafeInteger(r)||r<0)throw new Error(`Wrong positive integer: ${r}`)}function ST(r,...e){if(!(r instanceof Uint8Array))throw new Error("Expected Uint8Array");if(e.length>0&&!e.includes(r.length))throw new Error(`Expected Uint8Array of length ${e}, not of length=${r.length}`)}function uxe(r){if(typeof r!="function"||typeof r.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");_8(r.outputLen),_8(r.blockLen)}function Mw(r,e=!0){if(r.destroyed)throw new Error("Hash instance has been destroyed");if(e&&r.finished)throw new Error("Hash#digest() has already been called")}function Sz(r,e){ST(r);const t=e.outputLen;if(r.lengthr instanceof Uint8Array,hxe=r=>new Uint32Array(r.buffer,r.byteOffset,Math.floor(r.byteLength/4)),R7=r=>new DataView(r.buffer,r.byteOffset,r.byteLength),Ll=(r,e)=>r<<32-e|r>>>e,dxe=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!dxe)throw new Error("Non little-endian hardware is not supported");function fxe(r){if(typeof r!="string")throw new Error(`utf8ToBytes expected string, got ${typeof r}`);return new Uint8Array(new TextEncoder().encode(r))}function J_(r){if(typeof r=="string"&&(r=fxe(r)),!Iz(r))throw new Error(`expected Uint8Array, got ${typeof r}`);return r}function pxe(...r){const e=new Uint8Array(r.reduce((n,i)=>n+i.length,0));let t=0;return r.forEach(n=>{if(!Iz(n))throw new Error("Uint8Array expected");e.set(n,t),t+=n.length}),e}let IT=class{clone(){return this._cloneInto()}};function TT(r){const e=n=>r().update(J_(n)).digest(),t=r();return e.outputLen=t.outputLen,e.blockLen=t.blockLen,e.create=()=>r(),e}function gxe(r=32){if(T7&&typeof T7.getRandomValues=="function")return T7.getRandomValues(new Uint8Array(r));throw new Error("crypto.getRandomValues must be defined")}class Tz extends IT{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,uxe(e);const n=J_(t);if(this.iHash=e.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const i=this.blockLen,s=new Uint8Array(i);s.set(n.length>i?e.create().update(n).digest():n);for(let o=0;onew Tz(r,e).update(t).digest();Rz.create=(r,e)=>new Tz(r,e);function mxe(r,e,t,n){if(typeof r.setBigUint64=="function")return r.setBigUint64(e,t,n);const i=BigInt(32),s=BigInt(4294967295),o=Number(t>>i&s),a=Number(t&s),c=n?4:0,l=n?0:4;r.setUint32(e+c,o,n),r.setUint32(e+l,a,n)}class kz extends IT{constructor(e,t,n,i){super(),this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=R7(this.buffer)}update(e){Mw(this);const{view:t,buffer:n,blockLen:i}=this;e=J_(e);const s=e.length;for(let o=0;oi-o&&(this.process(n,0),o=0);for(let f=o;fh.length)throw new Error("_sha2: outputLen bigger than state");for(let f=0;fr&e^~r&t,vxe=(r,e,t)=>r&e^r&t^e&t,yxe=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Hd=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Wd=new Uint32Array(64);class bxe extends kz{constructor(){super(64,32,8,!1),this.A=Hd[0]|0,this.B=Hd[1]|0,this.C=Hd[2]|0,this.D=Hd[3]|0,this.E=Hd[4]|0,this.F=Hd[5]|0,this.G=Hd[6]|0,this.H=Hd[7]|0}get(){const{A:e,B:t,C:n,D:i,E:s,F:o,G:a,H:c}=this;return[e,t,n,i,s,o,a,c]}set(e,t,n,i,s,o,a,c){this.A=e|0,this.B=t|0,this.C=n|0,this.D=i|0,this.E=s|0,this.F=o|0,this.G=a|0,this.H=c|0}process(e,t){for(let f=0;f<16;f++,t+=4)Wd[f]=e.getUint32(t,!1);for(let f=16;f<64;f++){const v=Wd[f-15],y=Wd[f-2],A=Ll(v,7)^Ll(v,18)^v>>>3,M=Ll(y,17)^Ll(y,19)^y>>>10;Wd[f]=M+Wd[f-7]+A+Wd[f-16]|0}let{A:n,B:i,C:s,D:o,E:a,F:c,G:l,H:h}=this;for(let f=0;f<64;f++){const v=Ll(a,6)^Ll(a,11)^Ll(a,25),y=h+v+wxe(a,c,l)+yxe[f]+Wd[f]|0,M=(Ll(n,2)^Ll(n,13)^Ll(n,22))+vxe(n,i,s)|0;h=l,l=c,c=a,a=o+y|0,o=s,s=i,i=n,n=y+M|0}n=n+this.A|0,i=i+this.B|0,s=s+this.C|0,o=o+this.D|0,a=a+this.E|0,c=c+this.F|0,l=l+this.G|0,h=h+this.H|0,this.set(n,i,s,o,a,c,l,h)}roundClean(){Wd.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const Nz=TT(()=>new bxe),o4=BigInt(2**32-1),JC=BigInt(32);function Pz(r,e=!1){return e?{h:Number(r&o4),l:Number(r>>JC&o4)}:{h:Number(r>>JC&o4)|0,l:Number(r&o4)|0}}function Oz(r,e=!1){let t=new Uint32Array(r.length),n=new Uint32Array(r.length);for(let i=0;iBigInt(r>>>0)<>>0),xxe=(r,e,t)=>r>>>t,Axe=(r,e,t)=>r<<32-t|e>>>t,Exe=(r,e,t)=>r>>>t|e<<32-t,Cxe=(r,e,t)=>r<<32-t|e>>>t,Sxe=(r,e,t)=>r<<64-t|e>>>t-32,Ixe=(r,e,t)=>r>>>t-32|e<<64-t,Txe=(r,e)=>e,Rxe=(r,e)=>r,Mz=(r,e,t)=>r<>>32-t,Dz=(r,e,t)=>e<>>32-t,$z=(r,e,t)=>e<>>64-t,Bz=(r,e,t)=>r<>>64-t;function kxe(r,e,t,n){const i=(e>>>0)+(n>>>0);return{h:r+t+(i/2**32|0)|0,l:i|0}}const Nxe=(r,e,t)=>(r>>>0)+(e>>>0)+(t>>>0),Pxe=(r,e,t,n)=>e+t+n+(r/2**32|0)|0,Oxe=(r,e,t,n)=>(r>>>0)+(e>>>0)+(t>>>0)+(n>>>0),Mxe=(r,e,t,n,i)=>e+t+n+i+(r/2**32|0)|0,Dxe=(r,e,t,n,i)=>(r>>>0)+(e>>>0)+(t>>>0)+(n>>>0)+(i>>>0),$xe=(r,e,t,n,i,s)=>e+t+n+i+s+(r/2**32|0)|0,Rr={fromBig:Pz,split:Oz,toBig:_xe,shrSH:xxe,shrSL:Axe,rotrSH:Exe,rotrSL:Cxe,rotrBH:Sxe,rotrBL:Ixe,rotr32H:Txe,rotr32L:Rxe,rotlSH:Mz,rotlSL:Dz,rotlBH:$z,rotlBL:Bz,add:kxe,add3L:Nxe,add3H:Pxe,add4L:Oxe,add4H:Mxe,add5H:$xe,add5L:Dxe},[Bxe,Lxe]=Rr.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(r=>BigInt(r))),zd=new Uint32Array(80),Vd=new Uint32Array(80);let Uxe=class extends kz{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:e,Al:t,Bh:n,Bl:i,Ch:s,Cl:o,Dh:a,Dl:c,Eh:l,El:h,Fh:f,Fl:v,Gh:y,Gl:A,Hh:M,Hl:$}=this;return[e,t,n,i,s,o,a,c,l,h,f,v,y,A,M,$]}set(e,t,n,i,s,o,a,c,l,h,f,v,y,A,M,$){this.Ah=e|0,this.Al=t|0,this.Bh=n|0,this.Bl=i|0,this.Ch=s|0,this.Cl=o|0,this.Dh=a|0,this.Dl=c|0,this.Eh=l|0,this.El=h|0,this.Fh=f|0,this.Fl=v|0,this.Gh=y|0,this.Gl=A|0,this.Hh=M|0,this.Hl=$|0}process(e,t){for(let H=0;H<16;H++,t+=4)zd[H]=e.getUint32(t),Vd[H]=e.getUint32(t+=4);for(let H=16;H<80;H++){const F=zd[H-15]|0,q=Vd[H-15]|0,Y=Rr.rotrSH(F,q,1)^Rr.rotrSH(F,q,8)^Rr.shrSH(F,q,7),I=Rr.rotrSL(F,q,1)^Rr.rotrSL(F,q,8)^Rr.shrSL(F,q,7),T=zd[H-2]|0,V=Vd[H-2]|0,Q=Rr.rotrSH(T,V,19)^Rr.rotrBH(T,V,61)^Rr.shrSH(T,V,6),te=Rr.rotrSL(T,V,19)^Rr.rotrBL(T,V,61)^Rr.shrSL(T,V,6),oe=Rr.add4L(I,te,Vd[H-7],Vd[H-16]),d=Rr.add4H(oe,Y,Q,zd[H-7],zd[H-16]);zd[H]=d|0,Vd[H]=oe|0}let{Ah:n,Al:i,Bh:s,Bl:o,Ch:a,Cl:c,Dh:l,Dl:h,Eh:f,El:v,Fh:y,Fl:A,Gh:M,Gl:$,Hh:L,Hl:P}=this;for(let H=0;H<80;H++){const F=Rr.rotrSH(f,v,14)^Rr.rotrSH(f,v,18)^Rr.rotrBH(f,v,41),q=Rr.rotrSL(f,v,14)^Rr.rotrSL(f,v,18)^Rr.rotrBL(f,v,41),Y=f&y^~f&M,I=v&A^~v&$,T=Rr.add5L(P,q,I,Lxe[H],Vd[H]),V=Rr.add5H(T,L,F,Y,Bxe[H],zd[H]),Q=T|0,te=Rr.rotrSH(n,i,28)^Rr.rotrBH(n,i,34)^Rr.rotrBH(n,i,39),oe=Rr.rotrSL(n,i,28)^Rr.rotrBL(n,i,34)^Rr.rotrBL(n,i,39),d=n&s^n&a^s&a,g=i&o^i&c^o&c;L=M|0,P=$|0,M=y|0,$=A|0,y=f|0,A=v|0,{h:f,l:v}=Rr.add(l|0,h|0,V|0,Q|0),l=a|0,h=c|0,a=s|0,c=o|0,s=n|0,o=i|0;const m=Rr.add3L(Q,oe,g);n=Rr.add3H(m,V,te,d),i=m|0}({h:n,l:i}=Rr.add(this.Ah|0,this.Al|0,n|0,i|0)),{h:s,l:o}=Rr.add(this.Bh|0,this.Bl|0,s|0,o|0),{h:a,l:c}=Rr.add(this.Ch|0,this.Cl|0,a|0,c|0),{h:l,l:h}=Rr.add(this.Dh|0,this.Dl|0,l|0,h|0),{h:f,l:v}=Rr.add(this.Eh|0,this.El|0,f|0,v|0),{h:y,l:A}=Rr.add(this.Fh|0,this.Fl|0,y|0,A|0),{h:M,l:$}=Rr.add(this.Gh|0,this.Gl|0,M|0,$|0),{h:L,l:P}=Rr.add(this.Hh|0,this.Hl|0,L|0,P|0),this.set(n,i,s,o,a,c,l,h,f,v,y,A,M,$,L,P)}roundClean(){zd.fill(0),Vd.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}};const Fxe=TT(()=>new Uxe);function jxe(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}const p$=jxe();p$.crypto||p$.msCrypto;function Hxe(r){switch(r){case"sha256":return Nz.create();case"sha512":return Fxe.create()}Ae(!1,"invalid hashing algorithm name","algorithm",r)}const[Lz,Uz,Fz]=[[],[],[]],Wxe=BigInt(0),r3=BigInt(1),zxe=BigInt(2),Vxe=BigInt(7),qxe=BigInt(256),Kxe=BigInt(113);for(let r=0,e=r3,t=1,n=0;r<24;r++){[t,n]=[n,(2*t+3*n)%5],Lz.push(2*(5*n+t)),Uz.push((r+1)*(r+2)/2%64);let i=Wxe;for(let s=0;s<7;s++)e=(e<>Vxe)*Kxe)%qxe,e&zxe&&(i^=r3<<(r3<t>32?$z(r,e,t):Mz(r,e,t),m$=(r,e,t)=>t>32?Bz(r,e,t):Dz(r,e,t);function Yxe(r,e=24){const t=new Uint32Array(10);for(let n=24-e;n<24;n++){for(let o=0;o<10;o++)t[o]=r[o]^r[o+10]^r[o+20]^r[o+30]^r[o+40];for(let o=0;o<10;o+=2){const a=(o+8)%10,c=(o+2)%10,l=t[c],h=t[c+1],f=g$(l,h,1)^t[a],v=m$(l,h,1)^t[a+1];for(let y=0;y<50;y+=10)r[o+y]^=f,r[o+y+1]^=v}let i=r[2],s=r[3];for(let o=0;o<24;o++){const a=Uz[o],c=g$(i,s,a),l=m$(i,s,a),h=Lz[o];i=r[h],s=r[h+1],r[h]=c,r[h+1]=l}for(let o=0;o<50;o+=10){for(let a=0;a<10;a++)t[a]=r[o+a];for(let a=0;a<10;a++)r[o+a]^=~t[(a+2)%10]&t[(a+4)%10]}r[0]^=Gxe[n],r[1]^=Zxe[n]}t.fill(0)}let Qxe=class jz extends IT{constructor(e,t,n,i=!1,s=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=n,this.enableXOF=i,this.rounds=s,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,_8(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=hxe(this.state)}keccak(){Yxe(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){Mw(this);const{blockLen:t,state:n}=this;e=J_(e);const i=e.length;for(let s=0;s=n&&this.keccak();const o=Math.min(n-this.posOut,s-i);e.set(t.subarray(this.posOut,this.posOut+o),i),this.posOut+=o,i+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return _8(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(Sz(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:t,suffix:n,outputLen:i,rounds:s,enableXOF:o}=this;return e||(e=new jz(t,n,i,o,s)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=s,e.suffix=n,e.outputLen=i,e.enableXOF=o,e.destroyed=this.destroyed,e}};const Jxe=(r,e,t)=>TT(()=>new Qxe(e,r,t)),Xxe=Jxe(1,136,256/8);let Hz=!1;const Wz=function(r){return Xxe(r)};let zz=Wz;function Ei(r){const e=Zr(r,"data");return Ft(zz(e))}Ei._=Wz;Ei.lock=function(){Hz=!0};Ei.register=function(r){if(Hz)throw new TypeError("keccak256 is locked");zz=r};Object.freeze(Ei);const Vz=function(r){return Hxe("sha256").update(r).digest()};let qz=Vz,Kz=!1;function h2(r){const e=Zr(r,"data");return Ft(qz(e))}h2._=Vz;h2.lock=function(){Kz=!0};h2.register=function(r){if(Kz)throw new Error("sha256 is locked");qz=r};Object.freeze(h2);Object.freeze(h2);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Gz=BigInt(0),X_=BigInt(1),eAe=BigInt(2),ex=r=>r instanceof Uint8Array,tAe=Array.from({length:256},(r,e)=>e.toString(16).padStart(2,"0"));function Dw(r){if(!ex(r))throw new Error("Uint8Array expected");let e="";for(let t=0;tn+i.length,0));let t=0;return r.forEach(n=>{if(!ex(n))throw new Error("Uint8Array expected");e.set(n,t),t+=n.length}),e}function nAe(r,e){if(r.length!==e.length)return!1;for(let t=0;tGz;r>>=X_,e+=1);return e}function oAe(r,e){return r>>BigInt(e)&X_}const aAe=(r,e,t)=>r|(t?X_:Gz)<(eAe<new Uint8Array(r),w$=r=>Uint8Array.from(r);function Yz(r,e,t){if(typeof r!="number"||r<2)throw new Error("hashLen must be a number");if(typeof e!="number"||e<2)throw new Error("qByteLen must be a number");if(typeof t!="function")throw new Error("hmacFn must be a function");let n=k7(r),i=k7(r),s=0;const o=()=>{n.fill(1),i.fill(0),s=0},a=(...f)=>t(i,n,...f),c=(f=k7())=>{i=a(w$([0]),f),n=a(),f.length!==0&&(i=a(w$([1]),f),n=a())},l=()=>{if(s++>=1e3)throw new Error("drbg: tried 1000 values");let f=0;const v=[];for(;f{o(),c(f);let y;for(;!(y=v(l()));)c();return o(),y}}const cAe={bigint:r=>typeof r=="bigint",function:r=>typeof r=="function",boolean:r=>typeof r=="boolean",string:r=>typeof r=="string",stringOrUint8Array:r=>typeof r=="string"||r instanceof Uint8Array,isSafeInteger:r=>Number.isSafeInteger(r),array:r=>Array.isArray(r),field:(r,e)=>e.Fp.isValid(r),hash:r=>typeof r=="function"&&Number.isSafeInteger(r.outputLen)};function lb(r,e,t={}){const n=(i,s,o)=>{const a=cAe[s];if(typeof a!="function")throw new Error(`Invalid validator "${s}", expected function`);const c=r[i];if(!(o&&c===void 0)&&!a(c,r))throw new Error(`Invalid param ${String(i)}=${c} (${typeof c}), expected ${s}`)};for(const[i,s]of Object.entries(e))n(i,s,!1);for(const[i,s]of Object.entries(t))n(i,s,!0);return r}const lAe=Object.freeze(Object.defineProperty({__proto__:null,bitGet:oAe,bitLen:sAe,bitMask:PT,bitSet:aAe,bytesToHex:Dw,bytesToNumberBE:kp,bytesToNumberLE:kT,concatBytes:Kv,createHmacDrbg:Yz,ensureBytes:jc,equalBytes:nAe,hexToBytes:$w,hexToNumber:RT,numberToBytesBE:Bw,numberToBytesLE:NT,numberToHexUnpadded:Zz,numberToVarBytesBE:rAe,utf8ToBytes:iAe,validateObject:lb},Symbol.toStringTag,{value:"Module"}));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Ji=BigInt(0),mi=BigInt(1),H0=BigInt(2),uAe=BigInt(3),XC=BigInt(4),v$=BigInt(5),y$=BigInt(8);BigInt(9);BigInt(16);function Po(r,e){const t=r%e;return t>=Ji?t:e+t}function hAe(r,e,t){if(t<=Ji||e 0");if(t===mi)return Ji;let n=mi;for(;e>Ji;)e&mi&&(n=n*r%t),r=r*r%t,e>>=mi;return n}function Wa(r,e,t){let n=r;for(;e-- >Ji;)n*=n,n%=t;return n}function eS(r,e){if(r===Ji||e<=Ji)throw new Error(`invert: expected positive integers, got n=${r} mod=${e}`);let t=Po(r,e),n=e,i=Ji,s=mi;for(;t!==Ji;){const a=n/t,c=n%t,l=i-s*a;n=t,t=c,i=s,s=l}if(n!==mi)throw new Error("invert: does not exist");return Po(i,e)}function dAe(r){const e=(r-mi)/H0;let t,n,i;for(t=r-mi,n=0;t%H0===Ji;t/=H0,n++);for(i=H0;i(n[i]="function",n),e);return lb(r,t)}function mAe(r,e,t){if(t 0");if(t===Ji)return r.ONE;if(t===mi)return e;let n=r.ONE,i=e;for(;t>Ji;)t&mi&&(n=r.mul(n,i)),i=r.sqr(i),t>>=mi;return n}function wAe(r,e){const t=new Array(e.length),n=e.reduce((s,o,a)=>r.is0(o)?s:(t[a]=s,r.mul(s,o)),r.ONE),i=r.inv(n);return e.reduceRight((s,o,a)=>r.is0(o)?s:(t[a]=r.mul(s,t[a]),r.mul(s,o)),i),t}function Qz(r,e){const t=e!==void 0?e:r.toString(2).length,n=Math.ceil(t/8);return{nBitLength:t,nByteLength:n}}function vAe(r,e,t=!1,n={}){if(r<=Ji)throw new Error(`Expected Field ORDER > 0, got ${r}`);const{nBitLength:i,nByteLength:s}=Qz(r,e);if(s>2048)throw new Error("Field lengths over 2048 bytes are not supported");const o=fAe(r),a=Object.freeze({ORDER:r,BITS:i,BYTES:s,MASK:PT(i),ZERO:Ji,ONE:mi,create:c=>Po(c,r),isValid:c=>{if(typeof c!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof c}`);return Ji<=c&&cc===Ji,isOdd:c=>(c&mi)===mi,neg:c=>Po(-c,r),eql:(c,l)=>c===l,sqr:c=>Po(c*c,r),add:(c,l)=>Po(c+l,r),sub:(c,l)=>Po(c-l,r),mul:(c,l)=>Po(c*l,r),pow:(c,l)=>mAe(a,c,l),div:(c,l)=>Po(c*eS(l,r),r),sqrN:c=>c*c,addN:(c,l)=>c+l,subN:(c,l)=>c-l,mulN:(c,l)=>c*l,inv:c=>eS(c,r),sqrt:n.sqrt||(c=>o(a,c)),invertBatch:c=>wAe(a,c),cmov:(c,l,h)=>h?l:c,toBytes:c=>t?NT(c,s):Bw(c,s),fromBytes:c=>{if(c.length!==s)throw new Error(`Fp.fromBytes: expected ${s}, got ${c.length}`);return t?kT(c):kp(c)}});return Object.freeze(a)}function Jz(r){if(typeof r!="bigint")throw new Error("field order must be bigint");const e=r.toString(2).length;return Math.ceil(e/8)}function Xz(r){const e=Jz(r);return e+Math.ceil(e/2)}function yAe(r,e,t=!1){const n=r.length,i=Jz(e),s=Xz(e);if(n<16||n1024)throw new Error(`expected ${s}-1024 bytes of input, got ${n}`);const o=t?kp(r):kT(r),a=Po(o,e-mi)+mi;return t?NT(a,i):Bw(a,i)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const bAe=BigInt(0),N7=BigInt(1);function _Ae(r,e){const t=(i,s)=>{const o=s.negate();return i?o:s},n=i=>{const s=Math.ceil(e/i)+1,o=2**(i-1);return{windows:s,windowSize:o}};return{constTimeNegate:t,unsafeLadder(i,s){let o=r.ZERO,a=i;for(;s>bAe;)s&N7&&(o=o.add(a)),a=a.double(),s>>=N7;return o},precomputeWindow(i,s){const{windows:o,windowSize:a}=n(s),c=[];let l=i,h=l;for(let f=0;f>=y,$>c&&($-=v,o+=N7);const L=M,P=M+Math.abs($)-1,H=A%2!==0,F=$<0;$===0?h=h.add(t(H,s[L])):l=l.add(t(F,s[P]))}return{p:l,f:h}},wNAFCached(i,s,o,a){const c=i._WINDOW_SIZE||1;let l=s.get(i);return l||(l=this.precomputeWindow(i,c),c!==1&&s.set(i,a(l))),this.wNAF(c,l,o)}}}function eV(r){return gAe(r.Fp),lb(r,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...Qz(r.n,r.nBitLength),...r,p:r.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function xAe(r){const e=eV(r);lb(e,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:t,Fp:n,a:i}=e;if(t){if(!n.eql(i,n.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof t!="object"||typeof t.beta!="bigint"||typeof t.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...e})}const{bytesToNumberBE:AAe,hexToBytes:EAe}=lAe,ep={Err:class extends Error{constructor(e=""){super(e)}},_parseInt(r){const{Err:e}=ep;if(r.length<2||r[0]!==2)throw new e("Invalid signature integer tag");const t=r[1],n=r.subarray(2,t+2);if(!t||n.length!==t)throw new e("Invalid signature integer: wrong length");if(n[0]&128)throw new e("Invalid signature integer: negative");if(n[0]===0&&!(n[1]&128))throw new e("Invalid signature integer: unnecessary leading zero");return{d:AAe(n),l:r.subarray(t+2)}},toSig(r){const{Err:e}=ep,t=typeof r=="string"?EAe(r):r;if(!(t instanceof Uint8Array))throw new Error("ui8a expected");let n=t.length;if(n<2||t[0]!=48)throw new e("Invalid signature tag");if(t[1]!==n-2)throw new e("Invalid signature: incorrect length");const{d:i,l:s}=ep._parseInt(t.subarray(2)),{d:o,l:a}=ep._parseInt(s);if(a.length)throw new e("Invalid signature: left bytes after parsing");return{r:i,s:o}},hexFromSig(r){const e=l=>Number.parseInt(l[0],16)&8?"00"+l:l,t=l=>{const h=l.toString(16);return h.length&1?`0${h}`:h},n=e(t(r.s)),i=e(t(r.r)),s=n.length/2,o=i.length/2,a=t(s),c=t(o);return`30${t(o+s+4)}02${c}${i}02${a}${n}`}},Yh=BigInt(0),sc=BigInt(1);BigInt(2);const b$=BigInt(3);BigInt(4);function CAe(r){const e=xAe(r),{Fp:t}=e,n=e.toBytes||((A,M,$)=>{const L=M.toAffine();return Kv(Uint8Array.from([4]),t.toBytes(L.x),t.toBytes(L.y))}),i=e.fromBytes||(A=>{const M=A.subarray(1),$=t.fromBytes(M.subarray(0,t.BYTES)),L=t.fromBytes(M.subarray(t.BYTES,2*t.BYTES));return{x:$,y:L}});function s(A){const{a:M,b:$}=e,L=t.sqr(A),P=t.mul(L,A);return t.add(t.add(P,t.mul(A,M)),$)}if(!t.eql(t.sqr(e.Gy),s(e.Gx)))throw new Error("bad generator point: equation left != right");function o(A){return typeof A=="bigint"&&Yht.eql(H,t.ZERO);return P($)&&P(L)?f.ZERO:new f($,L,t.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(M){const $=t.invertBatch(M.map(L=>L.pz));return M.map((L,P)=>L.toAffine($[P])).map(f.fromAffine)}static fromHex(M){const $=f.fromAffine(i(jc("pointHex",M)));return $.assertValidity(),$}static fromPrivateKey(M){return f.BASE.multiply(c(M))}_setWindowSize(M){this._WINDOW_SIZE=M,l.delete(this)}assertValidity(){if(this.is0()){if(e.allowInfinityPoint&&!t.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:M,y:$}=this.toAffine();if(!t.isValid(M)||!t.isValid($))throw new Error("bad point: x or y not FE");const L=t.sqr($),P=s(M);if(!t.eql(L,P))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:M}=this.toAffine();if(t.isOdd)return!t.isOdd(M);throw new Error("Field doesn't support isOdd")}equals(M){h(M);const{px:$,py:L,pz:P}=this,{px:H,py:F,pz:q}=M,Y=t.eql(t.mul($,q),t.mul(H,P)),I=t.eql(t.mul(L,q),t.mul(F,P));return Y&&I}negate(){return new f(this.px,t.neg(this.py),this.pz)}double(){const{a:M,b:$}=e,L=t.mul($,b$),{px:P,py:H,pz:F}=this;let q=t.ZERO,Y=t.ZERO,I=t.ZERO,T=t.mul(P,P),V=t.mul(H,H),Q=t.mul(F,F),te=t.mul(P,H);return te=t.add(te,te),I=t.mul(P,F),I=t.add(I,I),q=t.mul(M,I),Y=t.mul(L,Q),Y=t.add(q,Y),q=t.sub(V,Y),Y=t.add(V,Y),Y=t.mul(q,Y),q=t.mul(te,q),I=t.mul(L,I),Q=t.mul(M,Q),te=t.sub(T,Q),te=t.mul(M,te),te=t.add(te,I),I=t.add(T,T),T=t.add(I,T),T=t.add(T,Q),T=t.mul(T,te),Y=t.add(Y,T),Q=t.mul(H,F),Q=t.add(Q,Q),T=t.mul(Q,te),q=t.sub(q,T),I=t.mul(Q,V),I=t.add(I,I),I=t.add(I,I),new f(q,Y,I)}add(M){h(M);const{px:$,py:L,pz:P}=this,{px:H,py:F,pz:q}=M;let Y=t.ZERO,I=t.ZERO,T=t.ZERO;const V=e.a,Q=t.mul(e.b,b$);let te=t.mul($,H),oe=t.mul(L,F),d=t.mul(P,q),g=t.add($,L),m=t.add(H,F);g=t.mul(g,m),m=t.add(te,oe),g=t.sub(g,m),m=t.add($,P);let b=t.add(H,q);return m=t.mul(m,b),b=t.add(te,d),m=t.sub(m,b),b=t.add(L,P),Y=t.add(F,q),b=t.mul(b,Y),Y=t.add(oe,d),b=t.sub(b,Y),T=t.mul(V,m),Y=t.mul(Q,d),T=t.add(Y,T),Y=t.sub(oe,T),T=t.add(oe,T),I=t.mul(Y,T),oe=t.add(te,te),oe=t.add(oe,te),d=t.mul(V,d),m=t.mul(Q,m),oe=t.add(oe,d),d=t.sub(te,d),d=t.mul(V,d),m=t.add(m,d),te=t.mul(oe,m),I=t.add(I,te),te=t.mul(b,m),Y=t.mul(g,Y),Y=t.sub(Y,te),te=t.mul(g,oe),T=t.mul(b,T),T=t.add(T,te),new f(Y,I,T)}subtract(M){return this.add(M.negate())}is0(){return this.equals(f.ZERO)}wNAF(M){return y.wNAFCached(this,l,M,$=>{const L=t.invertBatch($.map(P=>P.pz));return $.map((P,H)=>P.toAffine(L[H])).map(f.fromAffine)})}multiplyUnsafe(M){const $=f.ZERO;if(M===Yh)return $;if(a(M),M===sc)return this;const{endo:L}=e;if(!L)return y.unsafeLadder(this,M);let{k1neg:P,k1:H,k2neg:F,k2:q}=L.splitScalar(M),Y=$,I=$,T=this;for(;H>Yh||q>Yh;)H&sc&&(Y=Y.add(T)),q&sc&&(I=I.add(T)),T=T.double(),H>>=sc,q>>=sc;return P&&(Y=Y.negate()),F&&(I=I.negate()),I=new f(t.mul(I.px,L.beta),I.py,I.pz),Y.add(I)}multiply(M){a(M);let $=M,L,P;const{endo:H}=e;if(H){const{k1neg:F,k1:q,k2neg:Y,k2:I}=H.splitScalar($);let{p:T,f:V}=this.wNAF(q),{p:Q,f:te}=this.wNAF(I);T=y.constTimeNegate(F,T),Q=y.constTimeNegate(Y,Q),Q=new f(t.mul(Q.px,H.beta),Q.py,Q.pz),L=T.add(Q),P=V.add(te)}else{const{p:F,f:q}=this.wNAF($);L=F,P=q}return f.normalizeZ([L,P])[0]}multiplyAndAddUnsafe(M,$,L){const P=f.BASE,H=(q,Y)=>Y===Yh||Y===sc||!q.equals(P)?q.multiplyUnsafe(Y):q.multiply(Y),F=H(this,$).add(H(M,L));return F.is0()?void 0:F}toAffine(M){const{px:$,py:L,pz:P}=this,H=this.is0();M==null&&(M=H?t.ONE:t.inv(P));const F=t.mul($,M),q=t.mul(L,M),Y=t.mul(P,M);if(H)return{x:t.ZERO,y:t.ZERO};if(!t.eql(Y,t.ONE))throw new Error("invZ was invalid");return{x:F,y:q}}isTorsionFree(){const{h:M,isTorsionFree:$}=e;if(M===sc)return!0;if($)return $(f,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:M,clearCofactor:$}=e;return M===sc?this:$?$(f,this):this.multiplyUnsafe(e.h)}toRawBytes(M=!0){return this.assertValidity(),n(f,this,M)}toHex(M=!0){return Dw(this.toRawBytes(M))}}f.BASE=new f(e.Gx,e.Gy,t.ONE),f.ZERO=new f(t.ZERO,t.ONE,t.ZERO);const v=e.nBitLength,y=_Ae(f,e.endo?Math.ceil(v/2):v);return{CURVE:e,ProjectivePoint:f,normPrivateKeyToScalar:c,weierstrassEquation:s,isWithinCurveOrder:o}}function SAe(r){const e=eV(r);return lb(e,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...e})}function IAe(r){const e=SAe(r),{Fp:t,n}=e,i=t.BYTES+1,s=2*t.BYTES+1;function o(m){return YhDw(Bw(m,e.nByteLength));function A(m){const b=n>>sc;return m>b}function M(m){return A(m)?a(-m):m}const $=(m,b,E)=>kp(m.slice(b,E));class L{constructor(b,E,C){this.r=b,this.s=E,this.recovery=C,this.assertValidity()}static fromCompact(b){const E=e.nByteLength;return b=jc("compactSignature",b,E*2),new L($(b,0,E),$(b,E,2*E))}static fromDER(b){const{r:E,s:C}=ep.toSig(jc("DER",b));return new L(E,C)}assertValidity(){if(!v(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!v(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(b){return new L(this.r,this.s,b)}recoverPublicKey(b){const{r:E,s:C,recovery:B}=this,R=I(jc("msgHash",b));if(B==null||![0,1,2,3].includes(B))throw new Error("recovery id invalid");const w=B===2||B===3?E+e.n:E;if(w>=t.ORDER)throw new Error("recovery id 2 or 3 invalid");const O=B&1?"03":"02",pe=l.fromHex(O+y(w)),be=c(w),x=a(-R*be),Z=a(C*be),k=l.BASE.multiplyAndAddUnsafe(pe,x,Z);if(!k)throw new Error("point at infinify");return k.assertValidity(),k}hasHighS(){return A(this.s)}normalizeS(){return this.hasHighS()?new L(this.r,a(-this.s),this.recovery):this}toDERRawBytes(){return $w(this.toDERHex())}toDERHex(){return ep.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return $w(this.toCompactHex())}toCompactHex(){return y(this.r)+y(this.s)}}const P={isValidPrivateKey(m){try{return h(m),!0}catch{return!1}},normPrivateKeyToScalar:h,randomPrivateKey:()=>{const m=Xz(e.n);return yAe(e.randomBytes(m),e.n)},precompute(m=8,b=l.BASE){return b._setWindowSize(m),b.multiply(BigInt(3)),b}};function H(m,b=!0){return l.fromPrivateKey(m).toRawBytes(b)}function F(m){const b=m instanceof Uint8Array,E=typeof m=="string",C=(b||E)&&m.length;return b?C===i||C===s:E?C===2*i||C===2*s:m instanceof l}function q(m,b,E=!0){if(F(m))throw new Error("first arg must be private key");if(!F(b))throw new Error("second arg must be public key");return l.fromHex(b).multiply(h(m)).toRawBytes(E)}const Y=e.bits2int||function(m){const b=kp(m),E=m.length*8-e.nBitLength;return E>0?b>>BigInt(E):b},I=e.bits2int_modN||function(m){return a(Y(m))},T=PT(e.nBitLength);function V(m){if(typeof m!="bigint")throw new Error("bigint expected");if(!(Yh<=m&&mJ in E))throw new Error("sign() legacy options not supported");const{hash:C,randomBytes:B}=e;let{lowS:R,prehash:w,extraEntropy:O}=E;R==null&&(R=!0),m=jc("msgHash",m),w&&(m=jc("prehashed msgHash",C(m)));const pe=I(m),be=h(b),x=[V(be),V(pe)];if(O!=null){const J=O===!0?B(t.BYTES):O;x.push(jc("extraEntropy",J))}const Z=Kv(...x),k=pe;function W(J){const S=Y(J);if(!v(S))return;const D=c(S),G=l.BASE.multiply(S).toAffine(),z=a(G.x);if(z===Yh)return;const K=a(D*a(k+z*be));if(K===Yh)return;let ue=(G.x===z?0:2)|Number(G.y&sc),ye=K;return R&&A(K)&&(ye=M(K),ue^=1),new L(z,ye,ue)}return{seed:Z,k2sig:W}}const te={lowS:e.lowS,prehash:!1},oe={lowS:e.lowS,prehash:!1};function d(m,b,E=te){const{seed:C,k2sig:B}=Q(m,b,E),R=e;return Yz(R.hash.outputLen,R.nByteLength,R.hmac)(C,B)}l.BASE._setWindowSize(8);function g(m,b,E,C=oe){var G;const B=m;if(b=jc("msgHash",b),E=jc("publicKey",E),"strict"in C)throw new Error("options.strict was renamed to lowS");const{lowS:R,prehash:w}=C;let O,pe;try{if(typeof B=="string"||B instanceof Uint8Array)try{O=L.fromDER(B)}catch(z){if(!(z instanceof ep.Err))throw z;O=L.fromCompact(B)}else if(typeof B=="object"&&typeof B.r=="bigint"&&typeof B.s=="bigint"){const{r:z,s:K}=B;O=new L(z,K)}else throw new Error("PARSE");pe=l.fromHex(E)}catch(z){if(z.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(R&&O.hasHighS())return!1;w&&(b=e.hash(b));const{r:be,s:x}=O,Z=I(b),k=c(x),W=a(Z*k),J=a(be*k),S=(G=l.BASE.multiplyAndAddUnsafe(pe,W,J))==null?void 0:G.toAffine();return S?a(S.x)===be:!1}return{CURVE:e,getPublicKey:H,getSharedSecret:q,sign:d,verify:g,ProjectivePoint:l,Signature:L,utils:P}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function TAe(r){return{hash:r,hmac:(e,...t)=>Rz(r,e,pxe(...t)),randomBytes:gxe}}function RAe(r,e){const t=n=>IAe({...r,...TAe(n)});return Object.freeze({...t(e),create:t})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const tV=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),_$=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),kAe=BigInt(1),tS=BigInt(2),x$=(r,e)=>(r+e/tS)/e;function NAe(r){const e=tV,t=BigInt(3),n=BigInt(6),i=BigInt(11),s=BigInt(22),o=BigInt(23),a=BigInt(44),c=BigInt(88),l=r*r*r%e,h=l*l*r%e,f=Wa(h,t,e)*h%e,v=Wa(f,t,e)*h%e,y=Wa(v,tS,e)*l%e,A=Wa(y,i,e)*y%e,M=Wa(A,s,e)*A%e,$=Wa(M,a,e)*M%e,L=Wa($,c,e)*$%e,P=Wa(L,a,e)*M%e,H=Wa(P,t,e)*h%e,F=Wa(H,o,e)*A%e,q=Wa(F,n,e)*l%e,Y=Wa(q,tS,e);if(!rS.eql(rS.sqr(Y),r))throw new Error("Cannot find square root");return Y}const rS=vAe(tV,void 0,void 0,{sqrt:NAe}),qd=RAe({a:BigInt(0),b:BigInt(7),Fp:rS,n:_$,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:r=>{const e=_$,t=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-kAe*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),s=t,o=BigInt("0x100000000000000000000000000000000"),a=x$(s*r,e),c=x$(-n*r,e);let l=Po(r-a*t-c*i,e),h=Po(-a*n-c*s,e);const f=l>o,v=h>o;if(f&&(l=e-l),v&&(h=e-h),l>o||h>o)throw new Error("splitScalar: Endomorphism failed, k="+r);return{k1neg:f,k1:l,k2neg:v,k2:h}}}},Nz);BigInt(0);qd.ProjectivePoint;const Gv="0x0000000000000000000000000000000000000000",A$="0x0000000000000000000000000000000000000000000000000000000000000000",E$=BigInt(0),C$=BigInt(1),S$=BigInt(2),I$=BigInt(27),T$=BigInt(28),a4=BigInt(35),dg={};function R$(r){return a1(to(r),32)}var bm,_m,xm,dp;const Lc=class Lc{constructor(e,t,n,i){Le(this,bm);Le(this,_m);Le(this,xm);Le(this,dp);cb(e,dg,"Signature"),de(this,bm,t),de(this,_m,n),de(this,xm,i),de(this,dp,null)}get r(){return ee(this,bm)}set r(e){Ae(sm(e)===32,"invalid r","value",e),de(this,bm,Ft(e))}get s(){return ee(this,_m)}set s(e){Ae(sm(e)===32,"invalid s","value",e);const t=Ft(e);Ae(parseInt(t.substring(0,3))<8,"non-canonical s","value",t),de(this,_m,t)}get v(){return ee(this,xm)}set v(e){const t=Sr(e,"value");Ae(t===27||t===28,"invalid v","v",e),de(this,xm,t)}get networkV(){return ee(this,dp)}get legacyChainId(){const e=this.networkV;return e==null?null:Lc.getChainId(e)}get yParity(){return this.v===27?0:1}get yParityAndS(){const e=Zr(this.s);return this.yParity&&(e[0]|=128),Ft(e)}get compactSerialized(){return vi([this.r,this.yParityAndS])}get serialized(){return vi([this.r,this.s,this.yParity?"0x1c":"0x1b"])}[Symbol.for("nodejs.util.inspect.custom")](){return`Signature { r: "${this.r}", s: "${this.s}", yParity: ${this.yParity}, networkV: ${this.networkV} }`}clone(){const e=new Lc(dg,this.r,this.s,this.v);return this.networkV&&de(e,dp,this.networkV),e}toJSON(){const e=this.networkV;return{_type:"signature",networkV:e!=null?e.toString():null,r:this.r,s:this.s,v:this.v}}static getChainId(e){const t=qt(e,"v");return t==I$||t==T$?E$:(Ae(t>=a4,"invalid EIP-155 v","v",e),(t-a4)/S$)}static getChainIdV(e,t){return qt(e)*S$+BigInt(35+t-27)}static getNormalizedV(e){const t=qt(e);return t===E$||t===I$?27:t===C$||t===T$?28:(Ae(t>=a4,"invalid v","v",e),t&C$?27:28)}static from(e){function t(l,h){Ae(l,h,"signature",e)}if(e==null)return new Lc(dg,A$,A$,27);if(typeof e=="string"){const l=Zr(e,"signature");if(l.length===64){const h=Ft(l.slice(0,32)),f=l.slice(32,64),v=f[0]&128?28:27;return f[0]&=127,new Lc(dg,h,Ft(f),v)}if(l.length===65){const h=Ft(l.slice(0,32)),f=l.slice(32,64);t((f[0]&128)===0,"non-canonical s");const v=Lc.getNormalizedV(l[64]);return new Lc(dg,h,Ft(f),v)}t(!1,"invalid raw signature length")}if(e instanceof Lc)return e.clone();const n=e.r;t(n!=null,"missing r");const i=R$(n),s=function(l,h){if(l!=null)return R$(l);if(h!=null){t(Tn(h,32),"invalid yParityAndS");const f=Zr(h);return f[0]&=127,Ft(f)}t(!1,"missing s")}(e.s,e.yParityAndS);t((Zr(s)[0]&128)==0,"non-canonical s");const{networkV:o,v:a}=function(l,h,f){if(l!=null){const v=qt(l);return{networkV:v>=a4?v:void 0,v:Lc.getNormalizedV(v)}}if(h!=null)return t(Tn(h,32),"invalid yParityAndS"),{v:Zr(h)[0]&128?28:27};if(f!=null){switch(Sr(f,"sig.yParity")){case 0:return{v:27};case 1:return{v:28}}t(!1,"invalid yParity")}t(!1,"missing v")}(e.v,e.yParityAndS,e.yParity),c=new Lc(dg,i,s,a);return o&&de(c,dp,o),t(e.yParity==null||Sr(e.yParity,"sig.yParity")===c.yParity,"yParity mismatch"),t(e.yParityAndS==null||e.yParityAndS===c.yParityAndS,"yParityAndS mismatch"),c}};bm=new WeakMap,_m=new WeakMap,xm=new WeakMap,dp=new WeakMap;let vl=Lc;var $h;const V0=class V0{constructor(e){Le(this,$h);Ae(sm(e)===32,"invalid private key","privateKey","[REDACTED]"),de(this,$h,Ft(e))}get privateKey(){return ee(this,$h)}get publicKey(){return V0.computePublicKey(ee(this,$h))}get compressedPublicKey(){return V0.computePublicKey(ee(this,$h),!0)}sign(e){Ae(sm(e)===32,"invalid digest length","digest",e);const t=qd.sign(Xs(e),Xs(ee(this,$h)),{lowS:!0});return vl.from({r:Zf(t.r,32),s:Zf(t.s,32),v:t.recovery?28:27})}computeSharedSecret(e){const t=V0.computePublicKey(e);return Ft(qd.getSharedSecret(Xs(ee(this,$h)),Zr(t),!1))}static computePublicKey(e,t){let n=Zr(e,"key");if(n.length===32){const s=qd.getPublicKey(n,!!t);return Ft(s)}if(n.length===64){const s=new Uint8Array(65);s[0]=4,s.set(n,1),n=s}const i=qd.ProjectivePoint.fromHex(n);return Ft(i.toRawBytes(t))}static recoverPublicKey(e,t){Ae(sm(e)===32,"invalid digest length","digest",e);const n=vl.from(t);let i=qd.Signature.fromCompact(Xs(vi([n.r,n.s])));i=i.addRecoveryBit(n.yParity);const s=i.recoverPublicKey(Xs(e));return Ae(s!=null,"invalid signautre for digest","signature",t),"0x"+s.toHex(!1)}static addPoints(e,t,n){const i=qd.ProjectivePoint.fromHex(V0.computePublicKey(e).substring(2)),s=qd.ProjectivePoint.fromHex(V0.computePublicKey(t).substring(2));return"0x"+i.add(s).toHex(!!n)}};$h=new WeakMap;let Zv=V0;const PAe=BigInt(0),OAe=BigInt(36);function k$(r){r=r.toLowerCase();const e=r.substring(2).split(""),t=new Uint8Array(40);for(let i=0;i<40;i++)t[i]=e[i].charCodeAt(0);const n=Zr(Ei(t));for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&(e[i]=e[i].toUpperCase()),(n[i>>1]&15)>=8&&(e[i+1]=e[i+1].toUpperCase());return"0x"+e.join("")}const OT={};for(let r=0;r<10;r++)OT[String(r)]=String(r);for(let r=0;r<26;r++)OT[String.fromCharCode(65+r)]=String(10+r);const N$=15;function MAe(r){r=r.toUpperCase(),r=r.substring(4)+r.substring(0,2)+"00";let e=r.split("").map(n=>OT[n]).join("");for(;e.length>=N$;){let n=e.substring(0,N$);e=parseInt(n,10)%97+e.substring(n.length)}let t=String(98-parseInt(e,10)%97);for(;t.length<2;)t="0"+t;return t}const DAe=function(){const r={};for(let e=0;e<36;e++){const t="0123456789abcdefghijklmnopqrstuvwxyz"[e];r[t]=BigInt(e)}return r}();function $Ae(r){r=r.toLowerCase();let e=PAe;for(let t=0;te.format()).join(",")})`:this.type}defaultValue(){return 0}minValue(){return 0}maxValue(){return 0}isBigInt(){return!!this.type.match(/^u?int[0-9]+$/)}isData(){return this.type.startsWith("bytes")}isString(){return this.type==="string"}get tupleName(){if(this.type!=="tuple")throw TypeError("not a tuple");return ee(this,fp)}get arrayLength(){if(this.type!=="array")throw TypeError("not an array");return ee(this,fp)===!0?-1:ee(this,fp)===!1?this.value.length:null}static from(e,t){return new Rh(Th,e,t)}static uint8(e){return Ut(e,8)}static uint16(e){return Ut(e,16)}static uint24(e){return Ut(e,24)}static uint32(e){return Ut(e,32)}static uint40(e){return Ut(e,40)}static uint48(e){return Ut(e,48)}static uint56(e){return Ut(e,56)}static uint64(e){return Ut(e,64)}static uint72(e){return Ut(e,72)}static uint80(e){return Ut(e,80)}static uint88(e){return Ut(e,88)}static uint96(e){return Ut(e,96)}static uint104(e){return Ut(e,104)}static uint112(e){return Ut(e,112)}static uint120(e){return Ut(e,120)}static uint128(e){return Ut(e,128)}static uint136(e){return Ut(e,136)}static uint144(e){return Ut(e,144)}static uint152(e){return Ut(e,152)}static uint160(e){return Ut(e,160)}static uint168(e){return Ut(e,168)}static uint176(e){return Ut(e,176)}static uint184(e){return Ut(e,184)}static uint192(e){return Ut(e,192)}static uint200(e){return Ut(e,200)}static uint208(e){return Ut(e,208)}static uint216(e){return Ut(e,216)}static uint224(e){return Ut(e,224)}static uint232(e){return Ut(e,232)}static uint240(e){return Ut(e,240)}static uint248(e){return Ut(e,248)}static uint256(e){return Ut(e,256)}static uint(e){return Ut(e,256)}static int8(e){return Ut(e,-8)}static int16(e){return Ut(e,-16)}static int24(e){return Ut(e,-24)}static int32(e){return Ut(e,-32)}static int40(e){return Ut(e,-40)}static int48(e){return Ut(e,-48)}static int56(e){return Ut(e,-56)}static int64(e){return Ut(e,-64)}static int72(e){return Ut(e,-72)}static int80(e){return Ut(e,-80)}static int88(e){return Ut(e,-88)}static int96(e){return Ut(e,-96)}static int104(e){return Ut(e,-104)}static int112(e){return Ut(e,-112)}static int120(e){return Ut(e,-120)}static int128(e){return Ut(e,-128)}static int136(e){return Ut(e,-136)}static int144(e){return Ut(e,-144)}static int152(e){return Ut(e,-152)}static int160(e){return Ut(e,-160)}static int168(e){return Ut(e,-168)}static int176(e){return Ut(e,-176)}static int184(e){return Ut(e,-184)}static int192(e){return Ut(e,-192)}static int200(e){return Ut(e,-200)}static int208(e){return Ut(e,-208)}static int216(e){return Ut(e,-216)}static int224(e){return Ut(e,-224)}static int232(e){return Ut(e,-232)}static int240(e){return Ut(e,-240)}static int248(e){return Ut(e,-248)}static int256(e){return Ut(e,-256)}static int(e){return Ut(e,-256)}static bytes1(e){return Qr(e,1)}static bytes2(e){return Qr(e,2)}static bytes3(e){return Qr(e,3)}static bytes4(e){return Qr(e,4)}static bytes5(e){return Qr(e,5)}static bytes6(e){return Qr(e,6)}static bytes7(e){return Qr(e,7)}static bytes8(e){return Qr(e,8)}static bytes9(e){return Qr(e,9)}static bytes10(e){return Qr(e,10)}static bytes11(e){return Qr(e,11)}static bytes12(e){return Qr(e,12)}static bytes13(e){return Qr(e,13)}static bytes14(e){return Qr(e,14)}static bytes15(e){return Qr(e,15)}static bytes16(e){return Qr(e,16)}static bytes17(e){return Qr(e,17)}static bytes18(e){return Qr(e,18)}static bytes19(e){return Qr(e,19)}static bytes20(e){return Qr(e,20)}static bytes21(e){return Qr(e,21)}static bytes22(e){return Qr(e,22)}static bytes23(e){return Qr(e,23)}static bytes24(e){return Qr(e,24)}static bytes25(e){return Qr(e,25)}static bytes26(e){return Qr(e,26)}static bytes27(e){return Qr(e,27)}static bytes28(e){return Qr(e,28)}static bytes29(e){return Qr(e,29)}static bytes30(e){return Qr(e,30)}static bytes31(e){return Qr(e,31)}static bytes32(e){return Qr(e,32)}static address(e){return new Rh(Th,"address",e)}static bool(e){return new Rh(Th,"bool",!!e)}static bytes(e){return new Rh(Th,"bytes",e)}static string(e){return new Rh(Th,"string",e)}static array(e,t){throw new Error("not implemented yet")}static tuple(e,t){throw new Error("not implemented yet")}static overrides(e){return new Rh(Th,"overrides",Object.assign({},e))}static isTyped(e){return e&&typeof e=="object"&&"_typedSymbol"in e&&e._typedSymbol===P$}static dereference(e,t){if(Rh.isTyped(e)){if(e.type!==t)throw new Error(`invalid type: expecetd ${t}, got ${e.type}`);return e.value}return e}};fp=new WeakMap;let Ps=Rh;class LAe extends Sd{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){let n=Ps.dereference(t,"string");try{n=Gr(n)}catch(i){return this._throwError(i.message,t)}return e.writeValue(n)}decode(e){return Gr(Zf(e.readValue(),20))}}class UAe extends Sd{constructor(t){super(t.name,t.type,"_",t.dynamic);Oe(this,"coder");this.coder=t}defaultValue(){return this.coder.defaultValue()}encode(t,n){return this.coder.encode(t,n)}decode(t){return this.coder.decode(t)}}function nV(r,e,t){let n=[];if(Array.isArray(t))n=t;else if(t&&typeof t=="object"){let c={};n=e.map(l=>{const h=l.localName;return Ze(h,"cannot encode object for signature with missing names","INVALID_ARGUMENT",{argument:"values",info:{coder:l},value:t}),Ze(!c[h],"cannot encode object for signature with duplicate names","INVALID_ARGUMENT",{argument:"values",info:{coder:l},value:t}),c[h]=!0,t[h]})}else Ae(!1,"invalid tuple value","tuple",t);Ae(e.length===n.length,"types/value length mismatch","tuple",t);let i=new ZC,s=new ZC,o=[];e.forEach((c,l)=>{let h=n[l];if(c.dynamic){let f=s.length;c.encode(s,h);let v=i.writeUpdatableValue();o.push(y=>{v(y+f)})}else c.encode(i,h)}),o.forEach(c=>{c(i.length)});let a=r.appendWriter(i);return a+=r.appendWriter(s),a}function iV(r,e){let t=[],n=[],i=r.subReader(0);return e.forEach(s=>{let o=null;if(s.dynamic){let a=r.readIndex(),c=i.subReader(a);try{o=s.decode(c)}catch(l){if(ks(l,"BUFFER_OVERRUN"))throw l;o=l,o.baseType=s.name,o.name=s.localName,o.type=s.type}}else try{o=s.decode(r)}catch(a){if(ks(a,"BUFFER_OVERRUN"))throw a;o=a,o.baseType=s.name,o.name=s.localName,o.type=s.type}if(o==null)throw new Error("investigate");t.push(o),n.push(s.localName||null)}),Ow.fromItems(t,n)}class FAe extends Sd{constructor(t,n,i){const s=t.type+"["+(n>=0?n:"")+"]",o=n===-1||t.dynamic;super("array",s,i,o);Oe(this,"coder");Oe(this,"length");tr(this,{coder:t,length:n})}defaultValue(){const t=this.coder.defaultValue(),n=[];for(let i=0;io||i<-(o+KAe))&&this._throwError("value out-of-bounds",n),i=fz(i,8*ro)}else(iX0(s,this.size*8))&&this._throwError("value out-of-bounds",n);return t.writeValue(i)}decode(t){let n=X0(t.readValue(),this.size*8);return this.signed&&(n=v8(n,this.size*8)),n}}class YAe extends sV{constructor(e){super("string",e)}defaultValue(){return""}encode(e,t){return super.encode(e,Cu(Ps.dereference(t,"string")))}decode(e){return y8(super.decode(e))}}class c4 extends Sd{constructor(t,n){let i=!1;const s=[];t.forEach(a=>{a.dynamic&&(i=!0),s.push(a.type)});const o="tuple("+s.join(",")+")";super("tuple",o,n,i);Oe(this,"coders");tr(this,{coders:Object.freeze(t.slice())})}defaultValue(){const t=[];this.coders.forEach(i=>{t.push(i.defaultValue())});const n=this.coders.reduce((i,s)=>{const o=s.localName;return o&&(i[o]||(i[o]=0),i[o]++),i},{});return this.coders.forEach((i,s)=>{let o=i.localName;!o||n[o]!==1||(o==="length"&&(o="_length"),t[o]==null&&(t[o]=t[s]))}),Object.freeze(t)}encode(t,n){const i=Ps.dereference(n,"tuple");return nV(t,this.coders,i)}decode(t){return iV(t,this.coders)}}function l1(r){return Ei(Cu(r))}var QAe="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";const O$=new Map([[8217,"apostrophe"],[8260,"fraction slash"],[12539,"middle dot"]]),M$=4;function JAe(r){let e=0;function t(){return r[e++]<<8|r[e++]}let n=t(),i=1,s=[0,1];for(let q=1;q>--c&1}const f=31,v=2**f,y=v>>>1,A=y>>1,M=v-1;let $=0;for(let q=0;q1;){let Q=Y+I>>>1;q>>1|h(),T=T<<1^y,V=(V^y)<<1|y|1;P=T,H=1+V-T}let F=n-4;return L.map(q=>{switch(q-F){case 3:return F+65792+(r[a++]<<16|r[a++]<<8|r[a++]);case 2:return F+256+(r[a++]<<8|r[a++]);case 1:return F+r[a++];default:return q-1}})}function XAe(r){let e=0;return()=>r[e++]}function oV(r){return XAe(JAe(eEe(r)))}function eEe(r){let e=[];[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"].forEach((i,s)=>e[i.charCodeAt(0)]=s);let t=r.length,n=new Uint8Array(6*t>>3);for(let i=0,s=0,o=0,a=0;i=8&&(n[s++]=a>>(o-=8));return n}function tEe(r){return r&1?~r>>1:r>>1}function rEe(r,e){let t=Array(r);for(let n=0,i=0;n{let e=Yv(r);if(e.length)return e})}function cV(r){let e=[];for(;;){let t=r();if(t==0)break;e.push(nEe(t,r))}for(;;){let t=r()-1;if(t<0)break;e.push(iEe(t,r))}return e.flat()}function Qv(r){let e=[];for(;;){let t=r(e.length);if(!t)break;e.push(t)}return e}function lV(r,e,t){let n=Array(r).fill().map(()=>[]);for(let i=0;in[o].push(s));return n}function nEe(r,e){let t=1+e(),n=e(),i=Qv(e);return lV(i.length,1+r,e).flatMap((o,a)=>{let[c,...l]=o;return Array(i[a]).fill().map((h,f)=>{let v=f*n;return[c+f*t,l.map(y=>y+v)]})})}function iEe(r,e){let t=1+e();return lV(t,1+r,e).map(i=>[i[0],i.slice(1)])}function sEe(r){let e=[],t=Yv(r);return i(n([]),[]),e;function n(s){let o=r(),a=Qv(()=>{let c=Yv(r).map(l=>t[l]);if(c.length)return n(c)});return{S:o,B:a,Q:s}}function i({S:s,B:o},a,c){if(!(s&4&&c===a[a.length-1])){s&2&&(c=a[a.length-1]),s&1&&e.push(a);for(let l of o)for(let h of l.Q)i(l,[...a,h],c)}}}function oEe(r){return r.toString(16).toUpperCase().padStart(2,"0")}function uV(r){return`{${oEe(r)}}`}function aEe(r){let e=[];for(let t=0,n=r.length;t>24&255}function fV(r){return r&16777215}let nS,D$,iS,z4;function gEe(){let r=oV(lEe);nS=new Map(aV(r).flatMap((e,t)=>e.map(n=>[n,t+1<<24]))),D$=new Set(Yv(r)),iS=new Map,z4=new Map;for(let[e,t]of cV(r)){if(!D$.has(e)&&t.length==2){let[n,i]=t,s=z4.get(n);s||(s=new Map,z4.set(n,s)),s.set(i,e)}iS.set(e,t.reverse())}}function pV(r){return r>=Jv&&r=x8&&r=A8&&eE8&&e0&&i(E8+l)}else{let o=iS.get(s);o?t.push(...o):i(s)}if(!t.length)break;s=t.pop()}if(n&&e.length>1){let s=d3(e[0]);for(let o=1;o0&&i>=o)o==0?(e.push(n,...t),t.length=0,n=a):t.push(a),i=o;else{let c=mEe(n,a);c>=0?n=c:i==0&&o==0?(e.push(n),n=a):(t.push(a),i=o)}}return n>=0&&e.push(n,...t),e}function mV(r){return gV(r).map(fV)}function vEe(r){return wEe(gV(r))}const $$=45,wV=".",vV=65039,yV=1,S8=r=>Array.from(r);function Xv(r,e){return r.P.has(e)||r.Q.has(e)}class yEe extends Array{get is_emoji(){return!0}}let sS,bV,tp,oS,_V,am,O7,kg,F0,B$,aS;function MT(){if(sS)return;let r=oV(QAe);const e=()=>Yv(r),t=()=>new Set(e()),n=(h,f)=>f.forEach(v=>h.add(v));sS=new Map(cV(r)),bV=t(),tp=e(),oS=new Set(e().map(h=>tp[h])),tp=new Set(tp),_V=t(),t();let i=aV(r),s=r();const o=()=>{let h=new Set;return e().forEach(f=>n(h,i[f])),n(h,e()),h};am=Qv(h=>{let f=Qv(r).map(v=>v+96);if(f.length){let v=h>=s;f[0]-=32,f=Lw(f),v&&(f=`Restricted[${f}]`);let y=o(),A=o(),M=!r();return{N:f,P:y,Q:A,M,R:v}}}),O7=t(),kg=new Map;let a=e().concat(S8(O7)).sort((h,f)=>h-f);a.forEach((h,f)=>{let v=r(),y=a[f]=v?a[f-v]:{V:[],M:new Map};y.V.push(h),O7.has(h)||kg.set(h,y)});for(let{V:h,M:f}of new Set(kg.values())){let v=[];for(let A of h){let M=am.filter(L=>Xv(L,A)),$=v.find(({G:L})=>M.some(P=>L.has(P)));$||($={G:new Set,V:[]},v.push($)),$.V.push(A),n($.G,M)}let y=v.flatMap(A=>S8(A.G));for(let{G:A,V:M}of v){let $=new Set(y.filter(L=>!A.has(L)));for(let L of M)f.set(L,$)}}F0=new Set;let c=new Set;const l=h=>F0.has(h)?c.add(h):F0.add(h);for(let h of am){for(let f of h.P)l(f);for(let f of h.Q)l(f)}for(let h of F0)!kg.has(h)&&!c.has(h)&&kg.set(h,yV);n(F0,mV(F0)),B$=sEe(r).map(h=>yEe.from(h)).sort(cEe),aS=new Map;for(let h of B$){let f=[aS];for(let v of h){let y=f.map(A=>{let M=A.get(v);return M||(M=new Map,A.set(v,M)),M});v===vV?f.push(...y):f=y}for(let v of f)v.V=h}}function DT(r){return(xV(r)?"":`${$T(tx([r]))} `)+uV(r)}function $T(r){return`"${r}"‎`}function bEe(r){if(r.length>=4&&r[2]==$$&&r[3]==$$)throw new Error(`invalid label extension: "${Lw(r.slice(0,4))}"`)}function _Ee(r){for(let t=r.lastIndexOf(95);t>0;)if(r[--t]!==95)throw new Error("underscore allowed only at start")}function xEe(r){let e=r[0],t=O$.get(e);if(t)throw U3(`leading ${t}`);let n=r.length,i=-1;for(let s=1;se&&(e>>=1,r=[...r.slice(0,e),8230,...r.slice(-e)]);let i=0,s=r.length;for(let o=0;o{let s=aEe(i),o={input:s,offset:n};n+=s.length+1;try{let a=o.tokens=kEe(s,e,t),c=a.length,l;if(!c)throw new Error("empty label");let h=o.output=a.flat();if(_Ee(h),!(o.emoji=c>1||a[0].is_emoji)&&h.every(v=>v<128))bEe(h),l="ASCII";else{let v=a.flatMap(y=>y.is_emoji?[]:y);if(!v.length)l="Emoji";else{if(tp.has(h[0]))throw U3("leading combining mark");for(let M=1;Mo.has(a)):S8(o),!t.length)return}else n.push(i)}if(t){for(let i of t)if(n.every(s=>Xv(i,s)))throw new Error(`whole-script confusable: ${r.N}/${i.N}`)}}function IEe(r){let e=am;for(let t of r){let n=e.filter(i=>Xv(i,t));if(!n.length)throw am.some(i=>Xv(i,t))?EV(e[0],t):AV(t);if(e=n,n.length==1)break}return e}function TEe(r){return r.map(({input:e,error:t,output:n})=>{if(t){let i=t.message;throw new Error(r.length==1?i:`Invalid label ${$T(tx(e,63))}: ${i}`)}return Lw(n)}).join(wV)}function AV(r){return new Error(`disallowed character: ${DT(r)}`)}function EV(r,e){let t=DT(e),n=am.find(i=>i.P.has(e));return n&&(t=`${n.N} ${t}`),new Error(`illegal mixture: ${r.N} + ${t}`)}function U3(r){return new Error(`illegal placement: ${r}`)}function REe(r,e){for(let t of e)if(!Xv(r,t))throw EV(r,t);if(r.M){let t=mV(e);for(let n=1,i=t.length;nM$)throw new Error(`excessive non-spacing marks: ${$T(tx(t.slice(n-1,s)))} (${s-n}/${M$})`);n=s}}}function kEe(r,e,t){let n=[],i=[];for(r=r.slice().reverse();r.length;){let s=PEe(r);if(s)i.length&&(n.push(e(i)),i=[]),n.push(t(s));else{let o=r.pop();if(F0.has(o))i.push(o);else{let a=sS.get(o);if(a)i.push(...a);else if(!bV.has(o))throw AV(o)}}}return i.length&&n.push(e(i)),n}function NEe(r){return r.filter(e=>e!=vV)}function PEe(r,e){let t=aS,n,i=r.length;for(;i&&(t=t.get(r[--i]),!!t);){let{V:s}=t;s&&(n=s,r.length=i)}return n}const CV=new Uint8Array(32);CV.fill(0);function L$(r){return Ae(r.length!==0,"invalid ENS name; empty component","comp",r),r}function SV(r){const e=Cu(OEe(r)),t=[];if(r.length===0)return t;let n=0;for(let i=0;i{Ae(n.length<=t,`label ${JSON.stringify(r)} exceeds ${t} bytes`,"name",r);const i=new Uint8Array(n.length+1);return i.set(n,1),i[0]=i.length-1,i})))+"00"}function M7(r,e){return{address:Gr(r),storageKeys:e.map((t,n)=>(Ae(Tn(t,32),"invalid slot",`storageKeys[${n}]`,t),t.toLowerCase()))}}function D1(r){if(Array.isArray(r))return r.map((t,n)=>Array.isArray(t)?(Ae(t.length===2,"invalid slot set",`value[${n}]`,t),M7(t[0],t[1])):(Ae(t!=null&&typeof t=="object","invalid address-slot set","value",r),M7(t.address,t.storageKeys)));Ae(r!=null&&typeof r=="object","invalid access list","value",r);const e=Object.keys(r).map(t=>{const n=r[t].reduce((i,s)=>(i[s]=!0,i),{});return M7(t,Object.keys(n).sort())});return e.sort((t,n)=>t.address.localeCompare(n.address)),e}function DEe(r){let e;return typeof r=="string"?e=Zv.computePublicKey(r,!1):e=r.publicKey,Gr(Ei("0x"+e.substring(4)).substring(26))}function $Ee(r,e){return DEe(Zv.recoverPublicKey(r,e))}const Qi=BigInt(0),BEe=BigInt(2),LEe=BigInt(27),UEe=BigInt(28),FEe=BigInt(35),jEe=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),D7=4096*32;function U$(r,e){let t=r.toString(16);for(;t.length<2;)t="0"+t;return t+=h2(e).substring(4),"0x"+t}function rx(r){return r==="0x"?null:Gr(r)}function BT(r,e){try{return D1(r)}catch(t){Ae(!1,t.message,e,r)}}function ub(r,e){return r==="0x"?0:Sr(r,e)}function wi(r,e){if(r==="0x")return Qi;const t=qt(r,e);return Ae(t<=jEe,"value exceeds uint size",e,t),t}function Un(r,e){const t=qt(r,"value"),n=to(t);return Ae(n.length<=32,"value too large",`tx.${e}`,t),n}function LT(r){return D1(r).map(e=>[e.address,e.storageKeys])}function HEe(r,e){Ae(Array.isArray(r),`invalid ${e}`,"value",r);for(let t=0;ti.data),t.map(i=>i.commitment),t.map(i=>i.proof)])]):vi(["0x03",c1(n)])}var Yl,Am,Em,Cm,Sm,Im,Tm,Rm,km,Nm,Pm,Om,pp,df,Bh,ff,Mm,V4;const kh=class kh{constructor(){Le(this,Mm);Le(this,Yl);Le(this,Am);Le(this,Em);Le(this,Cm);Le(this,Sm);Le(this,Im);Le(this,Tm);Le(this,Rm);Le(this,km);Le(this,Nm);Le(this,Pm);Le(this,Om);Le(this,pp);Le(this,df);Le(this,Bh);Le(this,ff);de(this,Yl,null),de(this,Am,null),de(this,Cm,0),de(this,Sm,Qi),de(this,Im,null),de(this,Tm,null),de(this,Rm,null),de(this,Em,"0x"),de(this,km,Qi),de(this,Nm,Qi),de(this,Pm,null),de(this,Om,null),de(this,pp,null),de(this,df,null),de(this,ff,null),de(this,Bh,null)}get type(){return ee(this,Yl)}set type(e){switch(e){case null:de(this,Yl,null);break;case 0:case"legacy":de(this,Yl,0);break;case 1:case"berlin":case"eip-2930":de(this,Yl,1);break;case 2:case"london":case"eip-1559":de(this,Yl,2);break;case 3:case"cancun":case"eip-4844":de(this,Yl,3);break;default:Ae(!1,"unsupported transaction type","type",e)}}get typeName(){switch(this.type){case 0:return"legacy";case 1:return"eip-2930";case 2:return"eip-1559";case 3:return"eip-4844"}return null}get to(){const e=ee(this,Am);return e==null&&this.type===3?Gv:e}set to(e){de(this,Am,e==null?null:Gr(e))}get nonce(){return ee(this,Cm)}set nonce(e){de(this,Cm,Sr(e,"value"))}get gasLimit(){return ee(this,Sm)}set gasLimit(e){de(this,Sm,qt(e))}get gasPrice(){const e=ee(this,Im);return e==null&&(this.type===0||this.type===1)?Qi:e}set gasPrice(e){de(this,Im,e==null?null:qt(e,"gasPrice"))}get maxPriorityFeePerGas(){const e=ee(this,Tm);return e??(this.type===2||this.type===3?Qi:null)}set maxPriorityFeePerGas(e){de(this,Tm,e==null?null:qt(e,"maxPriorityFeePerGas"))}get maxFeePerGas(){const e=ee(this,Rm);return e??(this.type===2||this.type===3?Qi:null)}set maxFeePerGas(e){de(this,Rm,e==null?null:qt(e,"maxFeePerGas"))}get data(){return ee(this,Em)}set data(e){de(this,Em,Ft(e))}get value(){return ee(this,km)}set value(e){de(this,km,qt(e,"value"))}get chainId(){return ee(this,Nm)}set chainId(e){de(this,Nm,qt(e))}get signature(){return ee(this,Pm)||null}set signature(e){de(this,Pm,e==null?null:vl.from(e))}get accessList(){const e=ee(this,Om)||null;return e??(this.type===1||this.type===2||this.type===3?[]:null)}set accessList(e){de(this,Om,e==null?null:D1(e))}get maxFeePerBlobGas(){const e=ee(this,pp);return e==null&&this.type===3?Qi:e}set maxFeePerBlobGas(e){de(this,pp,e==null?null:qt(e,"maxFeePerBlobGas"))}get blobVersionedHashes(){let e=ee(this,df);return e==null&&this.type===3?[]:e}set blobVersionedHashes(e){if(e!=null){Ae(Array.isArray(e),"blobVersionedHashes must be an Array","value",e),e=e.slice();for(let t=0;tObject.assign({},e))}set blobs(e){if(e==null){de(this,ff,null);return}const t=[],n=[];for(let i=0;i=0?2:e.pop()}inferTypes(){const e=this.gasPrice!=null,t=this.maxFeePerGas!=null||this.maxPriorityFeePerGas!=null,n=this.accessList!=null,i=ee(this,pp)!=null||ee(this,df);this.maxFeePerGas!=null&&this.maxPriorityFeePerGas!=null&&Ze(this.maxFeePerGas>=this.maxPriorityFeePerGas,"priorityFee cannot be more than maxFee","BAD_DATA",{value:this}),Ze(!t||this.type!==0&&this.type!==1,"transaction type cannot have maxFeePerGas or maxPriorityFeePerGas","BAD_DATA",{value:this}),Ze(this.type!==0||!n,"legacy transaction cannot have accessList","BAD_DATA",{value:this});const s=[];return this.type!=null?s.push(this.type):t?s.push(2):e?(s.push(1),n||s.push(0)):n?(s.push(1),s.push(2)):(i&&this.to||(s.push(0),s.push(1),s.push(2)),s.push(3)),s.sort(),s}isLegacy(){return this.type===0}isBerlin(){return this.type===1}isLondon(){return this.type===2}isCancun(){return this.type===3}clone(){return kh.from(this)}toJSON(){const e=t=>t==null?null:t.toString();return{type:this.type,to:this.to,data:this.data,nonce:this.nonce,gasLimit:e(this.gasLimit),gasPrice:e(this.gasPrice),maxPriorityFeePerGas:e(this.maxPriorityFeePerGas),maxFeePerGas:e(this.maxFeePerGas),value:e(this.value),chainId:e(this.chainId),sig:this.signature?this.signature.toJSON():null,accessList:this.accessList}}static from(e){if(e==null)return new kh;if(typeof e=="string"){const n=Zr(e);if(n[0]>=127)return kh.from(WEe(n));switch(n[0]){case 1:return kh.from(KEe(n));case 2:return kh.from(VEe(n));case 3:return kh.from(ZEe(n))}Ze(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:"from"})}const t=new kh;return e.type!=null&&(t.type=e.type),e.to!=null&&(t.to=e.to),e.nonce!=null&&(t.nonce=e.nonce),e.gasLimit!=null&&(t.gasLimit=e.gasLimit),e.gasPrice!=null&&(t.gasPrice=e.gasPrice),e.maxPriorityFeePerGas!=null&&(t.maxPriorityFeePerGas=e.maxPriorityFeePerGas),e.maxFeePerGas!=null&&(t.maxFeePerGas=e.maxFeePerGas),e.maxFeePerBlobGas!=null&&(t.maxFeePerBlobGas=e.maxFeePerBlobGas),e.data!=null&&(t.data=e.data),e.value!=null&&(t.value=e.value),e.chainId!=null&&(t.chainId=e.chainId),e.signature!=null&&(t.signature=vl.from(e.signature)),e.accessList!=null&&(t.accessList=e.accessList),e.blobVersionedHashes!=null&&(t.blobVersionedHashes=e.blobVersionedHashes),e.kzg!=null&&(t.kzg=e.kzg),e.blobs!=null&&(t.blobs=e.blobs),e.hash!=null&&(Ae(t.isSigned(),"unsigned transaction cannot define '.hash'","tx",e),Ae(t.hash===e.hash,"hash mismatch","tx",e)),e.from!=null&&(Ae(t.isSigned(),"unsigned transaction cannot define '.from'","tx",e),Ae(t.from.toLowerCase()===(e.from||"").toLowerCase(),"from mismatch","tx",e)),t}};Yl=new WeakMap,Am=new WeakMap,Em=new WeakMap,Cm=new WeakMap,Sm=new WeakMap,Im=new WeakMap,Tm=new WeakMap,Rm=new WeakMap,km=new WeakMap,Nm=new WeakMap,Pm=new WeakMap,Om=new WeakMap,pp=new WeakMap,df=new WeakMap,Bh=new WeakMap,ff=new WeakMap,Mm=new WeakSet,V4=function(e,t){Ze(!e||this.signature!=null,"cannot serialize unsigned transaction; maybe you meant .unsignedSerialized","UNSUPPORTED_OPERATION",{operation:".serialized"});const n=e?this.signature:null;switch(this.inferType()){case 0:return zEe(this,n);case 1:return GEe(this,n);case 2:return qEe(this,n);case 3:return YEe(this,n,t?this.blobs:null)}Ze(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:".serialized"})};let I8=kh;const IV=new Uint8Array(32);IV.fill(0);const QEe=BigInt(-1),TV=BigInt(0),RV=BigInt(1),JEe=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function XEe(r){const e=Zr(r),t=e.length%32;return t?vi([e,IV.slice(t)]):Ft(e)}const e7e=Zf(RV,32),t7e=Zf(TV,32),F$={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},$7=["name","version","chainId","verifyingContract","salt"];function j$(r){return function(e){return Ae(typeof e=="string",`invalid domain value for ${JSON.stringify(r)}`,`domain.${r}`,e),e}}const r7e={name:j$("name"),version:j$("version"),chainId:function(r){const e=qt(r,"domain.chainId");return Ae(e>=0,"invalid chain ID","domain.chainId",r),Number.isSafeInteger(e)?Number(e):$g(e)},verifyingContract:function(r){try{return Gr(r).toLowerCase()}catch{}Ae(!1,'invalid domain value "verifyingContract"',"domain.verifyingContract",r)},salt:function(r){const e=Zr(r,"domain.salt");return Ae(e.length===32,'invalid domain value "salt"',"domain.salt",r),Ft(e)}};function B7(r){{const e=r.match(/^(u?)int(\d+)$/);if(e){const t=e[1]==="",n=parseInt(e[2]);Ae(n%8===0&&n!==0&&n<=256&&e[2]===String(n),"invalid numeric width","type",r);const i=X0(JEe,t?n-1:n),s=t?(i+RV)*QEe:TV;return function(o){const a=qt(o,"value");return Ae(a>=s&&a<=i,`value out-of-bounds for ${r}`,"value",a),Zf(t?fz(a,256):a,32)}}}{const e=r.match(/^bytes(\d+)$/);if(e){const t=parseInt(e[1]);return Ae(t!==0&&t<=32&&e[1]===String(t),"invalid bytes width","type",r),function(n){const i=Zr(n);return Ae(i.length===t,`invalid length for ${r}`,"value",n),XEe(n)}}}switch(r){case"address":return function(e){return a1(Gr(e),32)};case"bool":return function(e){return e?e7e:t7e};case"bytes":return function(e){return Ei(e)};case"string":return function(e){return l1(e)}}return null}function H$(r,e){return`${r}(${e.map(({name:t,type:n})=>n+" "+t).join(",")})`}function l4(r){const e=r.match(/^([^\x5b]*)((\x5b\d*\x5d)*)(\x5b(\d*)\x5d)$/);return e?{base:e[1],index:e[2]+e[4],array:{base:e[1],prefix:e[1]+e[2],count:e[5]?parseInt(e[5]):-1}}:{base:r}}var ly,Lh,Dm,L8,kV;const Za=class Za{constructor(e){Le(this,L8);Oe(this,"primaryType");Le(this,ly);Le(this,Lh);Le(this,Dm);de(this,Lh,new Map),de(this,Dm,new Map);const t=new Map,n=new Map,i=new Map,s={};Object.keys(e).forEach(c=>{s[c]=e[c].map(({name:l,type:h})=>{let{base:f,index:v}=l4(h);return f==="int"&&!e.int&&(f="int256"),f==="uint"&&!e.uint&&(f="uint256"),{name:l,type:f+(v||"")}}),t.set(c,new Set),n.set(c,[]),i.set(c,new Set)}),de(this,ly,JSON.stringify(s));for(const c in s){const l=new Set;for(const h of s[c]){Ae(!l.has(h.name),`duplicate variable name ${JSON.stringify(h.name)} in ${JSON.stringify(c)}`,"types",e),l.add(h.name);const f=l4(h.type).base;Ae(f!==c,`circular type reference to ${JSON.stringify(f)}`,"types",e),!B7(f)&&(Ae(n.has(f),`unknown type ${JSON.stringify(f)}`,"types",e),n.get(f).push(c),t.get(c).add(f))}}const o=Array.from(n.keys()).filter(c=>n.get(c).length===0);Ae(o.length!==0,"missing primary type","types",e),Ae(o.length===1,`ambiguous primary types or unused types: ${o.map(c=>JSON.stringify(c)).join(", ")}`,"types",e),tr(this,{primaryType:o[0]});function a(c,l){Ae(!l.has(c),`circular type reference to ${JSON.stringify(c)}`,"types",e),l.add(c);for(const h of t.get(c))if(n.has(h)){a(h,l);for(const f of l)i.get(f).add(h)}l.delete(c)}a(this.primaryType,new Set);for(const[c,l]of i){const h=Array.from(l);h.sort(),ee(this,Lh).set(c,H$(c,s[c])+h.map(f=>H$(f,s[f])).join(""))}}get types(){return JSON.parse(ee(this,ly))}getEncoder(e){let t=ee(this,Dm).get(e);return t||(t=rt(this,L8,kV).call(this,e),ee(this,Dm).set(e,t)),t}encodeType(e){const t=ee(this,Lh).get(e);return Ae(t,`unknown type: ${JSON.stringify(e)}`,"name",e),t}encodeData(e,t){return this.getEncoder(e)(t)}hashStruct(e,t){return Ei(this.encodeData(e,t))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,t,n){if(B7(e))return n(e,t);const i=l4(e).array;if(i)return Ae(i.count===-1||i.count===t.length,`array length mismatch; expected length ${i.count}`,"value",t),t.map(o=>this._visit(i.prefix,o,n));const s=this.types[e];if(s)return s.reduce((o,{name:a,type:c})=>(o[a]=this._visit(c,t[a],n),o),{});Ae(!1,`unknown type: ${e}`,"type",e)}visit(e,t){return this._visit(this.primaryType,e,t)}static from(e){return new Za(e)}static getPrimaryType(e){return Za.from(e).primaryType}static hashStruct(e,t,n){return Za.from(t).hashStruct(e,n)}static hashDomain(e){const t=[];for(const n in e){if(e[n]==null)continue;const i=F$[n];Ae(i,`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),t.push({name:n,type:i})}return t.sort((n,i)=>$7.indexOf(n.name)-$7.indexOf(i.name)),Za.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,n){return vi(["0x1901",Za.hashDomain(e),Za.from(t).hash(n)])}static hash(e,t,n){return Ei(Za.encode(e,t,n))}static async resolveNames(e,t,n,i){e=Object.assign({},e);for(const a in e)e[a]==null&&delete e[a];const s={};e.verifyingContract&&!Tn(e.verifyingContract,20)&&(s[e.verifyingContract]="0x");const o=Za.from(t);o.visit(n,(a,c)=>(a==="address"&&!Tn(c,20)&&(s[c]="0x"),c));for(const a in s)s[a]=await i(a);return e.verifyingContract&&s[e.verifyingContract]&&(e.verifyingContract=s[e.verifyingContract]),n=o.visit(n,(a,c)=>a==="address"&&s[c]?s[c]:c),{domain:e,value:n}}static getPayload(e,t,n){Za.hashDomain(e);const i={},s=[];$7.forEach(c=>{const l=e[c];l!=null&&(i[c]=r7e[c](l),s.push({name:c,type:F$[c]}))});const o=Za.from(t);t=o.types;const a=Object.assign({},t);return Ae(a.EIP712Domain==null,"types must not contain EIP712Domain type","types.EIP712Domain",t),a.EIP712Domain=s,o.encode(n),{types:a,domain:i,primaryType:o.primaryType,message:o.visit(n,(c,l)=>{if(c.match(/^bytes(\d*)/))return Ft(Zr(l));if(c.match(/^u?int/))return qt(l).toString();switch(c){case"address":return l.toLowerCase();case"bool":return!!l;case"string":return Ae(typeof l=="string","invalid string","value",l),l}Ae(!1,"unsupported type","type",c)})}}};ly=new WeakMap,Lh=new WeakMap,Dm=new WeakMap,L8=new WeakSet,kV=function(e){{const i=B7(e);if(i)return i}const t=l4(e).array;if(t){const i=t.prefix,s=this.getEncoder(i);return o=>{Ae(t.count===-1||t.count===o.length,`array length mismatch; expected length ${t.count}`,"value",o);let a=o.map(s);return ee(this,Lh).has(i)&&(a=a.map(Ei)),Ei(vi(a))}}const n=this.types[e];if(n){const i=l1(ee(this,Lh).get(e));return s=>{const o=n.map(({name:a,type:c})=>{const l=this.getEncoder(c)(s[a]);return ee(this,Lh).has(c)?Ei(l):l});return o.unshift(i),vi(o)}}Ae(!1,`unknown type: ${e}`,"type",e)};let T8=Za;function io(r){const e=new Set;return r.forEach(t=>e.add(t)),Object.freeze(e)}const n7e="external public payable override",i7e=io(n7e.split(" ")),NV="constant external internal payable private public pure view override",s7e=io(NV.split(" ")),PV="constructor error event fallback function receive struct",OV=io(PV.split(" ")),MV="calldata memory storage payable indexed",o7e=io(MV.split(" ")),a7e="tuple returns",c7e=[PV,MV,a7e,NV].join(" "),l7e=io(c7e.split(" ")),u7e={"(":"OPEN_PAREN",")":"CLOSE_PAREN","[":"OPEN_BRACKET","]":"CLOSE_BRACKET",",":"COMMA","@":"AT"},h7e=new RegExp("^(\\s*)"),d7e=new RegExp("^([0-9]+)"),f7e=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)"),DV=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)$"),$V=new RegExp("^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$");var os,Vc,uy,lS;const U8=class U8{constructor(e){Le(this,uy);Le(this,os);Le(this,Vc);de(this,os,0),de(this,Vc,e.slice())}get offset(){return ee(this,os)}get length(){return ee(this,Vc).length-ee(this,os)}clone(){return new U8(ee(this,Vc))}reset(){de(this,os,0)}popKeyword(e){const t=this.peek();if(t.type!=="KEYWORD"||!e.has(t.text))throw new Error(`expected keyword ${t.text}`);return this.pop().text}popType(e){if(this.peek().type!==e){const t=this.peek();throw new Error(`expected ${e}; got ${t.type} ${JSON.stringify(t.text)}`)}return this.pop().text}popParen(){const e=this.peek();if(e.type!=="OPEN_PAREN")throw new Error("bad start");const t=rt(this,uy,lS).call(this,ee(this,os)+1,e.match+1);return de(this,os,e.match+1),t}popParams(){const e=this.peek();if(e.type!=="OPEN_PAREN")throw new Error("bad start");const t=[];for(;ee(this,os)=ee(this,Vc).length)throw new Error("out-of-bounds");return ee(this,Vc)[ee(this,os)]}peekKeyword(e){const t=this.peekType("KEYWORD");return t!=null&&e.has(t)?t:null}peekType(e){if(this.length===0)return null;const t=this.peek();return t.type===e?t.text:null}pop(){const e=this.peek();return M2(this,os)._++,e}toString(){const e=[];for(let t=ee(this,os);t`}};os=new WeakMap,Vc=new WeakMap,uy=new WeakSet,lS=function(e=0,t=0){return new U8(ee(this,Vc).slice(e,t).map(n=>Object.freeze(Object.assign({},n,{match:n.match-e,linkBack:n.linkBack-e,linkNext:n.linkNext-e}))))};let yl=U8;function f0(r){const e=[],t=o=>{const a=s0&&e[e.length-1].type==="NUMBER"){const f=e.pop().text;h=f+h,e[e.length-1].value=Sr(f)}if(e.length===0||e[e.length-1].type!=="BRACKET")throw new Error("missing opening bracket");e[e.length-1].text+=h}continue}if(a=o.match(f7e),a){if(c.text=a[1],s+=c.text.length,l7e.has(c.text)){c.type="KEYWORD";continue}if(c.text.match($V)){c.type="TYPE";continue}c.type="ID";continue}if(a=o.match(d7e),a){c.text=a[1],c.type="NUMBER",s+=c.text.length;continue}throw new Error(`unexpected token ${JSON.stringify(o[0])} at position ${s}`)}return new yl(e.map(o=>Object.freeze(o)))}function W$(r,e){let t=[];for(const n in e.keys())r.has(n)&&t.push(n);if(t.length>1)throw new Error(`conflicting types: ${t.join(", ")}`)}function nx(r,e){if(e.peekKeyword(OV)){const t=e.pop().text;if(t!==r)throw new Error(`expected ${r}, got ${t}`)}return e.popType("ID")}function vd(r,e){const t=new Set;for(;;){const n=r.peekType("KEYWORD");if(n==null||e&&!e.has(n))break;if(r.pop(),t.has(n))throw new Error(`duplicate keywords: ${JSON.stringify(n)}`);t.add(n)}return Object.freeze(t)}function BV(r){let e=vd(r,s7e);return W$(e,io("constant payable nonpayable".split(" "))),W$(e,io("pure view payable nonpayable".split(" "))),e.has("view")?"view":e.has("pure")?"pure":e.has("payable")?"payable":e.has("nonpayable")?"nonpayable":e.has("constant")?"view":"nonpayable"}function nd(r,e){return r.popParams().map(t=>us.from(t,e))}function LV(r){if(r.peekType("AT")){if(r.pop(),r.peekType("NUMBER"))return qt(r.pop().text);throw new Error("invalid gas")}return null}function u1(r){if(r.length)throw new Error(`unexpected tokens at offset ${r.offset}: ${r.toString()}`)}const p7e=new RegExp(/^(.*)\[([0-9]*)\]$/);function z$(r){const e=r.match($V);if(Ae(e,"invalid type","type",r),r==="uint")return"uint256";if(r==="int")return"int256";if(e[2]){const t=parseInt(e[2]);Ae(t!==0&&t<=32,"invalid bytes length","type",r)}else if(e[3]){const t=parseInt(e[3]);Ae(t!==0&&t<=256&&t%8===0,"invalid numeric width","type",r)}return r}const Xn={},Wo=Symbol.for("_ethers_internal"),V$="_ParamTypeInternal",q$="_ErrorInternal",K$="_EventInternal",G$="_ConstructorInternal",Z$="_FallbackInternal",Y$="_FunctionInternal",Q$="_StructInternal";var $m,q4;const Ya=class Ya{constructor(e,t,n,i,s,o,a,c){Le(this,$m);Oe(this,"name");Oe(this,"type");Oe(this,"baseType");Oe(this,"indexed");Oe(this,"components");Oe(this,"arrayLength");Oe(this,"arrayChildren");if(cb(e,Xn,"ParamType"),Object.defineProperty(this,Wo,{value:V$}),o&&(o=Object.freeze(o.slice())),i==="array"){if(a==null||c==null)throw new Error("")}else if(a!=null||c!=null)throw new Error("");if(i==="tuple"){if(o==null)throw new Error("")}else if(o!=null)throw new Error("");tr(this,{name:t,type:n,baseType:i,indexed:s,components:o,arrayLength:a,arrayChildren:c})}format(e){if(e==null&&(e="sighash"),e==="json"){const n=this.name||"";if(this.isArray()){const s=JSON.parse(this.arrayChildren.format("json"));return s.name=n,s.type+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`,JSON.stringify(s)}const i={type:this.baseType==="tuple"?"tuple":this.type,name:n};return typeof this.indexed=="boolean"&&(i.indexed=this.indexed),this.isTuple()&&(i.components=this.components.map(s=>JSON.parse(s.format(e)))),JSON.stringify(i)}let t="";return this.isArray()?(t+=this.arrayChildren.format(e),t+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`):this.isTuple()?t+="("+this.components.map(n=>n.format(e)).join(e==="full"?", ":",")+")":t+=this.type,e!=="sighash"&&(this.indexed===!0&&(t+=" indexed"),e==="full"&&this.name&&(t+=" "+this.name)),t}isArray(){return this.baseType==="array"}isTuple(){return this.baseType==="tuple"}isIndexable(){return this.indexed!=null}walk(e,t){if(this.isArray()){if(!Array.isArray(e))throw new Error("invalid array value");if(this.arrayLength!==-1&&e.length!==this.arrayLength)throw new Error("array is wrong length");const n=this;return e.map(i=>n.arrayChildren.walk(i,t))}if(this.isTuple()){if(!Array.isArray(e))throw new Error("invalid tuple value");if(e.length!==this.components.length)throw new Error("array is wrong length");const n=this;return e.map((i,s)=>n.components[s].walk(i,t))}return t(this.type,e)}async walkAsync(e,t){const n=[],i=[e];return rt(this,$m,q4).call(this,n,e,t,s=>{i[0]=s}),n.length&&await Promise.all(n),i[0]}static from(e,t){if(Ya.isParamType(e))return e;if(typeof e=="string")try{return Ya.from(f0(e),t)}catch{Ae(!1,"invalid param type","obj",e)}else if(e instanceof yl){let a="",c="",l=null;vd(e,io(["tuple"])).has("tuple")||e.peekType("OPEN_PAREN")?(c="tuple",l=e.popParams().map(M=>Ya.from(M)),a=`tuple(${l.map(M=>M.format()).join(",")})`):(a=z$(e.popType("TYPE")),c=a);let h=null,f=null;for(;e.length&&e.peekType("BRACKET");){const M=e.pop();h=new Ya(Xn,"",a,c,null,l,f,h),f=M.value,a+=M.text,c="array",l=null}let v=null;if(vd(e,o7e).has("indexed")){if(!t)throw new Error("");v=!0}const A=e.peekType("ID")?e.pop().text:"";if(e.length)throw new Error("leftover tokens");return new Ya(Xn,A,a,c,v,l,f,h)}const n=e.name;Ae(!n||typeof n=="string"&&n.match(DV),"invalid name","obj.name",n);let i=e.indexed;i!=null&&(Ae(t,"parameter cannot be indexed","obj.indexed",e.indexed),i=!!i);let s=e.type,o=s.match(p7e);if(o){const a=parseInt(o[2]||"-1"),c=Ya.from({type:o[1],components:e.components});return new Ya(Xn,n||"",s,"array",i,null,a,c)}if(s==="tuple"||s.startsWith("tuple(")||s.startsWith("(")){const a=e.components!=null?e.components.map(l=>Ya.from(l)):null;return new Ya(Xn,n||"",s,"tuple",i,a,null,null)}return s=z$(e.type),new Ya(Xn,n||"",s,s,i,null,null,null)}static isParamType(e){return e&&e[Wo]===V$}};$m=new WeakSet,q4=function(e,t,n,i){if(this.isArray()){if(!Array.isArray(t))throw new Error("invalid array value");if(this.arrayLength!==-1&&t.length!==this.arrayLength)throw new Error("array is wrong length");const o=this.arrayChildren,a=t.slice();a.forEach((c,l)=>{var h;rt(h=o,$m,q4).call(h,e,c,n,f=>{a[l]=f})}),i(a);return}if(this.isTuple()){const o=this.components;let a;if(Array.isArray(t))a=t.slice();else{if(t==null||typeof t!="object")throw new Error("invalid tuple value");a=o.map(c=>{if(!c.name)throw new Error("cannot use object value with unnamed components");if(!(c.name in t))throw new Error(`missing value for component ${c.name}`);return t[c.name]})}if(a.length!==this.components.length)throw new Error("array is wrong length");a.forEach((c,l)=>{var h;rt(h=o[l],$m,q4).call(h,e,c,n,f=>{a[l]=f})}),i(a);return}const s=n(this.type,t);s.then?e.push(async function(){i(await s)}()):i(s)};let us=Ya;class h1{constructor(e,t,n){Oe(this,"type");Oe(this,"inputs");cb(e,Xn,"Fragment"),n=Object.freeze(n.slice()),tr(this,{type:t,inputs:n})}static from(e){if(typeof e=="string"){try{h1.from(JSON.parse(e))}catch{}return h1.from(f0(e))}if(e instanceof yl)switch(e.peekKeyword(OV)){case"constructor":return Jh.from(e);case"error":return Mo.from(e);case"event":return uu.from(e);case"fallback":case"receive":return Nh.from(e);case"function":return hu.from(e);case"struct":return Np.from(e)}else if(typeof e=="object"){switch(e.type){case"constructor":return Jh.from(e);case"error":return Mo.from(e);case"event":return uu.from(e);case"fallback":case"receive":return Nh.from(e);case"function":return hu.from(e);case"struct":return Np.from(e)}Ze(!1,`unsupported type: ${e.type}`,"UNSUPPORTED_OPERATION",{operation:"Fragment.from"})}Ae(!1,"unsupported frgament object","obj",e)}static isConstructor(e){return Jh.isFragment(e)}static isError(e){return Mo.isFragment(e)}static isEvent(e){return uu.isFragment(e)}static isFunction(e){return hu.isFragment(e)}static isStruct(e){return Np.isFragment(e)}}class ix extends h1{constructor(t,n,i,s){super(t,n,s);Oe(this,"name");Ae(typeof i=="string"&&i.match(DV),"invalid identifier","name",i),s=Object.freeze(s.slice()),tr(this,{name:i})}}function ey(r,e){return"("+e.map(t=>t.format(r)).join(r==="full"?", ":",")+")"}class Mo extends ix{constructor(e,t,n){super(e,"error",t,n),Object.defineProperty(this,Wo,{value:q$})}get selector(){return l1(this.format("sighash")).substring(0,10)}format(e){if(e==null&&(e="sighash"),e==="json")return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});const t=[];return e!=="sighash"&&t.push("error"),t.push(this.name+ey(e,this.inputs)),t.join(" ")}static from(e){if(Mo.isFragment(e))return e;if(typeof e=="string")return Mo.from(f0(e));if(e instanceof yl){const t=nx("error",e),n=nd(e);return u1(e),new Mo(Xn,t,n)}return new Mo(Xn,e.name,e.inputs?e.inputs.map(us.from):[])}static isFragment(e){return e&&e[Wo]===q$}}class uu extends ix{constructor(t,n,i,s){super(t,"event",n,i);Oe(this,"anonymous");Object.defineProperty(this,Wo,{value:K$}),tr(this,{anonymous:s})}get topicHash(){return l1(this.format("sighash"))}format(t){if(t==null&&(t="sighash"),t==="json")return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(i=>JSON.parse(i.format(t)))});const n=[];return t!=="sighash"&&n.push("event"),n.push(this.name+ey(t,this.inputs)),t!=="sighash"&&this.anonymous&&n.push("anonymous"),n.join(" ")}static getTopicHash(t,n){return n=(n||[]).map(s=>us.from(s)),new uu(Xn,t,n,!1).topicHash}static from(t){if(uu.isFragment(t))return t;if(typeof t=="string")try{return uu.from(f0(t))}catch{Ae(!1,"invalid event fragment","obj",t)}else if(t instanceof yl){const n=nx("event",t),i=nd(t,!0),s=!!vd(t,io(["anonymous"])).has("anonymous");return u1(t),new uu(Xn,n,i,s)}return new uu(Xn,t.name,t.inputs?t.inputs.map(n=>us.from(n,!0)):[],!!t.anonymous)}static isFragment(t){return t&&t[Wo]===K$}}class Jh extends h1{constructor(t,n,i,s,o){super(t,n,i);Oe(this,"payable");Oe(this,"gas");Object.defineProperty(this,Wo,{value:G$}),tr(this,{payable:s,gas:o})}format(t){if(Ze(t!=null&&t!=="sighash","cannot format a constructor for sighash","UNSUPPORTED_OPERATION",{operation:"format(sighash)"}),t==="json")return JSON.stringify({type:"constructor",stateMutability:this.payable?"payable":"undefined",payable:this.payable,gas:this.gas!=null?this.gas:void 0,inputs:this.inputs.map(i=>JSON.parse(i.format(t)))});const n=[`constructor${ey(t,this.inputs)}`];return this.payable&&n.push("payable"),this.gas!=null&&n.push(`@${this.gas.toString()}`),n.join(" ")}static from(t){if(Jh.isFragment(t))return t;if(typeof t=="string")try{return Jh.from(f0(t))}catch{Ae(!1,"invalid constuctor fragment","obj",t)}else if(t instanceof yl){vd(t,io(["constructor"]));const n=nd(t),i=!!vd(t,i7e).has("payable"),s=LV(t);return u1(t),new Jh(Xn,"constructor",n,i,s)}return new Jh(Xn,"constructor",t.inputs?t.inputs.map(us.from):[],!!t.payable,t.gas!=null?t.gas:null)}static isFragment(t){return t&&t[Wo]===G$}}class Nh extends h1{constructor(t,n,i){super(t,"fallback",n);Oe(this,"payable");Object.defineProperty(this,Wo,{value:Z$}),tr(this,{payable:i})}format(t){const n=this.inputs.length===0?"receive":"fallback";if(t==="json"){const i=this.payable?"payable":"nonpayable";return JSON.stringify({type:n,stateMutability:i})}return`${n}()${this.payable?" payable":""}`}static from(t){if(Nh.isFragment(t))return t;if(typeof t=="string")try{return Nh.from(f0(t))}catch{Ae(!1,"invalid fallback fragment","obj",t)}else if(t instanceof yl){const n=t.toString(),i=t.peekKeyword(io(["fallback","receive"]));if(Ae(i,"type must be fallback or receive","obj",n),t.popKeyword(io(["fallback","receive"]))==="receive"){const c=nd(t);return Ae(c.length===0,"receive cannot have arguments","obj.inputs",c),vd(t,io(["payable"])),u1(t),new Nh(Xn,[],!0)}let o=nd(t);o.length?Ae(o.length===1&&o[0].type==="bytes","invalid fallback inputs","obj.inputs",o.map(c=>c.format("minimal")).join(", ")):o=[us.from("bytes")];const a=BV(t);if(Ae(a==="nonpayable"||a==="payable","fallback cannot be constants","obj.stateMutability",a),vd(t,io(["returns"])).has("returns")){const c=nd(t);Ae(c.length===1&&c[0].type==="bytes","invalid fallback outputs","obj.outputs",c.map(l=>l.format("minimal")).join(", "))}return u1(t),new Nh(Xn,o,a==="payable")}if(t.type==="receive")return new Nh(Xn,[],!0);if(t.type==="fallback"){const n=[us.from("bytes")],i=t.stateMutability==="payable";return new Nh(Xn,n,i)}Ae(!1,"invalid fallback description","obj",t)}static isFragment(t){return t&&t[Wo]===Z$}}class hu extends ix{constructor(t,n,i,s,o,a){super(t,"function",n,s);Oe(this,"constant");Oe(this,"outputs");Oe(this,"stateMutability");Oe(this,"payable");Oe(this,"gas");Object.defineProperty(this,Wo,{value:Y$}),o=Object.freeze(o.slice()),tr(this,{constant:i==="view"||i==="pure",gas:a,outputs:o,payable:i==="payable",stateMutability:i})}get selector(){return l1(this.format("sighash")).substring(0,10)}format(t){if(t==null&&(t="sighash"),t==="json")return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas!=null?this.gas:void 0,inputs:this.inputs.map(i=>JSON.parse(i.format(t))),outputs:this.outputs.map(i=>JSON.parse(i.format(t)))});const n=[];return t!=="sighash"&&n.push("function"),n.push(this.name+ey(t,this.inputs)),t!=="sighash"&&(this.stateMutability!=="nonpayable"&&n.push(this.stateMutability),this.outputs&&this.outputs.length&&(n.push("returns"),n.push(ey(t,this.outputs))),this.gas!=null&&n.push(`@${this.gas.toString()}`)),n.join(" ")}static getSelector(t,n){return n=(n||[]).map(s=>us.from(s)),new hu(Xn,t,"view",n,[],null).selector}static from(t){if(hu.isFragment(t))return t;if(typeof t=="string")try{return hu.from(f0(t))}catch{Ae(!1,"invalid function fragment","obj",t)}else if(t instanceof yl){const i=nx("function",t),s=nd(t),o=BV(t);let a=[];vd(t,io(["returns"])).has("returns")&&(a=nd(t));const c=LV(t);return u1(t),new hu(Xn,i,o,s,a,c)}let n=t.stateMutability;return n==null&&(n="payable",typeof t.constant=="boolean"?(n="view",t.constant||(n="payable",typeof t.payable=="boolean"&&!t.payable&&(n="nonpayable"))):typeof t.payable=="boolean"&&!t.payable&&(n="nonpayable")),new hu(Xn,t.name,n,t.inputs?t.inputs.map(us.from):[],t.outputs?t.outputs.map(us.from):[],t.gas!=null?t.gas:null)}static isFragment(t){return t&&t[Wo]===Y$}}class Np extends ix{constructor(e,t,n){super(e,"struct",t,n),Object.defineProperty(this,Wo,{value:Q$})}format(){throw new Error("@TODO")}static from(e){if(typeof e=="string")try{return Np.from(f0(e))}catch{Ae(!1,"invalid struct fragment","obj",e)}else if(e instanceof yl){const t=nx("struct",e),n=nd(e);return u1(e),new Np(Xn,t,n)}return new Np(Xn,e.name,e.inputs?e.inputs.map(us.from):[])}static isFragment(e){return e&&e[Wo]===Q$}}const Sl=new Map;Sl.set(0,"GENERIC_PANIC");Sl.set(1,"ASSERT_FALSE");Sl.set(17,"OVERFLOW");Sl.set(18,"DIVIDE_BY_ZERO");Sl.set(33,"ENUM_RANGE_ERROR");Sl.set(34,"BAD_STORAGE_DATA");Sl.set(49,"STACK_UNDERFLOW");Sl.set(50,"ARRAY_RANGE_ERROR");Sl.set(65,"OUT_OF_MEMORY");Sl.set(81,"UNINITIALIZED_FUNCTION_CALL");const g7e=new RegExp(/^bytes([0-9]*)$/),m7e=new RegExp(/^(u?int)([0-9]*)$/);let L7=null,J$=1024;function w7e(r,e,t,n){let i="missing revert data",s=null;const o=null;let a=null;if(t){i="execution reverted";const l=Zr(t);if(t=Ft(t),l.length===0)i+=" (no data present; likely require(false) occurred",s="require(false)";else if(l.length%32!==4)i+=" (could not decode reason; invalid data length)";else if(Ft(l.slice(0,4))==="0x08c379a0")try{s=n.decode(["string"],l.slice(4))[0],a={signature:"Error(string)",name:"Error",args:[s]},i+=`: ${JSON.stringify(s)}`}catch{i+=" (could not decode reason; invalid string data)"}else if(Ft(l.slice(0,4))==="0x4e487b71")try{const h=Number(n.decode(["uint256"],l.slice(4))[0]);a={signature:"Panic(uint256)",name:"Panic",args:[h]},s=`Panic due to ${Sl.get(h)||"UNKNOWN"}(${h})`,i+=`: ${s}`}catch{i+=" (could not decode panic code)"}else i+=" (unknown custom error)"}const c={to:e.to?Gr(e.to):null,data:e.data||"0x"};return e.from&&(c.from=Gr(e.from)),jn(i,"CALL_EXCEPTION",{action:r,data:t,reason:s,transaction:c,invocation:o,revert:a})}var pf,Ng;const F8=class F8{constructor(){Le(this,pf)}getDefaultValue(e){const t=e.map(i=>rt(this,pf,Ng).call(this,us.from(i)));return new c4(t,"_").defaultValue()}encode(e,t){uz(t.length,e.length,"types/values length mismatch");const n=e.map(o=>rt(this,pf,Ng).call(this,us.from(o))),i=new c4(n,"_"),s=new ZC;return i.encode(s,t),s.data}decode(e,t,n){const i=e.map(o=>rt(this,pf,Ng).call(this,us.from(o)));return new c4(i,"_").decode(new YC(t,n,J$))}static _setDefaultMaxInflation(e){Ae(typeof e=="number"&&Number.isInteger(e),"invalid defaultMaxInflation factor","value",e),J$=e}static defaultAbiCoder(){return L7==null&&(L7=new F8),L7}static getBuiltinCallException(e,t,n){return w7e(e,t,n,F8.defaultAbiCoder())}};pf=new WeakSet,Ng=function(e){if(e.isArray())return new FAe(rt(this,pf,Ng).call(this,e.arrayChildren),e.arrayLength,e.name);if(e.isTuple())return new c4(e.components.map(n=>rt(this,pf,Ng).call(this,n)),e.name);switch(e.baseType){case"address":return new LAe(e.name);case"bool":return new jAe(e.name);case"string":return new YAe(e.name);case"bytes":return new HAe(e.name);case"":return new VAe(e.name)}let t=e.type.match(m7e);if(t){let n=parseInt(t[2]||"256");return Ae(n!==0&&n<=256&&n%8===0,"invalid "+t[1]+" bit length","param",e),new ZAe(n/8,t[1]==="int",e.name)}if(t=e.type.match(g7e),t){let n=parseInt(t[1]);return Ae(n!==0&&n<=32,"invalid bytes length","param",e),new WAe(n,e.name)}Ae(!1,"invalid type","type",e.type)};let ty=F8;class v7e{constructor(e,t,n){Oe(this,"fragment");Oe(this,"name");Oe(this,"signature");Oe(this,"topic");Oe(this,"args");const i=e.name,s=e.format();tr(this,{fragment:e,name:i,signature:s,topic:t,args:n})}}class y7e{constructor(e,t,n,i){Oe(this,"fragment");Oe(this,"name");Oe(this,"args");Oe(this,"signature");Oe(this,"selector");Oe(this,"value");const s=e.name,o=e.format();tr(this,{fragment:e,name:s,args:n,signature:o,selector:t,value:i})}}class b7e{constructor(e,t,n){Oe(this,"fragment");Oe(this,"name");Oe(this,"args");Oe(this,"signature");Oe(this,"selector");const i=e.name,s=e.format();tr(this,{fragment:e,name:i,args:n,signature:s,selector:t})}}class X${constructor(e){Oe(this,"hash");Oe(this,"_isIndexed");tr(this,{hash:e,_isIndexed:!0})}static isIndexed(e){return!!(e&&e._isIndexed)}}const eB={0:"generic panic",1:"assert(false)",17:"arithmetic overflow",18:"division or modulo by zero",33:"enum overflow",34:"invalid encoded storage byte array accessed",49:"out-of-bounds array access; popping on an empty array",50:"out-of-bounds access of an array or bytesN",65:"out of memory",81:"uninitialized function"},tB={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:r=>`reverted with reason string ${JSON.stringify(r)}`},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"],reason:r=>{let e="unknown panic code";return r>=0&&r<=255&&eB[r.toString()]&&(e=eB[r.toString()]),`reverted with panic code 0x${r.toString(16)} (${e})`}}};var Ql,Jl,Xl,Es,Tu,K4,G4;const q0=class q0{constructor(e){Le(this,Tu);Oe(this,"fragments");Oe(this,"deploy");Oe(this,"fallback");Oe(this,"receive");Le(this,Ql);Le(this,Jl);Le(this,Xl);Le(this,Es);let t=[];typeof e=="string"?t=JSON.parse(e):t=e,de(this,Xl,new Map),de(this,Ql,new Map),de(this,Jl,new Map);const n=[];for(const o of t)try{n.push(h1.from(o))}catch(a){console.log(`[Warning] Invalid Fragment ${JSON.stringify(o)}:`,a.message)}tr(this,{fragments:Object.freeze(n)});let i=null,s=!1;de(this,Es,this.getAbiCoder()),this.fragments.forEach((o,a)=>{let c;switch(o.type){case"constructor":if(this.deploy){console.log("duplicate definition - constructor");return}tr(this,{deploy:o});return;case"fallback":o.inputs.length===0?s=!0:(Ae(!i||o.payable!==i.payable,"conflicting fallback fragments",`fragments[${a}]`,o),i=o,s=i.payable);return;case"function":c=ee(this,Xl);break;case"event":c=ee(this,Jl);break;case"error":c=ee(this,Ql);break;default:return}const l=o.format();c.has(l)||c.set(l,o)}),this.deploy||tr(this,{deploy:Jh.from("constructor()")}),tr(this,{fallback:i,receive:s})}format(e){const t=e?"minimal":"full";return this.fragments.map(i=>i.format(t))}formatJson(){const e=this.fragments.map(t=>t.format("json"));return JSON.stringify(e.map(t=>JSON.parse(t)))}getAbiCoder(){return ty.defaultAbiCoder()}getFunctionName(e){const t=rt(this,Tu,K4).call(this,e,null,!1);return Ae(t,"no matching function","key",e),t.name}hasFunction(e){return!!rt(this,Tu,K4).call(this,e,null,!1)}getFunction(e,t){return rt(this,Tu,K4).call(this,e,t||null,!0)}forEachFunction(e){const t=Array.from(ee(this,Xl).keys());t.sort((n,i)=>n.localeCompare(i));for(let n=0;nn.localeCompare(i));for(let n=0;n1){const s=i.map(o=>JSON.stringify(o.format())).join(", ");Ae(!1,`ambiguous error description (i.e. ${s})`,"name",e)}return i[0]}if(e=Mo.from(e).format(),e==="Error(string)")return Mo.from("error Error(string)");if(e==="Panic(uint256)")return Mo.from("error Panic(uint256)");const n=ee(this,Ql).get(e);return n||null}forEachError(e){const t=Array.from(ee(this,Ql).keys());t.sort((n,i)=>n.localeCompare(i));for(let n=0;ns.type==="string"?l1(o):s.type==="bytes"?Ei(Ft(o)):(s.type==="bool"&&typeof o=="boolean"?o=o?"0x01":"0x00":s.type.match(/^u?int/)?o=Zf(o):s.type.match(/^bytes/)?o=F_e(o,32):s.type==="address"&&ee(this,Es).encode(["address"],[o]),a1(Ft(o),32));for(t.forEach((s,o)=>{const a=e.inputs[o];if(!a.indexed){Ae(s==null,"cannot filter non-indexed parameters; must be null","contract."+a.name,s);return}s==null?n.push(null):a.baseType==="array"||a.baseType==="tuple"?Ae(!1,"filtering with tuples or arrays not supported","contract."+a.name,s):Array.isArray(s)?n.push(s.map(c=>i(a,c))):n.push(i(a,s))});n.length&&n[n.length-1]===null;)n.pop();return n}encodeEventLog(e,t){if(typeof e=="string"){const o=this.getEvent(e);Ae(o,"unknown event","eventFragment",e),e=o}const n=[],i=[],s=[];return e.anonymous||n.push(e.topicHash),Ae(t.length===e.inputs.length,"event arguments/values mismatch","values",t),e.inputs.forEach((o,a)=>{const c=t[a];if(o.indexed)if(o.type==="string")n.push(l1(c));else if(o.type==="bytes")n.push(Ei(c));else{if(o.baseType==="tuple"||o.baseType==="array")throw new Error("not implemented");n.push(ee(this,Es).encode([o.type],[c]))}else i.push(o),s.push(c)}),{data:ee(this,Es).encode(i,s),topics:n}}decodeEventLog(e,t,n){if(typeof e=="string"){const y=this.getEvent(e);Ae(y,"unknown event","eventFragment",e),e=y}if(n!=null&&!e.anonymous){const y=e.topicHash;Ae(Tn(n[0],32)&&n[0].toLowerCase()===y,"fragment/topic mismatch","topics[0]",n[0]),n=n.slice(1)}const i=[],s=[],o=[];e.inputs.forEach((y,A)=>{y.indexed?y.type==="string"||y.type==="bytes"||y.baseType==="tuple"||y.baseType==="array"?(i.push(us.from({type:"bytes32",name:y.name})),o.push(!0)):(i.push(y),o.push(!1)):(s.push(y),o.push(!1))});const a=n!=null?ee(this,Es).decode(i,vi(n)):null,c=ee(this,Es).decode(s,t,!0),l=[],h=[];let f=0,v=0;return e.inputs.forEach((y,A)=>{let M=null;if(y.indexed)if(a==null)M=new X$(null);else if(o[A])M=new X$(a[v++]);else try{M=a[v++]}catch($){M=$}else try{M=c[f++]}catch($){M=$}l.push(M),h.push(y.name||null)}),Ow.fromItems(l,h)}parseTransaction(e){const t=Zr(e.data,"tx.data"),n=qt(e.value!=null?e.value:0,"tx.value"),i=this.getFunction(Ft(t.slice(0,4)));if(!i)return null;const s=ee(this,Es).decode(i.inputs,t.slice(4));return new y7e(i,i.selector,s,n)}parseCallResult(e){throw new Error("@TODO")}parseLog(e){const t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new v7e(t,t.topicHash,this.decodeEventLog(t,e.data,e.topics))}parseError(e){const t=Ft(e),n=this.getError(ni(t,0,4));if(!n)return null;const i=ee(this,Es).decode(n.inputs,ni(t,4));return new b7e(n,n.selector,i)}static from(e){return e instanceof q0?e:typeof e=="string"?new q0(JSON.parse(e)):typeof e.formatJson=="function"?new q0(e.formatJson()):typeof e.format=="function"?new q0(e.format("json")):new q0(e)}};Ql=new WeakMap,Jl=new WeakMap,Xl=new WeakMap,Es=new WeakMap,Tu=new WeakSet,K4=function(e,t,n){if(Tn(e)){const s=e.toLowerCase();for(const o of ee(this,Xl).values())if(s===o.selector)return o;return null}if(e.indexOf("(")===-1){const s=[];for(const[o,a]of ee(this,Xl))o.split("(")[0]===e&&s.push(a);if(t){const o=t.length>0?t[t.length-1]:null;let a=t.length,c=!0;Ps.isTyped(o)&&o.type==="overrides"&&(c=!1,a--);for(let l=s.length-1;l>=0;l--){const h=s[l].inputs.length;h!==a&&(!c||h!==a-1)&&s.splice(l,1)}for(let l=s.length-1;l>=0;l--){const h=s[l].inputs;for(let f=0;f=h.length){if(t[f].type==="overrides")continue;s.splice(l,1);break}if(t[f].type!==h[f].baseType){s.splice(l,1);break}}}}if(s.length===1&&t&&t.length!==s[0].inputs.length){const o=t[t.length-1];(o==null||Array.isArray(o)||typeof o!="object")&&s.splice(0,1)}if(s.length===0)return null;if(s.length>1&&n){const o=s.map(a=>JSON.stringify(a.format())).join(", ");Ae(!1,`ambiguous function description (i.e. matches ${o})`,"key",e)}return s[0]}const i=ee(this,Xl).get(hu.from(e).format());return i||null},G4=function(e,t,n){if(Tn(e)){const s=e.toLowerCase();for(const o of ee(this,Jl).values())if(s===o.topicHash)return o;return null}if(e.indexOf("(")===-1){const s=[];for(const[o,a]of ee(this,Jl))o.split("(")[0]===e&&s.push(a);if(t){for(let o=s.length-1;o>=0;o--)s[o].inputs.length=0;o--){const a=s[o].inputs;for(let c=0;c1&&n){const o=s.map(a=>JSON.stringify(a.format())).join(", ");Ae(!1,`ambiguous event description (i.e. matches ${o})`,"key",e)}return s[0]}const i=ee(this,Jl).get(uu.from(e).format());return i||null};let uS=q0;const UV=BigInt(0);function cm(r){return r??null}function fi(r){return r==null?null:r.toString()}class rB{constructor(e,t,n){Oe(this,"gasPrice");Oe(this,"maxFeePerGas");Oe(this,"maxPriorityFeePerGas");tr(this,{gasPrice:cm(e),maxFeePerGas:cm(t),maxPriorityFeePerGas:cm(n)})}toJSON(){const{gasPrice:e,maxFeePerGas:t,maxPriorityFeePerGas:n}=this;return{_type:"FeeData",gasPrice:fi(e),maxFeePerGas:fi(t),maxPriorityFeePerGas:fi(n)}}}function R8(r){const e={};r.to&&(e.to=r.to),r.from&&(e.from=r.from),r.data&&(e.data=Ft(r.data));const t="chainId,gasLimit,gasPrice,maxFeePerBlobGas,maxFeePerGas,maxPriorityFeePerGas,value".split(/,/);for(const i of t)!(i in r)||r[i]==null||(e[i]=qt(r[i],`request.${i}`));const n="type,nonce".split(/,/);for(const i of n)!(i in r)||r[i]==null||(e[i]=Sr(r[i],`request.${i}`));return r.accessList&&(e.accessList=D1(r.accessList)),"blockTag"in r&&(e.blockTag=r.blockTag),"enableCcipRead"in r&&(e.enableCcipRead=!!r.enableCcipRead),"customData"in r&&(e.customData=r.customData),"blobVersionedHashes"in r&&r.blobVersionedHashes&&(e.blobVersionedHashes=r.blobVersionedHashes.slice()),"kzg"in r&&(e.kzg=r.kzg),"blobs"in r&&r.blobs&&(e.blobs=r.blobs.map(i=>CT(i)?Ft(i):Object.assign({},i))),e}var Uh;class _7e{constructor(e,t){Oe(this,"provider");Oe(this,"number");Oe(this,"hash");Oe(this,"timestamp");Oe(this,"parentHash");Oe(this,"parentBeaconBlockRoot");Oe(this,"nonce");Oe(this,"difficulty");Oe(this,"gasLimit");Oe(this,"gasUsed");Oe(this,"stateRoot");Oe(this,"receiptsRoot");Oe(this,"blobGasUsed");Oe(this,"excessBlobGas");Oe(this,"miner");Oe(this,"prevRandao");Oe(this,"extraData");Oe(this,"baseFeePerGas");Le(this,Uh);de(this,Uh,e.transactions.map(n=>typeof n!="string"?new ry(n,t):n)),tr(this,{provider:t,hash:cm(e.hash),number:e.number,timestamp:e.timestamp,parentHash:e.parentHash,parentBeaconBlockRoot:e.parentBeaconBlockRoot,nonce:e.nonce,difficulty:e.difficulty,gasLimit:e.gasLimit,gasUsed:e.gasUsed,blobGasUsed:e.blobGasUsed,excessBlobGas:e.excessBlobGas,miner:e.miner,prevRandao:cm(e.prevRandao),extraData:e.extraData,baseFeePerGas:cm(e.baseFeePerGas),stateRoot:e.stateRoot,receiptsRoot:e.receiptsRoot})}get transactions(){return ee(this,Uh).map(e=>typeof e=="string"?e:e.hash)}get prefetchedTransactions(){const e=ee(this,Uh).slice();return e.length===0?[]:(Ze(typeof e[0]=="object","transactions were not prefetched with block request","UNSUPPORTED_OPERATION",{operation:"transactionResponses()"}),e)}toJSON(){const{baseFeePerGas:e,difficulty:t,extraData:n,gasLimit:i,gasUsed:s,hash:o,miner:a,prevRandao:c,nonce:l,number:h,parentHash:f,parentBeaconBlockRoot:v,stateRoot:y,receiptsRoot:A,timestamp:M,transactions:$}=this;return{_type:"Block",baseFeePerGas:fi(e),difficulty:fi(t),extraData:n,gasLimit:fi(i),gasUsed:fi(s),blobGasUsed:fi(this.blobGasUsed),excessBlobGas:fi(this.excessBlobGas),hash:o,miner:a,prevRandao:c,nonce:l,number:h,parentHash:f,timestamp:M,parentBeaconBlockRoot:v,stateRoot:y,receiptsRoot:A,transactions:$}}[Symbol.iterator](){let e=0;const t=this.transactions;return{next:()=>enew hb(i,t))));let n=UV;e.effectiveGasPrice!=null?n=e.effectiveGasPrice:e.gasPrice!=null&&(n=e.gasPrice),tr(this,{provider:t,to:e.to,from:e.from,contractAddress:e.contractAddress,hash:e.hash,index:e.index,blockHash:e.blockHash,blockNumber:e.blockNumber,logsBloom:e.logsBloom,gasUsed:e.gasUsed,cumulativeGasUsed:e.cumulativeGasUsed,blobGasUsed:e.blobGasUsed,gasPrice:n,blobGasPrice:e.blobGasPrice,type:e.type,status:e.status,root:e.root})}get logs(){return ee(this,hy)}toJSON(){const{to:e,from:t,contractAddress:n,hash:i,index:s,blockHash:o,blockNumber:a,logsBloom:c,logs:l,status:h,root:f}=this;return{_type:"TransactionReceipt",blockHash:o,blockNumber:a,contractAddress:n,cumulativeGasUsed:fi(this.cumulativeGasUsed),from:t,gasPrice:fi(this.gasPrice),blobGasUsed:fi(this.blobGasUsed),blobGasPrice:fi(this.blobGasPrice),gasUsed:fi(this.gasUsed),hash:i,index:s,logs:l,logsBloom:c,root:f,status:h,to:e}}get length(){return this.logs.length}[Symbol.iterator](){let e=0;return{next:()=>e{if(a)return null;const{blockNumber:v,nonce:y}=await Ks({blockNumber:this.provider.getBlockNumber(),nonce:this.provider.getTransactionCount(this.from)});if(y{if(v==null||v.status!==0)return v;Ze(!1,"transaction execution reverted","CALL_EXCEPTION",{action:"sendTransaction",data:null,reason:null,invocation:null,revert:null,transaction:{to:v.to,from:v.from,data:""},receipt:v})},h=await this.provider.getTransactionReceipt(this.hash);if(n===0)return l(h);if(h){if(await h.confirmations()>=n)return l(h)}else if(await c(),n===0)return null;return await new Promise((v,y)=>{const A=[],M=()=>{A.forEach(L=>L())};if(A.push(()=>{a=!0}),i>0){const L=setTimeout(()=>{M(),y(jn("wait for transaction timeout","TIMEOUT"))},i);A.push(()=>{clearTimeout(L)})}const $=async L=>{if(await L.confirmations()>=n){M();try{v(l(L))}catch(P){y(P)}}};if(A.push(()=>{this.provider.off(this.hash,$)}),this.provider.on(this.hash,$),s>=0){const L=async()=>{try{await c()}catch(P){if(ks(P,"TRANSACTION_REPLACED")){M(),y(P);return}}a||this.provider.once("block",L)};A.push(()=>{this.provider.off("block",L)}),this.provider.once("block",L)}})}isMined(){return this.blockHash!=null}isLegacy(){return this.type===0}isBerlin(){return this.type===1}isLondon(){return this.type===2}isCancun(){return this.type===3}removedEvent(){return Ze(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),HV(this)}reorderedEvent(e){return Ze(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),Ze(!e||e.isMined(),"unmined 'other' transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),jV(this,e)}replaceableTransaction(e){Ae(Number.isInteger(e)&&e>=0,"invalid startBlock","startBlock",e);const t=new cR(this,this.provider);return de(t,gf,e),t}};gf=new WeakMap;let ry=cR;function x7e(r){return{orphan:"drop-block",hash:r.hash,number:r.number}}function jV(r,e){return{orphan:"reorder-transaction",tx:r,other:e}}function HV(r){return{orphan:"drop-transaction",tx:r}}function A7e(r){return{orphan:"drop-log",log:{transactionHash:r.transactionHash,blockHash:r.blockHash,blockNumber:r.blockNumber,address:r.address,data:r.data,topics:Object.freeze(r.topics.slice()),index:r.index}}}class FT extends hb{constructor(t,n,i){super(t,t.provider);Oe(this,"interface");Oe(this,"fragment");Oe(this,"args");const s=n.decodeEventLog(i,t.data,t.topics);tr(this,{args:s,fragment:i,interface:n})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}class WV extends hb{constructor(t,n){super(t,t.provider);Oe(this,"error");tr(this,{error:n})}}var Bm;class E7e extends FV{constructor(t,n,i){super(i,n);Le(this,Bm);de(this,Bm,t)}get logs(){return super.logs.map(t=>{const n=t.topics.length?ee(this,Bm).getEvent(t.topics[0]):null;if(n)try{return new FT(t,ee(this,Bm),n)}catch(i){return new WV(t,i)}return t})}}Bm=new WeakMap;var dy;class jT extends ry{constructor(t,n,i){super(i,n);Le(this,dy);de(this,dy,t)}async wait(t,n){const i=await super.wait(t,n);return i==null?null:new E7e(ee(this,dy),this.provider,i)}}dy=new WeakMap;class zV extends pz{constructor(t,n,i,s){super(t,n,i);Oe(this,"log");tr(this,{log:s})}async getBlock(){return await this.log.getBlock()}async getTransaction(){return await this.log.getTransaction()}async getTransactionReceipt(){return await this.log.getTransactionReceipt()}}class C7e extends zV{constructor(e,t,n,i,s){super(e,t,n,new FT(s,e.interface,i));const o=e.interface.decodeEventLog(i,this.log.data,this.log.topics);tr(this,{args:o,fragment:i})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}const nB=BigInt(0);function VV(r){return r&&typeof r.call=="function"}function qV(r){return r&&typeof r.estimateGas=="function"}function sx(r){return r&&typeof r.resolveName=="function"}function KV(r){return r&&typeof r.sendTransaction=="function"}function GV(r){if(r!=null){if(sx(r))return r;if(r.provider)return r.provider}}var fy;class S7e{constructor(e,t,n){Le(this,fy);Oe(this,"fragment");if(tr(this,{fragment:t}),t.inputs.lengthn[c]==null?null:a.walkAsync(n[c],(h,f)=>h==="address"?Array.isArray(f)?Promise.all(f.map(v=>no(v,s))):no(f,s):f)));return e.interface.encodeFilterTopics(t,o)}())}getTopicFilter(){return ee(this,fy)}}fy=new WeakMap;function d1(r,e){return r==null?null:typeof r[e]=="function"?r:r.provider&&typeof r.provider[e]=="function"?r.provider:null}function rp(r){return r==null?null:r.provider||null}async function ZV(r,e){const t=Ps.dereference(r,"overrides");Ae(typeof t=="object","invalid overrides parameter","overrides",r);const n=R8(t);return Ae(n.to==null||(e||[]).indexOf("to")>=0,"cannot override to","overrides.to",n.to),Ae(n.data==null||(e||[]).indexOf("data")>=0,"cannot override data","overrides.data",n.data),n.from&&(n.from=n.from),n}async function I7e(r,e,t){const n=d1(r,"resolveName"),i=sx(n)?n:null;return await Promise.all(e.map((s,o)=>s.walkAsync(t[o],(a,c)=>(c=Ps.dereference(c,a),a==="address"?no(c,i):c))))}function T7e(r){const e=async function(o){const a=await ZV(o,["data"]);a.to=await r.getAddress(),a.from&&(a.from=await no(a.from,GV(r.runner)));const c=r.interface,l=qt(a.value||nB,"overrides.value")===nB,h=(a.data||"0x")==="0x";c.fallback&&!c.fallback.payable&&c.receive&&!h&&!l&&Ae(!1,"cannot send data to receive or send value to non-payable fallback","overrides",o),Ae(c.fallback||h,"cannot send data to receive-only contract","overrides.data",a.data);const f=c.receive||c.fallback&&c.fallback.payable;return Ae(f||l,"cannot send value to non-payable fallback","overrides.value",a.value),Ae(c.fallback||h,"cannot send data to receive-only contract","overrides.data",a.data),a},t=async function(o){const a=d1(r.runner,"call");Ze(VV(a),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const c=await e(o);try{return await a.call(c)}catch(l){throw ET(l)&&l.data?r.interface.makeError(l.data,c):l}},n=async function(o){const a=r.runner;Ze(KV(a),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const c=await a.sendTransaction(await e(o)),l=rp(r.runner);return new jT(r.interface,l,c)},i=async function(o){const a=d1(r.runner,"estimateGas");return Ze(qV(a),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await a.estimateGas(await e(o))},s=async o=>await n(o);return tr(s,{_contract:r,estimateGas:i,populateTransaction:e,send:n,staticCall:t}),s}function R7e(r,e){const t=function(...l){const h=r.interface.getFunction(e,l);return Ze(h,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e,args:l}}),h},n=async function(...l){const h=t(...l);let f={};if(h.inputs.length+1===l.length&&(f=await ZV(l.pop()),f.from&&(f.from=await no(f.from,GV(r.runner)))),h.inputs.length!==l.length)throw new Error("internal error: fragment inputs doesn't match arguments; should not happen");const v=await I7e(r.runner,h.inputs,l);return Object.assign({},f,await Ks({to:r.getAddress(),data:r.interface.encodeFunctionData(h,v)}))},i=async function(...l){const h=await a(...l);return h.length===1?h[0]:h},s=async function(...l){const h=r.runner;Ze(KV(h),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const f=await h.sendTransaction(await n(...l)),v=rp(r.runner);return new jT(r.interface,v,f)},o=async function(...l){const h=d1(r.runner,"estimateGas");return Ze(qV(h),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await h.estimateGas(await n(...l))},a=async function(...l){const h=d1(r.runner,"call");Ze(VV(h),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const f=await n(...l);let v="0x";try{v=await h.call(f)}catch(A){throw ET(A)&&A.data?r.interface.makeError(A.data,f):A}const y=t(...l);return r.interface.decodeFunctionResult(y,v)},c=async(...l)=>t(...l).constant?await i(...l):await s(...l);return tr(c,{name:r.interface.getFunctionName(e),_contract:r,_key:e,getFragment:t,estimateGas:o,populateTransaction:n,send:s,staticCall:i,staticCallResult:a}),Object.defineProperty(c,"fragment",{configurable:!1,enumerable:!0,get:()=>{const l=r.interface.getFunction(e);return Ze(l,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e}}),l}}),c}function k7e(r,e){const t=function(...i){const s=r.interface.getEvent(e,i);return Ze(s,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e,args:i}}),s},n=function(...i){return new S7e(r,t(...i),i)};return tr(n,{name:r.interface.getEventName(e),_contract:r,_key:e,getFragment:t}),Object.defineProperty(n,"fragment",{configurable:!1,enumerable:!0,get:()=>{const i=r.interface.getEvent(e);return Ze(i,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e}}),i}}),n}const k8=Symbol.for("_ethersInternal_contract"),YV=new WeakMap;function N7e(r,e){YV.set(r[k8],e)}function ea(r){return YV.get(r[k8])}function P7e(r){return r&&typeof r=="object"&&"getTopicFilter"in r&&typeof r.getTopicFilter=="function"&&r.fragment}async function HT(r,e){let t,n=null;if(Array.isArray(e)){const s=function(o){if(Tn(o,32))return o;const a=r.interface.getEvent(o);return Ae(a,"unknown fragment","name",o),a.topicHash};t=e.map(o=>o==null?null:Array.isArray(o)?o.map(s):s(o))}else e==="*"?t=[null]:typeof e=="string"?Tn(e,32)?t=[e]:(n=r.interface.getEvent(e),Ae(n,"unknown fragment","event",e),t=[n.topicHash]):P7e(e)?t=await e.getTopicFilter():"fragment"in e?(n=e.fragment,t=[n.topicHash]):Ae(!1,"unknown event name","event",e);t=t.map(s=>{if(s==null)return null;if(Array.isArray(s)){const o=Array.from(new Set(s.map(a=>a.toLowerCase())).values());return o.length===1?o[0]:(o.sort(),o)}return s.toLowerCase()});const i=t.map(s=>s==null?"null":Array.isArray(s)?s.join("|"):s).join("&");return{fragment:n,tag:i,topics:t}}async function f3(r,e){const{subs:t}=ea(r);return t.get((await HT(r,e)).tag)||null}async function iB(r,e,t){const n=rp(r.runner);Ze(n,"contract runner does not support subscribing","UNSUPPORTED_OPERATION",{operation:e});const{fragment:i,tag:s,topics:o}=await HT(r,t),{addr:a,subs:c}=ea(r);let l=c.get(s);if(!l){const f={address:a||r,topics:o},v=$=>{let L=i;if(L==null)try{L=r.interface.getEvent($.topics[0])}catch{}if(L){const P=L,H=i?r.interface.decodeEventLog(i,$.data,$.topics):[];dS(r,t,H,F=>new C7e(r,F,t,P,$))}else dS(r,t,[],P=>new zV(r,P,t,$))};let y=[];l={tag:s,listeners:[],start:()=>{y.length||y.push(n.on(f,v))},stop:async()=>{if(y.length==0)return;let $=y;y=[],await Promise.all($),n.off(f,v)}},c.set(s,l)}return l}let hS=Promise.resolve();async function O7e(r,e,t,n){await hS;const i=await f3(r,e);if(!i)return!1;const s=i.listeners.length;return i.listeners=i.listeners.filter(({listener:o,once:a})=>{const c=Array.from(t);n&&c.push(n(a?null:o));try{o.call(r,...c)}catch{}return!a}),i.listeners.length===0&&(i.stop(),ea(r).subs.delete(i.tag)),s>0}async function dS(r,e,t,n){try{await hS}catch{}const i=O7e(r,e,t,n);return hS=i,await i}const u4=["then"];var vL;vL=k8;const W3=class W3{constructor(e,t,n,i){Oe(this,"target");Oe(this,"interface");Oe(this,"runner");Oe(this,"filters");Oe(this,vL);Oe(this,"fallback");Ae(typeof e=="string"||rV(e),"invalid value for Contract target","target",e),n==null&&(n=null);const s=uS.from(t);tr(this,{target:e,runner:n,interface:s}),Object.defineProperty(this,k8,{value:{}});let o,a=null,c=null;if(i){const f=rp(n);c=new jT(this.interface,f,i)}let l=new Map;if(typeof e=="string")if(Tn(e))a=e,o=Promise.resolve(e);else{const f=d1(n,"resolveName");if(!sx(f))throw jn("contract runner does not support name resolution","UNSUPPORTED_OPERATION",{operation:"resolveName"});o=f.resolveName(e).then(v=>{if(v==null)throw jn("an ENS name used for a contract target must be correctly configured","UNCONFIGURED_NAME",{value:e});return ea(this).addr=v,v})}else o=e.getAddress().then(f=>{if(f==null)throw new Error("TODO");return ea(this).addr=f,f});N7e(this,{addrPromise:o,addr:a,deployTx:c,subs:l});const h=new Proxy({},{get:(f,v,y)=>{if(typeof v=="symbol"||u4.indexOf(v)>=0)return Reflect.get(f,v,y);try{return this.getEvent(v)}catch(A){if(!ks(A,"INVALID_ARGUMENT")||A.argument!=="key")throw A}},has:(f,v)=>u4.indexOf(v)>=0?Reflect.has(f,v):Reflect.has(f,v)||this.interface.hasEvent(String(v))});return tr(this,{filters:h}),tr(this,{fallback:s.receive||s.fallback?T7e(this):null}),new Proxy(this,{get:(f,v,y)=>{if(typeof v=="symbol"||v in f||u4.indexOf(v)>=0)return Reflect.get(f,v,y);try{return f.getFunction(v)}catch(A){if(!ks(A,"INVALID_ARGUMENT")||A.argument!=="key")throw A}},has:(f,v)=>typeof v=="symbol"||v in f||u4.indexOf(v)>=0?Reflect.has(f,v):f.interface.hasFunction(v)})}connect(e){return new W3(this.target,this.interface,e)}attach(e){return new W3(e,this.interface,this.runner)}async getAddress(){return await ea(this).addrPromise}async getDeployedCode(){const e=rp(this.runner);Ze(e,"runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"getDeployedCode"});const t=await e.getCode(await this.getAddress());return t==="0x"?null:t}async waitForDeployment(){const e=this.deploymentTransaction();if(e)return await e.wait(),this;if(await this.getDeployedCode()!=null)return this;const n=rp(this.runner);return Ze(n!=null,"contract runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"waitForDeployment"}),new Promise((i,s)=>{const o=async()=>{try{if(await this.getDeployedCode()!=null)return i(this);n.once("block",o)}catch(a){s(a)}};o()})}deploymentTransaction(){return ea(this).deployTx}getFunction(e){return typeof e!="string"&&(e=e.format()),R7e(this,e)}getEvent(e){return typeof e!="string"&&(e=e.format()),k7e(this,e)}async queryTransaction(e){throw new Error("@TODO")}async queryFilter(e,t,n){t==null&&(t=0),n==null&&(n="latest");const{addr:i,addrPromise:s}=ea(this),o=i||await s,{fragment:a,topics:c}=await HT(this,e),l={address:o,topics:c,fromBlock:t,toBlock:n},h=rp(this.runner);return Ze(h,"contract runner does not have a provider","UNSUPPORTED_OPERATION",{operation:"queryFilter"}),(await h.getLogs(l)).map(f=>{let v=a;if(v==null)try{v=this.interface.getEvent(f.topics[0])}catch{}if(v)try{return new FT(f,this.interface,v)}catch(y){return new WV(f,y)}return new hb(f,h)})}async on(e,t){const n=await iB(this,"on",e);return n.listeners.push({listener:t,once:!1}),n.start(),this}async once(e,t){const n=await iB(this,"once",e);return n.listeners.push({listener:t,once:!0}),n.start(),this}async emit(e,...t){return await dS(this,e,t,null)}async listenerCount(e){if(e){const i=await f3(this,e);return i?i.listeners.length:0}const{subs:t}=ea(this);let n=0;for(const{listeners:i}of t.values())n+=i.length;return n}async listeners(e){if(e){const i=await f3(this,e);return i?i.listeners.map(({listener:s})=>s):[]}const{subs:t}=ea(this);let n=[];for(const{listeners:i}of t.values())n=n.concat(i.map(({listener:s})=>s));return n}async off(e,t){const n=await f3(this,e);if(!n)return this;if(t){const i=n.listeners.map(({listener:s})=>s).indexOf(t);i>=0&&n.listeners.splice(i,1)}return(t==null||n.listeners.length===0)&&(n.stop(),ea(this).subs.delete(n.tag)),this}async removeAllListeners(e){if(e){const t=await f3(this,e);if(!t)return this;t.stop(),ea(this).subs.delete(t.tag)}else{const{subs:t}=ea(this);for(const{tag:n,stop:i}of t.values())i(),t.delete(n)}return this}async addListener(e,t){return await this.on(e,t)}async removeListener(e,t){return await this.off(e,t)}static buildClass(e){class t extends W3{constructor(i,s=null){super(i,e,s)}}return t}static from(e,t,n){return n==null&&(n=null),new this(e,t,n)}};let fS=W3;function M7e(){return fS}class lm extends M7e(){}function U7(r){return r.match(/^ipfs:\/\/ipfs\//i)?r=r.substring(12):r.match(/^ipfs:\/\//i)?r=r.substring(7):Ae(!1,"unsupported IPFS format","link",r),`https://gateway.ipfs.io/ipfs/${r}`}class D7e{constructor(e){Oe(this,"name");tr(this,{name:e})}connect(e){return this}supportsCoinType(e){return!1}async encodeAddress(e,t){throw new Error("unsupported coin")}async decodeAddress(e,t){throw new Error("unsupported coin")}}const QV=new RegExp("^(ipfs)://(.*)$","i"),sB=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),QV,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];var mf,gp,wf,Pg,j8,JV;const Fg=class Fg{constructor(e,t,n){Le(this,wf);Oe(this,"provider");Oe(this,"address");Oe(this,"name");Le(this,mf);Le(this,gp);tr(this,{provider:e,address:t,name:n}),de(this,mf,null),de(this,gp,new lm(t,["function supportsInterface(bytes4) view returns (bool)","function resolve(bytes, bytes) view returns (bytes)","function addr(bytes32) view returns (address)","function addr(bytes32, uint) view returns (bytes)","function text(bytes32, string) view returns (string)","function contenthash(bytes32) view returns (bytes)"],e))}async supportsWildcard(){return ee(this,mf)==null&&de(this,mf,(async()=>{try{return await ee(this,gp).supportsInterface("0x9061b923")}catch(e){if(ks(e,"CALL_EXCEPTION"))return!1;throw de(this,mf,null),e}})()),await ee(this,mf)}async getAddress(e){if(e==null&&(e=60),e===60)try{const s=await rt(this,wf,Pg).call(this,"addr(bytes32)");return s==null||s===Gv?null:s}catch(s){if(ks(s,"CALL_EXCEPTION"))return null;throw s}if(e>=0&&e<2147483648){let s=e+2147483648;const o=await rt(this,wf,Pg).call(this,"addr(bytes32,uint)",[s]);if(Tn(o,20))return Gr(o)}let t=null;for(const s of this.provider.plugins)if(s instanceof D7e&&s.supportsCoinType(e)){t=s;break}if(t==null)return null;const n=await rt(this,wf,Pg).call(this,"addr(bytes32,uint)",[e]);if(n==null||n==="0x")return null;const i=await t.decodeAddress(e,n);if(i!=null)return i;Ze(!1,"invalid coin data","UNSUPPORTED_OPERATION",{operation:`getAddress(${e})`,info:{coinType:e,data:n}})}async getText(e){const t=await rt(this,wf,Pg).call(this,"text(bytes32,string)",[e]);return t==null||t==="0x"?null:t}async getContentHash(){const e=await rt(this,wf,Pg).call(this,"contenthash(bytes32)");if(e==null||e==="0x")return null;const t=e.match(/^0x(e3010170|e5010172)(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(t){const i=t[1]==="e3010170"?"ipfs":"ipns",s=parseInt(t[4],16);if(t[5].length===s*2)return`${i}://${H_e("0x"+t[2])}`}const n=e.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(n&&n[1].length===64)return`bzz://${n[1]}`;Ze(!1,"invalid or unsupported content hash data","UNSUPPORTED_OPERATION",{operation:"getContentHash()",info:{data:e}})}async getAvatar(){return(await this._getAvatar()).url}async _getAvatar(){const e=[{type:"name",value:this.name}];try{const t=await this.getText("avatar");if(t==null)return e.push({type:"!avatar",value:""}),{url:null,linkage:e};e.push({type:"avatar",value:t});for(let n=0;n{if(e&&t==null)return null;if(!Array.isArray(t))throw new Error("not an array");return t.map(n=>r(n))}}function db(r,e){return t=>{const n={};for(const i in r){let s=i;if(e&&i in e&&!(s in t)){for(const o of e[i])if(o in t){s=o;break}}try{const o=r[i](t[s]);o!==void 0&&(n[i]=o)}catch(o){const a=o instanceof Error?o.message:"not-an-error";Ze(!1,`invalid value for value.${i} (${a})`,"BAD_DATA",{value:t})}}return n}}function $7e(r){switch(r){case!0:case"true":return!0;case!1:case"false":return!1}Ae(!1,`invalid boolean; ${JSON.stringify(r)}`,"value",r)}function Fw(r){return Ae(Tn(r,!0),"invalid data","value",r),r}function cs(r){return Ae(Tn(r,32),"invalid hash","value",r),r}const B7e=db({address:Gr,blockHash:cs,blockNumber:Sr,data:Fw,index:Sr,removed:Kr($7e,!1),topics:ox(cs),transactionHash:cs,transactionIndex:Sr},{index:["logIndex"]});function L7e(r){return B7e(r)}const U7e=db({hash:Kr(cs),parentHash:cs,parentBeaconBlockRoot:Kr(cs,null),number:Sr,timestamp:Sr,nonce:Kr(Fw),difficulty:qt,gasLimit:qt,gasUsed:qt,stateRoot:Kr(cs,null),receiptsRoot:Kr(cs,null),blobGasUsed:Kr(qt,null),excessBlobGas:Kr(qt,null),miner:Kr(Gr),prevRandao:Kr(cs,null),extraData:Fw,baseFeePerGas:Kr(qt)},{prevRandao:["mixHash"]});function F7e(r){const e=U7e(r);return e.transactions=r.transactions.map(t=>typeof t=="string"?t:XV(t)),e}const j7e=db({transactionIndex:Sr,blockNumber:Sr,transactionHash:cs,address:Gr,topics:ox(cs),data:Fw,index:Sr,blockHash:cs},{index:["logIndex"]});function H7e(r){return j7e(r)}const W7e=db({to:Kr(Gr,null),from:Kr(Gr,null),contractAddress:Kr(Gr,null),index:Sr,root:Kr(Ft),gasUsed:qt,blobGasUsed:Kr(qt,null),logsBloom:Kr(Fw),blockHash:cs,hash:cs,logs:ox(H7e),blockNumber:Sr,cumulativeGasUsed:qt,effectiveGasPrice:Kr(qt),blobGasPrice:Kr(qt,null),status:Kr(Sr),type:Kr(Sr,0)},{effectiveGasPrice:["gasPrice"],hash:["transactionHash"],index:["transactionIndex"]});function z7e(r){return W7e(r)}function XV(r){r.to&&qt(r.to)===oB&&(r.to="0x0000000000000000000000000000000000000000");const e=db({hash:cs,index:Kr(Sr,void 0),type:t=>t==="0x"||t==null?0:Sr(t),accessList:Kr(D1,null),blobVersionedHashes:Kr(ox(cs,!0),null),blockHash:Kr(cs,null),blockNumber:Kr(Sr,null),transactionIndex:Kr(Sr,null),from:Gr,gasPrice:Kr(qt),maxPriorityFeePerGas:Kr(qt),maxFeePerGas:Kr(qt),maxFeePerBlobGas:Kr(qt,null),gasLimit:qt,to:Kr(Gr,null),value:qt,nonce:Sr,data:Fw,creates:Kr(Gr,null),chainId:Kr(qt,null)},{data:["input"],gasLimit:["gas"],index:["transactionIndex"]})(r);if(e.to==null&&e.creates==null&&(e.creates=BAe(e)),(r.type===1||r.type===2)&&r.accessList==null&&(e.accessList=[]),r.signature?e.signature=vl.from(r.signature):e.signature=vl.from(r),e.chainId==null){const t=e.signature.legacyChainId;t!=null&&(e.chainId=t)}return e.blockHash&&qt(e.blockHash)===oB&&(e.blockHash=null),e}const V7e="0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e";class fb{constructor(e){Oe(this,"name");tr(this,{name:e})}clone(){return new fb(this.name)}}class ax extends fb{constructor(t,n){t==null&&(t=0);super(`org.ethers.network.plugins.GasCost#${t||0}`);Oe(this,"effectiveBlock");Oe(this,"txBase");Oe(this,"txCreate");Oe(this,"txDataZero");Oe(this,"txDataNonzero");Oe(this,"txAccessListStorageKey");Oe(this,"txAccessListAddress");const i={effectiveBlock:t};function s(o,a){let c=(n||{})[o];c==null&&(c=a),Ae(typeof c=="number",`invalud value for ${o}`,"costs",n),i[o]=c}s("txBase",21e3),s("txCreate",32e3),s("txDataZero",4),s("txDataNonzero",16),s("txAccessListStorageKey",1900),s("txAccessListAddress",2400),tr(this,i)}clone(){return new ax(this.effectiveBlock,this)}}class cx extends fb{constructor(t,n){super("org.ethers.plugins.network.Ens");Oe(this,"address");Oe(this,"targetNetwork");tr(this,{address:t||V7e,targetNetwork:n??1})}clone(){return new cx(this.address,this.targetNetwork)}}var py,gy;class q7e extends fb{constructor(t,n){super("org.ethers.plugins.network.FetchUrlFeeDataPlugin");Le(this,py);Le(this,gy);de(this,py,t),de(this,gy,n)}get url(){return ee(this,py)}get processFunc(){return ee(this,gy)}clone(){return this}}py=new WeakMap,gy=new WeakMap;const F7=new Map;var Lm,Um,vf;const jg=class jg{constructor(e,t){Le(this,Lm);Le(this,Um);Le(this,vf);de(this,Lm,e),de(this,Um,qt(t)),de(this,vf,new Map)}toJSON(){return{name:this.name,chainId:String(this.chainId)}}get name(){return ee(this,Lm)}set name(e){de(this,Lm,e)}get chainId(){return ee(this,Um)}set chainId(e){de(this,Um,qt(e,"chainId"))}matches(e){if(e==null)return!1;if(typeof e=="string"){try{return this.chainId===qt(e)}catch{}return this.name===e}if(typeof e=="number"||typeof e=="bigint"){try{return this.chainId===qt(e)}catch{}return!1}if(typeof e=="object"){if(e.chainId!=null){try{return this.chainId===qt(e.chainId)}catch{}return!1}return e.name!=null?this.name===e.name:!1}return!1}get plugins(){return Array.from(ee(this,vf).values())}attachPlugin(e){if(ee(this,vf).get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return ee(this,vf).set(e.name,e.clone()),this}getPlugin(e){return ee(this,vf).get(e)||null}getPlugins(e){return this.plugins.filter(t=>t.name.split("#")[0]===e)}clone(){const e=new jg(this.name,this.chainId);return this.plugins.forEach(t=>{e.attachPlugin(t.clone())}),e}computeIntrinsicGas(e){const t=this.getPlugin("org.ethers.plugins.network.GasCost")||new ax;let n=t.txBase;if(e.to==null&&(n+=t.txCreate),e.data)for(let i=2;i9){let i=BigInt(n[1].substring(0,9));n[1].substring(9).match(/^0+$/)||i++,n[1]=i.toString()}return BigInt(n[0]+n[1])}function cB(r){return new q7e(r,async(e,t,n)=>{n.setHeader("User-Agent","ethers");let i;try{const[s,o]=await Promise.all([n.send(),e()]);i=s;const a=i.bodyJson.standard;return{gasPrice:o.gasPrice,maxFeePerGas:aB(a.maxFee,9),maxPriorityFeePerGas:aB(a.maxPriorityFee,9)}}catch(s){Ze(!1,`error encountered with polygon gas station (${JSON.stringify(n.url)})`,"SERVER_ERROR",{request:n,response:i,error:s})}})}let lB=!1;function K7e(){if(lB)return;lB=!0;function r(e,t,n){const i=function(){const s=new il(e,t);return n.ensNetwork!=null&&s.attachPlugin(new cx(null,n.ensNetwork)),s.attachPlugin(new ax),(n.plugins||[]).forEach(o=>{s.attachPlugin(o)}),s};il.register(e,i),il.register(t,i),n.altNames&&n.altNames.forEach(s=>{il.register(s,i)})}r("mainnet",1,{ensNetwork:1,altNames:["homestead"]}),r("ropsten",3,{ensNetwork:3}),r("rinkeby",4,{ensNetwork:4}),r("goerli",5,{ensNetwork:5}),r("kovan",42,{ensNetwork:42}),r("sepolia",11155111,{ensNetwork:11155111}),r("holesky",17e3,{ensNetwork:17e3}),r("classic",61,{}),r("classicKotti",6,{}),r("arbitrum",42161,{ensNetwork:1}),r("arbitrum-goerli",421613,{}),r("arbitrum-sepolia",421614,{}),r("base",8453,{ensNetwork:1}),r("base-goerli",84531,{}),r("base-sepolia",84532,{}),r("bnb",56,{ensNetwork:1}),r("bnbt",97,{}),r("linea",59144,{ensNetwork:1}),r("linea-goerli",59140,{}),r("linea-sepolia",59141,{}),r("matic",137,{ensNetwork:1,plugins:[cB("https://gasstation.polygon.technology/v2")]}),r("matic-amoy",80002,{}),r("matic-mumbai",80001,{altNames:["maticMumbai","maticmum"],plugins:[cB("https://gasstation-testnet.polygon.technology/v2")]}),r("optimism",10,{ensNetwork:1,plugins:[]}),r("optimism-goerli",420,{}),r("optimism-sepolia",11155420,{}),r("xdai",100,{ensNetwork:1})}function pS(r){return JSON.parse(JSON.stringify(r))}var Fh,ec,yf,eu,Fm,Z4;class G7e{constructor(e){Le(this,Fm);Le(this,Fh);Le(this,ec);Le(this,yf);Le(this,eu);de(this,Fh,e),de(this,ec,null),de(this,yf,4e3),de(this,eu,-2)}get pollingInterval(){return ee(this,yf)}set pollingInterval(e){de(this,yf,e)}start(){ee(this,ec)||(de(this,ec,ee(this,Fh)._setTimeout(rt(this,Fm,Z4).bind(this),ee(this,yf))),rt(this,Fm,Z4).call(this))}stop(){ee(this,ec)&&(ee(this,Fh)._clearTimeout(ee(this,ec)),de(this,ec,null))}pause(e){this.stop(),e&&de(this,eu,-2)}resume(){this.start()}}Fh=new WeakMap,ec=new WeakMap,yf=new WeakMap,eu=new WeakMap,Fm=new WeakSet,Z4=async function(){try{const e=await ee(this,Fh).getBlockNumber();if(ee(this,eu)===-2){de(this,eu,e);return}if(e!==ee(this,eu)){for(let t=ee(this,eu)+1;t<=e;t++){if(ee(this,ec)==null)return;await ee(this,Fh).emit("block",t)}de(this,eu,e)}}catch{}ee(this,ec)!=null&&de(this,ec,ee(this,Fh)._setTimeout(rt(this,Fm,Z4).bind(this),ee(this,yf)))};var mp,wp,bf;class WT{constructor(e){Le(this,mp);Le(this,wp);Le(this,bf);de(this,mp,e),de(this,bf,!1),de(this,wp,t=>{this._poll(t,ee(this,mp))})}async _poll(e,t){throw new Error("sub-classes must override this")}start(){ee(this,bf)||(de(this,bf,!0),ee(this,wp).call(this,-2),ee(this,mp).on("block",ee(this,wp)))}stop(){ee(this,bf)&&(de(this,bf,!1),ee(this,mp).off("block",ee(this,wp)))}pause(e){this.stop()}resume(){this.start()}}mp=new WeakMap,wp=new WeakMap,bf=new WeakMap;var jm,jh;class Z7e extends WT{constructor(t,n){super(t);Le(this,jm);Le(this,jh);de(this,jm,n),de(this,jh,-2)}pause(t){t&&de(this,jh,-2),super.pause(t)}async _poll(t,n){const i=await n.getBlock(ee(this,jm));i!=null&&(ee(this,jh)===-2?de(this,jh,i.number):i.number>ee(this,jh)&&(n.emit(ee(this,jm),i.number),de(this,jh,i.number)))}}jm=new WeakMap,jh=new WeakMap;var H8;class Y7e extends WT{constructor(t,n){super(t);Le(this,H8);de(this,H8,pS(n))}async _poll(t,n){throw new Error("@TODO")}}H8=new WeakMap;var Hm;class Q7e extends WT{constructor(t,n){super(t);Le(this,Hm);de(this,Hm,n)}async _poll(t,n){const i=await n.getTransactionReceipt(ee(this,Hm));i&&n.emit(ee(this,Hm),i)}}Hm=new WeakMap;var Hh,Wm,zm,_f,tc,W8,eq;class zT{constructor(e,t){Le(this,W8);Le(this,Hh);Le(this,Wm);Le(this,zm);Le(this,_f);Le(this,tc);de(this,Hh,e),de(this,Wm,pS(t)),de(this,zm,rt(this,W8,eq).bind(this)),de(this,_f,!1),de(this,tc,-2)}start(){ee(this,_f)||(de(this,_f,!0),ee(this,tc)===-2&&ee(this,Hh).getBlockNumber().then(e=>{de(this,tc,e)}),ee(this,Hh).on("block",ee(this,zm)))}stop(){ee(this,_f)&&(de(this,_f,!1),ee(this,Hh).off("block",ee(this,zm)))}pause(e){this.stop(),e&&de(this,tc,-2)}resume(){this.start()}}Hh=new WeakMap,Wm=new WeakMap,zm=new WeakMap,_f=new WeakMap,tc=new WeakMap,W8=new WeakSet,eq=async function(e){if(ee(this,tc)===-2)return;const t=pS(ee(this,Wm));t.fromBlock=ee(this,tc)+1,t.toBlock=e;const n=await ee(this,Hh).getLogs(t);if(n.length===0){ee(this,tc){if(n==null)return"null";if(typeof n=="bigint")return`bigint:${n.toString()}`;if(typeof n=="string")return n.toLowerCase();if(typeof n=="object"&&!Array.isArray(n)){const i=Object.keys(n);return i.sort(),i.reduce((s,o)=>(s[o]=n[o],s),{})}return n})}class P8{constructor(e){Oe(this,"name");tr(this,{name:e})}start(){}stop(){}pause(e){}resume(){}}function e9e(r){return JSON.parse(JSON.stringify(r))}function gS(r){return r=Array.from(new Set(r).values()),r.sort(),r}async function j7(r,e){if(r==null)throw new Error("invalid event");if(Array.isArray(r)&&(r={topics:r}),typeof r=="string")switch(r){case"block":case"debug":case"error":case"finalized":case"network":case"pending":case"safe":return{type:r,tag:r}}if(Tn(r,32)){const t=r.toLowerCase();return{type:"transaction",tag:Y4("tx",{hash:t}),hash:t}}if(r.orphan){const t=r;return{type:"orphan",tag:Y4("orphan",t),filter:e9e(t)}}if(r.address||r.topics){const t=r,n={topics:(t.topics||[]).map(i=>i==null?null:Array.isArray(i)?gS(i.map(s=>s.toLowerCase())):i.toLowerCase())};if(t.address){const i=[],s=[],o=a=>{Tn(a)?i.push(a):s.push((async()=>{i.push(await no(a,e))})())};Array.isArray(t.address)?t.address.forEach(o):o(t.address),s.length&&await Promise.all(s),n.address=gS(i.map(a=>a.toLowerCase()))}return{filter:n,tag:Y4("event",n),type:"event"}}Ae(!1,"unknown ProviderEvent","event",r)}function H7(){return new Date().getTime()}const t9e={cacheTimeout:250,pollingInterval:4e3};var Cs,xf,Ss,Vm,ia,vp,Af,Wh,my,rc,qm,Km,Pr,Jo,mS,wS,p3,vS,g3,Q4;class r9e{constructor(e,t){Le(this,Pr);Le(this,Cs);Le(this,xf);Le(this,Ss);Le(this,Vm);Le(this,ia);Le(this,vp);Le(this,Af);Le(this,Wh);Le(this,my);Le(this,rc);Le(this,qm);Le(this,Km);if(de(this,Km,Object.assign({},t9e,t||{})),e==="any")de(this,vp,!0),de(this,ia,null);else if(e){const n=il.from(e);de(this,vp,!1),de(this,ia,Promise.resolve(n)),setTimeout(()=>{this.emit("network",n,null)},0)}else de(this,vp,!1),de(this,ia,null);de(this,Wh,-1),de(this,Af,new Map),de(this,Cs,new Map),de(this,xf,new Map),de(this,Ss,null),de(this,Vm,!1),de(this,my,1),de(this,rc,new Map),de(this,qm,!1)}get pollingInterval(){return ee(this,Km).pollingInterval}get provider(){return this}get plugins(){return Array.from(ee(this,xf).values())}attachPlugin(e){if(ee(this,xf).get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return ee(this,xf).set(e.name,e.connect(this)),this}getPlugin(e){return ee(this,xf).get(e)||null}get disableCcipRead(){return ee(this,qm)}set disableCcipRead(e){de(this,qm,!!e)}async ccipReadFetch(e,t,n){if(this.disableCcipRead||n.length===0||e.to==null)return null;const i=e.to.toLowerCase(),s=t.toLowerCase(),o=[];for(let a=0;a=500,`response not found during CCIP fetch: ${f}`,"OFFCHAIN_FAULT",{reason:"404_MISSING_RESOURCE",transaction:e,info:{url:c,errorMessage:f}}),o.push(f)}Ze(!1,`error encountered during CCIP fetch: ${o.map(a=>JSON.stringify(a)).join(", ")}`,"OFFCHAIN_FAULT",{reason:"500_SERVER_ERROR",transaction:e,info:{urls:n,errorMessages:o}})}_wrapBlock(e,t){return new _7e(F7e(e),this)}_wrapLog(e,t){return new hb(L7e(e),this)}_wrapTransactionReceipt(e,t){return new FV(z7e(e),this)}_wrapTransactionResponse(e,t){return new ry(XV(e),this)}_detectNetwork(){Ze(!1,"sub-classes must implement this","UNSUPPORTED_OPERATION",{operation:"_detectNetwork"})}async _perform(e){Ze(!1,`unsupported method: ${e.method}`,"UNSUPPORTED_OPERATION",{operation:e.method,info:e})}async getBlockNumber(){const e=Sr(await rt(this,Pr,Jo).call(this,{method:"getBlockNumber"}),"%response");return ee(this,Wh)>=0&&de(this,Wh,e),e}_getAddress(e){return no(e,this)}_getBlockTag(e){if(e==null)return"latest";switch(e){case"earliest":return"0x0";case"finalized":case"latest":case"pending":case"safe":return e}if(Tn(e))return Tn(e,32)?e:$g(e);if(typeof e=="bigint"&&(e=Sr(e,"blockTag")),typeof e=="number")return e>=0?$g(e):ee(this,Wh)>=0?$g(ee(this,Wh)+e):this.getBlockNumber().then(t=>$g(t+e));Ae(!1,"invalid blockTag","blockTag",e)}_getFilter(e){const t=(e.topics||[]).map(c=>c==null?null:Array.isArray(c)?gS(c.map(l=>l.toLowerCase())):c.toLowerCase()),n="blockHash"in e?e.blockHash:void 0,i=(c,l,h)=>{let f;switch(c.length){case 0:break;case 1:f=c[0];break;default:c.sort(),f=c}if(n&&(l!=null||h!=null))throw new Error("invalid filter");const v={};return f&&(v.address=f),t.length&&(v.topics=t),l&&(v.fromBlock=l),h&&(v.toBlock=h),n&&(v.blockHash=n),v};let s=[];if(e.address)if(Array.isArray(e.address))for(const c of e.address)s.push(this._getAddress(c));else s.push(this._getAddress(e.address));let o;"fromBlock"in e&&(o=this._getBlockTag(e.fromBlock));let a;return"toBlock"in e&&(a=this._getBlockTag(e.toBlock)),s.filter(c=>typeof c!="string").length||o!=null&&typeof o!="string"||a!=null&&typeof a!="string"?Promise.all([Promise.all(s),o,a]).then(c=>i(c[0],c[1],c[2])):i(s,o,a)}_getTransactionRequest(e){const t=R8(e),n=[];if(["to","from"].forEach(i=>{if(t[i]==null)return;const s=no(t[i],this);h4(s)?n.push(async function(){t[i]=await s}()):t[i]=s}),t.blockTag!=null){const i=this._getBlockTag(t.blockTag);h4(i)?n.push(async function(){t.blockTag=await i}()):t.blockTag=i}return n.length?async function(){return await Promise.all(n),t}():t}async getNetwork(){if(ee(this,ia)==null){const i=(async()=>{try{const s=await this._detectNetwork();return this.emit("network",s,null),s}catch(s){throw ee(this,ia)===i&&de(this,ia,null),s}})();return de(this,ia,i),(await i).clone()}const e=ee(this,ia),[t,n]=await Promise.all([e,this._detectNetwork()]);return t.chainId!==n.chainId&&(ee(this,vp)?(this.emit("network",n,t),ee(this,ia)===e&&de(this,ia,Promise.resolve(n))):Ze(!1,`network changed: ${t.chainId} => ${n.chainId} `,"NETWORK_ERROR",{event:"changed"})),t.clone()}async getFeeData(){const e=await this.getNetwork(),t=async()=>{const{_block:i,gasPrice:s,priorityFee:o}=await Ks({_block:rt(this,Pr,vS).call(this,"latest",!1),gasPrice:(async()=>{try{const h=await rt(this,Pr,Jo).call(this,{method:"getGasPrice"});return qt(h,"%response")}catch{}return null})(),priorityFee:(async()=>{try{const h=await rt(this,Pr,Jo).call(this,{method:"getPriorityFee"});return qt(h,"%response")}catch{}return null})()});let a=null,c=null;const l=this._wrapBlock(i,e);return l&&l.baseFeePerGas&&(c=o??BigInt("1000000000"),a=l.baseFeePerGas*J7e+c),new rB(s,a,c)},n=e.getPlugin("org.ethers.plugins.network.FetchUrlFeeDataPlugin");if(n){const i=new Wu(n.url),s=await n.processFunc(t,this,i);return new rB(s.gasPrice,s.maxFeePerGas,s.maxPriorityFeePerGas)}return await t()}async estimateGas(e){let t=this._getTransactionRequest(e);return h4(t)&&(t=await t),qt(await rt(this,Pr,Jo).call(this,{method:"estimateGas",transaction:t}),"%response")}async call(e){const{tx:t,blockTag:n}=await Ks({tx:this._getTransactionRequest(e),blockTag:this._getBlockTag(e.blockTag)});return await rt(this,Pr,wS).call(this,rt(this,Pr,mS).call(this,t,n,e.enableCcipRead?0:-1))}async getBalance(e,t){return qt(await rt(this,Pr,p3).call(this,{method:"getBalance"},e,t),"%response")}async getTransactionCount(e,t){return Sr(await rt(this,Pr,p3).call(this,{method:"getTransactionCount"},e,t),"%response")}async getCode(e,t){return Ft(await rt(this,Pr,p3).call(this,{method:"getCode"},e,t))}async getStorage(e,t,n){const i=qt(t,"position");return Ft(await rt(this,Pr,p3).call(this,{method:"getStorage",position:i},e,n))}async broadcastTransaction(e){const{blockNumber:t,hash:n,network:i}=await Ks({blockNumber:this.getBlockNumber(),hash:this._perform({method:"broadcastTransaction",signedTransaction:e}),network:this.getNetwork()}),s=I8.from(e);if(s.hash!==n)throw new Error("@TODO: the returned hash did not match");return this._wrapTransactionResponse(s,i).replaceableTransaction(t)}async getBlock(e,t){const{network:n,params:i}=await Ks({network:this.getNetwork(),params:rt(this,Pr,vS).call(this,e,!!t)});return i==null?null:this._wrapBlock(i,n)}async getTransaction(e){const{network:t,params:n}=await Ks({network:this.getNetwork(),params:rt(this,Pr,Jo).call(this,{method:"getTransaction",hash:e})});return n==null?null:this._wrapTransactionResponse(n,t)}async getTransactionReceipt(e){const{network:t,params:n}=await Ks({network:this.getNetwork(),params:rt(this,Pr,Jo).call(this,{method:"getTransactionReceipt",hash:e})});if(n==null)return null;if(n.gasPrice==null&&n.effectiveGasPrice==null){const i=await rt(this,Pr,Jo).call(this,{method:"getTransaction",hash:e});if(i==null)throw new Error("report this; could not find tx or effectiveGasPrice");n.effectiveGasPrice=i.gasPrice}return this._wrapTransactionReceipt(n,t)}async getTransactionResult(e){const{result:t}=await Ks({network:this.getNetwork(),result:rt(this,Pr,Jo).call(this,{method:"getTransactionResult",hash:e})});return t==null?null:Ft(t)}async getLogs(e){let t=this._getFilter(e);h4(t)&&(t=await t);const{network:n,params:i}=await Ks({network:this.getNetwork(),params:rt(this,Pr,Jo).call(this,{method:"getLogs",filter:t})});return i.map(s=>this._wrapLog(s,n))}_getProvider(e){Ze(!1,"provider cannot connect to target network","UNSUPPORTED_OPERATION",{operation:"_getProvider()"})}async getResolver(e){return await N8.fromName(this,e)}async getAvatar(e){const t=await this.getResolver(e);return t?await t.getAvatar():null}async resolveName(e){const t=await this.getResolver(e);return t?await t.getAddress():null}async lookupAddress(e){e=Gr(e);const t=cS(e.substring(2).toLowerCase()+".addr.reverse");try{const n=await N8.getEnsAddress(this),s=await new lm(n,["function resolver(bytes32) view returns (address)"],this).resolver(t);if(s==null||s===Gv)return null;const a=await new lm(s,["function name(bytes32) view returns (string)"],this).name(t);return await this.resolveName(a)!==e?null:a}catch(n){if(ks(n,"BAD_DATA")&&n.value==="0x"||ks(n,"CALL_EXCEPTION"))return null;throw n}return null}async waitForTransaction(e,t,n){const i=t??1;return i===0?this.getTransactionReceipt(e):new Promise(async(s,o)=>{let a=null;const c=async l=>{try{const h=await this.getTransactionReceipt(e);if(h!=null&&l-h.blockNumber+1>=i){s(h),a&&(clearTimeout(a),a=null);return}}catch(h){console.log("EEE",h)}this.once("block",c)};n!=null&&(a=setTimeout(()=>{a!=null&&(a=null,this.off("block",c),o(jn("timeout","TIMEOUT",{reason:"timeout"})))},n)),c(await this.getBlockNumber())})}async waitForBlock(e){Ze(!1,"not implemented yet","NOT_IMPLEMENTED",{operation:"waitForBlock"})}_clearTimeout(e){const t=ee(this,rc).get(e);t&&(t.timer&&clearTimeout(t.timer),ee(this,rc).delete(e))}_setTimeout(e,t){t==null&&(t=0);const n=M2(this,my)._++,i=()=>{ee(this,rc).delete(n),e()};if(this.paused)ee(this,rc).set(n,{timer:null,func:i,time:t});else{const s=setTimeout(i,t);ee(this,rc).set(n,{timer:s,func:i,time:H7()})}return n}_forEachSubscriber(e){for(const t of ee(this,Cs).values())e(t.subscriber)}_getSubscriber(e){switch(e.type){case"debug":case"error":case"network":return new P8(e.type);case"block":{const t=new G7e(this);return t.pollingInterval=this.pollingInterval,t}case"safe":case"finalized":return new Z7e(this,e.type);case"event":return new zT(this,e.filter);case"transaction":return new Q7e(this,e.hash);case"orphan":return new Y7e(this,e.filter)}throw new Error(`unsupported event: ${e.type}`)}_recoverSubscriber(e,t){for(const n of ee(this,Cs).values())if(n.subscriber===e){n.started&&n.subscriber.stop(),n.subscriber=t,n.started&&t.start(),ee(this,Ss)!=null&&t.pause(ee(this,Ss));break}}async on(e,t){const n=await rt(this,Pr,Q4).call(this,e);return n.listeners.push({listener:t,once:!1}),n.started||(n.subscriber.start(),n.started=!0,ee(this,Ss)!=null&&n.subscriber.pause(ee(this,Ss))),this}async once(e,t){const n=await rt(this,Pr,Q4).call(this,e);return n.listeners.push({listener:t,once:!0}),n.started||(n.subscriber.start(),n.started=!0,ee(this,Ss)!=null&&n.subscriber.pause(ee(this,Ss))),this}async emit(e,...t){const n=await rt(this,Pr,g3).call(this,e,t);if(!n||n.listeners.length===0)return!1;const i=n.listeners.length;return n.listeners=n.listeners.filter(({listener:s,once:o})=>{const a=new pz(this,o?null:s,e);try{s.call(this,...t,a)}catch{}return!o}),n.listeners.length===0&&(n.started&&n.subscriber.stop(),ee(this,Cs).delete(n.tag)),i>0}async listenerCount(e){if(e){const n=await rt(this,Pr,g3).call(this,e);return n?n.listeners.length:0}let t=0;for(const{listeners:n}of ee(this,Cs).values())t+=n.length;return t}async listeners(e){if(e){const n=await rt(this,Pr,g3).call(this,e);return n?n.listeners.map(({listener:i})=>i):[]}let t=[];for(const{listeners:n}of ee(this,Cs).values())t=t.concat(n.map(({listener:i})=>i));return t}async off(e,t){const n=await rt(this,Pr,g3).call(this,e);if(!n)return this;if(t){const i=n.listeners.map(({listener:s})=>s).indexOf(t);i>=0&&n.listeners.splice(i,1)}return(!t||n.listeners.length===0)&&(n.started&&n.subscriber.stop(),ee(this,Cs).delete(n.tag)),this}async removeAllListeners(e){if(e){const{tag:t,started:n,subscriber:i}=await rt(this,Pr,Q4).call(this,e);n&&i.stop(),ee(this,Cs).delete(t)}else for(const[t,{started:n,subscriber:i}]of ee(this,Cs))n&&i.stop(),ee(this,Cs).delete(t);return this}async addListener(e,t){return await this.on(e,t)}async removeListener(e,t){return this.off(e,t)}get destroyed(){return ee(this,Vm)}destroy(){this.removeAllListeners();for(const e of ee(this,rc).keys())this._clearTimeout(e);de(this,Vm,!0)}get paused(){return ee(this,Ss)!=null}set paused(e){!!e!==this.paused&&(this.paused?this.resume():this.pause(!1))}pause(e){if(de(this,Wh,-1),ee(this,Ss)!=null){if(ee(this,Ss)==!!e)return;Ze(!1,"cannot change pause type; resume first","UNSUPPORTED_OPERATION",{operation:"pause"})}this._forEachSubscriber(t=>t.pause(e)),de(this,Ss,!!e);for(const t of ee(this,rc).values())t.timer&&clearTimeout(t.timer),t.time=H7()-t.time}resume(){if(ee(this,Ss)!=null){this._forEachSubscriber(e=>e.resume()),de(this,Ss,null);for(const e of ee(this,rc).values()){let t=e.time;t<0&&(t=0),e.time=H7(),setTimeout(e.func,t)}}}}Cs=new WeakMap,xf=new WeakMap,Ss=new WeakMap,Vm=new WeakMap,ia=new WeakMap,vp=new WeakMap,Af=new WeakMap,Wh=new WeakMap,my=new WeakMap,rc=new WeakMap,qm=new WeakMap,Km=new WeakMap,Pr=new WeakSet,Jo=async function(e){const t=ee(this,Km).cacheTimeout;if(t<0)return await this._perform(e);const n=Y4(e.method,e);let i=ee(this,Af).get(n);return i||(i=this._perform(e),ee(this,Af).set(n,i),setTimeout(()=>{ee(this,Af).get(n)===i&&ee(this,Af).delete(n)},t)),await i},mS=async function(e,t,n){Ze(n=0&&t==="latest"&&i.to!=null&&ni(s.data,0,4)==="0x556f1830"){const o=s.data,a=await no(i.to,this);let c;try{c=a9e(ni(s.data,4))}catch(f){Ze(!1,f.message,"OFFCHAIN_FAULT",{reason:"BAD_DATA",transaction:i,info:{data:o}})}Ze(c.sender.toLowerCase()===a.toLowerCase(),"CCIP Read sender mismatch","CALL_EXCEPTION",{action:"call",data:o,reason:"OffchainLookup",transaction:i,invocation:null,revert:{signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",name:"OffchainLookup",args:c.errorArgs}});const l=await this.ccipReadFetch(i,c.calldata,c.urls);Ze(l!=null,"CCIP Read failed to fetch data","OFFCHAIN_FAULT",{reason:"FETCH_FAILED",transaction:i,info:{data:s.data,errorArgs:c.errorArgs}});const h={to:a,data:vi([c.selector,o9e([l,c.extraData])])};this.emit("debug",{action:"sendCcipReadCall",transaction:h});try{const f=await rt(this,Pr,mS).call(this,h,t,n+1);return this.emit("debug",{action:"receiveCcipReadCallResult",transaction:Object.assign({},h),result:f}),f}catch(f){throw this.emit("debug",{action:"receiveCcipReadCallError",transaction:Object.assign({},h),error:f}),f}}throw s}},wS=async function(e){const{value:t}=await Ks({network:this.getNetwork(),value:e});return t},p3=async function(e,t,n){let i=this._getAddress(t),s=this._getBlockTag(n);return(typeof i!="string"||typeof s!="string")&&([i,s]=await Promise.all([i,s])),await rt(this,Pr,wS).call(this,rt(this,Pr,Jo).call(this,Object.assign(e,{address:i,blockTag:s})))},vS=async function(e,t){if(Tn(e,32))return await rt(this,Pr,Jo).call(this,{method:"getBlock",blockHash:e,includeTransactions:t});let n=this._getBlockTag(e);return typeof n!="string"&&(n=await n),await rt(this,Pr,Jo).call(this,{method:"getBlock",blockTag:n,includeTransactions:t})},g3=async function(e,t){let n=await j7(e,this);return n.type==="event"&&t&&t.length>0&&t[0].removed===!0&&(n=await j7({orphan:"drop-log",log:t[0]},this)),ee(this,Cs).get(n.tag)||null},Q4=async function(e){const t=await j7(e,this),n=t.tag;let i=ee(this,Cs).get(n);return i||(i={subscriber:this._getSubscriber(t),tag:n,addressableMap:new WeakMap,nameMap:new Map,started:!1,listeners:[]},ee(this,Cs).set(n,i)),i};function n9e(r,e){try{const t=yS(r,e);if(t)return y8(t)}catch{}return null}function yS(r,e){if(r==="0x")return null;try{const t=Sr(ni(r,e,e+32)),n=Sr(ni(r,t,t+32));return ni(r,t+32,t+32+n)}catch{}return null}function uB(r){const e=to(r);if(e.length>32)throw new Error("internal; should not happen");const t=new Uint8Array(32);return t.set(e,32-e.length),t}function i9e(r){if(r.length%32===0)return r;const e=new Uint8Array(Math.ceil(r.length/32)*32);return e.set(r),e}const s9e=new Uint8Array([]);function o9e(r){const e=[];let t=0;for(let n=0;n=5*32,"insufficient OffchainLookup data","OFFCHAIN_FAULT",{reason:"insufficient OffchainLookup data"});const t=ni(r,0,32);Ze(ni(t,0,12)===ni(hB,0,12),"corrupt OffchainLookup sender","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup sender"}),e.sender=ni(t,12);try{const n=[],i=Sr(ni(r,32,64)),s=Sr(ni(r,i,i+32)),o=ni(r,i+32);for(let a=0;ae[n]),e}function fg(r,e){if(r.provider)return r.provider;Ze(!1,"missing provider","UNSUPPORTED_OPERATION",{operation:e})}async function dB(r,e){let t=R8(e);if(t.to!=null&&(t.to=no(t.to,r)),t.from!=null){const n=t.from;t.from=Promise.all([r.getAddress(),no(n,r)]).then(([i,s])=>(Ae(i.toLowerCase()===s.toLowerCase(),"transaction from mismatch","tx.from",s),i))}else t.from=r.getAddress();return await Ks(t)}class c9e{constructor(e){Oe(this,"provider");tr(this,{provider:e||null})}async getNonce(e){return fg(this,"getTransactionCount").getTransactionCount(await this.getAddress(),e)}async populateCall(e){return await dB(this,e)}async populateTransaction(e){const t=fg(this,"populateTransaction"),n=await dB(this,e);n.nonce==null&&(n.nonce=await this.getNonce("pending")),n.gasLimit==null&&(n.gasLimit=await this.estimateGas(n));const i=await this.provider.getNetwork();if(n.chainId!=null){const o=qt(n.chainId);Ae(o===i.chainId,"transaction chainId mismatch","tx.chainId",e.chainId)}else n.chainId=i.chainId;const s=n.maxFeePerGas!=null||n.maxPriorityFeePerGas!=null;if(n.gasPrice!=null&&(n.type===2||s)?Ae(!1,"eip-1559 transaction do not support gasPrice","tx",e):(n.type===0||n.type===1)&&s&&Ae(!1,"pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","tx",e),(n.type===2||n.type==null)&&n.maxFeePerGas!=null&&n.maxPriorityFeePerGas!=null)n.type=2;else if(n.type===0||n.type===1){const o=await t.getFeeData();Ze(o.gasPrice!=null,"network does not support gasPrice","UNSUPPORTED_OPERATION",{operation:"getGasPrice"}),n.gasPrice==null&&(n.gasPrice=o.gasPrice)}else{const o=await t.getFeeData();if(n.type==null)if(o.maxFeePerGas!=null&&o.maxPriorityFeePerGas!=null)if(n.type=2,n.gasPrice!=null){const a=n.gasPrice;delete n.gasPrice,n.maxFeePerGas=a,n.maxPriorityFeePerGas=a}else n.maxFeePerGas==null&&(n.maxFeePerGas=o.maxFeePerGas),n.maxPriorityFeePerGas==null&&(n.maxPriorityFeePerGas=o.maxPriorityFeePerGas);else o.gasPrice!=null?(Ze(!s,"network does not support EIP-1559","UNSUPPORTED_OPERATION",{operation:"populateTransaction"}),n.gasPrice==null&&(n.gasPrice=o.gasPrice),n.type=0):Ze(!1,"failed to get consistent fee data","UNSUPPORTED_OPERATION",{operation:"signer.getFeeData"});else(n.type===2||n.type===3)&&(n.maxFeePerGas==null&&(n.maxFeePerGas=o.maxFeePerGas),n.maxPriorityFeePerGas==null&&(n.maxPriorityFeePerGas=o.maxPriorityFeePerGas))}return await Ks(n)}async estimateGas(e){return fg(this,"estimateGas").estimateGas(await this.populateCall(e))}async call(e){return fg(this,"call").call(await this.populateCall(e))}async resolveName(e){return await fg(this,"resolveName").resolveName(e)}async sendTransaction(e){const t=fg(this,"sendTransaction"),n=await this.populateTransaction(e);delete n.from;const i=I8.from(n);return await t.broadcastTransaction(await this.signTransaction(i))}}const fB=new Set;function l9e(r){fB.has(r)||(fB.add(r),console.log("========= NOTICE ========="),console.log(`Request-Rate Exceeded for ${r} (this message will not be repeated)`),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.org/api-keys/"),console.log("=========================="))}function u9e(r){return JSON.parse(JSON.stringify(r))}var qs,tu,yp,Ef,bp,Gm,Yf,bS,_S;class tq{constructor(e){Le(this,Yf);Le(this,qs);Le(this,tu);Le(this,yp);Le(this,Ef);Le(this,bp);Le(this,Gm);de(this,qs,e),de(this,tu,null),de(this,yp,rt(this,Yf,bS).bind(this)),de(this,Ef,!1),de(this,bp,null),de(this,Gm,!1)}_subscribe(e){throw new Error("subclasses must override this")}_emitResults(e,t){throw new Error("subclasses must override this")}_recover(e){throw new Error("subclasses must override this")}start(){ee(this,Ef)||(de(this,Ef,!0),rt(this,Yf,bS).call(this,-2))}stop(){ee(this,Ef)&&(de(this,Ef,!1),de(this,Gm,!0),rt(this,Yf,_S).call(this),ee(this,qs).off("block",ee(this,yp)))}pause(e){e&&rt(this,Yf,_S).call(this),ee(this,qs).off("block",ee(this,yp))}resume(){this.start()}}qs=new WeakMap,tu=new WeakMap,yp=new WeakMap,Ef=new WeakMap,bp=new WeakMap,Gm=new WeakMap,Yf=new WeakSet,bS=async function(e){try{ee(this,tu)==null&&de(this,tu,this._subscribe(ee(this,qs)));let t=null;try{t=await ee(this,tu)}catch(s){if(!ks(s,"UNSUPPORTED_OPERATION")||s.operation!=="eth_newFilter")throw s}if(t==null){de(this,tu,null),ee(this,qs)._recoverSubscriber(this,this._recover(ee(this,qs)));return}const n=await ee(this,qs).getNetwork();if(ee(this,bp)||de(this,bp,n),ee(this,bp).chainId!==n.chainId)throw new Error("chaid changed");if(ee(this,Gm))return;const i=await ee(this,qs).send("eth_getFilterChanges",[t]);await this._emitResults(ee(this,qs),i)}catch(t){console.log("@TODO",t)}ee(this,qs).once("block",ee(this,yp))},_S=function(){const e=ee(this,tu);e&&(de(this,tu,null),e.then(t=>{ee(this,qs).destroyed||ee(this,qs).send("eth_uninstallFilter",[t])}))};var _p;class h9e extends tq{constructor(t,n){super(t);Le(this,_p);de(this,_p,u9e(n))}_recover(t){return new zT(t,ee(this,_p))}async _subscribe(t){return await t.send("eth_newFilter",[ee(this,_p)])}async _emitResults(t,n){for(const i of n)t.emit(ee(this,_p),t._wrapLog(i,t._network))}}_p=new WeakMap;class d9e extends tq{async _subscribe(e){return await e.send("eth_newPendingTransactionFilter",[])}async _emitResults(e,t){for(const n of t)e.emit("pending",n)}}const f9e="bigint,boolean,function,number,string,symbol".split(/,/g);function J4(r){if(r==null||f9e.indexOf(typeof r)>=0||typeof r.getAddress=="function")return r;if(Array.isArray(r))return r.map(J4);if(typeof r=="object")return Object.keys(r).reduce((e,t)=>(e[t]=r[t],e),{});throw new Error(`should not happen: ${r} (${typeof r})`)}function p9e(r){return new Promise(e=>{setTimeout(e,r)})}function pg(r){return r&&r.toLowerCase()}function pB(r){return r&&typeof r.pollingInterval=="number"}const rq={polling:!1,staticNetwork:null,batchStallTime:10,batchMaxSize:1<<20,batchMaxCount:100,cacheTimeout:250,pollingInterval:4e3};class um extends c9e{constructor(t,n){super(t);Oe(this,"address");n=Gr(n),tr(this,{address:n})}connect(t){Ze(!1,"cannot reconnect JsonRpcSigner","UNSUPPORTED_OPERATION",{operation:"signer.connect"})}async getAddress(){return this.address}async populateTransaction(t){return await this.populateCall(t)}async sendUncheckedTransaction(t){const n=J4(t),i=[];if(n.from){const o=n.from;i.push((async()=>{const a=await no(o,this.provider);Ae(a!=null&&a.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",t),n.from=a})())}else n.from=this.address;if(n.gasLimit==null&&i.push((async()=>{n.gasLimit=await this.provider.estimateGas({...n,from:this.address})})()),n.to!=null){const o=n.to;i.push((async()=>{n.to=await no(o,this.provider)})())}i.length&&await Promise.all(i);const s=this.provider.getRpcTransaction(n);return this.provider.send("eth_sendTransaction",[s])}async sendTransaction(t){const n=await this.provider.getBlockNumber(),i=await this.sendUncheckedTransaction(t);return await new Promise((s,o)=>{const a=[1e3,100];let c=0;const l=async()=>{try{const h=await this.provider.getTransaction(i);if(h!=null){s(h.replaceableTransaction(n));return}}catch(h){if(ks(h,"CANCELLED")||ks(h,"BAD_DATA")||ks(h,"NETWORK_ERROR")){h.info==null&&(h.info={}),h.info.sendTransactionHash=i,o(h);return}if(ks(h,"INVALID_ARGUMENT")&&(c++,h.info==null&&(h.info={}),h.info.sendTransactionHash=i,c>10)){o(h);return}this.provider.emit("error",jn("failed to fetch transation after sending (will try again)","UNKNOWN_ERROR",{error:h}))}this.provider._setTimeout(()=>{l()},a.pop()||4e3)};l()})}async signTransaction(t){const n=J4(t);if(n.from){const s=await no(n.from,this.provider);Ae(s!=null&&s.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",t),n.from=s}else n.from=this.address;const i=this.provider.getRpcTransaction(n);return await this.provider.send("eth_signTransaction",[i])}async signMessage(t){const n=typeof t=="string"?Cu(t):t;return await this.provider.send("personal_sign",[Ft(n),this.address.toLowerCase()])}async signTypedData(t,n,i){const s=J4(i),o=await T8.resolveNames(t,n,s,async a=>{const c=await no(a);return Ae(c!=null,"TypedData does not support null address","value",a),c});return await this.provider.send("eth_signTypedData_v4",[this.address.toLowerCase(),JSON.stringify(T8.getPayload(o.domain,n,o.value))])}async unlock(t){return this.provider.send("personal_unlockAccount",[this.address.toLowerCase(),t,null])}async _legacySignMessage(t){const n=typeof t=="string"?Cu(t):t;return await this.provider.send("eth_sign",[this.address.toLowerCase(),Ft(n)])}}var xp,Zm,zh,ru,qc,nc,ko,wy,xS;class nq extends r9e{constructor(t,n){super(t,n);Le(this,wy);Le(this,xp);Le(this,Zm);Le(this,zh);Le(this,ru);Le(this,qc);Le(this,nc);Le(this,ko);de(this,Zm,1),de(this,xp,Object.assign({},rq,n||{})),de(this,zh,[]),de(this,ru,null),de(this,nc,null),de(this,ko,null);{let s=null;const o=new Promise(a=>{s=a});de(this,qc,{promise:o,resolve:s})}const i=this._getOption("staticNetwork");typeof i=="boolean"?(Ae(!i||t!=="any","staticNetwork cannot be used on special network 'any'","options",n),i&&t!=null&&de(this,nc,il.from(t))):i&&(Ae(t==null||i.matches(t),"staticNetwork MUST match network object","options",n),de(this,nc,i))}_getOption(t){return ee(this,xp)[t]}get _network(){return Ze(ee(this,nc),"network is not available yet","NETWORK_ERROR"),ee(this,nc)}async _perform(t){if(t.method==="call"||t.method==="estimateGas"){let i=t.transaction;if(i&&i.type!=null&&qt(i.type)&&i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null){const s=await this.getFeeData();s.maxFeePerGas==null&&s.maxPriorityFeePerGas==null&&(t=Object.assign({},t,{transaction:Object.assign({},i,{type:void 0})}))}}const n=this.getRpcRequest(t);return n!=null?await this.send(n.method,n.args):super._perform(t)}async _detectNetwork(){const t=this._getOption("staticNetwork");if(t)if(t===!0){if(ee(this,nc))return ee(this,nc)}else return t;return ee(this,ko)?await ee(this,ko):this.ready?(de(this,ko,(async()=>{try{const n=il.from(qt(await this.send("eth_chainId",[])));return de(this,ko,null),n}catch(n){throw de(this,ko,null),n}})()),await ee(this,ko)):(de(this,ko,(async()=>{const n={id:M2(this,Zm)._++,method:"eth_chainId",params:[],jsonrpc:"2.0"};this.emit("debug",{action:"sendRpcPayload",payload:n});let i;try{i=(await this._send(n))[0],de(this,ko,null)}catch(s){throw de(this,ko,null),this.emit("debug",{action:"receiveRpcError",error:s}),s}if(this.emit("debug",{action:"receiveRpcResult",result:i}),"result"in i)return il.from(qt(i.result));throw this.getRpcError(n,i)})()),await ee(this,ko))}_start(){ee(this,qc)==null||ee(this,qc).resolve==null||(ee(this,qc).resolve(),de(this,qc,null),(async()=>{for(;ee(this,nc)==null&&!this.destroyed;)try{de(this,nc,await this._detectNetwork())}catch(t){if(this.destroyed)break;console.log("JsonRpcProvider failed to detect network and cannot start up; retry in 1s (perhaps the URL is wrong or the node is not started)"),this.emit("error",jn("failed to bootstrap network detection","NETWORK_ERROR",{event:"initial-network-discovery",info:{error:t}})),await p9e(1e3)}rt(this,wy,xS).call(this)})())}async _waitUntilReady(){if(ee(this,qc)!=null)return await ee(this,qc).promise}_getSubscriber(t){return t.type==="pending"?new d9e(this):t.type==="event"?this._getOption("polling")?new zT(this,t.filter):new h9e(this,t.filter):t.type==="orphan"&&t.filter.orphan==="drop-log"?new P8("orphan"):super._getSubscriber(t)}get ready(){return ee(this,qc)==null}getRpcTransaction(t){const n={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(i=>{if(t[i]==null)return;let s=i;i==="gasLimit"&&(s="gas"),n[s]=$g(qt(t[i],`tx.${i}`))}),["from","to","data"].forEach(i=>{t[i]!=null&&(n[i]=Ft(t[i]))}),t.accessList&&(n.accessList=D1(t.accessList)),t.blobVersionedHashes&&(n.blobVersionedHashes=t.blobVersionedHashes.map(i=>i.toLowerCase())),n}getRpcRequest(t){switch(t.method){case"chainId":return{method:"eth_chainId",args:[]};case"getBlockNumber":return{method:"eth_blockNumber",args:[]};case"getGasPrice":return{method:"eth_gasPrice",args:[]};case"getPriorityFee":return{method:"eth_maxPriorityFeePerGas",args:[]};case"getBalance":return{method:"eth_getBalance",args:[pg(t.address),t.blockTag]};case"getTransactionCount":return{method:"eth_getTransactionCount",args:[pg(t.address),t.blockTag]};case"getCode":return{method:"eth_getCode",args:[pg(t.address),t.blockTag]};case"getStorage":return{method:"eth_getStorageAt",args:[pg(t.address),"0x"+t.position.toString(16),t.blockTag]};case"broadcastTransaction":return{method:"eth_sendRawTransaction",args:[t.signedTransaction]};case"getBlock":if("blockTag"in t)return{method:"eth_getBlockByNumber",args:[t.blockTag,!!t.includeTransactions]};if("blockHash"in t)return{method:"eth_getBlockByHash",args:[t.blockHash,!!t.includeTransactions]};break;case"getTransaction":return{method:"eth_getTransactionByHash",args:[t.hash]};case"getTransactionReceipt":return{method:"eth_getTransactionReceipt",args:[t.hash]};case"call":return{method:"eth_call",args:[this.getRpcTransaction(t.transaction),t.blockTag]};case"estimateGas":return{method:"eth_estimateGas",args:[this.getRpcTransaction(t.transaction)]};case"getLogs":return t.filter&&t.filter.address!=null&&(Array.isArray(t.filter.address)?t.filter.address=t.filter.address.map(pg):t.filter.address=pg(t.filter.address)),{method:"eth_getLogs",args:[t.filter]}}return null}getRpcError(t,n){const{method:i}=t,{error:s}=n;if(i==="eth_estimateGas"&&s.message){const c=s.message;if(!c.match(/revert/i)&&c.match(/insufficient funds/i))return jn("insufficient funds","INSUFFICIENT_FUNDS",{transaction:t.params[0],info:{payload:t,error:s}})}if(i==="eth_call"||i==="eth_estimateGas"){const c=AS(s),l=ty.getBuiltinCallException(i==="eth_call"?"call":"estimateGas",t.params[0],c?c.data:null);return l.info={error:s,payload:t},l}const o=JSON.stringify(g9e(s));if(typeof s.message=="string"&&s.message.match(/user denied|ethers-user-denied/i))return jn("user rejected action","ACTION_REJECTED",{action:{eth_sign:"signMessage",personal_sign:"signMessage",eth_signTypedData_v4:"signTypedData",eth_signTransaction:"signTransaction",eth_sendTransaction:"sendTransaction",eth_requestAccounts:"requestAccess",wallet_requestAccounts:"requestAccess"}[i]||"unknown",reason:"rejected",info:{payload:t,error:s}});if(i==="eth_sendRawTransaction"||i==="eth_sendTransaction"){const c=t.params[0];if(o.match(/insufficient funds|base fee exceeds gas limit/i))return jn("insufficient funds for intrinsic transaction cost","INSUFFICIENT_FUNDS",{transaction:c,info:{error:s}});if(o.match(/nonce/i)&&o.match(/too low/i))return jn("nonce has already been used","NONCE_EXPIRED",{transaction:c,info:{error:s}});if(o.match(/replacement transaction/i)&&o.match(/underpriced/i))return jn("replacement fee too low","REPLACEMENT_UNDERPRICED",{transaction:c,info:{error:s}});if(o.match(/only replay-protected/i))return jn("legacy pre-eip-155 transactions not supported","UNSUPPORTED_OPERATION",{operation:i,info:{transaction:c,info:{error:s}}})}let a=!!o.match(/the method .* does not exist/i);return a||s&&s.details&&s.details.startsWith("Unauthorized method:")&&(a=!0),a?jn("unsupported operation","UNSUPPORTED_OPERATION",{operation:t.method,info:{error:s,payload:t}}):jn("could not coalesce error","UNKNOWN_ERROR",{error:s,payload:t})}send(t,n){if(this.destroyed)return Promise.reject(jn("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:t}));const i=M2(this,Zm)._++,s=new Promise((o,a)=>{ee(this,zh).push({resolve:o,reject:a,payload:{method:t,params:n,id:i,jsonrpc:"2.0"}})});return rt(this,wy,xS).call(this),s}async getSigner(t){t==null&&(t=0);const n=this.send("eth_accounts",[]);if(typeof t=="number"){const s=await n;if(t>=s.length)throw new Error("no such account");return new um(this,s[t])}const{accounts:i}=await Ks({network:this.getNetwork(),accounts:n});t=Gr(t);for(const s of i)if(Gr(s)===t)return new um(this,t);throw new Error("invalid account")}async listAccounts(){return(await this.send("eth_accounts",[])).map(n=>new um(this,n))}destroy(){ee(this,ru)&&(clearTimeout(ee(this,ru)),de(this,ru,null));for(const{payload:t,reject:n}of ee(this,zh))n(jn("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:t.method}));de(this,zh,[]),super.destroy()}}xp=new WeakMap,Zm=new WeakMap,zh=new WeakMap,ru=new WeakMap,qc=new WeakMap,nc=new WeakMap,ko=new WeakMap,wy=new WeakSet,xS=function(){if(ee(this,ru))return;const t=this._getOption("batchMaxCount")===1?0:this._getOption("batchStallTime");de(this,ru,setTimeout(()=>{de(this,ru,null);const n=ee(this,zh);for(de(this,zh,[]);n.length;){const i=[n.shift()];for(;n.length&&i.length!==ee(this,xp).batchMaxCount;)if(i.push(n.shift()),JSON.stringify(i.map(o=>o.payload)).length>ee(this,xp).batchMaxSize){n.unshift(i.pop());break}(async()=>{const s=i.length===1?i[0].payload:i.map(o=>o.payload);this.emit("debug",{action:"sendRpcPayload",payload:s});try{const o=await this._send(s);this.emit("debug",{action:"receiveRpcResult",result:o});for(const{resolve:a,reject:c,payload:l}of i){if(this.destroyed){c(jn("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:l.method}));continue}const h=o.filter(f=>f.id===l.id)[0];if(h==null){const f=jn("missing response for request","BAD_DATA",{value:o,info:{payload:l}});this.emit("error",f),c(f);continue}if("error"in h){c(this.getRpcError(l,h));continue}a(h.result)}}catch(o){this.emit("debug",{action:"receiveRpcError",error:o});for(const{reject:a}of i)a(o)}})()}},t))};var Cf;class iq extends nq{constructor(t,n){super(t,n);Le(this,Cf);let i=this._getOption("pollingInterval");i==null&&(i=rq.pollingInterval),de(this,Cf,i)}_getSubscriber(t){const n=super._getSubscriber(t);return pB(n)&&(n.pollingInterval=ee(this,Cf)),n}get pollingInterval(){return ee(this,Cf)}set pollingInterval(t){if(!Number.isInteger(t)||t<0)throw new Error("invalid interval");de(this,Cf,t),this._forEachSubscriber(n=>{pB(n)&&(n.pollingInterval=ee(this,Cf))})}}Cf=new WeakMap;var Ym;class sq extends iq{constructor(t,n,i){t==null&&(t="http://localhost:8545");super(n,i);Le(this,Ym);typeof t=="string"?de(this,Ym,new Wu(t)):de(this,Ym,t.clone())}_getConnection(){return ee(this,Ym).clone()}async send(t,n){return await this._start(),await super.send(t,n)}async _send(t){const n=this._getConnection();n.body=JSON.stringify(t),n.setHeader("content-type","application/json");const i=await n.send();i.assertOk();let s=i.bodyJson;return Array.isArray(s)||(s=[s]),s}}Ym=new WeakMap;function AS(r){if(r==null)return null;if(typeof r.message=="string"&&r.message.match(/revert/i)&&Tn(r.data))return{message:r.message,data:r.data};if(typeof r=="object"){for(const e in r){const t=AS(r[e]);if(t)return t}return null}if(typeof r=="string")try{return AS(JSON.parse(r))}catch{}return null}function ES(r,e){if(r!=null){if(typeof r.message=="string"&&e.push(r.message),typeof r=="object")for(const t in r)ES(r[t],e);if(typeof r=="string")try{return ES(JSON.parse(r),e)}catch{}}}function g9e(r){const e=[];return ES(r,e),e}function m9e(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}const w9e=m9e().WebSocket;var nu,vy,Sf,Ap,If;class VT{constructor(e,t){Le(this,nu);Le(this,vy);Le(this,Sf);Le(this,Ap);Le(this,If);de(this,nu,e),de(this,vy,JSON.stringify(t)),de(this,Sf,null),de(this,Ap,null),de(this,If,null)}get filter(){return JSON.parse(ee(this,vy))}start(){de(this,Sf,ee(this,nu).send("eth_subscribe",this.filter).then(e=>(ee(this,nu)._register(e,this),e)))}stop(){ee(this,Sf).then(e=>{ee(this,nu).destroyed||ee(this,nu).send("eth_unsubscribe",[e])}),de(this,Sf,null)}pause(e){Ze(e,"preserve logs while paused not supported by SocketSubscriber yet","UNSUPPORTED_OPERATION",{operation:"pause(false)"}),de(this,Ap,!!e)}resume(){de(this,Ap,null)}_handleMessage(e){if(ee(this,Sf)!=null&&ee(this,Ap)===null){let t=ee(this,If);t==null?t=this._emit(ee(this,nu),e):t=t.then(async()=>{await this._emit(ee(this,nu),e)}),de(this,If,t.then(()=>{ee(this,If)===t&&de(this,If,null)}))}}async _emit(e,t){throw new Error("sub-classes must implemente this; _emit")}}nu=new WeakMap,vy=new WeakMap,Sf=new WeakMap,Ap=new WeakMap,If=new WeakMap;class v9e extends VT{constructor(e){super(e,["newHeads"])}async _emit(e,t){e.emit("block",parseInt(t.number))}}class y9e extends VT{constructor(e){super(e,["newPendingTransactions"])}async _emit(e,t){e.emit("pending",t)}}var yy;class b9e extends VT{constructor(t,n){super(t,["logs",n]);Le(this,yy);de(this,yy,JSON.stringify(n))}get logFilter(){return JSON.parse(ee(this,yy))}async _emit(t,n){t.emit(this.logFilter,t._wrapLog(n,t._network))}}yy=new WeakMap;var Ep,Qm,Tf;class _9e extends nq{constructor(t,n){const i=Object.assign({},n??{});Ae(i.batchMaxCount==null||i.batchMaxCount===1,"sockets-based providers do not support batches","options.batchMaxCount",n),i.batchMaxCount=1,i.staticNetwork==null&&(i.staticNetwork=!0);super(t,i);Le(this,Ep);Le(this,Qm);Le(this,Tf);de(this,Ep,new Map),de(this,Qm,new Map),de(this,Tf,new Map)}_getSubscriber(t){switch(t.type){case"close":return new P8("close");case"block":return new v9e(this);case"pending":return new y9e(this);case"event":return new b9e(this,t.filter);case"orphan":if(t.filter.orphan==="drop-log")return new P8("drop-log")}return super._getSubscriber(t)}_register(t,n){ee(this,Qm).set(t,n);const i=ee(this,Tf).get(t);if(i){for(const s of i)n._handleMessage(s);ee(this,Tf).delete(t)}}async _send(t){Ae(!Array.isArray(t),"WebSocket does not support batch send","payload",t);const n=new Promise((i,s)=>{ee(this,Ep).set(t.id,{payload:t,resolve:i,reject:s})});return await this._waitUntilReady(),await this._write(JSON.stringify(t)),[await n]}async _processMessage(t){const n=JSON.parse(t);if(n&&typeof n=="object"&&"id"in n){const i=ee(this,Ep).get(n.id);if(i==null){this.emit("error",jn("received result for unknown id","UNKNOWN_ERROR",{reasonCode:"UNKNOWN_ID",result:n}));return}ee(this,Ep).delete(n.id),i.resolve(n)}else if(n&&n.method==="eth_subscription"){const i=n.params.subscription,s=ee(this,Qm).get(i);if(s)s._handleMessage(n.params.result);else{let o=ee(this,Tf).get(i);o==null&&(o=[],ee(this,Tf).set(i,o)),o.push(n.params.result)}}else{this.emit("error",jn("received unexpected message","UNKNOWN_ERROR",{reasonCode:"UNEXPECTED_MESSAGE",result:n}));return}}async _write(t){throw new Error("sub-classes must override this")}}Ep=new WeakMap,Qm=new WeakMap,Tf=new WeakMap;var Cp,Kc;class x9e extends _9e{constructor(t,n,i){super(n,i);Le(this,Cp);Le(this,Kc);typeof t=="string"?(de(this,Cp,()=>new w9e(t)),de(this,Kc,ee(this,Cp).call(this))):typeof t=="function"?(de(this,Cp,t),de(this,Kc,t())):(de(this,Cp,null),de(this,Kc,t)),this.websocket.onopen=async()=>{try{await this._start(),this.resume()}catch(s){console.log("failed to start WebsocketProvider",s)}},this.websocket.onmessage=s=>{this._processMessage(s.data)}}get websocket(){if(ee(this,Kc)==null)throw new Error("websocket closed");return ee(this,Kc)}async _write(t){this.websocket.send(t)}async destroy(){ee(this,Kc)!=null&&(ee(this,Kc).close(),de(this,Kc,null)),super.destroy()}}Cp=new WeakMap,Kc=new WeakMap;const m3="84842078b09946638c03157f83405213";function A9e(r){switch(r){case"mainnet":return"mainnet.infura.io";case"goerli":return"goerli.infura.io";case"sepolia":return"sepolia.infura.io";case"arbitrum":return"arbitrum-mainnet.infura.io";case"arbitrum-goerli":return"arbitrum-goerli.infura.io";case"arbitrum-sepolia":return"arbitrum-sepolia.infura.io";case"base":return"base-mainnet.infura.io";case"base-goerlia":return"base-goerli.infura.io";case"base-sepolia":return"base-sepolia.infura.io";case"bnb":return"bnbsmartchain-mainnet.infura.io";case"bnbt":return"bnbsmartchain-testnet.infura.io";case"linea":return"linea-mainnet.infura.io";case"linea-goerli":return"linea-goerli.infura.io";case"linea-sepolia":return"linea-sepolia.infura.io";case"matic":return"polygon-mainnet.infura.io";case"matic-amoy":return"polygon-amoy.infura.io";case"matic-mumbai":return"polygon-mumbai.infura.io";case"optimism":return"optimism-mainnet.infura.io";case"optimism-goerli":return"optimism-goerli.infura.io";case"optimism-sepolia":return"optimism-sepolia.infura.io"}Ae(!1,"unsupported network","network",r)}class E9e extends x9e{constructor(t,n){const i=new Pp(t,n),s=i._getConnection();Ze(!s.credentials,"INFURA WebSocket project secrets unsupported","UNSUPPORTED_OPERATION",{operation:"InfuraProvider.getWebSocketProvider()"});const o=s.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/");super(o,i._network);Oe(this,"projectId");Oe(this,"projectSecret");tr(this,{projectId:i.projectId,projectSecret:i.projectSecret})}isCommunityResource(){return this.projectId===m3}}class Pp extends sq{constructor(t,n,i){t==null&&(t="mainnet");const s=il.from(t);n==null&&(n=m3),i==null&&(i=null);const o=Pp.getRequest(s,n,i);super(o,s,{staticNetwork:s});Oe(this,"projectId");Oe(this,"projectSecret");tr(this,{projectId:n,projectSecret:i})}_getProvider(t){try{return new Pp(t,this.projectId,this.projectSecret)}catch{}return super._getProvider(t)}isCommunityResource(){return this.projectId===m3}static getWebSocketProvider(t,n){return new E9e(t,n)}static getRequest(t,n,i){n==null&&(n=m3),i==null&&(i=null);const s=new Wu(`https://${A9e(t.name)}/v3/${n}`);return s.allowGzip=!0,i&&s.setCredentials("",i),n===m3&&(s.retryFunc=async(o,a,c)=>(l9e("InfuraProvider"),!0)),s}}var Jm;class W7 extends iq{constructor(t,n,i){const s=Object.assign({},i??{},{batchMaxCount:1});Ae(t&&t.request,"invalid EIP-1193 provider","ethereum",t);super(n,s);Le(this,Jm);de(this,Jm,async(o,a)=>{const c={method:o,params:a};this.emit("debug",{action:"sendEip1193Request",payload:c});try{const l=await t.request(c);return this.emit("debug",{action:"receiveEip1193Result",result:l}),l}catch(l){const h=new Error(l.message);throw h.code=l.code,h.data=l.data,h.payload=c,this.emit("debug",{action:"receiveEip1193Error",error:h}),h}})}async send(t,n){return await this._start(),await super.send(t,n)}async _send(t){Ae(!Array.isArray(t),"EIP-1193 does not support batch request","payload",t);try{const n=await ee(this,Jm).call(this,t.method,t.params||[]);return[{id:t.id,result:n}]}catch(n){return[{id:t.id,error:{code:n.code,data:n.data,message:n.message}}]}}getRpcError(t,n){switch(n=JSON.parse(JSON.stringify(n)),n.error.code||-1){case 4001:n.error.message=`ethers-user-denied: ${n.error.message}`;break;case 4200:n.error.message=`ethers-unsupported: ${n.error.message}`;break}return super.getRpcError(t,n)}async hasSigner(t){t==null&&(t=0);const n=await this.send("eth_accounts",[]);return typeof t=="number"?n.length>t:(t=t.toLowerCase(),n.filter(i=>i.toLowerCase()===t).length!==0)}async getSigner(t){if(t==null&&(t=0),!await this.hasSigner(t))try{await ee(this,Jm).call(this,"eth_requestAccounts",[])}catch(n){const i=n.payload;throw this.getRpcError(i,{id:i.id,error:n})}return await super.getSigner(t)}}Jm=new WeakMap;const Jr={WALLET_ID:"@w3m/wallet_id",ERROR_CODE_UNRECOGNIZED_CHAIN_ID:4902,ERROR_CODE_DEFAULT:5e3},Zi={getCaipDefaultChain(r){if(r)return{id:`${ct.EIP155}:${r.chainId}`,name:r.name,imageId:As.EIP155NetworkImageIds[r.chainId],chain:vn.CHAIN.EVM}},hexStringToNumber(r){const e=r.startsWith("0x")?r.slice(2):r;return parseInt(e,16)},numberToHexString(r){return`0x${r.toString(16)}`},async getUserInfo(r){const[e,t]=await Promise.all([Zi.getAddresses(r),Zi.getChainId(r)]);return{chainId:t,addresses:e}},async getChainId(r){const e=await r.request({method:"eth_chainId"});return Number(e)},async getAddress(r){const[e]=await r.request({method:"eth_accounts"});return e},async getAddresses(r){return await r.request({method:"eth_accounts"})},async addEthereumChain(r,e){await r.request({method:"wallet_addEthereumChain",params:[{chainId:Zi.numberToHexString(e.chainId),rpcUrls:[e.rpcUrl],chainName:e.name,nativeCurrency:{name:e.currency,decimals:18,symbol:e.currency},blockExplorerUrls:[e.explorerUrl],iconUrls:[As.EIP155NetworkImageIds[e.chainId]]}]})}},Ai=ei({provider:void 0,providerType:void 0,address:void 0,chainId:void 0,status:"reconnecting",isConnected:!1}),Qe={state:Ai,subscribeKey(r,e){return po(Ai,r,e)},subscribe(r){return Ms(Ai,()=>r(Ai))},setProvider(r){r&&(Ai.provider=oa(r))},setProviderType(r){Ai.providerType=r},setAddress(r){Ai.address=r},setPreferredAccountType(r){Ai.preferredAccountType=r},setChainId(r){Ai.chainId=r},setStatus(r){Ai.status=r},setIsConnected(r){Ai.isConnected=r},setError(r){Ai.error=r},reset(){Ai.provider=void 0,Ai.address=void 0,Ai.chainId=void 0,Ai.providerType=void 0,Ai.status="disconnected",Ai.isConnected=!1,Ai.error=void 0,Ai.preferredAccountType=void 0}},Zn={setItem(r,e){z7()&&localStorage.setItem(r,JSON.stringify(e))},getItem(r){if(z7()){const e=localStorage.getItem(r);if(e)try{return JSON.parse(e)}catch{return null}}return null},removeItem(r){z7()&&localStorage.removeItem(r)}};function z7(){return typeof window<"u"&&typeof localStorage<"u"}class C9e{constructor(e){var o,a,c;this.appKit=void 0,this.hasSyncedConnectedAccount=!1,this.EIP6963Providers=[],this.projectId="",this.options=void 0,this.chain=vn.CHAIN.EVM,this.siweControllerClient=(o=this.options)==null?void 0:o.siweConfig,this.tokens=iP.getCaipTokens((a=this.options)==null?void 0:a.tokens),this.defaultChain=void 0;const{ethersConfig:t,siweConfig:n,chains:i,defaultChain:s}=e;if(!t)throw new Error("web3modal:constructor - ethersConfig is undefined");this.ethersConfig=t,this.siweControllerClient=(c=this.options)==null?void 0:c.siweConfig,this.tokens=iP.getCaipTokens(e.tokens),this.defaultChain=Zi.getCaipDefaultChain(s),this.chains=i,this.networkControllerClient={switchCaipNetwork:async l=>{const h=$c.caipNetworkIdToNumber(l==null?void 0:l.id);if(h)try{Qe.setError(void 0),await this.switchNetwork(h)}catch(f){throw Qe.setError(f),new Error("networkControllerClient:switchCaipNetwork - unable to switch chain")}},getApprovedCaipNetworksData:async()=>new Promise(async l=>{var f,v,y,A;const h=Zn.getItem(Jr.WALLET_ID);if(h!=null&&h.includes(ct.WALLET_CONNECT_CONNECTOR_ID)){const M=await this.getWalletConnectProvider();if(!M)throw new Error("networkControllerClient:getApprovedCaipNetworks - connector is undefined");const $=(v=(f=M.signer)==null?void 0:f.session)==null?void 0:v.namespaces,L=(y=$==null?void 0:$[ct.EIP155])==null?void 0:y.methods,P=I6e(((A=$==null?void 0:$[ct.EIP155])==null?void 0:A.accounts)||[]),H={supportsAllNetworks:(L==null?void 0:L.includes(ct.ADD_CHAIN_METHOD))??!1,approvedCaipNetworkIds:P};l(H)}else l({approvedCaipNetworkIds:void 0,supportsAllNetworks:!0})})},this.connectionControllerClient={connectWalletConnect:async l=>{var y,A,M,$,L,P,H,F,q,Y;const h=await this.getWalletConnectProvider();if(!h)throw new Error("connectionControllerClient:getWalletConnectUri - provider is undefined");h.on("display_uri",I=>{l(I)});const f=await(($=(M=(A=(y=h.signer)==null?void 0:y.client)==null?void 0:A.core)==null?void 0:M.crypto)==null?void 0:$.getClientId());f&&((L=this.appKit)==null||L.setClientId(f));const v=await((P=n==null?void 0:n.getMessageParams)==null?void 0:P.call(n));if((H=n==null?void 0:n.options)!=null&&H.enabled&&v&&Object.keys(v||{}).length>0){const{SIWEController:I,getDidChainId:T,getDidAddress:V}=await lc(async()=>{const{SIWEController:g,getDidChainId:m,getDidAddress:b}=await import("./index-CJHEREZQ.js");return{SIWEController:g,getDidChainId:m,getDidAddress:b}},[]),Q=$c.caipNetworkIdToNumber((q=(F=this.appKit)==null?void 0:F.getCaipNetwork())==null?void 0:q.id);let te=v.chains;Q&&(te=[Q,...v.chains.filter(g=>g!==Q)]);const oe=await h.authenticate({nonce:await n.getNonce(),methods:[...kW],...v,chains:te}),d=(Y=oe==null?void 0:oe.auths)==null?void 0:Y[0];if(d){const{p:g,s:m}=d,b=T(g.iss),E=V(g.iss);E&&b&&I.setSession({address:E,chainId:parseInt(b,10)});try{const C=h.signer.client.formatAuthMessage({request:g,iss:g.iss});await I.verifyMessage({message:C,signature:m.s,cacao:d})}catch(C){throw console.error("Error verifying message",C),await h.disconnect().catch(console.error),await I.signOut().catch(console.error),C}}}else await h.connect({optionalChains:this.chains.map(I=>I.chainId)});await this.setWalletConnectProvider()},connectExternal:async({id:l,info:h,provider:f})=>{var v;if((v=this.appKit)==null||v.setClientId(null),l===ct.INJECTED_CONNECTOR_ID){const y=t.injected;if(!y)throw new Error("connectionControllerClient:connectInjected - provider is undefined");try{Qe.setError(void 0),await y.request({method:"eth_requestAccounts"}),this.setInjectedProvider(t)}catch(A){Qe.setError(A)}}else if(l===ct.EIP6963_CONNECTOR_ID&&h&&f)try{Qe.setError(void 0),await f.request({method:"eth_requestAccounts"}),this.setEIP6963Provider(f,h.name)}catch(y){Qe.setError(y)}else if(l===ct.COINBASE_SDK_CONNECTOR_ID){const y=t.coinbase;if(!y)throw new Error("connectionControllerClient:connectCoinbase - connector is undefined");try{Qe.setError(void 0),await y.request({method:"eth_requestAccounts"}),this.setCoinbaseProvider(t)}catch(A){throw Qe.setError(A),new Error(A.message)}}else l===ct.AUTH_CONNECTOR_ID&&await this.setAuthProvider()},checkInstalled:l=>l?t.injected&&!(window!=null&&window.ethereum)?!1:l.some(h=>{var f;return!!((f=window.ethereum)!=null&&f[String(h)])}):!!window.ethereum,disconnect:async()=>{var f,v,y,A;const l=Qe.state.provider,h=Qe.state.providerType;if(Zn.removeItem(Jr.WALLET_ID),Qe.reset(),(f=this.appKit)==null||f.setClientId(null),(v=n==null?void 0:n.options)!=null&&v.signOutOnDisconnect){const{SIWEController:M}=await lc(async()=>{const{SIWEController:$}=await import("./index-CJHEREZQ.js");return{SIWEController:$}},[]);await M.signOut()}if(h===ct.WALLET_CONNECT_CONNECTOR_ID||h==="coinbaseWalletSDK")await l.disconnect();else if(h===ct.AUTH_CONNECTOR_ID)await((y=this.authProvider)==null?void 0:y.disconnect());else if(h===ct.EIP6963_CONNECTOR_ID&&l)await this.revokeProviderPermissions(l);else if(h===ct.INJECTED_CONNECTOR_ID){const M=t.injected;M&&await this.revokeProviderPermissions(M)}(A=l==null?void 0:l.emit)==null||A.call(l,"disconnect"),Zn.removeItem(Jr.WALLET_ID),Qe.reset()},signMessage:async l=>{const h=Qe.state.provider;if(!h)throw new Error("connectionControllerClient:signMessage - provider is undefined");const f=Tn(l)?l:Ft(Cu(l));return await h.request({method:"personal_sign",params:[f,this.getAddress()]})},parseUnits:(l,h)=>axe(l,h),formatUnits:(l,h)=>Az(l,h),async estimateGas(l){const{chainId:h,provider:f,address:v}=Qe.state;if(!f)throw new Error("connectionControllerClient:sendTransaction - provider is undefined");if(!v)throw new Error("connectionControllerClient:sendTransaction - address is undefined");const y={from:l.address,to:l.to,data:l.data,type:0},A=new W7(f,h);return await new um(A,v).estimateGas(y)},sendTransaction:async l=>{const{chainId:h,provider:f,address:v}=Qe.state;if(!f)throw new Error("ethersClient:sendTransaction - provider is undefined");if(!v)throw new Error("ethersClient:sendTransaction - address is undefined");const y={to:l.to,value:l.value,gasLimit:l.gas,gasPrice:l.gasPrice,data:l.data,type:0},A=new W7(f,h),L=await(await new um(A,v).sendTransaction(y)).wait();return(L==null?void 0:L.hash)||null},writeContract:async l=>{const{chainId:h,provider:f,address:v}=Qe.state;if(!f)throw new Error("ethersClient:writeContract - provider is undefined");if(!v)throw new Error("ethersClient:writeContract - address is undefined");const y=new W7(f,h),A=new um(y,v),M=new lm(l.tokenAddress,l.abi,A);if(!M||!l.method)throw new Error("Contract method is undefined");const $=M[l.method];if($)return await $(l.receiverAddress,l.tokenAmount);throw new Error("Contract method is undefined")},getEnsAddress:async l=>{var h,f,v;try{const y=$c.caipNetworkIdToNumber((f=(h=this.appKit)==null?void 0:h.getCaipNetwork())==null?void 0:f.id);let A=null,M=!1;return l!=null&&l.endsWith(vn.WC_NAME_SUFFIX)&&(M=await((v=this.appKit)==null?void 0:v.resolveWalletConnectName(l))||!1),y===1&&(A=await new Pp("mainnet").resolveName(l)),A||M||!1}catch{return!1}},getEnsAvatar:async l=>{const{chainId:h}=Qe.state;if(h&&h===1){const v=await new Pp("mainnet").getAvatar(l);return v||!1}return!1}}}construct(e,t){var n,i,s,o,a,c,l,h;if(!t.projectId)throw new Error("web3modal:initialize - projectId is undefined");this.appKit=e,this.options=t,this.projectId=t.projectId,this.metadata=this.ethersConfig.metadata,this.defaultChain&&((n=this.appKit)==null||n.setCaipNetwork(this.defaultChain)),this.createProvider(),Qe.subscribeKey("address",()=>{this.syncAccount()}),Qe.subscribeKey("chainId",()=>{this.syncNetwork()}),(i=this.appKit)==null||i.subscribeCaipNetworkChange(f=>{!this.getChainId()&&f&&Qe.setChainId($c.caipNetworkIdToNumber(f.id))}),(s=this.appKit)==null||s.subscribeShouldUpdateToAddress(f=>{f&&Qe.setAddress(Gr(f))}),this.syncRequestedNetworks(this.chains,(o=this.options)==null?void 0:o.chainImages),this.syncConnectors(this.ethersConfig),typeof window<"u"&&(this.listenConnectors(!0),this.checkActive6963Provider()),(a=this.appKit)==null||a.setEIP6963Enabled(this.ethersConfig.EIP6963),this.ethersConfig.injected&&this.checkActiveInjectedProvider(this.ethersConfig),((c=this.ethersConfig.auth)!=null&&c.email||(h=(l=this.ethersConfig.auth)==null?void 0:l.socials)!=null&&h.length)&&this.syncAuthConnector(this.options.projectId,this.ethersConfig.auth),this.ethersConfig.coinbase&&this.checkActiveCoinbaseProvider(this.ethersConfig)}getState(){var t;const e=(t=this.appKit)==null?void 0:t.getState();return{...e,selectedNetworkId:$c.caipNetworkIdToNumber(e==null?void 0:e.selectedNetworkId)}}subscribeState(e){var t;return(t=this.appKit)==null?void 0:t.subscribeState(n=>e({...n,selectedNetworkId:$c.caipNetworkIdToNumber(n.selectedNetworkId)}))}setAddress(e){const t=e?Gr(e):void 0;Qe.setAddress(t)}getAddress(){const{address:e}=Qe.state;return e?Gr(e):void 0}getError(){return Qe.state.error}getChainId(){var n,i;const e=Qe.state.chainId,t=$c.caipNetworkIdToNumber((i=(n=this.appKit)==null?void 0:n.getCaipNetwork())==null?void 0:i.id);return e??t}getStatus(){return Qe.state.status}getIsConnected(){return Qe.state.isConnected}getWalletProvider(){return Qe.state.provider}getWalletProviderType(){return Qe.state.providerType}subscribeProvider(e){return Qe.subscribe(e)}async disconnect(){var n,i;const{provider:e,providerType:t}=Qe.state;if(Zn.removeItem(Jr.WALLET_ID),Qe.reset(),(n=this.appKit)==null||n.setClientId(null),t===ct.AUTH_CONNECTOR_ID)await((i=this.authProvider)==null?void 0:i.disconnect());else if(e&&(t==="injected"||t==="eip6963"))await this.revokeProviderPermissions(e),e==null||e.emit("disconnect");else if(t==="walletConnect"||t==="coinbaseWalletSDK"){const s=e;if(s)try{Qe.setError(void 0),await s.disconnect()}catch(o){Qe.setError(o)}}}createProvider(){return!this.walletConnectProviderInitPromise&&typeof window<"u"&&(this.walletConnectProviderInitPromise=this.initWalletConnectProvider()),this.walletConnectProviderInitPromise}async initWalletConnectProvider(){const e=this.chains?this.chains.reduce((n,i)=>(n[i.chainId]=i.rpcUrl,n),{}):{},t={projectId:this.projectId,showQrModal:!1,rpcMap:e,optionalChains:[...this.chains.map(n=>n.chainId)],metadata:{name:this.metadata?this.metadata.name:"",description:this.metadata?this.metadata.description:"",url:this.metadata?this.metadata.url:"",icons:this.metadata?this.metadata.icons:[""]}};this.walletConnectProvider=await x6e.init(t),await this.checkActiveWalletConnectProvider()}async revokeProviderPermissions(e){try{(await e.request({method:"wallet_getPermissions"})).find(i=>i.parentCapability==="eth_accounts")&&await e.request({method:"wallet_revokePermissions",params:[{eth_accounts:{}}]})}catch(t){console.info("Could not revoke permissions from wallet. Disconnecting...",t)}}async getWalletConnectProvider(){if(!this.walletConnectProvider)try{Qe.setError(void 0),await this.createProvider()}catch(e){Qe.setError(e)}return this.walletConnectProvider}syncRequestedNetworks(e,t){var i;const n=e==null?void 0:e.map(s=>({id:`${ct.EIP155}:${s.chainId}`,name:s.name,imageId:As.EIP155NetworkImageIds[s.chainId],imageUrl:t==null?void 0:t[s.chainId],chain:vn.CHAIN.EVM}));(i=this.appKit)==null||i.setRequestedCaipNetworks(n??[],this.chain)}async checkActiveWalletConnectProvider(){const e=await this.getWalletConnectProvider(),t=Zn.getItem(Jr.WALLET_ID);e&&t===ct.WALLET_CONNECT_CONNECTOR_ID&&await this.setWalletConnectProvider();const n=Qe.state.isConnected;Qe.setStatus(n?"connected":"disconnected")}checkActiveInjectedProvider(e){const t=e.injected,n=Zn.getItem(Jr.WALLET_ID);t&&n===ct.INJECTED_CONNECTOR_ID&&(this.setInjectedProvider(e),this.watchInjected(e))}checkActiveCoinbaseProvider(e){var i;const t=e.coinbase,n=Zn.getItem(Jr.WALLET_ID);t&&n===ct.COINBASE_SDK_CONNECTOR_ID&&(t.accounts&&((i=t.accounts)==null?void 0:i.length)>0?(this.setCoinbaseProvider(e),this.watchCoinbase(e)):(Zn.removeItem(Jr.WALLET_ID),Qe.reset()))}checkActive6963Provider(){const e=Zn.getItem(Jr.WALLET_ID);if(e){const t=this.EIP6963Providers.find(n=>n.info.name===e);t&&this.setEIP6963Provider(t.provider,t.info.name)}}async setWalletConnectProvider(){var t,n,i,s,o;Zn.setItem(Jr.WALLET_ID,ct.WALLET_CONNECT_CONNECTOR_ID);const e=await this.getWalletConnectProvider();if(e){Qe.setChainId(e.chainId),Qe.setProviderType("walletConnect"),Qe.setProvider(e),Qe.setStatus("connected"),Qe.setIsConnected(!0),(t=this.appKit)==null||t.setAllAccounts(e.accounts.map(c=>({address:c,type:"eoa"})),this.chain);const a=(n=e.signer)==null?void 0:n.session;for(const c of e.accounts){const l=(i=a==null?void 0:a.sessionProperties)==null?void 0:i[c];l&&((s=this.appKit)==null||s.addAddressLabel(c,l,this.chain))}this.setAddress((o=e.accounts)==null?void 0:o[0]),this.watchWalletConnect()}}async setInjectedProvider(e){var n;Zn.setItem(Jr.WALLET_ID,ct.INJECTED_CONNECTOR_ID);const t=e.injected;if(t){const{addresses:i,chainId:s}=await Zi.getUserInfo(t);i!=null&&i[0]&&s&&(Qe.setChainId(s),Qe.setProviderType("injected"),Qe.setProvider(e.injected),Qe.setStatus("connected"),Qe.setIsConnected(!0),(n=this.appKit)==null||n.setAllAccounts(i.map(o=>({address:o,type:"eoa"})),this.chain),this.setAddress(i[0]),this.watchCoinbase(e))}}async setEIP6963Provider(e,t){var n;if(Zn.setItem(Jr.WALLET_ID,t),e){const{addresses:i,chainId:s}=await Zi.getUserInfo(e);i!=null&&i[0]&&s&&(Qe.setChainId(s),Qe.setProviderType("eip6963"),Qe.setProvider(e),Qe.setStatus("connected"),Qe.setIsConnected(!0),(n=this.appKit)==null||n.setAllAccounts(i.map(o=>({address:o,type:"eoa"})),this.chain),this.setAddress(i[0]),this.watchEIP6963(e))}}async setCoinbaseProvider(e){var n;Zn.setItem(Jr.WALLET_ID,ct.COINBASE_SDK_CONNECTOR_ID);const t=e.coinbase;if(t){const{addresses:i,chainId:s}=await Zi.getUserInfo(t);i!=null&&i[0]&&s&&(Qe.setChainId(s),Qe.setProviderType("coinbaseWalletSDK"),Qe.setProvider(e.coinbase),Qe.setStatus("connected"),Qe.setIsConnected(!0),(n=this.appKit)==null||n.setAllAccounts(i.map(o=>({address:o,type:"eoa"})),this.chain),this.setAddress(i[0]),this.watchCoinbase(e))}}async setAuthProvider(){var e,t,n,i,s;if(Zn.setItem(Jr.WALLET_ID,ct.AUTH_CONNECTOR_ID),this.authProvider){(e=this.appKit)==null||e.setLoading(!0);const{address:o,chainId:a,smartAccountDeployed:c,preferredAccountType:l,accounts:h=[]}=await this.authProvider.connect({chainId:this.getChainId()}),{smartAccountEnabledNetworks:f}=await this.authProvider.getSmartAccountEnabledNetworks();(t=this.appKit)==null||t.setSmartAccountEnabledNetworks(f,this.chain),o&&a&&((n=this.appKit)==null||n.setAllAccounts(h.length>0?h:[{address:o,type:l}],this.chain),Qe.setChainId($c.parseEvmChainId(a)),Qe.setProviderType(ct.AUTH_CONNECTOR_ID),Qe.setProvider(this.authProvider),Qe.setStatus("connected"),Qe.setIsConnected(!0),Qe.setAddress(o),Qe.setPreferredAccountType(l),(i=this.appKit)==null||i.setSmartAccountDeployed(!!c,this.chain),this.watchAuth(),this.watchModal()),(s=this.appKit)==null||s.setLoading(!1)}}async watchWalletConnect(){const e=await this.getWalletConnectProvider();function t(){Zn.removeItem(Jr.WALLET_ID),Qe.reset(),e==null||e.removeListener("disconnect",t),e==null||e.removeListener("accountsChanged",i),e==null||e.removeListener("chainChanged",n)}function n(s){if(s){const o=Zi.hexStringToNumber(s);Qe.setChainId(o)}}const i=async s=>{s.length>0&&await this.setWalletConnectProvider()};e&&(e.on("disconnect",t),e.on("accountsChanged",i),e.on("chainChanged",n))}watchInjected(e){const t=e.injected;function n(){Zn.removeItem(Jr.WALLET_ID),Qe.reset(),t==null||t.removeListener("disconnect",n),t==null||t.removeListener("accountsChanged",i),t==null||t.removeListener("chainChanged",s)}function i(o){const a=o==null?void 0:o[0];a?Qe.setAddress(Gr(a)):(Zn.removeItem(Jr.WALLET_ID),Qe.reset())}function s(o){if(o){const a=typeof o=="string"?Zi.hexStringToNumber(o):Number(o);Qe.setChainId(a)}}t&&(t.on("disconnect",n),t.on("accountsChanged",i),t.on("chainChanged",s))}watchEIP6963(e){function t(){Zn.removeItem(Jr.WALLET_ID),Qe.reset(),e.removeListener("disconnect",t),e.removeListener("accountsChanged",n),e.removeListener("chainChanged",i)}const n=s=>{var a,c;const o=s==null?void 0:s[0];o?(Qe.setAddress(Gr(o)),(a=this.appKit)==null||a.setAllAccounts(s.map(l=>({address:l,type:"eoa"})),this.chain)):((c=this.appKit)==null||c.setAllAccounts([],this.chain),Zn.removeItem(Jr.WALLET_ID),Qe.reset())};function i(s){if(s){const o=typeof s=="string"?Zi.hexStringToNumber(s):Number(s);Qe.setChainId(o)}}e&&(e.on("disconnect",t),e.on("accountsChanged",n),e.on("chainChanged",i))}watchCoinbase(e){const t=e.coinbase,n=Zn.getItem(Jr.WALLET_ID);function i(){Zn.removeItem(Jr.WALLET_ID),Qe.reset(),t==null||t.removeListener("disconnect",i),t==null||t.removeListener("accountsChanged",s),t==null||t.removeListener("chainChanged",o)}function s(a){const c=a==null?void 0:a[0];c?Qe.setAddress(Gr(c)):(Zn.removeItem(Jr.WALLET_ID),Qe.reset())}function o(a){if(a&&n===ct.COINBASE_SDK_CONNECTOR_ID){const c=Number(a);Qe.setChainId(c)}}t&&(t.on("disconnect",i),t.on("accountsChanged",s),t.on("chainChanged",o))}watchAuth(){this.authProvider&&(this.authProvider.onRpcRequest(e=>{var t,n,i,s,o,a,c;if(Ys.checkIfRequestExists(e)){if(!Ys.checkIfRequestIsAllowed(e))if((t=this.appKit)!=null&&t.isOpen()){if((n=this.appKit)!=null&&n.isTransactionStackEmpty())return;(i=this.appKit)!=null&&i.isTransactionShouldReplaceView()?(s=this.appKit)==null||s.replace("ApproveTransaction"):(o=this.appKit)==null||o.redirect("ApproveTransaction")}else(a=this.appKit)==null||a.open({view:"ApproveTransaction"})}else(c=this.appKit)==null||c.open(),console.error(_r.RPC_METHOD_NOT_ALLOWED_MESSAGE,{method:e.method}),setTimeout(()=>{var l;(l=this.appKit)==null||l.showErrorMessage(_r.RPC_METHOD_NOT_ALLOWED_UI_MESSAGE)},300)}),this.authProvider.onRpcError(()=>{var t,n,i,s;((t=this.appKit)==null?void 0:t.isOpen())&&((n=this.appKit)!=null&&n.isTransactionStackEmpty()?(i=this.appKit)==null||i.close():(s=this.appKit)==null||s.popTransactionStack(!0))}),this.authProvider.onRpcSuccess(()=>{var e,t,n;(e=this.appKit)!=null&&e.isTransactionStackEmpty()?(t=this.appKit)==null||t.close():(n=this.appKit)==null||n.popTransactionStack()}),this.authProvider.onNotConnected(()=>{var e,t;(e=this.appKit)==null||e.setIsConnected(!1,this.chain),(t=this.appKit)==null||t.setLoading(!1)}),this.authProvider.onIsConnected(({preferredAccountType:e})=>{var t,n;(t=this.appKit)==null||t.setIsConnected(!0,this.chain),(n=this.appKit)==null||n.setLoading(!1),Qe.setPreferredAccountType(e)}),this.authProvider.onSetPreferredAccount(({address:e,type:t})=>{var i,s,o;if(!e)return;(i=this.appKit)==null||i.setLoading(!0);const n=$c.caipNetworkIdToNumber((o=(s=this.appKit)==null?void 0:s.getCaipNetwork())==null?void 0:o.id);Qe.setAddress(e),Qe.setChainId(n),Qe.setStatus("connected"),Qe.setIsConnected(!0),Qe.setPreferredAccountType(t),this.syncAccount().then(()=>{var a;return(a=this.appKit)==null?void 0:a.setLoading(!1)})}))}watchModal(){this.authProvider&&this.subscribeState(e=>{var t;e.open||(t=this.authProvider)==null||t.rejectRpcRequests()})}async syncAccount(){var s,o,a,c,l,h,f,v,y;const e=Qe.state.address,t=Qe.state.chainId,n=Qe.state.isConnected,i=Qe.state.preferredAccountType;if((s=this.appKit)==null||s.resetAccount(this.chain),n&&e&&t){const A=`${ct.EIP155}:${t}:${e}`;(o=this.appKit)==null||o.setIsConnected(n,this.chain),(a=this.appKit)==null||a.setPreferredAccountType(i,this.chain),(c=this.appKit)==null||c.setCaipAddress(A,this.chain),this.syncConnectedWalletInfo();const M=this.chains.find($=>$.chainId===t);M!=null&&M.explorerUrl&&((l=this.appKit)==null||l.setAddressExplorerUrl(`${M.explorerUrl}/address/${e}`,this.chain)),await Promise.all([this.syncProfile(e),this.syncBalance(e),(h=this.appKit)==null?void 0:h.setApprovedCaipNetworksData(this.chain)]),this.hasSyncedConnectedAccount=!0}else!n&&this.hasSyncedConnectedAccount&&((f=this.appKit)==null||f.resetWcConnection(),(v=this.appKit)==null||v.resetNetwork(),(y=this.appKit)==null||y.setAllAccounts([],this.chain))}async syncNetwork(){var s,o,a,c,l,h;const e=(s=this.options)==null?void 0:s.chainImages,t=Qe.state.address,n=Qe.state.chainId,i=Qe.state.isConnected;if(this.chains){const f=this.chains.find(v=>v.chainId===n);if(f){const v=`${ct.EIP155}:${f.chainId}`;if((o=this.appKit)==null||o.setCaipNetwork({id:v,name:f.name,imageId:As.EIP155NetworkImageIds[f.chainId],imageUrl:e==null?void 0:e[f.chainId],chain:this.chain}),i&&t){const y=`${ct.EIP155}:${n}:${t}`;if((a=this.appKit)==null||a.setCaipAddress(y,this.chain),f.explorerUrl){const A=`${f.explorerUrl}/address/${t}`;(c=this.appKit)==null||c.setAddressExplorerUrl(A,this.chain)}else(l=this.appKit)==null||l.setAddressExplorerUrl(void 0,this.chain);this.hasSyncedConnectedAccount&&(await this.syncProfile(t),await this.syncBalance(t))}}else i&&((h=this.appKit)==null||h.setCaipNetwork({id:`${ct.EIP155}:${n}`,chain:this.chain}))}}async syncWalletConnectName(e){var t,n,i,s;try{const o=await((t=this.appKit)==null?void 0:t.getWalletConnectName(e));if(o!=null&&o[0]){const a=o[0];(n=this.appKit)==null||n.setProfileName(a.name,this.chain)}else(i=this.appKit)==null||i.setProfileName(null,this.chain)}catch{(s=this.appKit)==null||s.setProfileName(null,this.chain)}}async syncProfile(e){var n,i,s,o,a,c;const t=Qe.state.chainId;try{const l=await((n=this.appKit)==null?void 0:n.fetchIdentity({address:e})),h=l==null?void 0:l.name,f=l==null?void 0:l.avatar;(i=this.appKit)==null||i.setProfileName(h,this.chain),(s=this.appKit)==null||s.setProfileImage(f,this.chain),h||await this.syncWalletConnectName(e)}catch{if(t===1){const l=new Pp("mainnet"),h=await l.lookupAddress(e),f=await l.getAvatar(e);h?(o=this.appKit)==null||o.setProfileName(h,this.chain):await this.syncWalletConnectName(e),f&&((a=this.appKit)==null||a.setProfileImage(f,this.chain))}else await this.syncWalletConnectName(e),(c=this.appKit)==null||c.setProfileImage(null,this.chain)}}async syncBalance(e){var n;const t=Qe.state.chainId;if(t&&this.chains){const i=this.chains.find(s=>s.chainId===t);if(i){const s=new sq(i.rpcUrl,{chainId:t,name:i.name});if(s){const o=await s.getBalance(e),a=cxe(o);(n=this.appKit)==null||n.setBalance(a,i.currency,this.chain)}}}}syncConnectedWalletInfo(){var n,i,s,o,a,c,l;const e=Zn.getItem(Jr.WALLET_ID),t=Qe.state.providerType;if(t===ct.EIP6963_CONNECTOR_ID){if(e){const h=this.EIP6963Providers.find(f=>f.info.name===e);h&&((n=this.appKit)==null||n.setConnectedWalletInfo({...h.info},this.chain))}}else if(t===ct.WALLET_CONNECT_CONNECTOR_ID){const h=Qe.state.provider;h.session&&((s=this.appKit)==null||s.setConnectedWalletInfo({...h.session.peer.metadata,name:h.session.peer.metadata.name,icon:(i=h.session.peer.metadata.icons)==null?void 0:i[0]},this.chain))}else if(t===ct.COINBASE_SDK_CONNECTOR_ID){const h=(o=this.appKit)==null?void 0:o.getConnectors().find(f=>f.id===ct.COINBASE_SDK_CONNECTOR_ID);(c=this.appKit)==null||c.setConnectedWalletInfo({name:"Coinbase Wallet",icon:(a=this.appKit)==null?void 0:a.getConnectorImage(h)},this.chain)}else e&&((l=this.appKit)==null||l.setConnectedWalletInfo({name:e},this.chain))}async switchNetwork(e){var i,s,o,a,c,l,h,f;const t=Qe.state.provider,n=Qe.state.providerType;if(this.chains){const v=this.chains.find(y=>y.chainId===e);if(n===ct.WALLET_CONNECT_CONNECTOR_ID&&v){const y=t;if(y)try{await y.request({method:"wallet_switchEthereumChain",params:[{chainId:Zi.numberToHexString(v.chainId)}]}),Qe.setChainId(e)}catch(A){const M=A==null?void 0:A.message;if(/(?user rejected)/u.test(M==null?void 0:M.toLowerCase()))throw new Error("Chain is not supported");await Zi.addEthereumChain(y,v)}}else if(n===ct.INJECTED_CONNECTOR_ID&&v){const y=t;if(y)try{await y.request({method:"wallet_switchEthereumChain",params:[{chainId:Zi.numberToHexString(v.chainId)}]}),Qe.setChainId(v.chainId)}catch(A){if(A.code===Jr.ERROR_CODE_UNRECOGNIZED_CHAIN_ID||A.code===Jr.ERROR_CODE_DEFAULT||((s=(i=A==null?void 0:A.data)==null?void 0:i.originalError)==null?void 0:s.code)===Jr.ERROR_CODE_UNRECOGNIZED_CHAIN_ID)await Zi.addEthereumChain(y,v);else throw new Error("Chain is not supported")}}else if(n===ct.EIP6963_CONNECTOR_ID&&v){const y=t;if(y)try{await y.request({method:"wallet_switchEthereumChain",params:[{chainId:Zi.numberToHexString(v.chainId)}]}),Qe.setChainId(v.chainId)}catch(A){if(A.code===Jr.ERROR_CODE_UNRECOGNIZED_CHAIN_ID||A.code===Jr.ERROR_CODE_DEFAULT||((a=(o=A==null?void 0:A.data)==null?void 0:o.originalError)==null?void 0:a.code)===Jr.ERROR_CODE_UNRECOGNIZED_CHAIN_ID)await Zi.addEthereumChain(y,v);else throw new Error("Chain is not supported")}}else if(n===ct.COINBASE_SDK_CONNECTOR_ID&&v){const y=t;if(y)try{await y.request({method:"wallet_switchEthereumChain",params:[{chainId:Zi.numberToHexString(v.chainId)}]}),Qe.setChainId(v.chainId)}catch(A){if(A.code===Jr.ERROR_CODE_UNRECOGNIZED_CHAIN_ID||A.code===Jr.ERROR_CODE_DEFAULT||((l=(c=A==null?void 0:A.data)==null?void 0:c.originalError)==null?void 0:l.code)===Jr.ERROR_CODE_UNRECOGNIZED_CHAIN_ID)await Zi.addEthereumChain(y,v);else throw new Error("Error switching network")}}else if(n===ct.AUTH_CONNECTOR_ID&&this.authProvider&&v!=null&&v.chainId)try{(h=this.appKit)==null||h.setLoading(!0),await this.authProvider.switchNetwork(v==null?void 0:v.chainId),Qe.setChainId(v.chainId);const{address:y,preferredAccountType:A}=await this.authProvider.connect({chainId:v==null?void 0:v.chainId});Qe.setAddress(y),Qe.setPreferredAccountType(A),await this.syncAccount()}catch{throw new Error("Switching chain failed")}finally{(f=this.appKit)==null||f.setLoading(!1)}}}syncConnectors(e){var i,s,o,a,c,l,h;const t=[],n=As.ConnectorTypesMap[ct.WALLET_CONNECT_CONNECTOR_ID];if(t.push({id:ct.WALLET_CONNECT_CONNECTOR_ID,explorerId:As.ConnectorExplorerIds[ct.WALLET_CONNECT_CONNECTOR_ID],imageId:As.ConnectorImageIds[ct.WALLET_CONNECT_CONNECTOR_ID],imageUrl:(s=(i=this.options)==null?void 0:i.connectorImages)==null?void 0:s[ct.WALLET_CONNECT_CONNECTOR_ID],name:As.ConnectorNamesMap[ct.WALLET_CONNECT_CONNECTOR_ID],type:n,chain:this.chain}),e.injected){const f=As.ConnectorTypesMap[ct.INJECTED_CONNECTOR_ID];t.push({id:ct.INJECTED_CONNECTOR_ID,explorerId:As.ConnectorExplorerIds[ct.INJECTED_CONNECTOR_ID],imageId:As.ConnectorImageIds[ct.INJECTED_CONNECTOR_ID],imageUrl:(a=(o=this.options)==null?void 0:o.connectorImages)==null?void 0:a[ct.INJECTED_CONNECTOR_ID],name:As.ConnectorNamesMap[ct.INJECTED_CONNECTOR_ID],type:f,chain:this.chain})}e.coinbase&&t.push({id:ct.COINBASE_SDK_CONNECTOR_ID,explorerId:As.ConnectorExplorerIds[ct.COINBASE_SDK_CONNECTOR_ID],imageId:As.ConnectorImageIds[ct.COINBASE_SDK_CONNECTOR_ID],imageUrl:(l=(c=this.options)==null?void 0:c.connectorImages)==null?void 0:l[ct.COINBASE_SDK_CONNECTOR_ID],name:As.ConnectorNamesMap[ct.COINBASE_SDK_CONNECTOR_ID],type:"EXTERNAL",chain:this.chain}),(h=this.appKit)==null||h.setConnectors(t)}async syncAuthConnector(e,t){var n,i,s,o;if(typeof window<"u"){this.authProvider=new dae(e),(n=this.appKit)==null||n.addConnector({id:ct.AUTH_CONNECTOR_ID,type:"AUTH",name:"Auth",provider:this.authProvider,email:t==null?void 0:t.email,socials:t==null?void 0:t.socials,showWallets:(t==null?void 0:t.showWallets)===void 0?!0:t.showWallets,chain:this.chain,walletFeatures:t==null?void 0:t.walletFeatures}),(i=this.appKit)==null||i.setLoading(!0);const a=this.authProvider.getLoginEmailUsed();(s=this.appKit)==null||s.setLoading(a);const{isConnected:c}=await this.authProvider.isConnected();c?await this.setAuthProvider():(o=this.appKit)==null||o.setLoading(!1)}}eip6963EventHandler(e){var t,n,i,s;if(e.detail){const{info:o,provider:a}=e.detail,c=(t=this.appKit)==null?void 0:t.getConnectors();if(!(c==null?void 0:c.find(h=>h.name===o.name))){const h=As.ConnectorTypesMap[ct.EIP6963_CONNECTOR_ID];{(s=this.appKit)==null||s.addConnector({id:ct.EIP6963_CONNECTOR_ID,type:h,imageUrl:o.icon??((i=(n=this.options)==null?void 0:n.connectorImages)==null?void 0:i[ct.EIP6963_CONNECTOR_ID]),name:o.name,provider:a,info:o,chain:this.chain});const f={provider:a,info:o};this.EIP6963Providers.push(f)}}}}listenConnectors(e){if(typeof window<"u"&&e){const t=this.eip6963EventHandler.bind(this);window.addEventListener(ct.EIP6963_ANNOUNCE_EVENT,t),window.dispatchEvent(new Event(ct.EIP6963_REQUEST_EVENT))}}}var oq={},ny={},lx={};Object.defineProperty(lx,"__esModule",{value:!0});lx.walletLogo=void 0;const S9e=(r,e)=>{let t;switch(r){case"standard":return t=e,`data:image/svg+xml,%3Csvg width='${e}' height='${t}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `;case"circle":return t=e,`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${e}' height='${t}' viewBox='0 0 999.81 999.81'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052fe;%7D.cls-2%7Bfill:%23fefefe;%7D.cls-3%7Bfill:%230152fe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M655-115.9h56c.83,1.59,2.36.88,3.56,1a478,478,0,0,1,75.06,10.42C891.4-81.76,978.33-32.58,1049.19,44q116.7,126,131.94,297.61c.38,4.14-.34,8.53,1.78,12.45v59c-1.58.84-.91,2.35-1,3.56a482.05,482.05,0,0,1-10.38,74.05c-24,106.72-76.64,196.76-158.83,268.93s-178.18,112.82-287.2,122.6c-4.83.43-9.86-.25-14.51,1.77H654c-1-1.68-2.69-.91-4.06-1a496.89,496.89,0,0,1-105.9-18.59c-93.54-27.42-172.78-77.59-236.91-150.94Q199.34,590.1,184.87,426.58c-.47-5.19.25-10.56-1.77-15.59V355c1.68-1,.91-2.7,1-4.06a498.12,498.12,0,0,1,18.58-105.9c26-88.75,72.64-164.9,140.6-227.57q126-116.27,297.21-131.61C645.32-114.57,650.35-113.88,655-115.9Zm377.92,500c0-192.44-156.31-349.49-347.56-350.15-194.13-.68-350.94,155.13-352.29,347.42-1.37,194.55,155.51,352.1,348.56,352.47C876.15,734.23,1032.93,577.84,1032.93,384.11Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-2' d='M1032.93,384.11c0,193.73-156.78,350.12-351.29,349.74-193-.37-349.93-157.92-348.56-352.47C334.43,189.09,491.24,33.28,685.37,34,876.62,34.62,1032.94,191.67,1032.93,384.11ZM683,496.81q43.74,0,87.48,0c15.55,0,25.32-9.72,25.33-25.21q0-87.48,0-175c0-15.83-9.68-25.46-25.59-25.46H595.77c-15.88,0-25.57,9.64-25.58,25.46q0,87.23,0,174.45c0,16.18,9.59,25.7,25.84,25.71Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-3' d='M683,496.81H596c-16.25,0-25.84-9.53-25.84-25.71q0-87.23,0-174.45c0-15.82,9.7-25.46,25.58-25.46H770.22c15.91,0,25.59,9.63,25.59,25.46q0,87.47,0,175c0,15.49-9.78,25.2-25.33,25.21Q726.74,496.84,683,496.81Z' transform='translate(-183.1 115.9)'/%3E%3C/svg%3E`;case"text":return t=(.1*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${t}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case"textWithLogo":return t=(.25*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${t}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;case"textLight":return t=(.1*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${t}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case"textWithLogoLight":return t=(.25*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${t}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;default:return t=e,`data:image/svg+xml,%3Csvg width='${e}' height='${t}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `}};lx.walletLogo=S9e;var ux={},aq={exports:{}};(function(r){var e=Object.prototype.hasOwnProperty,t="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(t=!1));function i(c,l,h){this.fn=c,this.context=l,this.once=h||!1}function s(c,l,h,f,v){if(typeof h!="function")throw new TypeError("The listener must be a function");var y=new i(h,f||c,v),A=t?t+l:l;return c._events[A]?c._events[A].fn?c._events[A]=[c._events[A],y]:c._events[A].push(y):(c._events[A]=y,c._eventsCount++),c}function o(c,l){--c._eventsCount===0?c._events=new n:delete c._events[l]}function a(){this._events=new n,this._eventsCount=0}a.prototype.eventNames=function(){var l=[],h,f;if(this._eventsCount===0)return l;for(f in h=this._events)e.call(h,f)&&l.push(t?f.slice(1):f);return Object.getOwnPropertySymbols?l.concat(Object.getOwnPropertySymbols(h)):l},a.prototype.listeners=function(l){var h=t?t+l:l,f=this._events[h];if(!f)return[];if(f.fn)return[f.fn];for(var v=0,y=f.length,A=new Array(y);v=-32099&&v<=-32e3}function l(v){return v&&typeof v=="object"&&!Array.isArray(v)?Object.assign({},v):v}function h(v,y){return Object.prototype.hasOwnProperty.call(v,y)}function f(v,y){return typeof v=="object"&&v!==null&&y in v&&typeof v[y]=="string"}})(qT);Object.defineProperty(hx,"__esModule",{value:!0});hx.standardErrors=void 0;const ns=yd,cq=qT;hx.standardErrors={rpc:{parse:r=>za(ns.standardErrorCodes.rpc.parse,r),invalidRequest:r=>za(ns.standardErrorCodes.rpc.invalidRequest,r),invalidParams:r=>za(ns.standardErrorCodes.rpc.invalidParams,r),methodNotFound:r=>za(ns.standardErrorCodes.rpc.methodNotFound,r),internal:r=>za(ns.standardErrorCodes.rpc.internal,r),server:r=>{if(!r||typeof r!="object"||Array.isArray(r))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:e}=r;if(!Number.isInteger(e)||e>-32005||e<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return za(e,r)},invalidInput:r=>za(ns.standardErrorCodes.rpc.invalidInput,r),resourceNotFound:r=>za(ns.standardErrorCodes.rpc.resourceNotFound,r),resourceUnavailable:r=>za(ns.standardErrorCodes.rpc.resourceUnavailable,r),transactionRejected:r=>za(ns.standardErrorCodes.rpc.transactionRejected,r),methodNotSupported:r=>za(ns.standardErrorCodes.rpc.methodNotSupported,r),limitExceeded:r=>za(ns.standardErrorCodes.rpc.limitExceeded,r)},provider:{userRejectedRequest:r=>gg(ns.standardErrorCodes.provider.userRejectedRequest,r),unauthorized:r=>gg(ns.standardErrorCodes.provider.unauthorized,r),unsupportedMethod:r=>gg(ns.standardErrorCodes.provider.unsupportedMethod,r),disconnected:r=>gg(ns.standardErrorCodes.provider.disconnected,r),chainDisconnected:r=>gg(ns.standardErrorCodes.provider.chainDisconnected,r),unsupportedChain:r=>gg(ns.standardErrorCodes.provider.unsupportedChain,r),custom:r=>{if(!r||typeof r!="object"||Array.isArray(r))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:e,message:t,data:n}=r;if(!t||typeof t!="string")throw new Error('"message" must be a nonempty string');return new hq(e,t,n)}}};function za(r,e){const[t,n]=lq(e);return new uq(r,t||(0,cq.getMessageFromCode)(r),n)}function gg(r,e){const[t,n]=lq(e);return new hq(r,t||(0,cq.getMessageFromCode)(r),n)}function lq(r){if(r){if(typeof r=="string")return[r];if(typeof r=="object"&&!Array.isArray(r)){const{message:e,data:t}=r;if(e&&typeof e!="string")throw new Error("Must specify string message.");return[e||void 0,t]}}return[]}class uq extends Error{constructor(e,t,n){if(!Number.isInteger(e))throw new Error('"code" must be an integer.');if(!t||typeof t!="string")throw new Error('"message" must be a nonempty string.');super(t),this.code=e,n!==void 0&&(this.data=n)}}class hq extends uq{constructor(e,t,n){if(!T9e(e))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,t,n)}}function T9e(r){return Number.isInteger(r)&&r>=1e3&&r<=4999}(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.standardErrors=r.standardErrorCodes=void 0;var e=yd;Object.defineProperty(r,"standardErrorCodes",{enumerable:!0,get:function(){return e.standardErrorCodes}});var t=hx;Object.defineProperty(r,"standardErrors",{enumerable:!0,get:function(){return t.standardErrors}})})(th);var dx={},d2={};Object.defineProperty(d2,"__esModule",{value:!0});d2.isErrorResponse=void 0;function R9e(r){return r.errorMessage!==void 0}d2.isErrorResponse=R9e;var $1={};Object.defineProperty($1,"__esModule",{value:!0});$1.LIB_VERSION=void 0;$1.LIB_VERSION="4.0.3";Object.defineProperty(dx,"__esModule",{value:!0});dx.serializeError=void 0;const k9e=d2,N9e=$1,P9e=yd,O9e=qT;function M9e(r,e){const t=(0,O9e.serialize)(D9e(r),{shouldIncludeStack:!0}),n=new URL("https://docs.cloud.coinbase.com/wallet-sdk/docs/errors");n.searchParams.set("version",N9e.LIB_VERSION),n.searchParams.set("code",t.code.toString());const i=$9e(t.data,e);return i&&n.searchParams.set("method",i),n.searchParams.set("message",t.message),Object.assign(Object.assign({},t),{docUrl:n.href})}dx.serializeError=M9e;function D9e(r){return typeof r=="string"?{message:r,code:P9e.standardErrorCodes.rpc.internal}:(0,k9e.isErrorResponse)(r)?Object.assign(Object.assign({},r),{message:r.errorMessage,code:r.errorCode,data:{method:r.method}}):r}function $9e(r,e){const t=r==null?void 0:r.method;if(t)return t;if(e!==void 0){if(typeof e=="string")return e;if(Array.isArray(e)){if(e.length>0)return e[0].method}else return e.method}}var Ts={};Object.defineProperty(Ts,"__esModule",{value:!0});Ts.RegExpString=Ts.IntNumber=Ts.BigIntString=Ts.AddressString=Ts.HexString=Ts.OpaqueType=void 0;function pb(){return r=>r}Ts.OpaqueType=pb;Ts.HexString=pb();Ts.AddressString=pb();Ts.BigIntString=pb();function B9e(r){return Math.floor(r)}Ts.IntNumber=B9e;Ts.RegExpString=pb();var Jt={};Object.defineProperty(Jt,"__esModule",{value:!0});Jt.areAddressArraysEqual=Jt.getFavicon=Jt.range=Jt.isBigNumber=Jt.ensureParsedJSONObject=Jt.ensureBigInt=Jt.ensureRegExpString=Jt.ensureIntNumber=Jt.ensureBuffer=Jt.ensureAddressString=Jt.ensureEvenLengthHexString=Jt.ensureHexString=Jt.isHexString=Jt.prepend0x=Jt.strip0x=Jt.has0xPrefix=Jt.hexStringFromIntNumber=Jt.intNumberFromHexString=Jt.bigIntStringFromBigInt=Jt.hexStringFromBuffer=Jt.hexStringToUint8Array=Jt.uint8ArrayToHex=Jt.randomBytesHex=void 0;const B1=th,uc=Ts,dq=/^[0-9]*$/,fq=/^[a-f0-9]*$/;function L9e(r){return pq(crypto.getRandomValues(new Uint8Array(r)))}Jt.randomBytesHex=L9e;function pq(r){return[...r].map(e=>e.toString(16).padStart(2,"0")).join("")}Jt.uint8ArrayToHex=pq;function U9e(r){return new Uint8Array(r.match(/.{1,2}/g).map(e=>parseInt(e,16)))}Jt.hexStringToUint8Array=U9e;function F9e(r,e=!1){const t=r.toString("hex");return(0,uc.HexString)(e?`0x${t}`:t)}Jt.hexStringFromBuffer=F9e;function j9e(r){return(0,uc.BigIntString)(r.toString(10))}Jt.bigIntStringFromBigInt=j9e;function H9e(r){return(0,uc.IntNumber)(Number(BigInt(mb(r,!0))))}Jt.intNumberFromHexString=H9e;function W9e(r){return(0,uc.HexString)(`0x${BigInt(r).toString(16)}`)}Jt.hexStringFromIntNumber=W9e;function KT(r){return r.startsWith("0x")||r.startsWith("0X")}Jt.has0xPrefix=KT;function fx(r){return KT(r)?r.slice(2):r}Jt.strip0x=fx;function gq(r){return KT(r)?`0x${r.slice(2)}`:`0x${r}`}Jt.prepend0x=gq;function gb(r){if(typeof r!="string")return!1;const e=fx(r).toLowerCase();return fq.test(e)}Jt.isHexString=gb;function mq(r,e=!1){if(typeof r=="string"){const t=fx(r).toLowerCase();if(fq.test(t))return(0,uc.HexString)(e?`0x${t}`:t)}throw B1.standardErrors.rpc.invalidParams(`"${String(r)}" is not a hexadecimal string`)}Jt.ensureHexString=mq;function mb(r,e=!1){let t=mq(r,!1);return t.length%2===1&&(t=(0,uc.HexString)(`0${t}`)),e?(0,uc.HexString)(`0x${t}`):t}Jt.ensureEvenLengthHexString=mb;function z9e(r){if(typeof r=="string"){const e=fx(r).toLowerCase();if(gb(e)&&e.length===40)return(0,uc.AddressString)(gq(e))}throw B1.standardErrors.rpc.invalidParams(`Invalid Ethereum address: ${String(r)}`)}Jt.ensureAddressString=z9e;function V9e(r){if(Buffer.isBuffer(r))return r;if(typeof r=="string"){if(gb(r)){const e=mb(r,!1);return Buffer.from(e,"hex")}return Buffer.from(r,"utf8")}throw B1.standardErrors.rpc.invalidParams(`Not binary data: ${String(r)}`)}Jt.ensureBuffer=V9e;function wq(r){if(typeof r=="number"&&Number.isInteger(r))return(0,uc.IntNumber)(r);if(typeof r=="string"){if(dq.test(r))return(0,uc.IntNumber)(Number(r));if(gb(r))return(0,uc.IntNumber)(Number(BigInt(mb(r,!0))))}throw B1.standardErrors.rpc.invalidParams(`Not an integer: ${String(r)}`)}Jt.ensureIntNumber=wq;function q9e(r){if(r instanceof RegExp)return(0,uc.RegExpString)(r.toString());throw B1.standardErrors.rpc.invalidParams(`Not a RegExp: ${String(r)}`)}Jt.ensureRegExpString=q9e;function K9e(r){if(r!==null&&(typeof r=="bigint"||vq(r)))return BigInt(r.toString(10));if(typeof r=="number")return BigInt(wq(r));if(typeof r=="string"){if(dq.test(r))return BigInt(r);if(gb(r))return BigInt(mb(r,!0))}throw B1.standardErrors.rpc.invalidParams(`Not an integer: ${String(r)}`)}Jt.ensureBigInt=K9e;function G9e(r){if(typeof r=="string")return JSON.parse(r);if(typeof r=="object")return r;throw B1.standardErrors.rpc.invalidParams(`Not a JSON string or an object: ${String(r)}`)}Jt.ensureParsedJSONObject=G9e;function vq(r){if(r==null||typeof r.constructor!="function")return!1;const{constructor:e}=r;return typeof e.config=="function"&&typeof e.EUCLID=="number"}Jt.isBigNumber=vq;function Z9e(r,e){return Array.from({length:e-r},(t,n)=>r+n)}Jt.range=Z9e;function Y9e(){const r=document.querySelector('link[sizes="192x192"]')||document.querySelector('link[sizes="180x180"]')||document.querySelector('link[rel="icon"]')||document.querySelector('link[rel="shortcut icon"]'),{protocol:e,host:t}=document.location,n=r?r.getAttribute("href"):null;return!n||n.startsWith("javascript:")||n.startsWith("vbscript:")?null:n.startsWith("http://")||n.startsWith("https://")||n.startsWith("data:")?n:n.startsWith("//")?e+n:`${e}//${t}${n}`}Jt.getFavicon=Y9e;function Q9e(r,e){return r.length===e.length&&r.every((t,n)=>t===e[n])}Jt.areAddressArraysEqual=Q9e;var du={},px={},gx={},Oi={};Object.defineProperty(Oi,"__esModule",{value:!0});Oi.decryptContent=Oi.encryptContent=Oi.importKeyFromHexString=Oi.exportKeyToHexString=Oi.decrypt=Oi.encrypt=Oi.deriveSharedSecret=Oi.generateKeyPair=void 0;const yq=Jt;async function J9e(){return crypto.subtle.generateKey({name:"ECDH",namedCurve:"P-256"},!0,["deriveKey"])}Oi.generateKeyPair=J9e;async function X9e(r,e){return crypto.subtle.deriveKey({name:"ECDH",public:e},r,{name:"AES-GCM",length:256},!1,["encrypt","decrypt"])}Oi.deriveSharedSecret=X9e;async function bq(r,e){const t=crypto.getRandomValues(new Uint8Array(12)),n=await crypto.subtle.encrypt({name:"AES-GCM",iv:t},r,new TextEncoder().encode(e));return{iv:t,cipherText:n}}Oi.encrypt=bq;async function _q(r,{iv:e,cipherText:t}){const n=await crypto.subtle.decrypt({name:"AES-GCM",iv:e},r,t);return new TextDecoder().decode(n)}Oi.decrypt=_q;function xq(r){switch(r){case"public":return"spki";case"private":return"pkcs8"}}async function eCe(r,e){const t=xq(r),n=await crypto.subtle.exportKey(t,e);return(0,yq.uint8ArrayToHex)(new Uint8Array(n))}Oi.exportKeyToHexString=eCe;async function tCe(r,e){const t=xq(r),n=(0,yq.hexStringToUint8Array)(e).buffer;return await crypto.subtle.importKey(t,n,{name:"ECDH",namedCurve:"P-256"},!0,r==="private"?["deriveKey"]:[])}Oi.importKeyFromHexString=tCe;async function rCe(r,e){const t=JSON.stringify(r,(n,i)=>{if(!(i instanceof Error))return i;const s=i;return Object.assign(Object.assign({},s.code?{code:s.code}:{}),{message:s.message})});return bq(e,t)}Oi.encryptContent=rCe;async function nCe(r,e){return JSON.parse(await _q(e,r))}Oi.decryptContent=nCe;var rh={};Object.defineProperty(rh,"__esModule",{value:!0});rh.ScopedLocalStorage=void 0;class O8{constructor(e,t){this.scope=e,this.module=t}setItem(e,t){localStorage.setItem(this.scopedKey(e),t)}getItem(e){return localStorage.getItem(this.scopedKey(e))}removeItem(e){localStorage.removeItem(this.scopedKey(e))}clear(){const e=this.scopedKey(""),t=[];for(let n=0;nlocalStorage.removeItem(n))}scopedKey(e){return`-${this.scope}${this.module?`:${this.module}`:""}:${e}`}static clearAll(){new O8("CBWSDK").clear(),new O8("walletlink").clear()}}rh.ScopedLocalStorage=O8;Object.defineProperty(gx,"__esModule",{value:!0});gx.SCWKeyManager=void 0;const d4=Oi,iCe=rh,V7={storageKey:"ownPrivateKey",keyType:"private"},q7={storageKey:"ownPublicKey",keyType:"public"},K7={storageKey:"peerPublicKey",keyType:"public"};class sCe{constructor(){this.storage=new iCe.ScopedLocalStorage("CBWSDK","SCWKeyManager"),this.ownPrivateKey=null,this.ownPublicKey=null,this.peerPublicKey=null,this.sharedSecret=null}async getOwnPublicKey(){return await this.loadKeysIfNeeded(),this.ownPublicKey}async getSharedSecret(){return await this.loadKeysIfNeeded(),this.sharedSecret}async setPeerPublicKey(e){this.sharedSecret=null,this.peerPublicKey=e,await this.storeKey(K7,e),await this.loadKeysIfNeeded()}async clear(){this.ownPrivateKey=null,this.ownPublicKey=null,this.peerPublicKey=null,this.sharedSecret=null,this.storage.removeItem(q7.storageKey),this.storage.removeItem(V7.storageKey),this.storage.removeItem(K7.storageKey)}async generateKeyPair(){const e=await(0,d4.generateKeyPair)();this.ownPrivateKey=e.privateKey,this.ownPublicKey=e.publicKey,await this.storeKey(V7,e.privateKey),await this.storeKey(q7,e.publicKey)}async loadKeysIfNeeded(){if(this.ownPrivateKey===null&&(this.ownPrivateKey=await this.loadKey(V7)),this.ownPublicKey===null&&(this.ownPublicKey=await this.loadKey(q7)),(this.ownPrivateKey===null||this.ownPublicKey===null)&&await this.generateKeyPair(),this.peerPublicKey===null&&(this.peerPublicKey=await this.loadKey(K7)),this.sharedSecret===null){if(this.ownPrivateKey===null||this.peerPublicKey===null)return;this.sharedSecret=await(0,d4.deriveSharedSecret)(this.ownPrivateKey,this.peerPublicKey)}}async loadKey(e){const t=this.storage.getItem(e.storageKey);return t?(0,d4.importKeyFromHexString)(e.keyType,t):null}async storeKey(e,t){const n=await(0,d4.exportKeyToHexString)(e.keyType,t);this.storage.setItem(e.storageKey,n)}}gx.SCWKeyManager=sCe;var mx={};Object.defineProperty(mx,"__esModule",{value:!0});mx.SCWStateManager=void 0;const oCe=rh,gB="accounts",mB="activeChain",wB="availableChains",vB="walletCapabilities";class aCe{get accounts(){return this._accounts}get activeChain(){return this._activeChain}get walletCapabilities(){return this._walletCapabilities}constructor(e){var t,n;this.storage=new oCe.ScopedLocalStorage("CBWSDK","SCWStateManager"),this.updateListener=e.updateListener,this.availableChains=this.loadItemFromStorage(wB),this._walletCapabilities=this.loadItemFromStorage(vB);const i=this.loadItemFromStorage(gB),s=this.loadItemFromStorage(mB);i&&this.updateListener.onAccountsUpdate({accounts:i,source:"storage"}),s&&this.updateListener.onChainUpdate({chain:s,source:"storage"}),this._accounts=i||[],this._activeChain=s||{id:(n=(t=e.appChainIds)===null||t===void 0?void 0:t[0])!==null&&n!==void 0?n:1}}updateAccounts(e){this._accounts=e,this.storeItemToStorage(gB,e),this.updateListener.onAccountsUpdate({accounts:e,source:"wallet"})}switchChain(e){var t;const n=(t=this.availableChains)===null||t===void 0?void 0:t.find(i=>i.id===e);return n?(n===this._activeChain||(this._activeChain=n,this.storeItemToStorage(mB,n),this.updateListener.onChainUpdate({chain:n,source:"wallet"})),!0):!1}updateAvailableChains(e){if(!e||Object.keys(e).length===0)return;const t=Object.entries(e).map(([n,i])=>({id:Number(n),rpcUrl:i}));this.availableChains=t,this.storeItemToStorage(wB,t),this.switchChain(this._activeChain.id)}updateWalletCapabilities(e){this._walletCapabilities=e,this.storeItemToStorage(vB,e)}storeItemToStorage(e,t){this.storage.setItem(e,JSON.stringify(t))}loadItemFromStorage(e){const t=this.storage.getItem(e);return t?JSON.parse(t):void 0}clear(){this.storage.clear()}}mx.SCWStateManager=aCe;Object.defineProperty(px,"__esModule",{value:!0});px.SCWSigner=void 0;const cCe=gx,lCe=mx,f4=th,yB=Jt,p4=Oi;class uCe{constructor(e){this.metadata=e.metadata,this.communicator=e.communicator,this.keyManager=new cCe.SCWKeyManager,this.stateManager=new lCe.SCWStateManager({appChainIds:this.metadata.appChainIds,updateListener:e.updateListener}),this.handshake=this.handshake.bind(this),this.request=this.request.bind(this),this.createRequestMessage=this.createRequestMessage.bind(this),this.decryptResponseMessage=this.decryptResponseMessage.bind(this)}async handshake(){const e=await this.createRequestMessage({handshake:{method:"eth_requestAccounts",params:this.metadata}}),t=await this.communicator.postRequestAndWaitForResponse(e);if("failure"in t.content)throw t.content.failure;const n=await(0,p4.importKeyFromHexString)("public",t.sender);await this.keyManager.setPeerPublicKey(n);const i=await this.decryptResponseMessage(t);this.updateInternalState({method:"eth_requestAccounts"},i);const s=i.result;if("error"in s)throw s.error;return this.stateManager.accounts}async request(e){const t=this.tryLocalHandling(e);if(t!==void 0){if(t instanceof Error)throw t;return t}await this.communicator.waitForPopupLoaded();const n=await this.sendEncryptedRequest(e),i=await this.decryptResponseMessage(n);this.updateInternalState(e,i);const s=i.result;if("error"in s)throw s.error;return s.value}async disconnect(){this.stateManager.clear(),await this.keyManager.clear()}tryLocalHandling(e){var t;switch(e.method){case"wallet_switchEthereumChain":{const n=e.params;if(!n||!(!((t=n[0])===null||t===void 0)&&t.chainId))throw f4.standardErrors.rpc.invalidParams();const i=(0,yB.ensureIntNumber)(n[0].chainId);return this.stateManager.switchChain(i)?null:void 0}case"wallet_getCapabilities":{const n=this.stateManager.walletCapabilities;if(!n)throw f4.standardErrors.provider.unauthorized("No wallet capabilities found, please disconnect and reconnect");return n}default:return}}async sendEncryptedRequest(e){const t=await this.keyManager.getSharedSecret();if(!t)throw f4.standardErrors.provider.unauthorized("No valid session found, try requestAccounts before other methods");const n=await(0,p4.encryptContent)({action:e,chainId:this.stateManager.activeChain.id},t),i=await this.createRequestMessage({encrypted:n});return this.communicator.postRequestAndWaitForResponse(i)}async createRequestMessage(e){const t=await(0,p4.exportKeyToHexString)("public",await this.keyManager.getOwnPublicKey());return{id:crypto.randomUUID(),sender:t,content:e,timestamp:new Date}}async decryptResponseMessage(e){const t=e.content;if("failure"in t)throw t.failure;const n=await this.keyManager.getSharedSecret();if(!n)throw f4.standardErrors.provider.unauthorized("Invalid session");return(0,p4.decryptContent)(t.encrypted,n)}updateInternalState(e,t){var n,i;const s=(n=t.data)===null||n===void 0?void 0:n.chains;s&&this.stateManager.updateAvailableChains(s);const o=(i=t.data)===null||i===void 0?void 0:i.capabilities;o&&this.stateManager.updateWalletCapabilities(o);const a=t.result;if(!("error"in a))switch(e.method){case"eth_requestAccounts":{const c=a.value;this.stateManager.updateAccounts(c);break}case"wallet_switchEthereumChain":{if(a.value!==null)return;const c=e.params,l=(0,yB.ensureIntNumber)(c[0].chainId);this.stateManager.switchChain(l);break}}}}px.SCWSigner=uCe;var wx={},CS={exports:{}},Aq=mo.EventEmitter,G7,bB;function hCe(){if(bB)return G7;bB=1;function r(A,M){var $=Object.keys(A);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(A);M&&(L=L.filter(function(P){return Object.getOwnPropertyDescriptor(A,P).enumerable})),$.push.apply($,L)}return $}function e(A){for(var M=1;M0?this.tail.next=L:this.head=L,this.tail=L,++this.length}},{key:"unshift",value:function($){var L={data:$,next:this.head};this.length===0&&(this.tail=L),this.head=L,++this.length}},{key:"shift",value:function(){if(this.length!==0){var $=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,$}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function($){if(this.length===0)return"";for(var L=this.head,P=""+L.data;L=L.next;)P+=$+L.data;return P}},{key:"concat",value:function($){if(this.length===0)return l.alloc(0);for(var L=l.allocUnsafe($>>>0),P=this.head,H=0;P;)y(P.data,L,H),H+=P.data.length,P=P.next;return L}},{key:"consume",value:function($,L){var P;return $F.length?F.length:$;if(q===F.length?H+=F:H+=F.slice(0,$),$-=q,$===0){q===F.length?(++P,L.next?this.head=L.next:this.head=this.tail=null):(this.head=L,L.data=F.slice(q));break}++P}return this.length-=P,H}},{key:"_getBuffer",value:function($){var L=l.allocUnsafe($),P=this.head,H=1;for(P.data.copy(L),$-=P.data.length;P=P.next;){var F=P.data,q=$>F.length?F.length:$;if(F.copy(L,L.length-$,0,q),$-=q,$===0){q===F.length?(++H,P.next?this.head=P.next:this.head=this.tail=null):(this.head=P,P.data=F.slice(q));break}++H}return this.length-=H,L}},{key:v,value:function($,L){return f(this,e(e({},L),{},{depth:0,customInspect:!1}))}}]),A}(),G7}function dCe(r,e){var t=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(e?e(r):r&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(SS,this,r)):process.nextTick(SS,this,r)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(r||null,function(s){!e&&s?t._writableState?t._writableState.errorEmitted?process.nextTick(X4,t):(t._writableState.errorEmitted=!0,process.nextTick(_B,t,s)):process.nextTick(_B,t,s):e?(process.nextTick(X4,t),e(s)):process.nextTick(X4,t)}),this)}function _B(r,e){SS(r,e),X4(r)}function X4(r){r._writableState&&!r._writableState.emitClose||r._readableState&&!r._readableState.emitClose||r.emit("close")}function fCe(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function SS(r,e){r.emit("error",e)}function pCe(r,e){var t=r._readableState,n=r._writableState;t&&t.autoDestroy||n&&n.autoDestroy?r.destroy(e):r.emit("error",e)}var Eq={destroy:dCe,undestroy:fCe,errorOrDestroy:pCe},L1={};function gCe(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.__proto__=e}var Cq={};function vc(r,e,t){t||(t=Error);function n(s,o,a){return typeof e=="string"?e:e(s,o,a)}var i=function(s){gCe(o,s);function o(a,c,l){return s.call(this,n(a,c,l))||this}return o}(t);i.prototype.name=t.name,i.prototype.code=r,Cq[r]=i}function xB(r,e){if(Array.isArray(r)){var t=r.length;return r=r.map(function(n){return String(n)}),t>2?"one of ".concat(e," ").concat(r.slice(0,t-1).join(", "),", or ")+r[t-1]:t===2?"one of ".concat(e," ").concat(r[0]," or ").concat(r[1]):"of ".concat(e," ").concat(r[0])}else return"of ".concat(e," ").concat(String(r))}function mCe(r,e,t){return r.substr(0,e.length)===e}function wCe(r,e,t){return(t===void 0||t>r.length)&&(t=r.length),r.substring(t-e.length,t)===e}function vCe(r,e,t){return typeof t!="number"&&(t=0),t+e.length>r.length?!1:r.indexOf(e,t)!==-1}vc("ERR_INVALID_OPT_VALUE",function(r,e){return'The value "'+e+'" is invalid for option "'+r+'"'},TypeError);vc("ERR_INVALID_ARG_TYPE",function(r,e,t){var n;typeof e=="string"&&mCe(e,"not ")?(n="must not be",e=e.replace(/^not /,"")):n="must be";var i;if(wCe(r," argument"))i="The ".concat(r," ").concat(n," ").concat(xB(e,"type"));else{var s=vCe(r,".")?"property":"argument";i='The "'.concat(r,'" ').concat(s," ").concat(n," ").concat(xB(e,"type"))}return i+=". Received type ".concat(typeof t),i},TypeError);vc("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");vc("ERR_METHOD_NOT_IMPLEMENTED",function(r){return"The "+r+" method is not implemented"});vc("ERR_STREAM_PREMATURE_CLOSE","Premature close");vc("ERR_STREAM_DESTROYED",function(r){return"Cannot call "+r+" after a stream was destroyed"});vc("ERR_MULTIPLE_CALLBACK","Callback called multiple times");vc("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");vc("ERR_STREAM_WRITE_AFTER_END","write after end");vc("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);vc("ERR_UNKNOWN_ENCODING",function(r){return"Unknown encoding: "+r},TypeError);vc("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");L1.codes=Cq;var yCe=L1.codes.ERR_INVALID_OPT_VALUE;function bCe(r,e,t){return r.highWaterMark!=null?r.highWaterMark:e?r[t]:null}function _Ce(r,e,t,n){var i=bCe(e,n,t);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var s=n?t:"highWaterMark";throw new yCe(s,i)}return Math.floor(i)}return r.objectMode?16:16*1024}var Sq={getHighWaterMark:_Ce},IS={exports:{}};typeof Object.create=="function"?IS.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:IS.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}};var Il=IS.exports,xCe=ACe;function ACe(r,e){if(Z7("noDeprecation"))return r;var t=!1;function n(){if(!t){if(Z7("throwDeprecation"))throw new Error(e);Z7("traceDeprecation")?console.trace(e):console.warn(e),t=!0}return r.apply(this,arguments)}return n}function Z7(r){try{if(!Yr.localStorage)return!1}catch{return!1}var e=Yr.localStorage[r];return e==null?!1:String(e).toLowerCase()==="true"}var Y7,AB;function Iq(){if(AB)return Y7;AB=1,Y7=T;function r(Z){var k=this;this.next=null,this.entry=null,this.finish=function(){x(k,Z)}}var e;T.WritableState=Y;var t={deprecate:xCe},n=Aq,i=Vw.Buffer,s=(typeof Yr<"u"?Yr:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function o(Z){return i.from(Z)}function a(Z){return i.isBuffer(Z)||Z instanceof s}var c=Eq,l=Sq,h=l.getHighWaterMark,f=L1.codes,v=f.ERR_INVALID_ARG_TYPE,y=f.ERR_METHOD_NOT_IMPLEMENTED,A=f.ERR_MULTIPLE_CALLBACK,M=f.ERR_STREAM_CANNOT_PIPE,$=f.ERR_STREAM_DESTROYED,L=f.ERR_STREAM_NULL_VALUES,P=f.ERR_STREAM_WRITE_AFTER_END,H=f.ERR_UNKNOWN_ENCODING,F=c.errorOrDestroy;Il(T,n);function q(){}function Y(Z,k,W){e=e||jw(),Z=Z||{},typeof W!="boolean"&&(W=k instanceof e),this.objectMode=!!Z.objectMode,W&&(this.objectMode=this.objectMode||!!Z.writableObjectMode),this.highWaterMark=h(this,Z,"writableHighWaterMark",W),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var J=Z.decodeStrings===!1;this.decodeStrings=!J,this.defaultEncoding=Z.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(S){b(k,S)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=Z.emitClose!==!1,this.autoDestroy=!!Z.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new r(this)}Y.prototype.getBuffer=function(){for(var k=this.bufferedRequest,W=[];k;)W.push(k),k=k.next;return W},function(){try{Object.defineProperty(Y.prototype,"buffer",{get:t.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var I;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(I=Function.prototype[Symbol.hasInstance],Object.defineProperty(T,Symbol.hasInstance,{value:function(k){return I.call(this,k)?!0:this!==T?!1:k&&k._writableState instanceof Y}})):I=function(k){return k instanceof this};function T(Z){e=e||jw();var k=this instanceof e;if(!k&&!I.call(T,this))return new T(Z);this._writableState=new Y(Z,this,k),this.writable=!0,Z&&(typeof Z.write=="function"&&(this._write=Z.write),typeof Z.writev=="function"&&(this._writev=Z.writev),typeof Z.destroy=="function"&&(this._destroy=Z.destroy),typeof Z.final=="function"&&(this._final=Z.final)),n.call(this)}T.prototype.pipe=function(){F(this,new M)};function V(Z,k){var W=new P;F(Z,W),process.nextTick(k,W)}function Q(Z,k,W,J){var S;return W===null?S=new L:typeof W!="string"&&!k.objectMode&&(S=new v("chunk",["string","Buffer"],W)),S?(F(Z,S),process.nextTick(J,S),!1):!0}T.prototype.write=function(Z,k,W){var J=this._writableState,S=!1,D=!J.objectMode&&a(Z);return D&&!i.isBuffer(Z)&&(Z=o(Z)),typeof k=="function"&&(W=k,k=null),D?k="buffer":k||(k=J.defaultEncoding),typeof W!="function"&&(W=q),J.ending?V(this,W):(D||Q(this,J,Z,W))&&(J.pendingcb++,S=oe(this,J,D,Z,k,W)),S},T.prototype.cork=function(){this._writableState.corked++},T.prototype.uncork=function(){var Z=this._writableState;Z.corked&&(Z.corked--,!Z.writing&&!Z.corked&&!Z.bufferProcessing&&Z.bufferedRequest&&B(this,Z))},T.prototype.setDefaultEncoding=function(k){if(typeof k=="string"&&(k=k.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((k+"").toLowerCase())>-1))throw new H(k);return this._writableState.defaultEncoding=k,this},Object.defineProperty(T.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function te(Z,k,W){return!Z.objectMode&&Z.decodeStrings!==!1&&typeof k=="string"&&(k=i.from(k,W)),k}Object.defineProperty(T.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function oe(Z,k,W,J,S,D){if(!W){var G=te(k,J,S);J!==G&&(W=!0,S="buffer",J=G)}var z=k.objectMode?1:J.length;k.length+=z;var K=k.length */(function(r,e){var t=Vw,n=t.Buffer;function i(o,a){for(var c in o)a[c]=o[c]}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?r.exports=t:(i(t,e),e.Buffer=s);function s(o,a,c){return n(o,a,c)}s.prototype=Object.create(n.prototype),i(n,s),s.from=function(o,a,c){if(typeof o=="number")throw new TypeError("Argument must not be a number");return n(o,a,c)},s.alloc=function(o,a,c){if(typeof o!="number")throw new TypeError("Argument must be a number");var l=n(o);return a!==void 0?typeof c=="string"?l.fill(a,c):l.fill(a):l.fill(0),l},s.allocUnsafe=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return n(o)},s.allocUnsafeSlow=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return t.SlowBuffer(o)}})(TS,TS.exports);var p0=TS.exports,CB;function SB(){if(CB)return J7;CB=1;var r=p0.Buffer,e=r.isEncoding||function(L){switch(L=""+L,L&&L.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function t(L){if(!L)return"utf8";for(var P;;)switch(L){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return L;default:if(P)return;L=(""+L).toLowerCase(),P=!0}}function n(L){var P=t(L);if(typeof P!="string"&&(r.isEncoding===e||!e(L)))throw new Error("Unknown encoding: "+L);return P||L}J7.StringDecoder=i;function i(L){this.encoding=n(L);var P;switch(this.encoding){case"utf16le":this.text=f,this.end=v,P=4;break;case"utf8":this.fillLast=c,P=4;break;case"base64":this.text=y,this.end=A,P=3;break;default:this.write=M,this.end=$;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(P)}i.prototype.write=function(L){if(L.length===0)return"";var P,H;if(this.lastNeed){if(P=this.fillLast(L),P===void 0)return"";H=this.lastNeed,this.lastNeed=0}else H=0;return H>5===6?2:L>>4===14?3:L>>3===30?4:L>>6===2?-1:-2}function o(L,P,H){var F=P.length-1;if(F=0?(q>0&&(L.lastNeed=q-1),q):--F=0?(q>0&&(L.lastNeed=q-2),q):--F=0?(q>0&&(q===2?q=0:L.lastNeed=q-3),q):0))}function a(L,P,H){if((P[0]&192)!==128)return L.lastNeed=0,"�";if(L.lastNeed>1&&P.length>1){if((P[1]&192)!==128)return L.lastNeed=1,"�";if(L.lastNeed>2&&P.length>2&&(P[2]&192)!==128)return L.lastNeed=2,"�"}}function c(L){var P=this.lastTotal-this.lastNeed,H=a(this,L);if(H!==void 0)return H;if(this.lastNeed<=L.length)return L.copy(this.lastChar,P,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);L.copy(this.lastChar,P,0,L.length),this.lastNeed-=L.length}function l(L,P){var H=o(this,L,P);if(!this.lastNeed)return L.toString("utf8",P);this.lastTotal=H;var F=L.length-(H-this.lastNeed);return L.copy(this.lastChar,0,F),L.toString("utf8",P,F)}function h(L){var P=L&&L.length?this.write(L):"";return this.lastNeed?P+"�":P}function f(L,P){if((L.length-P)%2===0){var H=L.toString("utf16le",P);if(H){var F=H.charCodeAt(H.length-1);if(F>=55296&&F<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=L[L.length-2],this.lastChar[1]=L[L.length-1],H.slice(0,-1)}return H}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=L[L.length-1],L.toString("utf16le",P,L.length-1)}function v(L){var P=L&&L.length?this.write(L):"";if(this.lastNeed){var H=this.lastTotal-this.lastNeed;return P+this.lastChar.toString("utf16le",0,H)}return P}function y(L,P){var H=(L.length-P)%3;return H===0?L.toString("base64",P):(this.lastNeed=3-H,this.lastTotal=3,H===1?this.lastChar[0]=L[L.length-1]:(this.lastChar[0]=L[L.length-2],this.lastChar[1]=L[L.length-1]),L.toString("base64",P,L.length-H))}function A(L){var P=L&&L.length?this.write(L):"";return this.lastNeed?P+this.lastChar.toString("base64",0,3-this.lastNeed):P}function M(L){return L.toString(this.encoding)}function $(L){return L&&L.length?this.write(L):""}return J7}var IB=L1.codes.ERR_STREAM_PREMATURE_CLOSE;function ECe(r){var e=!1;return function(){if(!e){e=!0;for(var t=arguments.length,n=new Array(t),i=0;i0)if(typeof G!="string"&&!ye.objectMode&&Object.getPrototypeOf(G)!==n.prototype&&(G=s(G)),K)ye.endEmitted?q(D,new L):te(D,ye,G,!0);else if(ye.ended)q(D,new M);else{if(ye.destroyed)return!1;ye.reading=!1,ye.decoder&&!z?(G=ye.decoder.write(G),ye.objectMode||G.length!==0?te(D,ye,G,!1):B(D,ye)):te(D,ye,G,!1)}else K||(ye.reading=!1,B(D,ye))}return!ye.ended&&(ye.length=d?D=d:(D--,D|=D>>>1,D|=D>>>2,D|=D>>>4,D|=D>>>8,D|=D>>>16,D++),D}function m(D,G){return D<=0||G.length===0&&G.ended?0:G.objectMode?1:D!==D?G.flowing&&G.length?G.buffer.head.data.length:G.length:(D>G.highWaterMark&&(G.highWaterMark=g(D)),D<=G.length?D:G.ended?G.length:(G.needReadable=!0,0))}V.prototype.read=function(D){c("read",D),D=parseInt(D,10);var G=this._readableState,z=D;if(D!==0&&(G.emittedReadable=!1),D===0&&G.needReadable&&((G.highWaterMark!==0?G.length>=G.highWaterMark:G.length>0)||G.ended))return c("read: emitReadable",G.length,G.ended),G.length===0&&G.ended?W(this):E(this),null;if(D=m(D,G),D===0&&G.ended)return G.length===0&&W(this),null;var K=G.needReadable;c("need readable",K),(G.length===0||G.length-D0?ue=k(D,G):ue=null,ue===null?(G.needReadable=G.length<=G.highWaterMark,D=0):(G.length-=D,G.awaitDrain=0),G.length===0&&(G.ended||(G.needReadable=!0),z!==D&&G.ended&&W(this)),ue!==null&&this.emit("data",ue),ue};function b(D,G){if(c("onEofChunk"),!G.ended){if(G.decoder){var z=G.decoder.end();z&&z.length&&(G.buffer.push(z),G.length+=G.objectMode?1:z.length)}G.ended=!0,G.sync?E(D):(G.needReadable=!1,G.emittedReadable||(G.emittedReadable=!0,C(D)))}}function E(D){var G=D._readableState;c("emitReadable",G.needReadable,G.emittedReadable),G.needReadable=!1,G.emittedReadable||(c("emitReadable",G.flowing),G.emittedReadable=!0,process.nextTick(C,D))}function C(D){var G=D._readableState;c("emitReadable_",G.destroyed,G.length,G.ended),!G.destroyed&&(G.length||G.ended)&&(D.emit("readable"),G.emittedReadable=!1),G.needReadable=!G.flowing&&!G.ended&&G.length<=G.highWaterMark,Z(D)}function B(D,G){G.readingMore||(G.readingMore=!0,process.nextTick(R,D,G))}function R(D,G){for(;!G.reading&&!G.ended&&(G.length1&&S(K.pipes,D)!==-1)&&!Ie&&(c("false write response, pause",K.awaitDrain),K.awaitDrain++),z.pause())}function $e(X){c("onerror",X),Ue(),D.removeListener("error",$e),e(D,"error")===0&&q(D,X)}I(D,"error",$e);function We(){D.removeListener("finish",Ne),Ue()}D.once("close",We);function Ne(){c("onfinish"),D.removeListener("close",We),Ue()}D.once("finish",Ne);function Ue(){c("unpipe"),z.unpipe(D)}return D.emit("pipe",z),K.flowing||(c("pipe resume"),z.resume()),D};function w(D){return function(){var z=D._readableState;c("pipeOnDrain",z.awaitDrain),z.awaitDrain&&z.awaitDrain--,z.awaitDrain===0&&e(D,"data")&&(z.flowing=!0,Z(D))}}V.prototype.unpipe=function(D){var G=this._readableState,z={hasUnpiped:!1};if(G.pipesCount===0)return this;if(G.pipesCount===1)return D&&D!==G.pipes?this:(D||(D=G.pipes),G.pipes=null,G.pipesCount=0,G.flowing=!1,D&&D.emit("unpipe",this,z),this);if(!D){var K=G.pipes,ue=G.pipesCount;G.pipes=null,G.pipesCount=0,G.flowing=!1;for(var ye=0;ye0,K.flowing!==!1&&this.resume()):D==="readable"&&!K.endEmitted&&!K.readableListening&&(K.readableListening=K.needReadable=!0,K.flowing=!1,K.emittedReadable=!1,c("on readable",K.length,K.reading),K.length?E(this):K.reading||process.nextTick(pe,this)),z},V.prototype.addListener=V.prototype.on,V.prototype.removeListener=function(D,G){var z=t.prototype.removeListener.call(this,D,G);return D==="readable"&&process.nextTick(O,this),z},V.prototype.removeAllListeners=function(D){var G=t.prototype.removeAllListeners.apply(this,arguments);return(D==="readable"||D===void 0)&&process.nextTick(O,this),G};function O(D){var G=D._readableState;G.readableListening=D.listenerCount("readable")>0,G.resumeScheduled&&!G.paused?G.flowing=!0:D.listenerCount("data")>0&&D.resume()}function pe(D){c("readable nexttick read 0"),D.read(0)}V.prototype.resume=function(){var D=this._readableState;return D.flowing||(c("resume"),D.flowing=!D.readableListening,be(this,D)),D.paused=!1,this};function be(D,G){G.resumeScheduled||(G.resumeScheduled=!0,process.nextTick(x,D,G))}function x(D,G){c("resume",G.reading),G.reading||D.read(0),G.resumeScheduled=!1,D.emit("resume"),Z(D),G.flowing&&!G.reading&&D.read(0)}V.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function Z(D){var G=D._readableState;for(c("flow",G.flowing);G.flowing&&D.read()!==null;);}V.prototype.wrap=function(D){var G=this,z=this._readableState,K=!1;D.on("end",function(){if(c("wrapped end"),z.decoder&&!z.ended){var we=z.decoder.end();we&&we.length&&G.push(we)}G.push(null)}),D.on("data",function(we){if(c("wrapped data"),z.decoder&&(we=z.decoder.write(we)),!(z.objectMode&&we==null)&&!(!z.objectMode&&(!we||!we.length))){var je=G.push(we);je||(K=!0,D.pause())}});for(var ue in D)this[ue]===void 0&&typeof D[ue]=="function"&&(this[ue]=function(je){return function(){return D[je].apply(D,arguments)}}(ue));for(var ye=0;ye=G.length?(G.decoder?z=G.buffer.join(""):G.buffer.length===1?z=G.buffer.first():z=G.buffer.concat(G.length),G.buffer.clear()):z=G.buffer.consume(D,G.decoder),z}function W(D){var G=D._readableState;c("endReadable",G.endEmitted),G.endEmitted||(G.ended=!0,process.nextTick(J,G,D))}function J(D,G){if(c("endReadableNT",D.endEmitted,D.length),!D.endEmitted&&D.length===0&&(D.endEmitted=!0,G.readable=!1,G.emit("end"),D.autoDestroy)){var z=G._writableState;(!z||z.autoDestroy&&z.finished)&&G.destroy()}}typeof Symbol=="function"&&(V.from=function(D,G){return F===void 0&&(F=TCe()),F(V,D,G)});function S(D,G){for(var z=0,K=D.length;z0;return FCe(o,c,l,function(h){i||(i=h),h&&s.forEach(OB),!c&&(s.forEach(OB),n(i))})});return e.reduce(jCe)}var zCe=WCe;(function(r,e){e=r.exports=Rq(),e.Stream=e,e.Readable=e,e.Writable=Iq(),e.Duplex=jw(),e.Transform=kq,e.PassThrough=DCe,e.finished=GT,e.pipeline=zCe})(CS,CS.exports);var Oq=CS.exports;const{Transform:VCe}=Oq;var qCe=r=>class Mq extends VCe{constructor(t,n,i,s,o){super(o),this._rate=t,this._capacity=n,this._delimitedSuffix=i,this._hashBitLength=s,this._options=o,this._state=new r,this._state.initialize(t,n),this._finalized=!1}_transform(t,n,i){let s=null;try{this.update(t,n)}catch(o){s=o}i(s)}_flush(t){let n=null;try{this.push(this.digest())}catch(i){n=i}t(n)}update(t,n){if(!Buffer.isBuffer(t)&&typeof t!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return Buffer.isBuffer(t)||(t=Buffer.from(t,n)),this._state.absorb(t),this}digest(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let n=this._state.squeeze(this._hashBitLength/8);return t!==void 0&&(n=n.toString(t)),this._resetState(),n}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const t=new Mq(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(t._state),t._finalized=this._finalized,t}};const{Transform:KCe}=Oq;var GCe=r=>class Dq extends KCe{constructor(t,n,i,s){super(s),this._rate=t,this._capacity=n,this._delimitedSuffix=i,this._options=s,this._state=new r,this._state.initialize(t,n),this._finalized=!1}_transform(t,n,i){let s=null;try{this.update(t,n)}catch(o){s=o}i(s)}_flush(){}_read(t){this.push(this.squeeze(t))}update(t,n){if(!Buffer.isBuffer(t)&&typeof t!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return Buffer.isBuffer(t)||(t=Buffer.from(t,n)),this._state.absorb(t),this}squeeze(t,n){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let i=this._state.squeeze(t);return n!==void 0&&(i=i.toString(n)),i}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const t=new Dq(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(t._state),t._finalized=this._finalized,t}};const ZCe=qCe,YCe=GCe;var QCe=function(r){const e=ZCe(r),t=YCe(r);return function(n,i){switch(typeof n=="string"?n.toLowerCase():n){case"keccak224":return new e(1152,448,null,224,i);case"keccak256":return new e(1088,512,null,256,i);case"keccak384":return new e(832,768,null,384,i);case"keccak512":return new e(576,1024,null,512,i);case"sha3-224":return new e(1152,448,6,224,i);case"sha3-256":return new e(1088,512,6,256,i);case"sha3-384":return new e(832,768,6,384,i);case"sha3-512":return new e(576,1024,6,512,i);case"shake128":return new t(1344,256,31,i);case"shake256":return new t(1088,512,31,i);default:throw new Error("Invald algorithm: "+n)}}},$q={};const MB=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648];$q.p1600=function(r){for(let e=0;e<24;++e){const t=r[0]^r[10]^r[20]^r[30]^r[40],n=r[1]^r[11]^r[21]^r[31]^r[41],i=r[2]^r[12]^r[22]^r[32]^r[42],s=r[3]^r[13]^r[23]^r[33]^r[43],o=r[4]^r[14]^r[24]^r[34]^r[44],a=r[5]^r[15]^r[25]^r[35]^r[45],c=r[6]^r[16]^r[26]^r[36]^r[46],l=r[7]^r[17]^r[27]^r[37]^r[47],h=r[8]^r[18]^r[28]^r[38]^r[48],f=r[9]^r[19]^r[29]^r[39]^r[49];let v=h^(i<<1|s>>>31),y=f^(s<<1|i>>>31);const A=r[0]^v,M=r[1]^y,$=r[10]^v,L=r[11]^y,P=r[20]^v,H=r[21]^y,F=r[30]^v,q=r[31]^y,Y=r[40]^v,I=r[41]^y;v=t^(o<<1|a>>>31),y=n^(a<<1|o>>>31);const T=r[2]^v,V=r[3]^y,Q=r[12]^v,te=r[13]^y,oe=r[22]^v,d=r[23]^y,g=r[32]^v,m=r[33]^y,b=r[42]^v,E=r[43]^y;v=i^(c<<1|l>>>31),y=s^(l<<1|c>>>31);const C=r[4]^v,B=r[5]^y,R=r[14]^v,w=r[15]^y,O=r[24]^v,pe=r[25]^y,be=r[34]^v,x=r[35]^y,Z=r[44]^v,k=r[45]^y;v=o^(h<<1|f>>>31),y=a^(f<<1|h>>>31);const W=r[6]^v,J=r[7]^y,S=r[16]^v,D=r[17]^y,G=r[26]^v,z=r[27]^y,K=r[36]^v,ue=r[37]^y,ye=r[46]^v,we=r[47]^y;v=c^(t<<1|n>>>31),y=l^(n<<1|t>>>31);const je=r[8]^v,Me=r[9]^y,Ie=r[18]^v,Be=r[19]^y,xe=r[28]^v,$e=r[29]^y,We=r[38]^v,Ne=r[39]^y,Ue=r[48]^v,X=r[49]^y,N=A,U=M,ie=L<<4|$>>>28,le=$<<4|L>>>28,me=P<<3|H>>>29,Ee=H<<3|P>>>29,ze=q<<9|F>>>23,qe=F<<9|q>>>23,St=Y<<18|I>>>14,Je=I<<18|Y>>>14,nt=T<<1|V>>>31,jr=V<<1|T>>>31,jt=te<<12|Q>>>20,Ht=Q<<12|te>>>20,bn=oe<<10|d>>>22,pt=d<<10|oe>>>22,ht=m<<13|g>>>19,yr=g<<13|m>>>19,gt=b<<2|E>>>30,ft=E<<2|b>>>30,ur=B<<30|C>>>2,_t=C<<30|B>>>2,xt=R<<6|w>>>26,br=w<<6|R>>>26,At=pe<<11|O>>>21,mt=O<<11|pe>>>21,Er=be<<15|x>>>17,wt=x<<15|be>>>17,lt=k<<29|Z>>>3,Ir=Z<<29|k>>>3,Et=W<<28|J>>>4,Gt=J<<28|W>>>4,Vn=D<<23|S>>>9,Zt=S<<23|D>>>9,Pt=G<<25|z>>>7,Nn=z<<25|G>>>7,Pn=K<<21|ue>>>11,On=ue<<21|K>>>11,Mn=we<<24|ye>>>8,Dn=ye<<24|we>>>8,tn=je<<27|Me>>>5,$i=Me<<27|je>>>5,$s=Ie<<20|Be>>>12,Bi=Be<<20|Ie>>>12,Bs=$e<<7|xe>>>25,Ls=xe<<7|$e>>>25,Li=We<<8|Ne>>>24,gs=Ne<<8|We>>>24,ms=Ue<<14|X>>>18,qn=X<<14|Ue>>>18;r[0]=N^~jt&At,r[1]=U^~Ht&mt,r[10]=Et^~$s&me,r[11]=Gt^~Bi&Ee,r[20]=nt^~xt&Pt,r[21]=jr^~br&Nn,r[30]=tn^~ie&bn,r[31]=$i^~le&pt,r[40]=ur^~Vn&Bs,r[41]=_t^~Zt&Ls,r[2]=jt^~At&Pn,r[3]=Ht^~mt&On,r[12]=$s^~me&ht,r[13]=Bi^~Ee&yr,r[22]=xt^~Pt&Li,r[23]=br^~Nn&gs,r[32]=ie^~bn&Er,r[33]=le^~pt&wt,r[42]=Vn^~Bs&ze,r[43]=Zt^~Ls&qe,r[4]=At^~Pn&ms,r[5]=mt^~On&qn,r[14]=me^~ht<,r[15]=Ee^~yr&Ir,r[24]=Pt^~Li&St,r[25]=Nn^~gs&Je,r[34]=bn^~Er&Mn,r[35]=pt^~wt&Dn,r[44]=Bs^~ze>,r[45]=Ls^~qe&ft,r[6]=Pn^~ms&N,r[7]=On^~qn&U,r[16]=ht^~lt&Et,r[17]=yr^~Ir&Gt,r[26]=Li^~St&nt,r[27]=gs^~Je&jr,r[36]=Er^~Mn&tn,r[37]=wt^~Dn&$i,r[46]=ze^~gt&ur,r[47]=qe^~ft&_t,r[8]=ms^~N&jt,r[9]=qn^~U&Ht,r[18]=lt^~Et&$s,r[19]=Ir^~Gt&Bi,r[28]=St^~nt&xt,r[29]=Je^~jr&br,r[38]=Mn^~tn&ie,r[39]=Dn^~$i&le,r[48]=gt^~ur&Vn,r[49]=ft^~_t&Zt,r[0]^=MB[e*2],r[1]^=MB[e*2+1]}};const M8=$q;function f2(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}f2.prototype.initialize=function(r,e){for(let t=0;t<50;++t)this.state[t]=0;this.blockSize=r/8,this.count=0,this.squeezing=!1};f2.prototype.absorb=function(r){for(let e=0;e>>8*(this.count%4)&255,this.count+=1,this.count===this.blockSize&&(M8.p1600(this.state),this.count=0);return e};f2.prototype.copy=function(r){for(let e=0;e<50;++e)r.state[e]=this.state[e];r.blockSize=this.blockSize,r.count=this.count,r.squeezing=this.squeezing};var JCe=f2,XCe=QCe(JCe);const eSe=XCe;function Bq(r){return Buffer.allocUnsafe(r).fill(0)}function tSe(r){return r.toString(2).length}function Lq(r,e){let t=r.toString(16);t.length%2!==0&&(t="0"+t);const n=t.match(/.{1,2}/g).map(i=>parseInt(i,16));for(;n.length"u")throw new Error("Not an array?");if(t=zq(r),t!=="dynamic"&&t!==0&&e.length>t)throw new Error("Elements exceed array size: "+t);i=[],r=r.slice(0,r.lastIndexOf("[")),typeof e=="string"&&(e=JSON.parse(e));for(s in e)i.push(Kl(r,e[s]));if(t==="dynamic"){var o=Kl("uint256",e.length);i.unshift(o)}return Buffer.concat(i)}else{if(r==="bytes")return e=new Buffer(e),i=Buffer.concat([Kl("uint256",e.length),e]),e.length%32!==0&&(i=Buffer.concat([i,Gs.zeros(32-e.length%32)])),i;if(r.startsWith("bytes")){if(t=hm(r),t<1||t>32)throw new Error("Invalid bytes width: "+t);return Gs.setLengthRight(e,32)}else if(r.startsWith("uint")){if(t=hm(r),t%8||t<8||t>256)throw new Error("Invalid uint width: "+t);n=W0(e);const a=Gs.bitLengthFromBigInt(n);if(a>t)throw new Error("Supplied uint exceeds width: "+t+" vs "+a);if(n<0)throw new Error("Supplied uint is negative");return Gs.bufferBEFromBigInt(n,32)}else if(r.startsWith("int")){if(t=hm(r),t%8||t<8||t>256)throw new Error("Invalid int width: "+t);n=W0(e);const a=Gs.bitLengthFromBigInt(n);if(a>t)throw new Error("Supplied int exceeds width: "+t+" vs "+a);const c=Gs.twosFromBigInt(n,256);return Gs.bufferBEFromBigInt(c,32)}else if(r.startsWith("ufixed")){if(t=DB(r),n=W0(e),n<0)throw new Error("Supplied ufixed is negative");return Kl("uint256",n*BigInt(2)**BigInt(t[1]))}else if(r.startsWith("fixed"))return t=DB(r),Kl("int256",W0(e)*BigInt(2)**BigInt(t[1]))}throw new Error("Unsupported or invalid type: "+r)}function aSe(r){return r==="string"||r==="bytes"||zq(r)==="dynamic"}function cSe(r){return r.lastIndexOf("]")===r.length-1}function lSe(r,e){var t=[],n=[],i=32*r.length;for(var s in r){var o=Wq(r[s]),a=e[s],c=Kl(o,a);aSe(o)?(t.push(Kl("uint256",i)),n.push(c),i+=c.length):t.push(c)}return Buffer.concat(t.concat(n))}function Vq(r,e){if(r.length!==e.length)throw new Error("Number of types are not matching the values");for(var t,n,i=[],s=0;s32)throw new Error("Invalid bytes width: "+t);i.push(Gs.setLengthRight(a,t))}else if(o.startsWith("uint")){if(t=hm(o),t%8||t<8||t>256)throw new Error("Invalid uint width: "+t);n=W0(a);const c=Gs.bitLengthFromBigInt(n);if(c>t)throw new Error("Supplied uint exceeds width: "+t+" vs "+c);i.push(Gs.bufferBEFromBigInt(n,t/8))}else if(o.startsWith("int")){if(t=hm(o),t%8||t<8||t>256)throw new Error("Invalid int width: "+t);n=W0(a);const c=Gs.bitLengthFromBigInt(n);if(c>t)throw new Error("Supplied int exceeds width: "+t+" vs "+c);const l=Gs.twosFromBigInt(n,t);i.push(Gs.bufferBEFromBigInt(l,t/8))}else throw new Error("Unsupported or invalid type: "+o)}return Buffer.concat(i)}function uSe(r,e){return Gs.keccak(Vq(r,e))}var hSe={rawEncode:lSe,solidityPack:Vq,soliditySHA3:uSe};const Dc=Hq,F3=hSe,qq={type:"object",properties:{types:{type:"object",additionalProperties:{type:"array",items:{type:"object",properties:{name:{type:"string"},type:{type:"string"}},required:["name","type"]}}},primaryType:{type:"string"},domain:{type:"object"},message:{type:"object"}},required:["types","primaryType","domain","message"]},n9={encodeData(r,e,t,n=!0){const i=["bytes32"],s=[this.hashType(r,t)];if(n){const o=(a,c,l)=>{if(t[c]!==void 0)return["bytes32",l==null?"0x0000000000000000000000000000000000000000000000000000000000000000":Dc.keccak(this.encodeData(c,l,t,n))];if(l===void 0)throw new Error(`missing value for field ${a} of type ${c}`);if(c==="bytes")return["bytes32",Dc.keccak(l)];if(c==="string")return typeof l=="string"&&(l=Buffer.from(l,"utf8")),["bytes32",Dc.keccak(l)];if(c.lastIndexOf("]")===c.length-1){const h=c.slice(0,c.lastIndexOf("[")),f=l.map(v=>o(a,h,v));return["bytes32",Dc.keccak(F3.rawEncode(f.map(([v])=>v),f.map(([,v])=>v)))]}return[c,l]};for(const a of t[r]){const[c,l]=o(a.name,a.type,e[a.name]);i.push(c),s.push(l)}}else for(const o of t[r]){let a=e[o.name];if(a!==void 0)if(o.type==="bytes")i.push("bytes32"),a=Dc.keccak(a),s.push(a);else if(o.type==="string")i.push("bytes32"),typeof a=="string"&&(a=Buffer.from(a,"utf8")),a=Dc.keccak(a),s.push(a);else if(t[o.type]!==void 0)i.push("bytes32"),a=Dc.keccak(this.encodeData(o.type,a,t,n)),s.push(a);else{if(o.type.lastIndexOf("]")===o.type.length-1)throw new Error("Arrays currently unimplemented in encodeData");i.push(o.type),s.push(a)}}return F3.rawEncode(i,s)},encodeType(r,e){let t="",n=this.findTypeDependencies(r,e).filter(i=>i!==r);n=[r].concat(n.sort());for(const i of n){if(!e[i])throw new Error("No type definition specified: "+i);t+=i+"("+e[i].map(({name:o,type:a})=>a+" "+o).join(",")+")"}return t},findTypeDependencies(r,e,t=[]){if(r=r.match(/^\w*/)[0],t.includes(r)||e[r]===void 0)return t;t.push(r);for(const n of e[r])for(const i of this.findTypeDependencies(n.type,e,t))!t.includes(i)&&t.push(i);return t},hashStruct(r,e,t,n=!0){return Dc.keccak(this.encodeData(r,e,t,n))},hashType(r,e){return Dc.keccak(this.encodeType(r,e))},sanitizeData(r){const e={};for(const t in qq.properties)r[t]&&(e[t]=r[t]);return e.types&&(e.types=Object.assign({EIP712Domain:[]},e.types)),e},hash(r,e=!0){const t=this.sanitizeData(r),n=[Buffer.from("1901","hex")];return n.push(this.hashStruct("EIP712Domain",t.domain,t.types,e)),t.primaryType!=="EIP712Domain"&&n.push(this.hashStruct(t.primaryType,t.message,t.types,e)),Dc.keccak(Buffer.concat(n))}};var dSe={TYPED_MESSAGE_SCHEMA:qq,TypedDataUtils:n9,hashForSignTypedDataLegacy:function(r){return fSe(r.data)},hashForSignTypedData_v3:function(r){return n9.hash(r.data,!1)},hashForSignTypedData_v4:function(r){return n9.hash(r.data)}};function fSe(r){const e=new Error("Expect argument to be non-empty array");if(typeof r!="object"||!r.length)throw e;const t=r.map(function(s){return s.type==="bytes"?Dc.toBuffer(s.value):s.value}),n=r.map(function(s){return s.type}),i=r.map(function(s){if(!s.name)throw e;return s.type+" "+s.name});return F3.soliditySHA3(["bytes32","bytes32"],[F3.soliditySHA3(new Array(r.length).fill("string"),i),F3.soliditySHA3(n,t)])}var Su={};Object.defineProperty(Su,"__esModule",{value:!0});Su.APP_VERSION_KEY=Su.LOCAL_STORAGE_ADDRESSES_KEY=Su.WALLET_USER_NAME_KEY=void 0;Su.WALLET_USER_NAME_KEY="walletUsername";Su.LOCAL_STORAGE_ADDRESSES_KEY="Addresses";Su.APP_VERSION_KEY="AppVersion";var wb={};Object.defineProperty(wb,"__esModule",{value:!0});wb.RelayEventManager=void 0;const pSe=Jt;class gSe{constructor(){this._nextRequestId=0,this.callbacks=new Map}makeRequestId(){this._nextRequestId=(this._nextRequestId+1)%2147483647;const e=this._nextRequestId,t=(0,pSe.prepend0x)(e.toString(16));return this.callbacks.get(t)&&this.callbacks.delete(t),e}}wb.RelayEventManager=gSe;var _x={},xx={},Ax={};Object.defineProperty(Ax,"__esModule",{value:!0});Ax.WalletLinkCipher=void 0;const g4=Jt;class mSe{constructor(e){this.secret=e}async encrypt(e){const t=this.secret;if(t.length!==64)throw Error("secret must be 256 bits");const n=crypto.getRandomValues(new Uint8Array(12)),i=await crypto.subtle.importKey("raw",(0,g4.hexStringToUint8Array)(t),{name:"aes-gcm"},!1,["encrypt","decrypt"]),s=new TextEncoder,o=await window.crypto.subtle.encrypt({name:"AES-GCM",iv:n},i,s.encode(e)),a=16,c=o.slice(o.byteLength-a),l=o.slice(0,o.byteLength-a),h=new Uint8Array(c),f=new Uint8Array(l),v=new Uint8Array([...n,...h,...f]);return(0,g4.uint8ArrayToHex)(v)}async decrypt(e){const t=this.secret;if(t.length!==64)throw Error("secret must be 256 bits");return new Promise((n,i)=>{(async function(){const s=await crypto.subtle.importKey("raw",(0,g4.hexStringToUint8Array)(t),{name:"aes-gcm"},!1,["encrypt","decrypt"]),o=(0,g4.hexStringToUint8Array)(e),a=o.slice(0,12),c=o.slice(12,28),l=o.slice(28),h=new Uint8Array([...l,...c]),f={name:"AES-GCM",iv:new Uint8Array(a)};try{const v=await window.crypto.subtle.decrypt(f,s,h),y=new TextDecoder;n(y.decode(v))}catch(v){i(v)}})()})}}Ax.WalletLinkCipher=mSe;var Ex={};Object.defineProperty(Ex,"__esModule",{value:!0});Ex.WalletLinkHTTP=void 0;class wSe{constructor(e,t,n){this.linkAPIUrl=e,this.sessionId=t;const i=`${t}:${n}`;this.auth=`Basic ${btoa(i)}`}async markUnseenEventsAsSeen(e){return Promise.all(e.map(t=>fetch(`${this.linkAPIUrl}/events/${t.eventId}/seen`,{method:"POST",headers:{Authorization:this.auth}}))).catch(t=>console.error("Unabled to mark event as failed:",t))}async fetchUnseenEvents(){var e;const t=await fetch(`${this.linkAPIUrl}/events?unseen=true`,{headers:{Authorization:this.auth}});if(t.ok){const{events:n,error:i}=await t.json();if(i)throw new Error(`Check unseen events failed: ${i}`);const s=(e=n==null?void 0:n.filter(o=>o.event==="Web3Response").map(o=>({type:"Event",sessionId:this.sessionId,eventId:o.id,event:o.event,data:o.data})))!==null&&e!==void 0?e:[];return this.markUnseenEventsAsSeen(s),s}throw new Error(`Check unseen events failed: ${t.status}`)}}Ex.WalletLinkHTTP=wSe;var Hw={};Object.defineProperty(Hw,"__esModule",{value:!0});Hw.WalletLinkWebSocket=Hw.ConnectionState=void 0;var Lg;(function(r){r[r.DISCONNECTED=0]="DISCONNECTED",r[r.CONNECTING=1]="CONNECTING",r[r.CONNECTED=2]="CONNECTED"})(Lg||(Hw.ConnectionState=Lg={}));class vSe{setConnectionStateListener(e){this.connectionStateListener=e}setIncomingDataListener(e){this.incomingDataListener=e}constructor(e,t=WebSocket){this.WebSocketClass=t,this.webSocket=null,this.pendingData=[],this.url=e.replace(/^http/,"ws")}async connect(){if(this.webSocket)throw new Error("webSocket object is not null");return new Promise((e,t)=>{var n;let i;try{this.webSocket=i=new this.WebSocketClass(this.url)}catch(s){t(s);return}(n=this.connectionStateListener)===null||n===void 0||n.call(this,Lg.CONNECTING),i.onclose=s=>{var o;this.clearWebSocket(),t(new Error(`websocket error ${s.code}: ${s.reason}`)),(o=this.connectionStateListener)===null||o===void 0||o.call(this,Lg.DISCONNECTED)},i.onopen=s=>{var o;e(),(o=this.connectionStateListener)===null||o===void 0||o.call(this,Lg.CONNECTED),this.pendingData.length>0&&([...this.pendingData].forEach(c=>this.sendData(c)),this.pendingData=[])},i.onmessage=s=>{var o,a;if(s.data==="h")(o=this.incomingDataListener)===null||o===void 0||o.call(this,{type:"Heartbeat"});else try{const c=JSON.parse(s.data);(a=this.incomingDataListener)===null||a===void 0||a.call(this,c)}catch{}}})}disconnect(){var e;const{webSocket:t}=this;if(t){this.clearWebSocket(),(e=this.connectionStateListener)===null||e===void 0||e.call(this,Lg.DISCONNECTED),this.connectionStateListener=void 0,this.incomingDataListener=void 0;try{t.close()}catch{}}}sendData(e){const{webSocket:t}=this;if(!t){this.pendingData.push(e),this.connect();return}t.send(e)}clearWebSocket(){const{webSocket:e}=this;e&&(this.webSocket=null,e.onclose=null,e.onerror=null,e.onmessage=null,e.onopen=null)}}Hw.WalletLinkWebSocket=vSe;Object.defineProperty(xx,"__esModule",{value:!0});xx.WalletLinkConnection=void 0;const $B=Su,ySe=Ax,bSe=Ex,m4=Hw,mg=Ts,BB=1e4,_Se=6e4;class xSe{constructor({session:e,linkAPIUrl:t,listener:n,WebSocketClass:i=WebSocket}){this.destroyed=!1,this.lastHeartbeatResponse=0,this.nextReqId=(0,mg.IntNumber)(1),this._connected=!1,this._linked=!1,this.shouldFetchUnseenEventsOnConnect=!1,this.requestResolutions=new Map,this.handleSessionMetadataUpdated=o=>{if(!o)return;new Map([["__destroyed",this.handleDestroyed],["EthereumAddress",this.handleAccountUpdated],["WalletUsername",this.handleWalletUsernameUpdated],["AppVersion",this.handleAppVersionUpdated],["ChainId",c=>o.JsonRpcUrl&&this.handleChainUpdated(c,o.JsonRpcUrl)]]).forEach((c,l)=>{const h=o[l];h!==void 0&&c(h)})},this.handleDestroyed=o=>{var a;o==="1"&&((a=this.listener)===null||a===void 0||a.resetAndReload())},this.handleAccountUpdated=async o=>{var a;{const c=await this.cipher.decrypt(o);(a=this.listener)===null||a===void 0||a.accountUpdated(c)}},this.handleMetadataUpdated=async(o,a)=>{var c;{const l=await this.cipher.decrypt(a);(c=this.listener)===null||c===void 0||c.metadataUpdated(o,l)}},this.handleWalletUsernameUpdated=async o=>{this.handleMetadataUpdated($B.WALLET_USER_NAME_KEY,o)},this.handleAppVersionUpdated=async o=>{this.handleMetadataUpdated($B.APP_VERSION_KEY,o)},this.handleChainUpdated=async(o,a)=>{var c;{const l=await this.cipher.decrypt(o),h=await this.cipher.decrypt(a);(c=this.listener)===null||c===void 0||c.chainUpdated(l,h)}},this.session=e,this.cipher=new ySe.WalletLinkCipher(e.secret),this.listener=n;const s=new m4.WalletLinkWebSocket(`${t}/rpc`,i);s.setConnectionStateListener(async o=>{let a=!1;switch(o){case m4.ConnectionState.DISCONNECTED:if(!this.destroyed){const c=async()=>{await new Promise(l=>setTimeout(l,5e3)),this.destroyed||s.connect().catch(()=>{c()})};c()}break;case m4.ConnectionState.CONNECTED:try{await this.authenticate(),this.sendIsLinked(),this.sendGetSessionConfig(),a=!0}catch{}this.updateLastHeartbeat(),setInterval(()=>{this.heartbeat()},BB),this.shouldFetchUnseenEventsOnConnect&&this.fetchUnseenEventsAPI();break;case m4.ConnectionState.CONNECTING:break}this.connected!==a&&(this.connected=a)}),s.setIncomingDataListener(o=>{var a;switch(o.type){case"Heartbeat":this.updateLastHeartbeat();return;case"IsLinkedOK":case"Linked":{const c=o.type==="IsLinkedOK"?o.linked:void 0;this.linked=c||o.onlineGuests>0;break}case"GetSessionConfigOK":case"SessionConfigUpdated":{this.handleSessionMetadataUpdated(o.metadata);break}case"Event":{this.handleIncomingEvent(o);break}}o.id!==void 0&&((a=this.requestResolutions.get(o.id))===null||a===void 0||a(o))}),this.ws=s,this.http=new bSe.WalletLinkHTTP(t,e.id,e.key)}connect(){if(this.destroyed)throw new Error("instance is destroyed");this.ws.connect()}destroy(){this.destroyed=!0,this.ws.disconnect(),this.listener=void 0}get isDestroyed(){return this.destroyed}get connected(){return this._connected}set connected(e){var t;this._connected=e,e&&((t=this.onceConnected)===null||t===void 0||t.call(this))}setOnceConnected(e){return new Promise(t=>{this.connected?e().then(t):this.onceConnected=()=>{e().then(t),this.onceConnected=void 0}})}get linked(){return this._linked}set linked(e){var t,n;this._linked=e,e&&((t=this.onceLinked)===null||t===void 0||t.call(this)),(n=this.listener)===null||n===void 0||n.linkedUpdated(e)}setOnceLinked(e){return new Promise(t=>{this.linked?e().then(t):this.onceLinked=()=>{e().then(t),this.onceLinked=void 0}})}async handleIncomingEvent(e){var t;if(!(e.type!=="Event"||e.event!=="Web3Response")){const n=await this.cipher.decrypt(e.data),i=JSON.parse(n);if(i.type!=="WEB3_RESPONSE")return;(t=this.listener)===null||t===void 0||t.handleWeb3ResponseMessage(i)}}async checkUnseenEvents(){if(!this.connected){this.shouldFetchUnseenEventsOnConnect=!0;return}await new Promise(e=>setTimeout(e,250));try{await this.fetchUnseenEventsAPI()}catch(e){console.error("Unable to check for unseen events",e)}}async fetchUnseenEventsAPI(){this.shouldFetchUnseenEventsOnConnect=!1,(await this.http.fetchUnseenEvents()).forEach(t=>this.handleIncomingEvent(t))}async setSessionMetadata(e,t){const n={type:"SetSessionConfig",id:(0,mg.IntNumber)(this.nextReqId++),sessionId:this.session.id,metadata:{[e]:t}};return this.setOnceConnected(async()=>{const i=await this.makeRequest(n);if(i.type==="Fail")throw new Error(i.error||"failed to set session metadata")})}async publishEvent(e,t,n=!1){const i=await this.cipher.encrypt(JSON.stringify(Object.assign(Object.assign({},t),{origin:location.origin,relaySource:"coinbaseWalletExtension"in window&&window.coinbaseWalletExtension?"injected_sdk":"sdk"}))),s={type:"PublishEvent",id:(0,mg.IntNumber)(this.nextReqId++),sessionId:this.session.id,event:e,data:i,callWebhook:n};return this.setOnceLinked(async()=>{const o=await this.makeRequest(s);if(o.type==="Fail")throw new Error(o.error||"failed to publish event");return o.eventId})}sendData(e){this.ws.sendData(JSON.stringify(e))}updateLastHeartbeat(){this.lastHeartbeatResponse=Date.now()}heartbeat(){if(Date.now()-this.lastHeartbeatResponse>BB*2){this.ws.disconnect();return}try{this.ws.sendData("h")}catch{}}async makeRequest(e,t=_Se){const n=e.id;this.sendData(e);let i;return Promise.race([new Promise((s,o)=>{i=window.setTimeout(()=>{o(new Error(`request ${n} timed out`))},t)}),new Promise(s=>{this.requestResolutions.set(n,o=>{clearTimeout(i),s(o),this.requestResolutions.delete(n)})})])}async authenticate(){const e={type:"HostSession",id:(0,mg.IntNumber)(this.nextReqId++),sessionId:this.session.id,sessionKey:this.session.key},t=await this.makeRequest(e);if(t.type==="Fail")throw new Error(t.error||"failed to authenticate")}sendIsLinked(){const e={type:"IsLinked",id:(0,mg.IntNumber)(this.nextReqId++),sessionId:this.session.id};this.sendData(e)}sendGetSessionConfig(){const e={type:"GetSessionConfig",id:(0,mg.IntNumber)(this.nextReqId++),sessionId:this.session.id};this.sendData(e)}}xx.WalletLinkConnection=xSe;var Cx={},Kq={exports:{}},Gq=p0.Buffer;function Sx(r,e){this._block=Gq.alloc(r),this._finalSize=e,this._blockSize=r,this._len=0}Sx.prototype.update=function(r,e){typeof r=="string"&&(e=e||"utf8",r=Gq.from(r,e));for(var t=this._block,n=this._blockSize,i=r.length,s=this._len,o=0;o=this._finalSize&&(this._update(this._block),this._block.fill(0));var t=this._len*8;if(t<=4294967295)this._block.writeUInt32BE(t,this._blockSize-4);else{var n=(t&4294967295)>>>0,i=(t-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var s=this._hash();return r?s.toString(r):s};Sx.prototype._update=function(){throw new Error("_update must be implemented by subclass")};var p2=Sx,ASe=Il,Zq=p2,ESe=p0.Buffer,CSe=[1518500249,1859775393,-1894007588,-899497514],SSe=new Array(80);function vb(){this.init(),this._w=SSe,Zq.call(this,64,56)}ASe(vb,Zq);vb.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function ISe(r){return r<<5|r>>>27}function TSe(r){return r<<30|r>>>2}function RSe(r,e,t,n){return r===0?e&t|~e&n:r===2?e&t|e&n|t&n:e^t^n}vb.prototype._update=function(r){for(var e=this._w,t=this._a|0,n=this._b|0,i=this._c|0,s=this._d|0,o=this._e|0,a=0;a<16;++a)e[a]=r.readInt32BE(a*4);for(;a<80;++a)e[a]=e[a-3]^e[a-8]^e[a-14]^e[a-16];for(var c=0;c<80;++c){var l=~~(c/20),h=ISe(t)+RSe(l,n,i,s)+o+e[c]+CSe[l]|0;o=s,s=i,i=TSe(n),n=t,t=h}this._a=t+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=s+this._d|0,this._e=o+this._e|0};vb.prototype._hash=function(){var r=ESe.allocUnsafe(20);return r.writeInt32BE(this._a|0,0),r.writeInt32BE(this._b|0,4),r.writeInt32BE(this._c|0,8),r.writeInt32BE(this._d|0,12),r.writeInt32BE(this._e|0,16),r};var kSe=vb,NSe=Il,Yq=p2,PSe=p0.Buffer,OSe=[1518500249,1859775393,-1894007588,-899497514],MSe=new Array(80);function yb(){this.init(),this._w=MSe,Yq.call(this,64,56)}NSe(yb,Yq);yb.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function DSe(r){return r<<1|r>>>31}function $Se(r){return r<<5|r>>>27}function BSe(r){return r<<30|r>>>2}function LSe(r,e,t,n){return r===0?e&t|~e&n:r===2?e&t|e&n|t&n:e^t^n}yb.prototype._update=function(r){for(var e=this._w,t=this._a|0,n=this._b|0,i=this._c|0,s=this._d|0,o=this._e|0,a=0;a<16;++a)e[a]=r.readInt32BE(a*4);for(;a<80;++a)e[a]=DSe(e[a-3]^e[a-8]^e[a-14]^e[a-16]);for(var c=0;c<80;++c){var l=~~(c/20),h=$Se(t)+LSe(l,n,i,s)+o+e[c]+OSe[l]|0;o=s,s=i,i=BSe(n),n=t,t=h}this._a=t+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=s+this._d|0,this._e=o+this._e|0};yb.prototype._hash=function(){var r=PSe.allocUnsafe(20);return r.writeInt32BE(this._a|0,0),r.writeInt32BE(this._b|0,4),r.writeInt32BE(this._c|0,8),r.writeInt32BE(this._d|0,12),r.writeInt32BE(this._e|0,16),r};var USe=yb,FSe=Il,Qq=p2,jSe=p0.Buffer,HSe=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],WSe=new Array(64);function bb(){this.init(),this._w=WSe,Qq.call(this,64,56)}FSe(bb,Qq);bb.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this};function zSe(r,e,t){return t^r&(e^t)}function VSe(r,e,t){return r&e|t&(r|e)}function qSe(r){return(r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10)}function KSe(r){return(r>>>6|r<<26)^(r>>>11|r<<21)^(r>>>25|r<<7)}function GSe(r){return(r>>>7|r<<25)^(r>>>18|r<<14)^r>>>3}function ZSe(r){return(r>>>17|r<<15)^(r>>>19|r<<13)^r>>>10}bb.prototype._update=function(r){for(var e=this._w,t=this._a|0,n=this._b|0,i=this._c|0,s=this._d|0,o=this._e|0,a=this._f|0,c=this._g|0,l=this._h|0,h=0;h<16;++h)e[h]=r.readInt32BE(h*4);for(;h<64;++h)e[h]=ZSe(e[h-2])+e[h-7]+GSe(e[h-15])+e[h-16]|0;for(var f=0;f<64;++f){var v=l+KSe(o)+zSe(o,a,c)+HSe[f]+e[f]|0,y=qSe(t)+VSe(t,n,i)|0;l=c,c=a,a=o,o=s+v|0,s=i,i=n,n=t,t=v+y|0}this._a=t+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=s+this._d|0,this._e=o+this._e|0,this._f=a+this._f|0,this._g=c+this._g|0,this._h=l+this._h|0};bb.prototype._hash=function(){var r=jSe.allocUnsafe(32);return r.writeInt32BE(this._a,0),r.writeInt32BE(this._b,4),r.writeInt32BE(this._c,8),r.writeInt32BE(this._d,12),r.writeInt32BE(this._e,16),r.writeInt32BE(this._f,20),r.writeInt32BE(this._g,24),r.writeInt32BE(this._h,28),r};var Jq=bb,YSe=Il,QSe=Jq,JSe=p2,XSe=p0.Buffer,eIe=new Array(64);function Ix(){this.init(),this._w=eIe,JSe.call(this,64,56)}YSe(Ix,QSe);Ix.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this};Ix.prototype._hash=function(){var r=XSe.allocUnsafe(28);return r.writeInt32BE(this._a,0),r.writeInt32BE(this._b,4),r.writeInt32BE(this._c,8),r.writeInt32BE(this._d,12),r.writeInt32BE(this._e,16),r.writeInt32BE(this._f,20),r.writeInt32BE(this._g,24),r};var tIe=Ix,rIe=Il,Xq=p2,nIe=p0.Buffer,LB=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],iIe=new Array(160);function _b(){this.init(),this._w=iIe,Xq.call(this,128,112)}rIe(_b,Xq);_b.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this};function UB(r,e,t){return t^r&(e^t)}function FB(r,e,t){return r&e|t&(r|e)}function jB(r,e){return(r>>>28|e<<4)^(e>>>2|r<<30)^(e>>>7|r<<25)}function HB(r,e){return(r>>>14|e<<18)^(r>>>18|e<<14)^(e>>>9|r<<23)}function sIe(r,e){return(r>>>1|e<<31)^(r>>>8|e<<24)^r>>>7}function oIe(r,e){return(r>>>1|e<<31)^(r>>>8|e<<24)^(r>>>7|e<<25)}function aIe(r,e){return(r>>>19|e<<13)^(e>>>29|r<<3)^r>>>6}function cIe(r,e){return(r>>>19|e<<13)^(e>>>29|r<<3)^(r>>>6|e<<26)}function qi(r,e){return r>>>0>>0?1:0}_b.prototype._update=function(r){for(var e=this._w,t=this._ah|0,n=this._bh|0,i=this._ch|0,s=this._dh|0,o=this._eh|0,a=this._fh|0,c=this._gh|0,l=this._hh|0,h=this._al|0,f=this._bl|0,v=this._cl|0,y=this._dl|0,A=this._el|0,M=this._fl|0,$=this._gl|0,L=this._hl|0,P=0;P<32;P+=2)e[P]=r.readInt32BE(P*4),e[P+1]=r.readInt32BE(P*4+4);for(;P<160;P+=2){var H=e[P-30],F=e[P-15*2+1],q=sIe(H,F),Y=oIe(F,H);H=e[P-2*2],F=e[P-2*2+1];var I=aIe(H,F),T=cIe(F,H),V=e[P-7*2],Q=e[P-7*2+1],te=e[P-16*2],oe=e[P-16*2+1],d=Y+Q|0,g=q+V+qi(d,Y)|0;d=d+T|0,g=g+I+qi(d,T)|0,d=d+oe|0,g=g+te+qi(d,oe)|0,e[P]=g,e[P+1]=d}for(var m=0;m<160;m+=2){g=e[m],d=e[m+1];var b=FB(t,n,i),E=FB(h,f,v),C=jB(t,h),B=jB(h,t),R=HB(o,A),w=HB(A,o),O=LB[m],pe=LB[m+1],be=UB(o,a,c),x=UB(A,M,$),Z=L+w|0,k=l+R+qi(Z,L)|0;Z=Z+x|0,k=k+be+qi(Z,x)|0,Z=Z+pe|0,k=k+O+qi(Z,pe)|0,Z=Z+d|0,k=k+g+qi(Z,d)|0;var W=B+E|0,J=C+b+qi(W,B)|0;l=c,L=$,c=a,$=M,a=o,M=A,A=y+Z|0,o=s+k+qi(A,y)|0,s=i,y=v,i=n,v=f,n=t,f=h,h=Z+W|0,t=k+J+qi(h,Z)|0}this._al=this._al+h|0,this._bl=this._bl+f|0,this._cl=this._cl+v|0,this._dl=this._dl+y|0,this._el=this._el+A|0,this._fl=this._fl+M|0,this._gl=this._gl+$|0,this._hl=this._hl+L|0,this._ah=this._ah+t+qi(this._al,h)|0,this._bh=this._bh+n+qi(this._bl,f)|0,this._ch=this._ch+i+qi(this._cl,v)|0,this._dh=this._dh+s+qi(this._dl,y)|0,this._eh=this._eh+o+qi(this._el,A)|0,this._fh=this._fh+a+qi(this._fl,M)|0,this._gh=this._gh+c+qi(this._gl,$)|0,this._hh=this._hh+l+qi(this._hl,L)|0};_b.prototype._hash=function(){var r=nIe.allocUnsafe(64);function e(t,n,i){r.writeInt32BE(t,i),r.writeInt32BE(n,i+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),r};var eK=_b,lIe=Il,uIe=eK,hIe=p2,dIe=p0.Buffer,fIe=new Array(160);function Tx(){this.init(),this._w=fIe,hIe.call(this,128,112)}lIe(Tx,uIe);Tx.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this};Tx.prototype._hash=function(){var r=dIe.allocUnsafe(48);function e(t,n,i){r.writeInt32BE(t,i),r.writeInt32BE(n,i+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),r};var pIe=Tx,U1=Kq.exports=function(e){e=e.toLowerCase();var t=U1[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t};U1.sha=kSe;U1.sha1=USe;U1.sha224=tIe;U1.sha256=Jq;U1.sha384=pIe;U1.sha512=eK;var gIe=Kq.exports;Object.defineProperty(Cx,"__esModule",{value:!0});Cx.WalletLinkSession=void 0;const mIe=gIe,WB=Jt,zB="session:id",VB="session:secret",qB="session:linked";class ZT{constructor(e,t,n,i){this._storage=e,this._id=t||(0,WB.randomBytesHex)(16),this._secret=n||(0,WB.randomBytesHex)(32),this._key=new mIe.sha256().update(`${this._id}, ${this._secret} WalletLink`).digest("hex"),this._linked=!!i}static load(e){const t=e.getItem(zB),n=e.getItem(qB),i=e.getItem(VB);return t&&i?new ZT(e,t,i,n==="1"):null}get id(){return this._id}get secret(){return this._secret}get key(){return this._key}get linked(){return this._linked}set linked(e){this._linked=e,this.persistLinked()}save(){return this._storage.setItem(zB,this._id),this._storage.setItem(VB,this._secret),this.persistLinked(),this}persistLinked(){this._storage.setItem(qB,this._linked?"1":"0")}}Cx.WalletLinkSession=ZT;var da={};Object.defineProperty(da,"__esModule",{value:!0});da.isDarkMode=da.isMobileWeb=da.getLocation=da.createQrUrl=void 0;function wIe(r,e,t,n,i,s){const o=n?"parent-id":"id",a=new URLSearchParams({[o]:r,secret:e,server:t,v:i,chainId:s.toString()}).toString();return`${t}/#/link?${a}`}da.createQrUrl=wIe;function vIe(){try{return window.frameElement!==null}catch{return!1}}function yIe(){try{return vIe()&&window.top?window.top.location:window.location}catch{return window.location}}da.getLocation=yIe;function bIe(){var r;return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test((r=window==null?void 0:window.navigator)===null||r===void 0?void 0:r.userAgent)}da.isMobileWeb=bIe;function _Ie(){var r,e;return(e=(r=window==null?void 0:window.matchMedia)===null||r===void 0?void 0:r.call(window,"(prefers-color-scheme: dark)").matches)!==null&&e!==void 0?e:!1}da.isDarkMode=_Ie;var Rx={},xb={},YT={};Object.defineProperty(YT,"__esModule",{value:!0});YT.default='@namespace svg "http://www.w3.org/2000/svg";.-cbwsdk-css-reset,.-cbwsdk-css-reset *{animation:none;animation-delay:0;animation-direction:normal;animation-duration:0;animation-fill-mode:none;animation-iteration-count:1;animation-name:none;animation-play-state:running;animation-timing-function:ease;backface-visibility:visible;background:0;background-attachment:scroll;background-clip:border-box;background-color:rgba(0,0,0,0);background-image:none;background-origin:padding-box;background-position:0 0;background-position-x:0;background-position-y:0;background-repeat:repeat;background-size:auto auto;border:0;border-style:none;border-width:medium;border-color:inherit;border-bottom:0;border-bottom-color:inherit;border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-style:none;border-bottom-width:medium;border-collapse:separate;border-image:none;border-left:0;border-left-color:inherit;border-left-style:none;border-left-width:medium;border-radius:0;border-right:0;border-right-color:inherit;border-right-style:none;border-right-width:medium;border-spacing:0;border-top:0;border-top-color:inherit;border-top-left-radius:0;border-top-right-radius:0;border-top-style:none;border-top-width:medium;box-shadow:none;box-sizing:border-box;caption-side:top;clear:none;clip:auto;color:inherit;columns:auto;column-count:auto;column-fill:balance;column-gap:normal;column-rule:medium none currentColor;column-rule-color:currentColor;column-rule-style:none;column-rule-width:none;column-span:1;column-width:auto;counter-increment:none;counter-reset:none;direction:ltr;empty-cells:show;float:none;font:normal;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;height:auto;hyphens:none;letter-spacing:normal;line-height:normal;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;margin:0;margin-bottom:0;margin-left:0;margin-right:0;margin-top:0;opacity:1;orphans:0;outline:0;outline-color:invert;outline-style:none;outline-width:medium;overflow:visible;overflow-x:visible;overflow-y:visible;padding:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;page-break-after:auto;page-break-before:auto;page-break-inside:auto;perspective:none;perspective-origin:50% 50%;pointer-events:auto;position:static;quotes:"\\201C" "\\201D" "\\2018" "\\2019";tab-size:8;table-layout:auto;text-align:inherit;text-align-last:auto;text-decoration:none;text-decoration-color:inherit;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-shadow:none;text-transform:none;transform:none;transform-style:flat;transition:none;transition-delay:0s;transition-duration:0s;transition-property:none;transition-timing-function:ease;unicode-bidi:normal;vertical-align:baseline;visibility:visible;white-space:normal;widows:0;word-spacing:normal;z-index:auto}.-cbwsdk-css-reset strong{font-weight:bold}.-cbwsdk-css-reset *{box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;line-height:1}.-cbwsdk-css-reset [class*=container]{margin:0;padding:0}.-cbwsdk-css-reset style{display:none}';var xIe=Yr&&Yr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(xb,"__esModule",{value:!0});xb.injectCssReset=void 0;const AIe=xIe(YT);function EIe(){const r=document.createElement("style");r.type="text/css",r.appendChild(document.createTextNode(AIe.default)),document.documentElement.appendChild(r)}xb.injectCssReset=EIe;var QT={};function tK(r){var e,t,n="";if(typeof r=="string"||typeof r=="number")n+=r;else if(typeof r=="object")if(Array.isArray(r))for(e=0;e2&&(o.children=arguments.length>3?Ab.call(arguments,2):t),typeof r=="function"&&r.defaultProps!=null)for(s in r.defaultProps)o[s]===void 0&&(o[s]=r.defaultProps[s]);return j3(r,o,n,i,null)}function j3(r,e,t,n,i){var s={type:r,props:e,key:t,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:i??++nK,__i:-1,__u:0};return i==null&&Wn.vnode!=null&&Wn.vnode(s),s}function IIe(){return{current:null}}function Eb(r){return r.children}function H3(r,e){this.props=r,this.context=e}function f1(r,e){if(e==null)return r.__?f1(r.__,r.__i+1):null;for(var t;ee&&z0.sort(RS));D8.__r=0}function uK(r,e,t,n,i,s,o,a,c,l,h){var f,v,y,A,M,$=n&&n.__k||aK,L=e.length;for(t.__d=c,TIe(t,e,$),c=t.__d,f=0;f0?j3(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)!=null?(i.__=r,i.__b=r.__b+1,a=RIe(i,t,o,h),i.__i=a,s=null,a!==-1&&(h--,(s=t[a])&&(s.__u|=131072)),s==null||s.__v===null?(a==-1&&f--,typeof i.type!="function"&&(i.__u|=65536)):a!==o&&(a==o-1?f--:a==o+1?f++:a>o?h>c-o?f+=a-o:f--:a(c!=null&&!(131072&c.__u)?1:0))for(;o>=0||a=0){if((c=e[o])&&!(131072&c.__u)&&i==c.key&&s===c.type)return o;o--}if(a2&&(a.children=arguments.length>3?Ab.call(arguments,2):t),j3(r.type,a,n||r.key,i||r.ref,null)}function OIe(r,e){var t={__c:e="__cC"+oK++,__:r,Consumer:function(n,i){return n.children(i)},Provider:function(n){var i,s;return this.getChildContext||(i=[],(s={})[e]=this,this.getChildContext=function(){return s},this.componentWillUnmount=function(){i=null},this.shouldComponentUpdate=function(o){this.props.value!==o.value&&i.some(function(a){a.__e=!0,OS(a)})},this.sub=function(o){i.push(o);var a=o.componentWillUnmount;o.componentWillUnmount=function(){i&&i.splice(i.indexOf(o),1),a&&a.call(o)}}),n.children}};return t.Provider.__=t.Consumer.contextType=t}Ab=aK.slice,Wn={__e:function(r,e,t,n){for(var i,s,o;e=e.__;)if((i=e.__c)&&!i.__)try{if((s=i.constructor)&&s.getDerivedStateFromError!=null&&(i.setState(s.getDerivedStateFromError(r)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(r,n||{}),o=i.__d),o)return i.__E=i}catch(a){r=a}throw r}},nK=0,iK=function(r){return r!=null&&r.constructor==null},H3.prototype.setState=function(r,e){var t;t=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Xh({},this.state),typeof r=="function"&&(r=r(Xh({},t),this.props)),r&&Xh(t,r),r!=null&&this.__v&&(e&&this._sb.push(e),OS(this))},H3.prototype.forceUpdate=function(r){this.__v&&(this.__e=!0,r&&this.__h.push(r),OS(this))},H3.prototype.render=Eb,z0=[],sK=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,RS=function(r,e){return r.__v.__b-e.__v.__b},D8.__r=0,JT=0,kS=YB(!1),NS=YB(!0),oK=0;const MIe=Object.freeze(Object.defineProperty({__proto__:null,Component:H3,Fragment:Eb,cloneElement:PIe,createContext:OIe,createElement:PS,createRef:IIe,h:PS,hydrate:gK,get isValidElement(){return iK},get options(){return Wn},render:pK,toChildArray:dK},Symbol.toStringTag,{value:"Module"})),mK=Ey(MIe);var _d,In,i9,QB,Ww=0,wK=[],Qn=Wn,JB=Qn.__b,XB=Qn.__r,eL=Qn.diffed,tL=Qn.__c,rL=Qn.unmount,nL=Qn.__;function F1(r,e){Qn.__h&&Qn.__h(In,r,Ww||e),Ww=0;var t=In.__H||(In.__H={__:[],__h:[]});return r>=t.__.length&&t.__.push({}),t.__[r]}function vK(r){return Ww=1,yK(_K,r)}function yK(r,e,t){var n=F1(_d++,2);if(n.t=r,!n.__c&&(n.__=[t?t(e):_K(void 0,e),function(a){var c=n.__N?n.__N[0]:n.__[0],l=n.t(c,a);c!==l&&(n.__N=[l,n.__[1]],n.__c.setState({}))}],n.__c=In,!In.u)){var i=function(a,c,l){if(!n.__c.__H)return!0;var h=n.__c.__H.__.filter(function(v){return!!v.__c});if(h.every(function(v){return!v.__N}))return!s||s.call(this,a,c,l);var f=!1;return h.forEach(function(v){if(v.__N){var y=v.__[0];v.__=v.__N,v.__N=void 0,y!==v.__[0]&&(f=!0)}}),!(!f&&n.__c.props===a)&&(!s||s.call(this,a,c,l))};In.u=!0;var s=In.shouldComponentUpdate,o=In.componentWillUpdate;In.componentWillUpdate=function(a,c,l){if(this.__e){var h=s;s=void 0,i(a,c,l),s=h}o&&o.call(this,a,c,l)},In.shouldComponentUpdate=i}return n.__N||n.__}function DIe(r,e){var t=F1(_d++,3);!Qn.__s&&rR(t.__H,e)&&(t.__=r,t.i=e,In.__H.__h.push(t))}function bK(r,e){var t=F1(_d++,4);!Qn.__s&&rR(t.__H,e)&&(t.__=r,t.i=e,In.__h.push(t))}function $Ie(r){return Ww=5,tR(function(){return{current:r}},[])}function BIe(r,e,t){Ww=6,bK(function(){return typeof r=="function"?(r(e()),function(){return r(null)}):r?(r.current=e(),function(){return r.current=null}):void 0},t==null?t:t.concat(r))}function tR(r,e){var t=F1(_d++,7);return rR(t.__H,e)&&(t.__=r(),t.__H=e,t.__h=r),t.__}function LIe(r,e){return Ww=8,tR(function(){return r},e)}function UIe(r){var e=In.context[r.__c],t=F1(_d++,9);return t.c=r,e?(t.__==null&&(t.__=!0,e.sub(In)),e.props.value):r.__}function FIe(r,e){Qn.useDebugValue&&Qn.useDebugValue(e?e(r):r)}function jIe(r){var e=F1(_d++,10),t=vK();return e.__=r,In.componentDidCatch||(In.componentDidCatch=function(n,i){e.__&&e.__(n,i),t[1](n)}),[t[0],function(){t[1](void 0)}]}function HIe(){var r=F1(_d++,11);if(!r.__){for(var e=In.__v;e!==null&&!e.__m&&e.__!==null;)e=e.__;var t=e.__m||(e.__m=[0,0]);r.__="P"+t[0]+"-"+t[1]++}return r.__}function WIe(){for(var r;r=wK.shift();)if(r.__P&&r.__H)try{r.__H.__h.forEach(e6),r.__H.__h.forEach(DS),r.__H.__h=[]}catch(e){r.__H.__h=[],Qn.__e(e,r.__v)}}Qn.__b=function(r){In=null,JB&&JB(r)},Qn.__=function(r,e){r&&e.__k&&e.__k.__m&&(r.__m=e.__k.__m),nL&&nL(r,e)},Qn.__r=function(r){XB&&XB(r),_d=0;var e=(In=r.__c).__H;e&&(i9===In?(e.__h=[],In.__h=[],e.__.forEach(function(t){t.__N&&(t.__=t.__N),t.i=t.__N=void 0})):(e.__h.forEach(e6),e.__h.forEach(DS),e.__h=[],_d=0)),i9=In},Qn.diffed=function(r){eL&&eL(r);var e=r.__c;e&&e.__H&&(e.__H.__h.length&&(wK.push(e)!==1&&QB===Qn.requestAnimationFrame||((QB=Qn.requestAnimationFrame)||zIe)(WIe)),e.__H.__.forEach(function(t){t.i&&(t.__H=t.i),t.i=void 0})),i9=In=null},Qn.__c=function(r,e){e.some(function(t){try{t.__h.forEach(e6),t.__h=t.__h.filter(function(n){return!n.__||DS(n)})}catch(n){e.some(function(i){i.__h&&(i.__h=[])}),e=[],Qn.__e(n,t.__v)}}),tL&&tL(r,e)},Qn.unmount=function(r){rL&&rL(r);var e,t=r.__c;t&&t.__H&&(t.__H.__.forEach(function(n){try{e6(n)}catch(i){e=i}}),t.__H=void 0,e&&Qn.__e(e,t.__v))};var iL=typeof requestAnimationFrame=="function";function zIe(r){var e,t=function(){clearTimeout(n),iL&&cancelAnimationFrame(e),setTimeout(r)},n=setTimeout(t,100);iL&&(e=requestAnimationFrame(t))}function e6(r){var e=In,t=r.__c;typeof t=="function"&&(r.__c=void 0,t()),In=e}function DS(r){var e=In;r.__c=r.__(),In=e}function rR(r,e){return!r||r.length!==e.length||e.some(function(t,n){return t!==r[n]})}function _K(r,e){return typeof e=="function"?e(r):e}const VIe=Object.freeze(Object.defineProperty({__proto__:null,useCallback:LIe,useContext:UIe,useDebugValue:FIe,useEffect:DIe,useErrorBoundary:jIe,useId:HIe,useImperativeHandle:BIe,useLayoutEffect:bK,useMemo:tR,useReducer:yK,useRef:$Ie,useState:vK},Symbol.toStringTag,{value:"Module"})),qIe=Ey(VIe);var nR={};Object.defineProperty(nR,"__esModule",{value:!0});nR.default=".-cbwsdk-css-reset .-gear-container{margin-left:16px !important;margin-right:9px !important;display:flex;align-items:center;justify-content:center;width:24px;height:24px;transition:opacity .25s}.-cbwsdk-css-reset .-gear-container *{user-select:none}.-cbwsdk-css-reset .-gear-container svg{opacity:0;position:absolute}.-cbwsdk-css-reset .-gear-icon{height:12px;width:12px;z-index:10000}.-cbwsdk-css-reset .-cbwsdk-snackbar{align-items:flex-end;display:flex;flex-direction:column;position:fixed;right:0;top:0;z-index:2147483647}.-cbwsdk-css-reset .-cbwsdk-snackbar *{user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance{display:flex;flex-direction:column;margin:8px 16px 0 16px;overflow:visible;text-align:left;transform:translateX(0);transition:opacity .25s,transform .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header:hover .-gear-container svg{opacity:1}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header{display:flex;align-items:center;background:#fff;overflow:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-cblogo{margin:8px 8px 8px 8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-message{color:#000;font-size:13px;line-height:1.5;user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu{background:#fff;transition:opacity .25s ease-in-out,transform .25s linear,visibility 0s;visibility:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;opacity:0;flex-direction:column;padding-left:8px;padding-right:8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:last-child{margin-bottom:8px !important}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover{background:#f5f7f8;border-radius:6px;transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover span{color:#050f19;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover svg path{fill:#000;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item{visibility:inherit;height:35px;margin-top:8px;margin-bottom:0;display:flex;flex-direction:row;align-items:center;padding:8px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item *{visibility:inherit;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover{background:rgba(223,95,103,.2);transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover svg path{fill:#df5f67;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover span{color:#df5f67;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-info{color:#aaa;font-size:13px;margin:0 8px 0 32px;position:absolute}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-hidden{opacity:0;text-align:left;transform:translateX(25%);transition:opacity .5s linear}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-expanded .-cbwsdk-snackbar-instance-menu{opacity:1;display:flex;transform:translateY(8px);visibility:visible}";(function(r){var e=Yr&&Yr.__importDefault||function(v){return v&&v.__esModule?v:{default:v}};Object.defineProperty(r,"__esModule",{value:!0}),r.SnackbarInstance=r.SnackbarContainer=r.Snackbar=void 0;const t=e(rK),n=mK,i=qIe,s=da,o=e(nR),a="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNDkyIDEwLjQxOWE4LjkzIDguOTMgMCAwMTguOTMtOC45M2gxMS4xNjNhOC45MyA4LjkzIDAgMDE4LjkzIDguOTN2MTEuMTYzYTguOTMgOC45MyAwIDAxLTguOTMgOC45M0gxMC40MjJhOC45MyA4LjkzIDAgMDEtOC45My04LjkzVjEwLjQxOXoiIGZpbGw9IiMxNjUyRjAiLz48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEwLjQxOSAwSDIxLjU4QzI3LjMzNSAwIDMyIDQuNjY1IDMyIDEwLjQxOVYyMS41OEMzMiAyNy4zMzUgMjcuMzM1IDMyIDIxLjU4MSAzMkgxMC40MkM0LjY2NSAzMiAwIDI3LjMzNSAwIDIxLjU4MVYxMC40MkMwIDQuNjY1IDQuNjY1IDAgMTAuNDE5IDB6bTAgMS40ODhhOC45MyA4LjkzIDAgMDAtOC45MyA4LjkzdjExLjE2M2E4LjkzIDguOTMgMCAwMDguOTMgOC45M0gyMS41OGE4LjkzIDguOTMgMCAwMDguOTMtOC45M1YxMC40MmE4LjkzIDguOTMgMCAwMC04LjkzLTguOTNIMTAuNDJ6IiBmaWxsPSIjZmZmIi8+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNS45OTggMjYuMDQ5Yy01LjU0OSAwLTEwLjA0Ny00LjQ5OC0xMC4wNDctMTAuMDQ3IDAtNS41NDggNC40OTgtMTAuMDQ2IDEwLjA0Ny0xMC4wNDYgNS41NDggMCAxMC4wNDYgNC40OTggMTAuMDQ2IDEwLjA0NiAwIDUuNTQ5LTQuNDk4IDEwLjA0Ny0xMC4wNDYgMTAuMDQ3eiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGQ9Ik0xMi43NjIgMTQuMjU0YzAtLjgyMi42NjctMS40ODkgMS40ODktMS40ODloMy40OTdjLjgyMiAwIDEuNDg4LjY2NiAxLjQ4OCAxLjQ4OXYzLjQ5N2MwIC44MjItLjY2NiAxLjQ4OC0xLjQ4OCAxLjQ4OGgtMy40OTdhMS40ODggMS40ODggMCAwMS0xLjQ4OS0xLjQ4OHYtMy40OTh6IiBmaWxsPSIjMTY1MkYwIi8+PC9zdmc+",c="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDYuNzV2LTEuNWwtMS43Mi0uNTdjLS4wOC0uMjctLjE5LS41Mi0uMzItLjc3bC44MS0xLjYyLTEuMDYtMS4wNi0xLjYyLjgxYy0uMjQtLjEzLS41LS4yNC0uNzctLjMyTDYuNzUgMGgtMS41bC0uNTcgMS43MmMtLjI3LjA4LS41My4xOS0uNzcuMzJsLTEuNjItLjgxLTEuMDYgMS4wNi44MSAxLjYyYy0uMTMuMjQtLjI0LjUtLjMyLjc3TDAgNS4yNXYxLjVsMS43Mi41N2MuMDguMjcuMTkuNTMuMzIuNzdsLS44MSAxLjYyIDEuMDYgMS4wNiAxLjYyLS44MWMuMjQuMTMuNS4yMy43Ny4zMkw1LjI1IDEyaDEuNWwuNTctMS43MmMuMjctLjA4LjUyLS4xOS43Ny0uMzJsMS42Mi44MSAxLjA2LTEuMDYtLjgxLTEuNjJjLjEzLS4yNC4yMy0uNS4zMi0uNzdMMTIgNi43NXpNNiA4LjVhMi41IDIuNSAwIDAxMC01IDIuNSAyLjUgMCAwMTAgNXoiIGZpbGw9IiMwNTBGMTkiLz48L3N2Zz4=";class l{constructor(){this.items=new Map,this.nextItemKey=0,this.root=null,this.darkMode=(0,s.isDarkMode)()}attach(y){this.root=document.createElement("div"),this.root.className="-cbwsdk-snackbar-root",y.appendChild(this.root),this.render()}presentItem(y){const A=this.nextItemKey++;return this.items.set(A,y),this.render(),()=>{this.items.delete(A),this.render()}}clear(){this.items.clear(),this.render()}render(){this.root&&(0,n.render)((0,n.h)("div",null,(0,n.h)(r.SnackbarContainer,{darkMode:this.darkMode},Array.from(this.items.entries()).map(([y,A])=>(0,n.h)(r.SnackbarInstance,Object.assign({},A,{key:y}))))),this.root)}}r.Snackbar=l;const h=v=>(0,n.h)("div",{class:(0,t.default)("-cbwsdk-snackbar-container")},(0,n.h)("style",null,o.default),(0,n.h)("div",{class:"-cbwsdk-snackbar"},v.children));r.SnackbarContainer=h;const f=({autoExpand:v,message:y,menuItems:A})=>{const[M,$]=(0,i.useState)(!0),[L,P]=(0,i.useState)(v??!1);(0,i.useEffect)(()=>{const F=[window.setTimeout(()=>{$(!1)},1),window.setTimeout(()=>{P(!0)},1e4)];return()=>{F.forEach(window.clearTimeout)}});const H=()=>{P(!L)};return(0,n.h)("div",{class:(0,t.default)("-cbwsdk-snackbar-instance",M&&"-cbwsdk-snackbar-instance-hidden",L&&"-cbwsdk-snackbar-instance-expanded")},(0,n.h)("div",{class:"-cbwsdk-snackbar-instance-header",onClick:H},(0,n.h)("img",{src:a,class:"-cbwsdk-snackbar-instance-header-cblogo"})," ",(0,n.h)("div",{class:"-cbwsdk-snackbar-instance-header-message"},y),(0,n.h)("div",{class:"-gear-container"},!L&&(0,n.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("circle",{cx:"12",cy:"12",r:"12",fill:"#F5F7F8"})),(0,n.h)("img",{src:c,class:"-gear-icon",title:"Expand"}))),A&&A.length>0&&(0,n.h)("div",{class:"-cbwsdk-snackbar-instance-menu"},A.map((F,q)=>(0,n.h)("div",{class:(0,t.default)("-cbwsdk-snackbar-instance-menu-item",F.isRed&&"-cbwsdk-snackbar-instance-menu-item-is-red"),onClick:F.onClick,key:q},(0,n.h)("svg",{width:F.svgWidth,height:F.svgHeight,viewBox:"0 0 10 11",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("path",{"fill-rule":F.defaultFillRule,"clip-rule":F.defaultClipRule,d:F.path,fill:"#AAAAAA"})),(0,n.h)("span",{class:(0,t.default)("-cbwsdk-snackbar-instance-menu-item-info",F.isRed&&"-cbwsdk-snackbar-instance-menu-item-info-is-red")},F.info)))))};r.SnackbarInstance=f})(QT);Object.defineProperty(Rx,"__esModule",{value:!0});Rx.WalletLinkRelayUI=void 0;const KIe=xb,GIe=QT;class ZIe{constructor(){this.attached=!1,this.snackbar=new GIe.Snackbar}attach(){if(this.attached)throw new Error("Coinbase Wallet SDK UI is already attached");const e=document.documentElement,t=document.createElement("div");t.className="-cbwsdk-css-reset",e.appendChild(t),this.snackbar.attach(t),this.attached=!0,(0,KIe.injectCssReset)()}showConnecting(e){let t;return e.isUnlinkedErrorState?t={autoExpand:!0,message:"Connection lost",menuItems:[{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:e.onResetConnection}]}:t={message:"Confirm on phone",menuItems:[{isRed:!0,info:"Cancel transaction",svgWidth:"11",svgHeight:"11",path:"M10.3711 1.52346L9.21775 0.370117L5.37109 4.21022L1.52444 0.370117L0.371094 1.52346L4.2112 5.37012L0.371094 9.21677L1.52444 10.3701L5.37109 6.53001L9.21775 10.3701L10.3711 9.21677L6.53099 5.37012L10.3711 1.52346Z",defaultFillRule:"inherit",defaultClipRule:"inherit",onClick:e.onCancel},{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:e.onResetConnection}]},this.snackbar.presentItem(t)}}Rx.WalletLinkRelayUI=ZIe;var Nx={},Px={},iR={};Object.defineProperty(iR,"__esModule",{value:!0});iR.default=".-cbwsdk-css-reset .-cbwsdk-redirect-dialog-backdrop{position:fixed;top:0;left:0;right:0;bottom:0;transition:opacity .25s;background-color:rgba(10,11,13,.5)}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-backdrop-hidden{opacity:0}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box{display:block;position:fixed;top:50%;left:50%;transform:translate(-50%, -50%);padding:20px;border-radius:8px;background-color:#fff;color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box p{display:block;font-weight:400;font-size:14px;line-height:20px;padding-bottom:12px;color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box button{appearance:none;border:none;background:none;color:#0052ff;padding:0;text-decoration:none;display:block;font-weight:600;font-size:16px;line-height:24px}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.dark{background-color:#0a0b0d;color:#fff}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.dark button{color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.light{background-color:#fff;color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.light button{color:#0052ff}";var xK=Yr&&Yr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Px,"__esModule",{value:!0});Px.RedirectDialog=void 0;const YIe=xK(rK),Gl=mK,QIe=xb,JIe=QT,XIe=da,eTe=xK(iR);class tTe{constructor(){this.root=null,this.darkMode=(0,XIe.isDarkMode)()}attach(){const e=document.documentElement;this.root=document.createElement("div"),this.root.className="-cbwsdk-css-reset",e.appendChild(this.root),(0,QIe.injectCssReset)()}present(e){this.render(e)}clear(){this.render(null)}render(e){this.root&&((0,Gl.render)(null,this.root),e&&(0,Gl.render)((0,Gl.h)(rTe,Object.assign({},e,{onDismiss:()=>{this.clear()},darkMode:this.darkMode})),this.root))}}Px.RedirectDialog=tTe;const rTe=({title:r,buttonText:e,darkMode:t,onButtonClick:n,onDismiss:i})=>{const s=t?"dark":"light";return(0,Gl.h)(JIe.SnackbarContainer,{darkMode:t},(0,Gl.h)("div",{class:"-cbwsdk-redirect-dialog"},(0,Gl.h)("style",null,eTe.default),(0,Gl.h)("div",{class:"-cbwsdk-redirect-dialog-backdrop",onClick:i}),(0,Gl.h)("div",{class:(0,YIe.default)("-cbwsdk-redirect-dialog-box",s)},(0,Gl.h)("p",null,r),(0,Gl.h)("button",{onClick:n},e))))};var Iu={};Object.defineProperty(Iu,"__esModule",{value:!0});Iu.CBW_MOBILE_DEEPLINK_URL=Iu.WALLETLINK_URL=Iu.CB_KEYS_URL=void 0;Iu.CB_KEYS_URL="https://keys.coinbase.com/connect";Iu.WALLETLINK_URL="https://www.walletlink.org";Iu.CBW_MOBILE_DEEPLINK_URL="https://go.cb-w.com/walletlink";Object.defineProperty(Nx,"__esModule",{value:!0});Nx.WLMobileRelayUI=void 0;const nTe=Px,iTe=da,sTe=Iu;class oTe{constructor(){this.attached=!1,this.redirectDialog=new nTe.RedirectDialog}attach(){if(this.attached)throw new Error("Coinbase Wallet SDK UI is already attached");this.redirectDialog.attach(),this.attached=!0}redirectToCoinbaseWallet(e){const t=new URL(sTe.CBW_MOBILE_DEEPLINK_URL);t.searchParams.append("redirect_url",(0,iTe.getLocation)().href),e&&t.searchParams.append("wl_url",e);const n=document.createElement("a");n.target="cbw-opener",n.href=t.href,n.rel="noreferrer noopener",n.click()}openCoinbaseWalletDeeplink(e){this.redirectDialog.present({title:"Redirecting to Coinbase Wallet...",buttonText:"Open",onButtonClick:()=>{this.redirectToCoinbaseWallet(e)}}),setTimeout(()=>{this.redirectToCoinbaseWallet(e)},99)}showConnecting(e){return()=>{this.redirectDialog.clear()}}}Nx.WLMobileRelayUI=oTe;Object.defineProperty(_x,"__esModule",{value:!0});_x.WalletLinkRelay=void 0;const aTe=xx,cTe=Su,lTe=wb,s9=Cx,wg=d2,uTe=da,hTe=Rx,sL=Nx,dTe=th,ui=Jt,fTe=rh;class Ph{constructor(e){this.accountsCallback=null,this.chainCallbackParams={chainId:"",jsonRpcUrl:""},this.chainCallback=null,this.dappDefaultChain=1,this.isMobileWeb=(0,uTe.isMobileWeb)(),this.appName="",this.appLogoUrl=null,this.linkedUpdated=s=>{this.isLinked=s;const o=this.storage.getItem(cTe.LOCAL_STORAGE_ADDRESSES_KEY);if(s&&(this._session.linked=s),this.isUnlinkedErrorState=!1,o){const a=o.split(" "),c=this.storage.getItem("IsStandaloneSigning")==="true";a[0]!==""&&!s&&this._session.linked&&!c&&(this.isUnlinkedErrorState=!0)}},this.metadataUpdated=(s,o)=>{this.storage.setItem(s,o)},this.chainUpdated=(s,o)=>{this.chainCallbackParams.chainId===s&&this.chainCallbackParams.jsonRpcUrl===o||(this.chainCallbackParams={chainId:s,jsonRpcUrl:o},this.chainCallback&&this.chainCallback(s,o))},this.accountUpdated=s=>{this.accountsCallback&&this.accountsCallback([s]),Ph.accountRequestCallbackIds.size>0&&(Array.from(Ph.accountRequestCallbackIds.values()).forEach(o=>{const a={type:"WEB3_RESPONSE",id:o,response:{method:"requestEthereumAccounts",result:[s]}};this.invokeCallback(Object.assign(Object.assign({},a),{id:o}))}),Ph.accountRequestCallbackIds.clear())},this.resetAndReload=this.resetAndReload.bind(this),this.linkAPIUrl=e.linkAPIUrl,this.storage=e.storage;const{session:t,ui:n,connection:i}=this.subscribe();this._session=t,this.connection=i,this.relayEventManager=new lTe.RelayEventManager,this.ui=n}subscribe(){const e=s9.WalletLinkSession.load(this.storage)||new s9.WalletLinkSession(this.storage).save(),{linkAPIUrl:t}=this,n=new aTe.WalletLinkConnection({session:e,linkAPIUrl:t,listener:this}),i=this.isMobileWeb?new sL.WLMobileRelayUI:new hTe.WalletLinkRelayUI;return n.connect(),{session:e,ui:i,connection:n}}attachUI(){this.ui.attach()}resetAndReload(){Promise.race([this.connection.setSessionMetadata("__destroyed","1"),new Promise(e=>setTimeout(()=>e(null),1e3))]).then(()=>{this.connection.destroy();const e=s9.WalletLinkSession.load(this.storage);(e==null?void 0:e.id)===this._session.id&&fTe.ScopedLocalStorage.clearAll(),document.location.reload()}).catch(e=>{})}setAppInfo(e,t){this.appName=e,this.appLogoUrl=t}getStorageItem(e){return this.storage.getItem(e)}setStorageItem(e,t){this.storage.setItem(e,t)}signEthereumMessage(e,t,n,i){return this.sendRequest({method:"signEthereumMessage",params:{message:(0,ui.hexStringFromBuffer)(e,!0),address:t,addPrefix:n,typedDataJson:i||null}})}ethereumAddressFromSignedMessage(e,t,n){return this.sendRequest({method:"ethereumAddressFromSignedMessage",params:{message:(0,ui.hexStringFromBuffer)(e,!0),signature:(0,ui.hexStringFromBuffer)(t,!0),addPrefix:n}})}signEthereumTransaction(e){return this.sendRequest({method:"signEthereumTransaction",params:{fromAddress:e.fromAddress,toAddress:e.toAddress,weiValue:(0,ui.bigIntStringFromBigInt)(e.weiValue),data:(0,ui.hexStringFromBuffer)(e.data,!0),nonce:e.nonce,gasPriceInWei:e.gasPriceInWei?(0,ui.bigIntStringFromBigInt)(e.gasPriceInWei):null,maxFeePerGas:e.gasPriceInWei?(0,ui.bigIntStringFromBigInt)(e.gasPriceInWei):null,maxPriorityFeePerGas:e.gasPriceInWei?(0,ui.bigIntStringFromBigInt)(e.gasPriceInWei):null,gasLimit:e.gasLimit?(0,ui.bigIntStringFromBigInt)(e.gasLimit):null,chainId:e.chainId,shouldSubmit:!1}})}signAndSubmitEthereumTransaction(e){return this.sendRequest({method:"signEthereumTransaction",params:{fromAddress:e.fromAddress,toAddress:e.toAddress,weiValue:(0,ui.bigIntStringFromBigInt)(e.weiValue),data:(0,ui.hexStringFromBuffer)(e.data,!0),nonce:e.nonce,gasPriceInWei:e.gasPriceInWei?(0,ui.bigIntStringFromBigInt)(e.gasPriceInWei):null,maxFeePerGas:e.maxFeePerGas?(0,ui.bigIntStringFromBigInt)(e.maxFeePerGas):null,maxPriorityFeePerGas:e.maxPriorityFeePerGas?(0,ui.bigIntStringFromBigInt)(e.maxPriorityFeePerGas):null,gasLimit:e.gasLimit?(0,ui.bigIntStringFromBigInt)(e.gasLimit):null,chainId:e.chainId,shouldSubmit:!0}})}submitEthereumTransaction(e,t){return this.sendRequest({method:"submitEthereumTransaction",params:{signedTransaction:(0,ui.hexStringFromBuffer)(e,!0),chainId:t}})}scanQRCode(e){return this.sendRequest({method:"scanQRCode",params:{regExp:e}})}getWalletLinkSession(){return this._session}genericRequest(e,t){return this.sendRequest({method:"generic",params:{action:t,data:e}})}sendGenericMessage(e){return this.sendRequest(e)}sendRequest(e){let t=null;const n=(0,ui.randomBytesHex)(8),i=s=>{this.publishWeb3RequestCanceledEvent(n),this.handleErrorResponse(n,e.method,s),t==null||t()};return new Promise((s,o)=>{t=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:i,onResetConnection:this.resetAndReload}),this.relayEventManager.callbacks.set(n,a=>{if(t==null||t(),(0,wg.isErrorResponse)(a))return o(new Error(a.errorMessage));s(a)}),this.publishWeb3RequestEvent(n,e)})}setAccountsCallback(e){this.accountsCallback=e}setChainCallback(e){this.chainCallback=e}setDappDefaultChainCallback(e){this.dappDefaultChain=e}publishWeb3RequestEvent(e,t){const n={type:"WEB3_REQUEST",id:e,request:t};this.publishEvent("Web3Request",n,!0).then(i=>{}).catch(i=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:n.id,response:{method:t.method,errorMessage:i.message}})}),this.isMobileWeb&&this.openCoinbaseWalletDeeplink(t.method)}openCoinbaseWalletDeeplink(e){if(this.ui instanceof sL.WLMobileRelayUI)switch(e){case"requestEthereumAccounts":case"switchEthereumChain":return;default:window.addEventListener("blur",()=>{window.addEventListener("focus",()=>{this.connection.checkUnseenEvents()},{once:!0})},{once:!0}),this.ui.openCoinbaseWalletDeeplink();break}}publishWeb3RequestCanceledEvent(e){const t={type:"WEB3_REQUEST_CANCELED",id:e};this.publishEvent("Web3RequestCanceled",t,!1).then()}publishEvent(e,t,n){return this.connection.publishEvent(e,t,n)}handleWeb3ResponseMessage(e){const{response:t}=e;if(t.method==="requestEthereumAccounts"){Ph.accountRequestCallbackIds.forEach(n=>this.invokeCallback(Object.assign(Object.assign({},e),{id:n}))),Ph.accountRequestCallbackIds.clear();return}this.invokeCallback(e)}handleErrorResponse(e,t,n){var i;const s=(i=n==null?void 0:n.message)!==null&&i!==void 0?i:"Unspecified error message.";this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:e,response:{method:t,errorMessage:s}})}invokeCallback(e){const t=this.relayEventManager.callbacks.get(e.id);t&&(t(e.response),this.relayEventManager.callbacks.delete(e.id))}requestEthereumAccounts(){const e={method:"requestEthereumAccounts",params:{appName:this.appName,appLogoUrl:this.appLogoUrl||null}},t=(0,ui.randomBytesHex)(8);return new Promise((n,i)=>{this.relayEventManager.callbacks.set(t,s=>{if((0,wg.isErrorResponse)(s))return i(new Error(s.errorMessage));n(s)}),Ph.accountRequestCallbackIds.add(t),this.publishWeb3RequestEvent(t,e)})}watchAsset(e,t,n,i,s,o){const a={method:"watchAsset",params:{type:e,options:{address:t,symbol:n,decimals:i,image:s},chainId:o}};let c=null;const l=(0,ui.randomBytesHex)(8),h=f=>{this.publishWeb3RequestCanceledEvent(l),this.handleErrorResponse(l,a.method,f),c==null||c()};return c=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:h,onResetConnection:this.resetAndReload}),new Promise((f,v)=>{this.relayEventManager.callbacks.set(l,y=>{if(c==null||c(),(0,wg.isErrorResponse)(y))return v(new Error(y.errorMessage));f(y)}),this.publishWeb3RequestEvent(l,a)})}addEthereumChain(e,t,n,i,s,o){const a={method:"addEthereumChain",params:{chainId:e,rpcUrls:t,blockExplorerUrls:i,chainName:s,iconUrls:n,nativeCurrency:o}};let c=null;const l=(0,ui.randomBytesHex)(8),h=f=>{this.publishWeb3RequestCanceledEvent(l),this.handleErrorResponse(l,a.method,f),c==null||c()};return c=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:h,onResetConnection:this.resetAndReload}),new Promise((f,v)=>{this.relayEventManager.callbacks.set(l,y=>{if(c==null||c(),(0,wg.isErrorResponse)(y))return v(new Error(y.errorMessage));f(y)}),this.publishWeb3RequestEvent(l,a)})}switchEthereumChain(e,t){const n={method:"switchEthereumChain",params:Object.assign({chainId:e},{address:t})},i=(0,ui.randomBytesHex)(8);return new Promise((s,o)=>{this.relayEventManager.callbacks.set(i,a=>{if((0,wg.isErrorResponse)(a)&&a.errorCode)return o(dTe.standardErrors.provider.custom({code:a.errorCode,message:"Unrecognized chain ID. Try adding the chain using addEthereumChain first."}));if((0,wg.isErrorResponse)(a))return o(new Error(a.errorMessage));s(a)}),this.publishWeb3RequestEvent(i,n)})}}_x.WalletLinkRelay=Ph;Ph.accountRequestCallbackIds=new Set;var pTe=Yr&&Yr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(wx,"__esModule",{value:!0});wx.WalletLinkSigner=void 0;const o9=pTe(dSe),oL=Su,gTe=wb,xh=d2,mTe=_x,aL=Iu,Ki=th,Vr=Jt,wTe=rh,a9="DefaultChainId",cL="DefaultJsonRpcUrl";class vTe{constructor(e){var t,n;this._relay=null,this._addresses=[],this.hasMadeFirstChainChangedEmission=!1;const{appName:i,appLogoUrl:s}=e.metadata;this._appName=i,this._appLogoUrl=s,this._storage=new wTe.ScopedLocalStorage("walletlink",aL.WALLETLINK_URL),this.updateListener=e.updateListener,this._relayEventManager=new gTe.RelayEventManager,this._jsonRpcUrlFromOpts="";const o=this._storage.getItem(oL.LOCAL_STORAGE_ADDRESSES_KEY);if(o){const c=o.split(" ");c[0]!==""&&(this._addresses=c.map(l=>(0,Vr.ensureAddressString)(l)),(t=this.updateListener)===null||t===void 0||t.onAccountsUpdate({accounts:this._addresses,source:"storage"}))}this._storage.getItem(a9)&&((n=this.updateListener)===null||n===void 0||n.onChainUpdate({chain:{id:this.getChainId(),rpcUrl:this.jsonRpcUrl},source:"storage"}),this.hasMadeFirstChainChangedEmission=!0),this.initializeRelay()}getSession(){const e=this.initializeRelay(),{id:t,secret:n}=e.getWalletLinkSession();return{id:t,secret:n}}async handshake(){return await this.request({method:"eth_requestAccounts"})}get selectedAddress(){return this._addresses[0]||void 0}get jsonRpcUrl(){var e;return(e=this._storage.getItem(cL))!==null&&e!==void 0?e:this._jsonRpcUrlFromOpts}set jsonRpcUrl(e){this._storage.setItem(cL,e)}updateProviderInfo(e,t){var n;this.jsonRpcUrl=e;const i=this.getChainId();this._storage.setItem(a9,t.toString(10)),((0,Vr.ensureIntNumber)(t)!==i||!this.hasMadeFirstChainChangedEmission)&&((n=this.updateListener)===null||n===void 0||n.onChainUpdate({chain:{id:t,rpcUrl:e},source:"wallet"}),this.hasMadeFirstChainChangedEmission=!0)}async watchAsset(e,t,n,i,s,o){const c=await this.initializeRelay().watchAsset(e,t,n,i,s,o==null?void 0:o.toString());return(0,xh.isErrorResponse)(c)?!1:!!c.result}async addEthereumChain(e,t,n,i,s,o){var a,c;if((0,Vr.ensureIntNumber)(e)===this.getChainId())return!1;const l=this.initializeRelay();this._isAuthorized()||await l.requestEthereumAccounts();const h=await l.addEthereumChain(e.toString(),t,s,n,i,o);return(0,xh.isErrorResponse)(h)?!1:(((a=h.result)===null||a===void 0?void 0:a.isApproved)===!0&&this.updateProviderInfo(t[0],e),((c=h.result)===null||c===void 0?void 0:c.isApproved)===!0)}async switchEthereumChain(e){const n=await this.initializeRelay().switchEthereumChain(e.toString(10),this.selectedAddress||void 0);if((0,xh.isErrorResponse)(n)){if(!n.errorCode)return;throw n.errorCode===Ki.standardErrorCodes.provider.unsupportedChain?Ki.standardErrors.provider.unsupportedChain():Ki.standardErrors.provider.custom({message:n.errorMessage,code:n.errorCode})}const i=n.result;i.isApproved&&i.rpcUrl.length>0&&this.updateProviderInfo(i.rpcUrl,e)}async disconnect(){this._relay&&this._relay.resetAndReload(),this._storage.clear()}async request(e){try{return this._request(e).catch(t=>{throw t})}catch(t){return Promise.reject(t)}}async _request(e){if(!e||typeof e!="object"||Array.isArray(e))throw Ki.standardErrors.rpc.invalidRequest({message:"Expected a single, non-array, object argument.",data:e});const{method:t,params:n}=e;if(typeof t!="string"||t.length===0)throw Ki.standardErrors.rpc.invalidRequest({message:"'args.method' must be a non-empty string.",data:e});if(n!==void 0&&!Array.isArray(n)&&(typeof n!="object"||n===null))throw Ki.standardErrors.rpc.invalidRequest({message:"'args.params' must be an object or array if provided.",data:e});const i=n===void 0?[]:n,s=this._relayEventManager.makeRequestId();return(await this._sendRequestAsync({method:t,params:i,jsonrpc:"2.0",id:s})).result}_setAddresses(e,t){var n;if(!Array.isArray(e))throw new Error("addresses is not an array");const i=e.map(s=>(0,Vr.ensureAddressString)(s));JSON.stringify(i)!==JSON.stringify(this._addresses)&&(this._addresses=i,(n=this.updateListener)===null||n===void 0||n.onAccountsUpdate({accounts:i,source:"wallet"}),this._storage.setItem(oL.LOCAL_STORAGE_ADDRESSES_KEY,i.join(" ")))}_sendRequestAsync(e){return new Promise((t,n)=>{try{const i=this._handleSynchronousMethods(e);if(i!==void 0)return t({jsonrpc:"2.0",id:e.id,result:i})}catch(i){return n(i)}this._handleAsynchronousMethods(e).then(i=>i&&t(Object.assign(Object.assign({},i),{id:e.id}))).catch(i=>n(i))})}_handleSynchronousMethods(e){const{method:t}=e;switch(t){case"eth_accounts":return this._eth_accounts();case"eth_coinbase":return this._eth_coinbase();case"net_version":return this._net_version();case"eth_chainId":return this._eth_chainId();default:return}}async _handleAsynchronousMethods(e){const{method:t}=e,n=e.params||[];switch(t){case"eth_requestAccounts":return this._eth_requestAccounts();case"eth_sign":return this._eth_sign(n);case"eth_ecRecover":return this._eth_ecRecover(n);case"personal_sign":return this._personal_sign(n);case"personal_ecRecover":return this._personal_ecRecover(n);case"eth_signTransaction":return this._eth_signTransaction(n);case"eth_sendRawTransaction":return this._eth_sendRawTransaction(n);case"eth_sendTransaction":return this._eth_sendTransaction(n);case"eth_signTypedData_v1":return this._eth_signTypedData_v1(n);case"eth_signTypedData_v2":return this._throwUnsupportedMethodError();case"eth_signTypedData_v3":return this._eth_signTypedData_v3(n);case"eth_signTypedData_v4":case"eth_signTypedData":return this._eth_signTypedData_v4(n);case"wallet_addEthereumChain":return this._wallet_addEthereumChain(n);case"wallet_switchEthereumChain":return this._wallet_switchEthereumChain(n);case"wallet_watchAsset":return this._wallet_watchAsset(n);default:return this._throwUnsupportedMethodError()}}_isKnownAddress(e){try{const t=(0,Vr.ensureAddressString)(e);return this._addresses.map(i=>(0,Vr.ensureAddressString)(i)).includes(t)}catch{}return!1}_ensureKnownAddress(e){if(!this._isKnownAddress(e))throw new Error("Unknown Ethereum address")}_prepareTransactionParams(e){const t=e.from?(0,Vr.ensureAddressString)(e.from):this.selectedAddress;if(!t)throw new Error("Ethereum address is unavailable");this._ensureKnownAddress(t);const n=e.to?(0,Vr.ensureAddressString)(e.to):null,i=e.value!=null?(0,Vr.ensureBigInt)(e.value):BigInt(0),s=e.data?(0,Vr.ensureBuffer)(e.data):Buffer.alloc(0),o=e.nonce!=null?(0,Vr.ensureIntNumber)(e.nonce):null,a=e.gasPrice!=null?(0,Vr.ensureBigInt)(e.gasPrice):null,c=e.maxFeePerGas!=null?(0,Vr.ensureBigInt)(e.maxFeePerGas):null,l=e.maxPriorityFeePerGas!=null?(0,Vr.ensureBigInt)(e.maxPriorityFeePerGas):null,h=e.gas!=null?(0,Vr.ensureBigInt)(e.gas):null,f=e.chainId?(0,Vr.ensureIntNumber)(e.chainId):this.getChainId();return{fromAddress:t,toAddress:n,weiValue:i,data:s,nonce:o,gasPriceInWei:a,maxFeePerGas:c,maxPriorityFeePerGas:l,gasLimit:h,chainId:f}}_isAuthorized(){return this._addresses.length>0}_requireAuthorization(){if(!this._isAuthorized())throw Ki.standardErrors.provider.unauthorized({})}_throwUnsupportedMethodError(){throw Ki.standardErrors.provider.unsupportedMethod({})}async _signEthereumMessage(e,t,n,i){this._ensureKnownAddress(t);try{const o=await this.initializeRelay().signEthereumMessage(e,t,n,i);if((0,xh.isErrorResponse)(o))throw new Error(o.errorMessage);return{jsonrpc:"2.0",id:0,result:o.result}}catch(s){throw typeof s.message=="string"&&s.message.match(/(denied|rejected)/i)?Ki.standardErrors.provider.userRejectedRequest("User denied message signature"):s}}async _ethereumAddressFromSignedMessage(e,t,n){const s=await this.initializeRelay().ethereumAddressFromSignedMessage(e,t,n);if((0,xh.isErrorResponse)(s))throw new Error(s.errorMessage);return{jsonrpc:"2.0",id:0,result:s.result}}_eth_accounts(){return[...this._addresses]}_eth_coinbase(){return this.selectedAddress||null}_net_version(){return this.getChainId().toString(10)}_eth_chainId(){return(0,Vr.hexStringFromIntNumber)(this.getChainId())}getChainId(){const e=this._storage.getItem(a9);if(!e)return(0,Vr.ensureIntNumber)(1);const t=parseInt(e,10);return(0,Vr.ensureIntNumber)(t)}async _eth_requestAccounts(){if(this._isAuthorized())return Promise.resolve({jsonrpc:"2.0",id:0,result:this._addresses});let e;try{if(e=await this.initializeRelay().requestEthereumAccounts(),(0,xh.isErrorResponse)(e))throw new Error(e.errorMessage)}catch(t){throw typeof t.message=="string"&&t.message.match(/(denied|rejected)/i)?Ki.standardErrors.provider.userRejectedRequest("User denied account authorization"):t}if(!e.result)throw new Error("accounts received is empty");return this._setAddresses(e.result),{jsonrpc:"2.0",id:0,result:this._addresses}}_eth_sign(e){this._requireAuthorization();const t=(0,Vr.ensureAddressString)(e[0]),n=(0,Vr.ensureBuffer)(e[1]);return this._signEthereumMessage(n,t,!1)}_eth_ecRecover(e){const t=(0,Vr.ensureBuffer)(e[0]),n=(0,Vr.ensureBuffer)(e[1]);return this._ethereumAddressFromSignedMessage(t,n,!1)}_personal_sign(e){this._requireAuthorization();const t=(0,Vr.ensureBuffer)(e[0]),n=(0,Vr.ensureAddressString)(e[1]);return this._signEthereumMessage(t,n,!0)}_personal_ecRecover(e){const t=(0,Vr.ensureBuffer)(e[0]),n=(0,Vr.ensureBuffer)(e[1]);return this._ethereumAddressFromSignedMessage(t,n,!0)}async _eth_signTransaction(e){this._requireAuthorization();const t=this._prepareTransactionParams(e[0]||{});try{const i=await this.initializeRelay().signEthereumTransaction(t);if((0,xh.isErrorResponse)(i))throw new Error(i.errorMessage);return{jsonrpc:"2.0",id:0,result:i.result}}catch(n){throw typeof n.message=="string"&&n.message.match(/(denied|rejected)/i)?Ki.standardErrors.provider.userRejectedRequest("User denied transaction signature"):n}}async _eth_sendRawTransaction(e){const t=(0,Vr.ensureBuffer)(e[0]),i=await this.initializeRelay().submitEthereumTransaction(t,this.getChainId());if((0,xh.isErrorResponse)(i))throw new Error(i.errorMessage);return{jsonrpc:"2.0",id:0,result:i.result}}async _eth_sendTransaction(e){this._requireAuthorization();const t=this._prepareTransactionParams(e[0]||{});try{const i=await this.initializeRelay().signAndSubmitEthereumTransaction(t);if((0,xh.isErrorResponse)(i))throw new Error(i.errorMessage);return{jsonrpc:"2.0",id:0,result:i.result}}catch(n){throw typeof n.message=="string"&&n.message.match(/(denied|rejected)/i)?Ki.standardErrors.provider.userRejectedRequest("User denied transaction signature"):n}}async _eth_signTypedData_v1(e){this._requireAuthorization();const t=(0,Vr.ensureParsedJSONObject)(e[0]),n=(0,Vr.ensureAddressString)(e[1]);this._ensureKnownAddress(n);const i=o9.default.hashForSignTypedDataLegacy({data:t}),s=JSON.stringify(t,null,2);return this._signEthereumMessage(i,n,!1,s)}async _eth_signTypedData_v3(e){this._requireAuthorization();const t=(0,Vr.ensureAddressString)(e[0]),n=(0,Vr.ensureParsedJSONObject)(e[1]);this._ensureKnownAddress(t);const i=o9.default.hashForSignTypedData_v3({data:n}),s=JSON.stringify(n,null,2);return this._signEthereumMessage(i,t,!1,s)}async _eth_signTypedData_v4(e){this._requireAuthorization();const t=(0,Vr.ensureAddressString)(e[0]),n=(0,Vr.ensureParsedJSONObject)(e[1]);this._ensureKnownAddress(t);const i=o9.default.hashForSignTypedData_v4({data:n}),s=JSON.stringify(n,null,2);return this._signEthereumMessage(i,t,!1,s)}async _wallet_addEthereumChain(e){var t,n,i,s;const o=e[0];if(((t=o.rpcUrls)===null||t===void 0?void 0:t.length)===0)return{jsonrpc:"2.0",id:0,error:{code:2,message:"please pass in at least 1 rpcUrl"}};if(!o.chainName||o.chainName.trim()==="")throw Ki.standardErrors.rpc.invalidParams("chainName is a required field");if(!o.nativeCurrency)throw Ki.standardErrors.rpc.invalidParams("nativeCurrency is a required field");const a=parseInt(o.chainId,16);return await this.addEthereumChain(a,(n=o.rpcUrls)!==null&&n!==void 0?n:[],(i=o.blockExplorerUrls)!==null&&i!==void 0?i:[],o.chainName,(s=o.iconUrls)!==null&&s!==void 0?s:[],o.nativeCurrency)?{jsonrpc:"2.0",id:0,result:null}:{jsonrpc:"2.0",id:0,error:{code:2,message:"unable to add ethereum chain"}}}async _wallet_switchEthereumChain(e){const t=e[0];return await this.switchEthereumChain(parseInt(t.chainId,16)),{jsonrpc:"2.0",id:0,result:null}}async _wallet_watchAsset(e){const t=Array.isArray(e)?e[0]:e;if(!t.type)throw Ki.standardErrors.rpc.invalidParams("Type is required");if((t==null?void 0:t.type)!=="ERC20")throw Ki.standardErrors.rpc.invalidParams(`Asset of type '${t.type}' is not supported`);if(!(t!=null&&t.options))throw Ki.standardErrors.rpc.invalidParams("Options are required");if(!(t!=null&&t.options.address))throw Ki.standardErrors.rpc.invalidParams("Address is required");const n=this.getChainId(),{address:i,symbol:s,image:o,decimals:a}=t.options;return{jsonrpc:"2.0",id:0,result:await this.watchAsset(t.type,i,s,a,o,n)}}initializeRelay(){if(!this._relay){const e=new mTe.WalletLinkRelay({linkAPIUrl:aL.WALLETLINK_URL,storage:this._storage});e.setAppInfo(this._appName,this._appLogoUrl),e.attachUI(),e.setAccountsCallback((t,n)=>this._setAddresses(t,n)),e.setChainCallback((t,n)=>{this.updateProviderInfo(n,parseInt(t,10))}),this._relay=e}return this._relay}}wx.WalletLinkSigner=vTe;var cc={};Object.defineProperty(cc,"__esModule",{value:!0});cc.checkErrorForInvalidRequestArgs=cc.getCoinbaseInjectedProvider=cc.getCoinbaseInjectedSigner=cc.fetchRPCRequest=void 0;const yTe=$1,t6=th;async function bTe(r,e){if(!e.rpcUrl)throw t6.standardErrors.rpc.internal("No RPC URL set for chain");const t=Object.assign(Object.assign({},r),{jsonrpc:"2.0",id:crypto.randomUUID()});return(await(await window.fetch(e.rpcUrl,{method:"POST",body:JSON.stringify(t),mode:"cors",headers:{"Content-Type":"application/json","X-Cbw-Sdk-Version":yTe.LIB_VERSION}})).json()).result}cc.fetchRPCRequest=bTe;function AK(){return globalThis.coinbaseWalletSigner}cc.getCoinbaseInjectedSigner=AK;function _Te({metadata:r,preference:e}){var t,n,i;const s=globalThis;if(e.options!=="smartWalletOnly"){if(AK())return;const c=s.coinbaseWalletExtension;if(c){const{appName:l,appLogoUrl:h,appChainIds:f}=r;return(t=c.setAppInfo)===null||t===void 0||t.call(c,l,h,f),c}}const o=(n=s.ethereum)!==null&&n!==void 0?n:(i=s.top)===null||i===void 0?void 0:i.ethereum;if(o!=null&&o.isCoinbaseBrowser)return o}cc.getCoinbaseInjectedProvider=_Te;function xTe(r){if(!r||typeof r!="object"||Array.isArray(r))return t6.standardErrors.rpc.invalidParams({message:"Expected a single, non-array, object argument.",data:r});const{method:e,params:t}=r;if(typeof e!="string"||e.length===0)return t6.standardErrors.rpc.invalidParams({message:"'args.method' must be a non-empty string.",data:r});if(t!==void 0&&!Array.isArray(t)&&(typeof t!="object"||t===null))return t6.standardErrors.rpc.invalidParams({message:"'args.params' must be an object or array if provided.",data:r})}cc.checkErrorForInvalidRequestArgs=xTe;Object.defineProperty(du,"__esModule",{value:!0});du.createSigner=du.fetchSignerType=du.storeSignerType=du.loadSignerType=void 0;const ATe=px,EK=wx,ETe=th,CTe=cc,STe=rh,CK="SignerType",SK=new STe.ScopedLocalStorage("CBWSDK","SignerConfigurator");function ITe(){return SK.getItem(CK)}du.loadSignerType=ITe;function TTe(r){SK.setItem(CK,r)}du.storeSignerType=TTe;async function RTe(r){const{communicator:e,metadata:t}=r;NTe(e,t).catch(()=>{});const n={id:crypto.randomUUID(),event:"selectSignerType",data:r.preference},{data:i}=await e.postRequestAndWaitForResponse(n);return i}du.fetchSignerType=RTe;function kTe(r){const{signerType:e,metadata:t,communicator:n,updateListener:i}=r;switch(e){case"scw":return new ATe.SCWSigner({metadata:t,updateListener:i,communicator:n});case"walletlink":return new EK.WalletLinkSigner({metadata:t,updateListener:i});case"extension":{const s=(0,CTe.getCoinbaseInjectedSigner)();if(!s)throw ETe.standardErrors.rpc.internal("injected signer not found");return s}}}du.createSigner=kTe;async function NTe(r,e){await r.onMessage(({event:n})=>n==="WalletLinkSessionRequest");const t=new EK.WalletLinkSigner({metadata:e});r.postMessage({event:"WalletLinkUpdate",data:{session:t.getSession()}}),await t.handshake(),r.postMessage({event:"WalletLinkUpdate",data:{connected:!0}})}var Ox={},zw={};Object.defineProperty(zw,"__esModule",{value:!0});zw.closePopup=zw.openPopup=void 0;const PTe=th,lL=420,uL=540;function OTe(r){const e=(window.innerWidth-lL)/2+window.screenX,t=(window.innerHeight-uL)/2+window.screenY,n=window.open(r,"Smart Wallet",`width=${lL}, height=${uL}, left=${e}, top=${t}`);if(n==null||n.focus(),!n)throw PTe.standardErrors.rpc.internal("Pop up window failed to open");return n}zw.openPopup=OTe;function MTe(r){r&&!r.closed&&r.close()}zw.closePopup=MTe;Object.defineProperty(Ox,"__esModule",{value:!0});Ox.Communicator=void 0;const DTe=$1,hL=zw,$Te=Iu,dL=th;class BTe{constructor(e=$Te.CB_KEYS_URL){this.popup=null,this.listeners=new Map,this.postMessage=async t=>{(await this.waitForPopupLoaded()).postMessage(t,this.url.origin)},this.postRequestAndWaitForResponse=async t=>{const n=this.onMessage(({requestId:i})=>i===t.id);return this.postMessage(t),await n},this.onMessage=async t=>new Promise((n,i)=>{const s=o=>{if(o.origin!==this.url.origin)return;const a=o.data;t(a)&&(n(a),window.removeEventListener("message",s),this.listeners.delete(s))};window.addEventListener("message",s),this.listeners.set(s,{reject:i})}),this.disconnect=()=>{(0,hL.closePopup)(this.popup),this.popup=null,this.listeners.forEach(({reject:t},n)=>{t(dL.standardErrors.provider.userRejectedRequest("Request rejected")),window.removeEventListener("message",n)}),this.listeners.clear()},this.waitForPopupLoaded=async()=>this.popup&&!this.popup.closed?this.popup:(this.popup=(0,hL.openPopup)(this.url),this.onMessage(({event:t})=>t==="PopupUnload").then(this.disconnect).catch(()=>{}),this.onMessage(({event:t})=>t==="PopupLoaded").then(t=>{this.postMessage({requestId:t.id,data:{version:DTe.LIB_VERSION}})}).then(()=>{if(!this.popup)throw dL.standardErrors.rpc.internal();return this.popup})),this.url=new URL(e)}}Ox.Communicator=BTe;var Mx={};Object.defineProperty(Mx,"__esModule",{value:!0});Mx.determineMethodCategory=void 0;const fL={handshake:["eth_requestAccounts"],sign:["eth_ecRecover","personal_sign","personal_ecRecover","eth_signTransaction","eth_sendTransaction","eth_signTypedData_v1","eth_signTypedData_v3","eth_signTypedData_v4","eth_signTypedData","wallet_addEthereumChain","wallet_switchEthereumChain","wallet_watchAsset","wallet_getCapabilities","wallet_sendCalls","wallet_showCallsStatus"],state:["eth_chainId","eth_accounts","eth_coinbase","net_version"],deprecated:["eth_sign","eth_signTypedData_v2"],unsupported:["eth_subscribe","eth_unsubscribe"],fetch:[]};function LTe(r){for(const e in fL){const t=e;if(fL[t].includes(r))return t}}Mx.determineMethodCategory=LTe;var UTe=Yr&&Yr.__rest||function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i{try{if(this.connected)return this.emit("connect",{chainId:(0,n3.hexStringFromIntNumber)((0,v4.IntNumber)(this.chain.id))}),this.accounts;const h=await this.requestSignerSelection(),f=this.initSigner(h),v=await f.handshake();return this.signer=f,(0,y4.storeSignerType)(h),this.emit("connect",{chainId:(0,n3.hexStringFromIntNumber)((0,v4.IntNumber)(this.chain.id))}),v}catch(h){throw this.handleUnauthorizedError(h),h}},sign:async l=>{if(!this.connected||!this.signer)throw vg.standardErrors.provider.unauthorized("Must call 'eth_requestAccounts' before other methods");try{return await this.signer.request(l)}catch(h){throw this.handleUnauthorizedError(h),h}},fetch:l=>(0,pL.fetchRPCRequest)(l,this.chain),state:l=>{const h=()=>{if(this.connected)return this.accounts;throw vg.standardErrors.provider.unauthorized("Must call 'eth_requestAccounts' before other methods")};switch(l.method){case"eth_chainId":return(0,n3.hexStringFromIntNumber)((0,v4.IntNumber)(this.chain.id));case"net_version":return this.chain.id;case"eth_accounts":return h();case"eth_coinbase":return h()[0];default:return this.handlers.unsupported(l)}},deprecated:({method:l})=>{throw vg.standardErrors.rpc.methodNotSupported(`Method ${l} is deprecated.`)},unsupported:({method:l})=>{throw vg.standardErrors.rpc.methodNotSupported(`Method ${l} is not supported.`)}},this.isCoinbaseWallet=!0,this.updateListener={onAccountsUpdate:({accounts:l,source:h})=>{(0,n3.areAddressArraysEqual)(this.accounts,l)||(this.accounts=l,h!=="storage"&&this.emit("accountsChanged",this.accounts))},onChainUpdate:({chain:l,source:h})=>{l.id===this.chain.id&&l.rpcUrl===this.chain.rpcUrl||(this.chain=l,h!=="storage"&&this.emit("chainChanged",(0,n3.hexStringFromIntNumber)((0,v4.IntNumber)(l.id))))}},this.metadata=i,this.preference=a,this.communicator=new WTe.Communicator(o),this.chain={id:(n=(t=i.appChainIds)===null||t===void 0?void 0:t[0])!==null&&n!==void 0?n:1};const c=(0,y4.loadSignerType)();this.signer=c?this.initSigner(c):null}get connected(){return this.accounts.length>0}async request(e){var t;try{const n=(0,pL.checkErrorForInvalidRequestArgs)(e);if(n)throw n;const i=(t=(0,zTe.determineMethodCategory)(e.method))!==null&&t!==void 0?t:"fetch";return this.handlers[i](e)}catch(n){return Promise.reject((0,HTe.serializeError)(n,e.method))}}handleUnauthorizedError(e){e.code===vg.standardErrorCodes.provider.unauthorized&&this.disconnect()}async enable(){return console.warn('.enable() has been deprecated. Please use .request({ method: "eth_requestAccounts" }) instead.'),await this.request({method:"eth_requestAccounts"})}async disconnect(){this.accounts=[],this.chain={id:1},VTe.ScopedLocalStorage.clearAll(),this.emit("disconnect",vg.standardErrors.provider.disconnected("User initiated disconnection"))}requestSignerSelection(){return(0,y4.fetchSignerType)({communicator:this.communicator,preference:this.preference,metadata:this.metadata})}initSigner(e){return(0,y4.createSigner)({signerType:e,metadata:this.metadata,communicator:this.communicator,updateListener:this.updateListener})}}ux.CoinbaseWalletProvider=qTe;Object.defineProperty(ny,"__esModule",{value:!0});ny.CoinbaseWalletSDK=void 0;const KTe=lx,GTe=ux,ZTe=rh,YTe=$1,QTe=Jt,JTe=cc;class XTe{constructor(e){this.metadata={appName:e.appName||"Dapp",appLogoUrl:e.appLogoUrl||(0,QTe.getFavicon)(),appChainIds:e.appChainIds||[]},this.storeLatestVersion()}makeWeb3Provider(e={options:"all"}){var t;const n={metadata:this.metadata,preference:e};return(t=(0,JTe.getCoinbaseInjectedProvider)(n))!==null&&t!==void 0?t:new GTe.CoinbaseWalletProvider(n)}getCoinbaseWalletLogo(e,t=240){return(0,KTe.walletLogo)(e,t)}storeLatestVersion(){new ZTe.ScopedLocalStorage("CBWSDK").setItem("VERSION",YTe.LIB_VERSION)}}ny.CoinbaseWalletSDK=XTe;(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.CoinbaseWalletSDK=void 0;const e=ny;r.default=e.CoinbaseWalletSDK;var t=ny;Object.defineProperty(r,"CoinbaseWalletSDK",{enumerable:!0,get:function(){return t.CoinbaseWalletSDK}})})(oq);function eRe(r){const e={email:!0,showWallets:!0,walletFeatures:!0,socials:["google","x","discord","farcaster","github","apple","facebook"]},{enableEIP6963:t=!0,enableCoinbase:n=!0,enableInjected:i=!0,auth:s,metadata:o}=r;let a,c;const l={metadata:o};function h(){if(a)return a;if(!(typeof window>"u")&&window.ethereum)return a=window.ethereum,a}function f(){var A;return c||(typeof window>"u"?void 0:(c=new oq.CoinbaseWalletSDK({appName:o.name,appLogoUrl:o.icons[0],appChainIds:((A=r.chains)==null?void 0:A.map(M=>M.chainId))||[1,84532]}).makeWeb3Provider({options:r.coinbasePreference||"all"}),c))}i&&(l.injected=h()),n&&(l.coinbase=f()),t&&(l.EIP6963=!0);const v={...e,...s};return l.auth=v,l}let Yc;function tRe(r){r&&(Yc=r)}function rRe(){if(!Yc)throw new Error('Please call "createWeb3Modal" before using "useWeb3Modal" composable');async function r(t){await(Yc==null?void 0:Yc.open(t))}async function e(){await(Yc==null?void 0:Yc.close())}return by({open:r,close:e})}function nRe(){if(!Yc)throw new Error('Please call "createWeb3Modal" before using "useWeb3Modal" composable');const r=Rf(Yc.getWalletInfo()),e=Yc.subscribeWalletInfo(t=>{r.value=t});return xy(()=>{e==null||e()}),{walletInfo:r}}let c9,ca;function iRe(r){return ca=new C9e({ethersConfig:r.ethersConfig,siweConfig:r.siweConfig,chains:r.chains,defaultChain:r.defaultChain}),c9=new rde({...r,defaultChain:ca.defaultChain,adapters:[ca],sdkType:"w3m",sdkVersion:`vue-ethers-${ct.VERSION}`}),tRe(c9),c9}function MMe(){if(!ca)throw new Error('Please call "createWeb3Modal" before using "useWeb3ModalProvider" composition');const r=Rf(ca.getWalletProvider()),e=Rf(ca.getWalletProviderType()),t=ca.subscribeProvider(n=>{r.value=n.provider,e.value=n.providerType});return xy(()=>{t==null||t()}),{walletProvider:r,walletProviderType:e}}function sRe(){if(!ca)throw new Error('Please call "createWeb3Modal" before using "useWeb3ModalAccount" composition');const r=Rf(ca.getAddress()),e=Rf(ca.getIsConnected()),t=Rf(ca.getStatus()),n=Rf(ca.getChainId()),i=ca.subscribeProvider(s=>{r.value=s.address,t.value=s.status,e.value=s.isConnected,n.value=s.chainId});return xy(()=>{i==null||i()}),{address:r,isConnected:e,chainId:n}}const oRe="0xDd7194793B83eA584368a158Cb05f7B309b5f4e7",aRe="0x226146926aFd101601AafEae6C68b141CD43cCae",cRe="0xde924dC25F4761Ef7795C2598Ce3dAa92428A36d",lRe="0xB6FEf5E2f53E586E9855BD52e76A003D466B2fA9",uRe={Game:oRe,GameFrontend:aRe,Award:cRe,Badge:lRe},hRe="d0ec522cc8ac196893d24355f948e04f",dRe="CTP",fRe="Capture the Prompt",pRe="https://promptower.github.io/webapp/",gRe="https://raw.githubusercontent.com/promptower/webapp/main/src/assets/logo.svg",mRe=1112,wRe="Wemix Testnet",vRe="WEMIX",yRe="https://testnet.wemixscan.com/",bRe="https://api.test.wemix.com",_Re="",el={projectId:hRe,projectName:dRe,projectDescription:fRe,projectUrl:pRe,logoUrl:gRe,chainId:mRe,chainName:wRe,currency:vRe,explorerUrl:yRe,rpcUrl:bRe,chainImageUrl:_Re,contracts:uRe},xRe=el.projectId,$8={chainId:el.chainId,name:el.chainName,currency:el.currency,explorerUrl:el.explorerUrl,rpcUrl:el.rpcUrl},ARe={name:el.projectName,description:el.projectDescription,url:el.projectUrl,icons:[el.logoUrl]},ERe=eRe({metadata:ARe,enableEIP6963:!0,enableInjected:!0,enableCoinbase:!0,rpcUrl:$8.rpcUrl,defaultChainId:$8.chainId});iRe({ethersConfig:ERe,chains:[$8],projectId:xRe,enableAnalytics:!0,enableSwaps:!1,enableOnramp:!1,featuredWalletIds:["c57ca95b47569778a828d19178114f4db188b89b763c899ba0be274e97267d96","1ae92b26df02f0abca6304df07debccd18262fdf5fe82daa81593582dac9a369"],chainImages:{[$8.chainId]:el.chainImageUrl}});const sR=(r,e)=>{const t=r.__vccOpts||r;for(const[n,i]of e)t[n]=i;return t},CRe={class:"topbar"},SRe={class:"topbar-wrapper"},IRe={class:"menu-wrapper"},TRe=["src"],RRe={class:"wallet-connected-text"},kRe={__name:"TopBar",setup(r){const e=rRe(),{walletInfo:t}=nRe(),{address:n,chainId:i,isConnected:s}=sRe(),o=$U(),a=f=>{o.push(f),window.scrollTo(0,0)},c=BU(),l=f=>f.includes(c.path),h=()=>{e.open()};return(f,v)=>(pu(),Gg("div",CRe,[sn("div",SRe,[sn("div",{class:"logo-wrapper",onClick:v[0]||(v[0]=y=>a("/"))},v[4]||(v[4]=[sn("img",{src:Nre,alt:"Logo"},null,-1),sn("div",{class:"logo-text"},"CTP",-1)])),sn("div",IRe,[sn("div",{class:zg(["menu-text",{"menu-text-active":l(["/challenge"])}]),onClick:v[1]||(v[1]=y=>a("/challenge"))}," Challenges ",2),sn("div",{class:zg(["menu-text",{"menu-text-active":l(["/leaderboard"])}]),onClick:v[2]||(v[2]=y=>a("/leaderboard"))}," Leaderboard ",2),sn("div",{class:zg(["menu-text",{"menu-text-active":l(["/portfolio"])}]),onClick:v[3]||(v[3]=y=>a("/portfolio"))}," Portfolio ",2)]),Oo(s)?o6("",!0):(pu(),Gg("div",{key:0,class:"wallet-btn",onClick:h},v[5]||(v[5]=[sn("div",{class:"wallet-text"},"Connect Wallet",-1)]))),Oo(s)?(pu(),Gg("div",{key:1,class:"wallet-connected-btn",onClick:h},[sn("img",{src:Oo(t).icon,alt:"wallet"},null,8,TRe),sn("div",RRe,IL(`${Oo(n).substring(0,6)}...${Oo(n).substring(Oo(n).length-4)}`),1)])):o6("",!0)])]))}},NRe=sR(kRe,[["__scopeId","data-v-8ddb9fc8"]]),PRe="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%3e%3cpath%20d='M9.98069%201.85484e-05C4.46902%200.0106679%20-0.00907715%204.60093%201.38172e-05%2010.2296C0.00750049%2014.8277%202.99041%2018.7129%207.08749%2019.9847C7.30594%2020.0525%207.52666%2019.8866%207.52666%2019.6535V17.5981C7.36436%2017.6289%205.52331%2017.9557%204.70579%2017.1208C3.85017%2016.247%204.21114%2016.1378%203.64963%2015.4688C3.08813%2014.7998%202.79401%2014.7316%202.70043%2014.6223C2.60685%2014.5131%202.4999%2014.2674%203.00792%2014.2401C3.00792%2014.2401%203.95833%2014.2641%204.82611%2015.6327C5.73521%2017.0662%207.53829%2016.128%207.53829%2016.128C7.59926%2015.4569%207.89044%2014.9029%208.19672%2014.7737C4.31033%2014.2653%203.64963%2012.0501%203.64963%2010.0349C3.64963%208.7502%204.04683%207.76992%204.66796%207.03088C4.20231%205.46038%204.75927%204.24609%204.75927%204.24609C6.09617%204.24609%207.46009%205.33491%207.46022%205.33491C8.33696%205.07892%209.2355%204.97925%209.99994%204.97925C10.7644%204.97925%2011.6629%205.07878%2012.5397%205.33491C12.5397%205.33491%2013.9037%204.24609%2015.2406%204.24609C15.2406%204.24609%2015.7974%205.46038%2015.3319%207.03088C15.9532%207.76992%2016.3502%208.7502%2016.3502%2010.0349C16.3502%2012.0501%2015.6897%2014.2653%2011.8032%2014.7737C12.1475%2014.919%2012.4732%2015.6021%2012.4732%2016.3843V19.6293C12.4732%2019.8748%2012.706%2020.0494%2012.9358%2019.9774C17.0261%2018.6965%2020%2014.8091%2020%2010.2123C20.0001%204.5657%2015.5125%20-0.0106308%209.98069%201.85484e-05Z'%20fill='black'/%3e%3c/svg%3e",ORe={},MRe={class:"footer"};function DRe(r,e){return pu(),Gg("div",MRe,e[0]||(e[0]=[sn("div",{class:"footer-content-wrapper"},[sn("div",{class:"community-wrapper"},[sn("img",{src:PRe,alt:"github"})]),sn("div",{class:"copyright"},"ⓒ CTP. All Rights Reserved.")],-1)]))}const $Re=sR(ORe,[["render",DRe],["__scopeId","data-v-1574b52b"]]),BRe={__name:"App",setup(r){const e=BU();return(t,n)=>{const i=fte("router-view");return pu(),Gg(Qc,null,[Oo(e).path!="/"?(pu(),s6(NRe,{key:0})):o6("",!0),eo(i,{class:"router"}),Oo(e).path!="/"?(pu(),s6($Re,{key:1})):o6("",!0)],64)}}},LRe="data:image/svg+xml,%3csvg%20width='652'%20height='465'%20viewBox='0%200%20652%20465'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='45'%20y='1'%20width='562'%20height='384'%20rx='9'%20fill='%23D9D9D9'%20stroke='black'%20stroke-width='2'/%3e%3cpath%20d='M52.8332%20387H599.167C601.872%20387%20604.434%20388.217%20606.143%20390.314L649.895%20444H2.10498L45.8566%20390.314C47.5658%20388.217%2050.1277%20387%2052.8332%20387Z'%20fill='%23D9D9D9'%20stroke='black'%20stroke-width='2'/%3e%3cmask%20id='path-3-inside-1_23_92'%20fill='white'%3e%3cpath%20d='M0%20445H652V455C652%20460.523%20647.523%20465%20642%20465H9.99999C4.47714%20465%200%20460.523%200%20455V445Z'/%3e%3c/mask%3e%3cpath%20d='M0%20445H652V455C652%20460.523%20647.523%20465%20642%20465H9.99999C4.47714%20465%200%20460.523%200%20455V445Z'%20fill='%23D9D9D9'/%3e%3cpath%20d='M0%20445H652H0ZM654%20455C654%20461.627%20648.627%20467%20642%20467H10C3.37258%20467%20-2%20461.627%20-2%20455H2C2%20459.418%205.58172%20463%2010%20463H642C646.418%20463%20650%20459.418%20650%20455H654ZM10%20467C3.37258%20467%20-2%20461.627%20-2%20455V445H2V455C2%20459.418%205.58172%20463%2010%20463V467ZM654%20445V455C654%20461.627%20648.627%20467%20642%20467V463C646.418%20463%20650%20459.418%20650%20455V445H654Z'%20fill='black'%20mask='url(%23path-3-inside-1_23_92)'/%3e%3cpath%20d='M216.718%20444L225.234%20429H426.766L435.282%20444H216.718Z'%20fill='%23D9D9D9'%20stroke='black'%20stroke-width='2'/%3e%3cpath%20d='M72.8968%20422L93.4403%20392H552.56L573.103%20422H72.8968Z'%20fill='%23D9D9D9'%20stroke='black'%20stroke-width='2'/%3e%3c/svg%3e",URe="/webapp/assets/logo-DrIcDvRq.svg",FRe="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='12'%20height='19'%20viewBox='0%200%2012%2019'%20fill='none'%3e%3crect%20width='3'%20height='13.0816'%20transform='matrix(-0.707107%200.707107%200.707107%200.707107%202.43542%200.5)'%20fill='black'/%3e%3crect%20x='2.43542'%20y='19'%20width='3'%20height='13.0821'%20transform='rotate(-135%202.43542%2019)'%20fill='black'/%3e%3c/svg%3e",jRe="/webapp/assets/flower-COLkTZsA.svg",HRe="data:image/svg+xml,%3csvg%20width='278'%20height='527'%20viewBox='0%200%20278%20527'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='1'%20y='1'%20width='105'%20height='395'%20fill='%23542234'%20stroke='black'%20stroke-width='2'/%3e%3cpath%20d='M1%20524.211V120.381L106%202.62407V396.641L1%20524.211Z'%20fill='%23542234'%20stroke='black'%20stroke-width='2'/%3e%3cmask%20id='path-3-inside-1_23_114'%20fill='white'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M256%20271H52.6489L37%20289L242%20482L256%20460V271.44L256.351%20271H256Z'/%3e%3c/mask%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M256%20271H52.6489L37%20289L242%20482L256%20460V271.44L256.351%20271H256Z'%20fill='%23F4E598'/%3e%3cpath%20d='M52.6489%20271V269H51.7375L51.1395%20269.687L52.6489%20271ZM37%20289L35.4907%20287.687L34.2294%20289.138L35.629%20290.456L37%20289ZM242%20482L240.629%20483.456L242.389%20485.113L243.687%20483.073L242%20482ZM256%20460L257.687%20461.073L258%20460.582V460H256ZM256%20271.44L254.436%20270.193L254%20270.74V271.44H256ZM256.351%20271L257.915%20272.246L260.504%20269H256.351V271ZM52.6489%20273H256V269H52.6489V273ZM38.5093%20290.312L54.1582%20272.312L51.1395%20269.687L35.4907%20287.687L38.5093%20290.312ZM243.371%20480.543L38.371%20287.543L35.629%20290.456L240.629%20483.456L243.371%20480.543ZM254.313%20458.926L240.313%20480.926L243.687%20483.073L257.687%20461.073L254.313%20458.926ZM254%20271.44V460H258V271.44H254ZM254.787%20269.753L254.436%20270.193L257.564%20272.687L257.915%20272.246L254.787%20269.753ZM256%20273H256.351V269H256V273Z'%20fill='black'%20mask='url(%23path-3-inside-1_23_114)'/%3e%3cpath%20d='M224%20273L224%20294'%20stroke='black'%20stroke-width='2'/%3e%3cpath%20d='M180.999%20149.575L189.349%20326.85L167.374%20327.885L159.024%20150.629C159.217%20150.495%20159.468%20150.323%20159.768%20150.123C160.512%20149.628%20161.55%20148.967%20162.73%20148.3C165.143%20146.936%20167.954%20145.661%20170.033%20145.563C172.104%20145.466%20174.902%20146.47%20177.309%20147.604C178.485%20148.158%20179.521%20148.72%20180.262%20149.144C180.559%20149.314%20180.808%20149.461%20180.999%20149.575Z'%20fill='%234DC4CF'%20stroke='black'%20stroke-width='2'/%3e%3cpath%20d='M274.538%20198.757L195.01%20357.438L175.342%20347.58L254.839%20188.962C255.088%20188.949%20255.412%20188.933%20255.795%20188.919C256.739%20188.885%20258.04%20188.86%20259.468%20188.9C260.897%20188.941%20262.438%20189.045%20263.867%20189.264C265.309%20189.485%20266.572%20189.814%20267.483%20190.271C269.329%20191.196%20271.139%20193.345%20272.538%20195.413C273.221%20196.423%20273.779%20197.372%20274.166%20198.069C274.318%20198.342%20274.443%20198.575%20274.538%20198.757Z'%20fill='%23542234'%20stroke='black'%20stroke-width='2'/%3e%3crect%20x='-1.05128'%20y='0.945944'%20width='54.5233'%20height='177'%20rx='19'%20transform='matrix(-0.998612%20-0.0526679%20-0.0526679%200.998612%20113.821%20186.923)'%20fill='%23FC4B3B'%20stroke='black'%20stroke-width='2'/%3e%3cpath%20d='M56.5003%20259.5L105.5%20262.5'%20stroke='black'%20stroke-width='2'/%3e%3crect%20x='69.2144'%20y='127.568'%20width='66.7772'%20height='224.245'%20transform='rotate(-14.1758%2069.2144%20127.568)'%20fill='white'%20stroke='black'%20stroke-width='2'/%3e%3cpath%20d='M114.019%20144.098L140.682%20137.363'%20stroke='black'%20stroke-width='2'/%3e%3cpath%20d='M118.917%20163.489L145.58%20156.754'%20stroke='black'%20stroke-width='2'/%3e%3cpath%20d='M123.815%20182.88L150.478%20176.145'%20stroke='black'%20stroke-width='2'/%3e%3cpath%20d='M128.713%20202.271L155.376%20195.536'%20stroke='black'%20stroke-width='2'/%3e%3cpath%20d='M133.611%20221.662L160.274%20214.927'%20stroke='black'%20stroke-width='2'/%3e%3cpath%20d='M138.509%20241.053L165.172%20234.318'%20stroke='black'%20stroke-width='2'/%3e%3cpath%20d='M143.407%20260.444L170.07%20253.709'%20stroke='black'%20stroke-width='2'/%3e%3cpath%20d='M148.305%20279.834L174.968%20273.1'%20stroke='black'%20stroke-width='2'/%3e%3cpath%20d='M153.203%20299.226L179.866%20292.491'%20stroke='black'%20stroke-width='2'/%3e%3cmask%20id='path-20-inside-2_23_114'%20fill='white'%3e%3cpath%20d='M37%20289H242V482H37V289Z'/%3e%3c/mask%3e%3cpath%20d='M37%20289H242V482H37V289Z'%20fill='%23F4E598'/%3e%3cpath%20d='M37%20289V287H35V289H37ZM242%20289H244V287H242V289ZM242%20482V484H244V482H242ZM37%20482H35V484H37V482ZM37%20291H242V287H37V291ZM240%20289V482H244V289H240ZM242%20480H37V484H242V480ZM39%20482V289H35V482H39Z'%20fill='black'%20mask='url(%23path-20-inside-2_23_114)'/%3e%3cpath%20d='M241%20290.5L255%20272.5'%20stroke='black'%20stroke-width='2'/%3e%3c/svg%3e",WRe={class:"notebook"},zRe={class:"notebook-screen"},VRe={class:"notebook-screen-wrapper"},qRe={class:"notebook-screen-title-wrapper"},KRe={__name:"LandingPage",setup(r){const e=$U(),t=n=>{e.push(n),window.scrollTo(0,0)};return(n,i)=>(pu(),Gg(Qc,null,[sn("div",WRe,[i[5]||(i[5]=sn("img",{class:"fixed-notebook",src:LRe,alt:"Notebook"},null,-1)),sn("div",zRe,[sn("div",VRe,[i[4]||(i[4]=sn("img",{class:"fixed-logo",src:URe,alt:"Logo"},null,-1)),sn("div",qRe,[i[2]||(i[2]=sn("div",{class:"notebook-screen-title-text"},"Capture the Prompt",-1)),i[3]||(i[3]=sn("div",{class:"notebook-screen-content-text"}," Blockchain-Based AI Prompt Market via Capture-the-Flag ",-1)),sn("div",{class:"join-app-btn",onClick:i[0]||(i[0]=s=>t("/challenge"))},i[1]||(i[1]=[sn("div",{class:"join-app-text"},"Let’s Play",-1),sn("img",{src:FRe,alt:"Join-Arrow"},null,-1)]))])])])]),i[6]||(i[6]=sn("img",{class:"fixed-flower",src:jRe,alt:"Flower"},null,-1)),i[7]||(i[7]=sn("img",{class:"fixed-pencil",src:HRe,alt:"Pencil"},null,-1)),i[8]||(i[8]=sn("div",{class:"background-fixed"},null,-1))],64))}},GRe=sR(KRe,[["__scopeId","data-v-050d2aaf"]]),ZRe={__name:"LandingView",setup(r){return(e,t)=>(pu(),s6(GRe))}},YRe=[{path:"/",name:"Root",component:ZRe},{path:"/challenge",name:"Challenge",component:()=>lc(()=>import("./ChallengeView-BdZ9aHLk.js"),__vite__mapDeps([0,1,2]))},{path:"/leaderboard",name:"Leaderboard",component:()=>lc(()=>import("./LeaderboardView-CDr9g18M.js"),__vite__mapDeps([3,1,4]))},{path:"/portfolio",name:"Portfolio",component:()=>lc(()=>import("./PortfolioView-CYtqoMkr.js"),__vite__mapDeps([5,1,6]))}],QRe=Dne({history:lne("/webapp/"),routes:YRe,scrollBehavior(r,e,t){return t||{left:0,top:0}}}),IK=Tre(BRe);IK.use(QRe);IK.mount("#app");export{Qt as $,ty as A,W7 as B,lm as C,Ms as D,oa as E,Qc as F,Re as G,De as H,It as I,sq as J,or as K,HH as L,nr as M,it as N,bt as O,jH as P,l8 as Q,Te as R,Vt as S,tt as T,F5 as U,vke as V,_r as W,pF as X,Mae as Y,Gv as Z,sR as _,nRe as a,fd as a$,G0 as a0,M9 as a1,sw as a2,ow as a3,D9 as a4,fv as a5,A6 as a6,Fp as a7,jp as a8,pv as a9,lw as aA,ad as aB,uw as aC,Pu as aD,W9 as aE,Hf as aF,Ou as aG,xv as aH,yv as aI,gw as aJ,Mu as aK,ud as aL,mw as aM,od as aN,ww as aO,Av as aP,vw as aQ,Wf as aR,zf as aS,P6 as aT,Ev as aU,Vf as aV,hd as aW,dd as aX,Cv as aY,Sv as aZ,yw as a_,hc as aa,E6 as ab,Hp as ac,dc as ad,C6 as ae,cd as af,ld as ag,gv as ah,aw as ai,$9 as aj,S6 as ak,mv as al,cw as am,Wp as an,fl as ao,zp as ap,T6 as aq,wv as ar,pl as as,vv as at,fc as au,pa as av,L9 as aw,ga as ax,bv as ay,R6 as az,MMe as b,Du as b0,bw as b1,Vp as b2,qp as b3,Iv as b4,Tv as b5,Kp as b6,O6 as b7,ao as b8,Uo as b9,M6 as ba,Dt as bb,et as bc,Yt as bd,ne as be,lc as bf,ot as bg,ge as bh,ii as bi,LU as bj,$y as bk,el as c,sRe as d,Gg as e,sn as f,Zr as g,IL as h,ite as i,eke as j,Ei as k,o6 as l,s6 as m,zg as n,pu as o,axe as p,Az as q,Rf as r,tke as s,Cu as t,rRe as u,rke as v,XRe as w,ei as x,po as y,a1 as z}; +*/(function(r){(function(){var e="input is invalid type",t="finalize already called",n=typeof window=="object",i=n?window:{};i.JS_SHA3_NO_WINDOW&&(n=!1);var s=!n&&typeof self=="object",o=!i.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;o?i=OW:s&&(i=self);var a=!i.JS_SHA3_NO_COMMON_JS&&!0&&r.exports,c=!i.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",l="0123456789abcdef".split(""),h=[31,7936,2031616,520093696],f=[4,1024,262144,67108864],v=[1,256,65536,16777216],y=[6,1536,393216,100663296],A=[0,8,16,24],M=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],$=[224,256,384,512],L=[128,256],P=["hex","buffer","arrayBuffer","array","digest"],H={128:168,256:136};(i.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(x){return Object.prototype.toString.call(x)==="[object Array]"}),c&&(i.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(x){return typeof x=="object"&&x.buffer&&x.buffer.constructor===ArrayBuffer});for(var F=function(x,Z,k){return function(W){return new O(x,Z,x).update(W)[k]()}},q=function(x,Z,k){return function(W,J){return new O(x,Z,J).update(W)[k]()}},Y=function(x,Z,k){return function(W,J,S,D){return g["cshake"+x].update(W,J,S,D)[k]()}},I=function(x,Z,k){return function(W,J,S,D){return g["kmac"+x].update(W,J,S,D)[k]()}},T=function(x,Z,k,W){for(var J=0;J>5,this.byteCount=this.blockCount<<2,this.outputBlocks=k>>5,this.extraBytes=(k&31)>>3;for(var W=0;W<50;++W)this.s[W]=0}O.prototype.update=function(x){if(this.finalized)throw new Error(t);var Z,k=typeof x;if(k!=="string"){if(k==="object"){if(x===null)throw new Error(e);if(c&&x.constructor===ArrayBuffer)x=new Uint8Array(x);else if(!Array.isArray(x)&&(!c||!ArrayBuffer.isView(x)))throw new Error(e)}else throw new Error(e);Z=!0}for(var W=this.blocks,J=this.byteCount,S=x.length,D=this.blockCount,G=0,z=this.s,K,ue;G>2]|=x[G]<>2]|=ue<>2]|=(192|ue>>6)<>2]|=(128|ue&63)<=57344?(W[K>>2]|=(224|ue>>12)<>2]|=(128|ue>>6&63)<>2]|=(128|ue&63)<>2]|=(240|ue>>18)<>2]|=(128|ue>>12&63)<>2]|=(128|ue>>6&63)<>2]|=(128|ue&63)<=J){for(this.start=K-J,this.block=W[D],K=0;K>8,k=x&255;k>0;)J.unshift(k),x=x>>8,k=x&255,++W;return Z?J.push(W):J.unshift(W),this.update(J),J.length},O.prototype.encodeString=function(x){var Z,k=typeof x;if(k!=="string"){if(k==="object"){if(x===null)throw new Error(e);if(c&&x.constructor===ArrayBuffer)x=new Uint8Array(x);else if(!Array.isArray(x)&&(!c||!ArrayBuffer.isView(x)))throw new Error(e)}else throw new Error(e);Z=!0}var W=0,J=x.length;if(Z)W=J;else for(var S=0;S=57344?W+=3:(D=65536+((D&1023)<<10|x.charCodeAt(++S)&1023),W+=4)}return W+=this.encode(W*8),this.update(x),W},O.prototype.bytepad=function(x,Z){for(var k=this.encode(Z),W=0;W>2]|=this.padding[Z&3],this.lastByteIndex===this.byteCount)for(x[0]=x[k],Z=1;Z>4&15]+l[G&15]+l[G>>12&15]+l[G>>8&15]+l[G>>20&15]+l[G>>16&15]+l[G>>28&15]+l[G>>24&15];S%x===0&&(be(Z),J=0)}return W&&(G=Z[J],D+=l[G>>4&15]+l[G&15],W>1&&(D+=l[G>>12&15]+l[G>>8&15]),W>2&&(D+=l[G>>20&15]+l[G>>16&15])),D},O.prototype.arrayBuffer=function(){this.finalize();var x=this.blockCount,Z=this.s,k=this.outputBlocks,W=this.extraBytes,J=0,S=0,D=this.outputBits>>3,G;W?G=new ArrayBuffer(k+1<<2):G=new ArrayBuffer(D);for(var z=new Uint32Array(G);S>8&255,D[G+2]=z>>16&255,D[G+3]=z>>24&255;S%x===0&&be(Z)}return W&&(G=S<<2,z=Z[J],D[G]=z&255,W>1&&(D[G+1]=z>>8&255),W>2&&(D[G+2]=z>>16&255)),D};function pe(x,Z,k){O.call(this,x,Z,k)}pe.prototype=new O,pe.prototype.finalize=function(){return this.encode(this.outputBits,!0),O.prototype.finalize.call(this)};var be=function(x){var Z,k,W,J,S,D,G,z,K,ue,ye,we,je,Me,Ie,Be,xe,$e,We,Ne,Ue,X,N,U,ie,le,me,Ee,ze,qe,St,Je,nt,jr,jt,Ht,bn,pt,ht,yr,gt,ft,ur,_t,xt,br,At,mt,Er,wt,lt,Ir,Et,Gt,Vn,Zt,Pt,Nn,Pn,On,Mn,Dn,tn;for(W=0;W<48;W+=2)J=x[0]^x[10]^x[20]^x[30]^x[40],S=x[1]^x[11]^x[21]^x[31]^x[41],D=x[2]^x[12]^x[22]^x[32]^x[42],G=x[3]^x[13]^x[23]^x[33]^x[43],z=x[4]^x[14]^x[24]^x[34]^x[44],K=x[5]^x[15]^x[25]^x[35]^x[45],ue=x[6]^x[16]^x[26]^x[36]^x[46],ye=x[7]^x[17]^x[27]^x[37]^x[47],we=x[8]^x[18]^x[28]^x[38]^x[48],je=x[9]^x[19]^x[29]^x[39]^x[49],Z=we^(D<<1|G>>>31),k=je^(G<<1|D>>>31),x[0]^=Z,x[1]^=k,x[10]^=Z,x[11]^=k,x[20]^=Z,x[21]^=k,x[30]^=Z,x[31]^=k,x[40]^=Z,x[41]^=k,Z=J^(z<<1|K>>>31),k=S^(K<<1|z>>>31),x[2]^=Z,x[3]^=k,x[12]^=Z,x[13]^=k,x[22]^=Z,x[23]^=k,x[32]^=Z,x[33]^=k,x[42]^=Z,x[43]^=k,Z=D^(ue<<1|ye>>>31),k=G^(ye<<1|ue>>>31),x[4]^=Z,x[5]^=k,x[14]^=Z,x[15]^=k,x[24]^=Z,x[25]^=k,x[34]^=Z,x[35]^=k,x[44]^=Z,x[45]^=k,Z=z^(we<<1|je>>>31),k=K^(je<<1|we>>>31),x[6]^=Z,x[7]^=k,x[16]^=Z,x[17]^=k,x[26]^=Z,x[27]^=k,x[36]^=Z,x[37]^=k,x[46]^=Z,x[47]^=k,Z=ue^(J<<1|S>>>31),k=ye^(S<<1|J>>>31),x[8]^=Z,x[9]^=k,x[18]^=Z,x[19]^=k,x[28]^=Z,x[29]^=k,x[38]^=Z,x[39]^=k,x[48]^=Z,x[49]^=k,Me=x[0],Ie=x[1],br=x[11]<<4|x[10]>>>28,At=x[10]<<4|x[11]>>>28,Ee=x[20]<<3|x[21]>>>29,ze=x[21]<<3|x[20]>>>29,On=x[31]<<9|x[30]>>>23,Mn=x[30]<<9|x[31]>>>23,ft=x[40]<<18|x[41]>>>14,ur=x[41]<<18|x[40]>>>14,jr=x[2]<<1|x[3]>>>31,jt=x[3]<<1|x[2]>>>31,Be=x[13]<<12|x[12]>>>20,xe=x[12]<<12|x[13]>>>20,mt=x[22]<<10|x[23]>>>22,Er=x[23]<<10|x[22]>>>22,qe=x[33]<<13|x[32]>>>19,St=x[32]<<13|x[33]>>>19,Dn=x[42]<<2|x[43]>>>30,tn=x[43]<<2|x[42]>>>30,Gt=x[5]<<30|x[4]>>>2,Vn=x[4]<<30|x[5]>>>2,Ht=x[14]<<6|x[15]>>>26,bn=x[15]<<6|x[14]>>>26,$e=x[25]<<11|x[24]>>>21,We=x[24]<<11|x[25]>>>21,wt=x[34]<<15|x[35]>>>17,lt=x[35]<<15|x[34]>>>17,Je=x[45]<<29|x[44]>>>3,nt=x[44]<<29|x[45]>>>3,U=x[6]<<28|x[7]>>>4,ie=x[7]<<28|x[6]>>>4,Zt=x[17]<<23|x[16]>>>9,Pt=x[16]<<23|x[17]>>>9,pt=x[26]<<25|x[27]>>>7,ht=x[27]<<25|x[26]>>>7,Ne=x[36]<<21|x[37]>>>11,Ue=x[37]<<21|x[36]>>>11,Ir=x[47]<<24|x[46]>>>8,Et=x[46]<<24|x[47]>>>8,_t=x[8]<<27|x[9]>>>5,xt=x[9]<<27|x[8]>>>5,le=x[18]<<20|x[19]>>>12,me=x[19]<<20|x[18]>>>12,Nn=x[29]<<7|x[28]>>>25,Pn=x[28]<<7|x[29]>>>25,yr=x[38]<<8|x[39]>>>24,gt=x[39]<<8|x[38]>>>24,X=x[48]<<14|x[49]>>>18,N=x[49]<<14|x[48]>>>18,x[0]=Me^~Be&$e,x[1]=Ie^~xe&We,x[10]=U^~le&Ee,x[11]=ie^~me&ze,x[20]=jr^~Ht&pt,x[21]=jt^~bn&ht,x[30]=_t^~br&mt,x[31]=xt^~At&Er,x[40]=Gt^~Zt&Nn,x[41]=Vn^~Pt&Pn,x[2]=Be^~$e&Ne,x[3]=xe^~We&Ue,x[12]=le^~Ee&qe,x[13]=me^~ze&St,x[22]=Ht^~pt&yr,x[23]=bn^~ht>,x[32]=br^~mt&wt,x[33]=At^~Er<,x[42]=Zt^~Nn&On,x[43]=Pt^~Pn&Mn,x[4]=$e^~Ne&X,x[5]=We^~Ue&N,x[14]=Ee^~qe&Je,x[15]=ze^~St&nt,x[24]=pt^~yr&ft,x[25]=ht^~gt&ur,x[34]=mt^~wt&Ir,x[35]=Er^~lt&Et,x[44]=Nn^~On&Dn,x[45]=Pn^~Mn&tn,x[6]=Ne^~X&Me,x[7]=Ue^~N&Ie,x[16]=qe^~Je&U,x[17]=St^~nt&ie,x[26]=yr^~ft&jr,x[27]=gt^~ur&jt,x[36]=wt^~Ir&_t,x[37]=lt^~Et&xt,x[46]=On^~Dn&Gt,x[47]=Mn^~tn&Vn,x[8]=X^~Me&Be,x[9]=N^~Ie&xe,x[18]=Je^~U&le,x[19]=nt^~ie&me,x[28]=ft^~jr&Ht,x[29]=ur^~jt&bn,x[38]=Ir^~_t&br,x[39]=Et^~xt&At,x[48]=Dn^~Gt&Zt,x[49]=tn^~Vn&Pt,x[0]^=M[W],x[1]^=M[W+1]};if(a)r.exports=g;else for(b=0;b{try{if("test".normalize(e)!=="test")throw new Error("bad normalize")}catch{r.push(e)}}),r.length)throw new Error("missing "+r.join(", "));if("é".normalize("NFD")!=="é")throw new Error("broken implementation")}catch(r){return r.message}return null}const UD=N6e();var LC;(function(r){r.DEBUG="DEBUG",r.INFO="INFO",r.WARNING="WARNING",r.ERROR="ERROR",r.OFF="OFF"})(LC||(LC={}));var Fc;(function(r){r.UNKNOWN_ERROR="UNKNOWN_ERROR",r.NOT_IMPLEMENTED="NOT_IMPLEMENTED",r.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",r.NETWORK_ERROR="NETWORK_ERROR",r.SERVER_ERROR="SERVER_ERROR",r.TIMEOUT="TIMEOUT",r.BUFFER_OVERRUN="BUFFER_OVERRUN",r.NUMERIC_FAULT="NUMERIC_FAULT",r.MISSING_NEW="MISSING_NEW",r.INVALID_ARGUMENT="INVALID_ARGUMENT",r.MISSING_ARGUMENT="MISSING_ARGUMENT",r.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",r.CALL_EXCEPTION="CALL_EXCEPTION",r.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",r.NONCE_EXPIRED="NONCE_EXPIRED",r.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",r.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",r.TRANSACTION_REPLACED="TRANSACTION_REPLACED",r.ACTION_REJECTED="ACTION_REJECTED"})(Fc||(Fc={}));const FD="0123456789abcdef";let Lo=class Ni{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){const n=e.toLowerCase();U4[n]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(LD>U4[n])&&console.log.apply(console,t)}debug(...e){this._log(Ni.levels.DEBUG,e)}info(...e){this._log(Ni.levels.INFO,e)}warn(...e){this._log(Ni.levels.WARNING,e)}makeError(e,t,n){if(BD)return this.makeError("censored error",t,{});t||(t=Ni.errors.UNKNOWN_ERROR),n||(n={});const i=[];Object.keys(n).forEach(c=>{const l=n[c];try{if(l instanceof Uint8Array){let h="";for(let f=0;f>4],h+=FD[l[f]&15];i.push(c+"=Uint8Array(0x"+h+")")}else i.push(c+"="+JSON.stringify(l))}catch{i.push(c+"="+JSON.stringify(n[c].toString()))}}),i.push(`code=${t}`),i.push(`version=${this.version}`);const s=e;let o="";switch(t){case Fc.NUMERIC_FAULT:{o="NUMERIC_FAULT";const c=e;switch(c){case"overflow":case"underflow":case"division-by-zero":o+="-"+c;break;case"negative-power":case"negative-width":o+="-unsupported";break;case"unbound-bitwise-result":o+="-unbound-result";break}break}case Fc.CALL_EXCEPTION:case Fc.INSUFFICIENT_FUNDS:case Fc.MISSING_NEW:case Fc.NONCE_EXPIRED:case Fc.REPLACEMENT_UNDERPRICED:case Fc.TRANSACTION_REPLACED:case Fc.UNPREDICTABLE_GAS_LIMIT:o=t;break}o&&(e+=" [ See: https://links.ethers.org/v5-errors-"+o+" ]"),i.length&&(e+=" ("+i.join(", ")+")");const a=new Error(e);return a.reason=s,a.code=t,Object.keys(n).forEach(function(c){a[c]=n[c]}),a}throwError(e,t,n){throw this.makeError(e,t,n)}throwArgumentError(e,t,n){return this.throwError(e,Ni.errors.INVALID_ARGUMENT,{argument:t,value:n})}assert(e,t,n,i){e||this.throwError(t,n,i)}assertArgument(e,t,n,i){e||this.throwArgumentError(t,n,i)}checkNormalize(e){UD&&this.throwError("platform missing String.prototype.normalize",Ni.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:UD})}checkSafeUint53(e,t){typeof e=="number"&&(t==null&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,Ni.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,Ni.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,n){n?n=": "+n:n="",et&&this.throwError("too many arguments"+n,Ni.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){(e===Object||e==null)&&this.throwError("missing new",Ni.errors.MISSING_NEW,{name:t.name})}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",Ni.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",Ni.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return p7||(p7=new Ni(k6e)),p7}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",Ni.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),$D){if(!e)return;this.globalLogger().throwError("error censorship permanent",Ni.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}BD=!!e,$D=!!t}static setLogLevel(e){const t=U4[e.toLowerCase()];if(t==null){Ni.globalLogger().warn("invalid log level - "+e);return}LD=t}static from(e){return new Ni(e)}};Lo.errors=Fc,Lo.levels=LC;const P6e="bytes/5.7.0",$f=new Lo(P6e);function MW(r){return!!r.toHexString}function F4(r){return r.slice||(r.slice=function(){const e=Array.prototype.slice.call(arguments);return F4(new Uint8Array(Array.prototype.slice.apply(r,e)))}),r}function jD(r){return typeof r=="number"&&r==r&&r%1===0}function ob(r){if(r==null)return!1;if(r.constructor===Uint8Array)return!0;if(typeof r=="string"||!jD(r.length)||r.length<0)return!1;for(let e=0;e=256)return!1}return!0}function DW(r,e){if(e||(e={}),typeof r=="number"){$f.checkSafeUint53(r,"invalid arrayify value");const t=[];for(;r;)t.unshift(r&255),r=parseInt(String(r/256));return t.length===0&&t.push(0),F4(new Uint8Array(t))}if(e.allowMissingPrefix&&typeof r=="string"&&r.substring(0,2)!=="0x"&&(r="0x"+r),MW(r)&&(r=r.toHexString()),kw(r)){let t=r.substring(2);t.length%2&&(e.hexPad==="left"?t="0"+t:e.hexPad==="right"?t+="0":$f.throwArgumentError("hex data is odd-length","value",r));const n=[];for(let i=0;i>4]+g7[i&15]}return t}return $f.throwArgumentError("invalid hexlify value","value",r)}function g8(r,e){for(typeof r!="string"?r=$W(r):kw(r)||$f.throwArgumentError("invalid hex string","value",r),r.length>2*e+2&&$f.throwArgumentError("value out of range","value",arguments[1]);r.length<2*e+2;)r="0x0"+r.substring(2);return r}var BW={exports:{}},O6e={},M6e=Object.freeze({__proto__:null,default:O6e}),D6e=T6e(M6e);(function(r){(function(e,t){function n(d,g){if(!d)throw new Error(g||"Assertion failed")}function i(d,g){d.super_=g;var m=function(){};m.prototype=g.prototype,d.prototype=new m,d.prototype.constructor=d}function s(d,g,m){if(s.isBN(d))return d;this.negative=0,this.words=null,this.length=0,this.red=null,d!==null&&((g==="le"||g==="be")&&(m=g,g=10),this._init(d||0,g||10,m||"be"))}typeof e=="object"?e.exports=s:t.BN=s,s.BN=s,s.wordSize=26;var o;try{typeof window<"u"&&typeof window.Buffer<"u"?o=window.Buffer:o=D6e.Buffer}catch{}s.isBN=function(d){return d instanceof s?!0:d!==null&&typeof d=="object"&&d.constructor.wordSize===s.wordSize&&Array.isArray(d.words)},s.max=function(d,g){return d.cmp(g)>0?d:g},s.min=function(d,g){return d.cmp(g)<0?d:g},s.prototype._init=function(d,g,m){if(typeof d=="number")return this._initNumber(d,g,m);if(typeof d=="object")return this._initArray(d,g,m);g==="hex"&&(g=16),n(g===(g|0)&&g>=2&&g<=36),d=d.toString().replace(/\s+/g,"");var b=0;d[0]==="-"&&(b++,this.negative=1),b=0;b-=3)C=d[b]|d[b-1]<<8|d[b-2]<<16,this.words[E]|=C<>>26-B&67108863,B+=24,B>=26&&(B-=26,E++);else if(m==="le")for(b=0,E=0;b>>26-B&67108863,B+=24,B>=26&&(B-=26,E++);return this._strip()};function a(d,g){var m=d.charCodeAt(g);if(m>=48&&m<=57)return m-48;if(m>=65&&m<=70)return m-55;if(m>=97&&m<=102)return m-87;n(!1,"Invalid character in "+d)}function c(d,g,m){var b=a(d,m);return m-1>=g&&(b|=a(d,m-1)<<4),b}s.prototype._parseHex=function(d,g,m){this.length=Math.ceil((d.length-g)/6),this.words=new Array(this.length);for(var b=0;b=g;b-=2)B=c(d,g,b)<=18?(E-=18,C+=1,this.words[C]|=B>>>26):E+=8;else{var R=d.length-g;for(b=R%2===0?g+1:g;b=18?(E-=18,C+=1,this.words[C]|=B>>>26):E+=8}this._strip()};function l(d,g,m,b){for(var E=0,C=0,B=Math.min(d.length,m),R=g;R=49?C=w-49+10:w>=17?C=w-17+10:C=w,n(w>=0&&C1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},s.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{s.prototype[Symbol.for("nodejs.util.inspect.custom")]=f}catch{s.prototype.inspect=f}else s.prototype.inspect=f;function f(){return(this.red?""}var v=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],y=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],A=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];s.prototype.toString=function(d,g){d=d||10,g=g|0||1;var m;if(d===16||d==="hex"){m="";for(var b=0,E=0,C=0;C>>24-b&16777215,b+=2,b>=26&&(b-=26,C--),E!==0||C!==this.length-1?m=v[6-R.length]+R+m:m=R+m}for(E!==0&&(m=E.toString(16)+m);m.length%g!==0;)m="0"+m;return this.negative!==0&&(m="-"+m),m}if(d===(d|0)&&d>=2&&d<=36){var w=y[d],O=A[d];m="";var pe=this.clone();for(pe.negative=0;!pe.isZero();){var be=pe.modrn(O).toString(d);pe=pe.idivn(O),pe.isZero()?m=be+m:m=v[w-be.length]+be+m}for(this.isZero()&&(m="0"+m);m.length%g!==0;)m="0"+m;return this.negative!==0&&(m="-"+m),m}n(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var d=this.words[0];return this.length===2?d+=this.words[1]*67108864:this.length===3&&this.words[2]===1?d+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-d:d},s.prototype.toJSON=function(){return this.toString(16,2)},o&&(s.prototype.toBuffer=function(d,g){return this.toArrayLike(o,d,g)}),s.prototype.toArray=function(d,g){return this.toArrayLike(Array,d,g)};var M=function(d,g){return d.allocUnsafe?d.allocUnsafe(g):new d(g)};s.prototype.toArrayLike=function(d,g,m){this._strip();var b=this.byteLength(),E=m||Math.max(1,b);n(b<=E,"byte array longer than desired length"),n(E>0,"Requested array length <= 0");var C=M(d,E),B=g==="le"?"LE":"BE";return this["_toArrayLike"+B](C,b),C},s.prototype._toArrayLikeLE=function(d,g){for(var m=0,b=0,E=0,C=0;E>8&255),m>16&255),C===6?(m>24&255),b=0,C=0):(b=B>>>24,C+=2)}if(m=0&&(d[m--]=B>>8&255),m>=0&&(d[m--]=B>>16&255),C===6?(m>=0&&(d[m--]=B>>24&255),b=0,C=0):(b=B>>>24,C+=2)}if(m>=0)for(d[m--]=b;m>=0;)d[m--]=0},Math.clz32?s.prototype._countBits=function(d){return 32-Math.clz32(d)}:s.prototype._countBits=function(d){var g=d,m=0;return g>=4096&&(m+=13,g>>>=13),g>=64&&(m+=7,g>>>=7),g>=8&&(m+=4,g>>>=4),g>=2&&(m+=2,g>>>=2),m+g},s.prototype._zeroBits=function(d){if(d===0)return 26;var g=d,m=0;return g&8191||(m+=13,g>>>=13),g&127||(m+=7,g>>>=7),g&15||(m+=4,g>>>=4),g&3||(m+=2,g>>>=2),g&1||m++,m},s.prototype.bitLength=function(){var d=this.words[this.length-1],g=this._countBits(d);return(this.length-1)*26+g};function $(d){for(var g=new Array(d.bitLength()),m=0;m>>E&1}return g}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var d=0,g=0;gd.length?this.clone().ior(d):d.clone().ior(this)},s.prototype.uor=function(d){return this.length>d.length?this.clone().iuor(d):d.clone().iuor(this)},s.prototype.iuand=function(d){var g;this.length>d.length?g=d:g=this;for(var m=0;md.length?this.clone().iand(d):d.clone().iand(this)},s.prototype.uand=function(d){return this.length>d.length?this.clone().iuand(d):d.clone().iuand(this)},s.prototype.iuxor=function(d){var g,m;this.length>d.length?(g=this,m=d):(g=d,m=this);for(var b=0;bd.length?this.clone().ixor(d):d.clone().ixor(this)},s.prototype.uxor=function(d){return this.length>d.length?this.clone().iuxor(d):d.clone().iuxor(this)},s.prototype.inotn=function(d){n(typeof d=="number"&&d>=0);var g=Math.ceil(d/26)|0,m=d%26;this._expand(g),m>0&&g--;for(var b=0;b0&&(this.words[b]=~this.words[b]&67108863>>26-m),this._strip()},s.prototype.notn=function(d){return this.clone().inotn(d)},s.prototype.setn=function(d,g){n(typeof d=="number"&&d>=0);var m=d/26|0,b=d%26;return this._expand(m+1),g?this.words[m]=this.words[m]|1<d.length?(m=this,b=d):(m=d,b=this);for(var E=0,C=0;C>>26;for(;E!==0&&C>>26;if(this.length=m.length,E!==0)this.words[this.length]=E,this.length++;else if(m!==this)for(;Cd.length?this.clone().iadd(d):d.clone().iadd(this)},s.prototype.isub=function(d){if(d.negative!==0){d.negative=0;var g=this.iadd(d);return d.negative=1,g._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(d),this.negative=1,this._normSign();var m=this.cmp(d);if(m===0)return this.negative=0,this.length=1,this.words[0]=0,this;var b,E;m>0?(b=this,E=d):(b=d,E=this);for(var C=0,B=0;B>26,this.words[B]=g&67108863;for(;C!==0&&B>26,this.words[B]=g&67108863;if(C===0&&B>>26,be=w&67108863,x=Math.min(O,g.length-1),Z=Math.max(0,O-d.length+1);Z<=x;Z++){var k=O-Z|0;E=d.words[k]|0,C=g.words[Z]|0,B=E*C+be,pe+=B/67108864|0,be=B&67108863}m.words[O]=be|0,w=pe|0}return w!==0?m.words[O]=w|0:m.length--,m._strip()}var P=function(d,g,m){var b=d.words,E=g.words,C=m.words,B=0,R,w,O,pe=b[0]|0,be=pe&8191,x=pe>>>13,Z=b[1]|0,k=Z&8191,W=Z>>>13,J=b[2]|0,S=J&8191,D=J>>>13,G=b[3]|0,z=G&8191,K=G>>>13,ue=b[4]|0,ye=ue&8191,we=ue>>>13,je=b[5]|0,Me=je&8191,Ie=je>>>13,Be=b[6]|0,xe=Be&8191,$e=Be>>>13,We=b[7]|0,Ne=We&8191,Ue=We>>>13,X=b[8]|0,N=X&8191,U=X>>>13,ie=b[9]|0,le=ie&8191,me=ie>>>13,Ee=E[0]|0,ze=Ee&8191,qe=Ee>>>13,St=E[1]|0,Je=St&8191,nt=St>>>13,jr=E[2]|0,jt=jr&8191,Ht=jr>>>13,bn=E[3]|0,pt=bn&8191,ht=bn>>>13,yr=E[4]|0,gt=yr&8191,ft=yr>>>13,ur=E[5]|0,_t=ur&8191,xt=ur>>>13,br=E[6]|0,At=br&8191,mt=br>>>13,Er=E[7]|0,wt=Er&8191,lt=Er>>>13,Ir=E[8]|0,Et=Ir&8191,Gt=Ir>>>13,Vn=E[9]|0,Zt=Vn&8191,Pt=Vn>>>13;m.negative=d.negative^g.negative,m.length=19,R=Math.imul(be,ze),w=Math.imul(be,qe),w=w+Math.imul(x,ze)|0,O=Math.imul(x,qe);var Nn=(B+R|0)+((w&8191)<<13)|0;B=(O+(w>>>13)|0)+(Nn>>>26)|0,Nn&=67108863,R=Math.imul(k,ze),w=Math.imul(k,qe),w=w+Math.imul(W,ze)|0,O=Math.imul(W,qe),R=R+Math.imul(be,Je)|0,w=w+Math.imul(be,nt)|0,w=w+Math.imul(x,Je)|0,O=O+Math.imul(x,nt)|0;var Pn=(B+R|0)+((w&8191)<<13)|0;B=(O+(w>>>13)|0)+(Pn>>>26)|0,Pn&=67108863,R=Math.imul(S,ze),w=Math.imul(S,qe),w=w+Math.imul(D,ze)|0,O=Math.imul(D,qe),R=R+Math.imul(k,Je)|0,w=w+Math.imul(k,nt)|0,w=w+Math.imul(W,Je)|0,O=O+Math.imul(W,nt)|0,R=R+Math.imul(be,jt)|0,w=w+Math.imul(be,Ht)|0,w=w+Math.imul(x,jt)|0,O=O+Math.imul(x,Ht)|0;var On=(B+R|0)+((w&8191)<<13)|0;B=(O+(w>>>13)|0)+(On>>>26)|0,On&=67108863,R=Math.imul(z,ze),w=Math.imul(z,qe),w=w+Math.imul(K,ze)|0,O=Math.imul(K,qe),R=R+Math.imul(S,Je)|0,w=w+Math.imul(S,nt)|0,w=w+Math.imul(D,Je)|0,O=O+Math.imul(D,nt)|0,R=R+Math.imul(k,jt)|0,w=w+Math.imul(k,Ht)|0,w=w+Math.imul(W,jt)|0,O=O+Math.imul(W,Ht)|0,R=R+Math.imul(be,pt)|0,w=w+Math.imul(be,ht)|0,w=w+Math.imul(x,pt)|0,O=O+Math.imul(x,ht)|0;var Mn=(B+R|0)+((w&8191)<<13)|0;B=(O+(w>>>13)|0)+(Mn>>>26)|0,Mn&=67108863,R=Math.imul(ye,ze),w=Math.imul(ye,qe),w=w+Math.imul(we,ze)|0,O=Math.imul(we,qe),R=R+Math.imul(z,Je)|0,w=w+Math.imul(z,nt)|0,w=w+Math.imul(K,Je)|0,O=O+Math.imul(K,nt)|0,R=R+Math.imul(S,jt)|0,w=w+Math.imul(S,Ht)|0,w=w+Math.imul(D,jt)|0,O=O+Math.imul(D,Ht)|0,R=R+Math.imul(k,pt)|0,w=w+Math.imul(k,ht)|0,w=w+Math.imul(W,pt)|0,O=O+Math.imul(W,ht)|0,R=R+Math.imul(be,gt)|0,w=w+Math.imul(be,ft)|0,w=w+Math.imul(x,gt)|0,O=O+Math.imul(x,ft)|0;var Dn=(B+R|0)+((w&8191)<<13)|0;B=(O+(w>>>13)|0)+(Dn>>>26)|0,Dn&=67108863,R=Math.imul(Me,ze),w=Math.imul(Me,qe),w=w+Math.imul(Ie,ze)|0,O=Math.imul(Ie,qe),R=R+Math.imul(ye,Je)|0,w=w+Math.imul(ye,nt)|0,w=w+Math.imul(we,Je)|0,O=O+Math.imul(we,nt)|0,R=R+Math.imul(z,jt)|0,w=w+Math.imul(z,Ht)|0,w=w+Math.imul(K,jt)|0,O=O+Math.imul(K,Ht)|0,R=R+Math.imul(S,pt)|0,w=w+Math.imul(S,ht)|0,w=w+Math.imul(D,pt)|0,O=O+Math.imul(D,ht)|0,R=R+Math.imul(k,gt)|0,w=w+Math.imul(k,ft)|0,w=w+Math.imul(W,gt)|0,O=O+Math.imul(W,ft)|0,R=R+Math.imul(be,_t)|0,w=w+Math.imul(be,xt)|0,w=w+Math.imul(x,_t)|0,O=O+Math.imul(x,xt)|0;var tn=(B+R|0)+((w&8191)<<13)|0;B=(O+(w>>>13)|0)+(tn>>>26)|0,tn&=67108863,R=Math.imul(xe,ze),w=Math.imul(xe,qe),w=w+Math.imul($e,ze)|0,O=Math.imul($e,qe),R=R+Math.imul(Me,Je)|0,w=w+Math.imul(Me,nt)|0,w=w+Math.imul(Ie,Je)|0,O=O+Math.imul(Ie,nt)|0,R=R+Math.imul(ye,jt)|0,w=w+Math.imul(ye,Ht)|0,w=w+Math.imul(we,jt)|0,O=O+Math.imul(we,Ht)|0,R=R+Math.imul(z,pt)|0,w=w+Math.imul(z,ht)|0,w=w+Math.imul(K,pt)|0,O=O+Math.imul(K,ht)|0,R=R+Math.imul(S,gt)|0,w=w+Math.imul(S,ft)|0,w=w+Math.imul(D,gt)|0,O=O+Math.imul(D,ft)|0,R=R+Math.imul(k,_t)|0,w=w+Math.imul(k,xt)|0,w=w+Math.imul(W,_t)|0,O=O+Math.imul(W,xt)|0,R=R+Math.imul(be,At)|0,w=w+Math.imul(be,mt)|0,w=w+Math.imul(x,At)|0,O=O+Math.imul(x,mt)|0;var $i=(B+R|0)+((w&8191)<<13)|0;B=(O+(w>>>13)|0)+($i>>>26)|0,$i&=67108863,R=Math.imul(Ne,ze),w=Math.imul(Ne,qe),w=w+Math.imul(Ue,ze)|0,O=Math.imul(Ue,qe),R=R+Math.imul(xe,Je)|0,w=w+Math.imul(xe,nt)|0,w=w+Math.imul($e,Je)|0,O=O+Math.imul($e,nt)|0,R=R+Math.imul(Me,jt)|0,w=w+Math.imul(Me,Ht)|0,w=w+Math.imul(Ie,jt)|0,O=O+Math.imul(Ie,Ht)|0,R=R+Math.imul(ye,pt)|0,w=w+Math.imul(ye,ht)|0,w=w+Math.imul(we,pt)|0,O=O+Math.imul(we,ht)|0,R=R+Math.imul(z,gt)|0,w=w+Math.imul(z,ft)|0,w=w+Math.imul(K,gt)|0,O=O+Math.imul(K,ft)|0,R=R+Math.imul(S,_t)|0,w=w+Math.imul(S,xt)|0,w=w+Math.imul(D,_t)|0,O=O+Math.imul(D,xt)|0,R=R+Math.imul(k,At)|0,w=w+Math.imul(k,mt)|0,w=w+Math.imul(W,At)|0,O=O+Math.imul(W,mt)|0,R=R+Math.imul(be,wt)|0,w=w+Math.imul(be,lt)|0,w=w+Math.imul(x,wt)|0,O=O+Math.imul(x,lt)|0;var $s=(B+R|0)+((w&8191)<<13)|0;B=(O+(w>>>13)|0)+($s>>>26)|0,$s&=67108863,R=Math.imul(N,ze),w=Math.imul(N,qe),w=w+Math.imul(U,ze)|0,O=Math.imul(U,qe),R=R+Math.imul(Ne,Je)|0,w=w+Math.imul(Ne,nt)|0,w=w+Math.imul(Ue,Je)|0,O=O+Math.imul(Ue,nt)|0,R=R+Math.imul(xe,jt)|0,w=w+Math.imul(xe,Ht)|0,w=w+Math.imul($e,jt)|0,O=O+Math.imul($e,Ht)|0,R=R+Math.imul(Me,pt)|0,w=w+Math.imul(Me,ht)|0,w=w+Math.imul(Ie,pt)|0,O=O+Math.imul(Ie,ht)|0,R=R+Math.imul(ye,gt)|0,w=w+Math.imul(ye,ft)|0,w=w+Math.imul(we,gt)|0,O=O+Math.imul(we,ft)|0,R=R+Math.imul(z,_t)|0,w=w+Math.imul(z,xt)|0,w=w+Math.imul(K,_t)|0,O=O+Math.imul(K,xt)|0,R=R+Math.imul(S,At)|0,w=w+Math.imul(S,mt)|0,w=w+Math.imul(D,At)|0,O=O+Math.imul(D,mt)|0,R=R+Math.imul(k,wt)|0,w=w+Math.imul(k,lt)|0,w=w+Math.imul(W,wt)|0,O=O+Math.imul(W,lt)|0,R=R+Math.imul(be,Et)|0,w=w+Math.imul(be,Gt)|0,w=w+Math.imul(x,Et)|0,O=O+Math.imul(x,Gt)|0;var Bi=(B+R|0)+((w&8191)<<13)|0;B=(O+(w>>>13)|0)+(Bi>>>26)|0,Bi&=67108863,R=Math.imul(le,ze),w=Math.imul(le,qe),w=w+Math.imul(me,ze)|0,O=Math.imul(me,qe),R=R+Math.imul(N,Je)|0,w=w+Math.imul(N,nt)|0,w=w+Math.imul(U,Je)|0,O=O+Math.imul(U,nt)|0,R=R+Math.imul(Ne,jt)|0,w=w+Math.imul(Ne,Ht)|0,w=w+Math.imul(Ue,jt)|0,O=O+Math.imul(Ue,Ht)|0,R=R+Math.imul(xe,pt)|0,w=w+Math.imul(xe,ht)|0,w=w+Math.imul($e,pt)|0,O=O+Math.imul($e,ht)|0,R=R+Math.imul(Me,gt)|0,w=w+Math.imul(Me,ft)|0,w=w+Math.imul(Ie,gt)|0,O=O+Math.imul(Ie,ft)|0,R=R+Math.imul(ye,_t)|0,w=w+Math.imul(ye,xt)|0,w=w+Math.imul(we,_t)|0,O=O+Math.imul(we,xt)|0,R=R+Math.imul(z,At)|0,w=w+Math.imul(z,mt)|0,w=w+Math.imul(K,At)|0,O=O+Math.imul(K,mt)|0,R=R+Math.imul(S,wt)|0,w=w+Math.imul(S,lt)|0,w=w+Math.imul(D,wt)|0,O=O+Math.imul(D,lt)|0,R=R+Math.imul(k,Et)|0,w=w+Math.imul(k,Gt)|0,w=w+Math.imul(W,Et)|0,O=O+Math.imul(W,Gt)|0,R=R+Math.imul(be,Zt)|0,w=w+Math.imul(be,Pt)|0,w=w+Math.imul(x,Zt)|0,O=O+Math.imul(x,Pt)|0;var Bs=(B+R|0)+((w&8191)<<13)|0;B=(O+(w>>>13)|0)+(Bs>>>26)|0,Bs&=67108863,R=Math.imul(le,Je),w=Math.imul(le,nt),w=w+Math.imul(me,Je)|0,O=Math.imul(me,nt),R=R+Math.imul(N,jt)|0,w=w+Math.imul(N,Ht)|0,w=w+Math.imul(U,jt)|0,O=O+Math.imul(U,Ht)|0,R=R+Math.imul(Ne,pt)|0,w=w+Math.imul(Ne,ht)|0,w=w+Math.imul(Ue,pt)|0,O=O+Math.imul(Ue,ht)|0,R=R+Math.imul(xe,gt)|0,w=w+Math.imul(xe,ft)|0,w=w+Math.imul($e,gt)|0,O=O+Math.imul($e,ft)|0,R=R+Math.imul(Me,_t)|0,w=w+Math.imul(Me,xt)|0,w=w+Math.imul(Ie,_t)|0,O=O+Math.imul(Ie,xt)|0,R=R+Math.imul(ye,At)|0,w=w+Math.imul(ye,mt)|0,w=w+Math.imul(we,At)|0,O=O+Math.imul(we,mt)|0,R=R+Math.imul(z,wt)|0,w=w+Math.imul(z,lt)|0,w=w+Math.imul(K,wt)|0,O=O+Math.imul(K,lt)|0,R=R+Math.imul(S,Et)|0,w=w+Math.imul(S,Gt)|0,w=w+Math.imul(D,Et)|0,O=O+Math.imul(D,Gt)|0,R=R+Math.imul(k,Zt)|0,w=w+Math.imul(k,Pt)|0,w=w+Math.imul(W,Zt)|0,O=O+Math.imul(W,Pt)|0;var Ls=(B+R|0)+((w&8191)<<13)|0;B=(O+(w>>>13)|0)+(Ls>>>26)|0,Ls&=67108863,R=Math.imul(le,jt),w=Math.imul(le,Ht),w=w+Math.imul(me,jt)|0,O=Math.imul(me,Ht),R=R+Math.imul(N,pt)|0,w=w+Math.imul(N,ht)|0,w=w+Math.imul(U,pt)|0,O=O+Math.imul(U,ht)|0,R=R+Math.imul(Ne,gt)|0,w=w+Math.imul(Ne,ft)|0,w=w+Math.imul(Ue,gt)|0,O=O+Math.imul(Ue,ft)|0,R=R+Math.imul(xe,_t)|0,w=w+Math.imul(xe,xt)|0,w=w+Math.imul($e,_t)|0,O=O+Math.imul($e,xt)|0,R=R+Math.imul(Me,At)|0,w=w+Math.imul(Me,mt)|0,w=w+Math.imul(Ie,At)|0,O=O+Math.imul(Ie,mt)|0,R=R+Math.imul(ye,wt)|0,w=w+Math.imul(ye,lt)|0,w=w+Math.imul(we,wt)|0,O=O+Math.imul(we,lt)|0,R=R+Math.imul(z,Et)|0,w=w+Math.imul(z,Gt)|0,w=w+Math.imul(K,Et)|0,O=O+Math.imul(K,Gt)|0,R=R+Math.imul(S,Zt)|0,w=w+Math.imul(S,Pt)|0,w=w+Math.imul(D,Zt)|0,O=O+Math.imul(D,Pt)|0;var Li=(B+R|0)+((w&8191)<<13)|0;B=(O+(w>>>13)|0)+(Li>>>26)|0,Li&=67108863,R=Math.imul(le,pt),w=Math.imul(le,ht),w=w+Math.imul(me,pt)|0,O=Math.imul(me,ht),R=R+Math.imul(N,gt)|0,w=w+Math.imul(N,ft)|0,w=w+Math.imul(U,gt)|0,O=O+Math.imul(U,ft)|0,R=R+Math.imul(Ne,_t)|0,w=w+Math.imul(Ne,xt)|0,w=w+Math.imul(Ue,_t)|0,O=O+Math.imul(Ue,xt)|0,R=R+Math.imul(xe,At)|0,w=w+Math.imul(xe,mt)|0,w=w+Math.imul($e,At)|0,O=O+Math.imul($e,mt)|0,R=R+Math.imul(Me,wt)|0,w=w+Math.imul(Me,lt)|0,w=w+Math.imul(Ie,wt)|0,O=O+Math.imul(Ie,lt)|0,R=R+Math.imul(ye,Et)|0,w=w+Math.imul(ye,Gt)|0,w=w+Math.imul(we,Et)|0,O=O+Math.imul(we,Gt)|0,R=R+Math.imul(z,Zt)|0,w=w+Math.imul(z,Pt)|0,w=w+Math.imul(K,Zt)|0,O=O+Math.imul(K,Pt)|0;var gs=(B+R|0)+((w&8191)<<13)|0;B=(O+(w>>>13)|0)+(gs>>>26)|0,gs&=67108863,R=Math.imul(le,gt),w=Math.imul(le,ft),w=w+Math.imul(me,gt)|0,O=Math.imul(me,ft),R=R+Math.imul(N,_t)|0,w=w+Math.imul(N,xt)|0,w=w+Math.imul(U,_t)|0,O=O+Math.imul(U,xt)|0,R=R+Math.imul(Ne,At)|0,w=w+Math.imul(Ne,mt)|0,w=w+Math.imul(Ue,At)|0,O=O+Math.imul(Ue,mt)|0,R=R+Math.imul(xe,wt)|0,w=w+Math.imul(xe,lt)|0,w=w+Math.imul($e,wt)|0,O=O+Math.imul($e,lt)|0,R=R+Math.imul(Me,Et)|0,w=w+Math.imul(Me,Gt)|0,w=w+Math.imul(Ie,Et)|0,O=O+Math.imul(Ie,Gt)|0,R=R+Math.imul(ye,Zt)|0,w=w+Math.imul(ye,Pt)|0,w=w+Math.imul(we,Zt)|0,O=O+Math.imul(we,Pt)|0;var ms=(B+R|0)+((w&8191)<<13)|0;B=(O+(w>>>13)|0)+(ms>>>26)|0,ms&=67108863,R=Math.imul(le,_t),w=Math.imul(le,xt),w=w+Math.imul(me,_t)|0,O=Math.imul(me,xt),R=R+Math.imul(N,At)|0,w=w+Math.imul(N,mt)|0,w=w+Math.imul(U,At)|0,O=O+Math.imul(U,mt)|0,R=R+Math.imul(Ne,wt)|0,w=w+Math.imul(Ne,lt)|0,w=w+Math.imul(Ue,wt)|0,O=O+Math.imul(Ue,lt)|0,R=R+Math.imul(xe,Et)|0,w=w+Math.imul(xe,Gt)|0,w=w+Math.imul($e,Et)|0,O=O+Math.imul($e,Gt)|0,R=R+Math.imul(Me,Zt)|0,w=w+Math.imul(Me,Pt)|0,w=w+Math.imul(Ie,Zt)|0,O=O+Math.imul(Ie,Pt)|0;var qn=(B+R|0)+((w&8191)<<13)|0;B=(O+(w>>>13)|0)+(qn>>>26)|0,qn&=67108863,R=Math.imul(le,At),w=Math.imul(le,mt),w=w+Math.imul(me,At)|0,O=Math.imul(me,mt),R=R+Math.imul(N,wt)|0,w=w+Math.imul(N,lt)|0,w=w+Math.imul(U,wt)|0,O=O+Math.imul(U,lt)|0,R=R+Math.imul(Ne,Et)|0,w=w+Math.imul(Ne,Gt)|0,w=w+Math.imul(Ue,Et)|0,O=O+Math.imul(Ue,Gt)|0,R=R+Math.imul(xe,Zt)|0,w=w+Math.imul(xe,Pt)|0,w=w+Math.imul($e,Zt)|0,O=O+Math.imul($e,Pt)|0;var yc=(B+R|0)+((w&8191)<<13)|0;B=(O+(w>>>13)|0)+(yc>>>26)|0,yc&=67108863,R=Math.imul(le,wt),w=Math.imul(le,lt),w=w+Math.imul(me,wt)|0,O=Math.imul(me,lt),R=R+Math.imul(N,Et)|0,w=w+Math.imul(N,Gt)|0,w=w+Math.imul(U,Et)|0,O=O+Math.imul(U,Gt)|0,R=R+Math.imul(Ne,Zt)|0,w=w+Math.imul(Ne,Pt)|0,w=w+Math.imul(Ue,Zt)|0,O=O+Math.imul(Ue,Pt)|0;var bc=(B+R|0)+((w&8191)<<13)|0;B=(O+(w>>>13)|0)+(bc>>>26)|0,bc&=67108863,R=Math.imul(le,Et),w=Math.imul(le,Gt),w=w+Math.imul(me,Et)|0,O=Math.imul(me,Gt),R=R+Math.imul(N,Zt)|0,w=w+Math.imul(N,Pt)|0,w=w+Math.imul(U,Zt)|0,O=O+Math.imul(U,Pt)|0;var _c=(B+R|0)+((w&8191)<<13)|0;B=(O+(w>>>13)|0)+(_c>>>26)|0,_c&=67108863,R=Math.imul(le,Zt),w=Math.imul(le,Pt),w=w+Math.imul(me,Zt)|0,O=Math.imul(me,Pt);var xc=(B+R|0)+((w&8191)<<13)|0;return B=(O+(w>>>13)|0)+(xc>>>26)|0,xc&=67108863,C[0]=Nn,C[1]=Pn,C[2]=On,C[3]=Mn,C[4]=Dn,C[5]=tn,C[6]=$i,C[7]=$s,C[8]=Bi,C[9]=Bs,C[10]=Ls,C[11]=Li,C[12]=gs,C[13]=ms,C[14]=qn,C[15]=yc,C[16]=bc,C[17]=_c,C[18]=xc,B!==0&&(C[19]=B,m.length++),m};Math.imul||(P=L);function H(d,g,m){m.negative=g.negative^d.negative,m.length=d.length+g.length;for(var b=0,E=0,C=0;C>>26)|0,E+=B>>>26,B&=67108863}m.words[C]=R,b=B,B=E}return b!==0?m.words[C]=b:m.length--,m._strip()}function F(d,g,m){return H(d,g,m)}s.prototype.mulTo=function(d,g){var m,b=this.length+d.length;return this.length===10&&d.length===10?m=P(this,d,g):b<63?m=L(this,d,g):b<1024?m=H(this,d,g):m=F(this,d,g),m},s.prototype.mul=function(d){var g=new s(null);return g.words=new Array(this.length+d.length),this.mulTo(d,g)},s.prototype.mulf=function(d){var g=new s(null);return g.words=new Array(this.length+d.length),F(this,d,g)},s.prototype.imul=function(d){return this.clone().mulTo(d,this)},s.prototype.imuln=function(d){var g=d<0;g&&(d=-d),n(typeof d=="number"),n(d<67108864);for(var m=0,b=0;b>=26,m+=E/67108864|0,m+=C>>>26,this.words[b]=C&67108863}return m!==0&&(this.words[b]=m,this.length++),g?this.ineg():this},s.prototype.muln=function(d){return this.clone().imuln(d)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(d){var g=$(d);if(g.length===0)return new s(1);for(var m=this,b=0;b=0);var g=d%26,m=(d-g)/26,b=67108863>>>26-g<<26-g,E;if(g!==0){var C=0;for(E=0;E>>26-g}C&&(this.words[E]=C,this.length++)}if(m!==0){for(E=this.length-1;E>=0;E--)this.words[E+m]=this.words[E];for(E=0;E=0);var b;g?b=(g-g%26)/26:b=0;var E=d%26,C=Math.min((d-E)/26,this.length),B=67108863^67108863>>>E<C)for(this.length-=C,w=0;w=0&&(O!==0||w>=b);w--){var pe=this.words[w]|0;this.words[w]=O<<26-E|pe>>>E,O=pe&B}return R&&O!==0&&(R.words[R.length++]=O),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},s.prototype.ishrn=function(d,g,m){return n(this.negative===0),this.iushrn(d,g,m)},s.prototype.shln=function(d){return this.clone().ishln(d)},s.prototype.ushln=function(d){return this.clone().iushln(d)},s.prototype.shrn=function(d){return this.clone().ishrn(d)},s.prototype.ushrn=function(d){return this.clone().iushrn(d)},s.prototype.testn=function(d){n(typeof d=="number"&&d>=0);var g=d%26,m=(d-g)/26,b=1<=0);var g=d%26,m=(d-g)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=m)return this;if(g!==0&&m++,this.length=Math.min(m,this.length),g!==0){var b=67108863^67108863>>>g<=67108864;g++)this.words[g]-=67108864,g===this.length-1?this.words[g+1]=1:this.words[g+1]++;return this.length=Math.max(this.length,g+1),this},s.prototype.isubn=function(d){if(n(typeof d=="number"),n(d<67108864),d<0)return this.iaddn(-d);if(this.negative!==0)return this.negative=0,this.iaddn(d),this.negative=1,this;if(this.words[0]-=d,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var g=0;g>26)-(R/67108864|0),this.words[E+m]=C&67108863}for(;E>26,this.words[E+m]=C&67108863;if(B===0)return this._strip();for(n(B===-1),B=0,E=0;E>26,this.words[E]=C&67108863;return this.negative=1,this._strip()},s.prototype._wordDiv=function(d,g){var m=this.length-d.length,b=this.clone(),E=d,C=E.words[E.length-1]|0,B=this._countBits(C);m=26-B,m!==0&&(E=E.ushln(m),b.iushln(m),C=E.words[E.length-1]|0);var R=b.length-E.length,w;if(g!=="mod"){w=new s(null),w.length=R+1,w.words=new Array(w.length);for(var O=0;O=0;be--){var x=(b.words[E.length+be]|0)*67108864+(b.words[E.length+be-1]|0);for(x=Math.min(x/C|0,67108863),b._ishlnsubmul(E,x,be);b.negative!==0;)x--,b.negative=0,b._ishlnsubmul(E,1,be),b.isZero()||(b.negative^=1);w&&(w.words[be]=x)}return w&&w._strip(),b._strip(),g!=="div"&&m!==0&&b.iushrn(m),{div:w||null,mod:b}},s.prototype.divmod=function(d,g,m){if(n(!d.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var b,E,C;return this.negative!==0&&d.negative===0?(C=this.neg().divmod(d,g),g!=="mod"&&(b=C.div.neg()),g!=="div"&&(E=C.mod.neg(),m&&E.negative!==0&&E.iadd(d)),{div:b,mod:E}):this.negative===0&&d.negative!==0?(C=this.divmod(d.neg(),g),g!=="mod"&&(b=C.div.neg()),{div:b,mod:C.mod}):this.negative&d.negative?(C=this.neg().divmod(d.neg(),g),g!=="div"&&(E=C.mod.neg(),m&&E.negative!==0&&E.isub(d)),{div:C.div,mod:E}):d.length>this.length||this.cmp(d)<0?{div:new s(0),mod:this}:d.length===1?g==="div"?{div:this.divn(d.words[0]),mod:null}:g==="mod"?{div:null,mod:new s(this.modrn(d.words[0]))}:{div:this.divn(d.words[0]),mod:new s(this.modrn(d.words[0]))}:this._wordDiv(d,g)},s.prototype.div=function(d){return this.divmod(d,"div",!1).div},s.prototype.mod=function(d){return this.divmod(d,"mod",!1).mod},s.prototype.umod=function(d){return this.divmod(d,"mod",!0).mod},s.prototype.divRound=function(d){var g=this.divmod(d);if(g.mod.isZero())return g.div;var m=g.div.negative!==0?g.mod.isub(d):g.mod,b=d.ushrn(1),E=d.andln(1),C=m.cmp(b);return C<0||E===1&&C===0?g.div:g.div.negative!==0?g.div.isubn(1):g.div.iaddn(1)},s.prototype.modrn=function(d){var g=d<0;g&&(d=-d),n(d<=67108863);for(var m=(1<<26)%d,b=0,E=this.length-1;E>=0;E--)b=(m*b+(this.words[E]|0))%d;return g?-b:b},s.prototype.modn=function(d){return this.modrn(d)},s.prototype.idivn=function(d){var g=d<0;g&&(d=-d),n(d<=67108863);for(var m=0,b=this.length-1;b>=0;b--){var E=(this.words[b]|0)+m*67108864;this.words[b]=E/d|0,m=E%d}return this._strip(),g?this.ineg():this},s.prototype.divn=function(d){return this.clone().idivn(d)},s.prototype.egcd=function(d){n(d.negative===0),n(!d.isZero());var g=this,m=d.clone();g.negative!==0?g=g.umod(d):g=g.clone();for(var b=new s(1),E=new s(0),C=new s(0),B=new s(1),R=0;g.isEven()&&m.isEven();)g.iushrn(1),m.iushrn(1),++R;for(var w=m.clone(),O=g.clone();!g.isZero();){for(var pe=0,be=1;!(g.words[0]&be)&&pe<26;++pe,be<<=1);if(pe>0)for(g.iushrn(pe);pe-- >0;)(b.isOdd()||E.isOdd())&&(b.iadd(w),E.isub(O)),b.iushrn(1),E.iushrn(1);for(var x=0,Z=1;!(m.words[0]&Z)&&x<26;++x,Z<<=1);if(x>0)for(m.iushrn(x);x-- >0;)(C.isOdd()||B.isOdd())&&(C.iadd(w),B.isub(O)),C.iushrn(1),B.iushrn(1);g.cmp(m)>=0?(g.isub(m),b.isub(C),E.isub(B)):(m.isub(g),C.isub(b),B.isub(E))}return{a:C,b:B,gcd:m.iushln(R)}},s.prototype._invmp=function(d){n(d.negative===0),n(!d.isZero());var g=this,m=d.clone();g.negative!==0?g=g.umod(d):g=g.clone();for(var b=new s(1),E=new s(0),C=m.clone();g.cmpn(1)>0&&m.cmpn(1)>0;){for(var B=0,R=1;!(g.words[0]&R)&&B<26;++B,R<<=1);if(B>0)for(g.iushrn(B);B-- >0;)b.isOdd()&&b.iadd(C),b.iushrn(1);for(var w=0,O=1;!(m.words[0]&O)&&w<26;++w,O<<=1);if(w>0)for(m.iushrn(w);w-- >0;)E.isOdd()&&E.iadd(C),E.iushrn(1);g.cmp(m)>=0?(g.isub(m),b.isub(E)):(m.isub(g),E.isub(b))}var pe;return g.cmpn(1)===0?pe=b:pe=E,pe.cmpn(0)<0&&pe.iadd(d),pe},s.prototype.gcd=function(d){if(this.isZero())return d.abs();if(d.isZero())return this.abs();var g=this.clone(),m=d.clone();g.negative=0,m.negative=0;for(var b=0;g.isEven()&&m.isEven();b++)g.iushrn(1),m.iushrn(1);do{for(;g.isEven();)g.iushrn(1);for(;m.isEven();)m.iushrn(1);var E=g.cmp(m);if(E<0){var C=g;g=m,m=C}else if(E===0||m.cmpn(1)===0)break;g.isub(m)}while(!0);return m.iushln(b)},s.prototype.invm=function(d){return this.egcd(d).a.umod(d)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(d){return this.words[0]&d},s.prototype.bincn=function(d){n(typeof d=="number");var g=d%26,m=(d-g)/26,b=1<>>26,B&=67108863,this.words[C]=B}return E!==0&&(this.words[C]=E,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(d){var g=d<0;if(this.negative!==0&&!g)return-1;if(this.negative===0&&g)return 1;this._strip();var m;if(this.length>1)m=1;else{g&&(d=-d),n(d<=67108863,"Number is too big");var b=this.words[0]|0;m=b===d?0:bd.length)return 1;if(this.length=0;m--){var b=this.words[m]|0,E=d.words[m]|0;if(b!==E){bE&&(g=1);break}}return g},s.prototype.gtn=function(d){return this.cmpn(d)===1},s.prototype.gt=function(d){return this.cmp(d)===1},s.prototype.gten=function(d){return this.cmpn(d)>=0},s.prototype.gte=function(d){return this.cmp(d)>=0},s.prototype.ltn=function(d){return this.cmpn(d)===-1},s.prototype.lt=function(d){return this.cmp(d)===-1},s.prototype.lten=function(d){return this.cmpn(d)<=0},s.prototype.lte=function(d){return this.cmp(d)<=0},s.prototype.eqn=function(d){return this.cmpn(d)===0},s.prototype.eq=function(d){return this.cmp(d)===0},s.red=function(d){return new te(d)},s.prototype.toRed=function(d){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),d.convertTo(this)._forceRed(d)},s.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(d){return this.red=d,this},s.prototype.forceRed=function(d){return n(!this.red,"Already a number in reduction context"),this._forceRed(d)},s.prototype.redAdd=function(d){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,d)},s.prototype.redIAdd=function(d){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,d)},s.prototype.redSub=function(d){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,d)},s.prototype.redISub=function(d){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,d)},s.prototype.redShl=function(d){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,d)},s.prototype.redMul=function(d){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,d),this.red.mul(this,d)},s.prototype.redIMul=function(d){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,d),this.red.imul(this,d)},s.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(d){return n(this.red&&!d.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,d)};var q={k256:null,p224:null,p192:null,p25519:null};function Y(d,g){this.name=d,this.p=new s(g,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}Y.prototype._tmp=function(){var d=new s(null);return d.words=new Array(Math.ceil(this.n/13)),d},Y.prototype.ireduce=function(d){var g=d,m;do this.split(g,this.tmp),g=this.imulK(g),g=g.iadd(this.tmp),m=g.bitLength();while(m>this.n);var b=m0?g.isub(this.p):g.strip!==void 0?g.strip():g._strip(),g},Y.prototype.split=function(d,g){d.iushrn(this.n,0,g)},Y.prototype.imulK=function(d){return d.imul(this.k)};function I(){Y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(I,Y),I.prototype.split=function(d,g){for(var m=4194303,b=Math.min(d.length,9),E=0;E>>22,C=B}C>>>=22,d.words[E-10]=C,C===0&&d.length>10?d.length-=10:d.length-=9},I.prototype.imulK=function(d){d.words[d.length]=0,d.words[d.length+1]=0,d.length+=2;for(var g=0,m=0;m>>=26,d.words[m]=E,g=b}return g!==0&&(d.words[d.length++]=g),d},s._prime=function(d){if(q[d])return q[d];var g;if(d==="k256")g=new I;else if(d==="p224")g=new T;else if(d==="p192")g=new V;else if(d==="p25519")g=new Q;else throw new Error("Unknown prime "+d);return q[d]=g,g};function te(d){if(typeof d=="string"){var g=s._prime(d);this.m=g.p,this.prime=g}else n(d.gtn(1),"modulus must be greater than 1"),this.m=d,this.prime=null}te.prototype._verify1=function(d){n(d.negative===0,"red works only with positives"),n(d.red,"red works only with red numbers")},te.prototype._verify2=function(d,g){n((d.negative|g.negative)===0,"red works only with positives"),n(d.red&&d.red===g.red,"red works only with red numbers")},te.prototype.imod=function(d){return this.prime?this.prime.ireduce(d)._forceRed(this):(h(d,d.umod(this.m)._forceRed(this)),d)},te.prototype.neg=function(d){return d.isZero()?d.clone():this.m.sub(d)._forceRed(this)},te.prototype.add=function(d,g){this._verify2(d,g);var m=d.add(g);return m.cmp(this.m)>=0&&m.isub(this.m),m._forceRed(this)},te.prototype.iadd=function(d,g){this._verify2(d,g);var m=d.iadd(g);return m.cmp(this.m)>=0&&m.isub(this.m),m},te.prototype.sub=function(d,g){this._verify2(d,g);var m=d.sub(g);return m.cmpn(0)<0&&m.iadd(this.m),m._forceRed(this)},te.prototype.isub=function(d,g){this._verify2(d,g);var m=d.isub(g);return m.cmpn(0)<0&&m.iadd(this.m),m},te.prototype.shl=function(d,g){return this._verify1(d),this.imod(d.ushln(g))},te.prototype.imul=function(d,g){return this._verify2(d,g),this.imod(d.imul(g))},te.prototype.mul=function(d,g){return this._verify2(d,g),this.imod(d.mul(g))},te.prototype.isqr=function(d){return this.imul(d,d.clone())},te.prototype.sqr=function(d){return this.mul(d,d)},te.prototype.sqrt=function(d){if(d.isZero())return d.clone();var g=this.m.andln(3);if(n(g%2===1),g===3){var m=this.m.add(new s(1)).iushrn(2);return this.pow(d,m)}for(var b=this.m.subn(1),E=0;!b.isZero()&&b.andln(1)===0;)E++,b.iushrn(1);n(!b.isZero());var C=new s(1).toRed(this),B=C.redNeg(),R=this.m.subn(1).iushrn(1),w=this.m.bitLength();for(w=new s(2*w*w).toRed(this);this.pow(w,R).cmp(B)!==0;)w.redIAdd(B);for(var O=this.pow(w,b),pe=this.pow(d,b.addn(1).iushrn(1)),be=this.pow(d,b),x=E;be.cmp(C)!==0;){for(var Z=be,k=0;Z.cmp(C)!==0;k++)Z=Z.redSqr();n(k=0;E--){for(var O=g.words[E],pe=w-1;pe>=0;pe--){var be=O>>pe&1;if(C!==b[0]&&(C=this.sqr(C)),be===0&&B===0){R=0;continue}B<<=1,B|=be,R++,!(R!==m&&(E!==0||pe!==0))&&(C=this.mul(C,b[B]),R=0,B=0)}w=26}return C},te.prototype.convertTo=function(d){var g=d.umod(this.m);return g===d?g.clone():g},te.prototype.convertFrom=function(d){var g=d.clone();return g.red=null,g},s.mont=function(d){return new oe(d)};function oe(d){te.call(this,d),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(oe,te),oe.prototype.convertTo=function(d){return this.imod(d.ushln(this.shift))},oe.prototype.convertFrom=function(d){var g=this.imod(d.mul(this.rinv));return g.red=null,g},oe.prototype.imul=function(d,g){if(d.isZero()||g.isZero())return d.words[0]=0,d.length=1,d;var m=d.imul(g),b=m.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),E=m.isub(b).iushrn(this.shift),C=E;return E.cmp(this.m)>=0?C=E.isub(this.m):E.cmpn(0)<0&&(C=E.iadd(this.m)),C._forceRed(this)},oe.prototype.mul=function(d,g){if(d.isZero()||g.isZero())return new s(0)._forceRed(this);var m=d.mul(g),b=m.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),E=m.isub(b).iushrn(this.shift),C=E;return E.cmp(this.m)>=0?C=E.isub(this.m):E.cmpn(0)<0&&(C=E.iadd(this.m)),C._forceRed(this)},oe.prototype.invm=function(d){var g=this.imod(d._invmp(this.m).mul(this.r2));return g._forceRed(this)}})(r,OW)})(BW);var wr=BW.exports;const LW="bignumber/5.7.0";var UC=wr.BN;const Ih=new Lo(LW),m7={},HD=9007199254740991;function $6e(r){return r!=null&&(fo.isBigNumber(r)||typeof r=="number"&&r%1===0||typeof r=="string"&&!!r.match(/^-?[0-9]+$/)||kw(r)||typeof r=="bigint"||ob(r))}let WD=!1,fo=class Mc{constructor(e,t){e!==m7&&Ih.throwError("cannot call constructor directly; use BigNumber.from",Lo.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=t,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return Eo(Br(this).fromTwos(e))}toTwos(e){return Eo(Br(this).toTwos(e))}abs(){return this._hex[0]==="-"?Mc.from(this._hex.substring(1)):this}add(e){return Eo(Br(this).add(Br(e)))}sub(e){return Eo(Br(this).sub(Br(e)))}div(e){return Mc.from(e).isZero()&&ja("division-by-zero","div"),Eo(Br(this).div(Br(e)))}mul(e){return Eo(Br(this).mul(Br(e)))}mod(e){const t=Br(e);return t.isNeg()&&ja("division-by-zero","mod"),Eo(Br(this).umod(t))}pow(e){const t=Br(e);return t.isNeg()&&ja("negative-power","pow"),Eo(Br(this).pow(t))}and(e){const t=Br(e);return(this.isNegative()||t.isNeg())&&ja("unbound-bitwise-result","and"),Eo(Br(this).and(t))}or(e){const t=Br(e);return(this.isNegative()||t.isNeg())&&ja("unbound-bitwise-result","or"),Eo(Br(this).or(t))}xor(e){const t=Br(e);return(this.isNegative()||t.isNeg())&&ja("unbound-bitwise-result","xor"),Eo(Br(this).xor(t))}mask(e){return(this.isNegative()||e<0)&&ja("negative-width","mask"),Eo(Br(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&ja("negative-width","shl"),Eo(Br(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&ja("negative-width","shr"),Eo(Br(this).shrn(e))}eq(e){return Br(this).eq(Br(e))}lt(e){return Br(this).lt(Br(e))}lte(e){return Br(this).lte(Br(e))}gt(e){return Br(this).gt(Br(e))}gte(e){return Br(this).gte(Br(e))}isNegative(){return this._hex[0]==="-"}isZero(){return Br(this).isZero()}toNumber(){try{return Br(this).toNumber()}catch{ja("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return Ih.throwError("this platform does not support BigInt",Lo.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?WD||(WD=!0,Ih.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?Ih.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",Lo.errors.UNEXPECTED_ARGUMENT,{}):Ih.throwError("BigNumber.toString does not accept parameters",Lo.errors.UNEXPECTED_ARGUMENT,{})),Br(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof Mc)return e;if(typeof e=="string")return e.match(/^-?0x[0-9a-f]+$/i)?new Mc(m7,qv(e)):e.match(/^-?[0-9]+$/)?new Mc(m7,qv(new UC(e))):Ih.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&ja("underflow","BigNumber.from",e),(e>=HD||e<=-HD)&&ja("overflow","BigNumber.from",e),Mc.from(String(e));const t=e;if(typeof t=="bigint")return Mc.from(t.toString());if(ob(t))return Mc.from($W(t));if(t)if(t.toHexString){const n=t.toHexString();if(typeof n=="string")return Mc.from(n)}else{let n=t._hex;if(n==null&&t.type==="BigNumber"&&(n=t.hex),typeof n=="string"&&(kw(n)||n[0]==="-"&&kw(n.substring(1))))return Mc.from(n)}return Ih.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}};function qv(r){if(typeof r!="string")return qv(r.toString(16));if(r[0]==="-")return r=r.substring(1),r[0]==="-"&&Ih.throwArgumentError("invalid hex","value",r),r=qv(r),r==="0x00"?r:"-"+r;if(r.substring(0,2)!=="0x"&&(r="0x"+r),r==="0x")return"0x00";for(r.length%2&&(r="0x0"+r.substring(2));r.length>4&&r.substring(0,4)==="0x00";)r="0x"+r.substring(4);return r}function Eo(r){return fo.from(qv(r))}function Br(r){const e=fo.from(r).toHexString();return e[0]==="-"?new UC("-"+e.substring(3),16):new UC(e.substring(2),16)}function ja(r,e,t){const n={fault:r,operation:e};return t!=null&&(n.value=t),Ih.throwError(r,Lo.errors.NUMERIC_FAULT,n)}const Js=new Lo(LW),B3={},UW=fo.from(0),FW=fo.from(-1);function jW(r,e,t,n){const i={fault:e,operation:t};return n!==void 0&&(i.value=n),Js.throwError(r,Lo.errors.NUMERIC_FAULT,i)}let L3="0";for(;L3.length<256;)L3+=L3;function _T(r){if(typeof r!="number")try{r=fo.from(r).toNumber()}catch{}return typeof r=="number"&&r>=0&&r<=256&&!(r%1)?"1"+L3.substring(0,r):Js.throwArgumentError("invalid decimal size","decimals",r)}function w7(r,e){e==null&&(e=0);const t=_T(e);r=fo.from(r);const n=r.lt(UW);n&&(r=r.mul(FW));let i=r.mod(t).toString();for(;i.length2&&Js.throwArgumentError("too many decimal points","value",r);let s=i[0],o=i[1];for(s||(s="0"),o||(o="0");o[o.length-1]==="0";)o=o.substring(0,o.length-1);for(o.length>t.length-1&&jW("fractional component exceeds decimals","underflow","parseFixed"),o===""&&(o="0");o.lengthe[o]==null?c:(typeof e[o]!==a&&Js.throwArgumentError("invalid fixed format ("+o+" not "+a+")","format."+o,e[o]),e[o]);t=s("signed","boolean",t),n=s("width","number",n),i=s("decimals","number",i)}return n%8&&Js.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",n),i>80&&Js.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",i),new nm(B3,t,n,i)}}class ss{constructor(e,t,n,i){e!==B3&&Js.throwError("cannot use FixedNumber constructor; use FixedNumber.from",Lo.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=i,this._hex=t,this._value=n,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(e){this.format.name!==e.format.name&&Js.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);const t=_h(this._value,this.format.decimals),n=_h(e._value,e.format.decimals);return ss.fromValue(t.add(n),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);const t=_h(this._value,this.format.decimals),n=_h(e._value,e.format.decimals);return ss.fromValue(t.sub(n),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);const t=_h(this._value,this.format.decimals),n=_h(e._value,e.format.decimals);return ss.fromValue(t.mul(n).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);const t=_h(this._value,this.format.decimals),n=_h(e._value,e.format.decimals);return ss.fromValue(t.mul(this.format._multiplier).div(n),this.format.decimals,this.format)}floor(){const e=this.toString().split(".");e.length===1&&e.push("0");let t=ss.from(e[0],this.format);const n=!e[1].match(/^(0*)$/);return this.isNegative()&&n&&(t=t.subUnsafe(zD.toFormat(t.format))),t}ceiling(){const e=this.toString().split(".");e.length===1&&e.push("0");let t=ss.from(e[0],this.format);const n=!e[1].match(/^(0*)$/);return!this.isNegative()&&n&&(t=t.addUnsafe(zD.toFormat(t.format))),t}round(e){e==null&&(e=0);const t=this.toString().split(".");if(t.length===1&&t.push("0"),(e<0||e>80||e%1)&&Js.throwArgumentError("invalid decimal count","decimals",e),t[1].length<=e)return this;const n=ss.from("1"+L3.substring(0,e),this.format),i=B6e.toFormat(this.format);return this.mulUnsafe(n).addUnsafe(i).floor().divUnsafe(n)}isZero(){return this._value==="0.0"||this._value==="0"}isNegative(){return this._value[0]==="-"}toString(){return this._value}toHexString(e){if(e==null)return this._hex;e%8&&Js.throwArgumentError("invalid byte width","width",e);const t=fo.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return g8(t,e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return ss.fromString(this._value,e)}static fromValue(e,t,n){return n==null&&t!=null&&!$6e(t)&&(n=t,t=null),t==null&&(t=0),n==null&&(n="fixed"),ss.fromString(w7(e,t),nm.from(n))}static fromString(e,t){t==null&&(t="fixed");const n=nm.from(t),i=_h(e,n.decimals);!n.signed&&i.lt(UW)&&jW("unsigned value cannot be negative","overflow","value",e);let s=null;n.signed?s=i.toTwos(n.width).toHexString():(s=i.toHexString(),s=g8(s,n.width/8));const o=w7(i,n.decimals);return new ss(B3,s,o,n)}static fromBytes(e,t){t==null&&(t="fixed");const n=nm.from(t);if(DW(e).length>n.width/8)throw new Error("overflow");let i=fo.from(e);n.signed&&(i=i.fromTwos(n.width));const s=i.toTwos((n.signed?0:1)+n.width).toHexString(),o=w7(i,n.decimals);return new ss(B3,s,o,n)}static from(e,t){if(typeof e=="string")return ss.fromString(e,t);if(ob(e))return ss.fromBytes(e,t);try{return ss.fromValue(e,0,t)}catch(n){if(n.code!==Lo.errors.INVALID_ARGUMENT)throw n}return Js.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}}const zD=ss.from(1),B6e=ss.from("0.5");var VD;(function(r){r.current="",r.NFC="NFC",r.NFD="NFD",r.NFKC="NFKC",r.NFKD="NFKD"})(VD||(VD={}));var qD;(function(r){r.UNEXPECTED_CONTINUE="unexpected continuation byte",r.BAD_PREFIX="bad codepoint prefix",r.OVERRUN="string overrun",r.MISSING_CONTINUE="missing continuation byte",r.OUT_OF_RANGE="out of UTF-8 range",r.UTF16_SURROGATE="UTF-16 surrogate",r.OVERLONG="overlong representation"})(qD||(qD={}));function L6e(r){if(r.length%4!==0)throw new Error("bad data");let e=[];for(let t=0;t{let s=i.split(":");t+=parseInt(s[0],16),n[t]=e(s[1])}),n}function KD(r){let e=0;return r.split(",").map(t=>{let n=t.split("-");n.length===1?n[1]="0":n[1]===""&&(n[1]="1");let i=e+parseInt(n[0],16);return e=parseInt(n[1],16),{l:i,h:e}})}KD("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),"ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(r=>parseInt(r,16)),v7("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),v7("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),v7("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",L6e),KD("80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001");function U6e(r){r=atob(r);const e=[];for(let t=0;t0&&Array.isArray(a)?i(a,o-1):t.push(a)})};return i(r,e),t}function F6e(r){const e={};for(let t=0;t>--c&1}const f=31,v=Math.pow(2,f),y=v>>>1,A=y>>1,M=v-1;let $=0;for(let q=0;q1;){let Q=Y+I>>>1;q>>1|h(),T=T<<1^y,V=(V^y)<<1|y|1;P=T,H=1+V-T}let F=n-4;return L.map(q=>{switch(q-F){case 3:return F+65792+(r[a++]<<16|r[a++]<<8|r[a++]);case 2:return F+256+(r[a++]<<8|r[a++]);case 1:return F+r[a++];default:return q-1}})}function H6e(r){let e=0;return()=>r[e++]}function W6e(r){return H6e(j6e(r))}function z6e(r){return r&1?~r>>1:r>>1}function V6e(r,e){let t=Array(r);for(let n=0;ne[o]):t}function K6e(r){let e=[];for(;;){let t=r();if(t==0)break;e.push(Z6e(t,r))}for(;;){let t=r()-1;if(t<0)break;e.push(Y6e(t,r))}return F6e(HW(e))}function G6e(r){let e=[];for(;;){let t=r();if(t==0)break;e.push(t)}return e}function WW(r,e,t){let n=Array(r).fill(void 0).map(()=>[]);for(let i=0;in[o].push(s));return n}function Z6e(r,e){let t=1+e(),n=e(),i=G6e(e),s=WW(i.length,1+r,e);return HW(s.map((o,a)=>{const c=o[0],l=o.slice(1);return Array(i[a]).fill(void 0).map((h,f)=>{let v=f*n;return[c+f*t,l.map(y=>y+v)]})}))}function Y6e(r,e){let t=1+e();return WW(t,1+r,e).map(n=>[n[0],n.slice(1)])}function Q6e(r){let e=m8(r).sort((n,i)=>n-i);return t();function t(){let n=[];for(;;){let l=m8(r,e);if(l.length==0)break;n.push({set:new Set(l),node:t()})}n.sort((l,h)=>h.set.size-l.set.size);let i=r(),s=i%3;i=i/3|0;let o=!!(i&1);i>>=1;let a=i==1,c=i==2;return{branches:n,valid:s,fe0f:o,save:a,check:c}}}function J6e(){return W6e(U6e("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"))}const J5=J6e();new Set(m8(J5)),new Set(m8(J5)),K6e(J5),Q6e(J5);const X6e=new Uint8Array(32);X6e.fill(0);const e8e=new Uint8Array(32);e8e.fill(0),fo.from(-1);const t8e=fo.from(0),r8e=fo.from(1);fo.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),g8(r8e.toHexString(),32),g8(t8e.toHexString(),32);var Vl={},Fr={},ab=zW;function zW(r,e){if(!r)throw new Error(e||"Assertion failed")}zW.equal=function(r,e,t){if(r!=e)throw new Error(t||"Assertion failed: "+r+" != "+e)};var FC={exports:{}};typeof Object.create=="function"?FC.exports=function(r,e){e&&(r.super_=e,r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}))}:FC.exports=function(r,e){if(e){r.super_=e;var t=function(){};t.prototype=e.prototype,r.prototype=new t,r.prototype.constructor=r}};var n8e=ab,i8e=FC.exports;Fr.inherits=i8e;function s8e(r,e){return(r.charCodeAt(e)&64512)!==55296||e<0||e+1>=r.length?!1:(r.charCodeAt(e+1)&64512)===56320}function o8e(r,e){if(Array.isArray(r))return r.slice();if(!r)return[];var t=[];if(typeof r=="string")if(e){if(e==="hex")for(r=r.replace(/[^a-z0-9]+/ig,""),r.length%2!==0&&(r="0"+r),i=0;i>6|192,t[n++]=s&63|128):s8e(r,i)?(s=65536+((s&1023)<<10)+(r.charCodeAt(++i)&1023),t[n++]=s>>18|240,t[n++]=s>>12&63|128,t[n++]=s>>6&63|128,t[n++]=s&63|128):(t[n++]=s>>12|224,t[n++]=s>>6&63|128,t[n++]=s&63|128)}else for(i=0;i>>24|r>>>8&65280|r<<8&16711680|(r&255)<<24;return e>>>0}Fr.htonl=VW;function c8e(r,e){for(var t="",n=0;n>>0}return s}Fr.join32=l8e;function u8e(r,e){for(var t=new Array(r.length*4),n=0,i=0;n>>24,t[i+1]=s>>>16&255,t[i+2]=s>>>8&255,t[i+3]=s&255):(t[i+3]=s>>>24,t[i+2]=s>>>16&255,t[i+1]=s>>>8&255,t[i]=s&255)}return t}Fr.split32=u8e;function h8e(r,e){return r>>>e|r<<32-e}Fr.rotr32=h8e;function d8e(r,e){return r<>>32-e}Fr.rotl32=d8e;function f8e(r,e){return r+e>>>0}Fr.sum32=f8e;function p8e(r,e,t){return r+e+t>>>0}Fr.sum32_3=p8e;function g8e(r,e,t,n){return r+e+t+n>>>0}Fr.sum32_4=g8e;function m8e(r,e,t,n,i){return r+e+t+n+i>>>0}Fr.sum32_5=m8e;function w8e(r,e,t,n){var i=r[e],s=r[e+1],o=n+s>>>0,a=(o>>0,r[e+1]=o}Fr.sum64=w8e;function v8e(r,e,t,n){var i=e+n>>>0,s=(i>>0}Fr.sum64_hi=v8e;function y8e(r,e,t,n){var i=e+n;return i>>>0}Fr.sum64_lo=y8e;function b8e(r,e,t,n,i,s,o,a){var c=0,l=e;l=l+n>>>0,c+=l>>0,c+=l>>0,c+=l>>0}Fr.sum64_4_hi=b8e;function _8e(r,e,t,n,i,s,o,a){var c=e+n+s+a;return c>>>0}Fr.sum64_4_lo=_8e;function x8e(r,e,t,n,i,s,o,a,c,l){var h=0,f=e;f=f+n>>>0,h+=f>>0,h+=f>>0,h+=f>>0,h+=f>>0}Fr.sum64_5_hi=x8e;function A8e(r,e,t,n,i,s,o,a,c,l){var h=e+n+s+a+l;return h>>>0}Fr.sum64_5_lo=A8e;function E8e(r,e,t){var n=e<<32-t|r>>>t;return n>>>0}Fr.rotr64_hi=E8e;function C8e(r,e,t){var n=r<<32-t|e>>>t;return n>>>0}Fr.rotr64_lo=C8e;function S8e(r,e,t){return r>>>t}Fr.shr64_hi=S8e;function I8e(r,e,t){var n=r<<32-t|e>>>t;return n>>>0}Fr.shr64_lo=I8e;var c2={},ZD=Fr,T8e=ab;function X5(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}c2.BlockHash=X5,X5.prototype.update=function(r,e){if(r=ZD.toArray(r,e),this.pending?this.pending=this.pending.concat(r):this.pending=r,this.pendingTotal+=r.length,this.pending.length>=this._delta8){r=this.pending;var t=r.length%this._delta8;this.pending=r.slice(r.length-t,r.length),this.pending.length===0&&(this.pending=null),r=ZD.join32(r,0,r.length-t,this.endian);for(var n=0;n>>24&255,n[i++]=r>>>16&255,n[i++]=r>>>8&255,n[i++]=r&255}else for(n[i++]=r&255,n[i++]=r>>>8&255,n[i++]=r>>>16&255,n[i++]=r>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,s=8;s>>3}eh.g0_256=O8e;function M8e(r){return xu(r,17)^xu(r,19)^r>>>10}eh.g1_256=M8e;var Nw=Fr,D8e=c2,$8e=eh,y7=Nw.rotl32,J2=Nw.sum32,B8e=Nw.sum32_5,L8e=$8e.ft_1,QW=D8e.BlockHash,U8e=[1518500249,1859775393,2400959708,3395469782];function au(){if(!(this instanceof au))return new au;QW.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}Nw.inherits(au,QW);var F8e=au;au.blockSize=512,au.outSize=160,au.hmacStrength=80,au.padLength=64,au.prototype._update=function(r,e){for(var t=this.W,n=0;n<16;n++)t[n]=r[e+n];for(;nthis.blockSize&&(r=new this.Hash().update(r).digest()),I_e(r.length<=this.blockSize);for(var e=r.length;e>8,v=h&255;f?c.push(f,v):c.push(v)}return c}t.toArray=n;function i(o){return o.length===1?"0"+o:o}t.zero2=i;function s(o){for(var a="",c=0;c(v>>1)-1?M=(v>>1)-$:M=$,y.isubn(M)):M=0,f[A]=M,y.iushrn(1)}return f}t.getNAF=n;function i(c,l){var h=[[],[]];c=c.clone(),l=l.clone();for(var f=0,v=0,y;c.cmpn(-f)>0||l.cmpn(-v)>0;){var A=c.andln(3)+f&3,M=l.andln(3)+v&3;A===3&&(A=-1),M===3&&(M=-1);var $;A&1?(y=c.andln(7)+f&7,(y===3||y===5)&&M===2?$=-A:$=A):$=0,h[0].push($);var L;M&1?(y=l.andln(7)+v&7,(y===3||y===5)&&A===2?L=-M:L=M):L=0,h[1].push(L),2*f===$+1&&(f=1-f),2*v===L+1&&(v=1-v),c.iushrn(1),l.iushrn(1)}return h}t.getJSF=i;function s(c,l,h){var f="_"+l;c.prototype[l]=function(){return this[f]!==void 0?this[f]:this[f]=h.call(this)}}t.cachedProperty=s;function o(c){return typeof c=="string"?t.toArray(c,"hex"):c}t.parseBytes=o;function a(c){return new wr(c,"hex","le")}t.intFromLE=a}),t4=ya.getNAF,k_e=ya.getJSF,w8=ya.assert;function af(r,e){this.type=r,this.p=new wr(e.p,16),this.red=e.prime?wr.red(e.prime):wr.mont(this.p),this.zero=new wr(0).toRed(this.red),this.one=new wr(1).toRed(this.red),this.two=new wr(2).toRed(this.red),this.n=e.n&&new wr(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var t=this.n&&this.p.div(this.n);!t||t.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var M1=af;af.prototype.point=function(){throw new Error("Not implemented")},af.prototype.validate=function(){throw new Error("Not implemented")},af.prototype._fixedNafMul=function(r,e){w8(r.precomputed);var t=r._getDoubles(),n=t4(e,1,this._bitLength),i=(1<=o;c--)a=(a<<1)+n[c];s.push(a)}for(var l=this.jpoint(null,null,null),h=this.jpoint(null,null,null),f=i;f>0;f--){for(o=0;o=0;a--){for(var c=0;a>=0&&s[a]===0;a--)c++;if(a>=0&&c++,o=o.dblp(c),a<0)break;var l=s[a];w8(l!==0),r.type==="affine"?l>0?o=o.mixedAdd(i[l-1>>1]):o=o.mixedAdd(i[-l-1>>1].neg()):l>0?o=o.add(i[l-1>>1]):o=o.add(i[-l-1>>1].neg())}return r.type==="affine"?o.toP():o},af.prototype._wnafMulAdd=function(r,e,t,n,i){var s=this._wnafT1,o=this._wnafT2,a=this._wnafT3,c=0,l,h,f;for(l=0;l=1;l-=2){var y=l-1,A=l;if(s[y]!==1||s[A]!==1){a[y]=t4(t[y],s[y],this._bitLength),a[A]=t4(t[A],s[A],this._bitLength),c=Math.max(a[y].length,c),c=Math.max(a[A].length,c);continue}var M=[e[y],null,null,e[A]];e[y].y.cmp(e[A].y)===0?(M[1]=e[y].add(e[A]),M[2]=e[y].toJ().mixedAdd(e[A].neg())):e[y].y.cmp(e[A].y.redNeg())===0?(M[1]=e[y].toJ().mixedAdd(e[A]),M[2]=e[y].add(e[A].neg())):(M[1]=e[y].toJ().mixedAdd(e[A]),M[2]=e[y].toJ().mixedAdd(e[A].neg()));var $=[-3,-1,-5,-7,0,7,5,1,3],L=k_e(t[y],t[A]);for(c=Math.max(L[0].length,c),a[y]=new Array(c),a[A]=new Array(c),h=0;h=0;l--){for(var Y=0;l>=0;){var I=!0;for(h=0;h=0&&Y++,F=F.dblp(Y),l<0)break;for(h=0;h0?f=o[h][T-1>>1]:T<0&&(f=o[h][-T-1>>1].neg()),f.type==="affine"?F=F.mixedAdd(f):F=F.add(f))}}for(l=0;l=Math.ceil((r.bitLength()+1)/e.step):!1},Ha.prototype._getDoubles=function(r,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var t=[this],n=this,i=0;i=0&&(v=c,y=l),h.negative&&(h=h.neg(),f=f.neg()),v.negative&&(v=v.neg(),y=y.neg()),[{a:h,b:f},{a:v,b:y}]},ac.prototype._endoSplit=function(r){var e=this.endo.basis,t=e[0],n=e[1],i=n.b.mul(r).divRound(this.n),s=t.b.neg().mul(r).divRound(this.n),o=i.mul(t.a),a=s.mul(n.a),c=i.mul(t.b),l=s.mul(n.b),h=r.sub(o).sub(a),f=c.add(l).neg();return{k1:h,k2:f}},ac.prototype.pointFromX=function(r,e){r=new wr(r,16),r.red||(r=r.toRed(this.red));var t=r.redSqr().redMul(r).redIAdd(r.redMul(this.a)).redIAdd(this.b),n=t.redSqrt();if(n.redSqr().redSub(t).cmp(this.zero)!==0)throw new Error("invalid point");var i=n.fromRed().isOdd();return(e&&!i||!e&&i)&&(n=n.redNeg()),this.point(r,n)},ac.prototype.validate=function(r){if(r.inf)return!0;var e=r.x,t=r.y,n=this.a.redMul(e),i=e.redSqr().redMul(e).redIAdd(n).redIAdd(this.b);return t.redSqr().redISub(i).cmpn(0)===0},ac.prototype._endoWnafMulAdd=function(r,e,t){for(var n=this._endoWnafT1,i=this._endoWnafT2,s=0;s":""},Vi.prototype.isInfinity=function(){return this.inf},Vi.prototype.add=function(r){if(this.inf)return r;if(r.inf)return this;if(this.eq(r))return this.dbl();if(this.neg().eq(r))return this.curve.point(null,null);if(this.x.cmp(r.x)===0)return this.curve.point(null,null);var e=this.y.redSub(r.y);e.cmpn(0)!==0&&(e=e.redMul(this.x.redSub(r.x).redInvm()));var t=e.redSqr().redISub(this.x).redISub(r.x),n=e.redMul(this.x.redSub(t)).redISub(this.y);return this.curve.point(t,n)},Vi.prototype.dbl=function(){if(this.inf)return this;var r=this.y.redAdd(this.y);if(r.cmpn(0)===0)return this.curve.point(null,null);var e=this.curve.a,t=this.x.redSqr(),n=r.redInvm(),i=t.redAdd(t).redIAdd(t).redIAdd(e).redMul(n),s=i.redSqr().redISub(this.x.redAdd(this.x)),o=i.redMul(this.x.redSub(s)).redISub(this.y);return this.curve.point(s,o)},Vi.prototype.getX=function(){return this.x.fromRed()},Vi.prototype.getY=function(){return this.y.fromRed()},Vi.prototype.mul=function(r){return r=new wr(r,16),this.isInfinity()?this:this._hasDoubles(r)?this.curve._fixedNafMul(this,r):this.curve.endo?this.curve._endoWnafMulAdd([this],[r]):this.curve._wnafMul(this,r)},Vi.prototype.mulAdd=function(r,e,t){var n=[this,e],i=[r,t];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},Vi.prototype.jmulAdd=function(r,e,t){var n=[this,e],i=[r,t];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},Vi.prototype.eq=function(r){return this===r||this.inf===r.inf&&(this.inf||this.x.cmp(r.x)===0&&this.y.cmp(r.y)===0)},Vi.prototype.neg=function(r){if(this.inf)return this;var e=this.curve.point(this.x,this.y.redNeg());if(r&&this.precomputed){var t=this.precomputed,n=function(i){return i.neg()};e.precomputed={naf:t.naf&&{wnd:t.naf.wnd,points:t.naf.points.map(n)},doubles:t.doubles&&{step:t.doubles.step,points:t.doubles.points.map(n)}}}return e},Vi.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var r=this.curve.jpoint(this.x,this.y,this.curve.one);return r};function rs(r,e,t,n){M1.BasePoint.call(this,r,"jacobian"),e===null&&t===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new wr(0)):(this.x=new wr(e,16),this.y=new wr(t,16),this.z=new wr(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}AT(rs,M1.BasePoint),ac.prototype.jpoint=function(r,e,t){return new rs(this,r,e,t)},rs.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var r=this.z.redInvm(),e=r.redSqr(),t=this.x.redMul(e),n=this.y.redMul(e).redMul(r);return this.curve.point(t,n)},rs.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},rs.prototype.add=function(r){if(this.isInfinity())return r;if(r.isInfinity())return this;var e=r.z.redSqr(),t=this.z.redSqr(),n=this.x.redMul(e),i=r.x.redMul(t),s=this.y.redMul(e.redMul(r.z)),o=r.y.redMul(t.redMul(this.z)),a=n.redSub(i),c=s.redSub(o);if(a.cmpn(0)===0)return c.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var l=a.redSqr(),h=l.redMul(a),f=n.redMul(l),v=c.redSqr().redIAdd(h).redISub(f).redISub(f),y=c.redMul(f.redISub(v)).redISub(s.redMul(h)),A=this.z.redMul(r.z).redMul(a);return this.curve.jpoint(v,y,A)},rs.prototype.mixedAdd=function(r){if(this.isInfinity())return r.toJ();if(r.isInfinity())return this;var e=this.z.redSqr(),t=this.x,n=r.x.redMul(e),i=this.y,s=r.y.redMul(e).redMul(this.z),o=t.redSub(n),a=i.redSub(s);if(o.cmpn(0)===0)return a.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var c=o.redSqr(),l=c.redMul(o),h=t.redMul(c),f=a.redSqr().redIAdd(l).redISub(h).redISub(h),v=a.redMul(h.redISub(f)).redISub(i.redMul(l)),y=this.z.redMul(o);return this.curve.jpoint(f,v,y)},rs.prototype.dblp=function(r){if(r===0)return this;if(this.isInfinity())return this;if(!r)return this.dbl();var e;if(this.curve.zeroA||this.curve.threeA){var t=this;for(e=0;e=0)return!1;if(t.redIAdd(i),this.x.cmp(t)===0)return!0}},rs.prototype.inspect=function(){return this.isInfinity()?"":""},rs.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var j4=u2(function(r,e){var t=e;t.base=M1,t.short=P_e,t.mont=null,t.edwards=null}),H4=u2(function(r,e){var t=e,n=ya.assert;function i(a){a.type==="short"?this.curve=new j4.short(a):a.type==="edwards"?this.curve=new j4.edwards(a):this.curve=new j4.mont(a),this.g=this.curve.g,this.n=this.curve.n,this.hash=a.hash,n(this.g.validate(),"Invalid curve"),n(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}t.PresetCurve=i;function s(a,c){Object.defineProperty(t,a,{configurable:!0,enumerable:!0,get:function(){var l=new i(c);return Object.defineProperty(t,a,{configurable:!0,enumerable:!0,value:l}),l}})}s("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:Vl.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),s("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:Vl.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),s("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:Vl.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),s("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:Vl.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),s("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:Vl.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),s("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Vl.sha256,gRed:!1,g:["9"]}),s("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Vl.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var o;try{o=null.crash()}catch{o=void 0}s("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:Vl.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",o]})});function cf(r){if(!(this instanceof cf))return new cf(r);this.hash=r.hash,this.predResist=!!r.predResist,this.outLen=this.hash.outSize,this.minEntropy=r.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=nl.toArray(r.entropy,r.entropyEnc||"hex"),t=nl.toArray(r.nonce,r.nonceEnc||"hex"),n=nl.toArray(r.pers,r.persEnc||"hex");xT(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,t,n)}var XD=cf;cf.prototype._init=function(r,e,t){var n=r.concat(e).concat(t);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(r.concat(t||[])),this._reseed=1},cf.prototype.generate=function(r,e,t,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof e!="string"&&(n=t,t=e,e=null),t&&(t=nl.toArray(t,n||"hex"),this._update(t));for(var i=[];i.length"};var O_e=ya.assert;function K_(r,e){if(r instanceof K_)return r;this._importDER(r,e)||(O_e(r.r&&r.s,"Signature without r or s"),this.r=new wr(r.r,16),this.s=new wr(r.s,16),r.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=r.recoveryParam)}var r4=K_;function M_e(){this.place=0}function E7(r,e){var t=r[e.place++];if(!(t&128))return t;var n=t&15;if(n===0||n>4)return!1;for(var i=0,s=0,o=e.place;s>>=0;return i<=127?!1:(e.place=o,i)}function e$(r){for(var e=0,t=r.length-1;!r[e]&&!(r[e+1]&128)&&e>>3);for(r.push(t|128);--t;)r.push(e>>>(t<<3)&255);r.push(e)}K_.prototype.toDER=function(r){var e=this.r.toArray(),t=this.s.toArray();for(e[0]&128&&(e=[0].concat(e)),t[0]&128&&(t=[0].concat(t)),e=e$(e),t=e$(t);!t[0]&&!(t[1]&128);)t=t.slice(1);var n=[2];C7(n,e.length),n=n.concat(e),n.push(2),C7(n,t.length);var i=n.concat(t),s=[48];return C7(s,i.length),s=s.concat(i),ya.encode(s,r)};var D_e=function(){throw new Error("unsupported")},lz=ya.assert;function Xa(r){if(!(this instanceof Xa))return new Xa(r);typeof r=="string"&&(lz(Object.prototype.hasOwnProperty.call(H4,r),"Unknown curve "+r),r=H4[r]),r instanceof H4.PresetCurve&&(r={curve:r}),this.curve=r.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=r.curve.g,this.g.precompute(r.curve.n.bitLength()+1),this.hash=r.hash||r.curve.hash}var $_e=Xa;Xa.prototype.keyPair=function(r){return new A7(this,r)},Xa.prototype.keyFromPrivate=function(r,e){return A7.fromPrivate(this,r,e)},Xa.prototype.keyFromPublic=function(r,e){return A7.fromPublic(this,r,e)},Xa.prototype.genKeyPair=function(r){r||(r={});for(var e=new XD({hash:this.hash,pers:r.pers,persEnc:r.persEnc||"utf8",entropy:r.entropy||D_e(this.hash.hmacStrength),entropyEnc:r.entropy&&r.entropyEnc||"utf8",nonce:this.n.toArray()}),t=this.n.byteLength(),n=this.n.sub(new wr(2));;){var i=new wr(e.generate(t));if(!(i.cmp(n)>0))return i.iaddn(1),this.keyFromPrivate(i)}},Xa.prototype._truncateToN=function(r,e){var t=r.byteLength()*8-this.n.bitLength();return t>0&&(r=r.ushrn(t)),!e&&r.cmp(this.n)>=0?r.sub(this.n):r},Xa.prototype.sign=function(r,e,t,n){typeof t=="object"&&(n=t,t=null),n||(n={}),e=this.keyFromPrivate(e,t),r=this._truncateToN(new wr(r,16));for(var i=this.n.byteLength(),s=e.getPrivate().toArray("be",i),o=r.toArray("be",i),a=new XD({hash:this.hash,entropy:s,nonce:o,pers:n.pers,persEnc:n.persEnc||"utf8"}),c=this.n.sub(new wr(1)),l=0;;l++){var h=n.k?n.k(l):new wr(a.generate(this.n.byteLength()));if(h=this._truncateToN(h,!0),!(h.cmpn(1)<=0||h.cmp(c)>=0)){var f=this.g.mul(h);if(!f.isInfinity()){var v=f.getX(),y=v.umod(this.n);if(y.cmpn(0)!==0){var A=h.invm(this.n).mul(y.mul(e.getPrivate()).iadd(r));if(A=A.umod(this.n),A.cmpn(0)!==0){var M=(f.getY().isOdd()?1:0)|(v.cmp(y)!==0?2:0);return n.canonical&&A.cmp(this.nh)>0&&(A=this.n.sub(A),M^=1),new r4({r:y,s:A,recoveryParam:M})}}}}}},Xa.prototype.verify=function(r,e,t,n){r=this._truncateToN(new wr(r,16)),t=this.keyFromPublic(t,n),e=new r4(e,"hex");var i=e.r,s=e.s;if(i.cmpn(1)<0||i.cmp(this.n)>=0||s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var o=s.invm(this.n),a=o.mul(r).umod(this.n),c=o.mul(i).umod(this.n),l;return this.curve._maxwellTrick?(l=this.g.jmulAdd(a,t.getPublic(),c),l.isInfinity()?!1:l.eqXToP(i)):(l=this.g.mulAdd(a,t.getPublic(),c),l.isInfinity()?!1:l.getX().umod(this.n).cmp(i)===0)},Xa.prototype.recoverPubKey=function(r,e,t,n){lz((3&t)===t,"The recovery param is more than two bits"),e=new r4(e,n);var i=this.n,s=new wr(r),o=e.r,a=e.s,c=t&1,l=t>>1;if(o.cmp(this.curve.p.umod(this.curve.n))>=0&&l)throw new Error("Unable to find sencond key candinate");l?o=this.curve.pointFromX(o.add(this.curve.n),c):o=this.curve.pointFromX(o,c);var h=e.r.invm(i),f=i.sub(s).mul(h).umod(i),v=a.mul(h).umod(i);return this.g.mulAdd(f,o,v)},Xa.prototype.getKeyRecoveryParam=function(r,e,t,n){if(e=new r4(e,n),e.recoveryParam!==null)return e.recoveryParam;for(var i=0;i<4;i++){var s;try{s=this.recoverPubKey(r,e,i)}catch{continue}if(s.eq(t))return i}throw new Error("Unable to find valid recovery factor")};var B_e=u2(function(r,e){var t=e;t.version="6.5.4",t.utils=ya,t.rand=function(){throw new Error("unsupported")},t.curve=j4,t.curves=H4,t.ec=$_e,t.eddsa=null});B_e.ec;var t$;(function(r){r[r.legacy=0]="legacy",r[r.eip2930=1]="eip2930",r[r.eip1559=2]="eip1559"})(t$||(t$={}));const L_e="6.13.2";function U_e(r,e,t){const n=e.split("|").map(s=>s.trim());for(let s=0;sPromise.resolve(r[n])))).reduce((n,i,s)=>(n[e[s]]=i,n),{})}function tr(r,e,t){for(let n in e){let i=e[n];const s=t?t[n]:null;s&&U_e(i,s,n),Object.defineProperty(r,n,{enumerable:!0,value:i,writable:!1})}}function Mg(r){if(r==null)return"null";if(Array.isArray(r))return"[ "+r.map(Mg).join(", ")+" ]";if(r instanceof Uint8Array){const e="0123456789abcdef";let t="0x";for(let n=0;n>4],t+=e[r[n]&15];return t}if(typeof r=="object"&&typeof r.toJSON=="function")return Mg(r.toJSON());switch(typeof r){case"boolean":case"symbol":return r.toString();case"bigint":return BigInt(r).toString();case"number":return r.toString();case"string":return JSON.stringify(r);case"object":{const e=Object.keys(r);return e.sort(),"{ "+e.map(t=>`${Mg(t)}: ${Mg(r[t])}`).join(", ")+" }"}}return"[ COULD NOT SERIALIZE ]"}function ks(r,e){return r&&r.code===e}function ET(r){return ks(r,"CALL_EXCEPTION")}function jn(r,e,t){let n=r;{const s=[];if(t){if("message"in t||"code"in t||"name"in t)throw new Error(`value will overwrite populated values: ${Mg(t)}`);for(const o in t){if(o==="shortMessage")continue;const a=t[o];s.push(o+"="+Mg(a))}}s.push(`code=${e}`),s.push(`version=${L_e}`),s.length&&(r+=" ("+s.join(", ")+")")}let i;switch(e){case"INVALID_ARGUMENT":i=new TypeError(r);break;case"NUMERIC_FAULT":case"BUFFER_OVERRUN":i=new RangeError(r);break;default:i=new Error(r)}return tr(i,{code:e}),t&&Object.assign(i,t),i.shortMessage==null&&tr(i,{shortMessage:n}),i}function Ze(r,e,t,n){if(!r)throw jn(e,t,n)}function Ae(r,e,t,n){Ze(r,e,"INVALID_ARGUMENT",{argument:t,value:n})}function uz(r,e,t){t==null&&(t=""),t&&(t=": "+t),Ze(r>=e,"missing arguemnt"+t,"MISSING_ARGUMENT",{count:r,expectedCount:e}),Ze(r<=e,"too many arguments"+t,"UNEXPECTED_ARGUMENT",{count:r,expectedCount:e})}["NFD","NFC","NFKD","NFKC"].reduce((r,e)=>{try{if("test".normalize(e)!=="test")throw new Error("bad");if(e==="NFD"&&"é".normalize("NFD")!=="é")throw new Error("broken");r.push(e)}catch{}return r},[]);function cb(r,e,t){if(t==null&&(t=""),r!==e){let n=t,i="new";t&&(n+=".",i+=" "+t),Ze(!1,`private constructor; use ${n}from* methods`,"UNSUPPORTED_OPERATION",{operation:i})}}function hz(r,e,t){if(r instanceof Uint8Array)return t?new Uint8Array(r):r;if(typeof r=="string"&&r.match(/^0x(?:[0-9a-f][0-9a-f])*$/i)){const n=new Uint8Array((r.length-2)/2);let i=2;for(let s=0;s>4]+r$[i&15]}return t}function vi(r){return"0x"+r.map(e=>Ft(e).substring(2)).join("")}function sm(r){return Tn(r,!0)?(r.length-2)/2:Zr(r).length}function ni(r,e,t){const n=Zr(r);return t!=null&&t>n.length&&Ze(!1,"cannot slice beyond data bounds","BUFFER_OVERRUN",{buffer:n,length:n.length,offset:t}),Ft(n.slice(e??0,t??n.length))}function dz(r,e,t){const n=Zr(r);Ze(e>=n.length,"padding exceeds data length","BUFFER_OVERRUN",{buffer:new Uint8Array(n),length:e,offset:e+1});const i=new Uint8Array(e);return i.fill(0),t?i.set(n,e-n.length):i.set(n,0),Ft(i)}function a1(r,e){return dz(r,e,!0)}function F_e(r,e){return dz(r,e,!1)}const G_=BigInt(0),Xc=BigInt(1),Dg=9007199254740991;function v8(r,e){const t=Z_(r,"value"),n=BigInt(Sr(e,"width"));if(Ze(t>>n===G_,"overflow","NUMERIC_FAULT",{operation:"fromTwos",fault:"overflow",value:r}),t>>n-Xc){const i=(Xc<=-Dg&&r<=Dg,"overflow",e||"value",r),BigInt(r);case"string":try{if(r==="")throw new Error("empty string");return r[0]==="-"&&r[1]!=="-"?-BigInt(r.substring(1)):BigInt(r)}catch(t){Ae(!1,`invalid BigNumberish string: ${t.message}`,e||"value",r)}}Ae(!1,"invalid BigNumberish value",e||"value",r)}function Z_(r,e){const t=qt(r,e);return Ze(t>=G_,"unsigned value cannot be negative","NUMERIC_FAULT",{fault:"overflow",operation:"getUint",value:r}),t}const n$="0123456789abcdef";function Y_(r){if(r instanceof Uint8Array){let e="0x0";for(const t of r)e+=n$[t>>4],e+=n$[t&15];return BigInt(e)}return qt(r)}function Sr(r,e){switch(typeof r){case"bigint":return Ae(r>=-Dg&&r<=Dg,"overflow",e||"value",r),Number(r);case"number":return Ae(Number.isInteger(r),"underflow",e||"value",r),Ae(r>=-Dg&&r<=Dg,"overflow",e||"value",r),r;case"string":try{if(r==="")throw new Error("empty string");return Sr(BigInt(r),e)}catch(t){Ae(!1,`invalid numeric string: ${t.message}`,e||"value",r)}}Ae(!1,"invalid numeric value",e||"value",r)}function j_e(r){return Sr(Y_(r))}function Zf(r,e){let n=Z_(r,"value").toString(16);if(e==null)n.length%2&&(n="0"+n);else{const i=Sr(e,"width");for(Ze(i*2>=n.length,`value exceeds width (${i} bytes)`,"NUMERIC_FAULT",{operation:"toBeHex",fault:"overflow",value:r});n.length>6===2;o++)s++;return s}return r==="OVERRUN"?t.length-e-1:0}function q_e(r,e,t,n,i){return r==="OVERLONG"?(Ae(typeof i=="number","invalid bad code point for replacement","badCodepoint",i),n.push(i),0):(n.push(65533),gz(r,e,t))}const K_e=Object.freeze({error:V_e,ignore:gz,replace:q_e});function G_e(r,e){e==null&&(e=K_e.error);const t=Zr(r,"bytes"),n=[];let i=0;for(;i>7)){n.push(s);continue}let o=null,a=null;if((s&224)===192)o=1,a=127;else if((s&240)===224)o=2,a=2047;else if((s&248)===240)o=3,a=65535;else{(s&192)===128?i+=e("UNEXPECTED_CONTINUE",i-1,t,n):i+=e("BAD_PREFIX",i-1,t,n);continue}if(i-1+o>=t.length){i+=e("OVERRUN",i-1,t,n);continue}let c=s&(1<<8-o-1)-1;for(let l=0;l1114111){i+=e("OUT_OF_RANGE",i-1-o,t,n,c);continue}if(c>=55296&&c<=57343){i+=e("UTF16_SURROGATE",i-1-o,t,n,c);continue}if(c<=a){i+=e("OVERLONG",i-1-o,t,n,c);continue}n.push(c)}}return n}function Cu(r,e){Ae(typeof r=="string","invalid string value","str",r);let t=[];for(let n=0;n>6|192),t.push(i&63|128);else if((i&64512)==55296){n++;const s=r.charCodeAt(n);Ae(n>18|240),t.push(o>>12&63|128),t.push(o>>6&63|128),t.push(o&63|128)}else t.push(i>>12|224),t.push(i>>6&63|128),t.push(i&63|128)}return new Uint8Array(t)}function Z_e(r){return r.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function y8(r,e){return Z_e(G_e(r,e))}function mz(r){async function e(t,n){Ze(n==null||!n.cancelled,"request cancelled before sending","CANCELLED");const i=t.url.split(":")[0].toLowerCase();Ze(i==="http"||i==="https",`unsupported protocol ${i}`,"UNSUPPORTED_OPERATION",{info:{protocol:i},operation:"request"}),Ze(i==="https"||!t.credentials||t.allowInsecureAuthentication,"insecure authorized connections unsupported","UNSUPPORTED_OPERATION",{operation:"request"});let s=null;const o=new AbortController,a=setTimeout(()=>{s=jn("request timeout","TIMEOUT"),o.abort()},t.timeout);n&&n.addListener(()=>{s=jn("request cancelled","CANCELLED"),o.abort()});const c={method:t.method,headers:new Headers(Array.from(t)),body:t.body||void 0,signal:o.signal};let l;try{l=await fetch(t.url,c)}catch(y){throw clearTimeout(a),s||y}clearTimeout(a);const h={};l.headers.forEach((y,A)=>{h[A.toLowerCase()]=y});const f=await l.arrayBuffer(),v=f==null?null:new Uint8Array(f);return{statusCode:l.status,statusMessage:l.statusText,headers:h,body:v}}return e}const Y_e=12,Q_e=250;let o$=mz();const J_e=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),X_e=new RegExp("^ipfs://(ipfs/)?(.*)$","i");let S7=!1;async function wz(r,e){try{const t=r.match(J_e);if(!t)throw new Error("invalid data");return new Bf(200,"OK",{"content-type":t[1]||"text/plain"},t[2]?W_e(t[3]):txe(t[3]))}catch{return new Bf(599,"BAD REQUEST (invalid data: URI)",{},null,new Wu(r))}}function vz(r){async function e(t,n){try{const i=t.match(X_e);if(!i)throw new Error("invalid link");return new Wu(`${r}${i[2]}`)}catch{return new Bf(599,"BAD REQUEST (invalid IPFS URI)",{},null,new Wu(t))}}return e}const n4={data:wz,ipfs:vz("https://gateway.ipfs.io/ipfs/")},yz=new WeakMap;var np,lf;class exe{constructor(e){Le(this,np);Le(this,lf);de(this,np,[]),de(this,lf,!1),yz.set(e,()=>{if(!ee(this,lf)){de(this,lf,!0);for(const t of ee(this,np))setTimeout(()=>{t()},0);de(this,np,[])}})}addListener(e){Ze(!ee(this,lf),"singal already cancelled","UNSUPPORTED_OPERATION",{operation:"fetchCancelSignal.addCancelListener"}),ee(this,np).push(e)}get cancelled(){return ee(this,lf)}checkSignal(){Ze(!this.cancelled,"cancelled","CANCELLED",{})}}np=new WeakMap,lf=new WeakMap;function i4(r){if(r==null)throw new Error("missing signal; should not happen");return r.checkSignal(),r}var fm,pm,Hc,Oh,gm,mm,Yi,ta,Mh,ip,sp,op,Zl,Wc,uf,ap,h3;const B8=class B8{constructor(e){Le(this,ap);Le(this,fm);Le(this,pm);Le(this,Hc);Le(this,Oh);Le(this,gm);Le(this,mm);Le(this,Yi);Le(this,ta);Le(this,Mh);Le(this,ip);Le(this,sp);Le(this,op);Le(this,Zl);Le(this,Wc);Le(this,uf);de(this,mm,String(e)),de(this,fm,!1),de(this,pm,!0),de(this,Hc,{}),de(this,Oh,""),de(this,gm,3e5),de(this,Wc,{slotInterval:Q_e,maxAttempts:Y_e}),de(this,uf,null)}get url(){return ee(this,mm)}set url(e){de(this,mm,String(e))}get body(){return ee(this,Yi)==null?null:new Uint8Array(ee(this,Yi))}set body(e){if(e==null)de(this,Yi,void 0),de(this,ta,void 0);else if(typeof e=="string")de(this,Yi,Cu(e)),de(this,ta,"text/plain");else if(e instanceof Uint8Array)de(this,Yi,e),de(this,ta,"application/octet-stream");else if(typeof e=="object")de(this,Yi,Cu(JSON.stringify(e))),de(this,ta,"application/json");else throw new Error("invalid body")}hasBody(){return ee(this,Yi)!=null}get method(){return ee(this,Oh)?ee(this,Oh):this.hasBody()?"POST":"GET"}set method(e){e==null&&(e=""),de(this,Oh,String(e).toUpperCase())}get headers(){const e=Object.assign({},ee(this,Hc));return ee(this,Mh)&&(e.authorization=`Basic ${z_e(Cu(ee(this,Mh)))}`),this.allowGzip&&(e["accept-encoding"]="gzip"),e["content-type"]==null&&ee(this,ta)&&(e["content-type"]=ee(this,ta)),this.body&&(e["content-length"]=String(this.body.length)),e}getHeader(e){return this.headers[e.toLowerCase()]}setHeader(e,t){ee(this,Hc)[String(e).toLowerCase()]=String(t)}clearHeaders(){de(this,Hc,{})}[Symbol.iterator](){const e=this.headers,t=Object.keys(e);let n=0;return{next:()=>{if(n=0,"timeout must be non-zero","timeout",e),de(this,gm,e)}get preflightFunc(){return ee(this,ip)||null}set preflightFunc(e){de(this,ip,e)}get processFunc(){return ee(this,sp)||null}set processFunc(e){de(this,sp,e)}get retryFunc(){return ee(this,op)||null}set retryFunc(e){de(this,op,e)}get getUrlFunc(){return ee(this,uf)||o$}set getUrlFunc(e){de(this,uf,e)}toString(){return``}setThrottleParams(e){e.slotInterval!=null&&(ee(this,Wc).slotInterval=e.slotInterval),e.maxAttempts!=null&&(ee(this,Wc).maxAttempts=e.maxAttempts)}send(){return Ze(ee(this,Zl)==null,"request already sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.send"}),de(this,Zl,new exe(this)),rt(this,ap,h3).call(this,0,a$()+this.timeout,0,this,new Bf(0,"",{},null,this))}cancel(){Ze(ee(this,Zl)!=null,"request has not been sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.cancel"});const e=yz.get(this);if(!e)throw new Error("missing signal; should not happen");e()}redirect(e){const t=this.url.split(":")[0].toLowerCase(),n=e.split(":")[0].toLowerCase();Ze(this.method==="GET"&&(t!=="https"||n!=="http")&&e.match(/^https?:/),"unsupported redirect","UNSUPPORTED_OPERATION",{operation:`redirect(${this.method} ${JSON.stringify(this.url)} => ${JSON.stringify(e)})`});const i=new B8(e);return i.method="GET",i.allowGzip=this.allowGzip,i.timeout=this.timeout,de(i,Hc,Object.assign({},ee(this,Hc))),ee(this,Yi)&&de(i,Yi,new Uint8Array(ee(this,Yi))),de(i,ta,ee(this,ta)),i}clone(){const e=new B8(this.url);return de(e,Oh,ee(this,Oh)),ee(this,Yi)&&de(e,Yi,ee(this,Yi)),de(e,ta,ee(this,ta)),de(e,Hc,Object.assign({},ee(this,Hc))),de(e,Mh,ee(this,Mh)),this.allowGzip&&(e.allowGzip=!0),e.timeout=this.timeout,this.allowInsecureAuthentication&&(e.allowInsecureAuthentication=!0),de(e,ip,ee(this,ip)),de(e,sp,ee(this,sp)),de(e,op,ee(this,op)),de(e,Wc,Object.assign({},ee(this,Wc))),de(e,uf,ee(this,uf)),e}static lockConfig(){S7=!0}static getGateway(e){return n4[e.toLowerCase()]||null}static registerGateway(e,t){if(e=e.toLowerCase(),e==="http"||e==="https")throw new Error(`cannot intercept ${e}; use registerGetUrl`);if(S7)throw new Error("gateways locked");n4[e]=t}static registerGetUrl(e){if(S7)throw new Error("gateways locked");o$=e}static createGetUrlFunc(e){return mz()}static createDataGateway(){return wz}static createIpfsGatewayFunc(e){return vz(e)}};fm=new WeakMap,pm=new WeakMap,Hc=new WeakMap,Oh=new WeakMap,gm=new WeakMap,mm=new WeakMap,Yi=new WeakMap,ta=new WeakMap,Mh=new WeakMap,ip=new WeakMap,sp=new WeakMap,op=new WeakMap,Zl=new WeakMap,Wc=new WeakMap,uf=new WeakMap,ap=new WeakSet,h3=async function(e,t,n,i,s){var h,f,v;if(e>=ee(this,Wc).maxAttempts)return s.makeServerError("exceeded maximum retry limit");Ze(a$()<=t,"timeout","TIMEOUT",{operation:"request.send",reason:"timeout",request:i}),n>0&&await rxe(n);let o=this.clone();const a=(o.url.split(":")[0]||"").toLowerCase();if(a in n4){const y=await n4[a](o.url,i4(ee(i,Zl)));if(y instanceof Bf){let A=y;if(this.processFunc){i4(ee(i,Zl));try{A=await this.processFunc(o,A)}catch(M){(M.throttle==null||typeof M.stall!="number")&&A.makeServerError("error in post-processing function",M).assertOk()}}return A}o=y}this.preflightFunc&&(o=await this.preflightFunc(o));const c=await this.getUrlFunc(o,i4(ee(i,Zl)));let l=new Bf(c.statusCode,c.statusMessage,c.headers,c.body,i);if(l.statusCode===301||l.statusCode===302){try{const y=l.headers.location||"";return rt(h=o.redirect(y),ap,h3).call(h,e+1,t,0,i,l)}catch{}return l}else if(l.statusCode===429&&(this.retryFunc==null||await this.retryFunc(o,l,e))){const y=l.headers["retry-after"];let A=ee(this,Wc).slotInterval*Math.trunc(Math.random()*Math.pow(2,e));return typeof y=="string"&&y.match(/^[1-9][0-9]*$/)&&(A=parseInt(y)),rt(f=o.clone(),ap,h3).call(f,e+1,t,A,i,l)}if(this.processFunc){i4(ee(i,Zl));try{l=await this.processFunc(o,l)}catch(y){(y.throttle==null||typeof y.stall!="number")&&l.makeServerError("error in post-processing function",y).assertOk();let A=ee(this,Wc).slotInterval*Math.trunc(Math.random()*Math.pow(2,e));return y.stall>=0&&(A=y.stall),rt(v=o.clone(),ap,h3).call(v,e+1,t,A,i,l)}}return l};let Wu=B8;var oy,ay,cy,ra,wm,cp;const oR=class oR{constructor(e,t,n,i,s){Le(this,oy);Le(this,ay);Le(this,cy);Le(this,ra);Le(this,wm);Le(this,cp);de(this,oy,e),de(this,ay,t),de(this,cy,Object.keys(n).reduce((o,a)=>(o[a.toLowerCase()]=String(n[a]),o),{})),de(this,ra,i==null?null:new Uint8Array(i)),de(this,wm,s||null),de(this,cp,{message:""})}toString(){return``}get statusCode(){return ee(this,oy)}get statusMessage(){return ee(this,ay)}get headers(){return Object.assign({},ee(this,cy))}get body(){return ee(this,ra)==null?null:new Uint8Array(ee(this,ra))}get bodyText(){try{return ee(this,ra)==null?"":y8(ee(this,ra))}catch{Ze(!1,"response body is not valid UTF-8 data","UNSUPPORTED_OPERATION",{operation:"bodyText",info:{response:this}})}}get bodyJson(){try{return JSON.parse(this.bodyText)}catch{Ze(!1,"response body is not valid JSON","UNSUPPORTED_OPERATION",{operation:"bodyJson",info:{response:this}})}}[Symbol.iterator](){const e=this.headers,t=Object.keys(e);let n=0;return{next:()=>{if(n=0,"invalid stall timeout","stall",t);const n=new Error(e||"throttling requests");throw tr(n,{stall:t,throttle:!0}),n}getHeader(e){return this.headers[e.toLowerCase()]}hasBody(){return ee(this,ra)!=null}get request(){return ee(this,wm)}ok(){return ee(this,cp).message===""&&this.statusCode>=200&&this.statusCode<300}assertOk(){if(this.ok())return;let{message:e,error:t}=ee(this,cp);e===""&&(e=`server response ${this.statusCode} ${this.statusMessage}`);let n=null;this.request&&(n=this.request.url);let i=null;try{ee(this,ra)&&(i=y8(ee(this,ra)))}catch{}Ze(!1,e,"SERVER_ERROR",{request:this.request||"unknown request",response:this,error:t,info:{requestUrl:n,responseBody:i,responseStatus:`${this.statusCode} ${this.statusMessage}`}})}};oy=new WeakMap,ay=new WeakMap,cy=new WeakMap,ra=new WeakMap,wm=new WeakMap,cp=new WeakMap;let Bf=oR;function a$(){return new Date().getTime()}function txe(r){return Cu(r.replace(/%([0-9a-f][0-9a-f])/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))}function rxe(r){return new Promise(e=>setTimeout(e,r))}const nxe=BigInt(-1),Bc=BigInt(0),Bg=BigInt(1),ixe=BigInt(5),hg={};let om="0000";for(;om.length<80;)om+=om;function $0(r){let e=om;for(;e.length=-i&&rBc?r=v8(X0(r,n),n):r=-v8(X0(-r,n),n)}else{const i=Bg<=0&&rs[a]==null?l:(Ae(typeof s[a]===c,"invalid fixed format ("+a+" not "+c+")","format."+a,s[a]),s[a]);e=o("signed","boolean",e),t=o("width","number",t),n=o("decimals","number",n)}Ae(t%8===0,"invalid FixedNumber width (not byte aligned)","format.width",t),Ae(n<=80,"invalid FixedNumber decimals (too large)","format.decimals",n);const i=(e?"":"u")+"fixed"+String(t)+"x"+String(n);return{signed:e,width:t,decimals:n,name:i}}function sxe(r,e){let t="";r0?n*=$0(i):i<0&&(t*=$0(-i)),tn?1:0}eq(e){return this.cmp(e)===0}lt(e){return this.cmp(e)<0}lte(e){return this.cmp(e)<=0}gt(e){return this.cmp(e)>0}gte(e){return this.cmp(e)>=0}floor(){let e=ee(this,wn);return ee(this,wn)Bc&&(e+=ee(this,Vs)-Bg),e=ee(this,wn)/ee(this,Vs)*ee(this,Vs),rt(this,ln,Eh).call(this,e,"ceiling")}round(e){if(e==null&&(e=0),e>=this.decimals)return this;const t=this.decimals-e,n=ixe*$0(t-1);let i=this.value+n;const s=$0(t);return i=i/s*s,e3(i,ee(this,zc),"round"),new ef(hg,i,ee(this,zc))}isZero(){return ee(this,wn)===Bc}isNegative(){return ee(this,wn)0){const c=$0(a);Ze(o%c===Bc,"value loses precision for format","NUMERIC_FAULT",{operation:"fromValue",fault:"underflow",value:e}),o/=c}else a<0&&(o*=$0(-a));return e3(o,s,"fromValue"),new ef(hg,o,s)}static fromString(e,t){const n=e.match(/^(-?)([0-9]*)\.?([0-9]*)$/);Ae(n&&n[2].length+n[3].length>0,"invalid FixedNumber string value","value",e);const i=I7(t);let s=n[2]||"0",o=n[3]||"";for(;o.length{Ze(n<=r.length,"data short segment too short","BUFFER_OVERRUN",{buffer:r,length:r.length,offset:n})};if(r[e]>=248){const n=r[e]-247;t(e+1+n);const i=c$(r,e+1,n);return t(e+1+n+i),l$(r,e,e+1+n,n+i)}else if(r[e]>=192){const n=r[e]-192;return t(e+1+n),l$(r,e,e+1,n)}else if(r[e]>=184){const n=r[e]-183;t(e+1+n);const i=c$(r,e+1,n);t(e+1+n+i);const s=Ft(r.slice(e+1+n,e+1+n+i));return{consumed:1+n+i,result:s}}else if(r[e]>=128){const n=r[e]-128;t(e+1+n);const i=Ft(r.slice(e+1,e+1+n));return{consumed:1+n,result:i}}return{consumed:1,result:oxe(r[e])}}function Q_(r){const e=Zr(r,"data"),t=bz(e,0);return Ae(t.consumed===e.length,"unexpected junk after rlp payload","data",r),t.result}function u$(r){const e=[];for(;r;)e.unshift(r&255),r>>=8;return e}function _z(r){if(Array.isArray(r)){let n=[];if(r.forEach(function(s){n=n.concat(_z(s))}),n.length<=55)return n.unshift(192+n.length),n;const i=u$(n.length);return i.unshift(247+i.length),i.concat(n)}const e=Array.prototype.slice.call(Zr(r,"object"));if(e.length===1&&e[0]<=127)return e;if(e.length<=55)return e.unshift(128+e.length),e;const t=u$(e.length);return t.unshift(183+t.length),t.concat(e)}const h$="0123456789abcdef";function c1(r){let e="0x";for(const t of _z(r))e+=h$[t>>4],e+=h$[t&15];return e}const xz=["wei","kwei","mwei","gwei","szabo","finney","ether"];function Az(r,e){let t=18;if(typeof e=="string"){const n=xz.indexOf(e);Ae(n>=0,"invalid unit","unit",e),t=3*n}else e!=null&&(t=Sr(e,"unit"));return b8.fromValue(r,t,{decimals:t,width:512}).toString()}function axe(r,e){Ae(typeof r=="string","value must be a string","value",r);let t=18;if(typeof e=="string"){const n=xz.indexOf(e);Ae(n>=0,"invalid unit","unit",e),t=3*n}else e!=null&&(t=Sr(e,"unit"));return b8.fromString(r,{decimals:t,width:512}).value}function cxe(r){return Az(r,18)}const ro=32,KC=new Uint8Array(ro),lxe=["then"],s4={},Ez=new WeakMap;function j0(r){return Ez.get(r)}function d$(r,e){Ez.set(r,e)}function t3(r,e){const t=new Error(`deferred error during ABI decoding triggered accessing ${r}`);throw t.error=e,t}function GC(r,e,t){return r.indexOf(null)>=0?e.map((n,i)=>n instanceof Ow?GC(j0(n),n,t):n):r.reduce((n,i,s)=>{let o=e.getValue(i);return i in n||(t&&o instanceof Ow&&(o=GC(j0(o),o,t)),n[i]=o),n},{})}var vm;const Ug=class Ug extends Array{constructor(...t){const n=t[0];let i=t[1],s=(t[2]||[]).slice(),o=!0;n!==s4&&(i=t,s=[],o=!1);super(i.length);Le(this,vm);i.forEach((l,h)=>{this[h]=l});const a=s.reduce((l,h)=>(typeof h=="string"&&l.set(h,(l.get(h)||0)+1),l),new Map);if(d$(this,Object.freeze(i.map((l,h)=>{const f=s[h];return f!=null&&a.get(f)===1?f:null}))),de(this,vm,[]),ee(this,vm)==null&&ee(this,vm),!o)return;Object.freeze(this);const c=new Proxy(this,{get:(l,h,f)=>{if(typeof h=="string"){if(h.match(/^[0-9]+$/)){const y=Sr(h,"%index");if(y<0||y>=this.length)throw new RangeError("out of result range");const A=l[y];return A instanceof Error&&t3(`index ${y}`,A),A}if(lxe.indexOf(h)>=0)return Reflect.get(l,h,f);const v=l[h];if(v instanceof Function)return function(...y){return v.apply(this===f?l:this,y)};if(!(h in l))return l.getValue.apply(this===f?l:this,[h])}return Reflect.get(l,h,f)}});return d$(c,j0(this)),c}toArray(t){const n=[];return this.forEach((i,s)=>{i instanceof Error&&t3(`index ${s}`,i),t&&i instanceof Ug&&(i=i.toArray(t)),n.push(i)}),n}toObject(t){const n=j0(this);return n.reduce((i,s,o)=>(Ze(s!=null,`value at index ${o} unnamed`,"UNSUPPORTED_OPERATION",{operation:"toObject()"}),GC(n,this,t)),{})}slice(t,n){t==null&&(t=0),t<0&&(t+=this.length,t<0&&(t=0)),n==null&&(n=this.length),n<0&&(n+=this.length,n<0&&(n=0)),n>this.length&&(n=this.length);const i=j0(this),s=[],o=[];for(let a=t;a{ee(this,Dh)[e]=f$(t)}}}Dh=new WeakMap,lp=new WeakMap,ym=new WeakSet,W4=function(e){return ee(this,Dh).push(e),de(this,lp,ee(this,lp)+e.length),e.length};var Ro,na,up,hp,hf,p1,QC,Cz;const aR=class aR{constructor(e,t,n){Le(this,p1);Oe(this,"allowLoose");Le(this,Ro);Le(this,na);Le(this,up);Le(this,hp);Le(this,hf);tr(this,{allowLoose:!!t}),de(this,Ro,Xs(e)),de(this,up,0),de(this,hp,null),de(this,hf,n??1024),de(this,na,0)}get data(){return Ft(ee(this,Ro))}get dataLength(){return ee(this,Ro).length}get consumed(){return ee(this,na)}get bytes(){return new Uint8Array(ee(this,Ro))}subReader(e){const t=new aR(ee(this,Ro).slice(ee(this,na)+e),this.allowLoose,ee(this,hf));return de(t,hp,this),t}readBytes(e,t){let n=rt(this,p1,Cz).call(this,0,e,!!t);return rt(this,p1,QC).call(this,e),de(this,na,ee(this,na)+n.length),n.slice(0,e)}readValue(){return Y_(this.readBytes(ro))}readIndex(){return j_e(this.readBytes(ro))}};Ro=new WeakMap,na=new WeakMap,up=new WeakMap,hp=new WeakMap,hf=new WeakMap,p1=new WeakSet,QC=function(e){var t;if(ee(this,hp))return rt(t=ee(this,hp),p1,QC).call(t,e);de(this,up,ee(this,up)+e),Ze(ee(this,hf)<1||ee(this,up)<=ee(this,hf)*this.dataLength,`compressed ABI data exceeds inflation ratio of ${ee(this,hf)} ( see: https://github.com/ethers-io/ethers.js/issues/4537 )`,"BUFFER_OVERRUN",{buffer:Xs(ee(this,Ro)),offset:ee(this,na),length:e,info:{bytesRead:ee(this,up),dataLength:this.dataLength}})},Cz=function(e,t,n){let i=Math.ceil(t/ro)*ro;return ee(this,na)+i>ee(this,Ro).length&&(this.allowLoose&&n&&ee(this,na)+t<=ee(this,Ro).length?i=t:Ze(!1,"data out-of-bounds","BUFFER_OVERRUN",{buffer:Xs(ee(this,Ro)),length:ee(this,Ro).length,offset:ee(this,na)+i})),ee(this,Ro).slice(ee(this,na),ee(this,na)+i)};let YC=aR;function _8(r){if(!Number.isSafeInteger(r)||r<0)throw new Error(`Wrong positive integer: ${r}`)}function ST(r,...e){if(!(r instanceof Uint8Array))throw new Error("Expected Uint8Array");if(e.length>0&&!e.includes(r.length))throw new Error(`Expected Uint8Array of length ${e}, not of length=${r.length}`)}function uxe(r){if(typeof r!="function"||typeof r.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");_8(r.outputLen),_8(r.blockLen)}function Mw(r,e=!0){if(r.destroyed)throw new Error("Hash instance has been destroyed");if(e&&r.finished)throw new Error("Hash#digest() has already been called")}function Sz(r,e){ST(r);const t=e.outputLen;if(r.lengthr instanceof Uint8Array,hxe=r=>new Uint32Array(r.buffer,r.byteOffset,Math.floor(r.byteLength/4)),R7=r=>new DataView(r.buffer,r.byteOffset,r.byteLength),Ll=(r,e)=>r<<32-e|r>>>e,dxe=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!dxe)throw new Error("Non little-endian hardware is not supported");function fxe(r){if(typeof r!="string")throw new Error(`utf8ToBytes expected string, got ${typeof r}`);return new Uint8Array(new TextEncoder().encode(r))}function J_(r){if(typeof r=="string"&&(r=fxe(r)),!Iz(r))throw new Error(`expected Uint8Array, got ${typeof r}`);return r}function pxe(...r){const e=new Uint8Array(r.reduce((n,i)=>n+i.length,0));let t=0;return r.forEach(n=>{if(!Iz(n))throw new Error("Uint8Array expected");e.set(n,t),t+=n.length}),e}let IT=class{clone(){return this._cloneInto()}};function TT(r){const e=n=>r().update(J_(n)).digest(),t=r();return e.outputLen=t.outputLen,e.blockLen=t.blockLen,e.create=()=>r(),e}function gxe(r=32){if(T7&&typeof T7.getRandomValues=="function")return T7.getRandomValues(new Uint8Array(r));throw new Error("crypto.getRandomValues must be defined")}class Tz extends IT{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,uxe(e);const n=J_(t);if(this.iHash=e.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const i=this.blockLen,s=new Uint8Array(i);s.set(n.length>i?e.create().update(n).digest():n);for(let o=0;onew Tz(r,e).update(t).digest();Rz.create=(r,e)=>new Tz(r,e);function mxe(r,e,t,n){if(typeof r.setBigUint64=="function")return r.setBigUint64(e,t,n);const i=BigInt(32),s=BigInt(4294967295),o=Number(t>>i&s),a=Number(t&s),c=n?4:0,l=n?0:4;r.setUint32(e+c,o,n),r.setUint32(e+l,a,n)}class kz extends IT{constructor(e,t,n,i){super(),this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=R7(this.buffer)}update(e){Mw(this);const{view:t,buffer:n,blockLen:i}=this;e=J_(e);const s=e.length;for(let o=0;oi-o&&(this.process(n,0),o=0);for(let f=o;fh.length)throw new Error("_sha2: outputLen bigger than state");for(let f=0;fr&e^~r&t,vxe=(r,e,t)=>r&e^r&t^e&t,yxe=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Hd=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Wd=new Uint32Array(64);class bxe extends kz{constructor(){super(64,32,8,!1),this.A=Hd[0]|0,this.B=Hd[1]|0,this.C=Hd[2]|0,this.D=Hd[3]|0,this.E=Hd[4]|0,this.F=Hd[5]|0,this.G=Hd[6]|0,this.H=Hd[7]|0}get(){const{A:e,B:t,C:n,D:i,E:s,F:o,G:a,H:c}=this;return[e,t,n,i,s,o,a,c]}set(e,t,n,i,s,o,a,c){this.A=e|0,this.B=t|0,this.C=n|0,this.D=i|0,this.E=s|0,this.F=o|0,this.G=a|0,this.H=c|0}process(e,t){for(let f=0;f<16;f++,t+=4)Wd[f]=e.getUint32(t,!1);for(let f=16;f<64;f++){const v=Wd[f-15],y=Wd[f-2],A=Ll(v,7)^Ll(v,18)^v>>>3,M=Ll(y,17)^Ll(y,19)^y>>>10;Wd[f]=M+Wd[f-7]+A+Wd[f-16]|0}let{A:n,B:i,C:s,D:o,E:a,F:c,G:l,H:h}=this;for(let f=0;f<64;f++){const v=Ll(a,6)^Ll(a,11)^Ll(a,25),y=h+v+wxe(a,c,l)+yxe[f]+Wd[f]|0,M=(Ll(n,2)^Ll(n,13)^Ll(n,22))+vxe(n,i,s)|0;h=l,l=c,c=a,a=o+y|0,o=s,s=i,i=n,n=y+M|0}n=n+this.A|0,i=i+this.B|0,s=s+this.C|0,o=o+this.D|0,a=a+this.E|0,c=c+this.F|0,l=l+this.G|0,h=h+this.H|0,this.set(n,i,s,o,a,c,l,h)}roundClean(){Wd.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const Nz=TT(()=>new bxe),o4=BigInt(2**32-1),JC=BigInt(32);function Pz(r,e=!1){return e?{h:Number(r&o4),l:Number(r>>JC&o4)}:{h:Number(r>>JC&o4)|0,l:Number(r&o4)|0}}function Oz(r,e=!1){let t=new Uint32Array(r.length),n=new Uint32Array(r.length);for(let i=0;iBigInt(r>>>0)<>>0),xxe=(r,e,t)=>r>>>t,Axe=(r,e,t)=>r<<32-t|e>>>t,Exe=(r,e,t)=>r>>>t|e<<32-t,Cxe=(r,e,t)=>r<<32-t|e>>>t,Sxe=(r,e,t)=>r<<64-t|e>>>t-32,Ixe=(r,e,t)=>r>>>t-32|e<<64-t,Txe=(r,e)=>e,Rxe=(r,e)=>r,Mz=(r,e,t)=>r<>>32-t,Dz=(r,e,t)=>e<>>32-t,$z=(r,e,t)=>e<>>64-t,Bz=(r,e,t)=>r<>>64-t;function kxe(r,e,t,n){const i=(e>>>0)+(n>>>0);return{h:r+t+(i/2**32|0)|0,l:i|0}}const Nxe=(r,e,t)=>(r>>>0)+(e>>>0)+(t>>>0),Pxe=(r,e,t,n)=>e+t+n+(r/2**32|0)|0,Oxe=(r,e,t,n)=>(r>>>0)+(e>>>0)+(t>>>0)+(n>>>0),Mxe=(r,e,t,n,i)=>e+t+n+i+(r/2**32|0)|0,Dxe=(r,e,t,n,i)=>(r>>>0)+(e>>>0)+(t>>>0)+(n>>>0)+(i>>>0),$xe=(r,e,t,n,i,s)=>e+t+n+i+s+(r/2**32|0)|0,Rr={fromBig:Pz,split:Oz,toBig:_xe,shrSH:xxe,shrSL:Axe,rotrSH:Exe,rotrSL:Cxe,rotrBH:Sxe,rotrBL:Ixe,rotr32H:Txe,rotr32L:Rxe,rotlSH:Mz,rotlSL:Dz,rotlBH:$z,rotlBL:Bz,add:kxe,add3L:Nxe,add3H:Pxe,add4L:Oxe,add4H:Mxe,add5H:$xe,add5L:Dxe},[Bxe,Lxe]=Rr.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(r=>BigInt(r))),zd=new Uint32Array(80),Vd=new Uint32Array(80);let Uxe=class extends kz{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:e,Al:t,Bh:n,Bl:i,Ch:s,Cl:o,Dh:a,Dl:c,Eh:l,El:h,Fh:f,Fl:v,Gh:y,Gl:A,Hh:M,Hl:$}=this;return[e,t,n,i,s,o,a,c,l,h,f,v,y,A,M,$]}set(e,t,n,i,s,o,a,c,l,h,f,v,y,A,M,$){this.Ah=e|0,this.Al=t|0,this.Bh=n|0,this.Bl=i|0,this.Ch=s|0,this.Cl=o|0,this.Dh=a|0,this.Dl=c|0,this.Eh=l|0,this.El=h|0,this.Fh=f|0,this.Fl=v|0,this.Gh=y|0,this.Gl=A|0,this.Hh=M|0,this.Hl=$|0}process(e,t){for(let H=0;H<16;H++,t+=4)zd[H]=e.getUint32(t),Vd[H]=e.getUint32(t+=4);for(let H=16;H<80;H++){const F=zd[H-15]|0,q=Vd[H-15]|0,Y=Rr.rotrSH(F,q,1)^Rr.rotrSH(F,q,8)^Rr.shrSH(F,q,7),I=Rr.rotrSL(F,q,1)^Rr.rotrSL(F,q,8)^Rr.shrSL(F,q,7),T=zd[H-2]|0,V=Vd[H-2]|0,Q=Rr.rotrSH(T,V,19)^Rr.rotrBH(T,V,61)^Rr.shrSH(T,V,6),te=Rr.rotrSL(T,V,19)^Rr.rotrBL(T,V,61)^Rr.shrSL(T,V,6),oe=Rr.add4L(I,te,Vd[H-7],Vd[H-16]),d=Rr.add4H(oe,Y,Q,zd[H-7],zd[H-16]);zd[H]=d|0,Vd[H]=oe|0}let{Ah:n,Al:i,Bh:s,Bl:o,Ch:a,Cl:c,Dh:l,Dl:h,Eh:f,El:v,Fh:y,Fl:A,Gh:M,Gl:$,Hh:L,Hl:P}=this;for(let H=0;H<80;H++){const F=Rr.rotrSH(f,v,14)^Rr.rotrSH(f,v,18)^Rr.rotrBH(f,v,41),q=Rr.rotrSL(f,v,14)^Rr.rotrSL(f,v,18)^Rr.rotrBL(f,v,41),Y=f&y^~f&M,I=v&A^~v&$,T=Rr.add5L(P,q,I,Lxe[H],Vd[H]),V=Rr.add5H(T,L,F,Y,Bxe[H],zd[H]),Q=T|0,te=Rr.rotrSH(n,i,28)^Rr.rotrBH(n,i,34)^Rr.rotrBH(n,i,39),oe=Rr.rotrSL(n,i,28)^Rr.rotrBL(n,i,34)^Rr.rotrBL(n,i,39),d=n&s^n&a^s&a,g=i&o^i&c^o&c;L=M|0,P=$|0,M=y|0,$=A|0,y=f|0,A=v|0,{h:f,l:v}=Rr.add(l|0,h|0,V|0,Q|0),l=a|0,h=c|0,a=s|0,c=o|0,s=n|0,o=i|0;const m=Rr.add3L(Q,oe,g);n=Rr.add3H(m,V,te,d),i=m|0}({h:n,l:i}=Rr.add(this.Ah|0,this.Al|0,n|0,i|0)),{h:s,l:o}=Rr.add(this.Bh|0,this.Bl|0,s|0,o|0),{h:a,l:c}=Rr.add(this.Ch|0,this.Cl|0,a|0,c|0),{h:l,l:h}=Rr.add(this.Dh|0,this.Dl|0,l|0,h|0),{h:f,l:v}=Rr.add(this.Eh|0,this.El|0,f|0,v|0),{h:y,l:A}=Rr.add(this.Fh|0,this.Fl|0,y|0,A|0),{h:M,l:$}=Rr.add(this.Gh|0,this.Gl|0,M|0,$|0),{h:L,l:P}=Rr.add(this.Hh|0,this.Hl|0,L|0,P|0),this.set(n,i,s,o,a,c,l,h,f,v,y,A,M,$,L,P)}roundClean(){zd.fill(0),Vd.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}};const Fxe=TT(()=>new Uxe);function jxe(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}const p$=jxe();p$.crypto||p$.msCrypto;function Hxe(r){switch(r){case"sha256":return Nz.create();case"sha512":return Fxe.create()}Ae(!1,"invalid hashing algorithm name","algorithm",r)}const[Lz,Uz,Fz]=[[],[],[]],Wxe=BigInt(0),r3=BigInt(1),zxe=BigInt(2),Vxe=BigInt(7),qxe=BigInt(256),Kxe=BigInt(113);for(let r=0,e=r3,t=1,n=0;r<24;r++){[t,n]=[n,(2*t+3*n)%5],Lz.push(2*(5*n+t)),Uz.push((r+1)*(r+2)/2%64);let i=Wxe;for(let s=0;s<7;s++)e=(e<>Vxe)*Kxe)%qxe,e&zxe&&(i^=r3<<(r3<t>32?$z(r,e,t):Mz(r,e,t),m$=(r,e,t)=>t>32?Bz(r,e,t):Dz(r,e,t);function Yxe(r,e=24){const t=new Uint32Array(10);for(let n=24-e;n<24;n++){for(let o=0;o<10;o++)t[o]=r[o]^r[o+10]^r[o+20]^r[o+30]^r[o+40];for(let o=0;o<10;o+=2){const a=(o+8)%10,c=(o+2)%10,l=t[c],h=t[c+1],f=g$(l,h,1)^t[a],v=m$(l,h,1)^t[a+1];for(let y=0;y<50;y+=10)r[o+y]^=f,r[o+y+1]^=v}let i=r[2],s=r[3];for(let o=0;o<24;o++){const a=Uz[o],c=g$(i,s,a),l=m$(i,s,a),h=Lz[o];i=r[h],s=r[h+1],r[h]=c,r[h+1]=l}for(let o=0;o<50;o+=10){for(let a=0;a<10;a++)t[a]=r[o+a];for(let a=0;a<10;a++)r[o+a]^=~t[(a+2)%10]&t[(a+4)%10]}r[0]^=Gxe[n],r[1]^=Zxe[n]}t.fill(0)}let Qxe=class jz extends IT{constructor(e,t,n,i=!1,s=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=n,this.enableXOF=i,this.rounds=s,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,_8(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=hxe(this.state)}keccak(){Yxe(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){Mw(this);const{blockLen:t,state:n}=this;e=J_(e);const i=e.length;for(let s=0;s=n&&this.keccak();const o=Math.min(n-this.posOut,s-i);e.set(t.subarray(this.posOut,this.posOut+o),i),this.posOut+=o,i+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return _8(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(Sz(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:t,suffix:n,outputLen:i,rounds:s,enableXOF:o}=this;return e||(e=new jz(t,n,i,o,s)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=s,e.suffix=n,e.outputLen=i,e.enableXOF=o,e.destroyed=this.destroyed,e}};const Jxe=(r,e,t)=>TT(()=>new Qxe(e,r,t)),Xxe=Jxe(1,136,256/8);let Hz=!1;const Wz=function(r){return Xxe(r)};let zz=Wz;function Ei(r){const e=Zr(r,"data");return Ft(zz(e))}Ei._=Wz;Ei.lock=function(){Hz=!0};Ei.register=function(r){if(Hz)throw new TypeError("keccak256 is locked");zz=r};Object.freeze(Ei);const Vz=function(r){return Hxe("sha256").update(r).digest()};let qz=Vz,Kz=!1;function h2(r){const e=Zr(r,"data");return Ft(qz(e))}h2._=Vz;h2.lock=function(){Kz=!0};h2.register=function(r){if(Kz)throw new Error("sha256 is locked");qz=r};Object.freeze(h2);Object.freeze(h2);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Gz=BigInt(0),X_=BigInt(1),eAe=BigInt(2),ex=r=>r instanceof Uint8Array,tAe=Array.from({length:256},(r,e)=>e.toString(16).padStart(2,"0"));function Dw(r){if(!ex(r))throw new Error("Uint8Array expected");let e="";for(let t=0;tn+i.length,0));let t=0;return r.forEach(n=>{if(!ex(n))throw new Error("Uint8Array expected");e.set(n,t),t+=n.length}),e}function nAe(r,e){if(r.length!==e.length)return!1;for(let t=0;tGz;r>>=X_,e+=1);return e}function oAe(r,e){return r>>BigInt(e)&X_}const aAe=(r,e,t)=>r|(t?X_:Gz)<(eAe<new Uint8Array(r),w$=r=>Uint8Array.from(r);function Yz(r,e,t){if(typeof r!="number"||r<2)throw new Error("hashLen must be a number");if(typeof e!="number"||e<2)throw new Error("qByteLen must be a number");if(typeof t!="function")throw new Error("hmacFn must be a function");let n=k7(r),i=k7(r),s=0;const o=()=>{n.fill(1),i.fill(0),s=0},a=(...f)=>t(i,n,...f),c=(f=k7())=>{i=a(w$([0]),f),n=a(),f.length!==0&&(i=a(w$([1]),f),n=a())},l=()=>{if(s++>=1e3)throw new Error("drbg: tried 1000 values");let f=0;const v=[];for(;f{o(),c(f);let y;for(;!(y=v(l()));)c();return o(),y}}const cAe={bigint:r=>typeof r=="bigint",function:r=>typeof r=="function",boolean:r=>typeof r=="boolean",string:r=>typeof r=="string",stringOrUint8Array:r=>typeof r=="string"||r instanceof Uint8Array,isSafeInteger:r=>Number.isSafeInteger(r),array:r=>Array.isArray(r),field:(r,e)=>e.Fp.isValid(r),hash:r=>typeof r=="function"&&Number.isSafeInteger(r.outputLen)};function lb(r,e,t={}){const n=(i,s,o)=>{const a=cAe[s];if(typeof a!="function")throw new Error(`Invalid validator "${s}", expected function`);const c=r[i];if(!(o&&c===void 0)&&!a(c,r))throw new Error(`Invalid param ${String(i)}=${c} (${typeof c}), expected ${s}`)};for(const[i,s]of Object.entries(e))n(i,s,!1);for(const[i,s]of Object.entries(t))n(i,s,!0);return r}const lAe=Object.freeze(Object.defineProperty({__proto__:null,bitGet:oAe,bitLen:sAe,bitMask:PT,bitSet:aAe,bytesToHex:Dw,bytesToNumberBE:kp,bytesToNumberLE:kT,concatBytes:Kv,createHmacDrbg:Yz,ensureBytes:jc,equalBytes:nAe,hexToBytes:$w,hexToNumber:RT,numberToBytesBE:Bw,numberToBytesLE:NT,numberToHexUnpadded:Zz,numberToVarBytesBE:rAe,utf8ToBytes:iAe,validateObject:lb},Symbol.toStringTag,{value:"Module"}));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Ji=BigInt(0),mi=BigInt(1),H0=BigInt(2),uAe=BigInt(3),XC=BigInt(4),v$=BigInt(5),y$=BigInt(8);BigInt(9);BigInt(16);function Po(r,e){const t=r%e;return t>=Ji?t:e+t}function hAe(r,e,t){if(t<=Ji||e 0");if(t===mi)return Ji;let n=mi;for(;e>Ji;)e&mi&&(n=n*r%t),r=r*r%t,e>>=mi;return n}function Wa(r,e,t){let n=r;for(;e-- >Ji;)n*=n,n%=t;return n}function eS(r,e){if(r===Ji||e<=Ji)throw new Error(`invert: expected positive integers, got n=${r} mod=${e}`);let t=Po(r,e),n=e,i=Ji,s=mi;for(;t!==Ji;){const a=n/t,c=n%t,l=i-s*a;n=t,t=c,i=s,s=l}if(n!==mi)throw new Error("invert: does not exist");return Po(i,e)}function dAe(r){const e=(r-mi)/H0;let t,n,i;for(t=r-mi,n=0;t%H0===Ji;t/=H0,n++);for(i=H0;i(n[i]="function",n),e);return lb(r,t)}function mAe(r,e,t){if(t 0");if(t===Ji)return r.ONE;if(t===mi)return e;let n=r.ONE,i=e;for(;t>Ji;)t&mi&&(n=r.mul(n,i)),i=r.sqr(i),t>>=mi;return n}function wAe(r,e){const t=new Array(e.length),n=e.reduce((s,o,a)=>r.is0(o)?s:(t[a]=s,r.mul(s,o)),r.ONE),i=r.inv(n);return e.reduceRight((s,o,a)=>r.is0(o)?s:(t[a]=r.mul(s,t[a]),r.mul(s,o)),i),t}function Qz(r,e){const t=e!==void 0?e:r.toString(2).length,n=Math.ceil(t/8);return{nBitLength:t,nByteLength:n}}function vAe(r,e,t=!1,n={}){if(r<=Ji)throw new Error(`Expected Field ORDER > 0, got ${r}`);const{nBitLength:i,nByteLength:s}=Qz(r,e);if(s>2048)throw new Error("Field lengths over 2048 bytes are not supported");const o=fAe(r),a=Object.freeze({ORDER:r,BITS:i,BYTES:s,MASK:PT(i),ZERO:Ji,ONE:mi,create:c=>Po(c,r),isValid:c=>{if(typeof c!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof c}`);return Ji<=c&&cc===Ji,isOdd:c=>(c&mi)===mi,neg:c=>Po(-c,r),eql:(c,l)=>c===l,sqr:c=>Po(c*c,r),add:(c,l)=>Po(c+l,r),sub:(c,l)=>Po(c-l,r),mul:(c,l)=>Po(c*l,r),pow:(c,l)=>mAe(a,c,l),div:(c,l)=>Po(c*eS(l,r),r),sqrN:c=>c*c,addN:(c,l)=>c+l,subN:(c,l)=>c-l,mulN:(c,l)=>c*l,inv:c=>eS(c,r),sqrt:n.sqrt||(c=>o(a,c)),invertBatch:c=>wAe(a,c),cmov:(c,l,h)=>h?l:c,toBytes:c=>t?NT(c,s):Bw(c,s),fromBytes:c=>{if(c.length!==s)throw new Error(`Fp.fromBytes: expected ${s}, got ${c.length}`);return t?kT(c):kp(c)}});return Object.freeze(a)}function Jz(r){if(typeof r!="bigint")throw new Error("field order must be bigint");const e=r.toString(2).length;return Math.ceil(e/8)}function Xz(r){const e=Jz(r);return e+Math.ceil(e/2)}function yAe(r,e,t=!1){const n=r.length,i=Jz(e),s=Xz(e);if(n<16||n1024)throw new Error(`expected ${s}-1024 bytes of input, got ${n}`);const o=t?kp(r):kT(r),a=Po(o,e-mi)+mi;return t?NT(a,i):Bw(a,i)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const bAe=BigInt(0),N7=BigInt(1);function _Ae(r,e){const t=(i,s)=>{const o=s.negate();return i?o:s},n=i=>{const s=Math.ceil(e/i)+1,o=2**(i-1);return{windows:s,windowSize:o}};return{constTimeNegate:t,unsafeLadder(i,s){let o=r.ZERO,a=i;for(;s>bAe;)s&N7&&(o=o.add(a)),a=a.double(),s>>=N7;return o},precomputeWindow(i,s){const{windows:o,windowSize:a}=n(s),c=[];let l=i,h=l;for(let f=0;f>=y,$>c&&($-=v,o+=N7);const L=M,P=M+Math.abs($)-1,H=A%2!==0,F=$<0;$===0?h=h.add(t(H,s[L])):l=l.add(t(F,s[P]))}return{p:l,f:h}},wNAFCached(i,s,o,a){const c=i._WINDOW_SIZE||1;let l=s.get(i);return l||(l=this.precomputeWindow(i,c),c!==1&&s.set(i,a(l))),this.wNAF(c,l,o)}}}function eV(r){return gAe(r.Fp),lb(r,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...Qz(r.n,r.nBitLength),...r,p:r.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function xAe(r){const e=eV(r);lb(e,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:t,Fp:n,a:i}=e;if(t){if(!n.eql(i,n.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof t!="object"||typeof t.beta!="bigint"||typeof t.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...e})}const{bytesToNumberBE:AAe,hexToBytes:EAe}=lAe,ep={Err:class extends Error{constructor(e=""){super(e)}},_parseInt(r){const{Err:e}=ep;if(r.length<2||r[0]!==2)throw new e("Invalid signature integer tag");const t=r[1],n=r.subarray(2,t+2);if(!t||n.length!==t)throw new e("Invalid signature integer: wrong length");if(n[0]&128)throw new e("Invalid signature integer: negative");if(n[0]===0&&!(n[1]&128))throw new e("Invalid signature integer: unnecessary leading zero");return{d:AAe(n),l:r.subarray(t+2)}},toSig(r){const{Err:e}=ep,t=typeof r=="string"?EAe(r):r;if(!(t instanceof Uint8Array))throw new Error("ui8a expected");let n=t.length;if(n<2||t[0]!=48)throw new e("Invalid signature tag");if(t[1]!==n-2)throw new e("Invalid signature: incorrect length");const{d:i,l:s}=ep._parseInt(t.subarray(2)),{d:o,l:a}=ep._parseInt(s);if(a.length)throw new e("Invalid signature: left bytes after parsing");return{r:i,s:o}},hexFromSig(r){const e=l=>Number.parseInt(l[0],16)&8?"00"+l:l,t=l=>{const h=l.toString(16);return h.length&1?`0${h}`:h},n=e(t(r.s)),i=e(t(r.r)),s=n.length/2,o=i.length/2,a=t(s),c=t(o);return`30${t(o+s+4)}02${c}${i}02${a}${n}`}},Yh=BigInt(0),sc=BigInt(1);BigInt(2);const b$=BigInt(3);BigInt(4);function CAe(r){const e=xAe(r),{Fp:t}=e,n=e.toBytes||((A,M,$)=>{const L=M.toAffine();return Kv(Uint8Array.from([4]),t.toBytes(L.x),t.toBytes(L.y))}),i=e.fromBytes||(A=>{const M=A.subarray(1),$=t.fromBytes(M.subarray(0,t.BYTES)),L=t.fromBytes(M.subarray(t.BYTES,2*t.BYTES));return{x:$,y:L}});function s(A){const{a:M,b:$}=e,L=t.sqr(A),P=t.mul(L,A);return t.add(t.add(P,t.mul(A,M)),$)}if(!t.eql(t.sqr(e.Gy),s(e.Gx)))throw new Error("bad generator point: equation left != right");function o(A){return typeof A=="bigint"&&Yht.eql(H,t.ZERO);return P($)&&P(L)?f.ZERO:new f($,L,t.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(M){const $=t.invertBatch(M.map(L=>L.pz));return M.map((L,P)=>L.toAffine($[P])).map(f.fromAffine)}static fromHex(M){const $=f.fromAffine(i(jc("pointHex",M)));return $.assertValidity(),$}static fromPrivateKey(M){return f.BASE.multiply(c(M))}_setWindowSize(M){this._WINDOW_SIZE=M,l.delete(this)}assertValidity(){if(this.is0()){if(e.allowInfinityPoint&&!t.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:M,y:$}=this.toAffine();if(!t.isValid(M)||!t.isValid($))throw new Error("bad point: x or y not FE");const L=t.sqr($),P=s(M);if(!t.eql(L,P))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:M}=this.toAffine();if(t.isOdd)return!t.isOdd(M);throw new Error("Field doesn't support isOdd")}equals(M){h(M);const{px:$,py:L,pz:P}=this,{px:H,py:F,pz:q}=M,Y=t.eql(t.mul($,q),t.mul(H,P)),I=t.eql(t.mul(L,q),t.mul(F,P));return Y&&I}negate(){return new f(this.px,t.neg(this.py),this.pz)}double(){const{a:M,b:$}=e,L=t.mul($,b$),{px:P,py:H,pz:F}=this;let q=t.ZERO,Y=t.ZERO,I=t.ZERO,T=t.mul(P,P),V=t.mul(H,H),Q=t.mul(F,F),te=t.mul(P,H);return te=t.add(te,te),I=t.mul(P,F),I=t.add(I,I),q=t.mul(M,I),Y=t.mul(L,Q),Y=t.add(q,Y),q=t.sub(V,Y),Y=t.add(V,Y),Y=t.mul(q,Y),q=t.mul(te,q),I=t.mul(L,I),Q=t.mul(M,Q),te=t.sub(T,Q),te=t.mul(M,te),te=t.add(te,I),I=t.add(T,T),T=t.add(I,T),T=t.add(T,Q),T=t.mul(T,te),Y=t.add(Y,T),Q=t.mul(H,F),Q=t.add(Q,Q),T=t.mul(Q,te),q=t.sub(q,T),I=t.mul(Q,V),I=t.add(I,I),I=t.add(I,I),new f(q,Y,I)}add(M){h(M);const{px:$,py:L,pz:P}=this,{px:H,py:F,pz:q}=M;let Y=t.ZERO,I=t.ZERO,T=t.ZERO;const V=e.a,Q=t.mul(e.b,b$);let te=t.mul($,H),oe=t.mul(L,F),d=t.mul(P,q),g=t.add($,L),m=t.add(H,F);g=t.mul(g,m),m=t.add(te,oe),g=t.sub(g,m),m=t.add($,P);let b=t.add(H,q);return m=t.mul(m,b),b=t.add(te,d),m=t.sub(m,b),b=t.add(L,P),Y=t.add(F,q),b=t.mul(b,Y),Y=t.add(oe,d),b=t.sub(b,Y),T=t.mul(V,m),Y=t.mul(Q,d),T=t.add(Y,T),Y=t.sub(oe,T),T=t.add(oe,T),I=t.mul(Y,T),oe=t.add(te,te),oe=t.add(oe,te),d=t.mul(V,d),m=t.mul(Q,m),oe=t.add(oe,d),d=t.sub(te,d),d=t.mul(V,d),m=t.add(m,d),te=t.mul(oe,m),I=t.add(I,te),te=t.mul(b,m),Y=t.mul(g,Y),Y=t.sub(Y,te),te=t.mul(g,oe),T=t.mul(b,T),T=t.add(T,te),new f(Y,I,T)}subtract(M){return this.add(M.negate())}is0(){return this.equals(f.ZERO)}wNAF(M){return y.wNAFCached(this,l,M,$=>{const L=t.invertBatch($.map(P=>P.pz));return $.map((P,H)=>P.toAffine(L[H])).map(f.fromAffine)})}multiplyUnsafe(M){const $=f.ZERO;if(M===Yh)return $;if(a(M),M===sc)return this;const{endo:L}=e;if(!L)return y.unsafeLadder(this,M);let{k1neg:P,k1:H,k2neg:F,k2:q}=L.splitScalar(M),Y=$,I=$,T=this;for(;H>Yh||q>Yh;)H&sc&&(Y=Y.add(T)),q&sc&&(I=I.add(T)),T=T.double(),H>>=sc,q>>=sc;return P&&(Y=Y.negate()),F&&(I=I.negate()),I=new f(t.mul(I.px,L.beta),I.py,I.pz),Y.add(I)}multiply(M){a(M);let $=M,L,P;const{endo:H}=e;if(H){const{k1neg:F,k1:q,k2neg:Y,k2:I}=H.splitScalar($);let{p:T,f:V}=this.wNAF(q),{p:Q,f:te}=this.wNAF(I);T=y.constTimeNegate(F,T),Q=y.constTimeNegate(Y,Q),Q=new f(t.mul(Q.px,H.beta),Q.py,Q.pz),L=T.add(Q),P=V.add(te)}else{const{p:F,f:q}=this.wNAF($);L=F,P=q}return f.normalizeZ([L,P])[0]}multiplyAndAddUnsafe(M,$,L){const P=f.BASE,H=(q,Y)=>Y===Yh||Y===sc||!q.equals(P)?q.multiplyUnsafe(Y):q.multiply(Y),F=H(this,$).add(H(M,L));return F.is0()?void 0:F}toAffine(M){const{px:$,py:L,pz:P}=this,H=this.is0();M==null&&(M=H?t.ONE:t.inv(P));const F=t.mul($,M),q=t.mul(L,M),Y=t.mul(P,M);if(H)return{x:t.ZERO,y:t.ZERO};if(!t.eql(Y,t.ONE))throw new Error("invZ was invalid");return{x:F,y:q}}isTorsionFree(){const{h:M,isTorsionFree:$}=e;if(M===sc)return!0;if($)return $(f,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:M,clearCofactor:$}=e;return M===sc?this:$?$(f,this):this.multiplyUnsafe(e.h)}toRawBytes(M=!0){return this.assertValidity(),n(f,this,M)}toHex(M=!0){return Dw(this.toRawBytes(M))}}f.BASE=new f(e.Gx,e.Gy,t.ONE),f.ZERO=new f(t.ZERO,t.ONE,t.ZERO);const v=e.nBitLength,y=_Ae(f,e.endo?Math.ceil(v/2):v);return{CURVE:e,ProjectivePoint:f,normPrivateKeyToScalar:c,weierstrassEquation:s,isWithinCurveOrder:o}}function SAe(r){const e=eV(r);return lb(e,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...e})}function IAe(r){const e=SAe(r),{Fp:t,n}=e,i=t.BYTES+1,s=2*t.BYTES+1;function o(m){return YhDw(Bw(m,e.nByteLength));function A(m){const b=n>>sc;return m>b}function M(m){return A(m)?a(-m):m}const $=(m,b,E)=>kp(m.slice(b,E));class L{constructor(b,E,C){this.r=b,this.s=E,this.recovery=C,this.assertValidity()}static fromCompact(b){const E=e.nByteLength;return b=jc("compactSignature",b,E*2),new L($(b,0,E),$(b,E,2*E))}static fromDER(b){const{r:E,s:C}=ep.toSig(jc("DER",b));return new L(E,C)}assertValidity(){if(!v(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!v(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(b){return new L(this.r,this.s,b)}recoverPublicKey(b){const{r:E,s:C,recovery:B}=this,R=I(jc("msgHash",b));if(B==null||![0,1,2,3].includes(B))throw new Error("recovery id invalid");const w=B===2||B===3?E+e.n:E;if(w>=t.ORDER)throw new Error("recovery id 2 or 3 invalid");const O=B&1?"03":"02",pe=l.fromHex(O+y(w)),be=c(w),x=a(-R*be),Z=a(C*be),k=l.BASE.multiplyAndAddUnsafe(pe,x,Z);if(!k)throw new Error("point at infinify");return k.assertValidity(),k}hasHighS(){return A(this.s)}normalizeS(){return this.hasHighS()?new L(this.r,a(-this.s),this.recovery):this}toDERRawBytes(){return $w(this.toDERHex())}toDERHex(){return ep.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return $w(this.toCompactHex())}toCompactHex(){return y(this.r)+y(this.s)}}const P={isValidPrivateKey(m){try{return h(m),!0}catch{return!1}},normPrivateKeyToScalar:h,randomPrivateKey:()=>{const m=Xz(e.n);return yAe(e.randomBytes(m),e.n)},precompute(m=8,b=l.BASE){return b._setWindowSize(m),b.multiply(BigInt(3)),b}};function H(m,b=!0){return l.fromPrivateKey(m).toRawBytes(b)}function F(m){const b=m instanceof Uint8Array,E=typeof m=="string",C=(b||E)&&m.length;return b?C===i||C===s:E?C===2*i||C===2*s:m instanceof l}function q(m,b,E=!0){if(F(m))throw new Error("first arg must be private key");if(!F(b))throw new Error("second arg must be public key");return l.fromHex(b).multiply(h(m)).toRawBytes(E)}const Y=e.bits2int||function(m){const b=kp(m),E=m.length*8-e.nBitLength;return E>0?b>>BigInt(E):b},I=e.bits2int_modN||function(m){return a(Y(m))},T=PT(e.nBitLength);function V(m){if(typeof m!="bigint")throw new Error("bigint expected");if(!(Yh<=m&&mJ in E))throw new Error("sign() legacy options not supported");const{hash:C,randomBytes:B}=e;let{lowS:R,prehash:w,extraEntropy:O}=E;R==null&&(R=!0),m=jc("msgHash",m),w&&(m=jc("prehashed msgHash",C(m)));const pe=I(m),be=h(b),x=[V(be),V(pe)];if(O!=null){const J=O===!0?B(t.BYTES):O;x.push(jc("extraEntropy",J))}const Z=Kv(...x),k=pe;function W(J){const S=Y(J);if(!v(S))return;const D=c(S),G=l.BASE.multiply(S).toAffine(),z=a(G.x);if(z===Yh)return;const K=a(D*a(k+z*be));if(K===Yh)return;let ue=(G.x===z?0:2)|Number(G.y&sc),ye=K;return R&&A(K)&&(ye=M(K),ue^=1),new L(z,ye,ue)}return{seed:Z,k2sig:W}}const te={lowS:e.lowS,prehash:!1},oe={lowS:e.lowS,prehash:!1};function d(m,b,E=te){const{seed:C,k2sig:B}=Q(m,b,E),R=e;return Yz(R.hash.outputLen,R.nByteLength,R.hmac)(C,B)}l.BASE._setWindowSize(8);function g(m,b,E,C=oe){var G;const B=m;if(b=jc("msgHash",b),E=jc("publicKey",E),"strict"in C)throw new Error("options.strict was renamed to lowS");const{lowS:R,prehash:w}=C;let O,pe;try{if(typeof B=="string"||B instanceof Uint8Array)try{O=L.fromDER(B)}catch(z){if(!(z instanceof ep.Err))throw z;O=L.fromCompact(B)}else if(typeof B=="object"&&typeof B.r=="bigint"&&typeof B.s=="bigint"){const{r:z,s:K}=B;O=new L(z,K)}else throw new Error("PARSE");pe=l.fromHex(E)}catch(z){if(z.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(R&&O.hasHighS())return!1;w&&(b=e.hash(b));const{r:be,s:x}=O,Z=I(b),k=c(x),W=a(Z*k),J=a(be*k),S=(G=l.BASE.multiplyAndAddUnsafe(pe,W,J))==null?void 0:G.toAffine();return S?a(S.x)===be:!1}return{CURVE:e,getPublicKey:H,getSharedSecret:q,sign:d,verify:g,ProjectivePoint:l,Signature:L,utils:P}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function TAe(r){return{hash:r,hmac:(e,...t)=>Rz(r,e,pxe(...t)),randomBytes:gxe}}function RAe(r,e){const t=n=>IAe({...r,...TAe(n)});return Object.freeze({...t(e),create:t})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const tV=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),_$=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),kAe=BigInt(1),tS=BigInt(2),x$=(r,e)=>(r+e/tS)/e;function NAe(r){const e=tV,t=BigInt(3),n=BigInt(6),i=BigInt(11),s=BigInt(22),o=BigInt(23),a=BigInt(44),c=BigInt(88),l=r*r*r%e,h=l*l*r%e,f=Wa(h,t,e)*h%e,v=Wa(f,t,e)*h%e,y=Wa(v,tS,e)*l%e,A=Wa(y,i,e)*y%e,M=Wa(A,s,e)*A%e,$=Wa(M,a,e)*M%e,L=Wa($,c,e)*$%e,P=Wa(L,a,e)*M%e,H=Wa(P,t,e)*h%e,F=Wa(H,o,e)*A%e,q=Wa(F,n,e)*l%e,Y=Wa(q,tS,e);if(!rS.eql(rS.sqr(Y),r))throw new Error("Cannot find square root");return Y}const rS=vAe(tV,void 0,void 0,{sqrt:NAe}),qd=RAe({a:BigInt(0),b:BigInt(7),Fp:rS,n:_$,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:r=>{const e=_$,t=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-kAe*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),s=t,o=BigInt("0x100000000000000000000000000000000"),a=x$(s*r,e),c=x$(-n*r,e);let l=Po(r-a*t-c*i,e),h=Po(-a*n-c*s,e);const f=l>o,v=h>o;if(f&&(l=e-l),v&&(h=e-h),l>o||h>o)throw new Error("splitScalar: Endomorphism failed, k="+r);return{k1neg:f,k1:l,k2neg:v,k2:h}}}},Nz);BigInt(0);qd.ProjectivePoint;const Gv="0x0000000000000000000000000000000000000000",A$="0x0000000000000000000000000000000000000000000000000000000000000000",E$=BigInt(0),C$=BigInt(1),S$=BigInt(2),I$=BigInt(27),T$=BigInt(28),a4=BigInt(35),dg={};function R$(r){return a1(to(r),32)}var bm,_m,xm,dp;const Lc=class Lc{constructor(e,t,n,i){Le(this,bm);Le(this,_m);Le(this,xm);Le(this,dp);cb(e,dg,"Signature"),de(this,bm,t),de(this,_m,n),de(this,xm,i),de(this,dp,null)}get r(){return ee(this,bm)}set r(e){Ae(sm(e)===32,"invalid r","value",e),de(this,bm,Ft(e))}get s(){return ee(this,_m)}set s(e){Ae(sm(e)===32,"invalid s","value",e);const t=Ft(e);Ae(parseInt(t.substring(0,3))<8,"non-canonical s","value",t),de(this,_m,t)}get v(){return ee(this,xm)}set v(e){const t=Sr(e,"value");Ae(t===27||t===28,"invalid v","v",e),de(this,xm,t)}get networkV(){return ee(this,dp)}get legacyChainId(){const e=this.networkV;return e==null?null:Lc.getChainId(e)}get yParity(){return this.v===27?0:1}get yParityAndS(){const e=Zr(this.s);return this.yParity&&(e[0]|=128),Ft(e)}get compactSerialized(){return vi([this.r,this.yParityAndS])}get serialized(){return vi([this.r,this.s,this.yParity?"0x1c":"0x1b"])}[Symbol.for("nodejs.util.inspect.custom")](){return`Signature { r: "${this.r}", s: "${this.s}", yParity: ${this.yParity}, networkV: ${this.networkV} }`}clone(){const e=new Lc(dg,this.r,this.s,this.v);return this.networkV&&de(e,dp,this.networkV),e}toJSON(){const e=this.networkV;return{_type:"signature",networkV:e!=null?e.toString():null,r:this.r,s:this.s,v:this.v}}static getChainId(e){const t=qt(e,"v");return t==I$||t==T$?E$:(Ae(t>=a4,"invalid EIP-155 v","v",e),(t-a4)/S$)}static getChainIdV(e,t){return qt(e)*S$+BigInt(35+t-27)}static getNormalizedV(e){const t=qt(e);return t===E$||t===I$?27:t===C$||t===T$?28:(Ae(t>=a4,"invalid v","v",e),t&C$?27:28)}static from(e){function t(l,h){Ae(l,h,"signature",e)}if(e==null)return new Lc(dg,A$,A$,27);if(typeof e=="string"){const l=Zr(e,"signature");if(l.length===64){const h=Ft(l.slice(0,32)),f=l.slice(32,64),v=f[0]&128?28:27;return f[0]&=127,new Lc(dg,h,Ft(f),v)}if(l.length===65){const h=Ft(l.slice(0,32)),f=l.slice(32,64);t((f[0]&128)===0,"non-canonical s");const v=Lc.getNormalizedV(l[64]);return new Lc(dg,h,Ft(f),v)}t(!1,"invalid raw signature length")}if(e instanceof Lc)return e.clone();const n=e.r;t(n!=null,"missing r");const i=R$(n),s=function(l,h){if(l!=null)return R$(l);if(h!=null){t(Tn(h,32),"invalid yParityAndS");const f=Zr(h);return f[0]&=127,Ft(f)}t(!1,"missing s")}(e.s,e.yParityAndS);t((Zr(s)[0]&128)==0,"non-canonical s");const{networkV:o,v:a}=function(l,h,f){if(l!=null){const v=qt(l);return{networkV:v>=a4?v:void 0,v:Lc.getNormalizedV(v)}}if(h!=null)return t(Tn(h,32),"invalid yParityAndS"),{v:Zr(h)[0]&128?28:27};if(f!=null){switch(Sr(f,"sig.yParity")){case 0:return{v:27};case 1:return{v:28}}t(!1,"invalid yParity")}t(!1,"missing v")}(e.v,e.yParityAndS,e.yParity),c=new Lc(dg,i,s,a);return o&&de(c,dp,o),t(e.yParity==null||Sr(e.yParity,"sig.yParity")===c.yParity,"yParity mismatch"),t(e.yParityAndS==null||e.yParityAndS===c.yParityAndS,"yParityAndS mismatch"),c}};bm=new WeakMap,_m=new WeakMap,xm=new WeakMap,dp=new WeakMap;let vl=Lc;var $h;const V0=class V0{constructor(e){Le(this,$h);Ae(sm(e)===32,"invalid private key","privateKey","[REDACTED]"),de(this,$h,Ft(e))}get privateKey(){return ee(this,$h)}get publicKey(){return V0.computePublicKey(ee(this,$h))}get compressedPublicKey(){return V0.computePublicKey(ee(this,$h),!0)}sign(e){Ae(sm(e)===32,"invalid digest length","digest",e);const t=qd.sign(Xs(e),Xs(ee(this,$h)),{lowS:!0});return vl.from({r:Zf(t.r,32),s:Zf(t.s,32),v:t.recovery?28:27})}computeSharedSecret(e){const t=V0.computePublicKey(e);return Ft(qd.getSharedSecret(Xs(ee(this,$h)),Zr(t),!1))}static computePublicKey(e,t){let n=Zr(e,"key");if(n.length===32){const s=qd.getPublicKey(n,!!t);return Ft(s)}if(n.length===64){const s=new Uint8Array(65);s[0]=4,s.set(n,1),n=s}const i=qd.ProjectivePoint.fromHex(n);return Ft(i.toRawBytes(t))}static recoverPublicKey(e,t){Ae(sm(e)===32,"invalid digest length","digest",e);const n=vl.from(t);let i=qd.Signature.fromCompact(Xs(vi([n.r,n.s])));i=i.addRecoveryBit(n.yParity);const s=i.recoverPublicKey(Xs(e));return Ae(s!=null,"invalid signautre for digest","signature",t),"0x"+s.toHex(!1)}static addPoints(e,t,n){const i=qd.ProjectivePoint.fromHex(V0.computePublicKey(e).substring(2)),s=qd.ProjectivePoint.fromHex(V0.computePublicKey(t).substring(2));return"0x"+i.add(s).toHex(!!n)}};$h=new WeakMap;let Zv=V0;const PAe=BigInt(0),OAe=BigInt(36);function k$(r){r=r.toLowerCase();const e=r.substring(2).split(""),t=new Uint8Array(40);for(let i=0;i<40;i++)t[i]=e[i].charCodeAt(0);const n=Zr(Ei(t));for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&(e[i]=e[i].toUpperCase()),(n[i>>1]&15)>=8&&(e[i+1]=e[i+1].toUpperCase());return"0x"+e.join("")}const OT={};for(let r=0;r<10;r++)OT[String(r)]=String(r);for(let r=0;r<26;r++)OT[String.fromCharCode(65+r)]=String(10+r);const N$=15;function MAe(r){r=r.toUpperCase(),r=r.substring(4)+r.substring(0,2)+"00";let e=r.split("").map(n=>OT[n]).join("");for(;e.length>=N$;){let n=e.substring(0,N$);e=parseInt(n,10)%97+e.substring(n.length)}let t=String(98-parseInt(e,10)%97);for(;t.length<2;)t="0"+t;return t}const DAe=function(){const r={};for(let e=0;e<36;e++){const t="0123456789abcdefghijklmnopqrstuvwxyz"[e];r[t]=BigInt(e)}return r}();function $Ae(r){r=r.toLowerCase();let e=PAe;for(let t=0;te.format()).join(",")})`:this.type}defaultValue(){return 0}minValue(){return 0}maxValue(){return 0}isBigInt(){return!!this.type.match(/^u?int[0-9]+$/)}isData(){return this.type.startsWith("bytes")}isString(){return this.type==="string"}get tupleName(){if(this.type!=="tuple")throw TypeError("not a tuple");return ee(this,fp)}get arrayLength(){if(this.type!=="array")throw TypeError("not an array");return ee(this,fp)===!0?-1:ee(this,fp)===!1?this.value.length:null}static from(e,t){return new Rh(Th,e,t)}static uint8(e){return Ut(e,8)}static uint16(e){return Ut(e,16)}static uint24(e){return Ut(e,24)}static uint32(e){return Ut(e,32)}static uint40(e){return Ut(e,40)}static uint48(e){return Ut(e,48)}static uint56(e){return Ut(e,56)}static uint64(e){return Ut(e,64)}static uint72(e){return Ut(e,72)}static uint80(e){return Ut(e,80)}static uint88(e){return Ut(e,88)}static uint96(e){return Ut(e,96)}static uint104(e){return Ut(e,104)}static uint112(e){return Ut(e,112)}static uint120(e){return Ut(e,120)}static uint128(e){return Ut(e,128)}static uint136(e){return Ut(e,136)}static uint144(e){return Ut(e,144)}static uint152(e){return Ut(e,152)}static uint160(e){return Ut(e,160)}static uint168(e){return Ut(e,168)}static uint176(e){return Ut(e,176)}static uint184(e){return Ut(e,184)}static uint192(e){return Ut(e,192)}static uint200(e){return Ut(e,200)}static uint208(e){return Ut(e,208)}static uint216(e){return Ut(e,216)}static uint224(e){return Ut(e,224)}static uint232(e){return Ut(e,232)}static uint240(e){return Ut(e,240)}static uint248(e){return Ut(e,248)}static uint256(e){return Ut(e,256)}static uint(e){return Ut(e,256)}static int8(e){return Ut(e,-8)}static int16(e){return Ut(e,-16)}static int24(e){return Ut(e,-24)}static int32(e){return Ut(e,-32)}static int40(e){return Ut(e,-40)}static int48(e){return Ut(e,-48)}static int56(e){return Ut(e,-56)}static int64(e){return Ut(e,-64)}static int72(e){return Ut(e,-72)}static int80(e){return Ut(e,-80)}static int88(e){return Ut(e,-88)}static int96(e){return Ut(e,-96)}static int104(e){return Ut(e,-104)}static int112(e){return Ut(e,-112)}static int120(e){return Ut(e,-120)}static int128(e){return Ut(e,-128)}static int136(e){return Ut(e,-136)}static int144(e){return Ut(e,-144)}static int152(e){return Ut(e,-152)}static int160(e){return Ut(e,-160)}static int168(e){return Ut(e,-168)}static int176(e){return Ut(e,-176)}static int184(e){return Ut(e,-184)}static int192(e){return Ut(e,-192)}static int200(e){return Ut(e,-200)}static int208(e){return Ut(e,-208)}static int216(e){return Ut(e,-216)}static int224(e){return Ut(e,-224)}static int232(e){return Ut(e,-232)}static int240(e){return Ut(e,-240)}static int248(e){return Ut(e,-248)}static int256(e){return Ut(e,-256)}static int(e){return Ut(e,-256)}static bytes1(e){return Qr(e,1)}static bytes2(e){return Qr(e,2)}static bytes3(e){return Qr(e,3)}static bytes4(e){return Qr(e,4)}static bytes5(e){return Qr(e,5)}static bytes6(e){return Qr(e,6)}static bytes7(e){return Qr(e,7)}static bytes8(e){return Qr(e,8)}static bytes9(e){return Qr(e,9)}static bytes10(e){return Qr(e,10)}static bytes11(e){return Qr(e,11)}static bytes12(e){return Qr(e,12)}static bytes13(e){return Qr(e,13)}static bytes14(e){return Qr(e,14)}static bytes15(e){return Qr(e,15)}static bytes16(e){return Qr(e,16)}static bytes17(e){return Qr(e,17)}static bytes18(e){return Qr(e,18)}static bytes19(e){return Qr(e,19)}static bytes20(e){return Qr(e,20)}static bytes21(e){return Qr(e,21)}static bytes22(e){return Qr(e,22)}static bytes23(e){return Qr(e,23)}static bytes24(e){return Qr(e,24)}static bytes25(e){return Qr(e,25)}static bytes26(e){return Qr(e,26)}static bytes27(e){return Qr(e,27)}static bytes28(e){return Qr(e,28)}static bytes29(e){return Qr(e,29)}static bytes30(e){return Qr(e,30)}static bytes31(e){return Qr(e,31)}static bytes32(e){return Qr(e,32)}static address(e){return new Rh(Th,"address",e)}static bool(e){return new Rh(Th,"bool",!!e)}static bytes(e){return new Rh(Th,"bytes",e)}static string(e){return new Rh(Th,"string",e)}static array(e,t){throw new Error("not implemented yet")}static tuple(e,t){throw new Error("not implemented yet")}static overrides(e){return new Rh(Th,"overrides",Object.assign({},e))}static isTyped(e){return e&&typeof e=="object"&&"_typedSymbol"in e&&e._typedSymbol===P$}static dereference(e,t){if(Rh.isTyped(e)){if(e.type!==t)throw new Error(`invalid type: expecetd ${t}, got ${e.type}`);return e.value}return e}};fp=new WeakMap;let Ps=Rh;class LAe extends Sd{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){let n=Ps.dereference(t,"string");try{n=Gr(n)}catch(i){return this._throwError(i.message,t)}return e.writeValue(n)}decode(e){return Gr(Zf(e.readValue(),20))}}class UAe extends Sd{constructor(t){super(t.name,t.type,"_",t.dynamic);Oe(this,"coder");this.coder=t}defaultValue(){return this.coder.defaultValue()}encode(t,n){return this.coder.encode(t,n)}decode(t){return this.coder.decode(t)}}function nV(r,e,t){let n=[];if(Array.isArray(t))n=t;else if(t&&typeof t=="object"){let c={};n=e.map(l=>{const h=l.localName;return Ze(h,"cannot encode object for signature with missing names","INVALID_ARGUMENT",{argument:"values",info:{coder:l},value:t}),Ze(!c[h],"cannot encode object for signature with duplicate names","INVALID_ARGUMENT",{argument:"values",info:{coder:l},value:t}),c[h]=!0,t[h]})}else Ae(!1,"invalid tuple value","tuple",t);Ae(e.length===n.length,"types/value length mismatch","tuple",t);let i=new ZC,s=new ZC,o=[];e.forEach((c,l)=>{let h=n[l];if(c.dynamic){let f=s.length;c.encode(s,h);let v=i.writeUpdatableValue();o.push(y=>{v(y+f)})}else c.encode(i,h)}),o.forEach(c=>{c(i.length)});let a=r.appendWriter(i);return a+=r.appendWriter(s),a}function iV(r,e){let t=[],n=[],i=r.subReader(0);return e.forEach(s=>{let o=null;if(s.dynamic){let a=r.readIndex(),c=i.subReader(a);try{o=s.decode(c)}catch(l){if(ks(l,"BUFFER_OVERRUN"))throw l;o=l,o.baseType=s.name,o.name=s.localName,o.type=s.type}}else try{o=s.decode(r)}catch(a){if(ks(a,"BUFFER_OVERRUN"))throw a;o=a,o.baseType=s.name,o.name=s.localName,o.type=s.type}if(o==null)throw new Error("investigate");t.push(o),n.push(s.localName||null)}),Ow.fromItems(t,n)}class FAe extends Sd{constructor(t,n,i){const s=t.type+"["+(n>=0?n:"")+"]",o=n===-1||t.dynamic;super("array",s,i,o);Oe(this,"coder");Oe(this,"length");tr(this,{coder:t,length:n})}defaultValue(){const t=this.coder.defaultValue(),n=[];for(let i=0;io||i<-(o+KAe))&&this._throwError("value out-of-bounds",n),i=fz(i,8*ro)}else(iX0(s,this.size*8))&&this._throwError("value out-of-bounds",n);return t.writeValue(i)}decode(t){let n=X0(t.readValue(),this.size*8);return this.signed&&(n=v8(n,this.size*8)),n}}class YAe extends sV{constructor(e){super("string",e)}defaultValue(){return""}encode(e,t){return super.encode(e,Cu(Ps.dereference(t,"string")))}decode(e){return y8(super.decode(e))}}class c4 extends Sd{constructor(t,n){let i=!1;const s=[];t.forEach(a=>{a.dynamic&&(i=!0),s.push(a.type)});const o="tuple("+s.join(",")+")";super("tuple",o,n,i);Oe(this,"coders");tr(this,{coders:Object.freeze(t.slice())})}defaultValue(){const t=[];this.coders.forEach(i=>{t.push(i.defaultValue())});const n=this.coders.reduce((i,s)=>{const o=s.localName;return o&&(i[o]||(i[o]=0),i[o]++),i},{});return this.coders.forEach((i,s)=>{let o=i.localName;!o||n[o]!==1||(o==="length"&&(o="_length"),t[o]==null&&(t[o]=t[s]))}),Object.freeze(t)}encode(t,n){const i=Ps.dereference(n,"tuple");return nV(t,this.coders,i)}decode(t){return iV(t,this.coders)}}function l1(r){return Ei(Cu(r))}var QAe="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";const O$=new Map([[8217,"apostrophe"],[8260,"fraction slash"],[12539,"middle dot"]]),M$=4;function JAe(r){let e=0;function t(){return r[e++]<<8|r[e++]}let n=t(),i=1,s=[0,1];for(let q=1;q>--c&1}const f=31,v=2**f,y=v>>>1,A=y>>1,M=v-1;let $=0;for(let q=0;q1;){let Q=Y+I>>>1;q>>1|h(),T=T<<1^y,V=(V^y)<<1|y|1;P=T,H=1+V-T}let F=n-4;return L.map(q=>{switch(q-F){case 3:return F+65792+(r[a++]<<16|r[a++]<<8|r[a++]);case 2:return F+256+(r[a++]<<8|r[a++]);case 1:return F+r[a++];default:return q-1}})}function XAe(r){let e=0;return()=>r[e++]}function oV(r){return XAe(JAe(eEe(r)))}function eEe(r){let e=[];[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"].forEach((i,s)=>e[i.charCodeAt(0)]=s);let t=r.length,n=new Uint8Array(6*t>>3);for(let i=0,s=0,o=0,a=0;i=8&&(n[s++]=a>>(o-=8));return n}function tEe(r){return r&1?~r>>1:r>>1}function rEe(r,e){let t=Array(r);for(let n=0,i=0;n{let e=Yv(r);if(e.length)return e})}function cV(r){let e=[];for(;;){let t=r();if(t==0)break;e.push(nEe(t,r))}for(;;){let t=r()-1;if(t<0)break;e.push(iEe(t,r))}return e.flat()}function Qv(r){let e=[];for(;;){let t=r(e.length);if(!t)break;e.push(t)}return e}function lV(r,e,t){let n=Array(r).fill().map(()=>[]);for(let i=0;in[o].push(s));return n}function nEe(r,e){let t=1+e(),n=e(),i=Qv(e);return lV(i.length,1+r,e).flatMap((o,a)=>{let[c,...l]=o;return Array(i[a]).fill().map((h,f)=>{let v=f*n;return[c+f*t,l.map(y=>y+v)]})})}function iEe(r,e){let t=1+e();return lV(t,1+r,e).map(i=>[i[0],i.slice(1)])}function sEe(r){let e=[],t=Yv(r);return i(n([]),[]),e;function n(s){let o=r(),a=Qv(()=>{let c=Yv(r).map(l=>t[l]);if(c.length)return n(c)});return{S:o,B:a,Q:s}}function i({S:s,B:o},a,c){if(!(s&4&&c===a[a.length-1])){s&2&&(c=a[a.length-1]),s&1&&e.push(a);for(let l of o)for(let h of l.Q)i(l,[...a,h],c)}}}function oEe(r){return r.toString(16).toUpperCase().padStart(2,"0")}function uV(r){return`{${oEe(r)}}`}function aEe(r){let e=[];for(let t=0,n=r.length;t>24&255}function fV(r){return r&16777215}let nS,D$,iS,z4;function gEe(){let r=oV(lEe);nS=new Map(aV(r).flatMap((e,t)=>e.map(n=>[n,t+1<<24]))),D$=new Set(Yv(r)),iS=new Map,z4=new Map;for(let[e,t]of cV(r)){if(!D$.has(e)&&t.length==2){let[n,i]=t,s=z4.get(n);s||(s=new Map,z4.set(n,s)),s.set(i,e)}iS.set(e,t.reverse())}}function pV(r){return r>=Jv&&r=x8&&r=A8&&eE8&&e0&&i(E8+l)}else{let o=iS.get(s);o?t.push(...o):i(s)}if(!t.length)break;s=t.pop()}if(n&&e.length>1){let s=d3(e[0]);for(let o=1;o0&&i>=o)o==0?(e.push(n,...t),t.length=0,n=a):t.push(a),i=o;else{let c=mEe(n,a);c>=0?n=c:i==0&&o==0?(e.push(n),n=a):(t.push(a),i=o)}}return n>=0&&e.push(n,...t),e}function mV(r){return gV(r).map(fV)}function vEe(r){return wEe(gV(r))}const $$=45,wV=".",vV=65039,yV=1,S8=r=>Array.from(r);function Xv(r,e){return r.P.has(e)||r.Q.has(e)}class yEe extends Array{get is_emoji(){return!0}}let sS,bV,tp,oS,_V,am,O7,kg,F0,B$,aS;function MT(){if(sS)return;let r=oV(QAe);const e=()=>Yv(r),t=()=>new Set(e()),n=(h,f)=>f.forEach(v=>h.add(v));sS=new Map(cV(r)),bV=t(),tp=e(),oS=new Set(e().map(h=>tp[h])),tp=new Set(tp),_V=t(),t();let i=aV(r),s=r();const o=()=>{let h=new Set;return e().forEach(f=>n(h,i[f])),n(h,e()),h};am=Qv(h=>{let f=Qv(r).map(v=>v+96);if(f.length){let v=h>=s;f[0]-=32,f=Lw(f),v&&(f=`Restricted[${f}]`);let y=o(),A=o(),M=!r();return{N:f,P:y,Q:A,M,R:v}}}),O7=t(),kg=new Map;let a=e().concat(S8(O7)).sort((h,f)=>h-f);a.forEach((h,f)=>{let v=r(),y=a[f]=v?a[f-v]:{V:[],M:new Map};y.V.push(h),O7.has(h)||kg.set(h,y)});for(let{V:h,M:f}of new Set(kg.values())){let v=[];for(let A of h){let M=am.filter(L=>Xv(L,A)),$=v.find(({G:L})=>M.some(P=>L.has(P)));$||($={G:new Set,V:[]},v.push($)),$.V.push(A),n($.G,M)}let y=v.flatMap(A=>S8(A.G));for(let{G:A,V:M}of v){let $=new Set(y.filter(L=>!A.has(L)));for(let L of M)f.set(L,$)}}F0=new Set;let c=new Set;const l=h=>F0.has(h)?c.add(h):F0.add(h);for(let h of am){for(let f of h.P)l(f);for(let f of h.Q)l(f)}for(let h of F0)!kg.has(h)&&!c.has(h)&&kg.set(h,yV);n(F0,mV(F0)),B$=sEe(r).map(h=>yEe.from(h)).sort(cEe),aS=new Map;for(let h of B$){let f=[aS];for(let v of h){let y=f.map(A=>{let M=A.get(v);return M||(M=new Map,A.set(v,M)),M});v===vV?f.push(...y):f=y}for(let v of f)v.V=h}}function DT(r){return(xV(r)?"":`${$T(tx([r]))} `)+uV(r)}function $T(r){return`"${r}"‎`}function bEe(r){if(r.length>=4&&r[2]==$$&&r[3]==$$)throw new Error(`invalid label extension: "${Lw(r.slice(0,4))}"`)}function _Ee(r){for(let t=r.lastIndexOf(95);t>0;)if(r[--t]!==95)throw new Error("underscore allowed only at start")}function xEe(r){let e=r[0],t=O$.get(e);if(t)throw U3(`leading ${t}`);let n=r.length,i=-1;for(let s=1;se&&(e>>=1,r=[...r.slice(0,e),8230,...r.slice(-e)]);let i=0,s=r.length;for(let o=0;o{let s=aEe(i),o={input:s,offset:n};n+=s.length+1;try{let a=o.tokens=kEe(s,e,t),c=a.length,l;if(!c)throw new Error("empty label");let h=o.output=a.flat();if(_Ee(h),!(o.emoji=c>1||a[0].is_emoji)&&h.every(v=>v<128))bEe(h),l="ASCII";else{let v=a.flatMap(y=>y.is_emoji?[]:y);if(!v.length)l="Emoji";else{if(tp.has(h[0]))throw U3("leading combining mark");for(let M=1;Mo.has(a)):S8(o),!t.length)return}else n.push(i)}if(t){for(let i of t)if(n.every(s=>Xv(i,s)))throw new Error(`whole-script confusable: ${r.N}/${i.N}`)}}function IEe(r){let e=am;for(let t of r){let n=e.filter(i=>Xv(i,t));if(!n.length)throw am.some(i=>Xv(i,t))?EV(e[0],t):AV(t);if(e=n,n.length==1)break}return e}function TEe(r){return r.map(({input:e,error:t,output:n})=>{if(t){let i=t.message;throw new Error(r.length==1?i:`Invalid label ${$T(tx(e,63))}: ${i}`)}return Lw(n)}).join(wV)}function AV(r){return new Error(`disallowed character: ${DT(r)}`)}function EV(r,e){let t=DT(e),n=am.find(i=>i.P.has(e));return n&&(t=`${n.N} ${t}`),new Error(`illegal mixture: ${r.N} + ${t}`)}function U3(r){return new Error(`illegal placement: ${r}`)}function REe(r,e){for(let t of e)if(!Xv(r,t))throw EV(r,t);if(r.M){let t=mV(e);for(let n=1,i=t.length;nM$)throw new Error(`excessive non-spacing marks: ${$T(tx(t.slice(n-1,s)))} (${s-n}/${M$})`);n=s}}}function kEe(r,e,t){let n=[],i=[];for(r=r.slice().reverse();r.length;){let s=PEe(r);if(s)i.length&&(n.push(e(i)),i=[]),n.push(t(s));else{let o=r.pop();if(F0.has(o))i.push(o);else{let a=sS.get(o);if(a)i.push(...a);else if(!bV.has(o))throw AV(o)}}}return i.length&&n.push(e(i)),n}function NEe(r){return r.filter(e=>e!=vV)}function PEe(r,e){let t=aS,n,i=r.length;for(;i&&(t=t.get(r[--i]),!!t);){let{V:s}=t;s&&(n=s,r.length=i)}return n}const CV=new Uint8Array(32);CV.fill(0);function L$(r){return Ae(r.length!==0,"invalid ENS name; empty component","comp",r),r}function SV(r){const e=Cu(OEe(r)),t=[];if(r.length===0)return t;let n=0;for(let i=0;i{Ae(n.length<=t,`label ${JSON.stringify(r)} exceeds ${t} bytes`,"name",r);const i=new Uint8Array(n.length+1);return i.set(n,1),i[0]=i.length-1,i})))+"00"}function M7(r,e){return{address:Gr(r),storageKeys:e.map((t,n)=>(Ae(Tn(t,32),"invalid slot",`storageKeys[${n}]`,t),t.toLowerCase()))}}function D1(r){if(Array.isArray(r))return r.map((t,n)=>Array.isArray(t)?(Ae(t.length===2,"invalid slot set",`value[${n}]`,t),M7(t[0],t[1])):(Ae(t!=null&&typeof t=="object","invalid address-slot set","value",r),M7(t.address,t.storageKeys)));Ae(r!=null&&typeof r=="object","invalid access list","value",r);const e=Object.keys(r).map(t=>{const n=r[t].reduce((i,s)=>(i[s]=!0,i),{});return M7(t,Object.keys(n).sort())});return e.sort((t,n)=>t.address.localeCompare(n.address)),e}function DEe(r){let e;return typeof r=="string"?e=Zv.computePublicKey(r,!1):e=r.publicKey,Gr(Ei("0x"+e.substring(4)).substring(26))}function $Ee(r,e){return DEe(Zv.recoverPublicKey(r,e))}const Qi=BigInt(0),BEe=BigInt(2),LEe=BigInt(27),UEe=BigInt(28),FEe=BigInt(35),jEe=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),D7=4096*32;function U$(r,e){let t=r.toString(16);for(;t.length<2;)t="0"+t;return t+=h2(e).substring(4),"0x"+t}function rx(r){return r==="0x"?null:Gr(r)}function BT(r,e){try{return D1(r)}catch(t){Ae(!1,t.message,e,r)}}function ub(r,e){return r==="0x"?0:Sr(r,e)}function wi(r,e){if(r==="0x")return Qi;const t=qt(r,e);return Ae(t<=jEe,"value exceeds uint size",e,t),t}function Un(r,e){const t=qt(r,"value"),n=to(t);return Ae(n.length<=32,"value too large",`tx.${e}`,t),n}function LT(r){return D1(r).map(e=>[e.address,e.storageKeys])}function HEe(r,e){Ae(Array.isArray(r),`invalid ${e}`,"value",r);for(let t=0;ti.data),t.map(i=>i.commitment),t.map(i=>i.proof)])]):vi(["0x03",c1(n)])}var Yl,Am,Em,Cm,Sm,Im,Tm,Rm,km,Nm,Pm,Om,pp,df,Bh,ff,Mm,V4;const kh=class kh{constructor(){Le(this,Mm);Le(this,Yl);Le(this,Am);Le(this,Em);Le(this,Cm);Le(this,Sm);Le(this,Im);Le(this,Tm);Le(this,Rm);Le(this,km);Le(this,Nm);Le(this,Pm);Le(this,Om);Le(this,pp);Le(this,df);Le(this,Bh);Le(this,ff);de(this,Yl,null),de(this,Am,null),de(this,Cm,0),de(this,Sm,Qi),de(this,Im,null),de(this,Tm,null),de(this,Rm,null),de(this,Em,"0x"),de(this,km,Qi),de(this,Nm,Qi),de(this,Pm,null),de(this,Om,null),de(this,pp,null),de(this,df,null),de(this,ff,null),de(this,Bh,null)}get type(){return ee(this,Yl)}set type(e){switch(e){case null:de(this,Yl,null);break;case 0:case"legacy":de(this,Yl,0);break;case 1:case"berlin":case"eip-2930":de(this,Yl,1);break;case 2:case"london":case"eip-1559":de(this,Yl,2);break;case 3:case"cancun":case"eip-4844":de(this,Yl,3);break;default:Ae(!1,"unsupported transaction type","type",e)}}get typeName(){switch(this.type){case 0:return"legacy";case 1:return"eip-2930";case 2:return"eip-1559";case 3:return"eip-4844"}return null}get to(){const e=ee(this,Am);return e==null&&this.type===3?Gv:e}set to(e){de(this,Am,e==null?null:Gr(e))}get nonce(){return ee(this,Cm)}set nonce(e){de(this,Cm,Sr(e,"value"))}get gasLimit(){return ee(this,Sm)}set gasLimit(e){de(this,Sm,qt(e))}get gasPrice(){const e=ee(this,Im);return e==null&&(this.type===0||this.type===1)?Qi:e}set gasPrice(e){de(this,Im,e==null?null:qt(e,"gasPrice"))}get maxPriorityFeePerGas(){const e=ee(this,Tm);return e??(this.type===2||this.type===3?Qi:null)}set maxPriorityFeePerGas(e){de(this,Tm,e==null?null:qt(e,"maxPriorityFeePerGas"))}get maxFeePerGas(){const e=ee(this,Rm);return e??(this.type===2||this.type===3?Qi:null)}set maxFeePerGas(e){de(this,Rm,e==null?null:qt(e,"maxFeePerGas"))}get data(){return ee(this,Em)}set data(e){de(this,Em,Ft(e))}get value(){return ee(this,km)}set value(e){de(this,km,qt(e,"value"))}get chainId(){return ee(this,Nm)}set chainId(e){de(this,Nm,qt(e))}get signature(){return ee(this,Pm)||null}set signature(e){de(this,Pm,e==null?null:vl.from(e))}get accessList(){const e=ee(this,Om)||null;return e??(this.type===1||this.type===2||this.type===3?[]:null)}set accessList(e){de(this,Om,e==null?null:D1(e))}get maxFeePerBlobGas(){const e=ee(this,pp);return e==null&&this.type===3?Qi:e}set maxFeePerBlobGas(e){de(this,pp,e==null?null:qt(e,"maxFeePerBlobGas"))}get blobVersionedHashes(){let e=ee(this,df);return e==null&&this.type===3?[]:e}set blobVersionedHashes(e){if(e!=null){Ae(Array.isArray(e),"blobVersionedHashes must be an Array","value",e),e=e.slice();for(let t=0;tObject.assign({},e))}set blobs(e){if(e==null){de(this,ff,null);return}const t=[],n=[];for(let i=0;i=0?2:e.pop()}inferTypes(){const e=this.gasPrice!=null,t=this.maxFeePerGas!=null||this.maxPriorityFeePerGas!=null,n=this.accessList!=null,i=ee(this,pp)!=null||ee(this,df);this.maxFeePerGas!=null&&this.maxPriorityFeePerGas!=null&&Ze(this.maxFeePerGas>=this.maxPriorityFeePerGas,"priorityFee cannot be more than maxFee","BAD_DATA",{value:this}),Ze(!t||this.type!==0&&this.type!==1,"transaction type cannot have maxFeePerGas or maxPriorityFeePerGas","BAD_DATA",{value:this}),Ze(this.type!==0||!n,"legacy transaction cannot have accessList","BAD_DATA",{value:this});const s=[];return this.type!=null?s.push(this.type):t?s.push(2):e?(s.push(1),n||s.push(0)):n?(s.push(1),s.push(2)):(i&&this.to||(s.push(0),s.push(1),s.push(2)),s.push(3)),s.sort(),s}isLegacy(){return this.type===0}isBerlin(){return this.type===1}isLondon(){return this.type===2}isCancun(){return this.type===3}clone(){return kh.from(this)}toJSON(){const e=t=>t==null?null:t.toString();return{type:this.type,to:this.to,data:this.data,nonce:this.nonce,gasLimit:e(this.gasLimit),gasPrice:e(this.gasPrice),maxPriorityFeePerGas:e(this.maxPriorityFeePerGas),maxFeePerGas:e(this.maxFeePerGas),value:e(this.value),chainId:e(this.chainId),sig:this.signature?this.signature.toJSON():null,accessList:this.accessList}}static from(e){if(e==null)return new kh;if(typeof e=="string"){const n=Zr(e);if(n[0]>=127)return kh.from(WEe(n));switch(n[0]){case 1:return kh.from(KEe(n));case 2:return kh.from(VEe(n));case 3:return kh.from(ZEe(n))}Ze(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:"from"})}const t=new kh;return e.type!=null&&(t.type=e.type),e.to!=null&&(t.to=e.to),e.nonce!=null&&(t.nonce=e.nonce),e.gasLimit!=null&&(t.gasLimit=e.gasLimit),e.gasPrice!=null&&(t.gasPrice=e.gasPrice),e.maxPriorityFeePerGas!=null&&(t.maxPriorityFeePerGas=e.maxPriorityFeePerGas),e.maxFeePerGas!=null&&(t.maxFeePerGas=e.maxFeePerGas),e.maxFeePerBlobGas!=null&&(t.maxFeePerBlobGas=e.maxFeePerBlobGas),e.data!=null&&(t.data=e.data),e.value!=null&&(t.value=e.value),e.chainId!=null&&(t.chainId=e.chainId),e.signature!=null&&(t.signature=vl.from(e.signature)),e.accessList!=null&&(t.accessList=e.accessList),e.blobVersionedHashes!=null&&(t.blobVersionedHashes=e.blobVersionedHashes),e.kzg!=null&&(t.kzg=e.kzg),e.blobs!=null&&(t.blobs=e.blobs),e.hash!=null&&(Ae(t.isSigned(),"unsigned transaction cannot define '.hash'","tx",e),Ae(t.hash===e.hash,"hash mismatch","tx",e)),e.from!=null&&(Ae(t.isSigned(),"unsigned transaction cannot define '.from'","tx",e),Ae(t.from.toLowerCase()===(e.from||"").toLowerCase(),"from mismatch","tx",e)),t}};Yl=new WeakMap,Am=new WeakMap,Em=new WeakMap,Cm=new WeakMap,Sm=new WeakMap,Im=new WeakMap,Tm=new WeakMap,Rm=new WeakMap,km=new WeakMap,Nm=new WeakMap,Pm=new WeakMap,Om=new WeakMap,pp=new WeakMap,df=new WeakMap,Bh=new WeakMap,ff=new WeakMap,Mm=new WeakSet,V4=function(e,t){Ze(!e||this.signature!=null,"cannot serialize unsigned transaction; maybe you meant .unsignedSerialized","UNSUPPORTED_OPERATION",{operation:".serialized"});const n=e?this.signature:null;switch(this.inferType()){case 0:return zEe(this,n);case 1:return GEe(this,n);case 2:return qEe(this,n);case 3:return YEe(this,n,t?this.blobs:null)}Ze(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:".serialized"})};let I8=kh;const IV=new Uint8Array(32);IV.fill(0);const QEe=BigInt(-1),TV=BigInt(0),RV=BigInt(1),JEe=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function XEe(r){const e=Zr(r),t=e.length%32;return t?vi([e,IV.slice(t)]):Ft(e)}const e7e=Zf(RV,32),t7e=Zf(TV,32),F$={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},$7=["name","version","chainId","verifyingContract","salt"];function j$(r){return function(e){return Ae(typeof e=="string",`invalid domain value for ${JSON.stringify(r)}`,`domain.${r}`,e),e}}const r7e={name:j$("name"),version:j$("version"),chainId:function(r){const e=qt(r,"domain.chainId");return Ae(e>=0,"invalid chain ID","domain.chainId",r),Number.isSafeInteger(e)?Number(e):$g(e)},verifyingContract:function(r){try{return Gr(r).toLowerCase()}catch{}Ae(!1,'invalid domain value "verifyingContract"',"domain.verifyingContract",r)},salt:function(r){const e=Zr(r,"domain.salt");return Ae(e.length===32,'invalid domain value "salt"',"domain.salt",r),Ft(e)}};function B7(r){{const e=r.match(/^(u?)int(\d+)$/);if(e){const t=e[1]==="",n=parseInt(e[2]);Ae(n%8===0&&n!==0&&n<=256&&e[2]===String(n),"invalid numeric width","type",r);const i=X0(JEe,t?n-1:n),s=t?(i+RV)*QEe:TV;return function(o){const a=qt(o,"value");return Ae(a>=s&&a<=i,`value out-of-bounds for ${r}`,"value",a),Zf(t?fz(a,256):a,32)}}}{const e=r.match(/^bytes(\d+)$/);if(e){const t=parseInt(e[1]);return Ae(t!==0&&t<=32&&e[1]===String(t),"invalid bytes width","type",r),function(n){const i=Zr(n);return Ae(i.length===t,`invalid length for ${r}`,"value",n),XEe(n)}}}switch(r){case"address":return function(e){return a1(Gr(e),32)};case"bool":return function(e){return e?e7e:t7e};case"bytes":return function(e){return Ei(e)};case"string":return function(e){return l1(e)}}return null}function H$(r,e){return`${r}(${e.map(({name:t,type:n})=>n+" "+t).join(",")})`}function l4(r){const e=r.match(/^([^\x5b]*)((\x5b\d*\x5d)*)(\x5b(\d*)\x5d)$/);return e?{base:e[1],index:e[2]+e[4],array:{base:e[1],prefix:e[1]+e[2],count:e[5]?parseInt(e[5]):-1}}:{base:r}}var ly,Lh,Dm,L8,kV;const Za=class Za{constructor(e){Le(this,L8);Oe(this,"primaryType");Le(this,ly);Le(this,Lh);Le(this,Dm);de(this,Lh,new Map),de(this,Dm,new Map);const t=new Map,n=new Map,i=new Map,s={};Object.keys(e).forEach(c=>{s[c]=e[c].map(({name:l,type:h})=>{let{base:f,index:v}=l4(h);return f==="int"&&!e.int&&(f="int256"),f==="uint"&&!e.uint&&(f="uint256"),{name:l,type:f+(v||"")}}),t.set(c,new Set),n.set(c,[]),i.set(c,new Set)}),de(this,ly,JSON.stringify(s));for(const c in s){const l=new Set;for(const h of s[c]){Ae(!l.has(h.name),`duplicate variable name ${JSON.stringify(h.name)} in ${JSON.stringify(c)}`,"types",e),l.add(h.name);const f=l4(h.type).base;Ae(f!==c,`circular type reference to ${JSON.stringify(f)}`,"types",e),!B7(f)&&(Ae(n.has(f),`unknown type ${JSON.stringify(f)}`,"types",e),n.get(f).push(c),t.get(c).add(f))}}const o=Array.from(n.keys()).filter(c=>n.get(c).length===0);Ae(o.length!==0,"missing primary type","types",e),Ae(o.length===1,`ambiguous primary types or unused types: ${o.map(c=>JSON.stringify(c)).join(", ")}`,"types",e),tr(this,{primaryType:o[0]});function a(c,l){Ae(!l.has(c),`circular type reference to ${JSON.stringify(c)}`,"types",e),l.add(c);for(const h of t.get(c))if(n.has(h)){a(h,l);for(const f of l)i.get(f).add(h)}l.delete(c)}a(this.primaryType,new Set);for(const[c,l]of i){const h=Array.from(l);h.sort(),ee(this,Lh).set(c,H$(c,s[c])+h.map(f=>H$(f,s[f])).join(""))}}get types(){return JSON.parse(ee(this,ly))}getEncoder(e){let t=ee(this,Dm).get(e);return t||(t=rt(this,L8,kV).call(this,e),ee(this,Dm).set(e,t)),t}encodeType(e){const t=ee(this,Lh).get(e);return Ae(t,`unknown type: ${JSON.stringify(e)}`,"name",e),t}encodeData(e,t){return this.getEncoder(e)(t)}hashStruct(e,t){return Ei(this.encodeData(e,t))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,t,n){if(B7(e))return n(e,t);const i=l4(e).array;if(i)return Ae(i.count===-1||i.count===t.length,`array length mismatch; expected length ${i.count}`,"value",t),t.map(o=>this._visit(i.prefix,o,n));const s=this.types[e];if(s)return s.reduce((o,{name:a,type:c})=>(o[a]=this._visit(c,t[a],n),o),{});Ae(!1,`unknown type: ${e}`,"type",e)}visit(e,t){return this._visit(this.primaryType,e,t)}static from(e){return new Za(e)}static getPrimaryType(e){return Za.from(e).primaryType}static hashStruct(e,t,n){return Za.from(t).hashStruct(e,n)}static hashDomain(e){const t=[];for(const n in e){if(e[n]==null)continue;const i=F$[n];Ae(i,`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),t.push({name:n,type:i})}return t.sort((n,i)=>$7.indexOf(n.name)-$7.indexOf(i.name)),Za.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,n){return vi(["0x1901",Za.hashDomain(e),Za.from(t).hash(n)])}static hash(e,t,n){return Ei(Za.encode(e,t,n))}static async resolveNames(e,t,n,i){e=Object.assign({},e);for(const a in e)e[a]==null&&delete e[a];const s={};e.verifyingContract&&!Tn(e.verifyingContract,20)&&(s[e.verifyingContract]="0x");const o=Za.from(t);o.visit(n,(a,c)=>(a==="address"&&!Tn(c,20)&&(s[c]="0x"),c));for(const a in s)s[a]=await i(a);return e.verifyingContract&&s[e.verifyingContract]&&(e.verifyingContract=s[e.verifyingContract]),n=o.visit(n,(a,c)=>a==="address"&&s[c]?s[c]:c),{domain:e,value:n}}static getPayload(e,t,n){Za.hashDomain(e);const i={},s=[];$7.forEach(c=>{const l=e[c];l!=null&&(i[c]=r7e[c](l),s.push({name:c,type:F$[c]}))});const o=Za.from(t);t=o.types;const a=Object.assign({},t);return Ae(a.EIP712Domain==null,"types must not contain EIP712Domain type","types.EIP712Domain",t),a.EIP712Domain=s,o.encode(n),{types:a,domain:i,primaryType:o.primaryType,message:o.visit(n,(c,l)=>{if(c.match(/^bytes(\d*)/))return Ft(Zr(l));if(c.match(/^u?int/))return qt(l).toString();switch(c){case"address":return l.toLowerCase();case"bool":return!!l;case"string":return Ae(typeof l=="string","invalid string","value",l),l}Ae(!1,"unsupported type","type",c)})}}};ly=new WeakMap,Lh=new WeakMap,Dm=new WeakMap,L8=new WeakSet,kV=function(e){{const i=B7(e);if(i)return i}const t=l4(e).array;if(t){const i=t.prefix,s=this.getEncoder(i);return o=>{Ae(t.count===-1||t.count===o.length,`array length mismatch; expected length ${t.count}`,"value",o);let a=o.map(s);return ee(this,Lh).has(i)&&(a=a.map(Ei)),Ei(vi(a))}}const n=this.types[e];if(n){const i=l1(ee(this,Lh).get(e));return s=>{const o=n.map(({name:a,type:c})=>{const l=this.getEncoder(c)(s[a]);return ee(this,Lh).has(c)?Ei(l):l});return o.unshift(i),vi(o)}}Ae(!1,`unknown type: ${e}`,"type",e)};let T8=Za;function io(r){const e=new Set;return r.forEach(t=>e.add(t)),Object.freeze(e)}const n7e="external public payable override",i7e=io(n7e.split(" ")),NV="constant external internal payable private public pure view override",s7e=io(NV.split(" ")),PV="constructor error event fallback function receive struct",OV=io(PV.split(" ")),MV="calldata memory storage payable indexed",o7e=io(MV.split(" ")),a7e="tuple returns",c7e=[PV,MV,a7e,NV].join(" "),l7e=io(c7e.split(" ")),u7e={"(":"OPEN_PAREN",")":"CLOSE_PAREN","[":"OPEN_BRACKET","]":"CLOSE_BRACKET",",":"COMMA","@":"AT"},h7e=new RegExp("^(\\s*)"),d7e=new RegExp("^([0-9]+)"),f7e=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)"),DV=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)$"),$V=new RegExp("^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$");var os,Vc,uy,lS;const U8=class U8{constructor(e){Le(this,uy);Le(this,os);Le(this,Vc);de(this,os,0),de(this,Vc,e.slice())}get offset(){return ee(this,os)}get length(){return ee(this,Vc).length-ee(this,os)}clone(){return new U8(ee(this,Vc))}reset(){de(this,os,0)}popKeyword(e){const t=this.peek();if(t.type!=="KEYWORD"||!e.has(t.text))throw new Error(`expected keyword ${t.text}`);return this.pop().text}popType(e){if(this.peek().type!==e){const t=this.peek();throw new Error(`expected ${e}; got ${t.type} ${JSON.stringify(t.text)}`)}return this.pop().text}popParen(){const e=this.peek();if(e.type!=="OPEN_PAREN")throw new Error("bad start");const t=rt(this,uy,lS).call(this,ee(this,os)+1,e.match+1);return de(this,os,e.match+1),t}popParams(){const e=this.peek();if(e.type!=="OPEN_PAREN")throw new Error("bad start");const t=[];for(;ee(this,os)=ee(this,Vc).length)throw new Error("out-of-bounds");return ee(this,Vc)[ee(this,os)]}peekKeyword(e){const t=this.peekType("KEYWORD");return t!=null&&e.has(t)?t:null}peekType(e){if(this.length===0)return null;const t=this.peek();return t.type===e?t.text:null}pop(){const e=this.peek();return M2(this,os)._++,e}toString(){const e=[];for(let t=ee(this,os);t`}};os=new WeakMap,Vc=new WeakMap,uy=new WeakSet,lS=function(e=0,t=0){return new U8(ee(this,Vc).slice(e,t).map(n=>Object.freeze(Object.assign({},n,{match:n.match-e,linkBack:n.linkBack-e,linkNext:n.linkNext-e}))))};let yl=U8;function f0(r){const e=[],t=o=>{const a=s0&&e[e.length-1].type==="NUMBER"){const f=e.pop().text;h=f+h,e[e.length-1].value=Sr(f)}if(e.length===0||e[e.length-1].type!=="BRACKET")throw new Error("missing opening bracket");e[e.length-1].text+=h}continue}if(a=o.match(f7e),a){if(c.text=a[1],s+=c.text.length,l7e.has(c.text)){c.type="KEYWORD";continue}if(c.text.match($V)){c.type="TYPE";continue}c.type="ID";continue}if(a=o.match(d7e),a){c.text=a[1],c.type="NUMBER",s+=c.text.length;continue}throw new Error(`unexpected token ${JSON.stringify(o[0])} at position ${s}`)}return new yl(e.map(o=>Object.freeze(o)))}function W$(r,e){let t=[];for(const n in e.keys())r.has(n)&&t.push(n);if(t.length>1)throw new Error(`conflicting types: ${t.join(", ")}`)}function nx(r,e){if(e.peekKeyword(OV)){const t=e.pop().text;if(t!==r)throw new Error(`expected ${r}, got ${t}`)}return e.popType("ID")}function vd(r,e){const t=new Set;for(;;){const n=r.peekType("KEYWORD");if(n==null||e&&!e.has(n))break;if(r.pop(),t.has(n))throw new Error(`duplicate keywords: ${JSON.stringify(n)}`);t.add(n)}return Object.freeze(t)}function BV(r){let e=vd(r,s7e);return W$(e,io("constant payable nonpayable".split(" "))),W$(e,io("pure view payable nonpayable".split(" "))),e.has("view")?"view":e.has("pure")?"pure":e.has("payable")?"payable":e.has("nonpayable")?"nonpayable":e.has("constant")?"view":"nonpayable"}function nd(r,e){return r.popParams().map(t=>us.from(t,e))}function LV(r){if(r.peekType("AT")){if(r.pop(),r.peekType("NUMBER"))return qt(r.pop().text);throw new Error("invalid gas")}return null}function u1(r){if(r.length)throw new Error(`unexpected tokens at offset ${r.offset}: ${r.toString()}`)}const p7e=new RegExp(/^(.*)\[([0-9]*)\]$/);function z$(r){const e=r.match($V);if(Ae(e,"invalid type","type",r),r==="uint")return"uint256";if(r==="int")return"int256";if(e[2]){const t=parseInt(e[2]);Ae(t!==0&&t<=32,"invalid bytes length","type",r)}else if(e[3]){const t=parseInt(e[3]);Ae(t!==0&&t<=256&&t%8===0,"invalid numeric width","type",r)}return r}const Xn={},Wo=Symbol.for("_ethers_internal"),V$="_ParamTypeInternal",q$="_ErrorInternal",K$="_EventInternal",G$="_ConstructorInternal",Z$="_FallbackInternal",Y$="_FunctionInternal",Q$="_StructInternal";var $m,q4;const Ya=class Ya{constructor(e,t,n,i,s,o,a,c){Le(this,$m);Oe(this,"name");Oe(this,"type");Oe(this,"baseType");Oe(this,"indexed");Oe(this,"components");Oe(this,"arrayLength");Oe(this,"arrayChildren");if(cb(e,Xn,"ParamType"),Object.defineProperty(this,Wo,{value:V$}),o&&(o=Object.freeze(o.slice())),i==="array"){if(a==null||c==null)throw new Error("")}else if(a!=null||c!=null)throw new Error("");if(i==="tuple"){if(o==null)throw new Error("")}else if(o!=null)throw new Error("");tr(this,{name:t,type:n,baseType:i,indexed:s,components:o,arrayLength:a,arrayChildren:c})}format(e){if(e==null&&(e="sighash"),e==="json"){const n=this.name||"";if(this.isArray()){const s=JSON.parse(this.arrayChildren.format("json"));return s.name=n,s.type+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`,JSON.stringify(s)}const i={type:this.baseType==="tuple"?"tuple":this.type,name:n};return typeof this.indexed=="boolean"&&(i.indexed=this.indexed),this.isTuple()&&(i.components=this.components.map(s=>JSON.parse(s.format(e)))),JSON.stringify(i)}let t="";return this.isArray()?(t+=this.arrayChildren.format(e),t+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`):this.isTuple()?t+="("+this.components.map(n=>n.format(e)).join(e==="full"?", ":",")+")":t+=this.type,e!=="sighash"&&(this.indexed===!0&&(t+=" indexed"),e==="full"&&this.name&&(t+=" "+this.name)),t}isArray(){return this.baseType==="array"}isTuple(){return this.baseType==="tuple"}isIndexable(){return this.indexed!=null}walk(e,t){if(this.isArray()){if(!Array.isArray(e))throw new Error("invalid array value");if(this.arrayLength!==-1&&e.length!==this.arrayLength)throw new Error("array is wrong length");const n=this;return e.map(i=>n.arrayChildren.walk(i,t))}if(this.isTuple()){if(!Array.isArray(e))throw new Error("invalid tuple value");if(e.length!==this.components.length)throw new Error("array is wrong length");const n=this;return e.map((i,s)=>n.components[s].walk(i,t))}return t(this.type,e)}async walkAsync(e,t){const n=[],i=[e];return rt(this,$m,q4).call(this,n,e,t,s=>{i[0]=s}),n.length&&await Promise.all(n),i[0]}static from(e,t){if(Ya.isParamType(e))return e;if(typeof e=="string")try{return Ya.from(f0(e),t)}catch{Ae(!1,"invalid param type","obj",e)}else if(e instanceof yl){let a="",c="",l=null;vd(e,io(["tuple"])).has("tuple")||e.peekType("OPEN_PAREN")?(c="tuple",l=e.popParams().map(M=>Ya.from(M)),a=`tuple(${l.map(M=>M.format()).join(",")})`):(a=z$(e.popType("TYPE")),c=a);let h=null,f=null;for(;e.length&&e.peekType("BRACKET");){const M=e.pop();h=new Ya(Xn,"",a,c,null,l,f,h),f=M.value,a+=M.text,c="array",l=null}let v=null;if(vd(e,o7e).has("indexed")){if(!t)throw new Error("");v=!0}const A=e.peekType("ID")?e.pop().text:"";if(e.length)throw new Error("leftover tokens");return new Ya(Xn,A,a,c,v,l,f,h)}const n=e.name;Ae(!n||typeof n=="string"&&n.match(DV),"invalid name","obj.name",n);let i=e.indexed;i!=null&&(Ae(t,"parameter cannot be indexed","obj.indexed",e.indexed),i=!!i);let s=e.type,o=s.match(p7e);if(o){const a=parseInt(o[2]||"-1"),c=Ya.from({type:o[1],components:e.components});return new Ya(Xn,n||"",s,"array",i,null,a,c)}if(s==="tuple"||s.startsWith("tuple(")||s.startsWith("(")){const a=e.components!=null?e.components.map(l=>Ya.from(l)):null;return new Ya(Xn,n||"",s,"tuple",i,a,null,null)}return s=z$(e.type),new Ya(Xn,n||"",s,s,i,null,null,null)}static isParamType(e){return e&&e[Wo]===V$}};$m=new WeakSet,q4=function(e,t,n,i){if(this.isArray()){if(!Array.isArray(t))throw new Error("invalid array value");if(this.arrayLength!==-1&&t.length!==this.arrayLength)throw new Error("array is wrong length");const o=this.arrayChildren,a=t.slice();a.forEach((c,l)=>{var h;rt(h=o,$m,q4).call(h,e,c,n,f=>{a[l]=f})}),i(a);return}if(this.isTuple()){const o=this.components;let a;if(Array.isArray(t))a=t.slice();else{if(t==null||typeof t!="object")throw new Error("invalid tuple value");a=o.map(c=>{if(!c.name)throw new Error("cannot use object value with unnamed components");if(!(c.name in t))throw new Error(`missing value for component ${c.name}`);return t[c.name]})}if(a.length!==this.components.length)throw new Error("array is wrong length");a.forEach((c,l)=>{var h;rt(h=o[l],$m,q4).call(h,e,c,n,f=>{a[l]=f})}),i(a);return}const s=n(this.type,t);s.then?e.push(async function(){i(await s)}()):i(s)};let us=Ya;class h1{constructor(e,t,n){Oe(this,"type");Oe(this,"inputs");cb(e,Xn,"Fragment"),n=Object.freeze(n.slice()),tr(this,{type:t,inputs:n})}static from(e){if(typeof e=="string"){try{h1.from(JSON.parse(e))}catch{}return h1.from(f0(e))}if(e instanceof yl)switch(e.peekKeyword(OV)){case"constructor":return Jh.from(e);case"error":return Mo.from(e);case"event":return uu.from(e);case"fallback":case"receive":return Nh.from(e);case"function":return hu.from(e);case"struct":return Np.from(e)}else if(typeof e=="object"){switch(e.type){case"constructor":return Jh.from(e);case"error":return Mo.from(e);case"event":return uu.from(e);case"fallback":case"receive":return Nh.from(e);case"function":return hu.from(e);case"struct":return Np.from(e)}Ze(!1,`unsupported type: ${e.type}`,"UNSUPPORTED_OPERATION",{operation:"Fragment.from"})}Ae(!1,"unsupported frgament object","obj",e)}static isConstructor(e){return Jh.isFragment(e)}static isError(e){return Mo.isFragment(e)}static isEvent(e){return uu.isFragment(e)}static isFunction(e){return hu.isFragment(e)}static isStruct(e){return Np.isFragment(e)}}class ix extends h1{constructor(t,n,i,s){super(t,n,s);Oe(this,"name");Ae(typeof i=="string"&&i.match(DV),"invalid identifier","name",i),s=Object.freeze(s.slice()),tr(this,{name:i})}}function ey(r,e){return"("+e.map(t=>t.format(r)).join(r==="full"?", ":",")+")"}class Mo extends ix{constructor(e,t,n){super(e,"error",t,n),Object.defineProperty(this,Wo,{value:q$})}get selector(){return l1(this.format("sighash")).substring(0,10)}format(e){if(e==null&&(e="sighash"),e==="json")return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});const t=[];return e!=="sighash"&&t.push("error"),t.push(this.name+ey(e,this.inputs)),t.join(" ")}static from(e){if(Mo.isFragment(e))return e;if(typeof e=="string")return Mo.from(f0(e));if(e instanceof yl){const t=nx("error",e),n=nd(e);return u1(e),new Mo(Xn,t,n)}return new Mo(Xn,e.name,e.inputs?e.inputs.map(us.from):[])}static isFragment(e){return e&&e[Wo]===q$}}class uu extends ix{constructor(t,n,i,s){super(t,"event",n,i);Oe(this,"anonymous");Object.defineProperty(this,Wo,{value:K$}),tr(this,{anonymous:s})}get topicHash(){return l1(this.format("sighash"))}format(t){if(t==null&&(t="sighash"),t==="json")return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(i=>JSON.parse(i.format(t)))});const n=[];return t!=="sighash"&&n.push("event"),n.push(this.name+ey(t,this.inputs)),t!=="sighash"&&this.anonymous&&n.push("anonymous"),n.join(" ")}static getTopicHash(t,n){return n=(n||[]).map(s=>us.from(s)),new uu(Xn,t,n,!1).topicHash}static from(t){if(uu.isFragment(t))return t;if(typeof t=="string")try{return uu.from(f0(t))}catch{Ae(!1,"invalid event fragment","obj",t)}else if(t instanceof yl){const n=nx("event",t),i=nd(t,!0),s=!!vd(t,io(["anonymous"])).has("anonymous");return u1(t),new uu(Xn,n,i,s)}return new uu(Xn,t.name,t.inputs?t.inputs.map(n=>us.from(n,!0)):[],!!t.anonymous)}static isFragment(t){return t&&t[Wo]===K$}}class Jh extends h1{constructor(t,n,i,s,o){super(t,n,i);Oe(this,"payable");Oe(this,"gas");Object.defineProperty(this,Wo,{value:G$}),tr(this,{payable:s,gas:o})}format(t){if(Ze(t!=null&&t!=="sighash","cannot format a constructor for sighash","UNSUPPORTED_OPERATION",{operation:"format(sighash)"}),t==="json")return JSON.stringify({type:"constructor",stateMutability:this.payable?"payable":"undefined",payable:this.payable,gas:this.gas!=null?this.gas:void 0,inputs:this.inputs.map(i=>JSON.parse(i.format(t)))});const n=[`constructor${ey(t,this.inputs)}`];return this.payable&&n.push("payable"),this.gas!=null&&n.push(`@${this.gas.toString()}`),n.join(" ")}static from(t){if(Jh.isFragment(t))return t;if(typeof t=="string")try{return Jh.from(f0(t))}catch{Ae(!1,"invalid constuctor fragment","obj",t)}else if(t instanceof yl){vd(t,io(["constructor"]));const n=nd(t),i=!!vd(t,i7e).has("payable"),s=LV(t);return u1(t),new Jh(Xn,"constructor",n,i,s)}return new Jh(Xn,"constructor",t.inputs?t.inputs.map(us.from):[],!!t.payable,t.gas!=null?t.gas:null)}static isFragment(t){return t&&t[Wo]===G$}}class Nh extends h1{constructor(t,n,i){super(t,"fallback",n);Oe(this,"payable");Object.defineProperty(this,Wo,{value:Z$}),tr(this,{payable:i})}format(t){const n=this.inputs.length===0?"receive":"fallback";if(t==="json"){const i=this.payable?"payable":"nonpayable";return JSON.stringify({type:n,stateMutability:i})}return`${n}()${this.payable?" payable":""}`}static from(t){if(Nh.isFragment(t))return t;if(typeof t=="string")try{return Nh.from(f0(t))}catch{Ae(!1,"invalid fallback fragment","obj",t)}else if(t instanceof yl){const n=t.toString(),i=t.peekKeyword(io(["fallback","receive"]));if(Ae(i,"type must be fallback or receive","obj",n),t.popKeyword(io(["fallback","receive"]))==="receive"){const c=nd(t);return Ae(c.length===0,"receive cannot have arguments","obj.inputs",c),vd(t,io(["payable"])),u1(t),new Nh(Xn,[],!0)}let o=nd(t);o.length?Ae(o.length===1&&o[0].type==="bytes","invalid fallback inputs","obj.inputs",o.map(c=>c.format("minimal")).join(", ")):o=[us.from("bytes")];const a=BV(t);if(Ae(a==="nonpayable"||a==="payable","fallback cannot be constants","obj.stateMutability",a),vd(t,io(["returns"])).has("returns")){const c=nd(t);Ae(c.length===1&&c[0].type==="bytes","invalid fallback outputs","obj.outputs",c.map(l=>l.format("minimal")).join(", "))}return u1(t),new Nh(Xn,o,a==="payable")}if(t.type==="receive")return new Nh(Xn,[],!0);if(t.type==="fallback"){const n=[us.from("bytes")],i=t.stateMutability==="payable";return new Nh(Xn,n,i)}Ae(!1,"invalid fallback description","obj",t)}static isFragment(t){return t&&t[Wo]===Z$}}class hu extends ix{constructor(t,n,i,s,o,a){super(t,"function",n,s);Oe(this,"constant");Oe(this,"outputs");Oe(this,"stateMutability");Oe(this,"payable");Oe(this,"gas");Object.defineProperty(this,Wo,{value:Y$}),o=Object.freeze(o.slice()),tr(this,{constant:i==="view"||i==="pure",gas:a,outputs:o,payable:i==="payable",stateMutability:i})}get selector(){return l1(this.format("sighash")).substring(0,10)}format(t){if(t==null&&(t="sighash"),t==="json")return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas!=null?this.gas:void 0,inputs:this.inputs.map(i=>JSON.parse(i.format(t))),outputs:this.outputs.map(i=>JSON.parse(i.format(t)))});const n=[];return t!=="sighash"&&n.push("function"),n.push(this.name+ey(t,this.inputs)),t!=="sighash"&&(this.stateMutability!=="nonpayable"&&n.push(this.stateMutability),this.outputs&&this.outputs.length&&(n.push("returns"),n.push(ey(t,this.outputs))),this.gas!=null&&n.push(`@${this.gas.toString()}`)),n.join(" ")}static getSelector(t,n){return n=(n||[]).map(s=>us.from(s)),new hu(Xn,t,"view",n,[],null).selector}static from(t){if(hu.isFragment(t))return t;if(typeof t=="string")try{return hu.from(f0(t))}catch{Ae(!1,"invalid function fragment","obj",t)}else if(t instanceof yl){const i=nx("function",t),s=nd(t),o=BV(t);let a=[];vd(t,io(["returns"])).has("returns")&&(a=nd(t));const c=LV(t);return u1(t),new hu(Xn,i,o,s,a,c)}let n=t.stateMutability;return n==null&&(n="payable",typeof t.constant=="boolean"?(n="view",t.constant||(n="payable",typeof t.payable=="boolean"&&!t.payable&&(n="nonpayable"))):typeof t.payable=="boolean"&&!t.payable&&(n="nonpayable")),new hu(Xn,t.name,n,t.inputs?t.inputs.map(us.from):[],t.outputs?t.outputs.map(us.from):[],t.gas!=null?t.gas:null)}static isFragment(t){return t&&t[Wo]===Y$}}class Np extends ix{constructor(e,t,n){super(e,"struct",t,n),Object.defineProperty(this,Wo,{value:Q$})}format(){throw new Error("@TODO")}static from(e){if(typeof e=="string")try{return Np.from(f0(e))}catch{Ae(!1,"invalid struct fragment","obj",e)}else if(e instanceof yl){const t=nx("struct",e),n=nd(e);return u1(e),new Np(Xn,t,n)}return new Np(Xn,e.name,e.inputs?e.inputs.map(us.from):[])}static isFragment(e){return e&&e[Wo]===Q$}}const Sl=new Map;Sl.set(0,"GENERIC_PANIC");Sl.set(1,"ASSERT_FALSE");Sl.set(17,"OVERFLOW");Sl.set(18,"DIVIDE_BY_ZERO");Sl.set(33,"ENUM_RANGE_ERROR");Sl.set(34,"BAD_STORAGE_DATA");Sl.set(49,"STACK_UNDERFLOW");Sl.set(50,"ARRAY_RANGE_ERROR");Sl.set(65,"OUT_OF_MEMORY");Sl.set(81,"UNINITIALIZED_FUNCTION_CALL");const g7e=new RegExp(/^bytes([0-9]*)$/),m7e=new RegExp(/^(u?int)([0-9]*)$/);let L7=null,J$=1024;function w7e(r,e,t,n){let i="missing revert data",s=null;const o=null;let a=null;if(t){i="execution reverted";const l=Zr(t);if(t=Ft(t),l.length===0)i+=" (no data present; likely require(false) occurred",s="require(false)";else if(l.length%32!==4)i+=" (could not decode reason; invalid data length)";else if(Ft(l.slice(0,4))==="0x08c379a0")try{s=n.decode(["string"],l.slice(4))[0],a={signature:"Error(string)",name:"Error",args:[s]},i+=`: ${JSON.stringify(s)}`}catch{i+=" (could not decode reason; invalid string data)"}else if(Ft(l.slice(0,4))==="0x4e487b71")try{const h=Number(n.decode(["uint256"],l.slice(4))[0]);a={signature:"Panic(uint256)",name:"Panic",args:[h]},s=`Panic due to ${Sl.get(h)||"UNKNOWN"}(${h})`,i+=`: ${s}`}catch{i+=" (could not decode panic code)"}else i+=" (unknown custom error)"}const c={to:e.to?Gr(e.to):null,data:e.data||"0x"};return e.from&&(c.from=Gr(e.from)),jn(i,"CALL_EXCEPTION",{action:r,data:t,reason:s,transaction:c,invocation:o,revert:a})}var pf,Ng;const F8=class F8{constructor(){Le(this,pf)}getDefaultValue(e){const t=e.map(i=>rt(this,pf,Ng).call(this,us.from(i)));return new c4(t,"_").defaultValue()}encode(e,t){uz(t.length,e.length,"types/values length mismatch");const n=e.map(o=>rt(this,pf,Ng).call(this,us.from(o))),i=new c4(n,"_"),s=new ZC;return i.encode(s,t),s.data}decode(e,t,n){const i=e.map(o=>rt(this,pf,Ng).call(this,us.from(o)));return new c4(i,"_").decode(new YC(t,n,J$))}static _setDefaultMaxInflation(e){Ae(typeof e=="number"&&Number.isInteger(e),"invalid defaultMaxInflation factor","value",e),J$=e}static defaultAbiCoder(){return L7==null&&(L7=new F8),L7}static getBuiltinCallException(e,t,n){return w7e(e,t,n,F8.defaultAbiCoder())}};pf=new WeakSet,Ng=function(e){if(e.isArray())return new FAe(rt(this,pf,Ng).call(this,e.arrayChildren),e.arrayLength,e.name);if(e.isTuple())return new c4(e.components.map(n=>rt(this,pf,Ng).call(this,n)),e.name);switch(e.baseType){case"address":return new LAe(e.name);case"bool":return new jAe(e.name);case"string":return new YAe(e.name);case"bytes":return new HAe(e.name);case"":return new VAe(e.name)}let t=e.type.match(m7e);if(t){let n=parseInt(t[2]||"256");return Ae(n!==0&&n<=256&&n%8===0,"invalid "+t[1]+" bit length","param",e),new ZAe(n/8,t[1]==="int",e.name)}if(t=e.type.match(g7e),t){let n=parseInt(t[1]);return Ae(n!==0&&n<=32,"invalid bytes length","param",e),new WAe(n,e.name)}Ae(!1,"invalid type","type",e.type)};let ty=F8;class v7e{constructor(e,t,n){Oe(this,"fragment");Oe(this,"name");Oe(this,"signature");Oe(this,"topic");Oe(this,"args");const i=e.name,s=e.format();tr(this,{fragment:e,name:i,signature:s,topic:t,args:n})}}class y7e{constructor(e,t,n,i){Oe(this,"fragment");Oe(this,"name");Oe(this,"args");Oe(this,"signature");Oe(this,"selector");Oe(this,"value");const s=e.name,o=e.format();tr(this,{fragment:e,name:s,args:n,signature:o,selector:t,value:i})}}class b7e{constructor(e,t,n){Oe(this,"fragment");Oe(this,"name");Oe(this,"args");Oe(this,"signature");Oe(this,"selector");const i=e.name,s=e.format();tr(this,{fragment:e,name:i,args:n,signature:s,selector:t})}}class X${constructor(e){Oe(this,"hash");Oe(this,"_isIndexed");tr(this,{hash:e,_isIndexed:!0})}static isIndexed(e){return!!(e&&e._isIndexed)}}const eB={0:"generic panic",1:"assert(false)",17:"arithmetic overflow",18:"division or modulo by zero",33:"enum overflow",34:"invalid encoded storage byte array accessed",49:"out-of-bounds array access; popping on an empty array",50:"out-of-bounds access of an array or bytesN",65:"out of memory",81:"uninitialized function"},tB={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:r=>`reverted with reason string ${JSON.stringify(r)}`},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"],reason:r=>{let e="unknown panic code";return r>=0&&r<=255&&eB[r.toString()]&&(e=eB[r.toString()]),`reverted with panic code 0x${r.toString(16)} (${e})`}}};var Ql,Jl,Xl,Es,Tu,K4,G4;const q0=class q0{constructor(e){Le(this,Tu);Oe(this,"fragments");Oe(this,"deploy");Oe(this,"fallback");Oe(this,"receive");Le(this,Ql);Le(this,Jl);Le(this,Xl);Le(this,Es);let t=[];typeof e=="string"?t=JSON.parse(e):t=e,de(this,Xl,new Map),de(this,Ql,new Map),de(this,Jl,new Map);const n=[];for(const o of t)try{n.push(h1.from(o))}catch(a){console.log(`[Warning] Invalid Fragment ${JSON.stringify(o)}:`,a.message)}tr(this,{fragments:Object.freeze(n)});let i=null,s=!1;de(this,Es,this.getAbiCoder()),this.fragments.forEach((o,a)=>{let c;switch(o.type){case"constructor":if(this.deploy){console.log("duplicate definition - constructor");return}tr(this,{deploy:o});return;case"fallback":o.inputs.length===0?s=!0:(Ae(!i||o.payable!==i.payable,"conflicting fallback fragments",`fragments[${a}]`,o),i=o,s=i.payable);return;case"function":c=ee(this,Xl);break;case"event":c=ee(this,Jl);break;case"error":c=ee(this,Ql);break;default:return}const l=o.format();c.has(l)||c.set(l,o)}),this.deploy||tr(this,{deploy:Jh.from("constructor()")}),tr(this,{fallback:i,receive:s})}format(e){const t=e?"minimal":"full";return this.fragments.map(i=>i.format(t))}formatJson(){const e=this.fragments.map(t=>t.format("json"));return JSON.stringify(e.map(t=>JSON.parse(t)))}getAbiCoder(){return ty.defaultAbiCoder()}getFunctionName(e){const t=rt(this,Tu,K4).call(this,e,null,!1);return Ae(t,"no matching function","key",e),t.name}hasFunction(e){return!!rt(this,Tu,K4).call(this,e,null,!1)}getFunction(e,t){return rt(this,Tu,K4).call(this,e,t||null,!0)}forEachFunction(e){const t=Array.from(ee(this,Xl).keys());t.sort((n,i)=>n.localeCompare(i));for(let n=0;nn.localeCompare(i));for(let n=0;n1){const s=i.map(o=>JSON.stringify(o.format())).join(", ");Ae(!1,`ambiguous error description (i.e. ${s})`,"name",e)}return i[0]}if(e=Mo.from(e).format(),e==="Error(string)")return Mo.from("error Error(string)");if(e==="Panic(uint256)")return Mo.from("error Panic(uint256)");const n=ee(this,Ql).get(e);return n||null}forEachError(e){const t=Array.from(ee(this,Ql).keys());t.sort((n,i)=>n.localeCompare(i));for(let n=0;ns.type==="string"?l1(o):s.type==="bytes"?Ei(Ft(o)):(s.type==="bool"&&typeof o=="boolean"?o=o?"0x01":"0x00":s.type.match(/^u?int/)?o=Zf(o):s.type.match(/^bytes/)?o=F_e(o,32):s.type==="address"&&ee(this,Es).encode(["address"],[o]),a1(Ft(o),32));for(t.forEach((s,o)=>{const a=e.inputs[o];if(!a.indexed){Ae(s==null,"cannot filter non-indexed parameters; must be null","contract."+a.name,s);return}s==null?n.push(null):a.baseType==="array"||a.baseType==="tuple"?Ae(!1,"filtering with tuples or arrays not supported","contract."+a.name,s):Array.isArray(s)?n.push(s.map(c=>i(a,c))):n.push(i(a,s))});n.length&&n[n.length-1]===null;)n.pop();return n}encodeEventLog(e,t){if(typeof e=="string"){const o=this.getEvent(e);Ae(o,"unknown event","eventFragment",e),e=o}const n=[],i=[],s=[];return e.anonymous||n.push(e.topicHash),Ae(t.length===e.inputs.length,"event arguments/values mismatch","values",t),e.inputs.forEach((o,a)=>{const c=t[a];if(o.indexed)if(o.type==="string")n.push(l1(c));else if(o.type==="bytes")n.push(Ei(c));else{if(o.baseType==="tuple"||o.baseType==="array")throw new Error("not implemented");n.push(ee(this,Es).encode([o.type],[c]))}else i.push(o),s.push(c)}),{data:ee(this,Es).encode(i,s),topics:n}}decodeEventLog(e,t,n){if(typeof e=="string"){const y=this.getEvent(e);Ae(y,"unknown event","eventFragment",e),e=y}if(n!=null&&!e.anonymous){const y=e.topicHash;Ae(Tn(n[0],32)&&n[0].toLowerCase()===y,"fragment/topic mismatch","topics[0]",n[0]),n=n.slice(1)}const i=[],s=[],o=[];e.inputs.forEach((y,A)=>{y.indexed?y.type==="string"||y.type==="bytes"||y.baseType==="tuple"||y.baseType==="array"?(i.push(us.from({type:"bytes32",name:y.name})),o.push(!0)):(i.push(y),o.push(!1)):(s.push(y),o.push(!1))});const a=n!=null?ee(this,Es).decode(i,vi(n)):null,c=ee(this,Es).decode(s,t,!0),l=[],h=[];let f=0,v=0;return e.inputs.forEach((y,A)=>{let M=null;if(y.indexed)if(a==null)M=new X$(null);else if(o[A])M=new X$(a[v++]);else try{M=a[v++]}catch($){M=$}else try{M=c[f++]}catch($){M=$}l.push(M),h.push(y.name||null)}),Ow.fromItems(l,h)}parseTransaction(e){const t=Zr(e.data,"tx.data"),n=qt(e.value!=null?e.value:0,"tx.value"),i=this.getFunction(Ft(t.slice(0,4)));if(!i)return null;const s=ee(this,Es).decode(i.inputs,t.slice(4));return new y7e(i,i.selector,s,n)}parseCallResult(e){throw new Error("@TODO")}parseLog(e){const t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new v7e(t,t.topicHash,this.decodeEventLog(t,e.data,e.topics))}parseError(e){const t=Ft(e),n=this.getError(ni(t,0,4));if(!n)return null;const i=ee(this,Es).decode(n.inputs,ni(t,4));return new b7e(n,n.selector,i)}static from(e){return e instanceof q0?e:typeof e=="string"?new q0(JSON.parse(e)):typeof e.formatJson=="function"?new q0(e.formatJson()):typeof e.format=="function"?new q0(e.format("json")):new q0(e)}};Ql=new WeakMap,Jl=new WeakMap,Xl=new WeakMap,Es=new WeakMap,Tu=new WeakSet,K4=function(e,t,n){if(Tn(e)){const s=e.toLowerCase();for(const o of ee(this,Xl).values())if(s===o.selector)return o;return null}if(e.indexOf("(")===-1){const s=[];for(const[o,a]of ee(this,Xl))o.split("(")[0]===e&&s.push(a);if(t){const o=t.length>0?t[t.length-1]:null;let a=t.length,c=!0;Ps.isTyped(o)&&o.type==="overrides"&&(c=!1,a--);for(let l=s.length-1;l>=0;l--){const h=s[l].inputs.length;h!==a&&(!c||h!==a-1)&&s.splice(l,1)}for(let l=s.length-1;l>=0;l--){const h=s[l].inputs;for(let f=0;f=h.length){if(t[f].type==="overrides")continue;s.splice(l,1);break}if(t[f].type!==h[f].baseType){s.splice(l,1);break}}}}if(s.length===1&&t&&t.length!==s[0].inputs.length){const o=t[t.length-1];(o==null||Array.isArray(o)||typeof o!="object")&&s.splice(0,1)}if(s.length===0)return null;if(s.length>1&&n){const o=s.map(a=>JSON.stringify(a.format())).join(", ");Ae(!1,`ambiguous function description (i.e. matches ${o})`,"key",e)}return s[0]}const i=ee(this,Xl).get(hu.from(e).format());return i||null},G4=function(e,t,n){if(Tn(e)){const s=e.toLowerCase();for(const o of ee(this,Jl).values())if(s===o.topicHash)return o;return null}if(e.indexOf("(")===-1){const s=[];for(const[o,a]of ee(this,Jl))o.split("(")[0]===e&&s.push(a);if(t){for(let o=s.length-1;o>=0;o--)s[o].inputs.length=0;o--){const a=s[o].inputs;for(let c=0;c1&&n){const o=s.map(a=>JSON.stringify(a.format())).join(", ");Ae(!1,`ambiguous event description (i.e. matches ${o})`,"key",e)}return s[0]}const i=ee(this,Jl).get(uu.from(e).format());return i||null};let uS=q0;const UV=BigInt(0);function cm(r){return r??null}function fi(r){return r==null?null:r.toString()}class rB{constructor(e,t,n){Oe(this,"gasPrice");Oe(this,"maxFeePerGas");Oe(this,"maxPriorityFeePerGas");tr(this,{gasPrice:cm(e),maxFeePerGas:cm(t),maxPriorityFeePerGas:cm(n)})}toJSON(){const{gasPrice:e,maxFeePerGas:t,maxPriorityFeePerGas:n}=this;return{_type:"FeeData",gasPrice:fi(e),maxFeePerGas:fi(t),maxPriorityFeePerGas:fi(n)}}}function R8(r){const e={};r.to&&(e.to=r.to),r.from&&(e.from=r.from),r.data&&(e.data=Ft(r.data));const t="chainId,gasLimit,gasPrice,maxFeePerBlobGas,maxFeePerGas,maxPriorityFeePerGas,value".split(/,/);for(const i of t)!(i in r)||r[i]==null||(e[i]=qt(r[i],`request.${i}`));const n="type,nonce".split(/,/);for(const i of n)!(i in r)||r[i]==null||(e[i]=Sr(r[i],`request.${i}`));return r.accessList&&(e.accessList=D1(r.accessList)),"blockTag"in r&&(e.blockTag=r.blockTag),"enableCcipRead"in r&&(e.enableCcipRead=!!r.enableCcipRead),"customData"in r&&(e.customData=r.customData),"blobVersionedHashes"in r&&r.blobVersionedHashes&&(e.blobVersionedHashes=r.blobVersionedHashes.slice()),"kzg"in r&&(e.kzg=r.kzg),"blobs"in r&&r.blobs&&(e.blobs=r.blobs.map(i=>CT(i)?Ft(i):Object.assign({},i))),e}var Uh;class _7e{constructor(e,t){Oe(this,"provider");Oe(this,"number");Oe(this,"hash");Oe(this,"timestamp");Oe(this,"parentHash");Oe(this,"parentBeaconBlockRoot");Oe(this,"nonce");Oe(this,"difficulty");Oe(this,"gasLimit");Oe(this,"gasUsed");Oe(this,"stateRoot");Oe(this,"receiptsRoot");Oe(this,"blobGasUsed");Oe(this,"excessBlobGas");Oe(this,"miner");Oe(this,"prevRandao");Oe(this,"extraData");Oe(this,"baseFeePerGas");Le(this,Uh);de(this,Uh,e.transactions.map(n=>typeof n!="string"?new ry(n,t):n)),tr(this,{provider:t,hash:cm(e.hash),number:e.number,timestamp:e.timestamp,parentHash:e.parentHash,parentBeaconBlockRoot:e.parentBeaconBlockRoot,nonce:e.nonce,difficulty:e.difficulty,gasLimit:e.gasLimit,gasUsed:e.gasUsed,blobGasUsed:e.blobGasUsed,excessBlobGas:e.excessBlobGas,miner:e.miner,prevRandao:cm(e.prevRandao),extraData:e.extraData,baseFeePerGas:cm(e.baseFeePerGas),stateRoot:e.stateRoot,receiptsRoot:e.receiptsRoot})}get transactions(){return ee(this,Uh).map(e=>typeof e=="string"?e:e.hash)}get prefetchedTransactions(){const e=ee(this,Uh).slice();return e.length===0?[]:(Ze(typeof e[0]=="object","transactions were not prefetched with block request","UNSUPPORTED_OPERATION",{operation:"transactionResponses()"}),e)}toJSON(){const{baseFeePerGas:e,difficulty:t,extraData:n,gasLimit:i,gasUsed:s,hash:o,miner:a,prevRandao:c,nonce:l,number:h,parentHash:f,parentBeaconBlockRoot:v,stateRoot:y,receiptsRoot:A,timestamp:M,transactions:$}=this;return{_type:"Block",baseFeePerGas:fi(e),difficulty:fi(t),extraData:n,gasLimit:fi(i),gasUsed:fi(s),blobGasUsed:fi(this.blobGasUsed),excessBlobGas:fi(this.excessBlobGas),hash:o,miner:a,prevRandao:c,nonce:l,number:h,parentHash:f,timestamp:M,parentBeaconBlockRoot:v,stateRoot:y,receiptsRoot:A,transactions:$}}[Symbol.iterator](){let e=0;const t=this.transactions;return{next:()=>enew hb(i,t))));let n=UV;e.effectiveGasPrice!=null?n=e.effectiveGasPrice:e.gasPrice!=null&&(n=e.gasPrice),tr(this,{provider:t,to:e.to,from:e.from,contractAddress:e.contractAddress,hash:e.hash,index:e.index,blockHash:e.blockHash,blockNumber:e.blockNumber,logsBloom:e.logsBloom,gasUsed:e.gasUsed,cumulativeGasUsed:e.cumulativeGasUsed,blobGasUsed:e.blobGasUsed,gasPrice:n,blobGasPrice:e.blobGasPrice,type:e.type,status:e.status,root:e.root})}get logs(){return ee(this,hy)}toJSON(){const{to:e,from:t,contractAddress:n,hash:i,index:s,blockHash:o,blockNumber:a,logsBloom:c,logs:l,status:h,root:f}=this;return{_type:"TransactionReceipt",blockHash:o,blockNumber:a,contractAddress:n,cumulativeGasUsed:fi(this.cumulativeGasUsed),from:t,gasPrice:fi(this.gasPrice),blobGasUsed:fi(this.blobGasUsed),blobGasPrice:fi(this.blobGasPrice),gasUsed:fi(this.gasUsed),hash:i,index:s,logs:l,logsBloom:c,root:f,status:h,to:e}}get length(){return this.logs.length}[Symbol.iterator](){let e=0;return{next:()=>e{if(a)return null;const{blockNumber:v,nonce:y}=await Ks({blockNumber:this.provider.getBlockNumber(),nonce:this.provider.getTransactionCount(this.from)});if(y{if(v==null||v.status!==0)return v;Ze(!1,"transaction execution reverted","CALL_EXCEPTION",{action:"sendTransaction",data:null,reason:null,invocation:null,revert:null,transaction:{to:v.to,from:v.from,data:""},receipt:v})},h=await this.provider.getTransactionReceipt(this.hash);if(n===0)return l(h);if(h){if(await h.confirmations()>=n)return l(h)}else if(await c(),n===0)return null;return await new Promise((v,y)=>{const A=[],M=()=>{A.forEach(L=>L())};if(A.push(()=>{a=!0}),i>0){const L=setTimeout(()=>{M(),y(jn("wait for transaction timeout","TIMEOUT"))},i);A.push(()=>{clearTimeout(L)})}const $=async L=>{if(await L.confirmations()>=n){M();try{v(l(L))}catch(P){y(P)}}};if(A.push(()=>{this.provider.off(this.hash,$)}),this.provider.on(this.hash,$),s>=0){const L=async()=>{try{await c()}catch(P){if(ks(P,"TRANSACTION_REPLACED")){M(),y(P);return}}a||this.provider.once("block",L)};A.push(()=>{this.provider.off("block",L)}),this.provider.once("block",L)}})}isMined(){return this.blockHash!=null}isLegacy(){return this.type===0}isBerlin(){return this.type===1}isLondon(){return this.type===2}isCancun(){return this.type===3}removedEvent(){return Ze(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),HV(this)}reorderedEvent(e){return Ze(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),Ze(!e||e.isMined(),"unmined 'other' transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),jV(this,e)}replaceableTransaction(e){Ae(Number.isInteger(e)&&e>=0,"invalid startBlock","startBlock",e);const t=new cR(this,this.provider);return de(t,gf,e),t}};gf=new WeakMap;let ry=cR;function x7e(r){return{orphan:"drop-block",hash:r.hash,number:r.number}}function jV(r,e){return{orphan:"reorder-transaction",tx:r,other:e}}function HV(r){return{orphan:"drop-transaction",tx:r}}function A7e(r){return{orphan:"drop-log",log:{transactionHash:r.transactionHash,blockHash:r.blockHash,blockNumber:r.blockNumber,address:r.address,data:r.data,topics:Object.freeze(r.topics.slice()),index:r.index}}}class FT extends hb{constructor(t,n,i){super(t,t.provider);Oe(this,"interface");Oe(this,"fragment");Oe(this,"args");const s=n.decodeEventLog(i,t.data,t.topics);tr(this,{args:s,fragment:i,interface:n})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}class WV extends hb{constructor(t,n){super(t,t.provider);Oe(this,"error");tr(this,{error:n})}}var Bm;class E7e extends FV{constructor(t,n,i){super(i,n);Le(this,Bm);de(this,Bm,t)}get logs(){return super.logs.map(t=>{const n=t.topics.length?ee(this,Bm).getEvent(t.topics[0]):null;if(n)try{return new FT(t,ee(this,Bm),n)}catch(i){return new WV(t,i)}return t})}}Bm=new WeakMap;var dy;class jT extends ry{constructor(t,n,i){super(i,n);Le(this,dy);de(this,dy,t)}async wait(t,n){const i=await super.wait(t,n);return i==null?null:new E7e(ee(this,dy),this.provider,i)}}dy=new WeakMap;class zV extends pz{constructor(t,n,i,s){super(t,n,i);Oe(this,"log");tr(this,{log:s})}async getBlock(){return await this.log.getBlock()}async getTransaction(){return await this.log.getTransaction()}async getTransactionReceipt(){return await this.log.getTransactionReceipt()}}class C7e extends zV{constructor(e,t,n,i,s){super(e,t,n,new FT(s,e.interface,i));const o=e.interface.decodeEventLog(i,this.log.data,this.log.topics);tr(this,{args:o,fragment:i})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}const nB=BigInt(0);function VV(r){return r&&typeof r.call=="function"}function qV(r){return r&&typeof r.estimateGas=="function"}function sx(r){return r&&typeof r.resolveName=="function"}function KV(r){return r&&typeof r.sendTransaction=="function"}function GV(r){if(r!=null){if(sx(r))return r;if(r.provider)return r.provider}}var fy;class S7e{constructor(e,t,n){Le(this,fy);Oe(this,"fragment");if(tr(this,{fragment:t}),t.inputs.lengthn[c]==null?null:a.walkAsync(n[c],(h,f)=>h==="address"?Array.isArray(f)?Promise.all(f.map(v=>no(v,s))):no(f,s):f)));return e.interface.encodeFilterTopics(t,o)}())}getTopicFilter(){return ee(this,fy)}}fy=new WeakMap;function d1(r,e){return r==null?null:typeof r[e]=="function"?r:r.provider&&typeof r.provider[e]=="function"?r.provider:null}function rp(r){return r==null?null:r.provider||null}async function ZV(r,e){const t=Ps.dereference(r,"overrides");Ae(typeof t=="object","invalid overrides parameter","overrides",r);const n=R8(t);return Ae(n.to==null||(e||[]).indexOf("to")>=0,"cannot override to","overrides.to",n.to),Ae(n.data==null||(e||[]).indexOf("data")>=0,"cannot override data","overrides.data",n.data),n.from&&(n.from=n.from),n}async function I7e(r,e,t){const n=d1(r,"resolveName"),i=sx(n)?n:null;return await Promise.all(e.map((s,o)=>s.walkAsync(t[o],(a,c)=>(c=Ps.dereference(c,a),a==="address"?no(c,i):c))))}function T7e(r){const e=async function(o){const a=await ZV(o,["data"]);a.to=await r.getAddress(),a.from&&(a.from=await no(a.from,GV(r.runner)));const c=r.interface,l=qt(a.value||nB,"overrides.value")===nB,h=(a.data||"0x")==="0x";c.fallback&&!c.fallback.payable&&c.receive&&!h&&!l&&Ae(!1,"cannot send data to receive or send value to non-payable fallback","overrides",o),Ae(c.fallback||h,"cannot send data to receive-only contract","overrides.data",a.data);const f=c.receive||c.fallback&&c.fallback.payable;return Ae(f||l,"cannot send value to non-payable fallback","overrides.value",a.value),Ae(c.fallback||h,"cannot send data to receive-only contract","overrides.data",a.data),a},t=async function(o){const a=d1(r.runner,"call");Ze(VV(a),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const c=await e(o);try{return await a.call(c)}catch(l){throw ET(l)&&l.data?r.interface.makeError(l.data,c):l}},n=async function(o){const a=r.runner;Ze(KV(a),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const c=await a.sendTransaction(await e(o)),l=rp(r.runner);return new jT(r.interface,l,c)},i=async function(o){const a=d1(r.runner,"estimateGas");return Ze(qV(a),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await a.estimateGas(await e(o))},s=async o=>await n(o);return tr(s,{_contract:r,estimateGas:i,populateTransaction:e,send:n,staticCall:t}),s}function R7e(r,e){const t=function(...l){const h=r.interface.getFunction(e,l);return Ze(h,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e,args:l}}),h},n=async function(...l){const h=t(...l);let f={};if(h.inputs.length+1===l.length&&(f=await ZV(l.pop()),f.from&&(f.from=await no(f.from,GV(r.runner)))),h.inputs.length!==l.length)throw new Error("internal error: fragment inputs doesn't match arguments; should not happen");const v=await I7e(r.runner,h.inputs,l);return Object.assign({},f,await Ks({to:r.getAddress(),data:r.interface.encodeFunctionData(h,v)}))},i=async function(...l){const h=await a(...l);return h.length===1?h[0]:h},s=async function(...l){const h=r.runner;Ze(KV(h),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const f=await h.sendTransaction(await n(...l)),v=rp(r.runner);return new jT(r.interface,v,f)},o=async function(...l){const h=d1(r.runner,"estimateGas");return Ze(qV(h),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await h.estimateGas(await n(...l))},a=async function(...l){const h=d1(r.runner,"call");Ze(VV(h),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const f=await n(...l);let v="0x";try{v=await h.call(f)}catch(A){throw ET(A)&&A.data?r.interface.makeError(A.data,f):A}const y=t(...l);return r.interface.decodeFunctionResult(y,v)},c=async(...l)=>t(...l).constant?await i(...l):await s(...l);return tr(c,{name:r.interface.getFunctionName(e),_contract:r,_key:e,getFragment:t,estimateGas:o,populateTransaction:n,send:s,staticCall:i,staticCallResult:a}),Object.defineProperty(c,"fragment",{configurable:!1,enumerable:!0,get:()=>{const l=r.interface.getFunction(e);return Ze(l,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e}}),l}}),c}function k7e(r,e){const t=function(...i){const s=r.interface.getEvent(e,i);return Ze(s,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e,args:i}}),s},n=function(...i){return new S7e(r,t(...i),i)};return tr(n,{name:r.interface.getEventName(e),_contract:r,_key:e,getFragment:t}),Object.defineProperty(n,"fragment",{configurable:!1,enumerable:!0,get:()=>{const i=r.interface.getEvent(e);return Ze(i,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e}}),i}}),n}const k8=Symbol.for("_ethersInternal_contract"),YV=new WeakMap;function N7e(r,e){YV.set(r[k8],e)}function ea(r){return YV.get(r[k8])}function P7e(r){return r&&typeof r=="object"&&"getTopicFilter"in r&&typeof r.getTopicFilter=="function"&&r.fragment}async function HT(r,e){let t,n=null;if(Array.isArray(e)){const s=function(o){if(Tn(o,32))return o;const a=r.interface.getEvent(o);return Ae(a,"unknown fragment","name",o),a.topicHash};t=e.map(o=>o==null?null:Array.isArray(o)?o.map(s):s(o))}else e==="*"?t=[null]:typeof e=="string"?Tn(e,32)?t=[e]:(n=r.interface.getEvent(e),Ae(n,"unknown fragment","event",e),t=[n.topicHash]):P7e(e)?t=await e.getTopicFilter():"fragment"in e?(n=e.fragment,t=[n.topicHash]):Ae(!1,"unknown event name","event",e);t=t.map(s=>{if(s==null)return null;if(Array.isArray(s)){const o=Array.from(new Set(s.map(a=>a.toLowerCase())).values());return o.length===1?o[0]:(o.sort(),o)}return s.toLowerCase()});const i=t.map(s=>s==null?"null":Array.isArray(s)?s.join("|"):s).join("&");return{fragment:n,tag:i,topics:t}}async function f3(r,e){const{subs:t}=ea(r);return t.get((await HT(r,e)).tag)||null}async function iB(r,e,t){const n=rp(r.runner);Ze(n,"contract runner does not support subscribing","UNSUPPORTED_OPERATION",{operation:e});const{fragment:i,tag:s,topics:o}=await HT(r,t),{addr:a,subs:c}=ea(r);let l=c.get(s);if(!l){const f={address:a||r,topics:o},v=$=>{let L=i;if(L==null)try{L=r.interface.getEvent($.topics[0])}catch{}if(L){const P=L,H=i?r.interface.decodeEventLog(i,$.data,$.topics):[];dS(r,t,H,F=>new C7e(r,F,t,P,$))}else dS(r,t,[],P=>new zV(r,P,t,$))};let y=[];l={tag:s,listeners:[],start:()=>{y.length||y.push(n.on(f,v))},stop:async()=>{if(y.length==0)return;let $=y;y=[],await Promise.all($),n.off(f,v)}},c.set(s,l)}return l}let hS=Promise.resolve();async function O7e(r,e,t,n){await hS;const i=await f3(r,e);if(!i)return!1;const s=i.listeners.length;return i.listeners=i.listeners.filter(({listener:o,once:a})=>{const c=Array.from(t);n&&c.push(n(a?null:o));try{o.call(r,...c)}catch{}return!a}),i.listeners.length===0&&(i.stop(),ea(r).subs.delete(i.tag)),s>0}async function dS(r,e,t,n){try{await hS}catch{}const i=O7e(r,e,t,n);return hS=i,await i}const u4=["then"];var vL;vL=k8;const W3=class W3{constructor(e,t,n,i){Oe(this,"target");Oe(this,"interface");Oe(this,"runner");Oe(this,"filters");Oe(this,vL);Oe(this,"fallback");Ae(typeof e=="string"||rV(e),"invalid value for Contract target","target",e),n==null&&(n=null);const s=uS.from(t);tr(this,{target:e,runner:n,interface:s}),Object.defineProperty(this,k8,{value:{}});let o,a=null,c=null;if(i){const f=rp(n);c=new jT(this.interface,f,i)}let l=new Map;if(typeof e=="string")if(Tn(e))a=e,o=Promise.resolve(e);else{const f=d1(n,"resolveName");if(!sx(f))throw jn("contract runner does not support name resolution","UNSUPPORTED_OPERATION",{operation:"resolveName"});o=f.resolveName(e).then(v=>{if(v==null)throw jn("an ENS name used for a contract target must be correctly configured","UNCONFIGURED_NAME",{value:e});return ea(this).addr=v,v})}else o=e.getAddress().then(f=>{if(f==null)throw new Error("TODO");return ea(this).addr=f,f});N7e(this,{addrPromise:o,addr:a,deployTx:c,subs:l});const h=new Proxy({},{get:(f,v,y)=>{if(typeof v=="symbol"||u4.indexOf(v)>=0)return Reflect.get(f,v,y);try{return this.getEvent(v)}catch(A){if(!ks(A,"INVALID_ARGUMENT")||A.argument!=="key")throw A}},has:(f,v)=>u4.indexOf(v)>=0?Reflect.has(f,v):Reflect.has(f,v)||this.interface.hasEvent(String(v))});return tr(this,{filters:h}),tr(this,{fallback:s.receive||s.fallback?T7e(this):null}),new Proxy(this,{get:(f,v,y)=>{if(typeof v=="symbol"||v in f||u4.indexOf(v)>=0)return Reflect.get(f,v,y);try{return f.getFunction(v)}catch(A){if(!ks(A,"INVALID_ARGUMENT")||A.argument!=="key")throw A}},has:(f,v)=>typeof v=="symbol"||v in f||u4.indexOf(v)>=0?Reflect.has(f,v):f.interface.hasFunction(v)})}connect(e){return new W3(this.target,this.interface,e)}attach(e){return new W3(e,this.interface,this.runner)}async getAddress(){return await ea(this).addrPromise}async getDeployedCode(){const e=rp(this.runner);Ze(e,"runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"getDeployedCode"});const t=await e.getCode(await this.getAddress());return t==="0x"?null:t}async waitForDeployment(){const e=this.deploymentTransaction();if(e)return await e.wait(),this;if(await this.getDeployedCode()!=null)return this;const n=rp(this.runner);return Ze(n!=null,"contract runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"waitForDeployment"}),new Promise((i,s)=>{const o=async()=>{try{if(await this.getDeployedCode()!=null)return i(this);n.once("block",o)}catch(a){s(a)}};o()})}deploymentTransaction(){return ea(this).deployTx}getFunction(e){return typeof e!="string"&&(e=e.format()),R7e(this,e)}getEvent(e){return typeof e!="string"&&(e=e.format()),k7e(this,e)}async queryTransaction(e){throw new Error("@TODO")}async queryFilter(e,t,n){t==null&&(t=0),n==null&&(n="latest");const{addr:i,addrPromise:s}=ea(this),o=i||await s,{fragment:a,topics:c}=await HT(this,e),l={address:o,topics:c,fromBlock:t,toBlock:n},h=rp(this.runner);return Ze(h,"contract runner does not have a provider","UNSUPPORTED_OPERATION",{operation:"queryFilter"}),(await h.getLogs(l)).map(f=>{let v=a;if(v==null)try{v=this.interface.getEvent(f.topics[0])}catch{}if(v)try{return new FT(f,this.interface,v)}catch(y){return new WV(f,y)}return new hb(f,h)})}async on(e,t){const n=await iB(this,"on",e);return n.listeners.push({listener:t,once:!1}),n.start(),this}async once(e,t){const n=await iB(this,"once",e);return n.listeners.push({listener:t,once:!0}),n.start(),this}async emit(e,...t){return await dS(this,e,t,null)}async listenerCount(e){if(e){const i=await f3(this,e);return i?i.listeners.length:0}const{subs:t}=ea(this);let n=0;for(const{listeners:i}of t.values())n+=i.length;return n}async listeners(e){if(e){const i=await f3(this,e);return i?i.listeners.map(({listener:s})=>s):[]}const{subs:t}=ea(this);let n=[];for(const{listeners:i}of t.values())n=n.concat(i.map(({listener:s})=>s));return n}async off(e,t){const n=await f3(this,e);if(!n)return this;if(t){const i=n.listeners.map(({listener:s})=>s).indexOf(t);i>=0&&n.listeners.splice(i,1)}return(t==null||n.listeners.length===0)&&(n.stop(),ea(this).subs.delete(n.tag)),this}async removeAllListeners(e){if(e){const t=await f3(this,e);if(!t)return this;t.stop(),ea(this).subs.delete(t.tag)}else{const{subs:t}=ea(this);for(const{tag:n,stop:i}of t.values())i(),t.delete(n)}return this}async addListener(e,t){return await this.on(e,t)}async removeListener(e,t){return await this.off(e,t)}static buildClass(e){class t extends W3{constructor(i,s=null){super(i,e,s)}}return t}static from(e,t,n){return n==null&&(n=null),new this(e,t,n)}};let fS=W3;function M7e(){return fS}class lm extends M7e(){}function U7(r){return r.match(/^ipfs:\/\/ipfs\//i)?r=r.substring(12):r.match(/^ipfs:\/\//i)?r=r.substring(7):Ae(!1,"unsupported IPFS format","link",r),`https://gateway.ipfs.io/ipfs/${r}`}class D7e{constructor(e){Oe(this,"name");tr(this,{name:e})}connect(e){return this}supportsCoinType(e){return!1}async encodeAddress(e,t){throw new Error("unsupported coin")}async decodeAddress(e,t){throw new Error("unsupported coin")}}const QV=new RegExp("^(ipfs)://(.*)$","i"),sB=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),QV,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];var mf,gp,wf,Pg,j8,JV;const Fg=class Fg{constructor(e,t,n){Le(this,wf);Oe(this,"provider");Oe(this,"address");Oe(this,"name");Le(this,mf);Le(this,gp);tr(this,{provider:e,address:t,name:n}),de(this,mf,null),de(this,gp,new lm(t,["function supportsInterface(bytes4) view returns (bool)","function resolve(bytes, bytes) view returns (bytes)","function addr(bytes32) view returns (address)","function addr(bytes32, uint) view returns (bytes)","function text(bytes32, string) view returns (string)","function contenthash(bytes32) view returns (bytes)"],e))}async supportsWildcard(){return ee(this,mf)==null&&de(this,mf,(async()=>{try{return await ee(this,gp).supportsInterface("0x9061b923")}catch(e){if(ks(e,"CALL_EXCEPTION"))return!1;throw de(this,mf,null),e}})()),await ee(this,mf)}async getAddress(e){if(e==null&&(e=60),e===60)try{const s=await rt(this,wf,Pg).call(this,"addr(bytes32)");return s==null||s===Gv?null:s}catch(s){if(ks(s,"CALL_EXCEPTION"))return null;throw s}if(e>=0&&e<2147483648){let s=e+2147483648;const o=await rt(this,wf,Pg).call(this,"addr(bytes32,uint)",[s]);if(Tn(o,20))return Gr(o)}let t=null;for(const s of this.provider.plugins)if(s instanceof D7e&&s.supportsCoinType(e)){t=s;break}if(t==null)return null;const n=await rt(this,wf,Pg).call(this,"addr(bytes32,uint)",[e]);if(n==null||n==="0x")return null;const i=await t.decodeAddress(e,n);if(i!=null)return i;Ze(!1,"invalid coin data","UNSUPPORTED_OPERATION",{operation:`getAddress(${e})`,info:{coinType:e,data:n}})}async getText(e){const t=await rt(this,wf,Pg).call(this,"text(bytes32,string)",[e]);return t==null||t==="0x"?null:t}async getContentHash(){const e=await rt(this,wf,Pg).call(this,"contenthash(bytes32)");if(e==null||e==="0x")return null;const t=e.match(/^0x(e3010170|e5010172)(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(t){const i=t[1]==="e3010170"?"ipfs":"ipns",s=parseInt(t[4],16);if(t[5].length===s*2)return`${i}://${H_e("0x"+t[2])}`}const n=e.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(n&&n[1].length===64)return`bzz://${n[1]}`;Ze(!1,"invalid or unsupported content hash data","UNSUPPORTED_OPERATION",{operation:"getContentHash()",info:{data:e}})}async getAvatar(){return(await this._getAvatar()).url}async _getAvatar(){const e=[{type:"name",value:this.name}];try{const t=await this.getText("avatar");if(t==null)return e.push({type:"!avatar",value:""}),{url:null,linkage:e};e.push({type:"avatar",value:t});for(let n=0;n{if(e&&t==null)return null;if(!Array.isArray(t))throw new Error("not an array");return t.map(n=>r(n))}}function db(r,e){return t=>{const n={};for(const i in r){let s=i;if(e&&i in e&&!(s in t)){for(const o of e[i])if(o in t){s=o;break}}try{const o=r[i](t[s]);o!==void 0&&(n[i]=o)}catch(o){const a=o instanceof Error?o.message:"not-an-error";Ze(!1,`invalid value for value.${i} (${a})`,"BAD_DATA",{value:t})}}return n}}function $7e(r){switch(r){case!0:case"true":return!0;case!1:case"false":return!1}Ae(!1,`invalid boolean; ${JSON.stringify(r)}`,"value",r)}function Fw(r){return Ae(Tn(r,!0),"invalid data","value",r),r}function cs(r){return Ae(Tn(r,32),"invalid hash","value",r),r}const B7e=db({address:Gr,blockHash:cs,blockNumber:Sr,data:Fw,index:Sr,removed:Kr($7e,!1),topics:ox(cs),transactionHash:cs,transactionIndex:Sr},{index:["logIndex"]});function L7e(r){return B7e(r)}const U7e=db({hash:Kr(cs),parentHash:cs,parentBeaconBlockRoot:Kr(cs,null),number:Sr,timestamp:Sr,nonce:Kr(Fw),difficulty:qt,gasLimit:qt,gasUsed:qt,stateRoot:Kr(cs,null),receiptsRoot:Kr(cs,null),blobGasUsed:Kr(qt,null),excessBlobGas:Kr(qt,null),miner:Kr(Gr),prevRandao:Kr(cs,null),extraData:Fw,baseFeePerGas:Kr(qt)},{prevRandao:["mixHash"]});function F7e(r){const e=U7e(r);return e.transactions=r.transactions.map(t=>typeof t=="string"?t:XV(t)),e}const j7e=db({transactionIndex:Sr,blockNumber:Sr,transactionHash:cs,address:Gr,topics:ox(cs),data:Fw,index:Sr,blockHash:cs},{index:["logIndex"]});function H7e(r){return j7e(r)}const W7e=db({to:Kr(Gr,null),from:Kr(Gr,null),contractAddress:Kr(Gr,null),index:Sr,root:Kr(Ft),gasUsed:qt,blobGasUsed:Kr(qt,null),logsBloom:Kr(Fw),blockHash:cs,hash:cs,logs:ox(H7e),blockNumber:Sr,cumulativeGasUsed:qt,effectiveGasPrice:Kr(qt),blobGasPrice:Kr(qt,null),status:Kr(Sr),type:Kr(Sr,0)},{effectiveGasPrice:["gasPrice"],hash:["transactionHash"],index:["transactionIndex"]});function z7e(r){return W7e(r)}function XV(r){r.to&&qt(r.to)===oB&&(r.to="0x0000000000000000000000000000000000000000");const e=db({hash:cs,index:Kr(Sr,void 0),type:t=>t==="0x"||t==null?0:Sr(t),accessList:Kr(D1,null),blobVersionedHashes:Kr(ox(cs,!0),null),blockHash:Kr(cs,null),blockNumber:Kr(Sr,null),transactionIndex:Kr(Sr,null),from:Gr,gasPrice:Kr(qt),maxPriorityFeePerGas:Kr(qt),maxFeePerGas:Kr(qt),maxFeePerBlobGas:Kr(qt,null),gasLimit:qt,to:Kr(Gr,null),value:qt,nonce:Sr,data:Fw,creates:Kr(Gr,null),chainId:Kr(qt,null)},{data:["input"],gasLimit:["gas"],index:["transactionIndex"]})(r);if(e.to==null&&e.creates==null&&(e.creates=BAe(e)),(r.type===1||r.type===2)&&r.accessList==null&&(e.accessList=[]),r.signature?e.signature=vl.from(r.signature):e.signature=vl.from(r),e.chainId==null){const t=e.signature.legacyChainId;t!=null&&(e.chainId=t)}return e.blockHash&&qt(e.blockHash)===oB&&(e.blockHash=null),e}const V7e="0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e";class fb{constructor(e){Oe(this,"name");tr(this,{name:e})}clone(){return new fb(this.name)}}class ax extends fb{constructor(t,n){t==null&&(t=0);super(`org.ethers.network.plugins.GasCost#${t||0}`);Oe(this,"effectiveBlock");Oe(this,"txBase");Oe(this,"txCreate");Oe(this,"txDataZero");Oe(this,"txDataNonzero");Oe(this,"txAccessListStorageKey");Oe(this,"txAccessListAddress");const i={effectiveBlock:t};function s(o,a){let c=(n||{})[o];c==null&&(c=a),Ae(typeof c=="number",`invalud value for ${o}`,"costs",n),i[o]=c}s("txBase",21e3),s("txCreate",32e3),s("txDataZero",4),s("txDataNonzero",16),s("txAccessListStorageKey",1900),s("txAccessListAddress",2400),tr(this,i)}clone(){return new ax(this.effectiveBlock,this)}}class cx extends fb{constructor(t,n){super("org.ethers.plugins.network.Ens");Oe(this,"address");Oe(this,"targetNetwork");tr(this,{address:t||V7e,targetNetwork:n??1})}clone(){return new cx(this.address,this.targetNetwork)}}var py,gy;class q7e extends fb{constructor(t,n){super("org.ethers.plugins.network.FetchUrlFeeDataPlugin");Le(this,py);Le(this,gy);de(this,py,t),de(this,gy,n)}get url(){return ee(this,py)}get processFunc(){return ee(this,gy)}clone(){return this}}py=new WeakMap,gy=new WeakMap;const F7=new Map;var Lm,Um,vf;const jg=class jg{constructor(e,t){Le(this,Lm);Le(this,Um);Le(this,vf);de(this,Lm,e),de(this,Um,qt(t)),de(this,vf,new Map)}toJSON(){return{name:this.name,chainId:String(this.chainId)}}get name(){return ee(this,Lm)}set name(e){de(this,Lm,e)}get chainId(){return ee(this,Um)}set chainId(e){de(this,Um,qt(e,"chainId"))}matches(e){if(e==null)return!1;if(typeof e=="string"){try{return this.chainId===qt(e)}catch{}return this.name===e}if(typeof e=="number"||typeof e=="bigint"){try{return this.chainId===qt(e)}catch{}return!1}if(typeof e=="object"){if(e.chainId!=null){try{return this.chainId===qt(e.chainId)}catch{}return!1}return e.name!=null?this.name===e.name:!1}return!1}get plugins(){return Array.from(ee(this,vf).values())}attachPlugin(e){if(ee(this,vf).get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return ee(this,vf).set(e.name,e.clone()),this}getPlugin(e){return ee(this,vf).get(e)||null}getPlugins(e){return this.plugins.filter(t=>t.name.split("#")[0]===e)}clone(){const e=new jg(this.name,this.chainId);return this.plugins.forEach(t=>{e.attachPlugin(t.clone())}),e}computeIntrinsicGas(e){const t=this.getPlugin("org.ethers.plugins.network.GasCost")||new ax;let n=t.txBase;if(e.to==null&&(n+=t.txCreate),e.data)for(let i=2;i9){let i=BigInt(n[1].substring(0,9));n[1].substring(9).match(/^0+$/)||i++,n[1]=i.toString()}return BigInt(n[0]+n[1])}function cB(r){return new q7e(r,async(e,t,n)=>{n.setHeader("User-Agent","ethers");let i;try{const[s,o]=await Promise.all([n.send(),e()]);i=s;const a=i.bodyJson.standard;return{gasPrice:o.gasPrice,maxFeePerGas:aB(a.maxFee,9),maxPriorityFeePerGas:aB(a.maxPriorityFee,9)}}catch(s){Ze(!1,`error encountered with polygon gas station (${JSON.stringify(n.url)})`,"SERVER_ERROR",{request:n,response:i,error:s})}})}let lB=!1;function K7e(){if(lB)return;lB=!0;function r(e,t,n){const i=function(){const s=new il(e,t);return n.ensNetwork!=null&&s.attachPlugin(new cx(null,n.ensNetwork)),s.attachPlugin(new ax),(n.plugins||[]).forEach(o=>{s.attachPlugin(o)}),s};il.register(e,i),il.register(t,i),n.altNames&&n.altNames.forEach(s=>{il.register(s,i)})}r("mainnet",1,{ensNetwork:1,altNames:["homestead"]}),r("ropsten",3,{ensNetwork:3}),r("rinkeby",4,{ensNetwork:4}),r("goerli",5,{ensNetwork:5}),r("kovan",42,{ensNetwork:42}),r("sepolia",11155111,{ensNetwork:11155111}),r("holesky",17e3,{ensNetwork:17e3}),r("classic",61,{}),r("classicKotti",6,{}),r("arbitrum",42161,{ensNetwork:1}),r("arbitrum-goerli",421613,{}),r("arbitrum-sepolia",421614,{}),r("base",8453,{ensNetwork:1}),r("base-goerli",84531,{}),r("base-sepolia",84532,{}),r("bnb",56,{ensNetwork:1}),r("bnbt",97,{}),r("linea",59144,{ensNetwork:1}),r("linea-goerli",59140,{}),r("linea-sepolia",59141,{}),r("matic",137,{ensNetwork:1,plugins:[cB("https://gasstation.polygon.technology/v2")]}),r("matic-amoy",80002,{}),r("matic-mumbai",80001,{altNames:["maticMumbai","maticmum"],plugins:[cB("https://gasstation-testnet.polygon.technology/v2")]}),r("optimism",10,{ensNetwork:1,plugins:[]}),r("optimism-goerli",420,{}),r("optimism-sepolia",11155420,{}),r("xdai",100,{ensNetwork:1})}function pS(r){return JSON.parse(JSON.stringify(r))}var Fh,ec,yf,eu,Fm,Z4;class G7e{constructor(e){Le(this,Fm);Le(this,Fh);Le(this,ec);Le(this,yf);Le(this,eu);de(this,Fh,e),de(this,ec,null),de(this,yf,4e3),de(this,eu,-2)}get pollingInterval(){return ee(this,yf)}set pollingInterval(e){de(this,yf,e)}start(){ee(this,ec)||(de(this,ec,ee(this,Fh)._setTimeout(rt(this,Fm,Z4).bind(this),ee(this,yf))),rt(this,Fm,Z4).call(this))}stop(){ee(this,ec)&&(ee(this,Fh)._clearTimeout(ee(this,ec)),de(this,ec,null))}pause(e){this.stop(),e&&de(this,eu,-2)}resume(){this.start()}}Fh=new WeakMap,ec=new WeakMap,yf=new WeakMap,eu=new WeakMap,Fm=new WeakSet,Z4=async function(){try{const e=await ee(this,Fh).getBlockNumber();if(ee(this,eu)===-2){de(this,eu,e);return}if(e!==ee(this,eu)){for(let t=ee(this,eu)+1;t<=e;t++){if(ee(this,ec)==null)return;await ee(this,Fh).emit("block",t)}de(this,eu,e)}}catch{}ee(this,ec)!=null&&de(this,ec,ee(this,Fh)._setTimeout(rt(this,Fm,Z4).bind(this),ee(this,yf)))};var mp,wp,bf;class WT{constructor(e){Le(this,mp);Le(this,wp);Le(this,bf);de(this,mp,e),de(this,bf,!1),de(this,wp,t=>{this._poll(t,ee(this,mp))})}async _poll(e,t){throw new Error("sub-classes must override this")}start(){ee(this,bf)||(de(this,bf,!0),ee(this,wp).call(this,-2),ee(this,mp).on("block",ee(this,wp)))}stop(){ee(this,bf)&&(de(this,bf,!1),ee(this,mp).off("block",ee(this,wp)))}pause(e){this.stop()}resume(){this.start()}}mp=new WeakMap,wp=new WeakMap,bf=new WeakMap;var jm,jh;class Z7e extends WT{constructor(t,n){super(t);Le(this,jm);Le(this,jh);de(this,jm,n),de(this,jh,-2)}pause(t){t&&de(this,jh,-2),super.pause(t)}async _poll(t,n){const i=await n.getBlock(ee(this,jm));i!=null&&(ee(this,jh)===-2?de(this,jh,i.number):i.number>ee(this,jh)&&(n.emit(ee(this,jm),i.number),de(this,jh,i.number)))}}jm=new WeakMap,jh=new WeakMap;var H8;class Y7e extends WT{constructor(t,n){super(t);Le(this,H8);de(this,H8,pS(n))}async _poll(t,n){throw new Error("@TODO")}}H8=new WeakMap;var Hm;class Q7e extends WT{constructor(t,n){super(t);Le(this,Hm);de(this,Hm,n)}async _poll(t,n){const i=await n.getTransactionReceipt(ee(this,Hm));i&&n.emit(ee(this,Hm),i)}}Hm=new WeakMap;var Hh,Wm,zm,_f,tc,W8,eq;class zT{constructor(e,t){Le(this,W8);Le(this,Hh);Le(this,Wm);Le(this,zm);Le(this,_f);Le(this,tc);de(this,Hh,e),de(this,Wm,pS(t)),de(this,zm,rt(this,W8,eq).bind(this)),de(this,_f,!1),de(this,tc,-2)}start(){ee(this,_f)||(de(this,_f,!0),ee(this,tc)===-2&&ee(this,Hh).getBlockNumber().then(e=>{de(this,tc,e)}),ee(this,Hh).on("block",ee(this,zm)))}stop(){ee(this,_f)&&(de(this,_f,!1),ee(this,Hh).off("block",ee(this,zm)))}pause(e){this.stop(),e&&de(this,tc,-2)}resume(){this.start()}}Hh=new WeakMap,Wm=new WeakMap,zm=new WeakMap,_f=new WeakMap,tc=new WeakMap,W8=new WeakSet,eq=async function(e){if(ee(this,tc)===-2)return;const t=pS(ee(this,Wm));t.fromBlock=ee(this,tc)+1,t.toBlock=e;const n=await ee(this,Hh).getLogs(t);if(n.length===0){ee(this,tc){if(n==null)return"null";if(typeof n=="bigint")return`bigint:${n.toString()}`;if(typeof n=="string")return n.toLowerCase();if(typeof n=="object"&&!Array.isArray(n)){const i=Object.keys(n);return i.sort(),i.reduce((s,o)=>(s[o]=n[o],s),{})}return n})}class P8{constructor(e){Oe(this,"name");tr(this,{name:e})}start(){}stop(){}pause(e){}resume(){}}function e9e(r){return JSON.parse(JSON.stringify(r))}function gS(r){return r=Array.from(new Set(r).values()),r.sort(),r}async function j7(r,e){if(r==null)throw new Error("invalid event");if(Array.isArray(r)&&(r={topics:r}),typeof r=="string")switch(r){case"block":case"debug":case"error":case"finalized":case"network":case"pending":case"safe":return{type:r,tag:r}}if(Tn(r,32)){const t=r.toLowerCase();return{type:"transaction",tag:Y4("tx",{hash:t}),hash:t}}if(r.orphan){const t=r;return{type:"orphan",tag:Y4("orphan",t),filter:e9e(t)}}if(r.address||r.topics){const t=r,n={topics:(t.topics||[]).map(i=>i==null?null:Array.isArray(i)?gS(i.map(s=>s.toLowerCase())):i.toLowerCase())};if(t.address){const i=[],s=[],o=a=>{Tn(a)?i.push(a):s.push((async()=>{i.push(await no(a,e))})())};Array.isArray(t.address)?t.address.forEach(o):o(t.address),s.length&&await Promise.all(s),n.address=gS(i.map(a=>a.toLowerCase()))}return{filter:n,tag:Y4("event",n),type:"event"}}Ae(!1,"unknown ProviderEvent","event",r)}function H7(){return new Date().getTime()}const t9e={cacheTimeout:250,pollingInterval:4e3};var Cs,xf,Ss,Vm,ia,vp,Af,Wh,my,rc,qm,Km,Pr,Jo,mS,wS,p3,vS,g3,Q4;class r9e{constructor(e,t){Le(this,Pr);Le(this,Cs);Le(this,xf);Le(this,Ss);Le(this,Vm);Le(this,ia);Le(this,vp);Le(this,Af);Le(this,Wh);Le(this,my);Le(this,rc);Le(this,qm);Le(this,Km);if(de(this,Km,Object.assign({},t9e,t||{})),e==="any")de(this,vp,!0),de(this,ia,null);else if(e){const n=il.from(e);de(this,vp,!1),de(this,ia,Promise.resolve(n)),setTimeout(()=>{this.emit("network",n,null)},0)}else de(this,vp,!1),de(this,ia,null);de(this,Wh,-1),de(this,Af,new Map),de(this,Cs,new Map),de(this,xf,new Map),de(this,Ss,null),de(this,Vm,!1),de(this,my,1),de(this,rc,new Map),de(this,qm,!1)}get pollingInterval(){return ee(this,Km).pollingInterval}get provider(){return this}get plugins(){return Array.from(ee(this,xf).values())}attachPlugin(e){if(ee(this,xf).get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return ee(this,xf).set(e.name,e.connect(this)),this}getPlugin(e){return ee(this,xf).get(e)||null}get disableCcipRead(){return ee(this,qm)}set disableCcipRead(e){de(this,qm,!!e)}async ccipReadFetch(e,t,n){if(this.disableCcipRead||n.length===0||e.to==null)return null;const i=e.to.toLowerCase(),s=t.toLowerCase(),o=[];for(let a=0;a=500,`response not found during CCIP fetch: ${f}`,"OFFCHAIN_FAULT",{reason:"404_MISSING_RESOURCE",transaction:e,info:{url:c,errorMessage:f}}),o.push(f)}Ze(!1,`error encountered during CCIP fetch: ${o.map(a=>JSON.stringify(a)).join(", ")}`,"OFFCHAIN_FAULT",{reason:"500_SERVER_ERROR",transaction:e,info:{urls:n,errorMessages:o}})}_wrapBlock(e,t){return new _7e(F7e(e),this)}_wrapLog(e,t){return new hb(L7e(e),this)}_wrapTransactionReceipt(e,t){return new FV(z7e(e),this)}_wrapTransactionResponse(e,t){return new ry(XV(e),this)}_detectNetwork(){Ze(!1,"sub-classes must implement this","UNSUPPORTED_OPERATION",{operation:"_detectNetwork"})}async _perform(e){Ze(!1,`unsupported method: ${e.method}`,"UNSUPPORTED_OPERATION",{operation:e.method,info:e})}async getBlockNumber(){const e=Sr(await rt(this,Pr,Jo).call(this,{method:"getBlockNumber"}),"%response");return ee(this,Wh)>=0&&de(this,Wh,e),e}_getAddress(e){return no(e,this)}_getBlockTag(e){if(e==null)return"latest";switch(e){case"earliest":return"0x0";case"finalized":case"latest":case"pending":case"safe":return e}if(Tn(e))return Tn(e,32)?e:$g(e);if(typeof e=="bigint"&&(e=Sr(e,"blockTag")),typeof e=="number")return e>=0?$g(e):ee(this,Wh)>=0?$g(ee(this,Wh)+e):this.getBlockNumber().then(t=>$g(t+e));Ae(!1,"invalid blockTag","blockTag",e)}_getFilter(e){const t=(e.topics||[]).map(c=>c==null?null:Array.isArray(c)?gS(c.map(l=>l.toLowerCase())):c.toLowerCase()),n="blockHash"in e?e.blockHash:void 0,i=(c,l,h)=>{let f;switch(c.length){case 0:break;case 1:f=c[0];break;default:c.sort(),f=c}if(n&&(l!=null||h!=null))throw new Error("invalid filter");const v={};return f&&(v.address=f),t.length&&(v.topics=t),l&&(v.fromBlock=l),h&&(v.toBlock=h),n&&(v.blockHash=n),v};let s=[];if(e.address)if(Array.isArray(e.address))for(const c of e.address)s.push(this._getAddress(c));else s.push(this._getAddress(e.address));let o;"fromBlock"in e&&(o=this._getBlockTag(e.fromBlock));let a;return"toBlock"in e&&(a=this._getBlockTag(e.toBlock)),s.filter(c=>typeof c!="string").length||o!=null&&typeof o!="string"||a!=null&&typeof a!="string"?Promise.all([Promise.all(s),o,a]).then(c=>i(c[0],c[1],c[2])):i(s,o,a)}_getTransactionRequest(e){const t=R8(e),n=[];if(["to","from"].forEach(i=>{if(t[i]==null)return;const s=no(t[i],this);h4(s)?n.push(async function(){t[i]=await s}()):t[i]=s}),t.blockTag!=null){const i=this._getBlockTag(t.blockTag);h4(i)?n.push(async function(){t.blockTag=await i}()):t.blockTag=i}return n.length?async function(){return await Promise.all(n),t}():t}async getNetwork(){if(ee(this,ia)==null){const i=(async()=>{try{const s=await this._detectNetwork();return this.emit("network",s,null),s}catch(s){throw ee(this,ia)===i&&de(this,ia,null),s}})();return de(this,ia,i),(await i).clone()}const e=ee(this,ia),[t,n]=await Promise.all([e,this._detectNetwork()]);return t.chainId!==n.chainId&&(ee(this,vp)?(this.emit("network",n,t),ee(this,ia)===e&&de(this,ia,Promise.resolve(n))):Ze(!1,`network changed: ${t.chainId} => ${n.chainId} `,"NETWORK_ERROR",{event:"changed"})),t.clone()}async getFeeData(){const e=await this.getNetwork(),t=async()=>{const{_block:i,gasPrice:s,priorityFee:o}=await Ks({_block:rt(this,Pr,vS).call(this,"latest",!1),gasPrice:(async()=>{try{const h=await rt(this,Pr,Jo).call(this,{method:"getGasPrice"});return qt(h,"%response")}catch{}return null})(),priorityFee:(async()=>{try{const h=await rt(this,Pr,Jo).call(this,{method:"getPriorityFee"});return qt(h,"%response")}catch{}return null})()});let a=null,c=null;const l=this._wrapBlock(i,e);return l&&l.baseFeePerGas&&(c=o??BigInt("1000000000"),a=l.baseFeePerGas*J7e+c),new rB(s,a,c)},n=e.getPlugin("org.ethers.plugins.network.FetchUrlFeeDataPlugin");if(n){const i=new Wu(n.url),s=await n.processFunc(t,this,i);return new rB(s.gasPrice,s.maxFeePerGas,s.maxPriorityFeePerGas)}return await t()}async estimateGas(e){let t=this._getTransactionRequest(e);return h4(t)&&(t=await t),qt(await rt(this,Pr,Jo).call(this,{method:"estimateGas",transaction:t}),"%response")}async call(e){const{tx:t,blockTag:n}=await Ks({tx:this._getTransactionRequest(e),blockTag:this._getBlockTag(e.blockTag)});return await rt(this,Pr,wS).call(this,rt(this,Pr,mS).call(this,t,n,e.enableCcipRead?0:-1))}async getBalance(e,t){return qt(await rt(this,Pr,p3).call(this,{method:"getBalance"},e,t),"%response")}async getTransactionCount(e,t){return Sr(await rt(this,Pr,p3).call(this,{method:"getTransactionCount"},e,t),"%response")}async getCode(e,t){return Ft(await rt(this,Pr,p3).call(this,{method:"getCode"},e,t))}async getStorage(e,t,n){const i=qt(t,"position");return Ft(await rt(this,Pr,p3).call(this,{method:"getStorage",position:i},e,n))}async broadcastTransaction(e){const{blockNumber:t,hash:n,network:i}=await Ks({blockNumber:this.getBlockNumber(),hash:this._perform({method:"broadcastTransaction",signedTransaction:e}),network:this.getNetwork()}),s=I8.from(e);if(s.hash!==n)throw new Error("@TODO: the returned hash did not match");return this._wrapTransactionResponse(s,i).replaceableTransaction(t)}async getBlock(e,t){const{network:n,params:i}=await Ks({network:this.getNetwork(),params:rt(this,Pr,vS).call(this,e,!!t)});return i==null?null:this._wrapBlock(i,n)}async getTransaction(e){const{network:t,params:n}=await Ks({network:this.getNetwork(),params:rt(this,Pr,Jo).call(this,{method:"getTransaction",hash:e})});return n==null?null:this._wrapTransactionResponse(n,t)}async getTransactionReceipt(e){const{network:t,params:n}=await Ks({network:this.getNetwork(),params:rt(this,Pr,Jo).call(this,{method:"getTransactionReceipt",hash:e})});if(n==null)return null;if(n.gasPrice==null&&n.effectiveGasPrice==null){const i=await rt(this,Pr,Jo).call(this,{method:"getTransaction",hash:e});if(i==null)throw new Error("report this; could not find tx or effectiveGasPrice");n.effectiveGasPrice=i.gasPrice}return this._wrapTransactionReceipt(n,t)}async getTransactionResult(e){const{result:t}=await Ks({network:this.getNetwork(),result:rt(this,Pr,Jo).call(this,{method:"getTransactionResult",hash:e})});return t==null?null:Ft(t)}async getLogs(e){let t=this._getFilter(e);h4(t)&&(t=await t);const{network:n,params:i}=await Ks({network:this.getNetwork(),params:rt(this,Pr,Jo).call(this,{method:"getLogs",filter:t})});return i.map(s=>this._wrapLog(s,n))}_getProvider(e){Ze(!1,"provider cannot connect to target network","UNSUPPORTED_OPERATION",{operation:"_getProvider()"})}async getResolver(e){return await N8.fromName(this,e)}async getAvatar(e){const t=await this.getResolver(e);return t?await t.getAvatar():null}async resolveName(e){const t=await this.getResolver(e);return t?await t.getAddress():null}async lookupAddress(e){e=Gr(e);const t=cS(e.substring(2).toLowerCase()+".addr.reverse");try{const n=await N8.getEnsAddress(this),s=await new lm(n,["function resolver(bytes32) view returns (address)"],this).resolver(t);if(s==null||s===Gv)return null;const a=await new lm(s,["function name(bytes32) view returns (string)"],this).name(t);return await this.resolveName(a)!==e?null:a}catch(n){if(ks(n,"BAD_DATA")&&n.value==="0x"||ks(n,"CALL_EXCEPTION"))return null;throw n}return null}async waitForTransaction(e,t,n){const i=t??1;return i===0?this.getTransactionReceipt(e):new Promise(async(s,o)=>{let a=null;const c=async l=>{try{const h=await this.getTransactionReceipt(e);if(h!=null&&l-h.blockNumber+1>=i){s(h),a&&(clearTimeout(a),a=null);return}}catch(h){console.log("EEE",h)}this.once("block",c)};n!=null&&(a=setTimeout(()=>{a!=null&&(a=null,this.off("block",c),o(jn("timeout","TIMEOUT",{reason:"timeout"})))},n)),c(await this.getBlockNumber())})}async waitForBlock(e){Ze(!1,"not implemented yet","NOT_IMPLEMENTED",{operation:"waitForBlock"})}_clearTimeout(e){const t=ee(this,rc).get(e);t&&(t.timer&&clearTimeout(t.timer),ee(this,rc).delete(e))}_setTimeout(e,t){t==null&&(t=0);const n=M2(this,my)._++,i=()=>{ee(this,rc).delete(n),e()};if(this.paused)ee(this,rc).set(n,{timer:null,func:i,time:t});else{const s=setTimeout(i,t);ee(this,rc).set(n,{timer:s,func:i,time:H7()})}return n}_forEachSubscriber(e){for(const t of ee(this,Cs).values())e(t.subscriber)}_getSubscriber(e){switch(e.type){case"debug":case"error":case"network":return new P8(e.type);case"block":{const t=new G7e(this);return t.pollingInterval=this.pollingInterval,t}case"safe":case"finalized":return new Z7e(this,e.type);case"event":return new zT(this,e.filter);case"transaction":return new Q7e(this,e.hash);case"orphan":return new Y7e(this,e.filter)}throw new Error(`unsupported event: ${e.type}`)}_recoverSubscriber(e,t){for(const n of ee(this,Cs).values())if(n.subscriber===e){n.started&&n.subscriber.stop(),n.subscriber=t,n.started&&t.start(),ee(this,Ss)!=null&&t.pause(ee(this,Ss));break}}async on(e,t){const n=await rt(this,Pr,Q4).call(this,e);return n.listeners.push({listener:t,once:!1}),n.started||(n.subscriber.start(),n.started=!0,ee(this,Ss)!=null&&n.subscriber.pause(ee(this,Ss))),this}async once(e,t){const n=await rt(this,Pr,Q4).call(this,e);return n.listeners.push({listener:t,once:!0}),n.started||(n.subscriber.start(),n.started=!0,ee(this,Ss)!=null&&n.subscriber.pause(ee(this,Ss))),this}async emit(e,...t){const n=await rt(this,Pr,g3).call(this,e,t);if(!n||n.listeners.length===0)return!1;const i=n.listeners.length;return n.listeners=n.listeners.filter(({listener:s,once:o})=>{const a=new pz(this,o?null:s,e);try{s.call(this,...t,a)}catch{}return!o}),n.listeners.length===0&&(n.started&&n.subscriber.stop(),ee(this,Cs).delete(n.tag)),i>0}async listenerCount(e){if(e){const n=await rt(this,Pr,g3).call(this,e);return n?n.listeners.length:0}let t=0;for(const{listeners:n}of ee(this,Cs).values())t+=n.length;return t}async listeners(e){if(e){const n=await rt(this,Pr,g3).call(this,e);return n?n.listeners.map(({listener:i})=>i):[]}let t=[];for(const{listeners:n}of ee(this,Cs).values())t=t.concat(n.map(({listener:i})=>i));return t}async off(e,t){const n=await rt(this,Pr,g3).call(this,e);if(!n)return this;if(t){const i=n.listeners.map(({listener:s})=>s).indexOf(t);i>=0&&n.listeners.splice(i,1)}return(!t||n.listeners.length===0)&&(n.started&&n.subscriber.stop(),ee(this,Cs).delete(n.tag)),this}async removeAllListeners(e){if(e){const{tag:t,started:n,subscriber:i}=await rt(this,Pr,Q4).call(this,e);n&&i.stop(),ee(this,Cs).delete(t)}else for(const[t,{started:n,subscriber:i}]of ee(this,Cs))n&&i.stop(),ee(this,Cs).delete(t);return this}async addListener(e,t){return await this.on(e,t)}async removeListener(e,t){return this.off(e,t)}get destroyed(){return ee(this,Vm)}destroy(){this.removeAllListeners();for(const e of ee(this,rc).keys())this._clearTimeout(e);de(this,Vm,!0)}get paused(){return ee(this,Ss)!=null}set paused(e){!!e!==this.paused&&(this.paused?this.resume():this.pause(!1))}pause(e){if(de(this,Wh,-1),ee(this,Ss)!=null){if(ee(this,Ss)==!!e)return;Ze(!1,"cannot change pause type; resume first","UNSUPPORTED_OPERATION",{operation:"pause"})}this._forEachSubscriber(t=>t.pause(e)),de(this,Ss,!!e);for(const t of ee(this,rc).values())t.timer&&clearTimeout(t.timer),t.time=H7()-t.time}resume(){if(ee(this,Ss)!=null){this._forEachSubscriber(e=>e.resume()),de(this,Ss,null);for(const e of ee(this,rc).values()){let t=e.time;t<0&&(t=0),e.time=H7(),setTimeout(e.func,t)}}}}Cs=new WeakMap,xf=new WeakMap,Ss=new WeakMap,Vm=new WeakMap,ia=new WeakMap,vp=new WeakMap,Af=new WeakMap,Wh=new WeakMap,my=new WeakMap,rc=new WeakMap,qm=new WeakMap,Km=new WeakMap,Pr=new WeakSet,Jo=async function(e){const t=ee(this,Km).cacheTimeout;if(t<0)return await this._perform(e);const n=Y4(e.method,e);let i=ee(this,Af).get(n);return i||(i=this._perform(e),ee(this,Af).set(n,i),setTimeout(()=>{ee(this,Af).get(n)===i&&ee(this,Af).delete(n)},t)),await i},mS=async function(e,t,n){Ze(n=0&&t==="latest"&&i.to!=null&&ni(s.data,0,4)==="0x556f1830"){const o=s.data,a=await no(i.to,this);let c;try{c=a9e(ni(s.data,4))}catch(f){Ze(!1,f.message,"OFFCHAIN_FAULT",{reason:"BAD_DATA",transaction:i,info:{data:o}})}Ze(c.sender.toLowerCase()===a.toLowerCase(),"CCIP Read sender mismatch","CALL_EXCEPTION",{action:"call",data:o,reason:"OffchainLookup",transaction:i,invocation:null,revert:{signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",name:"OffchainLookup",args:c.errorArgs}});const l=await this.ccipReadFetch(i,c.calldata,c.urls);Ze(l!=null,"CCIP Read failed to fetch data","OFFCHAIN_FAULT",{reason:"FETCH_FAILED",transaction:i,info:{data:s.data,errorArgs:c.errorArgs}});const h={to:a,data:vi([c.selector,o9e([l,c.extraData])])};this.emit("debug",{action:"sendCcipReadCall",transaction:h});try{const f=await rt(this,Pr,mS).call(this,h,t,n+1);return this.emit("debug",{action:"receiveCcipReadCallResult",transaction:Object.assign({},h),result:f}),f}catch(f){throw this.emit("debug",{action:"receiveCcipReadCallError",transaction:Object.assign({},h),error:f}),f}}throw s}},wS=async function(e){const{value:t}=await Ks({network:this.getNetwork(),value:e});return t},p3=async function(e,t,n){let i=this._getAddress(t),s=this._getBlockTag(n);return(typeof i!="string"||typeof s!="string")&&([i,s]=await Promise.all([i,s])),await rt(this,Pr,wS).call(this,rt(this,Pr,Jo).call(this,Object.assign(e,{address:i,blockTag:s})))},vS=async function(e,t){if(Tn(e,32))return await rt(this,Pr,Jo).call(this,{method:"getBlock",blockHash:e,includeTransactions:t});let n=this._getBlockTag(e);return typeof n!="string"&&(n=await n),await rt(this,Pr,Jo).call(this,{method:"getBlock",blockTag:n,includeTransactions:t})},g3=async function(e,t){let n=await j7(e,this);return n.type==="event"&&t&&t.length>0&&t[0].removed===!0&&(n=await j7({orphan:"drop-log",log:t[0]},this)),ee(this,Cs).get(n.tag)||null},Q4=async function(e){const t=await j7(e,this),n=t.tag;let i=ee(this,Cs).get(n);return i||(i={subscriber:this._getSubscriber(t),tag:n,addressableMap:new WeakMap,nameMap:new Map,started:!1,listeners:[]},ee(this,Cs).set(n,i)),i};function n9e(r,e){try{const t=yS(r,e);if(t)return y8(t)}catch{}return null}function yS(r,e){if(r==="0x")return null;try{const t=Sr(ni(r,e,e+32)),n=Sr(ni(r,t,t+32));return ni(r,t+32,t+32+n)}catch{}return null}function uB(r){const e=to(r);if(e.length>32)throw new Error("internal; should not happen");const t=new Uint8Array(32);return t.set(e,32-e.length),t}function i9e(r){if(r.length%32===0)return r;const e=new Uint8Array(Math.ceil(r.length/32)*32);return e.set(r),e}const s9e=new Uint8Array([]);function o9e(r){const e=[];let t=0;for(let n=0;n=5*32,"insufficient OffchainLookup data","OFFCHAIN_FAULT",{reason:"insufficient OffchainLookup data"});const t=ni(r,0,32);Ze(ni(t,0,12)===ni(hB,0,12),"corrupt OffchainLookup sender","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup sender"}),e.sender=ni(t,12);try{const n=[],i=Sr(ni(r,32,64)),s=Sr(ni(r,i,i+32)),o=ni(r,i+32);for(let a=0;ae[n]),e}function fg(r,e){if(r.provider)return r.provider;Ze(!1,"missing provider","UNSUPPORTED_OPERATION",{operation:e})}async function dB(r,e){let t=R8(e);if(t.to!=null&&(t.to=no(t.to,r)),t.from!=null){const n=t.from;t.from=Promise.all([r.getAddress(),no(n,r)]).then(([i,s])=>(Ae(i.toLowerCase()===s.toLowerCase(),"transaction from mismatch","tx.from",s),i))}else t.from=r.getAddress();return await Ks(t)}class c9e{constructor(e){Oe(this,"provider");tr(this,{provider:e||null})}async getNonce(e){return fg(this,"getTransactionCount").getTransactionCount(await this.getAddress(),e)}async populateCall(e){return await dB(this,e)}async populateTransaction(e){const t=fg(this,"populateTransaction"),n=await dB(this,e);n.nonce==null&&(n.nonce=await this.getNonce("pending")),n.gasLimit==null&&(n.gasLimit=await this.estimateGas(n));const i=await this.provider.getNetwork();if(n.chainId!=null){const o=qt(n.chainId);Ae(o===i.chainId,"transaction chainId mismatch","tx.chainId",e.chainId)}else n.chainId=i.chainId;const s=n.maxFeePerGas!=null||n.maxPriorityFeePerGas!=null;if(n.gasPrice!=null&&(n.type===2||s)?Ae(!1,"eip-1559 transaction do not support gasPrice","tx",e):(n.type===0||n.type===1)&&s&&Ae(!1,"pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","tx",e),(n.type===2||n.type==null)&&n.maxFeePerGas!=null&&n.maxPriorityFeePerGas!=null)n.type=2;else if(n.type===0||n.type===1){const o=await t.getFeeData();Ze(o.gasPrice!=null,"network does not support gasPrice","UNSUPPORTED_OPERATION",{operation:"getGasPrice"}),n.gasPrice==null&&(n.gasPrice=o.gasPrice)}else{const o=await t.getFeeData();if(n.type==null)if(o.maxFeePerGas!=null&&o.maxPriorityFeePerGas!=null)if(n.type=2,n.gasPrice!=null){const a=n.gasPrice;delete n.gasPrice,n.maxFeePerGas=a,n.maxPriorityFeePerGas=a}else n.maxFeePerGas==null&&(n.maxFeePerGas=o.maxFeePerGas),n.maxPriorityFeePerGas==null&&(n.maxPriorityFeePerGas=o.maxPriorityFeePerGas);else o.gasPrice!=null?(Ze(!s,"network does not support EIP-1559","UNSUPPORTED_OPERATION",{operation:"populateTransaction"}),n.gasPrice==null&&(n.gasPrice=o.gasPrice),n.type=0):Ze(!1,"failed to get consistent fee data","UNSUPPORTED_OPERATION",{operation:"signer.getFeeData"});else(n.type===2||n.type===3)&&(n.maxFeePerGas==null&&(n.maxFeePerGas=o.maxFeePerGas),n.maxPriorityFeePerGas==null&&(n.maxPriorityFeePerGas=o.maxPriorityFeePerGas))}return await Ks(n)}async estimateGas(e){return fg(this,"estimateGas").estimateGas(await this.populateCall(e))}async call(e){return fg(this,"call").call(await this.populateCall(e))}async resolveName(e){return await fg(this,"resolveName").resolveName(e)}async sendTransaction(e){const t=fg(this,"sendTransaction"),n=await this.populateTransaction(e);delete n.from;const i=I8.from(n);return await t.broadcastTransaction(await this.signTransaction(i))}}const fB=new Set;function l9e(r){fB.has(r)||(fB.add(r),console.log("========= NOTICE ========="),console.log(`Request-Rate Exceeded for ${r} (this message will not be repeated)`),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.org/api-keys/"),console.log("=========================="))}function u9e(r){return JSON.parse(JSON.stringify(r))}var qs,tu,yp,Ef,bp,Gm,Yf,bS,_S;class tq{constructor(e){Le(this,Yf);Le(this,qs);Le(this,tu);Le(this,yp);Le(this,Ef);Le(this,bp);Le(this,Gm);de(this,qs,e),de(this,tu,null),de(this,yp,rt(this,Yf,bS).bind(this)),de(this,Ef,!1),de(this,bp,null),de(this,Gm,!1)}_subscribe(e){throw new Error("subclasses must override this")}_emitResults(e,t){throw new Error("subclasses must override this")}_recover(e){throw new Error("subclasses must override this")}start(){ee(this,Ef)||(de(this,Ef,!0),rt(this,Yf,bS).call(this,-2))}stop(){ee(this,Ef)&&(de(this,Ef,!1),de(this,Gm,!0),rt(this,Yf,_S).call(this),ee(this,qs).off("block",ee(this,yp)))}pause(e){e&&rt(this,Yf,_S).call(this),ee(this,qs).off("block",ee(this,yp))}resume(){this.start()}}qs=new WeakMap,tu=new WeakMap,yp=new WeakMap,Ef=new WeakMap,bp=new WeakMap,Gm=new WeakMap,Yf=new WeakSet,bS=async function(e){try{ee(this,tu)==null&&de(this,tu,this._subscribe(ee(this,qs)));let t=null;try{t=await ee(this,tu)}catch(s){if(!ks(s,"UNSUPPORTED_OPERATION")||s.operation!=="eth_newFilter")throw s}if(t==null){de(this,tu,null),ee(this,qs)._recoverSubscriber(this,this._recover(ee(this,qs)));return}const n=await ee(this,qs).getNetwork();if(ee(this,bp)||de(this,bp,n),ee(this,bp).chainId!==n.chainId)throw new Error("chaid changed");if(ee(this,Gm))return;const i=await ee(this,qs).send("eth_getFilterChanges",[t]);await this._emitResults(ee(this,qs),i)}catch(t){console.log("@TODO",t)}ee(this,qs).once("block",ee(this,yp))},_S=function(){const e=ee(this,tu);e&&(de(this,tu,null),e.then(t=>{ee(this,qs).destroyed||ee(this,qs).send("eth_uninstallFilter",[t])}))};var _p;class h9e extends tq{constructor(t,n){super(t);Le(this,_p);de(this,_p,u9e(n))}_recover(t){return new zT(t,ee(this,_p))}async _subscribe(t){return await t.send("eth_newFilter",[ee(this,_p)])}async _emitResults(t,n){for(const i of n)t.emit(ee(this,_p),t._wrapLog(i,t._network))}}_p=new WeakMap;class d9e extends tq{async _subscribe(e){return await e.send("eth_newPendingTransactionFilter",[])}async _emitResults(e,t){for(const n of t)e.emit("pending",n)}}const f9e="bigint,boolean,function,number,string,symbol".split(/,/g);function J4(r){if(r==null||f9e.indexOf(typeof r)>=0||typeof r.getAddress=="function")return r;if(Array.isArray(r))return r.map(J4);if(typeof r=="object")return Object.keys(r).reduce((e,t)=>(e[t]=r[t],e),{});throw new Error(`should not happen: ${r} (${typeof r})`)}function p9e(r){return new Promise(e=>{setTimeout(e,r)})}function pg(r){return r&&r.toLowerCase()}function pB(r){return r&&typeof r.pollingInterval=="number"}const rq={polling:!1,staticNetwork:null,batchStallTime:10,batchMaxSize:1<<20,batchMaxCount:100,cacheTimeout:250,pollingInterval:4e3};class um extends c9e{constructor(t,n){super(t);Oe(this,"address");n=Gr(n),tr(this,{address:n})}connect(t){Ze(!1,"cannot reconnect JsonRpcSigner","UNSUPPORTED_OPERATION",{operation:"signer.connect"})}async getAddress(){return this.address}async populateTransaction(t){return await this.populateCall(t)}async sendUncheckedTransaction(t){const n=J4(t),i=[];if(n.from){const o=n.from;i.push((async()=>{const a=await no(o,this.provider);Ae(a!=null&&a.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",t),n.from=a})())}else n.from=this.address;if(n.gasLimit==null&&i.push((async()=>{n.gasLimit=await this.provider.estimateGas({...n,from:this.address})})()),n.to!=null){const o=n.to;i.push((async()=>{n.to=await no(o,this.provider)})())}i.length&&await Promise.all(i);const s=this.provider.getRpcTransaction(n);return this.provider.send("eth_sendTransaction",[s])}async sendTransaction(t){const n=await this.provider.getBlockNumber(),i=await this.sendUncheckedTransaction(t);return await new Promise((s,o)=>{const a=[1e3,100];let c=0;const l=async()=>{try{const h=await this.provider.getTransaction(i);if(h!=null){s(h.replaceableTransaction(n));return}}catch(h){if(ks(h,"CANCELLED")||ks(h,"BAD_DATA")||ks(h,"NETWORK_ERROR")){h.info==null&&(h.info={}),h.info.sendTransactionHash=i,o(h);return}if(ks(h,"INVALID_ARGUMENT")&&(c++,h.info==null&&(h.info={}),h.info.sendTransactionHash=i,c>10)){o(h);return}this.provider.emit("error",jn("failed to fetch transation after sending (will try again)","UNKNOWN_ERROR",{error:h}))}this.provider._setTimeout(()=>{l()},a.pop()||4e3)};l()})}async signTransaction(t){const n=J4(t);if(n.from){const s=await no(n.from,this.provider);Ae(s!=null&&s.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",t),n.from=s}else n.from=this.address;const i=this.provider.getRpcTransaction(n);return await this.provider.send("eth_signTransaction",[i])}async signMessage(t){const n=typeof t=="string"?Cu(t):t;return await this.provider.send("personal_sign",[Ft(n),this.address.toLowerCase()])}async signTypedData(t,n,i){const s=J4(i),o=await T8.resolveNames(t,n,s,async a=>{const c=await no(a);return Ae(c!=null,"TypedData does not support null address","value",a),c});return await this.provider.send("eth_signTypedData_v4",[this.address.toLowerCase(),JSON.stringify(T8.getPayload(o.domain,n,o.value))])}async unlock(t){return this.provider.send("personal_unlockAccount",[this.address.toLowerCase(),t,null])}async _legacySignMessage(t){const n=typeof t=="string"?Cu(t):t;return await this.provider.send("eth_sign",[this.address.toLowerCase(),Ft(n)])}}var xp,Zm,zh,ru,qc,nc,ko,wy,xS;class nq extends r9e{constructor(t,n){super(t,n);Le(this,wy);Le(this,xp);Le(this,Zm);Le(this,zh);Le(this,ru);Le(this,qc);Le(this,nc);Le(this,ko);de(this,Zm,1),de(this,xp,Object.assign({},rq,n||{})),de(this,zh,[]),de(this,ru,null),de(this,nc,null),de(this,ko,null);{let s=null;const o=new Promise(a=>{s=a});de(this,qc,{promise:o,resolve:s})}const i=this._getOption("staticNetwork");typeof i=="boolean"?(Ae(!i||t!=="any","staticNetwork cannot be used on special network 'any'","options",n),i&&t!=null&&de(this,nc,il.from(t))):i&&(Ae(t==null||i.matches(t),"staticNetwork MUST match network object","options",n),de(this,nc,i))}_getOption(t){return ee(this,xp)[t]}get _network(){return Ze(ee(this,nc),"network is not available yet","NETWORK_ERROR"),ee(this,nc)}async _perform(t){if(t.method==="call"||t.method==="estimateGas"){let i=t.transaction;if(i&&i.type!=null&&qt(i.type)&&i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null){const s=await this.getFeeData();s.maxFeePerGas==null&&s.maxPriorityFeePerGas==null&&(t=Object.assign({},t,{transaction:Object.assign({},i,{type:void 0})}))}}const n=this.getRpcRequest(t);return n!=null?await this.send(n.method,n.args):super._perform(t)}async _detectNetwork(){const t=this._getOption("staticNetwork");if(t)if(t===!0){if(ee(this,nc))return ee(this,nc)}else return t;return ee(this,ko)?await ee(this,ko):this.ready?(de(this,ko,(async()=>{try{const n=il.from(qt(await this.send("eth_chainId",[])));return de(this,ko,null),n}catch(n){throw de(this,ko,null),n}})()),await ee(this,ko)):(de(this,ko,(async()=>{const n={id:M2(this,Zm)._++,method:"eth_chainId",params:[],jsonrpc:"2.0"};this.emit("debug",{action:"sendRpcPayload",payload:n});let i;try{i=(await this._send(n))[0],de(this,ko,null)}catch(s){throw de(this,ko,null),this.emit("debug",{action:"receiveRpcError",error:s}),s}if(this.emit("debug",{action:"receiveRpcResult",result:i}),"result"in i)return il.from(qt(i.result));throw this.getRpcError(n,i)})()),await ee(this,ko))}_start(){ee(this,qc)==null||ee(this,qc).resolve==null||(ee(this,qc).resolve(),de(this,qc,null),(async()=>{for(;ee(this,nc)==null&&!this.destroyed;)try{de(this,nc,await this._detectNetwork())}catch(t){if(this.destroyed)break;console.log("JsonRpcProvider failed to detect network and cannot start up; retry in 1s (perhaps the URL is wrong or the node is not started)"),this.emit("error",jn("failed to bootstrap network detection","NETWORK_ERROR",{event:"initial-network-discovery",info:{error:t}})),await p9e(1e3)}rt(this,wy,xS).call(this)})())}async _waitUntilReady(){if(ee(this,qc)!=null)return await ee(this,qc).promise}_getSubscriber(t){return t.type==="pending"?new d9e(this):t.type==="event"?this._getOption("polling")?new zT(this,t.filter):new h9e(this,t.filter):t.type==="orphan"&&t.filter.orphan==="drop-log"?new P8("orphan"):super._getSubscriber(t)}get ready(){return ee(this,qc)==null}getRpcTransaction(t){const n={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(i=>{if(t[i]==null)return;let s=i;i==="gasLimit"&&(s="gas"),n[s]=$g(qt(t[i],`tx.${i}`))}),["from","to","data"].forEach(i=>{t[i]!=null&&(n[i]=Ft(t[i]))}),t.accessList&&(n.accessList=D1(t.accessList)),t.blobVersionedHashes&&(n.blobVersionedHashes=t.blobVersionedHashes.map(i=>i.toLowerCase())),n}getRpcRequest(t){switch(t.method){case"chainId":return{method:"eth_chainId",args:[]};case"getBlockNumber":return{method:"eth_blockNumber",args:[]};case"getGasPrice":return{method:"eth_gasPrice",args:[]};case"getPriorityFee":return{method:"eth_maxPriorityFeePerGas",args:[]};case"getBalance":return{method:"eth_getBalance",args:[pg(t.address),t.blockTag]};case"getTransactionCount":return{method:"eth_getTransactionCount",args:[pg(t.address),t.blockTag]};case"getCode":return{method:"eth_getCode",args:[pg(t.address),t.blockTag]};case"getStorage":return{method:"eth_getStorageAt",args:[pg(t.address),"0x"+t.position.toString(16),t.blockTag]};case"broadcastTransaction":return{method:"eth_sendRawTransaction",args:[t.signedTransaction]};case"getBlock":if("blockTag"in t)return{method:"eth_getBlockByNumber",args:[t.blockTag,!!t.includeTransactions]};if("blockHash"in t)return{method:"eth_getBlockByHash",args:[t.blockHash,!!t.includeTransactions]};break;case"getTransaction":return{method:"eth_getTransactionByHash",args:[t.hash]};case"getTransactionReceipt":return{method:"eth_getTransactionReceipt",args:[t.hash]};case"call":return{method:"eth_call",args:[this.getRpcTransaction(t.transaction),t.blockTag]};case"estimateGas":return{method:"eth_estimateGas",args:[this.getRpcTransaction(t.transaction)]};case"getLogs":return t.filter&&t.filter.address!=null&&(Array.isArray(t.filter.address)?t.filter.address=t.filter.address.map(pg):t.filter.address=pg(t.filter.address)),{method:"eth_getLogs",args:[t.filter]}}return null}getRpcError(t,n){const{method:i}=t,{error:s}=n;if(i==="eth_estimateGas"&&s.message){const c=s.message;if(!c.match(/revert/i)&&c.match(/insufficient funds/i))return jn("insufficient funds","INSUFFICIENT_FUNDS",{transaction:t.params[0],info:{payload:t,error:s}})}if(i==="eth_call"||i==="eth_estimateGas"){const c=AS(s),l=ty.getBuiltinCallException(i==="eth_call"?"call":"estimateGas",t.params[0],c?c.data:null);return l.info={error:s,payload:t},l}const o=JSON.stringify(g9e(s));if(typeof s.message=="string"&&s.message.match(/user denied|ethers-user-denied/i))return jn("user rejected action","ACTION_REJECTED",{action:{eth_sign:"signMessage",personal_sign:"signMessage",eth_signTypedData_v4:"signTypedData",eth_signTransaction:"signTransaction",eth_sendTransaction:"sendTransaction",eth_requestAccounts:"requestAccess",wallet_requestAccounts:"requestAccess"}[i]||"unknown",reason:"rejected",info:{payload:t,error:s}});if(i==="eth_sendRawTransaction"||i==="eth_sendTransaction"){const c=t.params[0];if(o.match(/insufficient funds|base fee exceeds gas limit/i))return jn("insufficient funds for intrinsic transaction cost","INSUFFICIENT_FUNDS",{transaction:c,info:{error:s}});if(o.match(/nonce/i)&&o.match(/too low/i))return jn("nonce has already been used","NONCE_EXPIRED",{transaction:c,info:{error:s}});if(o.match(/replacement transaction/i)&&o.match(/underpriced/i))return jn("replacement fee too low","REPLACEMENT_UNDERPRICED",{transaction:c,info:{error:s}});if(o.match(/only replay-protected/i))return jn("legacy pre-eip-155 transactions not supported","UNSUPPORTED_OPERATION",{operation:i,info:{transaction:c,info:{error:s}}})}let a=!!o.match(/the method .* does not exist/i);return a||s&&s.details&&s.details.startsWith("Unauthorized method:")&&(a=!0),a?jn("unsupported operation","UNSUPPORTED_OPERATION",{operation:t.method,info:{error:s,payload:t}}):jn("could not coalesce error","UNKNOWN_ERROR",{error:s,payload:t})}send(t,n){if(this.destroyed)return Promise.reject(jn("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:t}));const i=M2(this,Zm)._++,s=new Promise((o,a)=>{ee(this,zh).push({resolve:o,reject:a,payload:{method:t,params:n,id:i,jsonrpc:"2.0"}})});return rt(this,wy,xS).call(this),s}async getSigner(t){t==null&&(t=0);const n=this.send("eth_accounts",[]);if(typeof t=="number"){const s=await n;if(t>=s.length)throw new Error("no such account");return new um(this,s[t])}const{accounts:i}=await Ks({network:this.getNetwork(),accounts:n});t=Gr(t);for(const s of i)if(Gr(s)===t)return new um(this,t);throw new Error("invalid account")}async listAccounts(){return(await this.send("eth_accounts",[])).map(n=>new um(this,n))}destroy(){ee(this,ru)&&(clearTimeout(ee(this,ru)),de(this,ru,null));for(const{payload:t,reject:n}of ee(this,zh))n(jn("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:t.method}));de(this,zh,[]),super.destroy()}}xp=new WeakMap,Zm=new WeakMap,zh=new WeakMap,ru=new WeakMap,qc=new WeakMap,nc=new WeakMap,ko=new WeakMap,wy=new WeakSet,xS=function(){if(ee(this,ru))return;const t=this._getOption("batchMaxCount")===1?0:this._getOption("batchStallTime");de(this,ru,setTimeout(()=>{de(this,ru,null);const n=ee(this,zh);for(de(this,zh,[]);n.length;){const i=[n.shift()];for(;n.length&&i.length!==ee(this,xp).batchMaxCount;)if(i.push(n.shift()),JSON.stringify(i.map(o=>o.payload)).length>ee(this,xp).batchMaxSize){n.unshift(i.pop());break}(async()=>{const s=i.length===1?i[0].payload:i.map(o=>o.payload);this.emit("debug",{action:"sendRpcPayload",payload:s});try{const o=await this._send(s);this.emit("debug",{action:"receiveRpcResult",result:o});for(const{resolve:a,reject:c,payload:l}of i){if(this.destroyed){c(jn("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:l.method}));continue}const h=o.filter(f=>f.id===l.id)[0];if(h==null){const f=jn("missing response for request","BAD_DATA",{value:o,info:{payload:l}});this.emit("error",f),c(f);continue}if("error"in h){c(this.getRpcError(l,h));continue}a(h.result)}}catch(o){this.emit("debug",{action:"receiveRpcError",error:o});for(const{reject:a}of i)a(o)}})()}},t))};var Cf;class iq extends nq{constructor(t,n){super(t,n);Le(this,Cf);let i=this._getOption("pollingInterval");i==null&&(i=rq.pollingInterval),de(this,Cf,i)}_getSubscriber(t){const n=super._getSubscriber(t);return pB(n)&&(n.pollingInterval=ee(this,Cf)),n}get pollingInterval(){return ee(this,Cf)}set pollingInterval(t){if(!Number.isInteger(t)||t<0)throw new Error("invalid interval");de(this,Cf,t),this._forEachSubscriber(n=>{pB(n)&&(n.pollingInterval=ee(this,Cf))})}}Cf=new WeakMap;var Ym;class sq extends iq{constructor(t,n,i){t==null&&(t="http://localhost:8545");super(n,i);Le(this,Ym);typeof t=="string"?de(this,Ym,new Wu(t)):de(this,Ym,t.clone())}_getConnection(){return ee(this,Ym).clone()}async send(t,n){return await this._start(),await super.send(t,n)}async _send(t){const n=this._getConnection();n.body=JSON.stringify(t),n.setHeader("content-type","application/json");const i=await n.send();i.assertOk();let s=i.bodyJson;return Array.isArray(s)||(s=[s]),s}}Ym=new WeakMap;function AS(r){if(r==null)return null;if(typeof r.message=="string"&&r.message.match(/revert/i)&&Tn(r.data))return{message:r.message,data:r.data};if(typeof r=="object"){for(const e in r){const t=AS(r[e]);if(t)return t}return null}if(typeof r=="string")try{return AS(JSON.parse(r))}catch{}return null}function ES(r,e){if(r!=null){if(typeof r.message=="string"&&e.push(r.message),typeof r=="object")for(const t in r)ES(r[t],e);if(typeof r=="string")try{return ES(JSON.parse(r),e)}catch{}}}function g9e(r){const e=[];return ES(r,e),e}function m9e(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}const w9e=m9e().WebSocket;var nu,vy,Sf,Ap,If;class VT{constructor(e,t){Le(this,nu);Le(this,vy);Le(this,Sf);Le(this,Ap);Le(this,If);de(this,nu,e),de(this,vy,JSON.stringify(t)),de(this,Sf,null),de(this,Ap,null),de(this,If,null)}get filter(){return JSON.parse(ee(this,vy))}start(){de(this,Sf,ee(this,nu).send("eth_subscribe",this.filter).then(e=>(ee(this,nu)._register(e,this),e)))}stop(){ee(this,Sf).then(e=>{ee(this,nu).destroyed||ee(this,nu).send("eth_unsubscribe",[e])}),de(this,Sf,null)}pause(e){Ze(e,"preserve logs while paused not supported by SocketSubscriber yet","UNSUPPORTED_OPERATION",{operation:"pause(false)"}),de(this,Ap,!!e)}resume(){de(this,Ap,null)}_handleMessage(e){if(ee(this,Sf)!=null&&ee(this,Ap)===null){let t=ee(this,If);t==null?t=this._emit(ee(this,nu),e):t=t.then(async()=>{await this._emit(ee(this,nu),e)}),de(this,If,t.then(()=>{ee(this,If)===t&&de(this,If,null)}))}}async _emit(e,t){throw new Error("sub-classes must implemente this; _emit")}}nu=new WeakMap,vy=new WeakMap,Sf=new WeakMap,Ap=new WeakMap,If=new WeakMap;class v9e extends VT{constructor(e){super(e,["newHeads"])}async _emit(e,t){e.emit("block",parseInt(t.number))}}class y9e extends VT{constructor(e){super(e,["newPendingTransactions"])}async _emit(e,t){e.emit("pending",t)}}var yy;class b9e extends VT{constructor(t,n){super(t,["logs",n]);Le(this,yy);de(this,yy,JSON.stringify(n))}get logFilter(){return JSON.parse(ee(this,yy))}async _emit(t,n){t.emit(this.logFilter,t._wrapLog(n,t._network))}}yy=new WeakMap;var Ep,Qm,Tf;class _9e extends nq{constructor(t,n){const i=Object.assign({},n??{});Ae(i.batchMaxCount==null||i.batchMaxCount===1,"sockets-based providers do not support batches","options.batchMaxCount",n),i.batchMaxCount=1,i.staticNetwork==null&&(i.staticNetwork=!0);super(t,i);Le(this,Ep);Le(this,Qm);Le(this,Tf);de(this,Ep,new Map),de(this,Qm,new Map),de(this,Tf,new Map)}_getSubscriber(t){switch(t.type){case"close":return new P8("close");case"block":return new v9e(this);case"pending":return new y9e(this);case"event":return new b9e(this,t.filter);case"orphan":if(t.filter.orphan==="drop-log")return new P8("drop-log")}return super._getSubscriber(t)}_register(t,n){ee(this,Qm).set(t,n);const i=ee(this,Tf).get(t);if(i){for(const s of i)n._handleMessage(s);ee(this,Tf).delete(t)}}async _send(t){Ae(!Array.isArray(t),"WebSocket does not support batch send","payload",t);const n=new Promise((i,s)=>{ee(this,Ep).set(t.id,{payload:t,resolve:i,reject:s})});return await this._waitUntilReady(),await this._write(JSON.stringify(t)),[await n]}async _processMessage(t){const n=JSON.parse(t);if(n&&typeof n=="object"&&"id"in n){const i=ee(this,Ep).get(n.id);if(i==null){this.emit("error",jn("received result for unknown id","UNKNOWN_ERROR",{reasonCode:"UNKNOWN_ID",result:n}));return}ee(this,Ep).delete(n.id),i.resolve(n)}else if(n&&n.method==="eth_subscription"){const i=n.params.subscription,s=ee(this,Qm).get(i);if(s)s._handleMessage(n.params.result);else{let o=ee(this,Tf).get(i);o==null&&(o=[],ee(this,Tf).set(i,o)),o.push(n.params.result)}}else{this.emit("error",jn("received unexpected message","UNKNOWN_ERROR",{reasonCode:"UNEXPECTED_MESSAGE",result:n}));return}}async _write(t){throw new Error("sub-classes must override this")}}Ep=new WeakMap,Qm=new WeakMap,Tf=new WeakMap;var Cp,Kc;class x9e extends _9e{constructor(t,n,i){super(n,i);Le(this,Cp);Le(this,Kc);typeof t=="string"?(de(this,Cp,()=>new w9e(t)),de(this,Kc,ee(this,Cp).call(this))):typeof t=="function"?(de(this,Cp,t),de(this,Kc,t())):(de(this,Cp,null),de(this,Kc,t)),this.websocket.onopen=async()=>{try{await this._start(),this.resume()}catch(s){console.log("failed to start WebsocketProvider",s)}},this.websocket.onmessage=s=>{this._processMessage(s.data)}}get websocket(){if(ee(this,Kc)==null)throw new Error("websocket closed");return ee(this,Kc)}async _write(t){this.websocket.send(t)}async destroy(){ee(this,Kc)!=null&&(ee(this,Kc).close(),de(this,Kc,null)),super.destroy()}}Cp=new WeakMap,Kc=new WeakMap;const m3="84842078b09946638c03157f83405213";function A9e(r){switch(r){case"mainnet":return"mainnet.infura.io";case"goerli":return"goerli.infura.io";case"sepolia":return"sepolia.infura.io";case"arbitrum":return"arbitrum-mainnet.infura.io";case"arbitrum-goerli":return"arbitrum-goerli.infura.io";case"arbitrum-sepolia":return"arbitrum-sepolia.infura.io";case"base":return"base-mainnet.infura.io";case"base-goerlia":return"base-goerli.infura.io";case"base-sepolia":return"base-sepolia.infura.io";case"bnb":return"bnbsmartchain-mainnet.infura.io";case"bnbt":return"bnbsmartchain-testnet.infura.io";case"linea":return"linea-mainnet.infura.io";case"linea-goerli":return"linea-goerli.infura.io";case"linea-sepolia":return"linea-sepolia.infura.io";case"matic":return"polygon-mainnet.infura.io";case"matic-amoy":return"polygon-amoy.infura.io";case"matic-mumbai":return"polygon-mumbai.infura.io";case"optimism":return"optimism-mainnet.infura.io";case"optimism-goerli":return"optimism-goerli.infura.io";case"optimism-sepolia":return"optimism-sepolia.infura.io"}Ae(!1,"unsupported network","network",r)}class E9e extends x9e{constructor(t,n){const i=new Pp(t,n),s=i._getConnection();Ze(!s.credentials,"INFURA WebSocket project secrets unsupported","UNSUPPORTED_OPERATION",{operation:"InfuraProvider.getWebSocketProvider()"});const o=s.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/");super(o,i._network);Oe(this,"projectId");Oe(this,"projectSecret");tr(this,{projectId:i.projectId,projectSecret:i.projectSecret})}isCommunityResource(){return this.projectId===m3}}class Pp extends sq{constructor(t,n,i){t==null&&(t="mainnet");const s=il.from(t);n==null&&(n=m3),i==null&&(i=null);const o=Pp.getRequest(s,n,i);super(o,s,{staticNetwork:s});Oe(this,"projectId");Oe(this,"projectSecret");tr(this,{projectId:n,projectSecret:i})}_getProvider(t){try{return new Pp(t,this.projectId,this.projectSecret)}catch{}return super._getProvider(t)}isCommunityResource(){return this.projectId===m3}static getWebSocketProvider(t,n){return new E9e(t,n)}static getRequest(t,n,i){n==null&&(n=m3),i==null&&(i=null);const s=new Wu(`https://${A9e(t.name)}/v3/${n}`);return s.allowGzip=!0,i&&s.setCredentials("",i),n===m3&&(s.retryFunc=async(o,a,c)=>(l9e("InfuraProvider"),!0)),s}}var Jm;class W7 extends iq{constructor(t,n,i){const s=Object.assign({},i??{},{batchMaxCount:1});Ae(t&&t.request,"invalid EIP-1193 provider","ethereum",t);super(n,s);Le(this,Jm);de(this,Jm,async(o,a)=>{const c={method:o,params:a};this.emit("debug",{action:"sendEip1193Request",payload:c});try{const l=await t.request(c);return this.emit("debug",{action:"receiveEip1193Result",result:l}),l}catch(l){const h=new Error(l.message);throw h.code=l.code,h.data=l.data,h.payload=c,this.emit("debug",{action:"receiveEip1193Error",error:h}),h}})}async send(t,n){return await this._start(),await super.send(t,n)}async _send(t){Ae(!Array.isArray(t),"EIP-1193 does not support batch request","payload",t);try{const n=await ee(this,Jm).call(this,t.method,t.params||[]);return[{id:t.id,result:n}]}catch(n){return[{id:t.id,error:{code:n.code,data:n.data,message:n.message}}]}}getRpcError(t,n){switch(n=JSON.parse(JSON.stringify(n)),n.error.code||-1){case 4001:n.error.message=`ethers-user-denied: ${n.error.message}`;break;case 4200:n.error.message=`ethers-unsupported: ${n.error.message}`;break}return super.getRpcError(t,n)}async hasSigner(t){t==null&&(t=0);const n=await this.send("eth_accounts",[]);return typeof t=="number"?n.length>t:(t=t.toLowerCase(),n.filter(i=>i.toLowerCase()===t).length!==0)}async getSigner(t){if(t==null&&(t=0),!await this.hasSigner(t))try{await ee(this,Jm).call(this,"eth_requestAccounts",[])}catch(n){const i=n.payload;throw this.getRpcError(i,{id:i.id,error:n})}return await super.getSigner(t)}}Jm=new WeakMap;const Jr={WALLET_ID:"@w3m/wallet_id",ERROR_CODE_UNRECOGNIZED_CHAIN_ID:4902,ERROR_CODE_DEFAULT:5e3},Zi={getCaipDefaultChain(r){if(r)return{id:`${ct.EIP155}:${r.chainId}`,name:r.name,imageId:As.EIP155NetworkImageIds[r.chainId],chain:vn.CHAIN.EVM}},hexStringToNumber(r){const e=r.startsWith("0x")?r.slice(2):r;return parseInt(e,16)},numberToHexString(r){return`0x${r.toString(16)}`},async getUserInfo(r){const[e,t]=await Promise.all([Zi.getAddresses(r),Zi.getChainId(r)]);return{chainId:t,addresses:e}},async getChainId(r){const e=await r.request({method:"eth_chainId"});return Number(e)},async getAddress(r){const[e]=await r.request({method:"eth_accounts"});return e},async getAddresses(r){return await r.request({method:"eth_accounts"})},async addEthereumChain(r,e){await r.request({method:"wallet_addEthereumChain",params:[{chainId:Zi.numberToHexString(e.chainId),rpcUrls:[e.rpcUrl],chainName:e.name,nativeCurrency:{name:e.currency,decimals:18,symbol:e.currency},blockExplorerUrls:[e.explorerUrl],iconUrls:[As.EIP155NetworkImageIds[e.chainId]]}]})}},Ai=ei({provider:void 0,providerType:void 0,address:void 0,chainId:void 0,status:"reconnecting",isConnected:!1}),Qe={state:Ai,subscribeKey(r,e){return po(Ai,r,e)},subscribe(r){return Ms(Ai,()=>r(Ai))},setProvider(r){r&&(Ai.provider=oa(r))},setProviderType(r){Ai.providerType=r},setAddress(r){Ai.address=r},setPreferredAccountType(r){Ai.preferredAccountType=r},setChainId(r){Ai.chainId=r},setStatus(r){Ai.status=r},setIsConnected(r){Ai.isConnected=r},setError(r){Ai.error=r},reset(){Ai.provider=void 0,Ai.address=void 0,Ai.chainId=void 0,Ai.providerType=void 0,Ai.status="disconnected",Ai.isConnected=!1,Ai.error=void 0,Ai.preferredAccountType=void 0}},Zn={setItem(r,e){z7()&&localStorage.setItem(r,JSON.stringify(e))},getItem(r){if(z7()){const e=localStorage.getItem(r);if(e)try{return JSON.parse(e)}catch{return null}}return null},removeItem(r){z7()&&localStorage.removeItem(r)}};function z7(){return typeof window<"u"&&typeof localStorage<"u"}class C9e{constructor(e){var o,a,c;this.appKit=void 0,this.hasSyncedConnectedAccount=!1,this.EIP6963Providers=[],this.projectId="",this.options=void 0,this.chain=vn.CHAIN.EVM,this.siweControllerClient=(o=this.options)==null?void 0:o.siweConfig,this.tokens=iP.getCaipTokens((a=this.options)==null?void 0:a.tokens),this.defaultChain=void 0;const{ethersConfig:t,siweConfig:n,chains:i,defaultChain:s}=e;if(!t)throw new Error("web3modal:constructor - ethersConfig is undefined");this.ethersConfig=t,this.siweControllerClient=(c=this.options)==null?void 0:c.siweConfig,this.tokens=iP.getCaipTokens(e.tokens),this.defaultChain=Zi.getCaipDefaultChain(s),this.chains=i,this.networkControllerClient={switchCaipNetwork:async l=>{const h=$c.caipNetworkIdToNumber(l==null?void 0:l.id);if(h)try{Qe.setError(void 0),await this.switchNetwork(h)}catch(f){throw Qe.setError(f),new Error("networkControllerClient:switchCaipNetwork - unable to switch chain")}},getApprovedCaipNetworksData:async()=>new Promise(async l=>{var f,v,y,A;const h=Zn.getItem(Jr.WALLET_ID);if(h!=null&&h.includes(ct.WALLET_CONNECT_CONNECTOR_ID)){const M=await this.getWalletConnectProvider();if(!M)throw new Error("networkControllerClient:getApprovedCaipNetworks - connector is undefined");const $=(v=(f=M.signer)==null?void 0:f.session)==null?void 0:v.namespaces,L=(y=$==null?void 0:$[ct.EIP155])==null?void 0:y.methods,P=I6e(((A=$==null?void 0:$[ct.EIP155])==null?void 0:A.accounts)||[]),H={supportsAllNetworks:(L==null?void 0:L.includes(ct.ADD_CHAIN_METHOD))??!1,approvedCaipNetworkIds:P};l(H)}else l({approvedCaipNetworkIds:void 0,supportsAllNetworks:!0})})},this.connectionControllerClient={connectWalletConnect:async l=>{var y,A,M,$,L,P,H,F,q,Y;const h=await this.getWalletConnectProvider();if(!h)throw new Error("connectionControllerClient:getWalletConnectUri - provider is undefined");h.on("display_uri",I=>{l(I)});const f=await(($=(M=(A=(y=h.signer)==null?void 0:y.client)==null?void 0:A.core)==null?void 0:M.crypto)==null?void 0:$.getClientId());f&&((L=this.appKit)==null||L.setClientId(f));const v=await((P=n==null?void 0:n.getMessageParams)==null?void 0:P.call(n));if((H=n==null?void 0:n.options)!=null&&H.enabled&&v&&Object.keys(v||{}).length>0){const{SIWEController:I,getDidChainId:T,getDidAddress:V}=await lc(async()=>{const{SIWEController:g,getDidChainId:m,getDidAddress:b}=await import("./index-DeuSBMQS.js");return{SIWEController:g,getDidChainId:m,getDidAddress:b}},[]),Q=$c.caipNetworkIdToNumber((q=(F=this.appKit)==null?void 0:F.getCaipNetwork())==null?void 0:q.id);let te=v.chains;Q&&(te=[Q,...v.chains.filter(g=>g!==Q)]);const oe=await h.authenticate({nonce:await n.getNonce(),methods:[...kW],...v,chains:te}),d=(Y=oe==null?void 0:oe.auths)==null?void 0:Y[0];if(d){const{p:g,s:m}=d,b=T(g.iss),E=V(g.iss);E&&b&&I.setSession({address:E,chainId:parseInt(b,10)});try{const C=h.signer.client.formatAuthMessage({request:g,iss:g.iss});await I.verifyMessage({message:C,signature:m.s,cacao:d})}catch(C){throw console.error("Error verifying message",C),await h.disconnect().catch(console.error),await I.signOut().catch(console.error),C}}}else await h.connect({optionalChains:this.chains.map(I=>I.chainId)});await this.setWalletConnectProvider()},connectExternal:async({id:l,info:h,provider:f})=>{var v;if((v=this.appKit)==null||v.setClientId(null),l===ct.INJECTED_CONNECTOR_ID){const y=t.injected;if(!y)throw new Error("connectionControllerClient:connectInjected - provider is undefined");try{Qe.setError(void 0),await y.request({method:"eth_requestAccounts"}),this.setInjectedProvider(t)}catch(A){Qe.setError(A)}}else if(l===ct.EIP6963_CONNECTOR_ID&&h&&f)try{Qe.setError(void 0),await f.request({method:"eth_requestAccounts"}),this.setEIP6963Provider(f,h.name)}catch(y){Qe.setError(y)}else if(l===ct.COINBASE_SDK_CONNECTOR_ID){const y=t.coinbase;if(!y)throw new Error("connectionControllerClient:connectCoinbase - connector is undefined");try{Qe.setError(void 0),await y.request({method:"eth_requestAccounts"}),this.setCoinbaseProvider(t)}catch(A){throw Qe.setError(A),new Error(A.message)}}else l===ct.AUTH_CONNECTOR_ID&&await this.setAuthProvider()},checkInstalled:l=>l?t.injected&&!(window!=null&&window.ethereum)?!1:l.some(h=>{var f;return!!((f=window.ethereum)!=null&&f[String(h)])}):!!window.ethereum,disconnect:async()=>{var f,v,y,A;const l=Qe.state.provider,h=Qe.state.providerType;if(Zn.removeItem(Jr.WALLET_ID),Qe.reset(),(f=this.appKit)==null||f.setClientId(null),(v=n==null?void 0:n.options)!=null&&v.signOutOnDisconnect){const{SIWEController:M}=await lc(async()=>{const{SIWEController:$}=await import("./index-DeuSBMQS.js");return{SIWEController:$}},[]);await M.signOut()}if(h===ct.WALLET_CONNECT_CONNECTOR_ID||h==="coinbaseWalletSDK")await l.disconnect();else if(h===ct.AUTH_CONNECTOR_ID)await((y=this.authProvider)==null?void 0:y.disconnect());else if(h===ct.EIP6963_CONNECTOR_ID&&l)await this.revokeProviderPermissions(l);else if(h===ct.INJECTED_CONNECTOR_ID){const M=t.injected;M&&await this.revokeProviderPermissions(M)}(A=l==null?void 0:l.emit)==null||A.call(l,"disconnect"),Zn.removeItem(Jr.WALLET_ID),Qe.reset()},signMessage:async l=>{const h=Qe.state.provider;if(!h)throw new Error("connectionControllerClient:signMessage - provider is undefined");const f=Tn(l)?l:Ft(Cu(l));return await h.request({method:"personal_sign",params:[f,this.getAddress()]})},parseUnits:(l,h)=>axe(l,h),formatUnits:(l,h)=>Az(l,h),async estimateGas(l){const{chainId:h,provider:f,address:v}=Qe.state;if(!f)throw new Error("connectionControllerClient:sendTransaction - provider is undefined");if(!v)throw new Error("connectionControllerClient:sendTransaction - address is undefined");const y={from:l.address,to:l.to,data:l.data,type:0},A=new W7(f,h);return await new um(A,v).estimateGas(y)},sendTransaction:async l=>{const{chainId:h,provider:f,address:v}=Qe.state;if(!f)throw new Error("ethersClient:sendTransaction - provider is undefined");if(!v)throw new Error("ethersClient:sendTransaction - address is undefined");const y={to:l.to,value:l.value,gasLimit:l.gas,gasPrice:l.gasPrice,data:l.data,type:0},A=new W7(f,h),L=await(await new um(A,v).sendTransaction(y)).wait();return(L==null?void 0:L.hash)||null},writeContract:async l=>{const{chainId:h,provider:f,address:v}=Qe.state;if(!f)throw new Error("ethersClient:writeContract - provider is undefined");if(!v)throw new Error("ethersClient:writeContract - address is undefined");const y=new W7(f,h),A=new um(y,v),M=new lm(l.tokenAddress,l.abi,A);if(!M||!l.method)throw new Error("Contract method is undefined");const $=M[l.method];if($)return await $(l.receiverAddress,l.tokenAmount);throw new Error("Contract method is undefined")},getEnsAddress:async l=>{var h,f,v;try{const y=$c.caipNetworkIdToNumber((f=(h=this.appKit)==null?void 0:h.getCaipNetwork())==null?void 0:f.id);let A=null,M=!1;return l!=null&&l.endsWith(vn.WC_NAME_SUFFIX)&&(M=await((v=this.appKit)==null?void 0:v.resolveWalletConnectName(l))||!1),y===1&&(A=await new Pp("mainnet").resolveName(l)),A||M||!1}catch{return!1}},getEnsAvatar:async l=>{const{chainId:h}=Qe.state;if(h&&h===1){const v=await new Pp("mainnet").getAvatar(l);return v||!1}return!1}}}construct(e,t){var n,i,s,o,a,c,l,h;if(!t.projectId)throw new Error("web3modal:initialize - projectId is undefined");this.appKit=e,this.options=t,this.projectId=t.projectId,this.metadata=this.ethersConfig.metadata,this.defaultChain&&((n=this.appKit)==null||n.setCaipNetwork(this.defaultChain)),this.createProvider(),Qe.subscribeKey("address",()=>{this.syncAccount()}),Qe.subscribeKey("chainId",()=>{this.syncNetwork()}),(i=this.appKit)==null||i.subscribeCaipNetworkChange(f=>{!this.getChainId()&&f&&Qe.setChainId($c.caipNetworkIdToNumber(f.id))}),(s=this.appKit)==null||s.subscribeShouldUpdateToAddress(f=>{f&&Qe.setAddress(Gr(f))}),this.syncRequestedNetworks(this.chains,(o=this.options)==null?void 0:o.chainImages),this.syncConnectors(this.ethersConfig),typeof window<"u"&&(this.listenConnectors(!0),this.checkActive6963Provider()),(a=this.appKit)==null||a.setEIP6963Enabled(this.ethersConfig.EIP6963),this.ethersConfig.injected&&this.checkActiveInjectedProvider(this.ethersConfig),((c=this.ethersConfig.auth)!=null&&c.email||(h=(l=this.ethersConfig.auth)==null?void 0:l.socials)!=null&&h.length)&&this.syncAuthConnector(this.options.projectId,this.ethersConfig.auth),this.ethersConfig.coinbase&&this.checkActiveCoinbaseProvider(this.ethersConfig)}getState(){var t;const e=(t=this.appKit)==null?void 0:t.getState();return{...e,selectedNetworkId:$c.caipNetworkIdToNumber(e==null?void 0:e.selectedNetworkId)}}subscribeState(e){var t;return(t=this.appKit)==null?void 0:t.subscribeState(n=>e({...n,selectedNetworkId:$c.caipNetworkIdToNumber(n.selectedNetworkId)}))}setAddress(e){const t=e?Gr(e):void 0;Qe.setAddress(t)}getAddress(){const{address:e}=Qe.state;return e?Gr(e):void 0}getError(){return Qe.state.error}getChainId(){var n,i;const e=Qe.state.chainId,t=$c.caipNetworkIdToNumber((i=(n=this.appKit)==null?void 0:n.getCaipNetwork())==null?void 0:i.id);return e??t}getStatus(){return Qe.state.status}getIsConnected(){return Qe.state.isConnected}getWalletProvider(){return Qe.state.provider}getWalletProviderType(){return Qe.state.providerType}subscribeProvider(e){return Qe.subscribe(e)}async disconnect(){var n,i;const{provider:e,providerType:t}=Qe.state;if(Zn.removeItem(Jr.WALLET_ID),Qe.reset(),(n=this.appKit)==null||n.setClientId(null),t===ct.AUTH_CONNECTOR_ID)await((i=this.authProvider)==null?void 0:i.disconnect());else if(e&&(t==="injected"||t==="eip6963"))await this.revokeProviderPermissions(e),e==null||e.emit("disconnect");else if(t==="walletConnect"||t==="coinbaseWalletSDK"){const s=e;if(s)try{Qe.setError(void 0),await s.disconnect()}catch(o){Qe.setError(o)}}}createProvider(){return!this.walletConnectProviderInitPromise&&typeof window<"u"&&(this.walletConnectProviderInitPromise=this.initWalletConnectProvider()),this.walletConnectProviderInitPromise}async initWalletConnectProvider(){const e=this.chains?this.chains.reduce((n,i)=>(n[i.chainId]=i.rpcUrl,n),{}):{},t={projectId:this.projectId,showQrModal:!1,rpcMap:e,optionalChains:[...this.chains.map(n=>n.chainId)],metadata:{name:this.metadata?this.metadata.name:"",description:this.metadata?this.metadata.description:"",url:this.metadata?this.metadata.url:"",icons:this.metadata?this.metadata.icons:[""]}};this.walletConnectProvider=await x6e.init(t),await this.checkActiveWalletConnectProvider()}async revokeProviderPermissions(e){try{(await e.request({method:"wallet_getPermissions"})).find(i=>i.parentCapability==="eth_accounts")&&await e.request({method:"wallet_revokePermissions",params:[{eth_accounts:{}}]})}catch(t){console.info("Could not revoke permissions from wallet. Disconnecting...",t)}}async getWalletConnectProvider(){if(!this.walletConnectProvider)try{Qe.setError(void 0),await this.createProvider()}catch(e){Qe.setError(e)}return this.walletConnectProvider}syncRequestedNetworks(e,t){var i;const n=e==null?void 0:e.map(s=>({id:`${ct.EIP155}:${s.chainId}`,name:s.name,imageId:As.EIP155NetworkImageIds[s.chainId],imageUrl:t==null?void 0:t[s.chainId],chain:vn.CHAIN.EVM}));(i=this.appKit)==null||i.setRequestedCaipNetworks(n??[],this.chain)}async checkActiveWalletConnectProvider(){const e=await this.getWalletConnectProvider(),t=Zn.getItem(Jr.WALLET_ID);e&&t===ct.WALLET_CONNECT_CONNECTOR_ID&&await this.setWalletConnectProvider();const n=Qe.state.isConnected;Qe.setStatus(n?"connected":"disconnected")}checkActiveInjectedProvider(e){const t=e.injected,n=Zn.getItem(Jr.WALLET_ID);t&&n===ct.INJECTED_CONNECTOR_ID&&(this.setInjectedProvider(e),this.watchInjected(e))}checkActiveCoinbaseProvider(e){var i;const t=e.coinbase,n=Zn.getItem(Jr.WALLET_ID);t&&n===ct.COINBASE_SDK_CONNECTOR_ID&&(t.accounts&&((i=t.accounts)==null?void 0:i.length)>0?(this.setCoinbaseProvider(e),this.watchCoinbase(e)):(Zn.removeItem(Jr.WALLET_ID),Qe.reset()))}checkActive6963Provider(){const e=Zn.getItem(Jr.WALLET_ID);if(e){const t=this.EIP6963Providers.find(n=>n.info.name===e);t&&this.setEIP6963Provider(t.provider,t.info.name)}}async setWalletConnectProvider(){var t,n,i,s,o;Zn.setItem(Jr.WALLET_ID,ct.WALLET_CONNECT_CONNECTOR_ID);const e=await this.getWalletConnectProvider();if(e){Qe.setChainId(e.chainId),Qe.setProviderType("walletConnect"),Qe.setProvider(e),Qe.setStatus("connected"),Qe.setIsConnected(!0),(t=this.appKit)==null||t.setAllAccounts(e.accounts.map(c=>({address:c,type:"eoa"})),this.chain);const a=(n=e.signer)==null?void 0:n.session;for(const c of e.accounts){const l=(i=a==null?void 0:a.sessionProperties)==null?void 0:i[c];l&&((s=this.appKit)==null||s.addAddressLabel(c,l,this.chain))}this.setAddress((o=e.accounts)==null?void 0:o[0]),this.watchWalletConnect()}}async setInjectedProvider(e){var n;Zn.setItem(Jr.WALLET_ID,ct.INJECTED_CONNECTOR_ID);const t=e.injected;if(t){const{addresses:i,chainId:s}=await Zi.getUserInfo(t);i!=null&&i[0]&&s&&(Qe.setChainId(s),Qe.setProviderType("injected"),Qe.setProvider(e.injected),Qe.setStatus("connected"),Qe.setIsConnected(!0),(n=this.appKit)==null||n.setAllAccounts(i.map(o=>({address:o,type:"eoa"})),this.chain),this.setAddress(i[0]),this.watchCoinbase(e))}}async setEIP6963Provider(e,t){var n;if(Zn.setItem(Jr.WALLET_ID,t),e){const{addresses:i,chainId:s}=await Zi.getUserInfo(e);i!=null&&i[0]&&s&&(Qe.setChainId(s),Qe.setProviderType("eip6963"),Qe.setProvider(e),Qe.setStatus("connected"),Qe.setIsConnected(!0),(n=this.appKit)==null||n.setAllAccounts(i.map(o=>({address:o,type:"eoa"})),this.chain),this.setAddress(i[0]),this.watchEIP6963(e))}}async setCoinbaseProvider(e){var n;Zn.setItem(Jr.WALLET_ID,ct.COINBASE_SDK_CONNECTOR_ID);const t=e.coinbase;if(t){const{addresses:i,chainId:s}=await Zi.getUserInfo(t);i!=null&&i[0]&&s&&(Qe.setChainId(s),Qe.setProviderType("coinbaseWalletSDK"),Qe.setProvider(e.coinbase),Qe.setStatus("connected"),Qe.setIsConnected(!0),(n=this.appKit)==null||n.setAllAccounts(i.map(o=>({address:o,type:"eoa"})),this.chain),this.setAddress(i[0]),this.watchCoinbase(e))}}async setAuthProvider(){var e,t,n,i,s;if(Zn.setItem(Jr.WALLET_ID,ct.AUTH_CONNECTOR_ID),this.authProvider){(e=this.appKit)==null||e.setLoading(!0);const{address:o,chainId:a,smartAccountDeployed:c,preferredAccountType:l,accounts:h=[]}=await this.authProvider.connect({chainId:this.getChainId()}),{smartAccountEnabledNetworks:f}=await this.authProvider.getSmartAccountEnabledNetworks();(t=this.appKit)==null||t.setSmartAccountEnabledNetworks(f,this.chain),o&&a&&((n=this.appKit)==null||n.setAllAccounts(h.length>0?h:[{address:o,type:l}],this.chain),Qe.setChainId($c.parseEvmChainId(a)),Qe.setProviderType(ct.AUTH_CONNECTOR_ID),Qe.setProvider(this.authProvider),Qe.setStatus("connected"),Qe.setIsConnected(!0),Qe.setAddress(o),Qe.setPreferredAccountType(l),(i=this.appKit)==null||i.setSmartAccountDeployed(!!c,this.chain),this.watchAuth(),this.watchModal()),(s=this.appKit)==null||s.setLoading(!1)}}async watchWalletConnect(){const e=await this.getWalletConnectProvider();function t(){Zn.removeItem(Jr.WALLET_ID),Qe.reset(),e==null||e.removeListener("disconnect",t),e==null||e.removeListener("accountsChanged",i),e==null||e.removeListener("chainChanged",n)}function n(s){if(s){const o=Zi.hexStringToNumber(s);Qe.setChainId(o)}}const i=async s=>{s.length>0&&await this.setWalletConnectProvider()};e&&(e.on("disconnect",t),e.on("accountsChanged",i),e.on("chainChanged",n))}watchInjected(e){const t=e.injected;function n(){Zn.removeItem(Jr.WALLET_ID),Qe.reset(),t==null||t.removeListener("disconnect",n),t==null||t.removeListener("accountsChanged",i),t==null||t.removeListener("chainChanged",s)}function i(o){const a=o==null?void 0:o[0];a?Qe.setAddress(Gr(a)):(Zn.removeItem(Jr.WALLET_ID),Qe.reset())}function s(o){if(o){const a=typeof o=="string"?Zi.hexStringToNumber(o):Number(o);Qe.setChainId(a)}}t&&(t.on("disconnect",n),t.on("accountsChanged",i),t.on("chainChanged",s))}watchEIP6963(e){function t(){Zn.removeItem(Jr.WALLET_ID),Qe.reset(),e.removeListener("disconnect",t),e.removeListener("accountsChanged",n),e.removeListener("chainChanged",i)}const n=s=>{var a,c;const o=s==null?void 0:s[0];o?(Qe.setAddress(Gr(o)),(a=this.appKit)==null||a.setAllAccounts(s.map(l=>({address:l,type:"eoa"})),this.chain)):((c=this.appKit)==null||c.setAllAccounts([],this.chain),Zn.removeItem(Jr.WALLET_ID),Qe.reset())};function i(s){if(s){const o=typeof s=="string"?Zi.hexStringToNumber(s):Number(s);Qe.setChainId(o)}}e&&(e.on("disconnect",t),e.on("accountsChanged",n),e.on("chainChanged",i))}watchCoinbase(e){const t=e.coinbase,n=Zn.getItem(Jr.WALLET_ID);function i(){Zn.removeItem(Jr.WALLET_ID),Qe.reset(),t==null||t.removeListener("disconnect",i),t==null||t.removeListener("accountsChanged",s),t==null||t.removeListener("chainChanged",o)}function s(a){const c=a==null?void 0:a[0];c?Qe.setAddress(Gr(c)):(Zn.removeItem(Jr.WALLET_ID),Qe.reset())}function o(a){if(a&&n===ct.COINBASE_SDK_CONNECTOR_ID){const c=Number(a);Qe.setChainId(c)}}t&&(t.on("disconnect",i),t.on("accountsChanged",s),t.on("chainChanged",o))}watchAuth(){this.authProvider&&(this.authProvider.onRpcRequest(e=>{var t,n,i,s,o,a,c;if(Ys.checkIfRequestExists(e)){if(!Ys.checkIfRequestIsAllowed(e))if((t=this.appKit)!=null&&t.isOpen()){if((n=this.appKit)!=null&&n.isTransactionStackEmpty())return;(i=this.appKit)!=null&&i.isTransactionShouldReplaceView()?(s=this.appKit)==null||s.replace("ApproveTransaction"):(o=this.appKit)==null||o.redirect("ApproveTransaction")}else(a=this.appKit)==null||a.open({view:"ApproveTransaction"})}else(c=this.appKit)==null||c.open(),console.error(_r.RPC_METHOD_NOT_ALLOWED_MESSAGE,{method:e.method}),setTimeout(()=>{var l;(l=this.appKit)==null||l.showErrorMessage(_r.RPC_METHOD_NOT_ALLOWED_UI_MESSAGE)},300)}),this.authProvider.onRpcError(()=>{var t,n,i,s;((t=this.appKit)==null?void 0:t.isOpen())&&((n=this.appKit)!=null&&n.isTransactionStackEmpty()?(i=this.appKit)==null||i.close():(s=this.appKit)==null||s.popTransactionStack(!0))}),this.authProvider.onRpcSuccess(()=>{var e,t,n;(e=this.appKit)!=null&&e.isTransactionStackEmpty()?(t=this.appKit)==null||t.close():(n=this.appKit)==null||n.popTransactionStack()}),this.authProvider.onNotConnected(()=>{var e,t;(e=this.appKit)==null||e.setIsConnected(!1,this.chain),(t=this.appKit)==null||t.setLoading(!1)}),this.authProvider.onIsConnected(({preferredAccountType:e})=>{var t,n;(t=this.appKit)==null||t.setIsConnected(!0,this.chain),(n=this.appKit)==null||n.setLoading(!1),Qe.setPreferredAccountType(e)}),this.authProvider.onSetPreferredAccount(({address:e,type:t})=>{var i,s,o;if(!e)return;(i=this.appKit)==null||i.setLoading(!0);const n=$c.caipNetworkIdToNumber((o=(s=this.appKit)==null?void 0:s.getCaipNetwork())==null?void 0:o.id);Qe.setAddress(e),Qe.setChainId(n),Qe.setStatus("connected"),Qe.setIsConnected(!0),Qe.setPreferredAccountType(t),this.syncAccount().then(()=>{var a;return(a=this.appKit)==null?void 0:a.setLoading(!1)})}))}watchModal(){this.authProvider&&this.subscribeState(e=>{var t;e.open||(t=this.authProvider)==null||t.rejectRpcRequests()})}async syncAccount(){var s,o,a,c,l,h,f,v,y;const e=Qe.state.address,t=Qe.state.chainId,n=Qe.state.isConnected,i=Qe.state.preferredAccountType;if((s=this.appKit)==null||s.resetAccount(this.chain),n&&e&&t){const A=`${ct.EIP155}:${t}:${e}`;(o=this.appKit)==null||o.setIsConnected(n,this.chain),(a=this.appKit)==null||a.setPreferredAccountType(i,this.chain),(c=this.appKit)==null||c.setCaipAddress(A,this.chain),this.syncConnectedWalletInfo();const M=this.chains.find($=>$.chainId===t);M!=null&&M.explorerUrl&&((l=this.appKit)==null||l.setAddressExplorerUrl(`${M.explorerUrl}/address/${e}`,this.chain)),await Promise.all([this.syncProfile(e),this.syncBalance(e),(h=this.appKit)==null?void 0:h.setApprovedCaipNetworksData(this.chain)]),this.hasSyncedConnectedAccount=!0}else!n&&this.hasSyncedConnectedAccount&&((f=this.appKit)==null||f.resetWcConnection(),(v=this.appKit)==null||v.resetNetwork(),(y=this.appKit)==null||y.setAllAccounts([],this.chain))}async syncNetwork(){var s,o,a,c,l,h;const e=(s=this.options)==null?void 0:s.chainImages,t=Qe.state.address,n=Qe.state.chainId,i=Qe.state.isConnected;if(this.chains){const f=this.chains.find(v=>v.chainId===n);if(f){const v=`${ct.EIP155}:${f.chainId}`;if((o=this.appKit)==null||o.setCaipNetwork({id:v,name:f.name,imageId:As.EIP155NetworkImageIds[f.chainId],imageUrl:e==null?void 0:e[f.chainId],chain:this.chain}),i&&t){const y=`${ct.EIP155}:${n}:${t}`;if((a=this.appKit)==null||a.setCaipAddress(y,this.chain),f.explorerUrl){const A=`${f.explorerUrl}/address/${t}`;(c=this.appKit)==null||c.setAddressExplorerUrl(A,this.chain)}else(l=this.appKit)==null||l.setAddressExplorerUrl(void 0,this.chain);this.hasSyncedConnectedAccount&&(await this.syncProfile(t),await this.syncBalance(t))}}else i&&((h=this.appKit)==null||h.setCaipNetwork({id:`${ct.EIP155}:${n}`,chain:this.chain}))}}async syncWalletConnectName(e){var t,n,i,s;try{const o=await((t=this.appKit)==null?void 0:t.getWalletConnectName(e));if(o!=null&&o[0]){const a=o[0];(n=this.appKit)==null||n.setProfileName(a.name,this.chain)}else(i=this.appKit)==null||i.setProfileName(null,this.chain)}catch{(s=this.appKit)==null||s.setProfileName(null,this.chain)}}async syncProfile(e){var n,i,s,o,a,c;const t=Qe.state.chainId;try{const l=await((n=this.appKit)==null?void 0:n.fetchIdentity({address:e})),h=l==null?void 0:l.name,f=l==null?void 0:l.avatar;(i=this.appKit)==null||i.setProfileName(h,this.chain),(s=this.appKit)==null||s.setProfileImage(f,this.chain),h||await this.syncWalletConnectName(e)}catch{if(t===1){const l=new Pp("mainnet"),h=await l.lookupAddress(e),f=await l.getAvatar(e);h?(o=this.appKit)==null||o.setProfileName(h,this.chain):await this.syncWalletConnectName(e),f&&((a=this.appKit)==null||a.setProfileImage(f,this.chain))}else await this.syncWalletConnectName(e),(c=this.appKit)==null||c.setProfileImage(null,this.chain)}}async syncBalance(e){var n;const t=Qe.state.chainId;if(t&&this.chains){const i=this.chains.find(s=>s.chainId===t);if(i){const s=new sq(i.rpcUrl,{chainId:t,name:i.name});if(s){const o=await s.getBalance(e),a=cxe(o);(n=this.appKit)==null||n.setBalance(a,i.currency,this.chain)}}}}syncConnectedWalletInfo(){var n,i,s,o,a,c,l;const e=Zn.getItem(Jr.WALLET_ID),t=Qe.state.providerType;if(t===ct.EIP6963_CONNECTOR_ID){if(e){const h=this.EIP6963Providers.find(f=>f.info.name===e);h&&((n=this.appKit)==null||n.setConnectedWalletInfo({...h.info},this.chain))}}else if(t===ct.WALLET_CONNECT_CONNECTOR_ID){const h=Qe.state.provider;h.session&&((s=this.appKit)==null||s.setConnectedWalletInfo({...h.session.peer.metadata,name:h.session.peer.metadata.name,icon:(i=h.session.peer.metadata.icons)==null?void 0:i[0]},this.chain))}else if(t===ct.COINBASE_SDK_CONNECTOR_ID){const h=(o=this.appKit)==null?void 0:o.getConnectors().find(f=>f.id===ct.COINBASE_SDK_CONNECTOR_ID);(c=this.appKit)==null||c.setConnectedWalletInfo({name:"Coinbase Wallet",icon:(a=this.appKit)==null?void 0:a.getConnectorImage(h)},this.chain)}else e&&((l=this.appKit)==null||l.setConnectedWalletInfo({name:e},this.chain))}async switchNetwork(e){var i,s,o,a,c,l,h,f;const t=Qe.state.provider,n=Qe.state.providerType;if(this.chains){const v=this.chains.find(y=>y.chainId===e);if(n===ct.WALLET_CONNECT_CONNECTOR_ID&&v){const y=t;if(y)try{await y.request({method:"wallet_switchEthereumChain",params:[{chainId:Zi.numberToHexString(v.chainId)}]}),Qe.setChainId(e)}catch(A){const M=A==null?void 0:A.message;if(/(?user rejected)/u.test(M==null?void 0:M.toLowerCase()))throw new Error("Chain is not supported");await Zi.addEthereumChain(y,v)}}else if(n===ct.INJECTED_CONNECTOR_ID&&v){const y=t;if(y)try{await y.request({method:"wallet_switchEthereumChain",params:[{chainId:Zi.numberToHexString(v.chainId)}]}),Qe.setChainId(v.chainId)}catch(A){if(A.code===Jr.ERROR_CODE_UNRECOGNIZED_CHAIN_ID||A.code===Jr.ERROR_CODE_DEFAULT||((s=(i=A==null?void 0:A.data)==null?void 0:i.originalError)==null?void 0:s.code)===Jr.ERROR_CODE_UNRECOGNIZED_CHAIN_ID)await Zi.addEthereumChain(y,v);else throw new Error("Chain is not supported")}}else if(n===ct.EIP6963_CONNECTOR_ID&&v){const y=t;if(y)try{await y.request({method:"wallet_switchEthereumChain",params:[{chainId:Zi.numberToHexString(v.chainId)}]}),Qe.setChainId(v.chainId)}catch(A){if(A.code===Jr.ERROR_CODE_UNRECOGNIZED_CHAIN_ID||A.code===Jr.ERROR_CODE_DEFAULT||((a=(o=A==null?void 0:A.data)==null?void 0:o.originalError)==null?void 0:a.code)===Jr.ERROR_CODE_UNRECOGNIZED_CHAIN_ID)await Zi.addEthereumChain(y,v);else throw new Error("Chain is not supported")}}else if(n===ct.COINBASE_SDK_CONNECTOR_ID&&v){const y=t;if(y)try{await y.request({method:"wallet_switchEthereumChain",params:[{chainId:Zi.numberToHexString(v.chainId)}]}),Qe.setChainId(v.chainId)}catch(A){if(A.code===Jr.ERROR_CODE_UNRECOGNIZED_CHAIN_ID||A.code===Jr.ERROR_CODE_DEFAULT||((l=(c=A==null?void 0:A.data)==null?void 0:c.originalError)==null?void 0:l.code)===Jr.ERROR_CODE_UNRECOGNIZED_CHAIN_ID)await Zi.addEthereumChain(y,v);else throw new Error("Error switching network")}}else if(n===ct.AUTH_CONNECTOR_ID&&this.authProvider&&v!=null&&v.chainId)try{(h=this.appKit)==null||h.setLoading(!0),await this.authProvider.switchNetwork(v==null?void 0:v.chainId),Qe.setChainId(v.chainId);const{address:y,preferredAccountType:A}=await this.authProvider.connect({chainId:v==null?void 0:v.chainId});Qe.setAddress(y),Qe.setPreferredAccountType(A),await this.syncAccount()}catch{throw new Error("Switching chain failed")}finally{(f=this.appKit)==null||f.setLoading(!1)}}}syncConnectors(e){var i,s,o,a,c,l,h;const t=[],n=As.ConnectorTypesMap[ct.WALLET_CONNECT_CONNECTOR_ID];if(t.push({id:ct.WALLET_CONNECT_CONNECTOR_ID,explorerId:As.ConnectorExplorerIds[ct.WALLET_CONNECT_CONNECTOR_ID],imageId:As.ConnectorImageIds[ct.WALLET_CONNECT_CONNECTOR_ID],imageUrl:(s=(i=this.options)==null?void 0:i.connectorImages)==null?void 0:s[ct.WALLET_CONNECT_CONNECTOR_ID],name:As.ConnectorNamesMap[ct.WALLET_CONNECT_CONNECTOR_ID],type:n,chain:this.chain}),e.injected){const f=As.ConnectorTypesMap[ct.INJECTED_CONNECTOR_ID];t.push({id:ct.INJECTED_CONNECTOR_ID,explorerId:As.ConnectorExplorerIds[ct.INJECTED_CONNECTOR_ID],imageId:As.ConnectorImageIds[ct.INJECTED_CONNECTOR_ID],imageUrl:(a=(o=this.options)==null?void 0:o.connectorImages)==null?void 0:a[ct.INJECTED_CONNECTOR_ID],name:As.ConnectorNamesMap[ct.INJECTED_CONNECTOR_ID],type:f,chain:this.chain})}e.coinbase&&t.push({id:ct.COINBASE_SDK_CONNECTOR_ID,explorerId:As.ConnectorExplorerIds[ct.COINBASE_SDK_CONNECTOR_ID],imageId:As.ConnectorImageIds[ct.COINBASE_SDK_CONNECTOR_ID],imageUrl:(l=(c=this.options)==null?void 0:c.connectorImages)==null?void 0:l[ct.COINBASE_SDK_CONNECTOR_ID],name:As.ConnectorNamesMap[ct.COINBASE_SDK_CONNECTOR_ID],type:"EXTERNAL",chain:this.chain}),(h=this.appKit)==null||h.setConnectors(t)}async syncAuthConnector(e,t){var n,i,s,o;if(typeof window<"u"){this.authProvider=new dae(e),(n=this.appKit)==null||n.addConnector({id:ct.AUTH_CONNECTOR_ID,type:"AUTH",name:"Auth",provider:this.authProvider,email:t==null?void 0:t.email,socials:t==null?void 0:t.socials,showWallets:(t==null?void 0:t.showWallets)===void 0?!0:t.showWallets,chain:this.chain,walletFeatures:t==null?void 0:t.walletFeatures}),(i=this.appKit)==null||i.setLoading(!0);const a=this.authProvider.getLoginEmailUsed();(s=this.appKit)==null||s.setLoading(a);const{isConnected:c}=await this.authProvider.isConnected();c?await this.setAuthProvider():(o=this.appKit)==null||o.setLoading(!1)}}eip6963EventHandler(e){var t,n,i,s;if(e.detail){const{info:o,provider:a}=e.detail,c=(t=this.appKit)==null?void 0:t.getConnectors();if(!(c==null?void 0:c.find(h=>h.name===o.name))){const h=As.ConnectorTypesMap[ct.EIP6963_CONNECTOR_ID];{(s=this.appKit)==null||s.addConnector({id:ct.EIP6963_CONNECTOR_ID,type:h,imageUrl:o.icon??((i=(n=this.options)==null?void 0:n.connectorImages)==null?void 0:i[ct.EIP6963_CONNECTOR_ID]),name:o.name,provider:a,info:o,chain:this.chain});const f={provider:a,info:o};this.EIP6963Providers.push(f)}}}}listenConnectors(e){if(typeof window<"u"&&e){const t=this.eip6963EventHandler.bind(this);window.addEventListener(ct.EIP6963_ANNOUNCE_EVENT,t),window.dispatchEvent(new Event(ct.EIP6963_REQUEST_EVENT))}}}var oq={},ny={},lx={};Object.defineProperty(lx,"__esModule",{value:!0});lx.walletLogo=void 0;const S9e=(r,e)=>{let t;switch(r){case"standard":return t=e,`data:image/svg+xml,%3Csvg width='${e}' height='${t}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `;case"circle":return t=e,`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${e}' height='${t}' viewBox='0 0 999.81 999.81'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052fe;%7D.cls-2%7Bfill:%23fefefe;%7D.cls-3%7Bfill:%230152fe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M655-115.9h56c.83,1.59,2.36.88,3.56,1a478,478,0,0,1,75.06,10.42C891.4-81.76,978.33-32.58,1049.19,44q116.7,126,131.94,297.61c.38,4.14-.34,8.53,1.78,12.45v59c-1.58.84-.91,2.35-1,3.56a482.05,482.05,0,0,1-10.38,74.05c-24,106.72-76.64,196.76-158.83,268.93s-178.18,112.82-287.2,122.6c-4.83.43-9.86-.25-14.51,1.77H654c-1-1.68-2.69-.91-4.06-1a496.89,496.89,0,0,1-105.9-18.59c-93.54-27.42-172.78-77.59-236.91-150.94Q199.34,590.1,184.87,426.58c-.47-5.19.25-10.56-1.77-15.59V355c1.68-1,.91-2.7,1-4.06a498.12,498.12,0,0,1,18.58-105.9c26-88.75,72.64-164.9,140.6-227.57q126-116.27,297.21-131.61C645.32-114.57,650.35-113.88,655-115.9Zm377.92,500c0-192.44-156.31-349.49-347.56-350.15-194.13-.68-350.94,155.13-352.29,347.42-1.37,194.55,155.51,352.1,348.56,352.47C876.15,734.23,1032.93,577.84,1032.93,384.11Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-2' d='M1032.93,384.11c0,193.73-156.78,350.12-351.29,349.74-193-.37-349.93-157.92-348.56-352.47C334.43,189.09,491.24,33.28,685.37,34,876.62,34.62,1032.94,191.67,1032.93,384.11ZM683,496.81q43.74,0,87.48,0c15.55,0,25.32-9.72,25.33-25.21q0-87.48,0-175c0-15.83-9.68-25.46-25.59-25.46H595.77c-15.88,0-25.57,9.64-25.58,25.46q0,87.23,0,174.45c0,16.18,9.59,25.7,25.84,25.71Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-3' d='M683,496.81H596c-16.25,0-25.84-9.53-25.84-25.71q0-87.23,0-174.45c0-15.82,9.7-25.46,25.58-25.46H770.22c15.91,0,25.59,9.63,25.59,25.46q0,87.47,0,175c0,15.49-9.78,25.2-25.33,25.21Q726.74,496.84,683,496.81Z' transform='translate(-183.1 115.9)'/%3E%3C/svg%3E`;case"text":return t=(.1*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${t}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case"textWithLogo":return t=(.25*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${t}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;case"textLight":return t=(.1*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${t}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case"textWithLogoLight":return t=(.25*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${t}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;default:return t=e,`data:image/svg+xml,%3Csvg width='${e}' height='${t}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `}};lx.walletLogo=S9e;var ux={},aq={exports:{}};(function(r){var e=Object.prototype.hasOwnProperty,t="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(t=!1));function i(c,l,h){this.fn=c,this.context=l,this.once=h||!1}function s(c,l,h,f,v){if(typeof h!="function")throw new TypeError("The listener must be a function");var y=new i(h,f||c,v),A=t?t+l:l;return c._events[A]?c._events[A].fn?c._events[A]=[c._events[A],y]:c._events[A].push(y):(c._events[A]=y,c._eventsCount++),c}function o(c,l){--c._eventsCount===0?c._events=new n:delete c._events[l]}function a(){this._events=new n,this._eventsCount=0}a.prototype.eventNames=function(){var l=[],h,f;if(this._eventsCount===0)return l;for(f in h=this._events)e.call(h,f)&&l.push(t?f.slice(1):f);return Object.getOwnPropertySymbols?l.concat(Object.getOwnPropertySymbols(h)):l},a.prototype.listeners=function(l){var h=t?t+l:l,f=this._events[h];if(!f)return[];if(f.fn)return[f.fn];for(var v=0,y=f.length,A=new Array(y);v=-32099&&v<=-32e3}function l(v){return v&&typeof v=="object"&&!Array.isArray(v)?Object.assign({},v):v}function h(v,y){return Object.prototype.hasOwnProperty.call(v,y)}function f(v,y){return typeof v=="object"&&v!==null&&y in v&&typeof v[y]=="string"}})(qT);Object.defineProperty(hx,"__esModule",{value:!0});hx.standardErrors=void 0;const ns=yd,cq=qT;hx.standardErrors={rpc:{parse:r=>za(ns.standardErrorCodes.rpc.parse,r),invalidRequest:r=>za(ns.standardErrorCodes.rpc.invalidRequest,r),invalidParams:r=>za(ns.standardErrorCodes.rpc.invalidParams,r),methodNotFound:r=>za(ns.standardErrorCodes.rpc.methodNotFound,r),internal:r=>za(ns.standardErrorCodes.rpc.internal,r),server:r=>{if(!r||typeof r!="object"||Array.isArray(r))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:e}=r;if(!Number.isInteger(e)||e>-32005||e<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return za(e,r)},invalidInput:r=>za(ns.standardErrorCodes.rpc.invalidInput,r),resourceNotFound:r=>za(ns.standardErrorCodes.rpc.resourceNotFound,r),resourceUnavailable:r=>za(ns.standardErrorCodes.rpc.resourceUnavailable,r),transactionRejected:r=>za(ns.standardErrorCodes.rpc.transactionRejected,r),methodNotSupported:r=>za(ns.standardErrorCodes.rpc.methodNotSupported,r),limitExceeded:r=>za(ns.standardErrorCodes.rpc.limitExceeded,r)},provider:{userRejectedRequest:r=>gg(ns.standardErrorCodes.provider.userRejectedRequest,r),unauthorized:r=>gg(ns.standardErrorCodes.provider.unauthorized,r),unsupportedMethod:r=>gg(ns.standardErrorCodes.provider.unsupportedMethod,r),disconnected:r=>gg(ns.standardErrorCodes.provider.disconnected,r),chainDisconnected:r=>gg(ns.standardErrorCodes.provider.chainDisconnected,r),unsupportedChain:r=>gg(ns.standardErrorCodes.provider.unsupportedChain,r),custom:r=>{if(!r||typeof r!="object"||Array.isArray(r))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:e,message:t,data:n}=r;if(!t||typeof t!="string")throw new Error('"message" must be a nonempty string');return new hq(e,t,n)}}};function za(r,e){const[t,n]=lq(e);return new uq(r,t||(0,cq.getMessageFromCode)(r),n)}function gg(r,e){const[t,n]=lq(e);return new hq(r,t||(0,cq.getMessageFromCode)(r),n)}function lq(r){if(r){if(typeof r=="string")return[r];if(typeof r=="object"&&!Array.isArray(r)){const{message:e,data:t}=r;if(e&&typeof e!="string")throw new Error("Must specify string message.");return[e||void 0,t]}}return[]}class uq extends Error{constructor(e,t,n){if(!Number.isInteger(e))throw new Error('"code" must be an integer.');if(!t||typeof t!="string")throw new Error('"message" must be a nonempty string.');super(t),this.code=e,n!==void 0&&(this.data=n)}}class hq extends uq{constructor(e,t,n){if(!T9e(e))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,t,n)}}function T9e(r){return Number.isInteger(r)&&r>=1e3&&r<=4999}(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.standardErrors=r.standardErrorCodes=void 0;var e=yd;Object.defineProperty(r,"standardErrorCodes",{enumerable:!0,get:function(){return e.standardErrorCodes}});var t=hx;Object.defineProperty(r,"standardErrors",{enumerable:!0,get:function(){return t.standardErrors}})})(th);var dx={},d2={};Object.defineProperty(d2,"__esModule",{value:!0});d2.isErrorResponse=void 0;function R9e(r){return r.errorMessage!==void 0}d2.isErrorResponse=R9e;var $1={};Object.defineProperty($1,"__esModule",{value:!0});$1.LIB_VERSION=void 0;$1.LIB_VERSION="4.0.3";Object.defineProperty(dx,"__esModule",{value:!0});dx.serializeError=void 0;const k9e=d2,N9e=$1,P9e=yd,O9e=qT;function M9e(r,e){const t=(0,O9e.serialize)(D9e(r),{shouldIncludeStack:!0}),n=new URL("https://docs.cloud.coinbase.com/wallet-sdk/docs/errors");n.searchParams.set("version",N9e.LIB_VERSION),n.searchParams.set("code",t.code.toString());const i=$9e(t.data,e);return i&&n.searchParams.set("method",i),n.searchParams.set("message",t.message),Object.assign(Object.assign({},t),{docUrl:n.href})}dx.serializeError=M9e;function D9e(r){return typeof r=="string"?{message:r,code:P9e.standardErrorCodes.rpc.internal}:(0,k9e.isErrorResponse)(r)?Object.assign(Object.assign({},r),{message:r.errorMessage,code:r.errorCode,data:{method:r.method}}):r}function $9e(r,e){const t=r==null?void 0:r.method;if(t)return t;if(e!==void 0){if(typeof e=="string")return e;if(Array.isArray(e)){if(e.length>0)return e[0].method}else return e.method}}var Ts={};Object.defineProperty(Ts,"__esModule",{value:!0});Ts.RegExpString=Ts.IntNumber=Ts.BigIntString=Ts.AddressString=Ts.HexString=Ts.OpaqueType=void 0;function pb(){return r=>r}Ts.OpaqueType=pb;Ts.HexString=pb();Ts.AddressString=pb();Ts.BigIntString=pb();function B9e(r){return Math.floor(r)}Ts.IntNumber=B9e;Ts.RegExpString=pb();var Jt={};Object.defineProperty(Jt,"__esModule",{value:!0});Jt.areAddressArraysEqual=Jt.getFavicon=Jt.range=Jt.isBigNumber=Jt.ensureParsedJSONObject=Jt.ensureBigInt=Jt.ensureRegExpString=Jt.ensureIntNumber=Jt.ensureBuffer=Jt.ensureAddressString=Jt.ensureEvenLengthHexString=Jt.ensureHexString=Jt.isHexString=Jt.prepend0x=Jt.strip0x=Jt.has0xPrefix=Jt.hexStringFromIntNumber=Jt.intNumberFromHexString=Jt.bigIntStringFromBigInt=Jt.hexStringFromBuffer=Jt.hexStringToUint8Array=Jt.uint8ArrayToHex=Jt.randomBytesHex=void 0;const B1=th,uc=Ts,dq=/^[0-9]*$/,fq=/^[a-f0-9]*$/;function L9e(r){return pq(crypto.getRandomValues(new Uint8Array(r)))}Jt.randomBytesHex=L9e;function pq(r){return[...r].map(e=>e.toString(16).padStart(2,"0")).join("")}Jt.uint8ArrayToHex=pq;function U9e(r){return new Uint8Array(r.match(/.{1,2}/g).map(e=>parseInt(e,16)))}Jt.hexStringToUint8Array=U9e;function F9e(r,e=!1){const t=r.toString("hex");return(0,uc.HexString)(e?`0x${t}`:t)}Jt.hexStringFromBuffer=F9e;function j9e(r){return(0,uc.BigIntString)(r.toString(10))}Jt.bigIntStringFromBigInt=j9e;function H9e(r){return(0,uc.IntNumber)(Number(BigInt(mb(r,!0))))}Jt.intNumberFromHexString=H9e;function W9e(r){return(0,uc.HexString)(`0x${BigInt(r).toString(16)}`)}Jt.hexStringFromIntNumber=W9e;function KT(r){return r.startsWith("0x")||r.startsWith("0X")}Jt.has0xPrefix=KT;function fx(r){return KT(r)?r.slice(2):r}Jt.strip0x=fx;function gq(r){return KT(r)?`0x${r.slice(2)}`:`0x${r}`}Jt.prepend0x=gq;function gb(r){if(typeof r!="string")return!1;const e=fx(r).toLowerCase();return fq.test(e)}Jt.isHexString=gb;function mq(r,e=!1){if(typeof r=="string"){const t=fx(r).toLowerCase();if(fq.test(t))return(0,uc.HexString)(e?`0x${t}`:t)}throw B1.standardErrors.rpc.invalidParams(`"${String(r)}" is not a hexadecimal string`)}Jt.ensureHexString=mq;function mb(r,e=!1){let t=mq(r,!1);return t.length%2===1&&(t=(0,uc.HexString)(`0${t}`)),e?(0,uc.HexString)(`0x${t}`):t}Jt.ensureEvenLengthHexString=mb;function z9e(r){if(typeof r=="string"){const e=fx(r).toLowerCase();if(gb(e)&&e.length===40)return(0,uc.AddressString)(gq(e))}throw B1.standardErrors.rpc.invalidParams(`Invalid Ethereum address: ${String(r)}`)}Jt.ensureAddressString=z9e;function V9e(r){if(Buffer.isBuffer(r))return r;if(typeof r=="string"){if(gb(r)){const e=mb(r,!1);return Buffer.from(e,"hex")}return Buffer.from(r,"utf8")}throw B1.standardErrors.rpc.invalidParams(`Not binary data: ${String(r)}`)}Jt.ensureBuffer=V9e;function wq(r){if(typeof r=="number"&&Number.isInteger(r))return(0,uc.IntNumber)(r);if(typeof r=="string"){if(dq.test(r))return(0,uc.IntNumber)(Number(r));if(gb(r))return(0,uc.IntNumber)(Number(BigInt(mb(r,!0))))}throw B1.standardErrors.rpc.invalidParams(`Not an integer: ${String(r)}`)}Jt.ensureIntNumber=wq;function q9e(r){if(r instanceof RegExp)return(0,uc.RegExpString)(r.toString());throw B1.standardErrors.rpc.invalidParams(`Not a RegExp: ${String(r)}`)}Jt.ensureRegExpString=q9e;function K9e(r){if(r!==null&&(typeof r=="bigint"||vq(r)))return BigInt(r.toString(10));if(typeof r=="number")return BigInt(wq(r));if(typeof r=="string"){if(dq.test(r))return BigInt(r);if(gb(r))return BigInt(mb(r,!0))}throw B1.standardErrors.rpc.invalidParams(`Not an integer: ${String(r)}`)}Jt.ensureBigInt=K9e;function G9e(r){if(typeof r=="string")return JSON.parse(r);if(typeof r=="object")return r;throw B1.standardErrors.rpc.invalidParams(`Not a JSON string or an object: ${String(r)}`)}Jt.ensureParsedJSONObject=G9e;function vq(r){if(r==null||typeof r.constructor!="function")return!1;const{constructor:e}=r;return typeof e.config=="function"&&typeof e.EUCLID=="number"}Jt.isBigNumber=vq;function Z9e(r,e){return Array.from({length:e-r},(t,n)=>r+n)}Jt.range=Z9e;function Y9e(){const r=document.querySelector('link[sizes="192x192"]')||document.querySelector('link[sizes="180x180"]')||document.querySelector('link[rel="icon"]')||document.querySelector('link[rel="shortcut icon"]'),{protocol:e,host:t}=document.location,n=r?r.getAttribute("href"):null;return!n||n.startsWith("javascript:")||n.startsWith("vbscript:")?null:n.startsWith("http://")||n.startsWith("https://")||n.startsWith("data:")?n:n.startsWith("//")?e+n:`${e}//${t}${n}`}Jt.getFavicon=Y9e;function Q9e(r,e){return r.length===e.length&&r.every((t,n)=>t===e[n])}Jt.areAddressArraysEqual=Q9e;var du={},px={},gx={},Oi={};Object.defineProperty(Oi,"__esModule",{value:!0});Oi.decryptContent=Oi.encryptContent=Oi.importKeyFromHexString=Oi.exportKeyToHexString=Oi.decrypt=Oi.encrypt=Oi.deriveSharedSecret=Oi.generateKeyPair=void 0;const yq=Jt;async function J9e(){return crypto.subtle.generateKey({name:"ECDH",namedCurve:"P-256"},!0,["deriveKey"])}Oi.generateKeyPair=J9e;async function X9e(r,e){return crypto.subtle.deriveKey({name:"ECDH",public:e},r,{name:"AES-GCM",length:256},!1,["encrypt","decrypt"])}Oi.deriveSharedSecret=X9e;async function bq(r,e){const t=crypto.getRandomValues(new Uint8Array(12)),n=await crypto.subtle.encrypt({name:"AES-GCM",iv:t},r,new TextEncoder().encode(e));return{iv:t,cipherText:n}}Oi.encrypt=bq;async function _q(r,{iv:e,cipherText:t}){const n=await crypto.subtle.decrypt({name:"AES-GCM",iv:e},r,t);return new TextDecoder().decode(n)}Oi.decrypt=_q;function xq(r){switch(r){case"public":return"spki";case"private":return"pkcs8"}}async function eCe(r,e){const t=xq(r),n=await crypto.subtle.exportKey(t,e);return(0,yq.uint8ArrayToHex)(new Uint8Array(n))}Oi.exportKeyToHexString=eCe;async function tCe(r,e){const t=xq(r),n=(0,yq.hexStringToUint8Array)(e).buffer;return await crypto.subtle.importKey(t,n,{name:"ECDH",namedCurve:"P-256"},!0,r==="private"?["deriveKey"]:[])}Oi.importKeyFromHexString=tCe;async function rCe(r,e){const t=JSON.stringify(r,(n,i)=>{if(!(i instanceof Error))return i;const s=i;return Object.assign(Object.assign({},s.code?{code:s.code}:{}),{message:s.message})});return bq(e,t)}Oi.encryptContent=rCe;async function nCe(r,e){return JSON.parse(await _q(e,r))}Oi.decryptContent=nCe;var rh={};Object.defineProperty(rh,"__esModule",{value:!0});rh.ScopedLocalStorage=void 0;class O8{constructor(e,t){this.scope=e,this.module=t}setItem(e,t){localStorage.setItem(this.scopedKey(e),t)}getItem(e){return localStorage.getItem(this.scopedKey(e))}removeItem(e){localStorage.removeItem(this.scopedKey(e))}clear(){const e=this.scopedKey(""),t=[];for(let n=0;nlocalStorage.removeItem(n))}scopedKey(e){return`-${this.scope}${this.module?`:${this.module}`:""}:${e}`}static clearAll(){new O8("CBWSDK").clear(),new O8("walletlink").clear()}}rh.ScopedLocalStorage=O8;Object.defineProperty(gx,"__esModule",{value:!0});gx.SCWKeyManager=void 0;const d4=Oi,iCe=rh,V7={storageKey:"ownPrivateKey",keyType:"private"},q7={storageKey:"ownPublicKey",keyType:"public"},K7={storageKey:"peerPublicKey",keyType:"public"};class sCe{constructor(){this.storage=new iCe.ScopedLocalStorage("CBWSDK","SCWKeyManager"),this.ownPrivateKey=null,this.ownPublicKey=null,this.peerPublicKey=null,this.sharedSecret=null}async getOwnPublicKey(){return await this.loadKeysIfNeeded(),this.ownPublicKey}async getSharedSecret(){return await this.loadKeysIfNeeded(),this.sharedSecret}async setPeerPublicKey(e){this.sharedSecret=null,this.peerPublicKey=e,await this.storeKey(K7,e),await this.loadKeysIfNeeded()}async clear(){this.ownPrivateKey=null,this.ownPublicKey=null,this.peerPublicKey=null,this.sharedSecret=null,this.storage.removeItem(q7.storageKey),this.storage.removeItem(V7.storageKey),this.storage.removeItem(K7.storageKey)}async generateKeyPair(){const e=await(0,d4.generateKeyPair)();this.ownPrivateKey=e.privateKey,this.ownPublicKey=e.publicKey,await this.storeKey(V7,e.privateKey),await this.storeKey(q7,e.publicKey)}async loadKeysIfNeeded(){if(this.ownPrivateKey===null&&(this.ownPrivateKey=await this.loadKey(V7)),this.ownPublicKey===null&&(this.ownPublicKey=await this.loadKey(q7)),(this.ownPrivateKey===null||this.ownPublicKey===null)&&await this.generateKeyPair(),this.peerPublicKey===null&&(this.peerPublicKey=await this.loadKey(K7)),this.sharedSecret===null){if(this.ownPrivateKey===null||this.peerPublicKey===null)return;this.sharedSecret=await(0,d4.deriveSharedSecret)(this.ownPrivateKey,this.peerPublicKey)}}async loadKey(e){const t=this.storage.getItem(e.storageKey);return t?(0,d4.importKeyFromHexString)(e.keyType,t):null}async storeKey(e,t){const n=await(0,d4.exportKeyToHexString)(e.keyType,t);this.storage.setItem(e.storageKey,n)}}gx.SCWKeyManager=sCe;var mx={};Object.defineProperty(mx,"__esModule",{value:!0});mx.SCWStateManager=void 0;const oCe=rh,gB="accounts",mB="activeChain",wB="availableChains",vB="walletCapabilities";class aCe{get accounts(){return this._accounts}get activeChain(){return this._activeChain}get walletCapabilities(){return this._walletCapabilities}constructor(e){var t,n;this.storage=new oCe.ScopedLocalStorage("CBWSDK","SCWStateManager"),this.updateListener=e.updateListener,this.availableChains=this.loadItemFromStorage(wB),this._walletCapabilities=this.loadItemFromStorage(vB);const i=this.loadItemFromStorage(gB),s=this.loadItemFromStorage(mB);i&&this.updateListener.onAccountsUpdate({accounts:i,source:"storage"}),s&&this.updateListener.onChainUpdate({chain:s,source:"storage"}),this._accounts=i||[],this._activeChain=s||{id:(n=(t=e.appChainIds)===null||t===void 0?void 0:t[0])!==null&&n!==void 0?n:1}}updateAccounts(e){this._accounts=e,this.storeItemToStorage(gB,e),this.updateListener.onAccountsUpdate({accounts:e,source:"wallet"})}switchChain(e){var t;const n=(t=this.availableChains)===null||t===void 0?void 0:t.find(i=>i.id===e);return n?(n===this._activeChain||(this._activeChain=n,this.storeItemToStorage(mB,n),this.updateListener.onChainUpdate({chain:n,source:"wallet"})),!0):!1}updateAvailableChains(e){if(!e||Object.keys(e).length===0)return;const t=Object.entries(e).map(([n,i])=>({id:Number(n),rpcUrl:i}));this.availableChains=t,this.storeItemToStorage(wB,t),this.switchChain(this._activeChain.id)}updateWalletCapabilities(e){this._walletCapabilities=e,this.storeItemToStorage(vB,e)}storeItemToStorage(e,t){this.storage.setItem(e,JSON.stringify(t))}loadItemFromStorage(e){const t=this.storage.getItem(e);return t?JSON.parse(t):void 0}clear(){this.storage.clear()}}mx.SCWStateManager=aCe;Object.defineProperty(px,"__esModule",{value:!0});px.SCWSigner=void 0;const cCe=gx,lCe=mx,f4=th,yB=Jt,p4=Oi;class uCe{constructor(e){this.metadata=e.metadata,this.communicator=e.communicator,this.keyManager=new cCe.SCWKeyManager,this.stateManager=new lCe.SCWStateManager({appChainIds:this.metadata.appChainIds,updateListener:e.updateListener}),this.handshake=this.handshake.bind(this),this.request=this.request.bind(this),this.createRequestMessage=this.createRequestMessage.bind(this),this.decryptResponseMessage=this.decryptResponseMessage.bind(this)}async handshake(){const e=await this.createRequestMessage({handshake:{method:"eth_requestAccounts",params:this.metadata}}),t=await this.communicator.postRequestAndWaitForResponse(e);if("failure"in t.content)throw t.content.failure;const n=await(0,p4.importKeyFromHexString)("public",t.sender);await this.keyManager.setPeerPublicKey(n);const i=await this.decryptResponseMessage(t);this.updateInternalState({method:"eth_requestAccounts"},i);const s=i.result;if("error"in s)throw s.error;return this.stateManager.accounts}async request(e){const t=this.tryLocalHandling(e);if(t!==void 0){if(t instanceof Error)throw t;return t}await this.communicator.waitForPopupLoaded();const n=await this.sendEncryptedRequest(e),i=await this.decryptResponseMessage(n);this.updateInternalState(e,i);const s=i.result;if("error"in s)throw s.error;return s.value}async disconnect(){this.stateManager.clear(),await this.keyManager.clear()}tryLocalHandling(e){var t;switch(e.method){case"wallet_switchEthereumChain":{const n=e.params;if(!n||!(!((t=n[0])===null||t===void 0)&&t.chainId))throw f4.standardErrors.rpc.invalidParams();const i=(0,yB.ensureIntNumber)(n[0].chainId);return this.stateManager.switchChain(i)?null:void 0}case"wallet_getCapabilities":{const n=this.stateManager.walletCapabilities;if(!n)throw f4.standardErrors.provider.unauthorized("No wallet capabilities found, please disconnect and reconnect");return n}default:return}}async sendEncryptedRequest(e){const t=await this.keyManager.getSharedSecret();if(!t)throw f4.standardErrors.provider.unauthorized("No valid session found, try requestAccounts before other methods");const n=await(0,p4.encryptContent)({action:e,chainId:this.stateManager.activeChain.id},t),i=await this.createRequestMessage({encrypted:n});return this.communicator.postRequestAndWaitForResponse(i)}async createRequestMessage(e){const t=await(0,p4.exportKeyToHexString)("public",await this.keyManager.getOwnPublicKey());return{id:crypto.randomUUID(),sender:t,content:e,timestamp:new Date}}async decryptResponseMessage(e){const t=e.content;if("failure"in t)throw t.failure;const n=await this.keyManager.getSharedSecret();if(!n)throw f4.standardErrors.provider.unauthorized("Invalid session");return(0,p4.decryptContent)(t.encrypted,n)}updateInternalState(e,t){var n,i;const s=(n=t.data)===null||n===void 0?void 0:n.chains;s&&this.stateManager.updateAvailableChains(s);const o=(i=t.data)===null||i===void 0?void 0:i.capabilities;o&&this.stateManager.updateWalletCapabilities(o);const a=t.result;if(!("error"in a))switch(e.method){case"eth_requestAccounts":{const c=a.value;this.stateManager.updateAccounts(c);break}case"wallet_switchEthereumChain":{if(a.value!==null)return;const c=e.params,l=(0,yB.ensureIntNumber)(c[0].chainId);this.stateManager.switchChain(l);break}}}}px.SCWSigner=uCe;var wx={},CS={exports:{}},Aq=mo.EventEmitter,G7,bB;function hCe(){if(bB)return G7;bB=1;function r(A,M){var $=Object.keys(A);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(A);M&&(L=L.filter(function(P){return Object.getOwnPropertyDescriptor(A,P).enumerable})),$.push.apply($,L)}return $}function e(A){for(var M=1;M0?this.tail.next=L:this.head=L,this.tail=L,++this.length}},{key:"unshift",value:function($){var L={data:$,next:this.head};this.length===0&&(this.tail=L),this.head=L,++this.length}},{key:"shift",value:function(){if(this.length!==0){var $=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,$}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function($){if(this.length===0)return"";for(var L=this.head,P=""+L.data;L=L.next;)P+=$+L.data;return P}},{key:"concat",value:function($){if(this.length===0)return l.alloc(0);for(var L=l.allocUnsafe($>>>0),P=this.head,H=0;P;)y(P.data,L,H),H+=P.data.length,P=P.next;return L}},{key:"consume",value:function($,L){var P;return $F.length?F.length:$;if(q===F.length?H+=F:H+=F.slice(0,$),$-=q,$===0){q===F.length?(++P,L.next?this.head=L.next:this.head=this.tail=null):(this.head=L,L.data=F.slice(q));break}++P}return this.length-=P,H}},{key:"_getBuffer",value:function($){var L=l.allocUnsafe($),P=this.head,H=1;for(P.data.copy(L),$-=P.data.length;P=P.next;){var F=P.data,q=$>F.length?F.length:$;if(F.copy(L,L.length-$,0,q),$-=q,$===0){q===F.length?(++H,P.next?this.head=P.next:this.head=this.tail=null):(this.head=P,P.data=F.slice(q));break}++H}return this.length-=H,L}},{key:v,value:function($,L){return f(this,e(e({},L),{},{depth:0,customInspect:!1}))}}]),A}(),G7}function dCe(r,e){var t=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(e?e(r):r&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(SS,this,r)):process.nextTick(SS,this,r)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(r||null,function(s){!e&&s?t._writableState?t._writableState.errorEmitted?process.nextTick(X4,t):(t._writableState.errorEmitted=!0,process.nextTick(_B,t,s)):process.nextTick(_B,t,s):e?(process.nextTick(X4,t),e(s)):process.nextTick(X4,t)}),this)}function _B(r,e){SS(r,e),X4(r)}function X4(r){r._writableState&&!r._writableState.emitClose||r._readableState&&!r._readableState.emitClose||r.emit("close")}function fCe(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function SS(r,e){r.emit("error",e)}function pCe(r,e){var t=r._readableState,n=r._writableState;t&&t.autoDestroy||n&&n.autoDestroy?r.destroy(e):r.emit("error",e)}var Eq={destroy:dCe,undestroy:fCe,errorOrDestroy:pCe},L1={};function gCe(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.__proto__=e}var Cq={};function vc(r,e,t){t||(t=Error);function n(s,o,a){return typeof e=="string"?e:e(s,o,a)}var i=function(s){gCe(o,s);function o(a,c,l){return s.call(this,n(a,c,l))||this}return o}(t);i.prototype.name=t.name,i.prototype.code=r,Cq[r]=i}function xB(r,e){if(Array.isArray(r)){var t=r.length;return r=r.map(function(n){return String(n)}),t>2?"one of ".concat(e," ").concat(r.slice(0,t-1).join(", "),", or ")+r[t-1]:t===2?"one of ".concat(e," ").concat(r[0]," or ").concat(r[1]):"of ".concat(e," ").concat(r[0])}else return"of ".concat(e," ").concat(String(r))}function mCe(r,e,t){return r.substr(0,e.length)===e}function wCe(r,e,t){return(t===void 0||t>r.length)&&(t=r.length),r.substring(t-e.length,t)===e}function vCe(r,e,t){return typeof t!="number"&&(t=0),t+e.length>r.length?!1:r.indexOf(e,t)!==-1}vc("ERR_INVALID_OPT_VALUE",function(r,e){return'The value "'+e+'" is invalid for option "'+r+'"'},TypeError);vc("ERR_INVALID_ARG_TYPE",function(r,e,t){var n;typeof e=="string"&&mCe(e,"not ")?(n="must not be",e=e.replace(/^not /,"")):n="must be";var i;if(wCe(r," argument"))i="The ".concat(r," ").concat(n," ").concat(xB(e,"type"));else{var s=vCe(r,".")?"property":"argument";i='The "'.concat(r,'" ').concat(s," ").concat(n," ").concat(xB(e,"type"))}return i+=". Received type ".concat(typeof t),i},TypeError);vc("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");vc("ERR_METHOD_NOT_IMPLEMENTED",function(r){return"The "+r+" method is not implemented"});vc("ERR_STREAM_PREMATURE_CLOSE","Premature close");vc("ERR_STREAM_DESTROYED",function(r){return"Cannot call "+r+" after a stream was destroyed"});vc("ERR_MULTIPLE_CALLBACK","Callback called multiple times");vc("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");vc("ERR_STREAM_WRITE_AFTER_END","write after end");vc("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);vc("ERR_UNKNOWN_ENCODING",function(r){return"Unknown encoding: "+r},TypeError);vc("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");L1.codes=Cq;var yCe=L1.codes.ERR_INVALID_OPT_VALUE;function bCe(r,e,t){return r.highWaterMark!=null?r.highWaterMark:e?r[t]:null}function _Ce(r,e,t,n){var i=bCe(e,n,t);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var s=n?t:"highWaterMark";throw new yCe(s,i)}return Math.floor(i)}return r.objectMode?16:16*1024}var Sq={getHighWaterMark:_Ce},IS={exports:{}};typeof Object.create=="function"?IS.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:IS.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}};var Il=IS.exports,xCe=ACe;function ACe(r,e){if(Z7("noDeprecation"))return r;var t=!1;function n(){if(!t){if(Z7("throwDeprecation"))throw new Error(e);Z7("traceDeprecation")?console.trace(e):console.warn(e),t=!0}return r.apply(this,arguments)}return n}function Z7(r){try{if(!Yr.localStorage)return!1}catch{return!1}var e=Yr.localStorage[r];return e==null?!1:String(e).toLowerCase()==="true"}var Y7,AB;function Iq(){if(AB)return Y7;AB=1,Y7=T;function r(Z){var k=this;this.next=null,this.entry=null,this.finish=function(){x(k,Z)}}var e;T.WritableState=Y;var t={deprecate:xCe},n=Aq,i=Vw.Buffer,s=(typeof Yr<"u"?Yr:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function o(Z){return i.from(Z)}function a(Z){return i.isBuffer(Z)||Z instanceof s}var c=Eq,l=Sq,h=l.getHighWaterMark,f=L1.codes,v=f.ERR_INVALID_ARG_TYPE,y=f.ERR_METHOD_NOT_IMPLEMENTED,A=f.ERR_MULTIPLE_CALLBACK,M=f.ERR_STREAM_CANNOT_PIPE,$=f.ERR_STREAM_DESTROYED,L=f.ERR_STREAM_NULL_VALUES,P=f.ERR_STREAM_WRITE_AFTER_END,H=f.ERR_UNKNOWN_ENCODING,F=c.errorOrDestroy;Il(T,n);function q(){}function Y(Z,k,W){e=e||jw(),Z=Z||{},typeof W!="boolean"&&(W=k instanceof e),this.objectMode=!!Z.objectMode,W&&(this.objectMode=this.objectMode||!!Z.writableObjectMode),this.highWaterMark=h(this,Z,"writableHighWaterMark",W),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var J=Z.decodeStrings===!1;this.decodeStrings=!J,this.defaultEncoding=Z.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(S){b(k,S)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=Z.emitClose!==!1,this.autoDestroy=!!Z.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new r(this)}Y.prototype.getBuffer=function(){for(var k=this.bufferedRequest,W=[];k;)W.push(k),k=k.next;return W},function(){try{Object.defineProperty(Y.prototype,"buffer",{get:t.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var I;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(I=Function.prototype[Symbol.hasInstance],Object.defineProperty(T,Symbol.hasInstance,{value:function(k){return I.call(this,k)?!0:this!==T?!1:k&&k._writableState instanceof Y}})):I=function(k){return k instanceof this};function T(Z){e=e||jw();var k=this instanceof e;if(!k&&!I.call(T,this))return new T(Z);this._writableState=new Y(Z,this,k),this.writable=!0,Z&&(typeof Z.write=="function"&&(this._write=Z.write),typeof Z.writev=="function"&&(this._writev=Z.writev),typeof Z.destroy=="function"&&(this._destroy=Z.destroy),typeof Z.final=="function"&&(this._final=Z.final)),n.call(this)}T.prototype.pipe=function(){F(this,new M)};function V(Z,k){var W=new P;F(Z,W),process.nextTick(k,W)}function Q(Z,k,W,J){var S;return W===null?S=new L:typeof W!="string"&&!k.objectMode&&(S=new v("chunk",["string","Buffer"],W)),S?(F(Z,S),process.nextTick(J,S),!1):!0}T.prototype.write=function(Z,k,W){var J=this._writableState,S=!1,D=!J.objectMode&&a(Z);return D&&!i.isBuffer(Z)&&(Z=o(Z)),typeof k=="function"&&(W=k,k=null),D?k="buffer":k||(k=J.defaultEncoding),typeof W!="function"&&(W=q),J.ending?V(this,W):(D||Q(this,J,Z,W))&&(J.pendingcb++,S=oe(this,J,D,Z,k,W)),S},T.prototype.cork=function(){this._writableState.corked++},T.prototype.uncork=function(){var Z=this._writableState;Z.corked&&(Z.corked--,!Z.writing&&!Z.corked&&!Z.bufferProcessing&&Z.bufferedRequest&&B(this,Z))},T.prototype.setDefaultEncoding=function(k){if(typeof k=="string"&&(k=k.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((k+"").toLowerCase())>-1))throw new H(k);return this._writableState.defaultEncoding=k,this},Object.defineProperty(T.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function te(Z,k,W){return!Z.objectMode&&Z.decodeStrings!==!1&&typeof k=="string"&&(k=i.from(k,W)),k}Object.defineProperty(T.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function oe(Z,k,W,J,S,D){if(!W){var G=te(k,J,S);J!==G&&(W=!0,S="buffer",J=G)}var z=k.objectMode?1:J.length;k.length+=z;var K=k.length */(function(r,e){var t=Vw,n=t.Buffer;function i(o,a){for(var c in o)a[c]=o[c]}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?r.exports=t:(i(t,e),e.Buffer=s);function s(o,a,c){return n(o,a,c)}s.prototype=Object.create(n.prototype),i(n,s),s.from=function(o,a,c){if(typeof o=="number")throw new TypeError("Argument must not be a number");return n(o,a,c)},s.alloc=function(o,a,c){if(typeof o!="number")throw new TypeError("Argument must be a number");var l=n(o);return a!==void 0?typeof c=="string"?l.fill(a,c):l.fill(a):l.fill(0),l},s.allocUnsafe=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return n(o)},s.allocUnsafeSlow=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return t.SlowBuffer(o)}})(TS,TS.exports);var p0=TS.exports,CB;function SB(){if(CB)return J7;CB=1;var r=p0.Buffer,e=r.isEncoding||function(L){switch(L=""+L,L&&L.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function t(L){if(!L)return"utf8";for(var P;;)switch(L){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return L;default:if(P)return;L=(""+L).toLowerCase(),P=!0}}function n(L){var P=t(L);if(typeof P!="string"&&(r.isEncoding===e||!e(L)))throw new Error("Unknown encoding: "+L);return P||L}J7.StringDecoder=i;function i(L){this.encoding=n(L);var P;switch(this.encoding){case"utf16le":this.text=f,this.end=v,P=4;break;case"utf8":this.fillLast=c,P=4;break;case"base64":this.text=y,this.end=A,P=3;break;default:this.write=M,this.end=$;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(P)}i.prototype.write=function(L){if(L.length===0)return"";var P,H;if(this.lastNeed){if(P=this.fillLast(L),P===void 0)return"";H=this.lastNeed,this.lastNeed=0}else H=0;return H>5===6?2:L>>4===14?3:L>>3===30?4:L>>6===2?-1:-2}function o(L,P,H){var F=P.length-1;if(F=0?(q>0&&(L.lastNeed=q-1),q):--F=0?(q>0&&(L.lastNeed=q-2),q):--F=0?(q>0&&(q===2?q=0:L.lastNeed=q-3),q):0))}function a(L,P,H){if((P[0]&192)!==128)return L.lastNeed=0,"�";if(L.lastNeed>1&&P.length>1){if((P[1]&192)!==128)return L.lastNeed=1,"�";if(L.lastNeed>2&&P.length>2&&(P[2]&192)!==128)return L.lastNeed=2,"�"}}function c(L){var P=this.lastTotal-this.lastNeed,H=a(this,L);if(H!==void 0)return H;if(this.lastNeed<=L.length)return L.copy(this.lastChar,P,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);L.copy(this.lastChar,P,0,L.length),this.lastNeed-=L.length}function l(L,P){var H=o(this,L,P);if(!this.lastNeed)return L.toString("utf8",P);this.lastTotal=H;var F=L.length-(H-this.lastNeed);return L.copy(this.lastChar,0,F),L.toString("utf8",P,F)}function h(L){var P=L&&L.length?this.write(L):"";return this.lastNeed?P+"�":P}function f(L,P){if((L.length-P)%2===0){var H=L.toString("utf16le",P);if(H){var F=H.charCodeAt(H.length-1);if(F>=55296&&F<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=L[L.length-2],this.lastChar[1]=L[L.length-1],H.slice(0,-1)}return H}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=L[L.length-1],L.toString("utf16le",P,L.length-1)}function v(L){var P=L&&L.length?this.write(L):"";if(this.lastNeed){var H=this.lastTotal-this.lastNeed;return P+this.lastChar.toString("utf16le",0,H)}return P}function y(L,P){var H=(L.length-P)%3;return H===0?L.toString("base64",P):(this.lastNeed=3-H,this.lastTotal=3,H===1?this.lastChar[0]=L[L.length-1]:(this.lastChar[0]=L[L.length-2],this.lastChar[1]=L[L.length-1]),L.toString("base64",P,L.length-H))}function A(L){var P=L&&L.length?this.write(L):"";return this.lastNeed?P+this.lastChar.toString("base64",0,3-this.lastNeed):P}function M(L){return L.toString(this.encoding)}function $(L){return L&&L.length?this.write(L):""}return J7}var IB=L1.codes.ERR_STREAM_PREMATURE_CLOSE;function ECe(r){var e=!1;return function(){if(!e){e=!0;for(var t=arguments.length,n=new Array(t),i=0;i0)if(typeof G!="string"&&!ye.objectMode&&Object.getPrototypeOf(G)!==n.prototype&&(G=s(G)),K)ye.endEmitted?q(D,new L):te(D,ye,G,!0);else if(ye.ended)q(D,new M);else{if(ye.destroyed)return!1;ye.reading=!1,ye.decoder&&!z?(G=ye.decoder.write(G),ye.objectMode||G.length!==0?te(D,ye,G,!1):B(D,ye)):te(D,ye,G,!1)}else K||(ye.reading=!1,B(D,ye))}return!ye.ended&&(ye.length=d?D=d:(D--,D|=D>>>1,D|=D>>>2,D|=D>>>4,D|=D>>>8,D|=D>>>16,D++),D}function m(D,G){return D<=0||G.length===0&&G.ended?0:G.objectMode?1:D!==D?G.flowing&&G.length?G.buffer.head.data.length:G.length:(D>G.highWaterMark&&(G.highWaterMark=g(D)),D<=G.length?D:G.ended?G.length:(G.needReadable=!0,0))}V.prototype.read=function(D){c("read",D),D=parseInt(D,10);var G=this._readableState,z=D;if(D!==0&&(G.emittedReadable=!1),D===0&&G.needReadable&&((G.highWaterMark!==0?G.length>=G.highWaterMark:G.length>0)||G.ended))return c("read: emitReadable",G.length,G.ended),G.length===0&&G.ended?W(this):E(this),null;if(D=m(D,G),D===0&&G.ended)return G.length===0&&W(this),null;var K=G.needReadable;c("need readable",K),(G.length===0||G.length-D0?ue=k(D,G):ue=null,ue===null?(G.needReadable=G.length<=G.highWaterMark,D=0):(G.length-=D,G.awaitDrain=0),G.length===0&&(G.ended||(G.needReadable=!0),z!==D&&G.ended&&W(this)),ue!==null&&this.emit("data",ue),ue};function b(D,G){if(c("onEofChunk"),!G.ended){if(G.decoder){var z=G.decoder.end();z&&z.length&&(G.buffer.push(z),G.length+=G.objectMode?1:z.length)}G.ended=!0,G.sync?E(D):(G.needReadable=!1,G.emittedReadable||(G.emittedReadable=!0,C(D)))}}function E(D){var G=D._readableState;c("emitReadable",G.needReadable,G.emittedReadable),G.needReadable=!1,G.emittedReadable||(c("emitReadable",G.flowing),G.emittedReadable=!0,process.nextTick(C,D))}function C(D){var G=D._readableState;c("emitReadable_",G.destroyed,G.length,G.ended),!G.destroyed&&(G.length||G.ended)&&(D.emit("readable"),G.emittedReadable=!1),G.needReadable=!G.flowing&&!G.ended&&G.length<=G.highWaterMark,Z(D)}function B(D,G){G.readingMore||(G.readingMore=!0,process.nextTick(R,D,G))}function R(D,G){for(;!G.reading&&!G.ended&&(G.length1&&S(K.pipes,D)!==-1)&&!Ie&&(c("false write response, pause",K.awaitDrain),K.awaitDrain++),z.pause())}function $e(X){c("onerror",X),Ue(),D.removeListener("error",$e),e(D,"error")===0&&q(D,X)}I(D,"error",$e);function We(){D.removeListener("finish",Ne),Ue()}D.once("close",We);function Ne(){c("onfinish"),D.removeListener("close",We),Ue()}D.once("finish",Ne);function Ue(){c("unpipe"),z.unpipe(D)}return D.emit("pipe",z),K.flowing||(c("pipe resume"),z.resume()),D};function w(D){return function(){var z=D._readableState;c("pipeOnDrain",z.awaitDrain),z.awaitDrain&&z.awaitDrain--,z.awaitDrain===0&&e(D,"data")&&(z.flowing=!0,Z(D))}}V.prototype.unpipe=function(D){var G=this._readableState,z={hasUnpiped:!1};if(G.pipesCount===0)return this;if(G.pipesCount===1)return D&&D!==G.pipes?this:(D||(D=G.pipes),G.pipes=null,G.pipesCount=0,G.flowing=!1,D&&D.emit("unpipe",this,z),this);if(!D){var K=G.pipes,ue=G.pipesCount;G.pipes=null,G.pipesCount=0,G.flowing=!1;for(var ye=0;ye0,K.flowing!==!1&&this.resume()):D==="readable"&&!K.endEmitted&&!K.readableListening&&(K.readableListening=K.needReadable=!0,K.flowing=!1,K.emittedReadable=!1,c("on readable",K.length,K.reading),K.length?E(this):K.reading||process.nextTick(pe,this)),z},V.prototype.addListener=V.prototype.on,V.prototype.removeListener=function(D,G){var z=t.prototype.removeListener.call(this,D,G);return D==="readable"&&process.nextTick(O,this),z},V.prototype.removeAllListeners=function(D){var G=t.prototype.removeAllListeners.apply(this,arguments);return(D==="readable"||D===void 0)&&process.nextTick(O,this),G};function O(D){var G=D._readableState;G.readableListening=D.listenerCount("readable")>0,G.resumeScheduled&&!G.paused?G.flowing=!0:D.listenerCount("data")>0&&D.resume()}function pe(D){c("readable nexttick read 0"),D.read(0)}V.prototype.resume=function(){var D=this._readableState;return D.flowing||(c("resume"),D.flowing=!D.readableListening,be(this,D)),D.paused=!1,this};function be(D,G){G.resumeScheduled||(G.resumeScheduled=!0,process.nextTick(x,D,G))}function x(D,G){c("resume",G.reading),G.reading||D.read(0),G.resumeScheduled=!1,D.emit("resume"),Z(D),G.flowing&&!G.reading&&D.read(0)}V.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function Z(D){var G=D._readableState;for(c("flow",G.flowing);G.flowing&&D.read()!==null;);}V.prototype.wrap=function(D){var G=this,z=this._readableState,K=!1;D.on("end",function(){if(c("wrapped end"),z.decoder&&!z.ended){var we=z.decoder.end();we&&we.length&&G.push(we)}G.push(null)}),D.on("data",function(we){if(c("wrapped data"),z.decoder&&(we=z.decoder.write(we)),!(z.objectMode&&we==null)&&!(!z.objectMode&&(!we||!we.length))){var je=G.push(we);je||(K=!0,D.pause())}});for(var ue in D)this[ue]===void 0&&typeof D[ue]=="function"&&(this[ue]=function(je){return function(){return D[je].apply(D,arguments)}}(ue));for(var ye=0;ye=G.length?(G.decoder?z=G.buffer.join(""):G.buffer.length===1?z=G.buffer.first():z=G.buffer.concat(G.length),G.buffer.clear()):z=G.buffer.consume(D,G.decoder),z}function W(D){var G=D._readableState;c("endReadable",G.endEmitted),G.endEmitted||(G.ended=!0,process.nextTick(J,G,D))}function J(D,G){if(c("endReadableNT",D.endEmitted,D.length),!D.endEmitted&&D.length===0&&(D.endEmitted=!0,G.readable=!1,G.emit("end"),D.autoDestroy)){var z=G._writableState;(!z||z.autoDestroy&&z.finished)&&G.destroy()}}typeof Symbol=="function"&&(V.from=function(D,G){return F===void 0&&(F=TCe()),F(V,D,G)});function S(D,G){for(var z=0,K=D.length;z0;return FCe(o,c,l,function(h){i||(i=h),h&&s.forEach(OB),!c&&(s.forEach(OB),n(i))})});return e.reduce(jCe)}var zCe=WCe;(function(r,e){e=r.exports=Rq(),e.Stream=e,e.Readable=e,e.Writable=Iq(),e.Duplex=jw(),e.Transform=kq,e.PassThrough=DCe,e.finished=GT,e.pipeline=zCe})(CS,CS.exports);var Oq=CS.exports;const{Transform:VCe}=Oq;var qCe=r=>class Mq extends VCe{constructor(t,n,i,s,o){super(o),this._rate=t,this._capacity=n,this._delimitedSuffix=i,this._hashBitLength=s,this._options=o,this._state=new r,this._state.initialize(t,n),this._finalized=!1}_transform(t,n,i){let s=null;try{this.update(t,n)}catch(o){s=o}i(s)}_flush(t){let n=null;try{this.push(this.digest())}catch(i){n=i}t(n)}update(t,n){if(!Buffer.isBuffer(t)&&typeof t!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return Buffer.isBuffer(t)||(t=Buffer.from(t,n)),this._state.absorb(t),this}digest(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let n=this._state.squeeze(this._hashBitLength/8);return t!==void 0&&(n=n.toString(t)),this._resetState(),n}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const t=new Mq(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(t._state),t._finalized=this._finalized,t}};const{Transform:KCe}=Oq;var GCe=r=>class Dq extends KCe{constructor(t,n,i,s){super(s),this._rate=t,this._capacity=n,this._delimitedSuffix=i,this._options=s,this._state=new r,this._state.initialize(t,n),this._finalized=!1}_transform(t,n,i){let s=null;try{this.update(t,n)}catch(o){s=o}i(s)}_flush(){}_read(t){this.push(this.squeeze(t))}update(t,n){if(!Buffer.isBuffer(t)&&typeof t!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return Buffer.isBuffer(t)||(t=Buffer.from(t,n)),this._state.absorb(t),this}squeeze(t,n){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let i=this._state.squeeze(t);return n!==void 0&&(i=i.toString(n)),i}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const t=new Dq(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(t._state),t._finalized=this._finalized,t}};const ZCe=qCe,YCe=GCe;var QCe=function(r){const e=ZCe(r),t=YCe(r);return function(n,i){switch(typeof n=="string"?n.toLowerCase():n){case"keccak224":return new e(1152,448,null,224,i);case"keccak256":return new e(1088,512,null,256,i);case"keccak384":return new e(832,768,null,384,i);case"keccak512":return new e(576,1024,null,512,i);case"sha3-224":return new e(1152,448,6,224,i);case"sha3-256":return new e(1088,512,6,256,i);case"sha3-384":return new e(832,768,6,384,i);case"sha3-512":return new e(576,1024,6,512,i);case"shake128":return new t(1344,256,31,i);case"shake256":return new t(1088,512,31,i);default:throw new Error("Invald algorithm: "+n)}}},$q={};const MB=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648];$q.p1600=function(r){for(let e=0;e<24;++e){const t=r[0]^r[10]^r[20]^r[30]^r[40],n=r[1]^r[11]^r[21]^r[31]^r[41],i=r[2]^r[12]^r[22]^r[32]^r[42],s=r[3]^r[13]^r[23]^r[33]^r[43],o=r[4]^r[14]^r[24]^r[34]^r[44],a=r[5]^r[15]^r[25]^r[35]^r[45],c=r[6]^r[16]^r[26]^r[36]^r[46],l=r[7]^r[17]^r[27]^r[37]^r[47],h=r[8]^r[18]^r[28]^r[38]^r[48],f=r[9]^r[19]^r[29]^r[39]^r[49];let v=h^(i<<1|s>>>31),y=f^(s<<1|i>>>31);const A=r[0]^v,M=r[1]^y,$=r[10]^v,L=r[11]^y,P=r[20]^v,H=r[21]^y,F=r[30]^v,q=r[31]^y,Y=r[40]^v,I=r[41]^y;v=t^(o<<1|a>>>31),y=n^(a<<1|o>>>31);const T=r[2]^v,V=r[3]^y,Q=r[12]^v,te=r[13]^y,oe=r[22]^v,d=r[23]^y,g=r[32]^v,m=r[33]^y,b=r[42]^v,E=r[43]^y;v=i^(c<<1|l>>>31),y=s^(l<<1|c>>>31);const C=r[4]^v,B=r[5]^y,R=r[14]^v,w=r[15]^y,O=r[24]^v,pe=r[25]^y,be=r[34]^v,x=r[35]^y,Z=r[44]^v,k=r[45]^y;v=o^(h<<1|f>>>31),y=a^(f<<1|h>>>31);const W=r[6]^v,J=r[7]^y,S=r[16]^v,D=r[17]^y,G=r[26]^v,z=r[27]^y,K=r[36]^v,ue=r[37]^y,ye=r[46]^v,we=r[47]^y;v=c^(t<<1|n>>>31),y=l^(n<<1|t>>>31);const je=r[8]^v,Me=r[9]^y,Ie=r[18]^v,Be=r[19]^y,xe=r[28]^v,$e=r[29]^y,We=r[38]^v,Ne=r[39]^y,Ue=r[48]^v,X=r[49]^y,N=A,U=M,ie=L<<4|$>>>28,le=$<<4|L>>>28,me=P<<3|H>>>29,Ee=H<<3|P>>>29,ze=q<<9|F>>>23,qe=F<<9|q>>>23,St=Y<<18|I>>>14,Je=I<<18|Y>>>14,nt=T<<1|V>>>31,jr=V<<1|T>>>31,jt=te<<12|Q>>>20,Ht=Q<<12|te>>>20,bn=oe<<10|d>>>22,pt=d<<10|oe>>>22,ht=m<<13|g>>>19,yr=g<<13|m>>>19,gt=b<<2|E>>>30,ft=E<<2|b>>>30,ur=B<<30|C>>>2,_t=C<<30|B>>>2,xt=R<<6|w>>>26,br=w<<6|R>>>26,At=pe<<11|O>>>21,mt=O<<11|pe>>>21,Er=be<<15|x>>>17,wt=x<<15|be>>>17,lt=k<<29|Z>>>3,Ir=Z<<29|k>>>3,Et=W<<28|J>>>4,Gt=J<<28|W>>>4,Vn=D<<23|S>>>9,Zt=S<<23|D>>>9,Pt=G<<25|z>>>7,Nn=z<<25|G>>>7,Pn=K<<21|ue>>>11,On=ue<<21|K>>>11,Mn=we<<24|ye>>>8,Dn=ye<<24|we>>>8,tn=je<<27|Me>>>5,$i=Me<<27|je>>>5,$s=Ie<<20|Be>>>12,Bi=Be<<20|Ie>>>12,Bs=$e<<7|xe>>>25,Ls=xe<<7|$e>>>25,Li=We<<8|Ne>>>24,gs=Ne<<8|We>>>24,ms=Ue<<14|X>>>18,qn=X<<14|Ue>>>18;r[0]=N^~jt&At,r[1]=U^~Ht&mt,r[10]=Et^~$s&me,r[11]=Gt^~Bi&Ee,r[20]=nt^~xt&Pt,r[21]=jr^~br&Nn,r[30]=tn^~ie&bn,r[31]=$i^~le&pt,r[40]=ur^~Vn&Bs,r[41]=_t^~Zt&Ls,r[2]=jt^~At&Pn,r[3]=Ht^~mt&On,r[12]=$s^~me&ht,r[13]=Bi^~Ee&yr,r[22]=xt^~Pt&Li,r[23]=br^~Nn&gs,r[32]=ie^~bn&Er,r[33]=le^~pt&wt,r[42]=Vn^~Bs&ze,r[43]=Zt^~Ls&qe,r[4]=At^~Pn&ms,r[5]=mt^~On&qn,r[14]=me^~ht<,r[15]=Ee^~yr&Ir,r[24]=Pt^~Li&St,r[25]=Nn^~gs&Je,r[34]=bn^~Er&Mn,r[35]=pt^~wt&Dn,r[44]=Bs^~ze>,r[45]=Ls^~qe&ft,r[6]=Pn^~ms&N,r[7]=On^~qn&U,r[16]=ht^~lt&Et,r[17]=yr^~Ir&Gt,r[26]=Li^~St&nt,r[27]=gs^~Je&jr,r[36]=Er^~Mn&tn,r[37]=wt^~Dn&$i,r[46]=ze^~gt&ur,r[47]=qe^~ft&_t,r[8]=ms^~N&jt,r[9]=qn^~U&Ht,r[18]=lt^~Et&$s,r[19]=Ir^~Gt&Bi,r[28]=St^~nt&xt,r[29]=Je^~jr&br,r[38]=Mn^~tn&ie,r[39]=Dn^~$i&le,r[48]=gt^~ur&Vn,r[49]=ft^~_t&Zt,r[0]^=MB[e*2],r[1]^=MB[e*2+1]}};const M8=$q;function f2(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}f2.prototype.initialize=function(r,e){for(let t=0;t<50;++t)this.state[t]=0;this.blockSize=r/8,this.count=0,this.squeezing=!1};f2.prototype.absorb=function(r){for(let e=0;e>>8*(this.count%4)&255,this.count+=1,this.count===this.blockSize&&(M8.p1600(this.state),this.count=0);return e};f2.prototype.copy=function(r){for(let e=0;e<50;++e)r.state[e]=this.state[e];r.blockSize=this.blockSize,r.count=this.count,r.squeezing=this.squeezing};var JCe=f2,XCe=QCe(JCe);const eSe=XCe;function Bq(r){return Buffer.allocUnsafe(r).fill(0)}function tSe(r){return r.toString(2).length}function Lq(r,e){let t=r.toString(16);t.length%2!==0&&(t="0"+t);const n=t.match(/.{1,2}/g).map(i=>parseInt(i,16));for(;n.length"u")throw new Error("Not an array?");if(t=zq(r),t!=="dynamic"&&t!==0&&e.length>t)throw new Error("Elements exceed array size: "+t);i=[],r=r.slice(0,r.lastIndexOf("[")),typeof e=="string"&&(e=JSON.parse(e));for(s in e)i.push(Kl(r,e[s]));if(t==="dynamic"){var o=Kl("uint256",e.length);i.unshift(o)}return Buffer.concat(i)}else{if(r==="bytes")return e=new Buffer(e),i=Buffer.concat([Kl("uint256",e.length),e]),e.length%32!==0&&(i=Buffer.concat([i,Gs.zeros(32-e.length%32)])),i;if(r.startsWith("bytes")){if(t=hm(r),t<1||t>32)throw new Error("Invalid bytes width: "+t);return Gs.setLengthRight(e,32)}else if(r.startsWith("uint")){if(t=hm(r),t%8||t<8||t>256)throw new Error("Invalid uint width: "+t);n=W0(e);const a=Gs.bitLengthFromBigInt(n);if(a>t)throw new Error("Supplied uint exceeds width: "+t+" vs "+a);if(n<0)throw new Error("Supplied uint is negative");return Gs.bufferBEFromBigInt(n,32)}else if(r.startsWith("int")){if(t=hm(r),t%8||t<8||t>256)throw new Error("Invalid int width: "+t);n=W0(e);const a=Gs.bitLengthFromBigInt(n);if(a>t)throw new Error("Supplied int exceeds width: "+t+" vs "+a);const c=Gs.twosFromBigInt(n,256);return Gs.bufferBEFromBigInt(c,32)}else if(r.startsWith("ufixed")){if(t=DB(r),n=W0(e),n<0)throw new Error("Supplied ufixed is negative");return Kl("uint256",n*BigInt(2)**BigInt(t[1]))}else if(r.startsWith("fixed"))return t=DB(r),Kl("int256",W0(e)*BigInt(2)**BigInt(t[1]))}throw new Error("Unsupported or invalid type: "+r)}function aSe(r){return r==="string"||r==="bytes"||zq(r)==="dynamic"}function cSe(r){return r.lastIndexOf("]")===r.length-1}function lSe(r,e){var t=[],n=[],i=32*r.length;for(var s in r){var o=Wq(r[s]),a=e[s],c=Kl(o,a);aSe(o)?(t.push(Kl("uint256",i)),n.push(c),i+=c.length):t.push(c)}return Buffer.concat(t.concat(n))}function Vq(r,e){if(r.length!==e.length)throw new Error("Number of types are not matching the values");for(var t,n,i=[],s=0;s32)throw new Error("Invalid bytes width: "+t);i.push(Gs.setLengthRight(a,t))}else if(o.startsWith("uint")){if(t=hm(o),t%8||t<8||t>256)throw new Error("Invalid uint width: "+t);n=W0(a);const c=Gs.bitLengthFromBigInt(n);if(c>t)throw new Error("Supplied uint exceeds width: "+t+" vs "+c);i.push(Gs.bufferBEFromBigInt(n,t/8))}else if(o.startsWith("int")){if(t=hm(o),t%8||t<8||t>256)throw new Error("Invalid int width: "+t);n=W0(a);const c=Gs.bitLengthFromBigInt(n);if(c>t)throw new Error("Supplied int exceeds width: "+t+" vs "+c);const l=Gs.twosFromBigInt(n,t);i.push(Gs.bufferBEFromBigInt(l,t/8))}else throw new Error("Unsupported or invalid type: "+o)}return Buffer.concat(i)}function uSe(r,e){return Gs.keccak(Vq(r,e))}var hSe={rawEncode:lSe,solidityPack:Vq,soliditySHA3:uSe};const Dc=Hq,F3=hSe,qq={type:"object",properties:{types:{type:"object",additionalProperties:{type:"array",items:{type:"object",properties:{name:{type:"string"},type:{type:"string"}},required:["name","type"]}}},primaryType:{type:"string"},domain:{type:"object"},message:{type:"object"}},required:["types","primaryType","domain","message"]},n9={encodeData(r,e,t,n=!0){const i=["bytes32"],s=[this.hashType(r,t)];if(n){const o=(a,c,l)=>{if(t[c]!==void 0)return["bytes32",l==null?"0x0000000000000000000000000000000000000000000000000000000000000000":Dc.keccak(this.encodeData(c,l,t,n))];if(l===void 0)throw new Error(`missing value for field ${a} of type ${c}`);if(c==="bytes")return["bytes32",Dc.keccak(l)];if(c==="string")return typeof l=="string"&&(l=Buffer.from(l,"utf8")),["bytes32",Dc.keccak(l)];if(c.lastIndexOf("]")===c.length-1){const h=c.slice(0,c.lastIndexOf("[")),f=l.map(v=>o(a,h,v));return["bytes32",Dc.keccak(F3.rawEncode(f.map(([v])=>v),f.map(([,v])=>v)))]}return[c,l]};for(const a of t[r]){const[c,l]=o(a.name,a.type,e[a.name]);i.push(c),s.push(l)}}else for(const o of t[r]){let a=e[o.name];if(a!==void 0)if(o.type==="bytes")i.push("bytes32"),a=Dc.keccak(a),s.push(a);else if(o.type==="string")i.push("bytes32"),typeof a=="string"&&(a=Buffer.from(a,"utf8")),a=Dc.keccak(a),s.push(a);else if(t[o.type]!==void 0)i.push("bytes32"),a=Dc.keccak(this.encodeData(o.type,a,t,n)),s.push(a);else{if(o.type.lastIndexOf("]")===o.type.length-1)throw new Error("Arrays currently unimplemented in encodeData");i.push(o.type),s.push(a)}}return F3.rawEncode(i,s)},encodeType(r,e){let t="",n=this.findTypeDependencies(r,e).filter(i=>i!==r);n=[r].concat(n.sort());for(const i of n){if(!e[i])throw new Error("No type definition specified: "+i);t+=i+"("+e[i].map(({name:o,type:a})=>a+" "+o).join(",")+")"}return t},findTypeDependencies(r,e,t=[]){if(r=r.match(/^\w*/)[0],t.includes(r)||e[r]===void 0)return t;t.push(r);for(const n of e[r])for(const i of this.findTypeDependencies(n.type,e,t))!t.includes(i)&&t.push(i);return t},hashStruct(r,e,t,n=!0){return Dc.keccak(this.encodeData(r,e,t,n))},hashType(r,e){return Dc.keccak(this.encodeType(r,e))},sanitizeData(r){const e={};for(const t in qq.properties)r[t]&&(e[t]=r[t]);return e.types&&(e.types=Object.assign({EIP712Domain:[]},e.types)),e},hash(r,e=!0){const t=this.sanitizeData(r),n=[Buffer.from("1901","hex")];return n.push(this.hashStruct("EIP712Domain",t.domain,t.types,e)),t.primaryType!=="EIP712Domain"&&n.push(this.hashStruct(t.primaryType,t.message,t.types,e)),Dc.keccak(Buffer.concat(n))}};var dSe={TYPED_MESSAGE_SCHEMA:qq,TypedDataUtils:n9,hashForSignTypedDataLegacy:function(r){return fSe(r.data)},hashForSignTypedData_v3:function(r){return n9.hash(r.data,!1)},hashForSignTypedData_v4:function(r){return n9.hash(r.data)}};function fSe(r){const e=new Error("Expect argument to be non-empty array");if(typeof r!="object"||!r.length)throw e;const t=r.map(function(s){return s.type==="bytes"?Dc.toBuffer(s.value):s.value}),n=r.map(function(s){return s.type}),i=r.map(function(s){if(!s.name)throw e;return s.type+" "+s.name});return F3.soliditySHA3(["bytes32","bytes32"],[F3.soliditySHA3(new Array(r.length).fill("string"),i),F3.soliditySHA3(n,t)])}var Su={};Object.defineProperty(Su,"__esModule",{value:!0});Su.APP_VERSION_KEY=Su.LOCAL_STORAGE_ADDRESSES_KEY=Su.WALLET_USER_NAME_KEY=void 0;Su.WALLET_USER_NAME_KEY="walletUsername";Su.LOCAL_STORAGE_ADDRESSES_KEY="Addresses";Su.APP_VERSION_KEY="AppVersion";var wb={};Object.defineProperty(wb,"__esModule",{value:!0});wb.RelayEventManager=void 0;const pSe=Jt;class gSe{constructor(){this._nextRequestId=0,this.callbacks=new Map}makeRequestId(){this._nextRequestId=(this._nextRequestId+1)%2147483647;const e=this._nextRequestId,t=(0,pSe.prepend0x)(e.toString(16));return this.callbacks.get(t)&&this.callbacks.delete(t),e}}wb.RelayEventManager=gSe;var _x={},xx={},Ax={};Object.defineProperty(Ax,"__esModule",{value:!0});Ax.WalletLinkCipher=void 0;const g4=Jt;class mSe{constructor(e){this.secret=e}async encrypt(e){const t=this.secret;if(t.length!==64)throw Error("secret must be 256 bits");const n=crypto.getRandomValues(new Uint8Array(12)),i=await crypto.subtle.importKey("raw",(0,g4.hexStringToUint8Array)(t),{name:"aes-gcm"},!1,["encrypt","decrypt"]),s=new TextEncoder,o=await window.crypto.subtle.encrypt({name:"AES-GCM",iv:n},i,s.encode(e)),a=16,c=o.slice(o.byteLength-a),l=o.slice(0,o.byteLength-a),h=new Uint8Array(c),f=new Uint8Array(l),v=new Uint8Array([...n,...h,...f]);return(0,g4.uint8ArrayToHex)(v)}async decrypt(e){const t=this.secret;if(t.length!==64)throw Error("secret must be 256 bits");return new Promise((n,i)=>{(async function(){const s=await crypto.subtle.importKey("raw",(0,g4.hexStringToUint8Array)(t),{name:"aes-gcm"},!1,["encrypt","decrypt"]),o=(0,g4.hexStringToUint8Array)(e),a=o.slice(0,12),c=o.slice(12,28),l=o.slice(28),h=new Uint8Array([...l,...c]),f={name:"AES-GCM",iv:new Uint8Array(a)};try{const v=await window.crypto.subtle.decrypt(f,s,h),y=new TextDecoder;n(y.decode(v))}catch(v){i(v)}})()})}}Ax.WalletLinkCipher=mSe;var Ex={};Object.defineProperty(Ex,"__esModule",{value:!0});Ex.WalletLinkHTTP=void 0;class wSe{constructor(e,t,n){this.linkAPIUrl=e,this.sessionId=t;const i=`${t}:${n}`;this.auth=`Basic ${btoa(i)}`}async markUnseenEventsAsSeen(e){return Promise.all(e.map(t=>fetch(`${this.linkAPIUrl}/events/${t.eventId}/seen`,{method:"POST",headers:{Authorization:this.auth}}))).catch(t=>console.error("Unabled to mark event as failed:",t))}async fetchUnseenEvents(){var e;const t=await fetch(`${this.linkAPIUrl}/events?unseen=true`,{headers:{Authorization:this.auth}});if(t.ok){const{events:n,error:i}=await t.json();if(i)throw new Error(`Check unseen events failed: ${i}`);const s=(e=n==null?void 0:n.filter(o=>o.event==="Web3Response").map(o=>({type:"Event",sessionId:this.sessionId,eventId:o.id,event:o.event,data:o.data})))!==null&&e!==void 0?e:[];return this.markUnseenEventsAsSeen(s),s}throw new Error(`Check unseen events failed: ${t.status}`)}}Ex.WalletLinkHTTP=wSe;var Hw={};Object.defineProperty(Hw,"__esModule",{value:!0});Hw.WalletLinkWebSocket=Hw.ConnectionState=void 0;var Lg;(function(r){r[r.DISCONNECTED=0]="DISCONNECTED",r[r.CONNECTING=1]="CONNECTING",r[r.CONNECTED=2]="CONNECTED"})(Lg||(Hw.ConnectionState=Lg={}));class vSe{setConnectionStateListener(e){this.connectionStateListener=e}setIncomingDataListener(e){this.incomingDataListener=e}constructor(e,t=WebSocket){this.WebSocketClass=t,this.webSocket=null,this.pendingData=[],this.url=e.replace(/^http/,"ws")}async connect(){if(this.webSocket)throw new Error("webSocket object is not null");return new Promise((e,t)=>{var n;let i;try{this.webSocket=i=new this.WebSocketClass(this.url)}catch(s){t(s);return}(n=this.connectionStateListener)===null||n===void 0||n.call(this,Lg.CONNECTING),i.onclose=s=>{var o;this.clearWebSocket(),t(new Error(`websocket error ${s.code}: ${s.reason}`)),(o=this.connectionStateListener)===null||o===void 0||o.call(this,Lg.DISCONNECTED)},i.onopen=s=>{var o;e(),(o=this.connectionStateListener)===null||o===void 0||o.call(this,Lg.CONNECTED),this.pendingData.length>0&&([...this.pendingData].forEach(c=>this.sendData(c)),this.pendingData=[])},i.onmessage=s=>{var o,a;if(s.data==="h")(o=this.incomingDataListener)===null||o===void 0||o.call(this,{type:"Heartbeat"});else try{const c=JSON.parse(s.data);(a=this.incomingDataListener)===null||a===void 0||a.call(this,c)}catch{}}})}disconnect(){var e;const{webSocket:t}=this;if(t){this.clearWebSocket(),(e=this.connectionStateListener)===null||e===void 0||e.call(this,Lg.DISCONNECTED),this.connectionStateListener=void 0,this.incomingDataListener=void 0;try{t.close()}catch{}}}sendData(e){const{webSocket:t}=this;if(!t){this.pendingData.push(e),this.connect();return}t.send(e)}clearWebSocket(){const{webSocket:e}=this;e&&(this.webSocket=null,e.onclose=null,e.onerror=null,e.onmessage=null,e.onopen=null)}}Hw.WalletLinkWebSocket=vSe;Object.defineProperty(xx,"__esModule",{value:!0});xx.WalletLinkConnection=void 0;const $B=Su,ySe=Ax,bSe=Ex,m4=Hw,mg=Ts,BB=1e4,_Se=6e4;class xSe{constructor({session:e,linkAPIUrl:t,listener:n,WebSocketClass:i=WebSocket}){this.destroyed=!1,this.lastHeartbeatResponse=0,this.nextReqId=(0,mg.IntNumber)(1),this._connected=!1,this._linked=!1,this.shouldFetchUnseenEventsOnConnect=!1,this.requestResolutions=new Map,this.handleSessionMetadataUpdated=o=>{if(!o)return;new Map([["__destroyed",this.handleDestroyed],["EthereumAddress",this.handleAccountUpdated],["WalletUsername",this.handleWalletUsernameUpdated],["AppVersion",this.handleAppVersionUpdated],["ChainId",c=>o.JsonRpcUrl&&this.handleChainUpdated(c,o.JsonRpcUrl)]]).forEach((c,l)=>{const h=o[l];h!==void 0&&c(h)})},this.handleDestroyed=o=>{var a;o==="1"&&((a=this.listener)===null||a===void 0||a.resetAndReload())},this.handleAccountUpdated=async o=>{var a;{const c=await this.cipher.decrypt(o);(a=this.listener)===null||a===void 0||a.accountUpdated(c)}},this.handleMetadataUpdated=async(o,a)=>{var c;{const l=await this.cipher.decrypt(a);(c=this.listener)===null||c===void 0||c.metadataUpdated(o,l)}},this.handleWalletUsernameUpdated=async o=>{this.handleMetadataUpdated($B.WALLET_USER_NAME_KEY,o)},this.handleAppVersionUpdated=async o=>{this.handleMetadataUpdated($B.APP_VERSION_KEY,o)},this.handleChainUpdated=async(o,a)=>{var c;{const l=await this.cipher.decrypt(o),h=await this.cipher.decrypt(a);(c=this.listener)===null||c===void 0||c.chainUpdated(l,h)}},this.session=e,this.cipher=new ySe.WalletLinkCipher(e.secret),this.listener=n;const s=new m4.WalletLinkWebSocket(`${t}/rpc`,i);s.setConnectionStateListener(async o=>{let a=!1;switch(o){case m4.ConnectionState.DISCONNECTED:if(!this.destroyed){const c=async()=>{await new Promise(l=>setTimeout(l,5e3)),this.destroyed||s.connect().catch(()=>{c()})};c()}break;case m4.ConnectionState.CONNECTED:try{await this.authenticate(),this.sendIsLinked(),this.sendGetSessionConfig(),a=!0}catch{}this.updateLastHeartbeat(),setInterval(()=>{this.heartbeat()},BB),this.shouldFetchUnseenEventsOnConnect&&this.fetchUnseenEventsAPI();break;case m4.ConnectionState.CONNECTING:break}this.connected!==a&&(this.connected=a)}),s.setIncomingDataListener(o=>{var a;switch(o.type){case"Heartbeat":this.updateLastHeartbeat();return;case"IsLinkedOK":case"Linked":{const c=o.type==="IsLinkedOK"?o.linked:void 0;this.linked=c||o.onlineGuests>0;break}case"GetSessionConfigOK":case"SessionConfigUpdated":{this.handleSessionMetadataUpdated(o.metadata);break}case"Event":{this.handleIncomingEvent(o);break}}o.id!==void 0&&((a=this.requestResolutions.get(o.id))===null||a===void 0||a(o))}),this.ws=s,this.http=new bSe.WalletLinkHTTP(t,e.id,e.key)}connect(){if(this.destroyed)throw new Error("instance is destroyed");this.ws.connect()}destroy(){this.destroyed=!0,this.ws.disconnect(),this.listener=void 0}get isDestroyed(){return this.destroyed}get connected(){return this._connected}set connected(e){var t;this._connected=e,e&&((t=this.onceConnected)===null||t===void 0||t.call(this))}setOnceConnected(e){return new Promise(t=>{this.connected?e().then(t):this.onceConnected=()=>{e().then(t),this.onceConnected=void 0}})}get linked(){return this._linked}set linked(e){var t,n;this._linked=e,e&&((t=this.onceLinked)===null||t===void 0||t.call(this)),(n=this.listener)===null||n===void 0||n.linkedUpdated(e)}setOnceLinked(e){return new Promise(t=>{this.linked?e().then(t):this.onceLinked=()=>{e().then(t),this.onceLinked=void 0}})}async handleIncomingEvent(e){var t;if(!(e.type!=="Event"||e.event!=="Web3Response")){const n=await this.cipher.decrypt(e.data),i=JSON.parse(n);if(i.type!=="WEB3_RESPONSE")return;(t=this.listener)===null||t===void 0||t.handleWeb3ResponseMessage(i)}}async checkUnseenEvents(){if(!this.connected){this.shouldFetchUnseenEventsOnConnect=!0;return}await new Promise(e=>setTimeout(e,250));try{await this.fetchUnseenEventsAPI()}catch(e){console.error("Unable to check for unseen events",e)}}async fetchUnseenEventsAPI(){this.shouldFetchUnseenEventsOnConnect=!1,(await this.http.fetchUnseenEvents()).forEach(t=>this.handleIncomingEvent(t))}async setSessionMetadata(e,t){const n={type:"SetSessionConfig",id:(0,mg.IntNumber)(this.nextReqId++),sessionId:this.session.id,metadata:{[e]:t}};return this.setOnceConnected(async()=>{const i=await this.makeRequest(n);if(i.type==="Fail")throw new Error(i.error||"failed to set session metadata")})}async publishEvent(e,t,n=!1){const i=await this.cipher.encrypt(JSON.stringify(Object.assign(Object.assign({},t),{origin:location.origin,relaySource:"coinbaseWalletExtension"in window&&window.coinbaseWalletExtension?"injected_sdk":"sdk"}))),s={type:"PublishEvent",id:(0,mg.IntNumber)(this.nextReqId++),sessionId:this.session.id,event:e,data:i,callWebhook:n};return this.setOnceLinked(async()=>{const o=await this.makeRequest(s);if(o.type==="Fail")throw new Error(o.error||"failed to publish event");return o.eventId})}sendData(e){this.ws.sendData(JSON.stringify(e))}updateLastHeartbeat(){this.lastHeartbeatResponse=Date.now()}heartbeat(){if(Date.now()-this.lastHeartbeatResponse>BB*2){this.ws.disconnect();return}try{this.ws.sendData("h")}catch{}}async makeRequest(e,t=_Se){const n=e.id;this.sendData(e);let i;return Promise.race([new Promise((s,o)=>{i=window.setTimeout(()=>{o(new Error(`request ${n} timed out`))},t)}),new Promise(s=>{this.requestResolutions.set(n,o=>{clearTimeout(i),s(o),this.requestResolutions.delete(n)})})])}async authenticate(){const e={type:"HostSession",id:(0,mg.IntNumber)(this.nextReqId++),sessionId:this.session.id,sessionKey:this.session.key},t=await this.makeRequest(e);if(t.type==="Fail")throw new Error(t.error||"failed to authenticate")}sendIsLinked(){const e={type:"IsLinked",id:(0,mg.IntNumber)(this.nextReqId++),sessionId:this.session.id};this.sendData(e)}sendGetSessionConfig(){const e={type:"GetSessionConfig",id:(0,mg.IntNumber)(this.nextReqId++),sessionId:this.session.id};this.sendData(e)}}xx.WalletLinkConnection=xSe;var Cx={},Kq={exports:{}},Gq=p0.Buffer;function Sx(r,e){this._block=Gq.alloc(r),this._finalSize=e,this._blockSize=r,this._len=0}Sx.prototype.update=function(r,e){typeof r=="string"&&(e=e||"utf8",r=Gq.from(r,e));for(var t=this._block,n=this._blockSize,i=r.length,s=this._len,o=0;o=this._finalSize&&(this._update(this._block),this._block.fill(0));var t=this._len*8;if(t<=4294967295)this._block.writeUInt32BE(t,this._blockSize-4);else{var n=(t&4294967295)>>>0,i=(t-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var s=this._hash();return r?s.toString(r):s};Sx.prototype._update=function(){throw new Error("_update must be implemented by subclass")};var p2=Sx,ASe=Il,Zq=p2,ESe=p0.Buffer,CSe=[1518500249,1859775393,-1894007588,-899497514],SSe=new Array(80);function vb(){this.init(),this._w=SSe,Zq.call(this,64,56)}ASe(vb,Zq);vb.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function ISe(r){return r<<5|r>>>27}function TSe(r){return r<<30|r>>>2}function RSe(r,e,t,n){return r===0?e&t|~e&n:r===2?e&t|e&n|t&n:e^t^n}vb.prototype._update=function(r){for(var e=this._w,t=this._a|0,n=this._b|0,i=this._c|0,s=this._d|0,o=this._e|0,a=0;a<16;++a)e[a]=r.readInt32BE(a*4);for(;a<80;++a)e[a]=e[a-3]^e[a-8]^e[a-14]^e[a-16];for(var c=0;c<80;++c){var l=~~(c/20),h=ISe(t)+RSe(l,n,i,s)+o+e[c]+CSe[l]|0;o=s,s=i,i=TSe(n),n=t,t=h}this._a=t+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=s+this._d|0,this._e=o+this._e|0};vb.prototype._hash=function(){var r=ESe.allocUnsafe(20);return r.writeInt32BE(this._a|0,0),r.writeInt32BE(this._b|0,4),r.writeInt32BE(this._c|0,8),r.writeInt32BE(this._d|0,12),r.writeInt32BE(this._e|0,16),r};var kSe=vb,NSe=Il,Yq=p2,PSe=p0.Buffer,OSe=[1518500249,1859775393,-1894007588,-899497514],MSe=new Array(80);function yb(){this.init(),this._w=MSe,Yq.call(this,64,56)}NSe(yb,Yq);yb.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function DSe(r){return r<<1|r>>>31}function $Se(r){return r<<5|r>>>27}function BSe(r){return r<<30|r>>>2}function LSe(r,e,t,n){return r===0?e&t|~e&n:r===2?e&t|e&n|t&n:e^t^n}yb.prototype._update=function(r){for(var e=this._w,t=this._a|0,n=this._b|0,i=this._c|0,s=this._d|0,o=this._e|0,a=0;a<16;++a)e[a]=r.readInt32BE(a*4);for(;a<80;++a)e[a]=DSe(e[a-3]^e[a-8]^e[a-14]^e[a-16]);for(var c=0;c<80;++c){var l=~~(c/20),h=$Se(t)+LSe(l,n,i,s)+o+e[c]+OSe[l]|0;o=s,s=i,i=BSe(n),n=t,t=h}this._a=t+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=s+this._d|0,this._e=o+this._e|0};yb.prototype._hash=function(){var r=PSe.allocUnsafe(20);return r.writeInt32BE(this._a|0,0),r.writeInt32BE(this._b|0,4),r.writeInt32BE(this._c|0,8),r.writeInt32BE(this._d|0,12),r.writeInt32BE(this._e|0,16),r};var USe=yb,FSe=Il,Qq=p2,jSe=p0.Buffer,HSe=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],WSe=new Array(64);function bb(){this.init(),this._w=WSe,Qq.call(this,64,56)}FSe(bb,Qq);bb.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this};function zSe(r,e,t){return t^r&(e^t)}function VSe(r,e,t){return r&e|t&(r|e)}function qSe(r){return(r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10)}function KSe(r){return(r>>>6|r<<26)^(r>>>11|r<<21)^(r>>>25|r<<7)}function GSe(r){return(r>>>7|r<<25)^(r>>>18|r<<14)^r>>>3}function ZSe(r){return(r>>>17|r<<15)^(r>>>19|r<<13)^r>>>10}bb.prototype._update=function(r){for(var e=this._w,t=this._a|0,n=this._b|0,i=this._c|0,s=this._d|0,o=this._e|0,a=this._f|0,c=this._g|0,l=this._h|0,h=0;h<16;++h)e[h]=r.readInt32BE(h*4);for(;h<64;++h)e[h]=ZSe(e[h-2])+e[h-7]+GSe(e[h-15])+e[h-16]|0;for(var f=0;f<64;++f){var v=l+KSe(o)+zSe(o,a,c)+HSe[f]+e[f]|0,y=qSe(t)+VSe(t,n,i)|0;l=c,c=a,a=o,o=s+v|0,s=i,i=n,n=t,t=v+y|0}this._a=t+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=s+this._d|0,this._e=o+this._e|0,this._f=a+this._f|0,this._g=c+this._g|0,this._h=l+this._h|0};bb.prototype._hash=function(){var r=jSe.allocUnsafe(32);return r.writeInt32BE(this._a,0),r.writeInt32BE(this._b,4),r.writeInt32BE(this._c,8),r.writeInt32BE(this._d,12),r.writeInt32BE(this._e,16),r.writeInt32BE(this._f,20),r.writeInt32BE(this._g,24),r.writeInt32BE(this._h,28),r};var Jq=bb,YSe=Il,QSe=Jq,JSe=p2,XSe=p0.Buffer,eIe=new Array(64);function Ix(){this.init(),this._w=eIe,JSe.call(this,64,56)}YSe(Ix,QSe);Ix.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this};Ix.prototype._hash=function(){var r=XSe.allocUnsafe(28);return r.writeInt32BE(this._a,0),r.writeInt32BE(this._b,4),r.writeInt32BE(this._c,8),r.writeInt32BE(this._d,12),r.writeInt32BE(this._e,16),r.writeInt32BE(this._f,20),r.writeInt32BE(this._g,24),r};var tIe=Ix,rIe=Il,Xq=p2,nIe=p0.Buffer,LB=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],iIe=new Array(160);function _b(){this.init(),this._w=iIe,Xq.call(this,128,112)}rIe(_b,Xq);_b.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this};function UB(r,e,t){return t^r&(e^t)}function FB(r,e,t){return r&e|t&(r|e)}function jB(r,e){return(r>>>28|e<<4)^(e>>>2|r<<30)^(e>>>7|r<<25)}function HB(r,e){return(r>>>14|e<<18)^(r>>>18|e<<14)^(e>>>9|r<<23)}function sIe(r,e){return(r>>>1|e<<31)^(r>>>8|e<<24)^r>>>7}function oIe(r,e){return(r>>>1|e<<31)^(r>>>8|e<<24)^(r>>>7|e<<25)}function aIe(r,e){return(r>>>19|e<<13)^(e>>>29|r<<3)^r>>>6}function cIe(r,e){return(r>>>19|e<<13)^(e>>>29|r<<3)^(r>>>6|e<<26)}function qi(r,e){return r>>>0>>0?1:0}_b.prototype._update=function(r){for(var e=this._w,t=this._ah|0,n=this._bh|0,i=this._ch|0,s=this._dh|0,o=this._eh|0,a=this._fh|0,c=this._gh|0,l=this._hh|0,h=this._al|0,f=this._bl|0,v=this._cl|0,y=this._dl|0,A=this._el|0,M=this._fl|0,$=this._gl|0,L=this._hl|0,P=0;P<32;P+=2)e[P]=r.readInt32BE(P*4),e[P+1]=r.readInt32BE(P*4+4);for(;P<160;P+=2){var H=e[P-30],F=e[P-15*2+1],q=sIe(H,F),Y=oIe(F,H);H=e[P-2*2],F=e[P-2*2+1];var I=aIe(H,F),T=cIe(F,H),V=e[P-7*2],Q=e[P-7*2+1],te=e[P-16*2],oe=e[P-16*2+1],d=Y+Q|0,g=q+V+qi(d,Y)|0;d=d+T|0,g=g+I+qi(d,T)|0,d=d+oe|0,g=g+te+qi(d,oe)|0,e[P]=g,e[P+1]=d}for(var m=0;m<160;m+=2){g=e[m],d=e[m+1];var b=FB(t,n,i),E=FB(h,f,v),C=jB(t,h),B=jB(h,t),R=HB(o,A),w=HB(A,o),O=LB[m],pe=LB[m+1],be=UB(o,a,c),x=UB(A,M,$),Z=L+w|0,k=l+R+qi(Z,L)|0;Z=Z+x|0,k=k+be+qi(Z,x)|0,Z=Z+pe|0,k=k+O+qi(Z,pe)|0,Z=Z+d|0,k=k+g+qi(Z,d)|0;var W=B+E|0,J=C+b+qi(W,B)|0;l=c,L=$,c=a,$=M,a=o,M=A,A=y+Z|0,o=s+k+qi(A,y)|0,s=i,y=v,i=n,v=f,n=t,f=h,h=Z+W|0,t=k+J+qi(h,Z)|0}this._al=this._al+h|0,this._bl=this._bl+f|0,this._cl=this._cl+v|0,this._dl=this._dl+y|0,this._el=this._el+A|0,this._fl=this._fl+M|0,this._gl=this._gl+$|0,this._hl=this._hl+L|0,this._ah=this._ah+t+qi(this._al,h)|0,this._bh=this._bh+n+qi(this._bl,f)|0,this._ch=this._ch+i+qi(this._cl,v)|0,this._dh=this._dh+s+qi(this._dl,y)|0,this._eh=this._eh+o+qi(this._el,A)|0,this._fh=this._fh+a+qi(this._fl,M)|0,this._gh=this._gh+c+qi(this._gl,$)|0,this._hh=this._hh+l+qi(this._hl,L)|0};_b.prototype._hash=function(){var r=nIe.allocUnsafe(64);function e(t,n,i){r.writeInt32BE(t,i),r.writeInt32BE(n,i+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),r};var eK=_b,lIe=Il,uIe=eK,hIe=p2,dIe=p0.Buffer,fIe=new Array(160);function Tx(){this.init(),this._w=fIe,hIe.call(this,128,112)}lIe(Tx,uIe);Tx.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this};Tx.prototype._hash=function(){var r=dIe.allocUnsafe(48);function e(t,n,i){r.writeInt32BE(t,i),r.writeInt32BE(n,i+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),r};var pIe=Tx,U1=Kq.exports=function(e){e=e.toLowerCase();var t=U1[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t};U1.sha=kSe;U1.sha1=USe;U1.sha224=tIe;U1.sha256=Jq;U1.sha384=pIe;U1.sha512=eK;var gIe=Kq.exports;Object.defineProperty(Cx,"__esModule",{value:!0});Cx.WalletLinkSession=void 0;const mIe=gIe,WB=Jt,zB="session:id",VB="session:secret",qB="session:linked";class ZT{constructor(e,t,n,i){this._storage=e,this._id=t||(0,WB.randomBytesHex)(16),this._secret=n||(0,WB.randomBytesHex)(32),this._key=new mIe.sha256().update(`${this._id}, ${this._secret} WalletLink`).digest("hex"),this._linked=!!i}static load(e){const t=e.getItem(zB),n=e.getItem(qB),i=e.getItem(VB);return t&&i?new ZT(e,t,i,n==="1"):null}get id(){return this._id}get secret(){return this._secret}get key(){return this._key}get linked(){return this._linked}set linked(e){this._linked=e,this.persistLinked()}save(){return this._storage.setItem(zB,this._id),this._storage.setItem(VB,this._secret),this.persistLinked(),this}persistLinked(){this._storage.setItem(qB,this._linked?"1":"0")}}Cx.WalletLinkSession=ZT;var da={};Object.defineProperty(da,"__esModule",{value:!0});da.isDarkMode=da.isMobileWeb=da.getLocation=da.createQrUrl=void 0;function wIe(r,e,t,n,i,s){const o=n?"parent-id":"id",a=new URLSearchParams({[o]:r,secret:e,server:t,v:i,chainId:s.toString()}).toString();return`${t}/#/link?${a}`}da.createQrUrl=wIe;function vIe(){try{return window.frameElement!==null}catch{return!1}}function yIe(){try{return vIe()&&window.top?window.top.location:window.location}catch{return window.location}}da.getLocation=yIe;function bIe(){var r;return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test((r=window==null?void 0:window.navigator)===null||r===void 0?void 0:r.userAgent)}da.isMobileWeb=bIe;function _Ie(){var r,e;return(e=(r=window==null?void 0:window.matchMedia)===null||r===void 0?void 0:r.call(window,"(prefers-color-scheme: dark)").matches)!==null&&e!==void 0?e:!1}da.isDarkMode=_Ie;var Rx={},xb={},YT={};Object.defineProperty(YT,"__esModule",{value:!0});YT.default='@namespace svg "http://www.w3.org/2000/svg";.-cbwsdk-css-reset,.-cbwsdk-css-reset *{animation:none;animation-delay:0;animation-direction:normal;animation-duration:0;animation-fill-mode:none;animation-iteration-count:1;animation-name:none;animation-play-state:running;animation-timing-function:ease;backface-visibility:visible;background:0;background-attachment:scroll;background-clip:border-box;background-color:rgba(0,0,0,0);background-image:none;background-origin:padding-box;background-position:0 0;background-position-x:0;background-position-y:0;background-repeat:repeat;background-size:auto auto;border:0;border-style:none;border-width:medium;border-color:inherit;border-bottom:0;border-bottom-color:inherit;border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-style:none;border-bottom-width:medium;border-collapse:separate;border-image:none;border-left:0;border-left-color:inherit;border-left-style:none;border-left-width:medium;border-radius:0;border-right:0;border-right-color:inherit;border-right-style:none;border-right-width:medium;border-spacing:0;border-top:0;border-top-color:inherit;border-top-left-radius:0;border-top-right-radius:0;border-top-style:none;border-top-width:medium;box-shadow:none;box-sizing:border-box;caption-side:top;clear:none;clip:auto;color:inherit;columns:auto;column-count:auto;column-fill:balance;column-gap:normal;column-rule:medium none currentColor;column-rule-color:currentColor;column-rule-style:none;column-rule-width:none;column-span:1;column-width:auto;counter-increment:none;counter-reset:none;direction:ltr;empty-cells:show;float:none;font:normal;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;height:auto;hyphens:none;letter-spacing:normal;line-height:normal;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;margin:0;margin-bottom:0;margin-left:0;margin-right:0;margin-top:0;opacity:1;orphans:0;outline:0;outline-color:invert;outline-style:none;outline-width:medium;overflow:visible;overflow-x:visible;overflow-y:visible;padding:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;page-break-after:auto;page-break-before:auto;page-break-inside:auto;perspective:none;perspective-origin:50% 50%;pointer-events:auto;position:static;quotes:"\\201C" "\\201D" "\\2018" "\\2019";tab-size:8;table-layout:auto;text-align:inherit;text-align-last:auto;text-decoration:none;text-decoration-color:inherit;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-shadow:none;text-transform:none;transform:none;transform-style:flat;transition:none;transition-delay:0s;transition-duration:0s;transition-property:none;transition-timing-function:ease;unicode-bidi:normal;vertical-align:baseline;visibility:visible;white-space:normal;widows:0;word-spacing:normal;z-index:auto}.-cbwsdk-css-reset strong{font-weight:bold}.-cbwsdk-css-reset *{box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;line-height:1}.-cbwsdk-css-reset [class*=container]{margin:0;padding:0}.-cbwsdk-css-reset style{display:none}';var xIe=Yr&&Yr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(xb,"__esModule",{value:!0});xb.injectCssReset=void 0;const AIe=xIe(YT);function EIe(){const r=document.createElement("style");r.type="text/css",r.appendChild(document.createTextNode(AIe.default)),document.documentElement.appendChild(r)}xb.injectCssReset=EIe;var QT={};function tK(r){var e,t,n="";if(typeof r=="string"||typeof r=="number")n+=r;else if(typeof r=="object")if(Array.isArray(r))for(e=0;e2&&(o.children=arguments.length>3?Ab.call(arguments,2):t),typeof r=="function"&&r.defaultProps!=null)for(s in r.defaultProps)o[s]===void 0&&(o[s]=r.defaultProps[s]);return j3(r,o,n,i,null)}function j3(r,e,t,n,i){var s={type:r,props:e,key:t,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:i??++nK,__i:-1,__u:0};return i==null&&Wn.vnode!=null&&Wn.vnode(s),s}function IIe(){return{current:null}}function Eb(r){return r.children}function H3(r,e){this.props=r,this.context=e}function f1(r,e){if(e==null)return r.__?f1(r.__,r.__i+1):null;for(var t;ee&&z0.sort(RS));D8.__r=0}function uK(r,e,t,n,i,s,o,a,c,l,h){var f,v,y,A,M,$=n&&n.__k||aK,L=e.length;for(t.__d=c,TIe(t,e,$),c=t.__d,f=0;f0?j3(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)!=null?(i.__=r,i.__b=r.__b+1,a=RIe(i,t,o,h),i.__i=a,s=null,a!==-1&&(h--,(s=t[a])&&(s.__u|=131072)),s==null||s.__v===null?(a==-1&&f--,typeof i.type!="function"&&(i.__u|=65536)):a!==o&&(a==o-1?f--:a==o+1?f++:a>o?h>c-o?f+=a-o:f--:a(c!=null&&!(131072&c.__u)?1:0))for(;o>=0||a=0){if((c=e[o])&&!(131072&c.__u)&&i==c.key&&s===c.type)return o;o--}if(a2&&(a.children=arguments.length>3?Ab.call(arguments,2):t),j3(r.type,a,n||r.key,i||r.ref,null)}function OIe(r,e){var t={__c:e="__cC"+oK++,__:r,Consumer:function(n,i){return n.children(i)},Provider:function(n){var i,s;return this.getChildContext||(i=[],(s={})[e]=this,this.getChildContext=function(){return s},this.componentWillUnmount=function(){i=null},this.shouldComponentUpdate=function(o){this.props.value!==o.value&&i.some(function(a){a.__e=!0,OS(a)})},this.sub=function(o){i.push(o);var a=o.componentWillUnmount;o.componentWillUnmount=function(){i&&i.splice(i.indexOf(o),1),a&&a.call(o)}}),n.children}};return t.Provider.__=t.Consumer.contextType=t}Ab=aK.slice,Wn={__e:function(r,e,t,n){for(var i,s,o;e=e.__;)if((i=e.__c)&&!i.__)try{if((s=i.constructor)&&s.getDerivedStateFromError!=null&&(i.setState(s.getDerivedStateFromError(r)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(r,n||{}),o=i.__d),o)return i.__E=i}catch(a){r=a}throw r}},nK=0,iK=function(r){return r!=null&&r.constructor==null},H3.prototype.setState=function(r,e){var t;t=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Xh({},this.state),typeof r=="function"&&(r=r(Xh({},t),this.props)),r&&Xh(t,r),r!=null&&this.__v&&(e&&this._sb.push(e),OS(this))},H3.prototype.forceUpdate=function(r){this.__v&&(this.__e=!0,r&&this.__h.push(r),OS(this))},H3.prototype.render=Eb,z0=[],sK=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,RS=function(r,e){return r.__v.__b-e.__v.__b},D8.__r=0,JT=0,kS=YB(!1),NS=YB(!0),oK=0;const MIe=Object.freeze(Object.defineProperty({__proto__:null,Component:H3,Fragment:Eb,cloneElement:PIe,createContext:OIe,createElement:PS,createRef:IIe,h:PS,hydrate:gK,get isValidElement(){return iK},get options(){return Wn},render:pK,toChildArray:dK},Symbol.toStringTag,{value:"Module"})),mK=Ey(MIe);var _d,In,i9,QB,Ww=0,wK=[],Qn=Wn,JB=Qn.__b,XB=Qn.__r,eL=Qn.diffed,tL=Qn.__c,rL=Qn.unmount,nL=Qn.__;function F1(r,e){Qn.__h&&Qn.__h(In,r,Ww||e),Ww=0;var t=In.__H||(In.__H={__:[],__h:[]});return r>=t.__.length&&t.__.push({}),t.__[r]}function vK(r){return Ww=1,yK(_K,r)}function yK(r,e,t){var n=F1(_d++,2);if(n.t=r,!n.__c&&(n.__=[t?t(e):_K(void 0,e),function(a){var c=n.__N?n.__N[0]:n.__[0],l=n.t(c,a);c!==l&&(n.__N=[l,n.__[1]],n.__c.setState({}))}],n.__c=In,!In.u)){var i=function(a,c,l){if(!n.__c.__H)return!0;var h=n.__c.__H.__.filter(function(v){return!!v.__c});if(h.every(function(v){return!v.__N}))return!s||s.call(this,a,c,l);var f=!1;return h.forEach(function(v){if(v.__N){var y=v.__[0];v.__=v.__N,v.__N=void 0,y!==v.__[0]&&(f=!0)}}),!(!f&&n.__c.props===a)&&(!s||s.call(this,a,c,l))};In.u=!0;var s=In.shouldComponentUpdate,o=In.componentWillUpdate;In.componentWillUpdate=function(a,c,l){if(this.__e){var h=s;s=void 0,i(a,c,l),s=h}o&&o.call(this,a,c,l)},In.shouldComponentUpdate=i}return n.__N||n.__}function DIe(r,e){var t=F1(_d++,3);!Qn.__s&&rR(t.__H,e)&&(t.__=r,t.i=e,In.__H.__h.push(t))}function bK(r,e){var t=F1(_d++,4);!Qn.__s&&rR(t.__H,e)&&(t.__=r,t.i=e,In.__h.push(t))}function $Ie(r){return Ww=5,tR(function(){return{current:r}},[])}function BIe(r,e,t){Ww=6,bK(function(){return typeof r=="function"?(r(e()),function(){return r(null)}):r?(r.current=e(),function(){return r.current=null}):void 0},t==null?t:t.concat(r))}function tR(r,e){var t=F1(_d++,7);return rR(t.__H,e)&&(t.__=r(),t.__H=e,t.__h=r),t.__}function LIe(r,e){return Ww=8,tR(function(){return r},e)}function UIe(r){var e=In.context[r.__c],t=F1(_d++,9);return t.c=r,e?(t.__==null&&(t.__=!0,e.sub(In)),e.props.value):r.__}function FIe(r,e){Qn.useDebugValue&&Qn.useDebugValue(e?e(r):r)}function jIe(r){var e=F1(_d++,10),t=vK();return e.__=r,In.componentDidCatch||(In.componentDidCatch=function(n,i){e.__&&e.__(n,i),t[1](n)}),[t[0],function(){t[1](void 0)}]}function HIe(){var r=F1(_d++,11);if(!r.__){for(var e=In.__v;e!==null&&!e.__m&&e.__!==null;)e=e.__;var t=e.__m||(e.__m=[0,0]);r.__="P"+t[0]+"-"+t[1]++}return r.__}function WIe(){for(var r;r=wK.shift();)if(r.__P&&r.__H)try{r.__H.__h.forEach(e6),r.__H.__h.forEach(DS),r.__H.__h=[]}catch(e){r.__H.__h=[],Qn.__e(e,r.__v)}}Qn.__b=function(r){In=null,JB&&JB(r)},Qn.__=function(r,e){r&&e.__k&&e.__k.__m&&(r.__m=e.__k.__m),nL&&nL(r,e)},Qn.__r=function(r){XB&&XB(r),_d=0;var e=(In=r.__c).__H;e&&(i9===In?(e.__h=[],In.__h=[],e.__.forEach(function(t){t.__N&&(t.__=t.__N),t.i=t.__N=void 0})):(e.__h.forEach(e6),e.__h.forEach(DS),e.__h=[],_d=0)),i9=In},Qn.diffed=function(r){eL&&eL(r);var e=r.__c;e&&e.__H&&(e.__H.__h.length&&(wK.push(e)!==1&&QB===Qn.requestAnimationFrame||((QB=Qn.requestAnimationFrame)||zIe)(WIe)),e.__H.__.forEach(function(t){t.i&&(t.__H=t.i),t.i=void 0})),i9=In=null},Qn.__c=function(r,e){e.some(function(t){try{t.__h.forEach(e6),t.__h=t.__h.filter(function(n){return!n.__||DS(n)})}catch(n){e.some(function(i){i.__h&&(i.__h=[])}),e=[],Qn.__e(n,t.__v)}}),tL&&tL(r,e)},Qn.unmount=function(r){rL&&rL(r);var e,t=r.__c;t&&t.__H&&(t.__H.__.forEach(function(n){try{e6(n)}catch(i){e=i}}),t.__H=void 0,e&&Qn.__e(e,t.__v))};var iL=typeof requestAnimationFrame=="function";function zIe(r){var e,t=function(){clearTimeout(n),iL&&cancelAnimationFrame(e),setTimeout(r)},n=setTimeout(t,100);iL&&(e=requestAnimationFrame(t))}function e6(r){var e=In,t=r.__c;typeof t=="function"&&(r.__c=void 0,t()),In=e}function DS(r){var e=In;r.__c=r.__(),In=e}function rR(r,e){return!r||r.length!==e.length||e.some(function(t,n){return t!==r[n]})}function _K(r,e){return typeof e=="function"?e(r):e}const VIe=Object.freeze(Object.defineProperty({__proto__:null,useCallback:LIe,useContext:UIe,useDebugValue:FIe,useEffect:DIe,useErrorBoundary:jIe,useId:HIe,useImperativeHandle:BIe,useLayoutEffect:bK,useMemo:tR,useReducer:yK,useRef:$Ie,useState:vK},Symbol.toStringTag,{value:"Module"})),qIe=Ey(VIe);var nR={};Object.defineProperty(nR,"__esModule",{value:!0});nR.default=".-cbwsdk-css-reset .-gear-container{margin-left:16px !important;margin-right:9px !important;display:flex;align-items:center;justify-content:center;width:24px;height:24px;transition:opacity .25s}.-cbwsdk-css-reset .-gear-container *{user-select:none}.-cbwsdk-css-reset .-gear-container svg{opacity:0;position:absolute}.-cbwsdk-css-reset .-gear-icon{height:12px;width:12px;z-index:10000}.-cbwsdk-css-reset .-cbwsdk-snackbar{align-items:flex-end;display:flex;flex-direction:column;position:fixed;right:0;top:0;z-index:2147483647}.-cbwsdk-css-reset .-cbwsdk-snackbar *{user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance{display:flex;flex-direction:column;margin:8px 16px 0 16px;overflow:visible;text-align:left;transform:translateX(0);transition:opacity .25s,transform .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header:hover .-gear-container svg{opacity:1}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header{display:flex;align-items:center;background:#fff;overflow:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-cblogo{margin:8px 8px 8px 8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-message{color:#000;font-size:13px;line-height:1.5;user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu{background:#fff;transition:opacity .25s ease-in-out,transform .25s linear,visibility 0s;visibility:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;opacity:0;flex-direction:column;padding-left:8px;padding-right:8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:last-child{margin-bottom:8px !important}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover{background:#f5f7f8;border-radius:6px;transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover span{color:#050f19;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover svg path{fill:#000;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item{visibility:inherit;height:35px;margin-top:8px;margin-bottom:0;display:flex;flex-direction:row;align-items:center;padding:8px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item *{visibility:inherit;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover{background:rgba(223,95,103,.2);transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover svg path{fill:#df5f67;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover span{color:#df5f67;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-info{color:#aaa;font-size:13px;margin:0 8px 0 32px;position:absolute}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-hidden{opacity:0;text-align:left;transform:translateX(25%);transition:opacity .5s linear}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-expanded .-cbwsdk-snackbar-instance-menu{opacity:1;display:flex;transform:translateY(8px);visibility:visible}";(function(r){var e=Yr&&Yr.__importDefault||function(v){return v&&v.__esModule?v:{default:v}};Object.defineProperty(r,"__esModule",{value:!0}),r.SnackbarInstance=r.SnackbarContainer=r.Snackbar=void 0;const t=e(rK),n=mK,i=qIe,s=da,o=e(nR),a="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNDkyIDEwLjQxOWE4LjkzIDguOTMgMCAwMTguOTMtOC45M2gxMS4xNjNhOC45MyA4LjkzIDAgMDE4LjkzIDguOTN2MTEuMTYzYTguOTMgOC45MyAwIDAxLTguOTMgOC45M0gxMC40MjJhOC45MyA4LjkzIDAgMDEtOC45My04LjkzVjEwLjQxOXoiIGZpbGw9IiMxNjUyRjAiLz48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEwLjQxOSAwSDIxLjU4QzI3LjMzNSAwIDMyIDQuNjY1IDMyIDEwLjQxOVYyMS41OEMzMiAyNy4zMzUgMjcuMzM1IDMyIDIxLjU4MSAzMkgxMC40MkM0LjY2NSAzMiAwIDI3LjMzNSAwIDIxLjU4MVYxMC40MkMwIDQuNjY1IDQuNjY1IDAgMTAuNDE5IDB6bTAgMS40ODhhOC45MyA4LjkzIDAgMDAtOC45MyA4LjkzdjExLjE2M2E4LjkzIDguOTMgMCAwMDguOTMgOC45M0gyMS41OGE4LjkzIDguOTMgMCAwMDguOTMtOC45M1YxMC40MmE4LjkzIDguOTMgMCAwMC04LjkzLTguOTNIMTAuNDJ6IiBmaWxsPSIjZmZmIi8+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNS45OTggMjYuMDQ5Yy01LjU0OSAwLTEwLjA0Ny00LjQ5OC0xMC4wNDctMTAuMDQ3IDAtNS41NDggNC40OTgtMTAuMDQ2IDEwLjA0Ny0xMC4wNDYgNS41NDggMCAxMC4wNDYgNC40OTggMTAuMDQ2IDEwLjA0NiAwIDUuNTQ5LTQuNDk4IDEwLjA0Ny0xMC4wNDYgMTAuMDQ3eiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGQ9Ik0xMi43NjIgMTQuMjU0YzAtLjgyMi42NjctMS40ODkgMS40ODktMS40ODloMy40OTdjLjgyMiAwIDEuNDg4LjY2NiAxLjQ4OCAxLjQ4OXYzLjQ5N2MwIC44MjItLjY2NiAxLjQ4OC0xLjQ4OCAxLjQ4OGgtMy40OTdhMS40ODggMS40ODggMCAwMS0xLjQ4OS0xLjQ4OHYtMy40OTh6IiBmaWxsPSIjMTY1MkYwIi8+PC9zdmc+",c="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDYuNzV2LTEuNWwtMS43Mi0uNTdjLS4wOC0uMjctLjE5LS41Mi0uMzItLjc3bC44MS0xLjYyLTEuMDYtMS4wNi0xLjYyLjgxYy0uMjQtLjEzLS41LS4yNC0uNzctLjMyTDYuNzUgMGgtMS41bC0uNTcgMS43MmMtLjI3LjA4LS41My4xOS0uNzcuMzJsLTEuNjItLjgxLTEuMDYgMS4wNi44MSAxLjYyYy0uMTMuMjQtLjI0LjUtLjMyLjc3TDAgNS4yNXYxLjVsMS43Mi41N2MuMDguMjcuMTkuNTMuMzIuNzdsLS44MSAxLjYyIDEuMDYgMS4wNiAxLjYyLS44MWMuMjQuMTMuNS4yMy43Ny4zMkw1LjI1IDEyaDEuNWwuNTctMS43MmMuMjctLjA4LjUyLS4xOS43Ny0uMzJsMS42Mi44MSAxLjA2LTEuMDYtLjgxLTEuNjJjLjEzLS4yNC4yMy0uNS4zMi0uNzdMMTIgNi43NXpNNiA4LjVhMi41IDIuNSAwIDAxMC01IDIuNSAyLjUgMCAwMTAgNXoiIGZpbGw9IiMwNTBGMTkiLz48L3N2Zz4=";class l{constructor(){this.items=new Map,this.nextItemKey=0,this.root=null,this.darkMode=(0,s.isDarkMode)()}attach(y){this.root=document.createElement("div"),this.root.className="-cbwsdk-snackbar-root",y.appendChild(this.root),this.render()}presentItem(y){const A=this.nextItemKey++;return this.items.set(A,y),this.render(),()=>{this.items.delete(A),this.render()}}clear(){this.items.clear(),this.render()}render(){this.root&&(0,n.render)((0,n.h)("div",null,(0,n.h)(r.SnackbarContainer,{darkMode:this.darkMode},Array.from(this.items.entries()).map(([y,A])=>(0,n.h)(r.SnackbarInstance,Object.assign({},A,{key:y}))))),this.root)}}r.Snackbar=l;const h=v=>(0,n.h)("div",{class:(0,t.default)("-cbwsdk-snackbar-container")},(0,n.h)("style",null,o.default),(0,n.h)("div",{class:"-cbwsdk-snackbar"},v.children));r.SnackbarContainer=h;const f=({autoExpand:v,message:y,menuItems:A})=>{const[M,$]=(0,i.useState)(!0),[L,P]=(0,i.useState)(v??!1);(0,i.useEffect)(()=>{const F=[window.setTimeout(()=>{$(!1)},1),window.setTimeout(()=>{P(!0)},1e4)];return()=>{F.forEach(window.clearTimeout)}});const H=()=>{P(!L)};return(0,n.h)("div",{class:(0,t.default)("-cbwsdk-snackbar-instance",M&&"-cbwsdk-snackbar-instance-hidden",L&&"-cbwsdk-snackbar-instance-expanded")},(0,n.h)("div",{class:"-cbwsdk-snackbar-instance-header",onClick:H},(0,n.h)("img",{src:a,class:"-cbwsdk-snackbar-instance-header-cblogo"})," ",(0,n.h)("div",{class:"-cbwsdk-snackbar-instance-header-message"},y),(0,n.h)("div",{class:"-gear-container"},!L&&(0,n.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("circle",{cx:"12",cy:"12",r:"12",fill:"#F5F7F8"})),(0,n.h)("img",{src:c,class:"-gear-icon",title:"Expand"}))),A&&A.length>0&&(0,n.h)("div",{class:"-cbwsdk-snackbar-instance-menu"},A.map((F,q)=>(0,n.h)("div",{class:(0,t.default)("-cbwsdk-snackbar-instance-menu-item",F.isRed&&"-cbwsdk-snackbar-instance-menu-item-is-red"),onClick:F.onClick,key:q},(0,n.h)("svg",{width:F.svgWidth,height:F.svgHeight,viewBox:"0 0 10 11",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("path",{"fill-rule":F.defaultFillRule,"clip-rule":F.defaultClipRule,d:F.path,fill:"#AAAAAA"})),(0,n.h)("span",{class:(0,t.default)("-cbwsdk-snackbar-instance-menu-item-info",F.isRed&&"-cbwsdk-snackbar-instance-menu-item-info-is-red")},F.info)))))};r.SnackbarInstance=f})(QT);Object.defineProperty(Rx,"__esModule",{value:!0});Rx.WalletLinkRelayUI=void 0;const KIe=xb,GIe=QT;class ZIe{constructor(){this.attached=!1,this.snackbar=new GIe.Snackbar}attach(){if(this.attached)throw new Error("Coinbase Wallet SDK UI is already attached");const e=document.documentElement,t=document.createElement("div");t.className="-cbwsdk-css-reset",e.appendChild(t),this.snackbar.attach(t),this.attached=!0,(0,KIe.injectCssReset)()}showConnecting(e){let t;return e.isUnlinkedErrorState?t={autoExpand:!0,message:"Connection lost",menuItems:[{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:e.onResetConnection}]}:t={message:"Confirm on phone",menuItems:[{isRed:!0,info:"Cancel transaction",svgWidth:"11",svgHeight:"11",path:"M10.3711 1.52346L9.21775 0.370117L5.37109 4.21022L1.52444 0.370117L0.371094 1.52346L4.2112 5.37012L0.371094 9.21677L1.52444 10.3701L5.37109 6.53001L9.21775 10.3701L10.3711 9.21677L6.53099 5.37012L10.3711 1.52346Z",defaultFillRule:"inherit",defaultClipRule:"inherit",onClick:e.onCancel},{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:e.onResetConnection}]},this.snackbar.presentItem(t)}}Rx.WalletLinkRelayUI=ZIe;var Nx={},Px={},iR={};Object.defineProperty(iR,"__esModule",{value:!0});iR.default=".-cbwsdk-css-reset .-cbwsdk-redirect-dialog-backdrop{position:fixed;top:0;left:0;right:0;bottom:0;transition:opacity .25s;background-color:rgba(10,11,13,.5)}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-backdrop-hidden{opacity:0}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box{display:block;position:fixed;top:50%;left:50%;transform:translate(-50%, -50%);padding:20px;border-radius:8px;background-color:#fff;color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box p{display:block;font-weight:400;font-size:14px;line-height:20px;padding-bottom:12px;color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box button{appearance:none;border:none;background:none;color:#0052ff;padding:0;text-decoration:none;display:block;font-weight:600;font-size:16px;line-height:24px}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.dark{background-color:#0a0b0d;color:#fff}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.dark button{color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.light{background-color:#fff;color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.light button{color:#0052ff}";var xK=Yr&&Yr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Px,"__esModule",{value:!0});Px.RedirectDialog=void 0;const YIe=xK(rK),Gl=mK,QIe=xb,JIe=QT,XIe=da,eTe=xK(iR);class tTe{constructor(){this.root=null,this.darkMode=(0,XIe.isDarkMode)()}attach(){const e=document.documentElement;this.root=document.createElement("div"),this.root.className="-cbwsdk-css-reset",e.appendChild(this.root),(0,QIe.injectCssReset)()}present(e){this.render(e)}clear(){this.render(null)}render(e){this.root&&((0,Gl.render)(null,this.root),e&&(0,Gl.render)((0,Gl.h)(rTe,Object.assign({},e,{onDismiss:()=>{this.clear()},darkMode:this.darkMode})),this.root))}}Px.RedirectDialog=tTe;const rTe=({title:r,buttonText:e,darkMode:t,onButtonClick:n,onDismiss:i})=>{const s=t?"dark":"light";return(0,Gl.h)(JIe.SnackbarContainer,{darkMode:t},(0,Gl.h)("div",{class:"-cbwsdk-redirect-dialog"},(0,Gl.h)("style",null,eTe.default),(0,Gl.h)("div",{class:"-cbwsdk-redirect-dialog-backdrop",onClick:i}),(0,Gl.h)("div",{class:(0,YIe.default)("-cbwsdk-redirect-dialog-box",s)},(0,Gl.h)("p",null,r),(0,Gl.h)("button",{onClick:n},e))))};var Iu={};Object.defineProperty(Iu,"__esModule",{value:!0});Iu.CBW_MOBILE_DEEPLINK_URL=Iu.WALLETLINK_URL=Iu.CB_KEYS_URL=void 0;Iu.CB_KEYS_URL="https://keys.coinbase.com/connect";Iu.WALLETLINK_URL="https://www.walletlink.org";Iu.CBW_MOBILE_DEEPLINK_URL="https://go.cb-w.com/walletlink";Object.defineProperty(Nx,"__esModule",{value:!0});Nx.WLMobileRelayUI=void 0;const nTe=Px,iTe=da,sTe=Iu;class oTe{constructor(){this.attached=!1,this.redirectDialog=new nTe.RedirectDialog}attach(){if(this.attached)throw new Error("Coinbase Wallet SDK UI is already attached");this.redirectDialog.attach(),this.attached=!0}redirectToCoinbaseWallet(e){const t=new URL(sTe.CBW_MOBILE_DEEPLINK_URL);t.searchParams.append("redirect_url",(0,iTe.getLocation)().href),e&&t.searchParams.append("wl_url",e);const n=document.createElement("a");n.target="cbw-opener",n.href=t.href,n.rel="noreferrer noopener",n.click()}openCoinbaseWalletDeeplink(e){this.redirectDialog.present({title:"Redirecting to Coinbase Wallet...",buttonText:"Open",onButtonClick:()=>{this.redirectToCoinbaseWallet(e)}}),setTimeout(()=>{this.redirectToCoinbaseWallet(e)},99)}showConnecting(e){return()=>{this.redirectDialog.clear()}}}Nx.WLMobileRelayUI=oTe;Object.defineProperty(_x,"__esModule",{value:!0});_x.WalletLinkRelay=void 0;const aTe=xx,cTe=Su,lTe=wb,s9=Cx,wg=d2,uTe=da,hTe=Rx,sL=Nx,dTe=th,ui=Jt,fTe=rh;class Ph{constructor(e){this.accountsCallback=null,this.chainCallbackParams={chainId:"",jsonRpcUrl:""},this.chainCallback=null,this.dappDefaultChain=1,this.isMobileWeb=(0,uTe.isMobileWeb)(),this.appName="",this.appLogoUrl=null,this.linkedUpdated=s=>{this.isLinked=s;const o=this.storage.getItem(cTe.LOCAL_STORAGE_ADDRESSES_KEY);if(s&&(this._session.linked=s),this.isUnlinkedErrorState=!1,o){const a=o.split(" "),c=this.storage.getItem("IsStandaloneSigning")==="true";a[0]!==""&&!s&&this._session.linked&&!c&&(this.isUnlinkedErrorState=!0)}},this.metadataUpdated=(s,o)=>{this.storage.setItem(s,o)},this.chainUpdated=(s,o)=>{this.chainCallbackParams.chainId===s&&this.chainCallbackParams.jsonRpcUrl===o||(this.chainCallbackParams={chainId:s,jsonRpcUrl:o},this.chainCallback&&this.chainCallback(s,o))},this.accountUpdated=s=>{this.accountsCallback&&this.accountsCallback([s]),Ph.accountRequestCallbackIds.size>0&&(Array.from(Ph.accountRequestCallbackIds.values()).forEach(o=>{const a={type:"WEB3_RESPONSE",id:o,response:{method:"requestEthereumAccounts",result:[s]}};this.invokeCallback(Object.assign(Object.assign({},a),{id:o}))}),Ph.accountRequestCallbackIds.clear())},this.resetAndReload=this.resetAndReload.bind(this),this.linkAPIUrl=e.linkAPIUrl,this.storage=e.storage;const{session:t,ui:n,connection:i}=this.subscribe();this._session=t,this.connection=i,this.relayEventManager=new lTe.RelayEventManager,this.ui=n}subscribe(){const e=s9.WalletLinkSession.load(this.storage)||new s9.WalletLinkSession(this.storage).save(),{linkAPIUrl:t}=this,n=new aTe.WalletLinkConnection({session:e,linkAPIUrl:t,listener:this}),i=this.isMobileWeb?new sL.WLMobileRelayUI:new hTe.WalletLinkRelayUI;return n.connect(),{session:e,ui:i,connection:n}}attachUI(){this.ui.attach()}resetAndReload(){Promise.race([this.connection.setSessionMetadata("__destroyed","1"),new Promise(e=>setTimeout(()=>e(null),1e3))]).then(()=>{this.connection.destroy();const e=s9.WalletLinkSession.load(this.storage);(e==null?void 0:e.id)===this._session.id&&fTe.ScopedLocalStorage.clearAll(),document.location.reload()}).catch(e=>{})}setAppInfo(e,t){this.appName=e,this.appLogoUrl=t}getStorageItem(e){return this.storage.getItem(e)}setStorageItem(e,t){this.storage.setItem(e,t)}signEthereumMessage(e,t,n,i){return this.sendRequest({method:"signEthereumMessage",params:{message:(0,ui.hexStringFromBuffer)(e,!0),address:t,addPrefix:n,typedDataJson:i||null}})}ethereumAddressFromSignedMessage(e,t,n){return this.sendRequest({method:"ethereumAddressFromSignedMessage",params:{message:(0,ui.hexStringFromBuffer)(e,!0),signature:(0,ui.hexStringFromBuffer)(t,!0),addPrefix:n}})}signEthereumTransaction(e){return this.sendRequest({method:"signEthereumTransaction",params:{fromAddress:e.fromAddress,toAddress:e.toAddress,weiValue:(0,ui.bigIntStringFromBigInt)(e.weiValue),data:(0,ui.hexStringFromBuffer)(e.data,!0),nonce:e.nonce,gasPriceInWei:e.gasPriceInWei?(0,ui.bigIntStringFromBigInt)(e.gasPriceInWei):null,maxFeePerGas:e.gasPriceInWei?(0,ui.bigIntStringFromBigInt)(e.gasPriceInWei):null,maxPriorityFeePerGas:e.gasPriceInWei?(0,ui.bigIntStringFromBigInt)(e.gasPriceInWei):null,gasLimit:e.gasLimit?(0,ui.bigIntStringFromBigInt)(e.gasLimit):null,chainId:e.chainId,shouldSubmit:!1}})}signAndSubmitEthereumTransaction(e){return this.sendRequest({method:"signEthereumTransaction",params:{fromAddress:e.fromAddress,toAddress:e.toAddress,weiValue:(0,ui.bigIntStringFromBigInt)(e.weiValue),data:(0,ui.hexStringFromBuffer)(e.data,!0),nonce:e.nonce,gasPriceInWei:e.gasPriceInWei?(0,ui.bigIntStringFromBigInt)(e.gasPriceInWei):null,maxFeePerGas:e.maxFeePerGas?(0,ui.bigIntStringFromBigInt)(e.maxFeePerGas):null,maxPriorityFeePerGas:e.maxPriorityFeePerGas?(0,ui.bigIntStringFromBigInt)(e.maxPriorityFeePerGas):null,gasLimit:e.gasLimit?(0,ui.bigIntStringFromBigInt)(e.gasLimit):null,chainId:e.chainId,shouldSubmit:!0}})}submitEthereumTransaction(e,t){return this.sendRequest({method:"submitEthereumTransaction",params:{signedTransaction:(0,ui.hexStringFromBuffer)(e,!0),chainId:t}})}scanQRCode(e){return this.sendRequest({method:"scanQRCode",params:{regExp:e}})}getWalletLinkSession(){return this._session}genericRequest(e,t){return this.sendRequest({method:"generic",params:{action:t,data:e}})}sendGenericMessage(e){return this.sendRequest(e)}sendRequest(e){let t=null;const n=(0,ui.randomBytesHex)(8),i=s=>{this.publishWeb3RequestCanceledEvent(n),this.handleErrorResponse(n,e.method,s),t==null||t()};return new Promise((s,o)=>{t=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:i,onResetConnection:this.resetAndReload}),this.relayEventManager.callbacks.set(n,a=>{if(t==null||t(),(0,wg.isErrorResponse)(a))return o(new Error(a.errorMessage));s(a)}),this.publishWeb3RequestEvent(n,e)})}setAccountsCallback(e){this.accountsCallback=e}setChainCallback(e){this.chainCallback=e}setDappDefaultChainCallback(e){this.dappDefaultChain=e}publishWeb3RequestEvent(e,t){const n={type:"WEB3_REQUEST",id:e,request:t};this.publishEvent("Web3Request",n,!0).then(i=>{}).catch(i=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:n.id,response:{method:t.method,errorMessage:i.message}})}),this.isMobileWeb&&this.openCoinbaseWalletDeeplink(t.method)}openCoinbaseWalletDeeplink(e){if(this.ui instanceof sL.WLMobileRelayUI)switch(e){case"requestEthereumAccounts":case"switchEthereumChain":return;default:window.addEventListener("blur",()=>{window.addEventListener("focus",()=>{this.connection.checkUnseenEvents()},{once:!0})},{once:!0}),this.ui.openCoinbaseWalletDeeplink();break}}publishWeb3RequestCanceledEvent(e){const t={type:"WEB3_REQUEST_CANCELED",id:e};this.publishEvent("Web3RequestCanceled",t,!1).then()}publishEvent(e,t,n){return this.connection.publishEvent(e,t,n)}handleWeb3ResponseMessage(e){const{response:t}=e;if(t.method==="requestEthereumAccounts"){Ph.accountRequestCallbackIds.forEach(n=>this.invokeCallback(Object.assign(Object.assign({},e),{id:n}))),Ph.accountRequestCallbackIds.clear();return}this.invokeCallback(e)}handleErrorResponse(e,t,n){var i;const s=(i=n==null?void 0:n.message)!==null&&i!==void 0?i:"Unspecified error message.";this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:e,response:{method:t,errorMessage:s}})}invokeCallback(e){const t=this.relayEventManager.callbacks.get(e.id);t&&(t(e.response),this.relayEventManager.callbacks.delete(e.id))}requestEthereumAccounts(){const e={method:"requestEthereumAccounts",params:{appName:this.appName,appLogoUrl:this.appLogoUrl||null}},t=(0,ui.randomBytesHex)(8);return new Promise((n,i)=>{this.relayEventManager.callbacks.set(t,s=>{if((0,wg.isErrorResponse)(s))return i(new Error(s.errorMessage));n(s)}),Ph.accountRequestCallbackIds.add(t),this.publishWeb3RequestEvent(t,e)})}watchAsset(e,t,n,i,s,o){const a={method:"watchAsset",params:{type:e,options:{address:t,symbol:n,decimals:i,image:s},chainId:o}};let c=null;const l=(0,ui.randomBytesHex)(8),h=f=>{this.publishWeb3RequestCanceledEvent(l),this.handleErrorResponse(l,a.method,f),c==null||c()};return c=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:h,onResetConnection:this.resetAndReload}),new Promise((f,v)=>{this.relayEventManager.callbacks.set(l,y=>{if(c==null||c(),(0,wg.isErrorResponse)(y))return v(new Error(y.errorMessage));f(y)}),this.publishWeb3RequestEvent(l,a)})}addEthereumChain(e,t,n,i,s,o){const a={method:"addEthereumChain",params:{chainId:e,rpcUrls:t,blockExplorerUrls:i,chainName:s,iconUrls:n,nativeCurrency:o}};let c=null;const l=(0,ui.randomBytesHex)(8),h=f=>{this.publishWeb3RequestCanceledEvent(l),this.handleErrorResponse(l,a.method,f),c==null||c()};return c=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:h,onResetConnection:this.resetAndReload}),new Promise((f,v)=>{this.relayEventManager.callbacks.set(l,y=>{if(c==null||c(),(0,wg.isErrorResponse)(y))return v(new Error(y.errorMessage));f(y)}),this.publishWeb3RequestEvent(l,a)})}switchEthereumChain(e,t){const n={method:"switchEthereumChain",params:Object.assign({chainId:e},{address:t})},i=(0,ui.randomBytesHex)(8);return new Promise((s,o)=>{this.relayEventManager.callbacks.set(i,a=>{if((0,wg.isErrorResponse)(a)&&a.errorCode)return o(dTe.standardErrors.provider.custom({code:a.errorCode,message:"Unrecognized chain ID. Try adding the chain using addEthereumChain first."}));if((0,wg.isErrorResponse)(a))return o(new Error(a.errorMessage));s(a)}),this.publishWeb3RequestEvent(i,n)})}}_x.WalletLinkRelay=Ph;Ph.accountRequestCallbackIds=new Set;var pTe=Yr&&Yr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(wx,"__esModule",{value:!0});wx.WalletLinkSigner=void 0;const o9=pTe(dSe),oL=Su,gTe=wb,xh=d2,mTe=_x,aL=Iu,Ki=th,Vr=Jt,wTe=rh,a9="DefaultChainId",cL="DefaultJsonRpcUrl";class vTe{constructor(e){var t,n;this._relay=null,this._addresses=[],this.hasMadeFirstChainChangedEmission=!1;const{appName:i,appLogoUrl:s}=e.metadata;this._appName=i,this._appLogoUrl=s,this._storage=new wTe.ScopedLocalStorage("walletlink",aL.WALLETLINK_URL),this.updateListener=e.updateListener,this._relayEventManager=new gTe.RelayEventManager,this._jsonRpcUrlFromOpts="";const o=this._storage.getItem(oL.LOCAL_STORAGE_ADDRESSES_KEY);if(o){const c=o.split(" ");c[0]!==""&&(this._addresses=c.map(l=>(0,Vr.ensureAddressString)(l)),(t=this.updateListener)===null||t===void 0||t.onAccountsUpdate({accounts:this._addresses,source:"storage"}))}this._storage.getItem(a9)&&((n=this.updateListener)===null||n===void 0||n.onChainUpdate({chain:{id:this.getChainId(),rpcUrl:this.jsonRpcUrl},source:"storage"}),this.hasMadeFirstChainChangedEmission=!0),this.initializeRelay()}getSession(){const e=this.initializeRelay(),{id:t,secret:n}=e.getWalletLinkSession();return{id:t,secret:n}}async handshake(){return await this.request({method:"eth_requestAccounts"})}get selectedAddress(){return this._addresses[0]||void 0}get jsonRpcUrl(){var e;return(e=this._storage.getItem(cL))!==null&&e!==void 0?e:this._jsonRpcUrlFromOpts}set jsonRpcUrl(e){this._storage.setItem(cL,e)}updateProviderInfo(e,t){var n;this.jsonRpcUrl=e;const i=this.getChainId();this._storage.setItem(a9,t.toString(10)),((0,Vr.ensureIntNumber)(t)!==i||!this.hasMadeFirstChainChangedEmission)&&((n=this.updateListener)===null||n===void 0||n.onChainUpdate({chain:{id:t,rpcUrl:e},source:"wallet"}),this.hasMadeFirstChainChangedEmission=!0)}async watchAsset(e,t,n,i,s,o){const c=await this.initializeRelay().watchAsset(e,t,n,i,s,o==null?void 0:o.toString());return(0,xh.isErrorResponse)(c)?!1:!!c.result}async addEthereumChain(e,t,n,i,s,o){var a,c;if((0,Vr.ensureIntNumber)(e)===this.getChainId())return!1;const l=this.initializeRelay();this._isAuthorized()||await l.requestEthereumAccounts();const h=await l.addEthereumChain(e.toString(),t,s,n,i,o);return(0,xh.isErrorResponse)(h)?!1:(((a=h.result)===null||a===void 0?void 0:a.isApproved)===!0&&this.updateProviderInfo(t[0],e),((c=h.result)===null||c===void 0?void 0:c.isApproved)===!0)}async switchEthereumChain(e){const n=await this.initializeRelay().switchEthereumChain(e.toString(10),this.selectedAddress||void 0);if((0,xh.isErrorResponse)(n)){if(!n.errorCode)return;throw n.errorCode===Ki.standardErrorCodes.provider.unsupportedChain?Ki.standardErrors.provider.unsupportedChain():Ki.standardErrors.provider.custom({message:n.errorMessage,code:n.errorCode})}const i=n.result;i.isApproved&&i.rpcUrl.length>0&&this.updateProviderInfo(i.rpcUrl,e)}async disconnect(){this._relay&&this._relay.resetAndReload(),this._storage.clear()}async request(e){try{return this._request(e).catch(t=>{throw t})}catch(t){return Promise.reject(t)}}async _request(e){if(!e||typeof e!="object"||Array.isArray(e))throw Ki.standardErrors.rpc.invalidRequest({message:"Expected a single, non-array, object argument.",data:e});const{method:t,params:n}=e;if(typeof t!="string"||t.length===0)throw Ki.standardErrors.rpc.invalidRequest({message:"'args.method' must be a non-empty string.",data:e});if(n!==void 0&&!Array.isArray(n)&&(typeof n!="object"||n===null))throw Ki.standardErrors.rpc.invalidRequest({message:"'args.params' must be an object or array if provided.",data:e});const i=n===void 0?[]:n,s=this._relayEventManager.makeRequestId();return(await this._sendRequestAsync({method:t,params:i,jsonrpc:"2.0",id:s})).result}_setAddresses(e,t){var n;if(!Array.isArray(e))throw new Error("addresses is not an array");const i=e.map(s=>(0,Vr.ensureAddressString)(s));JSON.stringify(i)!==JSON.stringify(this._addresses)&&(this._addresses=i,(n=this.updateListener)===null||n===void 0||n.onAccountsUpdate({accounts:i,source:"wallet"}),this._storage.setItem(oL.LOCAL_STORAGE_ADDRESSES_KEY,i.join(" ")))}_sendRequestAsync(e){return new Promise((t,n)=>{try{const i=this._handleSynchronousMethods(e);if(i!==void 0)return t({jsonrpc:"2.0",id:e.id,result:i})}catch(i){return n(i)}this._handleAsynchronousMethods(e).then(i=>i&&t(Object.assign(Object.assign({},i),{id:e.id}))).catch(i=>n(i))})}_handleSynchronousMethods(e){const{method:t}=e;switch(t){case"eth_accounts":return this._eth_accounts();case"eth_coinbase":return this._eth_coinbase();case"net_version":return this._net_version();case"eth_chainId":return this._eth_chainId();default:return}}async _handleAsynchronousMethods(e){const{method:t}=e,n=e.params||[];switch(t){case"eth_requestAccounts":return this._eth_requestAccounts();case"eth_sign":return this._eth_sign(n);case"eth_ecRecover":return this._eth_ecRecover(n);case"personal_sign":return this._personal_sign(n);case"personal_ecRecover":return this._personal_ecRecover(n);case"eth_signTransaction":return this._eth_signTransaction(n);case"eth_sendRawTransaction":return this._eth_sendRawTransaction(n);case"eth_sendTransaction":return this._eth_sendTransaction(n);case"eth_signTypedData_v1":return this._eth_signTypedData_v1(n);case"eth_signTypedData_v2":return this._throwUnsupportedMethodError();case"eth_signTypedData_v3":return this._eth_signTypedData_v3(n);case"eth_signTypedData_v4":case"eth_signTypedData":return this._eth_signTypedData_v4(n);case"wallet_addEthereumChain":return this._wallet_addEthereumChain(n);case"wallet_switchEthereumChain":return this._wallet_switchEthereumChain(n);case"wallet_watchAsset":return this._wallet_watchAsset(n);default:return this._throwUnsupportedMethodError()}}_isKnownAddress(e){try{const t=(0,Vr.ensureAddressString)(e);return this._addresses.map(i=>(0,Vr.ensureAddressString)(i)).includes(t)}catch{}return!1}_ensureKnownAddress(e){if(!this._isKnownAddress(e))throw new Error("Unknown Ethereum address")}_prepareTransactionParams(e){const t=e.from?(0,Vr.ensureAddressString)(e.from):this.selectedAddress;if(!t)throw new Error("Ethereum address is unavailable");this._ensureKnownAddress(t);const n=e.to?(0,Vr.ensureAddressString)(e.to):null,i=e.value!=null?(0,Vr.ensureBigInt)(e.value):BigInt(0),s=e.data?(0,Vr.ensureBuffer)(e.data):Buffer.alloc(0),o=e.nonce!=null?(0,Vr.ensureIntNumber)(e.nonce):null,a=e.gasPrice!=null?(0,Vr.ensureBigInt)(e.gasPrice):null,c=e.maxFeePerGas!=null?(0,Vr.ensureBigInt)(e.maxFeePerGas):null,l=e.maxPriorityFeePerGas!=null?(0,Vr.ensureBigInt)(e.maxPriorityFeePerGas):null,h=e.gas!=null?(0,Vr.ensureBigInt)(e.gas):null,f=e.chainId?(0,Vr.ensureIntNumber)(e.chainId):this.getChainId();return{fromAddress:t,toAddress:n,weiValue:i,data:s,nonce:o,gasPriceInWei:a,maxFeePerGas:c,maxPriorityFeePerGas:l,gasLimit:h,chainId:f}}_isAuthorized(){return this._addresses.length>0}_requireAuthorization(){if(!this._isAuthorized())throw Ki.standardErrors.provider.unauthorized({})}_throwUnsupportedMethodError(){throw Ki.standardErrors.provider.unsupportedMethod({})}async _signEthereumMessage(e,t,n,i){this._ensureKnownAddress(t);try{const o=await this.initializeRelay().signEthereumMessage(e,t,n,i);if((0,xh.isErrorResponse)(o))throw new Error(o.errorMessage);return{jsonrpc:"2.0",id:0,result:o.result}}catch(s){throw typeof s.message=="string"&&s.message.match(/(denied|rejected)/i)?Ki.standardErrors.provider.userRejectedRequest("User denied message signature"):s}}async _ethereumAddressFromSignedMessage(e,t,n){const s=await this.initializeRelay().ethereumAddressFromSignedMessage(e,t,n);if((0,xh.isErrorResponse)(s))throw new Error(s.errorMessage);return{jsonrpc:"2.0",id:0,result:s.result}}_eth_accounts(){return[...this._addresses]}_eth_coinbase(){return this.selectedAddress||null}_net_version(){return this.getChainId().toString(10)}_eth_chainId(){return(0,Vr.hexStringFromIntNumber)(this.getChainId())}getChainId(){const e=this._storage.getItem(a9);if(!e)return(0,Vr.ensureIntNumber)(1);const t=parseInt(e,10);return(0,Vr.ensureIntNumber)(t)}async _eth_requestAccounts(){if(this._isAuthorized())return Promise.resolve({jsonrpc:"2.0",id:0,result:this._addresses});let e;try{if(e=await this.initializeRelay().requestEthereumAccounts(),(0,xh.isErrorResponse)(e))throw new Error(e.errorMessage)}catch(t){throw typeof t.message=="string"&&t.message.match(/(denied|rejected)/i)?Ki.standardErrors.provider.userRejectedRequest("User denied account authorization"):t}if(!e.result)throw new Error("accounts received is empty");return this._setAddresses(e.result),{jsonrpc:"2.0",id:0,result:this._addresses}}_eth_sign(e){this._requireAuthorization();const t=(0,Vr.ensureAddressString)(e[0]),n=(0,Vr.ensureBuffer)(e[1]);return this._signEthereumMessage(n,t,!1)}_eth_ecRecover(e){const t=(0,Vr.ensureBuffer)(e[0]),n=(0,Vr.ensureBuffer)(e[1]);return this._ethereumAddressFromSignedMessage(t,n,!1)}_personal_sign(e){this._requireAuthorization();const t=(0,Vr.ensureBuffer)(e[0]),n=(0,Vr.ensureAddressString)(e[1]);return this._signEthereumMessage(t,n,!0)}_personal_ecRecover(e){const t=(0,Vr.ensureBuffer)(e[0]),n=(0,Vr.ensureBuffer)(e[1]);return this._ethereumAddressFromSignedMessage(t,n,!0)}async _eth_signTransaction(e){this._requireAuthorization();const t=this._prepareTransactionParams(e[0]||{});try{const i=await this.initializeRelay().signEthereumTransaction(t);if((0,xh.isErrorResponse)(i))throw new Error(i.errorMessage);return{jsonrpc:"2.0",id:0,result:i.result}}catch(n){throw typeof n.message=="string"&&n.message.match(/(denied|rejected)/i)?Ki.standardErrors.provider.userRejectedRequest("User denied transaction signature"):n}}async _eth_sendRawTransaction(e){const t=(0,Vr.ensureBuffer)(e[0]),i=await this.initializeRelay().submitEthereumTransaction(t,this.getChainId());if((0,xh.isErrorResponse)(i))throw new Error(i.errorMessage);return{jsonrpc:"2.0",id:0,result:i.result}}async _eth_sendTransaction(e){this._requireAuthorization();const t=this._prepareTransactionParams(e[0]||{});try{const i=await this.initializeRelay().signAndSubmitEthereumTransaction(t);if((0,xh.isErrorResponse)(i))throw new Error(i.errorMessage);return{jsonrpc:"2.0",id:0,result:i.result}}catch(n){throw typeof n.message=="string"&&n.message.match(/(denied|rejected)/i)?Ki.standardErrors.provider.userRejectedRequest("User denied transaction signature"):n}}async _eth_signTypedData_v1(e){this._requireAuthorization();const t=(0,Vr.ensureParsedJSONObject)(e[0]),n=(0,Vr.ensureAddressString)(e[1]);this._ensureKnownAddress(n);const i=o9.default.hashForSignTypedDataLegacy({data:t}),s=JSON.stringify(t,null,2);return this._signEthereumMessage(i,n,!1,s)}async _eth_signTypedData_v3(e){this._requireAuthorization();const t=(0,Vr.ensureAddressString)(e[0]),n=(0,Vr.ensureParsedJSONObject)(e[1]);this._ensureKnownAddress(t);const i=o9.default.hashForSignTypedData_v3({data:n}),s=JSON.stringify(n,null,2);return this._signEthereumMessage(i,t,!1,s)}async _eth_signTypedData_v4(e){this._requireAuthorization();const t=(0,Vr.ensureAddressString)(e[0]),n=(0,Vr.ensureParsedJSONObject)(e[1]);this._ensureKnownAddress(t);const i=o9.default.hashForSignTypedData_v4({data:n}),s=JSON.stringify(n,null,2);return this._signEthereumMessage(i,t,!1,s)}async _wallet_addEthereumChain(e){var t,n,i,s;const o=e[0];if(((t=o.rpcUrls)===null||t===void 0?void 0:t.length)===0)return{jsonrpc:"2.0",id:0,error:{code:2,message:"please pass in at least 1 rpcUrl"}};if(!o.chainName||o.chainName.trim()==="")throw Ki.standardErrors.rpc.invalidParams("chainName is a required field");if(!o.nativeCurrency)throw Ki.standardErrors.rpc.invalidParams("nativeCurrency is a required field");const a=parseInt(o.chainId,16);return await this.addEthereumChain(a,(n=o.rpcUrls)!==null&&n!==void 0?n:[],(i=o.blockExplorerUrls)!==null&&i!==void 0?i:[],o.chainName,(s=o.iconUrls)!==null&&s!==void 0?s:[],o.nativeCurrency)?{jsonrpc:"2.0",id:0,result:null}:{jsonrpc:"2.0",id:0,error:{code:2,message:"unable to add ethereum chain"}}}async _wallet_switchEthereumChain(e){const t=e[0];return await this.switchEthereumChain(parseInt(t.chainId,16)),{jsonrpc:"2.0",id:0,result:null}}async _wallet_watchAsset(e){const t=Array.isArray(e)?e[0]:e;if(!t.type)throw Ki.standardErrors.rpc.invalidParams("Type is required");if((t==null?void 0:t.type)!=="ERC20")throw Ki.standardErrors.rpc.invalidParams(`Asset of type '${t.type}' is not supported`);if(!(t!=null&&t.options))throw Ki.standardErrors.rpc.invalidParams("Options are required");if(!(t!=null&&t.options.address))throw Ki.standardErrors.rpc.invalidParams("Address is required");const n=this.getChainId(),{address:i,symbol:s,image:o,decimals:a}=t.options;return{jsonrpc:"2.0",id:0,result:await this.watchAsset(t.type,i,s,a,o,n)}}initializeRelay(){if(!this._relay){const e=new mTe.WalletLinkRelay({linkAPIUrl:aL.WALLETLINK_URL,storage:this._storage});e.setAppInfo(this._appName,this._appLogoUrl),e.attachUI(),e.setAccountsCallback((t,n)=>this._setAddresses(t,n)),e.setChainCallback((t,n)=>{this.updateProviderInfo(n,parseInt(t,10))}),this._relay=e}return this._relay}}wx.WalletLinkSigner=vTe;var cc={};Object.defineProperty(cc,"__esModule",{value:!0});cc.checkErrorForInvalidRequestArgs=cc.getCoinbaseInjectedProvider=cc.getCoinbaseInjectedSigner=cc.fetchRPCRequest=void 0;const yTe=$1,t6=th;async function bTe(r,e){if(!e.rpcUrl)throw t6.standardErrors.rpc.internal("No RPC URL set for chain");const t=Object.assign(Object.assign({},r),{jsonrpc:"2.0",id:crypto.randomUUID()});return(await(await window.fetch(e.rpcUrl,{method:"POST",body:JSON.stringify(t),mode:"cors",headers:{"Content-Type":"application/json","X-Cbw-Sdk-Version":yTe.LIB_VERSION}})).json()).result}cc.fetchRPCRequest=bTe;function AK(){return globalThis.coinbaseWalletSigner}cc.getCoinbaseInjectedSigner=AK;function _Te({metadata:r,preference:e}){var t,n,i;const s=globalThis;if(e.options!=="smartWalletOnly"){if(AK())return;const c=s.coinbaseWalletExtension;if(c){const{appName:l,appLogoUrl:h,appChainIds:f}=r;return(t=c.setAppInfo)===null||t===void 0||t.call(c,l,h,f),c}}const o=(n=s.ethereum)!==null&&n!==void 0?n:(i=s.top)===null||i===void 0?void 0:i.ethereum;if(o!=null&&o.isCoinbaseBrowser)return o}cc.getCoinbaseInjectedProvider=_Te;function xTe(r){if(!r||typeof r!="object"||Array.isArray(r))return t6.standardErrors.rpc.invalidParams({message:"Expected a single, non-array, object argument.",data:r});const{method:e,params:t}=r;if(typeof e!="string"||e.length===0)return t6.standardErrors.rpc.invalidParams({message:"'args.method' must be a non-empty string.",data:r});if(t!==void 0&&!Array.isArray(t)&&(typeof t!="object"||t===null))return t6.standardErrors.rpc.invalidParams({message:"'args.params' must be an object or array if provided.",data:r})}cc.checkErrorForInvalidRequestArgs=xTe;Object.defineProperty(du,"__esModule",{value:!0});du.createSigner=du.fetchSignerType=du.storeSignerType=du.loadSignerType=void 0;const ATe=px,EK=wx,ETe=th,CTe=cc,STe=rh,CK="SignerType",SK=new STe.ScopedLocalStorage("CBWSDK","SignerConfigurator");function ITe(){return SK.getItem(CK)}du.loadSignerType=ITe;function TTe(r){SK.setItem(CK,r)}du.storeSignerType=TTe;async function RTe(r){const{communicator:e,metadata:t}=r;NTe(e,t).catch(()=>{});const n={id:crypto.randomUUID(),event:"selectSignerType",data:r.preference},{data:i}=await e.postRequestAndWaitForResponse(n);return i}du.fetchSignerType=RTe;function kTe(r){const{signerType:e,metadata:t,communicator:n,updateListener:i}=r;switch(e){case"scw":return new ATe.SCWSigner({metadata:t,updateListener:i,communicator:n});case"walletlink":return new EK.WalletLinkSigner({metadata:t,updateListener:i});case"extension":{const s=(0,CTe.getCoinbaseInjectedSigner)();if(!s)throw ETe.standardErrors.rpc.internal("injected signer not found");return s}}}du.createSigner=kTe;async function NTe(r,e){await r.onMessage(({event:n})=>n==="WalletLinkSessionRequest");const t=new EK.WalletLinkSigner({metadata:e});r.postMessage({event:"WalletLinkUpdate",data:{session:t.getSession()}}),await t.handshake(),r.postMessage({event:"WalletLinkUpdate",data:{connected:!0}})}var Ox={},zw={};Object.defineProperty(zw,"__esModule",{value:!0});zw.closePopup=zw.openPopup=void 0;const PTe=th,lL=420,uL=540;function OTe(r){const e=(window.innerWidth-lL)/2+window.screenX,t=(window.innerHeight-uL)/2+window.screenY,n=window.open(r,"Smart Wallet",`width=${lL}, height=${uL}, left=${e}, top=${t}`);if(n==null||n.focus(),!n)throw PTe.standardErrors.rpc.internal("Pop up window failed to open");return n}zw.openPopup=OTe;function MTe(r){r&&!r.closed&&r.close()}zw.closePopup=MTe;Object.defineProperty(Ox,"__esModule",{value:!0});Ox.Communicator=void 0;const DTe=$1,hL=zw,$Te=Iu,dL=th;class BTe{constructor(e=$Te.CB_KEYS_URL){this.popup=null,this.listeners=new Map,this.postMessage=async t=>{(await this.waitForPopupLoaded()).postMessage(t,this.url.origin)},this.postRequestAndWaitForResponse=async t=>{const n=this.onMessage(({requestId:i})=>i===t.id);return this.postMessage(t),await n},this.onMessage=async t=>new Promise((n,i)=>{const s=o=>{if(o.origin!==this.url.origin)return;const a=o.data;t(a)&&(n(a),window.removeEventListener("message",s),this.listeners.delete(s))};window.addEventListener("message",s),this.listeners.set(s,{reject:i})}),this.disconnect=()=>{(0,hL.closePopup)(this.popup),this.popup=null,this.listeners.forEach(({reject:t},n)=>{t(dL.standardErrors.provider.userRejectedRequest("Request rejected")),window.removeEventListener("message",n)}),this.listeners.clear()},this.waitForPopupLoaded=async()=>this.popup&&!this.popup.closed?this.popup:(this.popup=(0,hL.openPopup)(this.url),this.onMessage(({event:t})=>t==="PopupUnload").then(this.disconnect).catch(()=>{}),this.onMessage(({event:t})=>t==="PopupLoaded").then(t=>{this.postMessage({requestId:t.id,data:{version:DTe.LIB_VERSION}})}).then(()=>{if(!this.popup)throw dL.standardErrors.rpc.internal();return this.popup})),this.url=new URL(e)}}Ox.Communicator=BTe;var Mx={};Object.defineProperty(Mx,"__esModule",{value:!0});Mx.determineMethodCategory=void 0;const fL={handshake:["eth_requestAccounts"],sign:["eth_ecRecover","personal_sign","personal_ecRecover","eth_signTransaction","eth_sendTransaction","eth_signTypedData_v1","eth_signTypedData_v3","eth_signTypedData_v4","eth_signTypedData","wallet_addEthereumChain","wallet_switchEthereumChain","wallet_watchAsset","wallet_getCapabilities","wallet_sendCalls","wallet_showCallsStatus"],state:["eth_chainId","eth_accounts","eth_coinbase","net_version"],deprecated:["eth_sign","eth_signTypedData_v2"],unsupported:["eth_subscribe","eth_unsubscribe"],fetch:[]};function LTe(r){for(const e in fL){const t=e;if(fL[t].includes(r))return t}}Mx.determineMethodCategory=LTe;var UTe=Yr&&Yr.__rest||function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i{try{if(this.connected)return this.emit("connect",{chainId:(0,n3.hexStringFromIntNumber)((0,v4.IntNumber)(this.chain.id))}),this.accounts;const h=await this.requestSignerSelection(),f=this.initSigner(h),v=await f.handshake();return this.signer=f,(0,y4.storeSignerType)(h),this.emit("connect",{chainId:(0,n3.hexStringFromIntNumber)((0,v4.IntNumber)(this.chain.id))}),v}catch(h){throw this.handleUnauthorizedError(h),h}},sign:async l=>{if(!this.connected||!this.signer)throw vg.standardErrors.provider.unauthorized("Must call 'eth_requestAccounts' before other methods");try{return await this.signer.request(l)}catch(h){throw this.handleUnauthorizedError(h),h}},fetch:l=>(0,pL.fetchRPCRequest)(l,this.chain),state:l=>{const h=()=>{if(this.connected)return this.accounts;throw vg.standardErrors.provider.unauthorized("Must call 'eth_requestAccounts' before other methods")};switch(l.method){case"eth_chainId":return(0,n3.hexStringFromIntNumber)((0,v4.IntNumber)(this.chain.id));case"net_version":return this.chain.id;case"eth_accounts":return h();case"eth_coinbase":return h()[0];default:return this.handlers.unsupported(l)}},deprecated:({method:l})=>{throw vg.standardErrors.rpc.methodNotSupported(`Method ${l} is deprecated.`)},unsupported:({method:l})=>{throw vg.standardErrors.rpc.methodNotSupported(`Method ${l} is not supported.`)}},this.isCoinbaseWallet=!0,this.updateListener={onAccountsUpdate:({accounts:l,source:h})=>{(0,n3.areAddressArraysEqual)(this.accounts,l)||(this.accounts=l,h!=="storage"&&this.emit("accountsChanged",this.accounts))},onChainUpdate:({chain:l,source:h})=>{l.id===this.chain.id&&l.rpcUrl===this.chain.rpcUrl||(this.chain=l,h!=="storage"&&this.emit("chainChanged",(0,n3.hexStringFromIntNumber)((0,v4.IntNumber)(l.id))))}},this.metadata=i,this.preference=a,this.communicator=new WTe.Communicator(o),this.chain={id:(n=(t=i.appChainIds)===null||t===void 0?void 0:t[0])!==null&&n!==void 0?n:1};const c=(0,y4.loadSignerType)();this.signer=c?this.initSigner(c):null}get connected(){return this.accounts.length>0}async request(e){var t;try{const n=(0,pL.checkErrorForInvalidRequestArgs)(e);if(n)throw n;const i=(t=(0,zTe.determineMethodCategory)(e.method))!==null&&t!==void 0?t:"fetch";return this.handlers[i](e)}catch(n){return Promise.reject((0,HTe.serializeError)(n,e.method))}}handleUnauthorizedError(e){e.code===vg.standardErrorCodes.provider.unauthorized&&this.disconnect()}async enable(){return console.warn('.enable() has been deprecated. Please use .request({ method: "eth_requestAccounts" }) instead.'),await this.request({method:"eth_requestAccounts"})}async disconnect(){this.accounts=[],this.chain={id:1},VTe.ScopedLocalStorage.clearAll(),this.emit("disconnect",vg.standardErrors.provider.disconnected("User initiated disconnection"))}requestSignerSelection(){return(0,y4.fetchSignerType)({communicator:this.communicator,preference:this.preference,metadata:this.metadata})}initSigner(e){return(0,y4.createSigner)({signerType:e,metadata:this.metadata,communicator:this.communicator,updateListener:this.updateListener})}}ux.CoinbaseWalletProvider=qTe;Object.defineProperty(ny,"__esModule",{value:!0});ny.CoinbaseWalletSDK=void 0;const KTe=lx,GTe=ux,ZTe=rh,YTe=$1,QTe=Jt,JTe=cc;class XTe{constructor(e){this.metadata={appName:e.appName||"Dapp",appLogoUrl:e.appLogoUrl||(0,QTe.getFavicon)(),appChainIds:e.appChainIds||[]},this.storeLatestVersion()}makeWeb3Provider(e={options:"all"}){var t;const n={metadata:this.metadata,preference:e};return(t=(0,JTe.getCoinbaseInjectedProvider)(n))!==null&&t!==void 0?t:new GTe.CoinbaseWalletProvider(n)}getCoinbaseWalletLogo(e,t=240){return(0,KTe.walletLogo)(e,t)}storeLatestVersion(){new ZTe.ScopedLocalStorage("CBWSDK").setItem("VERSION",YTe.LIB_VERSION)}}ny.CoinbaseWalletSDK=XTe;(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.CoinbaseWalletSDK=void 0;const e=ny;r.default=e.CoinbaseWalletSDK;var t=ny;Object.defineProperty(r,"CoinbaseWalletSDK",{enumerable:!0,get:function(){return t.CoinbaseWalletSDK}})})(oq);function eRe(r){const e={email:!0,showWallets:!0,walletFeatures:!0,socials:["google","x","discord","farcaster","github","apple","facebook"]},{enableEIP6963:t=!0,enableCoinbase:n=!0,enableInjected:i=!0,auth:s,metadata:o}=r;let a,c;const l={metadata:o};function h(){if(a)return a;if(!(typeof window>"u")&&window.ethereum)return a=window.ethereum,a}function f(){var A;return c||(typeof window>"u"?void 0:(c=new oq.CoinbaseWalletSDK({appName:o.name,appLogoUrl:o.icons[0],appChainIds:((A=r.chains)==null?void 0:A.map(M=>M.chainId))||[1,84532]}).makeWeb3Provider({options:r.coinbasePreference||"all"}),c))}i&&(l.injected=h()),n&&(l.coinbase=f()),t&&(l.EIP6963=!0);const v={...e,...s};return l.auth=v,l}let Yc;function tRe(r){r&&(Yc=r)}function rRe(){if(!Yc)throw new Error('Please call "createWeb3Modal" before using "useWeb3Modal" composable');async function r(t){await(Yc==null?void 0:Yc.open(t))}async function e(){await(Yc==null?void 0:Yc.close())}return by({open:r,close:e})}function nRe(){if(!Yc)throw new Error('Please call "createWeb3Modal" before using "useWeb3Modal" composable');const r=Rf(Yc.getWalletInfo()),e=Yc.subscribeWalletInfo(t=>{r.value=t});return xy(()=>{e==null||e()}),{walletInfo:r}}let c9,ca;function iRe(r){return ca=new C9e({ethersConfig:r.ethersConfig,siweConfig:r.siweConfig,chains:r.chains,defaultChain:r.defaultChain}),c9=new rde({...r,defaultChain:ca.defaultChain,adapters:[ca],sdkType:"w3m",sdkVersion:`vue-ethers-${ct.VERSION}`}),tRe(c9),c9}function MMe(){if(!ca)throw new Error('Please call "createWeb3Modal" before using "useWeb3ModalProvider" composition');const r=Rf(ca.getWalletProvider()),e=Rf(ca.getWalletProviderType()),t=ca.subscribeProvider(n=>{r.value=n.provider,e.value=n.providerType});return xy(()=>{t==null||t()}),{walletProvider:r,walletProviderType:e}}function sRe(){if(!ca)throw new Error('Please call "createWeb3Modal" before using "useWeb3ModalAccount" composition');const r=Rf(ca.getAddress()),e=Rf(ca.getIsConnected()),t=Rf(ca.getStatus()),n=Rf(ca.getChainId()),i=ca.subscribeProvider(s=>{r.value=s.address,t.value=s.status,e.value=s.isConnected,n.value=s.chainId});return xy(()=>{i==null||i()}),{address:r,isConnected:e,chainId:n}}const oRe="0xDd7194793B83eA584368a158Cb05f7B309b5f4e7",aRe="0x226146926aFd101601AafEae6C68b141CD43cCae",cRe="0xde924dC25F4761Ef7795C2598Ce3dAa92428A36d",lRe="0xB6FEf5E2f53E586E9855BD52e76A003D466B2fA9",uRe={Game:oRe,GameFrontend:aRe,Award:cRe,Badge:lRe},hRe="d0ec522cc8ac196893d24355f948e04f",dRe="CTP",fRe="Capture the Prompt",pRe="https://promptower.github.io/webapp/",gRe="https://raw.githubusercontent.com/promptower/webapp/main/src/assets/logo.svg",mRe=1112,wRe="Wemix Testnet",vRe="WEMIX",yRe="https://testnet.wemixscan.com/",bRe="https://api.test.wemix.com",_Re="",el={projectId:hRe,projectName:dRe,projectDescription:fRe,projectUrl:pRe,logoUrl:gRe,chainId:mRe,chainName:wRe,currency:vRe,explorerUrl:yRe,rpcUrl:bRe,chainImageUrl:_Re,contracts:uRe},xRe=el.projectId,$8={chainId:el.chainId,name:el.chainName,currency:el.currency,explorerUrl:el.explorerUrl,rpcUrl:el.rpcUrl},ARe={name:el.projectName,description:el.projectDescription,url:el.projectUrl,icons:[el.logoUrl]},ERe=eRe({metadata:ARe,enableEIP6963:!0,enableInjected:!0,enableCoinbase:!0,rpcUrl:$8.rpcUrl,defaultChainId:$8.chainId});iRe({ethersConfig:ERe,chains:[$8],projectId:xRe,enableAnalytics:!0,enableSwaps:!1,enableOnramp:!1,featuredWalletIds:["c57ca95b47569778a828d19178114f4db188b89b763c899ba0be274e97267d96","1ae92b26df02f0abca6304df07debccd18262fdf5fe82daa81593582dac9a369"],chainImages:{[$8.chainId]:el.chainImageUrl}});const sR=(r,e)=>{const t=r.__vccOpts||r;for(const[n,i]of e)t[n]=i;return t},CRe={class:"topbar"},SRe={class:"topbar-wrapper"},IRe={class:"menu-wrapper"},TRe=["src"],RRe={class:"wallet-connected-text"},kRe={__name:"TopBar",setup(r){const e=rRe(),{walletInfo:t}=nRe(),{address:n,chainId:i,isConnected:s}=sRe(),o=$U(),a=f=>{o.push(f),window.scrollTo(0,0)},c=BU(),l=f=>f.includes(c.path),h=()=>{e.open()};return(f,v)=>(pu(),Gg("div",CRe,[sn("div",SRe,[sn("div",{class:"logo-wrapper",onClick:v[0]||(v[0]=y=>a("/"))},v[4]||(v[4]=[sn("img",{src:Nre,alt:"Logo"},null,-1),sn("div",{class:"logo-text"},"CTP",-1)])),sn("div",IRe,[sn("div",{class:zg(["menu-text",{"menu-text-active":l(["/challenge"])}]),onClick:v[1]||(v[1]=y=>a("/challenge"))}," Challenges ",2),sn("div",{class:zg(["menu-text",{"menu-text-active":l(["/leaderboard"])}]),onClick:v[2]||(v[2]=y=>a("/leaderboard"))}," Leaderboard ",2),sn("div",{class:zg(["menu-text",{"menu-text-active":l(["/portfolio"])}]),onClick:v[3]||(v[3]=y=>a("/portfolio"))}," Portfolio ",2)]),Oo(s)?o6("",!0):(pu(),Gg("div",{key:0,class:"wallet-btn",onClick:h},v[5]||(v[5]=[sn("div",{class:"wallet-text"},"Connect Wallet",-1)]))),Oo(s)?(pu(),Gg("div",{key:1,class:"wallet-connected-btn",onClick:h},[sn("img",{src:Oo(t).icon,alt:"wallet"},null,8,TRe),sn("div",RRe,IL(`${Oo(n).substring(0,6)}...${Oo(n).substring(Oo(n).length-4)}`),1)])):o6("",!0)])]))}},NRe=sR(kRe,[["__scopeId","data-v-8ddb9fc8"]]),PRe="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%3e%3cpath%20d='M9.98069%201.85484e-05C4.46902%200.0106679%20-0.00907715%204.60093%201.38172e-05%2010.2296C0.00750049%2014.8277%202.99041%2018.7129%207.08749%2019.9847C7.30594%2020.0525%207.52666%2019.8866%207.52666%2019.6535V17.5981C7.36436%2017.6289%205.52331%2017.9557%204.70579%2017.1208C3.85017%2016.247%204.21114%2016.1378%203.64963%2015.4688C3.08813%2014.7998%202.79401%2014.7316%202.70043%2014.6223C2.60685%2014.5131%202.4999%2014.2674%203.00792%2014.2401C3.00792%2014.2401%203.95833%2014.2641%204.82611%2015.6327C5.73521%2017.0662%207.53829%2016.128%207.53829%2016.128C7.59926%2015.4569%207.89044%2014.9029%208.19672%2014.7737C4.31033%2014.2653%203.64963%2012.0501%203.64963%2010.0349C3.64963%208.7502%204.04683%207.76992%204.66796%207.03088C4.20231%205.46038%204.75927%204.24609%204.75927%204.24609C6.09617%204.24609%207.46009%205.33491%207.46022%205.33491C8.33696%205.07892%209.2355%204.97925%209.99994%204.97925C10.7644%204.97925%2011.6629%205.07878%2012.5397%205.33491C12.5397%205.33491%2013.9037%204.24609%2015.2406%204.24609C15.2406%204.24609%2015.7974%205.46038%2015.3319%207.03088C15.9532%207.76992%2016.3502%208.7502%2016.3502%2010.0349C16.3502%2012.0501%2015.6897%2014.2653%2011.8032%2014.7737C12.1475%2014.919%2012.4732%2015.6021%2012.4732%2016.3843V19.6293C12.4732%2019.8748%2012.706%2020.0494%2012.9358%2019.9774C17.0261%2018.6965%2020%2014.8091%2020%2010.2123C20.0001%204.5657%2015.5125%20-0.0106308%209.98069%201.85484e-05Z'%20fill='black'/%3e%3c/svg%3e",ORe={},MRe={class:"footer"};function DRe(r,e){return pu(),Gg("div",MRe,e[0]||(e[0]=[sn("div",{class:"footer-content-wrapper"},[sn("div",{class:"community-wrapper"},[sn("img",{src:PRe,alt:"github"})]),sn("div",{class:"copyright"},"ⓒ CTP. All Rights Reserved.")],-1)]))}const $Re=sR(ORe,[["render",DRe],["__scopeId","data-v-1574b52b"]]),BRe={__name:"App",setup(r){const e=BU();return(t,n)=>{const i=fte("router-view");return pu(),Gg(Qc,null,[Oo(e).path!="/"?(pu(),s6(NRe,{key:0})):o6("",!0),eo(i,{class:"router"}),Oo(e).path!="/"?(pu(),s6($Re,{key:1})):o6("",!0)],64)}}},LRe="data:image/svg+xml,%3csvg%20width='652'%20height='465'%20viewBox='0%200%20652%20465'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='45'%20y='1'%20width='562'%20height='384'%20rx='9'%20fill='%23D9D9D9'%20stroke='black'%20stroke-width='2'/%3e%3cpath%20d='M52.8332%20387H599.167C601.872%20387%20604.434%20388.217%20606.143%20390.314L649.895%20444H2.10498L45.8566%20390.314C47.5658%20388.217%2050.1277%20387%2052.8332%20387Z'%20fill='%23D9D9D9'%20stroke='black'%20stroke-width='2'/%3e%3cmask%20id='path-3-inside-1_23_92'%20fill='white'%3e%3cpath%20d='M0%20445H652V455C652%20460.523%20647.523%20465%20642%20465H9.99999C4.47714%20465%200%20460.523%200%20455V445Z'/%3e%3c/mask%3e%3cpath%20d='M0%20445H652V455C652%20460.523%20647.523%20465%20642%20465H9.99999C4.47714%20465%200%20460.523%200%20455V445Z'%20fill='%23D9D9D9'/%3e%3cpath%20d='M0%20445H652H0ZM654%20455C654%20461.627%20648.627%20467%20642%20467H10C3.37258%20467%20-2%20461.627%20-2%20455H2C2%20459.418%205.58172%20463%2010%20463H642C646.418%20463%20650%20459.418%20650%20455H654ZM10%20467C3.37258%20467%20-2%20461.627%20-2%20455V445H2V455C2%20459.418%205.58172%20463%2010%20463V467ZM654%20445V455C654%20461.627%20648.627%20467%20642%20467V463C646.418%20463%20650%20459.418%20650%20455V445H654Z'%20fill='black'%20mask='url(%23path-3-inside-1_23_92)'/%3e%3cpath%20d='M216.718%20444L225.234%20429H426.766L435.282%20444H216.718Z'%20fill='%23D9D9D9'%20stroke='black'%20stroke-width='2'/%3e%3cpath%20d='M72.8968%20422L93.4403%20392H552.56L573.103%20422H72.8968Z'%20fill='%23D9D9D9'%20stroke='black'%20stroke-width='2'/%3e%3c/svg%3e",URe="/webapp/assets/logo-DrIcDvRq.svg",FRe="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='12'%20height='19'%20viewBox='0%200%2012%2019'%20fill='none'%3e%3crect%20width='3'%20height='13.0816'%20transform='matrix(-0.707107%200.707107%200.707107%200.707107%202.43542%200.5)'%20fill='black'/%3e%3crect%20x='2.43542'%20y='19'%20width='3'%20height='13.0821'%20transform='rotate(-135%202.43542%2019)'%20fill='black'/%3e%3c/svg%3e",jRe="/webapp/assets/flower-COLkTZsA.svg",HRe="data:image/svg+xml,%3csvg%20width='278'%20height='527'%20viewBox='0%200%20278%20527'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='1'%20y='1'%20width='105'%20height='395'%20fill='%23542234'%20stroke='black'%20stroke-width='2'/%3e%3cpath%20d='M1%20524.211V120.381L106%202.62407V396.641L1%20524.211Z'%20fill='%23542234'%20stroke='black'%20stroke-width='2'/%3e%3cmask%20id='path-3-inside-1_23_114'%20fill='white'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M256%20271H52.6489L37%20289L242%20482L256%20460V271.44L256.351%20271H256Z'/%3e%3c/mask%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M256%20271H52.6489L37%20289L242%20482L256%20460V271.44L256.351%20271H256Z'%20fill='%23F4E598'/%3e%3cpath%20d='M52.6489%20271V269H51.7375L51.1395%20269.687L52.6489%20271ZM37%20289L35.4907%20287.687L34.2294%20289.138L35.629%20290.456L37%20289ZM242%20482L240.629%20483.456L242.389%20485.113L243.687%20483.073L242%20482ZM256%20460L257.687%20461.073L258%20460.582V460H256ZM256%20271.44L254.436%20270.193L254%20270.74V271.44H256ZM256.351%20271L257.915%20272.246L260.504%20269H256.351V271ZM52.6489%20273H256V269H52.6489V273ZM38.5093%20290.312L54.1582%20272.312L51.1395%20269.687L35.4907%20287.687L38.5093%20290.312ZM243.371%20480.543L38.371%20287.543L35.629%20290.456L240.629%20483.456L243.371%20480.543ZM254.313%20458.926L240.313%20480.926L243.687%20483.073L257.687%20461.073L254.313%20458.926ZM254%20271.44V460H258V271.44H254ZM254.787%20269.753L254.436%20270.193L257.564%20272.687L257.915%20272.246L254.787%20269.753ZM256%20273H256.351V269H256V273Z'%20fill='black'%20mask='url(%23path-3-inside-1_23_114)'/%3e%3cpath%20d='M224%20273L224%20294'%20stroke='black'%20stroke-width='2'/%3e%3cpath%20d='M180.999%20149.575L189.349%20326.85L167.374%20327.885L159.024%20150.629C159.217%20150.495%20159.468%20150.323%20159.768%20150.123C160.512%20149.628%20161.55%20148.967%20162.73%20148.3C165.143%20146.936%20167.954%20145.661%20170.033%20145.563C172.104%20145.466%20174.902%20146.47%20177.309%20147.604C178.485%20148.158%20179.521%20148.72%20180.262%20149.144C180.559%20149.314%20180.808%20149.461%20180.999%20149.575Z'%20fill='%234DC4CF'%20stroke='black'%20stroke-width='2'/%3e%3cpath%20d='M274.538%20198.757L195.01%20357.438L175.342%20347.58L254.839%20188.962C255.088%20188.949%20255.412%20188.933%20255.795%20188.919C256.739%20188.885%20258.04%20188.86%20259.468%20188.9C260.897%20188.941%20262.438%20189.045%20263.867%20189.264C265.309%20189.485%20266.572%20189.814%20267.483%20190.271C269.329%20191.196%20271.139%20193.345%20272.538%20195.413C273.221%20196.423%20273.779%20197.372%20274.166%20198.069C274.318%20198.342%20274.443%20198.575%20274.538%20198.757Z'%20fill='%23542234'%20stroke='black'%20stroke-width='2'/%3e%3crect%20x='-1.05128'%20y='0.945944'%20width='54.5233'%20height='177'%20rx='19'%20transform='matrix(-0.998612%20-0.0526679%20-0.0526679%200.998612%20113.821%20186.923)'%20fill='%23FC4B3B'%20stroke='black'%20stroke-width='2'/%3e%3cpath%20d='M56.5003%20259.5L105.5%20262.5'%20stroke='black'%20stroke-width='2'/%3e%3crect%20x='69.2144'%20y='127.568'%20width='66.7772'%20height='224.245'%20transform='rotate(-14.1758%2069.2144%20127.568)'%20fill='white'%20stroke='black'%20stroke-width='2'/%3e%3cpath%20d='M114.019%20144.098L140.682%20137.363'%20stroke='black'%20stroke-width='2'/%3e%3cpath%20d='M118.917%20163.489L145.58%20156.754'%20stroke='black'%20stroke-width='2'/%3e%3cpath%20d='M123.815%20182.88L150.478%20176.145'%20stroke='black'%20stroke-width='2'/%3e%3cpath%20d='M128.713%20202.271L155.376%20195.536'%20stroke='black'%20stroke-width='2'/%3e%3cpath%20d='M133.611%20221.662L160.274%20214.927'%20stroke='black'%20stroke-width='2'/%3e%3cpath%20d='M138.509%20241.053L165.172%20234.318'%20stroke='black'%20stroke-width='2'/%3e%3cpath%20d='M143.407%20260.444L170.07%20253.709'%20stroke='black'%20stroke-width='2'/%3e%3cpath%20d='M148.305%20279.834L174.968%20273.1'%20stroke='black'%20stroke-width='2'/%3e%3cpath%20d='M153.203%20299.226L179.866%20292.491'%20stroke='black'%20stroke-width='2'/%3e%3cmask%20id='path-20-inside-2_23_114'%20fill='white'%3e%3cpath%20d='M37%20289H242V482H37V289Z'/%3e%3c/mask%3e%3cpath%20d='M37%20289H242V482H37V289Z'%20fill='%23F4E598'/%3e%3cpath%20d='M37%20289V287H35V289H37ZM242%20289H244V287H242V289ZM242%20482V484H244V482H242ZM37%20482H35V484H37V482ZM37%20291H242V287H37V291ZM240%20289V482H244V289H240ZM242%20480H37V484H242V480ZM39%20482V289H35V482H39Z'%20fill='black'%20mask='url(%23path-20-inside-2_23_114)'/%3e%3cpath%20d='M241%20290.5L255%20272.5'%20stroke='black'%20stroke-width='2'/%3e%3c/svg%3e",WRe={class:"notebook"},zRe={class:"notebook-screen"},VRe={class:"notebook-screen-wrapper"},qRe={class:"notebook-screen-title-wrapper"},KRe={__name:"LandingPage",setup(r){const e=$U(),t=n=>{e.push(n),window.scrollTo(0,0)};return(n,i)=>(pu(),Gg(Qc,null,[sn("div",WRe,[i[5]||(i[5]=sn("img",{class:"fixed-notebook",src:LRe,alt:"Notebook"},null,-1)),sn("div",zRe,[sn("div",VRe,[i[4]||(i[4]=sn("img",{class:"fixed-logo",src:URe,alt:"Logo"},null,-1)),sn("div",qRe,[i[2]||(i[2]=sn("div",{class:"notebook-screen-title-text"},"Capture the Prompt",-1)),i[3]||(i[3]=sn("div",{class:"notebook-screen-content-text"}," Blockchain-Based AI Prompt Market via Capture-the-Flag ",-1)),sn("div",{class:"join-app-btn",onClick:i[0]||(i[0]=s=>t("/challenge"))},i[1]||(i[1]=[sn("div",{class:"join-app-text"},"Let’s Play",-1),sn("img",{src:FRe,alt:"Join-Arrow"},null,-1)]))])])])]),i[6]||(i[6]=sn("img",{class:"fixed-flower",src:jRe,alt:"Flower"},null,-1)),i[7]||(i[7]=sn("img",{class:"fixed-pencil",src:HRe,alt:"Pencil"},null,-1)),i[8]||(i[8]=sn("div",{class:"background-fixed"},null,-1))],64))}},GRe=sR(KRe,[["__scopeId","data-v-050d2aaf"]]),ZRe={__name:"LandingView",setup(r){return(e,t)=>(pu(),s6(GRe))}},YRe=[{path:"/",name:"Root",component:ZRe},{path:"/challenge",name:"Challenge",component:()=>lc(()=>import("./ChallengeView-39hjMaQL.js"),__vite__mapDeps([0,1,2]))},{path:"/leaderboard",name:"Leaderboard",component:()=>lc(()=>import("./LeaderboardView-2RIHWFwK.js"),__vite__mapDeps([3,1,4]))},{path:"/portfolio",name:"Portfolio",component:()=>lc(()=>import("./PortfolioView-BzZYjV41.js"),__vite__mapDeps([5,1,6]))}],QRe=Dne({history:lne("/webapp/"),routes:YRe,scrollBehavior(r,e,t){return t||{left:0,top:0}}}),IK=Tre(BRe);IK.use(QRe);IK.mount("#app");export{Qt as $,ty as A,W7 as B,lm as C,Ms as D,oa as E,Qc as F,Re as G,De as H,It as I,sq as J,or as K,HH as L,nr as M,it as N,bt as O,jH as P,l8 as Q,Te as R,Vt as S,tt as T,F5 as U,vke as V,_r as W,pF as X,Mae as Y,Gv as Z,sR as _,nRe as a,fd as a$,G0 as a0,M9 as a1,sw as a2,ow as a3,D9 as a4,fv as a5,A6 as a6,Fp as a7,jp as a8,pv as a9,lw as aA,ad as aB,uw as aC,Pu as aD,W9 as aE,Hf as aF,Ou as aG,xv as aH,yv as aI,gw as aJ,Mu as aK,ud as aL,mw as aM,od as aN,ww as aO,Av as aP,vw as aQ,Wf as aR,zf as aS,P6 as aT,Ev as aU,Vf as aV,hd as aW,dd as aX,Cv as aY,Sv as aZ,yw as a_,hc as aa,E6 as ab,Hp as ac,dc as ad,C6 as ae,cd as af,ld as ag,gv as ah,aw as ai,$9 as aj,S6 as ak,mv as al,cw as am,Wp as an,fl as ao,zp as ap,T6 as aq,wv as ar,pl as as,vv as at,fc as au,pa as av,L9 as aw,ga as ax,bv as ay,R6 as az,MMe as b,Du as b0,bw as b1,Vp as b2,qp as b3,Iv as b4,Tv as b5,Kp as b6,O6 as b7,ao as b8,Uo as b9,M6 as ba,Dt as bb,et as bc,Yt as bd,ne as be,lc as bf,ot as bg,ge as bh,ii as bi,LU as bj,$y as bk,el as c,sRe as d,Gg as e,sn as f,Zr as g,IL as h,ite as i,eke as j,Ei as k,o6 as l,s6 as m,zg as n,pu as o,axe as p,Az as q,Rf as r,tke as s,Cu as t,rRe as u,rke as v,XRe as w,ei as x,po as y,a1 as z}; diff --git a/assets/w3m-modal-cMICv7Lr.js b/assets/w3m-modal-DChjK9c6.js similarity index 96% rename from assets/w3m-modal-cMICv7Lr.js rename to assets/w3m-modal-DChjK9c6.js index 894677f..e8b34e1 100644 --- a/assets/w3m-modal-cMICv7Lr.js +++ b/assets/w3m-modal-DChjK9c6.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-CJHEREZQ.js","assets/index-BEOb6O_H.js","assets/index-CVeTJdZw.css"])))=>i.map(i=>d[i]); -import{bb as k,bc as C,M as n,H as w,O as f,bd as S,I as x,be as A,R as p,bf as g,$ as E,V as O,S as _,bg as m,bh as c,G as L,bi as N}from"./index-BEOb6O_H.js";const T=k` +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-DeuSBMQS.js","assets/index-b6Nsj3zY.js","assets/index-CVeTJdZw.css"])))=>i.map(i=>d[i]); +import{bb as k,bc as C,M as n,H as w,O as f,bd as S,I as x,be as A,R as p,bf as g,$ as E,V as O,S as _,bg as m,bh as c,G as L,bi as N}from"./index-b6Nsj3zY.js";const T=k` :host { z-index: var(--w3m-z-index); display: block; @@ -138,7 +138,7 @@ import{bb as k,bc as C,M as n,H as w,O as f,bd as S,I as x,be as A,R as p,bf as - `:null}async onOverlayClick(e){e.target===e.currentTarget&&await this.handleClose()}async handleClose(){const e=p.state.view==="ConnectingSiwe",t=p.state.view==="ApproveTransaction";if(this.isSiweEnabled){const{SIWEController:o}=await g(async()=>{const{SIWEController:i}=await import("./index-CJHEREZQ.js");return{SIWEController:i}},__vite__mapDeps([0,1,2]));o.state.status!=="success"&&(e||t)?n.shake():n.close()}else n.close()}initializeTheming(){const{themeVariables:e,themeMode:t}=N.state,o=E.getColorTheme(t);O(e,o)}onClose(){this.open=!1,this.classList.remove("open"),this.onScrollUnlock(),_.hide(),this.onRemoveKeyboardListener()}onOpen(){this.open=!0,this.classList.add("open"),this.onScrollLock(),this.onAddKeyboardListener()}onScrollLock(){const e=document.createElement("style");e.dataset.w3m=v,e.textContent=` + `:null}async onOverlayClick(e){e.target===e.currentTarget&&await this.handleClose()}async handleClose(){const e=p.state.view==="ConnectingSiwe",t=p.state.view==="ApproveTransaction";if(this.isSiweEnabled){const{SIWEController:o}=await g(async()=>{const{SIWEController:i}=await import("./index-DeuSBMQS.js");return{SIWEController:i}},__vite__mapDeps([0,1,2]));o.state.status!=="success"&&(e||t)?n.shake():n.close()}else n.close()}initializeTheming(){const{themeVariables:e,themeMode:t}=N.state,o=E.getColorTheme(t);O(e,o)}onClose(){this.open=!1,this.classList.remove("open"),this.onScrollUnlock(),_.hide(),this.onRemoveKeyboardListener()}onOpen(){this.open=!0,this.classList.add("open"),this.onScrollLock(),this.onAddKeyboardListener()}onScrollLock(){const e=document.createElement("style");e.dataset.w3m=v,e.textContent=` body { touch-action: none; overflow: hidden; @@ -147,4 +147,4 @@ import{bb as k,bc as C,M as n,H as w,O as f,bd as S,I as x,be as A,R as p,bf as w3m-modal { pointer-events: auto; } - `,document.head.appendChild(e)}onScrollUnlock(){const e=document.head.querySelector(`style[data-w3m="${v}"]`);e&&e.remove()}onAddKeyboardListener(){var t;this.abortController=new AbortController;const e=(t=this.shadowRoot)==null?void 0:t.querySelector("wui-card");e==null||e.focus(),window.addEventListener("keydown",o=>{if(o.key==="Escape")this.handleClose();else if(o.key==="Tab"){const{tagName:s}=o.target;s&&!s.includes("W3M-")&&!s.includes("WUI-")&&(e==null||e.focus())}},this.abortController)}onRemoveKeyboardListener(){var e;(e=this.abortController)==null||e.abort(),this.abortController=void 0}async onNewAddress(e){var r,d;if(!this.connected||this.loading)return;const t=m.getPlainAddress(this.caipAddress),o=m.getPlainAddress(e),s=m.getNetworkId(this.caipAddress),i=m.getNetworkId(e);if(this.caipAddress=e,this.isSiweEnabled){const{SIWEController:h}=await g(async()=>{const{SIWEController:y}=await import("./index-CJHEREZQ.js");return{SIWEController:y}},__vite__mapDeps([0,1,2])),b=await h.getSession();if(b&&t&&o&&t!==o){(r=h.state._client)!=null&&r.options.signOutOnAccountChange&&(await h.signOut(),this.onSiweNavigation());return}if(b&&s&&i&&s!==i){(d=h.state._client)!=null&&d.options.signOutOnNetworkChange&&(await h.signOut(),this.onSiweNavigation());return}this.onSiweNavigation()}}onSiweNavigation(){this.open?p.push("ConnectingSiwe"):n.open({view:"ConnectingSiwe"})}};a.styles=T;l([c()],a.prototype,"open",void 0);l([c()],a.prototype,"caipAddress",void 0);l([c()],a.prototype,"isSiweEnabled",void 0);l([c()],a.prototype,"connected",void 0);l([c()],a.prototype,"loading",void 0);l([c()],a.prototype,"shake",void 0);a=l([L("w3m-modal")],a);export{a as W3mModal}; + `,document.head.appendChild(e)}onScrollUnlock(){const e=document.head.querySelector(`style[data-w3m="${v}"]`);e&&e.remove()}onAddKeyboardListener(){var t;this.abortController=new AbortController;const e=(t=this.shadowRoot)==null?void 0:t.querySelector("wui-card");e==null||e.focus(),window.addEventListener("keydown",o=>{if(o.key==="Escape")this.handleClose();else if(o.key==="Tab"){const{tagName:s}=o.target;s&&!s.includes("W3M-")&&!s.includes("WUI-")&&(e==null||e.focus())}},this.abortController)}onRemoveKeyboardListener(){var e;(e=this.abortController)==null||e.abort(),this.abortController=void 0}async onNewAddress(e){var r,d;if(!this.connected||this.loading)return;const t=m.getPlainAddress(this.caipAddress),o=m.getPlainAddress(e),s=m.getNetworkId(this.caipAddress),i=m.getNetworkId(e);if(this.caipAddress=e,this.isSiweEnabled){const{SIWEController:h}=await g(async()=>{const{SIWEController:y}=await import("./index-DeuSBMQS.js");return{SIWEController:y}},__vite__mapDeps([0,1,2])),b=await h.getSession();if(b&&t&&o&&t!==o){(r=h.state._client)!=null&&r.options.signOutOnAccountChange&&(await h.signOut(),this.onSiweNavigation());return}if(b&&s&&i&&s!==i){(d=h.state._client)!=null&&d.options.signOutOnNetworkChange&&(await h.signOut(),this.onSiweNavigation());return}this.onSiweNavigation()}}onSiweNavigation(){this.open?p.push("ConnectingSiwe"):n.open({view:"ConnectingSiwe"})}};a.styles=T;l([c()],a.prototype,"open",void 0);l([c()],a.prototype,"caipAddress",void 0);l([c()],a.prototype,"isSiweEnabled",void 0);l([c()],a.prototype,"connected",void 0);l([c()],a.prototype,"loading",void 0);l([c()],a.prototype,"shake",void 0);a=l([L("w3m-modal")],a);export{a as W3mModal}; diff --git a/index.html b/index.html index 6edb32a..f6e3a6d 100644 --- a/index.html +++ b/index.html @@ -7,7 +7,7 @@ Capture the Prompt - +